Commit d4515794 authored by Michael Ochmann's avatar Michael Ochmann
Browse files

fixed auto include to respect subnamespaces; moved `Services` class to `Service`

parent b6153934
<?php
namespace FSI;
namespace FSI\PostType;
class Services {
class Service {
public function __construct() {
add_action("init", array($this, "init"));
add_action("save_post", array($this, "saveLink"), 10, 2);
......
......@@ -4,6 +4,6 @@ namespace FSI;
class PostTypes {
public function __construct() {
new Services();
new PostType\Service();
}
}
\ No newline at end of file
......@@ -25,7 +25,7 @@ class Theme {
}
public function autoload($className) {
$className = str_replace("FSI\\", "", $className);
$className = str_replace('\\', '/', str_replace("FSI\\", "", $className));
if (file_exists(FSI_PATH."/classes/$className.php"))
require_once(FSI_PATH."/classes/$className.php");
}
......
......@@ -9,7 +9,7 @@ class WidgetCalendar extends \WP_Widget {
));
}
public function widget() {
public function widget($args = "", $instance = "") {
$calendar = new \Calendar(date("n"), date("Y"));
echo "<fsi-calendar>".$calendar->render()."</fsi-calendar>";
}
......
......@@ -27,7 +27,7 @@
<a class="menuButton"><span class="glyphicon glyphicon-menu-hamburger"></span></a>
<section class="menu">
<nav class="row first">
< <?php echo FSI\MainMenu::secondary(); ?>
<?php echo FSI\MainMenu::secondary(); ?>
</nav>
<nav class="row second">
<?php echo FSI\MainMenu::primary(); ?>
......
This diff is collapsed.
<?php get_header(); ?>
<main>
<section class="row">
<section class="col-md-9">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
echo "
<fsi-tile class=\"post\">
<fsi-title><a href=\"".get_the_permalink()."\">".get_the_title()."</a></fsi-title>
<fsi-subtitle> ".get_the_author()." am ".get_the_date()."</fsi-subtitle>
<article class=\"post\">
".get_the_content()."
</article>
<h3>Tags</h3>
".get_the_tag_list(null, ", ")."
<div style='clear: both;'></div>
</fsi-tile>
";
}
}
?>
</section>
<section class="col-md-3">
<fsi-tile>
<?php get_sidebar('sidebar-1'); ?>
</fsi-tile>
</section>
</section>
</main>
<?php get_footer(); ?>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment