Пример #1
0
/**
 * Creates a meta box that allows users to customize their scripts.
 */
function omega_meta_box_theme_display_scripts()
{
    ?>
	<p>
		<label for="<?php 
    echo omega_settings_field_id('header_scripts');
    ?>
"><?php 
    printf(__('Insert scripts or code before the closing %s tag in the document source', 'omega'), '<code>&lt;/head&gt;</code>');
    ?>
:</label>
	</p>
	
	<textarea name="<?php 
    echo omega_settings_field_name('header_scripts');
    ?>
" id="<?php 
    echo omega_settings_field_id('header_scripts');
    ?>
" cols="78" rows="8"><?php 
    echo omega_get_setting('header_scripts');
    ?>
</textarea>


	<p>
		<label for="<?php 
    echo omega_settings_field_id('footer_scripts');
    ?>
"><?php 
    printf(__('Insert scripts or code before the closing %s tag in the document source', 'omega'), '<code>&lt;/body&gt;</code>');
    ?>
:</label>
	</p>

	<textarea name="<?php 
    echo omega_settings_field_name('footer_scripts');
    ?>
" id="<?php 
    echo omega_settings_field_id('footer_scripts');
    ?>
" cols="78" rows="8"><?php 
    echo omega_get_setting('footer_scripts');
    ?>
</textarea>


<?php 
}
Пример #2
0
/**
 * Callback for Theme Settings Comments meta box.
 */
function omega_meta_box_theme_display_comments()
{
    ?>
	<p>
		<?php 
    _e('Enable Comments', 'omega');
    ?>
		<label for="<?php 
    echo omega_settings_field_id('comments_posts');
    ?>
" title="Enable comments on posts"><input type="checkbox" name="<?php 
    echo omega_settings_field_name('comments_posts');
    ?>
" id="<?php 
    echo omega_settings_field_id('comments_posts');
    ?>
" value="1"<?php 
    checked(omega_get_setting('comments_posts'));
    ?>
 />
		<?php 
    _e('on posts?', 'omega');
    ?>
</label>

		<label for="<?php 
    echo omega_settings_field_id('comments_pages');
    ?>
" title="Enable comments on pages"><input type="checkbox" name="<?php 
    echo omega_settings_field_name('comments_pages');
    ?>
" id="<?php 
    echo omega_settings_field_id('comments_pages');
    ?>
" value="1"<?php 
    checked(omega_get_setting('comments_pages'));
    ?>
 />
		<?php 
    _e('on pages?', 'omega');
    ?>
</label>
	</p>

	<p>
		<?php 
    _e('Enable Trackbacks', 'omega');
    ?>
		<label for="<?php 
    echo omega_settings_field_id('trackbacks_posts');
    ?>
" title="Enable trackbacks on posts"><input type="checkbox" name="<?php 
    echo omega_settings_field_name('trackbacks_posts');
    ?>
" id="<?php 
    echo omega_settings_field_id('trackbacks_posts');
    ?>
" value="1"<?php 
    checked(omega_get_setting('trackbacks_posts'));
    ?>
 />
		<?php 
    _e('on posts?', 'omega');
    ?>
</label>

		<label for="<?php 
    echo omega_settings_field_id('trackbacks_pages');
    ?>
" title="Enable trackbacks on pages"><input type="checkbox" name="<?php 
    echo omega_settings_field_name('trackbacks_pages');
    ?>
" id="<?php 
    echo omega_settings_field_id('trackbacks_pages');
    ?>
" value="1"<?php 
    checked(omega_get_setting('trackbacks_pages'));
    ?>
 />
		<?php 
    _e('on pages?', 'omega');
    ?>
</label>
	</p>

	<p><span class="description"><?php 
    _e('Comments and Trackbacks can also be disabled on a per post/page basis when creating/editing posts/pages.', 'omega');
    ?>
</span></p>

<?php 
}
Пример #3
0
/**
 * Callback for Theme Settings Post Archives meta box.
 */
function omega_meta_box_theme_display_archives()
{
    ?>
	<p>
		<label for="<?php 
    echo omega_settings_field_id('content_archive');
    ?>
"><?php 
    _e('Select one of the following:', 'omega');
    ?>
</label>
		<select name="<?php 
    echo omega_settings_field_name('content_archive');
    ?>
" id="<?php 
    echo omega_settings_field_id('content_archive');
    ?>
">
		<?php 
    $archive_display = apply_filters('omega_archive_display_options', array('full' => __('Display full post', 'omega'), 'excerpts' => __('Display post excerpts', 'omega')));
    foreach ((array) $archive_display as $value => $name) {
        echo '<option value="' . esc_attr($value) . '"' . selected(omega_get_setting('content_archive'), esc_attr($value), false) . '>' . esc_html($name) . '</option>' . "\n";
    }
    ?>
		</select>
	</p>

	<div id="omega_more_link_scroll" <?php 
    if ('full' != omega_get_setting('content_archive')) {
        echo 'class="hidden"';
    }
    ?>
>
	<p>
		<label for="<?php 
    echo omega_settings_field_id('more_link_scroll');
    ?>
"><input type="checkbox" name="<?php 
    echo omega_settings_field_name('more_link_scroll');
    ?>
" id="<?php 
    echo omega_settings_field_id('more_link_scroll');
    ?>
" value="1" <?php 
    checked(omega_get_setting('more_link_scroll'));
    ?>
 />
		<?php 
    _e('Prevent page scroll when clicking the More Link', 'omega');
    ?>
</label>
	</p>
	</div>

	<div id="omega_content_limit_setting" <?php 
    if ('full' == omega_get_setting('content_archive')) {
        echo 'class="hidden"';
    }
    ?>
>
		<p>
			<label for="<?php 
    echo omega_settings_field_id('content_archive_limit');
    ?>
"><?php 
    _e('Limit content to', 'omega');
    ?>
			<input type="text" name="<?php 
    echo omega_settings_field_name('content_archive_limit');
    ?>
" id="<?php 
    echo omega_settings_field_id('content_archive_limit');
    ?>
" value="<?php 
    echo esc_attr(omega_get_setting('content_archive_limit'));
    ?>
" size="3" />
			<?php 
    _e('characters', 'omega');
    ?>
</label>
		</p>

		<p><span class="description"><?php 
    _e('Select "Display post excerpts" will limit the text and strip all formatting from the text displayed. Set 0 characters will display the first 55 words (default)', 'omega');
    ?>
</span></p>
	</div>

	<p>
		<?php 
    _e('More Text (if applicable):', 'omega');
    ?>
 <input type="text" name="<?php 
    echo omega_settings_field_name('content_archive_more');
    ?>
" id="<?php 
    echo omega_settings_field_id('content_archive_more');
    ?>
" value="<?php 
    echo esc_attr(omega_get_setting('content_archive_more'));
    ?>
" size="25" />			
	</p>

	<p class="collapsed">
		<label for="<?php 
    echo omega_settings_field_id('content_archive_thumbnail');
    ?>
"><input type="checkbox" name="<?php 
    echo omega_settings_field_name('content_archive_thumbnail');
    ?>
" id="<?php 
    echo omega_settings_field_id('content_archive_thumbnail');
    ?>
" value="1" <?php 
    checked(omega_get_setting('content_archive_thumbnail'));
    ?>
 />
		<?php 
    _e('Include the Featured Image?', 'omega');
    ?>
</label>
	</p>

	<p id="omega_image_size" <?php 
    if (!omega_get_setting('content_archive_thumbnail')) {
        echo 'class="hidden"';
    }
    ?>
>
		<label for="<?php 
    echo omega_settings_field_id('image_size');
    ?>
"><?php 
    _e('Image Size:', 'omega');
    ?>
</label>
		<select name="<?php 
    echo omega_settings_field_name('image_size');
    ?>
" id="<?php 
    echo omega_settings_field_id('image_size');
    ?>
">
		<?php 
    $sizes = omega_get_image_sizes();
    foreach ((array) $sizes as $name => $size) {
        echo '<option value="' . esc_attr($name) . '"' . selected(omega_get_setting('image_size'), $name, FALSE) . '>' . esc_html($name) . ' (' . absint($size['width']) . ' &#x000D7; ' . absint($size['height']) . ')</option>' . "\n";
    }
    ?>
		</select>
	</p>
	<p>
		<label for="<?php 
    echo omega_settings_field_id('posts_nav');
    ?>
"><?php 
    _e('Select Post Navigation Format:', 'omega');
    ?>
</label>
		<select name="<?php 
    echo omega_settings_field_name('posts_nav');
    ?>
" id="<?php 
    echo omega_settings_field_id('posts_nav');
    ?>
">
			<option value="prev-next"<?php 
    selected('prev-next', omega_get_setting('posts_nav'));
    ?>
><?php 
    _e('Previous / Next', 'omega');
    ?>
</option>
			<option value="numeric"<?php 
    selected('numeric', omega_get_setting('posts_nav'));
    ?>
><?php 
    _e('Numeric', 'omega');
    ?>
</option>
		</select>
	</p>
	<p><span class="description"><?php 
    _e('These options will affect any blog listings page, including archive, author, blog, category, search, and tag pages.', 'omega');
    ?>
</span></p>	
	<p>
		<label for="<?php 
    echo omega_settings_field_id('single_nav');
    ?>
"><input type="checkbox" name="<?php 
    echo omega_settings_field_name('single_nav');
    ?>
" id="<?php 
    echo omega_settings_field_id('single_nav');
    ?>
" value="1" <?php 
    checked(omega_get_setting('single_nav'));
    ?>
 />
		<?php 
    _e('Disable single post navigation link?', 'omega');
    ?>
</label>
	</p>

<?php 
}