From 5c9d716f3171ba737aef5d397366a6d62f4ee242 Mon Sep 17 00:00:00 2001 From: Sjur Hernes Date: Sun, 3 Jul 2011 20:41:38 +0200 Subject: [PATCH] Hopalong Knut-update and made artist-widget-order random --- .gitmodules | 5 +++- .../plugins/neuf-artist/neuf-artist.php | 25 ++++++++++--------- wp-content/plugins/neuf-events | 2 +- wp-content/plugins/neuf-venues | 1 + wp-content/themes/studio11/functions.php | 5 ++-- 5 files changed, 21 insertions(+), 17 deletions(-) create mode 160000 wp-content/plugins/neuf-venues diff --git a/.gitmodules b/.gitmodules index 371e2fb..2391b3b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "wp-content/plugins/neuf-events"] path = wp-content/plugins/neuf-events - url = git@github.com:neuf/neuf-events.git \ No newline at end of file + url = git@github.com:neuf/neuf-events.git +[submodule "wp-content/plugins/neuf-venues"] + path = wp-content/plugins/neuf-venues + url = git@github.com:neuf/Neuf-Venues.git diff --git a/wp-content/plugins/neuf-artist/neuf-artist.php b/wp-content/plugins/neuf-artist/neuf-artist.php index 7583803..28be562 100644 --- a/wp-content/plugins/neuf-artist/neuf-artist.php +++ b/wp-content/plugins/neuf-artist/neuf-artist.php @@ -81,23 +81,24 @@ if (!class_exists("StudioArtist")) { global $post; - $artist_pop = get_post_meta($post->ID, 'studio_artist_pop' , true); + $artist_font = get_post_meta($post->ID, 'studio_artist_font' , true); $artist_link = get_post_meta($post->ID, 'studio_artist_link', true); - echo "Størrelse:"; - echo ''; + echo $artist_font; - $types = array( array('name'=>'Singstar/Guitarhero', 'size' => 12), - array('name'=>'Liten Artist', 'size' => 15), - array('name'=>'Mellomstor Artist', 'size' => 18), - array('name'=>'Stor', 'size' => 21), - array('name'=>'Enorm', 'size' => 24), + $types = array( array('name' => 'Flink i Guitarhero' , 'size' => 12), + array('name' => 'Liten Artist' , 'size' => 15), + array('name' => 'Mellomstor Artist' , 'size' => 18), + array('name' => 'Stor Artist' , 'size' => 21), + array('name' => 'Oh! Dette blir fest!' , 'size' => 24), + array('name' => 'Hopalong Knut!!' , 'size' => 44), ); foreach($types as $type){ echo ''; } @@ -120,7 +121,7 @@ if (!class_exists("StudioArtist")) { if ( !current_user_can( 'edit_post', $post_id ) ) return $post_id; // Get posted data - $studart['studio_artist_pop'] = $_POST['studio_artist_pop' ]; + $studart['studio_artist_font'] = $_POST['studio_artist_font' ]; $studart['studio_artist_link'] = $_POST['studio_artist_link']; foreach($studart as $key=>$value) @@ -143,7 +144,7 @@ if (!class_exists("StudioArtist")) { while ( $artister->have_posts() ) { $artister->the_post(); - $size = get_post_meta($post->ID, 'studio_artist_pop', true); + $size = get_post_meta($post->ID, 'studio_artist_font', true); $html .= '
  • ' . get_the_title() . '
  • '; } diff --git a/wp-content/plugins/neuf-events b/wp-content/plugins/neuf-events index 2a6064f..861447c 160000 --- a/wp-content/plugins/neuf-events +++ b/wp-content/plugins/neuf-events @@ -1 +1 @@ -Subproject commit 2a6064f3c41b3ac7c5f64c51300252be9a334be0 +Subproject commit 861447c0f54004520f7d88a23e2abae97411dca0 diff --git a/wp-content/plugins/neuf-venues b/wp-content/plugins/neuf-venues new file mode 160000 index 0000000..012e0ec --- /dev/null +++ b/wp-content/plugins/neuf-venues @@ -0,0 +1 @@ +Subproject commit 012e0ec2375fc5b29b489ff1eedabf3db207694b diff --git a/wp-content/themes/studio11/functions.php b/wp-content/themes/studio11/functions.php index c43319a..e0cdd31 100644 --- a/wp-content/themes/studio11/functions.php +++ b/wp-content/themes/studio11/functions.php @@ -48,14 +48,13 @@ class Artist_Widget extends WP_Widget { function widget($args, $instance) { global $post, $wp_locale; $args['title'] = 'Artister'; - $studart = new WP_Query( array('post_type' => 'artist', 'posts_per_page' => -1,'meta_key' => 'studio_artist_pop','orderby' => 'meta_value', 'order' => 'ASC')); + $studart = new WP_Query( array('post_type' => 'artist', 'posts_per_page' => -1, 'orderby' => 'rand')); echo $args['before_widget'] . $args['before_title'] . $args['title'] . $args['after_title']; if ( $studart->have_posts() ) { while ( $studart->have_posts() ) { $studart->the_post(); - echo get_post_meta($post->ID, 'studio_artist_pop', true); $link = get_post_meta($post->ID, 'studio_artist_link', true) ? get_post_meta($post->ID, 'studio_artist_link', true) : get_permalink(); - echo '

    ' . get_the_title() . '

    '; + echo '

    ' . get_the_title() . '

    '; } } echo $args['after_widget']; }