Skip to content

Commit

Permalink
Merge pull request #1485 from RRZE-Webteam/beta
Browse files Browse the repository at this point in the history
Release Version 2.5
  • Loading branch information
xwolfde authored May 31, 2024
2 parents 3db0d6c + 6b60a48 commit 59a7207
Show file tree
Hide file tree
Showing 111 changed files with 3,619 additions and 3,530 deletions.
1 change: 0 additions & 1 deletion 401.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@
</div>
</div>
<?php
get_template_part('template-parts/footer', 'social');
get_footer();
1 change: 0 additions & 1 deletion 403.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@
</div>
</div>
<?php
get_template_part('template-parts/footer', 'social');
get_footer();
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WordPress-Theme für zentrale Einrichtungen der Friedrich-Alexander-Universität

## Version

Version: 2.4.11
Version: 2.5.0

## Screenshot

Expand Down
2 changes: 1 addition & 1 deletion css/fau-theme-admin.css

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @since FAU 1.0
*/

use \RRZE\THEME\EINRICHTUNGEN\Debugging;

get_template_part('template-parts/footer', 'social');

Expand All @@ -32,6 +33,8 @@

<footer id="footer">
<div class="container">


<div class="footer-row">
<div class="footer-logo <?php echo $logoclass; ?>">
<?php if (($website_type == 3 ) && ( is_active_sidebar( 'footer-block1' ) )) {
Expand Down Expand Up @@ -75,9 +78,7 @@
</div>
</div>
</div>
<a href="#pagewrapper" class="top-link">
<?php fau_use_svg("chevron-up-solid",38,38); ?>
<span class="screen-reader-text"><?php echo __('Nach oben','fau'); ?></span></a>
<a href="#pagewrapper" class="top-link"><span class="arrow-up"></span><span class="screen-reader-text"><?php echo __('Nach oben','fau'); ?></span></a>
</footer>
</div>
<?php print_indented("wp_footer",2); ?>
Expand Down
49 changes: 34 additions & 15 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
global $is_gutenberg_enabled;

load_theme_textdomain( 'fau', get_template_directory() . '/languages' );
// Block Editor handling
require_once( get_template_directory() . '/functions/block-editor-support.php');
require_once( get_template_directory() . '/functions/template-functions.php' );

require_once( get_template_directory() . '/functions/defaults.php' );
require_once( get_template_directory() . '/functions/constants.php' );
require_once( get_template_directory() . '/functions/Debugging.php' );
require_once( get_template_directory() . '/functions/sanitizer.php' );
require_once( get_template_directory() . '/functions/customizer.php');

Expand All @@ -30,8 +33,6 @@
require_once( get_template_directory() . '/functions/custom-fields.php' );
require_once( get_template_directory() . '/functions/posttype_imagelink.php' );
require_once( get_template_directory() . '/functions/widgets.php' );
require_once( get_template_directory() . '/functions/gallery.php' );



require_once( get_template_directory() . '/functions/svglib.php');
Expand All @@ -40,6 +41,13 @@
// Filter-Hooks
require_once( get_template_directory() . '/functions/filters.php');

// Comment handling
require get_template_directory() . '/functions/comments.php';





/*-----------------------------------------------------------------------------------*/
/* Setup theme
/*-----------------------------------------------------------------------------------*/
Expand Down Expand Up @@ -142,6 +150,29 @@ function fau_custom_init() {
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );

// Maybe the CustomCSS was set via Customizer
// but its only allowed for partner websites.
// So lets remove the custom part, if its the wrong website type.
// Otherwiese people could first switch to partner website, then
// change the css, and then switch back to a university site.
// This would then not remove the custom css and display it.

$website_type = get_theme_mod('website_type');
// website_type:
// 0 = Fakultaetsportal;
// 1 = Lehrstuehle, Departments
// 2 = Zentrale Einrichtungen,
// 3 = Kooperationen
// -1 = fau.de Portal (4 Spalter in Bühne, kein Link zur FAU.

if (isset($website_type) && ($website_type != 3)) {
// Wenn es keine Kooperationsseite ist, dann wird CustomCSS
// verboten. Ausnahme: Der Admin ist Superadmin.
if (!current_user_can('manage_sites')) {
remove_action('wp_head', 'wp_custom_css_cb', 101);
}
}


}
add_action( 'init', 'fau_custom_init' );
Expand Down Expand Up @@ -277,8 +308,6 @@ function fau_dns_prefetch() {
/*-----------------------------------------------------------------------------------*/
function fau_addmetatags() {
$output = '';
// $output .= '<meta http-equiv="Content-Type" content="text/html; charset='.get_bloginfo('charset').'">'."\n";
// $output .= '<meta name="viewport" content="width=device-width, initial-scale=1.0">'."\n";

$output .= fau_get_rel_alternate();
// get alternate urls for the website if avaible
Expand All @@ -289,7 +318,7 @@ function fau_addmetatags() {
// if we set the Google Site Verification in the customizer, we add the html meta tag here
}

$title = sanitize_text_field(get_bloginfo( 'name' ));
$title = sanitize_text_field(get_bloginfo( 'name','display' ));
$output .= '<link rel="alternate" type="application/rss+xml" title="'.$title.' - RSS 2.0 Feed" href="'.get_bloginfo( 'rss2_url').'">'."\n";
// Adds RSS feed links to <head> for posts and comments.
// add_theme_support( 'automatic-feed-links' );
Expand Down Expand Up @@ -382,14 +411,4 @@ function fau_embedded_posts( $query ) {
}
}

/*-----------------------------------------------------------------------------------*/
/* Load Comment Functions
/*-----------------------------------------------------------------------------------*/

// Comment handling
require get_template_directory() . '/functions/comments.php';

// Block Editor handling
require_once( get_template_directory() . '/functions/gutenberg.php');


Loading

0 comments on commit 59a7207

Please sign in to comment.