Remove unused variables. Props DD32. see #5418
git-svn-id: https://develop.svn.wordpress.org/trunk@6363 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e4d0687233
commit
029a74ca44
@ -228,7 +228,7 @@ Event.observe( window, 'load', hide_text );
|
|||||||
|
|
||||||
if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) {
|
if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) {
|
||||||
set_theme_mod('header_image', clean_url($url));
|
set_theme_mod('header_image', clean_url($url));
|
||||||
$header = apply_filters('wp_create_file_in_uploads', $file, $id); // For replication
|
apply_filters('wp_create_file_in_uploads', $file, $id); // For replication
|
||||||
return $this->finished();
|
return $this->finished();
|
||||||
} elseif ( $width > HEADER_IMAGE_WIDTH ) {
|
} elseif ( $width > HEADER_IMAGE_WIDTH ) {
|
||||||
$oitar = $width / HEADER_IMAGE_WIDTH;
|
$oitar = $width / HEADER_IMAGE_WIDTH;
|
||||||
|
@ -11,7 +11,7 @@ if ( ! empty($link_id) ) {
|
|||||||
$nonce_action = 'add-bookmark';
|
$nonce_action = 'add-bookmark';
|
||||||
}
|
}
|
||||||
|
|
||||||
function xfn_check($class, $value = '', $depreciated = null) {
|
function xfn_check($class, $value = '', $deprecated = '') {
|
||||||
global $link;
|
global $link;
|
||||||
|
|
||||||
$link_rel = $link->link_rel;
|
$link_rel = $link->link_rel;
|
||||||
|
@ -151,8 +151,6 @@ function wp_set_link_cats($link_id = 0, $link_categories = array()) {
|
|||||||
} // wp_set_link_cats()
|
} // wp_set_link_cats()
|
||||||
|
|
||||||
function wp_update_link($linkdata) {
|
function wp_update_link($linkdata) {
|
||||||
global $wpdb;
|
|
||||||
|
|
||||||
$link_id = (int) $linkdata['link_id'];
|
$link_id = (int) $linkdata['link_id'];
|
||||||
|
|
||||||
$link = get_link($link_id, ARRAY_A);
|
$link = get_link($link_id, ARRAY_A);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
* This function can handle most image file formats which PHP supports.
|
* This function can handle most image file formats which PHP supports.
|
||||||
* If PHP does not have the functionality to save in a file of the same format, the thumbnail will be created as a jpeg.
|
* If PHP does not have the functionality to save in a file of the same format, the thumbnail will be created as a jpeg.
|
||||||
*/
|
*/
|
||||||
function wp_create_thumbnail( $file, $max_side, $depreciated = '' ) {
|
function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
|
||||||
if ( ctype_digit( $file ) ) // Handle int as attachment ID
|
if ( ctype_digit( $file ) ) // Handle int as attachment ID
|
||||||
$file = get_attached_file( $file );
|
$file = get_attached_file( $file );
|
||||||
|
|
||||||
|
@ -254,8 +254,6 @@ function populate_roles() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function populate_roles_160() {
|
function populate_roles_160() {
|
||||||
global $wp_roles;
|
|
||||||
|
|
||||||
// Add roles
|
// Add roles
|
||||||
add_role('administrator', _c('Administrator|User role'));
|
add_role('administrator', _c('Administrator|User role'));
|
||||||
add_role('editor', _c('Editor|User role'));
|
add_role('editor', _c('Editor|User role'));
|
||||||
|
@ -40,8 +40,6 @@ function wp_create_categories($categories, $post_id = '') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wp_delete_category($cat_ID) {
|
function wp_delete_category($cat_ID) {
|
||||||
global $wpdb;
|
|
||||||
|
|
||||||
$cat_ID = (int) $cat_ID;
|
$cat_ID = (int) $cat_ID;
|
||||||
$default = get_option('default_category');
|
$default = get_option('default_category');
|
||||||
|
|
||||||
@ -53,8 +51,6 @@ function wp_delete_category($cat_ID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wp_insert_category($catarr, $wp_error = false) {
|
function wp_insert_category($catarr, $wp_error = false) {
|
||||||
global $wpdb;
|
|
||||||
|
|
||||||
extract($catarr, EXTR_SKIP);
|
extract($catarr, EXTR_SKIP);
|
||||||
|
|
||||||
if ( trim( $cat_name ) == '' )
|
if ( trim( $cat_name ) == '' )
|
||||||
@ -95,8 +91,6 @@ function wp_insert_category($catarr, $wp_error = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wp_update_category($catarr) {
|
function wp_update_category($catarr) {
|
||||||
global $wpdb;
|
|
||||||
|
|
||||||
$cat_ID = (int) $catarr['cat_ID'];
|
$cat_ID = (int) $catarr['cat_ID'];
|
||||||
|
|
||||||
if ( $cat_ID == $catarr['category_parent'] )
|
if ( $cat_ID == $catarr['category_parent'] )
|
||||||
@ -119,8 +113,6 @@ function wp_update_category($catarr) {
|
|||||||
//
|
//
|
||||||
|
|
||||||
function get_tags_to_edit( $post_id ) {
|
function get_tags_to_edit( $post_id ) {
|
||||||
global $wpdb;
|
|
||||||
|
|
||||||
$post_id = (int) $post_id;
|
$post_id = (int) $post_id;
|
||||||
if ( !$post_id )
|
if ( !$post_id )
|
||||||
return false;
|
return false;
|
||||||
|
@ -124,7 +124,7 @@ function sort_cats( $cat1, $cat2 ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_nested_categories( $default = 0, $parent = 0 ) {
|
function get_nested_categories( $default = 0, $parent = 0 ) {
|
||||||
global $post_ID, $wpdb, $checked_categories;
|
global $post_ID, $checked_categories;
|
||||||
|
|
||||||
if ( empty($checked_categories) ) {
|
if ( empty($checked_categories) ) {
|
||||||
if ( $post_ID ) {
|
if ( $post_ID ) {
|
||||||
@ -226,7 +226,7 @@ function wp_manage_posts_columns() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function page_rows( $parent = 0, $level = 0, $pages = 0, $hierarchy = true ) {
|
function page_rows( $parent = 0, $level = 0, $pages = 0, $hierarchy = true ) {
|
||||||
global $wpdb, $class, $post;
|
global $class, $post;
|
||||||
|
|
||||||
if (!$pages )
|
if (!$pages )
|
||||||
$pages = get_pages( 'sort_column=menu_order' );
|
$pages = get_pages( 'sort_column=menu_order' );
|
||||||
@ -257,7 +257,8 @@ function page_rows( $parent = 0, $level = 0, $pages = 0, $hierarchy = true ) {
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( $hierarchy ) page_rows( $id, $level + 1, $pages );
|
if ( $hierarchy )
|
||||||
|
page_rows( $id, $level + 1, $pages );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -322,7 +323,7 @@ function _wp_get_comment_list( $s = false, $start, $num ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _wp_comment_list_item( $id, $alt = 0 ) {
|
function _wp_comment_list_item( $id, $alt = 0 ) {
|
||||||
global $authordata, $comment, $wpdb;
|
global $authordata, $comment;
|
||||||
$comment =& get_comment( $id );
|
$comment =& get_comment( $id );
|
||||||
$id = (int) $comment->comment_ID;
|
$id = (int) $comment->comment_ID;
|
||||||
$class = '';
|
$class = '';
|
||||||
@ -367,7 +368,6 @@ if ( !is_single() ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
|
function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
|
||||||
global $wpdb;
|
|
||||||
if (!$categories )
|
if (!$categories )
|
||||||
$categories = get_categories( 'hide_empty=0' );
|
$categories = get_categories( 'hide_empty=0' );
|
||||||
|
|
||||||
@ -440,7 +440,6 @@ function _list_meta_row( $entry, &$count ) {
|
|||||||
$r .= "\n\t\t<td align='center'><input name='updatemeta' type='submit' tabindex='6' value='".attribute_escape(__( 'Update' ))."' class='add:the-list:meta-{$entry['meta_id']} updatemeta' /><br />";
|
$r .= "\n\t\t<td align='center'><input name='updatemeta' type='submit' tabindex='6' value='".attribute_escape(__( 'Update' ))."' class='add:the-list:meta-{$entry['meta_id']} updatemeta' /><br />";
|
||||||
$r .= "\n\t\t<input name='deletemeta[{$entry['meta_id']}]' type='submit' ";
|
$r .= "\n\t\t<input name='deletemeta[{$entry['meta_id']}]' type='submit' ";
|
||||||
$r .= "class='delete:the-list:meta-{$entry['meta_id']} deletemeta' tabindex='6' value='".attribute_escape(__( 'Delete' ))."' />";
|
$r .= "class='delete:the-list:meta-{$entry['meta_id']} deletemeta' tabindex='6' value='".attribute_escape(__( 'Delete' ))."' />";
|
||||||
$r .= "<input type='hidden' name='_ajax_nonce' value='$nonce' />";
|
|
||||||
$r .= "</td>\n\t</tr>";
|
$r .= "</td>\n\t</tr>";
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ require_once(ABSPATH . 'wp-admin/includes/admin.php');
|
|||||||
require_once(ABSPATH . 'wp-admin/includes/schema.php');
|
require_once(ABSPATH . 'wp-admin/includes/schema.php');
|
||||||
|
|
||||||
if ( !function_exists('wp_install') ) :
|
if ( !function_exists('wp_install') ) :
|
||||||
function wp_install($blog_title, $user_name, $user_email, $public, $meta='') {
|
function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') {
|
||||||
global $wp_rewrite;
|
global $wp_rewrite;
|
||||||
|
|
||||||
wp_check_mysql_version();
|
wp_check_mysql_version();
|
||||||
|
@ -78,7 +78,7 @@ function wp_upload_display( $dims = false, $href = '' ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wp_upload_view() {
|
function wp_upload_view() {
|
||||||
global $style, $style;
|
global $style;
|
||||||
$id = get_the_ID();
|
$id = get_the_ID();
|
||||||
$attachment_data = wp_get_attachment_metadata( $id );
|
$attachment_data = wp_get_attachment_metadata( $id );
|
||||||
?>
|
?>
|
||||||
|
@ -16,7 +16,7 @@ function maybe_create_table($table_name, $create_ddl) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//didn't find it try to create it.
|
//didn't find it try to create it.
|
||||||
$q = $wpdb->query($create_ddl);
|
$wpdb->query($create_ddl);
|
||||||
// we cannot directly tell that whether this succeeded!
|
// we cannot directly tell that whether this succeeded!
|
||||||
foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
|
foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
|
||||||
if ($table == $table_name) {
|
if ($table == $table_name) {
|
||||||
@ -41,7 +41,7 @@ function maybe_add_column($table_name, $column_name, $create_ddl) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//didn't find it try to create it.
|
//didn't find it try to create it.
|
||||||
$q = $wpdb->query($create_ddl);
|
$wpdb->query($create_ddl);
|
||||||
// we cannot directly tell that whether this succeeded!
|
// we cannot directly tell that whether this succeeded!
|
||||||
foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
|
foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
|
||||||
if ($column == $column_name) {
|
if ($column == $column_name) {
|
||||||
@ -63,7 +63,7 @@ function maybe_drop_column($table_name, $column_name, $drop_ddl) {
|
|||||||
foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
|
foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
|
||||||
if ($column == $column_name) {
|
if ($column == $column_name) {
|
||||||
//found it try to drop it.
|
//found it try to drop it.
|
||||||
$q = $wpdb->query($drop_ddl);
|
$wpdb->query($drop_ddl);
|
||||||
// we cannot directly tell that whether this succeeded!
|
// we cannot directly tell that whether this succeeded!
|
||||||
foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
|
foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
|
||||||
if ($column == $column_name) {
|
if ($column == $column_name) {
|
||||||
|
Loading…
Reference in New Issue
Block a user