Plugin Directory

Changeset 3395364


Ignore:
Timestamp:
11/13/2025 10:06:43 PM (5 months ago)
Author:
codesnippetspro
Message:

Version v3.9.0

Location:
code-snippets/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code-snippets/trunk/CHANGELOG.md

    r3392896 r3395364  
    11# 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
    215
    316## [3.9.0-beta.2] (2025-11-10)
  • code-snippets/trunk/code-snippets.php

    r3392896 r3395364  
    99 * License URI:  license.txt
    1010 * Text Domain:  code-snippets
    11  * Version:      3.9.0-beta.2
     11 * Version:      3.9.0
    1212 * Requires PHP: 7.4
    1313 * Requires at least: 5.0
    1414 *
    15  * @version   3.9.0-beta.2
     15 * @version   3.9.0
    1616 * @package   Code_Snippets
    1717 * @author    Shea Bunge <[email protected]>
     
    3838     * @const string
    3939     */
    40     define( 'CODE_SNIPPETS_VERSION', '3.9.0-beta.2' );
     40    define( 'CODE_SNIPPETS_VERSION', '3.9.0' );
    4141
    4242    /**
  • code-snippets/trunk/php/rest-api/class-snippets-rest-controller.php

    r3392896 r3395364  
    201201        $all_snippets = $this->get_network_items( $all_snippets, $network );
    202202
    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 items
    212203        $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        }
    218221
    219222        $snippets_data = [];
  • code-snippets/trunk/readme.txt

    r3387693 r3395364  
    55License: GPL-2.0-or-later
    66License URI: license.txt
    7 Stable tag: 3.8.2
     7Stable tag: 3.9.0
    88Tested up to: 6.8.2
    99
     
    104104
    105105== 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
    106122
    107123= 3.8.2 (2025-10-31) =
  • code-snippets/trunk/vendor/composer/autoload_static.php

    r3382390 r3395364  
    88{
    99    public static $prefixLengthsPsr4 = array (
    10         'T' => 
     10        'T' =>
    1111        array (
    1212            'TypistTech\\Imposter\\Plugin\\' => 27,
    1313            'TypistTech\\Imposter\\' => 20,
    1414        ),
    15         'C' => 
     15        'C' =>
    1616        array (
    1717            'Composer\\Installers\\' => 20,
     
    2020
    2121    public static $prefixDirsPsr4 = array (
    22         'TypistTech\\Imposter\\Plugin\\' => 
     22        'TypistTech\\Imposter\\Plugin\\' =>
    2323        array (
    2424            0 => __DIR__ . '/..' . '/typisttech/imposter-plugin/src',
    2525        ),
    26         'TypistTech\\Imposter\\' => 
     26        'TypistTech\\Imposter\\' =>
    2727        array (
    2828            0 => __DIR__ . '/..' . '/typisttech/imposter/src',
    2929        ),
    30         'Composer\\Installers\\' => 
     30        'Composer\\Installers\\' =>
    3131        array (
    3232            0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
  • code-snippets/trunk/vendor/composer/installed.php

    r3392896 r3395364  
    22    'root' => array(
    33        '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',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        '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',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.