PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 2.2.7
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v2.2.7
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
templately / includes / Utils / Database.php

Database.php in Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! 2.2.7, at includes/Utils/Database.php

35 lines 751 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Templately\Utils;
4
5 class Database extends Base {
6
7 /**
8 * Set transient to options table
9 *
10 * @since 2.0.0
11 *
12 * @param string $key
13 * @param mixed $value
14 * @param int $expiration
15 *
16 * @return bool
17 */
18 public static function set_transient( $key, $value, $expiration = DAY_IN_SECONDS ) {
19 $key = '_templately_' . trim( $key );
20 return set_transient( $key, $value, $expiration );
21 }
22
23 /**
24 * Get transient data from options table.
25 *
26 * @since 2.0.0
27 * @param string $key
28 *
29 * @return mixed
30 */
31 public static function get_transient( $key ) {
32 $key = '_templately_' . trim( $key );
33 return get_transient( $key );
34 }
35 }