mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@32653 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -250,10 +250,6 @@ function update_home_siteurl( $old_value, $value ) {
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
|
||||
add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );
|
||||
add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
|
||||
add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
|
||||
|
||||
/**
|
||||
* Shorten an URL, to be used as link text
|
||||
*
|
||||
@@ -679,7 +675,6 @@ function wp_color_scheme_settings() {
|
||||
|
||||
echo '<script type="text/javascript">var _wpColorScheme = ' . wp_json_encode( array( 'icons' => $icon_colors ) ) . ";</script>\n";
|
||||
}
|
||||
add_action( 'admin_head', 'wp_color_scheme_settings' );
|
||||
|
||||
function _ipad_meta() {
|
||||
if ( wp_is_mobile() ) {
|
||||
@@ -688,7 +683,6 @@ function _ipad_meta() {
|
||||
<?php
|
||||
}
|
||||
}
|
||||
add_action('admin_head', '_ipad_meta');
|
||||
|
||||
/**
|
||||
* Check lock status for posts displayed on the Posts screen
|
||||
@@ -719,7 +713,6 @@ function wp_check_locked_posts( $response, $data, $screen_id ) {
|
||||
|
||||
return $response;
|
||||
}
|
||||
add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 3 );
|
||||
|
||||
/**
|
||||
* Check lock status on the New/Edit Post screen and refresh the lock
|
||||
@@ -758,7 +751,6 @@ function wp_refresh_post_lock( $response, $data, $screen_id ) {
|
||||
|
||||
return $response;
|
||||
}
|
||||
add_filter( 'heartbeat_received', 'wp_refresh_post_lock', 10, 3 );
|
||||
|
||||
/**
|
||||
* Check nonce expiration on the New/Edit Post screen and refresh if needed
|
||||
@@ -792,7 +784,6 @@ function wp_refresh_post_nonces( $response, $data, $screen_id ) {
|
||||
|
||||
return $response;
|
||||
}
|
||||
add_filter( 'heartbeat_received', 'wp_refresh_post_nonces', 10, 3 );
|
||||
|
||||
/**
|
||||
* Disable suspension of Heartbeat on the Add/Edit Post screens.
|
||||
@@ -813,7 +804,6 @@ function wp_heartbeat_set_suspension( $settings ) {
|
||||
|
||||
return $settings;
|
||||
}
|
||||
add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );
|
||||
|
||||
/**
|
||||
* Autosave with heartbeat
|
||||
@@ -838,8 +828,6 @@ function heartbeat_autosave( $response, $data ) {
|
||||
|
||||
return $response;
|
||||
}
|
||||
// Run later as we have to set DOING_AUTOSAVE for back-compat
|
||||
add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 );
|
||||
|
||||
/**
|
||||
* Disables autocomplete on the 'post' form (Add/Edit Post screens) for WebKit browsers,
|
||||
@@ -858,7 +846,6 @@ function post_form_autocomplete_off() {
|
||||
echo ' autocomplete="off"';
|
||||
}
|
||||
}
|
||||
add_action( 'post_edit_form_tag', 'post_form_autocomplete_off' );
|
||||
|
||||
/**
|
||||
* Remove single-use URL parameters and create canonical link based on new URL.
|
||||
@@ -903,4 +890,3 @@ function wp_admin_canonical_url() {
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
add_action( 'admin_head', 'wp_admin_canonical_url' );
|
||||
|
||||
Reference in New Issue
Block a user