id ? true : false ); } /** * Check if we should show the a notice. * * @param string $type The notice type. * @return bool */ public function should_show_notice( $type = 'discount' ) { $notices = get_option( 'kirki_notices', [] ); // Stop here if notice has been dismissed. if ( isset( $notices[ $type . '_notice' ] ) ) { return false; } // Stop here if we're on our settings page. if ( $this->is_settings_page() ) { return false; } // Stop here if current user can't manage options. if ( ! current_user_can( 'manage_options' ) ) { return false; } return true; } /** * Discount notice. */ public function discount_notice() { // Stop here if the notice shouldn't be shown. if ( ! $this->should_show_notice( 'discount' ) ) { return; } ?>
New! Easily resolve font display issues by clearing the Font Cache in Kirki. This one-click solution fixes problems caused by domain name changes or site migrations.