PluginProbe ʕ •ᴥ•ʔ
Kirki – Freeform Page Builder, Website Builder & Customizer / 6.0.13
Kirki – Freeform Page Builder, Website Builder & Customizer v6.0.13
6.1.1 6.1.0 6.0.14 6.0.13 6.0.12 6.0.11 6.0.10 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.19 4.0.20 4.0.21 4.0.22 4.0.23 4.0.24 4.1 4.2.0 5.0.0 5.1.0 5.1.1 5.2.0 5.2.1 5.2.2 5.2.3 6.0.0 trunk 3.0.40 3.0.41 3.0.42 3.0.43 3.0.44 3.0.45 3.1.0 3.1.1 3.1.2
kirki / libraries / framework / Wordpress / Models / Option.php
kirki / libraries / framework / Wordpress / Models Last commit date
Option.php 3 weeks ago
Option.php
59 lines
1 <?php
2
3 /**
4 * Eloquent model mapping to the WordPress wp_options table.
5 * Disables timestamps and casts option_value through unserialize for PHP-serialized storage.
6 * Used by OptionManager for query-based option access beyond get_option.
7 *
8 * @package Framework
9 * @subpackage Wordpress\Models
10 * @since 1.0.0
11 */
12 namespace Kirki\Framework\Wordpress\Models;
13
14 \defined('ABSPATH') || exit;
15 use Kirki\Framework\Database\Query\Model;
16 class Option extends Model
17 {
18 /**
19 * The timestamps.
20 *
21 * @var bool
22 *
23 * @since 1.0.0
24 */
25 protected $timestamps = \false;
26 /**
27 * The table.
28 *
29 * @var string
30 *
31 * @since 1.0.0
32 */
33 protected $table = 'options';
34 /**
35 * The primary key.
36 *
37 * @var string
38 *
39 * @since 1.0.0
40 */
41 protected $primary_key = 'option_id';
42 /**
43 * The casts.
44 *
45 * @var string
46 *
47 * @since 1.0.0
48 */
49 protected $casts = ['option_id' => 'integer', 'option_name' => 'string', 'option_value' => 'unserialize'];
50 /**
51 * The fillable.
52 *
53 * @var string
54 *
55 * @since 1.0.0
56 */
57 protected $fillable = ['option_name', 'option_value', 'autoload'];
58 }
59