11<?php
2- namespace Cbx \ Bookmark ;
2+ namespace CBXWPBookmark ;
33
4- use Cbx \ Bookmark \CBXWPBookmarkSettings ;
5- //use Cbx\Bookmark \Helpers\CBXWPBookmarkHelper;
4+ use CBXWPBookmark \CBXWPBookmarkSettings ;
5+ //use CBXWPBookmark \Helpers\CBXWPBookmarkHelper;
66
77// If this file is called directly, abort.
88if ( ! defined ( 'WPINC ' ) ) {
@@ -809,10 +809,6 @@ public function add_edit_category() {
809809 public function cbxwpbookmark_autocreate_page () {
810810 check_ajax_referer ( 'cbxbookmarknonce ' , 'security ' );
811811
812- if ( ! class_exists ( 'CBXWPBookmark_Activator ' ) ) {
813- require_once plugin_dir_path ( dirname ( __FILE__ ) ) . 'includes/class-cbxwpbookmark-activator.php ' ;
814- }
815-
816812 //create pages
817813 \CBXWPBookmarkHelper::cbxbookmark_create_pages (); //create the shortcode page
818814
@@ -840,8 +836,6 @@ public function plugin_upgrader_process_complete() {
840836
841837 // Update the saved version
842838 update_option ('cbxwpbookmark_version ' , CBXWPBOOKMARK_PLUGIN_VERSION );
843-
844- //deactivate mycred addon
845839 }
846840 }//end plugin_upgrader_process_complete
847841
@@ -970,6 +964,7 @@ public function pro_addon_compatibility_campaign() {
970964 }
971965
972966 //if the pro addon is active or installed
967+ //phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
973968 if ( in_array ( 'cbxwpbookmarkaddon/cbxwpbookmarkaddon.php ' , apply_filters ( 'active_plugins ' , get_option ( 'active_plugins ' ) ) ) || defined ( 'CBXWPBOOKMARKADDON_PLUGIN_NAME ' ) ) {
974969 //plugin is activated
975970
@@ -986,18 +981,6 @@ public function pro_addon_compatibility_campaign() {
986981 /* translators: %s: bookmark product description url */
987982 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> ' ;
988983 }
989-
990-
991- //if the mycred addon is active or installed
992- if ( in_array ( 'cbxwpbookmarkmycred/cbxwpbookmarkmycred.php.php ' , apply_filters ( 'active_plugins ' , get_option ( 'active_plugins ' ) ) ) || defined ( 'CBXWPBOOKMARKMYCRED_PLUGIN_NAME ' ) ) {
993- //plugin is activated
994-
995- //$plugin_version = CBXWPBOOKMARKMYCRED_PLUGIN_VERSION;
996- } else {
997- /* translators: %s: bookmark mycred plugin description url */
998- echo '<div style="border-left-color: #005ae0;" class="notice notice-success is-dismissible"><p> ' . sprintf ( wp_kses ( __ ( '<a target="_blank" href="%s">CBX Bookmark myCred Addon</a> has myCred integration. try it - Codeboxr Team ' , 'cbxwpbookmark ' ), [ 'a ' => [ 'href ' => [], 'target ' => [] ] ] ), 'https://codeboxr.com/product/cbx-bookmark-mycred-addon/ ' ) . '</p></div> ' ;
999- }
1000-
1001984 }//end pro_addon_compatibility_campaign
1002985
1003986
@@ -1042,6 +1025,7 @@ public function plugin_row_meta( $links_array, $plugin_file_name, $plugin_data,
10421025 $ 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> ' ;
10431026
10441027
1028+ //phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
10451029 if ( in_array ( 'cbxwpbookmarkaddon/cbxwpbookmarkaddon.php ' , apply_filters ( 'active_plugins ' , get_option ( 'active_plugins ' ) ) ) || defined ( 'CBXWPBOOKMARKADDON_PLUGIN_NAME ' ) ) {
10461030
10471031 } else {
@@ -1175,8 +1159,10 @@ public function plugin_reset() {
11751159 global $ wpdb ;
11761160
11771161 foreach ( $ table_names as $ table_name ) {
1162+ $ escaped_table = esc_sql ( $ table_name );
1163+
11781164 //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
1179- $ query_result = $ wpdb ->query ( "DROP TABLE IF EXISTS { $ table_name } " );
1165+ $ query_result = $ wpdb ->query ( "DROP TABLE IF EXISTS ` { $ escaped_table } ` " );
11801166 }
11811167
11821168 do_action ( 'cbxwpbookmark_plugin_tables_deleted_after ' , $ table_names );
0 commit comments