Changeset 749949
- Timestamp:
- 08/02/2013 12:18:49 PM (13 years ago)
- Location:
- mybooks-for-authors
- Files:
-
- 8 edited
- 1 copied
-
tags/1.5.6 (copied) (copied from mybooks-for-authors/trunk)
-
tags/1.5.6/css/ot-book-styles.css (modified) (1 diff)
-
tags/1.5.6/ot-book-content.php (modified) (3 diffs)
-
tags/1.5.6/ot-functions.php (modified) (2 diffs)
-
tags/1.5.6/readme.txt (modified) (2 diffs)
-
trunk/css/ot-book-styles.css (modified) (1 diff)
-
trunk/ot-book-content.php (modified) (3 diffs)
-
trunk/ot-functions.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mybooks-for-authors/tags/1.5.6/css/ot-book-styles.css
r706579 r749949 5 5 .store-links{padding-bottom:2px;} 6 6 .booklinks{padding:5px 5px 0 5px;clear:both;border-top:3px double #DDD;border-bottom:3px double #DDD;} 7 .bookseller-links {display:block;} 7 8 .bookseller-links img{padding:5px;} 8 9 .buy-book-text{padding-left:5px;} -
mybooks-for-authors/tags/1.5.6/ot-book-content.php
r687083 r749949 32 32 if ( stripos( $content, '<img') ) { 33 33 // if there is an image inserted into the content...continue inside here: 34 if (has_shortcode( 'booklinks')) {35 // echo "We have the image in the ontent, and the shortcode for booklinks has been added.";34 if (has_shortcode($content, 'booklinks')) { 35 // echo "We have the image in the content, and the shortcode for booklinks has been added."; 36 36 $content = $content; 37 37 } else { … … 48 48 else 49 49 { 50 if (has_shortcode( 'booklinks')) {50 if (has_shortcode($content, 'booklinks')) { 51 51 // echo "we don't have an image, but we do have the booklinks shortcode"; 52 52 $content = $image . $content; … … 62 62 return $content; 63 63 } 64 ?> -
mybooks-for-authors/tags/1.5.6/ot-functions.php
r703082 r749949 27 27 wp_enqueue_script( 'jquery-cycle', plugins_url( 'js/jquery.cycle.all.min.js', __FILE__ )); 28 28 } 29 if (!function_exists('has_shortcode')) { 30 function has_shortcode( $content, $tag ) { 31 if ( shortcode_exists( $tag ) ) { 32 preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ); 33 if ( empty( $matches ) ) 34 return false; 29 35 30 function has_shortcode( $shortcode = NULL ) { 36 foreach ( $matches as $shortcode ) { 37 if ( $tag === $shortcode[2] ) 38 return true; 39 } 40 } 41 return false; 42 } 43 } 44 if (!function_exists('shortcode_exists')) { 45 function shortcode_exists( $tag ) { 46 global $shortcode_tags; 47 return array_key_exists( $tag, $shortcode_tags ); 48 } 49 } 31 50 32 $post_to_check = get_post( get_the_ID() );33 34 // false because we have to search through the post content first35 $found = false;36 37 // if no short code was provided, return false38 if ( ! $shortcode ) {39 return $found;40 }41 // check the post content for the short code42 if ( stripos( $post_to_check->post_content, '[' . $shortcode) !== FALSE ) {43 // we have found the short code44 $found = TRUE;45 }46 47 // return our final results48 return $found;49 }50 51 function ot_booklinks( $amazon = '', $bn = '', $ceoread = '', $ibooks = '', $indie = '', $itunes = '', $audible = '', $bam = '') { 51 52 $booklinks = ''; … … 114 115 115 116 } 116 ?> -
mybooks-for-authors/tags/1.5.6/readme.txt
r708675 r749949 3 3 Tags: books, authors, books widget, books plugin, books post type, author plugin, add books, display books, sell books 4 4 Requires at least: 3.1 5 Tested up to: 3. 4.16 Stable tag: 1.5. 55 Tested up to: 3.6 6 Stable tag: 1.5.6 7 7 License: GPLv2 8 8 … … 45 45 46 46 == Changelog == 47 48 = 1.5.6 = 49 * Fixed plugin for WordPress 3.6 conflicting function (has_shortcode()) which caused a fatal error. 50 47 51 = 1.5.5 = 48 52 * Fixed a css issue where some margin was removed on the buy links -
mybooks-for-authors/trunk/css/ot-book-styles.css
r706579 r749949 5 5 .store-links{padding-bottom:2px;} 6 6 .booklinks{padding:5px 5px 0 5px;clear:both;border-top:3px double #DDD;border-bottom:3px double #DDD;} 7 .bookseller-links {display:block;} 7 8 .bookseller-links img{padding:5px;} 8 9 .buy-book-text{padding-left:5px;} -
mybooks-for-authors/trunk/ot-book-content.php
r687083 r749949 32 32 if ( stripos( $content, '<img') ) { 33 33 // if there is an image inserted into the content...continue inside here: 34 if (has_shortcode( 'booklinks')) {35 // echo "We have the image in the ontent, and the shortcode for booklinks has been added.";34 if (has_shortcode($content, 'booklinks')) { 35 // echo "We have the image in the content, and the shortcode for booklinks has been added."; 36 36 $content = $content; 37 37 } else { … … 48 48 else 49 49 { 50 if (has_shortcode( 'booklinks')) {50 if (has_shortcode($content, 'booklinks')) { 51 51 // echo "we don't have an image, but we do have the booklinks shortcode"; 52 52 $content = $image . $content; … … 62 62 return $content; 63 63 } 64 ?> -
mybooks-for-authors/trunk/ot-functions.php
r703082 r749949 27 27 wp_enqueue_script( 'jquery-cycle', plugins_url( 'js/jquery.cycle.all.min.js', __FILE__ )); 28 28 } 29 if (!function_exists('has_shortcode')) { 30 function has_shortcode( $content, $tag ) { 31 if ( shortcode_exists( $tag ) ) { 32 preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ); 33 if ( empty( $matches ) ) 34 return false; 29 35 30 function has_shortcode( $shortcode = NULL ) { 36 foreach ( $matches as $shortcode ) { 37 if ( $tag === $shortcode[2] ) 38 return true; 39 } 40 } 41 return false; 42 } 43 } 44 if (!function_exists('shortcode_exists')) { 45 function shortcode_exists( $tag ) { 46 global $shortcode_tags; 47 return array_key_exists( $tag, $shortcode_tags ); 48 } 49 } 31 50 32 $post_to_check = get_post( get_the_ID() );33 34 // false because we have to search through the post content first35 $found = false;36 37 // if no short code was provided, return false38 if ( ! $shortcode ) {39 return $found;40 }41 // check the post content for the short code42 if ( stripos( $post_to_check->post_content, '[' . $shortcode) !== FALSE ) {43 // we have found the short code44 $found = TRUE;45 }46 47 // return our final results48 return $found;49 }50 51 function ot_booklinks( $amazon = '', $bn = '', $ceoread = '', $ibooks = '', $indie = '', $itunes = '', $audible = '', $bam = '') { 51 52 $booklinks = ''; … … 114 115 115 116 } 116 ?> -
mybooks-for-authors/trunk/readme.txt
r708675 r749949 3 3 Tags: books, authors, books widget, books plugin, books post type, author plugin, add books, display books, sell books 4 4 Requires at least: 3.1 5 Tested up to: 3. 4.16 Stable tag: 1.5. 55 Tested up to: 3.6 6 Stable tag: 1.5.6 7 7 License: GPLv2 8 8 … … 45 45 46 46 == Changelog == 47 48 = 1.5.6 = 49 * Fixed plugin for WordPress 3.6 conflicting function (has_shortcode()) which caused a fatal error. 50 47 51 = 1.5.5 = 48 52 * Fixed a css issue where some margin was removed on the buy links
Note: See TracChangeset
for help on using the changeset viewer.