Changeset 1538337
- Timestamp:
- 11/22/2016 12:15:53 PM (9 years ago)
- File:
-
- 1 edited
-
good-url-preview-box/trunk/gurlpb-start.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
good-url-preview-box/trunk/gurlpb-start.php
r1537803 r1538337 158 158 Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "]: postId:" . get_the_ID() . $str_content); 159 159 160 161 if(is_single() || is_page() || is_attachment()) {162 Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "]: is_single:" );163 } else {164 Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "]: ! is_single:");165 }166 Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "]: $str_content");167 168 160 if ( ! Gurlpb::$_f_add_js && $strUrl=Gurlpb::has_url( $str_content ) ) { 169 161 Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "]: add JS!" ); 170 162 Gurlpb::$_f_add_js = 1; 171 echo gurlpb_add_previewbox( $strUrl ); 163 if ( is_single() || is_page() || is_attachment() ) { 164 $str_content .= gurlpb_add_previewbox( $strUrl ); 165 } elseif ( in_the_loop() ) { 166 echo gurlpb_add_previewbox( $strUrl ); 167 } 172 168 add_action( 'wp_footer', 'gurlpb_javascript_include', 20 ); 173 169 } … … 390 386 if ( Gurlpb::$_str_first_url ) { 391 387 $text .= '<p><a class="gurlpb" href="' . Gurlpb::$_str_first_url . '" style="color: #888; display: block; width:80px; opacity: 0.2; font-size:9px; margin-left:auto; margin-right:auto;" >UrlPreviewBox</a></p>'; 392 if ( ! Gurlpb::$_f_add_js ) {388 if ( ! Gurlpb::$_f_add_js ) { 393 389 Gurlpb_utils::log( __FUNCTION__ . '[' . __LINE__ . "]: add JS!" ); 394 390 Gurlpb::$_f_add_js = 1; 395 echo gurlpb_add_previewbox( Gurlpb::$_str_first_url ); 391 392 if ( in_the_loop() ) echo gurlpb_add_previewbox( Gurlpb::$_str_first_url ); 396 393 add_action( 'wp_footer', 'gurlpb_javascript_include', 20 ); 397 394 }
Note: See TracChangeset
for help on using the changeset viewer.