Changeset 2637083
- Timestamp:
- 11/29/2021 09:36:59 PM (4 years ago)
- Location:
- music-sheet-viewer/trunk
- Files:
-
- 2 edited
-
music-sheet-viewer.php (modified) (7 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
music-sheet-viewer/trunk/music-sheet-viewer.php
r2625804 r2637083 8 8 * License: GPL3 9 9 * License URI: https://www.gnu.org/licenses/gpl-3.0.html 10 * Version: 3.2 10 * Version: 3.2.1 11 11 12 12 Copyright Etienne Frejaville 2018, 2019, 2020, 2021 … … 30 30 class MusicSheetViewerPlugin 31 31 { 32 const MSV_VERSION = '3.2 ';32 const MSV_VERSION = '3.2.1'; 33 33 34 34 const MSV_SHORTCODE = 'pn_msv'; … … 134 134 { 135 135 add_action('wp_enqueue_scripts', array($this,'hook_javascript')); 136 // enqueue block assets on the front-end and the editor 137 add_action('enqueue_block_assets', array($this,'register_block')); 136 138 add_shortcode (self::MSV_SHORTCODE, array($this, 'process_shortcode')); 137 139 add_filter('upload_mimes', array($this, 'allowed_mimetypes'), 1, 1); … … 140 142 add_action('wp_ajax_readfile', array($this, 'read_score_file')); 141 143 add_action('wp_ajax_nopriv_readfile', array($this, 'read_score_file')); 142 $this->register_block();143 144 } 144 145 … … 146 147 * Register MSV Block 147 148 */ 148 p rotectedfunction register_block()149 public function register_block() 149 150 { 150 151 // Skip block registration if Gutenberg is not enabled/merged. 151 152 if (!function_exists('register_block_type')) { 153 error_log('Music Sheet Viewer ERROR : Cannot register block : Function register_block_type does not exist'); 152 154 return; 153 155 } 154 156 155 wp_ register_script('music-sheet-viewer-pn-msv',157 wp_enqueue_script('music-sheet-viewer-pn-msv', 156 158 plugins_url('js/block.js', __FILE__), 157 159 array( … … 165 167 // !!!! _ forbidden in extension/bloc 166 168 // https://github.com/WordPress/gutenberg/issues/13074 167 register_block_type(self::MSV_BLOCK, array(169 if (false == register_block_type(self::MSV_BLOCK, array( 168 170 'editor_script' => 'music-sheet-viewer-pn-msv', 169 171 'render_callback' => array($this, 'process_block'), … … 203 205 ] 204 206 ) 205 ); 207 ) 208 ) error_log("Music Sheet Viewer ERROR : Cannot register block type: ".self::MSV_BLOCK); 206 209 } 207 210 -
music-sheet-viewer/trunk/readme.txt
r2625804 r2637083 78 78 == Changelog == 79 79 80 = 3.2.1 = 81 * Fix for MSV block that may not show in block search field 82 80 83 = 3.2 = 81 84 * Embedding of Leland font from MuseScore
Note: See TracChangeset
for help on using the changeset viewer.