__( 'Shows a product or a list.', 'affiliate-toolkit-starter' ), ) ); add_action( 'admin_footer', array( $this, 'add_script_footer' ) ); } function add_script_footer() { ?> ID; $product = ATKPTools::get_post_setting( $post_id, ATKP_PLUGIN_PREFIX . '_product' ); } } } if ( $product != '' && $product != 0 ) { echo wp_kses_post( $args['before_widget'] ); if ( ! empty( $title ) ) { echo wp_kses_post( $args['before_title'] . esc_html( $title ) . $args['after_title'] ); } try { // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- output is escaped in get_product_output echo $output->get_product_output( $product, $template, $content, 'notset', '', false, $elementcssclass, $containercssclass, false ); } catch ( Exception $e ) { echo 'Exception: ' . esc_html( $e->getMessage() ); } echo wp_kses_post( $args['after_widget'] ); } else if ( $list != '' && $list != 0 ) { echo wp_kses_post( $args['before_widget'] ); if ( ! empty( $title ) ) { echo wp_kses_post( $args['before_title'] . esc_html( $title ) . $args['after_title'] ); } //create list and output try { // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- output is escaped in get_list_output echo $output->get_list_output( $list, $template, $content, 'notset', $elementcssclass, $containercssclass, $limit, $randomsort, false ); } catch ( Exception $e ) { echo 'Exception: ' . esc_html( $e->getMessage() ); } echo wp_kses_post( $args['after_widget'] ); } } // Widget Backend public function form( $instance ) { // Widget admin form ?>

:

>

>