@@ -90,37 +90,26 @@ public function plugin_activate_upgrade_notices() {
9090 delete_transient ( 'cbxgooglemap_upgraded_notice ' );
9191 }//end cbxgooglemap_upgraded_notice
9292
93- if ( get_transient ( 'cbxgooglemappro_deactivated_notice ' ) ) {
94- echo '<div class="notice notice-error is-dismissible" style="border-color: red !important;"> ' ;
95- echo '<p> ' . wp_kses ( __ ( 'Currently installed <strong>CBX Map for Google Map & OpenStreetMap Pro Addon</strong> version 1.0.5(or earlier) is not compatible with the latest version of core plugin CBX Map for Google Map & OpenStreetMap V1.1.12 or later. - Codeboxr Team ' ,
96- 'cbxgooglemap ' ), $ kiss_html_arr ) . '</p> ' ;
93+ if ( get_transient ( 'cbxgooglemap_proaddon_deactivated ' ) ) {
94+ echo '<div class="notice notice-warning is-dismissible" style="border-color: #6648fe !important;"> ' ;
95+
96+ echo '<p> ' ;
97+ esc_html_e ( 'Current version of CBX Map Pro Addon is not compatible with core CBX Map. CBX Map Pro Addon is forced deactivate. Update CBX Map Pro Addon to V2.0.0 or later. ' , 'cbxgooglemap ' );
98+
99+ echo '</p> ' ;
97100 echo '</div> ' ;
98101
99- delete_transient ( 'cbxgooglemappro_deactivated_notice ' );
102+ delete_transient ( 'cbxgooglemap_proaddon_deactivated ' );
100103 }//end checking cbxgooglemappro_deactivated_notice
101104 }//end plugin_activate_upgrade_notices
102105
103106 /**
104107 * Check plugin compatibility and pro addon install campaign
105108 */
106109 public function pro_addon_compatibility_campaign () {
107- if ( ! function_exists ( 'is_plugin_active ' ) ) {
108- include_once ( ABSPATH . 'wp-admin/includes/plugin.php ' );
109- }
110-
111110 //if the pro addon is active or installed
112- //phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
113- if ( defined ( 'CBXGOOGLEMAPPRO_PLUGIN_NAME ' ) || in_array ( 'cbxgooglemappro/cbxgooglemappro.php ' , apply_filters ( 'active_plugins ' , get_option ( 'active_plugins ' ) ) ) ) {
114- //plugin is activated
115-
116- $ plugin_version = CBXGOOGLEMAPPRO_PLUGIN_VERSION ;
117- $ pro_min_version = '2.0.0 ' ;
111+ if ( !defined ( 'CBXGOOGLEMAPPRO_PLUGIN_NAME ' )) {
118112
119- if ( version_compare ( $ plugin_version , $ pro_min_version , '< ' ) ) {
120- echo '<div class="notice notice-success is-dismissible"><p> ' . esc_html__ ( 'CBX Map Pro Addon current version is not compatible with the latest CBX Map core plugin. Please update CBX Map Pro Addon to version 2.0.0 or later - Codeboxr Team ' , 'cbxgooglemap ' ) . '</p></div> ' ;
121- }
122-
123- } else {
124113 /* translators: %s: Plugin Link */
125114 $ message = sprintf ( __ ( 'CBX Map Pro Addon has distance search based listing, multiple marker in one map and more extra features, <a target="_blank" href="%s">try it</a> - Codeboxr Team ' , 'cbxgooglemap ' ), esc_url ( 'https://codeboxr.com/product/cbx-google-map-for-wordpress/ ' ) );
126115 echo '<div class="notice notice-success is-dismissible"><p> ' . wp_kses_post ( $ message ) . '</p></div> ' ;
@@ -170,7 +159,7 @@ public function check_pro_addon() {
170159 */
171160 public function plugin_listing_setting_link ( $ links ) {
172161 return array_merge ( [
173- 'settings ' => '<a style="color:#39A96B ; font-weight: bold;" target="_blank " href=" ' . esc_url ( admin_url ( 'edit.php?post_type=cbxgooglemap&page=cbxgooglemap_settings ' ) ) . '"> ' . esc_attr__ ( 'Settings ' , 'cbxgooglemap ' ) . '</a> '
162+ 'settings ' => '<a style="color:#5d5dff ; font-weight: bold;" href=" ' . esc_url ( admin_url ( 'edit.php?post_type=cbxgooglemap&page=cbxgooglemap_settings ' ) ) . '"> ' . esc_attr__ ( 'Settings ' , 'cbxgooglemap ' ) . '</a> '
174163 ], $ links );
175164
176165 }//end plugin_listing_setting_link
@@ -191,21 +180,12 @@ public function plugin_listing_setting_link( $links ) {
191180 */
192181 public function custom_plugin_row_meta ( $ links_array , $ plugin_file_name , $ plugin_data , $ status ) {
193182 if ( strpos ( $ plugin_file_name , CBXGOOGLEMAP_BASE_NAME ) !== false ) {
194- if ( ! function_exists ( 'is_plugin_active ' ) ) {
195- include_once ( ABSPATH . 'wp-admin/includes/plugin.php ' );
196- }
197-
198183
199- $ links_array [] = '<a style="color:#39A96B; font-weight: bold;" href="https://wordpress.org/support/plugin/cbxgooglemap/" target="_blank"> ' . esc_attr__ ( 'Free Support ' , 'cbxgooglemap ' ) . '</a> ' ;
200- $ links_array [] = '<a style="color:#39A96B; font-weight: bold;" href="https://wordpress.org/plugins/cbxgooglemap/#reviews" target="_blank"> ' . esc_attr__ ( 'Reviews ' , 'cbxgooglemap ' ) . '</a> ' ;
201- $ links_array [] = '<a target="_blank" style="color:#f44336 !important; font-weight: bold;" href="https://codeboxr.com/doc/cbxmap-doc/" aria-label=" ' . esc_attr__ ( 'Documentation ' , 'cbxgooglemap ' ) . '"> ' . esc_html__ ( 'Documentation ' , 'cbxgooglemap ' ) . '</a> ' ;
202-
203- //phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
204- if ( in_array ( 'cbxgooglemappro/cbxgooglemappro.php ' , apply_filters ( 'active_plugins ' , get_option ( 'active_plugins ' ) ) ) || defined ( 'CBXGOOGLEMAPPRO_PLUGIN_NAME ' ) ) {
205- $ links_array [] = '<a style="color:#39A96B; font-weight: bold;" href="https://codeboxr.com/contact-us/" target="_blank"> ' . esc_attr__ ( 'Pro Support ' , 'cbxgooglemap ' ) . '</a> ' ;
206- } else {
207- $ links_array [] = '<a target="_blank" style="color:#f44336 !important; font-weight: bold;" href="https://codeboxr.com/product/cbx-google-map-for-wordpress/#downloadarea" aria-label=" ' . esc_attr__ ( 'Try Pro Addon ' , 'cbxgooglemap ' ) . '"> ' . esc_html__ ( 'Try Pro Addon ' , 'cbxgooglemap ' ) . '</a> ' ;
208- }
184+ $ links_array [] = '<a style="color:#5d5dff; font-weight: bold;" href="https://wordpress.org/support/plugin/cbxgooglemap/" target="_blank"> ' . esc_attr__ ( 'Free Support ' , 'cbxgooglemap ' ) . '</a> ' ;
185+ $ links_array [] = '<a style="color:#5d5dff; font-weight: bold;" href="https://wordpress.org/plugins/cbxgooglemap/#reviews" target="_blank"> ' . esc_attr__ ( 'Reviews ' , 'cbxgooglemap ' ) . '</a> ' ;
186+ $ links_array [] = '<a target="_blank" style="color:#5d5dff !important; font-weight: bold;" href="https://codeboxr.com/doc/cbxmap-doc/" aria-label=" ' . esc_attr__ ( 'Documentation ' , 'cbxgooglemap ' ) . '"> ' . esc_html__ ( 'Documentation ' , 'cbxgooglemap ' ) . '</a> ' ;
187+ $ links_array [] = '<a style="color:#5d5dff; font-weight: bold;" href="https://codeboxr.com/contact-us/" target="_blank"> ' . esc_attr__ ( 'Pro Support ' , 'cbxgooglemap ' ) . '</a> ' ;
188+ $ links_array [] = '<a target="_blank" style="color:#f44336 !important; font-weight: bold;" href="https://codeboxr.com/product/cbx-google-map-for-wordpress/#downloadarea" aria-label=" ' . esc_attr__ ( 'Try Pro Addon ' , 'cbxgooglemap ' ) . '"> ' . esc_html__ ( 'Try Pro Addon ' , 'cbxgooglemap ' ) . '</a> ' ;
209189 }
210190
211191 return $ links_array ;
@@ -229,7 +209,7 @@ public function custom_message_after_plugin_row_proaddon( $plugin_file, $plugin_
229209 }
230210
231211 $ pro_addon_version = CBXGooglemapHelper::get_any_plugin_version ( 'cbxgooglemappro/cbxgooglemappro.php ' );
232- $ pro_latest_version = ' 2.0.2 ' ;
212+ $ pro_latest_version = CBXGOOGLEMAP_PRO_VERSION ;
233213
234214 if ( $ pro_addon_version != '' && version_compare ( $ pro_addon_version , $ pro_latest_version , '< ' ) ) {
235215 // Custom message to display
0 commit comments