# sharing-image/3.3/functions.php

Sharing Image, version 3.3. 39 lines.

- Page: https://pluginprobe.com/plugins/sharing-image/3.3/code/functions.php
- Raw: https://pluginprobe.com/plugins/sharing-image/3.3/raw/functions.php
- Modified: 2024-06-26T16:46:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sharing-image/3.3/code/functions.php#L10-L20`.

```php
<?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 );
	}
}

```
