PluginProbe
Sharing Image / 3.2
Sharing Image v3.2
3.10 trunk 2.0 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.16 2.0.17 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 3.0 3.1 3.2 3.3 All 29 releases
sharing-image / functions.php

functions.php in Sharing Image 3.2, at functions.php

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