Plugin Directory

Changeset 3438893


Ignore:
Timestamp:
01/13/2026 06:05:12 PM (3 months ago)
Author:
rankauthority
Message:

Added Dashicons

Location:
rank-authority
Files:
8 added
2 edited

Legend:

Unmodified
Added
Removed
  • rank-authority/trunk/rank-authority.php

    r3438857 r3438893  
    44 * Plugin URI: https://rankauthority.com/plugins/rankauthority
    55 * Description: Secure API connector to publish posts / overwrite posts from the RA Dashboard to WordPress.
    6  * Version: 1.0.0
     6 * Version: 1.0.1
    77 * Author: Rank Authority
    88 * Author URI: https://rankauthority.com
     
    2828        add_action('admin_menu', [$this, 'admin_menu']);
    2929        add_action('admin_enqueue_scripts', [$this, 'admin_enqueue_scripts']);
     30        add_action('admin_head', [$this, 'admin_menu_icon_css']);
    3031        add_action('rest_api_init', [$this, 'register_routes']);
    3132        add_action('wp_enqueue_scripts', [$this, 'enqueue_seo_scripts']);
     
    5556    /** Admin menu */
    5657    public function admin_menu() {
     58        // Get SVG icon URL
     59        $icon_url = plugin_dir_url(__FILE__) . 'assets/icon.svg';
     60       
    5761        add_menu_page(
    5862            'Rank Authority',
     
    6165            'rank-authority',
    6266            [$this, 'settings_page'],
    63             'dashicons-admin-links'
     67            $icon_url
    6468        );
     69    }
     70
     71    /** Add custom menu icon CSS */
     72    public function admin_menu_icon_css() {
     73        $icon_url = plugin_dir_url(__FILE__) . 'assets/icon.svg';
     74        ?>
     75        <style type="text/css">
     76            #toplevel_page_rank-authority .wp-menu-image img {
     77                width: 20px;
     78                height: 20px;
     79                padding: 0;
     80            }
     81            #toplevel_page_rank-authority .wp-menu-image {
     82                background-image: url('<?php echo esc_url($icon_url); ?>') !important;
     83                background-size: 20px 20px;
     84                background-repeat: no-repeat;
     85                background-position: center;
     86            }
     87            #toplevel_page_rank-authority .wp-menu-image:before {
     88                display: none;
     89            }
     90        </style>
     91        <?php
    6592    }
    6693
  • rank-authority/trunk/readme.txt

    r3438857 r3438893  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.