| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/tabs.tar |
metas/archives/help.php 0000666 00000003246 15112332751 0011133 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Archive
*/
$archives_help_content = [
sprintf(
/* translators: %1$s / %2$s: links to an article about duplicate content on yoast.com */
esc_html__( 'If you\'re running a one author blog, the author archive will be exactly the same as your homepage. This is what\'s called a %1$sduplicate content problem%2$s.', 'wordpress-seo' ),
'<a target="_blank" href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/duplicate-content' ) ) . '">',
'</a>'
),
sprintf(
/* translators: %s expands to <code>noindex, follow</code> */
esc_html__( 'If this is the case on your site, you can choose to either disable it (which makes it redirect to the homepage), or to add %s to it so it doesn\'t show up in the search results.', 'wordpress-seo' ),
'<code>noindex,follow</code>'
),
esc_html__( 'Note that links to archives might be still output by your theme and you would need to remove them separately.', 'wordpress-seo' ),
esc_html__( 'Date-based archives could in some cases also be seen as duplicate content.', 'wordpress-seo' ),
];
$archives_help = new WPSEO_Admin_Help_Panel(
'search-appearance-archives',
__( 'Learn more about the archives setting', 'wordpress-seo' ),
implode( ' ', $archives_help_content ),
'has-wrapper'
);
// phpcs:ignore WordPress.Security.EscapeOutput -- get_button_html() output is properly escaped.
echo '<p class="help-button-inline"><strong>' . esc_html__( 'Archives settings help', 'wordpress-seo' ) . $archives_help->get_button_html() . '</strong><p>';
// phpcs:ignore WordPress.Security.EscapeOutput -- get_panel_html() output is properly escaped.
echo $archives_help->get_panel_html();
metas/paper-content/rss-content.php 0000666 00000004265 15112332751 0013437 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Rss
*
* @uses Yoast_Form $yform Form object.
*/
$textarea_atts = [
'cols' => '50',
'rows' => '5',
];
$yform->textarea( 'rssbefore', __( 'Content to put before each post in the feed', 'wordpress-seo' ), $textarea_atts );
$yform->textarea( 'rssafter', __( 'Content to put after each post in the feed', 'wordpress-seo' ), $textarea_atts );
$rss_variables_help = new WPSEO_Admin_Help_Panel(
'search-appearance-rss-variables',
__( 'Learn more about the available variables', 'wordpress-seo' ),
__( 'You can use the following variables within the content, they will be replaced by the value on the right.', 'wordpress-seo' ),
'has-wrapper'
);
// phpcs:ignore WordPress.Security.EscapeOutput -- get_button_html() output is properly escaped.
echo '<h2 class="help-button-inline">' . esc_html__( 'Available variables', 'wordpress-seo' ) . $rss_variables_help->get_button_html() . '</h2>';
// phpcs:ignore WordPress.Security.EscapeOutput -- get_panel_html() output is properly escaped.
echo $rss_variables_help->get_panel_html();
?>
<table class="wpseo yoast_help yoast-table-scrollable">
<thead>
<tr>
<th scope="col"><?php esc_html_e( 'Variable', 'wordpress-seo' ); ?></th>
<th scope="col"><?php esc_html_e( 'Description', 'wordpress-seo' ); ?></th>
</tr>
</thead>
<tbody>
<tr>
<td class="yoast-variable-name">%%AUTHORLINK%%</td>
<td class="yoast-variable-desc"><?php esc_html_e( 'A link to the archive for the post author, with the authors name as anchor text.', 'wordpress-seo' ); ?></td>
</tr>
<tr>
<td class="yoast-variable-name">%%POSTLINK%%</td>
<td class="yoast-variable-desc"><?php esc_html_e( 'A link to the post, with the title as anchor text.', 'wordpress-seo' ); ?></td>
</tr>
<tr>
<td class="yoast-variable-name">%%BLOGLINK%%</td>
<td class="yoast-variable-desc"><?php esc_html_e( "A link to your site, with your site's name as anchor text.", 'wordpress-seo' ); ?></td>
</tr>
<tr>
<td class="yoast-variable-name">%%BLOGDESCLINK%%</td>
<td class="yoast-variable-desc"><?php esc_html_e( "A link to your site, with your site's name and description as anchor text.", 'wordpress-seo' ); ?></td>
</tr>
</tbody>
</table>
metas/paper-content/post-type-content.php 0000666 00000011702 15112332751 0014566 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Taxonomies
*
* @uses Yoast_Form $yform Form object.
* @uses WP_Post_Type $wpseo_post_type
* @uses Yoast_View_Utils $view_utils
* @uses WPSEO_Admin_Recommended_Replace_Vars $recommended_replace_vars
* @uses WPSEO_Admin_Editor_Specific_Replace_Vars $editor_specific_replace_vars
*/
$single_label = $wpseo_post_type->labels->singular_name;
$paper_style = false;
/* translators: %s is the singular version of the post type's name. */
echo '<h3>' . esc_html( sprintf( __( 'Single %s settings', 'wordpress-seo' ), $wpseo_post_type->labels->singular_name ) ) . '</h3>';
require __DIR__ . '/post_type/post-type.php';
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
// phpcs:ignore Yoast.NamingConventions.ValidHookName.MaxExceeded -- Added _internal suffix for clarity.
do_action( 'Yoast\WP\SEO\admin_post_types_beforearchive_internal', $yform, $wpseo_post_type->name );
/**
* Allow adding custom fields to the admin meta page, just before the archive settings - Content Types tab.
*
* @deprecated 19.10 No replacement available.
*
* @param Yoast_Form $yform The Yoast_Form object.
* @param string $name The post type name.
*/
do_action_deprecated(
'Yoast\WP\SEO\admin_post_types_beforearchive',
[ $yform, $wpseo_post_type->name ],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
if ( $wpseo_post_type->name === 'product' && YoastSEO()->helpers->woocommerce->is_active() ) {
require __DIR__ . '/post_type/woocommerce-shop-page.php';
return;
}
if ( WPSEO_Post_Type::has_archive( $wpseo_post_type ) ) {
$plural_label = $wpseo_post_type->labels->name;
$archive_url = get_post_type_archive_link( $wpseo_post_type->name );
$label = '<a href="' . esc_url( $archive_url ) . '">' . esc_html( $plural_label ) . '</a>';
/* translators: %s is the plural version of the post type's name. */
echo '<h3>' . esc_html( sprintf( __( '%s archive settings', 'wordpress-seo' ), $plural_label ) ) . '</h3>';
echo '<div class="yoast-settings-section">';
$custom_post_type_archive_help = $view_utils->search_results_setting_help( $wpseo_post_type, 'archive' );
$yform->index_switch(
'noindex-ptarchive-' . $wpseo_post_type->name,
sprintf(
/* translators: %s expands to the post type's name with a link to the archive. */
esc_html__( 'the archive for %s', 'wordpress-seo' ),
$label
),
$custom_post_type_archive_help->get_button_html() . $custom_post_type_archive_help->get_panel_html()
);
echo '</div>';
echo '<div class="yoast-settings-section">';
$page_type = $recommended_replace_vars->determine_for_archive( $wpseo_post_type->name );
$editor = new WPSEO_Replacevar_Editor(
$yform,
[
'title' => 'title-ptarchive-' . $wpseo_post_type->name,
'description' => 'metadesc-ptarchive-' . $wpseo_post_type->name,
'page_type_recommended' => $recommended_replace_vars->determine_for_archive( $wpseo_post_type->name ),
'page_type_specific' => $editor_specific_replace_vars->determine_for_archive( $wpseo_post_type->name ),
'paper_style' => false,
]
);
$editor->render();
echo '</div>';
if ( WPSEO_Options::get( 'breadcrumbs-enable' ) === true ) {
echo '<div class="yoast-settings-section">';
$yform->textinput_extra_content( 'bctitle-ptarchive-' . $wpseo_post_type->name, __( 'Breadcrumbs title', 'wordpress-seo' ) );
echo '</div>';
}
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
// phpcs:ignore Yoast.NamingConventions.ValidHookName.MaxExceeded -- Added _internal suffix for clarity.
do_action( 'Yoast\WP\SEO\admin_post_types_archive_internal', $yform, $wpseo_post_type->name );
/**
* Allow adding custom fields to the admin meta page at the end of the archive settings for a post type - Content Types tab.
*
* @deprecated 19.10 No replacement available.
*
* @param Yoast_Form $yform The Yoast_Form object.
* @param string $name The post type name.
*/
do_action_deprecated(
'Yoast\WP\SEO\admin_post_types_archive',
[ $yform, $wpseo_post_type->name ],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
}
/**
* Allow adding a custom checkboxes to the admin meta page - Post Types tab.
*
* @deprecated 16.3 Use the {@see 'Yoast\WP\SEO\admin_post_types_beforearchive'} action instead.
*
* @param Yoast_Form $yform The Yoast_Form object.
* @param string $name The post type name.
*/
do_action_deprecated(
'wpseo_admin_page_meta_post_types',
[ $yform, $wpseo_post_type->name ],
'16.3',
'Yoast\WP\SEO\admin_post_types_beforearchive'
);
metas/paper-content/front-page-content.php 0000666 00000004555 15112332751 0014674 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\PaperContent
*
* @uses Yoast_Form $yform Form object.
* @uses WP_Taxonomy $wpseo_post_type
* @uses Yoast_View_Utils $view_utils
* @uses WPSEO_Admin_Recommended_Replace_Vars $recommended_replace_vars
*/
use Yoast\WP\SEO\Presenters\Admin\Badge_Presenter;
$view_utils = new Yoast_View_Utils();
$opengraph_disabled_alert = $view_utils->generate_opengraph_disabled_alert( 'homepage' );
if ( ! empty( $opengraph_disabled_alert ) ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Is correctly escaped in the generate_opengraph_disabled_alert() method.
echo $opengraph_disabled_alert;
}
else {
echo '<div class="yoast-settings-section">';
echo '<div class="social-settings-heading-container">';
echo '<h3 class="social-settings-heading">' . \esc_html__( 'Social settings', 'wordpress-seo' ) . '</h3>';
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Is correctly escaped in the Badge_Presenter.
echo new Badge_Presenter( 'global-templates-homepage', '', 'global-templates' );
echo '</div>';
echo '<p>' . esc_html__( 'These are the image, title and description used when a link to your homepage is shared on social media.', 'wordpress-seo' ) . '</p>';
printf(
'<div
id="%1$s"
data-react-image-portal
data-react-image-portal-target-image="%2$s"
data-react-image-portal-target-image-id="%3$s"
data-react-image-portal-has-image-validation="%4$s"
></div>',
'yoast-og-frontpage-image-select',
'open_graph_frontpage_image',
'open_graph_frontpage_image_id',
true
);
$yform->hidden( 'open_graph_frontpage_image', 'open_graph_frontpage_image' );
$yform->hidden( 'open_graph_frontpage_image_id', 'open_graph_frontpage_image_id' );
$editor = new WPSEO_Replacevar_Editor(
$yform,
[
'title' => 'open_graph_frontpage_title',
'description' => 'open_graph_frontpage_desc',
'page_type_recommended' => 'homepage',
'page_type_specific' => 'page',
'paper_style' => false,
'label_title' => __( 'Social title', 'wordpress-seo' ),
'label_description' => __( 'Social description', 'wordpress-seo' ),
'description_placeholder' => '',
]
);
$editor->render();
echo '</div>';
}
metas/paper-content/post_type/woocommerce-shop-page.php 0000666 00000001773 15112332751 0017407 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\General
*
* @uses WP_Post_Type $wpseo_post_type
*/
$description = esc_html__( 'You haven\'t set a Shop page in your WooCommerce settings. Please do this first.', 'wordpress-seo' );
if ( YoastSEO()->helpers->woocommerce->get_shop_page_id() !== -1 ) {
$description = sprintf(
/* translators: %1$s expands to an opening anchor tag, %2$s expands to a closing anchor tag. */
esc_html__( 'You can edit the SEO metadata for this custom type on the %1$sShop page%2$s.', 'wordpress-seo' ),
'<a href="' . esc_url( get_edit_post_link( YoastSEO()->helpers->woocommerce->get_shop_page_id() ) ) . '">',
'</a>'
);
}
/* translators: %s expands to the post type name. */
echo '<h3>', esc_html( sprintf( __( 'Settings for %s archive', 'wordpress-seo' ), $wpseo_post_type->labels->name ) ), '</h3>';
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: Output is properly escaped already, see above.
echo '<p>', $description, '</p>';
metas/paper-content/post_type/post-type.php 0000666 00000006526 15112332751 0015154 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\PaperContent
*
* @uses Yoast_Form $yform Form object.
* @uses WP_Taxonomy $wpseo_post_type
* @uses Yoast_View_Utils $view_utils
* @uses WPSEO_Admin_Recommended_Replace_Vars $recommended_replace_vars
* @uses WPSEO_Admin_Editor_Specific_Replace_Vars $editor_specific_replace_vars
*/
use Yoast\WP\SEO\Config\Schema_Types;
use Yoast\WP\SEO\Helpers\Schema\Article_Helper;
$show_post_type_help = $view_utils->search_results_setting_help( $wpseo_post_type );
$noindex_option_name = 'noindex-' . $wpseo_post_type->name;
echo '<div class="yoast-settings-section">';
$yform->index_switch(
$noindex_option_name,
$wpseo_post_type->labels->name,
$show_post_type_help->get_button_html() . $show_post_type_help->get_panel_html()
);
$yform->show_hide_switch(
'display-metabox-pt-' . $wpseo_post_type->name,
/* translators: %s expands to an indexable object's name, like a post type or taxonomy */
sprintf( esc_html__( 'Show SEO settings for %1$s?', 'wordpress-seo' ), $wpseo_post_type->labels->name )
);
echo '</div>';
echo '<div class="yoast-settings-section">';
$editor = new WPSEO_Replacevar_Editor(
$yform,
[
'title' => 'title-' . $wpseo_post_type->name,
'description' => 'metadesc-' . $wpseo_post_type->name,
'page_type_recommended' => $recommended_replace_vars->determine_for_post_type( $wpseo_post_type->name ),
'page_type_specific' => $editor_specific_replace_vars->determine_for_post_type( $wpseo_post_type->name ),
'paper_style' => false,
]
);
$editor->render();
echo '</div>';
echo '<div class="yoast-settings-section">';
// Schema settings.
$article_helper = new Article_Helper();
$schema_page_type_option = 'schema-page-type-' . $wpseo_post_type->name;
$schema_article_type_option = 'schema-article-type-' . $wpseo_post_type->name;
$yform->hidden( $schema_page_type_option );
if ( $article_helper->is_article_post_type( $wpseo_post_type->name ) ) {
$schema_article_type_option_value = WPSEO_Options::get( $schema_article_type_option );
/** This filter is documented in inc/options/class-wpseo-option-titles.php */
$allowed_article_types = apply_filters( 'wpseo_schema_article_types', Schema_Types::ARTICLE_TYPES );
if ( ! array_key_exists( $schema_article_type_option_value, $allowed_article_types ) ) {
$schema_article_type_option_value = WPSEO_Options::get_default( 'wpseo_titles', $schema_article_type_option );
}
$yform->hidden( $schema_article_type_option, '', $schema_article_type_option_value );
}
printf(
'<div class="yoast-schema-settings-container" data-schema-settings data-schema-settings-post-type="%1$s" data-schema-settings-post-type-name="%2$s" data-schema-settings-page-type-field-id="%3$s" data-schema-settings-article-type-field-id="%4$s" data-schema-settings-page-type-default="%5$s" data-schema-settings-article-type-default="%6$s"></div>',
esc_attr( $wpseo_post_type->name ),
esc_attr( $wpseo_post_type->labels->name ),
esc_attr( 'hidden_' . $schema_page_type_option ),
esc_attr( 'hidden_' . $schema_article_type_option ),
esc_attr( WPSEO_Options::get_default( 'wpseo_titles', $schema_page_type_option ) ),
esc_attr( WPSEO_Options::get_default( 'wpseo_titles', $schema_article_type_option ) )
);
echo '</div>';
metas/paper-content/media-content.php 0000666 00000001620 15112332751 0013677 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Media
*
* @uses Yoast_Form $yform Form object.
*/
$wpseo_post_type = get_post_type_object( 'attachment' );
$recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
$editor_specific_replace_vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
$view_utils = new Yoast_View_Utils();
?>
<p><strong><?php esc_html_e( 'We recommend you set this to Yes.', 'wordpress-seo' ); ?></strong></p>
<?php
$yoast_free_disable_attachments_texts = [
'on' => __( 'Yes', 'wordpress-seo' ),
'off' => __( 'No', 'wordpress-seo' ),
];
$yform->toggle_switch(
'disable-attachment',
$yoast_free_disable_attachments_texts,
__( 'Redirect attachment URLs to the attachment itself?', 'wordpress-seo' )
);
?>
<div id="media_settings">
<br/>
<br/>
<?php
require __DIR__ . '/post_type/post-type.php';
?>
</div>
metas/paper-content/breadcrumbs-content.php 0000666 00000010431 15112332751 0015111 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Breadcrumbs
*
* @uses Yoast_Form $yform Form object.
*/
echo '<div id="breadcrumbsinfo">';
$yform->textinput( 'breadcrumbs-sep', __( 'Separator between breadcrumbs', 'wordpress-seo' ) );
$yform->textinput( 'breadcrumbs-home', __( 'Anchor text for the Homepage', 'wordpress-seo' ) );
$yform->textinput( 'breadcrumbs-prefix', __( 'Prefix for the breadcrumb path', 'wordpress-seo' ) );
$yform->textinput( 'breadcrumbs-archiveprefix', __( 'Prefix for Archive breadcrumbs', 'wordpress-seo' ) );
$yform->textinput( 'breadcrumbs-searchprefix', __( 'Prefix for Search Page breadcrumbs', 'wordpress-seo' ) );
$yform->textinput( 'breadcrumbs-404crumb', __( 'Breadcrumb for 404 Page', 'wordpress-seo' ) );
echo '<br/>';
if ( get_option( 'show_on_front' ) === 'page' && get_option( 'page_for_posts' ) > 0 ) {
$yform->show_hide_switch( 'breadcrumbs-display-blog-page', __( 'Show Blog page', 'wordpress-seo' ) );
}
$yoast_free_breadcrumb_bold_texts = [
'on' => __( 'Bold', 'wordpress-seo' ),
'off' => __( 'Regular', 'wordpress-seo' ),
];
$yform->toggle_switch(
'breadcrumbs-boldlast',
$yoast_free_breadcrumb_bold_texts,
__( 'Bold the last page', 'wordpress-seo' )
);
echo '<br/><br/>';
/*
* WPSEO_Post_Type::get_accessible_post_types() should *not* be used here.
* Even posts that are not indexed, should be able to get breadcrumbs for accessibility/usability.
*/
$post_types = get_post_types( [ 'public' => true ], 'objects' );
if ( is_array( $post_types ) && $post_types !== [] ) {
echo '<h2>' . esc_html__( 'Taxonomy to show in breadcrumbs for content types', 'wordpress-seo' ) . '</h2>';
foreach ( $post_types as $pt ) {
$taxonomies = get_object_taxonomies( $pt->name, 'objects' );
if ( is_array( $taxonomies ) && $taxonomies !== [] ) {
$values = [ 0 => __( 'None', 'wordpress-seo' ) ];
foreach ( $taxonomies as $yoast_seo_taxonomy ) {
if ( ! $yoast_seo_taxonomy->public ) {
continue;
}
$values[ $yoast_seo_taxonomy->name ] = $yoast_seo_taxonomy->labels->singular_name;
}
$label = $pt->labels->name . ' (<code>' . $pt->name . '</code>)';
$yform->select( 'post_types-' . $pt->name . '-maintax', $label, $values );
unset( $values, $yoast_seo_taxonomy );
}
unset( $taxonomies );
}
unset( $pt );
}
echo '<br/>';
$taxonomies = get_taxonomies(
[
'public' => true,
],
'objects'
);
if ( is_array( $taxonomies ) && $taxonomies !== [] ) {
echo '<h2>' . esc_html__( 'Content type archive to show in breadcrumbs for taxonomies', 'wordpress-seo' ) . '</h2>';
foreach ( $taxonomies as $yoast_seo_taxonomy ) {
$values = [ 0 => __( 'None', 'wordpress-seo' ) ];
if ( get_option( 'show_on_front' ) === 'page' && get_option( 'page_for_posts' ) > 0 ) {
$values['post'] = __( 'Blog', 'wordpress-seo' );
}
if ( is_array( $post_types ) && $post_types !== [] ) {
foreach ( $post_types as $pt ) {
if ( WPSEO_Post_Type::has_archive( $pt ) ) {
$values[ $pt->name ] = $pt->labels->name;
}
}
unset( $pt );
}
$label = $yoast_seo_taxonomy->labels->singular_name . ' (<code>' . $yoast_seo_taxonomy->name . '</code>)';
$yform->select( 'taxonomy-' . $yoast_seo_taxonomy->name . '-ptparent', $label, $values );
unset( $values, $yoast_seo_taxonomy );
}
}
unset( $taxonomies, $post_types );
?>
<br class="clear"/>
</div>
<h2><?php esc_html_e( 'How to insert breadcrumbs in your theme', 'wordpress-seo' ); ?></h2>
<?php
echo '<p>';
printf(
/* translators: %1$s / %2$s: links to the breadcrumbs implementation page on the Yoast knowledgebase */
esc_html__( 'Usage of this breadcrumbs feature is explained in %1$sour knowledge-base article on breadcrumbs implementation%2$s.', 'wordpress-seo' ),
'<a href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/breadcrumbs' ) ) . '" target="_blank">',
'</a>'
);
echo '</p>';
if ( ! current_theme_supports( 'yoast-seo-breadcrumbs' ) ) {
echo '<p>';
/* translators: %1$s / %2$s: links to the breadcrumbs implementation page on the Yoast knowledgebase */
echo esc_html_e( 'Note: You can always choose to enable / disable them for your theme below. This setting will not apply to breadcrumbs inserted through a widget, a block or a shortcode.', 'wordpress-seo' );
echo '</p>';
$yform->light_switch( 'breadcrumbs-enable', __( 'Enable Breadcrumbs for your theme', 'wordpress-seo' ) );
}
metas/paper-content/integrations/wincher.php 0000666 00000000405 15112332751 0015315 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Integrations
*
* @uses Yoast_Form $yform Form object.
*/
$yform = Yoast_Form::get_instance();
// Ensure we don't accidentally reset the website ID.
$yform->hidden( 'wincher_website_id' );
metas/paper-content/special-pages.php 0000666 00000001461 15112332751 0013670 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Archive
*
* @uses Yoast_Form $yform Form object.
*/
$special_pages_help = new WPSEO_Admin_Help_Panel(
'search-appearance-special-pages',
__( 'Learn more about the special pages setting', 'wordpress-seo' ),
sprintf(
/* translators: %s expands to <code>noindex, follow</code>. */
__( 'These pages will be %s by default, so they will never show up in search results.', 'wordpress-seo' ),
'<code>noindex, follow</code>'
),
'has-wrapper'
);
$editor = new WPSEO_Replacevar_Field( $yform, 'title-search-wpseo', __( 'Search pages', 'wordpress-seo' ), 'search', 'search' );
$editor->render();
echo '<br/>';
$editor = new WPSEO_Replacevar_Field( $yform, 'title-404-wpseo', __( '404 pages', 'wordpress-seo' ), '404', '404' );
$editor->render();
metas/paper-content/author-archive-settings.php 0000666 00000007213 15112332751 0015733 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Archive
*
* @uses Yoast_Form $yform Form object.
*/
$yform->toggle_switch(
'disable-author',
[
'off' => __( 'On', 'wordpress-seo' ),
'on' => __( 'Off', 'wordpress-seo' ),
],
__( 'Author archives', 'wordpress-seo' )
);
?>
<div id='author-archives-titles-metas-content' class='archives-titles-metas-content'>
<div class="yoast-settings-section">
<?php
$author_archives_help = new WPSEO_Admin_Help_Panel(
'noindex-author-wpseo',
esc_html__( 'Help on the author archives search results setting', 'wordpress-seo' ),
sprintf(
/* translators: 1: expands to <code>noindex</code>; 2: link open tag; 3: link close tag. */
esc_html__( 'Not showing the archive for authors in the search results technically means those will have a %1$s robots meta and will be excluded from XML sitemaps. %2$sMore info on the search results settings%3$s.', 'wordpress-seo' ),
'<code>noindex</code>',
'<a href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/show-x' ) ) . '" target="_blank" rel="noopener noreferrer">',
'</a>'
)
);
$yform->index_switch(
'noindex-author-wpseo',
__( 'author archives', 'wordpress-seo' ),
$author_archives_help->get_button_html() . $author_archives_help->get_panel_html()
);
?>
<div id='noindex-author-noposts-wpseo-container'>
<?php
$author_archives_no_posts_help = new WPSEO_Admin_Help_Panel(
'noindex-author-noposts-wpseo',
esc_html__( 'Help on the authors without posts archive search results setting', 'wordpress-seo' ),
sprintf(
/* translators: 1: expands to <code>noindex</code>; 2: link open tag; 3: link close tag. */
esc_html__( 'Not showing the archives for authors without posts in the search results technically means those will have a %1$s robots meta and will be excluded from XML sitemaps. %2$sMore info on the search results settings%3$s.', 'wordpress-seo' ),
'<code>noindex</code>',
'<a href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/show-x' ) ) . '" target="_blank" rel="noopener noreferrer">',
'</a>'
)
);
$yform->index_switch(
'noindex-author-noposts-wpseo',
__( 'archives for authors without posts', 'wordpress-seo' ),
$author_archives_no_posts_help->get_button_html() . $author_archives_no_posts_help->get_panel_html()
);
?>
</div>
</div>
<?php
echo '<div class="yoast-settings-section">';
$recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
$editor_specific_replace_vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
$editor = new WPSEO_Replacevar_Editor(
$yform,
[
'title' => 'title-author-wpseo',
'description' => 'metadesc-author-wpseo',
'page_type_recommended' => $recommended_replace_vars->determine_for_archive( 'author' ),
'page_type_specific' => $editor_specific_replace_vars->determine_for_archive( 'author' ),
'paper_style' => false,
]
);
$editor->render();
echo '</div>';
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
// phpcs:ignore Yoast.NamingConventions.ValidHookName.MaxExceeded -- Added _internal suffix for clarity.
do_action( 'Yoast\WP\SEO\admin_author_archives_meta_internal', $yform );
/**
* Allow adding custom fields to the admin meta page - Author archives panel in the Archives tab.
*
* @deprecated 19.10 No replacement available.
*
* @param Yoast_Form $yform The Yoast_Form object.
*/
do_action_deprecated(
'Yoast\WP\SEO\admin_author_archives_meta',
[ $yform ],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
?>
</div>
metas/paper-content/general/homepage.php 0000666 00000003206 15112332751 0014354 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\General
*
* @uses Yoast_Form $yform Form object.
*/
if ( get_option( 'show_on_front' ) === 'posts' ) {
echo '<div class="yoast-settings-section">';
echo esc_html__( 'This is what shows in the search results when people find your homepage. This means this is probably what they see when they search for your brand name.', 'wordpress-seo' );
$editor = new WPSEO_Replacevar_Editor(
$yform,
[
'title' => 'title-home-wpseo',
'description' => 'metadesc-home-wpseo',
'page_type_recommended' => 'homepage',
'page_type_specific' => 'page',
'paper_style' => false,
]
);
$editor->render();
echo '</div>';
require __DIR__ . '/../front-page-content.php';
}
else {
$wpseo_page_on_front = get_option( 'page_on_front' );
$wpseo_page_for_posts = get_option( 'page_for_posts' );
if ( empty( $wpseo_page_on_front ) ) {
$wpseo_page_on_front = $wpseo_page_for_posts;
}
printf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'You can determine the title and description for the homepage by %1$sediting the homepage itself%2$s.', 'wordpress-seo' ),
'<a href="' . esc_url( get_edit_post_link( $wpseo_page_on_front ) ) . '">',
'</a>'
);
if ( $wpseo_page_for_posts > 0 ) {
echo '<p>';
printf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'You can determine the title and description for the posts page by %1$sediting the posts page itself%2$s.', 'wordpress-seo' ),
'<a href="' . esc_url( get_edit_post_link( $wpseo_page_for_posts ) ) . '">',
'</a>'
);
echo '</p>';
}
}
metas/paper-content/general/title-separator.php 0000666 00000001142 15112332751 0015703 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\General
*
* @uses Yoast_Form $yform Form object.
*/
echo esc_html__( 'Choose the symbol to use as your title separator. This will display, for instance, between your post title and site name. Symbols are shown in the size they\'ll appear in the search results.', 'wordpress-seo' );
$legend = __( 'Title separator symbol', 'wordpress-seo' );
$legend_attr = [ 'class' => 'radiogroup screen-reader-text' ];
$yform->radio( 'separator', WPSEO_Option_Titles::get_instance()->get_separator_options_for_display(), $legend, $legend_attr );
metas/paper-content/general/knowledge-graph.php 0000666 00000010561 15112332751 0015647 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\General
*
* @uses Yoast_Form $yform Form object.
*/
echo '<h3>', esc_html__( 'Website', 'wordpress-seo' ),'</h3>';
echo '<p>', esc_html__( 'This name is shown for your site in the search results.', 'wordpress-seo' ), '</p>';
$yform->textinput(
'website_name',
__( 'Website name', 'wordpress-seo' ),
[
'placeholder' => \get_bloginfo( 'name' ),
]
);
$yform->textinput(
'alternate_website_name',
__( 'Alternate website name', 'wordpress-seo' )
);
echo '<p style="margin-bottom: 2em;">', esc_html__( 'Use the alternate website name for acronyms, or a shorter version of your website\'s name.', 'wordpress-seo' ), '</p>';
echo '<h3>', esc_html__( 'Organization or Person', 'wordpress-seo' ), '</h3>';
echo '<p>', sprintf(
/* translators: %1$s opens the link to the Yoast.com article about Google's Knowledge Graph, %2$s closes the link, */
esc_html__( 'This data is shown as metadata in your site. It is intended to appear in %1$sGoogle\'s Knowledge Graph%2$s. You can be either an organization, or a person.', 'wordpress-seo' ),
'<a href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/1-p' ) ) . '" target="_blank" rel="noopener noreferrer">',
'</a>'
), '</p>';
/**
* Retrieve the site logo ID from WordPress settings.
*
* @return false|int
*/
function fallback_to_site_logo() {
$logo_id = \get_option( 'site_logo' );
if ( ! $logo_id ) {
$logo_id = \get_theme_mod( 'custom_logo' );
}
return $logo_id;
}
/**
* Filter: 'wpseo_knowledge_graph_setting_msg' - Allows adding a message above these settings.
*
* @api string unsigned Message.
*/
$message = apply_filters( 'wpseo_knowledge_graph_setting_msg', '' );
if ( ! empty( $message ) ) {
echo '<p><strong>', esc_html( $message ), '</strong></p>';
}
?>
<p>
<?php esc_html_e( 'Choose whether the site represents an organization or a person.', 'wordpress-seo' ); ?>
</p>
<?php
$yoast_free_kg_select_options = [
'company' => __( 'Organization', 'wordpress-seo' ),
'person' => __( 'Person', 'wordpress-seo' ),
];
$yform->select( 'company_or_person', __( 'Organization or person', 'wordpress-seo' ), $yoast_free_kg_select_options, 'styled', false );
?>
<div id="knowledge-graph-company">
<h3><?php esc_html_e( 'Organization', 'wordpress-seo' ); ?></h3>
<?php
/*
* Render the `knowledge-graph-company-warning` div when the company name or logo are not set.
* This div is used as React render root in `js/src/search-appearance.js`.
*/
$yoast_seo_company_name = WPSEO_Options::get( 'company_name', '' );
$yoast_seo_company_logo = WPSEO_Options::get( 'company_logo', '' );
$yoast_seo_person_logo = WPSEO_Options::get( 'person_logo', '' );
$yoast_seo_site_name = ( WPSEO_Options::get( 'company_name', '' ) === '' ) ? get_bloginfo( 'name' ) : '';
$fallback_logo = fallback_to_site_logo();
if ( empty( $yoast_seo_company_logo ) && $fallback_logo ) {
$yform->hidden( 'company_logo_fallback_id', 'company_logo_fallback_id', $fallback_logo );
}
if ( empty( $yoast_seo_company_name ) || empty( $yoast_seo_company_logo ) ) :
?>
<div id="knowledge-graph-company-warning"></div>
<?php
endif;
$yform->textinput(
'company_name',
__( 'Organization name', 'wordpress-seo' ),
[
'autocomplete' => 'organization',
'placeholder' => $yoast_seo_site_name,
]
);
$yform->textinput(
'company_alternate_name',
__( 'Alternate organization name', 'wordpress-seo' )
);
echo '<p>', esc_html__( 'Use the alternate organization name for acronyms, or a shorter version of your organization\'s name.', 'wordpress-seo' ), '</p>';
$yform->hidden( 'company_logo', 'company_logo' );
$yform->hidden( 'company_logo_id', 'company_logo_id' );
?>
<div id="yoast-organization-image-select"></div>
<div id="wpseo-local-seo-upsell"></div>
</div>
<div id="knowledge-graph-person">
<h3><?php esc_html_e( 'Personal info', 'wordpress-seo' ); ?></h3>
<div id="wpseo-person-selector"></div>
<?php
if ( empty( $yoast_seo_person_logo ) ) :
?>
<div id="knowledge-graph-person-image-info"></div>
<?php
endif;
?>
<div id="yoast-person-image-select"></div>
<?php
$yform->hidden( 'person_logo', 'person_logo' );
if ( empty( $yoast_seo_person_logo ) && $fallback_logo ) {
$yform->hidden( 'person_logo_fallback_id', 'person_logo_fallback_id', $fallback_logo );
}
$yform->hidden( 'person_logo_id', 'person_logo_id' );
$yform->hidden( 'company_or_person_user_id', 'person_id' );
?>
</div>
metas/paper-content/general/force-rewrite-title.php 0000666 00000001032 15112332751 0016456 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\General
*
* @uses Yoast_Form $yform Form object.
*/
$yform->light_switch( 'forcerewritetitle', __( 'Force rewrite titles', 'wordpress-seo' ) );
echo '<p class="description">';
printf(
/* translators: %1$s expands to Yoast SEO */
esc_html__( '%1$s has auto-detected whether it needs to force rewrite the titles for your pages, if you think it\'s wrong and you know what you\'re doing, you can change the setting here.', 'wordpress-seo' ),
'Yoast SEO'
);
echo '</p>';
metas/paper-content/date-archives-settings.php 0000666 00000005161 15112332751 0015531 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Archive
*
* @uses Yoast_Form $yform Form object.
*/
$yform->toggle_switch(
'disable-date',
[
'off' => __( 'On', 'wordpress-seo' ),
'on' => __( 'Off', 'wordpress-seo' ),
],
__( 'Date archives', 'wordpress-seo' )
);
?>
<div id='date-archives-titles-metas-content' class='archives-titles-metas-content'>
<div class="yoast-settings-section">
<?php
$date_archives_help = new WPSEO_Admin_Help_Panel(
'noindex-archive-wpseo',
esc_html__( 'Help on the date archives search results setting', 'wordpress-seo' ),
sprintf(
/* translators: 1: expands to <code>noindex</code>; 2: link open tag; 3: link close tag. */
esc_html__( 'Not showing the date archives in the search results technically means those will have a %1$s robots meta. %2$sMore info on the search results settings%3$s.', 'wordpress-seo' ),
'<code>noindex</code>',
'<a href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/show-x' ) ) . '" target="_blank" rel="noopener noreferrer">',
'</a>'
)
);
$yform->index_switch(
'noindex-archive-wpseo',
__( 'date archives', 'wordpress-seo' ),
$date_archives_help->get_button_html() . $date_archives_help->get_panel_html()
);
echo '</div>';
echo '<div class="yoast-settings-section">';
$recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
$editor_specific_replace_vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
$editor = new WPSEO_Replacevar_Editor(
$yform,
[
'title' => 'title-archive-wpseo',
'description' => 'metadesc-archive-wpseo',
'page_type_recommended' => $recommended_replace_vars->determine_for_archive( 'date' ),
'page_type_specific' => $editor_specific_replace_vars->determine_for_archive( 'date' ),
'paper_style' => false,
]
);
$editor->render();
echo '</div>';
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
// phpcs:ignore Yoast.NamingConventions.ValidHookName.MaxExceeded -- Added _internal suffix for clarity.
do_action( 'Yoast\WP\SEO\admin_date_archives_meta_internal', $yform );
/**
* Allow adding custom fields to the admin meta page - Date archives panel in the Archives tab.
*
* @deprecated 19.10 No replacement available.
*
* @param Yoast_Form $yform The Yoast_Form object.
*/
do_action_deprecated(
'Yoast\WP\SEO\admin_date_archives_meta',
[ $yform ],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
?>
</div>
metas/paper-content/taxonomy-content.php 0000666 00000006301 15112332751 0014477 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Taxonomies
*
* @uses Yoast_Form $yform Form object.
* @uses WP_Taxonomy $wpseo_taxonomy
* @uses Yoast_View_Utils $view_utils
* @uses string $title
* @uses WPSEO_Admin_Recommended_Replace_Vars $recommended_replace_vars
* @uses WPSEO_Admin_Editor_Specific_Replace_Vars $editor_specific_replace_vars
*/
if ( $wpseo_taxonomy->name === 'post_format' ) {
$yform->light_switch(
'disable-post_format',
__( 'Format-based archives', 'wordpress-seo' ),
[ __( 'On', 'wordpress-seo' ), __( 'Off', 'wordpress-seo' ) ],
false
);
}
echo '<div class="yoast-settings-section">';
echo "<div id='" . esc_attr( $wpseo_taxonomy->name ) . "-titles-metas'>";
$taxonomies_help = $view_utils->search_results_setting_help( $wpseo_taxonomy );
$yform->index_switch(
'noindex-tax-' . $wpseo_taxonomy->name,
$title,
$taxonomies_help->get_button_html() . $taxonomies_help->get_panel_html()
);
if ( $wpseo_taxonomy->name !== 'post_format' ) {
$yform->show_hide_switch(
'display-metabox-tax-' . $wpseo_taxonomy->name,
/* translators: %s: Expands to an indexable object's name, like a post type or taxonomy. */
sprintf( __( 'Show SEO settings for %1$s?', 'wordpress-seo' ), $title )
);
}
echo '</div>';
echo '</div>';
echo '<div class="yoast-settings-section">';
// Determine the page type for the term, this is needed for the recommended replacement variables.
$page_type = $recommended_replace_vars->determine_for_term( $wpseo_taxonomy->name );
$editor = new WPSEO_Replacevar_Editor(
$yform,
[
'title' => 'title-tax-' . $wpseo_taxonomy->name,
'description' => 'metadesc-tax-' . $wpseo_taxonomy->name,
'page_type_recommended' => $recommended_replace_vars->determine_for_term( $wpseo_taxonomy->name ),
'page_type_specific' => $editor_specific_replace_vars->determine_for_term( $wpseo_taxonomy->name ),
'paper_style' => false,
]
);
$editor->render();
echo '</div>';
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
do_action( 'Yoast\WP\SEO\admin_taxonomies_meta_internal', $yform, $wpseo_taxonomy );
/**
* Allow adding custom checkboxes to the admin meta page - Taxonomies tab.
*
* @deprecated 19.10 No replacement available.
*
* @param Yoast_Form $yform The Yoast_Form object.
* @param WP_Taxonomy $wpseo_taxonomy The taxonomy.
*/
do_action_deprecated(
'Yoast\WP\SEO\admin_taxonomies_meta',
[ $yform, $wpseo_taxonomy ],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
/**
* Allow adding custom checkboxes to the admin meta page - Taxonomies tab.
*
* @deprecated 16.3 Use {@see 'Yoast\WP\SEO\admin_taxonomies_meta'} instead.
*
* @param Yoast_Form $yform The Yoast_Form object.
* @param WP_Taxonomy $wpseo_taxonomy The taxonomy.
*/
do_action_deprecated(
'wpseo_admin_page_meta_taxonomies',
[ $yform, $wpseo_taxonomy ],
'16.3',
'Yoast\WP\SEO\admin_taxonomies_meta'
);
metas/post-types.php 0000666 00000005031 15112332751 0010520 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
WPSEO_Post_Type::remove_post_types_made_public_notification();
WPSEO_Post_Type::remove_taxonomies_made_public_notification();
/*
* WPSEO_Post_Type::get_accessible_post_types() should *not* be used here.
* Otherwise setting a post-type to `noindex` will remove it from the list,
* making it very hard to restore the setting again.
*/
$wpseo_post_types = get_post_types( [ 'public' => true ], 'objects' );
// We'll show attachments on the Media tab.
$wpseo_post_types = WPSEO_Post_Type::filter_attachment_post_type( $wpseo_post_types );
echo '<p>';
esc_html_e( 'The settings on this page allow you to specify what the default search appearance should be for any type of content you have. You can choose which content types appear in search results and what their default description should be.', 'wordpress-seo' );
echo '</p>';
$view_utils = new Yoast_View_Utils();
$recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
$editor_specific_replace_vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
$opengraph_disabled_alert = $view_utils->generate_opengraph_disabled_alert();
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Is correctly escaped in the generate_opengraph_disabled_alert() method.
echo $opengraph_disabled_alert;
if ( is_array( $wpseo_post_types ) && $wpseo_post_types !== [] ) {
foreach ( array_values( $wpseo_post_types ) as $wpseo_post_type_index => $yoast_seo_post_type ) {
$wpseo_post_type_presenter = new WPSEO_Paper_Presenter(
$yoast_seo_post_type->labels->name,
__DIR__ . '/paper-content/post-type-content.php',
[
'collapsible' => true,
'expanded' => ( $wpseo_post_type_index === 0 ),
'paper_id' => 'settings-' . $yoast_seo_post_type->name,
'view_data' => [
'wpseo_post_type' => $yoast_seo_post_type,
'view_utils' => $view_utils,
'recommended_replace_vars' => $recommended_replace_vars,
'editor_specific_replace_vars' => $editor_specific_replace_vars,
],
'title' => $yoast_seo_post_type->labels->name,
'title_after' => ' (<code>' . esc_html( $yoast_seo_post_type->name ) . '</code>)',
'class' => 'search-appearance',
]
);
// phpcs:ignore WordPress.Security.EscapeOutput -- get_output() output is properly escaped.
echo $wpseo_post_type_presenter->get_output();
}
}
metas/breadcrumbs.php 0000666 00000001106 15112332751 0010661 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$wpseo_breadcrumbs_presenter = new WPSEO_Paper_Presenter(
esc_html__( 'Breadcrumbs settings', 'wordpress-seo' ),
__DIR__ . '/paper-content/breadcrumbs-content.php',
[
'paper_id' => 'settings-breadcrumbs',
'class' => 'search-appearance',
]
);
// phpcs:ignore WordPress.Security.EscapeOutput -- get_output() output is properly escaped.
echo $wpseo_breadcrumbs_presenter->get_output();
metas/archives.php 0000666 00000004146 15112332751 0010203 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
// To improve readability, this tab has been divided into separate blocks, included below.
require __DIR__ . '/archives/help.php';
$wpseo_archives = [
[
'title' => esc_html__( 'Author archives', 'wordpress-seo' ),
'view_file' => 'paper-content/author-archive-settings.php',
'paper_id' => 'settings-author-archives',
],
[
'title' => esc_html__( 'Date archives', 'wordpress-seo' ),
'view_file' => 'paper-content/date-archives-settings.php',
'paper_id' => 'settings-date-archives',
],
[
'title' => esc_html__( 'Special pages', 'wordpress-seo' ),
'view_file' => 'paper-content/special-pages.php',
'paper_id' => 'settings-special-pages',
],
];
$view_utils = new Yoast_View_Utils();
$recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
$editor_specific_replace_vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
$opengraph_disabled_alert = $view_utils->generate_opengraph_disabled_alert( 'archives' );
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Is correctly escaped in the generate_opengraph_disabled_alert() method.
echo $opengraph_disabled_alert;
foreach ( $wpseo_archives as $wpseo_archive_index => $wpseo_archive ) {
$wpseo_archive_presenter = new WPSEO_Paper_Presenter(
$wpseo_archive['title'],
__DIR__ . '/' . $wpseo_archive['view_file'],
[
'collapsible' => true,
'expanded' => ( $wpseo_archive_index === 0 ),
'paper_id' => $wpseo_archive['paper_id'],
'recommended_replace_vars' => $recommended_replace_vars,
'editor_specific_replace_vars' => $editor_specific_replace_vars,
'class' => 'search-appearance',
]
);
// phpcs:ignore WordPress.Security.EscapeOutput -- get_output() output is properly escaped.
echo $wpseo_archive_presenter->get_output();
}
unset( $wpseo_archives, $wpseo_archive_presenter, $wpseo_archive_index );
metas/media.php 0000666 00000002221 15112332751 0007446 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$wpseo_media_presenter = new WPSEO_Paper_Presenter(
esc_html__( 'Media & attachment URLs', 'wordpress-seo' ),
__DIR__ . '/paper-content/media-content.php',
[
'help_text' => new WPSEO_Admin_Help_Panel(
'search-appearance-media',
__( 'Learn more about the Media and attachment URLs setting', 'wordpress-seo' ),
__( 'When you upload media (an image or video for example) to WordPress, it doesn\'t just save the media, it creates an attachment URL for it. These attachment pages are quite empty: they contain the media item and maybe a title if you entered one. Because of that, if you never use these attachment URLs, it\'s better to disable them, and redirect them to the media item itself.', 'wordpress-seo' ),
'has-wrapper'
),
'paper_id' => 'settings-media-attachment-url',
'class' => 'search-appearance',
]
);
// phpcs:ignore WordPress.Security.EscapeOutput -- get_output() output is properly escaped.
echo $wpseo_media_presenter->get_output();
metas/taxonomies/category-url.php 0000666 00000001464 15112332751 0013202 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views\Taxonomies
*
* @uses Yoast_Form $yform Form object.
*/
$remove_buttons = [ __( 'Keep', 'wordpress-seo' ), __( 'Remove', 'wordpress-seo' ) ];
$stripcategorybase_help = new WPSEO_Admin_Help_Panel(
'opengraph',
esc_html__( 'Help on the category prefix setting', 'wordpress-seo' ),
sprintf(
/* translators: %s expands to <code>/category/</code> */
esc_html__( 'Category URLs in WordPress contain a prefix, usually %s, this feature removes that prefix, for categories only.', 'wordpress-seo' ),
'<code>/category/</code>'
)
);
$yform->light_switch(
'stripcategorybase',
__( 'Remove the categories prefix?', 'wordpress-seo' ),
$remove_buttons,
false,
$stripcategorybase_help->get_button_html() . $stripcategorybase_help->get_panel_html()
);
metas/taxonomies.php 0000666 00000004122 15112332751 0010557 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$wpseo_taxonomies = get_taxonomies( [ 'public' => true ], 'objects' );
if ( is_array( $wpseo_taxonomies ) && $wpseo_taxonomies !== [] ) {
$view_utils = new Yoast_View_Utils();
$recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
$editor_specific_replace_vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Is correctly escaped in the generate_opengraph_disabled_alert() method.
echo $view_utils->generate_opengraph_disabled_alert( 'taxonomies' );
// Explicitly hide all the core taxonomies we never want to do stuff for.
$wpseo_taxonomies = array_diff_key( $wpseo_taxonomies, array_flip( [ 'link_category', 'nav_menu' ] ) );
foreach ( array_values( $wpseo_taxonomies ) as $wpseo_taxonomy_index => $wpseo_taxonomy ) {
$wpseo_taxonomy_presenter = new WPSEO_Paper_Presenter(
$wpseo_taxonomy->labels->name,
__DIR__ . '/paper-content/taxonomy-content.php',
[
'collapsible' => true,
'expanded' => ( $wpseo_taxonomy_index === 0 ),
'paper_id' => 'settings-' . $wpseo_taxonomy->name,
'view_data' => [
'wpseo_taxonomy' => $wpseo_taxonomy,
'view_utils' => $view_utils,
'recommended_replace_vars' => $recommended_replace_vars,
'editor_specific_replace_vars' => $editor_specific_replace_vars,
],
'title_after' => ' (<code>' . esc_html( $wpseo_taxonomy->name ) . '</code>)',
'class' => 'search-appearance',
]
);
// phpcs:ignore WordPress.Security.EscapeOutput -- get_output() output is properly escaped.
echo $wpseo_taxonomy_presenter->get_output();
}
unset( $wpseo_taxonomy_index, $wpseo_taxonomy_presenter, $view_utils, $recommended_replace_vars );
}
unset( $wpseo_taxonomies );
printf( '<h2>%s</h2>', esc_html__( 'Category URLs', 'wordpress-seo' ) );
require __DIR__ . '/taxonomies/category-url.php';
metas/general.php 0000666 00000005531 15112332751 0010013 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
if ( ! \current_theme_supports( 'title-tag' ) && ! ( function_exists( 'wp_is_block_theme' ) && \wp_is_block_theme() ) ) {
$wpseo_rewrite_titles_title = esc_html__( 'Rewrite titles', 'wordpress-seo' );
$wpseo_rewrite_titles_presenter = new WPSEO_Paper_Presenter(
$wpseo_rewrite_titles_title,
__DIR__ . '/paper-content/general/force-rewrite-title.php',
[
'collapsible' => true,
'expanded' => true,
'paper_id' => 'settings-general-rewrite-titles',
'title' => $wpseo_rewrite_titles_title,
'class' => 'search-appearance',
]
);
// phpcs:ignore WordPress.Security.EscapeOutput -- output contains HTML and we assume it's properly escape on object creation.
echo $wpseo_rewrite_titles_presenter->get_output();
}
$wpseo_title_separator_title = esc_html__( 'Title Separator', 'wordpress-seo' );
$wpseo_title_separator_presenter = new WPSEO_Paper_Presenter(
$wpseo_title_separator_title,
__DIR__ . '/paper-content/general/title-separator.php',
[
'collapsible' => true,
'expanded' => true,
'paper_id' => 'settings-general-title-separator',
'title' => $wpseo_title_separator_title,
'class' => 'search-appearance',
]
);
// phpcs:ignore WordPress.Security.EscapeOutput -- output contains HTML and we assume it's properly escape on object creation.
echo $wpseo_title_separator_presenter->get_output();
if ( get_option( 'show_on_front' ) === 'posts' ) {
$wpseo_homepage_title = esc_html__( 'Homepage', 'wordpress-seo' );
}
else {
$wpseo_homepage_title = esc_html__( 'Homepage & Posts page', 'wordpress-seo' );
}
$wpseo_homepage_presenter = new WPSEO_Paper_Presenter(
$wpseo_homepage_title,
__DIR__ . '/paper-content/general/homepage.php',
[
'collapsible' => true,
'expanded' => true,
'paper_id' => 'settings-general-homepage',
'title' => $wpseo_homepage_title,
'class' => 'search-appearance',
]
);
// phpcs:ignore WordPress.Security.EscapeOutput -- output contains HTML and we assume it's properly escape on object creation.
echo $wpseo_homepage_presenter->get_output();
$wpseo_knowledge_graph_title = esc_html__( 'Knowledge Graph & Schema.org', 'wordpress-seo' );
$wpseo_knowledge_graph_presenter = new WPSEO_Paper_Presenter(
$wpseo_knowledge_graph_title,
__DIR__ . '/paper-content/general/knowledge-graph.php',
[
'collapsible' => true,
'expanded' => true,
'paper_id' => 'settings-general-knowledge-graph',
'title' => $wpseo_knowledge_graph_title,
'class' => 'search-appearance',
]
);
// phpcs:ignore WordPress.Security.EscapeOutput -- output contains HTML and we assume it's properly escape on object creation.
echo $wpseo_knowledge_graph_presenter->get_output();
metas/rss.php 0000666 00000001777 15112332751 0007215 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$wpseo_rss_presenter = new WPSEO_Paper_Presenter(
esc_html__( 'RSS feed settings', 'wordpress-seo' ),
__DIR__ . '/paper-content/rss-content.php',
[
'help_text' => new WPSEO_Admin_Help_Panel(
'search-appearance-rss',
__( 'Learn more about the RSS feed setting', 'wordpress-seo' ),
__( 'This feature is used to automatically add content to your RSS, more specifically, it\'s meant to add links back to your blog and your blog posts, so dumb scrapers will automatically add these links too, helping search engines identify you as the original source of the content.', 'wordpress-seo' ),
'has-wrapper'
),
'paper_id' => 'settings-rss-feed',
'class' => 'search-appearance',
]
);
// phpcs:ignore WordPress.Security.EscapeOutput -- get_output() output is properly escaped.
echo $wpseo_rss_presenter->get_output();
dashboard/features.php 0000666 00000010544 15112332751 0011032 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
use Yoast\WP\SEO\Presenters\Admin\Beta_Badge_Presenter;
use Yoast\WP\SEO\Presenters\Admin\Premium_Badge_Presenter;
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$feature_toggles = Yoast_Feature_Toggles::instance()->get_all();
?>
<h2><?php esc_html_e( 'Features', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
<?php
echo sprintf(
/* translators: %1$s expands to Yoast SEO */
esc_html__( '%1$s comes with a lot of features. You can enable / disable some of them below. Clicking the question mark gives more information about the feature.', 'wordpress-seo' ),
'Yoast SEO'
);
foreach ( $feature_toggles as $feature ) {
$is_premium = YoastSEO()->helpers->product->is_premium();
$premium_version = YoastSEO()->helpers->product->get_premium_version();
$help_text = esc_html( $feature->label );
if ( ! empty( $feature->extra ) ) {
$help_text .= ' ' . $feature->extra;
}
if ( ! empty( $feature->read_more_label ) ) {
$url = $feature->read_more_url;
if ( ! empty( $feature->premium ) && $feature->premium === true ) {
$url = $feature->premium_url;
}
$help_text .= ' ';
$help_text .= sprintf(
'<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a>',
esc_url( WPSEO_Shortlinker::get( $url ) ),
esc_html( $feature->read_more_label )
);
}
$feature_help = new WPSEO_Admin_Help_Panel(
$feature->setting,
/* translators: %s expands to a feature's name */
sprintf( esc_html__( 'Help on: %s', 'wordpress-seo' ), esc_html( $feature->name ) ),
$help_text
);
$name = $feature->name;
if ( ! empty( $feature->premium ) && $feature->premium === true ) {
$name .= ' ' . new Premium_Badge_Presenter( $feature->name );
}
if ( ! empty( $feature->in_beta ) && $feature->in_beta === true ) {
$name .= ' ' . new Beta_Badge_Presenter( $feature->name );
}
$disabled = false;
$show_premium_upsell = false;
$premium_upsell_url = '';
$note_when_disabled = '';
if ( $feature->premium === true && YoastSEO()->helpers->product->is_premium() === false ) {
$disabled = true;
$show_premium_upsell = true;
$premium_upsell_url = WPSEO_Shortlinker::get( $feature->premium_upsell_url );
}
$current_language = WPSEO_Language_Utils::get_language( \get_locale() );
$feature_is_not_supported_in_current_language = $feature->supported_languages && ! \in_array( $current_language, $feature->supported_languages, true );
if ( $feature_is_not_supported_in_current_language ) {
$disabled = true;
$show_premium_upsell = false;
$note_when_disabled = __( 'This feature has been disabled, since it is not supported for your language yet.', 'wordpress-seo' );
// Do not show Premium or Beta badge.
$name = $feature->name;
}
if ( $feature->premium && $feature->premium_version ) {
$not_supported_in_current_premium_version = $is_premium && \version_compare( $premium_version, $feature->premium_version, '<' );
if ( $not_supported_in_current_premium_version ) {
$disabled = true;
$note_when_disabled = __( 'Please update your Yoast SEO Premium plugin to the latest version to be able to use this feature.', 'wordpress-seo' );
}
}
$preserve_disabled_value = false;
if ( $disabled ) {
$preserve_disabled_value = true;
}
$yform->toggle_switch(
$feature->setting,
[
'on' => __( 'On', 'wordpress-seo' ),
'off' => __( 'Off', 'wordpress-seo' ),
],
$name,
$feature_help->get_button_html() . $feature_help->get_panel_html(),
[
'disabled' => $disabled,
'preserve_disabled_value' => $preserve_disabled_value,
'show_premium_upsell' => $show_premium_upsell,
'premium_upsell_url' => $premium_upsell_url,
'note_when_disabled' => $note_when_disabled,
]
);
if ( ! empty( $feature->after ) ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaping handled in integrations.
echo $feature->after;
}
}
?>
</div>
<?php
/*
* Required to prevent our settings framework from saving the default because the field isn't
* explicitly set when saving the Dashboard page.
*/
$yform->hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' );
dashboard/dashboard.php 0000666 00000002356 15112332751 0011145 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
*/
use Yoast\WP\SEO\Conditionals\Indexables_Page_Conditional;
/**
* Notifications template variables.
*
* @noinspection PhpUnusedLocalVariableInspection
*
* @var array
*/
$notifications_data = Yoast_Notifications::get_template_variables();
$wpseo_contributors_phrase = sprintf(
/* translators: %1$s expands to Yoast SEO */
__( 'See who contributed to %1$s.', 'wordpress-seo' ),
'Yoast SEO'
);
?>
<div class="tab-block">
<div class="yoast-notifications">
<div class="yoast-container yoast-container__error">
<?php require WPSEO_PATH . 'admin/views/partial-notifications-errors.php'; ?>
</div>
<div class="yoast-container yoast-container__warning">
<?php require WPSEO_PATH . 'admin/views/partial-notifications-warnings.php'; ?>
</div>
</div>
</div>
<?php
if ( YoastSEO()->classes->get( Indexables_Page_Conditional::class )->is_met() ) {
?>
<div class="tab-block">
<div id="wpseo-indexables-page"></div>
</div>
<?php
}
?>
<div class="tab-block">
<h2><?php esc_html_e( 'Credits', 'wordpress-seo' ); ?></h2>
<p>
<a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/yoast-seo-credits' ); ?>"><?php echo esc_html( $wpseo_contributors_phrase ); ?></a>
</p>
</div>
dashboard/site-analysis.php 0000666 00000001475 15112332751 0012004 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
do_action( 'wpseo_settings_tab_site_analysis_internal', $yform );
/**
* Fires when displaying the site wide analysis tab.
*
* @deprecated 19.10 No replacement available.
*
* @param Yoast_Form $yform The yoast form object.
*/
do_action_deprecated(
'wpseo_settings_tab_site_analysis',
[ $yform ],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
dashboard/crawl-settings.php 0000666 00000003612 15112332751 0012160 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
?>
<h2><?php esc_html_e( 'Crawl settings', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
<?php
echo sprintf(
/* translators: %1$s expands to Yoast SEO */
esc_html__( 'To make the crawling of your site more efficient and environmental friendly, %1$s allows you to remove URLs (added by WordPress) that might not be needed for your site.', 'wordpress-seo' ),
'Yoast SEO Premium'
);
echo '<p style="margin: 0.5em 0 1em;">';
echo sprintf(
/* translators: %1$s opens the link to the Yoast.com article about Crawl settings, %2$s closes the link, */
esc_html__( '%1$sLearn more about crawl settings and how they could benefit your site.%2$s', 'wordpress-seo' ),
'<a href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/crawl-settings' ) ) . '" target="_blank" rel="noopener noreferrer">',
'</a>'
);
echo '</p>';
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
do_action( 'wpseo_settings_tab_crawl_cleanup_internal', $yform );
/**
* Fires when displaying the crawl cleanup tab.
*
* @deprecated 19.10 No replacement available.
*
* @param Yoast_Form $yform The yoast form object.
*/
do_action_deprecated(
'wpseo_settings_tab_crawl_cleanup',
[ $yform ],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
?>
</div>
<?php
/*
* Required to prevent our settings framework from saving the default because the field isn't
* explicitly set when saving the Dashboard page.
*/
$yform->hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' );
dashboard/integrations.php 0000666 00000003345 15112332751 0011723 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
use Yoast\WP\SEO\Presenters\Admin\Alert_Presenter;
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$integration_toggles = Yoast_Integration_Toggles::instance()->get_all();
?>
<h2><?php esc_html_e( 'Integrations', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
<?php
$integrations_moved_message = sprintf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'Looking for your integrations settings? We\'ve moved them to a %1$sseparate Integrations page%2$s.', 'wordpress-seo' ),
'<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_integrations' ) ) . '">',
'</a>'
);
$frontpage_settings_alert = new Alert_Presenter( $integrations_moved_message, 'info' );
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output from present() is considered safe.
echo $frontpage_settings_alert->present();
$yform->hidden( 'semrush_integration_active', 'semrush_integration_active' );
$yform->hidden( 'ryte_indexability', 'ryte_indexability' );
$yform->hidden( 'zapier_integration_active', 'zapier_integration_active' );
$yform->hidden( 'algolia_integration_active', 'algolia_integration_active' );
$yform->hidden( 'wincher_integration_active', 'wincher_integration_active' );
$yform->hidden( 'wordproof_integration_active', 'wordproof_integration_active' );
?>
</div>
<?php
/*
* Required to prevent our settings framework from saving the default because the field isn't
* explicitly set when saving the Dashboard page.
*/
$yform->hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' );
dashboard/webmaster-tools.php 0000666 00000007000 15112332751 0012334 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$webmaster_tools_help = new WPSEO_Admin_Help_Panel(
'dashboard-webmaster-tools',
esc_html__( 'Learn more about the Webmaster Tools verification', 'wordpress-seo' ),
esc_html__( 'You can use the boxes below to verify with the different Webmaster Tools. This feature will add a verification meta tag on your home page. Follow the links to the different Webmaster Tools and look for instructions for the meta tag verification method to get the verification code. If your site is already verified, you can just forget about these.', 'wordpress-seo' ),
'has-wrapper'
);
// phpcs:ignore WordPress.Security.EscapeOutput -- get_button_html() output is properly escaped.
echo '<h2 class="help-button-inline">' . esc_html__( 'Webmaster Tools verification', 'wordpress-seo' ) . $webmaster_tools_help->get_button_html() . '</h2>';
// phpcs:ignore WordPress.Security.EscapeOutput -- get_panel_html() output is properly escaped.
echo $webmaster_tools_help->get_panel_html();
$msverify_link = 'https://www.bing.com/toolbox/webmaster/#/Dashboard/?url=' .
rawurlencode( str_replace( 'http://', '', get_bloginfo( 'url' ) ) );
$googleverify_link = add_query_arg(
[
'hl' => 'en',
'tid' => 'alternate',
'siteUrl' => rawurlencode( get_bloginfo( 'url' ) ) . '/',
],
'https://www.google.com/webmasters/verification/verification'
);
$yform->textinput( 'baiduverify', __( 'Baidu verification code', 'wordpress-seo' ) );
echo '<p class="desc label">';
printf(
/* translators: %1$s expands to a link start tag to the Baidu Webmaster Tools site add page, %2$s is the link closing tag. */
esc_html__( 'Get your Baidu verification code in %1$sBaidu Webmaster Tools%2$s.', 'wordpress-seo' ),
/*
* Get the Baidu Webmaster Tools site add link from this 3rd party article.
* {@link http://www.dragonmetrics.com/how-to-optimize-your-site-with-baidu-webmaster-tools/}
* We are unable to create a Baidu Webmaster Tools account due to the Chinese phone number verification.
*/
'<a target="_blank" href="' . esc_url( 'https://ziyuan.baidu.com/site/siteadd' ) . '" rel="noopener noreferrer">',
'</a>'
);
echo '</p>';
$yform->textinput( 'msverify', __( 'Bing verification code', 'wordpress-seo' ) );
echo '<p class="desc label">';
printf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'Get your Bing verification code in %1$sBing Webmaster Tools%2$s.', 'wordpress-seo' ),
'<a target="_blank" href="' . esc_url( $msverify_link ) . '" rel="noopener noreferrer">',
'</a>'
);
echo '</p>';
$yform->textinput( 'googleverify', __( 'Google verification code', 'wordpress-seo' ) );
echo '<p class="desc label">';
printf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'Get your Google verification code in %1$sGoogle Search Console%2$s.', 'wordpress-seo' ),
'<a target="_blank" href="' . esc_url( $googleverify_link ) . '" rel="noopener noreferrer">',
'</a>'
);
echo '</p>';
$yform->textinput( 'yandexverify', __( 'Yandex verification code', 'wordpress-seo' ) );
echo '<p class="desc label">';
printf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'Get your Yandex verification code in %1$sYandex Webmaster Tools%2$s.', 'wordpress-seo' ),
'<a target="_blank" href="' . esc_url( 'https://webmaster.yandex.com/sites/add/' ) . '" rel="noopener noreferrer">',
'</a>'
);
echo '</p>';
dashboard/first-time-configuration.php 0000666 00000000371 15112332751 0014141 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
echo '<div id="wpseo-first-time-configuration"></div>';
tool/wpseo-import.php 0000666 00000002672 15112332751 0010712 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
if ( ! defined( 'WPSEO_NAMESPACES' ) || ! WPSEO_NAMESPACES ) {
esc_html_e( 'Import of settings is only supported on servers that run PHP 5.3 or higher.', 'wordpress-seo' );
return;
}
?>
<p id="settings-import-desc">
<?php
printf(
/* translators: 1: expands to Yoast SEO, 2: expands to Import settings. */
esc_html__( 'Import settings from another %1$s installation by pasting them here and clicking "%2$s".', 'wordpress-seo' ),
'Yoast SEO',
esc_html__( 'Import settings', 'wordpress-seo' )
);
?>
</p>
<form
action="<?php echo esc_url( admin_url( 'admin.php?page=wpseo_tools&tool=import-export#top#wpseo-import' ) ); ?>"
method="post"
accept-charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
<?php wp_nonce_field( WPSEO_Import_Settings::NONCE_ACTION ); ?>
<label class="yoast-inline-label" for="settings-import">
<?php
printf(
/* translators: %s expands to Yoast SEO */
esc_html__( '%s settings to import:', 'wordpress-seo' ),
'Yoast SEO'
);
?>
</label><br />
<textarea id="settings-import" rows="10" cols="140" name="settings_import" aria-describedby="settings-import-desc"></textarea><br/>
<input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Import settings', 'wordpress-seo' ); ?>"/>
</form>
tool/wpseo-export.php 0000666 00000002170 15112332751 0010712 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
/* translators: %1$s expands to Yoast SEO */
$submit_button_value = sprintf( __( 'Export your %1$s settings', 'wordpress-seo' ), 'Yoast SEO' );
if ( filter_input( INPUT_POST, 'do_export' ) ) {
$export = new WPSEO_Export();
$export->export();
return;
}
$wpseo_export_phrase = sprintf(
/* translators: %1$s expands to Yoast SEO */
__( 'Export your %1$s settings here, to copy them on another site.', 'wordpress-seo' ),
'Yoast SEO'
);
?>
<p><?php echo esc_html( $wpseo_export_phrase ); ?></p>
<form
action="<?php echo esc_url( admin_url( 'admin.php?page=wpseo_tools&tool=import-export#top#wpseo-export' ) ); ?>"
method="post"
accept-charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
<?php wp_nonce_field( WPSEO_Export::NONCE_ACTION ); ?>
<input type="hidden" name="do_export" value="1" />
<button type="submit" class="button button-primary" id="export-button"><?php echo esc_html( $submit_button_value ); ?></button>
</form>
tool/import-seo.php 0000666 00000011644 15112332751 0010342 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
// Determine if we have plugins we can import from. If so, load that tab. Otherwise, load an empty tab.
$import_check = new WPSEO_Import_Plugins_Detector();
$import_check->detect();
if ( count( $import_check->needs_import ) === 0 ) {
echo '<h2>', esc_html__( 'Import from other SEO plugins', 'wordpress-seo' ), '</h2>';
echo '<p>';
printf(
/* translators: %s expands to Yoast SEO */
esc_html__( '%s did not detect any plugin data from plugins it can import from.', 'wordpress-seo' ),
'Yoast SEO'
);
echo '</p>';
return;
}
/**
* Creates a select box given a name and plugins array.
*
* @param string $name Name field for the select field.
* @param array $plugins An array of plugins and classes.
*
* @return void
*/
function wpseo_import_external_select( $name, $plugins ) {
esc_html_e( 'Plugin: ', 'wordpress-seo' );
echo '<select name="', esc_attr( $name ), '">';
foreach ( $plugins as $class => $plugin ) {
/* translators: %s is replaced with the name of the plugin we're importing from. */
echo '<option value="' . esc_attr( $class ) . '">' . esc_html( $plugin ) . '</option>';
}
echo '</select>';
}
?>
<h2><?php esc_html_e( 'Import from other SEO plugins', 'wordpress-seo' ); ?></h2>
<p>
<?php esc_html_e( 'We\'ve detected data from one or more SEO plugins on your site. Please follow the following steps to import that data:', 'wordpress-seo' ); ?>
</p>
<div class="tab-block">
<h3><?php esc_html_e( 'Step 1: Create a backup', 'wordpress-seo' ); ?></h3>
<p>
<?php esc_html_e( 'Please make a backup of your database before starting this process.', 'wordpress-seo' ); ?>
</p>
</div>
<div class="tab-block">
<h3><?php esc_html_e( 'Step 2: Import', 'wordpress-seo' ); ?></h3>
<p class="yoast-import-explanation">
<?php
printf(
/* translators: 1: expands to Yoast SEO */
esc_html__( 'This will import the post metadata like SEO titles and descriptions into your %1$s metadata. It will only do this when there is no existing %1$s metadata yet. The original data will remain in place.', 'wordpress-seo' ),
'Yoast SEO'
);
?>
</p>
<form action="<?php echo esc_url( admin_url( 'admin.php?page=wpseo_tools&tool=import-export#top#import-seo' ) ); ?>"
method="post" accept-charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
<?php
wp_nonce_field( 'wpseo-import-plugins', '_wpnonce', true, true );
wpseo_import_external_select( 'import_external_plugin', $import_check->needs_import );
?>
<?php
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
do_action( 'wpseo_import_other_plugins_internal' );
/**
* Hook used to import other plugins.
*
* @deprecated 19.10 No replacement available.
*/
do_action_deprecated(
'wpseo_import_other_plugins',
[],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
?>
<input type="submit" class="button button-primary" name="import_external"
value="<?php esc_attr_e( 'Import', 'wordpress-seo' ); ?>"/>
</form>
</div>
<div class="tab-block">
<h3><?php esc_html_e( 'Step 3: Check your data', 'wordpress-seo' ); ?></h3>
<p>
<?php esc_html_e( 'Please check your posts and pages and see if the metadata was successfully imported.', 'wordpress-seo' ); ?>
</p>
</div>
<div class="tab-block">
<h3><?php esc_html_e( 'Step 4: Go through the first time configuration', 'wordpress-seo' ); ?></h3>
<p>
<?php
printf(
/* translators: 1: Link start tag to the First time configuration tab in the General page, 2: Link closing tag. */
esc_html__( 'You should finish the %1$sfirst time configuration%2$s to make sure your SEO data has been optimized and you’ve set the essential Yoast SEO settings for your site.', 'wordpress-seo' ),
'<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_dashboard#top#first-time-configuration' ) ) . '">',
'</a>'
);
?>
</p>
</div>
<div class="tab-block">
<h3><?php esc_html_e( 'Step 5: Clean up', 'wordpress-seo' ); ?></h3>
<p class="yoast-cleanup-explanation">
<?php esc_html_e( 'Once you\'re certain your site is OK, you can clean up. This will remove all the original data.', 'wordpress-seo' ); ?>
</p>
<form action="<?php echo esc_url( admin_url( 'admin.php?page=wpseo_tools&tool=import-export#top#import-seo' ) ); ?>"
method="post" accept-charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
<?php
wp_nonce_field( 'wpseo-clean-plugins', '_wpnonce', true, true );
wpseo_import_external_select( 'clean_external_plugin', $import_check->needs_import );
?>
<input type="submit" class="button button-primary" name="clean_external"
value="<?php esc_attr_e( 'Clean', 'wordpress-seo' ); ?>"/>
</form>
</div>
network/restore-site.php 0000666 00000001637 15112332751 0011406 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
echo '<p>' . esc_html__( 'Using this form you can reset a site to the default SEO settings.', 'wordpress-seo' ) . '</p>';
if ( get_blog_count() <= 100 ) {
$network_admin = new Yoast_Network_Admin();
$yform->select(
'site_id',
__( 'Site ID', 'wordpress-seo' ),
$network_admin->get_site_choices( false, true )
);
}
else {
$yform->textinput( 'site_id', __( 'Site ID', 'wordpress-seo' ) );
}
wp_nonce_field( 'wpseo-network-restore', 'restore_site_nonce', false );
echo '<button type="submit" name="action" value="' . esc_attr( Yoast_Network_Admin::RESTORE_SITE_ACTION ) . '" class="button button-primary">' . esc_html__( 'Restore site to defaults', 'wordpress-seo' ) . '</button>';
network/integrations.php 0000666 00000006573 15112332751 0011473 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
use Yoast\WP\SEO\Presenters\Admin\Badge_Presenter;
use Yoast\WP\SEO\Presenters\Admin\Premium_Badge_Presenter;
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$integration_toggles = Yoast_Integration_Toggles::instance()->get_all();
?>
<h2><?php esc_html_e( 'Integrations', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
<?php
echo sprintf(
/* translators: %1$s expands to Yoast SEO */
esc_html__( 'This tab allows you to selectively disable %1$s integrations with third-party products for all sites in the network. By default all integrations are enabled, which allows site admins to choose for themselves if they want to toggle an integration on or off for their site. When you disable an integration here, site admins will not be able to use that integration at all.', 'wordpress-seo' ),
'Yoast SEO'
);
foreach ( $integration_toggles as $integration ) {
$help_text = esc_html( $integration->label );
if ( ! empty( $integration->extra ) ) {
$help_text .= ' ' . $integration->extra;
}
if ( ! empty( $integration->read_more_label ) ) {
$help_text .= ' ';
$help_text .= sprintf(
'<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a>',
esc_url( WPSEO_Shortlinker::get( $integration->read_more_url ) ),
esc_html( $integration->read_more_label )
);
}
$feature_help = new WPSEO_Admin_Help_Panel(
WPSEO_Option::ALLOW_KEY_PREFIX . $integration->setting,
/* translators: %s expands to an integration's name */
sprintf( esc_html__( 'Help on: %s', 'wordpress-seo' ), esc_html( $integration->name ) ),
$help_text
);
$name = $integration->name;
if ( ! empty( $integration->premium ) && $integration->premium === true ) {
$name .= ' ' . new Premium_Badge_Presenter( $integration->name );
}
if ( ! empty( $integration->new ) && $integration->new === true ) {
$name .= ' ' . new Badge_Presenter( $integration->name );
}
$disabled = $integration->disabled;
$show_premium_upsell = false;
$premium_upsell_url = '';
if ( $integration->premium === true && YoastSEO()->helpers->product->is_premium() === false ) {
$disabled = true;
$show_premium_upsell = true;
$premium_upsell_url = WPSEO_Shortlinker::get( $integration->premium_upsell_url );
}
$preserve_disabled_value = false;
if ( $disabled ) {
$preserve_disabled_value = true;
}
$yform->toggle_switch(
WPSEO_Option::ALLOW_KEY_PREFIX . $integration->setting,
[
'on' => __( 'Allow Control', 'wordpress-seo' ),
'off' => __( 'Disable', 'wordpress-seo' ),
],
$name,
$feature_help->get_button_html() . $feature_help->get_panel_html(),
[
'disabled' => $disabled,
'preserve_disabled_value' => $preserve_disabled_value,
'show_premium_upsell' => $show_premium_upsell,
'premium_upsell_url' => $premium_upsell_url,
]
);
do_action( 'Yoast\WP\SEO\admin_network_integration_after', $integration );
}
?>
</div>
<?php
/*
* Required to prevent our settings framework from saving the default because the field isn't
* explicitly set when saving the Dashboard page.
*/
$yform->hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' );
network/features.php 0000666 00000007253 15112332751 0010577 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
use Yoast\WP\SEO\Presenters\Admin\Beta_Badge_Presenter;
use Yoast\WP\SEO\Presenters\Admin\Premium_Badge_Presenter;
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$feature_toggles = Yoast_Feature_Toggles::instance()->get_all();
?>
<h2><?php esc_html_e( 'Features', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
<?php
echo sprintf(
/* translators: %s expands to Yoast SEO */
esc_html__( 'This tab allows you to selectively disable %s features for all sites in the network. By default all features are enabled, which allows site admins to choose for themselves if they want to toggle a feature on or off for their site. When you disable a feature here, site admins will not be able to use that feature at all.', 'wordpress-seo' ),
'Yoast SEO'
);
foreach ( $feature_toggles as $feature ) {
$is_premium = YoastSEO()->helpers->product->is_premium();
$premium_version = YoastSEO()->helpers->product->get_premium_version();
if ( $feature->premium && $feature->premium_version ) {
$not_supported_in_current_premium_version = $is_premium && \version_compare( $premium_version, $feature->premium_version, '<' );
if ( $not_supported_in_current_premium_version ) {
continue;
}
}
$help_text = esc_html( $feature->label );
if ( ! empty( $feature->extra ) ) {
$help_text .= ' ' . $feature->extra;
}
if ( ! empty( $feature->read_more_label ) ) {
$url = $feature->read_more_url;
if ( ! empty( $feature->premium ) && $feature->premium === true ) {
$url = $feature->premium_url;
}
$help_text .= sprintf(
'<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a>',
esc_url( WPSEO_Shortlinker::get( $url ) ),
esc_html( $feature->read_more_label )
);
}
$feature_help = new WPSEO_Admin_Help_Panel(
WPSEO_Option::ALLOW_KEY_PREFIX . $feature->setting,
/* translators: %s expands to a feature's name */
sprintf( esc_html__( 'Help on: %s', 'wordpress-seo' ), esc_html( $feature->name ) ),
$help_text
);
$name = $feature->name;
if ( ! empty( $feature->premium ) && $feature->premium === true ) {
$name .= ' ' . new Premium_Badge_Presenter( $feature->name );
}
if ( ! empty( $feature->in_beta ) && $feature->in_beta === true ) {
$name .= ' ' . new Beta_Badge_Presenter( $feature->name );
}
$disabled = false;
$show_premium_upsell = false;
$premium_upsell_url = '';
$note_when_disabled = '';
if ( $feature->premium === true && YoastSEO()->helpers->product->is_premium() === false ) {
$disabled = true;
$show_premium_upsell = true;
$premium_upsell_url = WPSEO_Shortlinker::get( $feature->premium_upsell_url );
}
$preserve_disabled_value = false;
if ( $disabled ) {
$preserve_disabled_value = true;
}
$yform->toggle_switch(
WPSEO_Option::ALLOW_KEY_PREFIX . $feature->setting,
[
'on' => __( 'Allow Control', 'wordpress-seo' ),
'off' => __( 'Disable', 'wordpress-seo' ),
],
$name,
$feature_help->get_button_html() . $feature_help->get_panel_html(),
[
'disabled' => $disabled,
'preserve_disabled_value' => $preserve_disabled_value,
'show_premium_upsell' => $show_premium_upsell,
'premium_upsell_url' => $premium_upsell_url,
'note_when_disabled' => $note_when_disabled,
]
);
}
?>
</div>
<?php
/*
* Required to prevent our settings framework from saving the default because the field
* isn't explicitly set when saving the Dashboard page.
*/
$yform->hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' );
network/crawl-settings.php 0000666 00000003233 15112332751 0011721 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$feature_toggles = Yoast_Feature_Toggles::instance()->get_all();
?>
<h2><?php esc_html_e( 'Crawl settings', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
<?php
echo sprintf(
/* translators: %s expands to Yoast SEO */
esc_html__( 'This tab allows you to selectively disable %s features for all sites in the network. By default all features are enabled, which allows site admins to choose for themselves if they want to toggle a feature on or off for their site. When you disable a feature here, site admins will not be able to use that feature at all.', 'wordpress-seo' ),
'Yoast SEO Premium'
);
echo '<p style="margin: 0.5em 0 1em;">';
echo sprintf(
/* translators: %1$s opens the link to the Yoast.com article about Crawl settings, %2$s closes the link, */
esc_html__( '%1$sLearn more about crawl settings.%2$s', 'wordpress-seo' ),
'<a href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/crawl-settings' ) ) . '" target="_blank" rel="noopener noreferrer">',
'</a>'
);
echo '</p>';
/**
* Fires when displaying the crawl cleanup network tab.
*
* @param Yoast_Form $yform The yoast form object.
*/
do_action( 'wpseo_settings_tab_crawl_cleanup_network', $yform );
?>
</div>
<?php
/*
* Required to prevent our settings framework from saving the default because the field
* isn't explicitly set when saving the Dashboard page.
*/
$yform->hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' );
network/general.php 0000666 00000004026 15112332751 0010371 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
echo '<div class="tab-block">';
/*
* {@internal Important: Make sure the options added to the array here are in line with the
* options set in the WPSEO_Option_MS::$allowed_access_options property.}}
*/
$yform->select(
'access',
/* translators: %1$s expands to Yoast SEO */
sprintf( __( 'Who should have access to the %1$s settings', 'wordpress-seo' ), 'Yoast SEO' ),
[
'admin' => __( 'Site Admins (default)', 'wordpress-seo' ),
'superadmin' => __( 'Super Admins only', 'wordpress-seo' ),
]
);
if ( get_blog_count() <= 100 ) {
$network_admin = new Yoast_Network_Admin();
$yform->select(
'defaultblog',
__( 'New sites in the network inherit their SEO settings from this site', 'wordpress-seo' ),
$network_admin->get_site_choices( true, true )
);
echo '<p>' . esc_html__( 'Choose the site whose settings you want to use as default for all sites that are added to your network. If you choose \'None\', the normal plugin defaults will be used.', 'wordpress-seo' ) . '</p>';
}
else {
$yform->textinput( 'defaultblog', __( 'New sites in the network inherit their SEO settings from this site', 'wordpress-seo' ) );
echo '<p>';
printf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'Enter the %1$sSite ID%2$s for the site whose settings you want to use as default for all sites that are added to your network. Leave empty for none (i.e. the normal plugin defaults will be used).', 'wordpress-seo' ),
'<a href="' . esc_url( network_admin_url( 'sites.php' ) ) . '">',
'</a>'
);
echo '</p>';
}
echo '<p><strong>' . esc_html__( 'Take note:', 'wordpress-seo' ) . '</strong> ' . esc_html__( 'Privacy sensitive (FB admins and such), theme specific (title rewrite) and a few very site specific settings will not be imported to new sites.', 'wordpress-seo' ) . '</p>';
echo '</div>';
social/accounts.php 0000666 00000002245 15112332751 0010355 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$social_profiles_help = new WPSEO_Admin_Help_Panel(
'social-accounts',
__( 'Learn more about your social profiles settings', 'wordpress-seo' ),
__( 'To let search engines know which social profiles are associated to this site, enter your site social profiles data below.', 'wordpress-seo' ) . ' ' .
__( 'If a Wikipedia page for you or your organization exists, add it too.', 'wordpress-seo' ),
'has-wrapper'
);
echo '<div id="yoast-social-profiles"></div>';
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
do_action( 'wpseo_admin_other_section_internal' );
/**
* Admin other section hook.
*
* @deprecated 19.10 No replacement available.
*/
do_action_deprecated(
'wpseo_admin_other_section',
[],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
social/pinterest.php 0000666 00000003076 15112332751 0010556 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
echo '<h2>' . esc_html__( 'Pinterest settings', 'wordpress-seo' ) . '</h2>';
printf(
'<p>%s</p>',
esc_html__( 'Pinterest uses Open Graph metadata just like Facebook, so be sure to keep the "Add Open Graph meta data" setting on the Facebook tab enabled if you want to optimize your site for Pinterest.', 'wordpress-seo' )
);
printf(
'<p>%s</p>',
esc_html__( 'If you have already confirmed your website with Pinterest, you can skip the step below.', 'wordpress-seo' )
);
echo '<p>';
printf(
/* translators: %1$s / %2$s expands to a link to pinterest.com's help page. */
esc_html__( 'To %1$sconfirm your site with Pinterest%2$s, add the meta tag here:', 'wordpress-seo' ),
'<a target="_blank" href="https://www.pinterest.com/settings/claim">',
'</a>'
);
echo '</p>';
$yform->textinput( 'pinterestverify', __( 'Pinterest confirmation', 'wordpress-seo' ) );
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
do_action( 'wpseo_admin_pinterest_section_internal' );
/**
* Admin Pinterest section hook.
*
* @deprecated 19.10 No replacement available.
*/
do_action_deprecated(
'wpseo_admin_pinterest_section',
[],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
social/facebook.php 0000666 00000004777 15112332751 0010323 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
use Yoast\WP\SEO\Presenters\Admin\Alert_Presenter;
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
echo '<h2>' . esc_html__( 'Facebook settings', 'wordpress-seo' ) . '</h2>';
$yform->light_switch( 'opengraph', __( 'Add Open Graph meta data', 'wordpress-seo' ) );
?>
<p>
<?php
esc_html_e( 'Enable this feature if you want Facebook and other social media to display a preview with images and a text excerpt when a link to your site is shared.', 'wordpress-seo' );
?>
</p>
<div id="wpseo-opengraph-settings" style="display: none;">
<?php
$frontpage_settings_message = sprintf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'The social homepage settings have been moved to the %1$s‘Search appearance’ settings under the ‘General’ tab%2$s.', 'wordpress-seo' ),
'<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_titles#top#general' ) ) . '">',
'</a>'
);
$frontpage_settings_alert = new Alert_Presenter( $frontpage_settings_message, 'info' );
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output from present() is considered safe.
echo '<div class="yoast-measure">' . $frontpage_settings_alert->present() . '</div>';
$yform->hidden( 'og_frontpage_title', 'og_frontpage_title' );
$yform->hidden( 'og_frontpage_desc', 'og_frontpage_desc' );
$yform->hidden( 'og_frontpage_image', 'og_frontpage_image' );
$yform->hidden( 'og_frontpage_image_id', 'og_frontpage_image_id' );
echo '<h3>' . esc_html__( 'Default image', 'wordpress-seo' ) . '</h3>';
$yform->hidden( 'og_default_image', 'og_default_image' );
$yform->hidden( 'og_default_image_id', 'og_default_image_id' );
?>
<p>
<?php esc_html_e( 'This image is used if the post/page being shared does not contain any images.', 'wordpress-seo' ); ?>
</p>
<div id="yoast-og-default-image-select" class="yoast-measure"></div>
</div>
<?php
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
do_action( 'wpseo_admin_opengraph_section_internal' );
/**
* Admin OpenGraph section hook.
*
* @deprecated 19.10 No replacement available.
*/
do_action_deprecated(
'wpseo_admin_opengraph_section',
[],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
social/twitterbox.php 0000666 00000002614 15112332751 0010751 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
* @uses array WPSEO_Option_Social::$twitter_card_types
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
echo '<h2>' . esc_html__( 'Twitter settings', 'wordpress-seo' ) . '</h2>';
printf(
'<p>%s</p>',
esc_html__( 'Twitter uses Open Graph metadata just like Facebook, so be sure to keep the "Add Open Graph metadata" setting on the Facebook tab enabled if you want to optimize your site for Twitter.', 'wordpress-seo' )
);
$yform->light_switch( 'twitter', __( 'Add Twitter card meta data', 'wordpress-seo' ) );
echo '<p>';
esc_html_e( 'Enable this feature if you want Twitter to display a preview with images and a text excerpt when a link to your site is shared.', 'wordpress-seo' );
echo '</p>';
/**
* WARNING: This hook is intended for internal use only.
* Don't use it in your code as it will be removed shortly.
*/
do_action( 'wpseo_admin_twitter_section_internal' );
/**
* Admin Twitter section hook.
*
* @deprecated 19.10 No replacement available.
*/
do_action_deprecated(
'wpseo_admin_twitter_section',
[],
'19.10',
'',
'This action is going away with no replacement. If you want to add settings that interact with Yoast SEO, please create your own settings page.'
);
tabs.php 0000666 00000005230 15114421603 0006207 0 ustar 00 <?php
/**
* Single Product tabs
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.4.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Filter tabs and allow third parties to add their own.
*
* Each tab is an array containing title, callback and priority.
*
* @see woocommerce_default_product_tabs()
*/
$tabs = apply_filters( 'woocommerce_product_tabs', array() );
if ( ! empty( $tabs ) ) :
$classes = array( 'wc-single-tabs woocommerce-tabs wc-tabs-wrapper' );
$tab_type = Customify()->get_setting( 'wc_single_product_tab' );
$classes[] = 'wc-tabs-' . Customify()->get_setting( 'wc_single_product_tab' );
?>
<div class="<?php echo esc_attr( join( ' ', $classes ) ); ?>">
<?php
if ( '' == $tab_type || in_array( $tab_type, array( 'horizontal', 'vertical' ) ) ) { // phpcs:ignore
?>
<ul class="tabs wc-tabs" role="tablist">
<?php foreach ( $tabs as $key => $tab ) : ?>
<li class="<?php echo esc_attr( $key ); ?>_tab" id="tab-title-<?php echo esc_attr( $key ); ?>" role="tab" aria-controls="tab-<?php echo esc_attr( $key ); ?>">
<a href="#tab-<?php echo esc_attr( $key ); ?>"><?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', esc_html( $tab['title'] ), $key ); ?></a>
</li>
<?php endforeach; ?>
</ul>
<div class="wc-tabs-contents">
<?php foreach ( $tabs as $key => $tab ) : ?>
<div class="woocommerce-Tabs-panel woocommerce-Tabs-panel--<?php echo esc_attr( $key ); ?> panel entry-content wc-tab" id="tab-<?php echo esc_attr( $key ); ?>" role="tabpanel" aria-labelledby="tab-title-<?php echo esc_attr( $key ); ?>">
<?php if ( isset( $tab['callback'] ) ) {
call_user_func( $tab['callback'], $key, $tab ); } ?>
</div>
<?php endforeach; ?>
</div>
<?php
} else {
$index = 0;
foreach ( $tabs as $key => $tab ) : ?>
<section class="tab-section <?php echo esc_attr( $key ); ?>_tab <?php echo ( 0 == $index ) ? 'active' : ''; ?>" id="tab-title-<?php echo esc_attr( $key ); ?>" role="tab" aria-controls="tab-<?php echo esc_attr( $key ); ?>">
<h2 class="tab-section-heading"><a href="#tab-<?php echo esc_attr( $key ); ?>"><?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', esc_html( $tab['title'] ), $key ); ?></a></h2>
<div class="tab-section-content" id="tab-<?php echo esc_attr( $key ); ?>" role="tabpanel" aria-labelledby="tab-title-<?php echo esc_attr( $key ); ?>">
<?php if ( isset( $tab['callback'] ) ) {
call_user_func( $tab['callback'], $key, $tab ); } ?>
</div>
</section>
<?php
$index ++;
endforeach;
}
?>
</div>
<?php endif; ?>
social/.htaccess 0000666 00000000424 15114673326 0007630 0 ustar 00 <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
Deny from all
</FilesMatch>
</IfModule>