コード例 #1
0
function graphene_options_display()
{
    global $graphene_settings;
    ?>
        
    <input type="hidden" name="graphene_display" value="true" />
        
        <?php 
    /* Header Options */
    ?>
        <div class="postbox">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Header_Display_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Header Display Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="light_header"><?php 
    _e('Use light-coloured header bars', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[light_header]" id="light_header" <?php 
    checked($graphene_settings['light_header']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="link_header_img"><?php 
    _e('Link header image to front page', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[link_header_img]" id="link_header_img" <?php 
    checked($graphene_settings['link_header_img']);
    ?>
 value="true" /><br />
                            <span class="description"><?php 
    _e('Check this if you disable the header texts and want the header image to be linked to the front page.', 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="featured_img_header"><?php 
    _e('Disable Featured Image replacing header image', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[featured_img_header]" id="featured_img_header" <?php 
    checked($graphene_settings['featured_img_header']);
    ?>
 value="true" /><br />
                            <span class="description"><?php 
    _e('Check this to prevent the posts Featured Image replacing the header image regardless of the featured image dimension.', 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="header_img_height"><?php 
    _e('Header image height', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                        	<input type="text" name="graphene_settings[header_img_height]" id="header_img_height" value="<?php 
    echo $graphene_settings['header_img_height'];
    ?>
" size="3" /> px
                        </td>
                    </tr>
                    
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="search_box_location"><?php 
    _e('Search box location', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <select name="graphene_settings[search_box_location]" id="search_box_location" class="chzn-select">
                                <option value="top_bar" <?php 
    selected($graphene_settings['search_box_location'], 'top_bar');
    ?>
><?php 
    _e("Top bar", 'graphene');
    ?>
</option>
                                <option value="nav_bar" <?php 
    selected($graphene_settings['search_box_location'], 'nav_bar');
    ?>
><?php 
    _e("Navigation bar", 'graphene');
    ?>
</option>
                                <option value="disabled" <?php 
    selected($graphene_settings['search_box_location'], 'disabled');
    ?>
><?php 
    _e("Disable search box", 'graphene');
    ?>
</option>             
                            </select>
                        </td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Column Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Column_Display_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Column Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="col" style="width:150px;">
                            <label><?php 
    _e('Column mode', 'graphene');
    ?>
</label>
                        </th>
                    </tr>
                    <tr>
                        <td>
                            <div class="column-options">
                            	<p>                           
                                <label>
                                    <input type="radio" name="graphene_settings[column_mode]" value="one_column" <?php 
    checked($graphene_settings['column_mode'], 'one_column');
    ?>
/>
                                    <img src="<?php 
    echo GRAPHENE_ROOTURI;
    ?>
/admin/images/template-onecolumn.png" alt="<?php 
    _e('One column', 'graphene');
    ?>
" title="<?php 
    _e('One column', 'graphene');
    ?>
" />                                
                                </label>
                                </p>
                                
                                <p>
                                <label>
                                    <input type="radio" name="graphene_settings[column_mode]" value="two_col_left" <?php 
    checked($graphene_settings['column_mode'], 'two_col_left');
    ?>
/>
                                    <?php 
    if (!is_rtl()) {
        ?>
                                    	<img src="<?php 
        echo GRAPHENE_ROOTURI;
        ?>
/admin/images/template-twocolumnsleft.png" alt="<?php 
        _e('Two columns (with sidebar right)', 'graphene');
        ?>
" title="<?php 
        _e('Two columns (with sidebar right)', 'graphene');
        ?>
" />
                                    <?php 
    } else {
        ?>
                                    	<img src="<?php 
        echo GRAPHENE_ROOTURI;
        ?>
/admin/images/template-twocolumnsright.png" alt="<?php 
        _e('Two columns (with sidebar left)', 'graphene');
        ?>
" title="<?php 
        _e('Two columns (with sidebar left)', 'graphene');
        ?>
" />
                                    <?php 
    }
    ?>
                                </label>
                                <label>
                                    <input type="radio" name="graphene_settings[column_mode]" value="two_col_right" <?php 
    checked($graphene_settings['column_mode'], 'two_col_right');
    ?>
/>
                                    <?php 
    if (!is_rtl()) {
        ?>
	                                    <img src="<?php 
        echo GRAPHENE_ROOTURI;
        ?>
/admin/images/template-twocolumnsright.png" alt="<?php 
        _e('Two columns (with sidebar left)', 'graphene');
        ?>
" title="<?php 
        _e('Two columns (with sidebar left)', 'graphene');
        ?>
" />
                                    <?php 
    } else {
        ?>
                                    	<img src="<?php 
        echo GRAPHENE_ROOTURI;
        ?>
/admin/images/template-twocolumnsleft.png" alt="<?php 
        _e('Two columns (with sidebar right)', 'graphene');
        ?>
" title="<?php 
        _e('Two columns (with sidebar right)', 'graphene');
        ?>
" />
                                    <?php 
    }
    ?>
                                </label>
                                </p>
                                
                                <p>
                                <label>
                                    <input type="radio" name="graphene_settings[column_mode]" value="three_col_left" <?php 
    checked($graphene_settings['column_mode'], 'three_col_left');
    ?>
/>
                                    <?php 
    if (!is_rtl()) {
        ?>
	                                    <img src="<?php 
        echo GRAPHENE_ROOTURI;
        ?>
/admin/images/template-threecolumnsleft.png" alt="<?php 
        _e('Three columns (with two sidebars right)', 'graphene');
        ?>
" title="<?php 
        _e('Three columns (with two sidebars right)', 'graphene');
        ?>
" />
                                    <?php 
    } else {
        ?>
                                    	<img src="<?php 
        echo GRAPHENE_ROOTURI;
        ?>
/admin/images/template-threecolumnsright.png" alt="<?php 
        _e('Three columns (with two sidebars left)', 'graphene');
        ?>
" title="<?php 
        _e('Three columns (with two sidebars left)', 'graphene');
        ?>
" />
                                    <?php 
    }
    ?>
                                </label>
                                <label>
                                    <input type="radio" name="graphene_settings[column_mode]" value="three_col_right" <?php 
    checked($graphene_settings['column_mode'], 'three_col_right');
    ?>
/>
                                    <?php 
    if (!is_rtl()) {
        ?>
	                                    <img src="<?php 
        echo GRAPHENE_ROOTURI;
        ?>
/admin/images/template-threecolumnsright.png" alt="<?php 
        _e('Three columns (with two sidebars left)', 'graphene');
        ?>
" title="<?php 
        _e('Three columns (with two sidebars left)', 'graphene');
        ?>
" />
                                    <?php 
    } else {
        ?>
                                        <img src="<?php 
        echo GRAPHENE_ROOTURI;
        ?>
/admin/images/template-threecolumnsleft.png" alt="<?php 
        _e('Three columns (with two sidebars right)', 'graphene');
        ?>
" title="<?php 
        _e('Three columns (with two sidebars right)', 'graphene');
        ?>
" />
                                    <?php 
    }
    ?>
                                </label>
                                <label>
                                    <input type="radio" name="graphene_settings[column_mode]" value="three_col_center" <?php 
    checked($graphene_settings['column_mode'], 'three_col_center');
    ?>
/>
                                    <img src="<?php 
    echo GRAPHENE_ROOTURI;
    ?>
/admin/images/template-threecolumnscenter.png" alt="<?php 
    _e('Three columns (with sidebars left and right)', 'graphene');
    ?>
" title="<?php 
    _e('Three columns (with sidebars left and right)', 'graphene');
    ?>
" />
                                </label>      
                                </p>                            
                            </div>                                                                                                              
                        </td>
                    </tr>
                    
					<?php 
    if (class_exists('BBPress')) {
        ?>
                    <tr>
                        <th scope="col" style="width:150px;">
                            <label><?php 
        _e('bbPress column mode', 'graphene');
        ?>
</label>
                        </th>
                    </tr>
                    <tr>
                        <td>
                            <div class="column-options">
                            	<p>                           
                                <label>
                                    <input type="radio" name="graphene_settings[bbp_column_mode]" value="one_column" <?php 
        checked($graphene_settings['bbp_column_mode'], 'one_column');
        ?>
/>
                                    <img src="<?php 
        echo GRAPHENE_ROOTURI;
        ?>
/admin/images/template-onecolumn.png" alt="<?php 
        _e('One column', 'graphene');
        ?>
" title="<?php 
        _e('One column', 'graphene');
        ?>
" />                                
                                </label>
                                </p>
                                
                                <p>
                                <label>
                                    <input type="radio" name="graphene_settings[bbp_column_mode]" value="two_col_left" <?php 
        checked($graphene_settings['bbp_column_mode'], 'two_col_left');
        ?>
/>
                                    <?php 
        if (!is_rtl()) {
            ?>
                                    	<img src="<?php 
            echo GRAPHENE_ROOTURI;
            ?>
/admin/images/template-twocolumnsleft.png" alt="<?php 
            _e('Two columns (with sidebar right)', 'graphene');
            ?>
" title="<?php 
            _e('Two columns (with sidebar right)', 'graphene');
            ?>
" />
                                    <?php 
        } else {
            ?>
                                    	<img src="<?php 
            echo GRAPHENE_ROOTURI;
            ?>
/admin/images/template-twocolumnsright.png" alt="<?php 
            _e('Two columns (with sidebar left)', 'graphene');
            ?>
" title="<?php 
            _e('Two columns (with sidebar left)', 'graphene');
            ?>
" />
                                    <?php 
        }
        ?>
                                </label>
                                <label>
                                    <input type="radio" name="graphene_settings[bbp_column_mode]" value="two_col_right" <?php 
        checked($graphene_settings['bbp_column_mode'], 'two_col_right');
        ?>
/>
                                    <?php 
        if (!is_rtl()) {
            ?>
                                        <img src="<?php 
            echo GRAPHENE_ROOTURI;
            ?>
/admin/images/template-twocolumnsright.png" alt="<?php 
            _e('Two columns (with sidebar left)', 'graphene');
            ?>
" title="<?php 
            _e('Two columns (with sidebar left)', 'graphene');
            ?>
" />
                                    <?php 
        } else {
            ?>
                                    	<img src="<?php 
            echo GRAPHENE_ROOTURI;
            ?>
/admin/images/template-twocolumnsleft.png" alt="<?php 
            _e('Two columns (with sidebar right)', 'graphene');
            ?>
" title="<?php 
            _e('Two columns (with sidebar right)', 'graphene');
            ?>
" />
                                    <?php 
        }
        ?>
                                </label>
                                </p>
                                
                                <p>
                                <label>
                                    <input type="radio" name="graphene_settings[bbp_column_mode]" value="three_col_left" <?php 
        checked($graphene_settings['bbp_column_mode'], 'three_col_left');
        ?>
/>
                                    <?php 
        if (!is_rtl()) {
            ?>
	                                    <img src="<?php 
            echo GRAPHENE_ROOTURI;
            ?>
/admin/images/template-threecolumnsleft.png" alt="<?php 
            _e('Three columns (with two sidebars right)', 'graphene');
            ?>
" title="<?php 
            _e('Three columns (with two sidebars right)', 'graphene');
            ?>
" />
                                    <?php 
        } else {
            ?>
                                    	<img src="<?php 
            echo GRAPHENE_ROOTURI;
            ?>
/admin/images/template-threecolumnsright.png" alt="<?php 
            _e('Three columns (with two sidebars left)', 'graphene');
            ?>
" title="<?php 
            _e('Three columns (with two sidebars left)', 'graphene');
            ?>
" />
                                    <?php 
        }
        ?>
                                </label>
                                <label>
                                    <input type="radio" name="graphene_settings[bbp_column_mode]" value="three_col_right" <?php 
        checked($graphene_settings['bbp_column_mode'], 'three_col_right');
        ?>
/>
                                    <?php 
        if (!is_rtl()) {
            ?>
                                    	<img src="<?php 
            echo GRAPHENE_ROOTURI;
            ?>
/admin/images/template-threecolumnsright.png" alt="<?php 
            _e('Three columns (with two sidebars left)', 'graphene');
            ?>
" title="<?php 
            _e('Three columns (with two sidebars left)', 'graphene');
            ?>
" />
                                    <?php 
        } else {
            ?>
                                    	<img src="<?php 
            echo GRAPHENE_ROOTURI;
            ?>
/admin/images/template-threecolumnsleft.png" alt="<?php 
            _e('Three columns (with two sidebars right)', 'graphene');
            ?>
" title="<?php 
            _e('Three columns (with two sidebars right)', 'graphene');
            ?>
" />
                                    <?php 
        }
        ?>
                                </label>
                                <label>
                                    <input type="radio" name="graphene_settings[bbp_column_mode]" value="three_col_center" <?php 
        checked($graphene_settings['bbp_column_mode'], 'three_col_center');
        ?>
/>
                                    <img src="<?php 
        echo GRAPHENE_ROOTURI;
        ?>
/admin/images/template-threecolumnscenter.png" alt="<?php 
        _e('Three columns (with sidebars left and right)', 'graphene');
        ?>
" title="<?php 
        _e('Three columns (with sidebars left and right)', 'graphene');
        ?>
" />
                                </label>      
                                </p>                            
                            </div>                                                                                                              
                        </td>
                    </tr>
                    <?php 
    }
    ?>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Column Width */
    ?>
        <div class="postbox non-essential-option column-width">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Column_Width_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Column Width Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
            	<p><?php 
    _e('Note: Leave values empty to reset to the default values.', 'graphene');
    ?>
</p>
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label><?php 
    _e('Container width', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                        	<input type="text" class="code" size="8" name="graphene_settings[container_width]" id="container_width" value="<?php 
    echo $graphene_settings['container_width'];
    ?>
" /> px
                            <input type="hidden" class="code" size="8" name="graphene_settings[grid_width]" id="grid_width" value="<?php 
    echo ($graphene_settings['container_width'] - $graphene_settings['gutter_width'] * 32) / 16;
    ?>
" />
                        </td>
                    </tr>
                    <tr>
                    	<th></th>
                        <td>
                        	<div id="container_width-slider"></div>
                            <div class="alignleft slider-legend">800 px</div>
                            <div class="alignright slider-legend">1400 px</div>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label><?php 
    _e('Column width', 'graphene');
    ?>
<br />(<?php 
    _e('two-column mode', 'graphene');
    ?>
)</label>
                        </th>
                        <td>
                        	<div class="width-wrap">
                            	<?php 
    _e('Content', 'graphene');
    ?>
<br />
                            	<input type="text" class="code" size="8" name="graphene_settings[column_width][two_col][content]" id="column_width_2col_content" value="<?php 
    echo $graphene_settings['column_width']['two_col']['content'];
    ?>
" /> px
                            </div>
                        	<div class="width-wrap">
                            	<?php 
    _e('Sidebar', 'graphene');
    ?>
<br />
                        		<input type="text" class="code" size="8" name="graphene_settings[column_width][two_col][sidebar]" id="column_width_2col_sidebar" value="<?php 
    echo $graphene_settings['column_width']['two_col']['sidebar'];
    ?>
" /> px
                            </div>
                        </td>
                    </tr>
                    <tr>
                    	<th></th>
                        <td>
                            <div id="column_width_2col-slider"></div>
                            <div class="alignleft slider-legend">0 px</div>
                            <div class="column_width-max-legend alignright slider-legend"><?php 
    echo $graphene_settings['container_width'];
    ?>
 px</div>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label><?php 
    _e('Column width', 'graphene');
    ?>
<br />(<?php 
    _e('three-column mode', 'graphene');
    ?>
)</label>
                        </th>
                        <td>
                        	<div class="width-wrap">
                            	<?php 
    _e('Left sidebar', 'graphene');
    ?>
<br />
                        		<input type="text" class="code" size="8" name="graphene_settings[column_width][three_col][sidebar_left]" id="column_width_sidebar_left" value="<?php 
    echo $graphene_settings['column_width']['three_col']['sidebar_left'];
    ?>
" /> px
                            </div>
                            <div class="width-wrap">
                            	<?php 
    _e('Content', 'graphene');
    ?>
<br />
                            	<input type="text" class="code" size="8" name="graphene_settings[column_width][three_col][content]" id="column_width_content" value="<?php 
    echo $graphene_settings['column_width']['three_col']['content'];
    ?>
" /> px
                            </div>
                            <div class="width-wrap">
                            	<?php 
    _e('Right sidebar', 'graphene');
    ?>
<br />
                            	<input type="text" class="code" size="8" name="graphene_settings[column_width][three_col][sidebar_right]" id="column_width_sidebar_right" value="<?php 
    echo $graphene_settings['column_width']['three_col']['sidebar_right'];
    ?>
" /> px
                            </div>
                        </td>
                    </tr>
                    <tr>
                    	<th></th>
                        <td>
                            <div id="column_width-slider"></div>
                            <div class="alignleft slider-legend">0 px</div>
                            <div class="column_width-max-legend alignright slider-legend"><?php 
    echo $graphene_settings['container_width'];
    ?>
 px</div>
                        </td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        <?php 
    /* Posts Display Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Posts_Display_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Posts Display Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="hide_post_author"><?php 
    _e('Hide post author', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[hide_post_author]" id="hide_post_author" <?php 
    checked($graphene_settings['hide_post_author']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="post_date_display"><?php 
    _e('Post date display', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <select name="graphene_settings[post_date_display]" id="post_date_display" class="chzn-select">
                                <option value="hidden" <?php 
    selected($graphene_settings['post_date_display'], 'hidden');
    ?>
><?php 
    _e('Hidden', 'graphene');
    ?>
</option>
                                <option value="icon_no_year" <?php 
    selected($graphene_settings['post_date_display'], 'icon_no_year');
    ?>
><?php 
    _e('As an icon (without the year)', 'graphene');
    ?>
</option>
                                <option value="icon_plus_year" <?php 
    selected($graphene_settings['post_date_display'], 'icon_plus_year');
    ?>
><?php 
    _e('As an icon (including the year)', 'graphene');
    ?>
</option>
                                <option value="text" <?php 
    selected($graphene_settings['post_date_display'], 'text');
    ?>
><?php 
    _e('As inline text', 'graphene');
    ?>
</option>
                            </select><br />
                        </td>
                    </tr>                    
                    <tr>
                        <th scope="row">
                            <label for="hide_post_cat"><?php 
    _e('Hide post categories', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[hide_post_cat]" id="hide_post_cat" <?php 
    checked($graphene_settings['hide_post_cat']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="hide_post_tags"><?php 
    _e('Hide post tags', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[hide_post_tags]" id="hide_post_tags" <?php 
    checked($graphene_settings['hide_post_tags']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="hide_post_commentcount"><?php 
    _e('Hide post comment count', 'graphene');
    ?>
</label><br />
                            <small><?php 
    _e('Only affects posts listing (such as the front page) and not single post view.', 'graphene');
    ?>
</small>                        
                        </th>
                        <td><input type="checkbox" name="graphene_settings[hide_post_commentcount]" id="hide_post_commentcount" <?php 
    checked($graphene_settings['hide_post_commentcount']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row"><label for="show_post_avatar"><?php 
    _e("Show post author's <a href=\"http://en.gravatar.com/\">gravatar</a>", 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[show_post_avatar]" id="show_post_avatar" <?php 
    checked($graphene_settings['show_post_avatar']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row"><label for="show_post_author"><?php 
    _e("Show post author's info", 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[show_post_author]" id="show_post_author" <?php 
    checked($graphene_settings['show_post_author']);
    ?>
 value="true" /></td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Excerpts Display Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Excerpts_Display_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Excerpts Display Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
            	<table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="posts_show_excerpt"><?php 
    _e('Show excerpts in front page', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[posts_show_excerpt]" id="posts_show_excerpt" <?php 
    checked($graphene_settings['posts_show_excerpt']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="archive_full_content"><?php 
    _e('Show full content in archive pages', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                        	<input type="checkbox" name="graphene_settings[archive_full_content]" id="archive_full_content" <?php 
    checked($graphene_settings['archive_full_content']);
    ?>
 value="true" /><br />
                            <span class="description"><?php 
    _e('Note: Archive pages include the archive for category, tags, time, and search results pages. Enabling this option will cause the full content of posts and pages listed in those archives to displayed instead of the excerpt, and truncated by the Read More tag if used.', 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row"><label for="show_excerpt_more"><?php 
    _e("Show More link for manual excerpts", 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[show_excerpt_more]" id="show_excerpt_more" <?php 
    checked($graphene_settings['show_excerpt_more']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row"><label for="excerpt_html_tags"><?php 
    _e("Retain these HTML tags in excerpts", 'graphene');
    ?>
</label></th>
                        <td>
                        	<input type="text" class="widefat code" name="graphene_settings[excerpt_html_tags]" id="excerpt_html_tags" value="<?php 
    echo $graphene_settings['excerpt_html_tags'];
    ?>
" /><br />
                        	<span class="description"><?php 
    _e("Enter the HTML tags you'd like to retain in excerpts. For example, enter <code>&lt;p&gt;&lt;ul&gt;&lt;li&gt;</code> to retain <code>&lt;p&gt;</code>, <code>&lt;ul&gt;</code>, and <code>&lt;li&gt;</code> HTML tags.", 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
      
        
        
        <?php 
    /* Comments Display Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Comments_Display_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Comments Display Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="hide_allowedtags"><?php 
    _e('Hide allowed tags in comment form', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[hide_allowedtags]" id="hide_allowedtags" <?php 
    checked($graphene_settings['hide_allowedtags']);
    ?>
 value="true" /></td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
            
        <?php 
    /* Text Style Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Text_Style_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Text Style Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
            	<h4><?php 
    _e('Google Webfonts', 'graphene');
    ?>
</h4>
                <table class="form-table">
                        <tr>
                            <th scope="row"><label for="graphene-webfont-families"><?php 
    _e('Font families', 'graphene');
    ?>
</label></th>
                            <td>
                            	<textarea class="code" cols="40" rows="7" id="graphene-webfont-families" name="graphene_settings[webfont_families]"><?php 
    echo $graphene_settings['webfont_families'];
    ?>
</textarea><br />
								<span class="description"><?php 
    _e('Enter the Google Webfont font family string in the format that is used in the Webfont Loader, one font family per line.', 'graphene');
    ?>
</span><br />
				                <span class="description"><?php 
    _e('Example:', 'graphene');
    ?>
 <code>Pontano+Sans::latin,latin-ext</code></span>
                            </td>
                        </tr>
                </table>
                
                <p><?php 
    _e('The following options are CSS properties, so any valid CSS values for each particular property can be used.', 'graphene');
    ?>
</p>
                <p><?php 
    _e('Some example CSS properties values:', 'graphene');
    ?>
</p>
                <table class="graphene-code-example">
                    <tr>
                        <th scope="row"><?php 
    _e('Text font:', 'graphene');
    ?>
</th>
                        <td><code>arial</code>, <code>tahoma</code>, <code>georgia</code>, <code>'Trebuchet MS'</code></td>
                    </tr>
                    <tr>
                        <th scope="row"><?php 
    _e('Text size and line height:', 'graphene');
    ?>
</th>
                        <td><code>12px</code>, <code>12pt</code>, <code>12em</code></td>
                    </tr>
                    <tr>
                        <th scope="row"><?php 
    _e('Text weight:', 'graphene');
    ?>
</th>
                        <td><code>normal</code>, <code>bold</code>, <code>100</code>, <code>700</code></td>
                    </tr>
                    <tr>
                        <th scope="row"><?php 
    _e('Text style:', 'graphene');
    ?>
</th>
                        <td><code>normal</code>, <code>italic</code>, <code>oblique</code></td>
                    </tr>
                    <tr>
                        <th scope="row"><?php 
    _e('Text decoration:', 'graphene');
    ?>
</th>
                        <td><code>none</code>, <code>underline</code>, <code>line-through</code></td>
                    </tr>
                </table>
                
                <h4><?php 
    _e('Header Text', 'graphene');
    ?>
</h4>
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="header_title_font_type"><?php 
    _e('Title text font', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[header_title_font_type]" id="header_title_font_type" value="<?php 
    echo $graphene_settings['header_title_font_type'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="header_title_font_size"><?php 
    _e('Title text size', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[header_title_font_size]" id="header_title_font_size" value="<?php 
    echo $graphene_settings['header_title_font_size'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="header_title_font_weight"><?php 
    _e('Title text weight', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[header_title_font_weight]" id="header_title_font_weight" value="<?php 
    echo $graphene_settings['header_title_font_weight'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="header_title_font_lineheight"><?php 
    _e('Title text line height', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[header_title_font_lineheight]" id="header_title_font_lineheight" value="<?php 
    echo $graphene_settings['header_title_font_lineheight'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="header_title_font_style"><?php 
    _e('Title text style', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[header_title_font_style]" id="header_title_font_style" value="<?php 
    echo $graphene_settings['header_title_font_style'];
    ?>
" /></td>
                    </tr>
                </table>
                
                <table class="form-table" style="margin-top:30px;">               
                    <tr>
                        <th scope="row">
                            <label for="header_desc_font_type"><?php 
    _e('Description text font', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[header_desc_font_type]" id="header_desc_font_type" value="<?php 
    echo $graphene_settings['header_desc_font_type'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="header_desc_font_size"><?php 
    _e('Description text size', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[header_desc_font_size]" id="header_desc_font_size" value="<?php 
    echo $graphene_settings['header_desc_font_size'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="header_desc_font_weight"><?php 
    _e('Description text weight', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[header_desc_font_weight]" id="header_desc_font_weight" value="<?php 
    echo $graphene_settings['header_desc_font_weight'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="header_desc_font_lineheight"><?php 
    _e('Description text line height', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[header_desc_font_lineheight]" id="header_desc_font_lineheight" value="<?php 
    echo $graphene_settings['header_desc_font_lineheight'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="header_desc_font_style"><?php 
    _e('Description text style', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[header_desc_font_style]" id="header_desc_font_style" value="<?php 
    echo $graphene_settings['header_desc_font_style'];
    ?>
" /></td>
                    </tr>
                </table>
                
                <h4><?php 
    _e('Content Text', 'graphene');
    ?>
</h4>
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="content_font_type"><?php 
    _e('Text font', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[content_font_type]" id="content_font_type" value="<?php 
    echo $graphene_settings['content_font_type'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="content_font_size"><?php 
    _e('Text size', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[content_font_size]" id="content_font_size" value="<?php 
    echo $graphene_settings['content_font_size'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="content_font_lineheight"><?php 
    _e('Text line height', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[content_font_lineheight]" id="content_font_lineheight" value="<?php 
    echo $graphene_settings['content_font_lineheight'];
    ?>
" /></td>
                    </tr>
                </table>
                    
                <h4><?php 
    _e('Link Text', 'graphene');
    ?>
</h4>
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="link_decoration_normal"><?php 
    _e('Text decoration (normal state)', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[link_decoration_normal]" id="link_decoration_normal" value="<?php 
    echo $graphene_settings['link_decoration_normal'];
    ?>
" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="link_decoration_hover"><?php 
    _e('Text decoration (hover state)', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[link_decoration_hover]" id="link_decoration_hover" value="<?php 
    echo $graphene_settings['link_decoration_hover'];
    ?>
" /></td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
		
        
        <?php 
    /* Footer Widget Display Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Footer_Widget_Display_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Footer Widget Display Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">        
                <table class="form-table">
                    <tr>
                        <th scope="row" style="width:260px;">
                            <label for="footerwidget_column"><?php 
    _e('Number of columns to display', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[footerwidget_column]" id="footerwidget_column" value="<?php 
    echo $graphene_settings['footerwidget_column'];
    ?>
" maxlength="2" size="3" /></td>
                    </tr>
                    <?php 
    if ($graphene_settings['alt_home_footerwidget']) {
        ?>
                    <tr>
                        <th scope="row">
                            <label for="alt_footerwidget_column"><?php 
        _e('Number of columns to display for front page footer widget', 'graphene');
        ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[alt_footerwidget_column]" id="alt_footerwidget_column" value="<?php 
        echo $graphene_settings['alt_footerwidget_column'];
        ?>
" maxlength="2" size="3" /></td>
                    </tr>
                    <?php 
    }
    ?>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
            
        
        <?php 
    /* Navigation Menu Display Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Navigation_Menu_Display_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Navigation Menu Display Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="navmenu_child_width"><?php 
    _e('Dropdown menu item width', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="text" class="code" name="graphene_settings[navmenu_child_width]" id="navmenu_child_width" value="<?php 
    echo $graphene_settings['navmenu_child_width'];
    ?>
" maxlength="3" size="3" /> px</td>
                    </tr>                    
                    <tr>
                        <th scope="row">
                            <label for="disable_menu_desc"><?php 
    _e('Disable description in Header Menu', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[disable_menu_desc]" id="disable_menu_desc" <?php 
    checked($graphene_settings['disable_menu_desc']);
    ?>
 value="true" data-toggleOptions="true" /></td>
                    </tr>
                </table>
                <table class="form-table<?php 
    if ($graphene_settings['disable_menu_desc'] == true) {
        echo ' hide';
    }
    ?>
">
                    <tr>
                        <th scope="row">
                            <label for="navmenu_home_desc"><?php 
    _e('Description for default menu "Home" item', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                        	<input type="text" size="60" name="graphene_settings[navmenu_home_desc]" id="navmenu_home_desc" value="<?php 
    echo $graphene_settings['navmenu_home_desc'];
    ?>
" /><br />
                            <span class="description"><?php 
    _e('Only required if you need a description in the navigation menu and you are not using a custom menu.', 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
            
        <?php 
    /* Miscellaneous Display Options */
    ?>
        <div class="postbox">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Miscellaneous_Display_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Miscellaneous Display Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <h4 class="non-essential-option"><?php 
    _e('Site title options', 'graphene');
    ?>
</h4>
                <p class="non-essential-option"><?php 
    _e('Use these tags to customise your own site title structure: <code>#site-name</code>, <code>#site-desc</code>, <code>#post-title</code>', 'graphene');
    ?>
</p>
                <table class="form-table non-essential-option">
                	<tr>
                        <th scope="row" style="width:250px;">
                        	<label for="custom_site_title_frontpage"><?php 
    _e("Custom front page site title", 'graphene');
    ?>
</label>
                        </th>
                        <td>
                        	<input type="text" name="graphene_settings[custom_site_title_frontpage]" id="custom_site_title_frontpage" class="widefat code" value="<?php 
    echo stripslashes($graphene_settings['custom_site_title_frontpage']);
    ?>
" />
                            <span class="description"><?php 
    _e('Defaults to <code>#site-name &raquo; #site-desc</code>. The <code>#post-title</code> tag cannot be used here.', 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row" style="width:250px;">
                        	<label for="custom_site_title_content"><?php 
    _e("Custom content pages site title", 'graphene');
    ?>
</label>
                        </th>
                        <td>
                        	<input type="text" name="graphene_settings[custom_site_title_content]" id="custom_site_title_content" class="widefat code" value="<?php 
    echo stripslashes($graphene_settings['custom_site_title_content']);
    ?>
" />
                            <span class="description"><?php 
    _e('Defaults to <code>#post-title &raquo; #site-name</code>.', 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                </table>
                
                <h4><?php 
    _e('Favicon options', 'graphene');
    ?>
</h4>
                <table class="form-table">
                    <tr>
                        <th scope="row" style="width:250px;">
                        	<label for="favicon_url"><?php 
    _e('Favicon URL', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                        	<input type="text" class="widefat code" value="<?php 
    echo esc_url($graphene_settings['favicon_url']);
    ?>
" name="graphene_settings[favicon_url]" id="favicon_url" />
                                <span class="description"><a href="#" class="upload_image_button"><?php 
    _e('Upload or select image from gallery', 'graphene');
    ?>
</a> - <?php 
    _e('Simply enter the full URL to your favicon file here to enable favicon. Make sure you include the <code>http://</code> in front of the URL as well. Or use the WordPress media uploader to upload an image, or select one from the media library.', 'graphene');
    ?>
</span>                                
                        </td>
                    </tr>
                </table>
                
                <h4><?php 
    _e('WordPress Editor options', 'graphene');
    ?>
</h4>
                <table class="form-table">
                    <tr>
                        <th scope="row" style="width:250px;">
                        	<label for="disable_editor_style"><?php 
    _e('Disable custom editor styles', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[disable_editor_style]" id="disable_editor_style" <?php 
    checked($graphene_settings['disable_editor_style']);
    ?>
 value="true" /></td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
                    
                    
        <?php 
    /* Custom CSS */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
            	<div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Custom_CSS');
    ?>
            	<h3 class="hndle"><?php 
    _e('Custom CSS', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="row"><label for="custom_css"><?php 
    _e('Custom CSS styles', 'graphene');
    ?>
</label></th>
                        <td>
                        	<span class="description"><?php 
    _e("You can enter your own CSS codes below to modify any other aspects of the theme's appearance that is not included in the options.", 'graphene');
    ?>
</span>
                        	<textarea name="graphene_settings[custom_css]" id="custom_css" cols="60" rows="20" class="widefat code"><?php 
    echo stripslashes($graphene_settings['custom_css']);
    ?>
</textarea>
                            <script type="text/javascript">
								var customCSS = CodeMirror.fromTextArea(document.getElementById("custom_css"), {
													mode: 'css',
													lineNumbers: true,
													lineWrapping: true,
													indentUnit: 4,
													styleActiveLine: true
												});
							</script>
                        </td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>                  
        
<?php 
}
コード例 #2
0
function graphene_options_general()
{
    global $graphene_settings;
    ?>
        <input type="hidden" name="graphene_general" value="true" />
        
        <?php 
    /* Slider Options */
    ?>
        <div class="postbox">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Slider_options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Slider Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="slider_disable"><?php 
    _e('Disable slider', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[slider_disable]" id="slider_disable" <?php 
    checked($graphene_settings['slider_disable']);
    ?>
 value="true" data-toggleOptions="true" /></td>
                    </tr>
                </table>
                <table class="form-table<?php 
    if ($graphene_settings['slider_disable'] == true) {
        echo ' hide';
    }
    ?>
">
                	<tr>
                        <th scope="row">
                            <label for="slider_full_width"><?php 
    _e('Extend slider to full width of the theme', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[slider_full_width]" id="slider_full_width" <?php 
    checked($graphene_settings['slider_full_width']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label><?php 
    _e('What do you want to show in the slider', 'graphene');
    ?>
</label><br />                            
                        </th>
                        <td>
                            <input type="radio" name="graphene_settings[slider_type]" value="latest_posts" class="slider-type" id="slider_type_latest_posts" <?php 
    checked($graphene_settings['slider_type'], 'latest_posts');
    ?>
/>
                            <label for="slider_type_latest_posts"><?php 
    _e('Show latest posts', 'graphene');
    ?>
</label>                            
                            <br />
                            <input type="radio" name="graphene_settings[slider_type]" value="random" class="slider-type" id="slider_type_random" <?php 
    checked($graphene_settings['slider_type'], 'random');
    ?>
/>
                            <label for="slider_type_random"><?php 
    _e('Show random posts', 'graphene');
    ?>
</label>
                            <br />
                            <input type="radio" name="graphene_settings[slider_type]" value="posts_pages" class="slider-type" id="slider_type_posts_pages" <?php 
    checked($graphene_settings['slider_type'], 'posts_pages');
    ?>
/>
                            <label for="slider_type_posts_pages"><?php 
    _e('Show specific posts/pages', 'graphene');
    ?>
</label>                            
                            <br />
                            <input type="radio" name="graphene_settings[slider_type]" value="categories" class="slider-type" id="slider_type_categories" <?php 
    checked($graphene_settings['slider_type'], 'categories');
    ?>
/>
                            <label for="slider_type_categories"><?php 
    _e('Show posts from categories', 'graphene');
    ?>
</label>                            
                        </td>
                    </tr>
                    <tr class="row_slider_type_posts_pages<?php 
    if ($graphene_settings['slider_type'] != 'posts_pages') {
        echo ' hide';
    }
    ?>
">
                        <th scope="row">
                            <label for="slider_specific_posts"><?php 
    _e('Posts and/or pages to display', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <input type="text" name="graphene_settings[slider_specific_posts]" id="slider_specific_posts" value="<?php 
    echo $graphene_settings['slider_specific_posts'];
    ?>
" size="60" class="wide code" /><br />
                            <span class="description">
							<?php 
    _e('Enter ID of posts and/or pages to be displayed, separated by comma. Example: <code>1,13,45,33</code>', 'graphene');
    ?>
<br />
							<?php 
    _e('Applicable only if <strong>Show specific posts/pages</strong> is selected above.', 'graphene');
    ?>
                            </span>                        
                        </td>
                    </tr>
                    <tr class="row_slider_type_categories<?php 
    if ($graphene_settings['slider_type'] != 'categories') {
        echo ' hide';
    }
    ?>
">
                        <th scope="row">
                            <label for="slider_specific_categories"><?php 
    _e('Categories to display', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <select name="graphene_settings[slider_specific_categories][]" id="slider_specific_categories" multiple="multiple" class="select-multiple chzn-select" data-placeholder="<?php 
    _e('Click to select categories or type to search', 'graphene');
    ?>
">
                               <?php 
    /* Get the list of categories */
    $selected_cats = $graphene_settings['slider_specific_categories'];
    $categories = get_categories(array('hide_empty' => false));
    foreach ($categories as $category) {
        ?>
                                <option value="<?php 
        echo $category->cat_ID;
        ?>
" <?php 
        if ($selected_cats && in_array($category->cat_ID, $selected_cats)) {
            echo 'selected="selected"';
        }
        ?>
><?php 
        echo $category->cat_name;
        ?>
</option>
                                <?php 
    }
    ?>
 
                            </select><br />
                            <span class="description"><?php 
    _e('All posts within the categories selected here will be displayed on the slider. Usage example: create a new category "Featured" and assign all posts to be displayed on the slider to that category, and then select that category here.', 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                    <tr class="row_slider_type_categories<?php 
    if ($graphene_settings['slider_type'] != 'categories') {
        echo ' hide';
    }
    ?>
">
                        <th scope="row">
                            <label for="slider_specific_categories"><?php 
    _e('Exclude the categories from posts listing', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                        	<select name="graphene_settings[slider_exclude_categories]" class="chzn-select">
                        		<option type="radio" name="graphene_settings[slider_exclude_categories]" id="slider_exclude_categories_disabled" <?php 
    selected($graphene_settings['slider_exclude_categories'], 'disabled');
    ?>
 value="disabled" data-toggleOptions="true"><?php 
    _e('Disabled', 'graphene');
    ?>
</option>
                                <option type="radio" name="graphene_settings[slider_exclude_categories]" id="slider_exclude_categories_frontpage" <?php 
    selected($graphene_settings['slider_exclude_categories'], 'frontpage');
    ?>
 value="homepage" data-toggleOptions="true"><?php 
    _e('Home Page', 'graphene');
    ?>
</option>
                                <option type="radio" name="graphene_settings[slider_exclude_categories]" id="slider_exclude_categories_everywhere" <?php 
    selected($graphene_settings['slider_exclude_categories'], 'everywhere');
    ?>
 value="everywhere" data-toggleOptions="true"><?php 
    _e('Everywhere', 'graphene');
    ?>
</option>
                            </select>
                        </td>
                    </tr>
                    <tr class="row_slider_type_categories<?php 
    if ($graphene_settings['slider_type'] != 'categories') {
        echo ' hide';
    }
    ?>
">
                        <th scope="row">
                            <label for="slider_random_category_posts"><?php 
    _e('Show posts from categories in random order', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                        	<input type="checkbox" name="graphene_settings[slider_random_category_posts]" id="slider_random_category_posts" <?php 
    checked($graphene_settings['slider_random_category_posts']);
    ?>
 value="true" data-toggleOptions="true" />
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="slider_postcount"><?php 
    _e('Number of posts to display', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <input type="text" name="graphene_settings[slider_postcount]" id="slider_postcount" value="<?php 
    echo $graphene_settings['slider_postcount'];
    ?>
" size="3" />
                        </td>
                    </tr>
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="slider_img"><?php 
    _e('Slider image', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <select name="graphene_settings[slider_img]" id="slider_img" class="chzn-select">
                                <option value="disabled" <?php 
    selected($graphene_settings['slider_img'], 'disabled');
    ?>
><?php 
    _e("Don't show image", 'graphene');
    ?>
</option>
                                <option value="featured_image" <?php 
    selected($graphene_settings['slider_img'], 'featured_image');
    ?>
><?php 
    _e("Featured Image", 'graphene');
    ?>
</option>
                                <option value="post_image" <?php 
    selected($graphene_settings['slider_img'], 'post_image');
    ?>
><?php 
    _e("First image in post", 'graphene');
    ?>
</option>
                                <option value="custom_url" <?php 
    selected($graphene_settings['slider_img'], 'custom_url');
    ?>
><?php 
    _e("Custom URL", 'graphene');
    ?>
</option>
                            </select>
                        </td>
                    </tr>
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="slider_imgurl"><?php 
    _e('Custom slider image URL', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <input type="text" name="graphene_settings[slider_imgurl]" id="slider_imgurl" value="<?php 
    echo esc_url($graphene_settings['slider_imgurl']);
    ?>
" size="60" class="widefat code" /><br />
                            <span class="description"><a href="#" class="upload_image_button"><?php 
    _e('Upload or select image from gallery', 'graphene');
    ?>
</a> - <?php 
    _e('Make sure you select Custom URL in the slider image option above to use this custom url.', 'graphene');
    ?>
</span>
                            
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="slider_display_style"><?php 
    _e('Slider display style', 'graphene');
    ?>
</label><br />
                        </th>
                        <td>
                            <select name="graphene_settings[slider_display_style]" id="slider_display_style" class="chzn-select">
                                <option value="thumbnail-excerpt" <?php 
    selected($graphene_settings['slider_display_style'], 'thumbnail-excerpt');
    ?>
><?php 
    _e('Thumbnail and excerpt', 'graphene');
    ?>
</option>
                                <option value="bgimage-excerpt" <?php 
    selected($graphene_settings['slider_display_style'], 'bgimage-excerpt');
    ?>
><?php 
    _e('Background image and excerpt', 'graphene');
    ?>
</option>
                                <option value="full-post" <?php 
    selected($graphene_settings['slider_display_style'], 'full-post');
    ?>
><?php 
    _e('Full post content', 'graphene');
    ?>
</option>
                            </select>
                        </td>
                    </tr>
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="slider_animation"><?php 
    _e('Slider animation', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <select name="graphene_settings[slider_animation]" id="slider_animation" class="chzn-select">
                                <option value="horizontal-slide" <?php 
    selected($graphene_settings['slider_animation'], 'slide');
    ?>
><?php 
    _e('Horizontal slide', 'graphene');
    ?>
</option>
                                <option value="vertical-slide" <?php 
    selected($graphene_settings['slider_animation'], 'vertical-slide');
    ?>
><?php 
    _e('Vertical slide', 'graphene');
    ?>
</option>
                                <option value="fade" <?php 
    selected($graphene_settings['slider_animation'], 'fade');
    ?>
><?php 
    _e('Fade', 'graphene');
    ?>
</option>
                                <option value="none" <?php 
    selected($graphene_settings['slider_animation'], 'none');
    ?>
><?php 
    _e('No effect', 'graphene');
    ?>
</option>
                            </select>
                        </td>
                    </tr>
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="slider_height"><?php 
    _e('Slider height', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <input type="text" name="graphene_settings[slider_height]" id="slider_height" value="<?php 
    echo $graphene_settings['slider_height'];
    ?>
" size="3" /> px                        
                        </td>
                    </tr>
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="slider_speed"><?php 
    _e('Slider speed', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <input type="text" name="graphene_settings[slider_speed]" id="slider_speed" value="<?php 
    echo $graphene_settings['slider_speed'];
    ?>
" size="4" /> <?php 
    _e('milliseconds', 'graphene');
    ?>
<br />
                            <span class="description"><?php 
    _e('This is the duration that each slider item will be shown', 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="slider_trans_speed"><?php 
    _e('Slider transition speed', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                            <input type="text" name="graphene_settings[slider_trans_speed]" id="slider_trans_speed" value="<?php 
    echo $graphene_settings['slider_trans_speed'];
    ?>
" size="4" /> <?php 
    _e('milliseconds', 'graphene');
    ?>
<br />
                            <span class="description"><?php 
    _e('This is the speed of the slider transition. Lower values = higher speed.', 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="slider_position"><?php 
    _e('Move slider to bottom of page', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[slider_position]" id="slider_position" <?php 
    checked($graphene_settings['slider_position']);
    ?>
 value="true" /></td>
                    </tr>                    
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Infinite Scroll */
    ?>
        <div class="postbox">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Infinite_Scroll');
    ?>
        		<h3 class="hndle"><?php 
    _e('Infinite Scroll', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
            	<p><?php 
    _e('Let the theme pull the next set of posts or comments into view when visitor approaches the bottom of the page.', 'graphene');
    ?>
</p>
                <table class="form-table">
                	<tr>
                        <th scope="row">
                        	<label for="inf_scroll_enable"><?php 
    _e('Enable Infinite Scroll', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" id="inf_scroll_enable" name="graphene_settings[inf_scroll_enable]" <?php 
    checked($graphene_settings['inf_scroll_enable']);
    ?>
 value="true" data-toggleOptions="true" /></td>
                    </tr>
                </table>
                
                <table class="form-table<?php 
    if ($graphene_settings['inf_scroll_enable'] != true) {
        echo ' hide';
    }
    ?>
">
                	<tr>
                        <th scope="row">
                        	<label for="inf_scroll_click"><?php 
    _e('Click to fetch more items', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" id="inf_scroll_click" name="graphene_settings[inf_scroll_click]" <?php 
    checked($graphene_settings['inf_scroll_click']);
    ?>
 value="true" /></td>
                    </tr>
                </table>
                
                <h4><?php 
    _e('For comments', 'graphene');
    ?>
</h4>
                
                <table class="form-table">
                	<tr>
                        <th scope="row">
                        	<label for="inf_scroll_comments"><?php 
    _e('Enable Infinite Scroll for comments', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" id="inf_scroll_comments" name="graphene_settings[inf_scroll_comments]" <?php 
    checked($graphene_settings['inf_scroll_comments']);
    ?>
 value="true" /></td>
                    </tr>
                </table>
                                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Front Page Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Front_page_options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Front Page Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
            	<?php 
    if ('page' != get_option('show_on_front')) {
        ?>
                <table class="form-table">       	
                    <tr>
                        <th scope="row">
                            <label for="frontpage_posts_cats"><?php 
        _e('Front page posts categories', 'graphene');
        ?>
</label>
                        </th>
                        <td>                        
                            <select name="graphene_settings[frontpage_posts_cats][]" id="frontpage_posts_cats" multiple="multiple" class="select-multiple chzn-select" data-placeholder="<?php 
        _e('Click to select categories or type to search', 'graphene');
        ?>
">
                                <?php 
        /* Get the list of categories */
        $categories = get_categories(array('hide_empty' => false));
        foreach ($categories as $category) {
            ?>
                                <option value="<?php 
            echo $category->cat_ID;
            ?>
" <?php 
            if (in_array($category->cat_ID, $graphene_settings['frontpage_posts_cats'])) {
                echo 'selected="selected"';
            }
            ?>
><?php 
            echo $category->cat_name;
            ?>
</option>
                                <?php 
        }
        ?>
                            </select>
                            <span class="description"><?php 
        _e('Only posts that belong to the categories selected here will be displayed on the front page.', 'graphene');
        ?>
</span>
                        </td>
                    </tr>
                </table>
                <?php 
    } else {
        ?>
	                <p><?php 
        _e('<strong>Note:</strong> this feature is not available when using a <a href="http://codex.wordpress.org/Creating_a_Static_Front_Page">static front page</a>.', 'graphene');
        ?>
</p>
                <?php 
    }
    ?>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Homepage panes options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
            	<div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Homepage_panes');
    ?>
            	<h3 class="hndle"><?php 
    _e('Homepage Panes', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <?php 
    if ('page' == get_option('show_on_front')) {
        ?>
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="disable_homepage_panes"><?php 
        _e('Disable homepage panes', 'graphene');
        ?>
</label>
                        </th>
                        <td>
                            <input type="checkbox" name="graphene_settings[disable_homepage_panes]" id="disable_homepage_panes" <?php 
        checked($graphene_settings['disable_homepage_panes']);
        ?>
 value="true" data-toggleOptions="true" />
                        </td>
                    </tr>
                </table>
                <table class="form-table site-summary<?php 
        if ($graphene_settings['disable_homepage_panes'] == true) {
            echo ' hide';
        }
        ?>
">
                    <tr>
                    	<th scope="row">
                            <?php 
        _e('Type of content to show', 'graphene');
        ?>
                        </th>
                        <td>
                            <input type="radio" name="graphene_settings[show_post_type]" value="latest-posts" class="homepage-panes-post-type" id="show_post_type_latest-posts" <?php 
        checked($graphene_settings['show_post_type'], 'latest-posts');
        ?>
/>
                            <label for="show_post_type_latest-posts"><?php 
        _e('Latest posts', 'graphene');
        ?>
</label>
                            
                            <input type="radio" name="graphene_settings[show_post_type]" value="cat-latest-posts" class="homepage-panes-post-type" id="show_post_type_cat-latest-posts" <?php 
        checked($graphene_settings['show_post_type'], 'cat-latest-posts');
        ?>
/>
                            <label for="show_post_type_cat-latest-posts"><?php 
        _e('Latest posts by category', 'graphene');
        ?>
</label>
                           
                            <input type="radio" name="graphene_settings[show_post_type]" value="posts" class="homepage-panes-post-type" id="show_post_type_pages" <?php 
        checked($graphene_settings['show_post_type'], 'posts');
        ?>
/>
                            <label for="show_post_type_pages"><?php 
        _e('Posts and/or pages', 'graphene');
        ?>
</label>
                        </td>
                    </tr>
                    <tr id="row_show_post_type_latest-posts"<?php 
        if (!in_array($graphene_settings['show_post_type'], array('latest-posts', 'cat-latest-posts'))) {
            echo ' class="hide"';
        }
        ?>
>
                        <th scope="row">
                            <label for="homepage_panes_count"><?php 
        _e('Number of latest posts to display', 'graphene');
        ?>
</label>
                        </th>
                        <td>
                            <input type="text" name="graphene_settings[homepage_panes_count]" id="homepage_panes_count" value="<?php 
        echo $graphene_settings['homepage_panes_count'];
        ?>
" size="1" />
                        </td>
                    </tr>
                    <tr id="row_show_post_type_cat-latest-posts"<?php 
        if ('cat-latest-posts' != $graphene_settings['show_post_type']) {
            echo ' class="hide"';
        }
        ?>
>
                        <th scope="row">
                            <label for="homepage_panes_cat"><?php 
        _e('Categories to show latest posts from', 'graphene');
        ?>
</label>
                        </th>
                        <td>                            
                            <select name="graphene_settings[homepage_panes_cat][]" id="homepage_panes_cat" multiple="multiple" class="chzn-select select-multiple" data-placeholder="<?php 
        _e('Click to select categories or type to search', 'graphene');
        ?>
">
                                <?php 
        foreach ($categories as $category) {
            ?>
                                <option value="<?php 
            echo $category->cat_ID;
            ?>
" <?php 
            if (in_array($category->cat_ID, (array) $graphene_settings['homepage_panes_cat'])) {
                echo 'selected="selected"';
            }
            ?>
><?php 
            echo $category->cat_name;
            ?>
</option>
                                <?php 
        }
        ?>
                            </select>
                        </td>
                    </tr>
                    <tr id="row_show_post_type_posts"<?php 
        if ('posts' != $graphene_settings['show_post_type']) {
            echo ' class="hide"';
        }
        ?>
>
                        <th scope="row">
                            <label for="homepage_panes_posts"><?php 
        _e('Posts and/or pages to display', 'graphene');
        ?>
</label>
                        </th>
                        <td>
                            <input type="text" name="graphene_settings[homepage_panes_posts]" id="homepage_panes_posts" value="<?php 
        echo $graphene_settings['homepage_panes_posts'];
        ?>
" size="10" class="widefat code" /><br />
                            <span class="description"><?php 
        _e('Enter ID of posts and/or pages to be displayed, separated by comma. Example: <code>1,13,45,33</code>', 'graphene');
        ?>
</span>
                        </td>
                    </tr>                    
                </table>
                <?php 
    } else {
        ?>
                	<p><?php 
        _e('<strong>Note:</strong> this feature is only available when using a <a href="http://codex.wordpress.org/Creating_a_Static_Front_Page">static front page</a>.', 'graphene');
        ?>
</p>
                <?php 
    }
    ?>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Comments Options */
    ?>
        <div class="postbox">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Comments_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Comments Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">       	
                    <tr>
                        <th scope="row">
                            <label for="comments_setting"><?php 
    _e('Commenting', 'graphene');
    ?>
</label>                            
                        </th>
                        <td>
                            <select name="graphene_settings[comments_setting]" id="comments_setting" class="chzn-select">
                                <option value="wordpress" <?php 
    selected($graphene_settings['comments_setting'], 'wordpress');
    ?>
><?php 
    _e('Use WordPress settings', 'graphene');
    ?>
</option>
                                <option value="disabled_pages" <?php 
    selected($graphene_settings['comments_setting'], 'disabled_pages');
    ?>
><?php 
    _e('Disabled for pages', 'graphene');
    ?>
</option>
                                <option value="disabled_completely" <?php 
    selected($graphene_settings['comments_setting'], 'disabled_completely');
    ?>
><?php 
    _e('Disabled completely', 'graphene');
    ?>
</option>                               
                            </select><br />
                            <span class="description"><?php 
    _e('Note: this setting overrides the global WordPress Discussion Setting called "Allow people to post comments on new articles" and also the "Allow comments" option for individual posts/pages.', 'graphene');
    ?>
</span>
                        </td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Child Page Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Child_Page_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Child Page Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">       	
                    <tr>
                        <th scope="row">
                            <label for="hide_parent_content_if_empty"><?php 
    _e('Hide parent box if content is empty', 'graphene');
    ?>
</label>                            
                        </th>
                        <td><input type="checkbox" name="graphene_settings[hide_parent_content_if_empty]" id="hide_parent_content_if_empty" <?php 
    checked($graphene_settings['hide_parent_content_if_empty']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="child_page_listing"><?php 
    _e('Child page listings', 'graphene');
    ?>
</label>                            
                        </th>
                        <td>
                            <select name="graphene_settings[child_page_listing]" id="child_page_listing" class="chzn-select">
                                <option value="show_always" <?php 
    selected($graphene_settings['child_page_listing'], 'show_always');
    ?>
><?php 
    _e('Show listing', 'graphene');
    ?>
</option>
                                <option value="hide" <?php 
    selected($graphene_settings['child_page_listing'], 'hide');
    ?>
><?php 
    _e('Hide listing', 'graphene');
    ?>
</option>
                                <option value="show_if_parent_empty" <?php 
    selected($graphene_settings['child_page_listing'], 'show_if_parent_empty');
    ?>
><?php 
    _e('Only show listing if parent content is empty', 'graphene');
    ?>
</option>
                            </select>
                        </td>                            
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Widget Area Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Widget_Area_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Widget Area Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
            	<h4><?php 
    _e('Header widget area', 'graphene');
    ?>
</h4>
                <p><?php 
    _e('<strong>Important:</strong> This widget area is unstyled, as it is often used for advertisement banners, etc. If you enable it, make sure you style it to your needs using the Custom CSS option.', 'graphene');
    ?>
</p>
                <table class="form-table site-summary">
                    <tr>
                        <th scope="row">
                        	<label for="enable_header_widget"><?php 
    _e('Enable header widget area', 'graphene');
    ?>
</label>
                        </th>
                        <td>
                        	<input type="checkbox" value="true" name="graphene_settings[enable_header_widget]" id="enable_header_widget" <?php 
    checked($graphene_settings['enable_header_widget']);
    ?>
 />
                        </td>
                    </tr>
                </table>
                
                
                <h4><?php 
    _e('Alternate Widgets', 'graphene');
    ?>
</h4>
                <p><?php 
    _e('You can enable the theme to show different widget areas in the front page than the rest of the website. If you enable this option, additional widget areas that will only be displayed on the front page will be added to the Widget settings page.', 'graphene');
    ?>
</p>
                <table class="form-table">       	
                    <tr>
                        <th scope="row" style="width:350px;"><label for="alt_home_sidebar"><?php 
    _e('Enable alternate front page sidebar widget area', 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[alt_home_sidebar]" id="alt_home_sidebar" <?php 
    checked($graphene_settings['alt_home_sidebar']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row"><label for="alt_home_footerwidget"><?php 
    _e('Enable alternate front page footer widget area', 'graphene');
    ?>
</label><br />
                        <small><?php 
    _e('You can also specify different column counts for the front page footer widget and the rest-of-site footer widget if you enable this option.', 'graphene');
    ?>
</small>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[alt_home_footerwidget]" id="alt_home_footerwidget" <?php 
    checked($graphene_settings['alt_home_footerwidget']);
    ?>
 value="true" /></td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
                
        
        <?php 
    /* Top Bar Options */
    ?>
        <div class="postbox">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Top_Bar_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Top Bar Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr class="non-essential-option">
                        <th scope="row">
                            <label for="hide_top_bar"><?php 
    _e('Hide the top bar', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[hide_top_bar]" id="hide_top_bar" <?php 
    checked($graphene_settings['hide_top_bar']);
    ?>
 value="true" data-toggleOptions="true" rel="social-media-table" /></td>
                    </tr>
                </table>
                
                <h4 class="social-media-table<?php 
    if ($graphene_settings['hide_top_bar'] == true) {
        echo ' hide';
    }
    ?>
"><?php 
    _e('Social Media', 'graphene');
    ?>
</h4>
                <table class="form-table social-media-table<?php 
    if ($graphene_settings['hide_top_bar'] == true) {
        echo ' hide';
    }
    ?>
">
                    <tr class="non-essential-option">
                        <th scope="row"><label for="social_media_new_window"><?php 
    _e('Open social media links in new window', 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[social_media_new_window]" id="social_media_new_window" <?php 
    checked($graphene_settings['social_media_new_window']);
    ?>
 value="true" /></td>    
                    </tr>
                    <tr class="non-essential-option">
                		<td colspan="2"><p><?php 
    _e('<strong>Hint:</strong> drag and drop to rearrange the placement of the social media icons.', 'graphene');
    ?>
</p></td>
                	</tr>
                    <tr class="non-essential-option">
                        <td colspan="2" id="socialprofile-sortable">                            
                            <?php 
    /*
     * Available profiles according to the icons available in ElegantThemes Social Media Icon Set
     */
    $available_profiles = array('-', 'Custom', '-', 'Twitter', 'Facebook', 'LinkedIn', 'YouTube', 'RSS', 'Instagram', 'Foursquare', 'AIM', 'Ask', 'Bebo', 'BetVibes', 'BlinkList', 'Blogger', 'Buzz', 'Delicious', 'DeviantArt', 'Digg', 'Diigo', 'Evernote', 'Flickr', 'FriendFeed', 'Friendster', 'Furl', 'Google', 'Google Plus', 'LastFM', 'LiveJournal', 'Mixx', 'MySpace', 'Newsvine', 'Orkut', 'Pinterest', 'Plaxo', 'Plurk', 'Posterous', 'Reddit', 'ShoutWire', 'Spurl', 'Squidoo', 'StumbleUpon', 'Technorati', 'Tumblr', 'Vimeo', 'WordPress', 'Xanga', 'Yahoo!');
    $social_profiles = !empty($graphene_settings['social_profiles']) ? $graphene_settings['social_profiles'] : array();
    ?>
                            <?php 
    if (!in_array(false, $social_profiles)) {
        foreach ($social_profiles as $profile_key => $profile_data) {
            $profile_data['url'] = esc_url($profile_data['url']);
            if ($profile_data['type'] == 'custom') {
                $profile_data['icon_url'] = esc_url($profile_data['icon_url']);
            }
            ?>
                                <table class="form-table socialprofile-table">
                                    <tr>
                                        <th scope="row" rowspan="<?php 
            echo $profile_data['type'] == 'custom' ? '3' : '2';
            ?>
" class="small-row">                            
                                            <?php 
            if ($profile_data['type'] == 'custom') {
                _e('Custom', 'graphene');
            } else {
                echo $profile_data['name'];
            }
            ?>
<br />
                                                <input type="hidden" name="graphene_settings[social_profiles][<?php 
            echo $profile_key;
            ?>
][type]" value="<?php 
            echo esc_attr($profile_data['type']);
            ?>
" />
                                                <input type="hidden" name="graphene_settings[social_profiles][<?php 
            echo $profile_key;
            ?>
][name]" value="<?php 
            echo esc_attr($profile_data['name']);
            ?>
" />
                                            <?php 
            if ($profile_data['type'] == 'custom') {
                ?>
	                                            <img class="mysocial-icon" src="<?php 
                echo $profile_data['icon_url'];
                ?>
" alt="" />
                                            <?php 
            } else {
                ?>
    	                                        <img class="mysocial-icon" src="<?php 
                echo GRAPHENE_ROOTURI . '/images/social/' . $profile_data['type'] . '.png';
                ?>
" alt="" />
                                            <?php 
            }
            ?>
                                        </th>
                                        <th class="small-row"><?php 
            _e('Title attribute', 'graphene');
            ?>
</th>
                                        <td><input type="text" name="graphene_settings[social_profiles][<?php 
            echo $profile_key;
            ?>
][title]" value="<?php 
            echo esc_attr($profile_data['title']);
            ?>
" class="widefat code" /></td>
                                    </tr>
                                    <tr>
                                        <th class="small-row"><?php 
            _e('URL', 'graphene');
            ?>
</th>
                                        <td>
                                            <input type="text" name="graphene_settings[social_profiles][<?php 
            echo $profile_key;
            ?>
][url]" value="<?php 
            echo $profile_data['url'];
            ?>
" class="widefat code" />
                                            <?php 
            if ($profile_data['type'] == 'rss') {
                ?>
                                                <br /><span class="description"><?php 
                _e('Leave the URL empty to use the default RSS URL.', 'graphene');
                ?>
</span>
                                            <?php 
            }
            ?>
                                    <?php 
            if ($profile_data['type'] == 'custom') {
                ?>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th class="small-row"><?php 
                _e('Icon URL', 'graphene');
                ?>
</th>
                                        <td>
                                            <input type="text" name="graphene_settings[social_profiles][<?php 
                echo $profile_key;
                ?>
][icon_url]" value="<?php 
                echo $profile_data['icon_url'];
                ?>
" class="widefat code" />                            
                                    <?php 
            }
            ?>
                                            <br /><span class="delete"><a href="#" class="socialprofile-del"><?php 
            _e('Delete', 'graphene');
            ?>
</a></span>
                                        </td>
                                    </tr>
                                </table>            
							<?php 
        }
    }
    ?>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <table class="socialprofile-dragging">
                                <tr>
                                    <td colspan="2">
                                        <strong><?php 
    _e('Add Social Media Profile', 'graphene');
    ?>
</strong>
                                        <input type="hidden" id="socialprofile-next-index" value="<?php 
    echo count($social_profiles) + 1;
    ?>
" />                                                                                
                                        <input type="hidden" id="new-socialprofile-data" 
                                                data-icon-url="<?php 
    echo esc_attr(GRAPHENE_ROOTURI . '/images/social/');
    ?>
"
                                                data-custom-title="custom"
                                                data-text-icon-url="<?php 
    _e('Icon URL', 'graphene');
    ?>
"
                                                data-text-title-attr="<?php 
    _e('Title attribute', 'graphene');
    ?>
"
                                                data-text-url="<?php 
    _e('URL', 'graphene');
    ?>
"
                                                data-text-delete="<?php 
    _e('Delete', 'graphene');
    ?>
"/>
                                    </td>
                                </tr>
                                <tr>
                                    <th><?php 
    _e('Type', 'graphene');
    ?>
</th>
                                    <td>
                                        <select id="new-socialprofile-type" data-placeholder="<?php 
    _e('Choose type', 'graphene');
    ?>
" class="chzn-select">
                                            <option value=""></option>
                                            <?php 
    foreach ($available_profiles as $profile_type) {
        ?>
                                
                                                <?php 
        if ($profile_type == '-') {
            ?>
                                                <option disabled="disabled" value="-">-----------------------</option>
                                                <?php 
        } elseif ($profile_type == 'Custom') {
            ?>
                                                <option value="custom"><?php 
            _e('Custom', 'graphene');
            ?>
</option>
                                                <?php 
        } else {
            ?>
                                                <option value="<?php 
            echo sanitize_title($profile_type);
            ?>
"><?php 
            echo $profile_type;
            ?>
</option>
                                                <?php 
        }
        ?>
                                            <?php 
    }
    ?>
                                        </select>                            
                                    </td>
                                </tr>
                                <tr>
                                    <th><?php 
    _e('Title attribute', 'graphene');
    ?>
</th>
                                    <td><input type="text" id="new-socialprofile-title" class="widefat code" /></td>
                                </tr>
                                <tr>
                                    <th><?php 
    _e('URL', 'graphene');
    ?>
</th>
                                    <td><input type="text" id="new-socialprofile-url" class="widefat code" />
                                        <span id="new-socialprofile-url-description" class="hide"><?php 
    _e('Leave the URL empty to use the default RSS URL.', 'graphene');
    ?>
</span>
                                    </td>
                                </tr>
                                <tr class="hide">
                                    <th><?php 
    _e('Icon URL', 'graphene');
    ?>
</th>
                                    <td><input type="text" id="new-socialprofile-iconurl" class="widefat code" /></td>
                                </tr>
                                <tr>
                                    <td colspan="2"><a href="#" id="new-socialprofile-add" class="button"><?php 
    _e('Add this social media profile', 'graphene');
    ?>
</a></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Social Sharing Options */
    ?>
        <div class="postbox">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Social_Sharing_Buttons');
    ?>
        		<h3 class="hndle"><?php 
    _e('Social Sharing Buttons', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="row"><label for="show_addthis"><?php 
    _e('Show social sharing button', 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[show_addthis]" id="show_addthis" <?php 
    checked($graphene_settings['show_addthis']);
    ?>
 value="true" data-toggleOptions="true" /></td>
                    </tr>
                </table>
                <table class="form-table<?php 
    if ($graphene_settings['show_addthis'] != true) {
        echo ' hide';
    }
    ?>
">                    
                    <tr>
                        <th scope="row"><label for="show_addthis_page"><?php 
    _e('Show in Pages as well?', 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[show_addthis_page]" id="show_addthis_page" <?php 
    checked($graphene_settings['show_addthis_page']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row"><label for="show_addthis_page"><?php 
    _e('Show in home and archive pages?', 'graphene');
    ?>
</label></th>
                        <td>
                        	<input type="checkbox" name="graphene_settings[show_addthis_archive]" id="show_addthis_archive" <?php 
    checked($graphene_settings['show_addthis_archive']);
    ?>
 value="true" /><br />
                            <span class="description"><?php 
    printf(__("Enabling this will cause the social sharing buttons to appear on posts listing pages, like the home page and archive pages. Use the available tags in the code below to get the post's URL, title, and excerpt. Otherwise, all your buttons will share the same URL and title. If you're using AddThis, see the %s.", 'graphene'), '<a href="http://support.addthis.com/customer/portal/articles/381263-addthis-client-api#.T2UTU9V7lI1">' . __('AddThis Client API', 'graphene') . '</a>');
    ?>
</span>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row"><label for="addthis_location"><?php 
    _e('Social sharing buttons location', 'graphene');
    ?>
</label></th>
                        <td>
                        	<select name="graphene_settings[addthis_location]" id="addthis_location" class="chzn-select">
                        		<option value="post-bottom" <?php 
    selected($graphene_settings['addthis_location'], 'post-bottom');
    ?>
><?php 
    _e('Bottom of posts', 'graphene');
    ?>
</option>
                                <option value="post-top" <?php 
    selected($graphene_settings['addthis_location'], 'post-top');
    ?>
><?php 
    _e('Top of posts', 'graphene');
    ?>
</option>
                                <option value="top-bottom" <?php 
    selected($graphene_settings['addthis_location'], 'top-bottom');
    ?>
><?php 
    _e('Both top and bottom', 'graphene');
    ?>
</option>
                        	</select>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="addthis_code"><?php 
    _e("Your social sharing button code", 'graphene');
    ?>
</label><br />
                            <small><?php 
    _e('You can use codes from any popular social sharing sites, like Facebook, Digg, AddThis, etc.', 'graphene');
    ?>
</small>
                        </th>
                        <td><textarea name="graphene_settings[addthis_code]" id="addthis_code" cols="60" rows="10" class="widefat code"><?php 
    echo htmlentities(stripslashes($graphene_settings['addthis_code']));
    ?>
</textarea>
                        	<span class="description"><?php 
    _e("You may use these tags to get the post's URL, title, and excerpt:", 'graphene');
    ?>
 <code>[#post-url]</code>, <code>[#post-title]</code>, <code>[#post-excerpt]</code></span>
                        </td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div> 
        
        
        <?php 
    /* AdSense Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Adsense_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Adsense Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="row">
                            <label for="show_adsense"><?php 
    _e('Show Adsense advertising', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[show_adsense]" id="show_adsense" <?php 
    checked($graphene_settings['show_adsense']);
    ?>
 value="true" data-toggleOptions="true" /></td>
                    </tr>
                </table>
                <table class="form-table<?php 
    if ($graphene_settings['show_adsense'] == false) {
        echo ' hide';
    }
    ?>
"> 
                    <tr>
                        <th scope="row">
                            <label for="adsense_show_frontpage"><?php 
    _e('Show ads on front page as well', 'graphene');
    ?>
</label>
                        </th>
                        <td><input type="checkbox" name="graphene_settings[adsense_show_frontpage]" id="adsense_show_frontpage" <?php 
    checked($graphene_settings['adsense_show_frontpage']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row">
                            <label for="adsense_code"><?php 
    _e("Your Adsense code", 'graphene');
    ?>
</label>
                        </th>
                        <td><textarea name="graphene_settings[adsense_code]" id="adsense_code" cols="60" rows="10" class="widefat code"><?php 
    echo htmlentities(stripslashes($graphene_settings['adsense_code']));
    ?>
</textarea></td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Google Analytics Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Google_Analytics_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Google Analytics Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="row"><label for="show_ga"><?php 
    _e('Enable Google Analytics tracking', 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[show_ga]" id="show_ga" <?php 
    checked($graphene_settings['show_ga']);
    ?>
 value="true" data-toggleOptions="true" /></td>
                    </tr>
                </table>                
                <table class="form-table<?php 
    if ($graphene_settings['show_ga'] == false) {
        echo ' hide';
    }
    ?>
">      
                    <tr>
                        <td colspan="2">
                            <p><?php 
    _e('<strong>Note:</strong> the theme now places the Google Analytics script in the <code>&lt;head&gt;</code> element to better support the new asynchronous Google Analytics script. Please make sure you update your script to use the new asynchronous script from Google Analytics.', 'graphene');
    ?>
</p>
                        </td>
                    </tr>                    
                    <tr>
                        <th scope="row"><label for="ga_code"><?php 
    _e("Google Analytics tracking code", 'graphene');
    ?>
</label><br />
                        <small><?php 
    _e('Make sure you include the full tracking code (including the <code>&lt;script&gt;</code> and <code>&lt;/script&gt;</code> tags) and not just the <code>UA-#######-#</code> code.', 'graphene');
    ?>
</small>
                        </th>
                        <td><textarea name="graphene_settings[ga_code]" id="ga_code" cols="60" rows="7" class="widefat code"><?php 
    echo htmlentities(stripslashes($graphene_settings['ga_code']));
    ?>
</textarea></td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        
        <?php 
    /* Footer Options */
    ?>
        <div class="postbox non-essential-option">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Footer_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Footer Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">       	
                    <tr>
                        <th scope="row"><label for="show_cc"><?php 
    _e('Use Creative Commons licence for content', 'graphene');
    ?>
</label><br />
                        <span class="cc-logo">&nbsp;</span>
                        <td><input type="checkbox" name="graphene_settings[show_cc]" id="show_cc" <?php 
    checked($graphene_settings['show_cc']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row"><label for="copy_text"><?php 
    _e("Copyright text (html allowed)", 'graphene');
    ?>
</label>
                        <br /><small><?php 
    _e('If this field is empty, the following default copyright text will be displayed:', 'graphene');
    ?>
</small>
                        <p style="background-color:#fff;padding:5px;border:1px solid #ddd;"><small><?php 
    printf('&copy; %1$s %2$s.', date('Y'), get_bloginfo('name'));
    ?>
</small></p>
                        </th>
                        <td><textarea name="graphene_settings[copy_text]" id="copy_text" cols="60" rows="7"><?php 
    echo stripslashes($graphene_settings['copy_text']);
    ?>
</textarea></td>
                    </tr>
                    <tr>
                        <th scope="row"><label for="hide_copyright"><?php 
    _e('Do not show copyright info', 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[hide_copyright]" id="hide_copyright" <?php 
    checked($graphene_settings['hide_copyright']);
    ?>
 value="true" /></td>
                    </tr>
                    <tr>
                        <th scope="row"><label for="hide_return_top"><?php 
    _e('Do not show the "Return to top" link', 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[hide_return_top]" id="hide_return_top" <?php 
    checked($graphene_settings['hide_return_top']);
    ?>
 value="true" /></td>
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div> 
        
        
        <?php 
    /* Print Options */
    ?>
        <div class="postbox">
            <div class="head-wrap">
                <div title="Click to toggle" class="handlediv"><br /></div>
                <?php 
    graphene_docs_link('Print_Options');
    ?>
        		<h3 class="hndle"><?php 
    _e('Print Options', 'graphene');
    ?>
</h3>
            </div>
            <div class="panel-wrap inside">
                <table class="form-table">
                    <tr>
                        <th scope="row"><label for="print_css"><?php 
    _e('Enable print CSS for single posts and pages?', 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[print_css]" id="print_css" <?php 
    checked($graphene_settings['print_css']);
    ?>
 value="true" data-toggleOptions="true" /></td>
                    </tr> 
                </table>
                <table class="form-table<?php 
    if ($graphene_settings['print_css'] == false) {
        echo ' hide';
    }
    ?>
"> 
                    <tr>
                        <th scope="row"><label for="print_button"><?php 
    _e('Show print button', 'graphene');
    ?>
</label></th>
                        <td><input type="checkbox" name="graphene_settings[print_button]" id="print_button" <?php 
    checked($graphene_settings['print_button']);
    ?>
 value="true" /></td>                        
                    </tr>
                </table>
                
                <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
            </div>
        </div>
        
        <script type="text/javascript">
			var codeMirrorOptions = new Object({
								mode: 'text/html',
								htmlMode: true,
								lineNumbers: true,
								lineWrapping: true,
								indentUnit: 4,
								styleActiveLine: true
							});
			var addthis = CodeMirror.fromTextArea(document.getElementById("addthis_code"), codeMirrorOptions);
			var adsense = CodeMirror.fromTextArea(document.getElementById("adsense_code"), codeMirrorOptions);
			var analytics = CodeMirror.fromTextArea(document.getElementById("ga_code"), codeMirrorOptions);
			var copy_text = CodeMirror.fromTextArea(document.getElementById("copy_text"), codeMirrorOptions);
		</script>

<?php 
}
コード例 #3
0
function graphene_options_advanced()
{
    global $graphene_settings;
    ?>
        
    <input type="hidden" name="graphene_advanced" value="true" />    
    
    
    <?php 
    /* Custom <head> tags */
    ?>
    <div class="postbox">
        <div class="head-wrap">
            <div title="Click to toggle" class="handlediv"><br /></div>
            <?php 
    graphene_docs_link('Custom_Head_Tags');
    ?>
            <h3 class="hndle"><?php 
    esc_html_e('Custom <head> Tags', 'graphene');
    ?>
</h3>
        </div>
        <div class="panel-wrap inside">
            <table class="form-table">
                <tr>
                    <th scope="row"><label for="head_tags"><?php 
    esc_html_e('Code to insert into the <head> element', 'graphene');
    ?>
</label></th>
                    <td><textarea name="graphene_settings[head_tags]" id="head_tags" cols="60" rows="7" class="widefat code"><?php 
    echo htmlentities(stripslashes($graphene_settings['head_tags']));
    ?>
</textarea></td>
                </tr>
            </table>
            <script type="text/javascript">
				var customHeadTags = CodeMirror.fromTextArea(document.getElementById("head_tags"), {
										mode: 'text/html',
										htmlMode: true,
										lineNumbers: true,
										lineWrapping: true,
										indentUnit: 4,
										styleActiveLine: true
									});
			</script>
            
            <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
        </div>
    </div>  
    
    
    <?php 
    /* Action hooks widgets areas */
    ?>
    <div class="postbox">
        <div class="head-wrap">
            <div title="Click to toggle" class="handlediv"><br /></div>
            <?php 
    graphene_docs_link('Action_Hooks_Widget_Areas');
    ?>
            <h3 class="hndle"><?php 
    _e('Action Hooks Widget Areas', 'graphene');
    ?>
</h3>
        </div>
        <div class="panel-wrap inside">
        	<p><?php 
    _e("This option enables you to place virtually any content to every nook and cranny in the theme, by attaching widget areas to the theme's action hooks.", 'graphene');
    ?>
</p>
            <p><?php 
    _e("All action hooks available in the Graphene Theme are listed below. Click on the filename to display all the action hooks available in that file. Then, tick the checkbox next to an action hook to make a widget area available for that action hook.", 'graphene');
    ?>
</p>
            <p><?php 
    printf(__('To see a visual map showing where each action hook in Graphene is located, visit this page: %s', 'graphene'), '<a href="http://demo.graphene-theme.com/graphene-hooks-map/" target="_blank">' . __('Graphene Action Hooks Map', 'graphene') . '</a>');
    ?>
</p>
            
            <ul class="graphene-action-hooks">    
                <?php 
    $actionhooks = graphene_get_action_hooks();
    foreach ($actionhooks as $actionhook) {
        $file = $actionhook['file'];
        ?>
                    <li>
                        <p class="hooks-file"><a href="#" class="toggle-widget-hooks" title="<?php 
        _e('Click to show/hide the action hooks for this file', 'graphene');
        ?>
"><?php 
        echo $file;
        ?>
</a></p>
                        <ul class="hooks-list">
                            <li class="widget-hooks<?php 
        if (count(array_intersect($actionhook['hooks'], $graphene_settings['widget_hooks'])) == 0) {
            echo ' hide';
        }
        ?>
">
								<?php 
        foreach ($actionhook['hooks'] as $hook) {
            ?>
                                    <input type="checkbox" name="graphene_settings[widget_hooks][]" value="<?php 
            echo $hook;
            ?>
" id="hook_<?php 
            echo $hook;
            ?>
" <?php 
            if (in_array($hook, $graphene_settings['widget_hooks'])) {
                echo 'checked="checked"';
            }
            ?>
 /> <label for="hook_<?php 
            echo $hook;
            ?>
"><?php 
            echo $hook;
            ?>
</label><br />
                                <?php 
        }
        ?>
                            </li>
                        </ul>
                    </li>
                <?php 
    }
    ?>
            </ul>
            
            <p class="submit clearfix">
            	<a href="themes.php?page=graphene_options&tab=advanced&rescan_hooks=true" class="button"><?php 
    _e('Rescan action hooks', 'graphene');
    ?>
</a>
            	<input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" />
            </p>
        </div>
    </div>
    
    <?php 
    /* Move generated CSS */
    ?>
    <div class="postbox">
        <div class="head-wrap nodocs">
            <div title="Click to toggle" class="handlediv"><br /></div>
            <h3 class="hndle"><?php 
    _e('Move generated CSS', 'graphene');
    ?>
</h3>
        </div>
        <div class="panel-wrap inside">
        	<?php 
    $styles = graphene_custom_style(false, true, true);
    ?>
        	<p>
				<?php 
    printf(__("If you're using a child theme, you can move the CSS codes generated by the theme into the child theme's %s file.", 'graphene'), '<code>style.css</code>');
    ?>
                <?php 
    printf(__("The CSS codes are generated from the various customisation options in the theme's options pages, including any codes you have entered in the Custom CSS option.", 'graphene'), '<code>style.css</code>');
    ?>
            </p>
            <p>
                <?php 
    printf(__("This will reduce up to %.1f KB on every page load for your site.", 'graphene'), strlen($styles) / 1024);
    ?>
            </p>
            <p>
            	<?php 
    printf(__("You will need to update your child theme's %s file everytime you change any options that rely on CSS to be implemented, such as column widths and colours.", 'graphene'), '<code>style.css</code>');
    ?>
            </p>
            <table class="form-table">
                <tr>
                    <th scope="row">
                        <label for="disable_css_generate"><?php 
    _e('I have moved the generated CSS', 'graphene');
    ?>
</label>
                    </th>
                    <td><input type="checkbox" name="graphene_settings[disable_css_generate]" id="disable_css_generate" <?php 
    checked($graphene_settings['disable_css_generate']);
    ?>
 value="true" /></td>
                </tr>
                <tr>
                    <th scope="row"><?php 
    _e('CSS codes generated by the theme', 'graphene');
    ?>
</th>
                    <td class="generated-css-wrap">
                    	<a href="#" class="select-all" rel="generated-css"><?php 
    _e('Select all', 'graphene');
    ?>
</a>
                    	<div class="widefat code" id="generated-css"><?php 
    echo $styles;
    ?>
</div>
                    </td>
                </tr>
            </table>
            
            <p class="submit clearfix"><input type="submit" class="button" value="<?php 
    _e('Save All Options', 'graphene');
    ?>
" /></p>
        </div>
    </div>
    
<?php 
}