#51179 closed defect (bug) (worksforme)
dashicons-money-alt not working
Reported by: | solutionsketan | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | |
Focuses: | ui, css, administration | Cc: |
Description
Hi there,
I am a WordPress developer working for a project in which I am willing to create a setting page on WP dashboard.
I want to use the dashicon specified in the summary but when I pass it as parameter in add_menu_page function it does not show any icon.
Please let me know about this.
Here is the code that I am trying:
add_action('admin_menu', 'registerSettingMenu', 100); /** * Callback of admin_menu hook to register the setting menu */ function registerSettingMenu() { add_menu_page( __('Donation Settings', 'rmhc-donation'), __('Donation Settings', 'rmhc-donation'), 'manage_options', 'rmhc-donation-stngs', array($this, 'donationSettingsCallback'), 'dashicons-money-alt' ); } /** * Callback of add_menu_page to render the settings page. */ function donationSettingsCallback() { }
Attachments (2)
Change History (6)
#1
@
4 years ago
- Keywords needs-patch removed
- Resolution set to worksforme
- Status changed from new to closed
#2
@
4 years ago
- Resolution worksforme deleted
- Status changed from closed to reopened
registerBlockType( 'test/money', { title: __( 'Money', 'test' ), description: __( 'Money App', 'test' ), category: 'layout', icon: 'money-alt', supports: { // Removes support for an HTML mode. html: false, }, /** * @see ./edit.js */ edit: Edit, /** * @see ./save.js */ save, } );
Think there may be more to this....?
The above code returns a blank space in the gutenburg block selector. 'money' returns the correct dashicon.
#3
@
4 years ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from reopened to closed
- Version 5.3.2 deleted
Please note that money-alt
is a new Dashicon introduced in WordPress 5.5.
Unfortunately it's not yet supported in the block editor, see https://github.com/WordPress/gutenberg/blob/master/packages/components/src/dashicon/index.js.
You might want to open an issue on the GitHub repo to request getting it updated.
Hi @solutionsketan, thanks for your ticket.
Just tested your code in last WP version, it works well. I think you have a problem on your WordPress project.