<?php /** * UnderStrap functions and definitions * * @package UnderStrap */ // Exit if accessed directly. defined( 'ABSPATH' ) || exit; // UnderStrap's includes directory. $understrap_inc_dir = get_template_directory() . '/inc'; // Array of files to include. $understrap_includes = array( '/enqueue.php', // Enqueue scripts and styles. '/interaction-system.php', // Load likes & comments funcs and UIs. '/acf-options.php', // Registers acf options page. '/static-categories.php', // Registers undeletable categories '/categories-icons.php', // Translate category names of posts to FA icons '/secure-core-pages.php', // Restricts deletion and trash of theme main pages '/class-tgm-plugin-activation.php', // TGM plugin activation and recommendation '/tgma-plugins.php', // TGM required plugins ); // Load Jetpack compatibility file if Jetpack is activiated. if ( class_exists( 'Jetpack' ) ) { $understrap_includes[] = '/jetpack.php'; } // Include files. foreach ( $understrap_includes as $file ) { require_once $understrap_inc_dir . $file; } add_filter( 'comment_form_fields', 'move_comment_field' ); function move_comment_field( $fields ) { $comment_field = $fields['comment']; unset( $fields['comment'] ); $fields['comment'] = $comment_field; return $fields; } // Add or edit the notes before the comments form add_filter( 'comment_form_defaults', 'sp_add_comment_form_before' ); function sp_add_comment_form_before( $defaults ) { $defaults['comment_notes_before'] = '<p class="comment-notes">E-postadressen din vil ikke offentliggjøres. Alle felt må fylles ut</p>'; return $defaults; }