Plugin Directory

Changeset 3253353

Timestamp:
03/10/2025 02:01:29 PM (9 months ago)
Author:
advancedads
Message:

Update to version 2.0.0 from GitHub

Location:
ads-for-visual-composer
Files:
4 added
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ads-for-visual-composer/tags/2.0.0/advanced-ads-vc.php

    r2892730 r3253353  
    44 * Plugin URI:        https://wpadvancedads.com
    55 * Description:       Display Advanced Ads as a Visual Composer Element
    6  * Version:           1.0.7
     6 * Version:           2.0.0
    77 * Author:            Advanced Ads
    88 * Author URI:        https://wpadvancedads.com
     
    1111 * License:           GPL-2.0+
    1212 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
    13  * 
     13 *
    1414 * based on Extend WPBakery Page Builder Plugin (formerly Visual Composer)
    15 */
     15 */
    1616
    1717if ( ! defined( 'ABSPATH' ) ) {
     
    2525    public function __construct() {
    2626        // We safely integrate with VC with this hook.
    27         add_action( 'init', array( $this, 'check_dependencies' ) );
    28         add_action( 'init', array( $this, 'add_arguments' ) );
     27        add_action( 'init', [ $this, 'check_dependencies' ] );
     28        add_action( 'init', [ $this, 'add_arguments' ], 30 );
    2929        // load translations.
    30         add_action( 'plugins_loaded', array( $this, 'ads_for_visual_composer_load_plugin_textdomain' ) );
    31     }
    32 
     30        add_action( 'plugins_loaded', [ $this, 'ads_for_visual_composer_load_plugin_textdomain' ] );
     31    }
    3332
    3433    /**
     
    3837        // Check if WPBakery Page Builder is installed.
    3938        if ( ! defined( 'WPB_VC_VERSION' ) ) {
    40             // Display notice that Visual Compser is required.
    41             add_action( 'admin_notices', array( $this, 'show_vc_version_notice' ) );
     39            // Display notice that Visual Composer is required.
     40            add_action( 'admin_notices', [ $this, 'show_vc_version_notice' ] );
    4241        }
    4342
     
    4544        if ( ! defined( 'ADVADS_VERSION' ) ) {
    4645            // Display notice that Advanced Ads is required.
    47             add_action( 'admin_notices', array( $this, 'show_advads_version_notice' ) );
     46            add_action( 'admin_notices', [ $this, 'show_advads_version_notice' ] );
    4847        }
    4948    }
     
    5453    public function add_arguments() {
    5554
    56         if ( ! defined( 'ADVADS_BASE' ) || ! defined( 'WPB_VC_VERSION' ) ) {
     55        if ( ! defined( 'ADVADS_PLUGIN_BASENAME' ) || ! defined( 'WPB_VC_VERSION' ) ) {
    5756            return;
    5857        }
    5958
    60         vc_map( array(
    61             'name'        => __( 'Advanced Ads – Ad', 'ads-for-visual-composer' ),
    62             'description' => __( 'Displays an Ad', 'ads-for-visual-composer' ),
    63             'base'        => 'the_ad',
    64             'icon'        => plugins_url( 'assets/icon.png', __FILE__ ),
    65             'category'    => 'Ads',
    66             'group'       => 'Advanced Ads',
    67 
    68                 'params' => array(
    69                     array(
    70                         'type'        => 'textfield',
    71                         'heading'     => __( 'Ad Id', 'ads-for-visual-composer' ),
     59        vc_map( [
     60                'name'        => __( 'Advanced Ads – Ad', 'ads-for-visual-composer' ),
     61                'description' => __( 'Displays an Ad', 'ads-for-visual-composer' ),
     62                'base'        => 'the_ad',
     63                'icon'        => plugins_url( 'assets/icon.png', __FILE__ ),
     64                'category'    => 'Ads',
     65                'group'       => 'Advanced Ads',
     66
     67                'params' => [
     68                    [
     69                        'type'        => 'dropdown',
     70                        'heading'     => __( 'Select an ad', 'ads-for-visual-composer' ),
    7271                        'param_name'  => 'id',
    73                         'description' => __( 'Enter the ID of the ad.', 'ads-for-visual-composer' ),
    74                     ),
    75                 )
    76             )
    77         );
    78         vc_map( array(
    79             'name'        => __( 'Advanced Ads – Group', 'ads-for-visual-composer' ),
    80             'description' => __( 'Displays an Ad Group', 'ads-for-visual-composer' ),
    81             'base'        => 'the_ad_group',
    82             'icon'        => plugins_url( 'assets/icon.png', __FILE__ ),
    83             'category'    => 'Ads',
    84             'group'       => 'Advanced Ads',
    85 
    86                 "params" => array(
    87                     array(
    88                         'type'        => 'textfield',
    89                         'holder'      => 'div',
    90                         'heading'     => __( 'Ad Group Id', 'ads-for-visual-composer' ),
     72                        'description' => __( 'Display an Ad', 'ads-for-visual-composer' ),
     73                        'value'       => $this->get_ads(),
     74                        'std'         => '',
     75                        'admin_label' => true,
     76                    ],
     77                ],
     78            ]
     79        );
     80
     81        vc_map( [
     82                'name'        => __( 'Advanced Ads – Group', 'ads-for-visual-composer' ),
     83                'description' => __( 'Displays an Ad Group', 'ads-for-visual-composer' ),
     84                'base'        => 'the_ad_group',
     85                'icon'        => plugins_url( 'assets/icon.png', __FILE__ ),
     86                'category'    => 'Ads',
     87                'group'       => 'Advanced Ads',
     88
     89                "params" => [
     90                    [
     91                        'type'        => 'dropdown',
     92                        'heading'     => __( 'Select a group', 'ads-for-visual-composer' ),
    9193                        'param_name'  => 'id',
    92                         'description' => __( 'Enter the ad group ID.', 'ads-for-visual-composer' ),
    93                     ),
    94                 )
    95             )
    96         );
    97         vc_map( array(
     94                        'description' => __( 'Displays an Ad Group', 'ads-for-visual-composer' ),
     95                        'value'       => $this->get_groups(),
     96                        'std'         => '',
     97                        'admin_label' => true,
     98                    ],
     99                ],
     100            ]
     101        );
     102
     103        vc_map( [
    98104                'name'        => __( 'Advanced Ads – Placement', 'ads-for-visual-composer' ),
    99105                'description' => __( 'Displays an Ad Placement', 'ads-for-visual-composer' ),
     
    103109                'group'       => 'Advanced Ads',
    104110
    105                 'params' => array(
    106                     array(
    107                         'type'        => 'textfield',
    108                         'holder'      => 'div',
    109                         'heading'     => __( 'Placement slug', 'ads-for-visual-composer' ),
     111                'params' => [
     112                    [
     113                        'type'        => 'dropdown',
     114                        'heading'     => __( 'Select a placement', 'ads-for-visual-composer' ),
    110115                        'param_name'  => 'id',
    111                         'description' => __( 'Enter the slug from a Manual Placement.', 'ads-for-visual-composer' ),
    112                     ),
    113                 ),
    114             )
     116                        'description' => __( 'Displays an Ad Placement', 'ads-for-visual-composer' ),
     117                        'value'       => $this->get_placements(),
     118                        'std'         => '',
     119                        'admin_label' => true,
     120                    ],
     121                ],
     122            ]
    115123        );
    116124    }
     
    121129    public function show_vc_version_notice() {
    122130        $plugin_data = get_plugin_data( __FILE__ );
    123         echo '
    124         <div class="error">
    125           <p>' . sprintf(
    126             // translators: %s is the name of this plugin.
    127             __( '<strong>%s</strong> requires the <strong><a href="http://bit.ly/vcomposer" target="_blank">WPBakery Page Builder</a></strong> plugin to be installed and activated on your site.', 'ads-for-visual-composer' ),
    128             esc_attr( $plugin_data['Name'] )
    129         ) . '</p>
    130         </div>';
     131
     132        echo wp_kses_post(
     133            sprintf(
     134                '<div class="error"><p>%s</p></div>',
     135                sprintf(
     136                /* translators: %s is the name of this plugin. */
     137                    __( '<strong>%s</strong> requires the <strong><a href="http://bit.ly/vcomposer" target="_blank">WPBakery Page Builder</a></strong> plugin to be installed and activated on your site.', 'ads-for-visual-composer' ),
     138                    esc_html( $plugin_data['Name'] )
     139                )
     140            )
     141        );
     142    }
     143
     144    /**
     145     * Check if Advanced Ads 2.0 or newer is installed.
     146     *
     147     * @return bool|int
     148     */
     149    private function is_a2_2() {
     150        return version_compare( ADVADS_VERSION, '2.0', '>=' );
     151    }
     152
     153    /**
     154     * Get all ads
     155     *
     156     * @return array
     157     */
     158    private function get_ads() {
     159        global $wpdb;
     160        static $ads;
     161
     162        if ( null === $ads ) {
     163            $ads = [ '' => '' ];
     164
     165            if ( $this->is_a2_2() ) {
     166                foreach ( wp_advads_get_all_ads() as $id => $ad ) {
     167                    $ads[ $ad->get_title() ] = $id;
     168                }
     169            } else {
     170                foreach ( ( new Advanced_Ads_Model( $wpdb ) )->get_ads() as $ad ) {
     171                    $ads[ $ad->post_title ] = $ad->ID;
     172                }
     173            }
     174        }
     175
     176        return $ads;
     177    }
     178
     179    /**
     180     * Get all groups
     181     *
     182     * @return array
     183     */
     184    private function get_groups() {
     185        global $wpdb;
     186        static $groups;
     187
     188        if ( null === $groups ) {
     189            $groups = [ '' => '' ];
     190            if ( $this->is_a2_2() ) {
     191                foreach ( wp_advads_get_all_groups() as $id => $group ) {
     192                    $groups[ $group->get_title() ] = $id;
     193                }
     194            } else {
     195                foreach ( ( new Advanced_Ads_Model( $wpdb ) )->get_ad_groups() as $group ) {
     196                    $groups[ $group->name ] = $group->term_id;
     197                }
     198            }
     199        }
     200
     201        return $groups;
     202    }
     203
     204    /**
     205     * Get all placements
     206     *
     207     * @return array
     208     */
     209    private function get_placements() {
     210        static $placements;
     211
     212        if ( null === $placements ) {
     213            $placements = [ '' => '' ];
     214            if ( $this->is_a2_2() ) {
     215                foreach ( wp_advads_get_placements_by_types( 'default' ) as $id => $placement ) {
     216                    $placements[ $placement->get_title() ] = $placement->get_slug();
     217                }
     218            } else {
     219                foreach ( get_option( 'advads-ads-placements', [] ) as $id => $placement ) {
     220                    if ( 'default' !== $placement['type'] ) {
     221                        continue;
     222                    }
     223                    $placements[ $placement['name'] ] = $id;
     224                };
     225            }
     226        }
     227
     228        return $placements;
    131229    }
    132230
     
    137235        $plugin_data = get_plugin_data( __FILE__ );
    138236        $plugins     = get_plugins();
     237
    139238        if ( isset( $plugins['advanced-ads/advanced-ads.php'] ) ) { // is installed, but not active.
    140239            $link = '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=advanced-ads/advanced-ads.php&amp', 'activate-plugin_advanced-ads/advanced-ads.php' ) . '">' . __( 'Activate Now', 'ads-for-visual-composer' ) . '</a>';
     
    142241            $link = '<a class="button button-primary" href="' . wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . 'advanced-ads' ), 'install-plugin_' . 'advanced-ads' ) . '">' . __( 'Install Now', 'ads-for-visual-composer' ) . '</a>';
    143242        }
    144         echo '<div class="error"><p>' . sprintf( __( '<strong>%s</strong> requires the <strong><a href="https://wpadvancedads.com/#utm_source=advanced-ads&utm_medium=link&utm_campaign=activate-vc" target="_blank">Advanced Ads</a></strong> plugin to be installed and activated on your site.', 'ads-for-visual-composer' ), $plugin_data['Name'] )
    145              . '&nbsp;' . $link . '</p></div>';
    146 
    147     }
    148 
    149     /**
    150      * Load textdomain
     243
     244        echo wp_kses_post(
     245            sprintf(
     246                '<div class="error"><p>%1$s&nbsp;%2$s</p></div>',
     247                sprintf(
     248                /* translators: %s is the name of this plugin. */
     249                    __( '<strong>%s</strong> requires the <strong><a href="https://wpadvancedads.com/#utm_source=advanced-ads&utm_medium=link&utm_campaign=activate-vc" target="_blank">Advanced Ads</a></strong> plugin to be installed and activated on your site.', 'ads-for-visual-composer' ),
     250                    $plugin_data['Name']
     251                ),
     252                $link
     253            )
     254        );
     255    }
     256
     257    /**
     258     * Load translations
     259     *
     260     * @return void
    151261     */
    152262    public function ads_for_visual_composer_load_plugin_textdomain() {
  • ads-for-visual-composer/tags/2.0.0/readme.txt

    r3064745 r3253353  
    22Contributors: advancedads, webzunft
    33Tags: ads, AdSense, page builder, WPBakery, banner, banners, addon, amazon, Google AdSense, WP Bakery
    4 Requires at least: 4.5
    5 Tested up to: 6.5
    6 Stable tag: 1.0.7
     4Requires at least: 5.7
     5Tested up to: 6.7
     6Requires PHP: 7.4
     7Stable tag: 2.0.0
    78License: GPLv2 or later
    89License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5051== Changelog ==
    5152
     53= 2.0.0 =
     54- Feature: achieve full compatibility with Advanced Ads 2.0
     55- Improvement: enhance performance and efficiency with new codebase
     56
    5257= 1.0.7 =
    5358
  • ads-for-visual-composer/trunk/advanced-ads-vc.php

    r2892730 r3253353  
    44 * Plugin URI:        https://wpadvancedads.com
    55 * Description:       Display Advanced Ads as a Visual Composer Element
    6  * Version:           1.0.7
     6 * Version:           2.0.0
    77 * Author:            Advanced Ads
    88 * Author URI:        https://wpadvancedads.com
     
    1111 * License:           GPL-2.0+
    1212 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
    13  * 
     13 *
    1414 * based on Extend WPBakery Page Builder Plugin (formerly Visual Composer)
    15 */
     15 */
    1616
    1717if ( ! defined( 'ABSPATH' ) ) {
     
    2525    public function __construct() {
    2626        // We safely integrate with VC with this hook.
    27         add_action( 'init', array( $this, 'check_dependencies' ) );
    28         add_action( 'init', array( $this, 'add_arguments' ) );
     27        add_action( 'init', [ $this, 'check_dependencies' ] );
     28        add_action( 'init', [ $this, 'add_arguments' ], 30 );
    2929        // load translations.
    30         add_action( 'plugins_loaded', array( $this, 'ads_for_visual_composer_load_plugin_textdomain' ) );
    31     }
    32 
     30        add_action( 'plugins_loaded', [ $this, 'ads_for_visual_composer_load_plugin_textdomain' ] );
     31    }
    3332
    3433    /**
     
    3837        // Check if WPBakery Page Builder is installed.
    3938        if ( ! defined( 'WPB_VC_VERSION' ) ) {
    40             // Display notice that Visual Compser is required.
    41             add_action( 'admin_notices', array( $this, 'show_vc_version_notice' ) );
     39            // Display notice that Visual Composer is required.
     40            add_action( 'admin_notices', [ $this, 'show_vc_version_notice' ] );
    4241        }
    4342
     
    4544        if ( ! defined( 'ADVADS_VERSION' ) ) {
    4645            // Display notice that Advanced Ads is required.
    47             add_action( 'admin_notices', array( $this, 'show_advads_version_notice' ) );
     46            add_action( 'admin_notices', [ $this, 'show_advads_version_notice' ] );
    4847        }
    4948    }
     
    5453    public function add_arguments() {
    5554
    56         if ( ! defined( 'ADVADS_BASE' ) || ! defined( 'WPB_VC_VERSION' ) ) {
     55        if ( ! defined( 'ADVADS_PLUGIN_BASENAME' ) || ! defined( 'WPB_VC_VERSION' ) ) {
    5756            return;
    5857        }
    5958
    60         vc_map( array(
    61             'name'        => __( 'Advanced Ads – Ad', 'ads-for-visual-composer' ),
    62             'description' => __( 'Displays an Ad', 'ads-for-visual-composer' ),
    63             'base'        => 'the_ad',
    64             'icon'        => plugins_url( 'assets/icon.png', __FILE__ ),
    65             'category'    => 'Ads',
    66             'group'       => 'Advanced Ads',
    67 
    68                 'params' => array(
    69                     array(
    70                         'type'        => 'textfield',
    71                         'heading'     => __( 'Ad Id', 'ads-for-visual-composer' ),
     59        vc_map( [
     60                'name'        => __( 'Advanced Ads – Ad', 'ads-for-visual-composer' ),
     61                'description' => __( 'Displays an Ad', 'ads-for-visual-composer' ),
     62                'base'        => 'the_ad',
     63                'icon'        => plugins_url( 'assets/icon.png', __FILE__ ),
     64                'category'    => 'Ads',
     65                'group'       => 'Advanced Ads',
     66
     67                'params' => [
     68                    [
     69                        'type'        => 'dropdown',
     70                        'heading'     => __( 'Select an ad', 'ads-for-visual-composer' ),
    7271                        'param_name'  => 'id',
    73                         'description' => __( 'Enter the ID of the ad.', 'ads-for-visual-composer' ),
    74                     ),
    75                 )
    76             )
    77         );
    78         vc_map( array(
    79             'name'        => __( 'Advanced Ads – Group', 'ads-for-visual-composer' ),
    80             'description' => __( 'Displays an Ad Group', 'ads-for-visual-composer' ),
    81             'base'        => 'the_ad_group',
    82             'icon'        => plugins_url( 'assets/icon.png', __FILE__ ),
    83             'category'    => 'Ads',
    84             'group'       => 'Advanced Ads',
    85 
    86                 "params" => array(
    87                     array(
    88                         'type'        => 'textfield',
    89                         'holder'      => 'div',
    90                         'heading'     => __( 'Ad Group Id', 'ads-for-visual-composer' ),
     72                        'description' => __( 'Display an Ad', 'ads-for-visual-composer' ),
     73                        'value'       => $this->get_ads(),
     74                        'std'         => '',
     75                        'admin_label' => true,
     76                    ],
     77                ],
     78            ]
     79        );
     80
     81        vc_map( [
     82                'name'        => __( 'Advanced Ads – Group', 'ads-for-visual-composer' ),
     83                'description' => __( 'Displays an Ad Group', 'ads-for-visual-composer' ),
     84                'base'        => 'the_ad_group',
     85                'icon'        => plugins_url( 'assets/icon.png', __FILE__ ),
     86                'category'    => 'Ads',
     87                'group'       => 'Advanced Ads',
     88
     89                "params" => [
     90                    [
     91                        'type'        => 'dropdown',
     92                        'heading'     => __( 'Select a group', 'ads-for-visual-composer' ),
    9193                        'param_name'  => 'id',
    92                         'description' => __( 'Enter the ad group ID.', 'ads-for-visual-composer' ),
    93                     ),
    94                 )
    95             )
    96         );
    97         vc_map( array(
     94                        'description' => __( 'Displays an Ad Group', 'ads-for-visual-composer' ),
     95                        'value'       => $this->get_groups(),
     96                        'std'         => '',
     97                        'admin_label' => true,
     98                    ],
     99                ],
     100            ]
     101        );
     102
     103        vc_map( [
    98104                'name'        => __( 'Advanced Ads – Placement', 'ads-for-visual-composer' ),
    99105                'description' => __( 'Displays an Ad Placement', 'ads-for-visual-composer' ),
     
    103109                'group'       => 'Advanced Ads',
    104110
    105                 'params' => array(
    106                     array(
    107                         'type'        => 'textfield',
    108                         'holder'      => 'div',
    109                         'heading'     => __( 'Placement slug', 'ads-for-visual-composer' ),
     111                'params' => [
     112                    [
     113                        'type'        => 'dropdown',
     114                        'heading'     => __( 'Select a placement', 'ads-for-visual-composer' ),
    110115                        'param_name'  => 'id',
    111                         'description' => __( 'Enter the slug from a Manual Placement.', 'ads-for-visual-composer' ),
    112                     ),
    113                 ),
    114             )
     116                        'description' => __( 'Displays an Ad Placement', 'ads-for-visual-composer' ),
     117                        'value'       => $this->get_placements(),
     118                        'std'         => '',
     119                        'admin_label' => true,
     120                    ],
     121                ],
     122            ]
    115123        );
    116124    }
     
    121129    public function show_vc_version_notice() {
    122130        $plugin_data = get_plugin_data( __FILE__ );
    123         echo '
    124         <div class="error">
    125           <p>' . sprintf(
    126             // translators: %s is the name of this plugin.
    127             __( '<strong>%s</strong> requires the <strong><a href="http://bit.ly/vcomposer" target="_blank">WPBakery Page Builder</a></strong> plugin to be installed and activated on your site.', 'ads-for-visual-composer' ),
    128             esc_attr( $plugin_data['Name'] )
    129         ) . '</p>
    130         </div>';
     131
     132        echo wp_kses_post(
     133            sprintf(
     134                '<div class="error"><p>%s</p></div>',
     135                sprintf(
     136                /* translators: %s is the name of this plugin. */
     137                    __( '<strong>%s</strong> requires the <strong><a href="http://bit.ly/vcomposer" target="_blank">WPBakery Page Builder</a></strong> plugin to be installed and activated on your site.', 'ads-for-visual-composer' ),
     138                    esc_html( $plugin_data['Name'] )
     139                )
     140            )
     141        );
     142    }
     143
     144    /**
     145     * Check if Advanced Ads 2.0 or newer is installed.
     146     *
     147     * @return bool|int
     148     */
     149    private function is_a2_2() {
     150        return version_compare( ADVADS_VERSION, '2.0', '>=' );
     151    }
     152
     153    /**
     154     * Get all ads
     155     *
     156     * @return array
     157     */
     158    private function get_ads() {
     159        global $wpdb;
     160        static $ads;
     161
     162        if ( null === $ads ) {
     163            $ads = [ '' => '' ];
     164
     165            if ( $this->is_a2_2() ) {
     166                foreach ( wp_advads_get_all_ads() as $id => $ad ) {
     167                    $ads[ $ad->get_title() ] = $id;
     168                }
     169            } else {
     170                foreach ( ( new Advanced_Ads_Model( $wpdb ) )->get_ads() as $ad ) {
     171                    $ads[ $ad->post_title ] = $ad->ID;
     172                }
     173            }
     174        }
     175
     176        return $ads;
     177    }
     178
     179    /**
     180     * Get all groups
     181     *
     182     * @return array
     183     */
     184    private function get_groups() {
     185        global $wpdb;
     186        static $groups;
     187
     188        if ( null === $groups ) {
     189            $groups = [ '' => '' ];
     190            if ( $this->is_a2_2() ) {
     191                foreach ( wp_advads_get_all_groups() as $id => $group ) {
     192                    $groups[ $group->get_title() ] = $id;
     193                }
     194            } else {
     195                foreach ( ( new Advanced_Ads_Model( $wpdb ) )->get_ad_groups() as $group ) {
     196                    $groups[ $group->name ] = $group->term_id;
     197                }
     198            }
     199        }
     200
     201        return $groups;
     202    }
     203
     204    /**
     205     * Get all placements
     206     *
     207     * @return array
     208     */
     209    private function get_placements() {
     210        static $placements;
     211
     212        if ( null === $placements ) {
     213            $placements = [ '' => '' ];
     214            if ( $this->is_a2_2() ) {
     215                foreach ( wp_advads_get_placements_by_types( 'default' ) as $id => $placement ) {
     216                    $placements[ $placement->get_title() ] = $placement->get_slug();
     217                }
     218            } else {
     219                foreach ( get_option( 'advads-ads-placements', [] ) as $id => $placement ) {
     220                    if ( 'default' !== $placement['type'] ) {
     221                        continue;
     222                    }
     223                    $placements[ $placement['name'] ] = $id;
     224                };
     225            }
     226        }
     227
     228        return $placements;
    131229    }
    132230
     
    137235        $plugin_data = get_plugin_data( __FILE__ );
    138236        $plugins     = get_plugins();
     237
    139238        if ( isset( $plugins['advanced-ads/advanced-ads.php'] ) ) { // is installed, but not active.
    140239            $link = '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=advanced-ads/advanced-ads.php&amp', 'activate-plugin_advanced-ads/advanced-ads.php' ) . '">' . __( 'Activate Now', 'ads-for-visual-composer' ) . '</a>';
     
    142241            $link = '<a class="button button-primary" href="' . wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . 'advanced-ads' ), 'install-plugin_' . 'advanced-ads' ) . '">' . __( 'Install Now', 'ads-for-visual-composer' ) . '</a>';
    143242        }
    144         echo '<div class="error"><p>' . sprintf( __( '<strong>%s</strong> requires the <strong><a href="https://wpadvancedads.com/#utm_source=advanced-ads&utm_medium=link&utm_campaign=activate-vc" target="_blank">Advanced Ads</a></strong> plugin to be installed and activated on your site.', 'ads-for-visual-composer' ), $plugin_data['Name'] )
    145              . '&nbsp;' . $link . '</p></div>';
    146 
    147     }
    148 
    149     /**
    150      * Load textdomain
     243
     244        echo wp_kses_post(
     245            sprintf(
     246                '<div class="error"><p>%1$s&nbsp;%2$s</p></div>',
     247                sprintf(
     248                /* translators: %s is the name of this plugin. */
     249                    __( '<strong>%s</strong> requires the <strong><a href="https://wpadvancedads.com/#utm_source=advanced-ads&utm_medium=link&utm_campaign=activate-vc" target="_blank">Advanced Ads</a></strong> plugin to be installed and activated on your site.', 'ads-for-visual-composer' ),
     250                    $plugin_data['Name']
     251                ),
     252                $link
     253            )
     254        );
     255    }
     256
     257    /**
     258     * Load translations
     259     *
     260     * @return void
    151261     */
    152262    public function ads_for_visual_composer_load_plugin_textdomain() {
  • ads-for-visual-composer/trunk/readme.txt

    r3064745 r3253353  
    22Contributors: advancedads, webzunft
    33Tags: ads, AdSense, page builder, WPBakery, banner, banners, addon, amazon, Google AdSense, WP Bakery
    4 Requires at least: 4.5
    5 Tested up to: 6.5
    6 Stable tag: 1.0.7
     4Requires at least: 5.7
     5Tested up to: 6.7
     6Requires PHP: 7.4
     7Stable tag: 2.0.0
    78License: GPLv2 or later
    89License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5051== Changelog ==
    5152
     53= 2.0.0 =
     54- Feature: achieve full compatibility with Advanced Ads 2.0
     55- Improvement: enhance performance and efficiency with new codebase
     56
    5257= 1.0.7 =
    5358
Note: See TracChangeset for help on using the changeset viewer.