Skip to content

Commit

Permalink
Merge pull request #1995 from rtCamp/develop
Browse files Browse the repository at this point in the history
New release v4.6.14
  • Loading branch information
pooja-muchandikar authored Aug 11, 2023
2 parents 9ce84b8 + b957e2f commit cba428e
Show file tree
Hide file tree
Showing 62 changed files with 1,096 additions and 2,683 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & mor
![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=MU1JamdmRnppK0hhQy9QMU8wdDJ2MUEyb1ZuS0ljVFQvSHZ6anFvNzUxTT0tLXhUNnliTnZGcE5CcW93N0I1eXdnM3c9PQ==--8c124e667dd0c317618efde1bed2b260000916b6)


* **Contributors:** [rtcamp](http://profiles.wordpress.org/rtcamp), [mangeshp](http://profiles.wordpress.org/mangeshp), [sanket.parmar](http://profiles.wordpress.org/sanket.parmar), [pranalipatel](http://profiles.wordpress.org/pranalipatel), [jignesh.nakrani](http://profiles.wordpress.org/jignesh.nakrani), [manishsongirkar36](http://profiles.wordpress.org/manishsongirkar36), [kiranpotphode](http://profiles.wordpress.org/kiranpotphode), [yahil](http://profiles.wordpress.org/yahil), [1naveengiri](http://profiles.wordpress.org/1naveengiri), [bhargavbhandari90](http://profiles.wordpress.org/bhargavbhandari90), [deepak1191](http://profiles.wordpress.org/deepak1191), [rittesh.patel](http://profiles.wordpress.org/rittesh.patel), [sagarjadhav](http://profiles.wordpress.org/sagarjadhav), [pushpak.pop](http://profiles.wordpress.org/pushpak.pop), [faishal](http://profiles.wordpress.org/faishal), [desaiuditd](http://profiles.wordpress.org/desaiuditd), [rahul286](http://profiles.wordpress.org/rahul286), [JoshuaAbenazer](http://profiles.wordpress.org/JoshuaAbenazer), [gagan0123](http://profiles.wordpress.org/gagan0123), [saurabhshukla](http://profiles.wordpress.org/saurabhshukla), [nitun.lanjewar](http://profiles.wordpress.org/nitun.lanjewar), [umesh.nevase](http://profiles.wordpress.org/umesh.nevase), [suhasgirgaonkar](http://profiles.wordpress.org/suhasgirgaonkar), [neerukoul](http://profiles.wordpress.org/neerukoul), [hrishiv90](http://profiles.wordpress.org/hrishiv90), [kanakiyajay](http://profiles.wordpress.org/kanakiyajay), [jarretc](http://profiles.wordpress.org/jarretc), [tobiaskluge](http://profiles.wordpress.org/tobiaskluge), [rafaelfunchal](http://profiles.wordpress.org/rafaelfunchal), [UmeshSingla](http://profiles.wordpress.org/UmeshSingla), [mehulkaklotar](http://profiles.wordpress.org/mehulkaklotar), [tannermirabel](http://profiles.wordpress.org/tannermirabel), [kishores](http://profiles.wordpress.org/kishores), [chandrapatel](http://profiles.wordpress.org/chandrapatel), [rahul3883](http://profiles.wordpress.org/rahul3883/), [nomnom99](http://profiles.wordpress.org/nomnom99), [sayanchakraborty](https://profiles.wordpress.org/sayanchakraborty), [milindmore22](https://profiles.wordpress.org/milindmore22), [thrijith](https://profiles.wordpress.org/thrijith), [abhijitrakas](https://profiles.wordpress.org/abhijitrakas), [sid177](https://profiles.wordpress.org/sid177), [montu3366](https://profiles.wordpress.org/montu3366), [jashwini](https://profiles.wordpress.org/jashwini), [juhise](https://profiles.wordpress.org/juhise), [ravatparmar](https://profiles.wordpress.org/ravatparmar), [dharmin16](https://profiles.wordpress.org/dharmin16), [malavvasita](https://profiles.wordpress.org/malavvasita), [pooja1210](https://profiles.wordpress.org/pooja1210), [krupajnanda](https://profiles.wordpress.org/krupajnanda), [kanumalivad](https://profiles.wordpress.org/kanumalivad), [surajkumarsingh](https://profiles.wordpress.org/surajkumarsingh), [dishitpala](https://profiles.wordpress.org/dishitpala), [shobhit2412](https://profiles.wordpress.org/shobhit2412/), [vkd007](https://profiles.wordpress.org/vkd007/), [vaishu.agola27](https://profiles.wordpress.org/vaishuagola27/), [kapilpaul](https://profiles.wordpress.org/kapilpaul/), [opurockey](https://profiles.wordpress.org/opurockey/), [pavanpatil1](https://profiles.wordpress.org/pavanpatil1/), [pradeep1308](https://profiles.wordpress.org/pradeep1308/), [shardul200](https://profiles.wordpress.org/shardul200/), [ibnulk](https://profiles.wordpress.org/ibnulk/), [sabbir1991](https://profiles.wordpress.org/sabbir1991/), [kamalahmed](https://profiles.wordpress.org/kamalahmed/), [harshbarach](https://profiles.wordpress.org/harshbarach/), [mukulsingh27](https://profiles.wordpress.org/mukulsingh27/), [vishalkakadiya](https://profiles.wordpress.org/vishalkakadiya/), [elifvish](https://profiles.wordpress.org/elifvish/)
* **Contributors:** [rtcamp](http://profiles.wordpress.org/rtcamp), [mangeshp](http://profiles.wordpress.org/mangeshp), [sanket.parmar](http://profiles.wordpress.org/sanket.parmar), [pranalipatel](http://profiles.wordpress.org/pranalipatel), [jignesh.nakrani](http://profiles.wordpress.org/jignesh.nakrani), [manishsongirkar36](http://profiles.wordpress.org/manishsongirkar36), [kiranpotphode](http://profiles.wordpress.org/kiranpotphode), [yahil](http://profiles.wordpress.org/yahil), [1naveengiri](http://profiles.wordpress.org/1naveengiri), [bhargavbhandari90](http://profiles.wordpress.org/bhargavbhandari90), [deepak1191](http://profiles.wordpress.org/deepak1191), [rittesh.patel](http://profiles.wordpress.org/rittesh.patel), [sagarjadhav](http://profiles.wordpress.org/sagarjadhav), [pushpak.pop](http://profiles.wordpress.org/pushpak.pop), [faishal](http://profiles.wordpress.org/faishal), [desaiuditd](http://profiles.wordpress.org/desaiuditd), [rahul286](http://profiles.wordpress.org/rahul286), [JoshuaAbenazer](http://profiles.wordpress.org/JoshuaAbenazer), [gagan0123](http://profiles.wordpress.org/gagan0123), [saurabhshukla](http://profiles.wordpress.org/saurabhshukla), [nitun.lanjewar](http://profiles.wordpress.org/nitun.lanjewar), [umesh.nevase](http://profiles.wordpress.org/umesh.nevase), [suhasgirgaonkar](http://profiles.wordpress.org/suhasgirgaonkar), [neerukoul](http://profiles.wordpress.org/neerukoul), [hrishiv90](http://profiles.wordpress.org/hrishiv90), [kanakiyajay](http://profiles.wordpress.org/kanakiyajay), [jarretc](http://profiles.wordpress.org/jarretc), [tobiaskluge](http://profiles.wordpress.org/tobiaskluge), [rafaelfunchal](http://profiles.wordpress.org/rafaelfunchal), [UmeshSingla](http://profiles.wordpress.org/UmeshSingla), [mehulkaklotar](http://profiles.wordpress.org/mehulkaklotar), [tannermirabel](http://profiles.wordpress.org/tannermirabel), [kishores](http://profiles.wordpress.org/kishores), [chandrapatel](http://profiles.wordpress.org/chandrapatel), [rahul3883](http://profiles.wordpress.org/rahul3883/), [nomnom99](http://profiles.wordpress.org/nomnom99), [sayanchakraborty](https://profiles.wordpress.org/sayanchakraborty), [milindmore22](https://profiles.wordpress.org/milindmore22), [thrijith](https://profiles.wordpress.org/thrijith), [abhijitrakas](https://profiles.wordpress.org/abhijitrakas), [sid177](https://profiles.wordpress.org/sid177), [montu3366](https://profiles.wordpress.org/montu3366), [jashwini](https://profiles.wordpress.org/jashwini), [juhise](https://profiles.wordpress.org/juhise), [ravatparmar](https://profiles.wordpress.org/ravatparmar), [dharmin16](https://profiles.wordpress.org/dharmin16), [malavvasita](https://profiles.wordpress.org/malavvasita), [pooja1210](https://profiles.wordpress.org/pooja1210), [krupajnanda](https://profiles.wordpress.org/krupajnanda), [kanumalivad](https://profiles.wordpress.org/kanumalivad), [surajkumarsingh](https://profiles.wordpress.org/surajkumarsingh), [dishitpala](https://profiles.wordpress.org/dishitpala), [shobhit2412](https://profiles.wordpress.org/shobhit2412/), [vkd007](https://profiles.wordpress.org/vkd007/), [vaishu.agola27](https://profiles.wordpress.org/vaishuagola27/), [kapilpaul](https://profiles.wordpress.org/kapilpaul/), [opurockey](https://profiles.wordpress.org/opurockey/), [pavanpatil1](https://profiles.wordpress.org/pavanpatil1/), [pradeep1308](https://profiles.wordpress.org/pradeep1308/), [shardul200](https://profiles.wordpress.org/shardul200/), [ibnulk](https://profiles.wordpress.org/ibnulk/), [sabbir1991](https://profiles.wordpress.org/sabbir1991/), [kamalahmed](https://profiles.wordpress.org/kamalahmed/), [harshbarach](https://profiles.wordpress.org/harshbarach/), [mukulsingh27](https://profiles.wordpress.org/mukulsingh27/), [vishalkakadiya](https://profiles.wordpress.org/vishalkakadiya/), [elifvish](https://profiles.wordpress.org/elifvish/), [krupajnanda](https://profiles.wordpress.org/krupajnanda/), [utsavladani](https://profiles.wordpress.org/utsavladani/)


* **License:** [GPL v2 or later]( http://www.gnu.org/licenses/gpl-2.0.html)
Expand Down Expand Up @@ -152,6 +152,22 @@ https://www.youtube.com/watch?v=dJrykKQGDcs

## Changelog ##

### 4.6.14 [August 11, 2023] ###

* Enhancement

* Add an Emoji picker in the media comment box.
* Add plugin deactivation survey form when the user deactivates the plugin.
* Compatible with WordPress's latest version 6.3
* Compatible with PHP 8.2.8

* Fixed

* Fixed thumbnail height of the media.
* Add an appropriate error message when a user tries to upload a file with an unsupported type or larger size.
* Fixed other error messages and typos.


### 4.6.13 [December 12, 2022] ###

* Enhancement
Expand Down
22 changes: 11 additions & 11 deletions app/admin/RTMediaAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public function rtm_admin_templates() {
echo '</script>';
}

$page_name = sanitize_text_field( filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING ) );
$page_name = sanitize_text_field( filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS ) );

if ( ! empty( $page_name ) && 'rtmedia-settings' === $page_name ) {
/**
Expand Down Expand Up @@ -569,7 +569,7 @@ public function add_dashboard_widgets() {
$sorted_dashboard = array_merge( $example_widget_backup, $normal_dashboard );

// Save the sorted array back into the original metaboxes.
$wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
$wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited, WordPress.WP.GlobalVariablesOverride.Prohibited
}

/**
Expand Down Expand Up @@ -1030,7 +1030,7 @@ public function license_page() {
* @return string
*/
public static function get_current_tab() {
$page_name = sanitize_text_field( filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING ) );
$page_name = sanitize_text_field( filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS ) );
return isset( $page_name ) ? $page_name : 'rtmedia-settings';
}

Expand Down Expand Up @@ -1324,7 +1324,7 @@ public function settings_sub_tabs() {
*/
public function save_multisite_options() {
global $rtmedia_admin;
do_action( 'rtmedia_sanitize_settings', wp_unslash( $_POST ) ); // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification
do_action( 'rtmedia_sanitize_settings', wp_unslash( $_POST ) ); // phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification, WordPress.Security.NonceVerification.Missing

$rtmedia_options = filter_input( INPUT_POST, 'rtmedia_options' );
if ( isset( $rtmedia_options ) ) {
Expand Down Expand Up @@ -1479,8 +1479,8 @@ public function import_settings( $file_path ) {
*/
public function convert_videos_mailchimp_send() {
// todo: nonce required.
$interested = sanitize_text_field( filter_input( INPUT_POST, 'linkback', FILTER_SANITIZE_STRING ) );
$choice = sanitize_text_field( filter_input( INPUT_POST, 'choice', FILTER_SANITIZE_STRING ) );
$interested = sanitize_text_field( filter_input( INPUT_POST, 'linkback', FILTER_SANITIZE_FULL_SPECIAL_CHARS ) );
$choice = sanitize_text_field( filter_input( INPUT_POST, 'choice', FILTER_SANITIZE_FULL_SPECIAL_CHARS ) );
$url = filter_input( INPUT_POST, 'url', FILTER_SANITIZE_URL );
$email = filter_input( INPUT_POST, 'email', FILTER_SANITIZE_EMAIL );

Expand Down Expand Up @@ -1510,7 +1510,7 @@ public function convert_videos_mailchimp_send() {
* Function to save Video transcoding survey response.
*/
public function video_transcoding_survey_response() {
$survey_done = filter_input( INPUT_GET, 'survey-done', FILTER_SANITIZE_STRING );
$survey_done = filter_input( INPUT_GET, 'survey-done', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
if ( isset( $survey_done ) && ( md5( 'survey-done' ) === $survey_done ) ) {
rtmedia_update_site_option( 'rtmedia-survey', 0 );
}
Expand Down Expand Up @@ -1655,7 +1655,7 @@ public static function render_admin_ui( $page_name, $sub_tabs, $args = array() )
* @return array $removable_query_args
*/
public function removable_query_args( $removable_query_args ) {
$page_name = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING );
$page_name = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
if ( isset( $page_name ) && 'rtmedia-settings' === $page_name ) {
$removable_query_args[] = 'settings-saved';
}
Expand All @@ -1672,7 +1672,7 @@ public function removable_query_args( $removable_query_args ) {
*/
public function rtm_addon_license_notice() {

$page_name = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_STRING );
$page_name = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
$args = array(
'a' => array(
'href' => array(),
Expand All @@ -1683,12 +1683,12 @@ public function rtm_addon_license_notice() {
$my_account = 'https://rtmedia.io/my-account';
$license_doc = 'https://rtmedia.io/docs/license/';

// translators: 1. Account page and link.
$message = sprintf(
/* translators: 1$s: Account page and link. 2$s: License documentation page link. */
__( 'Your license keys can be found on <a href="%1$s">my-account</a> page. For more details, please refer to <a href="%2$s">License documentation</a> page.', 'buddypress-media' ),
$my_account,
$license_doc
);
); // phpcs:ignore WordPress.WP.I18n.MissingTranslatorsComment

printf( '<div class="notice"><p>%1$s</p></div>', wp_kses( $message, $args ) );

Expand Down
10 changes: 5 additions & 5 deletions app/admin/templates/dashboard-widgets/right-now.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
global $wpdb;
$results = wp_cache_get( 'rt-stats', 'rt-dashboard' );
if ( false === $results ) {
$results = $wpdb->get_results( $wpdb->prepare( "select media_type, count(id) as count from {$rtmedia_model->table_name} where blog_id=%d group by media_type", get_current_blog_id() ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$results = $wpdb->get_results( $wpdb->prepare( "select media_type, count(id) as count from {$rtmedia_model->table_name} where blog_id=%d group by media_type", get_current_blog_id() ) );
wp_cache_set( 'stats', $results, 'rt-dashboard', HOUR_IN_SECONDS );
}
if ( $results ) {
Expand Down Expand Up @@ -58,7 +58,7 @@
<?php
$with_media_count = wp_cache_get( 'with_media', 'rt-dashboard' );
if ( false === $with_media_count ) {
$with_media_count = $wpdb->get_var( "select count(distinct media_author) from {$rtmedia_model->table_name}" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$with_media_count = $wpdb->get_var( "select count(distinct media_author) from {$rtmedia_model->table_name}" );
wp_cache_set( 'with_media', $with_media_count, 'rt-dashboard', HOUR_IN_SECONDS );
}
?>
Expand All @@ -67,9 +67,9 @@
<td class="t"><?php esc_html_e( 'With Media', 'buddypress-media' ); ?></td>
</tr>
<?php
$comments = wp_cache_get( 'comments', 'rt-dashboard' );
$comments = wp_cache_get( 'comments', 'rt-dashboard' ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
if ( false === $comments ) {
$comments = $wpdb->get_var( "select count(*) from {$wpdb->comments} where comment_post_ID in ( select media_id from {$rtmedia_model->table_name} )" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$comments = $wpdb->get_var( "select count(*) from {$wpdb->comments} where comment_post_ID in ( select media_id from {$rtmedia_model->table_name} )" ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
wp_cache_set( 'comments', $comments, 'rt-dashboard', HOUR_IN_SECONDS );
}
?>
Expand All @@ -80,7 +80,7 @@
<?php
$likes = wp_cache_get( 'likes', 'rt-dashboard' );
if ( false === $likes ) {
$likes = $wpdb->get_var( "select sum(likes) from {$rtmedia_model->table_name}" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
$likes = $wpdb->get_var( "select sum(likes) from {$rtmedia_model->table_name}" );
wp_cache_set( 'likes', $likes, 'rt-dashboard', HOUR_IN_SECONDS );
}
?>
Expand Down
25 changes: 13 additions & 12 deletions app/admin/templates/notices/addon-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<div class="notice error is-dismissible rtmedia-addon-update-notice">
<p>
<?php
$message = apply_filters( 'rt_addon_update_notice', sprintf( __( ' rtMedia Premium update is available. Please update it from the plugins or download it from <a href = "https://rtmedia.io/my-account/" target="_blank" >your account</a>', 'buddypress-media' ) ) ); ?>
$message = apply_filters( 'rt_addon_update_notice', sprintf( __( ' rtMedia Premium update is available. Please update it from the plugins or download it from <a href = "https://rtmedia.io/my-account/" target="_blank" >your account</a>', 'buddypress-media' ) ) );
?>
<b><?php esc_html_e( 'rtMedia: ', 'buddypress-media' ); ?></b>
<?php
echo wp_kses(
Expand All @@ -27,15 +28,15 @@
</p>
</div>
<script type="text/javascript">
jQuery( document ).ready( function() {
jQuery( '.rtmedia-addon-update-notice.is-dismissible' ).on( 'click', '.notice-dismiss', function() {
var data = {
action: 'rtmedia_hide_addon_update_notice',
_rtm_nonce: jQuery('#rtmedia-addon-notice').val(),
};
jQuery.post(ajaxurl, data, function (response) {
jQuery('.rtmedia-addon-update-notice').remove();
});
});
});
jQuery( document ).ready( function() {
jQuery( '.rtmedia-addon-update-notice.is-dismissible' ).on( 'click', '.notice-dismiss', function() {
var data = {
action: 'rtmedia_hide_addon_update_notice',
_rtm_nonce: jQuery('#rtmedia-addon-notice').val(),
};
jQuery.post(ajaxurl, data, function (response) {
jQuery('.rtmedia-addon-update-notice').remove();
});
});
});
</script>
22 changes: 11 additions & 11 deletions app/admin/templates/notices/inspirebook-release.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
</div>

<script type="text/javascript">
jQuery( document ).ready( function() {
jQuery( '.rtmedia-inspire-book-notice.is-dismissible' ).on( 'click', '.notice-dismiss', function() {
var data = {
action: 'rtmedia_hide_inspirebook_release_notice',
_rtm_nonce: jQuery('#rtmedia_hide_inspirebook_nonce').val()
};
jQuery.post( ajaxurl, data, function ( response ) {
jQuery('.rtmedia-inspire-book-notice').remove();
});
});
});
jQuery( document ).ready( function() {
jQuery( '.rtmedia-inspire-book-notice.is-dismissible' ).on( 'click', '.notice-dismiss', function() {
var data = {
action: 'rtmedia_hide_inspirebook_release_notice',
_rtm_nonce: jQuery('#rtmedia_hide_inspirebook_nonce').val()
};
jQuery.post( ajaxurl, data, function ( response ) {
jQuery('.rtmedia-inspire-book-notice').remove();
});
});
});
</script>
18 changes: 9 additions & 9 deletions app/admin/templates/notices/premium-addon.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<?php
$product_page = esc_url( 'https://rtmedia.io/products/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media' );

// translators: 1. Product page link.
$message = apply_filters(
'rt_premium_addon_notice_message',
sprintf(
/* translators: %s: Product page link. */
__( 'Check 30+ premium rtMedia add-ons on our <a href="%s">store</a>.', 'buddypress-media' ),
$product_page
),
Expand All @@ -31,12 +31,12 @@
</div>

<script type="text/javascript">
jQuery( document ).ready( function() {
jQuery( '.rtmedia-pro-split-notice.is-dismissible' ).on( 'click', '.notice-dismiss', function() {
var data = {action: 'rtmedia_hide_premium_addon_notice', _rtm_nonce: jQuery('#rtm_nonce').val() };
jQuery.post( ajaxurl, data, function ( response ) {
jQuery('.rtmedia-pro-split-notice').remove();
});
});
});
jQuery( document ).ready( function() {
jQuery( '.rtmedia-pro-split-notice.is-dismissible' ).on( 'click', '.notice-dismiss', function() {
var data = {action: 'rtmedia_hide_premium_addon_notice', _rtm_nonce: jQuery('#rtm_nonce').val() };
jQuery.post( ajaxurl, data, function ( response ) {
jQuery('.rtmedia-pro-split-notice').remove();
});
});
});
</script>
Loading

0 comments on commit cba428e

Please sign in to comment.