| 1 |
<?php |
| 2 |
function xyz_ips_admin_notice() |
| 3 |
{ |
| 4 |
add_thickbox(); |
| 5 |
$sharelink_text_array_ips = array |
| 6 |
( |
| 7 |
"I use Insert PHP Code Snippet wordpress plugin from @xyzscripts and you should too.", |
| 8 |
"Insert PHP Code Snippet wordpress plugin from @xyzscripts is awesome", |
| 9 |
"Thanks @xyzscripts for developing such a wonderful Insert PHP Code Snippet wordpress plugin", |
| 10 |
"I was looking for a Insert PHP Code Snippet plugin and I found this. Thanks @xyzscripts", |
| 11 |
"Its very easy to use Insert PHP Code Snippet wordpress plugin from @xyzscripts", |
| 12 |
"I installed Insert PHP Code Snippet from @xyzscripts,it works flawlessly", |
| 13 |
"Insert PHP Code Snippet wordpress plugin that i use works terrific", |
| 14 |
"I am using Insert PHP Code Snippet wordpress plugin from @xyzscripts and I like it", |
| 15 |
"The Insert PHP Code Snippet plugin from @xyzscripts is simple and works fine", |
| 16 |
"I've been using this Insert PHP Code Snippet plugin for a while now and it is really good", |
| 17 |
"Insert PHP Code Snippet wordpress plugin is a fantastic plugin", |
| 18 |
"Insert PHP Code Snippet wordpress plugin is easy to use and works great. Thank you!", |
| 19 |
"Good and flexible Insert PHP Code Snippet plugin especially for beginners", |
| 20 |
"The best Insert PHP Code Snippet wordpress plugin I have used ! THANKS @xyzscripts", |
| 21 |
); |
| 22 |
$sharelink_text_ips = array_rand($sharelink_text_array_ips, 1); |
| 23 |
$sharelink_text_ips = $sharelink_text_array_ips[$sharelink_text_ips]; |
| 24 |
$xyz_ips_link = admin_url('admin.php?page=insert-php-code-snippet-settings&ips_blink=en'); |
| 25 |
$xyz_ips_link = wp_nonce_url($xyz_ips_link,'ips-blk'); |
| 26 |
$xyz_ips_notice = admin_url('admin.php?page=insert-php-code-snippet-settings&ips_notice=hide'); |
| 27 |
$xyz_ips_notice = wp_nonce_url($xyz_ips_notice,'ips-shw'); |
| 28 |
|
| 29 |
|
| 30 |
echo '<style> |
| 31 |
#TB_window { width:50% !important; height: 100px !important; |
| 32 |
margin-left: 25% !important; |
| 33 |
left: 0% !important; |
| 34 |
} |
| 35 |
</style> |
| 36 |
<script type="text/javascript"> |
| 37 |
function xyz_ips_shareon_tckbox(){ |
| 38 |
tb_show("Share on","#TB_inline?width=500&height=75&inlineId=show_share_icons_ips&class=thickbox"); |
| 39 |
} |
| 40 |
</script> |
| 41 |
<div id="ips_notice_td" class="error" style="color: #666666;margin-left: 2px; padding: 5px;line-height:16px;"> |
| 42 |
<p>Thank you for using <a href="https://wordpress.org/plugins/insert-php-code-snippet/" target="_blank"> Insert PHP Code Snippet </a> plugin from <a href="https://xyzscripts.com/" target="_blank">xyzscripts.com</a>. Would you consider supporting us with the continued development of the plugin using any of the below methods?</p> |
| 43 |
<p> |
| 44 |
<a href="https://wordpress.org/support/plugin/insert-php-code-snippet/reviews" class="button xyz_ips_rate_btn" target="_blank">Rate it 5� |
| 45 |
\'s on wordpress</a>'; |
| 46 |
if(get_option('xyz_credit_link')=="0") |
| 47 |
echo '<a href="'.$xyz_ips_link.'" class="button xyz_ips_backlink_btn xyz_blink">Enable Backlink</a>'; |
| 48 |
|
| 49 |
echo '<a class="button xyz_ips_share_btn" onclick=xyz_ips_shareon_tckbox();>Share on</a> |
| 50 |
<a href="https://xyzscripts.com/donate/5" class="button xyz_ips_donate_btn" target="_blank">Donate</a> |
| 51 |
|
| 52 |
<a href="'.$xyz_ips_notice.'" class="button xyz_ips_show_btn">Don\'t Show This Again</a> |
| 53 |
</p> |
| 54 |
|
| 55 |
<div id="show_share_icons_ips" style="display: none;"> |
| 56 |
<a class="button" style="background-color:#3b5998;color:white;margin-right:4px;margin-left:100px;margin-top: 25px;" href="http://www.facebook.com/sharer/sharer.php?u=https://wordpress.org/plugins/insert-php-code-snippet/&text='.$sharelink_text_ips.'" target="_blank">Facebook</a> |
| 57 |
<a class="button" style="background-color:#00aced;color:white;margin-right:4px;margin-left:20px;margin-top: 25px;" href="https://twitter.com/share?url=https://wordpress.org/plugins/insert-php-code-snippet/&text='.$sharelink_text_ips.'" target="_blank">Twitter</a> |
| 58 |
<a class="button" style="background-color:#007bb6;color:white;margin-right:4px;margin-left:20px;margin-top: 25px;" href="https://www.linkedin.com/shareArticle?mini=true&url=https://wordpress.org/plugins/insert-php-code-snippet/" target="_blank">LinkedIn</a> |
| 59 |
<a class="button" style="background-color:#dd4b39;color:white;margin-right:4px;margin-left:20px;margin-top: 25px;" href="https://plus.google.com/share?&hl=en&url=https://wordpress.org/plugins/insert-php-code-snippet/" target="_blank">google+</a> |
| 60 |
|
| 61 |
</div> |
| 62 |
</div>'; |
| 63 |
|
| 64 |
|
| 65 |
} |
| 66 |
|
| 67 |
$xyz_ips_installed_date = get_option('xyz_ips_installed_date'); |
| 68 |
if ($xyz_ips_installed_date=="") { |
| 69 |
$xyz_ips_installed_date = time(); |
| 70 |
} |
| 71 |
if($xyz_ips_installed_date < ( time() - (30*24*60*60) )) |
| 72 |
{ |
| 73 |
if (get_option('xyz_ips_dnt_shw_notice') != "hide") |
| 74 |
{ |
| 75 |
add_action('admin_notices', 'xyz_ips_admin_notice'); |
| 76 |
} |
| 77 |
} |
| 78 |
?> |