View move_metabox_wp.php
/** | |
* 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' ); | |
} |
View gist:a765c8091fd37228e4a4
/** | |
* 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) { |