Two functions utilizing registration_errors filter

Identifying errors via error code Run add_user_to_SF with an earlier priority, to make it execute first add_filter( ‘registration_errors’, ‘add_user_to_SF’, 9, 3 );` Let’s assume you have two possible errors in your add_user_to_SF: function add_user_to_SF( $errors, $sanitized_user_login, $user_email ) { $has_errors = false; if ( /* some condition that should throw an error */ ) { … Read more

Form Post results in 404 Not Found [duplicate]

I figured it out. Turns out that using the field name was the culprit. It appears that name and other field names like attachment, attachment_id, etc will cause WordPress to produce a 404 error. There’s a whole list of reserved terms in the Codex.

Is there a way to avoid 404 pages in WordPress?

One way to do this is to use the status_header filter. Adding the following to the functions.php file or your theme (or an appropriate plugin file) would do the trick: add_filter( ‘status_header’, ‘your_status_header_function’, 10, 2 ); /** * Substitutes a 202 Accepted header for 404s. * * @param string $status_header The complete status header string … Read more

wp theme.. Could not create directory

If you can log into your host with SSH or FTP, it’s an easy fix. Like the comments said before, check your permissions for the WordPress directory. For example, if you check the hosting directory with ls -al (typically /var/www, as on DigitalOcean), they should look something like this: drwxrwxr-x 6 www-data www-data 4096 Nov … Read more

php console log speed [closed]

If you will write inside the console of your browser, then use one of a lot of helpers or use a small custom function in php. The follow function is easy to use and log inside the console of the browser. if ( ! function_exists( ‘debug_to_console’ ) ) { /** * Simple helper to debug … Read more

Problem with wordpress version 3.8

Deactivate flash album gallery plugin then try again may be this plugin version not match to wordpress latest version. This plugin may not be compatible with wordpress 3.8, you must wait for the new release. Nonetheless, they are just notices you can simply hide these notices by going wp-config.php and toggle WP_DEBUG to false.

TypeError: window.tinyMCE.execInstanceCommand is not a function

https://stackoverflow.com/questions/22813970/typeerror-window-tinymce-execinstancecommand-is-not-a-function Thanks to Scott B In WordPress 3.9, the TinyMCE is updated to version 4, and in TinyMCE 4, the method “execInstanceCommand” has been replaced by the method “execCommand”. For compatibility issue (with old versions of WP), you must be check the TinyMCE version and used the suitable method. In below, i changed your code. … Read more

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