wphooks.info - enable_press_this_media_discovery

enable_press_this_media_discovery

(trunk - 4.9-alpha-41548)

The hook occurs in the following file:

wp-admin/includes/class-wp-press-this.php:
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
			}
		}

		/**
		 * Filters whether to enable in-source media discovery in Press This.
		 *
		 * @since 4.2.0
		 *
		 * @param bool $enable Whether to enable media discovery.
		 */
		if ( apply_filters( 'enable_press_this_media_discovery', true ) ) {
			/*
			 * If no title, _images, _embed, and _meta was passed via $_POST, fetch data from source as fallback,
			 * making PT fully backward compatible with the older bookmarklet.
			 */
			if ( empty( $_POST ) && ! empty( $data['u'] ) ) {
				if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'scan-site' ) ) {
					$data = $this->source_data_fetch_fallback( $data['u'], $data );
				} else {
					$data['errors'] = 'missing nonce';