Note that there are some explanatory texts on larger screens.

plurals
  1. POWordPress Plugin Issues
    text
    copied!<p>I learned how to create a plugin on WordPress a while ago. However, WordPress changed everything around and I'm trying to create the same plugin using the new WordPress format. I've read several things, but tried to jump right in by modifying the WordPress Text Field plugin (one of my goals with redoing the plugin was to make it usable multiple times). I realize the code is really rough, but I'm stuck. I've tried to add two new fields just to see how things go and while they appear when I go to edit the widget once you click save on the Title and first textarea data gets saved, the other two fields dissapear.</p> <p>I have a feeling I'm missing something obvious, but I just can't seem to figure it out. Here's the code:</p> 'widget_text', 'description' => __('Text or HTML')); $control_ops = array('width' => 400, 'height' => 350); $this->WP_Widget('text', __('Multi Excerpt'), $widget_ops, $control_ops); } function widget( $args, $instance ) { extract($args); $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance ); $text = apply_filters( 'widget_text', $instance['text'], $instance ); $texta = apply_filters( 'widget_text', $instance['texta'], $instance ); $posts = $instance['posts']; echo $before_widget; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ?> '', 'text' => '', 'posts' => '', 'texta' => '' ) ); $title = strip_tags($instance['title']); $text = format_to_edit($instance['text']); $texta = format_to_edit($instance['texta']); $posts = $instance['posts']; ?> <p>get_field_id('title'); ?>"> get_field_id('title'); ?>" name="get_field_name('title'); ?>" type="text" value="" /></p> get_field_id('text'); ?>" name="get_field_name('text'); ?>"> get_field_id('texta'); ?>" name="get_field_name('texta'); ?>"> <p>get_field_id('posts'); ?>">Posts: get_field_id('posts'); ?>" name="get_field_name('posts'); ?>" type="text" value="" /></p> <p>Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload