| Linux webm007.cluster106.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 Path : /home/eglisebaa/www/wp-content/themes/hallelujah/plugins/essential-grid/ |
| Current File : /home/eglisebaa/www/wp-content/themes/hallelujah/plugins/essential-grid/essential-grid.php |
<?php
/* Essential Grid support functions
------------------------------------------------------------------------------- */
// Theme init priorities:
// 9 - register other filters (for installer, etc.)
if ( ! function_exists( 'hallelujah_essential_grid_theme_setup9' ) ) {
add_action( 'after_setup_theme', 'hallelujah_essential_grid_theme_setup9', 9 );
function hallelujah_essential_grid_theme_setup9() {
if ( hallelujah_exists_essential_grid() ) {
add_action( 'wp_enqueue_scripts', 'hallelujah_essential_grid_frontend_scripts', 1100 );
add_filter( 'hallelujah_filter_merge_styles', 'hallelujah_essential_grid_merge_styles' );
}
if ( is_admin() ) {
add_filter( 'hallelujah_filter_tgmpa_required_plugins', 'hallelujah_essential_grid_tgmpa_required_plugins' );
}
}
}
// Filter to add in the required plugins list
if ( ! function_exists( 'hallelujah_essential_grid_tgmpa_required_plugins' ) ) {
//Handler of the add_filter('hallelujah_filter_tgmpa_required_plugins', 'hallelujah_essential_grid_tgmpa_required_plugins');
function hallelujah_essential_grid_tgmpa_required_plugins( $list = array() ) {
if ( hallelujah_storage_isset( 'required_plugins', 'essential-grid' ) && hallelujah_storage_get_array( 'required_plugins', 'essential-grid', 'install' ) !== false && hallelujah_is_theme_activated() ) {
$path = hallelujah_get_plugin_source_path( 'plugins/essential-grid/essential-grid.zip' );
if ( ! empty( $path ) || hallelujah_get_theme_setting( 'tgmpa_upload' ) ) {
$list[] = array(
'name' => hallelujah_storage_get_array( 'required_plugins', 'essential-grid', 'title' ),
'slug' => 'essential-grid',
'source' => ! empty( $path ) ? $path : 'upload://essential-grid.zip',
'required' => false,
);
}
}
return $list;
}
}
// Check if plugin installed and activated
if ( ! function_exists( 'hallelujah_exists_essential_grid' ) ) {
function hallelujah_exists_essential_grid() {
return defined( 'EG_PLUGIN_PATH' );
}
}
// Enqueue styles for frontend
if ( ! function_exists( 'hallelujah_essential_grid_frontend_scripts' ) ) {
//Handler of the add_action( 'wp_enqueue_scripts', 'hallelujah_essential_grid_frontend_scripts', 1100 );
function hallelujah_essential_grid_frontend_scripts() {
if ( hallelujah_is_on( hallelujah_get_theme_option( 'debug_mode' ) ) ) {
$hallelujah_url = hallelujah_get_file_url( 'plugins/essential-grid/essential-grid.css' );
if ( '' != $hallelujah_url ) {
wp_enqueue_style( 'hallelujah-essential-grid', $hallelujah_url, array(), null );
}
}
}
}
// Merge custom styles
if ( ! function_exists( 'hallelujah_essential_grid_merge_styles' ) ) {
//Handler of the add_filter('hallelujah_filter_merge_styles', 'hallelujah_essential_grid_merge_styles');
function hallelujah_essential_grid_merge_styles( $list ) {
$list[] = 'plugins/essential-grid/essential-grid.css';
return $list;
}
}