WP welcome email depending on user role

Roles are assigned by the admin (or automatically by some theme or plugin) and therefor can not be assigned before the user is manageable by the admin, which doesn’t happen before all the activation stages are completed. Therefor there is not enough info at the signup stage about the user role and you need to … Read more

wp_dropdown_roles() to replace option value = code

The wp_dropdown_roles() function internally uses get_editable_roles() to fetch the needed roles. It does nothing else than fetching the roles from the global: $all_roles = $GLOBALS[‘wp_roles’]->roles; and filter it afterwards: return apply_filters( ‘editable_roles’, $all_roles ); So you can simply add the following function to a plugin or your functions.php file of your theme: function wpse137935_filter_editable_roles( Array … Read more

How to make the Newsletter plugin visible to users with author privileges?

The plugin contains for example these lines: add_menu_page(‘Newsletter’, ‘Newsletter’, ($this->options[‘editor’] == 1) ? ‘manage_categories’ : ‘manage_options’, ‘newsletter_main_index’); add_submenu_page(‘newsletter_main_index’, $title, $title, ($newsletter->options[‘editor’] == 1) ? ‘manage_categories’ : ‘manage_options’, $name, $name); add_submenu_page(null, $title, $title, ($newsletter->options[‘editor’] == 1) ? ‘manage_categories’ : ‘manage_options’, $name, $name); so it looks like you have the option to display the Newsletter menu for … Read more

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