title = __("Login", "dagsopt"); $this->pluginname = $ns->pluginname; $this->file = $ns->file; $this->ns = $ns; } function start() { add_action('init', array(&$this, 'override_reset_password_form_redirect')); add_filter("login_redirect", array(&$this, "my_login_redirect"), 10, 3); add_filter("admin_bar_menu", array(&$this, "replace_howdy"), 25); add_filter('login_headerurl', array(&$this, 'login_headerurl')); add_filter('login_headertext', array(&$this, 'login_headertext')); add_filter('login_message', array(&$this, 'login_message')); add_action('register_form', array(&$this, 'plugin_form')); if (defined("WP_SITEURL") && defined('WP_SITEURL_CDN')) { add_filter('stylesheet_directory_uri', array(&$this, 'l_stylesheet_directory_uri')); } add_action('login_head', array(&$this, 'login_head')); add_action('user_register', array(&$this, 'plugin_user_register'), 10, 3); add_action('personal_options_update', array(&$this, 'plugin_user_register'), 10, 3); add_action('admin_enqueue_scripts', function () { /* if possible try not to queue this all over the admin by adding your settings GET page val into next if( empty( $_GET['page'] ) || "my-settings-page" !== $_GET['page'] ) { return; } */ wp_enqueue_media(); }); add_filter('upload_mimes', function ($mime_types) { $mime_types['m4a'] = 'audio/m4a'; // $mime_types['m4v'] = 'video/mp4'; // $mime_types['svg'] = 'image/svg+xml'; // Adding .svg extension $mime_types['json'] = 'application/json'; // Adding .json extension // unset( $mime_types['xls'] ); // Remove .xls extension // unset( $mime_types['xlsx'] ); // Remove .xlsx extension return $mime_types; }, 1, 1); add_action('register_post', array(&$this, 'register_post'), 10, 3); add_action('edit_user_profile', array(&$this, 'plugin_show_user_profile'), 10, 3); add_action('admin_footer', array(&$this, 'admin_footer'), 10, 3); } //add_action('show_user_profile', 'plugin_show_user_profile'); function admin_footer() { /* if possible try not to queue this all over the admin by adding your settings GET page val into next if( empty( $_GET['page'] ) || "my-settings-page" !== $_GET['page'] ) { return; } */ ?>
Proselect; ?> | |
'; if (isset($_GET['action'])) { $type = isset($_GET['type']) ? $_GET['type'] : 'default'; if ($type !== "default") { //print_r($args); $page = $this->get_page_by_name($type); if ($page) { $str .= apply_filters('the_content', $page->post_content); } else { $str .= stripslashes(get_option($this->pluginname . "_login_support_splash_" . $_GET['action'], false)); } } else { $str .= stripslashes(get_option($this->pluginname . "_login_support_splash_" . $_GET['action'], false)); } } else { $str .= stripslashes(get_option($this->pluginname . "_login_support_splash", false)); } $str .= '
'; echo $html; } function Option($pre) { update_option($pre . '_support_splash', $_POST[$pre . '_support_splash']); update_option($pre . '_support_splash_rp', $_POST[$pre . '_support_splash_rp']); update_option($pre . '_support_splash_welcome', $_POST[$pre . '_support_splash_welcome']); update_option($pre . '_support_splash_resetpass', $_POST[$pre . '_support_splash_resetpass']); update_option($pre . '_support_splash_register', $_POST[$pre . '_support_splash_register']); update_option($pre . '_background_image', $_POST[$pre . '_background_image']); update_option($pre . '_image', $_POST[$pre . '_image']); update_option($pre . '_styles', $_POST[$pre . '_styles']); } function admin_line($pre) { ?>