���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/righteousmag.com/wp-content__a986334/themes/caster/functions.php
���ѧ٧ѧ�
<?php // Theme Version define( 'CASTER_THEME_VERSION', '1.2.2' ); if ( ! class_exists( 'Caster_Theme_Setup' ) ) { class Caster_Theme_Setup { /** * Initialize the class */ public function __construct() { // Run class functions add_action( 'after_setup_theme', array( $this, 'setup_theme' ) ); add_action( 'after_setup_theme', array( $this, 'include_files' ), 0 ); // Load theme CSS add_action( 'wp_enqueue_scripts', array( $this, 'theme_css' ) ); // Load theme js add_action( 'wp_enqueue_scripts', array( $this, 'theme_js' ) ); add_action( 'widgets_init', array( $this, 'register_sidebars' ) ); } public function setup_theme() { global $content_width; // Set content width based on theme's default design if ( ! isset( $content_width ) ) { $content_width = 1260; } // Load text domain load_theme_textdomain( 'caster', get_parent_theme_file_path( '/languages' ) ); // // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); //Add title tag support add_theme_support( 'title-tag' ); // Enable featured image support add_theme_support( 'post-thumbnails' ); //blog image sizes add_image_size( 'caster-blog-single-image', 1200, 790, true ); add_image_size( 'caster-blog-list-image', 1200, 790, true ); //portfolio image sizes add_image_size( 'caster-portfolio-grid-image', 600, 500, true ); add_image_size( 'caster-portfolio-masonry-image', 600 ); // Enable some useful post formats for the blog add_theme_support( 'post-formats', array( 'video', 'gallery', 'audio', 'quote', 'link' ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. */ add_editor_style( array( 'assets/css/editor-style.css', caster_fonts_url() ) ); // Register navigation menus register_nav_menus ( array( 'main-menu' => esc_html__( 'Main Menu', 'caster' ), ) ); } public function theme_css() { wp_enqueue_style( 'caster-theme-font', caster_fonts_url() ); wp_deregister_style( 'font-awesome' ); wp_enqueue_style( 'font-awesome', get_theme_file_uri( '/assets/css/icons/font-awesome.min.css' ) ); wp_enqueue_style( 'font-awesome-v4-shims', get_theme_file_uri( '/assets/css/icons/font-awesome-v4-shims.css' ) ); wp_enqueue_style( 'elementor-icons' ); wp_enqueue_style( 'elementor-animations' ); wp_enqueue_style( 'elementor-frontend' ); wp_enqueue_style( 'swiper', get_theme_file_uri( '/assets/lib/swiper/css/swiper.min.css' ), array(), CASTER_THEME_VERSION ); wp_enqueue_style( 'cubeportfolio', get_theme_file_uri( '/assets/lib/cubeportfolio/css/cubeportfolio.min.css' ), array(), CASTER_THEME_VERSION ); wp_enqueue_style( 'magnific-popup', get_theme_file_uri( '/assets/lib/magnific-popup/magnific-popup.css' ), array(), CASTER_THEME_VERSION ); wp_register_style( 'cocoen', get_theme_file_uri( '/assets/lib/cocoen/css/cocoen.min.css' ), array(), CASTER_THEME_VERSION ); wp_register_style( 'multiscroll', get_theme_file_uri( '/assets/lib/multi-scroll/css/jquery.multiscroll.min.css' ), array(), CASTER_THEME_VERSION ); // Main Style.css File wp_enqueue_style( 'caster-style', get_stylesheet_uri(), array(), CASTER_THEME_VERSION ); } public function theme_js() { $minify_js_switch = caster_get_option( 'minify-js-switch' ); // Localize array $localize_array = array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'ajax_nonce' => wp_create_nonce( 'caster-secure-ajax' ), ); $localize_array = apply_filters( 'caster_main_js', $localize_array ); // Comment reply if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } //vendor plugins wp_enqueue_script( 'imagesloaded' ); wp_enqueue_script( 'gsap', get_theme_file_uri( '/assets/js/vendor/gsap.min.js' ), array(), CASTER_THEME_VERSION, true ); wp_enqueue_script( 'jquery-easing', get_theme_file_uri( '/assets/js/vendor/jquery.easing.min.1.3.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); wp_enqueue_script( 'headsup', get_theme_file_uri( '/assets/js/vendor/headsup.min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); wp_enqueue_script( 'scroll-magic', get_theme_file_uri( '/assets/js/vendor/ScrollMagic.min.js' ), array(), CASTER_THEME_VERSION, true ); wp_enqueue_script( 'animation-gsap', get_theme_file_uri( '/assets/js/vendor/animation.gsap.min.js' ), array(), CASTER_THEME_VERSION, true ); wp_enqueue_script( 'lazysizes', get_theme_file_uri( '/assets/js/vendor/lazysizes.min.js' ), array(), CASTER_THEME_VERSION, true ); wp_register_script( 'youtube-iframe-api', '//www.youtube.com/iframe_api', array(), CASTER_THEME_VERSION, true ); wp_register_script( 'jquery-cubeportfolio', get_theme_file_uri( '/assets/lib/cubeportfolio/js/jquery.cubeportfolio.min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); wp_register_script( 'swiper', get_theme_file_uri( '/assets/lib/swiper/js/swiper.min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); wp_register_script( 'sticky-kit', get_theme_file_uri( '/assets/js/vendor/jquery.sticky-kit.min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); wp_register_script( 'cocoen', get_theme_file_uri( '/assets/lib/cocoen/js/cocoen.min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); wp_register_script( 'jquery-magnific-popup', get_theme_file_uri( '/assets/lib/magnific-popup/jquery.magnific-popup.min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); wp_register_script( 'multiscroll', get_theme_file_uri( '/assets/lib/multi-scroll/js/jquery.multiscroll.min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); wp_register_script( 'parallax', get_theme_file_uri( '/assets/js/vendor/parallax.min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); wp_register_script( 'tooltip', get_theme_file_uri( '/assets/js/vendor/caster-tooltip.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); //wp_register_script( 'tooltip', get_theme_file_uri( '/assets/js/vendor/tooltip.min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); wp_register_script( 'jquery-hoverplay', get_theme_file_uri( '/assets/js/vendor/jquery.hoverplay.min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); // Load minified global scripts if ( $minify_js_switch == 1 ) { // Load minified js wp_enqueue_script( 'caster-main', get_theme_file_uri( '/assets/js/main-min.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); } else { wp_enqueue_script( 'caster-main', get_theme_file_uri( '/assets/js/main.js' ), array( 'jquery' ), CASTER_THEME_VERSION, true ); } wp_localize_script( 'caster-main', 'casterMainJs', $localize_array ); } public function include_files() { if( is_admin() ) { require_once get_parent_theme_file_path( '/include/functions/required-plugins.php' ); require_once get_parent_theme_file_path( '/include/functions/admin-notices.php' ); require_once get_parent_theme_file_path( '/include/vendor/tgm-plugin-activation/class-tgm-plugin-activation.php' ); if( class_exists( 'OCDI_Plugin' ) ) { require_once get_parent_theme_file_path( '/include/functions/oneclick-demo-import.php' ); } } else { require_once get_parent_theme_file_path( '/include/blog/blog-functions.php' ); if ( class_exists( 'Caster_Core' ) ) { require_once get_parent_theme_file_path( '/include/functions/theme-options-css.php' ); require_once get_parent_theme_file_path( '/include/functions/menu-css.php' ); require_once get_parent_theme_file_path( '/include/functions/custom-css.php' ); } } require_once get_parent_theme_file_path( '/include/functions/theme-functions.php' ); } public function register_sidebars() { // Main Sidebar register_sidebar( array( 'name' => esc_html__( 'Blog Sidebar', 'caster' ), 'id' => 'sidebar-blog', 'description' => esc_html__( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'caster' ), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h2 class="widget-title"><span>', 'after_title' => '</span></h2>', ) ); } } //Run the theme setup class $caster_theme_setup = new Caster_Theme_Setup(); }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�