Plugin Directory

Changeset 3105924


Ignore:
Timestamp:
06/22/2024 07:06:42 AM (19 months ago)
Author:
ole1986
Message:

Update to version 1.1.4 from GitHub

Location:
social-page-metadata
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • social-page-metadata/tags/1.1.4/model/facebook-rest-api.php

    r2649162 r3105924  
    55abstract class FacebookRestApi
    66{
     7    private $graphUrl = 'https://graph.facebook.com/';
     8
     9    public $facebookUrl = 'https://facebook.com/';
     10
    711    abstract public function getAppID();
    812    abstract public function getAppSecret();
     
    122126    public function fbGraphRequest($url, $doPost = false)
    123127    {
    124         $path = 'https://graph.facebook.com/';
    125 
    126128        if ($doPost) {
    127             $resp = wp_remote_post($path . $url);
     129            $resp = wp_remote_post($this->graphUrl . $url);
    128130        } else {
    129             $resp = wp_remote_get($path . $url);
     131            $resp = wp_remote_get($this->graphUrl . $url);
    130132        }
    131133
  • social-page-metadata/tags/1.1.4/readme.txt

    r3105766 r3105924  
    55Tested up to: 6.5
    66Requires PHP: 7.0
    7 Stable tag: 1.1.3
     7Stable tag: 1.1.4
    88License: GPLv3
    99
     
    4343[social-about page_id="..." empty_message=""]
    4444[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)="..."]
    4546
    4647== Screenshots ==
  • social-page-metadata/tags/1.1.4/social-plugin-metadata.php

    r3105766 r3105924  
    88 * Plugin Name: Social Plugin - Metadata
    99 * 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.3
     10 * Version: 1.1.4
    1111 * Author:      ole1986
    1212 * License: MIT <https://raw.githubusercontent.com/Cloud-86/social-plugin-metadata/master/LICENSE>
     
    196196            break;
    197197        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']);
    199199            break;
    200200        }
     
    424424            ?>
    425425            <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>
    427435                <div class="social-plugin-metadata-event-dates">
    428436                    <span><?php echo $startFmt ?></span>
     
    580588                            <li>[social-about page_id="..." empty_message=""]</li>
    581589                            <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>
    582591                        </ul>
    583592                    </div>
  • social-page-metadata/trunk/model/facebook-rest-api.php

    r2649162 r3105924  
    55abstract class FacebookRestApi
    66{
     7    private $graphUrl = 'https://graph.facebook.com/';
     8
     9    public $facebookUrl = 'https://facebook.com/';
     10
    711    abstract public function getAppID();
    812    abstract public function getAppSecret();
     
    122126    public function fbGraphRequest($url, $doPost = false)
    123127    {
    124         $path = 'https://graph.facebook.com/';
    125 
    126128        if ($doPost) {
    127             $resp = wp_remote_post($path . $url);
     129            $resp = wp_remote_post($this->graphUrl . $url);
    128130        } else {
    129             $resp = wp_remote_get($path . $url);
     131            $resp = wp_remote_get($this->graphUrl . $url);
    130132        }
    131133
  • social-page-metadata/trunk/readme.txt

    r3105766 r3105924  
    55Tested up to: 6.5
    66Requires PHP: 7.0
    7 Stable tag: 1.1.3
     7Stable tag: 1.1.4
    88License: GPLv3
    99
     
    4343[social-about page_id="..." empty_message=""]
    4444[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)="..."]
    4546
    4647== Screenshots ==
  • social-page-metadata/trunk/social-plugin-metadata.php

    r3105766 r3105924  
    88 * Plugin Name: Social Plugin - Metadata
    99 * 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.3
     10 * Version: 1.1.4
    1111 * Author:      ole1986
    1212 * License: MIT <https://raw.githubusercontent.com/Cloud-86/social-plugin-metadata/master/LICENSE>
     
    196196            break;
    197197        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']);
    199199            break;
    200200        }
     
    424424            ?>
    425425            <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>
    427435                <div class="social-plugin-metadata-event-dates">
    428436                    <span><?php echo $startFmt ?></span>
     
    580588                            <li>[social-about page_id="..." empty_message=""]</li>
    581589                            <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>
    582591                        </ul>
    583592                    </div>
Note: See TracChangeset for help on using the changeset viewer.