Example #1
0
 /**
  * Main Constructor Class
  * @since 1.0.0
  * @return none
  * @constructor
  */
 function __construct($in_admin = false)
 {
     Tweeted::__construct();
     // Set this to true if we in the admin area
     $this->in_admin = $in_admin;
     /** Create the shortcode **/
     add_shortcode('tweeted', array(&$this, 'get_tweeted'));
     /** Actions & Filters **/
     add_action('wp_default_styles', array(&$this, 'default_styles'));
     add_filter('the_posts', array(&$this, 'show_css'), 1);
 }
Example #2
0
 /**
  * Main Constructor Class
  * @since 1.0.0
  * @return none
  * @constructor
  */
 function __construct()
 {
     Tweeted::__construct();
     //	Should we be upgrading the options?
     if (version_compare($this->get_option('version'), $this->version, '!=') && $this->get_option('version') !== false) {
         $this->check_upgrade();
     }
     //	Store Plugin Location Information
     $this->plugin_file = dirname(dirname(__FILE__)) . '/tweeted.php';
     $this->plugin_basename = plugin_basename($this->plugin_file);
     //	Load Translations File
     load_plugin_textdomain('tweeted', false, $this->plugin_url() . '/locale');
     //	Run this when installed or upgraded.
     register_activation_hook($this->plugin_file, array(&$this, 'init'));
     //	Admin Actions
     add_action('admin_menu', array(&$this, 'register_settings_page'));
     add_action('admin_init', array(&$this, 'admin_init'));
 }