Skip to:
Content

BuddyPress.org

Ticket #6425: 6425.02.patch

File 6425.02.patch, 3.6 KB (added by r-a-y, 10 years ago)
  • src/bp-core/bp-core-attachments.php

    diff --git src/bp-core/bp-core-attachments.php src/bp-core/bp-core-attachments.php
    index 2eb9a7b..700d3bc 100644
    function bp_attachments_enqueue_scripts( $class = '' ) { 
    215215
    216216                // Init the Avatar nav
    217217                $avatar_nav = array(
    218                         'upload' => array( 'id' => 'upload', 'caption' => __( 'Upload', 'buddypress' ), 'order' => 0  ),
     218                        'upload' => array( 'id' => 'upload', 'caption' => __( 'Upload Photo', 'buddypress' ), 'order' => 0  ),
    219219
    220220                        // The delete view will only show if the object has an avatar
    221221                        'delete' => array( 'id' => 'delete', 'caption' => __( 'Delete', 'buddypress' ), 'order' => 100, 'hide' => (int) ! $has_avatar ),
    function bp_attachments_enqueue_scripts( $class = '' ) { 
    223223
    224224                // Create the Camera Nav if the WebCam capture feature is enabled
    225225                if ( bp_avatar_use_webcam() && 'user' === $object ) {
    226                         $avatar_nav['camera'] = array( 'id' => 'camera', 'caption' => __( 'Camera', 'buddypress' ), 'order' => 10 );
     226                        $avatar_nav['camera'] = array( 'id' => 'camera', 'caption' => __( 'Take Photo', 'buddypress' ), 'order' => 10 );
    227227
    228228                        // Set warning messages
    229229                        $strings['camera_warnings'] = array(
    230                                 'requesting'  => __( 'Requesting video stream, please authorize this website to access to your camera.', 'buddypress'),
    231                                 'loading'     => __( 'Please wait for the video to load.', 'buddypress' ),
    232                                 'loaded'      => __( 'Video stream loaded. You can use the capture button to display the profile photo preview.', 'buddypress' ),
    233                                 'noaccess'    => __( 'You denied this website to access to your camera. Please use the upload form.', 'buddypress' ),
    234                                 'errormsg'    => __( 'Your browser is not supported. Please use the upload form.', 'buddypress' ),
    235                                 'videoerror'  => __( 'Video error. Please use the upload form.', 'buddypress' ),
    236                                 'ready'       => __( 'Your profile photo is ready, use the save button to validate.', 'buddypress' ),
    237                                 'nocapture'   => __( 'No profile photo was captured, please use the capture button first.', 'buddypress' ),
     230                                'requesting'  => __( 'Please allow us to access to your camera.', 'buddypress'),
     231                                'loading'     => __( 'Please wait as we access your camera.', 'buddypress' ),
     232                                'loaded'      => __( 'Camera loaded. Click on the "Capture" button to take your photo.', 'buddypress' ),
     233                                'noaccess'    => __( 'It looks like you do not have a webcam or we were unable to get permission to use your webcam. Please upload a photo instead.', 'buddypress' ),
     234                                'errormsg'    => __( 'Your browser is not supported. Please upload a photo instead.', 'buddypress' ),
     235                                'videoerror'  => __( 'Video error. Please upload a photo instead.', 'buddypress' ),
     236                                'ready'       => __( 'Your profile photo is ready. Click on the "Save" button to use this photo.', 'buddypress' ),
     237                                'nocapture'   => __( 'No photo was captured. Click on the "Capture" button to take your photo.', 'buddypress' ),
    238238                        );
    239239                }
    240240
  • src/bp-core/bp-core-avatars.php

    diff --git src/bp-core/bp-core-avatars.php src/bp-core/bp-core-avatars.php
    index 001c899..269393f 100644
    function bp_avatar_use_webcam() { 
    18501850        }
    18511851
    18521852        /**
     1853         * Bail when using IE as IE doesn't support getUserMedia.
     1854         *
     1855         * @todo Microsoft Edge supports getUserMedia. Make sure $is_IE doesn't include
     1856         *       Edge in the future.
     1857         */
     1858        if ( isset( $GLOBALS['is_IE'] ) && true === $GLOBALS['is_IE'] ) {
     1859                return false;
     1860        }
     1861
     1862        /**
    18531863         * Use this filter if you need to disable the webcam capture feature
    18541864         * by returning false.
    18551865         *