section add_theme_support('automatic_feed_links'); // Load jQuery if ( !is_admin() ) { wp_deregister_script('jquery'); wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"), false); wp_enqueue_script('jquery'); } // Clean up the function removeHeadLinks() { remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link'); } function custom_excerpt_length( $length ) { return 20; } if ( ! isset( $content_width ) ) $content_width = 900; add_action('init', 'removeHeadLinks'); remove_action('wp_head', 'wp_generator'); if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => 'Sidebar Widgets', 'id' => 'sidebar-widgets', 'description' => 'These are widgets for the sidebar.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); } add_action( 'init', 'register_my_menus' ); function flick_setup() { $path = trailingslashit(TEMPLATEPATH); // i18n support load_theme_textdomain('anno', $path . 'languages'); $locale = get_locale(); $locale_file = $path . '/languages/' . $locale . '.php'; if ( is_readable( $locale_file ) ) { require_once( $locale_file ); } add_custom_image_header(); add_custom_background() ; add_editor_style(); add_theme_support('automatic-feed-links'); add_theme_support('post-thumbnails', array( 'article', 'post' ) ); add_image_size( 'post-excerpt', 140, 120, true); add_image_size( 'post-teaser', 100, 79, true); add_image_size( 'featured', 270, 230, true); add_image_size( 'header', 500, 500, false); } function register_my_menus() { register_nav_menus( array ( 'primary' => __( 'Menu 1' ), 'secondary' => __( 'Menu 2' ) ) ); } function get_first_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('//i', $post->post_content, $matches); $first_img = $matches [1] [0]; return $first_img; } if(get_option('custom_post_category')) { $custom_category=get_option('custom_post_category'); } else { add_option('custom_post_category'); $custom_category=get_option('custom_post_category'); } add_action('admin_menu','mythemeoptions'); function mythemeoptions(){ add_theme_page('themes.php','Edit Theme Appearance','Customize Post Category',8,'customize-post-catrgor','display_cust_ui'); } if ( function_exists('register_sidebar') ){ register_sidebar(array( 'name' => 'meta', 'id' =>'Polls_Area', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '', 'after_title' => '', ));} function display_cust_ui(){ $cat_array=array('sidebar_hot_event'=>'', 'sidebar_news_and_event'=>'', 'index_news'=>'', 'index_topic'=>'', 'index_market'=>'', 'index_management'=>''); if(!get_option('theme_position')){ $final_cat_array=array('sidebar_hot_event'=>'', 'sidebar_news_and_event'=>'', 'index_news'=>'', 'index_topic'=>'', 'index_market'=>'', 'index_management'=>''); add_option('theme_position',array($final_cat_array)); } else{ $final_cat_array=get_option('theme_position'); } if(!get_option(theme_position_category)) { add_option('theme_position_category'); $theme_position_cat=get_option(theme_position_catrgory); } else{ $theme_position_cat=get_option(theme_position_catrgory); } ?> '', 'sidebar_news_and_event'=>'', 'index_news'=>'', 'index_topic'=>'', 'index_market'=>'', 'index_management'=>''); $temp=array(); foreach($final_cat_array as $key=>$value) { if($_POST[$key]) { $theme_pos=$_POST[$key]; array_push($temp,$theme_pos); } if(!$_POST[$key]=='') { $final_cat_array[$key]=$_POST['list'.$key]; //update previous option for maping categories update_option('theme_position',$final_cat_array); //get a value to assign a variable } } //print_r(get_option('theme_position')); update_option('theme_position_category',$temp); //print_r($temp); } ?>

    Select and Map Appropriate Categories

$value) { ?>
0){echo 'checked="checked"';} ?>/>
0,'name'=>'list'.$keys,'selected'=>$value)); ?>