addInto_plugin_logos = get_bloginfo('wpurl').'/wp-content/plugins/addinto/logos'; $this->bloginfo_lng = get_bloginfo('language'); if($_POST['addinto']) { $this->update_vars($_POST['addinto']); update_option( 'ai_srv', $_POST['ai_srv'] ); update_option( 'ai_srvs', $_POST['ai_srvs'] ); } } function update_vars ($vars) { foreach($vars as $key => $value) { if(get_option($key)) { update_option($key, $value); } else { add_option($key, $value); } } } function admin_menu () { add_options_page('AddInto Options', 'AddInto', 8, __FILE__, array(&$this, 'plugin_options')); } function plugin_options () { $langue = explode(",",$this->bloginfo_lng); $langue = StrToLower(substr(chop($langue[0]),0,2)); $langue = ($langue == 'fr') ? 'fr' : 'en'; // ----- $logo_addinto = (get_option('ai_button_logo') == 'logo_addinto') ? ' checked="checked"' : ''; $logo4 = (get_option('ai_button_logo') == 'logo4') ? ' checked="checked"' : ''; $logo1 = (get_option('ai_button_logo') == 'logo1') ? ' checked="checked"' : ''; $logo5 = (get_option('ai_button_logo') == 'logo5_fr' or get_option('ai_button_logo') == 'logo5_en') ? ' checked="checked"' : ''; $logo7 = (get_option('ai_button_logo') == 'logo7_fr' or get_option('ai_button_logo') == 'logo7_en') ? ' checked="checked"' : ''; // ----- $align_left = (get_option('ai_align') == 'left') ? ' selected="selected"' : ''; $align_center = (get_option('ai_align') == 'center') ? ' selected="selected"' : ''; $align_right = (get_option('ai_align') == 'right') ? ' selected="selected"' : ''; // ----- $display_on_home_yes = (get_option('ai_display_on_home') == 'yes') ? ' checked="checked"' : ''; $display_on_home_no = (get_option('ai_display_on_home') == 'no') ? ' checked="checked"' : ''; $display_on_pages_yes = (get_option('ai_display_on_pages') == 'yes') ? ' checked="checked"' : ''; $display_on_pages_no = (get_option('ai_display_on_pages') == 'no') ? ' checked="checked"' : ''; $display_on_archives_yes = (get_option('ai_display_on_archives') == 'yes') ? ' checked="checked"' : ''; $display_on_archives_no = (get_option('ai_display_on_archives') == 'no') ? ' checked="checked"' : ''; $display_on_categories_yes = (get_option('ai_display_on_categories') == 'yes') ? ' checked="checked"' : ''; $display_on_categories_no = (get_option('ai_display_on_categories') == 'no') ? ' checked="checked"' : ''; $non_js_yes = (get_option('ai_non_js') == 'yes') ? ' checked="checked"' : ''; $non_js_no = (get_option('ai_non_js') == 'no') ? ' checked="checked"' : ''; ?>
';
$button .= '';
$button .= '