WordPress V5.0+Template Tag Reference Guide as of Version 5.2
Presented by DBS > Interactive Development :
Theme & Plugin Tags
WP Get Theme Error wp_get_theme_error();
Gets the error that was recorded for a paused theme.
<?php wp_get_theme_error($theme); ?>
$theme
String
(Required) Path to the theme directory relative to the themes directory.
Resume Theme resume_theme();
If a redirect was provided and a functions.php file was found, we first ensure that functions.php file does not throw fatal errors anymore. The way it works is by setting the redirection to the error before trying to include the file. If the theme fails, then the redirection will not be overwritten with the success message and the theme will not be resumed.
<?php resume_theme($theme, $redirect); ?>
$theme
String
(Required) Single theme to resume.
$signatures
String • Default value: none
(Optional) URL to redirect to.
is Theme Paused is_theme_paused();
Determines whether a theme is technically active but was paused while loading.
<?php is_theme_paused($theme); ?>
$theme
String
(Required) Path to the theme directory relative to the themes directory.
WP Get Plugin Error wp_get_plugin_error();
Gets the error that was recorded for a paused plugin.
<?php wp_get_plugin_error($plugin); ?>
$plugin
String
(Required) Path to the plugin file relative to the plugins directory.
Resume Plugin resume_plugin();
Tries to resume a single plugin.
<?php resume_plugin($plugin $redirect); ?>
$plugin
String
(Required) Single plugin to resume.
$redirect
String • Default value: none
(Optional) URL to redirect to.
is Plugin Paused is_plugin_paused();
Determines whether a plugin is technically active but was paused while loading.
<?php is_plugin_paused($plugin); ?>
$plugin
String
(Required) Path to the plugin file relative to the plugins directory.
Validate Plugin Requirements validate_plugin_requirements();
Validate the plugin requirements for WP version and PHP version.
<?php validate_plugin_requirements($plugin); ?>
$plugin
String
(Required) Path to the plugin file relative to the plugins directory.
WP Skip Paused Plugins wp_skip_paused_plugins();
Filters a given list of plugins, removing any paused plugins from it.
<?php wp_skip_paused_plugins($plugins); ?>
$plugins
Array
(Required) List of absolute plugin main file paths.
WP Skip Paused Themes wp_skip_paused_themes();
Filters a given list of themes, removing any paused themes from it.
<?php wp_skip_paused_themes($themes); ?>
$themes
Array
(Required) List of absolute theme directory paths.
Activate Plugin activate_plugin();
Attempts activation of plugin in a “sandbox” and redirects on success.
<?php activate_plugin($plugin, $redirect, $network_wide, $silent); ?>
$plugin
String
(Required) Path to the plugin file relative to the plugins directory.
$redirect
String • Default value: none
(Optional) URL to redirect to.
$network_wide
Bool • Default value: false
((Optional) Whether to enable the plugin for all sites in the network or just the current site. Multisite only.
$silent
Bool • Default value: false
(Optional) Whether to prevent calling activation hooks.
Paused Themes Notice paused_themes_notice();
Renders an admin notice in case some themes have been paused due to errors.
<?php paused_themes_notice(); ?>
No parameters.