PluginProbe
Embed Privacy / 1.10.5
Embed Privacy v1.10.5
1.14.0 1.13.0 trunk 0.1 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.1.3 1.10.0 1.10.1 1.10.10 1.10.2 1.10.3 1.10.4 1.10.5 1.10.6 1.10.7 1.10.8 1.10.9 1.11.0 1.11.1 1.11.2 All 68 releases
embed-privacy / inc / thumbnail / provider / class-thumbnail-provider-interface.php

class-thumbnail-provider-interface.php in Embed Privacy 1.10.5, at inc/thumbnail/provider/class-thumbnail-provider-interface.php

64 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace epiphyt\Embed_Privacy\thumbnail\provider;
3
4 /**
5 * Thumbnail provider interface.
6 */
7 interface Thumbnail_Provider_Interface {
8 /**
9 * Get the thumbnail from a source string.
10 *
11 * @param object $data A data object result from an oEmbed provider
12 * @param string $url The URL of the content to be embedded
13 */
14 public static function get( $data, $url );
15
16 /**
17 * Get the thumbnail ID from an embed content.
18 *
19 * @param string $content Embed content/URL to get the thumbnail ID from
20 * @return string Thumbnail ID
21 */
22 public static function get_id( $content );
23
24 /**
25 * Get a thumbnail path.
26 *
27 * @param string $filename Thumbnail filename
28 * @return string Absolute thumbnail path
29 */
30 public static function get_path( $filename );
31
32 /**
33 * Get the thumbnail provider title.
34 *
35 * @return string Thumbnail provider title
36 */
37 public static function get_title();
38
39 /**
40 * Get a thumbnail URL.
41 *
42 * @param string $filename Thumbnail filename
43 * @return string Thumbnail URL
44 */
45 public static function get_url( $filename );
46
47 /**
48 * Check whether the given URL is from this provider.
49 *
50 * @param string $url The URL of the content to be embedded
51 * @return bool Whether the given URL is from this provider
52 */
53 public static function is_provider_embed( $url );
54
55 /**
56 * Download and save a thumbnail.
57 *
58 * @param string $id Embed ID
59 * @param string $url Embed URL
60 * @param string $thumbnail_url Optional thumbnail URL if already available
61 */
62 public static function save( $id, $url, $thumbnail_url = '' );
63 }
64