array( 'name' => esc_html__( 'Call to action', 'mega' ), 'description' => esc_html__( 'Call to action block', 'mega' )), 'universal' => true, 'responsive' => true, 'class_base' => 'ys-cta' ); parent::__construct( __CLASS__, $args ); } public function settings( $form ) { $form->add_control( 'Mega_Control_Text', array( 'label' => esc_html__( 'Title', 'mega' ), 'value' => esc_html__( 'Call to action title goes here', 'mega' ), 'name' => 'cta' )); $form->add_control( 'Mega_Control_WP_Editor', array( 'label' => esc_html__( 'Content', 'mega' ), 'name' => 'text' )); $form->add_control( 'Mega_Control_Text', array( 'label' => esc_html__( 'Button Label', 'mega' ), 'value' => esc_html__( 'Detail', 'mega' ), 'pro' => 1, 'name' => 'button_label' )); $form->add_control( 'Mega_Control_Text', array( 'label' => esc_html__( 'Link', 'mega' ), 'value' => '#', 'name' => 'link' )); } public function hook() { add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' )); add_action( 'wp_footer', array( &$this, 'foot' ), 25 ); } public function enqueue() { wp_enqueue_script( 'mega.jquery.width' ); } public function foot() { ?> mega['settings'] ); echo '