Plugin Directory

Changeset 2940447


Ignore:
Timestamp:
07/19/2023 03:35:48 PM (3 years ago)
Author:
wpengine
Message:

Update to version 1.0.1 from GitHub

Location:
faustwp
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • faustwp/tags/1.0.1/CHANGELOG.md

    r2925480 r2940447  
    11# 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
    28
    39## 1.0.0
  • faustwp/tags/1.0.1/faustwp.php

    r2925480 r2940447  
    1010 * Text Domain: faustwp
    1111 * Domain Path: /languages
    12  * Version: 1.0.0
     12 * Version: 1.0.1
    1313 * Requires PHP: 7.2
    1414 * Requires at least: 5.7
  • faustwp/tags/1.0.1/includes/replacement/callbacks.php

    r2890342 r2940447  
    232232 */
    233233function 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 );
    235235    wp_localize_script( 'faustwp-gutenberg-filters', '_faustwp_preview_link', array( '_preview_link' => get_preview_post_link() ) );
    236236}
  • faustwp/tags/1.0.1/includes/replacement/previewlinks.js

    r2638668 r2940447  
    44
    55window.addEventListener('DOMContentLoaded', function () {
    6   wp.domReady(function () {
     6  jQuery(document).ready(function () {
    77    // Get the correct preview link via wp_localize_script
    88    const previewLink = window._faustwp_preview_link
    9         ? window._faustwp_preview_link._preview_link
     9      ? window._faustwp_preview_link._preview_link
    1010      : undefined;
    1111
     
    1919
    2020    const intervalId = setInterval(function () {
    21       const previewButton = document.querySelectorAll(
     21      const previewButton = jQuery(
    2222        'button[class~="block-editor-post-preview__button-toggle"]',
    2323      );
     
    2828
    2929      clearInterval(intervalId);
    30       previewButton[0].addEventListener('click', function () {
     30      previewButton.first().one('click', function () {
    3131        setTimeout(function () {
    32           const links = document.querySelectorAll('a[target*="wp-preview"]');
     32          const links = jQuery('a[target*="wp-preview"]');
    3333
    3434          if (!links.length) {
     
    3636          }
    3737
    38           links.forEach((link) => {
     38          links.each((i, link) => {
    3939            link.href = previewLink;
    4040
    4141            var copy = link.cloneNode(true);
    42             copy.addEventListener('click', function (ev) {
     42            copy.addEventListener('click', function () {
    4343              previewButton[0].click();
    4444
  • faustwp/tags/1.0.1/readme.txt

    r2925480 r2940447  
    44Requires at least: 5.7
    55Tested up to: 6.2
    6 Stable tag: 1.0.0
     6Stable tag: 1.0.1
    77Requires PHP: 7.2
    88License: GPLv2 or later
     
    5555== Changelog ==
    5656
     57= 1.0.1 =
     58
     59### Patch Changes
     60
     61- 9ed3c40: Bug: Fixed an issue where the preview button could crash the browser
     62
    5763= 1.0.0 =
    5864
     
    7177- 2eeb366: The default plugin setting for "Disable WordPress Theme Admin Pages" is now unchecked, requiring a user to opt-in after initial activation.
    7278
    73 = 0.8.6 =
    74 
    75 ### Patch Changes
    76 
    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 
    7979[View the full changelog](https://faustjs.org/docs/changelog/faustwp)
  • faustwp/trunk/CHANGELOG.md

    r2925480 r2940447  
    11# 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
    28
    39## 1.0.0
  • faustwp/trunk/faustwp.php

    r2925480 r2940447  
    1010 * Text Domain: faustwp
    1111 * Domain Path: /languages
    12  * Version: 1.0.0
     12 * Version: 1.0.1
    1313 * Requires PHP: 7.2
    1414 * Requires at least: 5.7
  • faustwp/trunk/includes/replacement/callbacks.php

    r2890342 r2940447  
    232232 */
    233233function 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 );
    235235    wp_localize_script( 'faustwp-gutenberg-filters', '_faustwp_preview_link', array( '_preview_link' => get_preview_post_link() ) );
    236236}
  • faustwp/trunk/includes/replacement/previewlinks.js

    r2638668 r2940447  
    44
    55window.addEventListener('DOMContentLoaded', function () {
    6   wp.domReady(function () {
     6  jQuery(document).ready(function () {
    77    // Get the correct preview link via wp_localize_script
    88    const previewLink = window._faustwp_preview_link
    9         ? window._faustwp_preview_link._preview_link
     9      ? window._faustwp_preview_link._preview_link
    1010      : undefined;
    1111
     
    1919
    2020    const intervalId = setInterval(function () {
    21       const previewButton = document.querySelectorAll(
     21      const previewButton = jQuery(
    2222        'button[class~="block-editor-post-preview__button-toggle"]',
    2323      );
     
    2828
    2929      clearInterval(intervalId);
    30       previewButton[0].addEventListener('click', function () {
     30      previewButton.first().one('click', function () {
    3131        setTimeout(function () {
    32           const links = document.querySelectorAll('a[target*="wp-preview"]');
     32          const links = jQuery('a[target*="wp-preview"]');
    3333
    3434          if (!links.length) {
     
    3636          }
    3737
    38           links.forEach((link) => {
     38          links.each((i, link) => {
    3939            link.href = previewLink;
    4040
    4141            var copy = link.cloneNode(true);
    42             copy.addEventListener('click', function (ev) {
     42            copy.addEventListener('click', function () {
    4343              previewButton[0].click();
    4444
  • faustwp/trunk/readme.txt

    r2925480 r2940447  
    44Requires at least: 5.7
    55Tested up to: 6.2
    6 Stable tag: 1.0.0
     6Stable tag: 1.0.1
    77Requires PHP: 7.2
    88License: GPLv2 or later
     
    5555== Changelog ==
    5656
     57= 1.0.1 =
     58
     59### Patch Changes
     60
     61- 9ed3c40: Bug: Fixed an issue where the preview button could crash the browser
     62
    5763= 1.0.0 =
    5864
     
    7177- 2eeb366: The default plugin setting for "Disable WordPress Theme Admin Pages" is now unchecked, requiring a user to opt-in after initial activation.
    7278
    73 = 0.8.6 =
    74 
    75 ### Patch Changes
    76 
    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 
    7979[View the full changelog](https://faustjs.org/docs/changelog/faustwp)
Note: See TracChangeset for help on using the changeset viewer.