WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
1591 | * |
1592 | * @param array $args Additional data. Accepts { 'mime_type'=>string, 'methods'=>{string, string, ...} } |
1593 | * @return string|bool Class name for the first editor that claims to support the request. False if no editor claims to support the request. |
1594 | */ |
1595 | function _wp_image_editor_choose( $args = array() ) { |
1596 | require_once ABSPATH . WPINC . '/class-wp-image-editor.php'; |
1597 | require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php'; |
1598 | require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php'; |
1599 |
|
1600 | $implementations = apply_filters( 'wp_image_editors', |
1601 | array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) ); |
1602 |
|
1603 | foreach ( $implementations as $implementation ) { |
1604 | if ( ! call_user_func( array( $implementation, 'test' ), $args ) ) |
1605 | continue; |
1606 |
|
1607 | if ( isset( $args['mime_type'] ) && |
1608 | ! call_user_func( |
1609 | array( $implementation, 'supports_mime_type' ), |