Skip to content

Commit c3ca2e4

Browse files
committed
petition 2.0.10 released
1 parent 3c104fd commit c3ca2e4

16 files changed

Lines changed: 674 additions & 681 deletions

cbxpetition.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
* registers the activation and deactivation functions, and defines a function
99
* that starts the plugin.
1010
*
11-
* @link http://codeboxr.com
11+
* @link https://codeboxr.com
1212
* @since 1.0.0
1313
* @package CBXPetition
1414
*
1515
* @wordpress-plugin
1616
* Plugin Name: CBX Petition
1717
* Plugin URI: https://codeboxr.com/product/cbx-petition-for-wordpress/
1818
* Description: A plugin to create, manage petition and collect signatures for petition
19-
* Version: 2.0.9
19+
* Version: 2.0.10
2020
* Author: Codeboxr
21-
* Author URI: http://codeboxr.com
21+
* Author URI: https://codeboxr.com
2222
* License: GPL-2.0+
2323
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
2424
* Text Domain: cbxpetition
@@ -33,7 +33,7 @@
3333
}
3434

3535
defined( 'CBXPETITION_PLUGIN_NAME' ) or define( 'CBXPETITION_PLUGIN_NAME', 'cbxpetition' );
36-
defined( 'CBXPETITION_PLUGIN_VERSION' ) or define( 'CBXPETITION_PLUGIN_VERSION', '2.0.9' );
36+
defined( 'CBXPETITION_PLUGIN_VERSION' ) or define( 'CBXPETITION_PLUGIN_VERSION', '2.0.10' );
3737
defined( 'CBXPETITION_BASE_NAME' ) or define( 'CBXPETITION_BASE_NAME', plugin_basename( __FILE__ ) );
3838
defined( 'CBXPETITION_ROOT_PATH' ) or define( 'CBXPETITION_ROOT_PATH', plugin_dir_path( __FILE__ ) );
3939
defined( 'CBXPETITION_ROOT_URL' ) or define( 'CBXPETITION_ROOT_URL', plugin_dir_url( __FILE__ ) );

includes/CBXPetitionAdmin.php

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,9 +1518,7 @@ public function custom_plugin_row_meta( $links_array, $plugin_file_name, $plugin
15181518
$links_array[] = '<a target="_blank" style="color:#f44336 !important; font-weight: bold;" href="https://codeboxr.com/doc/cbxpetition-doc/" aria-label="' . esc_attr__( 'Documentation', 'cbxpetition' ) . '">' . esc_html__( 'Documentation', 'cbxpetition' ) . '</a>';
15191519

15201520
//phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
1521-
if ( in_array( 'cbxpetitionproaddon/cbxpetitionproaddon.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || defined( 'CBXPETITIONPROADDON_PLUGIN_NAME' ) ) {
1522-
//nothing here
1523-
} else {
1521+
if (!defined( 'CBXPETITIONPROADDON_PLUGIN_NAME' )) {
15241522
$links_array[] = '<a target="_blank" style="color:#f44336 !important; font-weight: bold;" href="https://codeboxr.com/product/cbx-petition-for-wordpress/#downloadarea" aria-label="' . esc_attr__( 'Try Pro Addon', 'cbxpetition' ) . '">' . esc_html__( 'Try Pro Addon', 'cbxpetition' ) . '</a>';
15251523
}
15261524
}
@@ -1616,7 +1614,7 @@ public function plugin_activate_upgrade_notices() {
16161614
// Check the transient to see if we've just activated the plugin
16171615
if ( get_transient( 'cbxpetition_upgraded_notice' ) ) {
16181616
if ( ! $activation_notice_shown ) {
1619-
echo '<div class="notice notice-success is-dismissible" style="border-color: #6648fe !important;">';
1617+
echo '<div class="notice notice-info is-dismissible" style="border-color: #6648fe !important;">';
16201618

16211619
echo '<p>';
16221620

@@ -1651,7 +1649,7 @@ public function plugin_activate_upgrade_notices() {
16511649
}
16521650

16531651
if ( get_transient( 'cbxpetition_proaddon_deactivated' ) ) {
1654-
echo '<div class="notice notice-info is-dismissible" style="border-color: #6648fe !important;">';
1652+
echo '<div class="notice notice-warning is-dismissible" style="border-color: #6648fe !important;">';
16551653

16561654
echo '<p>';
16571655

@@ -1676,21 +1674,10 @@ public function pro_addon_compatibility_campaign() {
16761674
}
16771675

16781676
//if the pro addon is active or installed
1679-
//phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
1680-
if ( in_array( 'cbxpetitionproaddon/cbxpetitionproaddon.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || defined( 'CBXPETITIONPROADDON_PLUGIN_NAME' ) ) {
1681-
//plugin is activated
1682-
1683-
$plugin_version = CBXPETITIONPROADDON_PLUGIN_VERSION;
1684-
$pro_min_version = '2.0.0';
1685-
1686-
1687-
if ( version_compare( $plugin_version, $pro_min_version, '<' ) ) {
1688-
echo '<div class="notice notice-success is-dismissible"><p>' . esc_html__( 'CBX Petition Pro Addon current version is not compatible with the latest Petition core plugin. Please update CBX Petition Pro Addon to version 2.0.0 or later - Codeboxr Team', 'cbxpetition' ) . '</p></div>';
1689-
}
1690-
} else {
1677+
if (!defined( 'CBXPETITIONPROADDON_PLUGIN_NAME' ) ) {
16911678
/* translators: %s: Plugin Link */
16921679
$message = sprintf( __( 'CBX Petition Pro Addon has frontend petition submission features and more extra features, <a target="_blank" href="%s">try it</a> - Codeboxr Team', 'cbxpetition' ), esc_url( 'https://codeboxr.com/product/cbx-petition-for-wordpress/' ) );
1693-
echo '<div class="notice notice-success is-dismissible"><p>' . wp_kses_post( $message ) . '</p></div>';
1680+
echo '<div class="notice notice-warning is-dismissible"><p>' . wp_kses_post( $message ) . '</p></div>';
16941681
}
16951682

16961683
}//end method pro_addon_compatibility_campaign

0 commit comments

Comments
 (0)