/** * Adds the paragraph tags around a setting line and echos the result. * * @author Gary Jones * @param array|string $args * @since 0.9.5 */ function prose_setting_line($args) { if (is_array($args)) { $output = ''; foreach ($args as $arg) { $output .= ' ' . $arg; } prose_setting_line($output); } else { ?> <p><?php echo $args; ?> </p> <?php } }
/** * Add settings to the General Settings box. Does prose_settings_general action hook. * * @author StudioPress * @since 1.5.0 */ function general() { global $theme, $blog_id; prose_setting_line(prose_add_checkbox_setting('minify_css', __('Minify CSS?', 'prose'))); prose_setting_line(prose_add_note(__('Check this box for a live site, uncheck for testing.', 'prose'))); prose_setting_line(prose_add_note(sprintf(__('Use the Editor to <a href="%s">add/edit custom CSS and functions</a>.', 'prose'), menu_page_url('prose-custom', false)))); #echo '<hr class="div" />'; #prose_setting_line( '<a class="button" href="' . wp_nonce_url( admin_url( 'admin.php?page=design-settings&prose=export' ), 'prose-export' ) . '">'.__( 'Export Prose Settings', 'prose' ) . '</a>' ); #prose_setting_line( '</form><form method="post" enctype="multipart/form-data" action="">' . wp_nonce_field( 'prose-import', '_wpnonce-prose-import' ) . prose_add_label( 'import-file', __( 'Import Prose Settings File', 'prose' ) ) . '<br /><input type="hidden" name="prose" value="import" /><input type="file" class="text_input" name="file" id="import-file" /><input class="button" type="submit" value="' . esc_attr__( 'Upload', 'prose' ) . '" /></form>' ); do_action('prose_settings_general'); }