register_activation_hook(__FILE__, ‘wojciech_borowicz_mec_cron_job_schedule’); function wojciech_borowicz_mec_cron_job_schedule() { if (! wp_next_scheduled ( ‘wojciech_borowicz_remove_expired_events_cron_job’ )) { wp_schedule_event(time(), ‘daily’, ‘wojciech_borowicz_remove_expired_events_cron_job’); } } add_action(‘wojciech_borowicz_remove_expired_events_cron_job’, ‘wojciech_borowicz_remove_expired_events’); function wojciech_borowicz_remove_expired_events() { $args = array( ‘post_type’ => ‘mec-events’, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’, ‘posts_per_page’=> ‘-1’, ); $loop = new WP_Query( $args ); if( $loop->have_posts() ): $today = date(‘Y-m-d’); while( $loop->have_posts() ): $loop->the_post(); global $post; […]
PS> Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.5 PS> Import-Module ExchangeOnlineManagement PS> Connect-ExchangeOnline -UserPrincipalName admin@emailAddress.com -DelegatedOrganization emailAddress.onmicrosoft.com PS> Set-CASMailbox -Identity user@goldenminute.co.uk -SmtpClientAuthenticationDisabled $false PS> Get-CASMailbox -Identity user@goldenminute.co.uk | Format-List SmtpClientAuthenticationDisabled
grep -rnw ‘/home/cPanelUsername/public_html/’ -e searchphrase
In simplest words cache is your browser’s memory. It keeps previously visited websites data to make them load faster next time you visit. This is an amazing behaviour and improves loading dramatically, but if you make any changes to the code of your website it’ll take some time for your browser to pick it up. […]
add_filter(‘style_loader_tag’, ‘flatsomeIconsPreloader’, 10, 2); function flatsomeIconsPreloader($html, $handle) { if( 0 != strpos( $html, ‘flatsome-icons’ ) ) { $html = str_replace( “rel=’stylesheet'”, “rel=’preload’ as=’style’ “, $html ); $html .= “”; } return $html; }
function my_shortcode() { $message = ‘Hello world!’; // Output needs to be return return $message; } // register shortcode add_shortcode(‘shortcodeNameToCall’, ‘my_shortcode’);
DELETE from wp_users where wp_users.ID not in ( SELECT meta_value FROM wp_postmeta WHERE meta_key = ‘_customer_user’ ) AND wp_users.ID not in ( select distinct(post_author) from wp_posts )
global $post; $terms = get_the_terms( $post->ID, ‘product_cat’ ); foreach ($terms as $term) { $product_cat_id = $term->term_id; break; }
Outlook.com SMTP Settings Host: smtp-mail.outlook.com Port: 587 Username: Your Outlook.com account email (e.g. john@outlook.com) Password: Your Outlook.com account password Encryption: TLS Office 365 SMTP Settings Host: smtp.office365.com Port: 587 Username: Your Office 365 account email Password: Your Office 365 account password Encryption: TLS Hotmail SMTP Settings Host: smtp.live.com Port: 587 Username: Your Hotmail account email (e.g. john@hotmail.com) Password: Your Hotmail account password Encryption: TLS Yahoo Mail SMTP Settings Host: smtp.mail.yahoo.com Port: 465 […]
jQuery(document).ready(function( $ ) { // $ Works! You can test it with next line if you like // console.log($); });