urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url_raw( $fonts_url ); } function elemental_scripts_styles() { wp_enqueue_style( 'elemental-fonts', elemental_fonts_url(), array(), null ); } add_action( 'wp_enqueue_scripts', 'elemental_scripts_styles' ); /** * Change Redux Defaults */ if (!function_exists('change_defaults')) { function change_defaults($defaults) { $defaults['button-color'] = '#5cb85c'; $defaults['theme-color'] = '#5cb85c'; $defaults['footer-background'] = '#121a21'; $defaults['hero-bg'] = array( 'background-image' => get_stylesheet_directory_uri() . '/images/bg-welcome.jpeg', 'background-size' => 'cover', ); $defaults['hero-title'] = __('Elemental', 'elemental'); $defaults['hero-subtitle'] = __('One-Page Business Theme', 'elemental'); $defaults['hero-tagline'] = __('A one-page theme for freelancers, startups and professionals. Create a stunning website in minutes.', 'elemental'); return $defaults; } } add_filter('redux/options/integral/defaults', 'change_defaults' ); /** * Change arguments for Redux Option values */ if (!function_exists('change_arguments')) { function change_arguments($args) { $args['menu_title'] = __('Elemental Options', 'elemental'); $args['page_title'] = __('Elemental Options', 'elemental'); return $args; } } add_filter('redux/options/integral/args', 'change_arguments' ); /** * Change theme option CSS output settings */ function elemental_options_output_css_settings() { global $integral; $color = $integral['theme-color']; $custom_css = ".features .feature i, .services .feature span, .contact ul.socials li a {color: {$color};}"; wp_add_inline_style( 'elemental-child-style', $custom_css ); } add_action( 'wp_enqueue_scripts', 'elemental_options_output_css_settings', 100 ); /** * User notice on theme activation */ function elemental_admin_notice() { global $current_user ; $user_id = $current_user->ID; /* Check that the user hasn't already clicked to ignore the message */ if ( ! get_user_meta($user_id, 'elemental_ignore_notice') ) { ?>

Dismiss this notice
ID; /* If user clicks to ignore the notice, add that to their user meta */ if ( isset($_GET['elemental_nag_ignore']) && '0' == $_GET['elemental_nag_ignore'] ) { add_user_meta($user_id, 'elemental_ignore_notice', 'true', true); } } add_action('admin_init', 'elemental_nag_ignore'); function load_elemental_wp_admin_style() { wp_register_style( 'elemental_wp_admin_css', get_stylesheet_directory_uri() . '/inc/admin.css', false, '1.0.0' ); wp_enqueue_style( 'elemental_wp_admin_css' ); } add_action( 'admin_enqueue_scripts', 'load_elemental_wp_admin_style' );