diff --git a/index.php b/index.php index 3e3db402e0..b1c655cd52 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,4 @@ -Categories if ( !current_user_can( 'manage_categories' ) ) - die('-1'); + die('-1'); if ( !$cat = wp_insert_category( $_POST ) ) die('0'); if ( !$cat = get_category( $cat ) ) diff --git a/wp-admin/admin-db.php b/wp-admin/admin-db.php index 225119d1c9..43f0bc8b64 100644 --- a/wp-admin/admin-db.php +++ b/wp-admin/admin-db.php @@ -48,7 +48,7 @@ function get_editable_user_ids( $user_id, $exclude_zeros = true ) { if ( ! $user->has_cap('edit_others_posts') ) { if ( $user->has_cap('edit_posts') || $exclude_zeros == false ) return array($user->id); - else + else return false; } @@ -96,7 +96,7 @@ function wp_insert_category($catarr) { $update = false; $cat_name = apply_filters('pre_category_name', $cat_name); - + if (empty ($category_nicename)) $category_nicename = sanitize_title($cat_name); else @@ -198,7 +198,7 @@ function wp_delete_category($cat_ID) { $cats = array($default_cat); else $cats = array_diff($cats, array($cat_ID)); - wp_set_post_categories($post_id, $cats); + wp_set_post_categories($post_id, $cats); } $default_link_cat = get_option('default_link_category'); @@ -209,9 +209,9 @@ function wp_delete_category($cat_ID) { $cats = array($default_link_cat); else $cats = array_diff($cats, array($cat_ID)); - wp_set_link_cats($link_id, $cats); + wp_set_link_cats($link_id, $cats); } - + wp_cache_delete($cat_ID, 'category'); wp_cache_delete('all_category_ids', 'category'); @@ -285,9 +285,9 @@ function wp_delete_user($id, $reassign = 'novalue') { function wp_revoke_user($id) { $id = (int) $id; - + $user = new WP_User($id); - $user->remove_all_caps(); + $user->remove_all_caps(); } function wp_insert_link($linkdata) { @@ -385,15 +385,15 @@ function wp_update_link($linkdata) { $link = add_magic_quotes($link); // Passed link category list overwrites existing category list if not empty. - if ( isset($linkdata['link_category']) && is_array($linkdata['link_category']) + if ( isset($linkdata['link_category']) && is_array($linkdata['link_category']) && 0 != count($linkdata['link_category']) ) - $link_cats = $linkdata['link_category']; - else - $link_cats = $link['link_category']; + $link_cats = $linkdata['link_category']; + else + $link_cats = $link['link_category']; // Merge old and new fields with new fields overwriting old ones. $linkdata = array_merge($link, $linkdata); - $linkdata['link_category'] = $link_cats; + $linkdata['link_category'] = $link_cats; return wp_insert_link($linkdata); } @@ -402,7 +402,7 @@ function wp_delete_link($link_id) { global $wpdb; do_action('delete_link', $link_id); - + $categories = wp_get_link_cats($link_id); if( is_array( $categories ) ) { foreach ( $categories as $category ) { @@ -418,9 +418,9 @@ function wp_delete_link($link_id) { function wp_get_link_cats($link_ID = 0) { global $wpdb; - $sql = "SELECT category_id - FROM $wpdb->link2cat - WHERE link_id = $link_ID + $sql = "SELECT category_id + FROM $wpdb->link2cat + WHERE link_id = $link_ID ORDER BY category_id"; $result = $wpdb->get_col($sql); @@ -441,8 +441,8 @@ function wp_set_link_cats($link_ID = 0, $link_categories = array()) { // First the old categories $old_categories = $wpdb->get_col(" - SELECT category_id - FROM $wpdb->link2cat + SELECT category_id + FROM $wpdb->link2cat WHERE link_id = $link_ID"); if (!$old_categories) { @@ -457,9 +457,9 @@ function wp_set_link_cats($link_ID = 0, $link_categories = array()) { if ($delete_cats) { foreach ($delete_cats as $del) { $wpdb->query(" - DELETE FROM $wpdb->link2cat - WHERE category_id = $del - AND link_id = $link_ID + DELETE FROM $wpdb->link2cat + WHERE category_id = $del + AND link_id = $link_ID "); } } @@ -470,11 +470,11 @@ function wp_set_link_cats($link_ID = 0, $link_categories = array()) { if ($add_cats) { foreach ($add_cats as $new_cat) { $wpdb->query(" - INSERT INTO $wpdb->link2cat (link_id, category_id) + INSERT INTO $wpdb->link2cat (link_id, category_id) VALUES ($link_ID, $new_cat)"); } } - + // Update category counts. $all_affected_cats = array_unique(array_merge($link_categories, $old_categories)); foreach ( $all_affected_cats as $cat_id ) { diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 426a51bf27..fdbcedbf38 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -1139,10 +1139,10 @@ function touch_time( $edit = 1, $for_post = 1 ) { ?> - @ - : - - + @ + : + + post_title = $popuptitle; - + $content = wp_specialchars($_REQUEST['content']); $popupurl = wp_specialchars($_REQUEST['popupurl']); - if ( !empty($content) ) { - $post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) ); - } else { - $post->post_content = ''.$popuptitle.''."\n$text"; - } +if ( !empty($content) ) { + $post->post_content = wp_specialchars( stripslashes($_REQUEST['content']) ); +} else { + $post->post_content = ''.$popuptitle.''."\n$text"; +} - /* /big funky fixes */ +/* /big funky fixes */ ?> @@ -77,15 +77,15 @@ $popupurl = wp_specialchars($_REQUEST['popupurl']); } #wpbookmarklet .wrap { - border: 0px; + border: 0px; } #wpbookmarklet #postdiv { - margin-bottom: 0.5em; + margin-bottom: 0.5em; } #wpbookmarklet #titlediv { - margin-bottom: 1em; + margin-bottom: 1em; } --> diff --git a/wp-admin/categories.php b/wp-admin/categories.php index 9504eefdda..bd4eae729f 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -48,10 +48,10 @@ break; case 'edit': - require_once ('admin-header.php'); - $cat_ID = (int) $_GET['cat_ID']; - $category = get_category_to_edit($cat_ID); - include('edit-category-form.php'); + require_once ('admin-header.php'); + $cat_ID = (int) $_GET['cat_ID']; + $category = get_category_to_edit($cat_ID); + include('edit-category-form.php'); break; diff --git a/wp-admin/custom-fields.js b/wp-admin/custom-fields.js index a48661fe79..ad7a2db166 100644 --- a/wp-admin/custom-fields.js +++ b/wp-admin/custom-fields.js @@ -14,10 +14,10 @@ function customFieldsAddIn() { for ( var i=0; i < inputs.length; i++ ) { if ('text' == inputs[i].type) { inputs[i].setAttribute('autocomplete', 'off'); - inputs[i].onkeypress = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.name.slice(5),10) + '");', e); }; + inputs[i].onkeypress = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.name.slice(5),10) + '");', e); }; } if ('updatemeta' == inputs[i].className) { - inputs[i].onclick = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.parentNode.parentNode.id.slice(5),10) + '");', e); }; + inputs[i].onclick = function(e) {return killSubmit('theList.ajaxUpdater("meta", "meta-' + parseInt(this.parentNode.parentNode.id.slice(5),10) + '");', e); }; } } diff --git a/wp-admin/dbx-admin-key-js.php b/wp-admin/dbx-admin-key-js.php index f47e53b90a..9746a8c510 100644 --- a/wp-admin/dbx-admin-key-js.php +++ b/wp-admin/dbx-admin-key-js.php @@ -9,7 +9,7 @@ switch ( $_GET['pagenow'] ) : break; case 'page.php' : case 'page-new.php' : - $man = 'pagemeta'; + $man = 'pagemeta'; break; case 'link.php' : $man = 'linkmeta'; diff --git a/wp-admin/edit-category-form.php b/wp-admin/edit-category-form.php index 2000bed15e..b029856f6c 100644 --- a/wp-admin/edit-category-form.php +++ b/wp-admin/edit-category-form.php @@ -22,8 +22,8 @@ if ( ! empty($cat_ID) ) {
- | + | + | |
---|---|---|---|
diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 7ff4c5c42c..488a055130 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -143,7 +143,7 @@ $start = " start='$offset'"; ++$i; $class = ''; $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); $comment_status = wp_get_comment_status($comment->comment_ID); - if ('unapproved' == $comment_status) + if ('unapproved' == $comment_status) $class .= ' unapproved'; if ($i % 2) $class .= ' alternate'; @@ -153,7 +153,7 @@ $start = " start='$offset'"; - |