urlencode( implode( '|', $font_families ) ),
'display' => urlencode( 'fallback' ),
);
$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
}
return esc_url( $fonts_url );
}
function elegant_pin_dequeue_styles(){
wp_dequeue_style( 'elegant-pink-google-fonts' );
}
add_action( 'wp_enqueue_scripts','elegant_pin_dequeue_styles',99 );
function elegant_pin_footer(){
$copyright_text = get_theme_mod( 'elegant_pink_footer_copyright_text' );
$text = '
';
if( $copyright_text ){
$text .= wp_kses_post( $copyright_text );
}else{
$text .= esc_html__( 'Copyright © ', 'elegant-pin' ) . date_i18n( esc_html__( 'Y', 'elegant-pin' ) );
$text .= ' ' . esc_html( get_bloginfo( 'name' ) ) . '';
}
$text .= '';
$text .= '
';
$text .= esc_html__( 'Elegant Pin ', 'elegant-pin' );
$text .= '';
$text .= esc_html__( 'Developed By ', 'elegant-pin' );
$text .= '' . esc_html__( 'Rara Theme', 'elegant-pin' ) .'';
$text .= '';
$text .= sprintf( esc_html__( 'Powered by: %s', 'elegant-pin' ), 'WordPress' );
$text .= '';
if( function_exists( 'get_the_privacy_policy_link' ) ){
$text .= get_the_privacy_policy_link( '
', '' );
}
$text .= '
';
return $text;
}
add_filter( 'elegant_pink_footer_text','elegant_pin_footer' );
function elegant_pink_customizer_theme_info( $wp_customize ) {
$wp_customize->add_section( 'theme_info' , array(
'title' => __( 'Information Links' , 'elegant-pin' ),
'priority' => 6,
));
$wp_customize->add_setting('theme_info_theme',array(
'default' => '',
'sanitize_callback' => 'wp_kses_post',
));
$theme_info = '';
$theme_info .= '' . __( 'Need help?', 'elegant-pin' ) . '
';
$theme_info .= '' . __( 'here', 'elegant-pin' ) . '
';
$theme_info .= '' . __( 'here', 'elegant-pin' ) . '
';
$theme_info .= '' . __( 'here', 'elegant-pin' ) . '
';
$theme_info .= '' . __( 'here', 'elegant-pin' ) . '
';
$theme_info .= '' . __( 'here', 'elegant-pin' ) . '
';
$theme_info .= '' . __( 'here', 'elegant-pin' ) . '
';
$wp_customize->add_control( new elegant_pink_Theme_Info( $wp_customize ,'theme_info_theme',array(
'label' => __( 'About Elegant Pin' , 'elegant-pin' ),
'section' => 'theme_info',
'description' => $theme_info
)));
$wp_customize->add_setting('theme_info_more_theme',array(
'default' => '',
'sanitize_callback' => 'wp_kses_post',
));
}
/**
* Function for sanitizing Hex color
*/
function elegant_pin_sanitize_hex_color( $color ){
if ( '' === $color )
return '';
// 3 or 6 hex digits, or the empty string.
if ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) )
return $color;
}
function elegant_pink_category(){
$categories_list = get_the_category_list( ' ' );
if ( $categories_list && elegant_pink_categorized_blog() ) {
echo '' . $categories_list . '
';
}
}
/**
* Convert '#' to '%23'
*/
function elegant_pin_hash_to_percent23( $color_code ){
$color_code = str_replace( "#", "%23", $color_code );
return $color_code;
}
function elegant_pin_dynamic_color(){
$primary_color = get_theme_mod( 'primary_color', '#ea3c53' );
echo "";
}
add_action( 'wp_head','elegant_pin_dynamic_color',101 );
function elegant_pin_added_customizer_settings( $wp_customize ){
$wp_customize->add_setting(
'primary_color',
array(
'default' => '#ea3c53',
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
'primary_color',
array(
'label' => __( 'Primary Color', 'elegant-pin' ),
'section' => 'colors',
) )
);
$wp_customize->add_section(
'elegant_pin_instagram',
array(
'title' => __( 'Instagram Settings', 'elegant-pin' ),
'priority' => 50,
'capability' => 'edit_theme_options',
)
);
/** Blossom Instagram */
$wp_customize->add_setting(
'ed_blossom_instagram_shortcode',
array(
'default' => false,
'sanitize_callback' => 'elegant_pink_sanitize_checkbox',
)
);
$wp_customize->add_control(
'ed_blossom_instagram_shortcode',
array(
'label' => __( 'Enable Instagram Section', 'elegant-pin' ),
'description' => __( 'You must configure the BlossomThemes Feed for Instagram to display your Instagram posts on Homepage', 'elegant-pin' ),
'section' => 'elegant_pin_instagram',
'type' => 'checkbox',
)
);
$wp_customize->add_section(
'elegant_pin_newsletter',
array(
'title' => __( 'Newsletter Settings', 'elegant-pin' ),
'priority' => 55,
'capability' => 'edit_theme_options',
)
);
/** Blossom Instagram */
$wp_customize->add_setting(
'ed_blossom_newsletter_shortcode',
array(
'default' => true,
'sanitize_callback' => 'elegant_pink_sanitize_checkbox',
)
);
$wp_customize->add_control(
'ed_blossom_newsletter_shortcode',
array(
'label' => __( 'Enable Blossom Email Newsletter', 'elegant-pin' ),
'section' => 'elegant_pin_newsletter',
'type' => 'checkbox',
)
);
/** Blossom Instagram */
$wp_customize->add_setting(
'blossom_newsletter_shortcode',
array(
'default' => '',
'sanitize_callback' => 'wp_kses_post',
)
);
$wp_customize->add_control(
'blossom_newsletter_shortcode',
array(
'label' => __( 'Blossom Email Newsletter', 'elegant-pin' ),
'description' => __( 'Enter Blossom Email Newsletter Shortcode', 'elegant-pin' ),
'section' => 'elegant_pin_newsletter',
'type' => 'text',
)
);
}
add_action( 'customize_register', 'elegant_pin_added_customizer_settings' );
function elegant_pin_blossom_instagram(){
$instagram = get_theme_mod( 'ed_blossom_instagram_shortcode',false );
if( class_exists( 'Blossomthemes_Instagram_Feed' ) ){
$options = get_option( 'blossomthemes_instagram_feed_settings', true );
if( !isset( $options['username'] ) || $options['username'] == '' ){
return;
}
}
if( $instagram && is_front_page() ){ ?>