epl_admin_messages_show: turn the FeedSync admin message on or off

Description #

Easy Property Listings shows a message about the FeedSync Service in the WordPress admin on sites that import listings with the EPL WP All Import add-on or the EPL FeedSync Connector add-on, until the FeedSync Service companion plugin is active. This filter decides whether that message shows.

Return false to hide it on a site, for example a client site you manage. Each user can also dismiss it, but that only hides it for them.


Usage #

add_filter( 'epl_admin_messages_show', 'my_admin_messages_show', 10, 2 );

Parameters #

$show (bool)
True when the EPL WP All Import or EPL FeedSync Connector add-on is active and the FeedSync Service companion plugin isn't.

$message (string)
Which message. Today there is one: feedsync.


Examples #

Hide the FeedSync message:

function my_admin_messages_show( $show, $message ) {
	if ( 'feedsync' === $message ) {
		return false;
	}
	return $show;
}
add_filter( 'epl_admin_messages_show', 'my_admin_messages_show', 10, 2 );

Or hide all EPL admin messages:

add_filter( 'epl_admin_messages_show', '__return_false' );

Notes #

  • The message only shows to users who can edit posts.
  • The FeedSync Service row on the Easy Property Listings > Add Ons page is not a message: it shows on every site and this filter doesn't hide it.
  • EPL checks once per page load, when the admin styles load. Add the filter in a plugin or your theme's functions.php, not later.

Source #

lib/includes/admin/class-epl-admin-messages.php, in EPL_Admin_Messages::should_show(). Since 3.6.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.