Released under the terms of the GNU General Public License.
You should have received a copy of the GNU General Public License,
along with this software. In the main directory, see: /licensing/
If not, see: .
*/
/*
Direct access denial.
*/
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
exit ("Do not access this file directly.");
/*
Function for handling activation routines.
This function should match the array key for this widget:
ws_widget__$widget_key_activate() is called by our themes.
We also initialize some option values here.
Initializing these options will force them to be
autoloaded into WordPress® instead of generating
extra queries before they are set.
*/
if (!function_exists ("ws_widget__ad_squares_activate"))
{
function ws_widget__ad_squares_activate ()
{
do_action ("ws_widget__ad_squares_before_activation", get_defined_vars ());
/**/
if (!is_numeric (get_option ("ws_widget__ad_squares_configured")))
update_option ("ws_widget__ad_squares_configured", "0");
/**/
if (!is_array (get_option ("ws_widget__ad_squares_notices")))
update_option ("ws_widget__ad_squares_notices", array ());
/**/
if (!is_array (get_option ("ws_widget__ad_squares_options")))
update_option ("ws_widget__ad_squares_options", array ());
/**/
do_action ("ws_widget__ad_squares_after_activation", get_defined_vars ());
}
}
/*
Function for handling de-activation cleanup routines.
This function should match the array key for this widget:
ws_widget__$widget_key_deactivate() is called by our themes.
*/
if (!function_exists ("ws_widget__ad_squares_deactivate"))
{
function ws_widget__ad_squares_deactivate ()
{
do_action ("ws_widget__ad_squares_before_deactivation", get_defined_vars ());
/**/
if ($GLOBALS["WS_WIDGET__"]["ad_squares"]["o"]["run_deactivation_routines"])
{
delete_option ("ws_widget__ad_squares_configured");
delete_option ("ws_widget__ad_squares_notices");
delete_option ("ws_widget__ad_squares_options");
delete_option ("widget_ws_widget__ad_squares");
delete_option ("ws_widget__ad_squares");
}
/**/
do_action ("ws_widget__ad_squares_after_deactivation", get_defined_vars ());
/**/
return;
}
}
?>