Changeset 3132850
- Timestamp:
- 08/08/2024 06:49:45 PM (6 weeks ago)
- Location:
- embed-pdf-viewer
- Files:
-
- 6 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
embed-pdf-viewer/tags/2.4.3/CHANGES.md
r3132838 r3132850 1 1 #### [unreleased] 2 2 3 #### 2.4.2 / 2024-08-08 4 * use media file description for title if present 5 6 #### 2.4.1 / 2024-08-08 3 #### 2.4.1 - 2.4.3 / 2024-08-08 7 4 * more sanitizing of URL 8 5 * fix typos and update readme 6 7 9 8 10 9 #### 2.4.0 / 2024-08-06 -
embed-pdf-viewer/tags/2.4.3/embed-pdf-viewer.php
r3132838 r3132850 15 15 * Author: Andy Fragen 16 16 * Author URI: https://github.com/afragen 17 * Version: 2.4. 217 * Version: 2.4. 18 18 * License: GPLv2+ 19 19 * Domain Path: /languages … … 138 138 } 139 139 140 $classes = 'embed-pdf-viewer'; 141 $src = $is_chrome || wp_is_mobile() ? 'https://docs.google.com/viewer?url=' . rawurlencode( $url ) . '&embedded=true' : $url; 140 $classes = 'embed-pdf-viewer'; 141 $src = $is_chrome || wp_is_mobile() ? 'https://docs.google.com/viewer?url=' . rawurlencode( $url ) . '&embedded=true' : $url; 142 $description = $attributes['description'] ?? $attributes['title']; 142 143 return sprintf( 143 144 '<iframe class="%1$s" src="%2$s" height="%3$s" width="%4$s" title="%5$s"%6$s></iframe>', … … 146 147 $attributes['width'] ?? '600', 147 148 $attributes['height'] ?? '600', 148 $attributes['description'] ?? $attributes['title'],149 , 149 150 $is_chrome || wp_is_mobile() ? ' frameborder="0"' : '' 150 151 ); … … 255 256 } 256 257 $iframe .= 'height="' . $atts['height'] . '" width="' . $atts['width'] . '" '; 257 $iframe .= 'title="' . $description. '"></iframe>' . "\n";258 $iframe .= 'title="' . . '"></iframe>' . "\n"; 258 259 259 260 $embed = '<div>'; 260 261 $embed .= $iframe; 261 $embed .= '<p><a href="' . $sanitized_url . '" title="' . $description . '">' . $description. '</a></p>';262 $embed .= '<p><a href="' . $sanitized_url . '" title="' . . '</a></p>'; 262 263 $embed .= '</div>'; 263 264 -
embed-pdf-viewer/tags/2.4.3/readme.txt
r3132838 r3132850 6 6 Tested up to: 6.6 7 7 Requires PHP: 5.6 8 Stable tag: 2.4. 28 Stable tag: 2.4. 9 9 License: GPL v2+ 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 31 31 ## Changelog 32 32 33 #### 2.4.2 / 2024-08-08 34 * use media file description for title if present 35 36 #### 2.4.1 / 2024-08-08 33 #### 2.4.1 - 2.4.3 / 2024-08-08 37 34 * more sanitizing of URL 38 35 * fix typos and update readme 36 37 39 38 40 39 #### 2.4.0 / 2024-08-06 -
embed-pdf-viewer/trunk/CHANGES.md
r3132838 r3132850 1 1 #### [unreleased] 2 2 3 #### 2.4.2 / 2024-08-08 4 * use media file description for title if present 5 6 #### 2.4.1 / 2024-08-08 3 #### 2.4.1 - 2.4.3 / 2024-08-08 7 4 * more sanitizing of URL 8 5 * fix typos and update readme 6 7 9 8 10 9 #### 2.4.0 / 2024-08-06 -
embed-pdf-viewer/trunk/embed-pdf-viewer.php
r3132838 r3132850 15 15 * Author: Andy Fragen 16 16 * Author URI: https://github.com/afragen 17 * Version: 2.4. 217 * Version: 2.4. 18 18 * License: GPLv2+ 19 19 * Domain Path: /languages … … 138 138 } 139 139 140 $classes = 'embed-pdf-viewer'; 141 $src = $is_chrome || wp_is_mobile() ? 'https://docs.google.com/viewer?url=' . rawurlencode( $url ) . '&embedded=true' : $url; 140 $classes = 'embed-pdf-viewer'; 141 $src = $is_chrome || wp_is_mobile() ? 'https://docs.google.com/viewer?url=' . rawurlencode( $url ) . '&embedded=true' : $url; 142 $description = $attributes['description'] ?? $attributes['title']; 142 143 return sprintf( 143 144 '<iframe class="%1$s" src="%2$s" height="%3$s" width="%4$s" title="%5$s"%6$s></iframe>', … … 146 147 $attributes['width'] ?? '600', 147 148 $attributes['height'] ?? '600', 148 $attributes['description'] ?? $attributes['title'],149 , 149 150 $is_chrome || wp_is_mobile() ? ' frameborder="0"' : '' 150 151 ); … … 255 256 } 256 257 $iframe .= 'height="' . $atts['height'] . '" width="' . $atts['width'] . '" '; 257 $iframe .= 'title="' . $description. '"></iframe>' . "\n";258 $iframe .= 'title="' . . '"></iframe>' . "\n"; 258 259 259 260 $embed = '<div>'; 260 261 $embed .= $iframe; 261 $embed .= '<p><a href="' . $sanitized_url . '" title="' . $description . '">' . $description. '</a></p>';262 $embed .= '<p><a href="' . $sanitized_url . '" title="' . . '</a></p>'; 262 263 $embed .= '</div>'; 263 264 -
embed-pdf-viewer/trunk/readme.txt
r3132838 r3132850 6 6 Tested up to: 6.6 7 7 Requires PHP: 5.6 8 Stable tag: 2.4. 28 Stable tag: 2.4. 9 9 License: GPL v2+ 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 31 31 ## Changelog 32 32 33 #### 2.4.2 / 2024-08-08 34 * use media file description for title if present 35 36 #### 2.4.1 / 2024-08-08 33 #### 2.4.1 - 2.4.3 / 2024-08-08 37 34 * more sanitizing of URL 38 35 * fix typos and update readme 36 37 39 38 40 39 #### 2.4.0 / 2024-08-06
Note: See TracChangeset
for help on using the changeset viewer.