/Wordpress/warp/systems/wordpress/config/layouts/fields/position.php
PHP | 24 lines | 10 code | 6 blank | 8 comment | 2 complexity | 0b5ed63ca2350818020c1c9d22552320 MD5 | raw file
- <?php
- /**
- * @package Warp Theme Framework
- * @author YOOtheme http://www.yootheme.com
- * @copyright Copyright (C) YOOtheme GmbH
- * @license http://www.gnu.org/licenses/gpl.html GNU/GPL
- */
- printf('<select %s>', $control->attributes(compact('name')));
- foreach ($this['system']->xml->find('positions > position') as $position) {
- // set attributes
- $attributes = array('value' => $position->text());
- // is checked ?
- if ($position->text() == $value) {
- $attributes = array_merge($attributes, array('selected' => 'selected'));
- }
- printf('<option %s>%s</option>', $control->attributes($attributes), $position->text());
- }
- printf('</select>');