This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// add this to any template, e.g. booking-publish.php | |
// echo | |
CB::echo('item', 'mymeta'); // this is the item meta | |
CB::echo('item', 'mymethod'); // this is a method in class item | |
CB::echo('timeframe', 'myproperty'); // this is a property of class timeframe | |
CB::echo('booking', 'myproperty'); // 'booking' is substited with 'timeframe' in CB.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Das folgende CSS wird für alle Benutzeroberflächen geladen. */ | |
/* -------------- HEADER ------------ */ | |
/* Header modifications: Logo */ | |
#p-logo { | |
width: 200px; | |
} | |
/* Header modifications: Hide non-essential Page Tools */ | |
#pt-userpage, #pt-mytalk, #pt-watchlist, #pt-mycontris { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wrap { | |
padding-left: 0 !important; | |
padding-right: 0 !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function create_post_type_items() { | |
register_post_type( 'acme_item', | |
array( | |
'labels' => array( | |
'name' => __( 'CB2 Items' ), | |
'singular_name' => __( 'CB2 Item' ) | |
), | |
'public' => true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Start with an underscore to hide fields from custom fields list | |
$prefix = '_cb2_velogistics_'; | |
/** | |
* Initiate the metabox | |
*/ | |
$cmb = new_cmb2_box( array( | |
'id' => '_cb2_velogistics_', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.single-cb_items .cb-contact, | |
.single-cb_items .cb-opening-hours { | |
display: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<translate> | |
== Veranstaltungen == | |
Veranstaltungen rund um das Thema "Freies Lastenrad". Tragt gerne eure eigenen hier ein. | |
</translate> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array(); | |
$tf = new CB_Timeframe(); | |
$tf->set_context('timeframe'); // either 1) 'timeframe' (default): group by timeframe or 2) 'calendar': group by date or 3) 'admin_table' | |
$timeframes = $tf->get_timeframes( $args ); | |
var_dump($timeframes); | |
?> | |
array (size=2) | |
0 => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery( document ).ready(function() { | |
jQuery('body.toplevel_page_cb_bookings span.delete').hide(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// see https://github.com/flegfleg/cb-temp/blob/master/classes/CB_Object.php#L161 | |
$args = array ( | |
'item_id' => get_the_id(), // This template is called in the loop, so you need to supply the id | |
); | |
$tf = new CB_Timeframe(); | |
$tf->set_context('admin_table'); // either 1) 'timeframe' (default): group by timeframe or 2) 'calendar': group by date or 3) 'admin_table' | |
$tf->get_timeframes( $args ); |