class-redux-divide.php (1438B)
1 <?php 2 /** 3 * Divider Field. 4 * 5 * @package ReduxFramework/Fields 6 * @author Dovy Paukstys & Kevin Provance (kprovance) 7 * @version 4.0.0 8 */ 9 10 defined( 'ABSPATH' ) || exit; 11 12 // Don't duplicate me! 13 if ( ! class_exists( 'Redux_Divide', false ) ) { 14 15 /** 16 * Main Redux_divide class 17 * 18 * @since 1.0.0 19 */ 20 class Redux_Divide extends Redux_Field { 21 22 /** 23 * Field Render Function. 24 * Takes the vars and outputs the HTML for the field in the settings 25 * 26 * @since 1.0.0 27 * @access public 28 * @return void 29 */ 30 public function render() { 31 echo '</td></tr></table>'; 32 echo '<div data-id="' . esc_attr( $this->field['id'] ) . '" id="divide-' . esc_attr( $this->field['id'] ) . '" class="divide ' . esc_attr( $this->field['class'] ) . '"><div class="inner"><span> </span></div></div>'; 33 echo '<table class="form-table no-border"><tbody><tr><th></th><td>'; 34 } 35 36 /** 37 * Enqueue Function. 38 * If this field requires any scripts, or css define this function and register/enqueue the scripts/css 39 * 40 * @since 1.0.0 41 * @access public 42 * @return void 43 */ 44 public function enqueue() { 45 if ( $this->parent->args['dev_mode'] ) { 46 wp_enqueue_style( 47 'redux-field-divide', 48 Redux_Core::$url . 'inc/fields/divide/redux-divide.css', 49 array(), 50 $this->timestamp 51 ); 52 } 53 } 54 } 55 } 56 57 class_alias( 'Redux_Divide', 'ReduxFramework_Divide' );