wppaste
WordPress

wp_ajax_inline_save_tax()

Since
3.1.0
Source
wp-admin/includes/ajax-actions.php:2185
Handles Quick Edit saving for a term via AJAX.

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

Reaches the database via get_term().

Scaling
Scales with input

The body loops, so the work grows with how much data it finds.

Instructions
77–112

Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 138.

Plugin surface
None

Nothing here hands control to plugin code.

Called by
0

Nothing in core calls this; the cost is only what you spend yourself.

What it touches

  • querycontent queryget_term()called directly
  • hookthird-party callbacksdo_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.

WhenInstructionsCalls it makes
current_user_can() && !is_wp_error() && !$parent77–81check_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() && !$parent78check_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() && !$parent80–84check_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() && !$parent80–84check_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() && !$parent80–84check_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() && !$parent81check_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() && !$parent81check_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() && !$parent81–85check_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() && !$parent82check_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() && !$parent83–87check_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() && !$parent83–87check_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() && !$parent83–87check_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() && !$parent83–87check_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() && !$parent84check_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() && !$parent84check_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() && !$parent84–88check_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() && !$parent84–88check_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() && !$parent84–88check_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() && !$parent85check_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() && !$parent85check_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() && !$parent85–89check_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() && !$parent86–90check_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() && !$parent86–90check_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() && !$parent86check_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() && !$parent86–90check_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() && !$parent87check_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() && !$parent87–91check_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() && !$parent87–91check_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() && !$parent87–91check_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() && !$parent88check_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() && !$parent88–92check_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() && !$parent88–92check_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() && !$parent89–93check_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() && !$parent89check_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() && !$parent89–93check_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() && !$parent90–94check_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() && !$parent90check_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() && !$parent90–94check_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() && !$parent91check_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() && !$parent91–95check_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() && !$parent92–96check_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() && !$parent92–96check_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() && !$parent93–97check_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() && !$parent93–97check_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() && !$parent93–97check_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() && !$parent93check_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() && !$parent94check_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() && !$parent94check_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() && !$parent94–98check_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() && !$parent95check_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() && !$parent95–99check_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() && !$parent96–100check_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() && !$parent96–100check_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() && !$parent96–100check_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() && !$parent97check_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() && !$parent97–101check_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() && !$parent97–101check_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() && !$parent97–101check_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() && !$parent98check_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() && !$parent98check_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() && !$parent98–102check_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() && !$parent99check_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() && !$parent99–103check_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() && !$parent100–104check_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() && !$parent100–104check_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() && !$parent100–104check_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() && !$parent101check_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() && !$parent101–105check_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() && !$parent101–105check_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() && !$parent102check_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() && !$parent102–106check_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() && !$parent103check_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() && !$parent103–107check_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() && !$parent104–108check_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() && !$parent105–109check_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() && !$parent105–109check_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() && !$parent106check_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() && !$parent108–112check_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

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.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 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.