Permalink
Browse files

Kuler shortcode.

  • Loading branch information...
1 parent ecac1a2 commit a6acbd15174be2256b8e6346a2359c3a18de5726 @zamoose committed Apr 20, 2012
Showing with 19 additions and 2 deletions.
  1. +1 −1 include/lbcb-cpt.php
  2. +18 −1 include/lbcb-output.php
View
@@ -164,7 +164,7 @@ function lbcb_insert_colorbox( $colorbox = array() ){
$post = array(
'post_type' => 'colorbox',
'post_title' => $colorbox['title'],
- 'post_status' => 'draft',
+ 'post_status' => 'publish',
);
$cb_ID = wp_insert_post( $post );
View
@@ -124,4 +124,21 @@ function lbcb_colorbox_shortcode( $atts ){
the_title();
}
}
-add_shortcode( 'colorbox', 'lbcb_colorbox_shortcode' );
+add_shortcode( 'colorbox', 'lbcb_colorbox_shortcode' );
+
+/**
+ * Shortcode to generate Kuler listings
+ *
+ * @param array $atts
+ */
+function lbcb_kuler_shortcode( $atts ){
+ extract( shortcode_atts( array(
+ 'size' => 'regular',
+ 'display' => 'table',
+ 'type' => 'popular',
+ ''
+ ), $atts ));
+
+ lbcb_kulers_out( $type, $display );
+}
+add_shortcode( 'kuler', 'lbcb_kuler_shortcode' );

0 comments on commit a6acbd1

Please sign in to comment.