PluginProbe
Membership Plugin – Kadence Memberships / 2.1
Membership Plugin – Kadence Memberships v2.1
4.0.3 4.0.2 4.0.1 trunk 1.1 1.2 1.2.1 1.2.2 2.0 2.0.2 2.0.3 2.0.4 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.2.10 2.2.2 2.2.3 2.2.4 2.2.5 2.2.7 2.2.8 All 72 releases
restrict-content / includes / feed-functions.php

feed-functions.php in Membership Plugin – Kadence Memberships 2.1, at includes/feed-functions.php

27 lines 572 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*******************************************
4 * Restrict Content Feed Functions
5 *******************************************/
6
7 function rcCheckFeed()
8 {
9 add_filter('the_content', 'rcIsFeed');
10 }
11 add_action('rss_head', 'rcCheckFeed');
12
13 function rcIsFeed($content)
14 {
15 $custom_meta = get_post_custom($post->ID);
16 $rcUserLevel = $custom_meta['rcUserLevel'][0];
17 $rcFeedHide = $custom_meta['rcFeedHide'][0];
18 if (is_feed && $rcFeedHide == 'on')
19 {
20 echo 'This content is restricted to ' . $rcUserLevel . 's';
21 }
22 else
23 {
24 return $content;
25 }
26
27 }