This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
| <?php | |
| /** | |
| * Post a message to Slack from WordPress | |
| * | |
| * @param string $message the message to be sent to Slack | |
| * @param string $channel the #channel to send the message to (or @user for a DM) | |
| * @param string $username the username for this bot eg : WordPress bot | |
| * @param string $icon_emoji the icon emoji name for this bot eg :monkey: | |
| * |
| <?php | |
| class WP_CLI_Trac_Patched_Git_Branch extends WP_CLI_Command { | |
| /** | |
| * Create Git branch from Core Trac patches, or amend an existing branch with the latest patches. | |
| * | |
| * ## OPTIONS | |
| * | |
| * <ticket> |
| <?php | |
| function wporg_forums_add_administrator_role( $bbp_roles ) { | |
| $bbp_roles['wporg_forums_admin'] = array( | |
| 'name' => __( 'Forums Administrator', 'wporg' ), | |
| 'capabilities' => bbp_get_caps_for_role( 'wporg_forums_admin' ) | |
| ); | |
| return $bbp_roles; | |
| } | |
| add_filter( 'bbp_get_dynamic_roles', 'wporg_forums_add_administrator_role', 1 ); |
This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.
This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.
If you experience any difficulties or have any feedback, leave a comment. 🐬
Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.
| <?php | |
| /** | |
| * Grab latest post title by an author! | |
| * | |
| * @param array $data Options for the function. | |
| * @return string|null Post title for the latest, * or null if none. | |
| */ | |
| function my_awesome_func( $data ) { | |
| $posts = get_posts( array( |
| /** | |
| * Suppress errors generated by specified WordPress plugins. | |
| * | |
| * Put this in /wp-content/mu-plugins/ | |
| * | |
| * @param string $errno The error number. | |
| * @param string $errstr The error message. | |
| * @param string $errfile Path to the file that caused the error. | |
| * @param int $errline Line number of the error. | |
| * @return bool True to suppress error reporting; false to use default error handler. |
| <?php | |
| /* | |
| WordPress Theme Template Hierarchy Last updated for WordPress 5.4 | |
| ================================== | |
| This diagram is partially simplified for legibility. To view the complete template hierarchy in use on your site see the | |
| Template panel in the Query Monitor plugin. |
| INITIALISATION | |
| ============== | |
| load wp-config.php | |
| set up default constants | |
| load wp-content/advanced-cache.php if it exists | |
| load wp-content/db.php if it exists | |
| connect to mysql, select db | |
| load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
| load wp-content/sunrise.php if it exists (multisite only) |
| <?php | |
| namespace Roots\Sage\Nav; | |
| use Roots\Sage\Utils; | |
| /** | |
| * Cleaner walker for wp_nav_menu() | |
| * | |
| * Walker_Nav_Menu (WordPress default) example output: |