AP_Askform_Widget::widget( array $args, array $instance )

Description #

Render widget.

Parameters #

  • $args
    array (Required) Arhuments.
  • $instance
    array (Required) Instance.

Source #

File: widgets/ask-form.php

	public function widget( $args, $instance ) {
		/**
		 * This filter is documented in widgets/question_stats.php
		 */
		$title = apply_filters( 'widget_title', $instance['title'] );

		echo $args['before_widget']; // xss okay.

		if ( ! empty( $title ) ) {
			echo $args['before_title'] . esc_html( $title ) . $args['after_title']; // xss okay.
		}

		wp_enqueue_script( 'anspress-main' );
		?>
		<div id="ap-ask-page" class="ap-widget-inner">
			<?php ap_ask_form(); ?>
		</div>
		<?php
		echo $args['after_widget']; // xss okay.
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment