Unexpected Output: register_activation_hook with namespace

When we are outside the Sample namespace, we should call the function by \Sample\sp_activate(), so please try the following: <?php /** * Plugin Name: Sample Plugin * Version: 0.0.2 */ namespace Sample; \register_activation_hook( __FILE__, ‘\Sample\sp_activate’ ); function sp_activate() { } If something is printed out during the plugin activation it will result in unexpected output … Read more

Removing warnings and notices from production servers

As many have already commented, it is better to fix the source of the issue than to hide the messages. That said, these types of messages should never be displayed on production server but, since you just never know, it is also a good idea to disable them on all servers (local development machine, development … Read more

tb_show is not defined in advance custom field

Did you also add wp_enqueue_script(‘media-upload’) in functions.php ? I tried this and it’s working: function load_admin_things() { wp_enqueue_script(‘media-upload’); wp_enqueue_script(‘thickbox’); wp_enqueue_style(‘thickbox’); } add_action( ‘admin_enqueue_scripts’, ‘load_admin_things’ );

Why is my Gutenberg block returning an error after initial save?

The main issue in your code is with these two attributes which use the exact same selector (the first span element in your block content): checkListItemOne: { type: ‘string’, source: ‘html’, selector: ‘span’ // same as below }, checkListItemTwo: { type: ‘string’, source: ‘html’, selector: ‘span’ // same as above } Which means the block … Read more

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