Changeset 811684
- Timestamp:
- 11/28/2013 05:25:38 AM (12 years ago)
- Location:
- facebook-albums/trunk
- Files:
-
- 3 edited
-
fbalbum.php (modified) (2 diffs)
-
inc/options-facebookalbum.php (modified) (2 diffs)
-
inc/widget.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
facebook-albums/trunk/fbalbum.php
r802215 r811684 275 275 $api_call = '/'.self::_get_album_id()."?fields=id,name,photos.limit({$limit}).fields(source,link,images,name)"; 276 276 $album = self::$facebook_sdk->api($api_call); 277 //We're good to go, let's cache the JSON 278 self::set_api_cache($album); 277 if($album) { 278 //We're good to go, let's cache the JSON 279 self::set_api_cache($album); 280 } 279 281 } catch (FacebookApiException $e) { 280 282 error_log($e); … … 370 372 if(!self::$album_id) 371 373 return; 372 $ca hce_lifetime = (isset(self::$options['cache'])) ? self::$options['cache'] * DAY_IN_SECONDS : DAY_IN_SECONDS;373 374 set_transient("fbalbum_".self::$album_id, $json, 12 * HOUR_IN_SECONDS); //caching for 12 hours374 $cache_lifetime = (isset(self::$options['cache'])) ? self::$options['cache'] * HOUR_IN_SECONDS : HOUR_IN_SECONDS; 375 376 set_transient("fbalbum_".self::$album_id, $json, $cache_lifetime); //caching for 12 hours 375 377 } 376 378 -
facebook-albums/trunk/inc/options-facebookalbum.php
r802215 r811684 3 3 * Template and actions for options page. 4 4 */ 5 if (!defined('DB_NAME')) { 6 header('HTTP/1.0 403 Forbidden'); 7 die; 8 } 9 5 10 //For nonce. 6 11 global $current_user; … … 13 18 //If nonce, do update 14 19 if (isset($_POST["fbalbum_nonce"])) : 15 $options = $_POST['facebookalbum'];16 update_option('facebookalbum', $options);17 echo '<div class="updated"><p><strong>Facebook Albums has been updated</strong></p></div>';20 $options = $_POST['facebookalbum']; 21 update_option('facebookalbum', $options); 22 echo '<div class="updated"><p><strong>Facebook Albums has been updated</strong></p></div>'; 18 23 endif; 19 24 20 25 if(isset($_GET['reset_application']) && wp_verify_nonce($_GET['reset_application'], $current_user->data->user_email)) : 21 unset($options['app_id']);22 unset($options['app_secret']);23 unset($options['access_token']);24 update_option('facebookalbum', $options);25 echo '<div class="updated"><p><strong>Facebook API application has been removed.</strong></p></div>';26 unset($options['app_id']); 27 unset($options['app_secret']); 28 unset($options['access_token']); 29 update_option('facebookalbum', $options); 30 echo '<div class="updated"><p><strong>Facebook API application has been removed.</strong></p></div>'; 26 31 endif; 27 32 28 33 ?> 29 <div class="wrap"> 30 <?php screen_icon(); ?> 31 <h2>Facebook Album <?php _e('Options', 'facebook-albums'); ?></h2> 32 <div id="facebook-album-content" class="postbox-container" style=""> 33 <form method="post" action="" name="options-facebookalbum"> 34 <?php wp_nonce_field(basename(__FILE__), 'fbalbum_nonce'); ?> 35 <div class="settings-box"> 36 <h2><?php _e('General Settings', 'facebook-albums'); ?></h2> 37 <div class="checkbox-group"> 38 <p><label><input type="checkbox" value="on" name="facebookalbum[order]" id="fbalbum_order" <?php checked($options['order'], 'on'); ?>/> <?php _e('Reverse display order.', 'facebook-albums'); ?></label> 39 <span class="note"><?php _e( 'Note: Facebook does not support a "order" attribute for Graph API calls. This simply reverse the order of the photos received from Facebook.','facebook-albums'); ?></span> 40 </p> 41 <p><label><input type="checkbox" value="on" name="facebookalbum[title]" id="fbalbum_title" <?php checked($options['title'], 'on'); ?>/> <?php _e('Display album title.', 'facebook-albums'); ?></label></p> 42 <p><label><input type="checkbox" value="on" name="facebookalbum[photo_title]" id="photo_title" <?php checked($options['photo_title'], 'on'); ?>/><?php _e('Display photo description in Lightbox.', 'facebook-albums'); ?></label></p> 43 </div> 44 <p><label for="fbalbum_size"><?php _e('Thumbnail Size', 'facebook-albums'); ?></label>: 45 <select name="facebookalbum[size]" id="fbalbum_size" value="" class="regular-text"> 46 <option value="8" <?php selected($options['size'], 8) ?>><?php _e('Smaller', 'facebook-albums'); ?></option> 47 <option value="6" <?php selected($options['size'], 6) ?>><?php _e('Small', 'facebook-albums'); ?></option> 48 <option value="5" <?php selected($options['size'], 5) ?>><?php _e('Medium', 'facebook-albums'); ?></option> 49 <option value="4" <?php selected($options['size'], 4) ?>><?php _e('Large', 'facebook-albums'); ?></option> 50 <option value="3" <?php selected($options['size'], 3) ?>><?php _e('Largest', 'facebook-albums'); ?></option> 51 <option value="2" <?php selected($options['size'], 2) ?>><?php _e('Full', 'facebook-albums'); ?></option> 52 </select> 53 </p> 54 <p><label for="fbalbum_cache"><?php _e('Cache Lifetime', 'facebook-albums'); ?></label>: 55 <select name="facebookalbum[cache]" id="fbalbum_cache" value="" class="regular-text"> 56 <option value="1" <?php selected($options['cache'], 1) ?>><?php _e('1 day', 'facebook-albums'); ?></option> 57 <option value="2" <?php selected($options['cache'], 2) ?>><?php _e('2 days', 'facebook-albums'); ?></option> 58 <option value="3" <?php selected($options['cache'], 3) ?>><?php _e('3 days', 'facebook-albums'); ?></option> 59 <option value="4" <?php selected($options['cache'], 4) ?>><?php _e('4 days', 'facebook-albums'); ?></option> 60 <option value="5" <?php selected($options['cache'], 5) ?>><?php _e('5 days', 'facebook-albums'); ?></option> 61 <option value="6" <?php selected($options['cache'], 6) ?>><?php _e('6 days', 'facebook-albums'); ?></option> 62 <option value="7" <?php selected($options['cache'], 7) ?>><?php _e('7 days', 'facebook-albums'); ?></option> 63 </select> 64 </p> 65 <div class="app-settings"> 66 <?php if(!FB_Album::verify_app_information()) : ?> 67 <p><?php _e('If you wish to use <strong>personal albums</strong> you will need to create a Facebook App and enter in the App ID and App Secret below.', 'facebook-albums'); ?></p> 68 <p><label><?php _e('App ID', 'facebook-albums'); ?></label><input type="text" name="facebookalbum[app_id]" value="<?php echo $options['app_id']; ?>" /></p> 69 <p><label><?php _e('App Secret', 'facebook-albums'); ?></label><input type="text" name="facebookalbum[app_secret]" value="<?php echo $options['app_secret']; ?>" /></p> 70 <?php else: 71 // Get User ID 72 $user = FB_Album::$facebook_sdk->getUser(); 73 if ($user) { 74 try { 75 $old_access_token = $options['access_token']; 76 // Proceed knowing you have a logged in user who's authenticated. 77 $user_profile = FB_Album::$facebook_sdk->api('/me'); 78 FB_Album::$facebook_sdk->setExtendedAccessToken(); 79 $options['access_token'] = FB_Album::$facebook_sdk->getAccessToken(); 80 update_option('facebookalbum', $options); 34 <div class="wrap"> 35 <?php screen_icon(); ?> 36 <h2>Facebook Album <?php _e('Options', 'facebook-albums'); ?></h2> 37 <div id="facebook-album-content" class="postbox-container" style=""> 38 <form method="post" action="" name="options-facebookalbum"> 39 <?php wp_nonce_field(basename(__FILE__), 'fbalbum_nonce'); ?> 40 <div class="settings-box"> 41 <h2><?php _e('General Settings', 'facebook-albums'); ?></h2> 42 <div class="checkbox-group"> 43 <p><label><input type="checkbox" value="on" name="facebookalbum[order]" id="fbalbum_order" <?php checked($options['order'], 'on'); ?>/> <?php _e('Reverse display order.', 'facebook-albums'); ?></label> 44 <span class="note"><?php _e( 'Note: Facebook does not support a "order" attribute for Graph API calls. This simply reverse the order of the photos received from Facebook.','facebook-albums'); ?></span> 45 </p> 46 <p><label><input type="checkbox" value="on" name="facebookalbum[title]" id="fbalbum_title" <?php checked($options['title'], 'on'); ?>/> <?php _e('Display album title.', 'facebook-albums'); ?></label></p> 47 <p><label><input type="checkbox" value="on" name="facebookalbum[photo_title]" id="photo_title" <?php checked($options['photo_title'], 'on'); ?>/><?php _e('Display photo description in Lightbox.', 'facebook-albums'); ?></label></p> 48 </div> 49 <p><label for="fbalbum_size"><?php _e('Thumbnail Size', 'facebook-albums'); ?></label>: 50 <select name="facebookalbum[size]" id="fbalbum_size" value="" class="regular-text"> 51 <option value="8" <?php selected($options['size'], 8) ?>><?php _e('Smaller', 'facebook-albums'); ?></option> 52 <option value="6" <?php selected($options['size'], 6) ?>><?php _e('Small', 'facebook-albums'); ?></option> 53 <option value="5" <?php selected($options['size'], 5) ?>><?php _e('Medium', 'facebook-albums'); ?></option> 54 <option value="4" <?php selected($options['size'], 4) ?>><?php _e('Large', 'facebook-albums'); ?></option> 55 <option value="3" <?php selected($options['size'], 3) ?>><?php _e('Largest', 'facebook-albums'); ?></option> 56 <option value="2" <?php selected($options['size'], 2) ?>><?php _e('Full', 'facebook-albums'); ?></option> 57 </select> 58 </p> 59 <p><label for="fbalbum_cache"><?php _e('Cache Lifetime', 'facebook-albums'); ?></label>: 60 <select name="facebookalbum[cache]" id="fbalbum_cache" value="" class="regular-text"> 61 <option value="1" <?php selected($options['cache'], 1) ?>><?php _e('1 hour', 'facebook-albums'); ?></option> 62 <option value="3" <?php selected($options['cache'], 3) ?>><?php _e('3 hours', 'facebook-albums'); ?></option> 63 <option value="6" <?php selected($options['cache'], 6) ?>><?php _e('6 hours', 'facebook-albums'); ?></option> 64 <option value="12" <?php selected($options['cache'], 12) ?>><?php _e('12 hours', 'facebook-albums'); ?></option> 65 <option value="24" <?php selected($options['cache'], 24) ?>><?php _e('1 day', 'facebook-albums'); ?></option> 66 <option value="48" <?php selected($options['cache'], 48) ?>><?php _e('2 days', 'facebook-albums'); ?></option> 67 </select> 68 </p> 69 <div class="app-settings"> 70 <?php if(!FB_Album::verify_app_information()) : ?> 71 <p><?php _e('If you wish to use <strong>personal albums</strong> you will need to create a Facebook App and enter in the App ID and App Secret below.', 'facebook-albums'); ?></p> 72 <p><label><?php _e('App ID', 'facebook-albums'); ?></label><input type="text" name="facebookalbum[app_id]" value="<?php echo $options['app_id']; ?>" /></p> 73 <p><label><?php _e('App Secret', 'facebook-albums'); ?></label><input type="text" name="facebookalbum[app_secret]" value="<?php echo $options['app_secret']; ?>" /></p> 74 <?php else: 75 // Get User ID 76 $user = FB_Album::$facebook_sdk->getUser(); 77 if ($user) { 78 try { 79 $old_access_token = $options['access_token']; 80 // Proceed knowing you have a logged in user who's authenticated. 81 $user_profile = FB_Album::$facebook_sdk->api('/me'); 82 FB_Album::$facebook_sdk->setExtendedAccessToken(); 83 $options['access_token'] = FB_Album::$facebook_sdk->getAccessToken(); 84 update_option('facebookalbum', $options); 81 85 82 } catch (FacebookApiException $e) {83 echo '<div class="error"><p><strong>OAuth Error</strong>Error added to error_log: '.$e.'</p></div>';84 error_log($e);85 $user = null;86 }87 }86 } catch (FacebookApiException $e) { 87 echo '<div class="error"><p><strong>OAuth Error</strong>Error added to error_log: '.$e.'</p></div>'; 88 error_log($e); 89 $user = null; 90 } 91 } 88 92 89 // Login or logout url will be needed depending on current user state.90 $app_link_text = $app_link_url = null;91 if ($user) {92 $app_link_url = FB_Album::$facebook_sdk->getLogoutUrl(array('next' => admin_url()));93 $app_link_text = __("Logout of your app", 'facebook-albums');94 } else {95 $app_link_url = FB_Album::$facebook_sdk->getLoginUrl(array('scope' => 'user_photos'));96 $app_link_text = __('Log into Facebook with your app', 'facebook-albums');97 } ?>98 <input type="hidden" name="facebookalbum[app_id]" value="<?php echo $options['app_id']; ?>" />99 <input type="hidden" name="facebookalbum[app_secret]" value="<?php echo $options['app_secret']; ?>" />100 <input type="hidden" name="facebookalbum[access_token]" value="<?php echo $options['access_token']; ?>" />101 <?php if($user) : ?>102 <div style="float: right; margin: 10px;"><span style="margin: 0 10px;"><?php echo $user_profile['name']; ?></span><img src="https://graph.facebook.com/<?= $user_profile['id'] ?>/picture?type=square" style="vertical-align: middle"/></div>103 <?php endif; ?>104 <ul>105 <li><a href="https://developers.facebook.com/apps/<?php echo $options['app_id']; ?>" target="_blank"><?php _e("View your application's settings.", 'facebook-albums'); ?></a></li>106 <li><a href="<?php echo $app_link_url; ?>"><?php echo $app_link_text; ?></a></li>107 </ul>108 <div style="clear: both;"> </div>109 <p><?php printf(__('Having issues once logged in? Try <a href="?page=facebook-album&reset_application=%S">resetting application data.</a> <em>warning: removes App ID and App Secret</em>'), wp_create_nonce($current_user->data->user_email)); ?></p>110 <p><strong>Notice!</strong> Your extended access token will only last about 2 months. So visit this page every month or so to keep the access token fresh.</p>111 <?php endif; ?>112 </div>113 </div>114 <div class="settings-box">115 <h2>Colorbox <?php _e('Settings', 'facebook-albums'); ?></h2>116 <p><label><input type="checkbox" value="true" name="facebookalbum[colorbox][enabled]" id="fbalbum_order" <?php checked($options['colorbox']['enabled'], 'true'); ?>/> <?php _e('Enable', 'facebook-albums'); ?> Colorbox</label></p>117 <div class="colorbox-options" style="<?php if($options['colorbox']['enabled'] != 'true') echo 'display:none'; ?>">118 <p><label><?php _e('Overlay opacity', 'facebook-albums'); ?><input type="number" min="0.00" max="1.00" name="facebookalbum[colorbox][opacity]" step="0.01" value="<?php echo $options['colorbox']['opacity'] ?>"></label></p>119 <p><label for="transition"><?php _e('Transition Type', 'facebook-albums'); ?></label>:120 <select name="facebookalbum[colorbox][transition]" id="trainsition" value="" class="regular-text">121 <option value="none" <?php selected($options['colorbox']['transition'], 'none') ?>><?php _e('None', 'facebook-albums'); ?></option>122 <option value="elastic" <?php selected($options['colorbox']['transition'], 'elastic') ?>><?php _e('Elastic', 'facebook-albums'); ?></option>123 <option value="fade" <?php selected($options['colorbox']['transition'], 'fade') ?>><?php _e('Fade', 'facebook-albums'); ?></option>124 </select>125 </p>126 </div>127 </div>128 <div class="settings-box">129 <h2><?php _e('Widget Options', 'facebook-albums'); ?></h2>130 <p><?php _e('You have the option to specify a different Facebook Album URL for each page the widget is on.', 'facebook-albums'); ?></p>131 <div style="height: 300px; overflow: auto; padding-left: 10px; border-left: 2px solid #e6e6e6;">132 <?php foreach( get_pages() as $page):133 $existing_page_value = (isset($options['pages'][$page->ID])) ? $options['pages'][$page->ID] : '';134 ?>135 <p><label for="wp_page_<?php echo $page-> ID; ?>"><?php echo $page -> post_title; ?></label><br/><input type="text" size="60" name="facebookalbum[pages][<?php echo $page->ID; ?>]" id="wp_page_<?php echo $page->ID; ?>" value="<?php echo $existing_page_value; ?>"></p>136 <?php endforeach; ?>137 </div>138 </div>139 <p class="submit">140 <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />141 </p>142 </form>143 </div>144 <div id="facebook-album-meta" class="postbox-container" style="width: 261px;">145 <div class="author">146 <div class="by">by</div>147 <div class="name">matt glaman</div>148 <div class="website">149 <a href="http://glamanate.com/?utm_source=fbalbum_options&utm_medium=website&utm_campaign=fbalbum" target="_blank">glamanate.com</a>150 </div>151 </div>152 <div class="donate">153 <p>Please support this plugin's development so more features and capabilities can be added!</p>154 <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CTT2K9UJZJ55S" class="btn" target="_blank">Donate Now</a>155 </div>156 <div class="video">157 <iframe width="420" height="315" src="http://www.youtube.com/embed/ZiNJPg6sv1I?rel=0" frameborder="0" allowfullscreen></iframe>158 <caption>How to use shortcode in Pages or Posts</caption>159 <div style="height:25px;"> </div>160 <iframe width="420" height="315" src="http://www.youtube.com/embed/3p_OZ7qbxk4?rel=0" frameborder="0" allowfullscreen></iframe>161 <caption>How to setup a Facebook app</caption>162 </div>163 <div class="news">164 <h3>Plugin News</h3>165 <?php166 $news_widget = array(167 'link' => 'http://glamanate.com',168 'url' => 'http://glamanate.com/category/facebook-album-news/feed/',169 'title' => 'Plugin News',170 'items' => 3,171 'show_summary' => 0,172 'show_author' => 0,173 'show_date' => 0174 );175 echo '<div class="rss-widget">';176 wp_widget_rss_output( $news_widget );177 echo "</div>";178 ?>179 </div>180 </div>181 </div>93 // Login or logout url will be needed depending on current user state. 94 $app_link_text = $app_link_url = null; 95 if ($user) { 96 $app_link_url = FB_Album::$facebook_sdk->getLogoutUrl(array('next' => admin_url())); 97 $app_link_text = __("Logout of your app", 'facebook-albums'); 98 } else { 99 $app_link_url = FB_Album::$facebook_sdk->getLoginUrl(array('scope' => 'user_photos')); 100 $app_link_text = __('Log into Facebook with your app', 'facebook-albums'); 101 } ?> 102 <input type="hidden" name="facebookalbum[app_id]" value="<?php echo $options['app_id']; ?>" /> 103 <input type="hidden" name="facebookalbum[app_secret]" value="<?php echo $options['app_secret']; ?>" /> 104 <input type="hidden" name="facebookalbum[access_token]" value="<?php echo $options['access_token']; ?>" /> 105 <?php if($user) : ?> 106 <div style="float: right; margin: 10px;"><span style="margin: 0 10px;"><?php echo $user_profile['name']; ?></span><img src="https://graph.facebook.com/<?= $user_profile['id'] ?>/picture?type=square" style="vertical-align: middle"/></div> 107 <?php endif; ?> 108 <ul> 109 <li><a href="https://developers.facebook.com/apps/<?php echo $options['app_id']; ?>" target="_blank"><?php _e("View your application's settings.", 'facebook-albums'); ?></a></li> 110 <li><a href="<?php echo $app_link_url; ?>"><?php echo $app_link_text; ?></a></li> 111 </ul> 112 <div style="clear: both;"> </div> 113 <p><?php printf(__('Having issues once logged in? Try <a href="?page=facebook-album&reset_application=%S">resetting application data.</a> <em>warning: removes App ID and App Secret</em>'), wp_create_nonce($current_user->data->user_email)); ?></p> 114 <p><strong>Notice!</strong> Your extended access token will only last about 2 months. So visit this page every month or so to keep the access token fresh.</p> 115 <?php endif; ?> 116 </div> 117 </div> 118 <div class="settings-box"> 119 <h2>Colorbox <?php _e('Settings', 'facebook-albums'); ?></h2> 120 <p><label><input type="checkbox" value="true" name="facebookalbum[colorbox][enabled]" id="fbalbum_order" <?php checked($options['colorbox']['enabled'], 'true'); ?>/> <?php _e('Enable', 'facebook-albums'); ?> Colorbox</label></p> 121 <div class="colorbox-options" style="<?php if($options['colorbox']['enabled'] != 'true') echo 'display:none'; ?>"> 122 <p><label><?php _e('Overlay opacity', 'facebook-albums'); ?><input type="number" min="0.00" max="1.00" name="facebookalbum[colorbox][opacity]" step="0.01" value="<?php echo $options['colorbox']['opacity'] ?>"></label></p> 123 <p><label for="transition"><?php _e('Transition Type', 'facebook-albums'); ?></label>: 124 <select name="facebookalbum[colorbox][transition]" id="trainsition" value="" class="regular-text"> 125 <option value="none" <?php selected($options['colorbox']['transition'], 'none') ?>><?php _e('None', 'facebook-albums'); ?></option> 126 <option value="elastic" <?php selected($options['colorbox']['transition'], 'elastic') ?>><?php _e('Elastic', 'facebook-albums'); ?></option> 127 <option value="fade" <?php selected($options['colorbox']['transition'], 'fade') ?>><?php _e('Fade', 'facebook-albums'); ?></option> 128 </select> 129 </p> 130 </div> 131 </div> 132 <div class="settings-box"> 133 <h2><?php _e('Widget Options', 'facebook-albums'); ?></h2> 134 <p><?php _e('You have the option to specify a different Facebook Album URL for each page the widget is on.', 'facebook-albums'); ?></p> 135 <div style="height: 300px; overflow: auto; padding-left: 10px; border-left: 2px solid #e6e6e6;"> 136 <?php foreach( get_pages() as $page): 137 $existing_page_value = (isset($options['pages'][$page->ID])) ? $options['pages'][$page->ID] : ''; 138 ?> 139 <p><label for="wp_page_<?php echo $page-> ID; ?>"><?php echo $page -> post_title; ?></label><br/><input type="text" size="60" name="facebookalbum[pages][<?php echo $page->ID; ?>]" id="wp_page_<?php echo $page->ID; ?>" value="<?php echo $existing_page_value; ?>"></p> 140 <?php endforeach; ?> 141 </div> 142 </div> 143 <p class="submit"> 144 <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" /> 145 </p> 146 </form> 147 </div> 148 <div id="facebook-album-meta" class="postbox-container" style="width: 261px;"> 149 <div class="author"> 150 <div class="by">by</div> 151 <div class="name">matt glaman</div> 152 <div class="website"> 153 <a href="http://glamanate.com/?utm_source=fbalbum_options&utm_medium=website&utm_campaign=fbalbum" target="_blank">glamanate.com</a> 154 </div> 155 </div> 156 <div class="donate"> 157 <p>Please support this plugin's development so more features and capabilities can be added!</p> 158 <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CTT2K9UJZJ55S" class="btn" target="_blank">Donate Now</a> 159 </div> 160 <div class="video"> 161 <iframe width="420" height="315" src="http://www.youtube.com/embed/ZiNJPg6sv1I?rel=0" frameborder="0" allowfullscreen></iframe> 162 <caption>How to use shortcode in Pages or Posts</caption> 163 <div style="height:25px;"> </div> 164 <iframe width="420" height="315" src="http://www.youtube.com/embed/3p_OZ7qbxk4?rel=0" frameborder="0" allowfullscreen></iframe> 165 <caption>How to setup a Facebook app</caption> 166 </div> 167 <div class="news"> 168 <h3>Plugin News</h3> 169 <?php 170 $news_widget = array( 171 'link' => 'http://glamanate.com', 172 'url' => 'http://glamanate.com/category/facebook-album-news/feed/', 173 'title' => 'Plugin News', 174 'items' => 3, 175 'show_summary' => 0, 176 'show_author' => 0, 177 'show_date' => 0 178 ); 179 echo '<div class="rss-widget">'; 180 wp_widget_rss_output( $news_widget ); 181 echo "</div>"; 182 ?> 183 </div> 184 </div> 185 </div> -
facebook-albums/trunk/inc/widget.php
r802182 r811684 4 4 * Displays 6 5 5 */ 6 if (!defined('DB_NAME')) { 7 header('HTTP/1.0 403 Forbidden'); 8 die; 9 } 6 10 7 11 add_action( 'widgets_init', create_function( '', 'return register_widget( "FB_Album_Widget" );' ) );
Note: See TracChangeset
for help on using the changeset viewer.