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 | |
| /** | |
| * @param int $post_id The ID of the post. | |
| * @param WP_Post $post The post object. | |
| * @param bool $update True if the post already exists and is being updated | |
| */ | |
| function wpse_post_ping( $post_id, $post, $update ) { | |
| if ( $post->post_status === 'publish' ) { // Only fire when published | |
| wp_remote_post( |
| // see SeaGrass | |
| if ($(".slideshow-full-container").length > 0) { | |
| // https://github.com/kenwheeler/slick/issues/1403#issuecomment-282066130 | |
| // Test for slide length, if one, hide navigation dots | |
| // the event needs to be run before slick is initialized | |
| $('.slideshow-full-container').on('init', function (event, slick, direction) { | |
| // console.log($('#full_page_slideshow .slick-slide').length); |
| <?php | |
| add_filter( 'evr_divi_popup-js_data', 'my_divi_popup_options' ); | |
| function my_divi_popup_options( $config ) { | |
| // -- Modify UI of popups -- | |
| /** | |
| * The base z-index. This z-index is used for the overlay, every | |
| * popup has a z-index increased by 1: |
| <div class="footer-social-icons"> | |
| <h4 class="_14">Follow us on</h4> | |
| <ul class="social-icons"> | |
| <li><a href="" class="social-icon"> <i class="fa fa-facebook"></i></a></li> | |
| <li><a href="" class="social-icon"> <i class="fa fa-twitter"></i></a></li> | |
| <li><a href="" class="social-icon"> <i class="fa fa-rss"></i></a></li> | |
| <li><a href="" class="social-icon"> <i class="fa fa-youtube"></i></a></li> | |
| <li><a href="" class="social-icon"> <i class="fa fa-linkedin"></i></a></li> | |
| <li><a href="" class="social-icon"> <i class="fa fa-google-plus"></i></a></li> | |
| </ul> |
| <?php | |
| if(!function_exists('wc_get_products')) { | |
| return; | |
| } | |
| $paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1; | |
| $ordering = WC()->query->get_catalog_ordering_args(); | |
| $ordering['orderby'] = array_shift(explode(' ', $ordering['orderby'])); | |
| $ordering['orderby'] = stristr($ordering['orderby'], 'price') ? 'meta_value_num' : $ordering['orderby']; |
| function upload_table($table_id, $csv_file_name) { | |
| $accessToken = $_SESSION['accessToken']; | |
| // /hubdb/api/v1/tables/:tableId/import | |
| $url = "https://api.hubapi.com/hubdb/api/v1/tables/$table_id/import"; | |
| $postBody = [ | |
| "file" => "@$csv_file_name;type=text/csv", | |
| "config" => [ | |
| "resetTable" => true, | |
| "skipRows" => 1, | |
| "format" => 'csv', |
| <?php | |
| function ct_paging_nav() { | |
| // Don't print empty markup if there's only one page. | |
| if ( $GLOBALS['wp_query']->max_num_pages < 2 ) { | |
| return; | |
| } | |
| $paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; | |
| $pagenum_link = html_entity_decode( get_pagenum_link() ); | |
| $query_args = array(); |
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 | |
| /* | |
| This code snippet can be added to your functions.php file (without the <?php) | |
| to add a query string to the login link emailed to the user upon registration | |
| which when clicked will validate the user, log them in, and direct them to | |
| the home page. | |
| */ | |
| /** | |
| * This first function is hooked to the 'user_register' action which fires |
| add_action('template_redirect','my_template_redirect'); | |
| function my_template_redirect() { | |
| $redirect_to = false; | |
| list($url_path,$params) = explode('?',$_SERVER['REQUEST_URI']); | |
| $path_parts = explode('/',trim($url_path,'/')); | |
| switch ($path_parts[0]) { | |
| case 'wrongpage1.html': | |
| $redirect_to = '/'; | |
| break; | |
| case 'wrongpage2.php': |