LLMS_Admin_Notices_Core::sidebar_support()

Check theme support for LifterLMS Sidebars


Return Return

(void)


Top ↑

Source Source

File: includes/admin/class.llms.admin.notices.core.php

	 * @return void
	 */
	public static function media_protection() {
		$id = 'using-nginx';
		if (
			apply_filters(
				'llms_admin_notice_using_nginx',
				( ! empty( $GLOBALS['is_nginx'] && $GLOBALS['is_nginx'] ) )
				||
				( function_exists( 'is_wpe' ) && is_wpe() )
			) ) {
			$html = sprintf(
				/* translators: 1. opening link tag; 2. closing link tag */
				__( 'For the best protection for your media files, you should use this doc to add this %1$sNGINX redirect rule%2$s.', 'lifterlms' ),
				'<a href="https://lifterlms.com/docs/protected-media-files-on-nginx/" target="_blank">',
				'</a>'
			);
			$html .= '<br><br>' . __( 'If you have already reviewed these instructions you may dismiss this notice.', 'lifterlms' );

			LLMS_Admin_Notices::add_notice(
				$id,
				$html,
				array(
					'type'             => 'warning',
					'dismiss_for_days' => 10000,
					'remindable'       => true,
				)
			);
		} elseif ( LLMS_Admin_Notices::has_notice( $id ) ) {
			LLMS_Admin_Notices::delete_notice( $id );
		}
	}

	/**
	 * Don't display notices on specific pages

Top ↑

Changelog Changelog

Changelog
Version Description
4.5.0 Use strict comparison for in_array().
3.7.4 Unknown.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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