Changeset 1709121
- Timestamp:
- 08/06/2017 12:58:14 PM (9 years ago)
- Location:
- admin-notices-for-team/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (1 diff)
-
admin/class-ant_admin_notices_team-admin.php (modified) (1 diff)
-
ant_admin_notices_team.php (modified) (1 diff)
-
includes/class-ant_admin_notices_team.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
admin-notices-for-team/trunk/README.txt
r1709116 r1709121 5 5 Requires at least: 4.0 6 6 Tested up to: 4.8 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
admin-notices-for-team/trunk/admin/class-ant_admin_notices_team-admin.php
r1709117 r1709121 212 212 } 213 213 } 214 215 216 217 /**218 * Retrieve Users by Role219 */220 public function get_users_by_role() {221 222 //ARGS223 $argsAdmin = array(224 'role' => 'Administrator',225 'orderby' => 'display_name',226 'order' => 'ASC'227 //'role__in' => array(),228 );229 $argsEditor = array(230 'role' => 'Editor',231 'orderby' => 'display_name',232 'order' => 'ASC'233 );234 $argsAuthor = array(235 'role' => 'Author',236 'orderby' => 'display_name',237 'order' => 'ASC'238 );239 $argsContributor = array(240 'role' => 'Contributor',241 'orderby' => 'display_name',242 'order' => 'ASC'243 );244 245 $adminGroup = get_users($argsAdmin);246 $editorGroup = get_users($argsEditor);247 $authorGroup = get_users($argsAuthor);248 $contributorGroup = get_users($argsContributor);249 250 251 foreach ($adminGroup as $admin) {252 $admins[] = $admin->display_name;253 update_option('admin_groups', $admins );254 }255 foreach ($editorGroup as $editor) {256 $editors[] = $editor->display_name;257 update_option('editor_groups', $editors );258 }259 foreach ($authorGroup as $author) {260 $authors[] = $author->display_name;261 update_option('author_groups', $authors );262 }263 foreach ($contributorGroup as $contributor) {264 $contributors[] = $contributor->display_name;265 update_option('contributor_groups', $contributors );266 }267 268 $groups = array(269 'Admin Users' => get_option('admin_groups'),270 'Editors' => get_option('editor_groups'),271 'Authors' => get_option('author_groups'),272 'Contributors' => get_option('contributor_groups')273 );274 update_option( 'ant_groups', $groups );275 276 }277 278 214 279 215 -
admin-notices-for-team/trunk/ant_admin_notices_team.php
r1692756 r1709121 17 17 * Plugin URI: http://plugwpress.com/ant-notice-documentation/ 18 18 * Description: It provides the capability for administrators and/or editors to create Notices and display it to all users, only to specific authors. 19 * Version: 1.0. 119 * Version: 1.0.2 20 20 * Author: PlugWPress 21 21 * Author URI: http://plugwpress.com -
admin-notices-for-team/trunk/includes/class-ant_admin_notices_team.php
r1709116 r1709121 168 168 $this->loader->add_action( 'admin_init', $plugin_admin, 'add_users_caps' ); 169 169 170 //$this->loader->add_action( 'admin_init', $plugin_admin, 'get_users_by_role' );171 172 170 //Action -> Add and Save Meta Box 173 171 $this->loader->add_action( 'add_meta_boxes', $plugin_admin, 'add_author_meta_box' );
Note: See TracChangeset
for help on using the changeset viewer.