RTL/LTR frontend switcher

Ok. I resolved it in this way. Let’s say that we have a CSS-file rtl.css, which contains rules for right-to-left content direction. Add menu items: Appearance->Menus->Select a menu to edit->Edit menus->Custom links. URL – ?language=rlt (or something like this), Link text – RTL (for example) URL – ?language=ltr, Link text – LTR Create a plugin: … Read more

limit file type and file size using media_handle_upload

Use PHP // Check that the nonce is valid, and the user can edit this post. if (isset( $_POST[‘my_image_upload_nonce’] ) && wp_verify_nonce( $_POST[‘my_image_upload_nonce’], ‘my_image_upload’ ) ){ // Input type file name $image_input_name=”my_image_upload”; // Allowed image types $allowed_image_types = array(‘image/jpeg’,’image/png’); // Maximum size in bytes $max_image_size = 1000 * 1000; // 1 MB (approx) // Check … Read more

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