Allow Profile HTML for select users

You can hook on an early action and apply the filter for your use case: add_action( ‘load-profile.php’, ‘allow_profile_html_wpse_91564’ ); function allow_profile_html_wpse_91564() { global $current_user; if( ‘2’ == $current_user->ID ) remove_filter(‘pre_user_description’, ‘wp_filter_kses’); } The hook load-$pagenow runs in all default admin pages (i.e., not added by a third party), and it’s declared in the file /wp-admin/admin.php. … Read more

Logout via Subdomain, non-wordpress page on a different server?

You can create a file called custom_logout.php and place it in the root wordpress directory. This contains <?php require_once(“wp-load.php”); //load wordpress wp_logout(); //logout exit(); //end page ?> Then in your subdomain site open the url with an anchor tag <a href=”http://youwebsite.com/custom_logout.php”>Logout</a> You can’t create a whitelist easily because it would involve checking where the user … Read more

Setting WP Admin passwords to expire

I was busy writing up a plugin for this without even checking of one already existed. So I did a little research and found out that it does indeed already exist and that the path I was going down was the right one. Well, there’s no need to reinvent the wheel here, so here’s the … Read more

What is the difference between strip_tags and wp_filter_nohtml_kses?

Technical difference is kinda obvious. PHP one is single function, using logic in PHP code. WP one is one of family of functions, based on third party KSES library. Is there practical difference between these two specific functions? I think the important point is that strip_tags() was made for utility, while KSES was made for … Read more

WordPress salts set in config and database

From the WordPress Codex: The secret key is located in two places: the database in case the secret key isn’t defined in the second place, which is in the wp-config.php file. If you are going to set the secret key, then you must do so in the wp-config.php file. The secret key in the database … Read more

How to change WordPress user ID?

Why not make a new account for this user which will generate a new database ID. Then delete the user with the ID of 1 and attribute all posts / content to the new user you created for them? Then you don’t have to worry about queries or messing up your database. Also, as said … Read more

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