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

How to mass delete one line from all posts

To use phpMyAdmin follow the steps below: Login to phpMyAdmin panel and select your WordPress database. Click on the SQL tab which will bring you to a page with a SQL query box. Once you see the SQL query box, like the image shown below, you can run your SQL query there. UPDATE wp_posts SET … Read more

Bulk edit post date in wordpress

Original source : post date Create admin-script.js at your current theme ( this use js folder ) jQuery(document).ready(function($){ $(‘.inline-edit-col-right .inline-edit-col’) .append( ‘<label style=”margin-top: 3em;”><span class=”title”>Date</span>’ + ‘<div class=”timestamp-wrap”><select name=”mm”>’ + ‘<option value=”00″>Month</option>’ + ‘<option value=”01″>01-January</option>’ + ‘<option value=”02″>02-February</option>’ + ‘<option value=”03″>03-March</option>’ + ‘<option value=”04″>04-April</option>’ + ‘<option value=”05″>05-May</option>’ + ‘<option value=”06″>06-June</option>’ + ‘<option value=”07″>07-July</option>’ + ‘<option … Read more

Custom Fields Bulk Edit

FIRST BACKUP!!!!! NEXT, BE SURE THE BACKUP IS RIGHT Now, you can use this code in PHPMyAdmin UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, ‘preview’, ‘edit’) WHERE meta_key = ‘dp_video_code’ Make sure that’s the correct name of the custom field, you can check it in the wp_postmeta table.

Remove bulk actions based on user role or capabilities

I would do this this way – Just add a new mu plugin or normal plugin: <?php defined( ‘ABSPATH’ ) OR exit; /** Plugin Name: Limit Bulk actions to Editor & Admin */ add_action( ‘wp_loaded’, ‘wpse_53371_remove_bulk_actions’ ); function wpse_53371_remove_bulk_actions() { if ( ! is_admin() ) return; if ( ! current_user_can( ‘delete_others_pages’ ) ) { add_filter( … Read more

Fill post titles from post content?

Hook into the_post – called when the post is actually used – and fill the title. Be aware the slug has to be changed too. If you are used not to enter a title, hook into save_post too, and let the same code do this for you. The code Download on GitHub <?php /** * … Read more

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