Plugin Directory

Changeset 3322545


Ignore:
Timestamp:
07/04/2025 11:43:00 PM (8 months ago)
Author:
back2nature
Message:

4.22.5

Location:
word-balloon/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • word-balloon/trunk/changelog.txt

    r3307744 r3322545  
     1= 4.22.5 =
     2* Released: July 5, 2025
     3* fixed: Minor fix.
     4
    15= 4.22.4 =
    26* Released: June 7, 2025
  • word-balloon/trunk/css/word_balloon_block.min.css

    r2437006 r3322545  
    1 .w_b_block_ed .w_b_ava_L{-webkit-order:1;order:1}.w_b_block_ed .w_b_ava_R{-webkit-order:3;order:3}.w_b_block_ed .w_b_bal_box{-webkit-order:2;order:2}.w_b_block_ed .w_b_ava_img{cursor:default}.w_b_block_ed .w_b_bal_wrap_L{-webkit-order:1;order:1}.w_b_block_ed .w_b_bal_wrap_R{-webkit-order:3;order:3}.w_b_block_ed .w_b_status_box{-webkit-order:2;order:2}.w_b_block_ed .w_b_bal{min-width:90px}.w_b_block_ed .components-autocomplete{word-break:break-word}.w_b_mb_32{margin-bottom:32px}.w_b_annotation{border-top:1px solid #e2e4e7;padding-top:16px;margin-bottom:16px}.w_b_block_over>div,.w_b_block_under>div{-webkit-flex-direction:column;flex-direction:column}.w_b_block_over .w_b_bal_box{-webkit-order:0;order:0}.w_b_block_under .w_b_ava_R{-webkit-order:0;order:0}.w_b_block_label_title{font-weight:bold}.w_b_block_bal .block-editor-inner-blocks .block-editor-block-list__block{margin:0}.w_b_block_bal .block-editor-inner-blocks .block-editor-block-list__block p.block-editor-rich-text__editable{margin:0}.w_b_block_side_by_side .block-editor-inner-blocks .block-editor-block-list__layout{display:flex}.w_b_block_side_by_side .block-editor-inner-blocks .block-editor-block-list__layout>*{margin:0}.w_b_block_side_by_side.space-between .block-editor-block-list__layout{justify-content:space-between}.w_b_block_side_by_side.center .block-editor-block-list__layout{justify-content:center}.w_b_block_side_by_side.flex-end .block-editor-block-list__layout{justify-content:flex-end}.w_b_block_side_by_side.flex-start .block-editor-block-list__layout{justify-content:flex-start}.w_b_block_side_by_side.flex-start .block-editor-block-list__layout{justify-content:flex-start}.w_b_block_side_by_side.true .block-editor-block-list__layout{flex-wrap:wrap}.w_b_block_side_by_side.reverse .block-editor-block-list__layout{flex-wrap:wrap-reverse}.w_b_block_out_innerblocks_mode{color:#9e9e9e;pointer-events:'none'}.w_b_block_out_innerblocks_mode .components-form-toggle .components-form-toggle__track{background:#9e9e9e;cursor:not-allowed}.w_b_block_out_innerblocks_mode label,.w_b_block_out_innerblocks_mode .components-form-toggle__input{cursor:not-allowed}.w_b_avatar_active_position_L .w_b_avatar_position_L{fill:#007cba}.w_b_avatar_active_position_R .w_b_avatar_position_R{fill:#007cba}#w_b_avatar_position_arrows_div .w_b_avatar_position_R{margin-left:8px;transform:rotate(180deg)}#w_b_avatar_position_arrows_div label{margin-right:auto}#w_b_avatar_position_arrows_div svg{cursor:pointer}.w_b_icon_position_arrows_div div:nth-child(3n+2){margin-left:8px;margin-right:8px}.w_b_icon_position_arrows_div{margin-bottom:24px;line-height:0;width:138px;margin-left:auto;justify-content:flex-end}.w_b_icon_position_arrows_div>div{margin:2px}.w_b_icon_position_arrows_div svg{cursor:pointer}.w_b_icon_position_top_left{transform:rotate(45deg)}.w_b_icon_position_top_center{transform:rotate(90deg)}.w_b_icon_position_top_right{transform:rotate(135deg)}.w_b_icon_position_center_right{transform:rotate(180deg)}.w_b_icon_position_bottom_right{transform:rotate(225deg)}.w_b_icon_position_bottom_center{transform:rotate(270deg)}.w_b_icon_position_bottom_left{transform:rotate(315deg)}.w_b_icon_active_position.active{fill:#007cba}.w_b_size_option_wrap{margin-bottom:20px}.w_b_size_option_wrap div:first-child{margin-left:auto;border-radius:6px 0 0 6px}.w_b_size_option_wrap div:last-child{border-radius:0 6px 6px 0}.w_b_size_option{font-size:20px;padding:8px;border:1px solid #ccc;background:#fafafa;border-bottom-width:3px;cursor:pointer;transition:all .1s ease}.w_b_size_option.active,.w_b_size_option:hover{background:#007cba;border-color:#007cba;border-bottom-color:#003753;color:#fff}
     1.w_b_block_ed .w_b_ava_L{-webkit-order:1;order:1}.w_b_block_ed .w_b_ava_R{-webkit-order:3;order:3}.w_b_block_ed .w_b_bal_box{-webkit-order:2;order:2}.w_b_block_ed .w_b_ava_img{cursor:pointer;pointer-events:auto !important}.w_b_block_ed .w_b_bal_wrap_L{-webkit-order:1;order:1}.w_b_block_ed .w_b_bal_wrap_R{-webkit-order:3;order:3}.w_b_block_ed .w_b_status_box{-webkit-order:2;order:2}.w_b_block_ed .w_b_bal{min-width:90px}.w_b_block_ed .components-autocomplete{word-break:break-word}.w_b_mb_32{margin-bottom:32px}.w_b_annotation{border-top:1px solid #e2e4e7;padding-top:16px;margin-bottom:16px}.w_b_block_over>div,.w_b_block_under>div{-webkit-flex-direction:column;flex-direction:column}.w_b_block_over .w_b_bal_box{-webkit-order:0;order:0}.w_b_block_under .w_b_ava_R{-webkit-order:0;order:0}.w_b_block_label_title{font-weight:bold}.w_b_block_bal .block-editor-inner-blocks .block-editor-block-list__block{margin:0}.w_b_block_bal .block-editor-inner-blocks .block-editor-block-list__block p.block-editor-rich-text__editable{margin:0}.w_b_block_side_by_side .block-editor-inner-blocks .block-editor-block-list__layout{display:flex}.w_b_block_side_by_side .block-editor-inner-blocks .block-editor-block-list__layout>*{margin:0}.w_b_block_side_by_side.space-between .block-editor-block-list__layout{justify-content:space-between}.w_b_block_side_by_side.center .block-editor-block-list__layout{justify-content:center}.w_b_block_side_by_side.flex-end .block-editor-block-list__layout{justify-content:flex-end}.w_b_block_side_by_side.flex-start .block-editor-block-list__layout{justify-content:flex-start}.w_b_block_side_by_side.flex-start .block-editor-block-list__layout{justify-content:flex-start}.w_b_block_side_by_side.true .block-editor-block-list__layout{flex-wrap:wrap}.w_b_block_side_by_side.reverse .block-editor-block-list__layout{flex-wrap:wrap-reverse}.w_b_block_out_innerblocks_mode{color:#9e9e9e;pointer-events:"none"}.w_b_block_out_innerblocks_mode .components-form-toggle .components-form-toggle__track{background:#9e9e9e;cursor:not-allowed}.w_b_block_out_innerblocks_mode label,.w_b_block_out_innerblocks_mode .components-form-toggle__input{cursor:not-allowed}.w_b_avatar_active_position_L .w_b_avatar_position_L{fill:#007cba}.w_b_avatar_active_position_R .w_b_avatar_position_R{fill:#007cba}#w_b_avatar_position_arrows_div .w_b_avatar_position_R{margin-left:8px;transform:rotate(180deg)}#w_b_avatar_position_arrows_div label{margin-right:auto}#w_b_avatar_position_arrows_div svg{cursor:pointer}.w_b_icon_position_arrows_div div:nth-child(3n+2){margin-left:8px;margin-right:8px}.w_b_icon_position_arrows_div{margin-bottom:24px;line-height:0;width:138px;margin-left:auto;justify-content:flex-end}.w_b_icon_position_arrows_div>div{margin:2px}.w_b_icon_position_arrows_div svg{cursor:pointer}.w_b_icon_position_top_left{transform:rotate(45deg)}.w_b_icon_position_top_center{transform:rotate(90deg)}.w_b_icon_position_top_right{transform:rotate(135deg)}.w_b_icon_position_center_right{transform:rotate(180deg)}.w_b_icon_position_bottom_right{transform:rotate(225deg)}.w_b_icon_position_bottom_center{transform:rotate(270deg)}.w_b_icon_position_bottom_left{transform:rotate(315deg)}.w_b_icon_active_position.active{fill:#007cba}.w_b_size_option_wrap{margin-bottom:20px}.w_b_size_option_wrap div:first-child{margin-left:auto;border-radius:6px 0 0 6px}.w_b_size_option_wrap div:last-child{border-radius:0 6px 6px 0}.w_b_size_option{font-size:20px;padding:8px;border:1px solid #ccc;background:#fafafa;border-bottom-width:3px;cursor:pointer;transition:all .1s ease}.w_b_size_option.active,.w_b_size_option:hover{background:#007cba;border-color:#007cba;border-bottom-color:#003753;color:#fff}
  • word-balloon/trunk/inc/admin.php

    r3103805 r3322545  
    22
    33defined( 'ABSPATH' ) || exit;
     4
    45
    56include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     
    5556    wp_enqueue_style('word_balloon_font', WORD_BALLOON_URI . 'css/font/style.min.css',array(),WORD_BALLOON_VERSION);
    5657    //add_action( 'wp_enqueue_scripts', 'word_balloon_translations_edit' );
     58
    5759   
    5860    wp_enqueue_script('word_balloon_base_script', WORD_BALLOON_URI . 'js/action/word_balloon_action_base.min.js',array(),WORD_BALLOON_VERSION,true);
     
    6062    wp_enqueue_script('word_balloon_edit');
    6163    wp_enqueue_script('word_balloon_avatar_register', WORD_BALLOON_URI . 'js/word_balloon_avatar_register.min.js',array('word_balloon_edit'),WORD_BALLOON_VERSION,true);
     64
    6265   
    6366    $translations = word_balloon_script_translations();
    6467    wp_localize_script( 'word_balloon_base_script', 'translations_word_balloon', $translations );
     68
    6569   
    6670    wp_localize_script('word_balloon_base_script','word_balloon_nonce_ajax_object',array(
     
    181185
    182186
    183 function word_balloon_scriput_translations(){
    184     return word_balloon_script_translations();
    185 }
     187
     188   
     189
    186190
    187191
     
    195199
    196200
    197     wp_register_script( 'wp-color-picker-alpha', WORD_BALLOON_URI . 'js/wp-color-picker-alpha.min.js', array( 'wp-color-picker' ), WORD_BALLOON_VERSION, true );
     201    wp_register_script( 'wp-color-picker-alpha', WORD_BALLOON_URI . 'js/wp-color-picker-alpha.min.js', array( 'jquery', 'wp-color-picker' ), WORD_BALLOON_VERSION, true );
    198202
    199203    wp_add_inline_script(
  • word-balloon/trunk/inc/ajax_nonce.php

    r3103805 r3322545  
    2626
    2727
    28 
     28     
    2929      if( $_POST['datauri'] === 'true' && defined('WORD_BALLOON_PRO_DIR') && file_exists( WORD_BALLOON_PRO_DIR . 'inc/save/admin-avatar_save.php' ) ){
    3030
  • word-balloon/trunk/js/wp-color-picker-alpha.js

    r2912717 r3322545  
    55 * Only run in input and is defined data alpha in true
    66 *
    7  * Version: 3.0.2
     7 * Version: 3.0.4
    88 * https://github.com/kallookoo/wp-color-picker-alpha
    99 * Licensed under the GPLv2 license or later.
    1010 */
    1111
    12 ( function( $, undef ) {
     12( function ( $, undef ) {
    1313
    1414    var wpColorPickerAlpha = {
    15         'version' : 302
     15        'version': 304
    1616    };
    1717
     
    1919    if ( 'wpColorPickerAlpha' in window && 'version' in window.wpColorPickerAlpha ) {
    2020        var version = parseInt( window.wpColorPickerAlpha.version, 10 );
    21         if ( ! isNaN( version ) && version >= wpColorPickerAlpha.version ) {
     21        if ( !isNaN( version ) && version >= wpColorPickerAlpha.version ) {
    2222            return;
    2323        }
     
    3030
    3131    // Create new method to replace the `Color.toString()` inside the scripts.
    32     Color.fn.to_s = function( type ) {
     32    Color.fn.to_s = function ( type ) {
     33        if ( this.error ) {
     34            return '';
     35        }
    3336        type = ( type || 'hex' );
    3437        // Change hex to rgba to return the correct color.
     
    4043        if ( 'hex' === type ) {
    4144            color = this.toString();
    42         } else if ( ! this.error ) {
     45        } else if ( 'octohex' === type ) {
     46            color = this.toString();
     47            var alpha = parseInt( 255 * this._alpha, 10 ).toString( 16 );
     48            if ( alpha.length === 1 ) {
     49                alpha = `0${alpha}`;
     50            }
     51            color += alpha;
     52        } else {
    4353            color = this.toCSS( type ).replace( /\(\s+/, '(' ).replace( /\s+\)/, ')' );
    4454        }
     55
    4556        return color;
     57    }
     58
     59    Color.fn.fromHex = function ( color ) {
     60        color = color.replace( /^#/, '' ).replace( /^0x/, '' );
     61        if ( 3 === color.length || 4 === color.length ) {
     62            var extendedColor = '';
     63            for ( var index = 0; index < color.length; index++ ) {
     64                extendedColor += '' + color[ index ];
     65                extendedColor += '' + color[ index ];
     66            }
     67            color = extendedColor;
     68        }
     69
     70        if ( color.length === 8 ) {
     71            if ( /^[0-9A-F]{8}$/i.test( color ) ) {
     72                var alpha = parseInt( color.substring( 6 ), 16 );
     73                if ( !isNaN( alpha ) ) {
     74                    this.a( alpha / 255 );
     75                } else {
     76                    this._error();
     77                }
     78            } else {
     79                this._error();
     80            }
     81            color = color.substring( 0, 6 );
     82        }
     83
     84        if ( !this.error ) {
     85            this.error = ! /^[0-9A-F]{6}$/i.test( color );
     86        }
     87
     88        // console.log(color + ': ' + this.a())
     89        return this.fromInt( parseInt( color, 16 ) );
    4690    }
    4791
     
    72116         * @access private
    73117         *
    74          * @param {Object|*} The color instance if not defined return the cuurent color.
     118         * @param {Object|*} The color instance if not defined return the current color.
    75119         *
    76120         * @return {string} The element's color.
    77121         */
    78         _getColor: function( color ) {
     122        _getColor: function ( color ) {
    79123            if ( color === undef ) {
    80124                color = this._color;
     
    83127            if ( this.alphaOptions.alphaEnabled ) {
    84128                color = color.to_s( this.alphaOptions.alphaColorType );
    85                 if ( ! this.alphaOptions.alphaColorWithSpace ) {
     129                if ( !this.alphaOptions.alphaColorWithSpace ) {
    86130                    color = color.replace( /\s+/g, '' );
    87131                }
     
    98142         * @return {void}
    99143         */
    100         _create: function() {
     144        _create: function () {
    101145            try {
    102146                // Try to get the wpColorPicker alpha options.
    103147                this.alphaOptions = this.element.wpColorPicker( 'instance' ).alphaOptions;
    104             } catch( e ) {}
     148            } catch ( e ) { }
    105149
    106150            // We make sure there are all options
     
    111155                alphaColorType: 'hex',
    112156                alphaColorWithSpace: false,
     157                alphaSkipDebounce: false,
     158                alphaDebounceTimeout: 100,
    113159            } );
    114160
     
    123169         * @return {void}
    124170         */
    125         _addInputListeners: function( input ) {
     171        _addInputListeners: function ( input ) {
    126172            var self = this,
    127                 debounceTimeout = 100,
    128                 callback = function( event ){
     173                callback = function ( event ) {
    129174                    var val = input.val(),
    130175                        color = new Color( val ),
     
    134179                    input.removeClass( 'iris-error' );
    135180
    136                     if ( ! color.error ) {
     181                    if ( !color.error ) {
    137182                        // let's not do this on keyup for hex shortcodes
    138                         if ( 'hex' !== type || ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) {
     183                        if ( 'hex' !== type || !( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) {
    139184                            // Compare color ( #AARRGGBB )
    140185                            if ( color.toIEOctoHex() !== self._color.toIEOctoHex() ) {
     
    147192                };
    148193
    149             input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) );
     194            input.on( 'change', callback );
     195
     196            if ( !self.alphaOptions.alphaSkipDebounce ) {
     197                input.on( 'keyup', self._debounce( callback, self.alphaOptions.alphaDebounceTimeout ) );
     198            }
    150199
    151200            // If we initialized hidden, show on first focus. The rest is up to you.
    152201            if ( self.options.hide ) {
    153                 input.one( 'focus', function() {
     202                input.one( 'focus', function () {
    154203                    self.show();
    155                 });
     204                } );
    156205            }
    157206        },
     
    164213         * @return {void}
    165214         */
    166         _initControls: function() {
     215        _initControls: function () {
    167216            this._super();
    168217
     
    170219                // Create Alpha controls
    171220                var self = this,
    172                     stripAlpha = self.controls.strip.clone(false, false),
     221                    stripAlpha = self.controls.strip.clone( false, false ),
    173222                    stripAlphaSlider = stripAlpha.find( '.iris-slider-offset' ),
    174223                    controls = {
    175                         stripAlpha       : stripAlpha,
    176                         stripAlphaSlider : stripAlphaSlider
     224                        stripAlpha: stripAlpha,
     225                        stripAlphaSlider: stripAlphaSlider
    177226                    };
    178227
     
    182231
    183232                // Push new controls
    184                 $.each( controls, function( k, v ) {
    185                     self.controls[k] = v;
     233                $.each( controls, function ( k, v ) {
     234                    self.controls[ k ] = v;
    186235                } );
    187236
    188237                // Create slider
    189238                self.controls.stripAlphaSlider.slider( {
    190                     orientation : 'vertical',
    191                     min         : 0,
    192                     max         : 100,
    193                     step        : 1,
    194                     value       : parseInt( self._color._alpha * 100 ),
    195                     slide       : function( event, ui ) {
     239                    orientation: 'vertical',
     240                    min: 0,
     241                    max: 100,
     242                    step: 1,
     243                    value: parseInt( self._color._alpha * 100 ),
     244                    slide: function ( event, ui ) {
    196245                        self.active = 'strip';
    197246                        // Update alpha value
     
    212261         * @return {void}
    213262         */
    214         _dimensions: function( reset ) {
     263        _dimensions: function ( reset ) {
    215264            this._super( reset );
    216265
     
    250299                }
    251300
    252 
    253301                square.css( 'margin', '0' );
    254302                strip.width( stripWidth ).css( 'margin-left', stripMargin + 'px' );
     
    263311         * @return {void}
    264312         */
    265         _change: function() {
    266             var self   = this,
     313        _change: function () {
     314            var self = this,
    267315                active = self.active;
    268316
     
    270318
    271319            if ( self.alphaOptions.alphaEnabled ) {
    272                 var controls    = self.controls,
    273                     alpha        = parseInt( self._color._alpha * 100 ),
    274                     color        = self._color.toRgb(),
    275                     gradient     = [
     320                var controls = self.controls,
     321                    alpha = parseInt( self._color._alpha * 100 ),
     322                    color = self._color.toRgb(),
     323                    gradient = [
    276324                        'rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%',
    277325                        'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%'
    278326                    ],
    279                     target       = self.picker.closest( '.wp-picker-container' ).find( '.wp-color-result' );
     327                    target = self.picker.closest( '.wp-picker-container' ).find( '.wp-color-result' );
    280328
    281329                self.options.color = self._getColor();
    282330                // Generate background slider alpha, only for CSS3.
    283                 controls.stripAlpha.css( { 'background' : 'linear-gradient(to bottom, ' + gradient.join( ', ' ) + '), url(' + backgroundImage + ')' } );
     331                controls.stripAlpha.css( { 'background': 'linear-gradient(to bottom, ' + gradient.join( ', ' ) + '), url(' + backgroundImage + ')' } );
    284332                // Update alpha value
    285333                if ( active ) {
     
    287335                }
    288336
    289                 if ( ! self._color.error ) {
     337                if ( !self._color.error ) {
    290338                    self.element.removeClass( 'iris-error' ).val( self.options.color );
    291339                }
    292340
    293                 self.picker.find( '.iris-palette-container' ).on( 'click.palette', '.iris-palette', function() {
     341                self.picker.find( '.iris-palette-container' ).on( 'click.palette', '.iris-palette', function () {
    294342                    var color = $( this ).data( 'color' );
    295343                    if ( self.alphaOptions.alphaReset ) {
     
    312360         * @return {void}
    313361         */
    314         _paintDimension: function( origin, control ) {
     362        _paintDimension: function ( origin, control ) {
    315363            var self = this,
    316364                color = false;
     
    340388         * @return {void}
    341389         */
    342         _setOption: function( key, value ) {
     390        _setOption: function ( key, value ) {
    343391            var self = this;
    344392            if ( 'color' === key && self.alphaOptions.alphaEnabled ) {
     
    347395                newColor = new Color( value ).setHSpace( self.options.mode );
    348396                // Check if error && Check the color to prevent callbacks with the same color.
    349                 if ( ! newColor.error && self._getColor( newColor ) !== self._getColor() ) {
     397                if ( !newColor.error && self._getColor( newColor ) !== self._getColor() ) {
    350398                    self._color = newColor;
    351399                    self.options.color = self._getColor();
     
    366414         * @return {string} The element's color.
    367415         */
    368         color: function( newColor ) {
     416        color: function ( newColor ) {
    369417            if ( newColor === true ) {
    370418                return this._color.clone();
     
    399447         * @return {object} The current alpha options.
    400448         */
    401         _getAlphaOptions: function() {
     449        _getAlphaOptions: function () {
    402450            var el = this.element,
    403                 type  = ( el.data( 'type' ) || this.options.type ),
     451                type = ( el.data( 'type' ) || this.options.type ),
    404452                color = ( el.data( 'defaultColor' ) || el.val() ),
    405453                options = {
     
    409457                    alphaColorType: 'rgb',
    410458                    alphaColorWithSpace: false,
     459                    alphaSkipDebounce: ( !!el.data( 'alphaSkipDebounce' ) || false ),
    411460                };
    412461
     
    415464            }
    416465
    417             if ( ! options.alphaEnabled ) {
     466            if ( !options.alphaEnabled ) {
    418467                return options;
    419468            }
     
    421470            options.alphaColorWithSpace = ( color && color.match( /\s/ ) );
    422471
    423             $.each( options, function( name, defaultValue ) {
     472            $.each( options, function ( name, defaultValue ) {
    424473                var value = ( el.data( name ) || defaultValue );
    425474                switch ( name ) {
     
    429478                        break;
    430479                    case 'alphaColorType':
    431                         if ( ! value.match( /^(hex|(rgb|hsl)a?)$/ ) ) {
     480                        if ( !value.match( /^((octo)?hex|(rgb|hsl)a?)$/ ) ) {
    432481                            if ( color && color.match( /^#/ ) ) {
    433482                                value = 'hex';
     
    443492                        break;
    444493                }
    445                 options[name] = value;
     494                options[ name ] = value;
    446495            } );
    447496
     
    456505         * @return {void}
    457506         */
    458         _create: function() {
     507        _create: function () {
    459508            // Return early if Iris support is missing.
    460             if ( ! $.support.iris ) {
     509            if ( !$.support.iris ) {
    461510                return;
    462511            }
     
    476525         * @return {void}
    477526         */
    478         _addListeners: function() {
    479             if ( ! this.alphaOptions.alphaEnabled ) {
     527        _addListeners: function () {
     528            if ( !this.alphaOptions.alphaEnabled ) {
    480529                return this._super();
    481530            }
     
    492541            self.toggler.css( {
    493542                'position': 'relative',
    494                 'background-image' : 'url(' + backgroundImage + ')'
     543                'background-image': 'url(' + backgroundImage + ')'
    495544            } );
    496545
     
    502551
    503552            self.colorAlpha = self.toggler.find( 'span.color-alpha' ).css( {
    504                 'width'            : '30px',
    505                 'height'           : '100%',
    506                 'position'         : 'absolute',
    507                 'top'              : 0,
    508                 'background-color' : el.val(),
     553                'width': '30px',
     554                'height': '100%',
     555                'position': 'absolute',
     556                'top': 0,
     557                'background-color': el.val(),
    509558            } );
    510559
     
    512561            if ( 'ltr' === self.colorAlpha.css( 'direction' ) ) {
    513562                self.colorAlpha.css( {
    514                     'border-bottom-left-radius' : '2px',
    515                     'border-top-left-radius'    : '2px',
    516                     'left'                      : 0
     563                    'border-bottom-left-radius': '2px',
     564                    'border-top-left-radius': '2px',
     565                    'left': 0
    517566                } );
    518567            } else {
    519568                self.colorAlpha.css( {
    520                     'border-bottom-right-radius' : '2px',
    521                     'border-top-right-radius'    : '2px',
    522                     'right'                      : 0
     569                    'border-bottom-right-radius': '2px',
     570                    'border-top-right-radius': '2px',
     571                    'right': 0
    523572                } );
    524573            }
     
    539588                 * @returns {void}
    540589                 */
    541                 change: function( event, ui ) {
     590                change: function ( event, ui ) {
    542591                    self.colorAlpha.css( { 'background-color': ui.color.to_s( self.alphaOptions.alphaColorType ) } );
    543592
     
    559608             * @return {void}
    560609             */
    561             self.wrap.on( 'click.wpcolorpicker', function( event ) {
     610            self.wrap.on( 'click.wpcolorpicker', function ( event ) {
    562611                event.stopPropagation();
    563             });
     612            } );
    564613
    565614            /**
     
    568617             * @since 3.0.0
    569618             */
    570             self.toggler.on( 'click', function() {
     619            self.toggler.on( 'click', function () {
    571620                if ( self.toggler.hasClass( 'wp-picker-open' ) ) {
    572621                    self.close();
     
    574623                    self.open();
    575624                }
    576             });
     625            } );
    577626
    578627            /**
     
    586635             * @return {void}
    587636             */
    588             el.on( 'change', function( event ) {
     637            el.on( 'change', function ( event ) {
    589638                var val = $( this ).val();
    590639
     
    612661             * @return {void}
    613662             */
    614             self.button.on( 'click', function( event ) {
     663            self.button.on( 'click', function ( event ) {
    615664                if ( $( this ).hasClass( 'wp-picker-default' ) ) {
    616665                    el.val( self.options.defaultColor ).change();
  • word-balloon/trunk/js/wp-color-picker-alpha.min.js

    r2912717 r3322545  
    55 * Only run in input and is defined data alpha in true
    66 *
    7  * Version: 3.0.2
     7 * Version: 3.0.4
    88 * https://github.com/kallookoo/wp-color-picker-alpha
    99 * Licensed under the GPLv2 license or later.
    1010 */
    11 (function(o,a){var t={version:302};if("wpColorPickerAlpha"in window&&"version"in window.wpColorPickerAlpha){var r=parseInt(window.wpColorPickerAlpha.version,10);if(!isNaN(r)&&r>=t.version)return}if(!Color.fn.hasOwnProperty("to_s")){Color.fn.to_s=function(o){o=o||"hex","hex"===o&&this._alpha<1&&(o="rgba");var a="";return"hex"===o?a=this.toString():this.error||(a=this.toCSS(o).replace(/\(\s+/,"(").replace(/\s+\)/,")")),a},window.wpColorPickerAlpha=t;var i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==";o.widget("a8c.iris",o.a8c.iris,{alphaOptions:{alphaEnabled:!1},_getColor:function(o){return o===a&&(o=this._color),this.alphaOptions.alphaEnabled?(o=o.to_s(this.alphaOptions.alphaColorType),this.alphaOptions.alphaColorWithSpace||(o=o.replace(/\s+/g,"")),o):o.toString()},_create:function(){try{this.alphaOptions=this.element.wpColorPicker("instance").alphaOptions}catch(o){}o.extend({},this.alphaOptions,{alphaEnabled:!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"hex",alphaColorWithSpace:!1}),this._super()},_addInputListeners:function(o){var a=this,t=100,r=function(t){var r=o.val(),i=new Color(r),l=(r=r.replace(/^(#|(rgb|hsl)a?)/,""),a.alphaOptions.alphaColorType);o.removeClass("iris-error"),i.error?""!==r&&o.addClass("iris-error"):"hex"===l&&"keyup"===t.type&&r.match(/^[0-9a-fA-F]{3}$/)||i.toIEOctoHex()!==a._color.toIEOctoHex()&&a._setOption("color",a._getColor(i))};o.on("change",r).on("keyup",a._debounce(r,t)),a.options.hide&&o.one("focus",function(){a.show()})},_initControls:function(){if(this._super(),this.alphaOptions.alphaEnabled){var a=this,t=a.controls.strip.clone(!1,!1),r=t.find(".iris-slider-offset"),i={stripAlpha:t,stripAlphaSlider:r};t.addClass("iris-strip-alpha"),r.addClass("iris-slider-offset-alpha"),t.appendTo(a.picker.find(".iris-picker-inner")),o.each(i,function(o,t){a.controls[o]=t}),a.controls.stripAlphaSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*a._color._alpha),slide:function(o,t){a.active="strip",a._color._alpha=parseFloat(t.value/100),a._change.apply(a,arguments)}})}},_dimensions:function(o){if(this._super(o),this.alphaOptions.alphaEnabled){var a,t,r,i,l,e=this,s=e.options,n=e.controls,p=n.square,h=e.picker.find(".iris-strip");for(a=Math.round(e.picker.outerWidth(!0)-(s.border?22:0)),t=Math.round(p.outerWidth()),r=Math.round((a-t)/2),i=Math.round(r/2),l=Math.round(t+2*r+2*i);l>a;)r=Math.round(r-2),i=Math.round(i-1),l=Math.round(t+2*r+2*i);p.css("margin","0"),h.width(r).css("margin-left",i+"px")}},_change:function(){var a=this,t=a.active;if(a._super(),a.alphaOptions.alphaEnabled){var r=a.controls,l=parseInt(100*a._color._alpha),e=a._color.toRgb(),s=["rgb("+e.r+","+e.g+","+e.b+") 0%","rgba("+e.r+","+e.g+","+e.b+", 0) 100%"];a.picker.closest(".wp-picker-container").find(".wp-color-result");a.options.color=a._getColor(),r.stripAlpha.css({background:"linear-gradient(to bottom, "+s.join(", ")+"), url("+i+")"}),t&&r.stripAlphaSlider.slider("value",l),a._color.error||a.element.removeClass("iris-error").val(a.options.color),a.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){var t=o(this).data("color");a.alphaOptions.alphaReset&&(a._color._alpha=1,t=a._getColor()),a._setOption("color",t)})}},_paintDimension:function(o,a){var t=this,r=!1;t.alphaOptions.alphaEnabled&&"strip"===a&&(r=t._color,t._color=new Color(r.toString()),t.hue=t._color.h()),t._super(o,a),r&&(t._color=r)},_setOption:function(o,a){var t=this;if("color"!==o||!t.alphaOptions.alphaEnabled)return t._super(o,a);a=""+a,newColor=new Color(a).setHSpace(t.options.mode),newColor.error||t._getColor(newColor)===t._getColor()||(t._color=newColor,t.options.color=t._getColor(),t.active="external",t._change())},color:function(o){return!0===o?this._color.clone():o===a?this._getColor():void this.option("color",o)}}),o.widget("wp.wpColorPicker",o.wp.wpColorPicker,{alphaOptions:{alphaEnabled:!1},_getAlphaOptions:function(){var a=this.element,t=a.data("type")||this.options.type,r=a.data("defaultColor")||a.val(),i={alphaEnabled:a.data("alphaEnabled")||!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"rgb",alphaColorWithSpace:!1};return i.alphaEnabled&&(i.alphaEnabled=a.is("input")&&"full"===t),i.alphaEnabled?(i.alphaColorWithSpace=r&&r.match(/\s/),o.each(i,function(o,t){var l=a.data(o)||t;switch(o){case"alphaCustomWidth":l=l?parseInt(l,10):0,l=isNaN(l)?t:l;break;case"alphaColorType":l.match(/^(hex|(rgb|hsl)a?)$/)||(l=r&&r.match(/^#/)?"hex":r&&r.match(/^hsla?/)?"hsl":t);break;default:l=!!l}i[o]=l}),i):i},_create:function(){o.support.iris&&(this.alphaOptions=this._getAlphaOptions(),this._super())},_addListeners:function(){if(!this.alphaOptions.alphaEnabled)return this._super();var a=this,t=a.element,r=a.toggler.is("a");this.alphaOptions.defaultWidth=t.width(),this.alphaOptions.alphaCustomWidth&&t.width(parseInt(this.alphaOptions.defaultWidth+this.alphaOptions.alphaCustomWidth,10)),a.toggler.css({position:"relative","background-image":"url("+i+")"}),r?a.toggler.html('<span class="color-alpha" />'):a.toggler.append('<span class="color-alpha" />'),a.colorAlpha=a.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,"background-color":t.val()}),"ltr"===a.colorAlpha.css("direction")?a.colorAlpha.css({"border-bottom-left-radius":"2px","border-top-left-radius":"2px",left:0}):a.colorAlpha.css({"border-bottom-right-radius":"2px","border-top-right-radius":"2px",right:0}),t.iris({change:function(o,t){a.colorAlpha.css({"background-color":t.color.to_s(a.alphaOptions.alphaColorType)}),"function"==typeof a.options.change&&a.options.change.call(this,o,t)}}),a.wrap.on("click.wpcolorpicker",function(o){o.stopPropagation()}),a.toggler.on("click",function(){a.toggler.hasClass("wp-picker-open")?a.close():a.open()}),t.on("change",function(i){var l=o(this).val();(t.hasClass("iris-error")||""===l||l.match(/^(#|(rgb|hsl)a?)$/))&&(r&&a.toggler.removeAttr("style"),a.colorAlpha.css("background-color",""),"function"==typeof a.options.clear&&a.options.clear.call(this,i))}),a.button.on("click",function(i){o(this).hasClass("wp-picker-default")?t.val(a.options.defaultColor).change():o(this).hasClass("wp-picker-clear")&&(t.val(""),r&&a.toggler.removeAttr("style"),a.colorAlpha.css("background-color",""),"function"==typeof a.options.clear&&a.options.clear.call(this,i),t.trigger("change"))})}})}})(jQuery);
     11!function($){var wpColorPickerAlpha={version:304};if("wpColorPickerAlpha"in window&&"version"in window.wpColorPickerAlpha){var version=parseInt(window.wpColorPickerAlpha.version,10);if(!isNaN(version)&&version>=wpColorPickerAlpha.version)return}if(!Color.fn.hasOwnProperty("to_s")){Color.fn.to_s=function(type){if(this.error)return"";"hex"===(type=type||"hex")&&this._alpha<1&&(type="rgba");var color="";if("hex"===type)color=this.toString();else if("octohex"===type){color=this.toString();var alpha=parseInt(255*this._alpha,10).toString(16);1===alpha.length&&(alpha=`0${alpha}`),color+=alpha}else color=this.toCSS(type).replace(/\(\s+/,"(").replace(/\s+\)/,")");return color},Color.fn.fromHex=function(color){if(3===(color=color.replace(/^#/,"").replace(/^0x/,"")).length||4===color.length){for(var extendedColor="",index=0;index<color.length;index++)extendedColor+=""+color[index],extendedColor+=""+color[index];color=extendedColor}if(8===color.length){if(/^[0-9A-F]{8}$/i.test(color)){var alpha=parseInt(color.substring(6),16);isNaN(alpha)?this._error():this.a(alpha/255)}else this._error();color=color.substring(0,6)}return this.error||(this.error=!/^[0-9A-F]{6}$/i.test(color)),this.fromInt(parseInt(color,16))},window.wpColorPickerAlpha=wpColorPickerAlpha;var backgroundImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==";$.widget("a8c.iris",$.a8c.iris,{alphaOptions:{alphaEnabled:!1},_getColor:function(color){return undefined===color&&(color=this._color),this.alphaOptions.alphaEnabled?(color=color.to_s(this.alphaOptions.alphaColorType),this.alphaOptions.alphaColorWithSpace||(color=color.replace(/\s+/g,"")),color):color.toString()},_create:function(){try{this.alphaOptions=this.element.wpColorPicker("instance").alphaOptions}catch(e){}$.extend({},this.alphaOptions,{alphaEnabled:!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"hex",alphaColorWithSpace:!1,alphaSkipDebounce:!1,alphaDebounceTimeout:100}),this._super()},_addInputListeners:function(input){var self=this,callback=function(event){var val=input.val(),color=new Color(val),type=(val=val.replace(/^(#|(rgb|hsl)a?)/,""),self.alphaOptions.alphaColorType);input.removeClass("iris-error"),color.error?""!==val&&input.addClass("iris-error"):"hex"===type&&"keyup"===event.type&&val.match(/^[0-9a-fA-F]{3}$/)||color.toIEOctoHex()!==self._color.toIEOctoHex()&&self._setOption("color",self._getColor(color))};input.on("change",callback),self.alphaOptions.alphaSkipDebounce||input.on("keyup",self._debounce(callback,self.alphaOptions.alphaDebounceTimeout)),self.options.hide&&input.one("focus",(function(){self.show()}))},_initControls:function(){if(this._super(),this.alphaOptions.alphaEnabled){var self=this,stripAlpha=self.controls.strip.clone(!1,!1),stripAlphaSlider=stripAlpha.find(".iris-slider-offset"),controls={stripAlpha:stripAlpha,stripAlphaSlider:stripAlphaSlider};stripAlpha.addClass("iris-strip-alpha"),stripAlphaSlider.addClass("iris-slider-offset-alpha"),stripAlpha.appendTo(self.picker.find(".iris-picker-inner")),$.each(controls,(function(k,v){self.controls[k]=v})),self.controls.stripAlphaSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*self._color._alpha),slide:function(event,ui){self.active="strip",self._color._alpha=parseFloat(ui.value/100),self._change.apply(self,arguments)}})}},_dimensions:function(reset){if(this._super(reset),this.alphaOptions.alphaEnabled){var innerWidth,squareWidth,stripWidth,stripMargin,totalWidth,opts=this.options,square=this.controls.square,strip=this.picker.find(".iris-strip");for(innerWidth=Math.round(this.picker.outerWidth(!0)-(opts.border?22:0)),squareWidth=Math.round(square.outerWidth()),stripWidth=Math.round((innerWidth-squareWidth)/2),stripMargin=Math.round(stripWidth/2),totalWidth=Math.round(squareWidth+2*stripWidth+2*stripMargin);totalWidth>innerWidth;)stripWidth=Math.round(stripWidth-2),stripMargin=Math.round(stripMargin-1),totalWidth=Math.round(squareWidth+2*stripWidth+2*stripMargin);square.css("margin","0"),strip.width(stripWidth).css("margin-left",stripMargin+"px")}},_change:function(){var self=this,active=self.active;if(self._super(),self.alphaOptions.alphaEnabled){var controls=self.controls,alpha=parseInt(100*self._color._alpha),color=self._color.toRgb(),gradient=["rgb("+color.r+","+color.g+","+color.b+") 0%","rgba("+color.r+","+color.g+","+color.b+", 0) 100%"];self.picker.closest(".wp-picker-container").find(".wp-color-result");self.options.color=self._getColor(),controls.stripAlpha.css({background:"linear-gradient(to bottom, "+gradient.join(", ")+"), url("+backgroundImage+")"}),active&&controls.stripAlphaSlider.slider("value",alpha),self._color.error||self.element.removeClass("iris-error").val(self.options.color),self.picker.find(".iris-palette-container").on("click.palette",".iris-palette",(function(){var color=$(this).data("color");self.alphaOptions.alphaReset&&(self._color._alpha=1,color=self._getColor()),self._setOption("color",color)}))}},_paintDimension:function(origin,control){var color=!1;this.alphaOptions.alphaEnabled&&"strip"===control&&(color=this._color,this._color=new Color(color.toString()),this.hue=this._color.h()),this._super(origin,control),color&&(this._color=color)},_setOption:function(key,value){if("color"!==key||!this.alphaOptions.alphaEnabled)return this._super(key,value);value=""+value,newColor=new Color(value).setHSpace(this.options.mode),newColor.error||this._getColor(newColor)===this._getColor()||(this._color=newColor,this.options.color=this._getColor(),this.active="external",this._change())},color:function(newColor){return!0===newColor?this._color.clone():undefined===newColor?this._getColor():void this.option("color",newColor)}}),$.widget("wp.wpColorPicker",$.wp.wpColorPicker,{alphaOptions:{alphaEnabled:!1},_getAlphaOptions:function(){var el=this.element,type=el.data("type")||this.options.type,color=el.data("defaultColor")||el.val(),options={alphaEnabled:el.data("alphaEnabled")||!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"rgb",alphaColorWithSpace:!1,alphaSkipDebounce:!!el.data("alphaSkipDebounce")||!1};return options.alphaEnabled&&(options.alphaEnabled=el.is("input")&&"full"===type),options.alphaEnabled?(options.alphaColorWithSpace=color&&color.match(/\s/),$.each(options,(function(name,defaultValue){var value=el.data(name)||defaultValue;switch(name){case"alphaCustomWidth":value=value?parseInt(value,10):0,value=isNaN(value)?defaultValue:value;break;case"alphaColorType":value.match(/^((octo)?hex|(rgb|hsl)a?)$/)||(value=color&&color.match(/^#/)?"hex":color&&color.match(/^hsla?/)?"hsl":defaultValue);break;default:value=!!value}options[name]=value})),options):options},_create:function(){$.support.iris&&(this.alphaOptions=this._getAlphaOptions(),this._super())},_addListeners:function(){if(!this.alphaOptions.alphaEnabled)return this._super();var self=this,el=self.element,isDeprecated=self.toggler.is("a");this.alphaOptions.defaultWidth=el.width(),this.alphaOptions.alphaCustomWidth&&el.width(parseInt(this.alphaOptions.defaultWidth+this.alphaOptions.alphaCustomWidth,10)),self.toggler.css({position:"relative","background-image":"url("+backgroundImage+")"}),isDeprecated?self.toggler.html('<span class="color-alpha" />'):self.toggler.append('<span class="color-alpha" />'),self.colorAlpha=self.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,"background-color":el.val()}),"ltr"===self.colorAlpha.css("direction")?self.colorAlpha.css({"border-bottom-left-radius":"2px","border-top-left-radius":"2px",left:0}):self.colorAlpha.css({"border-bottom-right-radius":"2px","border-top-right-radius":"2px",right:0}),el.iris({change:function(event,ui){self.colorAlpha.css({"background-color":ui.color.to_s(self.alphaOptions.alphaColorType)}),"function"==typeof self.options.change&&self.options.change.call(this,event,ui)}}),self.wrap.on("click.wpcolorpicker",(function(event){event.stopPropagation()})),self.toggler.on("click",(function(){self.toggler.hasClass("wp-picker-open")?self.close():self.open()})),el.on("change",(function(event){var val=$(this).val();(el.hasClass("iris-error")||""===val||val.match(/^(#|(rgb|hsl)a?)$/))&&(isDeprecated&&self.toggler.removeAttr("style"),self.colorAlpha.css("background-color",""),"function"==typeof self.options.clear&&self.options.clear.call(this,event))})),self.button.on("click",(function(event){$(this).hasClass("wp-picker-default")?el.val(self.options.defaultColor).change():$(this).hasClass("wp-picker-clear")&&(el.val(""),isDeprecated&&self.toggler.removeAttr("style"),self.colorAlpha.css("background-color",""),"function"==typeof self.options.clear&&self.options.clear.call(this,event),el.trigger("change"))}))}})}}(jQuery);
  • word-balloon/trunk/readme.txt

    r3307744 r3322545  
    55Requires at least: 3.9.3
    66Tested up to: 6.7
    7 Stable tag: 4.22.4
     7Stable tag: 4.22.5
    88Requires PHP: 5.3
    99License: GNU General Public License v3 or later
     
    5151
    5252== Changelog ==
     53
     54= 4.22.5 =
     55* Released: July 5, 2025
     56* fixed: Minor fix.
    5357
    5458= 4.22.4 =
  • word-balloon/trunk/word-balloon.php

    r3307744 r3322545  
    44Plugin URI: https://dev.word-balloon.com/en/word-balloon/
    55Description: Support for Block editor(Gutenberg) & Classic Editor.You will easy to add speech balloon in your post.
    6 Version: 4.22.4
     6Version: 4.22.5
    77Author: YAHMAN
    88Author URI: https://back2nature.jp/en/
Note: See TracChangeset for help on using the changeset viewer.