Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function pix_replace_default_lang_switcher() {
- global $icl_language_switcher;
- remove_filter( 'wp_nav_menu_items', array($icl_language_switcher, 'wp_nav_menu_items_filter') );
- }
- add_action('init','pix_replace_default_lang_switcher');
- if ( !function_exists( 'pixgridder_col_extra_height' ) ) :
- /**
- * Increases height for PixGridder column on UI
- */
- add_filter('pixgridder_col_extra_height', 'pixgridder_col_extra_height', 1);
- function pixgridder_col_extra_height(){
- return '730';
- }
- endif;
- if ( !function_exists( 'pixgridder_builder_extra_fields' ) ) :
- /**
- * Add fields to PixGridder builder for rows
- * // It will add data-extra="value" to the row on the backend
- */
- add_filter('pixgridder_row_extra_fields_2', 'pixgridder_builder_extra_fields', 1);
- function pixgridder_builder_extra_fields(){ ?>
- <label><?php _e( 'Select a type', 'pixgridder' ); ?>:</label>
- <label class="for_select hidden">
- <span class="for_select">
- <select data-extra="true">
- <option value=""><?php _e('none', 'pixgridder'); ?></option>
- <option value="fullwidth"><?php _e('fullwidth', 'pixgridder'); ?></option>
- <option value="fullscreen"><?php _e('fullscreen', 'pixgridder'); ?></option>
- <option value="text-box"><?php _e('text-box', 'pixgridder'); ?></option>
- </select>
- </span>
- </label>
- <div class="clear"></div>
- <?php }
- endif;
- if ( !function_exists( 'pixgridder_cols_extra_fields2' ) ) :
- /**
- * Add fields to PixGridder builder for columns
- * // "data-style" value is turned into CSS property on the front end
- * // and the field value will be its value
- * // If "data-unit" is available, its value will be added to the field value
- */
- add_filter('pixg_col_extra_fields2', 'pixgridder_cols_extra_fields2', 1);
- function pixgridder_cols_extra_fields2(){ ?>
- <div class="clear"></div>
- <label><?php _e('Padding, in percentage (leave empty for the default value)','pixgridder'); ?>:</label>
- <div class="slider_div percent">
- <input data-style="padding" data-unit="%" type="text" value="">
- <div class="slider_cursor"></div>
- </div><!-- .slider_div -->
- <br>
- <div class="clear"></div>
- <label><?php _e('Padding top (if different from the general one)','pixgridder'); ?>:</label>
- <div class="slider_div grid">
- <input data-style="padding-top" data-unit="%!important" type="text" value="">
- <div class="slider_cursor"></div>
- </div><!-- .slider_div -->
- <br>
- <div class="clear"></div>
- <label><?php _e('Padding bottom (if different from the general one)','pixgridder'); ?>:</label>
- <div class="slider_div grid">
- <input data-style="padding-bottom" data-unit="%!important" type="text" value="">
- <div class="slider_cursor"></div>
- </div><!-- .slider_div -->
- <br>
- <?php }
- endif;
- if ( !function_exists( 'pixgridder_cols_extra_fields' ) ) :
- /**
- * Adds fields to PixGridder builder for columns
- * // "data-style" value is turned into CSS property on the front end
- * // and the field value will be its value
- * // If "data-unit" is available, its value will be added to the field value
- */
- add_filter('pixg_col_extra_fields', 'pixgridder_cols_extra_fields', 1);
- function pixgridder_cols_extra_fields(){ ?>
- <div class="clear"></div>
- <label><?php _e( 'Background color', 'pixgridder' ); ?>:</label>
- <div class="pix_color_picker">
- <input data-style="background-color" type="text" value="">
- <a class="pix_button" href="#"></a>
- <div class="colorpicker"></div>
- <i class="scicon-elusive-cancel"></i>
- </div>
- <div class="clear"></div>
- <label><?php _e('Padding right (if different from the general one)','pixgridder'); ?>:</label>
- <div class="slider_div grid">
- <input data-style="padding-right" data-unit="%!important" type="text" value="">
- <div class="slider_cursor"></div>
- </div><!-- .slider_div -->
- <br>
- <div class="clear"></div>
- <label><?php _e('Padding left (if different from the general one)','pixgridder'); ?>:</label>
- <div class="slider_div grid">
- <input data-style="padding-left" data-unit="%!important" type="text" value="">
- <div class="slider_cursor"></div>
- </div><!-- .slider_div -->
- <br>
- <?php }
- endif;
- if ( !function_exists( 'pixgridder_builder_col_classes' ) ) :
- /**
- * Adds some class to PixGridder columns
- */
- add_filter('pixgridder_colClassArr', 'pixgridder_builder_col_classes');
- function pixgridder_builder_col_classes(){
- return '["custom_class", "different_class", "again_a_class"]';
- }
- endif;
- if ( !function_exists( 'pixgridder_builder_row_classes' ) ) :
- /**
- * Adds some class to PixGridder rows
- */
- add_filter('pixgridder_rowClassArr', 'pixgridder_builder_row_classes');
- function pixgridder_builder_row_classes(){
- return '["custom_class", "different_class", "again_a_class"]';
- }
- endif;
- if ( !function_exists( 'pixgridder_builder_filter_colors' ) ) :
- /**
- * Adds presets colors to PixGridder rows
- */
- add_filter('pixgridder_featuredColors', 'pixgridder_builder_filter_colors');
- function pixgridder_builder_filter_colors(){
- return '[
- "#000000",
- "#ffffff",
- "#ff0000"
- ]';
- }
- endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement