Clark-Nikdel-Powell / WP-Admin-Command-Palette

Optimize WordPress admin navigation with a modal window to search for and navigate directly to WordPress admin pages.
GNU General Public License v2.0
4 stars 0 forks source link

Cut down size of search data array #20

Closed jhned closed 9 years ago

jhned commented 9 years ago

We've got a lot of unused fields in the data array. For example, 'dashicon', 'target', 'action' and 'shortcut' aren't needed at all for user-content data, but including them in the array adds a lot more size to the search array.

We probably need to refactor the way that the $template is set up so that we don't run in to this problem. We can cut the $template var down to the essentials, and then add in the supplemental data on a conditional basis. Does that sound good to you guys?

gwelser commented 9 years ago

I agree. The base template should only have to common properties. We can add additional properties when needed.