Changeset 2939066
- Timestamp:
- 07/15/2023 11:06:37 PM (13 months ago)
- 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 175 175 'core/image', 176 176 'core/list', 177 177 178 'core/paragraph', 178 179 'core/preformatted', … … 208 209 $sub_title = wp_strip_all_tags( $html ); 209 210 211 212 213 210 214 // At the risk of being complicated, determine the length of the translated "Note" pretext so 211 215 // that we can build a maximum string of 50 characters. … … 243 247 break; 244 248 } elseif ( 'core/quote' === $block['blockName'] ) { 245 $sub_title = transform_content( $post_data['post_content']);249 $sub_title = ); 246 250 247 251 // A quote has been found, use its plain text equivalent and move on. … … 454 458 455 459 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 '/^("|“|”)|("|“|”)$/', 464 '', 465 htmlentities( 466 transform_block( $inner_block ) 467 ) 468 ), 469 ); 457 470 } 458 471 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 } 462 479 } elseif ( 'core/embed' === $block['blockName'] ) { 463 480 $content .= $block['attrs']['url'] ?? ''; 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 464 501 } else { 465 502 $content .= strip_html( trim( $block['innerHTML'] ) ); -
shortnotes/tags/1.6.0/plugin.php
r2876912 r2939066 8 8 * Text Domain: shortnotes 9 9 * Domain Path: /languages 10 * Version: 1. 5.010 * Version: 1..0 11 11 * 12 12 * @package shortnotes -
shortnotes/tags/1.6.0/readme.txt
r2890370 r2939066 4 4 Requires at least: 5.6 5 5 Tested up to: 6.2 6 Stable tag: 1. 5.06 Stable tag: 1..0 7 7 License: GPLv2 or Later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 13 13 ## Description 14 14 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.15 Shortnotes adds a custom post type, **Notes**, . 16 16 17 17 ### No titles … … 25 25 ### Limited blocks 26 26 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.27 The **Notes** post type , gallery, video, and embed. Using a defined list of relatively simple blocks helps to keep notes simple. 28 28 29 29 ### Webmention support … … 63 63 64 64 ## Changelog 65 66 67 68 69 70 71 72 73 74 65 75 66 76 ### 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 175 175 'core/image', 176 176 'core/list', 177 177 178 'core/paragraph', 178 179 'core/preformatted', … … 208 209 $sub_title = wp_strip_all_tags( $html ); 209 210 211 212 213 210 214 // At the risk of being complicated, determine the length of the translated "Note" pretext so 211 215 // that we can build a maximum string of 50 characters. … … 243 247 break; 244 248 } elseif ( 'core/quote' === $block['blockName'] ) { 245 $sub_title = transform_content( $post_data['post_content']);249 $sub_title = ); 246 250 247 251 // A quote has been found, use its plain text equivalent and move on. … … 454 458 455 459 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 '/^("|“|”)|("|“|”)$/', 464 '', 465 htmlentities( 466 transform_block( $inner_block ) 467 ) 468 ), 469 ); 457 470 } 458 471 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 } 462 479 } elseif ( 'core/embed' === $block['blockName'] ) { 463 480 $content .= $block['attrs']['url'] ?? ''; 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 464 501 } else { 465 502 $content .= strip_html( trim( $block['innerHTML'] ) ); -
shortnotes/trunk/plugin.php
r2876912 r2939066 8 8 * Text Domain: shortnotes 9 9 * Domain Path: /languages 10 * Version: 1. 5.010 * Version: 1..0 11 11 * 12 12 * @package shortnotes -
shortnotes/trunk/readme.txt
r2890370 r2939066 4 4 Requires at least: 5.6 5 5 Tested up to: 6.2 6 Stable tag: 1. 5.06 Stable tag: 1..0 7 7 License: GPLv2 or Later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 13 13 ## Description 14 14 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.15 Shortnotes adds a custom post type, **Notes**, . 16 16 17 17 ### No titles … … 25 25 ### Limited blocks 26 26 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.27 The **Notes** post type , gallery, video, and embed. Using a defined list of relatively simple blocks helps to keep notes simple. 28 28 29 29 ### Webmention support … … 63 63 64 64 ## Changelog 65 66 67 68 69 70 71 72 73 74 65 75 66 76 ### 1.5.0
Note: See TracChangeset
for help on using the changeset viewer.