__( 'Primary Menu', 'kotenhanagara' ), ) ); /** * Enable support for Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); set_post_thumbnail_size( 190, 190, true ); } endif; // kotenhanagara_setup add_action( 'after_setup_theme', 'kotenhanagara_setup' ); /** * Setup the WordPress core custom background feature. * * Use add_theme_support to register support for WordPress 3.4+ * as well as provide backward compatibility for WordPress 3.3 * using feature detection of wp_get_theme() which was introduced * in WordPress 3.4. * * @todo Remove the 3.3 support when WordPress 3.6 is released. * * Hooks into the after_setup_theme action. */ function kotenhanagara_register_custom_background() { $args = array( 'default-color' => 'ffffff', 'default-image' => '', ); $args = apply_filters( 'kotenhanagara_custom_background_args', $args ); if ( function_exists( 'wp_get_theme' ) ) { add_theme_support( 'custom-background', $args ); } } add_action( 'after_setup_theme', 'kotenhanagara_register_custom_background' ); /** * Register widgetized area and update sidebar with default widgets */ function kotenhanagara_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'kotenhanagara' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '
'.get_option('fc_css_get').''; } } // kotenhanagara_fc_settings_page() displays the page content for the Header and Footer Commander submenu function kotenhanagara_fc_settings_page() { //must check that the user has the required capability if (!current_user_can('manage_options')) { wp_die( __('You do not have sufficient permissions to access this page.') ); } // variables for the field and option names //$fc_text = 'fc_input_text'; $hidden_field_name = 'fc_submit_hidden'; //$footer_field_name = 'fc_input_text'; //$fch_text = 'fch_input_text'; //$header_field_name = 'fch_input_text'; $fc_new_bc2 = 'fc_backgroundpick2'; $fc_new_bc1 = 'fc_backgroundpick1'; $hidden_name_bc1 = 'fc_background1'; $hidden_name_bc2 = 'fc_background2'; $fc_new_tc2 = 'fc_textpick2'; $fc_new_tc1 = 'fc_textpick1'; $hidden_name_tc1 = 'fc_text1'; $hidden_name_tc2 = 'fc_text2'; $ad_image1 = 'fc_imade1'; $ad_image2 = 'fc_imade2'; $fc_new_up1 = 'fc_uplo1'; $fc_new_up2 = 'fc_uplo2'; $cssfc_new_val = 'fc_css_get'; $cssfc_field_name = '$cssfc_fieldget'; // Read in existing option value from database //$fc_val = get_option( $fc_text ); //$fch_val = get_option( $fch_text ); $fc_bc2 = get_option( $fc_new_bc2 ); $fc_bc1 = get_option( $fc_new_bc1 ); $fc_tc2 = get_option( $fc_new_tc2 ); $fc_tc1 = get_option( $fc_new_tc1 ); $fc_upload2 = get_option( $fc_new_up2 ); $fc_upload1 = get_option( $fc_new_up1 ); $cssfc_field_val = get_option( $cssfc_new_val ); //checks to see if empty then populates values if ($fc_bc2== '') { $fc_bc2 = '#fff'; } if ($fc_bc1== '') { $fc_bc1 = '#fff'; } if ($fc_tc2== '') { $fc_tc2 = '#aaa'; } if ($fc_tc1== '') { $fc_tc1 = '#aaa'; } // See if the user has posted us some information // If they did, this hidden field will be set to 'Y' if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) { // Read their posted value //$fc_val = $_POST[ $footer_field_name ]; //$fch_val = $_POST[ $header_field_name ]; $fc_bc2 = $_POST[ $hidden_name_bc2 ]; $fc_bc1 = $_POST[ $hidden_name_bc1 ]; $fc_tc2 = $_POST[ $hidden_name_tc2 ]; $fc_tc1 = $_POST[ $hidden_name_tc1 ]; $fc_upload1 = $_POST[ $ad_image1 ]; $fc_upload2 = $_POST[ $ad_image2 ]; $cssfc_field_val = $_POST[ $cssfc_field_name ]; add_option('checkboxhf', TRUE); // Save the posted value in the database //update_option( $fc_text, $fc_val ); //update_option( $fch_text, $fch_val ); update_option( $fc_new_bc2, $fc_bc2 ); update_option( $fc_new_bc1, $fc_bc1 ); update_option( $fc_new_tc2, $fc_tc2 ); update_option( $fc_new_tc1, $fc_tc1 ); update_option( $fc_new_up1, $fc_upload1 ); update_option( $fc_new_up2, $fc_upload2 ); update_option( $cssfc_new_val , $cssfc_field_val ); update_option('checkboxhf', (bool) $_POST["checkboxhf"]); ?>