Skip to content

Commit bec7669

Browse files
author
unknown
committed
adding Typing machine setting to Customizer
1 parent 4eba652 commit bec7669

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

inc/customizer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function acajou_customize_register( $wp_customize ) {
129129
$wp_customize,
130130
"typing_text",
131131
array(
132-
"label" => __("Enter typing lines", "acajou"),
132+
"label" => __("Type your text and use slash (/) for creating several sentences", "acajou"),
133133
"section" => "acajou_typing_section",
134134
"settings" => "typing_text",
135135
"type" => "textarea",

inc/extras.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,14 @@ function acajou_get_custom_logo() {
400400
*
401401
*/
402402
function acajou_typing_machine(){
403-
$text = "a minimalist woodstyle theme \n it looks like wood \n and tastes like soup.";
403+
$text = "a minimalist woodstyle theme/ it looks like wood/ and tastes like soup.";
404404
if(get_theme_mod( 'typing_text' ) && ""!=get_theme_mod( 'typing_text' )) {
405-
$lines = str_split()
405+
$text = get_theme_mod( 'typing_text' );
406+
}
407+
$lines = explode('/', $text);
408+
foreach($lines as $line){
409+
echo '<p>';
410+
echo $line;
411+
echo '</p>';
406412
}
407413
}
408-
p>a minimalist woodstyle theme</p>
409-
<p>it <em>looks</em> like wood</p>
410-
<p>and <em>tastes</em> like soup.</p>

0 commit comments

Comments
 (0)