Make WordPress Core

Ticket #7659: 7659.r8786.diff

File 7659.r8786.diff, 9.3 KB (added by jacobsantos, 16 years ago)

Incomplete skeleton patch based off of r8786

  • post-template.php

     
    11<?php
     2/**
     3 * WordPress Post Template Functions
     4 *
     5 * Gets content for the current post in the loop.
     6 *
     7 * @package WordPress
     8 * @subpackage Template
     9 */
    210
    3 //
    4 // "The Loop" post functions
    5 //
    6 
     11/**
     12 * the_ID() - {@internal Missing Short Description}}
     13 *
     14 * {@internal Missing Long Description}}
     15 *
     16 * @since 0.71
     17 * @uses $id
     18 */
    719function the_ID() {
    820        global $id;
    921        echo $id;
    1022}
    1123
    12 
     24/**
     25 * get_the_ID() - {@internal Missing Short Description}}
     26 *
     27 * {@internal Missing Long Description}}
     28 *
     29 * @since 2.1.0
     30 * @uses $id
     31 *
     32 * @return unknown
     33 */
    1334function get_the_ID() {
    1435        global $id;
    1536        return $id;
    1637}
    1738
    18 
     39/**
     40 * the_title() - {@internal Missing Short Description}}
     41 *
     42 * {@internal Missing Long Description}}
     43 *
     44 * @since 0.71
     45 *
     46 * @param unknown_type $before
     47 * @param unknown_type $after
     48 * @param unknown_type $echo
     49 * @return unknown
     50 */
    1951function the_title($before = '', $after = '', $echo = true) {
    2052        $title = get_the_title();
    2153
     
    3062                return $title;
    3163}
    3264
     65/**
     66 * the_title_attribute() - {@internal Missing Short Description}}
     67 *
     68 * {@internal Missing Long Description}}
     69 *
     70 * @since 2.3.0
     71 *
     72 * @param unknown_type $args
     73 * @return unknown
     74 */
    3375function the_title_attribute( $args = '' ) {
    3476        $title = get_the_title();
    3577
     
    5092                return $title;
    5193}
    5294
     95/**
     96 * get_the_title() - {@internal Missing Short Description}}
     97 *
     98 * {@internal Missing Long Description}}
     99 *
     100 * @since 0.71
     101 *
     102 * @param unknown_type $id
     103 * @return unknown
     104 */
    53105function get_the_title( $id = 0 ) {
    54106        $post = &get_post($id);
    55107
     
    64116        return apply_filters( 'the_title', $title );
    65117}
    66118
     119/**
     120 * the_guid() - {@internal Missing Short Description}}
     121 *
     122 * {@internal Missing Long Description}}
     123 *
     124 * @since 1.5.0
     125 *
     126 * @param unknown_type $id
     127 */
    67128function the_guid( $id = 0 ) {
    68129        echo get_the_guid($id);
    69130}
    70131
     132/**
     133 * get_the_guid() - {@internal Missing Short Description}}
     134 *
     135 * {@internal Missing Long Description}}
     136 *
     137 * @since 1.5.0
     138 *
     139 * @param unknown_type $id
     140 * @return unknown
     141 */
    71142function get_the_guid( $id = 0 ) {
    72143        $post = &get_post($id);
    73144
    74145        return apply_filters('get_the_guid', $post->guid);
    75146}
    76147
     148/**
     149 * the_content() - {@internal Missing Short Description}}
     150 *
     151 * {@internal Missing Long Description}}
     152 *
     153 * @since 0.71
     154 *
     155 * @param unknown_type $more_link_text
     156 * @param unknown_type $stripteaser
     157 * @param unknown_type $more_file
     158 */
    77159function the_content($more_link_text = NULL, $stripteaser = 0, $more_file = '') {
    78160        $content = get_the_content($more_link_text, $stripteaser, $more_file);
    79161        $content = apply_filters('the_content', $content);
     
    81163        echo $content;
    82164}
    83165
    84 
     166/**
     167 * get_the_content() - {@internal Missing Short Description}}
     168 *
     169 * {@internal Missing Long Description}}
     170 *
     171 * @since 0.71
     172 *
     173 * @param unknown_type $more_link_text
     174 * @param unknown_type $stripteaser
     175 * @param unknown_type $more_file
     176 * @return unknown
     177 */
    85178function get_the_content($more_link_text = NULL, $stripteaser = 0, $more_file = '') {
    86179        global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow;
    87180
     
    135228        return $output;
    136229}
    137230
    138 
     231/**
     232 * the_excerpt() - {@internal Missing Short Description}}
     233 *
     234 * {@internal Missing Long Description}}
     235 *
     236 * @since 0.71
     237 * @uses apply_filters() -
     238 */
    139239function the_excerpt() {
    140240        echo apply_filters('the_excerpt', get_the_excerpt());
    141241}
    142242
    143 
     243/**
     244 * get_the_excerpt() - {@internal Missing Short Description}}
     245 *
     246 * {@internal Missing Long Description}}
     247 *
     248 * @since 0.71
     249 *
     250 * @param unknown_type $deprecated
     251 * @return unknown
     252 */
    144253function get_the_excerpt($deprecated = '') {
    145254        global $post;
    146255        $output = '';
     
    155264        return apply_filters('get_the_excerpt', $output);
    156265}
    157266
     267/**
     268 * has_excerpt() - {@internal Missing Short Description}}
     269 *
     270 * {@internal Missing Long Description}}
     271 *
     272 * @since 2.3.0
     273 *
     274 * @param unknown_type $id
     275 * @return unknown
     276 */
    158277function has_excerpt( $id = 0 ) {
    159278        $post = &get_post( $id );
    160279        return ( !empty( $post->post_excerpt ) );
     
    245364        echo " sticky";
    246365}
    247366
     367/**
     368 * wp_link_pages() - {@internal Missing Short Description}}
     369 *
     370 * {@internal Missing Long Description}}
     371 *
     372 * @since 1.2.0
     373 *
     374 * @param unknown_type $args
     375 * @return unknown
     376 */
    248377function wp_link_pages($args = '') {
    249378        $defaults = array(
    250379                'before' => '<p>' . __('Pages:'), 'after' => '</p>',
     
    325454// Post-meta: Custom per-post fields.
    326455//
    327456
    328 
     457/**
     458 * post_custom() - {@internal Missing Short Description}}
     459 *
     460 * {@internal Missing Long Description}}
     461 *
     462 * @since 1.5.0
     463 *
     464 * @param unknown_type $key
     465 * @return unknown
     466 */
    329467function post_custom( $key = '' ) {
    330468        $custom = get_post_custom();
    331469
     
    337475
    338476
    339477// this will probably change at some point...
     478/**
     479 * the_meta() - {@internal Missing Short Description}}
     480 *
     481 * {@internal Missing Long Description}}
     482 *
     483 * @since 1.2.0
     484 * @uses apply_filters()
     485 */
    340486function the_meta() {
    341487        if ( $keys = get_post_custom_keys() ) {
    342488                echo "<ul class='post-meta'>\n";
     
    357503// Pages
    358504//
    359505
     506/**
     507 * wp_dropdown_pages() - {@internal Missing Short Description}}
     508 *
     509 * {@internal Missing Long Description}}
     510 *
     511 * @since 2.1.0
     512 *
     513 * @param unknown_type $args
     514 * @return unknown
     515 */
    360516function wp_dropdown_pages($args = '') {
    361517        $defaults = array(
    362518                'depth' => 0, 'child_of' => 0,
     
    386542        return $output;
    387543}
    388544
     545/**
     546 * wp_list_pages() - {@internal Missing Short Description}}
     547 *
     548 * {@internal Missing Long Description}}
     549 *
     550 * @since 1.5.0
     551 *
     552 * @param unknown_type $args
     553 * @return unknown
     554 */
    389555function wp_list_pages($args = '') {
    390556        $defaults = array(
    391557                'depth' => 0, 'show_date' => '',
     
    436602// Page helpers
    437603//
    438604
     605/**
     606 * walk_page_tree() - {@internal Missing Short Description}}
     607 *
     608 * {@internal Missing Long Description}}
     609 *
     610 * @since 2.1.0
     611 *
     612 * @return unknown
     613 */
    439614function walk_page_tree() {
    440615        $walker = new Walker_Page;
    441616        $args = func_get_args();
    442617        return call_user_func_array(array(&$walker, 'walk'), $args);
    443618}
    444619
     620/**
     621 * walk_page_dropdown_tree() - {@internal Missing Short Description}}
     622 *
     623 * {@internal Missing Long Description}}
     624 *
     625 * @since 2.1.0
     626 *
     627 * @return unknown
     628 */
    445629function walk_page_dropdown_tree() {
    446630        $walker = new Walker_PageDropdown;
    447631        $args = func_get_args();
     
    452636// Attachments
    453637//
    454638
     639/**
     640 * the_attachment_link() - {@internal Missing Short Description}}
     641 *
     642 * {@internal Missing Long Description}}
     643 *
     644 * @since 2.0.0
     645 *
     646 * @param unknown_type $id
     647 * @param unknown_type $fullsize
     648 * @param unknown_type $max_dims
     649 */
    455650function the_attachment_link($id = 0, $fullsize = false, $deprecated = false, $permalink = false) {
    456651        if ( $fullsize )
    457652                echo wp_get_attachment_link($id, 'full', $permalink);
     
    499694
    500695
    501696// deprecated: use wp_get_attachment_image_src()
     697/**
     698 * get_attachment_icon_src() - {@internal Missing Short Description}}
     699 *
     700 * {@internal Missing Long Description}}
     701 *
     702 * @since 2.1.0
     703 *
     704 * @param unknown_type $id
     705 * @param unknown_type $fullsize
     706 * @return unknown
     707 */
    502708function get_attachment_icon_src( $id = 0, $fullsize = false ) {
    503709        $id = (int) $id;
    504710        if ( !$post = & get_post($id) )
     
    531737}
    532738
    533739// deprecated: use wp_get_attachment_image()
     740/**
     741 * get_attachment_icon() - {@internal Missing Short Description}}
     742 *
     743 * {@internal Missing Long Description}}
     744 *
     745 * @since 2.0.0
     746 *
     747 * @param unknown_type $id
     748 * @param unknown_type $fullsize
     749 * @param unknown_type $max_dims
     750 * @return unknown
     751 */
    534752function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
    535753        $id = (int) $id;
    536754        if ( !$post = & get_post($id) )
     
    575793}
    576794
    577795// deprecated: use wp_get_attachment_image()
     796/**
     797 * get_attachment_innerHTML() - {@internal Missing Short Description}}
     798 *
     799 * {@internal Missing Long Description}}
     800 *
     801 * @since 2.0.0
     802 *
     803 * @param unknown_type $id
     804 * @param unknown_type $fullsize
     805 * @param unknown_type $max_dims
     806 * @return unknown
     807 */
    578808function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {
    579809        $id = (int) $id;
    580810        if ( !$post = & get_post($id) )
     
    589819        return apply_filters('attachment_innerHTML', $innerHTML, $post->ID);
    590820}
    591821
     822/**
     823 * prepend_attachment() - {@internal Missing Short Description}}
     824 *
     825 * {@internal Missing Long Description}}
     826 *
     827 * @since 2.0.0
     828 *
     829 * @param unknown_type $content
     830 * @return unknown
     831 */
    592832function prepend_attachment($content) {
    593833        global $post;
    594834
     
    608848// Misc
    609849//
    610850
     851/**
     852 * get_the_password_form() - {@internal Missing Short Description}}
     853 *
     854 * {@internal Missing Long Description}}
     855 *
     856 * @since 1.0.0
     857 *
     858 * @return unknown
     859 */
    611860function get_the_password_form() {
    612861        global $post;
    613862        $label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID);
     
    626875 * You can optional provide a template name and then the check will be specific to
    627876 * that template.
    628877 *
    629  * @package Template Tags
    630  * @global object $wp_query
     878 * @since 2.5.0
     879 * @uses $wp_query
     880 *
    631881 * @param string $template The specific template name if specific matching is required
     882 * @return bool False on failure, true if success
    632883 */
    633884function is_page_template($template = '') {
    634885        if (!is_page()) {