Skip to content

Commit 802424e

Browse files
authored
Merge pull request #198 from OpenSourceOrg/feature/gh169-add-ai-wide-template__DEV
Move all prod changes over to staging
2 parents 9fe391b + eaaa4c9 commit 802424e

File tree

4 files changed

+502
-314
lines changed

4 files changed

+502
-314
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"key": "group_68381f7bdc12b",
3+
"title": "AI Template Toggle",
4+
"fields": [{
5+
"key": "field_68381f7c701f6",
6+
"label": "Use AI Header",
7+
"name": "osi_use_ai_header",
8+
"aria-label": "",
9+
"type": "true_false",
10+
"instructions": "",
11+
"required": 0,
12+
"conditional_logic": 0,
13+
"wrapper": {
14+
"width": "",
15+
"class": "",
16+
"id": ""
17+
},
18+
"relevanssi_exclude": 0,
19+
"message": "This will use any menu named 'ai' for the menu when active",
20+
"default_value": 0,
21+
"allow_in_bindings": 0,
22+
"ui": 0,
23+
"ui_on_text": "",
24+
"ui_off_text": ""
25+
},
26+
{
27+
"key": "field_68381fc3701f8",
28+
"label": "Use AI Footer",
29+
"name": "osi_use_ai_footer",
30+
"aria-label": "",
31+
"type": "true_false",
32+
"instructions": "",
33+
"required": 0,
34+
"conditional_logic": 0,
35+
"wrapper": {
36+
"width": "",
37+
"class": "",
38+
"id": ""
39+
},
40+
"relevanssi_exclude": 0,
41+
"message": "When selected this will use the ai footer, you can edit the footer in reusable blocks.",
42+
"default_value": 0,
43+
"allow_in_bindings": 0,
44+
"ui": 0,
45+
"ui_on_text": "",
46+
"ui_off_text": ""
47+
}
48+
],
49+
"location": [
50+
[{
51+
"param": "post_type",
52+
"operator": "==",
53+
"value": "page"
54+
},
55+
{
56+
"param": "post_template",
57+
"operator": "==",
58+
"value": "templates\/ai-wide.php"
59+
}
60+
]
61+
],
62+
"menu_order": 0,
63+
"position": "normal",
64+
"style": "default",
65+
"label_placement": "top",
66+
"instruction_placement": "label",
67+
"hide_on_screen": "",
68+
"active": true,
69+
"description": "",
70+
"show_in_rest": 0,
71+
"modified": 1748508671
72+
}

themes/osi/footer-ai.php

Lines changed: 20 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -8,173 +8,31 @@
88
* @package osi
99
*/
1010

11-
// Get the footer icon
12-
$image_url = get_template_directory_uri() . '/assets/img/osi-horizontal-white.svg';
13-
14-
// Compile the block markup for the footer
15-
$footer_block = <<<HTML
16-
<!-- wp:group {"className":"os-awesome-feedbacak ai-pre-footer","style":{"elements":{"link":{"color":{"text":"var:preset|color|brand-color-1"}}}},"backgroundColor":"neutral-dark","textColor":"neutral-white","layout":{"type":"constrained","contentSize":"100%"},"noBottomMargin":true,"padding":"no"} -->
17-
<div class="wp-block-group os-awesome-feedbacak ai-pre-footer has-neutral-white-color has-text-color has-background has-link-color mb-0"><!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"},"padding":"no"} -->
18-
<div class="wp-block-group"><!-- wp:columns {"className":"ai-footer-top wide","style":{"layout":{"selfStretch":"fill","flexSize":null},"spacing":{"margin":{"top":"32px","bottom":"32px"}}}} -->
19-
<div class="wp-block-columns ai-footer-top wide" style="margin-top:32px;margin-bottom:32px"><!-- wp:column -->
20-
<div class="wp-block-column"><!-- wp:image {"id":25020,"width":"270px","sizeSlug":"large","linkDestination":"none","align":"center"} -->
21-
<figure class="wp-block-image aligncenter size-large is-resized"><img src="$image_url" alt="" class="wp-image-25020" style="width:270px"/></figure>
22-
<!-- /wp:image --></div>
23-
<!-- /wp:column -->
24-
25-
<!-- wp:column -->
26-
<div class="wp-block-column"><!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
27-
<div class="wp-block-buttons"><!-- wp:button {"textColor":"neutral-white","className":"is-style-spin-green","style":{"elements":{"link":{"color":{"text":"var:preset|color|neutral-white"}}}}} -->
28-
<div class="wp-block-button is-style-spin-green"><a class="wp-block-button__link has-neutral-white-color has-text-color has-link-color wp-element-button">Join us</a></div>
29-
<!-- /wp:button --></div>
30-
<!-- /wp:buttons --></div>
31-
<!-- /wp:column -->
32-
33-
<!-- wp:column -->
34-
<div class="wp-block-column"><!-- wp:shortcode -->
35-
[jetpack-social]
36-
<!-- /wp:shortcode --></div>
37-
<!-- /wp:column --></div>
38-
<!-- /wp:columns -->
39-
40-
<!-- wp:columns {"className":"ai-footer-bottom wide"} -->
41-
<div class="wp-block-columns ai-footer-bottom wide"><!-- wp:column {"width":"30%"} -->
42-
<div class="wp-block-column" style="flex-basis:30%"><!-- wp:heading {"level":5} -->
43-
<h5 class="wp-block-heading">The Open Source Initiative</h5>
44-
<!-- /wp:heading -->
45-
46-
<!-- wp:paragraph -->
47-
<p>The OSI is the authority that defines Open Source, recognized globally by individuals, companies, and by public institutions.</p>
48-
<!-- /wp:paragraph -->
49-
50-
<!-- wp:shortcode -->
51-
[jetpack-social]
52-
<!-- /wp:shortcode --></div>
53-
<!-- /wp:column -->
54-
55-
<!-- wp:column {"width":"20%"} -->
56-
<div class="wp-block-column" style="flex-basis:20%"><!-- wp:heading {"level":5} -->
57-
<h5 class="wp-block-heading">About</h5>
58-
<!-- /wp:heading -->
59-
60-
<!-- wp:list -->
61-
<ul class="wp-block-list"><!-- wp:list-item -->
62-
<li><a href="https://opensource.org/about"><span class="dashicons dashicons-arrow-right-alt2"></span>About Us</a></li>
63-
<!-- /wp:list-item -->
64-
65-
<!-- wp:list-item -->
66-
<li><a href="https://opensource.org/about/team"><span class="dashicons dashicons-arrow-right-alt2"></span>Our team</a></li>
67-
<!-- /wp:list-item -->
68-
69-
<!-- wp:list-item -->
70-
<li><a href="https://opensource.org/associations"><span class="dashicons dashicons-arrow-right-alt2"></span>Associations</a></li>
71-
<!-- /wp:list-item -->
72-
73-
<!-- wp:list-item -->
74-
<li><a href="https://opensource.org/sponsors"><span class="dashicons dashicons-arrow-right-alt2"></span>Sponsors</a></li>
75-
<!-- /wp:list-item -->
76-
77-
<!-- wp:list-item -->
78-
<li><a href="https://opensource.org/articles-of-incorporation"><span class="dashicons dashicons-arrow-right-alt2"></span>Articles of Incorporation</a></li>
79-
<!-- /wp:list-item -->
80-
81-
<!-- wp:list-item -->
82-
<li><a href="https://opensource.org/bylaws"><span class="dashicons dashicons-arrow-right-alt2"></span>Bylaws</a></li>
83-
<!-- /wp:list-item -->
84-
85-
<!-- wp:list-item -->
86-
<li><a href="https://opensource.org/history"><span class="dashicons dashicons-arrow-right-alt2"></span>History</a></li>
87-
<!-- /wp:list-item -->
88-
89-
<!-- wp:list-item -->
90-
<li><a href="https://opensource.org/trademark-guidelines"><span class="dashicons dashicons-arrow-right-alt2"></span>Trademark Guidelines</a></li>
91-
<!-- /wp:list-item --></ul>
92-
<!-- /wp:list --></div>
93-
<!-- /wp:column -->
94-
95-
<!-- wp:column {"width":"20%"} -->
96-
<div class="wp-block-column" style="flex-basis:20%"><!-- wp:heading {"level":5} -->
97-
<h5 class="wp-block-heading">Licenses</h5>
98-
<!-- /wp:heading -->
99-
100-
<!-- wp:list -->
101-
<ul class="wp-block-list"><!-- wp:list-item -->
102-
<li><a href="https://opensource.org/osd"><span class="dashicons dashicons-arrow-right-alt2"></span>Open Source Definition</a></li>
103-
<!-- /wp:list-item -->
104-
105-
<!-- wp:list-item -->
106-
<li><a href="https://opensource.org/licenses"><span class="dashicons dashicons-arrow-right-alt2"></span>Licenses</a></li>
107-
<!-- /wp:list-item -->
108-
109-
<!-- wp:list-item -->
110-
<li><a href="https://opensource.org/licenses/review-process"><span class="dashicons dashicons-arrow-right-alt2"></span>License Review Process</a></li>
111-
<!-- /wp:list-item -->
112-
113-
<!-- wp:list-item -->
114-
<li><a href="https://opensource.org/osr"><span class="dashicons dashicons-arrow-right-alt2"></span>Open Standards Requirement for Software</a></li>
115-
<!-- /wp:list-item --></ul>
116-
<!-- /wp:list --></div>
117-
<!-- /wp:column -->
118-
119-
<!-- wp:column {"width":"20%"} -->
120-
<div class="wp-block-column" style="flex-basis:20%"><!-- wp:heading {"level":5} -->
121-
<h5 class="wp-block-heading">Board</h5>
122-
<!-- /wp:heading -->
123-
124-
<!-- wp:list -->
125-
<ul class="wp-block-list"><!-- wp:list-item -->
126-
<li><a href="https://opensource.org/about/board-of-directors"><span class="dashicons dashicons-arrow-right-alt2"></span>Board of Directors</a></li>
127-
<!-- /wp:list-item -->
128-
129-
<!-- wp:list-item -->
130-
<li><a href="https://opensource.org/minutes"><span class="dashicons dashicons-arrow-right-alt2"></span>Minutes</a></li>
131-
<!-- /wp:list-item -->
132-
133-
<!-- wp:list-item -->
134-
<li><a href="https://opensource.org/about/board-of-directors/elections"><span class="dashicons dashicons-arrow-right-alt2"></span>Elections</a></li>
135-
<!-- /wp:list-item -->
136-
137-
<!-- wp:list-item -->
138-
<li><a href="https://opensource.org/organization"><span class="dashicons dashicons-arrow-right-alt2"></span>Organization &amp; Operations</a></li>
139-
<!-- /wp:list-item -->
140-
141-
<!-- wp:list-item -->
142-
<li><a href="https://opensource.org/conflict_of_interest_policy"><span class="dashicons dashicons-arrow-right-alt2"></span>Conflict of Interest Policy</a></li>
143-
<!-- /wp:list-item -->
144-
145-
<!-- wp:list-item -->
146-
<li><a href="https://opensource.org/board/board-member-agreement"><span class="dashicons dashicons-arrow-right-alt2"></span>Board member agreement</a></li>
147-
<!-- /wp:list-item --></ul>
148-
<!-- /wp:list --></div>
149-
<!-- /wp:column --></div>
150-
<!-- /wp:columns --></div>
151-
<!-- /wp:group --></div>
152-
<!-- /wp:group -->
153-
HTML;
11+
$footer_block_id = osi_create_or_find_ai_footer_block_content();
15412
?>
15513

156-
<footer id="colophon" class="footer site-footer ai-footer" role="contentinfo">
157-
<?php echo do_shortcode( do_blocks( $footer_block ) ); ?>
158-
<section class="footer-credits">
159-
<div class="footer--inner">
160-
<div class="widgetized-footer footer--widgets wp-block-columns alignwide">
161-
<?php dynamic_sidebar( 'sidebar-footer-secondary' ); ?>
162-
<div class="wp-block-column">
163-
<p class="footer--extra-text">
164-
<?php
165-
if ( is_active_sidebar( 'footer-above-credits' ) ) {
166-
dynamic_sidebar( 'footer-above-credits' );
167-
}
168-
?>
169-
<?php do_action( 'osi_credits' ); ?>
170-
</p><!-- .powered-by-wordpress -->
171-
</div>
14+
<footer id="colophon" class="footer site-footer ai-footer" role="contentinfo">
15+
<?php echo do_shortcode( do_blocks( '<!-- wp:block {"ref":' . absint( $footer_block_id ) . '} /-->' ) ); ?>
16+
<section class="footer-credits">
17+
<div class="footer--inner">
18+
<div class="widgetized-footer footer--widgets wp-block-columns alignwide">
19+
<?php dynamic_sidebar( 'sidebar-footer-secondary' ); ?>
20+
<div class="wp-block-column">
21+
<p class="footer--extra-text">
22+
<?php
23+
if ( is_active_sidebar( 'footer-above-credits' ) ) {
24+
dynamic_sidebar( 'footer-above-credits' );
25+
}
26+
?>
27+
<?php do_action( 'osi_credits' ); ?>
28+
</p><!-- .powered-by-wordpress -->
17229
</div>
17330
</div>
174-
</section>
175-
</footer><!-- #colophon -->
31+
</div>
32+
</section>
33+
</footer><!-- #colophon -->
17634

177-
</div><!-- #page -->
35+
</div><!-- #page -->
17836

17937
<?php wp_footer(); ?>
18038

0 commit comments

Comments
 (0)