Changeset 2940447
- Timestamp:
- 07/19/2023 03:35:48 PM (3 years ago)
- Location:
- faustwp
- Files:
-
- 10 edited
- 1 copied
-
tags/1.0.1 (copied) (copied from faustwp/trunk)
-
tags/1.0.1/CHANGELOG.md (modified) (1 diff)
-
tags/1.0.1/faustwp.php (modified) (1 diff)
-
tags/1.0.1/includes/replacement/callbacks.php (modified) (1 diff)
-
tags/1.0.1/includes/replacement/previewlinks.js (modified) (4 diffs)
-
tags/1.0.1/readme.txt (modified) (3 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/faustwp.php (modified) (1 diff)
-
trunk/includes/replacement/callbacks.php (modified) (1 diff)
-
trunk/includes/replacement/previewlinks.js (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
faustwp/tags/1.0.1/CHANGELOG.md
r2925480 r2940447 1 1 # Faust 2 3 ## 1.0.1 4 5 ### Patch Changes 6 7 - 9ed3c40: Bug: Fixed an issue where the preview button could crash the browser 2 8 3 9 ## 1.0.0 -
faustwp/tags/1.0.1/faustwp.php
r2925480 r2940447 10 10 * Text Domain: faustwp 11 11 * Domain Path: /languages 12 * Version: 1.0. 012 * Version: 1.0.1 13 13 * Requires PHP: 7.2 14 14 * Requires at least: 5.7 -
faustwp/tags/1.0.1/includes/replacement/callbacks.php
r2890342 r2940447 232 232 */ 233 233 function enqueue_preview_scripts() { 234 wp_enqueue_script( 'faustwp-gutenberg-filters', plugins_url( '/previewlinks.js', __FILE__ ), array( ), '1.0.0', true );234 wp_enqueue_script( 'faustwp-gutenberg-filters', plugins_url( '/previewlinks.js', __FILE__ ), array( 'jquery' ), '1.0.0', true ); 235 235 wp_localize_script( 'faustwp-gutenberg-filters', '_faustwp_preview_link', array( '_preview_link' => get_preview_post_link() ) ); 236 236 } -
faustwp/tags/1.0.1/includes/replacement/previewlinks.js
r2638668 r2940447 4 4 5 5 window.addEventListener('DOMContentLoaded', function () { 6 wp.domReady(function () {6 jQuery(document).ready(function () { 7 7 // Get the correct preview link via wp_localize_script 8 8 const previewLink = window._faustwp_preview_link 9 ? window._faustwp_preview_link._preview_link9 ? window._faustwp_preview_link._preview_link 10 10 : undefined; 11 11 … … 19 19 20 20 const intervalId = setInterval(function () { 21 const previewButton = document.querySelectorAll(21 const previewButton = jQuery( 22 22 'button[class~="block-editor-post-preview__button-toggle"]', 23 23 ); … … 28 28 29 29 clearInterval(intervalId); 30 previewButton [0].addEventListener('click', function () {30 previewButton.first().one('click', function () { 31 31 setTimeout(function () { 32 const links = document.querySelectorAll('a[target*="wp-preview"]');32 const links = jQuery('a[target*="wp-preview"]'); 33 33 34 34 if (!links.length) { … … 36 36 } 37 37 38 links. forEach((link) => {38 links.each((i, link) => { 39 39 link.href = previewLink; 40 40 41 41 var copy = link.cloneNode(true); 42 copy.addEventListener('click', function ( ev) {42 copy.addEventListener('click', function () { 43 43 previewButton[0].click(); 44 44 -
faustwp/tags/1.0.1/readme.txt
r2925480 r2940447 4 4 Requires at least: 5.7 5 5 Tested up to: 6.2 6 Stable tag: 1.0. 06 Stable tag: 1.0.1 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later … … 55 55 == Changelog == 56 56 57 = 1.0.1 = 58 59 ### Patch Changes 60 61 - 9ed3c40: Bug: Fixed an issue where the preview button could crash the browser 62 57 63 = 1.0.0 = 58 64 … … 71 77 - 2eeb366: The default plugin setting for "Disable WordPress Theme Admin Pages" is now unchecked, requiring a user to opt-in after initial activation. 72 78 73 = 0.8.6 =74 75 ### Patch Changes76 77 - 02f7f78: Registered a new GraphQL field, `globalStylesheet`, that returns [wp_get_global_stylesheet](https://developer.wordpress.org/reference/functions/wp_get_global_stylesheet/) and provides the same arguments as the core WordPress function.78 79 79 [View the full changelog](https://faustjs.org/docs/changelog/faustwp) -
faustwp/trunk/CHANGELOG.md
r2925480 r2940447 1 1 # Faust 2 3 ## 1.0.1 4 5 ### Patch Changes 6 7 - 9ed3c40: Bug: Fixed an issue where the preview button could crash the browser 2 8 3 9 ## 1.0.0 -
faustwp/trunk/faustwp.php
r2925480 r2940447 10 10 * Text Domain: faustwp 11 11 * Domain Path: /languages 12 * Version: 1.0. 012 * Version: 1.0.1 13 13 * Requires PHP: 7.2 14 14 * Requires at least: 5.7 -
faustwp/trunk/includes/replacement/callbacks.php
r2890342 r2940447 232 232 */ 233 233 function enqueue_preview_scripts() { 234 wp_enqueue_script( 'faustwp-gutenberg-filters', plugins_url( '/previewlinks.js', __FILE__ ), array( ), '1.0.0', true );234 wp_enqueue_script( 'faustwp-gutenberg-filters', plugins_url( '/previewlinks.js', __FILE__ ), array( 'jquery' ), '1.0.0', true ); 235 235 wp_localize_script( 'faustwp-gutenberg-filters', '_faustwp_preview_link', array( '_preview_link' => get_preview_post_link() ) ); 236 236 } -
faustwp/trunk/includes/replacement/previewlinks.js
r2638668 r2940447 4 4 5 5 window.addEventListener('DOMContentLoaded', function () { 6 wp.domReady(function () {6 jQuery(document).ready(function () { 7 7 // Get the correct preview link via wp_localize_script 8 8 const previewLink = window._faustwp_preview_link 9 ? window._faustwp_preview_link._preview_link9 ? window._faustwp_preview_link._preview_link 10 10 : undefined; 11 11 … … 19 19 20 20 const intervalId = setInterval(function () { 21 const previewButton = document.querySelectorAll(21 const previewButton = jQuery( 22 22 'button[class~="block-editor-post-preview__button-toggle"]', 23 23 ); … … 28 28 29 29 clearInterval(intervalId); 30 previewButton [0].addEventListener('click', function () {30 previewButton.first().one('click', function () { 31 31 setTimeout(function () { 32 const links = document.querySelectorAll('a[target*="wp-preview"]');32 const links = jQuery('a[target*="wp-preview"]'); 33 33 34 34 if (!links.length) { … … 36 36 } 37 37 38 links. forEach((link) => {38 links.each((i, link) => { 39 39 link.href = previewLink; 40 40 41 41 var copy = link.cloneNode(true); 42 copy.addEventListener('click', function ( ev) {42 copy.addEventListener('click', function () { 43 43 previewButton[0].click(); 44 44 -
faustwp/trunk/readme.txt
r2925480 r2940447 4 4 Requires at least: 5.7 5 5 Tested up to: 6.2 6 Stable tag: 1.0. 06 Stable tag: 1.0.1 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later … … 55 55 == Changelog == 56 56 57 = 1.0.1 = 58 59 ### Patch Changes 60 61 - 9ed3c40: Bug: Fixed an issue where the preview button could crash the browser 62 57 63 = 1.0.0 = 58 64 … … 71 77 - 2eeb366: The default plugin setting for "Disable WordPress Theme Admin Pages" is now unchecked, requiring a user to opt-in after initial activation. 72 78 73 = 0.8.6 =74 75 ### Patch Changes76 77 - 02f7f78: Registered a new GraphQL field, `globalStylesheet`, that returns [wp_get_global_stylesheet](https://developer.wordpress.org/reference/functions/wp_get_global_stylesheet/) and provides the same arguments as the core WordPress function.78 79 79 [View the full changelog](https://faustjs.org/docs/changelog/faustwp)
Note: See TracChangeset
for help on using the changeset viewer.