Changeset 9982 for trunk/src/bp-groups/classes/class-bp-group-extension.php
- Timestamp:
- 06/30/2015 06:22:31 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-group-extension.php
r9907 r9982 1 1 <?php 2 2 /** 3 * BuddyPress Groups Classes 3 * BuddyPress Groups Classes. 4 4 * 5 5 * @package BuddyPress … … 291 291 292 292 /** 293 * The content of the group tab 293 * The content of the group tab. 294 294 * 295 295 * @param int|null $group_id … … 319 319 320 320 /** 321 * Initialize the extension, using your config settings 321 * Initialize the extension, using your config settings. 322 322 * 323 323 * Your plugin should call this method at the very end of its … … 339 339 * @param array $args { 340 340 * Array of initialization arguments. 341 * @type string $slug Unique, URL-safe identifier for your 342 * extension. 343 * @type string $name Translatable name for your extension. Used to 344 * populate navigation items. 345 * @type string $visibility Optional. Set to 'public' for your 346 * extension (the main tab as well as the widget) to be 347 * available to anyone who can access the group; set to 348 * 'private' otherwise. Default: 'public'. 349 * @type int $nav_item_position Optional. Location of the nav item 350 * in the tab list. Default: 81. 351 * @type bool $enable_nav_item Optional. Whether the extension's 352 * tab should be accessible to anyone who can view the group. 353 * Default: true. 354 * @type string $nav_item_name Optional. The translatable text you 355 * want to appear in the nav tab. Default: the value of $name. 356 * @type string $display_hook Optional. The WordPress action that 357 * the widget_display() method is hooked to. 358 * Default: 'groups_custom_group_boxes'. 359 * @type string $template_file Optional. Theme-relative path to the 360 * template file BP should use to load the content of your 361 * main extension tab. Default: 'groups/single/plugins.php'. 362 * @type array $screens A multi-dimensional array of configuration 363 * information for the extension screens. See docblock of 364 * {@link BP_Group_Extension} for more details. 365 * @type string|array $access Which users can visit the plugin's tab. 366 * Possible values: 'anyone', 'loggedin', 'member', 367 * 'mod', 'admin' or 'noone'. ('member', 'mod', 'admin' 368 * refer to user's role in group.) Note that 'mod' targets only 369 * group moderators. If you want to allow access to group 370 * moderators and admins, specify `array( 'mod', 'admin' )`. 371 * Defaults to 'anyone' for public groups and 'member' for 372 * private groups. 373 * @type string|array $show_tab Which users can see the plugin's 374 * navigation tab. 375 * Possible values: 'anyone', 'loggedin', 'member', 376 * 'mod', 'admin' or 'noone'. ('member', 'mod', 'admin' 377 * refer to user's role in group.) Note that 'mod' targets only 378 * group moderators. If you want to show the tab to group 379 * moderators and admins, specify `array( 'mod', 'admin' )`. 380 * Defaults to 'anyone' for public groups and 'member' for 381 * private groups. 341 * @type string $slug Unique, URL-safe identifier for your 342 * extension. 343 * @type string $name Translatable name for your extension. Used to 344 * populate navigation items. 345 * @type string $visibility Optional. Set to 'public' for your 346 * extension (the main tab as well as the widget) to be 347 * available to anyone who can access the group; set to 348 * 'private' otherwise. Default: 'public'. 349 * @type int $nav_item_ Position Optional. Location of the nav item 350 * in the tab list. Default: 81. 351 * @type bool $enable_nav_item Optional. Whether the extension's tab should be 352 * accessible to anyone who can view the group. 353 * Default: true. 354 * @type string $nav_item_name Optional. The translatable text you want to appear 355 * in the nav tab. Default: the value of $name. 356 * @type string $display_hook Optional. The WordPress action that 357 * the widget_display() method is hooked to. 358 * Default: 'groups_custom_group_boxes'. 359 * @type string $template_file Optional. Theme-relative path to the template file 360 * BP should use to load the content of your main 361 * extension tab. Default: 'groups/single/plugins.php'. 362 * @type array $screens A multi-dimensional array of configuration 363 * information for the extension screens. See docblock of 364 * {@link BP_Group_Extension} for more details. 365 * @type string|array $access Which users can visit the plugin's tab. 366 * Possible values: 'anyone', 'loggedin', 'member', 367 * 'mod', 'admin' or 'noone'. ('member', 'mod', 'admin' 368 * refer to user's role in group.) Note that 'mod' targets only 369 * group moderators. If you want to allow access to group 370 * moderators and admins, specify `array( 'mod', 'admin' )`. 371 * Defaults to 'anyone' for public groups and 'member' for 372 * private groups. 373 * @type string|array $show_tab Which users can see the plugin's navigation tab. 374 * Possible values: 'anyone', 'loggedin', 'member', 375 * 'mod', 'admin' or 'noone'. ('member', 'mod', 'admin' 376 * refer to user's role in group.) Note that 'mod' targets only 377 * group moderators. If you want to show the tab to group 378 * moderators and admins, specify `array( 'mod', 'admin' )`. 379 * Defaults to 'anyone' for public groups and 'member' for 380 * private groups. 382 381 * } 383 382 */ … … 679 678 * 680 679 * @param string $access_condition 'anyone', 'loggedin', 'member', 681 * 'mod', 'admin' or 'noone'.680 * 'mod', 'admin' or 'noone'. 682 681 * @return bool 683 682 */ … … 768 767 769 768 /** 770 * Hook the main display method, and loads the template file 769 * Hook the main display method, and loads the template file. 771 770 */ 772 771 public function _display_hook() { … … 803 802 * @since BuddyPress (2.1.0) 804 803 * 804 * @param bool $user_can_see_nav_item 805 * 805 806 * @return bool 806 807 */ … … 818 819 * @since BuddyPress (2.1.0) 819 820 * 821 * @param bool $user_can_visit 822 * 820 823 * @return bool 821 824 */ … … 837 840 * @since BuddyPress (2.1.0) 838 841 * 839 * @param bool $user_can_visit842 * @param bool $user_can_visit 840 843 * @param array $no_access_args 844 * 841 845 * @return bool 842 846 */ … … 1113 1117 * 1114 1118 * @param string $screen The markup to check. 1119 * 1115 1120 * @return bool True if a Submit button is found, otherwise false. 1116 1121 */ … … 1171 1176 1172 1177 /** 1173 * Check the nonce, and call the admin_screen_save() method 1178 * Check the nonce, and call the admin_screen_save() method. 1174 1179 * 1175 1180 * @since BuddyPress (1.8.0) … … 1240 1245 * 1241 1246 * @param string $context Screen context. 'create', 'edit', or 'admin'. 1247 * 1242 1248 * @return bool True if the screen is enabled, otherwise false. 1243 1249 */ … … 1287 1293 * 1288 1294 * @param string $context Screen context. 'create', 'edit', or 'admin'. 1289 * @param string $type Screen type. 'screen' or 'screen_save'. Default: 1290 * 'screen'. 1295 * @param string $type Screen type. 'screen' or 'screen_save'. Default: 1296 * 'screen'. 1297 * 1291 1298 * @return callable A callable function handle. 1292 1299 */ … … 1338 1345 * @param array $a First set of arguments. 1339 1346 * @param array $b Second set of arguments. 1347 * 1340 1348 * @return array Parsed arguments. 1341 1349 */ … … 1381 1389 * 1382 1390 * @param string $key Property name. 1391 * 1383 1392 * @return mixed The value if found, otherwise null. 1384 1393 */ … … 1405 1414 * 1406 1415 * @param string $key Property name. 1416 * 1407 1417 * @return bool True if the value is set, otherwise false. 1408 1418 */
Note: See TracChangeset
for help on using the changeset viewer.