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/custom-t.../views/admin
File: more-social-feeds.php
<div class="ctf_more_plugins" id="ctf-admin-about">
[0] Fix | Delete
[1] Fix | Delete
<div class="ctf-more-plugins-intro">
[2] Fix | Delete
<h3><?php _e( "Here's some more <span>free</span> plugins you might like!", 'custom-twitter-feeds' ); ?></h3>
[3] Fix | Delete
<p><?php _e( "As you're already using one of our free plugins we thought we'd suggest some others you might like to. Check out our other free plugins below:", 'custom-twitter-feeds' ); ?></p>
[4] Fix | Delete
</div>
[5] Fix | Delete
[6] Fix | Delete
<?php function get_am_plugins() {
[7] Fix | Delete
[8] Fix | Delete
$images_url = CTF_PLUGIN_URL . 'img/about/';
[9] Fix | Delete
[10] Fix | Delete
return array(
[11] Fix | Delete
'instagram-feed/instagram-feed.php' => array(
[12] Fix | Delete
'icon' => $images_url . 'plugin-if.png',
[13] Fix | Delete
'name' => esc_html__( 'Instagram Feed', 'custom-twitter-feeds' ),
[14] Fix | Delete
'desc' => esc_html__( 'Instagram Feed is a clean and beautiful way to add your Instagram posts to your website. Grab your visitors attention and keep them engaged with your site longer.', 'custom-twitter-feeds' ),
[15] Fix | Delete
'url' => 'https://downloads.wordpress.org/plugin/instagram-feed.zip',
[16] Fix | Delete
'pro' => array(
[17] Fix | Delete
'plug' => 'instagram-feed-pro/instagram-feed.php',
[18] Fix | Delete
'icon' => $images_url . 'plugin-if.png',
[19] Fix | Delete
'name' => esc_html__( 'Instagram Feed Pro', 'custom-twitter-feeds' ),
[20] Fix | Delete
'desc' => esc_html__( 'Instagram Feed is a clean and beautiful way to add your Instagram posts to your website. Grab your visitors attention and keep them engaged with your site longer.', 'custom-twitter-feeds' ),
[21] Fix | Delete
'url' => 'https://smashballoon.com/instagram-feed/?utm_campaign=twitter-free&utm_source=cross&utm_medium=ctfinstaller',
[22] Fix | Delete
'act' => 'go-to-url',
[23] Fix | Delete
),
[24] Fix | Delete
),
[25] Fix | Delete
'custom-facebook-feed/custom-facebook-feed.php' => array(
[26] Fix | Delete
'icon' => $images_url . 'plugin-fb.png',
[27] Fix | Delete
'name' => esc_html__( 'Custom Facebook Feed', 'custom-twitter-feeds' ),
[28] Fix | Delete
'desc' => esc_html__( 'Custom Facebook Feed makes displaying your Facebook posts easy. Keep your site visitors informed and increase engagement with your Facebook page by displaying a feed on your website.', 'custom-twitter-feeds' ),
[29] Fix | Delete
'url' => 'https://downloads.wordpress.org/plugin/custom-facebook-feed.zip',
[30] Fix | Delete
'pro' => array(
[31] Fix | Delete
'plug' => 'custom-facebook-feed-pro/custom-facebook-feed.php',
[32] Fix | Delete
'icon' => $images_url . 'plugin-fb.png',
[33] Fix | Delete
'name' => esc_html__( 'Custom Facebook Feed Pro', 'custom-twitter-feeds' ),
[34] Fix | Delete
'desc' => esc_html__( 'Custom Facebook Feed makes displaying your Facebook posts easy. Keep your site visitors informed and increase engagement with your Facebook page by displaying a feed on your website.', 'custom-twitter-feeds' ),
[35] Fix | Delete
'url' => 'https://smashballoon.com/custom-facebook-feed/?utm_campaign=twitter-free&utm_source=cross&utm_medium=ctfinstaller',
[36] Fix | Delete
'act' => 'go-to-url',
[37] Fix | Delete
)
[38] Fix | Delete
),
[39] Fix | Delete
[40] Fix | Delete
'custom-twitter-feeds/custom-twitter-feed.php' => array(
[41] Fix | Delete
'icon' => $images_url . 'plugin-tw.jpg',
[42] Fix | Delete
'name' => esc_html__( 'Custom Twitter Feeds', 'custom-twitter-feeds' ),
[43] Fix | Delete
'desc' => esc_html__( 'Custom Twitter Feeds is a highly customizable way to display tweets from your Twitter account. Promote your latest content and update your site content automatically.', 'custom-twitter-feeds' ),
[44] Fix | Delete
'url' => 'https://downloads.wordpress.org/plugin/custom-twitter-feeds.zip',
[45] Fix | Delete
'pro' => array(
[46] Fix | Delete
'plug' => 'custom-twitter-feeds-pro/custom-twitter-feed.php',
[47] Fix | Delete
'icon' => $images_url . 'plugin-tw.jpg',
[48] Fix | Delete
'name' => esc_html__( 'Custom Twitter Feeds Pro', 'custom-twitter-feeds' ),
[49] Fix | Delete
'desc' => esc_html__( 'Custom Twitter Feeds is a highly customizable way to display tweets from your Twitter account. Promote your latest content and update your site content automatically.', 'custom-twitter-feeds' ),
[50] Fix | Delete
'url' => 'https://smashballoon.com/custom-twitter-feeds/?utm_campaign=twitter-free&utm_source=cross&utm_medium=ctfinstaller',
[51] Fix | Delete
'act' => 'go-to-url',
[52] Fix | Delete
)
[53] Fix | Delete
),
[54] Fix | Delete
[55] Fix | Delete
'feeds-for-youtube/youtube-feed.php' => array(
[56] Fix | Delete
'icon' => $images_url . 'plugin-yt.png',
[57] Fix | Delete
'name' => esc_html__( 'Feeds for YouTube', 'custom-twitter-feeds' ),
[58] Fix | Delete
'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'custom-twitter-feeds' ),
[59] Fix | Delete
'url' => 'https://downloads.wordpress.org/plugin/feeds-for-youtube.zip',
[60] Fix | Delete
'pro' => array(
[61] Fix | Delete
'plug' => 'youtube-feed-pro/youtube-feed.php',
[62] Fix | Delete
'icon' => $images_url . 'plugin-yt.png',
[63] Fix | Delete
'name' => esc_html__( 'Feeds for YouTube Pro', 'custom-twitter-feeds' ),
[64] Fix | Delete
'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'custom-twitter-feeds' ),
[65] Fix | Delete
'url' => 'https://smashballoon.com/youtube-feed/?utm_campaign=twitter-free&utm_source=cross&utm_medium=sbyinstaller',
[66] Fix | Delete
'act' => 'go-to-url',
[67] Fix | Delete
)
[68] Fix | Delete
),
[69] Fix | Delete
);
[70] Fix | Delete
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
function output_about_addons() {
[74] Fix | Delete
[75] Fix | Delete
if ( version_compare( PHP_VERSION, '5.3.0' ) <= 0
[76] Fix | Delete
|| version_compare( get_bloginfo('version'), '4.6' , '<' ) ){
[77] Fix | Delete
return;
[78] Fix | Delete
}
[79] Fix | Delete
[80] Fix | Delete
$all_plugins = get_plugins();
[81] Fix | Delete
$am_plugins = get_am_plugins();
[82] Fix | Delete
$has_all_plugins = true;
[83] Fix | Delete
[84] Fix | Delete
?>
[85] Fix | Delete
<div id="ctf-admin-addons">
[86] Fix | Delete
<div class="addons-container">
[87] Fix | Delete
<?php
[88] Fix | Delete
foreach ( $am_plugins as $plugin => $details ) :
[89] Fix | Delete
[90] Fix | Delete
$free_only = true;
[91] Fix | Delete
$plugin_data = get_the_plugin_data( $plugin, $details, $all_plugins, $free_only );
[92] Fix | Delete
$plugin_slug = strtolower( str_replace( ' ', '_', $plugin_data['details']['name'] ) );
[93] Fix | Delete
[94] Fix | Delete
//Only show the plugin if both free/pro versions aren't already active
[95] Fix | Delete
isset( $plugin_data['details']['plug'] ) ? $pro_plugin_source = $plugin_data['details']['plug'] : $pro_plugin_source = '';
[96] Fix | Delete
[97] Fix | Delete
if( !is_plugin_active( $plugin ) && !is_plugin_active( $pro_plugin_source ) ){
[98] Fix | Delete
$has_all_plugins = false;
[99] Fix | Delete
?>
[100] Fix | Delete
<div class="addon-container" id="install_<?php echo $plugin_slug; ?>">
[101] Fix | Delete
<div class="addon-item">
[102] Fix | Delete
<div class="details ctf-clear">
[103] Fix | Delete
<img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
[104] Fix | Delete
<h5 class="addon-name">
[105] Fix | Delete
<?php echo esc_html( $plugin_data['details']['name'] ); ?>
[106] Fix | Delete
</h5>
[107] Fix | Delete
<p class="addon-desc">
[108] Fix | Delete
<?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
[109] Fix | Delete
</p>
[110] Fix | Delete
</div>
[111] Fix | Delete
<div class="actions ctf-clear">
[112] Fix | Delete
<div class="status">
[113] Fix | Delete
<strong>
[114] Fix | Delete
<?php _e( 'Price:', 'custom-twitter-feeds' );
[115] Fix | Delete
echo ' <span style="color: green;">';
[116] Fix | Delete
_e( 'Free', 'custom-twitter-feeds' );
[117] Fix | Delete
echo '</span>'; ?>
[118] Fix | Delete
</strong>
[119] Fix | Delete
</div>
[120] Fix | Delete
<div class="action-button">
[121] Fix | Delete
<button class="<?php echo esc_attr( $plugin_data['action_class'] ); ?>" data-plugin="<?php echo esc_attr( $plugin_data['plugin_src'] ); ?>" data-type="plugin">
[122] Fix | Delete
<?php echo wp_kses_post( $plugin_data['action_text'] ); ?>
[123] Fix | Delete
</button>
[124] Fix | Delete
</div>
[125] Fix | Delete
</div>
[126] Fix | Delete
</div>
[127] Fix | Delete
</div>
[128] Fix | Delete
[129] Fix | Delete
<?php } ?>
[130] Fix | Delete
[131] Fix | Delete
<?php endforeach;
[132] Fix | Delete
[133] Fix | Delete
if( $has_all_plugins == true ){ ?>
[134] Fix | Delete
[135] Fix | Delete
<style type="text/css">.ctf-more-plugins-intro{display:none;}</style>
[136] Fix | Delete
<h2><?php _e( 'You already have all of our free plugins. Awesome!', 'custom-twitter-feeds' ); ?></h2>
[137] Fix | Delete
[138] Fix | Delete
<p><?php _e( 'Thank you so much for using our plugins. We appreciate you trusting us to power your social media feeds.', 'custom-twitter-feeds' ); ?></p>
[139] Fix | Delete
<p><?php _e( 'If you want to support us in our mission to make bringing social media content to your website both easy and reliable, then consider upgrading to one of our Pro plugins.', 'custom-twitter-feeds' ); ?></p>
[140] Fix | Delete
[141] Fix | Delete
<div class="ctf-cols-4">
[142] Fix | Delete
<?php //Show a list of Pro plugins which aren't currently active ?>
[143] Fix | Delete
<?php foreach ( $am_plugins as $plugin => $details ) :
[144] Fix | Delete
[145] Fix | Delete
$plugin_data = get_the_plugin_data( $plugin, $details, $all_plugins );
[146] Fix | Delete
$plugin_slug = strtolower( str_replace( ' ', '_', $plugin_data['details']['name'] ) );
[147] Fix | Delete
[148] Fix | Delete
isset( $plugin_data['details']['plug'] ) ? $pro_plugin_source = $plugin_data['details']['plug'] : $pro_plugin_source = '';
[149] Fix | Delete
if( !is_plugin_active( $pro_plugin_source ) ){
[150] Fix | Delete
?>
[151] Fix | Delete
[152] Fix | Delete
<div class="addon-container" id="install_<?php echo $plugin_slug; ?>">
[153] Fix | Delete
<div class="addon-item">
[154] Fix | Delete
<div class="details ctf-clear">
[155] Fix | Delete
<img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
[156] Fix | Delete
<h5 class="addon-name">
[157] Fix | Delete
<?php echo esc_html( $plugin_data['details']['name'] ); ?>
[158] Fix | Delete
</h5>
[159] Fix | Delete
<p class="addon-desc">
[160] Fix | Delete
<?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
[161] Fix | Delete
</p>
[162] Fix | Delete
</div>
[163] Fix | Delete
<div class="actions ctf-clear">
[164] Fix | Delete
<div class="action-button">
[165] Fix | Delete
<a href="<?php echo esc_attr( $details['pro']['url'] ); ?>" target="_blank" class="status-go-to-url button button-primary">
[166] Fix | Delete
<?php _e( 'Upgrade to Pro', 'custom-twitter-feeds' ); ?>
[167] Fix | Delete
</a>
[168] Fix | Delete
</div>
[169] Fix | Delete
</div>
[170] Fix | Delete
</div>
[171] Fix | Delete
</div>
[172] Fix | Delete
[173] Fix | Delete
<?php } ?>
[174] Fix | Delete
[175] Fix | Delete
<?php endforeach; ?>
[176] Fix | Delete
</div>
[177] Fix | Delete
[178] Fix | Delete
<?php } ?>
[179] Fix | Delete
[180] Fix | Delete
</div>
[181] Fix | Delete
</div>
[182] Fix | Delete
<?php
[183] Fix | Delete
}
[184] Fix | Delete
[185] Fix | Delete
[186] Fix | Delete
function get_the_plugin_data( $plugin, $details, $all_plugins, $free_only = false ) {
[187] Fix | Delete
[188] Fix | Delete
$have_pro = ( ! empty( $details['pro'] ) && ! empty( $details['pro']['plug'] ) );
[189] Fix | Delete
$show_pro = false;
[190] Fix | Delete
[191] Fix | Delete
$plugin_data = array();
[192] Fix | Delete
[193] Fix | Delete
if( $free_only ) $have_pro = false;
[194] Fix | Delete
[195] Fix | Delete
if ( $have_pro ) {
[196] Fix | Delete
if ( array_key_exists( $plugin, $all_plugins ) ) {
[197] Fix | Delete
if ( is_plugin_active( $plugin ) ) {
[198] Fix | Delete
$show_pro = true;
[199] Fix | Delete
}
[200] Fix | Delete
}
[201] Fix | Delete
if ( array_key_exists( $details['pro']['plug'], $all_plugins ) ) {
[202] Fix | Delete
$show_pro = true;
[203] Fix | Delete
}
[204] Fix | Delete
if ( $show_pro ) {
[205] Fix | Delete
$plugin = $details['pro']['plug'];
[206] Fix | Delete
$details = $details['pro'];
[207] Fix | Delete
}
[208] Fix | Delete
}
[209] Fix | Delete
[210] Fix | Delete
if( $free_only ) $show_pro = false;
[211] Fix | Delete
[212] Fix | Delete
if ( array_key_exists( $plugin, $all_plugins ) ) {
[213] Fix | Delete
if ( is_plugin_active( $plugin ) ) {
[214] Fix | Delete
// Status text/status.
[215] Fix | Delete
$plugin_data['status_class'] = 'status-active';
[216] Fix | Delete
$plugin_data['status_text'] = esc_html__( 'Active', 'custom-twitter-feeds' );
[217] Fix | Delete
// Button text/status.
[218] Fix | Delete
$plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary disabled';
[219] Fix | Delete
$plugin_data['action_text'] = esc_html__( 'Activated', 'custom-twitter-feeds' );
[220] Fix | Delete
$plugin_data['plugin_src'] = esc_attr( $plugin );
[221] Fix | Delete
} else {
[222] Fix | Delete
// Status text/status.
[223] Fix | Delete
$plugin_data['status_class'] = 'status-inactive';
[224] Fix | Delete
$plugin_data['status_text'] = esc_html__( 'Inactive', 'custom-twitter-feeds' );
[225] Fix | Delete
// Button text/status.
[226] Fix | Delete
$plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary';
[227] Fix | Delete
$plugin_data['action_text'] = esc_html__( 'Activate', 'custom-twitter-feeds' );
[228] Fix | Delete
$plugin_data['plugin_src'] = esc_attr( $plugin );
[229] Fix | Delete
}
[230] Fix | Delete
} else {
[231] Fix | Delete
// Doesn't exist, install.
[232] Fix | Delete
// Status text/status.
[233] Fix | Delete
$plugin_data['status_class'] = 'status-download';
[234] Fix | Delete
if ( isset( $details['act'] ) && 'go-to-url' === $details['act'] ) {
[235] Fix | Delete
$plugin_data['status_class'] = 'status-go-to-url';
[236] Fix | Delete
}
[237] Fix | Delete
$plugin_data['status_text'] = esc_html__( 'Not Installed', 'custom-twitter-feeds' );
[238] Fix | Delete
// Button text/status.
[239] Fix | Delete
$plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-primary';
[240] Fix | Delete
$plugin_data['action_text'] = esc_html__( 'Install Plugin', 'custom-twitter-feeds' );
[241] Fix | Delete
$plugin_data['plugin_src'] = esc_url( $details['url'] );
[242] Fix | Delete
}
[243] Fix | Delete
[244] Fix | Delete
$plugin_data['details'] = $details;
[245] Fix | Delete
[246] Fix | Delete
return $plugin_data;
[247] Fix | Delete
}
[248] Fix | Delete
[249] Fix | Delete
[250] Fix | Delete
output_about_addons();
[251] Fix | Delete
[252] Fix | Delete
?>
[253] Fix | Delete
<style>.ctf_quickstart, .ctf-pro-notice, .ctf_plugins_promo, .ctf_share_plugin{ display: none !Important; }</style>
[254] Fix | Delete
</div>
[255] Fix | Delete
[256] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function