-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'add/traffic-boost' into add/dashboard-header
- Loading branch information
Showing
12 changed files
with
218 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-dom-ready', 'wp-element', 'wp-primitives'), 'version' => '899988226d2180e0bead'); | ||
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '801d6f5bef2f27842da3'); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url', 'wp-wordcount'), 'version' => 'df37572f8d1f45c12fc4'); | ||
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url', 'wp-wordcount'), 'version' => '91832340c46f7a9be8e6'); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/content-helper/common/settings/types/traffic-boost-settings.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* Defines the Traffic Boost settings structure. | ||
* | ||
* @since 3.18.0 | ||
*/ | ||
export interface TrafficBoostSettings { | ||
Setting1: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/rest-api/settings/class-endpoint-traffic-boost-settings.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
/** | ||
* API Endpoint: Traffic Boost Settings | ||
* | ||
* @package Parsely | ||
* @since 3.18.0 | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Parsely\REST_API\Settings; | ||
|
||
/** | ||
* Endpoint for saving and retrieving Content Helper Traffic Boost settings. | ||
* | ||
* @since 3.18.0 | ||
* | ||
* @phpstan-import-type Subvalue_Spec from Base_Settings_Endpoint | ||
*/ | ||
class Endpoint_Traffic_Boost_Settings extends Base_Settings_Endpoint { | ||
/** | ||
* Returns the endpoint's name. | ||
* | ||
* @since 3.18.0 | ||
* | ||
* @return string | ||
*/ | ||
public static function get_endpoint_name(): string { | ||
return 'traffic-boost'; | ||
} | ||
|
||
/** | ||
* Returns the meta entry's key. | ||
* | ||
* @since 3.18.0 | ||
* | ||
* @return string The meta entry's key. | ||
*/ | ||
protected function get_meta_key(): string { | ||
return 'parsely_content_helper_settings_traffic_boost'; | ||
} | ||
|
||
/** | ||
* Returns the endpoint's subvalues specifications. | ||
* | ||
* @since 3.18.0 | ||
* | ||
* @return array<string, Subvalue_Spec> | ||
*/ | ||
protected function get_subvalues_specs(): array { | ||
return array( | ||
'Setting1' => array( | ||
'values' => array(), | ||
'default' => 'Hello World!', | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters