-
Notifications
You must be signed in to change notification settings - Fork 2
/
functions.php
44 lines (40 loc) · 939 Bytes
/
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
39
40
41
42
43
44
<?php
/**
* Utilities
*
* @package Tm_Timeline
* @subpackage Tm_Timeline
* @author Template Monster
* @license GPL-3.0+
* @copyright 2017 Template Monster
*/
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
/**
* Useful utilities
*/
if ( ! function_exists( 'tm_timeline_plugin_url' ) ) {
/**
* Get plugin file/folder url
*
* @since 1.0.0
* @since 1.0.5 Refactor a logic.
* @param string $path Relative path.
* @return string
*/
function tm_timeline_plugin_url( $path ) {
return untrailingslashit( plugin_dir_url( __FILE__ ) ) . $path;
}
}
if ( ! function_exists( 'tm_timeline_plugin_path' ) ) {
/**
* Get plugin file/folder absolute path.
*
* @since 1.0.0
* @since 1.0.5 Refactor a logic.
* @param string $path Relative path.
* @return string
*/
function tm_timeline_plugin_path( $path ) {
return trailingslashit( plugin_dir_path( __FILE__ ) ) . $path;
}
}