関数
Semantic::init()
Loads assets for this template
戻り値 戻り値
ファイル: src/Components/CustomFields/Templates/Semantic.php
public function init() { add_action('wp_enqueue_scripts', function () { $load_dropdown = false; $load_checkbox = false; if ($this->hasCustomFields === true) { foreach ($this->customFields as $key => $vals) { if ($vals['means'] === 3 || $vals['means'] === 4) { $load_checkbox = true; } elseif ($vals['means'] === 0 || $vals['means'] === 1) { $load_dropdown = true; } } } $semantic = new ScriptsSemantic(); $semantic->loadInputCss(); $semantic->loadFormCss(); if ($load_checkbox === true) { $semantic->loadCheckboxCss(); } if ($load_dropdown === true) { $semantic->loadDropdownCss(); } }); }