Пример #1
0
function fetch_rss_callback()
{
    $post_options = get_option('rss_post_options');
    if ($post_options['active'] == 1) {
        wp_rss_multi_importer_post();
        echo '<h3>The most recent feeds have been put into posts.</h3>';
    } else {
        echo '<h3>Nothing was done because you have not activated this service.</h3>';
    }
    die;
}
Пример #2
0
function fetch_rss_callback()
{
    $post_options = get_option('rss_post_options');
    if ($post_options['active'] == 1) {
        $result = wp_rss_multi_importer_post();
        if ($result === 3) {
            echo '<h3>There was a problem with fetching feeds.  This is likely due to a settings problem, invalid feeds, or no items in the feed database.  Update the database now by clicking the green button below.</h3>';
        } elseif ($result === 4) {
            echo '<h3>There were no new feed items to add.</h3>';
        } else {
            echo '<h3>The most recent valid feeds have been put into posts.</h3>';
            echo '<p>To check if any feeds are currently not working, click on the Diagnostics tab and then Click to Check All Feeds Now</p>';
        }
    } else {
        echo '<h3>Nothing was done because you have not activated this service.</h3>';
    }
    die;
}
Пример #3
0
function fetch_feeds_for_id()
{
    $post_id = $_POST["pid"];
    $rssmi_global_options = get_option('rssmi_global_options');
    $max = isset($rssmi_global_options['single_feed_max']) ? $rssmi_global_options['single_feed_max'] : 20;
    if (isset($post_id)) {
        wp_rss_multi_importer_post($post_id, $catID = NULL);
        rssmi_fetch_feed_items($post_id, $max);
        echo "Most recent feed items have been imported";
    }
    die;
}