Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/wp-content/themes/music-night/functions.php
Назад
<?php /* * Kodeforest Function File * --------------------------------------------------------------------- * This file include all of important function and features of the theme * --------------------------------------------------------------------- */ define('MUSICNIGHT_AJAX_URL', esc_url(admin_url('admin-ajax.php'))); define('MUSICNIGHT_PATH', get_template_directory_uri()); define('MUSICNIGHT_LOCAL_PATH', get_template_directory()); //WP Customizer include_once(MUSICNIGHT_LOCAL_PATH . '/framework/include/kode_meta/wp_customizer.php'); //Responsive Menu include_once(MUSICNIGHT_LOCAL_PATH . '/framework/include/kode_front_func/kf_responsive_menu.php'); // Framework include_once(MUSICNIGHT_LOCAL_PATH . '/framework/kf_framework.php' ); include_once(MUSICNIGHT_LOCAL_PATH . '/framework/script-handler.php' ); include_once(MUSICNIGHT_LOCAL_PATH . '/framework/include/kode_front_func/kode_header.php' ); include_once(MUSICNIGHT_LOCAL_PATH . '/framework/external/import_export/kodeforest-importer.php' ); require_once(MUSICNIGHT_LOCAL_PATH . '/framework/include/tgm_library/tgm-activation.php'); // plugin support include_once(MUSICNIGHT_LOCAL_PATH . '/framework/include/tgm_library/kode-activation.php'); $musicnight_theme_option = get_option('musicnight_admin_option', array()); //Load Fonts if( empty($musicnight_theme_option['upload-font']) ){ $musicnight_theme_option['upload-font'] = ''; } $musicnight_font_controller = new musicnight_font_loader( json_decode($musicnight_theme_option['upload-font'], true) ); // a comment callback function to create comment list if ( !function_exists('musicnight_comment_list') ){ function musicnight_comment_list( $comment, $args, $depth ){ $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ){ case 'pingback' : case 'trackback' : ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> <p><?php esc_html_e( 'Pingback :', 'music-night' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( esc_html__( '(Edit)', 'music-night' ), '<span class="edit-link">', '</span>' ); ?></p> <?php break; ?> <?php default : global $post; ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> <div class="churech_author comment"> <figure> <?php echo get_avatar( $comment, 90 ); ?> </figure> <div class="churech_author_text"> <div class="churech_author_head"> <h5><?php echo get_comment_author_link(); ?></h5> <span><?php echo esc_attr(get_comment_date(get_option('date_format'))); ?></span> </div> <?php comment_text(); ?> </div> <?php comment_reply_link( array_merge($args, array('before' => ' ', 'reply_text' => esc_html__('Reply', 'music-night'), 'depth' => $depth, 'max_depth' => $args['max_depth'])) ); ?> <?php edit_comment_link( esc_html__( 'Edit', 'music-night' ), '<span class="edit-link">', '</span>' ); ?> <?php if( '0' == $comment->comment_approved ){ ?> <p class="comment-awaiting-moderation"><?php echo esc_html__( 'Your comment is awaiting moderation.', 'music-night' ); ?></p> <?php } ?> </div> <?php break; } } } // a comment callback function to create comment list if ( !function_exists('musicnight_comment_list_album') ){ function musicnight_comment_list_album( $comment, $args, $depth ){ $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ){ case 'pingback' : case 'trackback' : ?> <li <?php comment_class('col-md-4'); ?> id="comment-<?php comment_ID(); ?>"> <p><?php esc_html_e( 'Pingback :', 'music-night' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( esc_html__( '(Edit)', 'music-night' ), '<span class="edit-link">', '</span>' ); ?></p> <?php break; ?> <?php default : global $post; ?> <li <?php comment_class('col-md-4'); ?> id="comment-<?php comment_ID(); ?>"> <div class="comment-received-column"> <figure> <?php echo get_avatar( $comment, 60 ); ?> </figure> <div class="comments-content-2"> <?php echo get_comment_author_link(); ?> <span><?php echo esc_attr(get_comment_date(get_option('date_format'))); ?></span> </div> <div class="comments-content-footer"> <?php comment_text(); ?> <ul class="kf_social_icons_small"> <li><?php comment_reply_link( array_merge($args, array('before' => '<i class="fa fa-comment-o"></i> ', 'reply_text' => esc_html__('Reply', 'music-night'), 'depth' => $depth, 'max_depth' => $args['max_depth'])) ); ?></li> <?php edit_comment_link( esc_html__( 'Edit', 'music-night' ), '<span class="edit-link"><i class="fa fa-pencil"></i> ', '</span>' ); ?> <?php if( '0' == $comment->comment_approved ){ ?> <li class="comment-awaiting-moderation"><i class="fa fa-comment-o"></i> <?php echo esc_html__( 'Your comment is awaiting moderation.', 'music-night' ); ?></li> <?php } ?> </ul> </div> </div> <?php break; } } } //Deregister the WooCommerce Style File add_action('wp_enqueue_scripts','musicnight_deregister_scripts'); function musicnight_deregister_scripts(){ // WooCommerce Style wp_deregister_style('woocommerce-general'); } add_theme_support( 'woocommerce' ); // add action to enqueue woocommerce style add_filter('musicnight_enqueue_scripts', 'musicnight_regiser_woo_style'); if( !function_exists('musicnight_regiser_woo_style') ){ function musicnight_regiser_woo_style($array){ global $woocommerce; if( !empty($woocommerce) ){ $array['style']['bookhouse-woo-style'] = MUSICNIGHT_PATH . '/framework/include/frontend_assets/default/css/kode-woocommerce.css'; } return $array; } } //Define Classes function musicnight_post_classes( $classes ) { $musicnight_theme_option = get_option('musicnight_admin_option', array()); $classes[] = 'kode-loader'; $musicnight_sidebar_sticky = ''; if(isset($musicnight_theme_option['enable-sticky-sidebar'])){ if($musicnight_theme_option['enable-sticky-sidebar'] == 'enable'){ $classes[] = 'sticky-sidebar-enable'; } } $nicescroll = ''; if(isset($musicnight_theme_option['enable-nice-scroll'])){ if($musicnight_theme_option['enable-nice-scroll'] == 'enable'){ $classes[] = 'nicescroll'; } } $classes[] = 'msl-black'; $musicnight_sticky_navbar = ''; if(isset($musicnight_theme_option['enable-sticky-nav'])){ if($musicnight_theme_option['enable-sticky-nav'] == 'enable'){ $classes[] = 'sticky-navbar-enable'; } } return $classes; } add_filter( 'body_class', 'musicnight_post_classes' );
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка