Example #1
0
                    					<?php } ?>
                    				<?php } ?>
                    				</ul>
                    			<?php }*/
                    ?>
						<?php 
                } else {
                    ?>
							<?php 
                    // custom areas
                    ?>
							<?php 
                    foreach ($section->settings as $setting) {
                        ?>
								<?php 
                        wptouch_admin_render_special_setting($setting);
                        ?>
							<?php 
                    }
                    ?>
						<?php 
                }
                ?>
						</div><!-- wptouch-settings-sub-page -->
					<?php 
            }
            ?>
					</div>
				<?php 
        }
        ?>
Example #2
0
function wptouch_admin_render_setting($setting)
{
    require_once WPTOUCH_DIR . '/core/settings.php';
    // Check if this is a custom setting
    if ($setting->type == 'custom') {
        return wptouch_admin_render_special_setting($setting);
    }
    $setting_filename = $setting->type . '.php';
    $directories = array(WPTOUCH_ADMIN_DIR . '/settings', WPTOUCH_DIR . '/pro/settings');
    $rendered = false;
    foreach ($directories as $dir) {
        if (file_exists($dir . '/html/' . $setting_filename)) {
            wptouch_admin_prime_setting_for_display($setting);
            // Load associated setting code if it exists
            if (file_exists($dir . '/include/' . $setting_filename)) {
                require_once $dir . '/include/' . $setting_filename;
            }
            include $dir . '/html/' . $setting_filename;
            $rendered = true;
            break;
        }
    }
    if (!$rendered) {
        do_action('wptouch_admin_render_setting', $setting);
    }
}