Plugin Directory


Ignore:
Timestamp:
11/25/2026 08:29:31 AM (10 days ago)
Author:
foldrocket
Message:

Release FoldRocket 1.5.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • foldrocket/trunk/src/Rest/Controllers/SmartViewsController.php

    r3821266 r3822302  
    6060                                        'callback'            => array( $this, 'collection_assets' ),
    6161                                        'permission_callback' => array( $this, 'can_view' ),
     62                                        'args'                => array(
     63                                                'include_total' => array(
     64                                                        'type'              => 'boolean',
     65                                                        'default'           => true,
     66                                                        'sanitize_callback' => 'rest_sanitize_boolean',
     67                                                ),
     68                                        ),
    6269                                ),
    6370                        )
    … …  
    148155                        return $denied;
    149156                }
    150                 $collection = ( new CollectionRepository() )->find( $this->int_param( $request, 'id' ) );
     157                $collection = ( new CollectionRepository() )->find_definition( $this->int_param( $request, 'id' ) );
    151158                if ( ! $collection ) {
    152159                        return $this->error( 'not_found', __( 'Smart view not found.', 'foldrocket' ), 404 );
    … …  
    161168                                        'page'     => $page,
    162169                                        'per_page' => min( 100, max( 1, (int) $request->get_param( 'per_page' ) ?: 48 ) ),
     170                                        '_include_total' => filter_var( $request->get_param( 'include_total' ), FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ) ?? true,
    163171                                )
    164172                        )
Note: See TracChangeset for help on using the changeset viewer.