403Webshell
Server IP : 172.67.147.195  /  Your IP : 216.73.216.142
Web Server : Apache/2
System : Linux hosting8537.lvs 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : mienphi ( 1014)
PHP Version : 8.2.14
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mienphi/public_html/wp-content/plugins/buddypress/bp-messages/screens/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mienphi/public_html/wp-content/plugins/buddypress/bp-messages/screens/view.php
<?php
/**
 * Messages: Conversation thread screen handler.
 *
 * @package BuddyPress
 * @subpackage MessageScreens
 * @since 3.0.0
 */

/**
 * Load an individual conversation screen.
 *
 * @since 1.0.0
 */
function messages_screen_conversation() {

	// Bail if not viewing a single message.
	if ( ! bp_is_messages_component() || ! bp_is_current_action( 'view' ) ) {
		return;
	}

	$thread_id = (int) bp_action_variable( 0 );

	if ( empty( $thread_id ) || ! messages_is_valid_thread( $thread_id ) ) {
		if ( is_user_logged_in() ) {
			bp_core_add_message( __( 'The conversation you tried to access is no longer available', 'buddypress' ), 'error' );
		}

		bp_core_redirect(
			bp_loggedin_user_url( bp_members_get_path_chunks( array( bp_get_messages_slug() ) ) )
		);
	}

	// No access.
	if ( ( ! messages_check_thread_access( $thread_id ) || ! bp_is_my_profile() ) && ! bp_current_user_can( 'bp_moderate' ) ) {
		// If not logged in, prompt for login.
		if ( ! is_user_logged_in() ) {
			bp_core_no_access();
			return;

		// Redirect away.
		} else {
			bp_core_add_message( __( 'You do not have access to that conversation.', 'buddypress' ), 'error' );

			bp_core_redirect(
				bp_loggedin_user_url( bp_members_get_path_chunks( array( bp_get_messages_slug() ) ) )
			);
		}
	}

	// Load up BuddyPress one time.
	$bp = buddypress();

	// Decrease the unread count in the nav before it's rendered.
	$count = bp_get_total_unread_messages_count();
	$class = ( 0 === $count ) ? 'no-count' : 'count';

	/* translators: 1: class name. 2: number of messages */
	$nav_name = sprintf( __( 'Messages <span class="%1$s">%2$s</span>', 'buddypress' ), esc_attr( $class ), bp_core_number_format( $count ) );

	// Edit the Navigation name.
	$bp->members->nav->edit_nav(
		array(
			'name' => $nav_name,
		),
		$bp->messages->slug
	);

	/**
	 * Fires right before the loading of the Messages view screen template file.
	 *
	 * @since 1.7.0
	 */
	do_action( 'messages_screen_conversation' );

	$templates = array(
		/**
		 * Filters the template to load for the Messages view screen.
		 *
		 * @since 1.0.0
		 *
		 * @param string $template Path to the messages template to load.
		 */
		apply_filters( 'messages_template_view_message', 'members/single/home' ),
		'members/single/index',
	);

	bp_core_load_template( $templates );
}
add_action( 'bp_screens', 'messages_screen_conversation' );

Youez - 2016 - github.com/yon3zu
LinuXploit