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

Customizing gallery shortcode in 3.5

Make sure that the javascript loaded by your load-scripts.php is waiting for the document to finish loading before attaching all of the listeners. When you created a separate function the code ran only a tiny bit earlier, but it was probably early enough for the elements to finish loading and the listeners to properly attach.

Add more rows on media picker

my plugin: http://wordpress.org/extend/plugins/mediapicker-more-rows/ I found a way to fix the pagination There is a way you can ‘hook’ into paginate_links. There is no official hook for it, but you can change the $wp_query->found_posts variable. What I did here is ‘hooking’ into the paginate_links by abusing the media_upload_mime_type_links filter and setting a new value for $wp_query->found_posts. … Read more

Removing fields from the Media Uploader/Gallery

You can do this via a filter. Add the following to functions.php. You can also add your own fields this way… // edit fields in media upload area add_filter(‘attachment_fields_to_edit’, ‘remove_media_upload_fields’, 10000, 2); function remove_media_upload_fields( $form_fields, $post ) { // remove unnecessary fields unset( $form_fields[‘image-size’] ); unset( $form_fields[‘post_excerpt’] ); unset( $form_fields[‘post_content’] ); unset( $form_fields[‘url’] ); unset( … Read more

how to redirect to a custom password retrieval page

not sure i really follow you either, BUT what about filtering the wp_lostpassword_url from wp-includes/general-template.php function wp_lostpassword_url( $redirect=”” ) { $args = array( ‘action’ => ‘lostpassword’ ); if ( !empty($redirect) ) { $args[‘redirect_to’] = $redirect; } $lostpassword_url = add_query_arg( $args, network_site_url(‘wp-login.php’, ‘login’) ); return apply_filters( ‘lostpassword_url’, $lostpassword_url, $redirect ); } looks like it has a … Read more

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