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
/home/sportsfe.../httpdocs/wp-conte.../plugins/twitter-.../admin
File: menu.php
<?php
[0] Fix | Delete
if( !defined('ABSPATH') ){ exit();}
[1] Fix | Delete
add_action('admin_menu', 'xyz_twap_menu');
[2] Fix | Delete
[3] Fix | Delete
function xyz_twap_add_admin_scripts()
[4] Fix | Delete
{
[5] Fix | Delete
wp_enqueue_script('jquery');
[6] Fix | Delete
wp_register_script( 'xyz_notice_script_twap', plugins_url('twitter-auto-publish/js/notice.js') );
[7] Fix | Delete
wp_enqueue_script( 'xyz_notice_script_twap' );
[8] Fix | Delete
$twap_smapsolution_var="SMAPSolutions";
[9] Fix | Delete
$twap_xyzscripts_var="xyzscripts";
[10] Fix | Delete
wp_localize_script('xyz_notice_script_twap','xyz_script_twap_var',array(
[11] Fix | Delete
'alert1' => __('Please check whether the email is correct.','twitter-auto-publish'),
[12] Fix | Delete
'alert2' => __('Select atleast one list.','twitter-auto-publish'),
[13] Fix | Delete
'alert3' => __('You do not have sufficient permissions','twitter-auto-publish'),
[14] Fix | Delete
'html1' => sprintf(__('Account details successfully deleted from %s','twitter-auto-publish'),$twap_smapsolution_var),
[15] Fix | Delete
'html2' => sprintf(__('In-active Twitter account successfully deleted from %s','twitter-auto-publish'),$twap_smapsolution_var),
[16] Fix | Delete
'html3' => sprintf(__('Please connect your %s member account','twitter-auto-publish'),$twap_xyzscripts_var),
[17] Fix | Delete
'html4' => __('Thank you for enabling backlink !','twitter-auto-publish')
[18] Fix | Delete
));
[19] Fix | Delete
wp_register_style('xyz_twap_style', plugins_url('twitter-auto-publish/css/style.css'));
[20] Fix | Delete
wp_enqueue_style('xyz_twap_style');
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
add_action("admin_enqueue_scripts","xyz_twap_add_admin_scripts");
[24] Fix | Delete
[25] Fix | Delete
function xyz_twap_menu()
[26] Fix | Delete
{
[27] Fix | Delete
add_menu_page('Twitter Auto Publish - Manage settings', 'WP Twitter Auto Publish', 'manage_options', 'twitter-auto-publish-settings', 'xyz_twap_settings',plugin_dir_url( XYZ_TWAP_PLUGIN_FILE ) . 'images/twap.png');
[28] Fix | Delete
$page=add_submenu_page('twitter-auto-publish-settings', 'Twitter Auto Publish - Manage settings', __('Settings','twitter-auto-publish'), 'manage_options', 'twitter-auto-publish-settings' ,'xyz_twap_settings'); // 8 for admin
[29] Fix | Delete
if(get_option('xyz_twap_xyzscripts_hash_val')!='' && get_option('xyz_twap_xyzscripts_user_id')!='' && get_option('xyz_twap_smapsoln_userid') > 0)
[30] Fix | Delete
add_submenu_page('twitter-auto-publish-settings', 'Twitter Auto Publish - Manage Authorizations', __('Manage Authorizations','twitter-auto-publish'), 'manage_options', 'twitter-auto-publish-manage-authorizations' ,'xyz_twap_manage_authorizations');
[31] Fix | Delete
add_submenu_page('twitter-auto-publish-settings', 'Twitter Auto Publish - Logs', __('Logs','twitter-auto-publish'), 'manage_options', 'twitter-auto-publish-log' ,'xyz_twap_logs');
[32] Fix | Delete
add_submenu_page('twitter-auto-publish-settings', 'Twitter Auto Publish - About', __('About','twitter-auto-publish'), 'manage_options', 'twitter-auto-publish-about' ,'xyz_twap_about'); // 8 for admin
[33] Fix | Delete
add_submenu_page('twitter-auto-publish-settings','Twitter Auto Publish - Suggest Feature', __('Suggest a Feature','twitter-auto-publish'), 'manage_options', 'twitter-auto-publish-suggest-features' ,'xyz_twap_suggest_feature');
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
[37] Fix | Delete
function xyz_twap_settings()
[38] Fix | Delete
{
[39] Fix | Delete
$_POST = stripslashes_deep($_POST);
[40] Fix | Delete
$_GET = stripslashes_deep($_GET);
[41] Fix | Delete
$_POST = xyz_trim_deep($_POST);
[42] Fix | Delete
$_GET = xyz_trim_deep($_GET);
[43] Fix | Delete
[44] Fix | Delete
require( dirname( __FILE__ ) . '/header.php' );
[45] Fix | Delete
require( dirname( __FILE__ ) . '/settings.php' );
[46] Fix | Delete
require( dirname( __FILE__ ) . '/footer.php' );
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
function xyz_twap_manage_authorizations()
[50] Fix | Delete
{
[51] Fix | Delete
require( dirname( __FILE__ ) . '/header.php' );
[52] Fix | Delete
require( dirname( __FILE__ ) . '/manage-auth.php' );
[53] Fix | Delete
require( dirname( __FILE__ ) . '/footer.php' );
[54] Fix | Delete
}
[55] Fix | Delete
[56] Fix | Delete
function xyz_twap_about()
[57] Fix | Delete
{
[58] Fix | Delete
require( dirname( __FILE__ ) . '/header.php' );
[59] Fix | Delete
require( dirname( __FILE__ ) . '/about.php' );
[60] Fix | Delete
require( dirname( __FILE__ ) . '/footer.php' );
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
[64] Fix | Delete
function xyz_twap_suggest_feature()
[65] Fix | Delete
{
[66] Fix | Delete
require( dirname( __FILE__ ) . '/header.php' );
[67] Fix | Delete
require( dirname( __FILE__ ) . '/suggest_feature.php' );
[68] Fix | Delete
require( dirname( __FILE__ ) . '/footer.php' );
[69] Fix | Delete
}
[70] Fix | Delete
function xyz_twap_logs()
[71] Fix | Delete
{
[72] Fix | Delete
$_POST = stripslashes_deep($_POST);
[73] Fix | Delete
$_GET = stripslashes_deep($_GET);
[74] Fix | Delete
$_POST = xyz_trim_deep($_POST);
[75] Fix | Delete
$_GET = xyz_trim_deep($_GET);
[76] Fix | Delete
[77] Fix | Delete
require( dirname( __FILE__ ) . '/header.php' );
[78] Fix | Delete
require( dirname( __FILE__ ) . '/logs.php' );
[79] Fix | Delete
require( dirname( __FILE__ ) . '/footer.php' );
[80] Fix | Delete
}
[81] Fix | Delete
add_action('wp_head', 'xyz_smap_insert_twitter_card');
[82] Fix | Delete
function xyz_smap_insert_twitter_card(){
[83] Fix | Delete
global $post;
[84] Fix | Delete
if (empty($post))
[85] Fix | Delete
$post=get_post();
[86] Fix | Delete
if (!empty($post)){
[87] Fix | Delete
$postid= $post->ID;
[88] Fix | Delete
$name='';$excerpt='';$attachmenturl='';
[89] Fix | Delete
if(isset($postid) && $postid>0)
[90] Fix | Delete
{
[91] Fix | Delete
$get_post_meta_insert_twitter_card=0;
[92] Fix | Delete
$get_post_meta_future_data=get_post_meta($postid,"xyz_twap_future_to_publish",true);//echo "<pre>";print_r($get_post_meta_future_data);die;
[93] Fix | Delete
$xyz_smap_free_enforce_twitter_cards=get_option('xyz_smap_free_enforce_twitter_cards');
[94] Fix | Delete
$get_post_meta_insert_twitter_card=get_post_meta($postid,"xyz_twap_insert_twitter_card",true);
[95] Fix | Delete
if (!empty($get_post_meta_future_data) && ( $xyz_smap_free_enforce_twitter_cards==1 ))
[96] Fix | Delete
{
[97] Fix | Delete
$xyz_smap_apply_filters=get_option('xyz_smap_apply_filters');
[98] Fix | Delete
$ar2=explode(",",$xyz_smap_apply_filters);
[99] Fix | Delete
$excerpt = $post->post_excerpt;
[100] Fix | Delete
if(in_array(2, $ar2))
[101] Fix | Delete
$excerpt = apply_filters('the_excerpt', $excerpt);
[102] Fix | Delete
$excerpt = html_entity_decode($excerpt, ENT_QUOTES, get_bloginfo('charset'));
[103] Fix | Delete
$excerpt = preg_replace('/<script\b[^>]*>(.*?)<\/script>/is', "", $excerpt);
[104] Fix | Delete
if($excerpt=="")
[105] Fix | Delete
{
[106] Fix | Delete
$content = $post->post_content;
[107] Fix | Delete
if(in_array(1, $ar2))
[108] Fix | Delete
$content = apply_filters('the_content', $content);
[109] Fix | Delete
if($content!="")
[110] Fix | Delete
{
[111] Fix | Delete
$content1=$content;
[112] Fix | Delete
$content1=strip_tags($content1);
[113] Fix | Delete
$content1=strip_shortcodes($content1);
[114] Fix | Delete
$content1 = preg_replace('/<script\b[^>]*>(.*?)<\/script>/is', "", $content1);
[115] Fix | Delete
$content1= preg_replace("/\\[caption.*?\\].*?\\[.caption\\]/is", "", $content1);
[116] Fix | Delete
$content1 = preg_replace('/\[.+?\]/', '', $content1);
[117] Fix | Delete
$excerpt=implode(' ', array_slice(explode(' ', $content1), 0, 50));
[118] Fix | Delete
}
[119] Fix | Delete
}
[120] Fix | Delete
else
[121] Fix | Delete
{
[122] Fix | Delete
$excerpt=strip_tags($excerpt);
[123] Fix | Delete
$excerpt=strip_shortcodes($excerpt);
[124] Fix | Delete
} //print_r($excerpt);die;
[125] Fix | Delete
$excerpt=str_replace("&nbsp;","",$excerpt);
[126] Fix | Delete
//print_r($excerpt);die;
[127] Fix | Delete
$name = $post->post_title;//print_r($name);die;
[128] Fix | Delete
if(in_array(3, $ar2))
[129] Fix | Delete
$name = apply_filters('the_title', $name,$postid);
[130] Fix | Delete
$name = html_entity_decode($name, ENT_QUOTES, get_bloginfo('charset'));//print_r($name);die;
[131] Fix | Delete
$name=strip_tags($name);
[132] Fix | Delete
$name=strip_shortcodes($name);
[133] Fix | Delete
$attachmenturl=xyz_twap_getimage($postid, $post->post_content);
[134] Fix | Delete
if(is_array($attachmenturl) && isset($attachmenturl['image_url']) && $attachmenturl['image_url']!='')
[135] Fix | Delete
$attachmenturl=$attachmenturl['image_url'];//print_r($name);die;**/
[136] Fix | Delete
}
[137] Fix | Delete
if (($get_post_meta_insert_twitter_card==1) && strpos($_SERVER["HTTP_USER_AGENT"], "Twitterbot") !== false && ($xyz_smap_premium_add_tw_card==1))
[138] Fix | Delete
{
[139] Fix | Delete
echo '<meta name="twitter:card" content="summary_large_image" />';
[140] Fix | Delete
if(!empty( $name ))
[141] Fix | Delete
echo '<meta name="twitter:title" content="'.$name.'" />';
[142] Fix | Delete
if (!empty($excerpt))
[143] Fix | Delete
echo '<meta name="twitter:description" content="'.$excerpt.'" />';
[144] Fix | Delete
if(!empty($attachmenturl))
[145] Fix | Delete
echo '<meta name="twitter:image" content="'.$attachmenturl.'" />';
[146] Fix | Delete
}
[147] Fix | Delete
}
[148] Fix | Delete
}
[149] Fix | Delete
}
[150] Fix | Delete
?>
[151] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function