/** * Upgrade the database to version 1500. * * @since 1.5.0 * * @uses _genesis_update_settings() */ function prose_update_1500() { /** Calculate new unitless line height */ $body_line_height = absint(prose_get_design_option('body_line_height')) / absint(prose_get_design_option('body_font_size')); /** Update Settings */ _genesis_update_settings(array('theme_version' => '1.5.0', 'db_version' => '1500', 'body_line_height' => round($body_line_height, 3)), PROSE_SETTINGS_FIELD); /** write CSS to media folder */ prose_create_stylesheets(); /** write custom.php to media folder */ prose_create_custom_php(); }
/** * Helper function that will create custom.php file, if it does not already exist. * * @uses prose_get_custom_php_path() * * @since 1.5.0 * */ function prose_edit_custom_php($text = '') { /** Create file, if it doesn't exist */ if (!file_exists(prose_get_custom_php_path())) { prose_create_custom_php(); } /** Now that it exists, write text to that file */ $handle = @fopen(prose_get_custom_php_path(), 'w+'); @fwrite($handle, stripslashes($text)); @fclose($handle); }
<?php /* WARNING: DO NOT edit this file under any circumstances. Please do all PHP modifications via the Custom Code admin menu. */ /** * This file calls the init.php file for both Genesis and Prose. * * It initializes the Genesis framework, and loads the Prose library as well. * * This file is a core Prose file and should not be edited. * * @author StudioPress * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later) * @link http://www.studiopress.com/themes/genesis */ /** Start the engine */ require_once get_template_directory() . '/lib/init.php'; require_once get_stylesheet_directory() . '/lib/init.php'; prose_create_custom_php();