Changeset 1892383
- Timestamp:
- 06/13/2018 06:58:52 PM (8 years ago)
- Location:
- easy-facebook-feed
- Files:
-
- 38 added
- 5 edited
-
tags/3.0.21 (added)
-
tags/3.0.21/css (added)
-
tags/3.0.21/css/eff_style.css (added)
-
tags/3.0.21/css/eff_style.css.map (added)
-
tags/3.0.21/easy-facebook-feed.php (added)
-
tags/3.0.21/includes (added)
-
tags/3.0.21/includes/class.eff-admin.php (added)
-
tags/3.0.21/includes/class.eff-connect.php (added)
-
tags/3.0.21/includes/class.eff-error.php (added)
-
tags/3.0.21/includes/class.eff-language.php (added)
-
tags/3.0.21/includes/class.eff-post.php (added)
-
tags/3.0.21/includes/class.eff-server-requirements.php (added)
-
tags/3.0.21/includes/class.eff-template.php (added)
-
tags/3.0.21/includes/class.eff-widget.php (added)
-
tags/3.0.21/includes/class.eff.php (added)
-
tags/3.0.21/languages (added)
-
tags/3.0.21/languages/easy-facebook-feed-cs_CZ.po (added)
-
tags/3.0.21/languages/easy-facebook-feed-da_DK.mo (added)
-
tags/3.0.21/languages/easy-facebook-feed-da_DK.po (added)
-
tags/3.0.21/languages/easy-facebook-feed-de_DE.mo (added)
-
tags/3.0.21/languages/easy-facebook-feed-de_DE.po (added)
-
tags/3.0.21/languages/easy-facebook-feed-nl_NL.mo (added)
-
tags/3.0.21/languages/easy-facebook-feed-nl_NL.po (added)
-
tags/3.0.21/languages/easy-facebook-feed.pot (added)
-
tags/3.0.21/readme.txt (added)
-
tags/3.0.21/scss (added)
-
tags/3.0.21/scss/eff_style.scss (added)
-
tags/3.0.21/templates (added)
-
tags/3.0.21/templates/eff-error.html (added)
-
tags/3.0.21/templates/eff-event-cover.html (added)
-
tags/3.0.21/templates/eff-event-ticket-link.html (added)
-
tags/3.0.21/templates/eff-event.html (added)
-
tags/3.0.21/templates/eff-link-picture.html (added)
-
tags/3.0.21/templates/eff-link.html (added)
-
tags/3.0.21/templates/eff-message.html (added)
-
tags/3.0.21/templates/eff-photo.html (added)
-
tags/3.0.21/templates/eff-post.html (added)
-
tags/3.0.21/templates/eff-video.html (added)
-
trunk/easy-facebook-feed.php (modified) (1 diff)
-
trunk/includes/class.eff-admin.php (modified) (5 diffs)
-
trunk/includes/class.eff-connect.php (modified) (2 diffs)
-
trunk/includes/class.eff.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-facebook-feed/trunk/easy-facebook-feed.php
r1888357 r1892383 4 4 * Plugin URI: http://shop.stage16.nl 5 5 * Description: Easy Facebook Feed shows your Facebook feed in an easy way! 6 * Version: 3.0.2 06 * Version: 3.0.21 7 7 * Author: timwass 8 8 * Text Domain: easy-facebook-feed -
easy-facebook-feed/trunk/includes/class.eff-admin.php
r1888357 r1892383 130 130 131 131 add_settings_field( 132 'get_access_token', // ID 133 __("Generate Access Token", 'easy-facebook-feed'), // Title 134 array($this, 'get_access_token'), // Callback 135 'my-setting-admin', // Page 136 'setting_section_id' // Section 137 ); 138 139 add_settings_field( 132 140 'facebook_page_id', // ID 133 141 __("Facebook page ID", 'easy-facebook-feed'), // Title … … 192 200 * 193 201 * @param array $input Contains all settings fields as array keys 202 * @return array 194 203 */ 195 204 public function sanitize($input) … … 249 258 250 259 /** 260 * Print the Section text 261 */ 262 public function get_access_token() 263 { 264 print "<a class='button button-primary' href='https://www.facebook.com/dialog/oauth?scope=manage_pages&client_id=1123168491105924&redirect_uri=https://www.slickremix.com/facebook-token/&state=" . admin_url('admin.php?page=easy-facebook-feed') . "'>Login</a> 265 <p class='description'>Login to Facebook and get your access token.</p>"; 266 } 267 268 /** 251 269 * Get the settings option array and print one of its values 252 270 */ … … 277 295 public function enable_accesstoken() 278 296 { 279 $checked = ($this->options['enable_accesstoken'] === "1") ? 'checked' : ''; 297 if(isset($_GET['final_response']) && $_GET['final_response'] === "true") { 298 $checked = 'checked'; 299 } else { 300 $checked = ($this->options['enable_accesstoken'] === "1") ? 'checked' : ''; 301 } 302 280 303 echo '<input type="checkbox" name="eff_options[enable_accesstoken]" id="enable_accesstoken" value="1" '.$checked.' />'; 281 304 } … … 286 309 public function accesstoken_input() 287 310 { 288 printf( 289 '<input type="text" name="eff_options[accesstoken]" id="accesstoken" value="%s" />', 290 isset($this->options['accesstoken']) ? esc_attr($this->options['accesstoken']) : '' 291 ); 311 if(isset($_GET['final_response']) && $_GET['final_response'] === "true") { 312 print '<input type="text" name="eff_options[accesstoken]" id="accesstoken" value="'.$_GET['access_token'].'" /> 313 <p class="description" style="color: green; font-weight: bold;">Access Token set</p>'; 314 } else { 315 printf( 316 '<input type="text" name="eff_options[accesstoken]" id="accesstoken" value="%s" />', 317 isset($this->options['accesstoken']) ? esc_attr($this->options['accesstoken']) : '' 318 ); 319 } 292 320 } 293 321 -
easy-facebook-feed/trunk/includes/class.eff-connect.php
r1888357 r1892383 14 14 } 15 15 16 /** 17 * @return string 18 */ 16 19 private function getAccessToken() 17 20 { … … 23 26 24 27 return $token; 28 } 29 30 /** 31 * @param $token 32 * @return string 33 */ 34 public function setAccessToken($token) 35 { 36 $this->accessToken = $token; 37 38 return $this->accessToken; 25 39 } 26 40 -
easy-facebook-feed/trunk/includes/class.eff.php
r1782913 r1892383 33 33 $shortcode_atts = shortcode_atts(array( 34 34 'id' => $options['facebook_page_id'], 35 'limit' => $options['facebook_post_limit'] ,35 'limit' => $options['facebook_post_limit'] 36 36 ), $atts); 37 37 … … 54 54 foreach ($shortcode_atts['id'] as $id) { 55 55 $con = new EffConnect(); 56 57 if(isset($atts['access_token'])) { 58 $con->setAccessToken($atts['access_token']); 59 } 60 56 61 $feed = $con->eff_get_page_feed($id, $shortcode_atts['limit']); 57 62 $page = $con->eff_get_page($id); -
easy-facebook-feed/trunk/readme.txt
r1888357 r1892383 5 5 Requires at least: 3.0.1 6 6 Tested up to: 4.9 7 Stable tag: 3.0.2 08 Version: 3.0.2 07 Stable tag: 3.0.21 8 Version: 3.0.21 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 87 87 == Changelog == 88 88 89 = 3.0.21 = 90 * Generate access token option 91 89 92 = 3.0.20 = 90 93 * Added option to add your own access token
Note: See TracChangeset
for help on using the changeset viewer.