prefix . 'xmasb_quotes'); function filter_xmasb_quotes_random_quote($content) { $codetoreplace = "[XmasBRandomQuote]"; $content=str_replace($codetoreplace,xmasb_get_random_quote(),$content); return $content; } function xmasb_quotes_install () { $sql = "CREATE TABLE " . XMASB_QUOTES_TABLE . " ( id mediumint(9) NOT NULL AUTO_INCREMENT, author tinytext NOT NULL, quote text NOT NULL, imgsrc tinytext NOT NULL, visible boolean NOT NULL default 1, UNIQUE KEY id (id) );"; require_once(ABSPATH . 'wp-admin/upgrade-functions.php'); dbDelta($sql); } function xmasb_quotes_print_showlink() { echo xmasb_quotes_get_showlink(); } function xmasb_quotes_get_showlink() { $options = get_option('widget_xmasb_quotes'); $showlink = $options['showlink'] == 'yes' ? true : false; if ( $showlink ) return '
'; return ''; } function xmasb_quotes_print_showimage($quoteimg, $quote) { echo xmasb_quotes_get_showimage($quoteimg, $quote); } function xmasb_quotes_get_showimage($quoteimg, $quote) { $siteurl = get_option("siteurl"); if ($siteurl[strlen($siteurl)-1] != "/") $siteurl .= "/"; return '', 'htmlafterquote'=>''); if ( $_POST['xmasb_quotes-submit'] ) { $options['showimages'] = strip_tags(stripslashes($_POST['xmasb_quotes-showimages'])); $options['defaultimage'] = strip_tags(stripslashes($_POST['xmasb_quotes-defaultimage'])); $options['showlink'] = strip_tags(stripslashes($_POST['xmasb_quotes-showlink'])); $options['htmlbeforeimage'] = stripslashes($_POST['xmasb_quotes-htmlbeforeimage']); $options['htmlafterimage'] = stripslashes($_POST['xmasb_quotes-htmlafterimage']); $options['htmlbeforequote'] = stripslashes($_POST['xmasb_quotes-htmlbeforequote']); $options['htmlafterquote'] = stripslashes($_POST['xmasb_quotes-htmlafterquote']); $options['htmlbeforeauthor'] = stripslashes($_POST['xmasb_quotes-htmlbeforeauthor']); $options['htmlafterauthor'] = stripslashes($_POST['xmasb_quotes-htmlafterauthor']); update_option('widget_xmasb_quotes', $options); } $showimages = htmlspecialchars($options['showimages'], ENT_QUOTES); $defaultimage = htmlspecialchars($options['defaultimage'], ENT_QUOTES); $showlink = htmlspecialchars($options['showlink'], ENT_QUOTES); $htmlbeforeimage = htmlspecialchars($options['htmlbeforeimage'], ENT_QUOTES); $htmlafterimage = htmlspecialchars($options['htmlafterimage'], ENT_QUOTES); $htmlbeforequote = htmlspecialchars($options['htmlbeforequote'], ENT_QUOTES); $htmlafterquote = htmlspecialchars($options['htmlafterquote'], ENT_QUOTES); $htmlbeforeauthor = htmlspecialchars($options['htmlbeforeauthor'], ENT_QUOTES); $htmlafterauthor = htmlspecialchars($options['htmlafterauthor'], ENT_QUOTES); ?>
Unknown Error Occured
Quote has been added with id id?>.
All hell is lose. quotes added!
Quote has been edited.
Could not edit quote.
Failure: No quote ID given.
Quote deleted successfully
Failure: Could not delete quote.
WTH?!?
No quote found for id