WordPress V5.0+Template Tag Reference Guide as of Version 5.2
Presented by DBS > Interactive Development :
Security Tags
Verify File Signature verify_file_signature();
Verifies the contents of a file against its ED25519 signature.
<?php verify_file_signature($filename, $signatures, $filename_for_errors); ?>
$filename
String
(Required) The file to validate.
$signatures
String • Array
(Required) A Signature provided for the file.
$filename_for_errors
String • Default value: false
(Optional) A friendly filename for errors. Optional.
Generate Postdata generate_postdata();
Generates post data.
<?php generate_postdata($post); ?>
$post
WP_Post • object • int
(Required) WP_Post instance or Post ID/object.
WP Get Extension Error Description wp_get_extension_error_description();
Get a human readable description of an extension’s error.
<?php wp_get_extension_error_description($error); ?>
$error
Array
(Required) Error details error_get_last()
is WP Version Compatible is_wp_version_compatible();
Checks compatibility with the current WordPress version.
<?php is_wp_version_compatible($required); ?>
$required
String
(Required) Minimum required WordPress version.
is PHP Version Compatible is_php_version_compatible();
Checks compatibility with the current PHP version.
<?php is_php_version_compatible($required); ?>
$required
String
(Required) Minimum required PHP version.
WP Title Attributewp_filter_oembed_iframe_title_attribute();
Filters the given oEmbed HTML to make sure iframes have a title attribute.
<?php wp_filter_oembed_iframe_title_attribute($result, $data , $url); ?>
$result
String
(Required) The oEmbed HTML result.
$data
Object
(Required) A data object result from an oEmbed provider.
$url
String
(Required) The URL of the content to be embedded.
WP Admin Bar Recovery Mode Menu wp_admin_bar_recovery_mode_menu();
Add a link to exit recovery mode when Recovery Mode is active.
<?php wp_admin_bar_recovery_mode_menu($wp_admin_bar); ?>
$wp_admin_bar
WP Admin Bar
WP Resume Extensions Caps wp_maybe_grant_resume_extensions_caps();
Filters the user capabilities to grant the ‘resume_plugins’ and ‘resume_themes’ capabilities as necessary.
<?php wp_maybe_grant_resume_extensions_caps($allcaps); ?>
$allcaps
Bool
(Required) An array of all the user's capabilities.
Get Privacy Policy Template get_privacy_policy_template();
The template hierarchy and template path are filterable via the ‘$type_template_hierarchy’ and ‘$type_template’ dynamic hooks, where $type is ‘privacypolicy’.
<?php get_privacy_policy_template(); ?>
No parameters.
Is Privacy Policy is_privacy_policy();
The Privacy Policy page is the page that shows the Privacy Policy content of the site. is_privacy_policy() is dependent on the site’s "Change your Privacy Policy page" Privacy Settings ‘wp_page_for_privacy_policy’. This function will return true only on the page you set as the "Privacy Policy page".
<?php is_privacy_policy(); ?>
No parameters.
WP is jsonp Request wp_is_jsonp_request();
Checks whether current request is a JSONP request, or is expecting a JSONP response.
<?php wp_is_jsonp_request(); ?>
No parameters.
WP is xml Request wp_is_xml_request();
Checks whether current request is an XML request, or is expecting an XML response.
<?php wp_is_xml_request(); ?>
No parameters.
WP is Recovery Modewp_is_recovery_mode();
In this mode, plugins or themes that cause WSODs will be paused.
<?php wp_is_recovery_mode(); ?>
No parameters.
is Protected Endpointis_protected_endpoint();
Determines whether we are currently on an endpoint that should be protected against WSODs.
<?php is_protected_endpoint(); ?>
No parameters.
is Protected Ajax Actionis_protected_ajax_action();
Determines whether we are currently handling an AJAX action that should be protected against WSODs.
<?php is_protected_ajax_action(); ?>
No parameters.
WP is Fatal Error Handler Enabledwp_is_fatal_error_handler_enabled();
Checks whether the fatal error handler is enabled.
<?php wp_is_fatal_error_handler_enabled(); ?>
No parameters.
WP Recovery Mode wp_recovery_mode();
Access the WordPress Recovery Mode instance
<?php wp_recovery_mode(); ?>
No parameters.
WP Register Fatal Error Handler wp_register_fatal_error_handler();
Registers the shutdown handler for fatal errors.
<?php wp_register_fatal_error_handler(); ?>
No parameters.
WP Get Update PHP Annotationwp_get_update_php_annotation();
Returns the default annotation for the web hosting altering the “Update PHP” page URL.
<?php wp_get_update_php_annotation(); ?>
No parameters.
WP Body Open wp_body_open();
Fire the wp_body_open action.
<?php wp_body_open(); ?>
No parameters.
WP Trusted Keys wp_trusted_keys();
Retrieve the list of signing keys trusted by WordPress.
<?php wp_trusted_keys(); ?>
No parameters.
WP Recovery Mode Nag wp_recovery_mode_nag();
Displays a notice when the user is in recovery mode.
<?php wp_recovery_mode_nag(); ?>
No parameters.