If you need to call enqueue_assets
at admin_init
, then add a new add_action()
:
add_action( 'admin_init', [$this, 'settings_page_registration'] );
add_action( 'admin_init', [$this, 'enqueue_assets'] );
That said, if your assets are JS scripts or CSS, you should consider wp_enqueue_script()
& wp_enqueue_scripts
Related Posts:
- How to pass parameters to admin_notices?
- Use latest jQuery in WordPress (admin interface)
- remove_action with profile_personal_options
- Admin: global $post empty
- Hide post title input for all roles except admin
- Other than save_post any other actions on add / edit post screen?
- Show only content in page after action click in WordPress admin
- Find out if post was just updated on post edit screen
- Form submit in admin does not set is_admin() true
- ‘Conflict’ with action deleted_post and is_admin()
- Unsure how to add simple checkboxes that write to a small table to admin
- How to determine whether we are in add New page/post/CPT or in edit page/post/CPT in wordpress admin?
- How can I speed up my WP admin section?
- Find out which moderator approved comment?
- Settings API – adding setting fields dynamically?
- How to disable the “Your site has updated to WordPress x.y.z” admin email?
- Send Admin Emails to Multiple Email Addresses
- How to remove administrator role in settings -> general -> New User Default Role?
- Create un-removeable user
- WordPress Admin back-end – advanced options page?
- front end logo upload like happytables
- How to show custom menu items in the WordPress android app?
- Modify built-in post type properties
- WordPress – wp-admin subdomain
- Admin pages have no content
- Where is the User’s Admin Bar Preference stored? I want it to default to off for new users
- wp-admin: Sort users by surname
- Add User meta fields, which only admin can edit
- Default, locked sorting of posting fields
- Modify links under ‘help section’?
- How to add a link to the tax term in the admin Edit page?
- How can I access profile Admin Colour Scheme
- Having admin on different host breaks attached images
- Is it safe to post form data via Ajax to the settings api? Am I missing something?
- Remove default subpages from Custom Post Menu
- How would I add a link to the profile editing page of the dashboard?
- Showing Post Counts of One’s (Author) Own in the admin post list
- Fallback media image for featured image not working in admin column
- creating custom rewrite rules for admin pages
- admin_enqueue_scripts not working
- When admin changes a password for a registered user, I don’t want to send a password change email to users
- How do you handle postmeta in admin area?
- Admin – Load existing admin template as a submenu page
- Admin interface problems – thickbox? jquery?
- Restricting access to a single MultiSite site based on IP — possible?
- admin : search custom fields
- Admin cannot publish
- Activate Gallery Options in Media Uploader for Custom Usage
- Get post attached image to display in admin dashboard
- How Can I Found Admin Directory
- Combine and Minify wp-admin files, also re-write URI’s for CDN
- How to disable accessing the custom post types from frontend via a link?
- Problem with Settings API: changes are not saved after submit
- Show excerpt if no title in admin view
- hide default post body field in backend
- How to make the first widget box to be closed instead of open in admin
- Change default italic from to in admin editor
- Can I host WP-admin locally for a remote blog?
- Output the admin menu_position for each item
- WordPress custom admin functions security
- Adding and removing columns from the admin pages panel
- paginate_links on custom query in admin – ‘sufficient permissions’ error
- Live reload preview just reloads forever
- I need help using pre_get_comments to limit comments in the comments admin screen
- Can not add admin notices from the edit_user_profile_update hook (notices not being displayed)?
- WordPress Screen options does not show any fields
- Locked out of WordPress website from wrong amount of login attempts
- Echo string in admin panel footer beside version no
- Black admin bar is being hidden by page elements
- admin edit link from a specific page
- Set Link Target Checkbox chcked on Edit Image MOdal Window in Admin Post Edit Screen?
- Help! I changed the domain and now I can’t log in via admin online
- Username was changed to “admin”
- Admin user roles/permissions
- [Multisite]How can I update custom blog option?
- Top toolbar is not showing in wordpress admin panel
- Problem with implenting Uploadify with WordPress
- Best way to reset some admin options form to default?
- Can’t see past events on admin dashboard
- WordPress Admin Page
- Only a small portion of my export page renders
- require/include php file in add_menu()
- How can I restrict ‘edit_form_after_’ to a specific post/page?
- Can you check if https is enabled on frontend from admin
- Can’t access dashboard after 4.8.1 automatic upgrade
- Site fast when logged in, slow otherwise – How can I determine the cause, workaround or fix the issue?
- How to disable the “Your site has updated to WordPress x.y.z” admin email?
- Unable to render Admin Notices
- Login to Admin Dashboard Problem
- Admin encoding problem
- Add item to admin bar as late as possible
- How to change the default url for ‘Posts’ link?
- Lock Display Name To Nickname
- Admin bar still there after I remove it
- how to automatically cleanup failed WordPress uploads in /tmp?
- Problems in migration of WordPress site from local server to the online server
- function to return comma separated list of meta values
- WYSIWYG editor not in a post editor?
- Removing the advanced menu properties
- After upgrading WordPress, can’t access admin interface