[wp-trac] [WordPress Trac] #56283: Add "Block Theme" filter under "Add themes"

WordPress Trac noreply at wordpress.org
Mon Jul 25 10:23:56 UTC 2022

#56283: Add "Block Theme" filter under "Add themes"
 Reporter:  luminuu                  |       Owner:  (none)
     Type:  feature request          |      Status:  new
 Priority:  normal                   |   Milestone:  6.1
Component:  Themes                   |     Version:
 Severity:  major                    |  Resolution:
 Keywords:  has-patch dev-feedback   |     Focuses:  ui, accessibility,
  needs-testing has-screenshots      |  administration
  needs-docs needs-user-docs needs-  |
  dev-note                           |

Comment (by luminuu):

 The changes in the PR don't work for me, I think the JS part is correct
 but put in the wrong function. I've made it working by moving it to the
 `browse` function, starting on line 1693:

         // Handles all the rendering of the public theme directory.
         browse: function( section ) {
                 // Create a new collection with the proper theme data
                 // for each section.

                 if ( 'block-themes' === section ) {
                         var request = { tag: 'full-site-editing' };

                         // Get the themes by sending Ajax POST request to
                         // or searching the local cache.
                         this.collection.query( request );

                 } else {
                         this.collection.query( { browse: section } );

 With this change, I get properly working results. @audrasjb Do you want to
 give this snippet a test?

Ticket URL: <https://core.trac.wordpress.org/ticket/56283#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list