/home
/noveo4
/domains
/biotaniqe.pl
/public_html
/public
/wp-includes
/media.php
* (like inserting into an editor). Default null.
* @return int[] {
* An array of width and height values.
*
* @type int $0 The maximum width in pixels.
* @type int $1 The maximum height in pixels.
* }
*/
function image_constrain_size_for_editor( $width, $height, $size = 'medium', $context = null ) {
global $content_width;
$_wp_additional_image_sizes = wp_get_additional_image_sizes();
if ( ! $context ) {
$context = is_admin() ? 'edit' : 'display';
}
if ( is_array( $size ) ) {
$max_width = $size[0];
$max_height = $size[1];
} elseif ( 'thumb' === $size || 'thumbnail' === $size ) {
$max_width = (int) get_option( 'thumbnail_size_w' );
$max_height = (int) get_option( 'thumbnail_size_h' );
// Last chance thumbnail size defaults.
if ( ! $max_width && ! $max_height ) {
$max_width = 128;
$max_height = 96;
}
} elseif ( 'medium' === $size ) {
$max_width = (int) get_option( 'medium_size_w' );
$max_height = (int) get_option( 'medium_size_h' );
} elseif ( 'medium_large' === $size ) {
$max_width = (int) get_option( 'medium_large_size_w' );
$max_height = (int) get_option( 'medium_large_size_h' );
if ( (int) $content_width > 0 ) {
$max_width = min( (int) $content_width, $max_width );
}
} elseif ( 'large' === $size ) {
/home
/noveo4
/domains
/biotaniqe.pl
/public_html
/public
/wp-includes
/media.php
* (like inserting into an editor). Default null.
* @return int[] {
* An array of width and height values.
*
* @type int $0 The maximum width in pixels.
* @type int $1 The maximum height in pixels.
* }
*/
function image_constrain_size_for_editor( $width, $height, $size = 'medium', $context = null ) {
global $content_width;
$_wp_additional_image_sizes = wp_get_additional_image_sizes();
if ( ! $context ) {
$context = is_admin() ? 'edit' : 'display';
}
if ( is_array( $size ) ) {
$max_width = $size[0];
$max_height = $size[1];
} elseif ( 'thumb' === $size || 'thumbnail' === $size ) {
$max_width = (int) get_option( 'thumbnail_size_w' );
$max_height = (int) get_option( 'thumbnail_size_h' );
// Last chance thumbnail size defaults.
if ( ! $max_width && ! $max_height ) {
$max_width = 128;
$max_height = 96;
}
} elseif ( 'medium' === $size ) {
$max_width = (int) get_option( 'medium_size_w' );
$max_height = (int) get_option( 'medium_size_h' );
} elseif ( 'medium_large' === $size ) {
$max_width = (int) get_option( 'medium_large_size_w' );
$max_height = (int) get_option( 'medium_large_size_h' );
if ( (int) $content_width > 0 ) {
$max_width = min( (int) $content_width, $max_width );
}
} elseif ( 'large' === $size ) {
/home
/noveo4
/domains
/biotaniqe.pl
/public_html
/public
/wp-includes
/media.php
$info = wp_getimagesize( $thumbfile );
if ( $info ) {
$img_url = str_replace( $img_url_basename, wp_basename( $thumbfile ), $img_url );
$width = $info[0];
$height = $info[1];
$is_intermediate = true;
}
}
}
if ( ! $width && ! $height && isset( $meta['width'], $meta['height'] ) ) {
// Any other type: use the real image.
$width = $meta['width'];
$height = $meta['height'];
}
if ( $img_url ) {
// We have the actual image size, but might need to further constrain it if content_width is narrower.
list( $width, $height ) = image_constrain_size_for_editor( $width, $height, $size );
return array( $img_url, $width, $height, $is_intermediate );
}
return false;
}
/**
* Registers a new image size.
*
* @since 2.9.0
*
* @global array $_wp_additional_image_sizes Associative array of additional image sizes.
*
* @param string $name Image size identifier.
* @param int $width Optional. Image width in pixels. Default 0.
* @param int $height Optional. Image height in pixels. Default 0.
* @param bool|array $crop {
* Optional. Image cropping behavior. If false, the image will be scaled (default).
* If true, image will be cropped to the specified dimensions using center positions.
/home
/noveo4
/domains
/biotaniqe.pl
/public_html
/public
/wp-includes
/media.php
* Retrieves an image to represent an attachment.
*
* @since 2.5.0
*
* @param int $attachment_id Image attachment ID.
* @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of
* width and height values in pixels (in that order). Default 'thumbnail'.
* @param bool $icon Optional. Whether the image should fall back to a mime type icon. Default false.
* @return array|false {
* Array of image data, or boolean false if no image is available.
*
* @type string $0 Image source URL.
* @type int $1 Image width in pixels.
* @type int $2 Image height in pixels.
* @type bool $3 Whether the image is a resized image.
* }
*/
function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon = false ) {
// Get a thumbnail or intermediate image if there is one.
$image = image_downsize( $attachment_id, $size );
if ( ! $image ) {
$src = false;
if ( $icon ) {
$src = wp_mime_type_icon( $attachment_id );
if ( $src ) {
/** This filter is documented in wp-includes/post.php */
$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
$src_file = $icon_dir . '/' . wp_basename( $src );
list( $width, $height ) = wp_getimagesize( $src_file );
}
}
if ( $src && $width && $height ) {
$image = array( $src, $width, $height, false );
}
}
/**
/home
/noveo4
/domains
/biotaniqe.pl
/public_html
/public
/wp-includes
/media.php
*
* @type string $src Image attachment URL.
* @type string $class CSS class name or space-separated list of classes.
* Default `attachment-$size_class size-$size_class`,
* where `$size_class` is the image size being requested.
* @type string $alt Image description for the alt attribute.
* @type string $srcset The 'srcset' attribute value.
* @type string $sizes The 'sizes' attribute value.
* @type string|false $loading The 'loading' attribute value. Passing a value of false
* will result in the attribute being omitted for the image.
* Defaults to 'lazy', depending on wp_lazy_loading_enabled().
* @type string $decoding The 'decoding' attribute value. Possible values are
* 'async' (default), 'sync', or 'auto'. Passing false or an empty
* string will result in the attribute being omitted.
* }
* @return string HTML img element or empty string on failure.
*/
function wp_get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = false, $attr = '' ) {
$html = '';
$image = wp_get_attachment_image_src( $attachment_id, $size, $icon );
if ( $image ) {
list( $src, $width, $height ) = $image;
$attachment = get_post( $attachment_id );
$hwstring = image_hwstring( $width, $height );
$size_class = $size;
if ( is_array( $size_class ) ) {
$size_class = implode( 'x', $size_class );
}
$default_attr = array(
'src' => $src,
'class' => "attachment-$size_class size-$size_class",
'alt' => trim( strip_tags( get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) ) ),
);
/**
* Filters the context in which wp_get_attachment_image() is used.
/home
/noveo4
/domains
/biotaniqe.pl
/public_html
/public
/wp-content
/themes
/movecloser
/index.php
$args = array(
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'categoryproduct',
'field' => 'term_id',
'terms' => $page_object->term_id,
)
)
);
$posts = new WP_Query($args);
$posts = $posts->posts;
?>
<?php if( get_field('category_image', $page_object) ): ?>
<div class="row main-banner">
<?php echo wp_get_attachment_image(get_field('category_image', $page_object), array(1920), "", array( "class" => "img-responsive" )); ?>
</div>
<?php else: ?>
<div class="container">
<div class="row">
<div class="col-md-2 col-xs-1"></div>
<div class="col-md-8 col-xs-10">
<div class="row-article-products-header"><h2><?php echo $page_object->name; ?></h2></div>
</div>
<div class="col-md-2 col-xs-1"></div>
</div>
</div>
<?php endif; ?>
<div class="container">
<div class="row">
<?php foreach ($posts as $post): ?>
<div class="col-md-4">
<div class="product-box">
<a href="<?php echo get_permalink($post->ID);?>">
/home
/noveo4
/domains
/biotaniqe.pl
/public_html
/public
/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;
}
/home
/noveo4
/domains
/biotaniqe.pl
/public_html
/public
/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';
}
/home
/noveo4
/domains
/biotaniqe.pl
/public_html
/public
/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';