PATH:
home
/
letacommog
/
latelier-beaute
/
wp-content
/
plugins
/
wordpress-seo
/
admin
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin */ /** * Represents the yoast cornerstone content. */ class WPSEO_Cornerstone { const META_NAME = 'is_cornerstone'; const FIELD_NAME = 'yoast_wpseo_is_cornerstone'; /** * Registers the hooks. * * @return void */ public function register_hooks() { global $pagenow; if ( ! $this->page_contains_cornerstone_content_field( $pagenow ) ) { return; } add_action( 'save_post', array( $this, 'save_meta_value' ) ); add_filter( 'wpseo_cornerstone_post_types', array( 'WPSEO_Post_Type', 'filter_attachment_post_type' ) ); } /** * Saves the meta value to the database. * * @param int $post_id The post id to save the meta value for. * * @return void */ public function save_meta_value( $post_id ) { $is_cornerstone_content = $this->is_cornerstone_content(); if ( $is_cornerstone_content ) { $this->update_meta( $post_id, $is_cornerstone_content ); return; } $this->delete_meta( $post_id ); } /** * Returns the result of the cornerstone content checkbox. * * @return bool True when checkbox is checked. */ protected function is_cornerstone_content() { return filter_input( INPUT_POST, self::FIELD_NAME ) === 'true'; } /** * Checks if the current page matches one of the pages that contains the cornerstone content field. * * @param string $page The page to check. * * @return bool True when the page contains the cornerstone content field. */ protected function page_contains_cornerstone_content_field( $page ) { return WPSEO_Metabox::is_post_edit( $page ); } /** * Updates the cornerstone content post meta with the given cornerstone content value. * * @param int $post_id The post id to save the meta value for. * @param bool $is_cornerstone_content Whether or not the post should be considered to be cornerstone content. * * @return void */ protected function update_meta( $post_id, $is_cornerstone_content ) { WPSEO_Meta::set_value( self::META_NAME, $is_cornerstone_content, $post_id ); } /** * Deletes the cornerstone content post meta for the given post id. * * @param int $post_id The post id to delete the cornerstone content meta value for.. * * @return void */ protected function delete_meta( $post_id ) { WPSEO_Meta::delete( self::META_NAME, $post_id ); } }
[+]
..
[-] class-yoast-network-settings-api.php
[edit]
[-] class-admin-gutenberg-compatibility-notification.php
[edit]
[-] class-meta-storage.php
[edit]
[-] class-yoast-alerts.php
[edit]
[-] class-primary-term-admin.php
[edit]
[-] class-plugin-conflict.php
[edit]
[-] class-plugin-compatibility.php
[edit]
[+]
metabox
[+]
notifiers
[-] class-export.php
[edit]
[-] class-premium-popup.php
[edit]
[+]
config-ui
[+]
watchers
[-] ajax.php
[edit]
[-] class-asset.php
[edit]
[-] class-suggested-plugins.php
[edit]
[-] class-remote-request.php
[edit]
[-] class-premium-upsell-admin-block.php
[edit]
[+]
statistics
[+]
taxonomy
[-] class-add-keyword-modal.php
[edit]
[-] class-help-center-item.php
[edit]
[+]
formatter
[-] interface-collection.php
[edit]
[-] class-product-upsell-notice.php
[edit]
[-] class-admin-asset-manager.php
[edit]
[-] class-yoast-notification.php
[edit]
[-] class-yoast-modal.php
[edit]
[-] class-extension.php
[edit]
[-] class-bulk-editor-list-table.php
[edit]
[-] class-admin-asset-dev-server-location.php
[edit]
[-] class-database-proxy.php
[edit]
[-] class-admin-user-profile.php
[edit]
[-] class-option-tabs.php
[edit]
[-] class-yoast-network-admin.php
[edit]
[-] index.php
[edit]
[+]
links
[+]
onpage
[-] class-yoast-form.php
[edit]
[-] class-admin-asset-analysis-worker-location.php
[edit]
[-] class-extensions.php
[edit]
[+]
help_center
[-] class-bulk-description-editor-list-table.php
[edit]
[-] class-plugin-availability.php
[edit]
[-] class-admin-media-purge-notification.php
[edit]
[+]
tracking
[-] class-help-center.php
[edit]
[-] class-admin-recommended-replace-vars.php
[edit]
[-] class-yoast-notification-center.php
[edit]
[+]
roles
[-] class-admin-help-panel.php
[edit]
[+]
menu
[-] class-admin.php
[edit]
[-] class-yoast-columns.php
[edit]
[+]
services
[-] class-gutenberg-compatibility.php
[edit]
[-] class-admin-asset-seo-location.php
[edit]
[+]
recalculate
[-] interface-installable.php
[edit]
[-] class-config.php
[edit]
[-] class-keyword-synonyms-modal.php
[edit]
[-] class-social-admin.php
[edit]
[-] class-admin-editor-specific-replace-vars.php
[edit]
[-] class-yoast-dashboard-widget.php
[edit]
[+]
endpoints
[-] class-admin-utils.php
[edit]
[-] class-cornerstone.php
[edit]
[-] class-option-tabs-formatter.php
[edit]
[+]
filters
[+]
pages
[-] class-meta-columns.php
[edit]
[-] class-customizer.php
[edit]
[-] class-recalculate-scores.php
[edit]
[-] class-paper-presenter.php
[edit]
[-] class-option-tab.php
[edit]
[+]
google_search_console
[+]
import
[+]
ajax
[+]
capabilities
[-] class-admin-init.php
[edit]
[+]
listeners
[-] class-admin-asset-yoast-components-l10n.php
[edit]
[-] class-yoast-plugin-conflict.php
[edit]
[-] class-extension-manager.php
[edit]
[-] class-expose-shortlinks.php
[edit]
[-] class-admin-asset-location.php
[edit]
[-] class-license-page-manager.php
[edit]
[-] class-bulk-title-editor-list-table.php
[edit]
[+]
views
[-] class-meta-table-accessible.php
[edit]
[-] class-multiple-keywords-modal.php
[edit]
[-] class-collector.php
[edit]