Esempio n. 1
0
function wp_folio_css()
{
    global $settings;
    if (array_key_exists('wp_folio_css', $_REQUEST)) {
        header('Content-Type: text/css');
        ?>
		
		body, #content, .title, .nav, .widgettitle { 
			font-family : <?php 
        echo wpfolio_getSetting('WPFolio_body_font');
        ?>
 ;
			}
		
		body, .container, .container p, #content, div.notable-post {
			color: #<?php 
        echo wpfolio_getSetting('WPFolio_body_color');
        ?>
 ;
			
			}
		
		h1,h2,h3,h4,h5,h6 {
			font-family: <?php 
        echo wpfolio_getSetting('WPFolio_headline_font');
        ?>
;
			}
		h1 { 
			font-size: <?php 
        echo wpfolio_getSetting('WPFolio_headline_size');
        ?>
;
			}
			
		h1,h2,h3, .headertext h1 a, a:link, a:active, a:hover, .sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active, 			  div.notable-post h3 a, link, 	div.notable-post a:hover, #links, #links h1, #links h2, #links a:hover, div.prevnext a:hover {
			
			color: #<?php 
        echo wpfolio_getSetting('WPFolio_highlight_color');
        ?>
; 
			
			}
			
		h4, .sf-menu a, .sf-menu a:visited, div.notable-post a, #sidebar h2.widgettitle, #links ul, #links ul li, #links ul li ul, links a {
			
			color: #<?php 
        echo wpfolio_getSetting('WPFolio_second_color');
        ?>
;
			
			}
		.headertext {
			
			visibility:<?php 
        echo wpfolio_getSetting('WPFolio_visible');
        ?>
; 
			
			}
		.container, .sf-menu li a, .sf-menu li li, .sf-menu li li li{
			
			background-color: #<?php 
        echo wpfolio_getSetting('WPFolio_foreground_color');
        ?>
;
			
			}
		.nav, .widgettitle, div.prevnext{
			
			text-transform:<?php 
        echo wpfolio_getSetting('WPFolio_text_transform');
        ?>
;
			
			}
		div.footer {
		
		background-color: #<?php 
        echo wpfolio_getSetting('WPFolio_foreground_color');
        ?>
;
		
		border-top: solid 1px #<?php 
        echo get_theme_mod('background_color');
        ?>
;
		
		}
		.sf-menu li li, .sf-menu li li li {
	
		border-top: solid 1px #<?php 
        echo get_theme_mod('background_color');
        ?>
;
	
		border-left: solid 1px #<?php 
        echo get_theme_mod('background_color');
        ?>
;
		
		}
	
	<?php 
        exit;
        //This stops WP from loading any further
    }
}
Esempio n. 2
0
/**
 * Create the options page
 */
function theme_options_do_page()
{
    global $font_options, $radio_options, $options;
    if (!isset($_REQUEST['updated'])) {
        $_REQUEST['updated'] = false;
    }
    ?>
	
	<?php 
    ?>
	<div class="wrap">
	
		<script language="javascript" type="text/javascript" src="<?php 
    echo get_template_directory_uri();
    ?>
/js/jscolor/jscolor.js"></script>
		<?php 
    screen_icon();
    echo "<h2>" . get_current_theme() . __(' Theme Options') . "</h2>";
    ?>

		<?php 
    if (false !== $_REQUEST['updated']) {
        ?>
		<div class="updated fade"><p><strong><?php 
        _e('Options saved', 'wpfolio');
        ?>
</strong></p></div>
		<?php 
    }
    ?>



		<form method="post" action="options.php">

			<?php 
    settings_fields('wpfolio');
    ?>

			<p>Remember to set up <a href="<?php 
    echo site_url();
    ?>
/wp-admin/widgets.php">widgets</a>. WPFolio includes 4 widget areas and 2 custom widgets for changing your navigation, including licensing information, and adding a link to your RSS feed.  Also, please check the <a href="http://dev.eyebeam.org/projects/wpfolio/wiki/WPFolio" target="_blank"> WPFolio site</a> for theme updates, documentation, and more.</p>


			<table class="optiontable">

				
			<?php 
    foreach ($options as $value) {
        if ($value['type'] == "text") {
            ?>
		        <tr valign="top"> 
		    		<th scope="row"><?php 
            echo $value['name'];
            ?>
:</th>
		    		<td>
		        		<input name="WPFolio[<?php 
            echo $value['id'];
            ?>
]" id="<?php 
            echo $value['id'];
            ?>
" type="<?php 
            echo $value['type'];
            ?>
" value="<?php 
            if (wpfolio_getSetting($value['id']) === NULL) {
                echo $value['std'];
            } else {
                echo wpfolio_getSetting($value['id']);
            }
            ?>
" />
		    		</td>
				</tr>



			<?php 
        } elseif ($value['type'] == "select") {
            ?>

				<tr valign="top"> 
		        	<th scope="row"><?php 
            echo $value['name'];
            ?>
:</th>
		        	<td>
		            	<select name="WPFolio[<?php 
            echo $value['id'];
            ?>
]" id="<?php 
            echo $value['id'];
            ?>
">
		                <?php 
            foreach ($value['options'] as $option) {
                ?>
		                <option<?php 
                if (wpfolio_getSetting($value['id']) == $option) {
                    echo ' selected="selected"';
                } elseif ($option == $value['std']) {
                    echo ' selected="selected"';
                }
                ?>
><?php 
                echo $option;
                ?>
</option>
		                <?php 
            }
            ?>
		            	</select>
		        	</td>
		    	</tr>

			<?php 
        } elseif ($value['type'] == "color") {
            ?>
<!--if the option needs a color picker, use js color picker-->
				<!--Code taken from Allan Cole's Autofocus Plus Theme - thanks! -->

				<tr valign="top"> 
		        	<th scope="row"><?php 
            echo $value['name'];
            ?>
:</th>
		        	<td>

						<input type="<?php 
            echo $value['type'];
            ?>
" name="WPFolio[<?php 
            echo $value['id'];
            ?>
]" id="<?php 
            echo $value['id'];
            ?>
" value="<?php 
            if (wpfolio_getSetting($value['id']) === NULL) {
                echo $value['std'];
            } else {
                echo wpfolio_getSetting($value['id']);
            }
            ?>
" class="color {pickerPosition:'right'}" />

		        	</td>
		    	</tr>

		<?php 
        }
    }
    ?>
		</table>

			<p class="submit">
				<input type="submit" class="button-primary" value="<?php 
    _e('Save Options', 'wpfolio');
    ?>
" />
			</p>
		</form>
		
		
		<h2>WPFolio Community</h2>

		<h3>Support Site</h3>
		<p>If you haven't been already, check out the <a href="http://wpfolio.visitsteve.com">WPFolio Wiki</a> for help.</p>

		<h3>Sign up for email updates</h3>
		<p>Receive emails when new versions of WPFolio are available and other news to help you with updating. Your information will never be shared. Messages will be sent around 1-2 times per month, often less.</p>

			<form action="http://scripts.dreamhost.com/add_list.cgi" method="post"> 
			<input name="list" type="hidden" value="update" />
			<input name="domain" type="hidden" value="http://wpfolio.visitsteve.com" />
			<input name="url" type="hidden" />
			<input name="unsuburl" type="hidden" />
			<input name="alreadyonurl" type="hidden" />
			<input name="notonurl" type="hidden" />
			<input name="invalidurl" type="hidden" />
			<input name="emailconfirmurl" type="hidden" />
			<input name="emailit" type="hidden" value="1" />
			Name: <input name="name" /> 
			E-mail: <input name="email" /> <br />
			<input name="submit" type="submit" value="Join Our Announcement List" />
			<input name="unsub" type="submit" value="Unsubscribe" />
			</form>
		</p>

		<h3>Donate to support WPFolio and Free Software</h3>

		<p>WPFolio is a labor of love. We make it to help you.</p>

		<p>WPFolio took us <em>a lot</em> of time to build, develop, and document. Did our project save you time? Save you the costs of a designer or webmaster? Would you have otherwise needed a tutor? If you met us in person, would you buy us a beer? A dinner? Would you like to see new features implemented? Please consider making a donation based on what you think WPFolio was worth to you. Although we'll likely never make back what we've put into this, we can use your donations to offset costs of production.</p>

		<p>WPFolio is Free Software under the <a href="http://www.gnu.org/licenses/quick-guide-gplv3.html">GPLv3</a>. Our <a href="http://wpfolio.visitsteve.com">WPFolio Wiki</a> includes instructions to help you make the most of the WPFolio theme. You are free to modify, share, and distribute WPFolio however you like. We do all this because we want artists to have great websites using the best, free and open source software available. You can contribute by helping with the <a href="http://github.com/slambert/WPFolio/">development of the theme</a>, or by donating. </p>

		<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input name="cmd" type="hidden" value="_s-xclick" /> <input name="hosted_button_id" type="hidden" value="ZMXNTHG3LHX8Q" /> <input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" type="image" /> </form>

		<p>Thanks.</p>
		
	</div>
	<?php 
}