',
],
'curve_1' => [
'title' => __('Curve','mfn-opts'),
'svg' => '',
'invert' => '',
],
'curve_corner_opacity_1' => [
'title' => __('Curve Corner Opacity','mfn-opts'),
'viewbox' => '0 0 35.278 3.62',
'svg' => '',
],
'curve_asymmetrical_1' => [
'title' => __('Curve Asymmetrical','mfn-opts'),
'svg' => '',
'invert' => '',
],
'crazy_waves_1' => [
'title' => __('Crazy Waves','mfn-opts'),
'viewbox' => '0 0 1000 84.2',
'svg' => '',
],
'gradient_opacity_1' => [
'title' => __('Gradient Opacity','mfn-opts'),
'viewbox' => '0 0 400 60',
'svg' => '',
],
'hexagons_opacity_1' => [
'title' => __('Hexagons Opacity','mfn-opts'),
'viewbox' => '0 0 750 77',
'svg' => '',
],
'hills_1' => [
'title' => __('Hills','mfn-opts'),
'viewbox' => '0 0 1143.58 27.83',
'svg' => '',
],
'hills_opacity_1' => [
'title' => __('Hills Opacity','mfn-opts'),
'viewbox' => '0 0 78 7',
'svg' => '',
],
'mountains_1' => [
'title' => __('Mountains','mfn-opts'),
'viewbox' => '0 0 1000 100',
'svg' => '',
],
'mountains_2' => [
'title' => __('Mountains 2','mfn-opts'),
'viewbox' => '0 0.1 35.33 3.38',
'svg' => '',
],
'spikes_opacity_1' => [
'title' => __('Spikes Opacity','mfn-opts'),
'viewbox' => '0 0 2003.4 89.5',
'svg' => '',
],
'split_1' => [
'title' => __('Split','mfn-opts'),
'svg' => '',
'invert' => '',
],
'tilt_opacity_1' => [
'title' => __('Tilt Opacity','mfn-opts'),
'viewbox' => '0 0 381 77.25',
'svg' => '',
],
'tilt_opacity_2' => [
'title' => __('Tilt Opacity 2','mfn-opts'),
'viewbox' => '0 0 381 59.27',
'svg' => '',
],
'triangle_1' => [
'title' => __('Triangle','mfn-opts'),
'svg' => '',
'invert' => '',
],
'triangle_asymmetrical_1' => [
'title' => __('Triangle Asymmetrical','mfn-opts'),
'svg' => '',
'invert' => '',
],
'tilt' => [
'title' => __('Tilt','mfn-opts'),
'svg' => '',
],
'waves_1' => [
'title' => __('Waves','mfn-opts'),
'svg' => '',
'invert' => '',
],
'waves_opacity_1' => [
'title' => __('Waves Opacity','mfn-opts'),
'svg' => '
',
],
'waves_opacity_2' => [
'title' => __('Waves Opacity 2','mfn-opts'),
'viewbox' => '0 0 35.28 2.17',
'svg' => '',
],
'waves_opacity_3' => [
'title' => __('Waves Opacity 3','mfn-opts'),
'viewbox' => '0 0 2000.4 78.7',
'svg' => '',
],
'waves_opacity_4' => [
'title' => __('Waves Opacity 4','mfn-opts'),
'viewbox' => '0 0 381 76.2',
'svg' => '',
],
];
// get single dimensional array with key, value
if( 'options' == $primary_key ){
$array = [
'' => __('None','mfn-opts'),
];
foreach( $shape_dividers as $key => $value ){
$array[$key] = $value['title'];
}
return $array;
}
// get coma separated list of invert dividers (for conditions)
if( 'invert' == $primary_key ){
$array = [];
foreach( $shape_dividers as $key => $value ){
if( !empty( $value['invert'] ) ){
$array[] = $key;
}
}
$string = implode(',',$array);
return $string;
}
if( $primary_key ){
if( $secondary_key ){
if( !empty($shape_dividers[$primary_key][$secondary_key]) ){
return $shape_dividers[$primary_key][$secondary_key];
}
} else {
return $shape_dividers[$primary_key];
}
return false;
}
return $shape_dividers;
}
/**
* GET Shape divider html
*/
public static function shapedDivider( $name = false, $position = false, $is_inverted = false, $is_flipped = false, $bring_front = false ){
$viewbox = '0 0 1200 120';
if( 'empty' == $name ){
$html = '';
$html .= '
';
$html .= '
';
return $html;
}
// viewbox
if( self::get_shape_divider( $name, 'viewbox' ) ){
$viewbox = self::get_shape_divider( $name, 'viewbox' );
}
// invert
$key = 'svg';
if( $is_inverted && self::get_shape_divider( $name, 'invert' ) ){
$key = 'invert';
} else {
$is_inverted = 0;
}
$html = '';
$html .= '';
$html .= '
';
return $html;
}
}