WordPress.org

Make WordPress Core

Ticket #40038: templatepad.2.diff

File templatepad.2.diff, 966 bytes (added by qwertyzw, 2 years ago)

A more correct patch

  • wp-includes/template.php

    diff --git a/wp-includes/template.php b/wp-includes/template.php
    index d449be4f5..a039ba3eb 100644
    a b function load_template( $_template_file, $require_once = true ) { 
    684684                $s = esc_attr( $s );
    685685        }
    686686
     687        /**
     688         * Fires before a template file is outputted.
     689         * This action, along with load_template_after
     690         * allow you to pad templates with
     691         * html.
     692         *
     693         * @since ?
     694         *
     695         * @param string     the template being outputted.
     696         */
     697        do_action('load_template_before', $_template_file);
    687698        if ( $require_once ) {
    688699                require_once( $_template_file );
    689700        } else {
    690701                require( $_template_file );
    691702        }
     703        /**
     704         * Fires after a template file is outputted.
     705         * This action, along with load_template_before
     706         * allow you to pad templates with
     707         * html.
     708         *
     709         * @since ?
     710         *
     711         * @param string     the template being outputted.
     712         */
     713         do_action('load_template_after', $_template_file);
    692714}