: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<div class="ctf_more_plugins" id="ctf-admin-about">
<div class="ctf-more-plugins-intro">
<h3><?php _e( "Here's some more <span>free</span> plugins you might like!", 'custom-twitter-feeds' ); ?></h3>
<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>
<?php function get_am_plugins() {
$images_url = CTF_PLUGIN_URL . 'img/about/';
'instagram-feed/instagram-feed.php' => array(
'icon' => $images_url . 'plugin-if.png',
'name' => esc_html__( 'Instagram Feed', 'custom-twitter-feeds' ),
'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' ),
'url' => 'https://downloads.wordpress.org/plugin/instagram-feed.zip',
'plug' => 'instagram-feed-pro/instagram-feed.php',
'icon' => $images_url . 'plugin-if.png',
'name' => esc_html__( 'Instagram Feed Pro', 'custom-twitter-feeds' ),
'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' ),
'url' => 'https://smashballoon.com/instagram-feed/?utm_campaign=twitter-free&utm_source=cross&utm_medium=ctfinstaller',
'custom-facebook-feed/custom-facebook-feed.php' => array(
'icon' => $images_url . 'plugin-fb.png',
'name' => esc_html__( 'Custom Facebook Feed', 'custom-twitter-feeds' ),
'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' ),
'url' => 'https://downloads.wordpress.org/plugin/custom-facebook-feed.zip',
'plug' => 'custom-facebook-feed-pro/custom-facebook-feed.php',
'icon' => $images_url . 'plugin-fb.png',
'name' => esc_html__( 'Custom Facebook Feed Pro', 'custom-twitter-feeds' ),
'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' ),
'url' => 'https://smashballoon.com/custom-facebook-feed/?utm_campaign=twitter-free&utm_source=cross&utm_medium=ctfinstaller',
'custom-twitter-feeds/custom-twitter-feed.php' => array(
'icon' => $images_url . 'plugin-tw.jpg',
'name' => esc_html__( 'Custom Twitter Feeds', 'custom-twitter-feeds' ),
'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' ),
'url' => 'https://downloads.wordpress.org/plugin/custom-twitter-feeds.zip',
'plug' => 'custom-twitter-feeds-pro/custom-twitter-feed.php',
'icon' => $images_url . 'plugin-tw.jpg',
'name' => esc_html__( 'Custom Twitter Feeds Pro', 'custom-twitter-feeds' ),
'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' ),
'url' => 'https://smashballoon.com/custom-twitter-feeds/?utm_campaign=twitter-free&utm_source=cross&utm_medium=ctfinstaller',
'feeds-for-youtube/youtube-feed.php' => array(
'icon' => $images_url . 'plugin-yt.png',
'name' => esc_html__( 'Feeds for YouTube', 'custom-twitter-feeds' ),
'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' ),
'url' => 'https://downloads.wordpress.org/plugin/feeds-for-youtube.zip',
'plug' => 'youtube-feed-pro/youtube-feed.php',
'icon' => $images_url . 'plugin-yt.png',
'name' => esc_html__( 'Feeds for YouTube Pro', 'custom-twitter-feeds' ),
'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' ),
'url' => 'https://smashballoon.com/youtube-feed/?utm_campaign=twitter-free&utm_source=cross&utm_medium=sbyinstaller',
function output_about_addons() {
if ( version_compare( PHP_VERSION, '5.3.0' ) <= 0
|| version_compare( get_bloginfo('version'), '4.6' , '<' ) ){
$all_plugins = get_plugins();
$am_plugins = get_am_plugins();
<div id="ctf-admin-addons">
<div class="addons-container">
foreach ( $am_plugins as $plugin => $details ) :
$plugin_data = get_the_plugin_data( $plugin, $details, $all_plugins, $free_only );
$plugin_slug = strtolower( str_replace( ' ', '_', $plugin_data['details']['name'] ) );
//Only show the plugin if both free/pro versions aren't already active
isset( $plugin_data['details']['plug'] ) ? $pro_plugin_source = $plugin_data['details']['plug'] : $pro_plugin_source = '';
if( !is_plugin_active( $plugin ) && !is_plugin_active( $pro_plugin_source ) ){
$has_all_plugins = false;
<div class="addon-container" id="install_<?php echo $plugin_slug; ?>">
<div class="details ctf-clear">
<img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
<?php echo esc_html( $plugin_data['details']['name'] ); ?>
<?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
<div class="actions ctf-clear">
<?php _e( 'Price:', 'custom-twitter-feeds' );
echo ' <span style="color: green;">';
_e( 'Free', 'custom-twitter-feeds' );
<div class="action-button">
<button class="<?php echo esc_attr( $plugin_data['action_class'] ); ?>" data-plugin="<?php echo esc_attr( $plugin_data['plugin_src'] ); ?>" data-type="plugin">
<?php echo wp_kses_post( $plugin_data['action_text'] ); ?>
if( $has_all_plugins == true ){ ?>
<style type="text/css">.ctf-more-plugins-intro{display:none;}</style>
<h2><?php _e( 'You already have all of our free plugins. Awesome!', 'custom-twitter-feeds' ); ?></h2>
<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>
<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>
<?php //Show a list of Pro plugins which aren't currently active ?>
<?php foreach ( $am_plugins as $plugin => $details ) :
$plugin_data = get_the_plugin_data( $plugin, $details, $all_plugins );
$plugin_slug = strtolower( str_replace( ' ', '_', $plugin_data['details']['name'] ) );
isset( $plugin_data['details']['plug'] ) ? $pro_plugin_source = $plugin_data['details']['plug'] : $pro_plugin_source = '';
if( !is_plugin_active( $pro_plugin_source ) ){
<div class="addon-container" id="install_<?php echo $plugin_slug; ?>">
<div class="details ctf-clear">
<img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
<?php echo esc_html( $plugin_data['details']['name'] ); ?>
<?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
<div class="actions ctf-clear">
<div class="action-button">
<a href="<?php echo esc_attr( $details['pro']['url'] ); ?>" target="_blank" class="status-go-to-url button button-primary">
<?php _e( 'Upgrade to Pro', 'custom-twitter-feeds' ); ?>
function get_the_plugin_data( $plugin, $details, $all_plugins, $free_only = false ) {
$have_pro = ( ! empty( $details['pro'] ) && ! empty( $details['pro']['plug'] ) );
if( $free_only ) $have_pro = false;
if ( array_key_exists( $plugin, $all_plugins ) ) {
if ( is_plugin_active( $plugin ) ) {
if ( array_key_exists( $details['pro']['plug'], $all_plugins ) ) {
$plugin = $details['pro']['plug'];
$details = $details['pro'];
if( $free_only ) $show_pro = false;
if ( array_key_exists( $plugin, $all_plugins ) ) {
if ( is_plugin_active( $plugin ) ) {
$plugin_data['status_class'] = 'status-active';
$plugin_data['status_text'] = esc_html__( 'Active', 'custom-twitter-feeds' );
$plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary disabled';
$plugin_data['action_text'] = esc_html__( 'Activated', 'custom-twitter-feeds' );
$plugin_data['plugin_src'] = esc_attr( $plugin );
$plugin_data['status_class'] = 'status-inactive';
$plugin_data['status_text'] = esc_html__( 'Inactive', 'custom-twitter-feeds' );
$plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary';
$plugin_data['action_text'] = esc_html__( 'Activate', 'custom-twitter-feeds' );
$plugin_data['plugin_src'] = esc_attr( $plugin );
// Doesn't exist, install.
$plugin_data['status_class'] = 'status-download';
if ( isset( $details['act'] ) && 'go-to-url' === $details['act'] ) {
$plugin_data['status_class'] = 'status-go-to-url';
$plugin_data['status_text'] = esc_html__( 'Not Installed', 'custom-twitter-feeds' );
$plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-primary';
$plugin_data['action_text'] = esc_html__( 'Install Plugin', 'custom-twitter-feeds' );
$plugin_data['plugin_src'] = esc_url( $details['url'] );
$plugin_data['details'] = $details;
<style>.ctf_quickstart, .ctf-pro-notice, .ctf_plugins_promo, .ctf_share_plugin{ display: none !Important; }</style>