template/php/partials/functions.php in edge_framework-0.8.1 vs template/php/partials/functions.php in edge_framework-0.9.0
- old
+ new
@@ -1,8 +1,8 @@
<?php
/* ------------------------------------------------
--- You must change the server_url to fit your server
+-- You must change the $server_url to fit your server
--
-- This file is exclusive to your machine,
-- DON'T push your changes to Git
-------------------------------------------------- */
@@ -50,38 +50,34 @@
/*
Echo path to assets directory
@return = relative path to specified assets directory
*/
-function img() { echo root().'assets/img/'; }
-function css() { echo root().'assets/css/'; }
-function js() { echo root().'assets/js/'; }
-function files() { echo root().'assets/files/'; }
+function img() { echo root()."assets/img/"; }
+function css() { echo root()."assets/css/"; }
+function js() { echo root()."assets/js/"; }
+function files() { echo root()."assets/files/"; }
/*
Get partials
@param
file = partial file name, without extension
@return = content of the partial file
*/
function get($file, $params = array()) {
- // If first letter is not underscore, add it
- if(substr($file, 0, 1) !== '_') {
- $file = '_'.$file;
- }
- return (include root().'partials/'.$file.'.php');
+ return (include root()."partials/".$file.".php");
}
/*
Get the last word from the URL, useful for Header-menu's active state
- @return = the last word from the current page
+ @return = the last word from the current page
*/
function get_current_page() {
- $pageURL = 'http';
+ $pageURL = "http";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
- $url_break = explode('/', $pageURL);
+ $url_break = explode("/", $pageURL);
return $url_break[count($url_break)-2];
}
\ No newline at end of file