Created
September 26, 2011 19:23
-
-
Save joshualynch/1243132 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(count($this->boxes) > 0) { | |
| foreach($this->boxes as $box) { | |
| $data = $_POST[$box['id']]; | |
| if($box['type'] == 'editor') { | |
| $data = wptexturize(wpautop($data)); | |
| } | |
| if($box['type'] == 'checkbox') { | |
| if($data != 'true') { | |
| $data = 'false'; | |
| } | |
| } | |
| if($box['type'] == 'slider') { | |
| if(strpos($data, '-') !== false) { | |
| $data = explode('-',$data); | |
| } | |
| } | |
| if($box['type'] == 'date') { | |
| $date = explode('/', $data); | |
| if(isset($date[2])) $data = mktime(0,0,0,$date[0],$date[1],$date[2]); | |
| } | |
| update_post_meta($post_id, $box['id'], $data); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Warning: Invalid argument supplied for foreach() in /home/joshual1/public_html/wp-content/themes/project-plan/uielement.class.php on line 388 | |
| Warning: Invalid argument supplied for foreach() in /home/joshual1/public_html/wp-content/themes/project-plan/uielement.class.php on line 388 | |
| Warning: Cannot modify header information - headers already sent by (output started at /home/joshual1/public_html/wp-content/themes/project-plan/uielement.class.php:388) in /home/joshual1/public_html/wp-includes/pluggable.php on line 934 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment