Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 383328a6b6 | |||
| 1ad6eda924 | |||
| eade5d7bf6 | |||
| 9df80d7237 | |||
| 27f6a15aae | |||
| 638808d9dd | |||
| ca9815ea65 | |||
| 568acd83d1 | |||
| 985ba164a1 | |||
| 77536986ab | |||
| 39e9b298d9 | |||
| 37b31a6109 | |||
| b7276ff373 | |||
| 02b94594b9 | |||
| d76950645e | |||
| dbea7c74f3 | |||
| ae10138d51 | |||
| 991d9c38c8 | |||
| 4ad76fabf6 | |||
| d46684dc7e | |||
| dc14b838d6 | |||
| f397108cf0 | |||
| 6896f6aa26 | |||
| e119411758 | |||
| 50c636a17f | |||
| 9051f74598 | |||
| 777a999fed | |||
| d27c2b1259 | |||
| cc36e57079 | |||
| ca6955d579 | |||
| ddbf78a5c0 | |||
| b3638449ea | |||
| 863deb2592 | |||
| c7e8703787 | |||
| 39f1d87475 |
117
LICENSE
117
LICENSE
@@ -1,117 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice
|
||||
@@ -1,47 +1,47 @@
|
||||
<?php get_header(); ?>
|
||||
|
||||
<div class="container site-main">
|
||||
<div class="content-area">
|
||||
<div class="team-archive-container">
|
||||
<header class="page-header">
|
||||
<h1 class="page-title">Unser Team</h1>
|
||||
<p class="page-description">Lerne die Leute kennen, die diesen Server am Laufen halten.</p>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
$query = new WP_Query(array('post_type' => 'team_member', 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'ASC'));
|
||||
if ( $query->have_posts() ) : ?>
|
||||
<div class="team-grid">
|
||||
<?php while ( $query->have_posts() ) : $query->the_post();
|
||||
$rank_string = get_post_meta( get_the_ID(), '_team_member_rank', true );
|
||||
$img = get_the_post_thumbnail_url( get_the_ID(), 'medium' );
|
||||
if ( !$img ) $img = get_template_directory_uri() . '/images/default-avatar.png';
|
||||
?>
|
||||
<article class="team-card">
|
||||
<div class="team-image-wrapper">
|
||||
<img src="<?php echo esc_url($img); ?>" alt="<?php echo esc_attr(get_the_title()); ?>">
|
||||
</div>
|
||||
<div class="team-info">
|
||||
<h3 class="team-name"><?php the_title(); ?></h3>
|
||||
<div class="team-ranks-wrapper">
|
||||
<?php if ( !empty($rank_string) ) {
|
||||
$ranks = explode(',', $rank_string);
|
||||
foreach ( $ranks as $r ) {
|
||||
echo '<span class="team-rank">' . esc_html(trim($r)) . '</span>';
|
||||
}
|
||||
} ?>
|
||||
</div>
|
||||
<div class="team-bio"><?php the_excerpt(); ?></div>
|
||||
</div>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
<?php else : ?>
|
||||
<p>Noch keine Teammitglieder.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php get_header(); ?>
|
||||
|
||||
<div class="container site-main">
|
||||
<div class="content-area">
|
||||
<div class="team-archive-container">
|
||||
<header class="page-header">
|
||||
<h1 class="page-title">Unser Team</h1>
|
||||
<p class="page-description">Lerne die Leute kennen, die diesen Server am Laufen halten.</p>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
$query = new WP_Query(array('post_type' => 'team_member', 'posts_per_page' => -1, 'orderby' => 'menu_order', 'order' => 'ASC'));
|
||||
if ( $query->have_posts() ) : ?>
|
||||
<div class="team-grid">
|
||||
<?php while ( $query->have_posts() ) : $query->the_post();
|
||||
$rank_string = get_post_meta( get_the_ID(), '_team_member_rank', true );
|
||||
$img = get_the_post_thumbnail_url( get_the_ID(), 'medium' );
|
||||
if ( !$img ) $img = get_template_directory_uri() . '/images/default-avatar.png';
|
||||
?>
|
||||
<article class="team-card">
|
||||
<div class="team-image-wrapper">
|
||||
<img src="<?php echo esc_url($img); ?>" alt="<?php echo esc_attr(get_the_title()); ?>">
|
||||
</div>
|
||||
<div class="team-info">
|
||||
<h3 class="team-name"><?php the_title(); ?></h3>
|
||||
<div class="team-ranks-wrapper">
|
||||
<?php if ( !empty($rank_string) ) {
|
||||
$ranks = explode(',', $rank_string);
|
||||
foreach ( $ranks as $r ) {
|
||||
echo '<span class="team-rank">' . esc_html(trim($r)) . '</span>';
|
||||
}
|
||||
} ?>
|
||||
</div>
|
||||
<div class="team-bio"><?php the_excerpt(); ?></div>
|
||||
</div>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
<?php else : ?>
|
||||
<p>Noch keine Teammitglieder.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
@@ -88,48 +88,329 @@ if ( get_theme_mod('slider_enabled', false) ) :
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ===================================================== -->
|
||||
<!-- MAIN CONTENT -->
|
||||
<!-- MAIN CONTENT MIT SIDEBAR -->
|
||||
<!-- ===================================================== -->
|
||||
<main id="primary" class="site-main">
|
||||
<div class="container">
|
||||
<div class="content-area">
|
||||
|
||||
<?php
|
||||
// Hole Sidebar-Einstellungen
|
||||
$sidebar_enabled = get_theme_mod( 'homepage_sidebar_enabled', false );
|
||||
$sidebar_position = get_theme_mod( 'homepage_sidebar_position', 'right' );
|
||||
|
||||
// Prüfe ob mindestens ein Sidebar-Bereich aktiv ist
|
||||
$has_sidebar_content = (
|
||||
is_active_sidebar( 'homepage-sidebar-top' ) ||
|
||||
is_active_sidebar( 'homepage-sidebar-middle-1' ) ||
|
||||
is_active_sidebar( 'homepage-sidebar-middle-2' ) ||
|
||||
is_active_sidebar( 'homepage-sidebar-bottom' ) ||
|
||||
is_active_sidebar( 'homepage-sidebar-extra' )
|
||||
);
|
||||
|
||||
// Setze CSS-Klassen basierend auf Sidebar-Status
|
||||
$content_class = 'content-area';
|
||||
if ( $sidebar_enabled && $has_sidebar_content ) {
|
||||
$content_class = 'content-area with-sidebar sidebar-' . esc_attr( $sidebar_position );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( 'post' ); ?>>
|
||||
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<div class="post-thumbnail">
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php the_post_thumbnail( 'medium_large' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="post-content">
|
||||
<h2 class="post-title">
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<div class="post-full-content">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
<div class="<?php echo esc_attr( $content_class ); ?>">
|
||||
|
||||
<?php if ( $sidebar_enabled && $sidebar_position === 'left' && $has_sidebar_content ) : ?>
|
||||
<!-- SIDEBAR LINKS -->
|
||||
<aside class="homepage-sidebar sidebar-left">
|
||||
<?php if ( is_active_sidebar( 'homepage-sidebar-top' ) ) : ?>
|
||||
<div class="sidebar-section sidebar-top">
|
||||
<?php dynamic_sidebar( 'homepage-sidebar-top' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'homepage-sidebar-middle-1' ) ) : ?>
|
||||
<div class="sidebar-section sidebar-middle-1">
|
||||
<?php dynamic_sidebar( 'homepage-sidebar-middle-1' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'homepage-sidebar-middle-2' ) ) : ?>
|
||||
<div class="sidebar-section sidebar-middle-2">
|
||||
<?php dynamic_sidebar( 'homepage-sidebar-middle-2' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'homepage-sidebar-bottom' ) ) : ?>
|
||||
<div class="sidebar-section sidebar-bottom">
|
||||
<?php dynamic_sidebar( 'homepage-sidebar-bottom' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'homepage-sidebar-extra' ) ) : ?>
|
||||
<div class="sidebar-section sidebar-extra">
|
||||
<?php dynamic_sidebar( 'homepage-sidebar-extra' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
|
||||
</article>
|
||||
<!-- HAUPTINHALT -->
|
||||
<div class="main-content">
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
<?php else : ?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( 'post' ); ?>>
|
||||
|
||||
<p><?php esc_html_e( 'Keine Beiträge gefunden.', 'minecraft-modern-theme' ); ?></p>
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<div class="post-thumbnail">
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php the_post_thumbnail( 'medium_large' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="post-content">
|
||||
<h2 class="post-title">
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<div class="post-full-content">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
<?php endwhile; ?>
|
||||
<?php else : ?>
|
||||
|
||||
<p><?php esc_html_e( 'Keine Beiträge gefunden.', 'minecraft-modern-theme' ); ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $sidebar_enabled && $sidebar_position === 'right' && $has_sidebar_content ) : ?>
|
||||
<!-- SIDEBAR RECHTS -->
|
||||
<aside class="homepage-sidebar sidebar-right">
|
||||
<?php if ( is_active_sidebar( 'homepage-sidebar-top' ) ) : ?>
|
||||
<div class="sidebar-section sidebar-top">
|
||||
<?php dynamic_sidebar( 'homepage-sidebar-top' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'homepage-sidebar-middle-1' ) ) : ?>
|
||||
<div class="sidebar-section sidebar-middle-1">
|
||||
<?php dynamic_sidebar( 'homepage-sidebar-middle-1' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'homepage-sidebar-middle-2' ) ) : ?>
|
||||
<div class="sidebar-section sidebar-middle-2">
|
||||
<?php dynamic_sidebar( 'homepage-sidebar-middle-2' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'homepage-sidebar-bottom' ) ) : ?>
|
||||
<div class="sidebar-section sidebar-bottom">
|
||||
<?php dynamic_sidebar( 'homepage-sidebar-bottom' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'homepage-sidebar-extra' ) ) : ?>
|
||||
<div class="sidebar-section sidebar-extra">
|
||||
<?php dynamic_sidebar( 'homepage-sidebar-extra' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
<!-- ===================================================== -->
|
||||
<!-- ZUSÄTZLICHES CSS FÜR SIDEBAR LAYOUT -->
|
||||
<!-- ===================================================== -->
|
||||
<style>
|
||||
/* Content ohne Sidebar - volle Breite */
|
||||
.content-area .main-content {
|
||||
width: 100%;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
/* Container mit Sidebar-Layout */
|
||||
.content-area.with-sidebar {
|
||||
display: grid;
|
||||
gap: 30px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
/* Sidebar rechts (Standard) */
|
||||
.content-area.with-sidebar.sidebar-right {
|
||||
grid-template-columns: 1fr 300px;
|
||||
}
|
||||
|
||||
.content-area.with-sidebar.sidebar-right .main-content {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.content-area.with-sidebar.sidebar-right .homepage-sidebar {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
/* Sidebar links */
|
||||
.content-area.with-sidebar.sidebar-left {
|
||||
grid-template-columns: 300px 1fr;
|
||||
}
|
||||
|
||||
.content-area.with-sidebar.sidebar-left .homepage-sidebar {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.content-area.with-sidebar.sidebar-left .main-content {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
/* Entfernt das Sticky-Verhalten der Sidebar komplett */
|
||||
.homepage-sidebar {
|
||||
position: relative !important;
|
||||
top: auto !important;
|
||||
background: var(--card-background, #1e2029);
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
overflow-y: auto;
|
||||
max-height: calc(200vh - 10vh);
|
||||
}
|
||||
|
||||
/* Sidebar Sections - Bereiche innerhalb der Sidebar */
|
||||
.homepage-sidebar .sidebar-section {
|
||||
margin-bottom: 30px;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.homepage-sidebar .sidebar-section:last-child {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* Spezielle Styling für bestimmte Bereiche */
|
||||
.homepage-sidebar .sidebar-top {
|
||||
border-bottom: 2px solid var(--primary-accent, #00d4ff);
|
||||
}
|
||||
|
||||
.homepage-sidebar .sidebar-bottom {
|
||||
padding-top: 20px;
|
||||
border-top: 2px solid var(--primary-accent, #00d4ff);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.homepage-sidebar .widget {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.homepage-sidebar .widget:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.homepage-sidebar .widget-title {
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 2px solid var(--primary-accent, #00d4ff);
|
||||
color: var(--primary-accent, #00d4ff);
|
||||
}
|
||||
|
||||
.homepage-sidebar ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.homepage-sidebar ul li {
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.homepage-sidebar ul li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.homepage-sidebar a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.homepage-sidebar a:hover {
|
||||
color: var(--primary-accent, #00d4ff);
|
||||
}
|
||||
|
||||
/* Mobile: Sidebar unter Content */
|
||||
@media (max-width: 768px) {
|
||||
.content-area.with-sidebar.sidebar-right,
|
||||
.content-area.with-sidebar.sidebar-left {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.content-area.with-sidebar .homepage-sidebar {
|
||||
order: 3 !important; /* Immer unten auf mobilen Geräten */
|
||||
position: relative;
|
||||
top: 0;
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
.content-area.with-sidebar .main-content {
|
||||
order: 1 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Dark Mode Anpassungen */
|
||||
body.dark-mode .homepage-sidebar {
|
||||
background: #1e1e1e;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
body.dark-mode .homepage-sidebar ul li {
|
||||
border-bottom-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
/* Light Mode Anpassungen */
|
||||
body.light-mode .homepage-sidebar {
|
||||
background: #ffffff;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
body.light-mode .homepage-sidebar .sidebar-section {
|
||||
border-bottom-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
body.light-mode .homepage-sidebar ul li {
|
||||
border-bottom-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
body.light-mode .homepage-sidebar .widget-title {
|
||||
color: var(--primary-accent, #00d4ff);
|
||||
}
|
||||
|
||||
/* Scrollbar Styling für Sidebar */
|
||||
.homepage-sidebar::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.homepage-sidebar::-webkit-scrollbar-track {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.homepage-sidebar::-webkit-scrollbar-thumb {
|
||||
background: var(--primary-accent, #00d4ff);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.homepage-sidebar::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--primary-accent-hover, #00b8e6);
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
@@ -168,6 +168,65 @@ function minecraft_modern_footer_widgets() {
|
||||
}
|
||||
add_action( 'widgets_init', 'minecraft_modern_footer_widgets' );
|
||||
|
||||
// === Homepage Sidebar registrieren ===
|
||||
function minecraft_modern_homepage_sidebar() {
|
||||
// Hauptbereich oben
|
||||
register_sidebar( array(
|
||||
'name' => __( 'Startseiten Sidebar - Oben', 'minecraft-modern-theme' ),
|
||||
'id' => 'homepage-sidebar-top',
|
||||
'description' => __( 'Widget-Bereich oben in der Sidebar (z.B. für wichtige Infos).', 'minecraft-modern-theme' ),
|
||||
'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
||||
// Mittlerer Bereich 1
|
||||
register_sidebar( array(
|
||||
'name' => __( 'Startseiten Sidebar - Mitte 1', 'minecraft-modern-theme' ),
|
||||
'id' => 'homepage-sidebar-middle-1',
|
||||
'description' => __( 'Widget-Bereich in der Mitte der Sidebar.', 'minecraft-modern-theme' ),
|
||||
'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
||||
// Mittlerer Bereich 2
|
||||
register_sidebar( array(
|
||||
'name' => __( 'Startseiten Sidebar - Mitte 2', 'minecraft-modern-theme' ),
|
||||
'id' => 'homepage-sidebar-middle-2',
|
||||
'description' => __( 'Zweiter Widget-Bereich in der Mitte der Sidebar.', 'minecraft-modern-theme' ),
|
||||
'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
||||
// Unterer Bereich
|
||||
register_sidebar( array(
|
||||
'name' => __( 'Startseiten Sidebar - Unten', 'minecraft-modern-theme' ),
|
||||
'id' => 'homepage-sidebar-bottom',
|
||||
'description' => __( 'Widget-Bereich unten in der Sidebar (z.B. für Social Media).', 'minecraft-modern-theme' ),
|
||||
'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
||||
// Zusätzlicher flexibler Bereich
|
||||
register_sidebar( array(
|
||||
'name' => __( 'Startseiten Sidebar - Extra', 'minecraft-modern-theme' ),
|
||||
'id' => 'homepage-sidebar-extra',
|
||||
'description' => __( 'Zusätzlicher Widget-Bereich für spezielle Inhalte.', 'minecraft-modern-theme' ),
|
||||
'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
}
|
||||
add_action( 'widgets_init', 'minecraft_modern_homepage_sidebar' );
|
||||
|
||||
// === FAQ Custom Post Type & Taxonomy ===
|
||||
function create_faq_post_type() {
|
||||
// Nur registrieren, wenn im Customizer aktiviert
|
||||
@@ -428,10 +487,10 @@ function minecraft_modern_scroll_to_top_script() {
|
||||
add_action('wp_enqueue_scripts', 'minecraft_modern_scroll_to_top_script');
|
||||
|
||||
// =============================================================================
|
||||
// === THEME SETTINGS EXPORT / IMPORT (KORRIGIERTE VERSION) =================
|
||||
// === THEME SETTINGS EXPORT / IMPORT (VOLLSTÄNDIG KORRIGIERT) ===============
|
||||
// =============================================================================
|
||||
|
||||
// 1. Export Handler (Download) - ERWEITERT UM TEAM
|
||||
// 1. Export Handler (Download) - ALLE EINSTELLUNGEN
|
||||
add_action( 'admin_post_export_theme_settings', 'handle_theme_settings_export' );
|
||||
|
||||
function handle_theme_settings_export() {
|
||||
@@ -443,25 +502,30 @@ function handle_theme_settings_export() {
|
||||
// Theme Slug ermitteln
|
||||
$theme_slug = get_option( 'stylesheet' );
|
||||
|
||||
// 1. Theme Mods (Customizer & Announcement Settings) holen
|
||||
// 1. Theme Mods (Customizer-Einstellungen) holen
|
||||
$mods = get_theme_mods();
|
||||
|
||||
// 2. Announcement Settings manuell hinzufügen (siehe vorheriger Schritt)
|
||||
$mods['mm_announcement_enabled'] = get_option('mm_announcement_enabled');
|
||||
$mods['mm_announcement_text'] = get_option('mm_announcement_text');
|
||||
$mods['mm_announcement_bg'] = get_option('mm_announcement_bg');
|
||||
$mods['mm_announcement_color'] = get_option('mm_announcement_color');
|
||||
$mods['mm_announcement_font_size'] = get_option('mm_announcement_font_size');
|
||||
$mods['mm_announcement_font_family'] = get_option('mm_announcement_font_family');
|
||||
$mods['mm_announcement_position'] = get_option('mm_announcement_position');
|
||||
$mods['mm_announcement_countdown_enabled'] = get_option('mm_announcement_countdown_enabled');
|
||||
$mods['mm_announcement_countdown_label'] = get_option('mm_announcement_countdown_label');
|
||||
$mods['mm_announcement_countdown_date'] = get_option('mm_announcement_countdown_date');
|
||||
$mods['mm_announcement_countdown_expired_msg'] = get_option('mm_announcement_countdown_expired_msg');
|
||||
// 2. Announcement Settings manuell hinzufügen
|
||||
$announcement_keys = array(
|
||||
'mm_announcement_enabled',
|
||||
'mm_announcement_text',
|
||||
'mm_announcement_bg',
|
||||
'mm_announcement_color',
|
||||
'mm_announcement_font_size',
|
||||
'mm_announcement_font_family',
|
||||
'mm_announcement_position',
|
||||
'mm_announcement_countdown_enabled',
|
||||
'mm_announcement_countdown_label',
|
||||
'mm_announcement_countdown_date',
|
||||
'mm_announcement_countdown_expired_msg'
|
||||
);
|
||||
|
||||
// 3. --- NEU: Team Daten holen ---
|
||||
foreach ( $announcement_keys as $key ) {
|
||||
$mods[$key] = get_option($key);
|
||||
}
|
||||
|
||||
// 3. Team Daten holen
|
||||
$team_data = array();
|
||||
// Hole alle Teammitglieder sortiert nach Reihenfolge
|
||||
$team_query = new WP_Query(array(
|
||||
'post_type' => 'team_member',
|
||||
'posts_per_page' => -1,
|
||||
@@ -470,18 +534,20 @@ function handle_theme_settings_export() {
|
||||
));
|
||||
|
||||
if ( $team_query->have_posts() ) {
|
||||
while ( $team_query->have_posts() ) : $team_query->the_post();
|
||||
while ( $team_query->have_posts() ) {
|
||||
$team_query->the_post();
|
||||
|
||||
$team_data[] = array(
|
||||
'title' => get_the_title(),
|
||||
'content' => get_the_content(),
|
||||
'rank' => get_post_meta( get_the_ID(), '_team_member_rank', true ),
|
||||
'menu_order' => get_post_field( 'menu_order', get_the_ID() ),
|
||||
// Bilder werden NICHT exportiert (siehe Hinweis unten)
|
||||
);
|
||||
endwhile;
|
||||
}
|
||||
wp_reset_postdata(); // WICHTIG: Post-Daten zurücksetzen
|
||||
}
|
||||
|
||||
$mods['team_data'] = $team_data;
|
||||
// --- ENDE TEAM EXPORT ---
|
||||
|
||||
// Daten als JSON vorbereiten
|
||||
$data = json_encode( $mods, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE );
|
||||
@@ -496,7 +562,7 @@ function handle_theme_settings_export() {
|
||||
exit;
|
||||
}
|
||||
|
||||
// 2. Import Handler (AJAX) - ERWEITERT UM TEAM
|
||||
// 2. Import Handler (AJAX) - ALLE EINSTELLUNGEN
|
||||
add_action( 'wp_ajax_import_theme_settings', 'handle_theme_settings_import' );
|
||||
|
||||
function handle_theme_settings_import() {
|
||||
@@ -521,52 +587,70 @@ function handle_theme_settings_import() {
|
||||
wp_send_json_error( __( 'Die hochgeladene Datei ist keine gültige JSON-Datei.', 'minecraft-modern-theme' ) );
|
||||
}
|
||||
|
||||
// 1. Theme Mods & Announcement importieren (siehe vorheriger Code)
|
||||
// Announcement Keys definieren
|
||||
$announcement_keys = array(
|
||||
'mm_announcement_enabled',
|
||||
'mm_announcement_text',
|
||||
'mm_announcement_bg',
|
||||
'mm_announcement_color',
|
||||
'mm_announcement_font_size',
|
||||
'mm_announcement_font_family',
|
||||
'mm_announcement_position',
|
||||
'mm_announcement_countdown_enabled',
|
||||
'mm_announcement_countdown_label',
|
||||
'mm_announcement_countdown_date',
|
||||
'mm_announcement_countdown_expired_msg'
|
||||
);
|
||||
|
||||
// KRITISCHER FIX: Team Daten VORHER extrahieren und aus Array entfernen
|
||||
$team_data = isset($data['team_data']) ? $data['team_data'] : array();
|
||||
unset($data['team_data']); // Verhindert Fehler beim Durchlaufen der Theme Mods
|
||||
|
||||
// 1. Theme Mods & Announcement importieren
|
||||
foreach ( $data as $mod_key => $mod_value ) {
|
||||
// Differenzierung wie beim Export
|
||||
if ( strpos( $mod_key, 'mm_announcement_' ) === 0 ) {
|
||||
// Unterscheidung: Announcement = Option, Rest = Theme Mod
|
||||
if ( in_array( $mod_key, $announcement_keys ) ) {
|
||||
update_option( $mod_key, $mod_value );
|
||||
} else {
|
||||
set_theme_mod( $mod_key, $mod_value );
|
||||
}
|
||||
}
|
||||
|
||||
// 2. --- NEU: Team Daten importieren ---
|
||||
if ( isset( $data['team_data'] ) && ! empty( $data['team_data'] ) ) {
|
||||
// 2. Team Daten importieren
|
||||
if ( ! empty( $team_data ) ) {
|
||||
|
||||
// Option 1: Vorherige Team-Mitglieder löschen (Clean Import)
|
||||
// Wir force-delete alle Posts, damit die Liste exakt so ist wie im Backup.
|
||||
// Vorherige Team-Mitglieder löschen (Clean Import)
|
||||
$existing_team = new WP_Query(array(
|
||||
'post_type' => 'team_member',
|
||||
'posts_per_page' => -1,
|
||||
'fields' => 'ids' // Nur IDs holen, schneller
|
||||
'fields' => 'ids'
|
||||
));
|
||||
|
||||
if ( $existing_team->have_posts() ) {
|
||||
while ( $existing_team->have_posts() ) {
|
||||
wp_delete_post( $existing_team->next_post()->ID, true ); // true = force delete
|
||||
foreach ( $existing_team->posts as $post_id ) {
|
||||
wp_delete_post( $post_id, true ); // true = permanent löschen
|
||||
}
|
||||
}
|
||||
wp_reset_postdata(); // WICHTIG: Post-Daten zurücksetzen
|
||||
|
||||
// Neue Mitglieder anlegen
|
||||
foreach ( $data['team_data'] as $member ) {
|
||||
$id = wp_insert_post(array(
|
||||
foreach ( $team_data as $member ) {
|
||||
$new_id = wp_insert_post(array(
|
||||
'post_title' => sanitize_text_field( $member['title'] ),
|
||||
'post_content' => sanitize_textarea_field( $member['content'] ),
|
||||
'post_type' => 'team_member',
|
||||
'post_status' => 'publish',
|
||||
'post_status' => 'publish',
|
||||
'menu_order' => isset( $member['menu_order'] ) ? intval( $member['menu_order'] ) : 0
|
||||
));
|
||||
|
||||
if ( $id && ! is_wp_error( $id ) ) {
|
||||
if ( $new_id && ! is_wp_error( $new_id ) ) {
|
||||
// Rang als Meta-Data speichern
|
||||
if ( isset( $member['rank'] ) ) {
|
||||
update_post_meta( $id, '_team_member_rank', sanitize_text_field( $member['rank'] ) );
|
||||
update_post_meta( $new_id, '_team_member_rank', sanitize_text_field( $member['rank'] ) );
|
||||
}
|
||||
// Bilder werden NICFT importiert (siehe Hinweis unten)
|
||||
}
|
||||
}
|
||||
}
|
||||
// --- ENDE TEAM IMPORT ---
|
||||
|
||||
wp_send_json_success( __( 'Einstellungen und Team erfolgreich importiert! Bilder müssen ggf. neu hochgeladen werden.', 'minecraft-modern-theme' ) );
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* - Social Media
|
||||
* - Footer
|
||||
* - Login
|
||||
* - Sidebar
|
||||
* - Import/Export
|
||||
*/
|
||||
|
||||
@@ -198,7 +199,47 @@ function minecraft_modern_customize_register( $wp_customize ) {
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// === 3. SOCIAL MEDIA =====================================================
|
||||
// === 3. SIDEBAR EINSTELLUNGEN ============================================
|
||||
// =========================================================================
|
||||
|
||||
$wp_customize->add_section( 'sidebar_settings', array(
|
||||
'title' => 'Sidebar Einstellungen',
|
||||
'priority' => 35,
|
||||
'description' => 'Konfiguriere die Sidebar auf der Startseite.',
|
||||
) );
|
||||
|
||||
// Sidebar aktivieren
|
||||
$wp_customize->add_setting( 'homepage_sidebar_enabled', array(
|
||||
'default' => false,
|
||||
'sanitize_callback' => 'wp_validate_boolean',
|
||||
) );
|
||||
$wp_customize->add_control( 'homepage_sidebar_enabled', array(
|
||||
'label' => 'Sidebar auf Startseite aktivieren',
|
||||
'description' => 'Zeigt eine Sidebar neben dem Hauptinhalt an.',
|
||||
'section' => 'sidebar_settings',
|
||||
'settings' => 'homepage_sidebar_enabled',
|
||||
'type' => 'checkbox',
|
||||
) );
|
||||
|
||||
// Sidebar Position
|
||||
$wp_customize->add_setting( 'homepage_sidebar_position', array(
|
||||
'default' => 'right',
|
||||
'sanitize_callback' => 'sanitize_key',
|
||||
) );
|
||||
$wp_customize->add_control( 'homepage_sidebar_position', array(
|
||||
'label' => 'Sidebar Position',
|
||||
'section' => 'sidebar_settings',
|
||||
'settings' => 'homepage_sidebar_position',
|
||||
'type' => 'select',
|
||||
'choices' => array(
|
||||
'left' => 'Links',
|
||||
'right' => 'Rechts',
|
||||
),
|
||||
) );
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// === 4. SOCIAL MEDIA =====================================================
|
||||
// =========================================================================
|
||||
|
||||
$wp_customize->add_section( 'social_links', array( 'title' => 'Social Media Links', 'priority' => 40 ) );
|
||||
@@ -212,7 +253,7 @@ function minecraft_modern_customize_register( $wp_customize ) {
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// === 4. FOOTER-BEREICH ==================================================
|
||||
// === 5. FOOTER-BEREICH ==================================================
|
||||
// =========================================================================
|
||||
|
||||
$wp_customize->add_section( 'footer_settings', array( 'title' => 'Footer-Einstellungen', 'priority' => 50 ) );
|
||||
@@ -241,7 +282,7 @@ function minecraft_modern_customize_register( $wp_customize ) {
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// === 5. ZUSÄTZLICHE FUNKTIONEN ==========================================
|
||||
// === 6. ZUSÄTZLICHE FUNKTIONEN ==========================================
|
||||
// =========================================================================
|
||||
|
||||
// --- Sektion: FAQ Einstellungen ---
|
||||
@@ -251,7 +292,7 @@ function minecraft_modern_customize_register( $wp_customize ) {
|
||||
'label' => 'FAQ System aktivieren', 'section' => 'faq_settings', 'settings' => 'faq_enabled', 'type' => 'checkbox',
|
||||
) );
|
||||
|
||||
// --- Sektion: Team Einstellungen ---
|
||||
// --- Sektion: Team Einstellungen ---
|
||||
$wp_customize->add_section( 'team_settings', array( 'title' => 'Team Einstellungen', 'priority' => 65 ) );
|
||||
$wp_customize->add_setting( 'team_enabled', array( 'default' => true, 'sanitize_callback' => 'wp_validate_boolean' ) );
|
||||
$wp_customize->add_control( 'team_enabled', array(
|
||||
@@ -259,7 +300,7 @@ function minecraft_modern_customize_register( $wp_customize ) {
|
||||
) );
|
||||
|
||||
// =========================================================================
|
||||
// === 6. LOGIN-BEREICH ====================================================
|
||||
// === 7. LOGIN-BEREICH ====================================================
|
||||
// =========================================================================
|
||||
|
||||
$wp_customize->add_section( 'login_settings', array(
|
||||
@@ -321,7 +362,7 @@ function minecraft_modern_customize_register( $wp_customize ) {
|
||||
) );
|
||||
|
||||
// =========================================================================
|
||||
// === 7. EXPORT / IMPORT SECTION =========================================
|
||||
// === 8. EXPORT / IMPORT SECTION =========================================
|
||||
// =========================================================================
|
||||
|
||||
$wp_customize->add_section( 'theme_mods_import_export', array(
|
||||
|
||||
@@ -5,121 +5,156 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// === ZENTRALE VERSIONSKONSTANTE ===
|
||||
// Bitte passen Sie diese Version bei jedem Release an!
|
||||
define( 'MINECRAFT_MODERN_THEME_VERSION', '1.6' );
|
||||
// === THEME VERSION AUTOMATISCH AUS style.css LADEN (PARENT THEME PRIORITÄT) ===
|
||||
function minecraft_modern_get_theme_version() {
|
||||
// Holt das aktuell aktive Theme (child oder parent)
|
||||
$theme = wp_get_theme();
|
||||
|
||||
// Wenn ein Child-Theme aktiv ist und ein Parent vorhanden ist, nutze die Parent-Version
|
||||
$parent = $theme->parent();
|
||||
if ( $parent && $parent->exists() ) {
|
||||
$parent_version = $parent->get( 'Version' );
|
||||
if ( ! empty( $parent_version ) ) {
|
||||
return $parent_version;
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback: Version des aktuell aktiven Themes (wenn kein Parent existiert oder Parent keine Version hat)
|
||||
return $theme->get( 'Version' );
|
||||
}
|
||||
|
||||
// === THEME UPDATE NOTIFICATION SYSTEM ===
|
||||
|
||||
// Funktion zum Abrufen der neuesten Release-Informationen vom Git-Repository
|
||||
function minecraft_modern_get_latest_release_info() {
|
||||
// Funktion zum Leeren des Caches (wenn man auf "Update prüfen" klickt)
|
||||
function minecraft_modern_clear_cache() {
|
||||
if ( isset( $_GET['mm_clear_cache'] ) && current_user_can( 'manage_options' ) ) {
|
||||
check_admin_referer( 'mm_clear_cache_action' );
|
||||
delete_transient( 'minecraft_modern_latest_release' );
|
||||
wp_redirect( admin_url( 'index.php' ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
add_action( 'admin_init', 'minecraft_modern_clear_cache' );
|
||||
|
||||
// Funktion zum Abrufen der neuesten Release-Informationen
|
||||
function minecraft_modern_get_latest_release_info( $force_refresh = false ) {
|
||||
$transient_key = 'minecraft_modern_latest_release';
|
||||
|
||||
// Versuche, die Daten aus dem Transient-Cache zu holen
|
||||
$release_info = get_transient($transient_key);
|
||||
// Wenn erzwungen wird (oder Cache leer), frische Daten holen
|
||||
if ( $force_refresh ) {
|
||||
delete_transient( $transient_key );
|
||||
}
|
||||
|
||||
// Wenn der Cache leer oder abgelaufen ist, rufe neue Daten ab
|
||||
if (false === $release_info) {
|
||||
$response = wp_remote_get('https://git.viper.ipv64.net/api/v1/repos/M_Viper/Minecraft-Modern-Theme/releases/latest');
|
||||
$release_info = get_transient( $transient_key );
|
||||
|
||||
if ( false === $release_info ) {
|
||||
// Timeout auf 10 Sekunden erhöht für langsame Verbindungen
|
||||
$response = wp_remote_get(
|
||||
'https://git.viper.ipv64.net/api/v1/repos/M_Viper/Minecraft-Modern-Theme/releases/latest',
|
||||
array( 'timeout' => 10 )
|
||||
);
|
||||
|
||||
if (!is_wp_error($response) && 200 === wp_remote_retrieve_response_code($response)) {
|
||||
$body = wp_remote_retrieve_body($response);
|
||||
$release_data = json_decode($body, true);
|
||||
if ( ! is_wp_error( $response ) && 200 === wp_remote_retrieve_response_code( $response ) ) {
|
||||
$body = wp_remote_retrieve_body( $response );
|
||||
$release_data = json_decode( $body, true );
|
||||
|
||||
if ($release_data && isset($release_data['tag_name'])) {
|
||||
if ( $release_data && isset( $release_data['tag_name'] ) ) {
|
||||
// Tag bereinigen (falls 'v' davor steht, z.B. v1.6 -> 1.6)
|
||||
$tag_name = $release_data['tag_name'];
|
||||
if ( strpos( $tag_name, 'v' ) === 0 ) {
|
||||
$tag_name = ltrim( $tag_name, 'v' );
|
||||
}
|
||||
|
||||
$release_info = array(
|
||||
'version' => $release_data['tag_name'],
|
||||
'download_url' => $release_data['zipball_url'],
|
||||
'release_notes' => isset($release_data['body']) ? $release_data['body'] : '',
|
||||
'published_at' => isset($release_data['published_at']) ? $release_data['published_at'] : ''
|
||||
'version' => $tag_name,
|
||||
'download_url' => $release_data['zipball_url'],
|
||||
'release_notes' => isset( $release_data['body'] ) ? $release_data['body'] : '',
|
||||
'published_at' => isset( $release_data['published_at'] ) ? $release_data['published_at'] : ''
|
||||
);
|
||||
|
||||
// Speichere die Daten für 12 Stunden im Cache
|
||||
set_transient($transient_key, $release_info, 12 * HOUR_IN_SECONDS);
|
||||
// Cache für 6 Stunden
|
||||
set_transient( $transient_key, $release_info, 6 * HOUR_IN_SECONDS );
|
||||
} else {
|
||||
// Fehlerhafte Daten leer cachen
|
||||
set_transient( $transient_key, array(), HOUR_IN_SECONDS );
|
||||
}
|
||||
} else {
|
||||
// Bei Fehler, leere Daten für 1 Stunde cachen, um wiederholte fehlgeschlagene Anfragen zu vermeiden
|
||||
set_transient($transient_key, array(), HOUR_IN_SECONDS);
|
||||
// Fehler beim Abrufen
|
||||
set_transient( $transient_key, array(), HOUR_IN_SECONDS );
|
||||
}
|
||||
}
|
||||
|
||||
return $release_info;
|
||||
}
|
||||
|
||||
// Funktion zum Anzeigen der Update-Benachrichtigung im Admin-Bereich
|
||||
// === BENACHRICHTIGUNG IM ADMIN-BEREICH ===
|
||||
function minecraft_modern_show_update_notification() {
|
||||
// Nur im Admin-Bereich und für Administratoren anzeigen
|
||||
if (!is_admin() || !current_user_can('manage_options')) {
|
||||
if ( ! is_admin() || ! current_user_can( 'manage_options' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Aktuelle Theme-Version abrufen (JETZT AUS UNSERER KONSTANTE)
|
||||
$current_version = MINECRAFT_MODERN_THEME_VERSION;
|
||||
$current_version = minecraft_modern_get_theme_version();
|
||||
$latest_release = minecraft_modern_get_latest_release_info();
|
||||
|
||||
// Neueste Release-Informationen abrufen
|
||||
$latest_release = minecraft_modern_get_latest_release_info();
|
||||
|
||||
// Wenn wir gültige Release-Informationen haben und die Versionen unterschiedlich sind
|
||||
if (!empty($latest_release) && isset($latest_release['version']) && version_compare($current_version, $latest_release['version'], '<')) {
|
||||
if ( ! empty( $latest_release ) && isset( $latest_release['version'] ) && version_compare( $current_version, $latest_release['version'], '<' ) ) {
|
||||
?>
|
||||
<div class="notice notice-warning is-dismissible">
|
||||
<h3><?php _e('Minecraft Modern Theme Update Available', 'minecraft-modern-theme'); ?></h3>
|
||||
<h3><?php _e( 'Minecraft Modern Theme Update Available', 'minecraft-modern-theme' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
__('You are using version %1$s of the Minecraft Modern Theme. Version %2$s is now available.', 'minecraft-modern-theme'),
|
||||
'<strong>' . esc_html($current_version) . '</strong>',
|
||||
'<strong>' . esc_html($latest_release['version']) . '</strong>'
|
||||
__( 'You are using version %1$s of the Minecraft Modern Theme. Version %2$s is now available.', 'minecraft-modern-theme' ),
|
||||
'<strong>' . esc_html( $current_version ) . '</strong>',
|
||||
'<strong>' . esc_html( $latest_release['version'] ) . '</strong>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<a href="<?php echo esc_url($latest_release['download_url']); ?>" class="button button-primary" target="_blank">
|
||||
<?php _e('Download Latest Version', 'minecraft-modern-theme'); ?>
|
||||
<a href="<?php echo esc_url( $latest_release['download_url'] ); ?>" class="button button-primary" target="_blank">
|
||||
<?php _e( 'Download Latest Version', 'minecraft-modern-theme' ); ?>
|
||||
</a>
|
||||
<a href="https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme/releases" class="button" target="_blank">
|
||||
<?php _e('View Release Notes', 'minecraft-modern-theme'); ?>
|
||||
<?php _e( 'View Release Notes', 'minecraft-modern-theme' ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
add_action('admin_notices', 'minecraft_modern_show_update_notification');
|
||||
add_action( 'admin_notices', 'minecraft_modern_show_update_notification' );
|
||||
|
||||
// Funktion zum Hinzufügen eines Update-Status-Widgets zum Dashboard
|
||||
// === DASHBOARD WIDGET ===
|
||||
function minecraft_modern_add_dashboard_widget() {
|
||||
wp_add_dashboard_widget(
|
||||
'minecraft_modern_update_widget', // Widget slug.
|
||||
'Minecraft Modern Theme Status', // Title.
|
||||
'minecraft_modern_update_widget_function' // Display function.
|
||||
'minecraft_modern_update_widget',
|
||||
'Minecraft Modern Theme Status',
|
||||
'minecraft_modern_update_widget_function'
|
||||
);
|
||||
}
|
||||
add_action('wp_dashboard_setup', 'minecraft_modern_add_dashboard_widget');
|
||||
add_action( 'wp_dashboard_setup', 'minecraft_modern_add_dashboard_widget' );
|
||||
|
||||
// Funktion zum Anzeigen des Inhalts im Dashboard-Widget
|
||||
function minecraft_modern_update_widget_function() {
|
||||
// Aktuelle Theme-Version abrufen (JETZT AUS UNSERER KONSTANTE)
|
||||
$current_version = MINECRAFT_MODERN_THEME_VERSION;
|
||||
$current_version = minecraft_modern_get_theme_version();
|
||||
$latest_release = minecraft_modern_get_latest_release_info();
|
||||
|
||||
// Neueste Release-Informationen abrufen
|
||||
$latest_release = minecraft_modern_get_latest_release_info();
|
||||
echo '<p><strong>' . __( 'Current Version:', 'minecraft-modern-theme' ) . '</strong> ' . esc_html( $current_version ) . '</p>';
|
||||
|
||||
echo '<p><strong>' . __('Current Version:', 'minecraft-modern-theme') . '</strong> ' . esc_html($current_version) . '</p>';
|
||||
|
||||
if (!empty($latest_release) && isset($latest_release['version'])) {
|
||||
if (version_compare($current_version, $latest_release['version'], '<')) {
|
||||
echo '<p><strong>' . __('Latest Version:', 'minecraft-modern-theme') . '</strong> <span style="color: #d63638;">' . esc_html($latest_release['version']) . '</span></p>';
|
||||
echo '<p><strong>' . __('Status:', 'minecraft-modern-theme') . '</strong> <span style="color: #d63638;">' . __('Update Available', 'minecraft-modern-theme') . '</span></p>';
|
||||
echo '<p><a href="' . esc_url($latest_release['download_url']) . '" class="button button-primary" target="_blank">' . __('Download Update', 'minecraft-modern-theme') . '</a></p>';
|
||||
if ( ! empty( $latest_release ) && isset( $latest_release['version'] ) ) {
|
||||
echo '<p><strong>' . __( 'Latest Version:', 'minecraft-modern-theme' ) . '</strong> ' . esc_html( $latest_release['version'] ) . '</p>';
|
||||
|
||||
if ( version_compare( $current_version, $latest_release['version'], '<' ) ) {
|
||||
echo '<p><strong>' . __( 'Status:', 'minecraft-modern-theme' ) . '</strong> <span style="color:#d63638;">' . __( 'Update Available', 'minecraft-modern-theme' ) . '</span></p>';
|
||||
echo '<p><a href="' . esc_url( $latest_release['download_url'] ) . '" class="button button-primary" target="_blank">' . __( 'Download Update', 'minecraft-modern-theme' ) . '</a></p>';
|
||||
} else {
|
||||
echo '<p><strong>' . __('Latest Version:', 'minecraft-modern-theme') . '</strong> <span style="color: #46b450;">' . esc_html($latest_release['version']) . '</span></p>';
|
||||
echo '<p><strong>' . __('Status:', 'minecraft-modern-theme') . '</strong> <span style="color: #46b450;">' . __('Up to Date', 'minecraft-modern-theme') . '</span></p>';
|
||||
echo '<p><strong>' . __( 'Status:', 'minecraft-modern-theme' ) . '</strong> <span style="color:#46b450;">' . __( 'Up to Date', 'minecraft-modern-theme' ) . '</span></p>';
|
||||
}
|
||||
} else {
|
||||
echo '<p><strong>' . __('Status:', 'minecraft-modern-theme') . '</strong> ' . __('Unable to check for updates', 'minecraft-modern-theme') . '</p>';
|
||||
echo '<p><strong>' . __( 'Status:', 'minecraft-modern-theme' ) . '</strong> ' . __( 'Unable to check for updates', 'minecraft-modern-theme' ) . '</p>';
|
||||
}
|
||||
|
||||
echo '<p><a href="https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme/releases" target="_blank">' . __('View All Releases', 'minecraft-modern-theme') . '</a></p>';
|
||||
}
|
||||
// Link für "Jetzt prüfen"
|
||||
$refresh_url = wp_nonce_url( admin_url( 'index.php?mm_clear_cache=1' ), 'mm_clear_cache_action' );
|
||||
echo '<p><a href="' . esc_url( $refresh_url ) . '" onclick="return confirm(\'Cache leeren und neu prüfen?\');">' . __( 'Check for Updates Now', 'minecraft-modern-theme' ) . '</a></p>';
|
||||
|
||||
echo '<p><a href="https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme/releases" target="_blank">' . __( 'View All Releases', 'minecraft-modern-theme' ) . '</a></p>';
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
357
README.md
357
README.md
@@ -2,7 +2,6 @@
|
||||
|
||||
Ein modernes und flexibles WordPress-Theme, perfekt für Minecraft-Server, Gaming-Communities und Gamer-Blogs. Passe deine Seite mit wenigen Klicks ganz nach deinem Stil an!
|
||||
|
||||
|
||||
<div align="center">
|
||||
<img src="https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme/raw/branch/main/Minecraft-Modern-Theme/screenshot.PNG" alt="Theme Screenshot" style="max-width: 500px; width: 100%; height: auto; border-radius: 8px;">
|
||||
</div>
|
||||
@@ -11,90 +10,326 @@ Ein modernes und flexibles WordPress-Theme, perfekt für Minecraft-Server, Gamin
|
||||
|
||||
## 🚀 Hauptfunktionen
|
||||
|
||||
- **🎨 Dynamischer Header-Slider:** Zeige bis zu 5 beeindruckende Banner mit individuellem Text, Effekten und Animationen.
|
||||
- **🌙 Dark & Light Mode:** Lass deine Besucher zwischen einem dunklen und einem hellen Design wählen.
|
||||
- **🎨 Komplette Farbanpassung:** Wähle deine eigene Akzentfarbe und Hintergrundfarbe, um dein Branding perfekt abzubilden.
|
||||
- **🌐 Social Media Integration:** Verlinke einfach all deine Kanäle (Discord, YouTube, Twitter, TikTok und viele mehr).
|
||||
- **📄 Eigenes FAQ-System:** Erstelle und verwalte eine eigene FAQ-Seite direkt im WordPress-Menü, ohne zusätzliche Plugins.
|
||||
- **🔐 Angepasste Login-Seite:** Gestalte die Login-Seite mit deinem eigenen Logo, Hintergrund und einem coolen Minecraft-Avatar-Slider.
|
||||
- **⬆️ "Nach oben"-Button:** Ein praktischer Button, der deinen Besuchern das Scrollen erleichtert.
|
||||
### Design & Layout
|
||||
- **🎨 Dynamischer Header-Slider** – Bis zu 5 Banner mit individuellem Text, Effekten und Animationen
|
||||
- **🌙 Dark & Light Mode** – Besucher wählen zwischen dunklem und hellem Design
|
||||
- **🎨 Komplette Farbanpassung** – Eigene Akzent- und Hintergrundfarbe
|
||||
- **📱 Responsive Design** – Optimiert für Desktop, Tablet und Smartphone
|
||||
- **⬆️ „Nach oben"-Button** – Ein- und ausschaltbar im Customizer
|
||||
- **🔤 4 Menü-Layouts** – Classic, Zentriert, Sidebar, Mega-Menü (wählbar im Customizer)
|
||||
- **🌐 Social Media Integration** – Discord, YouTube, Twitter, TikTok, Twitch, Steam, GitHub und mehr
|
||||
|
||||
### Inhalts-Module
|
||||
- **❓ FAQ-System** – Eigene FAQ-Seite mit Kategorien und Tab-Navigation, ohne Plugin
|
||||
- **👥 Team-Manager** – Teammitglieder mit Minecraft-Avatar (UUID), Rang, Bio und Banner-Bild verwalten
|
||||
- **🎬 Video-Galerie** – Videos von YouTube, Vimeo, Twitch und MP4-Dateien einbinden; Lightbox-Player, Kategorie-Filter
|
||||
- **📋 Bewerbungsformular** – Spieler können sich direkt auf der Website bewerben; Einreichungen im Admin-Backend mit Statusverwaltung
|
||||
|
||||
### Header & Navigation
|
||||
- **📢 Announcement Bar** – Auffällige Leiste oberhalb oder unterhalb des Headers mit individuellem Text, Farbe, Schrift und optionalem Countdown-Timer
|
||||
- **🔍 Suche im Header** – Suchfeld direkt im Header per Toggle-Button
|
||||
- **📌 Beitrag Sidebar** – Sidebar auf Einzelbeitrags-Seiten mit Positions- und Inhaltseinstellungen
|
||||
- **🍞 Breadcrumb** – Ein- und ausschaltbar auf Einzelbeitrags-Seiten
|
||||
|
||||
### DSGVO & Datenschutz
|
||||
- **🍪 Cookie-Banner (DSGVO)** – 4 Design-Varianten (Schmale Bar, Zweispaltig, Slide-In, Stepper) mit 3 Kategorien (Notwendig, Statistik, Marketing), automatischer iframe-Blockierung und optionaler Google Analytics Integration
|
||||
- **📄 Shortcode `[cookie_settings]`** – Link zum erneuten Öffnen der Cookie-Einstellungen
|
||||
|
||||
### Login
|
||||
- **🔐 Angepasste Login-Seite** – Eigenes Logo, Hintergrundbild und Minecraft-Avatar-Slider
|
||||
- **👤 Avatar-Slider** – Bis zu 5 Minecraft-Avatare per UUID
|
||||
|
||||
### Technisches
|
||||
- **📦 Import / Export** – Alle Theme-Einstellungen, Widgets, FAQs, Team und Custom CSS exportieren und importieren
|
||||
- **🔄 Automatische Theme-Updates** – Über Gitea-Repository
|
||||
- **♿ Barrierefreiheit** – ARIA-Labels, Keyboard-Navigation, Focus-States
|
||||
|
||||
---
|
||||
|
||||
## 📦 Installation (in 3 einfachen Schritten)
|
||||
## 📦 Installation
|
||||
|
||||
1. **Lade das Theme herunter:** Lade die `minecraft-modern.zip`-Datei herunter.
|
||||
2. **Lade es in WordPress hoch:**
|
||||
* Gehe in deinem WordPress-Adminbereich zu **Design > Themes > Installieren**.
|
||||
* Klicke auf den Button **Theme hochladen**.
|
||||
* Wähle die heruntergeladene `minecraft-modern.zip`-Datei aus und installiere sie.
|
||||
3. **Aktiviere das Theme:** Klicke nach der Installation auf **Aktivieren**. Fertig!
|
||||
1. **Lade das Theme herunter** – `minecraft-modern.zip` herunterladen
|
||||
2. **In WordPress hochladen** – Dashboard → Design → Themes → Installieren → Theme hochladen
|
||||
3. **Aktivieren** – Nach der Installation auf „Aktivieren" klicken
|
||||
|
||||
---
|
||||
|
||||
## 👶 Wichtig: Nutze das Child Theme!
|
||||
## 👶 Child Theme verwenden
|
||||
|
||||
Wenn du planst, Anpassungen vorzunehmen (z.B. Farben per Code ändern oder PHP-Dateien bearbeiten), solltest du unbedingt das mitgelieferte **Child Theme** verwenden.
|
||||
Für eigene Code-Anpassungen unbedingt das mitgelieferte **Child Theme** verwenden, damit Änderungen bei Updates nicht überschrieben werden.
|
||||
|
||||
**Warum?** Damit deine persönlichen Anpassungen bei einem Theme-Update nicht überschrieben werden!
|
||||
|
||||
### Installation des Child Themes (Der einfache Weg)
|
||||
|
||||
1. **Lade das Child Theme herunter:** Lade die `minecraft-modern-child.zip`-Datei herunter.
|
||||
2. **Lade es in WordPress hoch:**
|
||||
* Gehe zu **Design > Themes > Installieren**.
|
||||
* Klicke auf **Theme hochladen**.
|
||||
* Wähle die `minecraft-modern-child.zip`-Datei aus und installiere sie.
|
||||
3. **Aktiviere das Child Theme:** Klicke auf **Aktivieren**.
|
||||
|
||||
**Wichtig:** Das Haupt-Theme (Minecraft Modern) muss weiterhin installiert bleiben, darf aber nicht aktiviert sein. WordPress erkennt dies automatisch.
|
||||
1. `minecraft-modern-child.zip` hochladen und installieren
|
||||
2. Child Theme aktivieren
|
||||
3. Das Haupt-Theme bleibt installiert, darf aber nicht aktiviert sein
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ So passt du dein Theme an
|
||||
## ⚙️ Einstellungen im Customizer
|
||||
|
||||
Gehe in deinem WordPress-Dashboard zu **Design > Anpassen**, um in die Einstellungen zu gelangen.
|
||||
Alle Einstellungen unter **Design → Anpassen**.
|
||||
|
||||
### 1. Header-Slider einrichten
|
||||
### Header Slider
|
||||
- Slider aktivieren/deaktivieren
|
||||
- Bis zu 5 Bilder, Titel, Untertitel
|
||||
- Schriftart, -größe, -farbe
|
||||
- Übergangseffekt (Überblenden, Würfel, …)
|
||||
- Pfeile und Punkte ausblenden
|
||||
|
||||
Unter dem Punkt **Header Slider** kannst du:
|
||||
- Den Slider mit einem Haken aktivieren.
|
||||
- Bis zu 5 **Bilder, Titel und Untertitel** hochladen.
|
||||
- Die **Schriftart, -größe und -farbe** anpassen.
|
||||
- Einen **Effekt** auswählen (z.B. Überblenden oder Würfel).
|
||||
- Die **Pfeile** oder **Punkte** zur Navigation ausblenden.
|
||||
### Farben & Darstellung
|
||||
- Akzentfarbe (Buttons, Links, Highlights)
|
||||
- Hintergrundfarbe
|
||||
- Standard Dark / Light Mode
|
||||
|
||||
### 2. Farben & Design auswählen
|
||||
### Menü-Design
|
||||
- **Classic** – Logo links, Menü Mitte, Icons rechts
|
||||
- **Zentriert** – Logo oben, Menü darunter
|
||||
- **Sidebar** – Vertikale Menüleiste
|
||||
- **Mega-Menü** – Breite Dropdown-Spalten
|
||||
- Logo-/Titel-Position: Links, Mitte, Rechts
|
||||
|
||||
Unter **Farben & Darstellung** findest du:
|
||||
- **Akzentfarbe:** Die Hauptfarbe deines Themes (wird für Buttons, Links etc. verwendet).
|
||||
- **Hintergrundfarbe:** Die Farbe des Seitenhintergrunds.
|
||||
- **Standard-Theme-Modus:** Entscheide, ob deine Seite standardmäßig im Dark- oder Light-Mode starten soll.
|
||||
### Social Media Links
|
||||
Discord, YouTube, Twitter/X, Facebook, Instagram, TikTok, Twitch, Steam, GitHub, LinkedIn, Pinterest, Reddit, TeamSpeak, Spotify
|
||||
|
||||
### 3. Social-Media-Links hinzufügen
|
||||
### Footer-Einstellungen
|
||||
- Copyright-Text
|
||||
- Impressum- und Datenschutz-URLs
|
||||
- „Erstellt von"-Verweis ausblenden
|
||||
|
||||
Im Menüpunkt **Social Media Links** kannst du bei den jeweiligen Plattformen einfach deine URL eintragen. Die Icons erscheinen dann automatisch an der vorgesehenen Stelle.
|
||||
### FAQ Einstellungen
|
||||
- FAQ-System aktivieren/deaktivieren
|
||||
- Automatische Seitenerstellung
|
||||
|
||||
### 4. Footer anpassen
|
||||
### Team Einstellungen
|
||||
- Team-Modul aktivieren/deaktivieren
|
||||
- Automatische Seitenerstellung
|
||||
|
||||
Unter **Footer-Einstellungen** kannst du:
|
||||
- Den **Copyright-Text** ändern.
|
||||
- Die URLs für dein **Impressum** und die **Datenschutz**-Seite einfügen.
|
||||
- Den "Erstellt von"-Verweis am Ende der Seite ausblenden.
|
||||
### Login-Einstellungen
|
||||
- Hintergrundbild und Logo
|
||||
- Bis zu 5 Avatar-UUIDs
|
||||
- Slider-Geschwindigkeit
|
||||
|
||||
### 5. FAQs erstellen
|
||||
### Beitrag Sidebar
|
||||
- Sidebar ein-/ausschalten
|
||||
- Position: Links oder Rechts
|
||||
- **Breadcrumb** ein-/ausschalten
|
||||
- **Ähnliche Beiträge** ein-/ausschalten
|
||||
|
||||
1. Gehe zu **FAQ Einstellungen** und setze einen Haken bei "FAQ System aktivieren".
|
||||
2. Das Theme erstellt automatisch eine neue Seite namens "FAQ" und einen neuen Menüpunkt **FAQs** in deinem WordPress-Dashboard.
|
||||
3. Unter **FAQs > Neue FAQ hinzufügen** kannst du jetzt deine Fragen und Antworten erstellen. Du kannst sie sogar in Kategorien sortieren!
|
||||
### Cookie-Banner (DSGVO)
|
||||
- Aktivieren/Deaktivieren
|
||||
- **4 Design-Varianten:**
|
||||
- Variante 1 – Schmale Bar (volle Breite)
|
||||
- Variante 2 – Zweispaltig (3A)
|
||||
- Variante 3 – Slide-In von rechts (3B)
|
||||
- Variante 4 – Kompakt-Center mit Stepper (3C)
|
||||
- Banner-Text
|
||||
- URL zur Datenschutzerklärung
|
||||
- Beschreibungen für alle 3 Cookie-Kategorien
|
||||
- Google Analytics ID (wird nur nach Zustimmung geladen)
|
||||
- Cookie-Laufzeit in Tagen
|
||||
- Live-Vorschau direkt im Customizer
|
||||
|
||||
### 6. Login-Seite gestalten
|
||||
|
||||
Unter **Login-Einstellungen** kannst du:
|
||||
- Ein **Hintergrundbild** und ein **Logo** für die Login-Seite hochladen.
|
||||
- Bis zu 5 **Minecraft-Avatar-UUIDs** eintragen, um einen dynamischen Avatar-Slider zu erzeugen. (Eine UUID findest du z.B. auf [minotar.net](https://minotar.net/)).
|
||||
- Die **Geschwindigkeit** des Avatar-Wechsels einstellen.
|
||||
### Bewerbungsformular
|
||||
- Aktivieren/Deaktivieren
|
||||
- Seitentitel und Beschreibungstext
|
||||
- Erfolgsmeldung nach dem Absenden
|
||||
- Mindestalter einstellen
|
||||
|
||||
---
|
||||
|
||||
Viel Spaß mit deinem neuen Theme! 🎮✨
|
||||
## 📢 Announcement Bar (Admin-Menü)
|
||||
|
||||
Eigener Menüpunkt **„Ankündigung"** im WordPress-Admin.
|
||||
|
||||
- Text mit HTML und Icons
|
||||
- Hintergrund- und Textfarbe
|
||||
- Schriftfamilie und -größe (30+ Google Fonts)
|
||||
- Position: Über oder unter dem Header
|
||||
- **Countdown-Timer** – Zieldatum und Ablauf-Nachricht einstellbar
|
||||
- Live-Vorschau direkt auf der Admin-Seite
|
||||
|
||||
---
|
||||
|
||||
## 👥 Team Manager (Admin-Menü)
|
||||
|
||||
Eigener Menüpunkt **„Team Manager"** im WordPress-Admin.
|
||||
|
||||
- Mitglieder hinzufügen, bearbeiten, löschen
|
||||
- **Minecraft UUID** → Avatar wird automatisch geladen
|
||||
- Alternativ: eigenes Avatar-Bild hochladen
|
||||
- Banner-Bild pro Mitglied
|
||||
- Sortierung per Drag & Drop (▲▼)
|
||||
- Rang/Position, Bio, alle Felder inline editierbar
|
||||
|
||||
---
|
||||
|
||||
## 🎬 Video-System
|
||||
|
||||
### Verwaltung
|
||||
Menüpunkt **„Videos"** im WordPress-Admin.
|
||||
|
||||
- Titel, Vorschaubild, Beschreibung
|
||||
- Video-URL einfügen (normale Seiten-URL reicht)
|
||||
- Shortcode wird automatisch angezeigt und kann kopiert werden
|
||||
- Kategorie zum Filtern
|
||||
|
||||
### Unterstützte Plattformen
|
||||
| Plattform | Beispiel-URL |
|
||||
|-----------|-------------|
|
||||
| YouTube | `https://www.youtube.com/watch?v=…` |
|
||||
| YouTube Shorts | `https://youtube.com/shorts/…` |
|
||||
| Vimeo | `https://vimeo.com/123456` |
|
||||
| Twitch VOD | `https://twitch.tv/videos/123456` |
|
||||
| Twitch Stream | `https://twitch.tv/kanalname` |
|
||||
| Direkte MP4 | `https://example.com/video.mp4` |
|
||||
|
||||
### Galerie-Seite
|
||||
Automatisch unter `deine-seite.de/videos/` erreichbar.
|
||||
- Grid-Layout mit Thumbnail (YouTube-Thumbnail automatisch)
|
||||
- Lightbox-Player beim Klick
|
||||
- Kategorie-Filter-Tabs
|
||||
- Plattform-Badge je Video
|
||||
|
||||
### Shortcode
|
||||
```
|
||||
[mm_video url="https://www.youtube.com/watch?v=VIDEOID"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📋 Bewerbungsformular
|
||||
|
||||
### Formular-Felder
|
||||
- Minecraft Username (mit Live-Avatar-Vorschau)
|
||||
- Discord Username
|
||||
- Alter (mit Mindestalter-Prüfung)
|
||||
- Warum möchtest du mitspielen? (mit Zeichenzähler)
|
||||
- Erfahrung & Vorstellung (mit Zeichenzähler)
|
||||
|
||||
### Admin-Backend
|
||||
Menüpunkt **„Bewerbungen"** im WordPress-Admin.
|
||||
|
||||
- Übersichtstabelle mit Avatar, MC-Name, Discord, Alter, Status
|
||||
- Detailansicht mit allen Antworten
|
||||
- **Status pro Bewerbung:** Neu / In Prüfung / Angenommen / Abgelehnt
|
||||
- Interne Notiz pro Bewerbung
|
||||
- Doppelbewerbungsschutz (gleicher MC-Name: 30 Tage Sperre)
|
||||
|
||||
### Aktivierung
|
||||
Customizer → „Bewerbungsformular" → Checkbox aktivieren
|
||||
→ Seite `deine-seite.de/bewerbung/` wird automatisch angelegt
|
||||
|
||||
---
|
||||
|
||||
## 🍪 Cookie-Banner (DSGVO)
|
||||
|
||||
### 3 Kategorien
|
||||
| Kategorie | Beschreibung |
|
||||
|-----------|-------------|
|
||||
| Notwendige | Immer aktiv, nicht deaktivierbar |
|
||||
| Statistik | Google Analytics (wird nach Zustimmung geladen) |
|
||||
| Marketing | YouTube, Vimeo, Twitch, Facebook, Instagram u.v.m. |
|
||||
|
||||
### Automatische iframe-Blockierung
|
||||
Folgende Embeds werden automatisch blockiert bis Marketing akzeptiert wird:
|
||||
YouTube, Vimeo, Google Maps, Facebook, Twitter, TikTok, Instagram, Spotify, Twitch
|
||||
|
||||
### PHP-Hilfsfunktionen
|
||||
```php
|
||||
// Prüfen ob Kategorie akzeptiert wurde
|
||||
if ( mm_cookie_accepted('statistics') ) { /* Analytics-Code */ }
|
||||
if ( mm_cookie_accepted('marketing') ) { /* Marketing-Code */ }
|
||||
```
|
||||
|
||||
### Shortcode für Datenschutzseite
|
||||
```
|
||||
[cookie_settings text="Cookie-Einstellungen ändern"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📄 Verfügbare Template-Dateien
|
||||
|
||||
| Datei | Beschreibung |
|
||||
|-------|-------------|
|
||||
| `front-page.php` | Startseite mit Slider und Sidebar |
|
||||
| `single.php` | Einzelbeitrag mit Breadcrumb, Related Posts, Sidebar |
|
||||
| `archive.php` | Kategorie- und Tag-Archive |
|
||||
| `archive-team.php` | Team-Übersicht |
|
||||
| `archive-faq.php` | FAQ-Seite mit Tabs |
|
||||
| `archive-video.php` | Video-Galerie |
|
||||
| `page-bewerbung.php` | Bewerbungsformular |
|
||||
| `page-login.php` | Angepasste WordPress-Login-Seite |
|
||||
| `search.php` | Suchergebnisse |
|
||||
| `404.php` | Fehlerseite im Minecraft-Stil |
|
||||
| `comments.php` | Kommentarbereich |
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Shortcode-Übersicht
|
||||
|
||||
| Shortcode | Beschreibung |
|
||||
|-----------|-------------|
|
||||
| `[mm_video url="URL"]` | Video einbetten (YouTube, Vimeo, Twitch, MP4) |
|
||||
| `[cookie_settings]` | Link zum Öffnen der Cookie-Einstellungen |
|
||||
| `[cookie_settings text="…"]` | Mit eigenem Linktext |
|
||||
|
||||
---
|
||||
|
||||
## 📥 Import / Export
|
||||
|
||||
Unter **Design → Anpassen → Import/Export** kannst du alle Theme-Einstellungen sichern:
|
||||
|
||||
**Enthält:**
|
||||
- Alle Customizer-Einstellungen
|
||||
- Announcement Bar Einstellungen
|
||||
- Widget-Konfigurationen
|
||||
- Team-Mitglieder
|
||||
- FAQ-Einträge
|
||||
- Custom CSS
|
||||
- Menü-Positionen
|
||||
|
||||
---
|
||||
|
||||
## 🗂️ Verzeichnisstruktur
|
||||
|
||||
```
|
||||
minecraft-modern/
|
||||
├── inc/
|
||||
│ ├── customizer.php – Customizer-Einstellungen
|
||||
│ └── theme-updater.php – Automatische Updates via Gitea
|
||||
├── js/
|
||||
│ ├── header-scroll.js – Header-Scroll-Effekt + Suche-Toggle
|
||||
│ ├── navigation.js – Menü-Toggle + Dropdown
|
||||
│ ├── slider-init.js – Swiper.js Initialisierung
|
||||
│ ├── theme-toggle.js – Dark/Light Mode
|
||||
│ ├── announcement.js – Announcement Bar + Countdown
|
||||
│ ├── login-slider.js – Avatar-Slider auf Login-Seite
|
||||
│ ├── faq-accordion.js – FAQ Accordion
|
||||
│ └── scroll-to-top.js – Nach-oben-Button
|
||||
├── css/
|
||||
│ ├── announcement.css – Announcement Bar Styles
|
||||
│ └── login-style.css – Login-Seite Styles
|
||||
├── functions.php – Haupt-Funktionsdatei
|
||||
├── style.css – Haupt-Stylesheet
|
||||
└── screenshot.PNG – Theme-Vorschaubild
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📜 Changelog
|
||||
|
||||
### Version aktuell
|
||||
- ✅ Cookie-Banner mit 4 Design-Varianten und DSGVO-Konformität
|
||||
- ✅ Video-System mit YouTube, Vimeo, Twitch, MP4
|
||||
- ✅ Bewerbungsformular mit Admin-Backend
|
||||
- ✅ Breadcrumb und Ähnliche Beiträge (ein-/ausschaltbar)
|
||||
- ✅ 4 Menü-Layout-Varianten
|
||||
- ✅ Announcement Bar mit Countdown
|
||||
- ✅ Team Manager mit UUID-Avatar
|
||||
- ✅ Import/Export komplett
|
||||
|
||||
---
|
||||
|
||||
**Copyright © 2026 - M_Viper - Alle Rechte vorbehalten**
|
||||
|
||||
Die unbefugte Vervielfältigung, Verbreitung oder Weitergabe dieses Themes ist strafbar und wird rechtlich verfolgt.
|
||||
Reference in New Issue
Block a user