diff --git a/custom.svg b/custom.svg new file mode 100644 index 0000000..b584be3 --- /dev/null +++ b/custom.svg @@ -0,0 +1,3 @@ + diff --git a/index.php b/index.php index 30c2b53..f88a07e 100644 --- a/index.php +++ b/index.php @@ -24,17 +24,16 @@ function __construct() //MENU function ourMenu() { - add_menu_page( + $mainPageHook = add_menu_page( 'Words To Filter', 'Word Filter', 'manage_options', 'ourwordfilter', - array( - $this, 'wordFilterPage' - ), - 'dashicons-smiley', + array($this, 'wordFilterPage'), + 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMCAyMEMxNS41MjI5IDIwIDIwIDE1LjUyMjkgMjAgMTBDMjAgNC40NzcxNCAxNS41MjI5IDAgMTAgMEM0LjQ3NzE0IDAgMCA0LjQ3NzE0IDAgMTBDMCAxNS41MjI5IDQuNDc3MTQgMjAgMTAgMjBaTTExLjk5IDcuNDQ2NjZMMTAuMDc4MSAxLjU2MjVMOC4xNjYyNiA3LjQ0NjY2SDEuOTc5MjhMNi45ODQ2NSAxMS4wODMzTDUuMDcyNzUgMTYuOTY3NEwxMC4wNzgxIDEzLjMzMDhMMTUuMDgzNSAxNi45Njc0TDEzLjE3MTYgMTEuMDgzM0wxOC4xNzcgNy40NDY2NkgxMS45OVoiIGZpbGw9IiNGRkRGOEQiLz4KPC9zdmc+Cg==', 100 - ); + ); // plugin_dir_url(__FILE__) . 'custom.svg', + // To use custom color on svg //SUB-MENU Word List add_submenu_page( @@ -59,19 +58,42 @@ function ourMenu() $this, 'optionsSubPage' ) ); + + //LOAD CSS + add_action("load-{$mainPageHook}", array($this, 'mainPageAssets')); + } - //SUB-MENU - function optionsSubPage() - { ?> - Hello Developer - - Hello Developer +