Changeset 3105924
- Timestamp:
- 06/22/2024 07:06:42 AM (19 months ago)
- Location:
- social-page-metadata
- Files:
-
- 6 edited
- 1 copied
-
tags/1.1.4 (copied) (copied from social-page-metadata/trunk)
-
tags/1.1.4/model/facebook-rest-api.php (modified) (2 diffs)
-
tags/1.1.4/readme.txt (modified) (2 diffs)
-
tags/1.1.4/social-plugin-metadata.php (modified) (4 diffs)
-
trunk/model/facebook-rest-api.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/social-plugin-metadata.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
social-page-metadata/tags/1.1.4/model/facebook-rest-api.php
r2649162 r3105924 5 5 abstract class FacebookRestApi 6 6 { 7 private $graphUrl = 'https://graph.facebook.com/'; 8 9 public $facebookUrl = 'https://facebook.com/'; 10 7 11 abstract public function getAppID(); 8 12 abstract public function getAppSecret(); … … 122 126 public function fbGraphRequest($url, $doPost = false) 123 127 { 124 $path = 'https://graph.facebook.com/';125 126 128 if ($doPost) { 127 $resp = wp_remote_post($ path. $url);129 $resp = wp_remote_post($this->graphUrl . $url); 128 130 } else { 129 $resp = wp_remote_get($ path. $url);131 $resp = wp_remote_get($this->graphUrl . $url); 130 132 } 131 133 -
social-page-metadata/tags/1.1.4/readme.txt
r3105766 r3105924 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 Stable tag: 1.1. 37 Stable tag: 1.1.4 8 8 License: GPLv3 9 9 … … 43 43 [social-about page_id="..." empty_message=""] 44 44 [social-lastpost page_id="..." limit="..." max_age="..." empty_message=""] 45 [social-events page_id="..." filter="..." category="..." link=1 limit=3 upcoming=1 date_format(_start|_end)="..."] 45 46 46 47 == Screenshots == -
social-page-metadata/tags/1.1.4/social-plugin-metadata.php
r3105766 r3105924 8 8 * Plugin Name: Social Plugin - Metadata 9 9 * Description: Used to display Facebook related page meta information as widget or shortcode (E.g. Business hours, About Us, Last Post) 10 * Version: 1.1. 310 * Version: 1.1.4 11 11 * Author: ole1986 12 12 * License: MIT <https://raw.githubusercontent.com/Cloud-86/social-plugin-metadata/master/LICENSE> … … 196 196 break; 197 197 case "Events": 198 $result = $this->fbGraphRequest($currentPage['id'] . '/events?fields= category,name,start_time,end_time'. ($options['upcoming'] ? '&since=' . time() : '') . ($options['limit'] ? '&limit=' . intval($options['limit']) : '') . '&access_token=' . $currentPage['access_token']);198 $result = $this->fbGraphRequest($currentPage['id'] . '/events?fields=id,category,name,start_time,end_time'. ($options['upcoming'] ? '&since=' . time() : '') . ($options['limit'] ? '&limit=' . intval($options['limit']) : '') . '&access_token=' . $currentPage['access_token']); 199 199 break; 200 200 } … … 424 424 ?> 425 425 <div class="social-plugin-metadata-event"> 426 <div class="social-plugin-metadata-event-title"><?php echo $event['name'] ?></div> 426 <div class="social-plugin-metadata-event-title"> 427 <?php if (!empty($options['link'])) : ?> 428 <a href="<?php echo $this->facebookUrl . 'events/' . $event['id'] ?>" target="_blank"> 429 <?php endif ?> 430 <?php echo $event['name'] ?> 431 <?php if (!empty($options['link'])) : ?> 432 </a> 433 <?php endif ?> 434 </div> 427 435 <div class="social-plugin-metadata-event-dates"> 428 436 <span><?php echo $startFmt ?></span> … … 580 588 <li>[social-about page_id="..." empty_message=""]</li> 581 589 <li>[social-lastpost page_id="..." limit="..." max_age="..." empty_message=""]</li> 590 <li>[social-events page_id="..." filter="..." category="..." link=1 limit=3 upcoming=1 date_format(_start|_end)="..."]</li> 582 591 </ul> 583 592 </div> -
social-page-metadata/trunk/model/facebook-rest-api.php
r2649162 r3105924 5 5 abstract class FacebookRestApi 6 6 { 7 private $graphUrl = 'https://graph.facebook.com/'; 8 9 public $facebookUrl = 'https://facebook.com/'; 10 7 11 abstract public function getAppID(); 8 12 abstract public function getAppSecret(); … … 122 126 public function fbGraphRequest($url, $doPost = false) 123 127 { 124 $path = 'https://graph.facebook.com/';125 126 128 if ($doPost) { 127 $resp = wp_remote_post($ path. $url);129 $resp = wp_remote_post($this->graphUrl . $url); 128 130 } else { 129 $resp = wp_remote_get($ path. $url);131 $resp = wp_remote_get($this->graphUrl . $url); 130 132 } 131 133 -
social-page-metadata/trunk/readme.txt
r3105766 r3105924 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 Stable tag: 1.1. 37 Stable tag: 1.1.4 8 8 License: GPLv3 9 9 … … 43 43 [social-about page_id="..." empty_message=""] 44 44 [social-lastpost page_id="..." limit="..." max_age="..." empty_message=""] 45 [social-events page_id="..." filter="..." category="..." link=1 limit=3 upcoming=1 date_format(_start|_end)="..."] 45 46 46 47 == Screenshots == -
social-page-metadata/trunk/social-plugin-metadata.php
r3105766 r3105924 8 8 * Plugin Name: Social Plugin - Metadata 9 9 * Description: Used to display Facebook related page meta information as widget or shortcode (E.g. Business hours, About Us, Last Post) 10 * Version: 1.1. 310 * Version: 1.1.4 11 11 * Author: ole1986 12 12 * License: MIT <https://raw.githubusercontent.com/Cloud-86/social-plugin-metadata/master/LICENSE> … … 196 196 break; 197 197 case "Events": 198 $result = $this->fbGraphRequest($currentPage['id'] . '/events?fields= category,name,start_time,end_time'. ($options['upcoming'] ? '&since=' . time() : '') . ($options['limit'] ? '&limit=' . intval($options['limit']) : '') . '&access_token=' . $currentPage['access_token']);198 $result = $this->fbGraphRequest($currentPage['id'] . '/events?fields=id,category,name,start_time,end_time'. ($options['upcoming'] ? '&since=' . time() : '') . ($options['limit'] ? '&limit=' . intval($options['limit']) : '') . '&access_token=' . $currentPage['access_token']); 199 199 break; 200 200 } … … 424 424 ?> 425 425 <div class="social-plugin-metadata-event"> 426 <div class="social-plugin-metadata-event-title"><?php echo $event['name'] ?></div> 426 <div class="social-plugin-metadata-event-title"> 427 <?php if (!empty($options['link'])) : ?> 428 <a href="<?php echo $this->facebookUrl . 'events/' . $event['id'] ?>" target="_blank"> 429 <?php endif ?> 430 <?php echo $event['name'] ?> 431 <?php if (!empty($options['link'])) : ?> 432 </a> 433 <?php endif ?> 434 </div> 427 435 <div class="social-plugin-metadata-event-dates"> 428 436 <span><?php echo $startFmt ?></span> … … 580 588 <li>[social-about page_id="..." empty_message=""]</li> 581 589 <li>[social-lastpost page_id="..." limit="..." max_age="..." empty_message=""]</li> 590 <li>[social-events page_id="..." filter="..." category="..." link=1 limit=3 upcoming=1 date_format(_start|_end)="..."]</li> 582 591 </ul> 583 592 </div>
Note: See TracChangeset
for help on using the changeset viewer.