mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Alot more tabs. Props jacobsantos & Viper007bond. See #14147
git-svn-id: http://svn.automattic.com/wordpress/trunk@15355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c22f156a8a
commit
a14d289755
@ -1079,7 +1079,7 @@ function current_user_can( $capability ) {
|
||||
function current_user_can_for_blog( $blog_id, $capability ) {
|
||||
$current_user = wp_get_current_user();
|
||||
|
||||
if ( is_multisite() && is_super_admin() )
|
||||
if ( is_multisite() && is_super_admin() )
|
||||
return true;
|
||||
|
||||
if ( empty( $current_user ) )
|
||||
|
@ -731,9 +731,9 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
|
||||
break;
|
||||
endswitch;
|
||||
|
||||
if ( $filter )
|
||||
if ( $filter )
|
||||
return apply_filters( 'wp_generate_tag_cloud', $return, $tags, $args );
|
||||
else
|
||||
else
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
@ -678,9 +678,9 @@ function get_comment_type( $comment_ID = 0 ) {
|
||||
* @param string $pingbacktxt The string to display for pingback type
|
||||
*/
|
||||
function comment_type($commenttxt = false, $trackbacktxt = false, $pingbacktxt = false) {
|
||||
if ( false === $commenttxt ) $commenttxt = _x( 'Comment', 'noun' );
|
||||
if ( false === $trackbacktxt ) $trackbacktxt = __( 'Trackback' );
|
||||
if ( false === $pingbacktxt ) $pingbacktxt = __( 'Pingback' );
|
||||
if ( false === $commenttxt ) $commenttxt = _x( 'Comment', 'noun' );
|
||||
if ( false === $trackbacktxt ) $trackbacktxt = __( 'Trackback' );
|
||||
if ( false === $pingbacktxt ) $pingbacktxt = __( 'Pingback' );
|
||||
$type = get_comment_type();
|
||||
switch( $type ) {
|
||||
case 'trackback' :
|
||||
@ -946,10 +946,10 @@ function comments_popup_script($width=400, $height=400, $file='') {
|
||||
function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) {
|
||||
global $id, $wpcommentspopupfile, $wpcommentsjavascript;
|
||||
|
||||
if ( false === $zero ) $zero = __( 'No Comments' );
|
||||
if ( false === $one ) $one = __( '1 Comment' );
|
||||
if ( false === $more ) $more = __( '% Comments' );
|
||||
if ( false === $none ) $none = __( 'Comments Off' );
|
||||
if ( false === $zero ) $zero = __( 'No Comments' );
|
||||
if ( false === $one ) $one = __( '1 Comment' );
|
||||
if ( false === $more ) $more = __( '% Comments' );
|
||||
if ( false === $none ) $none = __( 'Comments Off' );
|
||||
|
||||
$number = get_comments_number( $id );
|
||||
|
||||
|
@ -90,10 +90,10 @@ function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array()) {
|
||||
|
||||
$now = time();
|
||||
|
||||
if ( $timestamp >= $now )
|
||||
$timestamp = $now + $interval;
|
||||
else
|
||||
$timestamp = $now + ($interval - (($now - $timestamp) % $interval));
|
||||
if ( $timestamp >= $now )
|
||||
$timestamp = $now + $interval;
|
||||
else
|
||||
$timestamp = $now + ($interval - (($now - $timestamp) % $interval));
|
||||
|
||||
wp_schedule_event( $timestamp, $recurrence, $hook, $args );
|
||||
}
|
||||
|
@ -2826,7 +2826,7 @@ function sanitize_text_field($str) {
|
||||
* @since 3.0.0
|
||||
*/
|
||||
function capital_P_dangit( $text ) {
|
||||
return str_replace( 'Wordpress', 'WordPress', $text );
|
||||
return str_replace( 'Wordpress', 'WordPress', $text );
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -669,7 +669,7 @@ function delete_option( $option ) {
|
||||
function delete_transient( $transient ) {
|
||||
global $_wp_using_ext_object_cache;
|
||||
|
||||
do_action( 'delete_transient_' . $transient, $transient );
|
||||
do_action( 'delete_transient_' . $transient, $transient );
|
||||
|
||||
if ( $_wp_using_ext_object_cache ) {
|
||||
$result = wp_cache_delete( $transient, 'transient' );
|
||||
@ -757,7 +757,7 @@ function get_transient( $transient ) {
|
||||
function set_transient( $transient, $value, $expiration = 0 ) {
|
||||
global $_wp_using_ext_object_cache;
|
||||
|
||||
$value = apply_filters( 'pre_set_transient_' . $transient, $value );
|
||||
$value = apply_filters( 'pre_set_transient_' . $transient, $value );
|
||||
|
||||
if ( $_wp_using_ext_object_cache ) {
|
||||
$result = wp_cache_set( $transient, $value, 'transient', $expiration );
|
||||
@ -3784,7 +3784,7 @@ function get_site_transient( $transient ) {
|
||||
function set_site_transient( $transient, $value, $expiration = 0 ) {
|
||||
global $_wp_using_ext_object_cache;
|
||||
|
||||
$value = apply_filters( 'pre_set_site_transient_' . $transient, $value );
|
||||
$value = apply_filters( 'pre_set_site_transient_' . $transient, $value );
|
||||
|
||||
if ( $_wp_using_ext_object_cache ) {
|
||||
$result = wp_cache_set( $transient, $value, 'site-transient', $expiration );
|
||||
|
@ -1542,7 +1542,7 @@ function the_weekday() {
|
||||
*
|
||||
* @param string $before Optional Output before the date.
|
||||
* @param string $after Optional Output after the date.
|
||||
*/
|
||||
*/
|
||||
function the_weekday_date($before='',$after='') {
|
||||
global $wp_locale, $post, $day, $previousweekday;
|
||||
$the_weekday_date = '';
|
||||
|
@ -2228,7 +2228,7 @@ function wp_shortlink_wp_head() {
|
||||
* @uses wp_get_shortlink()
|
||||
*/
|
||||
function wp_shortlink_header() {
|
||||
if ( headers_sent() )
|
||||
if ( headers_sent() )
|
||||
return;
|
||||
|
||||
$shortlink = wp_get_shortlink(0, 'query');
|
||||
|
@ -57,7 +57,7 @@ function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) {
|
||||
* @param int $post_id Optional. Post ID.
|
||||
* @param string $size Optional. Image size. Defaults to 'thumbnail'.
|
||||
* @param string|array $attr Optional. Query string or array of attributes.
|
||||
*/
|
||||
*/
|
||||
function get_the_post_thumbnail( $post_id = NULL, $size = 'post-thumbnail', $attr = '' ) {
|
||||
global $id;
|
||||
$post_id = ( NULL === $post_id ) ? $id : $post_id;
|
||||
|
@ -3505,7 +3505,7 @@ function wp_delete_attachment( $post_id, $force_delete = false ) {
|
||||
foreach ( $backup_sizes as $size ) {
|
||||
$del_file = path_join( dirname($meta['file']), $size['file'] );
|
||||
$del_file = apply_filters('wp_delete_file', $del_file);
|
||||
@ unlink( path_join($uploadpath['basedir'], $del_file) );
|
||||
@ unlink( path_join($uploadpath['basedir'], $del_file) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -3578,10 +3578,10 @@ function wp_get_attachment_url( $post_id = 0 ) {
|
||||
if ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) { //Get upload directory
|
||||
if ( 0 === strpos($file, $uploads['basedir']) ) //Check that the upload base exists in the file location
|
||||
$url = str_replace($uploads['basedir'], $uploads['baseurl'], $file); //replace file location with url location
|
||||
elseif ( false !== strpos($file, 'wp-content/uploads') )
|
||||
$url = $uploads['baseurl'] . substr( $file, strpos($file, 'wp-content/uploads') + 18 );
|
||||
else
|
||||
$url = $uploads['baseurl'] . "/$file"; //Its a newly uploaded file, therefor $file is relative to the basedir.
|
||||
elseif ( false !== strpos($file, 'wp-content/uploads') )
|
||||
$url = $uploads['baseurl'] . substr( $file, strpos($file, 'wp-content/uploads') + 18 );
|
||||
else
|
||||
$url = $uploads['baseurl'] . "/$file"; //Its a newly uploaded file, therefor $file is relative to the basedir.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -981,22 +981,22 @@ function &get_terms($taxonomies, $args = '') {
|
||||
|
||||
$selects = array();
|
||||
switch ( $fields ) {
|
||||
case 'all':
|
||||
$selects = array('t.*', 'tt.*');
|
||||
break;
|
||||
case 'ids':
|
||||
case 'all':
|
||||
$selects = array('t.*', 'tt.*');
|
||||
break;
|
||||
case 'ids':
|
||||
case 'id=>parent':
|
||||
$selects = array('t.term_id', 'tt.parent', 'tt.count');
|
||||
break;
|
||||
case 'names':
|
||||
$selects = array('t.term_id', 'tt.parent', 'tt.count', 't.name');
|
||||
break;
|
||||
case 'count':
|
||||
$selects = array('t.term_id', 'tt.parent', 'tt.count');
|
||||
break;
|
||||
case 'names':
|
||||
$selects = array('t.term_id', 'tt.parent', 'tt.count', 't.name');
|
||||
break;
|
||||
case 'count':
|
||||
$orderby = '';
|
||||
$order = '';
|
||||
$selects = array('COUNT(*)');
|
||||
}
|
||||
$select_this = implode(', ', apply_filters( 'get_terms_fields', $selects, $args ));
|
||||
$selects = array('COUNT(*)');
|
||||
}
|
||||
$select_this = implode(', ', apply_filters( 'get_terms_fields', $selects, $args ));
|
||||
|
||||
$query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ($in_taxonomies) $where $orderby $order $limit";
|
||||
|
||||
|
@ -752,11 +752,11 @@ function _fill_many_users( &$users ) {
|
||||
$ids[] = $user_object->ID;
|
||||
}
|
||||
|
||||
$metas = get_user_metavalues($ids);
|
||||
$metas = get_user_metavalues($ids);
|
||||
|
||||
foreach($users as $user_object) {
|
||||
if (isset($metas[$user_object->ID])) {
|
||||
_fill_single_user($user_object, $metas[$user_object->ID]);
|
||||
_fill_single_user($user_object, $metas[$user_object->ID]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -790,8 +790,8 @@ class wpdb {
|
||||
/**
|
||||
* Escape data. Works on arrays.
|
||||
*
|
||||
* @uses wpdb::_escape()
|
||||
* @uses wpdb::_real_escape()
|
||||
* @uses wpdb::_escape()
|
||||
* @uses wpdb::_real_escape()
|
||||
* @since 2.8
|
||||
* @access private
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user