wphooks.info - enable_press_this_media_discovery

enable_press_this_media_discovery

The hook occurs in the following file:

wp-admin/includes/class-wp-press-this.php:
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
			}
		}

		/**
		 * 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';