Admin page: form with enctype=”multipart/form-data” does not transfer its data

If you want to upload in a custom folder you can use the following function. Add the function in functions.php function upload_user_file( $file = array(),$path ) { if(!empty($file)) { $upload_dir=$path; $uploaded=move_uploaded_file($file[‘tmp_name’], $upload_dir.$file[‘name’]); if($uploaded) { echo “uploaded successfully “; }else { echo “some error in upload ” ;print_r($file[‘error’]); } } } Make a form in your … Read more

Best way to notify WordPress plugin users of new release candidates for beta testing?

After no answers for a long-term solution, I have developed a solution called the WP247 Extension Notification System. It is comprised of two plugins that are in the WordPress plugin directory: A “Server” plugin called WP247 Extension Notification Server that runs on the extension developer’s website to compose and distribute notices. A “Client” plugin called … Read more

How to have the right design for a custom post type without accessing themes

Assuming that your custom post type is “songs”, I guess what you need is something like this: First, allow the theme to provide a design / template file for your custom post type, if WordPress can’t find one, fall back to your design, which you provided in your plugin folder. <?php // Template Logic: function … Read more

Configuring WordPress Auth Cookie Expiration

Note that you’re not adding any filter callback with: apply_filters( ‘auth_cookie_expiration’, $expiration ); Instead use: add_filter( ‘auth_cookie_expiration’, $callback, 10, 3 ); where $callback is the appropriate filter callback that modifies the expiration. Here’s an example add_filter( ‘auth_cookie_expiration’, function( $length, $user_id, $remember ) { return $length; // adjust this to your needs. }, 10, 3 ); … Read more