mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
Pinking shears
git-svn-id: http://core.svn.wordpress.org/trunk@22634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1847d7e85b
commit
06ee370814
@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Confirms that the activation key that is sent in an email after a user signs
|
||||
* up for a new blog matches the key for that user and then displays confirmation.
|
||||
*
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
@ -26,7 +26,7 @@ do_action( 'activate_header' );
|
||||
|
||||
/**
|
||||
* Adds an action hook specific to this page that fires on wp_head
|
||||
*
|
||||
*
|
||||
* @since MU
|
||||
*/
|
||||
function do_activate_header() {
|
||||
@ -36,7 +36,7 @@ add_action( 'wp_head', 'do_activate_header' );
|
||||
|
||||
/**
|
||||
* Loads styles specific to this page.
|
||||
*
|
||||
*
|
||||
* @since MU
|
||||
*/
|
||||
function wpmu_activate_stylesheet() {
|
||||
|
@ -475,7 +475,7 @@ form.upgrade .hint {
|
||||
margin-left: 15px;
|
||||
margin-right: 52px;
|
||||
}
|
||||
|
||||
|
||||
.auto-fold #adminmenu div.wp-menu-image {
|
||||
float: right;
|
||||
width: 30px;
|
||||
|
@ -8380,12 +8380,12 @@ a.widget-control-edit {
|
||||
background: url('../images/stars-2x.png?ver=20121108') repeat-x top left;
|
||||
background-size: 21px 37px;
|
||||
}
|
||||
|
||||
|
||||
.welcome-panel .welcome-panel-close:before {
|
||||
background-image: url('../images/xit-2x.gif');
|
||||
background-size: 20px auto;
|
||||
}
|
||||
|
||||
|
||||
.welcome-panel .welcome-add-page {
|
||||
background: url('../images/welcome-icons-2x.png') no-repeat 0 -1px;
|
||||
background-size: 16px;
|
||||
@ -8420,7 +8420,7 @@ a.widget-control-edit {
|
||||
background: url('../images/welcome-icons-2x.png') no-repeat 0px -46px;
|
||||
background-size: 16px;
|
||||
}
|
||||
|
||||
|
||||
.login h1 a {
|
||||
background-image: url('../images/wordpress-logo-2x.png?ver=20120412');
|
||||
background-size: 274px 63px;
|
||||
@ -8430,16 +8430,16 @@ a.widget-control-edit {
|
||||
background-image: url('../images/wp-badge-2x.png?ver=20120516');
|
||||
background-size: 173px 194px;
|
||||
}
|
||||
|
||||
|
||||
.wp-full-overlay .collapse-sidebar-arrow {
|
||||
background-image: url('../images/arrows-2x.png');
|
||||
background-size: 15px 123px;
|
||||
}
|
||||
|
||||
|
||||
.pressthis a span {
|
||||
background-image: url(../images/press-this-2x.png?v=20121105);
|
||||
}
|
||||
|
||||
|
||||
.imgedit-crop,
|
||||
.imgedit-rleft,
|
||||
.imgedit-rright,
|
||||
@ -8450,7 +8450,7 @@ a.widget-control-edit {
|
||||
background-image: url('../images/imgedit-icons-2x.png');
|
||||
background-size: 260px 64px;
|
||||
}
|
||||
|
||||
|
||||
.spinner,
|
||||
.imgedit-wait,
|
||||
.customize-loading #customize-container {
|
||||
|
@ -71,7 +71,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||
<body class="<?php echo esc_attr( $body_class ); ?>">
|
||||
<div class="wp-full-overlay expanded">
|
||||
<form id="customize-controls" class="wrap wp-full-overlay-sidebar">
|
||||
|
||||
|
||||
<div id="customize-header-actions" class="wp-full-overlay-header">
|
||||
<?php
|
||||
$save_text = $wp_customize->is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' );
|
||||
@ -82,7 +82,7 @@ do_action( 'customize_controls_print_scripts' );
|
||||
<?php _e( 'Cancel' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
$screenshot = $wp_customize->theme()->get_screenshot();
|
||||
$cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') );
|
||||
|
@ -58,7 +58,7 @@ function display_header() {
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?php _e( 'WordPress › Installation' ); ?></title>
|
||||
<?php
|
||||
<?php
|
||||
wp_admin_css( 'install', true );
|
||||
?>
|
||||
</head>
|
||||
|
@ -109,7 +109,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
if ( ! empty( $submenu_items ) ) {
|
||||
echo "\n\t<ul class='wp-submenu wp-submenu-wrap'>";
|
||||
echo "<li class='wp-submenu-head'>{$item[0]}</li>";
|
||||
|
||||
|
||||
$first = true;
|
||||
foreach ( $submenu_items as $sub_key => $sub_item ) {
|
||||
if ( ! current_user_can( $sub_item[1] ) )
|
||||
|
@ -47,7 +47,7 @@ get_current_screen()->add_help_tab( array(
|
||||
'content' =>
|
||||
'<p>' . __('If you know what you’re looking for, Search is your best bet. The Search screen has options to search the WordPress.org Plugin Directory for a particular Term, Author, or Tag. You can also search the directory by selecting popular tags. Tags in larger type mean more plugins have been labeled with that tag.') . '</p>' .
|
||||
'<p>' . __('If you just want to get an idea of what’s available, you can browse Featured, Popular, and Newest plugins by using the links in the upper left of the screen. These sections rotate regularly.') . '</p>' .
|
||||
'<p>' . __('You can also browse a user’s favorite plugins, by using the Favorites link in the upper left of the screen and entering their WordPress.org username.') . '</p>' .
|
||||
'<p>' . __('You can also browse a user’s favorite plugins, by using the Favorites link in the upper left of the screen and entering their WordPress.org username.') . '</p>' .
|
||||
'<p>' . __('If you want to install a plugin that you’ve downloaded elsewhere, click the Upload link in the upper left. You will be prompted to upload the .zip package, and once uploaded, you can activate the new plugin.') . '</p>'
|
||||
) );
|
||||
|
||||
|
@ -629,7 +629,7 @@ class WP_Object_Cache {
|
||||
|
||||
$this->multisite = is_multisite();
|
||||
$this->blog_prefix = $this->multisite ? $blog_id . ':' : '';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @todo This should be moved to the PHP4 style constructor, PHP5
|
||||
|
@ -165,7 +165,7 @@ function get_category_by_slug( $slug ) {
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param string $cat_name Category name.
|
||||
* @param string $cat_name Category name.
|
||||
* @return int 0, if failure and ID of category on success.
|
||||
*/
|
||||
function get_cat_ID( $cat_name ) {
|
||||
|
@ -73,7 +73,7 @@ final class WP_Customize_Manager {
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @param mixed $ajax_message AJAX return
|
||||
* @param mixed $message UI message
|
||||
* @param mixed $message UI message
|
||||
*/
|
||||
protected function wp_die( $ajax_message, $message = null ) {
|
||||
if ( $this->doing_ajax() )
|
||||
@ -98,7 +98,7 @@ final class WP_Customize_Manager {
|
||||
|
||||
return '_default_wp_die_handler';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Start preview and customize theme.
|
||||
*
|
||||
@ -140,7 +140,7 @@ final class WP_Customize_Manager {
|
||||
|
||||
$this->start_previewing_theme();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback to validate a theme once it is loaded
|
||||
*
|
||||
|
@ -380,7 +380,7 @@ class WP_Customize_Setting {
|
||||
* @since 3.4.0
|
||||
*/
|
||||
class WP_Customize_Filter_Setting extends WP_Customize_Setting {
|
||||
|
||||
|
||||
/**
|
||||
* @since 3.4.0
|
||||
*/
|
||||
|
@ -607,7 +607,7 @@
|
||||
background-image: url(../images/admin-bar-sprite-2x.png?d=20120830);
|
||||
background-size: 20px 220px;
|
||||
}
|
||||
|
||||
|
||||
#wpadminbar .quicklinks li div.blavatar {
|
||||
background: url('../images/wpmini-blue-2x.png') no-repeat;
|
||||
background-size: 16px 16px;
|
||||
|
@ -2129,7 +2129,7 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
|
||||
.button {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
font-size: 14px;
|
||||
line-height: 23px;
|
||||
height: 24px;
|
||||
margin: 0;
|
||||
@ -2153,7 +2153,7 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
|
||||
color: #333;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
|
||||
.button.button-large {
|
||||
height: 29px;
|
||||
line-height: 28px;
|
||||
@ -2172,7 +2172,7 @@ function _default_wp_die_handler( $message, $title = '', $args = array() ) {
|
||||
border-color: #999;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
|
||||
.button:focus {
|
||||
-webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2);
|
||||
box-shadow: 1px 1px 1px rgba(0,0,0,.2);
|
||||
|
@ -1631,8 +1631,8 @@ function feed_links_extra( $args = array() ) {
|
||||
'authortitle' => __('%1$s %2$s Posts by %3$s Feed'),
|
||||
/* translators: 1: blog name, 2: separator(raquo), 3: search phrase */
|
||||
'searchtitle' => __('%1$s %2$s Search Results for “%3$s” Feed'),
|
||||
/* translators: 1: blog name, 2: separator(raquo), 3: post type name */
|
||||
'posttypetitle' => __('%1$s %2$s %3$s Feed'),
|
||||
/* translators: 1: blog name, 2: separator(raquo), 3: post type name */
|
||||
'posttypetitle' => __('%1$s %2$s %3$s Feed'),
|
||||
);
|
||||
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
@ -1663,10 +1663,10 @@ function feed_links_extra( $args = array() ) {
|
||||
} elseif ( is_search() ) {
|
||||
$title = sprintf( $args['searchtitle'], get_bloginfo('name'), $args['separator'], get_search_query( false ) );
|
||||
$href = get_search_feed_link();
|
||||
} elseif ( is_post_type_archive() ) {
|
||||
$title = sprintf( $args['posttypetitle'], get_bloginfo('name'), $args['separator'], post_type_archive_title( '', false ) );
|
||||
$href = get_post_type_archive_feed_link( get_queried_object()->name );
|
||||
}
|
||||
} elseif ( is_post_type_archive() ) {
|
||||
$title = sprintf( $args['posttypetitle'], get_bloginfo('name'), $args['separator'], post_type_archive_title( '', false ) );
|
||||
$href = get_post_type_archive_feed_link( get_queried_object()->name );
|
||||
}
|
||||
|
||||
if ( isset($title) && isset($href) )
|
||||
echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . esc_attr( $title ) . '" href="' . esc_url( $href ) . '" />' . "\n";
|
||||
|
@ -13,7 +13,7 @@ if ( typeof(jQuery) != 'undefined' ) {
|
||||
};
|
||||
|
||||
adminbar.removeClass('nojq').removeClass('nojs');
|
||||
|
||||
|
||||
if ( 'ontouchstart' in window || /IEMobile\/[1-9]/.test(navigator.userAgent) ) { // touch screen device
|
||||
// close any open drop-downs when the click/touch is not on the toolbar
|
||||
$(document.body).on('click.wp-mobile-hover', function(e) {
|
||||
|
@ -11,7 +11,7 @@
|
||||
// use. That means, you can include it in your product, or your web
|
||||
// site, or any other form where the code is actually being used. You
|
||||
// may not put the plain javascript up on your site for download or
|
||||
// include it in your javascript libraries for download.
|
||||
// include it in your javascript libraries for download.
|
||||
// If you wish to share this code with others, please just point them
|
||||
// to the URL instead.
|
||||
// Please DO NOT link directly to my .js files from your site. Copy
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
/* SOURCE FILE: AnchorPosition.js */
|
||||
|
||||
/*
|
||||
/*
|
||||
AnchorPosition.js
|
||||
Author: Matt Kruse
|
||||
Last modified: 10/11/02
|
||||
@ -30,7 +30,7 @@ DESCRIPTION: These functions find the position of an <A> tag in a document,
|
||||
so other elements can be positioned relative to it.
|
||||
|
||||
COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
|
||||
positioning errors - usually with Window positioning - occur on the
|
||||
positioning errors - usually with Window positioning - occur on the
|
||||
Macintosh platform.
|
||||
|
||||
FUNCTIONS:
|
||||
@ -44,16 +44,16 @@ getAnchorWindowPosition(anchorname)
|
||||
|
||||
NOTES:
|
||||
|
||||
1) For popping up separate browser windows, use getAnchorWindowPosition.
|
||||
1) For popping up separate browser windows, use getAnchorWindowPosition.
|
||||
Otherwise, use getAnchorPosition
|
||||
|
||||
2) Your anchor tag MUST contain both NAME and ID attributes which are the
|
||||
2) Your anchor tag MUST contain both NAME and ID attributes which are the
|
||||
same. For example:
|
||||
<A NAME="test" ID="test"> </A>
|
||||
|
||||
3) There must be at least a space between <A> </A> for IE5.5 to see the
|
||||
3) There must be at least a space between <A> </A> for IE5.5 to see the
|
||||
anchor tag correctly. Do not do <A></A> with no space.
|
||||
*/
|
||||
*/
|
||||
|
||||
// getAnchorPosition(anchorname)
|
||||
// This function returns an object having .x and .y properties which are the coordinates
|
||||
@ -151,7 +151,7 @@ function AnchorPosition_getWindowOffsetTop (el) {
|
||||
|
||||
/* SOURCE FILE: PopupWindow.js */
|
||||
|
||||
/*
|
||||
/*
|
||||
PopupWindow.js
|
||||
Author: Matt Kruse
|
||||
Last modified: 02/16/04
|
||||
@ -161,20 +161,20 @@ in a certain place. The window can either be a DIV or a separate browser
|
||||
window.
|
||||
|
||||
COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
|
||||
positioning errors - usually with Window positioning - occur on the
|
||||
Macintosh platform. Due to bugs in Netscape 4.x, populating the popup
|
||||
positioning errors - usually with Window positioning - occur on the
|
||||
Macintosh platform. Due to bugs in Netscape 4.x, populating the popup
|
||||
window with <STYLE> tags may cause errors.
|
||||
|
||||
USAGE:
|
||||
// Create an object for a WINDOW popup
|
||||
var win = new PopupWindow();
|
||||
var win = new PopupWindow();
|
||||
|
||||
// Create an object for a DIV window using the DIV named 'mydiv'
|
||||
var win = new PopupWindow('mydiv');
|
||||
var win = new PopupWindow('mydiv');
|
||||
|
||||
// Set the window to automatically hide itself when the user clicks
|
||||
// Set the window to automatically hide itself when the user clicks
|
||||
// anywhere else on the page except the popup
|
||||
win.autoHide();
|
||||
win.autoHide();
|
||||
|
||||
// Show the window relative to the anchor name passed in
|
||||
win.showPopup(anchorname);
|
||||
@ -185,7 +185,7 @@ win.hidePopup();
|
||||
// Set the size of the popup window (only applies to WINDOW popups
|
||||
win.setSize(width,height);
|
||||
|
||||
// Populate the contents of the popup window that will be shown. If you
|
||||
// Populate the contents of the popup window that will be shown. If you
|
||||
// change the contents while it is displayed, you will need to refresh()
|
||||
win.populate(string);
|
||||
|
||||
@ -205,18 +205,18 @@ win.offsetY = 100;
|
||||
NOTES:
|
||||
1) Requires the functions in AnchorPosition.js
|
||||
|
||||
2) Your anchor tag MUST contain both NAME and ID attributes which are the
|
||||
2) Your anchor tag MUST contain both NAME and ID attributes which are the
|
||||
same. For example:
|
||||
<A NAME="test" ID="test"> </A>
|
||||
|
||||
3) There must be at least a space between <A> </A> for IE5.5 to see the
|
||||
3) There must be at least a space between <A> </A> for IE5.5 to see the
|
||||
anchor tag correctly. Do not do <A></A> with no space.
|
||||
|
||||
4) When a PopupWindow object is created, a handler for 'onmouseup' is
|
||||
attached to any event handler you may have already defined. Do NOT define
|
||||
an event handler for 'onmouseup' after you define a PopupWindow object or
|
||||
the autoHide() will not work correctly.
|
||||
*/
|
||||
*/
|
||||
|
||||
// Set the position of the popup window based on the anchor
|
||||
function PopupWindow_getXYPosition(anchorname) {
|
||||
@ -255,11 +255,11 @@ function PopupWindow_refresh() {
|
||||
if (this.use_gebi) {
|
||||
document.getElementById(this.divName).innerHTML = this.contents;
|
||||
}
|
||||
else if (this.use_css) {
|
||||
else if (this.use_css) {
|
||||
document.all[this.divName].innerHTML = this.contents;
|
||||
}
|
||||
else if (this.use_layers) {
|
||||
var d = document.layers[this.divName];
|
||||
else if (this.use_layers) {
|
||||
var d = document.layers[this.divName];
|
||||
d.document.open();
|
||||
d.document.writeln(this.contents);
|
||||
d.document.close();
|
||||
@ -470,11 +470,11 @@ function PopupWindow() {
|
||||
|
||||
/* SOURCE FILE: ColorPicker2.js */
|
||||
|
||||
/*
|
||||
/*
|
||||
Last modified: 02/24/2003
|
||||
|
||||
DESCRIPTION: This widget is used to select a color, in hexadecimal #RRGGBB
|
||||
form. It uses a color "swatch" to display the standard 216-color web-safe
|
||||
DESCRIPTION: This widget is used to select a color, in hexadecimal #RRGGBB
|
||||
form. It uses a color "swatch" to display the standard 216-color web-safe
|
||||
palette. The user can then click on a color to select it.
|
||||
|
||||
COMPATABILITY: See notes in AnchorPosition.js and PopupWindow.js.
|
||||
@ -500,7 +500,7 @@ var cp = new ColorPicker('window');
|
||||
|
||||
// Write the 'pickColor' function that will be called when the user clicks
|
||||
// a color and do something with the value. This is only required if you
|
||||
// want to do something other than simply populate a form field, which is
|
||||
// want to do something other than simply populate a form field, which is
|
||||
// what the 'select' function will give you.
|
||||
function pickColor(color) {
|
||||
field.value = color;
|
||||
@ -509,18 +509,18 @@ function pickColor(color) {
|
||||
NOTES:
|
||||
1) Requires the functions in AnchorPosition.js and PopupWindow.js
|
||||
|
||||
2) Your anchor tag MUST contain both NAME and ID attributes which are the
|
||||
2) Your anchor tag MUST contain both NAME and ID attributes which are the
|
||||
same. For example:
|
||||
<A NAME="test" ID="test"> </A>
|
||||
|
||||
3) There must be at least a space between <A> </A> for IE5.5 to see the
|
||||
3) There must be at least a space between <A> </A> for IE5.5 to see the
|
||||
anchor tag correctly. Do not do <A></A> with no space.
|
||||
|
||||
4) When a ColorPicker object is created, a handler for 'onmouseup' is
|
||||
attached to any event handler you may have already defined. Do NOT define
|
||||
an event handler for 'onmouseup' after you define a ColorPicker object or
|
||||
the color picker will not hide itself correctly.
|
||||
*/
|
||||
*/
|
||||
ColorPicker_targetInput = null;
|
||||
function ColorPicker_writeDiv() {
|
||||
document.writeln("<DIV ID=\"colorPickerDiv\" STYLE=\"position:absolute;visibility:hidden;\"> </DIV>");
|
||||
@ -548,8 +548,8 @@ function pickColor(color) {
|
||||
// This function is the easiest way to popup the window, select a color, and
|
||||
// have the value populate a form field, which is what most people want to do.
|
||||
function ColorPicker_select(inputobj,linkname) {
|
||||
if (inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea") {
|
||||
alert("colorpicker.select: Input object passed is not a valid form input object");
|
||||
if (inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea") {
|
||||
alert("colorpicker.select: Input object passed is not a valid form input object");
|
||||
window.ColorPicker_targetInput=null;
|
||||
return;
|
||||
}
|
||||
@ -682,7 +682,7 @@ function ColorPicker() {
|
||||
if (use_highlight) { var mo = 'onMouseOver="'+windowRef+'ColorPicker_highlightColor(\''+colors[i]+'\',window.document)"'; }
|
||||
else { mo = ""; }
|
||||
cp_contents += '<td style="background-color: '+colors[i]+';"><a href="javascript:void()" onclick="'+windowRef+'ColorPicker_pickColor(\''+colors[i]+'\','+windowRef+'window.popupWindowObjects['+cp.index+']);return false;" '+mo+'> </a></td>';
|
||||
if ( ((i+1)>=total) || (((i+1) % width) == 0)) {
|
||||
if ( ((i+1)>=total) || (((i+1) % width) == 0)) {
|
||||
cp_contents += "</tr>";
|
||||
}
|
||||
}
|
||||
|
@ -327,8 +327,8 @@ function update_blog_details( $blog_id, $details = array() ) {
|
||||
do_action( 'make_delete_blog', $blog_id );
|
||||
else
|
||||
do_action( 'make_undelete_blog', $blog_id );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( isset( $details[ 'public' ] ) ) {
|
||||
switch_to_blog( $blog_id );
|
||||
update_option( 'blog_public', $details[ 'public' ] );
|
||||
@ -529,7 +529,7 @@ function switch_to_blog( $new_blog, $deprecated = null ) {
|
||||
$global_groups = $wp_object_cache->global_groups;
|
||||
else
|
||||
$global_groups = false;
|
||||
|
||||
|
||||
wp_cache_init();
|
||||
|
||||
if ( function_exists( 'wp_cache_add_global_groups' ) ) {
|
||||
@ -590,7 +590,7 @@ function restore_current_blog() {
|
||||
$global_groups = $wp_object_cache->global_groups;
|
||||
else
|
||||
$global_groups = false;
|
||||
|
||||
|
||||
wp_cache_init();
|
||||
|
||||
if ( function_exists( 'wp_cache_add_global_groups' ) ) {
|
||||
|
@ -441,7 +441,7 @@ function get_body_class( $class = '' ) {
|
||||
$classes[] = 'single-format-' . sanitize_html_class( $post_format );
|
||||
else
|
||||
$classes[] = 'single-format-standard';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_attachment() ) {
|
||||
@ -459,21 +459,21 @@ function get_body_class( $class = '' ) {
|
||||
$classes[] = 'author';
|
||||
if ( isset( $author->user_nicename ) ) {
|
||||
$classes[] = 'author-' . sanitize_html_class( $author->user_nicename, $author->ID );
|
||||
$classes[] = 'author-' . $author->ID;
|
||||
$classes[] = 'author-' . $author->ID;
|
||||
}
|
||||
} elseif ( is_category() ) {
|
||||
$cat = $wp_query->get_queried_object();
|
||||
$classes[] = 'category';
|
||||
if ( isset( $cat->term_id ) ) {
|
||||
$classes[] = 'category-' . sanitize_html_class( $cat->slug, $cat->term_id );
|
||||
$classes[] = 'category-' . $cat->term_id;
|
||||
$classes[] = 'category-' . $cat->term_id;
|
||||
}
|
||||
} elseif ( is_tag() ) {
|
||||
$tags = $wp_query->get_queried_object();
|
||||
$classes[] = 'tag';
|
||||
if ( isset( $tags->term_id ) ) {
|
||||
$classes[] = 'tag-' . sanitize_html_class( $tags->slug, $tags->term_id );
|
||||
$classes[] = 'tag-' . $tags->term_id;
|
||||
$classes[] = 'tag-' . $tags->term_id;
|
||||
}
|
||||
} elseif ( is_tax() ) {
|
||||
$term = $wp_query->get_queried_object();
|
||||
|
@ -2774,13 +2774,13 @@ class WP_Query {
|
||||
// of the type WP_Post and are filtered.
|
||||
if ( $this->posts ) {
|
||||
$this->post_count = count( $this->posts );
|
||||
|
||||
|
||||
$this->posts = array_map( 'get_post', $this->posts );
|
||||
|
||||
if ( $q['cache_results'] )
|
||||
update_post_caches($this->posts, $post_type, $q['update_post_term_cache'], $q['update_post_meta_cache']);
|
||||
|
||||
$this->post = reset( $this->posts );
|
||||
$this->post = reset( $this->posts );
|
||||
} else {
|
||||
$this->post_count = 0;
|
||||
$this->posts = array();
|
||||
|
@ -331,7 +331,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
||||
);
|
||||
$args = wp_parse_args($args, $defaults);
|
||||
|
||||
if ( strlen( $taxonomy ) > 32 )
|
||||
if ( strlen( $taxonomy ) > 32 )
|
||||
return new WP_Error( 'taxonomy_too_long', __( 'Taxonomies cannot exceed 32 characters in length' ) );
|
||||
|
||||
if ( false !== $args['query_var'] && !empty($wp) ) {
|
||||
|
@ -313,7 +313,7 @@ function get_single_template() {
|
||||
function get_attachment_template() {
|
||||
global $posts;
|
||||
|
||||
if ( ! empty( $posts ) && isset( $posts[0]->post_mime_type ) ) {
|
||||
if ( ! empty( $posts ) && isset( $posts[0]->post_mime_type ) ) {
|
||||
$type = explode( '/', $posts[0]->post_mime_type );
|
||||
|
||||
if ( ! empty( $type ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user