Insert Pages - Version 3.1.6

Version Description

  • Fix for TinyMCE toolbar button not appearing for authors and contributors. Props @fernandosalvato for the report.
  • Fix for deprecation warning in PHP 7. Props @christer_f for the report.
Download this release

Release Info

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

Code changes from version 3.1.5 to 3.1.6

Files changed (2) hide show
  1. insert-pages.php +31 -35
  2. readme.txt +5 -1
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.5
9
  Author URI: http://www.linkedin.com/in/paulrryan
10
  License: GPL2
11
  */
@@ -37,7 +37,7 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
37
  protected $pageID;
38
 
39
  // Constructor
40
- public function InsertPagesPlugin() {
41
  // Include the code that generates the options page.
42
  require_once( dirname( __FILE__ ) . '/options.php' );
43
  }
@@ -63,42 +63,38 @@ if ( !class_exists( 'InsertPagesPlugin' ) ) {
63
  $options = wpip_set_defaults();
64
  }
65
 
66
- // Add TinyMCE toolbar button filters only if current user has permissions
67
- if ( current_user_can( 'edit_posts' ) && current_user_can( 'edit_pages' ) && get_user_option( 'rich_editing' )=='true' ) {
68
-
69
- // Register the TinyMCE toolbar button script
70
- wp_enqueue_script(
71
- 'wpinsertpages',
72
- plugins_url( '/js/wpinsertpages.js', __FILE__ ),
73
- array( 'wpdialogs' ),
74
- '20151230'
75
- );
76
- wp_localize_script(
77
- 'wpinsertpages',
78
- 'wpInsertPagesL10n',
79
- array(
80
- 'update' => __( 'Update' ),
81
- 'save' => __( 'Insert Page' ),
82
- 'noTitle' => __( '(no title)' ),
83
- 'noMatchesFound' => __( 'No matches found.' ),
84
- 'l10n_print_after' => 'try{convertEntities(wpLinkL10n);}catch(e){};',
85
- 'format' => $options['wpip_format'],
86
- )
87
- );
88
 
89
- // Register the TinyMCE toolbar button styles
90
- wp_enqueue_style(
91
- 'wpinsertpagescss',
92
- plugins_url( '/css/wpinsertpages.css', __FILE__ ),
93
- array( 'wp-jquery-ui-dialog' ),
94
- '20151230'
95
- );
96
 
97
- add_filter( 'mce_external_plugins', array( $this, 'insertPages_handleFilter_mceExternalPlugins' ) );
98
- add_filter( 'mce_buttons', array( $this, 'insertPages_handleFilter_mceButtons' ) );
99
 
100
- //load_plugin_textdomain('insert-pages', false, dirname(plugin_basename(__FILE__)).'/languages/');
101
- }
102
 
103
  }
104
 
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
  */
37
  protected $pageID;
38
 
39
  // Constructor
40
+ public function __construct() {
41
  // Include the code that generates the options page.
42
  require_once( dirname( __FILE__ ) . '/options.php' );
43
  }
63
  $options = wpip_set_defaults();
64
  }
65
 
66
+ // Register the TinyMCE toolbar button script
67
+ wp_enqueue_script(
68
+ 'wpinsertpages',
69
+ plugins_url( '/js/wpinsertpages.js', __FILE__ ),
70
+ array( 'wpdialogs' ),
71
+ '20151230'
72
+ );
73
+ wp_localize_script(
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
+ )
84
+ );
 
 
 
85
 
86
+ // Register the TinyMCE toolbar button styles
87
+ wp_enqueue_style(
88
+ 'wpinsertpagescss',
89
+ plugins_url( '/css/wpinsertpages.css', __FILE__ ),
90
+ array( 'wp-jquery-ui-dialog' ),
91
+ '20151230'
92
+ );
93
 
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
 
readme.txt CHANGED
@@ -7,7 +7,7 @@ Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- Insert Pages lets you embed any WordPress content (e.g., pages, posts, custom post types) into other WordPress content using the Shortcode API. It also includes a widget for inserting pages into any widget area.
11
 
12
  == Description ==
13
 
@@ -86,6 +86,10 @@ Just one! The plugin prevents you from embedding a page in itself, but you can t
86
 
87
  == Changelog ==
88
 
 
 
 
 
89
  = 3.1.5 =
90
  * Fix for php warning when inserting page outside of The Loop while using Beaver Builder. Props @jeffreytanuwidjaja for the report.
91
 
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ Insert Pages lets you embed any WordPress content (e.g., pages, posts, custom post types) into other WordPress content using the Shortcode API.
11
 
12
  == Description ==
13
 
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.
92
+
93
  = 3.1.5 =
94
  * Fix for php warning when inserting page outside of The Loop while using Beaver Builder. Props @jeffreytanuwidjaja for the report.
95