Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Modules_Admin_Bar::should_render()

Returns true only if all of the following are true: – User is logged in.


Description Description

  • Not in WP Admin.
  • The admin bar is showing.
  • PUM Admin bar is not disabled.
  • Current user can edit others posts or manage options.

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Return Return

(bool)


Top ↑

Source Source

File: includes/modules/admin-bar.php

	public static function should_render() {
		$tests = array(
			is_user_logged_in(),
			! is_admin(),
			is_admin_bar_showing(),
			! pum_get_option( 'disabled_admin_bar' ),
			( current_user_can( 'edit_others_posts' ) || current_user_can( 'manage_options' ) ),
		);

		return ! in_array( false, $tests );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.