-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
functions.php
38 lines (35 loc) · 1.23 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* Templates plugin functions.
*
* @package sharing-image
* @author Anton Lukin
*/
if ( ! defined( 'ABSPATH' ) ) {
die;
}
if ( ! function_exists( 'sharing_image_poster' ) ) {
/**
* Public function to get Sharing Image poster url.
*
* @param int $object_id Optional. Post ID or Taxonomy term ID.
* @param string $object_type Optional. Requested meta type, can be singular or taxonomy.
* Default is determined by the type of the template in which it is called.
*/
function sharing_image_poster( $object_id = null, $object_type = null ) {
return Sharing_Image\Meta::get_poster( $object_id, $object_type );
}
}
if ( ! function_exists( 'sharing_image_poster_src' ) ) {
/**
* Public function to get Sharing Image poster data.
* Return image url, width and height.
*
* @param int $object_id Optional. Post ID or Taxonomy term ID.
* @param string $object_type Optional. Requested meta type, can be singular or taxonomy.
* Default is determined by the type of the template in which it is called.
*/
function sharing_image_poster_src( $object_id = null, $object_type = null ) {
return Sharing_Image\Meta::get_poster_src( $object_id, $object_type );
}
}