You can not use conditional tags on init
Queries are only available after “wp” action hook, so ‘init’ is too early to check for it.
Queries are only available after “wp” action hook, so ‘init’ is too early to check for it.
My metaboxes suddenly stopped working. If that’s the case for you, and you are clueless, try resetting $id for your meta_box
Just use javascript:void(0) instead of # for href You might encounter this error most likely in Firefox Console
<?php function notify_post_status( $post_id = NULL, $user = ” ) { if ( ! isset($_POST[“post_id”]) ) { $post_id = $_POST[“post_id”]; } else { return $post_id; } $post = get_post($post_id); $status = $post->post_status; $type = $post->post_type; $author_id = intval($post->post_author); $user = get_userdata( $author_id ); //ignore admin if( $author_id == 1 ) return; // Which statuses should…
Actually, you do not want to open memcached port in your firewall. #ref: http://serverfault.com/questions/530051/memcached-ports-and-csf
There are mb_strlen() and mb_substr() for multibyte characters however there is no mb_str_word_count. Hence my previous post.
Always check for local time Despite the fact that my server timezone was set correctly, somehow time() was giving wrong ( UTC) hour. So i ended up using wp’s functions to make sure. $now = current_time( ‘timestamp’, 0 ) ;$local_ts = get_the_time(‘U’,$post->ID);