'ffffff',
'default-image' => '',
'default-repeat' => '',
'default-position-x' => '',
'wp-head-callback' => '_custom_background_cb',
'admin-head-callback' => '',
'admin-preview-callback' => ''
);
add_theme_support( 'custom-background', $defaults );
/* This theme uses custom header */
$defaults = array(
'width' => 1920,
'height' => 120,
'header-text' => true,
'uploads' => true,
'default-text-color' => '576167',
'wp-head-callback' => 'mdclcntr_header_style',
);
add_theme_support( 'custom-header', $defaults );
/* Add default posts and comments RSS feed links to head */
add_theme_support( 'automatic-feed-links' );
} /* mdclcntr_setup */
/**
* Style the displaying title
*
*/
function mdclcntr_filter_wp_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() )
return $title;
/* Add the site name. */
$title .= get_bloginfo( 'name' );
return $title;
}
/**
* Style the text displayed on the blog.
*
*/
function mdclcntr_header_style() {
$text_color = get_header_textcolor();
/* If no custom options for text are set, let's bail. */
if ( $text_color == HEADER_TEXTCOLOR )
return;
/* If we get this far, we have custom styles. Let's do this. */?>
'Sidebar',
'id' => 'sidebar',
'before_widget' => '',
'before_title' => '
',
)
);
}/* mdclcntr_widgets_init */
/**
*Our css and scripts.
*
*/
function mdclcntr_scripts_method() {
wp_enqueue_style( 'mdclcntrStyle', get_stylesheet_uri() );
wp_enqueue_script( 'comment-reply' );
wp_enqueue_script( 'mdclcntrScript', get_stylesheet_directory_uri() . '/js/scripts.js', array( 'jquery' ) );
wp_enqueue_script( 'mdclcntrJquery.flexslider', get_stylesheet_directory_uri() . '/js/jquery.flexslider-min.js', array( 'jquery' ) );
wp_enqueue_script( 'mdclcntrHtml5', get_stylesheet_directory_uri() . '/js/html5.js', array( 'jquery' ) );
?>
ID, 'mdclcntr_add_slider', true ) ) { ?> checked='checked' />
ID, 'mdclcntr_add_slider', 'on' ) ) ) {
update_post_meta( $post->ID, 'mdclcntr_add_slider', 'off' );
}
}
}/* save_post_meta_for_slider */
/**
*Our excerpt in the slider.
*
*/
function mdclcntr_excerpt_for_slider( $more ) {
return ''; //remove the ellipsis in the slider.
}/* new_excerpt_more */
function mdclcntr_length_for_slider( $length ) {
return 25; //number of input words in the slider.
}/* new_excerpt_length */
/**
*Our Breadcrumb for header.
*
*/
function mdclcntr_the_breadcrumb() {
global $post;
if ( ! is_front_page() ) { ?>
-
ancestors ) {
$ancestors = array_reverse( $post-> ancestors );
for( $i = 0; $i < count( $ancestors); $i++ ) {
if ( 0 == $i ) {
echo '' . get_the_title( $ancestors[ $i ] ) . '' . ' - ';
}
else {
echo '' . get_the_title( $ancestors[ $i ] ) . '' . ' - ';
}
}
}
else {
$ancestors = get_the_title();
}
/*Display elements of array as breadcrumbs*/
echo get_the_title();
}
elseif ( is_search() ) {
printf( __( 'Search Results for:', 'medical_center' ) . ' ' . get_search_query() );
}
elseif ( is_archive() ) {
if ( is_author() ) {
echo the_category( ', ' ) . ' - ' . __( 'Author archives', 'medical_center' );
}
else {
echo the_category( ', ' ) . ' - ' . get_the_date( 'F Y' );
}
}
elseif ( is_404() ) {
_e( 'Page not found', 'medical_center' );
}
}
else { ?>
ID );
$args = array(
'post_type' => 'attachment',
'post_status' => null,
'parent' => $post->ID,
'include' => $thumb_id
);
$thumbnail_image = get_posts( $args );
if ( $thumb_id && $thumbnail_image && isset( $thumbnail_image[ 0 ] ) ) :
// Showing the thumbnail caption
$caption = $thumbnail_image[ 0 ] ->post_excerpt;
if ( $caption ) :
$output = '';
$output .= $caption;
$output .= '
';
echo $output;
endif;
endif;
}/* mdclcntr_the_post_caption */
/*
* Template for comments and pingbacks
*
*/
function mdclcntr_comment( $comment, $args, $depth ) {
$GLOBALS[ 'comment' ] = $comment;
switch ( $comment ->comment_type ) :
case 'pingback' :
case 'trackback' :
// display trackbacks differently than normal comments. ?>
id="comment-">
', '' ); ?>
id="li-comment-">
str_replace( $big, '%#%', get_pagenum_link( $big ) )
,'format' => ''
,'current' => max( 1, get_query_var( 'paged' ) )
,'total' => $wp_query->max_num_pages
,'prev_text' => ''
,'next_text' => ''
);
$result = paginate_links( $args );
echo $result;
}/* mdclcntr_pagenavi */
add_action( 'after_setup_theme', 'mdclcntr_setup' );
add_filter( 'wp_title', 'mdclcntr_filter_wp_title', 1, 3 );
add_action( 'widgets_init', 'mdclcntr_widgets_init' );
add_action( 'wp_enqueue_scripts', 'mdclcntr_scripts_method' );
add_action( 'add_meta_boxes', 'mdclcntr_metabox_for_slider' );
add_action( 'save_post', 'mdclcntr_save_post_meta_for_slider' );
add_filter( 'excerpt_more', 'mdclcntr_excerpt_for_slider' );
add_filter( 'excerpt_length', 'mdclcntr_length_for_slider' );
add_action( 'mdclcntr_the_breadcrumb', 'mdclcntr_the_breadcrumb' );
add_action( 'mdclcntr_the_post_caption', 'mdclcntr_the_post_caption' );
add_action( 'mdclcntr_pagenavi', 'mdclcntr_pagenavi' );
?>