__( 'Primary Navigation', 'scylla' ), 'footer_menu' => __( 'Footer Navigation', 'scylla' ) ) ); //SIDEBAR function scl_widgets_init(){ register_sidebar(array( 'name' => __('Sidebar'), 'id' => 'sidebar', 'description' => 'Sidebar', 'before_widget' => '
post_type == "slider" ) { if( isset($_POST['slide_link']) ) { update_post_meta( $post->ID, 'slide_link', $_POST['slide_link'] );} } } add_action('do_meta_boxes', 'scl_slider_image_box'); function scl_slider_image_box() { remove_meta_box( 'postimagediv', 'slider', 'side' ); add_meta_box('postimagediv', __('Slide Image'), 'post_thumbnail_meta_box', 'slider', 'normal', 'high'); } //SCYLLA get the first image of the post Function function scl_get_images($overrides = '', $exclude_thumbnail = false) { return get_posts(wp_parse_args($overrides, array( 'numberposts' => -1, 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'exclude' => $exclude_thumbnail ? array(get_post_thumbnail_id()) : array(), 'orderby' => 'menu_order ID' ))); } //Custom Excerpt Length function scl_excerptlength_teaser($length) { return 27; } function scl_excerptlength_index($length) { return 12; } function scl_excerptmore($more) { return '...'; } function scl_excerpt($length_callback='', $more_callback='') { global $post; if(function_exists($length_callback)){ add_filter('excerpt_length', $length_callback); } if(function_exists($more_callback)){ add_filter('excerpt_more', $more_callback); } $output = get_the_excerpt(); $output = apply_filters('wptexturize', $output); $output = apply_filters('convert_chars', $output); $output = '
'.$output.'
'; echo $output; } //Load Java Scripts to header function scl_head_js() { if ( !is_admin() ) { wp_enqueue_script('jquery'); wp_enqueue_script('Scylla',get_template_directory_uri().'/js/scylla.js'); wp_enqueue_script('other',get_template_directory_uri().'/js/other.js'); $option = get_option('scl_options'); if($option['scl_slider']== "Easyslider") { wp_enqueue_script('EasySlider',get_template_directory_uri().'/js/easyslider.js'); } if($option["scl_diss_fbx"] == "1"){ } else { wp_enqueue_script('fancybox_js',get_template_directory_uri().'/js/fancybox.js'); } if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); } } add_action('wp_enqueue_scripts', 'scl_head_js'); //Load Slider Speed Control add_action('wp_footer', 'scl_load_js'); function scl_load_js() { ?>