Ejemplo n.º 1
0
 private function setup_dashboard_actions()
 {
     RWLogger::LogEnterence('setup_dashboard_actions');
     $this->fs->add_plugin_action_link(__rw('settings'), rw_get_admin_url());
     $this->fs->add_plugin_action_link(__rw('blog'), rw_get_site_url('/blog/'), true);
     if ($this->account->is_registered()) {
         add_action('wp_ajax_rw-toprated-popup-html', array(&$this, 'generate_toprated_popup_html'));
         add_action('wp_ajax_rw-affiliate-apply', array(&$this, 'send_affiliate_application'));
         add_action('wp_ajax_rw-addon-request', array(&$this, 'send_addon_request'));
         add_action('admin_init', array(&$this, 'register_admin_page_hooks'));
         add_action('admin_menu', array(&$this, 'AddPostMetaBox'));
         // Metabox for posts/pages
         add_action('admin_menu', array(&$this, 'add_comment_rating_metabox'));
         // Metabox for comment edit page.
         add_action('save_post', array(&$this, 'SavePostData'));
         add_action('edit_comment', array(&$this, 'save_comment_data'));
         if ($this->is_api_supported()) {
             // Since some old users might not having a secret key set,
             // the API won't be able to work for them - therefore, all API related
             // hooks must be executed within this scope.
             add_action('trashed_post', array(&$this, 'DeletePostData'));
             add_action('wp_ajax_rw-five-star-wp-rate', array(&$this, 'five_star_wp_rate_action'));
             $min_votes_trigger = $this->GetOption(WP_RW__DB_OPTION_WP_RATE_NOTICE_MIN_VOTES_TRIGGER);
             if (-1 !== $min_votes_trigger) {
                 add_action('admin_notices', array(&$this, 'five_star_wp_rate_notice'));
             }
         }
         $this->fs->add_filter('uninstall_confirmation_message', array(&$this, '_add_uninstall_confirmation_message'));
     }
     add_action('admin_head', array(&$this, 'rw_admin_menu_icon_css'));
     //				add_action( 'admin_menu', array( &$this, "admin_menu" ) );
     $this->fs->add_action('before_admin_menu_init', array(&$this, 'admin_menu'));
     add_action('updated_post_meta', array(&$this, 'PurgePostFeaturedImageTransient'), 10, 4);
 }
 private function _setup_freemius()
 {
     // Include Freemius SDK.
     require_once 'classes/freemius/start.php';
     $this->freemius = fs_dynamic_init(array('id' => '111', 'slug' => 'aryo-activity-log', 'public_key' => 'pk_939ce05ca99db10045c0094c6e953', 'is_premium' => false, 'has_paid_plans' => false, 'menu' => array('slug' => 'activity_log_page', 'account' => false, 'contact' => false, 'support' => false)));
     if ($this->freemius->is_plugin_update()) {
         $this->freemius->add_filter('connect_message', array(&$this, '_freemius_custom_connect_message'), WP_FS__DEFAULT_PRIORITY, 6);
     }
 }
Ejemplo n.º 3
0
 /**
  * Init Freemius related action & filter hooks.
  *
  * @author Vova Feldman (@svovaf)
  * @since 2.5.7
  */
 public function init_fs_hooks()
 {
     $this->fs->add_filter('connect_message', array(&$this, 'fs_connect_message'));
     $this->fs->add_action('after_account_connection', array(&$this, 'connect_account'), 10, 2);
     $this->fs->add_action('after_premium_version_activation', array(&$this, 'after_premium_version_activation_hook'), 10, 2);
     $this->fs->add_action('after_account_delete', array(&$this, 'delete_account_and_settings'));
     //				$this->fs->add_action('account_email_verified', array(&$this, 'verify_email'));
     $this->fs->add_action('after_account_details', array(&$this, 'AccountPageRender'));
     $this->fs->add_action('account_page_load_before_departure', array(&$this, 'AccountPageLoad'), 10, 3);
 }