800, 'popup_height' => 650, 'popup_v_pages' =>'true', 'popup_v_Posts' => 'true', 'popup_v_fpage' => 'true' )); // pull the settings from the db $arty_settings = get_option('arty_settings'); // fallback $arty_settings = wp_parse_args($arty_settings, $arty_defaults); function art_scripts() { //Media Uploader Scripts wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_deregister_script( 'my-upload' ); wp_register_script('my-upload',plugins_url('arty-popup/uploader.js') , array('jquery','media-upload','thickbox')); wp_enqueue_script('my-upload'); } function art_styles() { //Media Uploader Style wp_enqueue_style('thickbox'); } add_action( 'admin_enqueue_scripts', 'art_styles' ); add_action( 'admin_enqueue_scripts', 'art_scripts' ); /* /////////////////////////////////////////////// This section hooks the proper functions to the proper actions in WordPress \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */ // this function registers our settings in the db add_action('admin_init', 'arty_register_settings'); function arty_register_settings() { register_setting('arty_settings', 'arty_settings', 'arty_settings_validate'); } add_action('admin_menu', 'arty_menu'); function arty_menu() { add_menu_page('Arty Popup', 'Arty Popup', 'edit_pages', 'settingspage', 'arty_settings_page', plugin_dir_url( __FILE__ )."icon.png"); } // this function checks to see if we just updated the settings // if so, it displays the "updated" message. function arty_settings_update_check() { global $arty_settings; if(isset($arty_settings['update'])) { echo '
Arty Popup Settings '.$arty_settings['update'].'