Plugin Directory

Changeset 2987196

Timestamp:
11/01/2023 05:57:52 AM (9 months ago)
Author:
jeremyfelt
Message:

Update to version 1.6.2 from GitHub

Location:
shortnotes
Files:
2 added
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shortnotes/tags/1.6.2/build/index.asset.php

    r2939066 r2987196  
    1 <?php return array('dependencies' => array('wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '508f05b7a61d9b3980de');
     1<?php return array('dependencies' => array('');
  • shortnotes/tags/1.6.2/build/index.js

    r2939066 r2987196  
    1 (()=>{"use strict";const e=window.wp.element,t=window.wp.i18n,o=window.wp.plugins,n=window.wp.components,l=window.wp.editPost,r=window.wp.data;(0,o.registerPlugin)("note-type-panel",{render:()=>{const o=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta"))),{editPost:s}=(0,r.useDispatch)("core/editor"),a=(e,t)=>{s({meta:{[e]:t}})},p=e=>""!==e.shortnotes_reply_to_url?"reply":""===e.shortnotes_note_type?"note":e.shortnotes_note_type;return(0,e.createElement)(l.PluginDocumentSettingPanel,{name:"note-type-panel",title:(0,t.__)("Note data","shortnotes"),icon:!1},(0,e.createElement)(n.SelectControl,{label:(0,t.__)("Note type","shortnotes"),value:p(o),options:[{label:"Note",value:"note"},{label:"Reply",value:"reply"}],onChange:e=>a("shortnotes_note_type",e)}),"reply"===p(o)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.TextControl,{label:(0,t.__)("Reply to URL","shortnotes"),help:(0,t.__)("Enter the URL to which this note is a reply","shortnotes"),value:o.shortnotes_reply_to_url,onChange:e=>a("shortnotes_reply_to_url",e)}),(0,e.createElement)(n.TextControl,{label:(0,t.__)("Reply to name (optional)","shortnotes"),help:(0,t.__)('Enter a name this reply is directed to. Defaults to "this post".',"shortnotes"),value:o.shortnotes_reply_to_name,onChange:e=>a("shortnotes_reply_to_name",e)})))},icon:""})})();
     1();
  • shortnotes/tags/1.6.2/includes/post-type-note.php

    r2939066 r2987196  
    162162 *       function from the `allowed_block_types` filter won't cause any trouble.
    163163 *
    164  * @param bool|array $allowed_block_types A list of allowed block types. Boolean true by default.
    165  * @param \WP_Post   $post                The current note.
    166  * @return array A modified list of allowed block types.
     164 * @param bool| $allowed_block_types A list of allowed block types. Boolean true by default.
     165 * @param \WP_Post   $post                The current note.
     166 * @return A modified list of allowed block types.
    167167 */
    168168function filter_allowed_block_types( $allowed_block_types, \WP_Post $post ) {
     
    380380    }
    381381
    382     $current_post    = get_post();
     382    $current_post = get_post();
     383
     384    // We can only adjust content with context, which WordPress does not
     385    // guarantee when filtering `the_content`.
     386    if ( ! $current_post ) {
     387        return $content;
     388    }
     389
    383390    $reply_to_markup = get_reply_to_markup( $current_post );
    384391
     
    409416
    410417/**
    411  * Parse and move anchors to the end of post content.
    412  *
    413  * @param string $html The post content.
    414  * @return array Modified post content.
     418 * content.
     419 *
     420 * @param string $html The content.
     421 * @return .
    415422 */
    416423function extract_links( string $html ): array {
     
    419426    $links = array_filter(
    420427        $matches[2],
    421         function( $link ) {
     428        function( $link ) {
    422429            return wp_parse_url( $link, PHP_URL_HOST );
    423430        }
  • shortnotes/tags/1.6.2/includes/share-on-mastodon.php

    r2876912 r2987196  
    1818 * @param array    $args The args sent with a new Mastodon post.
    1919 * @param \WP_Post $post The post object.
     20
    2021 */
    21 function filter_args( array $args, \WP_Post $post ) : array {
     22function filter_args( array $args, \WP_Post $post ): array {
    2223    if ( Note\get_slug() !== $post->post_type ) {
    2324        return $args;
     
    6364 * @return int The status ID if available. 0 if not.
    6465 */
    65 function get_reply_to_id( string $url ) : int {
     66function get_reply_to_id( string $url ): int {
    6667    $site_host = wp_parse_url( home_url(), PHP_URL_HOST );
    6768    $url_host  = wp_parse_url( $url, PHP_URL_HOST );
  • shortnotes/tags/1.6.2/plugin.php

    r2939069 r2987196  
    88 * Text Domain:     shortnotes
    99 * Domain Path:     /languages
    10  * Version:         1.6.1
     10 * Version:         1.6.
    1111 *
    1212 * @package shortnotes
     
    1818}
    1919
    20 // This plugin, like WordPress, requires PHP 5.6 and higher.
    21 if ( version_compare( PHP_VERSION, '5.6', '<' ) ) {
    22     add_action( 'admin_notices', 'shortnotes_admin_notice' );
    23     /**
    24      * Display an admin notice if PHP is not 5.6.
    25      */
    26     function shortnotes_admin_notice() {
    27         echo '<div class=\"error\"><p>';
    28         echo __( 'The Shortnotes WordPress plugin requires PHP 5.6 to function properly. Please upgrade PHP or deactivate the plugin.', 'shortnotes' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    29         echo '</p></div>';
    30     }
    31 
    32     return;
    33 }
    34 
    3520require_once __DIR__ . '/includes/common.php';
    3621require_once __DIR__ . '/includes/post-type-note.php';
  • shortnotes/tags/1.6.2/readme.txt

    r2939069 r2987196  
    33Tags: indieweb, notes, replies, short
    44Requires at least: 5.6
    5 Tested up to: 6.2
    6 Stable tag: 1.6.1
     5Tested up to: 6.
     6Stable tag: 1.6.
    77License: GPLv2 or Later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6363
    6464## Changelog
     65
     66
     67
     68
     69
     70
     71
     72
    6573
    6674### 1.6.1
  • shortnotes/trunk/build/index.asset.php

    r2939066 r2987196  
    1 <?php return array('dependencies' => array('wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => '508f05b7a61d9b3980de');
     1<?php return array('dependencies' => array('');
  • shortnotes/trunk/build/index.js

    r2939066 r2987196  
    1 (()=>{"use strict";const e=window.wp.element,t=window.wp.i18n,o=window.wp.plugins,n=window.wp.components,l=window.wp.editPost,r=window.wp.data;(0,o.registerPlugin)("note-type-panel",{render:()=>{const o=(0,r.useSelect)((e=>e("core/editor").getEditedPostAttribute("meta"))),{editPost:s}=(0,r.useDispatch)("core/editor"),a=(e,t)=>{s({meta:{[e]:t}})},p=e=>""!==e.shortnotes_reply_to_url?"reply":""===e.shortnotes_note_type?"note":e.shortnotes_note_type;return(0,e.createElement)(l.PluginDocumentSettingPanel,{name:"note-type-panel",title:(0,t.__)("Note data","shortnotes"),icon:!1},(0,e.createElement)(n.SelectControl,{label:(0,t.__)("Note type","shortnotes"),value:p(o),options:[{label:"Note",value:"note"},{label:"Reply",value:"reply"}],onChange:e=>a("shortnotes_note_type",e)}),"reply"===p(o)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.TextControl,{label:(0,t.__)("Reply to URL","shortnotes"),help:(0,t.__)("Enter the URL to which this note is a reply","shortnotes"),value:o.shortnotes_reply_to_url,onChange:e=>a("shortnotes_reply_to_url",e)}),(0,e.createElement)(n.TextControl,{label:(0,t.__)("Reply to name (optional)","shortnotes"),help:(0,t.__)('Enter a name this reply is directed to. Defaults to "this post".',"shortnotes"),value:o.shortnotes_reply_to_name,onChange:e=>a("shortnotes_reply_to_name",e)})))},icon:""})})();
     1();
  • shortnotes/trunk/includes/post-type-note.php

    r2939066 r2987196  
    162162 *       function from the `allowed_block_types` filter won't cause any trouble.
    163163 *
    164  * @param bool|array $allowed_block_types A list of allowed block types. Boolean true by default.
    165  * @param \WP_Post   $post                The current note.
    166  * @return array A modified list of allowed block types.
     164 * @param bool| $allowed_block_types A list of allowed block types. Boolean true by default.
     165 * @param \WP_Post   $post                The current note.
     166 * @return A modified list of allowed block types.
    167167 */
    168168function filter_allowed_block_types( $allowed_block_types, \WP_Post $post ) {
     
    380380    }
    381381
    382     $current_post    = get_post();
     382    $current_post = get_post();
     383
     384    // We can only adjust content with context, which WordPress does not
     385    // guarantee when filtering `the_content`.
     386    if ( ! $current_post ) {
     387        return $content;
     388    }
     389
    383390    $reply_to_markup = get_reply_to_markup( $current_post );
    384391
     
    409416
    410417/**
    411  * Parse and move anchors to the end of post content.
    412  *
    413  * @param string $html The post content.
    414  * @return array Modified post content.
     418 * content.
     419 *
     420 * @param string $html The content.
     421 * @return .
    415422 */
    416423function extract_links( string $html ): array {
     
    419426    $links = array_filter(
    420427        $matches[2],
    421         function( $link ) {
     428        function( $link ) {
    422429            return wp_parse_url( $link, PHP_URL_HOST );
    423430        }
  • shortnotes/trunk/includes/share-on-mastodon.php

    r2876912 r2987196  
    1818 * @param array    $args The args sent with a new Mastodon post.
    1919 * @param \WP_Post $post The post object.
     20
    2021 */
    21 function filter_args( array $args, \WP_Post $post ) : array {
     22function filter_args( array $args, \WP_Post $post ): array {
    2223    if ( Note\get_slug() !== $post->post_type ) {
    2324        return $args;
     
    6364 * @return int The status ID if available. 0 if not.
    6465 */
    65 function get_reply_to_id( string $url ) : int {
     66function get_reply_to_id( string $url ): int {
    6667    $site_host = wp_parse_url( home_url(), PHP_URL_HOST );
    6768    $url_host  = wp_parse_url( $url, PHP_URL_HOST );
  • shortnotes/trunk/plugin.php

    r2939069 r2987196  
    88 * Text Domain:     shortnotes
    99 * Domain Path:     /languages
    10  * Version:         1.6.1
     10 * Version:         1.6.
    1111 *
    1212 * @package shortnotes
     
    1818}
    1919
    20 // This plugin, like WordPress, requires PHP 5.6 and higher.
    21 if ( version_compare( PHP_VERSION, '5.6', '<' ) ) {
    22     add_action( 'admin_notices', 'shortnotes_admin_notice' );
    23     /**
    24      * Display an admin notice if PHP is not 5.6.
    25      */
    26     function shortnotes_admin_notice() {
    27         echo '<div class=\"error\"><p>';
    28         echo __( 'The Shortnotes WordPress plugin requires PHP 5.6 to function properly. Please upgrade PHP or deactivate the plugin.', 'shortnotes' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    29         echo '</p></div>';
    30     }
    31 
    32     return;
    33 }
    34 
    3520require_once __DIR__ . '/includes/common.php';
    3621require_once __DIR__ . '/includes/post-type-note.php';
  • shortnotes/trunk/readme.txt

    r2939069 r2987196  
    33Tags: indieweb, notes, replies, short
    44Requires at least: 5.6
    5 Tested up to: 6.2
    6 Stable tag: 1.6.1
     5Tested up to: 6.
     6Stable tag: 1.6.
    77License: GPLv2 or Later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6363
    6464## Changelog
     65
     66
     67
     68
     69
     70
     71
     72
    6573
    6674### 1.6.1
Note: See TracChangeset for help on using the changeset viewer.