PATH:
home
/
letacommog
/
bresse-paysage
/
wp-content
/
plugins
/
wordpress-seo-premium
/
premium
/
classes
<?php /** * WPSEO Premium plugin file. * * @package WPSEO\Premium */ /** * Registers the endpoint for retrieving a post's content and its Yoast metadata * (meta description, keywords, synonyms and SEO title) to WordPress. */ class WPSEO_Premium_Post_Data_Endpoint implements WPSEO_WordPress_Integration { /** * The REST API namespace. * * @var string */ const REST_NAMESPACE = 'yoast/v1'; /** * The REST API endpoint. * * @var string */ const ENDPOINT_QUERY = 'post_data'; /** * The capability needed to retrieve the prominent words. * * @var string */ const CAPABILITY_RETRIEVE = 'edit_posts'; /** * Instance of the WPSEO_Premium_Prominent_Words_Service class. * * @var WPSEO_Premium_Prominent_Words_Service */ protected $service; /** * WPSEO_Premium_Post_Data_Endpoint constructor. * * @param WPSEO_Premium_Post_Data_Service $service The service to handle the requests to the endpoint. */ public function __construct( WPSEO_Premium_Post_Data_Service $service ) { $this->service = $service; } /** * Registers all hooks to WordPress. */ public function register_hooks() { add_action( 'rest_api_init', array( $this, 'register' ) ); } /** * Register the REST endpoint to WordPress. */ public function register() { $route_args = array( 'methods' => 'GET', 'callback' => array( $this->service, 'query', ), 'permission_callback' => array( $this, 'can_retrieve_data', ), ); register_rest_route( self::REST_NAMESPACE, self::ENDPOINT_QUERY, $route_args ); } /** * Determines if the current user is allowed to use this endpoint. * * @return bool */ public function can_retrieve_data() { return current_user_can( self::CAPABILITY_RETRIEVE ); } }
[+]
..
[+]
export
[-] premium-prominent-words-endpoint.php
[edit]
[-] premium-prominent-words-service.php
[edit]
[-] premium-gsc-modal.php
[edit]
[-] upgrade-manager.php
[edit]
[-] premium-import-manager.php
[edit]
[-] premium-prominent-words-unindexed-post-query.php
[edit]
[+]
views
[-] validation-warning.php
[edit]
[-] validation-result.php
[edit]
[-] premium-redirect-export-manager.php
[edit]
[-] multi-keyword.php
[edit]
[-] premium-prominent-words-recalculation-notifier.php
[edit]
[-] premium-orphaned-post-notifier.php
[edit]
[-] premium-prominent-words-recalculation.php
[edit]
[-] premium-prominent-words-link-endpoint.php
[edit]
[-] premium-post-data-service.php
[edit]
[-] premium-prominent-words-language-support.php
[edit]
[-] product-premium.php
[edit]
[-] premium-javascript-strings.php
[edit]
[-] premium-redirect-service.php
[edit]
[-] premium-redirect-endpoint.php
[edit]
[-] premium-prominent-words-link-service.php
[edit]
[-] premium-free-translations.php
[edit]
[+]
redirect
[-] premium-prominent-words-recalculation-endpoint.php
[edit]
[-] premium-register-capabilities.php
[edit]
[-] premium-orphaned-post-query.php
[edit]
[-] custom-fields-plugin.php
[edit]
[-] premium-keyword-export-manager.php
[edit]
[-] premium-prominent-words-versioning.php
[edit]
[-] premium-post-data-endpoint.php
[edit]
[-] premium-prominent-words-recalculation-service.php
[edit]
[-] premium-orphaned-post-filter.php
[edit]
[-] facebook-profile.php
[edit]
[-] premium-autoloader.php
[edit]
[-] premium-stale-cornerstone-content-notification.php
[edit]
[-] premium-beacon-setting.php
[edit]
[-] watcher.php
[edit]
[-] premium-expose-shortlinks.php
[edit]
[-] premium-link-suggestions-service.php
[edit]
[-] premium-assets.php
[edit]
[-] term-watcher.php
[edit]
[-] premium-metabox.php
[edit]
[-] metabox-link-suggestions.php
[edit]
[-] premium-gsc.php
[edit]
[-] premium-stale-cornerstone-content-filter.php
[edit]
[-] post-watcher.php
[edit]
[-] validation-error.php
[edit]
[-] premium-asset-js-l10n.php
[edit]
[-] social-previews.php
[edit]
[-] premium-prominent-words-registration.php
[edit]
[-] premium-prominent-words-support.php
[edit]
[-] premium-orphaned-content-utils.php
[edit]
[-] premium-link-suggestions-endpoint.php
[edit]
[-] premium-orphaned-content-support.php
[edit]