Changeset 3275101
- Timestamp:
- 04/16/2025 07:44:14 PM (9 months ago)
- Location:
- many-tips-together
- Files:
-
- 1 deleted
- 12 edited
- 29 copied
-
. (modified) (1 prop)
-
assets (modified) (1 prop)
-
branches (deleted)
-
tags/3.3.3 (copied) (copied from many-tips-together/trunk) (1 prop)
-
tags/3.3.3/assets/adtw.js (copied) (copied from many-tips-together/trunk/assets/adtw.js)
-
tags/3.3.3/assets/filter-listings.css (modified) (1 diff)
-
tags/3.3.3/assets/filter-plugins.js (copied) (copied from many-tips-together/trunk/assets/filter-plugins.js) (11 diffs)
-
tags/3.3.3/assets/filter-snippets.js (copied) (copied from many-tips-together/trunk/assets/filter-snippets.js)
-
tags/3.3.3/assets/filter-users.js (copied) (copied from many-tips-together/trunk/assets/filter-users.js)
-
tags/3.3.3/assets/filters-common.js (copied) (copied from many-tips-together/trunk/assets/filters-common.js)
-
tags/3.3.3/inc/AdminTweaks.php (copied) (copied from many-tips-together/trunk/inc/AdminTweaks.php) (1 diff)
-
tags/3.3.3/inc/HooksAdminBar.php (copied) (copied from many-tips-together/trunk/inc/HooksAdminBar.php)
-
tags/3.3.3/inc/HooksAdminMenu.php (copied) (copied from many-tips-together/trunk/inc/HooksAdminMenu.php)
-
tags/3.3.3/inc/HooksAppearance.php (copied) (copied from many-tips-together/trunk/inc/HooksAppearance.php)
-
tags/3.3.3/inc/HooksDashboard.php (copied) (copied from many-tips-together/trunk/inc/HooksDashboard.php)
-
tags/3.3.3/inc/HooksGeneral.php (copied) (copied from many-tips-together/trunk/inc/HooksGeneral.php)
-
tags/3.3.3/inc/HooksListings.php (copied) (copied from many-tips-together/trunk/inc/HooksListings.php)
-
tags/3.3.3/inc/HooksLogin.php (copied) (copied from many-tips-together/trunk/inc/HooksLogin.php)
-
tags/3.3.3/inc/HooksMaintenance.php (copied) (copied from many-tips-together/trunk/inc/HooksMaintenance.php)
-
tags/3.3.3/inc/HooksMedia.php (copied) (copied from many-tips-together/trunk/inc/HooksMedia.php)
-
tags/3.3.3/inc/HooksMediaColumns.php (copied) (copied from many-tips-together/trunk/inc/HooksMediaColumns.php)
-
tags/3.3.3/inc/HooksPlugins.php (copied) (copied from many-tips-together/trunk/inc/HooksPlugins.php) (10 diffs)
-
tags/3.3.3/inc/HooksPluginsExtras.php (copied) (copied from many-tips-together/trunk/inc/HooksPluginsExtras.php)
-
tags/3.3.3/inc/HooksUsers.php (copied) (copied from many-tips-together/trunk/inc/HooksUsers.php)
-
tags/3.3.3/inc/SettingsPage.php (copied) (copied from many-tips-together/trunk/inc/SettingsPage.php)
-
tags/3.3.3/inc/redux-core/assets/css/redux-fields.min.css (copied) (copied from many-tips-together/trunk/inc/redux-core/assets/css/redux-fields.min.css)
-
tags/3.3.3/inc/redux-core/assets/css/redux-fields.min.css.map (copied) (copied from many-tips-together/trunk/inc/redux-core/assets/css/redux-fields.min.css.map)
-
tags/3.3.3/inc/redux-core/framework.php (copied) (copied from many-tips-together/trunk/inc/redux-core/framework.php)
-
tags/3.3.3/inc/redux-core/inc/classes/class-redux-output.php (copied) (copied from many-tips-together/trunk/inc/redux-core/inc/classes/class-redux-output.php)
-
tags/3.3.3/inc/redux-core/inc/fields/gallery/class-redux-gallery.php (copied) (copied from many-tips-together/trunk/inc/redux-core/inc/fields/gallery/class-redux-gallery.php)
-
tags/3.3.3/inc/redux-core/inc/fields/typography/class-redux-typography.php (copied) (copied from many-tips-together/trunk/inc/redux-core/inc/fields/typography/class-redux-typography.php)
-
tags/3.3.3/inc/sections/plugins.php (modified) (1 diff)
-
tags/3.3.3/many-tips-together.php (copied) (copied from many-tips-together/trunk/many-tips-together.php) (1 diff)
-
tags/3.3.3/readme.txt (copied) (copied from many-tips-together/trunk/readme.txt) (2 diffs)
-
trunk (modified) (1 prop)
-
trunk/assets/filter-listings.css (modified) (1 diff)
-
trunk/assets/filter-plugins.js (modified) (11 diffs)
-
trunk/inc/AdminTweaks.php (modified) (1 diff)
-
trunk/inc/HooksPlugins.php (modified) (10 diffs)
-
trunk/inc/sections/plugins.php (modified) (1 diff)
-
trunk/many-tips-together.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
many-tips-together
- Property svn:ignore
-
old new 1 svn_status_output.txt 2 update-mos.sh 1 3 update-pots.sh 2 update-mos.sh3 svn_status_output.txt
-
- Property svn:ignore
-
many-tips-together/assets
- Property svn:ignore deleted
-
many-tips-together/tags/3.3.3
- Property svn:ignore deleted
-
many-tips-together/tags/3.3.3/assets/filter-listings.css
r3232350 r3275101 1 button.b5f-button { 2 padding: 0 8px !important; 3 } 1 4 .b5f-active { 2 5 font-weight: 800 !important; -
many-tips-together/tags/3.3.3/assets/filter-plugins.js
r3264772 r3275101 1 1 jQuery(document).ready( $ => { 2 /** 3 * Class for filtering and managing plugins 4 * Handles toggling descriptions, filtering by status (active/inactive/mine), 5 * and searching plugins by keyword. 6 */ 2 7 class PluginsFilter { 8 /** 9 * Initialize the PluginsFilter instance. 10 * Sets up initial state, DOM references, and event listeners. 11 */ 3 12 constructor() { 13 // Retrieve stored preference for hiding descriptions 4 14 this.descCookie = localStorage.getItem('showHideDescPlugins'); 15 // Store the original total count of plugins 5 16 this.oldTotal = $('.displaying-num').eq(0).text(); 17 // Calculate the total plugins (excluding update rows) 6 18 this.calcTotal = $('#the-list tr').length - $('#the-list tr.plugin-update-tr').length; 7 19 20 // Selectors for elements to filter during keyword search 8 21 this.filterSelectors = [ 9 22 'td.plugin-title > strong', … … 12 25 ]; 13 26 27 // Initialize the plugin 14 28 this.init(); 15 29 } 16 30 31 /** 32 * Initialize event listeners and UI components. 33 */ 17 34 init() { 35 // Create custom selectors 18 36 B5F_Common.createCustomSelectors(); 37 // Inject additional HTML into the DOM 19 38 $('div.tablenav.top div.alignleft.actions.bulkactions').after(ADTW.html); 20 39 40 // Prevent default click behavior for filter buttons 21 41 $('#hide-desc,#hide-active,#hide-inactive, #hide-mine').click(e => e.preventDefault()); 42 // Bind click handlers 22 43 $('#hide-desc').click(this.descAction.bind(this)); 23 44 $('#hide-active').click(this.swapClasses.bind(this)); … … 25 46 $('#hide-mine').click(this.swapMines.bind(this)); 26 47 48 // Reset the list when the search input is focused (if empty) 27 49 $("#b5f-plugins-filter").on('focus', e => { 28 50 if ($(e.target).val().length === 0) this.resetList(); 29 51 }); 52 // Filter plugins on input (debounced for performance) 30 53 $("#b5f-plugins-filter").on('input', (e) => { 31 54 B5F_Common.daDelay( … … 38 61 }); 39 62 63 // Reset the list when the close icon is clicked 40 64 $('.close-icon').click(() => { 41 65 this.resetList(); … … 43 67 }); 44 68 69 // Apply description hiding if previously enabled 45 70 if (this.descCookie) $('#hide-desc').click(); 46 71 } 47 72 73 /** 74 * Update the displayed total count of plugins. 75 * Shows either the original count or the filtered count. 76 */ 48 77 updtTotals() { 49 78 let nowTotal = $('#the-list tr:visible').length - $('#the-list tr.plugin-update-tr:visible').length; … … 52 81 } 53 82 83 /** 84 * Toggle plugin descriptions and row actions visibility. 85 * @param {Event} e - The click event. 86 */ 54 87 descAction(e) { 88 let onlyDesc = 'div.plugin-description'; 89 if (ADTW.hide_row_actions) { 90 onlyDesc = onlyDesc + ',div.row-actions'; 91 } 55 92 if (!$(e.target).hasClass('active')) { 56 $( 'div.plugin-description, div.row-actions').hide();93 $(onlyDesc).hide(); 57 94 localStorage.setItem('showHideDescPlugins', true); 58 95 $(e.target).addClass('active b5f-active'); 59 96 } else { 60 $( 'div.plugin-description, div.row-actions').show();97 $(onlyDesc).show(); 61 98 localStorage.removeItem('showHideDescPlugins'); 62 99 $(e.target).removeClass('active b5f-active'); … … 64 101 } 65 102 103 /** 104 * Reset all button titles to their "show" state. 105 */ 66 106 allEData() { 67 107 $('button.b5f-btn-status').each((i,v) => { … … 70 110 } 71 111 112 /** 113 * Toggle visibility of plugins by status (active/inactive). 114 * @param {Event} e - The click event. 115 */ 72 116 swapClasses(e) { 73 117 let status = $(e.target).attr('id').includes('inactive') … … 87 131 } 88 132 133 /** 134 * Toggle visibility of plugins owned by the current user. 135 * @param {Event} e - The click event. 136 */ 89 137 swapMines(e) { 90 138 if (!$(e.target).hasClass('active')) { … … 102 150 } 103 151 152 /** 153 * Reset all filters and show the full plugin list. 154 */ 104 155 resetList() { 105 156 $('tbody#the-list tr').show(); … … 109 160 } 110 161 162 // Instantiate the PluginsFilter class 111 163 new PluginsFilter(); 112 164 }); -
many-tips-together/tags/3.3.3/inc/AdminTweaks.php
r3264772 r3275101 9 9 * Plugin current version 10 10 */ 11 const VERSION = "3.3. 2";11 const VERSION = "3.3.3"; 12 12 13 13 /** -
many-tips-together/tags/3.3.3/inc/HooksPlugins.php
r3264772 r3275101 1 1 <?php 2 2 3 /** 3 4 * MPlugins hooks … … 8 9 namespace ADTW; 9 10 10 class HooksPlugins { 11 /** 12 * Check options and dispatch hooks 13 * 14 * @param array $options 15 * @return void 16 */ 17 public function __construct() { 18 19 # DISABLE PLUGIN UPDATE NOTICES 20 if( ADTW()->getOption('plugins_block_update_notice') ) { 21 add_filter( 22 'pre_site_transient_update_plugins', 11 class HooksPlugins 12 { 13 /** 14 * Check options and dispatch hooks 15 * 16 * @param array $options 17 * @return void 18 */ 19 public function __construct() 20 { 21 22 # DISABLE PLUGIN UPDATE NOTICES 23 if (ADTW()->getOption('plugins_block_update_notice')) { 24 add_filter( 25 'pre_site_transient_update_plugins', 23 26 '__return_null' 24 ); 25 add_action( 'load-plugins.php', function(){ 26 add_action( 27 'pre_current_active_plugins', 28 [$this, 'warn_update_nag_deactivated'], 29 999 30 ); 31 }); 32 } 33 34 # DISABLE INACTIVE PLUGIN UPDATE NOTICES 35 if( ADTW()->getOption('plugins_block_update_inactive_plugins') && !is_multisite() ) { 36 add_filter( 37 'site_transient_update_plugins', 38 [$this, 'remove_update_nag_for_deactivated'] 39 ); 40 add_action( 'load-plugins.php', function(){ 41 add_action( 42 'pre_current_active_plugins', 27 ); 28 add_action('load-plugins.php', function () { 29 add_action( 30 'pre_current_active_plugins', 43 31 [$this, 'warn_update_nag_deactivated'], 44 32 999 … … 46 34 }); 47 35 } 48 49 # DISABLE EMAIL AUTO-UPDATE NOTICES 50 if( ADTW()->getOption('plugins_block_emails_updates') ) { 51 add_filter( 52 'auto_plugin_update_send_email', 36 37 # DISABLE INACTIVE PLUGIN UPDATE NOTICES 38 if (ADTW()->getOption('plugins_block_update_inactive_plugins') && !is_multisite()) { 39 add_filter( 40 'site_transient_update_plugins', 41 [$this, 'remove_update_nag_for_deactivated'] 42 ); 43 add_action('load-plugins.php', function () { 44 add_action( 45 'pre_current_active_plugins', 46 [$this, 'warn_update_nag_deactivated'], 47 999 48 ); 49 }); 50 } 51 52 # DISABLE EMAIL AUTO-UPDATE NOTICES 53 if (ADTW()->getOption('plugins_block_emails_updates')) { 54 add_filter( 55 'auto_plugin_update_send_email', 53 56 '__return_false' 54 );55 } 56 57 # FILTER BY58 if( ADTW()->getOption('plugins_live_filter')) {59 add_action( 60 'admin_print_footer_scripts-plugins.php', 57 ); 58 } 59 60 # FILTER BY 61 if (ADTW()->getOption('plugins_live_filter')) { 62 add_action( 63 'admin_print_footer_scripts-plugins.php', 61 64 [$this, 'printFilterPlugins'] 62 65 ); 63 66 } 64 67 65 # ADD LAST UPDATED INFORMATION66 if( ADTW()->getOption('plugins_add_last_updated')) {67 add_filter(68 'plugin_row_meta', 68 # ADD LAST UPDATED INFORMATION 69 if (ADTW()->getOption('plugins_add_last_updated')) { 70 add_filter( 71 'plugin_row_meta', 69 72 [$this, 'lastUpdated'], 70 10, 4 71 ); 73 10, 74 4 75 ); 72 76 } 73 77 74 78 # ALL CSS and JS OPTIONS CHECKED INSIDE 75 add_action(76 'admin_head-plugins.php', 79 add_action( 80 'admin_head-plugins.php', 77 81 [$this, 'pluginsCSSJS'] 78 ); 79 } 80 81 /** 82 * CSS and JS for Filter By 83 */ 84 public function printFilterPlugins() { 82 ); 83 } 84 85 /** 86 * CSS and JS for Filter By 87 */ 88 public function printFilterPlugins() 89 { 85 90 $assets = ADTW_URL . '/assets'; 86 wp_register_style( 87 'mtt-filterby', 88 "$assets/filter-listings.css", 89 [], 90 ADTW()->cache('filter-listings.css') 91 );92 wp_register_script( 93 'mtt-filters', 94 "$assets/filters-common.js", 95 [], 96 ADTW()->cache('filters-common.js')97 );98 wp_register_script( 99 'mtt-filterby', 100 "$assets/filter-plugins.js", 101 ['mtt-filters', 'jquery'], 102 ADTW()->cache('filter-plugins.js') 103 );104 wp_enqueue_style( 'mtt-filterby');105 wp_enqueue_script( 'mtt-filterby');106 107 wp_add_inline_script( 108 'mtt-filterby', 91 wp_register_style( 92 'mtt-filterby', 93 "$assets/filter-listings.css", 94 [], 95 ADTW()->cache('filter-listings.css') 96 ); 97 wp_register_script( 98 'mtt-filters', 99 "$assets/filters-common.js", 100 [], 101 ADTW()->cache('filters-common.js') 102 ); 103 wp_register_script( 104 'mtt-filterby', 105 "$assets/filter-plugins.js", 106 ['mtt-filters', 'jquery'], 107 ADTW()->cache('filter-plugins.js') 108 ); 109 wp_enqueue_style('mtt-filterby'); 110 wp_enqueue_script('mtt-filterby'); 111 112 wp_add_inline_script( 113 'mtt-filterby', 109 114 'const ADTW = ' . json_encode([ 110 115 'html' => $this->_filtersHtml(), 111 'plugin_users' => ADTW()->getOption('plugins_my_plugins_names') 112 ]), 113 'before' 114 ); 115 } 116 'plugin_users' => ADTW()->getOption('plugins_my_plugins_names'), 117 'hide_row_actions' => ADTW()->getOption('plugins_live_description') 118 ]), 119 'before' 120 ); 121 } 116 122 117 123 private function _filtersHtml() … … 135 141 // Build the mine button conditionally 136 142 $mine_button = ''; 137 if ( !empty(ADTW()->getOption('plugins_my_plugins_bg_color')) && !empty(ADTW()->getOption('plugins_my_plugins_names'))) {143 if (!empty(ADTW()->getOption('plugins_my_plugins_bg_color')) && !empty(ADTW()->getOption('plugins_my_plugins_names'))) { 138 144 $mine_button = sprintf( 139 145 '<button id="hide-mine" class="button b5f-button b5f-btn-status" … … 231 237 <button class="close-icon" type="reset"></button> 232 238 </div>', 233 'by ' .AdminTweaks::NAME, #1239 'by ' . AdminTweaks::NAME, #1 234 240 esc_html__('Show descriptions', 'mtt'), #2 235 241 esc_html__('Hide descriptions', 'mtt'), #3 … … 239 245 esc_html__('Active', 'mtt'), #7 240 246 esc_html__('Show inactive', 'mtt'), #9 241 esc_html__('Inactive', 'mtt'), 247 esc_html__('Inactive', 'mtt'), 242 248 esc_html__('filter by keyword', 'mtt'), 243 249 esc_html__('enter a string to filter the list', 'mtt'), … … 247 253 } 248 254 249 public function warn_update_nag_deactivated(){ 255 public function warn_update_nag_deactivated() 256 { 250 257 $setts = sprintf( 251 258 '<a href="%s">(%s)</a>', 252 259 admin_url('admin.php?page=admintweaks&tab=8'), 253 __('settings', 'mtt')254 ); 255 if ( ADTW()->getOption('plugins_block_update_inactive_plugins')) {260 __('settings', 'mtt') 261 ); 262 if (ADTW()->getOption('plugins_block_update_inactive_plugins')) { 256 263 # deactivated only 257 264 $base = __('UPDATES NOT SHOWING for disabled plugins', 'mtt'); 258 } else if ( ADTW()->getOption('plugins_block_update_notice')) {265 } else if (ADTW()->getOption('plugins_block_update_notice')) { 259 266 # all plugins 260 267 $base = __('UPDATES NOT SHOWING for all plugins', 'mtt'); … … 263 270 } 264 271 265 /** 266 * Remove update notice for desactived plugins 267 * Tip via: https://wordpress.stackexchange.com/a/77155/12615 268 * 269 * @param type $value 270 * @return type 271 */ 272 public function remove_update_nag_for_deactivated( $value ) { 273 if( empty( $value ) || empty( $value->response ) ) 274 return $value; 272 /** 273 * Remove update notice for desactived plugins 274 * Tip via: https://wordpress.stackexchange.com/a/77155/12615 275 * 276 * @param type $value 277 * @return type 278 */ 279 public function remove_update_nag_for_deactivated($value) 280 { 281 if (empty($value) || empty($value->response)) 282 return $value; 275 283 if (!function_exists('is_plugin_active')) { 276 284 include_once(ABSPATH . 'wp-admin/includes/plugin.php'); 277 285 } 278 foreach( $value->response as $key => $val ) { 279 if( !\is_plugin_active( $val->plugin ) ) 280 unset( $value->response[$key] ); 281 } 282 return $value; 283 } 284 285 286 /** 287 * Remove Action Links 288 * 289 * @return empty 290 */ 291 public function remove_action_links() { 292 return; 293 } 294 295 296 /** 297 * Add Last Updated information to the Meta row (author, plugin url) 298 * 299 * @param string $plugin_meta 300 * @param type $plugin_file 301 * @return string 302 */ 303 public function lastUpdated( $plugin_meta, $pluginfile, $plugin_data, $status ) { 304 // If Multisite, only show in network admin 305 if( is_multisite() && !is_network_admin() ) 306 return $plugin_meta; 307 308 list( $slug ) = explode( '/', $pluginfile ); 309 310 $slug_hash = md5( $slug ); 311 $last_updated = get_transient( "range_plu_{$slug_hash}" ); 312 if( false === $last_updated ) 313 { 314 $last_updated = $this->get_last_updated( $slug ); 315 set_transient( "range_plu_{$slug_hash}", $last_updated, 86400 ); 316 } 317 318 if( $last_updated ) 319 $plugin_meta['last_updated'] = '<br>' . esc_html__( 'Last Updated', 'mtt' ) 320 . esc_html( ': ' . $last_updated ); 321 322 return $plugin_meta; 323 } 324 325 326 /** 327 * Custom CSS for Plugins page 328 * 329 * @return string Echo 330 */ 331 public function pluginsCSSJS() 332 { 333 $display_count = ADTW()->getOption('plugins_my_plugins_count'); 334 335 // GENERAL OUTPUT 336 $output = ''; 337 338 // UPDATE NOTICE 339 if( ADTW()->getOption('plugins_remove_plugin_notice') ) 340 $output .= '.update-message{display:none;} '; 341 342 // INACTIVE 343 if( ADTW()->getOption('plugins_inactive_bg_color') ) 344 $output .= 'tr.inactive {background-color:' . ADTW()->getOption('plugins_inactive_bg_color') . ' !important;}'; 345 346 if( !empty($output) ) { 347 echo '<style type="text/css">' . $output . ' </style>' . "\r\n"; 286 foreach ($value->response as $key => $val) { 287 if (!\is_plugin_active($val->plugin)) 288 unset($value->response[$key]); 289 } 290 return $value; 291 } 292 293 294 /** 295 * Remove Action Links 296 * 297 * @return empty 298 */ 299 public function remove_action_links() 300 { 301 return; 302 } 303 304 305 /** 306 * Add Last Updated information to the Meta row (author, plugin url) 307 * 308 * @param string $plugin_meta 309 * @param type $plugin_file 310 * @return string 311 */ 312 public function lastUpdated($plugin_meta, $pluginfile, $plugin_data, $status) 313 { 314 // If Multisite, only show in network admin 315 if (is_multisite() && !is_network_admin()) 316 return $plugin_meta; 317 318 list($slug) = explode('/', $pluginfile); 319 320 $slug_hash = md5($slug); 321 $last_updated = get_transient("range_plu_{$slug_hash}"); 322 if (false === $last_updated) { 323 $last_updated = $this->get_last_updated($slug); 324 set_transient("range_plu_{$slug_hash}", $last_updated, 86400); 325 } 326 327 if ($last_updated) 328 $plugin_meta['last_updated'] = '<br>' . esc_html__('Last Updated', 'mtt') 329 . esc_html(': ' . $last_updated); 330 331 return $plugin_meta; 332 } 333 334 335 /** 336 * Custom CSS for Plugins page 337 * 338 * @return string Echo 339 */ 340 public function pluginsCSSJS() 341 { 342 $display_count = ADTW()->getOption('plugins_my_plugins_count'); 343 344 // GENERAL OUTPUT 345 $output = ''; 346 347 // UPDATE NOTICE 348 if (ADTW()->getOption('plugins_remove_plugin_notice')) 349 $output .= '.update-message{display:none;} '; 350 351 // INACTIVE 352 if (ADTW()->getOption('plugins_inactive_bg_color')) 353 $output .= 'tr.inactive {background-color:' . ADTW()->getOption('plugins_inactive_bg_color') . ' !important;}'; 354 355 if (!empty($output)) { 356 echo '<style type="text/css">' . $output . ' </style>' . "\r\n"; 348 357 } 349 358 // YOUR PLUGINS COLOR 350 if( ADTW()->getOption('plugins_my_plugins_bg_color') 351 && ADTW()->getOption('plugins_my_plugins_names') 352 && ADTW()->getOption('plugins_my_plugins_color') 353 ) { 354 $authors = explode( ',', ADTW()->getOption('plugins_my_plugins_names')); 355 356 $jq = array( ); 357 foreach( $authors as $author ) { 359 if ( 360 ADTW()->getOption('plugins_my_plugins_bg_color') 361 && ADTW()->getOption('plugins_my_plugins_names') 362 && ADTW()->getOption('plugins_my_plugins_color') 363 ) { 364 $authors = explode(',', ADTW()->getOption('plugins_my_plugins_names')); 365 366 $jq = array(); 367 foreach ($authors as $author) { 358 368 $jq[] = "tr td.column-description:Contains('{$author}')"; 359 369 } 360 $jq_ok = implode( ',', $jq);361 $by_author = esc_html__( 'by selected author(s)', 'mtt');362 ?>370 $jq_ok = implode(',', $jq); 371 $by_author = esc_html__('by selected author(s)', 'mtt'); 372 ?> 363 373 <script type="text/javascript"> 364 374 // https://css-tricks.com/snippets/jquery/make-jquery-contains-case-insensitive/ … … 368 378 }; 369 379 jQuery(document).ready(function($) { 370 <?php if ( $display_count): ?>380 <?php if ($display_count): ?> 371 381 // Display author count 372 382 var atual = $('.displaying-num').html(); 373 $('.displaying-num').html( atual+' : '+$("#the-list").find("<?php echo $jq_ok; ?>").length + ' ' + '<?php echo $by_author; ?>');383 $('.displaying-num').html(atual + ' : ' + $("#the-list").find("<?php echo $jq_ok; ?>").length + ' ' + '<?php echo $by_author; ?>'); 374 384 <?php endif; ?> 375 385 376 386 // Modify the plugin rows background 377 387 $("<?php echo $jq_ok; ?>").each(function() { … … 387 397 }); 388 398 </script> 389 <?php 390 } 391 } 392 393 394 /** 395 * Query WP API 396 * from the plugin https://wordpress.org/plugins/plugin-last-updated/ 397 * 398 * @param type $slug 399 * @return boolean|string 400 */ 401 private function get_last_updated( $slug ) 402 { 403 $request = wp_remote_post( 404 'https://api.wordpress.org/plugins/info/1.0/', array( 405 'body' => array( 406 'action' => 'plugin_information', 407 'request' => serialize( 408 (object) array( 409 'slug' => $slug, 410 'fields' => array( 'last_updated' => true ) 399 <?php 400 } 401 } 402 403 404 /** 405 * Query WP API 406 * from the plugin https://wordpress.org/plugins/plugin-last-updated/ 407 * 408 * @param type $slug 409 * @return boolean|string 410 */ 411 private function get_last_updated($slug) 412 { 413 $request = wp_remote_post( 414 'https://api.wordpress.org/plugins/info/1.0/', 415 array( 416 'body' => array( 417 'action' => 'plugin_information', 418 'request' => serialize( 419 (object) array( 420 'slug' => $slug, 421 'fields' => array('last_updated' => true) 422 ) 411 423 ) 412 ) 413 )) 414 ); 415 if( 200 != wp_remote_retrieve_response_code( $request ) ) 416 return false; 417 418 $response = unserialize( wp_remote_retrieve_body( $request ) ); 419 // Return an empty but cachable response if the plugin isn't in the .org repo 420 if( empty( $response ) ) 421 return ''; 422 if( isset( $response->last_updated ) ) 423 return sanitize_text_field( $response->last_updated ); 424 425 return false; 426 } 427 424 ) 425 ) 426 ); 427 if (200 != wp_remote_retrieve_response_code($request)) 428 return false; 429 430 $response = unserialize(wp_remote_retrieve_body($request)); 431 // Return an empty but cachable response if the plugin isn't in the .org repo 432 if (empty($response)) 433 return ''; 434 if (isset($response->last_updated)) 435 return sanitize_text_field($response->last_updated); 436 437 return false; 438 } 428 439 } -
many-tips-together/tags/3.3.3/inc/sections/plugins.php
r3232350 r3275101 152 152 ) 153 153 ), 154 array( # Hide description 155 'id' => 'plugins_live_description', 156 'type' => 'switch', 157 'title' => esc_html__('Also hide row actions, not only descriptions', 'mtt'), 158 'default' => false, 159 'on' => esc_html__('On', 'mtt'), 160 'off' => esc_html__('Off', 'mtt'), 161 'required' => array('plugins_live_filter', '=', true), 162 ), 154 163 // MS: don't show 155 164 array( # Block Upgrade check for all -
many-tips-together/tags/3.3.3/many-tips-together.php
r3264772 r3275101 4 4 * Plugin URI: https://wordpress.org/plugins/many-tips-together 5 5 * Description: Tweak, style, remove and modify several aspects of your WordPress administrative interface. 6 * Version: 3.3. 26 * Version: 3.3.3 7 7 * Author: Rodolfo Buaiz 8 8 * Author URI: https://brasofilo.com/ -
many-tips-together/tags/3.3.3/readme.txt
r3268155 r3275101 3 3 Tags: customize, admin interface, profile, login, maintenance mode 4 4 Requires at least: 5.0 5 Tested up to: 6. 7.16 Stable tag: 3.3. 25 Tested up to: 6.8 6 Stable tag: 3.3.3 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 66 66 67 67 == Changelog == 68 69 **Version 3.3.3** 70 71 * Improved plugin filtering: better show/hide descriptions 68 72 69 73 **Version 3.3.2** -
many-tips-together/trunk
- Property svn:ignore deleted
-
many-tips-together/trunk/assets/filter-listings.css
r3232350 r3275101 1 button.b5f-button { 2 padding: 0 8px !important; 3 } 1 4 .b5f-active { 2 5 font-weight: 800 !important; -
many-tips-together/trunk/assets/filter-plugins.js
r3264772 r3275101 1 1 jQuery(document).ready( $ => { 2 /** 3 * Class for filtering and managing plugins 4 * Handles toggling descriptions, filtering by status (active/inactive/mine), 5 * and searching plugins by keyword. 6 */ 2 7 class PluginsFilter { 8 /** 9 * Initialize the PluginsFilter instance. 10 * Sets up initial state, DOM references, and event listeners. 11 */ 3 12 constructor() { 13 // Retrieve stored preference for hiding descriptions 4 14 this.descCookie = localStorage.getItem('showHideDescPlugins'); 15 // Store the original total count of plugins 5 16 this.oldTotal = $('.displaying-num').eq(0).text(); 17 // Calculate the total plugins (excluding update rows) 6 18 this.calcTotal = $('#the-list tr').length - $('#the-list tr.plugin-update-tr').length; 7 19 20 // Selectors for elements to filter during keyword search 8 21 this.filterSelectors = [ 9 22 'td.plugin-title > strong', … … 12 25 ]; 13 26 27 // Initialize the plugin 14 28 this.init(); 15 29 } 16 30 31 /** 32 * Initialize event listeners and UI components. 33 */ 17 34 init() { 35 // Create custom selectors 18 36 B5F_Common.createCustomSelectors(); 37 // Inject additional HTML into the DOM 19 38 $('div.tablenav.top div.alignleft.actions.bulkactions').after(ADTW.html); 20 39 40 // Prevent default click behavior for filter buttons 21 41 $('#hide-desc,#hide-active,#hide-inactive, #hide-mine').click(e => e.preventDefault()); 42 // Bind click handlers 22 43 $('#hide-desc').click(this.descAction.bind(this)); 23 44 $('#hide-active').click(this.swapClasses.bind(this)); … … 25 46 $('#hide-mine').click(this.swapMines.bind(this)); 26 47 48 // Reset the list when the search input is focused (if empty) 27 49 $("#b5f-plugins-filter").on('focus', e => { 28 50 if ($(e.target).val().length === 0) this.resetList(); 29 51 }); 52 // Filter plugins on input (debounced for performance) 30 53 $("#b5f-plugins-filter").on('input', (e) => { 31 54 B5F_Common.daDelay( … … 38 61 }); 39 62 63 // Reset the list when the close icon is clicked 40 64 $('.close-icon').click(() => { 41 65 this.resetList(); … … 43 67 }); 44 68 69 // Apply description hiding if previously enabled 45 70 if (this.descCookie) $('#hide-desc').click(); 46 71 } 47 72 73 /** 74 * Update the displayed total count of plugins. 75 * Shows either the original count or the filtered count. 76 */ 48 77 updtTotals() { 49 78 let nowTotal = $('#the-list tr:visible').length - $('#the-list tr.plugin-update-tr:visible').length; … … 52 81 } 53 82 83 /** 84 * Toggle plugin descriptions and row actions visibility. 85 * @param {Event} e - The click event. 86 */ 54 87 descAction(e) { 88 let onlyDesc = 'div.plugin-description'; 89 if (ADTW.hide_row_actions) { 90 onlyDesc = onlyDesc + ',div.row-actions'; 91 } 55 92 if (!$(e.target).hasClass('active')) { 56 $( 'div.plugin-description, div.row-actions').hide();93 $(onlyDesc).hide(); 57 94 localStorage.setItem('showHideDescPlugins', true); 58 95 $(e.target).addClass('active b5f-active'); 59 96 } else { 60 $( 'div.plugin-description, div.row-actions').show();97 $(onlyDesc).show(); 61 98 localStorage.removeItem('showHideDescPlugins'); 62 99 $(e.target).removeClass('active b5f-active'); … … 64 101 } 65 102 103 /** 104 * Reset all button titles to their "show" state. 105 */ 66 106 allEData() { 67 107 $('button.b5f-btn-status').each((i,v) => { … … 70 110 } 71 111 112 /** 113 * Toggle visibility of plugins by status (active/inactive). 114 * @param {Event} e - The click event. 115 */ 72 116 swapClasses(e) { 73 117 let status = $(e.target).attr('id').includes('inactive') … … 87 131 } 88 132 133 /** 134 * Toggle visibility of plugins owned by the current user. 135 * @param {Event} e - The click event. 136 */ 89 137 swapMines(e) { 90 138 if (!$(e.target).hasClass('active')) { … … 102 150 } 103 151 152 /** 153 * Reset all filters and show the full plugin list. 154 */ 104 155 resetList() { 105 156 $('tbody#the-list tr').show(); … … 109 160 } 110 161 162 // Instantiate the PluginsFilter class 111 163 new PluginsFilter(); 112 164 }); -
many-tips-together/trunk/inc/AdminTweaks.php
r3264772 r3275101 9 9 * Plugin current version 10 10 */ 11 const VERSION = "3.3. 2";11 const VERSION = "3.3.3"; 12 12 13 13 /** -
many-tips-together/trunk/inc/HooksPlugins.php
r3264772 r3275101 1 1 <?php 2 2 3 /** 3 4 * MPlugins hooks … … 8 9 namespace ADTW; 9 10 10 class HooksPlugins { 11 /** 12 * Check options and dispatch hooks 13 * 14 * @param array $options 15 * @return void 16 */ 17 public function __construct() { 18 19 # DISABLE PLUGIN UPDATE NOTICES 20 if( ADTW()->getOption('plugins_block_update_notice') ) { 21 add_filter( 22 'pre_site_transient_update_plugins', 11 class HooksPlugins 12 { 13 /** 14 * Check options and dispatch hooks 15 * 16 * @param array $options 17 * @return void 18 */ 19 public function __construct() 20 { 21 22 # DISABLE PLUGIN UPDATE NOTICES 23 if (ADTW()->getOption('plugins_block_update_notice')) { 24 add_filter( 25 'pre_site_transient_update_plugins', 23 26 '__return_null' 24 ); 25 add_action( 'load-plugins.php', function(){ 26 add_action( 27 'pre_current_active_plugins', 28 [$this, 'warn_update_nag_deactivated'], 29 999 30 ); 31 }); 32 } 33 34 # DISABLE INACTIVE PLUGIN UPDATE NOTICES 35 if( ADTW()->getOption('plugins_block_update_inactive_plugins') && !is_multisite() ) { 36 add_filter( 37 'site_transient_update_plugins', 38 [$this, 'remove_update_nag_for_deactivated'] 39 ); 40 add_action( 'load-plugins.php', function(){ 41 add_action( 42 'pre_current_active_plugins', 27 ); 28 add_action('load-plugins.php', function () { 29 add_action( 30 'pre_current_active_plugins', 43 31 [$this, 'warn_update_nag_deactivated'], 44 32 999 … … 46 34 }); 47 35 } 48 49 # DISABLE EMAIL AUTO-UPDATE NOTICES 50 if( ADTW()->getOption('plugins_block_emails_updates') ) { 51 add_filter( 52 'auto_plugin_update_send_email', 36 37 # DISABLE INACTIVE PLUGIN UPDATE NOTICES 38 if (ADTW()->getOption('plugins_block_update_inactive_plugins') && !is_multisite()) { 39 add_filter( 40 'site_transient_update_plugins', 41 [$this, 'remove_update_nag_for_deactivated'] 42 ); 43 add_action('load-plugins.php', function () { 44 add_action( 45 'pre_current_active_plugins', 46 [$this, 'warn_update_nag_deactivated'], 47 999 48 ); 49 }); 50 } 51 52 # DISABLE EMAIL AUTO-UPDATE NOTICES 53 if (ADTW()->getOption('plugins_block_emails_updates')) { 54 add_filter( 55 'auto_plugin_update_send_email', 53 56 '__return_false' 54 );55 } 56 57 # FILTER BY58 if( ADTW()->getOption('plugins_live_filter')) {59 add_action( 60 'admin_print_footer_scripts-plugins.php', 57 ); 58 } 59 60 # FILTER BY 61 if (ADTW()->getOption('plugins_live_filter')) { 62 add_action( 63 'admin_print_footer_scripts-plugins.php', 61 64 [$this, 'printFilterPlugins'] 62 65 ); 63 66 } 64 67 65 # ADD LAST UPDATED INFORMATION66 if( ADTW()->getOption('plugins_add_last_updated')) {67 add_filter(68 'plugin_row_meta', 68 # ADD LAST UPDATED INFORMATION 69 if (ADTW()->getOption('plugins_add_last_updated')) { 70 add_filter( 71 'plugin_row_meta', 69 72 [$this, 'lastUpdated'], 70 10, 4 71 ); 73 10, 74 4 75 ); 72 76 } 73 77 74 78 # ALL CSS and JS OPTIONS CHECKED INSIDE 75 add_action(76 'admin_head-plugins.php', 79 add_action( 80 'admin_head-plugins.php', 77 81 [$this, 'pluginsCSSJS'] 78 ); 79 } 80 81 /** 82 * CSS and JS for Filter By 83 */ 84 public function printFilterPlugins() { 82 ); 83 } 84 85 /** 86 * CSS and JS for Filter By 87 */ 88 public function printFilterPlugins() 89 { 85 90 $assets = ADTW_URL . '/assets'; 86 wp_register_style( 87 'mtt-filterby', 88 "$assets/filter-listings.css", 89 [], 90 ADTW()->cache('filter-listings.css') 91 );92 wp_register_script( 93 'mtt-filters', 94 "$assets/filters-common.js", 95 [], 96 ADTW()->cache('filters-common.js')97 );98 wp_register_script( 99 'mtt-filterby', 100 "$assets/filter-plugins.js", 101 ['mtt-filters', 'jquery'], 102 ADTW()->cache('filter-plugins.js') 103 );104 wp_enqueue_style( 'mtt-filterby');105 wp_enqueue_script( 'mtt-filterby');106 107 wp_add_inline_script( 108 'mtt-filterby', 91 wp_register_style( 92 'mtt-filterby', 93 "$assets/filter-listings.css", 94 [], 95 ADTW()->cache('filter-listings.css') 96 ); 97 wp_register_script( 98 'mtt-filters', 99 "$assets/filters-common.js", 100 [], 101 ADTW()->cache('filters-common.js') 102 ); 103 wp_register_script( 104 'mtt-filterby', 105 "$assets/filter-plugins.js", 106 ['mtt-filters', 'jquery'], 107 ADTW()->cache('filter-plugins.js') 108 ); 109 wp_enqueue_style('mtt-filterby'); 110 wp_enqueue_script('mtt-filterby'); 111 112 wp_add_inline_script( 113 'mtt-filterby', 109 114 'const ADTW = ' . json_encode([ 110 115 'html' => $this->_filtersHtml(), 111 'plugin_users' => ADTW()->getOption('plugins_my_plugins_names') 112 ]), 113 'before' 114 ); 115 } 116 'plugin_users' => ADTW()->getOption('plugins_my_plugins_names'), 117 'hide_row_actions' => ADTW()->getOption('plugins_live_description') 118 ]), 119 'before' 120 ); 121 } 116 122 117 123 private function _filtersHtml() … … 135 141 // Build the mine button conditionally 136 142 $mine_button = ''; 137 if ( !empty(ADTW()->getOption('plugins_my_plugins_bg_color')) && !empty(ADTW()->getOption('plugins_my_plugins_names'))) {143 if (!empty(ADTW()->getOption('plugins_my_plugins_bg_color')) && !empty(ADTW()->getOption('plugins_my_plugins_names'))) { 138 144 $mine_button = sprintf( 139 145 '<button id="hide-mine" class="button b5f-button b5f-btn-status" … … 231 237 <button class="close-icon" type="reset"></button> 232 238 </div>', 233 'by ' .AdminTweaks::NAME, #1239 'by ' . AdminTweaks::NAME, #1 234 240 esc_html__('Show descriptions', 'mtt'), #2 235 241 esc_html__('Hide descriptions', 'mtt'), #3 … … 239 245 esc_html__('Active', 'mtt'), #7 240 246 esc_html__('Show inactive', 'mtt'), #9 241 esc_html__('Inactive', 'mtt'), 247 esc_html__('Inactive', 'mtt'), 242 248 esc_html__('filter by keyword', 'mtt'), 243 249 esc_html__('enter a string to filter the list', 'mtt'), … … 247 253 } 248 254 249 public function warn_update_nag_deactivated(){ 255 public function warn_update_nag_deactivated() 256 { 250 257 $setts = sprintf( 251 258 '<a href="%s">(%s)</a>', 252 259 admin_url('admin.php?page=admintweaks&tab=8'), 253 __('settings', 'mtt')254 ); 255 if ( ADTW()->getOption('plugins_block_update_inactive_plugins')) {260 __('settings', 'mtt') 261 ); 262 if (ADTW()->getOption('plugins_block_update_inactive_plugins')) { 256 263 # deactivated only 257 264 $base = __('UPDATES NOT SHOWING for disabled plugins', 'mtt'); 258 } else if ( ADTW()->getOption('plugins_block_update_notice')) {265 } else if (ADTW()->getOption('plugins_block_update_notice')) { 259 266 # all plugins 260 267 $base = __('UPDATES NOT SHOWING for all plugins', 'mtt'); … … 263 270 } 264 271 265 /** 266 * Remove update notice for desactived plugins 267 * Tip via: https://wordpress.stackexchange.com/a/77155/12615 268 * 269 * @param type $value 270 * @return type 271 */ 272 public function remove_update_nag_for_deactivated( $value ) { 273 if( empty( $value ) || empty( $value->response ) ) 274 return $value; 272 /** 273 * Remove update notice for desactived plugins 274 * Tip via: https://wordpress.stackexchange.com/a/77155/12615 275 * 276 * @param type $value 277 * @return type 278 */ 279 public function remove_update_nag_for_deactivated($value) 280 { 281 if (empty($value) || empty($value->response)) 282 return $value; 275 283 if (!function_exists('is_plugin_active')) { 276 284 include_once(ABSPATH . 'wp-admin/includes/plugin.php'); 277 285 } 278 foreach( $value->response as $key => $val ) { 279 if( !\is_plugin_active( $val->plugin ) ) 280 unset( $value->response[$key] ); 281 } 282 return $value; 283 } 284 285 286 /** 287 * Remove Action Links 288 * 289 * @return empty 290 */ 291 public function remove_action_links() { 292 return; 293 } 294 295 296 /** 297 * Add Last Updated information to the Meta row (author, plugin url) 298 * 299 * @param string $plugin_meta 300 * @param type $plugin_file 301 * @return string 302 */ 303 public function lastUpdated( $plugin_meta, $pluginfile, $plugin_data, $status ) { 304 // If Multisite, only show in network admin 305 if( is_multisite() && !is_network_admin() ) 306 return $plugin_meta; 307 308 list( $slug ) = explode( '/', $pluginfile ); 309 310 $slug_hash = md5( $slug ); 311 $last_updated = get_transient( "range_plu_{$slug_hash}" ); 312 if( false === $last_updated ) 313 { 314 $last_updated = $this->get_last_updated( $slug ); 315 set_transient( "range_plu_{$slug_hash}", $last_updated, 86400 ); 316 } 317 318 if( $last_updated ) 319 $plugin_meta['last_updated'] = '<br>' . esc_html__( 'Last Updated', 'mtt' ) 320 . esc_html( ': ' . $last_updated ); 321 322 return $plugin_meta; 323 } 324 325 326 /** 327 * Custom CSS for Plugins page 328 * 329 * @return string Echo 330 */ 331 public function pluginsCSSJS() 332 { 333 $display_count = ADTW()->getOption('plugins_my_plugins_count'); 334 335 // GENERAL OUTPUT 336 $output = ''; 337 338 // UPDATE NOTICE 339 if( ADTW()->getOption('plugins_remove_plugin_notice') ) 340 $output .= '.update-message{display:none;} '; 341 342 // INACTIVE 343 if( ADTW()->getOption('plugins_inactive_bg_color') ) 344 $output .= 'tr.inactive {background-color:' . ADTW()->getOption('plugins_inactive_bg_color') . ' !important;}'; 345 346 if( !empty($output) ) { 347 echo '<style type="text/css">' . $output . ' </style>' . "\r\n"; 286 foreach ($value->response as $key => $val) { 287 if (!\is_plugin_active($val->plugin)) 288 unset($value->response[$key]); 289 } 290 return $value; 291 } 292 293 294 /** 295 * Remove Action Links 296 * 297 * @return empty 298 */ 299 public function remove_action_links() 300 { 301 return; 302 } 303 304 305 /** 306 * Add Last Updated information to the Meta row (author, plugin url) 307 * 308 * @param string $plugin_meta 309 * @param type $plugin_file 310 * @return string 311 */ 312 public function lastUpdated($plugin_meta, $pluginfile, $plugin_data, $status) 313 { 314 // If Multisite, only show in network admin 315 if (is_multisite() && !is_network_admin()) 316 return $plugin_meta; 317 318 list($slug) = explode('/', $pluginfile); 319 320 $slug_hash = md5($slug); 321 $last_updated = get_transient("range_plu_{$slug_hash}"); 322 if (false === $last_updated) { 323 $last_updated = $this->get_last_updated($slug); 324 set_transient("range_plu_{$slug_hash}", $last_updated, 86400); 325 } 326 327 if ($last_updated) 328 $plugin_meta['last_updated'] = '<br>' . esc_html__('Last Updated', 'mtt') 329 . esc_html(': ' . $last_updated); 330 331 return $plugin_meta; 332 } 333 334 335 /** 336 * Custom CSS for Plugins page 337 * 338 * @return string Echo 339 */ 340 public function pluginsCSSJS() 341 { 342 $display_count = ADTW()->getOption('plugins_my_plugins_count'); 343 344 // GENERAL OUTPUT 345 $output = ''; 346 347 // UPDATE NOTICE 348 if (ADTW()->getOption('plugins_remove_plugin_notice')) 349 $output .= '.update-message{display:none;} '; 350 351 // INACTIVE 352 if (ADTW()->getOption('plugins_inactive_bg_color')) 353 $output .= 'tr.inactive {background-color:' . ADTW()->getOption('plugins_inactive_bg_color') . ' !important;}'; 354 355 if (!empty($output)) { 356 echo '<style type="text/css">' . $output . ' </style>' . "\r\n"; 348 357 } 349 358 // YOUR PLUGINS COLOR 350 if( ADTW()->getOption('plugins_my_plugins_bg_color') 351 && ADTW()->getOption('plugins_my_plugins_names') 352 && ADTW()->getOption('plugins_my_plugins_color') 353 ) { 354 $authors = explode( ',', ADTW()->getOption('plugins_my_plugins_names')); 355 356 $jq = array( ); 357 foreach( $authors as $author ) { 359 if ( 360 ADTW()->getOption('plugins_my_plugins_bg_color') 361 && ADTW()->getOption('plugins_my_plugins_names') 362 && ADTW()->getOption('plugins_my_plugins_color') 363 ) { 364 $authors = explode(',', ADTW()->getOption('plugins_my_plugins_names')); 365 366 $jq = array(); 367 foreach ($authors as $author) { 358 368 $jq[] = "tr td.column-description:Contains('{$author}')"; 359 369 } 360 $jq_ok = implode( ',', $jq);361 $by_author = esc_html__( 'by selected author(s)', 'mtt');362 ?>370 $jq_ok = implode(',', $jq); 371 $by_author = esc_html__('by selected author(s)', 'mtt'); 372 ?> 363 373 <script type="text/javascript"> 364 374 // https://css-tricks.com/snippets/jquery/make-jquery-contains-case-insensitive/ … … 368 378 }; 369 379 jQuery(document).ready(function($) { 370 <?php if ( $display_count): ?>380 <?php if ($display_count): ?> 371 381 // Display author count 372 382 var atual = $('.displaying-num').html(); 373 $('.displaying-num').html( atual+' : '+$("#the-list").find("<?php echo $jq_ok; ?>").length + ' ' + '<?php echo $by_author; ?>');383 $('.displaying-num').html(atual + ' : ' + $("#the-list").find("<?php echo $jq_ok; ?>").length + ' ' + '<?php echo $by_author; ?>'); 374 384 <?php endif; ?> 375 385 376 386 // Modify the plugin rows background 377 387 $("<?php echo $jq_ok; ?>").each(function() { … … 387 397 }); 388 398 </script> 389 <?php 390 } 391 } 392 393 394 /** 395 * Query WP API 396 * from the plugin https://wordpress.org/plugins/plugin-last-updated/ 397 * 398 * @param type $slug 399 * @return boolean|string 400 */ 401 private function get_last_updated( $slug ) 402 { 403 $request = wp_remote_post( 404 'https://api.wordpress.org/plugins/info/1.0/', array( 405 'body' => array( 406 'action' => 'plugin_information', 407 'request' => serialize( 408 (object) array( 409 'slug' => $slug, 410 'fields' => array( 'last_updated' => true ) 399 <?php 400 } 401 } 402 403 404 /** 405 * Query WP API 406 * from the plugin https://wordpress.org/plugins/plugin-last-updated/ 407 * 408 * @param type $slug 409 * @return boolean|string 410 */ 411 private function get_last_updated($slug) 412 { 413 $request = wp_remote_post( 414 'https://api.wordpress.org/plugins/info/1.0/', 415 array( 416 'body' => array( 417 'action' => 'plugin_information', 418 'request' => serialize( 419 (object) array( 420 'slug' => $slug, 421 'fields' => array('last_updated' => true) 422 ) 411 423 ) 412 ) 413 )) 414 ); 415 if( 200 != wp_remote_retrieve_response_code( $request ) ) 416 return false; 417 418 $response = unserialize( wp_remote_retrieve_body( $request ) ); 419 // Return an empty but cachable response if the plugin isn't in the .org repo 420 if( empty( $response ) ) 421 return ''; 422 if( isset( $response->last_updated ) ) 423 return sanitize_text_field( $response->last_updated ); 424 425 return false; 426 } 427 424 ) 425 ) 426 ); 427 if (200 != wp_remote_retrieve_response_code($request)) 428 return false; 429 430 $response = unserialize(wp_remote_retrieve_body($request)); 431 // Return an empty but cachable response if the plugin isn't in the .org repo 432 if (empty($response)) 433 return ''; 434 if (isset($response->last_updated)) 435 return sanitize_text_field($response->last_updated); 436 437 return false; 438 } 428 439 } -
many-tips-together/trunk/inc/sections/plugins.php
r3232350 r3275101 152 152 ) 153 153 ), 154 array( # Hide description 155 'id' => 'plugins_live_description', 156 'type' => 'switch', 157 'title' => esc_html__('Also hide row actions, not only descriptions', 'mtt'), 158 'default' => false, 159 'on' => esc_html__('On', 'mtt'), 160 'off' => esc_html__('Off', 'mtt'), 161 'required' => array('plugins_live_filter', '=', true), 162 ), 154 163 // MS: don't show 155 164 array( # Block Upgrade check for all -
many-tips-together/trunk/many-tips-together.php
r3264772 r3275101 4 4 * Plugin URI: https://wordpress.org/plugins/many-tips-together 5 5 * Description: Tweak, style, remove and modify several aspects of your WordPress administrative interface. 6 * Version: 3.3. 26 * Version: 3.3.3 7 7 * Author: Rodolfo Buaiz 8 8 * Author URI: https://brasofilo.com/ -
many-tips-together/trunk/readme.txt
r3268155 r3275101 3 3 Tags: customize, admin interface, profile, login, maintenance mode 4 4 Requires at least: 5.0 5 Tested up to: 6. 7.16 Stable tag: 3.3. 25 Tested up to: 6.8 6 Stable tag: 3.3.3 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 66 66 67 67 == Changelog == 68 69 **Version 3.3.3** 70 71 * Improved plugin filtering: better show/hide descriptions 68 72 69 73 **Version 3.3.2**
Note: See TracChangeset
for help on using the changeset viewer.