-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the class to create new methods to get the namespace and route…
… for optimization detective This commit adds the deprecated.php file which has the global constant that are being inside image priortizer and updated the OD plugin to use this constants via a dedicated methods.
- Loading branch information
Showing
9 changed files
with
98 additions
and
8 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* Deprecated functions and constants. | ||
* | ||
* @package optimization-detective | ||
* | ||
* @since n.e.x.t | ||
*/ | ||
|
||
// @codeCoverageIgnoreStart | ||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; // Exit if accessed directly. | ||
} | ||
|
||
/** | ||
* Namespace for optimization-detective. | ||
* | ||
* @since 0.1.0 | ||
* @access private | ||
* @deprecated n.e.x.t This constant should not be used, instead use OD_Rest_API::get_namespace() method. | ||
* @var string | ||
*/ | ||
const OD_REST_API_NAMESPACE = 'optimization-detective/v1'; | ||
|
||
/** | ||
* Route for storing a URL Metric. | ||
* | ||
* Note the `:store` art of the endpoint follows Google's guidance in AIP-136 for the use of the POST method in a way | ||
* that does not strictly follow the standard usage. Namely, submitting a POST request to this endpoint will either | ||
* create a new `od_url_metrics` post, or it will update an existing post if one already exists for the provided slug. | ||
* | ||
* @since 0.1.0 | ||
* @access private | ||
* @link https://google.aip.dev/136 | ||
* @deprecated n.e.x.t This constant should not be used, instead use OD_Rest_API::get_route() method. | ||
* @var string | ||
*/ | ||
const OD_URL_METRICS_ROUTE = '/url-metrics:store'; | ||
// @codeCoverageIgnoreEnd |
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
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