Changeset 3302012
- Timestamp:
- 05/28/2025 08:06:55 AM (10 months ago)
- Location:
- league-table-lite
- Files:
-
- 12 edited
- 1 copied
-
tags/1.20 (copied) (copied from league-table-lite/trunk)
-
tags/1.20/admin/inc/menu/child/class-daextletal-tables-menu-elements.php (modified) (1 diff)
-
tags/1.20/admin/inc/menu/class-daextletal-menu-elements.php (modified) (1 diff)
-
tags/1.20/inc/class-daextletal-rest.php (modified) (1 diff)
-
tags/1.20/init.php (modified) (1 diff)
-
tags/1.20/readme.txt (modified) (2 diffs)
-
tags/1.20/shared/class-daextletal-shared.php (modified) (3 diffs)
-
trunk/admin/inc/menu/child/class-daextletal-tables-menu-elements.php (modified) (1 diff)
-
trunk/admin/inc/menu/class-daextletal-menu-elements.php (modified) (1 diff)
-
trunk/inc/class-daextletal-rest.php (modified) (1 diff)
-
trunk/init.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/shared/class-daextletal-shared.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
league-table-lite/tags/1.20/admin/inc/menu/child/class-daextletal-tables-menu-elements.php
r3294646 r3302012 142 142 $pag = new Daextletal_Pagination( $this->shared ); 143 143 $pag->set_total_items( $total_items );// Set the total number of items. 144 $pag->set_record_per_page( 10); // Set records per page.144 $pag->set_record_per_page( intval( get_option( $this->shared->get( 'slug' ) . '_items_per_page_tables_menu' ) ) ); // Set records per page. 145 145 $pag->set_target_page( 'admin.php?page=' . $this->shared->get( 'slug' ) . '-tables' );// Set target page. 146 146 $pag->set_current_page();// set the current page number from $_GET. -
league-table-lite/tags/1.20/admin/inc/menu/class-daextletal-menu-elements.php
r3294646 r3302012 913 913 // Delete the items. 914 914 global $wpdb; 915 $table_name = $wpdb->prefix . $this->shared->get( 'slug' ) . '_' . $this->db_table;916 915 917 916 if ( count( $delete_id_deletable ) > 0 ) { 918 917 919 // Sanitize the db table name. 920 $table_name = sanitize_key( $table_name ); 921 922 // Sanitize the field name. 923 $primary_key_name = sanitize_key( $this->primary_key ); 924 925 // phpcs:disable WordPress.DB.DirectDatabaseQuery 926 // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- $variables are sanitized above. 927 // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared 928 $query_result = $wpdb->query( 929 "DELETE FROM $table_name WHERE $primary_key_name IN (" . implode( ',', $delete_id_deletable ) . ')' 930 ); 931 // phpcs:enable 918 $deleted_items_count = 0; 919 920 foreach ( $delete_id_deletable as $delete_id ) { 921 // Delete the item in the "_table" menu where the id field matches the current $delete_id. 922 $query_result_table = $wpdb->query( 923 $wpdb->prepare( "DELETE FROM {$wpdb->prefix}daextletal_table WHERE id = %d", $delete_id ) 924 ); 925 926 if ( isset( $query_result_table ) && false !== $query_result_table ) { 927 928 // Get the number of deleted items with $wpdb. 929 $deleted_items_count = $deleted_items_count + $wpdb->rows_affected; 930 931 } 932 933 // Delete the items in the "_data" db table where the table_id matches the current $delete_id. 934 $wpdb->query( 935 $wpdb->prepare( "DELETE FROM {$wpdb->prefix}daextletal_data WHERE table_id = %d", $delete_id ) 936 ); 937 938 // Delete the items in the "_cell" db table where the table_id matches the current $delete_id. 939 $wpdb->query( 940 $wpdb->prepare( "DELETE FROM {$wpdb->prefix}daextletal_cell WHERE table_id = %d", $delete_id ) 941 ); 942 } 932 943 933 944 } 934 945 935 if ( isset( $query_result ) && false !== $query_result ) { 936 937 // Get the number of deleted items with $wpdb. 938 $deleted_items_count = $wpdb->rows_affected; 939 940 $this->shared->save_dismissible_notice( 941 $deleted_items_count . ' ' . __( 'items have been successfully deleted.', 'league-table-lite' ), 942 'updated' 943 ); 944 945 } 946 947 if ( count( $delete_id_non_deletable ) > 0 ) { 948 949 $this->shared->save_dismissible_notice( 950 __( 'The', 'league-table-lite' ) . ' ' . strtolower( $this->label_plural ) . ' ' . __( "with the following IDs are used in one or more automatic internal links and can't be deleted:", 'league-table-lite' ) . ' ' . implode( ', ', $delete_id_non_deletable ) . '.', 951 'error' 952 ); 953 954 } 946 $this->shared->save_dismissible_notice( 947 $deleted_items_count . ' ' . __( 'items have been successfully deleted.', 'league-table-lite' ), 948 'updated' 949 ); 950 955 951 } 956 952 } -
league-table-lite/tags/1.20/inc/class-daextletal-rest.php
r3294646 r3302012 150 150 $options['daextletal_load_google_font_2'] = $request->get_param( 'daextletal_load_google_font_2' ) !== null ? esc_url_raw( $request->get_param( 'daextletal_load_google_font_2' ) ) : null; 151 151 $options['daextletal_max_execution_time'] = $request->get_param( 'daextletal_max_execution_time' ) !== null ? intval( $request->get_param( 'daextletal_max_execution_time' ), 10 ) : null; 152 $options['daextletal_items_per_page_tables_menu'] = $request->get_param( 'daextletal_items_per_page_tables_menu' ) !== null ? intval( $request->get_param( 'daextletal_items_per_page_tables_menu' ), 10 ) : null; 152 153 $options['daextletal_limit_shortcode_parsing'] = $request->get_param( 'daextletal_limit_shortcode_parsing' ) !== null ? intval( $request->get_param( 'daextletal_limit_shortcode_parsing' ), 10 ) : null; 153 154 $options['daextletal_verify_single_shortcode'] = $request->get_param( 'daextletal_verify_single_shortcode' ) !== null ? intval( $request->get_param( 'daextletal_verify_single_shortcode' ), 10 ) : null; -
league-table-lite/tags/1.20/init.php
r3294646 r3302012 3 3 * Plugin Name: League Table 4 4 * Description: Generates tables in your WordPress blog. (Lite version) 5 * Version: 1. 195 * Version: 1.20 6 6 * Author: DAEXT 7 7 * Author URI: https://daext.com -
league-table-lite/tags/1.20/readme.txt
r3294646 r3302012 6 6 Tested up to: 6.8.1 7 7 Requires PHP: 7.2 8 Stable tag: 1. 198 Stable tag: 1.20 9 9 License: GPLv3 10 10 … … 158 158 == Changelog == 159 159 160 = 1.20 = 161 162 *May 28, 2025* 163 164 * Deleting multiple tables from the Tables menu now correctly removes the related records from subsidiary database tables. 165 * You can now define how many items are displayed per page in the Tables menu via a new setting. 166 160 167 = 1.19 = 161 168 -
league-table-lite/tags/1.20/shared/class-daextletal-shared.php
r3294646 r3302012 75 75 76 76 $this->data['slug'] = 'daextletal'; 77 $this->data['ver'] = '1. 19';77 $this->data['ver'] = '1.20'; 78 78 $this->data['dir'] = substr( plugin_dir_path( __FILE__ ), 0, -7 ); 79 79 $this->data['url'] = substr( plugin_dir_url( __FILE__ ), 0, -7 ); … … 98 98 $this->get( 'slug' ) . '_load_google_font_2' => '', 99 99 $this->get( 'slug' ) . '_max_execution_time' => '300', 100 $this->get( 'slug' ) . '_items_per_page_tables_menu' => '10', 100 101 $this->get( 'slug' ) . '_limit_shortcode_parsing' => '1', 101 102 $this->get( 'slug' ) . '_verify_single_shortcode' => '1', … … 1846 1847 ), 1847 1848 array( 1849 'name' => 'daextletal_items_per_page_tables_menu', 1850 'label' => __( 'Items per Page (Tables Menu)', 'league-table-lite' ), 1851 'type' => 'range', 1852 'tooltip' => __( 1853 'This options determines the number of elements per page displayed in the "Tables" menu.', 1854 'league-table-lite' 1855 ), 1856 'help' => __( 'Set the number of elements per page displayed in the "Tables" menu.', 'league-table-lite' ), 1857 'rangeMin' => 10, 1858 'rangeMax' => 100, 1859 'rangeStep' => 10, 1860 ), 1861 array( 1848 1862 'name' => 'daextletal_limit_shortcode_parsing', 1849 1863 'label' => __( 'Limit Shortcode Parsing', 'league-table-lite' ), -
league-table-lite/trunk/admin/inc/menu/child/class-daextletal-tables-menu-elements.php
r3294646 r3302012 142 142 $pag = new Daextletal_Pagination( $this->shared ); 143 143 $pag->set_total_items( $total_items );// Set the total number of items. 144 $pag->set_record_per_page( 10); // Set records per page.144 $pag->set_record_per_page( intval( get_option( $this->shared->get( 'slug' ) . '_items_per_page_tables_menu' ) ) ); // Set records per page. 145 145 $pag->set_target_page( 'admin.php?page=' . $this->shared->get( 'slug' ) . '-tables' );// Set target page. 146 146 $pag->set_current_page();// set the current page number from $_GET. -
league-table-lite/trunk/admin/inc/menu/class-daextletal-menu-elements.php
r3294646 r3302012 913 913 // Delete the items. 914 914 global $wpdb; 915 $table_name = $wpdb->prefix . $this->shared->get( 'slug' ) . '_' . $this->db_table;916 915 917 916 if ( count( $delete_id_deletable ) > 0 ) { 918 917 919 // Sanitize the db table name. 920 $table_name = sanitize_key( $table_name ); 921 922 // Sanitize the field name. 923 $primary_key_name = sanitize_key( $this->primary_key ); 924 925 // phpcs:disable WordPress.DB.DirectDatabaseQuery 926 // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- $variables are sanitized above. 927 // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared 928 $query_result = $wpdb->query( 929 "DELETE FROM $table_name WHERE $primary_key_name IN (" . implode( ',', $delete_id_deletable ) . ')' 930 ); 931 // phpcs:enable 918 $deleted_items_count = 0; 919 920 foreach ( $delete_id_deletable as $delete_id ) { 921 // Delete the item in the "_table" menu where the id field matches the current $delete_id. 922 $query_result_table = $wpdb->query( 923 $wpdb->prepare( "DELETE FROM {$wpdb->prefix}daextletal_table WHERE id = %d", $delete_id ) 924 ); 925 926 if ( isset( $query_result_table ) && false !== $query_result_table ) { 927 928 // Get the number of deleted items with $wpdb. 929 $deleted_items_count = $deleted_items_count + $wpdb->rows_affected; 930 931 } 932 933 // Delete the items in the "_data" db table where the table_id matches the current $delete_id. 934 $wpdb->query( 935 $wpdb->prepare( "DELETE FROM {$wpdb->prefix}daextletal_data WHERE table_id = %d", $delete_id ) 936 ); 937 938 // Delete the items in the "_cell" db table where the table_id matches the current $delete_id. 939 $wpdb->query( 940 $wpdb->prepare( "DELETE FROM {$wpdb->prefix}daextletal_cell WHERE table_id = %d", $delete_id ) 941 ); 942 } 932 943 933 944 } 934 945 935 if ( isset( $query_result ) && false !== $query_result ) { 936 937 // Get the number of deleted items with $wpdb. 938 $deleted_items_count = $wpdb->rows_affected; 939 940 $this->shared->save_dismissible_notice( 941 $deleted_items_count . ' ' . __( 'items have been successfully deleted.', 'league-table-lite' ), 942 'updated' 943 ); 944 945 } 946 947 if ( count( $delete_id_non_deletable ) > 0 ) { 948 949 $this->shared->save_dismissible_notice( 950 __( 'The', 'league-table-lite' ) . ' ' . strtolower( $this->label_plural ) . ' ' . __( "with the following IDs are used in one or more automatic internal links and can't be deleted:", 'league-table-lite' ) . ' ' . implode( ', ', $delete_id_non_deletable ) . '.', 951 'error' 952 ); 953 954 } 946 $this->shared->save_dismissible_notice( 947 $deleted_items_count . ' ' . __( 'items have been successfully deleted.', 'league-table-lite' ), 948 'updated' 949 ); 950 955 951 } 956 952 } -
league-table-lite/trunk/inc/class-daextletal-rest.php
r3294646 r3302012 150 150 $options['daextletal_load_google_font_2'] = $request->get_param( 'daextletal_load_google_font_2' ) !== null ? esc_url_raw( $request->get_param( 'daextletal_load_google_font_2' ) ) : null; 151 151 $options['daextletal_max_execution_time'] = $request->get_param( 'daextletal_max_execution_time' ) !== null ? intval( $request->get_param( 'daextletal_max_execution_time' ), 10 ) : null; 152 $options['daextletal_items_per_page_tables_menu'] = $request->get_param( 'daextletal_items_per_page_tables_menu' ) !== null ? intval( $request->get_param( 'daextletal_items_per_page_tables_menu' ), 10 ) : null; 152 153 $options['daextletal_limit_shortcode_parsing'] = $request->get_param( 'daextletal_limit_shortcode_parsing' ) !== null ? intval( $request->get_param( 'daextletal_limit_shortcode_parsing' ), 10 ) : null; 153 154 $options['daextletal_verify_single_shortcode'] = $request->get_param( 'daextletal_verify_single_shortcode' ) !== null ? intval( $request->get_param( 'daextletal_verify_single_shortcode' ), 10 ) : null; -
league-table-lite/trunk/init.php
r3294646 r3302012 3 3 * Plugin Name: League Table 4 4 * Description: Generates tables in your WordPress blog. (Lite version) 5 * Version: 1. 195 * Version: 1.20 6 6 * Author: DAEXT 7 7 * Author URI: https://daext.com -
league-table-lite/trunk/readme.txt
r3294646 r3302012 6 6 Tested up to: 6.8.1 7 7 Requires PHP: 7.2 8 Stable tag: 1. 198 Stable tag: 1.20 9 9 License: GPLv3 10 10 … … 158 158 == Changelog == 159 159 160 = 1.20 = 161 162 *May 28, 2025* 163 164 * Deleting multiple tables from the Tables menu now correctly removes the related records from subsidiary database tables. 165 * You can now define how many items are displayed per page in the Tables menu via a new setting. 166 160 167 = 1.19 = 161 168 -
league-table-lite/trunk/shared/class-daextletal-shared.php
r3294646 r3302012 75 75 76 76 $this->data['slug'] = 'daextletal'; 77 $this->data['ver'] = '1. 19';77 $this->data['ver'] = '1.20'; 78 78 $this->data['dir'] = substr( plugin_dir_path( __FILE__ ), 0, -7 ); 79 79 $this->data['url'] = substr( plugin_dir_url( __FILE__ ), 0, -7 ); … … 98 98 $this->get( 'slug' ) . '_load_google_font_2' => '', 99 99 $this->get( 'slug' ) . '_max_execution_time' => '300', 100 $this->get( 'slug' ) . '_items_per_page_tables_menu' => '10', 100 101 $this->get( 'slug' ) . '_limit_shortcode_parsing' => '1', 101 102 $this->get( 'slug' ) . '_verify_single_shortcode' => '1', … … 1846 1847 ), 1847 1848 array( 1849 'name' => 'daextletal_items_per_page_tables_menu', 1850 'label' => __( 'Items per Page (Tables Menu)', 'league-table-lite' ), 1851 'type' => 'range', 1852 'tooltip' => __( 1853 'This options determines the number of elements per page displayed in the "Tables" menu.', 1854 'league-table-lite' 1855 ), 1856 'help' => __( 'Set the number of elements per page displayed in the "Tables" menu.', 'league-table-lite' ), 1857 'rangeMin' => 10, 1858 'rangeMax' => 100, 1859 'rangeStep' => 10, 1860 ), 1861 array( 1848 1862 'name' => 'daextletal_limit_shortcode_parsing', 1849 1863 'label' => __( 'Limit Shortcode Parsing', 'league-table-lite' ),
Note: See TracChangeset
for help on using the changeset viewer.