/** * Returns default options * * @since 6.3 * @access public */ public static function default_options() { return Theme_My_Login_Themed_Profiles::default_options(); }
* * @param string $url The generated link * @param string $path The specified path * @param string $orig_scheme The original connection scheme * @return string The filtered link */ public function site_url($url, $path, $orig_scheme = '') { global $current_user, $pagenow; if ('profile.php' != $pagenow && strpos($url, 'profile.php') !== false) { $user_role = reset($current_user->roles); if (is_multisite() && empty($user_role)) { $user_role = 'subscriber'; } if ($user_role && !$this->get_option(array($user_role, 'theme_profile'))) { return $url; } $parsed_url = parse_url($url); $url = Theme_My_Login::get_page_link('profile'); if (isset($parsed_url['query'])) { $url = add_query_arg(array_map('rawurlencode', wp_parse_args($parsed_url['query'])), $url); } } return $url; } } Theme_My_Login_Themed_Profiles::get_object(); } if (is_admin()) { include_once dirname(__FILE__) . '/admin/themed-profiles-admin.php'; }
/** * Activates this module * * Callback for "tml_activate_themed-profiles/themed-profiles.php" hook in method Theme_My_Login_Admin::activate_module() * * @see Theme_My_Login_Admin::activate_module() * @since 6.2 * @access public * * @param object $theme_my_login Reference to global $theme_my_login object */ function activate(&$theme_my_login) { $options = Theme_My_Login_Themed_Profiles::init_options(); $theme_my_login->options->set_option('themed_profiles', $options['themed_profiles']); }