true, 'textarea_rows' => 15, 'tabindex' => 1, 'media_buttons' => false, 'wpautop' => true, ); include(self::$_pluginDir.'includes/view_admin.php'); } /** * Method that is hooked to the [disclaimer] shortcode * * @param mixed $attributes * @static * @access public * @return void */ public static function shortcode( $attributes ) { self::displayPopup(); } /** * Method that will enqueue all the needed js and css * so that the plugin can render succesfully * * @static * @access public * @return void */ public static function displayPopup() { $jsUrl = plugins_url( 'js/popup.js' , dirname(__FILE__) ); $cssUrl = plugins_url( 'css/popup.css' , dirname(__FILE__) ); $params = array('title' => get_option('mind_disclaimer_title'), 'text' => wpautop(get_option('mind_disclaimer_text')), 'showOnlyOnce' => get_option('mind_disclaimer_show_once'), 'accept' => get_option('mind_accept_text'), ); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'disclaimer_popup', $jsUrl, array(), '1.0.0', true ); wp_enqueue_style ( 'disclaimer_popup', $cssUrl, array()); wp_localize_script( 'disclaimer_popup', 'mind_disclaimer_settings', $params ); } /** * Method that is hooked to the footer hook, will add a div that can hold the popup * * @static * @access public * @return void */ public static function addFooterDiv() { echo '
'; } }