';
// Allow plugins to hook into the menu to add their own
's
diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php
index 985ef9236c..a1215e8038 100644
--- a/wp-includes/nav-menu.php
+++ b/wp-includes/nav-menu.php
@@ -16,7 +16,7 @@
* @return mixed $menu|false Or WP_Error
*/
function wp_get_nav_menu_object( $menu ) {
- if ( ! $menu )
+ if ( ! $menu )
return false;
$menu_obj = get_term( $menu, 'nav_menu' );
@@ -47,17 +47,17 @@ function wp_get_nav_menu_object( $menu ) {
function is_nav_menu( $menu ) {
if ( ! $menu )
return false;
-
+
$menu_obj = wp_get_nav_menu_object( $menu );
- if (
- $menu_obj &&
- ! is_wp_error( $menu_obj ) &&
+ if (
+ $menu_obj &&
+ ! is_wp_error( $menu_obj ) &&
! empty( $menu_obj->taxonomy ) &&
'nav_menu' == $menu_obj->taxonomy
- )
+ )
return true;
-
+
return false;
}
@@ -163,22 +163,22 @@ function wp_update_nav_menu_object( $menu_id = 0, $menu_data = array() ) {
return $_menu;
if ( $_menu && isset( $_menu->term_id ) ) {
- $args = array(
- 'description' => ( isset( $menu_data['description'] ) ? $menu_data['description'] : '' ),
- 'name' => ( isset( $menu_data['menu-name'] ) ? $menu_data['menu-name'] : '' ),
- 'parent' => ( isset( $menu_data['parent'] ) ? (int) $menu_data['parent'] : 0 ),
- 'slug' => null,
+ $args = array(
+ 'description' => ( isset( $menu_data['description'] ) ? $menu_data['description'] : '' ),
+ 'name' => ( isset( $menu_data['menu-name'] ) ? $menu_data['menu-name'] : '' ),
+ 'parent' => ( isset( $menu_data['parent'] ) ? (int) $menu_data['parent'] : 0 ),
+ 'slug' => null,
);
-
+
$menu_id = (int) $_menu->term_id;
// double-check that we're not changing a menu to the name of another
- $_possible_existing = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' );
- if (
- $_possible_existing &&
- ! is_wp_error( $_possible_existing ) &&
+ $_possible_existing = get_term_by( 'name', $menu_data['menu-name'], 'nav_menu' );
+ if (
+ $_possible_existing &&
+ ! is_wp_error( $_possible_existing ) &&
isset( $_possible_existing->term_id ) &&
- $_possible_existing->term_id != $menu_id
+ $_possible_existing->term_id != $menu_id
) {
return new WP_Error( 'menu_exists', sprintf( __('The menu name %s conflicts with another menu name. Please try another.'), esc_html( $menu_data['menu-name'] ) ) );
}
@@ -255,7 +255,7 @@ function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item
$args['menu-item-position'] = $count;
}
}
-
+
if ( 'custom' != $args['menu-item-type'] ) {
/* if non-custom menu item, then:
* use original object's URL
@@ -297,9 +297,9 @@ function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item
'ping_status' => 0,
'post_content' => $args['menu-item-description'],
'post_excerpt' => $args['menu-item-attr-title'],
- 'post_parent' => $args['menu-item-parent-id'],
- 'post_title' => $args['menu-item-title'],
- 'post_type' => 'nav_menu_item',
+ 'post_parent' => $args['menu-item-parent-id'],
+ 'post_title' => $args['menu-item-title'],
+ 'post_type' => 'nav_menu_item',
'tax_input' => array( 'nav_menu' => $menu->name ),
);
@@ -376,10 +376,10 @@ function _sort_nav_menu_items($a, $b) {
$_b = (int) $b->$_menu_item_sort_prop;
if ( $a->$_menu_item_sort_prop == $b->$_menu_item_sort_prop ) {
- return 0;
- } elseif (
- ( $_a == $a->$_menu_item_sort_prop ) &&
- ( $_b == $b->$_menu_item_sort_prop )
+ return 0;
+ } elseif (
+ ( $_a == $a->$_menu_item_sort_prop ) &&
+ ( $_b == $b->$_menu_item_sort_prop )
) {
return $_a < $_b ? -1 : 1;
} else {
@@ -404,7 +404,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
if ( ! $menu )
return false;
-
+
$items = get_objects_in_term( $menu->term_id, 'nav_menu' );
if ( ! empty( $items ) ) {
@@ -448,7 +448,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
* - url: The URL to which this menu item points.
* - title: The title of this menu item.
* - target: The target attribute of the link element for this menu item.
- * - attr_title: The title attribute of the link element for this menu item.
+ * - attr_title: The title attribute of the link element for this menu item.
* - classes: The class attribute value for the link element of this menu item.
* - xfn: The XFN relationship expressed in the link of this menu item.
* - description: The description of this menu item.
@@ -465,12 +465,12 @@ function wp_setup_nav_menu_item( $menu_item ) {
$menu_item->object_id = get_post_meta( $menu_item->ID, '_menu_item_object_id', true );
$menu_item->object = get_post_meta( $menu_item->ID, '_menu_item_object', true );
$menu_item->type = get_post_meta( $menu_item->ID, '_menu_item_type', true );
-
+
if ( 'post_type' == $menu_item->type ) {
$object = get_post_type_object( $menu_item->object );
$menu_item->append = $object->singular_label;
$menu_item->url = get_permalink( $menu_item->object_id );
-
+
$original_object = get_post( $menu_item->object_id );
$original_title = $original_object->post_title;
$menu_item->title = '' == $menu_item->post_title ? $original_title : $menu_item->post_title;
@@ -488,7 +488,7 @@ function wp_setup_nav_menu_item( $menu_item ) {
$menu_item->title = $menu_item->post_title;
$menu_item->url = get_post_meta( $menu_item->ID, '_menu_item_url', true );
}
-
+
$menu_item->target = get_post_meta( $menu_item->ID, '_menu_item_target', true );
$menu_item->attr_title = strip_tags( $menu_item->post_excerpt );
@@ -542,7 +542,7 @@ function wp_setup_nav_menu_item( $menu_item ) {
* Get the menu items associated with a particular object.
*
* @since 3.0.0
- *
+ *
* @param int $object_id The ID of the original object.
* @param string $object_type The type of object, such as "taxonomy" or "post_type."
* @return array The array of menu item IDs; empty array if none;
diff --git a/wp-includes/post.php b/wp-includes/post.php
index 09693047c5..1ef3edf334 100644
--- a/wp-includes/post.php
+++ b/wp-includes/post.php
@@ -632,7 +632,7 @@ function get_post_status_object( $post_status ) {
*
* @param array|string $args An array of key => value arguments to match against the post status objects.
* @param string $output The type of output to return, either post status 'names' or 'objects'. 'names' is the default.
- * @param string $operator The logical operation to perform. 'or' means only one element
+ * @param string $operator The logical operation to perform. 'or' means only one element
* from the array needs to match; 'and' means all elements must match. The default is 'and'.
* @return array A list of post type names or objects
*/
@@ -738,7 +738,7 @@ function get_post_type_object( $post_type ) {
*
* @param array|string $args An array of key => value arguments to match against the post type objects.
* @param string $output The type of output to return, either post type 'names' or 'objects'. 'names' is the default.
- * @param string $operator The logical operation to perform. 'or' means only one element
+ * @param string $operator The logical operation to perform. 'or' means only one element
* from the array needs to match; 'and' means all elements must match. The default is 'and'.
* @return array A list of post type names or objects
*/
diff --git a/wp-includes/query.php b/wp-includes/query.php
index 2aef37f5b4..4d5201a1a4 100644
--- a/wp-includes/query.php
+++ b/wp-includes/query.php
@@ -1719,7 +1719,7 @@ class WP_Query {
// Non-hierarchical post_types & parent-level-hierarchical post_types can directly use 'name'
$q['name'] = $q[ $ptype_obj->query_var ];
} else {
- // Hierarchical post_types will operate through the
+ // Hierarchical post_types will operate through the
$q['pagename'] = $q[ $ptype_obj->query_var ];
$q['name'] = '';
}
@@ -2482,7 +2482,7 @@ class WP_Query {
$stickies = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE $wpdb->posts.ID IN ($stickies__in) $stickies_where" );
foreach ( $stickies as $sticky_post ) {
// Ignore sticky posts the current user cannot read or are not published.
- if ( 'publish' != $sticky_post->post_status )
+ if ( 'publish' != $sticky_post->post_status )
continue;
array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
$sticky_offset++;
diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php
index d193f53a85..824e434946 100644
--- a/wp-includes/rewrite.php
+++ b/wp-includes/rewrite.php
@@ -1567,7 +1567,7 @@ class WP_Rewrite {
// robots.txt -only if installed at the root
$home_path = parse_url( home_url() );
$robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();
-
+
// Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category%
$default_feeds = array( '.*wp-atom.php$' => $this->index . '?feed=atom',
'.*wp-rdf.php$' => $this->index . '?feed=rdf',
diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php
index 7a8cafd9e6..02f100a0f1 100644
--- a/wp-includes/taxonomy.php
+++ b/wp-includes/taxonomy.php
@@ -69,7 +69,7 @@ add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority
*
* @param array $args An array of key => value arguments to match against the taxonomy objects.
* @param string $output The type of output to return, either taxonomy 'names' or 'objects'. 'names' is the default.
- * @param string $operator The logical operation to perform. 'or' means only one element
+ * @param string $operator The logical operation to perform. 'or' means only one element
* from the array needs to match; 'and' means all elements must match. The default is 'and'.
* @return array A list of taxonomy names or objects
*/
@@ -1571,7 +1571,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
}
// Seems unreachable, However, Is used in the case that a term name is provided, which sanitizes to an empty string.
- if ( empty($slug) ) {
+ if ( empty($slug) ) {
$slug = sanitize_title($slug, $term_id);
do_action( 'edit_terms', $term_id );
$wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) );
diff --git a/wp-includes/theme.php b/wp-includes/theme.php
index 00db024657..877e7c7658 100644
--- a/wp-includes/theme.php
+++ b/wp-includes/theme.php
@@ -844,9 +844,9 @@ function get_date_template() {
/**
* Retrieve path of home template in current or parent template.
- *
+ *
* This is the template used for the page containing the blog posts
- *
+ *
* Attempts to locate 'home.php' first before falling back to 'index.php'.
*
* @since 1.5.0
diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php
index b97862b54d..02fb6aa304 100644
--- a/wp-includes/widgets.php
+++ b/wp-includes/widgets.php
@@ -558,9 +558,9 @@ function register_sidebar($args = array()) {
$wp_registered_sidebars[$sidebar['id']] = $sidebar;
add_theme_support('widgets');
-
+
do_action( 'register_sidebar', $sidebar );
-
+
return $sidebar['id'];
}
@@ -690,7 +690,7 @@ function wp_sidebar_description( $id ) {
*/
function wp_unregister_sidebar_widget($id) {
do_action( 'wp_unregister_sidebar_widget', $id );
-
+
wp_register_sidebar_widget($id, '', '');
wp_unregister_widget_control($id);
}
@@ -884,7 +884,7 @@ function dynamic_sidebar($index = 1) {
$params = apply_filters( 'dynamic_sidebar_params', $params );
$callback = $wp_registered_widgets[$id]['callback'];
-
+
do_action( 'dynamic_sidebar', $wp_registered_widgets[$id] );
if ( is_callable($callback) ) {