Deprecated: Function create_function() is deprecated in /var/www/ecc.se/public_html/wp-includes/pomo/translations.php on line 208
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/ecc.se/public_html/wp-includes/load.php on line 583
Deprecated: Function create_function() is deprecated in /var/www/ecc.se/public_html/wp-includes/pomo/translations.php on line 208
//define constnts
define( 'TEMPLATEURI', get_template_directory_uri( ) );
define( 'TEMPLATEIMAGESURI', TEMPLATEURI.'/images' );
// Include and startcore
require_once( __DIR__ . "/core/core.php");
Core::startCore( array( 'fancybox', 'corewp', 'kimcore', 'coretwitter', 'corevideo', 'cache' ) );
//enable custom posttypes
PosttypeConfig::declarePosttypes();
PosttypeConfig::addActions();
//theme textdomain
load_theme_textdomain('default', get_template_directory().'/languages');
// Hooks for configurating the tiny mce editors
EditorConfig::addActions();
// Remove hooks from wp_head
WpHead::removeActions();
// Hooks for user roles and rights
UserRoles::addActions();
UserRights::addActions();
//remove unnecesary fields from gallery uploader
WpGallery::addActions();
//include admin css and admin js.
WpAdmin::addActions();
//add custom menus
WpCustomMenus::addMenus();
//order sidebar and remove crap
WpSidebarMenu::addActions();
add_action( 'admin_menu', 'footer_values' );
function footer_values() {
add_options_page( __('Övriga värden'), __('Övriga värden'), 'manage_options', 'footer-values', 'my_footer_values' );
}
function my_footer_values() {
if ( !current_user_can( 'manage_options' ) ) {
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
}
echo Element::renderElement('admin/footer-values');
}
function get_archives_link_mod ( $link_html ) {
preg_match("/href='(.+?)'/", $link_html, $url);
$url = preg_replace('#^https?://#', '', $url);
$explode = explode('/', $url[1]);
if($explode[0] == 'ecc.haus.se' || $explode[0] == 'ecc.se' || $explode[0] == 'www.ecc.se') unset($explode[0]);
$url[1] = implode('/', $explode);
if (strstr($_SERVER['REQUEST_URI'],$url[1])) {
$link_html = str_replace("", "", $link_html);
}
return $link_html;
}
add_filter("get_archives_link", "get_archives_link_mod");
function my_custom_post_type_archive_where($where,$args){
$post_type = isset($args['post_type']) ? $args['post_type'] : 'post';
$where = "WHERE post_type = '$post_type' AND post_status = 'publish'";
return $where;
}
add_filter( 'getarchives_where','my_custom_post_type_archive_where',10,2);
?>
Deprecated: Function create_function() is deprecated in /var/www/ecc.se/public_html/wp-includes/pomo/translations.php on line 208
/* Template Name: Startsida */
get_header();
?>
Fatal error: Uncaught Error: Class 'element' not found in /var/www/ecc.se/public_html/wp-content/themes/default/page-startpage.php:6
Stack trace:
#0 /var/www/ecc.se/public_html/wp-includes/template-loader.php(75): include()
#1 /var/www/ecc.se/public_html/wp-blog-header.php(16): require_once('/var/www/ecc.se...')
#2 /var/www/ecc.se/public_html/index.php(17): require('/var/www/ecc.se...')
#3 {main}
thrown in /var/www/ecc.se/public_html/wp-content/themes/default/page-startpage.php on line 6