| @@ 44-52 (lines=9) @@ | ||
| 41 | /** |
|
| 42 | * Initialize hooks to display the banner |
|
| 43 | */ |
|
| 44 | public function maybe_initialize_hooks() { |
|
| 45 | if ( ! $this->can_be_displayed() ) { |
|
| 46 | return; |
|
| 47 | } |
|
| 48 | ||
| 49 | add_action( 'admin_print_styles', array( $this, 'admin_banner_styles' ) ); |
|
| 50 | add_action( 'admin_notices', array( $this, 'render_banner' ) ); |
|
| 51 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_banner_scripts' ) ); |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Determines if the banner can be displayed |
|
| @@ 44-52 (lines=9) @@ | ||
| 41 | /** |
|
| 42 | * Initialize hooks to display the banner |
|
| 43 | */ |
|
| 44 | public function maybe_initialize_hooks() { |
|
| 45 | if ( ! $this->can_be_displayed() ) { |
|
| 46 | return; |
|
| 47 | } |
|
| 48 | ||
| 49 | add_action( 'admin_print_styles', array( $this, 'admin_banner_styles' ) ); |
|
| 50 | add_action( 'admin_notices', array( $this, 'render_banner' ) ); |
|
| 51 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_banner_scripts' ) ); |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Can we display the banner? |
|