public function testSetupMetaBoxesNotPostOrPage()
 {
     \WP_Mock::wpFunction('add_meta_box', ['times' => 0]);
     \WP_Mock::onFilter('dxw_content_review_post_types')->with(['post', 'page'])->reply(['meow']);
     \Dxw_Content_Review\Dxw_Content_Review::setup_meta_boxes('post');
     \Dxw_Content_Review\Dxw_Content_Review::setup_meta_boxes('page');
 }
Exemplo n.º 2
0
/**
 *  dxw_get_setting.
 *
 *  This function will return a value from the settings array in the main class object
 *
 *  @param  [string] $name the setting name to return
 *
 *  @return [mixed]
 */
function dxw_get_setting($name, $allow_filter = true)
{
    // vars
    $r = null;
    $arc = \Dxw_Content_Review\Dxw_Content_Review::get_instance();
    // load from ACF if available
    if (isset($arc->settings[$name])) {
        $r = $arc->settings[$name];
    }
    // filter for 3rd party customization
    if ($allow_filter) {
        $r = apply_filters("architect_forms_{$name}", $r);
    }
    // return
    return $r;
}
Exemplo n.º 3
0
 function dxw_content_review_init()
 {
     $content_review = \Dxw_Content_Review\Dxw_Content_Review::get_instance();
     $content_review->initialise();
 }