Insert media button will always add into the same tinyMCE editor
As just previously answered, your problem likely simply is that you used the same ID (the 2nd argument for wp_editor() multiple times).
As just previously answered, your problem likely simply is that you used the same ID (the 2nd argument for wp_editor() multiple times).
The ACF documentation says, the native upload of WordPress is triggered, so you can use wp_handle_upload: function my_cool_func() { // whatever it is that you want to do, do it here } // function my_cool_func add_action(‘wp_handle_upload’, ‘my_cool_func’); Or maybe you want/have to hook into add_attachment…
You can go into your media library to view all your attachments. There is an unattached option at the top that shows you media that isn’t connected to any pages or posts. You can then select them for deletion.
Assuming you want to set your weekly changing subdirs like, eg ‘2013/W35’ /where 35 stands for 35th week of 2013 (‘W’ param of php date() function), you can use: add_filter(‘upload_dir’, ‘set_folder_to_week’, 999); function set_folder_to_week ( $upload_data ) { $y = date(‘Y’); $w = ‘W’ . date(‘W’); $subdir = “/$y/$w”; $dir = $upload_data[‘basedir’] . $subdir; $url … Read more
First do a var_dump on the $_FILES variable to check if the array key you are using is the correct one, and you should never just grab a variable that comes from user input and just use it, try doing a isset or empty before you use the variable. After you found what is the … Read more
This plugin should do exactly what you’re looking for: http://wordpress.org/plugins/shortcurl/ it will allow you to embed a shortcode in your post that should go grab external content and place it exactly how you’d like it to. Since it’s not an iFrame, you should also be able to style the content appropriately without much issue (if … Read more
wordpress is not alowing me to upload the swf file into the media library Actually you can insert this code to the functions.php: add_filter(‘upload_mimes’, ‘add_custom_upload_mimes’); function add_custom_upload_mimes($existing_mimes){ $existing_mimes[‘swf’] = ‘text/swf’; //allow swf files return $existing_mimes; } Then you try to upload your swf file to the media library. As for homepage, you can install a … Read more
Isn’t it supposed to use the parent directory’s permissions? No, according to this file permissions n creation are set by apache. You will need to look at your apache config and OS settings to find the reason and fix it. It it might be that your umask parameter is 003 instead of 002.
try this way: function wp128084_upload_dir( $pathdata ) { // change path here return $pathdata; } add_filter(‘upload_dir’, ‘wp128084_upload_dir’); add this where you want to change upload directory then again remove filter to change to default wordpress directory remove_filter(‘upload_dir’, ‘wp128084_upload_dir’);
If u want to just change the upload directory you can use something like this: function wp128084_upload_dir( $pathdata ) { // change path here return $pathdata; } add_filter(‘upload_dir’, ‘wp128084_upload_dir’); and again to remove this you can use this remove_filter(‘upload_dir’, ‘wp128084_upload_dir’);