Help with WordPress RSS Validation Error

If you look at the validator output, you will see there is a little red arrow pointing to the space between “knows” and “me”. Copy “knows me” to a simple text editor like Notepad and you will see that the blank space consists of two characters, a space and an unknown invisible one. To get … Read more

Restrict certain roles registrations by domain

You’ll want to checkout the registration_errors filter. Make sure the role is being posted within the particular registration form. Instead of conditionally adding your action you have to check within the filter if role and email are valid. add_action( ‘registration_errors’, ‘wpse_248123_registration_errors’ ); function wpse_248123_registration_errors( $sanitized_user_login, $user_email, $errors ) { if ( empty( $_POST[‘role’] ) ) … Read more

Allow users to register on multisite through WooCommerce using the same email address

There is the option that you don’t allow the user to register on the main site, allowing them to register on the subsite only. The plugin network-subsite-user-registration allows this, if the user is already registered on the network then they are automatically added, by the plugin, to the site requesting registration. The hook that does … Read more

Passing form data on submit

First check that it’s not empty, then typecast to a string value as a security precaution, because it’s always possible for this to be submitted as an array; e.g., by an attacker. Then unslash, sanitize, and continue by checking length and anything else that you’d like to validate. if ( ! empty( $_POST[‘contact_msg’] ) ){ … Read more

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