Example #1
0
<?php

// SETTINGS CONFIGURATION
$fonts = array("Arial, Helvetica, sans-serif" => "Arial", "'Arial Black',Gadget, sans-serif" => "Arial Black", "'Arial Narrow', sans-serif" => "Arial Narrow", "Century Gothic,\nsans-serif" => "Century Gothic", "Copperplate Gothic Light, sans-serif" => "Copperplate Gothic Light", "'Courier New', Courier, Monaco, monospace" => "Courier New", "Georgia, Serif" => "Georgia", "Gill Sans MT, sans-serif" => "Gill Sans", "Impact, Charcoal, sans-serif" => "Impact", "'Lucida Console', Monaco, monospace" => "Lucida Console", "'Lucida Sans Unicode', 'Lucida Grande', sans-serif" => "Lucida Sans Unicode", "'Palatino Linotype', 'Book Antiqua', Palatino, serif" => "Palatino Linotype", "Tahoma, Geneva, sans-serif" => "Tahoma", "'Times New Roman', Times, serif" => "Times New Roman", "'Trebuchet MS', Helvetica, sans-serif" => "Trebuchet MS", "Verdana, Geneva, sans-serif" => "Verdana");
$fontsizes = array("8px" => "8px", "10px" => "10px", "11px" => "11px", "12px" => "12px", "14px" => "14px", "16px" => "16px", "18px" => "18px", "20px" => "20px", "24px" => "24px", "28px" => "28px", "30px" => "30px", "36px" => "36px", "40px" => "40px");
$settings = array();
$settings[] = make_advanced_group("Basic Color Settings", array(make_setting("General Link Color", "gen-linkcolor", "color", "", ""), make_setting("General Link Hover Color", "gen-linkhovercolor", "color", "", ""), make_setting("Bonus Text Color", "bonus-color", "color", "Change the color of the bonus text, which is a red/orange color.", ".custom span.hilite { color: "), make_setting("Blue Heading Background Color", "blue-color1", "color", "Change the color of the blue headings and related color backgrounds.", ""), make_setting("Featured Top Row Background", "featbg-color", "color", "Change the light blue background color of the first row of shortcodes and widgets.", ".bingosites.top, .depositwidget tr.top, .siteswidget  tr.top,.topbonuses tr.alt { background: "), make_setting("Featured Casino Border", "featborder-color", "color", "Change the light blue border color of the first row of shortcodes and widgets.", ".bingosites.top, .depositwidget tr.top, .siteswidget  tr.top{ border-color: ")));
$settings[] = make_advanced_group("Button Settings", array(make_setting("Pink Button Background Color", "pink-button-bgcolor", "color", "", ""), make_setting("Pink Button Text Color", "pink-button-txcolor", "color", "", ""), make_setting("Blue Background Color", "blue-button-bgcolor", "color", "", ""), make_setting("Blue Button Text Color", "blue-button-txcolor", "color", "", "")));
$settings[] = make_advanced_group("Header Settings", array(make_setting("Header Background Color", "header-bgcolor", "color", "", ""), make_setting("Navigation Background Color", "nav-bgcolor", "color", "", "")));
$settings[] = make_advanced_group("Footer Settings", array(make_setting("Footer Background Color", "footer-bgcolor", "color", "Footer Background Color", "footer.bottom-footer { background: "), make_setting("Top Footer Link Color", "footertop-color", "color", "Change the footer widgets link color.", ".main-footer a, .main-footer a:visited { color: "), make_setting("Top Footer Link Hover Color", "footertop-colorhover", "color", "Change the footer widgets link hover color.", ".main-footer a:hover { color: ")));
$settings[] = make_advanced_group("Background Settings", array(make_setting("Background Image", "body-background-image", "image", "The background image of the body", ".custom { background-image: url('", "'); }"), make_setting("Background Image Repeat", "body-image-repeat", array("no-repeat" => "None", "repeat" => "Repeat", "repeat-x" => "Repeat X", "repeat-y" => "Repeat Y"), "Should the background image repeat", ".custom { background-repeat: ")));
$settings[] = make_advanced_group("Typography Settings", array(make_setting("General Font Family", "body-font-family", $fonts, "The overall font style", ".custom { font-family: "), make_setting("Content Area Font Size", "body-font-size", $fontsizes, "The size of the body text", ".custom .main-content { font-size:"), make_setting("sidebar Area Font Size", "sidebar-font-size", $fontsizes, "The size of the sidebar text", ".custom .sidebar { font-size:"), make_setting("Footer Area Font Size", "footer-font-size", $fontsizes, "The size of the footer text", ".custom footer.main-footer,  .custom footer.bottom-footer{ font-size:"), make_setting("Heading H1 Font Family", "bodyh1-font-family", $fonts, "The font type for the H1 headings", ".custom h1 { font-family:"), make_setting("Heading H1 Font Size", "bodyh1-font-size", $fontsizes, "The size of the H1 heading text", ".custom h1 { font-size:"), make_setting("Heading H2 Font Family", "bodyh2-font-family", $fonts, "The font type for the H1 headings", ".custom h2 { font-family:"), make_setting("Heading H2 Font Size", "bodyh2-font-size", $fontsizes, "The size of the H1 heading text", ".custom h2 { font-size:"), make_setting("Heading H3 Font Family", "bodyh3-font-family", $fonts, "The font type for the H3 headings", ".custom h3 { font-family:"), make_setting("Heading H3 Font Size", "bodyh3-font-size", $fontsizes, "The size of the H3 heading text", ".custom h3 { font-size:"), make_setting("Sidebar Widget Heading Font Family", "sideh3-font-family", $fonts, "The font type for the sidebar widget headings", ".custom .sidebar h3 { font-family:"), make_setting("Sidebar Widget Heading Font Size", "sideh3-font-size", $fontsizes, "The size of the sidebar widget heading text", ".custom .sidebar h3 { font-size:"), make_setting("Blog Title Font Family", "blog-title-fonttype", $fonts, "The font type for the blog title", ".custom .header-logo h1 { font-family: "), make_setting("Blog Title Font Size", "blog-title-fontsize", $fontsizes, "The font size for the blog title", ".custom .header-logo h1 { font-size: ")));
$settings[] = make_advanced_group("Custom", array(make_setting("Custom CSS", "custom", "textarea", "Custom CSS to be inserted into the site.  Proceed styles by .custom", "", "")));
add_filter('flytonic_save_custom_css', 'ft_image_bordering', 0, 2);
function ft_image_bordering($val, $field)
{
    if ($field['slug'] == 'header-bgcolor') {
        $middlecolor = $val;
        $darkcolor = ft_colorBrightness($val, -0.8100000000000001);
        $topcolor = ft_colorBrightness($val, 0.98);
        $light = ft_colorBrightness($val, 0.9);
        return 'header.main-header { background:' . $val . '; border-bottom:1px solid ' . $darkcolor . ';}';
    } else {
        if ($field['slug'] == 'nav-bgcolor') {
            $middlecolor = $val;
            $darkcolor = ft_colorBrightness($val, -0.8100000000000001);
            $topcolor = ft_colorBrightness($val, 0.98);
            $light = ft_colorBrightness($val, 0.9);
            $darkcolor2 = ft_colorBrightness($val, -0.6);
            return 'nav.navbar { background:' . $val . ';} header.main-header {border-top:4px solid ' . $val . ';} .nav li a:hover, .nav li a:active,.nav li:active,.nav li:hover {background:' . $darkcolor . ';}.nav li ul { background:' . $darkcolor . ' ;border-bottom:3px solid ' . $darkcolor2 . ';	border-left:3px solid ' . $darkcolor2 . ';border-right:3px solid ' . $darkcolor2 . ';}	.nav li.current-menu-item a, .nav li.current-menu-parent a  {
background:' . $darkcolor . '; } .nav li li.current-menu-item li a, .nav li li.current-menu-parent li a  {background:' . $darkcolor . ';}
Example #2
0
<?php

// SETTINGS CONFIGURATION
$theme_options = array();
$theme_options[] = make_advanced_group("Branding Preferences", array(make_setting("Logo", "header-logo", "image", "The logo for your site.  Recommended size is less than 300px wide and 100px in height."), make_setting("Favicon URL", "branding-favicon", "text", "Enter the full url for your custom favicon."), make_setting("Login Logo", "login-logo", "image", "The logo that is shown on the login page.  Recommended size less than 200px x 60px"), make_setting("Login Logo URL", "login-logourl", "text", "The link url for the logo image.  Where the user goes when they click on the login logo."), make_setting("Login Logo Title", "login-logoalt", "text", "The alternative text for the logo on login page.")));
$theme_options[] = make_advanced_group("Header Preferences", array(make_setting("Header script", "header-script", "textarea", "Additional information to insert in the page header file like Google Analytics code")));
$themecolors = array("Purple" => "Purple");
$theme_options[] = make_advanced_group("General Options", array(make_setting("Fixed Navigation Bar", "theme-navfix", "checkbox", "Check for the navigation bar to remain on the top when scrolling down."), make_setting("Theme Color", "theme-color", $themecolors, "Choose a preset theme design style other than default."), make_setting("Article Thumbnail", "art-thumb", "image", "The default article thumbnail if one is not set (100x100)"), make_setting("Author Image", "auth-imgd", "image", "The defualt author image is the user has not set one (80x80)"), make_setting("Show Author Bio", "auth-bio", "checkbox", "Check to show the author bio on the post page"), make_setting("Bingo Review Page Slug", "affiliate-slug", "text", "The casino review site slug, default is review.  Example - http://www.yoursite.com/slug/casinoname/.  You will need to reset your permalinks by resaving them if you change this, otherwise you will see a 404 page.")));
$theme_options[] = make_advanced_group("Bylines", array(make_setting("Hide Entire Bylines", "bylines-hide-all", "checkbox", "Check to hide all bylines including post date, category, author and comments from all areas."), make_setting("Hide Author", "bylines-hide-author", "checkbox"), make_setting("Hide Date", "bylines-hide-date", "checkbox"), make_setting("Hide Category", "bylines-hide-category", "checkbox"), make_setting("Hide Comments Link", "bylines-hide-comment", "checkbox", "Check to hide comments link and comments number in bylines.")));
$theme_options[] = make_advanced_group("Breadcrumbs", array(make_setting("Enable Breadcrumbs", "breadcrumbs-enable", "checkbox"), make_setting("Hide breadcrumbs from pages", "bread-crumbs-hide-pages", "checkbox"), make_setting("Hide breadcrumbs from posts", "bread-crumbs-hide-posts", "checkbox"), make_setting("Hide breadcrumbs from 404 pages", "bread-crumbs-hide-404", "checkbox"), make_setting("Hide breadcrumbs from archive pages", "bread-crumbs-hide-archive", "checkbox")));
$theme_options[] = make_advanced_group("Footer Options", array(make_setting("Footer script", "footer-script", "textarea"), make_setting("Hide Footer Widget Area (Where Applicable)", "footer-toparea", "checkbox"), make_setting("Hide Bottom Footer Area", "footer-bottomhide", "checkbox"), make_setting("Hide theme credit", "footer-credit", "checkbox"), make_setting("Bottom Footer Text", "footer-text", "textarea", "Enter text to replace the copyright, theme credit, and site link in the footer.")));
$theme_options[] = make_advanced_group("Redirect Options", array(make_setting("Link Redirect Options", "redirect-new-window", "checkbox", "Check to have affiliate redirect links open in new windows when clicked"), make_setting("Banner Redirect Options", "redirect-banner-window", "checkbox", "Check to have banners open in new windows when clicked"), make_setting("Outbound Redirect Slug", "redirect-slug", "text", "Enter the outbound affiliate slug to replace 'visit'.  Use one word")));
$theme_options[] = make_advanced_group("Excerpts", array(make_setting("Excerpt length", "excerpt-length", "text")));
// END SETTINGS CONFIGURATION
//ADMINISTRATION SCREEN
add_action('admin_menu', 'theme_options_add_menu', 100);
function theme_options_add_menu()
{
    add_submenu_page('design-options', 'Theme Options', 'Theme Options', 'update_themes', 'theme-options', 'theme_options_show_ui');
}
function get_theme_options()
{
    $opc = get_option('theme-options-settings');
    if ($opc != "") {
        return unserialize($opc);
    }
    return array();
}
function get_theme_option($key)
{
    $options = get_theme_options();
<?php

// SETTINGS CONFIGURATION
$gambling_options = array();
$gambling_options[] = make_advanced_group("Bingo Bonuses Widget Word Replacements", array(make_setting("Change 'Site' to:", "widget2-site", "text", "Enter the text to replace 'Site' in the heading of the bingo bonuses widget"), make_setting("Change 'Bonus' to:", "widget2-bonus", "text", "Enter the text to replace 'Bonus' in the heading of the bingo bonuses widget"), make_setting("Change 'Details' to:", "widget2-det", "text", "Enter the text to replace 'Details' in the heading of the bingo bonuses widget"), make_setting("Change 'Details' to:", "widget2-detb", "text", "Enter the text to replace 'Details' button in the bingo bonuses widget")));
$gambling_options[] = make_advanced_group("Top Bingo Sites Widget Word Replacements", array(make_setting("Change 'Bingo Site' to:", "widget1-bingosite", "text", "Enter the text to replace 'Bingo Site' in the heading of the top bingo sites widget"), make_setting("Change 'Rating' to:", "widget1-rate", "text", "Enter the text to replace 'Rating' in the heading of the top bingo sites widget"), make_setting("Change 'More Info' to:", "widget1-info", "text", "Enter the text to replace 'More Info' in the heading of the top bingo sites widget"), make_setting("Change 'Visit Now' to:", "widget1-visit", "text", "Enter the text to replace 'Visit' button text in the top bingo sites widget"), make_setting("Change 'Review' to:", "widget1-rreview", "text", "Enter the text to replace 'Review' link text in the top bingo sites widget")));
$gambling_options[] = make_advanced_group("Casino Bonuses Shortcode Word Replacement", array(make_setting("Change 'Visit Site' to:", "replace-head-visit", "text", "Enter the word to replace 'visit Site' in the heading and row of the casino bonuses shortcode table"), make_setting("Change 'Bingo Site' to:", "replace-head-site", "text", "Enter the word to replace 'casino' in the heading of the casino Bonuses shortcode table"), make_setting("Change 'No Deposit Bonus' to:", "replace-head-bonus-nd", "text", "Enter the word to replace 'No Deposit Bonus' in the heading of the casino Bonuses shortcode table"), make_setting("Change 'Signup Bonus' to:", "replace-head-bonus-su", "text", "Enter the word to replace 'Signup Bonus' in the heading of the casino Bonuses shortcode table"), make_setting("Change 'Reload Bonus' to:", "replace-head-bonus-rl", "text", "Enter the word to replace 'Reload Bonus' in the heading of the casino Bonuses shortcode table"), make_setting("Change 'Bonus Type' to:", "replace-head-btype", "text", "Enter the word to replace 'Bonus Type' in the heading of the casino Bonuses shortcode table"), make_setting("Change 'Bonus Amount' to:", "replace-head-bamt", "text", "Enter the word to replace 'Bonus Amount' in the heading of the casino Bonuses shortcode table"), make_setting("Change 'Play Now' to:", "replace-vis-button", "text", "Enter the word to replace 'Play Now' button in the casino Bonuses shortcode table"), make_setting("Change 'Review' to:", "replace-head-rev", "text", "Enter the word to replace 'review' in the heading and row of the casino Bonuses shortcode table"), make_setting("Change 'Review' to:", "replace-mid-rev", "text", "Enter the text to replace 'review' button in the casino Bonuses shortcode table"), make_setting("Change 'Signup Bonus' to:", "replace-mid-btype2", "text", "Enter the text to replace 'Signup Bonus' in the casino Bonuses shortcode table"), make_setting("Change 'No Deposit Bonus' to:", "replace-mid-btype3", "text", "Enter the text to replace 'No Deposit Bonus' in the casino Bonuses shortcode table"), make_setting("Change 'Reload Bonus' to:", "replace-mid-btype4", "text", "Enter the text to replace 'Reload Bonus' in the casino Bonuses shortcode table")));
$gambling_options[] = make_advanced_group("Top Bingo Sites Shortcode Word Replacement", array(make_setting("Change 'Read Review' to:", "topsites-rev-button", "text", "Enter the text to replace 'Read Review' button text in the Bingo Sites Shortcode"), make_setting("Change 'Play Now' to:", "topsites-pn-button", "text", "Enter the text to replace 'Play Now' button in the Bingo Sites Shortcode")));
$gambling_options[] = make_advanced_group("Author Bio and Author Page", array(make_setting("Change 'More About' to:", "author-morea", "text", "Enter the word to replace 'More About' in the author bio on the bottom of the posts page"), make_setting("Change 'View Posts' to:", "author-posts", "text", "Enter the word to replace 'View Posts' in the author bio on the bottom of the posts page"), make_setting("Change 'Visit Website' to:", "author-vistweb", "text", "Enter the word to replace 'View Website' in the author bio on the bottom of the posts page"), make_setting("Change 'About' to:", "authorpage-about", "text", "Enter the word to replace 'About' on the author page."), make_setting("Change 'Full Name' to:", "authorpage-name", "text", "Enter the word to replace 'Full Name' on the author page."), make_setting("Change 'Website' to:", "authorpage-web", "text", "Enter the word to replace 'Website' on the author page."), make_setting("Change 'More Info' to:", "authorpage-info", "text", "Enter the word to replace 'More Info' on the author page."), make_setting("Change 'Posts by' to:", "authorpage-postsby", "text", "Enter the word to replace 'Posts by' on the author page.")));
$gambling_options[] = make_advanced_group("Review Page Word Replacement", array(make_setting("Change 'Rating' to:", "review-rating", "text", "Enter the words to replace 'Rating' on the review page"), make_setting("Change 'No Deposit Bonus' to:", "review-ndb", "text", "Enter the words to replace 'No Deposit Bonus' on the review page"), make_setting("Change 'Play Now' to:", "review-pnow", "text", "Enter the words to replace 'Play Now' button on the review page"), make_setting("Change 'Features' to:", "review-feat", "text", "Enter the words to replace 'Features' on the review page"), make_setting("Change 'Bingo Software' to:", "review-software", "text", "Enter the words to replace 'Bingo Software' on the review page"), make_setting("Change 'Deposit Options' to:", "review-deposit", "text", "Enter the words to replace 'Deposit Options' on the review page"), make_setting("Change 'Withdrawal Options' to:", "review-with", "text", "Enter the words to replace 'Withdrawal Options' on the review page"), make_setting("Change 'Platforms' to:", "review-plat", "text", "Enter the words to replace 'Platforms' on the review page"), make_setting("Change 'Minimum Deposit' to:", "review-mindep", "text", "Enter the words to replace 'Minimum Deposit' on the review page"), make_setting("Change 'Reload Bonus' to:", "review-reload", "text", "Enter the words to replace 'Reload Bonus' on the review page"), make_setting("Change 'Signup Bonus Code' to:", "review-subonus", "text", "Enter the words to replace 'Signup Bonus Code' on the review page"), make_setting("Change 'Support Options' to:", "review-support", "text", "Enter the words to replace 'Support Options' on the review page"), make_setting("Change 'Play Now at' to:", "review-pnowat", "text", "Enter the words to replace 'Play Now' button on the review page")));
// END SETTINGS CONFIGURATION
//ADMINISTRATION SCREEN
add_action('admin_menu', 'gambling_options_add_menu', 100);
function gambling_options_add_menu()
{
    add_submenu_page('design-options', 'Word Replacement', 'Word Replacement', 'update_themes', 'gambling-options', 'gambling_options_show_ui');
}
function get_gambling_options()
{
    $opc = get_option('gambling-options-settings');
    if ($opc != "") {
        return unserialize($opc);
    }
    return array();
}
function get_gambling_option($key)
{
    $options = get_gambling_options();
    if (array_key_exists($key, $options)) {
        return $options[$key];
    }