Version Description
- Notice errors fixed
Download this release
Release Info
Developer | f1logic |
Plugin | Insert Html Snippet |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3 to 1.3.1
- admin/snippets.php +6 -2
- insert-html-snippet.php +1 -1
- readme.txt +4 -1
- shortcode-handler.php +4 -3
admin/snippets.php
CHANGED
@@ -4,7 +4,8 @@ if ( ! defined( 'ABSPATH' ) )
|
|
4 |
|
5 |
global $wpdb;
|
6 |
$_GET = stripslashes_deep($_GET);
|
7 |
-
$xyz_ihs_message = '';
|
|
|
8 |
if(isset($_GET['xyz_ihs_msg'])){
|
9 |
$xyz_ihs_message = intval($_GET['xyz_ihs_msg']);
|
10 |
}
|
@@ -160,9 +161,12 @@ if($xyz_ihs_message == 8)
|
|
160 |
$offset = ( $pagenum - 1 ) * $limit;
|
161 |
$field=get_option('xyz_ihs_sort_field_name');
|
162 |
$order=get_option('xyz_ihs_sort_order');
|
163 |
-
|
|
|
164 |
$search_name=sanitize_text_field($_POST['snippet_name']);
|
165 |
$search_name_db=esc_sql($search_name);
|
|
|
|
|
166 |
$entries = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."xyz_ihs_short_code WHERE title like '%".$search_name_db."%'"." ORDER BY $field $order LIMIT $offset,$limit" );
|
167 |
|
168 |
?>
|
4 |
|
5 |
global $wpdb;
|
6 |
$_GET = stripslashes_deep($_GET);
|
7 |
+
$xyz_ihs_message = $search_name_db=$search_name='';
|
8 |
+
|
9 |
if(isset($_GET['xyz_ihs_msg'])){
|
10 |
$xyz_ihs_message = intval($_GET['xyz_ihs_msg']);
|
11 |
}
|
161 |
$offset = ( $pagenum - 1 ) * $limit;
|
162 |
$field=get_option('xyz_ihs_sort_field_name');
|
163 |
$order=get_option('xyz_ihs_sort_order');
|
164 |
+
if(isset($_POST['snippet_name']))
|
165 |
+
{
|
166 |
$search_name=sanitize_text_field($_POST['snippet_name']);
|
167 |
$search_name_db=esc_sql($search_name);
|
168 |
+
}
|
169 |
+
|
170 |
$entries = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."xyz_ihs_short_code WHERE title like '%".$search_name_db."%'"." ORDER BY $field $order LIMIT $offset,$limit" );
|
171 |
|
172 |
?>
|
insert-html-snippet.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Insert HTML Snippet
|
4 |
Plugin URI: http://xyzscripts.com/wordpress-plugins/insert-html-snippet/
|
5 |
Description: Add HTML code to your pages and posts easily using shortcodes. This plugin lets you create a shortcode corresponding to any random HTML code such as ad codes, javascript, video embedding, etc. and use the same in your posts, pages or widgets.
|
6 |
-
Version: 1.3
|
7 |
Author: xyzscripts.com
|
8 |
Author URI: http://xyzscripts.com/
|
9 |
Text Domain: insert-html-snippet
|
3 |
Plugin Name: Insert HTML Snippet
|
4 |
Plugin URI: http://xyzscripts.com/wordpress-plugins/insert-html-snippet/
|
5 |
Description: Add HTML code to your pages and posts easily using shortcodes. This plugin lets you create a shortcode corresponding to any random HTML code such as ad codes, javascript, video embedding, etc. and use the same in your posts, pages or widgets.
|
6 |
+
Version: 1.3.1
|
7 |
Author: xyzscripts.com
|
8 |
Author URI: http://xyzscripts.com/
|
9 |
Text Domain: insert-html-snippet
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://xyzscripts.com/donate/
|
|
4 |
Tags: insert HTML, add HTML, insert adsense, insert ads, insert addthis code, insert flash , insert javascript, add javascript, insert css, add css, HTML to shortcode, integrate ad codes, raw html, embed html, html inserter, ad inserter, css inserter
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.2.1
|
7 |
-
Stable tag: 1.3
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Add HTML, CSS and javascript code to your pages and posts easily using shortcodes.
|
@@ -74,6 +74,9 @@ More questions ? [Drop a mail](http://xyzscripts.com/members/support/ "XYZScript
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
77 |
= 1.3 =
|
78 |
* Snippet selection support in classic editor block of Gutenberg
|
79 |
* Support for Search Snippet by name
|
4 |
Tags: insert HTML, add HTML, insert adsense, insert ads, insert addthis code, insert flash , insert javascript, add javascript, insert css, add css, HTML to shortcode, integrate ad codes, raw html, embed html, html inserter, ad inserter, css inserter
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.2.1
|
7 |
+
Stable tag: 1.3.1
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Add HTML, CSS and javascript code to your pages and posts easily using shortcodes.
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 1.3.1 =
|
78 |
+
* Notice errors fixed
|
79 |
+
|
80 |
= 1.3 =
|
81 |
* Snippet selection support in classic editor block of Gutenberg
|
82 |
* Support for Search Snippet by name
|
shortcode-handler.php
CHANGED
@@ -8,8 +8,9 @@ add_shortcode('xyz-ihs','xyz_ihs_display_content');
|
|
8 |
|
9 |
function xyz_ihs_display_content($xyz_snippet_name){
|
10 |
global $wpdb;
|
11 |
-
|
12 |
-
if(is_array($xyz_snippet_name)){
|
|
|
13 |
$snippet_name = $xyz_snippet_name['snippet'];
|
14 |
|
15 |
$query = $wpdb->get_results($wpdb->prepare( "SELECT * FROM ".$wpdb->prefix."xyz_ihs_short_code WHERE title=%s" ,$snippet_name));
|
@@ -33,4 +34,4 @@ function xyz_ihs_display_content($xyz_snippet_name){
|
|
33 |
}
|
34 |
|
35 |
|
36 |
-
add_filter('widget_text', 'do_shortcode'); // to run shortcodes in text widgets
|
8 |
|
9 |
function xyz_ihs_display_content($xyz_snippet_name){
|
10 |
global $wpdb;
|
11 |
+
|
12 |
+
if(is_array($xyz_snippet_name)&& isset($xyz_snippet_name['snippet'])){
|
13 |
+
|
14 |
$snippet_name = $xyz_snippet_name['snippet'];
|
15 |
|
16 |
$query = $wpdb->get_results($wpdb->prepare( "SELECT * FROM ".$wpdb->prefix."xyz_ihs_short_code WHERE title=%s" ,$snippet_name));
|
34 |
}
|
35 |
|
36 |
|
37 |
+
add_filter('widget_text', 'do_shortcode'); // to run shortcodes in text widgets
|