wppaste
WordPress

WP_Widget_Media_Image::render_media( array $instance )

Since
4.8.0
Source
wp-includes/widgets/class-wp-widget-media-image.php:177
Render the media on the frontend.

Compatibility

WordPress
since 4.8.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.

Parameters

$instancearray
Widget instance props.

Performance profile

How much work a call to WP_Widget_Media_Image::render_media() 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_post().

Scaling
Scales with input

The body loops, so the work grows with what you pass in.

Instructions
32–162

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

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_post()called directly
  • hookthird-party callbacksapply_filters()one call below WP_Widget_Media_Image::render_media()
  • optionoption read or writeget_option()one call below WP_Widget_Media_Image::render_media()

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.

What one call costs · 97 distinct outcomes

One number would be a lie: the work depends on which branch runs. These are every distinct cost WP_Widget_Media_Image::render_media() can have, taken from its control-flow graph on PHP 8.5.

WhenInstructionsCalls it makes
!->is_attachment_with_mime_type() && empty($instance)32->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type()
!->is_attachment_with_mime_type() && !empty($instance) && !$instance85–97->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size === "custom"90–101->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image()
!->is_attachment_with_mime_type() && !empty($instance) && !$instance91–96->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), wp_get_attachment_url()
!->is_attachment_with_mime_type() && !empty($instance) && $instance92–104->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), width()
!->is_attachment_with_mime_type() && !empty($instance) && !$instance92–97->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), get_attachment_link()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size === "custom"96–100->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url()
!->is_attachment_with_mime_type() && isset($instance) && $size === "custom" && $instance97–108->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size === "custom"97–101->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), get_attachment_link()
!->is_attachment_with_mime_type() && !empty($instance) && $instance98–103->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), wp_get_attachment_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && !$size99–110->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image()
!->is_attachment_with_mime_type() && !empty($instance) && $instance99–104->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), get_attachment_link(), width()
85 further outcomes, up to 162 instructions
!->is_attachment_with_mime_type() && !$instance101–114->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), esc_url()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size === "custom" && $instance103–107->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && $size === "custom" && $instance104–108->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), get_attachment_link(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && !$size105–109->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size === "custom"106–118->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), esc_url()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && !$size && $instance106–117->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && !$size106–110->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), get_attachment_link()
!->is_attachment_with_mime_type() && !$instance107–113->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), wp_get_attachment_url(), esc_url()
!->is_attachment_with_mime_type() && $instance108–121->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), esc_url(), width()
!->is_attachment_with_mime_type() && !$instance108–114->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), get_attachment_link(), esc_url()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && $size108–120->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image()
!->is_attachment_with_mime_type() && !$instance110–123->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size === "custom"112–117->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && !$size && $instance112–116->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size === "custom" && $instance113–125->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), esc_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size === "custom"113–118->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && !$size && $instance113–117->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), get_attachment_link(), width()
!->is_attachment_with_mime_type() && $instance114–120->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), wp_get_attachment_url(), esc_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && $size114–119->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size === "custom"115–127->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && !$size115–127->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), esc_url()
!->is_attachment_with_mime_type() && $instance115–121->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), get_attachment_link(), esc_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && $size && $instance115–127->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && $size115–120->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), get_attachment_link()
!->is_attachment_with_mime_type() && !$instance116–122->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), wp_get_attachment_url(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && $instance117–130->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && !$instance117–123->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), get_attachment_link(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size === "custom" && $instance119–124->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), width()
!->is_attachment_with_mime_type() && !empty($instance) && !$instance119–132->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size === "custom" && $instance120–125->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size === "custom"121–126->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && !$size121–126->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && $size && $instance121–126->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && $size === "custom" && $instance122–134->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size === "custom"122–127->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && !$size && $instance122–134->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), esc_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && !$size122–127->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && $size && $instance122–127->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), get_attachment_link(), width()
!->is_attachment_with_mime_type() && $instance123–129->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), wp_get_attachment_url(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size === "custom" && !empty($instance)124–136->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && !$size124–136->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && $instance124–130->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), get_attachment_link(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && $size124–137->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), esc_url()
!->is_attachment_with_mime_type() && !empty($instance) && !$instance125–131->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), wp_get_attachment_url(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && !empty($instance) && $instance126–139->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && !empty($instance) && !$instance126–132->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), get_attachment_link(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && $size === "custom" && $instance128–133->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && !$size && $instance128–133->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && $size === "custom" && $instance129–134->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && !$size && $instance129–134->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size === "custom"130–135->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && !$size130–135->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && $size130–136->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url()
!->is_attachment_with_mime_type() && isset($instance) && $size === "custom" && !empty($instance) && $instance131–143->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size === "custom"131–136->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && !$size && $instance131–143->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && !$size131–136->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && $size && $instance131–144->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), esc_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && !$instance && $size !== "custom" && $size131–137->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url()
!->is_attachment_with_mime_type() && !empty($instance) && $instance132–138->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), wp_get_attachment_url(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && !$size133–145->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && !empty($instance) && $instance133–139->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), wp_get_loading_optimization_attributes(), array_merge(), array_map(), get_attachment_link(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && $size133–146->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && $size === "custom" && $instance137–142->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && !$size && $instance137–142->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && $size && $instance137–143->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && $size === "custom" && $instance138–143->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && !$size && $instance138–143->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && empty($instance) && $size !== "custom" && $size && $instance138–144->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && !$size139–144->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && $size139–145->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && !$size && $instance140–152->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && !$size140–145->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && $size && $instance140–153->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && $size140–146->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && $size142–155->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && !$size && $instance146–151->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && $size && $instance146–152->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && !$size && $instance147–152->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && $size && $instance147–153->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && $size148–154->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && $size && $instance149–162->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && !$instance && $size !== "custom" && $size149–155->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr(), esc_attr()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && $size && $instance155–161->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), wp_get_attachment_url(), esc_url(), esc_attr(), esc_attr(), width()
!->is_attachment_with_mime_type() && isset($instance) && $size !== "custom" && $size && $instance156–162->get_instance_schema(), wp_list_pluck(), array_merge(), wp_parse_args(), ->is_attachment_with_mime_type(), get_intermediate_image_sizes(), array_merge(), wp_get_attachment_metadata(), _wp_get_image_size_from_meta(), sprintf(), wp_get_attachment_image(), get_attachment_link(), esc_url(), esc_attr(), esc_attr(), width()

This body has more branch combinations than are worth enumerating, so the table covers the outcomes found first rather than every one that exists.

Across PHP versions

PHPCompiledExecutedBranchesNotes
8.6-dev25932–162261 fewer instruction than PHP 8.5
8.526032–16226
8.426032–1622613 fewer instructions than PHP 8.3
8.327332–17526
8.227332–17526
8.127332–175262 fewer instructions than PHP 7.4
7.427532–17526

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 · 15

Show all 15

Changelog

Introduced in 4.8.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.1.0 tag, from src/wp-includes/widgets/class-wp-widget-media-image.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.