Example #1
0
    //
    if (!empty($c->_options['extra_css'])) {
        $buildCss .= stripslashes($c->_options['extra_css']);
    }
    //
    // print support via CSS, this section excludes CSS selectors
    //
    if ($c->_options['add_css'] == 'true') {
        $printCSS = "/* cssid=" . $c->_options['cssid'] . "                            */   \n";
        $printCSS .= "/* WARNING!! this file is dynamicaly generated changes will  */ \n";
        $printCSS .= "/* be overwritten with every change to the admin screen.      */ \n";
        $printCSS .= "/* You can add css to this file in the admin screen.       */ \n\n\n\n\n";
    }
    $printCSS .= "body {background: white;font-size: 12pt;color:black;}\n * {background-image:none;}\n #wrapper, #content {width: auto;margin: 0 5%;padding: 0;border: 0;float: none !important;color: black;background: transparent none;}\n a { text-decoration : underline; color : #0000ff; }\n";
    //
    // excludes
    if (!empty($c->_options['css_print_excludes'])) {
        $printCSS .= $c->_options['css_print_excludes'] . " {display:none}\n";
    }
    //
    // user CSS for print
    if (!empty($c->_options['extra_print_css'])) {
        $printCSS .= stripslashes($c->_options['extra_print_css']);
    }
    $cssAdminOptions['cssid'] = $c->_options['cssid'];
    $cssAdminOptions['screen'] = $buildCss;
    $cssAdminOptions['print'] = $printCSS;
    update_option("ShareAndFollowCSS", $cssAdminOptions);
    delete_transient("ShareAndFollowCSS");
    $c->update_plugin_options();
}