This seems like it should be a given, but it seems that WordPress has no easy function to get the current URL. I didn’t want to use
$_SERVER variables to get the URL, but after finding no good WordPress solution, I decided to bite the bullet and just make up a
$_SERVER solution for the time being.
Some time passed, I forgot about it and found some other headaches to occupy my time. Then I found this post with a solution that was to my liking. The only thing that I didn’t like about it was that it always appended the original query string, whether you were using permalinks or not. I added a little conditional to it and now I have a
current_url function that I wouldn’t kick out of bed.
function current_url($trailingslash = false)
$current_url = isset($wp->request) ? home_url($wp->request) : add_query_arg($wp->query_string, '', home_url());
return $trailingslash ? trailingslashit($current_url) : $current_url;
When I was putting together my WordPress portfolio plugin, Portfolion, I designed an icon for it in the typical WordPress icon style. I thought that I would release the PSD files as it is hard to find good WordPress icons. All the layers are preserved, so anyone that may want to use it can modify the colors and add to it as they please. Read more …
As I write this post, I am uploading a mess of files that I’ve been working on for the past month or two that make up the first real Abramski site. I use the word real, because I don’t believe downloading a theme you like and calling it your own flies if you are any type of developer or designer. For years now, I’ve had a theme or two up here masquerading as my site while I wrote some blog posts and I’m somewhat embarrassed about it. I had no portfolio to speak of because I had no work that felt like my own that I really wanted to showcase. This site was always meant to be a priority but like many other designers and developers, I put off getting this site together for years. Read more …
Are you still copying and pasting blog entry links into Twitter and Facebook after you write a post? That’s for senior citizens. Below is a way to hook it up so when you write a post in your blog it will show up on both Twitter and Facebook.
The first thing to do is to add the Twitter app to your Facebook account using the Twitter Facebook app. Input your Twitter information or just accept if you are already signed in to Twitter. Now anything you write in Twitter will show up in Facebook. Read more …
I’ve written my first WordPress plugin and added it to WordPress’ plugin repository. It is available for download here. It’s a pretty simple plugin that I hope to add into a larger plugin that I am planning to put together for the rollout of my personal site, which has been a long time coming. Now that I don’t have a job, maybe I can complete some of these projects I have building up over the years. Below is the description of the plugin.
Uploader creates an Uploader role (a Subscriber role with an extra
uploader_upload capability) for blind file uploading within wp-admin after credentials have been input in wp-login.php. This plugin is based on the Uploadify project.