Plugin Directory

Changeset 1542524


Ignore:
Timestamp:
11/29/2016 10:08:43 AM (9 years ago)
Author:
mraliende
Message:

1.7 do not load javascript, when -manual- configured and no shortcut found. Plus support for pages

File:
1 edited

Legend:

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

    r1542243 r1542524  
    1515    static function has_url( $str_content ) {
    1616        Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "] " .$str_content);
    17         //$strSetting = get_option('gurlpb-setting-a');
     17        $strSetting = get_option('gurlpb-setting-a');
     18
    1819        $arr = array();
    1920        if ( preg_match( "/span guteurls=.*(http[^\"]*)\"/", $str_content, $arr ) ) {
     
    2627            return $arr[1];
    2728        }
     29        if ( $strSetting == 'manual' ) {
     30            return false;
     31        }
     32
    2833        if ( preg_match('/\<a[^\>]*href=.(http[^\"\″\”&]*)/', $str_content, $arr ) ) {
    2934            return $arr[1];
     
    239244        $nWP = '3';
    240245    } elseif ( $strSettingA == 'single' ) {
    241         $selector = '.post .entry-content';
     246        $selector = '.post .entry-content, .page .entry-content';
    242247        $nWP = '1';
    243248    } else {
    244         $selector = '.post .entry-content p';
     249        $selector = '.post .entry-content p, .page .entry-content p';
    245250        $nWP = '2';
    246251    }
Note: See TracChangeset for help on using the changeset viewer.