Assets 2

"Unpublish" Helper

Adds a simple "Unpublish" button to the publish meta box, allowing users to quickly change a published post to pending in a single click (the usual method of manually changing the status to Draft/Pending and then updating is arguably not very user friendly).


  • Added $post_type argument support for Index helper's the_index() function.
  • Added get_fields and compatibility options for custom admin pages.
  • Added query_args option for post list/select fields.
  • When setting up an enqueue, you can now pass 'mtime' for the version and it'll use the file's modification time.


A number of bugs ranging from minor to WTF have been fixed, namely:

  • Shorthand processing works more predictably now.
  • Fixed do_preload logic on qs-media.js; gallery editors now working properly again.
  • User and Term meta now support the save_single option.
  • Fixed meta box saving to work with Quick/Bulk editing better.
  • Fixed logic for checking if a taxonomy exists for the order manager.
  • Fixed meta box data saving to unslash post fields.
  • Fixed post type registration to respect passing FALSE for the supports option.
  • Fixed the Sections helper get_sections() function to prevent accidentally returning ALL sections.


This will very likely be the last major release of QuickStart. I'm working on recreating the entire system into a stand-alone framework that can be used as a vendor component in a theme, plugin, or as a drop-in for the WordPress core. In hindsight, QuickStart should never have been a plugin as it's too easy to break a site using it when updating, and should be safe to modify on a case-by-case basis if needed. Also, I'm working on distributing a number of the helpers as standalone plugins, rather than arbitrarily packaged into the system.

@dougwollison dougwollison released this Dec 11, 2015 · 44 commits to master since this release

Assets 2

So... funny story folks...

WordPress 4.4 added it's own get/the_post_thumbnail_url() function, which of course works differently than the one added by the attachment helper.

The one in the attachment helper has been renamed to get/the_post_attachment_image_url(), please update your theme files if you're using it.

Oh, and the update notice system was broken; damn copy pasta typo.

Assets 2

Walkers Helper

  • Adds autoloading access to a collection of custom walker classes for use with wp_nav_menu() (currently only one available: Walker_Inline_Nav_Menu)
  • Adds filter to wp_nav_menu_args that adjusts the output for inline nav menus if the class is detected.

Numeric Values for Select and Input List fields

Select and checklist/radiolist fields now support a "numeric_values" boolean option; this allows you to pass a numeric array as the values list and not have the values used as the keys (since apparently a numeric string key and an integer key are indistinguishable).

Bug Fixes

  • Admin menu re-ordering now properly handles comments menu.
  • Fixed bugs with handling options for Template::the_head().
  • Sidebar registration is restored (was completely broken during the Setup restructuring and didn't notice).
  • Improved sanity checks on maybe_load_media_manager() and register_meta_box().


  • Template::doc_start() has been rejigged to support custom IE version flagging (or none at all).
  • The handle_shorthand() tool has been moved to an namespaced functions file (wasn't worth putting in a Trait and besides those aren't supported in PHP version before 5.4)
  • Rewrote the autoloader and moved it to a separate file.
  • Moved update notice check to hooks.php

@dougwollison dougwollison released this Oct 30, 2015 · 74 commits to master since this release

Assets 2

Fixed a how-did-I-miss-that bug in the request hook of the Index Page feature that completely broke it. Seriously, I'm baffled how I didn't notice that during unit testing

Also added some better sanity checks to the handle_shorthand() utility, namely for the event when a closure is passed as the "name".

Also added some future proofing for both WordPress 4.4 as well as checking/displaying notices about any drastic changes in future updates to QuickStart.

Assets 2

Section Manager Feature

A new feature can be registered for post types: section_manager. The feature registers a hidden post type called qs_section, and adds a meta box to applicable post types allowing you to add/edit/order sections, for use cases where a page would have separate/independent content objects included, such as asides or chunks that need their own management. By default this will only apply to pages.

Shorthand Capability

You can now write even less config code by describing common details of fields, field types, meta boxes, post types, and taxonomies by including those details in an abbreviated notation in the name itself. Here's an admittedly over the top example:

'post_types' => array(
    // This...
    'project@25.5#dashicons-art=title,editor,revisions' => array(
        'meta_boxes' => array(
            'poster@side/high' => array(
                'type' => '',
    // ...would be the same as
    'project' => array(
        'position' => 25.5,
        'icon' => 'dashicons-art',
        'supports' => array('title', 'editor', 'revisions'),
        'meta_boxes' => array(
            'poster' => array(
                'context' => 'side',
                'priority' => 'high',
                'type' => 'media',
                'gallery' => true,

The details will be documented in detail on the Codex.

Special Select and Input List Fields

You can now quickly create select or input list fields that list available posts, menus, or templates. The available field type names are postselect, menuselect, templateselect, postlist, menulist, and templatelist. When a post select/list field is used on the edit screen for a post, the current post will be excluded automatically.

Post Select/List Options

  • post_type: A specific post type to filter for (will default to the current post's type or otherwise page). The _type_option pseudo-option aliases to this.
  • post_status: An array of statuses to filter for (defaults to publish, private and draft).
  • exclude: A single ID or array of IDs of posts to exclude (will default to the current post if applicable).
  • none_option: The name of the option to display for selecting no post at all.
  • orderby: A field or array of fields to order by (defaults to menu_order followed by post_title).
  • order: The order of the posts to retrieve (defaults to asc)
  • parent: The parent post ID to filter by (defaults to 0 if the post type is hierarchical, or false which won't filter at all).

Menu Select/List Options

None. Just grabs all available navigation menus to select from.

Template Select/List Options

  • default: The value of the first, default option (default is "default")
  • default_name: The label of the first, default option (default is "Default Template")

Widget Loading Tool

This tool allows you to quickly register a list of widgets identified only by their name, provided they all have the same naming convention for their respective files. This is intended for setups where each widget is in it's own file.

    array( // The list of widget classes
    THEME_PATH . '/inc/widgets/', // The path they're all located in
    false, // Filenames follow WP naming conventions (e.g. Featured_Profile > class-featured-profile.php),
    null, // A prefix that applies to all widget names
    false, // Apply the prefix to the filenames as well

The tool will go through each widget, create the filename from the widget name, load the file if it exists, and then add the hook to register the widget class provided it actually worked.

WPEdit Revisions

The WPEdit helper has been heavily revised.

  • The CSS enqueue hook now actually works.
  • The included CSS is now heavily specific so as to prevent theme styling from messing with the buttons (via an unhealthy amount of !important flags).
  • The settings for each button can now be passed as an array, and the settings now include a capability option (speaking of which, the permissions check for post edit buttons has been fixed to actually test for the current user being able to edit the post in question).
  • There is now a toggle button added to the admin bar, allowing you to toggle the visibility of all the buttons on and off.

Map Field Geocoding Revisions

Google is deprecating the use of browser keys on the Geocoding API, so the map field no longer accepts a key parameter. Instead, the geocoding feature is now passed to an AJAX hook setup by QuickStart which geocodes the address on the server side. To pass your own API key instead of using/defining the default GOOGLE_API_SERVER_KEY constant, the geocode_address() tool now supports a filter for replacing the API key being used.

Extensibility Improvements

  • Added a new qs:media-changed event that's triggered when a qs-media field item is removed.
  • Settings fields can now accept a callback and callback_args options, for overwriting the default Tools::build_settings_field callback and setting/args callback arguments.
  • You can now pass a callback as a settings field's arguments itself, similar to that of regular fields or meta boxes.
  • Added special classes to repeater fields wrapper; multiple-fields and single-field, to identify if the basic structure of the items within.
  • The Smart_Plugin class now supports callback removal, details here.

Tweaks and Bug Fixes

  • Fixed alias functions not returning results (oops).
  • Updated order manager feature's admin pages to use the post type's capability when registering.
  • Column setup now just uses the manage_{$post_type}_posts_columns hook.
  • Fixed get_index() to check for tag/category archives since is_tax() doesn't cover those.
  • Fixed Tools::upload() to make sure the necessary wp-includes are loaded.
  • Constants are now setup after all plugins are loaded, to account for stuff like Domain Mapping changing stuff.
  • Fixed Template::title_filter to global in $paged and $page variables.
  • Fixed post type archive check on get_index().
  • Fixed post type existence check on order manager feature.
  • Fixed bug with prefixing post field value in Form::build_field() and Setup::save_meta_box()
  • Tweaked patterns on custom post type archive rewrites.
  • Overhauled rewrites for custom index pages; now parses request URI on the fly to check if it's for a valid index page before handling as a date/paged archive query.
  • Numerous class name additions and changes changes to field HTML.
  • The search field in the map field type no longer clears on submit, in case of typo corrections and whatnot.
  • The QS Helpers CSS/JS enqueues are now loaded with the plugin rather than once QuickStart\Setup is constructed.
  • Added helper to hide the customizer (via capability removal).
Assets 2

Custom post types will now have date archive rewrites setup (e.g. /event/2015/05/06/page/2/), and the index helper now includes get_post_type_[date/year/month/day]_link() functions. The index page feature also adds blanket date archive permalinks, so it'll match for any pages that have date/page arguments appended to it (e.g. /events-index/2015/05/06/page/2/). There is now an add_rewrites() method in Tools to easily add multiple rewrites via a single array.

Also added new utilities for more precise testing of ajax/backend/frontend:

  • is_ajax() will test wether or not a wordpress ajax request is being handled.
  • is_login() will test wether or not the login/register page is being viewed.
  • is_frontend() will test ether or not we're on the front-end (including front-end only ajax requests).
Assets 2

Term Meta Helper

  • Adds functionality for term meta data, stored in a custom termmeta table, and approrpiately extends off the existing Meta Data API, functioning the exact same as post/user/comment meta.
  • Adds filter to term_clauses that enables support for basic term meta filtering and ordering (e.g. 'orderby' => 'meta_value_num', 'meta_key' => 'menu_order').
  • Note: term meta is stored by term_id, not term_taxonomy_id, due to WordPress' change of splitting terms that are shared between taxonomies into separate ones.

Term Meta and User Meta Fields

You can now register custom fields for the edit term and edit user screens.

  • For terms, define the custom fields via a 'meta_fields' entry in your taxonomy definition (you can also do this for existing taxonomies). The term_meta helper will automatically be loaded.
  • For users, define the custom fields via a 'user_meta' entry in the root of the Setup configs array.

Term Support for Order Manager

The order manager feature now supports term ordering; register the necessary taxonomies alongside your post types. These should be registered via the new 'objects' setting, though it will automatically use the value in 'post_types' if present. Note: currently will not support post types with the same name as a taxonomy properly

WP Edit Helper

Some useful utilities for inserting WordPress style Edit This buttons into parts of your theme, for editing parts of the site that aren't the queried object itself (e.g. nav menus, custom option stuff, child objects, etc.)

Updates to QuickStart\Form

There is now special handling for the hidden input type; simply forces the type attribute and doesn't bother with wrapping in a field.

Updates to QuickStart\Tools

  • The load_helpers tool now accepts an 'all' argument, allowing you to load all the regular helpers.
  • The hide tools have been moved to their own separate helper files (e.g. hide/posts). The hide tool itself now also takes an 'all' argument, to load all the hide helpers.
  • The hide_comments tool/helper now enforces the disabling of comments; filters have been added to set comments_open, pings_open, and xmlrpc_enabled to false, as well as cause the default_comment_status and default_ping_status options to always return "closed". Trackbacks support is also removed from all post types when this helper is loaded.
  • Extra editors can now accept location and post_field settings.
  • New post_type_save_field method in Tools; setup a save hook to save a value to a specific post field (e.g. menu_order).
  • New maybe_prefix_post_field method in Tools; will prefix field names that should start with "post_".

Notable Internal Changes

  • The Smart_Plugin class (i.e. the thing Setup, Tools and Callbacks are based on) has been reworked to be more flexible. You can now setup callbacks/hooks via the setup_callback() method (in object or static context). Said callbacks can be attached to custom hooks, or created as just the callback with a number of accepted callback arguments specified. Usage details can be found on the new GitHub Project for it. Note: the $method_hooks and $static_method_hooks properties are now just a static version of $method_hooks when defining the extending classes.
  • Many of the functions used for hooks in the helpers have been renamed, they now all follow a qs_helper_[name]_[action] format.
  • The chunk making logic of the post_chunks helper is now available for external use via the get_content_chunks() utility.
  • The helpers now use value-filled and value-empty classes rather than .hide() and .show() to hide/show the remove button on single media fields.
  • Now that WordPress 4.2 identifies the Front and Posts pages in the page listing table, the index_page feature will do the same with any pages set as a post type index page.

Okay, let's hope there won't be a need for 2 patches in 48 hours again.

Assets 2

These are just embarrassing...

  • relabel_posts actually works again now.
  • qs-helpers.js is enqueued with jquery-ui-sortable dependency now.
  • fixed arguments list for ga_code so it works properly again now.
Assets 2

Fixed a bug with get_index() not working properly on singular post entries, and added a new qs_helper_is_index_page filter to is_index_page() so you can filter the ID before the check is performed.