codestar-framework icon indicating copy to clipboard operation
codestar-framework copied to clipboard

Hello, I am getting such a problem with your plugin that I use as a premium. HELP PLEASE !

Open talhakaranfill opened this issue 3 years ago • 0 comments

Hello @Codestar , I am getting such a problem with your plugin that I use as a premium. I'm using Switcher and by default I get such a problem when I install a theme. But when I turn the switcher off and on from the customizer, the errors go away and it starts working. I don't understand why there is such a problem. I would be glad if you help.


CSF::createSection( $prefix, array(
	'id'       => 'social_icon',
	'title'    => esc_html__( 'Social Icons', 'cartoonsnft' ),
	'priority' => 6,
) );
CSF::createSection( $prefix, array(
	'parent' => 'social_icon',
	'title'  => esc_html__( 'Social Icons' ),
	'fields' => array(
		array(
			'id'         => 'social_icons_acc',
			'type'       => 'accordion',
			'title'      => 'Social Media',
			'accordions' => array(
				array(
					'title'  => 'Instagram',
					'icon'   => 'fa fa-instagram',
					'fields' => array(
						array(
							'id'         => 'fa_instagram_switcher',
							'type'       => 'switcher',
							'title'      => esc_html__('Show or Hide','cartoonsnft'),
							'text_on'    => 'Show',
							'text_off'   => 'Hide',
							'text_width' => 100,
							'default'    => true,
							'desc'       => '<small>Default: "show"</small>'
						),

						array(
							'id'         => 'fa-instagram',
							'type'       => 'text',
							'title'      => 'Instagram',
							'default'    => 'fa-brands fa-instagram',
							'desc'       => '<small>Default icon: fa-brands fa-instagram</small>',
							'dependency' => array( 'fa_instagram_switcher', '==', 'true' ),
						),
						array(
							'id'         => 'fa-instagram-url',
							'type'       => 'text',
							'title'      => 'Instagram Url',
							'default'    => 'https://www.instagram.com/#',
							'desc'       => '<small>Default Url: https://www.instagram.com/#</small>',
							'dependency' => array( 'fa_instagram_switcher', '==', 'true' ),
						),
					)
				),
				array(
					'title'  => 'Facebook',
					'icon'   => 'fa fa-facebook',
					'fields' => array(
						array(
							'id'         => 'fa-facebook-switcher',
							'type'       => 'switcher',
							'title'      => 'Show or Hide',
							'text_on'    => 'Show',
							'text_off'   => 'Hide',
							'text_width' => 100,
							'default'    => true,
							'desc'       => '<small>Default: "show"</small>'
						),
						array(
							'id'         => 'fa-facebook',
							'type'       => 'text',
							'title'      => 'Facebook',
							'default'    => 'fa-brands fa-facebook',
							'desc'       => '<small>Default icon: fa-brands fa-facebook</small>',
							'dependency' => array( 'fa-facebook-switcher', '==', 'true' ),
						),
						array(
							'id'         => 'fa-facebook-url',
							'type'       => 'text',
							'title'      => 'Facebook Url',
							'default'    => 'https://www.facebook.com/#',
							'desc'       => '<small>Default Url: https://www.facebook.com/#</small>',
							'dependency' => array( 'fa-facebook-switcher', '==', 'true' ),
						),
					)
				),
				array(
					'title'  => 'Twitter',
					'icon'   => 'fa fa-twitter',
					'fields' => array(
						array(
							'id'         => 'fa-twitter-switcher',
							'type'       => 'switcher',
							'title'      => 'Show or Hide',
							'text_on'    => 'Show',
							'text_off'   => 'Hide',
							'text_width' => 100,
							'default'    => true,
							'desc'       => '<small>Default: "show"</small>'
						),
						array(
							'id'         => 'fa-twitter',
							'type'       => 'text',
							'title'      => 'Twitter',
							'default'    => 'fa-brands fa-twitter',
							'desc'       => '<small>Default icon: fa-brands fa-twitter</small>',
							'dependency' => array( 'fa-twitter-switcher', '==', 'true' ),
						),
						array(
							'id'         => 'fa-twitter-url',
							'type'       => 'text',
							'title'      => 'Twitter Url',
							'default'    => 'https://www.twitter.com/#',
							'desc'       => '<small>Default Url: https://www.twitter.com/#</small>',
							'dependency' => array( 'fa-twitter-switcher', '==', 'true' ),
						),
					)
				),
				array(
					'title'  => 'Linked in',
					'icon'   => 'fab fa-linkedin-in',
					'fields' => array(
						array(
							'id'         => 'fa-linkedin-in-switcher',
							'type'       => 'switcher',
							'title'      => 'Show or Hide',
							'text_on'    => 'Show',
							'text_off'   => 'Hide',
							'text_width' => 100,
							'default'    => true,
							'desc'       => '<small>Default: "show"</small>'
						),
						array(
							'id'         => 'fa-linkedin-in',
							'type'       => 'text',
							'title'      => 'Linkedin',
							'default'    => 'fa-brands fa-linkedin-in',
							'desc'       => '<small>Default icon: fa-brands fa-linkedin-in</small>',
							'dependency' => array( 'fa-linkedin-in-switcher', '==', 'true' ),
						),
						array(
							'id'         => 'fa-linkedin-in-url',
							'type'       => 'text',
							'title'      => 'Linkedin Url',
							'default'    => 'https://www.linkedin.com/#',
							'desc'       => '<small>Default Url: https://www.linkedin.com/#</small>',
							'dependency' => array( 'fa-linkedin-in-switcher', '==', 'true' ),
						),
					)
				),
				array(
					'title'  => 'Discord',
					'icon'   => 'fab fa-discord',
					'fields' => array(
						array(
							'id'         => 'fa-discord-switcher',
							'type'       => 'switcher',
							'title'      => 'Show or Hide',
							'text_on'    => 'Show',
							'text_off'   => 'Hide',
							'text_width' => 100,
							'default'    => true,
							'desc'       => '<small>Default: "show"</small>'
						),
						array(
							'id'         => 'fa-discord',
							'type'       => 'text',
							'title'      => 'Linkedin',
							'default'    => 'fa-brands fa-discord',
							'desc'       => '<small>Default icon: fa-brands fa-discord</small>',
							'dependency' => array( 'fa-discord-switcher', '==', 'true' ),
						),
						array(
							'id'         => 'fa-discord-url',
							'type'       => 'text',
							'title'      => 'Discord Url',
							'default'    => 'https://www.discord.com/#',
							'desc'       => '<small>Default Url: https://www.discord.com/#</small>',
							'dependency' => array( 'fa-discord-switcher', '==', 'true' ),
						),
					)
				),


			)
		),
	)
) );


image image;


<?php $options = get_option( 'cartoonsnft_theme_customizer' ); ?>
<div class="fixed-social-icons">
	<?php if ( $options['social_icons_acc']['fa_instagram_switcher'] ): ?>
        <a href="<?php echo $options['social_icons_acc']['fa-instagram-url'] == '' ? 'javascript:void' : $options['social_icons_acc']['fa-instagram-url']; ?>">
            <i class="fa-brands fa-instagram"></i></a>
	<?php endif; ?>

	<?php if ( $options['social_icons_acc']['fa-facebook-switcher'] ): ?>
        <a href="<?php echo $options['social_icons_acc']['fa-facebook-url'] == '' ? 'javascript:void' : $options['social_icons_acc']['fa-facebook-url']; ?>">
            <i class="fa-brands fa-facebook-f"></i></a>
	<?php endif; ?>

	<?php if ( $options['social_icons_acc']['fa-twitter-switcher'] ): ?>
        <a href="<?php echo $options['social_icons_acc']['fa-twitter-url'] == '' ? 'javascript:void' : $options['social_icons_acc']['fa-twitter-url']; ?>">
            <i class="fa-brands fa-twitter"></i></a>
	<?php endif; ?>

	<?php if ( $options['social_icons_acc']['fa-linkedin-in-switcher'] ): ?>
        <a href="<?php echo $options['social_icons_acc']['fa-linkedin-in-url'] == '' ? 'javascript:void' : $options['social_icons_acc']['fa-linkedin-in-url']; ?>">
            <i class="fa-brands fa-linkedin-in"></i></a>
	<?php endif; ?>

	<?php if ( $options['social_icons_acc']['fa-discord-switcher'] ): ?>
        <a href="<?php echo $options['social_icons_acc']['fa-discord-url'] == '' ? 'javascript:void' : $options['social_icons_acc']['fa-discord-url']; ?>">
            <i class="fa-brands fa-discord"></i></a>
	<?php endif; ?>
</div>


talhakaranfill avatar Apr 05 '22 09:04 talhakaranfill