PluginProbe
Tiered Pricing Table for WooCommerce / trunk
Tiered Pricing Table for WooCommerce vtrunk
7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 All 90 releases
tier-pricing-table / src / Addons / Tools / AdminUserHooks.php

AdminUserHooks.php in Tiered Pricing Table for WooCommerce trunk, at src/Addons/Tools/AdminUserHooks.php

28 lines 846 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Addons\Tools;
2
3 use TierPricingTable\Settings\Settings;
4
5 class AdminUserHooks {
6
7 public function __construct() {
8 add_action( 'admin_footer-user-new.php', array( $this, 'addRolesManagementLink' ) );
9 add_action( 'admin_footer-user-edit.php', array( $this, 'addRolesManagementLink' ) );
10 }
11
12 public function addRolesManagementLink() {
13
14 $url = admin_url( 'admin.php?page=wc-settings&tab=' . Settings::SETTINGS_PAGE . '&section=tools' );
15 $text = __( 'Manage Roles', 'tier-pricing-table' );
16 ?>
17 <script>
18 jQuery(document).ready(function ($) {
19 var $roleSelect = $('#role');
20 if ($roleSelect.length) {
21 $roleSelect.after('&nbsp;<a href="<?php echo esc_url( $url ); ?>" style="display: inline-block; margin-left: 5px;"><?php echo esc_html( $text ); ?></a>');
22 }
23 });
24 </script>
25 <?php
26 }
27 }
28