public function __construct() { $this->p =& Ngfb::get_instance(); if (!is_object($this->p)) { return; } $lca = $this->p->cf['lca']; $short = $this->p->cf['plugin'][$lca]['short']; $widget_name = 'Sharing Buttons'; $widget_class = $this->p->cf['lca'] . '-widget-buttons'; $widget_ops = array('classname' => $widget_class, 'description' => 'The ' . $short . ' social sharing buttons widget.'); $this->WP_Widget($widget_class, $widget_name, $widget_ops); }
public function __construct() { $this->p =& Ngfb::get_instance(); if (!is_object($this->p)) { return; } $lca = $this->p->cf['lca']; $short = $this->p->cf['plugin'][$lca]['short']; $name = $this->p->cf['plugin'][$lca]['name']; $widget_name = $short . ' Sharing Buttons'; $widget_class = $lca . '-widget-buttons'; $widget_ops = array('classname' => $widget_class, 'description' => sprintf(__('The %s social sharing buttons widget.', 'nextgen-facebook'), $short)); parent::__construct($widget_class, $widget_name, $widget_ops); }
public static function get_pref($idx = false, $user_id = false) { $user_id = $user_id === false ? get_current_user_id() : $user_id; if (!isset(self::$pref[$user_id]['options_filtered']) || self::$pref[$user_id]['options_filtered'] !== true) { self::$pref[$user_id] = get_user_meta($user_id, NGFB_PREF_NAME, true); if (!is_array(self::$pref[$user_id])) { self::$pref[$user_id] = array(); } $ngfb = Ngfb::get_instance(); if (!isset(self::$pref[$user_id]['show_opts'])) { self::$pref[$user_id]['show_opts'] = $ngfb->options['plugin_show_opts']; } self::$pref[$user_id]['options_filtered'] = true; } if ($idx !== false) { if (isset(self::$pref[$user_id][$idx])) { return self::$pref[$user_id][$idx]; } else { return false; } } else { return self::$pref[$user_id]; } }
$this->options[$key] = constant($constant_name); } } } } } } if (!is_array($this->site_options)) { $this->site_options = array(); } $this->options = apply_filters('ngfb_get_options', $this->options); $this->site_options = apply_filters('ngfb_get_site_options', $this->site_options); } } global $ngfb; $ngfb =& Ngfb::get_instance(); } if (!class_exists('NgfbNoDebug')) { class NgfbNoDebug { public $enabled = false; public function mark() { return; } public function args() { return; } public function log() {
function ngfb_schema_attributes($attr = '') { $ngfb =& Ngfb::get_instance(); echo $ngfb->schema->add_head_attributes($attr); }
function ngfb_get_short_url($use_post = false, $add_page = true, $source_id = false) { $ngfb =& Ngfb::get_instance(); return apply_filters('ngfb_shorten_url', $ngfb->util->get_sharing_url($post_id, $add_page, $source_id), $ngfb->options['plugin_shortener']); }