plugin_sandbox_scrape() WordPress Function

The plugin_sandbox_scrape() function is a simple Wordpress plugin that allows you to scrape any webpage and return the results as a Wordpress post.

plugin_sandbox_scrape( string $plugin ) #

Loads a given plugin attempt to generate errors.


Parameters

$plugin

(string)(Required)Path to the plugin file relative to the plugins directory.


Top ↑

Source

File: wp-admin/includes/plugin.php

function plugin_sandbox_scrape( $plugin ) {
	if ( ! defined( 'WP_SANDBOX_SCRAPING' ) ) {
		define( 'WP_SANDBOX_SCRAPING', true );
	}

	wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
	include_once WP_PLUGIN_DIR . '/' . $plugin;
}


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Function was moved into the wp-admin/includes/plugin.php file.
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.