芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/timucuy.com/wp-content/themes/hestia/inc/views/inline/class-hestia-buttons.php
buttons_padding_inline_style() ); wp_add_inline_style( apply_filters( 'hestia_custom_button_radius_handle', 'hestia_style' ), $this->buttons_radius_inline_style() ); } /** * Buttons padding inline style. * * @return string */ private function buttons_padding_inline_style() { $custom_css = ''; /** * Gather data from customizer. */ $hestia_button_padding_dimensions = get_theme_mod( 'hestia_button_padding_dimensions', apply_filters( 'hestia_button_padding_dimensions_default', json_encode( array( 'desktop' => json_encode( array( 'desktop_vertical' => 15, 'desktop_horizontal' => 33, ) ), ) ) ) ); /** * Transform data into arrays. */ $hestia_button_padding_dimensions_decode = json_decode( $hestia_button_padding_dimensions ); $desktop_dimensions = json_decode( $hestia_button_padding_dimensions_decode->desktop ); $dimensions = array( 'horizontal' => '', 'vertical' => '', ); if ( isset( $desktop_dimensions->desktop_horizontal ) ) { $dimensions['horizontal'] = $desktop_dimensions->desktop_horizontal; } if ( isset( $desktop_dimensions->desktop_vertical ) ) { $dimensions['vertical'] = $desktop_dimensions->desktop_vertical; } /** * Adding style. */ $selectors = implode( ', ', $this->padding_radius_hover_selectors ) . ', ' . implode( ', ', $this->padding_radius_selectors ); /** * Adding padding */ $custom_css .= $selectors . '{'; if ( ! empty( $dimensions['vertical'] ) ) { $custom_css .= ' padding-top:' . $dimensions['vertical'] . 'px; '; $custom_css .= ' padding-bottom:' . $dimensions['vertical'] . 'px; '; } if ( ! empty( $dimensions['horizontal'] ) ) { $custom_css .= ' padding-left:' . $dimensions['horizontal'] . 'px; '; $custom_css .= ' padding-right:' . $dimensions['horizontal'] . 'px; '; } $custom_css .= '}'; return $custom_css; } /** * Buttons border radius inline style. * * @return string */ private function buttons_radius_inline_style() { $custom_css = ''; /** * Gather data from customizer. */ $hestia_buttons_border_radius = get_theme_mod( 'hestia_buttons_border_radius', apply_filters( 'hestia_buttons_border_radius_default', 3 ) ); /** * Adding style. */ $selectors = implode( ', ', $this->padding_radius_hover_selectors ) . ', ' . implode( ', ', $this->radius_hover_selectors ) . ', ' . implode( ', ', $this->padding_radius_selectors ); /** * Adding border radius */ $custom_css .= $selectors . '{'; $custom_css .= 'border-radius:' . $hestia_buttons_border_radius . 'px;'; $custom_css .= '}'; return $custom_css; } }