Changeset 778840
- Timestamp:
- 09/26/2013 03:25:27 PM (11 years ago)
- Location:
- link-to-url-post
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
link-to-url-post/trunk/link-to-url.php
r719083 r778840 4 4 Plugin URI: http://letusbuzz.com/link-to-url-post-plugin/ 5 5 Author: Sudipto Pratap Mahato 6 Version: 1. 26 Version: 1.3 7 7 Description: Hide your long ugly affiliate links with your own short and easy to remember links or redirect your old posts to a new post or external link!! 8 8 Requires at least: 3.0 9 Tested up to: 3. 5.19 Tested up to: 3.6.1 10 10 */ 11 11 12 12 add_action('admin_menu', 'l2u_addmenu'); 13 add_action( 'init', 'l2u_redirect_to' 13 add_action( 'init', 'l2u_redirect_to',1); 14 14 function l2u_redirect_to() 15 15 { … … 72 72 { 73 73 wp_delete_post($did); 74 } 75 if(isset($_GET['resethits'])) 76 { 77 $peid=$_GET['resethits']; 78 if($peid!="") 79 { 80 $sql="UPDATE {$wpdb->posts} SET `comment_count`=0 where `ID`=$peid"; 81 $res = $wpdb->get_results($sql); 82 } 74 83 } 75 84 if(isset( $_POST['Submit'] ))l2u_save();; … … 96 105 97 106 <input type="hidden" name="postid" value="<?php echo $postid; ?>"> 107 <input type="hidden" name="sourceurl2" value="<?php echo $sourceurl; ?>"> 98 108 <p class="submit"> 99 109 <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Redirection') ?>" /> … … 103 113 </form> 104 114 </td> 105 <td width="2 0%"><b>Follow us on</b><br/><a href="http://twitter.com/letusbuzz" target="_blank"><img src="http://a0.twimg.com/a/1303316982/images/twitter_logo_header.png" /></a><br/><a href="http://facebook.com/letusbuzzz" target="_blank"><img src="https://secure-media-sf2p.facebook.com/ads3/creative/pressroom/jpg/b_1234209334_facebook_logo.jpg" height="38px" width="118px"/></a><p></p>115 <td width="25%"><b>Follow us on</b><br/><a href="http://twitter.com/letusbuzz" target="_blank"><img src="http://a0.twimg.com/a/1303316982/images/twitter_logo_header.png" /></a><br/><a href="http://facebook.com/letusbuzzz" target="_blank"><img src="https://secure-media-sf2p.facebook.com/ads3/creative/pressroom/jpg/b_1234209334_facebook_logo.jpg" height="38px" width="118px"/></a><p></p> 106 116 <p></p> 107 117 <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> … … 116 126 <img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" width="1" height="1"> 117 127 </form> 118 <br />Consider a Donation and remember $X is always better than $0 128 <br />Consider a Donation and remember $X is always better than $0<br/> 129 <a href="http://techxt.com/link2url_ad" target="_blank"><img src="http://techxt.com/link2url_ad.png" /></a> 119 130 </td> 120 131 </tr> … … 125 136 function l2u_save() { 126 137 $sourceurl=l2u_remove_front_slash(trim($_POST['sourceurl'])); 138 $sourceurl2=l2u_remove_front_slash(trim($_POST['sourceurl2'])); 127 139 $desturl=trim($_POST['desturl']); 128 140 $postid=trim($_POST['postid']); … … 130 142 if($redtype=="301")$redtype='publish'; else $redtype='draft'; 131 143 if($sourceurl=="" || $desturl=="")return false; 132 $pid=l2u_source_exist($sourceurl); 144 if($sourceurl2!="")$pid=l2u_source_exist($sourceurl2); 145 else $pid=l2u_source_exist($sourceurl); 133 146 if($postid!="" && $postid!=$pid){ 134 147 l2u_display_message("Duplicate Keyword Exist"); … … 191 204 <td style="border:1px solid #eee;padding:2px; word-wrap:break-word;"><?php l2u_list_all_dest($post->post_content); ?></td> 192 205 <td style="border:1px solid #eee;padding:2px;text-align: center;"><?php echo $redtype; ?></td> 193 <td style="border:1px solid #eee;padding:2px;text-align: center;"><?php echo $post->comment_count; ?></td>194 <td style="border:1px solid #eee;padding:2px; "><a href="<?php echo site_url(); ?>/wp-admin/options-general.php?page=l2url&edit=<?php echo $post->ID; ?>">Edit</a></td>195 <td style="border:1px solid #eee;padding:2px; "><ahref="<?php echo site_url(); ?>/wp-admin/options-general.php?page=l2url&delete=<?php echo $post->ID; ?>">Delete</a></td>206 <td style="border:1px solid #eee;padding:2px;text-align: right;"><?php echo $post->comment_count; ?> <a onclick = "if (! confirm('Do you really want to reset hits?')) return false;" href="<?php echo site_url(); ?>/wp-admin/options-general.php?page=l2url&resethits=<?php echo $post->ID; ?>">x</a></td> 207 <td style="border:1px solid #eee;padding:2px;text-align: right;"><a href="<?php echo site_url(); ?>/wp-admin/options-general.php?page=l2url&edit=<?php echo $post->ID; ?>">Edit</a></td> 208 <td style="border:1px solid #eee;padding:2px;text-align: right;"><a onclick = "if (! confirm('Do you really want to delete?')) return false;" href="<?php echo site_url(); ?>/wp-admin/options-general.php?page=l2url&delete=<?php echo $post->ID; ?>">Delete</a></td> 196 209 </tr> 197 210 -
link-to-url-post/trunk/readme.txt
r719083 r778840 4 4 Tags: Link to URL, Link to post, 301 redirect, 302 redirect, Short URL, Hide Link, Post redirection 5 5 Requires at least: 3.0 6 Tested up to: 3. 5.17 Stable tag: 1. 26 Tested up to: 3.6.1 7 Stable tag: 1.3 8 8 9 9 Hide your long ugly affiliate links with your own short and easy to remember links or redirect your old posts to a new post or external link
Note: See TracChangeset
for help on using the changeset viewer.