This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Re-position featured image metabox from sidebar to central content area | |
*/ | |
function change_meta_box_position() { | |
remove_meta_box( 'postimagediv', 'post_type_here', 'side' ); | |
add_meta_box( 'postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', 'post_type_here', 'normal', 'high' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* creates a swagger-node-restify action which returns an array of filtered data items based on request params | |
* @param {array} data a flat array of objects to query | |
* @param {object[]} filters object or array of objects describing a mapping between a request param and a property of the data | |
* @param {string} filters[].prop property of data object to match | |
* @param {string} filters[].param name of request param containing value to match | |
* @param {boolean, optional} singleResult `true` to return the first match as an object instead of array of results | |
* @return {function} request handler to use as `action` in swagger-node-restify resource description | |
*/ | |
var createQueryAction = function (data, filters, singleResult) { |