Insert Pages - Version 3.1.7

Version Description

  • Plugin is now translatable (internationalization). Props @maxgx for getting the ball rolling and creating a translation.
Download this release

Release Info

Developer figureone
Plugin Icon wp plugin Insert Pages
Version 3.1.7
Comparing to
See all releases

Code changes from version 3.1.6 to 3.1.7

insert-pages.php CHANGED
@@ -5,7 +5,7 @@ Plugin Name: Insert Pages
5
  Plugin URI: https://github.com/uhm-coe/insert-pages
6
  Description: Insert Pages lets you embed any WordPress content (e.g., pages, posts, custom post types) into other WordPress content using the Shortcode API.
7
  Author: Paul Ryan
8
- Version: 3.1.6
9
  Author URI: http://www.linkedin.com/in/paulrryan
10
  License: GPL2
11
  */
@@ -74,10 +74,10 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
74
  'wpinsertpages',
75
  'wpInsertPagesL10n',
76
  array(
77
- 'update' => __( 'Update' ),
78
- 'save' => __( 'Insert Page' ),
79
- 'noTitle' => __( '(no title)' ),
80
- 'noMatchesFound' => __( 'No matches found.' ),
81
  'l10n_print_after' => 'try{convertEntities(wpLinkL10n);}catch(e){};',
82
  'format' => $options['wpip_format'],
83
  )
@@ -94,7 +94,11 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
94
  add_filter( 'mce_external_plugins', array( $this, 'insertPages_handleFilter_mceExternalPlugins' ) );
95
  add_filter( 'mce_buttons', array( $this, 'insertPages_handleFilter_mceButtons' ) );
96
 
97
- //load_plugin_textdomain('insert-pages', false, dirname(plugin_basename(__FILE__)).'/languages/');
 
 
 
 
98
 
99
  }
100
 
@@ -567,14 +571,14 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
567
  <?php wp_nonce_field( 'internal-inserting', '_ajax_inserting_nonce', false ); ?>
568
  <input type="hidden" id="insertpage-parent-pageID" value="<?php echo $post_id; ?>" />
569
  <div id="insertpage-modal-title">
570
- <?php _e( 'Insert page' ) ?>
571
  <div id="wp-insertpage-close" tabindex="0"></div>
572
  </div>
573
  <div id="insertpage-selector">
574
  <div id="insertpage-search-panel">
575
  <div class="insertpage-search-wrapper">
576
  <label>
577
- <span class="search-label"><?php _e( 'Search' ); ?></span>
578
  <input type="search" id="insertpage-search-field" class="insertpage-search-field" autocomplete="off" />
579
  <span class="spinner"></span>
580
  </label>
@@ -586,47 +590,47 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
586
  </div>
587
  </div>
588
  <div id="insertpage-most-recent-results" class="query-results">
589
- <div class="query-notice"><em><?php _e( 'No search term specified. Showing recent items.' ); ?></em></div>
590
  <ul></ul>
591
  <div class="river-waiting">
592
  <span class="spinner"></span>
593
  </div>
594
  </div>
595
  </div>
596
- <p class="howto" id="insertpage-options-toggle"><?php _e( 'Options' ); ?></p>
597
  <div id="insertpage-options-panel">
598
  <div class="insertpage-options-wrapper">
599
  <label for="insertpage-slug-field">
600
- <span><?php _e( 'Slug or ID' ); ?></span>
601
  <input id="insertpage-slug-field" type="text" autocomplete="off" />
602
  <input id="insertpage-pageID" type="hidden" />
603
  </label>
604
  </div>
605
  <div class="insertpage-format">
606
  <label for="insertpage-format-select">
607
- <?php _e( 'Display' ); ?>
608
  <select name="insertpage-format-select" id="insertpage-format-select">
609
- <option value='title'>Title</option>
610
- <option value='link'>Link</option>
611
- <option value='excerpt'>Excerpt with title</option>
612
- <option value='excerpt-only'>Excerpt only (no title)</option>
613
- <option value='content'>Content</option>
614
- <option value='all'>All (includes custom fields)</option>
615
- <option value='template'>Use a custom template &raquo;</option>
616
  </select>
617
  <select name="insertpage-template-select" id="insertpage-template-select" disabled="true">
618
- <option value='all'><?php _e( 'Default Template' ); ?></option>
619
  <?php page_template_dropdown(); ?>
620
  </select>
621
  </label>
622
  </div>
623
  <div class="insertpage-extra">
624
  <label for="insertpage-extra-classes">
625
- <?php _e( 'Extra Classes' ); ?>
626
  <input id="insertpage-extra-classes" type="text" autocomplete="off" />
627
  </label>
628
  <label for="insertpage-extra-inline">
629
- <?php _e( 'Inline?' ); ?>
630
  <input id="insertpage-extra-inline" type="checkbox" />
631
  </label>
632
  </div>
@@ -634,10 +638,10 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
634
  </div>
635
  <div class="submitbox">
636
  <div id="wp-insertpage-update">
637
- <input type="submit" value="<?php esc_attr_e( 'Insert Page' ); ?>" class="button button-primary" id="wp-insertpage-submit" name="wp-insertpage-submit">
638
  </div>
639
  <div id="wp-insertpage-cancel">
640
- <a class="submitdelete deletion" href="#"><?php _e( 'Cancel' ); ?></a>
641
  </div>
642
  </div>
643
  </form>
@@ -748,7 +752,7 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
748
  $results = array();
749
  foreach ( $posts as $post ) {
750
  if ( 'post' == $post->post_type ) {
751
- $info = mysql2date( __( 'Y/m/d' ), $post->post_date );
752
  } else {
753
  $info = $pts[ $post->post_type ]->labels->singular_name;
754
  }
5
  Plugin URI: https://github.com/uhm-coe/insert-pages
6
  Description: Insert Pages lets you embed any WordPress content (e.g., pages, posts, custom post types) into other WordPress content using the Shortcode API.
7
  Author: Paul Ryan
8
+ Version: 3.1.7
9
  Author URI: http://www.linkedin.com/in/paulrryan
10
  License: GPL2
11
  */
74
  'wpinsertpages',
75
  'wpInsertPagesL10n',
76
  array(
77
+ 'update' => __( 'Update', 'insert-pages' ),
78
+ 'save' => __( 'Insert Page', 'insert-pages' ),
79
+ 'noTitle' => __( '(no title)', 'insert-pages' ),
80
+ 'noMatchesFound' => __( 'No matches found.', 'insert-pages' ),
81
  'l10n_print_after' => 'try{convertEntities(wpLinkL10n);}catch(e){};',
82
  'format' => $options['wpip_format'],
83
  )
94
  add_filter( 'mce_external_plugins', array( $this, 'insertPages_handleFilter_mceExternalPlugins' ) );
95
  add_filter( 'mce_buttons', array( $this, 'insertPages_handleFilter_mceButtons' ) );
96
 
97
+ load_plugin_textdomain(
98
+ 'insert-pages',
99
+ false,
100
+ plugin_basename( dirname( __FILE__ ) ) . '/languages'
101
+ );
102
 
103
  }
104
 
571
  <?php wp_nonce_field( 'internal-inserting', '_ajax_inserting_nonce', false ); ?>
572
  <input type="hidden" id="insertpage-parent-pageID" value="<?php echo $post_id; ?>" />
573
  <div id="insertpage-modal-title">
574
+ <?php _e( 'Insert page', 'insert-pages' ) ?>
575
  <div id="wp-insertpage-close" tabindex="0"></div>
576
  </div>
577
  <div id="insertpage-selector">
578
  <div id="insertpage-search-panel">
579
  <div class="insertpage-search-wrapper">
580
  <label>
581
+ <span class="search-label"><?php _e( 'Search', 'insert-pages' ); ?></span>
582
  <input type="search" id="insertpage-search-field" class="insertpage-search-field" autocomplete="off" />
583
  <span class="spinner"></span>
584
  </label>
590
  </div>
591
  </div>
592
  <div id="insertpage-most-recent-results" class="query-results">
593
+ <div class="query-notice"><em><?php _e( 'No search term specified. Showing recent items.', 'insert-pages' ); ?></em></div>
594
  <ul></ul>
595
  <div class="river-waiting">
596
  <span class="spinner"></span>
597
  </div>
598
  </div>
599
  </div>
600
+ <p class="howto" id="insertpage-options-toggle"><?php _e( 'Options', 'insert-pages' ); ?></p>
601
  <div id="insertpage-options-panel">
602
  <div class="insertpage-options-wrapper">
603
  <label for="insertpage-slug-field">
604
+ <span><?php _e( 'Slug or ID', 'insert-pages' ); ?></span>
605
  <input id="insertpage-slug-field" type="text" autocomplete="off" />
606
  <input id="insertpage-pageID" type="hidden" />
607
  </label>
608
  </div>
609
  <div class="insertpage-format">
610
  <label for="insertpage-format-select">
611
+ <?php _e( 'Display', 'insert-pages' ); ?>
612
  <select name="insertpage-format-select" id="insertpage-format-select">
613
+ <option value='title'><?php _e( 'Title', 'insert-pages' ); ?></option>
614
+ <option value='link'><?php _e( 'Link', 'insert-pages' ); ?></option>
615
+ <option value='excerpt'><?php _e( 'Excerpt with title', 'insert-pages' ); ?></option>
616
+ <option value='excerpt-only'><?php _e( 'Excerpt only (no title)', 'insert-pages' ); ?></option>
617
+ <option value='content'><?php _e( 'Content', 'insert-pages' ); ?></option>
618
+ <option value='all'><?php _e( 'All (includes custom fields)', 'insert-pages' ); ?></option>
619
+ <option value='template'><?php _e( 'Use a custom template', 'insert-pages' ); ?> &raquo;</option>
620
  </select>
621
  <select name="insertpage-template-select" id="insertpage-template-select" disabled="true">
622
+ <option value='all'><?php _e( 'Default Template', 'insert-pages' ); ?></option>
623
  <?php page_template_dropdown(); ?>
624
  </select>
625
  </label>
626
  </div>
627
  <div class="insertpage-extra">
628
  <label for="insertpage-extra-classes">
629
+ <?php _e( 'Extra Classes', 'insert-pages' ); ?>
630
  <input id="insertpage-extra-classes" type="text" autocomplete="off" />
631
  </label>
632
  <label for="insertpage-extra-inline">
633
+ <?php _e( 'Inline?', 'insert-pages' ); ?>
634
  <input id="insertpage-extra-inline" type="checkbox" />
635
  </label>
636
  </div>
638
  </div>
639
  <div class="submitbox">
640
  <div id="wp-insertpage-update">
641
+ <input type="submit" value="<?php esc_attr_e( 'Insert Page', 'insert-pages' ); ?>" class="button button-primary" id="wp-insertpage-submit" name="wp-insertpage-submit">
642
  </div>
643
  <div id="wp-insertpage-cancel">
644
+ <a class="submitdelete deletion" href="#"><?php _e( 'Cancel', 'insert-pages' ); ?></a>
645
  </div>
646
  </div>
647
  </form>
752
  $results = array();
753
  foreach ( $posts as $post ) {
754
  if ( 'post' == $post->post_type ) {
755
+ $info = mysql2date( 'Y/m/d', $post->post_date );
756
  } else {
757
  $info = $pts[ $post->post_type ]->labels->singular_name;
758
  }
js/wpinsertpages.js CHANGED
@@ -248,7 +248,7 @@ var wpInsertPages;
248
  }
249
 
250
  // Update save prompt.
251
- inputs.submit.val( 'Update' );
252
 
253
  // If there's no link, set the default values.
254
  } else {
248
  }
249
 
250
  // Update save prompt.
251
+ inputs.submit.val( wpInsertPagesL10n.update );
252
 
253
  // If there's no link, set the default values.
254
  } else {
js/wpinsertpages_plugin.js CHANGED
@@ -41,7 +41,7 @@
41
 
42
  editor.addButton( 'wpInsertPages_button', {
43
  image: url + '/../img/insertpages_toolbar_icon' + ( isRetinaDisplay() ? '-2x' : '' ) + '.png',
44
- tooltip: 'Insert page',
45
  cmd: 'WP_InsertPages',
46
 
47
  onPostRender: function() {
41
 
42
  editor.addButton( 'wpInsertPages_button', {
43
  image: url + '/../img/insertpages_toolbar_icon' + ( isRetinaDisplay() ? '-2x' : '' ) + '.png',
44
+ tooltip: wpInsertPagesL10n.save,
45
  cmd: 'WP_InsertPages',
46
 
47
  onPostRender: function() {
languages/insert-pages.pot ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
+ "Project-Id-Version: Insert Pages\n"
6
+ "POT-Creation-Date: 2016-11-14 10:04-1000\n"
7
+ "PO-Revision-Date: 2016-11-14 10:04-1000\n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: \n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.11\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-WPHeader: insert-pages.php\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
18
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
19
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
22
+
23
+ #: insert-pages.php:77
24
+ msgid "Update"
25
+ msgstr ""
26
+
27
+ #: insert-pages.php:78 insert-pages.php:637 widget.php:21
28
+ msgid "Insert Page"
29
+ msgstr ""
30
+
31
+ #: insert-pages.php:79
32
+ msgid "(no title)"
33
+ msgstr ""
34
+
35
+ #: insert-pages.php:80
36
+ msgid "No matches found."
37
+ msgstr ""
38
+
39
+ #: insert-pages.php:570
40
+ msgid "Insert page"
41
+ msgstr ""
42
+
43
+ #: insert-pages.php:577
44
+ msgid "Search"
45
+ msgstr ""
46
+
47
+ #: insert-pages.php:589
48
+ msgid "No search term specified. Showing recent items."
49
+ msgstr ""
50
+
51
+ #: insert-pages.php:596
52
+ msgid "Options"
53
+ msgstr ""
54
+
55
+ #: insert-pages.php:600
56
+ msgid "Slug or ID"
57
+ msgstr ""
58
+
59
+ #: insert-pages.php:607 widget.php:89
60
+ msgid "Display"
61
+ msgstr ""
62
+
63
+ #: insert-pages.php:609 widget.php:91
64
+ msgid "Title"
65
+ msgstr ""
66
+
67
+ #: insert-pages.php:610 widget.php:92
68
+ msgid "Link"
69
+ msgstr ""
70
+
71
+ #: insert-pages.php:611
72
+ msgid "Excerpt with title"
73
+ msgstr ""
74
+
75
+ #: insert-pages.php:612 widget.php:94
76
+ msgid "Excerpt only (no title)"
77
+ msgstr ""
78
+
79
+ #: insert-pages.php:613 widget.php:95
80
+ msgid "Content"
81
+ msgstr ""
82
+
83
+ #: insert-pages.php:614 widget.php:96
84
+ msgid "All (includes custom fields)"
85
+ msgstr ""
86
+
87
+ #: insert-pages.php:615 widget.php:97
88
+ msgid "Use a custom template"
89
+ msgstr ""
90
+
91
+ #: insert-pages.php:618 widget.php:100
92
+ msgid "Default Template"
93
+ msgstr ""
94
+
95
+ #: insert-pages.php:625 widget.php:105
96
+ msgid "Extra Classes"
97
+ msgstr ""
98
+
99
+ #: insert-pages.php:629 widget.php:110
100
+ msgid "Inline?"
101
+ msgstr ""
102
+
103
+ #: insert-pages.php:640
104
+ msgid "Cancel"
105
+ msgstr ""
106
+
107
+ #. Plugin Name of the plugin/theme
108
+ #: options.php:13
109
+ msgid "Insert Pages"
110
+ msgstr ""
111
+
112
+ #: options.php:19
113
+ msgid "Shortcode format"
114
+ msgstr ""
115
+
116
+ #: options.php:26
117
+ msgid "Wrapper for inserts"
118
+ msgstr ""
119
+
120
+ #: options.php:33
121
+ msgid "Insert method"
122
+ msgstr ""
123
+
124
+ #: options.php:68
125
+ msgid "You may override some default settings here."
126
+ msgstr ""
127
+
128
+ #: widget.php:21
129
+ msgid "Insert a page into a widget area."
130
+ msgstr ""
131
+
132
+ #: widget.php:85
133
+ msgid "Page/Post ID or Slug"
134
+ msgstr ""
135
+
136
+ #: widget.php:93
137
+ msgid "Excerpt"
138
+ msgstr ""
139
+
140
+ #. Plugin URI of the plugin/theme
141
+ msgid "https://github.com/uhm-coe/insert-pages"
142
+ msgstr ""
143
+
144
+ #. Description of the plugin/theme
145
+ msgid ""
146
+ "Insert Pages lets you embed any WordPress content (e.g., pages, posts, "
147
+ "custom post types) into other WordPress content using the Shortcode API."
148
+ msgstr ""
149
+
150
+ #. Author of the plugin/theme
151
+ msgid "Paul Ryan"
152
+ msgstr ""
153
+
154
+ #. Author URI of the plugin/theme
155
+ msgid "http://www.linkedin.com/in/paulrryan"
156
+ msgstr ""
options.php CHANGED
@@ -10,27 +10,27 @@ function wpip_settings_init() {
10
  register_setting( 'wpipSettings', 'wpip_settings' );
11
  add_settings_section(
12
  'wpip_section',
13
- __( 'Insert Pages', 'wordpress' ),
14
  'wpip_settings_section_callback',
15
  'wpipSettings'
16
  );
17
  add_settings_field(
18
  'wpip_format',
19
- __( 'Shortcode format', 'wordpress' ),
20
  'wpip_format_render',
21
  'wpipSettings',
22
  'wpip_section'
23
  );
24
  add_settings_field(
25
  'wpip_wrapper',
26
- __( 'Wrapper for inserts', 'wordpress' ),
27
  'wpip_wrapper_render',
28
  'wpipSettings',
29
  'wpip_section'
30
  );
31
  add_settings_field(
32
  'wpip_insert_method',
33
- __( 'Insert method', 'wordpress' ),
34
  'wpip_insert_method_render',
35
  'wpipSettings',
36
  'wpip_section'
@@ -65,7 +65,7 @@ register_activation_hook( __FILE__, 'wpip_set_defaults' );
65
 
66
 
67
  function wpip_settings_section_callback() {
68
- echo __( 'You may override some default settings here.', 'wordpress' );
69
  }
70
 
71
 
10
  register_setting( 'wpipSettings', 'wpip_settings' );
11
  add_settings_section(
12
  'wpip_section',
13
+ __( 'Insert Pages', 'insert-pages' ),
14
  'wpip_settings_section_callback',
15
  'wpipSettings'
16
  );
17
  add_settings_field(
18
  'wpip_format',
19
+ __( 'Shortcode format', 'insert-pages' ),
20
  'wpip_format_render',
21
  'wpipSettings',
22
  'wpip_section'
23
  );
24
  add_settings_field(
25
  'wpip_wrapper',
26
+ __( 'Wrapper for inserts', 'insert-pages' ),
27
  'wpip_wrapper_render',
28
  'wpipSettings',
29
  'wpip_section'
30
  );
31
  add_settings_field(
32
  'wpip_insert_method',
33
+ __( 'Insert method', 'insert-pages' ),
34
  'wpip_insert_method_render',
35
  'wpipSettings',
36
  'wpip_section'
65
 
66
 
67
  function wpip_settings_section_callback() {
68
+ echo __( 'You may override some default settings here.', 'insert-pages' );
69
  }
70
 
71
 
readme.txt CHANGED
@@ -2,8 +2,10 @@
2
  Contributors: figureone, the_magician
3
  Tags: insert, pages, shortcode, embed
4
  Requires at least: 3.0.1
5
- Tested up to: 4.5.3
6
  Stable tag: trunk
 
 
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -86,6 +88,9 @@ Just one! The plugin prevents you from embedding a page in itself, but you can t
86
 
87
  == Changelog ==
88
 
 
 
 
89
  = 3.1.6 =
90
  * Fix for TinyMCE toolbar button not appearing for authors and contributors. Props @fernandosalvato for the report.
91
  * Fix for deprecation warning in PHP 7. Props @christer_f for the report.
2
  Contributors: figureone, the_magician
3
  Tags: insert, pages, shortcode, embed
4
  Requires at least: 3.0.1
5
+ Tested up to: 4.6.2
6
  Stable tag: trunk
7
+ Text Domain: insert-pages
8
+ Domain Path: /languages
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
88
 
89
  == Changelog ==
90
 
91
+ = 3.1.7 =
92
+ * Plugin is now translatable (internationalization). Props @maxgx for getting the ball rolling and creating a translation.
93
+
94
  = 3.1.6 =
95
  * Fix for TinyMCE toolbar button not appearing for authors and contributors. Props @fernandosalvato for the report.
96
  * Fix for deprecation warning in PHP 7. Props @christer_f for the report.
widget.php CHANGED
@@ -18,7 +18,7 @@ class InsertPagesWidget extends WP_Widget {
18
  add_action( 'customize_controls_enqueue_scripts', array( $this, 'widget_admin_js' ) );
19
 
20
  // Call parent constructor to initialize the widget.
21
- parent::__construct( 'ipw', 'Insert Page', array( 'description' => 'Insert a page into a widget area.' ) );
22
  }
23
 
24
  /**
@@ -82,32 +82,32 @@ class InsertPagesWidget extends WP_Widget {
82
  'inline' => '',
83
  )); ?>
84
  <p>
85
- <label for="<?php echo $this->get_field_id( 'page' ); ?>"><?php _e( 'Page/Post ID or Slug' ); ?>:</label>
86
  <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'page' ); ?>" name="<?php echo $this->get_field_name( 'page' ); ?>" value="<?php echo $instance['page']; ?>" />
87
  </p>
88
  <p>
89
- <label for="<?php echo $this->get_field_id( 'display' ); ?>"><?php _e( 'Display' ); ?>:</label><br />
90
  <select class="insertpage-format-select" name="<?php echo $this->get_field_name( 'display' ); ?>" id="<?php echo $this->get_field_id( 'display' ); ?>">
91
- <option value='title' <?php selected( $instance['display'], 'title' ); ?>>Title</option>
92
- <option value='link' <?php selected( $instance['display'], 'link' ); ?>>Link</option>
93
- <option value='excerpt' <?php selected( $instance['display'], 'excerpt' ); ?>>Excerpt</option>
94
- <option value='excerpt-only' <?php selected( $instance['display'], 'excerpt-only' ); ?>>Excerpt only (no title)</option>
95
- <option value='content' <?php selected( $instance['display'], 'content' ); ?>>Content</option>
96
- <option value='all' <?php selected( $instance['display'], 'all' ); ?>>All (includes custom fields)</option>
97
- <option value='template' <?php selected( $instance['display'], 'template' ); ?>>Use a custom template &raquo;</option>
98
  </select>
99
  <select class="insertpage-template-select" name="<?php echo $this->get_field_name( 'template' ); ?>" id="<?php echo $this->get_field_id( 'template' ); ?>" disabled="disabled">
100
- <option value='all'><?php _e( 'Default Template' ); ?></option>
101
  <?php page_template_dropdown( $instance['template'] ); ?>
102
  </select>
103
  </p>
104
  <p>
105
- <label for="<?php echo $this->get_field_id( 'class' ); ?>"><?php _e( 'Extra Classes' ); ?>:</label>
106
  <input type="text" class="widefat" autocomplete="off" name="<?php echo $this->get_field_name( 'class' ); ?>" id="<?php echo $this->get_field_id( 'class' ); ?>" value="<?php echo esc_attr( $instance['class'] ); ?>" />
107
  </p>
108
  <p>
109
  <input class="checkbox" type="checkbox" name="<?php echo $this->get_field_name( 'inline' ); ?>" id="<?php echo $this->get_field_id( 'inline' ); ?>" value="1" <?php checked( $instance['inline'], '1' ); ?> />
110
- <label for="<?php echo $this->get_field_id( 'inline' ); ?>"><?php _e( 'Inline?' ); ?></label>
111
  </p><?php
112
  }
113
 
18
  add_action( 'customize_controls_enqueue_scripts', array( $this, 'widget_admin_js' ) );
19
 
20
  // Call parent constructor to initialize the widget.
21
+ parent::__construct( 'ipw', __( 'Insert Page', 'insert-pages' ), array( 'description' => __( 'Insert a page into a widget area.', 'insert-pages' ) ) );
22
  }
23
 
24
  /**
82
  'inline' => '',
83
  )); ?>
84
  <p>
85
+ <label for="<?php echo $this->get_field_id( 'page' ); ?>"><?php _e( 'Page/Post ID or Slug', 'insert-pages' ); ?>:</label>
86
  <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'page' ); ?>" name="<?php echo $this->get_field_name( 'page' ); ?>" value="<?php echo $instance['page']; ?>" />
87
  </p>
88
  <p>
89
+ <label for="<?php echo $this->get_field_id( 'display' ); ?>"><?php _e( 'Display', 'insert-pages' ); ?>:</label><br />
90
  <select class="insertpage-format-select" name="<?php echo $this->get_field_name( 'display' ); ?>" id="<?php echo $this->get_field_id( 'display' ); ?>">
91
+ <option value='title' <?php selected( $instance['display'], 'title' ); ?>><?php _e( 'Title', 'insert-pages' ); ?></option>
92
+ <option value='link' <?php selected( $instance['display'], 'link' ); ?>><?php _e( 'Link', 'insert-pages' ); ?></option>
93
+ <option value='excerpt' <?php selected( $instance['display'], 'excerpt' ); ?>><?php _e( 'Excerpt', 'insert-pages' ); ?></option>
94
+ <option value='excerpt-only' <?php selected( $instance['display'], 'excerpt-only' ); ?>><?php _e( 'Excerpt only (no title)', 'insert-pages' ); ?></option>
95
+ <option value='content' <?php selected( $instance['display'], 'content' ); ?>><?php _e( 'Content', 'insert-pages' ); ?></option>
96
+ <option value='all' <?php selected( $instance['display'], 'all' ); ?>><?php _e( 'All (includes custom fields)', 'insert-pages' ); ?></option>
97
+ <option value='template' <?php selected( $instance['display'], 'template' ); ?>><?php _e( 'Use a custom template', 'insert-pages' ); ?> &raquo;</option>
98
  </select>
99
  <select class="insertpage-template-select" name="<?php echo $this->get_field_name( 'template' ); ?>" id="<?php echo $this->get_field_id( 'template' ); ?>" disabled="disabled">
100
+ <option value='all'><?php _e( 'Default Template', 'insert-pages' ); ?></option>
101
  <?php page_template_dropdown( $instance['template'] ); ?>
102
  </select>
103
  </p>
104
  <p>
105
+ <label for="<?php echo $this->get_field_id( 'class' ); ?>"><?php _e( 'Extra Classes', 'insert-pages' ); ?>:</label>
106
  <input type="text" class="widefat" autocomplete="off" name="<?php echo $this->get_field_name( 'class' ); ?>" id="<?php echo $this->get_field_id( 'class' ); ?>" value="<?php echo esc_attr( $instance['class'] ); ?>" />
107
  </p>
108
  <p>
109
  <input class="checkbox" type="checkbox" name="<?php echo $this->get_field_name( 'inline' ); ?>" id="<?php echo $this->get_field_id( 'inline' ); ?>" value="1" <?php checked( $instance['inline'], '1' ); ?> />
110
+ <label for="<?php echo $this->get_field_id( 'inline' ); ?>"><?php _e( 'Inline?', 'insert-pages' ); ?></label>
111
  </p><?php
112
  }
113