Skip to content

Commit

Permalink
Moves colors and animations to Display Options instead of Other Options
Browse files Browse the repository at this point in the history
  • Loading branch information
coreymcollins committed Jan 24, 2019
1 parent 196b2be commit 733fde7
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 128 deletions.
123 changes: 1 addition & 122 deletions acf-json/group_594168e970d85.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,127 +33,6 @@
},
"layout": "block",
"sub_fields": [
{
"key": "field_5bb798ea8c57e",
"label": "Font Color",
"name": "font_color",
"type": "clone",
"instructions": "Change the text color of this block.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "50",
"class": "",
"id": ""
},
"clone": [
"group_5bb7934b61627"
],
"display": "group",
"layout": "block",
"prefix_label": 0,
"prefix_name": 0
},
{
"key": "field_5ab3e4c7ab636",
"label": "Animation",
"name": "animation",
"type": "select",
"instructions": "Select the animation for this block.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "50",
"class": "",
"id": ""
},
"choices": {
"null": "None",
"bounce": "bounce",
"flash": "flash",
"pulse": "pulse",
"rubberBand": "rubberBand",
"shake": "shake",
"headShake": "headShake",
"swing": "swing",
"tada": "tada",
"wobble": "wobble",
"jello": "jello",
"bounceIn": "bounceIn",
"bounceInDown": "bounceInDown",
"bounceInLeft": "bounceInLeft",
"bounceInRight": "bounceInRight",
"bounceInUp": "bounceInUp",
"bounceOut": "bounceOut",
"bounceOutDown": "bounceOutDown",
"bounceOutLeft": "bounceOutLeft",
"bounceOutRight": "bounceOutRight",
"bounceOutUp": "bounceOutUp",
"fadeIn": "fadeIn",
"fadeInDown": "fadeInDown",
"fadeInDownBig": "fadeInDownBig",
"fadeInLeft": "fadeInLeft",
"fadeInLeftBig": "fadeInLeftBig",
"fadeInRight": "fadeInRight",
"fadeInRightBig": "fadeInRightBig",
"fadeInUp": "fadeInUp",
"fadeInUpBig": "fadeInUpBig",
"fadeOut": "fadeOut",
"fadeOutDown": "fadeOutDown",
"fadeOutDownBig": "fadeOutDownBig",
"fadeOutLeft": "fadeOutLeft",
"fadeOutLeftBig": "fadeOutLeftBig",
"fadeOutRight": "fadeOutRight",
"fadeOutRightBig": "fadeOutRightBig",
"fadeOutUp": "fadeOutUp",
"fadeOutUpBig": "fadeOutUpBig",
"flipInX": "flipInX",
"flipInY": "flipInY",
"flipOutX": "flipOutX",
"flipOutY": "flipOutY",
"lightSpeedIn": "lightSpeedIn",
"lightSpeedOut": "lightSpeedOut",
"rotateIn": "rotateIn",
"rotateInDownLeft": "rotateInDownLeft",
"rotateInDownRight": "rotateInDownRight",
"rotateInUpLeft": "rotateInUpLeft",
"rotateInUpRight": "rotateInUpRight",
"rotateOut": "rotateOut",
"rotateOutDownLeft": "rotateOutDownLeft",
"rotateOutDownRight": "rotateOutDownRight",
"rotateOutUpLeft": "rotateOutUpLeft",
"rotateOutUpRight": "rotateOutUpRight",
"hinge": "hinge",
"jackInTheBox": "jackInTheBox",
"rollIn": "rollIn",
"rollOut": "rollOut",
"zoomIn": "zoomIn",
"zoomInDown": "zoomInDown",
"zoomInLeft": "zoomInLeft",
"zoomInRight": "zoomInRight",
"zoomInUp": "zoomInUp",
"zoomOut": "zoomOut",
"zoomOutDown": "zoomOutDown",
"zoomOutLeft": "zoomOutLeft",
"zoomOutRight": "zoomOutRight",
"zoomOutUp": "zoomOutUp",
"slideInDown": "slideInDown",
"slideInLeft": "slideInLeft",
"slideInRight": "slideInRight",
"slideInUp": "slideInUp",
"slideOutDown": "slideOutDown",
"slideOutLeft": "slideOutLeft",
"slideOutRight": "slideOutRight",
"slideOutUp": "slideOutUp"
},
"default_value": [],
"allow_null": 0,
"multiple": 0,
"ui": 0,
"ajax": 0,
"return_format": "value",
"placeholder": ""
},
{
"key": "field_5ba51914757eb",
"label": "Custom ID",
Expand Down Expand Up @@ -246,5 +125,5 @@
"hide_on_screen": "",
"active": 0,
"description": "",
"modified": 1544820844
"modified": 1548349847
}
123 changes: 122 additions & 1 deletion acf-json/group_5c1418a5dcaec.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,127 @@
"layout": "horizontal",
"return_format": "value",
"save_other_choice": 0
},
{
"key": "field_5c49f13b705f3",
"label": "Font Color",
"name": "font_color",
"type": "clone",
"instructions": "Change the text color of this block.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "50",
"class": "",
"id": ""
},
"clone": [
"group_5bb7934b61627"
],
"display": "group",
"layout": "block",
"prefix_label": 0,
"prefix_name": 0
},
{
"key": "field_5c49f169705f4",
"label": "Animation",
"name": "animation",
"type": "select",
"instructions": "Select the animation for this block.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "50",
"class": "",
"id": ""
},
"choices": {
"null": "None",
"bounce": "bounce",
"flash": "flash",
"pulse": "pulse",
"rubberBand": "rubberBand",
"shake": "shake",
"headShake": "headShake",
"swing": "swing",
"tada": "tada",
"wobble": "wobble",
"jello": "jello",
"bounceIn": "bounceIn",
"bounceInDown": "bounceInDown",
"bounceInLeft": "bounceInLeft",
"bounceInRight": "bounceInRight",
"bounceInUp": "bounceInUp",
"bounceOut": "bounceOut",
"bounceOutDown": "bounceOutDown",
"bounceOutLeft": "bounceOutLeft",
"bounceOutRight": "bounceOutRight",
"bounceOutUp": "bounceOutUp",
"fadeIn": "fadeIn",
"fadeInDown": "fadeInDown",
"fadeInDownBig": "fadeInDownBig",
"fadeInLeft": "fadeInLeft",
"fadeInLeftBig": "fadeInLeftBig",
"fadeInRight": "fadeInRight",
"fadeInRightBig": "fadeInRightBig",
"fadeInUp": "fadeInUp",
"fadeInUpBig": "fadeInUpBig",
"fadeOut": "fadeOut",
"fadeOutDown": "fadeOutDown",
"fadeOutDownBig": "fadeOutDownBig",
"fadeOutLeft": "fadeOutLeft",
"fadeOutLeftBig": "fadeOutLeftBig",
"fadeOutRight": "fadeOutRight",
"fadeOutRightBig": "fadeOutRightBig",
"fadeOutUp": "fadeOutUp",
"fadeOutUpBig": "fadeOutUpBig",
"flipInX": "flipInX",
"flipInY": "flipInY",
"flipOutX": "flipOutX",
"flipOutY": "flipOutY",
"lightSpeedIn": "lightSpeedIn",
"lightSpeedOut": "lightSpeedOut",
"rotateIn": "rotateIn",
"rotateInDownLeft": "rotateInDownLeft",
"rotateInDownRight": "rotateInDownRight",
"rotateInUpLeft": "rotateInUpLeft",
"rotateInUpRight": "rotateInUpRight",
"rotateOut": "rotateOut",
"rotateOutDownLeft": "rotateOutDownLeft",
"rotateOutDownRight": "rotateOutDownRight",
"rotateOutUpLeft": "rotateOutUpLeft",
"rotateOutUpRight": "rotateOutUpRight",
"hinge": "hinge",
"jackInTheBox": "jackInTheBox",
"rollIn": "rollIn",
"rollOut": "rollOut",
"zoomIn": "zoomIn",
"zoomInDown": "zoomInDown",
"zoomInLeft": "zoomInLeft",
"zoomInRight": "zoomInRight",
"zoomInUp": "zoomInUp",
"zoomOut": "zoomOut",
"zoomOutDown": "zoomOutDown",
"zoomOutLeft": "zoomOutLeft",
"zoomOutRight": "zoomOutRight",
"zoomOutUp": "zoomOutUp",
"slideInDown": "slideInDown",
"slideInLeft": "slideInLeft",
"slideInRight": "slideInRight",
"slideInUp": "slideInUp",
"slideOutDown": "slideOutDown",
"slideOutLeft": "slideOutLeft",
"slideOutRight": "slideOutRight",
"slideOutUp": "slideOutUp"
},
"default_value": [],
"allow_null": 0,
"multiple": 0,
"ui": 0,
"return_format": "value",
"ajax": 0,
"placeholder": ""
}
]
}
Expand All @@ -77,5 +198,5 @@
"hide_on_screen": "",
"active": 0,
"description": "",
"modified": 1544821600
"modified": 1548349823
}
10 changes: 5 additions & 5 deletions inc/acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function _s_display_block_options( $args = array() ) {
'container' => 'section',
'class' => 'content-block',
'custom_css_class' => $other_options['custom_css_class'],
'font_color' => $other_options['font_color'],
'font_color' => $display_options['font_color'],
'id' => $default_id,
);

Expand Down Expand Up @@ -167,19 +167,19 @@ function _s_display_block_options( $args = array() ) {
function _s_get_animation_class() {

// Get block other options for our animation data.
$other_options = get_sub_field( 'other_options' );
$display_options = get_sub_field( 'display_options' );

// Get out of here if we don't have other options.
if ( ! $other_options ) {
if ( ! $display_options ) {
return '';
}

// Set up our animation class for the wrapping element.
$classes = 'not-animated';

// If we have an animation set...
if ( $other_options['animation'] ) {
$classes = ' animated ' . $other_options['animation'];
if ( $display_options['animation'] ) {
$classes = 'animated ' . $display_options['animation'];
}

return $classes;
Expand Down

0 comments on commit 733fde7

Please sign in to comment.