In this plugin we have a custom widget with option to remove the padding and borders (if any) added by the theme. I did not think much before implementing this feature and was expecting WordPress to have some kind of hook or filter to easily add a class to the widget wrapper and use it to remove the padding and border.
Unfortunately for some reason there is no easy hook or filter in this case. Very strange for WordPress.
But luckily there are two things available
You can add any custom classes to your widget.
There is $args['before_widget']
So here is what I did, use option one to add a custom class, which is actually a place holder which I would replace later. Like this
'classname'=>;'widget_text eaa __eaa__',//__eaa__ is my placeholder css class
'description'=>;__('AdSense ads, arbitrary text, HTML or JS.','eaa'),
parent::__construct('eaa',__('Easy AdSense Ads & Scripts','eaa'),$widget_ops,$control_ops);
Now whenever the user checks the remove padding and border option,
I would simply replace this __eaa__ with the class eaa-clean like like below
My growing list of direct AD sales was becoming hard to manage, dealing with direct AD sales was taking more time than it should actually take. It’s not streamlined. I lost AD revenue several times because I was too lazy to mail the advertisers about the renewal of their adspace.
I always wanted to automate the AD sales process, but I was busy with something or the other. Now that I got some free time to explore new stuff, I decided to take up this project.
Goals of the project
Maintain a list of advertisers and the AD space they bought.
Automatically send reminders to advertisers about renewals.
If they fail to renew, notify me, so that I can take down the AD.
A web interface where I can add details about the newly bought ads to the DB and make changes to previously bought ADS.
*Update the DB automatically when a payment is made through PayPal.
*Setup a AD server, which will let me control AD’s on all the sites without from a single location.
I’m going to implement this project using cakePHP, I hope cakePHP is the right choice.
In the development a WordPress plugin I had to subtract two dimensional arrays. I tried array_diff() function, unfortunately it doesn’t seem to work for two dimensional arrays. Even if it worked, it wasn’t exactly the functionality I wanted.
Be warned, this isn’t exactly a alternate for array_diff(). For difference of two dimensional arrays you may try this (I dint try it)