Make WordPress Core

Ticket #23603: password_protected.patch

File password_protected.patch, 1.8 KB (added by soulseekah, 12 years ago)
  • wp-includes/post-template.php

     
    12211221 */
    12221222function get_the_password_form() {
    12231223        $post = get_post();
     1224        $ptype_obj = get_post_type_object( $post->post_type );
     1225
    12241226        $label = 'pwbox-' . ( empty($post->ID) ? rand() : $post->ID );
    12251227        $output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" method="post">
    1226         <p>' . __("This post is password protected. To view it please enter your password below:") . '</p>
     1228        <p>' . esc_html( $ptype_obj->labels->password_protected ) . '</p>
    12271229        <p><label for="' . $label . '">' . __("Password:") . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__("Submit") . '" /></p>
    12281230</form>
    12291231        ';
  • wp-includes/post.php

     
    14391439                'not_found' => array( __('No posts found.'), __('No pages found.') ),
    14401440                'not_found_in_trash' => array( __('No posts found in Trash.'), __('No pages found in Trash.') ),
    14411441                'parent_item_colon' => array( null, __('Parent Page:') ),
    1442                 'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) )
     1442                'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ),
     1443                'password_protected' => array(
     1444                        __( 'This post is password protected. To view it please enter your password below:' ),
     1445                        __( 'This page is password protected. To view it please enter your password below:' )
     1446                )
     1447
    14431448        );
    14441449        $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
    14451450