'label' => 'Extra Content',
'type' => 'textarea'
),
+ array(
+ 'name' => 'facebook',
+ 'label' => 'Facebook',
+ 'type' => 'text'
+ ),
+ array(
+ 'name' => 'twitter',
+ 'label' => 'Twitter',
+ 'type' => 'text'
+ ),
+ array(
+ 'name' => 'instagram',
+ 'label' => 'Instagram',
+ 'type' => 'text'
+ ),
+ array(
+ 'name' => 'youtube',
+ 'label' => 'Youtube',
+ 'type' => 'text'
+ ),
+ array(
+ 'name' => 'pinterest',
+ 'label' => 'Pinterest',
+ 'type' => 'text'
+ ),
);
$fieldNames2 = array(
array(
$states = get_option(GLM_CLEINTINFO_STATES);
include $this->path . 'views/stateSelect.php';
}
-
+
public function glmclientinfo_settings_section_callback()
{
// echo __('Business Name, Address and phone numbers', 'wordpress');
public function load_stylesheet()
{
wp_enqueue_style('client-admin-css',plugins_url('glm-client-info/css/admin/admin.css' , $this->pluginDirName));
+ wp_enqueue_style("glm-fontawesome", "https://use.fontawesome.com/releases/v5.5.0/css/all.css");
}
public function load_script()
{
'all'
);
wp_enqueue_script('client-info-admin-js');
-
}
}
{
$this->path = $path;
add_action('widgets_init', array($this, 'glmclientinfo_register_widget'));
+ add_action('wp_enqueue_scripts', array($this, 'load_script'));
}
/**
include $this->path . 'models/Glmclientinfo_Widget.php';
register_widget('Glmclientinfo_Widget');
}
-
+ public function load_script()
+ {
+ wp_enqueue_style("glm-fontawesome", "https://use.fontawesome.com/releases/v5.5.0/css/all.css");
+ }
}
<div class="glm-footer-client-info">
+ <?php $exclude = array("facebook", "twitter", "instagram", "pinterest", "youtube"); ?>
<?php foreach( get_option('glmclientinfo_settings') as $setting => $value){ ?>
<div class="glm-client-info-field glm-client-info-<?php echo $setting; ?>">
- <?php if( $value !== '') { ?>
+ <?php if( $value !== '' && ! in_array($setting, $exclude) ) { ?>
<div class="glm-client-info-name" ><?php echo $setting; ?>:</div>
<?php if( $setting === "phone" || $setting === "tollfree"){ ?>
<a href="tel:<?php echo str_replace(array('.', ',','-'), '' , $value); ?>"><?php echo $value; ?></a>
--- /dev/null
+<div class="glm-footer-client-info">
+ <?php
+ $options = get_option('glmclientinfo_settings');
+ $social_media_settings = array(
+ "facebook" => $options['facebook'],
+ "instagram" => $options['instagram'],
+ 'twitter' => $options['twitter'],
+ 'pinterest' => $options['pinterest'],
+ "youtube" => $options['youtube'],
+
+ );
+ ?>
+ <?php foreach( $social_media_settings as $setting => $value){ ?>
+ <div class="glm-client-info-field glm-client-info-<?php echo $setting; ?>">
+ <?php if( $value !== '') { ?>
+ <div class="glm-client-info-name" ><?php echo $setting; ?>:</div>
+ <div class="glm-client-info-value"><a href="<?php echo $value;?>"><i class="fab fa-<?php echo $setting; ?>"></i></a></div>
+ <?php } ?>
+ </div>
+ <?php } ?>
+</div>
\ No newline at end of file