/** * Returns the main instance of De_Grona_Ehdokas to prevent the need to use globals. * * @since 0.0.1 * @return object De_Grona_Ehdokas */ function De_Grona_Ehdokas() { $instance = De_Grona_Ehdokas::instance(__FILE__, PLUGIN_VERSION); if (is_null($instance->settings)) { $instance->settings = De_Grona_Ehdokas_Settings::instance($instance); } return $instance; }
function degrona15_add_call_to_action_buttons() { if (function_exists('De_Grona_Ehdokas')) { $instance = De_Grona_Ehdokas::instance(); $data = $instance->get_call_to_action_buttons(); if (!empty($data)) { ?> <div class="call-to-action-buttons large-4 medium-6 small-12 columns"> <?php echo $data; ?> </div> <?php } } }
public function __construct() { $this->parent = De_Grona_Ehdokas::instance(); $widget_ops = array('classname' => 'degrona_candidate_cta_buttons_widget', 'description' => __('Display your call to action buttons', PLUGIN_TEXT_DOMAIN)); parent::__construct('degrona_ehdokas_cta_widget', __('Call To Action Buttons', PLUGIN_TEXT_DOMAIN), $widget_ops); }
/** * Main De_Grona_Ehdokas Instance * * Ensures only one instance of De_Grona_Ehdokas is loaded or can be loaded. * * @since 0.0.1 * @static * @see De_Grona_Ehdokas() * @return Main De_Grona_Ehdokas instance */ public static function instance($file = '', $version = PLUGIN_VERSION) { if (is_null(self::$_instance)) { self::$_instance = new self($file, $version); } return self::$_instance; }