/var/www/newjustice/newjustice.org.ua/wp-content/themes/twentyseventeen/single-materials.php
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php $custom = get_post_custom();
$files_items = $custom["materials_files"] ?? '';
if ( !empty($files_items[0]) ) {?>
<div class="fileblock">
<div class="filestableflex">
<?php $files_to_zip = array();// create files array
foreach ( $files_items as $item ) {
$files_to_zip [] = get_attached_file( $item ); // populate files array
$file_url = wp_get_attachment_url( $item );
$filetype = wp_check_filetype( $file_url );
?>
<div class="filerow">
<div class="filename">
<?php
$title = explode('|', get_the_title($item) );
if ( $title[1] ) {
if ( pll_current_language() == 'uk') {
echo $title[1];
} else {
echo $title[0];
}
} else {
echo get_the_title($item);
}
echo ('.'.$filetype['ext'])
?>
</div>
<div class="filedownload">
<a class="download" href="<?php echo wp_get_attachment_url($item); ?>" download><?=__( 'Download', 'twentyseventeen' )?> <?php /*$filetype['ext'] */?></a>
</div>
</div>
<?php
} ?>
</div>
<?php
$zip = new ZipArchive;
/var/www/newjustice/newjustice.org.ua/wp-content/themes/twentyseventeen/single-materials.php
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php $custom = get_post_custom();
$files_items = $custom["materials_files"] ?? '';
if ( !empty($files_items[0]) ) {?>
<div class="fileblock">
<div class="filestableflex">
<?php $files_to_zip = array();// create files array
foreach ( $files_items as $item ) {
$files_to_zip [] = get_attached_file( $item ); // populate files array
$file_url = wp_get_attachment_url( $item );
$filetype = wp_check_filetype( $file_url );
?>
<div class="filerow">
<div class="filename">
<?php
$title = explode('|', get_the_title($item) );
if ( $title[1] ) {
if ( pll_current_language() == 'uk') {
echo $title[1];
} else {
echo $title[0];
}
} else {
echo get_the_title($item);
}
echo ('.'.$filetype['ext'])
?>
</div>
<div class="filedownload">
<a class="download" href="<?php echo wp_get_attachment_url($item); ?>" download><?=__( 'Download', 'twentyseventeen' )?> <?php /*$filetype['ext'] */?></a>
</div>
</div>
<?php
} ?>
</div>
<?php
$zip = new ZipArchive;
/var/www/newjustice/newjustice.org.ua/wp-includes/template-loader.php
}
break;
}
}
if ( ! $template ) {
$template = get_index_template();
}
/**
* Filters the path of the current template before including it.
*
* @since 3.0.0
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
/var/www/newjustice/newjustice.org.ua/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
/var/www/newjustice/newjustice.org.ua/index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';