simple changes, fixed some issues
This commit is contained in:
@ -262,11 +262,11 @@ if ( ! function_exists( 'sophia_after_dark_register_custom_controls' ) ) :
|
||||
* Icon field
|
||||
*/
|
||||
case 'icon':
|
||||
$sophia_after_dark_font_awesome_icon_array = sophia_after_dark_font_awesome_icon_array();
|
||||
$sophia_after_dark_fork_awesome_icon_array = sophia_after_dark_fork_awesome_icon_array();
|
||||
echo '<div class="mt-repeater-selected-icon"><i class="'.esc_attr( $new_value ).'"></i><span><i class="fa fa-angle-down"></i></span></div><ul class="mt-repeater-icon-list mt-clearfix">';
|
||||
foreach ( $sophia_after_dark_font_awesome_icon_array as $sophia_after_dark_font_awesome_icon ) {
|
||||
$icon_class = $new_value == $sophia_after_dark_font_awesome_icon ? 'icon-active' : '';
|
||||
echo '<li class='.esc_attr( $icon_class ).'><i class="'.esc_attr( $sophia_after_dark_font_awesome_icon ).'"></i></li>';
|
||||
foreach ( $sophia_after_dark_fork_awesome_icon_array as $sophia_after_dark_fork_awesome_icon ) {
|
||||
$icon_class = $new_value == $sophia_after_dark_fork_awesome_icon ? 'icon-active' : '';
|
||||
echo '<li class='.esc_attr( $icon_class ).'><i class="'.esc_attr( $sophia_after_dark_fork_awesome_icon ).'"></i></li>';
|
||||
}
|
||||
echo '</ul><input data-default="'.esc_attr( $default ).'" type="hidden" value="'.esc_attr( $new_value ).'" data-name="'.esc_attr( $key ).'"/>';
|
||||
break;
|
||||
@ -275,11 +275,11 @@ if ( ! function_exists( 'sophia_after_dark_register_custom_controls' ) ) :
|
||||
* Social Icon field
|
||||
*/
|
||||
case 'social_icon':
|
||||
$sophia_after_dark_font_awesome_social_icon_array = sophia_after_dark_font_awesome_social_icon_array();
|
||||
$sophia_after_dark_fork_awesome_social_icon_array = sophia_after_dark_fork_awesome_social_icon_array();
|
||||
echo '<div class="mt-repeater-selected-icon"><i class="'.esc_attr( $new_value ).'"></i><span><i class="fa fa-angle-down"></i></span></div><ul class="mt-repeater-icon-list mt-clearfix">';
|
||||
foreach ( $sophia_after_dark_font_awesome_social_icon_array as $sophia_after_dark_font_awesome_icon ) {
|
||||
$icon_class = $new_value == $sophia_after_dark_font_awesome_icon ? 'icon-active' : '';
|
||||
echo '<li class='.esc_attr( $icon_class ).'><i class="'.esc_attr( $sophia_after_dark_font_awesome_icon ).'"></i></li>';
|
||||
foreach ( $sophia_after_dark_fork_awesome_social_icon_array as $sophia_after_dark_fork_awesome_icon ) {
|
||||
$icon_class = $new_value == $sophia_after_dark_fork_awesome_icon ? 'icon-active' : '';
|
||||
echo '<li class='.esc_attr( $icon_class ).'><i class="'.esc_attr( $sophia_after_dark_fork_awesome_icon ).'"></i></li>';
|
||||
}
|
||||
echo '</ul><input data-default="'.esc_attr( $default ).'" type="hidden" value="'.esc_attr( $new_value ).'" data-name="'.esc_attr( $key ).'"/>';
|
||||
break;
|
||||
|
@ -72,9 +72,9 @@ add_action( 'wp_head', 'sophia_after_dark_pingback_header' );
|
||||
if ( ! function_exists( 'sophia_after_dark_fonts_url' ) ) :
|
||||
|
||||
/**
|
||||
* Register Google fonts for Sophia After Dark.
|
||||
* Register Bunny fonts for Sophia After Dark.
|
||||
*
|
||||
* @return string Google fonts URL for the theme.
|
||||
* @return string Bunny fonts URL for the theme.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function sophia_after_dark_fonts_url() {
|
||||
@ -132,56 +132,43 @@ function sophia_after_dark_admin_scripts( $hook ) {
|
||||
/**
|
||||
* Enqueue scripts and styles.
|
||||
*/
|
||||
function sophia_after_dark_scripts() {
|
||||
global $sophia_after_dark_theme_version;
|
||||
function sophia_after_dark_scripts(): void {
|
||||
$v = wp_get_theme()->get('Version');
|
||||
$dir = get_template_directory_uri();
|
||||
|
||||
wp_enqueue_style( 'sophia-after-dark-fonts', sophia_after_dark_fonts_url(), array(), null );
|
||||
wp_enqueue_style( 'lightslider-style', get_template_directory_uri() .'/assets/library/lightslider/css/lightslider.min.css', array(), '' );
|
||||
wp_enqueue_style( 'animate', get_template_directory_uri(). '/assets/library/animate/animate.min.css', array(), '3.5.1' );
|
||||
wp_enqueue_style( 'sophia-after-dark-style', get_stylesheet_uri(), array(), esc_attr( $sophia_after_dark_theme_version) );
|
||||
wp_enqueue_style( 'sophia-after-dark-responsive-style', get_template_directory_uri(). '/assets/css/mt-responsive.css', array(), esc_attr( $sophia_after_dark_theme_version ) );
|
||||
wp_enqueue_style('sophia-after-dark-fonts', sophia_after_dark_fonts_url(), [], null);
|
||||
wp_enqueue_style('lightslider-style', "$dir/assets/library/lightslider/css/lightslider.min.css", [], null);
|
||||
wp_enqueue_style('animate', "$dir/assets/library/animate/animate.min.css", [], '3.5.1');
|
||||
wp_enqueue_style('sophia-after-dark-style', get_stylesheet_uri(), [], $v);
|
||||
wp_enqueue_style('sophia-after-dark-responsive-style', "$dir/assets/css/mt-responsive.css", [], $v);
|
||||
|
||||
wp_enqueue_script( 'sophia-after-dark-combine-scripts', get_template_directory_uri() .'/assets/js/mt-combine-scripts.js', array('jquery'), esc_attr( $sophia_after_dark_theme_version ), true );
|
||||
wp_enqueue_script( 'sophia-after-dark-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), esc_attr( $sophia_after_dark_theme_version ), true );
|
||||
wp_enqueue_script( 'sophia-after-dark-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), esc_attr( $sophia_after_dark_theme_version ), true );
|
||||
wp_enqueue_script( 'sophia-after-dark-custom-scripts', get_template_directory_uri() .'/assets/js/mt-custom-scripts.js', array('jquery'), esc_attr( $sophia_after_dark_theme_version ), true );
|
||||
wp_enqueue_script('sophia-after-dark-combine-scripts', "$dir/assets/js/mt-combine-scripts.js", ['jquery'], $v, true);
|
||||
wp_enqueue_script('sophia-after-dark-navigation', "$dir/assets/js/navigation.js", [], $v, true);
|
||||
wp_enqueue_script('sophia-after-dark-skip-link-focus-fix', "$dir/assets/js/skip-link-focus-fix.js", [], $v, true);
|
||||
wp_enqueue_script('sophia-after-dark-custom-scripts', "$dir/assets/js/mt-custom-scripts.js", ['jquery'], $v, true);
|
||||
|
||||
$sophia_after_dark_enable_sticky_menu = get_theme_mod( 'sophia_after_dark_enable_sticky_menu', true );
|
||||
if ( true === $sophia_after_dark_enable_sticky_menu ) {
|
||||
$sticky_value = 'on';
|
||||
} else {
|
||||
$sticky_value = 'off';
|
||||
}
|
||||
wp_localize_script('sophia-after-dark-custom-scripts', 'sophia_after_darkObject', [
|
||||
'menu_sticky' => get_theme_mod('sophia_after_dark_enable_sticky_menu', true) ? 'on' : 'off',
|
||||
'wow_effect' => get_theme_mod('sophia_after_dark_enable_wow_animation', true) ? 'on' : 'off',
|
||||
]);
|
||||
|
||||
$sophia_after_dark_enable_wow_animation = get_theme_mod( 'sophia_after_dark_enable_wow_animation', true );
|
||||
if ( true === $sophia_after_dark_enable_wow_animation ) {
|
||||
$wow_value = 'on';
|
||||
} else {
|
||||
$wow_value = 'off';
|
||||
}
|
||||
|
||||
wp_localize_script( 'sophia-after-dark-custom-scripts', 'sophia_after_darkObject', array(
|
||||
'menu_sticky' => $sticky_value,
|
||||
'wow_effect' => $wow_value
|
||||
) );
|
||||
|
||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
if (is_singular() && comments_open() && get_option('thread_comments')) {
|
||||
wp_enqueue_script('comment-reply');
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'sophia_after_dark_scripts' );
|
||||
add_action('wp_enqueue_scripts', 'sophia_after_dark_scripts');
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if ( ! function_exists( 'sophia_after_dark_font_awesome_social_icon_array' ) ) :
|
||||
if ( ! function_exists( 'sophia_after_dark_fork_awesome_social_icon_array' ) ) :
|
||||
|
||||
/**
|
||||
* Define font awesome social media icons
|
||||
* Define fork awesome social media icons
|
||||
*
|
||||
* @return array();
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function sophia_after_dark_font_awesome_social_icon_array() {
|
||||
function sophia_after_dark_fork_awesome_social_icon_array() {
|
||||
return array(
|
||||
"fa fa-facebook-square","fa fa-facebook-f","fa fa-facebook","fa fa-facebook-official","fa fa-twitter-square","fa fa-twitter","fa fa-yahoo","fa fa-google","fa fa-google-wallet","fa fa-google-plus-circle","fa fa-google-plus-official","fa fa-instagram","fa fa-linkedin-square","fa fa-linkedin","fa fa-pinterest-p","fa fa-pinterest","fa fa-pinterest-square","fa fa-google-plus-square","fa fa-google-plus","fa fa-youtube-square","fa fa-youtube","fa fa-youtube-play","fa fa-vimeo","fa fa-vimeo-square",
|
||||
);
|
||||
|
@ -3,7 +3,7 @@ Theme Name: Sophia After Dark
|
||||
Author: Sophia Atkinson, Mystery Themes
|
||||
Author URI: https://sophia.wtf
|
||||
Description: Sophia After Dark is a page builder based and colorful free blog style WordPress theme fit for writers and bloggers. With the help of live customizer option makes your site own and present your content in an attractive way. It comes up with an amazing creative blog layouts, fully RTL and translation ready, and also compatible with Gutenberg. The theme works perfectly with Elementor that helps to create a beautiful and unique website faster. As its name suggests, it added staggering variety of color and makes your site attractive and elegant.
|
||||
Version: 1.4.1
|
||||
Version: 1.4.2
|
||||
Requires at least: 4.7
|
||||
Tested up to: 6.8.1
|
||||
Requires PHP: 5.2.4
|
||||
|
Reference in New Issue
Block a user