public function init() { $this->post_types = pootlepb_posts(); $this->options_init(); $this->add_new(); }
/** * Get the settings * * @param string $key Only get a specific key. * * @return mixed * @since 0.1.0 */ function pootlepb_settings($key = '') { $set = get_option('pootlepb_display', array()); $settings = get_theme_support('ppb-panels'); if (!empty($settings)) { $settings = $settings[0]; } else { $settings = array(); } $settings = wp_parse_args($settings, array('post-types' => pootlepb_posts(), 'responsive' => !isset($set['responsive']) ? true : $set['responsive'] == '1', 'mobile-width' => !isset($set['mobile-width']) ? 780 : $set['mobile-width'], 'margin-bottom' => !isset($set['margin-bottom']) ? 0 : $set['margin-bottom'], 'margin-sides' => !isset($set['margin-sides']) ? 10 : $set['margin-sides'], 'inline-css' => true, 'modules-position' => !isset($set['modules-position']) ? 'left' : $set['modules-position'])); if (!empty($key)) { return isset($settings[$key]) ? $settings[$key] : null; } return $settings; }