Merge branch 'master' of github.com:neuf/studio11-theme

This commit is contained in:
Øyvind Bakkeli committed 2011-07-31 20:12:15 +02:00
commit 9fb0e1bee8
3 files changed
+27 -10

No files matched your search

+5 -1
View File
@@ -27,9 +27,10 @@ if($menu_id)
}
else
{
echo "No frontpage menu configured";
echo '<a href="' . admin_url('admin.php?page=studio_lol_settings') . '">No frontpage menu configured</a>';
$items = array();
}
foreach($items as $item)
{
wp_reset_postdata();
@@ -61,8 +62,11 @@ foreach($items as $item)
if($query)
{
$id = strtolower(preg_replace('#[^\w]+#', '', $item->title));
echo "<div class=\"content\" id=\"{$id}\">";
if($pre) echo $pre;
query_posts($query);
get_template_part( 'loop', $loop);
+5 -3
View File
@@ -193,7 +193,7 @@ add_action('admin_menu', 'studio_create_menu');
function studio_create_menu() {
//create new top-level menu
add_menu_page('Studio theme settings', 'Studio theme settings', 'administrator', __FILE__, 'studio_settings_page',plugins_url('/images/icon.png', __FILE__));
add_menu_page('Studio theme settings', 'Studio theme settings', 'administrator', 'studio_lol_settings', 'studio_settings_page',plugins_url('/images/icon.png', __FILE__));
//call register settings function
add_action( 'admin_init', 'register_studio_settings' );
@@ -223,7 +223,7 @@ $menus = wp_get_nav_menus( );
<select name="front_menu_id">
<?php foreach($menus as $menu): ?>
<option value="<?php echo $menu->term_id ?>" <?php if($menu->term_id == get_option('front_menu_id')) echo ' selected="selected"'?> ><?php echo $menu->name ?></option>
<label for="front_menu_id">Hvilken meny skal fremsiden hentes fra?</label><option value="<?php echo $menu->term_id ?>" <?php if($menu->term_id == get_option('front_menu_id')) echo ' selected="selected"'?> ><?php echo $menu->name ?></option>
<?php endforeach; ?>
</select>
<p class="submit">
@@ -231,4 +231,6 @@ $menus = wp_get_nav_menus( );
</p>
</form>
</div>
<?php } ?>
<?php }
+17 -6
View File
@@ -68,6 +68,7 @@ function showUrlModal(href)
},
onClose: function (dialog) {
setLocationWithoutScrolling(preModal);
dialog.data.slideUp('fast', function () {
dialog.overlay.slideUp('fast', function () {
@@ -88,6 +89,9 @@ function setLocationWithoutScrolling(location)
{
var from = $j("body").scrollTop();
if(!from) from = $j("html").scrollTop();
if(location.indexOf("#") == -1) location += "#";
window.location = location;
$j("body,html").scrollTop(from);
}
@@ -109,21 +113,28 @@ $j(function()
var modal_not_match = Array(/wp-admin/);
$j(".content .post [href],#header [href]").live('click',function(e)
$j(".content .post,#header [href]").live('click',function(e)
{
preModal = window.location.href;
e.preventDefault();
if($j(this).attr('href'))
href = this.href;
else
href = $j(this).find("[href]").attr('href');
for(var i = 0; i < modal_match.length; i++)
if(this.href.match(modal_match[i]))
if(href.match(modal_match[i]))
break;
if(i == modal_match.length) return;
for(var i = 0; i < modal_not_match.length; i++)
if(this.href.match(modal_not_match[i]))
if(href.match(modal_not_match[i]))
return;
showUrlModal(this.href);
e.preventDefault();
var href = this.href.substr(<?php echo strlen(home_url()) ?>);
showUrlModal(href);
href = href.substr(<?php echo strlen(home_url()) ?>);
window.location = window.location.href.split("#")[0] + "#" + href;
});
$j("#simplemodal-overlay").live('click', function(){