function axiom_sc_social_item($atts, $content = null) { if (axiom_sc_in_shortcode_blogger()) { return ''; } extract(axiom_sc_html_decode(shortcode_atts(array("name" => "", "url" => "", "icon" => ""), $atts))); global $AXIOM_GLOBALS; if (!empty($name) && empty($icon) && file_exists(axiom_get_socials_dir($name . '.png'))) { $icon = axiom_get_socials_url($name . '.png'); } if (!empty($icon) && !empty($url)) { if ($AXIOM_GLOBALS['sc_social_icons'] === false) { $AXIOM_GLOBALS['sc_social_icons'] = array(); } $AXIOM_GLOBALS['sc_social_icons'][] = array('icon' => $icon, 'url' => $url); } return ''; }
function axiom_show_user_socials($args) { $args = array_merge(array('author_id' => 0, 'allowed' => array(), 'size' => 'small', 'style' => 'icons', 'echo' => true), is_array($args) ? $args : array('author_id' => $args)); // If send one number parameter - use it as author's ID $output = ''; $upload_info = wp_upload_dir(); $upload_url = $upload_info['baseurl']; $social_list = axiom_get_theme_option('social_icons'); $list = array(); foreach ($social_list as $soc) { $sn = basename($soc['icon']); $sn = $args['style'] == 'icons' ? axiom_substr($sn, axiom_strrpos($sn, '-') + 1) : axiom_substr($sn, 0, axiom_strrpos($sn, '.')); if (($pos = axiom_strrpos($sn, '_')) !== false) { $sn = axiom_substr($sn, 0, $pos); } if (count($args['allowed']) == 0 || in_array($sn, $args['allowed'])) { $link = get_the_author_meta('user_' . $sn, $args['author_id']); if ($link) { $icon = $args['style'] == 'icons' || axiom_strpos($soc['icon'], $upload_url) !== false ? $soc['icon'] : axiom_get_socials_url(basename($soc['icon'])); $list[] = array('icon' => $icon, 'url' => $link); } } } if (count($list) > 0) { $output = '<div class="sc_socials sc_socials_size_' . esc_attr($args['size']) . '">' . trim(axiom_prepare_socials($list, $args['style'])) . '</div>'; if ($args['echo']) { echo $output; } } return $output; }
<label for="rememberme"><?php _e('Remember me', 'axiom'); ?> </label> </div> <div class="popup_form_field submit_field"><input type="submit" class="submit_button" value="<?php _e('Login', 'axiom'); ?> "></div> </form> </div> <div class="form_right"> <div class="login_socials_title"><?php _e('You can login using your social profile', 'axiom'); ?> </div> <div class="login_socials_list sc_socials sc_socials_size_tiny"> <?php $list = array(array('icon' => axiom_get_socials_url('facebook'), 'url' => '#'), array('icon' => axiom_get_socials_url('twitter'), 'url' => '#'), array('icon' => axiom_get_socials_url('gplus'), 'url' => '#')); echo trim(axiom_prepare_socials($list)); ?> </div> <div class="login_socials_problem"><a href="#"><?php _e('Problem with login?', 'axiom'); ?> </a></div> <div class="result message_block"></div> </div> </div> <!-- /.login_wrap --> </div> <!-- /.popup_login -->