__('Top Navigation', 'prnews')));
register_nav_menus(array('boot_nav' => __('Bootom Navigation', 'prnews')));
add_theme_support('automatic-feed-links');
add_theme_support('post-thumbnails');
add_theme_support('custom-background', array(
'default-color' => 'f2f2f2',
));
add_theme_support( 'menus' );
$defaults = array(
'height' => 80
);
add_theme_support( 'custom-header' );
add_theme_support('post-formats', array( 'aside', 'gallery','link','image','quote','status','video','audio','chat' ) );
}
add_action( 'after_setup_theme', 'prnews_setup' );
function prnews_widgets_init() {
register_sidebar(array('name' => 'sidebar-left', 'before_widget' => '
', 'after_widget' => "
", 'before_title' => ''));
register_sidebar(array('name' => 'sidebar-right', 'before_widget' => '', 'after_widget' => "
", 'before_title' => ''));
register_sidebar(array('name' => 'sidebar-home', 'before_widget' => '', 'after_widget' => "
", 'before_title' => ''));
}
add_action( 'widgets_init', 'prnews_widgets_init' );
function prnews_scripts() {
wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.css', null, '2.3.1');
wp_enqueue_style('fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css', array( 'bootstrap' ), '3.2.1' );
wp_enqueue_style('gallery', get_template_directory_uri() . '/css/bootstrap-image-gallery.min.css', array( 'bootstrap' ), '3.0.2' );
// Load Theme Stylesheet
wp_enqueue_style( 'style', get_stylesheet_uri(), array( 'core-style' ), '1.0' );
wp_enqueue_script('prnews_bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), null, true);
wp_enqueue_script('prnews_modal', get_template_directory_uri() . '/js/bootstrap-modal.js', array('jquery'), null, true);
if (is_singular() && comments_open() && get_option( 'thread_comments' )) {
wp_enqueue_script('comment-reply');
}
if (!is_singular()) {
wp_enqueue_script('prnews_masonry', get_template_directory_uri() . '/js/jquery.masonry.min.js', array('jquery'), null, false);
wp_enqueue_script('prnews_infinitescroll', get_template_directory_uri() . '/js/jquery.infinitescroll.js', array('jquery'), null, false);
}
if (is_singular()) {
wp_enqueue_script('prnews_loadimage', get_template_directory_uri() . '/js/load-image.min.js', array('jquery'), null, true);
wp_enqueue_script('prnews_imagegallery', get_template_directory_uri() . '/js/bootstrap-image-gallery.min.js', array('jquery'), null, true);
}
}
add_action('wp_enqueue_scripts', 'prnews_scripts');
function prnews_foot_scripts() {
if (!is_singular()) { ?>
post_mime_type, 0, 6 ) ) {
$link = wp_get_attachment_url( $id );
return $link;
} else
return $link;
}
add_filter( 'attachment_link', 'prnews_attachment_link', 10, 2 );
function prnews_class_attachment_link($html){
$postid = get_the_ID();
$html = str_replace(']*?)>/i";
$replacement = '';
$content = preg_replace($pattern, $replacement, $content);
return $content;
}
add_filter('the_content', 'prnews_img_modal');
/**
* Bootstrap: Register Custom Navigation Walker
*/
require_once('inc/wp_bootstrap_navwalker.php');
function prnews_thumbnail($pID,$thumb='medium') {
$imgsrc = FALSE;
if (has_post_thumbnail()) {
$imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($pID),$thumb);
$imgsrc = $imgsrc[0];
} elseif ($postimages = get_children("post_parent=$pID&post_type=attachment&post_mime_type=image&numberposts=0")) {
foreach($postimages as $postimage) {
$imgsrc = wp_get_attachment_image_src($postimage->ID, $thumb);
$imgsrc = $imgsrc[0];
}
} elseif (preg_match('/]*src=["|\']([^"|\']+)/i', get_the_content(), $match) != FALSE) {
$imgsrc = $match[1];
}
if($imgsrc) {
$imgsrc = '';
return $imgsrc;
}
}
function prnews_sidebar_home($paged) {
if ($paged == 0){ ?>
id="comment-">
__(' Reply', 'prnews'), 'depth' => $depth, 'max_depth'=> $args['max_depth'])) ?>