is_video_page( filter_input( INPUT_GET, 'page' ) ) ) { add_action( 'wpseo_admin_footer', array( $this, 'reindex_videos_form' ) ); $this->register_i18n_promo_class(); } Yoast_Form::get_instance()->admin_header( true, 'wpseo_video' ); if ( isset( $_POST['reindex'] ) ) { /* * Load the reindex page, shows a progressbar and sents ajax calls to the server with * small amounts of posts to reindex. */ require plugin_dir_path( WPSEO_VIDEO_FILE ) . 'views/reindex-page.php'; } else { if ( WPSEO_Options::get( 'enable_xml_sitemap', false ) !== true ) { printf( '

%s

', sprintf( /* translators: 1: link open tag; 2: link close tag. */ esc_html__( 'Please enable the XML sitemap under the SEO -> %1$sFeatures%2$s settings', 'yoast-video-seo' ), '', '' ) ); } else { echo '

' . esc_html__( 'General Settings', 'yoast-video-seo' ) . '

'; if ( $sitemap_url !== null ) { echo '

' . esc_html__( 'Please find your video sitemap here:', 'yoast-video-seo' ) . ' ' . esc_html__( 'XML Video Sitemap', 'yoast-video-seo' ) . '

'; } else { echo '

' . esc_html__( 'Select at least one post type to enable the video sitemap.', 'yoast-video-seo' ) . '

'; } Yoast_Form::get_instance()->checkbox( 'video_cloak_sitemap', esc_html__( 'Hide the sitemap from normal visitors?', 'yoast-video-seo' ) ); Yoast_Form::get_instance()->checkbox( 'video_disable_rss', esc_html__( 'Disable Media RSS Enhancement', 'yoast-video-seo' ) ); echo '
'; Yoast_Form::get_instance()->textinput( 'video_custom_fields', esc_html__( 'Custom fields', 'yoast-video-seo' ) ); echo '

' . esc_html__( 'Custom fields the plugin should check for video content (comma separated)', 'yoast-video-seo' ) . '

'; Yoast_Form::get_instance()->textinput( 'video_embedly_api_key', esc_html__( '(Optional) Embedly API Key', 'yoast-video-seo' ) ); /* translators: 1,3: link open tag; 2: link close tag. */ echo '

' . sprintf( esc_html__( 'The video SEO plugin provides where possible enriched information about your videos. A lot of %1$svideo services%2$s are supported by default. For those services which aren\'t supported, we can try to retrieve enriched video information using %3$sEmbedly%2$s. If you want to use this option, you\'ll need to sign up for a (free) %3$sEmbedly%2$s account and provide the API key you receive.', 'yoast-video-seo' ), '', '', '' ) . '

'; echo '

' . esc_html__( 'Embed Settings', 'yoast-video-seo' ) . '

'; Yoast_Form::get_instance()->checkbox( 'video_facebook_embed', esc_html__( 'Allow videos to be played directly on other websites, such as Facebook or Twitter?', 'yoast-video-seo' ) ); /* translators: 1: link open tag, 2: link close tag. */ Yoast_Form::get_instance()->checkbox( 'video_fitvids', sprintf( esc_html__( 'Try to make videos responsive using %1$sFitVids.js%2$s?', 'yoast-video-seo' ), '
', '' ) ); echo '
'; Yoast_Form::get_instance()->textinput( 'video_content_width', esc_html__( 'Content width', 'yoast-video-seo' ) ); echo '

' . esc_html__( 'This defaults to your themes content width, but if it\'s empty, setting a value here will make sure videos are embedded in the right width.', 'yoast-video-seo' ) . '

'; Yoast_Form::get_instance()->textinput( 'video_wistia_domain', esc_html__( 'Wistia domain', 'yoast-video-seo' ) ); echo '

' . esc_html__( 'If you use Wistia in combination with a custom domain, set this to the domain name you use for your Wistia videos, no http: or slashes needed.', 'yoast-video-seo' ) . '

'; echo '

' . esc_html__( 'Post Types for which to enable the Video SEO plugin', 'yoast-video-seo' ) . '

'; echo '

' . esc_html__( 'Determine which post types on your site might contain video.', 'yoast-video-seo' ) . '

'; $post_types = get_post_types( array( 'public' => true ), 'objects' ); $post_types_list = []; foreach ( $post_types as $post_type ) { $post_types_list[ $post_type->name ] = $post_type->labels->name; } Yoast_Form::get_instance()->checkbox_list( 'videositemap_posttypes', $post_types_list ); echo '

' . esc_html__( 'Taxonomies to include in XML Video Sitemap', 'yoast-video-seo' ) . '

'; echo '

' . esc_html__( 'You can also include your taxonomy archives, for instance, if you have videos on a category page.', 'yoast-video-seo' ) . '

'; $taxonomies = get_taxonomies( array( 'public' => true ), 'objects' ); $taxonomies_list = []; foreach ( $taxonomies as $taxonomy ) { $taxonomies_list[ $taxonomy->name ] = $taxonomy->labels->name; } Yoast_Form::get_instance()->checkbox_list( 'videositemap_taxonomies', $taxonomies_list ); } } // Add debug info. Yoast_Form::get_instance()->admin_footer( true, false ); } /** * Adds the reindexing form for videos. */ public function reindex_videos_form() { ?>


'yoast-video-seo', 'project_slug' => 'yoast-video-seo', 'plugin_name' => 'Video SEO for WordPress SEO by Yoast', 'hook' => 'wpseo_admin_promo_footer', 'glotpress_url' => 'http://translate.yoast.com/gp/', 'glotpress_name' => 'Yoast Translate', 'glotpress_logo' => 'http://translate.yoast.com/gp-templates/images/Yoast_Translate.svg', 'register_url' => 'http://translate.yoast.com/gp/projects#utm_source=plugin&utm_medium=promo-box&utm_campaign=wpseo-video-i18n-promo', ) ); } }