WP_Posts_List_Table::inline_edit()
- Since
- 3.1.0
- Source
wp-admin/includes/class-wp-posts-list-table.php:1613
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_Posts_List_Table::inline_edit() 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
- 822
- Plugin surface
- 6 hooks
- Called by
- 0
Reaches the database via get_post().
The body loops, so the work grows with how much data it finds.
Executed per call on PHP 8.5. The body compiles to 822.
Third-party callbacks on 'quick_edit_show_taxonomy', 'quick_edit_dropdown_authors_args', 'quick_edit_dropdown_pages_args' run inside this call, and their cost is not bounded by anything here.
Nothing in core calls this; the cost is only what you spend yourself.
What it touches
- hookthird-party callbacks
apply_filters()called directly - querycontent query
get_post()one call below WP_Posts_List_Table::inline_edit() - optionoption read or write
get_option()one call below WP_Posts_List_Table::inline_edit()
Further down the call graph this can also reach cache, serialize and transient. Those are the worst case, several calls deep and usually down an error path, not what a normal call pays.
Across PHP versions
| PHP | Compiled | Executed | Branches | Notes |
|---|---|---|---|---|
| 8.6-dev | 820 | 820 | 71 | 2 fewer instructions than PHP 8.5 |
| 8.5 | 822 | 822 | 71 | |
| 8.4 | 822 | 822 | 71 | |
| 8.3 | 822 | 822 | 71 | |
| 8.2 | 822 | 822 | 71 | |
| 8.1 | 822 | 822 | 71 | 1 fewer instruction than PHP 7.4 |
| 7.4 | 823 | 823 | 71 |
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.
Hooks and filters fired · 6
6 hooks fire while WP_Posts_List_Table::inline_edit() runs, in this order:
- apply_filters( quick_edit_show_taxonomy )filterline 1639 (+26 into the body)
Filters whether the current taxonomy should be shown in the Quick Edit panel.
- apply_filters( quick_edit_dropdown_authors_args )filterline 1754 (+141 into the body)
Filters the arguments used to generate the Quick Edit authors drop-down.
- apply_filters( quick_edit_dropdown_pages_args )filterline 1859 (+246 into the body)
Filters the arguments used to generate the Quick Edit page-parent drop-down.
- apply_filters( default_page_template_title )filterline 1888 (+275 into the body)
Filters the title of the default page template displayed in the drop-down.
- do_action( bulk_edit_custom_box )actionline 2065 (+452 into the body)
Fires once for each column in Bulk Edit mode.
- do_action( quick_edit_custom_box )actionline 2077 (+464 into the body)
Fires once for each column in Quick Edit mode.
Uses · 29
- get_default_post_to_edit()Returns default post information to use when populating the "Write Post" form.
- get_post_type_object()Retrieves a post type object by name.
- get_object_taxonomies()Returns the names or objects of the taxonomies which are registered for the requested object or object type, such as a post object or post type name.
- get_taxonomy()Retrieves the taxonomy object of $taxonomy.
- apply_filters()Calls the callback functions that have been added to a filter hook.
- current_user_can()Returns whether the current user has the specified capability.
- __()Retrieves the translation of $text.
- post_type_supports()Checks a post type's support for a given feature.
- _e()Displays translated text.
- is_post_type_viewable()Determines whether a post type is considered "viewable".
- touch_time()Prints out HTML form date elements for editing post or comment publish date.
- wp_is_large_user_count()Determines whether the site has a large number of users.
Show all 29
- esc_attr()Escaping for HTML attributes.
- wp_dropdown_users()Creates dropdown HTML content of users.
- esc_html()Escaping for HTML blocks.
- wp_terms_checklist()Outputs an unordered list of checkbox input elements labelled with term names.
- wp_dropdown_pages()Retrieves or displays a list of pages as a dropdown (select list).
- get_page_templates()Gets the page templates available in this theme.
- page_template_dropdown()Prints out option HTML elements for the page templates drop-down.
- current_theme_supports()Checks a theme's support for a given feature.
- get_theme_support()Gets the theme support arguments passed when registering that support.
- _ex()Displays translated string with gettext context.
- get_post_format_string()Returns a pretty, translated version of a post format slug
- do_action()Calls the callback functions that have been added to an action hook.
- wp_nonce_field()Retrieves or display nonce hidden field for forms.
- submit_button()Echoes a submit button, with provided text and appropriate class(es).
- wp_admin_notice()Outputs an admin notice.
- WP_Posts_List_Table::get_column_count()
- WP_Posts_List_Table::get_column_info()
Source code
public function inline_edit() { global $mode; $screen = $this->screen; $post = get_default_post_to_edit( $screen->post_type ); $post_type_object = get_post_type_object( $screen->post_type ); $taxonomy_names = get_object_taxonomies( $screen->post_type ); $hierarchical_taxonomies = array(); $flat_taxonomies = array(); foreach ( $taxonomy_names as $taxonomy_name ) { $taxonomy = get_taxonomy( $taxonomy_name ); $show_in_quick_edit = $taxonomy->show_in_quick_edit; /** * Filters whether the current taxonomy should be shown in the Quick Edit panel. * * @since 4.2.0 * * @param bool $show_in_quick_edit Whether to show the current taxonomy in Quick Edit. * @param string $taxonomy_name Taxonomy name. * @param string $post_type Post type of current Quick Edit post. */ if ( ! apply_filters( 'quick_edit_show_taxonomy', $show_in_quick_edit, $taxonomy_name, $screen->post_type ) ) { continue; } if ( $taxonomy->hierarchical ) { $hierarchical_taxonomies[] = $taxonomy; } else { $flat_taxonomies[] = $taxonomy; } } $m = ( isset( $mode ) && 'excerpt' === $mode ) ? 'excerpt' : 'list'; $can_publish = current_user_can( $post_type_object->cap->publish_posts ); $core_columns = array( 'cb' => true, 'date' => true, 'title' => true, 'categories' => true, 'tags' => true, 'comments' => true, 'author' => true, ); ?> <form method="get"> <table style="display: none"><tbody id="inlineedit"> <?php $hclass = count( $hierarchical_taxonomies ) ? 'post' : 'page'; $inline_edit_classes = "inline-edit-row inline-edit-row-$hclass"; $bulk_edit_classes = "bulk-edit-row bulk-edit-row-$hclass bulk-edit-{$screen->post_type}"; $quick_edit_classes = "quick-edit-row quick-edit-row-$hclass inline-edit-{$screen->post_type}"; $bulk = 0; while ( $bulk < 2 ) : $classes = $inline_edit_classes . ' '; $classes .= $bulk ? $bulk_edit_classes : $quick_edit_classes; ?> <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="<?php echo $classes; ?>" style="display: none"> <td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange"> <div class="inline-edit-wrapper" role="region" aria-labelledby="<?php echo $bulk ? 'bulk' : 'quick'; ?>-edit-legend"> <fieldset class="inline-edit-col-left"> <legend class="inline-edit-legend" id="<?php echo $bulk ? 'bulk' : 'quick'; ?>-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend> <div class="inline-edit-col"> <?php if ( post_type_supports( $screen->post_type, 'title' ) ) : ?> <?php if ( $bulk ) : ?> <div id="bulk-title-div"> <div id="bulk-titles"></div> </div> <?php else : // $bulk ?>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 6.7.7 tag, from
src/wp-admin/includes/class-wp-posts-list-table.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.