Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: enable_press_this_media_discovery

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
667           }
668
669           /**
670            * Filter whether to enable in-source media discovery in Press This.
671            *
672            * @since 4.2.0
673            *
674            * @param bool $enable Whether to enable media discovery.
675            */
676           if ( apply_filters( 'enable_press_this_media_discovery', true ) ) {
677                /*
678                 * If no title, _images, _embed, and _meta was passed via $_POST, fetch data from source as fallback,
679                 * making PT fully backward compatible with the older bookmarklet.
680                 */
681                if ( empty( $_POST ) && ! empty( $data['u'] ) ) {
682                     $data = $this->source_data_fetch_fallback( $data['u'], $data );
683                } else {
684                     foreach ( array( '_images', '_embeds' ) as $type ) {
685                          if ( empty( $_POST[ $type ] ) ) {