public function list_handlers( $args, $assoc_args ) {
		/** @var \WP_Embed $wp_embed */
		global $wp_embed;

		$all_handlers = array();

		ksort( $wp_embed->handlers );
		foreach ( $wp_embed->handlers as $priority => $handlers ) {
			foreach ( $handlers as $id => $handler ) {
				$all_handlers[] = array(
					'id'       => $id,
					'regex'    => $handler['regex'],
					'callback' => $handler['callback'],
					'priority' => $priority,
				);
			}
		}

		$formatter = $this->get_formatter( $assoc_args );
		$formatter->display_items( $all_handlers );
	}
public function list_handlers( $args, $assoc_args ) {
		/** @var \WP_Embed $wp_embed */
		global $wp_embed;

		$all_handlers = array();

		ksort( $wp_embed->handlers );
		foreach ( $wp_embed->handlers as $priority => $handlers ) {
			foreach ( $handlers as $id => $handler ) {
				$all_handlers[] = array(
					'id'       => $id,
					'regex'    => $handler['regex'],
					'callback' => $handler['callback'],
					'priority' => $priority,
				);
			}
		}

		$formatter = $this->get_formatter( $assoc_args );
		$formatter->display_items( $all_handlers );
	}
public function list_handlers ( $ args , $ assoc_args ) { /** @var \WP_Embed $wp_embed */ global $ wp_embed ; $ all_handlers = array ( ) ; ksort ( $ wp_embed -> handlers ) ; foreach ( $ wp_embed -> handlers as $ priority => $ handlers ) { foreach ( $ handlers as $ id => $ handler ) { $ all_handlers [ ] = array ( 'id' => $ id , 'regex' => $ handler [ 'regex' ] , 'callback' => $ handler [ 'callback' ] , 'priority' => $ priority , ) ; } } $ formatter = $ this -> get_formatter ( $ assoc_args ) ; $ formatter -> display_items ( $ all_handlers ) ; }
Lists all available embed handlers.

## OPTIONS

[--field=<field>]
: Display the value of a single field

[--fields=<fields>]
: Limit the output to specific fields.

[--format=<format>]
: Render output in a particular format.
---
default: table
options:
- table
- csv
- json
---

## AVAILABLE FIELDS

These fields will be displayed by default for each handler:

* id
* regex

These fields are optionally available:

* callback
* priority

## EXAMPLES

# List id,regex,priority fields of available handlers.
$ wp embed handler list --fields=priority,id
+----------+-------------------+
| priority | id                |
+----------+-------------------+
| 10       | youtube_embed_url |
| 9999     | audio             |
| 9999     | video             |

@subcommand list
Lists all available embed handlers .