How to upload thousands of images?
I would use a Plugin like Add from Server. This allows you to import all your images into the media library. You just have to upload them to a folder on your server first.
I would use a Plugin like Add from Server. This allows you to import all your images into the media library. You just have to upload them to a folder on your server first.
// add the schedule event if it has been removed if( ! wp_next_scheduled( ‘mg_remove_old_entries’ ) ) { wp_schedule_event( time(), ‘daily’, ‘mg_remove_old_entries’ ); //run the event daily } // action hooked to fired with wordpress cron job add_action( ‘mg_remove_old_entries’, ‘mg_remove_old_entries’ ); function mg_remove_old_entries() { $posts = get_posts( [ ‘numberposts’ => -1, ‘post_type’ => ‘vfb_entry’, ‘date_query’ => … Read more
No, there isn’t such an API, but if you’d like one you can: Build it yourself Open a ticket on WP Core Trac But putting that aside, if you need to delete, create, or update 1 million posts or something of a similar scale, doing it via the frontend is not a good thing, even … Read more
You can use the Search Regex plugin. This will allow you to create a regular expression to intelligently search and replace across all of your posts. After you activate the plugin, go to Tools, Search Regex. If you want to remove all links to http://example.com, here is one regular expression you could try: /<a href=”http:\/\/example\.com[^>]*>([\s\S]*?)<\/a>/ … Read more
A more reliable approach than messing with CSS would be to add some Javascript in the admin_head action, and basically override the built-in “inlineEditPost” function (located in wp-admin/js/inline-edit-post.js and easier to read in inline-edit-post.dev.js). I haven’t looked into it much specifically, but the brute force method would be to copy (and rename) that entire function … Read more
You’re seeing $action empty because there is a redirect from wp-admin/edit.php. So, the output you are seeing is after the redirect. Use, die() after echo $action to see the output before the redirect.
Understand hierarchy, You don’t need to redirect as form are posting values on same page. function process_bulk_action() { // Some security check code here // Get the bulk action $action = $this->current_action(); if ($action == ‘bulk_trash’) { // Code for the “delete process” $delete_ids = esc_sql($_POST[‘bulk-delete’]); //loop over the array of record ids foreach($delete_ids as … Read more
A quick google search yielded these results for me: https://premium.wpmudev.org/blog/wordpresss-bulk-edit/ https://wordpress.org/plugins/custom-bulkquick-edit/ https://wordpress.org/plugins/tags/bulk-edit/ I am sure there is a way, but I do not think that there is a WP API for that (like options API or transients API, etc…). Maybe you can see what these free plugins are doing and how. Edit: I found the … Read more
How to hook in to bulk trash posts
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