• Resolved afrmarketing

    (@afrmarketing)


    I want to push an RSS feed that only monitors the history of post and media updates, but I still want the complete history on my dashboard. Is there a way to do that?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Pär Thernström

    (@eskapism)

    Yes, there is a filter called simple_history/rss_feed_args that can be used to modify what’s included in the RSS feed. Using that filter you can modify the query that is sent to the SimpleHistoryLogQuery that fetches the log items.

    Let me know if that’s enough to get you started!

    Thread Starter afrmarketing

    (@afrmarketing)

    Hey thanks for the reply. Unfortunately I’m going to need some more detail on how to accomplish this. I’ve located the filter you’re speaking of in “SimpleHistoryRSSDropin.php”, I just don’t know how to combine the $do_log_us array you’ve laid out in “examples.php” with this RSS args filter.

    Can you please give me an example of what the RSS filter should look like?

    Also that RSS filter is part of a function that’s 131 lines of code, do I copy the entire outputRss function with my filters into my functions.php to get this to work?

    Plugin Author Pär Thernström

    (@eskapism)

    This is the only code you should need. Place this in your functions.php and the RSS should only show post and page updates and media/attachment uploads and changes.

    
    /**
     * Modify Simple History RSS feed to only show
     * updates of posts and pages or uploaded or modified media/attachments.
     */
    add_filter(
        'simple_history/rss_feed_args',
        function ($args) {
            return array_merge(
                $args,
                array(
                    "loggers" => 'SimpleMediaLogger,SimplePostLogger'
                )
            );
        }, 10, 1
    );
    
    Thread Starter afrmarketing

    (@afrmarketing)

    Thank you very much!!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Filter RSS feed only’ is closed to new replies.