Changeset 3450325
- Timestamp:
- 01/30/2026 10:11:50 AM (5 weeks ago)
- Location:
- buddypress-media
- Files:
-
- 2 added
- 18 edited
- 1 copied
-
tags/4.7.9 (copied) (copied from buddypress-media/trunk)
-
tags/4.7.9/.github/dependabot.yml (added)
-
tags/4.7.9/.github/workflows/create.yml (modified) (1 diff)
-
tags/4.7.9/.github/workflows/phpcs_on_pull_request.yml (modified) (1 diff)
-
tags/4.7.9/.github/workflows/playwright.yml (modified) (2 diffs)
-
tags/4.7.9/app/admin/RTMediaUploadTermsAdmin.php (modified) (2 diffs)
-
tags/4.7.9/changelog.txt (modified) (1 diff)
-
tags/4.7.9/index.php (modified) (2 diffs)
-
tags/4.7.9/languages/buddpress-media.pot (modified) (4 diffs)
-
tags/4.7.9/readme.txt (modified) (2 diffs)
-
tags/4.7.9/templates/media/godam-integration.php (modified) (5 diffs)
-
trunk/.github/dependabot.yml (added)
-
trunk/.github/workflows/create.yml (modified) (1 diff)
-
trunk/.github/workflows/phpcs_on_pull_request.yml (modified) (1 diff)
-
trunk/.github/workflows/playwright.yml (modified) (2 diffs)
-
trunk/app/admin/RTMediaUploadTermsAdmin.php (modified) (2 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/index.php (modified) (2 diffs)
-
trunk/languages/buddpress-media.pot (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/media/godam-integration.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
buddypress-media/tags/4.7.9/.github/workflows/create.yml
r3433318 r3450325 12 12 runs-on: ubuntu-latest 13 13 steps: 14 - uses: actions/checkout@v 414 - uses: actions/checkout@v 15 15 - name: Install SVN ( Subversion ) 16 16 run: | -
buddypress-media/tags/4.7.9/.github/workflows/phpcs_on_pull_request.yml
r3433318 r3450325 11 11 runs-on: ubuntu-latest 12 12 steps: 13 - uses: actions/checkout@v 213 - uses: actions/checkout@v 14 14 with: 15 15 ref: ${{ github.event.pull_request.head.sha }} -
buddypress-media/tags/4.7.9/.github/workflows/playwright.yml
r3433318 r3450325 29 29 steps: 30 30 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 31 - uses: actions/checkout@v 331 - uses: actions/checkout@v 32 32 with: 33 33 ref: ${{ github.event.pull_request.head.sha }} … … 47 47 - name: Archive HTML Report on failure 48 48 if: failure() 49 uses: actions/upload-artifact@v 449 uses: actions/upload-artifact@v 50 50 with: 51 51 name: report -
buddypress-media/tags/4.7.9/app/admin/RTMediaUploadTermsAdmin.php
r3386907 r3450325 38 38 */ 39 39 public function __construct() { 40 $this->upload_terms_message = esc_html__( 'terms of services.', 'buddypress-media' ); 41 $this->upload_terms_error_message = esc_html__( 'Please check terms of service.', 'buddypress-media' ); 40 add_action( 'init', array( $this, 'init_translations' ), 5 ); 42 41 43 42 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ), 999 ); … … 45 44 add_filter( 'rtmedia_general_content_groups', array( $this, 'admin_setting_add_terms_section' ), 10, 1 ); 46 45 add_filter( 'rtmedia_general_content_add_itmes', array( $this, 'admin_setting_add_terms_option' ), 10, 2 ); 46 47 48 49 50 51 52 53 47 54 } 48 55 -
buddypress-media/tags/4.7.9/changelog.txt
r3433318 r3450325 1 1 == Changelog == 2 3 4 5 6 7 8 9 10 11 2 12 3 13 = 4.7.8 [January 06, 2026] = -
buddypress-media/tags/4.7.9/index.php
r3433318 r3450325 4 4 * Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media 5 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.7. 86 * Version: 4.7. 7 7 * Requires at least: 4.1 8 8 * Text Domain: buddypress-media … … 23 23 * The version of the plugin 24 24 */ 25 define( 'RTMEDIA_VERSION', '4.7. 8' );25 define( 'RTMEDIA_VERSION', '4.7.' ); 26 26 } 27 27 -
buddypress-media/tags/4.7.9/languages/buddpress-media.pot
r3433318 r3450325 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.7. 8\n"5 "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.7.\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/buddypress-media\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-01- 06T06:20:43+00:00\n"12 "POT-Creation-Date: 2026-01-+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 792 792 msgstr "" 793 793 794 #: app/admin/RTMediaUploadTermsAdmin.php: 40794 #: app/admin/RTMediaUploadTermsAdmin.php: 795 795 msgid "terms of services." 796 796 msgstr "" 797 797 798 #: app/admin/RTMediaUploadTermsAdmin.php: 41798 #: app/admin/RTMediaUploadTermsAdmin.php: 799 799 msgid "Please check terms of service." 800 800 msgstr "" 801 801 802 #: app/admin/RTMediaUploadTermsAdmin.php:6 2802 #: app/admin/RTMediaUploadTermsAdmin.php:6 803 803 msgid "Please enter valid URL." 804 804 msgstr "" 805 805 806 #: app/admin/RTMediaUploadTermsAdmin.php: 63806 #: app/admin/RTMediaUploadTermsAdmin.php: 807 807 msgid "Please enter terms message." 808 808 msgstr "" 809 809 810 #: app/admin/RTMediaUploadTermsAdmin.php: 64810 #: app/admin/RTMediaUploadTermsAdmin.php: 811 811 msgid "Please enter error message." 812 812 msgstr "" 813 813 814 #: app/admin/RTMediaUploadTermsAdmin.php: 65814 #: app/admin/RTMediaUploadTermsAdmin.php: 815 815 msgid "Please enter privacy message." 816 816 msgstr "" 817 817 818 #: app/admin/RTMediaUploadTermsAdmin.php:1 26818 #: app/admin/RTMediaUploadTermsAdmin.php:1 819 819 msgid "Ask users to agree to your terms" 820 820 msgstr "" 821 821 822 #: app/admin/RTMediaUploadTermsAdmin.php:14 1822 #: app/admin/RTMediaUploadTermsAdmin.php:14 823 823 msgid "Show \"Terms of Service\" checkbox on upload screen" 824 824 msgstr "" 825 825 826 #: app/admin/RTMediaUploadTermsAdmin.php:1 46827 #: app/admin/RTMediaUploadTermsAdmin.php:1 56826 #: app/admin/RTMediaUploadTermsAdmin.php:1 827 #: app/admin/RTMediaUploadTermsAdmin.php:1 828 828 msgid "User have to check the terms and conditions before uploading the media." 829 829 msgstr "" 830 830 831 #: app/admin/RTMediaUploadTermsAdmin.php:15 1831 #: app/admin/RTMediaUploadTermsAdmin.php:15 832 832 msgid "Show \"Terms of Service\" checkbox on activity screen" 833 833 msgstr "" 834 834 835 #: app/admin/RTMediaUploadTermsAdmin.php:16 1835 #: app/admin/RTMediaUploadTermsAdmin.php:16 836 836 msgid "Link for \"Terms of Service\" page" 837 837 msgstr "" 838 838 839 #: app/admin/RTMediaUploadTermsAdmin.php:1 66839 #: app/admin/RTMediaUploadTermsAdmin.php:1 840 840 msgid "Link to the terms and condition page where user can read terms and conditions." 841 841 msgstr "" 842 842 843 #: app/admin/RTMediaUploadTermsAdmin.php:17 2843 #: app/admin/RTMediaUploadTermsAdmin.php:17 844 844 msgid "Terms of Service Message" 845 845 msgstr "" 846 846 847 #: app/admin/RTMediaUploadTermsAdmin.php:1 77847 #: app/admin/RTMediaUploadTermsAdmin.php:1 848 848 msgid "Add Terms of Service Message." 849 849 msgstr "" 850 850 851 #: app/admin/RTMediaUploadTermsAdmin.php:18 2851 #: app/admin/RTMediaUploadTermsAdmin.php:18 852 852 msgid "Error Message" 853 853 msgstr "" 854 854 855 #: app/admin/RTMediaUploadTermsAdmin.php:1 87855 #: app/admin/RTMediaUploadTermsAdmin.php:1 856 856 msgid "Display Error Message When User Upload Media Without Selecting Checkbox ." 857 857 msgstr "" 858 858 859 #: app/admin/RTMediaUploadTermsAdmin.php:19 2859 #: app/admin/RTMediaUploadTermsAdmin.php:19 860 860 msgid "Show \"Privacy Message\" on website" 861 861 msgstr "" 862 862 863 #: app/admin/RTMediaUploadTermsAdmin.php: 197863 #: app/admin/RTMediaUploadTermsAdmin.php: 864 864 msgid "User will see the privacy message on website." 865 865 msgstr "" 866 866 867 #: app/admin/RTMediaUploadTermsAdmin.php:20 2867 #: app/admin/RTMediaUploadTermsAdmin.php:20 868 868 msgid "Privacy Message" 869 869 msgstr "" 870 870 871 #: app/admin/RTMediaUploadTermsAdmin.php:2 07871 #: app/admin/RTMediaUploadTermsAdmin.php:2 872 872 msgid "Display privacy message on your website." 873 873 msgstr "" … … 3482 3482 msgstr "" 3483 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3484 3500 #: templates/media/media-gallery.php:27 3485 3501 #: templates/media/media-gallery.php:63 -
buddypress-media/tags/4.7.9/readme.txt
r3433318 r3450325 6 6 Requires at least: 4.1 7 7 Tested up to: 6.9 8 Stable tag: 4.7. 88 Stable tag: 4.7. 9 9 10 10 Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices. … … 129 129 == Changelog == 130 130 131 132 133 134 135 136 137 138 139 140 131 141 = 4.7.8 [January 06, 2026] = 132 142 -
buddypress-media/tags/4.7.9/templates/media/godam-integration.php
r3354581 r3450325 50 50 function () { 51 51 52 // Enqueue integration script for rtMedia and Godam. 53 wp_enqueue_script( 54 'godam-rtmedia-integration', 55 RTMEDIA_URL . 'app/assets/js/godam-integration.min.js', 56 array( 'godam-player-frontend-script' ), 57 null, 58 true 59 ); 52 // Skip loading rtMedia's GoDAM integration script on Godam video embed pages. 53 if ( 'video-embed' !== get_query_var( 'godam_page' ) ) { 54 // Enqueue integration script for rtMedia and Godam. 55 wp_enqueue_script( 56 'godam-rtmedia-integration', 57 RTMEDIA_URL . 'app/assets/js/godam-integration.min.js', 58 array( 'godam-player-frontend-script' ), 59 null, 60 true 61 ); 62 } 60 63 61 64 // Enqueue the script responsible for AJAX-based comment refresh. … … 184 187 /** 185 188 * Handle AJAX request for loading a single activity comment's HTML. 189 186 190 */ 187 191 add_action( 'wp_ajax_get_single_activity_comment_html', 'handle_get_single_activity_comment_html' ); 188 add_action( 'wp_ajax_nopriv_get_single_activity_comment_html', 'handle_get_single_activity_comment_html' );189 192 190 193 /** … … 192 195 * 193 196 * Validates the request, loads the activity comment by ID, 197 194 198 * renders its HTML using the BuddyPress template, and returns it in a JSON response. 195 199 * … … 199 203 check_ajax_referer( 'godam-ajax-nonce', 'nonce' ); 200 204 205 206 207 208 209 201 210 $activity_id = isset( $_POST['comment_id'] ) ? intval( $_POST['comment_id'] ) : 0; 202 211 203 212 if ( ! $activity_id ) { 204 wp_send_json_error( 'Invalid activity ID');213 wp_send_json_error( ); 205 214 } 206 215 207 216 $activity = new BP_Activity_Activity( $activity_id ); 208 217 if ( empty( $activity->id ) ) { 209 wp_send_json_error( 'Activity comment not found' ); 218 wp_send_json_error( __( 'Activity comment not found', 'buddypress-media' ), 404 ); 219 } 220 221 // Verify user has permission to view this activity. 222 if ( ! rtmedia_user_can_view_activity( $activity ) ) { 223 wp_send_json_error( __( 'You do not have permission to view this activity', 'buddypress-media' ), 403 ); 210 224 } 211 225 … … 229 243 230 244 wp_send_json_success( array( 'html' => $html ) ); 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 231 330 } 232 331 -
buddypress-media/trunk/.github/workflows/create.yml
r3433318 r3450325 12 12 runs-on: ubuntu-latest 13 13 steps: 14 - uses: actions/checkout@v 414 - uses: actions/checkout@v 15 15 - name: Install SVN ( Subversion ) 16 16 run: | -
buddypress-media/trunk/.github/workflows/phpcs_on_pull_request.yml
r3433318 r3450325 11 11 runs-on: ubuntu-latest 12 12 steps: 13 - uses: actions/checkout@v 213 - uses: actions/checkout@v 14 14 with: 15 15 ref: ${{ github.event.pull_request.head.sha }} -
buddypress-media/trunk/.github/workflows/playwright.yml
r3433318 r3450325 29 29 steps: 30 30 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 31 - uses: actions/checkout@v 331 - uses: actions/checkout@v 32 32 with: 33 33 ref: ${{ github.event.pull_request.head.sha }} … … 47 47 - name: Archive HTML Report on failure 48 48 if: failure() 49 uses: actions/upload-artifact@v 449 uses: actions/upload-artifact@v 50 50 with: 51 51 name: report -
buddypress-media/trunk/app/admin/RTMediaUploadTermsAdmin.php
r3386907 r3450325 38 38 */ 39 39 public function __construct() { 40 $this->upload_terms_message = esc_html__( 'terms of services.', 'buddypress-media' ); 41 $this->upload_terms_error_message = esc_html__( 'Please check terms of service.', 'buddypress-media' ); 40 add_action( 'init', array( $this, 'init_translations' ), 5 ); 42 41 43 42 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts_styles' ), 999 ); … … 45 44 add_filter( 'rtmedia_general_content_groups', array( $this, 'admin_setting_add_terms_section' ), 10, 1 ); 46 45 add_filter( 'rtmedia_general_content_add_itmes', array( $this, 'admin_setting_add_terms_option' ), 10, 2 ); 46 47 48 49 50 51 52 53 47 54 } 48 55 -
buddypress-media/trunk/changelog.txt
r3433318 r3450325 1 1 == Changelog == 2 3 4 5 6 7 8 9 10 11 2 12 3 13 = 4.7.8 [January 06, 2026] = -
buddypress-media/trunk/index.php
r3433318 r3450325 4 4 * Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media 5 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.7. 86 * Version: 4.7. 7 7 * Requires at least: 4.1 8 8 * Text Domain: buddypress-media … … 23 23 * The version of the plugin 24 24 */ 25 define( 'RTMEDIA_VERSION', '4.7. 8' );25 define( 'RTMEDIA_VERSION', '4.7.' ); 26 26 } 27 27 -
buddypress-media/trunk/languages/buddpress-media.pot
r3433318 r3450325 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.7. 8\n"5 "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.7.\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/buddypress-media\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-01- 06T06:20:43+00:00\n"12 "POT-Creation-Date: 2026-01-+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 792 792 msgstr "" 793 793 794 #: app/admin/RTMediaUploadTermsAdmin.php: 40794 #: app/admin/RTMediaUploadTermsAdmin.php: 795 795 msgid "terms of services." 796 796 msgstr "" 797 797 798 #: app/admin/RTMediaUploadTermsAdmin.php: 41798 #: app/admin/RTMediaUploadTermsAdmin.php: 799 799 msgid "Please check terms of service." 800 800 msgstr "" 801 801 802 #: app/admin/RTMediaUploadTermsAdmin.php:6 2802 #: app/admin/RTMediaUploadTermsAdmin.php:6 803 803 msgid "Please enter valid URL." 804 804 msgstr "" 805 805 806 #: app/admin/RTMediaUploadTermsAdmin.php: 63806 #: app/admin/RTMediaUploadTermsAdmin.php: 807 807 msgid "Please enter terms message." 808 808 msgstr "" 809 809 810 #: app/admin/RTMediaUploadTermsAdmin.php: 64810 #: app/admin/RTMediaUploadTermsAdmin.php: 811 811 msgid "Please enter error message." 812 812 msgstr "" 813 813 814 #: app/admin/RTMediaUploadTermsAdmin.php: 65814 #: app/admin/RTMediaUploadTermsAdmin.php: 815 815 msgid "Please enter privacy message." 816 816 msgstr "" 817 817 818 #: app/admin/RTMediaUploadTermsAdmin.php:1 26818 #: app/admin/RTMediaUploadTermsAdmin.php:1 819 819 msgid "Ask users to agree to your terms" 820 820 msgstr "" 821 821 822 #: app/admin/RTMediaUploadTermsAdmin.php:14 1822 #: app/admin/RTMediaUploadTermsAdmin.php:14 823 823 msgid "Show \"Terms of Service\" checkbox on upload screen" 824 824 msgstr "" 825 825 826 #: app/admin/RTMediaUploadTermsAdmin.php:1 46827 #: app/admin/RTMediaUploadTermsAdmin.php:1 56826 #: app/admin/RTMediaUploadTermsAdmin.php:1 827 #: app/admin/RTMediaUploadTermsAdmin.php:1 828 828 msgid "User have to check the terms and conditions before uploading the media." 829 829 msgstr "" 830 830 831 #: app/admin/RTMediaUploadTermsAdmin.php:15 1831 #: app/admin/RTMediaUploadTermsAdmin.php:15 832 832 msgid "Show \"Terms of Service\" checkbox on activity screen" 833 833 msgstr "" 834 834 835 #: app/admin/RTMediaUploadTermsAdmin.php:16 1835 #: app/admin/RTMediaUploadTermsAdmin.php:16 836 836 msgid "Link for \"Terms of Service\" page" 837 837 msgstr "" 838 838 839 #: app/admin/RTMediaUploadTermsAdmin.php:1 66839 #: app/admin/RTMediaUploadTermsAdmin.php:1 840 840 msgid "Link to the terms and condition page where user can read terms and conditions." 841 841 msgstr "" 842 842 843 #: app/admin/RTMediaUploadTermsAdmin.php:17 2843 #: app/admin/RTMediaUploadTermsAdmin.php:17 844 844 msgid "Terms of Service Message" 845 845 msgstr "" 846 846 847 #: app/admin/RTMediaUploadTermsAdmin.php:1 77847 #: app/admin/RTMediaUploadTermsAdmin.php:1 848 848 msgid "Add Terms of Service Message." 849 849 msgstr "" 850 850 851 #: app/admin/RTMediaUploadTermsAdmin.php:18 2851 #: app/admin/RTMediaUploadTermsAdmin.php:18 852 852 msgid "Error Message" 853 853 msgstr "" 854 854 855 #: app/admin/RTMediaUploadTermsAdmin.php:1 87855 #: app/admin/RTMediaUploadTermsAdmin.php:1 856 856 msgid "Display Error Message When User Upload Media Without Selecting Checkbox ." 857 857 msgstr "" 858 858 859 #: app/admin/RTMediaUploadTermsAdmin.php:19 2859 #: app/admin/RTMediaUploadTermsAdmin.php:19 860 860 msgid "Show \"Privacy Message\" on website" 861 861 msgstr "" 862 862 863 #: app/admin/RTMediaUploadTermsAdmin.php: 197863 #: app/admin/RTMediaUploadTermsAdmin.php: 864 864 msgid "User will see the privacy message on website." 865 865 msgstr "" 866 866 867 #: app/admin/RTMediaUploadTermsAdmin.php:20 2867 #: app/admin/RTMediaUploadTermsAdmin.php:20 868 868 msgid "Privacy Message" 869 869 msgstr "" 870 870 871 #: app/admin/RTMediaUploadTermsAdmin.php:2 07871 #: app/admin/RTMediaUploadTermsAdmin.php:2 872 872 msgid "Display privacy message on your website." 873 873 msgstr "" … … 3482 3482 msgstr "" 3483 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3484 3500 #: templates/media/media-gallery.php:27 3485 3501 #: templates/media/media-gallery.php:63 -
buddypress-media/trunk/readme.txt
r3433318 r3450325 6 6 Requires at least: 4.1 7 7 Tested up to: 6.9 8 Stable tag: 4.7. 88 Stable tag: 4.7. 9 9 10 10 Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices. … … 129 129 == Changelog == 130 130 131 132 133 134 135 136 137 138 139 140 131 141 = 4.7.8 [January 06, 2026] = 132 142 -
buddypress-media/trunk/templates/media/godam-integration.php
r3354581 r3450325 50 50 function () { 51 51 52 // Enqueue integration script for rtMedia and Godam. 53 wp_enqueue_script( 54 'godam-rtmedia-integration', 55 RTMEDIA_URL . 'app/assets/js/godam-integration.min.js', 56 array( 'godam-player-frontend-script' ), 57 null, 58 true 59 ); 52 // Skip loading rtMedia's GoDAM integration script on Godam video embed pages. 53 if ( 'video-embed' !== get_query_var( 'godam_page' ) ) { 54 // Enqueue integration script for rtMedia and Godam. 55 wp_enqueue_script( 56 'godam-rtmedia-integration', 57 RTMEDIA_URL . 'app/assets/js/godam-integration.min.js', 58 array( 'godam-player-frontend-script' ), 59 null, 60 true 61 ); 62 } 60 63 61 64 // Enqueue the script responsible for AJAX-based comment refresh. … … 184 187 /** 185 188 * Handle AJAX request for loading a single activity comment's HTML. 189 186 190 */ 187 191 add_action( 'wp_ajax_get_single_activity_comment_html', 'handle_get_single_activity_comment_html' ); 188 add_action( 'wp_ajax_nopriv_get_single_activity_comment_html', 'handle_get_single_activity_comment_html' );189 192 190 193 /** … … 192 195 * 193 196 * Validates the request, loads the activity comment by ID, 197 194 198 * renders its HTML using the BuddyPress template, and returns it in a JSON response. 195 199 * … … 199 203 check_ajax_referer( 'godam-ajax-nonce', 'nonce' ); 200 204 205 206 207 208 209 201 210 $activity_id = isset( $_POST['comment_id'] ) ? intval( $_POST['comment_id'] ) : 0; 202 211 203 212 if ( ! $activity_id ) { 204 wp_send_json_error( 'Invalid activity ID');213 wp_send_json_error( ); 205 214 } 206 215 207 216 $activity = new BP_Activity_Activity( $activity_id ); 208 217 if ( empty( $activity->id ) ) { 209 wp_send_json_error( 'Activity comment not found' ); 218 wp_send_json_error( __( 'Activity comment not found', 'buddypress-media' ), 404 ); 219 } 220 221 // Verify user has permission to view this activity. 222 if ( ! rtmedia_user_can_view_activity( $activity ) ) { 223 wp_send_json_error( __( 'You do not have permission to view this activity', 'buddypress-media' ), 403 ); 210 224 } 211 225 … … 229 243 230 244 wp_send_json_success( array( 'html' => $html ) ); 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 231 330 } 232 331
Note: See TracChangeset
for help on using the changeset viewer.