PluginProbe
Ultimate WP Mail / trunk
Ultimate WP Mail vtrunk
1.3.13 1.3.12 trunk 0.11 0.25 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 All 46 releases
ultimate-wp-mail / includes / CustomElement.class.php

CustomElement.class.php in Ultimate WP Mail trunk, at includes/CustomElement.class.php

53 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 class UWPM_Element {
3
4 // the code-friendly name of the element
5 public $slug;
6
7 // the display name for the element
8 public $label;
9
10 // the section this element should be displayed in
11 public $section;
12
13 // the function used to process the element when an email is sent
14 public $callback_function;
15
16 // optional additional attributes for the element
17 public $attributes;
18
19 // optional styling added to the output
20 public $styling_options;
21
22 public function __construct( $element_type, $params = array() ) {
23
24 $this->slug = $element_type;
25
26 $this->set_props( $params );
27 }
28
29 /**
30 * Set the key properties for this element type
31 * @since 0.0.1
32 */
33 public function set_props( $params ) {
34
35 $defaults = array(
36 'label' => $this->slug,
37 'section' => 'uncategorized',
38 'callback_function' => 'print_r',
39 'attributes' => array(),
40 'styling_options' => array()
41 );
42
43 $props = array_merge( $defaults, $params );
44
45 $this->label = $props['label'];
46 $this->section = $props['section'];
47 $this->callback_function = $props['callback_function'];
48 $this->attributes = $props['attributes'];
49 $this->styling_options = $props['styling_options'];
50 }
51 }
52
53 ?>