Sindbad~EG File Manager

Current Path : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt/functions/seo/
Upload File :
Current File : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt/functions/seo/meta-single-video.php

<?php
/*
 * Security 	: blocking direct access
 * Source		: http://codex.wordpress.org/Theme_Development#Template_Files
*/
defined('ABSPATH') or die("Access Restricted");

function mwp_seo_single_video() {
		/*!
		 * Get SEO info
		*/
		if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
			$viewport				= 'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no';
			$http_equiv				= '';
			$http_equiv_compatible	= '';
		} else {
			$viewport				= 'width=device-width, initial-scale=1';
			$http_equiv				= 'text/html; charset=utf-8';
			$http_equiv_compatible	= 'IE=edge,chrome=1';
		}
		$referrer				= 'unsafe-url'; // https://moz.com/blog/meta-referrer-tag
		$profile				= 'http://gmpg.org/xfn/11';
		$robots					= 'NOODP'; // https://moz.com/blog/why-wont-google-use-my-meta-description
		$apple_capable			= 'yes';
		$twitter_summary 		= 'summary_large_image';
		$twitter_user	 		= mwp_option('twitter-user');
		$facebook_publisher		= mwp_option('facebook-link');
		$get_site_name 			= mwp_option('seo-home-title');
		
		$queried_object 		= get_queried_object();
		$category 				= mwp_display_category_name($queried_object->ID);
		$tags 					= mwp_seo_keywords_opengraph($queried_object->ID);
		$permalink 				= get_permalink($queried_object->ID);
		$page_title 			= mwp_seo_title($queried_object->ID);
		$page_description 		= mwp_seo_description($queried_object->ID);
		$page_keywords 			= mwp_seo_keywords($queried_object->ID);
		$page_image				= mwp_seo_image($queried_object->ID);
		$published_date			= seo_publish_date('c', $queried_object->ID);
		$modified_time			= seo_modified_time('c', $queried_object->ID);
		
		/* Social */
		$social_title			= mwp_social_title($queried_object->ID);
		$social_description		= mwp_social_description($queried_object->ID);
		$social_image			= mwp_social_image($queried_object->ID);
		
		/*
		 * Facebook - Site Name
		 *
		*/
		if (!empty($get_site_name)) {
			$site_name = $get_site_name;
		} else {
			$site_name = get_bloginfo('name');
		}
		
		/*
		 * Standard Meta
		 *
		*/
		$standar_data = array (
			'title' 					=> $page_title,
			'X-UA-Compatible'			=> $http_equiv_compatible,
			'Content-Type'				=> $http_equiv,
			'viewport' 					=> $viewport,
			'description' 				=> $page_description,
			'keywords' 					=> $page_keywords,
			'robots' 					=> $robots,
			'referrer' 					=> $referrer,
			'apple-mobile-web-app-capable'	=> $apple_capable,
			'image_src' 				=> $page_image,
			'profile'					=> $profile,
		);
		// Removing empty array slots
		$standar = array_filter( $standar_data );
		echo '<!-- Standard Meta -->',"\n";
		foreach ($standar as $key => $value) {
			switch ($key) {
				case 'title':
					$standar_output = "<title>".$value."</title>\n";
				break;
				case 'X-UA-Compatible':
				case 'Content-Type':
				case 'viewport':
				case 'description':
				case 'keywords':
				case 'robots':
				case 'referrer':
				case 'apple-mobile-web-app-capable':
					$standar_output = "<meta name='".$key."' content='".$value."'/>\n";
				break;
				case 'profile':
					$standar_output = "<link rel='".$key."' href='".$value."'/>\n";
				break;
			}
			echo $standar_output;
		}
		
		/*
		 * Twitter Site Name
		 *
		*/
		$twitter_site 		= '';
		if (!empty($twitter_user)) {
			$twitter_site = '@'.$twitter_user;
		}
		/*
		 * Twitter Cards and Open Graph mix
		 *
		 * NO need for twitter:title, twitter:description, twitter:image
		 * see : https://dev.twitter.com/cards/getting-started#opengraph
		 * Twitter Cards and Open Graph mix
		 *
		*/
		$twitter_card = array (
			'twitter:card' 	=> $twitter_summary,
			'twitter:site' 	=> $twitter_site,
		);
		// Removing empty array slots
		$twitter = array_filter( $twitter_card );
		echo "<!-- Twitter Card data -->\n";
		$twitter_output = '';
		foreach ($twitter as $property => $content) {
			if (!empty($content))
			$twitter_output .= "<meta property='".$property."' content='".$content."' />\n";
		}
		echo $twitter_output;
		
		/*
		 * Facebook - APP ID & USER ID
		 *
		*/
		if (mwp_option('facebook-app-enable') == 1) {
			$facebook_appid		= mwp_option('facebook-app-id');
			$facebook_admins 	= mwp_option('facebook-user-id');	
		} else {
			$facebook_appid		= '';
			$facebook_admins 	= '';
		}
		/*
		 * Facebook - Article Modified & OG Updated
		 *
		*/
		if ( $modified_time > $published_date ) {
			$og_modified = $modified_time;
		} else {
			$og_modified = '';
		}
		/*
		 * Facebook - OG Description Remove Check
		 *
		*/
		if (mwp_option('opengraph-og-desc') == 1) {
			$og_social_description = '';
		} else {
			$og_social_description = $social_description;
		}
		/*
		 * Facebook Open Graph data
		 *
		*/
		$opengraph_data = array (
			'og:locale' 				=> mwp_locale(),
			'og:title' 					=> $social_title,
			'og:type' 					=> 'video.other',
			'og:url' 					=> $permalink,
			'og:image' 					=> $social_image,
			'og:description' 			=> $og_social_description,
			'og:site_name' 				=> $site_name,
			'article:publisher' 		=> $facebook_publisher,
			'article:tag' 				=> $tags,
			'article:section' 			=> $category,
			'article:published_time'	=> $published_date,
			'article:modified_time'		=> $og_modified,
			'og:updated_time' 			=> $og_modified,
			'fb:admins' 				=> $facebook_admins,
			'fb:app_id' 				=> $facebook_appid
		);
		
		// Removing empty array slots
		$opengraph = array_filter( $opengraph_data );
		echo "<!-- Open Graph data -->\n";
		$facebook_output = '';
		foreach ($opengraph as $property => $content) {
			if ($property == 'article:tag')
			foreach ( $content as $tag ) {
				if (!empty($tag->name)) {
					$characters = seo_description_characters();
					$keyword = str_replace($characters, "", $tag->name);
					$facebook_output .= "<meta property='article:tag' content='".$keyword."' />\n";
				} else {
					$characters = seo_description_characters();
					$keyword = str_replace($characters, "", $tag);
					$facebook_output .= "<meta property='article:tag' content='".$keyword."' />\n";
				}
			}
			if ($property != 'article:tag')
			$facebook_output .= "<meta property='".$property."' content='".$content."' />\n";
		}
		echo $facebook_output;
}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists