No Styling for the datepicker in WordPress admin

Here ya go … try this: /* add jquery ui datepicker and theme */ global $wp_scripts; wp_enqueue_script(‘jquery-ui-datepicker’); $ui = $wp_scripts->query(‘jquery-ui-core’); $url = “https://ajax.aspnetcdn.com/ajax/jquery.ui/{$ui->ver}/themes/redmond/jquery.ui.all.css”; wp_enqueue_style(‘jquery-ui-redmond’, $url, false, $ui->ver); This is what I use in my plugin to load a theme. That CDN has all the basic jquery-ui themes. Hope this helps …

How can I save repeatable fields with one value inside an array?

You are saving only one image and one image caption. Your loop in dsslider_manager_save_extras function loops throught global $custom_meta_fields defined in php file. Not through $_POST variable. Your loop should look something like this: foreach ( $_POST[‘fields’] as $field ) { … } In HTML, the form should look like this <input type=”hidden” name=”fields[$field[ID]]” value=””/> … Read more

Set a User as Author of all ‘New Posts’ posted

function wp84782_replace_author( $post_ID ) { $my_post = array(); $my_post[‘ID’] = $post_ID; $my_post[‘post_author’] = 1 ; //This is the ID number of whatever author you want to assign // Update the post into the database wp_update_post( $my_post ); } add_action( ‘publish_post’, ‘wp84782_replace_author’ ); Update: This hook runs as the post is being published, not after, so … Read more

How is the WordPress.org plugin download history calculated?

I’ve answered a similar Question: Does the number of downloads displayed for a plug-in in the WordPress.org plug-in directory include automatic updates? This is Otto’s blog post in make.wordpress.org with plenty of information about this stats. Excerpts from the whole page (article and comments), worth reading in full: First, on the extend plugin directory, you … Read more

How to hide fields from my user profiles

Since there unfortunately indeed is no filter for this part of the profile, you have got two options, a hypothetically existing plugin aside: 1. Remove the fields with js (as is exemplified with the nickname field below) jQuery(document).ready( function($) { $(‘input#nickname’).closest(‘tr’).remove(); }); 2. Output buffer the generated markup and modify it before serving In absence … Read more

Moving image attachment from post to another?

As far as I know, you’d have to use a combination of built-in functions to achieve this. If there is a plugin, you’d have to research for “Bulk parent” or “Bulk re-attachment”. Unless you have a logic connecting those posts, I think you’d have to do it post by post. Be it with PHPMyAdmin (changing … Read more