Skip to content

Commit

Permalink
Version tags + tested up to
Browse files Browse the repository at this point in the history
  • Loading branch information
JoryHogeveen committed May 9, 2017
1 parent 428fbf3 commit 0c9f024
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions modules/class-groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@
/**
* Compatibility class for the Groups plugin
*
* Tested from Groups version: 2.1.2
*
* @author Jory Hogeveen <info@keraweb.nl>
* @package View_Admin_As
* @since 1.7.x
* @version 1.7.x
* @since 1.7.2
* @version 1.7.2
* @uses VAA_View_Admin_As_Class_Base Extends class
*/
final class VAA_View_Admin_As_Groups extends VAA_View_Admin_As_Class_Base
{
/**
* The single instance of the class.
*
* @since 1.7.x
* @since 1.7.2
* @static
* @var VAA_View_Admin_As_Groups
*/
Expand All @@ -35,29 +37,29 @@ final class VAA_View_Admin_As_Groups extends VAA_View_Admin_As_Class_Base
/**
* The existing groups.
*
* @since 1.7.x
* @since 1.7.2
* @see groups/lib/core/class-groups-group.php -> Groups_Groups
* @var array of objects: Groups_Group
*/
private $groups;

/**
* @since 1.7.x
* @since 1.7.2
* @see groups/lib/core/class-groups-group.php -> Groups_Groups
* @var Groups_Group
*/
private $selectedGroup;

/**
* @since 1.7.x
* @since 1.7.2
* @var string
*/
private $viewKey = 'groups';

/**
* Populate the instance and validate Groups plugin.
*
* @since 1.7.x
* @since 1.7.2
* @access protected
* @param VAA_View_Admin_As $vaa The main VAA object.
*/
Expand Down Expand Up @@ -90,7 +92,7 @@ protected function __construct( $vaa ) {

/**
* Initialize the Groups module.
* @since 1.7.x
* @since 1.7.2
* @access public
*/
public function do_view() {
Expand Down Expand Up @@ -135,7 +137,7 @@ public function do_view() {
/**
* Reset Groups_User data for the selected user.
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @param int $user_id
*/
Expand Down Expand Up @@ -185,7 +187,7 @@ public function reset_groups_user( $user_id = null ) {
/**
* Update the current user's WP_User instance with the current view data.
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @param WP_User $user User object.
* @param bool $accessible Are the WP_User properties accessible?
Expand Down Expand Up @@ -231,7 +233,7 @@ public function modify_user( $user, $accessible ) {
* @todo https://github.com/itthinx/groups/pull/59
* @see Groups_User_Group::read() >> groups/lib/core/class-groups-user-group.php
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @param bool $result Current result.
* @param int $user_id User ID.
Expand All @@ -253,7 +255,7 @@ public function groups_user_is_member( $result, $user_id, $group_id ) {
*
* @see Groups_User::can() >> groups/lib/core/class-groups-user.php
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @param bool $result Current result.
* @param Groups_Group $object (not used) Group object.
Expand Down Expand Up @@ -293,10 +295,10 @@ public function groups_user_can( $result, $object = null, $cap = '' ) {
*
* @see Groups_Group::can() >> groups/lib/core/class-groups-group.php
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @param bool $result Current result.
* @param Groups_Group $object (not used) Group object.
* @param Groups_Group $object Group object.
* @param string $cap Capability.
* @return bool
*/
Expand All @@ -313,7 +315,7 @@ public function groups_group_can( $result, $object = null, $cap = '' ) {
*
* @see Groups_Post_Access::user_can_read_post()
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @param bool $result
* @param int $post_id
Expand Down Expand Up @@ -343,7 +345,7 @@ public function groups_post_access_user_can_read_post( $result, $post_id, $user_
* @hook `wp`
* @see VAA_View_Admin_As_Groups::groups_post_access_user_can_read_post()
*
* @since 1.7.x
* @since 1.7.2
* @access public
*/
public function post_access_404() {
Expand All @@ -359,7 +361,7 @@ public function post_access_404() {
*
* @see Groups_Access_Shortcodes::groups_member()
*
* @since 1.7.x
* @since 1.7.2
* @param array $atts
* @param string $content
* @return string
Expand All @@ -373,7 +375,7 @@ public function shortcode_groups_member( $atts, $content ) {
*
* @see Groups_Access_Shortcodes::groups_non_member()
*
* @since 1.7.x
* @since 1.7.2
* @param array $atts
* @param string $content
* @return string
Expand All @@ -388,7 +390,7 @@ public function shortcode_groups_non_member( $atts, $content ) {
* @see VAA_View_Admin_As_Groups::shortcode_groups_member()
* @see VAA_View_Admin_As_Groups::shortcode_groups_non_member()
*
* @since 1.7.x
* @since 1.7.2
* @param array $atts
* @param string $content
* @param bool $reverse
Expand Down Expand Up @@ -426,7 +428,7 @@ public function shortcode_member( $atts, $content, $reverse = false ) {
/**
* Add view type.
*
* @since 1.7.x
* @since 1.7.2
* @param array $types Existing view types.
* @return array
*/
Expand All @@ -438,7 +440,7 @@ public function add_view_type( $types ) {
/**
* Validate data for this view type
*
* @since 1.7.x
* @since 1.7.2
* @param null $null Default return (invalid)
* @param mixed $data The view data
* @return mixed
Expand All @@ -453,7 +455,7 @@ public function validate_view_data( $null, $data ) {
/**
* View update handler (Ajax probably), called from main handler.
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @param null $null Null.
* @param array $data The ajax data for this module.
Expand All @@ -476,7 +478,7 @@ public function update_view( $null, $data, $type ) {
/**
* Change the VAA admin bar menu title.
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @param string $title The current title.
* @return string
Expand All @@ -493,7 +495,7 @@ public function vaa_viewing_as_title( $title ) {
/**
* Add the Groups admin bar items.
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @param WP_Admin_Bar $admin_bar The toolbar object.
* @param string $root The root item.
Expand Down Expand Up @@ -587,7 +589,7 @@ public function admin_bar_menu( $admin_bar, $root ) {

/**
* Store the available groups.
* @since 1.7.x
* @since 1.7.2
* @access private
*/
private function store_groups() {
Expand All @@ -603,7 +605,7 @@ private function store_groups() {
/**
* Get a group by ID.
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @param string $key The group key.
* @return mixed
Expand All @@ -623,7 +625,7 @@ public function get_groups( $key = '-1' ) {
*
* Ensures only one instance of this class is loaded or can be loaded.
*
* @since 1.7.x
* @since 1.7.2
* @access public
* @static
* @param VAA_View_Admin_As $caller The referrer class.
Expand All @@ -636,4 +638,4 @@ public static function get_instance( $caller = null ) {
return self::$_instance;
}

} // end class.
} // End class VAA_View_Admin_As_Groups.

0 comments on commit 0c9f024

Please sign in to comment.