Changeset 3395364
- Timestamp:
- 11/13/2025 10:06:43 PM (5 months ago)
- Location:
- code-snippets/trunk
- Files:
-
- 6 edited
-
CHANGELOG.md (modified) (1 diff)
-
code-snippets.php (modified) (2 diffs)
-
php/rest-api/class-snippets-rest-controller.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (2 diffs)
-
vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
code-snippets/trunk/CHANGELOG.md
r3392896 r3395364 1 1 # Changelog 2 3 ## [3.9.0] (2025-11-13) 4 5 ### Added 6 * Added contextual notices in the Snippets list table to surface action results and warnings in the UI 7 * Expanded Multisite Sharing settings for clearer control over network-wide snippet sharing 8 9 ### Changed 10 * Modernized browser support targets and polished admin UI (clearer row-action badges, improved Pro badge hover, refined active snippet name styling) 11 12 ### Fixed 13 * Fixed REST API pagination to return correct results and page counts 14 * Resolved styling selector so the active snippet name highlights reliably 2 15 3 16 ## [3.9.0-beta.2] (2025-11-10) -
code-snippets/trunk/code-snippets.php
r3392896 r3395364 9 9 * License URI: license.txt 10 10 * Text Domain: code-snippets 11 * Version: 3.9.0 -beta.211 * Version: 3.9.0 12 12 * Requires PHP: 7.4 13 13 * Requires at least: 5.0 14 14 * 15 * @version 3.9.0 -beta.215 * @version 3.9.0 16 16 * @package Code_Snippets 17 17 * @author Shea Bunge <[email protected]> … … 38 38 * @const string 39 39 */ 40 define( 'CODE_SNIPPETS_VERSION', '3.9.0 -beta.2' );40 define( 'CODE_SNIPPETS_VERSION', '3.9.0' ); 41 41 42 42 /** -
code-snippets/trunk/php/rest-api/class-snippets-rest-controller.php
r3392896 r3395364 201 201 $all_snippets = $this->get_network_items( $all_snippets, $network ); 202 202 203 // Get collection params (page, per_page).204 $collection_params = $this->get_collection_params();205 $per_page_request = (int) $request->get_param( 'per_page' );206 $per_page = max( 1, $per_page_request ? $per_page_request : (int) $collection_params['per_page']['default'] );207 208 $page_request = (int) $request->get_param( 'page' );209 $page = max( 1, $page_request ? $page_request : (int) $collection_params['page']['default'] );210 211 // Count total items212 203 $total_items = count( $all_snippets ); 213 $total_pages = (int) ceil( $total_items / $per_page ); 214 215 // Slice the full list to the requested page. 216 $offset = ( $page - 1 ) * $per_page; 217 $snippets = array_slice( $all_snippets, $offset, $per_page ); 204 $query_params = $request->get_query_params(); 205 206 if ( isset( $query_params['per_page'] ) || isset( $query_params['page'] ) ) { 207 $collection_params = $this->get_collection_params(); 208 $per_page = isset( $query_params['per_page'] ) 209 ? max( 1, (int) $query_params['per_page'] ) 210 : (int) $collection_params['per_page']['default']; 211 $page_request = (int) $request->get_param( 'page' ); 212 $page = max( 1, $page_request ? $page_request : (int) $collection_params['page']['default'] ); 213 $total_pages = (int) ceil( $total_items / $per_page ); 214 215 $offset = ( $page - 1 ) * $per_page; 216 $snippets = array_slice( $all_snippets, $offset, $per_page ); 217 } else { 218 $snippets = $all_snippets; 219 $total_pages = 1; 220 } 218 221 219 222 $snippets_data = []; -
code-snippets/trunk/readme.txt
r3387693 r3395364 5 5 License: GPL-2.0-or-later 6 6 License URI: license.txt 7 Stable tag: 3. 8.27 Stable tag: 3.9.0 8 8 Tested up to: 6.8.2 9 9 … … 104 104 105 105 == Changelog == 106 107 = 3.9.0 (2025-11-13) = 108 109 __Added__ 110 111 * Added contextual notices in the Snippets list table to surface action results and warnings in the UI 112 * Expanded Multisite Sharing settings for clearer control over network-wide snippet sharing 113 114 __Changed__ 115 116 * Modernized browser support targets and polished admin UI (clearer row-action badges, improved Pro badge hover, refined active snippet name styling) 117 118 __Fixed__ 119 120 * Fixed REST API pagination to return correct results and page counts 121 * Resolved styling selector so the active snippet name highlights reliably 106 122 107 123 = 3.8.2 (2025-10-31) = -
code-snippets/trunk/vendor/composer/autoload_static.php
r3382390 r3395364 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 'T' => 10 'T' => 11 11 array ( 12 12 'TypistTech\\Imposter\\Plugin\\' => 27, 13 13 'TypistTech\\Imposter\\' => 20, 14 14 ), 15 'C' => 15 'C' => 16 16 array ( 17 17 'Composer\\Installers\\' => 20, … … 20 20 21 21 public static $prefixDirsPsr4 = array ( 22 'TypistTech\\Imposter\\Plugin\\' => 22 'TypistTech\\Imposter\\Plugin\\' => 23 23 array ( 24 24 0 => __DIR__ . '/..' . '/typisttech/imposter-plugin/src', 25 25 ), 26 'TypistTech\\Imposter\\' => 26 'TypistTech\\Imposter\\' => 27 27 array ( 28 28 0 => __DIR__ . '/..' . '/typisttech/imposter/src', 29 29 ), 30 'Composer\\Installers\\' => 30 'Composer\\Installers\\' => 31 31 array ( 32 32 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers', -
code-snippets/trunk/vendor/composer/installed.php
r3392896 r3395364 2 2 'root' => array( 3 3 'name' => 'codesnippetspro/code-snippets', 4 'pretty_version' => 'v3.9.0 -beta.2',5 'version' => '3.9.0.0 -beta2',6 'reference' => ' 7c8a0836fecd8d180a8570f726054105a10571e5',4 'pretty_version' => 'v3.9.0', 5 'version' => '3.9.0.0', 6 'reference' => '1691d2d29123c14eb4fe5237333df6c67af9b9b3', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'codesnippetspro/code-snippets' => array( 14 'pretty_version' => 'v3.9.0 -beta.2',15 'version' => '3.9.0.0 -beta2',16 'reference' => ' 7c8a0836fecd8d180a8570f726054105a10571e5',14 'pretty_version' => 'v3.9.0', 15 'version' => '3.9.0.0', 16 'reference' => '1691d2d29123c14eb4fe5237333df6c67af9b9b3', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.