}

  jQuery(document).ready(function() {
		jQuery('#dynwid').accordion({
			header: 'h4',
			autoHeight: false,
		});
	});
/* ]]> */
</script>

<?php 
if (isset($_POST['dynwid_save']) && $_POST['dynwid_save'] == 'yes') {
    $lead = __('Widget options saved.', DW_L10N_DOMAIN);
    $msg = '<a href="themes.php?page=dynwid-config">' . __('Return', DW_L10N_DOMAIN) . '</a> ' . __('to Dynamic Widgets overview', DW_L10N_DOMAIN);
    DWMessageBox::create($lead, $msg);
} else {
    if (isset($_GET['work']) && $_GET['work'] == 'none') {
        DWMessageBox::setTypeMsg('error');
        $text = __('Dynamic does not mean static hiding of a widget.', DW_L10N_DOMAIN) . ' ' . __('Hint', DW_L10N_DOMAIN) . ': <a href="widgets.php">' . __('Remove', DW_L10N_DOMAIN) . '</a>' . ' ' . __('the widget from the sidebar', DW_L10N_DOMAIN) . '.';
        DWMessageBox::setMessage($text);
        DWMessageBox::output();
    } else {
        if (isset($_GET['work']) && $_GET['work'] == 'nonedate') {
            DWMessageBox::setTypeMsg('error');
            $text = __('The From date can\'t be later than the To date.', DW_L10N_DOMAIN);
            DWMessageBox::setMessage($text);
            DWMessageBox::output();
        }
    }
}
Example #2
0
/**
 * dynwid_add_widget_page() Save success message for WP widgets admin
 * @since 1.2
 */
function dynwid_add_widget_page()
{
    $DW =& $GLOBALS['DW'];
    $name = strip_tags($DW->getName($_GET['widget_id']));
    $lead = __('Dynamic Widgets Options saved', DW_L10N_DOMAIN);
    $msg = __('for', DW_L10N_DOMAIN) . ' ' . $name;
    DWMessageBox::create($lead, $msg);
}
/**
 * dynwid_add_widget_page() Save success message for WP widgets admin
 * @since 1.2
 */
function dynwid_add_widget_page()
{
    /** @var $DW DynWid */
    global $DW;
    $name = strip_tags($DW->getName($_GET['widget_id']));
    $lead = __('Dynamic Widgets Options saved', DW_L10N_DOMAIN);
    $msg = __('for', DW_L10N_DOMAIN) . ' ' . $name;
    DWMessageBox::create($lead, $msg);
}