plugin_dir_path wrong url
because you are using the wrong function. You should use: plugin_dir_url( __FILE__ ) . ‘images/bag.png’; Also remove the extra forward slash before images: /images
because you are using the wrong function. You should use: plugin_dir_url( __FILE__ ) . ‘images/bag.png’; Also remove the extra forward slash before images: /images
Turns out, you need to manually add the wrapper class in the edit function. Here’s the source – https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#classname I changed this line – <section className={`text-section-one`} style={{ backgroundColor: `${bgColor}`}} > to <section className= { `${props.className} text-section-one`} style={{ backgroundColor: `${bgColor}`}} > and it solved problem.
There’s no way to do this without a bit of programming. You need to look at these pieces: A WordPress hook like save_post lets you do something when a post is saved or updated wp_mail is how you send an email get_field is how you look at the value of an ACF field. You’d need … Read more
That’s not how register_activation_hook works. register_activation_hook is called only once, when the plugin is activated. CPT’s however need to be registered on every single request, not just when the plugin is activated. This is because WP doesn’t store a list of CPT’s in the database, it’s generated at runtime by PHP code. So instead, register … Read more
You’ve forgotten the https://. This will happen in any HTML where you don’t add the protocol to a URL. Nothing to do with WordPress. However, you should use esc_url() when outputting user entered values into a link, to make sure the output is a valid URL, even if the user makes this same mistake: <a … Read more
Fixed! function Setting_() { register_setting( ‘Set_my_options’, ‘My_plugin_header_logo’ ); register_setting( ‘Set_my_options’, ‘My_plugin_links_facebook’ ); register_setting( ‘Set_my_options’, ‘My_plugin_links_youtube’ ); register_setting( ‘Set_my_options’, ‘My_plugin_links_email’ ); register_setting( ‘Set_my_options’, ‘My_plugin_links_instagram’ ); } add_action( ‘admin_init’, ‘Setting_’ ); settings_fields( ‘Set_my_options’ );
Try https://hackertarget.com/vulnerability-scanner/ it has many other testing tools as well, some are free and others paid.
Depending on your context, wp_die() will behave differently. This means if you’re inside an AJAX request it will do something else than say a standard http request. So depending on from where you’re actually calling it, this can make a difference. Say you’re in a normal http request, then it will call _default_wp_die_handler() which besides … Read more
This is your problem: public function listLayout() { return require( $this->plugin_path . “/admin/itemList.php” ); } Shortcodes need to return their output as a string, but this does not. The shortcode is outputting directly, rather than being output at the correct time by WordPress. This would become very apparent if nested shortcodes were used as the … Read more
On WordPress’ Detailed Plugin Guidelines page, I found a link to the Block Specific Plugin Guidelines. I would recommend you read both before you add your plugin. Edited to add: re: Subversion; it appears that you initially upload your plugin as a zip file. If & when your plugin is approved, WordPress will provide a … Read more