Example #1
0
 public function __construct()
 {
     if (!gp_const_get('GP_FORCE_SSL')) {
         return;
     }
     parent::__construct();
     $this->add_action('plugins_loaded', array('priority' => 1));
 }
Example #2
0
 function __construct()
 {
     parent::__construct();
     $this->template_path = dirname(__FILE__);
     $this->add_action('init');
     $this->add_action('after_hello');
     $this->add_action('after_notices');
 }
 public function __construct()
 {
     if (!gp_const_get('GP_USE_SLUG_FOR_DOWNLOADS')) {
         return;
     }
     parent::__construct();
     $this->add_action('export_filename', array('args' => 5));
 }
 public function __construct()
 {
     if (!gp_const_get('GP_NEW_WINDOW_FOR_EXTERNAL_LINKS')) {
         return;
     }
     parent::__construct();
     $this->add_action('pre_tmpl_load', array('args' => 2));
 }
Example #5
0
 public function __construct()
 {
     if (!gp_const_get('GP_REMOVE_POWERED_BY')) {
         return;
     }
     parent::__construct();
     $this->add_action('pre_tmpl_load', array('args' => 2));
     $this->add_action('gp_footer', array('args' => 0, 'priority' => 1));
 }
 public function __construct()
 {
     if (!gp_const_get('GP_WORDPRESS_SINGLE_SIGN_ON')) {
         return;
     }
     parent::__construct();
     $this->add_action('gp_logout_link', array('args' => 1));
     $this->add_action('gp_login_link', array('args' => 1));
 }
 public function __construct()
 {
     if (!gp_const_get('GP_REMOVE_PROJECTS_FROM_BREADCRUMS')) {
         return;
     }
     parent::__construct();
     $this->add_action('gp_pre_breadcrumb', array('args' => 1));
     $this->add_action('gp_logo_url', array('args' => 1));
 }
Example #8
0
 public function __construct()
 {
     parent::__construct();
     $this->add_action('plugins_loaded');
     $this->add_filter('tmpl_load_locations', array('args' => 4));
     $url = gp_url_public_root();
     wp_enqueue_script('tec', $url . '/plugins/tec-theme/templates/js/tec.js', array('jquery'));
     if (is_object) {
         GP::$translation->per_page = 30;
     }
 }
 public function __construct()
 {
     $this->key = gp_const_get('GP_GOOGLE_TRANSLATE_KEY');
     if (!$this->key) {
         return;
     }
     parent::__construct();
     $this->add_action('pre_tmpl_load', array('args' => 2));
     $this->add_filter('gp_entry_actions');
     $this->add_action('gp_translation_set_bulk_action');
     $this->add_action('gp_translation_set_bulk_action_post', array('args' => 4));
 }
 public function __construct()
 {
     parent::__construct();
     // Used for selecting the theme
     $this->add_filter('tmpl_load_locations', array('args' => 4));
     $this->add_action('init');
     if ('default' == GP::$user->current()->get_meta('default_theme')) {
         return;
     }
     $this->child_path = dirname(__FILE__) . '/templates/';
     $this->add_action('plugins_loaded');
     $this->add_action('wp_default_styles');
     $this->add_action('wp_print_styles');
     $this->add_action('wp_default_scripts');
     $this->add_action('wp_print_scripts');
 }
 public function __construct()
 {
     if (!gp_const_get('GP_BULK_DOWNLOAD_TRANSLATIONS')) {
         return;
     }
     // We need the Zip class to do the bulk export, if it doesn't exist, don't bother enabling the plugin.
     if (!class_exists('ZipArchive')) {
         return;
     }
     parent::__construct();
     $this->add_action('gp_project_actions', array('args' => 2));
     // We can't use the filter in the defaults route code because plugins don't load until after
     // it has already run, so instead add the routes directly to the global GP_Router object.
     GP::$router->add("/bulk-export/(.+?)", array($this, 'bulk_export'), 'get');
     GP::$router->add("/bulk-export/(.+?)", array($this, 'bulk_export'), 'post');
 }
Example #12
0
 public function __construct()
 {
     $this->key = gp_const_get('GP_GOOGLE_TRANSLATE_KEY');
     if (!gp_const_get('GP_GOOGLE_TRANSLATE') && !$this->key) {
         return;
     }
     parent::__construct();
     if (GP::$user->current()->can('write', 'project')) {
         $this->add_action('gp_project_actions', array('args' => 2));
     }
     $this->add_action('pre_tmpl_load', array('args' => 2));
     $this->add_filter('gp_entry_actions');
     $this->add_action('gp_translation_set_bulk_action');
     $this->add_action('gp_translation_set_bulk_action_post', array('args' => 4));
     // We can't use the filter in the defaults route code because plugins don't load until after
     // it has already run, so instead add the routes directly to the global GP_Router object.
     GP::$router->add("/bulk-translate/(.+?)", array($this, 'bulk_translate'), 'get');
     GP::$router->add("/bulk-translate/(.+?)", array($this, 'bulk_translate'), 'post');
 }
Example #13
0
 function __construct()
 {
     parent::__construct();
     $this->add_action('before_login_form');
 }
 function __construct()
 {
     parent::__construct();
     $this->add_filter('pre_can_user', array('args' => 2, 'priority' => 9));
 }
Example #15
0
 public function __construct()
 {
     parent::__construct();
     $this->add_action('plugins_loaded');
     $this->add_filter('tmpl_load_locations', array('args' => 4));
 }
 function __construct()
 {
     parent::__construct();
     $this->add_filter('can_user', array('args' => 2));
 }