// Get stored hashes. $error_log_hashes = get_option( 'error_log_hashes' ); // Get today's date. $date = date('Y-m-d'); // Check if …
Error log files by date name
ini_set( 'error_log', WP_CONTENT_DIR . '/debug-' . date('Y-m-d') . '.log' ); …
Run WordPress in debug mode without access to wp-config
add_action( 'template_redirect', 'my_enable_debug_mode' ); function my_enable_debug_mode() { // Turn on error reporting. …
Compare versions in WordPress
/** * Use PHP's version_compare() to check the version * of WordPress (or a plugin or theme for that matter). * * Get currently …
Enable error logging in wp-config.php
/** * The WP debug constants. * * These are used in wp-config.php to enable debugging. * * NOTE all of these MUST be inserted in …
Error log utility function
/** * Writes string, array, and object data to the WP error log. * * To use, pass the result to write to the log as follows: * …
Call a shortcode function by tag name
/** * Call a shortcode function by its tag name. * * Directly executes a shortcode's callback function using the shortcode's * tag …
Display a WordPress login form
$args = array( 'echo' => true, 'redirect' => 'https://wpbitz.com', 'form_id' => 'loginform', 'label_username' => __( …