Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > members > > inc > >
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
class-cap-group.php | File | 2592 bytes | November 30 2024 06:41:08. | |
class-capability.php | File | 1407 bytes | November 30 2024 06:41:08. | |
class-registry.php | File | 2500 bytes | November 30 2024 06:41:08. | |
class-role-group.php | File | 2065 bytes | November 30 2024 06:41:08. | |
class-role.php | File | 3810 bytes | November 30 2024 06:41:08. | |
class-widget-login.php | File | 12414 bytes | November 30 2024 06:41:08. | |
class-widget-users.php | File | 11607 bytes | November 30 2024 06:41:08. | |
functions-admin-bar.php | File | 1048 bytes | November 30 2024 06:41:08. | |
functions-cap-groups.php | File | 7404 bytes | November 30 2024 06:41:08. | |
functions-capabilities.php | File | 18038 bytes | November 30 2024 06:41:08. | |
functions-content-permissions.php | File | 10136 bytes | December 12 2024 21:24:26. | |
functions-deprecated.php | File | 10829 bytes | November 30 2024 06:41:08. | |
functions-options.php | File | 3741 bytes | December 10 2024 22:11:14. | |
functions-private-site.php | File | 6648 bytes | November 30 2024 06:41:08. | |
functions-role-groups.php | File | 2635 bytes | November 30 2024 06:41:08. | |
functions-roles.php | File | 10516 bytes | November 30 2024 06:41:08. | |
functions-shortcodes.php | File | 10369 bytes | May 21 2025 02:04:48. | |
functions-users.php | File | 3865 bytes | November 30 2024 06:41:08. | |
functions-widgets.php | File | 986 bytes | November 30 2024 06:41:08. | |
functions.php | File | 930 bytes | November 30 2024 06:41:08. | |
template.php | File | 5161 bytes | November 30 2024 06:41:08. |
<?php /** * Handles the private site and private feed features of the plugin. If private site is * selected in the plugin settings, the plugin will redirect all non-logged-in users to the * login page. If private feed is selected, all content is blocked from feeds from the site. * * @package Members * @subpackage Includes * @author The MemberPress Team * @copyright Copyright (c) 2009 - 2018, The MemberPress Team * @link https://members-plugin.com/ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ # Redirects users to the login page. add_action( 'template_redirect', 'members_please_log_in', 0 ); # Disable content in feeds if the feed should be private. add_filter( 'the_content_feed', 'members_private_feed', 95 ); add_filter( 'the_excerpt_rss', 'members_private_feed', 95 ); add_filter( 'comment_text_rss', 'members_private_feed', 95 ); # Filters for the feed error message. if ( isset( $GLOBALS['wp_embed'] ) && $GLOBALS['wp_embed'] instanceof \WP_Embed ) { add_filter( 'members_feed_error_message', array( $GLOBALS['wp_embed'], 'run_shortcode' ), 5 ); add_filter( 'members_feed_error_message', array( $GLOBALS['wp_embed'], 'autoembed' ), 5 ); } add_filter( 'members_feed_error_message', 'wptexturize', 10 ); add_filter( 'members_feed_error_message', 'convert_smilies', 15 ); add_filter( 'members_feed_error_message', 'convert_chars', 20 ); add_filter( 'members_feed_error_message', 'wpautop', 25 ); add_filter( 'members_feed_error_message', 'do_shortcode', 30 ); add_filter( 'members_feed_error_message', 'shortcode_unautop', 35 ); # Authenticate when accessing the REST API. add_filter( 'rest_authentication_errors', 'members_private_rest_api', 95 ); # Filter protected posts from being returned in the REST API. add_filter( 'posts_results', 'members_filter_protected_posts_for_rest', 10, 2 ); /** * Conditional tag to see if we have a private blog. * * @since 1.0.0 * @access public * @return bool */ function members_is_private_blog() { return apply_filters( 'members_is_private_blog', members_get_setting( 'private_blog' ) ); } /** * Conditional tag to see if we have a private feed. * * @since 1.0.0 * @access public * @return bool */ function members_is_private_feed() { return apply_filters( 'members_is_private_feed', members_get_setting( 'private_feed' ) ); } /** * Conditional tag to see if we have a private REST API * * @since 2.0.0 * @access public * @return bool */ function members_is_private_rest_api() { return apply_filters( 'members_is_private_rest_api', members_get_setting( 'private_rest_api' ) ); } /** * Redirects users that are not logged in to the 'wp-login.php' page. * * @since 0.1.0 * @access public * @return void */ function members_please_log_in() { // If private blog is not enabled, bail. if ( ! members_is_private_blog() ) return; // If this is a multisite instance and the user is logged into the network. if ( is_multisite() && is_user_logged_in() && ! is_user_member_of_blog() && ! is_super_admin() ) { members_ms_private_blog_die(); } // Check if the private blog feature is active and if the user is not logged in. if ( ! is_user_logged_in() && members_is_private_page() ) { auth_redirect(); exit; } } /** * Function for determining whether a page should be public even though we're in private * site mode. Plugin devs can filter this to make specific pages public. * * @since 2.0.0 * @access public * @return bool */ function members_is_private_page() { $is_private = true; if ( function_exists( 'bp_is_current_component' ) && ( bp_is_current_component( 'register' ) || bp_is_current_component( 'activate' ) ) ) $is_private = false; // WooCommerce support. if ( class_exists( 'WooCommerce' ) ) { $page_id = get_option( 'woocommerce_myaccount_page_id' ); if ( $page_id && is_page( $page_id ) ) $is_private = false; } return apply_filters( 'members_is_private_page', $is_private ); } /** * Blocks feed items if the user has selected the private feed feature. * * @since 0.2.0 * @access public * @param string $content * @return string */ function members_private_feed( $content ) { return members_is_private_feed() ? members_get_private_feed_message() : $content; } /** * Returns the private feed error message. * * @since 1.0.0 * @access public * @return string */ function members_get_private_feed_message() { return apply_filters( 'members_feed_error_message', members_get_setting( 'private_feed_error' ) ); } /** * Returns an error if the REST API is accessed by an unauthenticated user. * * @link https://developer.wordpress.org/rest-api/using-the-rest-api/frequently-asked-questions/#require-authentication-for-all-requests * @since 2.0.0 * @access public * @param object $result * @return object */ function members_private_rest_api( $result ) { if ( empty( $result ) && members_is_private_rest_api() && ! is_user_logged_in() ) { return new WP_Error( 'rest_not_logged_in', esc_html( apply_filters( 'members_rest_api_error_message', __( 'You are not currently logged in.', 'members' ) ) ), array( 'status' => 401 ) ); } return $result; } /** * Outputs an error message if a user attempts to access a site that they do not have * access to on multisite. * * @since 2.0.0 * @access public * @return void */ function members_ms_private_blog_die() { $blogs = get_blogs_of_user( get_current_user_id() ); $blogname = get_bloginfo( 'name' ); $message = __( 'You do not currently have access to the "%s" site. If you believe you should have access, please contact your network administrator.', 'members' ); if ( empty( $blogs ) ) wp_die( sprintf( $message, $blogname ), 403 ); $output = '<p>' . sprintf( $message, $blogname ) . '</p>'; $output .= sprintf( '<p>%s</p>', __( 'If you reached this page by accident and meant to visit one of your own sites, try one of the following links.', 'members' ) ); $output .= '<ul>'; foreach ( $blogs as $blog ) $output .= sprintf( '<li><a href="%s">%s</a></li>', esc_url( get_home_url( $blog->userblog_id ) ), esc_html( $blog->blogname ) ); $output .= '</ul>'; wp_die( $output, 403 ); }
SILENT KILLER Tool