Changeset 3019809
- Timestamp:
- 01/10/2024 11:44:02 AM (2 years ago)
- Location:
- share-on-mastodon
- Files:
-
- 10 edited
- 1 copied
-
tags/0.17.3 (copied) (copied from share-on-mastodon/trunk)
-
tags/0.17.3/assets/block-editor.js (modified) (1 diff)
-
tags/0.17.3/includes/class-options-handler.php (modified) (2 diffs)
-
tags/0.17.3/includes/class-share-on-mastodon.php (modified) (1 diff)
-
tags/0.17.3/readme.txt (modified) (2 diffs)
-
tags/0.17.3/share-on-mastodon.php (modified) (1 diff)
-
trunk/assets/block-editor.js (modified) (1 diff)
-
trunk/includes/class-options-handler.php (modified) (2 diffs)
-
trunk/includes/class-share-on-mastodon.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/share-on-mastodon.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
share-on-mastodon/tags/0.17.3/assets/block-editor.js
r2961502 r3019809 68 68 }, 6000 ); 69 69 70 try { 71 apiFetch( { 72 path: url.addQueryArgs( '/share-on-mastodon/v1/url', { post_id: postId } ), 73 signal: controller.signal, // That time-out thingy. 74 } ).then( function( response ) { 75 clearTimeout( timeoutId ); 76 77 if ( response.hasOwnProperty( 'url' ) && isValidUrl( response.url ) ) { 78 setMastoUrl( response.url ); 79 } 80 81 setError( response.error ?? '' ); 82 } ).catch( function( error ) { 83 // The request timed out or otherwise failed. Leave as is. 84 throw new Error( 'The "Get URL" request failed.' ) 85 } ); 86 } catch ( error ) { 87 return false; 88 } 89 90 // All good. 91 return true; 70 apiFetch( { 71 path: url.addQueryArgs( '/share-on-mastodon/v1/url', { post_id: postId } ), 72 signal: controller.signal, // That time-out thingy. 73 } ).then( function( response ) { 74 clearTimeout( timeoutId ); 75 76 if ( response.hasOwnProperty( 'url' ) && isValidUrl( response.url ) ) { 77 setMastoUrl( response.url ); 78 } 79 80 setError( response.error ?? '' ); 81 } ).catch( function( error ) { 82 // The request timed out or otherwise failed. Leave as is. 83 console.debug( '[Share on Mastodon] "Get URL" request failed.' ); 84 } ); 92 85 }; 93 86 -
share-on-mastodon/tags/0.17.3/includes/class-options-handler.php
r2993570 r3019809 461 461 <tr valign="top"> 462 462 <th scope="row"><label for="share_on_mastodon_settings[max_images]"><?php esc_html_e( 'Max. No. of Images', 'share-on-mastodon' ); ?></label></th> 463 <td><input type="number" min="0" max="4" style="width: 6em;" id="share_on_mastodon_settings[max_images]" name="share_on_mastodon_settings[max_images]" value="<?php echo esc_attr( ! empty( $this->options['max_images'] ) ? $this->options['max_images'] : '4' ); ?>" />463 <td><input type="number" min="0" max="4" style="width: 6em;" id="share_on_mastodon_settings[max_images]" name="share_on_mastodon_settings[max_images]" value="<?php echo esc_attr( isset( $this->options['max_images'] ) ? $this->options['max_images'] : '4' ); ?>" /> 464 464 <p class="description"><?php esc_html_e( 'The maximum number of images that will be uploaded. (Mastodon supports up to 4 images.)', 'share-on-mastodon' ); ?></p></td> 465 465 </tr> … … 783 783 } 784 784 785 $this->options = array_combine( array_keys( self::SCHEMA ), array_column( self::SCHEMA, 'default' ));785 $this->options = static::get_default_options(); 786 786 787 787 update_option( 'share_on_mastodon_settings', $this->options ); -
share-on-mastodon/tags/0.17.3/includes/class-share-on-mastodon.php
r2993570 r3019809 12 12 */ 13 13 class Share_On_Mastodon { 14 const PLUGIN_VERSION = '0.17. 2';14 const PLUGIN_VERSION = '0.17.3'; 15 15 16 16 /** -
share-on-mastodon/tags/0.17.3/readme.txt
r2993570 r3019809 3 3 Tags: mastodon, share, publicize, crosspost, fediverse, syndication, posse 4 4 Tested up to: 6.4 5 Stable tag: 0.17. 25 Stable tag: 0.17.3 6 6 License: GNU General Public License v3.0 7 7 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 29 29 30 30 == Changelog == 31 = 0.17.3 = 32 Fix max images option. 33 31 34 = 0.17.2 = 32 35 Fix permalinks with emoji in them. Somewhat smarter `%excerpt%` lengths. -
share-on-mastodon/tags/0.17.3/share-on-mastodon.php
r2993570 r3019809 9 9 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 * Text Domain: share-on-mastodon 11 * Version: 0.17. 211 * Version: 0.17.3 12 12 * Requires at least: 5.9 13 13 * -
share-on-mastodon/trunk/assets/block-editor.js
r2961502 r3019809 68 68 }, 6000 ); 69 69 70 try { 71 apiFetch( { 72 path: url.addQueryArgs( '/share-on-mastodon/v1/url', { post_id: postId } ), 73 signal: controller.signal, // That time-out thingy. 74 } ).then( function( response ) { 75 clearTimeout( timeoutId ); 76 77 if ( response.hasOwnProperty( 'url' ) && isValidUrl( response.url ) ) { 78 setMastoUrl( response.url ); 79 } 80 81 setError( response.error ?? '' ); 82 } ).catch( function( error ) { 83 // The request timed out or otherwise failed. Leave as is. 84 throw new Error( 'The "Get URL" request failed.' ) 85 } ); 86 } catch ( error ) { 87 return false; 88 } 89 90 // All good. 91 return true; 70 apiFetch( { 71 path: url.addQueryArgs( '/share-on-mastodon/v1/url', { post_id: postId } ), 72 signal: controller.signal, // That time-out thingy. 73 } ).then( function( response ) { 74 clearTimeout( timeoutId ); 75 76 if ( response.hasOwnProperty( 'url' ) && isValidUrl( response.url ) ) { 77 setMastoUrl( response.url ); 78 } 79 80 setError( response.error ?? '' ); 81 } ).catch( function( error ) { 82 // The request timed out or otherwise failed. Leave as is. 83 console.debug( '[Share on Mastodon] "Get URL" request failed.' ); 84 } ); 92 85 }; 93 86 -
share-on-mastodon/trunk/includes/class-options-handler.php
r2993570 r3019809 461 461 <tr valign="top"> 462 462 <th scope="row"><label for="share_on_mastodon_settings[max_images]"><?php esc_html_e( 'Max. No. of Images', 'share-on-mastodon' ); ?></label></th> 463 <td><input type="number" min="0" max="4" style="width: 6em;" id="share_on_mastodon_settings[max_images]" name="share_on_mastodon_settings[max_images]" value="<?php echo esc_attr( ! empty( $this->options['max_images'] ) ? $this->options['max_images'] : '4' ); ?>" />463 <td><input type="number" min="0" max="4" style="width: 6em;" id="share_on_mastodon_settings[max_images]" name="share_on_mastodon_settings[max_images]" value="<?php echo esc_attr( isset( $this->options['max_images'] ) ? $this->options['max_images'] : '4' ); ?>" /> 464 464 <p class="description"><?php esc_html_e( 'The maximum number of images that will be uploaded. (Mastodon supports up to 4 images.)', 'share-on-mastodon' ); ?></p></td> 465 465 </tr> … … 783 783 } 784 784 785 $this->options = array_combine( array_keys( self::SCHEMA ), array_column( self::SCHEMA, 'default' ));785 $this->options = static::get_default_options(); 786 786 787 787 update_option( 'share_on_mastodon_settings', $this->options ); -
share-on-mastodon/trunk/includes/class-share-on-mastodon.php
r2993570 r3019809 12 12 */ 13 13 class Share_On_Mastodon { 14 const PLUGIN_VERSION = '0.17. 2';14 const PLUGIN_VERSION = '0.17.3'; 15 15 16 16 /** -
share-on-mastodon/trunk/readme.txt
r2993570 r3019809 3 3 Tags: mastodon, share, publicize, crosspost, fediverse, syndication, posse 4 4 Tested up to: 6.4 5 Stable tag: 0.17. 25 Stable tag: 0.17.3 6 6 License: GNU General Public License v3.0 7 7 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 29 29 30 30 == Changelog == 31 = 0.17.3 = 32 Fix max images option. 33 31 34 = 0.17.2 = 32 35 Fix permalinks with emoji in them. Somewhat smarter `%excerpt%` lengths. -
share-on-mastodon/trunk/share-on-mastodon.php
r2993570 r3019809 9 9 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 * Text Domain: share-on-mastodon 11 * Version: 0.17. 211 * Version: 0.17.3 12 12 * Requires at least: 5.9 13 13 *
Note: See TracChangeset
for help on using the changeset viewer.