How to set the default embed image size

If you add this to functions.php, this will update the options as set. function custom_image_size() { // Set default values for the upload media box update_option(‘image_default_align’, ‘center’ ); update_option(‘image_default_size’, ‘large’ ); } add_action(‘after_setup_theme’, ‘custom_image_size’); You can update the options as you need.

display image size in media library screen

Code based on Custom Sortable Columns add_filter(‘manage_upload_columns’, ‘size_column_register’); function size_column_register($columns) { $columns[‘dimensions’] = ‘Dimensions’; return $columns; } add_action(‘manage_media_custom_column’, ‘size_column_display’, 10, 2); function size_column_display($column_name, $post_id) { if( ‘dimensions’ != $column_name || !wp_attachment_is_image($post_id)) return; list($url, $width, $height) = wp_get_attachment_image_src($post_id, ‘full’); echo esc_html(“{$width}×{$height}”); }

Media Upload Folder – how to manage

A simple answer is that you can remove 2 unused sizes by enter 0 for their width or height. For example, you need only the small thumbnail 150×150 and full-sized image, so enter 0 for width and height of Medium and Large sizez.

How can you change the ‘Insert into Post’ title in the media button?

add_filter(“attribute_escape”, “myfunction”, 10, 2); function myfunction($safe_text, $text) { return str_replace(“Insert into Post”, “Use this image”, $text); } Place in your theme functions file of in a plugin file. The first usable filter that this button hits is on the function esc_attr(). So what that code will do is find any instance of Insert into Post … Read more

Replace audio/video enclosure with player?

I believe part of what you’re looking for is the WP_Embed class defined in wp-includes/media.php. It implements a framework for automatically replacing urls with the output of embed handlers. I’m afraid you’ll have to do the deeper research yourself (this was apparently introduces in 2.9.0, so documentation might still be thin). I doubt WordPress core … Read more

Insert images to post not working

Have you enabled debugging in wp-config.php change define(‘WP_DEBUG’, false); to define(‘WP_DEBUG’, true); This will cause WordPress and php to generate a lot more error messages. With very little detail to go on, my first guess would be file permissions on the upload directory on your server.

Customizing the 3.5 “Add Media” popup (Backbone.js)

I had do adapt Backbone for a project of mine, so I might help to get you started. If you want to adapt the rendering of your Backbone Templates, you need to rewrite them, because there are no built in filters for existing Templates. add_action(‘print_media_templates’, ‘print_my_media_templates’); function print_my_media_templates() { ?> <script type=”text/html” id=”my-custom-template”> //TODO: Copy … Read more

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