wp_ajax_inline_save_tax()
- Since
- 3.1.0
- Source
wp-admin/includes/ajax-actions.php:2185
Compatibility
- WordPress
- since 3.1.0
- PHP
- 7.4–8.6-dev
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0), and compiles on PHP 7.4 through 8.6-dev.
Performance profile
How much work a call to wp_ajax_inline_save_tax() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.
- Cost class
- Heavy
- Scaling
- Scales with input
- Instructions
- 77–112
- Plugin surface
- None
- Called by
- 0
Reaches the database via get_term().
The body loops, so the work grows with how much data it finds.
Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 138.
Nothing here hands control to plugin code.
Nothing in core calls this; the cost is only what you spend yourself.
What it touches
- querycontent query
get_term()called directly - hookthird-party callbacks
do_action()one call below wp_ajax_inline_save_tax()
Further down the call graph this can also reach option, cache, serialize and transient. Those are the worst case, several calls deep and usually down an error path, not what a normal call pays.
What one call costs · 78 distinct outcomes
One number would be a lie: the work depends on which branch runs. These are every distinct cost wp_ajax_inline_save_tax() can have, taken from its control-flow graph on PHP 8.5.
| When | Instructions | Calls it makes |
|---|---|---|
current_user_can() && !is_wp_error() && !$parent | 77–81 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && !is_wp_error() && !$parent | 78 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 80–84 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !is_wp_error() && !$parent | 80–84 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !is_wp_error() && !$parent | 80–84 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 81 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && !is_wp_error() && !$parent | 81 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !$parent | 81–85 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && !$parent | 82 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !is_wp_error() && !$parent | 83–87 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->single_row(), wp_die() |
!current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 83–87 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 83–87 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
66 further outcomes, up to 112 instructions
!current_user_can() && !is_wp_error() && !$parent | 83–87 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && !is_wp_error() && !$parent | 84 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 84 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 84–88 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !$parent | 84–88 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !$parent | 84–88 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 85 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && !$parent | 85 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 85–89 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !is_wp_error() && !$parent | 86–90 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->single_row(), wp_die() |
current_user_can() && !is_wp_error() && !$parent | 86–90 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->single_row(), wp_die() |
isset($value) && current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 86 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 86–90 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && !is_wp_error() && !$parent | 87 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->single_row(), wp_die() |
!current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 87–91 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 87–91 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !$parent | 87–91 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 88 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 88–92 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 88–92 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !is_wp_error() && !$parent | 89–93 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 89 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 89–93 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !is_wp_error() && !$parent | 90–94 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 90 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && is_wp_error() && !->get_error_message() && !$parent | 90–94 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && !is_wp_error() && !$parent | 91 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 91–95 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 92–96 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 92–96 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !->get_error_message() && !$parent | 93–97 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !is_wp_error() && !$parent | 93–97 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !is_wp_error() && !$parent | 93–97 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 93 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && !->get_error_message() && !$parent | 94 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && !is_wp_error() && !$parent | 94 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !$parent | 94–98 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && !$parent | 95 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && is_wp_error() && ->get_error_message() && !$parent | 95–99 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !->get_error_message() && !$parent | 96–100 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !->get_error_message() && !$parent | 96–100 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !is_wp_error() && !$parent | 96–100 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && !->get_error_message() && !$parent | 97 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !->get_error_message() && !$parent | 97–101 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !$parent | 97–101 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !$parent | 97–101 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && !->get_error_message() && !$parent | 98 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && !$parent | 98 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && ->get_error_message() && !$parent | 98–102 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && ->get_error_message() && !$parent | 99 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !->get_error_message() && !$parent | 99–103 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !->get_error_message() && !$parent | 100–104 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && !->get_error_message() && !$parent | 100–104 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !$parent | 100–104 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && !->get_error_message() && !$parent | 101 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && ->get_error_message() && !$parent | 101–105 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && ->get_error_message() && !$parent | 101–105 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && ->get_error_message() && !$parent | 102 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && ->get_error_message() && !$parent | 102–106 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && current_user_can() && ->get_error_message() && !$parent | 103 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && !->get_error_message() && !$parent | 103–107 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && ->get_error_message() && !$parent | 104–108 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && ->get_error_message() && !$parent | 105–109 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
current_user_can() && ->get_error_message() && !$parent | 105–109 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
isset($value) && !current_user_can() && ->get_error_message() && !$parent | 106 | check_ajax_referer(), sanitize_key(), get_taxonomy(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
!current_user_can() && ->get_error_message() && !$parent | 108–112 | check_ajax_referer(), sanitize_key(), get_taxonomy(), wp_die(), wp_die(), current_user_can(), wp_die(), screen(), get_term(), wp_update_term(), is_wp_error(), get_term(), is_wp_error(), is_wp_error(), ->get_error_message(), ->get_error_message(), wp_die(), __(), wp_die(), ->single_row(), wp_die() |
Across PHP versions
Compiles the same on PHP 7.4, 8.1, 8.2, 8.3, 8.4, 8.5 and 8.6-dev: 138 instructions, 77–112 executed per call, 13 branches. The work does not change between versions.
An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.
Uses · 10
- check_ajax_referer()Verifies the Ajax request to prevent processing requests external of the blog.
- sanitize_key()Sanitizes a string key.
- get_taxonomy()Retrieves the taxonomy object of $taxonomy.
- wp_die()Kills WordPress execution and displays HTML page with an error message.
- current_user_can()Returns whether the current user has the specified capability.
- _get_list_table()Fetches an instance of a WP_List_Table class.
- get_term()Gets all term data from database by term ID.
- wp_update_term()Updates term based on arguments provided.
- is_wp_error()Checks whether the given variable is a WordPress Error.
- __()Retrieves the translation of $text.
Source code
function wp_ajax_inline_save_tax() { check_ajax_referer( 'taxinlineeditnonce', '_inline_edit' ); $taxonomy = sanitize_key( $_POST['taxonomy'] ); $taxonomy_object = get_taxonomy( $taxonomy ); if ( ! $taxonomy_object ) { wp_die( 0 ); } if ( ! isset( $_POST['tax_ID'] ) || ! (int) $_POST['tax_ID'] ) { wp_die( -1 ); } $id = (int) $_POST['tax_ID']; if ( ! current_user_can( 'edit_term', $id ) ) { wp_die( -1 ); } $wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => 'edit-' . $taxonomy ) ); $tag = get_term( $id, $taxonomy ); $_POST['description'] = $tag->description; $updated = wp_update_term( $id, $taxonomy, $_POST ); if ( $updated && ! is_wp_error( $updated ) ) { $tag = get_term( $updated['term_id'], $taxonomy ); if ( ! $tag || is_wp_error( $tag ) ) { if ( is_wp_error( $tag ) && $tag->get_error_message() ) { wp_die( $tag->get_error_message() ); } wp_die( __( 'Item not updated.' ) ); } } else { if ( is_wp_error( $updated ) && $updated->get_error_message() ) { wp_die( $updated->get_error_message() ); } wp_die( __( 'Item not updated.' ) ); } $level = 0; $parent = $tag->parent; while ( $parent > 0 ) { $parent_tag = get_term( $parent, $taxonomy ); $parent = $parent_tag->parent; ++$level; } $wp_list_table->single_row( $tag, $level ); wp_die();}Changelog
Introduced in 3.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, from
src/wp-admin/includes/ajax-actions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.