PHP Class RTMedia, rtMedia

The main rtMedia Class. This is where everything starts.
Author: Faishal ([email protected])
Show file Open project: rtCamp/rtMedia

Public Properties

Property Type Description
$activity_types The types of activity BuddyPress Media creates
$allowed_types allowed media types
$default_privacy default application wide privacy levels
$default_sizes default media sizes
$options
$posts_per_page Number of media items to show in one view.
$privacy_settings privacy settings
$render_options
$support_url Support forum url

Public Methods

Method Description
__construct ( ) Constructs the class Defines constants and excerpt lengths, initiates admin notices, loads and initiates the plugin, loads translations.
add_image_sizes ( )
admin_init ( ) Load admin screens
check_global_album ( )
comment_auto_complete ( $rtmedia_options = false, $bp_media_options = false ) add filter that is being given in the buddypress plugin which add the JS and CSS for autocomplete
constants ( ) Defines all the constants if undefined. Can be overridden by defining them elsewhere, say wp-config.php
create_table_error_notice ( )
custom_style_for_activity_image_size ( )
custom_style_for_gallery_image_size ( )
custom_style_for_gallery_image_size_masonry ( )
custom_style_for_image_size ( )
default_count ( )
define_type_constants ( )
enqueue_scripts_styles ( )
filter_allow_mime_type_mu ( $options )
filter_image_sizes ( $sizes )
filter_image_sizes_details ( $sizes )
fix_db_collation ( )
fix_group_media_privacy ( ) * Update media privacy of the medias having context=group update privacy of groups medias according to the privacy of the group 0->public, 20-> private/hidden
fix_parent_id ( )
fix_privacy ( )
get_user_link ( $user )
image_sizes ( )
init ( ) Hooks the plugin into BuddyPress via 'bp_include' action.
init_buddypress_options ( )
init_site_options ( )
load_translation ( ) Loads translations
media_screen ( )
plugin_get_version ( $path = null )
redirect_on_change_slug ( )
rtmedia_bp_activity_maybe_load_mentions_scripts_callback ( boolean $load_mentions, $mentions_enabled ) : boolean Always set to true when call on any of the Buddypress Pages
rtmedia_custom_image_sizes_choose ( $sizes )
rtmedia_jpeg_quality ( $quality )
sanitize_allowed_types ( array $allowed_types ) : array Sanitize all media sizes after hooking custom media types
set_allowed_types ( ) Default allowed media types array
set_bp_bar ( )
set_default_sizes ( ) Set the default sizes
set_friends_object ( ) todo: This function should return value or pass argument
set_image_quality ( )
set_privacy ( ) Set privacy options
set_rtmedia_meta_wpdbfix ( )
set_site_options ( )
unset_bp_media_image_sizes ( $sizes )
unset_bp_media_image_sizes_details ( $sizes )
update_db ( )

Method Details

__construct() public method

Initialises media counter
public __construct ( )

add_image_sizes() public method

public add_image_sizes ( )

admin_init() public method

Load admin screens
public admin_init ( )

check_global_album() public method

public check_global_album ( )

comment_auto_complete() public method

More deatils on: http://hookr.io/functions/bp_activity_maybe_load_mentions_scripts/
public comment_auto_complete ( $rtmedia_options = false, $bp_media_options = false )

constants() public method

Defines all the constants if undefined. Can be overridden by defining them elsewhere, say wp-config.php
public constants ( )

create_table_error_notice() public method

custom_style_for_activity_image_size() public method

custom_style_for_image_size() public method

default_count() public method

public default_count ( )

define_type_constants() public method

enqueue_scripts_styles() public method

filter_allow_mime_type_mu() public method

public filter_allow_mime_type_mu ( $options )

filter_image_sizes() public method

public filter_image_sizes ( $sizes )

filter_image_sizes_details() public method

public filter_image_sizes_details ( $sizes )

fix_db_collation() public method

public fix_db_collation ( )

fix_group_media_privacy() public method

* Update media privacy of the medias having context=group update privacy of groups medias according to the privacy of the group 0->public, 20-> private/hidden

fix_parent_id() public method

public fix_parent_id ( )

fix_privacy() public method

public fix_privacy ( )

image_sizes() public method

public image_sizes ( )

init() public method

Initialises the plugin's functionalities, options, loads media for Profiles and Groups. Creates Admin panels Loads accessory functions
public init ( )

init_buddypress_options() public method

init_site_options() public method

public init_site_options ( )

load_translation() static public method

Loads translations
static public load_translation ( )

media_screen() public method

public media_screen ( )

plugin_get_version() static public method

static public plugin_get_version ( $path = null )

redirect_on_change_slug() public method

rtmedia_bp_activity_maybe_load_mentions_scripts_callback() public method

Always set to true when call on any of the Buddypress Pages
public rtmedia_bp_activity_maybe_load_mentions_scripts_callback ( boolean $load_mentions, $mentions_enabled ) : boolean
$load_mentions boolean
return boolean true

rtmedia_custom_image_sizes_choose() public method

rtmedia_jpeg_quality() public method

public rtmedia_jpeg_quality ( $quality )

sanitize_allowed_types() public method

Sanitize all media sizes after hooking custom media types
public sanitize_allowed_types ( array $allowed_types ) : array
$allowed_types array allowed media types after hooking custom types
return array $allowed_types sanitized media types

set_allowed_types() public method

Default allowed media types array
public set_allowed_types ( )

set_bp_bar() public method

public set_bp_bar ( )

set_default_sizes() public method

Set the default sizes
public set_default_sizes ( )

set_friends_object() public method

todo: This function should return value or pass argument
public set_friends_object ( )

set_image_quality() public method

public set_image_quality ( )

set_privacy() public method

Set privacy options
public set_privacy ( )

set_rtmedia_meta_wpdbfix() public method

set_site_options() public method

public set_site_options ( )

unset_bp_media_image_sizes() public method

public unset_bp_media_image_sizes ( $sizes )

unset_bp_media_image_sizes_details() public method

update_db() public method

public update_db ( )

Property Details

$activity_types public property

The types of activity BuddyPress Media creates
public $activity_types

$allowed_types public property

allowed media types
public $allowed_types

$default_privacy public property

default application wide privacy levels
public $default_privacy

$default_sizes public property

default media sizes
public $default_sizes

$options public property

public $options

$posts_per_page public property

Number of media items to show in one view.
public $posts_per_page

$privacy_settings public property

privacy settings
public $privacy_settings

$render_options public property

public $render_options

$support_url public property

Support forum url
public $support_url