Example #1
0
/**
 * Header content
 * 
 * @return string
 * @author Jared Lang
 **/
function header_($tabs = 2)
{
    opengraph_setup();
    remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');
    remove_action('wp_head', 'index_rel_link');
    remove_action('wp_head', 'rel_canonical');
    remove_action('wp_head', 'wp_generator');
    remove_action('wp_head', 'wlwmanifest_link');
    remove_action('wp_head', 'rsd_link');
    ob_start();
    print header_meta() . "\n";
    wp_head();
    print header_links() . "\n";
    print header_title() . "\n";
    return indent(ob_get_clean(), $tabs);
}
 /**
  * Test header meta injection
  */
 public function test_header_meta()
 {
     // Setup
     $meta = '<link type="text/plain" rel="author" href="template_url/humans.txt" />';
     \WP_Mock::onFilter('wpd_humans')->with($meta)->reply($meta);
     // Act
     ob_start();
     header_meta();
     $result = ob_get_clean();
     // Verify
     $this->assertConditionsMet();
     $this->assertEquals($meta, $result);
 }