php
// Changes past event views to reverse chronological order
function tribe_past_reverse_chronological ($post_object) {
$past_ajax = (defined( 'DOING_AJAX' ) && DOING_AJAX && $_REQUEST['tribe_event_display'] === 'past') ? true : false;
if(tribe_is_past() || $past_ajax) {
$post_object = array_reverse($post_object);
}
return $post_object;
}
add_filter('the_posts', 'tribe_past_reverse_chronological', 100);
// Adding thumbnails to event widget
function custom_widget_featured_image() {
global $post;
echo tribe_event_featured_image( $post->ID, 'thumbnail' );
}
add_action( 'tribe_events_list_widget_before_the_event_title', 'custom_widget_featured_image' );
// Action Hook, um die eigenen Styles zu integrieren
add_action( 'wp_enqueue_scripts', 'childtheme_styles' );
function childtheme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'parent-style' ));
}
// Listing posts by year on the Event Archive page
function posts_by_year() {
// array to use for results
$years = array();
// get posts from WP
$posts = get_posts(array(
'numberposts' => -1,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'post',
'post_status' => 'publish',
'date_query' => array(array('after' => 'January 1st, 2009','before' => 'January 1st, 2016')),
));
// loop through posts, populating $years arrays
foreach($posts as $post) {
$years[date('Y', strtotime($post->post_date))][] = $post;
}
// reverse sort by year
krsort($years);
return $years;
}
// Adding styles to the backend
function wpb_mce_buttons_2($buttons) {
array_unshift($buttons, 'styleselect');
return $buttons;
}
add_filter('mce_buttons_2', 'wpb_mce_buttons_2');
/*
* Callback function to filter the MCE settings
*/
function my_mce_before_init_insert_formats( $init_array ) {
// Define the style_formats array
$style_formats = array(
// Each array child is a format with it's own settings
array(
'title' => 'Intro text',
'block' => 'p',
'classes' => 'intro',
'wrapper' => false,
),
);
// Insert the array, JSON ENCODED, into 'style_formats'
$init_array['style_formats'] = json_encode( $style_formats );
return $init_array;
}
// Attach callback to 'tiny_mce_before_init'
add_filter( 'tiny_mce_before_init', 'my_mce_before_init_insert_formats' ); include_once './wp-includes/images/wlw/wp-rss.png';
function my_theme_add_editor_styles() {
add_editor_style( 'custom-editor-style.css' );
}
add_action( 'init', 'my_theme_add_editor_styles' );
?>
yesterday's workshop photos – Mz* Baltazar's Lab
Skip to the content
Toggle mobile menu
Toggle search field
So we had 3 layers of fabric: two normal pieces and one of conductive fabric. Then we were sewing lines with conductive thread on the normal fabric. We added two lines of conductive fabric to the first layer to spread the voltage over the entire first layer. The conductive thread had 4,5 Volt running through. Then we added one layer of normal fabric to separate the first and third layer. Finally we added the conductive fabric to the bottom. Now the batterie got connected to the first and third layer, giving ground to the bottom layer (the conductive fabric) and power to the top layer (the conductive thread spreading power of the normal fabric). Now you could take LEDs and stick them through all layers in order to connect the plus “leg” of the LED with the top layer, at the same time connecting the minus “leg” of the LED with ground via the bottom layer. VOILA!