Esempio n. 1
0
 /**
  * Initialize the backend, administrative views.
  *
  * @since 1.1
  *
  * @return void
  */
 public function admin_init()
 {
     $admin_dir = $this->plugin_directory . 'admin/';
     // Facebook settings loader
     if (!class_exists('Facebook_Settings')) {
         require_once $admin_dir . 'settings.php';
     }
     Facebook_Settings::init();
     // include social publisher functionality if app access token exists
     if ($this->app_access_token_exists()) {
         // Open Graph mention tagging
         if (!class_exists('Facebook_Mentions_Search')) {
             require_once $admin_dir . 'social-publisher/mentions/mentions-search.php';
         }
         Facebook_Mentions_Search::wp_ajax_handlers();
     }
 }
Esempio n. 2
0
 /**
  * Initialize the backend, administrative views
  *
  * @since 1.1
  */
 public function admin_init()
 {
     $admin_dir = $this->plugin_directory . 'admin/';
     $sdk = $this->load_php_sdk();
     if ($sdk) {
         if (!class_exists('Facebook_User')) {
             require_once dirname(__FILE__) . '/facebook-user.php';
         }
         Facebook_User::extend_access_token();
     }
     if (!class_exists('Facebook_Settings')) {
         require_once $admin_dir . 'settings.php';
     }
     Facebook_Settings::init();
     if (!class_exists('Facebook_Social_Publisher')) {
         require_once $admin_dir . 'social-publisher/social-publisher.php';
     }
     new Facebook_Social_Publisher();
     if (!class_exists('Facebook_Mentions_Search')) {
         require_once $admin_dir . 'social-publisher/mentions/mentions-search.php';
     }
     Facebook_Mentions_Search::wp_ajax_handlers();
 }
Esempio n. 3
0
 /**
  * Initialize the backend, administrative views
  *
  * @since 1.1
  */
 public function admin_init()
 {
     $admin_dir = $this->plugin_directory . 'admin/';
     if (!class_exists('Facebook_Settings')) {
         require_once $admin_dir . 'settings.php';
     }
     Facebook_Settings::init();
     if ($this->app_access_token_exists()) {
         if (!class_exists('Facebook_Social_Publisher')) {
             require_once $admin_dir . 'social-publisher/social-publisher.php';
         }
         add_action('admin_init', array('Facebook_Social_Publisher', 'init'));
         if (!class_exists('Facebook_Mentions_Search')) {
             require_once $admin_dir . 'social-publisher/mentions/mentions-search.php';
         }
         Facebook_Mentions_Search::wp_ajax_handlers();
     }
 }