Whoops \ Exception \ ErrorException (E_WARNING)
filesize(): stat failed for /home/yhkodit.fi/stage/releases/20210615072611/content/uploads/2017/11/YH_kodit_vuokraasunto_irtisanomislomake_2016_web.pdf Whoops\Exception\ErrorException thrown with message "filesize(): stat failed for /home/yhkodit.fi/stage/releases/20210615072611/content/uploads/2017/11/YH_kodit_vuokraasunto_irtisanomislomake_2016_web.pdf" Stacktrace: #29 Whoops\Exception\ErrorException in /home/yhkodit.fi/stage/releases/20210615072611/content/themes/yhkodit/includes/Hooks.php:184 #28 filesize in /home/yhkodit.fi/stage/releases/20210615072611/content/themes/yhkodit/includes/Hooks.php:184 #27 YH\Hooks:file_value_format in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/class-wp-hook.php:288 #26 WP_Hook:apply_filters in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/plugin.php:203 #25 apply_filters in /home/yhkodit.fi/stage/releases/20210615072611/content/plugins/advanced-custom-fields-pro/includes/api/api-value.php:351 #24 acf_format_value in /home/yhkodit.fi/stage/releases/20210615072611/content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php:596 #23 acf_field_repeater:format_value in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/class-wp-hook.php:286 #22 WP_Hook:apply_filters in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/plugin.php:203 #21 apply_filters in /home/yhkodit.fi/stage/releases/20210615072611/content/plugins/advanced-custom-fields-pro/includes/api/api-value.php:351 #20 acf_format_value in /home/yhkodit.fi/stage/releases/20210615072611/content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php:878 #19 acf_field_flexible_content:format_value in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/class-wp-hook.php:286 #18 WP_Hook:apply_filters in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/plugin.php:203 #17 apply_filters in /home/yhkodit.fi/stage/releases/20210615072611/content/plugins/advanced-custom-fields-pro/includes/api/api-value.php:351 #16 acf_format_value in /home/yhkodit.fi/stage/releases/20210615072611/content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php:878 #15 acf_field_flexible_content:format_value in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/class-wp-hook.php:286 #14 WP_Hook:apply_filters in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/plugin.php:203 #13 apply_filters in /home/yhkodit.fi/stage/releases/20210615072611/content/plugins/advanced-custom-fields-pro/includes/api/api-value.php:351 #12 acf_format_value in /home/yhkodit.fi/stage/releases/20210615072611/content/plugins/advanced-custom-fields-pro/includes/api/api-template.php:311 #11 get_field_objects in /home/yhkodit.fi/stage/releases/20210615072611/content/plugins/advanced-custom-fields-pro/includes/api/api-template.php:169 #10 get_fields in /home/yhkodit.fi/stage/releases/20210615072611/vendor/devgeniem/dustpress/classes/query.php:110 #9 DustPress\Query:get_acf_post in /home/yhkodit.fi/stage/releases/20210615072611/content/themes/yhkodit/models/shared/middle-model.php:14 #8 MiddleModel:Content in /home/yhkodit.fi/stage/releases/20210615072611/vendor/devgeniem/dustpress/classes/model.php:585 #7 call_user_func in /home/yhkodit.fi/stage/releases/20210615072611/vendor/devgeniem/dustpress/classes/model.php:585 #6 DustPress\Model:run_function in /home/yhkodit.fi/stage/releases/20210615072611/vendor/devgeniem/dustpress/classes/model.php:276 #5 DustPress\Model:fetch_data in /home/yhkodit.fi/stage/releases/20210615072611/vendor/devgeniem/dustpress/dustpress.php:241 #4 DustPress:create_instance in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/class-wp-hook.php:286 #3 WP_Hook:apply_filters in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/plugin.php:203 #2 apply_filters in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-includes/template-loader.php:73 #1 require_once in /home/yhkodit.fi/stage/releases/20210615072611/wp/wp-blog-header.php:19 #0 require in /home/yhkodit.fi/stage/releases/20210430071144/index.php:4
Stack frames (30)
29
Whoops
\
Exception
\
ErrorException
/
content
/
themes
/
yhkodit
/
includes
/
Hooks.php
184
28
filesize
/
content
/
themes
/
yhkodit
/
includes
/
Hooks.php
184
27
YH
\
Hooks
file_value_format
/
wp
/
wp-includes
/
class-wp-hook.php
288
26
WP_Hook
apply_filters
/
wp
/
wp-includes
/
plugin.php
203
25
apply_filters
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-value.php
351
24
acf_format_value
/
content
/
plugins
/
advanced-custom-fields-pro
/
pro
/
fields
/
class-acf-field-repeater.php
596
23
acf_field_repeater
format_value
/
wp
/
wp-includes
/
class-wp-hook.php
286
22
WP_Hook
apply_filters
/
wp
/
wp-includes
/
plugin.php
203
21
apply_filters
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-value.php
351
20
acf_format_value
/
content
/
plugins
/
advanced-custom-fields-pro
/
pro
/
fields
/
class-acf-field-flexible-content.php
878
19
acf_field_flexible_content
format_value
/
wp
/
wp-includes
/
class-wp-hook.php
286
18
WP_Hook
apply_filters
/
wp
/
wp-includes
/
plugin.php
203
17
apply_filters
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-value.php
351
16
acf_format_value
/
content
/
plugins
/
advanced-custom-fields-pro
/
pro
/
fields
/
class-acf-field-flexible-content.php
878
15
acf_field_flexible_content
format_value
/
wp
/
wp-includes
/
class-wp-hook.php
286
14
WP_Hook
apply_filters
/
wp
/
wp-includes
/
plugin.php
203
13
apply_filters
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-value.php
351
12
acf_format_value
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-template.php
311
11
get_field_objects
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-template.php
169
10
get_fields
/
vendor
/
devgeniem
/
dustpress
/
classes
/
query.php
110
9
DustPress
\
Query
get_acf_post
/
content
/
themes
/
yhkodit
/
models
/
shared
/
middle-model.php
14
8
MiddleModel
Content
/
vendor
/
devgeniem
/
dustpress
/
classes
/
model.php
585
7
call_user_func
/
vendor
/
devgeniem
/
dustpress
/
classes
/
model.php
585
6
DustPress
\
Model
run_function
/
vendor
/
devgeniem
/
dustpress
/
classes
/
model.php
276
5
DustPress
\
Model
fetch_data
/
vendor
/
devgeniem
/
dustpress
/
dustpress.php
241
4
DustPress
create_instance
/
wp
/
wp-includes
/
class-wp-hook.php
286
3
WP_Hook
apply_filters
/
wp
/
wp-includes
/
plugin.php
203
2
apply_filters
/
wp
/
wp-includes
/
template-loader.php
73
1
require_once
/
wp
/
wp-blog-header.php
19
0
require
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210430071144
/
index.php
4
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
themes
/
yhkodit
/
includes
/
Hooks.php
                    $fields      = get_fields( $val->ID );
                    $val->fields = ( $fields ) ? ( (object) $fields ) : false;
                }
            }
        }
        return $value;
    }
 
    /**
     * Modify file field return format into am object and also add filesize to it
     *
     * @param  array $value Original value.
     * @return stdClass     Modified $value.
     */
    public static function file_value_format( $value ) {
        if ( is_array( $value ) ) {
            $value = (object) $value;
            $file  = get_attached_file( $value->ID );
            if ( ! empty( $file ) ) {
                $size        = WP_LOCAL_DEV ? 0 : filesize( $file );
                $value->size = size_format( $size, 1 );
            }
        }
        return $value;
    }
 
    /**
     * Add info to body classes if admin bar is showing
     *
     * @param  array $classes Existing classes.
     * @return array          Modified $classes.
     */
    public static function body_class( $classes ) {
        if ( is_admin_bar_showing() ) {
            $classes[] = 'admin-bar-showing';
        }
        return $classes;
    }
 
    /**
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
themes
/
yhkodit
/
includes
/
Hooks.php
                    $fields      = get_fields( $val->ID );
                    $val->fields = ( $fields ) ? ( (object) $fields ) : false;
                }
            }
        }
        return $value;
    }
 
    /**
     * Modify file field return format into am object and also add filesize to it
     *
     * @param  array $value Original value.
     * @return stdClass     Modified $value.
     */
    public static function file_value_format( $value ) {
        if ( is_array( $value ) ) {
            $value = (object) $value;
            $file  = get_attached_file( $value->ID );
            if ( ! empty( $file ) ) {
                $size        = WP_LOCAL_DEV ? 0 : filesize( $file );
                $value->size = size_format( $size, 1 );
            }
        }
        return $value;
    }
 
    /**
     * Add info to body classes if admin bar is showing
     *
     * @param  array $classes Existing classes.
     * @return array          Modified $classes.
     */
    public static function body_class( $classes ) {
        if ( is_admin_bar_showing() ) {
            $classes[] = 'admin-bar-showing';
        }
        return $classes;
    }
 
    /**
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
class-wp-hook.php
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if( ! $this->doing_action ) {
                    $args[ 0 ] = $value;
                }
 
                // Avoid the array_slice if possible.
                if ( $the_['accepted_args'] == 0 ) {
                    $value = call_user_func_array( $the_['function'], array() );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     *
     * @param mixed $args Arguments to pass to the hook callbacks.
     */
    public function do_action( $args ) {
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
plugin.php
        $args = func_get_args();
        _wp_call_all_hook($args);
    }
 
    if ( !isset($wp_filter[$tag]) ) {
        if ( isset($wp_filter['all']) )
            array_pop($wp_current_filter);
        return $value;
    }
 
    if ( !isset($wp_filter['all']) )
        $wp_current_filter[] = $tag;
 
    if ( empty($args) )
        $args = func_get_args();
 
    // don't pass the tag name to WP_Hook
    array_shift( $args );
 
    $filtered = $wp_filter[ $tag ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Execute functions hooked on a specific filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 * functions hooked to `$tag` are supplied using an array.
 *
 * @global array $wp_filter         Stores all of the filters
 * @global array $wp_current_filter Stores the list of current filters with the current one last
 *
 * @param string $tag  The name of the filter hook.
 * @param array  $args The arguments supplied to the functions hooked to $tag.
 * @return mixed The filtered value after all hooked functions are applied to it.
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-value.php
*  @return    $value
*/
 
function acf_format_value( $value, $post_id, $field ) {
    
    // vars
    $cache_key = "format_value/post_id={$post_id}/name={$field['name']}";
    
    
    // return early if cache is found
    if( acf_isset_cache($cache_key) ) {
        
        return acf_get_cache($cache_key);
        
    }
    
    
    // apply filters
    $value = apply_filters( "acf/format_value", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/type={$field['type']}", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/name={$field['_name']}", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/key={$field['key']}", $value, $post_id, $field );
    
    
    // update cache
    acf_set_cache($cache_key, $value);
    
    
    // return
    return $value;
    
} 
 
 
/*
*  acf_update_value
*
*  updates a value into the db
*
*  @type    action
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
plugins
/
advanced-custom-fields-pro
/
pro
/
fields
/
class-acf-field-repeater.php
            foreach( array_keys($field['sub_fields']) as $j ) {
                
                // get sub field
                $sub_field = $field['sub_fields'][ $j ];
                
                
                // bail ealry if no name (tab)
                if( acf_is_empty($sub_field['name']) ) continue;
                
                
                // extract value
                $sub_value = acf_extract_var( $value[ $i ], $sub_field['key'] );
                
                
                // update $sub_field name
                $sub_field['name'] = "{$field['name']}_{$i}_{$sub_field['name']}";
                
                
                // format value
                $sub_value = acf_format_value( $sub_value, $post_id, $sub_field );
                
                
                // append to $row
                $value[ $i ][ $sub_field['_name'] ] = $sub_value;
                
            }
            
        }
        
        
        // return
        return $value;
        
    }
    
    
    /*
    *  validate_value
    *
    *  description
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
class-wp-hook.php
        }
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if( ! $this->doing_action ) {
                    $args[ 0 ] = $value;
                }
 
                // Avoid the array_slice if possible.
                if ( $the_['accepted_args'] == 0 ) {
                    $value = call_user_func_array( $the_['function'], array() );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     *
     * @param mixed $args Arguments to pass to the hook callbacks.
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
plugin.php
        $args = func_get_args();
        _wp_call_all_hook($args);
    }
 
    if ( !isset($wp_filter[$tag]) ) {
        if ( isset($wp_filter['all']) )
            array_pop($wp_current_filter);
        return $value;
    }
 
    if ( !isset($wp_filter['all']) )
        $wp_current_filter[] = $tag;
 
    if ( empty($args) )
        $args = func_get_args();
 
    // don't pass the tag name to WP_Hook
    array_shift( $args );
 
    $filtered = $wp_filter[ $tag ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Execute functions hooked on a specific filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 * functions hooked to `$tag` are supplied using an array.
 *
 * @global array $wp_filter         Stores all of the filters
 * @global array $wp_current_filter Stores the list of current filters with the current one last
 *
 * @param string $tag  The name of the filter hook.
 * @param array  $args The arguments supplied to the functions hooked to $tag.
 * @return mixed The filtered value after all hooked functions are applied to it.
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-value.php
*  @return    $value
*/
 
function acf_format_value( $value, $post_id, $field ) {
    
    // vars
    $cache_key = "format_value/post_id={$post_id}/name={$field['name']}";
    
    
    // return early if cache is found
    if( acf_isset_cache($cache_key) ) {
        
        return acf_get_cache($cache_key);
        
    }
    
    
    // apply filters
    $value = apply_filters( "acf/format_value", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/type={$field['type']}", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/name={$field['_name']}", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/key={$field['key']}", $value, $post_id, $field );
    
    
    // update cache
    acf_set_cache($cache_key, $value);
    
    
    // return
    return $value;
    
} 
 
 
/*
*  acf_update_value
*
*  updates a value into the db
*
*  @type    action
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
plugins
/
advanced-custom-fields-pro
/
pro
/
fields
/
class-acf-field-flexible-content.php
            foreach( array_keys($layout) as $j ) {
                
                // get sub field
                $sub_field = $layout[ $j ];
                
                
                // bail ealry if no name (tab)
                if( acf_is_empty($sub_field['name']) ) continue;
                
                
                // extract value
                $sub_value = acf_extract_var( $value[ $i ], $sub_field['key'] );
                
                
                // update $sub_field name
                $sub_field['name'] = "{$field['name']}_{$i}_{$sub_field['name']}";
                    
                
                // format value
                $sub_value = acf_format_value( $sub_value, $post_id, $sub_field );
                
                
                // append to $row
                $value[ $i ][ $sub_field['_name'] ] = $sub_value;
                
            }
            
        }
        
        
        // return
        return $value;
    }
    
    
    /*
    *  validate_value
    *
    *  description
    *
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
class-wp-hook.php
        }
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if( ! $this->doing_action ) {
                    $args[ 0 ] = $value;
                }
 
                // Avoid the array_slice if possible.
                if ( $the_['accepted_args'] == 0 ) {
                    $value = call_user_func_array( $the_['function'], array() );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     *
     * @param mixed $args Arguments to pass to the hook callbacks.
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
plugin.php
        $args = func_get_args();
        _wp_call_all_hook($args);
    }
 
    if ( !isset($wp_filter[$tag]) ) {
        if ( isset($wp_filter['all']) )
            array_pop($wp_current_filter);
        return $value;
    }
 
    if ( !isset($wp_filter['all']) )
        $wp_current_filter[] = $tag;
 
    if ( empty($args) )
        $args = func_get_args();
 
    // don't pass the tag name to WP_Hook
    array_shift( $args );
 
    $filtered = $wp_filter[ $tag ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Execute functions hooked on a specific filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 * functions hooked to `$tag` are supplied using an array.
 *
 * @global array $wp_filter         Stores all of the filters
 * @global array $wp_current_filter Stores the list of current filters with the current one last
 *
 * @param string $tag  The name of the filter hook.
 * @param array  $args The arguments supplied to the functions hooked to $tag.
 * @return mixed The filtered value after all hooked functions are applied to it.
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-value.php
*  @return    $value
*/
 
function acf_format_value( $value, $post_id, $field ) {
    
    // vars
    $cache_key = "format_value/post_id={$post_id}/name={$field['name']}";
    
    
    // return early if cache is found
    if( acf_isset_cache($cache_key) ) {
        
        return acf_get_cache($cache_key);
        
    }
    
    
    // apply filters
    $value = apply_filters( "acf/format_value", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/type={$field['type']}", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/name={$field['_name']}", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/key={$field['key']}", $value, $post_id, $field );
    
    
    // update cache
    acf_set_cache($cache_key, $value);
    
    
    // return
    return $value;
    
} 
 
 
/*
*  acf_update_value
*
*  updates a value into the db
*
*  @type    action
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
plugins
/
advanced-custom-fields-pro
/
pro
/
fields
/
class-acf-field-flexible-content.php
            foreach( array_keys($layout) as $j ) {
                
                // get sub field
                $sub_field = $layout[ $j ];
                
                
                // bail ealry if no name (tab)
                if( acf_is_empty($sub_field['name']) ) continue;
                
                
                // extract value
                $sub_value = acf_extract_var( $value[ $i ], $sub_field['key'] );
                
                
                // update $sub_field name
                $sub_field['name'] = "{$field['name']}_{$i}_{$sub_field['name']}";
                    
                
                // format value
                $sub_value = acf_format_value( $sub_value, $post_id, $sub_field );
                
                
                // append to $row
                $value[ $i ][ $sub_field['_name'] ] = $sub_value;
                
            }
            
        }
        
        
        // return
        return $value;
    }
    
    
    /*
    *  validate_value
    *
    *  description
    *
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
class-wp-hook.php
        }
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if( ! $this->doing_action ) {
                    $args[ 0 ] = $value;
                }
 
                // Avoid the array_slice if possible.
                if ( $the_['accepted_args'] == 0 ) {
                    $value = call_user_func_array( $the_['function'], array() );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     *
     * @param mixed $args Arguments to pass to the hook callbacks.
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
plugin.php
        $args = func_get_args();
        _wp_call_all_hook($args);
    }
 
    if ( !isset($wp_filter[$tag]) ) {
        if ( isset($wp_filter['all']) )
            array_pop($wp_current_filter);
        return $value;
    }
 
    if ( !isset($wp_filter['all']) )
        $wp_current_filter[] = $tag;
 
    if ( empty($args) )
        $args = func_get_args();
 
    // don't pass the tag name to WP_Hook
    array_shift( $args );
 
    $filtered = $wp_filter[ $tag ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Execute functions hooked on a specific filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 * functions hooked to `$tag` are supplied using an array.
 *
 * @global array $wp_filter         Stores all of the filters
 * @global array $wp_current_filter Stores the list of current filters with the current one last
 *
 * @param string $tag  The name of the filter hook.
 * @param array  $args The arguments supplied to the functions hooked to $tag.
 * @return mixed The filtered value after all hooked functions are applied to it.
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-value.php
*  @return    $value
*/
 
function acf_format_value( $value, $post_id, $field ) {
    
    // vars
    $cache_key = "format_value/post_id={$post_id}/name={$field['name']}";
    
    
    // return early if cache is found
    if( acf_isset_cache($cache_key) ) {
        
        return acf_get_cache($cache_key);
        
    }
    
    
    // apply filters
    $value = apply_filters( "acf/format_value", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/type={$field['type']}", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/name={$field['_name']}", $value, $post_id, $field );
    $value = apply_filters( "acf/format_value/key={$field['key']}", $value, $post_id, $field );
    
    
    // update cache
    acf_set_cache($cache_key, $value);
    
    
    // return
    return $value;
    
} 
 
 
/*
*  acf_update_value
*
*  updates a value into the db
*
*  @type    action
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-template.php
        
        
        // bail early if no field, or if the field's name is different to $k
        // - solves problem where sub fields (and clone fields) are incorrectly allowed
        if( !$field || $field['name'] !== $k ) continue;
        
        
        // load value
        if( $load_value ) {
        
            $field['value'] = acf_get_value( $post_id, $field );
            
        }
        
        
        // format value
        if( $format_value ) {
            
            // get value for field
            $field['value'] = acf_format_value( $field['value'], $post_id, $field );
            
        }
        
                    
        // append to $value
        $fields[ $field['name'] ] = $field;
        
    }
     
          
    // no value
    if( empty($fields) ) return false;
    
    
    // return
    return $fields;
}
 
 
/*
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
plugins
/
advanced-custom-fields-pro
/
includes
/
api
/
api-template.php
 
/*
*  get_fields()
*
*  This function will return an array containing all the custom field values for a specific post_id.
*  The function is not very elegant and wastes a lot of PHP memory / SQL queries if you are not using all the values.
*
*  @type    function
*  @since    3.6
*  @date    29/01/13
*
*  @param    $post_id (mixed) the post_id of which the value is saved against
*  @param    $format_value (boolean) whether or not to format the field value
*  @return    (array)    associative array where field name => field value
*/
 
function get_fields( $post_id = false, $format_value = true ) {
    
    // vars
    $fields = get_field_objects( $post_id, $format_value );
    $meta = array();
    
    
    // bail early
    if( !$fields ) return false;
    
    
    // populate
    foreach( $fields as $k => $field ) {
        
        $meta[ $k ] = $field['value'];
        
    }
    
    
    // return
    return $meta;    
    
}
 
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
vendor
/
devgeniem
/
dustpress
/
classes
/
query.php
            'meta_keys'                 => null,
            'single'                     => false,
            'whole_fields'                 => false,
            'max_recursion_level'         => 0,
            'current_recursion_level'    => 0,
            'output'                     => 'OBJECT'
        ];
 
        $options = array_merge( $defaults, $args );
 
        extract( $options );
 
        if ( $post->ID !== $id ) {
            $acfpost = get_post( $id );
        } else {
            $acfpost = $post;
        }
 
        if ( is_object( $acfpost ) ) {
            $acfpost->fields = get_fields( $acfpost->ID );
 
            // Get fields with relational post data as a whole acf object
            if ( $current_recursion_level < $max_recursion_level ) {
 
                // Let's avoid infinite loops by default by stopping recursion after one level. You may dig deeper in your view model.
                $options['current_recursion_level'] = apply_filters( 'dustpress/query/current_recursion_level', ++$current_recursion_level );
 
                if ( is_array( $acfpost->fields ) && count( $acfpost->fields ) > 0 ) {
                    foreach ( $acfpost->fields as &$field ) {
                        $field = self::handle_field( $field, $options );
                    }
                }
            } elseif ( true == $whole_fields ) {
                if ( is_array( $acfpost->fields ) && count( $acfpost->fields ) > 0 ) {
                    foreach( $acfpost->fields as $name => &$field ) {
                        $field = get_field_object( $name, $acfpost->ID, true );
                    }
                }
            }
 
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
content
/
themes
/
yhkodit
/
models
/
shared
/
middle-model.php
<?php
 
class MiddleModel extends \DustPress\Model {
    public function GlobalSubmodules() {
        $this->bind_sub( 'Header' );
        $this->bind_sub( 'Footer' );
        $this->bind_sub( 'Notification' );
        $this->bind_sub( 'Searchbar' );
    }
 
    public function Content() {
        $id = get_the_ID();
        if ( $id ) {
            $post = \DustPress\Query::get_acf_post( $id );
            return $post;
        }
 
        return null;
    }
}
 
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
vendor
/
devgeniem
/
dustpress
/
classes
/
model.php
     */
    private function run_function( $m, $class = null ) {
        $cached = $this->get_cached( $m );
 
        if ( is_null( $class ) ) {
            $class = $this->class_name;
        }
 
        if ( $cached ) {
            //error_log('this is a cache: ' . $m);
            return $cached;
        }
 
        $reflection = new \ReflectionMethod( $class, $m );
 
        if ( $reflection->isStatic() ) {
            $data = call_user_func( $class . '::' . $m );
        }
        else {
            $data = call_user_func( [ $this, $m ] );
        }
 
        if ( isset( $this->called_subs ) ) {
            $subs = $this->called_subs;
        }
        else {
            $subs = null;
        }
 
        $this->maybe_cache( $m, $data, $subs );
 
        // Unset called submodels for this run
        $this->called_subs = null;
 
        return $data;
    }
 
    /**
     * This function checks if the function is defined as cacheable and returns the cache if it exists.
     *
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
vendor
/
devgeniem
/
dustpress
/
classes
/
model.php
     */
    private function run_function( $m, $class = null ) {
        $cached = $this->get_cached( $m );
 
        if ( is_null( $class ) ) {
            $class = $this->class_name;
        }
 
        if ( $cached ) {
            //error_log('this is a cache: ' . $m);
            return $cached;
        }
 
        $reflection = new \ReflectionMethod( $class, $m );
 
        if ( $reflection->isStatic() ) {
            $data = call_user_func( $class . '::' . $m );
        }
        else {
            $data = call_user_func( [ $this, $m ] );
        }
 
        if ( isset( $this->called_subs ) ) {
            $subs = $this->called_subs;
        }
        else {
            $subs = null;
        }
 
        $this->maybe_cache( $m, $data, $subs );
 
        // Unset called submodels for this run
        $this->called_subs = null;
 
        return $data;
    }
 
    /**
     * This function checks if the function is defined as cacheable and returns the cache if it exists.
     *
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
vendor
/
devgeniem
/
dustpress
/
classes
/
model.php
        }
 
        $methods = array_reverse( $methods );
 
        // Loop through all public methods and run the ones we wanted to deliver the data to the views.
        foreach( $methods as $class => $class_methods ) {
            foreach( $class_methods as $name => $m ) {
                if ( is_array( $m ) ) {
                    if ( isset( $m[1] ) && is_string( $m[1] ) ) {
                        if ( $m[1] == "__construct" ) {
                            continue;
                        }
 
                        $method = str_replace( "bind_", "", $m[1] );
 
                        if ( ! isset( $this->data[ $this->class_name ] ) ) {
                            $this->data[ $this->class_name ] = (object)[];
                        }
 
                        $data = $this->run_function( $m[1], $class );
 
                        if ( $tidy ) {
                            $tidy_data->{ $m[1] } = $data;
                        }
                        else {
                            if ( ! is_null( $data ) ) {
                                $content = (array) $this->data[ $this->class_name ];
                                $content[ $method ] = $data;
                                $this->data[ $this->class_name ] = (object) $content;
                            }
                        }
                    }
                }
                else if ( is_callable( $m ) ) {
                    if ( $m == "__construct" ) {
                        continue;
                    }
 
                    $method = str_replace( "bind_", "", $m );
 
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
vendor
/
devgeniem
/
dustpress
/
dustpress.php
        if ( ! empty( $custom_route ) ) {
            $template = $custom_route;
            
            $custom_route_args[ 'route' ] = $wp_query->get( 'dustpress_custom_route_route' );
 
            if ( ! empty( $custom_route_parameters ) ) {
                $custom_route_args['params'] = explode( DIRECTORY_SEPARATOR, $custom_route_parameters );
            }
        }
 
        $template = apply_filters( 'dustpress/template', $template, $custom_route_args );
 
        if ( ! defined( 'DOING_AJAX' ) && ! $this->disabled ) {
            // If class exists with the template's name, create new instance with it.
            // We do not throw error if the class does not exist, to ensure that you can still create
            // templates in traditional style if needed.
            if ( class_exists ( $template ) ) {
                $this->model = new $template( $custom_route_args );
 
                $this->model->fetch_data();
 
                do_action( 'dustpress/model_list', array_keys( (array) $this->model->get_submodels() ) );
 
                $template_override = $this->model->get_template();
 
                $partial = $template_override ? $template_override : strtolower( $this->camelcase_to_dashed( $template ) );
 
                $this->render( [ 'partial' => $partial, 'main' => true ] );
            }
            else {
                die( 'DustPress error: No suitable model found. One of these is required: '. implode( ', ', $debugs ) );
            }
        }
    }
 
    /**
    *  This function gets current template's filename and returns without extension or WP-template prefixes such as page- or single-.
    *
    *  @type    function
    *  @date    19/3/2015
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
class-wp-hook.php
        }
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if( ! $this->doing_action ) {
                    $args[ 0 ] = $value;
                }
 
                // Avoid the array_slice if possible.
                if ( $the_['accepted_args'] == 0 ) {
                    $value = call_user_func_array( $the_['function'], array() );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     *
     * @param mixed $args Arguments to pass to the hook callbacks.
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
plugin.php
        $args = func_get_args();
        _wp_call_all_hook($args);
    }
 
    if ( !isset($wp_filter[$tag]) ) {
        if ( isset($wp_filter['all']) )
            array_pop($wp_current_filter);
        return $value;
    }
 
    if ( !isset($wp_filter['all']) )
        $wp_current_filter[] = $tag;
 
    if ( empty($args) )
        $args = func_get_args();
 
    // don't pass the tag name to WP_Hook
    array_shift( $args );
 
    $filtered = $wp_filter[ $tag ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Execute functions hooked on a specific filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 * functions hooked to `$tag` are supplied using an array.
 *
 * @global array $wp_filter         Stores all of the filters
 * @global array $wp_current_filter Stores the list of current filters with the current one last
 *
 * @param string $tag  The name of the filter hook.
 * @param array  $args The arguments supplied to the functions hooked to $tag.
 * @return mixed The filtered value after all hooked functions are applied to it.
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
wp-includes
/
template-loader.php
        remove_filter('the_content', 'prepend_attachment');
    elseif ( is_single()         && $template = get_single_template()         ) :
    elseif ( is_page()           && $template = get_page_template()           ) :
    elseif ( is_singular()       && $template = get_singular_template()       ) :
    elseif ( is_category()       && $template = get_category_template()       ) :
    elseif ( is_tag()            && $template = get_tag_template()            ) :
    elseif ( is_author()         && $template = get_author_template()         ) :
    elseif ( is_date()           && $template = get_date_template()           ) :
    elseif ( is_archive()        && $template = get_archive_template()        ) :
    else :
        $template = get_index_template();
    endif;
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    if ( $template = apply_filters( 'template_include', $template ) ) {
        include( $template );
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
endif;
 
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210615072611
/
wp
/
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( dirname(__FILE__) . '/wp-load.php' );
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once( ABSPATH . WPINC . '/template-loader.php' );
 
}
 
/
home
/
yhkodit.fi
/
stage
/
releases
/
20210430071144
/
index.php
<?php
// WordPress view bootstrapper
define( 'WP_USE_THEMES', true );
require( './wp/wp-blog-header.php' );
 

Environment & details:

empty
empty
empty
empty
Key Value
dwellings Array ( )
Key Value
SERVER_SOFTWARE nginx/1.12.2
REQUEST_URI /kodin-vaihto/
USER www-data
HOME /var/www
HTTP_CONNECTION Keep-Alive
HTTP_HOST yhstage.geniem.net
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
SCRIPT_FILENAME /home/yhkodit.fi/stage/current/index.php
REDIRECT_STATUS 200
SERVER_NAME yhstage.geniem.net
SERVER_PORT 80
SERVER_ADDR 37.59.13.106
REMOTE_PORT 35620
REMOTE_ADDR 52.23.219.12
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /home/yhkodit.fi/stage/current
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
PHP_VALUE memory_limit=128M
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1638330811.8669
REQUEST_TIME 1638330811
empty
0. Whoops\Handler\PlainTextHandler
1. Whoops\Handler\PrettyPageHandler