Skip to content

Commit bc0f033

Browse files
committed
bookmark 2.0.2 released
1 parent 57880c5 commit bc0f033

8 files changed

Lines changed: 154 additions & 165 deletions

File tree

assets/css/cbxwpbookmark-admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/cbxwpbookmark-builder.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/cbxwpbookmark-dashboard.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cbxwpbookmark.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Plugin Name: CBX Bookmark & Favorite
1616
* Plugin URI: https://codeboxr.com/product/cbx-wordpress-bookmark
1717
* Description: List/category based bookmark for WordPress, create your own private or public list of favorite posts, page, custom object
18-
* Version: 2.0.1
18+
* Version: 2.0.2
1919
* Author: Codeboxr Team
2020
* Author URI: https://codeboxr.com
2121
* License: GPL-2.0+
@@ -31,7 +31,7 @@
3131

3232

3333
defined( 'CBXWPBOOKMARK_PLUGIN_NAME' ) or define( 'CBXWPBOOKMARK_PLUGIN_NAME', 'cbxwpbookmark' );
34-
defined( 'CBXWPBOOKMARK_PLUGIN_VERSION' ) or define( 'CBXWPBOOKMARK_PLUGIN_VERSION', '2.0.1' );
34+
defined( 'CBXWPBOOKMARK_PLUGIN_VERSION' ) or define( 'CBXWPBOOKMARK_PLUGIN_VERSION', '2.0.2' );
3535
defined( 'CBXWPBOOKMARK_BASE_NAME' ) or define( 'CBXWPBOOKMARK_BASE_NAME', plugin_basename( __FILE__ ) );
3636
defined( 'CBXWPBOOKMARK_ROOT_PATH' ) or define( 'CBXWPBOOKMARK_ROOT_PATH', plugin_dir_path( __FILE__ ) );
3737
defined( 'CBXWPBOOKMARK_ROOT_URL' ) or define( 'CBXWPBOOKMARK_ROOT_URL', plugin_dir_url( __FILE__ ) );
@@ -41,7 +41,7 @@
4141

4242
defined( 'CBXWPBOOKMARK_PHP_MIN_VERSION' ) or define( 'CBXWPBOOKMARK_PHP_MIN_VERSION', '7.4' );
4343
defined( 'CBXWPBOOKMARK_WP_MIN_VERSION' ) or define( 'CBXWPBOOKMARK_WP_MIN_VERSION', '5.3' );
44-
defined( 'CBXWPBOOKMARK_PRO_VERSION' ) or define( 'CBXWPBOOKMARK_PRO_VERSION', '2.0.1' );
44+
defined( 'CBXWPBOOKMARK_PRO_VERSION' ) or define( 'CBXWPBOOKMARK_PRO_VERSION', '2.0.2' );
4545

4646

4747
// Include the main Bookmark class.

includes/CBXWPBookmarkAdmin.php

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
namespace CBXWPBookmark;
33

44
use CBXWPBookmark\CBXWPBookmarkSettings;
5+
use Exception;
6+
57
//use CBXWPBookmark\Helpers\CBXWPBookmarkHelper;
68

79
// If this file is called directly, abort.
@@ -809,6 +811,10 @@ public function add_edit_category() {
809811
public function cbxwpbookmark_autocreate_page() {
810812
check_ajax_referer( 'cbxbookmarknonce', 'security' );
811813

814+
if ( ! current_user_can( 'manage_options' ) ) {
815+
throw new Exception( esc_html__( 'Sorry, you don\'t have enough permission!', 'cbxwpbookmark' ) );
816+
}
817+
812818
//create pages
813819
\CBXWPBookmarkHelper::cbxbookmark_create_pages(); //create the shortcode page
814820

@@ -894,7 +900,7 @@ public function plugin_activate_upgrade_notices() {
894900
}
895901

896902
if ( get_transient( 'cbxwpbookmark_proaddon_deactivated' ) ) {
897-
echo '<div class="notice notice-success is-dismissible" style="border-color: #6648fe !important;">';
903+
echo '<div class="notice notice-warning is-dismissible" style="border-color: #6648fe !important;">';
898904

899905
echo '<p>';
900906
esc_html_e( 'Current version of CBX Bookmark & Favorite Pro Addon is not compatible with core CBX Bookmark & Favorite. CBX Bookmark & Favorite Pro Addon is forced deactivate. Update CBX Bookmark & Favorite Pro Addon to V2.0.0 or later.', 'cbxwpbookmark' );
@@ -964,22 +970,9 @@ public function pro_addon_compatibility_campaign() {
964970
}
965971

966972
//if the pro addon is active or installed
967-
//phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
968-
if ( in_array( 'cbxwpbookmarkaddon/cbxwpbookmarkaddon.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || defined( 'CBXWPBOOKMARKADDON_PLUGIN_NAME' ) ) {
969-
//plugin is activated
970-
971-
$pro_plugin_version = CBXWPBOOKMARKADDON_PLUGIN_VERSION;
972-
//$core_plugin_version = CBXWPBOOKMARK_PLUGIN_VERSION;
973-
974-
if ( version_compare( $pro_plugin_version, '1.1.10', '<' ) ) {
975-
/* translators: %s: bookmark pro plugin version */
976-
echo '<div style="border-left-color: #005ae0;" class="notice notice-success is-dismissible"><p>' . sprintf( esc_html__( 'CBX Bookmark Pro Addon V%s or any previous version is not 100%% compatible with CBX Bookmark Core V1.5.3 or later. Please update CBX Bookmark Pro Addon to version 1.1.10 or latest. - Codeboxr Team', 'cbxwpbookmark' ), $pro_plugin_version ) . '</p></div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
977-
}
978-
979-
980-
} else {
973+
if (!defined( 'CBXWPBOOKMARKADDON_PLUGIN_NAME' )) {
981974
/* translators: %s: bookmark product description url */
982-
echo '<div style="border-left-color: #005ae0;" class="notice notice-success is-dismissible"><p>' . sprintf( wp_kses( __( '<a target="_blank" href="%s">CBX Bookmark Pro Addon</a> has extended features, settings, widgets and shortcodes. try it - Codeboxr Team', 'cbxwpbookmark' ), [ 'a' => [ 'href' => [], 'target' => [] ] ] ), 'https://codeboxr.com/product/cbx-wordpress-bookmark/' ) . '</p></div>';
975+
echo '<div style="border-left-color: #005ae0;" class="notice notice-warning is-dismissible"><p>' . sprintf( wp_kses( __( '<a target="_blank" href="%s">CBX Bookmark Pro Addon</a> has extended features, settings, widgets and shortcodes. try it - Codeboxr Team', 'cbxwpbookmark' ), [ 'a' => [ 'href' => [], 'target' => [] ] ] ), 'https://codeboxr.com/product/cbx-wordpress-bookmark/' ) . '</p></div>';
983976
}
984977
}//end pro_addon_compatibility_campaign
985978

@@ -1019,26 +1012,14 @@ public function plugin_row_meta( $links_array, $plugin_file_name, $plugin_data,
10191012
}
10201013

10211014
$links_array[] = '<a target="_blank" style="color:#005ae0 !important; font-weight: bold;" href="https://wordpress.org/support/plugin/cbxwpbookmark/" aria-label="' . esc_attr__( 'Free Support', 'cbxwpbookmark' ) . '">' . esc_html__( 'Free Support', 'cbxwpbookmark' ) . '</a>';
1022-
10231015
$links_array[] = '<a target="_blank" style="color:#005ae0 !important; font-weight: bold;" href="https://wordpress.org/plugins/cbxwpbookmark/#reviews" aria-label="' . esc_attr__( 'Reviews', 'cbxwpbookmark' ) . '">' . esc_html__( 'Reviews', 'cbxwpbookmark' ) . '</a>';
1024-
10251016
$links_array[] = '<a target="_blank" style="color:#005ae0 !important; font-weight: bold;" href="https://codeboxr.com/doc/cbxwpbookmark-doc/" aria-label="' . esc_attr__( 'Documentation', 'cbxwpbookmark' ) . '">' . esc_html__( 'Documentation', 'cbxwpbookmark' ) . '</a>';
1026-
1027-
1028-
//phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
1029-
if ( in_array( 'cbxwpbookmarkaddon/cbxwpbookmarkaddon.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || defined( 'CBXWPBOOKMARKADDON_PLUGIN_NAME' ) ) {
1030-
1031-
} else {
1032-
$links_array[] = '<a target="_blank" style="color:#005ae0 !important; font-weight: bold;" href="https://codeboxr.com/product/cbx-wordpress-bookmark/" aria-label="' . esc_attr__( 'Try Pro Addon', 'cbxwpbookmark' ) . '">' . esc_html__( 'Try Pro Addon', 'cbxwpbookmark' ) . '</a>';
1033-
}
1017+
$links_array[] = '<a target="_blank" style="color:#005ae0 !important; font-weight: bold;" href="https://codeboxr.com/product/cbx-wordpress-bookmark/" aria-label="' . esc_attr__( 'Try Pro Addon', 'cbxwpbookmark' ) . '">' . esc_html__( 'Try Pro Addon', 'cbxwpbookmark' ) . '</a>';
10341018
}
10351019

10361020
return $links_array;
10371021
}//end plugin_row_meta
10381022

1039-
1040-
1041-
10421023
/**
10431024
* User's bookmarks listing screen option columns
10441025
*
@@ -1089,6 +1070,8 @@ public function settings_reset_load() {
10891070
//security check
10901071
check_ajax_referer( 'settingsnonce', 'security' );
10911072

1073+
1074+
10921075
$msg = [];
10931076
$msg['html'] = '';
10941077
$msg['message'] = esc_html__( 'Bookmark reset setting html loaded successfully', 'cbxwpbookmark' );

0 commit comments

Comments
 (0)