Changeset 2708494
- Timestamp:
- 04/12/2022 10:17:23 AM (4 years ago)
- Location:
- multi-roles-vendor
- Files:
-
- 22 edited
-
tags/1.1/admin/class-multi-roles-vendor-admin.php (modified) (6 diffs)
-
tags/1.1/admin/partials/multi-roles-vendor-admin-display.php (modified) (1 diff)
-
tags/1.1/includes/class-multi-roles-vendor-activator.php (modified) (3 diffs)
-
tags/1.1/includes/class-multi-roles-vendor-deactivator.php (modified) (3 diffs)
-
tags/1.1/includes/class-multi-roles-vendor-i18n.php (modified) (3 diffs)
-
tags/1.1/includes/class-multi-roles-vendor-loader.php (modified) (8 diffs)
-
tags/1.1/includes/class-multi-roles-vendor.php (modified) (18 diffs)
-
tags/1.1/multi-roles-vendor.php (modified) (5 diffs)
-
tags/1.1/public/class-multi-roles-vendor-public.php (modified) (6 diffs)
-
tags/1.1/public/partials/multi-roles-vendor-public-display.php (modified) (1 diff)
-
tags/1.1/uninstall.php (modified) (1 diff)
-
trunk/admin/class-multi-roles-vendor-admin.php (modified) (6 diffs)
-
trunk/admin/partials/multi-roles-vendor-admin-display.php (modified) (1 diff)
-
trunk/includes/class-multi-roles-vendor-activator.php (modified) (3 diffs)
-
trunk/includes/class-multi-roles-vendor-deactivator.php (modified) (3 diffs)
-
trunk/includes/class-multi-roles-vendor-i18n.php (modified) (3 diffs)
-
trunk/includes/class-multi-roles-vendor-loader.php (modified) (8 diffs)
-
trunk/includes/class-multi-roles-vendor.php (modified) (18 diffs)
-
trunk/multi-roles-vendor.php (modified) (4 diffs)
-
trunk/public/class-multi-roles-vendor-public.php (modified) (6 diffs)
-
trunk/public/partials/multi-roles-vendor-public-display.php (modified) (1 diff)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
multi-roles-vendor/tags/1.1/admin/class-multi-roles-vendor-admin.php
r2603170 r2708494 5 5 * 6 6 * @link https://wpwiredin.github.io/plugins/ 7 * @since 1. 0.07 * @since 1.1.0 8 8 * 9 9 * @package Multi_Roles_Vendor … … 26 26 * The ID of this plugin. 27 27 * 28 * @since 1. 0.028 * @since 1.1.0 29 29 * @access private 30 30 * @var string $plugin_name The ID of this plugin. … … 35 35 * The version of this plugin. 36 36 * 37 * @since 1. 0.037 * @since 1.1.0 38 38 * @access private 39 39 * @var string $version The current version of this plugin. … … 44 44 * Initialize the class and set its properties. 45 45 * 46 * @since 1. 0.046 * @since 1.1.0 47 47 * @param string $plugin_name The name of this plugin. 48 48 * @param string $version The version of this plugin. … … 58 58 * Register the stylesheets for the admin area. 59 59 * 60 * @since 1. 0.060 * @since 1.1.0 61 61 */ 62 62 public function enqueue_styles() { … … 82 82 * Register the JavaScript for the admin area. 83 83 * 84 * @since 1. 0.084 * @since 1.1.0 85 85 */ 86 86 public function enqueue_scripts() { -
multi-roles-vendor/tags/1.1/admin/partials/multi-roles-vendor-admin-display.php
r2603173 r2708494 7 7 * 8 8 * @link https://wpwiredin.github.io/plugins/ 9 * @since 1. 0.09 * @since 1.1.0 10 10 * 11 11 * @package Multi_Roles_Vendor -
multi-roles-vendor/tags/1.1/includes/class-multi-roles-vendor-activator.php
r2603170 r2708494 5 5 * 6 6 * @link https://wpwiredin.github.io/plugins/ 7 * @since 1. 0.07 * @since 1.1.0 8 8 * 9 9 * @package Multi_Roles_Vendor … … 16 16 * This class defines all code necessary to run during the plugin's activation. 17 17 * 18 * @since 1. 0.018 * @since 1.1.0 19 19 * @package Multi_Roles_Vendor 20 20 * @subpackage Multi_Roles_Vendor/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1. 0.030 * @since 1.1.0 31 31 */ 32 32 public static function activate() { -
multi-roles-vendor/tags/1.1/includes/class-multi-roles-vendor-deactivator.php
r2603170 r2708494 5 5 * 6 6 * @link https://wpwiredin.github.io/plugins/ 7 * @since 1. 0.07 * @since 1.1.0 8 8 * 9 9 * @package Multi_Roles_Vendor … … 16 16 * This class defines all code necessary to run during the plugin's deactivation. 17 17 * 18 * @since 1. 0.018 * @since 1.1.0 19 19 * @package Multi_Roles_Vendor 20 20 * @subpackage Multi_Roles_Vendor/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1. 0.030 * @since 1.1.0 31 31 */ 32 32 public static function deactivate() { -
multi-roles-vendor/tags/1.1/includes/class-multi-roles-vendor-i18n.php
r2603170 r2708494 8 8 * 9 9 * @link https://wpwiredin.github.io/plugins/ 10 * @since 1. 0.010 * @since 1.1.0 11 11 * 12 12 * @package Multi_Roles_Vendor … … 20 20 * so that it is ready for translation. 21 21 * 22 * @since 1. 0.022 * @since 1.1.0 23 23 * @package Multi_Roles_Vendor 24 24 * @subpackage Multi_Roles_Vendor/includes … … 31 31 * Load the plugin text domain for translation. 32 32 * 33 * @since 1. 0.033 * @since 1.1.0 34 34 */ 35 35 public function load_plugin_textdomain() { -
multi-roles-vendor/tags/1.1/includes/class-multi-roles-vendor-loader.php
r2603170 r2708494 5 5 * 6 6 * @link https://wpwiredin.github.io/plugins/ 7 * @since 1. 0.07 * @since 1.1.0 8 8 * 9 9 * @package Multi_Roles_Vendor … … 27 27 * The array of actions registered with WordPress. 28 28 * 29 * @since 1. 0.029 * @since 1.1.0 30 30 * @access protected 31 31 * @var array $actions The actions registered with WordPress to fire when the plugin loads. … … 36 36 * The array of filters registered with WordPress. 37 37 * 38 * @since 1. 0.038 * @since 1.1.0 39 39 * @access protected 40 40 * @var array $filters The filters registered with WordPress to fire when the plugin loads. … … 45 45 * Initialize the collections used to maintain the actions and filters. 46 46 * 47 * @since 1. 0.047 * @since 1.1.0 48 48 */ 49 49 public function __construct() { … … 57 57 * Add a new action to the collection to be registered with WordPress. 58 58 * 59 * @since 1. 0.059 * @since 1.1.0 60 60 * @param string $hook The name of the WordPress action that is being registered. 61 61 * @param object $component A reference to the instance of the object on which the action is defined. … … 71 71 * Add a new filter to the collection to be registered with WordPress. 72 72 * 73 * @since 1. 0.073 * @since 1.1.0 74 74 * @param string $hook The name of the WordPress filter that is being registered. 75 75 * @param object $component A reference to the instance of the object on which the filter is defined. … … 86 86 * collection. 87 87 * 88 * @since 1. 0.088 * @since 1.1.0 89 89 * @access private 90 90 * @param array $hooks The collection of hooks that is being registered (that is, actions or filters). … … 113 113 * Register the filters and actions with WordPress. 114 114 * 115 * @since 1. 0.0115 * @since 1.1.0 116 116 */ 117 117 public function run() { -
multi-roles-vendor/tags/1.1/includes/class-multi-roles-vendor.php
r2603170 r2708494 8 8 * 9 9 * @link https://wpwiredin.github.io/plugins/ 10 * @since 1. 0.010 * @since 1.1.0 11 11 * 12 12 * @package Multi_Roles_Vendor … … 23 23 * version of the plugin. 24 24 * 25 * @since 1. 0.025 * @since 1.1.0 26 26 * @package Multi_Roles_Vendor 27 27 * @subpackage Multi_Roles_Vendor/includes … … 34 34 * the plugin. 35 35 * 36 * @since 1. 0.036 * @since 1.1.0 37 37 * @access protected 38 38 * @var Multi_Roles_Vendor_Loader $loader Maintains and registers all hooks for the plugin. … … 43 43 * The unique identifier of this plugin. 44 44 * 45 * @since 1. 0.045 * @since 1.1.0 46 46 * @access protected 47 47 * @var string $plugin_name The string used to uniquely identify this plugin. … … 52 52 * The current version of the plugin. 53 53 * 54 * @since 1. 0.054 * @since 1.1.0 55 55 * @access protected 56 56 * @var string $version The current version of the plugin. … … 65 65 * the public-facing side of the site. 66 66 * 67 * @since 1. 0.067 * @since 1.1.0 68 68 */ 69 69 public function __construct() { … … 71 71 $this->version = MULTI_ROLES_VENDOR_VERSION; 72 72 } else { 73 $this->version = '1. 0.0';73 $this->version = '1.1.0'; 74 74 } 75 75 $this->plugin_name = 'multi-roles-vendor'; … … 95 95 * with WordPress. 96 96 * 97 * @since 1. 0.097 * @since 1.1.0 98 98 * @access private 99 99 */ … … 133 133 * with WordPress. 134 134 * 135 * @since 1. 0.0135 * @since 1.1.0 136 136 * @access private 137 137 */ … … 148 148 * of the plugin. 149 149 * 150 * @since 1. 0.0150 * @since 1.1.0 151 151 * @access private 152 152 */ … … 158 158 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); 159 159 $this->loader->add_action( 'admin_menu', $plugin_admin, 'create_menu', 0 ); 160 160 161 161 162 function mrv_save_options() … … 165 166 echo "<script type='text/javascript'>window.history.back()</script>"; 166 167 } 167 168 168 add_action('admin_post_mrv_form', 'mrv_save_options'); 169 169 170 170 171 $user_role_setting = get_option('mrv_user_role', false); 171 172 function mrv_signup_roles( $user_id ) { 173 174 $user = new WP_User( $user_id ); 175 176 if ( isset( $user ) ) 177 $user->add_role( $user_role_setting ); 178 179 } 180 181 add_action( 'user_register', 'mrv_signup_roles'); 172 182 173 } 183 174 … … 186 177 * of the plugin. 187 178 * 188 * @since 1. 0.0179 * @since 1.1.0 189 180 * @access private 190 181 */ … … 196 187 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); 197 188 189 190 191 192 // function mrv_signup_roles( $user_id ) { 193 194 // $user = new WP_User( $user_id ); 195 196 // if ( isset( $user ) ) 197 // $user->add_role( $user_role_setting ); 198 199 // } 200 201 $this->loader->add_action( 'user_register', $plugin_public, 'mrv_signup_roles'); 202 203 198 204 } 199 205 … … 201 207 * Run the loader to execute all of the hooks with WordPress. 202 208 * 203 * @since 1. 0.0209 * @since 1.1.0 204 210 */ 205 211 public function run() { … … 211 217 * WordPress and to define internationalization functionality. 212 218 * 213 * @since 1. 0.0219 * @since 1.1.0 214 220 * @return string The name of the plugin. 215 221 */ … … 221 227 * The reference to the class that orchestrates the hooks with the plugin. 222 228 * 223 * @since 1. 0.0229 * @since 1.1.0 224 230 * @return Multi_Roles_Vendor_Loader Orchestrates the hooks of the plugin. 225 231 */ … … 231 237 * Retrieve the version number of the plugin. 232 238 * 233 * @since 1. 0.0239 * @since 1.1.0 234 240 * @return string The version number of the plugin. 235 241 */ -
multi-roles-vendor/tags/1.1/multi-roles-vendor.php
r2603170 r2708494 10 10 * 11 11 * @link https://wpwiredin.github.io/plugins/ 12 * @since 1. 0.012 * @since 1.1.0 13 13 * @package Multi_Roles_Vendor 14 14 * … … 17 17 * Plugin URI: https://wpwiredin.github.io/plugins/ 18 18 * Description: User Role assigment Plugin for WooCommerce Multivendor Sites 19 * Version: 1. 0.019 * Version: 1.1.0 20 20 * Author: WPWiredIn 21 21 * Author URI: https://wpwiredin.github.io/plugins/ … … 33 33 /** 34 34 * Currently plugin version. 35 * Start at version 1. 0.0 and use SemVer - https://semver.org35 * Start at version 1.1.0 and use SemVer - https://semver.org 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'MULTI_ROLES_VENDOR_VERSION', '1. 0.0' );38 define( 'MULTI_ROLES_VENDOR_VERSION', '1.1.0' ); 39 39 40 40 /** … … 72 72 * not affect the page life cycle. 73 73 * 74 * @since 1. 0.074 * @since 1.1.0 75 75 */ 76 76 function run_multi_roles_vendor() { … … 80 80 81 81 } 82 82 83 run_multi_roles_vendor(); -
multi-roles-vendor/tags/1.1/public/class-multi-roles-vendor-public.php
r2603170 r2708494 5 5 * 6 6 * @link https://wpwiredin.github.io/plugins/ 7 * @since 1. 0.07 * @since 1.1.0 8 8 * 9 9 * @package Multi_Roles_Vendor … … 26 26 * The ID of this plugin. 27 27 * 28 * @since 1. 0.028 * @since 1.1.0 29 29 * @access private 30 30 * @var string $plugin_name The ID of this plugin. … … 35 35 * The version of this plugin. 36 36 * 37 * @since 1. 0.037 * @since 1.1.0 38 38 * @access private 39 39 * @var string $version The current version of this plugin. … … 44 44 * Initialize the class and set its properties. 45 45 * 46 * @since 1. 0.046 * @since 1.1.0 47 47 * @param string $plugin_name The name of the plugin. 48 48 * @param string $version The version of this plugin. … … 55 55 } 56 56 57 public function mrv_signup_roles( $user_id ) { 58 59 $user_role_setting = get_option('mrv_user_role', false); 60 61 $user = new WP_User( $user_id ); 62 63 if ( isset( $user ) ) 64 $user->add_role( $user_role_setting ); 65 66 } 67 57 68 /** 58 69 * Register the stylesheets for the public-facing side of the site. 59 70 * 60 * @since 1. 0.071 * @since 1.1.0 61 72 */ 62 73 public function enqueue_styles() { … … 81 92 * Register the JavaScript for the public-facing side of the site. 82 93 * 83 * @since 1. 0.094 * @since 1.1.0 84 95 */ 85 96 public function enqueue_scripts() { -
multi-roles-vendor/tags/1.1/public/partials/multi-roles-vendor-public-display.php
r2603170 r2708494 7 7 * 8 8 * @link https://wpwiredin.github.io/plugins/ 9 * @since 1. 0.09 * @since 1.1.0 10 10 * 11 11 * @package Multi_Roles_Vendor -
multi-roles-vendor/tags/1.1/uninstall.php
r2603170 r2708494 21 21 * 22 22 * @link https://wpwiredin.github.io/plugins/ 23 * @since 1. 0.023 * @since 1.1.0 24 24 * 25 25 * @package Multi_Roles_Vendor -
multi-roles-vendor/trunk/admin/class-multi-roles-vendor-admin.php
r2603170 r2708494 5 5 * 6 6 * @link https://wpwiredin.github.io/plugins/ 7 * @since 1. 0.07 * @since 1.1.0 8 8 * 9 9 * @package Multi_Roles_Vendor … … 26 26 * The ID of this plugin. 27 27 * 28 * @since 1. 0.028 * @since 1.1.0 29 29 * @access private 30 30 * @var string $plugin_name The ID of this plugin. … … 35 35 * The version of this plugin. 36 36 * 37 * @since 1. 0.037 * @since 1.1.0 38 38 * @access private 39 39 * @var string $version The current version of this plugin. … … 44 44 * Initialize the class and set its properties. 45 45 * 46 * @since 1. 0.046 * @since 1.1.0 47 47 * @param string $plugin_name The name of this plugin. 48 48 * @param string $version The version of this plugin. … … 58 58 * Register the stylesheets for the admin area. 59 59 * 60 * @since 1. 0.060 * @since 1.1.0 61 61 */ 62 62 public function enqueue_styles() { … … 82 82 * Register the JavaScript for the admin area. 83 83 * 84 * @since 1. 0.084 * @since 1.1.0 85 85 */ 86 86 public function enqueue_scripts() { -
multi-roles-vendor/trunk/admin/partials/multi-roles-vendor-admin-display.php
r2603173 r2708494 7 7 * 8 8 * @link https://wpwiredin.github.io/plugins/ 9 * @since 1. 0.09 * @since 1.1.0 10 10 * 11 11 * @package Multi_Roles_Vendor -
multi-roles-vendor/trunk/includes/class-multi-roles-vendor-activator.php
r2603170 r2708494 5 5 * 6 6 * @link https://wpwiredin.github.io/plugins/ 7 * @since 1. 0.07 * @since 1.1.0 8 8 * 9 9 * @package Multi_Roles_Vendor … … 16 16 * This class defines all code necessary to run during the plugin's activation. 17 17 * 18 * @since 1. 0.018 * @since 1.1.0 19 19 * @package Multi_Roles_Vendor 20 20 * @subpackage Multi_Roles_Vendor/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1. 0.030 * @since 1.1.0 31 31 */ 32 32 public static function activate() { -
multi-roles-vendor/trunk/includes/class-multi-roles-vendor-deactivator.php
r2603170 r2708494 5 5 * 6 6 * @link https://wpwiredin.github.io/plugins/ 7 * @since 1. 0.07 * @since 1.1.0 8 8 * 9 9 * @package Multi_Roles_Vendor … … 16 16 * This class defines all code necessary to run during the plugin's deactivation. 17 17 * 18 * @since 1. 0.018 * @since 1.1.0 19 19 * @package Multi_Roles_Vendor 20 20 * @subpackage Multi_Roles_Vendor/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1. 0.030 * @since 1.1.0 31 31 */ 32 32 public static function deactivate() { -
multi-roles-vendor/trunk/includes/class-multi-roles-vendor-i18n.php
r2603170 r2708494 8 8 * 9 9 * @link https://wpwiredin.github.io/plugins/ 10 * @since 1. 0.010 * @since 1.1.0 11 11 * 12 12 * @package Multi_Roles_Vendor … … 20 20 * so that it is ready for translation. 21 21 * 22 * @since 1. 0.022 * @since 1.1.0 23 23 * @package Multi_Roles_Vendor 24 24 * @subpackage Multi_Roles_Vendor/includes … … 31 31 * Load the plugin text domain for translation. 32 32 * 33 * @since 1. 0.033 * @since 1.1.0 34 34 */ 35 35 public function load_plugin_textdomain() { -
multi-roles-vendor/trunk/includes/class-multi-roles-vendor-loader.php
r2603170 r2708494 5 5 * 6 6 * @link https://wpwiredin.github.io/plugins/ 7 * @since 1. 0.07 * @since 1.1.0 8 8 * 9 9 * @package Multi_Roles_Vendor … … 27 27 * The array of actions registered with WordPress. 28 28 * 29 * @since 1. 0.029 * @since 1.1.0 30 30 * @access protected 31 31 * @var array $actions The actions registered with WordPress to fire when the plugin loads. … … 36 36 * The array of filters registered with WordPress. 37 37 * 38 * @since 1. 0.038 * @since 1.1.0 39 39 * @access protected 40 40 * @var array $filters The filters registered with WordPress to fire when the plugin loads. … … 45 45 * Initialize the collections used to maintain the actions and filters. 46 46 * 47 * @since 1. 0.047 * @since 1.1.0 48 48 */ 49 49 public function __construct() { … … 57 57 * Add a new action to the collection to be registered with WordPress. 58 58 * 59 * @since 1. 0.059 * @since 1.1.0 60 60 * @param string $hook The name of the WordPress action that is being registered. 61 61 * @param object $component A reference to the instance of the object on which the action is defined. … … 71 71 * Add a new filter to the collection to be registered with WordPress. 72 72 * 73 * @since 1. 0.073 * @since 1.1.0 74 74 * @param string $hook The name of the WordPress filter that is being registered. 75 75 * @param object $component A reference to the instance of the object on which the filter is defined. … … 86 86 * collection. 87 87 * 88 * @since 1. 0.088 * @since 1.1.0 89 89 * @access private 90 90 * @param array $hooks The collection of hooks that is being registered (that is, actions or filters). … … 113 113 * Register the filters and actions with WordPress. 114 114 * 115 * @since 1. 0.0115 * @since 1.1.0 116 116 */ 117 117 public function run() { -
multi-roles-vendor/trunk/includes/class-multi-roles-vendor.php
r2603170 r2708494 8 8 * 9 9 * @link https://wpwiredin.github.io/plugins/ 10 * @since 1. 0.010 * @since 1.1.0 11 11 * 12 12 * @package Multi_Roles_Vendor … … 23 23 * version of the plugin. 24 24 * 25 * @since 1. 0.025 * @since 1.1.0 26 26 * @package Multi_Roles_Vendor 27 27 * @subpackage Multi_Roles_Vendor/includes … … 34 34 * the plugin. 35 35 * 36 * @since 1. 0.036 * @since 1.1.0 37 37 * @access protected 38 38 * @var Multi_Roles_Vendor_Loader $loader Maintains and registers all hooks for the plugin. … … 43 43 * The unique identifier of this plugin. 44 44 * 45 * @since 1. 0.045 * @since 1.1.0 46 46 * @access protected 47 47 * @var string $plugin_name The string used to uniquely identify this plugin. … … 52 52 * The current version of the plugin. 53 53 * 54 * @since 1. 0.054 * @since 1.1.0 55 55 * @access protected 56 56 * @var string $version The current version of the plugin. … … 65 65 * the public-facing side of the site. 66 66 * 67 * @since 1. 0.067 * @since 1.1.0 68 68 */ 69 69 public function __construct() { … … 71 71 $this->version = MULTI_ROLES_VENDOR_VERSION; 72 72 } else { 73 $this->version = '1. 0.0';73 $this->version = '1.1.0'; 74 74 } 75 75 $this->plugin_name = 'multi-roles-vendor'; … … 95 95 * with WordPress. 96 96 * 97 * @since 1. 0.097 * @since 1.1.0 98 98 * @access private 99 99 */ … … 133 133 * with WordPress. 134 134 * 135 * @since 1. 0.0135 * @since 1.1.0 136 136 * @access private 137 137 */ … … 148 148 * of the plugin. 149 149 * 150 * @since 1. 0.0150 * @since 1.1.0 151 151 * @access private 152 152 */ … … 158 158 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); 159 159 $this->loader->add_action( 'admin_menu', $plugin_admin, 'create_menu', 0 ); 160 160 161 161 162 function mrv_save_options() … … 165 166 echo "<script type='text/javascript'>window.history.back()</script>"; 166 167 } 167 168 168 add_action('admin_post_mrv_form', 'mrv_save_options'); 169 169 170 170 171 $user_role_setting = get_option('mrv_user_role', false); 171 172 function mrv_signup_roles( $user_id ) { 173 174 $user = new WP_User( $user_id ); 175 176 if ( isset( $user ) ) 177 $user->add_role( $user_role_setting ); 178 179 } 180 181 add_action( 'user_register', 'mrv_signup_roles'); 172 182 173 } 183 174 … … 186 177 * of the plugin. 187 178 * 188 * @since 1. 0.0179 * @since 1.1.0 189 180 * @access private 190 181 */ … … 196 187 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); 197 188 189 190 191 192 // function mrv_signup_roles( $user_id ) { 193 194 // $user = new WP_User( $user_id ); 195 196 // if ( isset( $user ) ) 197 // $user->add_role( $user_role_setting ); 198 199 // } 200 201 $this->loader->add_action( 'user_register', $plugin_public, 'mrv_signup_roles'); 202 203 198 204 } 199 205 … … 201 207 * Run the loader to execute all of the hooks with WordPress. 202 208 * 203 * @since 1. 0.0209 * @since 1.1.0 204 210 */ 205 211 public function run() { … … 211 217 * WordPress and to define internationalization functionality. 212 218 * 213 * @since 1. 0.0219 * @since 1.1.0 214 220 * @return string The name of the plugin. 215 221 */ … … 221 227 * The reference to the class that orchestrates the hooks with the plugin. 222 228 * 223 * @since 1. 0.0229 * @since 1.1.0 224 230 * @return Multi_Roles_Vendor_Loader Orchestrates the hooks of the plugin. 225 231 */ … … 231 237 * Retrieve the version number of the plugin. 232 238 * 233 * @since 1. 0.0239 * @since 1.1.0 234 240 * @return string The version number of the plugin. 235 241 */ -
multi-roles-vendor/trunk/multi-roles-vendor.php
r2603201 r2708494 10 10 * 11 11 * @link https://wpwiredin.github.io/plugins/ 12 * @since 1. 0.012 * @since 1.1.0 13 13 * @package Multi_Roles_Vendor 14 14 * … … 33 33 /** 34 34 * Currently plugin version. 35 * Start at version 1. 0.0 and use SemVer - https://semver.org35 * Start at version 1.1.0 and use SemVer - https://semver.org 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'MULTI_ROLES_VENDOR_VERSION', '1. 0.0' );38 define( 'MULTI_ROLES_VENDOR_VERSION', '1.1.0' ); 39 39 40 40 /** … … 72 72 * not affect the page life cycle. 73 73 * 74 * @since 1. 0.074 * @since 1.1.0 75 75 */ 76 76 function run_multi_roles_vendor() { … … 80 80 81 81 } 82 82 83 run_multi_roles_vendor(); -
multi-roles-vendor/trunk/public/class-multi-roles-vendor-public.php
r2603170 r2708494 5 5 * 6 6 * @link https://wpwiredin.github.io/plugins/ 7 * @since 1. 0.07 * @since 1.1.0 8 8 * 9 9 * @package Multi_Roles_Vendor … … 26 26 * The ID of this plugin. 27 27 * 28 * @since 1. 0.028 * @since 1.1.0 29 29 * @access private 30 30 * @var string $plugin_name The ID of this plugin. … … 35 35 * The version of this plugin. 36 36 * 37 * @since 1. 0.037 * @since 1.1.0 38 38 * @access private 39 39 * @var string $version The current version of this plugin. … … 44 44 * Initialize the class and set its properties. 45 45 * 46 * @since 1. 0.046 * @since 1.1.0 47 47 * @param string $plugin_name The name of the plugin. 48 48 * @param string $version The version of this plugin. … … 55 55 } 56 56 57 public function mrv_signup_roles( $user_id ) { 58 59 $user_role_setting = get_option('mrv_user_role', false); 60 61 $user = new WP_User( $user_id ); 62 63 if ( isset( $user ) ) 64 $user->add_role( $user_role_setting ); 65 66 } 67 57 68 /** 58 69 * Register the stylesheets for the public-facing side of the site. 59 70 * 60 * @since 1. 0.071 * @since 1.1.0 61 72 */ 62 73 public function enqueue_styles() { … … 81 92 * Register the JavaScript for the public-facing side of the site. 82 93 * 83 * @since 1. 0.094 * @since 1.1.0 84 95 */ 85 96 public function enqueue_scripts() { -
multi-roles-vendor/trunk/public/partials/multi-roles-vendor-public-display.php
r2603170 r2708494 7 7 * 8 8 * @link https://wpwiredin.github.io/plugins/ 9 * @since 1. 0.09 * @since 1.1.0 10 10 * 11 11 * @package Multi_Roles_Vendor -
multi-roles-vendor/trunk/uninstall.php
r2603170 r2708494 21 21 * 22 22 * @link https://wpwiredin.github.io/plugins/ 23 * @since 1. 0.023 * @since 1.1.0 24 24 * 25 25 * @package Multi_Roles_Vendor
Note: See TracChangeset
for help on using the changeset viewer.