Version Description
- Respect <!--more--> quicktag in excerpt and excerpt-only displays (in normal insert method).
- Add a custom <!--crop--> quicktag in excerpt and excerpt-only displays (in normal insert method). Excerpt can be trimmed to anything between <!--crop--> and <!--more--> quicktags.
Download this release
Release Info
Developer | figureone |
Plugin | Insert Pages |
Version | 3.4.6 |
Comparing to | |
See all releases |
Code changes from version 3.4.5 to 3.4.6
- insert-pages.php +100 -73
- phpcs.xml +3 -6
- readme.txt +5 -1
insert-pages.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Text Domain: insert-pages
|
8 |
* Domain Path: /languages
|
9 |
* License: GPL2
|
10 |
-
* Version: 3.4.
|
11 |
*
|
12 |
* @package insert-pages
|
13 |
*/
|
@@ -106,7 +106,8 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
106 |
'wpinsertpages',
|
107 |
plugins_url( '/js/wpinsertpages.js', __FILE__ ),
|
108 |
array( 'wpdialogs' ),
|
109 |
-
'20180702'
|
|
|
110 |
);
|
111 |
wp_localize_script(
|
112 |
'wpinsertpages',
|
@@ -162,15 +163,19 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
162 |
global $wp_query, $post, $wp_current_filter;
|
163 |
|
164 |
// Shortcode attributes.
|
165 |
-
$attributes = shortcode_atts(
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
|
|
|
|
|
|
|
|
174 |
|
175 |
// Validation checks.
|
176 |
if ( '0' === $attributes['page'] ) {
|
@@ -214,7 +219,8 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
214 |
*
|
215 |
* @param string $querystring The querystring value for the inserted page.
|
216 |
*/
|
217 |
-
$attributes['querystring'] = apply_filters(
|
|
|
218 |
str_replace( '{', '[', str_replace( '}', ']', htmlspecialchars_decode( $attributes['querystring'] ) ) )
|
219 |
);
|
220 |
|
@@ -284,9 +290,12 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
284 |
// that are nested under another page).
|
285 |
if ( is_null( $inserted_page ) ) {
|
286 |
global $wpdb;
|
287 |
-
$page = $wpdb->get_var(
|
288 |
-
|
289 |
-
|
|
|
|
|
|
|
290 |
if ( $page ) {
|
291 |
$inserted_page = get_post( $page );
|
292 |
}
|
@@ -305,14 +314,14 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
305 |
|
306 |
// Set any querystring params included in the shortcode.
|
307 |
parse_str( $attributes['querystring'], $querystring );
|
308 |
-
$original_get = $_GET;
|
309 |
-
$original_request = $_REQUEST;
|
310 |
foreach ( $querystring as $param => $value ) {
|
311 |
$_GET[ $param ] = $value;
|
312 |
$_REQUEST[ $param ] = $value;
|
313 |
}
|
314 |
|
315 |
-
// Use "Normal" insert method (get_post
|
316 |
if ( 'legacy' !== $options['wpip_insert_method'] ) {
|
317 |
|
318 |
// If we couldn't retrieve the page, fire the filter hook showing a not-found message.
|
@@ -349,7 +358,7 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
349 |
// after we're done.
|
350 |
if ( is_null( $post ) ) {
|
351 |
$old_post_id = null;
|
352 |
-
$post = $inserted_page;
|
353 |
} else {
|
354 |
$old_post_id = $post->ID;
|
355 |
$post->ID = $inserted_page->ID;
|
@@ -396,28 +405,28 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
396 |
}
|
397 |
}
|
398 |
|
399 |
-
// Visual Composer custom CSS
|
400 |
if ( defined( 'WPB_VC_VERSION' ) ) {
|
401 |
-
// Post custom CSS
|
402 |
$post_custom_css = get_post_meta( $inserted_page->ID, '_wpb_post_custom_css', true );
|
403 |
if ( ! empty( $post_custom_css ) ) {
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
}
|
409 |
-
// Shortcodes custom CSS
|
410 |
$shortcodes_custom_css = get_post_meta( $inserted_page->ID, '_wpb_shortcodes_custom_css', true );
|
411 |
if ( ! empty( $shortcodes_custom_css ) ) {
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
}
|
417 |
}
|
418 |
|
419 |
if ( is_null( $old_post_id ) ) {
|
420 |
-
$post = null;
|
421 |
} else {
|
422 |
$post->ID = $old_post_id;
|
423 |
}
|
@@ -578,14 +587,14 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
578 |
}
|
579 |
}
|
580 |
// Restore previous query and update the global template variables.
|
581 |
-
$GLOBALS['wp_query'] = $old_query;
|
582 |
wp_reset_postdata();
|
583 |
}
|
584 |
|
585 |
// Save output buffer contents.
|
586 |
$content = ob_get_clean();
|
587 |
|
588 |
-
} else { // Use "Legacy" insert method (query_posts
|
589 |
|
590 |
// Construct query_posts arguments.
|
591 |
if ( is_numeric( $attributes['page'] ) ) {
|
@@ -630,7 +639,7 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
630 |
// after we're done.
|
631 |
if ( is_null( $post ) ) {
|
632 |
$old_post_id = null;
|
633 |
-
$post = $inserted_page;
|
634 |
} else {
|
635 |
$old_post_id = $post->ID;
|
636 |
$post->ID = $inserted_page->ID;
|
@@ -677,28 +686,28 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
677 |
}
|
678 |
}
|
679 |
|
680 |
-
// Visual Composer custom CSS
|
681 |
if ( defined( 'WPB_VC_VERSION' ) ) {
|
682 |
-
// Post custom CSS
|
683 |
$post_custom_css = get_post_meta( $inserted_page->ID, '_wpb_post_custom_css', true );
|
684 |
if ( ! empty( $post_custom_css ) ) {
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
}
|
690 |
-
// Shortcodes custom CSS
|
691 |
$shortcodes_custom_css = get_post_meta( $inserted_page->ID, '_wpb_shortcodes_custom_css', true );
|
692 |
if ( ! empty( $shortcodes_custom_css ) ) {
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
}
|
698 |
}
|
699 |
|
700 |
if ( is_null( $old_post_id ) ) {
|
701 |
-
$post = null;
|
702 |
} else {
|
703 |
$post->ID = $old_post_id;
|
704 |
}
|
@@ -814,7 +823,7 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
814 |
$content = apply_filters( 'insert_pages_not_found_message', $content );
|
815 |
}
|
816 |
// Restore previous query and update the global template variables.
|
817 |
-
$GLOBALS['wp_query'] = $old_query;
|
818 |
wp_reset_postdata();
|
819 |
}
|
820 |
|
@@ -904,35 +913,52 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
904 |
|
905 |
$text = strip_shortcodes( $text );
|
906 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
907 |
/** This filter is documented in wp-includes/post-template.php */
|
908 |
if ( $apply_the_content_filter ) {
|
909 |
$text = apply_filters( 'the_content', $text );
|
910 |
}
|
911 |
$text = str_replace( ']]>', ']]>', $text );
|
912 |
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
|
|
|
|
921 |
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
|
935 |
-
|
|
|
936 |
}
|
937 |
/**
|
938 |
* Filter the trimmed excerpt string.
|
@@ -962,7 +988,8 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
962 |
}
|
963 |
|
964 |
// Get ID of post currently being edited.
|
965 |
-
|
|
|
966 |
|
967 |
// display: none is required here, see #WP27605.
|
968 |
?><div id="wp-insertpage-backdrop" style="display: none"></div>
|
@@ -1079,7 +1106,7 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
1079 |
check_ajax_referer( 'internal-inserting', '_ajax_inserting_nonce' );
|
1080 |
$args = array();
|
1081 |
if ( isset( $_POST['search'] ) ) {
|
1082 |
-
$args['s'] = wp_unslash( $_POST['search'] );
|
1083 |
}
|
1084 |
$args['pagenum'] = ! empty( $_POST['page'] ) ? absint( $_POST['page'] ) : 1;
|
1085 |
$args['pageID'] = ! empty( $_POST['pageID'] ) ? absint( $_POST['pageID'] ) : 0;
|
@@ -1087,7 +1114,7 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
1087 |
// Change search to slug or post ID if we're not doing a plaintext
|
1088 |
// search (e.g., if we're editing an existing shortcode and the
|
1089 |
// search field is populated with the post's slug or ID).
|
1090 |
-
if (
|
1091 |
$args['name'] = $args['s'];
|
1092 |
unset( $args['s'] );
|
1093 |
} elseif ( array_key_exists( 'type', $_POST ) && 'post_id' === $_POST['type'] ) {
|
@@ -1178,7 +1205,7 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
1178 |
}
|
1179 |
$results[] = array(
|
1180 |
'ID' => $post->ID,
|
1181 |
-
'title' => trim( esc_html(
|
1182 |
'permalink' => get_permalink( $post->ID ),
|
1183 |
'slug' => $post->post_name,
|
1184 |
'path' => get_page_uri( $post ),
|
@@ -1199,7 +1226,7 @@ if ( ! class_exists( 'InsertPagesPlugin' ) ) {
|
|
1199 |
<script type="text/javascript">
|
1200 |
QTags.addButton( 'ed_insert_page', '[insert page]', "[insert page='your-page-slug' display='title|link|excerpt|excerpt-only|content|post-thumbnail|all']\n", '', '', 'Insert Page', 999 );
|
1201 |
</script>
|
1202 |
-
|
1203 |
endif;
|
1204 |
}
|
1205 |
|
7 |
* Text Domain: insert-pages
|
8 |
* Domain Path: /languages
|
9 |
* License: GPL2
|
10 |
+
* Version: 3.4.6
|
11 |
*
|
12 |
* @package insert-pages
|
13 |
*/
|
106 |
'wpinsertpages',
|
107 |
plugins_url( '/js/wpinsertpages.js', __FILE__ ),
|
108 |
array( 'wpdialogs' ),
|
109 |
+
'20180702',
|
110 |
+
false
|
111 |
);
|
112 |
wp_localize_script(
|
113 |
'wpinsertpages',
|
163 |
global $wp_query, $post, $wp_current_filter;
|
164 |
|
165 |
// Shortcode attributes.
|
166 |
+
$attributes = shortcode_atts(
|
167 |
+
array(
|
168 |
+
'page' => '0',
|
169 |
+
'display' => 'all',
|
170 |
+
'class' => '',
|
171 |
+
'id' => '',
|
172 |
+
'inline' => false,
|
173 |
+
'public' => false,
|
174 |
+
'querystring' => '',
|
175 |
+
),
|
176 |
+
$atts,
|
177 |
+
'insert'
|
178 |
+
);
|
179 |
|
180 |
// Validation checks.
|
181 |
if ( '0' === $attributes['page'] ) {
|
219 |
*
|
220 |
* @param string $querystring The querystring value for the inserted page.
|
221 |
*/
|
222 |
+
$attributes['querystring'] = apply_filters(
|
223 |
+
'insert_pages_override_querystring',
|
224 |
str_replace( '{', '[', str_replace( '}', ']', htmlspecialchars_decode( $attributes['querystring'] ) ) )
|
225 |
);
|
226 |
|
290 |
// that are nested under another page).
|
291 |
if ( is_null( $inserted_page ) ) {
|
292 |
global $wpdb;
|
293 |
+
$page = $wpdb->get_var( // phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
294 |
+
$wpdb->prepare(
|
295 |
+
"SELECT ID FROM $wpdb->posts WHERE post_name = %s AND (post_status = 'publish' OR post_status = 'private') LIMIT 1",
|
296 |
+
$attributes['page']
|
297 |
+
)
|
298 |
+
);
|
299 |
if ( $page ) {
|
300 |
$inserted_page = get_post( $page );
|
301 |
}
|
314 |
|
315 |
// Set any querystring params included in the shortcode.
|
316 |
parse_str( $attributes['querystring'], $querystring );
|
317 |
+
$original_get = $_GET; // phpcs:ignore WordPress.Security.NonceVerification
|
318 |
+
$original_request = $_REQUEST; // phpcs:ignore WordPress.Security.NonceVerification
|
319 |
foreach ( $querystring as $param => $value ) {
|
320 |
$_GET[ $param ] = $value;
|
321 |
$_REQUEST[ $param ] = $value;
|
322 |
}
|
323 |
|
324 |
+
// Use "Normal" insert method (get_post).
|
325 |
if ( 'legacy' !== $options['wpip_insert_method'] ) {
|
326 |
|
327 |
// If we couldn't retrieve the page, fire the filter hook showing a not-found message.
|
358 |
// after we're done.
|
359 |
if ( is_null( $post ) ) {
|
360 |
$old_post_id = null;
|
361 |
+
$post = $inserted_page; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
362 |
} else {
|
363 |
$old_post_id = $post->ID;
|
364 |
$post->ID = $inserted_page->ID;
|
405 |
}
|
406 |
}
|
407 |
|
408 |
+
// Visual Composer custom CSS.
|
409 |
if ( defined( 'WPB_VC_VERSION' ) ) {
|
410 |
+
// Post custom CSS.
|
411 |
$post_custom_css = get_post_meta( $inserted_page->ID, '_wpb_post_custom_css', true );
|
412 |
if ( ! empty( $post_custom_css ) ) {
|
413 |
+
$post_custom_css = wp_strip_all_tags( $post_custom_css );
|
414 |
+
echo '<style type="text/css" data-type="vc_custom-css">';
|
415 |
+
echo $post_custom_css;
|
416 |
+
echo '</style>';
|
417 |
}
|
418 |
+
// Shortcodes custom CSS.
|
419 |
$shortcodes_custom_css = get_post_meta( $inserted_page->ID, '_wpb_shortcodes_custom_css', true );
|
420 |
if ( ! empty( $shortcodes_custom_css ) ) {
|
421 |
+
$shortcodes_custom_css = wp_strip_all_tags( $shortcodes_custom_css );
|
422 |
+
echo '<style type="text/css" data-type="vc_shortcodes-custom-css">';
|
423 |
+
echo $shortcodes_custom_css;
|
424 |
+
echo '</style>';
|
425 |
}
|
426 |
}
|
427 |
|
428 |
if ( is_null( $old_post_id ) ) {
|
429 |
+
$post = null; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
430 |
} else {
|
431 |
$post->ID = $old_post_id;
|
432 |
}
|
587 |
}
|
588 |
}
|
589 |
// Restore previous query and update the global template variables.
|
590 |
+
$GLOBALS['wp_query'] = $old_query; // phpcs:ignore WordPress.WP.GlobalVariablesOverride
|
591 |
wp_reset_postdata();
|
592 |
}
|
593 |
|
594 |
// Save output buffer contents.
|
595 |
$content = ob_get_clean();
|
596 |
|
597 |
+
} else { // Use "Legacy" insert method (query_posts).
|
598 |
|
599 |
// Construct query_posts arguments.
|
600 |
if ( is_numeric( $attributes['page'] ) ) {
|
639 |
// after we're done.
|
640 |
if ( is_null( $post ) ) {
|
641 |
$old_post_id = null;
|
642 |
+
$post = $inserted_page; // phpcs:ignore WordPress.WP.GlobalVariablesOverride
|
643 |
} else {
|
644 |
$old_post_id = $post->ID;
|
645 |
$post->ID = $inserted_page->ID;
|
686 |
}
|
687 |
}
|
688 |
|
689 |
+
// Visual Composer custom CSS.
|
690 |
if ( defined( 'WPB_VC_VERSION' ) ) {
|
691 |
+
// Post custom CSS.
|
692 |
$post_custom_css = get_post_meta( $inserted_page->ID, '_wpb_post_custom_css', true );
|
693 |
if ( ! empty( $post_custom_css ) ) {
|
694 |
+
$post_custom_css = wp_strip_all_tags( $post_custom_css );
|
695 |
+
echo '<style type="text/css" data-type="vc_custom-css">';
|
696 |
+
echo $post_custom_css;
|
697 |
+
echo '</style>';
|
698 |
}
|
699 |
+
// Shortcodes custom CSS.
|
700 |
$shortcodes_custom_css = get_post_meta( $inserted_page->ID, '_wpb_shortcodes_custom_css', true );
|
701 |
if ( ! empty( $shortcodes_custom_css ) ) {
|
702 |
+
$shortcodes_custom_css = wp_strip_all_tags( $shortcodes_custom_css );
|
703 |
+
echo '<style type="text/css" data-type="vc_shortcodes-custom-css">';
|
704 |
+
echo $shortcodes_custom_css;
|
705 |
+
echo '</style>';
|
706 |
}
|
707 |
}
|
708 |
|
709 |
if ( is_null( $old_post_id ) ) {
|
710 |
+
$post = null; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
711 |
} else {
|
712 |
$post->ID = $old_post_id;
|
713 |
}
|
823 |
$content = apply_filters( 'insert_pages_not_found_message', $content );
|
824 |
}
|
825 |
// Restore previous query and update the global template variables.
|
826 |
+
$GLOBALS['wp_query'] = $old_query; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
827 |
wp_reset_postdata();
|
828 |
}
|
829 |
|
913 |
|
914 |
$text = strip_shortcodes( $text );
|
915 |
|
916 |
+
// Look for a <!--more--> quicktag and trim the excerpt there if it exists.
|
917 |
+
$has_more_quicktag = false;
|
918 |
+
if ( preg_match( '/<!--more(.*?)?-->/', $text, $matches ) ) {
|
919 |
+
$has_more_quicktag = true;
|
920 |
+
$text = explode( $matches[0], $text, 2 );
|
921 |
+
$text = $text[0];
|
922 |
+
// Look for a custom <!--crop--> quicktag that will trim any text before
|
923 |
+
// it out of the excerpt.
|
924 |
+
if ( preg_match( '/<!--crop-->/', $text, $matches ) ) {
|
925 |
+
$text = explode( $matches[0], $text, 2 );
|
926 |
+
$text = $text[1];
|
927 |
+
}
|
928 |
+
}
|
929 |
+
|
930 |
/** This filter is documented in wp-includes/post-template.php */
|
931 |
if ( $apply_the_content_filter ) {
|
932 |
$text = apply_filters( 'the_content', $text );
|
933 |
}
|
934 |
$text = str_replace( ']]>', ']]>', $text );
|
935 |
|
936 |
+
// Only trim excerpt if there wasn't an existing <!--more--> quicktag.
|
937 |
+
if ( ! $has_more_quicktag ) {
|
938 |
+
/**
|
939 |
+
* Filter the number of words in an excerpt.
|
940 |
+
*
|
941 |
+
* @since 2.7.0
|
942 |
+
*
|
943 |
+
* @param int $number The number of words. Default 55.
|
944 |
+
*/
|
945 |
+
$excerpt_length = apply_filters( 'excerpt_length', 55 );
|
946 |
|
947 |
+
/**
|
948 |
+
* Filter the string in the "more" link displayed after a trimmed excerpt.
|
949 |
+
*
|
950 |
+
* @since 2.9.0
|
951 |
+
*
|
952 |
+
* @param string $more_string The string shown within the more link.
|
953 |
+
*/
|
954 |
+
global $post;
|
955 |
+
$old_post_id = $post->ID;
|
956 |
+
$post->ID = $post_id;
|
957 |
+
$excerpt_more = apply_filters( 'excerpt_more', ' […]' );
|
958 |
+
$post->ID = $old_post_id;
|
959 |
|
960 |
+
$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
|
961 |
+
}
|
962 |
}
|
963 |
/**
|
964 |
* Filter the trimmed excerpt string.
|
988 |
}
|
989 |
|
990 |
// Get ID of post currently being edited.
|
991 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
992 |
+
$post_id = isset( $_REQUEST['post'] ) && intval( $_REQUEST['post'] ) > 0 ? intval( $_REQUEST['post'] ) : '';
|
993 |
|
994 |
// display: none is required here, see #WP27605.
|
995 |
?><div id="wp-insertpage-backdrop" style="display: none"></div>
|
1106 |
check_ajax_referer( 'internal-inserting', '_ajax_inserting_nonce' );
|
1107 |
$args = array();
|
1108 |
if ( isset( $_POST['search'] ) ) {
|
1109 |
+
$args['s'] = wp_unslash( $_POST['search'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
1110 |
}
|
1111 |
$args['pagenum'] = ! empty( $_POST['page'] ) ? absint( $_POST['page'] ) : 1;
|
1112 |
$args['pageID'] = ! empty( $_POST['pageID'] ) ? absint( $_POST['pageID'] ) : 0;
|
1114 |
// Change search to slug or post ID if we're not doing a plaintext
|
1115 |
// search (e.g., if we're editing an existing shortcode and the
|
1116 |
// search field is populated with the post's slug or ID).
|
1117 |
+
if ( isset( $_POST['type'] ) && 'slug' === $_POST['type'] ) {
|
1118 |
$args['name'] = $args['s'];
|
1119 |
unset( $args['s'] );
|
1120 |
} elseif ( array_key_exists( 'type', $_POST ) && 'post_id' === $_POST['type'] ) {
|
1205 |
}
|
1206 |
$results[] = array(
|
1207 |
'ID' => $post->ID,
|
1208 |
+
'title' => trim( esc_html( wp_strip_all_tags( get_the_title( $post ) ) ) ),
|
1209 |
'permalink' => get_permalink( $post->ID ),
|
1210 |
'slug' => $post->post_name,
|
1211 |
'path' => get_page_uri( $post ),
|
1226 |
<script type="text/javascript">
|
1227 |
QTags.addButton( 'ed_insert_page', '[insert page]', "[insert page='your-page-slug' display='title|link|excerpt|excerpt-only|content|post-thumbnail|all']\n", '', '', 'Insert Page', 999 );
|
1228 |
</script>
|
1229 |
+
<?php
|
1230 |
endif;
|
1231 |
}
|
1232 |
|
phpcs.xml
CHANGED
@@ -6,8 +6,6 @@
|
|
6 |
<rule ref="WordPress">
|
7 |
<exclude name="WordPress.Arrays.MultipleStatementAlignment" />
|
8 |
<exclude name="Generic.Formatting.MultipleStatementAlignment" />
|
9 |
-
<exclude name="WordPress.VIP.SlowDBQuery" />
|
10 |
-
<exclude name="WordPress.VIP.RestrictedFunctions" />
|
11 |
|
12 |
<!-- Allow opening and closing braces for functions and classes to be on the same line -->
|
13 |
<exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterOpen"/>
|
@@ -25,13 +23,12 @@
|
|
25 |
<exclude name="PSR2.ControlStructures.SwitchDeclaration.BreakIndent"/>
|
26 |
<exclude name="PSR2.Methods.FunctionCallSignature.Indent"/>
|
27 |
|
|
|
|
|
|
|
28 |
<!-- Disable picky rules. -->
|
29 |
-
<exclude name="WordPress.VIP.SuperGlobalInputUsage"/>
|
30 |
<exclude name="Squiz.PHP.EmbeddedPhp"/>
|
31 |
-
<exclude name="WordPress.VIP.DirectDatabaseQuery"/>
|
32 |
<exclude name="WordPress.Files.FileName"/>
|
33 |
-
<exclude name="WordPress.Variables.GlobalVariables"/>
|
34 |
-
<exclude name="WordPress.VIP.ValidatedSanitizedInput"/>
|
35 |
<exclude name="WordPress.WP.DiscouragedFunctions"/>
|
36 |
</rule>
|
37 |
</ruleset>
|
6 |
<rule ref="WordPress">
|
7 |
<exclude name="WordPress.Arrays.MultipleStatementAlignment" />
|
8 |
<exclude name="Generic.Formatting.MultipleStatementAlignment" />
|
|
|
|
|
9 |
|
10 |
<!-- Allow opening and closing braces for functions and classes to be on the same line -->
|
11 |
<exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterOpen"/>
|
23 |
<exclude name="PSR2.ControlStructures.SwitchDeclaration.BreakIndent"/>
|
24 |
<exclude name="PSR2.Methods.FunctionCallSignature.Indent"/>
|
25 |
|
26 |
+
<!-- Disable output escaping rules. -->
|
27 |
+
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/>
|
28 |
+
|
29 |
<!-- Disable picky rules. -->
|
|
|
30 |
<exclude name="Squiz.PHP.EmbeddedPhp"/>
|
|
|
31 |
<exclude name="WordPress.Files.FileName"/>
|
|
|
|
|
32 |
<exclude name="WordPress.WP.DiscouragedFunctions"/>
|
33 |
</rule>
|
34 |
</ruleset>
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: figureone, the_magician
|
3 |
Tags: insert, pages, shortcode, embed
|
4 |
Requires at least: 3.0.1
|
5 |
-
Tested up to: 5.
|
6 |
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -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.4.5 =
|
90 |
* Fix for nested inserted pages all using custom templates. Props @masterbip for discovering the issue!
|
91 |
|
2 |
Contributors: figureone, the_magician
|
3 |
Tags: insert, pages, shortcode, embed
|
4 |
Requires at least: 3.0.1
|
5 |
+
Tested up to: 5.2
|
6 |
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= 3.4.6 =
|
90 |
+
* Respect <!--more--> quicktag in excerpt and excerpt-only displays (in normal insert method).
|
91 |
+
* Add a custom <!--crop--> quicktag in excerpt and excerpt-only displays (in normal insert method). Excerpt can be trimmed to anything between <!--crop--> and <!--more--> quicktags.
|
92 |
+
|
93 |
= 3.4.5 =
|
94 |
* Fix for nested inserted pages all using custom templates. Props @masterbip for discovering the issue!
|
95 |
|