mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Unused var fixes. Props DD32. see #8220
git-svn-id: https://develop.svn.wordpress.org/trunk@9716 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -353,7 +353,6 @@ function wp_dashboard_quick_press() {
|
||||
}
|
||||
|
||||
function wp_dashboard_recent_drafts( $drafts = false ) {
|
||||
global $post;
|
||||
if ( !$drafts ) {
|
||||
$drafts_query = new WP_Query( array(
|
||||
'post_type' => 'post',
|
||||
|
||||
@@ -330,6 +330,9 @@ function wp_handle_sideload( &$file, $overrides = false ) {
|
||||
// You may define your own function and pass the name in $overrides['upload_error_handler']
|
||||
$upload_error_handler = 'wp_handle_upload_error';
|
||||
|
||||
// You may define your own function and pass the name in $overrides['unique_filename_callback']
|
||||
$unique_filename_callback = null;
|
||||
|
||||
// $_POST['action'] must be set and its value must equal $overrides['action'] or this:
|
||||
$action = 'wp_handle_sideload';
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ function media_handle_sideload($file_array, $post_id, $desc = null, $post_data =
|
||||
), $post_data );
|
||||
|
||||
// Save the data
|
||||
$id = wp_insert_attachment($attachment, $file, $post_parent);
|
||||
$id = wp_insert_attachment($attachment, $file, $post_id);
|
||||
if ( !is_wp_error($id) ) {
|
||||
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
|
||||
return $url;
|
||||
@@ -905,8 +905,6 @@ function get_attachment_fields_to_edit($post, $errors = null) {
|
||||
$post = (object) $post;
|
||||
|
||||
$edit_post = sanitize_post($post, 'edit');
|
||||
$file = wp_get_attachment_url($post->ID);
|
||||
$link = get_attachment_link($post->ID);
|
||||
|
||||
$form_fields = array(
|
||||
'post_title' => array(
|
||||
@@ -1019,10 +1017,6 @@ function get_media_item( $attachment_id, $args = null ) {
|
||||
else
|
||||
return false;
|
||||
|
||||
$title_label = __('Title');
|
||||
$description_label = __('Description');
|
||||
$tags_label = __('Tags');
|
||||
|
||||
$toggle_on = __('Show');
|
||||
$toggle_off = __('Hide');
|
||||
|
||||
@@ -1030,7 +1024,7 @@ function get_media_item( $attachment_id, $args = null ) {
|
||||
|
||||
$filename = basename($post->guid);
|
||||
$title = attribute_escape($post->post_title);
|
||||
$description = attribute_escape($post->post_content);
|
||||
|
||||
if ( $_tags = get_the_tags($attachment_id) ) {
|
||||
foreach ( $_tags as $tag )
|
||||
$tags[] = $tag->name;
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
* @return mixed
|
||||
*/
|
||||
function plugins_api($action, $args = null) {
|
||||
global $wp_version;
|
||||
|
||||
if( is_array($args) )
|
||||
$args = (object)$args;
|
||||
@@ -247,8 +246,6 @@ function install_updated($page = 1) {
|
||||
* @param int $totalpages Number of pages.
|
||||
*/
|
||||
function display_plugins_table($plugins, $page = 1, $totalpages = 1){
|
||||
global $tab;
|
||||
|
||||
$type = isset($_REQUEST['type']) ? stripslashes( $_REQUEST['type'] ) : '';
|
||||
$term = isset($_REQUEST['s']) ? stripslashes( $_REQUEST['s'] ) : '';
|
||||
|
||||
@@ -674,7 +671,7 @@ function do_plugin_install_local_package($package, $filename = '') {
|
||||
$install_actions = apply_filters('install_plugin_complete_actions', array(
|
||||
'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>',
|
||||
'plugins_page' => '<a href="' . admin_url('plugins.php') . '" title="' . __('Goto plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>'
|
||||
), $plugin_information, $plugin_file);
|
||||
), array(), $plugin_file);
|
||||
if ( ! empty($install_actions) )
|
||||
show_message('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$install_actions));
|
||||
}
|
||||
|
||||
@@ -769,7 +769,6 @@ function get_available_post_statuses($type = 'post') {
|
||||
* @return unknown
|
||||
*/
|
||||
function wp_edit_posts_query( $q = false ) {
|
||||
global $wpdb;
|
||||
if ( false === $q )
|
||||
$q = $_GET;
|
||||
$q['m'] = isset($q['m']) ? (int) $q['m'] : 0;
|
||||
@@ -832,7 +831,6 @@ function get_available_post_mime_types($type = 'attachment') {
|
||||
* @return unknown
|
||||
*/
|
||||
function wp_edit_attachments_query( $q = false ) {
|
||||
global $wpdb;
|
||||
if ( false === $q )
|
||||
$q = $_GET;
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ function inline_edit_term_row($type) {
|
||||
$columns = $is_tag ? get_column_headers('tag') : get_column_headers('category');
|
||||
$hidden = array_intersect( array_keys( $columns ), array_filter( (array) get_user_option( "manage-$type-columns-hidden" ) ) );
|
||||
$col_count = count($columns) - count($hidden);
|
||||
$output = ''; ?>
|
||||
?>
|
||||
|
||||
<form method="get" action=""><table style="display: none"><tbody id="inlineedit">
|
||||
<tr id="inline-edit" class="inline-edit-row" style="display: none"><td colspan="<?php echo $col_count; ?>">
|
||||
@@ -659,7 +659,6 @@ function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
|
||||
|
||||
// convert it to table rows
|
||||
$out = '';
|
||||
$class = '';
|
||||
$count = 0;
|
||||
foreach( $tags as $tag )
|
||||
$out .= _tag_row( $tag, ++$count % 2 ? ' class="iedit alternate"' : ' class="iedit"' );
|
||||
@@ -1879,7 +1878,6 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
|
||||
global $comment, $post;
|
||||
$comment = get_comment( $comment_id );
|
||||
$post = get_post($comment->comment_post_ID);
|
||||
$authordata = get_userdata($post->post_author);
|
||||
$the_comment_status = wp_get_comment_status($comment->comment_ID);
|
||||
|
||||
if ( current_user_can( 'edit_post', $post->ID ) ) {
|
||||
|
||||
Reference in New Issue
Block a user