Exemplo n.º 1
0
 /**
  * Constructor
  *
  * @param aam $parent
  *
  * @return void
  *
  * @access public
  */
 public function __construct(aam $parent)
 {
     parent::__construct($parent);
     if (is_admin()) {
         $this->registerFeature();
     }
 }
Exemplo n.º 2
0
 /**
  *
  * @param aam|aam_View_Connector $parent
  */
 public function __construct(aam $parent)
 {
     parent::__construct($parent);
     if (is_admin()) {
         add_action('admin_print_scripts', array($this, 'printScripts'));
         add_action('admin_print_styles', array($this, 'printStyles'));
         add_filter('aam_ui_features', array($this, 'feature'), 10);
     }
 }
Exemplo n.º 3
0
 /**
  *
  * @param aam|aam_View_Connector $parent
  */
 public function __construct(aam $parent)
 {
     parent::__construct($parent);
     if (aam_Core_API::isNetworkPanel()) {
         add_action('admin_print_scripts', array($this, 'printScripts'));
         add_action('admin_print_styles', array($this, 'printStyles'));
         add_action('aam_localization_labels', array($this, 'localizationLabels'));
         add_action('wpmu_new_blog', array($this, 'newBlog'), 10, 6);
         $this->registerSubject();
     } elseif (is_admin()) {
         add_filter('aam_ajax_call', array($this, 'ajax'), 10, 2);
     }
 }
Exemplo n.º 4
0
 /**
  *
  * @param aam|aam_View_Connector $parent
  */
 public function __construct(aam $parent)
 {
     parent::__construct($parent);
     //include activity object
     require_once dirname(__FILE__) . '/activity.php';
     if (is_admin()) {
         $this->registerFeature();
     }
     //define new Activity Object
     add_filter('aam_object', array($this, 'activityObject'), 10, 3);
     //login & logout hooks
     add_action('wp_login', array($this, 'login'), 10, 2);
     add_action('wp_logout', array($this, 'logout'));
 }
Exemplo n.º 5
0
 /**
  * Constructor
  *
  * @param aam $parent Main AAM object
  *
  * @return void
  *
  * @access public
  * @see aam It is class in advanced-access-manager/aam.php file
  */
 public function __construct(aam $parent)
 {
     parent::__construct($parent);
     //include login counter object
     require_once dirname(__FILE__) . '/counter.php';
     if (is_admin()) {
         $this->registerFeature();
     }
     //define new AAM Object. See aam_Control_Subject::getObject function for more
     //information about aam_object filter
     add_filter('aam_object', array($this, 'counterObject'), 10, 4);
     //login hooks
     add_action('wp_login', array($this, 'login'), 10, 2);
 }
Exemplo n.º 6
0
 /**
  *
  * @param aam|aam_View_Connector $parent
  */
 public function __construct(aam $parent)
 {
     parent::__construct($parent);
     //include activity object
     require_once dirname(__FILE__) . '/activity.php';
     if (is_admin()) {
         add_action('admin_print_scripts', array($this, 'printScripts'));
         add_action('admin_print_styles', array($this, 'printStyles'));
         add_filter('aam_ui_features', array($this, 'feature'), 10);
         add_filter('aam_ajax_call', array($this, 'ajax'), 10, 2);
         add_action('aam_localization_labels', array($this, 'localizationLabels'));
     }
     //define new Activity Object
     add_filter('aam_object', array($this, 'activityObject'), 10, 3);
     //login & logout hooks
     add_action('wp_login', array($this, 'login'), 10, 2);
     add_action('wp_logout', array($this, 'logout'));
 }
Exemplo n.º 7
0
 /**
  * Constructor
  *
  * @param aam $parent Main AAM object
  *
  * @return void
  *
  * @access public
  */
 public function __construct(aam $parent)
 {
     parent::__construct($parent);
     if (is_admin()) {
         //print required JS & CSS
         add_action('admin_print_scripts', array($this, 'printScripts'));
         add_action('admin_print_styles', array($this, 'printStyles'));
         add_action('admin_head', array($this, 'adminHead'));
         //manager Admin Menu
         if (aam_Core_API::isNetworkPanel()) {
             add_action('network_admin_menu', array($this, 'adminMenu'), 999);
         } else {
             add_action('admin_menu', array($this, 'adminMenu'), 999);
         }
         //manager AAM Ajax Requests
         add_action('wp_ajax_aam_security', array($this, 'ajax'));
     }
     add_filter('wp_login_errors', array($this, 'loginFailure'), 10, 2);
     add_action('wp_login', array($this, 'login'), 10, 2);
     //add_filter('authenticate', array($this, 'authenticate'), 999, 3);
 }
Exemplo n.º 8
0
 /**
  * Constructor
  * 
  * @param aam $parent
  * 
  * @return void
  * 
  * @access public 
  */
 public function __construct(aam $parent)
 {
     parent::__construct($parent);
     if (is_admin()) {
         add_action('admin_print_scripts', array($this, 'printScripts'));
         add_action('aam_post_features_render', array($this, 'postFeatureRender'));
         add_filter('aam_ajax_call', array($this, 'ajax'), 10, 2);
         add_filter('aam_capability_groups', array($this, 'capabilityGroups'));
         add_filter('aam_capability_group', array($this, 'capabilityGroup'), 10, 2);
         add_filter('comment_row_actions', array($this, 'commentRowActions'), 10, 2);
         add_filter('aam_core_setting', array($this, 'coreSettings'), 10, 2);
         //control post type registration for ADD action
         add_action('registered_post_type', array($this, 'registredPostType'), 999, 2);
         //legacy
         add_filter('wpaccess_restrict_limit', array($this, 'extendAccess'));
     }
     add_filter('aam_post_access_option', array($this, 'postAccessOption'), 10, 2);
     add_filter('aam_term_access_option', array($this, 'termAccessOption'), 10, 2);
     if (aam_Core_ConfigPress::getParam('aam.page_category', 'true') == 'true') {
         register_taxonomy('page_category', 'page', array('hierarchical' => TRUE, 'rewrite' => TRUE, 'public' => TRUE, 'show_ui' => TRUE, 'show_in_nav_menus' => TRUE));
     }
     //add post filter for LIST restriction
     add_filter('the_posts', array($this, 'thePosts'), 999, 2);
 }