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.

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

Notify Admins about Plugin Merge

A very helpful question, I think. There are two plugins, for the discussions let’s say: ToBeDeprecated Plugin, and ToBeUplifted Plugin There could be many ways, but these are the points that come to my mind first: Before the Upgrade Seemless Migration In the code of the ToBeUplifted plugin, you should ensure a seamless migration process … Read more

Gutenberg: Error loading block: Invalid parameter(s): attributes but it can be used in the code

The error in question is likely because when you run register_block_type(), you didn’t set the block attributes or that it (which is an array in PHP) doesn’t have the attribute named content. So make sure the attributes are defined in both JavaScript (via registerBlockType()) and PHP (via the above-mentioned function), and that the schema is … Read more

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