Plugin Directory

Changeset 2058220


Ignore:
Timestamp:
03/27/2019 10:41:47 AM (7 years ago)
Author:
mraliende
Message:

1.19 Hot Bugfix for Gutenberg 5.3 - is_gutenberg_page() is not working in gutenberg anymore!?!?

Location:
good-url-preview-box
Files:
2 edited
45 copied

Legend:

Unmodified
Added
Removed
  • good-url-preview-box/tags/1.19/trunk/gurlpb-start.php

    r2049255 r2058220  
    6060    add_action( 'init', 'gurlpb_buttons' );
    6161    $nWpV = intval(get_bloginfo( 'version' ));
    62     if ( $nWpV>=5 && function_exists( 'is_gutenberg_page' ) && is_gutenberg_page() ) {
     62    if ( $nWpV>=5 && function_exists( 'is_gutenberg_page' ) /* && is_gutenberg_page() */ ) {
    6363        add_action( 'init', 'gurlpb_gutenberg' );
    6464    } else {
     
    114114        ));
    115115   
    116     $fNoNew = 0;
    117     if ( ! $fHasToken && $query->post_count > 4 ) {
    118         $fNoNew = 1;
     116    $fHasReachedPostLimit = 0;
     117    if ( ! $fHasToken && $query->post_count > 6 ) {
     118        $fHasReachedPostLimit = 1;
    119119    }
    120120    Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "] found posts with preview boxes  >= " . $query->post_count );
    121     Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "] Perhibit new preview boxes: " . $fNoNew );
     121    Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "] Perhibit new preview boxes: " . $fHasReachedPostLimit );
    122122   
    123123    echo '<script src="'
     
    134134         . ' gutenbergBoxCnt: 0,'
    135135         . ' cnt: 0,'                                                               // js counter of Gutenberg blocks with URL preview boxes
    136          . ' noNew: ' . $fNoNew . ','                                              // {0 | 1}. New URL allowed to add?
    137          . ' hasT: '. $fHasToken
     136         . ' ht: ' . $fHasToken . ','
     137         . ' noNew: ' . $fHasReachedPostLimit                                               // {0 | 1}. New URL allowed to add?
    138138         . '}</script>';
    139139}
  • good-url-preview-box/tags/1.19/trunk/readme.txt

    r2049255 r2058220  
    44Tags: link, links, URL, URLs, preview, preview image, guteurls, gute-urls, facebook, internet-link, post, posting, like Facebook, exacly like facebook, find url, find link, search link, search url, detect url, internet address
    55Requires at least: 4.9.0
    6 Tested up to: 5.1
     6Tested up to: 5.0.3
    77Stable tag: 5.0.3
    88License: GPLv2 or later
     
    116116
    117117= 1.19 =
    118 Bugfix for user with licence-key: More then 10 preview box per post are allowed yet.
     118Hot Bugfix for Gutenberg 5.3 - is_gutenberg_page() is not working in gutenberg anymore!?!?
    119119
    120120= 1.18 =
     
    173173
    174174== Changelog ==
     175
    175176= 1.19 =
    176 Bugfix for user with licence-key: More then 10 preview box per post are allowed yet.
     177Hot Bugfix for Gutenberg 5.3 - is_gutenberg_page() is not working in gutenberg anymore!?!?
     178
    177179
    178180= 1.18 =
  • good-url-preview-box/trunk/gurlpb-start.php

    r2049255 r2058220  
    6060    add_action( 'init', 'gurlpb_buttons' );
    6161    $nWpV = intval(get_bloginfo( 'version' ));
    62     if ( $nWpV>=5 && function_exists( 'is_gutenberg_page' ) && is_gutenberg_page() ) {
     62    if ( $nWpV>=5 && function_exists( 'is_gutenberg_page' ) /* && is_gutenberg_page() */ ) {
    6363        add_action( 'init', 'gurlpb_gutenberg' );
    6464    } else {
     
    114114        ));
    115115   
    116     $fNoNew = 0;
    117     if ( ! $fHasToken && $query->post_count > 4 ) {
    118         $fNoNew = 1;
     116    $fHasReachedPostLimit = 0;
     117    if ( ! $fHasToken && $query->post_count > 6 ) {
     118        $fHasReachedPostLimit = 1;
    119119    }
    120120    Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "] found posts with preview boxes  >= " . $query->post_count );
    121     Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "] Perhibit new preview boxes: " . $fNoNew );
     121    Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "] Perhibit new preview boxes: " . $fHasReachedPostLimit );
    122122   
    123123    echo '<script src="'
     
    134134         . ' gutenbergBoxCnt: 0,'
    135135         . ' cnt: 0,'                                                               // js counter of Gutenberg blocks with URL preview boxes
    136          . ' noNew: ' . $fNoNew . ','                                              // {0 | 1}. New URL allowed to add?
    137          . ' hasT: '. $fHasToken
     136         . ' ht: ' . $fHasToken . ','
     137         . ' noNew: ' . $fHasReachedPostLimit                                               // {0 | 1}. New URL allowed to add?
    138138         . '}</script>';
    139139}
  • good-url-preview-box/trunk/readme.txt

    r2049255 r2058220  
    44Tags: link, links, URL, URLs, preview, preview image, guteurls, gute-urls, facebook, internet-link, post, posting, like Facebook, exacly like facebook, find url, find link, search link, search url, detect url, internet address
    55Requires at least: 4.9.0
    6 Tested up to: 5.1
     6Tested up to: 5.0.3
    77Stable tag: 5.0.3
    88License: GPLv2 or later
     
    116116
    117117= 1.19 =
    118 Bugfix for user with licence-key: More then 10 preview box per post are allowed yet.
     118Hot Bugfix for Gutenberg 5.3 - is_gutenberg_page() is not working in gutenberg anymore!?!?
    119119
    120120= 1.18 =
     
    173173
    174174== Changelog ==
     175
    175176= 1.19 =
    176 Bugfix for user with licence-key: More then 10 preview box per post are allowed yet.
     177Hot Bugfix for Gutenberg 5.3 - is_gutenberg_page() is not working in gutenberg anymore!?!?
     178
    177179
    178180= 1.18 =
Note: See TracChangeset for help on using the changeset viewer.