The Subscription Options Add-on Pack!
* Version: 0.9.1
* Author: Tom Saunter
* Author URI: http://digitalcortex.net
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
';
/* If a FeedBurner Email Service URL was entered, display the email icon. */
if ( $email_url )
echo '
';
/* If a Twitter Stream URL was entered, display the Twitter icon. */
if ( $twitter_url )
echo '
';
/* If a Facebook Page URL was entered, display the Facebook icon. */
if ( $facebook_url )
echo '
';
/* If a LinkedIn Profile URL was entered, display the LinkedIn icon. */
if ( $linkedin_url )
echo '
';
/* If a Flickr Page URL was entered, display the Flickr icon. */
if ( $flickr_url )
echo '
';
/* If a Google+ URL was entered, display the Google+ icon. */
if ( $google_url )
echo '
';
/* If a Podcasting Service URL was entered, display the Podcast icon. */
if ( $podcast_url )
echo '
';
/* If a YouTube Channel URL was entered, display the YouTube icon. */
if ( $youtube_url )
echo '
';
/* If a Pinterest Page URL was entered, display the Pinterest icon. */
if ( $pinterest_url )
echo '
';
/* If a Spotify URL was entered, display the Spotify icon. */
if ( $spotify_url )
echo '
';
/* If a Tumblr Service URL was entered, display the Tumblr icon. */
if ( $tumblr_url )
echo '
';
/* After widget (defined by themes). */
echo $after_widget;
}
/**
* Update the widget settings.
*/
function update( $new_instance, $old_instance ) {
$instance = $old_instance;
/* Strip HTML tags for the standard widget: */
$instance['title'] = strip_tags( $new_instance['title'] );
$instance['size'] = strip_tags( $new_instance['size'] );
$instance['rss_url'] = strip_tags( $new_instance['rss_url'] );
$instance['rss_col'] = strip_tags( $new_instance['rss_col'] );
$instance['email_url'] = strip_tags( $new_instance['email_url'] );
$instance['email_col'] = strip_tags( $new_instance['email_col'] );
$instance['twitter_url'] = strip_tags( $new_instance['twitter_url'] );
$instance['twitter_col'] = strip_tags( $new_instance['twitter_col'] );
$instance['facebook_url'] = strip_tags( $new_instance['facebook_url'] );
$instance['facebook_col'] = strip_tags( $new_instance['facebook_col'] );
/* Strip HTML tags for the add-on pack: */
$instance['linkedin_url'] = strip_tags( $new_instance['linkedin_url'] );
$instance['linkedin_col'] = strip_tags( $new_instance['linkedin_col'] );
$instance['flickr_url'] = strip_tags( $new_instance['flickr_url'] );
$instance['flickr_col'] = strip_tags( $new_instance['flickr_col'] );
$instance['google_url'] = strip_tags( $new_instance['google_url'] );
$instance['google_col'] = strip_tags( $new_instance['google_col'] );
$instance['podcast_url'] = strip_tags( $new_instance['podcast_url'] );
$instance['podcast_col'] = strip_tags( $new_instance['podcast_col'] );
$instance['youtube_url'] = strip_tags( $new_instance['youtube_url'] );
$instance['youtube_col'] = strip_tags( $new_instance['youtube_col'] );
$instance['pinterest_url'] = strip_tags( $new_instance['pinterest_url'] );
$instance['pinterest_col'] = strip_tags( $new_instance['pinterest_col'] );
$instance['spotify_url'] = strip_tags( $new_instance['spotify_url'] );
$instance['spotify_col'] = strip_tags( $new_instance['spotify_col'] );
$instance['tumblr_url'] = strip_tags( $new_instance['tumblr_url'] );
$instance['tumblr_col'] = strip_tags( $new_instance['tumblr_col'] );
return $instance;
}
/**
* Displays the widget settings controls on the widget panel.
* Makes use of the get_field_id() and get_field_name() function
* when creating your form elements. This handles the confusing stuff.
*/
function form( $instance ) {
$defaults = array(
/* Set up some default standard widget settings. */
'title' => 'Subscription Options:',
'size' => '70',
'rss_url' => '',
'rss_col' => '#FF9831',
'email_url' => '',
'email_col' => '#7AFD32',
'twitter_url' => '',
'twitter_col' => '#00ACEE',
'facebook_url' => '',
'facebook_col' => '#3B5998',
/* Set up some default add-on pack settings. */
'linkedin_url' => '',
'linkedin_col' => '#007FB1',
'flickr_url' => '',
'flickr_col' => '#FE0883',
'google_url' => '',
'google_col' => '#C63D2D',
'podcast_url' => '',
'podcast_col' => '#B474E6',
'youtube_url' => '',
'youtube_col' => '#FF3333',
'pinterest_url' => '',
'pinterest_col' => '#C92228',
'spotify_url' => '',
'spotify_col' => '#7FB718',
'tunblr_url' => '',
'tumblr_col' => '#2B4964',
);
$instance = wp_parse_args( (array) $instance, $defaults ); ?>
Need more icons? Install the Add-on Pack!
'; echo ' \n"; } add_action( 'wp_head', 'suboptions_style' ); add_action( 'admin_head', 'suboptions_style' ); ?>