Plugin Directory

Changeset 1894085


Ignore:
Timestamp:
06/17/2018 09:53:38 AM (8 years ago)
Author:
timwass
Message:

added shortcode to exclude post types

Location:
easy-facebook-feed
Files:
38 added
4 edited

Legend:

Unmodified
Added
Removed
  • easy-facebook-feed/trunk/easy-facebook-feed.php

    r1892383 r1894085  
    44 * Plugin URI: http://shop.stage16.nl
    55 * Description: Easy Facebook Feed shows your Facebook feed in an easy way!
    6  * Version: 3.0.21
     6 * Version: 3.0.22
    77 * Author: timwass
    88 * Text Domain: easy-facebook-feed
  • easy-facebook-feed/trunk/includes/class.eff-admin.php

    r1892383 r1894085  
    263263    {
    264264        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>";
     265        <p class='description'><strong>Recommended:</strong> generate your own access token.</p>";
    266266    }
    267267
  • easy-facebook-feed/trunk/includes/class.eff.php

    r1892383 r1894085  
    3333        $shortcode_atts = shortcode_atts(array(
    3434            'id' => $options['facebook_page_id'],
    35             'limit' => $options['facebook_post_limit']
     35            'limit' => $options['facebook_post_limit'],
     36            'exclude' => ''
    3637        ), $atts);
    3738
     
    4142            return false;
    4243        }
     44
     45        $exclude = explode(',', $shortcode_atts['exclude']);
    4346
    4447        // check if cached version is available
     
    7578
    7679            foreach ($feed->data as $key => $data) {
     80
     81                if(in_array($data->type, $exclude)) {
     82                    continue;
     83                }
     84
    7785                $postTemplate = $this->post->eff_makePost($data, $page);
    7886
  • easy-facebook-feed/trunk/readme.txt

    r1892975 r1894085  
    55Requires at least: 3.0.1
    66Tested up to: 4.9
    7 Stable tag: 3.0.21
    8 Version: 3.0.21
     7Stable tag: 3.0.22
     8Version: 3.0.22
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    105105== Changelog ==
    106106
     107= 3.0.22 =
     108* Added shortcode to exclude post types
     109
    107110= 3.0.21 =
    108111* Generate access token option
Note: See TracChangeset for help on using the changeset viewer.