array( 'name' => esc_html__( 'Copyright', 'mega' ), 'description' => esc_html__( 'Copyright block', 'mega' )),
'before' => '
',
'after' => '
',
'universal' => true
);
parent::__construct( __CLASS__, $args );
}
public function settings( $form )
{
$form->add_control( 'Mega_Control_Text', array( 'label' => esc_html__( 'Title', 'mega' ), 'value' => esc_html__( 'Copyright', 'mega' ), 'name' => 'title' ));
$form->add_control( 'Mega_Control_WP_Editor', array( 'label' => esc_html__( 'Text', 'mega' ), 'desc' => esc_html__( '[date] is Year, [link] is Homelink', 'mega' ), 'value' => esc_html__( 'This site uses valid HTML 5.0 and CSS 3.0. All content Copyright © [date] [link]. All Rights Reserved.', 'mega' ), 'name' => 'text' ));
}
public function block()
{
extract( $this->mega['settings'] );
$link = sprintf( '%3$s', esc_url( home_url()), esc_attr( get_bloginfo( 'description' )), esc_html( get_bloginfo( 'name' )));
echo wpautop( mega_parse_message( array( 'date' => date( 'Y' ), 'link' => $link ), $text ));
}
}