Plugin Directory

Changeset 2708494


Ignore:
Timestamp:
04/12/2022 10:17:23 AM (4 years ago)
Author:
wpwiredin
Message:

bug fixes, 1.1, public class, roles assignment function

Location:
multi-roles-vendor
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • multi-roles-vendor/tags/1.1/admin/class-multi-roles-vendor-admin.php

    r2603170 r2708494  
    55 *
    66 * @link       https://wpwiredin.github.io/plugins/
    7  * @since      1.0.0
     7 * @since      1.1.0
    88 *
    99 * @package    Multi_Roles_Vendor
     
    2626     * The ID of this plugin.
    2727     *
    28      * @since    1.0.0
     28     * @since    1.1.0
    2929     * @access   private
    3030     * @var      string    $plugin_name    The ID of this plugin.
     
    3535     * The version of this plugin.
    3636     *
    37      * @since    1.0.0
     37     * @since    1.1.0
    3838     * @access   private
    3939     * @var      string    $version    The current version of this plugin.
     
    4444     * Initialize the class and set its properties.
    4545     *
    46      * @since    1.0.0
     46     * @since    1.1.0
    4747     * @param      string    $plugin_name       The name of this plugin.
    4848     * @param      string    $version    The version of this plugin.
     
    5858     * Register the stylesheets for the admin area.
    5959     *
    60      * @since    1.0.0
     60     * @since    1.1.0
    6161     */
    6262    public function enqueue_styles() {
     
    8282     * Register the JavaScript for the admin area.
    8383     *
    84      * @since    1.0.0
     84     * @since    1.1.0
    8585     */
    8686    public function enqueue_scripts() {
  • multi-roles-vendor/tags/1.1/admin/partials/multi-roles-vendor-admin-display.php

    r2603173 r2708494  
    77 *
    88 * @link       https://wpwiredin.github.io/plugins/
    9  * @since      1.0.0
     9 * @since      1.1.0
    1010 *
    1111 * @package    Multi_Roles_Vendor
  • multi-roles-vendor/tags/1.1/includes/class-multi-roles-vendor-activator.php

    r2603170 r2708494  
    55 *
    66 * @link       https://wpwiredin.github.io/plugins/
    7  * @since      1.0.0
     7 * @since      1.1.0
    88 *
    99 * @package    Multi_Roles_Vendor
     
    1616 * This class defines all code necessary to run during the plugin's activation.
    1717 *
    18  * @since      1.0.0
     18 * @since      1.1.0
    1919 * @package    Multi_Roles_Vendor
    2020 * @subpackage Multi_Roles_Vendor/includes
     
    2828     * Long Description.
    2929     *
    30      * @since    1.0.0
     30     * @since    1.1.0
    3131     */
    3232    public static function activate() {
  • multi-roles-vendor/tags/1.1/includes/class-multi-roles-vendor-deactivator.php

    r2603170 r2708494  
    55 *
    66 * @link       https://wpwiredin.github.io/plugins/
    7  * @since      1.0.0
     7 * @since      1.1.0
    88 *
    99 * @package    Multi_Roles_Vendor
     
    1616 * This class defines all code necessary to run during the plugin's deactivation.
    1717 *
    18  * @since      1.0.0
     18 * @since      1.1.0
    1919 * @package    Multi_Roles_Vendor
    2020 * @subpackage Multi_Roles_Vendor/includes
     
    2828     * Long Description.
    2929     *
    30      * @since    1.0.0
     30     * @since    1.1.0
    3131     */
    3232    public static function deactivate() {
  • multi-roles-vendor/tags/1.1/includes/class-multi-roles-vendor-i18n.php

    r2603170 r2708494  
    88 *
    99 * @link       https://wpwiredin.github.io/plugins/
    10  * @since      1.0.0
     10 * @since      1.1.0
    1111 *
    1212 * @package    Multi_Roles_Vendor
     
    2020 * so that it is ready for translation.
    2121 *
    22  * @since      1.0.0
     22 * @since      1.1.0
    2323 * @package    Multi_Roles_Vendor
    2424 * @subpackage Multi_Roles_Vendor/includes
     
    3131     * Load the plugin text domain for translation.
    3232     *
    33      * @since    1.0.0
     33     * @since    1.1.0
    3434     */
    3535    public function load_plugin_textdomain() {
  • multi-roles-vendor/tags/1.1/includes/class-multi-roles-vendor-loader.php

    r2603170 r2708494  
    55 *
    66 * @link       https://wpwiredin.github.io/plugins/
    7  * @since      1.0.0
     7 * @since      1.1.0
    88 *
    99 * @package    Multi_Roles_Vendor
     
    2727     * The array of actions registered with WordPress.
    2828     *
    29      * @since    1.0.0
     29     * @since    1.1.0
    3030     * @access   protected
    3131     * @var      array    $actions    The actions registered with WordPress to fire when the plugin loads.
     
    3636     * The array of filters registered with WordPress.
    3737     *
    38      * @since    1.0.0
     38     * @since    1.1.0
    3939     * @access   protected
    4040     * @var      array    $filters    The filters registered with WordPress to fire when the plugin loads.
     
    4545     * Initialize the collections used to maintain the actions and filters.
    4646     *
    47      * @since    1.0.0
     47     * @since    1.1.0
    4848     */
    4949    public function __construct() {
     
    5757     * Add a new action to the collection to be registered with WordPress.
    5858     *
    59      * @since    1.0.0
     59     * @since    1.1.0
    6060     * @param    string               $hook             The name of the WordPress action that is being registered.
    6161     * @param    object               $component        A reference to the instance of the object on which the action is defined.
     
    7171     * Add a new filter to the collection to be registered with WordPress.
    7272     *
    73      * @since    1.0.0
     73     * @since    1.1.0
    7474     * @param    string               $hook             The name of the WordPress filter that is being registered.
    7575     * @param    object               $component        A reference to the instance of the object on which the filter is defined.
     
    8686     * collection.
    8787     *
    88      * @since    1.0.0
     88     * @since    1.1.0
    8989     * @access   private
    9090     * @param    array                $hooks            The collection of hooks that is being registered (that is, actions or filters).
     
    113113     * Register the filters and actions with WordPress.
    114114     *
    115      * @since    1.0.0
     115     * @since    1.1.0
    116116     */
    117117    public function run() {
  • multi-roles-vendor/tags/1.1/includes/class-multi-roles-vendor.php

    r2603170 r2708494  
    88 *
    99 * @link       https://wpwiredin.github.io/plugins/
    10  * @since      1.0.0
     10 * @since      1.1.0
    1111 *
    1212 * @package    Multi_Roles_Vendor
     
    2323 * version of the plugin.
    2424 *
    25  * @since      1.0.0
     25 * @since      1.1.0
    2626 * @package    Multi_Roles_Vendor
    2727 * @subpackage Multi_Roles_Vendor/includes
     
    3434     * the plugin.
    3535     *
    36      * @since    1.0.0
     36     * @since    1.1.0
    3737     * @access   protected
    3838     * @var      Multi_Roles_Vendor_Loader    $loader    Maintains and registers all hooks for the plugin.
     
    4343     * The unique identifier of this plugin.
    4444     *
    45      * @since    1.0.0
     45     * @since    1.1.0
    4646     * @access   protected
    4747     * @var      string    $plugin_name    The string used to uniquely identify this plugin.
     
    5252     * The current version of the plugin.
    5353     *
    54      * @since    1.0.0
     54     * @since    1.1.0
    5555     * @access   protected
    5656     * @var      string    $version    The current version of the plugin.
     
    6565     * the public-facing side of the site.
    6666     *
    67      * @since    1.0.0
     67     * @since    1.1.0
    6868     */
    6969    public function __construct() {
     
    7171            $this->version = MULTI_ROLES_VENDOR_VERSION;
    7272        } else {
    73             $this->version = '1.0.0';
     73            $this->version = '1.1.0';
    7474        }
    7575        $this->plugin_name = 'multi-roles-vendor';
     
    9595     * with WordPress.
    9696     *
    97      * @since    1.0.0
     97     * @since    1.1.0
    9898     * @access   private
    9999     */
     
    133133     * with WordPress.
    134134     *
    135      * @since    1.0.0
     135     * @since    1.1.0
    136136     * @access   private
    137137     */
     
    148148     * of the plugin.
    149149     *
    150      * @since    1.0.0
     150     * @since    1.1.0
    151151     * @access   private
    152152     */
     
    158158        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
    159159        $this->loader->add_action( 'admin_menu', $plugin_admin, 'create_menu', 0 );
     160       
    160161       
    161162        function mrv_save_options()
     
    165166            echo "<script type='text/javascript'>window.history.back()</script>";
    166167        }
    167 
    168168        add_action('admin_post_mrv_form', 'mrv_save_options');
    169169
     170       
    170171        $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       
    182173    }
    183174
     
    186177     * of the plugin.
    187178     *
    188      * @since    1.0.0
     179     * @since    1.1.0
    189180     * @access   private
    190181     */
     
    196187        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
    197188
     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
    198204    }
    199205
     
    201207     * Run the loader to execute all of the hooks with WordPress.
    202208     *
    203      * @since    1.0.0
     209     * @since    1.1.0
    204210     */
    205211    public function run() {
     
    211217     * WordPress and to define internationalization functionality.
    212218     *
    213      * @since     1.0.0
     219     * @since     1.1.0
    214220     * @return    string    The name of the plugin.
    215221     */
     
    221227     * The reference to the class that orchestrates the hooks with the plugin.
    222228     *
    223      * @since     1.0.0
     229     * @since     1.1.0
    224230     * @return    Multi_Roles_Vendor_Loader    Orchestrates the hooks of the plugin.
    225231     */
     
    231237     * Retrieve the version number of the plugin.
    232238     *
    233      * @since     1.0.0
     239     * @since     1.1.0
    234240     * @return    string    The version number of the plugin.
    235241     */
  • multi-roles-vendor/tags/1.1/multi-roles-vendor.php

    r2603170 r2708494  
    1010 *
    1111 * @link              https://wpwiredin.github.io/plugins/
    12  * @since             1.0.0
     12 * @since             1.1.0
    1313 * @package           Multi_Roles_Vendor
    1414 *
     
    1717 * Plugin URI:        https://wpwiredin.github.io/plugins/
    1818 * Description:       User Role assigment Plugin for WooCommerce Multivendor Sites
    19  * Version:           1.0.0
     19 * Version:           1.1.0
    2020 * Author:            WPWiredIn
    2121 * Author URI:        https://wpwiredin.github.io/plugins/
     
    3333/**
    3434 * Currently plugin version.
    35  * Start at version 1.0.0 and use SemVer - https://semver.org
     35 * Start at version 1.1.0 and use SemVer - https://semver.org
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'MULTI_ROLES_VENDOR_VERSION', '1.0.0' );
     38define( 'MULTI_ROLES_VENDOR_VERSION', '1.1.0' );
    3939
    4040/**
     
    7272 * not affect the page life cycle.
    7373 *
    74  * @since    1.0.0
     74 * @since    1.1.0
    7575 */
    7676function run_multi_roles_vendor() {
     
    8080
    8181}
     82
    8283run_multi_roles_vendor();
  • multi-roles-vendor/tags/1.1/public/class-multi-roles-vendor-public.php

    r2603170 r2708494  
    55 *
    66 * @link       https://wpwiredin.github.io/plugins/
    7  * @since      1.0.0
     7 * @since      1.1.0
    88 *
    99 * @package    Multi_Roles_Vendor
     
    2626     * The ID of this plugin.
    2727     *
    28      * @since    1.0.0
     28     * @since    1.1.0
    2929     * @access   private
    3030     * @var      string    $plugin_name    The ID of this plugin.
     
    3535     * The version of this plugin.
    3636     *
    37      * @since    1.0.0
     37     * @since    1.1.0
    3838     * @access   private
    3939     * @var      string    $version    The current version of this plugin.
     
    4444     * Initialize the class and set its properties.
    4545     *
    46      * @since    1.0.0
     46     * @since    1.1.0
    4747     * @param      string    $plugin_name       The name of the plugin.
    4848     * @param      string    $version    The version of this plugin.
     
    5555    }
    5656
     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
    5768    /**
    5869     * Register the stylesheets for the public-facing side of the site.
    5970     *
    60      * @since    1.0.0
     71     * @since    1.1.0
    6172     */
    6273    public function enqueue_styles() {
     
    8192     * Register the JavaScript for the public-facing side of the site.
    8293     *
    83      * @since    1.0.0
     94     * @since    1.1.0
    8495     */
    8596    public function enqueue_scripts() {
  • multi-roles-vendor/tags/1.1/public/partials/multi-roles-vendor-public-display.php

    r2603170 r2708494  
    77 *
    88 * @link       https://wpwiredin.github.io/plugins/
    9  * @since      1.0.0
     9 * @since      1.1.0
    1010 *
    1111 * @package    Multi_Roles_Vendor
  • multi-roles-vendor/tags/1.1/uninstall.php

    r2603170 r2708494  
    2121 *
    2222 * @link       https://wpwiredin.github.io/plugins/
    23  * @since      1.0.0
     23 * @since      1.1.0
    2424 *
    2525 * @package    Multi_Roles_Vendor
  • multi-roles-vendor/trunk/admin/class-multi-roles-vendor-admin.php

    r2603170 r2708494  
    55 *
    66 * @link       https://wpwiredin.github.io/plugins/
    7  * @since      1.0.0
     7 * @since      1.1.0
    88 *
    99 * @package    Multi_Roles_Vendor
     
    2626     * The ID of this plugin.
    2727     *
    28      * @since    1.0.0
     28     * @since    1.1.0
    2929     * @access   private
    3030     * @var      string    $plugin_name    The ID of this plugin.
     
    3535     * The version of this plugin.
    3636     *
    37      * @since    1.0.0
     37     * @since    1.1.0
    3838     * @access   private
    3939     * @var      string    $version    The current version of this plugin.
     
    4444     * Initialize the class and set its properties.
    4545     *
    46      * @since    1.0.0
     46     * @since    1.1.0
    4747     * @param      string    $plugin_name       The name of this plugin.
    4848     * @param      string    $version    The version of this plugin.
     
    5858     * Register the stylesheets for the admin area.
    5959     *
    60      * @since    1.0.0
     60     * @since    1.1.0
    6161     */
    6262    public function enqueue_styles() {
     
    8282     * Register the JavaScript for the admin area.
    8383     *
    84      * @since    1.0.0
     84     * @since    1.1.0
    8585     */
    8686    public function enqueue_scripts() {
  • multi-roles-vendor/trunk/admin/partials/multi-roles-vendor-admin-display.php

    r2603173 r2708494  
    77 *
    88 * @link       https://wpwiredin.github.io/plugins/
    9  * @since      1.0.0
     9 * @since      1.1.0
    1010 *
    1111 * @package    Multi_Roles_Vendor
  • multi-roles-vendor/trunk/includes/class-multi-roles-vendor-activator.php

    r2603170 r2708494  
    55 *
    66 * @link       https://wpwiredin.github.io/plugins/
    7  * @since      1.0.0
     7 * @since      1.1.0
    88 *
    99 * @package    Multi_Roles_Vendor
     
    1616 * This class defines all code necessary to run during the plugin's activation.
    1717 *
    18  * @since      1.0.0
     18 * @since      1.1.0
    1919 * @package    Multi_Roles_Vendor
    2020 * @subpackage Multi_Roles_Vendor/includes
     
    2828     * Long Description.
    2929     *
    30      * @since    1.0.0
     30     * @since    1.1.0
    3131     */
    3232    public static function activate() {
  • multi-roles-vendor/trunk/includes/class-multi-roles-vendor-deactivator.php

    r2603170 r2708494  
    55 *
    66 * @link       https://wpwiredin.github.io/plugins/
    7  * @since      1.0.0
     7 * @since      1.1.0
    88 *
    99 * @package    Multi_Roles_Vendor
     
    1616 * This class defines all code necessary to run during the plugin's deactivation.
    1717 *
    18  * @since      1.0.0
     18 * @since      1.1.0
    1919 * @package    Multi_Roles_Vendor
    2020 * @subpackage Multi_Roles_Vendor/includes
     
    2828     * Long Description.
    2929     *
    30      * @since    1.0.0
     30     * @since    1.1.0
    3131     */
    3232    public static function deactivate() {
  • multi-roles-vendor/trunk/includes/class-multi-roles-vendor-i18n.php

    r2603170 r2708494  
    88 *
    99 * @link       https://wpwiredin.github.io/plugins/
    10  * @since      1.0.0
     10 * @since      1.1.0
    1111 *
    1212 * @package    Multi_Roles_Vendor
     
    2020 * so that it is ready for translation.
    2121 *
    22  * @since      1.0.0
     22 * @since      1.1.0
    2323 * @package    Multi_Roles_Vendor
    2424 * @subpackage Multi_Roles_Vendor/includes
     
    3131     * Load the plugin text domain for translation.
    3232     *
    33      * @since    1.0.0
     33     * @since    1.1.0
    3434     */
    3535    public function load_plugin_textdomain() {
  • multi-roles-vendor/trunk/includes/class-multi-roles-vendor-loader.php

    r2603170 r2708494  
    55 *
    66 * @link       https://wpwiredin.github.io/plugins/
    7  * @since      1.0.0
     7 * @since      1.1.0
    88 *
    99 * @package    Multi_Roles_Vendor
     
    2727     * The array of actions registered with WordPress.
    2828     *
    29      * @since    1.0.0
     29     * @since    1.1.0
    3030     * @access   protected
    3131     * @var      array    $actions    The actions registered with WordPress to fire when the plugin loads.
     
    3636     * The array of filters registered with WordPress.
    3737     *
    38      * @since    1.0.0
     38     * @since    1.1.0
    3939     * @access   protected
    4040     * @var      array    $filters    The filters registered with WordPress to fire when the plugin loads.
     
    4545     * Initialize the collections used to maintain the actions and filters.
    4646     *
    47      * @since    1.0.0
     47     * @since    1.1.0
    4848     */
    4949    public function __construct() {
     
    5757     * Add a new action to the collection to be registered with WordPress.
    5858     *
    59      * @since    1.0.0
     59     * @since    1.1.0
    6060     * @param    string               $hook             The name of the WordPress action that is being registered.
    6161     * @param    object               $component        A reference to the instance of the object on which the action is defined.
     
    7171     * Add a new filter to the collection to be registered with WordPress.
    7272     *
    73      * @since    1.0.0
     73     * @since    1.1.0
    7474     * @param    string               $hook             The name of the WordPress filter that is being registered.
    7575     * @param    object               $component        A reference to the instance of the object on which the filter is defined.
     
    8686     * collection.
    8787     *
    88      * @since    1.0.0
     88     * @since    1.1.0
    8989     * @access   private
    9090     * @param    array                $hooks            The collection of hooks that is being registered (that is, actions or filters).
     
    113113     * Register the filters and actions with WordPress.
    114114     *
    115      * @since    1.0.0
     115     * @since    1.1.0
    116116     */
    117117    public function run() {
  • multi-roles-vendor/trunk/includes/class-multi-roles-vendor.php

    r2603170 r2708494  
    88 *
    99 * @link       https://wpwiredin.github.io/plugins/
    10  * @since      1.0.0
     10 * @since      1.1.0
    1111 *
    1212 * @package    Multi_Roles_Vendor
     
    2323 * version of the plugin.
    2424 *
    25  * @since      1.0.0
     25 * @since      1.1.0
    2626 * @package    Multi_Roles_Vendor
    2727 * @subpackage Multi_Roles_Vendor/includes
     
    3434     * the plugin.
    3535     *
    36      * @since    1.0.0
     36     * @since    1.1.0
    3737     * @access   protected
    3838     * @var      Multi_Roles_Vendor_Loader    $loader    Maintains and registers all hooks for the plugin.
     
    4343     * The unique identifier of this plugin.
    4444     *
    45      * @since    1.0.0
     45     * @since    1.1.0
    4646     * @access   protected
    4747     * @var      string    $plugin_name    The string used to uniquely identify this plugin.
     
    5252     * The current version of the plugin.
    5353     *
    54      * @since    1.0.0
     54     * @since    1.1.0
    5555     * @access   protected
    5656     * @var      string    $version    The current version of the plugin.
     
    6565     * the public-facing side of the site.
    6666     *
    67      * @since    1.0.0
     67     * @since    1.1.0
    6868     */
    6969    public function __construct() {
     
    7171            $this->version = MULTI_ROLES_VENDOR_VERSION;
    7272        } else {
    73             $this->version = '1.0.0';
     73            $this->version = '1.1.0';
    7474        }
    7575        $this->plugin_name = 'multi-roles-vendor';
     
    9595     * with WordPress.
    9696     *
    97      * @since    1.0.0
     97     * @since    1.1.0
    9898     * @access   private
    9999     */
     
    133133     * with WordPress.
    134134     *
    135      * @since    1.0.0
     135     * @since    1.1.0
    136136     * @access   private
    137137     */
     
    148148     * of the plugin.
    149149     *
    150      * @since    1.0.0
     150     * @since    1.1.0
    151151     * @access   private
    152152     */
     
    158158        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
    159159        $this->loader->add_action( 'admin_menu', $plugin_admin, 'create_menu', 0 );
     160       
    160161       
    161162        function mrv_save_options()
     
    165166            echo "<script type='text/javascript'>window.history.back()</script>";
    166167        }
    167 
    168168        add_action('admin_post_mrv_form', 'mrv_save_options');
    169169
     170       
    170171        $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       
    182173    }
    183174
     
    186177     * of the plugin.
    187178     *
    188      * @since    1.0.0
     179     * @since    1.1.0
    189180     * @access   private
    190181     */
     
    196187        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
    197188
     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
    198204    }
    199205
     
    201207     * Run the loader to execute all of the hooks with WordPress.
    202208     *
    203      * @since    1.0.0
     209     * @since    1.1.0
    204210     */
    205211    public function run() {
     
    211217     * WordPress and to define internationalization functionality.
    212218     *
    213      * @since     1.0.0
     219     * @since     1.1.0
    214220     * @return    string    The name of the plugin.
    215221     */
     
    221227     * The reference to the class that orchestrates the hooks with the plugin.
    222228     *
    223      * @since     1.0.0
     229     * @since     1.1.0
    224230     * @return    Multi_Roles_Vendor_Loader    Orchestrates the hooks of the plugin.
    225231     */
     
    231237     * Retrieve the version number of the plugin.
    232238     *
    233      * @since     1.0.0
     239     * @since     1.1.0
    234240     * @return    string    The version number of the plugin.
    235241     */
  • multi-roles-vendor/trunk/multi-roles-vendor.php

    r2603201 r2708494  
    1010 *
    1111 * @link              https://wpwiredin.github.io/plugins/
    12  * @since             1.0.0
     12 * @since             1.1.0
    1313 * @package           Multi_Roles_Vendor
    1414 *
     
    3333/**
    3434 * Currently plugin version.
    35  * Start at version 1.0.0 and use SemVer - https://semver.org
     35 * Start at version 1.1.0 and use SemVer - https://semver.org
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'MULTI_ROLES_VENDOR_VERSION', '1.0.0' );
     38define( 'MULTI_ROLES_VENDOR_VERSION', '1.1.0' );
    3939
    4040/**
     
    7272 * not affect the page life cycle.
    7373 *
    74  * @since    1.0.0
     74 * @since    1.1.0
    7575 */
    7676function run_multi_roles_vendor() {
     
    8080
    8181}
     82
    8283run_multi_roles_vendor();
  • multi-roles-vendor/trunk/public/class-multi-roles-vendor-public.php

    r2603170 r2708494  
    55 *
    66 * @link       https://wpwiredin.github.io/plugins/
    7  * @since      1.0.0
     7 * @since      1.1.0
    88 *
    99 * @package    Multi_Roles_Vendor
     
    2626     * The ID of this plugin.
    2727     *
    28      * @since    1.0.0
     28     * @since    1.1.0
    2929     * @access   private
    3030     * @var      string    $plugin_name    The ID of this plugin.
     
    3535     * The version of this plugin.
    3636     *
    37      * @since    1.0.0
     37     * @since    1.1.0
    3838     * @access   private
    3939     * @var      string    $version    The current version of this plugin.
     
    4444     * Initialize the class and set its properties.
    4545     *
    46      * @since    1.0.0
     46     * @since    1.1.0
    4747     * @param      string    $plugin_name       The name of the plugin.
    4848     * @param      string    $version    The version of this plugin.
     
    5555    }
    5656
     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
    5768    /**
    5869     * Register the stylesheets for the public-facing side of the site.
    5970     *
    60      * @since    1.0.0
     71     * @since    1.1.0
    6172     */
    6273    public function enqueue_styles() {
     
    8192     * Register the JavaScript for the public-facing side of the site.
    8293     *
    83      * @since    1.0.0
     94     * @since    1.1.0
    8495     */
    8596    public function enqueue_scripts() {
  • multi-roles-vendor/trunk/public/partials/multi-roles-vendor-public-display.php

    r2603170 r2708494  
    77 *
    88 * @link       https://wpwiredin.github.io/plugins/
    9  * @since      1.0.0
     9 * @since      1.1.0
    1010 *
    1111 * @package    Multi_Roles_Vendor
  • multi-roles-vendor/trunk/uninstall.php

    r2603170 r2708494  
    2121 *
    2222 * @link       https://wpwiredin.github.io/plugins/
    23  * @since      1.0.0
     23 * @since      1.1.0
    2424 *
    2525 * @package    Multi_Roles_Vendor
Note: See TracChangeset for help on using the changeset viewer.