advanced-js.php
1 year ago
allow-unfiltered-html.php
1 year ago
block-bots.php
1 year ago
content-injection-everywhere.php
1 year ago
content-injection-level-limitation.php
1 year ago
content-injection-priority.php
1 year ago
custom-label.php
1 year ago
disable-ads.php
1 year ago
disable-notices.php
1 year ago
disable-post-types.php
1 year ago
editors-manage-ads.php
1 year ago
frontend-prefix.php
1 year ago
hide-for-ip-address.php
1 year ago
hide-for-user-role.php
1 year ago
link-target.php
1 year ago
uninstall-delete-data.php
1 year ago
hide-for-user-role.php
23 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The view to render the option. |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @author Advanced Ads <info@wpadvancedads.com> |
| 7 | * @since 1.48.2 |
| 8 | * |
| 9 | * @var array $roles Array of user roles. |
| 10 | * @var array $hide_for_roles Array of roles that should not see ads. |
| 11 | */ |
| 12 | |
| 13 | ?> |
| 14 | <div id="advads-settings-hide-by-user-role"> |
| 15 | <?php foreach ( $roles as $_role => $_display_name ) : ?> |
| 16 | <label> |
| 17 | <input type="checkbox" value="<?php echo esc_attr( $_role ); ?>" name="<?php echo esc_attr( ADVADS_SLUG ); ?>[hide-for-user-role][]"<?php checked( in_array( $_role, $hide_for_roles, true ), true ); ?>> |
| 18 | <?php echo esc_html( $_display_name ); ?> |
| 19 | </label> |
| 20 | <?php endforeach; ?> |
| 21 | </div> |
| 22 | <p class="description"><?php esc_html_e( 'Choose the roles a user must have in order to not see any ads.', 'advanced-ads' ); ?></p> |
| 23 |