File tree Expand file tree Collapse file tree 5 files changed +5
-71
lines changed Expand file tree Collapse file tree 5 files changed +5
-71
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66// https://timber.github.io/docs/reference/timber/#context
77$ context = Timber \Timber::context ();
88$ timber_post = new Timber \Post ();
9- $ context ['searchform ' ] = get_template_part ( 'template-parts/content ' , 'search ' );
109Timber \Timber::render ( '404.twig ' , $ context );
Original file line number Diff line number Diff line change @@ -15,14 +15,15 @@ function define_theme_globals() {
1515
1616/**
1717 * Given an array of attributes, return a string of key="value" pairs separated by spaces.
18- * Also handles escaping the attributes.
18+ * Also handles escaping the attributes. Can be helpful when creating a template with optional
19+ * parameters.
1920 *
2021 * Explaining the ('href' === $key) conditional:
2122 * - It's best practice to escape strings that will be echoed to the page, for security reasons.
2223 * - In order to correctly escape the $val string, we want to use esc_url or esc_attr respectively.
2324 *
2425 * @param array $atts - html attributes.
25- * @param array $exclude - attributes to exclude from the output string.
26+ * @param array $exclude - attributes to exclude from the output string. Defaults to `[]`.
2627 * @return string
2728 */
2829function get_attribute_string ( $ atts , $ exclude = array () ) {
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ function sparkpress_theme_setup() {
3434 */
3535 add_theme_support ( 'post-thumbnails ' );
3636
37- // This theme uses wp_nav_menu() in one location.
3837 register_nav_menus ( array ( 'primary ' => 'Primary ' ) );
3938
4039 /*
@@ -68,7 +67,8 @@ function sparkpress_theme_setup() {
6867function custom_hide_editor () {
6968 global $ pagenow ;
7069 $ hidden_pages = array (
71- 'example-page.php ' ,
70+ // specify page templates where main editor should be hidden
71+ // 'example-page-template.php',
7272 );
7373
7474 // Only on editor page.
You can’t perform that action at this time.
0 commit comments