(Created page with "__NOTOC__ == Filter == <tt>pagelines_welcome_finally</tt> adds the flavor text at the end of the theme Welcome page. == Usage == <syntaxhighlight><?php add_filter( 'pagelines...") |
(→Examples) |
||
| Line 15: | Line 15: | ||
== Examples == | == Examples == | ||
| + | If you did not want to display this default text at the end of the theme Welcome page: | ||
| + | [[File:PageLines-Welcome-Finally-default-text.png|center]] | ||
| + | |||
| + | you can simply add this to your (Child-Theme) ''functions.php'' file: | ||
| + | <syntaxhighlight><?php add_filter( 'pagelines_welcome_finally', '__return_false' ); ?></syntaxhighlight> | ||
| + | |||
| + | Now, if you wanted to change the text to something that Bruce Willis might say you could do this instead: | ||
| + | |||
| + | <syntaxhighlight><?php | ||
| + | add_filter( 'pagelines_welcome_finally', 'my_pagelines_welcome_finally' ); | ||
| + | function my_pagelines_welcome_finally(){ | ||
| + | return sprintf( '<div class="finally"><h3>%s</h3></div>', __( "Yippee Ki-YaY!" ) ); | ||
| + | } | ||
| + | ?></syntaxhighlight> | ||
| + | |||
| + | Leaving your something like this: | ||
| + | [[File:Yippee-Ki-YaY.png|center]] | ||
== Source File == | == Source File == | ||
pagelines_welcome_finally adds the flavor text at the end of the theme Welcome page.
NB: my_pagelines_welcome_finally is just an example name, please use a more appropriately named function in your code.
If you did not want to display this default text at the end of the theme Welcome page:
you can simply add this to your (Child-Theme) functions.php file:
Now, if you wanted to change the text to something that Bruce Willis might say you could do this instead:
%s
}
?>Leaving your something like this:
pagelines_welcome_finally is defined in get_welcome() which is located in admin/class.welcome.php