Make WordPress Core

Changeset 26513


Ignore:
Timestamp:
12/02/2013 12:47:49 AM (13 years ago)
Author:
dd32
Message:

Themes: Fix the routing for Themes in a sub-directory (/wp-content/themes/prefix/theme-name/style.css) and navigate to hash-url's for searches. See #25948

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/theme.js

    r26498 r26513  
    587587                        event.target.value = '';
    588588                }
     589
    589590                this.collection.doSearch( event.target.value );
     591
     592                // Update the URL hash
     593                if ( event.target.value )
     594                        themes.router.navigate( 'search/' + event.target.value );
     595                else
     596                        themes.router.navigate( '' );
    590597        }
    591598});
     
    596603
    597604        routes: {
    598                 'search/:query': 'search',
    599                 'theme/:slug': 'theme'
     605                'search/*query': 'search',
     606                'theme/*slug': 'theme'
    600607        },
    601608
Note: See TracChangeset for help on using the changeset viewer.