PHP Class RTMediaPrivacy, rtMedia

Author: saurabh
Mostra file Open project: rtCamp/rtMedia Class Usage Examples

Public Properties

Property Type Description
$default_privacy default application wide privacy levels
$rtm_activity_table_alias

Public Methods

Method Description
__construct ( $flag = true )
activity_privacy ( $sql, $select_sql, $from_sql, $where_sql, $sort, $pag_sql = '' )
activity_privacy_sql_field ( $sql, $select_sql, $from_sql, $where_sql, $sort, string $pag_sql = '' ) : string Hooked to bp_activity_get_user_join_filter filter. Get activity privacy field inside loop.
add_activity_privacy_nonce ( ) Add nonce field for activity privacy change action verification
add_nav ( )
can_use_rtm_ac_privacy ( ) : boolean | mixed | void Check if activity privacy migration is done or not.
content ( )
enable_buddypress_load_more ( $has_more_items )
enable_buddypress_privacy ( $flag, $method, $func_args )
get_default ( )
get_user_default ( $user_id = false )
is_enabled ( )
required_access ( $object_id = false )
rt_privacy_settings_action ( ) changing and saving of privacy setting save action
rtm_change_activity_privacy ( )
save_user_default ( $level, $user_id = false )
select_privacy_ui ( $echo = true, $element_id = false, $element_class = [], $selected = false )
settings_ui ( )
site_default ( )
system_default ( )
title ( )
update_activity_privacy_option ( ) Hooked to bp_activity_entry_meta
user_default ( )

Method Details

__construct() public method

public __construct ( $flag = true )

activity_privacy() public method

public activity_privacy ( $sql, $select_sql, $from_sql, $where_sql, $sort, $pag_sql = '' )

activity_privacy_sql_field() public method

Use only if current user has admin capability because for non admin users privacy field will be added in privacy filter query itself.
public activity_privacy_sql_field ( $sql, $select_sql, $from_sql, $where_sql, $sort, string $pag_sql = '' ) : string
$sql
$select_sql
$from_sql
$where_sql
$sort
$pag_sql string
return string

add_activity_privacy_nonce() public method

Add nonce field for activity privacy change action verification

add_nav() public method

public add_nav ( )

can_use_rtm_ac_privacy() public method

Check if activity privacy migration is done or not.
public can_use_rtm_ac_privacy ( ) : boolean | mixed | void
return boolean | mixed | void

content() public method

public content ( )

enable_buddypress_load_more() public method

public enable_buddypress_load_more ( $has_more_items )

enable_buddypress_privacy() public method

public enable_buddypress_privacy ( $flag, $method, $func_args )

get_default() public method

public get_default ( )

get_user_default() static public method

static public get_user_default ( $user_id = false )

is_enabled() static public method

static public is_enabled ( )

required_access() static public method

static public required_access ( $object_id = false )

rt_privacy_settings_action() public method

changing and saving of privacy setting save action

rtm_change_activity_privacy() public method

save_user_default() static public method

static public save_user_default ( $level, $user_id = false )

select_privacy_ui() public method

public select_privacy_ui ( $echo = true, $element_id = false, $element_class = [], $selected = false )

settings_ui() public method

public settings_ui ( )

site_default() public method

public site_default ( )

system_default() public method

public system_default ( )

title() public method

public title ( )

update_activity_privacy_option() public method

Show privacy dropdown inside activity loop along with activity meta buttons.

user_default() public method

public user_default ( )

Property Details

$default_privacy public_oe property

default application wide privacy levels
public $default_privacy

$rtm_activity_table_alias public_oe property

public $rtm_activity_table_alias