public function __construct($config, $addon)
 {
     $this->_addon = $addon;
     $capabilities = isset($config["capabilities"]) ? $config["capabilities"] : array();
     $redirect_url = isset($config["redirect_url"]) ? $config["redirect_url"] : "";
     $edit_url = isset($config["edit_url"]) ? $config["edit_url"] : "";
     $object_type = isset($config["object_type"]) ? $config["object_type"] : "";
     $this->_strings = isset($config["strings"]) ? $config["strings"] : array();
     parent::__construct($object_type, $redirect_url, $edit_url, $capabilities);
 }
Пример #2
0
 /**
  * e.g.
  *
  *  array(
  *     "object_type" => 'contact',
  *     "capabilities" => array("gravityforms_contacts_edit_contacts"),
  *     "redirect_url" => admin_url("admin.php?page=gf_contacts"),
  *     "edit_url" => admin_url(sprintf("admin.php?page=gf_contacts&id=%d", $contact_id)),
  *     "strings" => $strings
  *     );
  *
  * @param array $config
  * @param GFAddOn $addon
  */
 public function __construct($config, $addon)
 {
     $this->_addon = $addon;
     $capabilities = isset($config['capabilities']) ? $config['capabilities'] : array();
     $redirect_url = isset($config['redirect_url']) ? $config['redirect_url'] : '';
     $edit_url = isset($config['edit_url']) ? $config['edit_url'] : '';
     $object_type = isset($config['object_type']) ? $config['object_type'] : '';
     $this->_strings = isset($config['strings']) ? $config['strings'] : array();
     parent::__construct($object_type, $redirect_url, $edit_url, $capabilities);
 }
Пример #3
0
 public function __construct()
 {
     $capabilities = array('gravityforms_edit_settings');
     $redirect_url = admin_url('admin.php?page=gf_edit_forms');
     $edit_url = admin_url('admin.php?page=gf_settings');
     parent::__construct('plugin_settings', $redirect_url, $edit_url, $capabilities);
 }