public/wordpress/wp-content/plugins/simple-membership/classes/class.swpm-utils.php
/*
     * This function handles various initial setup tasks that need to be executed very early on (before other functions of the plugin is called).
     */
This function handles various initial setup tasks that need to be executed very early on (before other functions of the plugin is called).
This function handles various initial setup tasks that need to be executed very early on ( before other functions of the plugin is called ) .
public static function do_misc_initial_plugin_setup_tasks() {
        $admin_dashboard_permission = SwpmSettings::get_instance()->get_value('admin-dashboard-access-permission');
        if (empty($admin_dashboard_permission)) {
            define("SWPM_MANAGEMENT_PERMISSION", "manage_options");
        } else {
            define("SWPM_MANAGEMENT_PERMISSION", $admin_dashboard_permission);
        }
        $use_wp_timezone = SwpmSettings::get_instance()->get_value('use-wordpress-timezone');
        if (!empty($use_wp_timezone)) {
            $wp_timezone_string = get_option('timezone_string');
            if (!empty($wp_timezone_string)) {
                date_default_timezone_set($wp_timezone_string);
            }
        }
    }
public static function do_misc_initial_plugin_setup_tasks ( ) { $ admin_dashboard_permission = SwpmSettings :: get_instance ( ) -> get_value ( 'admin-dashboard-access-permission' ) ; if ( empty ( $ admin_dashboard_permission ) ) { define ( " SWPM_MANAGEMENT_PERMISSION " , " manage_options " ) ; } else { define ( " SWPM_MANAGEMENT_PERMISSION " , $ admin_dashboard_permission ) ; } $ use_wp_timezone = SwpmSettings :: get_instance ( ) -> get_value ( 'use-wordpress-timezone' ) ; if ( ! empty ( $ use_wp_timezone ) ) { $ wp_timezone_string = get_option ( 'timezone_string' ) ; if ( ! empty ( $ wp_timezone_string ) ) { date_default_timezone_set ( $ wp_timezone_string ) ; } } }
This function handles various initial setup tasks that need to be executed very early on (before other functions of the plugin is called).
This function handles various initial setup tasks that need to be executed very early on ( before other functions of the plugin is called ) .
//Management role/permission setup //By default only admins can manage/see admin dashboard //Set timezone preference (if enabled in settings) //Set the wp timezone