/** * Enable Private Site * @since 0.1.0 */ public function settings_field_rss_feed_error_msg() { ?> <textarea name="<?php echo esc_attr($this->option_name . '[rss_error]'); ?> " class="regular-text"><?php echo esc_textarea(fx_private_site_sanitize_rss_error(fx_private_site_get_option('rss_error', _x('You must be logged into the site to view this content.', 'default RSS Feed error message', 'fx-private-site')))); ?> </textarea> <p class="description"><?php _ex('If site is set to private, this error message will replace RSS feed content.', 'settings page', 'fx-private-site'); ?> </p> <?php }
/** * Blocks feed items if the user has selected the private feed feature. * * @since 0.1.0 * @author Justin Tadlock <*****@*****.**> * @copyright Copyright (c) 2009 - 2016, Justin Tadlock */ function fx_private_site_feed_content($content) { if (true === fx_private_site_get_option('enable', false)) { return fx_private_site_get_option('rss_error', _x('You must be logged into the site to view this content.', 'default RSS Feed error message', 'fx-private-site')); } return $content; }