rtMedia for WordPress, BuddyPress and bbPress - Version 4.5.10

Version Description

rtMedia 4.5.10, with improved styling for albums and improved UX on BuddyPress Activity Wall.

=

Download this release

Release Info

Developer thrijith
Plugin Icon 128x128 rtMedia for WordPress, BuddyPress and bbPress
Version 4.5.10
Comparing to
See all releases

Code changes from version 4.5.9 to 4.5.10

Files changed (67) hide show
  1. app/helper/BPMediaLog.php +0 -85
  2. app/helper/RTMediaSupport.php +1 -1
  3. app/helper/rtPluginInfo.php +0 -122
  4. app/helper/rtPluginUpdate.php +0 -128
  5. app/main/controllers/activity/RTMediaBuddyPressActivity.php +16 -0
  6. app/main/controllers/media/RTMediaCoverArt.php +0 -73
  7. app/main/controllers/template/rtmedia-actions.php +1 -1
  8. app/main/controllers/template/template.php +0 -165
  9. app/services/RTMediaEncoding.php +0 -782
  10. index.php +2 -2
  11. languages/buddypress-media.po +13 -13
  12. languages/rtmedia-ar_AR.mo +0 -0
  13. languages/rtmedia-bg_BG.mo +0 -0
  14. languages/rtmedia-da_DA.mo +0 -0
  15. languages/rtmedia-da_DK.mo +0 -0
  16. languages/rtmedia-de_DE.mo +0 -0
  17. languages/rtmedia-es_ES.mo +0 -0
  18. languages/rtmedia-fa_FA.mo +0 -0
  19. languages/rtmedia-fa_IR.mo +0 -0
  20. languages/rtmedia-fi_FI.mo +0 -0
  21. languages/rtmedia-fr_FR.mo +0 -0
  22. languages/rtmedia-hu_HU.mo +0 -0
  23. languages/rtmedia-it_IT.mo +0 -0
  24. languages/rtmedia-ja_JA.mo +0 -0
  25. languages/rtmedia-ko_KO.mo +0 -0
  26. languages/rtmedia-ko_KR.mo +0 -0
  27. languages/rtmedia-nb_NO.mo +0 -0
  28. languages/rtmedia-nl_NL.mo +0 -0
  29. languages/rtmedia-pl_PL.mo +0 -0
  30. languages/rtmedia-pt_BR.mo +0 -0
  31. languages/rtmedia-ro_RO.mo +0 -0
  32. languages/rtmedia-ru_RU.mo +0 -0
  33. languages/rtmedia-sk_SK.mo +0 -0
  34. languages/rtmedia-sr_RS.mo +0 -0
  35. languages/rtmedia-sr_SR.mo +0 -0
  36. languages/rtmedia-sv_SE.mo +0 -0
  37. languages/rtmedia-sv_SV.mo +0 -0
  38. languages/rtmedia-ta_IN.mo +0 -0
  39. languages/rtmedia-ta_TA.mo +0 -0
  40. languages/rtmedia-zh_CN.mo +0 -0
  41. languages/rtmedia.mo +0 -0
  42. languages/rtmedia.po +0 -3207
  43. lib/foundation/custom.modernizr.js +0 -4
  44. lib/foundation/foundation.css +0 -4271
  45. lib/foundation/foundation.js +0 -447
  46. lib/foundation/foundation.min.js +0 -15
  47. lib/foundation/foundation.reveal.js +0 -330
  48. lib/foundation/foundation.section.js +0 -422
  49. lib/foundation/normalize.css +0 -402
  50. lib/magnific/magnific.css +0 -363
  51. lib/magnific/magnific.js +0 -2042
  52. lib/media-element/background.png +0 -0
  53. lib/media-element/bigplay.png +0 -0
  54. lib/media-element/bigplay.svg +0 -1
  55. lib/media-element/controls-ted.png +0 -0
  56. lib/media-element/controls-wmp-bg.png +0 -0
  57. lib/media-element/controls-wmp.png +0 -0
  58. lib/media-element/controls.png +0 -0
  59. lib/media-element/controls.svg +0 -1
  60. lib/media-element/flashmediaelement.swf +0 -0
  61. lib/media-element/jquery.js +0 -9300
  62. lib/media-element/loading.gif +0 -0
  63. lib/media-element/mediaelementplayer.js +0 -2804
  64. lib/media-element/mediaelementplayer.min.js +0 -90
  65. lib/media-element/mejs-skins.css +0 -283
  66. lib/media-element/silverlightmediaelement.xap +0 -0
  67. readme.txt +20 -8
app/helper/BPMediaLog.php DELETED
@@ -1,85 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Logs a given message with an optional context string and timestamp
5
- *
6
- * @author Saurabh Shukla <saurabh.shukla@rtcamp.com>
7
- */
8
- if ( ! class_exists( 'BPMediaLog' ) ){
9
-
10
- class BPMediaLog {
11
- /**
12
- * Formats and logs the error message
13
- *
14
- * @param any $msg The message to log
15
- * @param string $context The context string, optional
16
- * @return boolean True if successful
17
- */
18
-
19
- /**
20
- *
21
- * @param type $msg
22
- * @param string $context
23
- * @param string $log_file
24
- * @return type
25
- */
26
- public function __construct( $msg, $context = '', $log_file = '' ) {
27
- $log_msg = $this->log_msg( $msg, $context = '' );
28
- if ( $log_file == '' ){
29
- $log_file = RTMEDIA_PATH . 'log/rtmedia.log';
30
- }
31
- return $this->log( $log_msg, $log_file );
32
- }
33
-
34
- /**
35
- * Formats the message
36
- *
37
- * @param any $msg The message to format
38
- * @param string $context The context string, optional
39
- * @return string The formatted log entry
40
- */
41
-
42
- /**
43
- *
44
- * @param type $msg
45
- * @param type $context
46
- * @return type
47
- */
48
- function log_msg( $msg, $context = '' ) {
49
- $logmsg = gmdate( "Y-m-d H:i:s " ) . " | ";
50
- if ( $context ){
51
- $logmsg .= $context . " | ";
52
- }
53
- if ( ! is_string( $msg ) ){
54
- $msg = var_export( $msg, false );
55
- }
56
- $logmsg .= $msg;
57
- return $logmsg;
58
- }
59
-
60
- /**
61
- * Logs the entry to the log file
62
- *
63
- * @param string $logmsg The formatted log entry
64
- * @param string $file The log file's path
65
- * @return boolean Success
66
- */
67
-
68
- /**
69
- *
70
- * @param type $logmsg
71
- * @param type $file
72
- * @return boolean
73
- */
74
- public function log( $logmsg, $file ) {
75
- $fp = fopen( RTMEDIA_PATH . 'plugin.log', "a+" );
76
- if ( $fp ){
77
- fwrite( $fp, "\n" . $logmsg );
78
- fclose( $fp );
79
- }
80
- return true;
81
- }
82
-
83
- }
84
-
85
- }
app/helper/RTMediaSupport.php CHANGED
@@ -251,7 +251,7 @@ if ( ! class_exists( 'RTMediaSupport' ) ) {
251
if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ) {
252
$sub_files = $this->rtmedia_scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value );
253
foreach ( $sub_files as $sub_file ) {
254
- $rt_to_dir_paths = RTMediaTemplate::locate_template( substr( $sub_file, 0, ( count( $sub_file ) - 5 ) ) );
255
$rt_to_dir_path = str_replace( '//', '/', $rt_to_dir_paths );
256
$result[] = str_replace( ABSPATH . 'wp-content/', '', $rt_to_dir_path );
257
}
251
if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ) {
252
$sub_files = $this->rtmedia_scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value );
253
foreach ( $sub_files as $sub_file ) {
254
+ $rt_to_dir_paths = RTMediaTemplate::locate_template( str_replace( '.php', '', $sub_file ) );
255
$rt_to_dir_path = str_replace( '//', '/', $rt_to_dir_paths );
256
$result[] = str_replace( ABSPATH . 'wp-content/', '', $rt_to_dir_path );
257
}
app/helper/rtPluginInfo.php DELETED
@@ -1,122 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * A container class for holding and transforming various plugin metadata.
5
- *
6
- * @author faishal
7
- */
8
- class rtPluginInfo {
9
-
10
- //Most fields map directly to the contents of the plugin's info.json file.
11
- //See the relevant docs for a description of their meaning.
12
- public $name;
13
- public $slug;
14
- public $version;
15
- public $homepage;
16
- public $sections;
17
- public $download_url;
18
- public $author;
19
- public $author_homepage;
20
- public $requires;
21
- public $tested;
22
- public $upgrade_notice;
23
- public $rating;
24
- public $num_ratings;
25
- public $downloaded;
26
- public $last_updated;
27
- public $id = 0; //The native WP.org API returns numeric plugin IDs, but they're not used for anything.
28
-
29
- /**
30
- * Create a new instance of PluginInfo from JSON-encoded plugin info
31
- * returned by an external update API.
32
- *
33
- * @param string $json Valid JSON string representing plugin info.
34
- * @param bool $triggerErrors
35
- * @return PluginInfo|null New instance of PluginInfo, or NULL on error.
36
- */
37
-
38
- /**
39
- *
40
- * @param type $json
41
- * @param type $triggerErrors
42
- * @return null|\self
43
- */
44
- public static function fromJson($json, $triggerErrors = false) {
45
- /** @var StdClass $apiResponse */
46
- $apiResponse = json_decode($json);
47
- if (empty($apiResponse) || !is_object($apiResponse)) {
48
- if ($triggerErrors) {
49
- trigger_error(
50
- sprintf( __( "Failed to parse plugin metadata. Try validating your .json file with %s", 'rtmedia' ), 'http://jsonlint.com/' ), E_USER_NOTICE
51
- );
52
- }
53
- return null;
54
- }
55
-
56
- //Very, very basic validation.
57
- $valid = isset($apiResponse->name) && !empty($apiResponse->name) && isset($apiResponse->version) && !empty($apiResponse->version);
58
- if (!$valid) {
59
- if ($triggerErrors) {
60
- trigger_error(
61
- __( "The plugin metadata file does not contain the required 'name' and/or 'version' keys.", 'rtmedia'), E_USER_NOTICE
62
- );
63
- }
64
- return null;
65
- }
66
-
67
- $info = new self();
68
- foreach (get_object_vars($apiResponse) as $key => $value) {
69
- $info->$key = $value;
70
- }
71
-
72
- return $info;
73
- }
74
-
75
- /**
76
- * Transform plugin info into the format used by the native WordPress.org API
77
- *
78
- * @return object
79
- */
80
-
81
- /**
82
- *
83
- * @return \StdClass
84
- */
85
- public function toWpFormat() {
86
- $info = new StdClass;
87
-
88
- //The custom update API is built so that many fields have the same name and format
89
- //as those returned by the native WordPress.org API. These can be assigned directly.
90
- $sameFormat = array(
91
- 'name', 'slug', 'version', 'requires', 'tested', 'rating', 'upgrade_notice',
92
- 'num_ratings', 'downloaded', 'homepage', 'last_updated',
93
- );
94
- foreach ($sameFormat as $field) {
95
- if (isset($this->$field)) {
96
- $info->$field = $this->$field;
97
- } else {
98
- $info->$field = null;
99
- }
100
- }
101
-
102
- //Other fields need to be renamed and/or transformed.
103
- $info->download_link = $this->download_url;
104
-
105
- if (!empty($this->author_homepage)) {
106
- $info->author = sprintf('<a href="%s">%s</a>', $this->author_homepage, $this->author);
107
- } else {
108
- $info->author = $this->author;
109
- }
110
-
111
- if (is_object($this->sections)) {
112
- $info->sections = get_object_vars($this->sections);
113
- } elseif (is_array($this->sections)) {
114
- $info->sections = $this->sections;
115
- } else {
116
- $info->sections = array('description' => '');
117
- }
118
-
119
- return $info;
120
- }
121
-
122
- }
app/helper/rtPluginUpdate.php DELETED
@@ -1,128 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Description of rtPluginUpdate
5
- * A simple container class for holding information about an available update.
6
- * @author faishal
7
- */
8
- class rtPluginUpdate {
9
-
10
- public $id = 0;
11
- public $slug;
12
- public $version;
13
- public $homepage;
14
- public $download_url;
15
- public $upgrade_notice;
16
- private static $fields = array('id', 'slug', 'version', 'homepage', 'download_url', 'upgrade_notice');
17
-
18
- /**
19
- * Create a new instance of PluginUpdate from its JSON-encoded representation.
20
- *
21
- * @param string $json
22
- * @param bool $triggerErrors
23
- * @return PluginUpdate|null
24
- */
25
-
26
- /**
27
- *
28
- * @param type $json
29
- * @param type $triggerErrors
30
- * @return null
31
- */
32
- public static function fromJson($json, $triggerErrors = false) {
33
- //Since update-related information is simply a subset of the full plugin info,
34
- //we can parse the update JSON as if it was a plugin info string, then copy over
35
- //the parts that we care about.
36
- $pluginInfo = rtPluginInfo::fromJson($json, $triggerErrors);
37
- if ($pluginInfo != null) {
38
- return self::fromPluginInfo($pluginInfo);
39
- } else {
40
- return null;
41
- }
42
- }
43
-
44
- /**
45
- * Create a new instance of PluginUpdate based on an instance of PluginInfo.
46
- * Basically, this just copies a subset of fields from one object to another.
47
- *
48
- * @param PluginInfo $info
49
- * @return PluginUpdate
50
- */
51
-
52
- /**
53
- *
54
- * @param type $info
55
- * @return type
56
- */
57
- public static function fromPluginInfo($info) {
58
- return self::fromObject($info);
59
- }
60
-
61
- /**
62
- * Create a new instance of PluginUpdate by copying the necessary fields from
63
- * another object.
64
- *
65
- * @param StdClass|PluginInfo|PluginUpdate $object The source object.
66
- * @return PluginUpdate The new copy.
67
- */
68
-
69
- /**
70
- *
71
- * @param type $object
72
- * @return \self
73
- */
74
- public static function fromObject($object) {
75
- $update = new self();
76
- foreach (self::$fields as $field) {
77
- $update->$field = $object->$field;
78
- }
79
- return $update;
80
- }
81
-
82
- /**
83
- * Create an instance of StdClass that can later be converted back to
84
- * a PluginUpdate. Useful for serialization and caching, as it avoids
85
- * the "incomplete object" problem if the cached value is loaded before
86
- * this class.
87
- *
88
- * @return StdClass
89
- */
90
-
91
- /**
92
- *
93
- * @return \StdClass
94
- */
95
- public function toStdClass() {
96
- $object = new StdClass();
97
- foreach (self::$fields as $field) {
98
- $object->$field = $this->$field;
99
- }
100
- return $object;
101
- }
102
-
103
- /**
104
- * Transform the update into the format used by WordPress native plugin API.
105
- *
106
- * @return object
107
- */
108
-
109
- /**
110
- *
111
- * @return \StdClass
112
- */
113
- public function toWpFormat() {
114
- $update = new StdClass;
115
-
116
- $update->id = $this->id;
117
- $update->slug = $this->slug;
118
- $update->new_version = $this->version;
119
- $update->url = $this->homepage;
120
- $update->package = $this->download_url;
121
- if (!empty($this->upgrade_notice)) {
122
- $update->upgrade_notice = $this->upgrade_notice;
123
- }
124
-
125
- return $update;
126
- }
127
-
128
- }
app/main/controllers/activity/RTMediaBuddyPressActivity.php CHANGED
@@ -28,6 +28,7 @@ class RTMediaBuddyPressActivity {
28
add_filter( 'bp_activity_allowed_tags', array( &$this, 'override_allowed_tags' ) );
29
add_filter( 'bp_get_activity_parent_content', array( &$this, 'bp_get_activity_parent_content' ) );
30
add_filter( 'bp_activity_content_before_save', array( $this, 'bp_activity_content_before_save' ) );
31
add_action( 'bp_activity_deleted_activities', array( &$this, 'bp_activity_deleted_activities' ) );
32
33
// Filter bp_activity_prefetch_object_data for translatable activity actions
@@ -271,6 +272,21 @@ class RTMediaBuddyPressActivity {
271
return $content;
272
}
273
274
function delete_comment_sync( $activity_id, $comment_id ) {
275
global $wpdb;
276
$comment_id = $wpdb->get_var( $wpdb->prepare( "select comment_id from {$wpdb->commentmeta} where meta_key = 'activity_id' and meta_value = %s", $comment_id ) );
28
add_filter( 'bp_activity_allowed_tags', array( &$this, 'override_allowed_tags' ) );
29
add_filter( 'bp_get_activity_parent_content', array( &$this, 'bp_get_activity_parent_content' ) );
30
add_filter( 'bp_activity_content_before_save', array( $this, 'bp_activity_content_before_save' ) );
31
+ add_filter( 'bp_activity_type_before_save', array( $this, 'bp_activity_type_before_save' ) );
32
add_action( 'bp_activity_deleted_activities', array( &$this, 'bp_activity_deleted_activities' ) );
33
34
// Filter bp_activity_prefetch_object_data for translatable activity actions
272
return $content;
273
}
274
275
+ /**
276
+ * This function will check for the media file attached to the actitvity and accordingly will set type.
277
+ *
278
+ * @param string $type Type of the Activity.
279
+ *
280
+ * @return string Filtered value of the activity type.
281
+ */
282
+ public function bp_activity_type_before_save( $type ) {
283
+ $rtmedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
284
+ if ( ( ! empty( $rtmedia_attached_files ) ) && is_array( $rtmedia_attached_files ) && 'activity_update' === $type ) {
285
+ $type = 'rtmedia_update';
286
+ }
287
+ return $type;
288
+ }
289
+
290
function delete_comment_sync( $activity_id, $comment_id ) {
291
global $wpdb;
292
$comment_id = $wpdb->get_var( $wpdb->prepare( "select comment_id from {$wpdb->commentmeta} where meta_key = 'activity_id' and meta_value = %s", $comment_id ) );
app/main/controllers/media/RTMediaCoverArt.php DELETED
@@ -1,73 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * To change this template, choose Tools | Templates
5
- * and open the template in the editor.
6
- */
7
-
8
- /**
9
- * Description of RTMediaCoverArt
10
- *
11
- * @author saurabh
12
- */
13
- class RTMediaCoverArt extends RTMediaUserInteraction{
14
-
15
- /**
16
- *
17
- */
18
- function __construct() {
19
- $defaults = array(
20
- 'action' => 'cover',
21
- 'label' => 'Set as Album Cover',
22
- 'plural' => '',
23
- 'undo_label' => 'Unset as Album Cover',
24
- 'privacy' => 1000, //60,
25
- 'countable' => false,
26
- 'single' => false,
27
- 'repeatable' => false,
28
- 'undoable' => true
29
- );
30
- parent::__construct($defaults);
31
-
32
- }
33
-
34
- function process(){
35
- global $rtmedia_query;
36
- $media_id = $rtmedia_query->action_query->id;
37
-
38
- $this->model = new RTMediaModel();
39
-
40
- $media = $this->model->get(array('id'=>$media_id));
41
-
42
- $media = $media[0];
43
-
44
- $album = $media->album_id;
45
-
46
- $this->model->update(array('cover_art',$media_id),array('id'=>$album));
47
- return 1;
48
- }
49
-
50
- function before_render() {
51
- $globa_id = RTMediaAlbum::get_default();
52
-
53
- if(isset($this->media->album_id ) && $this->media->album_id > 0){
54
- $album = ($this->model->get(array('media_id'=>$globa_id)));
55
- if($album && isset($album[0])){
56
- if($album[0]->id == $this->media->album_id){
57
- $this->privacy =1000;
58
- return;
59
- }
60
- }
61
- $album = ($this->model->get(array('id'=>$this->media->album_id)));
62
- if($album && isset($album[0])){
63
- if($album[0]->media_author != $this->interactor ){
64
- $this->privacy =1000;
65
- return;
66
- }
67
- }
68
- }
69
- }
70
-
71
- }
72
-
73
- ?>
app/main/controllers/template/rtmedia-actions.php CHANGED
@@ -538,7 +538,7 @@ function rtmedia_admin_pages_content( $page ) {
538
<li><?php esc_html_e( 'WordPress/BuddyPress Plugin Development', 'buddypress-media' ); ?></li>
539
</ol>
540
<div class="clearfix">
541
- <a href="https://rtmedia.io/contact" class="rtm-button rtm-success" target="_blank"><?php esc_html_e( 'Contact Us', 'buddypress-media' ); ?></a>
542
</div>
543
</div>
544
<?php
538
<li><?php esc_html_e( 'WordPress/BuddyPress Plugin Development', 'buddypress-media' ); ?></li>
539
</ol>
540
<div class="clearfix">
541
+ <a href="https://rtmedia.io/enterprise-plan" class="rtm-button rtm-success" target="_blank"><?php esc_html_e( 'Contact Us', 'buddypress-media' ); ?></a>
542
</div>
543
</div>
544
<?php
app/main/controllers/template/template.php DELETED
@@ -1,165 +0,0 @@
1
- <?php
2
- global $rtmedia_query;
3
-
4
- if ( is_rtmedia_album_gallery() ) {
5
- $template = 'album-gallery';
6
- } elseif ( is_rtmedia_album() || is_rtmedia_gallery() ) {
7
- $template = 'media-gallery';
8
- if (
9
- is_rtmedia_album() &&
10
- isset( $rtmedia_query->media_query ) &&
11
- $rtmedia_query->action_query->action == 'edit'
12
- ) {
13
- if ( isset( $rtmedia_query->media_query[ 'media_author' ] ) && (get_current_user_id() == $rtmedia_query->media_query[ 'media_author' ]) ) {
14
- $template = 'album-single-edit';
15
- }
16
- }
17
- } else if ( is_rtmedia_single() ) {
18
- $template = 'media-single';
19
- if ( $rtmedia_query->action_query->action == 'edit' )
20
- $template = 'media-single-edit';
21
- }
22
-
23
- $ajax = false;
24
-
25
-
26
- if (
27
- ! empty( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) &&
28
- strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) == 'xmlhttprequest'
29
- )
30
- $ajax = true;
31
-
32
-
33
- if ( ! $ajax ) {
34
- ?>
35
-
36
- <?php
37
-
38
- if ( class_exists( 'BuddyPress' ) && ! bp_is_blog_page() ) {
39
- $template_type = 'buddypress';
40
- } else {
41
- $template_type = '';
42
- }
43
-
44
- get_header( $template_type );
45
- ?>
46
- <div id="primary" class="site-content">
47
- <?php
48
-
49
- if ( $template_type == 'buddypress' ) {
50
- ?>
51
- <div id ="content">
52
- <div id="buddypress" class="padder">
53
-
54
- <?php if ( bp_displayed_user_id() ) { ?>
55
- <div id="item-header">
56
-
57
- <?php bp_get_template_part( 'members/single/member-header' ) ?>
58
-
59
- </div>
60
-
61
- <div id="item-nav">
62
- <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
63
- <ul>
64
-
65
- <?php bp_get_displayed_user_nav(); ?>
66
-
67
- <?php do_action( 'bp_member_options_nav' ); ?>
68
-
69
- </ul>
70
- </div>
71
- </div>
72
-
73
- <div id="item-body">
74
-
75
- <?php do_action( 'bp_before_member_body' ); ?>
76
- <?php do_action( 'bp_before_member_media' ); ?>
77
- <div class="item-list-tabs no-ajax" id="subnav">
78
- <ul>
79
-
80
- <?php rtmedia_sub_nav(); ?>
81
-
82
- <?php do_action( 'rtmedia_sub_nav' ); ?>
83
-
84
- </ul>
85
- </div><!-- .item-list-tabs -->
86
-
87
- <?php
88
- } else if ( bp_is_group() ) {
89
- ?>
90
-
91
- <?php
92
- if ( bp_has_groups() ) : while ( bp_groups() ) : bp_the_group();
93
- ?>
94
- <div id="item-header">
95
-
96
- <?php bp_get_template_part( 'groups/single/group-header' ); ?>
97
-
98
- </div>
99
- <div id="item-nav">
100
- <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
101
- <ul>
102
-
103
- <?php bp_get_options_nav(); ?>
104
-
105
- <?php do_action( 'bp_group_options_nav' ); ?>
106
-
107
- </ul>
108
- </div>
109
- </div><!-- #item-nav -->
110
-
111
-
112
- <div id="item-body">
113
-
114
- <?php do_action( 'bp_before_group_body' ); ?>
115
- <?php do_action( 'bp_before_group_media' ); ?>
116
- <div class="item-list-tabs no-ajax" id="subnav">
117
- <ul>
118
-
119
- <?php rtmedia_sub_nav(); ?>
120
-
121
- <?php do_action( 'rtmedia_sub_nav' ); ?>
122
-
123
- </ul>
124
- </div><!-- .item-list-tabs -->
125
- <?php
126
- endwhile;
127
- endif;
128
- }
129
- }
130
- }
131
- include(RTMediaTemplate::locate_template( $template ));
132
- if ( ! $ajax ) {
133
- if ( $template_type == 'buddypress' && (bp_displayed_user_id() || bp_is_group()) ) {
134
-
135
- if ( bp_is_group() ) {
136
- do_action( 'bp_after_group_media' );
137
- do_action( 'bp_after_group_body' );
138
-
139
- }
140
- if ( bp_displayed_user_id() ) {
141
- do_action( 'bp_after_member_media' );
142
- do_action( 'bp_after_member_body' );
143
-
144
- }
145
- ?>
146
-
147
-
148
-
149
-
150
- </div>
151
- </div>
152
- </div>
153
-
154
- <?php
155
- if ( ! $ajax ) {
156
- ?>
157
- </div>
158
- <?php
159
- }
160
- }
161
- get_sidebar( $template_type );
162
-
163
- get_footer( $template_type );
164
- }
165
- ?>
app/services/RTMediaEncoding.php DELETED
@@ -1,782 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Description of BPMediaEncoding
5
- *
6
- * @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
7
- */
8
- class RTMediaEncoding {
9
-
10
- protected $api_url = 'http://api.rtcamp.com/';
11
- protected $sandbox_testing = 0;
12
- protected $merchant_id = 'paypal@rtcamp.com';
13
- public $uploaded = array();
14
- public $api_key = false;
15
- public $stored_api_key = false;
16
- public $video_extensions = ',mov,m4v,m2v,avi,mpg,flv,wmv,mkv,webm,ogv,mxf,asf,vob,mts,qt,mpeg,x-msvideo';
17
- public $music_extensions = ',wma,ogg,wav,m4a';
18
-
19
- public function __construct( $no_init = false ) {
20
- $this->api_key = get_site_option( 'rtmedia-encoding-api-key' );
21
- $this->stored_api_key = get_site_option( 'rtmedia-encoding-api-key-stored' );
22
- if ( $no_init ) {
23
- return;
24
- }
25
- if ( is_admin() && $this->api_key ) {
26
- add_action( 'rtmedia_before_default_admin_widgets', array( $this, 'usage_widget' ) );
27
- }
28
-
29
- add_action( 'admin_init', array( $this, 'save_api_key' ), 1 );
30
- if ( $this->api_key ) {
31
- // store api key as different db key if user disable encoding service
32
- if ( ! $this->stored_api_key ) {
33
- $this->stored_api_key = $this->api_key;
34
- update_site_option( 'rtmedia-encoding-api-key-stored', $this->stored_api_key );
35
- }
36
- add_filter( 'rtmedia_allowed_types', array( $this, 'allowed_types_admin_settings' ), 10, 1 );
37
- $usage_info = get_site_option( 'rtmedia-encoding-usage' );
38
-
39
- if ( $usage_info ) {
40
- if ( isset( $usage_info[ $this->api_key ]->status ) && $usage_info[ $this->api_key ]->status ) {
41
- if ( isset( $usage_info[ $this->api_key ]->remaining ) && $usage_info[ $this->api_key ]->remaining > 0 ) {
42
- if ( $usage_info[ $this->api_key ]->remaining < 524288000 && ! get_site_option( 'rtmedia-encoding-usage-limit-mail' ) ) {
43
- $this->nearing_usage_limit( $usage_info );
44
- } elseif ( $usage_info[ $this->api_key ]->remaining > 524288000 && get_site_option( 'rtmedia-encoding-usage-limit-mail' ) ) {
45
- update_site_option( 'rtmedia-encoding-usage-limit-mail', 0 );
46
- }
47
- if ( ! class_exists( 'RTMediaFFMPEG' ) && ! class_exists( 'RTMediaKaltura' ) ) {
48
- add_filter( 'rtmedia_after_add_media', array( $this, 'encoding' ), 10, 3 );
49
- }
50
- $blacklist = array( 'localhost', '127.0.0.1' );
51
- if ( ! in_array( wp_unslash( $_SERVER['HTTP_HOST'] ), $blacklist, true ) ) { // @codingStandardsIgnoreLine
52
- add_filter( 'rtmedia_plupload_files_filter', array( $this, 'allowed_types' ), 10, 1 );
53
- add_filter( 'rtmedia_allowed_types', array(
54
- $this,
55
- 'allowed_types_admin_settings',
56
- ), 10, 1 );
57
- add_filter( 'rtmedia_valid_type_check', array( $this, 'bypass_video_audio' ), 10, 2 );
58
- }
59
- }
60
- }
61
- }
62
- }
63
-
64
- add_action( 'init', array( $this, 'handle_callback' ), 20 );
65
- add_action( 'wp_ajax_rtmedia_free_encoding_subscribe', array( $this, 'free_encoding_subscribe' ) );
66
- add_action( 'wp_ajax_rtmedia_unsubscribe_encoding_service', array( $this, 'unsubscribe_encoding' ) );
67
- add_action( 'wp_ajax_rtmedia_hide_encoding_notice', array( $this, 'hide_encoding_notice' ), 1 );
68
- add_action( 'wp_ajax_rtmedia_enter_api_key', array( $this, 'enter_api_key' ), 1 );
69
- add_action( 'wp_ajax_rtmedia_disable_encoding', array( $this, 'disable_encoding' ), 1 );
70
- add_action( 'wp_ajax_rtmedia_enable_encoding', array( $this, 'enable_encoding' ), 1 );
71
- //add_action('wp_ajax_rtmedia_regenerate_thumbnails', array($this, 'rtmedia_regenerate_thumbnails'), 1);
72
- }
73
-
74
- /**
75
- *
76
- * @param type $media_ids
77
- * @param type $file_object
78
- * @param type $uploaded
79
- * @param string $autoformat thumbnails for genrating thumbs only
80
- */
81
- function encoding( $media_ids, $file_object, $uploaded, $autoformat = true ) {
82
- foreach ( $file_object as $key => $single ) {
83
- $type_arry = explode( '.', $single['url'] );
84
- $type = strtolower( $type_arry[ count( $type_arry ) - 1 ] );
85
- $not_allowed_type = array( 'mp3' );
86
- if ( preg_match( '/video|audio/i', $single['type'], $type_array ) && ! in_array( $single['type'], array( 'audio/mp3' ) ) && ! in_array( $type, $not_allowed_type ) ) {
87
- $options = rtmedia_get_site_option( 'rtmedia-options' );
88
- $options_vedio_thumb = $options['general_videothumbs'];
89
- if ( '' === $options_vedio_thumb ) {
90
- $options_vedio_thumb = 3;
91
- }
92
-
93
- /** fORMAT * */
94
- if ( 'video/mp4' === $single['type'] || 'mp4' === $type ) {
95
- $autoformat = 'thumbnails';
96
- }
97
-
98
- $query_args = array(
99
- 'url' => urlencode( $single['url'] ),
100
- 'callbackurl' => urlencode( trailingslashit( home_url() ) . 'index.php' ),
101
- 'force' => 0,
102
- 'size' => filesize( $single['file'] ),
103
- 'formats' => ( true === $autoformat ) ? ( ( 'video' === $type_array[0] ) ? 'mp4' : 'mp3' ) : $autoformat,
104
- 'thumbs' => $options_vedio_thumb,
105
- 'rt_id' => $media_ids[ $key ],
106
- );
107
- $encoding_url = $this->api_url . 'job/new/';
108
- $upload_url = add_query_arg( $query_args, $encoding_url . $this->api_key );
109
- $upload_page = wp_remote_get( $upload_url, array( 'timeout' => 200 ) );
110
-
111
- if ( ! is_wp_error( $upload_page ) && ( ! isset( $upload_page['headers']['status'] ) || ( isset( $upload_page['headers']['status'] ) && ( 200 === intval( $upload_page['headers']['status'] ) ) ) ) ) {
112
- $upload_info = json_decode( $upload_page['body'] );
113
- if ( isset( $upload_info->status ) && $upload_info->status && isset( $upload_info->job_id ) && $upload_info->job_id ) {
114
- $job_id = $upload_info->job_id;
115
- update_rtmedia_meta( $media_ids[ $key ], 'rtmedia-encoding-job-id', $job_id );
116
- $model = new RTMediaModel();
117
- $model->update( array( 'cover_art' => '0' ), array( 'id' => $media_ids[ $key ] ) );
118
- }
119
- }
120
- $this->update_usage( $this->api_key );
121
- }
122
- }
123
- }
124
-
125
- public function bypass_video_audio( $flag, $file ) {
126
- if ( isset( $file['type'] ) ) {
127
- $fileinfo = explode( '/', $file['type'] );
128
- if ( in_array( $fileinfo[0], array( 'audio', 'video' ), true ) ) {
129
- $flag = true;
130
- }
131
- }
132
-
133
- return $flag;
134
- }
135
-
136
- public function is_valid_key( $key ) {
137
- $validate_url = trailingslashit( $this->api_url ) . 'api/validate/' . $key;
138
- $validation_page = wp_remote_get( $validate_url, array( 'timeout' => 20 ) );
139
- if ( ! is_wp_error( $validation_page ) ) {
140
- $validation_info = json_decode( $validation_page['body'] );
141
- $status = $validation_info->status;
142
- } else {
143
- $status = false;
144
- }
145
-
146
- return $status;
147
- }
148
-
149
- public function update_usage( $key ) {
150
- $usage_url = trailingslashit( $this->api_url ) . 'api/usage/' . $key;
151
- $usage_page = wp_remote_get( $usage_url, array( 'timeout' => 20 ) );
152
- if ( ! is_wp_error( $usage_page ) ) {
153
- $usage_info = json_decode( $usage_page['body'] );
154
- } else {
155
- $usage_info = null;
156
- }
157
- update_site_option( 'rtmedia-encoding-usage', array( $key => $usage_info ) );
158
-
159
- return $usage_info;
160
- }
161
-
162
- public function nearing_usage_limit( $usage_details ) {
163
- $subject = esc_html__( 'rtMedia Encoding: Nearing quota limit.', 'buddypress-media' );
164
- $message = '<p>' . esc_html__( 'You are nearing the quota limit for your rtMedia encoding service.', 'buddypress-media' ) . '</p><p>'
165
- . esc_html__( 'Following are the details:', 'buddypress-media' ) . '</p><p><strong>Used:</strong> %s</p><p><strong>'
166
- . esc_html__( 'Remaining', 'buddypress-media' ) . '</strong>: %s</p><p><strong>' . esc_html__( 'Total:', 'buddypress-media' ) . '</strong> %s</p>';
167
- $users = get_users( array( 'role' => 'administrator' ) );
168
- if ( $users ) {
169
- $admin_email_ids = array();
170
- foreach ( $users as $user ) {
171
- $admin_email_ids[] = $user->user_email;
172
- }
173
-
174
- add_filter( 'wp_mail_content_type', array($this,'rtmedia_mail_content_type'));
175
- wp_mail( $admin_email_ids, $subject, sprintf( $message, size_format( $usage_details[ $this->api_key ]->used, 2 ), size_format( $usage_details[ $this->api_key ]->remaining, 2 ), size_format( $usage_details[ $this->api_key ]->total, 2 ) ) );
176
- }
177
- update_site_option( 'rtmedia-encoding-usage-limit-mail', 1 );
178
- }
179
-
180
- public function usage_quota_over() {
181
- $usage_details = get_site_option( 'rtmedia-encoding-usage' );
182
- if ( ! $usage_details[ $this->api_key ]->remaining ) {
183
- $subject = esc_html__( 'rtMedia Encoding: Usage quota over.', 'buddypress-media' );
184
- $message = '<p>' . esc_html__( 'Your usage quota is over. Upgrade your plan' , 'buddypress-media' ) . '</p><p>' .
185
- esc_html__( 'Following are the details:', 'buddypress-media' ) . '</p><p><strong>' . esc_html__( 'Used:' , 'buddypress-media' ) .
186
- '</strong> %s</p><p><strong>' . esc_html__( 'Remaining' , 'buddypress-media' ) . '</strong>: %s</p><p><strong>' . esc_html__( 'Total:', 'buddypress-media' ) . '</strong> %s</p>';
187
- $users = get_users( array( 'role' => 'administrator' ) );
188
- if ( $users ) {
189
- foreach ( $users as $user ) {
190
- $admin_email_ids[] = $user->user_email;
191
- }
192
-
193
- add_filter( 'wp_mail_content_type', array($this,'rtmedia_mail_content_type'));
194
- wp_mail( $admin_email_ids, $subject, sprintf( $message, size_format( $usage_details[ $this->api_key ]->used, 2 ), 0, size_format( $usage_details[ $this->api_key ]->total, 2 ) ) );
195
- }
196
- update_site_option( 'rtmedia-encoding-usage-limit-mail', 1 );
197
- }
198
- }
199
-
200
- public function rtmedia_mail_content_type() {
201
- return 'text/html';
202
- }
203
-
204
- public function save_api_key() {
205
- if ( isset( $_GET['api_key_updated'] ) && sanitize_text_field( wp_unslash( $_GET['api_key_updated'] ) ) ) {
206
- if ( is_multisite() ) {
207
- add_action( 'network_admin_notices', array( $this, 'successfully_subscribed_notice' ) );
208
- }
209
-
210
- add_action( 'admin_notices', array( $this, 'successfully_subscribed_notice' ) );
211
- }
212
-
213
- $apikey = ( isset( $_GET['apikey'] ) ) ? sanitize_text_field( wp_unslash( $_GET['apikey'] ) ) : '';
214
- if ( isset( $_GET['apikey'] ) && is_admin() && isset( $_GET['page'] ) && ( 'rtmedia-addons' === sanitize_text_field( wp_unslash( $_GET['page'] ) ) ) && $this->is_valid_key( $apikey ) ) {
215
- if ( $this->api_key && ! ( isset( $_GET['update'] ) && sanitize_text_field( wp_unslash( $_GET['update'] ) ) ) ) {
216
- $unsubscribe_url = trailingslashit( $this->api_url ) . 'api/cancel/' . $this->api_key;
217
- wp_remote_post( $unsubscribe_url, array(
218
- 'timeout' => 120,
219
- 'body' => array( 'note' => 'Direct URL Input (API Key: ' . $apikey . ')' ),
220
- ) );
221
- }
222
-
223
- update_site_option( 'rtmedia-encoding-api-key', $apikey );
224
- update_site_option( 'rtmedia-encoding-api-key-stored', $apikey );
225
-
226
- $usage_info = $this->update_usage( $apikey );
227
- $return_page = add_query_arg( array(
228
- 'page' => 'rtmedia-addons',
229
- 'api_key_updated' => $usage_info->plan->name,
230
- ), admin_url( 'admin.php' ) );
231
- wp_safe_redirect( esc_url_raw( $return_page ) );
232
-
233
- die();
234
- }
235
- }
236
-
237
- public function allowed_types( $types ) {
238
- if ( isset( $types[0] ) && isset( $types[0]['extensions'] ) ) {
239
- if ( is_rtmedia_upload_video_enabled() && strpos( $this->video_extensions, $types[0]['extensions'] ) ) {
240
- $types[0]['extensions'] .= $this->video_extensions; //Allow all types of video file to be uploded
241
- }
242
- if ( is_rtmedia_upload_music_enabled() && strpos( $this->music_extensions, $types[0]['extensions'] ) ) {
243
- $types[0]['extensions'] .= $this->music_extensions; //Allow all types of music file to be uploded
244
- }
245
- }
246
-
247
- return $types;
248
- }
249
-
250
- public function allowed_types_admin_settings( $types ) {
251
- $allowed_video_string = implode( ',', $types['video']['extn'] );
252
- $allowed_audio_string = implode( ',', $types['music']['extn'] );
253
- $allowed_video = explode( ',', $allowed_video_string . $this->video_extensions );
254
- $allowed_audio = explode( ',', $allowed_audio_string . $this->music_extensions );
255
- $types['video']['extn'] = array_unique( $allowed_video );
256
- $types['music']['extn'] = array_unique( $allowed_audio );
257
-
258
- return $types;
259
- }
260
-
261
- public function successfully_subscribed_notice() {
262
- ?>
263
- <div class="updated">
264
- <p> <?php esc_html_e( 'You have successfully subscribed for the ', 'buddypress-media' ) ?>
265
- <strong><?php printf( '%s', esc_html( sanitize_text_field( wp_unslash( $_GET['api_key_updated'] ) ) ) ); // @codingStandardsIgnoreLine ?></strong>
266
- <?php esc_html_e( ' plan', 'buddypress-media' ) ?>
267
- </p>
268
- </div><?php
269
- }
270
-
271
- public function encoding_subscription_form( $name = 'No Name', $price = '0', $force = false ) {
272
- if ( $this->api_key ) {
273
- $this->update_usage( $this->api_key );
274
- }
275
- $action = $this->sandbox_testing ? 'https://sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';
276
- $return_page = esc_url( add_query_arg( array( 'page' => 'rtmedia-addons' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) ) );
277
-
278
- $usage_details = get_site_option( 'rtmedia-encoding-usage' );
279
- if ( isset( $usage_details[ $this->api_key ]->plan->name ) && ( strtolower( $usage_details[ $this->api_key ]->plan->name ) === strtolower( $name ) ) && $usage_details[ $this->api_key ]->sub_status && ! $force ) {
280
- $form = '<button data-plan="' . esc_attr( $name ) . '" data-price="' . esc_attr( $price ) . '" type="submit" class="button bpm-unsubscribe">' . esc_html__( 'Unsubscribe', 'buddypress-media' ) . '</button>';
281
- $form .= '<div id="bpm-unsubscribe-dialog" title="Unsubscribe">
282
- <p>' . esc_html__( 'Just to improve our service we would like to know the reason for you to leave us.', 'buddypress-media' ) . '</p>
283
- <p><textarea rows="3" cols="36" id="bpm-unsubscribe-note"></textarea></p>
284
- </div>';
285
- } else {
286
- $form = '<form method="post" action="' . $action . '" class="paypal-button" target="_top">
287
- <input type="hidden" name="button" value="subscribe">
288
- <input type="hidden" name="item_name" value="' . esc_attr( ucfirst( $name ) ) . '">
289
-
290
- <input type="hidden" name="currency_code" value="USD">
291
-
292
-
293
- <input type="hidden" name="a3" value="' . esc_attr( $price ) . '">
294
- <input type="hidden" name="p3" value="1">
295
- <input type="hidden" name="t3" value="M">
296
-
297
- <input type="hidden" name="cmd" value="_xclick-subscriptions">
298
-
299
- <!-- Merchant ID -->
300
- <input type="hidden" name="business" value="' . esc_attr( $this->merchant_id ) . '">
301
-
302
-
303
- <input type="hidden" name="custom" value="' . esc_url( $return_page ) . '">
304
-
305
- <!-- Flag to no shipping -->
306
- <input type="hidden" name="no_shipping" value="1">
307
-
308
- <input type="hidden" name="notify_url" value="' . esc_url( trailingslashit( $this->api_url ) ) . 'subscribe/paypal">
309
-
310
- <!-- Flag to post payment return url -->
311
- <input type="hidden" name="return" value="' . esc_url( trailingslashit( $this->api_url ) ) . 'payment/process">
312
-
313
-
314
- <!-- Flag to post payment data to given return url -->
315
- <input type="hidden" name="rm" value="2">
316
-
317
- <input type="hidden" name="src" value="1">
318
- <input type="hidden" name="sra" value="1">
319
-
320
- <input type="image" src="http://www.paypal.com/en_US/i/btn/btn_subscribe_SM.gif" name="submit" alt="Make payments with PayPal - it\'s fast, free and secure!">
321
- </form>';
322
- }
323
-
324
- return $form;
325
- }
326
-
327
- public function usage_widget() {
328
- $usage_details = get_site_option( 'rtmedia-encoding-usage' );
329
- $content = '';
330
- if ( $usage_details && isset( $usage_details[ $this->api_key ]->status ) && $usage_details[ $this->api_key ]->status ) {
331
- if ( isset( $usage_details[ $this->api_key ]->plan->name ) ) {
332
- $content .= '<p><strong>' . esc_html__( 'Current Plan', 'buddypress-media' ) . ':</strong> ' . esc_html( $usage_details[ $this->api_key ]->plan->name ) . ( $usage_details[ $this->api_key ]->sub_status ? '' : ' (' . esc_html__( 'Unsubscribed', 'buddypress-media' ) . ')' ) . '</p>';
333
- }
334
- if ( isset( $usage_details[ $this->api_key ]->used ) ) {
335
- $content .= '<p><span class="encoding-used"></span><strong>' . esc_html__( 'Used', 'buddypress-media' ) . ':</strong> ' . ( ( $used_size = size_format( $usage_details[ $this->api_key ]->used, 2 ) ) ? esc_html( $used_size ) : '0MB' ) . '</p>';
336
- }
337
- if ( isset( $usage_details[ $this->api_key ]->remaining ) ) {
338
- $content .= '<p><span class="encoding-remaining"></span><strong>' . esc_html__( 'Remaining', 'buddypress-media' ) . ':</strong> ' . ( ( $remaining_size = size_format( $usage_details[ $this->api_key ]->remaining, 2 ) ) ? esc_html( $remaining_size ) : '0MB' ) . '</p>';
339
- }
340
- if ( isset( $usage_details[ $this->api_key ]->total ) ) {
341
- $content .= '<p><strong>' . esc_html__( 'Total', 'buddypress-media' ) . ':</strong> ' . esc_html( size_format( $usage_details[ $this->api_key ]->total, 2 ) ) . '</p>';
342
- }
343
- $usage = new rtProgress();
344
- $content .= $usage->progress_ui( $usage->progress( $usage_details[ $this->api_key ]->used, $usage_details[ $this->api_key ]->total ), false );
345
- if ( $usage_details[ $this->api_key ]->remaining <= 0 ) {
346
- $content .= '<div class="error below-h2"><p>' . esc_html__( 'Your usage limit has been reached. Upgrade your plan.', 'buddypress-media' ) . '</p></div>';
347
- }
348
- } else {
349
- $content .= '<div class="error below-h2"><p>' . esc_html__( 'Your API key is not valid or is expired.', 'buddypress-media' ) . '</p></div>';
350
- }
351
- new RTMediaAdminWidget( 'rtmedia-encoding-usage', esc_html__( 'Encoding Usage', 'buddypress-media' ), $content );
352
- }
353
-
354
- public function encoding_service_intro() {
355
- ?>
356
-
357
- <h3 class="rtm-option-title"><?php esc_html_e( 'Audio/Video encoding service', 'buddypress-media' ); ?></h3>
358
-
359
- <p><?php esc_html_e( 'rtMedia team has started offering an audio/video encoding service.', 'buddypress-media' ); ?></p>
360
-
361
- <p>
362
- <label for="new-api-key"><?php esc_html_e( 'Enter API KEY', 'buddypress-media' ); ?></label>
363
- <input id="new-api-key" type="text" name="new-api-key" value="<?php echo esc_attr( $this->stored_api_key ); ?>"
364
- size="60"/>
365
- <input type="submit" id="api-key-submit" name="api-key-submit"
366
- value="<?php echo esc_attr__( 'Save Key', 'buddypress-media' ); ?>" class="button-primary"/>
367
- </p>
368
-
369
- <p>
370
- <?php
371
- $enable_btn_style = 'style="display:none;"';
372
- $disable_btn_style = 'style="display:none;"';
373
- if ( $this->api_key ) {
374
- $enable_btn_style = 'style="display:block;"';
375
- } else if ( $this->stored_api_key ) {
376
- $disable_btn_style = 'style="display:block;"';
377
- }
378
- ?>
379
- <input type="submit" id="disable-encoding" name="disable-encoding" value="Disable Encoding"
380
- class="button-secondary" <?php echo $enable_btn_style; // @codingStandardsIgnoreLine?> />
381
- <input type="submit" id="enable-encoding" name="enable-encoding" value="Enable Encoding"
382
- class="button-secondary" <?php echo $disable_btn_style; // @codingStandardsIgnoreLine ?> />
383
- </p>
384
-
385
- <!-- Results table headers -->
386
- <table class="bp-media-encoding-table fixed widefat rtm-encoding-table">
387
- <thead>
388
- <tr>
389
- <th><?php esc_html_e( 'Feature\Plan', 'buddypress-media' ); ?></th>
390
- <th><?php esc_html_e( 'Free', 'buddypress-media' ); ?></th>
391
- <th><?php esc_html_e( 'Silver', 'buddypress-media' ); ?></th>
392
- <th><?php esc_html_e( 'Gold', 'buddypress-media' ); ?></th>
393
- <th><?php esc_html_e( 'Platinum', 'buddypress-media' ); ?></th>
394
- </tr>
395
- </thead>
396
-
397
- <tbody>
398
- <tr>
399
- <th><?php esc_html_e( 'File Size Limit', 'buddypress-media' ); ?></th>
400
- <td>200MB (
401
- <del>20MB</del>
402
- )
403
- </td>
404
- <td colspan="3" class="column-posts">16GB (
405
- <del>2GB</del>
406
- )
407
- </td>
408
- </tr>
409
- <tr>
410
- <th><?php esc_html_e( 'Bandwidth (monthly)', 'buddypress-media' ); ?></th>
411
- <td>10GB (
412
- <del>1GB</del>
413
- )
414
- </td>
415
- <td>100GB</td>
416
- <td>1TB</td>
417
- <td>10TB</td>
418
- </tr>
419
- <tr>
420
- <th><?php esc_html_e( 'Overage Bandwidth', 'buddypress-media' ); ?></th>
421
- <td><?php esc_html_e( 'Not Available', 'buddypress-media' ); ?></td>
422
- <td>$0.10 per GB</td>
423
- <td>$0.08 per GB</td>
424
- <td>$0.05 per GB</td>
425
- </tr>
426
- <tr>
427
- <th><?php esc_html_e( 'Amazon S3 Support', 'buddypress-media' ); ?></th>
428
- <td><?php esc_html_e( 'Not Available', 'buddypress-media' ); ?></td>
429
- <td colspan="3" class="column-posts"><?php esc_html_e( 'Coming Soon', 'buddypress-media' ); ?></td>
430
- </tr>
431
- <tr>
432
- <th><?php esc_html_e( 'HD Profile', 'buddypress-media' ); ?></th>
433
- <td><?php esc_html_e( 'Not Available', 'buddypress-media' ); ?></td>
434
- <td colspan="3" class="column-posts"><?php esc_html_e( 'Coming Soon', 'buddypress-media' ); ?></td>
435
- </tr>
436
- <tr>
437
- <th><?php esc_html_e( 'Webcam Recording', 'buddypress-media' ); ?></th>
438
- <td colspan="4" class="column-posts"><?php esc_html_e( 'Coming Soon', 'buddypress-media' ); ?></td>
439
- </tr>
440
- <tr>
441
- <th><?php esc_html_e( 'Pricing', 'buddypress-media' ); ?></th>
442
- <td><?php esc_html_e( 'Free', 'buddypress-media' ); ?></td>
443
- <td><?php esc_html_e( '$9/month', 'buddypress-media' ); ?></td>
444
- <td><?php esc_html_e( '$99/month', 'buddypress-media' ); ?></td>
445
- <td><?php esc_html_e( '$999/month', 'buddypress-media' ); ?></td>
446
- </tr>
447
- <tr>
448
- <th>&nbsp;</th>
449
- <td><?php
450
- $usage_details = get_site_option( 'rtmedia-encoding-usage' );
451
- if ( isset( $usage_details[ $this->api_key ]->plan->name ) && ( strtolower( $usage_details[ $this->api_key ]->plan->name ) === 'free' ) ) {
452
- echo '<button disabled="disabled" type="submit" class="encoding-try-now button button-primary">' . esc_html__( 'Current Plan', 'buddypress-media' ) . '</button>';
453
- } else {
454
- ?>
455
- <form id="encoding-try-now-form" method="get">
456
- <button type="submit"
457
- class="encoding-try-now button button-primary"><?php esc_html_e( 'Try Now', 'buddypress-media' ); ?></button>
458
- </form><?php }
459
- ?>
460
- </td>
461
- <td><?php echo $this->encoding_subscription_form( 'silver', 9.0 ); // @codingStandardsIgnoreLine ?></td>
462
- <td><?php echo $this->encoding_subscription_form( 'gold', 99.0 ); // @codingStandardsIgnoreLine ?></td>
463
- <td><?php echo $this->encoding_subscription_form( 'platinum', 999.0 ); // @codingStandardsIgnoreLine ?></td>
464
- </tr>
465
- </tbody>
466
- </table><br/><?php
467
- }
468
-
469
- public function add_media_thumbnails( $post_id ) {
470
- $post_info = get_post( $post_id );
471
- $post_date_string = new DateTime( $post_info->post_date );
472
- $post_date = $post_date_string->format( 'Y-m-d G:i:s' );
473
- $post_date_thumb_string = new DateTime( $post_info->post_date );
474
- $post_date_thumb = $post_date_thumb_string->format( 'Y/m/' );
475
- $post_thumbs = get_post_meta( $post_id, 'rtmedia_encode_response', true );
476
- $post_thumbs_array = maybe_unserialize( $post_thumbs );
477
- $largest_thumb_size = 0;
478
- $model = new RTMediaModel();
479
- $media = $model->get( array( 'media_id' => $post_id ) );
480
- $media_id = $media[0]->id;
481
- $largest_thumb = false;
482
- $upload_thumbnail_array = array();
483
- foreach ( $post_thumbs_array['thumbs'] as $thumbs => $thumbnail ) {
484
- $thumbresource = wp_remote_get( $thumbnail );
485
- $thumbinfo = pathinfo( $thumbnail );
486
- $temp_name = $thumbinfo['basename'];
487
- $temp_name = urldecode( $temp_name );
488
- $temp_name_array = explode( '/', $temp_name );
489
- $temp_name = $temp_name_array[ count( $temp_name_array ) - 1 ];
490
- $thumbinfo['basename'] = $temp_name;
491
- $thumb_upload_info = wp_upload_bits( $thumbinfo['basename'], null, $thumbresource['body'] );
492
- $upload_thumbnail_array[] = $thumb_upload_info['url'];
493
-
494
- $current_thumb_size = @filesize( $thumb_upload_info['url'] );
495
- if ( $current_thumb_size >= $largest_thumb_size ) {
496
- $largest_thumb_size = $current_thumb_size;
497
- $largest_thumb = $thumb_upload_info['url'];
498
- $model->update( array( 'cover_art' => $thumb_upload_info['url'] ), array( 'media_id' => $post_id ) );
499
- }
500
- }
501
- update_activity_after_thumb_set( $media_id );
502
- update_post_meta( $post_id, 'rtmedia_media_thumbnails', $upload_thumbnail_array );
503
-
504
- return $largest_thumb;
505
- }
506
-
507
- /**
508
- * Function to handle the callback request by the FFMPEG encoding server
509
- *
510
- * @since 1.0
511
- */
512
- public function handle_callback() {
513
- require_once( ABSPATH . 'wp-admin/includes/image.php' );
514
- //todo: nonce required
515
- // @codingStandardsIgnoreStart
516
- if ( isset( $_REQUEST['job_id'] ) && isset( $_REQUEST['download_url'] ) ) {
517
- $has_thumbs = isset( $_POST['thumbs'] ) ? true : false;
518
- $flag = false;
519
- global $wpdb;
520
- $model = new RTDBModel( 'rtm_media_meta', false, 10, true );
521
- $meta_details = $model->get( array(
522
- 'meta_value' => sanitize_text_field( wp_unslash( $_REQUEST['job_id'] ) ),
523
- 'meta_key' => 'rtmedia-encoding-job-id',
524
- ) );
525
- if ( ! isset( $meta_details[0] ) ) {
526
- $id = intval( $_REQUEST['rt_id'] );
527
- } else {
528
- $id = $meta_details[0]->media_id;
529
- }
530
- if ( isset( $id ) && is_numeric( $id ) ) {
531
- $model = new RTMediaModel();
532
- $media = $model->get_media( array( 'id' => $id ), 0, 1 );
533
- $this->media_author = $media[0]->media_author;
534
- $attachment_id = $media[0]->media_id;
535
- update_post_meta( $attachment_id, 'rtmedia_encode_response', $_POST );
536
-
537
- if ( $has_thumbs ) {
538
- $cover_art = $this->add_media_thumbnails( $attachment_id );
539
- }
540
-
541
- if ( isset( $_POST['format'] ) && 'thumbnails' === sanitize_text_field( wp_unslash( $_POST['format'] ) ) ) {
542
- die();
543
- }
544
-
545
- $this->uploaded['context'] = $media[0]->context;
546
- $this->uploaded['context_id'] = $media[0]->context_id;
547
- $this->uploaded['media_author'] = $media[0]->media_author;
548
- $attachemnt_post = get_post( $attachment_id );
549
- $download_url = urldecode( urldecode( $_REQUEST['download_url'] ) );
550
- $new_wp_attached_file_pathinfo = pathinfo( $download_url );
551
- $post_mime_type = 'mp4' === $new_wp_attached_file_pathinfo['extension'] ? 'video/mp4' : 'audio/mp3';
552
- try {
553
- $file_bits = file_get_contents( $download_url );
554
- } catch ( Exception $e ) {
555
- $flag = $e->getMessage();
556
- }
557
- if ( $file_bits ) {
558
-
559
- $old_attachment_file = get_attached_file( $attachment_id );
560
- if( function_exists( 'wp_delete_file' ) ){ // wp_delete_file is introduced in WordPress 4.2
561
- wp_delete_file( $old_attachment_file );
562
- } else {
563
- unlink( $old_attachment_file );
564
- }
565
-
566
- add_filter( 'upload_dir', array( $this, 'upload_dir' ) );
567
- $upload_info = wp_upload_bits( $new_wp_attached_file_pathinfo['basename'], null, $file_bits );
568
- $wpdb->update( $wpdb->posts, array(
569
- 'guid' => $upload_info['url'],
570
- 'post_mime_type' => $post_mime_type,
571
- ), array( 'ID' => $attachment_id ) );
572
- $old_wp_attached_file = get_post_meta( $attachment_id, '_wp_attached_file', true );
573
- $old_wp_attached_file_pathinfo = pathinfo( $old_wp_attached_file );
574
- update_post_meta( $attachment_id, '_wp_attached_file', str_replace( $old_wp_attached_file_pathinfo['basename'], $new_wp_attached_file_pathinfo['basename'], $old_wp_attached_file ) );
575
-
576
- $activity_id = $media[0]->activity_id;
577
- if ( $activity_id ) {
578
- $content = $wpdb->get_var( $wpdb->prepare( "SELECT content FROM {$wpdb->base_prefix}bp_activity WHERE id = %d", $activity_id ) );
579
- $activity_content = str_replace( $attachemnt_post->guid, $upload_info['url'], $content );
580
- $wpdb->update( $wpdb->base_prefix . 'bp_activity', array( 'content' => $activity_content ), array( 'id' => $activity_id ) );
581
- }
582
- } else {
583
- $flag = esc_html__( 'Could not read file.', 'buddypress-media' );
584
- error_log( $flag );
585
- }
586
- } else {
587
- $flag = esc_html__( 'Something went wrong. The required attachment id does not exists. It must have been deleted.', 'buddypress-media' );
588
- error_log( $flag );
589
- }
590
- // @codingStandardsIgnoreEnd
591
- $this->update_usage( $this->api_key );
592
-
593
- if ( isset( $_SERVER['REMOTE_ADDR'] ) && ( '4.30.110.155' === $_SERVER['REMOTE_ADDR'] ) ) {
594
- $mail = true;
595
- } else {
596
- $mail = false;
597
- }
598
-
599
- if ( $flag && $mail ) {
600
- $download_link = esc_url( add_query_arg( array(
601
- 'job_id' => sanitize_text_field( wp_unslash( $_GET['job_id'] ) ),
602
- 'download_url' => esc_url( $_GET['download_url'] ), // @codingStandardsIgnoreLine
603
- ), home_url() ) );
604
- $subject = esc_html__( 'rtMedia Encoding: Download Failed', 'buddypress-media' );
605
- $message = '<p><a href="' . esc_url( get_edit_post_link( $attachment_id ) ) . '">' . esc_html__( 'Media', 'buddypress-media' ) . '</a> ' .
606
- esc_html__( ' was successfully encoded but there was an error while downloading:', 'buddypress-media' ) . '</p><p><code>' .
607
- esc_html( $flag ) . '</code></p><p>' . esc_html__( 'You can ', 'buddypress-media' ) . '<a href="' . esc_url( $download_link ) . '">'
608
- . esc_html__( 'retry the download', 'buddypress-media' ) .'</a>.</p>';
609
- $users = get_users( array( 'role' => 'administrator' ) );
610
- if ( $users ) {
611
- foreach ( $users as $user ) {
612
- $admin_email_ids[] = $user->user_email;
613
- }
614
-
615
- add_filter( 'wp_mail_content_type', array($this,'rtmedia_mail_content_type'));
616
- wp_mail( $admin_email_ids, $subject, $message );
617
- }
618
- echo esc_html( $flag );
619
- } elseif ( $flag ) {
620
- echo esc_html( $flag );
621
- } else {
622
- esc_html_e( 'Done', 'buddypress-media' );
623
- }
624
- die();
625
- }
626
- }
627
-
628
- public function free_encoding_subscribe() {
629
- $email = get_site_option( 'admin_email' );
630
- $usage_details = get_site_option( 'rtmedia-encoding-usage' );
631
- if ( isset( $usage_details[ $this->api_key ]->plan->name ) && ( 'free' === strtolower( $usage_details[ $this->api_key ]->plan->name ) ) ) {
632
- echo wp_json_encode( array( 'error' => 'Your free subscription is already activated.' ) );
633
- } else {
634
- $free_subscription_url = esc_url_raw( add_query_arg( array( 'email' => urlencode( $email ) ), trailingslashit( $this->api_url ) . 'api/free/' ) );
635
- if ( $this->api_key ) {
636
- $free_subscription_url = esc_url_raw( add_query_arg( array(
637
- 'email' => urlencode( $email ),
638
- 'apikey' => $this->api_key,
639
- ), $free_subscription_url ) );
640
- }
641
- $free_subscribe_page = wp_remote_get( $free_subscription_url, array( 'timeout' => 120 ) );
642
- if ( ! is_wp_error( $free_subscribe_page ) && ( ! isset( $free_subscribe_page['headers']['status'] ) || ( isset( $free_subscribe_page['headers']['status'] ) && ( 200 === $free_subscribe_page['headers']['status'] ) ) ) ) {
643
- $subscription_info = json_decode( $free_subscribe_page['body'] );
644
- if ( isset( $subscription_info->status ) && $subscription_info->status ) {
645
- echo wp_json_encode( array( 'apikey' => $subscription_info->apikey ) );
646
- } else {
647
- echo wp_json_encode( array( 'error' => $subscription_info->message ) );
648
- }
649
- } else {
650
- echo wp_json_encode( array( 'error' => esc_html__( 'Something went wrong please try again.', 'buddypress-media' ) ) );
651
- }
652
- }
653
- die();
654
- }
655
-
656
- public function hide_encoding_notice() {
657
- update_site_option( 'rtmedia-encoding-service-notice', true );
658
- update_site_option( 'rtmedia-encoding-expansion-notice', true );
659
- echo true;
660
- die();
661
- }
662
-
663
- public function unsubscribe_encoding() {
664
- $unsubscribe_url = trailingslashit( $this->api_url ) . 'api/cancel/' . $this->api_key;
665
- $unsubscribe_page = wp_remote_post( $unsubscribe_url, array(
666
- 'timeout' => 120,
667
- 'body' => array( 'note' => sanitize_text_field( wp_unslash( $_GET['note'] ) ) ), // @codingStandardsIgnoreLine
668
- ) );
669
- if ( ! is_wp_error( $unsubscribe_page ) && ( ! isset( $unsubscribe_page['headers']['status'] ) || ( isset( $unsubscribe_page['headers']['status'] ) && ( 200 === $unsubscribe_page['headers']['status'] ) ) ) ) {
670
- $subscription_info = json_decode( $unsubscribe_page['body'] );
671
- if ( isset( $subscription_info->status ) && $subscription_info->status ) {
672
- echo wp_json_encode( array(
673
- 'updated' => esc_html__( 'Your subscription was cancelled successfully', 'buddypress-media' ),
674
- 'form' => $this->encoding_subscription_form( $_GET['plan'], $_GET['price'] ), // @codingStandardsIgnoreLine
675
- ) );
676
- }
677
- } else {
678
- echo wp_json_encode( array( 'error' => esc_html__( 'Something went wrong please try again.', 'buddypress-media' ) ) );
679
- }
680
- die();
681
- }
682
-
683
- public function enter_api_key() {
684
- if ( isset( $_GET['apikey'] ) && '' !== $_GET['apikey'] ) {
685
- echo wp_json_encode( array( 'apikey' => $_GET['apikey'] ) );
686
- } else {
687
- echo wp_json_encode( array( 'error' => esc_html__( 'Please enter the api key.', 'buddypress-media' ) ) );
688
- }
689
- die();
690
- }
691
-
692
- public function disable_encoding() {
693
- update_site_option( 'rtmedia-encoding-api-key', '' );
694
- esc_html_e( 'Encoding disabled successfully.', 'buddypress-media' );
695
- die();
696
- }
697
-
698
- function enable_encoding() {
699
- update_site_option( 'rtmedia-encoding-api-key', $this->stored_api_key );
700
- esc_html_e( 'Encoding enabled successfully.', 'buddypress-media' );
701
- die();
702
- }
703
-
704
- function upload_dir( $upload_dir ) {
705
- global $rtmedia_interaction, $rt_media_media;
706
- if ( isset( $this->uploaded['context'] ) && isset( $this->uploaded['context_id'] ) ) {
707
- if ( 'group' !== $this->uploaded['context'] ) {
708
- $rtmedia_upload_prefix = 'users/';
709
- $id = $this->uploaded['media_author'];
710
- } else {
711
- $rtmedia_upload_prefix = 'groups/';
712
- $id = $this->uploaded['context_id'];
713
- }
714
- } else {
715
- if ( 'group' !== $rtmedia_interaction->context->type ) {
716
- $rtmedia_upload_prefix = 'users/';
717
- $id = $this->uploaded['media_author'];
718
- } else {
719
- $rtmedia_upload_prefix = 'groups/';
720
- $id = $rtmedia_interaction->context->id;
721
- }
722
- }
723
-
724
- if ( ! $id ) {
725
- $id = $this->media_author;
726
- }
727
-
728
- $rtmedia_folder_name = apply_filters( 'rtmedia_upload_folder_name', 'rtMedia' );
729
-
730
- $upload_dir['path'] = trailingslashit( str_replace( $upload_dir['subdir'], '', $upload_dir['path'] ) )
731
- . $rtmedia_folder_name . '/' . $rtmedia_upload_prefix . $id . $upload_dir['subdir'];
732
- $upload_dir['url'] = trailingslashit( str_replace( $upload_dir['subdir'], '', $upload_dir['url'] ) )
733
- . $rtmedia_folder_name . '/' . $rtmedia_upload_prefix . $id
734
- . $upload_dir['subdir'];
735
-
736
- $upload_dir = apply_filters( 'rtmedia_filter_upload_dir', $upload_dir, $this->uploaded );
737
-
738
- return $upload_dir;
739
- }
740
-
741
- public function reencoding( $attachment, $autoformat = true ) {
742
- $rtmedia_model = new RTMediaModel();
743
- $media_array = $rtmedia_model->get( array( 'media_id' => $attachment ) );
744
- $media_id = $media_array[0]->id;
745
- $attached_file = get_post_meta( $attachment, '_wp_attached_file' );
746
- $upload_path = trim( get_option( 'upload_path' ) );
747
- if ( empty( $upload_path ) || 'wp-content/uploads' === $upload_path ) {
748
- $dir = WP_CONTENT_DIR . '/uploads';
749
- } elseif ( 0 !== strpos( $upload_path, ABSPATH ) ) {
750
- // $dir is absolute, $upload_path is (maybe) relative to ABSPATH
751
- $dir = path_join( ABSPATH, $upload_path );
752
- } else {
753
- $dir = $upload_path;
754
- }
755
- $file = trailingslashit( $dir ) . $attached_file[0];
756
- $url = wp_get_attachment_url( $attachment );
757
- $file_name_array = explode( '/', $url );
758
- $file_name = $file_name_array[ count( $file_name_array ) - 1 ];
759
- $file_object = array();
760
- $media_type = get_post_field( 'post_mime_type', $attachment );
761
- $media_type_array = explode( '/', $media_type );
762
- if ( 'video' === $media_type_array[0] ) {
763
- $file_object[] = array(
764
- 'file' => $file,
765
- 'url' => $url,
766
- 'name' => $file_name,
767
- 'type' => $media_type,
768
- );
769
- $this->encoding( array( $media_id ), $file_object, array(), $autoformat );
770
- }
771
- }
772
-
773
- function rtmedia_regenerate_thumbnails() {
774
- $this->reencoding( intval( $_REQUEST['rtreencoding'] ) );
775
- die();
776
- }
777
- }
778
-
779
- if ( isset( $_REQUEST['rtreencoding'] ) ) {
780
- $objRTMediaEncoding = new RTMediaEncoding( true );
781
- $objRTMediaEncoding->reencoding( intval( $_REQUEST['rtreencoding'] ) );
782
- }
index.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
4
Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
5
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!
6
- Version: 4.5.9
7
Author: rtCamp
8
Text Domain: buddypress-media
9
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
@@ -22,7 +22,7 @@ if ( ! defined( 'RTMEDIA_VERSION' ) ) {
22
* The version of the plugin
23
*
24
*/
25
- define( 'RTMEDIA_VERSION', '4.5.9' );
26
}
27
28
if ( ! defined( 'RTMEDIA_PATH' ) ) {
3
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
4
Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
5
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!
6
+ Version: 4.5.10
7
Author: rtCamp
8
Text Domain: buddypress-media
9
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
22
* The version of the plugin
23
*
24
*/
25
+ define( 'RTMEDIA_VERSION', '4.5.10' );
26
}
27
28
if ( ! defined( 'RTMEDIA_PATH' ) ) {
languages/buddypress-media.po CHANGED
@@ -2,9 +2,9 @@
2
# This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package.
3
msgid ""
4
msgstr ""
5
- "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.5.9\n"
6
"Report-Msgid-Bugs-To: https://rtmedia.io/support/\n"
7
- "POT-Creation-Date: 2019-10-29 08:18:31+00:00\n"
8
"MIME-Version: 1.0\n"
9
"Content-Type: text/plain; charset=utf-8\n"
10
"Content-Transfer-Encoding: 8bit\n"
@@ -2519,48 +2519,48 @@ msgstr ""
2519
msgid "I agree to"
2520
msgstr ""
2521
2522
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:463
2523
msgid "Media Files"
2524
msgstr ""
2525
2526
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:501
2527
#: app/main/controllers/media/RTMediaComment.php:175
2528
#: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:102
2529
#: app/main/controllers/template/rtmedia-functions.php:2132
2530
msgid "You are not allowed to upload/attach media."
2531
msgstr ""
2532
2533
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:636
2534
msgid "%s added a %s"
2535
msgstr ""
2536
2537
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:643
2538
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:645
2539
#: app/main/controllers/upload/RTMediaUploadEndpoint.php:229
2540
msgid "%s added %d %s"
2541
msgstr ""
2542
2543
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:698
2544
msgid "%1$s liked a %2$s in the group %3$s"
2545
msgstr ""
2546
2547
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:701
2548
msgid "%1$s liked their %2$s"
2549
msgstr ""
2550
2551
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:705
2552
msgid "%1$s liked %2$s's %3$s"
2553
msgstr ""
2554
2555
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:795
2556
msgid "%1$s commented on a %2$s in the group %3$s"
2557
msgstr ""
2558
2559
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:798
2560
msgid "%1$s commented on their %2$s"
2561
msgstr ""
2562
2563
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:802
2564
msgid "%1$s commented on %2$s's %3$s"
2565
msgstr ""
2566
2
# This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package.
3
msgid ""
4
msgstr ""
5
+ "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.5.10\n"
6
"Report-Msgid-Bugs-To: https://rtmedia.io/support/\n"
7
+ "POT-Creation-Date: 2019-12-20 10:04:47+00:00\n"
8
"MIME-Version: 1.0\n"
9
"Content-Type: text/plain; charset=utf-8\n"
10
"Content-Transfer-Encoding: 8bit\n"
2519
msgid "I agree to"
2520
msgstr ""
2521
2522
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:479
2523
msgid "Media Files"
2524
msgstr ""
2525
2526
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:517
2527
#: app/main/controllers/media/RTMediaComment.php:175
2528
#: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:102
2529
#: app/main/controllers/template/rtmedia-functions.php:2132
2530
msgid "You are not allowed to upload/attach media."
2531
msgstr ""
2532
2533
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:652
2534
msgid "%s added a %s"
2535
msgstr ""
2536
2537
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:659
2538
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:661
2539
#: app/main/controllers/upload/RTMediaUploadEndpoint.php:229
2540
msgid "%s added %d %s"
2541
msgstr ""
2542
2543
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:714
2544
msgid "%1$s liked a %2$s in the group %3$s"
2545
msgstr ""
2546
2547
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:717
2548
msgid "%1$s liked their %2$s"
2549
msgstr ""
2550
2551
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:721
2552
msgid "%1$s liked %2$s's %3$s"
2553
msgstr ""
2554
2555
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:811
2556
msgid "%1$s commented on a %2$s in the group %3$s"
2557
msgstr ""
2558
2559
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:814
2560
msgid "%1$s commented on their %2$s"
2561
msgstr ""
2562
2563
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:818
2564
msgid "%1$s commented on %2$s's %3$s"
2565
msgstr ""
2566
languages/rtmedia-ar_AR.mo DELETED
Binary file
languages/rtmedia-bg_BG.mo DELETED
Binary file
languages/rtmedia-da_DA.mo DELETED
Binary file
languages/rtmedia-da_DK.mo DELETED
Binary file
languages/rtmedia-de_DE.mo DELETED
Binary file
languages/rtmedia-es_ES.mo DELETED
Binary file
languages/rtmedia-fa_FA.mo DELETED
Binary file
languages/rtmedia-fa_IR.mo DELETED
Binary file
languages/rtmedia-fi_FI.mo DELETED
Binary file
languages/rtmedia-fr_FR.mo DELETED
Binary file
languages/rtmedia-hu_HU.mo DELETED
Binary file
languages/rtmedia-it_IT.mo DELETED
Binary file
languages/rtmedia-ja_JA.mo DELETED
Binary file
languages/rtmedia-ko_KO.mo DELETED
Binary file
languages/rtmedia-ko_KR.mo DELETED
Binary file
languages/rtmedia-nb_NO.mo DELETED
Binary file
languages/rtmedia-nl_NL.mo DELETED
Binary file
languages/rtmedia-pl_PL.mo DELETED
Binary file
languages/rtmedia-pt_BR.mo DELETED
Binary file
languages/rtmedia-ro_RO.mo DELETED
Binary file
languages/rtmedia-ru_RU.mo DELETED
Binary file
languages/rtmedia-sk_SK.mo DELETED
Binary file
languages/rtmedia-sr_RS.mo DELETED
Binary file
languages/rtmedia-sr_SR.mo DELETED
Binary file
languages/rtmedia-sv_SE.mo DELETED
Binary file
languages/rtmedia-sv_SV.mo DELETED
Binary file
languages/rtmedia-ta_IN.mo DELETED
Binary file
languages/rtmedia-ta_TA.mo DELETED
Binary file
languages/rtmedia-zh_CN.mo DELETED
Binary file
languages/rtmedia.mo DELETED
Binary file
languages/rtmedia.po DELETED
@@ -1,3207 +0,0 @@
1
- # Copyright (C) 2015 rtCamp
2
- # This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 3.8.14\n"
6
- "Report-Msgid-Bugs-To: http://community.rtcamp.com/c/rtmedia/\n"
7
- "POT-Creation-Date: 2015-08-31 16:38+0530\n"
8
- "PO-Revision-Date: 2015-08-31 16:38+0530\n"
9
- "Last-Translator: rtMedia <rtmedia@rtcamp.com>\n"
10
- "Language-Team: rtMedia <rtmedia@rtcamp.com>\n"
11
- "Language: en\n"
12
- "MIME-Version: 1.0\n"
13
- "Content-Type: text/plain; charset=utf-8\n"
14
- "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Poedit 1.5.4\n"
16
- "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
17
- "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
18
- "esc_html_x:1,2c\n"
19
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
- "X-Poedit-SourceCharset: UTF-8\n"
21
- "X-Poedit-Basepath: ../\n"
22
- "X-Textdomain-Support: yes\n"
23
- "X-Poedit-SearchPath-0: .\n"
24
-
25
- #: templates/media/album-gallery.php:14
26
- msgid "Album List"
27
- msgstr ""
28
-
29
- #: templates/media/album-gallery.php:56 templates/media/media-gallery.php:65
30
- #: app/admin/RTMediaFormHandler.php:285
31
- msgid "Load More"
32
- msgstr ""
33
-
34
- #: templates/media/album-gallery.php:64
35
- #: templates/media/media-single-edit.php:61
36
- #: templates/media/media-single.php:146
37
- msgid "Sorry !! There's no media found for the request !!"
38
- msgstr ""
39
-
40
- #: templates/media/media-gallery.php:9 templates/media/media-gallery.php:25
41
- msgid "Media Gallery"
42
- msgstr ""
43
-
44
- #: templates/media/media-gallery.php:73
45
- msgid "Oops !! There's no media found for the request !!"
46
- msgstr ""
47
-
48
- #: templates/media/media-single-edit.php:8 app/main/RTMedia.php:923
49
- msgid "Edit Media"
50
- msgstr ""
51
-
52
- #: templates/media/media-single-edit.php:16
53
- #: templates/media/album-single-edit.php:16 app/helper/RTMediaSupport.php:447
54
- msgid "Details"
55
- msgstr ""
56
-
57
- #: templates/media/media-single-edit.php:26
58
- #: templates/media/album-single-edit.php:32
59
- msgid "Title : "
60
- msgstr ""
61
-
62
- #: templates/media/media-single-edit.php:32
63
- #: templates/media/album-single-edit.php:37
64
- msgid "Description: "
65
- msgstr ""
66
-
67
- #: templates/media/media-single-edit.php:46
68
- msgid "Save"
69
- msgstr ""
70
-
71
- #: templates/media/media-single-edit.php:47
72
- #: templates/media/album-single-edit.php:48
73
- msgid "Back"
74
- msgstr ""
75
-
76
- #: templates/media/media-single-edit.php:54
77
- msgid "Sorry !! You do not have rights to edit this media"
78
- msgstr ""
79
-
80
- #: templates/media/media-single.php:35
81
- msgid "under"
82
- msgstr ""
83
-
84
- #: templates/media/media-single.php:82 templates/media/media-single.php:122
85
- #: app/main/controllers/template/rt-template-functions.php:1435
86
- msgid "Comment"
87
- msgstr ""
88
-
89
- #: templates/media/album-single-edit.php:12
90
- msgid "Edit Album : "
91
- msgstr ""
92
-
93
- #: templates/media/album-single-edit.php:18
94
- msgid "Manage Media"
95
- msgstr ""
96
-
97
- #: templates/media/album-single-edit.php:47
98
- #: app/main/controllers/privacy/RTMediaPrivacy.php:277
99
- #: app/main/controllers/group/RTMediaGroupExtension.php:113
100
- msgid "Save Changes"
101
- msgstr ""
102
-
103
- #: templates/media/album-single-edit.php:62 app/main/RTMedia.php:911
104
- msgid "Select All Visible"
105
- msgstr ""
106
-
107
- #: templates/media/album-single-edit.php:63
108
- msgid "Move Selected media to another album."
109
- msgstr ""
110
-
111
- #: templates/media/album-single-edit.php:63
112
- msgid "Move"
113
- msgstr ""
114
-
115
- #: templates/media/album-single-edit.php:65
116
- msgid "Delete Selected media from the album."
117
- msgstr ""
118
-
119
- #: templates/media/album-single-edit.php:65 app/main/RTMedia.php:922
120
- #: app/main/controllers/media/RTMediaGalleryItemAction.php:64
121
- #: app/main/controllers/media/RTMediaGalleryItemAction.php:80
122
- #: app/main/controllers/template/rt-template-functions.php:1471
123
- #: app/main/controllers/template/rt-template-functions.php:1478
124
- msgid "Delete"
125
- msgstr ""
126
-
127
- #: templates/media/album-single-edit.php:70
128
- msgid "Move selected media to the album : "
129
- msgstr ""
130
-
131
- #: templates/media/album-single-edit.php:72
132
- msgid "Move Selected"
133
- msgstr ""
134
-
135
- #: templates/media/album-single-edit.php:94
136
- msgid "Prev"
137
- msgstr ""
138
-
139
- #: templates/media/album-single-edit.php:103
140
- msgid "Next"
141
- msgstr ""
142
-
143
- #: templates/media/album-single-edit.php:106
144
- msgid "The album is empty."
145
- msgstr ""
146
-
147
- #: templates/media/album-single-edit.php:116
148
- msgid "Sorry !! You can not edit this album."
149
- msgstr ""
150
-
151
- #: app/main/RTMedia.php:302
152
- msgid "Photo"
153
- msgstr ""
154
-
155
- #: app/main/RTMedia.php:303
156
- msgid "Photos"
157
- msgstr ""
158
-
159
- #: app/main/RTMedia.php:311
160
- msgid "Video"
161
- msgstr ""
162
-
163
- #: app/main/RTMedia.php:312
164
- msgid "Videos"
165
- msgstr ""
166
-
167
- #: app/main/RTMedia.php:320 app/main/RTMedia.php:321
168
- msgid "Music"
169
- msgstr ""
170
-
171
- #: app/main/RTMedia.php:408
172
- msgid "Private - Visible only to the user"
173
- msgstr ""
174
-
175
- #: app/main/RTMedia.php:409
176
- msgid "Friends - Visible to user's friends"
177
- msgstr ""
178
-
179
- #: app/main/RTMedia.php:410
180
- msgid "Logged in Users - Visible to registered users"
181
- msgstr ""
182
-
183
- #: app/main/RTMedia.php:411
184
- msgid "Public - Visible to the world"
185
- msgstr ""
186
-
187
- #: app/main/RTMedia.php:562 app/importers/BPMediaAlbumimporter.php:90
188
- msgid "Media"
189
- msgstr ""
190
-
191
- #: app/main/RTMedia.php:568 app/main/controllers/template/RTMediaNav.php:176
192
- #: app/main/controllers/template/rt-template-functions.php:83
193
- msgid "All"
194
- msgstr ""
195
-
196
- #: app/main/RTMedia.php:577
197
- #: app/main/controllers/upload/RTMediaUploadView.php:51
198
- #: app/main/controllers/upload/RTMediaUploadView.php:54
199
- #: app/main/controllers/media/RTMediaAlbum.php:49
200
- #: app/main/controllers/template/rt-template-functions.php:1391
201
- msgid "Album"
202
- msgstr ""
203
-
204
- #: app/main/RTMedia.php:580 app/main/controllers/media/RTMediaAlbum.php:48
205
- #: app/main/controllers/media/RTMediaAlbum.php:60
206
- #: app/main/controllers/template/RTMediaNav.php:197
207
- msgid "Albums"
208
- msgstr ""
209
-
210
- #: app/main/RTMedia.php:588
211
- #: app/main/controllers/media/RTMediaLoginPopup.php:38
212
- #: app/main/controllers/template/rt-template-functions.php:2160
213
- #: app/main/controllers/template/rt-template-functions.php:2164
214
- msgid "Upload"
215
- msgstr ""
216
-
217
- #: app/main/RTMedia.php:592
218
- msgid "Wall Post"
219
- msgstr ""
220
-
221
- #: app/main/RTMedia.php:803 app/main/RTMedia.php:812
222
- msgid "Wall Posts"
223
- msgstr ""
224
-
225
- #: app/main/RTMedia.php:855
226
- msgid ": Can't Create Database table. Please check create table permission."
227
- msgstr ""
228
-
229
- #: app/main/RTMedia.php:899
230
- msgid "Loading media"
231
- msgstr ""
232
-
233
- #: app/main/RTMedia.php:900
234
- msgid "Please enter some content to post."
235
- msgstr ""
236
-
237
- #: app/main/RTMedia.php:901
238
- msgid "Empty Comment is not allowed."
239
- msgstr ""
240
-
241
- #: app/main/RTMedia.php:902
242
- msgid "Are you sure you want to delete this media?"
243
- msgstr ""
244
-
245
- #: app/main/RTMedia.php:903
246
- msgid "Are you sure you want to delete this comment?"
247
- msgstr ""
248
-
249
- #: app/main/RTMedia.php:904
250
- msgid "Are you sure you want to delete this Album?"
251
- msgstr ""
252
-
253
- #: app/main/RTMedia.php:905
254
- msgid "Drop files here"
255
- msgstr ""
256
-
257
- #: app/main/RTMedia.php:906
258
- msgid "album created successfully."
259
- msgstr ""
260
-
261
- #: app/main/RTMedia.php:907
262
- msgid "Something went wrong. Please try again."
263
- msgstr ""
264
-
265
- #: app/main/RTMedia.php:908
266
- msgid "Enter an album name."
267
- msgstr ""
268
-
269
- #: app/main/RTMedia.php:909
270
- msgid "Max file Size Limit : "
271
- msgstr ""
272
-
273
- #: app/main/RTMedia.php:910
274
- msgid "Allowed File Formats"
275
- msgstr ""
276
-
277
- #: app/main/RTMedia.php:912
278
- msgid "Unselect All Visible"
279
- msgstr ""
280
-
281
- #: app/main/RTMedia.php:913
282
- msgid "Please select some media."
283
- msgstr ""
284
-
285
- #: app/main/RTMedia.php:914
286
- msgid "Are you sure you want to delete the selected media?"
287
- msgstr ""
288
-
289
- #: app/main/RTMedia.php:915
290
- msgid "Are you sure you want to move the selected media?"
291
- msgstr ""
292
-
293
- #: app/main/RTMedia.php:916
294
- msgid "Waiting"
295
- msgstr ""
296
-
297
- #: app/main/RTMedia.php:917
298
- msgid "Uploaded"
299
- msgstr ""
300
-
301
- #: app/main/RTMedia.php:918
302
- msgid "Uploading"
303
- msgstr ""
304
-
305
- #: app/main/RTMedia.php:919
306
- msgid "Failed"
307
- msgstr ""
308
-
309
- #: app/main/RTMedia.php:920
310
- msgid "Close"
311
- msgstr ""
312
-
313
- #: app/main/RTMedia.php:921
314
- #: app/main/controllers/media/RTMediaGalleryItemAction.php:61
315
- #: app/main/controllers/media/RTMediaGalleryItemAction.php:80
316
- #: app/main/controllers/template/rt-template-functions.php:733
317
- #: app/main/controllers/template/rt-template-functions.php:754
318
- msgid "Edit"
319
- msgstr ""
320
-
321
- #: app/main/RTMedia.php:924
322
- msgid "Remove from queue"
323
- msgstr ""
324
-
325
- #: app/main/RTMedia.php:925
326
- msgid "Add more files"
327
- msgstr ""
328
-
329
- #: app/main/RTMedia.php:926
330
- msgid "File not supported"
331
- msgstr ""
332
-
333
- #: app/main/RTMedia.php:927
334
- msgid "more"
335
- msgstr ""
336
-
337
- #: app/main/RTMedia.php:928
338
- msgid "less"
339
- msgstr ""
340
-
341
- #: app/main/RTMedia.php:929
342
- msgid "This media is uploaded. Are you sure you want to delete this media?"
343
- msgstr ""
344
-
345
- #: app/main/RTMedia.php:937
346
- msgid "Featured media set successfully."
347
- msgstr ""
348
-
349
- #: app/main/RTMedia.php:938
350
- msgid "Featured media removed successfully."
351
- msgstr ""
352
-
353
- #: app/main/RTMedia.php:975
354
- msgid "There are some uploads in progress. Do you want to cancel them?"
355
- msgstr ""
356
-
357
- #: app/main/controllers/api/RTMediaJsonApi.php:166
358
- msgid "username/password empty"
359
- msgstr ""
360
-
361
- #: app/main/controllers/api/RTMediaJsonApi.php:169
362
- msgid "incorrect username"
363
- msgstr ""
364
-
365
- #: app/main/controllers/api/RTMediaJsonApi.php:172
366
- msgid "incorrect password"
367
- msgstr ""
368
-
369
- #: app/main/controllers/api/RTMediaJsonApi.php:175
370
- msgid "login success"
371
- msgstr ""
372
-
373
- #: app/main/controllers/api/RTMediaJsonApi.php:221
374
- msgid "fields empty"
375
- msgstr ""
376
-
377
- #: app/main/controllers/api/RTMediaJsonApi.php:224
378
- msgid "invalid email"
379
- msgstr ""
380
-
381
- #: app/main/controllers/api/RTMediaJsonApi.php:227
382
- msgid "password do not match"
383
- msgstr ""
384
-
385
- #: app/main/controllers/api/RTMediaJsonApi.php:230
386
- msgid "username already registered"
387
- msgstr ""
388
-
389
- #: app/main/controllers/api/RTMediaJsonApi.php:233
390
- msgid "email already exists"
391
- msgstr ""
392
-
393
- #: app/main/controllers/api/RTMediaJsonApi.php:236
394
- msgid "new user created"
395
-