Make WordPress Core


Ignore:
Timestamp:
05/29/2015 05:03:13 PM (9 years ago)
Author:
wonderboymusic
Message:

In the style of #30947 and default-filters.php, add 2 new files to wp-admin/includes:
admin-filters.php
ms-admin-filters.php

There are random actions and filters littered among files like misc.php. These files contain functions that won't work outside of admin context and are typically only loaded in files that have already loaded the admin bootstrap.

See #32529.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r32642 r32653  
    251251}
    252252
    253 add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );
    254 add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
    255 add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
    256 
    257253/**
    258254 * Shorten an URL, to be used as link text
     
    680676    echo '<script type="text/javascript">var _wpColorScheme = ' . wp_json_encode( array( 'icons' => $icon_colors ) ) . ";</script>\n";
    681677}
    682 add_action( 'admin_head', 'wp_color_scheme_settings' );
    683678
    684679function _ipad_meta() {
     
    689684    }
    690685}
    691 add_action('admin_head', '_ipad_meta');
    692686
    693687/**
     
    720714    return $response;
    721715}
    722 add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 3 );
    723716
    724717/**
     
    759752    return $response;
    760753}
    761 add_filter( 'heartbeat_received', 'wp_refresh_post_lock', 10, 3 );
    762754
    763755/**
     
    793785    return $response;
    794786}
    795 add_filter( 'heartbeat_received', 'wp_refresh_post_nonces', 10, 3 );
    796787
    797788/**
     
    814805    return $settings;
    815806}
    816 add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );
    817807
    818808/**
     
    839829    return $response;
    840830}
    841 // Run later as we have to set DOING_AUTOSAVE for back-compat
    842 add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 );
    843831
    844832/**
     
    859847    }
    860848}
    861 add_action( 'post_edit_form_tag', 'post_form_autocomplete_off' );
    862849
    863850/**
     
    904891<?php
    905892}
    906 add_action( 'admin_head', 'wp_admin_canonical_url' );
Note: See TracChangeset for help on using the changeset viewer.