/** * Your Inspiration Themes * * @package WordPress * @subpackage Your Inspiration Themes * @author Your Inspiration Themes Team <*****@*****.**> * * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-3.0.txt */ function yit_add_typography_buttons_tab($tabs) { $new_tab = array('buttons' => __('Buttons', 'yit')); yit_array_splice_assoc($tabs['typography'], $new_tab, 'footer'); return $tabs; }
function woocommerce_restore_shipping_fields_order($fields) { global $woocommerce; if (version_compare(preg_replace('/-beta-([0-9]+)/', '', $woocommerce->version), '2.1', '<')) { $fields['shipping_city']['class'][0] = 'form-row-last'; } $fields['shipping_country']['class'][0] = 'form-row-first'; $fields['shipping_address_1']['class'][0] = 'form-row-first'; $fields['shipping_address_2']['class'][0] = 'form-row-last'; /* FIX WOO 2.1.x */ if (version_compare(preg_replace('/-beta-([0-9]+)/', '', $woocommerce->version), '2.1', '>=')) { $fields['shipping_country']['class'][0] = 'form-row-wide'; $fields['shipping_postcode']['class'][0] = 'form-row-wide'; } $country = $fields['shipping_country']; unset($fields['shipping_country']); yit_array_splice_assoc($fields, array('shipping_country' => $country), 'shipping_postcode'); return $fields; }
/** * Your Inspiration Themes * * @package WordPress * @subpackage Your Inspiration Themes * @author Your Inspiration Themes Team <*****@*****.**> * * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.gnu.org/licenses/gpl-3.0.txt */ function yit_add_colors_buttons_tab($tabs) { $new_tab = array('buttons' => __('Buttons', 'yit')); yit_array_splice_assoc($tabs['colors'], $new_tab, 'footer'); return $tabs; }
function yit_register_theme_metaboxes($options) { if (isset($options["yit-page-settings"]['Header']['_static_image_target'])) { $header_settings = $options["yit-page-settings"]['Header']; $new_options = array('_enable_parallax_effect' => array('id' => '_enable_parallax_effect', 'title' => __('Enable Parallax Effect', 'yit'), 'type' => 'onoff', 'desc' => __('Enable Parallax Effect in the header image', 'yit'), 'name' => '_enable_parallax_effect', 'val' => '', 'std' => false), '_parallax_height' => array('id' => '_parallax_height', 'name' => '_parallax_height', 'desc' => '', 'title' => __('Container height', 'yit'), 'type' => 'number', 'std' => 300), '_parallax_content' => array('id' => '_parallax_content', 'name' => '_parallax_content', 'desc' => '', 'title' => __('Content', 'yit'), 'type' => 'textarea', 'std' => ''), '_parallax_valign' => array('id' => '_parallax_valign', 'name' => '_parallax_valign', 'desc' => '', 'title' => __('Vertical Align', 'yit'), 'type' => 'select', 'options' => array('top' => __('Top', 'yit'), 'center' => __('Center', 'yit'), 'bottom' => __('Bottom', 'yit')), 'std' => 'center'), '_parallax_halign' => array('id' => '_parallax_halign', 'name' => '_parallax_halign', 'desc' => '', 'title' => __('Horizontal Align', 'yit'), 'type' => 'select', 'options' => array('left' => __('Left', 'yit'), 'center' => __('Center', 'yit'), 'right' => __('Right', 'yit')), 'std' => 'center'), '_parallax_color' => array('id' => '_parallax_color', 'name' => '_parallax_color', 'desc' => '', 'title' => __('Content Text Color', 'yit'), 'type' => 'colorpicker', 'std' => '#ffffff'), '_parallax_hover_color' => array('id' => '_parallax_hover_color', 'name' => '_parallax_hover_color', 'desc' => '', 'title' => __('Links hover Color', 'yit'), 'type' => 'colorpicker', 'std' => '#000'), '_parallax_effect' => array('id' => '_parallax_effect', 'name' => '_parallax_effect', 'desc' => '', 'title' => __('Effect', 'yit'), 'type' => 'select', 'options' => array('fadeIn' => __('fadeIn', 'yit'), 'fadeInUp' => __('fadeInUp', 'yit'), 'fadeInDown' => __('fadeInDown', 'yit'), 'fadeInLeft' => __('fadeInLeft', 'yit'), 'fadeInRight' => __('fadeInRight', 'yit'), 'fadeInUpBig' => __('fadeInUpBig', 'yit'), 'fadeInDownBig' => __('fadeInDownBig', 'yit'), 'fadeInLeftBig' => __('fadeInLeftBig', 'yit'), 'fadeInRightBig' => __('fadeInRightBig', 'yit'), 'bounceIn' => __('bounceIn', 'yit'), 'bounceInDown' => __('bounceInDown', 'yit'), 'bounceInUp' => __('bounceInUp', 'yit'), 'bounceInLeft' => __('bounceInLeft', 'yit'), 'bounceInRight' => __('bounceInRight', 'yit'), 'rotateIn' => __('rotateIn', 'yit'), 'rotateInDownLeft' => __('rotateInDownLeft', 'yit'), 'rotateInDownRight' => __('rotateInDownRight', 'yit'), 'rotateInUpLeft' => __('rotateInUpLeft', 'yit'), 'rotateInUpRight' => __('rotateInUpRight', 'yit'), 'lightSpeedIn' => __('lightSpeedIn', 'yit'), 'hinge' => __('hinge', 'yit'), 'rollIn' => __('rollIn', 'yit')), 'std' => 'fadeIn'), '_parallax_button_size' => array('id' => '_parallax_button_size', 'name' => '_parallax_button_size', 'desc' => '', 'title' => __('Button Size', 'yit'), 'type' => 'select', 'options' => array('large' => __('Large', 'yit'), 'small' => __('Small', 'yit')), 'std' => 'small'), 'sep' => array('id' => 'sep', 'title' => '', 'type' => 'sep', 'desc' => '', 'name' => 'sep', 'val' => '', 'std' => '')); foreach ($new_options as $k => $option) { yit_array_splice_assoc($header_settings, array($k => $option), '_enable_custom_header'); } $options["yit-page-settings"]['Header'] = $header_settings; } return $options; }
function woocommerce_restore_shipping_fields_order( $fields ) { $fields['shipping_city']['class'][0] = 'form-row-last'; $fields['shipping_country']['class'][0] = 'form-row-first'; $fields['shipping_address_1']['class'][0] = 'form-row-first'; $fields['shipping_address_2']['class'][0] = 'form-row-last'; $country = $fields['shipping_country']; unset( $fields['shipping_country'] ); yit_array_splice_assoc( $fields, array( 'shipping_country' => $country ), 'shipping_state' ); return $fields; }