Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /home/claqxcrl/www/wp-content/themes/film-celebrity/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/claqxcrl/www/wp-content/themes/film-celebrity/functions.php
<?php
if ( ! function_exists( 'film_celebrity_setup' ) ) :
function film_celebrity_setup() {

	add_theme_support( "woocommerce" );	

	// Add default posts and comments RSS feed links to head.
	add_theme_support( 'automatic-feed-links' );

	add_theme_support( "responsive-embeds" );

	/*
	 * Let WordPress manage the document title.
	 */
	add_theme_support( 'title-tag' );
	
	
	add_theme_support( 'custom-header' );
	
	//Add selective refresh for sidebar widget
	add_theme_support( 'customize-selective-refresh-widgets' );
	
	/*
	 * Enable support for Post Thumbnails on posts and pages.
	 */
	add_theme_support( 'post-thumbnails' );

	// This theme uses wp_nav_menu() in one location.
	register_nav_menus( array(
		'primary_menu' => esc_html__( 'Primary Menu', 'film-celebrity' ),
	) );

	/*
	 * 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',
	) );
	
	/*
	 * Enable support for custom logo.
	 */
	add_theme_support('custom-logo');
	
	remove_theme_support( 'widgets-block-editor' );

	// -- Disable Custom Colors
	add_theme_support( 'disable-custom-colors' );
		
	// Gutenberg wide images.
	add_theme_support( 'align-wide' );
		
	/*
	 * This theme styles the visual editor to resemble the theme style,
	 * specifically font, colors, icons, and column width.
	 */
	add_editor_style( array( 'css/editor-style.css' ) );
	
	// Set up the WordPress core custom background feature.
	add_theme_support( 'custom-background', apply_filters( 'film_celebrity_custom_background_args', array(
		'default-color' => 'ffffff',
		'default-image' => '',
	) ) );

	load_theme_textdomain( 'film-celebrity', get_stylesheet_directory() . '/languages' );
}
endif;
add_action( 'after_setup_theme', 'film_celebrity_setup' );

/*
 * Enable support for Post Formats.
 *
 * See: https://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array('image','video','gallery','audio',) );

/**
 * 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 film_celebrity_content_width() {
	$GLOBALS['content_width'] = apply_filters( 'film_celebrity_content_width', 1170 );
}
add_action( 'after_setup_theme', 'film_celebrity_content_width', 0 );

function film_celebrity_customize_remove_register() {
    global $wp_customize;

    $wp_customize->remove_setting( 'display_header_text' );
    $wp_customize->remove_control( 'display_header_text' );
    
}
add_action( 'customize_register', 'film_celebrity_customize_remove_register', 11 );

function film_celebrity_text_domain_setup() {

/**
 * All Styles & Scripts.
 */
require_once get_template_directory() . '/inc/enqueue.php';

/**
 * Implement the Custom Header feature.
 */
require_once get_template_directory() . '/inc/custom-header.php';

/**
 * Sidebar.
 */
require_once get_template_directory() . '/inc/sidebar/sidebar.php';

/**
 * Custom template tags for this theme.
 */
require_once get_template_directory() . '/inc/template-tags.php';

/**
 * Custom functions that act independently of the theme templates.
 */
require_once get_template_directory() . '/inc/extras.php';

/**
 * Customizer additions.
 */
 require_once get_template_directory() . '/inc/customizer.php';

/**
 * Load Jetpack compatibility file.
 */
require_once get_template_directory() . '/inc/jetpack.php';

/**
 * Load Web Font
 */
require_once get_template_directory() . '/inc/wptt-webfont-loader.php';

/**
 * Load Recommended Plugin
 */
require_once get_template_directory() . '/inc/tgm-plugin/tgm.php';

/**
 * Called all the Customize file.
 */
require( get_template_directory() . '/inc/customize/premium.php');

/**
 * Get Started.
 */
require( get_template_directory() . '/inc/started/main.php');

/**
 * Admin notice function.
 */
require_once get_template_directory() . '/inc/admin-notice/admin.php';

}
add_action('after_setup_theme', 'film_celebrity_text_domain_setup');

/* 
* Logo Resizer
*/
function film_celebrity_logo_resizer_setting() {

    $film_celebrity_theme_logo_size_css = '';
    $film_celebrity_logo_resizer_setting = get_theme_mod('film_celebrity_logo_resizer_setting');

	$film_celebrity_theme_logo_size_css = '
		.custom-logo{
			height: '.esc_attr($film_celebrity_logo_resizer_setting).'px !important;
			width: '.esc_attr($film_celebrity_logo_resizer_setting).'px !important;
		}
	';
    wp_add_inline_style( 'film-celebrity-style',$film_celebrity_theme_logo_size_css );

}
add_action( 'wp_enqueue_scripts', 'film_celebrity_logo_resizer_setting' );

/*-----------------------------------------------------------------------------------*/
/* Enqueue Global color style */
/*-----------------------------------------------------------------------------------*/
function film_celebrity_global_color() {

    $film_celebrity_theme_color_css = '';
    $film_celebrity_theme_color_1 = get_theme_mod('film_celebrity_theme_color_1');
    $film_celebrity_theme_color_2 = get_theme_mod('film_celebrity_theme_color_2');
    $film_celebrity_theme_color_3 = get_theme_mod('film_celebrity_theme_color_3');
    $film_celebrity_theme_color_4 = get_theme_mod('film_celebrity_theme_color_4');
    $film_celebrity_theme_color_css = '
    	a.header_button,.line-1,.line-2,span.onsale,.pro-button a,.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit.alt,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt ,.woocommerce a.added_to_cart.wc-forward,.woocommerce ul.products li.product .onsale,.woocommerce span.onsale,.woocommerce .woocommerce-ordering select,.woocommerce-account .woocommerce-MyAccount-navigation ul li,.woocommerce nav.woocommerce-pagination ul li a:focus, .woocommerce nav.woocommerce-pagination ul li a:hover, .woocommerce nav.woocommerce-pagination ul li span.current,a.slider-btn,.social-media i:hover,.social_media i:hover,.animate-border,.wp-block-file .wp-block-file__button,.boxed-btn, .wp-block-loginout a,.widget_block.widget_calendar table th,.footer-sidebar .widget_product_search button,.wp-block-button a, .wp-block-calendar table thead th,#footer-copyright,.scrollup,.blog-post .post-thumb,.sidebar .widget_search input[type=button],.sidebar .widget_search input[type=submit],.footer-sidebar .widget_search input[type=button],.footer-sidebar .widget_search input[type=button]:hover,.footer-sidebar .widget_search input[type=button]:focus,.footer-sidebar .widget_search input[type=submit],.footer-sidebar .widget_search input[type=submit]:hover,.footer-sidebar .widget_search input[type=submit]:focus,ul.tags li a:hover,ul.tags li a:focus,table th,button, input[type="button"], input[type="reset"], input[type="submit"],.widget_tag_cloud a:hover,.widget_tag_cloud a:focus,.wp-block-tag-cloud a:hover,.wp-block-tag-cloud a:focus,.paginations a:hover, .paginations a:focus, .paginations a.active, span.page-numbers.current,.wp-block-button.is-style-outline a.wp-block-button__link:hover,.wp-block-button.is-style-outline a.wp-block-button__link:focus,.gb_nav_menu ul ul{
             background-image: linear-gradient(130deg, ' . esc_attr($film_celebrity_theme_color_1) . ', ' . esc_attr($film_celebrity_theme_color_2) . ', ' . esc_attr($film_celebrity_theme_color_3) . ', ' . esc_attr($film_celebrity_theme_color_4) . ');
    	}
        .widget_search form.search-form .search-submit,#blog-content .featured-img, #service-page .featured-img, #skip-content .featured-img,header.woocommerce-Address-title.title a{
            background: ' . esc_attr($film_celebrity_theme_color_1) . ';
    	}
		@media screen and (min-width: 320px) and (max-width: 767px) {
		    .toggle-menu button {
		        background: '.esc_attr($film_celebrity_theme_color_1).';
		    }
		}
         a.boxed-btn.btn-white i,.btn,.gb_nav_menu .sub-menu{
            background-color: ' . esc_attr($film_celebrity_theme_color_1) . ';
        }
        .woocommerce-message,.woocommerce-info,.wp-block-button.is-style-outline a.wp-block-button__link,button.scroll_2 {
            border-color: ' . esc_attr($film_celebrity_theme_color_1) . ';
        }
        blockquote {
            border-color: ' . esc_attr($film_celebrity_theme_color_1) . '!important;
        }
       	.blog-post ul:not(.meta-info) li a,.blog-post ol:not(.meta-info) li a,.blog-post table a, strong a, blockquote a,
code a, p a, span:not(.author-name):not(.comments-link):not(.posted-on):not(.post-list) a,.post-content-inner a,.site-content a,a.boxed-btn i, .boxed-btn i,.loader-text,p.price,.woocommerce ul.products li.product .price,.woocommerce div.product p.price,.woocommerce div.product span.price,.woocommerce-message::before,.woocommerce-info::before,.slider_content_box h5, #home_industry_heroes h4,.film-celebrity-btn .posts-navigation .nav-links a,.footer-sidebar .widget ul li a:before,.wp-block-post-terms a:before,.gb_nav_menu ul li a:active, .gb_nav_menu ul li a:hover,.sidebar .widget_recent_entries ul li a:hover, .sidebar .widget_recent_comments ul li a:hover, .sidebar .widget_archive ul li a:hover, .sidebar .widget_categories ul li a:hover, .sidebar .widget_meta ul li a:hover, .sidebar .widget_recent_entries ul li a:focus, .sidebar .widget_recent_comments ul li a:focus, .sidebar .widget_archive ul li a:focus, .sidebar .widget_categories ul li a:focus, .sidebar .widget_meta ul li a:focus,h2.site-title::first-letter, #blog-content .post-content:hover .post-title a, #recent-blog .post-content .post-title a, .footer-sidebar .widget.widget_products ul li a:hover, .footer-sidebar .widget.widget_products ul li a:focus, .sidebar .widget_info i,.scroll_2 svg,.related-post-thumbnail h4 a,em, cite, q,b.fn a , .comment-metadata time,.reply a{
            color: ' . esc_attr($film_celebrity_theme_color_1) . ';
        }
        .scroll_2 svg path{
            stroke: ' . esc_attr($film_celebrity_theme_color_1) . ';
        }
    ';
    
    wp_add_inline_style('film-celebrity-style', $film_celebrity_theme_color_css);
    wp_add_inline_style('film-celebrity-woocommerce-css', $film_celebrity_theme_color_css);

}
add_action('wp_enqueue_scripts', 'film_celebrity_global_color');

/**
 * Function that returns if the menu is sticky
 */
if (!function_exists('film_celebrity_sticky_header')):
    function film_celebrity_sticky_header()
    {
        $is_sticky = get_theme_mod('film_celebrity_sticky_header_setting', false);

        if ($is_sticky == false):
            return 'not-sticky';
        else:
            return 'is-sticky-on';
        endif;
    }
endif;

function film_celebrity_breadcrumb() {
    $separator = get_theme_mod( 'film_celebrity_breadcrumb_separator', ' → ' );

    if (is_home()) {
        echo "<span>Home</span>";
    } else if (!is_home()) {
        echo '<a href="' . home_url() . '">Home</a>' . $separator;

        if (is_archive()) {
            if (is_category()) {
                echo "<span>";
                single_cat_title();
                echo "</span>";
            } elseif (is_tag()) {
                echo "<span>";
                single_tag_title();
                echo "</span>";
            } elseif (is_date()) {
                echo "<span>";
                echo get_the_date('F Y');
                echo "</span>";
            } elseif (is_author()) {
                echo '<span>Author: ';
                the_author();
                echo '</span>';
            } else {
                echo post_type_archive_title() . $separator;
            }
        } elseif (is_single()) {
            if ('product' === get_post_type()) {
                echo '<a href="' . get_permalink(wc_get_page_id('shop')) . '">Shop</a>' . $separator;
                echo "<span>";
                the_title();
                echo "</span>";
            } else {
                the_category(', ');
                echo $separator;
                echo "<span>";
                the_title();
                echo "</span>";
            }
        } elseif (is_page()) {
            echo "<span>";
            the_title();
            echo "</span>";
        } elseif (is_search()) {
            echo '<span>Search Results for: ' . get_search_query() . '</span>';
        } elseif (is_404()) {
            echo "<span>404</span>";
        } else {
            echo "<span>";
            the_title();
            echo "</span>";
        }
    }
}

function get_page_id_by_title($pagename){

    $args = array(
        'post_type' => 'page',
        'posts_per_page' => 1,
        'post_status' => 'publish',
        'title' => $pagename
    );
    $query = new WP_Query( $args );

    $page_id = '1';
    if (isset($query->post->ID)) {
        $page_id = $query->post->ID;
    }

    return $page_id;
}

add_filter( 'woocommerce_enable_setup_wizard', '__return_false' );

if ( ! function_exists( 'film_celebrity_top_scroller' ) ) {
    function film_celebrity_top_scroller() { ?>      
        <button type="button" id="scroll_2" class="scroll_2">
            <svg class="progress-circle svg-content" width="100%" height="100%" viewBox="-1 -1 102 102">
                <path d="M50,1 a49,49 0 0,1 0,98 a49,49 0 0,1 0,-98" 
                      style="transition: stroke-dashoffset 10ms linear 0s; 
                             stroke-dasharray: 307.919, 307.919; 
                             stroke-dashoffset: -0.0171453;">
                </path>
            </svg>
        </button>
    <?php }
}
add_action( 'film_celebrity_top_scroller', 'film_celebrity_top_scroller' );

ZeroDay Forums Mini