mirror of
https://ghproxy.net/https://github.com/AlxMedia/blogrow.git
synced 2025-08-26 06:36:25 +08:00
Replace alx_ with blogrow_ everywhere except for alx extensions plugin sections (in single.php and theme-options.php)
This commit is contained in:
parent
1082f1b48f
commit
f20f92634e
14 changed files with 182 additions and 186 deletions
|
@ -74,7 +74,7 @@
|
|||
</div>
|
||||
<div class="grid one-half last">
|
||||
<?php if ( get_theme_mod( 'footer-social', 'on' ) == 'on' ): ?>
|
||||
<?php alx_social_links() ; ?>
|
||||
<?php blogrow_social_links() ; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div><!--/.pad-->
|
||||
|
|
182
functions.php
182
functions.php
|
@ -11,9 +11,9 @@
|
|||
* Load theme files
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
if ( ! function_exists( 'alx_load' ) ) {
|
||||
if ( ! function_exists( 'blogrow_load' ) ) {
|
||||
|
||||
function alx_load() {
|
||||
function blogrow_load() {
|
||||
// Load theme languages
|
||||
load_theme_textdomain( 'blogrow', get_template_directory().'/languages' );
|
||||
|
||||
|
@ -34,7 +34,7 @@ if ( ! function_exists( 'alx_load' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'after_setup_theme', 'alx_load' );
|
||||
add_action( 'after_setup_theme', 'blogrow_load' );
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- *
|
||||
|
@ -47,9 +47,9 @@ add_action( 'after_setup_theme', 'alx_load' );
|
|||
|
||||
/* Theme setup
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_setup' ) ) {
|
||||
if ( ! function_exists( 'blogrow_setup' ) ) {
|
||||
|
||||
function alx_setup() {
|
||||
function blogrow_setup() {
|
||||
// Enable title tag
|
||||
add_theme_support( 'title-tag' );
|
||||
|
||||
|
@ -79,26 +79,26 @@ if ( ! function_exists( 'alx_setup' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'after_setup_theme', 'alx_setup' );
|
||||
add_action( 'after_setup_theme', 'blogrow_setup' );
|
||||
|
||||
|
||||
/* Deregister
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_deregister' ) ) {
|
||||
if ( ! function_exists( 'blogrow_deregister' ) ) {
|
||||
|
||||
function alx_deregister() {
|
||||
function blogrow_deregister() {
|
||||
wp_deregister_style( 'wp-pagenavi' );
|
||||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_print_styles', 'alx_deregister', 100 );
|
||||
add_action( 'wp_print_styles', 'blogrow_deregister', 100 );
|
||||
|
||||
|
||||
/* Register sidebars
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_sidebars' ) ) {
|
||||
if ( ! function_exists( 'blogrow_sidebars' ) ) {
|
||||
|
||||
function alx_sidebars() {
|
||||
function blogrow_sidebars() {
|
||||
register_sidebar(array( 'name' => 'Primary','id' => 'primary','description' => "Normal full width sidebar", 'before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3><span>','after_title' => '</span></h3>'));
|
||||
if ( get_theme_mod('footer-widgets') >= '1' ) { register_sidebar(array( 'name' => 'Footer 1','id' => 'footer-1', 'description' => "Widgetized footer", 'before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3><span>','after_title' => '</span></h3>')); }
|
||||
if ( get_theme_mod('footer-widgets') >= '2' ) { register_sidebar(array( 'name' => 'Footer 2','id' => 'footer-2', 'description' => "Widgetized footer", 'before_widget' => '<div id="%1$s" class="widget %2$s">','after_widget' => '</div>','before_title' => '<h3><span>','after_title' => '</span></h3>')); }
|
||||
|
@ -107,14 +107,14 @@ if ( ! function_exists( 'alx_sidebars' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'widgets_init', 'alx_sidebars' );
|
||||
add_action( 'widgets_init', 'blogrow_sidebars' );
|
||||
|
||||
|
||||
/* Enqueue javascript
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_scripts' ) ) {
|
||||
if ( ! function_exists( 'blogrow_scripts' ) ) {
|
||||
|
||||
function alx_scripts() {
|
||||
function blogrow_scripts() {
|
||||
wp_enqueue_script( 'blogrow-flexslider', get_template_directory_uri() . '/js/jquery.flexslider.min.js', array( 'jquery' ),'', false );
|
||||
wp_enqueue_script( 'blogrow-fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array( 'jquery' ),'', true );
|
||||
wp_enqueue_script( 'blogrow-owl-carousel', get_template_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ),'', true );
|
||||
|
@ -123,14 +123,14 @@ if ( ! function_exists( 'alx_scripts' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'alx_scripts' );
|
||||
add_action( 'wp_enqueue_scripts', 'blogrow_scripts' );
|
||||
|
||||
|
||||
/* Enqueue css
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_styles' ) ) {
|
||||
if ( ! function_exists( 'blogrow_styles' ) ) {
|
||||
|
||||
function alx_styles() {
|
||||
function blogrow_styles() {
|
||||
wp_enqueue_style( 'blogrow-style', get_stylesheet_uri() );
|
||||
if ( get_theme_mod('responsive','on') =='on' ) { wp_enqueue_style( 'blogrow-responsive', get_template_directory_uri().'/responsive.css' ); }
|
||||
if ( get_theme_mod('custom','off') == 'on' ) { wp_enqueue_style( 'blogrow-custom', get_template_directory_uri().'/custom.css' ); }
|
||||
|
@ -138,14 +138,14 @@ if ( ! function_exists( 'alx_styles' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'alx_styles' );
|
||||
add_action( 'wp_enqueue_scripts', 'blogrow_styles' );
|
||||
|
||||
|
||||
/* Register custom sidebars
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_custom_sidebars' ) ) {
|
||||
if ( ! function_exists( 'blogrow_custom_sidebars' ) ) {
|
||||
|
||||
function alx_custom_sidebars() {
|
||||
function blogrow_custom_sidebars() {
|
||||
if ( !get_theme_mod('sidebar-areas') =='' ) {
|
||||
|
||||
$sidebars = get_theme_mod('sidebar-areas', array());
|
||||
|
@ -161,7 +161,7 @@ if ( ! function_exists( 'alx_custom_sidebars' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'widgets_init', 'alx_custom_sidebars' );
|
||||
add_action( 'widgets_init', 'blogrow_custom_sidebars' );
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- *
|
||||
|
@ -170,9 +170,9 @@ add_action( 'widgets_init', 'alx_custom_sidebars' );
|
|||
|
||||
/* Layout class
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_layout_class' ) ) {
|
||||
if ( ! function_exists( 'blogrow_layout_class' ) ) {
|
||||
|
||||
function alx_layout_class() {
|
||||
function blogrow_layout_class() {
|
||||
// Default layout
|
||||
$layout = 'col-2cl';
|
||||
$default = 'col-2cl';
|
||||
|
@ -212,9 +212,9 @@ if ( ! function_exists( 'alx_layout_class' ) ) {
|
|||
|
||||
/* Dynamic sidebar primary
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_sidebar_primary' ) ) {
|
||||
if ( ! function_exists( 'blogrow_sidebar_primary' ) ) {
|
||||
|
||||
function alx_sidebar_primary() {
|
||||
function blogrow_sidebar_primary() {
|
||||
// Default sidebar
|
||||
$sidebar = 'primary';
|
||||
|
||||
|
@ -246,9 +246,9 @@ if ( ! function_exists( 'alx_sidebar_primary' ) ) {
|
|||
|
||||
/* Dynamic sidebar secondary
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_sidebar_secondary' ) ) {
|
||||
if ( ! function_exists( 'blogrow_sidebar_secondary' ) ) {
|
||||
|
||||
function alx_sidebar_secondary() {
|
||||
function blogrow_sidebar_secondary() {
|
||||
// Default sidebar
|
||||
$sidebar = 'secondary';
|
||||
|
||||
|
@ -280,9 +280,9 @@ if ( ! function_exists( 'alx_sidebar_secondary' ) ) {
|
|||
|
||||
/* Social links
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_social_links' ) ) {
|
||||
if ( ! function_exists( 'blogrow_social_links' ) ) {
|
||||
|
||||
function alx_social_links() {
|
||||
function blogrow_social_links() {
|
||||
if ( !get_theme_mod('social-links') =='' ) {
|
||||
$links = get_theme_mod('social-links', array());
|
||||
if ( !empty( $links ) ) {
|
||||
|
@ -316,9 +316,9 @@ if ( ! function_exists( 'alx_social_links' ) ) {
|
|||
|
||||
/* Site name/logo
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_site_title' ) ) {
|
||||
if ( ! function_exists( 'blogrow_site_title' ) ) {
|
||||
|
||||
function alx_site_title() {
|
||||
function blogrow_site_title() {
|
||||
|
||||
// Text or image?
|
||||
if ( get_theme_mod('custom-logo') ) {
|
||||
|
@ -343,9 +343,9 @@ if ( ! function_exists( 'alx_site_title' ) ) {
|
|||
|
||||
/* Page title
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_page_title' ) ) {
|
||||
if ( ! function_exists( 'blogrow_page_title' ) ) {
|
||||
|
||||
function alx_page_title() {
|
||||
function blogrow_page_title() {
|
||||
global $post;
|
||||
|
||||
$heading = esc_attr( get_post_meta($post->ID,'_heading',true) );
|
||||
|
@ -363,9 +363,9 @@ if ( ! function_exists( 'alx_page_title' ) ) {
|
|||
|
||||
/* Blog title
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_blog_title' ) ) {
|
||||
if ( ! function_exists( 'blogrow_blog_title' ) ) {
|
||||
|
||||
function alx_blog_title() {
|
||||
function blogrow_blog_title() {
|
||||
global $post;
|
||||
$heading = esc_attr( get_theme_mod('blog-heading') );
|
||||
$subheading = esc_attr( get_theme_mod('blog-subheading') );
|
||||
|
@ -386,9 +386,9 @@ if ( ! function_exists( 'alx_blog_title' ) ) {
|
|||
|
||||
/* Related posts
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_related_posts' ) ) {
|
||||
if ( ! function_exists( 'blogrow_related_posts' ) ) {
|
||||
|
||||
function alx_related_posts() {
|
||||
function blogrow_related_posts() {
|
||||
wp_reset_postdata();
|
||||
global $post;
|
||||
|
||||
|
@ -437,9 +437,9 @@ if ( ! function_exists( 'alx_related_posts' ) ) {
|
|||
|
||||
/* Get images attached to post
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_post_images' ) ) {
|
||||
if ( ! function_exists( 'blogrow_post_images' ) ) {
|
||||
|
||||
function alx_post_images( $args=array() ) {
|
||||
function blogrow_post_images( $args=array() ) {
|
||||
global $post;
|
||||
|
||||
$defaults = array(
|
||||
|
@ -461,9 +461,9 @@ if ( ! function_exists( 'alx_post_images' ) ) {
|
|||
|
||||
/* Get featured post ids
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_get_featured_post_ids' ) ) {
|
||||
if ( ! function_exists( 'blogrow_get_featured_post_ids' ) ) {
|
||||
|
||||
function alx_get_featured_post_ids() {
|
||||
function blogrow_get_featured_post_ids() {
|
||||
$args = array(
|
||||
'category' => get_theme_mod('featured-category',''),
|
||||
'numberposts' => get_theme_mod('featured-posts-count','3')
|
||||
|
@ -484,9 +484,9 @@ if ( ! function_exists( 'alx_get_featured_post_ids' ) ) {
|
|||
|
||||
/* Post formats script
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_post_formats_script' ) ) {
|
||||
if ( ! function_exists( 'blogrow_post_formats_script' ) ) {
|
||||
|
||||
function alx_post_formats_script( $hook ) {
|
||||
function blogrow_post_formats_script( $hook ) {
|
||||
// Only load on posts, pages
|
||||
if ( !in_array($hook, array('post.php','post-new.php')) )
|
||||
return;
|
||||
|
@ -494,7 +494,7 @@ if ( ! function_exists( 'alx_post_formats_script' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'admin_enqueue_scripts', 'alx_post_formats_script');
|
||||
add_action( 'admin_enqueue_scripts', 'blogrow_post_formats_script');
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- *
|
||||
|
@ -503,10 +503,10 @@ add_action( 'admin_enqueue_scripts', 'alx_post_formats_script');
|
|||
|
||||
/* Body class
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_body_class' ) ) {
|
||||
if ( ! function_exists( 'blogrow_body_class' ) ) {
|
||||
|
||||
function alx_body_class( $classes ) {
|
||||
$classes[] = alx_layout_class();
|
||||
function blogrow_body_class( $classes ) {
|
||||
$classes[] = blogrow_layout_class();
|
||||
if ( get_theme_mod( 'boxed','off' ) != 'on' ) { $classes[] = 'full-width'; }
|
||||
if ( get_theme_mod( 'boxed','off' ) == 'on' ) { $classes[] = 'boxed'; }
|
||||
if ( has_nav_menu( 'topbar' ) ) { $classes[] = 'topbar-enabled'; }
|
||||
|
@ -516,14 +516,14 @@ if ( ! function_exists( 'alx_body_class' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_filter( 'body_class', 'alx_body_class' );
|
||||
add_filter( 'body_class', 'blogrow_body_class' );
|
||||
|
||||
|
||||
/* Custom rss feed
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_feed_link' ) ) {
|
||||
if ( ! function_exists( 'blogrow_feed_link' ) ) {
|
||||
|
||||
function alx_feed_link( $output, $feed ) {
|
||||
function blogrow_feed_link( $output, $feed ) {
|
||||
// Do not redirect comments feed
|
||||
if ( strpos( $output, 'comments' ) )
|
||||
return $output;
|
||||
|
@ -532,38 +532,38 @@ if ( ! function_exists( 'alx_feed_link' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_filter( 'feed_link', 'alx_feed_link', 10, 2 );
|
||||
add_filter( 'feed_link', 'blogrow_feed_link', 10, 2 );
|
||||
|
||||
|
||||
/* Excerpt ending
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_excerpt_more' ) ) {
|
||||
if ( ! function_exists( 'blogrow_excerpt_more' ) ) {
|
||||
|
||||
function alx_excerpt_more( $more ) {
|
||||
function blogrow_excerpt_more( $more ) {
|
||||
return '...';
|
||||
}
|
||||
|
||||
}
|
||||
add_filter( 'excerpt_more', 'alx_excerpt_more' );
|
||||
add_filter( 'excerpt_more', 'blogrow_excerpt_more' );
|
||||
|
||||
|
||||
/* Excerpt length
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_excerpt_length' ) ) {
|
||||
if ( ! function_exists( 'blogrow_excerpt_length' ) ) {
|
||||
|
||||
function alx_excerpt_length( $length ) {
|
||||
function blogrow_excerpt_length( $length ) {
|
||||
return get_theme_mod('excerpt-length','26',$length);
|
||||
}
|
||||
|
||||
}
|
||||
add_filter( 'excerpt_length', 'alx_excerpt_length', 999 );
|
||||
add_filter( 'excerpt_length', 'blogrow_excerpt_length', 999 );
|
||||
|
||||
|
||||
/* Add responsive container to embeds
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_embed_html' ) ) {
|
||||
if ( ! function_exists( 'blogrow_embed_html' ) ) {
|
||||
|
||||
function alx_embed_html( $html, $url ) {
|
||||
function blogrow_embed_html( $html, $url ) {
|
||||
|
||||
$pattern = '/^https?:\/\/(www\.)?twitter\.com/';
|
||||
$is_twitter = preg_match( $pattern, $url );
|
||||
|
@ -576,26 +576,26 @@ if ( ! function_exists( 'alx_embed_html' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_filter( 'embed_oembed_html', 'alx_embed_html', 10, 3 );
|
||||
add_filter( 'embed_oembed_html', 'blogrow_embed_html', 10, 3 );
|
||||
|
||||
|
||||
/* Add responsive container to jetpack embeds
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_embed_html_jp' ) ) {
|
||||
if ( ! function_exists( 'blogrow_embed_html_jp' ) ) {
|
||||
|
||||
function alx_embed_html_jp( $html ) {
|
||||
function blogrow_embed_html_jp( $html ) {
|
||||
return '<div class="video-container">' . $html . '</div>';
|
||||
}
|
||||
|
||||
}
|
||||
add_filter( 'video_embed_html', 'alx_embed_html_jp' );
|
||||
add_filter( 'video_embed_html', 'blogrow_embed_html_jp' );
|
||||
|
||||
|
||||
/* Upscale cropped thumbnails
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_thumbnail_upscale' ) ) {
|
||||
if ( ! function_exists( 'blogrow_thumbnail_upscale' ) ) {
|
||||
|
||||
function alx_thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ){
|
||||
function blogrow_thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ){
|
||||
if ( !$crop ) return null; // let the wordpress default function handle this
|
||||
|
||||
$aspect_ratio = $orig_w / $orig_h;
|
||||
|
@ -611,7 +611,7 @@ if ( ! function_exists( 'alx_thumbnail_upscale' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_filter( 'image_resize_dimensions', 'alx_thumbnail_upscale', 10, 6 );
|
||||
add_filter( 'image_resize_dimensions', 'blogrow_thumbnail_upscale', 10, 6 );
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- *
|
||||
|
@ -620,9 +620,9 @@ add_filter( 'image_resize_dimensions', 'alx_thumbnail_upscale', 10, 6 );
|
|||
|
||||
/* Include or exclude featured articles in loop
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_pre_get_posts' ) ) {
|
||||
if ( ! function_exists( 'blogrow_pre_get_posts' ) ) {
|
||||
|
||||
function alx_pre_get_posts( $query ) {
|
||||
function blogrow_pre_get_posts( $query ) {
|
||||
// Are we on main query ?
|
||||
if ( !$query->is_main_query() ) return;
|
||||
if ( $query->is_home() ) {
|
||||
|
@ -630,7 +630,7 @@ if ( ! function_exists( 'alx_pre_get_posts' ) ) {
|
|||
// Featured posts enabled
|
||||
if ( get_theme_mod('featured-posts-count','3') != '0' ) {
|
||||
// Get featured post ids
|
||||
$featured_post_ids = alx_get_featured_post_ids();
|
||||
$featured_post_ids = blogrow_get_featured_post_ids();
|
||||
// Exclude posts
|
||||
if ( $featured_post_ids && !get_theme_mod('featured-posts-include') )
|
||||
$query->set('post__not_in', $featured_post_ids);
|
||||
|
@ -639,26 +639,26 @@ if ( ! function_exists( 'alx_pre_get_posts' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'pre_get_posts', 'alx_pre_get_posts' );
|
||||
add_action( 'pre_get_posts', 'blogrow_pre_get_posts' );
|
||||
|
||||
|
||||
/* Script for no-js / js class
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_html_js_class' ) ) {
|
||||
if ( ! function_exists( 'blogrow_html_js_class' ) ) {
|
||||
|
||||
function alx_html_js_class () {
|
||||
function blogrow_html_js_class () {
|
||||
echo '<script>document.documentElement.className = document.documentElement.className.replace("no-js","js");</script>'. "\n";
|
||||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_head', 'alx_html_js_class', 1 );
|
||||
add_action( 'wp_head', 'blogrow_html_js_class', 1 );
|
||||
|
||||
|
||||
/* IE js header
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_ie_js_header' ) ) {
|
||||
if ( ! function_exists( 'blogrow_ie_js_header' ) ) {
|
||||
|
||||
function alx_ie_js_header () {
|
||||
function blogrow_ie_js_header () {
|
||||
echo '<!--[if lt IE 9]>'. "\n";
|
||||
echo '<script src="' . esc_url( get_template_directory_uri() . '/js/ie/html5.js' ) . '"></script>'. "\n";
|
||||
echo '<script src="' . esc_url( get_template_directory_uri() . '/js/ie/selectivizr.js' ) . '"></script>'. "\n";
|
||||
|
@ -666,28 +666,28 @@ if ( ! function_exists( 'alx_ie_js_header' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_head', 'alx_ie_js_header' );
|
||||
add_action( 'wp_head', 'blogrow_ie_js_header' );
|
||||
|
||||
|
||||
/* IE js footer
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_ie_js_footer' ) ) {
|
||||
if ( ! function_exists( 'blogrow_ie_js_footer' ) ) {
|
||||
|
||||
function alx_ie_js_footer () {
|
||||
function blogrow_ie_js_footer () {
|
||||
echo '<!--[if lt IE 9]>'. "\n";
|
||||
echo '<script src="' . esc_url( get_template_directory_uri() . '/js/ie/respond.js' ) . '"></script>'. "\n";
|
||||
echo '<![endif]-->'. "\n";
|
||||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_footer', 'alx_ie_js_footer', 20 );
|
||||
add_action( 'wp_footer', 'blogrow_ie_js_footer', 20 );
|
||||
|
||||
|
||||
/* TGM plugin activation
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_plugins' ) ) {
|
||||
if ( ! function_exists( 'blogrow_plugins' ) ) {
|
||||
|
||||
function alx_plugins() {
|
||||
function blogrow_plugins() {
|
||||
if ( get_theme_mod('recommended-plugins','on') =='on' ) {
|
||||
// Add the following plugins
|
||||
$plugins = array(
|
||||
|
@ -732,34 +732,34 @@ if ( ! function_exists( 'alx_plugins' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'tgmpa_register', 'alx_plugins' );
|
||||
add_action( 'tgmpa_register', 'blogrow_plugins' );
|
||||
|
||||
|
||||
/* WooCommerce basic support
|
||||
/* ------------------------------------ */
|
||||
function alx_wc_wrapper_start() {
|
||||
function blogrow_wc_wrapper_start() {
|
||||
echo '<div class="content">';
|
||||
echo '<div class="pad">';
|
||||
}
|
||||
function alx_wc_wrapper_end() {
|
||||
function blogrow_wc_wrapper_end() {
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
|
||||
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
|
||||
add_action('woocommerce_before_main_content', 'alx_wc_wrapper_start', 10);
|
||||
add_action('woocommerce_after_main_content', 'alx_wc_wrapper_end', 10);
|
||||
add_action('woocommerce_before_main_content', 'blogrow_wc_wrapper_start', 10);
|
||||
add_action('woocommerce_after_main_content', 'blogrow_wc_wrapper_end', 10);
|
||||
|
||||
|
||||
/* Admin panel css
|
||||
/* ------------------------------------ */
|
||||
function alx_admin_panel_css() {
|
||||
function blogrow_admin_panel_css() {
|
||||
echo '<style>
|
||||
.rwmb-image-select { width: auto!important; height: auto!important; }
|
||||
.rwmb-text { width: 100%; }
|
||||
</style>';
|
||||
}
|
||||
add_action('admin_head', 'alx_admin_panel_css');
|
||||
add_action('admin_head', 'blogrow_admin_panel_css');
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- *
|
||||
|
@ -768,9 +768,9 @@ add_action('admin_head', 'alx_admin_panel_css');
|
|||
|
||||
/* Flexslider gallery post format
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_flexslider_gallery' ) ) {
|
||||
if ( ! function_exists( 'blogrow_flexslider_gallery' ) ) {
|
||||
|
||||
function alx_flexslider_gallery() {
|
||||
function blogrow_flexslider_gallery() {
|
||||
|
||||
if( has_post_format( 'gallery' ) ) {
|
||||
|
||||
|
@ -803,4 +803,4 @@ if ( ! function_exists( 'alx_flexslider_gallery' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'alx_flexslider_gallery' );
|
||||
add_action( 'wp_enqueue_scripts', 'blogrow_flexslider_gallery' );
|
|
@ -351,10 +351,10 @@
|
|||
</ul>
|
||||
<p>This theme has been built with <strong>child themes in mind</strong>, and therefore all theme functions are pluggable - which means you can overwrite them by copying a function from the parent theme and pasting it into the child theme's functions.php, modify it as you wish - and it will use your modified function instead the original one.</p>
|
||||
<h3>Load certain functionality from the child theme instead</h3>
|
||||
<p>This only applies for files loaded from the parent theme's <strong>functions.php</strong>. Let's say we wish to load the responsive.css file from our child theme's directory instead. We then need to copy the alx_styles() function to functions.php of the child theme (not including add_action, add_filter or !function_exists - just the function).</p>
|
||||
<p>This only applies for files loaded from the parent theme's <strong>functions.php</strong>. Let's say we wish to load the responsive.css file from our child theme's directory instead. We then need to copy the blogrow_styles() function to functions.php of the child theme (not including add_action, add_filter or !function_exists - just the function).</p>
|
||||
<p>Now we have this function in our child theme - but it makes absolutely no difference, and still loads all files from the parent theme.</p>
|
||||
|
||||
<pre><code>function alx_styles() {
|
||||
<pre><code>function blogrow_styles() {
|
||||
wp_enqueue_style( 'style', get_stylesheet_uri() );
|
||||
if ( !get_theme_mod('responsive') ) { wp_enqueue_style( 'responsive', get_template_directory_uri().'/responsive.css' ); }
|
||||
if ( get_theme_mod('custom') ) { wp_enqueue_style( 'custom', get_template_directory_uri().'/custom.css' ); }
|
||||
|
@ -363,14 +363,14 @@
|
|||
|
||||
<p>To load from the child theme instead, change <em>get_template_directory_uri</em> to <em>get_stylesheet_directory_uri</em> for the responsive.css file. The rest of the files will still load from the parent theme, as they use get_template_directory_uri. Like this:</p>
|
||||
|
||||
<pre><code>function alx_styles() {
|
||||
<pre><code>function blogrow_styles() {
|
||||
wp_enqueue_style( 'style', get_stylesheet_uri() );
|
||||
if ( !get_theme_mod('responsive') ) { wp_enqueue_style( 'responsive', get_stylesheet_directory_uri().'/responsive.css' ); }
|
||||
if ( get_theme_mod('custom') ) { wp_enqueue_style( 'custom', get_template_directory_uri().'/custom.css' ); }
|
||||
wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/fonts/font-awesome.min.css' );
|
||||
}</code></pre>
|
||||
|
||||
<p>The same method would be used to change language files folder. You would then copy over the whole alx_load() function, but only modify this one line in it:</p>
|
||||
<p>The same method would be used to change language files folder. You would then copy over the whole blogrow_load() function, but only modify this one line in it:</p>
|
||||
<pre><code>// Load theme languages
|
||||
load_theme_textdomain( 'themename', get_template_directory().'/languages' );</code></pre>
|
||||
|
||||
|
@ -391,7 +391,7 @@ load_theme_textdomain( 'themename', get_stylesheet_directory().'/languages' );</
|
|||
|
||||
<h3>Disabling functions</h3>
|
||||
<p>You can also completely disable functionality with the child theme replacement method. Let's say you don't want the plugin installation notice in your admin panel, or the "Install Plugins" item in your menu. All you would need to add is this to your child theme's functions.php:</p>
|
||||
<pre><code>function alx_plugins() { }</code></pre>
|
||||
<pre><code>function blogrow_plugins() { }</code></pre>
|
||||
<p>Simply emptying the function, disabling it completely.</p>
|
||||
|
||||
<h3>Replacing page templates</h3>
|
||||
|
@ -523,14 +523,14 @@ float: left;
|
|||
<div class="container">
|
||||
|
||||
<h1><span class="label color-05">05.4</span>Change Thumbnail Size</h1>
|
||||
<p>To modify the custom thumbnail sizes for your theme, you need to copy over the whole <code>function alx_setup() {}</code> to your child theme, using the methods explained above.</p>
|
||||
<p>To modify the custom thumbnail sizes for your theme, you need to copy over the whole <code>function blogrow_setup() {}</code> to your child theme, using the methods explained above.</p>
|
||||
<p>Within this function you will find the thumbnail sizes under where it says:</p>
|
||||
<pre><code>// Thumbnail sizes</code></pre>
|
||||
|
||||
<p>Modify the height and width values as you want, using <a target="_blank" href="http://codex.wordpress.org/Function_Reference/add_image_size">add_image_size codex</a> as guideline to how it works. After that you've changed size and saved, you need to run the <a target="_blank" href="http://wordpress.org/plugins/regenerate-thumbnails/">regenerate thumbnails</a> plugin once before you will see any difference.</p>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
<p><strong>Important:</strong> If you have trouble with the way thumbnails are upscaling to fit the desired width or height before being cropped, you need to disable the alx_thumbnail_upscale function. You do so by adding <code>function alx_thumbnail_upscale() {}</code> to your child theme's functions.php, disabling the function completely.</p>
|
||||
<p><strong>Important:</strong> If you have trouble with the way thumbnails are upscaling to fit the desired width or height before being cropped, you need to disable the blogrow_thumbnail_upscale function. You do so by adding <code>function blogrow_thumbnail_upscale() {}</code> to your child theme's functions.php, disabling the function completely.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
/* Convert hexadecimal to rgb
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_hex2rgb' ) ) {
|
||||
if ( ! function_exists( 'blogrow_hex2rgb' ) ) {
|
||||
|
||||
function alx_hex2rgb( $hex, $array=false ) {
|
||||
function blogrow_hex2rgb( $hex, $array=false ) {
|
||||
$hex = str_replace("#", "", $hex);
|
||||
|
||||
if ( strlen($hex) == 3 ) {
|
||||
|
@ -30,9 +30,9 @@ if ( ! function_exists( 'alx_hex2rgb' ) ) {
|
|||
|
||||
/* Google fonts
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_enqueue_google_fonts' ) ) {
|
||||
if ( ! function_exists( 'blogrow_enqueue_google_fonts' ) ) {
|
||||
|
||||
function alx_enqueue_google_fonts () {
|
||||
function blogrow_enqueue_google_fonts () {
|
||||
if ( get_theme_mod('dynamic-styles', 'on') == 'on' ) {
|
||||
if ( get_theme_mod( 'font' ) == 'titillium-web-ext' ) { wp_enqueue_style( 'titillium-web-ext', '//fonts.googleapis.com/css?family=Titillium+Web:400,400italic,300italic,300,600&subset=latin,latin-ext' ); }
|
||||
if ( get_theme_mod( 'font' ) == 'droid-serif' ) { wp_enqueue_style( 'droid-serif', '//fonts.googleapis.com/css?family=Droid+Serif:400,400italic,700' ); }
|
||||
|
@ -57,19 +57,19 @@ if ( ! function_exists( 'alx_enqueue_google_fonts' ) ) {
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'alx_enqueue_google_fonts' );
|
||||
add_action( 'wp_enqueue_scripts', 'blogrow_enqueue_google_fonts' );
|
||||
|
||||
|
||||
/* Dynamic css output
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_dynamic_css' ) ) {
|
||||
if ( ! function_exists( 'blogrow_dynamic_css' ) ) {
|
||||
|
||||
function alx_dynamic_css() {
|
||||
function blogrow_dynamic_css() {
|
||||
if ( get_theme_mod('dynamic-styles', 'on') == 'on' ) {
|
||||
|
||||
// rgb values
|
||||
$color_1 = get_theme_mod('color-1');
|
||||
$color_1_rgb = alx_hex2rgb($color_1);
|
||||
$color_1_rgb = blogrow_hex2rgb($color_1);
|
||||
|
||||
// start output
|
||||
$styles = '';
|
||||
|
@ -181,4 +181,4 @@ a,
|
|||
}
|
||||
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'alx_dynamic_css' );
|
||||
add_action( 'wp_enqueue_scripts', 'blogrow_dynamic_css' );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
function alx_get_meta_box( $meta_boxes ) {
|
||||
function blogrow_get_meta_box( $meta_boxes ) {
|
||||
|
||||
/* do not show */
|
||||
$prefix = '_';
|
||||
|
@ -130,4 +130,4 @@ function alx_get_meta_box( $meta_boxes ) {
|
|||
|
||||
return $meta_boxes;
|
||||
}
|
||||
add_filter( 'rwmb_meta_boxes', 'alx_get_meta_box' );
|
||||
add_filter( 'rwmb_meta_boxes', 'blogrow_get_meta_box' );
|
|
@ -79,7 +79,7 @@ Kirki::add_section( 'styling', array(
|
|||
/* ------------------------------------ */
|
||||
|
||||
// General: Custom CSS
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'custom',
|
||||
'label' => esc_attr__( 'Custom Stylesheet', 'blogrow' ),
|
||||
|
@ -88,7 +88,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'off',
|
||||
) );
|
||||
// General: Responsive Layout
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'responsive',
|
||||
'label' => esc_attr__( 'Responsive Layout', 'blogrow' ),
|
||||
|
@ -97,7 +97,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// General: Mobile Sidebar
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'mobile-sidebar-hide',
|
||||
'label' => esc_attr__( 'Mobile Sidebar Content', 'blogrow' ),
|
||||
|
@ -106,7 +106,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// General: RSS Feed
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'text',
|
||||
'settings' => 'rss-feed',
|
||||
'label' => esc_attr__( 'FeedBurner URL', 'blogrow' ),
|
||||
|
@ -115,7 +115,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => '',
|
||||
) );
|
||||
// General: Post Comments
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'post-comments',
|
||||
'label' => esc_attr__( 'Post Comments', 'blogrow' ),
|
||||
|
@ -124,7 +124,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// General: Page Comments
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'page-comments',
|
||||
'label' => esc_attr__( 'Page Comments', 'blogrow' ),
|
||||
|
@ -133,7 +133,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'off',
|
||||
) );
|
||||
// General: Recommended Plugins
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'recommended-plugins',
|
||||
'label' => esc_attr__( 'Recommended Plugins', 'blogrow' ),
|
||||
|
@ -142,7 +142,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// Frontpage: Frontpage Picture
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'image',
|
||||
'settings' => 'front-picture',
|
||||
'label' => esc_attr__( 'Frontpage Picture', 'blogrow' ),
|
||||
|
@ -151,7 +151,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => '',
|
||||
) );
|
||||
// Frontpage: Button Text
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'text',
|
||||
'settings' => 'front-button-text',
|
||||
'label' => esc_attr__( 'Button Text', 'blogrow' ),
|
||||
|
@ -160,7 +160,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => '',
|
||||
) );
|
||||
// Frontpage: Button Link
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'text',
|
||||
'settings' => 'front-button-link',
|
||||
'label' => esc_attr__( 'Button Link', 'blogrow' ),
|
||||
|
@ -169,7 +169,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => '',
|
||||
) );
|
||||
// Blog: Blog Layout
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio',
|
||||
'settings' => 'blog-layout',
|
||||
'label' => esc_attr__( 'Blog Layout', 'blogrow' ),
|
||||
|
@ -183,7 +183,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Blog: Heading
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'text',
|
||||
'settings' => 'blog-heading',
|
||||
'label' => esc_attr__( 'Heading', 'blogrow' ),
|
||||
|
@ -192,7 +192,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => '',
|
||||
) );
|
||||
// Blog: Subheading
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'text',
|
||||
'settings' => 'blog-subheading',
|
||||
'label' => esc_attr__( 'Subheading', 'blogrow' ),
|
||||
|
@ -201,7 +201,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => '',
|
||||
) );
|
||||
// Blog: Excerpt Length
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'slider',
|
||||
'settings' => 'excerpt-length',
|
||||
'label' => esc_attr__( 'Excerpt Length', 'blogrow' ),
|
||||
|
@ -215,7 +215,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Blog: Featured Post Count
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'slider',
|
||||
'settings' => 'featured-posts-count',
|
||||
'label' => esc_attr__( 'Featured Post Count', 'blogrow' ),
|
||||
|
@ -229,7 +229,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Blog: Featured Category
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'select',
|
||||
'settings' => 'featured-category',
|
||||
'label' => esc_attr__( 'Featured Category', 'blogrow' ),
|
||||
|
@ -240,7 +240,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'placeholder' => esc_attr__( 'Select a category', 'blogrow' ),
|
||||
) );
|
||||
// Blog: Featured Posts Include
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'checkbox',
|
||||
'settings' => 'featured-posts-include',
|
||||
'label' => esc_attr__( 'Featured Posts', 'blogrow' ),
|
||||
|
@ -250,7 +250,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
) );
|
||||
if( function_exists( 'alx_ext_sharrre_template' ) ) {
|
||||
// Blog: Twitter Username
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'text',
|
||||
'settings' => 'twitter-username',
|
||||
'label' => esc_attr__( 'Single - Share Bar - Twitter Username', 'blogrow' ),
|
||||
|
@ -260,7 +260,7 @@ if( function_exists( 'alx_ext_sharrre_template' ) ) {
|
|||
) );
|
||||
}
|
||||
// Blog: Single - Authorbox
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'author-bio',
|
||||
'label' => esc_attr__( 'Single - Author Bio', 'blogrow' ),
|
||||
|
@ -269,7 +269,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// Blog: Single - Post Navigation
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'post-nav',
|
||||
'label' => esc_attr__( 'Single - Post Navigation', 'blogrow' ),
|
||||
|
@ -278,7 +278,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// Blog: Single - Related Posts
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio',
|
||||
'settings' => 'related-posts',
|
||||
'label' => esc_attr__( 'Single - Related Posts', 'blogrow' ),
|
||||
|
@ -292,7 +292,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Header: Search
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'header-search',
|
||||
'label' => esc_attr__( 'Header Search', 'blogrow' ),
|
||||
|
@ -301,7 +301,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// Header: Social Links
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'header-social',
|
||||
'label' => esc_attr__( 'Header Social Links', 'blogrow' ),
|
||||
|
@ -310,7 +310,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// Header: Custom Logo
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'image',
|
||||
'settings' => 'custom-logo',
|
||||
'label' => esc_attr__( 'Custom Logo', 'blogrow' ),
|
||||
|
@ -319,7 +319,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => '',
|
||||
) );
|
||||
// Header: Site Description
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'site-description',
|
||||
'label' => esc_attr__( 'Site Description', 'blogrow' ),
|
||||
|
@ -328,7 +328,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// Footer: Widget Columns
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio-image',
|
||||
'settings' => 'footer-widgets',
|
||||
'label' => esc_attr__( 'Footer Widget Columns', 'blogrow' ),
|
||||
|
@ -344,7 +344,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Footer: Social Links
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'footer-social',
|
||||
'label' => esc_attr__( 'Footer Social Links', 'blogrow' ),
|
||||
|
@ -353,7 +353,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// Footer: Custom Logo
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'image',
|
||||
'settings' => 'footer-logo',
|
||||
'label' => esc_attr__( 'Footer Logo', 'blogrow' ),
|
||||
|
@ -362,7 +362,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => '',
|
||||
) );
|
||||
// Footer: Copyright
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'text',
|
||||
'settings' => 'copyright',
|
||||
'label' => esc_attr__( 'Footer Copyright', 'blogrow' ),
|
||||
|
@ -371,7 +371,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => '',
|
||||
) );
|
||||
// Footer: Credit
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'credit',
|
||||
'label' => esc_attr__( 'Footer Credit', 'blogrow' ),
|
||||
|
@ -380,7 +380,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// Layout: Global
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio-image',
|
||||
'settings' => 'layout-global',
|
||||
'label' => esc_attr__( 'Global Layout', 'blogrow' ),
|
||||
|
@ -394,7 +394,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Layout: Home
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio-image',
|
||||
'settings' => 'layout-home',
|
||||
'label' => esc_attr__( 'Home', 'blogrow' ),
|
||||
|
@ -409,7 +409,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Layout: Single
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio-image',
|
||||
'settings' => 'layout-single',
|
||||
'label' => esc_attr__( 'Single', 'blogrow' ),
|
||||
|
@ -424,7 +424,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Layout: Archive
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio-image',
|
||||
'settings' => 'layout-archive',
|
||||
'label' => esc_attr__( 'Archive', 'blogrow' ),
|
||||
|
@ -439,7 +439,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Layout : Archive - Category
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio-image',
|
||||
'settings' => 'layout-archive-category',
|
||||
'label' => esc_attr__( 'Archive - Category', 'blogrow' ),
|
||||
|
@ -454,7 +454,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Layout: Search
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio-image',
|
||||
'settings' => 'layout-search',
|
||||
'label' => esc_attr__( 'Search', 'blogrow' ),
|
||||
|
@ -469,7 +469,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Layout: Error 404
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio-image',
|
||||
'settings' => 'layout-404',
|
||||
'label' => esc_attr__( 'Error 404', 'blogrow' ),
|
||||
|
@ -484,7 +484,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Layout: Default Page
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'radio-image',
|
||||
'settings' => 'layout-page',
|
||||
'label' => esc_attr__( 'Default Page', 'blogrow' ),
|
||||
|
@ -499,7 +499,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Sidebars: Create Sidebars
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'repeater',
|
||||
'label' => esc_attr__( 'Create Sidebars', 'blogrow' ),
|
||||
'description' => esc_attr__( 'You must save and refresh the page to see your new sidebars.', 'blogrow' ),
|
||||
|
@ -528,7 +528,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
) );
|
||||
|
||||
|
||||
function alx_kirki_sidebars_select() {
|
||||
function blogrow_kirki_sidebars_select() {
|
||||
$sidebars = array();
|
||||
if ( isset( $GLOBALS['wp_registered_sidebars'] ) ) {
|
||||
$sidebars = $GLOBALS['wp_registered_sidebars'];
|
||||
|
@ -541,7 +541,7 @@ function alx_kirki_sidebars_select() {
|
|||
return;
|
||||
}
|
||||
// Sidebars: Select
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'select',
|
||||
'settings' => 's1-home',
|
||||
'label' => esc_attr__( 'Home', 'blogrow' ),
|
||||
|
@ -551,7 +551,7 @@ function alx_kirki_sidebars_select() {
|
|||
'default' => '',
|
||||
'placeholder' => esc_attr__( 'Select a sidebar', 'blogrow' ),
|
||||
) );
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'select',
|
||||
'settings' => 's1-single',
|
||||
'label' => esc_attr__( 'Single', 'blogrow' ),
|
||||
|
@ -561,7 +561,7 @@ function alx_kirki_sidebars_select() {
|
|||
'default' => '',
|
||||
'placeholder' => esc_attr__( 'Select a sidebar', 'blogrow' ),
|
||||
) );
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'select',
|
||||
'settings' => 's1-archive',
|
||||
'label' => esc_attr__( 'Archive', 'blogrow' ),
|
||||
|
@ -571,7 +571,7 @@ function alx_kirki_sidebars_select() {
|
|||
'default' => '',
|
||||
'placeholder' => esc_attr__( 'Select a sidebar', 'blogrow' ),
|
||||
) );
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'select',
|
||||
'settings' => 's1-archive-category',
|
||||
'label' => esc_attr__( 'Archive - Category', 'blogrow' ),
|
||||
|
@ -581,7 +581,7 @@ function alx_kirki_sidebars_select() {
|
|||
'default' => '',
|
||||
'placeholder' => esc_attr__( 'Select a sidebar', 'blogrow' ),
|
||||
) );
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'select',
|
||||
'settings' => 's1-search',
|
||||
'label' => esc_attr__( 'Search', 'blogrow' ),
|
||||
|
@ -591,7 +591,7 @@ function alx_kirki_sidebars_select() {
|
|||
'default' => '',
|
||||
'placeholder' => esc_attr__( 'Select a sidebar', 'blogrow' ),
|
||||
) );
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'select',
|
||||
'settings' => 's1-404',
|
||||
'label' => esc_attr__( 'Error 404', 'blogrow' ),
|
||||
|
@ -601,7 +601,7 @@ function alx_kirki_sidebars_select() {
|
|||
'default' => '',
|
||||
'placeholder' => esc_attr__( 'Select a sidebar', 'blogrow' ),
|
||||
) );
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'select',
|
||||
'settings' => 's1-page',
|
||||
'label' => esc_attr__( 'Default Page', 'blogrow' ),
|
||||
|
@ -613,10 +613,10 @@ function alx_kirki_sidebars_select() {
|
|||
) );
|
||||
|
||||
}
|
||||
add_action( 'init', 'alx_kirki_sidebars_select', 999 );
|
||||
add_action( 'init', 'blogrow_kirki_sidebars_select', 999 );
|
||||
|
||||
// Social Links: List
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'repeater',
|
||||
'label' => esc_attr__( 'Create Social Links', 'blogrow' ),
|
||||
'description' => esc_attr__( 'Create and organize your social links', 'blogrow' ),
|
||||
|
@ -662,7 +662,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
)
|
||||
) );
|
||||
// Styling: Enable
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'switch',
|
||||
'settings' => 'dynamic-styles',
|
||||
'label' => esc_attr__( 'Dynamic Styles', 'blogrow' ),
|
||||
|
@ -671,7 +671,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => 'on',
|
||||
) );
|
||||
// Styling: Font
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'select',
|
||||
'settings' => 'font',
|
||||
'label' => esc_attr__( 'Font', 'blogrow' ),
|
||||
|
@ -706,7 +706,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Styling: Container Width
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'slider',
|
||||
'settings' => 'container-width',
|
||||
'label' => esc_attr__( 'Website Max-width', 'blogrow' ),
|
||||
|
@ -720,7 +720,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Styling: Primary Color
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'color',
|
||||
'settings' => 'color-1',
|
||||
'label' => esc_attr__( 'Primary Color', 'blogrow' ),
|
||||
|
@ -729,7 +729,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
'default' => '#ceac41',
|
||||
) );
|
||||
// Styling: Header Logo Max-height
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'slider',
|
||||
'settings' => 'logo-max-height',
|
||||
'label' => esc_attr__( 'Header Logo Image Max-height', 'blogrow' ),
|
||||
|
@ -743,7 +743,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Styling: Image Border Radius
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'slider',
|
||||
'settings' => 'image-border-radius',
|
||||
'label' => esc_attr__( 'Image Border Radius', 'blogrow' ),
|
||||
|
@ -757,7 +757,7 @@ Kirki::add_field( 'alx_theme', array(
|
|||
),
|
||||
) );
|
||||
// Styling: Body Background
|
||||
Kirki::add_field( 'alx_theme', array(
|
||||
Kirki::add_field( 'blogrow_theme', array(
|
||||
'type' => 'background',
|
||||
'settings' => 'body-background',
|
||||
'label' => esc_attr__( 'Body Background', 'blogrow' ),
|
||||
|
|
|
@ -16,7 +16,7 @@ class AlxPosts extends WP_Widget {
|
|||
/* Constructor
|
||||
/* ------------------------------------ */
|
||||
function __construct() {
|
||||
parent::__construct( false, 'AlxPosts', array('description' => 'Display posts from a category', 'classname' => 'widget_alx_posts') );;
|
||||
parent::__construct( false, 'AlxPosts', array('description' => 'Display posts from a category', 'classname' => 'widget_blogrow_posts') );;
|
||||
}
|
||||
|
||||
/* Widget
|
||||
|
@ -187,11 +187,11 @@ class AlxPosts extends WP_Widget {
|
|||
|
||||
/* Register widget
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_register_widget_posts' ) ) {
|
||||
if ( ! function_exists( 'blogrow_register_widget_posts' ) ) {
|
||||
|
||||
function alx_register_widget_posts() {
|
||||
function blogrow_register_widget_posts() {
|
||||
register_widget( 'AlxPosts' );
|
||||
}
|
||||
|
||||
}
|
||||
add_action( 'widgets_init', 'alx_register_widget_posts' );
|
||||
add_action( 'widgets_init', 'blogrow_register_widget_posts' );
|
||||
|
|
|
@ -16,7 +16,7 @@ class AlxTabs extends WP_Widget {
|
|||
/* Constructor
|
||||
/* ------------------------------------ */
|
||||
function __construct() {
|
||||
parent::__construct( false, 'AlxTabs', array('description' => 'List posts, comments, and/or tags with or without tabs.', 'classname' => 'widget_alx_tabs') );;
|
||||
parent::__construct( false, 'AlxTabs', array('description' => 'List posts, comments, and/or tags with or without tabs.', 'classname' => 'widget_blogrow_tabs') );;
|
||||
}
|
||||
|
||||
/* Create tabs-nav
|
||||
|
@ -407,11 +407,11 @@ class AlxTabs extends WP_Widget {
|
|||
|
||||
/* Register widget
|
||||
/* ------------------------------------ */
|
||||
if ( ! function_exists( 'alx_register_widget_tabs' ) ) {
|
||||
if ( ! function_exists( 'blogrow_register_widget_tabs' ) ) {
|
||||
|
||||
function alx_register_widget_tabs() {
|
||||
function blogrow_register_widget_tabs() {
|
||||
register_widget( 'AlxTabs' );
|
||||
}
|
||||
|
||||
}
|
||||
add_action( 'widgets_init', 'alx_register_widget_tabs' );
|
||||
add_action( 'widgets_init', 'blogrow_register_widget_tabs' );
|
||||
|
|
|
@ -63,10 +63,10 @@
|
|||
<div class="container group">
|
||||
<div class="container-inner">
|
||||
<div class="pad group">
|
||||
<?php echo alx_site_title(); ?>
|
||||
<?php echo blogrow_site_title(); ?>
|
||||
<?php if ( get_theme_mod( 'site-description', 'on' ) == 'on' ): ?><p class="site-description"><?php bloginfo( 'description' ); ?></p><?php endif; ?>
|
||||
<?php if ( get_theme_mod( 'header-social', 'on' ) == 'on' ): ?>
|
||||
<?php alx_social_links() ; ?>
|
||||
<?php blogrow_social_links() ; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div><!--/.container-inner-->
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<div class="page-title">
|
||||
|
||||
<?php if ( is_home() ) : ?>
|
||||
<h2><?php echo alx_blog_title(); ?></h2>
|
||||
<h2><?php echo blogrow_blog_title(); ?></h2>
|
||||
|
||||
<?php elseif ( is_single() ): ?>
|
||||
|
||||
<?php elseif ( is_page() ): ?>
|
||||
<h2><?php echo alx_page_title(); ?></h2>
|
||||
<h2><?php echo blogrow_page_title(); ?></h2>
|
||||
|
||||
<?php elseif ( is_search() ): ?>
|
||||
<h1>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<?php if ( has_post_format( 'gallery' ) ): // Gallery ?>
|
||||
|
||||
<div class="post-format">
|
||||
<?php $images = alx_post_images(); if ( !empty($images) ): ?>
|
||||
<?php $images = blogrow_post_images(); if ( !empty($images) ): ?>
|
||||
<script type="text/javascript">
|
||||
// Check if first slider image is loaded, and load flexslider on document ready
|
||||
jQuery(document).ready(function(){
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php $related = alx_related_posts(); ?>
|
||||
<?php $related = blogrow_related_posts(); ?>
|
||||
|
||||
<?php if ( $related->have_posts() ): ?>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$sidebar = alx_sidebar_primary();
|
||||
$layout = alx_layout_class();
|
||||
$sidebar = blogrow_sidebar_primary();
|
||||
$layout = blogrow_layout_class();
|
||||
if ( $layout != 'col-1c'):
|
||||
?>
|
||||
|
||||
|
|
|
@ -1070,10 +1070,6 @@ transition: all 0.2s ease-out; }
|
|||
.alx-posts .post-item-category,
|
||||
.alx-posts .post-item-date { font-size: 12px; }
|
||||
|
||||
/* custom widget : alxvideo
|
||||
/* ------------------------------------ */
|
||||
.widget_alx_video h3 { margin-bottom: 14px; }
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- *
|
||||
* Comments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue