Search the Community
Showing results for tags 'url new window'.
-
Hi, hopefully someone can help me here cause i have looked for an "href" for my social media icons in this wordpress theme but cant find the html for the url's i have this in my theme_options.php array( 'id' => 'facebook_icon_url', 'type' => 'text', 'title' => __('Facebook Icon Url', 'beat'), 'sub_desc' => __('', 'beat'), 'desc' => __('Please enter your Facebook page/profile url', 'beat'), 'validate' => 'url', 'std' => 'http://www.facebook.com' ), and this is the plug in code: <?php class BE_social_media extends WP_Widget { function BE_social_media() { $widget_ops = array('classname' => 'social_media', 'description' => __('Display Social Media Icons with links to your social profiles - Choose icons from theme options panel','beat') ); $this->WP_Widget('social_media', __('Social Media Icons','beat'), $widget_ops); } function widget($args, $instance) { extract($args, EXTR_SKIP); echo $before_widget; global $beat_options; // Get Backend Options $beat_options = get_option('beat'); $icons_array = array( 'facebook' , 'twitter' , 'linkedin' , 'gplus' , 'rss' , 'dribbble' ); $output=""; $title = empty($instance['title']) ? ' ' : apply_filters('title', $instance['title']); if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }; $output.='<ul class="social_media_icons clearfix">'; foreach($icons_array as $icon){ if(isset($beat_options[$icon.'_icon'])){ $output.='<li class="icons">'; $output.='<a href="'.$beat_options[$icon.'_icon_url'].'" class="social_media"><div class="social_media_container"><img src="'.get_bloginfo('template_url').'/img/'.$icon.'.png" target="_BLANK" alt /></div></a>'; $output.='</li>'; } } $output.='</ul>'; echo $output; echo $after_widget; } function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); return $instance; } function form($instance) { $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); $title = strip_tags($instance['title']); ?> <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title','beat'); ?><input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p> <?php } } register_widget('BE_social_media'); ?> Anyone see it?