Merged in feature/314-dev-dev01 (pull request #24)
auto-patch 314-dev-dev01-2024-01-25T04_09_02 * auto-patch 314-dev-dev01-2024-01-25T04_09_02
This commit is contained in:
@@ -19,7 +19,7 @@ class WPSEO_Admin {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const PAGE_IDENTIFIER = 'wpseo_dashboard';
|
||||
public const PAGE_IDENTIFIER = 'wpseo_dashboard';
|
||||
|
||||
/**
|
||||
* Array of classes that add admin functionality.
|
||||
@@ -117,6 +117,8 @@ class WPSEO_Admin {
|
||||
|
||||
/**
|
||||
* Schedules a rewrite flush to happen at shutdown.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function schedule_rewrite_flush() {
|
||||
// Bail if this is a multisite installation and the site has been switched.
|
||||
@@ -138,6 +140,8 @@ class WPSEO_Admin {
|
||||
|
||||
/**
|
||||
* Register assets needed on admin pages.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function enqueue_assets() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form data.
|
||||
@@ -157,13 +161,15 @@ class WPSEO_Admin {
|
||||
/**
|
||||
* Filter: 'wpseo_manage_options_capability' - Allow changing the capability users need to view the settings pages.
|
||||
*
|
||||
* @api string unsigned The capability.
|
||||
* @param string $capability The capability.
|
||||
*/
|
||||
return apply_filters( 'wpseo_manage_options_capability', 'wpseo_manage_options' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps the manage_options cap on saving an options page to wpseo_manage_options.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function map_manage_options_cap() {
|
||||
// phpcs:ignore WordPress.Security -- The variable is only used in strpos and thus safe to not unslash or sanitize.
|
||||
@@ -177,6 +183,8 @@ class WPSEO_Admin {
|
||||
/**
|
||||
* Adds the ability to choose how many posts are displayed per page
|
||||
* on the bulk edit pages.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function bulk_edit_options() {
|
||||
$option = 'per_page';
|
||||
@@ -214,7 +222,7 @@ class WPSEO_Admin {
|
||||
* @return array
|
||||
*/
|
||||
public function add_action_link( $links, $file ) {
|
||||
$first_time_configuration_notice_helper = \YoastSEO()->helpers->first_time_configuration_notice;
|
||||
$first_time_configuration_notice_helper = YoastSEO()->helpers->first_time_configuration_notice;
|
||||
|
||||
if ( $file === WPSEO_BASENAME && WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) {
|
||||
if ( is_network_admin() ) {
|
||||
@@ -272,6 +280,8 @@ class WPSEO_Admin {
|
||||
|
||||
/**
|
||||
* Enqueues the (tiny) global JS needed for the plugin.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function config_page_scripts() {
|
||||
$asset_manager = new WPSEO_Admin_Asset_Manager();
|
||||
@@ -281,6 +291,8 @@ class WPSEO_Admin {
|
||||
|
||||
/**
|
||||
* Enqueues the (tiny) global stylesheet needed for the plugin.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function enqueue_global_style() {
|
||||
$asset_manager = new WPSEO_Admin_Asset_Manager();
|
||||
@@ -313,6 +325,8 @@ class WPSEO_Admin {
|
||||
|
||||
/**
|
||||
* Log the updated timestamp for user profiles when theme is changed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function switch_theme() {
|
||||
|
||||
@@ -351,6 +365,8 @@ class WPSEO_Admin {
|
||||
|
||||
/**
|
||||
* Sets the upsell notice.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function set_upsell_notice() {
|
||||
$upsell = new WPSEO_Product_Upsell_Notice();
|
||||
|
||||
Reference in New Issue
Block a user