Beispiel #1
0
 function __construct()
 {
     //setting plugin meta saved in config.php
     $this->plugin_meta = get_plugin_meta_wpregistration();
     //getting saved settings
     $this->plugin_settings = get_option($this->plugin_meta['shortname'] . '_settings');
     /*
      * [1]
      * TODO: change this for plugin admin pages
      */
     $this->menu_pages = array(array('page_title' => $this->plugin_meta['name'], 'menu_title' => $this->plugin_meta['name'], 'cap' => 'manage_options', 'slug' => $this->plugin_meta['shortname'], 'callback' => 'nm_settings', 'parent_slug' => ''));
     /*
      * [2]
      * TODO: Change this for admin related scripts
      * JS scripts and styles to loaded
      * ADMIN
      */
     $this->plugin_scripts_admin = array(array('script_name' => 'scripts-chosen', 'script_source' => '/js/chosen/chosen.jquery.min.js', 'localized' => false, 'type' => 'js', 'page_slug' => $this->plugin_meta['shortname'], 'depends' => array('jquery')), array('script_name' => 'chosen-style', 'script_source' => '/js/chosen/chosen.min.css', 'localized' => false, 'type' => 'style', 'page_slug' => $this->plugin_meta['shortname']), array('script_name' => 'scripts-admin', 'script_source' => '/js/admin.js', 'localized' => true, 'type' => 'js', 'page_slug' => $this->plugin_meta['shortname'], 'depends' => array('jquery', 'jquery-ui-accordion', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-ui-slider', 'jquery-ui-dialog', 'jquery-ui-tabs', 'media-upload', 'wp-color-picker', 'thickbox')), array('script_name' => 'ui-style', 'script_source' => '/js/ui/css/smoothness/jquery-ui-1.10.3.custom.min.css', 'localized' => false, 'type' => 'style', 'page_slug' => $this->plugin_meta['shortname'], 'depends' => ''), array('script_name' => 'wp-color-picker', 'script_source' => 'shipped', 'localized' => false, 'type' => 'style', 'page_slug' => array($this->plugin_meta['shortname'])));
     $this->ajax_callbacks = array('save_settings' => true);
     //do not change this action, is for admin
     add_action('admin_menu', array($this, 'add_menu_pages'));
     /**
      * laoding admin scripts only for plugin pages
      * since 27 september, 2014
      * Najeeb's 
      */
     add_action('admin_enqueue_scripts', array($this, 'load_scripts_admin'));
     $this->do_callbacks();
 }
 function __construct()
 {
     $this->plugin_meta = get_plugin_meta_wpregistration();
     $this->title = __('Checkbox Input', 'wp-registration');
     $this->desc = __('regular checkbox input', 'wp-registration');
     $this->settings = self::get_settings();
 }
 function __construct()
 {
     $this->plugin_meta = get_plugin_meta_wpregistration();
     $this->title = __('Image (Pre-uploaded)', 'wp-registration');
     $this->desc = __('Images selection', 'wp-registration');
     $this->settings = self::get_settings();
 }
 function __construct()
 {
     $this->plugin_meta = get_plugin_meta_wpregistration();
     $this->title = __('Section', 'wp-registration');
     $this->desc = __('Form section', 'wp-registration');
     $this->settings = self::get_settings();
 }
 function __construct()
 {
     $this->plugin_meta = get_plugin_meta_wpregistration();
     $this->title = __('File Input', 'wp-registration');
     $this->desc = __('regular file input', 'wp-registration');
     $this->settings = self::get_settings();
     $this->input_scripts = array('shipped' => array(''), 'custom' => array(array('script_name' => 'plupload_script', 'script_source' => '/js/uploader/plupload.full.min.js', 'localized' => false, 'type' => 'js', 'depends' => array('jquery'), 'in_footer' => '')));
     add_action('wp_enqueue_scripts', array($this, 'load_input_scripts'));
 }
 function __construct()
 {
     $this->plugin_meta = get_plugin_meta_wpregistration();
     $this->title = __('Date Input', 'wp-registration');
     $this->desc = __('regular date input', 'wp-registration');
     $this->settings = self::get_settings();
     $this->input_scripts = array('shipped' => array('jquery-ui-datepicker'), 'custom' => NULL);
     add_action('wp_enqueue_scripts', array($this, 'load_input_scripts'));
 }
 function __construct()
 {
     $this->plugin_meta = get_plugin_meta_wpregistration();
     $this->title = __('Instagram import', $this->plugin_meta['shortname']);
     $this->desc = __('Import photo from Instagram', $this->plugin_meta['shortname']);
     $this->settings = self::get_settings();
     $this->access_token_url = 'https://api.instagram.com/oauth/access_token';
     $this->grant_type = 'authorization_code';
     $this->response_type = 'code';
 }
 /**
  * __construct function.
  *
  * @access public
  * @param 
  */
 public function __construct()
 {
     $this->plugin_meta = get_plugin_meta_wpregistration();
 }
Beispiel #9
0
 function activate_plugin()
 {
     $plugin_meta = get_plugin_meta_wpregistration();
     if (!get_option('wpregistration_meta')) {
         update_option('wpregistration_meta', $plugin_meta['default_fields']);
     }
     //wpregistration_pa($plugin_meta);
 }