Skip to content

Commit

Permalink
Merge pull request #47 from grueneschweiz/dev
Browse files Browse the repository at this point in the history
0.5.4
  • Loading branch information
cyrillbolliger authored Jun 25, 2019
2 parents e025066 + e745c56 commit 45d7ff3
Show file tree
Hide file tree
Showing 38 changed files with 872 additions and 894 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -580,18 +580,49 @@
},
"default_value": "",
"placeholder": "",
"maxlength": 280,
"rows": 2,
"maxlength": "",
"rows": "",
"new_lines": ""
},
{
"key": "field_5cf77bf9983f1",
"label": "Action Type",
"name": "type",
"type": "button_group",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"form": "Form",
"button": "Action Button",
"link": "Link Button"
},
"allow_null": 0,
"default_value": "form",
"layout": "horizontal",
"return_format": "value"
},
{
"key": "field_5b681f2590ad0",
"label": "Call to Action",
"label": "Call to Action (Form)",
"name": "form",
"type": "post_object",
"instructions": "Select the form containing your call to action.",
"instructions": "Displays directly the form with the call to action.",
"required": 0,
"conditional_logic": 0,
"conditional_logic": [
[
{
"field": "field_5cf77bf9983f1",
"operator": "==",
"value": "form"
}
]
],
"wrapper": {
"width": "",
"class": "",
Expand All @@ -601,10 +632,56 @@
"theme_form"
],
"taxonomy": "",
"allow_null": 0,
"allow_null": 1,
"multiple": 0,
"return_format": "id",
"ui": 1
},
{
"key": "field_5cf77c8b983f2",
"label": "Call to Action (Button)",
"name": "button",
"type": "link",
"instructions": "Displays the link to your action page as a magenta button.",
"required": 0,
"conditional_logic": [
[
{
"field": "field_5cf77bf9983f1",
"operator": "==",
"value": "button"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"return_format": "array"
},
{
"key": "field_5cf77d16983f3",
"label": "Call to Action (Link Button)",
"name": "link",
"type": "link",
"instructions": "Displays the link to further reading as link button (the green one with >).",
"required": 0,
"conditional_logic": [
[
{
"field": "field_5cf77bf9983f1",
"operator": "==",
"value": "link"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"return_format": "array"
}
]
}
Expand Down Expand Up @@ -633,5 +710,5 @@
"hide_on_screen": "",
"active": 0,
"description": "",
"modified": 1559051425
"modified": 1559732070
}
46 changes: 3 additions & 43 deletions wordpress/wp-content/themes/les-verts/functions.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

// Composer dependencies
use function SUPT\get_lang;

require_once __DIR__ . '/vendor/autoload.php';

// Constants
Expand Down Expand Up @@ -37,7 +39,7 @@
class StarterSite extends TimberSite {

function __construct() {
\Locale::setDefault( \SUPT\get_lang() );
Locale::setDefault( get_lang() );

// Theme supports
// -> more info: https://developer.wordpress.org/reference/functions/add_theme_support/
Expand Down Expand Up @@ -90,21 +92,6 @@ function add_to_context( $context ) {
// Widgets
$context['widgets']['footer'] = Timber::get_widgets( 'footer-widget-area' );

// Localized options
//$context['localized_options'] = get_fields( \SUPT\get_lang() );

// Options overrides
// if (
// isset( $context['localized_options'] )
// && isset( $context['localized_options']['gtm_override'] )
// && $context['localized_options']['gtm_override']
// ) {
// foreach ( [ 'gtm_enable', 'gtm_id' ] as $key ) {
// $val = isset( $context['localized_options'][ $key ] ) ? $context['localized_options'][ $key ] : null;
// $context['OPTIONS'][ $key ] = $val;
// }
// }

// Are we in debut mode?
$context['WP_DEBUG'] = WP_DEBUG;

Expand Down Expand Up @@ -144,38 +131,13 @@ function setup_assets() {
// dont load block styles
wp_dequeue_style( 'wp-block-library' );
wp_deregister_style( 'wp-block-library' );

// live reload of css for development
// if ( WP_DEBUG ) {
// // TODO find a way to load dynymically the BS file (cause the port number could be somthing else)
// if ( is_multisite() ) { // Removing trailing slash to attach browser-sync
// wp_enqueue_script( 'bs',
// substr( network_site_url(), 0, - 1 ) . ':4000/browser-sync/browser-sync-client.js', false, null,
// true );
// } else {
// wp_enqueue_script( 'bs', get_site_url() . ':4000/browser-sync/browser-sync-client.js', false, null,
// true );
// }
// }
}

// admin bar styles
if ( is_admin_bar_showing() ) {
wp_enqueue_style( 'adminbar-style', get_stylesheet_directory_uri() . '/style-adminbar.css', false,
THEME_VERSION );
}

// load scripts on specific pages
// if( is_page() ){
// global $wp_query;

// if( in_array( get_page_template_slug($wp_query->post->ID), array( 'page-contact.php' ) )) {
// $gmap_key = get_field( 'maps_api_key', 'option' );
// if ( !empty($gmap_key) ) {
// wp_enqueue_script( 'gmap', "https://maps.googleapis.com/maps/api/js?key=$gmap_key", null, null, true );
// }
// }
// }
}

function setup_admin_assets() {
Expand Down Expand Up @@ -216,6 +178,4 @@ function load_textdomain() {
/**
* GO!
*/


new StarterSite();
Binary file modified wordpress/wp-content/themes/les-verts/languages/de_DE.mo
Binary file not shown.
Loading

0 comments on commit 45d7ff3

Please sign in to comment.