Version Description
- Support for network installation
- Pagination bug fix
Download this release
Release Info
Developer | f1logic |
Plugin | Insert Html Snippet |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.0.1
- add_shortcode_tynimce.php +7 -1
- admin/about.php +0 -15
- admin/ajax-backlink.php +7 -7
- admin/footer.php +43 -125
- admin/header.php +13 -17
- admin/install.php +36 -11
- admin/menu.php +8 -9
- admin/settings.php +11 -18
- admin/snippets.php +12 -15
- admin/style.php +0 -138
- admin/uninstall.php +22 -1
- ajax-handler.php +5 -0
- css/xyz_ihs_styles.css +201 -1
- direct_call.php +17 -0
- editor_plugin.js.php +0 -3
- {admin/images → images}/facebook.png +0 -0
- {admin/images → images}/gplus.png +0 -0
- images/suggest.png +0 -0
- {admin/images → images}/support.png +0 -0
- {admin/images → images}/twitter.png +0 -0
- {admin/images → images}/xyz_logo.png +0 -0
- insert-html-snippet.php +5 -1
- readme.txt +7 -3
- widget.php +15 -3
add_shortcode_tynimce.php
CHANGED
@@ -24,7 +24,13 @@ class XYZ_Insert_Html_TinyMCESelector{
|
|
24 |
}
|
25 |
|
26 |
function registerTmcePlugin($plugin_array){
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
if ( get_user_option('rich_editing') == 'true')
|
30 |
//var_dump($plugin_array);
|
24 |
}
|
25 |
|
26 |
function registerTmcePlugin($plugin_array){
|
27 |
+
|
28 |
+
|
29 |
+
//$xyz_em_confLink = get_site_url()."/index.php?wp_nlm=confirmation&eId=".$xyz_em_emailLastId."&lId=".$listId."&both=".$combineValue."&appurl=".$xyz_em_appendUrl;
|
30 |
+
|
31 |
+
$plugin_array[$this->buttonName] =get_site_url() . '/index.php?wp_ihs=editor_plugin_js';
|
32 |
+
|
33 |
+
//$plugin_array[$this->buttonName] = plugins_url() . '/insert-html-snippet/editor_plugin.js.php';
|
34 |
|
35 |
if ( get_user_option('rich_editing') == 'true')
|
36 |
//var_dump($plugin_array);
|
admin/about.php
CHANGED
@@ -37,18 +37,3 @@ can be used in your pages, posts and widgets. Insert HTML Snippet is developed
|
|
37 |
<div style="clear: both;"></div>
|
38 |
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
<h2>Other plugins</h2>
|
43 |
-
<div>
|
44 |
-
<p>Do checkout other plugins from our team.</p>
|
45 |
-
<ul>
|
46 |
-
<li><a target="_blank" href="http://wordpress.org/extend/plugins/lightbox-pop/">Lightbox Pop</a></li>
|
47 |
-
<li><a target="_blank" href="http://xyzscripts.com/wordpress-plugins/lightbox-pop/details">Lightbox Pop Premium</a></li>
|
48 |
-
<li><a target="_blank" href="http://wordpress.org/extend/plugins/newsletter-manager/">Newsletter Manager</a></li>
|
49 |
-
<li><a target="_blank" href="http://wordpress.org/extend/plugins/contact-form-manager/">Contact Form Manager</a></li>
|
50 |
-
|
51 |
-
</ul>
|
52 |
-
|
53 |
-
<p></p>
|
54 |
-
</div>
|
37 |
<div style="clear: both;"></div>
|
38 |
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/ajax-backlink.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
exit;
|
5 |
-
}
|
6 |
-
global $wpdb;
|
7 |
|
8 |
-
|
9 |
|
10 |
-
|
|
|
|
|
|
|
11 |
}
|
12 |
|
13 |
|
1 |
<?php
|
2 |
+
add_action('wp_ajax_ajax_backlink', 'xyz_ihs_ajax_backlink');
|
3 |
+
function xyz_ihs_ajax_backlink() {
|
|
|
|
|
|
|
4 |
|
5 |
+
global $wpdb;
|
6 |
|
7 |
+
if($_POST){
|
8 |
+
update_option('xyz_credit_link','ihs');
|
9 |
+
|
10 |
+
}
|
11 |
}
|
12 |
|
13 |
|
admin/footer.php
CHANGED
@@ -1,82 +1,25 @@
|
|
1 |
-
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
.xyz_feedback{
|
6 |
-
background: #CEEAF7; /* Old browsers */
|
7 |
-
border: 1px solid #64cfe8;
|
8 |
-
width: 48%;
|
9 |
-
height:200px;
|
10 |
-
padding-left: 10px;
|
11 |
-
float: left;
|
12 |
-
|
13 |
-
}
|
14 |
-
|
15 |
-
.xyz_feedback ul{
|
16 |
-
font-weight: bold;
|
17 |
-
}
|
18 |
-
|
19 |
-
.xyz_feedback a{
|
20 |
-
text-decoration: none
|
21 |
-
}
|
22 |
-
|
23 |
-
|
24 |
-
.xyz_subscribe{
|
25 |
-
background: #bae598; /* Old browsers */
|
26 |
-
border: 1px solid #4d8a1d;
|
27 |
-
width: 48%;
|
28 |
-
padding-left: 10px;
|
29 |
-
float:right;
|
30 |
-
height:200px;
|
31 |
-
|
32 |
-
}
|
33 |
-
.xyz_subscribe td{
|
34 |
-
padding:0;
|
35 |
-
}
|
36 |
-
|
37 |
-
</style>
|
38 |
<p></p>
|
|
|
39 |
<div style="width: 100%">
|
40 |
-
<fieldset
|
41 |
-
style="width: 99%; border: 1px solid #F7F7F7; padding: 10px 0px;">
|
42 |
|
43 |
-
<
|
44 |
-
|
45 |
-
<td style="width:50%; padding: 0">
|
46 |
-
<div class="xyz_feedback" style="width:99%;float: left;">
|
47 |
-
<h2>Feedback</h2>
|
48 |
-
|
49 |
-
Your feedback and suggestions are our sources for betterment of this plugin. You can provide your feedback using any of the options below.
|
50 |
-
<p></p>
|
51 |
-
<ul style="float: left;">
|
52 |
|
53 |
-
<
|
54 |
-
<
|
55 |
-
<
|
56 |
-
|
57 |
-
<ul style="float: left;padding-left: 30px">
|
58 |
-
<li><a target="_blank" href="http://facebook.com/xyzscripts" class="xyz_fbook">Like us on facebook</a></li>
|
59 |
-
<li><a target="_blank" href="http://twitter.com/xyzscripts" class="xyz_twitt">Follow us on twitter</a></li>
|
60 |
-
<li><a target="_blank" href="https://plus.google.com/101215320403235276710/" class="xyz_gplus">+1 us on Google+</a></li>
|
61 |
|
62 |
-
</ul>
|
63 |
|
64 |
</div>
|
65 |
-
|
66 |
-
<
|
67 |
-
|
68 |
-
|
69 |
-
<div class="xyz_subscribe" style="width:99%;float: right;">
|
70 |
-
|
71 |
-
|
72 |
-
<h2>Subscribe</h2>
|
73 |
-
|
74 |
-
|
75 |
-
Stay tuned to our updates by subscribing below.
|
76 |
-
|
77 |
|
78 |
-
<div>
|
79 |
-
|
80 |
<script language="javascript">
|
81 |
function check_email(emailString)
|
82 |
{
|
@@ -134,25 +77,16 @@ function verify_fields()
|
|
134 |
}
|
135 |
</script>
|
136 |
<?php global $current_user; get_currentuserinfo(); ?>
|
137 |
-
<form action=http://xyzscripts.com/newsletter/index.php?page=list/subscribe method="post" name="email_subscription" id="email_subscription" >
|
138 |
<input type="hidden" name="fieldNameIds" value="1,">
|
139 |
-
<input type="hidden" name="redirActive" value="http://xyzscripts.com/subscription/pending/
|
140 |
-
<input type="hidden" name="redirPending" value="http://xyzscripts.com/subscription/active/
|
141 |
<input type="hidden" name="mode" value="1">
|
142 |
-
<table border="0" style=" width: 100%; color: black;">
|
143 |
-
<tr>
|
144 |
-
<td colspan="3" style="padding: 0px;">
|
145 |
-
<span style="font-size:14px;"><b>Field marked <font style="color:#FF0000">*</font> are mandatory </b></span>
|
146 |
-
</td>
|
147 |
-
</tr>
|
148 |
-
|
149 |
-
<tr><td colspan="3" style="padding: 0px;"> </td></tr>
|
150 |
|
|
|
|
|
151 |
|
152 |
-
|
153 |
-
<td id="align" >Name</td>
|
154 |
-
<td id="align" > : </td>
|
155 |
-
<td id="align" >
|
156 |
<input style="border: 1px solid #3fafe3; margin-right:10px;" type="text" name="field1" value="<?php
|
157 |
if ($current_user->user_firstname != "" || $current_user->user_lastname != "")
|
158 |
{
|
@@ -166,59 +100,43 @@ else if (strcasecmp($current_user->user_login ,"admin")!=0 && strcasecmp($curren
|
|
166 |
{
|
167 |
echo $current_user->user_login;
|
168 |
}
|
169 |
-
?>"
|
170 |
-
|
171 |
-
|
172 |
-
<td >Email Address</td><td > : </td>
|
173 |
-
<td >
|
174 |
<input style="border: 1px solid #3fafe3;" name="email"
|
175 |
-
type="text" value="<?php echo $current_user->user_email; ?>" /><span style="color:#FF0000">*</span>
|
176 |
-
|
177 |
-
|
178 |
-
<
|
179 |
-
|
180 |
-
|
181 |
-
<tr>
|
182 |
-
<td style="padding: 0px;"> </td><td style="padding: 0px;"> </td>
|
183 |
-
<td style="padding: 0px;">
|
184 |
-
<input class="button-primary" type="submit" value="subscribe" name="Submit" onclick="javascript: if(!verify_fields()) return false; " />
|
185 |
-
</td>
|
186 |
-
<td style="padding: 0px;"> </td>
|
187 |
-
</tr>
|
188 |
-
<tr>
|
189 |
-
<td colspan="3" style="padding: 0px;"> </td>
|
190 |
-
</tr>
|
191 |
-
</table>
|
192 |
<input type="hidden" name="listName" value="6,1,"/>
|
193 |
</form>
|
194 |
-
</div>
|
195 |
|
196 |
|
197 |
|
198 |
</div>
|
199 |
-
|
200 |
-
</tr>
|
201 |
-
</table>
|
202 |
-
</fieldset>
|
203 |
|
204 |
<div style="clear: both;"></div>
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
</div>
|
209 |
-
<div style="padding-top: 10px;float:right ;">
|
210 |
See Also :
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
|
|
|
|
218 |
|
219 |
</div>
|
220 |
</div>
|
221 |
-
|
|
|
|
|
222 |
<div style="clear: both;"></div>
|
223 |
|
224 |
</div>
|
1 |
+
<div style="clear: both;"></div>
|
2 |
|
3 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
<p></p>
|
5 |
+
|
6 |
<div style="width: 100%">
|
|
|
|
|
7 |
|
8 |
+
<div class="xyz_feedback">
|
9 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
+
<a target="_blank" href="http://xyzscripts.com/support/" class="xyz_suggest">Suggestions</a> -
|
12 |
+
<a target="_blank" href="http://facebook.com/xyzscripts" class="xyz_fbook">Like us on facebook</a> -
|
13 |
+
<a target="_blank" href="http://twitter.com/xyzscripts" class="xyz_twitt">Follow us on twitter</a> -
|
14 |
+
<a target="_blank" href="https://plus.google.com/101215320403235276710/" class="xyz_gplus">+1 us on Google+</a>
|
|
|
|
|
|
|
|
|
15 |
|
|
|
16 |
|
17 |
</div>
|
18 |
+
|
19 |
+
<p></p>
|
20 |
+
|
21 |
+
<div class="xyz_subscribe">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
|
|
|
|
23 |
<script language="javascript">
|
24 |
function check_email(emailString)
|
25 |
{
|
77 |
}
|
78 |
</script>
|
79 |
<?php global $current_user; get_currentuserinfo(); ?>
|
80 |
+
<form action="http://xyzscripts.com/newsletter/index.php?page=list/subscribe" method="post" name="email_subscription" id="email_subscription" >
|
81 |
<input type="hidden" name="fieldNameIds" value="1,">
|
82 |
+
<input type="hidden" name="redirActive" value="http://xyzscripts.com/subscription/pending/XYZWPIHSFRE">
|
83 |
+
<input type="hidden" name="redirPending" value="http://xyzscripts.com/subscription/active/XYZWPIHSFRE">
|
84 |
<input type="hidden" name="mode" value="1">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
+
<b>Stay tuned to our updates :</b>
|
87 |
+
|
88 |
|
89 |
+
Name :
|
|
|
|
|
|
|
90 |
<input style="border: 1px solid #3fafe3; margin-right:10px;" type="text" name="field1" value="<?php
|
91 |
if ($current_user->user_firstname != "" || $current_user->user_lastname != "")
|
92 |
{
|
100 |
{
|
101 |
echo $current_user->user_login;
|
102 |
}
|
103 |
+
?>" >
|
104 |
+
|
105 |
+
Email Address :
|
|
|
|
|
106 |
<input style="border: 1px solid #3fafe3;" name="email"
|
107 |
+
type="text" value="<?php echo $current_user->user_email; ?>" /><span style="color:#FF0000">*</span>
|
108 |
+
|
109 |
+
|
110 |
+
<input id="submit_ihs" style="color:#FFFFFF;border-radius:4px;border:1px solid #1A87B9;" type="submit" value="Subscribe" name="Submit" onclick="javascript: if(!verify_fields()) return false; " />
|
111 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
<input type="hidden" name="listName" value="6,1,"/>
|
113 |
</form>
|
|
|
114 |
|
115 |
|
116 |
|
117 |
</div>
|
118 |
+
|
|
|
|
|
|
|
119 |
|
120 |
<div style="clear: both;"></div>
|
121 |
+
<div style="width: 100%">
|
122 |
+
|
123 |
+
<div class="xyz_our_plugins">
|
|
|
|
|
124 |
See Also :
|
125 |
+
|
126 |
+
<a target="_blank" href="http://wordpress.org/extend/plugins/lightbox-pop/">Lightbox Pop</a> ★
|
127 |
+
<a target="_blank" href="http://wordpress.org/extend/plugins/full-screen-popup/">Full Screen Popup</a> ★
|
128 |
+
<a target="_blank" href="http://wordpress.org/extend/plugins/popup-dialog-box/">Popup Dialog Box</a> ★
|
129 |
+
<a target="_blank" href="http://wordpress.org/extend/plugins/quick-bar/">Quick Bar</a> ★
|
130 |
+
<a target="_blank" href="http://wordpress.org/extend/plugins/quick-box-popup/">Quick Box Popup</a> ★
|
131 |
+
<a target="_blank" href="http://wordpress.org/extend/plugins/contact-form-manager/">Contact Form Manager</a> ★
|
132 |
+
<a target="_blank" href="http://wordpress.org/extend/plugins/newsletter-manager/">Newsletter Manager</a> ★
|
133 |
+
<a target="_blank" href="http://wordpress.org/extend/plugins/social-media-auto-publish/">Social Media Auto Publish</a>
|
134 |
|
135 |
</div>
|
136 |
</div>
|
137 |
+
<div class="poweredBy">
|
138 |
+
Powered by <a href="http://xyzscripts.com" target="_blank">XYZScripts</a>
|
139 |
+
</div>
|
140 |
<div style="clear: both;"></div>
|
141 |
|
142 |
</div>
|
admin/header.php
CHANGED
@@ -11,27 +11,23 @@ if(get_option('xyz_credit_link')=="0"){
|
|
11 |
|
12 |
Please do a favour by enabling backlink to our site. <a id="xyz_ihs_backlink" style="cursor: pointer;" >Okay, Enable</a>.
|
13 |
<script type="text/javascript">
|
14 |
-
|
|
|
15 |
|
16 |
jQuery('#xyz_ihs_backlink').click(function() {
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
url: "<?php echo plugins_url('insert-html-snippet/admin/ajax-backlink.php') ?>",
|
22 |
-
data: 'enable=1',
|
23 |
-
cache: false,
|
24 |
-
success: function(html)
|
25 |
-
{
|
26 |
-
jQuery("#xyz_backlink_div").html('Thank you for enabling backlink !');
|
27 |
-
jQuery("#xyz_backlink_div").css('background-color', '#D8E8DA');
|
28 |
-
jQuery("#xyz_backlink_div").css('border', '1px solid #0F801C');
|
29 |
-
}
|
30 |
-
});
|
31 |
-
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
});
|
34 |
-
|
35 |
</script>
|
36 |
</div>
|
37 |
<?php
|
11 |
|
12 |
Please do a favour by enabling backlink to our site. <a id="xyz_ihs_backlink" style="cursor: pointer;" >Okay, Enable</a>.
|
13 |
<script type="text/javascript">
|
14 |
+
|
15 |
+
jQuery(document).ready(function() {
|
16 |
|
17 |
jQuery('#xyz_ihs_backlink').click(function() {
|
18 |
+
var dataString = {
|
19 |
+
action: 'ajax_backlink',
|
20 |
+
enable: 1
|
21 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
jQuery.post(ajaxurl, dataString, function(response) {
|
24 |
+
jQuery("#xyz_backlink_div").html('Thank you for enabling backlink !');
|
25 |
+
jQuery("#xyz_backlink_div").css('background-color', '#D8E8DA');
|
26 |
+
jQuery("#xyz_backlink_div").css('border', '1px solid #0F801C');
|
27 |
+
});
|
28 |
+
});
|
29 |
});
|
30 |
+
|
31 |
</script>
|
32 |
</div>
|
33 |
<?php
|
admin/install.php
CHANGED
@@ -1,5 +1,26 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
function xyz_ihs_install(){
|
4 |
|
5 |
global $wpdb;
|
@@ -12,16 +33,20 @@ function xyz_ihs_install(){
|
|
12 |
}
|
13 |
|
14 |
add_option('xyz_ihs_limit',20);
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
$wpdb->query($queryInsertHtml);
|
25 |
}
|
26 |
|
27 |
-
register_activation_hook(XYZ_INSERT_HTML_PLUGIN_FILE,'
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
function xyz_ihs_network_install($networkwide) {
|
4 |
+
global $wpdb;
|
5 |
+
|
6 |
+
if (function_exists('is_multisite') && is_multisite()) {
|
7 |
+
// check if it is a network activation - if so, run the activation function for each blog id
|
8 |
+
if ($networkwide) {
|
9 |
+
$old_blog = $wpdb->blogid;
|
10 |
+
// Get all blog ids
|
11 |
+
$blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
|
12 |
+
foreach ($blogids as $blog_id) {
|
13 |
+
switch_to_blog($blog_id);
|
14 |
+
xyz_ihs_install();
|
15 |
+
}
|
16 |
+
switch_to_blog($old_blog);
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
xyz_ihs_install();
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
function xyz_ihs_install(){
|
25 |
|
26 |
global $wpdb;
|
33 |
}
|
34 |
|
35 |
add_option('xyz_ihs_limit',20);
|
36 |
+
$queryInsertHtml = "CREATE TABLE IF NOT EXISTS ".$wpdb->prefix."xyz_ihs_short_code (
|
37 |
+
`id` int NOT NULL AUTO_INCREMENT,
|
38 |
+
`title` varchar(1000) COLLATE utf8_unicode_ci NOT NULL,
|
39 |
+
`content` longtext COLLATE utf8_unicode_ci NOT NULL,
|
40 |
+
`short_code` varchar(2000) COLLATE utf8_unicode_ci NOT NULL,
|
41 |
+
`status` int NOT NULL,
|
42 |
+
PRIMARY KEY (`id`)
|
43 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
|
44 |
+
$wpdb->query($queryInsertHtml);
|
|
|
45 |
}
|
46 |
|
47 |
+
register_activation_hook( XYZ_INSERT_HTML_PLUGIN_FILE ,'xyz_ihs_network_install');
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
|
52 |
+
|
admin/menu.php
CHANGED
@@ -69,17 +69,16 @@ if(is_admin()){
|
|
69 |
wp_register_script( 'xyz_notice_script', plugins_url('insert-html-snippet/js/notice.js') );
|
70 |
wp_enqueue_script( 'xyz_notice_script' );
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
79 |
|
80 |
}
|
81 |
-
add_action('admin_print_styles', 'xyz_ihs_admin_style');
|
82 |
-
|
83 |
|
84 |
|
85 |
?>
|
69 |
wp_register_script( 'xyz_notice_script', plugins_url('insert-html-snippet/js/notice.js') );
|
70 |
wp_enqueue_script( 'xyz_notice_script' );
|
71 |
|
72 |
+
// wp_register_style( 'xyz_ihs_style', plugins_url('insert-html-snippet/css/xyz_ihs_styles.css'));
|
73 |
+
// wp_enqueue_style( 'xyz_ihs_style');
|
74 |
+
function xyz_ihs_add_style(){
|
75 |
+
// Register stylesheets
|
76 |
+
wp_register_style('xyz_ihs_style', plugins_url('insert-html-snippet/css/xyz_ihs_styles.css'));
|
77 |
+
wp_enqueue_style('xyz_ihs_style');
|
78 |
+
}
|
79 |
+
add_action('init', 'xyz_ihs_add_style');
|
80 |
|
81 |
}
|
|
|
|
|
82 |
|
83 |
|
84 |
?>
|
admin/settings.php
CHANGED
@@ -36,11 +36,11 @@ $_POST = stripslashes_deep($_POST);
|
|
36 |
|
37 |
<div>
|
38 |
|
39 |
-
|
40 |
<form method="post">
|
41 |
<div style="float: left;width: 98%">
|
42 |
<fieldset style=" width:100%; border:1px solid #F7F7F7; padding:10px 0px 15px 10px;">
|
43 |
-
<legend >
|
44 |
<table class="widefat" style="width:99%;">
|
45 |
<tr valign="top">
|
46 |
<td scope="row" ><label for="xyz_ihs_credit">Credit link to author</label>
|
@@ -54,30 +54,23 @@ $_POST = stripslashes_deep($_POST);
|
|
54 |
</select>
|
55 |
</td>
|
56 |
</tr>
|
|
|
57 |
<tr valign="top">
|
58 |
-
<td scope="row" class=" settingInput" id="
|
59 |
-
|
60 |
-
<td id="bottomBorderNone"><input name="xyz_ihs_limit" type="text"
|
61 |
id="xyz_ihs_limit" value="<?php if(isset($_POST['xyz_ihs_limit']) ){echo abs(intval($_POST['xyz_ihs_limit']));}else{print(get_option('xyz_ihs_limit'));} ?>" />
|
62 |
</td>
|
63 |
</tr>
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
<legend></legend>
|
70 |
-
<table class="widefat" style="width:99%; margin-top:10px;">
|
71 |
-
<tr>
|
72 |
-
<td colspan=2 id="bottomBorderNone" style="text-align: center;">
|
73 |
-
<div style="height:50px;"><input style="margin:10px 0 20px 0;" id="submit" class="button-primary bottonWidth" type="submit" value=" Update Settings " /></div>
|
74 |
-
|
75 |
</td>
|
76 |
</tr>
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
|
82 |
</div>
|
83 |
|
36 |
|
37 |
<div>
|
38 |
|
39 |
+
|
40 |
<form method="post">
|
41 |
<div style="float: left;width: 98%">
|
42 |
<fieldset style=" width:100%; border:1px solid #F7F7F7; padding:10px 0px 15px 10px;">
|
43 |
+
<legend ><h3>Settings</h3></legend>
|
44 |
<table class="widefat" style="width:99%;">
|
45 |
<tr valign="top">
|
46 |
<td scope="row" ><label for="xyz_ihs_credit">Credit link to author</label>
|
54 |
</select>
|
55 |
</td>
|
56 |
</tr>
|
57 |
+
|
58 |
<tr valign="top">
|
59 |
+
<td scope="row" class=" settingInput" id=""><label for="xyz_ihs_limit">Pagination limit</label></td>
|
60 |
+
<td id=""><input name="xyz_ihs_limit" type="text"
|
|
|
61 |
id="xyz_ihs_limit" value="<?php if(isset($_POST['xyz_ihs_limit']) ){echo abs(intval($_POST['xyz_ihs_limit']));}else{print(get_option('xyz_ihs_limit'));} ?>" />
|
62 |
</td>
|
63 |
</tr>
|
64 |
|
65 |
+
<tr valign="top">
|
66 |
+
<td scope="row" class=" settingInput" id="bottomBorderNone">
|
67 |
+
</td>
|
68 |
+
<td id="bottomBorderNone"><input style="margin:10px 0 20px 0;" id="submit" class="button-primary bottonWidth" type="submit" value=" Update Settings " />
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
</td>
|
70 |
</tr>
|
71 |
|
72 |
+
</table>
|
73 |
+
</fieldset>
|
|
|
74 |
|
75 |
</div>
|
76 |
|
admin/snippets.php
CHANGED
@@ -64,19 +64,19 @@ id="system_notice_area_dismiss">Dismiss</span>
|
|
64 |
<form method="post">
|
65 |
<fieldset
|
66 |
style="width: 99%; border: 1px solid #F7F7F7; padding: 10px 0px;">
|
67 |
-
<legend>HTML Snippets</legend>
|
68 |
<?php
|
69 |
global $wpdb;
|
70 |
$pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 1;
|
71 |
-
$limit =
|
72 |
$offset = ( $pagenum - 1 ) * $limit;
|
73 |
|
74 |
|
75 |
$entries = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."xyz_ihs_short_code ORDER BY id DESC LIMIT $offset,$limit" );
|
76 |
|
77 |
?>
|
78 |
-
<input
|
79 |
-
style="cursor: pointer; margin-bottom:10px;" type="button"
|
80 |
name="textFieldButton2" value="Add New HTML Snippet"
|
81 |
onClick='document.location.href="<?php echo admin_url('admin.php?page=insert-html-snippet-manage&action=snippet-add');?>"'>
|
82 |
<table class="widefat" style="width: 99%; margin: 0 auto; border-bottom:none;">
|
@@ -162,25 +162,22 @@ id="system_notice_area_dismiss">Dismiss</span>
|
|
162 |
</tbody>
|
163 |
</table>
|
164 |
|
165 |
-
<input
|
166 |
-
style="cursor: pointer; margin-top:10px;" type="button"
|
167 |
name="textFieldButton2" value="Add New HTML Snippet"
|
168 |
onClick='document.location.href="<?php echo admin_url('admin.php?page=insert-html-snippet-manage&action=snippet-add');?>"'>
|
169 |
|
170 |
-
<?
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
$total = $wpdb->get_var( "SELECT COUNT(`id`) FROM ".$wpdb->prefix."xyz_ihs_short_code" );
|
175 |
$num_of_pages = ceil( $total / $limit );
|
176 |
|
177 |
$page_links = paginate_links( array(
|
178 |
'base' => add_query_arg( 'pagenum','%#%'),
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
) );
|
185 |
|
186 |
|
64 |
<form method="post">
|
65 |
<fieldset
|
66 |
style="width: 99%; border: 1px solid #F7F7F7; padding: 10px 0px;">
|
67 |
+
<legend><h3>HTML Snippets</h3></legend>
|
68 |
<?php
|
69 |
global $wpdb;
|
70 |
$pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 1;
|
71 |
+
$limit = get_option('xyz_ihs_limit');
|
72 |
$offset = ( $pagenum - 1 ) * $limit;
|
73 |
|
74 |
|
75 |
$entries = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."xyz_ihs_short_code ORDER BY id DESC LIMIT $offset,$limit" );
|
76 |
|
77 |
?>
|
78 |
+
<input id="submit_ihs"
|
79 |
+
style="cursor: pointer; margin-bottom:10px; margin-left:8px;" type="button"
|
80 |
name="textFieldButton2" value="Add New HTML Snippet"
|
81 |
onClick='document.location.href="<?php echo admin_url('admin.php?page=insert-html-snippet-manage&action=snippet-add');?>"'>
|
82 |
<table class="widefat" style="width: 99%; margin: 0 auto; border-bottom:none;">
|
162 |
</tbody>
|
163 |
</table>
|
164 |
|
165 |
+
<input id="submit_ihs"
|
166 |
+
style="cursor: pointer; margin-top:10px;margin-left:8px;" type="button"
|
167 |
name="textFieldButton2" value="Add New HTML Snippet"
|
168 |
onClick='document.location.href="<?php echo admin_url('admin.php?page=insert-html-snippet-manage&action=snippet-add');?>"'>
|
169 |
|
170 |
+
<?php
|
|
|
|
|
|
|
171 |
$total = $wpdb->get_var( "SELECT COUNT(`id`) FROM ".$wpdb->prefix."xyz_ihs_short_code" );
|
172 |
$num_of_pages = ceil( $total / $limit );
|
173 |
|
174 |
$page_links = paginate_links( array(
|
175 |
'base' => add_query_arg( 'pagenum','%#%'),
|
176 |
+
'format' => '',
|
177 |
+
'prev_text' => '«',
|
178 |
+
'next_text' => '»',
|
179 |
+
'total' => $num_of_pages,
|
180 |
+
'current' => $pagenum
|
181 |
) );
|
182 |
|
183 |
|
admin/style.php
DELETED
@@ -1,138 +0,0 @@
|
|
1 |
-
<?php require_once( dirname( __FILE__ ) .'/../../../../wp-load.php'); ?>
|
2 |
-
<style type="text/css">
|
3 |
-
|
4 |
-
#system_notice_area {
|
5 |
-
position: fixed;
|
6 |
-
margin-bottom:40px;
|
7 |
-
left:25%;
|
8 |
-
width:50%;
|
9 |
-
height:20px;
|
10 |
-
border-radius:5px;
|
11 |
-
-moz-border-radius:5px;
|
12 |
-
-webkit-border-radius:5px;
|
13 |
-
font-weight:bold;
|
14 |
-
display:none;
|
15 |
-
padding:5px;
|
16 |
-
color: #000000;
|
17 |
-
text-align: center;
|
18 |
-
<?php
|
19 |
-
if(function_exists('is_admin_bar_showing') && is_admin_bar_showing()){
|
20 |
-
?>
|
21 |
-
top :28px;
|
22 |
-
<?php
|
23 |
-
}else{
|
24 |
-
?>
|
25 |
-
top: 0px;
|
26 |
-
<?php
|
27 |
-
}
|
28 |
-
?>
|
29 |
-
|
30 |
-
|
31 |
-
}
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
.xyz_fbook{
|
36 |
-
|
37 |
-
background-image: url('<?php echo plugins_url("images/facebook.png",__FILE__) ?>');
|
38 |
-
height:16px;
|
39 |
-
background-repeat: no-repeat;
|
40 |
-
background-position: left center;
|
41 |
-
padding-left: 15px;
|
42 |
-
text-decoration: none;
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
}
|
47 |
-
.xyz_support{
|
48 |
-
|
49 |
-
background-image: url('<?php echo plugins_url("images/support.png",__FILE__) ?>');
|
50 |
-
height:16px;
|
51 |
-
background-repeat: no-repeat;
|
52 |
-
background-position: left center;
|
53 |
-
padding-left: 15px;
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
}
|
59 |
-
.xyz_twitt{
|
60 |
-
|
61 |
-
background-image: url('<?php echo plugins_url("images/twitter.png",__FILE__) ?>');
|
62 |
-
height:16px;
|
63 |
-
background-repeat: no-repeat;
|
64 |
-
background-position: left center;
|
65 |
-
padding-left: 15px;
|
66 |
-
text-decoration: none;
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
}
|
71 |
-
.xyz_gplus{
|
72 |
-
|
73 |
-
background-image: url('<?php echo plugins_url("images/gplus.png",__FILE__) ?>');
|
74 |
-
height:16px;
|
75 |
-
background-repeat: no-repeat;
|
76 |
-
background-position: left center;
|
77 |
-
padding-left: 15px;
|
78 |
-
text-decoration: none;
|
79 |
-
|
80 |
-
|
81 |
-
}
|
82 |
-
|
83 |
-
|
84 |
-
#insert-html-snippet .xyz_gplus{
|
85 |
-
margin-left: 3px;
|
86 |
-
}
|
87 |
-
|
88 |
-
#insert-html-snippet .plugin-version-author-uri {
|
89 |
-
|
90 |
-
background-color: #F4F4F4;
|
91 |
-
min-height:16px;
|
92 |
-
border-radius:5px;
|
93 |
-
margin-bottom: 10px;
|
94 |
-
font-weight:bold;
|
95 |
-
padding: 5px;
|
96 |
-
color: #111111;
|
97 |
-
|
98 |
-
-webkit-box-shadow: 0 8px 6px -6px black;
|
99 |
-
-moz-box-shadow: 0 8px 6px -6px black;
|
100 |
-
box-shadow: 0 8px 6px -6px black;
|
101 |
-
|
102 |
-
}
|
103 |
-
#insert-html-snippet{
|
104 |
-
background: #a9e8f5; /* Old browsers */
|
105 |
-
|
106 |
-
background: -moz-linear-gradient(top, #ffffff 0%, #a9e8f5 100%); /* FF3.6+ */
|
107 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#a9e8f5)); /* Chrome,Safari4+ */
|
108 |
-
background: -webkit-linear-gradient(top, #ffffff 0%,#a9e8f5 100%); /* Chrome10+,Safari5.1+ */
|
109 |
-
background: -o-linear-gradient(top, #ffffff 0%,#a9e8f5 100%); /* Opera 11.10+ */
|
110 |
-
background: -ms-linear-gradient(top, #ffffff 0%,#a9e8f5 100%); /* IE10+ */
|
111 |
-
background: linear-gradient(top, #ffffff 0%,#a9e8f5 100%); /* W3C */
|
112 |
-
|
113 |
-
|
114 |
-
}
|
115 |
-
#insert-html-snippet .plugin-version-author-uri a,
|
116 |
-
#insert-html-snippet .plugin-version-author-uri a:link,
|
117 |
-
#insert-html-snippet .plugin-version-author-uri a:hover,
|
118 |
-
#insert-html-snippet .plugin-version-author-uri a:active,
|
119 |
-
#insert-html-snippet .plugin-version-author-uri a:visited{
|
120 |
-
|
121 |
-
|
122 |
-
color: #111111;
|
123 |
-
text-decoration: none;
|
124 |
-
|
125 |
-
}
|
126 |
-
#insert-html-snippet .plugin-version-author-uri a:hover{
|
127 |
-
|
128 |
-
color:#cc811a;
|
129 |
-
}
|
130 |
-
#insert-html-snippet .plugin-title{
|
131 |
-
|
132 |
-
background-image: url('<?php echo plugins_url("images/xyz_logo.png",__FILE__) ?>');
|
133 |
-
background-repeat: no-repeat;
|
134 |
-
background-position: left bottom;
|
135 |
-
|
136 |
-
}
|
137 |
-
|
138 |
-
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/uninstall.php
CHANGED
@@ -1,5 +1,25 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
function xyz_ihs_uninstall(){
|
4 |
|
5 |
global $wpdb;
|
@@ -11,5 +31,6 @@ $wpdb->query("DROP TABLE ".$wpdb->prefix."xyz_ihs_short_code");
|
|
11 |
|
12 |
|
13 |
}
|
14 |
-
|
|
|
15 |
?>
|
1 |
<?php
|
2 |
|
3 |
+
function xyz_ihs_network_uninstall($networkwide) {
|
4 |
+
global $wpdb;
|
5 |
+
|
6 |
+
if (function_exists('is_multisite') && is_multisite()) {
|
7 |
+
// check if it is a network activation - if so, run the activation function for each blog id
|
8 |
+
if ($networkwide) {
|
9 |
+
$old_blog = $wpdb->blogid;
|
10 |
+
// Get all blog ids
|
11 |
+
$blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
|
12 |
+
foreach ($blogids as $blog_id) {
|
13 |
+
switch_to_blog($blog_id);
|
14 |
+
xyz_ihs_uninstall();
|
15 |
+
}
|
16 |
+
switch_to_blog($old_blog);
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
xyz_ihs_uninstall();
|
21 |
+
}
|
22 |
+
|
23 |
function xyz_ihs_uninstall(){
|
24 |
|
25 |
global $wpdb;
|
31 |
|
32 |
|
33 |
}
|
34 |
+
|
35 |
+
register_uninstall_hook( XYZ_INSERT_HTML_PLUGIN_FILE, 'xyz_ihs_network_uninstall' );
|
36 |
?>
|
ajax-handler.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once( dirname( __FILE__ ) . '/admin/ajax-backlink.php' );
|
4 |
+
|
5 |
+
?>
|
css/xyz_ihs_styles.css
CHANGED
@@ -2,15 +2,19 @@
|
|
2 |
#system_notice_area_dismiss{
|
3 |
color: #FFFFFF;
|
4 |
cursor: pointer;
|
|
|
5 |
}
|
6 |
.system_notice_area_style1 {
|
7 |
background: #00C348;
|
8 |
border: 1px solid green;
|
|
|
9 |
}
|
10 |
|
11 |
.system_notice_area_style0 {
|
12 |
background: #FA5A6A;
|
13 |
border: 1px solid brown;
|
|
|
|
|
14 |
}
|
15 |
|
16 |
|
@@ -59,4 +63,200 @@ legend{
|
|
59 |
}
|
60 |
#content_xyz_ihs_snippet_selecterList_text{
|
61 |
width:90px;
|
62 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
#system_notice_area_dismiss{
|
3 |
color: #FFFFFF;
|
4 |
cursor: pointer;
|
5 |
+
z-index:100000;
|
6 |
}
|
7 |
.system_notice_area_style1 {
|
8 |
background: #00C348;
|
9 |
border: 1px solid green;
|
10 |
+
z-index:100000;
|
11 |
}
|
12 |
|
13 |
.system_notice_area_style0 {
|
14 |
background: #FA5A6A;
|
15 |
border: 1px solid brown;
|
16 |
+
z-index:100000;
|
17 |
+
|
18 |
}
|
19 |
|
20 |
|
63 |
}
|
64 |
#content_xyz_ihs_snippet_selecterList_text{
|
65 |
width:90px;
|
66 |
+
}
|
67 |
+
|
68 |
+
/*admin style*/
|
69 |
+
|
70 |
+
#system_notice_area {
|
71 |
+
position: fixed;
|
72 |
+
margin-bottom:40px;
|
73 |
+
left:25%;
|
74 |
+
width:50%;
|
75 |
+
height:20px;
|
76 |
+
border-radius:5px;
|
77 |
+
-moz-border-radius:5px;
|
78 |
+
-webkit-border-radius:5px;
|
79 |
+
font-weight:bold;
|
80 |
+
display:none;
|
81 |
+
padding:3px;
|
82 |
+
color: #000000;
|
83 |
+
text-align: center;
|
84 |
+
top: 0px;
|
85 |
+
z-index:100000;
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
.xyz_suggest,.xyz_star,.xyz_donate,.xyz_fbook,.xyz_support,.xyz_twitt,.xyz_gplus{
|
90 |
+
height:16px;
|
91 |
+
background-repeat: no-repeat;
|
92 |
+
background-position: left center;
|
93 |
+
padding-left: 20px;
|
94 |
+
text-decoration: none;
|
95 |
+
|
96 |
+
vertical-align: middle;
|
97 |
+
display: inline-block;
|
98 |
+
|
99 |
+
}
|
100 |
+
|
101 |
+
.xyz_suggest{
|
102 |
+
|
103 |
+
background-image: url('../images/suggest.png');
|
104 |
+
}
|
105 |
+
|
106 |
+
.xyz_star{
|
107 |
+
background-image: url('../images/star.png');
|
108 |
+
}
|
109 |
+
|
110 |
+
.xyz_donate{
|
111 |
+
|
112 |
+
background-image: url('../images/donate.png');
|
113 |
+
}
|
114 |
+
|
115 |
+
|
116 |
+
.xyz_fbook{
|
117 |
+
|
118 |
+
background-image: url('../images/facebook.png');
|
119 |
+
}
|
120 |
+
.xyz_support{
|
121 |
+
|
122 |
+
background-image: url('../images/support.png');
|
123 |
+
}
|
124 |
+
.xyz_twitt{
|
125 |
+
|
126 |
+
background-image: url('../images/twitter.png');
|
127 |
+
}
|
128 |
+
.xyz_gplus{
|
129 |
+
|
130 |
+
background-image: url('../images/gplus.png');
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
+
#insert-html-snippet .xyz_gplus{
|
135 |
+
margin-left: 3px;
|
136 |
+
}
|
137 |
+
|
138 |
+
#insert-html-snippet .plugin-version-author-uri {
|
139 |
+
|
140 |
+
background-color: #F4F4F4;
|
141 |
+
min-height:16px;
|
142 |
+
border-radius:5px;
|
143 |
+
margin-bottom: 10px;
|
144 |
+
font-weight:bold;
|
145 |
+
padding: 5px;
|
146 |
+
color: #111111;
|
147 |
+
|
148 |
+
-webkit-box-shadow: 0 8px 6px -6px black;
|
149 |
+
-moz-box-shadow: 0 8px 6px -6px black;
|
150 |
+
box-shadow: 0 8px 6px -6px black;
|
151 |
+
|
152 |
+
}
|
153 |
+
#insert-html-snippet{
|
154 |
+
background: #a9e8f5; /* Old browsers */
|
155 |
+
|
156 |
+
background: -moz-linear-gradient(top, #ffffff 0%, #a9e8f5 100%); /* FF3.6+ */
|
157 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#a9e8f5)); /* Chrome,Safari4+ */
|
158 |
+
background: -webkit-linear-gradient(top, #ffffff 0%,#a9e8f5 100%); /* Chrome10+,Safari5.1+ */
|
159 |
+
background: -o-linear-gradient(top, #ffffff 0%,#a9e8f5 100%); /* Opera 11.10+ */
|
160 |
+
background: -ms-linear-gradient(top, #ffffff 0%,#a9e8f5 100%); /* IE10+ */
|
161 |
+
background: linear-gradient(top, #ffffff 0%,#a9e8f5 100%); /* W3C */
|
162 |
+
|
163 |
+
|
164 |
+
}
|
165 |
+
#insert-html-snippet .plugin-version-author-uri a,
|
166 |
+
#insert-html-snippet .plugin-version-author-uri a:link,
|
167 |
+
#insert-html-snippet .plugin-version-author-uri a:hover,
|
168 |
+
#insert-html-snippet .plugin-version-author-uri a:active,
|
169 |
+
#insert-html-snippet .plugin-version-author-uri a:visited{
|
170 |
+
|
171 |
+
|
172 |
+
color: #111111;
|
173 |
+
text-decoration: none;
|
174 |
+
|
175 |
+
}
|
176 |
+
#insert-html-snippet .plugin-version-author-uri a:hover{
|
177 |
+
|
178 |
+
color:#cc811a;
|
179 |
+
}
|
180 |
+
#insert-html-snippet .plugin-title{
|
181 |
+
|
182 |
+
background-image: url('../images/xyz_logo.png');
|
183 |
+
background-repeat: no-repeat;
|
184 |
+
background-position: left bottom;
|
185 |
+
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
#submit_ihs{
|
190 |
+
background:#25A6E1;
|
191 |
+
background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
|
192 |
+
background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0));
|
193 |
+
background:-webkit-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
|
194 |
+
background:-o-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
|
195 |
+
background:-ms-linear-gradient(top,#25A6E1 0%,#188BC0 100%);
|
196 |
+
background:linear-gradient(top,#25A6E1 0%,#188BC0 100%);
|
197 |
+
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#25A6E1",endColorstr="#188BC0",GradientType=0);
|
198 |
+
padding:1px 13px;
|
199 |
+
color:#ffffff;
|
200 |
+
font-family:"Helvetica Neue",sans-serif;
|
201 |
+
font-size:15px;
|
202 |
+
cursor:pointer;
|
203 |
+
border: 1px solid #1A87B9;
|
204 |
+
border-radius: 4px 4px 4px 4px;
|
205 |
+
font-weight: normal;
|
206 |
+
font-size: 13px;
|
207 |
+
}
|
208 |
+
|
209 |
+
.xyz_our_plugins{
|
210 |
+
background: #F2F2F2; /* Old browsers */
|
211 |
+
border: 1px solid #DFDFDF;
|
212 |
+
border-radius:3px;
|
213 |
+
width: 98%;
|
214 |
+
padding-left: 10px;
|
215 |
+
padding-top:10px;
|
216 |
+
height:30px;
|
217 |
+
margin-top:13px;
|
218 |
+
}
|
219 |
+
|
220 |
+
.xyz_our_plugins a{
|
221 |
+
text-decoration: none;
|
222 |
+
}
|
223 |
+
|
224 |
+
.poweredBy{
|
225 |
+
padding-top: 10px;float:left; text-align: center; width: 100%;
|
226 |
+
}
|
227 |
+
|
228 |
+
.poweredBy a{
|
229 |
+
text-decoration: none;
|
230 |
+
}
|
231 |
+
|
232 |
+
.xyz_feedback{
|
233 |
+
background: #CEEAF7; /* Old browsers */
|
234 |
+
border: 1px solid #64cfe8;
|
235 |
+
border-radius:3px;
|
236 |
+
width: 98%;
|
237 |
+
height:30px;
|
238 |
+
padding-top:10px;
|
239 |
+
padding-left: 10px;
|
240 |
+
font-weight: bold;
|
241 |
+
line-height: 20px;
|
242 |
+
}
|
243 |
+
|
244 |
+
|
245 |
+
.xyz_feedback a{
|
246 |
+
text-decoration: none
|
247 |
+
}
|
248 |
+
|
249 |
+
|
250 |
+
.xyz_subscribe{
|
251 |
+
background: #bae598; /* Old browsers */
|
252 |
+
border: 1px solid #4d8a1d;
|
253 |
+
border-radius:3px;
|
254 |
+
width: 98%;
|
255 |
+
height:35px;
|
256 |
+
padding-top:10px;
|
257 |
+
padding-left: 10px;
|
258 |
+
}
|
259 |
+
.xyz_subscribe td{
|
260 |
+
padding:0;
|
261 |
+
}
|
262 |
+
|
direct_call.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function xyz_ihs_plugin_query_vars($vars) {
|
3 |
+
$vars[] = 'wp_ihs';
|
4 |
+
return $vars;
|
5 |
+
}
|
6 |
+
add_filter('query_vars', 'xyz_ihs_plugin_query_vars');
|
7 |
+
|
8 |
+
|
9 |
+
function xyz_ihs_plugin_parse_request($wp) {
|
10 |
+
/*confirmation*/
|
11 |
+
if (array_key_exists('wp_ihs', $wp->query_vars) && $wp->query_vars['wp_ihs'] == 'editor_plugin_js') {
|
12 |
+
require( dirname( __FILE__ ) . '/editor_plugin.js.php' );
|
13 |
+
die;
|
14 |
+
}
|
15 |
+
|
16 |
+
}
|
17 |
+
add_action('parse_request', 'xyz_ihs_plugin_parse_request');
|
editor_plugin.js.php
CHANGED
@@ -1,7 +1,4 @@
|
|
1 |
<?php
|
2 |
-
require_once('../../../wp-load.php');
|
3 |
-
require_once('../../../wp-admin/includes/admin.php');
|
4 |
-
do_action('admin_init');
|
5 |
|
6 |
if ( ! is_user_logged_in() )
|
7 |
die('You must be logged in to access this script.');
|
1 |
<?php
|
|
|
|
|
|
|
2 |
|
3 |
if ( ! is_user_logged_in() )
|
4 |
die('You must be logged in to access this script.');
|
{admin/images → images}/facebook.png
RENAMED
File without changes
|
{admin/images → images}/gplus.png
RENAMED
File without changes
|
images/suggest.png
ADDED
Binary file
|
{admin/images → images}/support.png
RENAMED
File without changes
|
{admin/images → images}/twitter.png
RENAMED
File without changes
|
{admin/images → images}/xyz_logo.png
RENAMED
File without changes
|
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.0
|
7 |
Author: xyzscripts.com
|
8 |
Author URI: http://xyzscripts.com/
|
9 |
Text Domain: insert-html-snippet
|
@@ -47,10 +47,14 @@ require( dirname( __FILE__ ) . '/admin/menu.php' );
|
|
47 |
|
48 |
require( dirname( __FILE__ ) . '/shortcode-handler.php' );
|
49 |
|
|
|
|
|
50 |
require( dirname( __FILE__ ) . '/admin/uninstall.php' );
|
51 |
|
52 |
require( dirname( __FILE__ ) . '/widget.php' );
|
53 |
|
|
|
|
|
54 |
|
55 |
|
56 |
if(get_option('xyz_credit_link')=="ihs"){
|
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.0.1
|
7 |
Author: xyzscripts.com
|
8 |
Author URI: http://xyzscripts.com/
|
9 |
Text Domain: insert-html-snippet
|
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 |
|
59 |
|
60 |
if(get_option('xyz_credit_link')=="ihs"){
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Donate link: http://xyzscripts.com/donate/
|
|
4 |
|
5 |
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
|
6 |
Requires at least: 2.8
|
7 |
-
Tested up to: 3.
|
8 |
-
Stable tag: 1.0
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Add HTML, CSS and javascript code to your pages and posts easily using shortcodes.
|
@@ -71,11 +71,15 @@ More questions ? [Drop a mail](http://xyzscripts.com/members/support/ "XYZScript
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
74 |
= 1.0 =
|
75 |
* First official launch.
|
76 |
|
77 |
== Upgrade Notice ==
|
78 |
-
|
79 |
|
80 |
== More Information ==
|
81 |
|
4 |
|
5 |
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
|
6 |
Requires at least: 2.8
|
7 |
+
Tested up to: 3.6
|
8 |
+
Stable tag: 1.0.1
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Add HTML, CSS and javascript code to your pages and posts easily using shortcodes.
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 1.0.1 =
|
75 |
+
* Support for network installation
|
76 |
+
* Pagination bug fix
|
77 |
+
|
78 |
= 1.0 =
|
79 |
* First official launch.
|
80 |
|
81 |
== Upgrade Notice ==
|
82 |
+
|
83 |
|
84 |
== More Information ==
|
85 |
|
widget.php
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* XYZScripts Insert HTML Snippet Widget Class
|
4 |
*/
|
5 |
-
require( dirname( __FILE__ ) . '../../../../wp-load.php' );
|
6 |
|
|
|
7 |
|
8 |
class Xyz_Insert_Html_Widget extends WP_Widget {
|
9 |
|
@@ -46,8 +47,19 @@ class Xyz_Insert_Html_Widget extends WP_Widget {
|
|
46 |
global $wpdb;
|
47 |
$entries = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."xyz_ihs_short_code WHERE status='1' ORDER BY id DESC" );
|
48 |
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
?>
|
52 |
<p>
|
53 |
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* XYZScripts Insert HTML Snippet Widget Class
|
5 |
*/
|
|
|
6 |
|
7 |
+
////*****************************Sidebar Widget**********************************////
|
8 |
|
9 |
class Xyz_Insert_Html_Widget extends WP_Widget {
|
10 |
|
47 |
global $wpdb;
|
48 |
$entries = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."xyz_ihs_short_code WHERE status='1' ORDER BY id DESC" );
|
49 |
|
50 |
+
|
51 |
+
if(isset($instance['title'])){
|
52 |
+
$title = esc_attr($instance['title']);
|
53 |
+
}else{
|
54 |
+
$title = '';
|
55 |
+
}
|
56 |
+
|
57 |
+
if(isset($instance['message'])){
|
58 |
+
$message = esc_attr($instance['message']);
|
59 |
+
}else{
|
60 |
+
$message = '';
|
61 |
+
}
|
62 |
+
|
63 |
?>
|
64 |
<p>
|
65 |
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
|