# depicter/trunk/app/functions.php

Depicter — Popup &amp; Slider Builder, version trunk. 23 lines.

- Page: https://pluginprobe.com/plugins/depicter/trunk/code/app/functions.php
- Raw: https://pluginprobe.com/plugins/depicter/trunk/raw/app/functions.php
- Modified: 2023-11-22T07:21:52+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/depicter/trunk/code/app/functions.php#L10-L20`.

```php
<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}


/**
 * Retrieves or prints slider markup
 *
 * @param int|string  $documentID  Slider ID
 * @param array       $args        Slider params
 *
 * @return string|void
 * @throws Exception
 */
function depicter( $documentID = 0, $args = [] ) {
	// return markup if 'echo' arg was set to false
	if( isset( $args['echo'] ) && ! $args['echo'] ) {
		return \Depicter::front()->render()->document( $documentID, $args );
	}
	\Depicter::front()->render()->document( $documentID, $args );
}
```
