Skip to content

Commit

Permalink
Get options related to posts asking only the wpseo option
Browse files Browse the repository at this point in the history
  • Loading branch information
leonidasmi committed Oct 25, 2024
1 parent aa40fe4 commit b28111a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin/class-admin-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private function register_premium_upsell_admin_block() {
* @return void
*/
private function load_xml_sitemaps_admin() {
if ( WPSEO_Options::get( 'enable_xml_sitemap', false ) ) {
if ( WPSEO_Options::get( 'enable_xml_sitemap', null, [ 'wpseo' ] ) ) {
new WPSEO_Sitemaps_Admin();
}
}
Expand Down
4 changes: 2 additions & 2 deletions admin/metabox/class-metabox.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public function __construct() {
$this->editor = new WPSEO_Metabox_Editor();
$this->editor->register_hooks();

$this->social_is_enabled = WPSEO_Options::get( 'opengraph', false ) || WPSEO_Options::get( 'twitter', false );
$this->is_advanced_metadata_enabled = WPSEO_Capability_Utils::current_user_can( 'wpseo_edit_advanced_metadata' ) || WPSEO_Options::get( 'disableadvanced_meta' ) === false;
$this->social_is_enabled = WPSEO_Options::get( 'opengraph', false, [ 'wpseo_social' ] ) || WPSEO_Options::get( 'twitter', false, [ 'wpseo_social' ] );
$this->is_advanced_metadata_enabled = WPSEO_Capability_Utils::current_user_can( 'wpseo_edit_advanced_metadata' ) || WPSEO_Options::get( 'disableadvanced_meta', null, [ 'wpseo' ] ) === false;

$this->seo_analysis = new WPSEO_Metabox_Analysis_SEO();
$this->readability_analysis = new WPSEO_Metabox_Analysis_Readability();
Expand Down

0 comments on commit b28111a

Please sign in to comment.