function itro_init() { /* -----load sample popup settings */ if (get_option("itro_curr_ver") == NULL) { /* --------- initialize database */ itro_db_init(); itro_update_option('popup_time', 20); itro_update_option('cookie_time_exp', 0); itro_update_option('popup_background', '#FFFFFF'); itro_update_option('popup_border_color', '#F7FF00'); itro_update_option('px_popup_width', 300); itro_update_option('px_popup_height', 0); itro_update_option('show_countdown', 'yes'); itro_update_option('auto_margin_check', 'yes'); itro_update_option('select_popup_width', 'px'); itro_update_option('select_popup_height', 'auto'); itro_update_option('popup_bg_opacity', 0.4); itro_update_option('opaco_bg_color', '#8A8A8A'); itro_update_option('popup_position', 'fixed'); itro_update_option('popup_border_width', 3); itro_update_option('popup_border_radius', 8); itro_update_option('popup_padding', 2); itro_update_option('page_selection', 'none'); switch (WPLANG) { case 'en_US': $welcome_text = '<h1 style="text-align: center;"><span style="color: #000000; font-size: 20;">Hello, this is a pop-up sample.</span></h1><p style="text-align: center;"><span style="color: #000000; font-size: 20;">The basic stetting to get started are: Popup height, Popup time, Next visualization, Popup border color, Popup background.</span></p><p style="text-align: center;"><span style="color: #000000; font-size: 20;">Write watever you want in the Custom text editor and enjoy our plugin!</span></p><p> </p>'; break; case 'it_IT': $welcome_text = '<h1 style="text-align: center;"><span style="color: #000000; font-size: 20;">Questo è un esempio di popup.</span></h1><p style="text-align: center;"> </p><p style="text-align: center;"><span style="color: #000000; font-size: 20;">Le impostazioni base per iniziare sono: Altezza popup, Tempo popup, Prossima visualizzazione, Colore bordo, Colore sfondo.</span></p><p style="text-align: center;"> </p><p style="text-align: center;"><span style="color: #000000; font-size: 20;">Scrivi qualunque cosa vuoi nell'editor di testo di wordpress e buon lavoro!</span></p><p style="text-align: center;"> </p>'; break; default: $welcome_text = '<h1 style="text-align: center;"><span style="color: #000000; font-size: 20;">Hello, this is a pop-up sample.</span></h1><p style="text-align: center;"><span style="color: #000000; font-size: 20;">The basic stetting to get started are: Popup height, Popup time, Next visualization, Popup border color, Popup background.</span></p><p style="text-align: center;"><span style="color: #000000; font-size: 20;">Write watever you want in the Custom text editor and enjoy our plugin!</span></p><p> </p>'; } itro_update_field('custom_html', $welcome_text); itro_update_option('sample_popup', 'done'); } /* ---------------create preview page */ switch (WPLANG) { case 'en_US': $preview_text = 'ITRO - Preview page. This page is used to rightly display preview of your popup with site theme.'; break; case 'it_IT': $preview_text = 'ITRO - Pagina di anteprima. Questa pagina è utilizzata per visualizzare correttamente il popup, integrato con lo stile del tema.'; break; default: $preview_text = 'ITRO - Preview page. This page is used to rightly display preview of your popup with site theme.'; } if (itro_get_option('preview_id') == NULL) { /* Create post object */ $preview_post = array('post_title' => 'ITRO - Preview', 'post_name' => 'itro-preview', 'post_content' => $preview_text, 'post_status' => 'private', 'post_author' => 1, 'post_type' => 'page'); /* Insert the post into the database */ @($preview_id = wp_insert_post($preview_post)); itro_update_option('preview_id', $preview_id); } }
function itro_init() { /* -----load sample popup settings */ if (get_option("itro_curr_ver") == NULL) { /* --------- initialize database */ itro_db_init(); itro_update_option('popup_time', 20); itro_update_option('popup_delay', 0); itro_update_option('cookie_time_exp', 0); itro_update_option('popup_background', '#FFFFFF'); itro_update_option('popup_border_color', '#F7FF00'); itro_update_option('px_popup_width', 600); itro_update_option('px_popup_height', 0); itro_update_option('show_countdown', 'yes'); itro_update_option('auto_margin_check', 'yes'); itro_update_option('select_popup_width', 'px'); itro_update_option('select_popup_height', 'auto'); itro_update_option('popup_bg_opacity', 0.4); itro_update_option('opaco_bg_color', '#8A8A8A'); itro_update_option('popup_position', 'fixed'); itro_update_option('popup_border_width', 3); itro_update_option('popup_border_radius', 8); itro_update_option('popup_padding', 2); itro_update_option('page_selection', 'none'); switch (get_locale()) { case 'en_US': $welcome_text = '<h1 style="text-align: center;"><span style="color: #000000; font-size: 20;">Hello, this is a pop-up sample.</span></h1><p style="text-align: center;"><span style="color: #000000; font-size: 20;">The basic stetting to get started are: Popup height, Popup time, Next visualization, Popup border color, Popup background.</span></p><p style="text-align: center;"><span style="color: #000000; font-size: 20;">Write watever you want in the Custom text editor and enjoy our plugin!</span></p><p> </p>'; break; case 'it_IT': $welcome_text = '<h1 style="text-align: center;"><span style="color: #000000; font-size: 20;">Questo è un esempio di popup.</span></h1><p style="text-align: center;"> </p><p style="text-align: center;"><span style="color: #000000; font-size: 20;">Le impostazioni base per iniziare sono: Altezza popup, Tempo popup, Prossima visualizzazione, Colore bordo, Colore sfondo.</span></p><p style="text-align: center;"> </p><p style="text-align: center;"><span style="color: #000000; font-size: 20;">Scrivi qualunque cosa vuoi nell'editor di testo di wordpress e buon lavoro!</span></p><p style="text-align: center;"> </p>'; break; default: $welcome_text = '<h1 style="text-align: center;"><span style="color: #000000; font-size: 20;">Hello, this is a pop-up sample.</span></h1><p style="text-align: center;"><span style="color: #000000; font-size: 20;">The basic stetting to get started are: Popup height, Popup time, Next visualization, Popup border color, Popup background.</span></p><p style="text-align: center;"><span style="color: #000000; font-size: 20;">Write watever you want in the Custom text editor and enjoy our plugin!</span></p><p> </p>'; } itro_update_field('custom_html', $welcome_text); itro_update_option('sample_popup', 'done'); } }