Changeset 1731367
- Timestamp:
- 09/18/2017 02:42:37 AM (8 years ago)
- Location:
- device-mockups
- Files:
-
- 65 added
- 2 edited
-
tags/1.8.2 (added)
-
tags/1.8.2/LICENSE (added)
-
tags/1.8.2/admin (added)
-
tags/1.8.2/admin/device-mockups.css (added)
-
tags/1.8.2/admin/device-mockups.js (added)
-
tags/1.8.2/admin/device-mockups.php (added)
-
tags/1.8.2/css (added)
-
tags/1.8.2/css/device-mockups.css (added)
-
tags/1.8.2/device-mockups.php (added)
-
tags/1.8.2/fonts (added)
-
tags/1.8.2/fonts/slick.eot (added)
-
tags/1.8.2/fonts/slick.svg (added)
-
tags/1.8.2/fonts/slick.ttf (added)
-
tags/1.8.2/fonts/slick.woff (added)
-
tags/1.8.2/images (added)
-
tags/1.8.2/images/ajax-loader.gif (added)
-
tags/1.8.2/images/chrome.png (added)
-
tags/1.8.2/images/firefox.png (added)
-
tags/1.8.2/images/imac.png (added)
-
tags/1.8.2/images/ipad_land_black.png (added)
-
tags/1.8.2/images/ipad_land_white.png (added)
-
tags/1.8.2/images/ipad_port_black.png (added)
-
tags/1.8.2/images/ipad_port_white.png (added)
-
tags/1.8.2/images/iphone5_land_black.png (added)
-
tags/1.8.2/images/iphone5_land_white.png (added)
-
tags/1.8.2/images/iphone5_port_black.png (added)
-
tags/1.8.2/images/iphone5_port_white.png (added)
-
tags/1.8.2/images/iphone5s_land_black.png (added)
-
tags/1.8.2/images/iphone5s_land_gold.png (added)
-
tags/1.8.2/images/iphone5s_land_white.png (added)
-
tags/1.8.2/images/iphone5s_port_black.png (added)
-
tags/1.8.2/images/iphone5s_port_gold.png (added)
-
tags/1.8.2/images/iphone5s_port_white.png (added)
-
tags/1.8.2/images/iphone6_land_black.png (added)
-
tags/1.8.2/images/iphone6_land_gold.png (added)
-
tags/1.8.2/images/iphone6_land_silver.png (added)
-
tags/1.8.2/images/iphone6_plus_land_black.png (added)
-
tags/1.8.2/images/iphone6_plus_land_gold.png (added)
-
tags/1.8.2/images/iphone6_plus_land_silver.png (added)
-
tags/1.8.2/images/iphone6_plus_port_black.png (added)
-
tags/1.8.2/images/iphone6_plus_port_gold.png (added)
-
tags/1.8.2/images/iphone6_plus_port_silver.png (added)
-
tags/1.8.2/images/iphone6_port_black.png (added)
-
tags/1.8.2/images/iphone6_port_gold.png (added)
-
tags/1.8.2/images/iphone6_port_silver.png (added)
-
tags/1.8.2/images/lumia920_land.png (added)
-
tags/1.8.2/images/lumia920_port.png (added)
-
tags/1.8.2/images/macbook.png (added)
-
tags/1.8.2/images/nexus7_land.png (added)
-
tags/1.8.2/images/nexus7_port.png (added)
-
tags/1.8.2/images/s3_land_black.png (added)
-
tags/1.8.2/images/s3_land_white.png (added)
-
tags/1.8.2/images/s3_port_black.png (added)
-
tags/1.8.2/images/s3_port_white.png (added)
-
tags/1.8.2/images/safari.png (added)
-
tags/1.8.2/images/surface.png (added)
-
tags/1.8.2/includes (added)
-
tags/1.8.2/includes/browser.php (added)
-
tags/1.8.2/includes/device.php (added)
-
tags/1.8.2/index.php (added)
-
tags/1.8.2/js (added)
-
tags/1.8.2/js/device-mockups.js (added)
-
tags/1.8.2/languages (added)
-
tags/1.8.2/languages/device-mockups.pot (added)
-
tags/1.8.2/readme.txt (added)
-
trunk/device-mockups.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
device-mockups/trunk/device-mockups.php
r1722736 r1731367 4 4 * Plugin URI: https://wordpress.org/plugins/device-mockups/ 5 5 * Description: Show your work in high resolution, responsive device mockups using only shortcodes. 6 * Version: 1.8. 16 * Version: 1.8.2 7 7 * Author: Justin Peacock 8 8 * Author URI: https://byjust.in/ … … 21 21 22 22 // Useful global constants. 23 define( 'DEVICE_MOCKUPS_VERSION', '1.8. 1' );23 define( 'DEVICE_MOCKUPS_VERSION', '1.8.2' ); 24 24 define( 'DEVICE_MOCKUPS_URL', plugin_dir_url( __FILE__ ) ); 25 25 define( 'DEVICE_MOCKUPS_PATH', dirname( __FILE__ ) . '/' ); … … 70 70 require_once DEVICE_MOCKUPS_INC . 'device.php'; 71 71 require_once DEVICE_MOCKUPS_INC . 'browser.php'; 72 73 /** 74 * Disables wp texturize on registered shortcodes 75 * 76 * @param $shortcodes 77 * 78 * @return array 79 */ 80 function device_mockups_shortcode_exclude( $shortcodes ) { 81 $shortcodes[] = 'device'; 82 $shortcodes[] = 'browser'; 83 84 return $shortcodes; 85 } 86 87 add_filter( 'no_texturize_shortcodes', 'device_mockups_shortcode_exclude' ); 88 89 /** 90 * Filters shortcode to remove auto p and br tags 91 * 92 * @param $pee 93 * 94 * @return mixed 95 */ 96 function device_mockups_shortcode_unautop( $pee ) { 97 global $shortcode_tags; 98 99 if ( empty( $shortcode_tags ) || ! is_array( $shortcode_tags ) ) { 100 return $pee; 101 } 102 103 $tagregexp = join( '|', array_map( 'preg_quote', array_keys( $shortcode_tags ) ) ); 104 105 $pattern = 106 '/' 107 . '<p>' 108 . '\\s*+' 109 . '(' 110 . '\\[\\/?' 111 . "($tagregexp)" 112 . '(?![\\w-])' 113 . '[^\\]\\/]*' 114 . '(?:' 115 . '\\/(?!\\])' 116 . '[^\\]\\/]*' 117 . ')*?' 118 . '[\\w\\s="\']*' 119 . '(?:' 120 . '\\s*+' 121 . '\\/\\]' 122 . '|' 123 . '\\]' 124 . '(?:' 125 . '(?!<\/p>)' 126 . '[^\\[]*+' 127 . '(?:' 128 . '\\[(?!\\/\\2\\])' 129 . '[^\\[]*+' 130 . ')*+' 131 . '\\[\\/\\2\\]' 132 . ')?' 133 . ')' 134 . ')' 135 . '\\s*+' 136 . '<\\/p>' 137 . '/s'; 138 139 return preg_replace( $pattern, '$1', $pee ); 140 } 141 142 foreach ( array( 'device', 'browser' ) as $filter ) { 143 remove_filter( $filter, 'shortcode_unautop' ); 144 add_filter( $filter, 'device_mockups_shortcode_unautop' ); 145 } 146 147 remove_filter( 'the_content', 'shortcode_unautop' ); 148 add_filter( 'the_content', 'device_mockups_shortcode_unautop' ); 149 remove_filter( 'the_excerpt', 'shortcode_unautop' ); 150 add_filter( 'the_excerpt', 'device_mockups_shortcode_unautop' ); -
device-mockups/trunk/readme.txt
r1722736 r1731367 5 5 Requires at least: 3.7 6 6 Tested up to: 4.8.1 7 Stable tag: 1.8. 17 Stable tag: 1.8.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 87 87 88 88 == Changelog == 89 = 1.8.2 = 90 * added filters back to fix the gallery 91 89 92 = 1.8.1 = 90 93 * Added composer to grab latest wpcs and phpcs
Note: See TracChangeset
for help on using the changeset viewer.