Modifying Tweet Old Post WordPress Plugin
Today I just want to show you how to modify the WordPress plugin Tweet Old Post.
I wanted to add my new URL shortening service 1click.at to this nice plugin.
Well, it is really very easy to do. Here is what files need to be modified:
1. top-admin.php
2. top-core.php
You can find both files in your wp-content/plugins/tweet-old-post folder.
Open top-admin.php with your favourite editor (in my case Notepad++).
Search for the line (should be line 204)
204 | <select name="top_opt_url_shortener" id="top_opt_url_shortener" onchange="javascript:showURLAPI()" style="width:100px;"> |
Now add (directly after the line, if you want)
<option value="1click" '.top_opt_optionselected('1click',$url_shortener).'>'.__('1click', 'TweetOldPost').'</option>
and save the changes to the top-admin.php file.
Open the file top-core.php and search for (should be line 153)
153 | //Shorten long URLs with is.gd or bit.ly. |
What I did now is added the following code
} elseif ($shortener=="1click") { $url = "http://1click.at/api.php?action=shorturl&url={$the_url}&format=simple"; $response = send_request($url, 'GET');
AFTER line 176
174 175 176 | } elseif ($shortener=="tinyurl") { $url = "http://tinyurl.com/api-create.php?url={$the_url}"; $response = send_request($url, 'GET'); |
Now you can see in the Tweet Old Post admin panel that there is a new URL shortening service called 1click.
Use it, enjoy it
6 Comments to “Modifying Tweet Old Post WordPress Plugin”
Leave a Reply


Modifying Tweet Old Post WordPress Plugin http://blog.computer-service-mallorca.co... #webdesign
RT @invocoes: Modifying Tweet Old Post WordPress Plugin http://blog.computer-service-mallorca.co... #webdesign
Modifying Tweet Old Post WordPress Plugin http://blog.computer-service-mallorca.co... #webdesign
RT @invocoes: Modifying Tweet Old Post WordPress Plugin http://blog.computer-service-mallorca.co... #webdesign
Modifying Tweet Old Post WordPress Plugin http://blog.computer-service-mallorca.co... #webdesign
RT @invocoes: Modifying Tweet Old Post WordPress Plugin http://blog.computer-service-mallorca.co... #webdesign