Make WordPress Core

Ticket #27719: 27719.diff

File 27719.diff, 4.0 KB (added by jesin, 12 years ago)

Docs for search_form_format, get_search_form, logout_url, login_url, register_url, login_form_defaults, lostpassword_url, register, wp_title, single_post_title

  • wp-includes/general-template.php

     
    160160        do_action( 'pre_get_search_form' );
    161161
    162162        $format = current_theme_supports( 'html5', 'search-form' ) ? 'html5' : 'xhtml';
     163        /**
     164         * Filter the HTML format of the search form.
     165         *
     166         * @since 3.6.0
     167         *
     168         * @param string $format The type of markup - HTML5 or XHTML.
     169         */
    163170        $format = apply_filters( 'search_form_format', $format );
    164171
    165172        $search_form_template = locate_template( 'searchform.php' );
     
    187194                }
    188195        }
    189196
     197        /**
     198         * Filter the HTML output of the search form.
     199         *
     200         * @since 2.7.0
     201         *
     202         * @param string $form The HTML code of the form.
     203         */
    190204        $result = apply_filters( 'get_search_form', $form );
    191205        if ( null === $result )
    192206                $result = $form;
     
    244258        $logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));
    245259        $logout_url = wp_nonce_url( $logout_url, 'log-out' );
    246260
     261        /**
     262         * Filter the Log Out URL of the site.
     263         *
     264         * @since 2.8.0
     265         *
     266         * @param string $logout_url    The logout URL.
     267         * @param string $redirect      The path to redirect to on logout if supplied.
     268         */
    247269        return apply_filters('logout_url', $logout_url, $redirect);
    248270}
    249271
     
    269291        if ( $force_reauth )
    270292                $login_url = add_query_arg('reauth', '1', $login_url);
    271293
     294        /**
     295         * Filter the login URL.
     296         *
     297         * @since 2.8.0
     298         *
     299         * @param string $login_url     The login URL.
     300         * @param string $redirect      The path to redirect to on login if supplied.
     301         */
    272302        return apply_filters('login_url', $login_url, $redirect);
    273303}
    274304
     
    284314 * @return string
    285315 */
    286316function wp_registration_url() {
     317        /**
     318         * Filter the user registration URL.
     319         *
     320         * @since 3.6.0
     321         *
     322         * @param string The user registration URL returned by the site_url() function.
     323         */
    287324        return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) );
    288325}
    289326
     
    312349                'value_username' => '',
    313350                'value_remember' => false, // Set this to true to default the "Remember me" checkbox to checked
    314351        );
     352        /**
     353         * Filter the default arguments of the wp_login_form() function.
     354         *
     355         * @since 3.0.0
     356         *
     357         * @param array $defaults The default arguments of the login form.
     358         */
    315359        $args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );
    316360
    317361        $form = '
     
    359403        }
    360404
    361405        $lostpassword_url = add_query_arg( $args, network_site_url('wp-login.php', 'login') );
     406        /**
     407         * Filter the lost password URL.
     408         *
     409         * @since 2.8.0
     410         *
     411         * @param string $lostpassword_url      The URL of the lost password page.
     412         * @param string $redirect              The path to redirect to on login.
     413         */
    362414        return apply_filters( 'lostpassword_url', $lostpassword_url, $redirect );
    363415}
    364416
     
    387439                $link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
    388440        }
    389441
     442        /**
     443         * Filter the HTML link to the registration or admin page.
     444         *
     445         * @since 1.5.2
     446         *
     447         * @param string $link The HTML code of the link to the registration or admin page
     448         */
    390449        if ( $echo )
    391450                echo apply_filters('register', $link);
    392451        else
     
    654713                $title = $prefix . implode( " $sep ", $title_array );
    655714        }
    656715
     716        /**
     717         * Filter the string to be displayed between the <title> tags.
     718         *
     719         * @since 2.0.0
     720         *
     721         * @param string $title         The page title of the current blog area.
     722         * @param string $sep           The separator of the title.
     723         * @param string $seplocation   The location of the separator right or left.
     724         */
    657725        $title = apply_filters('wp_title', $title, $sep, $seplocation);
    658726
    659727        // Send it out
     
    686754        if ( !isset($_post->post_title) )
    687755                return;
    688756
     757        /**
     758         * Filter the single post page title.
     759         *
     760         * @since 1.2.1
     761         *
     762         * @param string $_post->post_title     The single post page title.
     763         * @param object $_post                 The current queried object as returned by get_queried_object().
     764         */
    689765        $title = apply_filters('single_post_title', $_post->post_title, $_post);
    690766        if ( $display )
    691767                echo $prefix . $title;