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 / social / facebook.php

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

61 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 * @uses Yoast_Form $yform Form object.
8 */
9
10 use Yoast\WP\SEO\Presenters\Admin\Alert_Presenter;
11
12 if ( ! defined( 'WPSEO_VERSION' ) ) {
13 header( 'Status: 403 Forbidden' );
14 header( 'HTTP/1.1 403 Forbidden' );
15 exit();
16 }
17
18 echo '<h2>' . esc_html__( 'Facebook settings', 'wordpress-seo' ) . '</h2>';
19
20 $yform->light_switch( 'opengraph', __( 'Add Open Graph meta data', 'wordpress-seo' ) );
21
22 ?>
23 <p>
24 <?php
25 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' );
26 ?>
27 </p>
28
29 <div id="wpseo-opengraph-settings" style="display: none;">
30 <?php
31 $frontpage_settings_message = sprintf(
32 /* translators: 1: link open tag; 2: link close tag. */
33 esc_html__( 'The social homepage settings have been moved to the %1$s‘Search appearance’ settings under the ‘General’ tab%2$s.', 'wordpress-seo' ),
34 '<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_titles#top#general' ) ) . '">',
35 '</a>'
36 );
37
38 $frontpage_settings_alert = new Alert_Presenter( $frontpage_settings_message, 'info' );
39
40 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output from present() is considered safe.
41 echo '<div class="yoast-measure">' . $frontpage_settings_alert->present() . '</div>';
42
43 $yform->hidden( 'og_frontpage_title', 'og_frontpage_title' );
44 $yform->hidden( 'og_frontpage_desc', 'og_frontpage_desc' );
45 $yform->hidden( 'og_frontpage_image', 'og_frontpage_image' );
46 $yform->hidden( 'og_frontpage_image_id', 'og_frontpage_image_id' );
47
48 echo '<h3>' . esc_html__( 'Default image', 'wordpress-seo' ) . '</h3>';
49
50 $yform->hidden( 'og_default_image', 'og_default_image' );
51 $yform->hidden( 'og_default_image_id', 'og_default_image_id' );
52 ?>
53 <p>
54 <?php esc_html_e( 'This image is used if the post/page being shared does not contain any images.', 'wordpress-seo' ); ?>
55 </p>
56 <div id="yoast-og-default-image-select" class="yoast-measure"></div>
57 </div>
58 <?php
59
60 do_action( 'wpseo_admin_opengraph_section' );
61