mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues. This change includes three notable additions: - Multiline function calls must now put each parameter on a new line. - Auto-formatting files is now part of the `grunt precommit` script. - Auto-fixable coding standards issues will now cause Travis failures. Fixes #44600. Built from https://develop.svn.wordpress.org/trunk@43571 git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8142df82bc
commit
56c162fbc9
@ -40,7 +40,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
__( 'Major Customizer Improvements, Code Error Checking, and More! %s' ),
|
__( 'Major Customizer Improvements, Code Error Checking, and More! %s' ),
|
||||||
'🎉'
|
'🎉'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</h2>
|
</h2>
|
||||||
<p><?php _e( 'Welcome to an improved Customizer workflow with design drafts, locking, scheduling, and preview links. What’s more, code syntax highlighting and error checking will make for a clean and smooth site building experience. Finally, if all that wasn’t pretty great, we’ve got a great new Gallery widget and improvements to theme browsing and switching.' ); ?></p>
|
<p><?php _e( 'Welcome to an improved Customizer workflow with design drafts, locking, scheduling, and preview links. What’s more, code syntax highlighting and error checking will make for a clean and smooth site building experience. Finally, if all that wasn’t pretty great, we’ve got a great new Gallery widget and improvements to theme browsing and switching.' ); ?></p>
|
||||||
</div>
|
</div>
|
||||||
@ -181,7 +181,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
__( 'Lend a Hand with Gutenberg %s' ),
|
__( 'Lend a Hand with Gutenberg %s' ),
|
||||||
'🤝'
|
'🤝'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
@ -190,7 +190,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
__( 'https://wordpress.org/plugins/gutenberg/' ),
|
__( 'https://wordpress.org/plugins/gutenberg/' ),
|
||||||
'https://github.com/WordPress/gutenberg'
|
'https://github.com/WordPress/gutenberg'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
__( 'Developer Happiness %s' ),
|
__( 'Developer Happiness %s' ),
|
||||||
'😊'
|
'😊'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="under-the-hood two-col">
|
<div class="under-the-hood two-col">
|
||||||
@ -217,7 +217,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
__( 'We’ve made numerous improvements to the Customizer JS API in WordPress 4.9, eliminating many pain points and making it just as easy to work with as the PHP API. There are also new base control templates, a date/time control, and section/panel/global notifications to name a few. <a href="%s">Check out the full list.</a>' ),
|
__( 'We’ve made numerous improvements to the Customizer JS API in WordPress 4.9, eliminating many pain points and making it just as easy to work with as the PHP API. There are also new base control templates, a date/time control, and section/panel/global notifications to name a few. <a href="%s">Check out the full list.</a>' ),
|
||||||
'https://make.wordpress.org/core/2017/11/01/improvements-to-the-customize-js-api-in-4-9/'
|
'https://make.wordpress.org/core/2017/11/01/improvements-to-the-customize-js-api-in-4-9/'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
@ -74,7 +74,8 @@ if ( get_option( 'db_upgraded' ) ) {
|
|||||||
if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int) ( $c / 50 ) ) == 1 ) ) {
|
if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int) ( $c / 50 ) ) == 1 ) ) {
|
||||||
require_once( ABSPATH . WPINC . '/http.php' );
|
require_once( ABSPATH . WPINC . '/http.php' );
|
||||||
$response = wp_remote_get(
|
$response = wp_remote_get(
|
||||||
admin_url( 'upgrade.php?step=1' ), array(
|
admin_url( 'upgrade.php?step=1' ),
|
||||||
|
array(
|
||||||
'timeout' => 120,
|
'timeout' => 120,
|
||||||
'httpversion' => '1.1',
|
'httpversion' => '1.1',
|
||||||
)
|
)
|
||||||
|
@ -63,7 +63,8 @@ if ( isset( $_REQUEST['attachment_id'] ) && ( $id = intval( $_REQUEST['attachmen
|
|||||||
case 2:
|
case 2:
|
||||||
add_filter( 'attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2 );
|
add_filter( 'attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2 );
|
||||||
echo get_media_item(
|
echo get_media_item(
|
||||||
$id, array(
|
$id,
|
||||||
|
array(
|
||||||
'send' => false,
|
'send' => false,
|
||||||
'delete' => true,
|
'delete' => true,
|
||||||
)
|
)
|
||||||
|
@ -110,49 +110,49 @@ switch ( $action ) {
|
|||||||
$nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_';
|
$nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_';
|
||||||
$nonce_action .= $comment_id;
|
$nonce_action .= $comment_id;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
|
|
||||||
<h1><?php echo esc_html( $title ); ?></h1>
|
<h1><?php echo esc_html( $title ); ?></h1>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
switch ( $action ) {
|
switch ( $action ) {
|
||||||
case 'spam':
|
case 'spam':
|
||||||
$caution_msg = __( 'You are about to mark the following comment as spam:' );
|
$caution_msg = __( 'You are about to mark the following comment as spam:' );
|
||||||
$button = _x( 'Mark as Spam', 'comment' );
|
$button = _x( 'Mark as Spam', 'comment' );
|
||||||
break;
|
break;
|
||||||
case 'trash':
|
case 'trash':
|
||||||
$caution_msg = __( 'You are about to move the following comment to the Trash:' );
|
$caution_msg = __( 'You are about to move the following comment to the Trash:' );
|
||||||
$button = __( 'Move to Trash' );
|
$button = __( 'Move to Trash' );
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
$caution_msg = __( 'You are about to delete the following comment:' );
|
$caution_msg = __( 'You are about to delete the following comment:' );
|
||||||
$button = __( 'Permanently Delete Comment' );
|
$button = __( 'Permanently Delete Comment' );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$caution_msg = __( 'You are about to approve the following comment:' );
|
$caution_msg = __( 'You are about to approve the following comment:' );
|
||||||
$button = __( 'Approve Comment' );
|
$button = __( 'Approve Comment' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $comment->comment_approved != '0' ) { // if not unapproved
|
if ( $comment->comment_approved != '0' ) { // if not unapproved
|
||||||
$message = '';
|
$message = '';
|
||||||
switch ( $comment->comment_approved ) {
|
switch ( $comment->comment_approved ) {
|
||||||
case '1':
|
case '1':
|
||||||
$message = __( 'This comment is currently approved.' );
|
$message = __( 'This comment is currently approved.' );
|
||||||
break;
|
break;
|
||||||
case 'spam':
|
case 'spam':
|
||||||
$message = __( 'This comment is currently marked as spam.' );
|
$message = __( 'This comment is currently marked as spam.' );
|
||||||
break;
|
break;
|
||||||
case 'trash':
|
case 'trash':
|
||||||
$message = __( 'This comment is currently in the Trash.' );
|
$message = __( 'This comment is currently in the Trash.' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( $message ) {
|
if ( $message ) {
|
||||||
echo '<div id="message" class="notice notice-info"><p>' . $message . '</p></div>';
|
echo '<div id="message" class="notice notice-info"><p>' . $message . '</p></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="message" class="notice notice-warning"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo $caution_msg; ?></p></div>
|
<div id="message" class="notice notice-warning"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo $caution_msg; ?></p></div>
|
||||||
|
|
||||||
<table class="form-table comment-ays">
|
<table class="form-table comment-ays">
|
||||||
@ -160,13 +160,13 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
|
|||||||
<th scope="row"><?php _e( 'Author' ); ?></th>
|
<th scope="row"><?php _e( 'Author' ); ?></th>
|
||||||
<td><?php comment_author( $comment ); ?></td>
|
<td><?php comment_author( $comment ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php if ( get_comment_author_email( $comment ) ) { ?>
|
<?php if ( get_comment_author_email( $comment ) ) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Email' ); ?></th>
|
<th scope="row"><?php _e( 'Email' ); ?></th>
|
||||||
<td><?php comment_author_email( $comment ); ?></td>
|
<td><?php comment_author_email( $comment ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( get_comment_author_url( $comment ) ) { ?>
|
<?php if ( get_comment_author_url( $comment ) ) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'URL' ); ?></th>
|
<th scope="row"><?php _e( 'URL' ); ?></th>
|
||||||
<td><a href="<?php comment_author_url( $comment ); ?>"><?php comment_author_url( $comment ); ?></a></td>
|
<td><a href="<?php comment_author_url( $comment ); ?>"><?php comment_author_url( $comment ); ?></a></td>
|
||||||
@ -175,33 +175,33 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php /* translators: column name or table row header */ _e( 'In Response To' ); ?></th>
|
<th scope="row"><?php /* translators: column name or table row header */ _e( 'In Response To' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$post_id = $comment->comment_post_ID;
|
$post_id = $comment->comment_post_ID;
|
||||||
if ( current_user_can( 'edit_post', $post_id ) ) {
|
if ( current_user_can( 'edit_post', $post_id ) ) {
|
||||||
$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
|
$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
|
||||||
$post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
|
$post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
|
||||||
} else {
|
} else {
|
||||||
$post_link = esc_html( get_the_title( $post_id ) );
|
$post_link = esc_html( get_the_title( $post_id ) );
|
||||||
}
|
}
|
||||||
echo $post_link;
|
echo $post_link;
|
||||||
|
|
||||||
if ( $comment->comment_parent ) {
|
if ( $comment->comment_parent ) {
|
||||||
$parent = get_comment( $comment->comment_parent );
|
$parent = get_comment( $comment->comment_parent );
|
||||||
$parent_link = esc_url( get_comment_link( $parent ) );
|
$parent_link = esc_url( get_comment_link( $parent ) );
|
||||||
$name = get_comment_author( $parent );
|
$name = get_comment_author( $parent );
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: comment link */
|
/* translators: %s: comment link */
|
||||||
' | ' . __( 'In reply to %s.' ),
|
' | ' . __( 'In reply to %s.' ),
|
||||||
'<a href="' . $parent_link . '">' . $name . '</a>'
|
'<a href="' . $parent_link . '">' . $name . '</a>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Submitted on' ); ?></th>
|
<th scope="row"><?php _e( 'Submitted on' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
/* translators: 1: comment date, 2: comment time */
|
/* translators: 1: comment date, 2: comment time */
|
||||||
$submitted = sprintf(
|
$submitted = sprintf(
|
||||||
__( '%1$s at %2$s' ),
|
__( '%1$s at %2$s' ),
|
||||||
@ -209,18 +209,18 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
|
|||||||
get_comment_date( __( 'Y/m/d' ), $comment ),
|
get_comment_date( __( 'Y/m/d' ), $comment ),
|
||||||
get_comment_date( __( 'g:i a' ), $comment )
|
get_comment_date( __( 'g:i a' ), $comment )
|
||||||
);
|
);
|
||||||
if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) {
|
if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) {
|
||||||
echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . $submitted . '</a>';
|
echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . $submitted . '</a>';
|
||||||
} else {
|
} else {
|
||||||
echo $submitted;
|
echo $submitted;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php /* translators: field name in comment form */ _ex( 'Comment', 'noun' ); ?></th>
|
<th scope="row"><?php /* translators: field name in comment form */ _ex( 'Comment', 'noun' ); ?></th>
|
||||||
<td class="comment-content">
|
<td class="comment-content">
|
||||||
<?php comment_text( $comment ); ?>
|
<?php comment_text( $comment ); ?>
|
||||||
<p class="edit-comment"><a href="<?php echo admin_url( "comment.php?action=editcomment&c={$comment->comment_ID}" ); ?>"><?php esc_html_e( 'Edit' ); ?></a></p>
|
<p class="edit-comment"><a href="<?php echo admin_url( "comment.php?action=editcomment&c={$comment->comment_ID}" ); ?>"><?php esc_html_e( 'Edit' ); ?></a></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -229,18 +229,18 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
|
|||||||
<form action="comment.php" method="get" class="comment-ays-submit">
|
<form action="comment.php" method="get" class="comment-ays-submit">
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<?php submit_button( $button, 'primary', 'submit', false ); ?>
|
<?php submit_button( $button, 'primary', 'submit', false ); ?>
|
||||||
<a href="<?php echo admin_url( 'edit-comments.php' ); ?>" class="button-cancel"><?php esc_html_e( 'Cancel' ); ?></a>
|
<a href="<?php echo admin_url( 'edit-comments.php' ); ?>" class="button-cancel"><?php esc_html_e( 'Cancel' ); ?></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php wp_nonce_field( $nonce_action ); ?>
|
<?php wp_nonce_field( $nonce_action ); ?>
|
||||||
<input type="hidden" name="action" value="<?php echo esc_attr( $formaction ); ?>" />
|
<input type="hidden" name="action" value="<?php echo esc_attr( $formaction ); ?>" />
|
||||||
<input type="hidden" name="c" value="<?php echo esc_attr( $comment->comment_ID ); ?>" />
|
<input type="hidden" name="c" value="<?php echo esc_attr( $comment->comment_ID ); ?>" />
|
||||||
<input type="hidden" name="noredir" value="1" />
|
<input type="hidden" name="noredir" value="1" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'deletecomment':
|
case 'deletecomment':
|
||||||
@ -290,7 +290,8 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
|
|||||||
array(
|
array(
|
||||||
'trashed' => '1',
|
'trashed' => '1',
|
||||||
'ids' => $comment_id,
|
'ids' => $comment_id,
|
||||||
), $redir
|
),
|
||||||
|
$redir
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'untrashcomment':
|
case 'untrashcomment':
|
||||||
@ -303,7 +304,8 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved
|
|||||||
array(
|
array(
|
||||||
'spammed' => '1',
|
'spammed' => '1',
|
||||||
'ids' => $comment_id,
|
'ids' => $comment_id,
|
||||||
), $redir
|
),
|
||||||
|
$redir
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'unspamcomment':
|
case 'unspamcomment':
|
||||||
|
@ -221,28 +221,28 @@ class Custom_Background {
|
|||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
public function admin_page() {
|
public function admin_page() {
|
||||||
?>
|
?>
|
||||||
<div class="wrap" id="custom-background">
|
<div class="wrap" id="custom-background">
|
||||||
<h1><?php _e( 'Custom Background' ); ?></h1>
|
<h1><?php _e( 'Custom Background' ); ?></h1>
|
||||||
|
|
||||||
<?php if ( current_user_can( 'customize' ) ) { ?>
|
<?php if ( current_user_can( 'customize' ) ) { ?>
|
||||||
<div class="notice notice-info hide-if-no-customize">
|
<div class="notice notice-info hide-if-no-customize">
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
__( 'You can now manage and live-preview Custom Backgrounds in the <a href="%1$s">Customizer</a>.' ),
|
__( 'You can now manage and live-preview Custom Backgrounds in the <a href="%1$s">Customizer</a>.' ),
|
||||||
admin_url( 'customize.php?autofocus[control]=background_image' )
|
admin_url( 'customize.php?autofocus[control]=background_image' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ( ! empty( $this->updated ) ) { ?>
|
<?php if ( ! empty( $this->updated ) ) { ?>
|
||||||
<div id="message" class="updated">
|
<div id="message" class="updated">
|
||||||
<p><?php printf( __( 'Background updated. <a href="%s">Visit your site</a> to see how it looks.' ), home_url( '/' ) ); ?></p>
|
<p><?php printf( __( 'Background updated. <a href="%s">Visit your site</a> to see how it looks.' ), home_url( '/' ) ); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<h3><?php _e( 'Background Image' ); ?></h3>
|
<h3><?php _e( 'Background Image' ); ?></h3>
|
||||||
|
|
||||||
@ -251,34 +251,34 @@ class Custom_Background {
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Preview' ); ?></th>
|
<th scope="row"><?php _e( 'Preview' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ( $this->admin_image_div_callback ) {
|
if ( $this->admin_image_div_callback ) {
|
||||||
call_user_func( $this->admin_image_div_callback );
|
call_user_func( $this->admin_image_div_callback );
|
||||||
} else {
|
} else {
|
||||||
$background_styles = '';
|
$background_styles = '';
|
||||||
if ( $bgcolor = get_background_color() ) {
|
if ( $bgcolor = get_background_color() ) {
|
||||||
$background_styles .= 'background-color: #' . $bgcolor . ';';
|
$background_styles .= 'background-color: #' . $bgcolor . ';';
|
||||||
}
|
}
|
||||||
|
|
||||||
$background_image_thumb = get_background_image();
|
$background_image_thumb = get_background_image();
|
||||||
if ( $background_image_thumb ) {
|
if ( $background_image_thumb ) {
|
||||||
$background_image_thumb = esc_url( set_url_scheme( get_theme_mod( 'background_image_thumb', str_replace( '%', '%%', $background_image_thumb ) ) ) );
|
$background_image_thumb = esc_url( set_url_scheme( get_theme_mod( 'background_image_thumb', str_replace( '%', '%%', $background_image_thumb ) ) ) );
|
||||||
$background_position_x = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );
|
$background_position_x = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );
|
||||||
$background_position_y = get_theme_mod( 'background_position_y', get_theme_support( 'custom-background', 'default-position-y' ) );
|
$background_position_y = get_theme_mod( 'background_position_y', get_theme_support( 'custom-background', 'default-position-y' ) );
|
||||||
$background_size = get_theme_mod( 'background_size', get_theme_support( 'custom-background', 'default-size' ) );
|
$background_size = get_theme_mod( 'background_size', get_theme_support( 'custom-background', 'default-size' ) );
|
||||||
$background_repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );
|
$background_repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );
|
||||||
$background_attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );
|
$background_attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );
|
||||||
|
|
||||||
// Background-image URL must be single quote, see below.
|
// Background-image URL must be single quote, see below.
|
||||||
$background_styles .= " background-image: url('$background_image_thumb');"
|
$background_styles .= " background-image: url('$background_image_thumb');"
|
||||||
. " background-size: $background_size;"
|
. " background-size: $background_size;"
|
||||||
. " background-position: $background_position_x $background_position_y;"
|
. " background-position: $background_position_x $background_position_y;"
|
||||||
. " background-repeat: $background_repeat;"
|
. " background-repeat: $background_repeat;"
|
||||||
. " background-attachment: $background_attachment;";
|
. " background-attachment: $background_attachment;";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above ?>
|
<div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above ?>
|
||||||
<?php if ( $background_image_thumb ) { ?>
|
<?php if ( $background_image_thumb ) { ?>
|
||||||
<img class="custom-background-image" src="<?php echo $background_image_thumb; ?>" style="visibility:hidden;" alt="" /><br />
|
<img class="custom-background-image" src="<?php echo $background_image_thumb; ?>" style="visibility:hidden;" alt="" /><br />
|
||||||
<img class="custom-background-image" src="<?php echo $background_image_thumb; ?>" style="visibility:hidden;" alt="" />
|
<img class="custom-background-image" src="<?php echo $background_image_thumb; ?>" style="visibility:hidden;" alt="" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -287,34 +287,34 @@ class Custom_Background {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if ( get_background_image() ) : ?>
|
<?php if ( get_background_image() ) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Remove Image' ); ?></th>
|
<th scope="row"><?php _e( 'Remove Image' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php wp_nonce_field( 'custom-background-remove', '_wpnonce-custom-background-remove' ); ?>
|
<?php wp_nonce_field( 'custom-background-remove', '_wpnonce-custom-background-remove' ); ?>
|
||||||
<?php submit_button( __( 'Remove Background Image' ), '', 'remove-background', false ); ?><br/>
|
<?php submit_button( __( 'Remove Background Image' ), '', 'remove-background', false ); ?><br/>
|
||||||
<?php _e( 'This will remove the background image. You will not be able to restore any customizations.' ); ?>
|
<?php _e( 'This will remove the background image. You will not be able to restore any customizations.' ); ?>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php $default_image = get_theme_support( 'custom-background', 'default-image' ); ?>
|
<?php $default_image = get_theme_support( 'custom-background', 'default-image' ); ?>
|
||||||
<?php if ( $default_image && get_background_image() != $default_image ) : ?>
|
<?php if ( $default_image && get_background_image() != $default_image ) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Restore Original Image' ); ?></th>
|
<th scope="row"><?php _e( 'Restore Original Image' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<?php wp_nonce_field( 'custom-background-reset', '_wpnonce-custom-background-reset' ); ?>
|
<?php wp_nonce_field( 'custom-background-reset', '_wpnonce-custom-background-reset' ); ?>
|
||||||
<?php submit_button( __( 'Restore Original Image' ), '', 'reset-background', false ); ?><br/>
|
<?php submit_button( __( 'Restore Original Image' ), '', 'reset-background', false ); ?><br/>
|
||||||
<?php _e( 'This will restore the original background image. You will not be able to restore any customizations.' ); ?>
|
<?php _e( 'This will restore the original background image. You will not be able to restore any customizations.' ); ?>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( current_user_can( 'upload_files' ) ) : ?>
|
<?php if ( current_user_can( 'upload_files' ) ) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Select Image' ); ?></th>
|
<th scope="row"><?php _e( 'Select Image' ); ?></th>
|
||||||
<td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post">
|
<td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post">
|
||||||
@ -322,8 +322,8 @@ class Custom_Background {
|
|||||||
<label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
|
<label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
|
||||||
<input type="file" id="upload" name="import" />
|
<input type="file" id="upload" name="import" />
|
||||||
<input type="hidden" name="action" value="save" />
|
<input type="hidden" name="action" value="save" />
|
||||||
<?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?>
|
<?php wp_nonce_field( 'custom-background-upload', '_wpnonce-custom-background-upload' ); ?>
|
||||||
<?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
|
<?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
|
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
|
||||||
@ -334,7 +334,7 @@ class Custom_Background {
|
|||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -342,68 +342,68 @@ class Custom_Background {
|
|||||||
<form method="post">
|
<form method="post">
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if ( get_background_image() ) : ?>
|
<?php if ( get_background_image() ) : ?>
|
||||||
<input name="background-preset" type="hidden" value="custom">
|
<input name="background-preset" type="hidden" value="custom">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$background_position = sprintf(
|
$background_position = sprintf(
|
||||||
'%s %s',
|
'%s %s',
|
||||||
get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ),
|
get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ),
|
||||||
get_theme_mod( 'background_position_y', get_theme_support( 'custom-background', 'default-position-y' ) )
|
get_theme_mod( 'background_position_y', get_theme_support( 'custom-background', 'default-position-y' ) )
|
||||||
);
|
);
|
||||||
|
|
||||||
$background_position_options = array(
|
$background_position_options = array(
|
||||||
array(
|
array(
|
||||||
'left top' => array(
|
'left top' => array(
|
||||||
'label' => __( 'Top Left' ),
|
'label' => __( 'Top Left' ),
|
||||||
'icon' => 'dashicons dashicons-arrow-left-alt',
|
'icon' => 'dashicons dashicons-arrow-left-alt',
|
||||||
),
|
),
|
||||||
'center top' => array(
|
'center top' => array(
|
||||||
'label' => __( 'Top' ),
|
'label' => __( 'Top' ),
|
||||||
'icon' => 'dashicons dashicons-arrow-up-alt',
|
'icon' => 'dashicons dashicons-arrow-up-alt',
|
||||||
),
|
),
|
||||||
'right top' => array(
|
'right top' => array(
|
||||||
'label' => __( 'Top Right' ),
|
'label' => __( 'Top Right' ),
|
||||||
'icon' => 'dashicons dashicons-arrow-right-alt',
|
'icon' => 'dashicons dashicons-arrow-right-alt',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'left center' => array(
|
'left center' => array(
|
||||||
'label' => __( 'Left' ),
|
'label' => __( 'Left' ),
|
||||||
'icon' => 'dashicons dashicons-arrow-left-alt',
|
'icon' => 'dashicons dashicons-arrow-left-alt',
|
||||||
),
|
),
|
||||||
'center center' => array(
|
'center center' => array(
|
||||||
'label' => __( 'Center' ),
|
'label' => __( 'Center' ),
|
||||||
'icon' => 'background-position-center-icon',
|
'icon' => 'background-position-center-icon',
|
||||||
),
|
),
|
||||||
'right center' => array(
|
'right center' => array(
|
||||||
'label' => __( 'Right' ),
|
'label' => __( 'Right' ),
|
||||||
'icon' => 'dashicons dashicons-arrow-right-alt',
|
'icon' => 'dashicons dashicons-arrow-right-alt',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'left bottom' => array(
|
'left bottom' => array(
|
||||||
'label' => __( 'Bottom Left' ),
|
'label' => __( 'Bottom Left' ),
|
||||||
'icon' => 'dashicons dashicons-arrow-left-alt',
|
'icon' => 'dashicons dashicons-arrow-left-alt',
|
||||||
),
|
),
|
||||||
'center bottom' => array(
|
'center bottom' => array(
|
||||||
'label' => __( 'Bottom' ),
|
'label' => __( 'Bottom' ),
|
||||||
'icon' => 'dashicons dashicons-arrow-down-alt',
|
'icon' => 'dashicons dashicons-arrow-down-alt',
|
||||||
),
|
),
|
||||||
'right bottom' => array(
|
'right bottom' => array(
|
||||||
'label' => __( 'Bottom Right' ),
|
'label' => __( 'Bottom Right' ),
|
||||||
'icon' => 'dashicons dashicons-arrow-right-alt',
|
'icon' => 'dashicons dashicons-arrow-right-alt',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Image Position' ); ?></th>
|
<th scope="row"><?php _e( 'Image Position' ); ?></th>
|
||||||
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Image Position' ); ?></span></legend>
|
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Image Position' ); ?></span></legend>
|
||||||
<div class="background-position-control">
|
<div class="background-position-control">
|
||||||
<?php foreach ( $background_position_options as $group ) : ?>
|
<?php foreach ( $background_position_options as $group ) : ?>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<?php foreach ( $group as $value => $input ) : ?>
|
<?php foreach ( $group as $value => $input ) : ?>
|
||||||
<label>
|
<label>
|
||||||
<input class="screen-reader-text" name="background-position" type="radio" value="<?php echo esc_attr( $value ); ?>"<?php checked( $value, $background_position ); ?>>
|
<input class="screen-reader-text" name="background-position" type="radio" value="<?php echo esc_attr( $value ); ?>"<?php checked( $value, $background_position ); ?>>
|
||||||
<span class="button display-options position"><span class="<?php echo esc_attr( $input['icon'] ); ?>" aria-hidden="true"></span></span>
|
<span class="button display-options position"><span class="<?php echo esc_attr( $input['icon'] ); ?>" aria-hidden="true"></span></span>
|
||||||
@ -446,24 +446,24 @@ $background_position_options = array(
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Background Color' ); ?></th>
|
<th scope="row"><?php _e( 'Background Color' ); ?></th>
|
||||||
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Color' ); ?></span></legend>
|
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Background Color' ); ?></span></legend>
|
||||||
<?php
|
<?php
|
||||||
$default_color = '';
|
$default_color = '';
|
||||||
if ( current_theme_supports( 'custom-background', 'default-color' ) ) {
|
if ( current_theme_supports( 'custom-background', 'default-color' ) ) {
|
||||||
$default_color = ' data-default-color="#' . esc_attr( get_theme_support( 'custom-background', 'default-color' ) ) . '"';
|
$default_color = ' data-default-color="#' . esc_attr( get_theme_support( 'custom-background', 'default-color' ) ) . '"';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr( get_background_color() ); ?>"<?php echo $default_color; ?>>
|
<input type="text" name="background-color" id="background-color" value="#<?php echo esc_attr( get_background_color() ); ?>"<?php echo $default_color; ?>>
|
||||||
</fieldset></td>
|
</fieldset></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php wp_nonce_field( 'custom-background' ); ?>
|
<?php wp_nonce_field( 'custom-background' ); ?>
|
||||||
<?php submit_button( null, 'primary', 'save-background-options' ); ?>
|
<?php submit_button( null, 'primary', 'save-background-options' ); ?>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -581,7 +581,8 @@ if ( current_theme_supports( 'custom-background', 'default-color' ) ) {
|
|||||||
/** This filter is documented in wp-admin/includes/media.php */
|
/** This filter is documented in wp-admin/includes/media.php */
|
||||||
$sizes = array_keys(
|
$sizes = array_keys(
|
||||||
apply_filters(
|
apply_filters(
|
||||||
'image_size_names_choose', array(
|
'image_size_names_choose',
|
||||||
|
array(
|
||||||
'thumbnail' => __( 'Thumbnail' ),
|
'thumbnail' => __( 'Thumbnail' ),
|
||||||
'medium' => __( 'Medium' ),
|
'medium' => __( 'Medium' ),
|
||||||
'large' => __( 'Large' ),
|
'large' => __( 'Large' ),
|
||||||
|
@ -380,7 +380,7 @@ class Custom_Image_Header {
|
|||||||
});
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -390,7 +390,7 @@ class Custom_Image_Header {
|
|||||||
*/
|
*/
|
||||||
public function js_2() {
|
public function js_2() {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function onEndCrop( coords ) {
|
function onEndCrop( coords ) {
|
||||||
jQuery( '#x1' ).val(coords.x);
|
jQuery( '#x1' ).val(coords.x);
|
||||||
@ -426,19 +426,19 @@ class Custom_Image_Header {
|
|||||||
y2: yinit,
|
y2: yinit,
|
||||||
<?php
|
<?php
|
||||||
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
||||||
?>
|
?>
|
||||||
aspectRatio: xinit + ':' + yinit,
|
aspectRatio: xinit + ':' + yinit,
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) ) {
|
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) ) {
|
||||||
?>
|
?>
|
||||||
maxHeight: <?php echo get_theme_support( 'custom-header', 'height' ); ?>,
|
maxHeight: <?php echo get_theme_support( 'custom-header', 'height' ); ?>,
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ( ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
if ( ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
||||||
?>
|
?>
|
||||||
maxWidth: <?php echo get_theme_support( 'custom-header', 'width' ); ?>,
|
maxWidth: <?php echo get_theme_support( 'custom-header', 'width' ); ?>,
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
onInit: function () {
|
onInit: function () {
|
||||||
@ -454,7 +454,7 @@ class Custom_Image_Header {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -464,153 +464,154 @@ class Custom_Image_Header {
|
|||||||
*/
|
*/
|
||||||
public function step_1() {
|
public function step_1() {
|
||||||
$this->process_default_headers();
|
$this->process_default_headers();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h1><?php _e( 'Custom Header' ); ?></h1>
|
<h1><?php _e( 'Custom Header' ); ?></h1>
|
||||||
|
|
||||||
<?php if ( current_user_can( 'customize' ) ) { ?>
|
<?php if ( current_user_can( 'customize' ) ) { ?>
|
||||||
<div class="notice notice-info hide-if-no-customize">
|
<div class="notice notice-info hide-if-no-customize">
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
__( 'You can now manage and live-preview Custom Header in the <a href="%1$s">Customizer</a>.' ),
|
__( 'You can now manage and live-preview Custom Header in the <a href="%1$s">Customizer</a>.' ),
|
||||||
admin_url( 'customize.php?autofocus[control]=header_image' )
|
admin_url( 'customize.php?autofocus[control]=header_image' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ( ! empty( $this->updated ) ) { ?>
|
<?php if ( ! empty( $this->updated ) ) { ?>
|
||||||
<div id="message" class="updated">
|
<div id="message" class="updated">
|
||||||
<p><?php printf( __( 'Header updated. <a href="%s">Visit your site</a> to see how it looks.' ), home_url( '/' ) ); ?></p>
|
<p><?php printf( __( 'Header updated. <a href="%s">Visit your site</a> to see how it looks.' ), home_url( '/' ) ); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<h3><?php _e( 'Header Image' ); ?></h3>
|
<h3><?php _e( 'Header Image' ); ?></h3>
|
||||||
|
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<?php if ( get_custom_header() || display_header_text() ) : ?>
|
<?php if ( get_custom_header() || display_header_text() ) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Preview' ); ?></th>
|
<th scope="row"><?php _e( 'Preview' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ( $this->admin_image_div_callback ) {
|
if ( $this->admin_image_div_callback ) {
|
||||||
call_user_func( $this->admin_image_div_callback );
|
call_user_func( $this->admin_image_div_callback );
|
||||||
} else {
|
} else {
|
||||||
$custom_header = get_custom_header();
|
$custom_header = get_custom_header();
|
||||||
$header_image = get_header_image();
|
$header_image = get_header_image();
|
||||||
|
|
||||||
if ( $header_image ) {
|
if ( $header_image ) {
|
||||||
$header_image_style = 'background-image:url(' . esc_url( $header_image ) . ');';
|
$header_image_style = 'background-image:url(' . esc_url( $header_image ) . ');';
|
||||||
} else {
|
} else {
|
||||||
$header_image_style = '';
|
$header_image_style = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $custom_header->width ) {
|
if ( $custom_header->width ) {
|
||||||
$header_image_style .= 'max-width:' . $custom_header->width . 'px;';
|
$header_image_style .= 'max-width:' . $custom_header->width . 'px;';
|
||||||
}
|
}
|
||||||
if ( $custom_header->height ) {
|
if ( $custom_header->height ) {
|
||||||
$header_image_style .= 'height:' . $custom_header->height . 'px;';
|
$header_image_style .= 'height:' . $custom_header->height . 'px;';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="headimg" style="<?php echo $header_image_style; ?>">
|
<div id="headimg" style="<?php echo $header_image_style; ?>">
|
||||||
<?php
|
<?php
|
||||||
if ( display_header_text() ) {
|
if ( display_header_text() ) {
|
||||||
$style = ' style="color:#' . get_header_textcolor() . ';"';
|
$style = ' style="color:#' . get_header_textcolor() . ';"';
|
||||||
} else {
|
} else {
|
||||||
$style = ' style="display:none;"';
|
$style = ' style="display:none;"';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<h1><a id="name" class="displaying-header-text" <?php echo $style; ?> onclick="return false;" href="<?php bloginfo( 'url' ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
|
<h1><a id="name" class="displaying-header-text" <?php echo $style; ?> onclick="return false;" href="<?php bloginfo( 'url' ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
|
||||||
<div id="desc" class="displaying-header-text" <?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
|
<div id="desc" class="displaying-header-text" <?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( current_user_can( 'upload_files' ) && current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
|
<?php if ( current_user_can( 'upload_files' ) && current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Select Image' ); ?></th>
|
<th scope="row"><?php _e( 'Select Image' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<p><?php _e( 'You can select an image to be shown at the top of your site by uploading from your computer or choosing from your media library. After selecting an image you will be able to crop it.' ); ?><br />
|
<p><?php _e( 'You can select an image to be shown at the top of your site by uploading from your computer or choosing from your media library. After selecting an image you will be able to crop it.' ); ?><br />
|
||||||
<?php
|
<?php
|
||||||
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) && ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
||||||
printf( __( 'Images of exactly <strong>%1$d × %2$d pixels</strong> will be used as-is.' ) . '<br />', get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ) );
|
printf( __( 'Images of exactly <strong>%1$d × %2$d pixels</strong> will be used as-is.' ) . '<br />', get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ) );
|
||||||
} elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) {
|
} elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) {
|
||||||
if ( ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
if ( ! current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: size in pixels */
|
/* translators: %s: size in pixels */
|
||||||
__( 'Images should be at least %s wide.' ) . ' ',
|
__( 'Images should be at least %s wide.' ) . ' ',
|
||||||
sprintf(
|
sprintf(
|
||||||
/* translators: %d: custom header width */
|
/* translators: %d: custom header width */
|
||||||
'<strong>' . __( '%d pixels' ) . '</strong>',
|
'<strong>' . __( '%d pixels' ) . '</strong>',
|
||||||
get_theme_support( 'custom-header', 'width' )
|
get_theme_support( 'custom-header', 'width' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif ( current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
} elseif ( current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
||||||
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) ) {
|
if ( ! current_theme_supports( 'custom-header', 'flex-height' ) ) {
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: size in pixels */
|
/* translators: %s: size in pixels */
|
||||||
__( 'Images should be at least %s tall.' ) . ' ',
|
__( 'Images should be at least %s tall.' ) . ' ',
|
||||||
sprintf(
|
sprintf(
|
||||||
/* translators: %d: custom header height */
|
/* translators: %d: custom header height */
|
||||||
'<strong>' . __( '%d pixels' ) . '</strong>',
|
'<strong>' . __( '%d pixels' ) . '</strong>',
|
||||||
get_theme_support( 'custom-header', 'height' )
|
get_theme_support( 'custom-header', 'height' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
if ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) {
|
||||||
if ( current_theme_supports( 'custom-header', 'width' ) ) {
|
if ( current_theme_supports( 'custom-header', 'width' ) ) {
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: size in pixels */
|
/* translators: %s: size in pixels */
|
||||||
__( 'Suggested width is %s.' ) . ' ',
|
__( 'Suggested width is %s.' ) . ' ',
|
||||||
sprintf(
|
sprintf(
|
||||||
/* translators: %d: custom header width */
|
/* translators: %d: custom header width */
|
||||||
'<strong>' . __( '%d pixels' ) . '</strong>',
|
'<strong>' . __( '%d pixels' ) . '</strong>',
|
||||||
get_theme_support( 'custom-header', 'width' )
|
get_theme_support( 'custom-header', 'width' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ( current_theme_supports( 'custom-header', 'height' ) ) {
|
if ( current_theme_supports( 'custom-header', 'height' ) ) {
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: size in pixels */
|
/* translators: %s: size in pixels */
|
||||||
__( 'Suggested height is %s.' ) . ' ',
|
__( 'Suggested height is %s.' ) . ' ',
|
||||||
sprintf(
|
sprintf(
|
||||||
/* translators: %d: custom header height */
|
/* translators: %d: custom header height */
|
||||||
'<strong>' . __( '%d pixels' ) . '</strong>',
|
'<strong>' . __( '%d pixels' ) . '</strong>',
|
||||||
get_theme_support( 'custom-header', 'height' )
|
get_theme_support( 'custom-header', 'height' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post" action="<?php echo esc_url( add_query_arg( 'step', 2 ) ); ?>">
|
<form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post" action="<?php echo esc_url( add_query_arg( 'step', 2 ) ); ?>">
|
||||||
<p>
|
<p>
|
||||||
<label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
|
<label for="upload"><?php _e( 'Choose an image from your computer:' ); ?></label><br />
|
||||||
<input type="file" id="upload" name="import" />
|
<input type="file" id="upload" name="import" />
|
||||||
<input type="hidden" name="action" value="save" />
|
<input type="hidden" name="action" value="save" />
|
||||||
<?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?>
|
<?php wp_nonce_field( 'custom-header-upload', '_wpnonce-custom-header-upload' ); ?>
|
||||||
<?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
|
<?php submit_button( __( 'Upload' ), '', 'submit', false ); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
$modal_update_href = esc_url(
|
$modal_update_href = esc_url(
|
||||||
add_query_arg(
|
add_query_arg(
|
||||||
array(
|
array(
|
||||||
'page' => 'custom-header',
|
'page' => 'custom-header',
|
||||||
'step' => 2,
|
'step' => 2,
|
||||||
'_wpnonce-custom-header-upload' => wp_create_nonce( 'custom-header-upload' ),
|
'_wpnonce-custom-header-upload' => wp_create_nonce( 'custom-header-upload' ),
|
||||||
), admin_url( 'themes.php' )
|
),
|
||||||
)
|
admin_url( 'themes.php' )
|
||||||
);
|
)
|
||||||
?>
|
);
|
||||||
|
?>
|
||||||
<p>
|
<p>
|
||||||
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
|
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
|
||||||
<button id="choose-from-library-link" class="button"
|
<button id="choose-from-library-link" class="button"
|
||||||
@ -621,36 +622,36 @@ class Custom_Image_Header {
|
|||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<form method="post" action="<?php echo esc_url( add_query_arg( 'step', 1 ) ); ?>">
|
<form method="post" action="<?php echo esc_url( add_query_arg( 'step', 1 ) ); ?>">
|
||||||
<?php submit_button( null, 'screen-reader-text', 'save-header-options', false ); ?>
|
<?php submit_button( null, 'screen-reader-text', 'save-header-options', false ); ?>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if ( get_uploaded_header_images() ) : ?>
|
<?php if ( get_uploaded_header_images() ) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Uploaded Images' ); ?></th>
|
<th scope="row"><?php _e( 'Uploaded Images' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<p><?php _e( 'You can choose one of your previously uploaded headers, or show a random one.' ); ?></p>
|
<p><?php _e( 'You can choose one of your previously uploaded headers, or show a random one.' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
$this->show_header_selector( 'uploaded' );
|
$this->show_header_selector( 'uploaded' );
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
if ( ! empty( $this->default_headers ) ) :
|
if ( ! empty( $this->default_headers ) ) :
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Default Images' ); ?></th>
|
<th scope="row"><?php _e( 'Default Images' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
|
<?php if ( current_theme_supports( 'custom-header', 'uploads' ) ) : ?>
|
||||||
<p><?php _e( 'If you don‘t want to upload your own image, you can use one of these cool headers, or show a random one.' ); ?></p>
|
<p><?php _e( 'If you don‘t want to upload your own image, you can use one of these cool headers, or show a random one.' ); ?></p>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<p><?php _e( 'You can use one of these cool headers or show a random one on each page.' ); ?></p>
|
<p><?php _e( 'You can use one of these cool headers or show a random one on each page.' ); ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php
|
<?php
|
||||||
$this->show_header_selector( 'default' );
|
$this->show_header_selector( 'default' );
|
||||||
?>
|
?>
|
||||||
@ -684,7 +685,7 @@ if ( $default_image && get_header_image() != $default_image ) :
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php if ( current_theme_supports( 'custom-header', 'header-text' ) ) : ?>
|
<?php if ( current_theme_supports( 'custom-header', 'header-text' ) ) : ?>
|
||||||
|
|
||||||
<h3><?php _e( 'Header Text' ); ?></h3>
|
<h3><?php _e( 'Header Text' ); ?></h3>
|
||||||
|
|
||||||
@ -703,50 +704,50 @@ if ( $default_image && get_header_image() != $default_image ) :
|
|||||||
<th scope="row"><?php _e( 'Text Color' ); ?></th>
|
<th scope="row"><?php _e( 'Text Color' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
$default_color = '';
|
$default_color = '';
|
||||||
if ( current_theme_supports( 'custom-header', 'default-text-color' ) ) {
|
if ( current_theme_supports( 'custom-header', 'default-text-color' ) ) {
|
||||||
$default_color = get_theme_support( 'custom-header', 'default-text-color' );
|
$default_color = get_theme_support( 'custom-header', 'default-text-color' );
|
||||||
if ( $default_color && false === strpos( $default_color, '#' ) ) {
|
if ( $default_color && false === strpos( $default_color, '#' ) ) {
|
||||||
$default_color = '#' . $default_color;
|
$default_color = '#' . $default_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$default_color_attr = $default_color ? ' data-default-color="' . esc_attr( $default_color ) . '"' : '';
|
$default_color_attr = $default_color ? ' data-default-color="' . esc_attr( $default_color ) . '"' : '';
|
||||||
|
|
||||||
$header_textcolor = display_header_text() ? get_header_textcolor() : get_theme_support( 'custom-header', 'default-text-color' );
|
$header_textcolor = display_header_text() ? get_header_textcolor() : get_theme_support( 'custom-header', 'default-text-color' );
|
||||||
if ( $header_textcolor && false === strpos( $header_textcolor, '#' ) ) {
|
if ( $header_textcolor && false === strpos( $header_textcolor, '#' ) ) {
|
||||||
$header_textcolor = '#' . $header_textcolor;
|
$header_textcolor = '#' . $header_textcolor;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<input type="text" name="text-color" id="text-color" value="' . esc_attr( $header_textcolor ) . '"' . $default_color_attr . ' />';
|
echo '<input type="text" name="text-color" id="text-color" value="' . esc_attr( $header_textcolor ) . '"' . $default_color_attr . ' />';
|
||||||
if ( $default_color ) {
|
if ( $default_color ) {
|
||||||
echo ' <span class="description hide-if-js">' . sprintf( _x( 'Default: %s', 'color' ), esc_html( $default_color ) ) . '</span>';
|
echo ' <span class="description hide-if-js">' . sprintf( _x( 'Default: %s', 'color' ), esc_html( $default_color ) ) . '</span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires just before the submit button in the custom header options form.
|
* Fires just before the submit button in the custom header options form.
|
||||||
*
|
*
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
do_action( 'custom_header_options' );
|
do_action( 'custom_header_options' );
|
||||||
|
|
||||||
wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' );
|
wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php submit_button( null, 'primary', 'save-header-options' ); ?>
|
<?php submit_button( null, 'primary', 'save-header-options' ); ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -852,18 +853,18 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' );
|
|||||||
<input type="hidden" name="height" id="height" value="<?php echo esc_attr( $height ); ?>"/>
|
<input type="hidden" name="height" id="height" value="<?php echo esc_attr( $height ); ?>"/>
|
||||||
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $attachment_id ); ?>" />
|
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $attachment_id ); ?>" />
|
||||||
<input type="hidden" name="oitar" id="oitar" value="<?php echo esc_attr( $oitar ); ?>" />
|
<input type="hidden" name="oitar" id="oitar" value="<?php echo esc_attr( $oitar ); ?>" />
|
||||||
<?php if ( empty( $_POST ) && isset( $_GET['file'] ) ) { ?>
|
<?php if ( empty( $_POST ) && isset( $_GET['file'] ) ) { ?>
|
||||||
<input type="hidden" name="create-new-attachment" value="true" />
|
<input type="hidden" name="create-new-attachment" value="true" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php wp_nonce_field( 'custom-header-crop-image' ); ?>
|
<?php wp_nonce_field( 'custom-header-crop-image' ); ?>
|
||||||
|
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
<?php submit_button( __( 'Crop and Publish' ), 'primary', 'submit', false ); ?>
|
<?php submit_button( __( 'Crop and Publish' ), 'primary', 'submit', false ); ?>
|
||||||
<?php
|
<?php
|
||||||
if ( isset( $oitar ) && 1 == $oitar && ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) {
|
if ( isset( $oitar ) && 1 == $oitar && ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) ) {
|
||||||
submit_button( __( 'Skip Cropping, Publish Image as Is' ), '', 'skip-cropping', false );
|
submit_button( __( 'Skip Cropping, Publish Image as Is' ), '', 'skip-cropping', false );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -158,7 +158,7 @@ if ( $viewable ) {
|
|||||||
/* translators: Publish box date format, see https://secure.php.net/date */
|
/* translators: Publish box date format, see https://secure.php.net/date */
|
||||||
$scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) );
|
$scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) );
|
||||||
|
|
||||||
$messages['post'] = array(
|
$messages['post'] = array(
|
||||||
0 => '', // Unused. Messages start at index 1.
|
0 => '', // Unused. Messages start at index 1.
|
||||||
1 => __( 'Post updated.' ) . $view_post_link_html,
|
1 => __( 'Post updated.' ) . $view_post_link_html,
|
||||||
2 => __( 'Custom field updated.' ),
|
2 => __( 'Custom field updated.' ),
|
||||||
@ -172,7 +172,7 @@ $messages['post'] = array(
|
|||||||
9 => sprintf( __( 'Post scheduled for: %s.' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_post_link_html,
|
9 => sprintf( __( 'Post scheduled for: %s.' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_post_link_html,
|
||||||
10 => __( 'Post draft updated.' ) . $preview_post_link_html,
|
10 => __( 'Post draft updated.' ) . $preview_post_link_html,
|
||||||
);
|
);
|
||||||
$messages['page'] = array(
|
$messages['page'] = array(
|
||||||
0 => '', // Unused. Messages start at index 1.
|
0 => '', // Unused. Messages start at index 1.
|
||||||
1 => __( 'Page updated.' ) . $view_page_link_html,
|
1 => __( 'Page updated.' ) . $view_page_link_html,
|
||||||
2 => __( 'Custom field updated.' ),
|
2 => __( 'Custom field updated.' ),
|
||||||
@ -394,7 +394,8 @@ do_action( 'do_meta_boxes', $post_type, 'advanced', $post );
|
|||||||
do_action( 'do_meta_boxes', $post_type, 'side', $post );
|
do_action( 'do_meta_boxes', $post_type, 'side', $post );
|
||||||
|
|
||||||
add_screen_option(
|
add_screen_option(
|
||||||
'layout_columns', array(
|
'layout_columns',
|
||||||
|
array(
|
||||||
'max' => 2,
|
'max' => 2,
|
||||||
'default' => 2,
|
'default' => 2,
|
||||||
)
|
)
|
||||||
@ -586,7 +587,7 @@ $referer = wp_get_referer();
|
|||||||
<input type="hidden" id="referredby" name="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" />
|
<input type="hidden" id="referredby" name="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" />
|
||||||
<?php if ( ! empty( $active_post_lock ) ) { ?>
|
<?php if ( ! empty( $active_post_lock ) ) { ?>
|
||||||
<input type="hidden" id="active_post_lock" value="<?php echo esc_attr( implode( ':', $active_post_lock ) ); ?>" />
|
<input type="hidden" id="active_post_lock" value="<?php echo esc_attr( implode( ':', $active_post_lock ) ); ?>" />
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ( 'draft' != get_post_status( $post ) ) {
|
if ( 'draft' != get_post_status( $post ) ) {
|
||||||
wp_original_referer_field( true, 'previous' );
|
wp_original_referer_field( true, 'previous' );
|
||||||
@ -632,50 +633,50 @@ do_action( 'edit_form_top', $post );
|
|||||||
<label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo $title_placeholder; ?></label>
|
<label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo $title_placeholder; ?></label>
|
||||||
<input type="text" name="post_title" size="30" value="<?php echo esc_attr( $post->post_title ); ?>" id="title" spellcheck="true" autocomplete="off" />
|
<input type="text" name="post_title" size="30" value="<?php echo esc_attr( $post->post_title ); ?>" id="title" spellcheck="true" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires before the permalink field in the edit form.
|
* Fires before the permalink field in the edit form.
|
||||||
*
|
*
|
||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
*
|
*
|
||||||
* @param WP_Post $post Post object.
|
* @param WP_Post $post Post object.
|
||||||
*/
|
*/
|
||||||
do_action( 'edit_form_before_permalink', $post );
|
do_action( 'edit_form_before_permalink', $post );
|
||||||
?>
|
?>
|
||||||
<div class="inside">
|
<div class="inside">
|
||||||
<?php
|
<?php
|
||||||
if ( $viewable ) :
|
if ( $viewable ) :
|
||||||
$sample_permalink_html = $post_type_object->public ? get_sample_permalink_html( $post->ID ) : '';
|
$sample_permalink_html = $post_type_object->public ? get_sample_permalink_html( $post->ID ) : '';
|
||||||
|
|
||||||
// As of 4.4, the Get Shortlink button is hidden by default.
|
// As of 4.4, the Get Shortlink button is hidden by default.
|
||||||
if ( has_filter( 'pre_get_shortlink' ) || has_filter( 'get_shortlink' ) ) {
|
if ( has_filter( 'pre_get_shortlink' ) || has_filter( 'get_shortlink' ) ) {
|
||||||
$shortlink = wp_get_shortlink( $post->ID, 'post' );
|
$shortlink = wp_get_shortlink( $post->ID, 'post' );
|
||||||
|
|
||||||
if ( ! empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url( '?page_id=' . $post->ID ) ) {
|
if ( ! empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url( '?page_id=' . $post->ID ) ) {
|
||||||
$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr( $shortlink ) . '" /><button type="button" class="button button-small" onclick="prompt('URL:', jQuery(\'#shortlink\').val());">' . __( 'Get Shortlink' ) . '</button>';
|
$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr( $shortlink ) . '" /><button type="button" class="button button-small" onclick="prompt('URL:', jQuery(\'#shortlink\').val());">' . __( 'Get Shortlink' ) . '</button>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) ) {
|
if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) ) {
|
||||||
$has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status;
|
$has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status;
|
||||||
?>
|
?>
|
||||||
<div id="edit-slug-box" class="hide-if-no-js">
|
<div id="edit-slug-box" class="hide-if-no-js">
|
||||||
<?php
|
<?php
|
||||||
if ( $has_sample_permalink ) {
|
if ( $has_sample_permalink ) {
|
||||||
echo $sample_permalink_html;
|
echo $sample_permalink_html;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
|
wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
|
||||||
?>
|
?>
|
||||||
</div><!-- /titlediv -->
|
</div><!-- /titlediv -->
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fires after the title field.
|
* Fires after the title field.
|
||||||
@ -691,48 +692,50 @@ if ( post_type_supports( $post_type, 'editor' ) ) {
|
|||||||
if ( $_wp_editor_expand ) {
|
if ( $_wp_editor_expand ) {
|
||||||
$_wp_editor_expand_class = ' wp-editor-expand';
|
$_wp_editor_expand_class = ' wp-editor-expand';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="postdivrich" class="postarea<?php echo $_wp_editor_expand_class; ?>">
|
<div id="postdivrich" class="postarea<?php echo $_wp_editor_expand_class; ?>">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
wp_editor(
|
wp_editor(
|
||||||
$post->post_content, 'content', array(
|
$post->post_content,
|
||||||
'_content_editor_dfw' => $_content_editor_dfw,
|
'content',
|
||||||
'drag_drop_upload' => true,
|
array(
|
||||||
'tabfocus_elements' => 'content-html,save-post',
|
'_content_editor_dfw' => $_content_editor_dfw,
|
||||||
'editor_height' => 300,
|
'drag_drop_upload' => true,
|
||||||
'tinymce' => array(
|
'tabfocus_elements' => 'content-html,save-post',
|
||||||
'resize' => false,
|
'editor_height' => 300,
|
||||||
'wp_autoresize_on' => $_wp_editor_expand,
|
'tinymce' => array(
|
||||||
'add_unload_trigger' => false,
|
'resize' => false,
|
||||||
'wp_keep_scroll_position' => ! $is_IE,
|
'wp_autoresize_on' => $_wp_editor_expand,
|
||||||
),
|
'add_unload_trigger' => false,
|
||||||
)
|
'wp_keep_scroll_position' => ! $is_IE,
|
||||||
);
|
),
|
||||||
?>
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
<table id="post-status-info"><tbody><tr>
|
<table id="post-status-info"><tbody><tr>
|
||||||
<td id="wp-word-count" class="hide-if-no-js"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></td>
|
<td id="wp-word-count" class="hide-if-no-js"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></td>
|
||||||
<td class="autosave-info">
|
<td class="autosave-info">
|
||||||
<span class="autosave-message"> </span>
|
<span class="autosave-message"> </span>
|
||||||
<?php
|
<?php
|
||||||
if ( 'auto-draft' != $post->post_status ) {
|
if ( 'auto-draft' != $post->post_status ) {
|
||||||
echo '<span id="last-edit">';
|
echo '<span id="last-edit">';
|
||||||
if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) {
|
if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) {
|
||||||
/* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time */
|
/* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time */
|
||||||
printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
|
printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
|
||||||
} else {
|
} else {
|
||||||
/* translators: 1: Post edited date, 2: Post edited time */
|
/* translators: 1: Post edited date, 2: Post edited time */
|
||||||
printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
|
printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
|
||||||
|
}
|
||||||
|
echo '</span>';
|
||||||
}
|
}
|
||||||
echo '</span>';
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td id="content-resize-handle" class="hide-if-no-js"><br /></td>
|
<td id="content-resize-handle" class="hide-if-no-js"><br /></td>
|
||||||
</tr></tbody></table>
|
</tr></tbody></table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fires after the content editor.
|
* Fires after the content editor.
|
||||||
|
@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
<?php
|
<?php
|
||||||
if ( 'approved' === wp_get_comment_status( $comment ) && $comment->comment_post_ID > 0 ) :
|
if ( 'approved' === wp_get_comment_status( $comment ) && $comment->comment_post_ID > 0 ) :
|
||||||
$comment_link = get_comment_link( $comment );
|
$comment_link = get_comment_link( $comment );
|
||||||
?>
|
?>
|
||||||
<div class="inside">
|
<div class="inside">
|
||||||
<div id="comment-link-box">
|
<div id="comment-link-box">
|
||||||
<strong><?php _ex( 'Permalink:', 'comment' ); ?></strong>
|
<strong><?php _ex( 'Permalink:', 'comment' ); ?></strong>
|
||||||
@ -72,7 +72,9 @@ if ( 'approved' === wp_get_comment_status( $comment ) && $comment->comment_post_
|
|||||||
echo '<label for="content" class="screen-reader-text">' . __( 'Comment' ) . '</label>';
|
echo '<label for="content" class="screen-reader-text">' . __( 'Comment' ) . '</label>';
|
||||||
$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
|
$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
|
||||||
wp_editor(
|
wp_editor(
|
||||||
$comment->comment_content, 'content', array(
|
$comment->comment_content,
|
||||||
|
'content',
|
||||||
|
array(
|
||||||
'media_buttons' => false,
|
'media_buttons' => false,
|
||||||
'tinymce' => false,
|
'tinymce' => false,
|
||||||
'quicktags' => $quicktags_settings,
|
'quicktags' => $quicktags_settings,
|
||||||
@ -146,7 +148,7 @@ if ( $comment->comment_parent ) :
|
|||||||
if ( $parent ) :
|
if ( $parent ) :
|
||||||
$parent_link = esc_url( get_comment_link( $parent ) );
|
$parent_link = esc_url( get_comment_link( $parent ) );
|
||||||
$name = get_comment_author( $parent );
|
$name = get_comment_author( $parent );
|
||||||
?>
|
?>
|
||||||
<div class="misc-pub-section misc-pub-reply-to">
|
<div class="misc-pub-section misc-pub-reply-to">
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
@ -156,7 +158,7 @@ if ( $comment->comment_parent ) :
|
|||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
@ -226,5 +228,5 @@ $referer = wp_get_referer();
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
try{document.post.name.focus();}catch(e){}
|
try{document.post.name.focus();}catch(e){}
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
@ -51,7 +51,8 @@ do_action( 'do_meta_boxes', 'link', 'advanced', $link );
|
|||||||
do_action( 'do_meta_boxes', 'link', 'side', $link );
|
do_action( 'do_meta_boxes', 'link', 'side', $link );
|
||||||
|
|
||||||
add_screen_option(
|
add_screen_option(
|
||||||
'layout_columns', array(
|
'layout_columns',
|
||||||
|
array(
|
||||||
'max' => 2,
|
'max' => 2,
|
||||||
'default' => 2,
|
'default' => 2,
|
||||||
)
|
)
|
||||||
@ -153,7 +154,7 @@ do_meta_boxes( null, 'advanced', $link );
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( $link_id ) :
|
if ( $link_id ) :
|
||||||
?>
|
?>
|
||||||
<input type="hidden" name="action" value="save" />
|
<input type="hidden" name="action" value="save" />
|
||||||
<input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" />
|
<input type="hidden" name="link_id" value="<?php echo (int) $link_id; ?>" />
|
||||||
<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id; ?>" />
|
<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id; ?>" />
|
||||||
|
@ -77,7 +77,7 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
|
|||||||
<p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ); ?>">
|
<p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ); ?>">
|
||||||
<?php
|
<?php
|
||||||
echo esc_html( $tax->labels->back_to_items );
|
echo esc_html( $tax->labels->back_to_items );
|
||||||
?>
|
?>
|
||||||
</a></p>
|
</a></p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
@ -284,5 +284,5 @@ do_action( "{$taxonomy}_edit_form", $tag, $taxonomy );
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
try{document.forms.edittag.name.focus();}catch(e){}
|
try{document.forms.edittag.name.focus();}catch(e){}
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
@ -55,7 +55,8 @@ if ( 'post' != $post_type ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_screen_option(
|
add_screen_option(
|
||||||
'per_page', array(
|
'per_page',
|
||||||
|
array(
|
||||||
'default' => 20,
|
'default' => 20,
|
||||||
'option' => 'edit_' . $tax->name . '_per_page',
|
'option' => 'edit_' . $tax->name . '_per_page',
|
||||||
)
|
)
|
||||||
@ -95,7 +96,8 @@ switch ( $wp_list_table->current_action() ) {
|
|||||||
array(
|
array(
|
||||||
'error' => true,
|
'error' => true,
|
||||||
'message' => 4,
|
'message' => 4,
|
||||||
), $referer
|
),
|
||||||
|
$referer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,7 +189,8 @@ switch ( $wp_list_table->current_action() ) {
|
|||||||
array(
|
array(
|
||||||
'error' => true,
|
'error' => true,
|
||||||
'message' => 5,
|
'message' => 5,
|
||||||
), $referer
|
),
|
||||||
|
$referer
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -337,8 +340,8 @@ if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
|
|||||||
|
|
||||||
<?php if ( $message ) : ?>
|
<?php if ( $message ) : ?>
|
||||||
<div id="message" class="<?php echo $class; ?> notice is-dismissible"><p><?php echo $message; ?></p></div>
|
<div id="message" class="<?php echo $class; ?> notice is-dismissible"><p><?php echo $message; ?></p></div>
|
||||||
<?php
|
<?php
|
||||||
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
|
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
@ -401,160 +404,160 @@ if ( current_user_can( $tax->cap->edit_terms ) ) {
|
|||||||
* @param string $taxonomy The taxonomy slug.
|
* @param string $taxonomy The taxonomy slug.
|
||||||
*/
|
*/
|
||||||
do_action( "{$taxonomy}_pre_add_form", $taxonomy );
|
do_action( "{$taxonomy}_pre_add_form", $taxonomy );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="form-wrap">
|
<div class="form-wrap">
|
||||||
<h2><?php echo $tax->labels->add_new_item; ?></h2>
|
<h2><?php echo $tax->labels->add_new_item; ?></h2>
|
||||||
<form id="addtag" method="post" action="edit-tags.php" class="validate"
|
<form id="addtag" method="post" action="edit-tags.php" class="validate"
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires inside the Add Tag form tag.
|
* Fires inside the Add Tag form tag.
|
||||||
*
|
*
|
||||||
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
|
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
|
||||||
*
|
*
|
||||||
* @since 3.7.0
|
* @since 3.7.0
|
||||||
*/
|
*/
|
||||||
do_action( "{$taxonomy}_term_new_form_tag" );
|
do_action( "{$taxonomy}_term_new_form_tag" );
|
||||||
?>
|
?>
|
||||||
>
|
>
|
||||||
<input type="hidden" name="action" value="add-tag" />
|
<input type="hidden" name="action" value="add-tag" />
|
||||||
<input type="hidden" name="screen" value="<?php echo esc_attr( $current_screen->id ); ?>" />
|
<input type="hidden" name="screen" value="<?php echo esc_attr( $current_screen->id ); ?>" />
|
||||||
<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
|
<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
|
||||||
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
|
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>" />
|
||||||
<?php wp_nonce_field( 'add-tag', '_wpnonce_add-tag' ); ?>
|
<?php wp_nonce_field( 'add-tag', '_wpnonce_add-tag' ); ?>
|
||||||
|
|
||||||
<div class="form-field form-required term-name-wrap">
|
<div class="form-field form-required term-name-wrap">
|
||||||
<label for="tag-name"><?php _ex( 'Name', 'term name' ); ?></label>
|
<label for="tag-name"><?php _ex( 'Name', 'term name' ); ?></label>
|
||||||
<input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
|
<input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
|
||||||
<p><?php _e( 'The name is how it appears on your site.' ); ?></p>
|
<p><?php _e( 'The name is how it appears on your site.' ); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php if ( ! global_terms_enabled() ) : ?>
|
<?php if ( ! global_terms_enabled() ) : ?>
|
||||||
<div class="form-field term-slug-wrap">
|
<div class="form-field term-slug-wrap">
|
||||||
<label for="tag-slug"><?php _e( 'Slug' ); ?></label>
|
<label for="tag-slug"><?php _e( 'Slug' ); ?></label>
|
||||||
<input name="slug" id="tag-slug" type="text" value="" size="40" />
|
<input name="slug" id="tag-slug" type="text" value="" size="40" />
|
||||||
<p><?php _e( 'The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ); ?></p>
|
<p><?php _e( 'The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; // global_terms_enabled() ?>
|
<?php endif; // global_terms_enabled() ?>
|
||||||
<?php if ( is_taxonomy_hierarchical( $taxonomy ) ) : ?>
|
<?php if ( is_taxonomy_hierarchical( $taxonomy ) ) : ?>
|
||||||
<div class="form-field term-parent-wrap">
|
<div class="form-field term-parent-wrap">
|
||||||
<label for="parent"><?php echo esc_html( $tax->labels->parent_item ); ?></label>
|
<label for="parent"><?php echo esc_html( $tax->labels->parent_item ); ?></label>
|
||||||
<?php
|
<?php
|
||||||
$dropdown_args = array(
|
$dropdown_args = array(
|
||||||
'hide_empty' => 0,
|
'hide_empty' => 0,
|
||||||
'hide_if_empty' => false,
|
'hide_if_empty' => false,
|
||||||
'taxonomy' => $taxonomy,
|
'taxonomy' => $taxonomy,
|
||||||
'name' => 'parent',
|
'name' => 'parent',
|
||||||
'orderby' => 'name',
|
'orderby' => 'name',
|
||||||
'hierarchical' => true,
|
'hierarchical' => true,
|
||||||
'show_option_none' => __( 'None' ),
|
'show_option_none' => __( 'None' ),
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the taxonomy parent drop-down on the Edit Term page.
|
* Filters the taxonomy parent drop-down on the Edit Term page.
|
||||||
*
|
*
|
||||||
* @since 3.7.0
|
* @since 3.7.0
|
||||||
* @since 4.2.0 Added `$context` parameter.
|
* @since 4.2.0 Added `$context` parameter.
|
||||||
*
|
*
|
||||||
* @param array $dropdown_args {
|
* @param array $dropdown_args {
|
||||||
* An array of taxonomy parent drop-down arguments.
|
* An array of taxonomy parent drop-down arguments.
|
||||||
*
|
*
|
||||||
* @type int|bool $hide_empty Whether to hide terms not attached to any posts. Default 0|false.
|
* @type int|bool $hide_empty Whether to hide terms not attached to any posts. Default 0|false.
|
||||||
* @type bool $hide_if_empty Whether to hide the drop-down if no terms exist. Default false.
|
* @type bool $hide_if_empty Whether to hide the drop-down if no terms exist. Default false.
|
||||||
* @type string $taxonomy The taxonomy slug.
|
* @type string $taxonomy The taxonomy slug.
|
||||||
* @type string $name Value of the name attribute to use for the drop-down select element.
|
* @type string $name Value of the name attribute to use for the drop-down select element.
|
||||||
* Default 'parent'.
|
* Default 'parent'.
|
||||||
* @type string $orderby The field to order by. Default 'name'.
|
* @type string $orderby The field to order by. Default 'name'.
|
||||||
* @type bool $hierarchical Whether the taxonomy is hierarchical. Default true.
|
* @type bool $hierarchical Whether the taxonomy is hierarchical. Default true.
|
||||||
* @type string $show_option_none Label to display if there are no terms. Default 'None'.
|
* @type string $show_option_none Label to display if there are no terms. Default 'None'.
|
||||||
* }
|
* }
|
||||||
* @param string $taxonomy The taxonomy slug.
|
* @param string $taxonomy The taxonomy slug.
|
||||||
* @param string $context Filter context. Accepts 'new' or 'edit'.
|
* @param string $context Filter context. Accepts 'new' or 'edit'.
|
||||||
*/
|
*/
|
||||||
$dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' );
|
$dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' );
|
||||||
|
|
||||||
wp_dropdown_categories( $dropdown_args );
|
wp_dropdown_categories( $dropdown_args );
|
||||||
?>
|
?>
|
||||||
<?php if ( 'category' == $taxonomy ) : ?>
|
<?php if ( 'category' == $taxonomy ) : ?>
|
||||||
<p><?php _e( 'Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.' ); ?></p>
|
<p><?php _e( 'Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.' ); ?></p>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<p><?php _e( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.' ); ?></p>
|
<p><?php _e( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.' ); ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; // is_taxonomy_hierarchical() ?>
|
<?php endif; // is_taxonomy_hierarchical() ?>
|
||||||
<div class="form-field term-description-wrap">
|
<div class="form-field term-description-wrap">
|
||||||
<label for="tag-description"><?php _e( 'Description' ); ?></label>
|
<label for="tag-description"><?php _e( 'Description' ); ?></label>
|
||||||
<textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
|
<textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
|
||||||
<p><?php _e( 'The description is not prominent by default; however, some themes may show it.' ); ?></p>
|
<p><?php _e( 'The description is not prominent by default; however, some themes may show it.' ); ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( ! is_taxonomy_hierarchical( $taxonomy ) ) {
|
if ( ! is_taxonomy_hierarchical( $taxonomy ) ) {
|
||||||
|
/**
|
||||||
|
* Fires after the Add Tag form fields for non-hierarchical taxonomies.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param string $taxonomy The taxonomy slug.
|
||||||
|
*/
|
||||||
|
do_action( 'add_tag_form_fields', $taxonomy );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires after the Add Tag form fields for non-hierarchical taxonomies.
|
* Fires after the Add Term form fields.
|
||||||
|
*
|
||||||
|
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param string $taxonomy The taxonomy slug.
|
* @param string $taxonomy The taxonomy slug.
|
||||||
*/
|
*/
|
||||||
do_action( 'add_tag_form_fields', $taxonomy );
|
do_action( "{$taxonomy}_add_form_fields", $taxonomy );
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
submit_button( $tax->labels->add_new_item );
|
||||||
* Fires after the Add Term form fields.
|
|
||||||
*
|
|
||||||
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
|
|
||||||
*
|
|
||||||
* @since 3.0.0
|
|
||||||
*
|
|
||||||
* @param string $taxonomy The taxonomy slug.
|
|
||||||
*/
|
|
||||||
do_action( "{$taxonomy}_add_form_fields", $taxonomy );
|
|
||||||
|
|
||||||
submit_button( $tax->labels->add_new_item );
|
if ( 'category' == $taxonomy ) {
|
||||||
|
/**
|
||||||
|
* Fires at the end of the Edit Category form.
|
||||||
|
*
|
||||||
|
* @since 2.1.0
|
||||||
|
* @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
|
||||||
|
*
|
||||||
|
* @param object $arg Optional arguments cast to an object.
|
||||||
|
*/
|
||||||
|
do_action( 'edit_category_form', (object) array( 'parent' => 0 ) );
|
||||||
|
} elseif ( 'link_category' == $taxonomy ) {
|
||||||
|
/**
|
||||||
|
* Fires at the end of the Edit Link form.
|
||||||
|
*
|
||||||
|
* @since 2.3.0
|
||||||
|
* @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
|
||||||
|
*
|
||||||
|
* @param object $arg Optional arguments cast to an object.
|
||||||
|
*/
|
||||||
|
do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) );
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* Fires at the end of the Add Tag form.
|
||||||
|
*
|
||||||
|
* @since 2.7.0
|
||||||
|
* @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
|
||||||
|
*
|
||||||
|
* @param string $taxonomy The taxonomy slug.
|
||||||
|
*/
|
||||||
|
do_action( 'add_tag_form', $taxonomy );
|
||||||
|
}
|
||||||
|
|
||||||
if ( 'category' == $taxonomy ) {
|
|
||||||
/**
|
/**
|
||||||
* Fires at the end of the Edit Category form.
|
* Fires at the end of the Add Term form for all taxonomies.
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
|
||||||
* @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
|
|
||||||
*
|
*
|
||||||
* @param object $arg Optional arguments cast to an object.
|
* @since 3.0.0
|
||||||
*/
|
|
||||||
do_action( 'edit_category_form', (object) array( 'parent' => 0 ) );
|
|
||||||
} elseif ( 'link_category' == $taxonomy ) {
|
|
||||||
/**
|
|
||||||
* Fires at the end of the Edit Link form.
|
|
||||||
*
|
|
||||||
* @since 2.3.0
|
|
||||||
* @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
|
|
||||||
*
|
|
||||||
* @param object $arg Optional arguments cast to an object.
|
|
||||||
*/
|
|
||||||
do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) );
|
|
||||||
} else {
|
|
||||||
/**
|
|
||||||
* Fires at the end of the Add Tag form.
|
|
||||||
*
|
|
||||||
* @since 2.7.0
|
|
||||||
* @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
|
|
||||||
*
|
*
|
||||||
* @param string $taxonomy The taxonomy slug.
|
* @param string $taxonomy The taxonomy slug.
|
||||||
*/
|
*/
|
||||||
do_action( 'add_tag_form', $taxonomy );
|
do_action( "{$taxonomy}_add_form", $taxonomy );
|
||||||
}
|
?>
|
||||||
|
|
||||||
/**
|
|
||||||
* Fires at the end of the Add Term form for all taxonomies.
|
|
||||||
*
|
|
||||||
* The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
|
|
||||||
*
|
|
||||||
* @since 3.0.0
|
|
||||||
*
|
|
||||||
* @param string $taxonomy The taxonomy slug.
|
|
||||||
*/
|
|
||||||
do_action( "{$taxonomy}_add_form", $taxonomy );
|
|
||||||
?>
|
|
||||||
</form></div>
|
</form></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
@ -587,15 +590,15 @@ do_action( "{$taxonomy}_add_form", $taxonomy );
|
|||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php if ( current_user_can( 'import' ) ) : ?>
|
<?php if ( current_user_can( 'import' ) ) : ?>
|
||||||
<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ); ?></p>
|
<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ); ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
|
<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
|
||||||
<div class="form-wrap edit-term-notes">
|
<div class="form-wrap edit-term-notes">
|
||||||
<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ); ?></p>
|
<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -620,7 +623,7 @@ do_action( "after-{$taxonomy}-table", $taxonomy );
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
try{document.forms.addtag['tag-name'].focus();}catch(e){}
|
try{document.forms.addtag['tag-name'].focus();}catch(e){}
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
$wp_list_table->inline_edit();
|
$wp_list_table->inline_edit();
|
||||||
|
@ -127,7 +127,8 @@ if ( $doaction ) {
|
|||||||
'trashed' => $trashed,
|
'trashed' => $trashed,
|
||||||
'ids' => join( ',', $post_ids ),
|
'ids' => join( ',', $post_ids ),
|
||||||
'locked' => $locked,
|
'locked' => $locked,
|
||||||
), $sendback
|
),
|
||||||
|
$sendback
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'untrash':
|
case 'untrash':
|
||||||
@ -290,7 +291,8 @@ get_current_screen()->set_screen_reader_content(
|
|||||||
);
|
);
|
||||||
|
|
||||||
add_screen_option(
|
add_screen_option(
|
||||||
'per_page', array(
|
'per_page',
|
||||||
|
array(
|
||||||
'default' => 20,
|
'default' => 20,
|
||||||
'option' => 'edit_' . $post_type . '_per_page',
|
'option' => 'edit_' . $post_type . '_per_page',
|
||||||
)
|
)
|
||||||
|
@ -23,7 +23,7 @@ $title = __( 'Export' );
|
|||||||
* @since 3.5.0
|
* @since 3.5.0
|
||||||
*/
|
*/
|
||||||
function export_add_js() {
|
function export_add_js() {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
var form = $('#export-filters'),
|
var form = $('#export-filters'),
|
||||||
@ -39,7 +39,7 @@ function export_add_js() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
add_action( 'admin_head', 'export_add_js' );
|
add_action( 'admin_head', 'export_add_js' );
|
||||||
|
|
||||||
@ -144,7 +144,8 @@ function export_date_options( $post_type = 'post' ) {
|
|||||||
FROM $wpdb->posts
|
FROM $wpdb->posts
|
||||||
WHERE post_type = %s AND post_status != 'auto-draft'
|
WHERE post_type = %s AND post_status != 'auto-draft'
|
||||||
ORDER BY post_date DESC
|
ORDER BY post_date DESC
|
||||||
", $post_type
|
",
|
||||||
|
$post_type
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -224,7 +225,7 @@ function export_date_options( $post_type = 'post' ) {
|
|||||||
<?php
|
<?php
|
||||||
$post_stati = get_post_stati( array( 'internal' => false ), 'objects' );
|
$post_stati = get_post_stati( array( 'internal' => false ), 'objects' );
|
||||||
foreach ( $post_stati as $status ) :
|
foreach ( $post_stati as $status ) :
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo esc_attr( $status->name ); ?>"><?php echo esc_html( $status->label ); ?></option>
|
<option value="<?php echo esc_attr( $status->name ); ?>"><?php echo esc_html( $status->label ); ?></option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
@ -280,9 +281,10 @@ foreach ( get_post_types(
|
|||||||
array(
|
array(
|
||||||
'_builtin' => false,
|
'_builtin' => false,
|
||||||
'can_export' => true,
|
'can_export' => true,
|
||||||
), 'objects'
|
),
|
||||||
|
'objects'
|
||||||
) as $post_type ) :
|
) as $post_type ) :
|
||||||
?>
|
?>
|
||||||
<p><label><input type="radio" name="content" value="<?php echo esc_attr( $post_type->name ); ?>" /> <?php echo esc_html( $post_type->label ); ?></label></p>
|
<p><label><input type="radio" name="content" value="<?php echo esc_attr( $post_type->name ); ?>" /> <?php echo esc_html( $post_type->label ); ?></label></p>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ $parent_file = 'tools.php';
|
|||||||
<?php
|
<?php
|
||||||
/* translators: %s: importer slug */
|
/* translators: %s: importer slug */
|
||||||
printf( __( 'The %s importer is invalid or is not installed.' ), '<strong>' . esc_html( $_GET['invalid'] ) . '</strong>' );
|
printf( __( 'The %s importer is invalid or is not installed.' ), '<strong>' . esc_html( $_GET['invalid'] ) . '</strong>' );
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@ -96,7 +96,7 @@ if ( empty( $importers ) ) {
|
|||||||
echo '<p>' . __( 'No importers are available.' ) . '</p>'; // TODO: make more helpful
|
echo '<p>' . __( 'No importers are available.' ) . '</p>'; // TODO: make more helpful
|
||||||
} else {
|
} else {
|
||||||
uasort( $importers, '_usort_by_first_member' );
|
uasort( $importers, '_usort_by_first_member' );
|
||||||
?>
|
?>
|
||||||
<table class="widefat importers striped">
|
<table class="widefat importers striped">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -119,8 +119,10 @@ if ( empty( $importers ) ) {
|
|||||||
'action' => 'activate',
|
'action' => 'activate',
|
||||||
'plugin' => $plugin_file,
|
'plugin' => $plugin_file,
|
||||||
'from' => 'import',
|
'from' => 'import',
|
||||||
), admin_url( 'plugins.php' )
|
),
|
||||||
), 'activate-plugin_' . $plugin_file
|
admin_url( 'plugins.php' )
|
||||||
|
),
|
||||||
|
'activate-plugin_' . $plugin_file
|
||||||
);
|
);
|
||||||
$action = sprintf(
|
$action = sprintf(
|
||||||
'<a href="%s" aria-label="%s">%s</a>',
|
'<a href="%s" aria-label="%s">%s</a>',
|
||||||
@ -142,8 +144,10 @@ if ( empty( $importers ) ) {
|
|||||||
'action' => 'install-plugin',
|
'action' => 'install-plugin',
|
||||||
'plugin' => $plugin_slug,
|
'plugin' => $plugin_slug,
|
||||||
'from' => 'import',
|
'from' => 'import',
|
||||||
), self_admin_url( 'update.php' )
|
),
|
||||||
), 'install-plugin_' . $plugin_slug
|
self_admin_url( 'update.php' )
|
||||||
|
),
|
||||||
|
'install-plugin_' . $plugin_slug
|
||||||
);
|
);
|
||||||
$action = sprintf(
|
$action = sprintf(
|
||||||
'<a href="%1$s" class="install-now" data-slug="%2$s" data-name="%3$s" aria-label="%4$s">%5$s</a>',
|
'<a href="%1$s" class="install-now" data-slug="%2$s" data-name="%3$s" aria-label="%4$s">%5$s</a>',
|
||||||
@ -166,7 +170,8 @@ if ( empty( $importers ) ) {
|
|||||||
$url = add_query_arg(
|
$url = add_query_arg(
|
||||||
array(
|
array(
|
||||||
'import' => $importer_id,
|
'import' => $importer_id,
|
||||||
), self_admin_url( 'admin.php' )
|
),
|
||||||
|
self_admin_url( 'admin.php' )
|
||||||
);
|
);
|
||||||
$action = sprintf(
|
$action = sprintf(
|
||||||
'<a href="%1$s" aria-label="%2$s">%3$s</a>',
|
'<a href="%1$s" aria-label="%2$s">%3$s</a>',
|
||||||
@ -188,7 +193,8 @@ if ( empty( $importers ) ) {
|
|||||||
'TB_iframe' => 'true',
|
'TB_iframe' => 'true',
|
||||||
'width' => 600,
|
'width' => 600,
|
||||||
'height' => 550,
|
'height' => 550,
|
||||||
), network_admin_url( 'plugin-install.php' )
|
),
|
||||||
|
network_admin_url( 'plugin-install.php' )
|
||||||
);
|
);
|
||||||
$action .= sprintf(
|
$action .= sprintf(
|
||||||
' | <a href="%1$s" class="thickbox open-plugin-details-modal" aria-label="%2$s">%3$s</a>',
|
' | <a href="%1$s" class="thickbox open-plugin-details-modal" aria-label="%2$s">%3$s</a>',
|
||||||
@ -212,7 +218,7 @@ if ( empty( $importers ) ) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( current_user_can( 'install_plugins' ) ) {
|
if ( current_user_can( 'install_plugins' ) ) {
|
||||||
|
@ -514,7 +514,8 @@ function _wp_ajax_add_hierarchical_term() {
|
|||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
wp_terms_checklist(
|
wp_terms_checklist(
|
||||||
0, array(
|
0,
|
||||||
|
array(
|
||||||
'taxonomy' => $taxonomy->name,
|
'taxonomy' => $taxonomy->name,
|
||||||
'descendants_and_self' => $cat_id,
|
'descendants_and_self' => $cat_id,
|
||||||
'selected_cats' => $checked_categories,
|
'selected_cats' => $checked_categories,
|
||||||
@ -547,7 +548,8 @@ function _wp_ajax_add_hierarchical_term() {
|
|||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
wp_terms_checklist(
|
wp_terms_checklist(
|
||||||
0, array(
|
0,
|
||||||
|
array(
|
||||||
'taxonomy' => $taxonomy->name,
|
'taxonomy' => $taxonomy->name,
|
||||||
'descendants_and_self' => $term_id,
|
'descendants_and_self' => $term_id,
|
||||||
'selected_cats' => $checked_categories,
|
'selected_cats' => $checked_categories,
|
||||||
@ -998,7 +1000,8 @@ function wp_ajax_get_tagcloud() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tags = get_terms(
|
$tags = get_terms(
|
||||||
$taxonomy, array(
|
$taxonomy,
|
||||||
|
array(
|
||||||
'number' => 45,
|
'number' => 45,
|
||||||
'orderby' => 'count',
|
'orderby' => 'count',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
@ -1020,7 +1023,8 @@ function wp_ajax_get_tagcloud() {
|
|||||||
|
|
||||||
// We need raw tag names here, so don't filter the output
|
// We need raw tag names here, so don't filter the output
|
||||||
$return = wp_generate_tag_cloud(
|
$return = wp_generate_tag_cloud(
|
||||||
$tags, array(
|
$tags,
|
||||||
|
array(
|
||||||
'filter' => 0,
|
'filter' => 0,
|
||||||
'format' => 'list',
|
'format' => 'list',
|
||||||
)
|
)
|
||||||
@ -1460,7 +1464,8 @@ function wp_ajax_add_meta() {
|
|||||||
'meta_key' => $key,
|
'meta_key' => $key,
|
||||||
'meta_value' => $value,
|
'meta_value' => $value,
|
||||||
'meta_id' => $mid,
|
'meta_id' => $mid,
|
||||||
), $c
|
),
|
||||||
|
$c
|
||||||
),
|
),
|
||||||
'position' => 0,
|
'position' => 0,
|
||||||
'supplemental' => array( 'postid' => $meta->post_id ),
|
'supplemental' => array( 'postid' => $meta->post_id ),
|
||||||
@ -1625,7 +1630,8 @@ function wp_ajax_menu_get_metabox() {
|
|||||||
$item = apply_filters( 'nav_menu_meta_box_object', $menus_meta_box_object );
|
$item = apply_filters( 'nav_menu_meta_box_object', $menus_meta_box_object );
|
||||||
ob_start();
|
ob_start();
|
||||||
call_user_func_array(
|
call_user_func_array(
|
||||||
$callback, array(
|
$callback,
|
||||||
|
array(
|
||||||
null,
|
null,
|
||||||
array(
|
array(
|
||||||
'id' => 'add-' . $item->name,
|
'id' => 'add-' . $item->name,
|
||||||
@ -3166,7 +3172,8 @@ function wp_ajax_query_themes() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$args = wp_parse_args(
|
$args = wp_parse_args(
|
||||||
wp_unslash( $_REQUEST['request'] ), array(
|
wp_unslash( $_REQUEST['request'] ),
|
||||||
|
array(
|
||||||
'per_page' => 20,
|
'per_page' => 20,
|
||||||
'fields' => $theme_field_defaults,
|
'fields' => $theme_field_defaults,
|
||||||
)
|
)
|
||||||
@ -3196,7 +3203,8 @@ function wp_ajax_query_themes() {
|
|||||||
array(
|
array(
|
||||||
'theme' => $theme->slug,
|
'theme' => $theme->slug,
|
||||||
'_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug ),
|
'_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug ),
|
||||||
), $update_php
|
),
|
||||||
|
$update_php
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( current_user_can( 'switch_themes' ) ) {
|
if ( current_user_can( 'switch_themes' ) ) {
|
||||||
@ -3206,7 +3214,8 @@ function wp_ajax_query_themes() {
|
|||||||
'action' => 'enable',
|
'action' => 'enable',
|
||||||
'_wpnonce' => wp_create_nonce( 'enable-theme_' . $theme->slug ),
|
'_wpnonce' => wp_create_nonce( 'enable-theme_' . $theme->slug ),
|
||||||
'theme' => $theme->slug,
|
'theme' => $theme->slug,
|
||||||
), network_admin_url( 'themes.php' )
|
),
|
||||||
|
network_admin_url( 'themes.php' )
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$theme->activate_url = add_query_arg(
|
$theme->activate_url = add_query_arg(
|
||||||
@ -3214,7 +3223,8 @@ function wp_ajax_query_themes() {
|
|||||||
'action' => 'activate',
|
'action' => 'activate',
|
||||||
'_wpnonce' => wp_create_nonce( 'switch-theme_' . $theme->slug ),
|
'_wpnonce' => wp_create_nonce( 'switch-theme_' . $theme->slug ),
|
||||||
'stylesheet' => $theme->slug,
|
'stylesheet' => $theme->slug,
|
||||||
), admin_url( 'themes.php' )
|
),
|
||||||
|
admin_url( 'themes.php' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3223,7 +3233,8 @@ function wp_ajax_query_themes() {
|
|||||||
$theme->customize_url = add_query_arg(
|
$theme->customize_url = add_query_arg(
|
||||||
array(
|
array(
|
||||||
'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ),
|
'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ),
|
||||||
), wp_customize_url( $theme->slug )
|
),
|
||||||
|
wp_customize_url( $theme->slug )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3666,7 +3677,8 @@ function wp_ajax_install_theme() {
|
|||||||
include_once( ABSPATH . 'wp-admin/includes/theme.php' );
|
include_once( ABSPATH . 'wp-admin/includes/theme.php' );
|
||||||
|
|
||||||
$api = themes_api(
|
$api = themes_api(
|
||||||
'theme_information', array(
|
'theme_information',
|
||||||
|
array(
|
||||||
'slug' => $slug,
|
'slug' => $slug,
|
||||||
'fields' => array( 'sections' => false ),
|
'fields' => array( 'sections' => false ),
|
||||||
)
|
)
|
||||||
@ -3719,7 +3731,8 @@ function wp_ajax_install_theme() {
|
|||||||
'action' => 'enable',
|
'action' => 'enable',
|
||||||
'_wpnonce' => wp_create_nonce( 'enable-theme_' . $slug ),
|
'_wpnonce' => wp_create_nonce( 'enable-theme_' . $slug ),
|
||||||
'theme' => $slug,
|
'theme' => $slug,
|
||||||
), network_admin_url( 'themes.php' )
|
),
|
||||||
|
network_admin_url( 'themes.php' )
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$status['activateUrl'] = add_query_arg(
|
$status['activateUrl'] = add_query_arg(
|
||||||
@ -3727,7 +3740,8 @@ function wp_ajax_install_theme() {
|
|||||||
'action' => 'activate',
|
'action' => 'activate',
|
||||||
'_wpnonce' => wp_create_nonce( 'switch-theme_' . $slug ),
|
'_wpnonce' => wp_create_nonce( 'switch-theme_' . $slug ),
|
||||||
'stylesheet' => $slug,
|
'stylesheet' => $slug,
|
||||||
), admin_url( 'themes.php' )
|
),
|
||||||
|
admin_url( 'themes.php' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3736,7 +3750,8 @@ function wp_ajax_install_theme() {
|
|||||||
$status['customizeUrl'] = add_query_arg(
|
$status['customizeUrl'] = add_query_arg(
|
||||||
array(
|
array(
|
||||||
'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ),
|
'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ),
|
||||||
), wp_customize_url( $slug )
|
),
|
||||||
|
wp_customize_url( $slug )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3950,7 +3965,8 @@ function wp_ajax_install_plugin() {
|
|||||||
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
||||||
|
|
||||||
$api = plugins_api(
|
$api = plugins_api(
|
||||||
'plugin_information', array(
|
'plugin_information',
|
||||||
|
array(
|
||||||
'slug' => sanitize_key( wp_unslash( $_POST['slug'] ) ),
|
'slug' => sanitize_key( wp_unslash( $_POST['slug'] ) ),
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'sections' => false,
|
'sections' => false,
|
||||||
@ -4010,7 +4026,8 @@ function wp_ajax_install_plugin() {
|
|||||||
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $install_status['file'] ),
|
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $install_status['file'] ),
|
||||||
'action' => 'activate',
|
'action' => 'activate',
|
||||||
'plugin' => $install_status['file'],
|
'plugin' => $install_status['file'],
|
||||||
), $plugins_url
|
),
|
||||||
|
$plugins_url
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4220,7 +4237,8 @@ function wp_ajax_search_plugins() {
|
|||||||
|
|
||||||
/** @var WP_Plugins_List_Table $wp_list_table */
|
/** @var WP_Plugins_List_Table $wp_list_table */
|
||||||
$wp_list_table = _get_list_table(
|
$wp_list_table = _get_list_table(
|
||||||
'WP_Plugins_List_Table', array(
|
'WP_Plugins_List_Table',
|
||||||
|
array(
|
||||||
'screen' => get_current_screen(),
|
'screen' => get_current_screen(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -4235,11 +4253,13 @@ function wp_ajax_search_plugins() {
|
|||||||
// Set the correct requester, so pagination works.
|
// Set the correct requester, so pagination works.
|
||||||
$_SERVER['REQUEST_URI'] = add_query_arg(
|
$_SERVER['REQUEST_URI'] = add_query_arg(
|
||||||
array_diff_key(
|
array_diff_key(
|
||||||
$_POST, array(
|
$_POST,
|
||||||
|
array(
|
||||||
'_ajax_nonce' => null,
|
'_ajax_nonce' => null,
|
||||||
'action' => null,
|
'action' => null,
|
||||||
)
|
)
|
||||||
), network_admin_url( 'plugins.php', 'relative' )
|
),
|
||||||
|
network_admin_url( 'plugins.php', 'relative' )
|
||||||
);
|
);
|
||||||
|
|
||||||
$GLOBALS['s'] = wp_unslash( $_POST['s'] );
|
$GLOBALS['s'] = wp_unslash( $_POST['s'] );
|
||||||
@ -4269,7 +4289,8 @@ function wp_ajax_search_install_plugins() {
|
|||||||
|
|
||||||
/** @var WP_Plugin_Install_List_Table $wp_list_table */
|
/** @var WP_Plugin_Install_List_Table $wp_list_table */
|
||||||
$wp_list_table = _get_list_table(
|
$wp_list_table = _get_list_table(
|
||||||
'WP_Plugin_Install_List_Table', array(
|
'WP_Plugin_Install_List_Table',
|
||||||
|
array(
|
||||||
'screen' => get_current_screen(),
|
'screen' => get_current_screen(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -4284,11 +4305,13 @@ function wp_ajax_search_install_plugins() {
|
|||||||
// Set the correct requester, so pagination works.
|
// Set the correct requester, so pagination works.
|
||||||
$_SERVER['REQUEST_URI'] = add_query_arg(
|
$_SERVER['REQUEST_URI'] = add_query_arg(
|
||||||
array_diff_key(
|
array_diff_key(
|
||||||
$_POST, array(
|
$_POST,
|
||||||
|
array(
|
||||||
'_ajax_nonce' => null,
|
'_ajax_nonce' => null,
|
||||||
'action' => null,
|
'action' => null,
|
||||||
)
|
)
|
||||||
), network_admin_url( 'plugin-install.php', 'relative' )
|
),
|
||||||
|
network_admin_url( 'plugin-install.php', 'relative' )
|
||||||
);
|
);
|
||||||
|
|
||||||
$wp_list_table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
@ -83,7 +83,8 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
|
|||||||
|
|
||||||
// Only allow basic HTML in the messages, as it'll be used in emails/logs rather than direct browser output.
|
// Only allow basic HTML in the messages, as it'll be used in emails/logs rather than direct browser output.
|
||||||
$string = wp_kses(
|
$string = wp_kses(
|
||||||
$string, array(
|
$string,
|
||||||
|
array(
|
||||||
'a' => array(
|
'a' => array(
|
||||||
'href' => true,
|
'href' => true,
|
||||||
),
|
),
|
||||||
|
@ -180,7 +180,9 @@ class Core_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
$original_result = $result;
|
$original_result = $result;
|
||||||
$result = new WP_Error(
|
$result = new WP_Error(
|
||||||
'rollback_was_required', $this->strings['rollback_was_required'], (object) array(
|
'rollback_was_required',
|
||||||
|
$this->strings['rollback_was_required'],
|
||||||
|
(object) array(
|
||||||
'update' => $original_result,
|
'update' => $original_result,
|
||||||
'rollback' => $rollback_result,
|
'rollback' => $rollback_result,
|
||||||
)
|
)
|
||||||
@ -189,10 +191,14 @@ class Core_Upgrader extends WP_Upgrader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
|
/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
|
||||||
do_action( 'upgrader_process_complete', $this, array(
|
do_action(
|
||||||
'action' => 'update',
|
'upgrader_process_complete',
|
||||||
'type' => 'core',
|
$this,
|
||||||
) );
|
array(
|
||||||
|
'action' => 'update',
|
||||||
|
'type' => 'core',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
// Clear the current updates
|
// Clear the current updates
|
||||||
delete_site_transient( 'update_core' );
|
delete_site_transient( 'update_core' );
|
||||||
|
@ -275,12 +275,16 @@ class Language_Pack_Upgrader extends WP_Upgrader {
|
|||||||
remove_action( 'upgrader_process_complete', 'wp_update_themes' );
|
remove_action( 'upgrader_process_complete', 'wp_update_themes' );
|
||||||
|
|
||||||
/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
|
/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
|
||||||
do_action( 'upgrader_process_complete', $this, array(
|
do_action(
|
||||||
'action' => 'update',
|
'upgrader_process_complete',
|
||||||
'type' => 'translation',
|
$this,
|
||||||
'bulk' => true,
|
array(
|
||||||
'translations' => $language_updates_results,
|
'action' => 'update',
|
||||||
) );
|
'type' => 'translation',
|
||||||
|
'bulk' => true,
|
||||||
|
'translations' => $language_updates_results,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
// Re-add upgrade hooks.
|
// Re-add upgrade hooks.
|
||||||
add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
|
add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
|
||||||
@ -337,7 +341,8 @@ class Language_Pack_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
if ( ! $mo || ! $po ) {
|
if ( ! $mo || ! $po ) {
|
||||||
return new WP_Error(
|
return new WP_Error(
|
||||||
'incompatible_archive_pomo', $this->strings['incompatible_archive'],
|
'incompatible_archive_pomo',
|
||||||
|
$this->strings['incompatible_archive'],
|
||||||
/* translators: 1: .po, 2: .mo */
|
/* translators: 1: .po, 2: .mo */
|
||||||
sprintf(
|
sprintf(
|
||||||
__( 'The language pack is missing either the %1$s or %2$s files.' ),
|
__( 'The language pack is missing either the %1$s or %2$s files.' ),
|
||||||
|
@ -306,12 +306,16 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||||||
wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
|
wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
|
||||||
|
|
||||||
/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
|
/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
|
||||||
do_action( 'upgrader_process_complete', $this, array(
|
do_action(
|
||||||
'action' => 'update',
|
'upgrader_process_complete',
|
||||||
'type' => 'plugin',
|
$this,
|
||||||
'bulk' => true,
|
array(
|
||||||
'plugins' => $plugins,
|
'action' => 'update',
|
||||||
) );
|
'type' => 'plugin',
|
||||||
|
'bulk' => true,
|
||||||
|
'plugins' => $plugins,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$this->skin->bulk_footer();
|
$this->skin->bulk_footer();
|
||||||
|
|
||||||
|
@ -67,7 +67,8 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
|
|||||||
'action' => 'activate',
|
'action' => 'activate',
|
||||||
'template' => urlencode( $template ),
|
'template' => urlencode( $template ),
|
||||||
'stylesheet' => urlencode( $stylesheet ),
|
'stylesheet' => urlencode( $stylesheet ),
|
||||||
), admin_url( 'themes.php' )
|
),
|
||||||
|
admin_url( 'themes.php' )
|
||||||
);
|
);
|
||||||
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
||||||
|
|
||||||
|
@ -51,7 +51,8 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
|
|||||||
'action' => 'activate',
|
'action' => 'activate',
|
||||||
'template' => urlencode( $template ),
|
'template' => urlencode( $template ),
|
||||||
'stylesheet' => urlencode( $stylesheet ),
|
'stylesheet' => urlencode( $stylesheet ),
|
||||||
), admin_url( 'themes.php' )
|
),
|
||||||
|
admin_url( 'themes.php' )
|
||||||
);
|
);
|
||||||
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
||||||
|
|
||||||
|
@ -111,7 +111,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
// We don't have the parent theme, let's install it.
|
// We don't have the parent theme, let's install it.
|
||||||
$api = themes_api(
|
$api = themes_api(
|
||||||
'theme_information', array(
|
'theme_information',
|
||||||
|
array(
|
||||||
'slug' => $theme_info->get( 'Template' ),
|
'slug' => $theme_info->get( 'Template' ),
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'sections' => false,
|
'sections' => false,
|
||||||
@ -418,7 +419,9 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
|
/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
|
||||||
do_action(
|
do_action(
|
||||||
'upgrader_process_complete', $this, array(
|
'upgrader_process_complete',
|
||||||
|
$this,
|
||||||
|
array(
|
||||||
'action' => 'update',
|
'action' => 'update',
|
||||||
'type' => 'theme',
|
'type' => 'theme',
|
||||||
'bulk' => true,
|
'bulk' => true,
|
||||||
@ -468,7 +471,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
// A proper archive should have a style.css file in the single subdirectory
|
// A proper archive should have a style.css file in the single subdirectory
|
||||||
if ( ! file_exists( $working_directory . 'style.css' ) ) {
|
if ( ! file_exists( $working_directory . 'style.css' ) ) {
|
||||||
return new WP_Error(
|
return new WP_Error(
|
||||||
'incompatible_archive_theme_no_style', $this->strings['incompatible_archive'],
|
'incompatible_archive_theme_no_style',
|
||||||
|
$this->strings['incompatible_archive'],
|
||||||
/* translators: %s: style.css */
|
/* translators: %s: style.css */
|
||||||
sprintf(
|
sprintf(
|
||||||
__( 'The theme is missing the %s stylesheet.' ),
|
__( 'The theme is missing the %s stylesheet.' ),
|
||||||
@ -478,7 +482,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$info = get_file_data(
|
$info = get_file_data(
|
||||||
$working_directory . 'style.css', array(
|
$working_directory . 'style.css',
|
||||||
|
array(
|
||||||
'Name' => 'Theme Name',
|
'Name' => 'Theme Name',
|
||||||
'Template' => 'Template',
|
'Template' => 'Template',
|
||||||
)
|
)
|
||||||
@ -486,7 +491,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
if ( empty( $info['Name'] ) ) {
|
if ( empty( $info['Name'] ) ) {
|
||||||
return new WP_Error(
|
return new WP_Error(
|
||||||
'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'],
|
'incompatible_archive_theme_no_name',
|
||||||
|
$this->strings['incompatible_archive'],
|
||||||
/* translators: %s: style.css */
|
/* translators: %s: style.css */
|
||||||
sprintf(
|
sprintf(
|
||||||
__( 'The %s stylesheet doesn’t contain a valid theme header.' ),
|
__( 'The %s stylesheet doesn’t contain a valid theme header.' ),
|
||||||
@ -498,7 +504,8 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
// If it's not a child theme, it must have at least an index.php to be legit.
|
// If it's not a child theme, it must have at least an index.php to be legit.
|
||||||
if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) {
|
if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) {
|
||||||
return new WP_Error(
|
return new WP_Error(
|
||||||
'incompatible_archive_theme_no_index', $this->strings['incompatible_archive'],
|
'incompatible_archive_theme_no_index',
|
||||||
|
$this->strings['incompatible_archive'],
|
||||||
/* translators: %s: index.php */
|
/* translators: %s: index.php */
|
||||||
sprintf(
|
sprintf(
|
||||||
__( 'The theme is missing the %s file.' ),
|
__( 'The theme is missing the %s file.' ),
|
||||||
|
@ -152,7 +152,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
|||||||
<a class="item-edit" id="edit-<?php echo $item_id; ?>" href="
|
<a class="item-edit" id="edit-<?php echo $item_id; ?>" href="
|
||||||
<?php
|
<?php
|
||||||
echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) );
|
echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) );
|
||||||
?>
|
?>
|
||||||
" aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><span class="screen-reader-text"><?php _e( 'Edit' ); ?></span></a>
|
" aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><span class="screen-reader-text"><?php _e( 'Edit' ); ?></span></a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -232,7 +232,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
|||||||
),
|
),
|
||||||
'delete-menu_item_' . $item_id
|
'delete-menu_item_' . $item_id
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
"><?php _e( 'Remove' ); ?></a> <span class="meta-sep hide-if-no-js"> | </span> <a class="item-cancel submitcancel hide-if-no-js" id="cancel-<?php echo $item_id; ?>" href="
|
"><?php _e( 'Remove' ); ?></a> <span class="meta-sep hide-if-no-js"> | </span> <a class="item-cancel submitcancel hide-if-no-js" id="cancel-<?php echo $item_id; ?>" href="
|
||||||
<?php
|
<?php
|
||||||
echo esc_url(
|
echo esc_url(
|
||||||
@ -240,10 +240,11 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
|||||||
array(
|
array(
|
||||||
'edit-menu-item' => $item_id,
|
'edit-menu-item' => $item_id,
|
||||||
'cancel' => time(),
|
'cancel' => time(),
|
||||||
), admin_url( 'nav-menus.php' )
|
),
|
||||||
|
admin_url( 'nav-menus.php' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
#menu-item-settings-<?php echo $item_id; ?>"><?php _e( 'Cancel' ); ?></a>
|
#menu-item-settings-<?php echo $item_id; ?>"><?php _e( 'Cancel' ); ?></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -336,7 +336,8 @@ class WP_Automatic_Updater {
|
|||||||
|
|
||||||
// Boom, This sites about to get a whole new splash of paint!
|
// Boom, This sites about to get a whole new splash of paint!
|
||||||
$upgrade_result = $upgrader->upgrade(
|
$upgrade_result = $upgrader->upgrade(
|
||||||
$upgrader_item, array(
|
$upgrader_item,
|
||||||
|
array(
|
||||||
'clear_update_cache' => false,
|
'clear_update_cache' => false,
|
||||||
// Always use partial builds if possible for core updates.
|
// Always use partial builds if possible for core updates.
|
||||||
'pre_check_md5' => false,
|
'pre_check_md5' => false,
|
||||||
@ -574,7 +575,8 @@ class WP_Automatic_Updater {
|
|||||||
}
|
}
|
||||||
|
|
||||||
update_site_option(
|
update_site_option(
|
||||||
'auto_core_update_failed', array(
|
'auto_core_update_failed',
|
||||||
|
array(
|
||||||
'attempted' => $core_update->current,
|
'attempted' => $core_update->current,
|
||||||
'current' => $wp_version,
|
'current' => $wp_version,
|
||||||
'error_code' => $error_code,
|
'error_code' => $error_code,
|
||||||
@ -600,7 +602,8 @@ class WP_Automatic_Updater {
|
|||||||
*/
|
*/
|
||||||
protected function send_email( $type, $core_update, $result = null ) {
|
protected function send_email( $type, $core_update, $result = null ) {
|
||||||
update_site_option(
|
update_site_option(
|
||||||
'auto_core_update_notified', array(
|
'auto_core_update_notified',
|
||||||
|
array(
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'email' => get_site_option( 'admin_email' ),
|
'email' => get_site_option( 'admin_email' ),
|
||||||
'version' => $core_update->current,
|
'version' => $core_update->current,
|
||||||
|
@ -158,7 +158,8 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
$total_comments = get_comments(
|
$total_comments = get_comments(
|
||||||
array_merge(
|
array_merge(
|
||||||
$args, array(
|
$args,
|
||||||
|
array(
|
||||||
'count' => true,
|
'count' => true,
|
||||||
'offset' => 0,
|
'offset' => 0,
|
||||||
'number' => 0,
|
'number' => 0,
|
||||||
@ -224,7 +225,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||||||
), // singular not used
|
), // singular not used
|
||||||
|
|
||||||
/* translators: %s: current user's comments count */
|
/* translators: %s: current user's comments count */
|
||||||
'mine' => _nx_noop(
|
'mine' => _nx_noop(
|
||||||
'Mine <span class="count">(%s)</span>',
|
'Mine <span class="count">(%s)</span>',
|
||||||
'Mine <span class="count">(%s)</span>',
|
'Mine <span class="count">(%s)</span>',
|
||||||
'comments'
|
'comments'
|
||||||
@ -277,11 +278,13 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
if ( 'mine' === $status ) {
|
if ( 'mine' === $status ) {
|
||||||
$current_user_id = get_current_user_id();
|
$current_user_id = get_current_user_id();
|
||||||
$num_comments->mine = get_comments( array(
|
$num_comments->mine = get_comments(
|
||||||
'user_id' => $current_user_id,
|
array(
|
||||||
'count' => true,
|
'user_id' => $current_user_id,
|
||||||
) );
|
'count' => true,
|
||||||
$link = add_query_arg( 'user_id', $current_user_id, $link );
|
)
|
||||||
|
);
|
||||||
|
$link = add_query_arg( 'user_id', $current_user_id, $link );
|
||||||
} else {
|
} else {
|
||||||
$link = remove_query_arg( 'user_id', $link );
|
$link = remove_query_arg( 'user_id', $link );
|
||||||
}
|
}
|
||||||
@ -367,49 +370,50 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||||||
if ( ! isset( $has_items ) ) {
|
if ( ! isset( $has_items ) ) {
|
||||||
$has_items = $this->has_items();
|
$has_items = $this->has_items();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
<?php
|
<?php
|
||||||
if ( 'top' === $which ) {
|
if ( 'top' === $which ) {
|
||||||
?>
|
?>
|
||||||
<label class="screen-reader-text" for="filter-by-comment-type"><?php _e( 'Filter by comment type' ); ?></label>
|
<label class="screen-reader-text" for="filter-by-comment-type"><?php _e( 'Filter by comment type' ); ?></label>
|
||||||
<select id="filter-by-comment-type" name="comment_type">
|
<select id="filter-by-comment-type" name="comment_type">
|
||||||
<option value=""><?php _e( 'All comment types' ); ?></option>
|
<option value=""><?php _e( 'All comment types' ); ?></option>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Filters the comment types dropdown menu.
|
* Filters the comment types dropdown menu.
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @param string[] $comment_types An array of comment types. Accepts 'Comments', 'Pings'.
|
* @param string[] $comment_types An array of comment types. Accepts 'Comments', 'Pings'.
|
||||||
*/
|
*/
|
||||||
$comment_types = apply_filters(
|
$comment_types = apply_filters(
|
||||||
'admin_comment_types_dropdown', array(
|
'admin_comment_types_dropdown',
|
||||||
'comment' => __( 'Comments' ),
|
array(
|
||||||
'pings' => __( 'Pings' ),
|
'comment' => __( 'Comments' ),
|
||||||
)
|
'pings' => __( 'Pings' ),
|
||||||
);
|
)
|
||||||
|
);
|
||||||
|
|
||||||
foreach ( $comment_types as $type => $label ) {
|
foreach ( $comment_types as $type => $label ) {
|
||||||
echo "\t" . '<option value="' . esc_attr( $type ) . '"' . selected( $comment_type, $type, false ) . ">$label</option>\n";
|
echo "\t" . '<option value="' . esc_attr( $type ) . '"' . selected( $comment_type, $type, false ) . ">$label</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires just before the Filter submit button for comment types.
|
* Fires just before the Filter submit button for comment types.
|
||||||
*
|
*
|
||||||
* @since 3.5.0
|
* @since 3.5.0
|
||||||
*/
|
*/
|
||||||
do_action( 'restrict_manage_comments' );
|
do_action( 'restrict_manage_comments' );
|
||||||
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $has_items ) {
|
if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $has_items ) {
|
||||||
wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
|
wp_nonce_field( 'bulk-destroy', '_destroy_nonce' );
|
||||||
$title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
|
$title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
|
||||||
submit_button( $title, 'apply', 'delete_all', false );
|
submit_button( $title, 'apply', 'delete_all', false );
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fires after the Filter submit button for comment types.
|
* Fires after the Filter submit button for comment types.
|
||||||
*
|
*
|
||||||
@ -490,7 +494,7 @@ if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_us
|
|||||||
|
|
||||||
$this->screen->render_screen_reader_content( 'heading_list' );
|
$this->screen->render_screen_reader_content( 'heading_list' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
|
<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -516,7 +520,7 @@ if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_us
|
|||||||
</tfoot>
|
</tfoot>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$this->display_tablenav( 'bottom' );
|
$this->display_tablenav( 'bottom' );
|
||||||
}
|
}
|
||||||
@ -676,10 +680,10 @@ if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_us
|
|||||||
*/
|
*/
|
||||||
public function column_cb( $comment ) {
|
public function column_cb( $comment ) {
|
||||||
if ( $this->user_can ) {
|
if ( $this->user_can ) {
|
||||||
?>
|
?>
|
||||||
<label class="screen-reader-text" for="cb-select-<?php echo $comment->comment_ID; ?>"><?php _e( 'Select comment' ); ?></label>
|
<label class="screen-reader-text" for="cb-select-<?php echo $comment->comment_ID; ?>"><?php _e( 'Select comment' ); ?></label>
|
||||||
<input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
|
<input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -709,7 +713,7 @@ if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_us
|
|||||||
if ( $this->user_can ) {
|
if ( $this->user_can ) {
|
||||||
/** This filter is documented in wp-admin/includes/comment.php */
|
/** This filter is documented in wp-admin/includes/comment.php */
|
||||||
$comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content );
|
$comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content );
|
||||||
?>
|
?>
|
||||||
<div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden">
|
<div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden">
|
||||||
<textarea class="comment" rows="1" cols="1"><?php echo esc_textarea( $comment_content ); ?></textarea>
|
<textarea class="comment" rows="1" cols="1"><?php echo esc_textarea( $comment_content ); ?></textarea>
|
||||||
<div class="author-email"><?php echo esc_attr( $comment->comment_author_email ); ?></div>
|
<div class="author-email"><?php echo esc_attr( $comment->comment_author_email ); ?></div>
|
||||||
@ -717,7 +721,7 @@ if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_us
|
|||||||
<div class="author-url"><?php echo esc_attr( $comment->comment_author_url ); ?></div>
|
<div class="author-url"><?php echo esc_attr( $comment->comment_author_url ); ?></div>
|
||||||
<div class="comment_status"><?php echo $comment->comment_approved; ?></div>
|
<div class="comment_status"><?php echo $comment->comment_approved; ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -759,7 +763,8 @@ if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_us
|
|||||||
array(
|
array(
|
||||||
's' => $author_ip,
|
's' => $author_ip,
|
||||||
'mode' => 'detail',
|
'mode' => 'detail',
|
||||||
), admin_url( 'edit-comments.php' )
|
),
|
||||||
|
admin_url( 'edit-comments.php' )
|
||||||
);
|
);
|
||||||
if ( 'spam' === $comment_status ) {
|
if ( 'spam' === $comment_status ) {
|
||||||
$author_ip_url = add_query_arg( 'comment_status', 'spam', $author_ip_url );
|
$author_ip_url = add_query_arg( 'comment_status', 'spam', $author_ip_url );
|
||||||
|
@ -180,8 +180,8 @@ final class WP_Internal_Pointers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$js_args = array(
|
$js_args = array(
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
'position' => $position,
|
'position' => $position,
|
||||||
'pointerClass' => 'wp-pointer arrow-bottom',
|
'pointerClass' => 'wp-pointer arrow-bottom',
|
||||||
'pointerWidth' => 420,
|
'pointerWidth' => 420,
|
||||||
);
|
);
|
||||||
|
@ -100,9 +100,9 @@ class WP_Links_List_Table extends WP_List_Table {
|
|||||||
if ( 'top' != $which ) {
|
if ( 'top' != $which ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
<?php
|
<?php
|
||||||
$dropdown_options = array(
|
$dropdown_options = array(
|
||||||
'selected' => $cat_id,
|
'selected' => $cat_id,
|
||||||
'name' => 'cat_id',
|
'name' => 'cat_id',
|
||||||
@ -117,9 +117,9 @@ class WP_Links_List_Table extends WP_List_Table {
|
|||||||
echo '<label class="screen-reader-text" for="cat_id">' . __( 'Filter by category' ) . '</label>';
|
echo '<label class="screen-reader-text" for="cat_id">' . __( 'Filter by category' ) . '</label>';
|
||||||
wp_dropdown_categories( $dropdown_options );
|
wp_dropdown_categories( $dropdown_options );
|
||||||
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -293,11 +293,11 @@ class WP_Links_List_Table extends WP_List_Table {
|
|||||||
$link = sanitize_bookmark( $link );
|
$link = sanitize_bookmark( $link );
|
||||||
$link->link_name = esc_attr( $link->link_name );
|
$link->link_name = esc_attr( $link->link_name );
|
||||||
$link->link_category = wp_get_link_cats( $link->link_id );
|
$link->link_category = wp_get_link_cats( $link->link_id );
|
||||||
?>
|
?>
|
||||||
<tr id="link-<?php echo $link->link_id; ?>">
|
<tr id="link-<?php echo $link->link_id; ?>">
|
||||||
<?php $this->single_row_columns( $link ); ?>
|
<?php $this->single_row_columns( $link ); ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,8 @@ class WP_List_Table {
|
|||||||
*/
|
*/
|
||||||
public function __construct( $args = array() ) {
|
public function __construct( $args = array() ) {
|
||||||
$args = wp_parse_args(
|
$args = wp_parse_args(
|
||||||
$args, array(
|
$args,
|
||||||
|
array(
|
||||||
'plural' => '',
|
'plural' => '',
|
||||||
'singular' => '',
|
'singular' => '',
|
||||||
'ajax' => false,
|
'ajax' => false,
|
||||||
@ -274,7 +275,8 @@ class WP_List_Table {
|
|||||||
*/
|
*/
|
||||||
protected function set_pagination_args( $args ) {
|
protected function set_pagination_args( $args ) {
|
||||||
$args = wp_parse_args(
|
$args = wp_parse_args(
|
||||||
$args, array(
|
$args,
|
||||||
|
array(
|
||||||
'total_items' => 0,
|
'total_items' => 0,
|
||||||
'total_pages' => 0,
|
'total_pages' => 0,
|
||||||
'per_page' => 0,
|
'per_page' => 0,
|
||||||
@ -360,13 +362,13 @@ class WP_List_Table {
|
|||||||
if ( ! empty( $_REQUEST['detached'] ) ) {
|
if ( ! empty( $_REQUEST['detached'] ) ) {
|
||||||
echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
|
echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p class="search-box">
|
<p class="search-box">
|
||||||
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
|
<label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo $text; ?>:</label>
|
||||||
<input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
|
<input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
|
||||||
<?php submit_button( $text, '', '', false, array( 'id' => 'search-submit' ) ); ?>
|
<?php submit_button( $text, '', '', false, array( 'id' => 'search-submit' ) ); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -568,7 +570,8 @@ class WP_List_Table {
|
|||||||
WHERE post_type = %s
|
WHERE post_type = %s
|
||||||
$extra_checks
|
$extra_checks
|
||||||
ORDER BY post_date DESC
|
ORDER BY post_date DESC
|
||||||
", $post_type
|
",
|
||||||
|
$post_type
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -589,30 +592,30 @@ class WP_List_Table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
|
$m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
|
||||||
?>
|
?>
|
||||||
<label for="filter-by-date" class="screen-reader-text"><?php _e( 'Filter by date' ); ?></label>
|
<label for="filter-by-date" class="screen-reader-text"><?php _e( 'Filter by date' ); ?></label>
|
||||||
<select name="m" id="filter-by-date">
|
<select name="m" id="filter-by-date">
|
||||||
<option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
|
<option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $months as $arc_row ) {
|
foreach ( $months as $arc_row ) {
|
||||||
if ( 0 == $arc_row->year ) {
|
if ( 0 == $arc_row->year ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$month = zeroise( $arc_row->month, 2 );
|
$month = zeroise( $arc_row->month, 2 );
|
||||||
$year = $arc_row->year;
|
$year = $arc_row->year;
|
||||||
|
|
||||||
printf(
|
printf(
|
||||||
"<option %s value='%s'>%s</option>\n",
|
"<option %s value='%s'>%s</option>\n",
|
||||||
selected( $m, $year . $month, false ),
|
selected( $m, $year . $month, false ),
|
||||||
esc_attr( $arc_row->year . $month ),
|
esc_attr( $arc_row->year . $month ),
|
||||||
/* translators: 1: month name, 2: 4-digit year */
|
/* translators: 1: month name, 2: 4-digit year */
|
||||||
sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
|
sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -623,25 +626,25 @@ foreach ( $months as $arc_row ) {
|
|||||||
* @param string $current_mode
|
* @param string $current_mode
|
||||||
*/
|
*/
|
||||||
protected function view_switcher( $current_mode ) {
|
protected function view_switcher( $current_mode ) {
|
||||||
?>
|
?>
|
||||||
<input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" />
|
<input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" />
|
||||||
<div class="view-switch">
|
<div class="view-switch">
|
||||||
<?php
|
<?php
|
||||||
foreach ( $this->modes as $mode => $title ) {
|
foreach ( $this->modes as $mode => $title ) {
|
||||||
$classes = array( 'view-' . $mode );
|
$classes = array( 'view-' . $mode );
|
||||||
if ( $current_mode === $mode ) {
|
if ( $current_mode === $mode ) {
|
||||||
$classes[] = 'current';
|
$classes[] = 'current';
|
||||||
}
|
}
|
||||||
printf(
|
printf(
|
||||||
"<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
|
"<a href='%s' class='%s' id='view-switch-$mode'><span class='screen-reader-text'>%s</span></a>\n",
|
||||||
esc_url( add_query_arg( 'mode', $mode ) ),
|
esc_url( add_query_arg( 'mode', $mode ) ),
|
||||||
implode( ' ', $classes ),
|
implode( ' ', $classes ),
|
||||||
$title
|
$title
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -677,7 +680,8 @@ foreach ( $this->modes as $mode => $title ) {
|
|||||||
array(
|
array(
|
||||||
'p' => $post_id,
|
'p' => $post_id,
|
||||||
'comment_status' => 'approved',
|
'comment_status' => 'approved',
|
||||||
), admin_url( 'edit-comments.php' )
|
),
|
||||||
|
admin_url( 'edit-comments.php' )
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
$approved_comments_number,
|
$approved_comments_number,
|
||||||
@ -699,7 +703,8 @@ foreach ( $this->modes as $mode => $title ) {
|
|||||||
array(
|
array(
|
||||||
'p' => $post_id,
|
'p' => $post_id,
|
||||||
'comment_status' => 'moderated',
|
'comment_status' => 'moderated',
|
||||||
), admin_url( 'edit-comments.php' )
|
),
|
||||||
|
admin_url( 'edit-comments.php' )
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
$pending_comments_number,
|
$pending_comments_number,
|
||||||
@ -1152,7 +1157,7 @@ foreach ( $this->modes as $mode => $title ) {
|
|||||||
$this->display_tablenav( 'top' );
|
$this->display_tablenav( 'top' );
|
||||||
|
|
||||||
$this->screen->render_screen_reader_content( 'heading_list' );
|
$this->screen->render_screen_reader_content( 'heading_list' );
|
||||||
?>
|
?>
|
||||||
<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
|
<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -1161,10 +1166,10 @@ foreach ( $this->modes as $mode => $title ) {
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody id="the-list"
|
<tbody id="the-list"
|
||||||
<?php
|
<?php
|
||||||
if ( $singular ) {
|
if ( $singular ) {
|
||||||
echo " data-wp-lists='list:$singular'";
|
echo " data-wp-lists='list:$singular'";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
>
|
>
|
||||||
<?php $this->display_rows_or_placeholder(); ?>
|
<?php $this->display_rows_or_placeholder(); ?>
|
||||||
@ -1177,7 +1182,7 @@ foreach ( $this->modes as $mode => $title ) {
|
|||||||
</tfoot>
|
</tfoot>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
$this->display_tablenav( 'bottom' );
|
$this->display_tablenav( 'bottom' );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1209,7 +1214,7 @@ foreach ( $this->modes as $mode => $title ) {
|
|||||||
<div class="alignleft actions bulkactions">
|
<div class="alignleft actions bulkactions">
|
||||||
<?php $this->bulk_actions( $which ); ?>
|
<?php $this->bulk_actions( $which ); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
$this->extra_tablenav( $which );
|
$this->extra_tablenav( $which );
|
||||||
$this->pagination( $which );
|
$this->pagination( $which );
|
||||||
@ -1217,7 +1222,7 @@ foreach ( $this->modes as $mode => $title ) {
|
|||||||
|
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -171,26 +171,26 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||||||
if ( 'bar' !== $which ) {
|
if ( 'bar' !== $which ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<?php
|
<?php
|
||||||
if ( ! is_singular() ) {
|
if ( ! is_singular() ) {
|
||||||
if ( ! $this->is_trash ) {
|
if ( ! $this->is_trash ) {
|
||||||
$this->months_dropdown( 'attachment' );
|
$this->months_dropdown( 'attachment' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
|
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
|
||||||
do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
|
do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
|
||||||
|
|
||||||
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) {
|
if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) {
|
||||||
submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
|
submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -236,7 +236,7 @@ if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_it
|
|||||||
$views = $this->get_views();
|
$views = $this->get_views();
|
||||||
|
|
||||||
$this->screen->render_screen_reader_content( 'heading_views' );
|
$this->screen->render_screen_reader_content( 'heading_views' );
|
||||||
?>
|
?>
|
||||||
<div class="wp-filter">
|
<div class="wp-filter">
|
||||||
<div class="filter-items">
|
<div class="filter-items">
|
||||||
<?php $this->view_switcher( $mode ); ?>
|
<?php $this->view_switcher( $mode ); ?>
|
||||||
@ -252,28 +252,28 @@ if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_it
|
|||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$this->extra_tablenav( 'bar' );
|
$this->extra_tablenav( 'bar' );
|
||||||
|
|
||||||
/** This filter is documented in wp-admin/inclues/class-wp-list-table.php */
|
/** This filter is documented in wp-admin/inclues/class-wp-list-table.php */
|
||||||
$views = apply_filters( "views_{$this->screen->id}", array() );
|
$views = apply_filters( "views_{$this->screen->id}", array() );
|
||||||
|
|
||||||
// Back compat for pre-4.0 view links.
|
// Back compat for pre-4.0 view links.
|
||||||
if ( ! empty( $views ) ) {
|
if ( ! empty( $views ) ) {
|
||||||
echo '<ul class="filter-links">';
|
echo '<ul class="filter-links">';
|
||||||
foreach ( $views as $class => $view ) {
|
foreach ( $views as $class => $view ) {
|
||||||
echo "<li class='$class'>$view</li>";
|
echo "<li class='$class'>$view</li>";
|
||||||
}
|
}
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search-form">
|
<div class="search-form">
|
||||||
<label for="media-search-input" class="screen-reader-text"><?php esc_html_e( 'Search Media' ); ?></label>
|
<label for="media-search-input" class="screen-reader-text"><?php esc_html_e( 'Search Media' ); ?></label>
|
||||||
<input type="search" placeholder="<?php esc_attr_e( 'Search media items...' ); ?>" id="media-search-input" class="search" name="s" value="<?php _admin_search_query(); ?>"></div>
|
<input type="search" placeholder="<?php esc_attr_e( 'Search media items...' ); ?>" id="media-search-input" class="search" name="s" value="<?php _admin_search_query(); ?>"></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -354,14 +354,14 @@ if ( ! empty( $views ) ) {
|
|||||||
*/
|
*/
|
||||||
public function column_cb( $post ) {
|
public function column_cb( $post ) {
|
||||||
if ( current_user_can( 'edit_post', $post->ID ) ) {
|
if ( current_user_can( 'edit_post', $post->ID ) ) {
|
||||||
?>
|
?>
|
||||||
<label class="screen-reader-text" for="cb-select-<?php echo $post->ID; ?>">
|
<label class="screen-reader-text" for="cb-select-<?php echo $post->ID; ?>">
|
||||||
<?php
|
<?php
|
||||||
echo sprintf( __( 'Select %s' ), _draft_or_post_title() );
|
echo sprintf( __( 'Select %s' ), _draft_or_post_title() );
|
||||||
?>
|
?>
|
||||||
</label>
|
</label>
|
||||||
<input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" />
|
<input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" />
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,9 +395,9 @@ if ( ! empty( $views ) ) {
|
|||||||
<?php
|
<?php
|
||||||
echo $link_start;
|
echo $link_start;
|
||||||
if ( $thumb ) :
|
if ( $thumb ) :
|
||||||
?>
|
?>
|
||||||
<span class="media-icon <?php echo sanitize_html_class( $mime . '-icon' ); ?>"><?php echo $thumb; ?></span>
|
<span class="media-icon <?php echo sanitize_html_class( $mime . '-icon' ); ?>"><?php echo $thumb; ?></span>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
echo $title . $link_end;
|
echo $title . $link_end;
|
||||||
_media_states( $post );
|
_media_states( $post );
|
||||||
@ -487,12 +487,12 @@ if ( ! empty( $views ) ) {
|
|||||||
$parent_type = get_post_type_object( $parent->post_type );
|
$parent_type = get_post_type_object( $parent->post_type );
|
||||||
|
|
||||||
if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) {
|
if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) {
|
||||||
?>
|
?>
|
||||||
<strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
|
<strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
|
||||||
<?php echo $title; ?></a></strong>
|
<?php echo $title; ?></a></strong>
|
||||||
<?php
|
<?php
|
||||||
} elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) {
|
} elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) {
|
||||||
?>
|
?>
|
||||||
<strong><?php echo $title; ?></strong>
|
<strong><?php echo $title; ?></strong>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
@ -505,7 +505,8 @@ if ( ! empty( $views ) ) {
|
|||||||
'parent_post_id' => $post->post_parent,
|
'parent_post_id' => $post->post_parent,
|
||||||
'media[]' => $post->ID,
|
'media[]' => $post->ID,
|
||||||
'_wpnonce' => wp_create_nonce( 'bulk-' . $this->_args['plural'] ),
|
'_wpnonce' => wp_create_nonce( 'bulk-' . $this->_args['plural'] ),
|
||||||
), 'upload.php'
|
),
|
||||||
|
'upload.php'
|
||||||
);
|
);
|
||||||
printf(
|
printf(
|
||||||
'<br /><a href="%s" class="hide-if-no-js detach-from-parent" aria-label="%s">%s</a>',
|
'<br /><a href="%s" class="hide-if-no-js detach-from-parent" aria-label="%s">%s</a>',
|
||||||
@ -631,11 +632,11 @@ if ( ! empty( $views ) ) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other';
|
$post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other';
|
||||||
?>
|
?>
|
||||||
<tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( ' author-' . $post_owner . ' status-' . $post->post_status ); ?>">
|
<tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( ' author-' . $post_owner . ' status-' . $post->post_status ); ?>">
|
||||||
<?php $this->single_row_columns( $post ); ?>
|
<?php $this->single_row_columns( $post ); ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
endwhile;
|
endwhile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,8 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
$total_sites = get_sites(
|
$total_sites = get_sites(
|
||||||
array_merge(
|
array_merge(
|
||||||
$args, array(
|
$args,
|
||||||
|
array(
|
||||||
'count' => true,
|
'count' => true,
|
||||||
'offset' => 0,
|
'offset' => 0,
|
||||||
'number' => 0,
|
'number' => 0,
|
||||||
@ -275,14 +276,14 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
|||||||
public function column_cb( $blog ) {
|
public function column_cb( $blog ) {
|
||||||
if ( ! is_main_site( $blog['blog_id'] ) ) :
|
if ( ! is_main_site( $blog['blog_id'] ) ) :
|
||||||
$blogname = untrailingslashit( $blog['domain'] . $blog['path'] );
|
$blogname = untrailingslashit( $blog['domain'] . $blog['path'] );
|
||||||
?>
|
?>
|
||||||
<label class="screen-reader-text" for="blog_<?php echo $blog['blog_id']; ?>">
|
<label class="screen-reader-text" for="blog_<?php echo $blog['blog_id']; ?>">
|
||||||
<?php
|
<?php
|
||||||
printf( __( 'Select %s' ), $blogname );
|
printf( __( 'Select %s' ), $blogname );
|
||||||
?>
|
?>
|
||||||
</label>
|
</label>
|
||||||
<input type="checkbox" id="blog_<?php echo $blog['blog_id']; ?>" name="allblogs[]" value="<?php echo esc_attr( $blog['blog_id'] ); ?>" />
|
<input type="checkbox" id="blog_<?php echo $blog['blog_id']; ?>" name="allblogs[]" value="<?php echo esc_attr( $blog['blog_id'] ); ?>" />
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,12 +407,14 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
|||||||
public function column_users( $blog ) {
|
public function column_users( $blog ) {
|
||||||
$user_count = wp_cache_get( $blog['blog_id'] . '_user_count', 'blog-details' );
|
$user_count = wp_cache_get( $blog['blog_id'] . '_user_count', 'blog-details' );
|
||||||
if ( ! $user_count ) {
|
if ( ! $user_count ) {
|
||||||
$blog_users = new WP_User_Query( array(
|
$blog_users = new WP_User_Query(
|
||||||
'blog_id' => $blog['blog_id'],
|
array(
|
||||||
'fields' => 'ID',
|
'blog_id' => $blog['blog_id'],
|
||||||
'number' => 1,
|
'fields' => 'ID',
|
||||||
'count_total' => true,
|
'number' => 1,
|
||||||
) );
|
'count_total' => true,
|
||||||
|
)
|
||||||
|
);
|
||||||
$user_count = $blog_users->get_total();
|
$user_count = $blog_users->get_total();
|
||||||
wp_cache_set( $blog['blog_id'] . '_user_count', $user_count, 'blog-details', 12 * HOUR_IN_SECONDS );
|
wp_cache_set( $blog['blog_id'] . '_user_count', $user_count, 'blog-details', 12 * HOUR_IN_SECONDS );
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,9 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||||||
$total_this_page = $totals[ $status ];
|
$total_this_page = $totals[ $status ];
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'updates', '_wpUpdatesItemCounts', array(
|
'updates',
|
||||||
|
'_wpUpdatesItemCounts',
|
||||||
|
array(
|
||||||
'themes' => $totals,
|
'themes' => $totals,
|
||||||
'totals' => wp_get_update_data(),
|
'totals' => wp_get_update_data(),
|
||||||
)
|
)
|
||||||
@ -423,7 +425,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||||||
'theme' => $theme_key,
|
'theme' => $theme_key,
|
||||||
'paged' => $page,
|
'paged' => $page,
|
||||||
's' => $s,
|
's' => $s,
|
||||||
), $url
|
),
|
||||||
|
$url
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $this->is_site_themes ) {
|
if ( $this->is_site_themes ) {
|
||||||
@ -448,7 +451,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||||||
'theme' => $theme_key,
|
'theme' => $theme_key,
|
||||||
'paged' => $page,
|
'paged' => $page,
|
||||||
's' => $s,
|
's' => $s,
|
||||||
), $url
|
),
|
||||||
|
$url
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $this->is_site_themes ) {
|
if ( $this->is_site_themes ) {
|
||||||
@ -475,7 +479,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||||||
'theme_status' => $context,
|
'theme_status' => $context,
|
||||||
'paged' => $page,
|
'paged' => $page,
|
||||||
's' => $s,
|
's' => $s,
|
||||||
), 'themes.php'
|
),
|
||||||
|
'themes.php'
|
||||||
);
|
);
|
||||||
|
|
||||||
/* translators: %s: theme name */
|
/* translators: %s: theme name */
|
||||||
|
@ -143,10 +143,10 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
$installed_plugins = $this->get_installed_plugins();
|
$installed_plugins = $this->get_installed_plugins();
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
'page' => $paged,
|
'page' => $paged,
|
||||||
'per_page' => $per_page,
|
'per_page' => $per_page,
|
||||||
// Send the locale to the API so it can provide context-sensitive results.
|
// Send the locale to the API so it can provide context-sensitive results.
|
||||||
'locale' => get_user_locale(),
|
'locale' => get_user_locale(),
|
||||||
);
|
);
|
||||||
|
|
||||||
switch ( $tab ) {
|
switch ( $tab ) {
|
||||||
@ -256,7 +256,9 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'updates', '_wpUpdatesItemCounts', array(
|
'updates',
|
||||||
|
'_wpUpdatesItemCounts',
|
||||||
|
array(
|
||||||
'plugins' => $js_plugins,
|
'plugins' => $js_plugins,
|
||||||
'totals' => wp_get_update_data(),
|
'totals' => wp_get_update_data(),
|
||||||
)
|
)
|
||||||
@ -273,7 +275,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
</div>
|
</div>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="no-plugin-results"><?php _e( 'No plugins found. Try a different search.' ); ?></div>
|
<div class="no-plugin-results"><?php _e( 'No plugins found. Try a different search.' ); ?></div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,7 +310,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
$views = apply_filters( "views_{$this->screen->id}", $views );
|
$views = apply_filters( "views_{$this->screen->id}", $views );
|
||||||
|
|
||||||
$this->screen->render_screen_reader_content( 'heading_views' );
|
$this->screen->render_screen_reader_content( 'heading_views' );
|
||||||
?>
|
?>
|
||||||
<div class="wp-filter">
|
<div class="wp-filter">
|
||||||
<ul class="filter-links">
|
<ul class="filter-links">
|
||||||
<?php
|
<?php
|
||||||
@ -321,9 +323,9 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<?php install_search_form(); ?>
|
<?php install_search_form(); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -340,16 +342,16 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
$this->display_tablenav( 'top' );
|
$this->display_tablenav( 'top' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
|
<div class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
|
||||||
<?php
|
<?php
|
||||||
$this->screen->render_screen_reader_content( 'heading_list' );
|
$this->screen->render_screen_reader_content( 'heading_list' );
|
||||||
?>
|
?>
|
||||||
<div id="the-list"<?php echo $data_attr; ?>>
|
<div id="the-list"<?php echo $data_attr; ?>>
|
||||||
<?php $this->display_rows_or_placeholder(); ?>
|
<?php $this->display_rows_or_placeholder(); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$this->display_tablenav( 'bottom' );
|
$this->display_tablenav( 'bottom' );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,7 +367,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
if ( 'top' === $which ) {
|
if ( 'top' === $which ) {
|
||||||
wp_referer_field();
|
wp_referer_field();
|
||||||
?>
|
?>
|
||||||
<div class="tablenav top">
|
<div class="tablenav top">
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
<?php
|
<?php
|
||||||
@ -385,7 +387,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
<?php $this->pagination( $which ); ?>
|
<?php $this->pagination( $which ); ?>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -560,7 +562,8 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $status['file'] ),
|
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $status['file'] ),
|
||||||
'action' => 'activate',
|
'action' => 'activate',
|
||||||
'plugin' => $status['file'],
|
'plugin' => $status['file'],
|
||||||
), network_admin_url( 'plugins.php' )
|
),
|
||||||
|
network_admin_url( 'plugins.php' )
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( is_network_admin() ) {
|
if ( is_network_admin() ) {
|
||||||
@ -621,7 +624,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
|
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
|
||||||
|
|
||||||
$last_updated_timestamp = strtotime( $plugin['last_updated'] );
|
$last_updated_timestamp = strtotime( $plugin['last_updated'] );
|
||||||
?>
|
?>
|
||||||
<div class="plugin-card plugin-card-<?php echo sanitize_html_class( $plugin['slug'] ); ?>">
|
<div class="plugin-card plugin-card-<?php echo sanitize_html_class( $plugin['slug'] ); ?>">
|
||||||
<?php
|
<?php
|
||||||
if ( ! $compatible_php || ! $compatible_wp ) {
|
if ( ! $compatible_php || ! $compatible_wp ) {
|
||||||
@ -651,7 +654,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
self_admin_url( 'update-core.php' )
|
self_admin_url( 'update-core.php' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif ( ! $compatible_php ) {
|
} elseif ( ! $compatible_php ) {
|
||||||
_e( 'This plugin doesn’t work with your version of PHP. ' );
|
_e( 'This plugin doesn’t work with your version of PHP. ' );
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: "Updating PHP" page URL */
|
/* translators: %s: "Updating PHP" page URL */
|
||||||
@ -703,7 +706,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
<?php
|
<?php
|
||||||
if ( $plugin['active_installs'] >= 1000000 ) {
|
if ( $plugin['active_installs'] >= 1000000 ) {
|
||||||
$active_installs_millions = floor( $plugin['active_installs'] / 1000000 );
|
$active_installs_millions = floor( $plugin['active_installs'] / 1000000 );
|
||||||
$active_installs_text = sprintf(
|
$active_installs_text = sprintf(
|
||||||
_nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ),
|
_nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ),
|
||||||
number_format_i18n( $active_installs_millions )
|
number_format_i18n( $active_installs_millions )
|
||||||
);
|
);
|
||||||
@ -728,7 +731,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close off the group divs of the last one
|
// Close off the group divs of the last one
|
||||||
|
@ -256,7 +256,9 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'updates', '_wpUpdatesItemCounts', array(
|
'updates',
|
||||||
|
'_wpUpdatesItemCounts',
|
||||||
|
array(
|
||||||
'plugins' => $js_plugins,
|
'plugins' => $js_plugins,
|
||||||
'totals' => wp_get_update_data(),
|
'totals' => wp_get_update_data(),
|
||||||
)
|
)
|
||||||
|
@ -49,13 +49,13 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
|
|||||||
$singular = $this->_args['singular'];
|
$singular = $this->_args['singular'];
|
||||||
|
|
||||||
wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
|
wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
|
||||||
?>
|
?>
|
||||||
<table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;">
|
<table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;">
|
||||||
<tbody id="the-comment-list"
|
<tbody id="the-comment-list"
|
||||||
<?php
|
<?php
|
||||||
if ( $singular ) {
|
if ( $singular ) {
|
||||||
echo " data-wp-lists='list:$singular'";
|
echo " data-wp-lists='list:$singular'";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
>
|
>
|
||||||
<?php
|
<?php
|
||||||
@ -65,7 +65,7 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
|
|||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -98,7 +98,9 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||||||
WHERE post_type = %s
|
WHERE post_type = %s
|
||||||
AND post_status NOT IN ( '" . implode( "','", $exclude_states ) . "' )
|
AND post_status NOT IN ( '" . implode( "','", $exclude_states ) . "' )
|
||||||
AND post_author = %d
|
AND post_author = %d
|
||||||
", $post_type, get_current_user_id()
|
",
|
||||||
|
$post_type,
|
||||||
|
get_current_user_id()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -460,46 +462,46 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||||||
* @param string $which
|
* @param string $which
|
||||||
*/
|
*/
|
||||||
protected function extra_tablenav( $which ) {
|
protected function extra_tablenav( $which ) {
|
||||||
?>
|
?>
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
<?php
|
<?php
|
||||||
if ( 'top' === $which && ! is_singular() ) {
|
if ( 'top' === $which && ! is_singular() ) {
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$this->months_dropdown( $this->screen->post_type );
|
$this->months_dropdown( $this->screen->post_type );
|
||||||
$this->categories_dropdown( $this->screen->post_type );
|
$this->categories_dropdown( $this->screen->post_type );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires before the Filter button on the Posts and Pages list tables.
|
* Fires before the Filter button on the Posts and Pages list tables.
|
||||||
*
|
*
|
||||||
* The Filter button allows sorting by date and/or category on the
|
* The Filter button allows sorting by date and/or category on the
|
||||||
* Posts list table, and sorting by date on the Pages list table.
|
* Posts list table, and sorting by date on the Pages list table.
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @since 4.4.0 The `$post_type` parameter was added.
|
* @since 4.4.0 The `$post_type` parameter was added.
|
||||||
* @since 4.6.0 The `$which` parameter was added.
|
* @since 4.6.0 The `$which` parameter was added.
|
||||||
*
|
*
|
||||||
* @param string $post_type The post type slug.
|
* @param string $post_type The post type slug.
|
||||||
* @param string $which The location of the extra table nav markup:
|
* @param string $which The location of the extra table nav markup:
|
||||||
* 'top' or 'bottom' for WP_Posts_List_Table,
|
* 'top' or 'bottom' for WP_Posts_List_Table,
|
||||||
* 'bar' for WP_Media_List_Table.
|
* 'bar' for WP_Media_List_Table.
|
||||||
*/
|
*/
|
||||||
do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
|
do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
|
||||||
|
|
||||||
$output = ob_get_clean();
|
$output = ob_get_clean();
|
||||||
|
|
||||||
if ( ! empty( $output ) ) {
|
if ( ! empty( $output ) ) {
|
||||||
echo $output;
|
echo $output;
|
||||||
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) && $this->has_items() ) {
|
if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) && $this->has_items() ) {
|
||||||
submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
|
submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires immediately following the closing "actions" div in the tablenav for the posts
|
* Fires immediately following the closing "actions" div in the tablenav for the posts
|
||||||
* list table.
|
* list table.
|
||||||
@ -850,11 +852,11 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||||||
*/
|
*/
|
||||||
public function column_cb( $post ) {
|
public function column_cb( $post ) {
|
||||||
if ( current_user_can( 'edit_post', $post->ID ) ) :
|
if ( current_user_can( 'edit_post', $post->ID ) ) :
|
||||||
?>
|
?>
|
||||||
<label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>">
|
<label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>">
|
||||||
<?php
|
<?php
|
||||||
printf( __( 'Select %s' ), _draft_or_post_title() );
|
printf( __( 'Select %s' ), _draft_or_post_title() );
|
||||||
?>
|
?>
|
||||||
</label>
|
</label>
|
||||||
<input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
|
<input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
|
||||||
<div class="locked-indicator">
|
<div class="locked-indicator">
|
||||||
@ -869,7 +871,7 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1219,11 +1221,11 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||||||
} else {
|
} else {
|
||||||
$classes .= ' level-0';
|
$classes .= ' level-0';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr id="post-<?php echo $post->ID; ?>" class="<?php echo implode( ' ', get_post_class( $classes, $post->ID ) ); ?>">
|
<tr id="post-<?php echo $post->ID; ?>" class="<?php echo implode( ' ', get_post_class( $classes, $post->ID ) ); ?>">
|
||||||
<?php $this->single_row_columns( $post ); ?>
|
<?php $this->single_row_columns( $post ); ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$GLOBALS['post'] = $global_post;
|
$GLOBALS['post'] = $global_post;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1417,7 +1419,7 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||||||
'author' => true,
|
'author' => true,
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form method="get"><table style="display: none"><tbody id="inlineedit">
|
<form method="get"><table style="display: none"><tbody id="inlineedit">
|
||||||
<?php
|
<?php
|
||||||
@ -1428,28 +1430,28 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||||||
|
|
||||||
$bulk = 0;
|
$bulk = 0;
|
||||||
while ( $bulk < 2 ) {
|
while ( $bulk < 2 ) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="
|
<tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="
|
||||||
<?php
|
<?php
|
||||||
echo $inline_edit_classes . ' ';
|
echo $inline_edit_classes . ' ';
|
||||||
echo $bulk ? $bulk_edit_classes : $quick_edit_classes;
|
echo $bulk ? $bulk_edit_classes : $quick_edit_classes;
|
||||||
?>
|
?>
|
||||||
" style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
|
" style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
|
||||||
|
|
||||||
<fieldset class="inline-edit-col-left">
|
<fieldset class="inline-edit-col-left">
|
||||||
<legend class="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
|
<legend class="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
|
||||||
<div class="inline-edit-col">
|
<div class="inline-edit-col">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( post_type_supports( $screen->post_type, 'title' ) ) :
|
if ( post_type_supports( $screen->post_type, 'title' ) ) :
|
||||||
if ( $bulk ) :
|
if ( $bulk ) :
|
||||||
?>
|
?>
|
||||||
<div id="bulk-title-div">
|
<div id="bulk-title-div">
|
||||||
<div id="bulk-titles"></div>
|
<div id="bulk-titles"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php else : // $bulk ?>
|
<?php else : // $bulk ?>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<span class="title"><?php _e( 'Title' ); ?></span>
|
<span class="title"><?php _e( 'Title' ); ?></span>
|
||||||
@ -1464,15 +1466,15 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
|||||||
<?php
|
<?php
|
||||||
endif; // $bulk
|
endif; // $bulk
|
||||||
endif; // post_type_supports title
|
endif; // post_type_supports title
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( ! $bulk ) : ?>
|
<?php if ( ! $bulk ) : ?>
|
||||||
<fieldset class="inline-edit-date">
|
<fieldset class="inline-edit-date">
|
||||||
<legend><span class="title"><?php _e( 'Date' ); ?></span></legend>
|
<legend><span class="title"><?php _e( 'Date' ); ?></span></legend>
|
||||||
<?php touch_time( 1, 1, 0, 1 ); ?>
|
<?php touch_time( 1, 1, 0, 1 ); ?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
<?php
|
<?php
|
||||||
endif; // $bulk
|
endif; // $bulk
|
||||||
|
|
||||||
if ( post_type_supports( $screen->post_type, 'author' ) ) :
|
if ( post_type_supports( $screen->post_type, 'author' ) ) :
|
||||||
@ -1531,16 +1533,16 @@ if ( ! $bulk && $can_publish ) :
|
|||||||
|
|
||||||
</div></fieldset>
|
</div></fieldset>
|
||||||
|
|
||||||
<?php if ( count( $hierarchical_taxonomies ) && ! $bulk ) : ?>
|
<?php if ( count( $hierarchical_taxonomies ) && ! $bulk ) : ?>
|
||||||
|
|
||||||
<fieldset class="inline-edit-col-center inline-edit-categories"><div class="inline-edit-col">
|
<fieldset class="inline-edit-col-center inline-edit-categories"><div class="inline-edit-col">
|
||||||
|
|
||||||
<?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
|
<?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
|
||||||
|
|
||||||
<span class="title inline-edit-categories-label"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
|
<span class="title inline-edit-categories-label"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
|
||||||
<input type="hidden" name="<?php echo ( $taxonomy->name === 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" />
|
<input type="hidden" name="<?php echo ( $taxonomy->name === 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" />
|
||||||
<ul class="cat-checklist <?php echo esc_attr( $taxonomy->name ); ?>-checklist">
|
<ul class="cat-checklist <?php echo esc_attr( $taxonomy->name ); ?>-checklist">
|
||||||
<?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ); ?>
|
<?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ); ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<?php endforeach; //$hierarchical_taxonomies as $taxonomy ?>
|
<?php endforeach; //$hierarchical_taxonomies as $taxonomy ?>
|
||||||
@ -1551,69 +1553,69 @@ if ( ! $bulk && $can_publish ) :
|
|||||||
|
|
||||||
<fieldset class="inline-edit-col-right"><div class="inline-edit-col">
|
<fieldset class="inline-edit-col-right"><div class="inline-edit-col">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( post_type_supports( $screen->post_type, 'author' ) && $bulk ) {
|
if ( post_type_supports( $screen->post_type, 'author' ) && $bulk ) {
|
||||||
echo $authors_dropdown;
|
echo $authors_dropdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) :
|
if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) :
|
||||||
|
|
||||||
if ( $post_type_object->hierarchical ) :
|
if ( $post_type_object->hierarchical ) :
|
||||||
?>
|
?>
|
||||||
<label>
|
<label>
|
||||||
<span class="title"><?php _e( 'Parent' ); ?></span>
|
<span class="title"><?php _e( 'Parent' ); ?></span>
|
||||||
<?php
|
<?php
|
||||||
$dropdown_args = array(
|
$dropdown_args = array(
|
||||||
'post_type' => $post_type_object->name,
|
'post_type' => $post_type_object->name,
|
||||||
'selected' => $post->post_parent,
|
'selected' => $post->post_parent,
|
||||||
'name' => 'post_parent',
|
'name' => 'post_parent',
|
||||||
'show_option_none' => __( 'Main Page (no parent)' ),
|
'show_option_none' => __( 'Main Page (no parent)' ),
|
||||||
'option_none_value' => 0,
|
'option_none_value' => 0,
|
||||||
'sort_column' => 'menu_order, post_title',
|
'sort_column' => 'menu_order, post_title',
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $bulk ) {
|
if ( $bulk ) {
|
||||||
$dropdown_args['show_option_no_change'] = __( '— No Change —' );
|
$dropdown_args['show_option_no_change'] = __( '— No Change —' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the arguments used to generate the Quick Edit page-parent drop-down.
|
* Filters the arguments used to generate the Quick Edit page-parent drop-down.
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @see wp_dropdown_pages()
|
* @see wp_dropdown_pages()
|
||||||
*
|
*
|
||||||
* @param array $dropdown_args An array of arguments.
|
* @param array $dropdown_args An array of arguments.
|
||||||
*/
|
*/
|
||||||
$dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
|
$dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
|
||||||
|
|
||||||
wp_dropdown_pages( $dropdown_args );
|
wp_dropdown_pages( $dropdown_args );
|
||||||
?>
|
?>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endif; // hierarchical
|
endif; // hierarchical
|
||||||
|
|
||||||
if ( ! $bulk ) :
|
if ( ! $bulk ) :
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<span class="title"><?php _e( 'Order' ); ?></span>
|
<span class="title"><?php _e( 'Order' ); ?></span>
|
||||||
<span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
|
<span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endif; // !$bulk
|
endif; // !$bulk
|
||||||
endif; // page-attributes
|
endif; // page-attributes
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ( 0 < count( get_page_templates( null, $screen->post_type ) ) ) : ?>
|
<?php if ( 0 < count( get_page_templates( null, $screen->post_type ) ) ) : ?>
|
||||||
<label>
|
<label>
|
||||||
<span class="title"><?php _e( 'Template' ); ?></span>
|
<span class="title"><?php _e( 'Template' ); ?></span>
|
||||||
<select name="page_template">
|
<select name="page_template">
|
||||||
<?php if ( $bulk ) : ?>
|
<?php if ( $bulk ) : ?>
|
||||||
<option value="-1"><?php _e( '— No Change —' ); ?></option>
|
<option value="-1"><?php _e( '— No Change —' ); ?></option>
|
||||||
<?php endif; // $bulk ?>
|
<?php endif; // $bulk ?>
|
||||||
<?php
|
<?php
|
||||||
/** This filter is documented in wp-admin/includes/meta-boxes.php */
|
/** This filter is documented in wp-admin/includes/meta-boxes.php */
|
||||||
$default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'quick-edit' );
|
$default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'quick-edit' );
|
||||||
@ -1624,31 +1626,31 @@ if ( ! $bulk && $can_publish ) :
|
|||||||
</label>
|
</label>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( count( $flat_taxonomies ) && ! $bulk ) : ?>
|
<?php if ( count( $flat_taxonomies ) && ! $bulk ) : ?>
|
||||||
|
|
||||||
<?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
|
<?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
|
||||||
<?php
|
<?php
|
||||||
if ( current_user_can( $taxonomy->cap->assign_terms ) ) :
|
if ( current_user_can( $taxonomy->cap->assign_terms ) ) :
|
||||||
$taxonomy_name = esc_attr( $taxonomy->name );
|
$taxonomy_name = esc_attr( $taxonomy->name );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<label class="inline-edit-tags">
|
<label class="inline-edit-tags">
|
||||||
<span class="title"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
|
<span class="title"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
|
||||||
<textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea>
|
<textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea>
|
||||||
</label>
|
</label>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php endforeach; //$flat_taxonomies as $taxonomy ?>
|
<?php endforeach; //$flat_taxonomies as $taxonomy ?>
|
||||||
|
|
||||||
<?php endif; // count( $flat_taxonomies ) && !$bulk ?>
|
<?php endif; // count( $flat_taxonomies ) && !$bulk ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( post_type_supports( $screen->post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) :
|
if ( post_type_supports( $screen->post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) :
|
||||||
if ( $bulk ) :
|
if ( $bulk ) :
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="inline-edit-group wp-clearfix">
|
<div class="inline-edit-group wp-clearfix">
|
||||||
<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
|
<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
|
||||||
<label class="alignleft">
|
<label class="alignleft">
|
||||||
<span class="title"><?php _e( 'Comments' ); ?></span>
|
<span class="title"><?php _e( 'Comments' ); ?></span>
|
||||||
<select name="comment_status">
|
<select name="comment_status">
|
||||||
@ -1669,7 +1671,7 @@ if ( ! $bulk && $can_publish ) :
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php else : // $bulk ?>
|
<?php else : // $bulk ?>
|
||||||
|
|
||||||
<div class="inline-edit-group wp-clearfix">
|
<div class="inline-edit-group wp-clearfix">
|
||||||
<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
|
<?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
|
||||||
@ -1688,19 +1690,19 @@ if ( ! $bulk && $can_publish ) :
|
|||||||
<?php
|
<?php
|
||||||
endif; // $bulk
|
endif; // $bulk
|
||||||
endif; // post_type_supports comments or pings
|
endif; // post_type_supports comments or pings
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="inline-edit-group wp-clearfix">
|
<div class="inline-edit-group wp-clearfix">
|
||||||
<label class="inline-edit-status alignleft">
|
<label class="inline-edit-status alignleft">
|
||||||
<span class="title"><?php _e( 'Status' ); ?></span>
|
<span class="title"><?php _e( 'Status' ); ?></span>
|
||||||
<select name="_status">
|
<select name="_status">
|
||||||
<?php if ( $bulk ) : ?>
|
<?php if ( $bulk ) : ?>
|
||||||
<option value="-1"><?php _e( '— No Change —' ); ?></option>
|
<option value="-1"><?php _e( '— No Change —' ); ?></option>
|
||||||
<?php endif; // $bulk ?>
|
<?php endif; // $bulk ?>
|
||||||
<?php if ( $can_publish ) : // Contributors only get "Unpublished" and "Pending Review" ?>
|
<?php if ( $can_publish ) : // Contributors only get "Unpublished" and "Pending Review" ?>
|
||||||
<option value="publish"><?php _e( 'Published' ); ?></option>
|
<option value="publish"><?php _e( 'Published' ); ?></option>
|
||||||
<option value="future"><?php _e( 'Scheduled' ); ?></option>
|
<option value="future"><?php _e( 'Scheduled' ); ?></option>
|
||||||
<?php if ( $bulk ) : ?>
|
<?php if ( $bulk ) : ?>
|
||||||
<option value="private"><?php _e( 'Private' ); ?></option>
|
<option value="private"><?php _e( 'Private' ); ?></option>
|
||||||
<?php endif; // $bulk ?>
|
<?php endif; // $bulk ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@ -1709,9 +1711,9 @@ if ( ! $bulk && $can_publish ) :
|
|||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<?php if ( 'post' === $screen->post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?>
|
<?php if ( 'post' === $screen->post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?>
|
||||||
|
|
||||||
<?php if ( $bulk ) : ?>
|
<?php if ( $bulk ) : ?>
|
||||||
|
|
||||||
<label class="alignright">
|
<label class="alignright">
|
||||||
<span class="title"><?php _e( 'Sticky' ); ?></span>
|
<span class="title"><?php _e( 'Sticky' ); ?></span>
|
||||||
@ -1735,69 +1737,69 @@ if ( ! $bulk && $can_publish ) :
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( $bulk && current_theme_supports( 'post-formats' ) && post_type_supports( $screen->post_type, 'post-formats' ) ) {
|
if ( $bulk && current_theme_supports( 'post-formats' ) && post_type_supports( $screen->post_type, 'post-formats' ) ) {
|
||||||
$post_formats = get_theme_support( 'post-formats' );
|
$post_formats = get_theme_support( 'post-formats' );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<label class="alignleft">
|
<label class="alignleft">
|
||||||
<span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
|
<span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
|
||||||
<select name="post_format">
|
<select name="post_format">
|
||||||
<option value="-1"><?php _e( '— No Change —' ); ?></option>
|
<option value="-1"><?php _e( '— No Change —' ); ?></option>
|
||||||
<option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
|
<option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
|
||||||
<?php
|
<?php
|
||||||
if ( is_array( $post_formats[0] ) ) {
|
if ( is_array( $post_formats[0] ) ) {
|
||||||
foreach ( $post_formats[0] as $format ) {
|
foreach ( $post_formats[0] as $format ) {
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
|
<option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
?>
|
||||||
?>
|
|
||||||
</select></label>
|
</select></label>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div></fieldset>
|
</div></fieldset>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
list( $columns ) = $this->get_column_info();
|
list( $columns ) = $this->get_column_info();
|
||||||
|
|
||||||
foreach ( $columns as $column_name => $column_display_name ) {
|
foreach ( $columns as $column_name => $column_display_name ) {
|
||||||
if ( isset( $core_columns[ $column_name ] ) ) {
|
if ( isset( $core_columns[ $column_name ] ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $bulk ) {
|
if ( $bulk ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires once for each column in Bulk Edit mode.
|
* Fires once for each column in Bulk Edit mode.
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @param string $column_name Name of the column to edit.
|
* @param string $column_name Name of the column to edit.
|
||||||
* @param WP_Post $post_type The post type slug.
|
* @param WP_Post $post_type The post type slug.
|
||||||
*/
|
*/
|
||||||
do_action( 'bulk_edit_custom_box', $column_name, $screen->post_type );
|
do_action( 'bulk_edit_custom_box', $column_name, $screen->post_type );
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires once for each column in Quick Edit mode.
|
* Fires once for each column in Quick Edit mode.
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @param string $column_name Name of the column to edit.
|
* @param string $column_name Name of the column to edit.
|
||||||
* @param string $post_type The post type slug, or current screen name if this is a taxonomy list table.
|
* @param string $post_type The post type slug, or current screen name if this is a taxonomy list table.
|
||||||
* @param string taxonomy The taxonomy name, if any.
|
* @param string taxonomy The taxonomy name, if any.
|
||||||
*/
|
*/
|
||||||
do_action( 'quick_edit_custom_box', $column_name, $screen->post_type, '' );
|
do_action( 'quick_edit_custom_box', $column_name, $screen->post_type, '' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="submit inline-edit-save">
|
<div class="submit inline-edit-save">
|
||||||
<button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button>
|
<button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button>
|
||||||
<?php
|
<?php
|
||||||
@ -1806,7 +1808,7 @@ if ( ! $bulk && $can_publish ) :
|
|||||||
?>
|
?>
|
||||||
<button type="button" class="button button-primary save alignright"><?php _e( 'Update' ); ?></button>
|
<button type="button" class="button button-primary save alignright"><?php _e( 'Update' ); ?></button>
|
||||||
<span class="spinner"></span>
|
<span class="spinner"></span>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
submit_button( __( 'Update' ), 'primary alignright', 'bulk_edit', false );
|
submit_button( __( 'Update' ), 'primary alignright', 'bulk_edit', false );
|
||||||
}
|
}
|
||||||
@ -1822,11 +1824,11 @@ if ( ! $bulk && $can_publish ) :
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<?php
|
<?php
|
||||||
$bulk++;
|
$bulk++;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody></table></form>
|
</tbody></table></form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -806,7 +806,7 @@ final class WP_Screen {
|
|||||||
<?php echo esc_html( $tab['title'] ); ?>
|
<?php echo esc_html( $tab['title'] ); ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
$class = '';
|
$class = '';
|
||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
@ -837,7 +837,7 @@ final class WP_Screen {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$classes = 'help-tab-content';
|
$classes = 'help-tab-content';
|
||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
@ -890,10 +890,10 @@ final class WP_Screen {
|
|||||||
<div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
|
<div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">
|
||||||
<button type="button" id="contextual-help-link" class="button show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></button>
|
<button type="button" id="contextual-help-link" class="button show-settings" aria-controls="contextual-help-wrap" aria-expanded="false"><?php _e( 'Help' ); ?></button>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
if ( $this->show_screen_options() ) :
|
if ( $this->show_screen_options() ) :
|
||||||
?>
|
?>
|
||||||
<div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
|
<div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle">
|
||||||
<button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
|
<button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false"><?php _e( 'Screen Options' ); ?></button>
|
||||||
</div>
|
</div>
|
||||||
@ -968,7 +968,8 @@ if ( $this->show_screen_options() ) :
|
|||||||
*/
|
*/
|
||||||
public function render_screen_options( $options = array() ) {
|
public function render_screen_options( $options = array() ) {
|
||||||
$options = wp_parse_args(
|
$options = wp_parse_args(
|
||||||
$options, array(
|
$options,
|
||||||
|
array(
|
||||||
'wrap' => true,
|
'wrap' => true,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -1121,12 +1122,12 @@ if ( $this->show_screen_options() ) :
|
|||||||
?>
|
?>
|
||||||
<label class="columns-prefs-<?php echo $i; ?>">
|
<label class="columns-prefs-<?php echo $i; ?>">
|
||||||
<input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>'
|
<input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>'
|
||||||
<?php checked( $screen_layout_columns, $i ); ?> />
|
<?php checked( $screen_layout_columns, $i ); ?> />
|
||||||
<?php printf( _n( '%s column', '%s columns', $i ), number_format_i18n( $i ) ); ?>
|
<?php printf( _n( '%s column', '%s columns', $i ), number_format_i18n( $i ) ); ?>
|
||||||
</label>
|
</label>
|
||||||
<?php
|
<?php
|
||||||
endfor;
|
endfor;
|
||||||
?>
|
?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -1235,7 +1236,7 @@ if ( $this->show_screen_options() ) :
|
|||||||
|
|
||||||
// This needs a submit button
|
// This needs a submit button
|
||||||
add_filter( 'screen_options_show_submit', '__return_true' );
|
add_filter( 'screen_options_show_submit', '__return_true' );
|
||||||
?>
|
?>
|
||||||
<fieldset class="metabox-prefs view-mode">
|
<fieldset class="metabox-prefs view-mode">
|
||||||
<legend><?php _e( 'View Mode' ); ?></legend>
|
<legend><?php _e( 'View Mode' ); ?></legend>
|
||||||
<label for="list-view-mode">
|
<label for="list-view-mode">
|
||||||
@ -1247,7 +1248,7 @@ if ( $this->show_screen_options() ) :
|
|||||||
<?php _e( 'Excerpt View' ); ?>
|
<?php _e( 'Excerpt View' ); ?>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -212,7 +212,8 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||||||
$taxonomy = $this->screen->taxonomy;
|
$taxonomy = $this->screen->taxonomy;
|
||||||
|
|
||||||
$args = wp_parse_args(
|
$args = wp_parse_args(
|
||||||
$this->callback_args, array(
|
$this->callback_args,
|
||||||
|
array(
|
||||||
'page' => 1,
|
'page' => 1,
|
||||||
'number' => 20,
|
'number' => 20,
|
||||||
'search' => '',
|
'search' => '',
|
||||||
@ -385,7 +386,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||||||
urlencode( wp_unslash( $uri ) ),
|
urlencode( wp_unslash( $uri ) ),
|
||||||
$edit_link
|
$edit_link
|
||||||
);
|
);
|
||||||
$name = sprintf(
|
$name = sprintf(
|
||||||
'<a class="row-title" href="%s" aria-label="%s">%s</a>',
|
'<a class="row-title" href="%s" aria-label="%s">%s</a>',
|
||||||
esc_url( $edit_link ),
|
esc_url( $edit_link ),
|
||||||
/* translators: %s: taxonomy term name */
|
/* translators: %s: taxonomy term name */
|
||||||
@ -607,7 +608,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||||||
if ( ! current_user_can( $tax->cap->edit_terms ) ) {
|
if ( ! current_user_can( $tax->cap->edit_terms ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form method="get"><table style="display: none"><tbody id="inlineedit">
|
<form method="get"><table style="display: none"><tbody id="inlineedit">
|
||||||
<tr id="inline-edit" class="inline-edit-row" style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
|
<tr id="inline-edit" class="inline-edit-row" style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
|
||||||
@ -619,14 +620,14 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||||||
<span class="title"><?php _ex( 'Name', 'term name' ); ?></span>
|
<span class="title"><?php _ex( 'Name', 'term name' ); ?></span>
|
||||||
<span class="input-text-wrap"><input type="text" name="name" class="ptitle" value="" /></span>
|
<span class="input-text-wrap"><input type="text" name="name" class="ptitle" value="" /></span>
|
||||||
</label>
|
</label>
|
||||||
<?php if ( ! global_terms_enabled() ) { ?>
|
<?php if ( ! global_terms_enabled() ) { ?>
|
||||||
<label>
|
<label>
|
||||||
<span class="title"><?php _e( 'Slug' ); ?></span>
|
<span class="title"><?php _e( 'Slug' ); ?></span>
|
||||||
<span class="input-text-wrap"><input type="text" name="slug" class="ptitle" value="" /></span>
|
<span class="input-text-wrap"><input type="text" name="slug" class="ptitle" value="" /></span>
|
||||||
</label>
|
</label>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div></fieldset>
|
</div></fieldset>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$core_columns = array(
|
$core_columns = array(
|
||||||
'cb' => true,
|
'cb' => true,
|
||||||
@ -638,16 +639,16 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||||||
|
|
||||||
list( $columns ) = $this->get_column_info();
|
list( $columns ) = $this->get_column_info();
|
||||||
|
|
||||||
foreach ( $columns as $column_name => $column_display_name ) {
|
foreach ( $columns as $column_name => $column_display_name ) {
|
||||||
if ( isset( $core_columns[ $column_name ] ) ) {
|
if ( isset( $core_columns[ $column_name ] ) ) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
|
||||||
|
do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy );
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
|
?>
|
||||||
do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy );
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="inline-edit-save submit">
|
<div class="inline-edit-save submit">
|
||||||
<button type="button" class="cancel button alignleft"><?php _e( 'Cancel' ); ?></button>
|
<button type="button" class="cancel button alignleft"><?php _e( 'Cancel' ); ?></button>
|
||||||
@ -663,6 +664,6 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||||||
</div>
|
</div>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</tbody></table></form>
|
</tbody></table></form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||||||
*/
|
*/
|
||||||
public function display() {
|
public function display() {
|
||||||
wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
|
wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
|
||||||
?>
|
?>
|
||||||
<div class="tablenav top themes">
|
<div class="tablenav top themes">
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
<?php
|
<?php
|
||||||
@ -219,13 +219,13 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||||||
public function display_rows() {
|
public function display_rows() {
|
||||||
$themes = $this->items;
|
$themes = $this->items;
|
||||||
foreach ( $themes as $theme ) {
|
foreach ( $themes as $theme ) {
|
||||||
?>
|
?>
|
||||||
<div class="available-theme installable-theme">
|
<div class="available-theme installable-theme">
|
||||||
<?php
|
<?php
|
||||||
$this->single_row( $theme );
|
$this->single_row( $theme );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
} // end foreach $theme_names
|
} // end foreach $theme_names
|
||||||
|
|
||||||
$this->theme_installer();
|
$this->theme_installer();
|
||||||
@ -270,7 +270,8 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||||||
array(
|
array(
|
||||||
'tab' => 'theme-information',
|
'tab' => 'theme-information',
|
||||||
'theme' => $theme->slug,
|
'theme' => $theme->slug,
|
||||||
), self_admin_url( 'theme-install.php' )
|
),
|
||||||
|
self_admin_url( 'theme-install.php' )
|
||||||
);
|
);
|
||||||
|
|
||||||
$actions = array();
|
$actions = array();
|
||||||
@ -279,14 +280,16 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||||||
array(
|
array(
|
||||||
'action' => 'install-theme',
|
'action' => 'install-theme',
|
||||||
'theme' => $theme->slug,
|
'theme' => $theme->slug,
|
||||||
), self_admin_url( 'update.php' )
|
),
|
||||||
|
self_admin_url( 'update.php' )
|
||||||
);
|
);
|
||||||
|
|
||||||
$update_url = add_query_arg(
|
$update_url = add_query_arg(
|
||||||
array(
|
array(
|
||||||
'action' => 'upgrade-theme',
|
'action' => 'upgrade-theme',
|
||||||
'theme' => $theme->slug,
|
'theme' => $theme->slug,
|
||||||
), self_admin_url( 'update.php' )
|
),
|
||||||
|
self_admin_url( 'update.php' )
|
||||||
);
|
);
|
||||||
|
|
||||||
$status = $this->_get_theme_status( $theme );
|
$status = $this->_get_theme_status( $theme );
|
||||||
@ -346,10 +349,12 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<h3><?php echo $name; ?></h3>
|
<h3><?php echo $name; ?></h3>
|
||||||
<div class="theme-author"><?php
|
<div class="theme-author">
|
||||||
|
<?php
|
||||||
/* translators: %s: theme author */
|
/* translators: %s: theme author */
|
||||||
printf( __( 'By %s' ), $author );
|
printf( __( 'By %s' ), $author );
|
||||||
?></div>
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="action-links">
|
<div class="action-links">
|
||||||
<ul>
|
<ul>
|
||||||
@ -430,14 +435,16 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||||||
array(
|
array(
|
||||||
'action' => 'install-theme',
|
'action' => 'install-theme',
|
||||||
'theme' => $theme->slug,
|
'theme' => $theme->slug,
|
||||||
), self_admin_url( 'update.php' )
|
),
|
||||||
|
self_admin_url( 'update.php' )
|
||||||
);
|
);
|
||||||
|
|
||||||
$update_url = add_query_arg(
|
$update_url = add_query_arg(
|
||||||
array(
|
array(
|
||||||
'action' => 'upgrade-theme',
|
'action' => 'upgrade-theme',
|
||||||
'theme' => $theme->slug,
|
'theme' => $theme->slug,
|
||||||
), self_admin_url( 'update.php' )
|
),
|
||||||
|
self_admin_url( 'update.php' )
|
||||||
);
|
);
|
||||||
|
|
||||||
$status = $this->_get_theme_status( $theme );
|
$status = $this->_get_theme_status( $theme );
|
||||||
@ -472,12 +479,14 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<h3 class="theme-name"><?php echo $name; ?></h3>
|
<h3 class="theme-name"><?php echo $name; ?></h3>
|
||||||
<span class="theme-by"><?php
|
<span class="theme-by">
|
||||||
|
<?php
|
||||||
/* translators: %s: theme author */
|
/* translators: %s: theme author */
|
||||||
printf( __( 'By %s' ), $author );
|
printf( __( 'By %s' ), $author );
|
||||||
?></span>
|
?>
|
||||||
|
</span>
|
||||||
<?php if ( isset( $theme->screenshot_url ) ) : ?>
|
<?php if ( isset( $theme->screenshot_url ) ) : ?>
|
||||||
<img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="" />
|
<img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -137,7 +137,7 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||||||
*/
|
*/
|
||||||
public function display() {
|
public function display() {
|
||||||
wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
|
wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
|
||||||
?>
|
?>
|
||||||
<?php $this->tablenav( 'top' ); ?>
|
<?php $this->tablenav( 'top' ); ?>
|
||||||
|
|
||||||
<div id="availablethemes">
|
<div id="availablethemes">
|
||||||
@ -145,7 +145,7 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php $this->tablenav( 'bottom' ); ?>
|
<?php $this->tablenav( 'bottom' ); ?>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -250,7 +250,7 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endforeach;
|
endforeach;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
|||||||
protected function extra_tablenav( $which ) {
|
protected function extra_tablenav( $which ) {
|
||||||
$id = 'bottom' === $which ? 'new_role2' : 'new_role';
|
$id = 'bottom' === $which ? 'new_role2' : 'new_role';
|
||||||
$button_id = 'bottom' === $which ? 'changeit2' : 'changeit';
|
$button_id = 'bottom' === $which ? 'changeit2' : 'changeit';
|
||||||
?>
|
?>
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
<?php if ( current_user_can( 'promote_users' ) && $this->has_items() ) : ?>
|
<?php if ( current_user_can( 'promote_users' ) && $this->has_items() ) : ?>
|
||||||
<label class="screen-reader-text" for="<?php echo $id; ?>"><?php _e( 'Change role to…' ); ?></label>
|
<label class="screen-reader-text" for="<?php echo $id; ?>"><?php _e( 'Change role to…' ); ?></label>
|
||||||
@ -272,7 +272,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
|||||||
<option value=""><?php _e( 'Change role to…' ); ?></option>
|
<option value=""><?php _e( 'Change role to…' ); ?></option>
|
||||||
<?php wp_dropdown_roles(); ?>
|
<?php wp_dropdown_roles(); ?>
|
||||||
</select>
|
</select>
|
||||||
<?php
|
<?php
|
||||||
submit_button( __( 'Change' ), '', $button_id, false );
|
submit_button( __( 'Change' ), '', $button_id, false );
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
@ -286,9 +286,9 @@ class WP_Users_List_Table extends WP_List_Table {
|
|||||||
* @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
|
* @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
|
||||||
*/
|
*/
|
||||||
do_action( 'restrict_manage_users', $which );
|
do_action( 'restrict_manage_users', $which );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires immediately following the closing "actions" div in the tablenav for the users
|
* Fires immediately following the closing "actions" div in the tablenav for the users
|
||||||
* list table.
|
* list table.
|
||||||
|
@ -226,7 +226,7 @@ function wp_dashboard() {
|
|||||||
$columns_css = " columns-$columns";
|
$columns_css = " columns-$columns";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div id="dashboard-widgets" class="metabox-holder<?php echo $columns_css; ?>">
|
<div id="dashboard-widgets" class="metabox-holder<?php echo $columns_css; ?>">
|
||||||
<div id="postbox-container-1" class="postbox-container">
|
<div id="postbox-container-1" class="postbox-container">
|
||||||
<?php do_meta_boxes( $screen->id, 'normal', '' ); ?>
|
<?php do_meta_boxes( $screen->id, 'normal', '' ); ?>
|
||||||
@ -242,7 +242,7 @@ function wp_dashboard() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
||||||
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
|
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ function wp_dashboard() {
|
|||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*/
|
*/
|
||||||
function wp_dashboard_right_now() {
|
function wp_dashboard_right_now() {
|
||||||
?>
|
?>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
@ -388,11 +388,11 @@ function wp_dashboard_right_now() {
|
|||||||
$actions = ob_get_clean();
|
$actions = ob_get_clean();
|
||||||
|
|
||||||
if ( ! empty( $actions ) ) :
|
if ( ! empty( $actions ) ) :
|
||||||
?>
|
?>
|
||||||
<div class="sub">
|
<div class="sub">
|
||||||
<?php echo $actions; ?>
|
<?php echo $actions; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,7 +427,7 @@ function wp_network_dashboard_right_now() {
|
|||||||
echo implode( " |</li>\n", $actions ) . "</li>\n";
|
echo implode( " |</li>\n", $actions ) . "</li>\n";
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
|
||||||
<p class="youhave"><?php echo $sentence; ?></p>
|
<p class="youhave"><?php echo $sentence; ?></p>
|
||||||
@ -458,7 +458,7 @@ function wp_network_dashboard_right_now() {
|
|||||||
<?php submit_button( __( 'Search Sites' ), '', false, false, array( 'id' => 'submit_sites' ) ); ?>
|
<?php submit_button( __( 'Search Sites' ), '', false, false, array( 'id' => 'submit_sites' ) ); ?>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires at the end of the 'Right Now' widget in the Network Admin dashboard.
|
* Fires at the end of the 'Right Now' widget in the Network Admin dashboard.
|
||||||
*
|
*
|
||||||
@ -510,7 +510,7 @@ function wp_dashboard_quick_press( $error_msg = false ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$post_ID = (int) $post->ID;
|
$post_ID = (int) $post->ID;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">
|
<form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press" class="initial-form hide-if-no-js">
|
||||||
|
|
||||||
@ -692,7 +692,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
|||||||
$actions_string .= "<span class='$action'>$sep$link</span>";
|
$actions_string .= "<span class='$action'>$sep$link</span>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<li id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>>
|
<li id="comment-<?php echo $comment->comment_ID; ?>" <?php comment_class( array( 'comment-item', wp_get_comment_status( $comment ) ), $comment ); ?>>
|
||||||
|
|
||||||
@ -702,28 +702,28 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
|||||||
|
|
||||||
<div class="dashboard-comment-wrap has-row-actions">
|
<div class="dashboard-comment-wrap has-row-actions">
|
||||||
<p class="comment-meta">
|
<p class="comment-meta">
|
||||||
<?php
|
<?php
|
||||||
// Comments might not have a post they relate to, e.g. programmatically created ones.
|
// Comments might not have a post they relate to, e.g. programmatically created ones.
|
||||||
if ( $comment_post_link ) {
|
if ( $comment_post_link ) {
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */
|
/* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */
|
||||||
__( 'From %1$s on %2$s %3$s' ),
|
__( 'From %1$s on %2$s %3$s' ),
|
||||||
'<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
|
'<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
|
||||||
$comment_post_link,
|
$comment_post_link,
|
||||||
'<span class="approve">' . __( '[Pending]' ) . '</span>'
|
'<span class="approve">' . __( '[Pending]' ) . '</span>'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: comment author, 2: notification if the comment is pending */
|
/* translators: 1: comment author, 2: notification if the comment is pending */
|
||||||
__( 'From %1$s %2$s' ),
|
__( 'From %1$s %2$s' ),
|
||||||
'<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
|
'<cite class="comment-author">' . get_comment_author_link( $comment ) . '</cite>',
|
||||||
'<span class="approve">' . __( '[Pending]' ) . '</span>'
|
'<span class="approve">' . __( '[Pending]' ) . '</span>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
else :
|
else :
|
||||||
switch ( $comment->comment_type ) {
|
switch ( $comment->comment_type ) {
|
||||||
case 'pingback':
|
case 'pingback':
|
||||||
@ -736,28 +736,28 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
|||||||
$type = ucwords( $comment->comment_type );
|
$type = ucwords( $comment->comment_type );
|
||||||
}
|
}
|
||||||
$type = esc_html( $type );
|
$type = esc_html( $type );
|
||||||
?>
|
?>
|
||||||
<div class="dashboard-comment-wrap has-row-actions">
|
<div class="dashboard-comment-wrap has-row-actions">
|
||||||
<p class="comment-meta">
|
<p class="comment-meta">
|
||||||
<?php
|
<?php
|
||||||
// Pingbacks, Trackbacks or custom comment types might not have a post they relate to, e.g. programmatically created ones.
|
// Pingbacks, Trackbacks or custom comment types might not have a post they relate to, e.g. programmatically created ones.
|
||||||
if ( $comment_post_link ) {
|
if ( $comment_post_link ) {
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: type of comment, 2: post link, 3: notification if the comment is pending */
|
/* translators: 1: type of comment, 2: post link, 3: notification if the comment is pending */
|
||||||
_x( '%1$s on %2$s %3$s', 'dashboard' ),
|
_x( '%1$s on %2$s %3$s', 'dashboard' ),
|
||||||
"<strong>$type</strong>",
|
"<strong>$type</strong>",
|
||||||
$comment_post_link,
|
$comment_post_link,
|
||||||
'<span class="approve">' . __( '[Pending]' ) . '</span>'
|
'<span class="approve">' . __( '[Pending]' ) . '</span>'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: type of comment, 2: notification if the comment is pending */
|
/* translators: 1: type of comment, 2: notification if the comment is pending */
|
||||||
_x( '%1$s %2$s', 'dashboard' ),
|
_x( '%1$s %2$s', 'dashboard' ),
|
||||||
"<strong>$type</strong>",
|
"<strong>$type</strong>",
|
||||||
'<span class="approve">' . __( '[Pending]' ) . '</span>'
|
'<span class="approve">' . __( '[Pending]' ) . '</span>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<p class="comment-author"><?php comment_author_link( $comment ); ?></p>
|
<p class="comment-author"><?php comment_author_link( $comment ); ?></p>
|
||||||
|
|
||||||
@ -768,7 +768,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
$GLOBALS['comment'] = null;
|
$GLOBALS['comment'] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1049,7 +1049,9 @@ function wp_dashboard_trigger_widget_control( $widget_control_id = false ) {
|
|||||||
|
|
||||||
if ( is_scalar( $widget_control_id ) && $widget_control_id && isset( $wp_dashboard_control_callbacks[ $widget_control_id ] ) && is_callable( $wp_dashboard_control_callbacks[ $widget_control_id ] ) ) {
|
if ( is_scalar( $widget_control_id ) && $widget_control_id && isset( $wp_dashboard_control_callbacks[ $widget_control_id ] ) && is_callable( $wp_dashboard_control_callbacks[ $widget_control_id ] ) ) {
|
||||||
call_user_func(
|
call_user_func(
|
||||||
$wp_dashboard_control_callbacks[ $widget_control_id ], '', array(
|
$wp_dashboard_control_callbacks[ $widget_control_id ],
|
||||||
|
'',
|
||||||
|
array(
|
||||||
'id' => $widget_control_id,
|
'id' => $widget_control_id,
|
||||||
'callback' => $wp_dashboard_control_callbacks[ $widget_control_id ],
|
'callback' => $wp_dashboard_control_callbacks[ $widget_control_id ],
|
||||||
)
|
)
|
||||||
@ -1760,7 +1762,8 @@ function wp_welcome_panel() {
|
|||||||
if ( current_theme_supports( 'widgets' ) && current_theme_supports( 'menus' ) ) {
|
if ( current_theme_supports( 'widgets' ) && current_theme_supports( 'menus' ) ) {
|
||||||
printf(
|
printf(
|
||||||
__( 'Manage <a href="%1$s">widgets</a> or <a href="%2$s">menus</a>' ),
|
__( 'Manage <a href="%1$s">widgets</a> or <a href="%2$s">menus</a>' ),
|
||||||
admin_url( 'widgets.php' ), admin_url( 'nav-menus.php' )
|
admin_url( 'widgets.php' ),
|
||||||
|
admin_url( 'nav-menus.php' )
|
||||||
);
|
);
|
||||||
} elseif ( current_theme_supports( 'widgets' ) ) {
|
} elseif ( current_theme_supports( 'widgets' ) ) {
|
||||||
echo '<a href="' . admin_url( 'widgets.php' ) . '">' . __( 'Manage widgets' ) . '</a>';
|
echo '<a href="' . admin_url( 'widgets.php' ) . '">' . __( 'Manage widgets' ) . '</a>';
|
||||||
|
@ -445,7 +445,7 @@ function export_wp( $args = array() ) {
|
|||||||
<!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
|
<!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
|
||||||
<!-- contained in this file into your site. -->
|
<!-- contained in this file into your site. -->
|
||||||
|
|
||||||
<?php the_generator( 'export' ); ?>
|
<?php the_generator( 'export' ); ?>
|
||||||
<rss version="2.0"
|
<rss version="2.0"
|
||||||
xmlns:excerpt="http://wordpress.org/export/<?php echo WXR_VERSION; ?>/excerpt/"
|
xmlns:excerpt="http://wordpress.org/export/<?php echo WXR_VERSION; ?>/excerpt/"
|
||||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||||
@ -464,9 +464,9 @@ function export_wp( $args = array() ) {
|
|||||||
<wp:base_site_url><?php echo wxr_site_url(); ?></wp:base_site_url>
|
<wp:base_site_url><?php echo wxr_site_url(); ?></wp:base_site_url>
|
||||||
<wp:base_blog_url><?php bloginfo_rss( 'url' ); ?></wp:base_blog_url>
|
<wp:base_blog_url><?php bloginfo_rss( 'url' ); ?></wp:base_blog_url>
|
||||||
|
|
||||||
<?php wxr_authors_list( $post_ids ); ?>
|
<?php wxr_authors_list( $post_ids ); ?>
|
||||||
|
|
||||||
<?php foreach ( $cats as $c ) : ?>
|
<?php foreach ( $cats as $c ) : ?>
|
||||||
<wp:category>
|
<wp:category>
|
||||||
<wp:term_id><?php echo intval( $c->term_id ); ?></wp:term_id>
|
<wp:term_id><?php echo intval( $c->term_id ); ?></wp:term_id>
|
||||||
<wp:category_nicename><?php echo wxr_cdata( $c->slug ); ?></wp:category_nicename>
|
<wp:category_nicename><?php echo wxr_cdata( $c->slug ); ?></wp:category_nicename>
|
||||||
@ -477,8 +477,8 @@ function export_wp( $args = array() ) {
|
|||||||
wxr_term_meta( $c );
|
wxr_term_meta( $c );
|
||||||
?>
|
?>
|
||||||
</wp:category>
|
</wp:category>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php foreach ( $tags as $t ) : ?>
|
<?php foreach ( $tags as $t ) : ?>
|
||||||
<wp:tag>
|
<wp:tag>
|
||||||
<wp:term_id><?php echo intval( $t->term_id ); ?></wp:term_id>
|
<wp:term_id><?php echo intval( $t->term_id ); ?></wp:term_id>
|
||||||
<wp:tag_slug><?php echo wxr_cdata( $t->slug ); ?></wp:tag_slug>
|
<wp:tag_slug><?php echo wxr_cdata( $t->slug ); ?></wp:tag_slug>
|
||||||
@ -488,8 +488,8 @@ function export_wp( $args = array() ) {
|
|||||||
wxr_term_meta( $t );
|
wxr_term_meta( $t );
|
||||||
?>
|
?>
|
||||||
</wp:tag>
|
</wp:tag>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php foreach ( $terms as $t ) : ?>
|
<?php foreach ( $terms as $t ) : ?>
|
||||||
<wp:term>
|
<wp:term>
|
||||||
<wp:term_id><?php echo wxr_cdata( $t->term_id ); ?></wp:term_id>
|
<wp:term_id><?php echo wxr_cdata( $t->term_id ); ?></wp:term_id>
|
||||||
<wp:term_taxonomy><?php echo wxr_cdata( $t->taxonomy ); ?></wp:term_taxonomy>
|
<wp:term_taxonomy><?php echo wxr_cdata( $t->taxonomy ); ?></wp:term_taxonomy>
|
||||||
@ -501,43 +501,43 @@ function export_wp( $args = array() ) {
|
|||||||
wxr_term_meta( $t );
|
wxr_term_meta( $t );
|
||||||
?>
|
?>
|
||||||
</wp:term>
|
</wp:term>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php
|
<?php
|
||||||
if ( 'all' == $args['content'] ) {
|
if ( 'all' == $args['content'] ) {
|
||||||
wxr_nav_menu_terms();}
|
wxr_nav_menu_terms();}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/** This action is documented in wp-includes/feed-rss2.php */
|
/** This action is documented in wp-includes/feed-rss2.php */
|
||||||
do_action( 'rss2_head' );
|
do_action( 'rss2_head' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( $post_ids ) {
|
if ( $post_ids ) {
|
||||||
/**
|
/**
|
||||||
* @global WP_Query $wp_query
|
* @global WP_Query $wp_query
|
||||||
*/
|
*/
|
||||||
global $wp_query;
|
global $wp_query;
|
||||||
|
|
||||||
// Fake being in the loop.
|
// Fake being in the loop.
|
||||||
$wp_query->in_the_loop = true;
|
$wp_query->in_the_loop = true;
|
||||||
|
|
||||||
// Fetch 20 posts at a time rather than loading the entire table into memory.
|
// Fetch 20 posts at a time rather than loading the entire table into memory.
|
||||||
while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) {
|
while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) {
|
||||||
$where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')';
|
$where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')';
|
||||||
$posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" );
|
$posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" );
|
||||||
|
|
||||||
// Begin Loop.
|
// Begin Loop.
|
||||||
foreach ( $posts as $post ) {
|
foreach ( $posts as $post ) {
|
||||||
setup_postdata( $post );
|
setup_postdata( $post );
|
||||||
$is_sticky = is_sticky( $post->ID ) ? 1 : 0;
|
$is_sticky = is_sticky( $post->ID ) ? 1 : 0;
|
||||||
?>
|
?>
|
||||||
<item>
|
<item>
|
||||||
<title>
|
<title>
|
||||||
<?php
|
<?php
|
||||||
/** This filter is documented in wp-includes/feed.php */
|
/** This filter is documented in wp-includes/feed.php */
|
||||||
echo apply_filters( 'the_title_rss', $post->post_title );
|
echo apply_filters( 'the_title_rss', $post->post_title );
|
||||||
?>
|
?>
|
||||||
</title>
|
</title>
|
||||||
<link><?php the_permalink_rss(); ?></link>
|
<link><?php the_permalink_rss(); ?></link>
|
||||||
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate>
|
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate>
|
||||||
@ -545,28 +545,28 @@ if ( $post_ids ) {
|
|||||||
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
||||||
<description></description>
|
<description></description>
|
||||||
<content:encoded>
|
<content:encoded>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Filters the post content used for WXR exports.
|
* Filters the post content used for WXR exports.
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
*
|
*
|
||||||
* @param string $post_content Content of the current post.
|
* @param string $post_content Content of the current post.
|
||||||
*/
|
*/
|
||||||
echo wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) );
|
echo wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) );
|
||||||
?>
|
?>
|
||||||
</content:encoded>
|
</content:encoded>
|
||||||
<excerpt:encoded>
|
<excerpt:encoded>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Filters the post excerpt used for WXR exports.
|
* Filters the post excerpt used for WXR exports.
|
||||||
*
|
*
|
||||||
* @since 2.6.0
|
* @since 2.6.0
|
||||||
*
|
*
|
||||||
* @param string $post_excerpt Excerpt for the current post.
|
* @param string $post_excerpt Excerpt for the current post.
|
||||||
*/
|
*/
|
||||||
echo wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) );
|
echo wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) );
|
||||||
?>
|
?>
|
||||||
</excerpt:encoded>
|
</excerpt:encoded>
|
||||||
<wp:post_id><?php echo intval( $post->ID ); ?></wp:post_id>
|
<wp:post_id><?php echo intval( $post->ID ); ?></wp:post_id>
|
||||||
<wp:post_date><?php echo wxr_cdata( $post->post_date ); ?></wp:post_date>
|
<wp:post_date><?php echo wxr_cdata( $post->post_date ); ?></wp:post_date>
|
||||||
@ -580,40 +580,40 @@ if ( $post_ids ) {
|
|||||||
<wp:post_type><?php echo wxr_cdata( $post->post_type ); ?></wp:post_type>
|
<wp:post_type><?php echo wxr_cdata( $post->post_type ); ?></wp:post_type>
|
||||||
<wp:post_password><?php echo wxr_cdata( $post->post_password ); ?></wp:post_password>
|
<wp:post_password><?php echo wxr_cdata( $post->post_password ); ?></wp:post_password>
|
||||||
<wp:is_sticky><?php echo intval( $is_sticky ); ?></wp:is_sticky>
|
<wp:is_sticky><?php echo intval( $is_sticky ); ?></wp:is_sticky>
|
||||||
<?php if ( $post->post_type == 'attachment' ) : ?>
|
<?php if ( $post->post_type == 'attachment' ) : ?>
|
||||||
<wp:attachment_url><?php echo wxr_cdata( wp_get_attachment_url( $post->ID ) ); ?></wp:attachment_url>
|
<wp:attachment_url><?php echo wxr_cdata( wp_get_attachment_url( $post->ID ) ); ?></wp:attachment_url>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php wxr_post_taxonomy(); ?>
|
<?php wxr_post_taxonomy(); ?>
|
||||||
<?php
|
<?php
|
||||||
$postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) );
|
$postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) );
|
||||||
foreach ( $postmeta as $meta ) :
|
foreach ( $postmeta as $meta ) :
|
||||||
/**
|
/**
|
||||||
* Filters whether to selectively skip post meta used for WXR exports.
|
* Filters whether to selectively skip post meta used for WXR exports.
|
||||||
*
|
*
|
||||||
* Returning a truthy value to the filter will skip the current meta
|
* Returning a truthy value to the filter will skip the current meta
|
||||||
* object from being exported.
|
* object from being exported.
|
||||||
*
|
*
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*
|
*
|
||||||
* @param bool $skip Whether to skip the current post meta. Default false.
|
* @param bool $skip Whether to skip the current post meta. Default false.
|
||||||
* @param string $meta_key Current meta key.
|
* @param string $meta_key Current meta key.
|
||||||
* @param object $meta Current meta object.
|
* @param object $meta Current meta object.
|
||||||
*/
|
*/
|
||||||
if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) {
|
if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<wp:postmeta>
|
<wp:postmeta>
|
||||||
<wp:meta_key><?php echo wxr_cdata( $meta->meta_key ); ?></wp:meta_key>
|
<wp:meta_key><?php echo wxr_cdata( $meta->meta_key ); ?></wp:meta_key>
|
||||||
<wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value>
|
<wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value>
|
||||||
</wp:postmeta>
|
</wp:postmeta>
|
||||||
<?php
|
<?php
|
||||||
endforeach;
|
endforeach;
|
||||||
|
|
||||||
$_comments = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) );
|
$_comments = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) );
|
||||||
$comments = array_map( 'get_comment', $_comments );
|
$comments = array_map( 'get_comment', $_comments );
|
||||||
foreach ( $comments as $c ) :
|
foreach ( $comments as $c ) :
|
||||||
?>
|
?>
|
||||||
<wp:comment>
|
<wp:comment>
|
||||||
<wp:comment_id><?php echo intval( $c->comment_ID ); ?></wp:comment_id>
|
<wp:comment_id><?php echo intval( $c->comment_ID ); ?></wp:comment_id>
|
||||||
<wp:comment_author><?php echo wxr_cdata( $c->comment_author ); ?></wp:comment_author>
|
<wp:comment_author><?php echo wxr_cdata( $c->comment_author ); ?></wp:comment_author>
|
||||||
@ -627,39 +627,39 @@ endforeach;
|
|||||||
<wp:comment_type><?php echo wxr_cdata( $c->comment_type ); ?></wp:comment_type>
|
<wp:comment_type><?php echo wxr_cdata( $c->comment_type ); ?></wp:comment_type>
|
||||||
<wp:comment_parent><?php echo intval( $c->comment_parent ); ?></wp:comment_parent>
|
<wp:comment_parent><?php echo intval( $c->comment_parent ); ?></wp:comment_parent>
|
||||||
<wp:comment_user_id><?php echo intval( $c->user_id ); ?></wp:comment_user_id>
|
<wp:comment_user_id><?php echo intval( $c->user_id ); ?></wp:comment_user_id>
|
||||||
<?php
|
<?php
|
||||||
$c_meta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) );
|
$c_meta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) );
|
||||||
foreach ( $c_meta as $meta ) :
|
foreach ( $c_meta as $meta ) :
|
||||||
/**
|
/**
|
||||||
* Filters whether to selectively skip comment meta used for WXR exports.
|
* Filters whether to selectively skip comment meta used for WXR exports.
|
||||||
*
|
*
|
||||||
* Returning a truthy value to the filter will skip the current meta
|
* Returning a truthy value to the filter will skip the current meta
|
||||||
* object from being exported.
|
* object from being exported.
|
||||||
*
|
*
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
*
|
*
|
||||||
* @param bool $skip Whether to skip the current comment meta. Default false.
|
* @param bool $skip Whether to skip the current comment meta. Default false.
|
||||||
* @param string $meta_key Current meta key.
|
* @param string $meta_key Current meta key.
|
||||||
* @param object $meta Current meta object.
|
* @param object $meta Current meta object.
|
||||||
*/
|
*/
|
||||||
if ( apply_filters( 'wxr_export_skip_commentmeta', false, $meta->meta_key, $meta ) ) {
|
if ( apply_filters( 'wxr_export_skip_commentmeta', false, $meta->meta_key, $meta ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<wp:commentmeta>
|
<wp:commentmeta>
|
||||||
<wp:meta_key><?php echo wxr_cdata( $meta->meta_key ); ?></wp:meta_key>
|
<wp:meta_key><?php echo wxr_cdata( $meta->meta_key ); ?></wp:meta_key>
|
||||||
<wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value>
|
<wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value>
|
||||||
</wp:commentmeta>
|
</wp:commentmeta>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</wp:comment>
|
</wp:comment>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</item>
|
</item>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
?>
|
||||||
?>
|
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -890,11 +890,13 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
|
|||||||
* @param string $context The type of upload action. Values include 'upload' or 'sideload'.
|
* @param string $context The type of upload action. Values include 'upload' or 'sideload'.
|
||||||
*/
|
*/
|
||||||
return apply_filters(
|
return apply_filters(
|
||||||
'wp_handle_upload', array(
|
'wp_handle_upload',
|
||||||
|
array(
|
||||||
'file' => $new_file,
|
'file' => $new_file,
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
), 'wp_handle_sideload' === $action ? 'sideload' : 'upload'
|
),
|
||||||
|
'wp_handle_sideload' === $action ? 'sideload' : 'upload'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -982,7 +984,8 @@ function download_url( $url, $timeout = 300 ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$response = wp_safe_remote_get(
|
$response = wp_safe_remote_get(
|
||||||
$url, array(
|
$url,
|
||||||
|
array(
|
||||||
'timeout' => $timeout,
|
'timeout' => $timeout,
|
||||||
'stream' => true,
|
'stream' => true,
|
||||||
'filename' => $tmpfname,
|
'filename' => $tmpfname,
|
||||||
@ -1679,7 +1682,8 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false,
|
|||||||
}
|
}
|
||||||
|
|
||||||
$credentials = get_option(
|
$credentials = get_option(
|
||||||
'ftp_credentials', array(
|
'ftp_credentials',
|
||||||
|
array(
|
||||||
'hostname' => '',
|
'hostname' => '',
|
||||||
'username' => '',
|
'username' => '',
|
||||||
)
|
)
|
||||||
@ -1786,35 +1790,35 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false,
|
|||||||
*/
|
*/
|
||||||
$types = apply_filters( 'fs_ftp_connection_types', $types, $credentials, $type, $error, $context );
|
$types = apply_filters( 'fs_ftp_connection_types', $types, $credentials, $type, $error, $context );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<form action="<?php echo esc_url( $form_post ); ?>" method="post">
|
<form action="<?php echo esc_url( $form_post ); ?>" method="post">
|
||||||
<div id="request-filesystem-credentials-form" class="request-filesystem-credentials-form">
|
<div id="request-filesystem-credentials-form" class="request-filesystem-credentials-form">
|
||||||
<?php
|
<?php
|
||||||
// Print a H1 heading in the FTP credentials modal dialog, default is a H2.
|
// Print a H1 heading in the FTP credentials modal dialog, default is a H2.
|
||||||
$heading_tag = 'h2';
|
$heading_tag = 'h2';
|
||||||
if ( 'plugins.php' === $pagenow || 'plugin-install.php' === $pagenow ) {
|
if ( 'plugins.php' === $pagenow || 'plugin-install.php' === $pagenow ) {
|
||||||
$heading_tag = 'h1';
|
$heading_tag = 'h1';
|
||||||
}
|
}
|
||||||
echo "<$heading_tag id='request-filesystem-credentials-title'>" . __( 'Connection Information' ) . "</$heading_tag>";
|
echo "<$heading_tag id='request-filesystem-credentials-title'>" . __( 'Connection Information' ) . "</$heading_tag>";
|
||||||
?>
|
?>
|
||||||
<p id="request-filesystem-credentials-desc">
|
<p id="request-filesystem-credentials-desc">
|
||||||
<?php
|
<?php
|
||||||
$label_user = __( 'Username' );
|
$label_user = __( 'Username' );
|
||||||
$label_pass = __( 'Password' );
|
$label_pass = __( 'Password' );
|
||||||
_e( 'To perform the requested action, WordPress needs to access your web server.' );
|
_e( 'To perform the requested action, WordPress needs to access your web server.' );
|
||||||
echo ' ';
|
echo ' ';
|
||||||
if ( ( isset( $types['ftp'] ) || isset( $types['ftps'] ) ) ) {
|
if ( ( isset( $types['ftp'] ) || isset( $types['ftps'] ) ) ) {
|
||||||
if ( isset( $types['ssh'] ) ) {
|
if ( isset( $types['ssh'] ) ) {
|
||||||
_e( 'Please enter your FTP or SSH credentials to proceed.' );
|
_e( 'Please enter your FTP or SSH credentials to proceed.' );
|
||||||
$label_user = __( 'FTP/SSH Username' );
|
$label_user = __( 'FTP/SSH Username' );
|
||||||
$label_pass = __( 'FTP/SSH Password' );
|
$label_pass = __( 'FTP/SSH Password' );
|
||||||
} else {
|
} else {
|
||||||
_e( 'Please enter your FTP credentials to proceed.' );
|
_e( 'Please enter your FTP credentials to proceed.' );
|
||||||
$label_user = __( 'FTP Username' );
|
$label_user = __( 'FTP Username' );
|
||||||
$label_pass = __( 'FTP Password' );
|
$label_pass = __( 'FTP Password' );
|
||||||
|
}
|
||||||
|
echo ' ';
|
||||||
}
|
}
|
||||||
echo ' ';
|
|
||||||
}
|
|
||||||
_e( 'If you do not remember your credentials, you should contact your web host.' );
|
_e( 'If you do not remember your credentials, you should contact your web host.' );
|
||||||
|
|
||||||
$hostname_value = esc_attr( $hostname );
|
$hostname_value = esc_attr( $hostname );
|
||||||
@ -1826,7 +1830,7 @@ if ( ( isset( $types['ftp'] ) || isset( $types['ftps'] ) ) ) {
|
|||||||
if ( defined( 'FTP_PASS' ) ) {
|
if ( defined( 'FTP_PASS' ) ) {
|
||||||
$password_value = '*****';
|
$password_value = '*****';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<label for="hostname">
|
<label for="hostname">
|
||||||
<span class="field-title"><?php _e( 'Hostname' ); ?></span>
|
<span class="field-title"><?php _e( 'Hostname' ); ?></span>
|
||||||
@ -1846,31 +1850,31 @@ if ( ( isset( $types['ftp'] ) || isset( $types['ftps'] ) ) ) {
|
|||||||
<?php
|
<?php
|
||||||
if ( ! defined( 'FTP_PASS' ) ) {
|
if ( ! defined( 'FTP_PASS' ) ) {
|
||||||
_e( 'This password will not be stored on the server.' );}
|
_e( 'This password will not be stored on the server.' );}
|
||||||
?>
|
?>
|
||||||
</em>
|
</em>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?php _e( 'Connection Type' ); ?></legend>
|
<legend><?php _e( 'Connection Type' ); ?></legend>
|
||||||
<?php
|
<?php
|
||||||
$disabled = disabled( ( defined( 'FTP_SSL' ) && FTP_SSL ) || ( defined( 'FTP_SSH' ) && FTP_SSH ), true, false );
|
$disabled = disabled( ( defined( 'FTP_SSL' ) && FTP_SSL ) || ( defined( 'FTP_SSH' ) && FTP_SSH ), true, false );
|
||||||
foreach ( $types as $name => $text ) :
|
foreach ( $types as $name => $text ) :
|
||||||
?>
|
?>
|
||||||
<label for="<?php echo esc_attr( $name ); ?>">
|
<label for="<?php echo esc_attr( $name ); ?>">
|
||||||
<input type="radio" name="connection_type" id="<?php echo esc_attr( $name ); ?>" value="<?php echo esc_attr( $name ); ?>" <?php checked( $name, $connection_type ); ?> <?php echo $disabled; ?> />
|
<input type="radio" name="connection_type" id="<?php echo esc_attr( $name ); ?>" value="<?php echo esc_attr( $name ); ?>" <?php checked( $name, $connection_type ); ?> <?php echo $disabled; ?> />
|
||||||
<?php echo $text; ?>
|
<?php echo $text; ?>
|
||||||
</label>
|
</label>
|
||||||
<?php
|
<?php
|
||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php
|
<?php
|
||||||
if ( isset( $types['ssh'] ) ) {
|
if ( isset( $types['ssh'] ) ) {
|
||||||
$hidden_class = '';
|
$hidden_class = '';
|
||||||
if ( 'ssh' != $connection_type || empty( $connection_type ) ) {
|
if ( 'ssh' != $connection_type || empty( $connection_type ) ) {
|
||||||
$hidden_class = ' class="hidden"';
|
$hidden_class = ' class="hidden"';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<fieldset id="ssh-keys"<?php echo $hidden_class; ?>>
|
<fieldset id="ssh-keys"<?php echo $hidden_class; ?>>
|
||||||
<legend><?php _e( 'Authentication Keys' ); ?></legend>
|
<legend><?php _e( 'Authentication Keys' ); ?></legend>
|
||||||
<label for="public_key">
|
<label for="public_key">
|
||||||
@ -1883,15 +1887,15 @@ if ( isset( $types['ssh'] ) ) {
|
|||||||
</label>
|
</label>
|
||||||
<p id="auth-keys-desc"><?php _e( 'Enter the location on the server where the public and private keys are located. If a passphrase is needed, enter that in the password field above.' ); ?></p>
|
<p id="auth-keys-desc"><?php _e( 'Enter the location on the server where the public and private keys are located. If a passphrase is needed, enter that in the password field above.' ); ?></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php
|
<?php
|
||||||
}
|
|
||||||
|
|
||||||
foreach ( (array) $extra_fields as $field ) {
|
|
||||||
if ( isset( $submitted_form[ $field ] ) ) {
|
|
||||||
echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( $submitted_form[ $field ] ) . '" />';
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
?>
|
foreach ( (array) $extra_fields as $field ) {
|
||||||
|
if ( isset( $submitted_form[ $field ] ) ) {
|
||||||
|
echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( $submitted_form[ $field ] ) . '" />';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
<p class="request-filesystem-credentials-action-buttons">
|
<p class="request-filesystem-credentials-action-buttons">
|
||||||
<?php wp_nonce_field( 'filesystem-credentials', '_fs_nonce', false, true ); ?>
|
<?php wp_nonce_field( 'filesystem-credentials', '_fs_nonce', false, true ); ?>
|
||||||
<button class="button cancel-button" data-js-action="close" type="button"><?php _e( 'Cancel' ); ?></button>
|
<button class="button cancel-button" data-js-action="close" type="button"><?php _e( 'Cancel' ); ?></button>
|
||||||
@ -1899,7 +1903,7 @@ foreach ( (array) $extra_fields as $field ) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1953,11 +1957,11 @@ function wp_print_request_filesystem_credentials_modal() {
|
|||||||
*/
|
*/
|
||||||
function wp_privacy_generate_personal_data_export_group_html( $group_data ) {
|
function wp_privacy_generate_personal_data_export_group_html( $group_data ) {
|
||||||
$allowed_tags = array(
|
$allowed_tags = array(
|
||||||
'a' => array(
|
'a' => array(
|
||||||
'href' => array(),
|
'href' => array(),
|
||||||
'target' => array()
|
'target' => array(),
|
||||||
),
|
),
|
||||||
'br' => array()
|
'br' => array(),
|
||||||
);
|
);
|
||||||
$allowed_protocols = array( 'http', 'https' );
|
$allowed_protocols = array( 'http', 'https' );
|
||||||
$group_html = '';
|
$group_html = '';
|
||||||
@ -2041,7 +2045,7 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
|
|||||||
$file_basename = 'wp-personal-data-file-' . $stripped_email . '-' . $obscura;
|
$file_basename = 'wp-personal-data-file-' . $stripped_email . '-' . $obscura;
|
||||||
$html_report_filename = $file_basename . '.html';
|
$html_report_filename = $file_basename . '.html';
|
||||||
$html_report_pathname = wp_normalize_path( $exports_dir . $html_report_filename );
|
$html_report_pathname = wp_normalize_path( $exports_dir . $html_report_filename );
|
||||||
$file = fopen( $html_report_pathname, 'w' );
|
$file = fopen( $html_report_pathname, 'w' );
|
||||||
if ( false === $file ) {
|
if ( false === $file ) {
|
||||||
wp_send_json_error( __( 'Unable to open export file (HTML report) for writing.' ) );
|
wp_send_json_error( __( 'Unable to open export file (HTML report) for writing.' ) );
|
||||||
}
|
}
|
||||||
@ -2060,22 +2064,22 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
|
|||||||
fwrite( $file, "<head>\n" );
|
fwrite( $file, "<head>\n" );
|
||||||
fwrite( $file, "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />\n" );
|
fwrite( $file, "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />\n" );
|
||||||
fwrite( $file, "<style type='text/css'>" );
|
fwrite( $file, "<style type='text/css'>" );
|
||||||
fwrite( $file, "body { color: black; font-family: Arial, sans-serif; font-size: 11pt; margin: 15px auto; width: 860px; }" );
|
fwrite( $file, 'body { color: black; font-family: Arial, sans-serif; font-size: 11pt; margin: 15px auto; width: 860px; }' );
|
||||||
fwrite( $file, "table { background: #f0f0f0; border: 1px solid #ddd; margin-bottom: 20px; width: 100%; }" );
|
fwrite( $file, 'table { background: #f0f0f0; border: 1px solid #ddd; margin-bottom: 20px; width: 100%; }' );
|
||||||
fwrite( $file, "th { padding: 5px; text-align: left; width: 20%; }" );
|
fwrite( $file, 'th { padding: 5px; text-align: left; width: 20%; }' );
|
||||||
fwrite( $file, "td { padding: 5px; }" );
|
fwrite( $file, 'td { padding: 5px; }' );
|
||||||
fwrite( $file, "tr:nth-child(odd) { background-color: #fafafa; }" );
|
fwrite( $file, 'tr:nth-child(odd) { background-color: #fafafa; }' );
|
||||||
fwrite( $file, "</style>" );
|
fwrite( $file, '</style>' );
|
||||||
fwrite( $file, "<title>" );
|
fwrite( $file, '<title>' );
|
||||||
fwrite( $file, esc_html( $title ) );
|
fwrite( $file, esc_html( $title ) );
|
||||||
fwrite( $file, "</title>" );
|
fwrite( $file, '</title>' );
|
||||||
fwrite( $file, "</head>\n" );
|
fwrite( $file, "</head>\n" );
|
||||||
|
|
||||||
// Body.
|
// Body.
|
||||||
fwrite( $file, "<body>\n" );
|
fwrite( $file, "<body>\n" );
|
||||||
|
|
||||||
// Heading.
|
// Heading.
|
||||||
fwrite( $file, "<h1>" . esc_html__( 'Personal Data Export' ) . "</h1>" );
|
fwrite( $file, '<h1>' . esc_html__( 'Personal Data Export' ) . '</h1>' );
|
||||||
|
|
||||||
// And now, all the Groups.
|
// And now, all the Groups.
|
||||||
$groups = get_post_meta( $request_id, '_export_data_grouped', true );
|
$groups = get_post_meta( $request_id, '_export_data_grouped', true );
|
||||||
@ -2197,9 +2201,9 @@ function wp_privacy_send_personal_data_export_email( $request_id ) {
|
|||||||
$expiration = apply_filters( 'wp_privacy_export_expiration', 3 * DAY_IN_SECONDS );
|
$expiration = apply_filters( 'wp_privacy_export_expiration', 3 * DAY_IN_SECONDS );
|
||||||
$expiration_date = date_i18n( get_option( 'date_format' ), time() + $expiration );
|
$expiration_date = date_i18n( get_option( 'date_format' ), time() + $expiration );
|
||||||
|
|
||||||
/* translators: Do not translate EXPIRATION, LINK, SITENAME, SITEURL: those are placeholders. */
|
/* translators: Do not translate EXPIRATION, LINK, SITENAME, SITEURL: those are placeholders. */
|
||||||
$email_text = __(
|
$email_text = __(
|
||||||
'Howdy,
|
'Howdy,
|
||||||
|
|
||||||
Your request for an export of personal data has been completed. You may
|
Your request for an export of personal data has been completed. You may
|
||||||
download your personal data by clicking on the link below. For privacy
|
download your personal data by clicking on the link below. For privacy
|
||||||
@ -2211,7 +2215,7 @@ so please download it before then.
|
|||||||
Regards,
|
Regards,
|
||||||
All at ###SITENAME###
|
All at ###SITENAME###
|
||||||
###SITEURL###'
|
###SITEURL###'
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the text of the email sent with a personal data export file.
|
* Filters the text of the email sent with a personal data export file.
|
||||||
@ -2229,10 +2233,10 @@ All at ###SITENAME###
|
|||||||
*/
|
*/
|
||||||
$content = apply_filters( 'wp_privacy_personal_data_email_content', $email_text, $request_id );
|
$content = apply_filters( 'wp_privacy_personal_data_email_content', $email_text, $request_id );
|
||||||
|
|
||||||
$email_address = $request->email;
|
$email_address = $request->email;
|
||||||
$export_file_url = get_post_meta( $request_id, '_export_file_url', true );
|
$export_file_url = get_post_meta( $request_id, '_export_file_url', true );
|
||||||
$site_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
$site_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
||||||
$site_url = home_url();
|
$site_url = home_url();
|
||||||
|
|
||||||
$content = str_replace( '###EXPIRATION###', $expiration_date, $content );
|
$content = str_replace( '###EXPIRATION###', $expiration_date, $content );
|
||||||
$content = str_replace( '###LINK###', esc_url_raw( $export_file_url ), $content );
|
$content = str_replace( '###LINK###', esc_url_raw( $export_file_url ), $content );
|
||||||
@ -2313,9 +2317,9 @@ function wp_privacy_process_personal_data_export_page( $response, $exporter_inde
|
|||||||
|
|
||||||
// If we are not yet on the last page of the last exporter, return now.
|
// If we are not yet on the last page of the last exporter, return now.
|
||||||
/** This filter is documented in wp-admin/includes/ajax-actions.php */
|
/** This filter is documented in wp-admin/includes/ajax-actions.php */
|
||||||
$exporters = apply_filters( 'wp_privacy_personal_data_exporters', array() );
|
$exporters = apply_filters( 'wp_privacy_personal_data_exporters', array() );
|
||||||
$is_last_exporter = $exporter_index === count( $exporters );
|
$is_last_exporter = $exporter_index === count( $exporters );
|
||||||
$exporter_done = $response['done'];
|
$exporter_done = $response['done'];
|
||||||
if ( ! $is_last_exporter || ! $exporter_done ) {
|
if ( ! $is_last_exporter || ! $exporter_done ) {
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
@ -2339,8 +2343,8 @@ function wp_privacy_process_personal_data_export_page( $response, $exporter_inde
|
|||||||
$groups[ $group_id ]['items'][ $item_id ] = array();
|
$groups[ $group_id ]['items'][ $item_id ] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$old_item_data = $groups[ $group_id ]['items'][ $item_id ];
|
$old_item_data = $groups[ $group_id ]['items'][ $item_id ];
|
||||||
$merged_item_data = array_merge( $export_datum['data'], $old_item_data );
|
$merged_item_data = array_merge( $export_datum['data'], $old_item_data );
|
||||||
$groups[ $group_id ]['items'][ $item_id ] = $merged_item_data;
|
$groups[ $group_id ]['items'][ $item_id ] = $merged_item_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ function wp_image_editor( $post_id, $msg = false ) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ( $can_restore ) { ?>
|
<?php if ( $can_restore ) { ?>
|
||||||
|
|
||||||
<div class="imgedit-group">
|
<div class="imgedit-group">
|
||||||
<div class="imgedit-group-top">
|
<div class="imgedit-group-top">
|
||||||
@ -103,7 +103,7 @@ function wp_image_editor( $post_id, $msg = false ) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="imgedit-group">
|
<div class="imgedit-group">
|
||||||
<div class="imgedit-group-top">
|
<div class="imgedit-group-top">
|
||||||
@ -152,7 +152,7 @@ function wp_image_editor( $post_id, $msg = false ) {
|
|||||||
<?php
|
<?php
|
||||||
if ( $thumb && $sub_sizes ) {
|
if ( $thumb && $sub_sizes ) {
|
||||||
$thumb_img = wp_constrain_dimensions( $thumb['width'], $thumb['height'], 160, 120 );
|
$thumb_img = wp_constrain_dimensions( $thumb['width'], $thumb['height'], 160, 120 );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="imgedit-group imgedit-applyto">
|
<div class="imgedit-group imgedit-applyto">
|
||||||
<div class="imgedit-group-top">
|
<div class="imgedit-group-top">
|
||||||
@ -203,13 +203,13 @@ function wp_image_editor( $post_id, $msg = false ) {
|
|||||||
)
|
)
|
||||||
) ) {
|
) ) {
|
||||||
$note_no_rotate = '';
|
$note_no_rotate = '';
|
||||||
?>
|
?>
|
||||||
<button type="button" class="imgedit-rleft button" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate counter-clockwise' ); ?></span></button>
|
<button type="button" class="imgedit-rleft button" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate counter-clockwise' ); ?></span></button>
|
||||||
<button type="button" class="imgedit-rright button" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate clockwise' ); ?></span></button>
|
<button type="button" class="imgedit-rright button" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate clockwise' ); ?></span></button>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
$note_no_rotate = '<p class="note-no-rotate"><em>' . __( 'Image rotation is not supported by your web host.' ) . '</em></p>';
|
$note_no_rotate = '<p class="note-no-rotate"><em>' . __( 'Image rotation is not supported by your web host.' ) . '</em></p>';
|
||||||
?>
|
?>
|
||||||
<button type="button" class="imgedit-rleft button disabled" disabled></button>
|
<button type="button" class="imgedit-rleft button disabled" disabled></button>
|
||||||
<button type="button" class="imgedit-rright button disabled" disabled></button>
|
<button type="button" class="imgedit-rright button disabled" disabled></button>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -243,7 +243,7 @@ function wp_image_editor( $post_id, $msg = false ) {
|
|||||||
<div class="imgedit-wait" id="imgedit-wait-<?php echo $post_id; ?>"></div>
|
<div class="imgedit-wait" id="imgedit-wait-<?php echo $post_id; ?>"></div>
|
||||||
<div class="hidden" id="imgedit-leaving-<?php echo $post_id; ?>"><?php _e( "There are unsaved changes that will be lost. 'OK' to continue, 'Cancel' to return to the Image Editor." ); ?></div>
|
<div class="hidden" id="imgedit-leaving-<?php echo $post_id; ?>"><?php _e( "There are unsaved changes that will be lost. 'OK' to continue, 'Cancel' to return to the Image Editor." ); ?></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -437,7 +437,7 @@ function wp_read_image_metadata( $file ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$exif = array();
|
$exif = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the image types to check for exif data.
|
* Filters the image types to check for exif data.
|
||||||
|
@ -141,7 +141,8 @@ function wp_get_popular_importers() {
|
|||||||
array(
|
array(
|
||||||
'locale' => $locale,
|
'locale' => $locale,
|
||||||
'version' => $wp_version,
|
'version' => $wp_version,
|
||||||
), 'http://api.wordpress.org/core/importers/1.1/'
|
),
|
||||||
|
'http://api.wordpress.org/core/importers/1.1/'
|
||||||
);
|
);
|
||||||
$options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ) );
|
$options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ) );
|
||||||
|
|
||||||
|
@ -263,12 +263,12 @@ function _cleanup_image_add_caption( $matches ) {
|
|||||||
* @param string $html
|
* @param string $html
|
||||||
*/
|
*/
|
||||||
function media_send_to_editor( $html ) {
|
function media_send_to_editor( $html ) {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var win = window.dialogArguments || opener || parent || top;
|
var win = window.dialogArguments || opener || parent || top;
|
||||||
win.send_to_editor( <?php echo wp_json_encode( $html ); ?> );
|
win.send_to_editor( <?php echo wp_json_encode( $html ); ?> );
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ function media_handle_upload( $file_id, $post_id, $post_data = array(), $overrid
|
|||||||
$content .= ' ' . sprintf( __( 'Genre: %s.' ), $meta['genre'] );
|
$content .= ' ' . sprintf( __( 'Genre: %s.' ), $meta['genre'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use image exif/iptc data for title and caption defaults if possible.
|
// Use image exif/iptc data for title and caption defaults if possible.
|
||||||
} elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = wp_read_image_metadata( $file ) ) {
|
} elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = wp_read_image_metadata( $file ) ) {
|
||||||
if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
|
if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) {
|
||||||
$title = $image_meta['title'];
|
$title = $image_meta['title'];
|
||||||
@ -388,7 +388,8 @@ function media_handle_upload( $file_id, $post_id, $post_data = array(), $overrid
|
|||||||
'post_title' => $title,
|
'post_title' => $title,
|
||||||
'post_content' => $content,
|
'post_content' => $content,
|
||||||
'post_excerpt' => $excerpt,
|
'post_excerpt' => $excerpt,
|
||||||
), $post_data
|
),
|
||||||
|
$post_data
|
||||||
);
|
);
|
||||||
|
|
||||||
// This should never be set as it would then overwrite an existing attachment.
|
// This should never be set as it would then overwrite an existing attachment.
|
||||||
@ -458,7 +459,8 @@ function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data
|
|||||||
'post_parent' => $post_id,
|
'post_parent' => $post_id,
|
||||||
'post_title' => $title,
|
'post_title' => $title,
|
||||||
'post_content' => $content,
|
'post_content' => $content,
|
||||||
), $post_data
|
),
|
||||||
|
$post_data
|
||||||
);
|
);
|
||||||
|
|
||||||
// This should never be set as it would then overwrite an existing attachment.
|
// This should never be set as it would then overwrite an existing attachment.
|
||||||
@ -484,24 +486,24 @@ function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data
|
|||||||
*/
|
*/
|
||||||
function wp_iframe( $content_func /* ... */ ) {
|
function wp_iframe( $content_func /* ... */ ) {
|
||||||
_wp_admin_html_begin();
|
_wp_admin_html_begin();
|
||||||
?>
|
?>
|
||||||
<title><?php bloginfo( 'name' ); ?> › <?php _e( 'Uploads' ); ?> — <?php _e( 'WordPress' ); ?></title>
|
<title><?php bloginfo( 'name' ); ?> › <?php _e( 'Uploads' ); ?> — <?php _e( 'WordPress' ); ?></title>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
wp_enqueue_style( 'colors' );
|
wp_enqueue_style( 'colors' );
|
||||||
// Check callback name for 'media'
|
// Check callback name for 'media'
|
||||||
if ( ( is_array( $content_func ) && ! empty( $content_func[1] ) && 0 === strpos( (string) $content_func[1], 'media' ) )
|
if ( ( is_array( $content_func ) && ! empty( $content_func[1] ) && 0 === strpos( (string) $content_func[1], 'media' ) )
|
||||||
|| ( ! is_array( $content_func ) && 0 === strpos( $content_func, 'media' ) ) ) {
|
|| ( ! is_array( $content_func ) && 0 === strpos( $content_func, 'media' ) ) ) {
|
||||||
wp_enqueue_style( 'deprecated-media' );
|
wp_enqueue_style( 'deprecated-media' );
|
||||||
}
|
}
|
||||||
wp_enqueue_style( 'ie' );
|
wp_enqueue_style( 'ie' );
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||||
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
|
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
|
||||||
isRtl = <?php echo (int) is_rtl(); ?>;
|
isRtl = <?php echo (int) is_rtl(); ?>;
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
/** This action is documented in wp-admin/admin-header.php */
|
/** This action is documented in wp-admin/admin-header.php */
|
||||||
do_action( 'admin_enqueue_scripts', 'media-upload-popup' );
|
do_action( 'admin_enqueue_scripts', 'media-upload-popup' );
|
||||||
|
|
||||||
@ -536,43 +538,43 @@ isRtl = <?php echo (int) is_rtl(); ?>;
|
|||||||
/** This action is documented in wp-admin/admin-header.php */
|
/** This action is documented in wp-admin/admin-header.php */
|
||||||
do_action( 'admin_head' );
|
do_action( 'admin_head' );
|
||||||
|
|
||||||
if ( is_string( $content_func ) ) {
|
if ( is_string( $content_func ) ) {
|
||||||
/**
|
/**
|
||||||
* Fires in the admin header for each specific form tab in the legacy
|
* Fires in the admin header for each specific form tab in the legacy
|
||||||
* (pre-3.5.0) media upload popup.
|
* (pre-3.5.0) media upload popup.
|
||||||
*
|
*
|
||||||
* The dynamic portion of the hook, `$content_func`, refers to the form
|
* The dynamic portion of the hook, `$content_func`, refers to the form
|
||||||
* callback for the media upload type. Possible values include
|
* callback for the media upload type. Possible values include
|
||||||
* 'media_upload_type_form', 'media_upload_type_url_form', and
|
* 'media_upload_type_form', 'media_upload_type_url_form', and
|
||||||
* 'media_upload_library_form'.
|
* 'media_upload_library_form'.
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
*/
|
*/
|
||||||
do_action( "admin_head_{$content_func}" );
|
do_action( "admin_head_{$content_func}" );
|
||||||
}
|
}
|
||||||
|
|
||||||
$body_id_attr = '';
|
$body_id_attr = '';
|
||||||
if ( isset( $GLOBALS['body_id'] ) ) {
|
if ( isset( $GLOBALS['body_id'] ) ) {
|
||||||
$body_id_attr = ' id="' . $GLOBALS['body_id'] . '"';
|
$body_id_attr = ' id="' . $GLOBALS['body_id'] . '"';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</head>
|
</head>
|
||||||
<body<?php echo $body_id_attr; ?> class="wp-core-ui no-js">
|
<body<?php echo $body_id_attr; ?> class="wp-core-ui no-js">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.body.className = document.body.className.replace('no-js', 'js');
|
document.body.className = document.body.className.replace('no-js', 'js');
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$args = array_slice( $args, 1 );
|
$args = array_slice( $args, 1 );
|
||||||
call_user_func_array( $content_func, $args );
|
call_user_func_array( $content_func, $args );
|
||||||
|
|
||||||
/** This action is documented in wp-admin/admin-footer.php */
|
/** This action is documented in wp-admin/admin-footer.php */
|
||||||
do_action( 'admin_print_footer_scripts' );
|
do_action( 'admin_print_footer_scripts' );
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
|
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -754,7 +756,7 @@ function media_upload_form_handler() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( isset( $_POST['insert-gallery'] ) || isset( $_POST['update-gallery'] ) ) {
|
if ( isset( $_POST['insert-gallery'] ) || isset( $_POST['update-gallery'] ) ) {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var win = window.dialogArguments || opener || parent || top;
|
var win = window.dialogArguments || opener || parent || top;
|
||||||
win.tb_remove();
|
win.tb_remove();
|
||||||
@ -1069,7 +1071,8 @@ function image_size_input_fields( $post, $check = '' ) {
|
|||||||
* include 'Thumbnail', 'Medium', 'Large', 'Full Size'.
|
* include 'Thumbnail', 'Medium', 'Large', 'Full Size'.
|
||||||
*/
|
*/
|
||||||
$size_names = apply_filters(
|
$size_names = apply_filters(
|
||||||
'image_size_names_choose', array(
|
'image_size_names_choose',
|
||||||
|
array(
|
||||||
'thumbnail' => __( 'Thumbnail' ),
|
'thumbnail' => __( 'Thumbnail' ),
|
||||||
'medium' => __( 'Medium' ),
|
'medium' => __( 'Medium' ),
|
||||||
'large' => __( 'Large' ),
|
'large' => __( 'Large' ),
|
||||||
@ -1781,9 +1784,15 @@ function get_compat_media_markup( $attachment_id, $args = null ) {
|
|||||||
$form_fields = apply_filters( 'attachment_fields_to_edit', $form_fields, $post );
|
$form_fields = apply_filters( 'attachment_fields_to_edit', $form_fields, $post );
|
||||||
|
|
||||||
unset(
|
unset(
|
||||||
$form_fields['image-size'], $form_fields['align'], $form_fields['image_alt'],
|
$form_fields['image-size'],
|
||||||
$form_fields['post_title'], $form_fields['post_excerpt'], $form_fields['post_content'],
|
$form_fields['align'],
|
||||||
$form_fields['url'], $form_fields['menu_order'], $form_fields['image_url']
|
$form_fields['image_alt'],
|
||||||
|
$form_fields['post_title'],
|
||||||
|
$form_fields['post_excerpt'],
|
||||||
|
$form_fields['post_content'],
|
||||||
|
$form_fields['url'],
|
||||||
|
$form_fields['menu_order'],
|
||||||
|
$form_fields['image_url']
|
||||||
);
|
);
|
||||||
|
|
||||||
/** This filter is documented in wp-admin/includes/media.php */
|
/** This filter is documented in wp-admin/includes/media.php */
|
||||||
@ -1943,123 +1952,123 @@ function media_upload_form( $errors = null ) {
|
|||||||
if ( ! $max_upload_size ) {
|
if ( ! $max_upload_size ) {
|
||||||
$max_upload_size = 0;
|
$max_upload_size = 0;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="media-upload-notice">
|
<div id="media-upload-notice">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( isset( $errors['upload_notice'] ) ) {
|
if ( isset( $errors['upload_notice'] ) ) {
|
||||||
echo $errors['upload_notice'];
|
echo $errors['upload_notice'];
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div id="media-upload-error">
|
<div id="media-upload-error">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( isset( $errors['upload_error'] ) && is_wp_error( $errors['upload_error'] ) ) {
|
if ( isset( $errors['upload_error'] ) && is_wp_error( $errors['upload_error'] ) ) {
|
||||||
echo $errors['upload_error']->get_error_message();
|
echo $errors['upload_error']->get_error_message();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if ( is_multisite() && ! is_upload_space_available() ) {
|
if ( is_multisite() && ! is_upload_space_available() ) {
|
||||||
|
/**
|
||||||
|
* Fires when an upload will exceed the defined upload space quota for a network site.
|
||||||
|
*
|
||||||
|
* @since 3.5.0
|
||||||
|
*/
|
||||||
|
do_action( 'upload_ui_over_quota' );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires when an upload will exceed the defined upload space quota for a network site.
|
* Fires just before the legacy (pre-3.5.0) upload interface is loaded.
|
||||||
*
|
*
|
||||||
* @since 3.5.0
|
* @since 2.6.0
|
||||||
*/
|
*/
|
||||||
do_action( 'upload_ui_over_quota' );
|
do_action( 'pre-upload-ui' );
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
$post_params = array(
|
||||||
* Fires just before the legacy (pre-3.5.0) upload interface is loaded.
|
'post_id' => $post_id,
|
||||||
*
|
'_wpnonce' => wp_create_nonce( 'media-form' ),
|
||||||
* @since 2.6.0
|
'type' => $_type,
|
||||||
*/
|
'tab' => $_tab,
|
||||||
do_action( 'pre-upload-ui' );
|
'short' => '1',
|
||||||
|
);
|
||||||
|
|
||||||
$post_params = array(
|
/**
|
||||||
'post_id' => $post_id,
|
* Filters the media upload post parameters.
|
||||||
'_wpnonce' => wp_create_nonce( 'media-form' ),
|
*
|
||||||
'type' => $_type,
|
* @since 3.1.0 As 'swfupload_post_params'
|
||||||
'tab' => $_tab,
|
* @since 3.3.0
|
||||||
'short' => '1',
|
*
|
||||||
);
|
* @param array $post_params An array of media upload parameters used by Plupload.
|
||||||
|
*/
|
||||||
|
$post_params = apply_filters( 'upload_post_params', $post_params );
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Filters the media upload post parameters.
|
* Since 4.9 the `runtimes` setting is hardcoded in our version of Plupload to `html5,html4`,
|
||||||
*
|
* and the `flash_swf_url` and `silverlight_xap_url` are not used.
|
||||||
* @since 3.1.0 As 'swfupload_post_params'
|
*/
|
||||||
* @since 3.3.0
|
$plupload_init = array(
|
||||||
*
|
'browse_button' => 'plupload-browse-button',
|
||||||
* @param array $post_params An array of media upload parameters used by Plupload.
|
'container' => 'plupload-upload-ui',
|
||||||
*/
|
'drop_element' => 'drag-drop-area',
|
||||||
$post_params = apply_filters( 'upload_post_params', $post_params );
|
'file_data_name' => 'async-upload',
|
||||||
|
'url' => $upload_action_url,
|
||||||
|
'filters' => array(
|
||||||
|
'max_file_size' => $max_upload_size . 'b',
|
||||||
|
),
|
||||||
|
'multipart_params' => $post_params,
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
// Currently only iOS Safari supports multiple files uploading but iOS 7.x has a bug that prevents uploading of videos
|
||||||
* Since 4.9 the `runtimes` setting is hardcoded in our version of Plupload to `html5,html4`,
|
// when enabled. See #29602.
|
||||||
* and the `flash_swf_url` and `silverlight_xap_url` are not used.
|
if ( wp_is_mobile() && strpos( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) !== false &&
|
||||||
*/
|
|
||||||
$plupload_init = array(
|
|
||||||
'browse_button' => 'plupload-browse-button',
|
|
||||||
'container' => 'plupload-upload-ui',
|
|
||||||
'drop_element' => 'drag-drop-area',
|
|
||||||
'file_data_name' => 'async-upload',
|
|
||||||
'url' => $upload_action_url,
|
|
||||||
'filters' => array(
|
|
||||||
'max_file_size' => $max_upload_size . 'b',
|
|
||||||
),
|
|
||||||
'multipart_params' => $post_params,
|
|
||||||
);
|
|
||||||
|
|
||||||
// Currently only iOS Safari supports multiple files uploading but iOS 7.x has a bug that prevents uploading of videos
|
|
||||||
// when enabled. See #29602.
|
|
||||||
if ( wp_is_mobile() && strpos( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) !== false &&
|
|
||||||
strpos( $_SERVER['HTTP_USER_AGENT'], 'like Mac OS X' ) !== false ) {
|
strpos( $_SERVER['HTTP_USER_AGENT'], 'like Mac OS X' ) !== false ) {
|
||||||
|
|
||||||
$plupload_init['multi_selection'] = false;
|
$plupload_init['multi_selection'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the default Plupload settings.
|
* Filters the default Plupload settings.
|
||||||
*
|
*
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*
|
*
|
||||||
* @param array $plupload_init An array of default settings used by Plupload.
|
* @param array $plupload_init An array of default settings used by Plupload.
|
||||||
*/
|
*/
|
||||||
$plupload_init = apply_filters( 'plupload_init', $plupload_init );
|
$plupload_init = apply_filters( 'plupload_init', $plupload_init );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<?php
|
<?php
|
||||||
// Verify size is an int. If not return default value.
|
// Verify size is an int. If not return default value.
|
||||||
$large_size_h = absint( get_option( 'large_size_h' ) );
|
$large_size_h = absint( get_option( 'large_size_h' ) );
|
||||||
if ( ! $large_size_h ) {
|
if ( ! $large_size_h ) {
|
||||||
$large_size_h = 1024;
|
$large_size_h = 1024;
|
||||||
}
|
}
|
||||||
$large_size_w = absint( get_option( 'large_size_w' ) );
|
$large_size_w = absint( get_option( 'large_size_w' ) );
|
||||||
if ( ! $large_size_w ) {
|
if ( ! $large_size_w ) {
|
||||||
$large_size_w = 1024;
|
$large_size_w = 1024;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
var resize_height = <?php echo $large_size_h; ?>, resize_width = <?php echo $large_size_w; ?>,
|
var resize_height = <?php echo $large_size_h; ?>, resize_width = <?php echo $large_size_w; ?>,
|
||||||
wpUploaderInit = <?php echo wp_json_encode( $plupload_init ); ?>;
|
wpUploaderInit = <?php echo wp_json_encode( $plupload_init ); ?>;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="plupload-upload-ui" class="hide-if-no-js">
|
<div id="plupload-upload-ui" class="hide-if-no-js">
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires before the upload interface loads.
|
* Fires before the upload interface loads.
|
||||||
*
|
*
|
||||||
* @since 2.6.0 As 'pre-flash-upload-ui'
|
* @since 2.6.0 As 'pre-flash-upload-ui'
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
do_action( 'pre-plupload-upload-ui' );
|
do_action( 'pre-plupload-upload-ui' );
|
||||||
?>
|
?>
|
||||||
<div id="drag-drop-area">
|
<div id="drag-drop-area">
|
||||||
<div class="drag-drop-inside">
|
<div class="drag-drop-inside">
|
||||||
<p class="drag-drop-info"><?php _e( 'Drop files here' ); ?></p>
|
<p class="drag-drop-info"><?php _e( 'Drop files here' ); ?></p>
|
||||||
@ -2067,15 +2076,15 @@ do_action( 'pre-plupload-upload-ui' );
|
|||||||
<p class="drag-drop-buttons"><input id="plupload-browse-button" type="button" value="<?php esc_attr_e( 'Select Files' ); ?>" class="button" /></p>
|
<p class="drag-drop-buttons"><input id="plupload-browse-button" type="button" value="<?php esc_attr_e( 'Select Files' ); ?>" class="button" /></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires after the upload interface loads.
|
* Fires after the upload interface loads.
|
||||||
*
|
*
|
||||||
* @since 2.6.0 As 'post-flash-upload-ui'
|
* @since 2.6.0 As 'post-flash-upload-ui'
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*/
|
*/
|
||||||
do_action( 'post-plupload-upload-ui' );
|
do_action( 'post-plupload-upload-ui' );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="html-upload-ui" class="hide-if-js">
|
<div id="html-upload-ui" class="hide-if-js">
|
||||||
@ -2094,18 +2103,18 @@ do_action( 'post-plupload-upload-ui' );
|
|||||||
<a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e( 'Cancel' ); ?></a>
|
<a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e( 'Cancel' ); ?></a>
|
||||||
</p>
|
</p>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires after the upload button in the media upload interface.
|
* Fires after the upload button in the media upload interface.
|
||||||
*
|
*
|
||||||
* @since 2.6.0
|
* @since 2.6.0
|
||||||
*/
|
*/
|
||||||
do_action( 'post-html-upload-ui' );
|
do_action( 'post-html-upload-ui' );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="max-upload-size"><?php printf( __( 'Maximum upload file size: %s.' ), esc_html( size_format( $max_upload_size ) ) ); ?></p>
|
<p class="max-upload-size"><?php printf( __( 'Maximum upload file size: %s.' ), esc_html( size_format( $max_upload_size ) ) ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires on the post upload UI screen.
|
* Fires on the post upload UI screen.
|
||||||
@ -2148,16 +2157,16 @@ function media_upload_type_form( $type = 'file', $errors = null, $id = null ) {
|
|||||||
if ( get_user_setting( 'uploader' ) ) {
|
if ( get_user_setting( 'uploader' ) ) {
|
||||||
$form_class .= ' html-uploader';
|
$form_class .= ' html-uploader';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="<?php echo $type; ?>-form">
|
<form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="<?php echo $type; ?>-form">
|
||||||
<?php submit_button( '', 'hidden', 'save', false ); ?>
|
<?php submit_button( '', 'hidden', 'save', false ); ?>
|
||||||
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
|
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
|
||||||
<?php wp_nonce_field( 'media-form' ); ?>
|
<?php wp_nonce_field( 'media-form' ); ?>
|
||||||
|
|
||||||
<h3 class="media-title"><?php _e( 'Add media files from your computer' ); ?></h3>
|
<h3 class="media-title"><?php _e( 'Add media files from your computer' ); ?></h3>
|
||||||
|
|
||||||
<?php media_upload_form( $errors ); ?>
|
<?php media_upload_form( $errors ); ?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
@ -2169,25 +2178,25 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<div id="media-items">
|
<div id="media-items">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( $id ) {
|
if ( $id ) {
|
||||||
if ( ! is_wp_error( $id ) ) {
|
if ( ! is_wp_error( $id ) ) {
|
||||||
add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 );
|
add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 );
|
||||||
echo get_media_items( $id, $errors );
|
echo get_media_items( $id, $errors );
|
||||||
} else {
|
} else {
|
||||||
echo '<div id="media-upload-error">' . esc_html( $id->get_error_message() ) . '</div></div>';
|
echo '<div id="media-upload-error">' . esc_html( $id->get_error_message() ) . '</div></div>';
|
||||||
exit;
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="savebutton ml-submit">
|
<p class="savebutton ml-submit">
|
||||||
<?php submit_button( __( 'Save all changes' ), '', 'save', false ); ?>
|
<?php submit_button( __( 'Save all changes' ), '', 'save', false ); ?>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2216,11 +2225,11 @@ function media_upload_type_url_form( $type = null, $errors = null, $id = null )
|
|||||||
if ( get_user_setting( 'uploader' ) ) {
|
if ( get_user_setting( 'uploader' ) ) {
|
||||||
$form_class .= ' html-uploader';
|
$form_class .= ' html-uploader';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="<?php echo $type; ?>-form">
|
<form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="<?php echo $type; ?>-form">
|
||||||
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
|
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
|
||||||
<?php wp_nonce_field( 'media-form' ); ?>
|
<?php wp_nonce_field( 'media-form' ); ?>
|
||||||
|
|
||||||
<h3 class="media-title"><?php _e( 'Insert media from another website' ); ?></h3>
|
<h3 class="media-title"><?php _e( 'Insert media from another website' ); ?></h3>
|
||||||
|
|
||||||
@ -2240,10 +2249,10 @@ var addExtImage = {
|
|||||||
if ( f.alt.value )
|
if ( f.alt.value )
|
||||||
alt = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>');
|
alt = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>');
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/** This filter is documented in wp-admin/includes/media.php */
|
/** This filter is documented in wp-admin/includes/media.php */
|
||||||
if ( ! apply_filters( 'disable_captions', '' ) ) {
|
if ( ! apply_filters( 'disable_captions', '' ) ) {
|
||||||
?>
|
?>
|
||||||
if ( f.caption.value ) {
|
if ( f.caption.value ) {
|
||||||
caption = f.caption.value.replace(/\r\n|\r/g, '\n');
|
caption = f.caption.value.replace(/\r\n|\r/g, '\n');
|
||||||
caption = caption.replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){
|
caption = caption.replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){
|
||||||
@ -2252,7 +2261,7 @@ if ( ! apply_filters( 'disable_captions', '' ) ) {
|
|||||||
|
|
||||||
caption = caption.replace(/\s*\n\s*/g, '<br />');
|
caption = caption.replace(/\s*\n\s*/g, '<br />');
|
||||||
}
|
}
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
cls = caption ? '' : ' class="'+t.align+'"';
|
cls = caption ? '' : ' class="'+t.align+'"';
|
||||||
|
|
||||||
@ -2318,20 +2327,20 @@ jQuery(document).ready( function($) {
|
|||||||
|
|
||||||
<div id="media-items">
|
<div id="media-items">
|
||||||
<div class="media-item media-blank">
|
<div class="media-item media-blank">
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Filters the insert media from URL form HTML.
|
* Filters the insert media from URL form HTML.
|
||||||
*
|
*
|
||||||
* @since 3.3.0
|
* @since 3.3.0
|
||||||
*
|
*
|
||||||
* @param string $form_html The insert from URL form HTML.
|
* @param string $form_html The insert from URL form HTML.
|
||||||
*/
|
*/
|
||||||
echo apply_filters( 'type_url_form_media', wp_media_insert_url_form( $type ) );
|
echo apply_filters( 'type_url_form_media', wp_media_insert_url_form( $type ) );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2360,7 +2369,7 @@ function media_upload_gallery_form( $errors ) {
|
|||||||
if ( get_user_setting( 'uploader' ) ) {
|
if ( get_user_setting( 'uploader' ) ) {
|
||||||
$form_class .= ' html-uploader';
|
$form_class .= ' html-uploader';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
@ -2373,18 +2382,18 @@ jQuery(function($){
|
|||||||
</script>
|
</script>
|
||||||
<div id="sort-buttons" class="hide-if-no-js">
|
<div id="sort-buttons" class="hide-if-no-js">
|
||||||
<span>
|
<span>
|
||||||
<?php _e( 'All Tabs:' ); ?>
|
<?php _e( 'All Tabs:' ); ?>
|
||||||
<a href="#" id="showall"><?php _e( 'Show' ); ?></a>
|
<a href="#" id="showall"><?php _e( 'Show' ); ?></a>
|
||||||
<a href="#" id="hideall" style="display:none;"><?php _e( 'Hide' ); ?></a>
|
<a href="#" id="hideall" style="display:none;"><?php _e( 'Hide' ); ?></a>
|
||||||
</span>
|
</span>
|
||||||
<?php _e( 'Sort Order:' ); ?>
|
<?php _e( 'Sort Order:' ); ?>
|
||||||
<a href="#" id="asc"><?php _e( 'Ascending' ); ?></a> |
|
<a href="#" id="asc"><?php _e( 'Ascending' ); ?></a> |
|
||||||
<a href="#" id="desc"><?php _e( 'Descending' ); ?></a> |
|
<a href="#" id="desc"><?php _e( 'Descending' ); ?></a> |
|
||||||
<a href="#" id="clear"><?php _ex( 'Clear', 'verb' ); ?></a>
|
<a href="#" id="clear"><?php _ex( 'Clear', 'verb' ); ?></a>
|
||||||
</div>
|
</div>
|
||||||
<form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="gallery-form">
|
<form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="gallery-form">
|
||||||
<?php wp_nonce_field( 'media-form' ); ?>
|
<?php wp_nonce_field( 'media-form' ); ?>
|
||||||
<?php //media_upload_form( $errors ); ?>
|
<?php //media_upload_form( $errors ); ?>
|
||||||
<table class="widefat">
|
<table class="widefat">
|
||||||
<thead><tr>
|
<thead><tr>
|
||||||
<th><?php _e( 'Media' ); ?></th>
|
<th><?php _e( 'Media' ); ?></th>
|
||||||
@ -2393,19 +2402,23 @@ jQuery(function($){
|
|||||||
</tr></thead>
|
</tr></thead>
|
||||||
</table>
|
</table>
|
||||||
<div id="media-items">
|
<div id="media-items">
|
||||||
<?php add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 ); ?>
|
<?php add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 ); ?>
|
||||||
<?php echo get_media_items( $post_id, $errors ); ?>
|
<?php echo get_media_items( $post_id, $errors ); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="ml-submit">
|
<p class="ml-submit">
|
||||||
<?php
|
<?php
|
||||||
submit_button(
|
submit_button(
|
||||||
__( 'Save all changes' ), 'savebutton', 'save', false, array(
|
__( 'Save all changes' ),
|
||||||
'id' => 'save-all',
|
'savebutton',
|
||||||
'style' => 'display: none;',
|
'save',
|
||||||
)
|
false,
|
||||||
);
|
array(
|
||||||
?>
|
'id' => 'save-all',
|
||||||
|
'style' => 'display: none;',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
|
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
|
||||||
<input type="hidden" name="type" value="<?php echo esc_attr( $GLOBALS['type'] ); ?>" />
|
<input type="hidden" name="type" value="<?php echo esc_attr( $GLOBALS['type'] ); ?>" />
|
||||||
<input type="hidden" name="tab" value="<?php echo esc_attr( $GLOBALS['tab'] ); ?>" />
|
<input type="hidden" name="tab" value="<?php echo esc_attr( $GLOBALS['tab'] ); ?>" />
|
||||||
@ -2488,7 +2501,7 @@ submit_button(
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2534,7 +2547,7 @@ function media_upload_library_form( $errors ) {
|
|||||||
|
|
||||||
list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query( $q );
|
list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query( $q );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form id="filter" method="get">
|
<form id="filter" method="get">
|
||||||
<input type="hidden" name="type" value="<?php echo esc_attr( $type ); ?>" />
|
<input type="hidden" name="type" value="<?php echo esc_attr( $type ); ?>" />
|
||||||
@ -2550,127 +2563,127 @@ function media_upload_library_form( $errors ) {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul class="subsubsub">
|
<ul class="subsubsub">
|
||||||
<?php
|
<?php
|
||||||
$type_links = array();
|
$type_links = array();
|
||||||
$_num_posts = (array) wp_count_attachments();
|
$_num_posts = (array) wp_count_attachments();
|
||||||
$matches = wp_match_mime_types( array_keys( $post_mime_types ), array_keys( $_num_posts ) );
|
$matches = wp_match_mime_types( array_keys( $post_mime_types ), array_keys( $_num_posts ) );
|
||||||
foreach ( $matches as $_type => $reals ) {
|
foreach ( $matches as $_type => $reals ) {
|
||||||
foreach ( $reals as $real ) {
|
foreach ( $reals as $real ) {
|
||||||
if ( isset( $num_posts[ $_type ] ) ) {
|
if ( isset( $num_posts[ $_type ] ) ) {
|
||||||
$num_posts[ $_type ] += $_num_posts[ $real ];
|
$num_posts[ $_type ] += $_num_posts[ $real ];
|
||||||
} else {
|
} else {
|
||||||
$num_posts[ $_type ] = $_num_posts[ $real ];
|
$num_posts[ $_type ] = $_num_posts[ $real ];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
// If available type specified by media button clicked, filter by that type
|
||||||
// If available type specified by media button clicked, filter by that type
|
if ( empty( $_GET['post_mime_type'] ) && ! empty( $num_posts[ $type ] ) ) {
|
||||||
if ( empty( $_GET['post_mime_type'] ) && ! empty( $num_posts[ $type ] ) ) {
|
$_GET['post_mime_type'] = $type;
|
||||||
$_GET['post_mime_type'] = $type;
|
list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
|
||||||
list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query();
|
|
||||||
}
|
|
||||||
if ( empty( $_GET['post_mime_type'] ) || $_GET['post_mime_type'] == 'all' ) {
|
|
||||||
$class = ' class="current"';
|
|
||||||
} else {
|
|
||||||
$class = '';
|
|
||||||
}
|
|
||||||
$type_links[] = '<li><a href="' . esc_url(
|
|
||||||
add_query_arg(
|
|
||||||
array(
|
|
||||||
'post_mime_type' => 'all',
|
|
||||||
'paged' => false,
|
|
||||||
'm' => false,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
) . '"' . $class . '>' . __( 'All Types' ) . '</a>';
|
|
||||||
foreach ( $post_mime_types as $mime_type => $label ) {
|
|
||||||
$class = '';
|
|
||||||
|
|
||||||
if ( ! wp_match_mime_types( $mime_type, $avail_post_mime_types ) ) {
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
if ( empty( $_GET['post_mime_type'] ) || $_GET['post_mime_type'] == 'all' ) {
|
||||||
if ( isset( $_GET['post_mime_type'] ) && wp_match_mime_types( $mime_type, $_GET['post_mime_type'] ) ) {
|
|
||||||
$class = ' class="current"';
|
$class = ' class="current"';
|
||||||
|
} else {
|
||||||
|
$class = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$type_links[] = '<li><a href="' . esc_url(
|
$type_links[] = '<li><a href="' . esc_url(
|
||||||
add_query_arg(
|
add_query_arg(
|
||||||
array(
|
array(
|
||||||
'post_mime_type' => $mime_type,
|
'post_mime_type' => 'all',
|
||||||
'paged' => false,
|
'paged' => false,
|
||||||
|
'm' => false,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) . '"' . $class . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[ $mime_type ] ), '<span id="' . $mime_type . '-counter">' . number_format_i18n( $num_posts[ $mime_type ] ) . '</span>' ) . '</a>';
|
) . '"' . $class . '>' . __( 'All Types' ) . '</a>';
|
||||||
}
|
foreach ( $post_mime_types as $mime_type => $label ) {
|
||||||
/**
|
$class = '';
|
||||||
* Filters the media upload mime type list items.
|
|
||||||
*
|
if ( ! wp_match_mime_types( $mime_type, $avail_post_mime_types ) ) {
|
||||||
* Returned values should begin with an `<li>` tag.
|
continue;
|
||||||
*
|
}
|
||||||
* @since 3.1.0
|
|
||||||
*
|
if ( isset( $_GET['post_mime_type'] ) && wp_match_mime_types( $mime_type, $_GET['post_mime_type'] ) ) {
|
||||||
* @param string[] $type_links An array of list items containing mime type link HTML.
|
$class = ' class="current"';
|
||||||
*/
|
}
|
||||||
echo implode( ' | </li>', apply_filters( 'media_upload_mime_type_links', $type_links ) ) . '</li>';
|
|
||||||
unset( $type_links );
|
$type_links[] = '<li><a href="' . esc_url(
|
||||||
?>
|
add_query_arg(
|
||||||
|
array(
|
||||||
|
'post_mime_type' => $mime_type,
|
||||||
|
'paged' => false,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) . '"' . $class . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[ $mime_type ] ), '<span id="' . $mime_type . '-counter">' . number_format_i18n( $num_posts[ $mime_type ] ) . '</span>' ) . '</a>';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Filters the media upload mime type list items.
|
||||||
|
*
|
||||||
|
* Returned values should begin with an `<li>` tag.
|
||||||
|
*
|
||||||
|
* @since 3.1.0
|
||||||
|
*
|
||||||
|
* @param string[] $type_links An array of list items containing mime type link HTML.
|
||||||
|
*/
|
||||||
|
echo implode( ' | </li>', apply_filters( 'media_upload_mime_type_links', $type_links ) ) . '</li>';
|
||||||
|
unset( $type_links );
|
||||||
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tablenav">
|
<div class="tablenav">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$page_links = paginate_links(
|
$page_links = paginate_links(
|
||||||
array(
|
array(
|
||||||
'base' => add_query_arg( 'paged', '%#%' ),
|
'base' => add_query_arg( 'paged', '%#%' ),
|
||||||
'format' => '',
|
'format' => '',
|
||||||
'prev_text' => __( '«' ),
|
'prev_text' => __( '«' ),
|
||||||
'next_text' => __( '»' ),
|
'next_text' => __( '»' ),
|
||||||
'total' => ceil( $wp_query->found_posts / 10 ),
|
'total' => ceil( $wp_query->found_posts / 10 ),
|
||||||
'current' => $q['paged'],
|
'current' => $q['paged'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $page_links ) {
|
if ( $page_links ) {
|
||||||
echo "<div class='tablenav-pages'>$page_links</div>";
|
echo "<div class='tablenav-pages'>$page_links</div>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="alignleft actions">
|
<div class="alignleft actions">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'attachment' ORDER BY post_date DESC";
|
$arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'attachment' ORDER BY post_date DESC";
|
||||||
|
|
||||||
$arc_result = $wpdb->get_results( $arc_query );
|
$arc_result = $wpdb->get_results( $arc_query );
|
||||||
|
|
||||||
$month_count = count( $arc_result );
|
$month_count = count( $arc_result );
|
||||||
$selected_month = isset( $_GET['m'] ) ? $_GET['m'] : 0;
|
$selected_month = isset( $_GET['m'] ) ? $_GET['m'] : 0;
|
||||||
|
|
||||||
if ( $month_count && ! ( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) {
|
if ( $month_count && ! ( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) {
|
||||||
?>
|
?>
|
||||||
<select name='m'>
|
<select name='m'>
|
||||||
<option<?php selected( $selected_month, 0 ); ?> value='0'><?php _e( 'All dates' ); ?></option>
|
<option<?php selected( $selected_month, 0 ); ?> value='0'><?php _e( 'All dates' ); ?></option>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $arc_result as $arc_row ) {
|
foreach ( $arc_result as $arc_row ) {
|
||||||
if ( $arc_row->yyear == 0 ) {
|
if ( $arc_row->yyear == 0 ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
|
$arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
|
||||||
|
|
||||||
if ( $arc_row->yyear . $arc_row->mmonth == $selected_month ) {
|
if ( $arc_row->yyear . $arc_row->mmonth == $selected_month ) {
|
||||||
$default = ' selected="selected"';
|
$default = ' selected="selected"';
|
||||||
} else {
|
} else {
|
||||||
$default = '';
|
$default = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<option$default value='" . esc_attr( $arc_row->yyear . $arc_row->mmonth ) . "'>";
|
echo "<option$default value='" . esc_attr( $arc_row->yyear . $arc_row->mmonth ) . "'>";
|
||||||
echo esc_html( $wp_locale->get_month( $arc_row->mmonth ) . " $arc_row->yyear" );
|
echo esc_html( $wp_locale->get_month( $arc_row->mmonth ) . " $arc_row->yyear" );
|
||||||
echo "</option>\n";
|
echo "</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php submit_button( __( 'Filter »' ), '', 'post-query-submit', false ); ?>
|
<?php submit_button( __( 'Filter »' ), '', 'post-query-submit', false ); ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -2680,8 +2693,8 @@ foreach ( $arc_result as $arc_row ) {
|
|||||||
|
|
||||||
<form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="library-form">
|
<form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="library-form">
|
||||||
|
|
||||||
<?php wp_nonce_field( 'media-form' ); ?>
|
<?php wp_nonce_field( 'media-form' ); ?>
|
||||||
<?php //media_upload_form( $errors ); ?>
|
<?php //media_upload_form( $errors ); ?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<!--
|
<!--
|
||||||
@ -2696,15 +2709,15 @@ jQuery(function($){
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="media-items">
|
<div id="media-items">
|
||||||
<?php add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 ); ?>
|
<?php add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 ); ?>
|
||||||
<?php echo get_media_items( null, $errors ); ?>
|
<?php echo get_media_items( null, $errors ); ?>
|
||||||
</div>
|
</div>
|
||||||
<p class="ml-submit">
|
<p class="ml-submit">
|
||||||
<?php submit_button( __( 'Save all changes' ), 'savebutton', 'save', false ); ?>
|
<?php submit_button( __( 'Save all changes' ), 'savebutton', 'save', false ); ?>
|
||||||
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
|
<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2868,15 +2881,15 @@ function media_upload_max_image_resize() {
|
|||||||
$a = '<a href="' . esc_url( admin_url( 'options-media.php' ) ) . '" target="_blank">';
|
$a = '<a href="' . esc_url( admin_url( 'options-media.php' ) ) . '" target="_blank">';
|
||||||
$end = '</a>';
|
$end = '</a>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p class="hide-if-no-js"><label>
|
<p class="hide-if-no-js"><label>
|
||||||
<input name="image_resize" type="checkbox" id="image_resize" value="true"<?php echo $checked; ?> />
|
<input name="image_resize" type="checkbox" id="image_resize" value="true"<?php echo $checked; ?> />
|
||||||
<?php
|
<?php
|
||||||
/* translators: 1: link start tag, 2: link end tag, 3: width, 4: height */
|
/* translators: 1: link start tag, 2: link end tag, 3: width, 4: height */
|
||||||
printf( __( 'Scale images to match the large size selected in %1$simage options%2$s (%3$d × %4$d).' ), $a, $end, (int) get_option( 'large_size_w', '1024' ), (int) get_option( 'large_size_h', '1024' ) );
|
printf( __( 'Scale images to match the large size selected in %1$simage options%2$s (%3$d × %4$d).' ), $a, $end, (int) get_option( 'large_size_w', '1024' ), (int) get_option( 'large_size_h', '1024' ) );
|
||||||
?>
|
?>
|
||||||
</label></p>
|
</label></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2925,7 +2938,7 @@ function edit_form_image_editor( $post ) {
|
|||||||
} else {
|
} else {
|
||||||
$not_open_style = ' style="display:none"';
|
$not_open_style = ' style="display:none"';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="imgedit-response" id="imgedit-response-<?php echo $attachment_id; ?>"></div>
|
<div class="imgedit-response" id="imgedit-response-<?php echo $attachment_id; ?>"></div>
|
||||||
|
|
||||||
@ -2937,9 +2950,9 @@ function edit_form_image_editor( $post ) {
|
|||||||
<?php
|
<?php
|
||||||
if ( $open ) {
|
if ( $open ) {
|
||||||
wp_image_editor( $attachment_id );}
|
wp_image_editor( $attachment_id );}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
elseif ( $attachment_id && wp_attachment_is( 'audio', $post ) ) :
|
elseif ( $attachment_id && wp_attachment_is( 'audio', $post ) ) :
|
||||||
|
|
||||||
wp_maybe_generate_attachment_metadata( $post );
|
wp_maybe_generate_attachment_metadata( $post );
|
||||||
@ -3024,7 +3037,7 @@ function edit_form_image_editor( $post ) {
|
|||||||
if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) {
|
if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) {
|
||||||
echo ': ' . __( 'Displayed on attachment pages.' );
|
echo ': ' . __( 'Displayed on attachment pages.' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</label>
|
</label>
|
||||||
<?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?>
|
<?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?>
|
||||||
|
|
||||||
@ -3055,7 +3068,7 @@ function attachment_submitbox_metadata() {
|
|||||||
$media_dims = apply_filters( 'media_meta', $media_dims, $post );
|
$media_dims = apply_filters( 'media_meta', $media_dims, $post );
|
||||||
|
|
||||||
$att_url = wp_get_attachment_url( $post->ID );
|
$att_url = wp_get_attachment_url( $post->ID );
|
||||||
?>
|
?>
|
||||||
<div class="misc-pub-section misc-pub-attachment">
|
<div class="misc-pub-section misc-pub-attachment">
|
||||||
<label for="attachment_url"><?php _e( 'File URL:' ); ?></label>
|
<label for="attachment_url"><?php _e( 'File URL:' ); ?></label>
|
||||||
<input type="text" class="widefat urlfield" readonly="readonly" name="attachment_url" id="attachment_url" value="<?php echo esc_attr( $att_url ); ?>" />
|
<input type="text" class="widefat urlfield" readonly="readonly" name="attachment_url" id="attachment_url" value="<?php echo esc_attr( $att_url ); ?>" />
|
||||||
@ -3077,7 +3090,7 @@ function attachment_submitbox_metadata() {
|
|||||||
} else {
|
} else {
|
||||||
echo strtoupper( str_replace( 'image/', '', $post->post_mime_type ) );
|
echo strtoupper( str_replace( 'image/', '', $post->post_mime_type ) );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -3122,7 +3135,7 @@ function attachment_submitbox_metadata() {
|
|||||||
if ( empty( $meta[ $key ] ) ) {
|
if ( empty( $meta[ $key ] ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="misc-pub-section misc-pub-mime-meta misc-pub-<?php echo sanitize_html_class( $key ); ?>">
|
<div class="misc-pub-section misc-pub-mime-meta misc-pub-<?php echo sanitize_html_class( $key ); ?>">
|
||||||
<?php echo $label; ?> <strong>
|
<?php echo $label; ?> <strong>
|
||||||
<?php
|
<?php
|
||||||
@ -3137,10 +3150,10 @@ function attachment_submitbox_metadata() {
|
|||||||
echo esc_html( $meta[ $key ] );
|
echo esc_html( $meta[ $key ] );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</strong>
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = array(
|
$fields = array(
|
||||||
@ -3166,20 +3179,20 @@ function attachment_submitbox_metadata() {
|
|||||||
if ( empty( $meta['audio'][ $key ] ) ) {
|
if ( empty( $meta['audio'][ $key ] ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="misc-pub-section misc-pub-audio misc-pub-<?php echo sanitize_html_class( $key ); ?>">
|
<div class="misc-pub-section misc-pub-audio misc-pub-<?php echo sanitize_html_class( $key ); ?>">
|
||||||
<?php echo $label; ?> <strong><?php echo esc_html( $meta['audio'][ $key ] ); ?></strong>
|
<?php echo $label; ?> <strong><?php echo esc_html( $meta['audio'][ $key ] ); ?></strong>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $media_dims ) :
|
if ( $media_dims ) :
|
||||||
?>
|
?>
|
||||||
<div class="misc-pub-section misc-pub-dimensions">
|
<div class="misc-pub-section misc-pub-dimensions">
|
||||||
<?php _e( 'Dimensions:' ); ?> <strong><?php echo $media_dims; ?></strong>
|
<?php _e( 'Dimensions:' ); ?> <strong><?php echo $media_dims; ?></strong>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,25 +25,25 @@ function post_submit_meta_box( $post, $args = array() ) {
|
|||||||
$post_type = $post->post_type;
|
$post_type = $post->post_type;
|
||||||
$post_type_object = get_post_type_object( $post_type );
|
$post_type_object = get_post_type_object( $post_type );
|
||||||
$can_publish = current_user_can( $post_type_object->cap->publish_posts );
|
$can_publish = current_user_can( $post_type_object->cap->publish_posts );
|
||||||
?>
|
?>
|
||||||
<div class="submitbox" id="submitpost">
|
<div class="submitbox" id="submitpost">
|
||||||
|
|
||||||
<div id="minor-publishing">
|
<div id="minor-publishing">
|
||||||
|
|
||||||
<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
|
<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
|
||||||
<div style="display:none;">
|
<div style="display:none;">
|
||||||
<?php submit_button( __( 'Save' ), '', 'save' ); ?>
|
<?php submit_button( __( 'Save' ), '', 'save' ); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="minor-publishing-actions">
|
<div id="minor-publishing-actions">
|
||||||
<div id="save-action">
|
<div id="save-action">
|
||||||
<?php
|
<?php
|
||||||
if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) {
|
if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) {
|
||||||
$private_style = '';
|
$private_style = '';
|
||||||
if ( 'private' == $post->post_status ) {
|
if ( 'private' == $post->post_status ) {
|
||||||
$private_style = 'style="display:none"';
|
$private_style = 'style="display:none"';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<input <?php echo $private_style; ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e( 'Save Draft' ); ?>" class="button" />
|
<input <?php echo $private_style; ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e( 'Save Draft' ); ?>" class="button" />
|
||||||
<span class="spinner"></span>
|
<span class="spinner"></span>
|
||||||
<?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?>
|
<?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?>
|
||||||
@ -51,44 +51,44 @@ if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pendi
|
|||||||
<span class="spinner"></span>
|
<span class="spinner"></span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if ( is_post_type_viewable( $post_type_object ) ) : ?>
|
<?php if ( is_post_type_viewable( $post_type_object ) ) : ?>
|
||||||
<div id="preview-action">
|
<div id="preview-action">
|
||||||
<?php
|
<?php
|
||||||
$preview_link = esc_url( get_preview_post_link( $post ) );
|
$preview_link = esc_url( get_preview_post_link( $post ) );
|
||||||
if ( 'publish' == $post->post_status ) {
|
if ( 'publish' == $post->post_status ) {
|
||||||
$preview_button_text = __( 'Preview Changes' );
|
$preview_button_text = __( 'Preview Changes' );
|
||||||
} else {
|
} else {
|
||||||
$preview_button_text = __( 'Preview' );
|
$preview_button_text = __( 'Preview' );
|
||||||
}
|
}
|
||||||
|
|
||||||
$preview_button = sprintf(
|
$preview_button = sprintf(
|
||||||
'%1$s<span class="screen-reader-text"> %2$s</span>',
|
'%1$s<span class="screen-reader-text"> %2$s</span>',
|
||||||
$preview_button_text,
|
$preview_button_text,
|
||||||
/* translators: accessibility text */
|
/* translators: accessibility text */
|
||||||
__( '(opens in a new tab)' )
|
__( '(opens in a new tab)' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview-<?php echo (int) $post->ID; ?>" id="post-preview"><?php echo $preview_button; ?></a>
|
<a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview-<?php echo (int) $post->ID; ?>" id="post-preview"><?php echo $preview_button; ?></a>
|
||||||
<input type="hidden" name="wp-preview" id="wp-preview" value="" />
|
<input type="hidden" name="wp-preview" id="wp-preview" value="" />
|
||||||
</div>
|
</div>
|
||||||
<?php endif; // public post type ?>
|
<?php endif; // public post type ?>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires before the post time/date setting in the Publish meta box.
|
* Fires before the post time/date setting in the Publish meta box.
|
||||||
*
|
*
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
*
|
*
|
||||||
* @param WP_Post $post WP_Post object for the current post.
|
* @param WP_Post $post WP_Post object for the current post.
|
||||||
*/
|
*/
|
||||||
do_action( 'post_submitbox_minor_actions', $post );
|
do_action( 'post_submitbox_minor_actions', $post );
|
||||||
?>
|
?>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div><!-- #minor-publishing-actions -->
|
</div><!-- #minor-publishing-actions -->
|
||||||
|
|
||||||
<div id="misc-publishing-actions">
|
<div id="misc-publishing-actions">
|
||||||
|
|
||||||
<div class="misc-pub-section misc-pub-post-status">
|
<div class="misc-pub-section misc-pub-post-status">
|
||||||
<?php _e( 'Status:' ); ?> <span id="post-status-display">
|
<?php _e( 'Status:' ); ?> <span id="post-status-display">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
switch ( $post->post_status ) {
|
switch ( $post->post_status ) {
|
||||||
@ -109,22 +109,22 @@ do_action( 'post_submitbox_minor_actions', $post );
|
|||||||
_e( 'Draft' );
|
_e( 'Draft' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
<?php
|
<?php
|
||||||
if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) {
|
if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) {
|
||||||
$private_style = '';
|
$private_style = '';
|
||||||
if ( 'private' == $post->post_status ) {
|
if ( 'private' == $post->post_status ) {
|
||||||
$private_style = 'style="display:none"';
|
$private_style = 'style="display:none"';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="#post_status" <?php echo $private_style; ?> class="edit-post-status hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a>
|
<a href="#post_status" <?php echo $private_style; ?> class="edit-post-status hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a>
|
||||||
|
|
||||||
<div id="post-status-select" class="hide-if-js">
|
<div id="post-status-select" class="hide-if-js">
|
||||||
<input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ( 'auto-draft' == $post->post_status ) ? 'draft' : $post->post_status ); ?>" />
|
<input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ( 'auto-draft' == $post->post_status ) ? 'draft' : $post->post_status ); ?>" />
|
||||||
<label for="post_status" class="screen-reader-text"><?php _e( 'Set status' ); ?></label>
|
<label for="post_status" class="screen-reader-text"><?php _e( 'Set status' ); ?></label>
|
||||||
<select name="post_status" id="post_status">
|
<select name="post_status" id="post_status">
|
||||||
<?php if ( 'publish' == $post->post_status ) : ?>
|
<?php if ( 'publish' == $post->post_status ) : ?>
|
||||||
<option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e( 'Published' ); ?></option>
|
<option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e( 'Published' ); ?></option>
|
||||||
<?php elseif ( 'private' == $post->post_status ) : ?>
|
<?php elseif ( 'private' == $post->post_status ) : ?>
|
||||||
<option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e( 'Privately Published' ); ?></option>
|
<option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e( 'Privately Published' ); ?></option>
|
||||||
@ -132,7 +132,7 @@ if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_
|
|||||||
<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e( 'Scheduled' ); ?></option>
|
<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e( 'Scheduled' ); ?></option>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e( 'Pending Review' ); ?></option>
|
<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e( 'Pending Review' ); ?></option>
|
||||||
<?php if ( 'auto-draft' == $post->post_status ) : ?>
|
<?php if ( 'auto-draft' == $post->post_status ) : ?>
|
||||||
<option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _e( 'Draft' ); ?></option>
|
<option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _e( 'Draft' ); ?></option>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e( 'Draft' ); ?></option>
|
<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e( 'Draft' ); ?></option>
|
||||||
@ -146,7 +146,7 @@ if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_
|
|||||||
</div><!-- .misc-pub-section -->
|
</div><!-- .misc-pub-section -->
|
||||||
|
|
||||||
<div class="misc-pub-section misc-pub-visibility" id="visibility">
|
<div class="misc-pub-section misc-pub-visibility" id="visibility">
|
||||||
<?php _e( 'Visibility:' ); ?> <span id="post-visibility-display">
|
<?php _e( 'Visibility:' ); ?> <span id="post-visibility-display">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( 'private' == $post->post_status ) {
|
if ( 'private' == $post->post_status ) {
|
||||||
@ -165,19 +165,19 @@ if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo esc_html( $visibility_trans );
|
echo esc_html( $visibility_trans );
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
<?php if ( $can_publish ) { ?>
|
<?php if ( $can_publish ) { ?>
|
||||||
<a href="#visibility" class="edit-visibility hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit visibility' ); ?></span></a>
|
<a href="#visibility" class="edit-visibility hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit visibility' ); ?></span></a>
|
||||||
|
|
||||||
<div id="post-visibility-select" class="hide-if-js">
|
<div id="post-visibility-select" class="hide-if-js">
|
||||||
<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr( $post->post_password ); ?>" />
|
<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr( $post->post_password ); ?>" />
|
||||||
<?php if ( $post_type == 'post' ) : ?>
|
<?php if ( $post_type == 'post' ) : ?>
|
||||||
<input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> />
|
<input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_attr( $visibility ); ?>" />
|
<input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_attr( $visibility ); ?>" />
|
||||||
<input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e( 'Public' ); ?></label><br />
|
<input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e( 'Public' ); ?></label><br />
|
||||||
<?php if ( $post_type == 'post' && current_user_can( 'edit_others_posts' ) ) : ?>
|
<?php if ( $post_type == 'post' && current_user_can( 'edit_others_posts' ) ) : ?>
|
||||||
<span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span>
|
<span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e( 'Password protected' ); ?></label><br />
|
<input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e( 'Password protected' ); ?></label><br />
|
||||||
@ -193,57 +193,57 @@ if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_
|
|||||||
|
|
||||||
</div><!-- .misc-pub-section -->
|
</div><!-- .misc-pub-section -->
|
||||||
|
|
||||||
<?php
|
|
||||||
/* translators: Publish box date format, see https://secure.php.net/date */
|
|
||||||
$datef = __( 'M j, Y @ H:i' );
|
|
||||||
if ( 0 != $post->ID ) {
|
|
||||||
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
|
|
||||||
/* translators: Post date information. %s: Date on which the post is currently scheduled to be published */
|
|
||||||
$stamp = __( 'Scheduled for: <b>%s</b>' );
|
|
||||||
} elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published
|
|
||||||
/* translators: Post date information. %s: Date on which the post was published */
|
|
||||||
$stamp = __( 'Published on: <b>%s</b>' );
|
|
||||||
} elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified
|
|
||||||
$stamp = __( 'Publish <b>immediately</b>' );
|
|
||||||
} elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified
|
|
||||||
/* translators: Post date information. %s: Date on which the post is to be published */
|
|
||||||
$stamp = __( 'Schedule for: <b>%s</b>' );
|
|
||||||
} else { // draft, 1 or more saves, date specified
|
|
||||||
/* translators: Post date information. %s: Date on which the post is to be published */
|
|
||||||
$stamp = __( 'Publish on: <b>%s</b>' );
|
|
||||||
}
|
|
||||||
$date = date_i18n( $datef, strtotime( $post->post_date ) );
|
|
||||||
} else { // draft (no saves, and thus no date specified)
|
|
||||||
$stamp = __( 'Publish <b>immediately</b>' );
|
|
||||||
$date = date_i18n( $datef, strtotime( current_time( 'mysql' ) ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! empty( $args['args']['revisions_count'] ) ) :
|
|
||||||
?>
|
|
||||||
<div class="misc-pub-section misc-pub-revisions">
|
|
||||||
<?php
|
<?php
|
||||||
|
/* translators: Publish box date format, see https://secure.php.net/date */
|
||||||
|
$datef = __( 'M j, Y @ H:i' );
|
||||||
|
if ( 0 != $post->ID ) {
|
||||||
|
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
|
||||||
|
/* translators: Post date information. %s: Date on which the post is currently scheduled to be published */
|
||||||
|
$stamp = __( 'Scheduled for: <b>%s</b>' );
|
||||||
|
} elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published
|
||||||
|
/* translators: Post date information. %s: Date on which the post was published */
|
||||||
|
$stamp = __( 'Published on: <b>%s</b>' );
|
||||||
|
} elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified
|
||||||
|
$stamp = __( 'Publish <b>immediately</b>' );
|
||||||
|
} elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified
|
||||||
|
/* translators: Post date information. %s: Date on which the post is to be published */
|
||||||
|
$stamp = __( 'Schedule for: <b>%s</b>' );
|
||||||
|
} else { // draft, 1 or more saves, date specified
|
||||||
|
/* translators: Post date information. %s: Date on which the post is to be published */
|
||||||
|
$stamp = __( 'Publish on: <b>%s</b>' );
|
||||||
|
}
|
||||||
|
$date = date_i18n( $datef, strtotime( $post->post_date ) );
|
||||||
|
} else { // draft (no saves, and thus no date specified)
|
||||||
|
$stamp = __( 'Publish <b>immediately</b>' );
|
||||||
|
$date = date_i18n( $datef, strtotime( current_time( 'mysql' ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! empty( $args['args']['revisions_count'] ) ) :
|
||||||
|
?>
|
||||||
|
<div class="misc-pub-section misc-pub-revisions">
|
||||||
|
<?php
|
||||||
/* translators: Post revisions heading. %s: The number of available revisions */
|
/* translators: Post revisions heading. %s: The number of available revisions */
|
||||||
printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '</b>' );
|
printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '</b>' );
|
||||||
?>
|
?>
|
||||||
<a class="hide-if-no-js" href="<?php echo esc_url( get_edit_post_link( $args['args']['revision_id'] ) ); ?>"><span aria-hidden="true"><?php _ex( 'Browse', 'revisions' ); ?></span> <span class="screen-reader-text"><?php _e( 'Browse revisions' ); ?></span></a>
|
<a class="hide-if-no-js" href="<?php echo esc_url( get_edit_post_link( $args['args']['revision_id'] ) ); ?>"><span aria-hidden="true"><?php _ex( 'Browse', 'revisions' ); ?></span> <span class="screen-reader-text"><?php _e( 'Browse revisions' ); ?></span></a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if ( $can_publish ) : // Contributors don't get to choose the date of publish
|
if ( $can_publish ) : // Contributors don't get to choose the date of publish
|
||||||
?>
|
?>
|
||||||
<div class="misc-pub-section curtime misc-pub-curtime">
|
<div class="misc-pub-section curtime misc-pub-curtime">
|
||||||
<span id="timestamp">
|
<span id="timestamp">
|
||||||
<?php printf( $stamp, $date ); ?></span>
|
<?php printf( $stamp, $date ); ?></span>
|
||||||
<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
|
<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
|
||||||
<fieldset id="timestampdiv" class="hide-if-js">
|
<fieldset id="timestampdiv" class="hide-if-js">
|
||||||
<legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
|
<legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
|
||||||
<?php touch_time( ( $action === 'edit' ), 1 ); ?>
|
<?php touch_time( ( $action === 'edit' ), 1 ); ?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div><?php // /misc-pub-section ?>
|
</div><?php // /misc-pub-section ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( 'draft' === $post->post_status && get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) : ?>
|
<?php if ( 'draft' === $post->post_status && get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) : ?>
|
||||||
<div class="notice notice-info notice-alt inline">
|
<div class="notice notice-info notice-alt inline">
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
@ -261,84 +261,84 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish
|
|||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires after the post time/date setting in the Publish meta box.
|
* Fires after the post time/date setting in the Publish meta box.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
* @since 4.4.0 Added the `$post` parameter.
|
* @since 4.4.0 Added the `$post` parameter.
|
||||||
*
|
*
|
||||||
* @param WP_Post $post WP_Post object for the current post.
|
* @param WP_Post $post WP_Post object for the current post.
|
||||||
*/
|
*/
|
||||||
do_action( 'post_submitbox_misc_actions', $post );
|
do_action( 'post_submitbox_misc_actions', $post );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="major-publishing-actions">
|
<div id="major-publishing-actions">
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires at the beginning of the publishing actions section of the Publish meta box.
|
* Fires at the beginning of the publishing actions section of the Publish meta box.
|
||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
* @since 4.9.0 Added the `$post` parameter.
|
* @since 4.9.0 Added the `$post` parameter.
|
||||||
*
|
*
|
||||||
* @param WP_Post|null $post WP_Post object for the current post on Edit Post screen,
|
* @param WP_Post|null $post WP_Post object for the current post on Edit Post screen,
|
||||||
* null on Edit Link screen.
|
* null on Edit Link screen.
|
||||||
*/
|
*/
|
||||||
do_action( 'post_submitbox_start', $post );
|
do_action( 'post_submitbox_start', $post );
|
||||||
?>
|
|
||||||
<div id="delete-action">
|
|
||||||
<?php
|
|
||||||
if ( current_user_can( 'delete_post', $post->ID ) ) {
|
|
||||||
if ( ! EMPTY_TRASH_DAYS ) {
|
|
||||||
$delete_text = __( 'Delete Permanently' );
|
|
||||||
} else {
|
|
||||||
$delete_text = __( 'Move to Trash' );
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
<div id="delete-action">
|
||||||
|
<?php
|
||||||
|
if ( current_user_can( 'delete_post', $post->ID ) ) {
|
||||||
|
if ( ! EMPTY_TRASH_DAYS ) {
|
||||||
|
$delete_text = __( 'Delete Permanently' );
|
||||||
|
} else {
|
||||||
|
$delete_text = __( 'Move to Trash' );
|
||||||
|
}
|
||||||
|
?>
|
||||||
<a class="submitdelete deletion" href="<?php echo get_delete_post_link( $post->ID ); ?>"><?php echo $delete_text; ?></a>
|
<a class="submitdelete deletion" href="<?php echo get_delete_post_link( $post->ID ); ?>"><?php echo $delete_text; ?></a>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="publishing-action">
|
<div id="publishing-action">
|
||||||
<span class="spinner"></span>
|
<span class="spinner"></span>
|
||||||
<?php
|
<?php
|
||||||
if ( ! in_array( $post->post_status, array( 'publish', 'future', 'private' ) ) || 0 == $post->ID ) {
|
if ( ! in_array( $post->post_status, array( 'publish', 'future', 'private' ) ) || 0 == $post->ID ) {
|
||||||
if ( $can_publish ) :
|
if ( $can_publish ) :
|
||||||
if ( ! empty( $post->post_date_gmt ) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) :
|
if ( ! empty( $post->post_date_gmt ) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) :
|
||||||
?>
|
?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php echo esc_attr_x( 'Schedule', 'post action/button label' ); ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php echo esc_attr_x( 'Schedule', 'post action/button label' ); ?>" />
|
||||||
<?php submit_button( _x( 'Schedule', 'post action/button label' ), 'primary large', 'publish', false ); ?>
|
<?php submit_button( _x( 'Schedule', 'post action/button label' ), 'primary large', 'publish', false ); ?>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Publish' ); ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Publish' ); ?>" />
|
||||||
<?php submit_button( __( 'Publish' ), 'primary large', 'publish', false ); ?>
|
<?php submit_button( __( 'Publish' ), 'primary large', 'publish', false ); ?>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
else :
|
else :
|
||||||
?>
|
?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Submit for Review' ); ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Submit for Review' ); ?>" />
|
||||||
<?php submit_button( __( 'Submit for Review' ), 'primary large', 'publish', false ); ?>
|
<?php submit_button( __( 'Submit for Review' ), 'primary large', 'publish', false ); ?>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Update' ); ?>" />
|
<input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Update' ); ?>" />
|
||||||
<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ); ?>" />
|
<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update' ); ?>" />
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -349,14 +349,14 @@ endif;
|
|||||||
* @param object $post
|
* @param object $post
|
||||||
*/
|
*/
|
||||||
function attachment_submit_meta_box( $post ) {
|
function attachment_submit_meta_box( $post ) {
|
||||||
?>
|
?>
|
||||||
<div class="submitbox" id="submitpost">
|
<div class="submitbox" id="submitpost">
|
||||||
|
|
||||||
<div id="minor-publishing">
|
<div id="minor-publishing">
|
||||||
|
|
||||||
<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
|
<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
|
||||||
<div style="display:none;">
|
<div style="display:none;">
|
||||||
<?php submit_button( __( 'Save' ), '', 'save' ); ?>
|
<?php submit_button( __( 'Save' ), '', 'save' ); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -418,7 +418,7 @@ function attachment_submit_meta_box( $post ) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -449,7 +449,7 @@ function post_format_meta_box( $post, $box ) {
|
|||||||
if ( $post_format && ! in_array( $post_format, $post_formats[0] ) ) {
|
if ( $post_format && ! in_array( $post_format, $post_formats[0] ) ) {
|
||||||
$post_formats[0][] = $post_format;
|
$post_formats[0][] = $post_format;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="post-formats-select">
|
<div id="post-formats-select">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend class="screen-reader-text"><?php _e( 'Post Formats' ); ?></legend>
|
<legend class="screen-reader-text"><?php _e( 'Post Formats' ); ?></legend>
|
||||||
@ -459,7 +459,7 @@ function post_format_meta_box( $post, $box ) {
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
@ -501,7 +501,7 @@ function post_tags_meta_box( $post, $box ) {
|
|||||||
if ( ! is_string( $terms_to_edit ) ) {
|
if ( ! is_string( $terms_to_edit ) ) {
|
||||||
$terms_to_edit = '';
|
$terms_to_edit = '';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="tagsdiv" id="<?php echo $tax_name; ?>">
|
<div class="tagsdiv" id="<?php echo $tax_name; ?>">
|
||||||
<div class="jaxtag">
|
<div class="jaxtag">
|
||||||
<div class="nojs-tags hide-if-js">
|
<div class="nojs-tags hide-if-js">
|
||||||
@ -521,10 +521,10 @@ function post_tags_meta_box( $post, $box ) {
|
|||||||
</div>
|
</div>
|
||||||
<ul class="tagchecklist" role="list"></ul>
|
<ul class="tagchecklist" role="list"></ul>
|
||||||
</div>
|
</div>
|
||||||
<?php if ( $user_can_assign_terms ) : ?>
|
<?php if ( $user_can_assign_terms ) : ?>
|
||||||
<p class="hide-if-no-js"><button type="button" class="button-link tagcloud-link" id="link-<?php echo $tax_name; ?>" aria-expanded="false"><?php echo $taxonomy->labels->choose_from_most_used; ?></button></p>
|
<p class="hide-if-no-js"><button type="button" class="button-link tagcloud-link" id="link-<?php echo $tax_name; ?>" aria-expanded="false"><?php echo $taxonomy->labels->choose_from_most_used; ?></button></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -579,12 +579,13 @@ function post_categories_meta_box( $post, $box ) {
|
|||||||
<ul id="<?php echo $tax_name; ?>checklist" data-wp-lists="list:<?php echo $tax_name; ?>" class="categorychecklist form-no-clear">
|
<ul id="<?php echo $tax_name; ?>checklist" data-wp-lists="list:<?php echo $tax_name; ?>" class="categorychecklist form-no-clear">
|
||||||
<?php
|
<?php
|
||||||
wp_terms_checklist(
|
wp_terms_checklist(
|
||||||
$post->ID, array(
|
$post->ID,
|
||||||
|
array(
|
||||||
'taxonomy' => $tax_name,
|
'taxonomy' => $tax_name,
|
||||||
'popular_cats' => $popular_ids,
|
'popular_cats' => $popular_ids,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<?php if ( current_user_can( $taxonomy->cap->edit_terms ) ) : ?>
|
<?php if ( current_user_can( $taxonomy->cap->edit_terms ) ) : ?>
|
||||||
@ -657,18 +658,18 @@ function post_categories_meta_box( $post, $box ) {
|
|||||||
* @param object $post
|
* @param object $post
|
||||||
*/
|
*/
|
||||||
function post_excerpt_meta_box( $post ) {
|
function post_excerpt_meta_box( $post ) {
|
||||||
?>
|
?>
|
||||||
<label class="screen-reader-text" for="excerpt"><?php _e( 'Excerpt' ); ?></label><textarea rows="1" cols="40" name="excerpt" id="excerpt"><?php echo $post->post_excerpt; // textarea_escaped ?></textarea>
|
<label class="screen-reader-text" for="excerpt"><?php _e( 'Excerpt' ); ?></label><textarea rows="1" cols="40" name="excerpt" id="excerpt"><?php echo $post->post_excerpt; // textarea_escaped ?></textarea>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: Codex URL */
|
/* translators: %s: Codex URL */
|
||||||
__( 'Excerpts are optional hand-crafted summaries of your content that can be used in your theme. <a href="%s">Learn more about manual excerpts</a>.' ),
|
__( 'Excerpts are optional hand-crafted summaries of your content that can be used in your theme. <a href="%s">Learn more about manual excerpts</a>.' ),
|
||||||
__( 'https://codex.wordpress.org/Excerpt' )
|
__( 'https://codex.wordpress.org/Excerpt' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -690,25 +691,25 @@ function post_trackback_meta_box( $post ) {
|
|||||||
$pings .= '</ul>';
|
$pings .= '</ul>';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<label for="trackback_url"><?php _e( 'Send trackbacks to:' ); ?></label>
|
<label for="trackback_url"><?php _e( 'Send trackbacks to:' ); ?></label>
|
||||||
<?php echo $form_trackback; ?>
|
<?php echo $form_trackback; ?>
|
||||||
</p>
|
</p>
|
||||||
<p id="trackback-url-desc" class="howto"><?php _e( 'Separate multiple URLs with spaces' ); ?></p>
|
<p id="trackback-url-desc" class="howto"><?php _e( 'Separate multiple URLs with spaces' ); ?></p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: Codex URL */
|
/* translators: %s: Codex URL */
|
||||||
__( 'Trackbacks are a way to notify legacy blog systems that you’ve linked to them. If you link other WordPress sites, they’ll be notified automatically using <a href="%s">pingbacks</a>, no other action necessary.' ),
|
__( 'Trackbacks are a way to notify legacy blog systems that you’ve linked to them. If you link other WordPress sites, they’ll be notified automatically using <a href="%s">pingbacks</a>, no other action necessary.' ),
|
||||||
__( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' )
|
__( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
if ( ! empty( $pings ) ) {
|
if ( ! empty( $pings ) ) {
|
||||||
echo $pings;
|
echo $pings;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -719,30 +720,30 @@ if ( ! empty( $pings ) ) {
|
|||||||
* @param object $post
|
* @param object $post
|
||||||
*/
|
*/
|
||||||
function post_custom_meta_box( $post ) {
|
function post_custom_meta_box( $post ) {
|
||||||
?>
|
?>
|
||||||
<div id="postcustomstuff">
|
<div id="postcustomstuff">
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
<?php
|
<?php
|
||||||
$metadata = has_meta( $post->ID );
|
$metadata = has_meta( $post->ID );
|
||||||
foreach ( $metadata as $key => $value ) {
|
foreach ( $metadata as $key => $value ) {
|
||||||
if ( is_protected_meta( $metadata[ $key ]['meta_key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ]['meta_key'] ) ) {
|
if ( is_protected_meta( $metadata[ $key ]['meta_key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ]['meta_key'] ) ) {
|
||||||
unset( $metadata[ $key ] );
|
unset( $metadata[ $key ] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
list_meta( $metadata );
|
||||||
list_meta( $metadata );
|
meta_form( $post );
|
||||||
meta_form( $post );
|
?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: Codex URL */
|
/* translators: %s: Codex URL */
|
||||||
__( 'Custom fields can be used to add extra metadata to a post that you can <a href="%s">use in your theme</a>.' ),
|
__( 'Custom fields can be used to add extra metadata to a post that you can <a href="%s">use in your theme</a>.' ),
|
||||||
__( 'https://codex.wordpress.org/Using_Custom_Fields' )
|
__( 'https://codex.wordpress.org/Using_Custom_Fields' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -753,7 +754,7 @@ meta_form( $post );
|
|||||||
* @param object $post
|
* @param object $post
|
||||||
*/
|
*/
|
||||||
function post_comment_status_meta_box( $post ) {
|
function post_comment_status_meta_box( $post ) {
|
||||||
?>
|
?>
|
||||||
<input name="advanced_view" type="hidden" value="1" />
|
<input name="advanced_view" type="hidden" value="1" />
|
||||||
<p class="meta-options">
|
<p class="meta-options">
|
||||||
<label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked( $post->comment_status, 'open' ); ?> /> <?php _e( 'Allow comments' ); ?></label><br />
|
<label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked( $post->comment_status, 'open' ); ?> /> <?php _e( 'Allow comments' ); ?></label><br />
|
||||||
@ -777,7 +778,7 @@ function post_comment_status_meta_box( $post ) {
|
|||||||
do_action( 'post_comment_status_meta_box-options', $post );
|
do_action( 'post_comment_status_meta_box-options', $post );
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -844,9 +845,9 @@ function post_comment_meta_box( $post ) {
|
|||||||
function post_slug_meta_box( $post ) {
|
function post_slug_meta_box( $post ) {
|
||||||
/** This filter is documented in wp-admin/edit-tag-form.php */
|
/** This filter is documented in wp-admin/edit-tag-form.php */
|
||||||
$editable_slug = apply_filters( 'editable_slug', $post->post_name, $post );
|
$editable_slug = apply_filters( 'editable_slug', $post->post_name, $post );
|
||||||
?>
|
?>
|
||||||
<label class="screen-reader-text" for="post_name"><?php _e( 'Slug' ); ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo esc_attr( $editable_slug ); ?>" />
|
<label class="screen-reader-text" for="post_name"><?php _e( 'Slug' ); ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo esc_attr( $editable_slug ); ?>" />
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -860,9 +861,9 @@ function post_slug_meta_box( $post ) {
|
|||||||
*/
|
*/
|
||||||
function post_author_meta_box( $post ) {
|
function post_author_meta_box( $post ) {
|
||||||
global $user_ID;
|
global $user_ID;
|
||||||
?>
|
?>
|
||||||
<label class="screen-reader-text" for="post_author_override"><?php _e( 'Author' ); ?></label>
|
<label class="screen-reader-text" for="post_author_override"><?php _e( 'Author' ); ?></label>
|
||||||
<?php
|
<?php
|
||||||
wp_dropdown_users(
|
wp_dropdown_users(
|
||||||
array(
|
array(
|
||||||
'who' => 'authors',
|
'who' => 'authors',
|
||||||
@ -919,10 +920,10 @@ function page_attributes_meta_box( $post ) {
|
|||||||
$dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post );
|
$dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post );
|
||||||
$pages = wp_dropdown_pages( $dropdown_args );
|
$pages = wp_dropdown_pages( $dropdown_args );
|
||||||
if ( ! empty( $pages ) ) :
|
if ( ! empty( $pages ) ) :
|
||||||
?>
|
?>
|
||||||
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php _e( 'Parent' ); ?></label></p>
|
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="parent_id"><?php _e( 'Parent' ); ?></label></p>
|
||||||
<?php echo $pages; ?>
|
<?php echo $pages; ?>
|
||||||
<?php
|
<?php
|
||||||
endif; // end empty pages check
|
endif; // end empty pages check
|
||||||
endif; // end hierarchical check.
|
endif; // end hierarchical check.
|
||||||
|
|
||||||
@ -930,53 +931,53 @@ function page_attributes_meta_box( $post ) {
|
|||||||
$template = ! empty( $post->page_template ) ? $post->page_template : false;
|
$template = ! empty( $post->page_template ) ? $post->page_template : false;
|
||||||
?>
|
?>
|
||||||
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="page_template"><?php _e( 'Template' ); ?></label>
|
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="page_template"><?php _e( 'Template' ); ?></label>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires immediately after the label inside the 'Template' section
|
* Fires immediately after the label inside the 'Template' section
|
||||||
* of the 'Page Attributes' meta box.
|
* of the 'Page Attributes' meta box.
|
||||||
*
|
*
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
*
|
*
|
||||||
* @param string $template The template used for the current post.
|
* @param string $template The template used for the current post.
|
||||||
* @param WP_Post $post The current post.
|
* @param WP_Post $post The current post.
|
||||||
*/
|
*/
|
||||||
do_action( 'page_attributes_meta_box_template', $template, $post );
|
do_action( 'page_attributes_meta_box_template', $template, $post );
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<select name="page_template" id="page_template">
|
<select name="page_template" id="page_template">
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Filters the title of the default page template displayed in the drop-down.
|
* Filters the title of the default page template displayed in the drop-down.
|
||||||
*
|
*
|
||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
*
|
*
|
||||||
* @param string $label The display value for the default page template title.
|
* @param string $label The display value for the default page template title.
|
||||||
* @param string $context Where the option label is displayed. Possible values
|
* @param string $context Where the option label is displayed. Possible values
|
||||||
* include 'meta-box' or 'quick-edit'.
|
* include 'meta-box' or 'quick-edit'.
|
||||||
*/
|
*/
|
||||||
$default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'meta-box' );
|
$default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'meta-box' );
|
||||||
?>
|
?>
|
||||||
<option value="default"><?php echo esc_html( $default_title ); ?></option>
|
<option value="default"><?php echo esc_html( $default_title ); ?></option>
|
||||||
<?php page_template_dropdown( $template, $post->post_type ); ?>
|
<?php page_template_dropdown( $template, $post->post_type ); ?>
|
||||||
</select>
|
</select>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ( post_type_supports( $post->post_type, 'page-attributes' ) ) : ?>
|
<?php if ( post_type_supports( $post->post_type, 'page-attributes' ) ) : ?>
|
||||||
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php _e( 'Order' ); ?></label></p>
|
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php _e( 'Order' ); ?></label></p>
|
||||||
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr( $post->menu_order ); ?>" />
|
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr( $post->menu_order ); ?>" />
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires before the help hint text in the 'Page Attributes' meta box.
|
* Fires before the help hint text in the 'Page Attributes' meta box.
|
||||||
*
|
*
|
||||||
* @since 4.9.0
|
* @since 4.9.0
|
||||||
*
|
*
|
||||||
* @param WP_Post $post The current post.
|
* @param WP_Post $post The current post.
|
||||||
*/
|
*/
|
||||||
do_action( 'page_attributes_misc_attributes', $post );
|
do_action( 'page_attributes_misc_attributes', $post );
|
||||||
?>
|
?>
|
||||||
<?php if ( 'page' == $post->post_type && get_current_screen()->get_help_tabs() ) : ?>
|
<?php if ( 'page' == $post->post_type && get_current_screen()->get_help_tabs() ) : ?>
|
||||||
<p><?php _e( 'Need help? Use the Help tab above the screen title.' ); ?></p>
|
<p><?php _e( 'Need help? Use the Help tab above the screen title.' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -990,19 +991,19 @@ endif;
|
|||||||
* @param object $link
|
* @param object $link
|
||||||
*/
|
*/
|
||||||
function link_submit_meta_box( $link ) {
|
function link_submit_meta_box( $link ) {
|
||||||
?>
|
?>
|
||||||
<div class="submitbox" id="submitlink">
|
<div class="submitbox" id="submitlink">
|
||||||
|
|
||||||
<div id="minor-publishing">
|
<div id="minor-publishing">
|
||||||
|
|
||||||
<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
|
<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
|
||||||
<div style="display:none;">
|
<div style="display:none;">
|
||||||
<?php submit_button( __( 'Save' ), '', 'save', false ); ?>
|
<?php submit_button( __( 'Save' ), '', 'save', false ); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="minor-publishing-actions">
|
<div id="minor-publishing-actions">
|
||||||
<div id="preview-action">
|
<div id="preview-action">
|
||||||
<?php if ( ! empty( $link->link_id ) ) { ?>
|
<?php if ( ! empty( $link->link_id ) ) { ?>
|
||||||
<a class="preview button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e( 'Visit Link' ); ?></a>
|
<a class="preview button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e( 'Visit Link' ); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
@ -1018,20 +1019,20 @@ function link_submit_meta_box( $link ) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="major-publishing-actions">
|
<div id="major-publishing-actions">
|
||||||
<?php
|
<?php
|
||||||
/** This action is documented in wp-admin/includes/meta-boxes.php */
|
/** This action is documented in wp-admin/includes/meta-boxes.php */
|
||||||
do_action( 'post_submitbox_start', null );
|
do_action( 'post_submitbox_start', null );
|
||||||
?>
|
?>
|
||||||
<div id="delete-action">
|
<div id="delete-action">
|
||||||
<?php
|
<?php
|
||||||
if ( ! empty( $_GET['action'] ) && 'edit' == $_GET['action'] && current_user_can( 'manage_links' ) ) {
|
if ( ! empty( $_GET['action'] ) && 'edit' == $_GET['action'] && current_user_can( 'manage_links' ) ) {
|
||||||
?>
|
?>
|
||||||
<a class="submitdelete deletion" href="<?php echo wp_nonce_url( "link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id ); ?>" onclick="if ( confirm('<?php echo esc_js( sprintf( __( "You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ); ?>') ) {return true;}return false;"><?php _e( 'Delete' ); ?></a>
|
<a class="submitdelete deletion" href="<?php echo wp_nonce_url( "link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id ); ?>" onclick="if ( confirm('<?php echo esc_js( sprintf( __( "You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ); ?>') ) {return true;}return false;"><?php _e( 'Delete' ); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="publishing-action">
|
<div id="publishing-action">
|
||||||
<?php if ( ! empty( $link->link_id ) ) { ?>
|
<?php if ( ! empty( $link->link_id ) ) { ?>
|
||||||
<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update Link' ); ?>" />
|
<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update Link' ); ?>" />
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Add Link' ); ?>" />
|
<input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Add Link' ); ?>" />
|
||||||
@ -1039,17 +1040,17 @@ if ( ! empty( $_GET['action'] ) && 'edit' == $_GET['action'] && current_user_can
|
|||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires at the end of the Publish box in the Link editing screen.
|
* Fires at the end of the Publish box in the Link editing screen.
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
*/
|
*/
|
||||||
do_action( 'submitlink_box' );
|
do_action( 'submitlink_box' );
|
||||||
?>
|
?>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1060,7 +1061,7 @@ do_action( 'submitlink_box' );
|
|||||||
* @param object $link
|
* @param object $link
|
||||||
*/
|
*/
|
||||||
function link_categories_meta_box( $link ) {
|
function link_categories_meta_box( $link ) {
|
||||||
?>
|
?>
|
||||||
<div id="taxonomy-linkcategory" class="categorydiv">
|
<div id="taxonomy-linkcategory" class="categorydiv">
|
||||||
<ul id="category-tabs" class="category-tabs">
|
<ul id="category-tabs" class="category-tabs">
|
||||||
<li class="tabs"><a href="#categories-all"><?php _e( 'All Categories' ); ?></a></li>
|
<li class="tabs"><a href="#categories-all"><?php _e( 'All Categories' ); ?></a></li>
|
||||||
@ -1096,7 +1097,7 @@ function link_categories_meta_box( $link ) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1108,20 +1109,20 @@ function link_categories_meta_box( $link ) {
|
|||||||
*/
|
*/
|
||||||
function link_target_meta_box( $link ) {
|
function link_target_meta_box( $link ) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<fieldset><legend class="screen-reader-text"><span><?php _e( 'Target' ); ?></span></legend>
|
<fieldset><legend class="screen-reader-text"><span><?php _e( 'Target' ); ?></span></legend>
|
||||||
<p><label for="link_target_blank" class="selectit">
|
<p><label for="link_target_blank" class="selectit">
|
||||||
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo ( isset( $link->link_target ) && ( $link->link_target == '_blank' ) ? 'checked="checked"' : '' ); ?> />
|
<input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo ( isset( $link->link_target ) && ( $link->link_target == '_blank' ) ? 'checked="checked"' : '' ); ?> />
|
||||||
<?php _e( '<code>_blank</code> — new window or tab.' ); ?></label></p>
|
<?php _e( '<code>_blank</code> — new window or tab.' ); ?></label></p>
|
||||||
<p><label for="link_target_top" class="selectit">
|
<p><label for="link_target_top" class="selectit">
|
||||||
<input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo ( isset( $link->link_target ) && ( $link->link_target == '_top' ) ? 'checked="checked"' : '' ); ?> />
|
<input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo ( isset( $link->link_target ) && ( $link->link_target == '_top' ) ? 'checked="checked"' : '' ); ?> />
|
||||||
<?php _e( '<code>_top</code> — current window or tab, with no frames.' ); ?></label></p>
|
<?php _e( '<code>_top</code> — current window or tab, with no frames.' ); ?></label></p>
|
||||||
<p><label for="link_target_none" class="selectit">
|
<p><label for="link_target_none" class="selectit">
|
||||||
<input id="link_target_none" type="radio" name="link_target" value="" <?php echo ( isset( $link->link_target ) && ( $link->link_target == '' ) ? 'checked="checked"' : '' ); ?> />
|
<input id="link_target_none" type="radio" name="link_target" value="" <?php echo ( isset( $link->link_target ) && ( $link->link_target == '' ) ? 'checked="checked"' : '' ); ?> />
|
||||||
<?php _e( '<code>_none</code> — same window or tab.' ); ?></label></p>
|
<?php _e( '<code>_none</code> — same window or tab.' ); ?></label></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<p><?php _e( 'Choose the target frame for your link.' ); ?></p>
|
<p><?php _e( 'Choose the target frame for your link.' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1173,7 +1174,7 @@ function xfn_check( $class, $value = '', $deprecated = '' ) {
|
|||||||
* @param object $link
|
* @param object $link
|
||||||
*/
|
*/
|
||||||
function link_xfn_meta_box( $link ) {
|
function link_xfn_meta_box( $link ) {
|
||||||
?>
|
?>
|
||||||
<table class="links-table">
|
<table class="links-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="link_rel"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'rel:' ); ?></label></th>
|
<th scope="row"><label for="link_rel"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e( 'rel:' ); ?></label></th>
|
||||||
@ -1280,7 +1281,7 @@ function link_xfn_meta_box( $link ) {
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
<p><?php _e( 'If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out <a href="http://gmpg.org/xfn/">XFN</a>.' ); ?></p>
|
<p><?php _e( 'If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out <a href="http://gmpg.org/xfn/">XFN</a>.' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1291,7 +1292,7 @@ function link_xfn_meta_box( $link ) {
|
|||||||
* @param object $link
|
* @param object $link
|
||||||
*/
|
*/
|
||||||
function link_advanced_meta_box( $link ) {
|
function link_advanced_meta_box( $link ) {
|
||||||
?>
|
?>
|
||||||
<table class="links-table" cellpadding="0">
|
<table class="links-table" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="link_image"><?php _e( 'Image Address' ); ?></label></th>
|
<th scope="row"><label for="link_image"><?php _e( 'Image Address' ); ?></label></th>
|
||||||
@ -1321,7 +1322,7 @@ function link_advanced_meta_box( $link ) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1354,11 +1355,11 @@ function attachment_id3_data_meta_box( $post ) {
|
|||||||
if ( ! empty( $meta[ $key ] ) ) {
|
if ( ! empty( $meta[ $key ] ) ) {
|
||||||
$value = $meta[ $key ];
|
$value = $meta[ $key ];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<label for="title"><?php echo $label; ?></label><br />
|
<label for="title"><?php echo $label; ?></label><br />
|
||||||
<input type="text" name="id3_<?php echo esc_attr( $key ); ?>" id="id3_<?php echo esc_attr( $key ); ?>" class="large-text" value="<?php echo esc_attr( $value ); ?>" />
|
<input type="text" name="id3_<?php echo esc_attr( $key ); ?>" id="id3_<?php echo esc_attr( $key ); ?>" class="large-text" value="<?php echo esc_attr( $value ); ?>" />
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
endforeach;
|
endforeach;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,8 @@ function insert_with_markers( $filename, $marker, $insertion ) {
|
|||||||
|
|
||||||
// Generate the new file data
|
// Generate the new file data
|
||||||
$new_file_data = implode(
|
$new_file_data = implode(
|
||||||
"\n", array_merge(
|
"\n",
|
||||||
|
array_merge(
|
||||||
$pre_lines,
|
$pre_lines,
|
||||||
array( $start_marker ),
|
array( $start_marker ),
|
||||||
$insertion,
|
$insertion,
|
||||||
@ -855,7 +856,8 @@ function admin_color_scheme_picker( $user_id ) {
|
|||||||
array(
|
array(
|
||||||
'fresh' => '',
|
'fresh' => '',
|
||||||
'light' => '',
|
'light' => '',
|
||||||
), $_wp_admin_css_colors
|
),
|
||||||
|
$_wp_admin_css_colors
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -897,7 +899,7 @@ function admin_color_scheme_picker( $user_id ) {
|
|||||||
|
|
||||||
endforeach;
|
endforeach;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -1147,7 +1149,7 @@ function wp_admin_canonical_url() {
|
|||||||
window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href + window.location.hash );
|
window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href + window.location.hash );
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1428,13 +1430,15 @@ final class WP_Privacy_Policy_Content {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="policy-text-updated notice notice-warning">
|
<div class="policy-text-updated notice notice-warning">
|
||||||
<p><?php
|
<p>
|
||||||
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: Privacy Policy Guide URL */
|
/* translators: %s: Privacy Policy Guide URL */
|
||||||
__( 'The suggested privacy policy text has changed. Please <a href="%s">review the guide</a> and update your privacy policy.' ),
|
__( 'The suggested privacy policy text has changed. Please <a href="%s">review the guide</a> and update your privacy policy.' ),
|
||||||
esc_url( admin_url( 'tools.php?wp-privacy-policy-guide=1' ) )
|
esc_url( admin_url( 'tools.php?wp-privacy-policy-guide=1' ) )
|
||||||
);
|
);
|
||||||
?></p>
|
?>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -1453,8 +1457,8 @@ final class WP_Privacy_Policy_Content {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove updated|removed status.
|
// Remove updated|removed status.
|
||||||
$old = (array) get_post_meta( $policy_page_id, '_wp_suggested_privacy_policy_content' );
|
$old = (array) get_post_meta( $policy_page_id, '_wp_suggested_privacy_policy_content' );
|
||||||
$done = array();
|
$done = array();
|
||||||
$update_cache = false;
|
$update_cache = false;
|
||||||
|
|
||||||
foreach ( $old as $old_key => $old_data ) {
|
foreach ( $old as $old_key => $old_data ) {
|
||||||
@ -1466,7 +1470,7 @@ final class WP_Privacy_Policy_Content {
|
|||||||
|
|
||||||
if ( ! empty( $old_data['updated'] ) ) {
|
if ( ! empty( $old_data['updated'] ) ) {
|
||||||
// 'updated' is now 'added'.
|
// 'updated' is now 'added'.
|
||||||
$done[] = array(
|
$done[] = array(
|
||||||
'plugin_name' => $old_data['plugin_name'],
|
'plugin_name' => $old_data['plugin_name'],
|
||||||
'policy_text' => $old_data['policy_text'],
|
'policy_text' => $old_data['policy_text'],
|
||||||
'added' => $old_data['updated'],
|
'added' => $old_data['updated'],
|
||||||
@ -1497,11 +1501,11 @@ final class WP_Privacy_Policy_Content {
|
|||||||
*/
|
*/
|
||||||
public static function get_suggested_policy_text() {
|
public static function get_suggested_policy_text() {
|
||||||
$policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );
|
$policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );
|
||||||
$checked = array();
|
$checked = array();
|
||||||
$time = time();
|
$time = time();
|
||||||
$update_cache = false;
|
$update_cache = false;
|
||||||
$new = self::$policy_content;
|
$new = self::$policy_content;
|
||||||
$old = array();
|
$old = array();
|
||||||
|
|
||||||
if ( $policy_page_id ) {
|
if ( $policy_page_id ) {
|
||||||
$old = (array) get_post_meta( $policy_page_id, '_wp_suggested_privacy_policy_content' );
|
$old = (array) get_post_meta( $policy_page_id, '_wp_suggested_privacy_policy_content' );
|
||||||
@ -1516,18 +1520,18 @@ final class WP_Privacy_Policy_Content {
|
|||||||
// Use the new plugin name in case it was changed, translated, etc.
|
// Use the new plugin name in case it was changed, translated, etc.
|
||||||
if ( $old_data['plugin_name'] !== $new_data['plugin_name'] ) {
|
if ( $old_data['plugin_name'] !== $new_data['plugin_name'] ) {
|
||||||
$old_data['plugin_name'] = $new_data['plugin_name'];
|
$old_data['plugin_name'] = $new_data['plugin_name'];
|
||||||
$update_cache = true;
|
$update_cache = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// A plugin was re-activated.
|
// A plugin was re-activated.
|
||||||
if ( ! empty( $old_data['removed'] ) ) {
|
if ( ! empty( $old_data['removed'] ) ) {
|
||||||
unset( $old_data['removed'] );
|
unset( $old_data['removed'] );
|
||||||
$old_data['added'] = $time;
|
$old_data['added'] = $time;
|
||||||
$update_cache = true;
|
$update_cache = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$checked[] = $old_data;
|
$checked[] = $old_data;
|
||||||
$found = true;
|
$found = true;
|
||||||
} elseif ( $new_data['plugin_name'] === $old_data['plugin_name'] ) {
|
} elseif ( $new_data['plugin_name'] === $old_data['plugin_name'] ) {
|
||||||
// The info for the policy was updated.
|
// The info for the policy was updated.
|
||||||
$checked[] = array(
|
$checked[] = array(
|
||||||
@ -1535,7 +1539,7 @@ final class WP_Privacy_Policy_Content {
|
|||||||
'policy_text' => $new_data['policy_text'],
|
'policy_text' => $new_data['policy_text'],
|
||||||
'updated' => $time,
|
'updated' => $time,
|
||||||
);
|
);
|
||||||
$found = $update_cache = true;
|
$found = $update_cache = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $found ) {
|
if ( $found ) {
|
||||||
@ -1636,10 +1640,10 @@ final class WP_Privacy_Policy_Content {
|
|||||||
|
|
||||||
$content_array = self::get_suggested_policy_text();
|
$content_array = self::get_suggested_policy_text();
|
||||||
|
|
||||||
$content = '';
|
$content = '';
|
||||||
$toc = array( '<li><a href="#wp-privacy-policy-guide-introduction">' . __( 'Introduction' ) . '</a></li>' );
|
$toc = array( '<li><a href="#wp-privacy-policy-guide-introduction">' . __( 'Introduction' ) . '</a></li>' );
|
||||||
$date_format = __( 'F j, Y' );
|
$date_format = __( 'F j, Y' );
|
||||||
$copy = __( 'Copy' );
|
$copy = __( 'Copy' );
|
||||||
$return_to_top = '<a href="#" class="return-to-top">' . __( '↑ Return to Top' ) . '</a>';
|
$return_to_top = '<a href="#" class="return-to-top">' . __( '↑ Return to Top' ) . '</a>';
|
||||||
|
|
||||||
foreach ( $content_array as $section ) {
|
foreach ( $content_array as $section ) {
|
||||||
@ -1647,14 +1651,14 @@ final class WP_Privacy_Policy_Content {
|
|||||||
|
|
||||||
if ( ! empty( $section['removed'] ) ) {
|
if ( ! empty( $section['removed'] ) ) {
|
||||||
$class = ' text-removed';
|
$class = ' text-removed';
|
||||||
$date = date_i18n( $date_format, $section['removed'] );
|
$date = date_i18n( $date_format, $section['removed'] );
|
||||||
$meta = sprintf( __( 'Removed %s.' ), $date );
|
$meta = sprintf( __( 'Removed %s.' ), $date );
|
||||||
|
|
||||||
$removed = __( 'You deactivated this plugin on %s and may no longer need this policy.' );
|
$removed = __( 'You deactivated this plugin on %s and may no longer need this policy.' );
|
||||||
$removed = '<div class="error inline"><p>' . sprintf( $removed, $date ) . '</p></div>';
|
$removed = '<div class="error inline"><p>' . sprintf( $removed, $date ) . '</p></div>';
|
||||||
} elseif ( ! empty( $section['updated'] ) ) {
|
} elseif ( ! empty( $section['updated'] ) ) {
|
||||||
$class = ' text-updated';
|
$class = ' text-updated';
|
||||||
$date = date_i18n( $date_format, $section['updated'] );
|
$date = date_i18n( $date_format, $section['updated'] );
|
||||||
$meta = sprintf( __( 'Updated %s.' ), $date );
|
$meta = sprintf( __( 'Updated %s.' ), $date );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1663,8 +1667,8 @@ final class WP_Privacy_Policy_Content {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$plugin_name = esc_html( $section['plugin_name'] );
|
$plugin_name = esc_html( $section['plugin_name'] );
|
||||||
$toc_id = 'wp-privacy-policy-guide-' . sanitize_title( $plugin_name );
|
$toc_id = 'wp-privacy-policy-guide-' . sanitize_title( $plugin_name );
|
||||||
$toc[] = sprintf( '<li><a href="#%1$s">%2$s</a>' . $meta . '</li>', $toc_id, $plugin_name );
|
$toc[] = sprintf( '<li><a href="#%1$s">%2$s</a>' . $meta . '</li>', $toc_id, $plugin_name );
|
||||||
|
|
||||||
$content .= '<div class="privacy-text-section' . $class . '">';
|
$content .= '<div class="privacy-text-section' . $class . '">';
|
||||||
$content .= '<a id="' . $toc_id . '"> </a>';
|
$content .= '<a id="' . $toc_id . '"> </a>';
|
||||||
@ -1676,12 +1680,12 @@ final class WP_Privacy_Policy_Content {
|
|||||||
$content .= $return_to_top;
|
$content .= $return_to_top;
|
||||||
|
|
||||||
if ( empty( $section['removed'] ) ) {
|
if ( empty( $section['removed'] ) ) {
|
||||||
$content .= '<div class="privacy-text-actions">';
|
$content .= '<div class="privacy-text-actions">';
|
||||||
$content .= '<button type="button" class="privacy-text-copy button">';
|
$content .= '<button type="button" class="privacy-text-copy button">';
|
||||||
$content .= $copy;
|
$content .= $copy;
|
||||||
$content .= '<span class="screen-reader-text">' . sprintf( __( 'Copy suggested policy text from %s.' ), $plugin_name ) . '</span>';
|
$content .= '<span class="screen-reader-text">' . sprintf( __( 'Copy suggested policy text from %s.' ), $plugin_name ) . '</span>';
|
||||||
$content .= '</button>';
|
$content .= '</button>';
|
||||||
$content .= '</div>';
|
$content .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= "</div>\n"; // End of .privacy-text-section.
|
$content .= "</div>\n"; // End of .privacy-text-section.
|
||||||
@ -1727,17 +1731,17 @@ final class WP_Privacy_Policy_Content {
|
|||||||
*/
|
*/
|
||||||
public static function get_default_content( $descr = false ) {
|
public static function get_default_content( $descr = false ) {
|
||||||
$suggested_text = $descr ? '<strong class="privacy-policy-tutorial">' . __( 'Suggested text:' ) . ' </strong>' : '';
|
$suggested_text = $descr ? '<strong class="privacy-policy-tutorial">' . __( 'Suggested text:' ) . ' </strong>' : '';
|
||||||
$content = '';
|
$content = '';
|
||||||
|
|
||||||
// Start of the suggested privacy policy text.
|
// Start of the suggested privacy policy text.
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<div class="wp-suggested-text">';
|
'<div class="wp-suggested-text">';
|
||||||
$content .=
|
$content .=
|
||||||
'<h2>' . __( 'Who we are' ) . '</h2>';
|
'<h2>' . __( 'Who we are' ) . '</h2>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this section you should note your site URL, as well as the name of the company, organization, or individual behind it, and some accurate contact information.' ) . '</p>' .
|
'<p class="privacy-policy-tutorial">' . __( 'In this section you should note your site URL, as well as the name of the company, organization, or individual behind it, and some accurate contact information.' ) . '</p>' .
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'The amount of information you may be required to show will vary depending on your local or national business regulations. You may, for example, be required to display a physical address, a registered address, or your company registration number.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'The amount of information you may be required to show will vary depending on your local or national business regulations. You may, for example, be required to display a physical address, a registered address, or your company registration number.' ) . '</p>';
|
||||||
$content .=
|
$content .=
|
||||||
/* translators: %s Site URL */
|
/* translators: %s Site URL */
|
||||||
'<p>' . $suggested_text . sprintf( __( 'Our website address is: %s.' ), get_bloginfo( 'url', 'display' ) ) . '</p>' .
|
'<p>' . $suggested_text . sprintf( __( 'Our website address is: %s.' ), get_bloginfo( 'url', 'display' ) ) . '</p>' .
|
||||||
|
|
||||||
@ -1749,29 +1753,29 @@ final class WP_Privacy_Policy_Content {
|
|||||||
'<p class="privacy-policy-tutorial">' . __( 'Personal data is not just created by a user’s interactions with your site. Personal data is also generated from technical processes such as contact forms, comments, cookies, analytics, and third party embeds.' ) . '</p>' .
|
'<p class="privacy-policy-tutorial">' . __( 'Personal data is not just created by a user’s interactions with your site. Personal data is also generated from technical processes such as contact forms, comments, cookies, analytics, and third party embeds.' ) . '</p>' .
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'By default WordPress does not collect any personal data about visitors, and only collects the data shown on the User Profile screen from registered users. However some of your plugins may collect personal data. You should add the relevant information below.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'By default WordPress does not collect any personal data about visitors, and only collects the data shown on the User Profile screen from registered users. However some of your plugins may collect personal data. You should add the relevant information below.' ) . '</p>';
|
||||||
|
|
||||||
$content .=
|
$content .=
|
||||||
'<h3>' . __( 'Comments' ) . '</h3>';
|
'<h3>' . __( 'Comments' ) . '</h3>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this subsection you should note what information is captured through comments. We have noted the data which WordPress collects by default.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'In this subsection you should note what information is captured through comments. We have noted the data which WordPress collects by default.' ) . '</p>';
|
||||||
$content .=
|
$content .=
|
||||||
'<p>' . $suggested_text . __( 'When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.' ) . '</p>' .
|
'<p>' . $suggested_text . __( 'When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.' ) . '</p>' .
|
||||||
'<p>' . __( 'An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.' ) . '</p>' .
|
'<p>' . __( 'An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.' ) . '</p>' .
|
||||||
|
|
||||||
'<h3>' . __( 'Media' ) . '</h3>';
|
'<h3>' . __( 'Media' ) . '</h3>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this subsection you should note what information may be disclosed by users who can upload media files. All uploaded files are usually publicly accessible.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'In this subsection you should note what information may be disclosed by users who can upload media files. All uploaded files are usually publicly accessible.' ) . '</p>';
|
||||||
$content .=
|
$content .=
|
||||||
'<p>' . $suggested_text . __( 'If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.' ) . '</p>' .
|
'<p>' . $suggested_text . __( 'If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.' ) . '</p>' .
|
||||||
|
|
||||||
'<h3>' . __( 'Contact forms' ) . '</h3>';
|
'<h3>' . __( 'Contact forms' ) . '</h3>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'By default, WordPress does not include a contact form. If you use a contact form plugin, use this subsection to note what personal data is captured when someone submits a contact form, and how long you keep it. For example, you may note that you keep contact form submissions for a certain period for customer service purposes, but you do not use the information submitted through them for marketing purposes.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'By default, WordPress does not include a contact form. If you use a contact form plugin, use this subsection to note what personal data is captured when someone submits a contact form, and how long you keep it. For example, you may note that you keep contact form submissions for a certain period for customer service purposes, but you do not use the information submitted through them for marketing purposes.' ) . '</p>';
|
||||||
|
|
||||||
$content .=
|
$content .=
|
||||||
'<h3>' . __( 'Cookies' ) . '</h3>';
|
'<h3>' . __( 'Cookies' ) . '</h3>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this subsection you should list the cookies your web site uses, including those set by your plugins, social media, and analytics. We have provided the cookies which WordPress installs by default.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'In this subsection you should list the cookies your web site uses, including those set by your plugins, social media, and analytics. We have provided the cookies which WordPress installs by default.' ) . '</p>';
|
||||||
$content .=
|
$content .=
|
||||||
'<p>' . $suggested_text . __( 'If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.' ) . '</p>' .
|
'<p>' . $suggested_text . __( 'If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.' ) . '</p>' .
|
||||||
'<p>' . __( 'If you have an account and you log in to this site, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.' ) . '</p>' .
|
'<p>' . __( 'If you have an account and you log in to this site, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.' ) . '</p>' .
|
||||||
'<p>' . __( 'When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed.' ) . '</p>' .
|
'<p>' . __( 'When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed.' ) . '</p>' .
|
||||||
@ -1786,63 +1790,63 @@ final class WP_Privacy_Policy_Content {
|
|||||||
'<p class="privacy-policy-tutorial">' . __( 'In this subsection you should note what analytics package you use, how users can opt out of analytics tracking, and a link to your analytics provider’s privacy policy, if any.' ) . '</p>' .
|
'<p class="privacy-policy-tutorial">' . __( 'In this subsection you should note what analytics package you use, how users can opt out of analytics tracking, and a link to your analytics provider’s privacy policy, if any.' ) . '</p>' .
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'By default WordPress does not collect any analytics data. However, many web hosting accounts collect some anonymous analytics data. You may also have installed a WordPress plugin that provides analytics services. In that case, add information from that plugin here.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'By default WordPress does not collect any analytics data. However, many web hosting accounts collect some anonymous analytics data. You may also have installed a WordPress plugin that provides analytics services. In that case, add information from that plugin here.' ) . '</p>';
|
||||||
|
|
||||||
$content .=
|
$content .=
|
||||||
'<h2>' . __( 'Who we share your data with' ) . '</h2>';
|
'<h2>' . __( 'Who we share your data with' ) . '</h2>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this section you should name and list all third party providers with whom you share site data, including partners, cloud-based services, payment processors, and third party service providers, and note what data you share with them and why. Link to their own privacy policies if possible.' ) . '</p>' .
|
'<p class="privacy-policy-tutorial">' . __( 'In this section you should name and list all third party providers with whom you share site data, including partners, cloud-based services, payment processors, and third party service providers, and note what data you share with them and why. Link to their own privacy policies if possible.' ) . '</p>' .
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'By default WordPress does not share any personal data with anyone.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'By default WordPress does not share any personal data with anyone.' ) . '</p>';
|
||||||
|
|
||||||
$content .=
|
$content .=
|
||||||
'<h2>' . __( 'How long we retain your data' ) . '</h2>';
|
'<h2>' . __( 'How long we retain your data' ) . '</h2>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this section you should explain how long you retain personal data collected or processed by the web site. While it is your responsibility to come up with the schedule of how long you keep each dataset for and why you keep it, that information does need to be listed here. For example, you may want to say that you keep contact form entries for six months, analytics records for a year, and customer purchase records for ten years.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'In this section you should explain how long you retain personal data collected or processed by the web site. While it is your responsibility to come up with the schedule of how long you keep each dataset for and why you keep it, that information does need to be listed here. For example, you may want to say that you keep contact form entries for six months, analytics records for a year, and customer purchase records for ten years.' ) . '</p>';
|
||||||
$content .=
|
$content .=
|
||||||
'<p>' . $suggested_text . __( 'If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.' ) . '</p>' .
|
'<p>' . $suggested_text . __( 'If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.' ) . '</p>' .
|
||||||
'<p>' . __( 'For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.' ) . '</p>' .
|
'<p>' . __( 'For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.' ) . '</p>' .
|
||||||
|
|
||||||
'<h2>' . __( 'What rights you have over your data' ) . '</h2>';
|
'<h2>' . __( 'What rights you have over your data' ) . '</h2>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this section you should explain what rights your users have over their data and how they can invoke those rights.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'In this section you should explain what rights your users have over their data and how they can invoke those rights.' ) . '</p>';
|
||||||
$content .=
|
$content .=
|
||||||
'<p>' . $suggested_text . __( 'If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.' ) . '</p>' .
|
'<p>' . $suggested_text . __( 'If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.' ) . '</p>' .
|
||||||
|
|
||||||
'<h2>' . __( 'Where we send your data' ) . '</h2>';
|
'<h2>' . __( 'Where we send your data' ) . '</h2>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this section you should list all transfers of your site data outside the European Union and describe the means by which that data is safeguarded to European data protection standards. This could include your web hosting, cloud storage, or other third party services.' ) . '</p>' .
|
'<p class="privacy-policy-tutorial">' . __( 'In this section you should list all transfers of your site data outside the European Union and describe the means by which that data is safeguarded to European data protection standards. This could include your web hosting, cloud storage, or other third party services.' ) . '</p>' .
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'European data protection law requires data about European residents which is transferred outside the European Union to be safeguarded to the same standards as if the data was in Europe. So in addition to listing where data goes, you should describe how you ensure that these standards are met either by yourself or by your third party providers, whether that is through an agreement such as Privacy Shield, model clauses in your contracts, or binding corporate rules.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'European data protection law requires data about European residents which is transferred outside the European Union to be safeguarded to the same standards as if the data was in Europe. So in addition to listing where data goes, you should describe how you ensure that these standards are met either by yourself or by your third party providers, whether that is through an agreement such as Privacy Shield, model clauses in your contracts, or binding corporate rules.' ) . '</p>';
|
||||||
$content .=
|
$content .=
|
||||||
'<p>' . $suggested_text . __( 'Visitor comments may be checked through an automated spam detection service.' ) . '</p>' .
|
'<p>' . $suggested_text . __( 'Visitor comments may be checked through an automated spam detection service.' ) . '</p>' .
|
||||||
|
|
||||||
'<h2>' . __( 'Your contact information' ) . '</h2>';
|
'<h2>' . __( 'Your contact information' ) . '</h2>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this section you should provide a contact method for privacy-specific concerns. If you are required to have a Data Protection Officer, list their name and full contact details here as well.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'In this section you should provide a contact method for privacy-specific concerns. If you are required to have a Data Protection Officer, list their name and full contact details here as well.' ) . '</p>';
|
||||||
|
|
||||||
$content .=
|
$content .=
|
||||||
'<h2>' . __( 'Additional information' ) . '</h2>';
|
'<h2>' . __( 'Additional information' ) . '</h2>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'If you use your site for commercial purposes and you engage in more complex collection or processing of personal data, you should note the following information in your privacy policy in addition to the information we have already discussed.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'If you use your site for commercial purposes and you engage in more complex collection or processing of personal data, you should note the following information in your privacy policy in addition to the information we have already discussed.' ) . '</p>';
|
||||||
|
|
||||||
$content .=
|
$content .=
|
||||||
'<h3>' . __( 'How we protect your data' ) . '</h3>';
|
'<h3>' . __( 'How we protect your data' ) . '</h3>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this section you should explain what measures you have taken to protect your users’ data. This could include technical measures such as encryption; security measures such as two factor authentication; and measures such as staff training in data protection. If you have carried out a Privacy Impact Assessment, you can mention it here too.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'In this section you should explain what measures you have taken to protect your users’ data. This could include technical measures such as encryption; security measures such as two factor authentication; and measures such as staff training in data protection. If you have carried out a Privacy Impact Assessment, you can mention it here too.' ) . '</p>';
|
||||||
|
|
||||||
$content .=
|
$content .=
|
||||||
'<h3>' . __( 'What data breach procedures we have in place' ) . '</h3>';
|
'<h3>' . __( 'What data breach procedures we have in place' ) . '</h3>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'In this section you should explain what procedures you have in place to deal with data breaches, either potential or real, such as internal reporting systems, contact mechanisms, or bug bounties.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'In this section you should explain what procedures you have in place to deal with data breaches, either potential or real, such as internal reporting systems, contact mechanisms, or bug bounties.' ) . '</p>';
|
||||||
|
|
||||||
$content .=
|
$content .=
|
||||||
'<h3>' . __( 'What third parties we receive data from' ) . '</h3>';
|
'<h3>' . __( 'What third parties we receive data from' ) . '</h3>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'If your web site receives data about users from third parties, including advertisers, this information must be included within the section of your privacy policy dealing with third party data.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'If your web site receives data about users from third parties, including advertisers, this information must be included within the section of your privacy policy dealing with third party data.' ) . '</p>';
|
||||||
|
|
||||||
$content .=
|
$content .=
|
||||||
'<h3>' . __( 'What automated decision making and/or profiling we do with user data' ) . '</h3>';
|
'<h3>' . __( 'What automated decision making and/or profiling we do with user data' ) . '</h3>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'If your web site provides a service which includes automated decision making - for example, allowing customers to apply for credit, or aggregating their data into an advertising profile - you must note that this is taking place, and include information about how that information is used, what decisions are made with that aggregated data, and what rights users have over decisions made without human intervention.' ) . '</p>';
|
'<p class="privacy-policy-tutorial">' . __( 'If your web site provides a service which includes automated decision making - for example, allowing customers to apply for credit, or aggregating their data into an advertising profile - you must note that this is taking place, and include information about how that information is used, what decisions are made with that aggregated data, and what rights users have over decisions made without human intervention.' ) . '</p>';
|
||||||
|
|
||||||
$content .=
|
$content .=
|
||||||
'<h3>' . __( 'Industry regulatory disclosure requirements' ) . '</h3>';
|
'<h3>' . __( 'Industry regulatory disclosure requirements' ) . '</h3>';
|
||||||
$descr && $content .=
|
$descr && $content .=
|
||||||
'<p class="privacy-policy-tutorial">' . __( 'If you are a member of a regulated industry, or if you are subject to additional privacy laws, you may be required to disclose that information here.' ) . '</p>' .
|
'<p class="privacy-policy-tutorial">' . __( 'If you are a member of a regulated industry, or if you are subject to additional privacy laws, you may be required to disclose that information here.' ) . '</p>' .
|
||||||
|
@ -961,11 +961,11 @@ function can_edit_network( $network_id ) {
|
|||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function _thickbox_path_admin_subfolder() {
|
function _thickbox_path_admin_subfolder() {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var tb_pathToImage = "<?php echo includes_url( 'js/thickbox/loadingAnimation.gif', 'relative' ); ?>";
|
var tb_pathToImage = "<?php echo includes_url( 'js/thickbox/loadingAnimation.gif', 'relative' ); ?>";
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1065,7 +1065,7 @@ function confirm_delete_users( $users ) {
|
|||||||
<td><fieldset><p><legend><?php _e( 'User has no sites or content and will be deleted.' ); ?></legend></p>
|
<td><fieldset><p><legend><?php _e( 'User has no sites or content and will be deleted.' ); ?></legend></p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1076,7 +1076,7 @@ function confirm_delete_users( $users ) {
|
|||||||
do_action( 'delete_user_form', $current_user, $allusers );
|
do_action( 'delete_user_form', $current_user, $allusers );
|
||||||
|
|
||||||
if ( 1 == count( $users ) ) :
|
if ( 1 == count( $users ) ) :
|
||||||
?>
|
?>
|
||||||
<p><?php _e( 'Once you hit “Confirm Deletion”, the user will be permanently removed.' ); ?></p>
|
<p><?php _e( 'Once you hit “Confirm Deletion”, the user will be permanently removed.' ); ?></p>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<p><?php _e( 'Once you hit “Confirm Deletion”, these users will be permanently removed.' ); ?></p>
|
<p><?php _e( 'Once you hit “Confirm Deletion”, these users will be permanently removed.' ); ?></p>
|
||||||
@ -1084,7 +1084,7 @@ function confirm_delete_users( $users ) {
|
|||||||
endif;
|
endif;
|
||||||
|
|
||||||
submit_button( __( 'Confirm Deletion' ), 'primary' );
|
submit_button( __( 'Confirm Deletion' ), 'primary' );
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
return true;
|
return true;
|
||||||
@ -1096,7 +1096,7 @@ function confirm_delete_users( $users ) {
|
|||||||
* @since 4.1.0
|
* @since 4.1.0
|
||||||
*/
|
*/
|
||||||
function network_settings_add_js() {
|
function network_settings_add_js() {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready( function($) {
|
jQuery(document).ready( function($) {
|
||||||
var languageSelect = $( '#WPLANG' );
|
var languageSelect = $( '#WPLANG' );
|
||||||
@ -1109,7 +1109,7 @@ jQuery(document).ready( function($) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1147,7 +1147,8 @@ function network_edit_site_nav( $args = array() ) {
|
|||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
$links = apply_filters(
|
$links = apply_filters(
|
||||||
'network_edit_site_nav_links', array(
|
'network_edit_site_nav_links',
|
||||||
|
array(
|
||||||
'site-info' => array(
|
'site-info' => array(
|
||||||
'label' => __( 'Info' ),
|
'label' => __( 'Info' ),
|
||||||
'url' => 'site-info.php',
|
'url' => 'site-info.php',
|
||||||
@ -1173,7 +1174,8 @@ function network_edit_site_nav( $args = array() ) {
|
|||||||
|
|
||||||
// Parse arguments
|
// Parse arguments
|
||||||
$r = wp_parse_args(
|
$r = wp_parse_args(
|
||||||
$args, array(
|
$args,
|
||||||
|
array(
|
||||||
'blog_id' => isset( $_GET['blog_id'] ) ? (int) $_GET['blog_id'] : 0,
|
'blog_id' => isset( $_GET['blog_id'] ) ? (int) $_GET['blog_id'] : 0,
|
||||||
'links' => $links,
|
'links' => $links,
|
||||||
'selected' => 'site-info',
|
'selected' => 'site-info',
|
||||||
|
@ -105,7 +105,8 @@ function _wp_ajax_menu_quick_search( $request = array() ) {
|
|||||||
}
|
}
|
||||||
} elseif ( 'taxonomy' == $matches[1] ) {
|
} elseif ( 'taxonomy' == $matches[1] ) {
|
||||||
$terms = get_terms(
|
$terms = get_terms(
|
||||||
$matches[2], array(
|
$matches[2],
|
||||||
|
array(
|
||||||
'name__like' => $query,
|
'name__like' => $query,
|
||||||
'number' => 10,
|
'number' => 10,
|
||||||
)
|
)
|
||||||
@ -149,7 +150,8 @@ function wp_nav_menu_setup() {
|
|||||||
if ( false === get_user_option( 'managenav-menuscolumnshidden' ) ) {
|
if ( false === get_user_option( 'managenav-menuscolumnshidden' ) ) {
|
||||||
$user = wp_get_current_user();
|
$user = wp_get_current_user();
|
||||||
update_user_option(
|
update_user_option(
|
||||||
$user->ID, 'managenav-menuscolumnshidden',
|
$user->ID,
|
||||||
|
'managenav-menuscolumnshidden',
|
||||||
array(
|
array(
|
||||||
0 => 'link-target',
|
0 => 'link-target',
|
||||||
1 => 'css-classes',
|
1 => 'css-classes',
|
||||||
@ -439,7 +441,8 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
|
|||||||
<ul id="<?php echo $post_type_name; ?>checklist-most-recent" class="categorychecklist form-no-clear">
|
<ul id="<?php echo $post_type_name; ?>checklist-most-recent" class="categorychecklist form-no-clear">
|
||||||
<?php
|
<?php
|
||||||
$recent_args = array_merge(
|
$recent_args = array_merge(
|
||||||
$args, array(
|
$args,
|
||||||
|
array(
|
||||||
'orderby' => 'post_date',
|
'orderby' => 'post_date',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'posts_per_page' => 15,
|
'posts_per_page' => 15,
|
||||||
@ -530,7 +533,8 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
|
|||||||
} else {
|
} else {
|
||||||
$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;
|
$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;
|
||||||
array_unshift(
|
array_unshift(
|
||||||
$posts, (object) array(
|
$posts,
|
||||||
|
(object) array(
|
||||||
'front_or_home' => true,
|
'front_or_home' => true,
|
||||||
'ID' => 0,
|
'ID' => 0,
|
||||||
'object_id' => $_nav_menu_placeholder,
|
'object_id' => $_nav_menu_placeholder,
|
||||||
@ -551,7 +555,8 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
|
|||||||
if ( $post_type->has_archive ) {
|
if ( $post_type->has_archive ) {
|
||||||
$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;
|
$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1;
|
||||||
array_unshift(
|
array_unshift(
|
||||||
$posts, (object) array(
|
$posts,
|
||||||
|
(object) array(
|
||||||
'ID' => 0,
|
'ID' => 0,
|
||||||
'object_id' => $_nav_menu_placeholder,
|
'object_id' => $_nav_menu_placeholder,
|
||||||
'object' => $post_type_name,
|
'object' => $post_type_name,
|
||||||
@ -677,8 +682,10 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
|
|||||||
|
|
||||||
$num_pages = ceil(
|
$num_pages = ceil(
|
||||||
wp_count_terms(
|
wp_count_terms(
|
||||||
$taxonomy_name, array_merge(
|
$taxonomy_name,
|
||||||
$args, array(
|
array_merge(
|
||||||
|
$args,
|
||||||
|
array(
|
||||||
'number' => '',
|
'number' => '',
|
||||||
'offset' => '',
|
'offset' => '',
|
||||||
)
|
)
|
||||||
@ -763,7 +770,8 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
|
|||||||
<ul id="<?php echo $taxonomy_name; ?>checklist-pop" class="categorychecklist form-no-clear" >
|
<ul id="<?php echo $taxonomy_name; ?>checklist-pop" class="categorychecklist form-no-clear" >
|
||||||
<?php
|
<?php
|
||||||
$popular_terms = get_terms(
|
$popular_terms = get_terms(
|
||||||
$taxonomy_name, array(
|
$taxonomy_name,
|
||||||
|
array(
|
||||||
'orderby' => 'count',
|
'orderby' => 'count',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'number' => 10,
|
'number' => 10,
|
||||||
@ -800,7 +808,8 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
|
|||||||
if ( isset( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] ) ) {
|
if ( isset( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] ) ) {
|
||||||
$searched = esc_attr( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] );
|
$searched = esc_attr( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] );
|
||||||
$search_results = get_terms(
|
$search_results = get_terms(
|
||||||
$taxonomy_name, array(
|
$taxonomy_name,
|
||||||
|
array(
|
||||||
'name__like' => $searched,
|
'name__like' => $searched,
|
||||||
'fields' => 'all',
|
'fields' => 'all',
|
||||||
'orderby' => 'count',
|
'orderby' => 'count',
|
||||||
@ -1096,7 +1105,8 @@ function _wp_delete_orphaned_draft_menu_items() {
|
|||||||
*/
|
*/
|
||||||
function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ) {
|
function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ) {
|
||||||
$unsorted_menu_items = wp_get_nav_menu_items(
|
$unsorted_menu_items = wp_get_nav_menu_items(
|
||||||
$nav_menu_selected_id, array(
|
$nav_menu_selected_id,
|
||||||
|
array(
|
||||||
'orderby' => 'ID',
|
'orderby' => 'ID',
|
||||||
'output' => ARRAY_A,
|
'output' => ARRAY_A,
|
||||||
'output_key' => 'ID',
|
'output_key' => 'ID',
|
||||||
|
@ -217,7 +217,7 @@ function network_step1( $errors = false ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( allow_subdomain_install() && allow_subdirectory_install() ) :
|
if ( allow_subdomain_install() && allow_subdirectory_install() ) :
|
||||||
?>
|
?>
|
||||||
<h3><?php esc_html_e( 'Addresses of Sites in your Network' ); ?></h3>
|
<h3><?php esc_html_e( 'Addresses of Sites in your Network' ); ?></h3>
|
||||||
<p><?php _e( 'Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.' ); ?>
|
<p><?php _e( 'Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories.' ); ?>
|
||||||
<strong><?php _e( 'You cannot change this later.' ); ?></strong></p>
|
<strong><?php _e( 'You cannot change this later.' ); ?></strong></p>
|
||||||
@ -250,7 +250,7 @@ function network_step1( $errors = false ) {
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
if ( WP_CONTENT_DIR != ABSPATH . 'wp-content' && ( allow_subdirectory_install() || ! allow_subdomain_install() ) ) {
|
if ( WP_CONTENT_DIR != ABSPATH . 'wp-content' && ( allow_subdirectory_install() || ! allow_subdomain_install() ) ) {
|
||||||
@ -282,7 +282,7 @@ function network_step1( $errors = false ) {
|
|||||||
__( 'The internet address of your network will be %s.' ),
|
__( 'The internet address of your network will be %s.' ),
|
||||||
'<code>' . $hostname . '</code>'
|
'<code>' . $hostname . '</code>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -411,15 +411,15 @@ function network_step2( $errors = false ) {
|
|||||||
} else {
|
} else {
|
||||||
if ( is_multisite() ) {
|
if ( is_multisite() ) {
|
||||||
$subdomain_install = is_subdomain_install();
|
$subdomain_install = is_subdomain_install();
|
||||||
?>
|
?>
|
||||||
<p><?php _e( 'The original configuration steps are shown here for reference.' ); ?></p>
|
<p><?php _e( 'The original configuration steps are shown here for reference.' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
$subdomain_install = (bool) $wpdb->get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" );
|
$subdomain_install = (bool) $wpdb->get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" );
|
||||||
?>
|
?>
|
||||||
<div class="error"><p><strong><?php _e( 'Warning:' ); ?></strong> <?php _e( 'An existing WordPress network was detected.' ); ?></p></div>
|
<div class="error"><p><strong><?php _e( 'Warning:' ); ?></strong> <?php _e( 'An existing WordPress network was detected.' ); ?></p></div>
|
||||||
<p><?php _e( 'Please complete the configuration steps. To create a new network, you will need to empty or remove the network database tables.' ); ?></p>
|
<p><?php _e( 'Please complete the configuration steps. To create a new network, you will need to empty or remove the network database tables.' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,7 +428,7 @@ function network_step2( $errors = false ) {
|
|||||||
$subdir_replacement_12 = $subdomain_install ? '$1' : '$2';
|
$subdir_replacement_12 = $subdomain_install ? '$1' : '$2';
|
||||||
|
|
||||||
if ( $_POST || ! is_multisite() ) {
|
if ( $_POST || ! is_multisite() ) {
|
||||||
?>
|
?>
|
||||||
<h3><?php esc_html_e( 'Enabling the Network' ); ?></h3>
|
<h3><?php esc_html_e( 'Enabling the Network' ); ?></h3>
|
||||||
<p><?php _e( 'Complete the following steps to enable the features for creating a network of sites.' ); ?></p>
|
<p><?php _e( 'Complete the following steps to enable the features for creating a network of sites.' ); ?></p>
|
||||||
<div class="updated inline"><p>
|
<div class="updated inline"><p>
|
||||||
@ -459,9 +459,9 @@ function network_step2( $errors = false ) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</p></div>
|
</p></div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<ol>
|
<ol>
|
||||||
<li><p>
|
<li><p>
|
||||||
<?php
|
<?php
|
||||||
@ -487,7 +487,7 @@ define('PATH_CURRENT_SITE', '<?php echo $base; ?>');
|
|||||||
define('SITE_ID_CURRENT_SITE', 1);
|
define('SITE_ID_CURRENT_SITE', 1);
|
||||||
define('BLOG_ID_CURRENT_SITE', 1);
|
define('BLOG_ID_CURRENT_SITE', 1);
|
||||||
</textarea>
|
</textarea>
|
||||||
<?php
|
<?php
|
||||||
$keys_salts = array(
|
$keys_salts = array(
|
||||||
'AUTH_KEY' => '',
|
'AUTH_KEY' => '',
|
||||||
'SECURE_AUTH_KEY' => '',
|
'SECURE_AUTH_KEY' => '',
|
||||||
@ -498,58 +498,58 @@ define('BLOG_ID_CURRENT_SITE', 1);
|
|||||||
'LOGGED_IN_SALT' => '',
|
'LOGGED_IN_SALT' => '',
|
||||||
'NONCE_SALT' => '',
|
'NONCE_SALT' => '',
|
||||||
);
|
);
|
||||||
foreach ( $keys_salts as $c => $v ) {
|
foreach ( $keys_salts as $c => $v ) {
|
||||||
if ( defined( $c ) ) {
|
if ( defined( $c ) ) {
|
||||||
unset( $keys_salts[ $c ] );
|
unset( $keys_salts[ $c ] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! empty( $keys_salts ) ) {
|
if ( ! empty( $keys_salts ) ) {
|
||||||
$keys_salts_str = '';
|
$keys_salts_str = '';
|
||||||
$from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' );
|
$from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' );
|
||||||
if ( is_wp_error( $from_api ) ) {
|
if ( is_wp_error( $from_api ) ) {
|
||||||
foreach ( $keys_salts as $c => $v ) {
|
foreach ( $keys_salts as $c => $v ) {
|
||||||
$keys_salts_str .= "\ndefine( '$c', '" . wp_generate_password( 64, true, true ) . "' );";
|
$keys_salts_str .= "\ndefine( '$c', '" . wp_generate_password( 64, true, true ) . "' );";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$from_api = explode( "\n", wp_remote_retrieve_body( $from_api ) );
|
||||||
|
foreach ( $keys_salts as $c => $v ) {
|
||||||
|
$keys_salts_str .= "\ndefine( '$c', '" . substr( array_shift( $from_api ), 28, 64 ) . "' );";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
$num_keys_salts = count( $keys_salts );
|
||||||
$from_api = explode( "\n", wp_remote_retrieve_body( $from_api ) );
|
?>
|
||||||
foreach ( $keys_salts as $c => $v ) {
|
|
||||||
$keys_salts_str .= "\ndefine( '$c', '" . substr( array_shift( $from_api ), 28, 64 ) . "' );";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$num_keys_salts = count( $keys_salts );
|
|
||||||
?>
|
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
if ( 1 == $num_keys_salts ) {
|
if ( 1 == $num_keys_salts ) {
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: wp-config.php */
|
/* translators: %s: wp-config.php */
|
||||||
__( 'This unique authentication key is also missing from your %s file.' ),
|
__( 'This unique authentication key is also missing from your %s file.' ),
|
||||||
'<code>wp-config.php</code>'
|
'<code>wp-config.php</code>'
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: wp-config.php */
|
/* translators: %s: wp-config.php */
|
||||||
__( 'These unique authentication keys are also missing from your %s file.' ),
|
__( 'These unique authentication keys are also missing from your %s file.' ),
|
||||||
'<code>wp-config.php</code>'
|
'<code>wp-config.php</code>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php _e( 'To make your installation more secure, you should also add:' ); ?>
|
<?php _e( 'To make your installation more secure, you should also add:' ); ?>
|
||||||
</p>
|
</p>
|
||||||
<textarea class="code" readonly="readonly" cols="100" rows="<?php echo $num_keys_salts; ?>"><?php echo esc_textarea( $keys_salts_str ); ?></textarea>
|
<textarea class="code" readonly="readonly" cols="100" rows="<?php echo $num_keys_salts; ?>"><?php echo esc_textarea( $keys_salts_str ); ?></textarea>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
if ( iis7_supports_permalinks() ) :
|
if ( iis7_supports_permalinks() ) :
|
||||||
// IIS doesn't support RewriteBase, all your RewriteBase are belong to us
|
// IIS doesn't support RewriteBase, all your RewriteBase are belong to us
|
||||||
$iis_subdir_match = ltrim( $base, '/' ) . $subdir_match;
|
$iis_subdir_match = ltrim( $base, '/' ) . $subdir_match;
|
||||||
$iis_rewrite_base = ltrim( $base, '/' ) . $rewrite_base;
|
$iis_rewrite_base = ltrim( $base, '/' ) . $rewrite_base;
|
||||||
$iis_subdir_replacement = $subdomain_install ? '' : '{R:1}';
|
$iis_subdir_replacement = $subdomain_install ? '' : '{R:1}';
|
||||||
|
|
||||||
$web_config_file = '<?xml version="1.0" encoding="UTF-8"?>
|
$web_config_file = '<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
<rewrite>
|
<rewrite>
|
||||||
@ -558,13 +558,13 @@ if ( iis7_supports_permalinks() ) :
|
|||||||
<match url="^index\.php$" ignoreCase="false" />
|
<match url="^index\.php$" ignoreCase="false" />
|
||||||
<action type="None" />
|
<action type="None" />
|
||||||
</rule>';
|
</rule>';
|
||||||
if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) {
|
if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) {
|
||||||
$web_config_file .= '
|
$web_config_file .= '
|
||||||
<rule name="WordPress Rule for Files" stopProcessing="true">
|
<rule name="WordPress Rule for Files" stopProcessing="true">
|
||||||
<match url="^' . $iis_subdir_match . 'files/(.+)" ignoreCase="false" />
|
<match url="^' . $iis_subdir_match . 'files/(.+)" ignoreCase="false" />
|
||||||
<action type="Rewrite" url="' . $iis_rewrite_base . WPINC . '/ms-files.php?file={R:1}" appendQueryString="false" />
|
<action type="Rewrite" url="' . $iis_rewrite_base . WPINC . '/ms-files.php?file={R:1}" appendQueryString="false" />
|
||||||
</rule>';
|
</rule>';
|
||||||
}
|
}
|
||||||
$web_config_file .= '
|
$web_config_file .= '
|
||||||
<rule name="WordPress Rule 2" stopProcessing="true">
|
<rule name="WordPress Rule 2" stopProcessing="true">
|
||||||
<match url="^' . $iis_subdir_match . 'wp-admin$" ignoreCase="false" />
|
<match url="^' . $iis_subdir_match . 'wp-admin$" ignoreCase="false" />
|
||||||
@ -603,16 +603,16 @@ if ( iis7_supports_permalinks() ) :
|
|||||||
'<code>web.config</code>',
|
'<code>web.config</code>',
|
||||||
'<code>' . $home_path . '</code>'
|
'<code>' . $home_path . '</code>'
|
||||||
);
|
);
|
||||||
echo '</p>';
|
echo '</p>';
|
||||||
if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) {
|
if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) {
|
||||||
echo '<p><strong>' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
|
echo '<p><strong>' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<textarea class="code" readonly="readonly" cols="100" rows="20"><?php echo esc_textarea( $web_config_file ); ?>
|
<textarea class="code" readonly="readonly" cols="100" rows="20"><?php echo esc_textarea( $web_config_file ); ?>
|
||||||
</textarea></li>
|
</textarea></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
else : // end iis7_supports_permalinks(). construct an htaccess file instead:
|
else : // end iis7_supports_permalinks(). construct an htaccess file instead:
|
||||||
|
|
||||||
$ms_files_rewriting = '';
|
$ms_files_rewriting = '';
|
||||||
@ -651,15 +651,15 @@ EOF;
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<textarea class="code" readonly="readonly" cols="100" rows="<?php echo substr_count( $htaccess_file, "\n" ) + 1; ?>">
|
<textarea class="code" readonly="readonly" cols="100" rows="<?php echo substr_count( $htaccess_file, "\n" ) + 1; ?>">
|
||||||
<?php echo esc_textarea( $htaccess_file ); ?></textarea></li>
|
<?php echo esc_textarea( $htaccess_file ); ?></textarea></li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endif; // end IIS/Apache code branches.
|
endif; // end IIS/Apache code branches.
|
||||||
|
|
||||||
if ( ! is_multisite() ) {
|
if ( ! is_multisite() ) {
|
||||||
?>
|
?>
|
||||||
<p><?php _e( 'Once you complete these steps, your network is enabled and configured. You will have to log in again.' ); ?> <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log In' ); ?></a></p>
|
<p><?php _e( 'Once you complete these steps, your network is enabled and configured. You will have to log in again.' ); ?> <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log In' ); ?></a></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* @since 4.2.0
|
* @since 4.2.0
|
||||||
*/
|
*/
|
||||||
function options_discussion_add_js() {
|
function options_discussion_add_js() {
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
(function($){
|
(function($){
|
||||||
var parent = $( '#show_avatars' ),
|
var parent = $( '#show_avatars' ),
|
||||||
@ -23,7 +23,7 @@ function options_discussion_add_js() {
|
|||||||
});
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,7 +32,7 @@ function options_discussion_add_js() {
|
|||||||
* @since 3.5.0
|
* @since 3.5.0
|
||||||
*/
|
*/
|
||||||
function options_general_add_js() {
|
function options_general_add_js() {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
var $siteName = $( '#wp-admin-bar-site-name' ).children( 'a' ).first(),
|
var $siteName = $( '#wp-admin-bar-site-name' ).children( 'a' ).first(),
|
||||||
@ -88,7 +88,7 @@ function options_general_add_js() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -97,7 +97,7 @@ function options_general_add_js() {
|
|||||||
* @since 3.5.0
|
* @since 3.5.0
|
||||||
*/
|
*/
|
||||||
function options_reading_add_js() {
|
function options_reading_add_js() {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
var section = $('#front-static-pages'),
|
var section = $('#front-static-pages'),
|
||||||
@ -110,7 +110,7 @@ function options_reading_add_js() {
|
|||||||
section.find('input:radio').change(check_disabled);
|
section.find('input:radio').change(check_disabled);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -288,7 +288,8 @@ function install_dashboard() {
|
|||||||
$tags[ $tag['name'] ] = (object) $data;
|
$tags[ $tag['name'] ] = (object) $data;
|
||||||
}
|
}
|
||||||
echo wp_generate_tag_cloud(
|
echo wp_generate_tag_cloud(
|
||||||
$tags, array(
|
$tags,
|
||||||
|
array(
|
||||||
'single_text' => __( '%s plugin' ),
|
'single_text' => __( '%s plugin' ),
|
||||||
'multiple_text' => __( '%s plugins' ),
|
'multiple_text' => __( '%s plugins' ),
|
||||||
)
|
)
|
||||||
@ -331,7 +332,7 @@ function install_search_form( $deprecated = true ) {
|
|||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
function install_plugins_upload() {
|
function install_plugins_upload() {
|
||||||
?>
|
?>
|
||||||
<div class="upload-plugin">
|
<div class="upload-plugin">
|
||||||
<p class="install-help"><?php _e( 'If you have a plugin in a .zip format, you may install it by uploading it here.' ); ?></p>
|
<p class="install-help"><?php _e( 'If you have a plugin in a .zip format, you may install it by uploading it here.' ); ?></p>
|
||||||
<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-plugin' ); ?>">
|
<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-plugin' ); ?>">
|
||||||
@ -341,7 +342,7 @@ function install_plugins_upload() {
|
|||||||
<?php submit_button( __( 'Install Now' ), '', 'install-plugin-submit', false ); ?>
|
<?php submit_button( __( 'Install Now' ), '', 'install-plugin-submit', false ); ?>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -501,8 +502,9 @@ function install_plugin_information() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$api = plugins_api(
|
$api = plugins_api(
|
||||||
'plugin_information', array(
|
'plugin_information',
|
||||||
'slug' => wp_unslash( $_REQUEST['plugin'] ),
|
array(
|
||||||
|
'slug' => wp_unslash( $_REQUEST['plugin'] ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -690,13 +692,13 @@ function install_plugin_information() {
|
|||||||
'number' => $api->num_ratings,
|
'number' => $api->num_ratings,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<p aria-hidden="true" class="fyi-description"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></p>
|
<p aria-hidden="true" class="fyi-description"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
|
if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
|
||||||
?>
|
?>
|
||||||
<h3><?php _e( 'Reviews' ); ?></h3>
|
<h3><?php _e( 'Reviews' ); ?></h3>
|
||||||
<p class="fyi-description"><?php _e( 'Read all reviews on WordPress.org or write your own!' ); ?></p>
|
<p class="fyi-description"><?php _e( 'Read all reviews on WordPress.org or write your own!' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
@ -726,7 +728,7 @@ if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ! empty( $api->contributors ) ) {
|
if ( ! empty( $api->contributors ) ) {
|
||||||
?>
|
?>
|
||||||
<h3><?php _e( 'Contributors' ); ?></h3>
|
<h3><?php _e( 'Contributors' ); ?></h3>
|
||||||
<ul class="contributors">
|
<ul class="contributors">
|
||||||
<?php
|
<?php
|
||||||
@ -738,7 +740,7 @@ if ( ! empty( $api->contributors ) ) {
|
|||||||
$contrib_name = esc_html( $contrib_name );
|
$contrib_name = esc_html( $contrib_name );
|
||||||
|
|
||||||
$contrib_profile = esc_url( $contrib_details['profile'] );
|
$contrib_profile = esc_url( $contrib_details['profile'] );
|
||||||
$contrib_avatar = esc_url( add_query_arg( 's', '36', $contrib_details['avatar'] ) );
|
$contrib_avatar = esc_url( add_query_arg( 's', '36', $contrib_details['avatar'] ) );
|
||||||
|
|
||||||
echo "<li><a href='{$contrib_profile}' target='_blank'><img src='{$contrib_avatar}' width='18' height='18' alt='' />{$contrib_name}</a></li>";
|
echo "<li><a href='{$contrib_profile}' target='_blank'><img src='{$contrib_avatar}' width='18' height='18' alt='' />{$contrib_name}</a></li>";
|
||||||
}
|
}
|
||||||
|
@ -239,7 +239,8 @@ function edit_post( $post_data = null ) {
|
|||||||
|
|
||||||
if ( post_type_supports( $ptype->name, 'revisions' ) ) {
|
if ( post_type_supports( $ptype->name, 'revisions' ) ) {
|
||||||
$revisions = wp_get_post_revisions(
|
$revisions = wp_get_post_revisions(
|
||||||
$post_ID, array(
|
$post_ID,
|
||||||
|
array(
|
||||||
'order' => 'ASC',
|
'order' => 'ASC',
|
||||||
'posts_per_page' => 1,
|
'posts_per_page' => 1,
|
||||||
)
|
)
|
||||||
@ -955,8 +956,10 @@ function has_meta( $postid ) {
|
|||||||
$wpdb->prepare(
|
$wpdb->prepare(
|
||||||
"SELECT meta_key, meta_value, meta_id, post_id
|
"SELECT meta_key, meta_value, meta_id, post_id
|
||||||
FROM $wpdb->postmeta WHERE post_id = %d
|
FROM $wpdb->postmeta WHERE post_id = %d
|
||||||
ORDER BY meta_key,meta_id", $postid
|
ORDER BY meta_key,meta_id",
|
||||||
), ARRAY_A
|
$postid
|
||||||
|
),
|
||||||
|
ARRAY_A
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1701,7 +1704,7 @@ function _admin_notice_post_locked() {
|
|||||||
<a class="button" href="<?php echo esc_url( $sendback ); ?>"><?php echo $sendback_text; ?></a>
|
<a class="button" href="<?php echo esc_url( $sendback ); ?>"><?php echo $sendback_text; ?></a>
|
||||||
<?php if ( $preview_link ) { ?>
|
<?php if ( $preview_link ) { ?>
|
||||||
<a class="button<?php echo $tab_last; ?>" href="<?php echo esc_url( $preview_link ); ?>"><?php _e( 'Preview' ); ?></a>
|
<a class="button<?php echo $tab_last; ?>" href="<?php echo esc_url( $preview_link ); ?>"><?php _e( 'Preview' ); ?></a>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow plugins to prevent some users overriding the post lock
|
// Allow plugins to prevent some users overriding the post lock
|
||||||
@ -1711,7 +1714,7 @@ if ( $override ) {
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
@ -2002,7 +2005,8 @@ function taxonomy_meta_box_sanitize_cb_input( $taxonomy, $terms ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$_term = get_terms(
|
$_term = get_terms(
|
||||||
$taxonomy, array(
|
$taxonomy,
|
||||||
|
array(
|
||||||
'name' => $term,
|
'name' => $term,
|
||||||
'fields' => 'ids',
|
'fields' => 'ids',
|
||||||
'hide_empty' => false,
|
'hide_empty' => false,
|
||||||
|
@ -110,7 +110,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
|
|||||||
if ( ! $diff && 'post_title' === $field ) {
|
if ( ! $diff && 'post_title' === $field ) {
|
||||||
// It's a better user experience to still show the Title, even if it didn't change.
|
// It's a better user experience to still show the Title, even if it didn't change.
|
||||||
// No, you didn't see this.
|
// No, you didn't see this.
|
||||||
$diff = '<table class="diff"><colgroup><col class="content diffsplit left"><col class="content diffsplit middle"><col class="content diffsplit right"></colgroup><tbody><tr>';
|
$diff = '<table class="diff"><colgroup><col class="content diffsplit left"><col class="content diffsplit middle"><col class="content diffsplit right"></colgroup><tbody><tr>';
|
||||||
|
|
||||||
// In split screen mode, show the title before/after side by side.
|
// In split screen mode, show the title before/after side by side.
|
||||||
if ( true === $args['show_split_view'] ) {
|
if ( true === $args['show_split_view'] ) {
|
||||||
@ -124,7 +124,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$diff .= '</tr></tbody>';
|
$diff .= '</tr></tbody>';
|
||||||
$diff .= '</table>';
|
$diff .= '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,8 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
|
|||||||
$now_gmt = time();
|
$now_gmt = time();
|
||||||
|
|
||||||
$revisions = wp_get_post_revisions(
|
$revisions = wp_get_post_revisions(
|
||||||
$post->ID, array(
|
$post->ID,
|
||||||
|
array(
|
||||||
'order' => 'ASC',
|
'order' => 'ASC',
|
||||||
'check_enabled' => false,
|
'check_enabled' => false,
|
||||||
)
|
)
|
||||||
@ -194,7 +195,9 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null
|
|||||||
$modified_gmt = strtotime( $revision->post_modified_gmt . ' +0000' );
|
$modified_gmt = strtotime( $revision->post_modified_gmt . ' +0000' );
|
||||||
if ( $can_restore ) {
|
if ( $can_restore ) {
|
||||||
$restore_link = str_replace(
|
$restore_link = str_replace(
|
||||||
'&', '&', wp_nonce_url(
|
'&',
|
||||||
|
'&',
|
||||||
|
wp_nonce_url(
|
||||||
add_query_arg(
|
add_query_arg(
|
||||||
array(
|
array(
|
||||||
'revision' => $revision->ID,
|
'revision' => $revision->ID,
|
||||||
@ -394,7 +397,7 @@ function wp_print_revision_templates() {
|
|||||||
__( 'Autosave by %s' ),
|
__( 'Autosave by %s' ),
|
||||||
'<span class="author-name">{{ data.attributes.author.name }}</span>'
|
'<span class="author-name">{{ data.attributes.author.name }}</span>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
<# } else if ( data.attributes.current ) { #>
|
<# } else if ( data.attributes.current ) { #>
|
||||||
<span class="byline">
|
<span class="byline">
|
||||||
@ -403,7 +406,7 @@ function wp_print_revision_templates() {
|
|||||||
__( 'Current Revision by %s' ),
|
__( 'Current Revision by %s' ),
|
||||||
'<span class="author-name">{{ data.attributes.author.name }}</span>'
|
'<span class="author-name">{{ data.attributes.author.name }}</span>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
<# } else { #>
|
<# } else { #>
|
||||||
<span class="byline">
|
<span class="byline">
|
||||||
@ -412,7 +415,7 @@ function wp_print_revision_templates() {
|
|||||||
__( 'Revision by %s' ),
|
__( 'Revision by %s' ),
|
||||||
'<span class="author-name">{{ data.attributes.author.name }}</span>'
|
'<span class="author-name">{{ data.attributes.author.name }}</span>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
<# } #>
|
<# } #>
|
||||||
<span class="time-ago">{{ data.attributes.timeAgo }}</span>
|
<span class="time-ago">{{ data.attributes.timeAgo }}</span>
|
||||||
|
@ -1027,7 +1027,8 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam
|
|||||||
|
|
||||||
if ( 1 == $network_id ) {
|
if ( 1 == $network_id ) {
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->site, array(
|
$wpdb->site,
|
||||||
|
array(
|
||||||
'domain' => $domain,
|
'domain' => $domain,
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
)
|
)
|
||||||
@ -1035,7 +1036,8 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam
|
|||||||
$network_id = $wpdb->insert_id;
|
$network_id = $wpdb->insert_id;
|
||||||
} else {
|
} else {
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->site, array(
|
$wpdb->site,
|
||||||
|
array(
|
||||||
'domain' => $domain,
|
'domain' => $domain,
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
'id' => $network_id,
|
'id' => $network_id,
|
||||||
@ -1082,7 +1084,7 @@ We hope you enjoy your new site. Thanks!
|
|||||||
--The Team @ SITE_NAME'
|
--The Team @ SITE_NAME'
|
||||||
);
|
);
|
||||||
|
|
||||||
$misc_exts = array(
|
$misc_exts = array(
|
||||||
// Images.
|
// Images.
|
||||||
'jpg',
|
'jpg',
|
||||||
'jpeg',
|
'jpeg',
|
||||||
@ -1179,7 +1181,8 @@ We hope you enjoy your new site. Thanks!
|
|||||||
$current_site->path = $path;
|
$current_site->path = $path;
|
||||||
$current_site->site_name = ucfirst( $domain );
|
$current_site->site_name = ucfirst( $domain );
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->blogs, array(
|
$wpdb->blogs,
|
||||||
|
array(
|
||||||
'site_id' => $network_id,
|
'site_id' => $network_id,
|
||||||
'blog_id' => 1,
|
'blog_id' => 1,
|
||||||
'domain' => $domain,
|
'domain' => $domain,
|
||||||
@ -1207,7 +1210,8 @@ We hope you enjoy your new site. Thanks!
|
|||||||
$errstr = '';
|
$errstr = '';
|
||||||
$hostname = substr( md5( time() ), 0, 6 ) . '.' . $domain; // Very random hostname!
|
$hostname = substr( md5( time() ), 0, 6 ) . '.' . $domain; // Very random hostname!
|
||||||
$page = wp_remote_get(
|
$page = wp_remote_get(
|
||||||
'http://' . $hostname, array(
|
'http://' . $hostname,
|
||||||
|
array(
|
||||||
'timeout' => 5,
|
'timeout' => 5,
|
||||||
'httpversion' => '1.1',
|
'httpversion' => '1.1',
|
||||||
)
|
)
|
||||||
|
@ -39,7 +39,8 @@ require_once( ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php' );
|
|||||||
*/
|
*/
|
||||||
function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) {
|
function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) {
|
||||||
wp_terms_checklist(
|
wp_terms_checklist(
|
||||||
$post_id, array(
|
$post_id,
|
||||||
|
array(
|
||||||
'taxonomy' => 'category',
|
'taxonomy' => 'category',
|
||||||
'descendants_and_self' => $descendants_and_self,
|
'descendants_and_self' => $descendants_and_self,
|
||||||
'selected_cats' => $selected_cats,
|
'selected_cats' => $selected_cats,
|
||||||
@ -128,7 +129,8 @@ function wp_terms_checklist( $post_id = 0, $args = array() ) {
|
|||||||
$args['popular_cats'] = $r['popular_cats'];
|
$args['popular_cats'] = $r['popular_cats'];
|
||||||
} else {
|
} else {
|
||||||
$args['popular_cats'] = get_terms(
|
$args['popular_cats'] = get_terms(
|
||||||
$taxonomy, array(
|
$taxonomy,
|
||||||
|
array(
|
||||||
'fields' => 'ids',
|
'fields' => 'ids',
|
||||||
'orderby' => 'count',
|
'orderby' => 'count',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
@ -139,7 +141,8 @@ function wp_terms_checklist( $post_id = 0, $args = array() ) {
|
|||||||
}
|
}
|
||||||
if ( $descendants_and_self ) {
|
if ( $descendants_and_self ) {
|
||||||
$categories = (array) get_terms(
|
$categories = (array) get_terms(
|
||||||
$taxonomy, array(
|
$taxonomy,
|
||||||
|
array(
|
||||||
'child_of' => $descendants_and_self,
|
'child_of' => $descendants_and_self,
|
||||||
'hierarchical' => 0,
|
'hierarchical' => 0,
|
||||||
'hide_empty' => 0,
|
'hide_empty' => 0,
|
||||||
@ -204,7 +207,8 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech
|
|||||||
}
|
}
|
||||||
|
|
||||||
$terms = get_terms(
|
$terms = get_terms(
|
||||||
$taxonomy, array(
|
$taxonomy,
|
||||||
|
array(
|
||||||
'orderby' => 'count',
|
'orderby' => 'count',
|
||||||
'order' => 'DESC',
|
'order' => 'DESC',
|
||||||
'number' => $number,
|
'number' => $number,
|
||||||
@ -262,7 +266,8 @@ function wp_link_category_checklist( $link_id = 0 ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$categories = get_terms(
|
$categories = get_terms(
|
||||||
'link_category', array(
|
'link_category',
|
||||||
|
array(
|
||||||
'orderby' => 'name',
|
'orderby' => 'name',
|
||||||
'hide_empty' => 0,
|
'hide_empty' => 0,
|
||||||
)
|
)
|
||||||
@ -404,7 +409,9 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
|
|||||||
* @param array $args An array of default args.
|
* @param array $args An array of default args.
|
||||||
*/
|
*/
|
||||||
$content = apply_filters(
|
$content = apply_filters(
|
||||||
'wp_comment_reply', '', array(
|
'wp_comment_reply',
|
||||||
|
'',
|
||||||
|
array(
|
||||||
'position' => $position,
|
'position' => $position,
|
||||||
'checkbox' => $checkbox,
|
'checkbox' => $checkbox,
|
||||||
'mode' => $mode,
|
'mode' => $mode,
|
||||||
@ -424,9 +431,9 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<form method="get">
|
<form method="get">
|
||||||
<?php if ( $table_row ) : ?>
|
<?php if ( $table_row ) : ?>
|
||||||
<table style="display:none;"><tbody id="com-reply"><tr id="replyrow" class="inline-edit-row" style="display:none;"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="colspanchange">
|
<table style="display:none;"><tbody id="com-reply"><tr id="replyrow" class="inline-edit-row" style="display:none;"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="colspanchange">
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div id="com-reply" style="display:none;"><div id="replyrow" style="display:none;">
|
<div id="com-reply" style="display:none;"><div id="replyrow" style="display:none;">
|
||||||
@ -443,7 +450,9 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
|
|||||||
<?php
|
<?php
|
||||||
$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
|
$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
|
||||||
wp_editor(
|
wp_editor(
|
||||||
'', 'replycontent', array(
|
'',
|
||||||
|
'replycontent',
|
||||||
|
array(
|
||||||
'media_buttons' => false,
|
'media_buttons' => false,
|
||||||
'tinymce' => false,
|
'tinymce' => false,
|
||||||
'quicktags' => $quicktags_settings,
|
'quicktags' => $quicktags_settings,
|
||||||
@ -499,13 +508,13 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php if ( $table_row ) : ?>
|
<?php if ( $table_row ) : ?>
|
||||||
</td></tr></tbody></table>
|
</td></tr></tbody></table>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
</div></div>
|
</div></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -514,14 +523,14 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
|
|||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*/
|
*/
|
||||||
function wp_comment_trashnotice() {
|
function wp_comment_trashnotice() {
|
||||||
?>
|
?>
|
||||||
<div class="hidden" id="trash-undo-holder">
|
<div class="hidden" id="trash-undo-holder">
|
||||||
<div class="trash-undo-inside"><?php printf( __( 'Comment by %s moved to the trash.' ), '<strong></strong>' ); ?> <span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
|
<div class="trash-undo-inside"><?php printf( __( 'Comment by %s moved to the trash.' ), '<strong></strong>' ); ?> <span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden" id="spam-undo-holder">
|
<div class="hidden" id="spam-undo-holder">
|
||||||
<div class="spam-undo-inside"><?php printf( __( 'Comment by %s marked as spam.' ), '<strong></strong>' ); ?> <span class="undo unspam"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
|
<div class="spam-undo-inside"><?php printf( __( 'Comment by %s marked as spam.' ), '<strong></strong>' ); ?> <span class="undo unspam"><a href="#"><?php _e( 'Undo' ); ?></a></span></div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -549,7 +558,7 @@ function list_meta( $meta ) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$count = 0;
|
$count = 0;
|
||||||
?>
|
?>
|
||||||
<table id="list-table">
|
<table id="list-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -558,14 +567,14 @@ function list_meta( $meta ) {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id='the-list' data-wp-lists='list:meta'>
|
<tbody id='the-list' data-wp-lists='list:meta'>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $meta as $entry ) {
|
foreach ( $meta as $entry ) {
|
||||||
echo _list_meta_row( $entry, $count );
|
echo _list_meta_row( $entry, $count );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -676,7 +685,7 @@ function meta_form( $post = null ) {
|
|||||||
} else {
|
} else {
|
||||||
$meta_key_input_id = 'metakeyinput';
|
$meta_key_input_id = 'metakeyinput';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p><strong><?php _e( 'Add New Custom Field:' ); ?></strong></p>
|
<p><strong><?php _e( 'Add New Custom Field:' ); ?></strong></p>
|
||||||
<table id="newmeta">
|
<table id="newmeta">
|
||||||
<thead>
|
<thead>
|
||||||
@ -689,18 +698,18 @@ function meta_form( $post = null ) {
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="newmetaleft" class="left">
|
<td id="newmetaleft" class="left">
|
||||||
<?php if ( $keys ) { ?>
|
<?php if ( $keys ) { ?>
|
||||||
<select id="metakeyselect" name="metakeyselect">
|
<select id="metakeyselect" name="metakeyselect">
|
||||||
<option value="#NONE#"><?php _e( '— Select —' ); ?></option>
|
<option value="#NONE#"><?php _e( '— Select —' ); ?></option>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
foreach ( $keys as $key ) {
|
foreach ( $keys as $key ) {
|
||||||
if ( is_protected_meta( $key, 'post' ) || ! current_user_can( 'add_post_meta', $post->ID, $key ) ) {
|
if ( is_protected_meta( $key, 'post' ) || ! current_user_can( 'add_post_meta', $post->ID, $key ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
echo "\n<option value='" . esc_attr( $key ) . "'>" . esc_html( $key ) . '</option>';
|
echo "\n<option value='" . esc_attr( $key ) . "'>" . esc_html( $key ) . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" value="" />
|
<input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" value="" />
|
||||||
<a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">
|
<a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">
|
||||||
@ -715,20 +724,24 @@ foreach ( $keys as $key ) {
|
|||||||
|
|
||||||
<tr><td colspan="2">
|
<tr><td colspan="2">
|
||||||
<div class="submit">
|
<div class="submit">
|
||||||
<?php
|
<?php
|
||||||
submit_button(
|
submit_button(
|
||||||
__( 'Add Custom Field' ), '', 'addmeta', false, array(
|
__( 'Add Custom Field' ),
|
||||||
'id' => 'newmeta-submit',
|
'',
|
||||||
'data-wp-lists' => 'add:the-list:newmeta',
|
'addmeta',
|
||||||
)
|
false,
|
||||||
);
|
array(
|
||||||
?>
|
'id' => 'newmeta-submit',
|
||||||
|
'data-wp-lists' => 'add:the-list:newmeta',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
|
<?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -817,13 +830,13 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
|
|||||||
$cur_timeunit = 'cur_' . $timeunit;
|
$cur_timeunit = 'cur_' . $timeunit;
|
||||||
echo '<input type="hidden" id="' . $cur_timeunit . '" name="' . $cur_timeunit . '" value="' . $curr . '" />' . "\n";
|
echo '<input type="hidden" id="' . $cur_timeunit . '" name="' . $cur_timeunit . '" value="' . $curr . '" />' . "\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="#edit_timestamp" class="save-timestamp hide-if-no-js button"><?php _e( 'OK' ); ?></a>
|
<a href="#edit_timestamp" class="save-timestamp hide-if-no-js button"><?php _e( 'OK' ); ?></a>
|
||||||
<a href="#edit_timestamp" class="cancel-timestamp hide-if-no-js button-cancel"><?php _e( 'Cancel' ); ?></a>
|
<a href="#edit_timestamp" class="cancel-timestamp hide-if-no-js button-cancel"><?php _e( 'Cancel' ); ?></a>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -934,7 +947,7 @@ function wp_import_upload_form( $action ) {
|
|||||||
<p><strong><?php echo $upload_dir['error']; ?></strong></p></div>
|
<p><strong><?php echo $upload_dir['error']; ?></strong></p></div>
|
||||||
<?php
|
<?php
|
||||||
else :
|
else :
|
||||||
?>
|
?>
|
||||||
<form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form" action="<?php echo esc_url( wp_nonce_url( $action, 'import-upload' ) ); ?>">
|
<form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form" action="<?php echo esc_url( wp_nonce_url( $action, 'import-upload' ) ); ?>">
|
||||||
<p>
|
<p>
|
||||||
<label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __( 'Maximum size: %s' ), $size ); ?>)
|
<label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __( 'Maximum size: %s' ), $size ); ?>)
|
||||||
@ -942,9 +955,9 @@ function wp_import_upload_form( $action ) {
|
|||||||
<input type="hidden" name="action" value="save" />
|
<input type="hidden" name="action" value="save" />
|
||||||
<input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
|
<input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
|
||||||
</p>
|
</p>
|
||||||
<?php submit_button( __( 'Upload file and import' ), 'primary' ); ?>
|
<?php submit_button( __( 'Upload file and import' ), 'primary' ); ?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1243,7 +1256,7 @@ function do_accordion_sections( $screen, $context, $object ) {
|
|||||||
|
|
||||||
$page = $screen->id;
|
$page = $screen->id;
|
||||||
|
|
||||||
$hidden = get_hidden_meta_boxes( $screen );
|
$hidden = get_hidden_meta_boxes( $screen );
|
||||||
?>
|
?>
|
||||||
<div id="side-sortables" class="accordion-container">
|
<div id="side-sortables" class="accordion-container">
|
||||||
<ul class="outer-border">
|
<ul class="outer-border">
|
||||||
@ -1317,7 +1330,8 @@ function add_settings_section( $id, $title, $callback, $page ) {
|
|||||||
|
|
||||||
if ( 'misc' == $page ) {
|
if ( 'misc' == $page ) {
|
||||||
_deprecated_argument(
|
_deprecated_argument(
|
||||||
__FUNCTION__, '3.0.0',
|
__FUNCTION__,
|
||||||
|
'3.0.0',
|
||||||
/* translators: %s: misc */
|
/* translators: %s: misc */
|
||||||
sprintf(
|
sprintf(
|
||||||
__( 'The "%s" options group has been removed. Use another settings group.' ),
|
__( 'The "%s" options group has been removed. Use another settings group.' ),
|
||||||
@ -1329,7 +1343,8 @@ function add_settings_section( $id, $title, $callback, $page ) {
|
|||||||
|
|
||||||
if ( 'privacy' == $page ) {
|
if ( 'privacy' == $page ) {
|
||||||
_deprecated_argument(
|
_deprecated_argument(
|
||||||
__FUNCTION__, '3.5.0',
|
__FUNCTION__,
|
||||||
|
'3.5.0',
|
||||||
/* translators: %s: privacy */
|
/* translators: %s: privacy */
|
||||||
sprintf(
|
sprintf(
|
||||||
__( 'The "%s" options group has been removed. Use another settings group.' ),
|
__( 'The "%s" options group has been removed. Use another settings group.' ),
|
||||||
@ -1386,7 +1401,8 @@ function add_settings_field( $id, $title, $callback, $page, $section = 'default'
|
|||||||
|
|
||||||
if ( 'misc' == $page ) {
|
if ( 'misc' == $page ) {
|
||||||
_deprecated_argument(
|
_deprecated_argument(
|
||||||
__FUNCTION__, '3.0.0',
|
__FUNCTION__,
|
||||||
|
'3.0.0',
|
||||||
/* translators: %s: misc */
|
/* translators: %s: misc */
|
||||||
sprintf(
|
sprintf(
|
||||||
__( 'The "%s" options group has been removed. Use another settings group.' ),
|
__( 'The "%s" options group has been removed. Use another settings group.' ),
|
||||||
@ -1398,7 +1414,8 @@ function add_settings_field( $id, $title, $callback, $page, $section = 'default'
|
|||||||
|
|
||||||
if ( 'privacy' == $page ) {
|
if ( 'privacy' == $page ) {
|
||||||
_deprecated_argument(
|
_deprecated_argument(
|
||||||
__FUNCTION__, '3.5.0',
|
__FUNCTION__,
|
||||||
|
'3.5.0',
|
||||||
/* translators: %s: privacy */
|
/* translators: %s: privacy */
|
||||||
sprintf(
|
sprintf(
|
||||||
__( 'The "%s" options group has been removed. Use another settings group.' ),
|
__( 'The "%s" options group has been removed. Use another settings group.' ),
|
||||||
@ -1650,7 +1667,7 @@ function settings_errors( $setting = '', $sanitize = false, $hide_on_update = fa
|
|||||||
* @param string $found_action
|
* @param string $found_action
|
||||||
*/
|
*/
|
||||||
function find_posts_div( $found_action = '' ) {
|
function find_posts_div( $found_action = '' ) {
|
||||||
?>
|
?>
|
||||||
<div id="find-posts" class="find-box" style="display: none;">
|
<div id="find-posts" class="find-box" style="display: none;">
|
||||||
<div id="find-posts-head" class="find-box-head">
|
<div id="find-posts-head" class="find-box-head">
|
||||||
<?php _e( 'Attach to existing content' ); ?>
|
<?php _e( 'Attach to existing content' ); ?>
|
||||||
@ -1676,7 +1693,7 @@ function find_posts_div( $found_action = '' ) {
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1745,11 +1762,11 @@ function iframe_header( $title = '', $deprecated = false ) {
|
|||||||
|
|
||||||
@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
|
@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
|
||||||
_wp_admin_html_begin();
|
_wp_admin_html_begin();
|
||||||
?>
|
?>
|
||||||
<title><?php bloginfo( 'name' ); ?> › <?php echo $title; ?> — <?php _e( 'WordPress' ); ?></title>
|
<title><?php bloginfo( 'name' ); ?> › <?php echo $title; ?> — <?php _e( 'WordPress' ); ?></title>
|
||||||
<?php
|
<?php
|
||||||
wp_enqueue_style( 'colors' );
|
wp_enqueue_style( 'colors' );
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||||
function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
|
function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
|
||||||
@ -1761,50 +1778,50 @@ var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
|
|||||||
decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
|
decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
|
||||||
isRtl = <?php echo (int) is_rtl(); ?>;
|
isRtl = <?php echo (int) is_rtl(); ?>;
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
/** This action is documented in wp-admin/admin-header.php */
|
/** This action is documented in wp-admin/admin-header.php */
|
||||||
do_action( 'admin_enqueue_scripts', $hook_suffix );
|
do_action( 'admin_enqueue_scripts', $hook_suffix );
|
||||||
|
|
||||||
/** This action is documented in wp-admin/admin-header.php */
|
/** This action is documented in wp-admin/admin-header.php */
|
||||||
do_action( "admin_print_styles-$hook_suffix" );
|
do_action( "admin_print_styles-$hook_suffix" );
|
||||||
|
|
||||||
/** This action is documented in wp-admin/admin-header.php */
|
/** This action is documented in wp-admin/admin-header.php */
|
||||||
do_action( 'admin_print_styles' );
|
do_action( 'admin_print_styles' );
|
||||||
|
|
||||||
/** This action is documented in wp-admin/admin-header.php */
|
/** This action is documented in wp-admin/admin-header.php */
|
||||||
do_action( "admin_print_scripts-$hook_suffix" );
|
do_action( "admin_print_scripts-$hook_suffix" );
|
||||||
|
|
||||||
/** This action is documented in wp-admin/admin-header.php */
|
/** This action is documented in wp-admin/admin-header.php */
|
||||||
do_action( 'admin_print_scripts' );
|
do_action( 'admin_print_scripts' );
|
||||||
|
|
||||||
/** This action is documented in wp-admin/admin-header.php */
|
/** This action is documented in wp-admin/admin-header.php */
|
||||||
do_action( "admin_head-$hook_suffix" );
|
do_action( "admin_head-$hook_suffix" );
|
||||||
|
|
||||||
/** This action is documented in wp-admin/admin-header.php */
|
/** This action is documented in wp-admin/admin-header.php */
|
||||||
do_action( 'admin_head' );
|
do_action( 'admin_head' );
|
||||||
|
|
||||||
$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
|
$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
|
||||||
|
|
||||||
if ( is_rtl() ) {
|
if ( is_rtl() ) {
|
||||||
$admin_body_class .= ' rtl';
|
$admin_body_class .= ' rtl';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
/** This filter is documented in wp-admin/admin-header.php */
|
/** This filter is documented in wp-admin/admin-header.php */
|
||||||
$admin_body_classes = apply_filters( 'admin_body_class', '' );
|
$admin_body_classes = apply_filters( 'admin_body_class', '' );
|
||||||
$admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class );
|
$admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class );
|
||||||
?>
|
?>
|
||||||
<body
|
<body
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @global string $body_id
|
* @global string $body_id
|
||||||
*/
|
*/
|
||||||
if ( isset( $GLOBALS['body_id'] ) ) {
|
if ( isset( $GLOBALS['body_id'] ) ) {
|
||||||
echo ' id="' . $GLOBALS['body_id'] . '"';
|
echo ' id="' . $GLOBALS['body_id'] . '"';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes; ?>">
|
class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes; ?>">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function(){
|
(function(){
|
||||||
@ -1813,7 +1830,7 @@ c = c.replace(/no-js/, 'js');
|
|||||||
document.body.className = c;
|
document.body.className = c;
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1834,7 +1851,7 @@ function iframe_footer() {
|
|||||||
global $hook_suffix;
|
global $hook_suffix;
|
||||||
?>
|
?>
|
||||||
<div class="hidden">
|
<div class="hidden">
|
||||||
<?php
|
<?php
|
||||||
/** This action is documented in wp-admin/admin-footer.php */
|
/** This action is documented in wp-admin/admin-footer.php */
|
||||||
do_action( 'admin_footer', $hook_suffix );
|
do_action( 'admin_footer', $hook_suffix );
|
||||||
|
|
||||||
@ -1843,12 +1860,12 @@ function iframe_footer() {
|
|||||||
|
|
||||||
/** This action is documented in wp-admin/admin-footer.php */
|
/** This action is documented in wp-admin/admin-footer.php */
|
||||||
do_action( 'admin_print_footer_scripts' );
|
do_action( 'admin_print_footer_scripts' );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script>
|
<script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2013,7 +2030,7 @@ function _media_states( $post ) {
|
|||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
function compression_test() {
|
function compression_test() {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var compressionNonce = <?php echo wp_json_encode( wp_create_nonce( 'update_can_compress_scripts' ) ); ?>;
|
var compressionNonce = <?php echo wp_json_encode( wp_create_nonce( 'update_can_compress_scripts' ) ); ?>;
|
||||||
var testCompression = {
|
var testCompression = {
|
||||||
@ -2063,7 +2080,7 @@ function compression_test() {
|
|||||||
};
|
};
|
||||||
testCompression.check();
|
testCompression.check();
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2173,7 +2190,7 @@ function _wp_admin_html_begin() {
|
|||||||
@header( 'X-UA-Compatible: IE=edge' );
|
@header( 'X-UA-Compatible: IE=edge' );
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!--[if IE 8]>
|
<!--[if IE 8]>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>"
|
<html xmlns="http://www.w3.org/1999/xhtml" class="ie8 <?php echo $admin_html_class; ?>"
|
||||||
@ -2201,7 +2218,7 @@ function _wp_admin_html_begin() {
|
|||||||
<!--<![endif]-->
|
<!--<![endif]-->
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
|
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" />
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -104,19 +104,19 @@ function install_theme_search_form( $type_selector = true ) {
|
|||||||
<option value="tag" <?php selected( 'tag', $type ); ?>><?php _ex( 'Tag', 'Theme Installer' ); ?></option>
|
<option value="tag" <?php selected( 'tag', $type ); ?>><?php _ex( 'Tag', 'Theme Installer' ); ?></option>
|
||||||
</select>
|
</select>
|
||||||
<label class="screen-reader-text" for="s">
|
<label class="screen-reader-text" for="s">
|
||||||
<?php
|
<?php
|
||||||
switch ( $type ) {
|
switch ( $type ) {
|
||||||
case 'term':
|
case 'term':
|
||||||
_e( 'Search by keyword' );
|
_e( 'Search by keyword' );
|
||||||
break;
|
break;
|
||||||
case 'author':
|
case 'author':
|
||||||
_e( 'Search by author' );
|
_e( 'Search by author' );
|
||||||
break;
|
break;
|
||||||
case 'tag':
|
case 'tag':
|
||||||
_e( 'Search by tag' );
|
_e( 'Search by tag' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</label>
|
</label>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<label class="screen-reader-text" for="s"><?php _e( 'Search by keyword' ); ?></label>
|
<label class="screen-reader-text" for="s"><?php _e( 'Search by keyword' ); ?></label>
|
||||||
@ -124,7 +124,7 @@ function install_theme_search_form( $type_selector = true ) {
|
|||||||
<input type="search" name="s" id="s" size="30" value="<?php echo esc_attr( $term ); ?>" autofocus="autofocus" />
|
<input type="search" name="s" id="s" size="30" value="<?php echo esc_attr( $term ); ?>" autofocus="autofocus" />
|
||||||
<?php submit_button( __( 'Search' ), '', 'search', false ); ?>
|
<?php submit_button( __( 'Search' ), '', 'search', false ); ?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -134,7 +134,7 @@ function install_theme_search_form( $type_selector = true ) {
|
|||||||
*/
|
*/
|
||||||
function install_themes_dashboard() {
|
function install_themes_dashboard() {
|
||||||
install_theme_search_form( false );
|
install_theme_search_form( false );
|
||||||
?>
|
?>
|
||||||
<h4><?php _e( 'Feature Filter' ); ?></h4>
|
<h4><?php _e( 'Feature Filter' ); ?></h4>
|
||||||
<p class="install-help"><?php _e( 'Find a theme based on specific features.' ); ?></p>
|
<p class="install-help"><?php _e( 'Find a theme based on specific features.' ); ?></p>
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ function install_themes_dashboard() {
|
|||||||
foreach ( $features as $feature => $feature_name ) {
|
foreach ( $features as $feature => $feature_name ) {
|
||||||
$feature_name = esc_html( $feature_name );
|
$feature_name = esc_html( $feature_name );
|
||||||
$feature = esc_attr( $feature );
|
$feature = esc_attr( $feature );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" name="features[]" id="feature-id-<?php echo $feature; ?>" value="<?php echo $feature; ?>" />
|
<input type="checkbox" name="features[]" id="feature-id-<?php echo $feature; ?>" value="<?php echo $feature; ?>" />
|
||||||
@ -162,22 +162,22 @@ function install_themes_dashboard() {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ol>
|
</ol>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
<?php submit_button( __( 'Find Themes' ), '', 'search' ); ?>
|
<?php submit_button( __( 'Find Themes' ), '', 'search' ); ?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
function install_themes_upload() {
|
function install_themes_upload() {
|
||||||
?>
|
?>
|
||||||
<p class="install-help"><?php _e( 'If you have a theme in a .zip format, you may install it by uploading it here.' ); ?></p>
|
<p class="install-help"><?php _e( 'If you have a theme in a .zip format, you may install it by uploading it here.' ); ?></p>
|
||||||
<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-theme' ); ?>">
|
<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-theme' ); ?>">
|
||||||
<?php wp_nonce_field( 'theme-upload' ); ?>
|
<?php wp_nonce_field( 'theme-upload' ); ?>
|
||||||
|
@ -183,7 +183,8 @@ function get_theme_update_available( $theme ) {
|
|||||||
'TB_iframe' => 'true',
|
'TB_iframe' => 'true',
|
||||||
'width' => 1024,
|
'width' => 1024,
|
||||||
'height' => 800,
|
'height' => 800,
|
||||||
), $update['url']
|
),
|
||||||
|
$update['url']
|
||||||
); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list.
|
); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list.
|
||||||
$update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet );
|
$update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet );
|
||||||
|
|
||||||
|
@ -34,7 +34,8 @@ function get_core_updates( $options = array() ) {
|
|||||||
array(
|
array(
|
||||||
'available' => true,
|
'available' => true,
|
||||||
'dismissed' => false,
|
'dismissed' => false,
|
||||||
), $options
|
),
|
||||||
|
$options
|
||||||
);
|
);
|
||||||
$dismissed = get_site_option( 'dismissed_update_core' );
|
$dismissed = get_site_option( 'dismissed_update_core' );
|
||||||
|
|
||||||
@ -549,7 +550,8 @@ function wp_theme_update_row( $theme_key, $theme ) {
|
|||||||
'TB_iframe' => 'true',
|
'TB_iframe' => 'true',
|
||||||
'width' => 1024,
|
'width' => 1024,
|
||||||
'height' => 800,
|
'height' => 800,
|
||||||
), $current->response[ $theme_key ]['url']
|
),
|
||||||
|
$current->response[ $theme_key ]['url']
|
||||||
);
|
);
|
||||||
|
|
||||||
/** @var WP_MS_Themes_List_Table $wp_list_table */
|
/** @var WP_MS_Themes_List_Table $wp_list_table */
|
||||||
|
@ -147,7 +147,8 @@ if ( ! function_exists( 'wp_install_defaults' ) ) :
|
|||||||
$cat_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) );
|
$cat_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) );
|
||||||
if ( $cat_id == null ) {
|
if ( $cat_id == null ) {
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->sitecategories, array(
|
$wpdb->sitecategories,
|
||||||
|
array(
|
||||||
'cat_ID' => 0,
|
'cat_ID' => 0,
|
||||||
'cat_name' => $cat_name,
|
'cat_name' => $cat_name,
|
||||||
'category_nicename' => $cat_slug,
|
'category_nicename' => $cat_slug,
|
||||||
@ -162,7 +163,8 @@ if ( ! function_exists( 'wp_install_defaults' ) ) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->terms, array(
|
$wpdb->terms,
|
||||||
|
array(
|
||||||
'term_id' => $cat_id,
|
'term_id' => $cat_id,
|
||||||
'name' => $cat_name,
|
'name' => $cat_name,
|
||||||
'slug' => $cat_slug,
|
'slug' => $cat_slug,
|
||||||
@ -170,7 +172,8 @@ if ( ! function_exists( 'wp_install_defaults' ) ) :
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->term_taxonomy, array(
|
$wpdb->term_taxonomy,
|
||||||
|
array(
|
||||||
'term_id' => $cat_id,
|
'term_id' => $cat_id,
|
||||||
'taxonomy' => 'category',
|
'taxonomy' => 'category',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
@ -206,7 +209,8 @@ if ( ! function_exists( 'wp_install_defaults' ) ) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->posts, array(
|
$wpdb->posts,
|
||||||
|
array(
|
||||||
'post_author' => $user_id,
|
'post_author' => $user_id,
|
||||||
'post_date' => $now,
|
'post_date' => $now,
|
||||||
'post_date_gmt' => $now_gmt,
|
'post_date_gmt' => $now_gmt,
|
||||||
@ -225,7 +229,8 @@ if ( ! function_exists( 'wp_install_defaults' ) ) :
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->term_relationships, array(
|
$wpdb->term_relationships,
|
||||||
|
array(
|
||||||
'term_taxonomy_id' => $cat_tt_id,
|
'term_taxonomy_id' => $cat_tt_id,
|
||||||
'object_id' => 1,
|
'object_id' => 1,
|
||||||
)
|
)
|
||||||
@ -248,7 +253,8 @@ To get started with moderating, editing, and deleting comments, please visit the
|
|||||||
Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.'
|
Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.'
|
||||||
);
|
);
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->comments, array(
|
$wpdb->comments,
|
||||||
|
array(
|
||||||
'comment_post_ID' => 1,
|
'comment_post_ID' => 1,
|
||||||
'comment_author' => $first_comment_author,
|
'comment_author' => $first_comment_author,
|
||||||
'comment_author_email' => $first_comment_email,
|
'comment_author_email' => $first_comment_email,
|
||||||
@ -275,12 +281,14 @@ Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.'
|
|||||||
<blockquote>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.</blockquote>
|
<blockquote>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.</blockquote>
|
||||||
|
|
||||||
As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to delete this page and create new pages for your content. Have fun!"
|
As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to delete this page and create new pages for your content. Have fun!"
|
||||||
), admin_url()
|
),
|
||||||
|
admin_url()
|
||||||
);
|
);
|
||||||
|
|
||||||
$first_post_guid = get_option( 'home' ) . '/?page_id=2';
|
$first_post_guid = get_option( 'home' ) . '/?page_id=2';
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->posts, array(
|
$wpdb->posts,
|
||||||
|
array(
|
||||||
'post_author' => $user_id,
|
'post_author' => $user_id,
|
||||||
'post_date' => $now,
|
'post_date' => $now,
|
||||||
'post_date_gmt' => $now_gmt,
|
'post_date_gmt' => $now_gmt,
|
||||||
@ -300,7 +308,8 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->postmeta, array(
|
$wpdb->postmeta,
|
||||||
|
array(
|
||||||
'post_id' => 2,
|
'post_id' => 2,
|
||||||
'meta_key' => '_wp_page_template',
|
'meta_key' => '_wp_page_template',
|
||||||
'meta_value' => 'default',
|
'meta_value' => 'default',
|
||||||
@ -323,7 +332,8 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
|
|||||||
$privacy_policy_guid = get_option( 'home' ) . '/?page_id=3';
|
$privacy_policy_guid = get_option( 'home' ) . '/?page_id=3';
|
||||||
|
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->posts, array(
|
$wpdb->posts,
|
||||||
|
array(
|
||||||
'post_author' => $user_id,
|
'post_author' => $user_id,
|
||||||
'post_date' => $now,
|
'post_date' => $now,
|
||||||
'post_date_gmt' => $now_gmt,
|
'post_date_gmt' => $now_gmt,
|
||||||
@ -344,7 +354,8 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->postmeta, array(
|
$wpdb->postmeta,
|
||||||
|
array(
|
||||||
'post_id' => 3,
|
'post_id' => 3,
|
||||||
'meta_key' => '_wp_page_template',
|
'meta_key' => '_wp_page_template',
|
||||||
'meta_value' => 'default',
|
'meta_value' => 'default',
|
||||||
@ -355,13 +366,15 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
|
|||||||
|
|
||||||
// Set up default widgets for default theme.
|
// Set up default widgets for default theme.
|
||||||
update_option(
|
update_option(
|
||||||
'widget_search', array(
|
'widget_search',
|
||||||
|
array(
|
||||||
2 => array( 'title' => '' ),
|
2 => array( 'title' => '' ),
|
||||||
'_multiwidget' => 1,
|
'_multiwidget' => 1,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
update_option(
|
update_option(
|
||||||
'widget_recent-posts', array(
|
'widget_recent-posts',
|
||||||
|
array(
|
||||||
2 => array(
|
2 => array(
|
||||||
'title' => '',
|
'title' => '',
|
||||||
'number' => 5,
|
'number' => 5,
|
||||||
@ -370,7 +383,8 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
update_option(
|
update_option(
|
||||||
'widget_recent-comments', array(
|
'widget_recent-comments',
|
||||||
|
array(
|
||||||
2 => array(
|
2 => array(
|
||||||
'title' => '',
|
'title' => '',
|
||||||
'number' => 5,
|
'number' => 5,
|
||||||
@ -379,7 +393,8 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
update_option(
|
update_option(
|
||||||
'widget_archives', array(
|
'widget_archives',
|
||||||
|
array(
|
||||||
2 => array(
|
2 => array(
|
||||||
'title' => '',
|
'title' => '',
|
||||||
'count' => 0,
|
'count' => 0,
|
||||||
@ -389,7 +404,8 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
update_option(
|
update_option(
|
||||||
'widget_categories', array(
|
'widget_categories',
|
||||||
|
array(
|
||||||
2 => array(
|
2 => array(
|
||||||
'title' => '',
|
'title' => '',
|
||||||
'count' => 0,
|
'count' => 0,
|
||||||
@ -400,13 +416,15 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
update_option(
|
update_option(
|
||||||
'widget_meta', array(
|
'widget_meta',
|
||||||
|
array(
|
||||||
2 => array( 'title' => '' ),
|
2 => array( 'title' => '' ),
|
||||||
'_multiwidget' => 1,
|
'_multiwidget' => 1,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
update_option(
|
update_option(
|
||||||
'sidebars_widgets', array(
|
'sidebars_widgets',
|
||||||
|
array(
|
||||||
'wp_inactive_widgets' => array(),
|
'wp_inactive_widgets' => array(),
|
||||||
'sidebar-1' => array(
|
'sidebar-1' => array(
|
||||||
0 => 'search-2',
|
0 => 'search-2',
|
||||||
@ -442,7 +460,8 @@ As a new WordPress user, you should go to <a href=\"%s\">your dashboard</a> to d
|
|||||||
// Delete any caps that snuck into the previously active blog. (Hardcoded to blog 1 for now.) TODO: Get previous_blog_id.
|
// Delete any caps that snuck into the previously active blog. (Hardcoded to blog 1 for now.) TODO: Get previous_blog_id.
|
||||||
if ( ! is_super_admin( $user_id ) && $user_id != 1 ) {
|
if ( ! is_super_admin( $user_id ) && $user_id != 1 ) {
|
||||||
$wpdb->delete(
|
$wpdb->delete(
|
||||||
$wpdb->usermeta, array(
|
$wpdb->usermeta,
|
||||||
|
array(
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
'meta_key' => $wpdb->base_prefix . '1_capabilities',
|
'meta_key' => $wpdb->base_prefix . '1_capabilities',
|
||||||
)
|
)
|
||||||
@ -564,7 +583,11 @@ We hope you enjoy your new site. Thanks!
|
|||||||
--The WordPress Team
|
--The WordPress Team
|
||||||
https://wordpress.org/
|
https://wordpress.org/
|
||||||
'
|
'
|
||||||
), $blog_url, $name, $password, $login_url
|
),
|
||||||
|
$blog_url,
|
||||||
|
$name,
|
||||||
|
$password,
|
||||||
|
$login_url
|
||||||
);
|
);
|
||||||
|
|
||||||
@wp_mail( $email, __( 'New WordPress Site' ), $message );
|
@wp_mail( $email, __( 'New WordPress Site' ), $message );
|
||||||
@ -832,7 +855,8 @@ function upgrade_100() {
|
|||||||
$cat = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->post2cat WHERE post_id = %d AND category_id = %d", $post->ID, $post->post_category ) );
|
$cat = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->post2cat WHERE post_id = %d AND category_id = %d", $post->ID, $post->post_category ) );
|
||||||
if ( ! $cat && 0 != $post->post_category ) { // If there's no result
|
if ( ! $cat && 0 != $post->post_category ) { // If there's no result
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->post2cat, array(
|
$wpdb->post2cat,
|
||||||
|
array(
|
||||||
'post_id' => $post->ID,
|
'post_id' => $post->ID,
|
||||||
'category_id' => $post->post_category,
|
'category_id' => $post->post_category,
|
||||||
)
|
)
|
||||||
@ -1116,7 +1140,8 @@ function upgrade_160() {
|
|||||||
$objects = $wpdb->get_results( "SELECT ID, post_type FROM $wpdb->posts WHERE post_status = 'object'" );
|
$objects = $wpdb->get_results( "SELECT ID, post_type FROM $wpdb->posts WHERE post_status = 'object'" );
|
||||||
foreach ( $objects as $object ) {
|
foreach ( $objects as $object ) {
|
||||||
$wpdb->update(
|
$wpdb->update(
|
||||||
$wpdb->posts, array(
|
$wpdb->posts,
|
||||||
|
array(
|
||||||
'post_status' => 'attachment',
|
'post_status' => 'attachment',
|
||||||
'post_mime_type' => $object->post_type,
|
'post_mime_type' => $object->post_type,
|
||||||
'post_type' => '',
|
'post_type' => '',
|
||||||
@ -1234,7 +1259,11 @@ function upgrade_230() {
|
|||||||
$wpdb->query(
|
$wpdb->query(
|
||||||
$wpdb->prepare(
|
$wpdb->prepare(
|
||||||
"INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES
|
"INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES
|
||||||
(%d, %s, %s, %d)", $term_id, $name, $slug, $term_group
|
(%d, %s, %s, %d)",
|
||||||
|
$term_id,
|
||||||
|
$name,
|
||||||
|
$slug,
|
||||||
|
$term_group
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1288,7 +1317,8 @@ function upgrade_230() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->term_relationships, array(
|
$wpdb->term_relationships,
|
||||||
|
array(
|
||||||
'object_id' => $post_id,
|
'object_id' => $post_id,
|
||||||
'term_taxonomy_id' => $tt_id,
|
'term_taxonomy_id' => $tt_id,
|
||||||
)
|
)
|
||||||
@ -1327,7 +1357,8 @@ function upgrade_230() {
|
|||||||
$default_link_cat = $term_id;
|
$default_link_cat = $term_id;
|
||||||
|
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->term_taxonomy, array(
|
$wpdb->term_taxonomy,
|
||||||
|
array(
|
||||||
'term_id' => $term_id,
|
'term_id' => $term_id,
|
||||||
'taxonomy' => 'link_category',
|
'taxonomy' => 'link_category',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
@ -1355,7 +1386,8 @@ function upgrade_230() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->term_relationships, array(
|
$wpdb->term_relationships,
|
||||||
|
array(
|
||||||
'object_id' => $link->link_id,
|
'object_id' => $link->link_id,
|
||||||
'term_taxonomy_id' => $tt_id,
|
'term_taxonomy_id' => $tt_id,
|
||||||
)
|
)
|
||||||
@ -1376,7 +1408,8 @@ function upgrade_230() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$wpdb->insert(
|
$wpdb->insert(
|
||||||
$wpdb->term_relationships, array(
|
$wpdb->term_relationships,
|
||||||
|
array(
|
||||||
'object_id' => $link_id,
|
'object_id' => $link_id,
|
||||||
'term_taxonomy_id' => $tt_id,
|
'term_taxonomy_id' => $tt_id,
|
||||||
)
|
)
|
||||||
|
@ -537,7 +537,7 @@ jQuery(document).ready( function($) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -550,12 +550,12 @@ jQuery(document).ready( function($) {
|
|||||||
* @param object $user User data object
|
* @param object $user User data object
|
||||||
*/
|
*/
|
||||||
function use_ssl_preference( $user ) {
|
function use_ssl_preference( $user ) {
|
||||||
?>
|
?>
|
||||||
<tr class="user-use-ssl-wrap">
|
<tr class="user-use-ssl-wrap">
|
||||||
<th scope="row"><?php _e( 'Use https' ); ?></th>
|
<th scope="row"><?php _e( 'Use https' ); ?></th>
|
||||||
<td><label for="use_ssl"><input name="use_ssl" type="checkbox" id="use_ssl" value="1" <?php checked( '1', $user->use_ssl ); ?> /> <?php _e( 'Always use https when visiting the admin' ); ?></label></td>
|
<td><label for="use_ssl"><input name="use_ssl" type="checkbox" id="use_ssl" value="1" <?php checked( '1', $user->use_ssl ); ?> /> <?php _e( 'Always use https when visiting the admin' ); ?></label></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -576,7 +576,10 @@ this email. This invitation will expire in a few days.
|
|||||||
|
|
||||||
Please click the following link to activate your user account:
|
Please click the following link to activate your user account:
|
||||||
%%s'
|
%%s'
|
||||||
), wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), home_url(), wp_specialchars_decode( translate_user_role( $role['name'] ) )
|
),
|
||||||
|
wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ),
|
||||||
|
home_url(),
|
||||||
|
wp_specialchars_decode( translate_user_role( $role['name'] ) )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -627,10 +630,12 @@ function _wp_privacy_completed_request( $request_id ) {
|
|||||||
|
|
||||||
update_post_meta( $request_id, '_wp_user_request_completed_timestamp', time() );
|
update_post_meta( $request_id, '_wp_user_request_completed_timestamp', time() );
|
||||||
|
|
||||||
$request = wp_update_post( array(
|
$request = wp_update_post(
|
||||||
'ID' => $request_id,
|
array(
|
||||||
'post_status' => 'request-completed',
|
'ID' => $request_id,
|
||||||
) );
|
'post_status' => 'request-completed',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
return $request;
|
return $request;
|
||||||
}
|
}
|
||||||
@ -753,29 +758,33 @@ function _wp_personal_data_handle_actions() {
|
|||||||
*/
|
*/
|
||||||
function _wp_personal_data_cleanup_requests() {
|
function _wp_personal_data_cleanup_requests() {
|
||||||
/** This filter is documented in wp-includes/user.php */
|
/** This filter is documented in wp-includes/user.php */
|
||||||
$expires = (int) apply_filters( 'user_request_key_expiration', DAY_IN_SECONDS );
|
$expires = (int) apply_filters( 'user_request_key_expiration', DAY_IN_SECONDS );
|
||||||
|
|
||||||
$requests_query = new WP_Query( array(
|
$requests_query = new WP_Query(
|
||||||
'post_type' => 'user_request',
|
array(
|
||||||
'posts_per_page' => -1,
|
'post_type' => 'user_request',
|
||||||
'post_status' => 'request-pending',
|
'posts_per_page' => -1,
|
||||||
'fields' => 'ids',
|
'post_status' => 'request-pending',
|
||||||
'date_query' => array(
|
'fields' => 'ids',
|
||||||
array(
|
'date_query' => array(
|
||||||
'column' => 'post_modified_gmt',
|
array(
|
||||||
'before' => $expires . ' seconds ago',
|
'column' => 'post_modified_gmt',
|
||||||
|
'before' => $expires . ' seconds ago',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
) );
|
);
|
||||||
|
|
||||||
$request_ids = $requests_query->posts;
|
$request_ids = $requests_query->posts;
|
||||||
|
|
||||||
foreach ( $request_ids as $request_id ) {
|
foreach ( $request_ids as $request_id ) {
|
||||||
wp_update_post( array(
|
wp_update_post(
|
||||||
'ID' => $request_id,
|
array(
|
||||||
'post_status' => 'request-failed',
|
'ID' => $request_id,
|
||||||
'post_password' => '',
|
'post_status' => 'request-failed',
|
||||||
) );
|
'post_password' => '',
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -796,10 +805,12 @@ function _wp_personal_data_export_page() {
|
|||||||
// "Borrow" xfn.js for now so we don't have to create new files.
|
// "Borrow" xfn.js for now so we don't have to create new files.
|
||||||
wp_enqueue_script( 'xfn' );
|
wp_enqueue_script( 'xfn' );
|
||||||
|
|
||||||
$requests_table = new WP_Privacy_Data_Export_Requests_Table( array(
|
$requests_table = new WP_Privacy_Data_Export_Requests_Table(
|
||||||
'plural' => 'privacy_requests',
|
array(
|
||||||
'singular' => 'privacy_request',
|
'plural' => 'privacy_requests',
|
||||||
) );
|
'singular' => 'privacy_request',
|
||||||
|
)
|
||||||
|
);
|
||||||
$requests_table->process_bulk_action();
|
$requests_table->process_bulk_action();
|
||||||
$requests_table->prepare_items();
|
$requests_table->prepare_items();
|
||||||
?>
|
?>
|
||||||
@ -867,10 +878,12 @@ function _wp_personal_data_removal_page() {
|
|||||||
// "Borrow" xfn.js for now so we don't have to create new files.
|
// "Borrow" xfn.js for now so we don't have to create new files.
|
||||||
wp_enqueue_script( 'xfn' );
|
wp_enqueue_script( 'xfn' );
|
||||||
|
|
||||||
$requests_table = new WP_Privacy_Data_Removal_Requests_Table( array(
|
$requests_table = new WP_Privacy_Data_Removal_Requests_Table(
|
||||||
'plural' => 'privacy_requests',
|
array(
|
||||||
'singular' => 'privacy_request',
|
'plural' => 'privacy_requests',
|
||||||
) );
|
'singular' => 'privacy_request',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$requests_table->process_bulk_action();
|
$requests_table->process_bulk_action();
|
||||||
$requests_table->prepare_items();
|
$requests_table->prepare_items();
|
||||||
@ -1013,7 +1026,7 @@ function _wp_privacy_hook_requests_page() {
|
|||||||
*/
|
*/
|
||||||
function _wp_privacy_requests_screen_options() {
|
function _wp_privacy_requests_screen_options() {
|
||||||
$args = array(
|
$args = array(
|
||||||
'option' => str_replace( 'tools_page_', '', get_current_screen()->id ) . '_requests_per_page',
|
'option' => str_replace( 'tools_page_', '', get_current_screen()->id ) . '_requests_per_page',
|
||||||
);
|
);
|
||||||
add_screen_option( 'per_page', $args );
|
add_screen_option( 'per_page', $args );
|
||||||
}
|
}
|
||||||
@ -1175,8 +1188,8 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table {
|
|||||||
public function process_bulk_action() {
|
public function process_bulk_action() {
|
||||||
$action = $this->current_action();
|
$action = $this->current_action();
|
||||||
$request_ids = isset( $_REQUEST['request_id'] ) ? wp_parse_id_list( wp_unslash( $_REQUEST['request_id'] ) ) : array();
|
$request_ids = isset( $_REQUEST['request_id'] ) ? wp_parse_id_list( wp_unslash( $_REQUEST['request_id'] ) ) : array();
|
||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|
||||||
if ( $request_ids ) {
|
if ( $request_ids ) {
|
||||||
check_admin_referer( 'bulk-privacy_requests' );
|
check_admin_referer( 'bulk-privacy_requests' );
|
||||||
@ -1502,10 +1515,18 @@ class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Requests_Table {
|
|||||||
submit_button( __( 'Retry' ), 'secondary', 'privacy_action_email_retry[' . $item->ID . ']', false );
|
submit_button( __( 'Retry' ), 'secondary', 'privacy_action_email_retry[' . $item->ID . ']', false );
|
||||||
break;
|
break;
|
||||||
case 'request-completed':
|
case 'request-completed':
|
||||||
echo '<a href="' . esc_url( wp_nonce_url( add_query_arg( array(
|
echo '<a href="' . esc_url(
|
||||||
'action' => 'delete',
|
wp_nonce_url(
|
||||||
'request_id' => array( $item->ID ),
|
add_query_arg(
|
||||||
), admin_url( 'tools.php?page=export_personal_data' ) ), 'bulk-privacy_requests' ) ) . '" class="button">' . esc_html__( 'Remove request' ) . '</a>';
|
array(
|
||||||
|
'action' => 'delete',
|
||||||
|
'request_id' => array( $item->ID ),
|
||||||
|
),
|
||||||
|
admin_url( 'tools.php?page=export_personal_data' )
|
||||||
|
),
|
||||||
|
'bulk-privacy_requests'
|
||||||
|
)
|
||||||
|
) . '" class="button">' . esc_html__( 'Remove request' ) . '</a>';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1616,10 +1637,18 @@ class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Requests_Table {
|
|||||||
submit_button( __( 'Retry' ), 'secondary', 'privacy_action_email_retry[' . $item->ID . ']', false );
|
submit_button( __( 'Retry' ), 'secondary', 'privacy_action_email_retry[' . $item->ID . ']', false );
|
||||||
break;
|
break;
|
||||||
case 'request-completed':
|
case 'request-completed':
|
||||||
echo '<a href="' . esc_url( wp_nonce_url( add_query_arg( array(
|
echo '<a href="' . esc_url(
|
||||||
'action' => 'delete',
|
wp_nonce_url(
|
||||||
'request_id' => array( $item->ID ),
|
add_query_arg(
|
||||||
), admin_url( 'tools.php?page=remove_personal_data' ) ), 'bulk-privacy_requests' ) ) . '" class="button">' . esc_html__( 'Remove request' ) . '</a>';
|
array(
|
||||||
|
'action' => 'delete',
|
||||||
|
'request_id' => array( $item->ID ),
|
||||||
|
),
|
||||||
|
admin_url( 'tools.php?page=remove_personal_data' )
|
||||||
|
),
|
||||||
|
'bulk-privacy_requests'
|
||||||
|
)
|
||||||
|
) . '" class="button">' . esc_html__( 'Remove request' ) . '</a>';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -299,9 +299,9 @@ function wp_widget_control( $sidebar_args ) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widget-description">
|
<div class="widget-description">
|
||||||
<?php echo ( $widget_description = wp_widget_description( $widget_id ) ) ? "$widget_description\n" : "$widget_title\n"; ?>
|
<?php echo ( $widget_description = wp_widget_description( $widget_id ) ) ? "$widget_description\n" : "$widget_title\n"; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
echo $sidebar_args['after_widget'];
|
echo $sidebar_args['after_widget'];
|
||||||
|
|
||||||
return $sidebar_args;
|
return $sidebar_args;
|
||||||
|
@ -124,7 +124,7 @@ if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) )
|
|||||||
if ( $hide ) {
|
if ( $hide ) {
|
||||||
$classes .= ' hidden';
|
$classes .= ' hidden';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
|
<div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
|
||||||
<?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
|
<?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
// Sanity check.
|
// Sanity check.
|
||||||
if ( false ) {
|
if ( false ) {
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
@ -21,7 +21,7 @@ if ( false ) {
|
|||||||
<p>WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.</p>
|
<p>WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,7 +63,7 @@ function display_header( $body_classes = '' ) {
|
|||||||
if ( $body_classes ) {
|
if ( $body_classes ) {
|
||||||
$body_classes = ' ' . $body_classes;
|
$body_classes = ' ' . $body_classes;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||||
<head>
|
<head>
|
||||||
@ -79,7 +79,7 @@ function display_header( $body_classes = '' ) {
|
|||||||
<body class="wp-core-ui<?php echo $body_classes; ?>">
|
<body class="wp-core-ui<?php echo $body_classes; ?>">
|
||||||
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
|
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
} // end display_header()
|
} // end display_header()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -108,7 +108,7 @@ function display_setup_form( $error = null ) {
|
|||||||
$admin_email = isset( $_POST['admin_email'] ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : '';
|
$admin_email = isset( $_POST['admin_email'] ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : '';
|
||||||
|
|
||||||
if ( ! is_null( $error ) ) {
|
if ( ! is_null( $error ) ) {
|
||||||
?>
|
?>
|
||||||
<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
|
<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
|
||||||
<p class="message"><?php echo $error; ?></p>
|
<p class="message"><?php echo $error; ?></p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -129,7 +129,7 @@ function display_setup_form( $error = null ) {
|
|||||||
?>
|
?>
|
||||||
<input name="user_name" type="text" id="user_login" size="25" value="<?php echo esc_attr( sanitize_user( $user_name, true ) ); ?>" />
|
<input name="user_name" type="text" id="user_login" size="25" value="<?php echo esc_attr( sanitize_user( $user_name, true ) ); ?>" />
|
||||||
<p><?php _e( 'Usernames can have only alphanumeric characters, spaces, underscores, hyphens, periods, and the @ symbol.' ); ?></p>
|
<p><?php _e( 'Usernames can have only alphanumeric characters, spaces, underscores, hyphens, periods, and the @ symbol.' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -189,7 +189,7 @@ function display_setup_form( $error = null ) {
|
|||||||
<legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
|
<legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
|
||||||
<?php
|
<?php
|
||||||
if ( has_action( 'blog_privacy_selector' ) ) {
|
if ( has_action( 'blog_privacy_selector' ) ) {
|
||||||
?>
|
?>
|
||||||
<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked( 1, $blog_public ); ?> />
|
<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked( 1, $blog_public ); ?> />
|
||||||
<label for="blog-public"><?php _e( 'Allow search engines to index this site' ); ?></label><br/>
|
<label for="blog-public"><?php _e( 'Allow search engines to index this site' ); ?></label><br/>
|
||||||
<input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked( 0, $blog_public ); ?> />
|
<input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked( 0, $blog_public ); ?> />
|
||||||
@ -199,7 +199,7 @@ function display_setup_form( $error = null ) {
|
|||||||
/** This action is documented in wp-admin/options-reading.php */
|
/** This action is documented in wp-admin/options-reading.php */
|
||||||
do_action( 'blog_privacy_selector' );
|
do_action( 'blog_privacy_selector' );
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( 0, $blog_public ); ?> />
|
<label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( 0, $blog_public ); ?> />
|
||||||
<?php _e( 'Discourage search engines from indexing this site' ); ?></label>
|
<?php _e( 'Discourage search engines from indexing this site' ); ?></label>
|
||||||
<p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p>
|
<p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p>
|
||||||
@ -211,7 +211,7 @@ function display_setup_form( $error = null ) {
|
|||||||
<p class="step"><?php submit_button( __( 'Install WordPress' ), 'large', 'Submit', false, array( 'id' => 'submit' ) ); ?></p>
|
<p class="step"><?php submit_button( __( 'Install WordPress' ), 'large', 'Submit', false, array( 'id' => 'submit' ) ); ?></p>
|
||||||
<input type="hidden" name="language" value="<?php echo isset( $_REQUEST['language'] ) ? esc_attr( $_REQUEST['language'] ) : ''; ?>" />
|
<input type="hidden" name="language" value="<?php echo isset( $_REQUEST['language'] ) ? esc_attr( $_REQUEST['language'] ) : ''; ?>" />
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
} // end display_setup_form()
|
} // end display_setup_form()
|
||||||
|
|
||||||
// Let's check to make sure WP isn't already installed.
|
// Let's check to make sure WP isn't already installed.
|
||||||
@ -317,14 +317,14 @@ switch ( $step ) {
|
|||||||
$scripts_to_print[] = 'user-profile';
|
$scripts_to_print[] = 'user-profile';
|
||||||
|
|
||||||
display_header();
|
display_header();
|
||||||
?>
|
?>
|
||||||
<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
|
<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
|
||||||
<p><?php _e( 'Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you’ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p>
|
<p><?php _e( 'Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you’ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p>
|
||||||
|
|
||||||
<h2><?php _e( 'Information needed' ); ?></h2>
|
<h2><?php _e( 'Information needed' ); ?></h2>
|
||||||
<p><?php _e( 'Please provide the following information. Don’t worry, you can always change these settings later.' ); ?></p>
|
<p><?php _e( 'Please provide the following information. Don’t worry, you can always change these settings later.' ); ?></p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
display_setup_form();
|
display_setup_form();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@ -376,7 +376,7 @@ switch ( $step ) {
|
|||||||
if ( $error === false ) {
|
if ( $error === false ) {
|
||||||
$wpdb->show_errors();
|
$wpdb->show_errors();
|
||||||
$result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );
|
$result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h1><?php _e( 'Success!' ); ?></h1>
|
<h1><?php _e( 'Success!' ); ?></h1>
|
||||||
|
|
||||||
@ -390,9 +390,9 @@ switch ( $step ) {
|
|||||||
<tr>
|
<tr>
|
||||||
<th><?php _e( 'Password' ); ?></th>
|
<th><?php _e( 'Password' ); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if ( ! empty( $result['password'] ) && empty( $admin_password_check ) ) :
|
if ( ! empty( $result['password'] ) && empty( $admin_password_check ) ) :
|
||||||
?>
|
?>
|
||||||
<code><?php echo esc_html( $result['password'] ); ?></code><br />
|
<code><?php echo esc_html( $result['password'] ); ?></code><br />
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<p><?php echo $result['password_message']; ?></p>
|
<p><?php echo $result['password_message']; ?></p>
|
||||||
@ -402,7 +402,7 @@ switch ( $step ) {
|
|||||||
|
|
||||||
<p class="step"><a href="<?php echo esc_url( wp_login_url() ); ?>" class="button button-large"><?php _e( 'Log In' ); ?></a></p>
|
<p class="step"><a href="<?php echo esc_url( wp_login_url() ); ?>" class="button button-large"><?php _e( 'Log In' ); ?></a></p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -161,11 +161,11 @@ if ( ! defined( 'WP_ALLOW_REPAIR' ) || ! WP_ALLOW_REPAIR ) {
|
|||||||
} else {
|
} else {
|
||||||
echo '<p>' . __( 'WordPress can automatically look for some common database problems and repair them. Repairing can take a while, so please be patient.' ) . '</p>';
|
echo '<p>' . __( 'WordPress can automatically look for some common database problems and repair them. Repairing can take a while, so please be patient.' ) . '</p>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p class="step"><a class="button button-large" href="repair.php?repair=1"><?php _e( 'Repair Database' ); ?></a></p>
|
<p class="step"><a class="button button-large" href="repair.php?repair=1"><?php _e( 'Repair Database' ); ?></a></p>
|
||||||
<p><?php _e( 'WordPress can also attempt to optimize the database. This improves performance in some situations. Repairing and optimizing the database can take a long time and the database will be locked while optimizing.' ); ?></p>
|
<p><?php _e( 'WordPress can also attempt to optimize the database. This improves performance in some situations. Repairing and optimizing the database can take a long time and the database will be locked while optimizing.' ); ?></p>
|
||||||
<p class="step"><a class="button button-large" href="repair.php?repair=2"><?php _e( 'Repair and Optimize Database' ); ?></a></p>
|
<p class="step"><a class="button button-large" href="repair.php?repair=2"><?php _e( 'Repair and Optimize Database' ); ?></a></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
|
@ -113,18 +113,18 @@ switch ( $action ) {
|
|||||||
echo "<div id='message' class='$class'><p>$message</p></div>\n";
|
echo "<div id='message' class='$class'><p>$message</p></div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h1 class="wp-heading-inline">
|
<h1 class="wp-heading-inline">
|
||||||
<?php
|
<?php
|
||||||
echo esc_html( $title );
|
echo esc_html( $title );
|
||||||
?>
|
?>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( current_user_can( 'upload_files' ) ) {
|
if ( current_user_can( 'upload_files' ) ) {
|
||||||
?>
|
?>
|
||||||
<a href="media-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
|
<a href="media-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
@ -132,39 +132,40 @@ if ( current_user_can( 'upload_files' ) ) {
|
|||||||
|
|
||||||
<form method="post" class="media-upload-form" id="media-single-form">
|
<form method="post" class="media-upload-form" id="media-single-form">
|
||||||
<p class="submit" style="padding-bottom: 0;">
|
<p class="submit" style="padding-bottom: 0;">
|
||||||
<?php submit_button( __( 'Update Media' ), 'primary', 'save', false ); ?>
|
<?php submit_button( __( 'Update Media' ), 'primary', 'save', false ); ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="media-single">
|
<div class="media-single">
|
||||||
<div id="media-item-<?php echo $att_id; ?>" class="media-item">
|
<div id="media-item-<?php echo $att_id; ?>" class="media-item">
|
||||||
<?php
|
<?php
|
||||||
echo get_media_item(
|
echo get_media_item(
|
||||||
$att_id, array(
|
$att_id,
|
||||||
'toggle' => false,
|
array(
|
||||||
'send' => false,
|
'toggle' => false,
|
||||||
'delete' => false,
|
'send' => false,
|
||||||
'show_title' => false,
|
'delete' => false,
|
||||||
'errors' => ! empty( $errors[ $att_id ] ) ? $errors[ $att_id ] : null,
|
'show_title' => false,
|
||||||
)
|
'errors' => ! empty( $errors[ $att_id ] ) ? $errors[ $att_id ] : null,
|
||||||
);
|
)
|
||||||
?>
|
);
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php submit_button( __( 'Update Media' ), 'primary', 'save' ); ?>
|
<?php submit_button( __( 'Update Media' ), 'primary', 'save' ); ?>
|
||||||
<input type="hidden" name="post_id" id="post_id" value="<?php echo isset( $post_id ) ? esc_attr( $post_id ) : ''; ?>" />
|
<input type="hidden" name="post_id" id="post_id" value="<?php echo isset( $post_id ) ? esc_attr( $post_id ) : ''; ?>" />
|
||||||
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $att_id ); ?>" />
|
<input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo esc_attr( $att_id ); ?>" />
|
||||||
<input type="hidden" name="action" value="editattachment" />
|
<input type="hidden" name="action" value="editattachment" />
|
||||||
<?php wp_original_referer_field( true, 'previous' ); ?>
|
<?php wp_original_referer_field( true, 'previous' ); ?>
|
||||||
<?php wp_nonce_field( 'media-form' ); ?>
|
<?php wp_nonce_field( 'media-form' ); ?>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require( ABSPATH . 'wp-admin/admin-footer.php' );
|
require( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ Webmaster
|
|||||||
|
|
||||||
<p><?php _e( 'Thank you. Please check your email for a link to confirm your action. Your site will not be deleted until this link is clicked.' ); ?></p>
|
<p><?php _e( 'Thank you. Please check your email for a link to confirm your action. Your site will not be deleted until this link is clicked.' ); ?></p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<p><?php printf( __( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.' ), get_network()->site_name ); ?></p>
|
<p><?php printf( __( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.' ), get_network()->site_name ); ?></p>
|
||||||
|
@ -77,7 +77,7 @@ if ( empty( $blogs ) ) :
|
|||||||
_e( 'You must be a member of at least one site to use this page.' );
|
_e( 'You must be a member of at least one site to use this page.' );
|
||||||
echo '</p>';
|
echo '</p>';
|
||||||
else :
|
else :
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<hr class="wp-header-end">
|
<hr class="wp-header-end">
|
||||||
|
|
||||||
|
@ -611,7 +611,8 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
array(
|
array(
|
||||||
array( 'autofocus' => $focus ),
|
array( 'autofocus' => $focus ),
|
||||||
'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ),
|
'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ),
|
||||||
), admin_url( 'customize.php' )
|
),
|
||||||
|
admin_url( 'customize.php' )
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
__( 'Manage with Live Preview' )
|
__( 'Manage with Live Preview' )
|
||||||
@ -652,7 +653,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
} else {
|
} else {
|
||||||
echo '<p>' . sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . '</p>';
|
echo '<p>' . sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . '</p>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="menu-locations-wrap">
|
<div id="menu-locations-wrap">
|
||||||
<form method="post" action="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>">
|
<form method="post" action="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>">
|
||||||
<table class="widefat fixed" id="menu-locations-table">
|
<table class="widefat fixed" id="menu-locations-table">
|
||||||
@ -692,7 +693,8 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
array(
|
array(
|
||||||
'action' => 'edit',
|
'action' => 'edit',
|
||||||
'menu' => $menu_locations[ $_location ],
|
'menu' => $menu_locations[ $_location ],
|
||||||
), admin_url( 'nav-menus.php' )
|
),
|
||||||
|
admin_url( 'nav-menus.php' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
@ -710,7 +712,8 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
'action' => 'edit',
|
'action' => 'edit',
|
||||||
'menu' => 0,
|
'menu' => 0,
|
||||||
'use-location' => $_location,
|
'use-location' => $_location,
|
||||||
), admin_url( 'nav-menus.php' )
|
),
|
||||||
|
admin_url( 'nav-menus.php' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
@ -729,30 +732,32 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
<input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
|
<input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
|
||||||
</form>
|
</form>
|
||||||
</div><!-- #menu-locations-wrap -->
|
</div><!-- #menu-locations-wrap -->
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires after the menu locations table is displayed.
|
* Fires after the menu locations table is displayed.
|
||||||
*
|
*
|
||||||
* @since 3.6.0
|
* @since 3.6.0
|
||||||
*/
|
*/
|
||||||
do_action( 'after_menu_locations_table' );
|
do_action( 'after_menu_locations_table' );
|
||||||
?>
|
?>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div class="manage-menus">
|
<div class="manage-menus">
|
||||||
<?php if ( $menu_count < 2 ) : ?>
|
<?php if ( $menu_count < 2 ) : ?>
|
||||||
<span class="add-edit-menu-action">
|
<span class="add-edit-menu-action">
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
__( 'Edit your menu below, or <a href="%s">create a new menu</a>. Don’t forget to save your changes!' ), esc_url(
|
__( 'Edit your menu below, or <a href="%s">create a new menu</a>. Don’t forget to save your changes!' ),
|
||||||
|
esc_url(
|
||||||
add_query_arg(
|
add_query_arg(
|
||||||
array(
|
array(
|
||||||
'action' => 'edit',
|
'action' => 'edit',
|
||||||
'menu' => 0,
|
'menu' => 0,
|
||||||
), admin_url( 'nav-menus.php' )
|
),
|
||||||
|
admin_url( 'nav-menus.php' )
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span>
|
<span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span>
|
||||||
</span><!-- /add-edit-menu-action -->
|
</span><!-- /add-edit-menu-action -->
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
@ -802,16 +807,18 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
<span class="add-new-menu-action">
|
<span class="add-new-menu-action">
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
__( 'or <a href="%s">create a new menu</a>. Don’t forget to save your changes!' ), esc_url(
|
__( 'or <a href="%s">create a new menu</a>. Don’t forget to save your changes!' ),
|
||||||
|
esc_url(
|
||||||
add_query_arg(
|
add_query_arg(
|
||||||
array(
|
array(
|
||||||
'action' => 'edit',
|
'action' => 'edit',
|
||||||
'menu' => 0,
|
'menu' => 0,
|
||||||
), admin_url( 'nav-menus.php' )
|
),
|
||||||
|
admin_url( 'nav-menus.php' )
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span>
|
<span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span>
|
||||||
</span><!-- /add-new-menu-action -->
|
</span><!-- /add-new-menu-action -->
|
||||||
</form>
|
</form>
|
||||||
@ -819,10 +826,10 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
endif;
|
endif;
|
||||||
|
|
||||||
$metabox_holder_disabled_class = '';
|
$metabox_holder_disabled_class = '';
|
||||||
if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
|
if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
|
||||||
$metabox_holder_disabled_class = ' metabox-holder-disabled';
|
$metabox_holder_disabled_class = ' metabox-holder-disabled';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div><!-- /manage-menus -->
|
</div><!-- /manage-menus -->
|
||||||
<div id="nav-menus-frame" class="wp-clearfix">
|
<div id="nav-menus-frame" class="wp-clearfix">
|
||||||
<div id="menu-settings-column" class="metabox-holder<?php echo $metabox_holder_disabled_class; ?>">
|
<div id="menu-settings-column" class="metabox-holder<?php echo $metabox_holder_disabled_class; ?>">
|
||||||
@ -843,9 +850,9 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
<form id="update-nav-menu" method="post" enctype="multipart/form-data">
|
<form id="update-nav-menu" method="post" enctype="multipart/form-data">
|
||||||
<?php
|
<?php
|
||||||
$new_screen_class = '';
|
$new_screen_class = '';
|
||||||
if ( $add_new_screen ) {
|
if ( $add_new_screen ) {
|
||||||
$new_screen_class = 'blank-slate';
|
$new_screen_class = 'blank-slate';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<h2><?php _e( 'Menu structure' ); ?></h2>
|
<h2><?php _e( 'Menu structure' ); ?></h2>
|
||||||
<div class="menu-edit <?php echo $new_screen_class; ?>">
|
<div class="menu-edit <?php echo $new_screen_class; ?>">
|
||||||
@ -859,9 +866,9 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
|
|
||||||
if ( $one_theme_location_no_menus ) {
|
if ( $one_theme_location_no_menus ) {
|
||||||
$menu_name_val = 'value="' . esc_attr( 'Menu 1' ) . '"';
|
$menu_name_val = 'value="' . esc_attr( 'Menu 1' ) . '"';
|
||||||
?>
|
?>
|
||||||
<input type="hidden" name="zero-menu-state" value="true" />
|
<input type="hidden" name="zero-menu-state" value="true" />
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
$menu_name_val = 'value="' . esc_attr( $nav_menu_selected_title ) . '"';
|
$menu_name_val = 'value="' . esc_attr( $nav_menu_selected_title ) . '"';
|
||||||
}
|
}
|
||||||
@ -880,37 +887,37 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
<div id="post-body">
|
<div id="post-body">
|
||||||
<div id="post-body-content" class="wp-clearfix">
|
<div id="post-body-content" class="wp-clearfix">
|
||||||
<?php if ( ! $add_new_screen ) : ?>
|
<?php if ( ! $add_new_screen ) : ?>
|
||||||
<?php
|
<?php
|
||||||
$hide_style = '';
|
$hide_style = '';
|
||||||
if ( isset( $menu_items ) && 0 == count( $menu_items ) ) {
|
if ( isset( $menu_items ) && 0 == count( $menu_items ) ) {
|
||||||
$hide_style = 'style="display: none;"';
|
$hide_style = 'style="display: none;"';
|
||||||
}
|
}
|
||||||
$starter_copy = ( $one_theme_location_no_menus ) ? __( 'Edit your default menu by adding or removing items. Drag each item into the order you prefer. Click Create Menu to save your changes.' ) : __( 'Drag each item into the order you prefer. Click the arrow on the right of the item to reveal additional configuration options.' );
|
$starter_copy = ( $one_theme_location_no_menus ) ? __( 'Edit your default menu by adding or removing items. Drag each item into the order you prefer. Click Create Menu to save your changes.' ) : __( 'Drag each item into the order you prefer. Click the arrow on the right of the item to reveal additional configuration options.' );
|
||||||
?>
|
?>
|
||||||
<div class="drag-instructions post-body-plain" <?php echo $hide_style; ?>>
|
<div class="drag-instructions post-body-plain" <?php echo $hide_style; ?>>
|
||||||
<p><?php echo $starter_copy; ?></p>
|
<p><?php echo $starter_copy; ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if ( isset( $edit_markup ) && ! is_wp_error( $edit_markup ) ) {
|
if ( isset( $edit_markup ) && ! is_wp_error( $edit_markup ) ) {
|
||||||
echo $edit_markup;
|
echo $edit_markup;
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<ul class="menu" id="menu-to-edit"></ul>
|
<ul class="menu" id="menu-to-edit"></ul>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ( $add_new_screen ) : ?>
|
<?php if ( $add_new_screen ) : ?>
|
||||||
<p class="post-body-plain" id="menu-name-desc"><?php _e( 'Give your menu a name, then click Create Menu.' ); ?></p>
|
<p class="post-body-plain" id="menu-name-desc"><?php _e( 'Give your menu a name, then click Create Menu.' ); ?></p>
|
||||||
<?php if ( isset( $_GET['use-location'] ) ) : ?>
|
<?php if ( isset( $_GET['use-location'] ) ) : ?>
|
||||||
<input type="hidden" name="use-location" value="<?php echo esc_attr( $_GET['use-location'] ); ?>" />
|
<input type="hidden" name="use-location" value="<?php echo esc_attr( $_GET['use-location'] ); ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
$no_menus_style = '';
|
$no_menus_style = '';
|
||||||
if ( $one_theme_location_no_menus ) {
|
if ( $one_theme_location_no_menus ) {
|
||||||
$no_menus_style = 'style="display: none;"';
|
$no_menus_style = 'style="display: none;"';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="menu-settings" <?php echo $no_menus_style; ?>>
|
<div class="menu-settings" <?php echo $no_menus_style; ?>>
|
||||||
<h3><?php _e( 'Menu Settings' ); ?></h3>
|
<h3><?php _e( 'Menu Settings' ); ?></h3>
|
||||||
<?php
|
<?php
|
||||||
@ -973,8 +980,10 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
array(
|
array(
|
||||||
'action' => 'delete',
|
'action' => 'delete',
|
||||||
'menu' => $nav_menu_selected_id,
|
'menu' => $nav_menu_selected_id,
|
||||||
), admin_url( 'nav-menus.php' )
|
),
|
||||||
), 'delete-nav_menu-' . $nav_menu_selected_id
|
admin_url( 'nav-menus.php' )
|
||||||
|
),
|
||||||
|
'delete-nav_menu-' . $nav_menu_selected_id
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
@ -166,7 +166,7 @@ if ( isset( $_GET['updated'] ) ) {
|
|||||||
<?php
|
<?php
|
||||||
$new_admin_email = get_site_option( 'new_admin_email' );
|
$new_admin_email = get_site_option( 'new_admin_email' );
|
||||||
if ( $new_admin_email && $new_admin_email != get_site_option( 'admin_email' ) ) :
|
if ( $new_admin_email && $new_admin_email != get_site_option( 'admin_email' ) ) :
|
||||||
?>
|
?>
|
||||||
<div class="updated inline">
|
<div class="updated inline">
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
@ -388,7 +388,7 @@ if ( isset( $_GET['updated'] ) ) {
|
|||||||
__( '%s KB' ),
|
__( '%s KB' ),
|
||||||
'<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" aria-describedby="fileupload-maxk-desc" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />'
|
'<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" aria-describedby="fileupload-maxk-desc" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<p class="screen-reader-text" id="fileupload-maxk-desc">
|
<p class="screen-reader-text" id="fileupload-maxk-desc">
|
||||||
<?php _e( 'Size in kilobytes' ); ?>
|
<?php _e( 'Size in kilobytes' ); ?>
|
||||||
</p>
|
</p>
|
||||||
|
@ -107,7 +107,8 @@ if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] ) {
|
|||||||
array(
|
array(
|
||||||
'update' => 'updated',
|
'update' => 'updated',
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
), 'site-info.php'
|
),
|
||||||
|
'site-info.php'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit;
|
exit;
|
||||||
@ -155,15 +156,15 @@ if ( ! empty( $messages ) ) {
|
|||||||
<?php
|
<?php
|
||||||
// The main site of the network should not be updated on this page.
|
// The main site of the network should not be updated on this page.
|
||||||
if ( $is_main_site ) :
|
if ( $is_main_site ) :
|
||||||
?>
|
?>
|
||||||
<tr class="form-field">
|
<tr class="form-field">
|
||||||
<th scope="row"><?php _e( 'Site Address (URL)' ); ?></th>
|
<th scope="row"><?php _e( 'Site Address (URL)' ); ?></th>
|
||||||
<td><?php echo esc_url( $parsed_scheme . '://' . $details->domain . $details->path ); ?></td>
|
<td><?php echo esc_url( $parsed_scheme . '://' . $details->domain . $details->path ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
// For any other site, the scheme, domain, and path can all be changed.
|
// For any other site, the scheme, domain, and path can all be changed.
|
||||||
else :
|
else :
|
||||||
?>
|
?>
|
||||||
<tr class="form-field form-required">
|
<tr class="form-field form-required">
|
||||||
<th scope="row"><?php _e( 'Site Address (URL)' ); ?></th>
|
<th scope="row"><?php _e( 'Site Address (URL)' ); ?></th>
|
||||||
<td><input name="blog[url]" type="text" id="url" value="<?php echo $parsed_scheme . '://' . esc_attr( $details->domain ) . esc_attr( $details->path ); ?>" /></td>
|
<td><input name="blog[url]" type="text" id="url" value="<?php echo $parsed_scheme . '://' . esc_attr( $details->domain ) . esc_attr( $details->path ); ?>" /></td>
|
||||||
|
@ -173,7 +173,8 @@ Name: %3$s'
|
|||||||
array(
|
array(
|
||||||
'update' => 'added',
|
'update' => 'added',
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
), 'site-new.php'
|
),
|
||||||
|
'site-new.php'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit;
|
exit;
|
||||||
@ -212,13 +213,15 @@ if ( ! empty( $messages ) ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p><?php
|
<p>
|
||||||
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: asterisk to mark required form fields. */
|
/* translators: %s: asterisk to mark required form fields. */
|
||||||
__( 'Required fields are marked %s' ),
|
__( 'Required fields are marked %s' ),
|
||||||
'<span class="required">*</span>'
|
'<span class="required">*</span>'
|
||||||
);
|
);
|
||||||
?></p>
|
?>
|
||||||
|
</p>
|
||||||
<form method="post" action="<?php echo network_admin_url( 'site-new.php?action=add-site' ); ?>" novalidate="novalidate">
|
<form method="post" action="<?php echo network_admin_url( 'site-new.php?action=add-site' ); ?>" novalidate="novalidate">
|
||||||
<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ); ?>
|
<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ); ?>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
@ -227,15 +230,15 @@ printf(
|
|||||||
<td>
|
<td>
|
||||||
<?php if ( is_subdomain_install() ) { ?>
|
<?php if ( is_subdomain_install() ) { ?>
|
||||||
<input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required /><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span>
|
<input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required /><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', get_network()->domain ); ?></span>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
echo get_network()->domain . get_network()->path
|
echo get_network()->domain . get_network()->path
|
||||||
?>
|
?>
|
||||||
<input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required />
|
<input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" autocapitalize="none" autocorrect="off" required />
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
echo '<p class="description" id="site-address-desc">' . __( 'Only lowercase letters (a-z), numbers, and hyphens are allowed.' ) . '</p>';
|
echo '<p class="description" id="site-address-desc">' . __( 'Only lowercase letters (a-z), numbers, and hyphens are allowed.' ) . '</p>';
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="form-field form-required">
|
<tr class="form-field form-required">
|
||||||
|
@ -65,7 +65,8 @@ if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] && is_
|
|||||||
array(
|
array(
|
||||||
'update' => 'updated',
|
'update' => 'updated',
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
), 'site-settings.php'
|
),
|
||||||
|
'site-settings.php'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit;
|
exit;
|
||||||
@ -138,14 +139,14 @@ if ( ! empty( $messages ) ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( strpos( $option->option_value, "\n" ) !== false ) {
|
if ( strpos( $option->option_value, "\n" ) !== false ) {
|
||||||
?>
|
?>
|
||||||
<tr class="form-field">
|
<tr class="form-field">
|
||||||
<th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>"><?php echo ucwords( str_replace( '_', ' ', $option->option_name ) ); ?></label></th>
|
<th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>"><?php echo ucwords( str_replace( '_', ' ', $option->option_name ) ); ?></label></th>
|
||||||
<td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $option->option_name ); ?>]" id="<?php echo esc_attr( $option->option_name ); ?>"<?php disabled( $disabled ); ?>><?php echo esc_textarea( $option->option_value ); ?></textarea></td>
|
<td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $option->option_name ); ?>]" id="<?php echo esc_attr( $option->option_name ); ?>"<?php disabled( $disabled ); ?>><?php echo esc_textarea( $option->option_value ); ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<tr class="form-field">
|
<tr class="form-field">
|
||||||
<th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>"><?php echo esc_html( ucwords( str_replace( '_', ' ', $option->option_name ) ) ); ?></label></th>
|
<th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>"><?php echo esc_html( ucwords( str_replace( '_', ' ', $option->option_name ) ) ); ?></label></th>
|
||||||
<?php if ( $is_main_site && in_array( $option->option_name, array( 'siteurl', 'home' ) ) ) { ?>
|
<?php if ( $is_main_site && in_array( $option->option_name, array( 'siteurl', 'home' ) ) ) { ?>
|
||||||
@ -154,7 +155,7 @@ if ( ! empty( $messages ) ) {
|
|||||||
<td><input class="<?php echo $class; ?>" name="option[<?php echo esc_attr( $option->option_name ); ?>]" type="text" id="<?php echo esc_attr( $option->option_name ); ?>" value="<?php echo esc_attr( $option->option_value ); ?>" size="40" <?php disabled( $disabled ); ?> /></td>
|
<td><input class="<?php echo $class; ?>" name="option[<?php echo esc_attr( $option->option_name ); ?>]" type="text" id="<?php echo esc_attr( $option->option_name ); ?>" value="<?php echo esc_attr( $option->option_value ); ?>" size="40" <?php disabled( $disabled ); ?> /></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
} // End foreach
|
} // End foreach
|
||||||
/**
|
/**
|
||||||
|
@ -151,7 +151,8 @@ if ( $action ) {
|
|||||||
array(
|
array(
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
$action => $n,
|
$action => $n,
|
||||||
), $referer
|
),
|
||||||
|
$referer
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit;
|
exit;
|
||||||
|
@ -296,7 +296,7 @@ do_action( 'network_site_users_after_list_table' );
|
|||||||
|
|
||||||
/** This filter is documented in wp-admin/network/site-users.php */
|
/** This filter is documented in wp-admin/network/site-users.php */
|
||||||
if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) :
|
if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_users_add_existing_form', true ) ) :
|
||||||
?>
|
?>
|
||||||
<h2 id="add-existing-user"><?php _e( 'Add Existing User' ); ?></h2>
|
<h2 id="add-existing-user"><?php _e( 'Add Existing User' ); ?></h2>
|
||||||
<form action="site-users.php?action=adduser" id="adduser" method="post">
|
<form action="site-users.php?action=adduser" id="adduser" method="post">
|
||||||
<input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" />
|
<input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" />
|
||||||
@ -330,7 +330,7 @@ if ( current_user_can( 'promote_users' ) && apply_filters( 'show_network_site_us
|
|||||||
* @param bool $bool Whether to show the Add New User form. Default true.
|
* @param bool $bool Whether to show the Add New User form. Default true.
|
||||||
*/
|
*/
|
||||||
if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) :
|
if ( current_user_can( 'create_users' ) && apply_filters( 'show_network_site_users_add_new_form', true ) ) :
|
||||||
?>
|
?>
|
||||||
<h2 id="add-new-user"><?php _e( 'Add New User' ); ?></h2>
|
<h2 id="add-new-user"><?php _e( 'Add New User' ); ?></h2>
|
||||||
<form action="<?php echo network_admin_url( 'site-users.php?action=newuser' ); ?>" id="newuser" method="post">
|
<form action="<?php echo network_admin_url( 'site-users.php?action=newuser' ); ?>" id="newuser" method="post">
|
||||||
<input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" />
|
<input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" />
|
||||||
|
@ -181,14 +181,16 @@ if ( $action ) {
|
|||||||
|
|
||||||
foreach ( $themes as $theme ) {
|
foreach ( $themes as $theme ) {
|
||||||
$delete_result = delete_theme(
|
$delete_result = delete_theme(
|
||||||
$theme, esc_url(
|
$theme,
|
||||||
|
esc_url(
|
||||||
add_query_arg(
|
add_query_arg(
|
||||||
array(
|
array(
|
||||||
'verify-delete' => 1,
|
'verify-delete' => 1,
|
||||||
'action' => 'delete-selected',
|
'action' => 'delete-selected',
|
||||||
'checked' => $_REQUEST['checked'],
|
'checked' => $_REQUEST['checked'],
|
||||||
'_wpnonce' => $_REQUEST['_wpnonce'],
|
'_wpnonce' => $_REQUEST['_wpnonce'],
|
||||||
), network_admin_url( 'themes.php' )
|
),
|
||||||
|
network_admin_url( 'themes.php' )
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -201,7 +203,8 @@ if ( $action ) {
|
|||||||
'deleted' => count( $themes ),
|
'deleted' => count( $themes ),
|
||||||
'paged' => $paged,
|
'paged' => $paged,
|
||||||
's' => $s,
|
's' => $s,
|
||||||
), network_admin_url( 'themes.php' )
|
),
|
||||||
|
network_admin_url( 'themes.php' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit;
|
exit;
|
||||||
|
@ -82,7 +82,8 @@ switch ( $action ) {
|
|||||||
echo "<li>$siteurl</li>";
|
echo "<li>$siteurl</li>";
|
||||||
|
|
||||||
$response = wp_remote_get(
|
$response = wp_remote_get(
|
||||||
$upgrade_url, array(
|
$upgrade_url,
|
||||||
|
array(
|
||||||
'timeout' => 120,
|
'timeout' => 120,
|
||||||
'httpversion' => '1.1',
|
'httpversion' => '1.1',
|
||||||
'sslverify' => false,
|
'sslverify' => false,
|
||||||
@ -131,7 +132,7 @@ switch ( $action ) {
|
|||||||
case 'show':
|
case 'show':
|
||||||
default:
|
default:
|
||||||
if ( get_site_option( 'wpmu_upgrade_site' ) != $GLOBALS['wp_db_version'] ) :
|
if ( get_site_option( 'wpmu_upgrade_site' ) != $GLOBALS['wp_db_version'] ) :
|
||||||
?>
|
?>
|
||||||
<h2><?php _e( 'Database Update Required' ); ?></h2>
|
<h2><?php _e( 'Database Update Required' ); ?></h2>
|
||||||
<p><?php _e( 'WordPress has been updated! Before we send you on your way, we need to individually upgrade the sites in your network.' ); ?></p>
|
<p><?php _e( 'WordPress has been updated! Before we send you on your way, we need to individually upgrade the sites in your network.' ); ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -66,7 +66,8 @@ if ( isset( $_REQUEST['action'] ) && 'add-user' == $_REQUEST['action'] ) {
|
|||||||
array(
|
array(
|
||||||
'update' => 'added',
|
'update' => 'added',
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
), 'user-new.php'
|
),
|
||||||
|
'user-new.php'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit;
|
exit;
|
||||||
@ -109,7 +110,7 @@ if ( ! empty( $messages ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) {
|
if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) {
|
||||||
?>
|
?>
|
||||||
<div class="error">
|
<div class="error">
|
||||||
<?php
|
<?php
|
||||||
foreach ( $add_user_errors->get_error_messages() as $message ) {
|
foreach ( $add_user_errors->get_error_messages() as $message ) {
|
||||||
|
@ -113,7 +113,8 @@ if ( isset( $_GET['action'] ) ) {
|
|||||||
array(
|
array(
|
||||||
'updated' => 'true',
|
'updated' => 'true',
|
||||||
'action' => $userfunction,
|
'action' => $userfunction,
|
||||||
), wp_get_referer()
|
),
|
||||||
|
wp_get_referer()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -169,7 +170,8 @@ if ( isset( $_GET['action'] ) ) {
|
|||||||
array(
|
array(
|
||||||
'updated' => 'true',
|
'updated' => 'true',
|
||||||
'action' => $deletefunction,
|
'action' => $deletefunction,
|
||||||
), network_admin_url( 'users.php' )
|
),
|
||||||
|
network_admin_url( 'users.php' )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit();
|
exit();
|
||||||
@ -245,13 +247,13 @@ if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty(
|
|||||||
</p></div>
|
</p></div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h1 class="wp-heading-inline"><?php esc_html_e( 'Users' ); ?></h1>
|
<h1 class="wp-heading-inline"><?php esc_html_e( 'Users' ); ?></h1>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( current_user_can( 'create_users' ) ) :
|
if ( current_user_can( 'create_users' ) ) :
|
||||||
?>
|
?>
|
||||||
<a href="<?php echo network_admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
|
<a href="<?php echo network_admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
@ -80,7 +80,7 @@ if ( ! is_multisite() ) {
|
|||||||
if ( defined( 'WP_HOME' ) ) {
|
if ( defined( 'WP_HOME' ) ) {
|
||||||
$wp_home_class = ' disabled';
|
$wp_home_class = ' disabled';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="siteurl"><?php _e( 'WordPress Address (URL)' ); ?></label></th>
|
<th scope="row"><label for="siteurl"><?php _e( 'WordPress Address (URL)' ); ?></label></th>
|
||||||
@ -90,15 +90,15 @@ if ( ! is_multisite() ) {
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="home"><?php _e( 'Site Address (URL)' ); ?></label></th>
|
<th scope="row"><label for="home"><?php _e( 'Site Address (URL)' ); ?></label></th>
|
||||||
<td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php echo $wp_home_class; ?>" />
|
<td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php echo $wp_home_class; ?>" />
|
||||||
<?php if ( ! defined( 'WP_HOME' ) ) : ?>
|
<?php if ( ! defined( 'WP_HOME' ) ) : ?>
|
||||||
<p class="description" id="home-description">
|
<p class="description" id="home-description">
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: Codex URL */
|
/* translators: %s: Codex URL */
|
||||||
__( 'Enter the address here if you <a href="%s">want your site home page to be different from your WordPress installation directory</a>.' ),
|
__( 'Enter the address here if you <a href="%s">want your site home page to be different from your WordPress installation directory</a>.' ),
|
||||||
__( 'https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory' )
|
__( 'https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
@ -113,7 +113,7 @@ if ( ! is_multisite() ) {
|
|||||||
<?php
|
<?php
|
||||||
$new_admin_email = get_option( 'new_admin_email' );
|
$new_admin_email = get_option( 'new_admin_email' );
|
||||||
if ( $new_admin_email && $new_admin_email != get_option( 'admin_email' ) ) :
|
if ( $new_admin_email && $new_admin_email != get_option( 'admin_email' ) ) :
|
||||||
?>
|
?>
|
||||||
<div class="updated inline">
|
<div class="updated inline">
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
@ -140,7 +140,7 @@ if ( $new_admin_email && $new_admin_email != get_option( 'admin_email' ) ) :
|
|||||||
<th scope="row"><?php _e( 'Membership' ); ?></th>
|
<th scope="row"><?php _e( 'Membership' ); ?></th>
|
||||||
<td> <fieldset><legend class="screen-reader-text"><span><?php _e( 'Membership' ); ?></span></legend><label for="users_can_register">
|
<td> <fieldset><legend class="screen-reader-text"><span><?php _e( 'Membership' ); ?></span></legend><label for="users_can_register">
|
||||||
<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked( '1', get_option( 'users_can_register' ) ); ?> />
|
<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked( '1', get_option( 'users_can_register' ) ); ?> />
|
||||||
<?php _e( 'Anyone can register' ); ?></label>
|
<?php _e( 'Anyone can register' ); ?></label>
|
||||||
</fieldset></td>
|
</fieldset></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ if ( $new_admin_email && $new_admin_email != get_option( 'admin_email' ) ) :
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
$languages = get_available_languages();
|
$languages = get_available_languages();
|
||||||
@ -241,7 +241,7 @@ if ( empty( $tzstring ) ) { // Create a UTC+- zone if no timezone string exists
|
|||||||
'<abbr>' . __( 'UTC' ) . '</abbr>',
|
'<abbr>' . __( 'UTC' ) . '</abbr>',
|
||||||
'<code>' . date_i18n( $timezone_format, false, true ) . '</code>'
|
'<code>' . date_i18n( $timezone_format, false, true ) . '</code>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
<?php if ( get_option( 'timezone_string' ) || ! empty( $current_offset ) ) : ?>
|
<?php if ( get_option( 'timezone_string' ) || ! empty( $current_offset ) ) : ?>
|
||||||
<span id="local-time">
|
<span id="local-time">
|
||||||
|
@ -96,28 +96,28 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
* @global array $wp_settings
|
* @global array $wp_settings
|
||||||
*/
|
*/
|
||||||
if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) :
|
if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) :
|
||||||
?>
|
?>
|
||||||
<h2 class="title"><?php _e( 'Embeds' ); ?></h2>
|
<h2 class="title"><?php _e( 'Embeds' ); ?></h2>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<?php do_settings_fields( 'media', 'embeds' ); ?>
|
<?php do_settings_fields( 'media', 'embeds' ); ?>
|
||||||
</table>
|
</table>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( ! is_multisite() ) : ?>
|
<?php if ( ! is_multisite() ) : ?>
|
||||||
<h2 class="title"><?php _e( 'Uploading Files' ); ?></h2>
|
<h2 class="title"><?php _e( 'Uploading Files' ); ?></h2>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<?php
|
<?php
|
||||||
// If upload_url_path is not the default (empty), and upload_path is not the default ('wp-content/uploads' or empty)
|
// If upload_url_path is not the default (empty), and upload_path is not the default ('wp-content/uploads' or empty)
|
||||||
if ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) :
|
if ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-content/uploads' && get_option( 'upload_path' ) ) ) :
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="upload_path"><?php _e( 'Store uploads in this folder' ); ?></label></th>
|
<th scope="row"><label for="upload_path"><?php _e( 'Store uploads in this folder' ); ?></label></th>
|
||||||
<td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr( get_option( 'upload_path' ) ); ?>" class="regular-text code" />
|
<td><input name="upload_path" type="text" id="upload_path" value="<?php echo esc_attr( get_option( 'upload_path' ) ); ?>" class="regular-text code" />
|
||||||
<p class="description">
|
<p class="description">
|
||||||
<?php
|
<?php
|
||||||
/* translators: %s: wp-content/uploads */
|
/* translators: %s: wp-content/uploads */
|
||||||
printf( __( 'Default is %s' ), '<code>wp-content/uploads</code>' );
|
printf( __( 'Default is %s' ), '<code>wp-content/uploads</code>' );
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -136,12 +136,12 @@ if ( get_option( 'upload_url_path' ) || ( get_option( 'upload_path' ) != 'wp-con
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<label for="uploads_use_yearmonth_folders">
|
<label for="uploads_use_yearmonth_folders">
|
||||||
<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked( '1', get_option( 'uploads_use_yearmonth_folders' ) ); ?> />
|
<input name="uploads_use_yearmonth_folders" type="checkbox" id="uploads_use_yearmonth_folders" value="1"<?php checked( '1', get_option( 'uploads_use_yearmonth_folders' ) ); ?> />
|
||||||
<?php _e( 'Organize my uploads into month- and year-based folders' ); ?>
|
<?php _e( 'Organize my uploads into month- and year-based folders' ); ?>
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php do_settings_fields( 'media', 'uploads' ); ?>
|
<?php do_settings_fields( 'media', 'uploads' ); ?>
|
||||||
</table>
|
</table>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ require( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
__( 'WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="%s">number of tags are available</a>, and here are some examples to get you started.' ),
|
__( 'WordPress offers you the ability to create a custom URL structure for your permalinks and archives. Custom URL structures can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="%s">number of tags are available</a>, and here are some examples to get you started.' ),
|
||||||
__( 'https://codex.wordpress.org/Using_Permalinks' )
|
__( 'https://codex.wordpress.org/Using_Permalinks' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -317,39 +317,39 @@ printf( __( 'If you like, you may enter custom structures for your category and
|
|||||||
<?php submit_button(); ?>
|
<?php submit_button(); ?>
|
||||||
</form>
|
</form>
|
||||||
<?php if ( ! is_multisite() ) { ?>
|
<?php if ( ! is_multisite() ) { ?>
|
||||||
<?php
|
<?php
|
||||||
if ( $iis7_permalinks ) :
|
if ( $iis7_permalinks ) :
|
||||||
if ( isset( $_POST['submit'] ) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
|
if ( isset( $_POST['submit'] ) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
|
||||||
if ( file_exists( $home_path . 'web.config' ) ) :
|
if ( file_exists( $home_path . 'web.config' ) ) :
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: web.config, 2: Codex URL, 3: CTRL + a, 4: element code */
|
/* translators: 1: web.config, 2: Codex URL, 3: CTRL + a, 4: element code */
|
||||||
__( 'If your %1$s file was <a href="%2$s">writable</a>, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your %1$s file. Click in the field and press %3$s to select all. Then insert this rule inside of the %4$s element in %1$s file.' ),
|
__( 'If your %1$s file was <a href="%2$s">writable</a>, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your %1$s file. Click in the field and press %3$s to select all. Then insert this rule inside of the %4$s element in %1$s file.' ),
|
||||||
'<code>web.config</code>',
|
'<code>web.config</code>',
|
||||||
__( 'https://codex.wordpress.org/Changing_File_Permissions' ),
|
__( 'https://codex.wordpress.org/Changing_File_Permissions' ),
|
||||||
'<kbd>CTRL + a</kbd>',
|
'<kbd>CTRL + a</kbd>',
|
||||||
'<code>/<configuration>/<system.webServer>/<rewrite>/<rules></code>'
|
'<code>/<configuration>/<system.webServer>/<rewrite>/<rules></code>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<form action="options-permalink.php" method="post">
|
<form action="options-permalink.php" method="post">
|
||||||
<?php wp_nonce_field( 'update-permalink' ); ?>
|
<?php wp_nonce_field( 'update-permalink' ); ?>
|
||||||
<p><textarea rows="9" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules() ); ?></textarea></p>
|
<p><textarea rows="9" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules() ); ?></textarea></p>
|
||||||
</form>
|
</form>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: web.config */
|
/* translators: %s: web.config */
|
||||||
__( 'If you temporarily make your %s file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.' ),
|
__( 'If you temporarily make your %s file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.' ),
|
||||||
'<code>web.config</code>'
|
'<code>web.config</code>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: Codex URL, 2: web.config, 3: CTRL + a */
|
/* translators: 1: Codex URL, 2: web.config, 3: CTRL + a */
|
||||||
__( 'If the root directory of your site was <a href="%1$s">writable</a>, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your %2$s file. Create a new file, called %2$s in the root directory of your site. Click in the field and press %3$s to select all. Then insert this code into the %2$s file.' ),
|
__( 'If the root directory of your site was <a href="%1$s">writable</a>, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your %2$s file. Create a new file, called %2$s in the root directory of your site. Click in the field and press %3$s to select all. Then insert this code into the %2$s file.' ),
|
||||||
@ -357,42 +357,42 @@ if ( $iis7_permalinks ) :
|
|||||||
'<code>web.config</code>',
|
'<code>web.config</code>',
|
||||||
'<kbd>CTRL + a</kbd>'
|
'<kbd>CTRL + a</kbd>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<form action="options-permalink.php" method="post">
|
<form action="options-permalink.php" method="post">
|
||||||
<?php wp_nonce_field( 'update-permalink' ); ?>
|
<?php wp_nonce_field( 'update-permalink' ); ?>
|
||||||
<p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules( true ) ); ?></textarea></p>
|
<p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules( true ) ); ?></textarea></p>
|
||||||
</form>
|
</form>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: web.config */
|
/* translators: %s: web.config */
|
||||||
__( 'If you temporarily make your site’s root directory writable for us to generate the %s file automatically, do not forget to revert the permissions after the file has been created.' ),
|
__( 'If you temporarily make your site’s root directory writable for us to generate the %s file automatically, do not forget to revert the permissions after the file has been created.' ),
|
||||||
'<code>web.config</code>'
|
'<code>web.config</code>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php elseif ( $is_nginx ) : ?>
|
<?php elseif ( $is_nginx ) : ?>
|
||||||
<p><?php _e( '<a href="https://codex.wordpress.org/Nginx">Documentation on Nginx configuration</a>.' ); ?></p>
|
<p><?php _e( '<a href="https://codex.wordpress.org/Nginx">Documentation on Nginx configuration</a>.' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
else :
|
else :
|
||||||
if ( $permalink_structure && ! $using_index_permalinks && ! $writable && $update_required ) :
|
if ( $permalink_structure && ! $using_index_permalinks && ! $writable && $update_required ) :
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: .htaccess, 2: Codex URL, 3: CTRL + a */
|
/* translators: 1: .htaccess, 2: Codex URL, 3: CTRL + a */
|
||||||
__( 'If your %1$s file was <a href="%2$s">writable</a>, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s to select all.' ),
|
__( 'If your %1$s file was <a href="%2$s">writable</a>, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s to select all.' ),
|
||||||
'<code>.htaccess</code>',
|
'<code>.htaccess</code>',
|
||||||
__( 'https://codex.wordpress.org/Changing_File_Permissions' ),
|
__( 'https://codex.wordpress.org/Changing_File_Permissions' ),
|
||||||
'<kbd>CTRL + a</kbd>'
|
'<kbd>CTRL + a</kbd>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<form action="options-permalink.php" method="post">
|
<form action="options-permalink.php" method="post">
|
||||||
<?php wp_nonce_field( 'update-permalink' ); ?>
|
<?php wp_nonce_field( 'update-permalink' ); ?>
|
||||||
<p><textarea rows="6" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->mod_rewrite_rules() ); ?></textarea></p>
|
<p><textarea rows="6" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->mod_rewrite_rules() ); ?></textarea></p>
|
||||||
</form>
|
</form>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -62,16 +62,16 @@ if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', '
|
|||||||
<?php if ( ! get_pages() ) : ?>
|
<?php if ( ! get_pages() ) : ?>
|
||||||
<input name="show_on_front" type="hidden" value="posts" />
|
<input name="show_on_front" type="hidden" value="posts" />
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<?php
|
<?php
|
||||||
if ( 'posts' != get_option( 'show_on_front' ) ) :
|
if ( 'posts' != get_option( 'show_on_front' ) ) :
|
||||||
update_option( 'show_on_front', 'posts' );
|
update_option( 'show_on_front', 'posts' );
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
else :
|
else :
|
||||||
if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) ) {
|
if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) ) {
|
||||||
update_option( 'show_on_front', 'posts' );
|
update_option( 'show_on_front', 'posts' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><?php _e( 'Your homepage displays' ); ?></th>
|
<th scope="row"><?php _e( 'Your homepage displays' ); ?></th>
|
||||||
@ -90,7 +90,8 @@ else :
|
|||||||
<li><label for="page_on_front">
|
<li><label for="page_on_front">
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
__( 'Homepage: %s' ), wp_dropdown_pages(
|
__( 'Homepage: %s' ),
|
||||||
|
wp_dropdown_pages(
|
||||||
array(
|
array(
|
||||||
'name' => 'page_on_front',
|
'name' => 'page_on_front',
|
||||||
'echo' => 0,
|
'echo' => 0,
|
||||||
@ -100,12 +101,13 @@ else :
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</label></li>
|
</label></li>
|
||||||
<li><label for="page_for_posts">
|
<li><label for="page_for_posts">
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
__( 'Posts page: %s' ), wp_dropdown_pages(
|
__( 'Posts page: %s' ),
|
||||||
|
wp_dropdown_pages(
|
||||||
array(
|
array(
|
||||||
'name' => 'page_for_posts',
|
'name' => 'page_for_posts',
|
||||||
'echo' => 0,
|
'echo' => 0,
|
||||||
@ -115,10 +117,10 @@ else :
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</label></li>
|
</label></li>
|
||||||
</ul>
|
</ul>
|
||||||
<?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
|
<?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
|
||||||
<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
|
<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</fieldset></td>
|
</fieldset></td>
|
||||||
|
@ -69,7 +69,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Formatting' ); ?></span></legend>
|
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Formatting' ); ?></span></legend>
|
||||||
<label for="use_smilies">
|
<label for="use_smilies">
|
||||||
<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked( '1', get_option( 'use_smilies' ) ); ?> />
|
<input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked( '1', get_option( 'use_smilies' ) ); ?> />
|
||||||
<?php _e( 'Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display' ); ?></label><br />
|
<?php _e( 'Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display' ); ?></label><br />
|
||||||
<label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked( '1', get_option( 'use_balanceTags' ) ); ?> /> <?php _e( 'WordPress should correct invalidly nested XHTML automatically' ); ?></label>
|
<label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked( '1', get_option( 'use_balanceTags' ) ); ?> /> <?php _e( 'WordPress should correct invalidly nested XHTML automatically' ); ?></label>
|
||||||
</fieldset></td>
|
</fieldset></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -107,22 +107,22 @@ unset( $post_formats['standard'] );
|
|||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if ( get_option( 'link_manager_enabled' ) ) :
|
if ( get_option( 'link_manager_enabled' ) ) :
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="default_link_category"><?php _e( 'Default Link Category' ); ?></label></th>
|
<th scope="row"><label for="default_link_category"><?php _e( 'Default Link Category' ); ?></label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
wp_dropdown_categories(
|
wp_dropdown_categories(
|
||||||
array(
|
array(
|
||||||
'hide_empty' => 0,
|
'hide_empty' => 0,
|
||||||
'name' => 'default_link_category',
|
'name' => 'default_link_category',
|
||||||
'orderby' => 'name',
|
'orderby' => 'name',
|
||||||
'selected' => get_option( 'default_link_category' ),
|
'selected' => get_option( 'default_link_category' ),
|
||||||
'hierarchical' => true,
|
'hierarchical' => true,
|
||||||
'taxonomy' => 'link_category',
|
'taxonomy' => 'link_category',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@ -136,18 +136,18 @@ do_settings_fields( 'writing', 'remote_publishing' ); // A deprecated section.
|
|||||||
<?php
|
<?php
|
||||||
/** This filter is documented in wp-admin/options.php */
|
/** This filter is documented in wp-admin/options.php */
|
||||||
if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {
|
if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {
|
||||||
?>
|
?>
|
||||||
<h2 class="title"><?php _e( 'Post via email' ); ?></h2>
|
<h2 class="title"><?php _e( 'Post via email' ); ?></h2>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1, 2, 3: examples of random email addresses */
|
/* translators: 1, 2, 3: examples of random email addresses */
|
||||||
__( 'To post to WordPress by email you must set up a secret email account with POP3 access. Any mail received at this address will be posted, so it’s a good idea to keep this address very secret. Here are three random strings you could use: %1$s, %2$s, %3$s.' ),
|
__( 'To post to WordPress by email you must set up a secret email account with POP3 access. Any mail received at this address will be posted, so it’s a good idea to keep this address very secret. Here are three random strings you could use: %1$s, %2$s, %3$s.' ),
|
||||||
sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
|
sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
|
||||||
sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
|
sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
|
||||||
sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) )
|
sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
@ -171,20 +171,20 @@ printf(
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="default_email_category"><?php _e( 'Default Mail Category' ); ?></label></th>
|
<th scope="row"><label for="default_email_category"><?php _e( 'Default Mail Category' ); ?></label></th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
wp_dropdown_categories(
|
wp_dropdown_categories(
|
||||||
array(
|
array(
|
||||||
'hide_empty' => 0,
|
'hide_empty' => 0,
|
||||||
'name' => 'default_email_category',
|
'name' => 'default_email_category',
|
||||||
'orderby' => 'name',
|
'orderby' => 'name',
|
||||||
'selected' => get_option( 'default_email_category' ),
|
'selected' => get_option( 'default_email_category' ),
|
||||||
'hierarchical' => true,
|
'hierarchical' => true,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php do_settings_fields( 'writing', 'post_via_email' ); ?>
|
<?php do_settings_fields( 'writing', 'post_via_email' ); ?>
|
||||||
</table>
|
</table>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
@ -197,37 +197,37 @@ wp_dropdown_categories(
|
|||||||
* @param bool $enable Whether to enable the Update Services settings area. Default true.
|
* @param bool $enable Whether to enable the Update Services settings area. Default true.
|
||||||
*/
|
*/
|
||||||
if ( apply_filters( 'enable_update_services_configuration', true ) ) {
|
if ( apply_filters( 'enable_update_services_configuration', true ) ) {
|
||||||
?>
|
?>
|
||||||
<h2 class="title"><?php _e( 'Update Services' ); ?></h2>
|
<h2 class="title"><?php _e( 'Update Services' ); ?></h2>
|
||||||
|
|
||||||
<?php if ( 1 == get_option( 'blog_public' ) ) : ?>
|
<?php if ( 1 == get_option( 'blog_public' ) ) : ?>
|
||||||
|
|
||||||
<p><label for="ping_sites">
|
<p><label for="ping_sites">
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: %s: Codex URL */
|
/* translators: %s: Codex URL */
|
||||||
__( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="%s">Update Services</a> on the Codex. Separate multiple service URLs with line breaks.' ),
|
__( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="%s">Update Services</a> on the Codex. Separate multiple service URLs with line breaks.' ),
|
||||||
__( 'https://codex.wordpress.org/Update_Services' )
|
__( 'https://codex.wordpress.org/Update_Services' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option( 'ping_sites' ) ); ?></textarea>
|
<textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option( 'ping_sites' ) ); ?></textarea>
|
||||||
|
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
/* translators: 1: Codex URL, 2: Reading Settings URL */
|
/* translators: 1: Codex URL, 2: Reading Settings URL */
|
||||||
__( 'WordPress is not notifying any <a href="%1$s">Update Services</a> because of your site’s <a href="%2$s">visibility settings</a>.' ),
|
__( 'WordPress is not notifying any <a href="%1$s">Update Services</a> because of your site’s <a href="%2$s">visibility settings</a>.' ),
|
||||||
__( 'https://codex.wordpress.org/Update_Services' ),
|
__( 'https://codex.wordpress.org/Update_Services' ),
|
||||||
'options-reading.php'
|
'options-reading.php'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php } // enable_update_services_configuration ?>
|
<?php } // enable_update_services_configuration ?>
|
||||||
|
|
||||||
<?php do_settings_sections( 'writing' ); ?>
|
<?php do_settings_sections( 'writing' ); ?>
|
||||||
|
@ -80,8 +80,8 @@ if ( is_multisite() && ! current_user_can( 'manage_network_options' ) && 'update
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$whitelist_options = array(
|
$whitelist_options = array(
|
||||||
'general' => array(
|
'general' => array(
|
||||||
'blogname',
|
'blogname',
|
||||||
'blogdescription',
|
'blogdescription',
|
||||||
'gmt_offset',
|
'gmt_offset',
|
||||||
@ -118,7 +118,7 @@ $whitelist_options = array(
|
|||||||
'comment_registration',
|
'comment_registration',
|
||||||
'show_comments_cookies_opt_in',
|
'show_comments_cookies_opt_in',
|
||||||
),
|
),
|
||||||
'media' => array(
|
'media' => array(
|
||||||
'thumbnail_size_w',
|
'thumbnail_size_w',
|
||||||
'thumbnail_size_h',
|
'thumbnail_size_h',
|
||||||
'thumbnail_crop',
|
'thumbnail_crop',
|
||||||
@ -130,7 +130,7 @@ $whitelist_options = array(
|
|||||||
'image_default_align',
|
'image_default_align',
|
||||||
'image_default_link_type',
|
'image_default_link_type',
|
||||||
),
|
),
|
||||||
'reading' => array(
|
'reading' => array(
|
||||||
'posts_per_page',
|
'posts_per_page',
|
||||||
'posts_per_rss',
|
'posts_per_rss',
|
||||||
'rss_use_excerpt',
|
'rss_use_excerpt',
|
||||||
@ -139,7 +139,7 @@ $whitelist_options = array(
|
|||||||
'page_for_posts',
|
'page_for_posts',
|
||||||
'blog_public',
|
'blog_public',
|
||||||
),
|
),
|
||||||
'writing' => array(
|
'writing' => array(
|
||||||
'default_category',
|
'default_category',
|
||||||
'default_email_category',
|
'default_email_category',
|
||||||
'default_link_category',
|
'default_link_category',
|
||||||
@ -261,7 +261,8 @@ if ( 'update' == $action ) {
|
|||||||
foreach ( $options as $option ) {
|
foreach ( $options as $option ) {
|
||||||
if ( $unregistered ) {
|
if ( $unregistered ) {
|
||||||
_deprecated_argument(
|
_deprecated_argument(
|
||||||
'options.php', '2.7.0',
|
'options.php',
|
||||||
|
'2.7.0',
|
||||||
sprintf(
|
sprintf(
|
||||||
/* translators: %s: the option/setting */
|
/* translators: %s: the option/setting */
|
||||||
__( 'The %s setting is unregistered. Unregistered settings are deprecated. See https://codex.wordpress.org/Settings_API' ),
|
__( 'The %s setting is unregistered. Unregistered settings are deprecated. See https://codex.wordpress.org/Settings_API' ),
|
||||||
|
@ -298,7 +298,7 @@ if ( ! in_array( 'plugin_editor_notice', $dismissed_pointers, true ) ) :
|
|||||||
} else {
|
} else {
|
||||||
$return_url = admin_url( '/' );
|
$return_url = admin_url( '/' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="file-editor-warning" class="notification-dialog-wrap file-editor-warning hide-if-no-js hidden">
|
<div id="file-editor-warning" class="notification-dialog-wrap file-editor-warning hide-if-no-js hidden">
|
||||||
<div class="notification-dialog-background"></div>
|
<div class="notification-dialog-background"></div>
|
||||||
<div class="notification-dialog">
|
<div class="notification-dialog">
|
||||||
@ -315,7 +315,7 @@ if ( ! in_array( 'plugin_editor_notice', $dismissed_pointers, true ) ) :
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif; // editor warning notice
|
endif; // editor warning notice
|
||||||
|
|
||||||
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||||
|
@ -492,15 +492,16 @@ if ( isset( $_GET['error'] ) ) :
|
|||||||
'action' => 'error_scrape',
|
'action' => 'error_scrape',
|
||||||
'plugin' => urlencode( $plugin ),
|
'plugin' => urlencode( $plugin ),
|
||||||
'_wpnonce' => urlencode( $_GET['_error_nonce'] ),
|
'_wpnonce' => urlencode( $_GET['_error_nonce'] ),
|
||||||
), admin_url( 'plugins.php' )
|
),
|
||||||
|
admin_url( 'plugins.php' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<iframe style="border:0" width="100%" height="70px" src="<?php echo esc_url( $iframe_url ); ?>"></iframe>
|
<iframe style="border:0" width="100%" height="70px" src="<?php echo esc_url( $iframe_url ); ?>"></iframe>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
elseif ( isset( $_GET['deleted'] ) ) :
|
elseif ( isset( $_GET['deleted'] ) ) :
|
||||||
$delete_result = get_transient( 'plugins_delete_result_' . $user_ID );
|
$delete_result = get_transient( 'plugins_delete_result_' . $user_ID );
|
||||||
// Delete it once we're done.
|
// Delete it once we're done.
|
||||||
@ -543,9 +544,9 @@ echo esc_html( $title );
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( ( ! is_multisite() || is_network_admin() ) && current_user_can( 'install_plugins' ) ) {
|
if ( ( ! is_multisite() || is_network_admin() ) && current_user_can( 'install_plugins' ) ) {
|
||||||
?>
|
?>
|
||||||
<a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'plugin' ); ?></a>
|
<a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'plugin' ); ?></a>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( strlen( $s ) ) {
|
if ( strlen( $s ) ) {
|
||||||
|
@ -242,7 +242,8 @@ switch ( $action ) {
|
|||||||
array(
|
array(
|
||||||
'trashed' => 1,
|
'trashed' => 1,
|
||||||
'ids' => $post_id,
|
'ids' => $post_id,
|
||||||
), $sendback
|
),
|
||||||
|
$sendback
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
exit();
|
exit();
|
||||||
|
@ -33,8 +33,10 @@ function wp_load_press_this() {
|
|||||||
'action' => 'activate',
|
'action' => 'activate',
|
||||||
'plugin' => $plugin_file,
|
'plugin' => $plugin_file,
|
||||||
'from' => 'press-this',
|
'from' => 'press-this',
|
||||||
), admin_url( 'plugins.php' )
|
),
|
||||||
), 'activate-plugin_' . $plugin_file
|
admin_url( 'plugins.php' )
|
||||||
|
),
|
||||||
|
'activate-plugin_' . $plugin_file
|
||||||
);
|
);
|
||||||
$action = sprintf(
|
$action = sprintf(
|
||||||
'<a href="%1$s" aria-label="%2$s">%2$s</a>',
|
'<a href="%1$s" aria-label="%2$s">%2$s</a>',
|
||||||
@ -49,8 +51,10 @@ function wp_load_press_this() {
|
|||||||
'action' => 'install-plugin',
|
'action' => 'install-plugin',
|
||||||
'plugin' => $plugin_slug,
|
'plugin' => $plugin_slug,
|
||||||
'from' => 'press-this',
|
'from' => 'press-this',
|
||||||
), self_admin_url( 'update.php' )
|
),
|
||||||
), 'install-plugin_' . $plugin_slug
|
self_admin_url( 'update.php' )
|
||||||
|
),
|
||||||
|
'install-plugin_' . $plugin_slug
|
||||||
);
|
);
|
||||||
$action = sprintf(
|
$action = sprintf(
|
||||||
'<a href="%1$s" class="install-now" data-slug="%2$s" data-name="%2$s" aria-label="%3$s">%3$s</a>',
|
'<a href="%1$s" class="install-now" data-slug="%2$s" data-name="%2$s" aria-label="%3$s">%3$s</a>',
|
||||||
|
@ -58,7 +58,7 @@ if ( ! empty( $action ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$privacy_policy_page_content = WP_Privacy_Policy_Content::get_default_content();
|
$privacy_policy_page_content = WP_Privacy_Policy_Content::get_default_content();
|
||||||
$privacy_policy_page_id = wp_insert_post(
|
$privacy_policy_page_id = wp_insert_post(
|
||||||
array(
|
array(
|
||||||
'post_title' => __( 'Privacy Policy' ),
|
'post_title' => __( 'Privacy Policy' ),
|
||||||
'post_status' => 'draft',
|
'post_status' => 'draft',
|
||||||
@ -195,16 +195,19 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$has_pages = (bool) get_posts( array(
|
$has_pages = (bool) get_posts(
|
||||||
'post_type' => 'page',
|
array(
|
||||||
'posts_per_page' => 1,
|
'post_type' => 'page',
|
||||||
'post_status' => array(
|
'posts_per_page' => 1,
|
||||||
'publish',
|
'post_status' => array(
|
||||||
'draft',
|
'publish',
|
||||||
),
|
'draft',
|
||||||
) );
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if ( $has_pages ) : ?>
|
if ( $has_pages ) :
|
||||||
|
?>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<label for="page_for_privacy_policy">
|
<label for="page_for_privacy_policy">
|
||||||
<?php _e( 'Select an existing page:' ); ?>
|
<?php _e( 'Select an existing page:' ); ?>
|
||||||
|
@ -63,7 +63,8 @@ switch ( $action ) {
|
|||||||
array(
|
array(
|
||||||
'message' => 5,
|
'message' => 5,
|
||||||
'revision' => $revision->ID,
|
'revision' => $revision->ID,
|
||||||
), get_edit_post_link( $post->ID, 'url' )
|
),
|
||||||
|
get_edit_post_link( $post->ID, 'url' )
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 'view':
|
case 'view':
|
||||||
|
@ -102,7 +102,7 @@ function setup_config_display_header( $body_classes = array() ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
header( 'Content-Type: text/html; charset=utf-8' );
|
header( 'Content-Type: text/html; charset=utf-8' );
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"<?php echo $dir_attr; ?>>
|
<html xmlns="http://www.w3.org/1999/xhtml"<?php echo $dir_attr; ?>>
|
||||||
<head>
|
<head>
|
||||||
@ -114,7 +114,7 @@ function setup_config_display_header( $body_classes = array() ) {
|
|||||||
</head>
|
</head>
|
||||||
<body class="<?php echo implode( ' ', $body_classes ); ?>">
|
<body class="<?php echo implode( ' ', $body_classes ); ?>">
|
||||||
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
|
<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
|
||||||
<?php
|
<?php
|
||||||
} // end function setup_config_display_header();
|
} // end function setup_config_display_header();
|
||||||
|
|
||||||
$language = '';
|
$language = '';
|
||||||
@ -154,7 +154,7 @@ switch ( $step ) {
|
|||||||
if ( ! empty( $loaded_language ) ) {
|
if ( ! empty( $loaded_language ) ) {
|
||||||
$step_1 .= '&language=' . $loaded_language;
|
$step_1 .= '&language=' . $loaded_language;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<h1 class="screen-reader-text"><?php _e( 'Before getting started' ); ?></h1>
|
<h1 class="screen-reader-text"><?php _e( 'Before getting started' ); ?></h1>
|
||||||
<p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ); ?></p>
|
<p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ); ?></p>
|
||||||
<ol>
|
<ol>
|
||||||
@ -165,35 +165,35 @@ switch ( $step ) {
|
|||||||
<li><?php _e( 'Table prefix (if you want to run more than one WordPress in a single database)' ); ?></li>
|
<li><?php _e( 'Table prefix (if you want to run more than one WordPress in a single database)' ); ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
/* translators: %s: wp-config.php */
|
/* translators: %s: wp-config.php */
|
||||||
printf(
|
printf(
|
||||||
__( 'We’re going to use this information to create a %s file.' ),
|
__( 'We’re going to use this information to create a %s file.' ),
|
||||||
'<code>wp-config.php</code>'
|
'<code>wp-config.php</code>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<strong>
|
<strong>
|
||||||
<?php
|
<?php
|
||||||
/* translators: 1: wp-config-sample.php, 2: wp-config.php */
|
/* translators: 1: wp-config-sample.php, 2: wp-config.php */
|
||||||
printf(
|
printf(
|
||||||
__( 'If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open %1$s in a text editor, fill in your information, and save it as %2$s.' ),
|
__( 'If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open %1$s in a text editor, fill in your information, and save it as %2$s.' ),
|
||||||
'<code>wp-config-sample.php</code>',
|
'<code>wp-config-sample.php</code>',
|
||||||
'<code>wp-config.php</code>'
|
'<code>wp-config.php</code>'
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</strong>
|
</strong>
|
||||||
<?php
|
<?php
|
||||||
/* translators: %s: Codex URL */
|
/* translators: %s: Codex URL */
|
||||||
printf(
|
printf(
|
||||||
__( 'Need more help? <a href="%s">We got it</a>.' ),
|
__( 'Need more help? <a href="%s">We got it</a>.' ),
|
||||||
__( 'https://codex.wordpress.org/Editing_wp-config.php' )
|
__( 'https://codex.wordpress.org/Editing_wp-config.php' )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<p><?php _e( 'In all likelihood, these items were supplied to you by your Web Host. If you don’t have this information, then you will need to contact them before you can continue. If you’re all ready…' ); ?></p>
|
<p><?php _e( 'In all likelihood, these items were supplied to you by your Web Host. If you don’t have this information, then you will need to contact them before you can continue. If you’re all ready…' ); ?></p>
|
||||||
|
|
||||||
<p class="step"><a href="<?php echo $step_1; ?>" class="button button-large"><?php _e( 'Let’s go!' ); ?></a></p>
|
<p class="step"><a href="<?php echo $step_1; ?>" class="button button-large"><?php _e( 'Let’s go!' ); ?></a></p>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
@ -201,7 +201,7 @@ switch ( $step ) {
|
|||||||
$GLOBALS['wp_locale'] = new WP_Locale();
|
$GLOBALS['wp_locale'] = new WP_Locale();
|
||||||
|
|
||||||
setup_config_display_header();
|
setup_config_display_header();
|
||||||
?>
|
?>
|
||||||
<h1 class="screen-reader-text"><?php _e( 'Set up your database connection' ); ?></h1>
|
<h1 class="screen-reader-text"><?php _e( 'Set up your database connection' ); ?></h1>
|
||||||
<form method="post" action="setup-config.php?step=2">
|
<form method="post" action="setup-config.php?step=2">
|
||||||
<p><?php _e( 'Below you should enter your database connection details. If you’re not sure about these, contact your host.' ); ?></p>
|
<p><?php _e( 'Below you should enter your database connection details. If you’re not sure about these, contact your host.' ); ?></p>
|
||||||
@ -237,14 +237,14 @@ switch ( $step ) {
|
|||||||
<td><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td>
|
<td><?php _e( 'If you want to run multiple WordPress installations in a single database, change this.' ); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
if ( isset( $_GET['noapi'] ) ) {
|
if ( isset( $_GET['noapi'] ) ) {
|
||||||
?>
|
?>
|
||||||
<input name="noapi" type="hidden" value="1" /><?php } ?>
|
<input name="noapi" type="hidden" value="1" /><?php } ?>
|
||||||
<input type="hidden" name="language" value="<?php echo esc_attr( $language ); ?>" />
|
<input type="hidden" name="language" value="<?php echo esc_attr( $language ); ?>" />
|
||||||
<p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button button-large" /></p>
|
<p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button button-large" /></p>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
@ -387,24 +387,24 @@ switch ( $step ) {
|
|||||||
|
|
||||||
if ( ! is_writable( ABSPATH ) ) :
|
if ( ! is_writable( ABSPATH ) ) :
|
||||||
setup_config_display_header();
|
setup_config_display_header();
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
/* translators: %s: wp-config.php */
|
/* translators: %s: wp-config.php */
|
||||||
printf( __( 'Sorry, but I can’t write the %s file.' ), '<code>wp-config.php</code>' );
|
printf( __( 'Sorry, but I can’t write the %s file.' ), '<code>wp-config.php</code>' );
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
/* translators: %s: wp-config.php */
|
/* translators: %s: wp-config.php */
|
||||||
printf( __( 'You can create the %s file manually and paste the following text into it.' ), '<code>wp-config.php</code>' );
|
printf( __( 'You can create the %s file manually and paste the following text into it.' ), '<code>wp-config.php</code>' );
|
||||||
|
|
||||||
$config_text = '';
|
$config_text = '';
|
||||||
|
|
||||||
foreach ( $config_file as $line ) {
|
foreach ( $config_file as $line ) {
|
||||||
$config_text .= htmlentities( $line, ENT_COMPAT, 'UTF-8' );
|
$config_text .= htmlentities( $line, ENT_COMPAT, 'UTF-8' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php echo $config_text; ?></textarea>
|
<textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php echo $config_text; ?></textarea>
|
||||||
<p><?php _e( 'After you’ve done that, click “Run the installation.”' ); ?></p>
|
<p><?php _e( 'After you’ve done that, click “Run the installation.”' ); ?></p>
|
||||||
@ -418,7 +418,7 @@ if ( ! /iPad|iPod|iPhone/.test( navigator.userAgent ) ) {
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
else :
|
else :
|
||||||
/*
|
/*
|
||||||
* If this file doesn't exist, then we are using the wp-config-sample.php
|
* If this file doesn't exist, then we are using the wp-config-sample.php
|
||||||
@ -437,12 +437,12 @@ if ( ! /iPad|iPod|iPhone/.test( navigator.userAgent ) ) {
|
|||||||
fclose( $handle );
|
fclose( $handle );
|
||||||
chmod( $path_to_wp_config, 0666 );
|
chmod( $path_to_wp_config, 0666 );
|
||||||
setup_config_display_header();
|
setup_config_display_header();
|
||||||
?>
|
?>
|
||||||
<h1 class="screen-reader-text"><?php _e( 'Successful database connection' ); ?></h1>
|
<h1 class="screen-reader-text"><?php _e( 'Successful database connection' ); ?></h1>
|
||||||
<p><?php _e( 'All right, sparky! You’ve made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to…' ); ?></p>
|
<p><?php _e( 'All right, sparky! You’ve made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to…' ); ?></p>
|
||||||
|
|
||||||
<p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the installation' ); ?></a></p>
|
<p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the installation' ); ?></a></p>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
|
|||||||
if ( $file_description != $file_show ) {
|
if ( $file_description != $file_show ) {
|
||||||
$description .= ' <span>(' . esc_html( $file_show ) . ')</span>';
|
$description .= ' <span>(' . esc_html( $file_show ) . ')</span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h1><?php echo esc_html( $title ); ?></h1>
|
<h1><?php echo esc_html( $title ); ?></h1>
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ if ( $theme->errors() ) {
|
|||||||
if ( $error ) :
|
if ( $error ) :
|
||||||
echo '<div class="error"><p>' . __( 'Oops, no such file exists! Double check the name and try again, merci.' ) . '</p></div>';
|
echo '<div class="error"><p>' . __( 'Oops, no such file exists! Double check the name and try again, merci.' ) . '</p></div>';
|
||||||
else :
|
else :
|
||||||
?>
|
?>
|
||||||
<form name="template" id="template" action="theme-editor.php" method="post">
|
<form name="template" id="template" action="theme-editor.php" method="post">
|
||||||
<?php wp_nonce_field( 'edit-theme_' . $stylesheet . '_' . $relative_file, 'nonce' ); ?>
|
<?php wp_nonce_field( 'edit-theme_' . $stylesheet . '_' . $relative_file, 'nonce' ); ?>
|
||||||
<div>
|
<div>
|
||||||
@ -296,7 +296,7 @@ else :
|
|||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
if ( is_writeable( $file ) ) {
|
if ( is_writeable( $file ) ) {
|
||||||
?>
|
?>
|
||||||
<strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
|
<strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
|
||||||
<?php _e( 'This is a file in your current parent theme.' ); ?>
|
<?php _e( 'This is a file in your current parent theme.' ); ?>
|
||||||
</p>
|
</p>
|
||||||
@ -314,7 +314,7 @@ else :
|
|||||||
</div>
|
</div>
|
||||||
<?php wp_print_file_editor_templates(); ?>
|
<?php wp_print_file_editor_templates(); ?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
endif; // $error
|
endif; // $error
|
||||||
?>
|
?>
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
@ -331,7 +331,7 @@ if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) :
|
|||||||
} else {
|
} else {
|
||||||
$return_url = admin_url( '/' );
|
$return_url = admin_url( '/' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="file-editor-warning" class="notification-dialog-wrap file-editor-warning hide-if-no-js hidden">
|
<div id="file-editor-warning" class="notification-dialog-wrap file-editor-warning hide-if-no-js hidden">
|
||||||
<div class="notification-dialog-background"></div>
|
<div class="notification-dialog-background"></div>
|
||||||
<div class="notification-dialog">
|
<div class="notification-dialog">
|
||||||
@ -356,7 +356,7 @@ if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) :
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif; // editor warning notice
|
endif; // editor warning notice
|
||||||
|
|
||||||
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||||
|
@ -41,7 +41,9 @@ foreach ( $installed_themes as $k => $v ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'theme', '_wpThemeSettings', array(
|
'theme',
|
||||||
|
'_wpThemeSettings',
|
||||||
|
array(
|
||||||
'themes' => false,
|
'themes' => false,
|
||||||
'settings' => array(
|
'settings' => array(
|
||||||
'isInstall' => true,
|
'isInstall' => true,
|
||||||
|
@ -133,7 +133,9 @@ if ( current_user_can( 'switch_themes' ) ) {
|
|||||||
wp_reset_vars( array( 'theme', 'search' ) );
|
wp_reset_vars( array( 'theme', 'search' ) );
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'theme', '_wpThemeSettings', array(
|
'theme',
|
||||||
|
'_wpThemeSettings',
|
||||||
|
array(
|
||||||
'themes' => $themes,
|
'themes' => $themes,
|
||||||
'settings' => array(
|
'settings' => array(
|
||||||
'canInstall' => ( ! is_multisite() && current_user_can( 'install_themes' ) ),
|
'canInstall' => ( ! is_multisite() && current_user_can( 'install_themes' ) ),
|
||||||
@ -172,9 +174,9 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||||||
<hr class="wp-header-end">
|
<hr class="wp-header-end">
|
||||||
<?php
|
<?php
|
||||||
if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) :
|
if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) :
|
||||||
?>
|
?>
|
||||||
<div id="message1" class="updated notice is-dismissible"><p><?php _e( 'The active theme is broken. Reverting to the default theme.' ); ?></p></div>
|
<div id="message1" class="updated notice is-dismissible"><p><?php _e( 'The active theme is broken. Reverting to the default theme.' ); ?></p></div>
|
||||||
<?php
|
<?php
|
||||||
elseif ( isset( $_GET['activated'] ) ) :
|
elseif ( isset( $_GET['activated'] ) ) :
|
||||||
if ( isset( $_GET['previewed'] ) ) {
|
if ( isset( $_GET['previewed'] ) ) {
|
||||||
?>
|
?>
|
||||||
@ -184,11 +186,11 @@ elseif ( isset( $_GET['activated'] ) ) :
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
elseif ( isset( $_GET['deleted'] ) ) :
|
elseif ( isset( $_GET['deleted'] ) ) :
|
||||||
?>
|
?>
|
||||||
<div id="message3" class="updated notice is-dismissible"><p><?php _e( 'Theme deleted.' ); ?></p></div>
|
<div id="message3" class="updated notice is-dismissible"><p><?php _e( 'Theme deleted.' ); ?></p></div>
|
||||||
<?php elseif ( isset( $_GET['delete-active-child'] ) ) : ?>
|
<?php elseif ( isset( $_GET['delete-active-child'] ) ) : ?>
|
||||||
<div id="message4" class="error"><p><?php _e( 'You cannot delete a theme while it has an active child theme.' ); ?></p></div>
|
<div id="message4" class="error"><p><?php _e( 'You cannot delete a theme while it has an active child theme.' ); ?></p></div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
$ct = wp_get_theme();
|
$ct = wp_get_theme();
|
||||||
@ -335,16 +337,16 @@ foreach ( $themes as $theme ) :
|
|||||||
<?php
|
<?php
|
||||||
// List broken themes, if any.
|
// List broken themes, if any.
|
||||||
if ( ! is_multisite() && current_user_can( 'edit_themes' ) && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {
|
if ( ! is_multisite() && current_user_can( 'edit_themes' ) && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="broken-themes">
|
<div class="broken-themes">
|
||||||
<h3><?php _e( 'Broken Themes' ); ?></h3>
|
<h3><?php _e( 'Broken Themes' ); ?></h3>
|
||||||
<p><?php _e( 'The following themes are installed but incomplete.' ); ?></p>
|
<p><?php _e( 'The following themes are installed but incomplete.' ); ?></p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$can_delete = current_user_can( 'delete_themes' );
|
$can_delete = current_user_can( 'delete_themes' );
|
||||||
$can_install = current_user_can( 'install_themes' );
|
$can_install = current_user_can( 'install_themes' );
|
||||||
?>
|
?>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php _ex( 'Name', 'theme name' ); ?></th>
|
<th><?php _ex( 'Name', 'theme name' ); ?></th>
|
||||||
@ -367,7 +369,8 @@ $can_install = current_user_can( 'install_themes' );
|
|||||||
array(
|
array(
|
||||||
'action' => 'delete',
|
'action' => 'delete',
|
||||||
'stylesheet' => urlencode( $stylesheet ),
|
'stylesheet' => urlencode( $stylesheet ),
|
||||||
), admin_url( 'themes.php' )
|
),
|
||||||
|
admin_url( 'themes.php' )
|
||||||
);
|
);
|
||||||
$delete_url = wp_nonce_url( $delete_url, 'delete-theme_' . $stylesheet );
|
$delete_url = wp_nonce_url( $delete_url, 'delete-theme_' . $stylesheet );
|
||||||
?>
|
?>
|
||||||
@ -384,7 +387,8 @@ $can_install = current_user_can( 'install_themes' );
|
|||||||
array(
|
array(
|
||||||
'action' => 'install-theme',
|
'action' => 'install-theme',
|
||||||
'theme' => urlencode( $parent_theme_name ),
|
'theme' => urlencode( $parent_theme_name ),
|
||||||
), admin_url( 'update.php' )
|
),
|
||||||
|
admin_url( 'update.php' )
|
||||||
);
|
);
|
||||||
$install_url = wp_nonce_url( $install_url, 'install-theme_' . $parent_theme_name );
|
$install_url = wp_nonce_url( $install_url, 'install-theme_' . $parent_theme_name );
|
||||||
?>
|
?>
|
||||||
@ -398,7 +402,7 @@ $can_install = current_user_can( 'install_themes' );
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div><!-- .wrap -->
|
</div><!-- .wrap -->
|
||||||
@ -533,7 +537,9 @@ wp_print_admin_notice_templates();
|
|||||||
wp_print_update_row_templates();
|
wp_print_update_row_templates();
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'updates', '_wpUpdatesItemCounts', array(
|
'updates',
|
||||||
|
'_wpUpdatesItemCounts',
|
||||||
|
array(
|
||||||
'totals' => wp_get_update_data(),
|
'totals' => wp_get_update_data(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -19,19 +19,21 @@ if ( $is_privacy_guide ) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$title = __('Tools');
|
$title = __( 'Tools' );
|
||||||
|
|
||||||
get_current_screen()->add_help_tab( array(
|
get_current_screen()->add_help_tab(
|
||||||
'id' => 'converter',
|
array(
|
||||||
'title' => __('Categories and Tags Converter'),
|
'id' => 'converter',
|
||||||
'content' => '<p>' . __('Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.' ) . '</p>' .
|
'title' => __( 'Categories and Tags Converter' ),
|
||||||
'<p>' . __( 'The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, the Activate Plugin & Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.' ) . '</p>',
|
'content' => '<p>' . __( 'Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierarchy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.' ) . '</p>' .
|
||||||
) );
|
'<p>' . __( 'The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, the Activate Plugin & Run Importer link will take you to a screen where you can choose to convert tags into categories or vice versa.' ) . '</p>',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
get_current_screen()->set_help_sidebar(
|
get_current_screen()->set_help_sidebar(
|
||||||
'<p><strong>' . __('For more information:') . '</strong></p>' .
|
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
|
||||||
'<p>' . __('<a href="https://codex.wordpress.org/Tools_Screen">Documentation on Tools</a>') . '</p>' .
|
'<p>' . __( '<a href="https://codex.wordpress.org/Tools_Screen">Documentation on Tools</a>' ) . '</p>' .
|
||||||
'<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
|
'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,14 +54,15 @@ if ( $is_privacy_guide ) {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
if ( current_user_can( 'import' ) ) :
|
if ( current_user_can( 'import' ) ) :
|
||||||
$cats = get_taxonomy('category');
|
$cats = get_taxonomy( 'category' );
|
||||||
$tags = get_taxonomy('post_tag');
|
$tags = get_taxonomy( 'post_tag' );
|
||||||
if ( current_user_can($cats->cap->manage_terms) || current_user_can($tags->cap->manage_terms) ) : ?>
|
if ( current_user_can( $cats->cap->manage_terms ) || current_user_can( $tags->cap->manage_terms ) ) :
|
||||||
|
?>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h2 class="title"><?php _e( 'Categories and Tags Converter' ) ?></h2>
|
<h2 class="title"><?php _e( 'Categories and Tags Converter' ); ?></h2>
|
||||||
<p><?php printf( __('If you want to convert your categories to tags (or vice versa), use the <a href="%s">Categories and Tags Converter</a> available from the Import screen.'), 'import.php' ); ?></p>
|
<p><?php printf( __( 'If you want to convert your categories to tags (or vice versa), use the <a href="%s">Categories and Tags Converter</a> available from the Import screen.' ), 'import.php' ); ?></p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ function dismissed_updates() {
|
|||||||
|
|
||||||
$show_text = esc_js( __( 'Show hidden updates' ) );
|
$show_text = esc_js( __( 'Show hidden updates' ) );
|
||||||
$hide_text = esc_js( __( 'Hide hidden updates' ) );
|
$hide_text = esc_js( __( 'Hide hidden updates' ) );
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(function( $ ) {
|
jQuery(function( $ ) {
|
||||||
$( 'dismissed-updates' ).show();
|
$( 'dismissed-updates' ).show();
|
||||||
@ -144,14 +144,14 @@ function dismissed_updates() {
|
|||||||
$( '#show-dismissed' ).click( function() { $( '#dismissed-updates' ).toggle( 'fast' ); } );
|
$( '#show-dismissed' ).click( function() { $( '#dismissed-updates' ).toggle( 'fast' ); } );
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
echo '<p class="hide-if-no-js"><button type="button" class="button" id="show-dismissed" aria-expanded="false">' . __( 'Show hidden updates' ) . '</button></p>';
|
echo '<p class="hide-if-no-js"><button type="button" class="button" id="show-dismissed" aria-expanded="false">' . __( 'Show hidden updates' ) . '</button></p>';
|
||||||
echo '<ul id="dismissed-updates" class="core-updates dismissed">';
|
echo '<ul id="dismissed-updates" class="core-updates dismissed">';
|
||||||
foreach ( (array) $dismissed as $update ) {
|
foreach ( (array) $dismissed as $update ) {
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
list_core_update( $update );
|
list_core_update( $update );
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
}
|
}
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ function list_plugin_updates() {
|
|||||||
<h2><?php _e( 'Plugins' ); ?></h2>
|
<h2><?php _e( 'Plugins' ); ?></h2>
|
||||||
<p><?php _e( 'The following plugins have new versions available. Check the ones you want to update and then click “Update Plugins”.' ); ?></p>
|
<p><?php _e( 'The following plugins have new versions available. Check the ones you want to update and then click “Update Plugins”.' ); ?></p>
|
||||||
<form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-plugins" class="upgrade">
|
<form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-plugins" class="upgrade">
|
||||||
<?php wp_nonce_field( 'upgrade-core' ); ?>
|
<?php wp_nonce_field( 'upgrade-core' ); ?>
|
||||||
<p><input id="upgrade-plugins" class="button" type="submit" value="<?php esc_attr_e( 'Update Plugins' ); ?>" name="upgrade" /></p>
|
<p><input id="upgrade-plugins" class="button" type="submit" value="<?php esc_attr_e( 'Update Plugins' ); ?>" name="upgrade" /></p>
|
||||||
<table class="widefat updates-table" id="update-plugins-table">
|
<table class="widefat updates-table" id="update-plugins-table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -260,52 +260,52 @@ function list_plugin_updates() {
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody class="plugins">
|
<tbody class="plugins">
|
||||||
<?php
|
<?php
|
||||||
foreach ( (array) $plugins as $plugin_file => $plugin_data ) {
|
foreach ( (array) $plugins as $plugin_file => $plugin_data ) {
|
||||||
$plugin_data = (object) _get_plugin_data_markup_translate( $plugin_file, (array) $plugin_data, false, true );
|
$plugin_data = (object) _get_plugin_data_markup_translate( $plugin_file, (array) $plugin_data, false, true );
|
||||||
|
|
||||||
$icon = '<span class="dashicons dashicons-admin-plugins"></span>';
|
$icon = '<span class="dashicons dashicons-admin-plugins"></span>';
|
||||||
$preferred_icons = array( 'svg', '2x', '1x', 'default' );
|
$preferred_icons = array( 'svg', '2x', '1x', 'default' );
|
||||||
foreach ( $preferred_icons as $preferred_icon ) {
|
foreach ( $preferred_icons as $preferred_icon ) {
|
||||||
if ( ! empty( $plugin_data->update->icons[ $preferred_icon ] ) ) {
|
if ( ! empty( $plugin_data->update->icons[ $preferred_icon ] ) ) {
|
||||||
$icon = '<img src="' . esc_url( $plugin_data->update->icons[ $preferred_icon ] ) . '" alt="" />';
|
$icon = '<img src="' . esc_url( $plugin_data->update->icons[ $preferred_icon ] ) . '" alt="" />';
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Get plugin compat for running version of WordPress.
|
// Get plugin compat for running version of WordPress.
|
||||||
if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $cur_wp_version, '>=' ) ) {
|
if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $cur_wp_version, '>=' ) ) {
|
||||||
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: 100%% (according to its author)' ), $cur_wp_version );
|
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: 100%% (according to its author)' ), $cur_wp_version );
|
||||||
} else {
|
|
||||||
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $cur_wp_version );
|
|
||||||
}
|
|
||||||
// Get plugin compat for updated version of WordPress.
|
|
||||||
if ( $core_update_version ) {
|
|
||||||
if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $core_update_version, '>=' ) ) {
|
|
||||||
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: 100%% (according to its author)' ), $core_update_version );
|
|
||||||
} else {
|
} else {
|
||||||
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $core_update_version );
|
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $cur_wp_version );
|
||||||
|
}
|
||||||
|
// Get plugin compat for updated version of WordPress.
|
||||||
|
if ( $core_update_version ) {
|
||||||
|
if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $core_update_version, '>=' ) ) {
|
||||||
|
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: 100%% (according to its author)' ), $core_update_version );
|
||||||
|
} else {
|
||||||
|
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $core_update_version );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Get the upgrade notice for the new plugin version.
|
||||||
|
if ( isset( $plugin_data->update->upgrade_notice ) ) {
|
||||||
|
$upgrade_notice = '<br />' . strip_tags( $plugin_data->update->upgrade_notice );
|
||||||
|
} else {
|
||||||
|
$upgrade_notice = '';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Get the upgrade notice for the new plugin version.
|
|
||||||
if ( isset( $plugin_data->update->upgrade_notice ) ) {
|
|
||||||
$upgrade_notice = '<br />' . strip_tags( $plugin_data->update->upgrade_notice );
|
|
||||||
} else {
|
|
||||||
$upgrade_notice = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$details_url = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data->update->slug . '§ion=changelog&TB_iframe=true&width=640&height=662' );
|
$details_url = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data->update->slug . '§ion=changelog&TB_iframe=true&width=640&height=662' );
|
||||||
$details = sprintf(
|
$details = sprintf(
|
||||||
'<a href="%1$s" class="thickbox open-plugin-details-modal" aria-label="%2$s">%3$s</a>',
|
'<a href="%1$s" class="thickbox open-plugin-details-modal" aria-label="%2$s">%3$s</a>',
|
||||||
esc_url( $details_url ),
|
esc_url( $details_url ),
|
||||||
/* translators: 1: plugin name, 2: version number */
|
/* translators: 1: plugin name, 2: version number */
|
||||||
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_data->Name, $plugin_data->update->new_version ) ),
|
esc_attr( sprintf( __( 'View %1$s version %2$s details' ), $plugin_data->Name, $plugin_data->update->new_version ) ),
|
||||||
/* translators: %s: plugin version */
|
/* translators: %s: plugin version */
|
||||||
sprintf( __( 'View version %s details.' ), $plugin_data->update->new_version )
|
sprintf( __( 'View version %s details.' ), $plugin_data->update->new_version )
|
||||||
);
|
);
|
||||||
|
|
||||||
$checkbox_id = 'checkbox_' . md5( $plugin_data->Name );
|
$checkbox_id = 'checkbox_' . md5( $plugin_data->Name );
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="check-column">
|
<td class="check-column">
|
||||||
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
|
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
|
||||||
@ -320,7 +320,7 @@ foreach ( (array) $plugins as $plugin_file => $plugin_data ) {
|
|||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
<td class="plugin-title"><p>
|
<td class="plugin-title"><p>
|
||||||
<?php echo $icon; ?>
|
<?php echo $icon; ?>
|
||||||
<strong><?php echo $plugin_data->Name; ?></strong>
|
<strong><?php echo $plugin_data->Name; ?></strong>
|
||||||
<?php
|
<?php
|
||||||
/* translators: 1: plugin version, 2: new version */
|
/* translators: 1: plugin version, 2: new version */
|
||||||
@ -329,13 +329,13 @@ foreach ( (array) $plugins as $plugin_file => $plugin_data ) {
|
|||||||
$plugin_data->Version,
|
$plugin_data->Version,
|
||||||
$plugin_data->update->new_version
|
$plugin_data->update->new_version
|
||||||
);
|
);
|
||||||
echo ' ' . $details . $compat . $upgrade_notice;
|
echo ' ' . $details . $compat . $upgrade_notice;
|
||||||
?>
|
?>
|
||||||
</p></td>
|
</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
<tfoot>
|
<tfoot>
|
||||||
@ -347,7 +347,7 @@ foreach ( (array) $plugins as $plugin_file => $plugin_data ) {
|
|||||||
</table>
|
</table>
|
||||||
<p><input id="upgrade-plugins-2" class="button" type="submit" value="<?php esc_attr_e( 'Update Plugins' ); ?>" name="upgrade" /></p>
|
<p><input id="upgrade-plugins-2" class="button" type="submit" value="<?php esc_attr_e( 'Update Plugins' ); ?>" name="upgrade" /></p>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -362,12 +362,12 @@ function list_theme_updates() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$form_action = 'update-core.php?action=do-theme-upgrade';
|
$form_action = 'update-core.php?action=do-theme-upgrade';
|
||||||
?>
|
?>
|
||||||
<h2><?php _e( 'Themes' ); ?></h2>
|
<h2><?php _e( 'Themes' ); ?></h2>
|
||||||
<p><?php _e( 'The following themes have new versions available. Check the ones you want to update and then click “Update Themes”.' ); ?></p>
|
<p><?php _e( 'The following themes have new versions available. Check the ones you want to update and then click “Update Themes”.' ); ?></p>
|
||||||
<p><?php printf( __( '<strong>Please Note:</strong> Any customizations you have made to theme files will be lost. Please consider using <a href="%s">child themes</a> for modifications.' ), __( 'https://codex.wordpress.org/Child_Themes' ) ); ?></p>
|
<p><?php printf( __( '<strong>Please Note:</strong> Any customizations you have made to theme files will be lost. Please consider using <a href="%s">child themes</a> for modifications.' ), __( 'https://codex.wordpress.org/Child_Themes' ) ); ?></p>
|
||||||
<form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-themes" class="upgrade">
|
<form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-themes" class="upgrade">
|
||||||
<?php wp_nonce_field( 'upgrade-core' ); ?>
|
<?php wp_nonce_field( 'upgrade-core' ); ?>
|
||||||
<p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e( 'Update Themes' ); ?>" name="upgrade" /></p>
|
<p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e( 'Update Themes' ); ?>" name="upgrade" /></p>
|
||||||
<table class="widefat updates-table" id="update-themes-table">
|
<table class="widefat updates-table" id="update-themes-table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -378,10 +378,10 @@ function list_theme_updates() {
|
|||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody class="plugins">
|
<tbody class="plugins">
|
||||||
<?php
|
<?php
|
||||||
foreach ( $themes as $stylesheet => $theme ) {
|
foreach ( $themes as $stylesheet => $theme ) {
|
||||||
$checkbox_id = 'checkbox_' . md5( $theme->get( 'Name' ) );
|
$checkbox_id = 'checkbox_' . md5( $theme->get( 'Name' ) );
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="check-column">
|
<td class="check-column">
|
||||||
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
|
<input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
|
||||||
@ -405,12 +405,12 @@ foreach ( $themes as $stylesheet => $theme ) {
|
|||||||
$theme->display( 'Version' ),
|
$theme->display( 'Version' ),
|
||||||
$theme->update['new_version']
|
$theme->update['new_version']
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</p></td>
|
</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
<tfoot>
|
<tfoot>
|
||||||
@ -422,7 +422,7 @@ foreach ( $themes as $stylesheet => $theme ) {
|
|||||||
</table>
|
</table>
|
||||||
<p><input id="upgrade-themes-2" class="button" type="submit" value="<?php esc_attr_e( 'Update Themes' ); ?>" name="upgrade" /></p>
|
<p><input id="upgrade-themes-2" class="button" type="submit" value="<?php esc_attr_e( 'Update Themes' ); ?>" name="upgrade" /></p>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -481,52 +481,53 @@ function do_core_upgrade( $reinstall = false ) {
|
|||||||
// that it's safe to do so. This only happens when there are no new files to create.
|
// that it's safe to do so. This only happens when there are no new files to create.
|
||||||
$allow_relaxed_file_ownership = ! $reinstall && isset( $update->new_files ) && ! $update->new_files;
|
$allow_relaxed_file_ownership = ! $reinstall && isset( $update->new_files ) && ! $update->new_files;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h1><?php _e( 'Update WordPress' ); ?></h1>
|
<h1><?php _e( 'Update WordPress' ); ?></h1>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( false === ( $credentials = request_filesystem_credentials( $url, '', false, ABSPATH, array( 'version', 'locale' ), $allow_relaxed_file_ownership ) ) ) {
|
if ( false === ( $credentials = request_filesystem_credentials( $url, '', false, ABSPATH, array( 'version', 'locale' ), $allow_relaxed_file_ownership ) ) ) {
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! WP_Filesystem( $credentials, ABSPATH, $allow_relaxed_file_ownership ) ) {
|
|
||||||
// Failed to connect, Error and request again
|
|
||||||
request_filesystem_credentials( $url, '', true, ABSPATH, array( 'version', 'locale' ), $allow_relaxed_file_ownership );
|
|
||||||
echo '</div>';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $wp_filesystem->errors->has_errors() ) {
|
|
||||||
foreach ( $wp_filesystem->errors->get_error_messages() as $message ) {
|
|
||||||
show_message( $message );
|
|
||||||
}
|
}
|
||||||
echo '</div>';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $reinstall ) {
|
if ( ! WP_Filesystem( $credentials, ABSPATH, $allow_relaxed_file_ownership ) ) {
|
||||||
$update->response = 'reinstall';
|
// Failed to connect, Error and request again
|
||||||
}
|
request_filesystem_credentials( $url, '', true, ABSPATH, array( 'version', 'locale' ), $allow_relaxed_file_ownership );
|
||||||
|
echo '</div>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $wp_filesystem->errors->has_errors() ) {
|
||||||
|
foreach ( $wp_filesystem->errors->get_error_messages() as $message ) {
|
||||||
|
show_message( $message );
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $reinstall ) {
|
||||||
|
$update->response = 'reinstall';
|
||||||
|
}
|
||||||
|
|
||||||
add_filter( 'update_feedback', 'show_message' );
|
add_filter( 'update_feedback', 'show_message' );
|
||||||
|
|
||||||
$upgrader = new Core_Upgrader();
|
$upgrader = new Core_Upgrader();
|
||||||
$result = $upgrader->upgrade(
|
$result = $upgrader->upgrade(
|
||||||
$update, array(
|
$update,
|
||||||
|
array(
|
||||||
'allow_relaxed_file_ownership' => $allow_relaxed_file_ownership,
|
'allow_relaxed_file_ownership' => $allow_relaxed_file_ownership,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( is_wp_error( $result ) ) {
|
if ( is_wp_error( $result ) ) {
|
||||||
show_message( $result );
|
show_message( $result );
|
||||||
if ( 'up_to_date' != $result->get_error_code() && 'locked' != $result->get_error_code() ) {
|
if ( 'up_to_date' != $result->get_error_code() && 'locked' != $result->get_error_code() ) {
|
||||||
show_message( __( 'Installation Failed' ) );
|
show_message( __( 'Installation Failed' ) );
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
echo '</div>';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
show_message( __( 'WordPress updated successfully' ) );
|
show_message( __( 'WordPress updated successfully' ) );
|
||||||
show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%2$s">here</a>.' ), $result, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' );
|
show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%2$s">here</a>.' ), $result, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' );
|
||||||
@ -668,7 +669,9 @@ if ( 'upgrade-core' == $action ) {
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'updates', '_wpUpdatesItemCounts', array(
|
'updates',
|
||||||
|
'_wpUpdatesItemCounts',
|
||||||
|
array(
|
||||||
'totals' => wp_get_update_data(),
|
'totals' => wp_get_update_data(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -702,7 +705,9 @@ if ( 'upgrade-core' == $action ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'updates', '_wpUpdatesItemCounts', array(
|
'updates',
|
||||||
|
'_wpUpdatesItemCounts',
|
||||||
|
array(
|
||||||
'totals' => wp_get_update_data(),
|
'totals' => wp_get_update_data(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -738,7 +743,9 @@ if ( 'upgrade-core' == $action ) {
|
|||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'updates', '_wpUpdatesItemCounts', array(
|
'updates',
|
||||||
|
'_wpUpdatesItemCounts',
|
||||||
|
array(
|
||||||
'totals' => wp_get_update_data(),
|
'totals' => wp_get_update_data(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -776,7 +783,9 @@ if ( 'upgrade-core' == $action ) {
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'updates', '_wpUpdatesItemCounts', array(
|
'updates',
|
||||||
|
'_wpUpdatesItemCounts',
|
||||||
|
array(
|
||||||
'totals' => wp_get_update_data(),
|
'totals' => wp_get_update_data(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -803,7 +812,9 @@ if ( 'upgrade-core' == $action ) {
|
|||||||
$result = $upgrader->bulk_upgrade();
|
$result = $upgrader->bulk_upgrade();
|
||||||
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'updates', '_wpUpdatesItemCounts', array(
|
'updates',
|
||||||
|
'_wpUpdatesItemCounts',
|
||||||
|
array(
|
||||||
'totals' => wp_get_update_data(),
|
'totals' => wp_get_update_data(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -106,7 +106,8 @@ if ( isset( $_GET['action'] ) ) {
|
|||||||
|
|
||||||
check_admin_referer( 'install-plugin_' . $plugin );
|
check_admin_referer( 'install-plugin_' . $plugin );
|
||||||
$api = plugins_api(
|
$api = plugins_api(
|
||||||
'plugin_information', array(
|
'plugin_information',
|
||||||
|
array(
|
||||||
'slug' => $plugin,
|
'slug' => $plugin,
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'sections' => false,
|
'sections' => false,
|
||||||
@ -225,7 +226,8 @@ if ( isset( $_GET['action'] ) ) {
|
|||||||
|
|
||||||
check_admin_referer( 'install-theme_' . $theme );
|
check_admin_referer( 'install-theme_' . $theme );
|
||||||
$api = themes_api(
|
$api = themes_api(
|
||||||
'theme_information', array(
|
'theme_information',
|
||||||
|
array(
|
||||||
'slug' => $theme,
|
'slug' => $theme,
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'sections' => false,
|
'sections' => false,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user