plugin_name = $plugin_name; } /** * Returns an unique ID as string used for the Widget Base ID. * * @see Footnotes_Widget_Base::get_id() * @since 1.5.0 * * @return string */ protected function get_id() { return 'footnotes_widget'; } /** * Returns the Public name of the Widget to be displayed in the Configuration page. * * @see Footnotes_Widget_Base::get_name() * @since 1.5.0 * * @return string */ protected function get_name() { return $this->plugin_name; } /** * Returns the Description of the child widget. * * @see Footnotes_Widget_Base::get_description() * @since 1.5.0 * * @return string */ protected function get_description() { return __( 'The widget defines the position of the reference container if set to “widget area”.', 'footnotes' ); } /** * Outputs the Settings of the Widget. * * @link https://developer.wordpress.org/reference/classes/wp_widget/form/ `WP_Widget::form()` * @since 1.5.0 * * @param mixed $instance The instance of the widget. */ public function form( $instance ) { echo __( 'The widget defines the position of the reference container if set to “widget area”.', 'footnotes' ); } /** * Outputs the Content of the Widget. * * @link https://developer.wordpress.org/reference/classes/wp_widget/widget/ `WP_Widget::widget()` * @since 1.5.0 * * @param mixed $args The widget's arguments. * @param mixed $instance The instance of the widget. */ public function widget( $args, $instance ) { global $footnotes; // Reference container positioning is set to "widget area". if ( 'widget' === Footnotes_Settings::instance()->get( Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) { // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped echo $footnotes->a_obj_task->reference_container(); // phpcs:enable } } }