~jlosito/wordpress/wp-plugin-yoast

« back to all changes in this revision

Viewing changes to admin/views/tabs/metas/general/homepage.php

  • Committer: John Losito
  • Date: 2019-11-08 15:58:32 UTC
  • Revision ID: john.losito@canonical.com-20191108155832-bjb8eep3l9naaf8f
Updated to 12.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/**
3
 
 * WPSEO plugin file.
4
 
 *
5
 
 * @package WPSEO\Admin\Views\General
6
 
 *
7
 
 * @var Yoast_Form $yform
8
 
 */
9
 
 
10
 
?>
11
 
<div class="tab-block">
12
 
        <?php
13
 
        if ( 'posts' === get_option( 'show_on_front' ) ) {
14
 
                $homepage_help = new WPSEO_Admin_Help_Panel(
15
 
                        'search-appearance-homepage',
16
 
                        __( 'Learn more about the homepage setting', 'wordpress-seo' ),
17
 
                        __( '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' ),
18
 
                        'has-wrapper'
19
 
                );
20
 
 
21
 
                echo '<h2 class="help-button-inline">', esc_html__( 'Homepage', 'wordpress-seo' ), $homepage_help->get_button_html(), '</h2>';
22
 
                echo $homepage_help->get_panel_html();
23
 
 
24
 
                $editor = new WPSEO_Replacevar_Editor( $yform, 'title-home-wpseo', 'metadesc-home-wpseo', 'homepage' );
25
 
                $editor->render();
26
 
        }
27
 
        else {
28
 
                echo '<h2>', esc_html__( 'Homepage &amp; Front page', 'wordpress-seo' ), '</h2>';
29
 
                echo '<p>';
30
 
                printf(
31
 
                        /* translators: 1: link open tag; 2: link close tag. */
32
 
                        esc_html__( 'You can determine the title and description for the front page by %1$sediting the front page itself &raquo;%2$s', 'wordpress-seo' ),
33
 
                        '<a href="' . esc_url( get_edit_post_link( get_option( 'page_on_front' ) ) ) . '">',
34
 
                        '</a>'
35
 
                );
36
 
                echo '</p>';
37
 
                if ( get_option( 'page_for_posts' ) > 0 ) {
38
 
                        echo '<p>';
39
 
                        printf(
40
 
                                /* translators: 1: link open tag; 2: link close tag. */
41
 
                                esc_html__( 'You can determine the title and description for the blog page by %1$sediting the blog page itself &raquo;%2$s', 'wordpress-seo' ),
42
 
                                '<a href="' . esc_url( get_edit_post_link( get_option( 'page_for_posts' ) ) ) . '">',
43
 
                                '</a>'
44
 
                        );
45
 
                        echo '</p>';
46
 
                }
47
 
        }
48
 
        ?>
49
 
</div>