author | ymh <ymh.work@gmail.com> |
Mon, 08 Sep 2025 19:44:41 +0200 | |
changeset 23 | 417f20492bf7 |
parent 22 | 8c2e4d02f4ef |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* WordPress Administration Bootstrap |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Administration |
|
7 |
*/ |
|
8 |
||
9 |
/** |
|
10 |
* In WordPress Administration Screens |
|
11 |
* |
|
12 |
* @since 2.3.2 |
|
13 |
*/ |
|
5 | 14 |
if ( ! defined( 'WP_ADMIN' ) ) { |
15 |
define( 'WP_ADMIN', true ); |
|
16 |
} |
|
0 | 17 |
|
9 | 18 |
if ( ! defined( 'WP_NETWORK_ADMIN' ) ) { |
19 |
define( 'WP_NETWORK_ADMIN', false ); |
|
20 |
} |
|
0 | 21 |
|
9 | 22 |
if ( ! defined( 'WP_USER_ADMIN' ) ) { |
23 |
define( 'WP_USER_ADMIN', false ); |
|
24 |
} |
|
0 | 25 |
|
26 |
if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) { |
|
9 | 27 |
define( 'WP_BLOG_ADMIN', true ); |
0 | 28 |
} |
29 |
||
9 | 30 |
if ( isset( $_GET['import'] ) && ! defined( 'WP_LOAD_IMPORTERS' ) ) { |
31 |
define( 'WP_LOAD_IMPORTERS', true ); |
|
32 |
} |
|
0 | 33 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
34 |
/** Load WordPress Bootstrap */ |
16 | 35 |
require_once dirname( __DIR__ ) . '/wp-load.php'; |
0 | 36 |
|
37 |
nocache_headers(); |
|
38 |
||
9 | 39 |
if ( get_option( 'db_upgraded' ) ) { |
16 | 40 |
|
0 | 41 |
flush_rewrite_rules(); |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
42 |
update_option( 'db_upgraded', false, true ); |
0 | 43 |
|
44 |
/** |
|
45 |
* Fires on the next page load after a successful DB upgrade. |
|
46 |
* |
|
47 |
* @since 2.8.0 |
|
48 |
*/ |
|
49 |
do_action( 'after_db_upgrade' ); |
|
16 | 50 |
|
51 |
} elseif ( ! wp_doing_ajax() && empty( $_POST ) |
|
52 |
&& (int) get_option( 'db_version' ) !== $wp_db_version |
|
53 |
) { |
|
54 |
||
9 | 55 |
if ( ! is_multisite() ) { |
0 | 56 |
wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ); |
57 |
exit; |
|
16 | 58 |
} |
0 | 59 |
|
16 | 60 |
/** |
61 |
* Filters whether to attempt to perform the multisite DB upgrade routine. |
|
62 |
* |
|
63 |
* In single site, the user would be redirected to wp-admin/upgrade.php. |
|
64 |
* In multisite, the DB upgrade routine is automatically fired, but only |
|
65 |
* when this filter returns true. |
|
66 |
* |
|
67 |
* If the network is 50 sites or less, it will run every time. Otherwise, |
|
68 |
* it will throttle itself to reduce load. |
|
69 |
* |
|
70 |
* @since MU (3.0.0) |
|
71 |
* |
|
72 |
* @param bool $do_mu_upgrade Whether to perform the Multisite upgrade routine. Default true. |
|
73 |
*/ |
|
74 |
if ( apply_filters( 'do_mu_upgrade', true ) ) { |
|
0 | 75 |
$c = get_blog_count(); |
5 | 76 |
|
77 |
/* |
|
78 |
* If there are 50 or fewer sites, run every time. Otherwise, throttle to reduce load: |
|
79 |
* attempt to do no more than threshold value, with some +/- allowed. |
|
80 |
*/ |
|
16 | 81 |
if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int) ( $c / 50 ) ) === 1 ) ) { |
82 |
require_once ABSPATH . WPINC . '/http.php'; |
|
9 | 83 |
$response = wp_remote_get( |
84 |
admin_url( 'upgrade.php?step=1' ), |
|
85 |
array( |
|
86 |
'timeout' => 120, |
|
87 |
'httpversion' => '1.1', |
|
88 |
) |
|
89 |
); |
|
5 | 90 |
/** This action is documented in wp-admin/network/upgrade.php */ |
0 | 91 |
do_action( 'after_mu_upgrade', $response ); |
9 | 92 |
unset( $response ); |
0 | 93 |
} |
9 | 94 |
unset( $c ); |
0 | 95 |
} |
96 |
} |
|
97 |
||
16 | 98 |
require_once ABSPATH . 'wp-admin/includes/admin.php'; |
0 | 99 |
|
100 |
auth_redirect(); |
|
101 |
||
16 | 102 |
// Schedule Trash collection. |
9 | 103 |
if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() ) { |
104 |
wp_schedule_event( time(), 'daily', 'wp_scheduled_delete' ); |
|
105 |
} |
|
0 | 106 |
|
16 | 107 |
// Schedule transient cleanup. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
108 |
if ( ! wp_next_scheduled( 'delete_expired_transients' ) && ! wp_installing() ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
109 |
wp_schedule_event( time(), 'daily', 'delete_expired_transients' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
110 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
111 |
|
0 | 112 |
set_screen_options(); |
113 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
114 |
$date_format = __( 'F j, Y' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
115 |
$time_format = __( 'g:i a' ); |
0 | 116 |
|
117 |
wp_enqueue_script( 'common' ); |
|
118 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
119 |
/** |
19 | 120 |
* $pagenow is set in vars.php. |
121 |
* $wp_importers is sometimes set in wp-admin/includes/import.php. |
|
122 |
* The remaining variables are imported as globals elsewhere, declared as globals here. |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
123 |
* |
19 | 124 |
* @global string $pagenow The filename of the current screen. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
125 |
* @global array $wp_importers |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
126 |
* @global string $hook_suffix |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
127 |
* @global string $plugin_page |
19 | 128 |
* @global string $typenow The post type of the current screen. |
129 |
* @global string $taxnow The taxonomy of the current screen. |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
130 |
*/ |
5 | 131 |
global $pagenow, $wp_importers, $hook_suffix, $plugin_page, $typenow, $taxnow; |
132 |
||
133 |
$page_hook = null; |
|
134 |
||
0 | 135 |
$editing = false; |
136 |
||
9 | 137 |
if ( isset( $_GET['page'] ) ) { |
0 | 138 |
$plugin_page = wp_unslash( $_GET['page'] ); |
9 | 139 |
$plugin_page = plugin_basename( $plugin_page ); |
140 |
} |
|
141 |
||
142 |
if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) ) { |
|
143 |
$typenow = $_REQUEST['post_type']; |
|
144 |
} else { |
|
145 |
$typenow = ''; |
|
0 | 146 |
} |
147 |
||
9 | 148 |
if ( isset( $_REQUEST['taxonomy'] ) && taxonomy_exists( $_REQUEST['taxonomy'] ) ) { |
0 | 149 |
$taxnow = $_REQUEST['taxonomy']; |
9 | 150 |
} else { |
0 | 151 |
$taxnow = ''; |
9 | 152 |
} |
0 | 153 |
|
9 | 154 |
if ( WP_NETWORK_ADMIN ) { |
16 | 155 |
require ABSPATH . 'wp-admin/network/menu.php'; |
9 | 156 |
} elseif ( WP_USER_ADMIN ) { |
16 | 157 |
require ABSPATH . 'wp-admin/user/menu.php'; |
9 | 158 |
} else { |
16 | 159 |
require ABSPATH . 'wp-admin/menu.php'; |
9 | 160 |
} |
0 | 161 |
|
162 |
if ( current_user_can( 'manage_options' ) ) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
163 |
wp_raise_memory_limit( 'admin' ); |
0 | 164 |
} |
165 |
||
166 |
/** |
|
167 |
* Fires as an admin screen or script is being initialized. |
|
168 |
* |
|
169 |
* Note, this does not just run on user-facing admin screens. |
|
170 |
* It runs on admin-ajax.php and admin-post.php as well. |
|
171 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
172 |
* This is roughly analogous to the more general {@see 'init'} hook, which fires earlier. |
0 | 173 |
* |
174 |
* @since 2.5.0 |
|
175 |
*/ |
|
176 |
do_action( 'admin_init' ); |
|
177 |
||
9 | 178 |
if ( isset( $plugin_page ) ) { |
179 |
if ( ! empty( $typenow ) ) { |
|
0 | 180 |
$the_parent = $pagenow . '?post_type=' . $typenow; |
9 | 181 |
} else { |
0 | 182 |
$the_parent = $pagenow; |
9 | 183 |
} |
184 |
||
185 |
$page_hook = get_plugin_page_hook( $plugin_page, $the_parent ); |
|
186 |
if ( ! $page_hook ) { |
|
187 |
$page_hook = get_plugin_page_hook( $plugin_page, $plugin_page ); |
|
5 | 188 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
189 |
// Back-compat for plugins using add_management_page(). |
16 | 190 |
if ( empty( $page_hook ) && 'edit.php' === $pagenow && get_plugin_page_hook( $plugin_page, 'tools.php' ) ) { |
191 |
// There could be plugin specific params on the URL, so we need the whole query string. |
|
9 | 192 |
if ( ! empty( $_SERVER['QUERY_STRING'] ) ) { |
193 |
$query_string = $_SERVER['QUERY_STRING']; |
|
194 |
} else { |
|
0 | 195 |
$query_string = 'page=' . $plugin_page; |
9 | 196 |
} |
197 |
wp_redirect( admin_url( 'tools.php?' . $query_string ) ); |
|
0 | 198 |
exit; |
199 |
} |
|
200 |
} |
|
9 | 201 |
unset( $the_parent ); |
0 | 202 |
} |
203 |
||
204 |
$hook_suffix = ''; |
|
5 | 205 |
if ( isset( $page_hook ) ) { |
0 | 206 |
$hook_suffix = $page_hook; |
5 | 207 |
} elseif ( isset( $plugin_page ) ) { |
0 | 208 |
$hook_suffix = $plugin_page; |
5 | 209 |
} elseif ( isset( $pagenow ) ) { |
0 | 210 |
$hook_suffix = $pagenow; |
5 | 211 |
} |
0 | 212 |
|
213 |
set_current_screen(); |
|
214 |
||
215 |
// Handle plugin admin pages. |
|
9 | 216 |
if ( isset( $plugin_page ) ) { |
0 | 217 |
if ( $page_hook ) { |
218 |
/** |
|
219 |
* Fires before a particular screen is loaded. |
|
220 |
* |
|
221 |
* The load-* hook fires in a number of contexts. This hook is for plugin screens |
|
222 |
* where a callback is provided when the screen is registered. |
|
223 |
* |
|
5 | 224 |
* The dynamic portion of the hook name, `$page_hook`, refers to a mixture of plugin |
0 | 225 |
* page information including: |
226 |
* 1. The page type. If the plugin page is registered as a submenu page, such as for |
|
227 |
* Settings, the page type would be 'settings'. Otherwise the type is 'toplevel'. |
|
228 |
* 2. A separator of '_page_'. |
|
229 |
* 3. The plugin basename minus the file extension. |
|
230 |
* |
|
5 | 231 |
* Together, the three parts form the `$page_hook`. Citing the example above, |
0 | 232 |
* the hook name used would be 'load-settings_page_pluginbasename'. |
233 |
* |
|
234 |
* @see get_plugin_page_hook() |
|
235 |
* |
|
236 |
* @since 2.1.0 |
|
237 |
*/ |
|
16 | 238 |
do_action( "load-{$page_hook}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
9 | 239 |
if ( ! isset( $_GET['noheader'] ) ) { |
16 | 240 |
require_once ABSPATH . 'wp-admin/admin-header.php'; |
9 | 241 |
} |
0 | 242 |
|
243 |
/** |
|
244 |
* Used to call the registered callback for a plugin screen. |
|
245 |
* |
|
9 | 246 |
* This hook uses a dynamic hook name, `$page_hook`, which refers to a mixture of plugin |
247 |
* page information including: |
|
248 |
* 1. The page type. If the plugin page is registered as a submenu page, such as for |
|
249 |
* Settings, the page type would be 'settings'. Otherwise the type is 'toplevel'. |
|
250 |
* 2. A separator of '_page_'. |
|
251 |
* 3. The plugin basename minus the file extension. |
|
252 |
* |
|
253 |
* Together, the three parts form the `$page_hook`. Citing the example above, |
|
254 |
* the hook name used would be 'settings_page_pluginbasename'. |
|
255 |
* |
|
256 |
* @see get_plugin_page_hook() |
|
257 |
* |
|
0 | 258 |
* @since 1.5.0 |
259 |
*/ |
|
260 |
do_action( $page_hook ); |
|
261 |
} else { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
262 |
if ( validate_file( $plugin_page ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
263 |
wp_die( __( 'Invalid plugin page.' ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
264 |
} |
0 | 265 |
|
16 | 266 |
if ( ! ( file_exists( WP_PLUGIN_DIR . "/$plugin_page" ) && is_file( WP_PLUGIN_DIR . "/$plugin_page" ) ) |
267 |
&& ! ( file_exists( WPMU_PLUGIN_DIR . "/$plugin_page" ) && is_file( WPMU_PLUGIN_DIR . "/$plugin_page" ) ) |
|
268 |
) { |
|
269 |
/* translators: %s: Admin page generated by a plugin. */ |
|
9 | 270 |
wp_die( sprintf( __( 'Cannot load %s.' ), htmlentities( $plugin_page ) ) ); |
271 |
} |
|
0 | 272 |
|
273 |
/** |
|
274 |
* Fires before a particular screen is loaded. |
|
275 |
* |
|
276 |
* The load-* hook fires in a number of contexts. This hook is for plugin screens |
|
277 |
* where the file to load is directly included, rather than the use of a function. |
|
278 |
* |
|
5 | 279 |
* The dynamic portion of the hook name, `$plugin_page`, refers to the plugin basename. |
0 | 280 |
* |
281 |
* @see plugin_basename() |
|
282 |
* |
|
283 |
* @since 1.5.0 |
|
284 |
*/ |
|
16 | 285 |
do_action( "load-{$plugin_page}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
0 | 286 |
|
9 | 287 |
if ( ! isset( $_GET['noheader'] ) ) { |
16 | 288 |
require_once ABSPATH . 'wp-admin/admin-header.php'; |
9 | 289 |
} |
0 | 290 |
|
9 | 291 |
if ( file_exists( WPMU_PLUGIN_DIR . "/$plugin_page" ) ) { |
16 | 292 |
include WPMU_PLUGIN_DIR . "/$plugin_page"; |
9 | 293 |
} else { |
16 | 294 |
include WP_PLUGIN_DIR . "/$plugin_page"; |
9 | 295 |
} |
0 | 296 |
} |
297 |
||
16 | 298 |
require_once ABSPATH . 'wp-admin/admin-footer.php'; |
0 | 299 |
|
16 | 300 |
exit; |
5 | 301 |
} elseif ( isset( $_GET['import'] ) ) { |
0 | 302 |
|
303 |
$importer = $_GET['import']; |
|
304 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
305 |
if ( ! current_user_can( 'import' ) ) { |
16 | 306 |
wp_die( __( 'Sorry, you are not allowed to import content into this site.' ) ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
307 |
} |
0 | 308 |
|
9 | 309 |
if ( validate_file( $importer ) ) { |
0 | 310 |
wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); |
311 |
exit; |
|
312 |
} |
|
313 |
||
9 | 314 |
if ( ! isset( $wp_importers[ $importer ] ) || ! is_callable( $wp_importers[ $importer ][2] ) ) { |
0 | 315 |
wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); |
316 |
exit; |
|
317 |
} |
|
318 |
||
319 |
/** |
|
320 |
* Fires before an importer screen is loaded. |
|
321 |
* |
|
5 | 322 |
* The dynamic portion of the hook name, `$importer`, refers to the importer slug. |
0 | 323 |
* |
19 | 324 |
* Possible hook names include: |
325 |
* |
|
326 |
* - `load-importer-blogger` |
|
327 |
* - `load-importer-wpcat2tag` |
|
328 |
* - `load-importer-livejournal` |
|
329 |
* - `load-importer-mt` |
|
330 |
* - `load-importer-rss` |
|
331 |
* - `load-importer-tumblr` |
|
332 |
* - `load-importer-wordpress` |
|
333 |
* |
|
0 | 334 |
* @since 3.5.0 |
335 |
*/ |
|
16 | 336 |
do_action( "load-importer-{$importer}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
0 | 337 |
|
19 | 338 |
// Used in the HTML title tag. |
339 |
$title = __( 'Import' ); |
|
9 | 340 |
$parent_file = 'tools.php'; |
0 | 341 |
$submenu_file = 'import.php'; |
342 |
||
9 | 343 |
if ( ! isset( $_GET['noheader'] ) ) { |
16 | 344 |
require_once ABSPATH . 'wp-admin/admin-header.php'; |
9 | 345 |
} |
0 | 346 |
|
16 | 347 |
require_once ABSPATH . 'wp-admin/includes/upgrade.php'; |
0 | 348 |
|
9 | 349 |
define( 'WP_IMPORTING', true ); |
0 | 350 |
|
351 |
/** |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
352 |
* Filters whether to filter imported data through kses on import. |
0 | 353 |
* |
354 |
* Multisite uses this hook to filter all data through kses by default, |
|
355 |
* as a super administrator may be assisting an untrusted user. |
|
356 |
* |
|
357 |
* @since 3.1.0 |
|
358 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
359 |
* @param bool $force Whether to force data to be filtered through kses. Default false. |
0 | 360 |
*/ |
5 | 361 |
if ( apply_filters( 'force_filtered_html_on_import', false ) ) { |
0 | 362 |
kses_init_filters(); // Always filter imported data with kses on multisite. |
5 | 363 |
} |
0 | 364 |
|
9 | 365 |
call_user_func( $wp_importers[ $importer ][2] ); |
0 | 366 |
|
16 | 367 |
require_once ABSPATH . 'wp-admin/admin-footer.php'; |
0 | 368 |
|
16 | 369 |
// Make sure rules are flushed. |
9 | 370 |
flush_rewrite_rules( false ); |
0 | 371 |
|
16 | 372 |
exit; |
0 | 373 |
} else { |
374 |
/** |
|
375 |
* Fires before a particular screen is loaded. |
|
376 |
* |
|
377 |
* The load-* hook fires in a number of contexts. This hook is for core screens. |
|
378 |
* |
|
5 | 379 |
* The dynamic portion of the hook name, `$pagenow`, is a global variable |
19 | 380 |
* referring to the filename of the current screen, such as 'admin.php', |
5 | 381 |
* 'post-new.php' etc. A complete hook for the latter would be |
382 |
* 'load-post-new.php'. |
|
0 | 383 |
* |
384 |
* @since 2.1.0 |
|
385 |
*/ |
|
16 | 386 |
do_action( "load-{$pagenow}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
5 | 387 |
|
388 |
/* |
|
389 |
* The following hooks are fired to ensure backward compatibility. |
|
390 |
* In all other cases, 'load-' . $pagenow should be used instead. |
|
391 |
*/ |
|
16 | 392 |
if ( 'page' === $typenow ) { |
393 |
if ( 'post-new.php' === $pagenow ) { |
|
394 |
do_action( 'load-page-new.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
|
395 |
} elseif ( 'post.php' === $pagenow ) { |
|
396 |
do_action( 'load-page.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
|
9 | 397 |
} |
16 | 398 |
} elseif ( 'edit-tags.php' === $pagenow ) { |
399 |
if ( 'category' === $taxnow ) { |
|
400 |
do_action( 'load-categories.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
|
401 |
} elseif ( 'link_category' === $taxnow ) { |
|
402 |
do_action( 'load-edit-link-categories.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
|
9 | 403 |
} |
404 |
} elseif ( 'term.php' === $pagenow ) { |
|
16 | 405 |
do_action( 'load-edit-tags.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
0 | 406 |
} |
407 |
} |
|
408 |
||
409 |
if ( ! empty( $_REQUEST['action'] ) ) { |
|
9 | 410 |
$action = $_REQUEST['action']; |
411 |
||
0 | 412 |
/** |
413 |
* Fires when an 'action' request variable is sent. |
|
414 |
* |
|
9 | 415 |
* The dynamic portion of the hook name, `$action`, refers to |
416 |
* the action derived from the `GET` or `POST` request. |
|
0 | 417 |
* |
418 |
* @since 2.6.0 |
|
419 |
*/ |
|
9 | 420 |
do_action( "admin_action_{$action}" ); |
0 | 421 |
} |