How to use a WordPress’ existing admin icon?

I use the add_menu_page function to add an new admin menu: add_menu_page( ‘Custom_menu’, ‘Custom_menu’, ‘edit_posts’, ‘custom_slug’, ”, ‘wordpress_existing_icon’, 5 ); How to use one of WordPress’ existing icons? For instance, if I would like to use the “Posts” WordPress icon, by what must I replace ‘wordpress_existing_icon’ in the code above ? I tried ‘edit’ and … Read more

How do I set up the defualt page icon for admin menu?

What do i Change this to So its shows the default page icon?’, plugins_url( ‘myplugin/images/icon.png’ ) add_menu_page( ‘Info’, ‘Info’, ‘manage_options’, ‘LINK’, ”, plugins_url( ‘myplugin/images/icon.png’ ), 10 ); I find out how to do this. Step 1. Screenshot or find the image you like. Step 2. Name it icon.png step 3. Create a folder myplugin inside … Read more

how to change default icon of custom plugin?

I made a custom plugin for POLL . When I activate it, default icon is coming there on sidebar. I want to change this default icon. Here is my code which I wrote in init.php file. add_action(‘admin_menu’, ‘mt_add_pages’); // action function for above hook function mt_add_pages() { // Add a new top-level menu (ill-advised): add_menu_page(__(‘Poll’,’menu-test’), … Read more

Disable emojicons introduced with WP 4.2

So WP 4.2 introduced emojis (smileys) that basically adds JS and other junk all over your pages. Something some people may find shocking. How does one completely erase all instances of this? We will hook into init and remove actions as followed: function disable_wp_emojicons() { // all actions related to emojis remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); … Read more

How do I use a Font Awesome icon for a custom Gutenberg block?

Success! I had to pass the viewBox attribute from the Font Awesome SVG file. The code below worked for me: [php]const iconEl = el(‘svg’, { width: 20, height: 20, viewBox: ‘0 0 512 512’ }, el(‘path’, { d: "M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 … Read more