These functions import $wpdb but do not use it.

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28539 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-05-22 17:36:42 +00:00
parent ce653e1925
commit 312ef7b264
8 changed files with 3 additions and 16 deletions

View File

@@ -103,8 +103,6 @@ function wp_ajax_fetch_list() {
* @since 3.1.0
*/
function wp_ajax_ajax_tag_search() {
global $wpdb;
if ( isset( $_GET['tax'] ) ) {
$taxonomy = sanitize_key( $_GET['tax'] );
$tax = get_taxonomy( $taxonomy );
@@ -894,7 +892,7 @@ function wp_ajax_get_comments( $action ) {
* @param string $action Action to perform.
*/
function wp_ajax_replyto_comment( $action ) {
global $wp_list_table, $wpdb;
global $wp_list_table;
if ( empty( $action ) )
$action = 'replyto-comment';

View File

@@ -761,8 +761,6 @@ function wp_dashboard_recent_posts( $args ) {
* @return bool False if no comments were found. True otherwise.
*/
function wp_dashboard_recent_comments( $total_items = 5 ) {
global $wpdb;
// Select all comment types and filter out spam later for better query performance.
$comments = array();

View File

@@ -623,8 +623,6 @@ function post_comment_meta_box_thead($result) {
* @param object $post
*/
function post_comment_meta_box( $post ) {
global $wpdb;
wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
?>
<p class="hide-if-no-js" id="add-new-comment"><a class="button" href="#commentstatusdiv" onclick="window.commentReply && commentReply.addcomment(<?php echo $post->ID; ?>);return false;"><?php _e('Add comment'); ?></a></p>

View File

@@ -518,8 +518,6 @@ function bulk_edit_posts( $post_data = null ) {
* @return WP_Post Post object containing all the default post data as attributes
*/
function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) {
global $wpdb;
$post_title = '';
if ( !empty( $_REQUEST['post_title'] ) )
$post_title = esc_html( wp_unslash( $_REQUEST['post_title'] ));
@@ -733,7 +731,6 @@ function write_post() {
* @return unknown
*/
function add_meta( $post_ID ) {
global $wpdb;
$post_ID = (int) $post_ID;
$metakeyselect = isset($_POST['metakeyselect']) ? wp_unslash( trim( $_POST['metakeyselect'] ) ) : '';