418 header status, I’m a teapot [closed]

You were right Toscho, it is a plugin called ‘better WP-Security’ I did a search for ‘418’ as suggested in the files I had backed up via ftp and found this: $bwpsmemlimit = (int) ini_get( ‘memory_limit’ ) //if they’re locked out or banned die if ( ( $bwpsoptions[‘id_enabled’] == 1 ||$bwpsoptions[‘ll_enabled’] == 1 ) && … Read more

How can I style future post?

Just use the function get_post_status(). Inside the loop you have access to the Post Id, but if you leave this blank it will use the ID of the current post instead. So you code will become something like this (not tested yet): <h3 class=”entry-title td-module-title”> <?php if( get_post_status() != ‘future’ ) { ?> <a href=”<?php … Read more

Detect type of post status transition

If not, how do I tie multiple hooks to the same action? Do I just list them like so: add_action(‘new_to_publish’, ‘save_new_post’, 10, 1); add_action(‘future_to_publish’, ‘save_new_post’, 10, 1); add_action(‘draft_to_publish’, ‘save_new_post’, 10, 1); This is exactly the way to go. Just hook the same callback into each of the status-transition hooks on which you want the callback … Read more

How to Get All Posts but the Private ones?

I believe get_posts returns all published (no-private posts) but does display password protected posts. In fact, by default, the standard WP_Query loop does this as well. So by default, private posts shouldn’t appear. If you wanted to display private posts for those logged in, and not those who are logged out, you could use the … Read more

How do I limit the status options for bulk/quick edit to only Published and Draft?

Answering this Question, came to a jQuery solution to Ana Ban’s one. add_action( ‘admin_head’, ‘wpse_56551_script_enqueuer’ ); function wpse_56551_script_enqueuer() { global $current_screen; /** /wp-admin/edit.php?post_type=post /wp-admin/edit.php?post_type=page /wp-admin/edit.php?post_type=cpt == gallery in this example */ if( ‘edit-gallery’ == $current_screen->id ) { ?> <script type=”text/javascript”> jQuery(document).ready( function($) { $(“a.editinline”).live(“click”, function () { var ilc_qe_id = inlineEditPost.getId(this); setTimeout(function() { $(‘#edit-‘+ilc_qe_id+’ select[name=”_status”] … Read more

What action is called when drafts are saved?

After WP 2.3 you have for all status an hook: {$new_status}_{$post->post_type} Alternative you can use ans if for the status on hook save_post; an example for post_type post, you can change this ‘post’ to your post_type or defaults form WP: public function set_status_private($id, $post) { if ( is_object($post) && ‘post’ === $post->post_type && ‘publish’ === … Read more

Setting a title on a Custom Post Type that doesn’t support titles

You could add a hidden input into the page to pre-set the title field, because it won’t be on the page(because the type doesn’t support titles). Slug is produced from the title, so you should only need add a title value. Something like this should work(though untested).. add_action( ‘submitpost_box’, ‘hidden_type_title’ ); function hidden_type_title() { global … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)