WordPress.org

Make WordPress Core

Ticket #21506: general-template.php.template-hooks.patch

File general-template.php.template-hooks.patch, 7.2 KB (added by chipbennett, 7 years ago)

First pass at core-defined template hooks for use by Themes

  • general-template.php

     
    15761576}
    15771577
    15781578/**
     1579 * Fire the wp_doctype hook
     1580 *
     1581 * Intended to be immediately before HTML <html> tag
     1582 *
     1583 * @since 3.6.0
     1584 * @uses do_action() Calls 'wp_doctype' hook.
     1585 */
     1586function wp_doctype() {
     1587        do_action( 'wp_doctype' );
     1588}
     1589 
     1590/**
     1591 * Fire the wp_body_top hook
     1592 *
     1593 * Intended to be immediately inside opening HTML <body> hook
     1594 *
     1595 * @since 3.6.0
     1596 * @uses do_action() Calls 'wp_body_top' hook.
     1597 */
     1598function wp_body_top() {
     1599        do_action( 'wp_body_top' );
     1600}
     1601
     1602/**
     1603 * Fire the wp_body_bottom hook
     1604 *
     1605 * Intended to be immediately inside closing HTML </body> tag
     1606 *
     1607 * @since 3.6.0
     1608 * @uses do_action() Calls 'wp_body_bottom' hook.
     1609 */
     1610function wp_body_bottom() {
     1611        do_action( 'wp_body_bottom' );
     1612}
     1613
     1614/**
     1615 * Fire the wp_header_before hook
     1616 *
     1617 * Intended to be immediately before opening HTML header container tag
     1618 *
     1619 * @since 3.6.0
     1620 * @uses do_action() Calls 'wp_header_before' hook.
     1621 */
     1622function wp_header_before() {
     1623        do_action( 'wp_header_before' );
     1624}
     1625
     1626/**
     1627 * Fire the wp_header_top hook
     1628 *
     1629 * Intended to be immediately inside opening HTML header container tag
     1630 *
     1631 * @since 3.6.0
     1632 * @uses do_action() Calls 'wp_header_top' hook.
     1633 */
     1634function wp_header_top() {
     1635        do_action( 'wp_header_top' );
     1636}
     1637
     1638/**
     1639 * Fire the wp_header_bottom hook
     1640 *
     1641 * Intended to be immediately inside closing HTML header container tag
     1642 *
     1643 * @since 3.6.0
     1644 * @uses do_action() Calls 'wp_header_bottom' hook.
     1645 */
     1646function wp_header_bottom() {
     1647        do_action( 'wp_header_bottom' );
     1648}
     1649
     1650/**
     1651 * Fire the wp_header_before hook
     1652 *
     1653 * Intended to be immediately after closing HTML header container tag
     1654 *
     1655 * @since 3.6.0
     1656 * @uses do_action() Calls 'wp_header_before' hook.
     1657 */
     1658function wp_header_after() {
     1659        do_action( 'wp_header_after' );
     1660}
     1661
     1662/**
     1663 * Fire the wp_content_before hook
     1664 *
     1665 * Intended to be immediately before opening HTML main content container tag
     1666 *
     1667 * @since 3.6.0
     1668 * @uses do_action() Calls 'wp_content_before' hook.
     1669 */
     1670function wp_content_before() {
     1671        do_action( 'wp_content_before' );
     1672}
     1673
     1674/**
     1675 * Fire the wp_content_top hook
     1676 *
     1677 * Intended to be immediately inside opening HTML main content container tag
     1678 *
     1679 * @since 3.6.0
     1680 * @uses do_action() Calls 'wp_content_top' hook.
     1681 */
     1682function wp_content_top() {
     1683        do_action( 'wp_content_top' );
     1684}
     1685
     1686/**
     1687 * Fire the wp_content_bottom hook
     1688 *
     1689 * Intended to be immediately inside closing HTML main content container tag
     1690 *
     1691 * @since 3.6.0
     1692 * @uses do_action() Calls 'wp_content_bottom' hook.
     1693 */
     1694function wp_content_bottom() {
     1695        do_action( 'wp_content_bottom' );
     1696}
     1697
     1698/**
     1699 * Fire the wp_content_after hook
     1700 *
     1701 * Intended to be immediately after closing HTML main content container tag
     1702 *
     1703 * @since 3.6.0
     1704 * @uses do_action() Calls 'wp_content_after' hook.
     1705 */
     1706function wp_content_after() {
     1707        do_action( 'wp_content_after' );
     1708}
     1709
     1710/**
     1711 * Fire the wp_post_before hook
     1712 *
     1713 * Intended to be immediately before opening HTML post container tag
     1714 *
     1715 * @since 3.6.0
     1716 * @uses do_action() Calls 'wp_post_before' hook.
     1717 */
     1718function wp_post_before() {
     1719        do_action( 'wp_post_before' );
     1720}
     1721
     1722/**
     1723 * Fire the wp_post_top hook
     1724 *
     1725 * Intended to be immediately inside opening HTML post container tag
     1726 *
     1727 * @since 3.6.0
     1728 * @uses do_action() Calls 'wp_post_top' hook.
     1729 */
     1730function wp_post_top() {
     1731        do_action( 'wp_post_top' );
     1732}
     1733
     1734/**
     1735 * Fire the wp_post_bottom hook
     1736 *
     1737 * Intended to be immediately inside closing HTML post container tag
     1738 *
     1739 * @since 3.6.0
     1740 * @uses do_action() Calls 'wp_post_bottom' hook.
     1741 */
     1742function wp_post_bottom() {
     1743        do_action( 'wp_post_bottom' );
     1744}
     1745
     1746/**
     1747 * Fire the wp_post_after hook
     1748 *
     1749 * Intended to be immediately after closing HTML post container tag
     1750 *
     1751 * @since 3.6.0
     1752 * @uses do_action() Calls 'wp_post_after' hook.
     1753 */
     1754function wp_post_after() {
     1755        do_action( 'wp_post_after' );
     1756}
     1757
     1758/**
     1759 * Fire the wp_comments_before hook
     1760 *
     1761 * Intended to be immediately before the comments template
     1762 *
     1763 * @since 3.6.0
     1764 * @uses do_action() Calls 'wp_comments_before' hook.
     1765 */
     1766function wp_comments_before() {
     1767        do_action( 'wp_comments_before' );
     1768}
     1769
     1770/**
     1771 * Fire the wp_comments_after hook
     1772 *
     1773 * Intended to be immediately after the comments template
     1774 *
     1775 * @since 3.6.0
     1776 * @uses do_action() Calls 'wp_comments_after' hook.
     1777 */
     1778function wp_comments_after() {
     1779        do_action( 'wp_comments_after' );
     1780}
     1781
     1782/**
     1783 * Fire the wp_sidebar_before hook
     1784 *
     1785 * Intended to be immediately before opening sidebar container tag.
     1786 *
     1787 * This is a semantic template hook intended to apply to an HTML
     1788 * sidebar/column, and not to all dynamic sidebars/widget areas.
     1789 *
     1790 * @since 3.6.0
     1791 * @uses do_action() Calls 'wp_sidebar_before' hook.
     1792 */
     1793function wp_sidebar_before() {
     1794        do_action( 'wp_sidebar_before' );
     1795}
     1796
     1797/**
     1798 * Fire the wp_sidebar_top hook
     1799 *
     1800 * Intended to be immediately inside opening sidebar container tag.
     1801 *
     1802 * This is a semantic template hook intended to apply to an HTML
     1803 * sidebar/column, and not to all dynamic sidebars/widget areas.
     1804 *
     1805 * @since 3.6.0
     1806 * @uses do_action() Calls 'wp_sidebar_top' hook.
     1807 */
     1808function wp_sidebar_top() {
     1809        do_action( 'wp_sidebar_top' );
     1810}
     1811
     1812/**
     1813 * Fire the wp_sidebar_bottom hook
     1814 *
     1815 * Intended to be immediately inside closing sidebar container tag.
     1816 *
     1817 * This is a semantic template hook intended to apply to an HTML
     1818 * sidebar/column, and not to all dynamic sidebars/widget areas.
     1819 *
     1820 * @since 3.6.0
     1821 * @uses do_action() Calls 'wp_sidebar_bottom' hook.
     1822 */
     1823function wp_sidebar_bottom() {
     1824        do_action( 'wp_sidebar_bottom' );
     1825}
     1826
     1827/**
     1828 * Fire the wp_sidebar_after hook
     1829 *
     1830 * Intended to be immediately after closing sidebar container tag.
     1831 *
     1832 * This is a semantic template hook intended to apply to an HTML
     1833 * sidebar/column, and not to all dynamic sidebars/widget areas.
     1834 *
     1835 * @since 3.6.0
     1836 * @uses do_action() Calls 'wp_sidebar_after' hook.
     1837 */
     1838function wp_sidebar_after() {
     1839        do_action( 'wp_sidebar_after' );
     1840}
     1841
     1842/**
     1843 * Fire the wp_footer_before hook
     1844 *
     1845 * Intended to be immediately before opening HTML footer container tag
     1846 *
     1847 * @since 3.6.0
     1848 * @uses do_action() Calls 'wp_footer_before' hook.
     1849 */
     1850function wp_footer_before() {
     1851        do_action( 'wp_footer_before' );
     1852}
     1853
     1854/**
     1855 * Fire the wp_footer_top hook
     1856 *
     1857 * Intended to be immediately inside opening HTML footer container tag
     1858 *
     1859 * @since 3.6.0
     1860 * @uses do_action() Calls 'wp_footer_top' hook.
     1861 */
     1862function wp_footer_top() {
     1863        do_action( 'wp_footer_top' );
     1864}
     1865
     1866/**
     1867 * Fire the wp_footer_bottom hook
     1868 *
     1869 * Intended to be immediately inside closing HTML footer container tag
     1870 *
     1871 * @since 3.6.0
     1872 * @uses do_action() Calls 'wp_footer_bottom' hook.
     1873 */
     1874function wp_footer_bottom() {
     1875        do_action( 'wp_footer_bottom' );
     1876}
     1877
     1878/**
     1879 * Fire the wp_footer_after hook
     1880 *
     1881 * Intended to be immediately after closing HTML footer container tag
     1882 *
     1883 * @since 3.6.0
     1884 * @uses do_action() Calls 'wp_footer_after' hook.
     1885 */
     1886function wp_footer_after() {
     1887        do_action( 'wp_footer_after' );
     1888}
     1889
     1890/**
    15791891 * Display the links to the general feeds.
    15801892 *
    15811893 * @since 2.8.0