e; } } } } } return array_unique( $classes ); } add_filter( 'vc_edit_form_class', 'bf_vc_edit_form_classes', 8, 3 ); } if ( ! function_exists( 'bf_vc_layout_state' ) ) { /** * Returns VC Columns state * * @return array */ function bf_vc_layout_state() { global $_bf_override_vc_layout_state, $_bf_vc_column_atts, $_bf_vc_column_inner_atts, $_bf_vc_row_columns; if ( ! empty( $_bf_override_vc_layout_state ) ) { return $_bf_override_vc_layout_state; # Allow to override state value } $_bf_vc_column_atts = array_filter( (array) $_bf_vc_column_atts ); $_bf_vc_column_atts = bf_merge_args( $_bf_vc_column_atts, array( 'width' => '1', 'list' => $_bf_vc_row_columns, 'list_count' => $_bf_vc_row_columns ? bf_count( $_bf_vc_row_columns ) : 0, ) ); $_bf_vc_column_inner_atts = array_filter( (array) $_bf_vc_column_inner_atts ); $_bf_vc_column_inner_atts = bf_merge_args( $_bf_vc_column_inner_atts, array( 'width' => '1' ) ); return array( 'column' => $_bf_vc_column_atts, 'row' => $_bf_vc_column_inner_atts, ); } } add_filter( 'vc_shortcode_set_template_vc_column', 'bf_vc_column_filter' ); if ( ! function_exists( 'bf_vc_column_filter' ) ) { /** * Callback: Handy filter to calculate columns state * Filter: vc_shortcode_set_template_vc_column * * @param $file * * @return string */ function bf_vc_column_filter( $file ) { global $_vc_column_template_file; $_vc_column_template_file = $file; return BF_PATH . 'page-builder/compatibility/vc/vc_column.php'; } } add_filter( 'vc_shortcode_set_template_vc_column_inner', 'bf_vc_column_inner_filter' ); if ( ! function_exists( 'bf_vc_column_inner_filter' ) ) { /** * Callback: Handy filter to calculate columns state * Filter: vc_shortcode_set_template_vc_column_inner * * @param $file * * @return string */ function bf_vc_column_inner_filter( $file ) { global $_vc_column_inner_template_file; $_vc_column_inner_template_file = $file; return BF_PATH . 'page-builder/compatibility/vc/vc_column_inner.php'; } } add_filter( 'better-framework/shortcodes/design-fields', 'bf_shortcpdes_design_fields', 10, 2 ); if ( ! function_exists( 'bf_shortcpdes_design_fields' ) ) { /** * Generates general design options for shortcodes * * @param array $fields * @param string $shortcode_id * * @return array */ function bf_shortcpdes_design_fields( $fields = array(), $shortcode_id = '' ) { $fields['design_tab'] = array( 'type' => 'tab', 'name' => __( 'Design Options', 'publisher' ), 'id' => 'design_tab', ); $fields['bs-show-desktop'] = array( "type" => 'switchery', "name" => __( 'Show on Desktop', 'publisher' ), "id" => 'bs-show-desktop', 'section_class' => 'style-floated-left bordered bf-css-edit-switch', // "vc_admin_label" => false, ); $fields['bs-show-tablet'] = array( "type" => 'switchery', "name" => __( 'Show on Tablet Portrait', 'publisher' ), "id" => 'bs-show-tablet', 'section_class' => 'style-floated-left bordered bf-css-edit-switch', 'group' => __( 'Design options', 'publisher' ), // "vc_admin_label" => false, ); $fields['bs-show-phone'] = array( "type" => 'switchery', "name" => __( 'Show on Phone', 'publisher' ), "id" => 'bs-show-phone', 'section_class' => 'style-floated-left bordered bf-css-edit-switch', // "vc_admin_label" => false, ); $fields['css'] = array( 'type' => 'css_editor', 'name' => __( 'CSS box', 'publisher' ), 'id' => 'css', "vc_admin_label" => false, ); $fields['custom-css-class'] = array( 'type' => 'text', 'name' => __( 'Custom CSS Class', 'publisher' ), 'id' => 'custom-css-class', 'section_class' => 'bf-section-two-column', // 'vc_admin_label' => false, ); $fields['custom-id'] = array( 'type' => 'text', 'name' => __( 'Custom ID', 'publisher' ), 'id' => 'custom-id', 'value' => '', 'section_class' => 'bf-section-two-column', // 'vc_admin_label' => false, ); return $fields; } } if ( ! function_exists( 'bf_vc_doing_shortcode' ) ) { /** * Get the current running vc shortcode name. * * @since 3.13.2 * @return string */ function bf_vc_doing_shortcode() { global $bf_vc_current_shortcode; return $bf_vc_current_shortcode; } } if ( ! function_exists( 'bf_vc_is_doing_custom_shortcode' ) ) { /** * Is currently doing a vc shortcode / except vc_row and vc_column/ * * @since 3.13.2 * @return bool */ function bf_vc_is_doing_custom_shortcode() { $shortcode = bf_vc_doing_shortcode(); return ! empty( $shortcode ) && ! in_array( $shortcode, [ 'vc_row', 'vc_column' ], true ); } } add_filter( 'vc_shortcode_content_filter', 'bf_vc_shortcode_start', 4, 2 ); if ( ! function_exists( 'bf_vc_shortcode_start' ) ) { /** * Catch the vc shortcode name. * * @param string $content The shortcode content. * @param string $shortcode The shortcode name. * * @since 3.13.2 * @return string */ function bf_vc_shortcode_start( $content, $shortcode ) { global $bf_vc_current_shortcode; $bf_vc_current_shortcode = $shortcode; return $content; } } add_filter( 'vc_shortcode_content_filter_after', 'bf_vc_shortcode_stop', 999 ); if ( ! function_exists( 'bf_vc_shortcode_stop' ) ) { /** * End vc doing shortcode functionality. * * @param string $output shortcode output. * * @since 3.13.2 * @return string */ function bf_vc_shortcode_stop( $output ) { global $bf_vc_current_shortcode; $bf_vc_current_shortcode = ''; return $output; } } coopération – ePressAfrica

Browsing tag

coopération