PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.4
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.4
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / admin / views / tabs / metas / archives.php

archives.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.4, at admin/views/tabs/metas/archives.php

62 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WPSEO plugin file.
4 *
5 * @package WPSEO\Admin\Views
6 */
7
8 if ( ! defined( 'WPSEO_VERSION' ) ) {
9 header( 'Status: 403 Forbidden' );
10 header( 'HTTP/1.1 403 Forbidden' );
11 exit();
12 }
13
14 // To improve readability, this tab has been divided into separate blocks, included below.
15 require __DIR__ . '/archives/help.php';
16
17 $wpseo_archives = [
18 [
19 'title' => esc_html__( 'Author archives', 'wordpress-seo' ),
20 'view_file' => 'paper-content/author-archive-settings.php',
21 'paper_id' => 'settings-author-archives',
22 ],
23 [
24 'title' => esc_html__( 'Date archives', 'wordpress-seo' ),
25 'view_file' => 'paper-content/date-archives-settings.php',
26 'paper_id' => 'settings-date-archives',
27 ],
28 [
29 'title' => esc_html__( 'Special pages', 'wordpress-seo' ),
30 'view_file' => 'paper-content/special-pages.php',
31 'paper_id' => 'settings-special-pages',
32 ],
33 ];
34
35 $view_utils = new Yoast_View_Utils();
36 $recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
37 $editor_specific_replace_vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
38 $opengraph_disabled_alert = $view_utils->generate_opengraph_disabled_alert( 'archives' );
39
40 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Is correctly escaped in the generate_opengraph_disabled_alert() method.
41 echo $opengraph_disabled_alert;
42
43 foreach ( $wpseo_archives as $wpseo_archive_index => $wpseo_archive ) {
44 $wpseo_archive_presenter = new WPSEO_Paper_Presenter(
45 $wpseo_archive['title'],
46 __DIR__ . '/' . $wpseo_archive['view_file'],
47 [
48 'collapsible' => true,
49 'expanded' => ( $wpseo_archive_index === 0 ),
50 'paper_id' => $wpseo_archive['paper_id'],
51 'recommended_replace_vars' => $recommended_replace_vars,
52 'editor_specific_replace_vars' => $editor_specific_replace_vars,
53 'class' => 'search-appearance',
54 ]
55 );
56
57 // phpcs:ignore WordPress.Security.EscapeOutput -- get_output() output is properly escaped.
58 echo $wpseo_archive_presenter->get_output();
59 }
60
61 unset( $wpseo_archives, $wpseo_archive_presenter, $wpseo_archive_index );
62