Exemplo n.º 1
0
Copyright (C) 2012-2013, Danny van Kooten, hi@dannyvankooten.com

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
if (!defined("ABSPATH")) {
    exit;
}
define("RFBP_VERSION", "1000");
define("RFBP_PLUGIN_DIR", plugin_dir_path(__FILE__));
// define WP_CONTENT_DIR since we're using it..
if (!defined('WP_CONTENT_DIR')) {
    define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
}
require RFBP_PLUGIN_DIR . 'includes/plugin.php';
if (!is_admin()) {
    rfbp_get_class();
} elseif (!defined("DOING_AJAX") || !DOING_AJAX) {
    require RFBP_PLUGIN_DIR . 'includes/class-admin.php';
    new RFBP_Admin();
}
Exemplo n.º 2
0
function getFacebookPost()
{
    $clazz = rfbp_get_class();
    $fbposts = $clazz->get_posts();
    $_posts;
    foreach ($fbposts as $fbpost) {
        if (!empty($fbpost['content'])) {
            $_posts[] = $fbpost;
        }
    }
    return array_slice($_posts, 0, 3);
}
Exemplo n.º 3
0
function get_facebook_posts($num = 10)
{
    $rfbp = rfbp_get_class();
    return $rfbp->get_posts();
}