| 1 |
<?php |
| 2 |
/* |
| 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.2.3 |
| 7 |
Author: xyzscripts.com |
| 8 |
Author URI: http://xyzscripts.com/ |
| 9 |
Text Domain: insert-php-code-snippet |
| 10 |
License: GPLv2 or later |
| 11 |
*/ |
| 12 |
|
| 13 |
/* |
| 14 |
This program is free software; you can redistribute it and/or |
| 15 |
modify it under the terms of the GNU General Public License |
| 16 |
as published by the Free Software Foundation; either version 2 |
| 17 |
of the License, or (at your option) any later version. |
| 18 |
|
| 19 |
This program is distributed in the hope that it will be useful, |
| 20 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 |
GNU General Public License for more details. |
| 23 |
|
| 24 |
You should have received a copy of the GNU General Public License |
| 25 |
along with this program; if not, write to the Free Software |
| 26 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 27 |
*/ |
| 28 |
|
| 29 |
// if ( !function_exists( 'add_action' ) ) { |
| 30 |
// echo "Hi there! I'm just a plugin, not much I can do when called directly."; |
| 31 |
// exit; |
| 32 |
// } |
| 33 |
if ( ! defined( 'ABSPATH' ) ) |
| 34 |
exit; |
| 35 |
|
| 36 |
//error_reporting(E_ALL); |
| 37 |
|
| 38 |
define('XYZ_INSERT_PHP_PLUGIN_FILE',__FILE__); |
| 39 |
|
| 40 |
require( dirname( __FILE__ ) . '/xyz-functions.php' ); |
| 41 |
|
| 42 |
require( dirname( __FILE__ ) . '/add_shortcode_tynimce.php' ); |
| 43 |
|
| 44 |
require( dirname( __FILE__ ) . '/admin/install.php' ); |
| 45 |
|
| 46 |
require( dirname( __FILE__ ) . '/admin/menu.php' ); |
| 47 |
|
| 48 |
require( dirname( __FILE__ ) . '/shortcode-handler.php' ); |
| 49 |
|
| 50 |
require( dirname( __FILE__ ) . '/ajax-handler.php' ); |
| 51 |
|
| 52 |
require( dirname( __FILE__ ) . '/admin/uninstall.php' ); |
| 53 |
|
| 54 |
require( dirname( __FILE__ ) . '/widget.php' ); |
| 55 |
|
| 56 |
require( dirname( __FILE__ ) . '/direct_call.php' ); |
| 57 |
|
| 58 |
require_once( dirname( __FILE__ ) . '/admin/admin-notices.php' ); |
| 59 |
|
| 60 |
if(get_option('xyz_credit_link')=="ips"){ |
| 61 |
|
| 62 |
add_action('wp_footer', 'xyz_ips_credit'); |
| 63 |
|
| 64 |
} |
| 65 |
function xyz_ips_credit() { |
| 66 |
$content = '<div style="width:100%;text-align:center; font-size:11px; clear:both"><a target="_blank" title="Insert PHP Snippet Wordpress Plugin" href="http://xyzscripts.com/wordpress-plugins/insert-php-code-snippet/">PHP Code Snippets</a> Powered By : <a target="_blank" title="PHP Scripts & Wordpress Plugins" href="http://www.xyzscripts.com" >XYZScripts.com</a></div>'; |
| 67 |
echo $content; |
| 68 |
} |
| 69 |
|
| 70 |
|
| 71 |
?> |