PluginProbe
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager / 1.2.1
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager v1.2.1
10.56 1.2.1 10 10.1 10.2 10.3 10.31 10.32 10.33 10.34 10.50 10.51 10.52 10.53 10.55 9.0 9.0.1 9.4 trunk 1.0.0 1.1 1.2
easy-code-manager / framework / developer / interface / block / shortcode / segments / segments.php

segments.php in FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager 1.2.1, at framework/developer/interface/block/shortcode/segments/segments.php

52 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 */
5
6 // Disallow direct access.
7 defined('ABSPATH') or die("Access denied");
8
9 /**
10 *
11 */
12 class CJT_Framework_Developer_Interface_Block_Shortcode_Segments_Segments
13 extends CJT_Framework_Developer_Interface_Block_Parameters_Parameters {
14
15 /**
16 * put your comment there...
17 *
18 * @var mixed
19 */
20 protected $content = null;
21
22 /**
23 * put your comment there...
24 *
25 * @param mixed $content
26 * @return CJT_Framework_Developer_Interface_Block_Shortcode_Segments
27 */
28 public function __construct(& $content) {
29 // Initialize.
30 $this->content =& $content;
31 // Initialize parent.
32 parent::__construct(array());
33 }
34
35 /**
36 * put your comment there...
37 *
38 */
39 public function validate() {
40 // Read segments from Shortcode content.
41 $segments = preg_split('/(\w+)\=\:\s+/', $this->content, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
42 // All even indexes if for segment names and
43 // odd index for values.
44 for ($index = 0; $index < count($segments); $index+=2) {
45 // Get key from current item and value from the next.
46 $this->uParams[$segments[$index]] = $segments[$index + 1];
47 }
48 // Parent vaidation.
49 return parent::validate();
50 }
51
52 } // End class.