Version Description
- Notice errors fixed
Download this release
Release Info
Developer | f1logic |
Plugin | Insert PHP Code Snippet |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3 to 1.3.1
- admin/snippets.php +6 -1
- insert-php-code-snippet.php +1 -1
- readme.txt +5 -2
- shortcode-handler.php +1 -1
admin/snippets.php
CHANGED
@@ -4,7 +4,8 @@ if ( ! defined( 'ABSPATH' ) )
|
|
4 |
|
5 |
global $wpdb;
|
6 |
$_GET = stripslashes_deep($_GET);
|
7 |
-
$xyz_ips_message = '';
|
|
|
8 |
if(isset($_GET['xyz_ips_msg'])){
|
9 |
$xyz_ips_message = intval($_GET['xyz_ips_msg']);
|
10 |
}
|
@@ -154,8 +155,12 @@ if($xyz_ips_message == 8)
|
|
154 |
|
155 |
$field=get_option('xyz_ips_sort_field_name');
|
156 |
$order=get_option('xyz_ips_sort_order');
|
|
|
|
|
157 |
$search_name=sanitize_text_field($_POST['snippet_name']);
|
158 |
$search_name_db=esc_sql($search_name);
|
|
|
|
|
159 |
$entries = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."xyz_ips_short_code WHERE title like '%".$search_name_db."%'"." ORDER BY $field $order LIMIT $offset,$limit" );
|
160 |
|
161 |
|
4 |
|
5 |
global $wpdb;
|
6 |
$_GET = stripslashes_deep($_GET);
|
7 |
+
$xyz_ips_message =$search_name_db=$search_name= '';
|
8 |
+
|
9 |
if(isset($_GET['xyz_ips_msg'])){
|
10 |
$xyz_ips_message = intval($_GET['xyz_ips_msg']);
|
11 |
}
|
155 |
|
156 |
$field=get_option('xyz_ips_sort_field_name');
|
157 |
$order=get_option('xyz_ips_sort_order');
|
158 |
+
if(isset($_POST['snippet_name']))
|
159 |
+
{
|
160 |
$search_name=sanitize_text_field($_POST['snippet_name']);
|
161 |
$search_name_db=esc_sql($search_name);
|
162 |
+
}
|
163 |
+
|
164 |
$entries = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."xyz_ips_short_code WHERE title like '%".$search_name_db."%'"." ORDER BY $field $order LIMIT $offset,$limit" );
|
165 |
|
166 |
|
insert-php-code-snippet.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Insert PHP Code Snippet
|
4 |
Plugin URI: http://xyzscripts.com/wordpress-plugins/insert-php-code-snippet/
|
5 |
Description: Insert and run PHP code in your pages and posts easily using shortcodes. This plugin lets you create a shortcode corresponding to any random PHP code 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-php-code-snippet
|
3 |
Plugin Name: Insert PHP Code Snippet
|
4 |
Plugin URI: http://xyzscripts.com/wordpress-plugins/insert-php-code-snippet/
|
5 |
Description: Insert and run PHP code in your pages and posts easily using shortcodes. This plugin lets you create a shortcode corresponding to any random PHP code 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-php-code-snippet
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: f1logic
|
|
3 |
Donate link: http://xyzscripts.com/donate/
|
4 |
Tags: insert PHP, add PHP, insert PHP code, insert PHP tag, insert PHP snippet, insert PHP code snippet , insert PHP snippet, add PHP code, insert PHP tag, add PHP snippet, add PHP code snippet, integrate PHP codes, raw PHP, embed PHP, PHP inserter, PHP code inserter, PHP snippet inserter
|
5 |
Requires at least: 2.8
|
6 |
-
Tested up to: 5.2.
|
7 |
-
Stable tag: 1.3
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Add PHP code to your pages and posts easily using shortcodes.
|
@@ -66,6 +66,9 @@ More questions ? [Drop a mail](http://xyzscripts.com/members/support/ "XYZScript
|
|
66 |
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
69 |
= 1.3 =
|
70 |
* Snippet selection support in classic editor block of Gutenberg
|
71 |
* Support for Search Snippet by name
|
3 |
Donate link: http://xyzscripts.com/donate/
|
4 |
Tags: insert PHP, add PHP, insert PHP code, insert PHP tag, insert PHP snippet, insert PHP code snippet , insert PHP snippet, add PHP code, insert PHP tag, add PHP snippet, add PHP code snippet, integrate PHP codes, raw PHP, embed PHP, PHP inserter, PHP code inserter, PHP snippet inserter
|
5 |
Requires at least: 2.8
|
6 |
+
Tested up to: 5.2.4
|
7 |
+
Stable tag: 1.3.1
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Add PHP code to your pages and posts easily using shortcodes.
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 1.3.1 =
|
70 |
+
* Notice errors fixed
|
71 |
+
|
72 |
= 1.3 =
|
73 |
* Snippet selection support in classic editor block of Gutenberg
|
74 |
* Support for Search Snippet by name
|
shortcode-handler.php
CHANGED
@@ -5,7 +5,7 @@ global $wpdb;
|
|
5 |
add_shortcode('xyz-ips','xyz_ips_display_content');
|
6 |
function xyz_ips_display_content($xyz_snippet_name){
|
7 |
global $wpdb;
|
8 |
-
if(is_array($xyz_snippet_name)){
|
9 |
$snippet_name = $xyz_snippet_name['snippet'];
|
10 |
$query = $wpdb->get_results($wpdb->prepare( "SELECT * FROM ".$wpdb->prefix."xyz_ips_short_code WHERE title=%s" ,$snippet_name));
|
11 |
if(count($query)>0){
|
5 |
add_shortcode('xyz-ips','xyz_ips_display_content');
|
6 |
function xyz_ips_display_content($xyz_snippet_name){
|
7 |
global $wpdb;
|
8 |
+
if(is_array($xyz_snippet_name)&& isset($xyz_snippet_name['snippet'])){
|
9 |
$snippet_name = $xyz_snippet_name['snippet'];
|
10 |
$query = $wpdb->get_results($wpdb->prepare( "SELECT * FROM ".$wpdb->prefix."xyz_ips_short_code WHERE title=%s" ,$snippet_name));
|
11 |
if(count($query)>0){
|