Using Vagrant for customizable WordPress Multi-sites [closed]

You can try using the Genesis-Wordpress(Note: not the framework) project for this. It does more or less what you have described above including, Provisioning (with Ansible) Deployment (with Capistrano) Database Synchronization (with custom Capistrano tasks) It also uses the Vagrant Host Manager to workaround the /etc/hosts issue. So the site is served over port 80. … Read more

Add control in image detail panel

You can use this code function your_slug_edit_media_custom_checkbox( $form_fields, $post ) { $form_fields[‘custom_field’] = array( ‘label’ => ‘Custom Field’, ‘input’ => ‘text’, ‘value’ => get_post_meta( $post->ID, ‘_custom_field’, true ) ); return $form_fields; } function your_slug_save_media_custom_field( $post, $attachment ) { update_post_meta( $post[‘ID’], ‘_custom_field’, $attachment[‘custom_field’] ); return $post; } add_filter( ‘attachment_fields_to_edit’, ‘edit_media_custom_checkbox’, 11, 2 ); add_filter( ‘attachment_fields_to_save’, ‘save_media_custom_checkbox’, … Read more

Prevent Deletion of Blogs

You can not stop anything which do not have an explicit option to be stopped. In this case, actions are a mean to execute some additional code in the context of a specific execution path, and not to alter it. If there is no way to signal to the process to stop, than the only … Read more

Allow guests to save favourite pages?

Cookies, or even HTML5 local storage, seem like a good way to implement this. Here’s some basic code that could serve as a starting point. Post IDs are stored as CSV in the cookie. // Load current favourite posts from cookie $favposts = (isset($_COOKIE[‘favposts’])) ? explode(‘,’, (string) $_COOKIE[‘favposts’]) : array(); $favposts = array_map(‘absint’, $favposts); // … Read more

Threaded comments – deleting parent comment leads to orphan comments

Had this problem on a site where commenter’s would post comments to the wrong posts and comment threads, had to move thousands of comments from one post to more appropriate posts on the site. I used this plugin http://wordpress.org/extend/plugins/move-wordpress-comments/ for fixing threading. With the plugin you have the option of turning the child comments into … Read more

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