Automatic email message after manual user approval

First, add a custom Action Hook that is triggered whenever the user is updated. For example, when custom meta fields are updated in WordPress, some action hooks such as: updated_{$meta_type}_meta, updated_postmeta, etc. So if you’re using the ACF plugin, you can hook into the ‘acf/save_post’ action hook. The action hook lets you do something before … Read more

Save meta box data from selected dropdown list in bbpress reply form

I add a show contents part referring to a workable previous post with link https://bbpress.org/forums/topic/add-custom-text-fields-to-reply-form/. The below code can provide options for the user to selection. But the selection result could not be shown. I am not sure whether the selection result was added into metabox properly because I can not use the debug function. … Read more

I’m including a html file in my plugin, but it can’t find its css or js files

you must use enqueue script and style commands to include wp. for it, look at these links: https://developer.wordpress.org/reference/functions/wp_enqueue_script/ https://developer.wordpress.org/reference/functions/wp_enqueue_style/ also dont use hard php commands like this : <?php echo(__DIR__) ?> there are wp commands for these jobs. you can use below: plugin_dir_path plugins_url plugin_dir_url plugins_url

Enable a role named ‘backend_user’ to access my plugin pages

Adding capabilities to custom user roles. Before adding capabilities please refer to the capability list and existing user roles. https://wordpress.org/support/article/roles-and-capabilities/ Adding user roles without proper knowledge / practical experience can lead your site to different vulnerability and in worst cases it can create back doors. If you are interested in solution only then please jump … Read more

Getting Fatal error: Uncaught Error: Call to undefined function plugin_dir_path() when linking to another file within my wordpress plugin

I solved the problem using the admin_url() wordpress function. In order to link to another page in the plugin or even to another plugin within my project, I did it by passing the registered url to admin_url() function. <a href=”https://wordpress.stackexchange.com/questions/367725/<?php echo admin_url(“admin.php?page=edit-member-page&id=’.$id);?>”>John Smit`h</a> //The $id variable passed to the link will be retrieved by use … Read more