works for my child theme only (double check 1000 and 1020).
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | function jma_dynamic_filter( $dynamic_styles ) { $jma_spec_options = jma_get_theme_values(); /* to delete a value */ $dynamic_styles[1000] = array('.btn, .btn-primary, .search, .tb-button, .comment-reply-link, #comments .comment-body .reply a, .btn:focus, .tb-button:focus, .comment-reply-link:focus, #comments .comment-body .reply a:focus, input[type="submit"], button[type="submit"], a.button', array('color', $jma_spec_options['button_font']), array('background-color', $jma_spec_options['button_back']), array('border-color', $jma_spec_options['button_font']), array('border','solid!important'), ); $dynamic_styles[1020] = array('.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .btn-primary:hover, .tb-button:hover, .comment-reply-link:hover, #comments .comment-body .reply a:hover, input[type="submit"]:hover, button.button:hover, a.button:hover, .is-checked', array('color', $jma_spec_options['button_font_hover']), array('background-color', $jma_spec_options['button_back_hover']), array('border-color', $jma_spec_options['button_font_hover']), ); return $dynamic_styles; } add_filter( 'dynamic_styles_filter', 'jma_dynamic_filter' ); |