Version of jQuery In WordPress Failing Security Audit

You can add the following in your functions.php file to deregister the old included jQuery and register the new jQuery. Using a newer version of jQuery might make some plugins stop working, so you’ll have to check to see if all your plugins will work with the newer version. function mytheme_register_scripts() { wp_deregister_script( ‘jquery’ ); … Read more

wordpress file upload from direct directory not working

I fix this problems with wordpress file upload method: php file: add_action( ‘wp_ajax_file_upload’, ‘file_upload_callbacks’ ); add_action( ‘wp_ajax_nopriv_file_upload’, ‘file_upload_callbacks’ ); function file_upload_callbacks() { $arr_img_ext = array(‘application/pdf’); if (in_array($_FILES[‘file’][‘type’], $arr_img_ext)) { $upload = wp_upload_bits($_FILES[“file”][“name”], null, file_get_contents($_FILES[“file”][“tmp_name”])); //$upload[‘url’] will gives you uploaded file path //var_dump($upload[‘url’]); wp_send_json( $upload[‘url’] ); } wp_die(); }

$ not defined using jQuery in WordPress

You can wrap your javascript inside a self-invoking function, then pass jQuery as an argument to it, using $ as the local variable name. For example: (function($) { $(document).ready(function(){ $(“ul.vimeo_desc_feed li a”).click(function(){ alert($(this).attr(‘href’)); return false; }) }); }(jQuery)); should work as intended. If I remember correctly the WP-supplied version of jQuery (the one you get … Read more

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