File: /disk001/machen/www/support/wp-content/themes/wp-moose/inc/extras.php
<?php
if ( !function_exists( 'wp_body_open' ) ) {
// see: https://make.wordpress.org/themes/2019/03/29/addition-of-new-wp_body_open-hook/
function wp_body_open()
{
do_action( 'wp_body_open' );
}
}
if ( !function_exists( 'wp_moose_asset_resolve' ) ) {
/**
* @param string
*
* @return string
*/
function wp_moose_asset_resolve( $path )
{
return get_template_directory_uri() . '/dist/' . $path;
}
}
if ( !function_exists( 'wp_moose_asset_path' ) ) {
/**
* @param string
*
* @return string
*/
function wp_moose_asset_path( $path )
{
return get_template_directory() . '/dist/' . $path;
}
}
if ( !function_exists( 'wp_moose_get_stylesheet_suffix' ) ) {
/**
* Get stylesheet file suffix
*
* @return string
*/
function wp_moose_get_stylesheet_suffix()
{
$is_debug = defined( 'MOOSE_DEBUG' ) && MOOSE_DEBUG;
if ( $is_debug ) {
return '';
}
$suffix = '.min';
return $suffix;
}
}
if ( !function_exists( 'wp_moose_get_script_suffix' ) ) {
/**
* Get script file suffix
*
* @return string
*/
function wp_moose_get_script_suffix()
{
return ( defined( 'MOOSE_DEBUG' ) && MOOSE_DEBUG ? '' : '.min' );
}
}
if ( !function_exists( 'wp_moose_do_elementor_location' ) ) {
/**
* Do the Elementor location, if it does not exist, display the custom template part.
*
* @param string $elementor_location
* @param string $template_part
* @param string|null $name
*/
function wp_moose_do_elementor_location( $elementor_location, $template_part = '', $name = null )
{
if ( !function_exists( 'elementor_theme_do_location' ) || !elementor_theme_do_location( $elementor_location ) ) {
get_template_part( $template_part, $name );
}
}
}