mundschenk-at / wp-typography

Improve your WordPress micro typography.
https://code.mundschenk.at/wp-typography/
Other
22 stars 3 forks source link

Widget admin page: "wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks." #320

Open strarsis opened 3 months ago

strarsis commented 3 months ago

Issue Overview

When trying to use the widget admin page with WP Typography plugin enabled, the following is reported:

wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks.

Steps to Reproduce (for bugs)

  1. Install WordPress core.
  2. Install and enable WP Typography plugin.
  3. Visit the widget admin page.

Expected Behavior

No PHP Notices.

Current Behavior

PHP Notice about this.

Possible Solution

Changing the way WP Typography enqueues the styles.