public function valid() { if (!defined('WPDDL_GENERAL_OPTIONS')) { return false; } $cpt = Types_Helper_Condition::get_post_type(); $layouts = get_option(WPDDL_GENERAL_OPTIONS, array()); if (!array_key_exists('layouts_cpt_' . $cpt->name, $layouts)) { return false; } self::$layout_id = $layouts['layouts_cpt_' . $cpt->name]; return true; }