$val) { $id = $val->ID; if ($img_size == 'large') { $img_arr = wp_get_attachment_image_src($id, 'full'); // THE FULL SIZE IMAGE INSTEAD $imgarr['id'] = $id; $imgarr['file'] = $img_arr[0]; $return_arr[] = $imgarr; } elseif ($img_size == 'medium') { $img_arr = wp_get_attachment_image_src($id, 'medium'); //THE medium SIZE IMAGE INSTEAD $imgarr['id'] = $id; $imgarr['file'] = $img_arr[0]; $return_arr[] = $imgarr; } elseif ($img_size == 'thumb') { $img_arr = wp_get_attachment_image_src($id, 'thumbnail'); // Get the thumbnail url for the attachment $imgarr['id'] = $id; $imgarr['file'] = $img_arr[0]; $return_arr[] = $imgarr; }elseif ($img_size == 'homeslide') { $img_arr = wp_get_attachment_image_src($id, 'homeslide'); // Get the thumbnail url for the attachment $imgarr['id'] = $id; $imgarr['file'] = $img_arr[0]; $return_arr[] = $imgarr; }elseif ($img_size == 'professor_thumb') { $img_arr = wp_get_attachment_image_src($id, 'professor_thumb'); // Get the thumbnail url for the attachment $imgarr['id'] = $id; $imgarr['file'] = $img_arr[0]; $return_arr[] = $imgarr; }elseif ($img_size == 'blog_detail_medium') { $img_arr = wp_get_attachment_image_src($id, 'blog_detail_medium'); // Get the thumbnail url for the attachment $imgarr['id'] = $id; $imgarr['file'] = $img_arr[0]; $return_arr[] = $imgarr; }elseif ($img_size == 'blog_list_thumb') { $img_arr = wp_get_attachment_image_src($id, 'blog_list_thumb'); // Get the thumbnail url for the attachment $imgarr['id'] = $id; $imgarr['file'] = $img_arr[0]; $return_arr[] = $imgarr; }elseif ($img_size == 'facilities_img') { $img_arr = wp_get_attachment_image_src($id, 'facilities_img'); // Get the thumbnail url for the attachment $imgarr['id'] = $id; $imgarr['file'] = $img_arr[0]; $return_arr[] = $imgarr; }elseif ($img_size == 'widget_img') { $img_arr = wp_get_attachment_image_src($id, 'widget_img'); // Get the thumbnail url for the attachment if (!$img_arr) { $img_arr = wp_get_attachment_image_src($id, 'thumbnail'); // Get the thumbnail url for the attachment } $imgarr['id'] = $id; $imgarr['file'] = $img_arr[0]; $return_arr[] = $imgarr; } } } return $return_arr; } /**-- Function to fetch images EOF --**/ /* ======================= UNREGISTER MENU AREA ============================== */ /** * */ function rainbow_unregister_menus() { unregister_nav_menu('header-horizontal'); unregister_nav_menu('header-secondary'); //unregister_nav_menu('footer'); unregister_nav_menu('header-primary'); unregister_nav_menu('subsidiary'); } /**-- Function to het different header per page --**/ /** * */ function rainbow_header_function() { $call_no = education_hybrid_get_setting( 'contact_no_with_menu' ); $navigation = get_option('supreme_theme_settings'); $navigation_setting = education_hybrid_get_setting('navigation'); ?>
post_excerpt != "") { echo "
".$post->post_excerpt."
"; }else { if ($post->post_type != 'gallery') { $excerpt = substr($post->post_content, 0, 75); //echo ''.$excerpt.'
'; } } } if (is_tax() || is_category()) { ?> get_queried_object(); echo $current_term->description; } ?>' . $content . '
'; } add_shortcode( 'Download', 'message_download' ); /** * * @param unknown $atts * @param unknown $content (optional) * @return unknown */ function message_alert( $atts, $content = null ) { return '' . $content . '
'; } add_shortcode( 'Alert', 'message_alert' ); /** * * @param unknown $atts * @param unknown $content (optional) * @return unknown */ function message_note( $atts, $content = null ) { return '' . $content . '
'; } add_shortcode( 'Note', 'message_note' ); /** * * @param unknown $atts * @param unknown $content (optional) * @return unknown */ function message_info( $atts, $content = null ) { return '' . $content . '
'; } add_shortcode( 'Info', 'message_info' ); // Shortcodes - About Author -------------------------------------------------------- // /** * * @param unknown $atts * @param unknown $content (optional) * @return unknown */ function about_author( $atts, $content = null ) { return ' '; } add_shortcode( 'AuthorInfo', 'about_author' ); /** * * @param unknown $atts * @param unknown $content (optional) * @return unknown */ function icon_list_view( $atts, $content = null ) { return '' . $content . '
'; } add_shortcode( 'Dropcaps', 'dropcaps' ); // Shortcodes - Small Buttons -------------------------------------------------------- // /** * * @param unknown $atts * @param unknown $content * @return unknown */ function small_button( $atts, $content ) { return ' '; } add_shortcode( 'Small_Button', 'small_button' ); /***-- Short codes EOF ---***/ /** * Function to get facilities BOF * * * @param unknown $post_id */ function templa_get_designation($post_id) { $post_categories = wp_get_tax_categories($post_id, '', 'designations'); $taxonomy = 'designations'; $taxonomy_category=''; foreach ($post_categories as $c) { $cat = get_term( $c, $taxonomy ); $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug ); } for ($t = 0 ; $t < count($cats) ; $t++) { if ($t == count($cats)-1) { $sep=''; }else { $sep=', '; } $cats2 = "".$cats[$t]['name']."".$sep; $taxonomy_category .= $cats2; } if ((@$post_type == 'gallery' && @$_REQUEST['gallery'] != "")) { $taxonomy_category = ucwords(@$_REQUEST['gallery']); } if ((@$post_type == 'staff' && @$_REQUEST['staff'] != "")) { $taxonomy_category = ucwords(@$_REQUEST['staff']); } if ( @$_REQUEST['attachment_id'] != '' ) { $taxonomy_category = _e(ucwords('gallery'), 'templatic'); } if (@$taxonomy_category != '') { echo $taxonomy_category; } } /** Function to get facilities EOF **/ /* Function to add theme color settings options in wordpress customizer START */ /** * * @param unknown $wp_customize */ function education_register_customizer_settings($wp_customize) { $wp_customize->add_section('education_theme_settings', array( 'title' => 'Education Theme Settings', 'priority'=>'39' )); $wp_customize->add_section('education_footer_navigation_settings', array( 'title' => 'Education Footer Navigation Settings', 'priority'=>'40' )); $wp_customize->add_section('education_header_navigation_settings', array( 'title' => 'Education Header Search Settings', 'priority'=>'41' )); $wp_customize->add_section('education_social_media_settings', array( 'title' => 'Social Media Settings For Course Detail Page', 'priority'=>'43' )); /* Add Settings START */ $wp_customize->add_setting('supreme_theme_settings[app_link]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_app_link", 'sanitize_js_callback' => "education_customize_supreme_app_link" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[app_link_title]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_app_link_title", 'sanitize_js_callback' => "education_customize_supreme_app_link_title" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[app_link_url]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_app_link_url", 'sanitize_js_callback' => "education_customize_supreme_app_link_url" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[templ_listing_view]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_templ_listing_view", 'sanitize_js_callback' => "education_customize_supreme_templ_listing_view" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[templ_listing_view_prof]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_templ_listing_view_prof", 'sanitize_js_callback' => "education_customize_supreme_templ_listing_view_prof" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[allow_comments]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_allow_comments", 'sanitize_js_callback' => "education_customize_supreme_allow_comments" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[contact_no_with_menu]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_contact_no_with_menu", 'sanitize_js_callback' => "education_customize_supreme_contact_no_with_menu" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[twitter]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_twitter", 'sanitize_js_callback' => "education_customize_supreme_twitter" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[facebook]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_facebook", 'sanitize_js_callback' => "education_customize_supreme_facebook" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[flicker]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_flicker", 'sanitize_js_callback' => "education_customize_supreme_flicker" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[rssfeed]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_rssfeed", 'sanitize_js_callback' => "education_customize_supreme_rssfeed" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[navigation]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_navigation", 'sanitize_js_callback' => "education_customize_supreme_navigation" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[color_picker_color1]', array( 'default' => '', 'type' => 'option', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_color1", 'sanitize_js_callback' => "education_customize_supreme_color1", //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[color_picker_color2]', array( 'default' => '', 'type' => 'option', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_color2", 'sanitize_js_callback' => "education_customize_supreme_color2", //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[color_picker_color3]', array( 'default' => '', 'type' => 'option', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_color3", 'sanitize_js_callback' => "education_customize_supreme_color3", //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[color_picker_color4]', array( 'default' => '', 'type' => 'option', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_color4", 'sanitize_js_callback' => "education_customize_supreme_color4", //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[color_picker_color5]', array( 'default' => '', 'type' => 'option', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_color5", 'sanitize_js_callback' => "education_customize_supreme_color5", //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[color_picker_color6]', array( 'default' => '', 'type' => 'option', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_color6", 'sanitize_js_callback' => "education_customize_supreme_color6", //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[ptthemes_twitter]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_ptthemes_twitter", 'sanitize_js_callback' => "education_customize_supreme_ptthemes_twitter" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[ptthemes_facebook]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_ptthemes_facebook", 'sanitize_js_callback' => "education_customize_supreme_ptthemes_facebook" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[ptthemes_digg]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_ptthemes_digg", 'sanitize_js_callback' => "education_customize_supreme_ptthemes_digg" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[ptthemes_del]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_ptthemes_del", 'sanitize_js_callback' => "education_customize_supreme_ptthemes_del" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[ptthemes_reddit]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_ptthemes_reddit", 'sanitize_js_callback' => "education_customize_supreme_ptthemes_reddit" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[ptthemes_linkedin]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_ptthemes_linkedin", 'sanitize_js_callback' => "education_customize_supreme_ptthemes_linkedin" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[ptthemes_technorati]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_ptthemes_technorati", 'sanitize_js_callback' => "education_customize_supreme_ptthemes_technorati" //'transport' => 'postMessage', )); $wp_customize->add_setting('supreme_theme_settings[ptthemes_myspace]', array( 'default' => '', 'capabilities' => 'edit_theme_options', 'sanitize_callback' => "education_customize_supreme_ptthemes_myspace", 'sanitize_js_callback' => "education_customize_supreme_ptthemes_myspace" //'transport' => 'postMessage', )); /* Add Control START */ /* Primary: Effect on buttons, links and main headings. Secondary: Effect on sub-headings. Content: Effect on content. Sub-text: Effect on sub-texts. Background: Effect on body & menu background. */ $wp_customize->remove_control('supreme_author_bio_pages'); $wp_customize->add_control( 'app_link', array( 'label' => __( 'Application ID', T_DOMAIN), 'section' => 'education_theme_settings', 'settings' => 'supreme_theme_settings[app_link]', 'type' => 'checkbox' ) ) ; $wp_customize->add_control( 'app_link_title', array( 'label' => __( 'Application Link Title', T_DOMAIN), 'section' => 'education_theme_settings', 'settings' => 'supreme_theme_settings[app_link_title]', 'type' => 'text' ) ) ; $wp_customize->add_control( 'app_link_url', array( 'label' => __( 'Application Link URL', T_DOMAIN), 'section' => 'education_theme_settings', 'settings' => 'supreme_theme_settings[app_link_url]', 'type' => 'text' ) ) ; $wp_customize->add_control( 'templ_listing_view', array( 'label' => __( 'Select Display view (except staff listing page)', T_DOMAIN), 'section' => 'education_theme_settings', 'settings' => 'supreme_theme_settings[templ_listing_view]', 'type' => 'select', 'choices' => array( 'list' => 'List View', 'grid' => 'Grid View' ), ) ) ; $wp_customize->add_control( 'templ_listing_view_prof', array( 'label' => __( 'Select Display view (only on staff listing page)', T_DOMAIN), 'section' => 'education_theme_settings', 'settings' => 'supreme_theme_settings[templ_listing_view_prof]', 'type' => 'select', 'choices' => array( 'list' => 'List View', 'grid' => 'Grid View' ) ) ) ; $wp_customize->add_control( 'allow_comments', array( 'label' => __( 'Comments on Taxonomy pages?', T_DOMAIN), 'section' => 'education_theme_settings', 'settings' => 'supreme_theme_settings[allow_comments]', 'type' => 'checkbox' ) ) ; $wp_customize->add_control( 'contact_no_with_menu', array( 'label' => __( 'Contact no on header', T_DOMAIN), 'section' => 'education_theme_settings', 'settings' => 'supreme_theme_settings[contact_no_with_menu]', 'type' => 'text' ) ) ; $wp_customize->add_control( 'twitter', array( 'label' => __( 'Twitter Full URL', T_DOMAIN), 'section' => 'education_footer_navigation_settings', 'settings' => 'supreme_theme_settings[twitter]', 'type' => 'text' ) ) ; $wp_customize->add_control( 'facebook', array( 'label' => __( 'Facebook Full URL', T_DOMAIN), 'section' => 'education_footer_navigation_settings', 'settings' => 'supreme_theme_settings[facebook]', 'type' => 'text' ) ) ; $wp_customize->add_control( 'flicker', array( 'label' => __( 'Flicker Full URL', T_DOMAIN), 'section' => 'education_footer_navigation_settings', 'settings' => 'supreme_theme_settings[flicker]', 'type' => 'text' ) ) ; $wp_customize->add_control( 'rssfeed', array( 'label' => __( 'Rss Full URL', T_DOMAIN), 'section' => 'education_footer_navigation_settings', 'settings' => 'supreme_theme_settings[rssfeed]', 'type' => 'text' ) ) ; $wp_customize->add_control( 'navigation', array( 'label' => __( 'Hide Header Search', T_DOMAIN), 'section' => 'education_header_navigation_settings', 'settings' => 'supreme_theme_settings[navigation]', 'type' => 'checkbox' ) ) ; $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'color_picker_color1', array( 'label' => __( 'Change color of Links, Buttons Gradient, Search bar left', T_DOMAIN), 'section' => 'colors', 'settings' => 'supreme_theme_settings[color_picker_color1]', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'color_picker_color2', array( 'label' => __( 'Change color of inputs, Buttons Gradient, Search bar right', T_DOMAIN ), 'section' => 'colors', 'settings' => 'supreme_theme_settings[color_picker_color2]', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'color_picker_color3', array( 'label' => __( 'Change color of Links hover, headings, titles, footer bottom', T_DOMAIN ), 'section' => 'colors', 'settings' => 'supreme_theme_settings[color_picker_color3]', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'color_picker_color4', array( 'label' => __( 'Change color of Sub-text', T_DOMAIN ), 'section' => 'colors', 'settings' => 'supreme_theme_settings[color_picker_color4]', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'color_picker_color5', array( 'label' => __( 'Change color of Header, Footer', T_DOMAIN ), 'section' => 'colors', 'settings' => 'supreme_theme_settings[color_picker_color5]', ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'color_picker_color6', array( 'label' => __( 'Change color of Body Background', T_DOMAIN ), 'section' => 'colors', 'settings' => 'supreme_theme_settings[color_picker_color6]', ) ) ); $wp_customize->remove_control('background_color'); $wp_customize->add_control( 'archive', array( 'label' => __( 'Select Post Type', T_DOMAIN), 'section' => 'education_archive_page_settings', 'settings' => 'supreme_theme_settings[archive]', 'type' => 'select', 'choices' => array( 'facilities' => 'facilities', 'gallery' => 'gallery', 'course'=>'course', 'staff'=>'staff' ), ) ) ; $wp_customize->add_control( 'ptthemes_twitter', array( 'label' => __( 'Twitter', T_DOMAIN), 'section' => 'education_social_media_settings', 'settings' => 'supreme_theme_settings[ptthemes_twitter]', 'type' => 'checkbox' ) ) ; $wp_customize->add_control( 'ptthemes_facebook', array( 'label' => __( 'Facebook', T_DOMAIN), 'section' => 'education_social_media_settings', 'settings' => 'supreme_theme_settings[ptthemes_facebook]', 'type' => 'checkbox' ) ) ; $wp_customize->add_control( 'ptthemes_digg', array( 'label' => __( 'Digg it', T_DOMAIN), 'section' => 'education_social_media_settings', 'settings' => 'supreme_theme_settings[ptthemes_digg]', 'type' => 'checkbox' ) ) ; $wp_customize->add_control( 'ptthemes_del', array( 'label' => __( 'Add to Delicious', T_DOMAIN), 'section' => 'education_social_media_settings', 'settings' => 'supreme_theme_settings[ptthemes_del]', 'type' => 'checkbox' ) ) ; $wp_customize->add_control( 'ptthemes_reddit', array( 'label' => __( 'Add to Read it', T_DOMAIN), 'section' => 'education_social_media_settings', 'settings' => 'supreme_theme_settings[ptthemes_reddit]', 'type' => 'checkbox' ) ) ; $wp_customize->add_control( 'ptthemes_linkedin', array( 'label' => __( 'Add to Linked In', T_DOMAIN), 'section' => 'education_social_media_settings', 'settings' => 'supreme_theme_settings[ptthemes_linkedin]', 'type' => 'checkbox' ) ) ; $wp_customize->add_control( 'ptthemes_technorati', array( 'label' => __( 'Add to Technorati', T_DOMAIN), 'section' => 'education_social_media_settings', 'settings' => 'supreme_theme_settings[ptthemes_technorati]', 'type' => 'checkbox' ) ) ; $wp_customize->add_control( 'ptthemes_myspace', array( 'label' => __( 'Add to MySpace', T_DOMAIN), 'section' => 'education_social_media_settings', 'settings' => 'supreme_theme_settings[ptthemes_myspace]', 'type' => 'checkbox' ) ) ; } /* Handles changing settings for the live preview of the theme START. */ /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_app_link( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[app_link]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_app_link", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_app_link_title( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[app_link_title]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_app_link_title", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_app_link_url( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[app_link_url]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_app_link_url", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_templ_listing_view( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[templ_listing_view]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_templ_listing_view", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_templ_listing_view_prof( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[templ_listing_view_prof]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_templ_listing_view_prof", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_allow_comments( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[allow_comments]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_allow_comments", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_contact_no_with_menu( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[contact_no_with_menu]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_contact_no_with_menu", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_twitter( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[twitter]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_twitter", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_facebook( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[facebook]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_facebook", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_flicker( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[flicker]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_flicker", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_rssfeed( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[rssfeed]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_rssfeed", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_navigation( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[navigation]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_navigation", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_color1( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[color_picker_color1]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_color1", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_color2( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[color_picker_color2]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_color2", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_color3( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[color_picker_color3]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_color3", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_color4( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[color_picker_color4]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_color4", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_color5( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[color_picker_color5]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_color5", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_color6( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[color_picker_color6]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_color6", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_ptthemes_twitter( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[ptthemes_twitter]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_ptthemes_twitter", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_ptthemes_facebook( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[ptthemes_facebook]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_ptthemes_facebook", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_ptthemes_digg( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[ptthemes_digg]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_ptthemes_digg", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_ptthemes_del( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[ptthemes_del]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_ptthemes_del", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_ptthemes_reddit( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[ptthemes_reddit]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_ptthemes_reddit", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_ptthemes_linkedin( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[ptthemes_linkedin]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_ptthemes_linkedin", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_ptthemes_technorati( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[ptthemes_technorati]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_ptthemes_technorati", $setting, $object ); } /** * * @param unknown $setting * @param unknown $object * @return unknown */ function education_customize_supreme_ptthemes_myspace( $setting, $object ) { /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ if ( "supreme_theme_settings[ptthemes_myspace]" == $object->id && !current_user_can( 'unfiltered_html' ) ) $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); /* Return the sanitized setting and apply filters. */ return apply_filters( "education_customize_supreme_ptthemes_myspace", $setting, $object ); } /* Function to add theme color settings options in wordpress customizer END */ /* THEME UPDATE CODING START */ /** * Theme update templatic menu */ function EducationAcademy_tmpl_theme_update() { require_once get_stylesheet_directory()."/templatic_login.php"; } /* Theme update templatic menu*/ /** * */ function EducationAcademy_tmpl_support_theme() { echo "Here's how you can get help from templatic on any thing you need with regarding this theme.
"; echo "'."Take a look at theme guide".'
'; echo ''; echo ''; echo ''; } /* Theme update templatic menu*/ /** * */ function EducationAcademy_tmpl_purchase_theme() { wp_redirect( 'http://templatic.com/wordpress-themes-store/' ); exit; } add_action('admin_menu', 'EducationAcademy_theme_menu', 11); // add submenu page add_action('admin_menu', 'delete_EducationAcademy_templatic_menu', 11); /** * */ function EducationAcademy_theme_menu() { add_submenu_page( 'templatic_menu', 'Theme Update', 'Theme Update', 'administrator', 'EducationAcademy_tmpl_theme_update', 'EducationAcademy_tmpl_theme_update', 27 ); add_submenu_page( 'templatic_menu', 'Framework Update', 'Framework Update', 'administrator', 'tmpl_framework_update', 'tmpl_framework_update', 28 ); add_submenu_page( 'templatic_menu', 'Get Support' , 'Get Support' , 'administrator', 'EducationAcademy_tmpl_support_theme', 'EducationAcademy_tmpl_support_theme', 29 ); add_submenu_page( 'templatic_menu', 'Purchase theme', 'Purchase theme', 'administrator', 'EducationAcademy_tmpl_purchase_theme', 'EducationAcademy_tmpl_purchase_theme', 30 ); } /* Realtr delete menu */ /** * */ function delete_EducationAcademy_templatic_menu() { remove_submenu_page('templatic_menu', 'templatic_menu'); } /* THEME UPDATE CODING END */ ?>