mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 14:50:29 +00:00
Pruning shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@15904 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -342,7 +342,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
||||
|
||||
if ( !$redirect_url || $redirect_url == $requested_url )
|
||||
return false;
|
||||
|
||||
|
||||
// Hex encoded octets are case-insensitive.
|
||||
if ( false !== strpos($requested_url, '%') ) {
|
||||
if ( !function_exists('lowercase_octets') ) {
|
||||
|
||||
@@ -260,8 +260,8 @@ autosave = function() {
|
||||
post_data["excerpt"] = jQuery("#excerpt").val();
|
||||
if ( jQuery("#post_author").size() )
|
||||
post_data["post_author"] = jQuery("#post_author").val();
|
||||
if ( jQuery("#parent_id").val() )
|
||||
post_data["parent_id"] = jQuery("#parent_id").val();
|
||||
if ( jQuery("#parent_id").val() )
|
||||
post_data["parent_id"] = jQuery("#parent_id").val();
|
||||
post_data["user_ID"] = jQuery("#user-id").val();
|
||||
if ( jQuery('#auto_draft').val() == '1' )
|
||||
post_data["auto_draft"] = '1';
|
||||
|
||||
@@ -314,9 +314,9 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
||||
$possible_object_parents = array_filter( $possible_object_parents );
|
||||
|
||||
foreach ( (array) $menu_items as $key => $menu_item ) {
|
||||
|
||||
|
||||
$menu_items[$key]->current = false;
|
||||
|
||||
|
||||
$classes = (array) $menu_item->classes;
|
||||
$classes[] = 'menu-item';
|
||||
$classes[] = 'menu-item-type-' . $menu_item->type;
|
||||
@@ -362,7 +362,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
||||
$current_url = untrailingslashit( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
||||
$item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url );
|
||||
$_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) );
|
||||
|
||||
|
||||
if ( in_array( $item_url, array( $current_url, $_indexless_current ) ) ) {
|
||||
$classes[] = 'current-menu-item';
|
||||
$menu_items[$key]->current = true;
|
||||
@@ -383,7 +383,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
||||
$active_parent_object_ids[] = (int) $menu_item->post_parent;
|
||||
$active_object = $menu_item->object;
|
||||
}
|
||||
|
||||
|
||||
if ( untrailingslashit($item_url) == home_url() )
|
||||
$classes[] = 'menu-item-home';
|
||||
}
|
||||
@@ -403,7 +403,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
||||
$classes = (array) $parent_item->classes;
|
||||
$menu_items[$key]->current_item_ancestor = false;
|
||||
$menu_items[$key]->current_item_parent = false;
|
||||
|
||||
|
||||
if (
|
||||
isset( $parent_item->type ) &&
|
||||
(
|
||||
|
||||
@@ -1111,7 +1111,7 @@ function _get_custom_object_labels( $object, $nohier_vs_hier_defaults ) {
|
||||
*
|
||||
* @access private
|
||||
* @since 3.1.0
|
||||
*/
|
||||
*/
|
||||
function _add_post_type_submenus() {
|
||||
foreach ( get_post_types( array( 'show_ui' => true ) ) as $ptype ) {
|
||||
$ptype_obj = get_post_type_object( $ptype );
|
||||
|
||||
@@ -503,7 +503,7 @@ function get_objects_in_term( $terms, $taxonomies, $args = array() ) {
|
||||
if ( $term = get_term_by( $field, $term, $taxonomy ) )
|
||||
$term = $term->term_id;
|
||||
else
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
$children = array_merge( $children, get_term_children( $term, $taxonomy ) );
|
||||
$children[] = $term;
|
||||
@@ -2831,7 +2831,7 @@ function get_ancestors($object_id = 0, $object_type = '') {
|
||||
if ( empty( $object_id ) ) {
|
||||
return apply_filters('get_ancestors', $ancestors, $object_id, $object_type);
|
||||
}
|
||||
|
||||
|
||||
if ( is_taxonomy_hierarchical( $object_type ) ) {
|
||||
$term = get_term($object_id, $object_type);
|
||||
while ( ! is_wp_error($term) && ! empty( $term->parent ) && ! in_array( $term->parent, $ancestors ) ) {
|
||||
|
||||
@@ -1043,7 +1043,7 @@ class wpdb {
|
||||
</ul>
|
||||
<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
|
||||
"/*/WP_I18N_DB_CONN_ERROR*/, $this->dbhost ), 'db_connect_fail' );
|
||||
|
||||
|
||||
//If show errors is disabled then we need to die anyway as we don't have a working DB connection
|
||||
die();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user