Changeset 2621 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-tools.php
- Timestamp:
- 02/25/2016 10:49:24 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-tools.php
r2611 r2621 5 5 * Various functions used by other processes, will make sense to move to specific classes. 6 6 * 7 * @package WordPressdotorg _Plugin_Directory7 * @package WordPressdotorg\Plugin_Directory 8 8 */ 9 9 class Tools { … … 54 54 55 55 $tonesque = new \Tonesque( $file_location ); 56 56 57 return $tonesque->color(); 57 58 } … … 72 73 * Grant a user RW access to a plugin. 73 74 * 74 * @param string $plugin_slug The plugin slug. 75 * @param string|WP_User $user The user to grant access to. 75 * @param string $plugin_slug The plugin slug. 76 * @param string|\WP_User $user The user to grant access to. 77 * @return bool 76 78 */ 77 79 public static function grant_plugin_committer( $plugin_slug, $user ) { 78 80 global $wpdb; 81 79 82 if ( ! $user instanceof \WP_User ) { 80 83 $user = new \WP_User( $user ); … … 91 94 } 92 95 93 return (bool) $wpdb->insert(96 return (bool) $wpdb->insert( 94 97 PLUGINS_TABLE_PREFIX . 'svn_access', 95 98 array( … … 104 107 * Revoke a users RW access to a plugin. 105 108 * 106 * @param string $plugin_slug The plugin slug. 107 * @param string|WP_User $user The user to revoke access of. 109 * @param string $plugin_slug The plugin slug. 110 * @param string|\WP_User $user The user to revoke access of. 111 * @return bool 108 112 */ 109 113 public static function revoke_plugin_committer( $plugin_slug, $user ) { 110 114 global $wpdb; 115 111 116 if ( ! $user instanceof \WP_User ) { 112 117 $user = new \WP_User( $user ); … … 120 125 PLUGINS_TABLE_PREFIX . 'svn_access', 121 126 array( 122 'path' 123 'user' => $user->user_login127 'path' => "/{$plugin_slug}", 128 'user' => $user->user_login, 124 129 ) 125 130 ); 126 131 } 127 128 129 132 }
Note: See TracChangeset
for help on using the changeset viewer.