+
is_liked( rtmedia_id() ) );
+ echo wp_kses( rtmedia_who_like_html( $count, $rtmedialike->is_liked( rtmedia_id() ) ), RTMedia::expanded_allowed_tags() );
}
?>
-
1 && $user_like_it ) {
/**
* Rtmedia you and
*
- * @param $html TEXT
- * @param int $like_count Total Like
- * @param int $user_like_it User Like it or Not
+ * @param string $html TEXT.
+ * @param int $like_count Total Like.
+ * @param int $user_like_it User Like it or Not.
*
- * @return html TEXT to display
+ * @return string TEXT to display
*/
$html .= apply_filters( 'rtmedia_like_html_you_and_more_like', esc_html__( 'You and ', 'buddypress-media' ), $like_count, $user_like_it );
$like_count_new--;
}
/**
- * Rtmedia Disaply count
+ * Rtmedia Display count
*
- * @param int $like_count Total Like
- * @param int $user_like_it User Like it or Not
+ * @param int $like_count Total Like.
+ * @param int $user_like_it User Like it or Not.
*
* @return INT Count to display
*/
@@ -2955,11 +3096,11 @@ function rtmedia_who_like_html( $like_count = false, $user_like_it = false ) {
/**
* Rtmedia person or people likes it
*
- * @param $html TEXT
- * @param int $like_count Total Like
- * @param int $user_like_it User Like it or Not
+ * @param string $html TEXT.
+ * @param int $like_count Total Like.
+ * @param int $user_like_it User Like it or Not.
*
- * @return html TEXT to display
+ * @return string TEXT to display
*/
$html .= apply_filters( 'rtmedia_like_html_othe_likes_this', _n( ' person likes this', ' people like this', $like_count_new, 'buddypress-media' ), $like_count, $user_like_it );
}
@@ -2967,11 +3108,11 @@ function rtmedia_who_like_html( $like_count = false, $user_like_it = false ) {
/**
* Rtmedia return whole HTML
*
- * @param $html TEXT
- * @param int $like_count Total Like
- * @param int $user_like_it User Like it or Not
+ * @param string $html TEXT.
+ * @param int $like_count Total Like.
+ * @param int $user_like_it User Like it or Not.
*
- * @return html TEXT to display
+ * @return string TEXT to display
*/
$html = apply_filters( 'rtmedia_who_like_html', $html, $like_count, $user_like_it );
return $html;
@@ -2981,7 +3122,7 @@ function rtmedia_who_like_html( $like_count = false, $user_like_it = false ) {
/**
* Get music cover art
*
- * @param object $media_object
+ * @param object $media_object Media details object.
*
* @return bool|string
*/
@@ -2994,7 +3135,7 @@ function rtm_get_music_cover_art( $media_object ) {
return $url;
}
- // return false if covert_art is already analyzed earlier
+ // return false if covert_art is already analyzed earlier.
if ( -1 === intval( $url ) ) {
return false;
}
@@ -3010,39 +3151,50 @@ function rtm_get_music_cover_art( $media_object ) {
$id = $media_object->id;
if ( ! empty( $image_info['data'] ) ) {
+
$thumb_upload_info = wp_upload_bits( $title_info . '.' . $mime[ count( $mime ) - 1 ], null, $image_info['data'] );
if ( is_array( $thumb_upload_info ) && ! empty( $thumb_upload_info['url'] ) ) {
- $media_obj->model->update( array(
- 'cover_art' => $thumb_upload_info['url'],
- ), array(
- 'id' => $id,
- ) );
+ $media_obj->model->update(
+ array(
+ 'cover_art' => $thumb_upload_info['url'],
+ ),
+ array(
+ 'id' => $id,
+ )
+ );
return $thumb_upload_info['url'];
}
}
- $media_obj->model->update( array(
- 'cover_art' => '-1',
- ), array(
- 'id' => $id,
- ) );
+ $media_obj->model->update(
+ array(
+ 'cover_art' => '-1',
+ ),
+ array(
+ 'id' => $id,
+ )
+ );
return false;
}
-/**
- * "get_music_cover_art" is too generic function name. It shouldn't added in very first place.
- * It is renamed as "rtm_get_music_cover_art"
- *
- * @return bool
- */
if ( ! function_exists( 'get_music_cover_art' ) ) {
+ /**
+ * Function "get_music_cover_art" is too generic function name. It shouldn't added in very first place.
+ * It is renamed as "rtm_get_music_cover_art"
+ *
+ * @param string $file Media file.
+ * @param int $id Media id.
+ *
+ * @return bool
+ */
function get_music_cover_art( $file, $id ) {
+ // todo:delete if not used.
return false;
}
@@ -3051,43 +3203,46 @@ function get_music_cover_art( $file, $id ) {
/**
* Get the media privacy symbol
*
- * @param bool|int $rtmedia_id
+ * @param bool|int $rtmedia_id Media id to check privacy.
*
- * @return string
+ * @return string
*/
function get_rtmedia_privacy_symbol( $rtmedia_id = false ) {
$mediamodel = new RTMediaModel();
- $actions = $mediamodel->get( array(
- 'id' => rtmedia_id( $rtmedia_id ),
- ) );
+ $actions = $mediamodel->get(
+ array(
+ 'id' => rtmedia_id( $rtmedia_id ),
+ )
+ );
$privacy = '';
if ( intval( $actions[0]->privacy ) >= 0 ) {
- $title = $icon = '';
+ $title = '';
+ $icon = '';
switch ( $actions[0]->privacy ) {
- case 0: // public
+ case 0: // public.
$title = esc_html__( 'Public', 'buddypress-media' );
$icon = 'dashicons dashicons-admin-site';
break;
- case 20: // users
+ case 20: // users.
$title = esc_html__( 'All members', 'buddypress-media' );
$icon = 'dashicons dashicons-groups';
break;
- case 40: // friends
+ case 40: // friends.
$title = esc_html__( 'Your friends', 'buddypress-media' );
$icon = 'dashicons dashicons-networking';
break;
- case 60: // private
+ case 60: // private.
$title = esc_html__( 'Only you', 'buddypress-media' );
$icon = 'dashicons dashicons-lock';
break;
- case 80: // private
+ case 80: // private.
$title = esc_html__( 'Blocked temporarily', 'buddypress-media' );
$icon = 'dashicons dashicons-dismiss';
@@ -3106,9 +3261,11 @@ function get_rtmedia_privacy_symbol( $rtmedia_id = false ) {
/**
* Get media uploaded gmt date
*
- * @param bool|int $rtmedia_id
+ * @param bool|int $rtmedia_id Media id.
+ *
+ * @return string
*
- * @return string
+ * @throws Exception Error while getting media date.
*/
function get_rtmedia_date_gmt( $rtmedia_id = false ) {
@@ -3128,9 +3285,11 @@ function get_rtmedia_date_gmt( $rtmedia_id = false ) {
/**
* Convert comment datetime to "time ago" format
*
- * @param string $_date
+ * @param string $_date Comment datetime.
*
- * @return string
+ * @return string
+ *
+ * @throws Exception Error while converting date.
*/
function rtmedia_convert_date( $_date ) {
@@ -3141,33 +3300,40 @@ function rtmedia_convert_date( $_date ) {
$diff = $cur_time - $date;
$time_unit = array( 'second', 'minute', 'hour' );
$length = array( 1, 60, 3600, 86400 );
- $ago_text = esc_html__( '%s ago ', 'buddypress-media' );
+ // translators: %s: count of hour/minute/second.
+ $ago_text = esc_html__( '%s ago ', 'buddypress-media' );
+ $no = 0;
- for ( $i = sizeof( $length ) - 1; ( $i >= 0 ) && ( ( $no = $diff / $length[ $i ] ) <= 1 ); $i -- ) {}
+ for ( $i = count( $length ) - 1; ( $i >= 0 ) && ( $no <= 1 ); $i-- ) {
+ $no = $diff / $length[ $i ];
+ }
if ( $i < 0 ) {
$i = 0;
}
- if ( $i <= 2 ) { //if posted in last 24 hours
+ if ( $i <= 2 ) { // if posted in last 24 hours.
$_time = $cur_time - ( $diff % $length[ $i ] );
$no = floor( $no );
switch ( $time_unit[ $i ] ) {
case 'second':
- $time_unit_phrase = _n( '1 second', '%s seconds', $no, 'buddypress-media' );
+ // translators: %s: number of seconds.
+ $time_unit_phrase = _n( '%s second', '%s seconds', $no, 'buddypress-media' );
break;
case 'minute':
- $time_unit_phrase = _n( '1 minute', '%s minutes', $no, 'buddypress-media' );
+ // translators: %s: number of minutes.
+ $time_unit_phrase = _n( '%s minute', '%s minutes', $no, 'buddypress-media' );
break;
case 'hour':
- $time_unit_phrase = _n( '1 hour', '%s hours', $no, 'buddypress-media' );
+ // translators: %s: number of hours.
+ $time_unit_phrase = _n( '%s hour', '%s hours', $no, 'buddypress-media' );
break;
default:
- // should not happen
+ // should not happen.
$time_unit_phrase = '%s unknown';
}
@@ -3179,7 +3345,7 @@ function rtmedia_convert_date( $_date ) {
return sprintf( $ago_text, $value );
} else {
- /* translators: date format, see http://php.net/date */
+ // translators: %s: date format, see http://php.net/date.
return date_i18n( 'd F Y ', strtotime( $_date ), true );
}
@@ -3188,9 +3354,9 @@ function rtmedia_convert_date( $_date ) {
/**
* Get media counts
*
- * @global RTMediaQuery $rtmedia_query
+ * @global RTMediaQuery $rtmedia_query
*
- * @return array|void
+ * @return array|void
*/
function get_media_counts() {
@@ -3216,26 +3382,26 @@ function get_media_counts() {
/**
* Checking if it is rtmedia's edit page
*
- * @global string $pagenow
+ * @global string $pagenow
*
- * @param null $new_edit
+ * @param null|string $new_edit Edit or new page.
*
- * @return bool
+ * @return bool
*/
function rtmedia_is_edit_page( $new_edit = null ) {
global $pagenow;
- //make sure we are on the backend
+ // make sure we are on the backend.
if ( ! is_admin() ) {
return false;
}
if ( 'edit' === $new_edit ) {
return in_array( $pagenow, array( 'post.php' ), true );
- } elseif ( 'new' === $new_edit ) { //check for new post page
+ } elseif ( 'new' === $new_edit ) { // check for new post page.
return in_array( $pagenow, array( 'post-new.php' ), true );
- } else { //check for either new or edit
+ } else { // check for either new or edit.
return in_array( $pagenow, array( 'post.php', 'post-new.php' ), true );
}
@@ -3244,9 +3410,9 @@ function rtmedia_is_edit_page( $new_edit = null ) {
/**
* Checking if it's a rtmedia page
*
- * @global object $rtmedia_interaction
+ * @global object $rtmedia_interaction
*
- * @return bool
+ * @return bool
*/
function is_rtmedia_page() {
@@ -3271,9 +3437,9 @@ function is_rtmedia_page() {
/**
* To be used in migration in importing
*
- * @param int $seconds_left
+ * @param int $seconds_left Seconds left in migration.
*
- * @return string
+ * @return string
*/
function rtmedia_migrate_formatseconds( $seconds_left ) {
@@ -3320,12 +3486,12 @@ function rtmedia_migrate_formatseconds( $seconds_left ) {
}
/**
- * echo the size of the media file
+ * Echo the size of the media file
*
- * @global array $rtmedia_backbone
- * @global object $rtmedia_media
+ * @global array $rtmedia_backbone
+ * @global object $rtmedia_media
*
- * @return int
+ * @return int
*/
function rtmedia_file_size() {
@@ -3348,11 +3514,11 @@ function rtmedia_file_size() {
/**
* Get rtmedia media type from file extension
*
- * @global RTMedia $rtmedia
+ * @global RTMedia $rtmedia
*
- * @param string $extn
+ * @param string $extn media extension.
*
- * @return bool|int|string
+ * @return bool|int|string
*/
function rtmedia_get_media_type_from_extn( $extn ) {
@@ -3373,14 +3539,14 @@ function rtmedia_get_media_type_from_extn( $extn ) {
/**
* Get extension from media id
*
- * @global object $rtmedia_media
+ * @global object $rtmedia_media
*
- * @param bool|int $media_id
+ * @param bool|int $media_id Media id to get extension.
*
- * @return bool
+ * @return bool
*/
function rtmedia_get_extension( $media_id = false ) {
- // If media_id is false then use global media_id
+ // If media_id is false then use global media_id.
if ( ! $media_id ) {
global $rtmedia_media;
@@ -3391,13 +3557,13 @@ function rtmedia_get_extension( $media_id = false ) {
}
}
- // Getting filename from media id
+ // Getting filename from media id.
$filename = basename( wp_get_attachment_url( $media_id ) );
- // Checking file type of uploaded document
+ // Checking file type of uploaded document.
$file_type = wp_check_filetype( $filename );
- // return the extension of the filename
+ // return the extension of the filename.
return $file_type['ext'];
}
@@ -3405,9 +3571,9 @@ function rtmedia_get_extension( $media_id = false ) {
/**
* Function to get permalink for current blog
*
- * @param string $domain
+ * @param string $domain current domain.
*
- * @return string
+ * @return string
*/
function rtmedia_get_current_blog_url( $domain ) {
@@ -3420,9 +3586,9 @@ function rtmedia_get_current_blog_url( $domain ) {
/**
* Checking if album is global
*
- * @param int $album_id
+ * @param int $album_id Album id to check.
*
- * @return bool
+ * @return bool
*/
function rtmedia_is_global_album( $album_id ) {
@@ -3439,10 +3605,10 @@ function rtmedia_is_global_album( $album_id ) {
/**
* Checking if uploader view is allowed
*
- * @param bool $allow
- * @param string $section
+ * @param bool $allow Weather uploader view is allowed or not.
+ * @param string $section Section name, default media_gallery.
*
- * @return bool
+ * @return bool
*/
function rtmedia_is_uploader_view_allowed( $allow, $section = 'media_gallery' ) {
@@ -3453,7 +3619,7 @@ function rtmedia_is_uploader_view_allowed( $allow, $section = 'media_gallery' )
/**
* Get rtMedia Encoding API Key
*
- * @return string
+ * @return string
*/
function get_rtmedia_encoding_api_key() {
@@ -3469,13 +3635,13 @@ function get_rtmedia_encoding_api_key() {
* uses 'id' for the primary column. To make WP's functions usable for rtMedia,
* we use this filter on 'query' to swap all 'meta_id' with 'id.
*
- * @param string $q
+ * @param string $q Query string.
*
- * @return string
+ * @return string
*/
function rtm_filter_metaid_column_name( $q ) {
- /*
+ /**
* Replace quoted content with __QUOTE__ to avoid false positives.
* This regular expression will match nested quotes.
*/
@@ -3488,9 +3654,12 @@ function rtm_filter_metaid_column_name( $q ) {
// Put quoted content back into the string.
if ( ! empty( $quoted_matches[0] ) ) {
- for ( $i = 0; $i < count( $quoted_matches[0] ); $i ++ ) {
+ $count = count( $quoted_matches[0] );
+
+ for ( $i = 0; $i < $count; $i++ ) {
$quote_pos = strpos( $q, '__QUOTE__' );
$q = substr_replace( $q, $quoted_matches[0][ $i ], $quote_pos, 9 );
+ $count = count( $quoted_matches[0] );
}
}
@@ -3501,7 +3670,7 @@ function rtm_filter_metaid_column_name( $q ) {
/**
* Checking if SCRIPT_DEBUG constant is defined or not
*
- * @return string
+ * @return string
*/
function rtm_get_script_style_suffix() {
@@ -3514,11 +3683,11 @@ function rtm_get_script_style_suffix() {
/**
* To get list of allowed types in rtMedia
*
- * @since 3.8.16
+ * @since 3.8.16
*
- * @global RTMedia $rtmedia
+ * @global RTMedia $rtmedia
*
- * @return array
+ * @return array
*/
function rtmedia_get_allowed_types() {
@@ -3534,9 +3703,9 @@ function rtmedia_get_allowed_types() {
/**
* To get list of allowed upload types in rtMedia
*
- * @since 3.8.16
+ * @since 3.8.16
*
- * @return array
+ * @return array
*/
function rtmedia_get_allowed_upload_types() {
@@ -3555,9 +3724,9 @@ function rtmedia_get_allowed_upload_types() {
/**
* To get list of allowed upload type name in rtMedia
*
- * @since 3.8.16
+ * @since 3.8.16
*
- * @return array
+ * @return array
*/
function rtmedia_get_allowed_upload_types_array() {
@@ -3571,14 +3740,14 @@ function rtmedia_get_allowed_upload_types_array() {
/**
* Upload and add media
*
- * @param array $upload_params
+ * @param array $upload_params Upload parameters array.
*
- * @return bool|int
+ * @return bool|int
*/
function rtmedia_add_media( $upload_params = array() ) {
if ( empty( $upload_params ) ) {
- $upload_params = $_POST; // @codingStandardsIgnoreLine
+ $upload_params = $_POST; // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
}
$upload_model = new RTMediaUploadModel();
@@ -3594,10 +3763,10 @@ function rtmedia_add_media( $upload_params = array() ) {
/**
* Add multiple meta key and value for media.
*
- * @param int $media_id
- * @param string $meta_key_val
+ * @param int $media_id Media id.
+ * @param array $meta_key_val Media meta data with values.
*
- * @return array
+ * @return array
*/
function rtmedia_add_multiple_meta( $media_id, $meta_key_val ) {
@@ -3618,10 +3787,10 @@ function rtmedia_add_multiple_meta( $media_id, $meta_key_val ) {
/**
* To get server variable
*
- * @param string $server_key
- * @param string $filter_type
+ * @param string $server_key Server variable name.
+ * @param string $filter_type Filter type.
*
- * @return string
+ * @return string
*/
function rtm_get_server_var( $server_key, $filter_type = 'FILTER_SANITIZE_STRING' ) {
@@ -3640,10 +3809,10 @@ function rtm_get_server_var( $server_key, $filter_type = 'FILTER_SANITIZE_STRING
/**
* Check if URL exists of a given media type (i.e mp4, ogg, wmv)
*
- * @param array $medias
- * @param string $media_type
+ * @param array $medias Media array.
+ * @param string $media_type Media type.
*
- * @return bool
+ * @return bool
*/
function rtt_is_video_exists( $medias, $media_type = 'mp4' ) {
@@ -3656,17 +3825,15 @@ function rtt_is_video_exists( $medias, $media_type = 'mp4' ) {
}
}
-
/**
* Send the request to the rtmedia server for addon license validation
* and activation
*
* @since 4.2
*
- * @param array $addon Array containing the license_key, addon_id
- * and addon name
+ * @param array $addon Array containing the license_key, addon_id and addon name.
*
- * @return obejct|boolean Addon license data/status from server or the false on error
+ * @return obejct|boolean Addon license data/status from server or the false on error
*/
function rtmedia_activate_addon_license( $addon = array() ) {
@@ -3682,105 +3849,134 @@ function rtmedia_activate_addon_license( $addon = array() ) {
return false;
}
- $license = $addon['args']['license_key'];
+ $license = $addon['args']['license_key'];
$addon_name = $addon['name'];
- $addon_id = $addon['args']['addon_id'];
+ $addon_id = $addon['args']['addon_id'];
$store_url = '';
if ( defined( 'EDD_' . strtoupper( $addon_id ) . '_STORE_URL' ) ) {
- // Get the store URL from the constant defined in the addon
- $store_url = constant( 'EDD_' . strtoupper( $addon_id ) . '_STORE_URL' );
+ // Get the store URL from the constant defined in the addon.
+ $store_url = constant( 'EDD_' . strtoupper( $addon_id ) . '_STORE_URL' );
}
- // If store URL not found in the addon, use the default store URL
+ // If store URL not found in the addon, use the default store URL.
if ( empty( $store_url ) ) {
$store_url = 'https://rtmedia.io/';
}
- // data to send in our API request
+ // data to send in our API request.
$api_params = array(
'edd_action' => 'activate_license',
'license' => $license,
- 'item_name' => urlencode( $addon_name ), // the name of our product in EDD
+ 'item_name' => rawurlencode( $addon_name ), // the name of our product in EDD.
'url' => home_url(),
);
// Call the custom API.
- $response = wp_remote_get( esc_url_raw( add_query_arg( $api_params, $store_url ) ), array( 'timeout' => 15, 'sslverify' => false ) );
+ $response = wp_remote_get(
+ esc_url_raw( add_query_arg( $api_params, $store_url ) ),
+ array(
+ 'timeout' => 15,
+ 'sslverify' => false,
+ )
+ );
- // make sure the response came back okay
+ // make sure the response came back okay.
if ( is_wp_error( $response ) ) {
return false;
}
- // decode the license data
+ // decode the license data.
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
return $license_data;
}
+/**
+ * Filter comment with allowed html.
+ *
+ * @param string $comment_content Comment content.
+ * @param array $allowedtags Allowed html tags.
+ *
+ * @return string
+ */
+function rtmedia_wp_kses_of_buddypress( $comment_content, $allowedtags ) {
-
-
-function rtmedia_wp_kses_of_buddypress( $comment_content, $allowedtags ){
- if( function_exists( 'bp_activity_filter_kses' ) ){
+ if ( function_exists( 'bp_activity_filter_kses' ) ) {
$comment_string = bp_activity_filter_kses( $comment_content, $allowedtags );
- }else{
+ } else {
$comment_string = wp_kses( $comment_content, $allowedtags );
}
+
return $comment_string;
}
-
-/*
- * is media is uploaded in the comment
+/**
+ * If media is uploaded in the comment
* parameter media_id int
* return true/false value
-*/
-function rtmedia_is_comment_media( $rtmedia_id ){
+ *
+ * @param int $rtmedia_id media id.
+ *
+ * @return bool
+ */
+function rtmedia_is_comment_media( $rtmedia_id ) {
return get_rtmedia_meta( $rtmedia_id, 'rtmedia_comment_media' );
}
-
-
-function rtmedia_is_comment_media_single_page( $rtmedia_id ){
+/**
+ * Check if provided media is comment media.
+ *
+ * @param int $rtmedia_id media id.
+ *
+ * @return bool
+ */
+function rtmedia_is_comment_media_single_page( $rtmedia_id ) {
$comment_media = false;
global $rtmedia;
- /* check if the reply in comment media is not allow */
- if( $rtmedia_id && ! rtmedia_check_comment_in_commented_media_allow() ){
+
+ // check if the reply in comment media is not allow.
+ if ( $rtmedia_id && ! rtmedia_check_comment_in_commented_media_allow() ) {
$comment_media = rtmedia_is_comment_media( $rtmedia_id );
}
+
return $comment_media;
}
-
+/**
+ * Get activity conversation of media.
+ *
+ * @param int $activity_id Activity id.
+ */
function rtmedia_view_conversation_of_media( $activity_id ) {
if ( function_exists( 'bp_activity_get_permalink' ) ) {
?>
-
-
+
+
$media_id,
);
return get_comments( $args );
}
-
/**
* Check if comment are allow in Media that are being add in the comment section.
*
@@ -3791,16 +3987,13 @@ function rtmedia_get_comments_details_for_media_id( $media_id ){
function rtmedia_check_comment_in_commented_media_allow() {
$value = false;
global $rtmedia;
- /* variable */
+ // variable.
if ( isset( $rtmedia->options ) && isset( $rtmedia->options['rtmedia_disable_media_in_commented_media'] ) && 0 === $rtmedia->options['rtmedia_disable_media_in_commented_media'] ) {
$value = true;
}
return $value;
}
-
-
-
/**
* Check if comment in media is allow or not.
*
@@ -3811,33 +4004,33 @@ function rtmedia_check_comment_in_commented_media_allow() {
function rtmedia_check_comment_media_allow() {
$value = false;
global $rtmedia;
- /* variable */
- if ( ( isset( $rtmedia->options ) && isset( $rtmedia->options['buddypress_enableOnComment'] ) && 1 == $rtmedia->options['buddypress_enableOnComment'] ) || ! isset( $rtmedia->options['buddypress_enableOnComment'] ) ) {
+ // variable.
+ if ( ( isset( $rtmedia->options ) && isset( $rtmedia->options['buddypress_enableOnComment'] ) && 1 === intval( $rtmedia->options['buddypress_enableOnComment'] ) ) || ! isset( $rtmedia->options['buddypress_enableOnComment'] ) ) {
$value = true;
}
return $value;
}
-
/**
- * Get the Original Content from the $_REQUEST
+ * Get the Original Content from the POST
*
* @return string
*/
function rtmedia_get_original_comment_media_content() {
$old_content = ' ';
- /* get the original contant from the $REQUEST */
- if ( isset( $_REQUEST['content'] ) ) {
- $old_content = $_REQUEST['content'];
+ // get the original content from the POST.
+ $content = sanitize_text_field( filter_input( INPUT_POST, 'content', FILTER_SANITIZE_STRING ) );
+ if ( ! empty( $content ) ) {
+ $old_content = $content;
}
- if ( isset( $_REQUEST['comment_content'] ) ) {
- $old_content = $_REQUEST['comment_content'];
+ $comment = sanitize_text_field( filter_input( INPUT_POST, 'comment_content', FILTER_SANITIZE_STRING ) );
+ if ( ! empty( $comment ) ) {
+ $old_content = $comment;
}
-
- /* is comment is empty then add content content space */
+ // is comment is empty then add content content space.
if ( strstr( $old_content, 'nbsp' ) ) {
$old_content = ' ';
}
@@ -3845,50 +4038,58 @@ function rtmedia_get_original_comment_media_content() {
return sanitize_text_field( $old_content );
}
-
-
/**
* Will alter the rtMedia query and remove the comment media from it
*
- * parameter $where string rtMedia query where conditions
- * parameter $table_name string rtMedia query table name
- * parameter $join string
+ * @param string $where rtMedia query where conditions.
+ * @param string $table_name rtMedia query table name.
+ * @param string $join join clause.
*
- * return string of rtMedia query where conditions
-*/
+ * @return string of rtMedia query where conditions
+ */
function rtmedia_query_where_filter_remove_comment_media( $where, $table_name, $join ) {
$where .= ' AND ' . $table_name . '.context NOT LIKE ( "comment-media" ) ';
return $where;
}
-
-
-
-
-function rtmedia_bp_activity_entry_comments_callback(){
+/**
+ * Function to show activities.
+ */
+function rtmedia_bp_activity_entry_comments_callback() {
global $activities_template;
- /* comment media activity is created so media is not allow */
+ // comment media activity is created so media is not allow.
$allow_media_activity_type = array( 'rtmedia_comment_activity', 'rtmedia_like_activity' );
- $allow_media_activity_type = apply_filters( 'rtmedia_not_allow_comment_media_in_activity_type' , $allow_media_activity_type );
+ $allow_media_activity_type = apply_filters( 'rtmedia_not_allow_comment_media_in_activity_type', $allow_media_activity_type );
- /* parent activity id */
+ // parent activity id.
$activity_id = bp_get_activity_id();
- /* if activity id is not empty and the type is not as $allow_media_activity_type */
- if( $activity_id && isset( $activities_template->activity ) && isset( $activities_template->activity->type ) && ! in_array( $activities_template->activity->type , $allow_media_activity_type ) ){
+ // if activity id is not empty and the type is not as $allow_media_activity_type.
+ if ( $activity_id && isset( $activities_template->activity ) && isset( $activities_template->activity->type ) && ! in_array( $activities_template->activity->type, $allow_media_activity_type, true ) ) {
add_action( 'before_rtmedia_comment_uploader_display', 'rtmedia_before_rtmedia_comment_uploader_display_callback', 10 );
- echo rtmedia_bp_activity_entry_comments_id_callback( $activity_id, 'activity', $activities_template->activity->component );
+ echo wp_kses( rtmedia_bp_activity_entry_comments_id_callback( $activity_id, 'activity', $activities_template->activity->component ), RTMedia::expanded_allowed_tags() );
remove_action( 'before_rtmedia_comment_uploader_display', 'rtmedia_before_rtmedia_comment_uploader_display_callback', 10 );
}
}
-
-function rtmedia_before_rtmedia_comment_uploader_display_callback( $flag ){
+/**
+ * Display comment uploader or not.
+ *
+ * @param bool $flag Flag to show uploader.
+ *
+ * @return bool
+ */
+function rtmedia_before_rtmedia_comment_uploader_display_callback( $flag ) {
+ // todo:remove if not used.
return true;
}
+/**
+ * Enable media upload in comments.
+ */
function rtmedia_enable_comment_media_uplaod() {
+
global $rtmedia;
$comment_media = false;
@@ -3901,25 +4102,34 @@ function rtmedia_enable_comment_media_uplaod() {
}
if ( $comment_media ) {
- /*
- * Add Comment Media in rtMedia Popup
- */
+
+ // Add Comment Media in rtMedia Popup.
add_action( 'rtmedia_add_comments_extra', 'rtmedia_add_comments_extra_callback', 10 );
- /*
- * Add Media Upload in Activity
- */
+ // Add Media Upload in Activity.
add_action( 'bp_activity_entry_comments', 'rtmedia_bp_activity_entry_comments_callback', 10 );
}
}
-function rtmedia_bp_activity_entry_comments_id_callback( $id, $type, $context = "activity" ) {
- if( class_exists( 'RTMediaComment' ) ){
- /*add media in comment*/
+/**
+ * Function to upload media in comment.
+ *
+ * @param int $id Media id.
+ * @param string $type Type of media.
+ * @param string $context Media content.
+ *
+ * @return string|void
+ */
+function rtmedia_bp_activity_entry_comments_id_callback( $id, $type, $context = 'activity' ) {
+ if ( class_exists( 'RTMediaComment' ) ) {
+ // add media in comment.
return RTMediaComment::add_uplaod_media_button( $id, $type, $context );
}
}
+/**
+ * Add extra button in comments.
+ */
function rtmedia_add_comments_extra_callback() {
global $rtmedia_media;
$context = 'activity';
@@ -3927,67 +4137,80 @@ function rtmedia_add_comments_extra_callback() {
if ( is_array( $rtmedia_media->context ) ) {
$context = $rtmedia_media->context;
}
+
$rtmedia_id = rtmedia_id();
if ( $rtmedia_id ) {
- echo rtmedia_bp_activity_entry_comments_id_callback( $rtmedia_id, 'rtmedia', $context );
+ echo wp_kses( rtmedia_bp_activity_entry_comments_id_callback( $rtmedia_id, 'rtmedia', $context ), RTMedia::expanded_allowed_tags() );
}
}
-/**
- * check if the show desc in album gallery setting is set or not
- * @return boolean if the general is enable then return true or else false
- */
if ( ! function_exists( 'rtmedia_get_album_description_setting' ) ) {
+
+ /**
+ * Check if the show desc in album gallery setting is set or not
+ *
+ * @return boolean if the general is enable then return true or else false
+ */
function rtmedia_get_album_description_setting() {
$return = false;
global $rtmedia;
- if ( isset( $rtmedia->options ) && isset( $rtmedia->options['general_enableAlbums_description'] ) && 1 == intval( $rtmedia->options['general_enableAlbums_description'] ) ) {
+
+ if ( isset( $rtmedia->options ) && isset( $rtmedia->options['general_enableAlbums_description'] ) && 1 === intval( $rtmedia->options['general_enableAlbums_description'] ) ) {
$return = true;
}
return $return;
}
}
-
if ( ! function_exists( 'rtmedia_hide_title_media_gallery' ) ) {
+
+ /**
+ * Hides title of media gallery.
+ *
+ * @param bool|string $media_type Media type to check.
+ *
+ * @return string
+ */
function rtmedia_hide_title_media_gallery( $media_type = false ) {
+
global $rtmedia_query;
// Check if the page is gallery shortcode or not.
$is_gallery_shortcode = ( isset( $rtmedia_query->is_gallery_shortcode ) && true === $rtmedia_query->is_gallery_shortcode ) ? true : false;
- $return = 'hide';
- $media_type_allow = array();
- $media_type_allow = apply_filters( 'rtmedia_show_title_media_gallery', $media_type_allow );
+ $return = 'hide';
+ $media_type_allow = array();
+ $media_type_allow = apply_filters( 'rtmedia_show_title_media_gallery', $media_type_allow );
if ( ! is_array( $media_type_allow ) ) {
$media_type_allow = array();
}
// Set this class for allowed media type and gallery shortcode.
- if ( ( is_array( $media_type_allow ) && ! empty( $media_type ) && in_array( $media_type, $media_type_allow ) ) || ( true === $is_gallery_shortcode ) ) {
+ if ( ( is_array( $media_type_allow ) && ! empty( $media_type ) && in_array( $media_type, $media_type_allow, true ) ) || ( true === $is_gallery_shortcode ) ) {
$return = 'show';
}
+
return $return;
}
}
-
-/**
- * echo the title of the media
- *
- * @global array $rtmedia_backbone
- *
- * @return string
- */
if ( ! function_exists( 'rtmedia_show_title' ) ) {
+
+ /**
+ * Echo the title of the media
+ *
+ * @global array $rtmedia_backbone
+ *
+ * @return string
+ */
function rtmedia_show_title() {
global $rtmedia_backbone;
if ( ! empty( $rtmedia_backbone['backbone'] ) ) {
- $media_title = filter_input( INPUT_POST, 'media_title', FILTER_SANITIZE_STRING );
+ $media_title = sanitize_text_field( filter_input( INPUT_POST, 'media_title', FILTER_SANITIZE_STRING ) );
if ( empty( $media_title ) ) {
- $media_title = filter_input( INPUT_GET, 'media_title', FILTER_SANITIZE_STRING );
+ $media_title = sanitize_text_field( filter_input( INPUT_GET, 'media_title', FILTER_SANITIZE_STRING ) );
}
if ( empty( $media_title ) || 'false' === $media_title ) {
return 'hide';
@@ -3996,8 +4219,10 @@ function rtmedia_show_title() {
return 'show';
} else {
+
global $rtmedia_media;
$media_class = 'hide';
+
if ( isset( $rtmedia_media->media_type ) && function_exists( 'rtmedia_hide_title_media_gallery' ) ) {
$media_class = rtmedia_hide_title_media_gallery( $rtmedia_media->media_type );
}
@@ -4009,8 +4234,9 @@ function rtmedia_show_title() {
/**
* Fetch user as per keyword.
*
- * @param [string] $user
- * @return [string] $user_id
+ * @param string $user User keyword.
+ *
+ * @return string
*/
function rtm_select_user( $user ) {
$user_ids = array();
@@ -4025,7 +4251,6 @@ function rtm_select_user( $user ) {
}
}
-
$user_id = implode( ',', $user_ids );
return $user_id;
}
@@ -4036,7 +4261,9 @@ function rtm_select_user( $user ) {
* @author Yahil
*
* @since 4.4
- * @param string $type user member type string
+ *
+ * @param string $type user member type string.
+ *
* @return string $member_id
*/
function rtm_fetch_user_by_member_type( $type ) {
@@ -4047,7 +4274,7 @@ function rtm_fetch_user_by_member_type( $type ) {
if ( ! empty( $type ) ) {
$member_args = array(
- 'member_type' => array( $type ),
+ 'member_type' => array( $type ),
);
if ( rtm_is_buddypress_activate() && bp_has_members( $member_args ) ) {
@@ -4065,13 +4292,13 @@ function rtm_fetch_user_by_member_type( $type ) {
}
/**
- * Check member type set or not.
- *
- * @author Yahil
- *
- * @since 4.4
- * @return bool
- */
+ * Check member type set or not.
+ *
+ * @author Yahil
+ *
+ * @since 4.4
+ * @return bool
+ */
function rtm_check_member_type() {
$status = false;
@@ -4087,12 +4314,13 @@ function rtm_check_member_type() {
return $status;
}
+
/**
* Checking if media search option are enabled
*
- * @global RTMedia $rtmedia
+ * @global RTMedia $rtmedia
*
- * @return bool
+ * @return bool
*/
function rtmedia_media_search_enabled() {
@@ -4106,7 +4334,6 @@ function rtmedia_media_search_enabled() {
}
/**
- *
* Will Check that if the BuddyPress plugin is activated or not.
*
* @return bool True if BuddyPress is activated or else False.
@@ -4114,7 +4341,7 @@ function rtmedia_media_search_enabled() {
function rtm_is_buddypress_activate() {
// check if is_plugin_active exists or not.
if ( ! function_exists( 'is_plugin_active' ) ) {
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
return is_plugin_active( 'buddypress/bp-loader.php' );
@@ -4123,8 +4350,9 @@ function rtm_is_buddypress_activate() {
/**
* Get the uploader url for uploading media.
*
- * @param url $request_uri sub url of current page.
- * @return url URL of uploader.
+ * @param string $request_uri sub url of current page.
+ *
+ * @return string URL of uploader.
*/
function rtmedia_get_upload_url( $request_uri ) {
@@ -4133,15 +4361,21 @@ function rtmedia_get_upload_url( $request_uri ) {
$slug_split = array_values( array_filter( $slug_split ) );
$rtmedia_slug = '/' . RTMEDIA_MEDIA_SLUG;
$slug_pos = strrpos( $url, $rtmedia_slug );
+
// check position of media slug for end of the URL.
if ( is_array( $slug_split ) && ! empty( $slug_split ) && false !== $slug_pos ) {
+
// replace media slug with the blank space.
- $url_upload = substr( $url, 0, $slug_pos );
- $url = trailingslashit( $url_upload ) . 'upload/';
+ $url_upload = substr( $url, 0, $slug_pos );
+ $url = trailingslashit( $url_upload ) . 'upload/';
+
} else {
+
// If url contains '?' then put query string at last.
if ( strstr( $url, '?' ) ) {
+
$url_arr = explode( '?', $url );
+
if ( is_array( $url_arr ) && ! empty( $url_arr ) && count( $url_arr ) > 1 ) {
$sub_url = isset( $url_arr[0] ) ? $url_arr[0] : '';
$query_string = isset( $url_arr[1] ) ? $url_arr[1] : '';
@@ -4158,9 +4392,9 @@ function rtmedia_get_upload_url( $request_uri ) {
/**
* Checking if document upload is enabled.
*
- * @global RTMedia $rtmedia
+ * @global RTMedia $rtmedia
*
- * @return bool
+ * @return bool
*/
function is_rtmedia_upload_document_enabled() {
@@ -4176,9 +4410,9 @@ function is_rtmedia_upload_document_enabled() {
/**
* Checking if other media upload is enabled.
*
- * @global RTMedia $rtmedia
+ * @global RTMedia $rtmedia
*
- * @return bool
+ * @return bool
*/
function is_rtmedia_upload_other_enabled() {
@@ -4195,6 +4429,7 @@ function is_rtmedia_upload_other_enabled() {
* Format a number to human readable format.
*
* @param Integer $n Number to be formatted.
+ *
* @return String Return format a number to human readable format.
*/
function rtmedia_number_to_human_readable( $n ) {
@@ -4214,8 +4449,8 @@ function rtmedia_number_to_human_readable( $n ) {
/**
* Activity exporter with attachments for GDPR
*
- * @param string $email_address user email address.
- * @param int $page page no to fetch data from.
+ * @param string $email_address user email address.
+ * @param int $page page no to fetch data from.
*
* @return array
*/
@@ -4251,19 +4486,19 @@ function rtmedia_activity_exporter( $email_address, $page = 1 ) {
global $wpdb;
- $query = $wpdb->prepare(
- 'SELECT * FROM ' . $wpdb->prefix . "bp_activity WHERE user_id=%d and type='rtmedia_update' LIMIT %d OFFSET %d",
- $user_id,
- $number,
- $number * ( $page - 1 )
- );
-
$activities_args = array( $user_id, $number, $page );
$activities_cache_key = md5( wp_json_encode( $activities_args ) );
$activities = wp_cache_get( $activities_cache_key, 'activity_exporter' );
if ( false === $activities ) {
- $activities = $wpdb->get_results( $query );
+ $activities = $wpdb->get_results(
+ $wpdb->prepare(
+ 'SELECT * FROM ' . $wpdb->prefix . "bp_activity WHERE user_id=%d and type='rtmedia_update' LIMIT %d OFFSET %d",
+ $user_id,
+ $number,
+ $number * ( $page - 1 )
+ )
+ );
wp_cache_set( $activities_cache_key, $activities, 'activity_exporter', 300 );
}
@@ -4276,8 +4511,6 @@ function rtmedia_activity_exporter( $email_address, $page = 1 ) {
$group_id = 'activity';
$group_label = esc_html__( 'rtMedia Activities', 'buddypress-media' );
- $query = $wpdb->prepare( 'SELECT media_id, media_title FROM ' . $wpdb->prefix . 'rt_rtm_media WHERE activity_id=%d', $activity_id );
-
$activity_args = array( $user_id, $activity_id );
$activity_cache_key = md5( wp_json_encode( $activity_args ) );
$activity_count_args = array( $user_id, $activity_id, 'count' );
@@ -4286,7 +4519,7 @@ function rtmedia_activity_exporter( $email_address, $page = 1 ) {
$activity_count = wp_cache_get( $activity_count_key, 'activity_exporter' );
if ( false === $activity_results || false === $activity_count ) {
- $activity_results = $wpdb->get_results( $query );
+ $activity_results = $wpdb->get_results( $wpdb->prepare( 'SELECT media_id, media_title FROM ' . $wpdb->prefix . 'rt_rtm_media WHERE activity_id=%d', $activity_id ) );
$activity_count = $wpdb->num_rows;
wp_cache_set( $activity_cache_key, $activity_results, 'activity_exporter', 300 );
@@ -4330,12 +4563,11 @@ function rtmedia_activity_exporter( $email_address, $page = 1 ) {
);
}
-
/**
* Shortcode upload exporter with for GDPR
*
- * @param string $email_address user email address.
- * @param int $page page no to fetch data from.
+ * @param string $email_address user email address.
+ * @param int $page page no to fetch data from.
*
* @return array
*/
@@ -4370,12 +4602,6 @@ function rtmedia_shortcode_upload_exporter( $email_address, $page = 1 ) {
global $wpdb;
- $query = $wpdb->prepare( 'SELECT media.media_id, media.media_title, media.upload_date, album.media_title AS album_title FROM ' . $wpdb->prefix . 'rt_rtm_media AS media, ' . $wpdb->prefix . 'rt_rtm_media AS album WHERE media.album_id=album.id AND media.activity_id=0 AND media.media_author=%d LIMIT %d OFFSET %d',
- $user_id,
- $number,
- $number * ( $page - 1 )
- );
-
$upload_args = array( $user_id, $number, $page );
$upload_cache_key = md5( wp_json_encode( $upload_args ) );
$media_count_args = array( $user_id, $number, $page, 'count' );
@@ -4384,7 +4610,14 @@ function rtmedia_shortcode_upload_exporter( $email_address, $page = 1 ) {
$media_count = wp_cache_get( $media_count_key, 'upload_exporter' );
if ( false === $media || false === $media_count ) {
- $media = $wpdb->get_results( $query );
+ $media = $wpdb->get_results(
+ $wpdb->prepare(
+ 'SELECT media.media_id, media.media_title, media.upload_date, album.media_title AS album_title FROM ' . $wpdb->prefix . 'rt_rtm_media AS media, ' . $wpdb->prefix . 'rt_rtm_media AS album WHERE media.album_id=album.id AND media.activity_id=0 AND media.media_author=%d LIMIT %d OFFSET %d',
+ $user_id,
+ $number,
+ $number * ( $page - 1 )
+ )
+ );
$media_count = $wpdb->num_rows;
wp_cache_set( $upload_cache_key, $media, 'upload_exporter', 300 );
@@ -4411,7 +4644,7 @@ function rtmedia_shortcode_upload_exporter( $email_address, $page = 1 ) {
'value' => $media_title,
),
array(
- 'name' => __( 'Media URL', 'buddypress-media' ),
+ 'name' => esc_html__( 'Media URL', 'buddypress-media' ),
'value' => $media_url,
),
array(
@@ -4438,8 +4671,8 @@ function rtmedia_shortcode_upload_exporter( $email_address, $page = 1 ) {
/**
* Activity Comment exporter with attachments for GDPR
*
- * @param string $email_address user email address.
- * @param int $page page no to fetch data from.
+ * @param string $email_address user email address.
+ * @param int $page page no to fetch data from.
*
* @return array
*/
@@ -4474,13 +4707,6 @@ function rtmedia_activity_comments_exporter( $email_address, $page = 1 ) {
global $wpdb;
- $query = $wpdb->prepare(
- 'SELECT * FROM ' . $wpdb->prefix . "bp_activity WHERE user_id=%d and type='activity_comment' LIMIT %d OFFSET %d",
- $user_id,
- $number,
- $number * ( $page - 1 )
- );
-
$activity_comment_args = array( $user_id, $number, $page );
$activity_comment_cache_key = md5( wp_json_encode( $activity_comment_args ) );
$comment_count_args = array( $user_id, $number, $page, 'count' );
@@ -4489,7 +4715,14 @@ function rtmedia_activity_comments_exporter( $email_address, $page = 1 ) {
$comments = wp_cache_get( $activity_comment_cache_key, 'comments_exporter' );
if ( false === $comments || false === $comment_count ) {
- $comments = $wpdb->get_results( $query );
+ $comments = $wpdb->get_results(
+ $wpdb->prepare(
+ 'SELECT * FROM ' . $wpdb->prefix . "bp_activity WHERE user_id=%d and type='activity_comment' LIMIT %d OFFSET %d",
+ $user_id,
+ $number,
+ $number * ( $page - 1 )
+ )
+ );
$comment_count = $wpdb->num_rows;
wp_cache_set( $activity_comment_cache_key, $comments, 'comments_exporter', 300 );
@@ -4505,14 +4738,12 @@ function rtmedia_activity_comments_exporter( $email_address, $page = 1 ) {
$group_id = 'activity-comment';
$group_label = esc_html__( 'rtMedia Activity Comments', 'buddypress-media' );
- $query = $wpdb->prepare( 'SELECT media_id, media_title FROM ' . $wpdb->prefix . 'rt_rtm_media WHERE activity_id=%d', $comment_id );
-
$comment_args = array( $user_id, $comment_id );
$comment_cache_key = md5( wp_json_encode( $comment_args ) );
$comment_results = wp_cache_get( $comment_cache_key, 'comments_exporter' );
if ( false === $comment_results ) {
- $comment_results = $wpdb->get_results( $query );
+ $comment_results = $wpdb->get_results( $wpdb->prepare( 'SELECT media_id, media_title FROM ' . $wpdb->prefix . 'rt_rtm_media WHERE activity_id=%d', $comment_id ) );
wp_cache_set( $comment_cache_key, $comment_results, 'comments_exporter', 300 );
}
@@ -4557,8 +4788,8 @@ function rtmedia_activity_comments_exporter( $email_address, $page = 1 ) {
/**
* Media view exporter for GDPR
*
- * @param string $email_address user email address.
- * @param int $page page no to fetch data from.
+ * @param string $email_address user email address.
+ * @param int $page page no to fetch data from.
*
* @return array
*/
@@ -4608,7 +4839,7 @@ function rtmedia_media_view_exporter( $email_address, $page = 1 ) {
$views = wp_cache_get( $view_cache_key, 'view_exporter' );
if ( false === $views || false === $view_count ) {
- $views = $wpdb->get_results( $query );
+ $views = $wpdb->get_results( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$view_count = $wpdb->num_rows;
wp_cache_set( $view_cache_key, $views, 'view_exporter', 300 );
@@ -4616,6 +4847,7 @@ function rtmedia_media_view_exporter( $email_address, $page = 1 ) {
}
foreach ( $views as $view ) {
+
$no_of_views = $view->value;
$first_view_date = $view->action_date;
$item_id = 'media-view' . $view->id;
@@ -4658,8 +4890,8 @@ function rtmedia_media_view_exporter( $email_address, $page = 1 ) {
/**
* Media Like exporter with attachments for GDPR
*
- * @param string $email_address user email address.
- * @param int $page page no to fetch data from.
+ * @param string $email_address user email address.
+ * @param int $page page no to fetch data from.
*
* @return array
*/
@@ -4709,7 +4941,7 @@ function rtmedia_media_like_exporter( $email_address, $page = 1 ) {
$likes = wp_cache_get( $likes_cache_key, 'like_exporter' );
if ( false === $likes || false === $like_count ) {
- $likes = $wpdb->get_results( $query );
+ $likes = $wpdb->get_results( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$like_count = $wpdb->num_rows;
wp_cache_set( $likes_cache_key, $likes, 'like_exporter', 300 );
@@ -4756,8 +4988,8 @@ function rtmedia_media_like_exporter( $email_address, $page = 1 ) {
/**
* Media eraser for GDPR
*
- * @param string $email_address user email address.
- * @param int $page page no to fetch data from.
+ * @param string $email_address user email address.
+ * @param int $page page no to fetch data from.
*
* @return array
*/
@@ -4790,7 +5022,7 @@ function rtmedia_eraser( $email_address, $page = 1 ) {
$number * ( $page - 1 )
);
- $media_ids = $wpdb->get_col( $query );
+ $media_ids = $wpdb->get_col( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
foreach ( $media_ids as $media_id ) {
@@ -4813,8 +5045,9 @@ function rtmedia_eraser( $email_address, $page = 1 ) {
/**
* Media album eraser for GDPR
*
- * @param string $email_address user email address.
- * @param int $page page no to fetch data from.
+ * @param string $email_address user email address.
+ * @param int $page page no to fetch data from.
+ *
* @return array
*/
function rtmedia_album_eraser( $email_address, $page = 1 ) {
@@ -4842,15 +5075,18 @@ function rtmedia_album_eraser( $email_address, $page = 1 ) {
$default_albums = rtmedia_global_albums();
$default_album_str = '';
$default_album_postid_str = '';
+
foreach ( $default_albums as $default_album ) {
$default_album_str .= $default_album . ',';
$default_album_postid_str .= rtmedia_media_id( $default_album ) . ',';
}
+
$default_album_str = rtrim( $default_album_str, ',' );
$default_album_postid_str = rtrim( $default_album_postid_str, ',' );
+ // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
$query = $wpdb->prepare(
- 'DELETE FROM ' . $wpdb->prefix . "rt_rtm_media WHERE media_type='album' AND media_author=%d AND id NOT IN (" . $default_album_str . ") LIMIT %d",
+ 'DELETE FROM ' . $wpdb->prefix . "rt_rtm_media WHERE media_type='album' AND media_author=%d AND id NOT IN (" . $default_album_str . ') LIMIT %d',
$user_data->ID,
$number
);
@@ -4858,13 +5094,13 @@ function rtmedia_album_eraser( $email_address, $page = 1 ) {
$items_removed = $wpdb->query( $query );
$query = $wpdb->prepare(
- 'DELETE FROM ' . $wpdb->prefix . "posts WHERE post_type='rtmedia_album' AND post_author=%d AND ID NOT IN (" . $default_album_postid_str . ") LIMIT %d",
+ 'DELETE FROM ' . $wpdb->prefix . "posts WHERE post_type='rtmedia_album' AND post_author=%d AND ID NOT IN (" . $default_album_postid_str . ') LIMIT %d',
$user_data->ID,
$number
);
$items_removed += $wpdb->query( $query );
-
+ // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
$done = ( $items_removed < $number );
return array(
@@ -4875,12 +5111,12 @@ function rtmedia_album_eraser( $email_address, $page = 1 ) {
);
}
-
/**
* Media like eraser for GDPR
*
- * @param string $email_address user email address.
- * @param int $page page no to fetch data from.
+ * @param string $email_address user email address.
+ * @param int $page page no to fetch data from.
+ *
* @return array
*/
function rtmedia_like_eraser( $email_address, $page = 1 ) {
@@ -4911,7 +5147,7 @@ function rtmedia_like_eraser( $email_address, $page = 1 ) {
$number
);
- $items_removed = $wpdb->query( $query );
+ $items_removed = $wpdb->query( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$done = ( $items_removed < $number );
diff --git a/app/main/controllers/upload/RTMediaUpload.php b/app/main/controllers/upload/RTMediaUpload.php
index ec6015ef2..804331f5b 100755
--- a/app/main/controllers/upload/RTMediaUpload.php
+++ b/app/main/controllers/upload/RTMediaUpload.php
@@ -1,18 +1,50 @@
array(
- 'id' => array(),
- 'href' => array(),
+ 'id' => array(),
+ 'href' => array(),
'target' => array(),
),
'p' => array(),
);
/**
+ * RTMediaUpload constructor.
*
- * @param array $uploaded
- *
+ * @param array $uploaded Uploaded media details.
*/
public function __construct( $uploaded ) {
/**
- * prepare to upload a file
+ * Prepare to upload a file
*/
$this->file = new RTMediaUploadFile( $uploaded );
+
/**
- * prepare to upload a url
+ * Prepare to upload a url
*/
$this->url = new RTMediaUploadUrl();
+
/**
- * prepare media object to populate the album
+ * Prepare media object to populate the album
*/
$this->media = new RTMediaMedia();
/**
- * upload the intity according to the mode of request
+ * Upload the entity according to the mode of request
* either file_upload or link_input
*/
$file_object = $this->upload( $uploaded );
/**
- * if upload successful then populate the rtMedia database and insert the media into album
+ * If upload successful then populate the rtMedia database and insert the media into album
*/
if ( ! is_wp_error( $file_object ) && $file_object && $uploaded ) {
+
$this->media_ids = $this->media->add( $uploaded, $file_object );
do_action( 'rtemdia_after_file_upload_before_activity', $file_object, $this );
+
if ( $this->media_ids ) {
return true;
} else {
@@ -70,13 +106,14 @@ public function __construct( $uploaded ) {
}
/**
- * upload a file or a link input
+ * Upload a file or a link input
*
- * @param type $uploaded
+ * @param array $uploaded Uploaded media details.
*
- * @return type
+ * @return mixed
*/
- function upload( $uploaded ) {
+ public function upload( $uploaded ) {
+
switch ( $uploaded['mode'] ) {
case 'file_upload':
if ( isset( $uploaded['files'] ) ) {
@@ -85,7 +122,6 @@ function upload( $uploaded ) {
break;
case 'link_input':
return $this->url->init( $uploaded );
- break;
default:
do_action( 'rtmedia_upload_' . $uploaded['mode'], $uploaded );
}
diff --git a/app/main/controllers/upload/RTMediaUploadEndpoint.php b/app/main/controllers/upload/RTMediaUploadEndpoint.php
index d4e6bf3f6..d276e6998 100755
--- a/app/main/controllers/upload/RTMediaUploadEndpoint.php
+++ b/app/main/controllers/upload/RTMediaUploadEndpoint.php
@@ -1,85 +1,118 @@
*/
+
+/**
+ * Class to handle media upload endpoint.
+ */
class RTMediaUploadEndpoint {
+ /**
+ * Uploaded media details.
+ *
+ * @var array
+ */
public $upload;
/**
- *
+ * RTMediaUploadEndpoint constructor.
*/
public function __construct() {
add_action( 'rtmedia_upload_redirect', array( $this, 'template_redirect' ) );
}
/**
+ * Handles media upload redirection.
*
+ * @param bool $create_activity If create activity or not.
+ *
+ * @return array|bool
*/
- // todo refactor below function so it takes param also and use if passed else use POST request
- function template_redirect( $create_activity = true ) {
+ public function template_redirect( $create_activity = true ) {
+ // todo refactor below function so it takes param also and use if passed else use POST request.
ob_start();
- if ( ! count( $_POST ) ) { // @codingStandardsIgnoreLine
+ if ( ! count( $_POST ) ) { // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
include get_404_template();
} else {
- $nonce = $mode = '';
- $_activity_id = - 1;
- if ( isset( $_REQUEST['rtmedia_upload_nonce'] ) ) {
- $nonce = sanitize_text_field( wp_unslash( $_REQUEST['rtmedia_upload_nonce'] ) );
- }
- if ( isset( $_REQUEST['mode'] ) ) {
- $mode = sanitize_text_field( wp_unslash( $_REQUEST['mode'] ) );
- }
+ $nonce = sanitize_text_field( wp_unslash( filter_input( INPUT_POST, 'rtmedia_upload_nonce', FILTER_SANITIZE_STRING ) ) );
+ $mode = sanitize_text_field( wp_unslash( filter_input( INPUT_POST, 'mode', FILTER_SANITIZE_STRING ) ) );
+ $_redirection = sanitize_text_field( wp_unslash( filter_input( INPUT_POST, 'redirection', FILTER_SANITIZE_STRING ) ) );
+ $_redirect = sanitize_text_field( wp_unslash( filter_input( INPUT_POST, 'redirect', FILTER_SANITIZE_STRING ) ) );
+ $_activity_id = filter_input( INPUT_POST, 'activity_id', FILTER_VALIDATE_INT );
+ $_redirect_url = filter_input( INPUT_POST, 'redirect', FILTER_SANITIZE_NUMBER_INT );
- if ( isset( $_REQUEST['activity_id'] ) ) {
- $_activity_id = sanitize_text_field( $_REQUEST['activity_id'] );
- }
+ global $rtmedia;
+
+ // When activity upload terms are enabled on activity page, we check whether someone has removed the html element or not.
+ if ( ! empty( $rtmedia->options['activity_enable_upload_terms'] ) ) {
- if ( isset( $_REQUEST['redirection'] ) ) {
- $_redirection = sanitize_text_field( $_REQUEST['redirection'] );
+ // When media comment is uploaded, comment_media_activity_id will be there, so we check if it's not there.
+ $activity_request = wp_unslash( filter_input( INPUT_POST, 'activity_terms_condition_request', FILTER_SANITIZE_STRING ) );
+ if ( ! empty( $activity_request ) ) {
+ $terms_condition = wp_unslash( filter_input( INPUT_POST, 'activity_terms_condition', FILTER_SANITIZE_STRING ) );
+ if ( empty( $terms_condition ) ) {
+ // This will be uploaded by JavaScript only so we send json response.
+ wp_send_json_error( esc_html__( 'Terms and Conditions checkbox not found!', 'buddypress-media' ) );
+ }
+ }
}
- if ( isset( $_REQUEST['redirect'] ) ) {
- $_redirect = sanitize_text_field( $_REQUEST['redirect'] );
+ // When activity upload terms are enabled on media upload page, we check whether someone has removed the html element or not.
+ if ( ! empty( $rtmedia->options['general_enable_upload_terms'] ) ) {
+
+ $uploader_request = wp_unslash( filter_input( INPUT_POST, 'uploader_terms_condition_request', FILTER_SANITIZE_STRING ) );
+ // We check for all other contexts, group and profile is checked above.
+ if ( ! empty( $uploader_request ) ) {
+ $terms_condition = wp_unslash( filter_input( INPUT_POST, 'uploader_terms_condition', FILTER_SANITIZE_STRING ) );
+ if ( empty( $terms_condition ) ) {
+ // This will be uploaded by JavaScript only so we send json response.
+ wp_send_json_error( esc_html__( 'Terms and Conditions checkbox not found!', 'buddypress-media' ) );
+ }
+ }
}
- $_redirect_url = filter_input( INPUT_POST, 'redirect', FILTER_SANITIZE_NUMBER_INT );
- $rtupload = false;
- $activity_id = - 1;
- $redirect_url = '';
+ $rtupload = false;
+ $activity_id = - 1;
+ $redirect_url = '';
+ $permalink = '';
+ $thumb_image = '';
+
if ( wp_verify_nonce( $nonce, 'rtmedia_upload_nonce' ) ) {
$model = new RTMediaUploadModel();
do_action( 'rtmedia_upload_set_post_object' );
$this->upload = $model->set_post_object();
- if ( - 1 !== $_activity_id ) {
+
+ if ( -1 !== $_activity_id ) {
$this->upload['activity_id'] = $_activity_id;
$activity_id = $_activity_id;
}
- //if media upload is being made for a group, identify the group privacy and set media privacy accordingly
+ // if media upload is being made for a group, identify the group privacy and set media privacy accordingly.
if ( isset( $this->upload['context'] ) && isset( $this->upload['context_id'] ) && 'group' === $this->upload['context'] && function_exists( 'groups_get_group' ) ) {
$group = groups_get_group( array( 'group_id' => $this->upload['context_id'] ) );
+
if ( isset( $group->status ) && 'public' !== $group->status ) {
- // if group is not public, then set media privacy as 20, so only the group members can see the images
+ // if group is not public, then set media privacy as 20, so only the group members can see the images.
$this->upload['privacy'] = '20';
} else {
- // if group is public, then set media privacy as 0
+ // if group is public, then set media privacy as 0.
$this->upload['privacy'] = '0';
}
}
$comment_media = false;
- // if media is add in from the comment media section
+ // if media is add in from the comment media section.
if ( isset( $this->upload['comment_media_activity_id'] ) && ! empty( $this->upload['comment_media_activity_id'] ) ) {
- // if group is public, then set media privacy as 0
- global $rtmedia;
+ // if group is public, then set media privacy as 0.
$privacy = '0';
+
if ( isset( $rtmedia->options['privacy_enabled'] ) && isset( $rtmedia->options['privacy_default'] ) ) {
$privacy = $rtmedia->options['privacy_default'];
}
@@ -87,39 +120,42 @@ function template_redirect( $create_activity = true ) {
if ( class_exists( 'RTMediaAlbum' ) ) {
$album_id = RTMediaAlbum::get_default();
} else {
- $album = rtmedia_get_site_option( 'rtmedia-global-albums' );
- $album_id = $album_id = $album[0];
+ $album = rtmedia_get_site_option( 'rtmedia-global-albums' );
+ $album_id = $album[0];
}
- $current_media_id = preg_replace( '/[^0-9]/', '', $this->upload['comment_media_activity_id'] );
+ $current_media_id = preg_replace( '/[^0-9]/', '', $this->upload['comment_media_activity_id'] );
$current_media_type = preg_replace( '/[^a-z]/', '', $this->upload['comment_media_activity_id'] );
if ( $current_media_id ) {
- $comment_media = true;
- $context = 'profile';
- $context_id = get_current_user_id();
- $media_obj = new RTMediaMedia();
+ $comment_media = true;
+ $context = 'profile';
+ $context_id = get_current_user_id();
+ $media_obj = new RTMediaMedia();
- if ( 'rtmedia' == $current_media_type ) {
- /* search from media id*/
+ if ( 'rtmedia' === $current_media_type ) {
+ // search from media id.
$media = $media_obj->model->get( array( 'id' => $current_media_id ) );
} else {
- /* search from activity id*/
+ // search from activity id.
$media = $media_obj->model->get( array( 'activity_id' => $current_media_id ) );
}
if ( ! empty( $media[0] ) && $media[0]->album_id ) {
- $album_id = $media[0]->album_id;
- $privacy = $media[0]->privacy;
- $context = $media[0]->context;
+
+ $album_id = $media[0]->album_id;
+ $privacy = $media[0]->privacy;
+ $context = $media[0]->context;
$context_id = $media[0]->context_id;
+
} else {
- /* search from the BuddyPress Table */
+
+ // search from the BuddyPress Table.
$media = bp_activity_get_specific( array( 'activity_ids' => $current_media_id ) );
if ( isset( $media['activities'][0]->component ) ) {
- if ( $media['activities'][0]->component != 'activity' ) {
+ if ( 'activity' !== $media['activities'][0]->component ) {
$context = $media['activities'][0]->component;
}
}
@@ -130,17 +166,16 @@ function template_redirect( $create_activity = true ) {
}
$this->upload['album_id'] = $album_id;
- $this->upload['privacy'] = $privacy;
+ $this->upload['privacy'] = $privacy;
- if ( 0 == strrpos( $context , 'comment-media' ) ) {
+ if ( 0 === strrpos( $context, 'comment-media' ) ) {
$this->upload['context'] = 'comment-media';
}
$this->upload['context_id'] = $context_id;
- }// End if().
-
- }// End if().
+ } // End if.
+ } // End if.
$this->upload = apply_filters( 'rtmedia_media_param_before_upload', $this->upload );
$rtupload = new RTMediaUpload( $this->upload );
@@ -149,17 +184,19 @@ function template_redirect( $create_activity = true ) {
add_rtmedia_meta( $rtupload->media_ids[0], 'rtmedia_comment_media', true );
if ( isset( $media[0]->id ) ) {
- // add in comment media the parent media id
+ // add in comment media the parent media id.
add_rtmedia_meta( $rtupload->media_ids[0], 'rtmedia_comment_media_id', $media[0]->id );
- // add in parent media the comment media id
- $get_rtmedia_meta = array();
+ // add in parent media the comment media id.
+ $get_rtmedia_meta = array();
$get_rtmedia_meta_old = get_rtmedia_meta( $media[0]->id, 'has_comment_media' );
+
if ( is_array( $get_rtmedia_meta_old ) ) {
foreach ( $get_rtmedia_meta_old as $value ) {
$get_rtmedia_meta[] = $value;
}
}
+
$get_rtmedia_meta[] = $rtupload->media_ids[0];
update_rtmedia_meta( $media[0]->id, 'has_comment_media', $get_rtmedia_meta );
}
@@ -173,80 +210,101 @@ function template_redirect( $create_activity = true ) {
}
}
- $media_obj = new RTMediaMedia();
- $media = $media_obj->model->get( array( 'id' => $rtupload->media_ids[0] ) );
- $rtmedia_nav = new RTMediaNav();
- $perma_link = '';
+ $media_obj = new RTMediaMedia();
+ $media = $media_obj->model->get( array( 'id' => $rtupload->media_ids[0] ) );
+ $rtmedia_nav = new RTMediaNav();
+
if ( isset( $media ) && count( $media ) > 0 ) {
- $perma_link = get_rtmedia_permalink( $media[0]->id );
+
+ $permalink = get_rtmedia_permalink( $media[0]->id );
+
if ( 'photo' === $media[0]->media_type ) {
$thumb_image = rtmedia_image( 'rt_media_thumbnail', $rtupload->media_ids[0], false );
} elseif ( 'music' === $media[0]->media_type ) {
$thumb_image = $media[0]->cover_art;
- } else {
- $thumb_image = '';
}
if ( 'group' === $media[0]->context ) {
- $rtmedia_nav->refresh_counts( $media[0]->context_id, array(
- 'context' => $media[0]->context,
- 'context_id' => $media[0]->context_id,
- ) );
+ $rtmedia_nav->refresh_counts(
+ $media[0]->context_id,
+ array(
+ 'context' => $media[0]->context,
+ 'context_id' => $media[0]->context_id,
+ )
+ );
} else {
- $rtmedia_nav->refresh_counts( $media[0]->media_author, array(
- 'context' => 'profile',
- 'media_author' => $media[0]->media_author,
- ) );
+ $rtmedia_nav->refresh_counts(
+ $media[0]->media_author,
+ array(
+ 'context' => 'profile',
+ 'media_author' => $media[0]->media_author,
+ )
+ );
}
+
if ( false !== $create_activity && class_exists( 'BuddyPress' ) && bp_is_active( 'activity' ) ) {
$allow_single_activity = apply_filters( 'rtmedia_media_single_activity', false );
// Following will not apply to activity uploads. For first time activity won't be generated.
// Create activity first and pass activity id in response.
+ // todo rtmedia_media_single_activity filter. It will create 2 activity with same media if uploaded from activity page.
+ $_rtmedia_update = sanitize_text_field( filter_input( INPUT_POST, 'rtmedia_update', FILTER_SANITIZE_STRING ) );
- // todo fixme rtmedia_media_single_activity filter. It will create 2 activity with same media if uploaded from activity page.
-
- $_rtmedia_update = filter_input( INPUT_POST, 'rtmedia_update', FILTER_SANITIZE_STRING );
if ( ( -1 === intval( $activity_id ) && ( ! ( isset( $_rtmedia_update ) && 'true' === $_rtmedia_update ) ) ) || $allow_single_activity ) {
$activity_id = $media_obj->insert_activity( $media[0]->media_id, $media[0] );
} else {
+
$media_obj->model->update( array( 'activity_id' => $activity_id ), array( 'id' => $rtupload->media_ids[0] ) );
- //
$same_medias = $media_obj->model->get( array( 'activity_id' => $activity_id ) );
$update_activity_media = array();
+
foreach ( $same_medias as $a_media ) {
$update_activity_media[] = $a_media->id;
}
+
$privacy = filter_input( INPUT_POST, 'privacy', FILTER_SANITIZE_NUMBER_INT );
+
if ( empty( $privacy ) ) {
$privacy = 0;
}
$obj_activity = new RTMediaActivity( $update_activity_media, $privacy, false );
+
global $wpdb, $bp;
$user = get_userdata( $same_medias[0]->media_author );
$username = '
' . esc_html( $user->display_name ) . ' ';
- $action = sprintf( esc_html__( '%s added %d %s', 'buddypress-media' ), $username, count( $same_medias ), RTMEDIA_MEDIA_SLUG );
- $action = apply_filters( 'rtmedia_buddypress_action_text_fitler_multiple_media', $action, $username, count( $same_medias ), $user->display_name );
- $wpdb->update( $bp->activity->table_name, array(
- 'type' => 'rtmedia_update',
- 'content' => $obj_activity->create_activity_html(),
- 'action' => $action,
- ), array( 'id' => $activity_id ) );
+
+ // translators: 1: Username, 2: Number of medias, 3: Media slug.
+ $action = sprintf( esc_html__( '%1$s added %2$d %3$s', 'buddypress-media' ), $username, count( $same_medias ), RTMEDIA_MEDIA_SLUG );
+ $action = apply_filters( 'rtmedia_buddypress_action_text_fitler_multiple_media', $action, $username, count( $same_medias ), $user->display_name );
+
+ $wpdb->update(
+ $bp->activity->table_name,
+ array(
+ 'type' => 'rtmedia_update',
+ 'content' => $obj_activity->create_activity_html(),
+ 'action' => $action,
+ ),
+ array( 'id' => $activity_id )
+ );
}
- // update group last active
+ // update group last active.
if ( 'group' === $media[0]->context ) {
RTMediaGroup::update_last_active( $media[0]->context_id );
}
}
}
- if ( isset( $this->upload['rtmedia_simple_file_upload'] ) && true == $this->upload['rtmedia_simple_file_upload'] ) {
+
+ if ( isset( $this->upload['rtmedia_simple_file_upload'] ) && '1' === strval( $this->upload['rtmedia_simple_file_upload'] ) ) {
+
if ( isset( $media ) && count( $media ) > 0 ) {
- if ( ( ( isset( $_redirection ) && 'true' === $_redirection ) || ( isset( $_redirect ) && 'no' !== $_redirect ) ) &&
- isset( $_redirect_url ) ) {
+
+ if ( ( ( isset( $_redirection ) && 'true' === $_redirection ) || ( isset( $_redirect ) && 'no' !== $_redirect ) ) && isset( $_redirect_url ) ) {
+
if ( intval( $_redirect_url ) > 1 ) {
- //bulkurl
+
+ // bulk url.
if ( 'group' === $media[0]->context ) {
$redirect_url = trailingslashit( get_rtmedia_group_link( $media[0]->context_id ) ) . RTMEDIA_MEDIA_SLUG;
} else {
@@ -255,6 +313,7 @@ function template_redirect( $create_activity = true ) {
} else {
$redirect_url = get_rtmedia_permalink( $media[0]->id );
}
+
$redirect_url = apply_filters( 'rtmedia_simple_file_upload_redirect_url_filter', $redirect_url );
wp_safe_redirect( esc_url_raw( $redirect_url ) );
die();
@@ -268,12 +327,12 @@ function template_redirect( $create_activity = true ) {
}
$redirect_url = '';
- if ( ( ( isset( $_redirection ) && 'true' === $_redirection ) || ( isset( $_redirect ) && 'no' !== $_redirect ) ) &&
- isset( $_redirect_url ) && is_numeric( $_redirect_url ) ) {
+ if ( ( ( isset( $_redirection ) && 'true' === $_redirection ) || ( isset( $_redirect ) && 'no' !== $_redirect ) ) && isset( $_redirect_url ) && is_numeric( $_redirect_url ) ) {
if ( intval( $_redirect_url ) > 1 ) {
- //bulkurl
- if ( 'group' === $media[0]->context ) {
+
+ // bulk url.
+ if ( ! empty( $media[0] ) && 'group' === $media[0]->context ) {
$redirect_url = trailingslashit( get_rtmedia_group_link( $media[0]->context_id ) ) . RTMEDIA_MEDIA_SLUG;
} else {
$redirect_url = trailingslashit( get_rtmedia_user_link( $media[0]->media_author ) ) . RTMEDIA_MEDIA_SLUG;
@@ -282,36 +341,40 @@ function template_redirect( $create_activity = true ) {
$redirect_url = get_rtmedia_permalink( $media[0]->id );
}
}
- // Ha ha ha
+ // Ha ha ha.
ob_end_clean();
- //check for simpe
- $rtmedia_update = filter_input( INPUT_POST, 'rtmedia_update', FILTER_SANITIZE_STRING );
+ // check for simple.
+ $rtmedia_update = sanitize_text_field( filter_input( INPUT_POST, 'rtmedia_update', FILTER_SANITIZE_STRING ) );
$_user_agent = rtm_get_server_var( 'HTTP_USER_AGENT', 'FILTER_SANITIZE_STRING' );
+
/**
- * if(redirect)
- *
+ * If(redirect)
*/
if ( ! empty( $rtmedia_update ) && 'true' === $rtmedia_update ) {
- if ( preg_match( '/(?i)msie [1-9]/', $_user_agent ) ) { // if IE(<=9) set content type = text/plain
+
+ if ( preg_match( '/(?i)msie [1-9]/', $_user_agent ) ) { // if IE(<=9) set content type = text/plain.
header( 'Content-type: text/plain' );
} else {
header( 'Content-type: application/json' );
}
echo wp_json_encode( $rtupload->media_ids );
+
} else {
- // Media Upload Case - on album/post/profile/group
- if ( isset( $media[0] ) ) {
+
+ // Media Upload Case - on album/post/profile/group.
+ if ( ! empty( $media[0] ) ) {
$data = array(
'media_id' => $media[0]->id,
'activity_id' => $activity_id,
'redirect_url' => $redirect_url,
- 'permalink' => $perma_link,
+ 'permalink' => $permalink,
'cover_art' => $thumb_image,
);
} else {
$data = array();
}
- if ( preg_match( '/(?i)msie [1-9]/', $_user_agent ) ) { // if IE(<=9) set content type = text/plain
+
+ if ( preg_match( '/(?i)msie [1-9]/', $_user_agent ) ) { // if IE(<=9) set content type = text/plain.
header( 'Content-type: text/plain' );
} else {
header( 'Content-type: application/json' );
diff --git a/app/main/controllers/upload/RTMediaUploadHelper.php b/app/main/controllers/upload/RTMediaUploadHelper.php
index 83b9730af..76faa6ae7 100755
--- a/app/main/controllers/upload/RTMediaUploadHelper.php
+++ b/app/main/controllers/upload/RTMediaUploadHelper.php
@@ -1,25 +1,25 @@
*/
+
+/**
+ * Helper class for PL Upload - Upload files via AJAX Request
+ */
class RTMediaUploadHelper {
/**
- *
+ * RTMediaUploadHelper constructor.
*/
- public function __construct() {
-
- }
+ public function __construct() {}
/**
- *
+ * Function to perform file upload.
*/
- static function file_upload() {
+ public static function file_upload() {
$end_point = new RTMediaUploadEndpoint();
$end_point->template_redirect();
diff --git a/app/main/controllers/upload/RTMediaUploadModel.php b/app/main/controllers/upload/RTMediaUploadModel.php
index 0ca60f018..ffe859d65 100755
--- a/app/main/controllers/upload/RTMediaUploadModel.php
+++ b/app/main/controllers/upload/RTMediaUploadModel.php
@@ -1,12 +1,21 @@
*/
+
+/**
+ * Class to handle uploaded media operations.
+ */
class RTMediaUploadModel {
+ /**
+ * Uploaded media details.
+ *
+ * @var array
+ */
public $upload = array(
'mode' => 'file_upload',
'context' => false,
@@ -22,11 +31,15 @@ class RTMediaUploadModel {
);
/**
+ * Set uploaded media data in class upload object.
+ *
+ * @param array $upload_params array of parameters.
*
* @return array
*/
- function set_post_object( $upload_params = array() ) {
- $upload_array = empty( $upload_params ) ? $_POST : $upload_params; // @codingStandardsIgnoreLine
+ public function set_post_object( $upload_params = array() ) {
+ // todo: check what's in POST.
+ $upload_array = empty( $upload_params ) ? $_POST : $upload_params; // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
$this->upload = wp_parse_args( $upload_array, $this->upload );
$this->sanitize_object();
@@ -34,10 +47,11 @@ function set_post_object( $upload_params = array() ) {
}
/**
+ * Check if context is set for uploaded media.
*
* @return boolean
*/
- function has_context() {
+ public function has_context() {
if ( isset( $this->upload['context_id'] ) && ! empty( $this->upload['context_id'] ) ) {
return true;
}
@@ -46,15 +60,16 @@ function has_context() {
}
/**
+ * Assign values to upload media object.
*
* @global type $rtmedia_interaction
*/
- function sanitize_object() {
+ public function sanitize_object() {
if ( ! $this->has_context() ) {
- // Set context_id to Logged in user id if context is profile and context_id is not provided
+ // Set context_id to Logged in user id if context is profile and context_id is not provided.
if ( 'profile' === $this->upload['context'] || 'bp_member' === $this->upload['context'] ) {
- $this->upload['context'] = 'profile';
+ $this->upload['context'] = 'profile';
$this->upload['context_id'] = get_current_user_id();
} else {
global $rtmedia_interaction;
@@ -79,9 +94,13 @@ function sanitize_object() {
if ( ! $this->has_author() ) {
$this->set_author();
}
+
if ( is_rtmedia_privacy_enable() ) {
+
if ( is_rtmedia_privacy_user_overide() ) {
+
$privacy = filter_input( INPUT_POST, 'privacy', FILTER_SANITIZE_NUMBER_INT );
+
if ( is_null( $privacy ) ) {
$this->upload['privacy'] = get_rtmedia_default_privacy();
} else {
@@ -96,22 +115,27 @@ function sanitize_object() {
}
/**
+ * Get uploaded media author.
*
- * @return type
+ * @return int
*/
- function has_author() {
+ public function has_author() {
return $this->upload['media_author'];
}
- function set_author() {
+ /**
+ * Set upload media author as current user.
+ */
+ public function set_author() {
$this->upload['media_author'] = get_current_user_id();
}
/**
+ * Check if album id is set.
*
* @return boolean
*/
- function has_album_id() {
+ public function has_album_id() {
if ( ! $this->upload['album_id'] || 'undefined' === $this->upload['album_id'] ) {
return false;
}
@@ -120,28 +144,31 @@ function has_album_id() {
}
/**
+ * Check album permissions.
*
* @return boolean
*/
- function has_album_permissions() {
- //yet to be coded for the privacy options of the album
+ public function has_album_permissions() {
+ // yet to be coded for the privacy options of the album.
return true;
}
/**
+ * Check if album exists.
*
- * @param type $id
+ * @param int $id Album id.
*
* @return boolean
*/
- function album_id_exists( $id ) {
+ public function album_id_exists( $id ) {
+ // todo:remove if not used anywhere.
return true;
}
/**
- *
+ * Set Album id to upload media based on Buddypress enabled.
*/
- function set_album_id() {
+ public function set_album_id() {
if ( class_exists( 'BuddyPress' ) ) {
$this->set_bp_album_id();
} else {
@@ -150,9 +177,9 @@ function set_album_id() {
}
/**
- *
+ * Set Album id to upload media based on current page.
*/
- function set_bp_album_id() {
+ public function set_bp_album_id() {
if ( bp_is_blog_page() ) {
$this->set_wp_album_id();
} else {
@@ -161,29 +188,29 @@ function set_bp_album_id() {
}
/**
+ * Set Album id to upload media.
*
- * @throws RTMediaUploadException
+ * @throws RTMediaUploadException Throws for upload error.
*/
- function set_wp_album_id() {
+ public function set_wp_album_id() {
if ( isset( $this->upload['context'] ) ) {
+
$this->upload['album_id'] = $this->upload['context_id'];
- // If context is profile then set album_id to default global album
+
+ // If context is profile then set album_id to default global album.
if ( 'profile' === $this->upload['context'] ) {
$this->upload['album_id'] = RTMediaAlbum::get_default();
}
} else {
- throw new RTMediaUploadException( 9 ); // Invalid Context
+ throw new RTMediaUploadException( 9 ); // Invalid Context.
}
}
/**
- *
+ * Set album id.
*/
- function set_bp_component_album_id() {
+ public function set_bp_component_album_id() {
switch ( bp_current_component() ) {
- case 'groups':
- $this->upload['album_id'] = RTMediaAlbum::get_default();
- break;
default:
$this->upload['album_id'] = RTMediaAlbum::get_default();
break;
diff --git a/app/main/controllers/upload/RTMediaUploadView.php b/app/main/controllers/upload/RTMediaUploadView.php
index 487d8fc94..5c53c5e18 100755
--- a/app/main/controllers/upload/RTMediaUploadView.php
+++ b/app/main/controllers/upload/RTMediaUploadView.php
@@ -1,29 +1,54 @@
attributes = $attr;
}
- static function upload_nonce_generator( $echo = true, $only_nonce = false ) {
+ /**
+ * Function to generate nonce for media upload.
+ *
+ * @param bool $echo Weather to echo or not.
+ * @param bool $only_nonce Weather to return only nonce.
+ *
+ * @return false|string
+ */
+ public static function upload_nonce_generator( $echo = true, $only_nonce = false ) {
if ( $echo ) {
- wp_nonce_field( 'rtmedia_upload_nonce', 'rtmedia_upload_nonce' );
+ /**
+ * If we use wp_nonce_field, it'll create a hidden field with ID, which will generate HTML warning.
+ * Because this nonce is being used in multiple places on the same page.
+ */
+ echo '
';
} else {
+
if ( $only_nonce ) {
return wp_create_nonce( 'rtmedia_upload_nonce' );
}
+
$token = array(
'action' => 'rtmedia_upload_nonce',
'nonce' => wp_create_nonce( 'rtmedia_upload_nonce' ),
@@ -36,13 +61,15 @@ static function upload_nonce_generator( $echo = true, $only_nonce = false ) {
/**
* Render the uploader shortcode and attach the uploader panel
*
- * @param type $template_name
+ * @param string $template_name Template name to render.
*/
public function render( $template_name ) {
global $rtmedia_query;
$album = '';
+
if ( apply_filters( 'rtmedia_render_select_album_upload', true ) ) {
+
if ( $rtmedia_query && isset( $rtmedia_query->media_query ) && isset( $rtmedia_query->media_query['album_id'] ) && is_rtmedia_album( $rtmedia_query->media_query['album_id'] ) ) {
$album = '
';
} elseif ( is_rtmedia_album_enable() && $rtmedia_query && is_rtmedia_gallery() ) {
@@ -50,22 +77,26 @@ public function render( $template_name ) {
if ( isset( $rtmedia_query->query['context'] ) && 'profile' === $rtmedia_query->query['context'] ) {
$album = '
' . esc_html__( 'Album', 'buddypress-media' ) . ': ' . rtmedia_user_album_list() . ' ';
}
+
if ( isset( $rtmedia_query->query['context'] ) && 'group' === $rtmedia_query->query['context'] ) {
$album = '
' . esc_html__( 'Album', 'buddypress-media' ) . ': ' . rtmedia_group_album_list() . ' ';
}
}
}
- $up_privacy = $privacy = ''; //uploader privacy dropdown for uploader under rtMedia Media tab.
+
+ $privacy = '';
+ $up_privacy = ''; // uploader privacy dropdown for uploader under rtMedia Media tab.
+
if ( is_rtmedia_privacy_enable()
&& ( ( ! isset( $rtmedia_query->is_upload_shortcode ) || false === $rtmedia_query->is_upload_shortcode ) )
|| ( isset( $rtmedia_query->is_upload_shortcode ) && ! isset( $this->attributes['privacy'] ) )
) {
if ( ( isset( $rtmedia_query->query['context'] ) && 'group' === $rtmedia_query->query['context'] ) || ( function_exists( 'bp_is_groups_component' ) && bp_is_groups_component() ) ) {
- // bp_get_group_status() is always reurning NULL.
+ // bp_get_group_status() is always returning NULL.
// So fetched data from DB and assigned to media.
global $wpdb;
- // BP Groups tablename.
+ // BP Groups table name.
$table_name = $wpdb->prefix . 'bp_groups';
// Will fetch ID of current group.
$group_id = bp_get_current_group_id();
@@ -75,7 +106,7 @@ public function render( $template_name ) {
if ( false === $group_status ) {
// Query to fetch current group's privacy status.
- $group_status = $wpdb->get_var( 'SELECT `status` FROM ' . $table_name . ' WHERE id = ' . $group_id );
+ $group_status = $wpdb->get_var( 'SELECT `status` FROM ' . $table_name . ' WHERE id = ' . $group_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
// Set data in transient for better performance.
set_transient( 'group_status_' . $group_id, $group_status );
@@ -89,10 +120,14 @@ public function render( $template_name ) {
$privacy_levels_array = apply_filters( 'rtmedia_group_privacy_levels', $privacy_levels_array );
$privacy_val = $privacy_levels_array[ $group_status ];
- $up_privacy = $privacy = "
";
+ $up_privacy = "
";
+ $privacy = $up_privacy;
+
} else {
+
$up_privacy = new RTMediaPrivacy( false );
$up_privacy = $up_privacy->select_privacy_ui( false, 'rtSelectPrivacy' );
+
if ( $up_privacy ) {
$privacy = "
" . esc_html__( 'Privacy:', 'buddypress-media' ) . ' ' . $up_privacy . ' ';
}
@@ -119,9 +154,11 @@ public function render( $template_name ) {
$upload_tab_html = $upload_tabs['file_upload']['content'];
} else {
$upload_tab_html = '
';
+
foreach ( $upload_tabs as $single_tab ) {
$upload_tab_html .= '' . $single_tab['title'] . ' ';
}
+
$upload_tab_html .= ' ';
foreach ( $upload_tabs as $single_tab ) {
$upload_tab_html .= $single_tab['content'];
@@ -133,23 +170,25 @@ public function render( $template_name ) {
}
global $rtmedia;
- $rtmedia_comment_main = "rtmedia-comment-action-update";
- $rtmedia_comment_container = "rtmedia-comment-media-upload-container";
- $rtmedia_comment_button = "rtmedia-comment-media-upload";
- $rtmedia_comment_filelist = "rtmedia_uploader_filelist";
- $rtmedia_comment_context = "activity";
- if(
- ( isset( $this->attributes['upload_parent_id'] ) && ! empty( $this->attributes['upload_parent_id'] ) )
+ $rtmedia_comment_main = 'rtmedia-comment-action-update';
+ $rtmedia_comment_container = 'rtmedia-comment-media-upload-container';
+ $rtmedia_comment_button = 'rtmedia-comment-media-upload';
+ $rtmedia_comment_filelist = 'rtmedia_uploader_filelist';
+ $rtmedia_comment_context = 'activity';
+ if (
+ ( isset( $this->attributes['upload_parent_id'] ) && ! empty( $this->attributes['upload_parent_id'] ) )
&&
- ( isset( $this->attributes['upload_parent_id_type'] ) && ! empty( $this->attributes['upload_parent_id_type'] ) )
- ){
- $main_id = '-'.$this->attributes['upload_parent_id_type'].'-'.$this->attributes['upload_parent_id'];
- $rtmedia_comment_main .= $main_id;
+ ( isset( $this->attributes['upload_parent_id_type'] ) && ! empty( $this->attributes['upload_parent_id_type'] ) )
+ ) {
+ $main_id = '-' . $this->attributes['upload_parent_id_type'] . '-' . $this->attributes['upload_parent_id'];
+ $rtmedia_comment_main .= $main_id;
$rtmedia_comment_container .= $main_id;
- $rtmedia_comment_button .= $main_id;
- $rtmedia_comment_filelist .= $main_id;
- $up_privacy = $privacy = "
";
- if( isset( $this->attributes['upload_parent_id_context'] ) ){
+ $rtmedia_comment_button .= $main_id;
+ $rtmedia_comment_filelist .= $main_id;
+ $up_privacy = "
";
+ $privacy = $up_privacy;
+
+ if ( isset( $this->attributes['upload_parent_id_context'] ) ) {
$rtmedia_comment_context = $this->attributes['upload_parent_id_context'];
}
}
@@ -195,15 +234,15 @@ public function render( $template_name ) {
. '
'
. '
',
),
- 'comment' => array(
+ 'comment' => array(
'title' => esc_html__( 'File Upload', 'buddypress-media' ),
'content' =>
'
'
- . '
'
+ . '
'
. '
'
- . ''
. apply_filters( 'rtmedia_uploader_after_comment_upload_button', '' )
. '
'
- . ''
+ . ''
. '
',
),
),
@@ -225,23 +264,44 @@ public function render( $template_name ) {
$tabs = apply_filters( 'rtmedia_upload_tabs', $tabs );
$attr = $this->attributes;
- $mode = filter_input( INPUT_GET, 'mode', FILTER_SANITIZE_STRING );
+ $mode = sanitize_text_field( filter_input( INPUT_GET, 'mode', FILTER_SANITIZE_STRING ) );
+
if ( is_null( $mode ) || false === $mode || ! array_key_exists( $mode, $tabs ) ) {
$mode = 'file_upload';
}
+
if ( $attr && is_array( $attr ) ) {
+
foreach ( $attr as $key => $val ) {
- $selector = "id";
- if( ( $key == 'upload_parent_id' && ! empty( $key ) ) || ( $key == 'upload_parent_id_type' && ! empty( $key ) ) ){
- $selector = "class";
+ $selector = 'id';
+
+ if ( ( 'upload_parent_id' === $key && ! empty( $key ) ) || ( 'upload_parent_id_type' === $key && ! empty( $key ) ) ) {
+ $selector = 'class';
+ }
+
+ // We use associated array for O(1) time, which increases performance.
+ $elems_with_class = array(
+ 'comment' => 1,
+ 'privacy' => 1,
+ 'upload_parent_id_context' => 1,
+ );
+
+ /**
+ * These will be repeated for all activities, which will result in duplicate elements with same IDs.
+ * So adding these as class.
+ */
+ if ( ! empty( $elems_with_class[ $key ] ) ) {
+ $selector = 'class';
}
+
?>
-
="rt_upload_hf_"
- value=''
- name=''/>
+
="rt_upload_hf_"
+ value=''
+ name=''/>
*/
+
+/**
+ * Class responsible for uploading a file to the website.
+ */
class RTMediaUploadFile {
- var $files;
- var $fake = false;
- var $uploaded = false;
+ /**
+ * Uploaded file details.
+ *
+ * @var array
+ */
+ public $files;
- function __construct( $uploaded ) {
+ /**
+ * File is uploaded or not.
+ *
+ * @var bool
+ */
+ public $fake = false; // todo:find usage.
+
+ /**
+ * File details.
+ *
+ * @var bool |array
+ */
+ public $uploaded = false;
+
+ /**
+ * RTMediaUploadFile constructor.
+ *
+ * @param array $uploaded Uploaded file details.
+ */
+ public function __construct( $uploaded ) {
$this->uploaded = $uploaded;
}
/**
* Initialize the upload process
*
- * @param type $files
+ * @param array $files Array of file details.
*
- * @return type
+ * @return array
*/
- function init( $files ) {
+ public function init( $files ) {
$this->set_file( $files );
$this->unset_invalid_files();
@@ -33,27 +59,37 @@ function init( $files ) {
}
/**
- * core process of upload
+ * Core process of upload
+ *
+ * @return array|bool|WP_Error
+ *
+ * @throws RTMediaUploadException Throws exception when error occurs while uploading media.
*/
- function process() {
- // hook for before file upload process
+ public function process() {
+ // hook for before file upload process.
do_action( 'rtmedia_before_file_upload_process' );
- include_once( ABSPATH . 'wp-admin/includes/file.php' );
- include_once( ABSPATH . 'wp-admin/includes/image.php' );
+ include_once ABSPATH . 'wp-admin/includes/file.php';
+ include_once ABSPATH . 'wp-admin/includes/image.php';
$upload_type = $this->fake ? 'wp_handle_sideload' : 'wp_handle_upload';
- //todo why use $rt_set_filter_uplaod_dir global variable if we can remove filter for upload_dir after upload finish
+ // todo why use $rt_set_filter_uplaod_dir global variable if we can remove filter for upload_dir after upload finish.
global $rt_set_filter_uplaod_dir;
+
if ( ! isset( $rt_set_filter_uplaod_dir ) ) {
add_filter( 'upload_dir', array( $this, 'upload_dir' ) );
$rt_set_filter_uplaod_dir = true;
}
+
if ( isset( $this->files ) && count( $this->files ) > 0 ) {
+
+ $uploaded_file = array();
+
foreach ( $this->files as $key => $file ) {
- $uploaded_file[] = $upload_type ( $file, array( 'test_form' => false ) );
+ $uploaded_file[] = $upload_type( $file, array( 'test_form' => false ) );
+
try {
if ( isset( $uploaded_file[ $key ]['error'] ) || is_null( $uploaded_file[ $key ] ) ) {
array_pop( $uploaded_file );
@@ -78,9 +114,19 @@ function process() {
return false;
}
- function upload_dir( $upload_dir ) {
+ /**
+ * Set upload directory to save media.
+ *
+ * @param string $upload_dir Upload directory.
+ *
+ * @return mixed|void
+ */
+ public function upload_dir( $upload_dir ) {
+
global $rtmedia_interaction;
+
if ( isset( $this->uploaded['context'] ) && isset( $this->uploaded['context_id'] ) ) {
+
if ( 'group' !== $this->uploaded['context'] ) {
$rtmedia_upload_prefix = 'users/';
$id = apply_filters( 'rtmedia_current_user', get_current_user_id() );
@@ -89,6 +135,7 @@ function upload_dir( $upload_dir ) {
$id = $this->uploaded['context_id'];
}
} else {
+
if ( 'group' !== $rtmedia_interaction->context->type ) {
$rtmedia_upload_prefix = 'users/';
$id = apply_filters( 'rtmedia_current_user', get_current_user_id() );
@@ -105,7 +152,7 @@ function upload_dir( $upload_dir ) {
$upload_dir['url'] = trailingslashit( str_replace( $upload_dir['subdir'], '', $upload_dir['url'] ) ) . $rtmedia_folder_name . '/' . $rtmedia_upload_prefix . $id . $upload_dir['subdir'];
}
- // set dir as per the upload date
+ // set dir as per the upload date.
if ( isset( $this->uploaded['date'] ) ) {
$str_date = strtotime( $this->uploaded['date'] );
$year_month = date( 'Y/m', $str_date );
@@ -119,15 +166,23 @@ function upload_dir( $upload_dir ) {
return $upload_dir;
}
- function set_file( $files ) {
+ /**
+ * Set file detail to current class to process upload.
+ *
+ * @param array $files Array of file details.
+ *
+ * @throws RTMediaUploadException Error while uploading media.
+ */
+ public function set_file( $files ) {
/**
- * if files parameter is provided then take th file details from that object
+ * If files parameter is provided then take th file details from that object
*/
if ( $files ) {
+
$this->fake = true;
$this->populate_file_array( (array) $this->uploaded['files'] );
/**
- * otherwise check for $_FILES global object from the form submitted
+ * Otherwise check for $_FILES global object from the form submitted
*/
} elseif ( isset( $_FILES['rtmedia_file'] ) ) {
$this->populate_file_array( $_FILES['rtmedia_file'] );
@@ -138,17 +193,17 @@ function set_file( $files ) {
try {
throw new RTMediaUploadException( UPLOAD_ERR_NO_FILE );
} catch ( Exception $e ) {
- error_log( $e->getMessage() );
+ error_log( $e->getMessage() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
}
}
}
/**
- * gather the file information for upload process
+ * Gather the file information for upload process
*
- * @param type $file_array
+ * @param array $file_array File details.
*/
- function populate_file_array( $file_array ) {
+ public function populate_file_array( $file_array ) {
$this->files[] = array(
'name' => isset( $file_array['name'] ) ? $file_array['name'] = str_replace( '%', '-', $file_array['name'] ) : '',
'type' => isset( $file_array['type'] ) ? $file_array['type'] : '',
@@ -163,16 +218,18 @@ function populate_file_array( $file_array ) {
*
* @global type $rtmedia
*
- * @param type $file
+ * @param array $file File details.
*
* @return boolean
- * @throws RTMediaUploadException
+ *
+ * @throws RTMediaUploadException Exception for Invalid context while uploading any media.
*/
- function is_valid_type( $file ) {
+ public function is_valid_type( $file ) {
try {
global $rtmedia;
$allowed_types = array();
$rtmedia->allowed_types = apply_filters( 'rtmedia_allowed_types', $rtmedia->allowed_types );
+
foreach ( $rtmedia->allowed_types as $type ) {
if ( '' !== $type['extn'] && call_user_func( 'is_rtmedia_upload_' . $type['name'] . '_enabled' ) ) {
foreach ( $type['extn'] as $extn ) {
@@ -180,20 +237,24 @@ function is_valid_type( $file ) {
}
}
}
+
$file_data = wp_check_filetype( $file['name'] );
- $allowed_types = apply_filters( 'rtmedia_plupload_files_filter', array(
+ $allowed_types = apply_filters(
+ 'rtmedia_plupload_files_filter',
array(
- 'title' => 'Media Files',
- 'extensions' => implode( ',', $allowed_types ),
- ),
- ) );
+ array(
+ 'title' => esc_html__( 'Media Files', 'buddypress-media' ),
+ 'extensions' => implode( ',', $allowed_types ),
+ ),
+ )
+ );
$allowed_types = explode( ',', $allowed_types[0]['extensions'] );
+
if ( false === in_array( strtolower( $file_data['ext'] ), $allowed_types, true ) ) {
if ( ! preg_match( '/' . implode( '|', $allowed_types ) . '/i', $file['type'], $result ) || ! isset( $result[0] ) ) {
throw new RTMediaUploadException( UPLOAD_ERR_EXTENSION );
}
}
- // $is_valid = $this->id3_validate_type($file);
} catch ( RTMediaUploadException $e ) {
echo esc_html( $e->getMessage() );
@@ -206,9 +267,10 @@ function is_valid_type( $file ) {
/**
* Remove invalid files
*/
- function unset_invalid_files() {
+ public function unset_invalid_files() {
$temp_array = $this->files;
$this->files = null;
+
foreach ( $temp_array as $key => $file ) {
if ( apply_filters( 'rtmedia_valid_type_check', $this->is_valid_type( $file ), $file ) ) {
$this->files[] = $file;
@@ -216,96 +278,125 @@ function unset_invalid_files() {
}
}
- function id3_validate_type( $file ) {
+ /**
+ * Check if file type is valid to upload.
+ *
+ * @param array $file File data.
+ *
+ * @return bool
+ * @throws RTMediaUploadException Throws unacceptable media types exceptions.
+ */
+ public function id3_validate_type( $file ) {
$file_type = explode( '/', $file['type'] );
$type = $file_type[0];
+
switch ( $type ) {
- case 'video' :
+ case 'video':
if ( ! class_exists( 'getID3', true ) ) {
- include_once( trailingslashit( RTMEDIA_PATH ) . 'lib/getid3/getid3.php' );
+ include_once trailingslashit( RTMEDIA_PATH ) . 'lib/getid3/getid3.php';
}
+
try {
- $get_id3 = new getID3;
+ $get_id3 = new getID3();
$vid_info = $get_id3->analyze( $file['tmp_name'] );
} catch ( Exception $e ) {
$this->safe_unlink( $file['tmp_name'] );
- $activity_content = false;
throw new RTMediaUploadException( 0, esc_html__( 'MP4 file you have uploaded is corrupt.', 'buddypress-media' ) );
}
+
if ( is_array( $vid_info ) ) {
+
if ( ! array_key_exists( 'error', $vid_info ) && array_key_exists( 'fileformat', $vid_info ) && array_key_exists( 'video', $vid_info ) && array_key_exists( 'fourcc', $vid_info['video'] ) ) {
if ( ! ( 'mp4' === $vid_info['fileformat'] && 'avc1' === $vid_info['video']['fourcc'] ) ) {
$this->safe_unlink( $file['tmp_name'] );
- $activity_content = false;
throw new RTMediaUploadException( 0, esc_html__( 'The MP4 file you have uploaded is using an unsupported video codec. Supported video codec is H.264.', 'buddypress-media' ) );
}
} else {
$this->safe_unlink( $file['tmp_name'] );
- $activity_content = false;
throw new RTMediaUploadException( 0, esc_html__( 'The MP4 file you have uploaded is using an unsupported video codec. Supported video codec is H.264.', 'buddypress-media' ) );
}
} else {
$this->safe_unlink( $file['tmp_name'] );
- $activity_content = false;
throw new RTMediaUploadException( 0, esc_html__( 'The MP4 file you have uploaded is not a video file.', 'buddypress-media' ) );
}
break;
- case 'audio' :
+ case 'audio':
if ( ! class_exists( 'getID3' ) ) {
- include_once( trailingslashit( RTMEDIA_PATH ) . 'lib/getid3/getid3.php' );
+ include_once trailingslashit( RTMEDIA_PATH ) . 'lib/getid3/getid3.php';
}
+
try {
- $get_id3 = new getID3;
+ $get_id3 = new getID3();
$file_info = $get_id3->analyze( $file['tmp_name'] );
} catch ( Exception $e ) {
$this->safe_unlink( $file['tmp_name'] );
- $activity_content = false;
throw new RTMediaUploadException( 0, esc_html__( 'MP3 file you have uploaded is currupt.', 'buddypress-media' ) );
}
+
if ( is_array( $file_info ) ) {
+
if ( ! array_key_exists( 'error', $file_info ) && array_key_exists( 'fileformat', $file_info ) && array_key_exists( 'audio', $file_info ) && array_key_exists( 'dataformat', $file_info['audio'] ) ) {
if ( ! ( 'mp3' === $file_info['fileformat'] && 'mp3' === $file_info['audio']['dataformat'] ) ) {
$this->safe_unlink( $file['tmp_name'] );
- $activity_content = false;
throw new RTMediaUploadException( 0, esc_html__( 'The MP3 file you have uploaded is using an unsupported audio format. Supported audio format is MP3.', 'buddypress-media' ) );
}
} else {
$this->safe_unlink( $file['tmp_name'] );
- $activity_content = false;
throw new RTMediaUploadException( 0, esc_html__( 'The MP3 file you have uploaded is using an unsupported audio format. Supported audio format is MP3.', 'buddypress-media' ) );
}
} else {
$this->safe_unlink( $file['tmp_name'] );
- $activity_content = false;
throw new RTMediaUploadException( 0, esc_html__( 'The MP3 file you have uploaded is not an audio file.', 'buddypress-media' ) );
}
break;
- case 'image' :
+ case 'image':
break;
- default :
+ default:
$this->safe_unlink( $file['tmp_name'] );
- $activity_content = false;
throw new RTMediaUploadException( 0, esc_html__( 'Media File you have tried to upload is not supported. Supported media files are .jpg, .png, .gif, .mp3, .mov and .mp4.', 'buddypress-media' ) );
}
return true;
}
- function safe_unlink( $file_path ) {
+ /**
+ * Delete file from given path.
+ *
+ * @param string $file_path File path.
+ */
+ public function safe_unlink( $file_path ) {
if ( file_exists( $file_path ) ) {
- if ( function_exists( 'wp_delete_file' ) ) { // wp_delete_file is introduced in WordPress 4.2
+
+ if ( function_exists( 'wp_delete_file' ) ) { // wp_delete_file is introduced in WordPress 4.2.
wp_delete_file( $file_path );
} else {
- unlink( $file_path ); // @codingStandardsIgnoreLine
+ unlink( $file_path );
}
}
}
- function exif( $file ) {
+ /**
+ * Save uploaded file/image.
+ *
+ * @param array $file File information.
+ *
+ * @return mixed
+ * @throws ImagickException Error while processing file.
+ */
+ public function exif( $file ) {
+
$file_parts = pathinfo( $file['file'] );
- if ( in_array( strtolower( $file_parts['extension'] ), array( 'jpg', 'jpeg', 'tiff' ) ) ) {
- $exif = @read_exif_data( $file['file'] );
- $exif_orient = isset( $exif['Orientation'] ) ? $exif['Orientation'] : 0;
+
+ if ( in_array( strtolower( $file_parts['extension'] ), array( 'jpg', 'jpeg', 'tiff' ), true ) ) {
+
+ if ( function_exists( 'read_exif_data' ) ) {
+ $exif = @read_exif_data( $file['file'] ); // phpcs:ignore Generic.PHP.DeprecatedFunctions.Deprecated, WordPress.PHP.NoSilencedErrors.Discouraged, PHPCompatibility.FunctionUse.RemovedFunctions.read_exif_dataDeprecated
+ } else {
+ // read_exif_data is deprecated since PHP 7.2.
+ $exif = @exif_read_data( $file['file'] ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
+ }
+
+ $exif_orient = isset( $exif['Orientation'] ) ? $exif['Orientation'] : 0;
$rotate_image = 0;
$exif_orient = intval( $exif_orient );
@@ -321,7 +412,9 @@ function exif( $file ) {
}
if ( $rotate_image ) {
+
if ( class_exists( 'Imagick' ) ) {
+
$imagick = new Imagick();
$imagick->readImage( $file['file'] );
$imagick->rotateImage( new ImagickPixel(), $rotate_image );
@@ -329,7 +422,9 @@ function exif( $file ) {
$imagick->writeImage( $file['file'] );
$imagick->clear();
$imagick->destroy();
+
} else {
+
$rotate_image = - $rotate_image;
switch ( $file['type'] ) {
@@ -358,11 +453,23 @@ function exif( $file ) {
return $file;
}
- function arrayify( $files ) {
+ /**
+ * Converts files into array.
+ *
+ * @param array|string $files File or array to upload.
+ *
+ * @return mixed
+ */
+ public function arrayify( $files ) {
+ // todo: delete if not used.
+ $updated_files = array();
+
if ( isset( $files['name'] ) && ! is_array( $files['name'] ) ) {
$updated_files[0] = $files;
} else {
+
foreach ( $files as $key => $array ) {
+
foreach ( $array as $index => $value ) {
$updated_files[ $index ][ $key ] = $value;
}
diff --git a/app/main/controllers/upload/processors/RTMediaUploadUrl.php b/app/main/controllers/upload/processors/RTMediaUploadUrl.php
index 688f050c3..9989f5319 100755
--- a/app/main/controllers/upload/processors/RTMediaUploadUrl.php
+++ b/app/main/controllers/upload/processors/RTMediaUploadUrl.php
@@ -1,15 +1,15 @@
*/
class RTMediaDeprecated {
- //put your code here
-
- var $deprecate_notice = false;
+ /**
+ * Deprecate notice.
+ *
+ * @var bool
+ */
+ public $deprecate_notice = false;
- static function uploadshortcode() {
- //
- //add_shortcode('rtmedia_uploader', array($this, 'pre_render'));
+ /**
+ * Upload shortcode.
+ */
+ public static function uploadshortcode() {
$deprecated = false;
$deprecate_notice = '';
- // echo self::generate_notice(__METHOD__, $deprecated, $deprecate_notice);
}
- static function generate_notice( $method, $deprecated = false, $notice = '' ) {
- return sprintf( esc_html__( 'Deprecated %s. Please use %s.', 'buddypress-media' ), $deprecated, $method );
+ /**
+ * Add notice for deprecated method.
+ *
+ * @param string $method Method name.
+ * @param bool $deprecated Deprecated or not.
+ * @param string $notice Notice to show.
+ *
+ * @return string
+ */
+ public static function generate_notice( $method, $deprecated = false, $notice = '' ) {
+ // translators: 1: function name, 2: method.
+ return sprintf( esc_html__( 'Deprecated %1$s. Please use %2$s.', 'buddypress-media' ), $deprecated, $method );
}
}
diff --git a/app/main/interactions/RTMediaInteraction.php b/app/main/interactions/RTMediaInteraction.php
index 3fe5da21f..d5967c074 100755
--- a/app/main/interactions/RTMediaInteraction.php
+++ b/app/main/interactions/RTMediaInteraction.php
@@ -1,32 +1,53 @@
' ) ) {
flush_rewrite_rules( false );
rtmedia_update_site_option( 'rtmedia_flush_rules_plugin_version', $new_version );
}
}
- function init() {
- // set up the routes array
+ /**
+ * Init function for class.
+ */
+ public function init() {
+ // set up the routes array.
$this->route_slugs();
$this->set_context();
$this->set_routers();
@@ -63,13 +95,16 @@ function init() {
/**
* Set up the route slugs' array
*/
- function route_slugs() {
+ public function route_slugs() {
- // filter to add custom slugs for routes
+ // filter to add custom slugs for routes.
$this->slugs = apply_filters( 'rtmedia_default_routes', $this->slugs );
}
- static function rewrite_rules() {
+ /**
+ * Add rewrite rules with RTMedia slugs.
+ */
+ public static function rewrite_rules() {
add_rewrite_rule( '^/' . RTMEDIA_MEDIA_SLUG . '/([0-9]*)/([^/]*)/?', 'index.php?media_id=$matches[1]&action=$matches[2]', 'bottom' );
add_rewrite_rule( '^/' . RTMEDIA_MEDIA_SLUG . '/([0-9]*)/pg/([0-9]*)/?', 'index.php?media_id=$matches[1]&pg=$matches[2]', 'bottom' );
add_rewrite_rule( '^/' . RTMEDIA_MEDIA_SLUG . '/nonce/([^/]*)/?', 'index.php?nonce_type=$matches[1]', 'bottom' );
@@ -78,7 +113,10 @@ static function rewrite_rules() {
do_action( 'rtmedia_add_rewrite_rules' );
}
- static function rewrite_tags() {
+ /**
+ * Add Rewrite tags.
+ */
+ public static function rewrite_tags() {
add_rewrite_tag( '%media_id%', '([0-9]*)' );
add_rewrite_tag( '%action%', '([^/]*)' );
add_rewrite_tag( '%nonce_type%', '([^/]*)' );
@@ -90,16 +128,19 @@ static function rewrite_tags() {
/**
* Just adds the current /{slug}/ to the rewite endpoint
*/
- function endpoint() {
+ public function endpoint() {
foreach ( $this->slugs as $slug ) {
add_rewrite_endpoint( $slug, EP_ALL );
}
}
- function set_routers() {
+ /**
+ * Set routers.
+ */
+ public function set_routers() {
- // set up routes for each slug
+ // set up routes for each slug.
foreach ( $this->slugs as $slug ) {
$this->routes[ $slug ] = new RTMediaRouter( $slug );
}
@@ -108,32 +149,33 @@ function set_routers() {
/**
* Sets up the default context
*/
- function default_context() {
+ public function default_context() {
return new RTMediaContext();
}
/**
+ * Set context.
*
- * @param array $context the context array
+ * @param array|bool $context the context array.
*
* @todo the method should also allow objects
*/
- function set_context( $context = false ) {
+ public function set_context( $context = false ) {
- // take the context supplied and replace the context
+ // take the context supplied and replace the context.
if ( is_array( $context ) && isset( $context['type'] ) && isset( $context['id'] ) ) {
$context_object->type = $context['type'];
$context_object->id = $context['id'];
- // if there is no context array supplied, set the default context
+ // if there is no context array supplied, set the default context.
} else {
$context_object = $this->default_context();
}
- //set the context property
+ // set the context property.
$this->context = $context_object;
}
@@ -141,13 +183,18 @@ function set_context( $context = false ) {
* Reset the context to the default context after temporarily setting it,
* Say, for an upload
*/
- function rewind_context() {
+ public function rewind_context() {
$this->context = $this->default_context();
}
- function set_query() {
+ /**
+ * Function to set global rtMedia_query.
+ */
+ public function set_query() {
+
global $rtmedia_query;
+
if ( $this->routes[ RTMEDIA_MEDIA_SLUG ]->is_template() ) {
$args = array(
'context' => $this->context->type,
@@ -158,18 +205,27 @@ function set_query() {
}
}
- function set_title( $default, $sep = '|' ) {
+ /**
+ * Function to filter title.
+ *
+ * @param string $default Default title.
+ * @param string $sep Separator.
+ *
+ * @return mixed
+ */
+ public function set_title( $default, $sep = '|' ) {
global $wp_query;
global $rtmedia_seo_title;
if ( ! array_key_exists( RTMEDIA_MEDIA_SLUG, $wp_query->query_vars ) ) {
return $default;
}
- $title = '';
- $oldSep = ' ' . $sep . ' ';
- $sep = '';
- global $bp;
- global $rtmedia_query;
+
+ global $bp, $rtmedia_query;
+ $title = '';
+ $old_sep = ' ' . $sep . ' ';
+ $sep = '';
+
if ( isset( $rtmedia_query->query ) && isset( $rtmedia_query->query['media_type'] ) ) {
if ( 'album' === $rtmedia_query->query['media_type'] ) {
if ( isset( $rtmedia_query->media_query ) && isset( $rtmedia_query->media_query['album_id'] ) ) {
@@ -177,7 +233,7 @@ function set_title( $default, $sep = '|' ) {
foreach ( $rtmedia_query->album as $single_album ) {
if ( intval( $single_album->id ) === intval( $rtmedia_query->media_query['album_id'] ) ) {
$title .= $sep . stripslashes( esc_html( ucfirst( $single_album->media_title ) ) );
- $sep = $oldSep;
+ $sep = $old_sep;
}
}
}
@@ -185,42 +241,44 @@ function set_title( $default, $sep = '|' ) {
} else {
if ( isset( $rtmedia_query->media ) && $rtmedia_query->media && count( $rtmedia_query->media ) > 0 ) {
$title .= $sep . stripslashes( esc_html( ucfirst( $rtmedia_query->media[0]->media_title ) ) );
- $sep = $oldSep;
+ $sep = $old_sep;
}
$title .= $sep . ucfirst( $rtmedia_query->query['media_type'] );
- $sep = $oldSep;
+ $sep = $old_sep;
}
} else {
if ( isset( $rtmedia_query->action_query ) && isset( $rtmedia_query->action_query->media_type ) ) {
$title .= $sep . ucfirst( $rtmedia_query->action_query->media_type );
- $sep = $oldSep;
+ $sep = $old_sep;
}
}
+
if ( function_exists( 'bp_is_group' ) ) {
if ( bp_is_groups_component() ) {
- if ( bp_is_group() or bp_is_group_forum_topic() ) {
+ if ( bp_is_group() || bp_is_group_forum_topic() ) {
if ( bp_is_group_forum_topic() ) {
$title .= $sep . bp_get_the_topic_title();
- $sep = $oldSep;
+ $sep = $old_sep;
}
$title .= $sep . bp_get_current_group_name();
- $sep = $oldSep;
+ $sep = $old_sep;
}
}
}
- if ( function_exists( 'bp_get_displayed_user_fullname' ) && bp_displayed_user_id() != 0 ) {
+
+ if ( function_exists( 'bp_get_displayed_user_fullname' ) && 0 !== bp_displayed_user_id() ) {
$title .= $sep . bp_get_displayed_user_fullname();
- $sep = $oldSep;
+ $sep = $old_sep;
} else {
$user_info = get_userdata( get_current_user_id() );
if ( isset( $user_info->data->display_name ) ) {
$title .= $sep . $user_info->data->display_name;
- $sep = $oldSep;
+ $sep = $old_sep;
}
}
$title .= $sep . apply_filters( 'rtmedia_media_tab_name', RTMEDIA_MEDIA_LABEL );
- $sep = $oldSep;
+ $sep = $old_sep;
if ( isset( $this->context->type ) ) {
switch ( $this->context->type ) {
case 'group':
@@ -238,20 +296,27 @@ function set_title( $default, $sep = '|' ) {
break;
}
}
- $title .= $sep . get_bloginfo( 'name' );
+ $title .= $sep . get_bloginfo( 'name' );
$rtmedia_seo_title = $title;
return apply_filters( 'rtmedia_wp_title', $title, $default, $sep );
}
- function rtmedia_wpseo_og_image( $data ) {
+ /**
+ * Change OG Image using Yoast SEO plugin's filter
+ *
+ * @param array $data Image data.
+ *
+ * @return mixed
+ */
+ public function rtmedia_wpseo_og_image( $data ) {
global $wp_query;
if ( class_exists( 'BuddyPress' ) ) {
global $bp;
if ( bp_is_single_activity() ) {
- $mediaObj = new RTMediaModel();
- $media_details = $mediaObj->get( array( 'activity_id' => $bp->current_action ) );
+ $media_obj = new RTMediaModel();
+ $media_details = $media_obj->get( array( 'activity_id' => $bp->current_action ) );
foreach ( $media_details as $media ) {
if ( 'photo' === $media->media_type ) {
$img = wp_get_attachment_image_src( $media->media_id, 'full' );
@@ -262,6 +327,7 @@ function rtmedia_wpseo_og_image( $data ) {
}
}
}
+
if ( ( array_key_exists( 'media', $wp_query->query_vars ) ) ) {
global $rtmedia_query;
if ( isset( $rtmedia_query->media ) && $rtmedia_query->media && count( $rtmedia_query->media ) > 0 ) {
@@ -278,7 +344,14 @@ function rtmedia_wpseo_og_image( $data ) {
return $data;
}
- function rtmedia_wpseo_og_url( $url ) {
+ /**
+ * Change URL using Yoast SEO plugin's filter
+ *
+ * @param string $url OG URL.
+ *
+ * @return string
+ */
+ public function rtmedia_wpseo_og_url( $url ) {
global $wp_query;
if ( ! array_key_exists( 'media', $wp_query->query_vars ) ) {
return $url;
@@ -286,15 +359,19 @@ function rtmedia_wpseo_og_url( $url ) {
$s = empty( $_SERVER['HTTPS'] ) ? '' : ( ( 'on' === $_SERVER['HTTPS'] ) ? 's' : '' );
$sp = strtolower( wp_unslash( $_SERVER['SERVER_PROTOCOL'] ) );
$protocol = substr( $sp, 0, strpos( $sp, '/' ) ) . $s;
- $port = ( '80' === $_SERVER['SERVER_PORT'] ) ? '' : ( ':' . $_SERVER['SERVER_PORT'] ); // @codingStandardsIgnoreLine
+ $port = ( '80' === $_SERVER['SERVER_PORT'] ) ? '' : ( ':' . $_SERVER['SERVER_PORT'] );
- return $protocol . '://' . esc_url( $_SERVER['SERVER_NAME'] ) . esc_url( $port ) . esc_url( $_SERVER['REQUEST_URI'] ); // @codingStandardsIgnoreLine
+ return $protocol . '://' . esc_url( $_SERVER['SERVER_NAME'] ) . esc_url( $port ) . esc_url( $_SERVER['REQUEST_URI'] );
}
- /*
+ /**
* Change description using Yoast SEO plugin's filter
+ *
+ * @param string $desc SEO OG description.
+ *
+ * @return mixed
*/
- function rtmedia_wpseo_og_desc( $desc ) {
+ public function rtmedia_wpseo_og_desc( $desc ) {
global $wp_query;
if ( ! array_key_exists( RTMEDIA_MEDIA_SLUG, $wp_query->query_vars ) ) {
diff --git a/app/main/routers/RTMediaRouter.php b/app/main/routers/RTMediaRouter.php
index 4e33afe78..86dd3150f 100755
--- a/app/main/routers/RTMediaRouter.php
+++ b/app/main/routers/RTMediaRouter.php
@@ -1,6 +1,7 @@
slug( $slug );
$this->template_redirect();
- //
add_filter( 'template_include', array( $this, 'template_include' ), 0, 1 );
add_action( 'wp_ajax_rtmedia_include_gallery_item', array( 'RTMediaTemplate', 'include_gallery_item' ) );
}
@@ -45,21 +47,21 @@ function __construct( $slug = RTMEDIA_MEDIA_SLUG ) {
* Check if there is a constant defined for this route and use that instead
* So, this can be overridden by defining RTMEDIA_MEDIA_SLUG in wp-config.php
*
- * @param string $slug The slug string passed for the route, in the constructor
+ * @param string $slug The slug string passed for the route, in the constructor.
*/
- function slug( $slug ) {
+ public function slug( $slug ) {
- // create the slug constant name
+ // create the slug constant name.
$slug_constant = 'RTMEDIA_' . strtoupper( $slug ) . '_SLUG';
- // check if the constant is defined
+ // check if the constant is defined.
if ( defined( $slug_constant ) ) {
- // assign the value of the constant instead
+ // assign the value of the constant instead.
$slug = constant( $slug_constant );
}
- // set the slug property
+ // set the slug property.
$this->slug = $slug;
}
@@ -69,7 +71,7 @@ function slug( $slug ) {
* @global object $wp_query
* @return boolean
*/
- function is_template() {
+ public function is_template() {
global $wp_query, $rtmedia_query;
$return = isset( $wp_query->query_vars[ $this->slug ] );
@@ -102,43 +104,44 @@ function is_template() {
/**
* Hook into the template redirect action to populate the global objects
- *
*/
- function template_redirect() {
+ public function template_redirect() {
- // if it is not our route, return early
+ // if it is not our route, return early.
if ( ! $this->is_template() ) {
return;
}
status_header( 200 );
- //set up the query variables
+ // set up the query variables.
$this->set_query_vars();
// otherwise provide a hook for only this route,
- // pass the slug to the function hooking here
+ // pass the slug to the function hooking here.
do_action( 'rtmedia_' . $this->slug . '_redirect' );
}
/**
* Hook into the template_include filter to load custom template files
*
- * @param string $template Template file path of the default template
+ * @param string $template Template file path of the default template.
*
* @return string File path of the template file to be loaded
*/
- function template_include( $template ) {
+ public function template_include( $template ) {
- // if it is not our route, return the default template early
+ // if it is not our route, return the default template early.
if ( ! $this->is_template() ) {
return $template;
}
- // otherwise, apply a filter to the template,
- // pass the template and slug to the function hooking here
- // so it can load a custom template
-
+ /**
+ * Otherwise, apply a filter to the template,
+ * pass the template and slug to the function hooking here
+ * so it can load a custom template.
+ */
$template_load = new RTMediaTemplate();
+
global $new_rt_template;
$new_rt_template = $template_load->set_template( $template );
@@ -147,19 +150,23 @@ function template_include( $template ) {
$rt_ajax_request = false;
$req_with = rtm_get_server_var( 'HTTP_X_REQUESTED_WITH', 'FILTER_SANITIZE_STRING' );
- // check if it is an ajax request
+
+ // check if it is an ajax request.
if (
! empty( $req_with ) &&
strtolower( $req_with ) === 'xmlhttprequest'
) {
$rt_ajax_request = true;
}
+
if ( $rt_ajax_request ) {
return $new_rt_template;
}
+
if ( function_exists( 'bp_set_theme_compat_active' ) ) {
bp_set_theme_compat_active( apply_filters( 'rtmedia_main_template_set_theme_compat', true ) );
}
+
add_filter( 'the_content', array( &$this, 'rt_replace_the_content' ) );
$this->rt_theme_compat_reset_post();
@@ -173,18 +180,18 @@ function template_include( $template ) {
*
* @since BuddyPress (1.7)
*
- * @param string $content
+ * @param string $content Content.
*
* @return mixed|string|void
* @global WP_Query $wp_query
* @global object $post
*
* @internal param array $args
- *
*/
- function rt_replace_the_content( $content = '' ) {
+ public function rt_replace_the_content( $content = '' ) {
// Do we have new content to replace the old content?
global $new_rt_template, $rt_template_content;
+
if ( ! isset( $rt_template_content ) ) {
ob_start();
load_template( $new_rt_template );
@@ -193,31 +200,41 @@ function rt_replace_the_content( $content = '' ) {
}
return $rt_template_content;
+
+ // todo:Check usage of code after return statement.
+ // phpcs:disable Squiz.PHP.NonExecutableCode.Unreachable
$new_content = apply_filters( 'bp_replace_the_content', $rt_template_content );
- // Juggle the content around and try to prevent unsightly comments
+ // Juggle the content around and try to prevent unsightly comments.
if ( ! empty( $new_content ) && ( $new_content !== $rt_template_content ) ) {
- // Set the content to be the new content
+ // Set the content to be the new content.
$rt_template_content = $new_content;
- // Clean up after ourselves
+ // Clean up after ourselves.
unset( $new_content );
- // Reset the $post global
+ // Reset the $post global.
wp_reset_postdata();
}
- // Return possibly hi-jacked content
+ // Return possibly hi-jacked content.
return $content;
+ // phpcs:enable Squiz.PHP.NonExecutableCode.Unreachable
}
- function rt_theme_compat_reset_post( $args = array() ) {
+ /**
+ * Reset post function.
+ *
+ * @param array $args Array of arguments.
+ */
+ public function rt_theme_compat_reset_post( $args = array() ) {
global $wp_query, $post;
- // Switch defaults if post is set
+ // Switch defaults if post is set.
global $rtmedia_query;
if ( isset( $wp_query->post ) ) {
+
if ( isset( $rtmedia_query->query ) && isset( $rtmedia_query->query['media_type'] ) && 'album' === $rtmedia_query->query['media_type'] && isset( $rtmedia_query->media_query['album_id'] ) && ! empty( $rtmedia_query->album ) ) {
foreach ( $rtmedia_query->album as $al ) {
if ( intval( $al->id ) === intval( $rtmedia_query->media_query['album_id'] ) ) {
@@ -225,74 +242,82 @@ function rt_theme_compat_reset_post( $args = array() ) {
break;
}
}
- } else if ( isset( $rtmedia_query->media ) && 1 === count( $rtmedia_query->media ) && $rtmedia_query->media ) {
+ } elseif ( isset( $rtmedia_query->media ) && 1 === count( $rtmedia_query->media ) && $rtmedia_query->media ) {
$wp_query->post = get_post( $rtmedia_query->media[0]->media_id );
}
- $dummy = wp_parse_args( $args, array(
- 'ID' => $wp_query->post->ID,
- 'post_status' => $wp_query->post->post_status,
- 'post_author' => $wp_query->post->post_author,
- 'post_parent' => $wp_query->post->post_parent,
- 'post_type' => 'rtmedia',
- 'post_date' => $wp_query->post->post_date,
- 'post_date_gmt' => $wp_query->post->post_date_gmt,
- 'post_modified' => $wp_query->post->post_modified,
- 'post_modified_gmt' => $wp_query->post->post_modified_gmt,
- 'post_content' => $wp_query->post->post_content,
- 'post_title' => $wp_query->post->post_title,
- 'post_excerpt' => $wp_query->post->post_excerpt,
- 'post_content_filtered' => $wp_query->post->post_content_filtered,
- 'post_mime_type' => $wp_query->post->post_mime_type,
- 'post_password' => $wp_query->post->post_password,
- 'post_name' => $wp_query->post->post_name,
- 'guid' => $wp_query->post->guid,
- 'menu_order' => $wp_query->post->menu_order,
- 'pinged' => $wp_query->post->pinged,
- 'to_ping' => $wp_query->post->to_ping,
- 'ping_status' => $wp_query->post->ping_status,
- 'comment_status' => $wp_query->post->comment_status,
- 'comment_count' => $wp_query->post->comment_count,
- 'filter' => $wp_query->post->filter,
-
- 'is_404' => false,
- 'is_page' => false,
- 'is_single' => false,
- 'is_archive' => false,
- 'is_tax' => false,
- ) );
+
+ $dummy = wp_parse_args(
+ $args,
+ array(
+ 'ID' => $wp_query->post->ID,
+ 'post_status' => $wp_query->post->post_status,
+ 'post_author' => $wp_query->post->post_author,
+ 'post_parent' => $wp_query->post->post_parent,
+ 'post_type' => 'rtmedia',
+ 'post_date' => $wp_query->post->post_date,
+ 'post_date_gmt' => $wp_query->post->post_date_gmt,
+ 'post_modified' => $wp_query->post->post_modified,
+ 'post_modified_gmt' => $wp_query->post->post_modified_gmt,
+ 'post_content' => $wp_query->post->post_content,
+ 'post_title' => $wp_query->post->post_title,
+ 'post_excerpt' => $wp_query->post->post_excerpt,
+ 'post_content_filtered' => $wp_query->post->post_content_filtered,
+ 'post_mime_type' => $wp_query->post->post_mime_type,
+ 'post_password' => $wp_query->post->post_password,
+ 'post_name' => $wp_query->post->post_name,
+ 'guid' => $wp_query->post->guid,
+ 'menu_order' => $wp_query->post->menu_order,
+ 'pinged' => $wp_query->post->pinged,
+ 'to_ping' => $wp_query->post->to_ping,
+ 'ping_status' => $wp_query->post->ping_status,
+ 'comment_status' => $wp_query->post->comment_status,
+ 'comment_count' => $wp_query->post->comment_count,
+ 'filter' => $wp_query->post->filter,
+
+ 'is_404' => false,
+ 'is_page' => false,
+ 'is_single' => false,
+ 'is_archive' => false,
+ 'is_tax' => false,
+ )
+ );
} else {
- $dummy = wp_parse_args( $args, array(
- 'ID' => 0,
- 'post_status' => 'public',
- 'post_author' => 0,
- 'post_parent' => 0,
- 'post_type' => 'bp_member',
- 'post_date' => 0,
- 'post_date_gmt' => 0,
- 'post_modified' => 0,
- 'post_modified_gmt' => 0,
- 'post_content' => '',
- 'post_title' => '',
- 'post_excerpt' => '',
- 'post_content_filtered' => '',
- 'post_mime_type' => '',
- 'post_password' => '',
- 'post_name' => '',
- 'guid' => '',
- 'menu_order' => 0,
- 'pinged' => '',
- 'to_ping' => '',
- 'ping_status' => '',
- 'comment_status' => 'closed',
- 'comment_count' => 0,
- 'filter' => 'raw',
- 'is_404' => false,
- 'is_page' => false,
- 'is_single' => false,
- 'is_archive' => false,
- 'is_tax' => false,
- ) );
+ $dummy = wp_parse_args(
+ $args,
+ array(
+ 'ID' => 0,
+ 'post_status' => 'public',
+ 'post_author' => 0,
+ 'post_parent' => 0,
+ 'post_type' => 'bp_member',
+ 'post_date' => 0,
+ 'post_date_gmt' => 0,
+ 'post_modified' => 0,
+ 'post_modified_gmt' => 0,
+ 'post_content' => '',
+ 'post_title' => '',
+ 'post_excerpt' => '',
+ 'post_content_filtered' => '',
+ 'post_mime_type' => '',
+ 'post_password' => '',
+ 'post_name' => '',
+ 'guid' => '',
+ 'menu_order' => 0,
+ 'pinged' => '',
+ 'to_ping' => '',
+ 'ping_status' => '',
+ 'comment_status' => 'closed',
+ 'comment_count' => 0,
+ 'filter' => 'raw',
+ 'is_404' => false,
+ 'is_page' => false,
+ 'is_single' => false,
+ 'is_archive' => false,
+ 'is_tax' => false,
+ )
+ );
}
+
if ( function_exists( 'bp_is_group' ) ) {
if ( bp_is_group() ) {
$dummy['post_type'] = 'bp_group';
@@ -315,19 +340,19 @@ function rt_theme_compat_reset_post( $args = array() ) {
}
}
- // Bail if dummy post is empty
+ // Bail if dummy post is empty.
if ( empty( $dummy ) ) {
return;
}
- // Set the $post global
- $post = new WP_Post( (object) $dummy );// @codingStandardsIgnoreLine
+ // Set the $post global.
+ $post = new WP_Post( (object) $dummy ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
- // Copy the new post global into the main $wp_query
+ // Copy the new post global into the main $wp_query .
$wp_query->post = $post;
- $wp_query->posts = array( $post ); // @codingStandardsIgnoreLine
+ $wp_query->posts = array( $post );
- // Prevent comments form from appearing
+ // Prevent comments form from appearing.
$wp_query->post_count = 1;
$wp_query->is_404 = $dummy['is_404'];
$wp_query->is_page = $dummy['is_page'];
@@ -335,7 +360,7 @@ function rt_theme_compat_reset_post( $args = array() ) {
$wp_query->is_archive = $dummy['is_archive'];
$wp_query->is_tax = $dummy['is_tax'];
- // Clean up the dummy post
+ // Clean up the dummy post.
unset( $dummy );
/**
@@ -349,13 +374,12 @@ function rt_theme_compat_reset_post( $args = array() ) {
}
-
/**
* Break the request URL into an array of variables after the route slug
*
* @global object $wp_query
*/
- function set_query_vars() {
+ public function set_query_vars() {
global $wp_query;
$query_vars_array = '';
diff --git a/app/main/routers/query/RTMediaQuery.php b/app/main/routers/query/RTMediaQuery.php
index 5ec7a9d16..f1a9ebfc2 100755
--- a/app/main/routers/query/RTMediaQuery.php
+++ b/app/main/routers/query/RTMediaQuery.php
@@ -1,45 +1,56 @@
array( 'Edit', false ),
@@ -47,25 +58,74 @@ class RTMediaQuery {
'comment' => array( 'Comment', true ),
'delete-comment' => array( 'Comment Deleted', false ),
);
+
+ /**
+ * Media to process.
+ *
+ * @var string|array $media
+ */
public $media = '';
+
+ /**
+ * Stores media count.
+ *
+ * @var int $media_count
+ */
public $media_count = 0;
+
+ /**
+ * Current Media number.
+ *
+ * @var int $current_media
+ */
public $current_media = - 1;
+
+ /**
+ * In media loop or not.
+ *
+ * @var bool $in_the_media_loop
+ */
public $in_the_media_loop = false;
+
+ /**
+ * Data format.
+ *
+ * @var bool|string $format
+ */
public $format = false;
+
+ /**
+ * Global shortcode.
+ *
+ * @var bool|string $shortcode_global
+ */
public $shortcode_global = false;
+ /**
+ * Object of RTMediaModel class.
+ *
+ * @var RTMediaModel
+ */
+ public $model;
+
+ /**
+ * Object of RTMediaFriends class
+ *
+ * @var RTMediaFriends
+ */
+ public $friendship;
+
/**
* Initialise the query
*
- * @param array|bool $args The query arguments
+ * @param array|bool $args The query arguments.
*
* @global object $rtmedia_interaction The global interaction object
- *
*/
- function __construct( $args = false ) {
+ public function __construct( $args = false ) {
- // set up the interaction object relevant to just the query
- // we only need information related to the media route
+ // set up the interaction object relevant to just the query.
+ // we only need information related to the media route.
global $rtmedia_interaction;
$this->model = new RTMediaModel();
@@ -74,24 +134,23 @@ function __construct( $args = false ) {
$this->friendship = new RTMediaFriends();
- // action manipulator hook
+ // action manipulator hook.
$this->set_actions();
- //check and set the format to json, if needed
+ // check and set the format to json, if needed.
$this->set_json_format();
- // set up the action query from the URL
+ // set up the action query from the URL.
$this->set_action_query();
add_filter( 'rtmedia-model-where-query', array( $this, 'privacy_filter' ), 1, 2 );
- // if no args were supplied, initialise the $args
-
+ // if no args were supplied, initialise the $args.
if ( empty( $args ) ) {
$this->init();
- // otherwise just populate the query
+ // otherwise just populate the query.
} else {
$this->query( $args );
@@ -103,25 +162,31 @@ function __construct( $args = false ) {
/**
* Initialise the default args for the query
*/
- function init() {
+ public function init() {
}
- function set_media_type() {
+ /**
+ * Function to set media type in query var.
+ */
+ public function set_media_type() {
if ( ! isset( $this->query['media_type'] ) ) {
if ( isset( $this->action_query->id ) ) {
$media = $this->model->get( array( 'id' => $this->action_query->id ) );
- if ( sizeof( $media ) > 0 ) {
- $media_type = $media[0]->media_type;
+ if ( is_array( $media ) && count( $media ) > 0 ) {
+ $media_type = $media[0]->media_type;
$this->query['media_type'] = $media_type;
}
}
- } else {
-
}
}
- function is_single() {
+ /**
+ * Function to check if it's single page.
+ *
+ * @return bool
+ */
+ public function is_single() {
/**
* // check the condition
* wont be true in case of multiple albums
@@ -137,7 +202,12 @@ function is_single() {
return true;
}
- function is_album() {
+ /**
+ * Function to check if it's album.
+ *
+ * @return bool
+ */
+ public function is_album() {
if ( isset( $this->query['media_type'] ) && 'album' === $this->query['media_type'] ) {
return true;
}
@@ -145,7 +215,12 @@ function is_album() {
return false;
}
- function is_group_album() {
+ /**
+ * Function to check group album.
+ *
+ * @return bool
+ */
+ public function is_group_album() {
if ( $this->is_album() && ( isset( $this->query['context'] ) && 'group' === $this->query['context'] ) ) {
return true;
}
@@ -153,7 +228,12 @@ function is_group_album() {
return false;
}
- function is_gallery() {
+ /**
+ * Function to check gallery.
+ *
+ * @return bool
+ */
+ public function is_gallery() {
if ( ! $this->is_single() ) {
return true;
}
@@ -161,7 +241,12 @@ function is_gallery() {
return false;
}
- function is_album_gallery() {
+ /**
+ * Function to check album gallery page.
+ *
+ * @return bool
+ */
+ public function is_album_gallery() {
if ( isset( $this->action_query->media_type ) && 'album' === $this->action_query->media_type ) {
return true;
}
@@ -169,7 +254,12 @@ function is_album_gallery() {
return false;
}
- function is_playlist_gallery() {
+ /**
+ * Function to check playlist gallery page
+ *
+ * @return bool
+ */
+ public function is_playlist_gallery() {
if ( isset( $this->action_query->media_type ) && 'playlist' === $this->action_query->media_type ) {
return true;
}
@@ -177,7 +267,12 @@ function is_playlist_gallery() {
return false;
}
- function is_playlist() {
+ /**
+ * Function to check playlist page
+ *
+ * @return bool
+ */
+ public function is_playlist() {
if ( isset( $this->query['media_type'] ) && 'playlist' === $this->query['media_type'] ) {
return true;
}
@@ -185,7 +280,12 @@ function is_playlist() {
return false;
}
- function is_single_edit() {
+ /**
+ * Function to check page single edit page
+ *
+ * @return bool
+ */
+ public function is_single_edit() {
if ( $this->is_single() && ( isset( $this->action_query->action ) && 'edit' === $this->action_query->action ) ) {
return true;
}
@@ -194,16 +294,21 @@ function is_single_edit() {
}
/**
- * json request
+ * Function for json request
*/
- function set_json_format() {
+ public function set_json_format() {
+
+ $json = sanitize_text_field( filter_input( INPUT_GET, 'json', FILTER_SANITIZE_STRING ) );
- if ( ! empty( $_REQUEST['json'] ) ) {
+ if ( ! empty( $json ) ) {
$this->format = 'json';
}
}
- function set_action_query() {
+ /**
+ * Function to set action query.
+ */
+ public function set_action_query() {
if ( isset( $this->interaction ) && isset( $this->interaction->query_vars ) ) {
$raw_query = $this->interaction->query_vars;
} else {
@@ -212,19 +317,18 @@ function set_action_query() {
if ( isset( $raw_query ) && is_array( $raw_query ) && count( $raw_query ) > 1 ) {
if ( empty( $raw_query[0] ) && ! empty( $raw_query[1] ) ) {
+
$temp_query = array();
- for ( $rtCount = 1; $rtCount < count( $raw_query ); $rtCount ++ ) {
- $temp_query[] = $raw_query[ $rtCount ];
+ $row_count = count( $raw_query );
+
+ for ( $rt_count = 1; $rt_count < $row_count; $rt_count++ ) {
+ $temp_query[] = $raw_query[ $rt_count ];
}
+
$raw_query = $temp_query;
}
}
- // if ( isset ( $_SERVER[ "REMOTE_ADDR" ] ) && $_SERVER[ "REMOTE_ADDR" ] == "14.97.170.202" ) {
- // echo "
";
- // print_r ( $this );
- // echo " ";
- // }
$bulk = false;
$action = false;
$attribute = false;
@@ -233,22 +337,25 @@ function set_action_query() {
$format = '';
$pageno = 1;
- // Get page number for json response
- if ( ! empty( $_REQUEST['json'] ) ) {
- $pageno = ( isset( $_REQUEST['rtmedia_page'] ) && ! empty( $_REQUEST['rtmedia_page'] ) ) ? intval( $_REQUEST['rtmedia_page'] ) : 1;
+ $json = sanitize_text_field( filter_input( INPUT_GET, 'json', FILTER_SANITIZE_STRING ) );
+
+ // Get page number for json response.
+ if ( ! empty( $json ) ) {
+ $rtmedia_page = filter_input( INPUT_GET, 'rtmedia_page', FILTER_VALIDATE_INT );
+ $pageno = ( ! empty( $rtmedia_page ) ) ? $rtmedia_page : 1;
}
- // Get page number for none json response
- if ( ! isset( $_REQUEST['json'] ) && empty( $_REQUEST['json'] ) ) {
+ // Get page number for none json response.
+ if ( empty( $json ) ) {
$pageno = ( get_query_var( 'pg' ) ) ? get_query_var( 'pg' ) : 1;
}
- $attributes = '';
+ $attributes = '';
- // The first part of the query /media/{*}/
+ // The first part of the query /media/{*}/ .
if ( is_array( $raw_query ) && count( $raw_query ) && ! empty( $raw_query[0] ) ) {
- //set the modifier value beforehand
+ // set the modifier value beforehand.
$modifier_value = $raw_query[0];
if ( 'album' === $modifier_value && ! is_rtmedia_album_enable() ) {
@@ -256,31 +363,29 @@ function set_action_query() {
die();
}
- do_action( 'rtmedia_slug_404_handler' ); // disbale media type 404 handler
-
- // requesting nonce /media/nonce/edit/ | /media/nonce/comment
- // | /media/nonce/delete
+ do_action( 'rtmedia_slug_404_handler' ); // disable media type 404 handler.
+ // requesting nonce /media/nonce/edit/ | /media/nonce/comment.
+ // | /media/nonce/delete .
if ( 'nonce' === $modifier_value ) {
$modifier_type = 'nonce';
- // requesting media id /media/{id}/
+ // requesting media id /media/{id}/.
} elseif ( is_numeric( $modifier_value ) ) {
$modifier_type = 'id';
- $request_action = filter_input( INPUT_POST, 'request_action', FILTER_SANITIZE_STRING );
- // this block is unnecessary, please delete, asap
+ $request_action = sanitize_text_field( filter_input( INPUT_POST, 'request_action', FILTER_SANITIZE_STRING ) );
+ // this block is unnecessary, please delete, asap.
if ( 'delete' === $request_action ) {
$action = 'delete';
}
- // requesting an upload screen /media/upload/
+ // requesting an upload screen /media/upload/.
} elseif ( array_key_exists( $modifier_value, $this->actions ) ) {
// /media/edit/ | media/delete/ | /media/like/
-
$action = $modifier_value;
$bulk = true;
} elseif ( 'upload' === $modifier_value ) {
@@ -291,11 +396,11 @@ function set_action_query() {
// /media/pg/2/
} elseif ( 'pg' === $modifier_value ) {
- //paginating default query
+ // paginating default query.
$modifier_type = 'pg';
} else {
- // requesting by media type /media/photos | /media/videos/
+ // requesting by media type /media/photos | /media/videos/.
$modifier_type = 'media_type';
}
}
@@ -310,7 +415,6 @@ function set_action_query() {
switch ( $modifier_type ) {
case 'nonce':
-
// /media/nonce/edit/ | /media/nonce/delete/
if ( array_key_exists( $second_modifier, $this->actions ) ) {
@@ -320,7 +424,6 @@ function set_action_query() {
break;
case 'id':
-
// /media/23/edit/ | media/23/delete/ | /media/23/like/
if ( array_key_exists( $second_modifier, $this->actions ) ) {
@@ -329,14 +432,13 @@ function set_action_query() {
if ( 'pg' === $second_modifier ) {
if ( isset( $raw_query[2] ) && is_numeric( $raw_query[2] ) ) {
$pageno = $raw_query[2];
- }
- /**
- * Fix for URL
- * like http://website.com/members/
/media/2/pg/edit/
- *
- * Fix for 'pg' (pagination) in URL
- */
- elseif ( 'edit' === $raw_query[2] ) {
+ } elseif ( 'edit' === $raw_query[2] ) {
+ /**
+ * Fix for URL
+ * like http://website.com/members//media/2/pg/edit/
+ *
+ * Fix for 'pg' (pagination) in URL
+ */
$action = 'edit';
}
}
@@ -344,7 +446,6 @@ function set_action_query() {
break;
case 'pg':
-
// /media/page/2/ | /media/page/3/
if ( is_numeric( $second_modifier ) ) {
@@ -353,18 +454,12 @@ function set_action_query() {
break;
case 'media_type':
-
// /media/photos/edit/ | /media/videos/edit/
if ( array_key_exists( $second_modifier, $this->actions ) ) {
$action = $second_modifier;
$bulk = true;
}
- // /media/photos/page/2/
- //elseif($second_modifier=='page'){
- //$page = $second_modifier;
- //pagination support
- //}
break;
default:
@@ -372,8 +467,7 @@ function set_action_query() {
}
}
- //the third part of the query /media/modifier/second_modifier/{*}
-
+ // The third part of the query /media/modifier/second_modifier/{*}.
if ( isset( $raw_query[2] ) ) {
$third_modifier = $raw_query[2];
@@ -381,25 +475,27 @@ function set_action_query() {
switch ( $modifier_type ) {
case 'nonce':
-
- // leaving here for more granular nonce, in future, for eg,
- // /media/nonce/edit/title/
-
+ /**
+ * Leaving here for more granular nonce, in future, for eg,
+ * /media/nonce/edit/title/
+ */
break;
case 'id':
-
- // leaving here for more granular editing, in future, for eg,
- // /media/23/edit/title/
-
+ /**
+ * Leaving here for more granular editing, in future, for eg,
+ * /media/23/edit/title/
+ */
break;
case 'media_type':
-
- // /media/photos/edit/ | /media/videos/edit/
- // leaving here for more granular editing, in future, for eg,
- // /media/photos/edit/title/
- // /media/photos/page/2/
+ /**
+ * /media/photos/edit/ | /media/videos/edit/.
+ * leaving here for more granular editing, in future,
+ * for eg,
+ * /media/photos/edit/title/
+ * /media/photos/page/2/.
+ */
if ( 'pg' === $second_modifier && is_numeric( $third_modifier ) ) {
$pageno = $third_modifier;
@@ -414,11 +510,8 @@ function set_action_query() {
global $rtmedia;
- //if ( ! $rtmedia->get_option( 'media_end_point_enable' ) )
- //include get_404_template();
-
/**
- * set action query object
+ * Set action query object
* setting parameters in action query object for pagination
*/
$per_page_media = intval( $rtmedia->options['general_perPageMedia'] );
@@ -428,62 +521,66 @@ function set_action_query() {
$modifier_type => $modifier_value,
'action' => $action,
'bulk' => $bulk,
- 'page' => $pageno,
+ 'page' => intval( $pageno ),
'per_page_media' => $per_page_media,
'attributes' => $attributes,
);
}
/**
- * additional actions to be added via action hook
+ * Additional actions to be added via action hook
*/
- function set_actions() {
+ public function set_actions() {
$this->actions = apply_filters( 'rtmedia_query_actions', $this->actions );
}
/**
- * get media query for the request
+ * Get media query for the request
*
- * @param type $query
+ * @param object $query Query object.
*
- * @return type
+ * @return array
*/
- function &query( $query ) {
+ public function &query( $query ) {
$this->original_query = $query;
- /*
+ /**
+ * Comment.
+ *
* @chandrapatel commented below code. here we are merging new query vars and previous query vars
* which is cause an issue. For example, First time query vars contains media_type and second time query vars not contain media_type
* then media not listed properly.
*
- * Later on, renmove this comment and below commented code.
+ * Later on, remove this comment and below commented code.
+ * $this->query = wp_parse_args( $query, $this->query );
*/
- // $this->query = wp_parse_args( $query, $this->query );
-
$this->query = $query;
- //Set Json
- $allowed_query = apply_filters( 'rtmedia_allowed_query', array(
- 'id',
- 'media_id',
- 'media_type',
- 'media_author',
- 'album_id',
- 'context',
- 'context_id',
- 'global',
- 'privacy',
- 'per_page',
- 'lightbox',
- 'media_title',
- ) );
- if ( isset( $_REQUEST['rtmedia_shortcode'] ) ) {
- $rtmedia_shortcode = $_REQUEST['rtmedia_shortcode'];
- }
+ // Set Json.
+ $allowed_query = apply_filters(
+ 'rtmedia_allowed_query',
+ array(
+ 'id',
+ 'media_id',
+ 'media_type',
+ 'media_author',
+ 'album_id',
+ 'context',
+ 'context_id',
+ 'global',
+ 'privacy',
+ 'per_page',
+ 'lightbox',
+ 'media_title',
+ )
+ );
+
+ $rtmedia_shortcode = sanitize_text_field( filter_input( INPUT_GET, 'rtmedia_shortcode', FILTER_SANITIZE_STRING ) );
+
if ( ! empty( $rtmedia_shortcode ) ) {
- $query_data = $_REQUEST;
+ $query_data = $_REQUEST; // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
foreach ( $query_data as $key => $val ) {
- if ( ! in_array( $key, $allowed_query ) ) {
+ if ( ! in_array( $key, $allowed_query, true ) ) {
unset( $query_data[ $key ] );
}
}
@@ -499,8 +596,8 @@ function &query( $query ) {
}
}
- /*
- * in gallery shortcode with uploader set to true, $this->is_gallery_shortcode won't be set for very first time and hence
+ /**
+ * In gallery shortcode with uploader set to true, $this->is_gallery_shortcode won't be set for very first time and hence
* will miss the check for "$this->query['uploader']"
*/
if ( isset( $this->query['uploader'] ) ) {
@@ -511,17 +608,23 @@ function &query( $query ) {
if ( isset( $this->query['context'] ) && 'activity' === $this->query['context'] ) {
$this->query['activity_id'] = array( 'value' );
global $wpdb;
- //todo cache
- $sql_query = "select id from {$wpdb->prefix}bp_activity where item_id = 0 and type = 'rtmedia_update'";
- $this->query['activity_id']['value'] = $wpdb->get_col( $sql_query );
+ // todo cache.
+ $sql_query = "select id from {$wpdb->prefix}bp_activity where item_id = 0 and type = 'rtmedia_update'";
+ $this->query['activity_id']['value'] = $wpdb->get_col( $sql_query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
}
+
if ( isset( $this->query ) && isset( $this->query['global'] ) ) {
if ( 'true' === $this->query['global'] ) {
$this->shortcode_global = true;
- add_filter( 'rtmedia-model-where-query', array(
- 'RTMediaGalleryShortcode',
- 'rtmedia_query_where_filter',
- ), 10, 3 );
+ add_filter(
+ 'rtmedia-model-where-query',
+ array(
+ 'RTMediaGalleryShortcode',
+ 'rtmedia_query_where_filter',
+ ),
+ 10,
+ 3
+ );
$remove_comment_media = apply_filters( 'rtmedia_query_where_filter_remove_comment_media', true, 'galleryshortcode' );
if ( isset( $remove_comment_media ) && ! empty( $remove_comment_media ) ) {
@@ -534,19 +637,23 @@ function &query( $query ) {
if ( isset( $this->query['context'] ) ) {
unset( $this->query['context'] );
}
- //dont unset album id when provided, to show content of a single album
- // if ( isset ( $this->query[ "album_id" ] ) )
- // unset ( $this->query[ "album_id" ] );
+
if ( isset( $this->query['media_type'] ) && 'album' === $this->query['media_type'] ) {
- //$this->action_query->media_type = "album";
- add_filter( 'rtmedia-before-template', array(
- &$this,
- 'register_set_gallery_template_filter',
- ), 10, 2 );
+
+ add_filter(
+ 'rtmedia-before-template',
+ array(
+ &$this,
+ 'register_set_gallery_template_filter',
+ ),
+ 10,
+ 2
+ );
}
}
unset( $this->query['global'] );
}
+
$this->set_media_type();
$this->media_query = $this->query;
do_action( 'rtmedia_set_query' );
@@ -554,14 +661,30 @@ function &query( $query ) {
return $this->get_data();
}
- function register_set_gallery_template_filter( $template, $attr ) {
+ /**
+ * Function to remove gallery template filter.
+ *
+ * @param string $template Template.
+ * @param array $attr Attributes.
+ *
+ * @return string
+ */
+ public function register_set_gallery_template_filter( $template, $attr ) {
remove_filter( 'rtmedia-before-template', array( &$this, 'register_set_gallery_template_filter' ), 10, 2 );
return 'album-gallery';
}
- function privacy_filter( $where, $table_name ) {
+ /**
+ * Function to filter user privacy for query.
+ *
+ * @param string $where Where clause.
+ * @param string $table_name Table name.
+ *
+ * @return string
+ */
+ public function privacy_filter( $where, $table_name ) {
if ( is_rt_admin() ) {
return $where;
}
@@ -574,7 +697,7 @@ function privacy_filter( $where, $table_name ) {
if ( class_exists( 'BuddyPress' ) ) {
if ( bp_is_active( 'friends' ) ) {
$friends = $this->friendship->get_friends_cache( $user );
- $where .= " OR ({$table_name}.privacy=40 AND {$table_name}.media_author IN ('" . implode( "','", $friends ) . "'))";
+ $where .= " OR ({$table_name}.privacy=40 AND {$table_name}.media_author IN ('" . implode( "','", $friends ) . "'))";
}
}
}
@@ -582,7 +705,12 @@ function privacy_filter( $where, $table_name ) {
return $where . ')';
}
- function get_user() {
+ /**
+ * Get current user.
+ *
+ * @return int|mixed|void
+ */
+ public function get_user() {
if ( is_user_logged_in() ) {
$user = apply_filters( 'rtmedia_current_user', get_current_user_id() );
} else {
@@ -592,7 +720,10 @@ function get_user() {
return $user;
}
- function set_privacy() {
+ /**
+ * Set user privacy.
+ */
+ public function set_privacy() {
$user = $this->get_user();
if ( ! $user ) {
$privacy = 0;
@@ -601,7 +732,13 @@ function set_privacy() {
}
}
- function populate_media() {
+ /**
+ * Function to populate media.
+ *
+ * @return array|bool
+ */
+ public function populate_media() {
+
global $rtmedia_query;
// Check if the page is gallery shortcode or not.
@@ -614,14 +751,11 @@ function populate_media() {
$allowed_media_types = array();
- // is this an album or some other media
+ // is this an album or some other media.
$this->album_or_media();
$order_by = $this->order_by();
- //add filter to filter group media when context is profile
- //add_filter('rtmedia-model-where-query',array($this,'rtmedia_model_where_query'), 10, 3);
-
if ( isset( $this->media_query['context'] ) ) {
if ( 'profile' === $this->media_query['context'] ) {
@@ -632,23 +766,19 @@ function populate_media() {
$author = $this->media_query['context_id'];
}
- //if it is a media single page, then unset the context and context id
+ // If it is a media single page, then unset the context and context id.
if ( $this->is_single() ) {
unset( $this->media_query['context'] );
unset( $this->media_query['context_id'] );
}
- //unset ( $this->media_query[ 'context' ] );
- //unset ( $this->media_query[ 'context_id' ] );
} else {
if ( 'group' === $this->media_query['context'] ) {
$group_id = $this->media_query['context_id'];
- } else {
-
}
}
- // Multiple context_id support
- if ( isset( $this->media_query['context_id'] ) && sizeof( explode( ',', $this->media_query['context_id'] ) ) > 1 ) {
+ // Multiple context_id support.
+ if ( isset( $this->media_query['context_id'] ) && count( explode( ',', $this->media_query['context_id'] ) ) > 1 ) {
$this->media_query['context_id'] = array(
'compare' => 'in',
'value' => explode( ',', $this->media_query['context_id'] ),
@@ -656,8 +786,8 @@ function populate_media() {
}
}
- // Multiple album_id support
- if ( isset( $this->media_query['album_id'] ) && sizeof( explode( ',', $this->media_query['album_id'] ) ) > 1 ) {
+ // Multiple album_id support.
+ if ( isset( $this->media_query['album_id'] ) && count( explode( ',', $this->media_query['album_id'] ) ) > 1 ) {
$this->media_query['album_id'] = array(
'compare' => 'in',
'value' => explode( ',', $this->media_query['album_id'] ),
@@ -665,18 +795,18 @@ function populate_media() {
}
if ( isset( $this->media_query['per_page'] ) ) {
- //Do not include per_page in sql query to get media
+ // Do not include per_page in sql query to get media.
$this->action_query->per_page_media = intval( $this->media_query['per_page'] );
unset( $this->media_query['per_page'] );
}
- // lightbox option
+ // Lightbox option.
if ( isset( $this->media_query['lightbox'] ) ) {
if ( 'false' === $this->media_query['lightbox'] ) {
- // Add filter to add no-popup class in a tag
+ // Add filter to add no-popup class in a tag.
add_filter( 'rtmedia_gallery_list_item_a_class', 'rtmedia_add_no_popup_class', 10, 1 );
}
- // Unset the lightbox parameter from media query
+ // Unset the lightbox parameter from media query.
unset( $this->media_query['lightbox'] );
}
@@ -702,26 +832,26 @@ function populate_media() {
$context_id = $group_id;
}
- $media_for_total_count = count( $this->model->{$query_function} ( $context_id, false, false ) );
+ $media_for_total_count = count( $this->model->{$query_function}( $context_id, false, false ) );
$this->action_query = apply_filters( 'rtmedia_action_query_in_populate_media', $this->action_query, $media_for_total_count );
if ( ' ' === $order_by ) {
- $pre_media = $this->model->{$query_function} ( $context_id, ( $this->action_query->page - 1 ) * $this->action_query->per_page_media, $this->action_query->per_page_media );
+ $pre_media = $this->model->{$query_function}( $context_id, ( $this->action_query->page - 1 ) * $this->action_query->per_page_media, $this->action_query->per_page_media );
} else {
- $pre_media = $this->model->{$query_function} ( $context_id, ( $this->action_query->page - 1 ) * $this->action_query->per_page_media, $this->action_query->per_page_media, $order_by );
+ $pre_media = $this->model->{$query_function}( $context_id, ( $this->action_query->page - 1 ) * $this->action_query->per_page_media, $this->action_query->per_page_media, $order_by );
}
} else {
/**
- * count total medias in album irrespective of pagination
+ * Count total medias in album irrespective of pagination
*/
$media_for_total_count = $this->model->get_media( $this->media_query, false, false, false, true );
$this->action_query = apply_filters( 'rtmedia_action_query_in_populate_media', $this->action_query, $media_for_total_count );
/**
- * fetch media entries from rtMedia context
+ * Fetch media entries from rtMedia context
*/
if ( ' ' === $order_by ) {
$pre_media = $this->model->get_media( $this->media_query, ( $this->action_query->page - 1 ) * $this->action_query->per_page_media, $this->action_query->per_page_media );
@@ -729,8 +859,6 @@ function populate_media() {
$pre_media = $this->model->get_media( $this->media_query, ( $this->action_query->page - 1 ) * $this->action_query->per_page_media, $this->action_query->per_page_media, $order_by );
}
}
- //add filter that was added to filter group media when context is profile
- // remove_filter('rtmedia-model-where-query',array($this,'rtmedia_model_where_query'), 10, 3);
$this->media_count = intval( $media_for_total_count );
@@ -740,22 +868,15 @@ function populate_media() {
return $pre_media;
}
- /* removed because of indexing ---- 0,1,2 was required rather than post_ids
- foreach ( $pre_media as $pre_medium ) {
- $this->media[ $pre_medium->media_id ] = $pre_medium;
- } */
}
- // add a where condition to filter group media when context is profile
- // function rtmedia_model_where_query($where, $table_name, $join) {
- //
- // if( isset( $this->original_query ) && isset( $this->original_query[ 'context' ] ) && $this->original_query[ 'context' ] == "profile" ) {
- // $where .= ' AND ' . $table_name . '.context <> "group" ';
- // }
- // return $where;
- // }
-
- function album_or_media() {
+
+ /**
+ * Function to check media type.
+ */
+ public function album_or_media() {
+
global $rtmedia;
+
foreach ( $rtmedia->allowed_types as $value ) {
$allowed_media_types[] = $value['name'];
}
@@ -768,12 +889,17 @@ function album_or_media() {
'compare' => 'IN',
'value' => array( 'music', 'video', 'photo' ),
);
- $this->media_query['media_type'] = apply_filters( 'rtmedia_query_media_type_filter', $this->media_query['media_type'] ); // can add more types here
+ $this->media_query['media_type'] = apply_filters( 'rtmedia_query_media_type_filter', $this->media_query['media_type'] ); // Can add more types here.
}
}
}
- function order_by() {
+ /**
+ * Function to filter order by.
+ *
+ * @return mixed|string|void
+ */
+ public function order_by() {
/**
* Handle order of the result set
*/
@@ -793,11 +919,18 @@ function order_by() {
}
$order_by .= ' ' . $order;
- return $order_by = apply_filters( 'rtmedia_model_order_by', $order_by );
+ $order_by = apply_filters( 'rtmedia_model_order_by', $order_by );
+
+ return $order_by;
}
- function populate_album() {
- $this->album = $this->media;
+ /**
+ * Function to populate album.
+ *
+ * @return array|bool
+ */
+ public function populate_album() {
+ $this->album = $this->media;
$this->media_query['album_id'] = $this->action_query->id;
if ( apply_filters( 'rtmedia_unset_action_query_id_album', true ) ) {
@@ -810,7 +943,12 @@ function populate_album() {
return $this->populate_media();
}
- function populate_comments() {
+ /**
+ * Function to populate comments.
+ *
+ * @return array|int
+ */
+ public function populate_comments() {
$this->model = new RTMediaCommentModel();
global $rtmedia_interaction;
@@ -819,17 +957,18 @@ function populate_comments() {
}
/**
- * populate the data object for the page/album
+ * Populate the data object for the page/album
*
- * @return boolean
+ * @return null
*/
- function populate_data() {
+ public function populate_data() {
+
unset( $this->media_query->meta_query );
unset( $this->media_query->tax_query );
$this->current_media = - 1;
if ( 'comments' === $this->action_query->action && ! isset( $this->action_query->id ) ) {
$this->media = $this->populate_comments();
- } else if ( $this->is_album() && ! $this->shortcode_global ) {
+ } elseif ( $this->is_album() && ! $this->shortcode_global ) {
$this->media = $this->populate_album();
} else {
$this->media = $this->populate_media();
@@ -840,7 +979,7 @@ function populate_data() {
}
/**
- * multiside manipulation
+ * Multisite manipulation
*/
if ( is_multisite() ) {
$blogs = array();
@@ -849,11 +988,11 @@ function populate_data() {
}
foreach ( $blogs as $blog_id => &$media ) {
- //todo something for below statement
+ // todo something for below statement.
switch_to_blog( $blog_id );
if ( ! ( 'comments' === $this->action_query->action && ! isset( $this->action_query->id ) ) ) {
$this->populate_post_data( $media );
- wp_reset_query();
+ wp_reset_query(); // phpcs:ignore WordPress.WP.DiscouragedFunctions.wp_reset_query_wp_reset_query
}
}
restore_current_blog();
@@ -863,33 +1002,37 @@ function populate_data() {
}
}
if ( $this->shortcode_global ) {
- remove_filter( 'rtmedia-model-where-query', array(
- 'RTMediaGalleryShortcode',
- 'rtmedia_query_where_filter',
- ), 10, 3 );
+ remove_filter(
+ 'rtmedia-model-where-query',
+ array(
+ 'RTMediaGalleryShortcode',
+ 'rtmedia_query_where_filter',
+ ),
+ 10
+ );
}
}
/**
- * helper method to fetch media id of each media from the map
+ * Helper method to fetch media id of each media from the map
*
- * @param type $media
+ * @param object $media Media object.
*
- * @return type
+ * @return int
*/
- function get_media_id( $media ) {
+ public function get_media_id( $media ) {
return $media->media_id;
}
/**
- * helper method to find the array entry for the given media id
+ * Helper method to find the array entry for the given media id
*
- * @param type $id
+ * @param int $id Media Id.
*
* @return null
*/
- function get_media_by_media_id( $id ) {
+ public function get_media_by_media_id( $id ) {
foreach ( $this->media as $key => $media ) {
if ( intval( $media->media_id ) === intval( $id ) ) {
@@ -901,15 +1044,15 @@ function get_media_by_media_id( $id ) {
}
/**
- * populate the post data for the fetched media from rtMedia context
+ * Populate the post data for the fetched media from rtMedia context
*
- * @param type $media
+ * @param array $media Medias to process.
*/
- function populate_post_data( $media ) {
+ public function populate_post_data( $media ) {
if ( ! empty( $media ) && is_array( $media ) ) {
/**
- * setting up query vars for WP_Query
+ * Setting up query vars for WP_Query
*/
$media_post_query_args = array(
'orderby' => 'ID',
@@ -922,20 +1065,20 @@ function populate_post_data( $media ) {
);
/**
- * setting up meta query vars
+ * Setting up meta query vars
*/
if ( isset( $this->query_vars->meta_query ) ) {
$media_post_query_args['meta_query'] = $this->query_vars->meta_query;
}
/**
- * setting up taxonomy query vars
+ * Setting up taxonomy query vars
*/
if ( isset( $this->query_vars->tax_query ) ) {
$media_post_query_args['tax_query'] = $this->query_vars->tax_query;
}
/**
- * fetch relative data from WP_POST
+ * Fetch relative data from WP_POST
*/
$media_post_query = new WP_Query( $media_post_query_args );
@@ -961,7 +1104,7 @@ function populate_post_data( $media ) {
*
* @return boolean
*/
- function have_media() {
+ public function have_media() {
$total = $this->media_count;
$curr = $this->current_media;
@@ -972,7 +1115,7 @@ function have_media() {
return true;
} elseif ( $curr + 1 === $per_page && $per_page > 0 ) {
do_action_ref_array( 'rtmedia_loop_end', array( &$this ) );
- // Do some cleaning up after the loop
+ // Do some cleaning up after the loop.
$this->rewind_media();
}
@@ -982,36 +1125,46 @@ function have_media() {
}
/**
- * moves ahead in the loop of media within the album
+ * Moves ahead in the loop of media within the album
*
- * @global type $rtmedia_media
- * @return type
+ * @global object $rtmedia_media
+ * @return object
*/
- function rtmedia() {
+ public function rtmedia() {
+
global $rtmedia_media;
+
$this->in_the_media_loop = true;
- if ( - 1 === intval( $this->current_media ) ) { // loop has just started
+ if ( -1 === intval( $this->current_media ) ) { // loop has just started.
do_action_ref_array( 'rtmedia_loop_start', array( &$this ) );
}
- return $rtmedia_media = $this->next_media();
+ $rtmedia_media = $this->next_media();
+
+ return $rtmedia_media;
+
}
/**
- * helper method for rt_album to move ahead in the db pool
+ * Helper method for rt_album to move ahead in the db pool
*
- * @return type
+ * @return array
*/
- function next_media() {
- $this->current_media ++;
+ public function next_media() {
+ $this->current_media++;
$this->rtmedia = $this->media[ $this->current_media ];
return $this->rtmedia;
}
- function permalink() {
+ /**
+ * Function for get parent permalink.
+ *
+ * @return mixed
+ */
+ public function permalink() {
global $rtmedia_media;
$parent_link = '';
@@ -1030,7 +1183,7 @@ function permalink() {
/**
* Rewinds the db pool of media album and resets it to begining
*/
- function rewind_media() {
+ public function rewind_media() {
$this->current_media = - 1;
if ( $this->action_query->per_page_media > 0 ) {
$this->media = $this->media[0];
@@ -1038,10 +1191,11 @@ function rewind_media() {
}
/**
+ * Function to get data.
*
- * @return type
+ * @return array
*/
- function &get_data() {
+ public function &get_data() {
$this->populate_data();
diff --git a/bin/.travis.yml b/bin/.travis.yml
index 1d485a93a..54b8ec178 100644
--- a/bin/.travis.yml
+++ b/bin/.travis.yml
@@ -43,7 +43,7 @@ before_script:
- cd $PLUGIN_DIR
- cp -Rf * /var/www/automation.rtmedia.me/htdocs/wp-content/plugins/rtMedia/
- cd /var/www/automation.rtmedia.me/htdocs/
- - wp --allow-root plugin install https://downloads.wordpress.org/plugin/buddypress.5.1.1.zip
+ - wp --allow-root plugin install https://downloads.wordpress.org/plugin/buddypress.5.1.2.zip
- wp plugin activate --all
- wp theme activate twentynineteen
- cd $PLUGIN_DIR
@@ -54,8 +54,8 @@ before_script:
- unzip BrowserStackLocal-linux-x64.zip
- nohup ./BrowserStackLocal --key $BROWSERSTACK_ACCESS_KEY &
- cd $PLUGIN_DIR/tests/codeception/
- # - composer update
- - composer install
+ - composer update
+ # - composer install
- export PATH="$PATH:/home/travis/build/rtMediaWP/rtMedia/tests/codeception/vendor/bin"
## PHP_CodeSniffer
- git clone https://github.com/squizlabs/PHP_CodeSniffer.git
@@ -63,11 +63,13 @@ before_script:
- pear install package.xml
- cd ../
- git clone git://github.com/wimg/PHPCompatibility.git $(pear config-get php_dir)/PHP/CodeSniffer/Standards/PHPCompatibility
+ - git clone git://github.com/PHPCSStandards/PHPCSUtils.git $(pear config-get php_dir)/PHP/CodeSniffer/Standards/PHPCSUtils
- phpenv rehash
- phpcs -i
- phpenv rehash
- phpcs --config-set installed_paths $(pear config-get php_dir)/PHP/CodeSniffer/Standards
- - phpcs --config-set installed_paths $(pear config-get php_dir)/PHP/CodeSniffer/Standards/PHPCompatibility
+ - phpcs --config-set installed_paths $(pear config-get php_dir)/PHP/CodeSniffer/Standards/PHPCompatibility,$(pear config-get php_dir)/PHP/CodeSniffer/Standards/PHPCSUtils
+ - phpcs --config-show installed_paths
- phpcs -i
- phpcs --config-set error_severity 0
- phpcs --config-set warning_severity 0
diff --git a/index.php b/index.php
index 6117bd750..e8ddd12d3 100755
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
- Version: 4.6.0
+ Version: 4.6.1
Author: rtCamp
Text Domain: buddypress-media
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
@@ -20,16 +20,14 @@
if ( ! defined( 'RTMEDIA_VERSION' ) ) {
/**
* The version of the plugin
- *
*/
- define( 'RTMEDIA_VERSION', '4.6.0' );
+ define( 'RTMEDIA_VERSION', '4.6.1' );
}
if ( ! defined( 'RTMEDIA_PATH' ) ) {
/**
* The server file system path to the plugin directory
- *
*/
define( 'RTMEDIA_PATH', plugin_dir_path( __FILE__ ) );
}
@@ -38,7 +36,6 @@
/**
* Legacy support
- *
*/
define( 'BP_MEDIA_PATH', RTMEDIA_PATH );
}
@@ -48,7 +45,6 @@
/**
* The url to the plugin directory
- *
*/
define( 'RTMEDIA_URL', plugin_dir_url( __FILE__ ) );
}
@@ -57,7 +53,6 @@
/**
* The url to the plugin directory
- *
*/
define( 'RTMEDIA_BASE_NAME', plugin_basename( __FILE__ ) );
}
@@ -67,7 +62,7 @@
*
* Autoloads classes on instantiation. Used by spl_autoload_register.
*
- * @param string $class_name The name of the class to autoload
+ * @param string $class_name The name of the class to autoload.
*/
function rtmedia_autoloader( $class_name ) {
$rtlibpath = array(
@@ -111,7 +106,11 @@ function rtmedia_autoloader( $class_name ) {
/**
* Register the autoloader function into spl_autoload
*/
-spl_autoload_register( 'rtmedia_autoloader' );
+try {
+ spl_autoload_register( 'rtmedia_autoloader' );
+} catch ( Exception $e ) {
+ echo esc_html( $e->getMessage() );
+}
/**
* Instantiate the BuddyPressMedia class.
@@ -119,15 +118,21 @@ function rtmedia_autoloader( $class_name ) {
global $rtmedia;
$rtmedia = new RTMedia();
+/**
+ * Check if it's VIP environment or not.
+ *
+ * @return bool
+ */
function is_rtmedia_vip_plugin() {
return ( defined( 'WPCOM_IS_VIP_ENV' ) && WPCOM_IS_VIP_ENV );
}
-/*
+
+/**
* Look Ma! Very few includes! Next File: /app/main/RTMedia.php
*/
/**
- * rtmedia_plugin_deactivate Do stuff on plugin deactivation
+ * Do stuff on plugin deactivation
*/
function rtmedia_plugin_deactivate() {
update_option( 'is_permalink_reset', 'no' );
diff --git a/languages/buddypress-media.po b/languages/buddypress-media.po
index 208af2282..d7c67f5e5 100644
--- a/languages/buddypress-media.po
+++ b/languages/buddypress-media.po
@@ -2,9 +2,9 @@
# This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package.
msgid ""
msgstr ""
-"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.0\n"
+"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.1\n"
"Report-Msgid-Bugs-To: https://rtmedia.io/support/\n"
-"POT-Creation-Date: 2020-02-14 09:36:14+00:00\n"
+"POT-Creation-Date: 2020-04-08 09:51:26+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -24,904 +24,916 @@ msgstr ""
"X-Textdomain-Support: yes\n"
"X-Generator: grunt-wp-i18n 1.0.3\n"
-#: app/admin/RTMediaAdmin.php:148
+#: app/admin/RTMediaAdmin.php:192
msgid ""
"Install Transcoder plugin to convert audio/video files and "
"thumbnails generation."
msgstr ""
-#: app/admin/RTMediaAdmin.php:215
-msgid "View “%s”"
-msgstr ""
-
-#: app/admin/RTMediaAdmin.php:215
+#: app/admin/RTMediaAdmin.php:274
+#. translators: 1. Title.
msgid "View"
msgstr ""
-#: app/admin/RTMediaAdmin.php:281
+#: app/admin/RTMediaAdmin.php:343
+#. translators: 1. Product page link.
msgid "Check 30+ premium rtMedia add-ons on our store ."
msgstr ""
-#: app/admin/RTMediaAdmin.php:284
+#: app/admin/RTMediaAdmin.php:345
msgid "rtMedia: "
msgstr ""
-#: app/admin/RTMediaAdmin.php:339
+#: app/admin/RTMediaAdmin.php:357 app/admin/RTMediaAdmin.php:507
+msgid "Dismiss"
+msgstr ""
+
+#: app/admin/RTMediaAdmin.php:403
msgid "Meet InspireBook"
msgstr ""
-#: app/admin/RTMediaAdmin.php:341
+#: app/admin/RTMediaAdmin.php:405
msgid " - First official rtMedia premium theme."
msgstr ""
-#: app/admin/RTMediaAdmin.php:425 app/admin/RTMediaAdmin.php:450
+#: app/admin/RTMediaAdmin.php:481 app/admin/RTMediaAdmin.php:504
msgid "rtMedia:"
msgstr ""
-#: app/admin/RTMediaAdmin.php:425
+#: app/admin/RTMediaAdmin.php:481
msgid " You must"
msgstr ""
-#: app/admin/RTMediaAdmin.php:425
+#: app/admin/RTMediaAdmin.php:481
msgid "update permalink structure"
msgstr ""
-#: app/admin/RTMediaAdmin.php:425
+#: app/admin/RTMediaAdmin.php:481
msgid "to something other than the default for it to work."
msgstr ""
-#: app/admin/RTMediaAdmin.php:451
+#: app/admin/RTMediaAdmin.php:505
msgid "Please update all premium add-ons that you have purchased from"
msgstr ""
-#: app/admin/RTMediaAdmin.php:453
+#: app/admin/RTMediaAdmin.php:506
msgid "your account"
msgstr ""
-#: app/admin/RTMediaAdmin.php:455
-msgid "Dismiss"
-msgstr ""
-
-#: app/admin/RTMediaAdmin.php:570
+#: app/admin/RTMediaAdmin.php:616
msgid "rtMedia Pro is released"
msgstr ""
-#: app/admin/RTMediaAdmin.php:591
+#: app/admin/RTMediaAdmin.php:635
msgid "Media Stats"
msgstr ""
-#: app/admin/RTMediaAdmin.php:621
+#: app/admin/RTMediaAdmin.php:665
msgid "Usage Stats"
msgstr ""
-#: app/admin/RTMediaAdmin.php:633
+#: app/admin/RTMediaAdmin.php:678
msgid "Total "
msgstr ""
-#: app/admin/RTMediaAdmin.php:644
+#: app/admin/RTMediaAdmin.php:689
msgid "With Media"
msgstr ""
-#: app/admin/RTMediaAdmin.php:655
+#: app/admin/RTMediaAdmin.php:700
msgid "Comments "
msgstr ""
-#: app/admin/RTMediaAdmin.php:666 app/main/controllers/media/RTMediaLike.php:21
+#: app/admin/RTMediaAdmin.php:711 app/main/controllers/media/RTMediaLike.php:31
msgid "Likes"
msgstr ""
-#: app/admin/RTMediaAdmin.php:676
+#: app/admin/RTMediaAdmin.php:721
msgid "rtMedia Links:"
msgstr ""
-#: app/admin/RTMediaAdmin.php:677
+#: app/admin/RTMediaAdmin.php:722
msgid "Homepage"
msgstr ""
-#: app/admin/RTMediaAdmin.php:679
+#: app/admin/RTMediaAdmin.php:724
msgid "Free Support"
msgstr ""
-#: app/admin/RTMediaAdmin.php:682
+#: app/admin/RTMediaAdmin.php:727
msgid "Premium Addons"
msgstr ""
-#: app/admin/RTMediaAdmin.php:699
+#: app/admin/RTMediaAdmin.php:744
msgid "Right Now in rtMedia"
msgstr ""
-#: app/admin/RTMediaAdmin.php:734 app/admin/RTMediaAdmin.php:768
-#: app/admin/RTMediaAdmin.php:771 app/admin/RTMediaAdmin.php:948
-#: app/admin/RTMediaAdmin.php:1295
+#: app/admin/RTMediaAdmin.php:777 app/admin/RTMediaAdmin.php:813
+#: app/admin/RTMediaAdmin.php:816 app/admin/RTMediaAdmin.php:1015
+#: app/admin/RTMediaAdmin.php:1016 app/admin/RTMediaAdmin.php:1381
msgid "Settings"
msgstr ""
-#: app/admin/RTMediaAdmin.php:736 app/admin/RTMediaAdmin.php:792
-#: app/admin/RTMediaAdmin.php:795 app/admin/RTMediaAdmin.php:958
-#: app/admin/RTMediaAdmin.php:1321 app/helper/RTMediaSettings.php:249
-#: app/helper/RTMediaSupport.php:67 app/helper/RTMediaSupport.php:68
+#: app/admin/RTMediaAdmin.php:779 app/admin/RTMediaAdmin.php:839
+#: app/admin/RTMediaAdmin.php:842 app/admin/RTMediaAdmin.php:1039
+#: app/admin/RTMediaAdmin.php:1040 app/admin/RTMediaAdmin.php:1407
+#: app/helper/RTMediaSettings.php:261 app/helper/RTMediaSupport.php:87
+#: app/helper/RTMediaSupport.php:88
msgid "Support"
msgstr ""
-#: app/admin/RTMediaAdmin.php:761 app/admin/RTMediaAdmin.php:1267
-#: app/admin/RTMediaAdmin.php:1268 app/importers/RTMediaActivityUpgrade.php:128
-#: app/importers/RTMediaMigration.php:68 app/main/RTMedia.php:1060
-#: app/main/RTMedia.php:1622
+#: app/admin/RTMediaAdmin.php:805 app/admin/RTMediaAdmin.php:1355
+#: app/admin/RTMediaAdmin.php:1356 app/importers/RTMediaActivityUpgrade.php:188
+#: app/importers/RTMediaMigration.php:92 app/main/RTMedia.php:1208
+#: app/main/RTMedia.php:2060
msgid "rtMedia"
msgstr ""
-#: app/admin/RTMediaAdmin.php:780 app/admin/RTMediaAdmin.php:783
-#: app/admin/RTMediaAdmin.php:953 app/admin/RTMediaAdmin.php:1300
+#: app/admin/RTMediaAdmin.php:826 app/admin/RTMediaAdmin.php:829
+#: app/admin/RTMediaAdmin.php:1027 app/admin/RTMediaAdmin.php:1028
+#: app/admin/RTMediaAdmin.php:1386
msgid "Addons"
msgstr ""
-#: app/admin/RTMediaAdmin.php:804 app/admin/RTMediaAdmin.php:807
-#: app/admin/RTMediaAdmin.php:964 app/admin/RTMediaAdmin.php:1308
+#: app/admin/RTMediaAdmin.php:852 app/admin/RTMediaAdmin.php:855
+#: app/admin/RTMediaAdmin.php:1052 app/admin/RTMediaAdmin.php:1053
+#: app/admin/RTMediaAdmin.php:1394
msgid "Themes"
msgstr ""
-#: app/admin/RTMediaAdmin.php:817 app/admin/RTMediaAdmin.php:820
-#: app/admin/RTMediaAdmin.php:971 app/admin/RTMediaAdmin.php:1314
+#: app/admin/RTMediaAdmin.php:866 app/admin/RTMediaAdmin.php:869
+#: app/admin/RTMediaAdmin.php:1066 app/admin/RTMediaAdmin.php:1067
+#: app/admin/RTMediaAdmin.php:1400
msgid "Hire Us"
msgstr ""
-#: app/admin/RTMediaAdmin.php:830 app/admin/RTMediaAdmin.php:833
-#: app/admin/RTMediaAdmin.php:978 app/admin/RTMediaAdmin.php:1328
+#: app/admin/RTMediaAdmin.php:880 app/admin/RTMediaAdmin.php:883
+#: app/admin/RTMediaAdmin.php:1080 app/admin/RTMediaAdmin.php:1081
+#: app/admin/RTMediaAdmin.php:1414
msgid "Licenses"
msgstr ""
-#: app/admin/RTMediaAdmin.php:884
+#: app/admin/RTMediaAdmin.php:938
+msgid "Invalid value for [default_size_property]."
+msgstr ""
+
+#: app/admin/RTMediaAdmin.php:942
msgid "ON"
msgstr ""
-#: app/admin/RTMediaAdmin.php:885
+#: app/admin/RTMediaAdmin.php:943
msgid "OFF"
msgstr ""
-#: app/admin/RTMediaAdmin.php:892
+#: app/admin/RTMediaAdmin.php:950
msgid "Please do not refresh this page."
msgstr ""
-#: app/admin/RTMediaAdmin.php:893
+#: app/admin/RTMediaAdmin.php:951
msgid "Something went wrong. Please "
msgstr ""
-#: app/admin/RTMediaAdmin.php:893
+#: app/admin/RTMediaAdmin.php:951
msgid "refresh"
msgstr ""
-#: app/admin/RTMediaAdmin.php:893
+#: app/admin/RTMediaAdmin.php:951
msgid " page."
msgstr ""
-#: app/admin/RTMediaAdmin.php:894
+#: app/admin/RTMediaAdmin.php:952
msgid "This will subscribe you to the free plan."
msgstr ""
-#: app/admin/RTMediaAdmin.php:895
+#: app/admin/RTMediaAdmin.php:953
msgid "Are you sure you want to disable the encoding service?"
msgstr ""
-#: app/admin/RTMediaAdmin.php:896
+#: app/admin/RTMediaAdmin.php:954
msgid "Are you sure you want to enable the encoding service?"
msgstr ""
-#: app/admin/RTMediaAdmin.php:897
+#: app/admin/RTMediaAdmin.php:955
msgid "Settings have changed, you should save them!"
msgstr ""
-#: app/admin/RTMediaAdmin.php:898
+#: app/admin/RTMediaAdmin.php:956
msgid ""
"Number of video thumbnails to be generated should be greater than 0 in "
"media sizes settings. Setting it to default value 2."
msgstr ""
-#: app/admin/RTMediaAdmin.php:899
+#: app/admin/RTMediaAdmin.php:957
msgid ""
"Invalid value for number of video thumbnails in media sizes settings. "
"Setting it to round value"
msgstr ""
-#: app/admin/RTMediaAdmin.php:900
+#: app/admin/RTMediaAdmin.php:958
msgid ""
"Number of percentage in JPEG image quality should be greater than 0 in "
"media sizes settings. Setting it to default value 90."
msgstr ""
-#: app/admin/RTMediaAdmin.php:901
+#: app/admin/RTMediaAdmin.php:959
msgid ""
"Number of percentage in JPEG image quality should be less than 100 in media "
"sizes settings. Setting it to 100."
msgstr ""
-#: app/admin/RTMediaAdmin.php:902
+#: app/admin/RTMediaAdmin.php:960
msgid ""
"Invalid value for percentage in JPEG image quality in media sizes settings. "
"Setting it to round value"
msgstr ""
-#: app/admin/RTMediaAdmin.php:903
+#: app/admin/RTMediaAdmin.php:961
msgid ""
"Please enter positive integer value only. Setting number of media per page "
"value to default value 10."
msgstr ""
-#: app/admin/RTMediaAdmin.php:904
+#: app/admin/RTMediaAdmin.php:962
msgid ""
"Please enter positive integer value only. Setting number of media per page "
"value to round value"
msgstr ""
-#: app/admin/RTMediaAdmin.php:905
+#: app/admin/RTMediaAdmin.php:963
msgid "Request failed."
msgstr ""
-#: app/admin/RTMediaAdmin.php:906
+#: app/admin/RTMediaAdmin.php:964
msgid "You can not use @import statement in custom css"
msgstr ""
-#: app/admin/RTMediaAdmin.php:914
+#: app/admin/RTMediaAdmin.php:972
msgid "Please enter WP Admin Login."
msgstr ""
-#: app/admin/RTMediaAdmin.php:915
+#: app/admin/RTMediaAdmin.php:973
msgid "Please enter WP Admin password."
msgstr ""
-#: app/admin/RTMediaAdmin.php:916
+#: app/admin/RTMediaAdmin.php:974
msgid "Please enter SSH / FTP host."
msgstr ""
-#: app/admin/RTMediaAdmin.php:917
+#: app/admin/RTMediaAdmin.php:975
msgid "Please enter SSH / FTP login."
msgstr ""
-#: app/admin/RTMediaAdmin.php:918
+#: app/admin/RTMediaAdmin.php:976
msgid "Please enter SSH / FTP password."
msgstr ""
-#: app/admin/RTMediaAdmin.php:919
+#: app/admin/RTMediaAdmin.php:977
msgid "Please fill all the fields."
msgstr ""
-#: app/admin/RTMediaAdmin.php:1149
+#: app/admin/RTMediaAdmin.php:1238
msgid "Empowering The Web With WordPress"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1170
+#: app/admin/RTMediaAdmin.php:1260
msgid "Settings saved successfully!"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1176 app/admin/RTMediaAdmin.php:1205
+#: app/admin/RTMediaAdmin.php:1264 app/admin/RTMediaAdmin.php:1295
msgid "Save Settings"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1402 app/admin/RTMediaAdmin.php:1403
+#: app/admin/RTMediaAdmin.php:1488 app/admin/RTMediaAdmin.php:1489
msgid "Display"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1411
+#: app/admin/RTMediaAdmin.php:1497
msgid "rtMedia BuddyPress"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1412
+#: app/admin/RTMediaAdmin.php:1498
msgid "BuddyPress"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1420
+#: app/admin/RTMediaAdmin.php:1506
msgid "rtMedia Types"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1421
+#: app/admin/RTMediaAdmin.php:1507
msgid "Types"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1428
+#: app/admin/RTMediaAdmin.php:1514
msgid "rtMedia Sizes"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1429
+#: app/admin/RTMediaAdmin.php:1515
msgid "Media Sizes"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1436
+#: app/admin/RTMediaAdmin.php:1522
msgid "rtMedia Privacy"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1437
-#: app/main/controllers/privacy/RTMediaPrivacy.php:435
+#: app/admin/RTMediaAdmin.php:1523
+#: app/main/controllers/privacy/RTMediaPrivacy.php:538
msgid "Privacy"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1443
+#: app/admin/RTMediaAdmin.php:1529
msgid "rtMedia Custom CSS"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1444
+#: app/admin/RTMediaAdmin.php:1530
msgid "Custom CSS"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1453 app/admin/RTMediaAdmin.php:1454
+#: app/admin/RTMediaAdmin.php:1539 app/admin/RTMediaAdmin.php:1540
msgid "Other Settings"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1461 app/admin/RTMediaAdmin.php:1462
+#: app/admin/RTMediaAdmin.php:1547 app/admin/RTMediaAdmin.php:1548
msgid "Export/Import"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1509
+#: app/admin/RTMediaAdmin.php:1599
+#. translators: 1. Home url.
msgid "I use @rtMediaWP http://rt.cx/rtmedia on %s"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1511
+#: app/admin/RTMediaAdmin.php:1601
msgid "Post to Twitter Now"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1511
+#: app/admin/RTMediaAdmin.php:1601
msgid "Post to Twitter"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1512
+#: app/admin/RTMediaAdmin.php:1602
msgid "Share on Facebook Now"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1512
+#: app/admin/RTMediaAdmin.php:1602
msgid "Share on Facebook"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1513
+#: app/admin/RTMediaAdmin.php:1603
msgid "Rate rtMedia on Wordpress.org"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1513
+#: app/admin/RTMediaAdmin.php:1603
msgid "Rate on Wordpress.org"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1514
+#: app/admin/RTMediaAdmin.php:1604
msgid "Subscribe to our Feeds"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1517
+#: app/admin/RTMediaAdmin.php:1607
msgid "Spread the Word"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1523 app/admin/RTMediaAdmin.php:1530
+#: app/admin/RTMediaAdmin.php:1613 app/admin/RTMediaAdmin.php:1620
msgid "Subscribe"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1574
+#: app/admin/RTMediaAdmin.php:1669
msgid "Unable to read file!"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1585 app/admin/RTMediaAdmin.php:1592
+#: app/admin/RTMediaAdmin.php:1681 app/admin/RTMediaAdmin.php:1688
msgid "Invalid JSON Supplied!"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1598
+#: app/admin/RTMediaAdmin.php:1694
msgid "Invalid JSON Supplied. The JSON you supplied is not exported from rtMedia!"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1608
+#: app/admin/RTMediaAdmin.php:1704
msgid "Data passed for settings is unchanged!"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1612
+#: app/admin/RTMediaAdmin.php:1708
msgid "rtMedia Settings imported successfully!"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1615
+#: app/admin/RTMediaAdmin.php:1711
msgid "Could not update rtMedia Settings"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1637
+#: app/admin/RTMediaAdmin.php:1746
msgid "Thank you for your time."
msgstr ""
-#: app/admin/RTMediaAdmin.php:1650
+#: app/admin/RTMediaAdmin.php:1770
msgid "Premium Add-ons"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1668
+#: app/admin/RTMediaAdmin.php:1794
+#. translators: 1. Not supported image types.
msgid ""
"You have images enabled on rtMedia but your network allowed filetypes do "
"not permit uploading of %s. Click "
msgstr ""
-#: app/admin/RTMediaAdmin.php:1669 app/admin/RTMediaAdmin.php:1687
-#: app/admin/RTMediaAdmin.php:1705 app/admin/RTMediaFormHandler.php:610
-#: app/helper/RTMediaSettings.php:325 app/helper/RTMediaSupport.php:417
-#: app/helper/RTMediaSupport.php:695
+#: app/admin/RTMediaAdmin.php:1796 app/admin/RTMediaAdmin.php:1814
+#: app/admin/RTMediaAdmin.php:1832 app/admin/RTMediaFormHandler.php:628
+#: app/helper/RTMediaSettings.php:342 app/helper/RTMediaSupport.php:445
+#: app/helper/RTMediaSupport.php:730
msgid "here"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1670 app/admin/RTMediaAdmin.php:1688
-#: app/admin/RTMediaAdmin.php:1706
+#: app/admin/RTMediaAdmin.php:1797 app/admin/RTMediaAdmin.php:1815
+#: app/admin/RTMediaAdmin.php:1833
msgid " to change your settings manually."
msgstr ""
-#: app/admin/RTMediaAdmin.php:1672 app/admin/RTMediaAdmin.php:1690
-#: app/admin/RTMediaAdmin.php:1708
+#: app/admin/RTMediaAdmin.php:1799 app/admin/RTMediaAdmin.php:1817
+#: app/admin/RTMediaAdmin.php:1835
msgid "Recommended:"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1673 app/admin/RTMediaAdmin.php:1691
-#: app/admin/RTMediaAdmin.php:1709
+#: app/admin/RTMediaAdmin.php:1800 app/admin/RTMediaAdmin.php:1818
+#: app/admin/RTMediaAdmin.php:1836
msgid "Update Network Settings Automatically"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1686
+#: app/admin/RTMediaAdmin.php:1813
msgid ""
"You have video enabled on BuddyPress Media but your network allowed "
"filetypes do not permit uploading of mp4. Click "
msgstr ""
-#: app/admin/RTMediaAdmin.php:1704
+#: app/admin/RTMediaAdmin.php:1831
msgid ""
"You have audio enabled on BuddyPress Media but your network allowed "
"filetypes do not permit uploading of mp3. Click "
msgstr ""
-#: app/admin/RTMediaAdmin.php:1725
+#: app/admin/RTMediaAdmin.php:1852
msgid "Network settings updated successfully."
msgstr ""
-#: app/admin/RTMediaAdmin.php:1778
+#: app/admin/RTMediaAdmin.php:1914
msgid ""
"Please update rtMedia template files if you have overridden the default "
"rtMedia templates in your theme. If not, you can ignore and hide this "
"notice."
msgstr ""
-#: app/admin/RTMediaAdmin.php:1778
-#: app/importers/RTMediaMediaSizeImporter.php:73
-#: app/importers/RTMediaMigration.php:68
+#: app/admin/RTMediaAdmin.php:1914
+#: app/importers/RTMediaMediaSizeImporter.php:104
+#: app/importers/RTMediaMigration.php:92
msgid "Hide"
msgstr ""
-#: app/admin/RTMediaAdmin.php:1918
+#: app/admin/RTMediaAdmin.php:2074
+#. translators: 1. Account page and link.
msgid ""
-"Your license keys can be found on my-account page. For "
-"more details, please refer to License documentation page."
+"Your license keys can be found on my-account page. For "
+"more details, please refer to License documentation "
+"page."
msgstr ""
-#: app/admin/RTMediaAdmin.php:1935
+#: app/admin/RTMediaAdmin.php:2090
+#. translators: 1. License page link.
msgid ""
"We found an invalid or expired license key for an rtMedia add-on. Please go "
-"to the Licenses page to fix this issue."
+"to the Licenses page to fix this issue."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:63 app/admin/RTMediaFormHandler.php:104
-#: app/admin/RTMediaFormHandler.php:197 app/admin/RTMediaFormHandler.php:232
-#: app/admin/RTMediaFormHandler.php:313 app/admin/RTMediaFormHandler.php:342
+#: app/admin/RTMediaFormHandler.php:68 app/admin/RTMediaFormHandler.php:114
+#: app/admin/RTMediaFormHandler.php:217 app/admin/RTMediaFormHandler.php:249
+#: app/admin/RTMediaFormHandler.php:332 app/admin/RTMediaFormHandler.php:362
msgid "Please provide a \"value\" in the argument."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:145
+#: app/admin/RTMediaFormHandler.php:160
msgid "Need to specify atleast two radios, else use a checkbox instead"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:268
+#: app/admin/RTMediaFormHandler.php:285
msgid "Please provide a \"href\" in the argument."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:274
+#: app/admin/RTMediaFormHandler.php:291
msgid "Please provide a \"text\" in the argument."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:415 templates/media/album-gallery.php:67
-#: templates/media/media-gallery.php:101
+#: app/admin/RTMediaFormHandler.php:435 templates/media/album-gallery.php:75
+#: templates/media/media-gallery.php:114
msgid "Load More"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:416
+#: app/admin/RTMediaFormHandler.php:436
msgid "Pagination"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:428
+#: app/admin/RTMediaFormHandler.php:448
msgid "Allow user to comment on uploaded media"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:433
+#: app/admin/RTMediaFormHandler.php:453
msgid ""
"This will display the comment form and comment listing on single media "
"pages as well as inside lightbox (if lightbox is enabled)."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:438
+#: app/admin/RTMediaFormHandler.php:458
msgid "Enable gallery media search"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:443
+#: app/admin/RTMediaFormHandler.php:463
msgid "This will enable the search box in gallery page."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:448
+#: app/admin/RTMediaFormHandler.php:468
msgid "Enable likes for media"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:453
+#: app/admin/RTMediaFormHandler.php:473
msgid "Enabling this setting will add like feature for media."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:458
+#: app/admin/RTMediaFormHandler.php:478
msgid "Use lightbox to display media"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:463
+#: app/admin/RTMediaFormHandler.php:483
msgid "View single media in facebook style lightbox."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:468
+#: app/admin/RTMediaFormHandler.php:488
msgid "Number of media per page"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:474
+#: app/admin/RTMediaFormHandler.php:494
msgid "Number of media items you want to show per page on front end."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:480
+#: app/admin/RTMediaFormHandler.php:500
msgid "Media display pagination option"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:486
+#: app/admin/RTMediaFormHandler.php:506
msgid "Choose whether you want the load more button or pagination buttons."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:492
+#: app/admin/RTMediaFormHandler.php:512
msgid "Enable"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:492
+#: app/admin/RTMediaFormHandler.php:512
msgid "Cascading grid layout"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:497 app/admin/RTMediaFormHandler.php:509
+#: app/admin/RTMediaFormHandler.php:517 app/admin/RTMediaFormHandler.php:529
msgid "If you enable masonry view, it is advisable to"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:497 app/admin/RTMediaFormHandler.php:509
+#: app/admin/RTMediaFormHandler.php:517 app/admin/RTMediaFormHandler.php:529
msgid "for masonry view."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:501
+#: app/admin/RTMediaFormHandler.php:521
msgid "You might need to"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:501
+#: app/admin/RTMediaFormHandler.php:521
msgid "change thumbnail size"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:501
+#: app/admin/RTMediaFormHandler.php:521
msgid "and uncheck the crop box for thumbnails."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:501
+#: app/admin/RTMediaFormHandler.php:521
msgid ""
"To set gallery for fixed width, set image height to 0 and width as per your "
"requirement and vice-versa."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:504
+#: app/admin/RTMediaFormHandler.php:524
msgid "Enable Masonry Cascading grid layout for activity"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:516
+#: app/admin/RTMediaFormHandler.php:536
msgid "Enable Direct Upload"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:521
+#: app/admin/RTMediaFormHandler.php:541
msgid "Uploading media directly as soon as it gets selected."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:550
+#: app/admin/RTMediaFormHandler.php:568
msgid "Single Media View"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:551 app/helper/RTMediaAddon.php:348
+#: app/admin/RTMediaFormHandler.php:569 app/helper/RTMediaAddon.php:358
msgid "Media Likes"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:552
+#: app/admin/RTMediaFormHandler.php:570
msgid "List Media View"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:553
+#: app/admin/RTMediaFormHandler.php:571
msgid "Masonry View"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:554
+#: app/admin/RTMediaFormHandler.php:572
msgid "Direct Upload"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:555
+#: app/admin/RTMediaFormHandler.php:573
msgid "Gallery Media Search"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:573
+#: app/admin/RTMediaFormHandler.php:591
msgid "Allow usage data tracking"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:578
+#: app/admin/RTMediaFormHandler.php:596
msgid ""
"To make rtMedia better compatible with your sites, you can help the rtMedia "
"team learn what themes and plugins you are using. No private information "
"about your setup will be sent during tracking."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:582
+#: app/admin/RTMediaFormHandler.php:600
msgid "Admin bar menu integration"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:587
+#: app/admin/RTMediaFormHandler.php:605
msgid ""
"Add rtMedia menu to WordPress admin bar for easy access to settings and "
"moderation page (if enabled)."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:592
+#: app/admin/RTMediaFormHandler.php:610
msgid "Add a link to rtMedia in footer"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:597
+#: app/admin/RTMediaFormHandler.php:615
msgid "Help us promote rtMedia."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:602
+#: app/admin/RTMediaFormHandler.php:620
msgid "Enable JSON API"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:607
+#: app/admin/RTMediaFormHandler.php:625
msgid ""
"This will allow handling API requests for rtMedia sent through any mobile "
"app."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:610
+#: app/admin/RTMediaFormHandler.php:628
msgid "You can refer to the API document from"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:630
+#: app/admin/RTMediaFormHandler.php:648
msgid "Admin Settings"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:631
+#: app/admin/RTMediaFormHandler.php:649
msgid "API Settings"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:632
+#: app/admin/RTMediaFormHandler.php:650
msgid "Miscellaneous"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:633
+#: app/admin/RTMediaFormHandler.php:651
msgid "Footer Link"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:651
+#: app/admin/RTMediaFormHandler.php:669
msgid "Export rtMedia Settings"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:656
+#: app/admin/RTMediaFormHandler.php:674
msgid "Export Settings"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:657
+#: app/admin/RTMediaFormHandler.php:675
msgid "This will export rtMedia settings into a JSON file."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:663
+#: app/admin/RTMediaFormHandler.php:681
msgid "Import rtMedia Settings"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:668
+#: app/admin/RTMediaFormHandler.php:686
msgid "Import Settings"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:669
+#: app/admin/RTMediaFormHandler.php:687
msgid "This will import rtMedia settings. Allowed File Type: json"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:672
+#: app/admin/RTMediaFormHandler.php:690
msgid ""
"Importing invalid files/settings may break your site. Please import valid "
"file exported from rtMedia plugin only."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:675
+#: app/admin/RTMediaFormHandler.php:693
msgid "Export your personal data"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:680
+#: app/admin/RTMediaFormHandler.php:698
msgid "Export Data"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:681
+#: app/admin/RTMediaFormHandler.php:699
msgid "This will export your personal data."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:687
+#: app/admin/RTMediaFormHandler.php:705
msgid "Erase your personal data"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:692
+#: app/admin/RTMediaFormHandler.php:710
msgid "Erase Data"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:693
+#: app/admin/RTMediaFormHandler.php:711
msgid "This will erase your personal data."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:697
+#: app/admin/RTMediaFormHandler.php:715
msgid "Data will be expoted or erased along with wordpress user data."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:726
+#: app/admin/RTMediaFormHandler.php:744
msgid "Export/Import Settings"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:727
+#: app/admin/RTMediaFormHandler.php:745
msgid "Export/Erase Personal Data"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:813
+#: app/admin/RTMediaFormHandler.php:829
msgid "Media Types Settings"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:821 app/helper/RTMediaSettings.php:347
+#: app/admin/RTMediaFormHandler.php:838 app/helper/RTMediaSettings.php:363
msgid "Media Type"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:826
+#: app/admin/RTMediaFormHandler.php:844
msgid "Allow Upload"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:828
+#: app/admin/RTMediaFormHandler.php:846
msgid "Allows you to upload a particular media type on your post."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:836
+#: app/admin/RTMediaFormHandler.php:854
msgid "Set Featured"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:838
+#: app/admin/RTMediaFormHandler.php:856
msgid "Place a specific media as a featured content on the post."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:886
+#: app/admin/RTMediaFormHandler.php:904
msgid "File Extensions"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1017
+#: app/admin/RTMediaFormHandler.php:1039
msgid "Media Size Settings"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1022
+#: app/admin/RTMediaFormHandler.php:1044
msgid "Category"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1023
+#: app/admin/RTMediaFormHandler.php:1045
msgid "Entity"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1024
+#: app/admin/RTMediaFormHandler.php:1046
msgid "Width"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1025
+#: app/admin/RTMediaFormHandler.php:1047
msgid "Height"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1026
+#: app/admin/RTMediaFormHandler.php:1048
msgid "Crop"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1076
+#: app/admin/RTMediaFormHandler.php:1098
msgid "JPEG/JPG image quality (1-100)"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1082
+#: app/admin/RTMediaFormHandler.php:1104
msgid "Enter JPEG/JPG Image Quality. Minimum value is 1. 100 is original quality."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1090
+#: app/admin/RTMediaFormHandler.php:1112
msgid "Image Quality"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1112
+#: app/admin/RTMediaFormHandler.php:1132
msgid "Custom CSS settings"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1129
+#: app/admin/RTMediaFormHandler.php:1149
msgid "rtMedia default styles"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1135
+#: app/admin/RTMediaFormHandler.php:1155
msgid ""
"Load default rtMedia styles. You need to write your own style for rtMedia "
"if you disable it."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1140
+#: app/admin/RTMediaFormHandler.php:1160
msgid "Paste your CSS code"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1146
+#: app/admin/RTMediaFormHandler.php:1166
msgid "Custom rtMedia CSS container"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1169
+#: app/admin/RTMediaFormHandler.php:1189
msgid "Enable privacy"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1175
+#: app/admin/RTMediaFormHandler.php:1195
msgid "Enable privacy in rtMedia"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1180
+#: app/admin/RTMediaFormHandler.php:1200
msgid "Default privacy"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1186
+#: app/admin/RTMediaFormHandler.php:1206
msgid "Set default privacy for media"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1192
+#: app/admin/RTMediaFormHandler.php:1212
msgid "Allow users to set privacy for their content"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1197
+#: app/admin/RTMediaFormHandler.php:1217
msgid ""
"If you choose this, users will be able to change privacy of their own "
"uploads."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1201
+#: app/admin/RTMediaFormHandler.php:1221
msgid "For group uploads, BuddyPress groups privacy is used."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1243
+#: app/admin/RTMediaFormHandler.php:1261
msgid "Enable media in profile"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1248
+#: app/admin/RTMediaFormHandler.php:1266
msgid "Enable Media on BuddyPress Profile"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1253
+#: app/admin/RTMediaFormHandler.php:1271
msgid "Enable media in group"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1258
+#: app/admin/RTMediaFormHandler.php:1276
msgid "Enable Media on BuddyPress Groups"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1264
+#: app/admin/RTMediaFormHandler.php:1282
msgid "Allow upload from activity stream"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1269
+#: app/admin/RTMediaFormHandler.php:1287
msgid "Allow upload using status update box present on activity stream page"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1275
+#: app/admin/RTMediaFormHandler.php:1293
msgid "Enable media in comment"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1280
+#: app/admin/RTMediaFormHandler.php:1298
msgid ""
"This will allow users to upload media in comment section for originally "
"uploaded media up to 1 level."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1285 app/admin/RTMediaFormHandler.php:1290
+#: app/admin/RTMediaFormHandler.php:1303 app/admin/RTMediaFormHandler.php:1308
msgid "Disable upload in comment media"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1296
+#: app/admin/RTMediaFormHandler.php:1314
msgid "Number of media items to show in activity stream"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1301
+#: app/admin/RTMediaFormHandler.php:1319
msgid ""
"With bulk uploads activity, the stream may get flooded. You can control the "
"maximum number of media items or files per activity. This limit will not "
@@ -929,871 +941,884 @@ msgid ""
"unlimited."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1309
+#: app/admin/RTMediaFormHandler.php:1327
msgid "Enable media notification"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1314
+#: app/admin/RTMediaFormHandler.php:1332
msgid ""
"This will enable notifications to media authors for media likes and "
"comments."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1320
+#: app/admin/RTMediaFormHandler.php:1338
msgid "Create activity for media likes"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1325
+#: app/admin/RTMediaFormHandler.php:1343
msgid "Enabling this setting will create BuddyPress activity for media likes."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1332
+#: app/admin/RTMediaFormHandler.php:1350
msgid "Create activity for media comments"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1337
+#: app/admin/RTMediaFormHandler.php:1355
msgid "Enabling this setting will create BuddyPress activity for media comments."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1344
+#: app/admin/RTMediaFormHandler.php:1362
msgid "Organize media into albums"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1350
+#: app/admin/RTMediaFormHandler.php:1368
msgid ""
"This will add 'album' tab to BuddyPress profile and group depending on the "
"^above^ settings."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1355
+#: app/admin/RTMediaFormHandler.php:1373
msgid "Show album description"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1361
+#: app/admin/RTMediaFormHandler.php:1379
msgid "This will show description of an album under album gallery page."
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1396
+#: app/admin/RTMediaFormHandler.php:1408
msgid "Please Enable BuddyPress Activity Streams to update option"
msgstr ""
-#: app/admin/RTMediaFormHandler.php:1402
+#: app/admin/RTMediaFormHandler.php:1418
msgid "Please Enable BuddyPress User Groups to update option"
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:39
+#: app/admin/RTMediaUploadTermsAdmin.php:40
msgid "terms of services."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:40
+#: app/admin/RTMediaUploadTermsAdmin.php:41
msgid "Please check terms of service."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:61
+#: app/admin/RTMediaUploadTermsAdmin.php:62
msgid "Please enter valid URL."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:62
+#: app/admin/RTMediaUploadTermsAdmin.php:63
msgid "Please enter terms message."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:63
+#: app/admin/RTMediaUploadTermsAdmin.php:64
msgid "Please enter error message."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:64
+#: app/admin/RTMediaUploadTermsAdmin.php:65
msgid "Please enter privacy message."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:124
+#: app/admin/RTMediaUploadTermsAdmin.php:127
msgid "Ask users to agree to your terms"
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:138
+#: app/admin/RTMediaUploadTermsAdmin.php:142
msgid "Show \"Terms of Service\" checkbox on upload screen"
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:143
-#: app/admin/RTMediaUploadTermsAdmin.php:153
+#: app/admin/RTMediaUploadTermsAdmin.php:147
+#: app/admin/RTMediaUploadTermsAdmin.php:157
msgid "User have to check the terms and conditions before uploading the media."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:148
+#: app/admin/RTMediaUploadTermsAdmin.php:152
msgid "Show \"Terms of Service\" checkbox on activity screen"
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:158
+#: app/admin/RTMediaUploadTermsAdmin.php:162
msgid "Link for \"Terms of Service\" page"
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:163
+#: app/admin/RTMediaUploadTermsAdmin.php:167
msgid ""
"Link to the terms and condition page where user can read terms and "
"conditions."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:169
+#: app/admin/RTMediaUploadTermsAdmin.php:173
msgid "Terms of Service Message"
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:174
+#: app/admin/RTMediaUploadTermsAdmin.php:178
msgid "Add Terms of Service Message."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:179
+#: app/admin/RTMediaUploadTermsAdmin.php:183
msgid "Error Message"
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:184
+#: app/admin/RTMediaUploadTermsAdmin.php:188
msgid "Display Error Message When User Upload Media Without Selecting Checkbox ."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:189
+#: app/admin/RTMediaUploadTermsAdmin.php:193
msgid "Show \"Privacy Message\" on website"
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:194
+#: app/admin/RTMediaUploadTermsAdmin.php:198
msgid "User will see the privacy message on website."
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:199
+#: app/admin/RTMediaUploadTermsAdmin.php:203
msgid "Privacy Message"
msgstr ""
-#: app/admin/RTMediaUploadTermsAdmin.php:204
+#: app/admin/RTMediaUploadTermsAdmin.php:208
msgid "Display privacy message on your website."
msgstr ""
-#: app/admin/templates/tmpl-rtm-album-favourites-importer.php:4
+#: app/admin/templates/tmpl-rtm-album-favourites-importer.php:12
msgid "User's Favorites:"
msgstr ""
-#: app/helper/RTMediaAddon.php:81 app/helper/RTMediaAddon.php:82
+#: app/helper/RTMediaAddon.php:91 app/helper/RTMediaAddon.php:92
msgid "Plugins"
msgstr ""
-#: app/helper/RTMediaAddon.php:106
+#: app/helper/RTMediaAddon.php:116
msgid "SEO"
msgstr ""
-#: app/helper/RTMediaAddon.php:109
+#: app/helper/RTMediaAddon.php:119
msgid ""
"Generate an XML sitemap for all the public media files uploaded via rtMedia "
"plugin. These sitemaps can be useful to index search engine to improve "
"website SEO."
msgstr ""
-#: app/helper/RTMediaAddon.php:117
+#: app/helper/RTMediaAddon.php:127
msgid "Moderation"
msgstr ""
-#: app/helper/RTMediaAddon.php:120
+#: app/helper/RTMediaAddon.php:130
msgid ""
"Report media if they find offensive. Set number of reports to automatically "
"take down media from site."
msgstr ""
-#: app/helper/RTMediaAddon.php:128
+#: app/helper/RTMediaAddon.php:138
msgid "Custom Attributes"
msgstr ""
-#: app/helper/RTMediaAddon.php:131
+#: app/helper/RTMediaAddon.php:141
msgid ""
"Categories media based on attributes. Site owner need to create attributes. "
"When user upload a media, can select in which attribute that media can add."
msgstr ""
-#: app/helper/RTMediaAddon.php:139
+#: app/helper/RTMediaAddon.php:149
msgid "Docs and Other files"
msgstr ""
-#: app/helper/RTMediaAddon.php:142
+#: app/helper/RTMediaAddon.php:152
msgid ""
"Allow users to upload documents and other file type using rtMedia upload "
"box. This addon support all the file extensions which WordPress allows."
msgstr ""
-#: app/helper/RTMediaAddon.php:150
+#: app/helper/RTMediaAddon.php:160
msgid "Default Albums"
msgstr ""
-#: app/helper/RTMediaAddon.php:153
+#: app/helper/RTMediaAddon.php:163
msgid ""
"This plugin allows the creation of multiple default albums for rtMedia "
"uploads. One of these albums can be set as the default global album."
msgstr ""
-#: app/helper/RTMediaAddon.php:161
+#: app/helper/RTMediaAddon.php:171
msgid "Podcast (RSS and Atom feeds)"
msgstr ""
-#: app/helper/RTMediaAddon.php:164
+#: app/helper/RTMediaAddon.php:174
msgid ""
"Read rtMedia uploads from iTunes as well as any RSS feed-reader/podcasting "
"software."
msgstr ""
-#: app/helper/RTMediaAddon.php:172
+#: app/helper/RTMediaAddon.php:182
msgid "Playlists"
msgstr ""
-#: app/helper/RTMediaAddon.php:175
+#: app/helper/RTMediaAddon.php:185
msgid ""
"Audio can be grouped into playlists. Once the user upload any audio file, "
"can create a playlist or use existing one to manage audio files."
msgstr ""
-#: app/helper/RTMediaAddon.php:183
+#: app/helper/RTMediaAddon.php:193
msgid "Favorites"
msgstr ""
-#: app/helper/RTMediaAddon.php:186
+#: app/helper/RTMediaAddon.php:196
msgid ""
"Users can create their list of favorite media in which they can add media "
"previously uploaded by any user."
msgstr ""
-#: app/helper/RTMediaAddon.php:194
+#: app/helper/RTMediaAddon.php:204
msgid "Restrictions"
msgstr ""
-#: app/helper/RTMediaAddon.php:197
+#: app/helper/RTMediaAddon.php:207
msgid ""
"Site admin can set an upload limit on the basis of time span, file size "
"(MB) and number of files user can upload."
msgstr ""
-#: app/helper/RTMediaAddon.php:205
+#: app/helper/RTMediaAddon.php:215
msgid "bbPress Attachments"
msgstr ""
-#: app/helper/RTMediaAddon.php:208
+#: app/helper/RTMediaAddon.php:218
msgid "Attach media files to bbPress forum topics and replies."
msgstr ""
-#: app/helper/RTMediaAddon.php:216
+#: app/helper/RTMediaAddon.php:226
msgid "WordPress Sitewide Gallery"
msgstr ""
-#: app/helper/RTMediaAddon.php:219
+#: app/helper/RTMediaAddon.php:229
msgid ""
"Site admin can create and upload media into WordPress album. Create album "
"without being dependent on BuddyPress."
msgstr ""
-#: app/helper/RTMediaAddon.php:227
+#: app/helper/RTMediaAddon.php:237
msgid "WordPress Comment Attachments"
msgstr ""
-#: app/helper/RTMediaAddon.php:230
+#: app/helper/RTMediaAddon.php:240
msgid ""
"Allow users to upload a media file in WordPress comment attachment box. It "
"will display a thumbnail of attached file."
msgstr ""
-#: app/helper/RTMediaAddon.php:238
+#: app/helper/RTMediaAddon.php:248
msgid "Social Sharing"
msgstr ""
-#: app/helper/RTMediaAddon.php:241
+#: app/helper/RTMediaAddon.php:251
msgid ""
"Share uploaded media on social network sites like Facebook, twitter, "
"linkedin, Google +. This addon integrate with rtSocial plugin."
msgstr ""
-#: app/helper/RTMediaAddon.php:249
+#: app/helper/RTMediaAddon.php:259
msgid "Sidebar Widgets"
msgstr ""
-#: app/helper/RTMediaAddon.php:252
+#: app/helper/RTMediaAddon.php:262
msgid ""
"This addon provide widgets to upload media and display gallery for rtMedia "
"plugin."
msgstr ""
-#: app/helper/RTMediaAddon.php:260
+#: app/helper/RTMediaAddon.php:270
msgid "5 Star Ratings"
msgstr ""
-#: app/helper/RTMediaAddon.php:263
+#: app/helper/RTMediaAddon.php:273
msgid ""
"Display 5 star rating for all the uploaded media. User can rate the media "
"files from 1 to 5 star."
msgstr ""
-#: app/helper/RTMediaAddon.php:271
+#: app/helper/RTMediaAddon.php:281
msgid "Edit Mp3 Info (ID3 Tags)"
msgstr ""
-#: app/helper/RTMediaAddon.php:274
+#: app/helper/RTMediaAddon.php:284
msgid "Allow user to edit MP3 FIle Audio tags (ID 3 tags)."
msgstr ""
-#: app/helper/RTMediaAddon.php:282
+#: app/helper/RTMediaAddon.php:292
msgid "Media Sorting"
msgstr ""
-#: app/helper/RTMediaAddon.php:285
+#: app/helper/RTMediaAddon.php:295
msgid ""
"Sort uploaded media based on file size, ascending/descending title, upload "
"date of media."
msgstr ""
-#: app/helper/RTMediaAddon.php:293
+#: app/helper/RTMediaAddon.php:303
msgid "Bulk Edit"
msgstr ""
-#: app/helper/RTMediaAddon.php:296
+#: app/helper/RTMediaAddon.php:306
msgid ""
"Bulk edit option will allow user to quickly select media files and do "
"required actions like move files from one album to another, change "
"attributes, change privacy, delete files."
msgstr ""
-#: app/helper/RTMediaAddon.php:304
+#: app/helper/RTMediaAddon.php:314
msgid "BuddyPress Profile Picture"
msgstr ""
-#: app/helper/RTMediaAddon.php:307
+#: app/helper/RTMediaAddon.php:317
msgid "User can easily set his/her profile picture from media uploaded via rtMedia."
msgstr ""
-#: app/helper/RTMediaAddon.php:315
+#: app/helper/RTMediaAddon.php:325
msgid "Album Cover Art"
msgstr ""
-#: app/helper/RTMediaAddon.php:318
+#: app/helper/RTMediaAddon.php:328
msgid "User can easily set any of the image of the album as album cover photo"
msgstr ""
-#: app/helper/RTMediaAddon.php:326
+#: app/helper/RTMediaAddon.php:336
msgid "Direct Download Link"
msgstr ""
-#: app/helper/RTMediaAddon.php:329
+#: app/helper/RTMediaAddon.php:339
msgid ""
"User can download media from website. Site owner can restrict which media "
"type can be allowed to download."
msgstr ""
-#: app/helper/RTMediaAddon.php:337
+#: app/helper/RTMediaAddon.php:347
msgid "Upload by URL"
msgstr ""
-#: app/helper/RTMediaAddon.php:340
+#: app/helper/RTMediaAddon.php:350
msgid ""
"Users do not need to download media files from a URL and then upload it "
"with rtMedia. Just provide the absolute URL for the media and it will "
"upload on site."
msgstr ""
-#: app/helper/RTMediaAddon.php:351
+#: app/helper/RTMediaAddon.php:361
msgid ""
"This add-on let you know who liked the media. User can also see which media "
"they liked under their profile."
msgstr ""
-#: app/helper/RTMediaAddon.php:359
+#: app/helper/RTMediaAddon.php:369
msgid "Activity URL Preview"
msgstr ""
-#: app/helper/RTMediaAddon.php:362
+#: app/helper/RTMediaAddon.php:372
msgid ""
"This addon provides a preview of the URL that is shared in BuddyPress "
"activity. Just enter the URL you want to share on your site and see a "
"preview of it before it is shared."
msgstr ""
-#: app/helper/RTMediaAddon.php:370
+#: app/helper/RTMediaAddon.php:380
msgid "View Counter"
msgstr ""
-#: app/helper/RTMediaAddon.php:373
+#: app/helper/RTMediaAddon.php:383
msgid ""
"Enable view count for all the uploaded media. Whenever user open that media "
"file in lightbox or in single media view, that view count will be "
"calculated and display next to media file."
msgstr ""
-#: app/helper/RTMediaAddon.php:381
+#: app/helper/RTMediaAddon.php:391
msgid "Shortcode Generator"
msgstr ""
-#: app/helper/RTMediaAddon.php:384
+#: app/helper/RTMediaAddon.php:394
msgid ""
"This add-on will add shortcode generator button in WordPress post and page "
"editor for all the rtMedia shortcodes."
msgstr ""
-#: app/helper/RTMediaAddon.php:392
+#: app/helper/RTMediaAddon.php:402
msgid "Album Privacy"
msgstr ""
-#: app/helper/RTMediaAddon.php:395
+#: app/helper/RTMediaAddon.php:405
msgid ""
"Set album privacy when user create an album or change album privacy when "
"editing existing albums. The privacy levels are Public, Logged in user, "
"Friends and Private."
msgstr ""
-#: app/helper/RTMediaAddon.php:403
+#: app/helper/RTMediaAddon.php:413
msgid "BuddyPress Group Media Control"
msgstr ""
-#: app/helper/RTMediaAddon.php:406
+#: app/helper/RTMediaAddon.php:416
msgid "This add-on allows group owner to manage media upload feature group wise."
msgstr ""
-#: app/helper/RTMediaAddon.php:414
+#: app/helper/RTMediaAddon.php:424
msgid "Set Custom Thumbnail for Audio/Video"
msgstr ""
-#: app/helper/RTMediaAddon.php:417
+#: app/helper/RTMediaAddon.php:427
msgid ""
"Allow media owner to change the thumbnail of uploaded audio/video files. "
"The File Upload box will be provided to change media thumbnail."
msgstr ""
-#: app/helper/RTMediaAddon.php:425
+#: app/helper/RTMediaAddon.php:435
msgid "myCRED"
msgstr ""
-#: app/helper/RTMediaAddon.php:428
+#: app/helper/RTMediaAddon.php:438
msgid ""
"This plugin integrates rtMedia and myCRED plugin, users can be can award "
"virtual points for various rtMedia activities, like media upload, likes, "
"deleted etc."
msgstr ""
-#: app/helper/RTMediaAddon.php:436
+#: app/helper/RTMediaAddon.php:446
msgid "CubePoints"
msgstr ""
-#: app/helper/RTMediaAddon.php:439
+#: app/helper/RTMediaAddon.php:449
msgid ""
"If you are using CubePoints plugin on your website than rtMedia CubePoint "
"add-on can be integrate with that plugin to setup point management system "
"for rtMedia related activities."
msgstr ""
-#: app/helper/RTMediaAddon.php:447
+#: app/helper/RTMediaAddon.php:457
msgid "Social Sync"
msgstr ""
-#: app/helper/RTMediaAddon.php:450
+#: app/helper/RTMediaAddon.php:460
msgid "rtMedia Social Sync allows you to import media from your Facebook account."
msgstr ""
-#: app/helper/RTMediaAddon.php:458
+#: app/helper/RTMediaAddon.php:468
msgid "Photo Watermark"
msgstr ""
-#: app/helper/RTMediaAddon.php:461
+#: app/helper/RTMediaAddon.php:471
msgid ""
"rtMedia Photo Watermark let you add watermark on your images uploaded using "
"rtMedia."
msgstr ""
-#: app/helper/RTMediaAddon.php:469
+#: app/helper/RTMediaAddon.php:479
msgid "Photo Tagging"
msgstr ""
-#: app/helper/RTMediaAddon.php:472
+#: app/helper/RTMediaAddon.php:482
msgid ""
"rtMedia Photo Tagging enable users to tag their friends on photos uploaded "
"using rtMedia."
msgstr ""
-#: app/helper/RTMediaAddon.php:480
+#: app/helper/RTMediaAddon.php:490
msgid "Photo Filters"
msgstr ""
-#: app/helper/RTMediaAddon.php:483
+#: app/helper/RTMediaAddon.php:493
msgid ""
"rtMedia Photo Filters adds Instagram like filters to images uploaded with "
"rtMedia."
msgstr ""
-#: app/helper/RTMediaAddon.php:491
+#: app/helper/RTMediaAddon.php:501
msgid "Membership Add-on"
msgstr ""
-#: app/helper/RTMediaAddon.php:494
+#: app/helper/RTMediaAddon.php:504
msgid ""
"rtMedia Membership add-on provides membership functionality in your site in "
"terms of media upload."
msgstr ""
-#: app/helper/RTMediaAddon.php:521
+#: app/helper/RTMediaAddon.php:531
msgid "Coming Soon !!"
msgstr ""
-#: app/helper/RTMediaAddon.php:554
+#: app/helper/RTMediaAddon.php:561
msgid "Purchased"
msgstr ""
-#: app/helper/RTMediaAddon.php:556 app/helper/RTMediaThemes.php:157
-#: app/helper/RTMediaThemes.php:201 app/helper/RTMediaThemes.php:310
-#: app/helper/RTMediaThemes.php:354 app/importers/BPMediaAlbumimporter.php:177
+#: app/helper/RTMediaAddon.php:563 app/helper/RTMediaThemes.php:161
+#: app/helper/RTMediaThemes.php:205 app/helper/RTMediaThemes.php:311
+#: app/helper/RTMediaThemes.php:355 app/importers/BPMediaAlbumimporter.php:205
msgid "Buy Now"
msgstr ""
-#: app/helper/RTMediaAddon.php:588 app/helper/RTMediaThemes.php:155
-#: app/helper/RTMediaThemes.php:199 app/helper/RTMediaThemes.php:308
-#: app/helper/RTMediaThemes.php:352 app/importers/BPMediaAlbumimporter.php:178
+#: app/helper/RTMediaAddon.php:603 app/helper/RTMediaThemes.php:159
+#: app/helper/RTMediaThemes.php:203 app/helper/RTMediaThemes.php:309
+#: app/helper/RTMediaThemes.php:353 app/importers/BPMediaAlbumimporter.php:206
msgid "Live Demo"
msgstr ""
-#: app/helper/RTMediaAdminWidget.php:32
+#: app/helper/RTMediaAdminWidget.php:40
msgid "Argument missing. id is required."
msgstr ""
-#: app/helper/RTMediaCommentNotification.php:62
+#: app/helper/RTMediaCommentNotification.php:81
msgid "commented on your"
msgstr ""
-#: app/helper/RTMediaCommentNotification.php:64
+#: app/helper/RTMediaCommentNotification.php:83
msgid "new comments on your"
msgstr ""
-#: app/helper/RTMediaFeed.php:48
+#: app/helper/RTMediaFeed.php:56
msgid "No items"
msgstr ""
-#: app/helper/RTMediaFeed.php:55
+#: app/helper/RTMediaFeed.php:63
msgid "Posted "
msgstr ""
-#: app/helper/RTMediaLicense.php:53
+#: app/helper/RTMediaLicense.php:68
msgid "You may be interested in"
msgstr ""
-#: app/helper/RTMediaLicense.php:53
+#: app/helper/RTMediaLicense.php:68
msgid "rtMedia Addons"
msgstr ""
-#: app/helper/RTMediaLicense.php:83
+#: app/helper/RTMediaLicense.php:104
msgid "Deactivate License"
msgstr ""
-#: app/helper/RTMediaLicense.php:86
+#: app/helper/RTMediaLicense.php:107
msgid "Activate License"
msgstr ""
-#: app/helper/RTMediaLicense.php:126
-msgid "Your license key expired on %1$s. Please renew your license key."
+#: app/helper/RTMediaLicense.php:153
+#. translators: %s: Expiry date.
+msgid "Your license key expired on %s. Please renew your license key."
msgstr ""
-#: app/helper/RTMediaLicense.php:137
+#: app/helper/RTMediaLicense.php:163
msgid ""
"Your license key has been disabled. Please contact support for more "
"information."
msgstr ""
-#: app/helper/RTMediaLicense.php:147
+#: app/helper/RTMediaLicense.php:173
+#. translators: %s: Account page link.
msgid ""
"Invalid license. Please visit your account "
"page and verify it."
msgstr ""
-#: app/helper/RTMediaLicense.php:159
+#: app/helper/RTMediaLicense.php:189
+#. translators: 1: Add-on name, 2:My account page link.
msgid ""
"Your %1$s is not active for this URL. Please visit your account page to manage your license key "
"URLs."
msgstr ""
-#: app/helper/RTMediaLicense.php:171
+#: app/helper/RTMediaLicense.php:202
+#. translators: %s: Add-on name.
msgid "This appears to be an invalid license key for %s."
msgstr ""
-#: app/helper/RTMediaLicense.php:180
+#: app/helper/RTMediaLicense.php:212
+#. translators: %s: Account link.
msgid ""
"Your license key has reached its activation limit. View "
"possible upgrades now."
msgstr ""
-#: app/helper/RTMediaLicense.php:189
+#: app/helper/RTMediaLicense.php:222
+#. translators: %s: Account link.
msgid ""
"Your license is not activable, please visit your account "
"page ."
msgstr ""
-#: app/helper/RTMediaLicense.php:198 app/helper/RTMediaLicense.php:252
+#: app/helper/RTMediaLicense.php:230 app/helper/RTMediaLicense.php:285
msgid "To receive updates, please enter your valid license key."
msgstr ""
-#: app/helper/RTMediaLicense.php:217
+#: app/helper/RTMediaLicense.php:248
msgid "License key never expires."
msgstr ""
-#: app/helper/RTMediaLicense.php:226
+#: app/helper/RTMediaLicense.php:258
+#. translators: 1: Expiry date.
msgid "Your license key expires soon! It expires on %1$s. Renew your license key."
msgstr ""
-#: app/helper/RTMediaLicense.php:237
+#: app/helper/RTMediaLicense.php:270
+#. translators: %s: Expiry date.
msgid "Your license key expires on %s."
msgstr ""
-#: app/helper/RTMediaLikeNotification.php:96
+#: app/helper/RTMediaLikeNotification.php:116
msgid "liked your"
msgstr ""
-#: app/helper/RTMediaLikeNotification.php:98
+#: app/helper/RTMediaLikeNotification.php:118
msgid "and one more friend liked your"
msgstr ""
-#: app/helper/RTMediaLikeNotification.php:101
+#: app/helper/RTMediaLikeNotification.php:121
msgid "and"
msgstr ""
-#: app/helper/RTMediaLikeNotification.php:101
+#: app/helper/RTMediaLikeNotification.php:121
msgid "other friends liked your"
msgstr ""
-#: app/helper/RTMediaSettings.php:244
+#: app/helper/RTMediaSettings.php:251
msgid "BuddyPress Media Addons for Photos"
msgstr ""
-#: app/helper/RTMediaSettings.php:254
+#: app/helper/RTMediaSettings.php:271
msgid "rtMedia Themes"
msgstr ""
-#: app/helper/RTMediaSettings.php:324
+#: app/helper/RTMediaSettings.php:341
+#. translators: %s: link.
msgid ""
"Currently your network allows uploading of the following file types. You "
"can change the settings %s"
msgstr ""
-#: app/helper/RTMediaSettings.php:345 app/helper/RTMediaSettings.php:347
+#: app/helper/RTMediaSettings.php:361 app/helper/RTMediaSettings.php:363
msgid "Atleast one Media Type Must be selected"
msgstr ""
-#: app/helper/RTMediaSettings.php:356 app/helper/RTMediaSettings.php:358
+#: app/helper/RTMediaSettings.php:372 app/helper/RTMediaSettings.php:374
msgid "\"Number of media\" count value should be numeric and greater than 0."
msgstr ""
-#: app/helper/RTMediaSettings.php:358
+#: app/helper/RTMediaSettings.php:374
msgid "Default Count"
msgstr ""
-#: app/helper/RTMediaSettings.php:363
+#: app/helper/RTMediaSettings.php:380
msgid "Settings saved."
msgstr ""
-#: app/helper/RTMediaSettings.php:387
+#: app/helper/RTMediaSettings.php:404
msgid "If you make changes to width, height or crop settings, you must use "
msgstr ""
-#: app/helper/RTMediaSettings.php:388
+#: app/helper/RTMediaSettings.php:405
msgid "Regenerate Thumbnail Plugin"
msgstr ""
-#: app/helper/RTMediaSettings.php:389
+#: app/helper/RTMediaSettings.php:406
msgid " to regenerate old images."
msgstr ""
-#: app/helper/RTMediaSettings.php:412
+#: app/helper/RTMediaSettings.php:425
msgid "BuddyPress Media 2.6 requires a database upgrade. "
msgstr ""
-#: app/helper/RTMediaSettings.php:413
+#: app/helper/RTMediaSettings.php:426
msgid "Update Database"
msgstr ""
-#: app/helper/RTMediaSettings.php:427
+#: app/helper/RTMediaSettings.php:438
msgid ""
"If your site has some issues due to rtMedia and you want one on one support "
"then you can create a support topic on the "
msgstr ""
-#: app/helper/RTMediaSettings.php:428 app/helper/RTMediaSupport.php:461
+#: app/helper/RTMediaSettings.php:439 app/helper/RTMediaSupport.php:488
msgid "rtMedia Support Page"
msgstr ""
-#: app/helper/RTMediaSettings.php:430
+#: app/helper/RTMediaSettings.php:441
msgid ""
"If you have any suggestions, enhancements or bug reports, then you can open "
"a new issue on "
msgstr ""
-#: app/helper/RTMediaSettings.php:431 app/helper/RTMediaSupport.php:468
+#: app/helper/RTMediaSettings.php:442 app/helper/RTMediaSupport.php:496
msgid "GitHub"
msgstr ""
-#: app/helper/RTMediaSupport.php:43 app/helper/RTMediaSupport.php:578
+#: app/helper/RTMediaSupport.php:66 app/helper/RTMediaSupport.php:602
msgid "Cheatin' uh?"
msgstr ""
-#: app/helper/RTMediaSupport.php:44 app/helper/RTMediaSupport.php:579
+#: app/helper/RTMediaSupport.php:67 app/helper/RTMediaSupport.php:603
msgid "Can not verify request source."
msgstr ""
-#: app/helper/RTMediaSupport.php:74 app/helper/RTMediaSupport.php:75
-#: app/helper/RTMediaSupport.php:352
+#: app/helper/RTMediaSupport.php:94 app/helper/RTMediaSupport.php:95
+#: app/helper/RTMediaSupport.php:382
msgid "Debug Info"
msgstr ""
-#: app/helper/RTMediaSupport.php:84 app/helper/RTMediaSupport.php:85
-#: app/importers/RTMediaMigration.php:87
+#: app/helper/RTMediaSupport.php:104 app/helper/RTMediaSupport.php:105
+#: app/importers/RTMediaMigration.php:131
+#: app/importers/RTMediaMigration.php:132
msgid "Migration"
msgstr ""
-#: app/helper/RTMediaSupport.php:157
+#: app/helper/RTMediaSupport.php:184
msgid "Service"
msgstr ""
-#: app/helper/RTMediaSupport.php:164
+#: app/helper/RTMediaSupport.php:193
msgid "Premium Support"
msgstr ""
-#: app/helper/RTMediaSupport.php:170
+#: app/helper/RTMediaSupport.php:201
msgid "Bug Report"
msgstr ""
-#: app/helper/RTMediaSupport.php:176
+#: app/helper/RTMediaSupport.php:209
msgid "New Feature"
msgstr ""
-#: app/helper/RTMediaSupport.php:178
+#: app/helper/RTMediaSupport.php:211
msgid "Submit"
msgstr ""
-#: app/helper/RTMediaSupport.php:226
+#: app/helper/RTMediaSupport.php:256
msgid "by"
msgstr ""
-#: app/helper/RTMediaSupport.php:226
+#: app/helper/RTMediaSupport.php:256
msgid "version"
msgstr ""
-#: app/helper/RTMediaSupport.php:372
+#: app/helper/RTMediaSupport.php:403
msgid "Download Debug Info"
msgstr ""
-#: app/helper/RTMediaSupport.php:411
+#: app/helper/RTMediaSupport.php:439
msgid "There is no media found to migrate."
msgstr ""
-#: app/helper/RTMediaSupport.php:417
-#: app/main/controllers/media/RTMediaLoginPopup.php:56
+#: app/helper/RTMediaSupport.php:445
+#: app/main/controllers/media/RTMediaLoginPopup.php:67
msgid "Click"
msgstr ""
-#: app/helper/RTMediaSupport.php:417
+#: app/helper/RTMediaSupport.php:445
msgid "here to migrate media from rtMedia 2.x to rtMedia 3.0+."
msgstr ""
-#: app/helper/RTMediaSupport.php:445
+#: app/helper/RTMediaSupport.php:471
msgid "Submit a Bug Report"
msgstr ""
-#: app/helper/RTMediaSupport.php:448
+#: app/helper/RTMediaSupport.php:474
msgid "Submit a New Feature Request"
msgstr ""
-#: app/helper/RTMediaSupport.php:451
+#: app/helper/RTMediaSupport.php:477
msgid "Submit Support Request"
msgstr ""
-#: app/helper/RTMediaSupport.php:460
+#: app/helper/RTMediaSupport.php:487
+#. translators: %s: link.
msgid ""
"If your site has some issues due to rtMedia and you want support, feel free "
"to create a support topic on %s"
msgstr ""
-#: app/helper/RTMediaSupport.php:467
+#: app/helper/RTMediaSupport.php:495
+#. translators: %s: Github link.
msgid ""
"If you have any suggestions, enhancements or bug reports, then you can open "
"a new issue on %s"
msgstr ""
-#: app/helper/RTMediaSupport.php:487
+#: app/helper/RTMediaSupport.php:515
msgid "Name"
msgstr ""
-#: app/helper/RTMediaSupport.php:492
+#: app/helper/RTMediaSupport.php:520
msgid "Use actual user name which used during purchased."
msgstr ""
-#: app/helper/RTMediaSupport.php:499
+#: app/helper/RTMediaSupport.php:527
msgid "Email"
msgstr ""
-#: app/helper/RTMediaSupport.php:504
+#: app/helper/RTMediaSupport.php:532
msgid "Use email id which used during purchased"
msgstr ""
-#: app/helper/RTMediaSupport.php:511
+#: app/helper/RTMediaSupport.php:539
msgid "Website"
msgstr ""
-#: app/helper/RTMediaSupport.php:519
+#: app/helper/RTMediaSupport.php:547
msgid "Subject"
msgstr ""
-#: app/helper/RTMediaSupport.php:527 templates/media/album-single-edit.php:20
-#: templates/media/media-single-edit.php:19
+#: app/helper/RTMediaSupport.php:555 templates/media/album-single-edit.php:31
+#: templates/media/media-single-edit.php:27
msgid "Details"
msgstr ""
-#: app/helper/RTMediaSupport.php:543
-msgid "Attachement"
+#: app/helper/RTMediaSupport.php:571
+msgid "Attachment"
msgstr ""
-#: app/helper/RTMediaSupport.php:548
+#: app/helper/RTMediaSupport.php:576
msgid "Allowed file types are : images, documents and texts."
msgstr ""
-#: app/helper/RTMediaSupport.php:594
+#: app/helper/RTMediaSupport.php:618
msgid "rtMedia Premium Support Request from"
msgstr ""
-#: app/helper/RTMediaSupport.php:597
+#: app/helper/RTMediaSupport.php:621
msgid "rtMedia New Feature Request from"
msgstr ""
-#: app/helper/RTMediaSupport.php:600
+#: app/helper/RTMediaSupport.php:624
msgid "rtMedia Bug Report from"
msgstr ""
-#: app/helper/RTMediaSupport.php:603
+#: app/helper/RTMediaSupport.php:627
msgid "rtMedia Contact from"
msgstr ""
-#: app/helper/RTMediaSupport.php:682
+#: app/helper/RTMediaSupport.php:716
msgid "Thank you for your Feedback/Suggestion."
msgstr ""
-#: app/helper/RTMediaSupport.php:684
+#: app/helper/RTMediaSupport.php:718
msgid "Thank you for posting your support request."
msgstr ""
-#: app/helper/RTMediaSupport.php:685
+#: app/helper/RTMediaSupport.php:719
msgid "We will get back to you shortly."
msgstr ""
-#: app/helper/RTMediaSupport.php:690
+#: app/helper/RTMediaSupport.php:724
msgid "Your server failed to send an email."
msgstr ""
-#: app/helper/RTMediaSupport.php:691
+#: app/helper/RTMediaSupport.php:725
msgid "Kindly contact your server support to fix this."
msgstr ""
-#: app/helper/RTMediaSupport.php:694
+#: app/helper/RTMediaSupport.php:729
+#. translators: %s: rtmedia link.
msgid "You can alternatively create a support request %s"
msgstr ""
-#: app/helper/RTMediaThemes.php:60 app/helper/RTMediaThemes.php:61
+#: app/helper/RTMediaThemes.php:67 app/helper/RTMediaThemes.php:68
msgid "Themes By rtCamp"
msgstr ""
-#: app/helper/RTMediaThemes.php:67 app/helper/RTMediaThemes.php:68
+#: app/helper/RTMediaThemes.php:74 app/helper/RTMediaThemes.php:75
msgid "3rd Party Themes"
msgstr ""
-#: app/helper/RTMediaThemes.php:105
+#: app/helper/RTMediaThemes.php:109
msgid "rtDating"
msgstr ""
@@ -1801,94 +1826,94 @@ msgstr ""
msgid "rtCamp"
msgstr ""
-#: app/helper/RTMediaThemes.php:111
+#: app/helper/RTMediaThemes.php:115
msgid ""
"rtDating is a unique, clean and modern theme only for WordPress. This theme "
"is mostly useful for dating sites and community websites. It can also be "
"use for any other WordPress based website."
msgstr ""
-#: app/helper/RTMediaThemes.php:115
+#: app/helper/RTMediaThemes.php:119
msgid "InspireBook"
msgstr ""
-#: app/helper/RTMediaThemes.php:121
+#: app/helper/RTMediaThemes.php:125
msgid ""
"InspireBook is a premium WordPress theme, designed especially for "
"BuddyPress and rtMedia powered social-networks."
msgstr ""
-#: app/helper/RTMediaThemes.php:125
+#: app/helper/RTMediaThemes.php:129
msgid "Foodmania"
msgstr ""
-#: app/helper/RTMediaThemes.php:131
+#: app/helper/RTMediaThemes.php:135
msgid ""
"Its premium WordPress theme, designed especially for Food, recipe and "
"photography community sites."
msgstr ""
-#: app/helper/RTMediaThemes.php:149 app/helper/RTMediaThemes.php:302
+#: app/helper/RTMediaThemes.php:153 app/helper/RTMediaThemes.php:303
msgid "Theme Details"
msgstr ""
-#: app/helper/RTMediaThemes.php:164 app/helper/RTMediaThemes.php:317
+#: app/helper/RTMediaThemes.php:168 app/helper/RTMediaThemes.php:318
msgid "Show previous theme"
msgstr ""
-#: app/helper/RTMediaThemes.php:167 app/helper/RTMediaThemes.php:320
+#: app/helper/RTMediaThemes.php:171 app/helper/RTMediaThemes.php:321
msgid "Show next theme"
msgstr ""
-#: app/helper/RTMediaThemes.php:170 app/helper/RTMediaThemes.php:323
+#: app/helper/RTMediaThemes.php:174 app/helper/RTMediaThemes.php:324
msgid "Close overlay"
msgstr ""
-#: app/helper/RTMediaThemes.php:189 app/helper/RTMediaThemes.php:342
+#: app/helper/RTMediaThemes.php:193 app/helper/RTMediaThemes.php:343
msgid "Read More"
msgstr ""
-#: app/helper/RTMediaThemes.php:192 app/helper/RTMediaThemes.php:345
+#: app/helper/RTMediaThemes.php:196 app/helper/RTMediaThemes.php:346
msgid "Tags:"
msgstr ""
-#: app/helper/RTMediaThemes.php:227
+#: app/helper/RTMediaThemes.php:229
msgid "Woffice - Intranet/Extranet WordPress Theme"
msgstr ""
-#: app/helper/RTMediaThemes.php:230
+#: app/helper/RTMediaThemes.php:232
msgid "Alkaweb"
msgstr ""
-#: app/helper/RTMediaThemes.php:233
+#: app/helper/RTMediaThemes.php:235
msgid ""
"Woffice is a feature rich, powerful Multipurpose Intranet/Extranet "
"Wordpress theme."
msgstr ""
-#: app/helper/RTMediaThemes.php:237
+#: app/helper/RTMediaThemes.php:239
msgid "Thrive - Intranet & Community WordPress Theme"
msgstr ""
-#: app/helper/RTMediaThemes.php:240 app/helper/RTMediaThemes.php:260
+#: app/helper/RTMediaThemes.php:242 app/helper/RTMediaThemes.php:262
msgid "dunhakdis"
msgstr ""
-#: app/helper/RTMediaThemes.php:243
+#: app/helper/RTMediaThemes.php:245
msgid ""
"Thrive is an innovative WordPress Theme designed to cater company portals, "
"organisational websites, company intranet and extranets."
msgstr ""
-#: app/helper/RTMediaThemes.php:247
+#: app/helper/RTMediaThemes.php:249
msgid "(M) SOCIAL NETWORK BUDDYPRESS THEME"
msgstr ""
-#: app/helper/RTMediaThemes.php:250
+#: app/helper/RTMediaThemes.php:252
msgid "gavick"
msgstr ""
-#: app/helper/RTMediaThemes.php:253
+#: app/helper/RTMediaThemes.php:255
msgid ""
"(M)Social is a sophisticated, vibrant community theme that offers "
"incredible grid layouts, with full BuddyPress support so your users can "
@@ -1896,26 +1921,26 @@ msgid ""
"and images with the community."
msgstr ""
-#: app/helper/RTMediaThemes.php:257
+#: app/helper/RTMediaThemes.php:259
msgid "Klein"
msgstr ""
-#: app/helper/RTMediaThemes.php:263
+#: app/helper/RTMediaThemes.php:265
msgid ""
"Klein is an innovative WordPress theme built to support BuddyPress, "
"bbPress, and WooCommerce out of the box. Perfect for websites that "
"interacts with many users."
msgstr ""
-#: app/helper/RTMediaThemes.php:267
+#: app/helper/RTMediaThemes.php:269
msgid "SweetDate"
msgstr ""
-#: app/helper/RTMediaThemes.php:270 app/helper/RTMediaThemes.php:280
+#: app/helper/RTMediaThemes.php:272 app/helper/RTMediaThemes.php:282
msgid "SeventhQueen"
msgstr ""
-#: app/helper/RTMediaThemes.php:273
+#: app/helper/RTMediaThemes.php:275
msgid ""
"SweetDate is a unique, clean and modern Premium Wordpress theme. It is "
"perfect for a dating or community website but can be used as well for any "
@@ -1923,953 +1948,976 @@ msgid ""
"community system."
msgstr ""
-#: app/helper/RTMediaThemes.php:277
+#: app/helper/RTMediaThemes.php:279
msgid "KLEO"
msgstr ""
-#: app/helper/RTMediaThemes.php:283
+#: app/helper/RTMediaThemes.php:285
msgid ""
"You no longer need to be a professional developer or designer to create an "
"awesome website. Let your imagination run wild and create the site of your "
"dreams. KLEO has all the tools to get you started."
msgstr ""
-#: app/helper/RTMediaThemes.php:365
+#: app/helper/RTMediaThemes.php:366
msgid ""
"These are the third party themes. For any issues or queries regarding these "
"themes please contact theme developers."
msgstr ""
-#: app/helper/RTMediaThemes.php:368
+#: app/helper/RTMediaThemes.php:369
msgid "Are you a developer?"
msgstr ""
-#: app/helper/RTMediaThemes.php:371
+#: app/helper/RTMediaThemes.php:372
msgid ""
"If you have developed a rtMedia compatible theme and would like it to list "
"here, please email us at"
msgstr ""
-#: app/helper/RTMediaThemes.php:372
+#: app/helper/RTMediaThemes.php:373
msgid "rtmedia@rtcamp.com"
msgstr ""
-#: app/helper/RTMediaUploadException.php:41
+#: app/helper/RTMediaUploadException.php:46
msgid ""
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
"the HTML form"
msgstr ""
-#: app/helper/RTMediaUploadException.php:44
+#: app/helper/RTMediaUploadException.php:49
msgid "No file was uploaded"
msgstr ""
-#: app/helper/RTMediaUploadException.php:49
+#: app/helper/RTMediaUploadException.php:54
msgid "Uploade failed due to internal server error."
msgstr ""
-#: app/helper/RTMediaUploadException.php:52
+#: app/helper/RTMediaUploadException.php:57
msgid "File type not allowed."
msgstr ""
-#: app/helper/RTMediaUploadException.php:56
+#: app/helper/RTMediaUploadException.php:61
msgid "Invalid Context for upload."
msgstr ""
-#: app/helper/RTMediaUploadException.php:59
+#: app/helper/RTMediaUploadException.php:64
msgid "Unknown file upload error."
msgstr ""
-#: app/helper/rtForm.php:628
+#: app/helper/rtForm.php:651
msgid "Delete this file"
msgstr ""
-#: app/helper/rtFormInvalidArgumentsException.php:21
-msgid "Error on line %s in %s : "
+#: app/helper/rtFormInvalidArgumentsException.php:28
+#. translators: 1: Line number, 2: file.
+msgid "Error on line %1$s in %2$s : "
msgstr ""
-#: app/helper/rtFormInvalidArgumentsException.php:22
+#: app/helper/rtFormInvalidArgumentsException.php:30
+#. translators: %s: message.
msgid "The method expects an array in arguments for %s provided."
msgstr ""
-#: app/helper/rtUploadAttachment.php:70
+#: app/helper/rtUploadAttachment.php:80
msgid "You can not upload more than 2 MB."
msgstr ""
-#: app/helper/rtUploadAttachment.php:76
+#: app/helper/rtUploadAttachment.php:86
msgid "There was an error uploading your files"
msgstr ""
-#: app/helper/rtUploadAttachment.php:80
+#: app/helper/rtUploadAttachment.php:90
msgid "Form was submitted"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:64
+#: app/importers/BPMediaAlbumimporter.php:86
msgid "Warning!"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:65
+#: app/importers/BPMediaAlbumimporter.php:87
msgid ""
"This import process is irreversible. Although everything is tested, please "
"take a "
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:66
+#: app/importers/BPMediaAlbumimporter.php:88
msgid "backup of your database and files"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:67
+#: app/importers/BPMediaAlbumimporter.php:89
msgid ""
", before proceeding. If you don't know your way around databases and files, "
"consider "
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:68
+#: app/importers/BPMediaAlbumimporter.php:90
msgid "hiring us"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:69
+#: app/importers/BPMediaAlbumimporter.php:91
msgid ", or another professional."
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:71
+#: app/importers/BPMediaAlbumimporter.php:93
msgid ""
"If you have set \"WP_DEBUG\" in you wp-config.php file, please make sure it "
"is set to \"false\", so that it doesn't conflict with the import process."
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:72
+#: app/importers/BPMediaAlbumimporter.php:94
msgid "I have taken a backup of the database and files of this site."
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:74
+#: app/importers/BPMediaAlbumimporter.php:96
msgid "Start Import"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:79
+#: app/importers/BPMediaAlbumimporter.php:101
msgid "Users"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:89 app/main/RTMedia.php:745
+#: app/importers/BPMediaAlbumimporter.php:111 app/main/RTMedia.php:862
msgid "Media"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:109
+#: app/importers/BPMediaAlbumimporter.php:134
msgid "Comments"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:115
+#: app/importers/BPMediaAlbumimporter.php:140
msgid "Comments: 0/0 (No comments to import)"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:122
+#: app/importers/BPMediaAlbumimporter.php:148
msgid "User's Favorites"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:131
+#: app/importers/BPMediaAlbumimporter.php:157
msgid "BP-Album is active on your site and will cause problems with the import."
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:132
+#: app/importers/BPMediaAlbumimporter.php:158
msgid "Click here to deactivate BP-Album and continue importing"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:138
+#: app/importers/BPMediaAlbumimporter.php:164
msgid "Some of the media failed to import. The file might be corrupt or deleted."
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:139
+#: app/importers/BPMediaAlbumimporter.php:166
+#. translators: %d: Media.
msgid "The following %d BP Album Media id's could not be imported"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:148
+#: app/importers/BPMediaAlbumimporter.php:176
+#. translators: %s: URL.
msgid "I just imported bp-album to @rtMediaWP http://rt.cx/rtmedia on %s"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:149
+#: app/importers/BPMediaAlbumimporter.php:177
msgid "Congratulations!"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:149
+#: app/importers/BPMediaAlbumimporter.php:177
msgid "All media from BP Album has been imported."
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:150
+#: app/importers/BPMediaAlbumimporter.php:178
msgid "Tweet this"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:154
+#: app/importers/BPMediaAlbumimporter.php:182
msgid ""
"However, a lot of unnecessary files and a database table are still eating "
"up your resources. If everything seems fine, you can clean this data up."
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:157
+#: app/importers/BPMediaAlbumimporter.php:185
msgid "Clean up Now"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:160
+#: app/importers/BPMediaAlbumimporter.php:188
msgid "Clean up Later"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:165
-msgid "Why don't you try adding some instagram like effects to your images?"
+#: app/importers/BPMediaAlbumimporter.php:193
+msgid "Why don't you try adding some Instagram like effects to your images?"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:172
+#: app/importers/BPMediaAlbumimporter.php:200
msgid ""
"rtMedia Photo Filters adds Instagram like filters to images uploaded with "
"BuddyPress Media."
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:173
+#: app/importers/BPMediaAlbumimporter.php:201
msgid "Important"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:173
+#: app/importers/BPMediaAlbumimporter.php:201
msgid ""
"You need to have ImageMagick installed on your server for this addon to "
"work."
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:183
+#: app/importers/BPMediaAlbumimporter.php:211
msgid ""
"Looks like you don't use BP Album. Is there any other BuddyPress Plugin you "
"want an importer for?"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:184
+#: app/importers/BPMediaAlbumimporter.php:212
msgid "Create an issue"
msgstr ""
-#: app/importers/BPMediaAlbumimporter.php:185
+#: app/importers/BPMediaAlbumimporter.php:213
msgid " on GitHub requesting the same."
msgstr ""
-#: app/importers/RTMediaActivityUpgrade.php:20
+#: app/importers/RTMediaActivityUpgrade.php:33
+#: app/importers/RTMediaActivityUpgrade.php:34
msgid "Media activity upgrade"
msgstr ""
-#: app/importers/RTMediaActivityUpgrade.php:129
-#: app/importers/RTMediaMediaSizeImporter.php:73
+#: app/importers/RTMediaActivityUpgrade.php:189
+#: app/importers/RTMediaMediaSizeImporter.php:104
msgid ": Database table structure for rtMedia has been updated. Please "
msgstr ""
-#: app/importers/RTMediaActivityUpgrade.php:130
-#: app/importers/RTMediaMediaSizeImporter.php:73
-#: app/importers/RTMediaMigration.php:68
+#: app/importers/RTMediaActivityUpgrade.php:190
+#: app/importers/RTMediaMediaSizeImporter.php:104
+#: app/importers/RTMediaMigration.php:92
msgid "Click Here"
msgstr ""
-#: app/importers/RTMediaActivityUpgrade.php:131
+#: app/importers/RTMediaActivityUpgrade.php:191
msgid " to upgrade rtMedia activities."
msgstr ""
-#: app/importers/RTMediaActivityUpgrade.php:188
+#: app/importers/RTMediaActivityUpgrade.php:271
msgid "rtMedia: Upgrade rtMedia activity"
msgstr ""
-#: app/importers/RTMediaActivityUpgrade.php:191
-#: app/importers/RTMediaMediaSizeImporter.php:109
+#: app/importers/RTMediaActivityUpgrade.php:275
+#: app/importers/RTMediaMediaSizeImporter.php:155
+#. translators: %s: Estimated.
msgid "%s (estimated)"
msgstr ""
-#: app/importers/RTMediaMediaSizeImporter.php:28
+#: app/importers/RTMediaMediaSizeImporter.php:38
+#: app/importers/RTMediaMediaSizeImporter.php:39
msgid "Media Size Import"
msgstr ""
-#: app/importers/RTMediaMediaSizeImporter.php:73
+#: app/importers/RTMediaMediaSizeImporter.php:104
msgid " to import media sizes. "
msgstr ""
-#: app/importers/RTMediaMediaSizeImporter.php:106
+#: app/importers/RTMediaMediaSizeImporter.php:151
msgid "rtMedia: Import Media Size"
msgstr ""
-#: app/importers/RTMediaMigration.php:68
+#: app/importers/RTMediaMigration.php:92
msgid "Please Migrate your Database"
msgstr ""
-#: app/importers/RTMediaMigration.php:369
+#: app/importers/RTMediaMigration.php:482
msgid "Please Resolve create database error before migration."
msgstr ""
-#: app/importers/RTMediaMigration.php:384
-#. translators: %1$s gets replaced by '', and %2$s by ' '
+#: app/importers/RTMediaMigration.php:497
+#. translators: 1: %s gets replaced by '', 2: %s by ' '
msgid ""
"Please Backup your %1$sDATABASE%2$s and %1$sUPLOAD%2$s folder before "
"Migration."
msgstr ""
-#: app/importers/RTMediaMigration.php:394
+#: app/importers/RTMediaMigration.php:507
msgid "rtMedia Migration"
msgstr ""
-#: app/importers/RTMediaMigration.php:396
+#: app/importers/RTMediaMigration.php:509
msgid "It will migrate following things"
msgstr ""
-#: app/importers/RTMediaMigration.php:397
+#: app/importers/RTMediaMigration.php:511
msgid "User Albums : "
msgstr ""
-#: app/importers/RTMediaMigration.php:400
+#: app/importers/RTMediaMigration.php:517
msgid "Groups Albums : "
msgstr ""
-#: app/importers/RTMediaMigration.php:403
+#: app/importers/RTMediaMigration.php:523
msgid "Media : "
msgstr ""
-#: app/importers/RTMediaMigration.php:407
+#: app/importers/RTMediaMigration.php:530
msgid "Comments : "
msgstr ""
-#: app/importers/RTMediaMigration.php:468
+#: app/importers/RTMediaMigration.php:593
msgid "Error During Migration, Please Refresh Page then try again"
msgstr ""
-#: app/importers/RTMediaMigration.php:488
+#: app/importers/RTMediaMigration.php:613
msgid "Start"
msgstr ""
-#: app/importers/RTMediaMigration.php:1042
+#: app/importers/RTMediaMigration.php:1220
msgid " day"
msgstr ""
-#: app/importers/RTMediaMigration.php:1046
+#: app/importers/RTMediaMigration.php:1224
msgid " hour"
msgstr ""
-#: app/importers/RTMediaMigration.php:1050
+#: app/importers/RTMediaMigration.php:1228
msgid " minute"
msgstr ""
-#: app/importers/RTMediaMigration.php:1054
+#: app/importers/RTMediaMigration.php:1232
msgid " second"
msgstr ""
-#: app/importers/RTMediaMigration.php:1060
+#: app/importers/RTMediaMigration.php:1238
msgid "No time remaining."
msgstr ""
-#: app/main/RTMedia.php:474
+#: app/main/RTMedia.php:162 app/main/RTMedia.php:1497
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:744
+#: app/main/controllers/shortcodes/RTMediaGalleryShortcode.php:112
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:246
+msgid "Media Files"
+msgstr ""
+
+#: app/main/RTMedia.php:555
msgid "Photo"
msgstr ""
-#: app/main/RTMedia.php:475
+#: app/main/RTMedia.php:556
msgid "Photos"
msgstr ""
-#: app/main/RTMedia.php:483
+#: app/main/RTMedia.php:564
msgid "Video"
msgstr ""
-#: app/main/RTMedia.php:484
+#: app/main/RTMedia.php:565
msgid "Videos"
msgstr ""
-#: app/main/RTMedia.php:492 app/main/RTMedia.php:493
+#: app/main/RTMedia.php:573 app/main/RTMedia.php:574
msgid "Music"
msgstr ""
-#: app/main/RTMedia.php:584
+#: app/main/RTMedia.php:687
msgid "Private - Visible only to the user"
msgstr ""
-#: app/main/RTMedia.php:585
+#: app/main/RTMedia.php:688
msgid "Friends - Visible to user's friends"
msgstr ""
-#: app/main/RTMedia.php:586
+#: app/main/RTMedia.php:689
msgid "Logged in Users - Visible to registered users"
msgstr ""
-#: app/main/RTMedia.php:587
+#: app/main/RTMedia.php:690
msgid "Public - Visible to the world"
msgstr ""
-#: app/main/RTMedia.php:753 app/main/controllers/template/RTMediaNav.php:229
-#: app/main/controllers/template/rtmedia-functions.php:136
+#: app/main/RTMedia.php:870 app/main/controllers/template/RTMediaNav.php:281
+#: app/main/controllers/template/rtmedia-functions.php:141
msgid "All"
msgstr ""
-#: app/main/RTMedia.php:765 app/main/controllers/media/RTMediaAlbum.php:54
-#: app/main/controllers/template/rtmedia-actions.php:123
-#: app/main/controllers/upload/RTMediaUploadView.php:51
-#: app/main/controllers/upload/RTMediaUploadView.php:54
+#: app/main/RTMedia.php:882 app/main/controllers/media/RTMediaAlbum.php:56
+#: app/main/controllers/template/rtmedia-actions.php:130
+#: app/main/controllers/upload/RTMediaUploadView.php:78
+#: app/main/controllers/upload/RTMediaUploadView.php:82
msgid "Album"
msgstr ""
-#: app/main/RTMedia.php:769 app/main/RTMedia.php:1185
-#: app/main/controllers/media/RTMediaAlbum.php:53
-#: app/main/controllers/media/RTMediaAlbum.php:65
+#: app/main/RTMedia.php:886 app/main/RTMedia.php:1394
+#: app/main/controllers/media/RTMediaAlbum.php:55
+#: app/main/controllers/media/RTMediaAlbum.php:67
msgid "Albums"
msgstr ""
-#: app/main/RTMedia.php:779 app/main/controllers/media/RTMediaLoginPopup.php:38
-#: app/main/controllers/template/rtmedia-actions.php:316
-#: app/main/controllers/template/rtmedia-actions.php:319
-#: app/main/controllers/template/rtmedia-actions.php:323
+#: app/main/RTMedia.php:896 app/main/controllers/media/RTMediaLoginPopup.php:48
+#: app/main/controllers/template/rtmedia-actions.php:321
+#: app/main/controllers/template/rtmedia-actions.php:324
+#: app/main/controllers/template/rtmedia-actions.php:330
msgid "Upload"
msgstr ""
-#: app/main/RTMedia.php:784
+#: app/main/RTMedia.php:901
msgid "Wall Post"
msgstr ""
-#: app/main/RTMedia.php:1007 app/main/RTMedia.php:1016
+#: app/main/RTMedia.php:1137 app/main/RTMedia.php:1146
msgid "Wall Posts"
msgstr ""
-#: app/main/RTMedia.php:1060
+#: app/main/RTMedia.php:1208
msgid ": Can't Create Database table. Please check create table permission."
msgstr ""
-#: app/main/RTMedia.php:1116
+#: app/main/RTMedia.php:1280
+msgid "Are you sure you want to delete this media?"
+msgstr ""
+
+#: app/main/RTMedia.php:1281
+msgid "Media file deleted successfully."
+msgstr ""
+
+#: app/main/RTMedia.php:1322
msgid "Loading media"
msgstr ""
-#: app/main/RTMedia.php:1117
+#: app/main/RTMedia.php:1323
msgid "Please enter some content to post."
msgstr ""
-#: app/main/RTMedia.php:1118
+#: app/main/RTMedia.php:1324
msgid "Empty comment is not allowed."
msgstr ""
-#: app/main/RTMedia.php:1119
-msgid "Are you sure you want to delete this media?"
-msgstr ""
-
-#: app/main/RTMedia.php:1120
+#: app/main/RTMedia.php:1325
msgid "Are you sure you want to delete this comment?"
msgstr ""
-#: app/main/RTMedia.php:1121
+#: app/main/RTMedia.php:1326
msgid "Are you sure you want to delete this Album?"
msgstr ""
-#: app/main/RTMedia.php:1122
+#: app/main/RTMedia.php:1327
msgid "Drop files here"
msgstr ""
-#: app/main/RTMedia.php:1123
+#: app/main/RTMedia.php:1328
msgid "album created successfully."
msgstr ""
-#: app/main/RTMedia.php:1124
+#: app/main/RTMedia.php:1329
msgid "Something went wrong. Please try again."
msgstr ""
-#: app/main/RTMedia.php:1125
+#: app/main/RTMedia.php:1330
msgid "Enter an album name."
msgstr ""
-#: app/main/RTMedia.php:1126
+#: app/main/RTMedia.php:1331
msgid "Max file Size Limit : "
msgstr ""
-#: app/main/RTMedia.php:1127
+#: app/main/RTMedia.php:1332
msgid "Allowed File Formats"
msgstr ""
-#: app/main/RTMedia.php:1128 templates/media/album-single-edit.php:73
+#: app/main/RTMedia.php:1333 templates/media/album-single-edit.php:87
msgid "Select All Visible"
msgstr ""
-#: app/main/RTMedia.php:1129
+#: app/main/RTMedia.php:1334
msgid "Unselect All Visible"
msgstr ""
-#: app/main/RTMedia.php:1130
+#: app/main/RTMedia.php:1335
msgid "Please select some media."
msgstr ""
-#: app/main/RTMedia.php:1131
+#: app/main/RTMedia.php:1336
msgid "Are you sure you want to delete the selected media?"
msgstr ""
-#: app/main/RTMedia.php:1132
+#: app/main/RTMedia.php:1337
msgid "Are you sure you want to move the selected media?"
msgstr ""
-#: app/main/RTMedia.php:1133
+#: app/main/RTMedia.php:1338
msgid "Waiting"
msgstr ""
-#: app/main/RTMedia.php:1134
+#: app/main/RTMedia.php:1339
msgid "Uploaded"
msgstr ""
-#: app/main/RTMedia.php:1135
+#: app/main/RTMedia.php:1340
msgid "Uploading"
msgstr ""
-#: app/main/RTMedia.php:1136
+#: app/main/RTMedia.php:1341
msgid "Failed"
msgstr ""
-#: app/main/RTMedia.php:1137
+#: app/main/RTMedia.php:1342
msgid "Close"
msgstr ""
-#: app/main/RTMedia.php:1138
-#: app/main/controllers/media/RTMediaGalleryItemAction.php:63
-#: app/main/controllers/media/RTMediaGalleryItemAction.php:80
-#: app/main/controllers/template/rtmedia-functions.php:1174
-#: app/main/controllers/template/rtmedia-functions.php:1193
+#: app/main/RTMedia.php:1343
+#: app/main/controllers/media/RTMediaGalleryItemAction.php:86
+#: app/main/controllers/media/RTMediaGalleryItemAction.php:109
+#: app/main/controllers/template/rtmedia-functions.php:1261
+#: app/main/controllers/template/rtmedia-functions.php:1280
msgid "Edit"
msgstr ""
-#: app/main/RTMedia.php:1139
-#: app/main/controllers/media/RTMediaGalleryItemAction.php:67
-#: app/main/controllers/media/RTMediaGalleryItemAction.php:80
-#: app/main/controllers/template/rtmedia-functions.php:2093
-#: app/main/controllers/template/rtmedia-functions.php:2102
-#: templates/media/album-single-edit.php:78
+#: app/main/RTMedia.php:1344
+#: app/main/controllers/media/RTMediaGalleryItemAction.php:89
+#: app/main/controllers/media/RTMediaGalleryItemAction.php:109
+#: app/main/controllers/template/rtmedia-functions.php:2219
+#: app/main/controllers/template/rtmedia-functions.php:2228
+#: templates/media/album-single-edit.php:94
msgid "Delete"
msgstr ""
-#: app/main/RTMedia.php:1140 templates/media/media-single-edit.php:10
+#: app/main/RTMedia.php:1345 templates/media/media-single-edit.php:19
msgid "Edit Media"
msgstr ""
-#: app/main/RTMedia.php:1141
+#: app/main/RTMedia.php:1346
msgid "Remove from queue"
msgstr ""
-#: app/main/RTMedia.php:1142
+#: app/main/RTMedia.php:1347
msgid "Add more files"
msgstr ""
-#: app/main/RTMedia.php:1143
+#: app/main/RTMedia.php:1348
msgid "File not supported"
msgstr ""
-#: app/main/RTMedia.php:1144
+#: app/main/RTMedia.php:1349
msgid "more"
msgstr ""
-#: app/main/RTMedia.php:1145
+#: app/main/RTMedia.php:1350
msgid "less"
msgstr ""
-#: app/main/RTMedia.php:1146
+#: app/main/RTMedia.php:1351
msgid "Read more"
msgstr ""
-#: app/main/RTMedia.php:1147
+#: app/main/RTMedia.php:1352
msgid "Show less"
msgstr ""
-#: app/main/RTMedia.php:1149
+#: app/main/RTMedia.php:1354
msgid "This media is uploaded. Are you sure you want to delete this media?"
msgstr ""
-#: app/main/RTMedia.php:1165
+#: app/main/RTMedia.php:1370
msgid "Featured media set successfully."
msgstr ""
-#: app/main/RTMedia.php:1166
+#: app/main/RTMedia.php:1371
msgid "Featured media removed successfully."
msgstr ""
-#: app/main/RTMedia.php:1168
+#: app/main/RTMedia.php:1376
msgid "Title:"
msgstr ""
-#: app/main/RTMedia.php:1169
+#: app/main/RTMedia.php:1377
msgid "Description:"
msgstr ""
-#: app/main/RTMedia.php:1171
+#: app/main/RTMedia.php:1380
msgid "Oops !! There's no media found for the request !!"
msgstr ""
-#: app/main/RTMedia.php:1175
+#: app/main/RTMedia.php:1384
msgid "Edit File Name"
msgstr ""
-#: app/main/RTMedia.php:1186
+#: app/main/RTMedia.php:1395
msgid "Privacy updated successfully."
msgstr ""
-#: app/main/RTMedia.php:1187
+#: app/main/RTMedia.php:1396
msgid "Couldn't change privacy, please try again."
msgstr ""
-#: app/main/RTMedia.php:1188
-msgid "file deleted successfully."
-msgstr ""
-
-#: app/main/RTMedia.php:1225
+#: app/main/RTMedia.php:1433
msgid "There are some uploads in progress. Do you want to cancel them?"
msgstr ""
-#: app/main/RTMedia.php:1227
+#: app/main/RTMedia.php:1435
msgid "Media upload is disabled. Please Enable at least one media type to proceed."
msgstr ""
-#: app/main/RTMedia.php:1329
+#: app/main/RTMedia.php:1546
msgid "Adding media in Comments is not allowed"
msgstr ""
-#: app/main/RTMediaUploadTerms.php:138
+#: app/main/RTMediaUploadTerms.php:186
msgid "I agree to"
msgstr ""
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:649
-msgid "Media Files"
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:457
+#: app/main/controllers/upload/RTMediaUploadEndpoint.php:60
+#: app/main/controllers/upload/RTMediaUploadEndpoint.php:74
+msgid "Terms and Conditions checkbox not found!"
msgstr ""
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:687
-#: app/main/controllers/media/RTMediaComment.php:175
-#: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:102
-#: app/main/controllers/template/rtmedia-functions.php:2132
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:791
+#: app/main/controllers/media/RTMediaComment.php:204
+#: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:125
+#: app/main/controllers/template/rtmedia-functions.php:2258
msgid "You are not allowed to upload/attach media."
msgstr ""
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:822
-msgid "%s added a %s"
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:938
+#: app/main/controllers/media/RTMediaMedia.php:782
+#. translators: 1: user link, 2: media.
+#. translators: 1: username, 2: media type, 3: media name, 4: total media.
+msgid "%1$s added a %2$s"
msgstr ""
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:829
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:831
-#: app/main/controllers/upload/RTMediaUploadEndpoint.php:229
-msgid "%s added %d %s"
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:946
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:949
+#: app/main/controllers/upload/RTMediaUploadEndpoint.php:278
+#. translators: 1: user link, 2: media count, 3: media.
+#. translators: 1: user link, 2: media count, 3: rtMedia slug.
+#. translators: 1: Username, 2: Number of medias, 3: Media slug.
+msgid "%1$s added %2$d %3$s"
msgstr ""
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:884
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1003
+#. translators: 1: username, 2: media, 3: group name.
msgid "%1$s liked a %2$s in the group %3$s"
msgstr ""
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:887
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1007
+#. translators: 1: username, 2: media.
msgid "%1$s liked their %2$s"
msgstr ""
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:891
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1012
+#. translators: 1: username, 2: author, 3: media.
msgid "%1$s liked %2$s's %3$s"
msgstr ""
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:981
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1102
+#. translators: 1: username, 2: media, 3: group name.
msgid "%1$s commented on a %2$s in the group %3$s"
msgstr ""
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:984
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1107
+#. translators: 1: username, 2: media.
msgid "%1$s commented on their %2$s"
msgstr ""
-#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:988
+#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1112
+#. translators: 1: username, 2: author, 3: media.
msgid "%1$s commented on %2$s's %3$s"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:168
+#: app/main/controllers/api/RTMediaJsonApi.php:307
msgid "username/password empty"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:171
+#: app/main/controllers/api/RTMediaJsonApi.php:310
msgid "incorrect username"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:174
+#: app/main/controllers/api/RTMediaJsonApi.php:313
msgid "incorrect password"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:177
+#: app/main/controllers/api/RTMediaJsonApi.php:316
msgid "login success"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:223
+#: app/main/controllers/api/RTMediaJsonApi.php:365
msgid "fields empty"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:226
+#: app/main/controllers/api/RTMediaJsonApi.php:368
msgid "invalid email"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:229
+#: app/main/controllers/api/RTMediaJsonApi.php:371
msgid "password do not match"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:232
+#: app/main/controllers/api/RTMediaJsonApi.php:374
msgid "username already registered"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:235
+#: app/main/controllers/api/RTMediaJsonApi.php:377
msgid "email already exists"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:238
+#: app/main/controllers/api/RTMediaJsonApi.php:380
msgid "new user created"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:299
+#: app/main/controllers/api/RTMediaJsonApi.php:441
msgid "email empty"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:302
+#: app/main/controllers/api/RTMediaJsonApi.php:444
msgid "username/email not registered"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:305
+#: app/main/controllers/api/RTMediaJsonApi.php:447
msgid "reset link sent"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:338
+#: app/main/controllers/api/RTMediaJsonApi.php:480
msgid "Someone has asked to reset the password for the following site and username."
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:340
+#: app/main/controllers/api/RTMediaJsonApi.php:484
+#. translators: 1: Username.
msgid "Username: %s"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:341
+#: app/main/controllers/api/RTMediaJsonApi.php:485
msgid ""
"To reset your password visit the following address, otherwise just ignore "
"this email and nothing will happen."
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:344
+#: app/main/controllers/api/RTMediaJsonApi.php:490
+#. translators: 1: Blog name.
msgid "[%s] Password Reset"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:359
+#: app/main/controllers/api/RTMediaJsonApi.php:506
msgid "bp activities"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:362
+#: app/main/controllers/api/RTMediaJsonApi.php:509
msgid "user activities"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:371
+#: app/main/controllers/api/RTMediaJsonApi.php:518
msgid "no updates"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:393
+#: app/main/controllers/api/RTMediaJsonApi.php:541
msgid "comment content missing"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:396
+#: app/main/controllers/api/RTMediaJsonApi.php:544
msgid "comment posted"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:442
+#: app/main/controllers/api/RTMediaJsonApi.php:592
msgid "unliked media"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:445
+#: app/main/controllers/api/RTMediaJsonApi.php:595
msgid "liked media"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:526
+#: app/main/controllers/api/RTMediaJsonApi.php:680
msgid "no comments"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:529
+#: app/main/controllers/api/RTMediaJsonApi.php:683
msgid "media comments"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:532
-msgid "my comments"
-msgstr ""
-
-#: app/main/controllers/api/RTMediaJsonApi.php:579
+#: app/main/controllers/api/RTMediaJsonApi.php:732
msgid "no likes"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:582
+#: app/main/controllers/api/RTMediaJsonApi.php:735
msgid "media likes"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:632
+#: app/main/controllers/api/RTMediaJsonApi.php:789
msgid "invalid comment/media id"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:635
+#: app/main/controllers/api/RTMediaJsonApi.php:792
msgid "no comment id"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:638
+#: app/main/controllers/api/RTMediaJsonApi.php:795
msgid "comment deleted"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:678
+#: app/main/controllers/api/RTMediaJsonApi.php:843
msgid "no profile found"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:681
+#: app/main/controllers/api/RTMediaJsonApi.php:846
msgid "profile fields"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:775
+#: app/main/controllers/api/RTMediaJsonApi.php:948
msgid "follow user id missing"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:778
+#: app/main/controllers/api/RTMediaJsonApi.php:951
msgid "started following"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:781
+#: app/main/controllers/api/RTMediaJsonApi.php:954
msgid "already following"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:809
+#: app/main/controllers/api/RTMediaJsonApi.php:987
msgid "unfollow id missing"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:812
+#: app/main/controllers/api/RTMediaJsonApi.php:990
msgid "stopped following"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:815
+#: app/main/controllers/api/RTMediaJsonApi.php:993
msgid "not following"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:843
+#: app/main/controllers/api/RTMediaJsonApi.php:1026
msgid "name/location empty"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:846
+#: app/main/controllers/api/RTMediaJsonApi.php:1029
msgid "profile updated"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:872
-#: app/main/controllers/api/RTMediaJsonApi.php:895
+#: app/main/controllers/api/RTMediaJsonApi.php:1058
+#: app/main/controllers/api/RTMediaJsonApi.php:1086
msgid "no file"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:875
-#: app/main/controllers/api/RTMediaJsonApi.php:907
+#: app/main/controllers/api/RTMediaJsonApi.php:1061
+#: app/main/controllers/api/RTMediaJsonApi.php:1098
msgid "upload failed, check size and file type"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:878
+#: app/main/controllers/api/RTMediaJsonApi.php:1064
msgid "avatar updated"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:898
+#: app/main/controllers/api/RTMediaJsonApi.php:1089
msgid "invalid file string"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:901
+#: app/main/controllers/api/RTMediaJsonApi.php:1092
msgid "image type missing"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:904
+#: app/main/controllers/api/RTMediaJsonApi.php:1095
msgid "no title"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:910
+#: app/main/controllers/api/RTMediaJsonApi.php:1101
msgid "media updated"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:1050
+#: app/main/controllers/api/RTMediaJsonApi.php:1261
msgid "media list"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:1053
+#: app/main/controllers/api/RTMediaJsonApi.php:1264
msgid "no media found for requested media type"
msgstr ""
-#: app/main/controllers/api/RTMediaJsonApi.php:1056
-msgid "media_type not allowed"
-msgstr ""
-
-#: app/main/controllers/api/RTMediaJsonApi.php:1163
+#: app/main/controllers/api/RTMediaJsonApi.php:1382
msgid "single media"
msgstr ""
-#: app/main/controllers/group/RTMediaGroupExtension.php:30
-#: app/main/controllers/group/RTMediaGroupExtension.php:109
+#: app/main/controllers/group/RTMediaGroupExtension.php:75
+#: app/main/controllers/group/RTMediaGroupExtension.php:160
msgid "Album Creation Control"
msgstr ""
-#: app/main/controllers/group/RTMediaGroupExtension.php:31
-#: app/main/controllers/group/RTMediaGroupExtension.php:110
+#: app/main/controllers/group/RTMediaGroupExtension.php:76
+#: app/main/controllers/group/RTMediaGroupExtension.php:161
msgid "Who can create Albums in this group?"
msgstr ""
-#: app/main/controllers/group/RTMediaGroupExtension.php:35
-#: app/main/controllers/group/RTMediaGroupExtension.php:114
+#: app/main/controllers/group/RTMediaGroupExtension.php:80
+#: app/main/controllers/group/RTMediaGroupExtension.php:165
msgid "All Group Members"
msgstr ""
-#: app/main/controllers/group/RTMediaGroupExtension.php:39
-#: app/main/controllers/group/RTMediaGroupExtension.php:118
+#: app/main/controllers/group/RTMediaGroupExtension.php:84
+#: app/main/controllers/group/RTMediaGroupExtension.php:169
msgid "Group Admins and Mods only"
msgstr ""
-#: app/main/controllers/group/RTMediaGroupExtension.php:43
-#: app/main/controllers/group/RTMediaGroupExtension.php:122
+#: app/main/controllers/group/RTMediaGroupExtension.php:88
+#: app/main/controllers/group/RTMediaGroupExtension.php:173
msgid "Group Admin only"
msgstr ""
-#: app/main/controllers/group/RTMediaGroupExtension.php:130
-#: app/main/controllers/privacy/RTMediaPrivacy.php:427
-#: templates/media/album-single-edit.php:55
+#: app/main/controllers/group/RTMediaGroupExtension.php:181
+#: app/main/controllers/privacy/RTMediaPrivacy.php:526
+#: templates/media/album-single-edit.php:69
msgid "Save Changes"
msgstr ""
-#: app/main/controllers/group/RTMediaGroupExtension.php:182
+#: app/main/controllers/group/RTMediaGroupExtension.php:234
msgid "There was an error saving, please try again"
msgstr ""
-#: app/main/controllers/group/RTMediaGroupExtension.php:184
+#: app/main/controllers/group/RTMediaGroupExtension.php:236
msgid "Settings saved successfully"
msgstr ""
-#: app/main/controllers/group/RTMediaGroupExtension.php:205
+#: app/main/controllers/group/RTMediaGroupExtension.php:254
msgid ""
"You could display a small snippet of information from your group extension "
"here. It will show on the group home screen."
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:36
+#: app/main/controllers/media/RTMediaAlbum.php:38
+#. translators: %s: Album.
msgid "Hidden (%s)"
msgid_plural "Hidden (%s)"
msgstr[0] ""
msgstr[1] ""
-#: app/main/controllers/media/RTMediaAlbum.php:55
+#: app/main/controllers/media/RTMediaAlbum.php:57
msgid "Create"
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:56
-#: app/main/controllers/template/rtmedia-actions.php:206
+#: app/main/controllers/media/RTMediaAlbum.php:58
+#: app/main/controllers/template/rtmedia-actions.php:214
msgid "Create Album"
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:57
-#: app/main/controllers/template/rtmedia-filters.php:82
+#: app/main/controllers/media/RTMediaAlbum.php:59
+#: app/main/controllers/template/rtmedia-filters.php:86
msgid "Edit Album"
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:58
+#: app/main/controllers/media/RTMediaAlbum.php:60
msgid "New Album"
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:59
+#: app/main/controllers/media/RTMediaAlbum.php:61
msgid "All Albums"
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:60
+#: app/main/controllers/media/RTMediaAlbum.php:62
msgid "View Album"
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:61
+#: app/main/controllers/media/RTMediaAlbum.php:63
msgid "Search Albums"
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:62
+#: app/main/controllers/media/RTMediaAlbum.php:64
msgid "No album found"
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:63
+#: app/main/controllers/media/RTMediaAlbum.php:65
msgid "No album found in Trash"
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:64
+#: app/main/controllers/media/RTMediaAlbum.php:66
msgid "Parent"
msgstr ""
@@ -2877,229 +2925,225 @@ msgstr ""
msgid "Untitled Album"
msgstr ""
-#: app/main/controllers/media/RTMediaComment.php:163
-#: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:90
+#: app/main/controllers/media/RTMediaComment.php:189
+#: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:113
msgid "The web browser on your device cannot be used to upload files."
msgstr ""
-#: app/main/controllers/media/RTMediaFeatured.php:25
-#: app/main/controllers/media/RTMediaGroupFeatured.php:17
+#: app/main/controllers/media/RTMediaFeatured.php:45
+#: app/main/controllers/media/RTMediaGroupFeatured.php:45
msgid "Set as Featured"
msgstr ""
-#: app/main/controllers/media/RTMediaFeatured.php:27
-#: app/main/controllers/media/RTMediaGroupFeatured.php:19
+#: app/main/controllers/media/RTMediaFeatured.php:47
+#: app/main/controllers/media/RTMediaGroupFeatured.php:47
msgid "Remove Featured"
msgstr ""
-#: app/main/controllers/media/RTMediaFeatured.php:193
-#: app/main/controllers/media/RTMediaGroupFeatured.php:195
+#: app/main/controllers/media/RTMediaFeatured.php:270
+#: app/main/controllers/media/RTMediaGroupFeatured.php:284
msgid "Media type is not allowed"
msgstr ""
-#: app/main/controllers/media/RTMediaGalleryItemAction.php:62
-#: app/main/controllers/media/RTMediaGalleryItemAction.php:80
+#: app/main/controllers/media/RTMediaGalleryItemAction.php:85
+#: app/main/controllers/media/RTMediaGalleryItemAction.php:109
msgid "Edit this media"
msgstr ""
-#: app/main/controllers/media/RTMediaGalleryItemAction.php:66
-#: app/main/controllers/media/RTMediaGalleryItemAction.php:80
+#: app/main/controllers/media/RTMediaGalleryItemAction.php:88
+#: app/main/controllers/media/RTMediaGalleryItemAction.php:109
msgid "Delete this media"
msgstr ""
-#: app/main/controllers/media/RTMediaLike.php:18
+#: app/main/controllers/media/RTMediaLike.php:28
msgid "person likes this"
msgstr ""
-#: app/main/controllers/media/RTMediaLike.php:19
+#: app/main/controllers/media/RTMediaLike.php:29
msgid "people like this"
msgstr ""
-#: app/main/controllers/media/RTMediaLike.php:20
+#: app/main/controllers/media/RTMediaLike.php:30
msgid "Like"
msgstr ""
-#: app/main/controllers/media/RTMediaLike.php:22
+#: app/main/controllers/media/RTMediaLike.php:32
msgid "Unlike"
msgstr ""
-#: app/main/controllers/media/RTMediaLoginPopup.php:38
-#: app/main/controllers/template/rtmedia-actions.php:319
-#: app/main/controllers/template/rtmedia-actions.php:323
+#: app/main/controllers/media/RTMediaLoginPopup.php:48
+#: app/main/controllers/template/rtmedia-actions.php:324
+#: app/main/controllers/template/rtmedia-actions.php:330
msgid "Upload Media"
msgstr ""
-#: app/main/controllers/media/RTMediaLoginPopup.php:51
+#: app/main/controllers/media/RTMediaLoginPopup.php:62
msgid "Please login"
msgstr ""
-#: app/main/controllers/media/RTMediaLoginPopup.php:53
+#: app/main/controllers/media/RTMediaLoginPopup.php:64
msgid "You need to be logged in to upload Media or to create Album."
msgstr ""
-#: app/main/controllers/media/RTMediaLoginPopup.php:56
+#: app/main/controllers/media/RTMediaLoginPopup.php:67
msgid "Login"
msgstr ""
-#: app/main/controllers/media/RTMediaLoginPopup.php:56
+#: app/main/controllers/media/RTMediaLoginPopup.php:67
msgid "HERE"
msgstr ""
-#: app/main/controllers/media/RTMediaLoginPopup.php:56
+#: app/main/controllers/media/RTMediaLoginPopup.php:67
msgid " to login."
msgstr ""
-#: app/main/controllers/media/RTMediaMedia.php:610
+#: app/main/controllers/media/RTMediaMedia.php:650
msgid "Error creating attachment for the media file, please try again"
msgstr ""
-#: app/main/controllers/media/RTMediaMedia.php:725
-msgid "%1$s added a %2$s"
-msgstr ""
-
-#: app/main/controllers/media/RTMediaMedia.php:725
+#: app/main/controllers/media/RTMediaMedia.php:782
msgid "%1$s added %4$d %3$s"
msgstr ""
-#: app/main/controllers/privacy/RTMediaPrivacy.php:389
+#: app/main/controllers/privacy/RTMediaPrivacy.php:481
msgid "No changes were made to your account."
msgstr ""
-#: app/main/controllers/privacy/RTMediaPrivacy.php:392
+#: app/main/controllers/privacy/RTMediaPrivacy.php:484
msgid "Your default privacy settings saved successfully."
msgstr ""
-#: app/main/controllers/privacy/RTMediaPrivacy.php:416
+#: app/main/controllers/privacy/RTMediaPrivacy.php:513
msgid "Default Privacy"
msgstr ""
-#: app/main/controllers/shortcodes/RTMediaGalleryShortcode.php:276
+#: app/main/controllers/shortcodes/RTMediaGalleryShortcode.php:321
msgid "You do not have sufficient privileges to view this gallery"
msgstr ""
-#: app/main/controllers/template/RTMediaAJAX.php:36
+#: app/main/controllers/template/RTMediaAJAX.php:48
msgid "You can not create album in this group."
msgstr ""
-#: app/main/controllers/template/RTMediaAJAX.php:42
+#: app/main/controllers/template/RTMediaAJAX.php:54
msgid "You can not create album."
msgstr ""
-#: app/main/controllers/template/RTMediaAJAX.php:47
+#: app/main/controllers/template/RTMediaAJAX.php:59
msgid "You can not create more albums, you exceed your album limit."
msgstr ""
-#: app/main/controllers/template/RTMediaAJAX.php:98
+#: app/main/controllers/template/RTMediaAJAX.php:119
msgid "Data mismatch, Please insert data properly."
msgstr ""
-#: app/main/controllers/template/RTMediaTemplate.php:119
-#: app/main/controllers/template/RTMediaTemplate.php:174
+#: app/main/controllers/template/RTMediaTemplate.php:141
+#: app/main/controllers/template/RTMediaTemplate.php:195
msgid "Invalid attribute passed for rtmedia_gallery shortcode."
msgstr ""
-#: app/main/controllers/template/RTMediaTemplate.php:392
-#: app/main/controllers/template/RTMediaTemplate.php:485
-#: app/main/controllers/template/RTMediaTemplate.php:583
-#: app/main/controllers/template/RTMediaTemplate.php:787
+#: app/main/controllers/template/RTMediaTemplate.php:445
+#: app/main/controllers/template/RTMediaTemplate.php:553
+#: app/main/controllers/template/RTMediaTemplate.php:659
+#: app/main/controllers/template/RTMediaTemplate.php:878
msgid "Ooops !!! Invalid access. No nonce was found !!"
msgstr ""
-#: app/main/controllers/template/RTMediaTemplate.php:399
+#: app/main/controllers/template/RTMediaTemplate.php:455
msgid "Media updated Sucessfully"
msgstr ""
-#: app/main/controllers/template/RTMediaTemplate.php:405
+#: app/main/controllers/template/RTMediaTemplate.php:464
msgid "Error in updating Media"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:17
-#: app/main/controllers/template/rtmedia-actions.php:153
+#: app/main/controllers/template/rtmedia-actions.php:26
+#: app/main/controllers/template/rtmedia-actions.php:162
msgid "Options"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:54
+#: app/main/controllers/template/rtmedia-actions.php:62
msgid "Image"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:80
+#: app/main/controllers/template/rtmedia-actions.php:88
msgid "Modify Image"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:192
+#: app/main/controllers/template/rtmedia-actions.php:200
msgid "Create an Album"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:194
+#: app/main/controllers/template/rtmedia-actions.php:202
msgid "Album Title : "
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:198
+#: app/main/controllers/template/rtmedia-actions.php:206
msgid "Album Description : "
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:246
#: app/main/controllers/template/rtmedia-actions.php:253
-#: app/main/controllers/template/rtmedia-filters.php:92
+#: app/main/controllers/template/rtmedia-actions.php:260
+#: app/main/controllers/template/rtmedia-filters.php:96
msgid "Merge Album"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:249
+#: app/main/controllers/template/rtmedia-actions.php:256
msgid "Select Album to merge with : "
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:299
+#: app/main/controllers/template/rtmedia-actions.php:304
msgid "Merge"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:369
+#: app/main/controllers/template/rtmedia-actions.php:371
msgid "Empowering your community with "
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:370
+#: app/main/controllers/template/rtmedia-actions.php:372
msgid "The only complete media solution for WordPress, BuddyPress and bbPress"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:389
+#: app/main/controllers/template/rtmedia-actions.php:390
msgid "Close (Esc)"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:534
+#: app/main/controllers/template/rtmedia-actions.php:514
msgid "You can consider rtMedia Team for following :"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:536
+#: app/main/controllers/template/rtmedia-actions.php:516
msgid "rtMedia Customization ( in Upgrade Safe manner )"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:537
+#: app/main/controllers/template/rtmedia-actions.php:517
msgid "WordPress/BuddyPress Theme Design and Development"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:538
+#: app/main/controllers/template/rtmedia-actions.php:518
msgid "WordPress/BuddyPress Plugin Development"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:541
+#: app/main/controllers/template/rtmedia-actions.php:521
msgid "Contact Us"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:628
-#: app/main/controllers/template/rtmedia-actions.php:629
+#: app/main/controllers/template/rtmedia-actions.php:618
+#: app/main/controllers/template/rtmedia-actions.php:619
msgid "Previous"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:630
-#: app/main/controllers/template/rtmedia-actions.php:631
-#: templates/media/album-single-edit.php:121
+#: app/main/controllers/template/rtmedia-actions.php:620
+#: app/main/controllers/template/rtmedia-actions.php:621
+#: templates/media/album-single-edit.php:142
msgid "Next"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:827
+#: app/main/controllers/template/rtmedia-actions.php:826
msgid "Settings has been saved successfully."
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:831
+#: app/main/controllers/template/rtmedia-actions.php:830
msgid "Refresh the page in case if license data is not showing correct."
msgstr ""
@@ -3111,381 +3155,397 @@ msgstr ""
msgid "rtMedia Updates"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:903
+#: app/main/controllers/template/rtmedia-actions.php:907
msgid "Search Media"
msgstr ""
-#: app/main/controllers/template/rtmedia-actions.php:1089
+#: app/main/controllers/template/rtmedia-actions.php:1101
msgid "Please swipe for more media."
msgstr ""
-#: app/main/controllers/template/rtmedia-ajax-actions.php:88
-#: app/main/controllers/template/rtmedia-functions.php:2032
+#: app/main/controllers/template/rtmedia-ajax-actions.php:67
+msgid "Doing wrong, invalid AJAX request!"
+msgstr ""
+
+#: app/main/controllers/template/rtmedia-ajax-actions.php:144
+#: app/main/controllers/template/rtmedia-functions.php:2156
msgid "Comment"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:50
+#: app/main/controllers/template/rtmedia-filters.php:54
msgid "Create New Album"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:50
+#: app/main/controllers/template/rtmedia-filters.php:54
msgid "Add Album"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:83
+#: app/main/controllers/template/rtmedia-filters.php:87
msgid "Delete Album"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:853
-#: app/main/controllers/template/rtmedia-functions.php:4397
+#: app/main/controllers/template/rtmedia-filters.php:918
+#: app/main/controllers/template/rtmedia-functions.php:4630
msgid "rtMedia Shortcode Uploads"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:857
-#: app/main/controllers/template/rtmedia-functions.php:4277
+#: app/main/controllers/template/rtmedia-filters.php:922
+#: app/main/controllers/template/rtmedia-functions.php:4512
msgid "rtMedia Activities"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:861
+#: app/main/controllers/template/rtmedia-filters.php:926
msgid "rtMedia Comments"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:865
-#: app/main/controllers/template/rtmedia-functions.php:4625
+#: app/main/controllers/template/rtmedia-filters.php:930
+#: app/main/controllers/template/rtmedia-functions.php:4857
msgid "rtMedia Media Views"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:869
-#: app/main/controllers/template/rtmedia-functions.php:4726
+#: app/main/controllers/template/rtmedia-filters.php:934
+#: app/main/controllers/template/rtmedia-functions.php:4958
msgid "rtMedia Media Likes"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:890
+#: app/main/controllers/template/rtmedia-filters.php:952
msgid "rtMedia Eraser"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:894
+#: app/main/controllers/template/rtmedia-filters.php:957
msgid "rtMedia Likes Eraser"
msgstr ""
-#: app/main/controllers/template/rtmedia-filters.php:898
+#: app/main/controllers/template/rtmedia-filters.php:962
msgid "rtMedia Album Eraser"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:1256
+#: app/main/controllers/template/rtmedia-functions.php:1346
msgid "There are no comments on this media yet."
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:1288
+#: app/main/controllers/template/rtmedia-functions.php:1381
+#. translators: %s Count of comments.
msgid "Show all %s comments"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:1321
+#: app/main/controllers/template/rtmedia-functions.php:1414
msgid "Delete Comment"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:1660
+#: app/main/controllers/template/rtmedia-functions.php:1772
msgid "Go to page no : "
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:1665
+#: app/main/controllers/template/rtmedia-functions.php:1777
msgid "Go"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:2030
+#: app/main/controllers/template/rtmedia-functions.php:2154
msgid "Type Comment..."
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:2093
-#: app/main/controllers/template/rtmedia-functions.php:2102
+#: app/main/controllers/template/rtmedia-functions.php:2219
+#: app/main/controllers/template/rtmedia-functions.php:2228
msgid "Delete Media"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:2350
+#: app/main/controllers/template/rtmedia-functions.php:2482
msgid "Profile Albums"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:2354
-#: app/main/controllers/template/rtmedia-functions.php:2399
+#: app/main/controllers/template/rtmedia-functions.php:2486
+#: app/main/controllers/template/rtmedia-functions.php:2535
msgid "Group Albums"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:2579
+#: app/main/controllers/template/rtmedia-functions.php:2716
msgid "Privacy : "
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:2929
+#: app/main/controllers/template/rtmedia-functions.php:3068
msgid "You like this"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:2941
+#: app/main/controllers/template/rtmedia-functions.php:3082
msgid "You and "
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:2964
+#: app/main/controllers/template/rtmedia-functions.php:3105
msgid " person likes this"
msgid_plural " people like this"
msgstr[0] ""
msgstr[1] ""
-#: app/main/controllers/template/rtmedia-functions.php:3071
+#: app/main/controllers/template/rtmedia-functions.php:3226
msgid "Public"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:3076
+#: app/main/controllers/template/rtmedia-functions.php:3231
msgid "All members"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:3081
+#: app/main/controllers/template/rtmedia-functions.php:3236
msgid "Your friends"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:3086
+#: app/main/controllers/template/rtmedia-functions.php:3241
msgid "Only you"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:3091
+#: app/main/controllers/template/rtmedia-functions.php:3246
msgid "Blocked temporarily"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:3144
+#: app/main/controllers/template/rtmedia-functions.php:3304
+#. translators: %s: count of hour/minute/second.
msgid "%s ago "
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:3158
-msgid "1 second"
+#: app/main/controllers/template/rtmedia-functions.php:3322
+#. translators: %s: number of seconds.
+msgid "%s second"
msgid_plural "%s seconds"
msgstr[0] ""
msgstr[1] ""
-#: app/main/controllers/template/rtmedia-functions.php:3162
-msgid "1 minute"
+#: app/main/controllers/template/rtmedia-functions.php:3327
+#. translators: %s: number of minutes.
+msgid "%s minute"
msgid_plural "%s minutes"
msgstr[0] ""
msgstr[1] ""
-#: app/main/controllers/template/rtmedia-functions.php:3166
-msgid "1 hour"
+#: app/main/controllers/template/rtmedia-functions.php:3332
+#. translators: %s: number of hours.
+msgid "%s hour"
msgid_plural "%s hours"
msgstr[0] ""
msgstr[1] ""
-#: app/main/controllers/template/rtmedia-functions.php:3766
-#. translators: date format, see http:php.net/date
+#: app/main/controllers/template/rtmedia-functions.php:3959
+#. translators: %s: date format, see http:php.net/date.
msgid "View Conversation"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4305
+#: app/main/controllers/template/rtmedia-functions.php:4538
msgid "Activity Date"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4309
+#: app/main/controllers/template/rtmedia-functions.php:4542
msgid "Activity Content"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4313
-#: app/main/controllers/template/rtmedia-functions.php:4536
+#: app/main/controllers/template/rtmedia-functions.php:4546
+#: app/main/controllers/template/rtmedia-functions.php:4767
msgid "Attachments"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4406
+#: app/main/controllers/template/rtmedia-functions.php:4639
msgid "Media Upload Date"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4410
+#: app/main/controllers/template/rtmedia-functions.php:4643
msgid "Media Title"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4414
-#: app/main/controllers/template/rtmedia-functions.php:4629
-#: app/main/controllers/template/rtmedia-functions.php:4730
+#: app/main/controllers/template/rtmedia-functions.php:4647
+#: app/main/controllers/template/rtmedia-functions.php:4861
+#: app/main/controllers/template/rtmedia-functions.php:4962
msgid "Media URL"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4418
+#: app/main/controllers/template/rtmedia-functions.php:4651
msgid "Album Title"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4506
+#: app/main/controllers/template/rtmedia-functions.php:4739
msgid "rtMedia Activity Comments"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4528
+#: app/main/controllers/template/rtmedia-functions.php:4759
msgid "Comment Date"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4532
+#: app/main/controllers/template/rtmedia-functions.php:4763
msgid "Comment Content"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4633
+#: app/main/controllers/template/rtmedia-functions.php:4865
msgid "Number of Views"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4637
+#: app/main/controllers/template/rtmedia-functions.php:4869
msgid "Date of First View"
msgstr ""
-#: app/main/controllers/template/rtmedia-functions.php:4734
+#: app/main/controllers/template/rtmedia-functions.php:4966
msgid "Date"
msgstr ""
-#: app/main/controllers/upload/RTMediaUploadView.php:97
+#: app/main/controllers/upload/RTMediaUploadView.php:132
msgid "Privacy:"
msgstr ""
-#: app/main/controllers/upload/RTMediaUploadView.php:104
-#: app/main/controllers/upload/RTMediaUploadView.php:161
-#: app/main/controllers/upload/RTMediaUploadView.php:178
-#: app/main/controllers/upload/RTMediaUploadView.php:199
+#: app/main/controllers/upload/RTMediaUploadView.php:139
+#: app/main/controllers/upload/RTMediaUploadView.php:200
+#: app/main/controllers/upload/RTMediaUploadView.php:217
+#: app/main/controllers/upload/RTMediaUploadView.php:238
msgid "File Upload"
msgstr ""
-#: app/main/controllers/upload/RTMediaUploadView.php:108
+#: app/main/controllers/upload/RTMediaUploadView.php:143
msgid "Select your files"
msgstr ""
-#: app/main/controllers/upload/RTMediaUploadView.php:109
+#: app/main/controllers/upload/RTMediaUploadView.php:144
msgid "or"
msgstr ""
-#: app/main/controllers/upload/RTMediaUploadView.php:109
+#: app/main/controllers/upload/RTMediaUploadView.php:144
msgid "Drop your files here"
msgstr ""
-#: app/main/controllers/upload/RTMediaUploadView.php:157
+#: app/main/controllers/upload/RTMediaUploadView.php:196
msgid "Start upload"
msgstr ""
-#: app/main/controllers/upload/RTMediaUploadView.php:185
-#: app/main/controllers/upload/RTMediaUploadView.php:206
+#: app/main/controllers/upload/RTMediaUploadView.php:224
+#: app/main/controllers/upload/RTMediaUploadView.php:245
msgid "Attach Media"
msgstr ""
-#: app/main/controllers/upload/RTMediaUploadView.php:221
+#: app/main/controllers/upload/RTMediaUploadView.php:260
msgid "Insert from URL"
msgstr ""
-#: app/main/controllers/upload/processors/RTMediaUploadFile.php:61
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:97
msgid "Error Uploading File"
msgstr ""
-#: app/main/controllers/upload/processors/RTMediaUploadFile.php:233
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:304
msgid "MP4 file you have uploaded is corrupt."
msgstr ""
-#: app/main/controllers/upload/processors/RTMediaUploadFile.php:240
-#: app/main/controllers/upload/processors/RTMediaUploadFile.php:245
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:312
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:316
msgid ""
"The MP4 file you have uploaded is using an unsupported video codec. "
"Supported video codec is H.264."
msgstr ""
-#: app/main/controllers/upload/processors/RTMediaUploadFile.php:250
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:320
msgid "The MP4 file you have uploaded is not a video file."
msgstr ""
-#: app/main/controllers/upload/processors/RTMediaUploadFile.php:263
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:333
msgid "MP3 file you have uploaded is currupt."
msgstr ""
-#: app/main/controllers/upload/processors/RTMediaUploadFile.php:270
-#: app/main/controllers/upload/processors/RTMediaUploadFile.php:275
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:341
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:345
msgid ""
"The MP3 file you have uploaded is using an unsupported audio format. "
"Supported audio format is MP3."
msgstr ""
-#: app/main/controllers/upload/processors/RTMediaUploadFile.php:280
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:349
msgid "The MP3 file you have uploaded is not an audio file."
msgstr ""
-#: app/main/controllers/upload/processors/RTMediaUploadFile.php:288
+#: app/main/controllers/upload/processors/RTMediaUploadFile.php:356
msgid ""
"Media File you have tried to upload is not supported. Supported media files "
"are .jpg, .png, .gif, .mp3, .mov and .mp4."
msgstr ""
-#: app/main/deprecated/RTMediaDeprecated.php:27
-msgid "Deprecated %s. Please use %s."
+#: app/main/deprecated/RTMediaDeprecated.php:40
+#. translators: 1: function name, 2: method.
+msgid "Deprecated %1$s. Please use %2$s."
msgstr ""
#: templates/main.php:70 templates/main.php:143
msgid "rtMedia menu"
msgstr ""
-#: templates/media/album-gallery.php:21
+#: templates/media/album-gallery.php:26
msgid "Album List"
msgstr ""
-#: templates/media/album-single-edit.php:14
+#: templates/media/album-gallery.php:83 templates/media/media-gallery.php:123
+#: templates/media/media-single-edit.php:73
+#: templates/media/media-single.php:212
+msgid "Sorry !! There's no media found for the request !!"
+msgstr ""
+
+#: templates/media/album-single-edit.php:22
msgid "Edit Album : "
msgstr ""
-#: templates/media/album-single-edit.php:24
+#: templates/media/album-single-edit.php:37
msgid "Manage Media"
msgstr ""
-#: templates/media/album-single-edit.php:39
-#: templates/media/media-single-edit.php:29
+#: templates/media/album-single-edit.php:53
+#: templates/media/media-single-edit.php:37
msgid "Title : "
msgstr ""
-#: templates/media/album-single-edit.php:44
-#: templates/media/media-single-edit.php:35
+#: templates/media/album-single-edit.php:58
+#: templates/media/media-single-edit.php:43
msgid "Description: "
msgstr ""
-#: templates/media/album-single-edit.php:57
-#: templates/media/media-single-edit.php:52
+#: templates/media/album-single-edit.php:71
+#: templates/media/media-single-edit.php:60
msgid "Back"
msgstr ""
-#: templates/media/album-single-edit.php:75
+#: templates/media/album-single-edit.php:89
msgid "Move Selected media to another album."
msgstr ""
-#: templates/media/album-single-edit.php:75
+#: templates/media/album-single-edit.php:90
msgid "Move"
msgstr ""
-#: templates/media/album-single-edit.php:78
+#: templates/media/album-single-edit.php:93
msgid "Delete Selected media from the album."
msgstr ""
-#: templates/media/album-single-edit.php:83
+#: templates/media/album-single-edit.php:100
msgid "Move selected media to the album : "
msgstr ""
-#: templates/media/album-single-edit.php:86
+#: templates/media/album-single-edit.php:106
msgid "Move Selected"
msgstr ""
-#: templates/media/album-single-edit.php:110
+#: templates/media/album-single-edit.php:129
msgid "Prev"
msgstr ""
-#: templates/media/album-single-edit.php:124
+#: templates/media/album-single-edit.php:146
msgid "The album is empty."
msgstr ""
-#: templates/media/album-single-edit.php:134
+#: templates/media/album-single-edit.php:156
msgid "Sorry !! You can not edit this album."
msgstr ""
-#: templates/media/media-gallery.php:21 templates/media/media-gallery.php:54
+#: templates/media/media-gallery.php:27 templates/media/media-gallery.php:63
msgid "Media Gallery"
msgstr ""
-#: templates/media/media-single-edit.php:50
+#: templates/media/media-single-edit.php:58
msgid "Save"
msgstr ""
-#: templates/media/media-single-edit.php:59
+#: templates/media/media-single-edit.php:67
msgid "Sorry !! You do not have rights to edit this media"
msgstr ""
-#: templates/media/media-single.php:62
+#: templates/media/media-single.php:75
msgid "under"
msgstr ""
@@ -3512,12 +3572,12 @@ msgid ""
"campaign=buddypress-media"
msgstr ""
-#: app/main/controllers/media/RTMediaAlbum.php:35
+#: app/main/controllers/media/RTMediaAlbum.php:36
msgctxt "Status General Name"
msgid "hidden"
msgstr ""
-#: app/main/controllers/template/RTMediaNav.php:41
+#: app/main/controllers/template/RTMediaNav.php:68
msgctxt "My Account Privacy sub nav"
msgid "Privacy"
msgstr ""
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index c6ccdb0fc..0bd0b9f6d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,6 +15,12 @@
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true
},
+ "acorn": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
+ "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
+ "dev": true
+ },
"amdefine": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
@@ -1052,9 +1058,9 @@
}
},
"minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true
},
"mkdirp": {
diff --git a/package.json b/package.json
index 97cd3183f..46b3bb038 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,8 @@
"grunt-contrib-watch": "^1.1.0",
"grunt-wp-i18n": "^1.0.3",
"load-grunt-tasks": "^5.0.0",
- "diff": ">=3.5.0"
+ "diff": ">=3.5.0",
+ "acorn": "^7.1.1",
+ "minimist": "^1.2.5"
}
}
diff --git a/phpcs.xml b/phpcs.xml
index abb18fc1b..856024f2d 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -15,7 +15,7 @@
-
+
*/bin/*
*/lib/*
diff --git a/readme.txt b/readme.txt
index 64e801529..26af82267 100755
--- a/readme.txt
+++ b/readme.txt
@@ -4,8 +4,8 @@ Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, i
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Requires at least: WordPress 4.1
-Tested up to: 5.3.2
-Stable tag: 4.6.0
+Tested up to: 5.4
+Stable tag: 4.6.1
Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
@@ -134,6 +134,21 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
== Changelog ==
+= 4.6.1 [April 8, 2020] =
+
+* Enhancement
+
+ * Disable the terms of service checkbox when the activity is published
+
+* FIXED
+
+ * Different language characters not showing up properly on rtMedia pages
+ * HTML warnings of rtMedia contents
+ * Nouveau template tab count bug
+ * Added server side validation for terms of service
+ * Terms of service checkbox conflicting with rtMedia Sidebar Widgets addon
+ * PHPCS errors and warnings
+
= 4.6.0 [February 17, 2020] =
* Enhancement
@@ -1658,8 +1673,8 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
== Upgrade Notice ==
-= 4.6.0 =
-rtMedia 4.6.0, with improved activity content preview and JavaScript and Nouveau template related fixes.
+= 4.6.1 =
+rtMedia 4.6.1 with added server side validation for terms of services checkbox, minor bug fixes along with warnings and PHPCS fixes
== Sponsors ==
diff --git a/templates/main.php b/templates/main.php
index 26b3788cf..6fd73d598 100755
--- a/templates/main.php
+++ b/templates/main.php
@@ -310,7 +310,6 @@
} else { // If ajax/iframe request, just load images.
rtmedia_load_template();
}
-
// close all markup.
?>
diff --git a/templates/media/album-gallery-item.php b/templates/media/album-gallery-item.php
index 84ca99275..a2dd19d5f 100755
--- a/templates/media/album-gallery-item.php
+++ b/templates/media/album-gallery-item.php
@@ -1,5 +1,10 @@
false,
);
-//todo: nonce verification
+// todo: nonce verification.
$rtmedia_backbone['backbone'] = filter_input( INPUT_POST, 'backbone', FILTER_VALIDATE_BOOLEAN );
$is_album = filter_input( INPUT_POST, 'is_album', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
@@ -21,7 +26,7 @@
$rtmedia_backbone['is_edit_allowed'] = $is_edit_allowed[0];
}
?>
-
+
+ ?>
-