Customizing subject in comment notification e-mails

If I understand you correctly you want to change the subject line of the email. The hook of your code only changes the content of the e-mail. There’s a different hook for the subject: add_filter(‘comment_notification_subject’, ‘wpse_228315_comment_notification_subject’); function wpse_228315_comment_notification_subject($subject, $comment_id){ return “New comment”; }

How to allow HTML tags into WP Bakery (formerly Visual Composer) `textfield` parameter

You need to change the type from textarea to textarea_raw_html: https://kb.wpbakery.com/docs/inner-api/vc_map/ Under the section “Available type values” it says: textarea_raw_html: Text area, its content will be coded into base64 (this allows you to store raw js or raw html code) Although I’m not sure why they can base64 encode the output from this but not … Read more

Reordering themes in admin panel

The get_themes function passes the available themes to the theme list table class and is hardcoded with a call to asort the array, with no filters available anywhere along the way that i can see. So in short, not possible at present due to an absence of hooks(at least as far as my observations go). … Read more

Disable saving comment details (name, e-mail) in cookie?

That is actually dead simple. Cookies are set by wp_set_comment_cookies() and this function is hooked into ‘set_comment_cookies’. Just remove the function from the action: <?php # -*- coding: utf-8 -*- /* Plugin Name: No Comment Cookies */ remove_action( ‘set_comment_cookies’, ‘wp_set_comment_cookies’ ); Download on GitHub.

WordPress URL Rewrite not working

first, you should use the proper filter and method to add query vars and rewrite rules and not manipulate the globals directly. the other issue I believe is your regex pattern, this is working for me: add_filter( ‘query_vars’, ‘wpa59404_query_vars’ ); function wpa59404_query_vars($query_vars){ $query_vars[] = ‘update_slug’; return $query_vars; } add_action( ‘init’, ‘wpa59404_rewrites’ ); function wpa59404_rewrites(){ add_rewrite_rule( … Read more

How to build an API as a plugin

First thing is the add rewrite rule function. You have – add_rewrite_rule(‘^wp-api/pugs/?([0-9]+)?/?’,’index.php?__wp-api=1&pugs=$matches[1]’,’top’); wp-api/pugs/?([0-9]+) this means, when you request <url>/wp-api/pugs/123, you will get a query variable pugs with parameter 123. $var = get_query_var(‘pugs’); // = 123 Now, you don’t really need pugs in the url as per you needs. So, just remove it this way. Also, … Read more

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