Tag Info

New answers tagged

-1

bang! There you go, I forget the enctype="multipart/form-data" in the from thanks by the way!!! –


0

You need need to update the allowed mime-types that WordPress has in its settings. For zip/rar files: function my_modify_mimes( $mimes ) { $mimes['zip'] = 'application/zip'; $mimes['rar'] = 'application/x-rar-compressed'; return $mimes; } add_filter( 'upload_mimes', 'my_modify_mimes' ); Also, if you are uploading from the front-end you ...


0

Edit: Sorry, I totally read over the specific file part of your question the first time around.. You should take a look at your $_FILES array to determine, if the mime type actually is application/zip, just because your file ends with .zip thats not necessarily true, or if and when what error is returned. You could and probably should - at least for ...


0

Can I fix your code ? $uploaddir = wp_upload_dir(); $file = $_FILES[ ... whatever you have in your POST data ... ]; $uploadfile = $uploaddir['path'] . '/' . basename( $file['name'] ); move_uploaded_file( $file['tmp_name'] , $uploadfile ); $filename = basename( $uploadfile ); $wp_filetype = wp_check_filetype(basename($filename), null ); $attachment = ...


0

Yes, emails are usually considered to belong to back end as far as translations go. There are two way in which you can solve this use the 'gettext' filter to return a different translation for your email text as explained here - http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext Edit the dutch .po translation file to include emails in ...


0

The primary thing you'll need to use here is the save_post hook in WordPress to execute your code right after a post is saved. Read up on the save_post hook on the WordPress codex first and then come back here. The next part is assigning the post to a taxonomy term. This can be done easily with wp_set_post_terms() function. You'll end up with something ...


0

Wild guess, are you using _ (underscore) in your editor ID? If yes, try removing them and use only lowercase letters.. Something like thisismyeditorid. From the Codex.. Note that the ID that is passed to the wp_editor() function can only be composed of lower-case letters. No underscores, no hyphens. Anything else will cause the WYSIWYG editor to ...


1

You have to localize script by using wp_localize_script function. In the admin side ajaxurl is already available. But in front end you have to localize script to define ajaxurl. Example: wp_enqueue_script( 'custom-ajax-request', '/path/to/settings.js', array( 'jquery' ) ); wp_localize_script( 'custom-ajax-request', 'MyAjax', array( 'ajaxurl' => ...



Top 50 recent answers are included