New answers tagged

0

I would check the upload_path upload_url_path under your admin options. I suspect they are still referencing the other website. Go to https://yourdomain.com/wp-admin/options.php and scroll down till you get to the the upload_path and upload_url_path.


1

It's not a tab but you might be able to get started with an upload button. Check out pre-upload-ui and some actions that follow. Namely pre-plupload-upload-ui and post-upload-ui. This will add a couple buttons to the 'Upload Files' tab and to 'Media > Add New'. BUTTONS add_action( 'pre-plupload-upload-ui', 'wpse_20160202_pre_plupload_upload_ui' ); ...


0

gmazzap's solution inspired me to write a plugin to do this. You can now filter your media by Taxonomies and Terms with the Media Library Filter plugin.


1

So I've found this WP_Image_Editor in the CodeX. Basically by adding the code below it should automatically resize an image :) Code: $image = wp_get_image_editor( 'cool_image.jpg' ); // Return an implementation that extends WP_Image_Editor if ( ! is_wp_error( $image ) ) { $image->resize( 300, 300, true ); $image->save( 'new_image.jpg' ); } ...


0

A quick and easy way would be to just run a search on your Wordpress site on the name of the image. E.g. your-image.png. This should return a list of all the posts which have that image in it.


0

You can try the following function to insert image to a post. Note: The following function will not make the image "featured image". It will just uploaded the image and attach it to the post. It will return the attachment id if the upload is successful function insert_post_media( $post_id, $url){ $tmp = download_url( $url ); $file_array ...


1

Deleting an image from the WordPress media library will remove the image from the website completely. It will no longer be available to any posts, pages or other content that referenced it.


0

Wordpress supports quite a few embeds including YouTube since WordPress 2.9. To render anywhere, just pass your content through the_content filter and it should automatically convert the urls. $oembedContent = apply_filters( 'the_content', $basicContent ); If the defaults don't meet your needs you can add an oEmbed-Enabled site using ...


0

You can inspire from this tutorial here: http://www.sitepoint.com/adding-a-media-button-to-the-content-editor/ For videos you can change the library type to 'video': function open_media_window() { var window = wp.media({ title: 'Insert a media', library: {type: 'video'}, multiple: false, button: {text: 'Insert'} }); ...



Top 50 recent answers are included