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
| #!/bin/bash | |
| REV=$1 | |
| svn up --ignore-externals . > /dev/null | |
| svn merge -c$REV ../../trunk . | |
| LOG=$(svn log -r$REV ../../trunk | grep -v '\-------' | tail -n +3) | |
| BRANCH=$(basename $(pwd)) | |
| echo -en "$LOG\n\nMerges [$REV] to the $BRANCH branch." | pbcopy | |
| echo "" | |
| pbpaste |
| <?php | |
| /** | |
| * Whitelist embedded links in the REST API responses | |
| * | |
| * This is often useful if you want to only get specified resources embedded along with the | |
| * main resources, rather than the "all of nothing" approach of passing `?_embed` to the API request. | |
| * | |
| * You can either pass a comma seperated list of relationships or an array of string via the `_embed_include` query param. | |
| * |
| <?php | |
| /** | |
| * Make an internal REST request | |
| * | |
| * @global WP_REST_Server $wp_rest_server ResponseHandler instance (usually WP_REST_Server). | |
| * @param $request_or_method WP_REST_Request|string A WP_REST_Request object or a request method | |
| * @param $path (optional) if the path is not specific in the rest request, specify it here | |
| * @param $data (optional) option data for the request. | |
| * @return WP_Error|mixed |
| You should really fix these slow tests (>250ms)... | |
| 1. 1601ms to run Tests_Basic:test_readme | |
| 2. 1384ms to run Tests_Canonical:test with data set #0 | |
| 3. 1338ms to run Tests_WP_Site_Icon:test_insert_cropped_attachment | |
| 4. 1142ms to run Tests_XMLRPC_wp_uploadFile:test_valid_attachment | |
| 5. 1118ms to run Tests_Term_Cache:test_hierachy_invalidation | |
| 6. 1000ms to run Tests_Theme:test_get_themes_contents | |
| 7. 940ms to run Tests_XMLRPC_wp_newPost:test_post_format | |
| 8. 938ms to run Tests_WP_Site_Icon:test_create_attachment_object | |
| 9. 914ms to run Tests_XMLRPC_wp_getOptions:test_option_values_admin |
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 | |
| // Use: $ wp eval-file fix-changed-plugin-filename.php | |
| global $wpdb; | |
| $blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" ); | |
| $p = 'list-category-posts/list_cat_posts.php'; | |
| $new_p = 'list-category-posts/list-category-posts.php'; | |
| foreach ( $blog_ids as $blog_id ) { |
| <?php | |
| add_filter('ep_formatted_args', 'my_ep_formatted_args', 10, 2 ); | |
| function my_ep_formatted_args( $formatted_args, $args ) { | |
| // Handle more like this queries. WP_QUery arg formatting is: array( 'more_like' => $post_id ) | |
| if ( ! empty( $args['more_like'] ) ) { | |
| $formatted_args['query'] = array( | |
| 'more_like_this' => array( |
| <?php | |
| /** | |
| * Move script(s) to bottom | |
| * | |
| * @param string|array $script_handles Script handles to be moved to bottom | |
| * @param array $args Additional arguments. Defaults to array( 'move_deps' => false ). Set to true to also move scripts dependencies. | |
| */ | |
| function h1_move_script_to_bottom( $script_handles, $args = array() ) { | |
| $defaults = array( |
| <?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. |
| import android.text.TextUtils; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.mockito.invocation.InvocationOnMock; | |
| import org.mockito.stubbing.Answer; | |
| import org.powermock.core.classloader.annotations.PrepareForTest; | |
| import org.powermock.modules.junit4.PowerMockRunner; |