'_genesis_title', 'desc' => '_genesis_description', 'canonical' => '_genesis_canonical_uri', 'noindex' => '_genesis_noindex', 'nofollow' => '_genesis_nofollow', 'og_title' => '_open_graph_title', 'og_desc' => '_open_graph_description', 'og_image' => '_social_image_url', 'tw_title' => '_twitter_title', 'tw_desc' => '_twitter_description', ); } protected function has_settings(): bool { return array() !== $this->option( 'autodescription-site-settings' ); } public function settings(): array { $o = $this->option( 'autodescription-site-settings' ); if ( empty( $o ) ) { return array(); } $noindex_pt = array(); $noindex_tax = array(); foreach ( (array) ( $o['noindex_post_types'] ?? array() ) as $type => $on ) { if ( $on ) { $noindex_pt[] = (string) $type; } } foreach ( (array) ( $o['noindex_taxonomies'] ?? array() ) as $tax => $on ) { if ( $on ) { $noindex_tax[] = (string) $tax; } } return array( 'separator' => mb_substr( (string) ( $o['title_separator'] ?? '' ), 0, 3 ), 'home_title' => $this->vars( (string) ( $o['homepage_title'] ?? '' ) ), 'home_desc' => $this->vars( (string) ( $o['homepage_description'] ?? '' ) ), 'noindex_types' => $noindex_pt, 'noindex_taxonomies' => $noindex_tax, 'author_noindex' => ! empty( $o['noindex_author'] ), 'date_noindex' => ! empty( $o['noindex_date'] ), 'og_default_image' => (string) ( $o['social_image_fb_url'] ?? '' ), 'twitter_site' => ltrim( (string) ( $o['twitter_site'] ?? '' ), '@' ), 'twitter_card' => 'summary' === (string) ( $o['twitter_card'] ?? '' ) ? 'summary' : 'summary_large_image', 'facebook_app_id' => (string) ( $o['facebook_appid'] ?? '' ), 'organisation' => array( 'name' => (string) ( $o['knowledge_name'] ?? '' ), 'logo' => (string) ( $o['knowledge_logo_url'] ?? '' ), 'type' => 'personal' === (string) ( $o['knowledge_type'] ?? '' ) ? 'person' : 'organization', ), ); } }