Ticket #8220: unused.diff
| File unused.diff, 15.0 KB (added by DD32, 4 years ago) |
|---|
-
wp-admin/edit-form-advanced.php
166 166 } elseif ( is_sticky( $post->ID ) ) { 167 167 $visibility = 'public'; 168 168 $visibility_trans = __('Public, Sticky'); 169 $sticky = 'sticky';170 169 } else { 171 170 $visibility = 'public'; 172 171 $visibility_trans = __('Public'); -
wp-admin/edit-link-form.php
87 87 <div id="delete-action"> 88 88 <?php 89 89 if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') ) { ?> 90 <a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id); ?>" onclick="if ( confirm('<?php echo js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") :__("You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete."), $link->link_name )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a>90 <a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id); ?>" onclick="if ( confirm('<?php echo js_escape(sprintf(__("You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete."), $link->link_name )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a> 91 91 <?php } ?> 92 92 </div> 93 93 -
wp-admin/import/blogger.php
522 522 } 523 523 524 524 function import_post( $entry ) { 525 global $ wpdb, $importing_blog;525 global $importing_blog; 526 526 527 527 // The old permalink is all Blogger gives us to link comments to their posts. 528 528 if ( isset( $entry->draft ) ) … … 659 659 } 660 660 661 661 function get_user_options($current) { 662 global $ wpdb, $importer_users;662 global $importer_users; 663 663 if ( ! isset( $importer_users ) ) 664 664 $importer_users = (array) get_users_of_blog(); 665 665 -
wp-admin/import/mt.php
55 55 } 56 56 57 57 function users_form($n) { 58 global $wpdb , $testing;58 global $wpdb; 59 59 $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY ID"); 60 60 ?><select name="userselect[<?php echo $n; ?>]"> 61 61 <option value="#NONE#"><?php _e('- Select -') ?></option> … … 101 101 102 102 //function to check the authorname and do the mapping 103 103 function checkauthor($author) { 104 global $wpdb;105 104 //mtnames is an array with the names in the mt import file 106 105 $pass = wp_generate_password(); 107 106 if (!(in_array($author, $this->mtnames))) { //a new mt author name is found … … 109 108 $this->mtnames[$this->j] = $author; //add that new mt author name to an array 110 109 $user_id = username_exists($this->newauthornames[$this->j]); //check if the new author name defined by the user is a pre-existing wp user 111 110 if (!$user_id) { //banging my head against the desk now. 112 if ($ newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname111 if ($this->newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname 113 112 $user_id = wp_create_user($author, $pass); 114 113 $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank. 115 114 } else { -
wp-admin/includes/dashboard.php
353 353 } 354 354 355 355 function wp_dashboard_recent_drafts( $drafts = false ) { 356 global $post;357 356 if ( !$drafts ) { 358 357 $drafts_query = new WP_Query( array( 359 358 'post_type' => 'post', -
wp-admin/includes/file.php
330 330 // You may define your own function and pass the name in $overrides['upload_error_handler'] 331 331 $upload_error_handler = 'wp_handle_upload_error'; 332 332 333 // You may define your own function and pass the name in $overrides['unique_filename_callback'] 334 $unique_filename_callback = null; 335 333 336 // $_POST['action'] must be set and its value must equal $overrides['action'] or this: 334 337 $action = 'wp_handle_sideload'; 335 338 -
wp-admin/includes/media.php
262 262 ), $post_data ); 263 263 264 264 // Save the data 265 $id = wp_insert_attachment($attachment, $file, $post_ parent);265 $id = wp_insert_attachment($attachment, $file, $post_id); 266 266 if ( !is_wp_error($id) ) { 267 267 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); 268 268 return $url; … … 905 905 $post = (object) $post; 906 906 907 907 $edit_post = sanitize_post($post, 'edit'); 908 $file = wp_get_attachment_url($post->ID);909 $link = get_attachment_link($post->ID);910 908 911 909 $form_fields = array( 912 910 'post_title' => array( … … 1019 1017 else 1020 1018 return false; 1021 1019 1022 $title_label = __('Title');1023 $description_label = __('Description');1024 $tags_label = __('Tags');1025 1026 1020 $toggle_on = __('Show'); 1027 1021 $toggle_off = __('Hide'); 1028 1022 … … 1030 1024 1031 1025 $filename = basename($post->guid); 1032 1026 $title = attribute_escape($post->post_title); 1033 $description = attribute_escape($post->post_content); 1027 1034 1028 if ( $_tags = get_the_tags($attachment_id) ) { 1035 1029 foreach ( $_tags as $tag ) 1036 1030 $tags[] = $tag->name; -
wp-admin/includes/plugin-install.php
27 27 * @return mixed 28 28 */ 29 29 function plugins_api($action, $args = null) { 30 global $wp_version;31 30 32 31 if( is_array($args) ) 33 32 $args = (object)$args; … … 247 246 * @param int $totalpages Number of pages. 248 247 */ 249 248 function display_plugins_table($plugins, $page = 1, $totalpages = 1){ 250 global $tab;251 252 249 $type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : ''; 253 250 $term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : ''; 254 251 … … 674 671 $install_actions = apply_filters('install_plugin_complete_actions', array( 675 672 'activate_plugin' => '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" target="_parent">' . __('Activate Plugin') . '</a>', 676 673 'plugins_page' => '<a href="' . admin_url('plugins.php') . '" title="' . __('Goto plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>' 677 ), $plugin_information, $plugin_file);674 ), array(), $plugin_file); 678 675 if ( ! empty($install_actions) ) 679 676 show_message('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$install_actions)); 680 677 } -
wp-admin/includes/post.php
769 769 * @return unknown 770 770 */ 771 771 function wp_edit_posts_query( $q = false ) { 772 global $wpdb;773 772 if ( false === $q ) 774 773 $q = $_GET; 775 774 $q['m'] = isset($q['m']) ? (int) $q['m'] : 0; … … 832 831 * @return unknown 833 832 */ 834 833 function wp_edit_attachments_query( $q = false ) { 835 global $wpdb;836 834 if ( false === $q ) 837 835 $q = $_GET; 838 836 -
wp-admin/includes/template.php
207 207 $columns = $is_tag ? get_column_headers('tag') : get_column_headers('category'); 208 208 $hidden = array_intersect( array_keys( $columns ), array_filter( (array) get_user_option( "manage-$type-columns-hidden" ) ) ); 209 209 $col_count = count($columns) - count($hidden); 210 $output = '';?>210 ?> 211 211 212 212 <form method="get" action=""><table style="display: none"><tbody id="inlineedit"> 213 213 <tr id="inline-edit" class="inline-edit-row" style="display: none"><td colspan="<?php echo $col_count; ?>"> … … 659 659 660 660 // convert it to table rows 661 661 $out = ''; 662 $class = '';663 662 $count = 0; 664 663 foreach( $tags as $tag ) 665 664 $out .= _tag_row( $tag, ++$count % 2 ? ' class="iedit alternate"' : ' class="iedit"' ); … … 1878 1877 global $comment, $post; 1879 1878 $comment = get_comment( $comment_id ); 1880 1879 $post = get_post($comment->comment_post_ID); 1881 $authordata = get_userdata($post->post_author);1882 1880 $the_comment_status = wp_get_comment_status($comment->comment_ID); 1883 1881 1884 1882 if ( current_user_can( 'edit_post', $post->ID ) ) { -
wp-admin/page.php
22 22 * @param int $page_ID Page ID. 23 23 */ 24 24 function redirect_page($page_ID) { 25 global $action; 26 25 27 $referredby = ''; 26 28 if ( !empty($_POST['referredby']) ) { 27 29 $referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']); -
wp-includes/bookmark.php
29 29 wp_cache_add($bookmark->link_id, $bookmark, 'bookmark'); 30 30 $_bookmark = $bookmark; 31 31 } else { 32 if ( isset($GLOBALS['link']) && ($GLOBALS['link']->link_id == $ link) ) {32 if ( isset($GLOBALS['link']) && ($GLOBALS['link']->link_id == $bookmark) ) { 33 33 $_bookmark = & $GLOBALS['link']; 34 34 } elseif ( ! $_bookmark = wp_cache_get($bookmark, 'bookmark') ) { 35 35 $_bookmark = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->links WHERE link_id = %d LIMIT 1", $bookmark)); -
wp-includes/cron.php
158 158 * @return null Cron could not be spawned, because it is not needed to run. 159 159 */ 160 160 function spawn_cron( $local_time ) { 161 global $current_blog;162 161 163 162 /* 164 163 * do not even start the cron if local server timer has drifted -
wp-includes/http.php
411 411 $length = hexdec( $match[1] ); 412 412 $chunkLength = strlen( $match[0] ); 413 413 414 $strBody = substr($body, strlen( $match[0] ), $length);414 $strBody = substr($body, $chunkLength, $length); 415 415 $parsedBody .= $strBody; 416 416 417 417 $body = ltrim(str_replace(array($match[0], $strBody), '', $body), "\n"); -
wp-includes/pluggable.php
1512 1512 $default = $avatar_default; 1513 1513 } 1514 1514 1515 if ( 'custom' == $default ) 1516 $default = add_query_arg( 's', $size, $defaults[$avatar_default][1] ); 1517 elseif ( 'mystery' == $default ) 1515 if ( 'mystery' == $default ) 1518 1516 $default = "http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s={$size}"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com') 1519 1517 elseif ( 'blank' == $default ) 1520 1518 $default = includes_url('images/blank.gif'); … … 1524 1522 $default = "http://www.gravatar.com/avatar/s={$size}"; 1525 1523 elseif ( empty($email) ) 1526 1524 $default = "http://www.gravatar.com/avatar/?d=$default&s={$size}"; 1525 else 1526 $default = add_query_arg( 's', $size, $default ); 1527 1527 1528 1528 if ( !empty($email) ) { 1529 1529 $out = 'http://www.gravatar.com/avatar/'; -
wp-includes/plugin.php
123 123 * @subpackage Plugin 124 124 * @since 0.71 125 125 * @global array $wp_filter Stores all of the filters 126 * @global array $merge _filters Merges the filter hooks using this function.126 * @global array $merged_filters Merges the filter hooks using this function. 127 127 * @global array $wp_current_filter stores the list of current filters with the current one last 128 128 * 129 129 * @param string $tag The name of the filter hook. … … 219 219 * @return bool True when finished. 220 220 */ 221 221 function remove_all_filters($tag, $priority = false) { 222 global $wp_filter, $merge _filters;222 global $wp_filter, $merged_filters; 223 223 224 224 if( isset($wp_filter[$tag]) ) { 225 225 if( false !== $priority && isset($$wp_filter[$tag][$priority]) ) -
wp-includes/post.php
2160 2160 $pages = $wpdb->get_results($query); 2161 2161 2162 2162 if ( empty($pages) ) { 2163 $page = apply_filters('get_pages', array(), $r);2163 $pages = apply_filters('get_pages', array(), $r); 2164 2164 return $pages; 2165 2165 } 2166 2166 … … 3321 3321 * @return object|bool The autosaved data or false on failure or when no autosave exists. 3322 3322 */ 3323 3323 function wp_get_post_autosave( $post_id ) { 3324 global $wpdb; 3324 3325 3325 if ( !$post = get_post( $post_id ) ) 3326 3326 return false; 3327 3327 -
wp-includes/theme.php
186 186 if ( preg_match( '|Author URI:(.*)$|mi', $theme_data, $author_uri ) ) 187 187 $author_uri = clean_url( trim( $author_uri[1]) ); 188 188 else 189 $author_u ti = '';189 $author_uri = ''; 190 190 191 191 if ( preg_match( '|Template:(.*)$|mi', $theme_data, $template ) ) 192 192 $template = wp_kses( trim( $template[1] ), $themes_allowed_tags ); -
wp-includes/user.php
259 259 $meta_value = trim( $meta_value ); 260 260 261 261 if ( ! empty($meta_value) ) 262 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s AND meta_value = %s", $user id, $meta_key, $meta_value) );262 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s AND meta_value = %s", $user_id, $meta_key, $meta_value) ); 263 263 else 264 264 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); 265 265
