PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wordpress-seo-premium.13.4.1
/
premium
/
classes
<?php /** * WPSEO Premium plugin file. * * @package WPSEO\Premium */ /** * Registers the endpoint for the linking prominent words to a post. */ class WPSEO_Premium_Prominent_Words_Link_Endpoint implements WPSEO_WordPress_Integration { const REST_NAMESPACE = 'yoast/v1'; const ENDPOINT_QUERY = 'prominent_words_link'; const CAPABILITY_RETRIEVE = 'edit_posts'; /** * Instance of the WPSEO_Premium_Prominent_Words_Link_Service class. * * @var WPSEO_Premium_Prominent_Words_Link_Service */ protected $service; /** * WPSEO_Premium_Prominent_Words_Endpoint constructor. * * @param WPSEO_Premium_Prominent_Words_Link_Service $service The service to handle the requests to the endpoint. */ public function __construct( WPSEO_Premium_Prominent_Words_Link_Service $service ) { $this->service = $service; } /** * Registers all hooks to WordPress. */ public function register_hooks() { add_action( 'rest_api_init', [ $this, 'register' ] ); } /** * Registers the REST endpoint to WordPress. */ public function register() { $route_args = [ 'methods' => 'POST', 'args' => [ WPSEO_Premium_Prominent_Words_Registration::TERM_NAME => [ 'required' => false, 'type' => 'array', 'items' => [ 'type' => 'integer' ], 'description' => 'The prominent words to link', ], ], 'callback' => [ $this->service, 'save', ], 'permission_callback' => [ $this, 'can_retrieve_data', ], ]; register_rest_route( self::REST_NAMESPACE, self::ENDPOINT_QUERY . '/(?P<id>[\d]+)', $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 ); } }
[+]
..
[-] premium-prominent-words-link-endpoint.php
[edit]
[-] premium-prominent-words-recalculation.php
[edit]
[-] premium-orphaned-post-notifier.php
[edit]
[+]
redirect
[-] premium-prominent-words-support.php
[edit]
[-] premium-post-data-service.php
[edit]
[-] premium-assets.php
[edit]
[-] premium-redirect-service.php
[edit]
[-] facebook-profile.php
[edit]
[-] premium-prominent-words-link-service.php
[edit]
[-] .classes.php
[edit]
[-] premium-prominent-words-recalculation-notifier.php
[edit]
[-] premium-free-translations.php
[edit]
[-] premium-redirect-endpoint.php
[edit]
[-] premium-post-data-endpoint.php
[edit]
[-] premium-gsc.php
[edit]
[-] premium-prominent-words-language-support.php
[edit]
[-] premium-orphaned-content-support.php
[edit]
[-] premium-metabox.php
[edit]
[-] premium-link-suggestions-service.php
[edit]
[-] validation-error.php
[edit]
[-] premium-autoloader.php
[edit]
[-] social-previews.php
[edit]
[-] premium-prominent-words-versioning.php
[edit]
[+]
export
[-] multi-keyword.php
[edit]
[-] premium-link-suggestions-endpoint.php
[edit]
[-] premium-redirect-option.php
[edit]
[-] upgrade-manager.php
[edit]
[-] post-watcher.php
[edit]
[-] metabox-link-suggestions.php
[edit]
[-] premium-prominent-words-recalculation-endpoint.php
[edit]
[-] premium-expose-shortlinks.php
[edit]
[-] premium-asset-js-l10n.php
[edit]
[-] premium-import-manager.php
[edit]
[-] premium-prominent-words-endpoint.php
[edit]
[-] term-watcher.php
[edit]
[-] watcher.php
[edit]
[-] premium-prominent-words-registration.php
[edit]
[-] premium-orphaned-content-utils.php
[edit]
[-] premium-redirect-export-manager.php
[edit]
[-] premium-javascript-strings.php
[edit]
[-] validation-result.php
[edit]
[-] premium-register-capabilities.php
[edit]
[-] premium-stale-cornerstone-content-notification.php
[edit]
[-] product-premium.php
[edit]
[-] premium-keyword-export-manager.php
[edit]
[-] validation-warning.php
[edit]
[-] premium-stale-cornerstone-content-filter.php
[edit]
[-] premium-gsc-modal.php
[edit]
[-] premium-orphaned-post-query.php
[edit]
[-] premium-prominent-words-unindexed-post-query.php
[edit]
[-] premium-prominent-words-service.php
[edit]
[+]
views
[-] custom-fields-plugin.php
[edit]
[-] premium-orphaned-post-filter.php
[edit]
[-] premium-prominent-words-recalculation-service.php
[edit]