Re-Ordering the Icons
-
Hi
I noticed in the FAQs it says “Can I reorder the icons? No, not at this time.”
You simply need to change the 3 array orders in the simple-social-icons/simple-social-icons.php file. Go to Plugins > Editor and amend the PHP file between the function below, moving the ones you want to the top, so they appear in the widget at the top.
/**
* Constructor method.
*
* Set some global values and create widget.
*/
function __construct() {/**
* Default widget option values.
*/
$this->defaults = apply_filters( ‘simple_social_default_styles’, array(
‘title’ => ”,
‘new_window’ => 0,
‘size’ => 36,
‘border_radius’ => 3,
‘icon_color’ => ‘#ffffff’,
‘icon_color_hover’ => ‘#ffffff’,
‘background_color’ => ‘#999999’,
‘background_color_hover’ => ‘#666666’,
‘alignment’ => ‘alignleft’,
‘facebook’ => ”,
‘twitter’ => ”,
‘linkedin’ => ”,
‘youtube’ => ”,
’email’ => ”,
‘rss’ => ”,
‘dribbble’ => ”,
‘flickr’ => ”,
‘github’ => ”,
‘gplus’ => ”,
‘instagram’ => ”,
‘pinterest’ => ”,
‘stumbleupon’ => ”,
‘tumblr’ => ”,
‘vimeo’ => ”,
) );/**
* Social profile glyphs.
*/
$this->glyphs = apply_filters( ‘simple_social_default_glyphs’, array(
‘facebook’ => ‘’,
‘twitter’ => ‘’,
‘linkedin’ => ‘’,
‘youtube’ => ‘’,
’email’ => ‘’,
‘rss’ => ‘’,
‘dribbble’ => ‘’,
‘flickr’ => ‘’,
‘github’ => ‘’,
‘gplus’ => ‘’,
‘instagram’ => ‘’,
‘pinterest’ => ‘’,
‘stumbleupon’ => ‘’,
‘tumblr’ => ‘’,
‘vimeo’ => ‘’,
) );/**
* Social profile choices.
*/
$this->profiles = apply_filters( ‘simple_social_default_profiles’, array(
‘facebook’ => array(
‘label’ => __( ‘Facebook URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-facebook”>‘ . $this->glyphs[‘facebook’] . ‘‘,
),
‘twitter’ => array(
‘label’ => __( ‘Twitter URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-twitter”>‘ . $this->glyphs[‘twitter’] . ‘‘,
),
‘linkedin’ => array(
‘label’ => __( ‘Linkedin URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-linkedin”>‘ . $this->glyphs[‘linkedin’] . ‘‘,
),
‘youtube’ => array(
‘label’ => __( ‘YouTube URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-youtube”>‘ . $this->glyphs[‘youtube’] . ‘‘,
),
’email’ => array(
‘label’ => __( ‘Email URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-email”>‘ . $this->glyphs[’email’] . ‘‘,
),
‘rss’ => array(
‘label’ => __( ‘RSS URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-rss”>‘ . $this->glyphs[‘rss’] . ‘‘,
),
‘dribbble’ => array(
‘label’ => __( ‘Dribbble URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-dribbble”>‘ . $this->glyphs[‘dribbble’] . ‘‘,
),
‘flickr’ => array(
‘label’ => __( ‘Flickr URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-flickr”>‘ . $this->glyphs[‘flickr’] . ‘‘,
),
‘github’ => array(
‘label’ => __( ‘GitHub URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-github”>‘ . $this->glyphs[‘github’] . ‘‘,
),
‘gplus’ => array(
‘label’ => __( ‘Google+ URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-gplus”>‘ . $this->glyphs[‘gplus’] . ‘‘,
),
‘instagram’ => array(
‘label’ => __( ‘Instagram URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-instagram”>‘ . $this->glyphs[‘instagram’] . ‘‘,
),
‘pinterest’ => array(
‘label’ => __( ‘Pinterest URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-pinterest”>‘ . $this->glyphs[‘pinterest’] . ‘‘,
),
‘stumbleupon’ => array(
‘label’ => __( ‘StumbleUpon URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-stumbleupon”>‘ . $this->glyphs[‘stumbleupon’] . ‘‘,
),
‘tumblr’ => array(
‘label’ => __( ‘Tumblr URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-tumblr”>‘ . $this->glyphs[‘tumblr’] . ‘‘,
),
‘vimeo’ => array(
‘label’ => __( ‘Vimeo URI’, ‘ssiw’ ),
‘pattern’ => ‘<li class=”social-vimeo”>‘ . $this->glyphs[‘vimeo’] . ‘‘,
),
) );It worked for me! Not sure if this has been covered, but a useful tip.
Also, in regards to the plugin, maybe a “settings” file could be added allowing the user to order the links. Just a thought.
Cheers
G
- The topic ‘Re-Ordering the Icons’ is closed to new replies.