Sindbad~EG File Manager

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

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

function mwp_seo_archive() {
		/*!
		 * Get SEO info
		*/
		$viewport				= 'width=device-width, initial-scale=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
		$http_equiv				= 'text/html; charset=utf-8';
		$http_equiv_compatible	= 'IE=edge,chrome=1';
		$apple_capable			= 'yes';
		$twitter_summary 		= 'summary_large_image';
		$twitter_user	 		= mwp_option('twitter-user');
		$get_site_name 			= mwp_option('seo-home-title');
		$get_site_image			= mwp_option('seo-home-image');
		$page_url 				= g_permalink_archive();
		$page_title				= mwp_archive_title();
		$page_description 		= mwp_seo_description(get_queried_object_id());
		
		/*
		 * Site Name
		 *
		*/
		if (!empty($get_site_name)) {
			$site_name = $get_site_name;
		} else {
			$site_name = get_bloginfo('name');
		}
		/*
		 * Site Image
		 *
		*/
		if (!empty($get_site_image)) {
			$site_image = $get_site_image;
		} else {
			$site_image = mwp_thumb_size_default_src();
		}
		
		/*!
		 * Standard Meta
		*/
		$standar_data = array (
			'title' 					=> $page_title,
			'X-UA-Compatible'			=> $http_equiv_compatible,
			'Content-Type'				=> $http_equiv,
			'viewport' 					=> $viewport,
			'description' 				=> $page_description,
			'robots' 					=> $robots,
			'referrer' 					=> $referrer,
			'apple-mobile-web-app-capable'	=> $apple_capable,
			'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 '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 Open Graph data
		*/
		$opengraph_data = array (
			'og:title' 			=> $page_title,
			'og:type' 			=> 'website',
			'og:url' 			=> $page_url,
			'og:image' 			=> $site_image,
			'og:description' 	=> $page_description,
			'og:site_name' 		=> $site_name,
			'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) {
			$facebook_output .= "<meta property='".$property."' content='".$content."' />\n";
		}
		echo $facebook_output;
}

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