PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/demo2024feb.kerihosting.com/wp-content/themes/genesis/lib/admin/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : /home/trave494/demo2024feb.kerihosting.com/wp-content/themes/genesis/lib/admin/plugin-install.php |
<?php /** * Genesis Framework. * * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances. * Please do all modifications in the form of a child theme. * * @package Genesis\Admin * @author StudioPress * @license GPL-2.0-or-later * @link https://my.studiopress.com/themes/genesis/ */ add_filter( 'plugins_api_result', 'genesis_admin_plugins_api_result', 10, 3 ); /** * Filter the results of the plugin api results. * * Only sort the results if users are searching for StudioPress plugins. * * @since 2.10.0 * * @param object $res Plugins API result object. * @param string $action The type of information being requested from the Plugin Installation API. * @param object $args Plugin API arguments. * * @return object $res The plugin api result. */ function genesis_admin_plugins_api_result( $res, $action, $args ) { if ( isset( $args->author ) && 'studiopress' === $args->author ) { usort( $res->plugins, 'genesis_admin_plugins_sort_callback' ); // Bring Atomic Blocks to the top. foreach ( $res->plugins as $key => $plugin ) { $plugin_data = (array) $plugin; if ( 'atomic-blocks' === $plugin_data['slug'] ) { unset( $res->plugins[ $key ] ); array_unshift( $res->plugins, $plugin ); } } } return $res; } /** * Sort Genesis plugins returned by plugins api by install count. * * @since 2.10.0 * * @param array|object $a First plugin info to compare. * @param array|object $b Second plugin info to compare. */ function genesis_admin_plugins_sort_callback( $a, $b ) { $a = (array) $a; $b = (array) $b; if ( $a['active_installs'] === $b['active_installs'] ) { return 0; } return $a['active_installs'] > $b['active_installs'] ? -1 : 1; }