Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions plugins/osi-features/acf-fields/group_62d0160caa7af.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,41 +42,41 @@
"first_day": 1
},
{
"key": "field_6783hdda5y544gf",
"label": "Submission URL",
"name": "submission_url",
"aria-label": "",
"type": "url",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": ""
"key": "field_6783hdda5y544gf",
"label": "Submission URL",
"name": "submission_url",
"aria-label": "",
"type": "url",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": ""
},
{
"key": "field_62fcda3b00451",
"label": "Submitter",
"name": "submitter",
"aria-label": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
"key": "field_62fcda3b00451",
"label": "Submitter",
"name": "submitter",
"aria-label": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_62fcd90c2f885",
Expand Down Expand Up @@ -224,6 +224,6 @@
"hide_on_screen": "",
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1686668177
"show_in_rest": 1,
"modified": 1749470357
}
62 changes: 62 additions & 0 deletions plugins/osi-features/acf-fields/group_ai_toggles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"key": "group_ai_page_toggles",
"title": "AI Page Features",
"fields": [{
"key": "field_use_ai_header",
"label": "Use AI Header",
"name": "use_ai_header",
"aria-label": "",
"type": "true_false",
"instructions": "Enable AI-generated header for this page",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"message": "",
"default_value": 0,
"ui": 1,
"ui_on_text": "Enabled",
"ui_off_text": "Disabled"
},
{
"key": "field_use_ai_footer",
"label": "Use AI Footer",
"name": "use_ai_footer",
"aria-label": "",
"type": "true_false",
"instructions": "Enable AI-generated footer for this page",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"message": "",
"default_value": 0,
"ui": 1,
"ui_on_text": "Enabled",
"ui_off_text": "Disabled"
}
],
"location": [
[{
"param": "post_type",
"operator": "==",
"value": "page"
}]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": true,
"description": "Toggle settings for AI-generated header and footer on pages",
"show_in_rest": 0,
"modified": 1701234567
}
46 changes: 46 additions & 0 deletions themes/osi/assets/css/editor-style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/osi/assets/css/editor-style.css.map

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions themes/osi/assets/scss/_8_overrides.templates.scss
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,55 @@ footer.ai-footer {
.ai-def-header .wp-block-coblocks-hero__inner {
height: 850px;
}
// Secondary Nav
.ai-secondary-navbar-wrapper {
background-color: #fff;
border-bottom: 1px solid #ddd;
padding: 10px 0;
position: sticky;
top: 90px; // adjust as needed
z-index: 999;
}
.ai-secondary-nav-menu {
display: flex;
justify-content: center;
gap: 40px;
list-style: none;
margin: 0;
padding: 0;
padding-top: 10px;
font-size: 10px;
li {
display: inline-block;
}
}
// Hide mobile label by default (desktop)
.ai-mobile-label {
display: none;
}
// Mobile-specific styles (not using "force override" block)
@media (max-width: 768px) {
.ai-secondary-mobile-wrapper {
margin-top: 10px;
padding-top: 0;
}
.ai-mobile-label {
display: block;
color: #bbb;
font-size: 13px;
text-transform: uppercase;
padding: 8px 20px 4px;
margin: 0;
letter-spacing: 0.5px;
text-align: right;
}
.ai-secondary-mobile-menu {
margin-top: 0;
li {
padding: 10px 20px;
}
}
}
.jetpack-social-navigation {
height: 40px;
margin: 0;
Expand Down
3 changes: 2 additions & 1 deletion themes/osi/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ function osi_handle_supporter_form_flamingo_spam_status_change( string $new_stat
*/
function osi_register_ai_menu() {
register_nav_menu( 'ai', __( 'AI Menu', 'osi' ) );
register_nav_menu( 'ai_secondary_nav', __( 'AI Secondary Navigation', 'osi' ) );
}
add_action( 'after_setup_theme', 'osi_register_ai_menu' );

Expand Down Expand Up @@ -620,7 +621,7 @@ function osi_ssp_register_post_type_args( array $args ): array {
*
* @return boolean The result.
*/
function osi_block_booking_if_phone_filled( $result, $em_booking ) {
function osi_block_booking_if_phone_filled( bool $result, EM_Booking $em_booking ) {
if ( ! empty( $em_booking->event ) ) {
if ( isset( $_POST['phone_hp'] ) && trim( $_POST['phone_hp'] ) !== '' ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
$em_booking->add_error( 'There was a problem with your booking. Please do not include a phone number.' );
Expand Down
18 changes: 10 additions & 8 deletions themes/osi/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@
endif;
//Adding for AI template - secondary navigation
if ( is_page_template( 'templates/ai-wide.php' ) ) :
echo '<p class="ai-mobile-label">Open Source AI</p>';
wp_nav_menu( array(
'theme_location' => 'ai_secondary_nav',
'menu' => 'AI secondary nav',
'container' => false,
'container_class'=> 'ai-secondary-nav',
'menu_class' => 'ai-secondary-nav-menu',
) );
echo '<p class="ai-mobile-label">' . esc_html__( 'Open Source AI', 'osi' ) . '</p>';
wp_nav_menu(
array(
'theme_location' => 'ai_secondary_nav',
'menu' => 'AI secondary nav',
'container' => false,
'container_class' => 'ai-secondary-nav',
'menu_class' => 'ai-secondary-nav-menu',
)
);
endif;
?>
</nav><!-- #site-navigation -->
Expand Down
46 changes: 46 additions & 0 deletions themes/osi/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/osi/style.css.map

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions themes/osi/templates/ai-wide.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@
get_header( 'ai' );
else :
get_header();
// Display the AI secondary nav menu
echo '<div class="ai-secondary-navbar-wrapper">';
wp_nav_menu( array(
'theme_location' => 'ai_secondary_nav',
'menu' => 'AI secondary nav',
'container' => 'nav',
'container_class'=> 'ai-secondary-nav',
'menu_class' => 'ai-secondary-nav-menu',
) );
echo '</div>';
endif;
?>

Expand Down