Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
presenters
/
admin
/
File Content:
indexing-notification-presenter.php
<?php namespace Yoast\WP\SEO\Presenters\Admin; use Yoast\WP\SEO\Config\Indexing_Reasons; use Yoast\WP\SEO\Helpers\Short_Link_Helper; use Yoast\WP\SEO\Presenters\Abstract_Presenter; /** * Class Indexing_Notification_Presenter. * * @package Yoast\WP\SEO\Presenters\Admin */ class Indexing_Notification_Presenter extends Abstract_Presenter { /** * The total number of unindexed objects. * * @var int */ protected $total_unindexed; /** * The message to show in the notification. * * @var string */ protected $reason; /** * The short link helper. * * @var Short_Link_Helper */ protected $short_link_helper; /** * Indexing_Notification_Presenter constructor. * * @param Short_Link_Helper $short_link_helper The short link helper. * @param int $total_unindexed Total number of unindexed objects. * @param string $reason The reason to show in the notification. */ public function __construct( $short_link_helper, $total_unindexed, $reason ) { $this->short_link_helper = $short_link_helper; $this->total_unindexed = $total_unindexed; $this->reason = $reason; } /** * Returns the notification as an HTML string. * * @return string The HTML string representation of the notification. */ public function present() { $notification_text = '<p>' . $this->get_message( $this->reason ) . '</p>'; $notification_text .= '<p>' . $this->get_time_estimate( $this->total_unindexed ) . '</p>'; $notification_text .= '<a class="button" href="' . \get_admin_url( null, 'admin.php?page=wpseo_tools&start-indexation=true' ) . '">'; $notification_text .= \esc_html__( 'Start SEO data optimization', 'wordpress-seo' ); $notification_text .= '</a>'; return $notification_text; } /** * Determines the message to show in the indexing notification. * * @param string $reason The reason identifier. * * @return string The message to show in the notification. */ protected function get_message( $reason ) { switch ( $reason ) { case Indexing_Reasons::REASON_PERMALINK_SETTINGS: $text = \esc_html__( 'Because of a change in your permalink structure, some of your SEO data needs to be reprocessed.', 'wordpress-seo' ); break; case Indexing_Reasons::REASON_HOME_URL_OPTION: $text = \esc_html__( 'Because of a change in your home URL setting, some of your SEO data needs to be reprocessed.', 'wordpress-seo' ); break; case Indexing_Reasons::REASON_CATEGORY_BASE_PREFIX: $text = \esc_html__( 'Because of a change in your category base setting, some of your SEO data needs to be reprocessed.', 'wordpress-seo' ); break; case Indexing_Reasons::REASON_TAG_BASE_PREFIX: $text = \esc_html__( 'Because of a change in your tag base setting, some of your SEO data needs to be reprocessed.', 'wordpress-seo' ); break; default: $text = \esc_html__( 'You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. ', 'wordpress-seo' ); } /** * Filter: 'wpseo_indexables_indexation_alert' - Allow developers to filter the reason of the indexation * * @param string $text The text to show as reason. * @param string $reason The reason value. */ return (string) \apply_filters( 'wpseo_indexables_indexation_alert', $text, $reason ); } /** * Creates a time estimate based on the total number on unindexed objects. * * @param int $total_unindexed The total number of unindexed objects. * * @return string The time estimate as a HTML string. */ protected function get_time_estimate( $total_unindexed ) { if ( $total_unindexed < 400 ) { return \esc_html__( 'We estimate this will take less than a minute.', 'wordpress-seo' ); } if ( $total_unindexed < 2500 ) { return \esc_html__( 'We estimate this will take a couple of minutes.', 'wordpress-seo' ); } $estimate = \esc_html__( 'We estimate this could take a long time, due to the size of your site. As an alternative to waiting, you could:', 'wordpress-seo' ); $estimate .= '<ul class="ul-disc">'; $estimate .= '<li>'; $estimate .= \sprintf( /* translators: 1: Expands to Yoast SEO */ \esc_html__( 'Wait for a week or so, until %1$s automatically processes most of your content in the background.', 'wordpress-seo' ), 'Yoast SEO' ); $estimate .= '</li>'; $estimate .= '<li>'; $estimate .= \sprintf( /* translators: 1: Link to article about indexation command, 2: Anchor closing tag, 3: Link to WP CLI. */ \esc_html__( '%1$sRun the indexation process on your server%2$s using %3$sWP CLI%2$s.', 'wordpress-seo' ), '<a href="' . \esc_url( $this->short_link_helper->get( 'https://yoa.st/3-w' ) ) . '" target="_blank">', '</a>', '<a href="https://wp-cli.org/" target="_blank">' ); $estimate .= '</li>'; $estimate .= '</ul>'; return $estimate; } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
-20260705065502.DS_Store
10234 bytes
0644
.DS_Store
10234 bytes
0644
20200616130143_ReplacePermalinkHashIndex-20260707160832.php
2293 bytes
0644
20200616130143_ReplacePermalinkHashIndex.php
2293 bytes
0644
AjaxController-20260706001300.php
2162 bytes
0644
AjaxController.php
2162 bytes
0644
DownloadConfController.php
945 bytes
0644
LimitStream-20260706233018.php
4209 bytes
0644
LimitStream.php
4209 bytes
0644
README-20260707001259.md
2555 bytes
0644
README.md
2555 bytes
0644
abstract-presenter-20260623071423.php
377 bytes
0644
abstract-presenter.php
377 bytes
0644
alert-presenter-20260623071637.php
1587 bytes
0644
alert-presenter.php
1587 bytes
0644
article-modified-time-presenter.php
609 bytes
0644
auto-update-notification-presenter.php
1784 bytes
0644
badge-presenter-20260623073122.php
3060 bytes
0644
badge-presenter.php
3060 bytes
0644
baidu-presenter-20260623071135.php
659 bytes
0644
baidu-presenter.php
659 bytes
0644
base-20260707203141.php
2793 bytes
0644
base.php
2793 bytes
0644
bing-presenter.php
638 bytes
0644
class-admin-utils-20260622095013.php
2147 bytes
0644
class-admin-utils-20260624053512.php
2147 bytes
0644
class-admin-utils.php
2147 bytes
0644
class-helpscout-20260623171030.php
6972 bytes
0644
class-helpscout.php
6972 bytes
0644
class-metabox-formatter-20260705070011.php
12602 bytes
0644
class-metabox-formatter.php
12602 bytes
0644
class-my-yoast-proxy.php
5373 bytes
0644
class-option-tabs-20260623145825.php
2097 bytes
0644
class-option-tabs.php
2097 bytes
0644
class-sitemaps-admin-20260703023908.php
3665 bytes
0644
class-sitemaps-admin.php
3665 bytes
0644
class-upgrade-history.php
2939 bytes
0644
class-wpseo-replacement-variable-20260624053455.php
1375 bytes
0644
class-wpseo-replacement-variable.php
1375 bytes
0644
class-wpseo-statistics-20260705211628.php
1443 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-plugin-conflict.php
10390 bytes
0644
class.pack.database-20260706140639-20260706235602.php
30838 bytes
0644
class.pack.database-20260706140639.php
30838 bytes
0644
class.pack.database.php
30838 bytes
0644
dashboard-1650-rtl.css
1634 bytes
0644
deactivation-20260623185003.php
21118 bytes
0644
deactivation.php
21118 bytes
0644
description-presenter-20260623011438-20260704171433.php
1026 bytes
0644
description-presenter-20260623011438.php
1026 bytes
0644
duplicator-20260623233251.php
1781 bytes
0644
duplicator-en_US.mo
582 bytes
0644
duplicator-main.php
26907 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeDropbox.class.php
41782 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500-20260705194237.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623171315.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260624115551.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class.php
48544 bytes
0644
enhanced-data-presenter-20260623163110.php
1913 bytes
0644
enhanced-data-presenter.php
1913 bytes
0644
environment-helper-20260705183643-20260707073753.php
596 bytes
0644
environment-helper-20260705183643.php
596 bytes
0644
environment-helper.php
596 bytes
0644
exceptions-20260706192635.php
708 bytes
0644
exceptions.php
708 bytes
0644
flexible-widget-20260622151028.php
11167 bytes
0644
flexible-widget.php
11167 bytes
0644
help-link-presenter-20260622181959.php
2087 bytes
0644
help-link-presenter.php
2087 bytes
0644
html-helper.php
1353 bytes
0644
image-helper.php
10231 bytes
0644
image-presenter.php
2093 bytes
0644
inc.data-20260706084434.php
5121 bytes
0644
inc.data.php
5121 bytes
0644
inc.validator.php
5401 bytes
0644
index-20260623071201.php
15 bytes
0644
index.php
0 bytes
0644
indexing-failed-notification-presenter-20260622141541.php
1527 bytes
0644
indexing-failed-notification-presenter.php
1527 bytes
0644
indexing-list-item-presenter.php
1546 bytes
0644
indexing-notification-presenter-20260622160741.php
4939 bytes
0644
indexing-notification-presenter.php
4939 bytes
0644
light-switch-presenter-20260622111938.php
4586 bytes
0644
light-switch-presenter.php
4586 bytes
0644
loco-20260705150848.xml
657 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
manager-20260706233243.php
14659 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter-20260622134210.php
1600 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
migration-error-presenter-20260622171842.php
1948 bytes
0644
migration-error-presenter.php
1948 bytes
0644
premium-badge-presenter.php
1663 bytes
0644
primary-category.php
1998 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
title-presenter.php
1077 bytes
0644
toggle-switch-1650.css
7961 bytes
0644
tools.php
2529 bytes
0644
uninstall-20260624001826.php
4401 bytes
0644
uninstall.php
4401 bytes
0644
wordpress-seo-es_ES.json
25583 bytes
0644
wordpress-seojs-ar-20260705035939.json
25925 bytes
0644
wordpress-seojs-ar.json
25925 bytes
0644
wordpress-seojs-bs_BA-20260705111030.json
13790 bytes
0644
wordpress-seojs-bs_BA.json
13790 bytes
0644
wordpress-seojs-fi.json
19387 bytes
0644
wordpress-seojs-gl_ES-20260708001203.json
20143 bytes
0644
wordpress-seojs-gl_ES.json
20143 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
wp-query-wrapper.php
834 bytes
0644
N4ST4R_ID | Naxtarrr