← All changes
|
src/actions/indexing/indexable-general-indexation-action.php
+8
-3
18.3
→
trunk
View file →
| @@ -6,10 +6,8 @@ | ||
| 6 | 6 | use Yoast\WP\SEO\Repositories\Indexable_Repository; |
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * General reindexing action for indexables. |
| 10 | - * | |
| 11 | - * @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded | |
| 12 | 10 | */ |
| 13 | 11 | class Indexable_General_Indexation_Action implements Indexation_Action_Interface, Limited_Indexing_Action_Interface { |
| 14 | 12 | |
| 15 | 13 | /** |
| @@ -14,9 +12,9 @@ | ||
| 14 | 12 | |
| 15 | 13 | /** |
| 16 | 14 | * The transient cache key. |
| 17 | 15 | */ |
| 18 | - const UNINDEXED_COUNT_TRANSIENT = 'wpseo_total_unindexed_general_items'; | |
| 16 | + public const UNINDEXED_COUNT_TRANSIENT = 'wpseo_total_unindexed_general_items'; | |
| 19 | 17 | |
| 20 | 18 | /** |
| 21 | 19 | * Represents the indexables repository. |
| 22 | 20 | * |
| @@ -48,8 +46,15 @@ | ||
| 48 | 46 | |
| 49 | 47 | $result = \count( $indexables_to_create ); |
| 50 | 48 | |
| 51 | 49 | \set_transient( static::UNINDEXED_COUNT_TRANSIENT, $result, \DAY_IN_SECONDS ); |
| 50 | + | |
| 51 | + /** | |
| 52 | + * Action: 'wpseo_indexables_unindexed_calculated' - sets an option to timestamp when there are no unindexed indexables left. | |
| 53 | + * | |
| 54 | + * @internal | |
| 55 | + */ | |
| 56 | + \do_action( 'wpseo_indexables_unindexed_calculated', static::UNINDEXED_COUNT_TRANSIENT, $result ); | |
| 52 | 57 | |
| 53 | 58 | return $result; |
| 54 | 59 | } |
| 55 | 60 | |