Can admin-ajax.php be used for spam purposes? And if yes, how to prevent that?

This is why you use nonces. $.ajax({ type: “POST”, url: ‘/wp-admin/admin-ajax.php’, data: { action: ‘mail_function’, message: ‘test’, _nonce: <?php echo wp_create_nonce( ‘mail_function_’ . $post->ID ) ?>}, dataType: “html”, success: function(data) { } }); Then in your PHP function: function my_ajax_mailer() { if ( ! wp_verify_nonce( $_REQUEST[‘_nonce’], ‘mail_function_’ . $post->ID ) ) return; // send mail… … Read more

Unable to access my plugins [closed]

add this line to your wp-config.php file: define(‘WP_MEMORY_LIMIT’, ’64M’); OR If you have access to your PHP.ini file, change the line in PHP.ini If your line shows 32M try 64M: memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

wp-admin blank page after admin login and all security off

WP 4.1.1 seems to need a lot more memory than previous versions. Just add define(‘WP_MEMORY_LIMIT’, ‘256M’); in your wp-config.php file just before the /* Stop editing */ comment line and you should get rid of the blank screens. If you can’t access that much memory, go for less, but from my tests the minimum required … Read more

Is it possible to tell if a user is logged into WordPress from looking at the cookies which are set?

You could use Javascript <script type=”text/javascript”> function getCookie(c_name) { var i,x,y,ARRcookies=document.cookie.split(“;”); for (i=0;i<ARRcookies.length;i++) { x=ARRcookies[i].substr(0,ARRcookies[i].indexOf(“=”)); y=ARRcookies[i].substr(ARRcookies[i].indexOf(“=”)+1); x=x.replace(/^\s+|\s+$/g,””); if (x==c_name) { return unescape(y); } } } var logged_in=getCookie(“wordpress_logged_in_[HASH]”); if (logged_in!=null && logged_in!=””) { alert(“You are logged in!”); } else { alert(“You are logged out!”); } </script> NOTE: WordPress logged in cookie info can be found here. … Read more

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