// Check for modified settings to save in conf
if (isset($results['settings'])) {
- while (list($key, $val) = each($results['settings'])) {
+ foreach ( $results['settings'] as $key => $val ) {
$this->config['settings'][$key] = $val;
}
}
$this->config = $config;
// Add any shortcodes from the config 'shortcodes' table
- while (list($key, $val) = each($this->config['shortcodes'])) {
+ foreach ( $this->config['shortcodes'] as $key => $val ) {
add_shortcode($key,
array(
$this,
// Check shortcode for cache configuration
$scCacheControl = false;
foreach ($this->config['addOns'] as $addon) {
- while (list($key, $val) = each($addon['shortcodes'])) {
+ foreach ( $addon['shortcodes'] as $key => $val ) {
if ($key == $shortcode && isset($val['cacheControl'])) {
$scCacheControl = $val['cacheControl'];
}
$defaults = $this->wpdb->get_row("SELECT * FROM ".$shortcodeData['table']." WHERE id = 1;", ARRAY_A);
if ($defaults) {
- while (list($key, $val) = each($shortcodeData['attributes'])) {
+ foreach ( $shortcodeData['attributes'] as $key => $val ) {
if (isset($defaults[$key]) && $val != false) {
$shortcodeData['attributes'][$key] = $defaults[$val];
}
$view = $results['view'];
// Check for modified settings to save in conf
if (isset($results['settings'])) {
- while (list($key, $val) = each($results['settings'])) {
+ foreach ( $results['settings'] as $key => $val ) {
$this->config['settings'][$key] = $val;
}
}