|
|
@@ -73,35 +73,25 @@ if ( ! isset( $content_width ) ) {
|
|
|
/************* THUMBNAIL SIZE OPTIONS *************/
|
|
|
|
|
|
// Thumbnail sizes
|
|
|
-add_image_size( 'bones-thumb-600', 600, 150, true );
|
|
|
-add_image_size( 'bones-thumb-300', 300, 100, true );
|
|
|
+add_image_size( 'rl-thumb-600', 600, 150, true );
|
|
|
+add_image_size( 'rl-thumb-300', 300, 100, true );
|
|
|
|
|
|
-/*
|
|
|
-to add more sizes, simply copy a line from above
|
|
|
-and change the dimensions & name. As long as you
|
|
|
-upload a "featured image" as large as the biggest
|
|
|
-set width or height, all the other sizes will be
|
|
|
-auto-cropped.
|
|
|
-
|
|
|
-To call a different size, simply change the text
|
|
|
-inside the thumbnail function.
|
|
|
-
|
|
|
-For example, to call the 300 x 100 sized image,
|
|
|
-we would use the function:
|
|
|
-<?php the_post_thumbnail( 'bones-thumb-300' ); ?>
|
|
|
-for the 600 x 150 image:
|
|
|
-<?php the_post_thumbnail( 'bones-thumb-600' ); ?>
|
|
|
-
|
|
|
-You can change the names and dimensions to whatever
|
|
|
-you like. Enjoy!
|
|
|
-*/
|
|
|
+add_image_size( 'projekt_thumb', 355, 236, true);
|
|
|
+add_image_size( 'general_thumb', 255, 255, true);
|
|
|
+add_image_size( 'slides_thumb', 1920, 600, true);
|
|
|
+
|
|
|
+// add_image_size( 'rl-mitarbeiter', 250, 250, true );
|
|
|
+// add_image_size( 'rl-kunden', 240, 240, true );
|
|
|
|
|
|
add_filter( 'image_size_names_choose', 'bones_custom_image_sizes' );
|
|
|
|
|
|
function bones_custom_image_sizes( $sizes ) {
|
|
|
return array_merge( $sizes, array(
|
|
|
- 'bones-thumb-600' => __('600px by 150px'),
|
|
|
- 'bones-thumb-300' => __('300px by 100px'),
|
|
|
+ 'rl-thumb-600' => __('600px by 150px'),
|
|
|
+ 'rl-thumb-300' => __('300px by 100px'),
|
|
|
+ 'general_thumb' => __('Mitarbeiter'),
|
|
|
+ 'general_thumb' => __('Kunden'),
|
|
|
+ 'projekt_thumb' => __('Projekt'),
|
|
|
) );
|
|
|
}
|
|
|
|
|
|
@@ -530,6 +520,49 @@ function slides() {
|
|
|
register_post_type( 'slides', $args );
|
|
|
}
|
|
|
|
|
|
+add_action('init', 'geschaeftfelder', 0);
|
|
|
+function geschaeftfelder() {
|
|
|
+ $labels = array(
|
|
|
+ 'name' => _x('Geschäftsfelder', 'Post Type General Name', 'theme'),
|
|
|
+ 'singular_name' => _x('Slide', 'Post Type Singular Name', 'theme'),
|
|
|
+ 'menu_name' => __('Geschäftsfelder', 'theme'),
|
|
|
+ 'name_admin_bar' => __('Geschäftsfelder', 'theme'),
|
|
|
+ 'parent_item_colon' => __('Parent geschäftsfelder:', 'theme'),
|
|
|
+ 'all_items' => __('All geschäftsfelder', 'theme'),
|
|
|
+ 'add_new_item' => __('Add New geschäftsfeld', 'theme'),
|
|
|
+ 'add_new' => __('Add New', 'theme'),
|
|
|
+ 'new_item' => __('New geschäftsfeld', 'theme'),
|
|
|
+ 'edit_item' => __('Edit geschäftsfeld', 'theme'),
|
|
|
+ 'update_item' => __('Update geschäftsfeld', 'theme'),
|
|
|
+ 'view_item' => __('View geschäftsfelder', 'theme'),
|
|
|
+ 'search_items' => __('Search geschäftsfelder', 'theme'),
|
|
|
+ 'not_found' => __('Not found', 'theme'),
|
|
|
+ 'not_found_in_trash' => __('Not found in Trash', 'theme'),
|
|
|
+ );
|
|
|
+
|
|
|
+ $args = array(
|
|
|
+ 'label' => __('geschaeftfelder', 'theme'),
|
|
|
+ 'labels' => $labels,
|
|
|
+ 'description' => __('Team', 'theme'),
|
|
|
+ 'supports' => array('title', 'thumbnail'),
|
|
|
+ //'taxonomies' => array('category', 'post_tag'),
|
|
|
+ 'hierarchical' => false,
|
|
|
+ 'public' => true,
|
|
|
+ 'show_ui' => true,
|
|
|
+ 'show_in_menu' => true,
|
|
|
+ 'menu_position' => 11,
|
|
|
+ 'show_in_admin_bar' => true,
|
|
|
+ 'show_in_nav_menus' => true,
|
|
|
+ 'can_export' => true,
|
|
|
+ 'has_archive' => true,
|
|
|
+ 'exclude_from_search' => false,
|
|
|
+ 'publicly_queryable' => true,
|
|
|
+ 'capability_type' => 'page',
|
|
|
+ 'menu_icon' => 'dashicons-building',
|
|
|
+ );
|
|
|
+ register_post_type( 'geschaeftfelder', $args );
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
|
|
|
add_action("admin_init", "admin_init");
|
|
|
@@ -555,7 +588,8 @@ function admin_init(){
|
|
|
add_meta_box("slide-text", "Text", "slide_text", "slides", "normal", "low");
|
|
|
add_meta_box("slide-link-text", "Link-text", "slide_link_text", "slides", "normal", "low");
|
|
|
add_meta_box("slide-link", "Link", "slide_link", "slides", "normal", "low");
|
|
|
-
|
|
|
+ // geschaeftfelder
|
|
|
+ add_meta_box("geschaeftfeld-text", "Text", "geschaeftfeld_text", "geschaeftfelder", "normal", "low");
|
|
|
}
|
|
|
|
|
|
function mitarbeiter_email(){
|
|
|
@@ -699,6 +733,16 @@ function slide_link(){
|
|
|
}
|
|
|
|
|
|
|
|
|
+function geschaeftfeld_text(){
|
|
|
+ global $post;
|
|
|
+ $custom = get_post_custom($post->ID);
|
|
|
+ $geschaeftfeld_text = $custom["geschaeftfeld_text"][0];
|
|
|
+ ?>
|
|
|
+ <label>Text:</label>
|
|
|
+ <input name="geschaeftfeld_text" value="<?php echo $geschaeftfeld_text; ?>" />
|
|
|
+ <?php
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
add_action('save_post', 'save_details');
|
|
|
|
|
|
@@ -724,11 +768,11 @@ function save_details(){
|
|
|
update_post_meta($post->ID, "slide_text", $_POST["slide_text"]);
|
|
|
update_post_meta($post->ID, "slide_link_text", $_POST["slide_link_text"]);
|
|
|
update_post_meta($post->ID, "slide_link", $_POST["slide_link"]);
|
|
|
+ // geschaeftfeld
|
|
|
+ update_post_meta($post->ID, "geschaeftfeld_text", $_POST["geschaeftfeld_text"]);
|
|
|
}
|
|
|
|
|
|
-add_image_size( 'projekt_thumb', 355, 236, true);
|
|
|
-add_image_size( 'general_thumb', 255, 255, true);
|
|
|
-add_image_size( 'slides_thumb', 1920, 600, true);
|
|
|
+
|
|
|
// add_image_size( 'mitarbeiter_thumb', 255, 255, true);
|
|
|
|
|
|
/*
|
|
|
@@ -805,9 +849,15 @@ function display_theme_panel_fields()
|
|
|
|
|
|
}
|
|
|
|
|
|
-add_action("admin_init", "display_theme_panel_fields");
|
|
|
|
|
|
|
|
|
+add_action("admin_init", "display_theme_panel_fields");
|
|
|
+
|
|
|
+function encode_email_shortcode($atts, $content = null) {
|
|
|
+ for ($i = 0; $i < strlen($content); $i++) $encodedmail .= "&#" . ord($content[$i]) . ';';
|
|
|
+ return '<a class="encoded-email" href="mailto:' . $encodedmail . '"><i class="fa fa-envelope" aria-hidden="true"></i></a>';
|
|
|
+}
|
|
|
+add_shortcode('email', 'encode_email_shortcode');
|
|
|
|
|
|
|
|
|
|