コード例 #1
0
 public function __construct($action, $method = '', $id = '')
 {
     parent::__construct();
     $this->action = $action;
     $this->method = $method;
     $this->id = $id;
 }
コード例 #2
0
 /**
  * PHP 5 constructor
  *
  * @package Themekraft Framework
  * @since 0.1.0
  * 
  */
 function __construct($id = '', $args = array())
 {
     $defaults = array('title_tag' => 'h3');
     $args = wp_parse_args($args, $defaults);
     extract($args, EXTR_SKIP);
     parent::__construct();
     $this->id = $id;
     $this->title_tag = $title_tag;
 }
コード例 #3
0
 public function get_html()
 {
     $html = '<div class="wrap">';
     if ($this->icon != '') {
         $html .= '<div id="icon-' . $this->icon . '" class="icon32"></div>';
     }
     $html .= '<h2>' . $this->title . '</h2>';
     $html .= parent::get_html();
     $html .= '</div>';
     return $html;
 }
コード例 #4
0
 /**
  * PHP 5 constructor
  *
  * @package Themekraft Framework
  * @since 0.1.0
  * 
  * @param string $action The action of the form
  * @param array $args Array of [ $method form method, $action form action ]
  */
 function __construct($id, $args)
 {
     parent::__construct();
     $defaults = array('method' => 'post', 'action' => esc_url($_SERVER['REQUEST_URI']), 'name' => $id);
     $args = wp_parse_args($args, $defaults);
     extract($args, EXTR_SKIP);
     $this->action = $action;
     $this->method = $method;
     $this->name = $name;
     $this->id = $id;
 }
コード例 #5
0
 /**
  * PHP 5 constructor
  *
  * @package Themekraft Framework
  * @since 0.1.0
  * 
  * @param array $args Array of [ $headline , $icon Path to icon on Page, $parent_slug Parent slug where menue appears, $page_title, $menue_title, $capability, $menue_slug ]
  */
 function __construct($args = array())
 {
     $defaults = array('id' => '', 'menu_title' => '', 'page_title' => '', 'capability' => 'edit_posts', 'parent_slug' => '', 'menu_slug' => '', 'icon_url' => '', 'position' => '', 'object_menu' => TRUE);
     // print_r( $args );
     $args = wp_parse_args($args, $defaults);
     extract($args, EXTR_SKIP);
     parent::__construct();
     // If menu slug is empty sanitize title name and use it as slug
     if ($menu_slug == '' && $menu_title != '') {
         $this->menu_slug = sanitize_title($menu_title);
     } else {
         $this->menu_slug = sanitize_title($menu_slug);
     }
     $this->id = $id;
     $this->menu_title = $menu_title;
     $this->page_title = $page_title;
     $this->capability = $capability;
     $this->parent_slug = $parent_slug;
     $this->icon_url = $icon_url;
     $this->position = $position;
     $this->object_menu = $object_menu;
     $count_autoslug = 0;
 }
コード例 #6
0
 function get_html()
 {
     $html = wp_nonce_field($this->option_group, $this->option_group . '_nonce');
     $html .= parent::get_html();
     return $html;
 }
コード例 #7
0
 public function __construct()
 {
     parent::__construct();
     $jqueryui = new TK_WP_JQUERYUI();
     $jqueryui->load_jqueryui(array('jquery-ui-tabs'));
 }
コード例 #8
0
 /**
  * PHP 5 constructor
  *
  * @package Themekraft Framework
  * @since 0.1.0
  * 
  */
 function __construct($id = '')
 {
     parent::__construct();
     $this->id = $id;
 }