Bring out the shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8066547be3
commit
85f1feed84
|
@ -673,7 +673,7 @@ case 'replyto-comment' :
|
||||||
} else {
|
} else {
|
||||||
if ( 'single' == $_REQUEST['mode'] ) {
|
if ( 'single' == $_REQUEST['mode'] ) {
|
||||||
$wp_list_table = get_list_table('WP_Post_Comments_List_Table');
|
$wp_list_table = get_list_table('WP_Post_Comments_List_Table');
|
||||||
} else {
|
} else {
|
||||||
$wp_list_table = get_list_table('WP_Comments_List_Table');
|
$wp_list_table = get_list_table('WP_Comments_List_Table');
|
||||||
}
|
}
|
||||||
$wp_list_table->single_row( $comment );
|
$wp_list_table->single_row( $comment );
|
||||||
|
|
|
@ -1464,7 +1464,7 @@ body.press-this .stuffbox:hover .handlediv,
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
#post-body ul.category-tabs li.tabs a,
|
#post-body ul.category-tabs li.tabs a,
|
||||||
#post-body ul.add-menu-item-tabs li.tabs a,
|
#post-body ul.add-menu-item-tabs li.tabs a,
|
||||||
body.press-this ul.category-tabs li.tabs a {
|
body.press-this ul.category-tabs li.tabs a {
|
||||||
color: #333;
|
color: #333;
|
||||||
|
|
|
@ -66,13 +66,13 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||||
}
|
}
|
||||||
|
|
||||||
$page = $this->get_pagenum();
|
$page = $this->get_pagenum();
|
||||||
|
|
||||||
if ( isset( $_REQUEST['start'] ) ) {
|
if ( isset( $_REQUEST['start'] ) ) {
|
||||||
$start = $_REQUEST['start'];
|
$start = $_REQUEST['start'];
|
||||||
} else {
|
} else {
|
||||||
$start = ( $page - 1 ) * $comments_per_page;
|
$start = ( $page - 1 ) * $comments_per_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $doing_ajax && isset( $_REQUEST['offset'] ) ) {
|
if ( $doing_ajax && isset( $_REQUEST['offset'] ) ) {
|
||||||
$start += $_REQUEST['offset'];
|
$start += $_REQUEST['offset'];
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||||
'per_page' => $comments_per_page,
|
'per_page' => $comments_per_page,
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_per_page( $comment_status = 'all' ) {
|
function get_per_page( $comment_status = 'all' ) {
|
||||||
$comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
|
$comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
|
||||||
$comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
|
$comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
|
||||||
|
@ -513,7 +513,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||||
class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
|
class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
|
||||||
|
|
||||||
function get_column_info() {
|
function get_column_info() {
|
||||||
$this->_column_headers = array(
|
$this->_column_headers = array(
|
||||||
array(
|
array(
|
||||||
'author' => __( 'Author' ),
|
'author' => __( 'Author' ),
|
||||||
'comment' => _x( 'Comment', 'column name' ),
|
'comment' => _x( 'Comment', 'column name' ),
|
||||||
|
@ -521,16 +521,16 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
|
||||||
array(),
|
array(),
|
||||||
array(),
|
array(),
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->_column_headers;
|
return $this->_column_headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_table_classes() {
|
function get_table_classes() {
|
||||||
$classes = parent::get_table_classes();
|
$classes = parent::get_table_classes();
|
||||||
$classes[] = 'comments-box';
|
$classes[] = 'comments-box';
|
||||||
return $classes;
|
return $classes;
|
||||||
}
|
}
|
||||||
|
|
||||||
function display( $output_empty = false ) {
|
function display( $output_empty = false ) {
|
||||||
extract( $this->_args );
|
extract( $this->_args );
|
||||||
?>
|
?>
|
||||||
|
@ -541,7 +541,7 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_per_page( $comment_status = false ) {
|
function get_per_page( $comment_status = false ) {
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ class WP_List_Table {
|
||||||
* @access public
|
* @access public
|
||||||
*
|
*
|
||||||
* @param string $text The search button text
|
* @param string $text The search button text
|
||||||
* @param string $input_id The search input id
|
* @param string $input_id The search input id
|
||||||
*/
|
*/
|
||||||
function search_box( $text, $input_id ) {
|
function search_box( $text, $input_id ) {
|
||||||
if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
|
if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
|
||||||
|
|
|
@ -291,7 +291,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
||||||
|
|
||||||
$actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context );
|
$actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme_key, $theme, $context );
|
||||||
$actions = apply_filters( "theme_action_links_$theme_key", $actions, $theme_key, $theme, $context );
|
$actions = apply_filters( "theme_action_links_$theme_key", $actions, $theme_key, $theme, $context );
|
||||||
|
|
||||||
$class = empty( $theme['enabled'] ) ? 'inactive' : 'active';
|
$class = empty( $theme['enabled'] ) ? 'inactive' : 'active';
|
||||||
$checkbox_id = "checkbox_" . md5($theme['Name']);
|
$checkbox_id = "checkbox_" . md5($theme['Name']);
|
||||||
$checkbox = "<input type='checkbox' name='checked[]' value='" . esc_attr( $theme_key ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $theme['Name'] . "</label>";
|
$checkbox = "<input type='checkbox' name='checked[]' value='" . esc_attr( $theme_key ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $theme['Name'] . "</label>";
|
||||||
|
|
|
@ -233,7 +233,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
||||||
$text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count );
|
$text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'search' != $type ) {
|
if ( 'search' != $type ) {
|
||||||
$status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
|
$status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
|
||||||
add_query_arg('plugin_status', $type, 'plugins.php'),
|
add_query_arg('plugin_status', $type, 'plugins.php'),
|
||||||
|
|
|
@ -71,7 +71,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||||
'per_page' => $tags_per_page,
|
'per_page' => $tags_per_page,
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
function has_items() {
|
function has_items() {
|
||||||
// todo: populate $this->items in prepare_items()
|
// todo: populate $this->items in prepare_items()
|
||||||
return true;
|
return true;
|
||||||
|
@ -139,7 +139,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||||
// convert it to table rows
|
// convert it to table rows
|
||||||
$out = '';
|
$out = '';
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|
||||||
$terms = array();
|
$terms = array();
|
||||||
|
|
||||||
if ( is_taxonomy_hierarchical( $taxonomy ) && !isset( $orderby ) ) {
|
if ( is_taxonomy_hierarchical( $taxonomy ) && !isset( $orderby ) ) {
|
||||||
|
@ -160,7 +160,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||||
$out .= $this->single_row( $term, 0, $taxonomy );
|
$out .= $this->single_row( $term, 0, $taxonomy );
|
||||||
$count = $number; // Only displaying a single page.
|
$count = $number; // Only displaying a single page.
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $terms ) ) {
|
if ( empty( $terms ) ) {
|
||||||
echo '<tr class="no-items"><td colspan="2">';
|
echo '<tr class="no-items"><td colspan="2">';
|
||||||
$this->no_items();
|
$this->no_items();
|
||||||
|
|
|
@ -349,7 +349,7 @@ function upload_size_limit_filter( $size ) {
|
||||||
$fileupload_maxk = 1024 * get_site_option( 'fileupload_maxk', 1500 );
|
$fileupload_maxk = 1024 * get_site_option( 'fileupload_maxk', 1500 );
|
||||||
if ( get_site_option( 'upload_space_check_disabled' ) )
|
if ( get_site_option( 'upload_space_check_disabled' ) )
|
||||||
return min( $size, $fileupload_maxk );
|
return min( $size, $fileupload_maxk );
|
||||||
|
|
||||||
return min( $size, $fileupload_maxk, get_upload_space_available() );
|
return min( $size, $fileupload_maxk, get_upload_space_available() );
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1221,7 +1221,7 @@ function wp_check_post_lock( $post_id ) {
|
||||||
$lock = explode( ':', $lock );
|
$lock = explode( ':', $lock );
|
||||||
$time = $lock[0];
|
$time = $lock[0];
|
||||||
$user = isset( $lock[1] ) ? $lock[1] : get_post_meta( $post->ID, '_edit_last', true );
|
$user = isset( $lock[1] ) ? $lock[1] : get_post_meta( $post->ID, '_edit_last', true );
|
||||||
|
|
||||||
$time_window = apply_filters( 'wp_check_post_lock_window', AUTOSAVE_INTERVAL * 2 );
|
$time_window = apply_filters( 'wp_check_post_lock_window', AUTOSAVE_INTERVAL * 2 );
|
||||||
|
|
||||||
if ( $time && $time > time() - $time_window && $user != get_current_user_id() )
|
if ( $time && $time > time() - $time_window && $user != get_current_user_id() )
|
||||||
|
|
|
@ -330,7 +330,7 @@ function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single',
|
||||||
echo $content;
|
echo $content;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $mode == 'single' ) {
|
if ( $mode == 'single' ) {
|
||||||
$wp_list_table = get_list_table('WP_Post_Comments_List_Table');
|
$wp_list_table = get_list_table('WP_Post_Comments_List_Table');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -213,10 +213,10 @@ setCommentsList = function() {
|
||||||
|
|
||||||
refillTheExtraList();
|
refillTheExtraList();
|
||||||
};
|
};
|
||||||
|
|
||||||
var refillTheExtraList = function(ev) {
|
var refillTheExtraList = function(ev) {
|
||||||
var args = $.query.get(), total_pages = listTable.get_total_pages(), per_page = $('input[name=_per_page]', '#comments-form').val();
|
var args = $.query.get(), total_pages = listTable.get_total_pages(), per_page = $('input[name=_per_page]', '#comments-form').val();
|
||||||
|
|
||||||
if (args.paged > total_pages) {
|
if (args.paged > total_pages) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ setCommentsList = function() {
|
||||||
args.number = 1;
|
args.number = 1;
|
||||||
args.offset = per_page - 1; // fetch only the last item of the next page
|
args.offset = per_page - 1; // fetch only the last item of the next page
|
||||||
}
|
}
|
||||||
|
|
||||||
args.no_placeholder = true;
|
args.no_placeholder = true;
|
||||||
|
|
||||||
args.paged ++;
|
args.paged ++;
|
||||||
|
@ -277,7 +277,7 @@ commentReply = {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.comments_listing = $('#comments-form > input[name="comment_status"]').val() || '';
|
this.comments_listing = $('#comments-form > input[name="comment_status"]').val() || '';
|
||||||
|
|
||||||
$(listTable).bind('beforeChangePage', function(){
|
$(listTable).bind('beforeChangePage', function(){
|
||||||
commentReply.close();
|
commentReply.close();
|
||||||
});
|
});
|
||||||
|
|
|
@ -160,7 +160,7 @@ listTable.init();
|
||||||
listTable.update_rows({'paged': paged}, false, function() {
|
listTable.update_rows({'paged': paged}, false, function() {
|
||||||
if ( $el.parents('.tablenav.bottom').length )
|
if ( $el.parents('.tablenav.bottom').length )
|
||||||
scrollTo(0, 0);
|
scrollTo(0, 0);
|
||||||
|
|
||||||
$(listTable).trigger('changePage');
|
$(listTable).trigger('changePage');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -256,20 +256,20 @@ listTable.init();
|
||||||
if ( $('h2.nav-tab-wrapper').length )
|
if ( $('h2.nav-tab-wrapper').length )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( 'site-users-network' == pagenow || 'site-themes-network' == pagenow ) {
|
if ( 'site-users-network' == pagenow || 'site-themes-network' == pagenow ) {
|
||||||
$('h4.search-text').remove();
|
$('h4.search-text').remove();
|
||||||
|
|
||||||
if ( data.s )
|
if ( data.s )
|
||||||
$('ul.subsubsub').after($('<h4 class="clear search-text">').html(
|
$('ul.subsubsub').after($('<h4 class="clear search-text">').html(
|
||||||
listTableL10n.search.replace('%s', this.htmlencode(data.s))
|
listTableL10n.search.replace('%s', this.htmlencode(data.s))
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
$('h2 .subtitle').remove();
|
$('h2 .subtitle').remove();
|
||||||
|
|
||||||
if ( data.s )
|
if ( data.s )
|
||||||
$('h2').append($('<span class="subtitle">').html(
|
$('h2').append($('<span class="subtitle">').html(
|
||||||
listTableL10n.search.replace('%s', this.htmlencode(data.s))
|
listTableL10n.search.replace('%s', this.htmlencode(data.s))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ case 'edit':
|
||||||
$parent_file = "edit.php";
|
$parent_file = "edit.php";
|
||||||
$submenu_file = "edit.php";
|
$submenu_file = "edit.php";
|
||||||
} else {
|
} else {
|
||||||
if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
|
if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true )
|
||||||
$parent_file = $post_type_object->show_in_menu;
|
$parent_file = $post_type_object->show_in_menu;
|
||||||
else
|
else
|
||||||
$parent_file = "edit.php?post_type=$post_type";
|
$parent_file = "edit.php?post_type=$post_type";
|
||||||
|
|
|
@ -356,7 +356,7 @@ function _get_admin_bar_pref( $context, $user = 0 ) {
|
||||||
$pref = get_user_option( "show_admin_bar_{$context}", $user );
|
$pref = get_user_option( "show_admin_bar_{$context}", $user );
|
||||||
if ( false === $pref )
|
if ( false === $pref )
|
||||||
return 'admin' != $context || is_multisite();
|
return 'admin' != $context || is_multisite();
|
||||||
|
|
||||||
return 'true' === $pref;
|
return 'true' === $pref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1313,11 +1313,11 @@ function antispambot($emailaddy, $mailto=0) {
|
||||||
function _make_url_clickable_cb($matches) {
|
function _make_url_clickable_cb($matches) {
|
||||||
$url = $matches[2];
|
$url = $matches[2];
|
||||||
$suffix = '';
|
$suffix = '';
|
||||||
|
|
||||||
/** Include parentheses in the URL only if paired **/
|
/** Include parentheses in the URL only if paired **/
|
||||||
while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) {
|
while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) {
|
||||||
$suffix = strrchr( $url, ')' ) . $suffix;
|
$suffix = strrchr( $url, ')' ) . $suffix;
|
||||||
$url = substr( $url, 0, strrpos( $url, ')' ) );
|
$url = substr( $url, 0, strrpos( $url, ')' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = esc_url($url);
|
$url = esc_url($url);
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#wp-link ol,
|
#wp-link ol,
|
||||||
#wp-link ul {
|
#wp-link ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wp-link input[type="text"] {
|
#wp-link input[type="text"] {
|
||||||
|
|
|
@ -251,14 +251,14 @@ var wpLink;
|
||||||
// We're about to toggle visibility; it's currently the opposite
|
// We're about to toggle visibility; it's currently the opposite
|
||||||
visible = !panel.is(':visible'),
|
visible = !panel.is(':visible'),
|
||||||
win = $(window);
|
win = $(window);
|
||||||
|
|
||||||
$(this).toggleClass('toggle-arrow-active', visible);
|
$(this).toggleClass('toggle-arrow-active', visible);
|
||||||
|
|
||||||
inputs.dialog.height('auto');
|
inputs.dialog.height('auto');
|
||||||
panel.slideToggle( 300, function() {
|
panel.slideToggle( 300, function() {
|
||||||
setUserSetting('wplink', visible ? '1' : '0');
|
setUserSetting('wplink', visible ? '1' : '0');
|
||||||
inputs[ visible ? 'search' : 'url' ].focus();
|
inputs[ visible ? 'search' : 'url' ].focus();
|
||||||
|
|
||||||
// Move the box if the box is now expanded, was opened in a collapsed state,
|
// Move the box if the box is now expanded, was opened in a collapsed state,
|
||||||
// and if it needs to be moved. (Judged by bottom not being positive or
|
// and if it needs to be moved. (Judged by bottom not being positive or
|
||||||
// bottom being smaller than top.)
|
// bottom being smaller than top.)
|
||||||
|
@ -266,7 +266,7 @@ var wpLink;
|
||||||
top = widget.offset().top,
|
top = widget.offset().top,
|
||||||
bottom = top + widget.outerHeight(),
|
bottom = top + widget.outerHeight(),
|
||||||
diff = bottom - win.height();
|
diff = bottom - win.height();
|
||||||
|
|
||||||
if ( diff > scroll ) {
|
if ( diff > scroll ) {
|
||||||
widget.animate({'top': diff < top ? top - diff : scroll }, 200);
|
widget.animate({'top': diff < top ? top - diff : scroll }, 200);
|
||||||
}
|
}
|
||||||
|
|
|
@ -323,7 +323,7 @@ wpList = {
|
||||||
process: function(el) {
|
process: function(el) {
|
||||||
var list = this,
|
var list = this,
|
||||||
$el = $(el || document);
|
$el = $(el || document);
|
||||||
|
|
||||||
$el.delegate( "form[class^=add:" + list.id + ":]", 'submit', function(){
|
$el.delegate( "form[class^=add:" + list.id + ":]", 'submit', function(){
|
||||||
return list.wpList.add(this);
|
return list.wpList.add(this);
|
||||||
});
|
});
|
||||||
|
@ -331,7 +331,7 @@ wpList = {
|
||||||
$el.delegate( "[class^=add:" + list.id + ":]:not(form)", 'click', function(){
|
$el.delegate( "[class^=add:" + list.id + ":]:not(form)", 'click', function(){
|
||||||
return list.wpList.add(this);
|
return list.wpList.add(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
$el.delegate( "[class^=delete:" + list.id + ":]", 'click', function(){
|
$el.delegate( "[class^=delete:" + list.id + ":]", 'click', function(){
|
||||||
return list.wpList.del(this);
|
return list.wpList.del(this);
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit
|
||||||
* http://www.gnu.org/licenses/gpl.html
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
*
|
*
|
||||||
* [kses strips evil scripts!]
|
* [kses strips evil scripts!]
|
||||||
*
|
*
|
||||||
* Added wp_ prefix to avoid conflicts with existing kses users
|
* Added wp_ prefix to avoid conflicts with existing kses users
|
||||||
|
|
|
@ -274,8 +274,8 @@ function _get_page_link( $id = false, $leavename = false, $sample = false ) {
|
||||||
$draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) );
|
$draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) );
|
||||||
|
|
||||||
$link = $wp_rewrite->get_page_permastruct();
|
$link = $wp_rewrite->get_page_permastruct();
|
||||||
|
|
||||||
if ( !empty($link) && ( ( isset($post->post_status) && !$draft_or_pending ) || $sample ) ) {
|
if ( !empty($link) && ( ( isset($post->post_status) && !$draft_or_pending ) || $sample ) ) {
|
||||||
if ( ! $leavename ) {
|
if ( ! $leavename ) {
|
||||||
$link = str_replace('%pagename%', get_page_uri($id), $link);
|
$link = str_replace('%pagename%', get_page_uri($id), $link);
|
||||||
}
|
}
|
||||||
|
|
|
@ -455,7 +455,7 @@ function wpmu_admin_redirect_add_updated_param( $url = '' ) {
|
||||||
* This function checks against the Banned Email Domains list
|
* This function checks against the Banned Email Domains list
|
||||||
* at wp-admin/network/settings.php. The check is only run on
|
* at wp-admin/network/settings.php. The check is only run on
|
||||||
* self-registrations; user creation at wp-admin/network/users.php
|
* self-registrations; user creation at wp-admin/network/users.php
|
||||||
* bypasses this check.
|
* bypasses this check.
|
||||||
*
|
*
|
||||||
* @since MU
|
* @since MU
|
||||||
*
|
*
|
||||||
|
@ -612,7 +612,7 @@ function wpmu_validate_user_signup($user_name, $user_email) {
|
||||||
* $user parameter to the function, where $user is the other user, is
|
* $user parameter to the function, where $user is the other user, is
|
||||||
* effectively an override of this limitation.
|
* effectively an override of this limitation.
|
||||||
*
|
*
|
||||||
* Filter 'wpmu_validate_blog_signup' if you want to modify
|
* Filter 'wpmu_validate_blog_signup' if you want to modify
|
||||||
* the way that WordPress validates new site signups.
|
* the way that WordPress validates new site signups.
|
||||||
*
|
*
|
||||||
* @since MU
|
* @since MU
|
||||||
|
@ -1577,11 +1577,11 @@ function upload_is_user_over_quota( $echo = true ) {
|
||||||
/**
|
/**
|
||||||
* Check an array of MIME types against a whitelist.
|
* Check an array of MIME types against a whitelist.
|
||||||
*
|
*
|
||||||
* WordPress ships with a set of allowed upload filetypes,
|
* WordPress ships with a set of allowed upload filetypes,
|
||||||
* which is defined in wp-includes/functions.php in
|
* which is defined in wp-includes/functions.php in
|
||||||
* get_allowed_mime_types(). This function is used to filter
|
* get_allowed_mime_types(). This function is used to filter
|
||||||
* that list against the filetype whitelist provided by Multisite
|
* that list against the filetype whitelist provided by Multisite
|
||||||
* Super Admins at wp-admin/network/settings.php.
|
* Super Admins at wp-admin/network/settings.php.
|
||||||
*
|
*
|
||||||
* @since MU
|
* @since MU
|
||||||
*
|
*
|
||||||
|
@ -1806,7 +1806,7 @@ function maybe_redirect_404() {
|
||||||
*
|
*
|
||||||
* @since MU
|
* @since MU
|
||||||
* @uses add_existing_user_to_blog()
|
* @uses add_existing_user_to_blog()
|
||||||
*/
|
*/
|
||||||
function maybe_add_existing_user_to_blog() {
|
function maybe_add_existing_user_to_blog() {
|
||||||
if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) )
|
if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) )
|
||||||
return false;
|
return false;
|
||||||
|
@ -1832,9 +1832,9 @@ function maybe_add_existing_user_to_blog() {
|
||||||
*
|
*
|
||||||
* @since MU
|
* @since MU
|
||||||
* @uses add_user_to_blog()
|
* @uses add_user_to_blog()
|
||||||
*
|
*
|
||||||
* @param array $details
|
* @param array $details
|
||||||
*/
|
*/
|
||||||
function add_existing_user_to_blog( $details = false ) {
|
function add_existing_user_to_blog( $details = false ) {
|
||||||
global $blog_id;
|
global $blog_id;
|
||||||
|
|
||||||
|
@ -1849,11 +1849,11 @@ function add_existing_user_to_blog( $details = false ) {
|
||||||
* Add a newly created user to the appropriate blog
|
* Add a newly created user to the appropriate blog
|
||||||
*
|
*
|
||||||
* @since MU
|
* @since MU
|
||||||
*
|
*
|
||||||
* @param int $user_id
|
* @param int $user_id
|
||||||
* @param string $email
|
* @param string $email
|
||||||
* @param array $meta
|
* @param array $meta
|
||||||
*/
|
*/
|
||||||
function add_new_user_to_blog( $user_id, $email, $meta ) {
|
function add_new_user_to_blog( $user_id, $email, $meta ) {
|
||||||
global $current_site;
|
global $current_site;
|
||||||
if ( $meta[ 'add_to_blog' ] ) {
|
if ( $meta[ 'add_to_blog' ] ) {
|
||||||
|
@ -1869,7 +1869,7 @@ function add_new_user_to_blog( $user_id, $email, $meta ) {
|
||||||
* Correct From host on outgoing mail to match the site domain
|
* Correct From host on outgoing mail to match the site domain
|
||||||
*
|
*
|
||||||
* @since MU
|
* @since MU
|
||||||
*/
|
*/
|
||||||
function fix_phpmailer_messageid( $phpmailer ) {
|
function fix_phpmailer_messageid( $phpmailer ) {
|
||||||
global $current_site;
|
global $current_site;
|
||||||
$phpmailer->Hostname = $current_site->domain;
|
$phpmailer->Hostname = $current_site->domain;
|
||||||
|
@ -1884,7 +1884,7 @@ function fix_phpmailer_messageid( $phpmailer ) {
|
||||||
*
|
*
|
||||||
* @param string $username
|
* @param string $username
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function is_user_spammy( $username = 0 ) {
|
function is_user_spammy( $username = 0 ) {
|
||||||
if ( $username == 0 ) {
|
if ( $username == 0 ) {
|
||||||
$user_id = get_current_user_id();
|
$user_id = get_current_user_id();
|
||||||
|
@ -1907,7 +1907,7 @@ function is_user_spammy( $username = 0 ) {
|
||||||
* @param int $old_value
|
* @param int $old_value
|
||||||
* @param int $value The new public value
|
* @param int $value The new public value
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function update_blog_public( $old_value, $value ) {
|
function update_blog_public( $old_value, $value ) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
do_action('update_blog_public');
|
do_action('update_blog_public');
|
||||||
|
@ -1922,7 +1922,7 @@ add_action('update_option_blog_public', 'update_blog_public', 10, 2);
|
||||||
* @uses get_blog_details()
|
* @uses get_blog_details()
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function get_dashboard_blog() {
|
function get_dashboard_blog() {
|
||||||
if ( $blog = get_site_option( 'dashboard_blog' ) )
|
if ( $blog = get_site_option( 'dashboard_blog' ) )
|
||||||
return get_blog_details( $blog );
|
return get_blog_details( $blog );
|
||||||
|
@ -1940,7 +1940,7 @@ function get_dashboard_blog() {
|
||||||
* @param int $user_id Optional. Defaults to current user.
|
* @param int $user_id Optional. Defaults to current user.
|
||||||
* @param int $blog_id Optional. Defaults to current blog.
|
* @param int $blog_id Optional. Defaults to current blog.
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
|
function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
|
@ -1964,7 +1964,7 @@ function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
|
||||||
* @since MU
|
* @since MU
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function users_can_register_signup_filter() {
|
function users_can_register_signup_filter() {
|
||||||
$registration = get_site_option('registration');
|
$registration = get_site_option('registration');
|
||||||
if ( $registration == 'all' || $registration == 'user' )
|
if ( $registration == 'all' || $registration == 'user' )
|
||||||
|
@ -1981,7 +1981,7 @@ add_filter('option_users_can_register', 'users_can_register_signup_filter');
|
||||||
*
|
*
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function welcome_user_msg_filter( $text ) {
|
function welcome_user_msg_filter( $text ) {
|
||||||
if ( !$text ) {
|
if ( !$text ) {
|
||||||
return __( 'Dear User,
|
return __( 'Dear User,
|
||||||
|
|
|
@ -426,7 +426,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
||||||
'taxonomy' == $parent_item->type &&
|
'taxonomy' == $parent_item->type &&
|
||||||
isset( $possible_taxonomy_ancestors[ $parent_item->object ] ) &&
|
isset( $possible_taxonomy_ancestors[ $parent_item->object ] ) &&
|
||||||
in_array( $parent_item->object_id, $possible_taxonomy_ancestors[ $parent_item->object ] ) &&
|
in_array( $parent_item->object_id, $possible_taxonomy_ancestors[ $parent_item->object ] ) &&
|
||||||
(
|
(
|
||||||
! isset( $queried_object->term_id ) ||
|
! isset( $queried_object->term_id ) ||
|
||||||
$parent_item->object_id != $queried_object->term_id
|
$parent_item->object_id != $queried_object->term_id
|
||||||
)
|
)
|
||||||
|
|
|
@ -619,9 +619,9 @@ function get_page_statuses( ) {
|
||||||
* public - Whether posts of this status should be shown in the front end of the site. Defaults to true.
|
* public - Whether posts of this status should be shown in the front end of the site. Defaults to true.
|
||||||
* exclude_from_search - Whether to exclude posts with this post status from search results. Defaults to true.
|
* exclude_from_search - Whether to exclude posts with this post status from search results. Defaults to true.
|
||||||
* show_in_admin_all_list - Whether to include posts in the edit listing for their post type
|
* show_in_admin_all_list - Whether to include posts in the edit listing for their post type
|
||||||
* show_in_admin_status_list - Show in the list of statuses with post counts at the top of the edit
|
* show_in_admin_status_list - Show in the list of statuses with post counts at the top of the edit
|
||||||
* listings, e.g. All (12) | Published (9) | My Custom Status (2) ...
|
* listings, e.g. All (12) | Published (9) | My Custom Status (2) ...
|
||||||
*
|
*
|
||||||
* Arguments prefixed with an _underscore shouldn't be used by plugins and themes.
|
* Arguments prefixed with an _underscore shouldn't be used by plugins and themes.
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
|
|
|
@ -2912,7 +2912,7 @@ function get_the_taxonomies($post = 0, $args = array() ) {
|
||||||
|
|
||||||
$args = wp_parse_args( $args, array(
|
$args = wp_parse_args( $args, array(
|
||||||
'template' => '%s: %l.',
|
'template' => '%s: %l.',
|
||||||
) );
|
) );
|
||||||
extract( $args, EXTR_SKIP );
|
extract( $args, EXTR_SKIP );
|
||||||
|
|
||||||
$taxonomies = array();
|
$taxonomies = array();
|
||||||
|
|
|
@ -1754,7 +1754,7 @@ function add_theme_support( $feature ) {
|
||||||
$_wp_theme_features[$feature] = true;
|
$_wp_theme_features[$feature] = true;
|
||||||
else
|
else
|
||||||
$_wp_theme_features[$feature] = array_slice( func_get_args(), 1 );
|
$_wp_theme_features[$feature] = array_slice( func_get_args(), 1 );
|
||||||
|
|
||||||
if ( $feature == 'post-formats' && is_array( $_wp_theme_features[$feature][0] ) )
|
if ( $feature == 'post-formats' && is_array( $_wp_theme_features[$feature][0] ) )
|
||||||
$_wp_theme_features[$feature][0] = array_intersect( $_wp_theme_features[$feature][0], array_keys( get_post_format_slugs() ) );
|
$_wp_theme_features[$feature][0] = array_intersect( $_wp_theme_features[$feature][0], array_keys( get_post_format_slugs() ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -1457,10 +1457,10 @@ function wp_insert_user($userdata) {
|
||||||
|
|
||||||
if ( empty($user_registered) )
|
if ( empty($user_registered) )
|
||||||
$user_registered = gmdate('Y-m-d H:i:s');
|
$user_registered = gmdate('Y-m-d H:i:s');
|
||||||
|
|
||||||
if ( empty($show_admin_bar_front) )
|
if ( empty($show_admin_bar_front) )
|
||||||
$show_admin_bar_front = 'true';
|
$show_admin_bar_front = 'true';
|
||||||
|
|
||||||
if ( empty($show_admin_bar_admin) )
|
if ( empty($show_admin_bar_admin) )
|
||||||
$show_admin_bar_admin = is_multisite() ? 'true' : 'false';
|
$show_admin_bar_admin = is_multisite() ? 'true' : 'false';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue