Make WordPress Core

Ticket #40508: 40508.diff

File 40508.diff, 1.1 KB (added by desrosj, 8 years ago)

Add after_get_header and after_get_footer hooks.

  • src/wp-includes/general-template.php

     
    4343        $templates[] = 'header.php';
    4444
    4545        locate_template( $templates, true );
     46
     47        /**
     48         * Fires after the header template file is loaded.
     49         *
     50         * The hook allows markup or additional template files to be loaded after the
     51         * results of a get_header() call.
     52         *
     53         * @since 4.9.0
     54         *
     55         * @param string|null $name Name of the specific header file to use. null for the default header.
     56         */
     57        do_action( 'after_get_header', $name );
    4658}
    4759
    4860/**
     
    8294        $templates[]    = 'footer.php';
    8395
    8496        locate_template( $templates, true );
     97
     98        /**
     99         * Fires after the footer template file is loaded.
     100         *
     101         * The hook allows markup or additional template files to be loaded after the
     102         * results of a get_footer() call.
     103         *
     104         * @since 4.9.0
     105         *
     106         * @param string|null $name Name of the specific footer file to use. null for the default footer.
     107         */
     108        do_action( 'after_get_footer', $name );
    85109}
    86110
    87111/**