Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/accelera.../includes
File: thirdparty-compatibility.php
[500] Fix | Delete
$data['set_category_hirarchy'] = 1;
[501] Fix | Delete
return $data;
[502] Fix | Delete
}
[503] Fix | Delete
[504] Fix | Delete
[505] Fix | Delete
}//Is_admin Closed
[506] Fix | Delete
[507] Fix | Delete
/**
[508] Fix | Delete
* Added filter to Add tags & attribute
[509] Fix | Delete
* sanitizer in all content filters
[510] Fix | Delete
*/
[511] Fix | Delete
add_filter("amp_content_sanitizers",'ampforwp_allows_tag_sanitizer');
[512] Fix | Delete
add_filter("ampforwp_content_sanitizers",'ampforwp_allows_tag_sanitizer');
[513] Fix | Delete
[514] Fix | Delete
function ampforwp_allows_tag_sanitizer($sanitizer_classes){
[515] Fix | Delete
$sanitizer_classes['AMP_Tag_And_Attribute_Sanitizer'] = array();
[516] Fix | Delete
return $sanitizer_classes;
[517] Fix | Delete
};
[518] Fix | Delete
[519] Fix | Delete
add_action( 'activated_plugin', 'ampforwp_active_update_transient' );
[520] Fix | Delete
function ampforwp_active_update_transient($plugin){
[521] Fix | Delete
delete_transient( 'ampforwp_themeframework_active_plugins' );
[522] Fix | Delete
}
[523] Fix | Delete
add_action( 'deactivated_plugin', 'ampforwp_deactivate_update_transient' );
[524] Fix | Delete
function ampforwp_deactivate_update_transient($plugin){
[525] Fix | Delete
delete_transient( 'ampforwp_themeframework_active_plugins' );
[526] Fix | Delete
$check_plugin = strpos($plugin, ampforwp_get_setting('amp-design-selector'));
[527] Fix | Delete
if ( false !== $check_plugin ) {
[528] Fix | Delete
$selectedOption = get_option('redux_builder_amp',true);
[529] Fix | Delete
$selectedOption['amp-design-selector'] = 4;
[530] Fix | Delete
update_option('redux_builder_amp',$selectedOption);
[531] Fix | Delete
}
[532] Fix | Delete
}
[533] Fix | Delete
// #2894 Backward compatibility for SEO Options
[534] Fix | Delete
add_action( 'upgrader_process_complete', 'ampforwp_update_seo_options');
[535] Fix | Delete
function ampforwp_update_seo_options(){
[536] Fix | Delete
$current_seo = ampforwp_get_setting('ampforwp-seo-selection');
[537] Fix | Delete
if ( $current_seo != (1 || 2) ) {
[538] Fix | Delete
return;
[539] Fix | Delete
}
[540] Fix | Delete
if ( 1 == $current_seo || 2 == $current_seo ) {
[541] Fix | Delete
$selectedOption = get_option('redux_builder_amp',true);
[542] Fix | Delete
if ( 1 == $current_seo ) {
[543] Fix | Delete
$selectedOption['ampforwp-seo-selection'] = 'yoast';
[544] Fix | Delete
}
[545] Fix | Delete
if ( 2 == $current_seo ) {
[546] Fix | Delete
$selectedOption['ampforwp-seo-selection'] = 'aiseo';
[547] Fix | Delete
}
[548] Fix | Delete
update_option('redux_builder_amp',$selectedOption);
[549] Fix | Delete
}
[550] Fix | Delete
}
[551] Fix | Delete
[552] Fix | Delete
//Compatibility with the footnotes plugin. #2447
[553] Fix | Delete
add_action('amp_post_template_css','ampforwp_footnote_support');
[554] Fix | Delete
if ( ! function_exists('ampforwp_footnote_support') ) {
[555] Fix | Delete
function ampforwp_footnote_support(){
[556] Fix | Delete
if(class_exists('MCI_Footnotes')){?>
[557] Fix | Delete
.footnote_tooltip {
[558] Fix | Delete
display: none;
[559] Fix | Delete
}
[560] Fix | Delete
<?php
[561] Fix | Delete
}
[562] Fix | Delete
}
[563] Fix | Delete
}
[564] Fix | Delete
[565] Fix | Delete
// Simple Author Box Compatibility #2268
[566] Fix | Delete
add_action('amp_post_template_css', 'ampforwp_simple_author_box');
[567] Fix | Delete
function ampforwp_simple_author_box(){
[568] Fix | Delete
if( class_exists('Simple_Author_Box') ){ ?>
[569] Fix | Delete
.saboxplugin-wrap .saboxplugin-gravatar amp-img {max-width: 100px;height: auto;}
[570] Fix | Delete
<?php }
[571] Fix | Delete
// Compatibility with Use Any Font plugin #2774
[572] Fix | Delete
if ( function_exists('uaf_activate') ) {
[573] Fix | Delete
$uaf_use_absolute_font_path = get_option('uaf_use_absolute_font_path'); // Check if user want to use absolute font path.
[574] Fix | Delete
if (empty($uaf_use_absolute_font_path)){
[575] Fix | Delete
$uaf_use_absolute_font_path = 0;
[576] Fix | Delete
}
[577] Fix | Delete
$uaf_upload = wp_upload_dir();
[578] Fix | Delete
$uaf_upload_dir = $uaf_upload['basedir'];
[579] Fix | Delete
$uaf_upload_dir = $uaf_upload_dir . '/useanyfont/';
[580] Fix | Delete
$uaf_upload_url = $uaf_upload['baseurl'];
[581] Fix | Delete
$uaf_upload_url = $uaf_upload_url . '/useanyfont/';
[582] Fix | Delete
$uaf_upload_url = preg_replace('#^https?:#', '', $uaf_upload_url);
[583] Fix | Delete
[584] Fix | Delete
if ($uaf_use_absolute_font_path == 0){ // If user use relative path
[585] Fix | Delete
$url_parts = parse_url($uaf_upload_url);
[586] Fix | Delete
@$uaf_upload_url = "$url_parts[path]$url_parts[query]$url_parts[fragment]";
[587] Fix | Delete
}
[588] Fix | Delete
$fontsRawData = get_option('uaf_font_data');
[589] Fix | Delete
$fontsData = json_decode($fontsRawData, true);
[590] Fix | Delete
if (!empty($fontsData)):
[591] Fix | Delete
foreach ($fontsData as $key=>$fontData): ?>
[592] Fix | Delete
@font-face {
[593] Fix | Delete
font-family: '<?php echo esc_html($fontData['font_name']); ?>';
[594] Fix | Delete
font-style: normal;
[595] Fix | Delete
src: url('<?php echo esc_url($uaf_upload_url.$fontData['font_path']); ?>.eot');
[596] Fix | Delete
src: local('<?php echo esc_html($fontData['font_name']) ?>'), url('<?php echo esc_url($uaf_upload_url.$fontData['font_path']) ?>.eot') format('embedded-opentype'), url('<?php echo esc_url($uaf_upload_url.$fontData['font_path']) ?>.woff') format('woff');
[597] Fix | Delete
}
[598] Fix | Delete
.<?php echo esc_html($fontData['font_name']) ?>{font-family: '<?php echo esc_html($fontData['font_name']) ?>';}
[599] Fix | Delete
<?php endforeach;
[600] Fix | Delete
endif;
[601] Fix | Delete
[602] Fix | Delete
$fontsImplementRawData = get_option('uaf_font_implement');
[603] Fix | Delete
$fontsImplementData = json_decode($fontsImplementRawData, true);
[604] Fix | Delete
if (!empty($fontsImplementData)):
[605] Fix | Delete
foreach ($fontsImplementData as $key=>$fontImplementData): ?>
[606] Fix | Delete
<?php echo $fontImplementData['font_elements']; // escaped above ?>{
[607] Fix | Delete
font-family: '<?php echo esc_html($fontsData[$fontImplementData['font_key']]['font_name']); ?>';
[608] Fix | Delete
}
[609] Fix | Delete
<?php endforeach;
[610] Fix | Delete
endif;
[611] Fix | Delete
}
[612] Fix | Delete
}
[613] Fix | Delete
[614] Fix | Delete
// WP-AppBox CSS #2791
[615] Fix | Delete
add_action('amp_post_template_css', 'ampforwp_app_box_styles');
[616] Fix | Delete
function ampforwp_app_box_styles(){
[617] Fix | Delete
if ( function_exists('wpAppbox_createAppbox') ) { ?>
[618] Fix | Delete
.wpappbox{clear:both;background-color:#F9F9F9;line-height:1.4;color:#545450;margin:16px 0;font-size:15px;border:1px solid #E5E5E5;box-shadow:0 0 8px 1px rgba(0,0,0,.11);border-radius:8px;display:inline-block;width:100%}.wpappbox a{transition:all .3s ease-in-out 0s}.wpappbox.compact .appicon{height:66px;width:68px;float:left;padding:6px;margin-right:15px}.appicon amp-img{max-width:92px;height:60px;border-radius:5%}.wpappbox a:hover amp-img{opacity:.9;filter:alpha(opacity=90);-webkit-filter:grayscale(100%)}.wpappbox .appicon{position:relative;height:112px;width:112px;float:left;padding:10px;background:#FFF;text-align:center;border-right:1px solid #E5E5E5;border-top-left-radius:6px;border-bottom-left-radius:6px;margin-right:10px}.wpappbox .appdetails{margin-top:15px}.wpappbox .appbuttons a{font-size:13px;box-shadow:0 1px 3px 0 rgba(0,0,0,.15);background:#F1F1F1;border-bottom:0;color:#323232;padding:3px 5px;display:inline-block;margin:12px 0 0;border-radius:3px;cursor:pointer;font-weight:400}.wpappbox .appbuttons a:hover{color:#fff;background:#111}.wpappbox div.applinks,div.wpappbox.compact a.applinks{float:right;position:relative;background:#FFF;text-align:center;border-left:1px solid #E5E5E5;border-top-right-radius:6px;border-bottom-right-radius:6px}.wpappbox div.applinks{height:112px;width:92px;display:block}.wpappbox .apptitle,.wpappbox .developer{margin-bottom:15px}.wpappbox .developer a{color:#333}.wpappbox .apptitle a{font-size:18px;font-weight:500;color:#333}.wpappbox .apptitle a:hover,.wpappbox .developer a:hover{color:#5588b5}.wpappbox .appbuttons span,.wpappbox .qrcode{display:none}.wpappbox.screenshots>div.screenshots{width:auto;margin:0 auto;padding:10px;clear:both;border-top:1px solid #E5E5E5}.wpappbox .screenshots .slider>ul>li{padding:0;margin:0 6px 0 0;list-style-type:none;display:inline-block}.wpappbox .screenshots .slider{overflow-x:scroll;overflow-y:hidden;height:320px;margin-top:0}.wpappbox .screenshots .slider>ul{display:inline-flex;width:100%}.wpappbox .screenshots .slider>ul>li amp-img{height:320px;}.wpappbox .slider li:before{display: none;}
[619] Fix | Delete
div.wpappbox div.appbuttons {position: absolute;bottom: 30px;width: 92px;}
[620] Fix | Delete
<?php $wpappbox_image_path = plugins_url().'/wp-appbox/img/'; ?>
[621] Fix | Delete
div.wpappbox:not(.colorful) div.applinks {filter: grayscale(100%);}
[622] Fix | Delete
div.wpappbox .applinks, div.wpappbox div.applinks{background-color: #FFF;}
[623] Fix | Delete
div.wpappbox.amazonapps a.applinks, div.wpappbox.amazonapps div.applinks {background: url(<?php echo esc_url($wpappbox_image_path.'amazonapps.png'); ?>);background-repeat: no-repeat;background-size: auto 42px;background-position: center 7px;}
[624] Fix | Delete
div.wpappbox.appstore a.applinks, div.wpappbox.appstore div.applinks {background: url(<?php echo esc_url($wpappbox_image_path.'appstore.png'); ?>);background-repeat: no-repeat;background-size: auto 42px;background-position: center 7px;}
[625] Fix | Delete
div.wpappbox.chromewebstore a.applinks, div.wpappbox.chromewebstore div.applinks{background: url(<?php echo esc_url($wpappbox_image_path.'chromewebstore.png'); ?>);background-repeat: no-repeat;background-size: auto 42px;background-position: center 7px;}
[626] Fix | Delete
div.wpappbox.firefoxaddon a.applinks, div.wpappbox.firefoxaddon div.applinks{background: url(<?php echo esc_url($wpappbox_image_path.'firefoxaddon.png'); ?>);background-repeat: no-repeat;background-size: auto 42px;background-position: center 7px;}
[627] Fix | Delete
div.wpappbox.googleplay a.applinks, div.wpappbox.googleplay div.applinks{background: url(<?php echo esc_url($wpappbox_image_path.'googleplay.png'); ?>);background-repeat: no-repeat;background-size: auto 42px;background-position: center 7px;}
[628] Fix | Delete
div.wpappbox.operaaddons a.applinks, div.wpappbox.operaaddons div.applinks{background: url(<?php echo esc_url($wpappbox_image_path.'operaaddons.png'); ?>);background-repeat: no-repeat;background-size: auto 42px;background-position: center 7px;}
[629] Fix | Delete
div.wpappbox.steam a.applinks, div.wpappbox.steam div.applinks{background: url(<?php echo esc_url($wpappbox_image_path.'steam.png'); ?>);background-repeat: no-repeat;background-size: auto 42px;background-position: center 7px;}
[630] Fix | Delete
div.wpappbox.windowsstore a.applinks, div.wpappbox.windowsstore div.applinks{background: url(<?php echo esc_url($wpappbox_image_path.'windowsstore.png'); ?>);background-repeat: no-repeat;background-size: auto 42px;background-position: center 7px;}
[631] Fix | Delete
div.wpappbox.wordpress a.applinks, div.wpappbox.wordpress div.applinks{background: url(<?php echo esc_url($wpappbox_image_path.'wordpress.png'); ?>);background-repeat: no-repeat;background-size: auto 42px;background-position: center 7px;}
[632] Fix | Delete
div.wpappbox.xda a.applinks, div.wpappbox.xda div.applinks{background: url(<?php echo esc_url($wpappbox_image_path.'xda.png'); ?>);background-repeat: no-repeat;background-size: auto 42px;background-position: center 7px;}
[633] Fix | Delete
div.wpappbox div.stars-monochrome {background: url(<?php echo esc_url($wpappbox_image_path.'stars-sprites-monochrome.png'); ?>) no-repeat;}
[634] Fix | Delete
div.wpappbox div.rating-stars {width: 65px;height: 13px;margin-left: 5px;margin-top: 4px;display: inline-block;}
[635] Fix | Delete
div.wpappbox div.stars50 {background-position: 0 -130px;}
[636] Fix | Delete
div.wpappbox div.stars45 {background-position: 0 -117px;}
[637] Fix | Delete
div.wpappbox div.stars40 {background-position: 0 -104px;}
[638] Fix | Delete
div.wpappbox div.stars35 {background-position: 0 -91px;}
[639] Fix | Delete
div.wpappbox div.stars30 {background-position: 0 -78px;}
[640] Fix | Delete
div.wpappbox div.stars25 {background-position: 0px -65px;}
[641] Fix | Delete
div.wpappbox div.stars20 {background-position: 0px -52px;}
[642] Fix | Delete
div.wpappbox div.stars15 {background-position: 0px -39px;}
[643] Fix | Delete
div.wpappbox div.stars10 {background-position: 0px -26px;}
[644] Fix | Delete
div.wpappbox div.stars5 {background-position: 0px -12px;}
[645] Fix | Delete
div.wpappbox div.stars0 {background-position: 0px -0px;}
[646] Fix | Delete
@media(max-width:500px){.appicon amp-img{max-width:70px;height:70px}.wpappbox .appicon{height:90px;width:90px;display:inline-block;vertical-align:middle;}.wpappbox .apptitle a{font-size:14px}.wpappbox{font-size:13px;text-align:center;padding:10px 0}.wpappbox .apptitle,.wpappbox .developer{margin-bottom:6px}.wpappbox .appdetails{text-align:left;padding-left:10px}.wpappbox .screenshots .slider{height:290px}.wpappbox .screenshots .slider>ul>li amp-img{max-width:160px;height:280px}
[647] Fix | Delete
.wpappbox div.applinks{display:none;}.wpappbox .screenshots .slider>ul {display: inline;white-space: nowrap;}}
[648] Fix | Delete
<?php
[649] Fix | Delete
} // ampforwp_app_box_styles Function Ends
[650] Fix | Delete
}
[651] Fix | Delete
[652] Fix | Delete
// SEOPress Compatibility #1589
[653] Fix | Delete
add_action('amp_post_template_head', 'ampforwp_seopress_social');
[654] Fix | Delete
function ampforwp_seopress_social(){
[655] Fix | Delete
if ( 'seopress' == ampforwp_get_setting('ampforwp-seo-selection') ) {
[656] Fix | Delete
$options = $facebook = $twitter = $advanced_options = $seopress_social_og_title = $seopress_social_og_desc = '';
[657] Fix | Delete
$post_id = ampforwp_get_the_ID();
[658] Fix | Delete
$options = get_option("seopress_social_option_name");
[659] Fix | Delete
$advanced_options = get_option("seopress_advanced_option_name");
[660] Fix | Delete
if ( !empty($options) ) {
[661] Fix | Delete
if (isset($options['seopress_social_facebook_og'])) {
[662] Fix | Delete
global $wp;
[663] Fix | Delete
if (isset($advanced_options['seopress_advanced_advanced_trailingslash']) ) {
[664] Fix | Delete
$current_url = home_url(add_query_arg(array(), $wp->request));
[665] Fix | Delete
} else {
[666] Fix | Delete
$current_url = trailingslashit(home_url(add_query_arg(array(), $wp->request)));
[667] Fix | Delete
}
[668] Fix | Delete
if (is_search()) {
[669] Fix | Delete
$seopress_social_og_url = '<meta property="og:url" content="'.esc_url(htmlspecialchars(urldecode(get_home_url().'/search/'.get_search_query()))).'" />';
[670] Fix | Delete
} else {
[671] Fix | Delete
$seopress_social_og_url = '<meta property="og:url" content="'.esc_url(htmlspecialchars(urldecode($current_url),ENT_COMPAT, 'UTF-8')).'" />';
[672] Fix | Delete
}
[673] Fix | Delete
//Hook on post OG URL - 'seopress_social_og_url'
[674] Fix | Delete
if (has_filter('seopress_social_og_url')) {
[675] Fix | Delete
$seopress_social_og_url = apply_filters('seopress_social_og_url', $seopress_social_og_url);
[676] Fix | Delete
}
[677] Fix | Delete
echo $seopress_social_og_url."\n"; // escaped above
[678] Fix | Delete
}
[679] Fix | Delete
if (isset($options['seopress_social_facebook_og'])) {
[680] Fix | Delete
$seopress_social_og_site_name = '<meta property="og:site_name" content="'.esc_html(get_bloginfo('name')).'" />';
[681] Fix | Delete
//Hook on post OG site name - 'seopress_social_og_site_name'
[682] Fix | Delete
if (has_filter('seopress_social_og_site_name')) {
[683] Fix | Delete
$seopress_social_og_site_name = apply_filters('seopress_social_og_site_name', $seopress_social_og_site_name);
[684] Fix | Delete
}
[685] Fix | Delete
echo $seopress_social_og_site_name."\n"; // escaped above
[686] Fix | Delete
}
[687] Fix | Delete
if (isset($options['seopress_social_facebook_og'])) {
[688] Fix | Delete
$seopress_social_og_locale = '<meta property="og:locale" content="'.esc_attr(get_locale()).'" />';
[689] Fix | Delete
//Polylang
[690] Fix | Delete
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
[691] Fix | Delete
if ( is_plugin_active( 'polylang/polylang.php' ) || is_plugin_active( 'polylang-pro/polylang.php' )) {
[692] Fix | Delete
//@credits Polylang
[693] Fix | Delete
if (did_action('pll_init') && function_exists('PLL')) {
[694] Fix | Delete
$alternates = array();
[695] Fix | Delete
[696] Fix | Delete
foreach ( PLL()->model->get_languages_list() as $language ) {
[697] Fix | Delete
if ( PLL()->curlang->slug !== $language->slug && PLL()->links->get_translation_url( $language ) && isset( $language->facebook ) ) {
[698] Fix | Delete
$alternates[] = $language->facebook;
[699] Fix | Delete
}
[700] Fix | Delete
}
[701] Fix | Delete
// There is a risk that 2 languages have the same Facebook locale. So let's make sure to output each locale only once.
[702] Fix | Delete
$alternates = array_unique( $alternates );
[703] Fix | Delete
[704] Fix | Delete
foreach ( $alternates as $lang ) {
[705] Fix | Delete
$seopress_social_og_locale .= "\n";
[706] Fix | Delete
$seopress_social_og_locale .= '<meta property="og:locale:alternate" content="'.esc_attr($lang).'" />';
[707] Fix | Delete
}
[708] Fix | Delete
}
[709] Fix | Delete
}
[710] Fix | Delete
//Hook on post OG locale - 'seopress_social_og_locale'
[711] Fix | Delete
if (has_filter('seopress_social_og_locale')) {
[712] Fix | Delete
$seopress_social_og_locale = apply_filters('seopress_social_og_locale', $seopress_social_og_locale);
[713] Fix | Delete
}
[714] Fix | Delete
if (isset($seopress_social_og_locale) && $seopress_social_og_locale !='') {
[715] Fix | Delete
echo $seopress_social_og_locale."\n"; // escaped above
[716] Fix | Delete
}
[717] Fix | Delete
}
[718] Fix | Delete
if (isset($options['seopress_social_facebook_og'])) {
[719] Fix | Delete
if (is_home() || is_front_page()) {
[720] Fix | Delete
$seopress_social_og_type = '<meta property="og:type" content="website" />';
[721] Fix | Delete
} elseif (is_singular('product') || is_singular('download')) {
[722] Fix | Delete
$seopress_social_og_type = '<meta property="og:type" content="product" />';
[723] Fix | Delete
} elseif (is_singular()) {
[724] Fix | Delete
global $post;
[725] Fix | Delete
$seopress_video_disabled = get_post_meta($post->ID,'_seopress_video_disabled', true);
[726] Fix | Delete
$seopress_video = get_post_meta($post->ID,'_seopress_video');
[727] Fix | Delete
[728] Fix | Delete
if (!empty($seopress_video[0][0]['url']) && $seopress_video_disabled =='') {
[729] Fix | Delete
$seopress_social_og_type = '<meta property="og:type" content="video.other" />';
[730] Fix | Delete
} else {
[731] Fix | Delete
$seopress_social_og_type = '<meta property="og:type" content="article" />';
[732] Fix | Delete
}
[733] Fix | Delete
}
[734] Fix | Delete
elseif (is_search() || is_archive() || is_404()) {
[735] Fix | Delete
$seopress_social_og_type = '<meta property="og:type" content="object" />';
[736] Fix | Delete
}
[737] Fix | Delete
if (isset($seopress_social_og_type)) {
[738] Fix | Delete
//Hook on post OG type - 'seopress_social_og_type'
[739] Fix | Delete
if (has_filter('seopress_social_og_type')) {
[740] Fix | Delete
$seopress_social_og_type = apply_filters('seopress_social_og_type', $seopress_social_og_type);
[741] Fix | Delete
}
[742] Fix | Delete
echo $seopress_social_og_type."\n"; // escaped above
[743] Fix | Delete
}
[744] Fix | Delete
}
[745] Fix | Delete
if ( isset($options['seopress_social_facebook_og']) && ( isset($options['seopress_social_accounts_facebook']) && '' != $options['seopress_social_accounts_facebook'] ) ) {
[746] Fix | Delete
if (is_singular() && !is_home() && !is_front_page()) {
[747] Fix | Delete
global $post;
[748] Fix | Delete
$seopress_video_disabled = get_post_meta($post->ID,'_seopress_video_disabled', true);
[749] Fix | Delete
$seopress_video = get_post_meta($post->ID,'_seopress_video');
[750] Fix | Delete
[751] Fix | Delete
if (!empty($seopress_video[0][0]['url']) && $seopress_video_disabled =='') {
[752] Fix | Delete
//do nothing
[753] Fix | Delete
} else {
[754] Fix | Delete
$seopress_social_og_author = '<meta property="article:author" content="'.esc_url($options['seopress_social_accounts_facebook']).'" />';
[755] Fix | Delete
$seopress_social_og_author .= "\n";
[756] Fix | Delete
$seopress_social_og_author .= '<meta property="article:publisher" content="'.esc_url($options['seopress_social_accounts_facebook']).'" />';
[757] Fix | Delete
}
[758] Fix | Delete
}
[759] Fix | Delete
if (isset($seopress_social_og_author)) {
[760] Fix | Delete
//Hook on post OG author - 'seopress_social_og_author'
[761] Fix | Delete
if (has_filter('seopress_social_og_author')) {
[762] Fix | Delete
$seopress_social_og_author = apply_filters('seopress_social_og_author', $seopress_social_og_author);
[763] Fix | Delete
}
[764] Fix | Delete
echo $seopress_social_og_author."\n"; // escaped above
[765] Fix | Delete
}
[766] Fix | Delete
}
[767] Fix | Delete
if (isset($options['seopress_social_facebook_og'])) {
[768] Fix | Delete
$title = '';
[769] Fix | Delete
$title = ampforwp_get_seopress_title();
[770] Fix | Delete
if ( is_home() && '' != get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_title',true) ){
[771] Fix | Delete
$title = get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_title',true);
[772] Fix | Delete
}
[773] Fix | Delete
if ((is_tax() || is_category() || is_tag()) && '' != get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_title',true) ) {
[774] Fix | Delete
$title = get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_title',true);
[775] Fix | Delete
}
[776] Fix | Delete
if ( '' != get_post_meta($post_id,'_seopress_social_fb_title',true) ){
[777] Fix | Delete
$title = get_post_meta($post_id,'_seopress_social_fb_title',true);
[778] Fix | Delete
}
[779] Fix | Delete
if ( '' == $title && '' != get_the_title() ){
[780] Fix | Delete
$title = get_the_title();
[781] Fix | Delete
}
[782] Fix | Delete
$seopress_social_og_title .= '<meta property="og:title" content="'.esc_attr($title).'" />';
[783] Fix | Delete
$seopress_social_og_title .= "\n";
[784] Fix | Delete
//Hook on post OG title - 'seopress_social_og_title'
[785] Fix | Delete
if (has_filter('seopress_social_og_title')) {
[786] Fix | Delete
$seopress_social_og_title = apply_filters('seopress_social_og_title', $seopress_social_og_title);
[787] Fix | Delete
}
[788] Fix | Delete
if (isset($seopress_social_og_title) && $seopress_social_og_title !='') {
[789] Fix | Delete
echo $seopress_social_og_title; // escaped above
[790] Fix | Delete
}
[791] Fix | Delete
}
[792] Fix | Delete
[793] Fix | Delete
if (isset($options['seopress_social_facebook_og'])) {
[794] Fix | Delete
$description = ampforwp_generate_meta_desc();
[795] Fix | Delete
if ( is_home() && '' != get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_desc',true) ) {
[796] Fix | Delete
$description = get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_desc',true);
[797] Fix | Delete
}
[798] Fix | Delete
if (is_tax() || is_category() || is_tag() && '' != get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_desc',true) ) {
[799] Fix | Delete
$description = get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_desc',true);
[800] Fix | Delete
}
[801] Fix | Delete
if ( '' != get_post_meta($post_id,'_seopress_social_fb_desc',true) ) {
[802] Fix | Delete
$description = get_post_meta($post_id,'_seopress_social_fb_desc',true);
[803] Fix | Delete
}
[804] Fix | Delete
$seopress_social_og_desc .= '<meta property="og:description" content="'.esc_html($description).'" />';
[805] Fix | Delete
$seopress_social_og_desc .= "\n";
[806] Fix | Delete
//Hook on post OG description - 'seopress_social_og_desc'
[807] Fix | Delete
if (has_filter('seopress_social_og_desc')) {
[808] Fix | Delete
$seopress_social_og_desc = apply_filters('seopress_social_og_desc', $seopress_social_og_desc);
[809] Fix | Delete
}
[810] Fix | Delete
if (isset($seopress_social_og_desc) && $seopress_social_og_desc !='') {
[811] Fix | Delete
echo $seopress_social_og_desc; // escaped above
[812] Fix | Delete
}
[813] Fix | Delete
}
[814] Fix | Delete
if (isset($options['seopress_social_facebook_og'])) {
[815] Fix | Delete
$url = '';
[816] Fix | Delete
if ( ampforwp_is_home() && '' != get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_img',true) ){
[817] Fix | Delete
$url = get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_img',true);
[818] Fix | Delete
}
[819] Fix | Delete
if (is_tax() || is_category() || is_tag() && '' != get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_img',true) ) {
[820] Fix | Delete
$url = get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_img',true);
[821] Fix | Delete
}
[822] Fix | Delete
if ( '' != get_post_meta(ampforwp_get_the_ID(),'_seopress_social_fb_img',true) ) {
[823] Fix | Delete
$url = get_post_meta(ampforwp_get_the_ID(),'_seopress_social_fb_img',true);
[824] Fix | Delete
}
[825] Fix | Delete
if ( '' == $url && has_post_thumbnail() ) {
[826] Fix | Delete
$url = get_the_post_thumbnail_url();
[827] Fix | Delete
}
[828] Fix | Delete
if (function_exists('attachment_url_to_postid') || has_post_thumbnail(ampforwp_get_the_ID()) ) {
[829] Fix | Delete
$image_id = attachment_url_to_postid( $url );
[830] Fix | Delete
if(empty($image_id)){
[831] Fix | Delete
$image_id = get_post_thumbnail_id( ampforwp_get_the_ID() );
[832] Fix | Delete
}
[833] Fix | Delete
if ( !$image_id ){
[834] Fix | Delete
return;
[835] Fix | Delete
}
[836] Fix | Delete
[837] Fix | Delete
$image_src = wp_get_attachment_image_src( $image_id, 'full' );
[838] Fix | Delete
[839] Fix | Delete
//OG:IMAGE
[840] Fix | Delete
$seopress_social_og_img = '';
[841] Fix | Delete
$seopress_social_og_img .= '<meta property="og:image" content="'.esc_url($url).'" />';
[842] Fix | Delete
$seopress_social_og_img .= "\n";
[843] Fix | Delete
[844] Fix | Delete
//OG:IMAGE:SECURE_URL IF SSL
[845] Fix | Delete
if (is_ssl()) {
[846] Fix | Delete
$seopress_social_og_img .= '<meta property="og:image:secure_url" content="'.esc_url($url).'" />';
[847] Fix | Delete
$seopress_social_og_img .= "\n";
[848] Fix | Delete
}
[849] Fix | Delete
[850] Fix | Delete
//OG:IMAGE:WIDTH + OG:IMAGE:HEIGHT
[851] Fix | Delete
if (!empty($image_src)) {
[852] Fix | Delete
$seopress_social_og_img .= '<meta property="og:image:width" content="'.esc_attr($image_src[1]).'" />';
[853] Fix | Delete
$seopress_social_og_img .= "\n";
[854] Fix | Delete
$seopress_social_og_img .= '<meta property="og:image:height" content="'.esc_attr($image_src[2]).'" />';
[855] Fix | Delete
$seopress_social_og_img .= "\n";
[856] Fix | Delete
}
[857] Fix | Delete
[858] Fix | Delete
//OG:IMAGE:ALT
[859] Fix | Delete
if (get_post_meta($image_id, '_wp_attachment_image_alt', true) !='') {
[860] Fix | Delete
$seopress_social_og_img .= '<meta property="og:image:alt" content="'.esc_attr(get_post_meta($image_id, '_wp_attachment_image_alt', true)).'" />';
[861] Fix | Delete
$seopress_social_og_img .= "\n";
[862] Fix | Delete
}
[863] Fix | Delete
//Hook on post OG thumbnail - 'seopress_social_og_thumb'
[864] Fix | Delete
if (has_filter('seopress_social_og_thumb')) {
[865] Fix | Delete
$seopress_social_og_img = apply_filters('seopress_social_og_thumb', $seopress_social_og_img);
[866] Fix | Delete
}
[867] Fix | Delete
if (isset($seopress_social_og_img) && $seopress_social_og_img !='') {
[868] Fix | Delete
echo $seopress_social_og_img; // escaped above
[869] Fix | Delete
}
[870] Fix | Delete
}
[871] Fix | Delete
}
[872] Fix | Delete
if (isset($options['seopress_social_facebook_og']) && isset($options['seopress_social_facebook_link_ownership_id'])) {
[873] Fix | Delete
$seopress_social_link_ownership_id = '<meta property="fb:pages" content="'.esc_attr($options['seopress_social_facebook_link_ownership_id']).'" />';
[874] Fix | Delete
echo $seopress_social_link_ownership_id."\n"; // escaped above
[875] Fix | Delete
}
[876] Fix | Delete
if (isset($options['seopress_social_facebook_og']) && isset($options['seopress_social_facebook_link_ownership_id']) ) {
[877] Fix | Delete
$seopress_social_admin_id = '<meta property="fb:admins" content="'.esc_attr($options['seopress_social_facebook_admin_id']).'" />';
[878] Fix | Delete
echo $seopress_social_admin_id."\n"; // escaped above
[879] Fix | Delete
}
[880] Fix | Delete
if (isset($options['seopress_social_facebook_og']) && isset($options['seopress_social_facebook_link_ownership_id']) ) {
[881] Fix | Delete
$seopress_social_app_id = '<meta property="fb:app_id" content="'.esc_attr($options['seopress_social_facebook_app_id']).'" />';
[882] Fix | Delete
echo $seopress_social_app_id."\n"; // escaped above
[883] Fix | Delete
}
[884] Fix | Delete
if (isset($options['seopress_social_twitter_card'])) {
[885] Fix | Delete
if ( isset($options['seopress_social_twitter_card_img_size']) && $options['seopress_social_twitter_card_img_size'] =='large') {
[886] Fix | Delete
$seopress_social_twitter_card_summary = '<meta name="twitter:card" content="summary_large_image">';
[887] Fix | Delete
} else {
[888] Fix | Delete
$seopress_social_twitter_card_summary = '<meta name="twitter:card" content="summary" />';
[889] Fix | Delete
}
[890] Fix | Delete
//Hook on post Twitter card summary - 'seopress_social_twitter_card_summary'
[891] Fix | Delete
if (has_filter('seopress_social_twitter_card_summary')) {
[892] Fix | Delete
$seopress_social_twitter_card_summary = apply_filters('seopress_social_twitter_card_summary', $seopress_social_twitter_card_summary);
[893] Fix | Delete
}
[894] Fix | Delete
echo $seopress_social_twitter_card_summary."\n"; // escaped above
[895] Fix | Delete
}
[896] Fix | Delete
if (isset($options['seopress_social_twitter_card']) && isset($options['seopress_social_accounts_twitter']) ) {
[897] Fix | Delete
$seopress_social_twitter_card_site = '<meta name="twitter:site" content="'.esc_attr($options['seopress_social_accounts_twitter']).'" />';
[898] Fix | Delete
//Hook on post Twitter card site - 'seopress_social_twitter_card_site'
[899] Fix | Delete
if (has_filter('seopress_social_twitter_card_site')) {
[900] Fix | Delete
$seopress_social_twitter_card_site = apply_filters('seopress_social_twitter_card_site', $seopress_social_twitter_card_site);
[901] Fix | Delete
}
[902] Fix | Delete
echo $seopress_social_twitter_card_site."\n"; // escaped above
[903] Fix | Delete
}
[904] Fix | Delete
if (isset($options['seopress_social_twitter_card'])) {
[905] Fix | Delete
//Init
[906] Fix | Delete
$seopress_social_twitter_card_creator ='';
[907] Fix | Delete
if ($options['seopress_social_twitter_card'] =='1' && get_the_author_meta('twitter') ) {
[908] Fix | Delete
[909] Fix | Delete
$seopress_social_twitter_card_creator .= '<meta name="twitter:creator" content="@'.esc_attr(get_the_author_meta('twitter')).'" />';
[910] Fix | Delete
[911] Fix | Delete
} elseif ($options['seopress_social_twitter_card'] =='1' && isset($options['seopress_social_accounts_twitter']) && $options['seopress_social_accounts_twitter'] !='' ) {
[912] Fix | Delete
$seopress_social_twitter_card_creator .= '<meta name="twitter:creator" content="'.esc_attr($options['seopress_social_accounts_twitter']).'" />';
[913] Fix | Delete
}
[914] Fix | Delete
//Hook on post Twitter card creator - 'seopress_social_twitter_card_creator'
[915] Fix | Delete
if (has_filter('seopress_social_twitter_card_creator')) {
[916] Fix | Delete
$seopress_social_twitter_card_creator = apply_filters('seopress_social_twitter_card_creator', $seopress_social_twitter_card_creator);
[917] Fix | Delete
}
[918] Fix | Delete
if (isset($seopress_social_twitter_card_creator) && $seopress_social_twitter_card_creator !='') {
[919] Fix | Delete
echo $seopress_social_twitter_card_creator."\n"; // escaped above
[920] Fix | Delete
}
[921] Fix | Delete
}
[922] Fix | Delete
if (isset($options['seopress_social_twitter_card'])) {
[923] Fix | Delete
$title = $seopress_social_twitter_card_title = '';
[924] Fix | Delete
$title = ampforwp_get_seopress_title();
[925] Fix | Delete
if ( is_home() && '' != get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_twitter_title',true) ){
[926] Fix | Delete
$title = get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_twitter_title',true);
[927] Fix | Delete
}elseif ( is_home() && '' != get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_title',true) ){
[928] Fix | Delete
$title = get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_title',true);
[929] Fix | Delete
}
[930] Fix | Delete
if ((is_tax() || is_category() || is_tag()) && '' != get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_twitter_title',true) ) {
[931] Fix | Delete
$title = get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_twitter_title',true);
[932] Fix | Delete
}elseif ((is_tax() || is_category() || is_tag()) && '' != get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_title',true) ) {
[933] Fix | Delete
$title = get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_title',true);
[934] Fix | Delete
}
[935] Fix | Delete
if ( '' != get_post_meta(ampforwp_get_the_ID(),'_seopress_social_twitter_title',true) ){
[936] Fix | Delete
$title = get_post_meta(ampforwp_get_the_ID(),'_seopress_social_twitter_title',true);
[937] Fix | Delete
}elseif ( '' != get_post_meta($post_id,'_seopress_social_fb_title',true) ){
[938] Fix | Delete
$title = get_post_meta($post_id,'_seopress_social_fb_title',true);
[939] Fix | Delete
}
[940] Fix | Delete
if ( '' == $title && '' != get_the_title() ){
[941] Fix | Delete
$title = get_the_title();
[942] Fix | Delete
}
[943] Fix | Delete
$seopress_social_twitter_card_title .= '<meta name="twitter:title" content="'.esc_attr($title).'" />';
[944] Fix | Delete
//Hook on post Twitter card title - 'seopress_social_twitter_card_title'
[945] Fix | Delete
if (has_filter('seopress_social_twitter_card_title')) {
[946] Fix | Delete
$seopress_social_twitter_card_title = apply_filters('seopress_social_twitter_card_title', $seopress_social_twitter_card_title);
[947] Fix | Delete
}
[948] Fix | Delete
if (isset($seopress_social_twitter_card_title) && $seopress_social_twitter_card_title !='') {
[949] Fix | Delete
echo $seopress_social_twitter_card_title."\n"; // escaped above
[950] Fix | Delete
}
[951] Fix | Delete
}
[952] Fix | Delete
if (isset($options['seopress_social_twitter_card'])) {
[953] Fix | Delete
$seopress_social_twitter_card_desc = $description = '';
[954] Fix | Delete
$description = ampforwp_generate_meta_desc();
[955] Fix | Delete
if ( is_home() && '' != get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_twitter_desc',true) ) {
[956] Fix | Delete
$description = get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_twitter_desc',true);
[957] Fix | Delete
}elseif ( is_home() && '' != get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_desc',true) ) {
[958] Fix | Delete
$description = get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_desc',true);
[959] Fix | Delete
}
[960] Fix | Delete
if (is_tax() || is_category() || is_tag() && '' != get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_twitter_desc',true) ) {
[961] Fix | Delete
$description = get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_twitter_desc',true);
[962] Fix | Delete
}elseif (is_tax() || is_category() || is_tag() && '' != get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_desc',true) ) {
[963] Fix | Delete
$description = get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_desc',true);
[964] Fix | Delete
}
[965] Fix | Delete
[966] Fix | Delete
if ( '' != get_post_meta(ampforwp_get_the_ID(),'_seopress_social_twitter_desc',true) ) {
[967] Fix | Delete
$description = get_post_meta(ampforwp_get_the_ID(),'_seopress_social_twitter_desc',true);
[968] Fix | Delete
}elseif ( '' != get_post_meta(ampforwp_get_the_ID(),'_seopress_social_fb_desc',true) ) {
[969] Fix | Delete
$description = get_post_meta(ampforwp_get_the_ID(),'_seopress_social_fb_desc',true);
[970] Fix | Delete
}
[971] Fix | Delete
$seopress_social_twitter_card_desc .= '<meta name="twitter:description" content="'.esc_html($description).'" />';
[972] Fix | Delete
//Hook on post Twitter card description - 'seopress_social_twitter_card_desc'
[973] Fix | Delete
if (has_filter('seopress_social_twitter_card_desc')) {
[974] Fix | Delete
$seopress_social_twitter_card_desc = apply_filters('seopress_social_twitter_card_desc', $seopress_social_twitter_card_desc);
[975] Fix | Delete
}
[976] Fix | Delete
if (isset($seopress_social_twitter_card_desc) && $seopress_social_twitter_card_desc !='') {
[977] Fix | Delete
echo $seopress_social_twitter_card_desc."\n"; // escaped above
[978] Fix | Delete
}
[979] Fix | Delete
}
[980] Fix | Delete
if (isset($options['seopress_social_twitter_card'])) {
[981] Fix | Delete
$url = '';
[982] Fix | Delete
if ( ampforwp_is_home() && '' != get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_twitter_img',true) ){
[983] Fix | Delete
$url = get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_twitter_img',true);
[984] Fix | Delete
}elseif ( ampforwp_is_home() && '' != get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_img',true) ){
[985] Fix | Delete
$url = get_post_meta(get_option( 'page_for_posts' ),'_seopress_social_fb_img',true);
[986] Fix | Delete
}
[987] Fix | Delete
if (is_tax() || is_category() || is_tag() && '' != get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_twitter_img',true) ) {
[988] Fix | Delete
$url = get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_twitter_img',true);
[989] Fix | Delete
}elseif (is_tax() || is_category() || is_tag() && '' != get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_img',true) ) {
[990] Fix | Delete
$url = get_term_meta(get_queried_object()->{'term_id'},'_seopress_social_fb_img',true);
[991] Fix | Delete
}
[992] Fix | Delete
if ( '' != get_post_meta(ampforwp_get_the_ID(),'_seopress_social_twitter_img',true) ) {
[993] Fix | Delete
$url = get_post_meta(ampforwp_get_the_ID(),'_seopress_social_twitter_img',true);
[994] Fix | Delete
}elseif ( '' != get_post_meta(ampforwp_get_the_ID(),'_seopress_social_fb_img',true) ) {
[995] Fix | Delete
$url = get_post_meta(ampforwp_get_the_ID(),'_seopress_social_fb_img',true);
[996] Fix | Delete
}
[997] Fix | Delete
if ( '' == $url && has_post_thumbnail() ) {
[998] Fix | Delete
$url = get_the_post_thumbnail_url();
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function