'6871',
'slug' => 'alley-themess',
'premium_slug' => 'alley-themes',
'type' => 'theme',
'public_key' => 'pk_69dbff9b4556bf0d61cfffbe0f53e',
'is_premium' => true,
'has_addons' => false,
'has_paid_plans' => false,
'menu' => array(
'account' => false,
'support' => false,
),
) );
}
return $bh_fs;
}
// Init Freemius.
bh_fs();
// Signal that SDK was initiated.
do_action( 'bh_fs_loaded' );
}
// freemius
if ( ! defined( '_S_VERSION' ) ) {
// Replace the version number of the theme on each release.
define( '_S_VERSION', '1.0.0' );
}
if ( ! function_exists( 'alley_themes_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function alley_themes_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on alley_themes, use a find and replace
* to change 'alley_themes' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'alley-themes' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded
tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
*/
add_theme_support( 'post-thumbnails' );
// This theme uses wp_nav_menu() in one location.
register_nav_menus(
array(
'main-menu' => esc_html__( 'Main menu', 'alley-themes' )
)
);
if ( bh_fs()->is__premium_only() ) {
register_nav_menus(
array(
'top-menu' => esc_html__( 'Top Menu', 'alley-themes' )
)
);
}
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support(
'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
'style',
'script',
)
);
// Set up the WordPress core custom background feature.
add_theme_support('custom-background',
apply_filters(
'alley_themes_custom_background_args',
array(
'default-color' => 'ffffff',
'default-image' => '',
)
)
);
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
/**
* Add support for core custom logo.
*
* @link https://codex.wordpress.org/Theme_Logo
*/
add_theme_support(
'custom-logo',
array(
'height' => 250,
'width' => 250,
'flex-width' => true,
'flex-height' => true,
)
);
add_editor_style( get_stylesheet_uri() );
}
endif;
add_action( 'after_setup_theme', 'alley_themes_setup' );
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
*/
function alley_themes_content_width() {
// This variable is intended to be overruled from themes.
// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
$GLOBALS['content_width'] = apply_filters( 'alley_themes_content_width', 640 );
}
add_action( 'after_setup_theme', 'alley_themes_content_width', 0 );
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function alley_themes_widgets_init() {
for($i = 1; $i<5; $i++){
register_sidebar(
array(
'name' => esc_html__( 'Footer Widget', 'alley-themes' ) . " " . $i,
'id' => 'footer-'.$i.'',
'description' => esc_html__( 'Add widgets here.', 'alley-themes' ),
'before_widget' => '',
'before_title' => '',
)
);
}
register_sidebar( array(
'name' => esc_html__( 'Right Sidebar', 'alley-themes' ),
'id' => 'sidebar-1',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => esc_html__( 'Left Sidebar', 'alley-themes' ),
'id' => 'left-sidebar',
'description' => '',
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'alley_themes_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function alley_themes_scripts() {
$font_family = get_theme_mod( 'font_family', 'Montserrat' );
$heading_font_family = get_theme_mod( 'heading_font_family', 'Poppins' );
$site_identity_font_family = esc_attr( get_theme_mod( 'site_identity_font_family', 'Montserrat' ) );
wp_enqueue_style( 'one-page-conference-googlefonts', 'https://fonts.googleapis.com/css?family='. esc_attr( $font_family ) . ':200,300,400,500,600,700,800,900|' . esc_attr( $heading_font_family ) . ':200,300,400,500,600,700,800,900|' . esc_attr( $site_identity_font_family ) . ':200,300,400,500,600,700,800,900|' );
wp_enqueue_style( 'alley-themes-style', get_stylesheet_uri(), array(), _S_VERSION );
wp_style_add_data( 'alley-themes-style', 'rtl', 'replace' );
wp_enqueue_style( 'all-fontawesome', get_template_directory_uri() . '/css/all.min.css', array(), _S_VERSION );
wp_enqueue_script( 'all-fontawesome', get_template_directory_uri() . '/js/all.min.js', array(), _S_VERSION, true );
wp_enqueue_script( 'alley-themes-script', get_template_directory_uri() . '/js/script.js', array(), _S_VERSION, true );
wp_enqueue_script( 'alley-themes-navigation', get_template_directory_uri() . '/js/navigation.js', array(), _S_VERSION, true );
wp_enqueue_script( 'ajax-js', get_template_directory_uri() . '/js/ajax.js', array( 'jquery' ), _S_VERSION, true );
wp_localize_script( 'ajax-js', 'ajaxStuff', array(
'ajaxurl' => esc_url_raw(admin_url( 'admin-ajax.php' ) ),
'nonce' => wp_create_nonce( 'nonce_name' )
) );
wp_enqueue_script( 'alley-themes-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), _S_VERSION, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'alley_themes_scripts' );
// add async and defer attributes to enqueued scripts
function alley_themes_script_loader_tag($tag, $handle, $src) {
if ($handle === 'all-fontawesome') {
if (false === stripos($tag, 'async')) {
$tag = str_replace(' src', ' async="async" src', $tag);
}
if (false === stripos($tag, 'defer')) {
$tag = str_replace('