Plugin Directory

Changeset 2939066

Timestamp:
07/15/2023 11:06:37 PM (13 months ago)
Author:
jeremyfelt
Message:

Update to version 1.6.0 from GitHub

Location:
shortnotes
Files:
10 edited
1 copied

Legend:

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

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

    r2703548 r2939066  
    1 !function(){"use strict";var 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.0/includes/post-type-note.php

    r2876912 r2939066  
    175175            'core/image',
    176176            'core/list',
     177
    177178            'core/paragraph',
    178179            'core/preformatted',
     
    208209    $sub_title = wp_strip_all_tags( $html );
    209210
     211
     212
     213
    210214    // At the risk of being complicated, determine the length of the translated "Note" pretext so
    211215    // that we can build a maximum string of 50 characters.
     
    243247            break;
    244248        } elseif ( 'core/quote' === $block['blockName'] ) {
    245             $sub_title = transform_content( $post_data['post_content'] );
     249            $sub_title = );
    246250
    247251            // A quote has been found, use its plain text equivalent and move on.
     
    454458
    455459        foreach ( $block['innerBlocks'] as $inner_block ) {
    456             $content .= transform_block( $inner_block );
     460            // Strip leading and trailing double quotation marks.
     461            $content .= html_entity_decode(
     462                preg_replace(
     463                    '/^(&quot;|&ldquo;|&rdquo;)|(&quot;|&ldquo;|&rdquo;)$/',
     464                    '',
     465                    htmlentities(
     466                        transform_block( $inner_block )
     467                    )
     468                ),
     469            );
    457470        }
    458471
    459         // Quotes use a dash before the citation is appended.
    460         $content .= '” - ';
    461         $content .= strip_html( trim( $block['innerHTML'] ) );
     472        $citation = trim( ltrim( trim( strip_html( $block['innerHTML'] ) ), '-' ) );
     473
     474        if ( '' !== $citation ) {
     475            $content .= '” - ' . $citation;
     476        } else {
     477            $content .= '”';
     478        }
    462479    } elseif ( 'core/embed' === $block['blockName'] ) {
    463480        $content .= $block['attrs']['url'] ?? '';
     481
     482
     483
     484
     485
     486
     487
     488
     489
     490
     491
     492
     493
     494
     495
     496
     497
     498
     499
     500
    464501    } else {
    465502        $content .= strip_html( trim( $block['innerHTML'] ) );
  • shortnotes/tags/1.6.0/plugin.php

    r2876912 r2939066  
    88 * Text Domain:     shortnotes
    99 * Domain Path:     /languages
    10  * Version:         1.5.0
     10 * Version:         1..0
    1111 *
    1212 * @package shortnotes
  • shortnotes/tags/1.6.0/readme.txt

    r2890370 r2939066  
    44Requires at least: 5.6
    55Tested up to: 6.2
    6 Stable tag: 1.5.0
     6Stable tag: 1..0
    77License: GPLv2 or Later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1313## Description
    1414
    15 Shortnotes adds a custom post type, **Notes**, intended for use when publishing short pieces of content, similar to that found on Twitter, Instagram, and other social networks.
     15Shortnotes adds a custom post type, **Notes**, .
    1616
    1717### No titles
     
    2525### Limited blocks
    2626
    27 The **Notes** post type uses only basic content blocks like paragraph, image, gallery, video, and embed. Using a defined list of relatively simple blocks helps to keep notes simple.
     27The **Notes** post type , gallery, video, and embed. Using a defined list of relatively simple blocks helps to keep notes simple.
    2828
    2929### Webmention support
     
    6363
    6464## Changelog
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
    6575
    6676### 1.5.0
  • shortnotes/trunk/build/index.asset.php

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

    r2703548 r2939066  
    1 !function(){"use strict";var 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

    r2876912 r2939066  
    175175            'core/image',
    176176            'core/list',
     177
    177178            'core/paragraph',
    178179            'core/preformatted',
     
    208209    $sub_title = wp_strip_all_tags( $html );
    209210
     211
     212
     213
    210214    // At the risk of being complicated, determine the length of the translated "Note" pretext so
    211215    // that we can build a maximum string of 50 characters.
     
    243247            break;
    244248        } elseif ( 'core/quote' === $block['blockName'] ) {
    245             $sub_title = transform_content( $post_data['post_content'] );
     249            $sub_title = );
    246250
    247251            // A quote has been found, use its plain text equivalent and move on.
     
    454458
    455459        foreach ( $block['innerBlocks'] as $inner_block ) {
    456             $content .= transform_block( $inner_block );
     460            // Strip leading and trailing double quotation marks.
     461            $content .= html_entity_decode(
     462                preg_replace(
     463                    '/^(&quot;|&ldquo;|&rdquo;)|(&quot;|&ldquo;|&rdquo;)$/',
     464                    '',
     465                    htmlentities(
     466                        transform_block( $inner_block )
     467                    )
     468                ),
     469            );
    457470        }
    458471
    459         // Quotes use a dash before the citation is appended.
    460         $content .= '” - ';
    461         $content .= strip_html( trim( $block['innerHTML'] ) );
     472        $citation = trim( ltrim( trim( strip_html( $block['innerHTML'] ) ), '-' ) );
     473
     474        if ( '' !== $citation ) {
     475            $content .= '” - ' . $citation;
     476        } else {
     477            $content .= '”';
     478        }
    462479    } elseif ( 'core/embed' === $block['blockName'] ) {
    463480        $content .= $block['attrs']['url'] ?? '';
     481
     482
     483
     484
     485
     486
     487
     488
     489
     490
     491
     492
     493
     494
     495
     496
     497
     498
     499
     500
    464501    } else {
    465502        $content .= strip_html( trim( $block['innerHTML'] ) );
  • shortnotes/trunk/plugin.php

    r2876912 r2939066  
    88 * Text Domain:     shortnotes
    99 * Domain Path:     /languages
    10  * Version:         1.5.0
     10 * Version:         1..0
    1111 *
    1212 * @package shortnotes
  • shortnotes/trunk/readme.txt

    r2890370 r2939066  
    44Requires at least: 5.6
    55Tested up to: 6.2
    6 Stable tag: 1.5.0
     6Stable tag: 1..0
    77License: GPLv2 or Later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1313## Description
    1414
    15 Shortnotes adds a custom post type, **Notes**, intended for use when publishing short pieces of content, similar to that found on Twitter, Instagram, and other social networks.
     15Shortnotes adds a custom post type, **Notes**, .
    1616
    1717### No titles
     
    2525### Limited blocks
    2626
    27 The **Notes** post type uses only basic content blocks like paragraph, image, gallery, video, and embed. Using a defined list of relatively simple blocks helps to keep notes simple.
     27The **Notes** post type , gallery, video, and embed. Using a defined list of relatively simple blocks helps to keep notes simple.
    2828
    2929### Webmention support
     
    6363
    6464## Changelog
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
    6575
    6676### 1.5.0
Note: See TracChangeset for help on using the changeset viewer.