Blocks
2 days ago
Contracts
1 year ago
Database
1 week ago
Integrations
1 week ago
Libraries
1 week ago
Models
1 week ago
Seeds
1 year ago
Services
2 days ago
Support
1 week ago
config
1 week ago
lib
1 month ago
Activator.php
1 month ago
Attachment.php
1 week ago
Controller.php
1 year ago
Core.php
1 year ago
Deactivator.php
2 months ago
Factory.php
3 months ago
Files.php
1 week ago
Playlist.php
1 year ago
Plugin.php
1 month ago
Requirements.php
1 year ago
support.php
1 week ago
support.php
23 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Global template helper functions. |
| 4 | * |
| 5 | * No ABSPATH guard here: this file is eagerly loaded via Composer's `autoload.files` |
| 6 | * (vendor/autoload.php), so an exit() would abort every CLI/PHPUnit run. It only |
| 7 | * declares a function and has no side effects on direct access. |
| 8 | * |
| 9 | * @package PrestoPlayer |
| 10 | */ |
| 11 | |
| 12 | if ( ! function_exists( 'presto_player' ) ) : |
| 13 | /** |
| 14 | * Renders the Presto Player shortcode for a given media item. |
| 15 | * |
| 16 | * @param int|string $id Media item ID. |
| 17 | * @return string Rendered shortcode output. |
| 18 | */ |
| 19 | function presto_player( $id ) { |
| 20 | return do_shortcode( '[presto_player id=' . absint( $id ) . ']' ); |
| 21 | } |
| 22 | endif; |
| 23 |