__('Main Menu','blogyfourteen')
));
// Editor style;
$font_url = urlencode( 'http://fonts.googleapis.com/css?family=Lato:300,400,700' );
add_editor_style( $font_url );
// Sidebar register;
register_sidebar(array(
'name' => __( 'Sidebar', 'bloggyfourteen' ),
'id' => 'sidebar',
'description' => 'This is main sidebar.',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => ''
));
}
}
add_action('after_setup_theme','pf_setup');
/*
* Loading custom scripts;
*/
if(!function_exists('pf_scripts')){
function pf_scripts(){
// Load js files;
wp_enqueue_script('bootstrap', root. '/js/bootstrap.min.js',array('jquery'), false, true);
wp_enqueue_script('swipe', root. '/js/swipe.js', array('jquery'), false, true);
wp_enqueue_script('quote', root. '/js/quote.js', array('jquery'), false, true);
wp_enqueue_script('custom', root. '/js/script.js', array('jquery'), false, true);
// Load stylesheets;
wp_enqueue_style('bootstrap', root.'/css/bootstrap.min.css');
wp_enqueue_style('swipe', root.'/css/swipebox.min.css');
wp_enqueue_style('font-awesome', root.'/css/font-awesome.min.css');
wp_enqueue_style('responsive', root.'/css/responsive.css');
}
}
add_action('wp_enqueue_scripts','pf_scripts');
/*
* Setting title;
*/
function pf_wp_title( $title, $sep ) {
global $paged, $page;
if ( is_feed() ) {
return $title;
}
// Add the site name.
$title .= get_bloginfo( 'name', 'display' );
// Add the site description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) {
$title = "$title $sep $site_description";
}
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 ) {
$title = "$title $sep " . sprintf( __( 'Page %s', 'bloggyfourteen' ), max( $paged, $page ) );
}
return $title;
}
add_filter( 'wp_title', 'pf_wp_title', 10, 2 );
/*
* Meta setting;
*/
if(!function_exists('post_meta')){
function post_meta() {
echo '';
printf( '    
%5$s ',
esc_url( get_permalink() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
get_the_author()
);
if(!post_password_required() && comments_open() || get_comments_number()):
echo '    ';
comments_popup_link(__('Leae a comment','bloggyfourteen'),__('1 comment','bloggyfourteen'),__('% comment','bloggyfourteen'));
endif;
if(is_user_logged_in()):
echo '    ';
edit_post_link(__('Edit','bloggyfourteen'));
endif;
echo '
';
}
}
if(!function_exists('category_setup')){
function category_setup(){
echo '';
the_category(' / ','');
echo '
';
}
}
/*
* Function to display comments;
*/
function pf_comments($comment, $args, $depth){
$GLOBALS['comment'] == $comment;
if(get_comment_type() == 'pingback' || get_comment_type() == 'tracback'):?>