Changeset 1635174
- Timestamp:
- 04/11/2017 10:10:02 AM (9 years ago)
- Location:
- replace-thumbnail-with-oembed/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
replace-thumbnail-with-oembed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
replace-thumbnail-with-oembed/trunk/readme.txt
r1634091 r1635174 5 5 Requires at least: 4.0 6 6 Tested up to: 4.7.3 7 Stable tag: 1. 1.17 Stable tag: 1.2 8 8 License: GNU General Public License v3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 14 14 This plugin checks, if the first line of the content is a valid oEmbed URL. If that is the case, it replaces the thumbnail image with the oEmbed element (e. g. with a YouTube video). Now you don’t have to care too much about a thumbnail image, since instead you would see the video or any other oEmbed content. You can even e. g. watch videos on your blogs front page without opening the post. 15 15 16 Works for all is_singular() WordPress contents, which have a thumbnail set and are not password protected. 16 Works for all WordPress contents, which have a thumbnail set and are not password protected. 17 18 The active WordPress Theme must use the_post_thumbnail() or get_the_post_thumbnail() functions for this to work! 17 19 18 20 == Installation == … … 31 33 == Changelog == 32 34 35 = 1.2 = 36 * Now working for teaser as well 37 33 38 = 1.1 = 34 39 * Disabled, when passwort protection is active -
replace-thumbnail-with-oembed/trunk/replace-thumbnail-with-oembed.php
r1634091 r1635174 3 3 /** 4 4 * Plugin Name: Replace Thumbnail with oEmbed 5 * Description: This plugin checks, if the first line of the content is a valid oEmbed URL. If that is the case, it replaces the thumbnail image with the oEmbed element (e. g. with a YouTube video). Now you don’t have to care too much about a thumbnail image, since instead you would see the video or any other oEmbed content. You can even e. g. watch videos on your blogs front page without opening the post. Works for all is_singular() WordPress contents, which have a thumbnail set and are not password protected.6 * Version: 1. 1.15 * Description: This plugin checks, if the first line of the content is a valid oEmbed URL. If that is the case, it replaces the thumbnail image with the oEmbed element (e. g. with a YouTube video). Now you don’t have to care too much about a thumbnail image, since instead you would see the video or any other oEmbed content. You can even e. g. watch videos on your blogs front page without opening the post. Works for all WordPress contents, which have a thumbnail set and are not password protected. The active WordPress Theme must use the_post_thumbnail() or get_the_post_thumbnail() functions for this to work! 6 * Version: 1.2 7 7 * Author: Palasthotel <[email protected]> (Kim-Christian Meyer) 8 8 * Author URI: https://palasthotel.de … … 14 14 15 15 function replace_thumbnail_with_oembed_apply( $html ) { 16 if ( is_singular() && has_post_thumbnail() && ! post_password_required() ) {16 if ( ! is_attachment() && has_post_thumbnail() && ! post_password_required() ) { 17 17 $oembed_html = replace_thumbnail_with_oembed_replace_first_line_of_content_with_oembed(); 18 18 if ( $oembed_html !== false ) {
Note: See TracChangeset
for help on using the changeset viewer.