Commit 394836f2 authored by Simon's avatar Simon

release 1.33.2

parent 9e6f3abc
......@@ -20,9 +20,9 @@
## Production
- build CSS & JS assets - `C:\web\dev.biuro\ npm run build`
- build new image `docker build -t biuro/web:1.33.1 .` (update version number)
- build new image `docker build -t biuro/web:1.33.2 .` (update version number)
- login to biuro docker account `docker login --username=biuro --password=9Ndtjd2vKsLvGuFOeFq1KdJs`
- push image to docker repository - `docker push biuro/web:1.33.1`
- push image to docker repository - `docker push biuro/web:1.33.2`
## Production
- update biuro/web image version in .env file (staging or www)
......
......@@ -567,6 +567,7 @@ class Pods implements Iterator {
'display_process_individually' => false,
'get_meta' => false,
'output' => null,
'pods_callback' => 'pods',
'deprecated' => false,
'keyed' => false,
// extra data to send to field handlers.
......@@ -619,6 +620,10 @@ class Pods implements Iterator {
$params->output .= 's';
}
if ( empty( $params->pods_callback ) || ! is_callable( $params->pods_callback ) ) {
$params->pods_callback = 'pods';
}
// Support old $orderby variable.
if ( null !== $params->single && is_string( $params->single ) && empty( $params->orderby ) ) {
if ( ! class_exists( 'Deprecated_Pod' ) || Deprecated_Pod::$deprecated_notice ) {
......@@ -786,6 +791,19 @@ class Pods implements Iterator {
$params->output = 'arrays';
}
$is_tableless_field_and_not_simple = (
! $is_traversal
&& $field_data
&& ! $field_data instanceof Object_Field
&& $is_tableless_field
&& ! $field_data->is_simple_relationship()
);
// If a relationship is returned from the table as an ID but the parameter is not traversal, we need to run traversal logic.
if ( $is_tableless_field_and_not_simple && isset( $this->data->row[ $params->name ] ) && ! is_array( $this->data->row[ $params->name ] ) ) {
unset( $this->data->row[ $params->name ] );
}
// Enforce output type for tableless fields in forms.
if ( empty( $value ) && $is_tableless_field ) {
$params->raw = true;
......@@ -811,10 +829,10 @@ class Pods implements Iterator {
}
if (
! $override_object_field &&
empty( $value ) &&
isset( $this->data->row[ $params->name ] ) &&
( ! $is_tableless_field || 'arrays' === $params->output )
! $override_object_field
&& empty( $value )
&& isset( $this->data->row[ $params->name ] )
&& ( ! $is_tableless_field || 'arrays' === $params->output )
) {
if ( empty( $field_data ) || in_array( $field_type, [
'boolean',
......@@ -1186,10 +1204,11 @@ class Pods implements Iterator {
$is_field_output_full = true;
}
/** @var Pods $related_obj */
if ( 'pod' === $object_type ) {
$related_obj = pods( $object, null, false );
$related_obj = call_user_func( $params->pods_callback, $object, null, false );
} elseif ( ! empty( $table['pod'] ) ) {
$related_obj = pods( $table['pod']['name'], null, false );
$related_obj = call_user_func( $params->pods_callback, $table['pod']['name'], null, false );
}
if ( $table && ( $related_obj || ! empty( $table['table'] ) ) ) {
......@@ -1314,10 +1333,11 @@ class Pods implements Iterator {
$item = (object) $item;
}//end if
} elseif ( 'pods' === $params->output ) {
/** @var Pods $item */
if ( in_array( $object_type, array( 'user', 'media' ), true ) ) {
$item = pods( $object_type, (int) $item_id );
$item = call_user_func( $params->pods_callback, $object_type, (int) $item_id );
} else {
$item = pods( $object, (int) $item_id );
$item = call_user_func( $params->pods_callback, $object, (int) $item_id );
}
if ( ! $item || ! $item->valid() ) {
......@@ -2473,11 +2493,19 @@ class Pods implements Iterator {
*
* @see PodsData::total_found
*
* @params null|array $params The list of Pods::find() parameters to use, otherwise use current dataset to calculate total found.
*
* @return int Number of rows returned by find(), regardless of the 'limit' parameter
* @since 2.0.0
* @link https://docs.pods.io/code/pods/total-found/
*/
public function total_found() {
public function total_found( $params = null ) {
// Support find() shorthand to get total_found() for a specific dataset.
if ( is_array( $params ) ) {
$this->find( $params );
return $this->total_found();
}
/**
* Runs directly before the value of total_found() is determined and returned.
......
......@@ -227,7 +227,7 @@ class PodsAPI {
/**
* Save the meta for a meta type.
*
* @since TBD
* @since 2.8.11
*
* @param string $meta_type The meta type.
* @param int $id The object ID.
......@@ -2949,6 +2949,7 @@ class PodsAPI {
$params = (object) $params;
/** @var false|array|Field $field */
$field = false;
if ( isset( $params->field ) && $params->field instanceof Field ) {
......@@ -3196,6 +3197,11 @@ class PodsAPI {
$old_options = $field;
$old_sister_id = pods_v( 'sister_id', $old_options, 0 );
// Maybe clone the field object if we need to.
if ( $old_options instanceof Field ) {
$old_options = clone $old_options;
}
// When renaming a field, use the old ID for reference if empty.
if ( ( 'old_name' === $lookup_type || $params->overwrite ) && empty( $params->id ) ) {
$params->id = $old_id;
......@@ -3243,7 +3249,7 @@ class PodsAPI {
}
if ( false !== $this->field_exists( $params, false ) ) {
return pods_error( sprintf( __( 'Field %1$s already exists, you cannot rename %2$s to that', 'pods' ), $field['name'], $old_name ), $this );
return pods_error( sprintf( __( 'Field %1$s already exists, you cannot rename %2$s to that on the %3$s pod', 'pods' ), $field['name'], $old_name, $pod['name'] ), $this );
}
}
......@@ -3265,11 +3271,11 @@ class PodsAPI {
*
* @param string|false $field_definition The SQL definition to use for the field's table column.
* @param string $type The field type.
* @param array $field The field data.
* @param array $old_options The field data.
* @param bool $simple Whether the field is a simple tableless field.
* @param Pods\Whatsit\Field $field_obj The field object.
*/
$field_definition = apply_filters( 'pods_api_save_field_old_definition', $field_definition, $old_type, $field, $old_simple, $field_obj );
$field_definition = apply_filters( 'pods_api_save_field_old_definition', $field_definition, $old_type, $old_options, $old_simple, $field_obj );
if ( ! empty( $field_definition ) ) {
$old_definition = "`{$old_name}` " . $field_definition;
......@@ -3629,6 +3635,12 @@ class PodsAPI {
$field['id'] = $params->id;
if ( $field instanceof Field ) {
$field_obj = $field;
} elseif ( $field_obj instanceof Field && is_array( $field ) ) {
$field_obj->set_args( $field );
}
$simple = ( 'pick' === $field['type'] && in_array( pods_v( 'pick_object', $field ), $simple_tableless_objects, true ) );
$definition = false;
......@@ -3693,6 +3705,35 @@ class PodsAPI {
}
}
/**
* Allow filtering the definition mode to use for the field definition handling.
*
* @since 2.8.14
*
* @param string $definition_mode The definition mode used for the table field.
* @param Pods\Whatsit\Pod $pod The pod object.
* @param string $type The field type.
* @param array $field The field data.
* @param array $extra_info {
* Extra information about the field.
*
* @type bool $simple Whether the field is a simple tableless field.
* @type string $definition The field definition.
* @type null|string $old_name The old field name (if preexisting).
* @type null|string $old_definition The old field definition (if preexisting).
* @type null|array $old_options The old field options (if preexisting).
* @type Pods\Whatsit\Field $field_obj The field object.
* }
*/
$definition_mode = apply_filters( 'pods_api_save_field_table_definition_mode', $definition_mode, $pod, $field['type'], $field, [
'simple' => $simple,
'definition' => $definition,
'old_name' => $old_name,
'old_definition' => $old_definition,
'old_options' => $old_options,
'field_obj' => $field_obj,
] );
if ( 'bypass' !== $definition_mode ) {
/**
* Allow hooking into before the table has been altered for any custom functionality needed.
......@@ -9075,7 +9116,7 @@ class PodsAPI {
if ( ! is_wp_error( $related ) ) {
$related_ids = $related;
}
} elseif ( ! $params->force_meta && ! pods_tableless() && pods_podsrel_enabled() ) {
} elseif ( ! $params->force_meta && ! pods_tableless() && pods_podsrel_enabled( $params->field, 'lookup' ) ) {
$ids = implode( ', ', $params->ids );
$params->field_id = (int) $params->field_id;
......
......@@ -49,6 +49,11 @@ class PodsData {
*/
public static $display_errors = true;
/**
* @var bool
*/
public $fetch_full = true;
/**
* @var PodsAPI
*/
......@@ -1471,6 +1476,39 @@ class PodsData {
$joins = array();
$pre_traverse_args = [
'find' => $find,
'replace' => $replace,
'traverse' => $traverse,
'params' => $params,
];
/**
* Allow filtering the pre-traverse arguments that will be used to build the query.
*
* @since 2.8.14
*
* @param array $pre_traverse_args The pre-traverse arguments.
* @param PodsData $pods_data The PodsData object.
*/
$pre_traverse_args = (array) apply_filters( 'pods_data_build_pre_traverse_args', $pre_traverse_args, $this );
if ( isset( $pre_traverse_args['find'] ) ) {
$find = $pre_traverse_args['find'];
}
if ( isset( $pre_traverse_args['replace'] ) ) {
$replace = $pre_traverse_args['replace'];
}
if ( isset( $pre_traverse_args['traverse'] ) ) {
$traverse = $pre_traverse_args['traverse'];
}
if ( isset( $pre_traverse_args['params'] ) ) {
$params = $pre_traverse_args['params'];
}
if ( ! empty( $find ) ) {
// See: "#3294 OrderBy Failing on PHP7" Non-zero array keys.
// here in PHP 7 cause odd behavior so just strip the keys.
......@@ -1992,7 +2030,7 @@ class PodsData {
* @param bool $fetch_full Whether to fetch the full row.
* @param PodsData $pods_data The PodsData object.
*/
$fetch_full = (bool) apply_filters( 'pods_data_fetch_full', true, $this );
$fetch_full = (bool) apply_filters( 'pods_data_fetch_full', $this->fetch_full, $this );
if ( $fetch_full && ( null !== $row || ( $this->pod_data && 'settings' === $this->pod_data['type'] ) ) ) {
if ( $explicit_set ) {
......@@ -2374,8 +2412,22 @@ class PodsData {
// Run Query.
$params->sql = apply_filters( 'pods_data_query', $params->sql, $params );
$wpdb_show_errors = null;
// Maybe disable wpdb errors.
if ( false === $params->error && ! empty( $wpdb->show_errors ) ) {
$wpdb_show_errors = false;
$wpdb->show_errors( false );
}
$result = $wpdb->query( $params->sql );
// Maybe show wpdb errors.
if ( $wpdb_show_errors ) {
$wpdb->show_errors( true );
}
$result = apply_filters( 'pods_data_query_result', $result, $params );
if ( false === $result && ! empty( $params->error ) && ! empty( $wpdb->last_error ) ) {
......@@ -3466,7 +3518,7 @@ class PodsData {
LEFT JOIN `{$table_info['pod_table']}` AS `{$field_joined}` ON
`{$field_joined}`.`{$table_info['pod_field_id']}` = `{$traverse_recurse['rel_alias']}`.`{$joined_id}`
";
} elseif ( pods_podsrel_enabled() ) {
} elseif ( pods_podsrel_enabled( $the_field, 'lookup' ) ) {
if ( ( $traverse_recurse['depth'] + 2 ) === count( $traverse_recurse['fields'] ) && ( ! $is_pickable || ! in_array( $pick_object, $simple_tableless_objects, true ) ) && 'post_author' === $traverse_recurse['fields'][ $traverse_recurse['depth'] + 1 ] ) {
$table_info['recurse'] = false;
}
......@@ -3486,6 +3538,39 @@ class PodsData {
`{$field_joined}`.`{$table_info[ 'field_id' ]}` = `{$rel_alias}`.`related_item_id`
";
}
} else {
$handle_join = [
'recurse' => $table_info['recurse'],
'the_join' => null,
];
/**
* Allow filtering the join parameters to be used for custom traversal logic.
*
* @since 2.8.14
*
* @param array $handle_join The join parameters to set.
* @param array $args The additional traverse recurse arguments.
* @param PodsData $pods_data The PodsData object.
*/
$handle_join = apply_filters( 'pods_data_traverse_recurse_handle_join', $handle_join, [
'traverse' => $traverse,
'traverse_recurse' => $traverse_recurse,
'the_field' => $the_field,
'table_info' => $table_info,
'field_joined' => $field_joined,
'rel_alias' => $rel_alias,
'is_pickable' => $is_pickable,
'pick_object' => $pick_object,
], $this );
if ( null !== $handle_join['recurse'] ) {
$table_info['recurse'] = $handle_join['recurse'];
}
if ( null !== $handle_join['the_join'] ) {
$the_join = $handle_join['the_join'];
}
}//end if
} elseif ( 'meta' === $pod_data['storage'] ) {
if ( ( $traverse_recurse['depth'] + 2 ) === count( $traverse_recurse['fields'] ) && ( ! $is_pickable || ! in_array( $pick_object, $simple_tableless_objects, true ) ) && $table_info['meta_field_value'] === $traverse_recurse['fields'][ $traverse_recurse['depth'] + 1 ] ) {
......
......@@ -584,7 +584,25 @@ class PodsView {
// Is the view's file somewhere within the plugin directory tree?
// Note: we explicitly whitelist PODS_DIR for the case of symlinks (see issue #2945)
if ( false !== strpos( $_real_view, realpath( WP_PLUGIN_DIR ) ) || false !== strpos( $_real_view, realpath( WPMU_PLUGIN_DIR ) ) || false !== strpos( $_real_view, PODS_DIR ) ) {
$path_checks = [
realpath( WP_PLUGIN_DIR ),
realpath( WPMU_PLUGIN_DIR ),
realpath( PODS_DIR ),
];
$path_checks = array_filter( $path_checks );
$path_match = false;
foreach ( $path_checks as $path_check ) {
if ( false !== strpos( $_real_view, $path_check ) ) {
$path_match = true;
break;
}
}
if ( $path_match ) {
if ( file_exists( $_view ) ) {
$located = $_view;
} else {
......@@ -598,11 +616,22 @@ class PodsView {
return false;
}
// Allow views in the theme or child theme
if ( file_exists( realpath( get_stylesheet_directory() . '/' . $_real_view ) ) ) {
$located = realpath( get_stylesheet_directory() . '/' . $_real_view );
} elseif ( file_exists( realpath( get_template_directory() . '/' . $_real_view ) ) ) {
$located = realpath( get_template_directory() . '/' . $_real_view );
// Allow views in the theme or child theme.
$path_checks = [
realpath( get_stylesheet_directory() . DIRECTORY_SEPARATOR . $_real_view ),
realpath( get_template_directory() . DIRECTORY_SEPARATOR . $_real_view ),
];
$path_checks = array_filter( $path_checks );
$path_match = false;
foreach ( $path_checks as $path_check ) {
if ( file_exists( $path_check ) ) {
$located = $path_check;
break;
}
}
}//end if
......
......@@ -994,7 +994,7 @@ class PodsField_DateTime extends PodsField {
/**
* Prepare the date/datetime/time field object or options for MomentJS formatting.
*
* @since TBD
* @since 2.8.11
*
* @param array|Field $options The field object or options.
*
......@@ -1043,7 +1043,7 @@ class PodsField_DateTime extends PodsField {
/**
* Get the format from the options for a specific type (date/datetime/time).
*
* @since TBD
* @since 2.8.11
*
* @param array|Field $options The field object or options.
* @param string $type The specific field type.
......@@ -1144,7 +1144,7 @@ class PodsField_DateTime extends PodsField {
/**
* Convert the source format to MomentJS format for PHP / jQuery UI formats.
*
* @since TBD
* @since 2.8.11
*
* @param string|mixed $source_format The source format.
* @param array $args The list of format arguments including source (php/jquery_ui) and type (date/time).
......
......@@ -258,7 +258,7 @@ class PodsField_Pick extends PodsField {
static::$type . '_object' => array_merge( [
'site',
'network',
], self::simple_objects() ),
], $this->simple_objects() ),
static::$type . '_allow_add_new' => false,
],
'type' => 'boolean',
......@@ -272,7 +272,7 @@ class PodsField_Pick extends PodsField {
static::$type . '_format_multi' => 'list',
],
'excludes-on' => [
static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
],
'type' => 'boolean',
'default' => 1,
......@@ -285,7 +285,7 @@ class PodsField_Pick extends PodsField {
static::$type . '_format_multi' => 'list',
],
'excludes-on' => [
static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
],
'type' => 'boolean',
'default' => 1,
......@@ -298,7 +298,7 @@ class PodsField_Pick extends PodsField {
static::$type . '_format_multi' => 'list',
],
'excludes-on' => [
static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
],
'type' => 'boolean',
'default' => 1,
......@@ -347,7 +347,7 @@ class PodsField_Pick extends PodsField {
'label' => __( 'Display Field in Selection List', 'pods' ),
'help' => __( 'Provide the name of a field on the related object to reference, example: {@post_title}', 'pods' ) . ' ' . $fallback_help,
'excludes-on' => [
static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
],
'default' => '',
'type' => 'text',
......@@ -367,7 +367,7 @@ class PodsField_Pick extends PodsField {
'label' => __( 'Customized <em>WHERE</em>', 'pods' ),
'help' => $fallback_help,
'excludes-on' => [
static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
],
'default' => '',
'type' => 'text',
......@@ -376,7 +376,7 @@ class PodsField_Pick extends PodsField {
'label' => __( 'Customized <em>ORDER BY</em>', 'pods' ),
'help' => $fallback_help,
'excludes-on' => [
static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
],
'default' => '',
'type' => 'text',
......@@ -385,7 +385,7 @@ class PodsField_Pick extends PodsField {
'label' => __( 'Customized <em>GROUP BY</em>', 'pods' ),
'help' => $fallback_help,
'excludes-on' => [
static::$type . '_object' => array_merge( [ 'site', 'network' ], self::simple_objects() ),
static::$type . '_object' => array_merge( [ 'site', 'network' ], $this->simple_objects() ),
],
'default' => '',
'type' => 'text',
......@@ -2005,7 +2005,7 @@ class PodsField_Pick extends PodsField {
*/
public function simple_value( $name, $value = null, $options = null, $pod = null, $id = null, $raw = false ) {
if ( in_array( pods_v( static::$type . '_object', $options ), self::simple_objects(), true ) ) {
if ( in_array( pods_v( static::$type . '_object', $options ), $this->simple_objects(), true ) ) {
if ( ! is_array( $value ) && 0 < strlen( $value ) ) {
$simple = @json_decode( $value, true );
......
......@@ -1038,15 +1038,17 @@ class Pods_Pages extends PodsComponent {
if ( ! is_object( $pods ) && 404 != $pods && 0 < strlen( pods_var( 'pod', self::$exists['options'] ) ) ) {
$slug = pods_var_raw( 'pod_slug', self::$exists['options'], null, null, true );
$has_slug = 0 < strlen( $slug );
// Handle special magic tags
if ( 0 < strlen( $slug ) ) {
if ( $has_slug ) {
$slug = pods_evaluate_tags( $slug, true );
}
$pods = pods( pods_var( 'pod', self::$exists['options'] ), $slug );
// Auto 404 handling if item doesn't exist
if ( 0 < strlen( $slug ) && ! $pods->exists() && apply_filters( 'pods_pages_auto_404', true, $slug, $pods, self::$exists ) ) {
if ( $has_slug && ( empty( $slug ) || ! $pods->exists() ) && apply_filters( 'pods_pages_auto_404', true, $slug, $pods, self::$exists ) ) {
$pods = 404;
}
}
......@@ -1230,7 +1232,7 @@ class Pods_Pages extends PodsComponent {
/**
* Handle overriding the template used for a Pods Page.
*
* @since TBD
* @since 2.8.11
*
* @param string $original_template The template to include.
*
......@@ -1317,7 +1319,7 @@ class Pods_Pages extends PodsComponent {
/**
* Allow filtering the template to include for a Pods Page.
*
* @since TBD
* @since 2.8.11
*
* @param string $template The template to use.
* @param array $exists The Pods Page data.
......
......@@ -2385,7 +2385,7 @@ function pods_bool_to_int( $value ) {
/**
* Make replacements to a string using key=>value pairs.
*
* @since TBD
* @since 2.8.11
*
* @param string|array|mixed $value The value to do replacements on.
* @param array $replacements The key=>value replacements to make.
......
......@@ -184,7 +184,7 @@ function pods_error( $error, $obj = null ) {
/**
* Allow filtering whether to force the error mode in cases where multiple exceptions have been used.
*
* @since TBD
* @since 2.8.11
*
* @param bool $error_mode_force Whether to force the error mode in cases where multiple exceptions have been used.
*/
......@@ -456,9 +456,12 @@ function pods_tableless() {
*
* @since 2.8.0
*
* @param null|Field $field The field object.
* @param null|string $context The context of the podsrel check (lookup/save).
*
* @return bool Whether the wp_podsrel table is enabled.
*/
function pods_podsrel_enabled() {
function pods_podsrel_enabled( $field = null, $context = null ) {
// Disabled when Pods Tableless mode is on.
if ( pods_tableless() ) {
return false;
......@@ -469,9 +472,11 @@ function pods_podsrel_enabled() {
*
* @since 2.8.0
*
* @param bool $enabled Whether the wp_podsrel table is enabled.
* @param bool $enabled Whether the wp_podsrel table is enabled.
* @param null|Field $field The field object.
* @param null|string $context The context of the podsrel check (lookup/save).
*/
return (bool) apply_filters( 'pods_podsrel_enabled', true );
return (bool) apply_filters( 'pods_podsrel_enabled', true, $field, $context );
}
/**
......@@ -2940,7 +2945,7 @@ function pods_meta_hook_list( $object_type = 'post', $object = null ) {
/**
* Allow filtering the list of actions and filters for a specific object type.
*
* @since TBD
* @since 2.8.11
*
* @param array $hooks List of filters and actions for a specific object type.
* @param string $object_type The object type.
......@@ -3774,7 +3779,7 @@ function pods_svg_icon( $icon_path, $default = 'dashicons-database', $mode = 'ba
/**
* Determine whether Pods is being used for content types only.
*
* @since TBD
* @since 2.8.11
*
* @param bool $check_constant_only Whether to only check the constant, unless there's a filter overriding things.
*
......@@ -3797,7 +3802,7 @@ function pods_is_types_only( $check_constant_only = false ) {
/**
* Allow filtering whether Pods is being used for content types only.
*
* @since TBD
* @since 2.8.11
*
* @param bool $is_types_only Whether Pods is being used for content types only.
*/
......
......@@ -10,7 +10,7 @@
* Plugin Name: Pods - Custom Content Types and Fields
* Plugin URI: https://pods.io/
* Description: Pods is a framework for creating, managing, and deploying customized content types and fields
* Version: 2.8.13
* Version: 2.8.15
* Author: Pods Framework Team
* Author URI: https://pods.io/about/
* Text Domain: pods
......@@ -43,7 +43,7 @@ if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) {
add_action( 'init', 'pods_deactivate_pods_ui' );
} else {
// Current version.
define( 'PODS_VERSION', '2.8.13' );
define( 'PODS_VERSION', '2.8.15' );
// Current database version, this is the last version the database changed.
define( 'PODS_DB_VERSION', '2.3.5' );
......
......@@ -5,7 +5,7 @@ Tags: pods, custom post types, custom taxonomies, content types, custom fields,
Requires at least: 5.5
Tested up to: 5.9
Requires PHP: 5.6
Stable tag: 2.8.13
Stable tag: 2.8.15
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
......@@ -80,7 +80,7 @@ And many other relationships are also available including:
= Optional Components to do even more =
You can enable some of our included components to extend your WordPress site even further:
* **Types-only Mode** - On our Pods Settings page, you can choose to disable creating custom fields for a performance boost if you only want to use Pods for content types or you plan on using it alongside of other custom field plugins
* **Types-only Mode** - On our Pods Settings page, you can choose to disable creating custom fields for a performance boost if you only want to use Pods for content types or you plan on using it alongside of other custom field plugins
* **Pods Templates** - Use our [template engine](https://docs.pods.io/displaying-pods/pods-templates/) to create templates that can be handed off to clients for care-free management
* **Markdown Syntax** - Parses [Markdown Syntax](https://www.markdownguide.org/basic-syntax) for Paragraph Text / WYSIWYG fields
* **Advanced Relationships** - Add even more relationship objects including Database Tables, Multisite Networks, Multisite Sites, Themes, Page Templates (in the theme), Sidebars, Post Type Objects, and Taxonomy Objects
......@@ -156,6 +156,26 @@ Pods really wouldn't be where it is without all the contributions from our [dono
== Changelog ==
= 2.8.15 - April 16th, 2022 =
* Added: New `pods_callback` support in `Pods::find()` so that you can pass a callback function to use for `pods()` usage with relationships using the `output` as "pods". This allows for using shared instances across large data sets to reduce time. (@sc0ttkclark)
* Added: New property `$data->fetch_full` added to `PodsData` which can be used to turn off additional fetch requests when all of the table data was already returned by the query with `t.*`. (@sc0ttkclark)
* Fixed: When using table-based fields and a non-simple relationship has a field in the table, it will still be expanded like a normal relationship field when requesting it by name with no traversal. (@sc0ttkclark)
* Fixed: Call `PodsField_Pick::simple_objects()` using the object instead of statically to prevent PHP notices. (@sc0ttkclark)
* Fixed: Adjust the `Pods\REST\V1\Endpoints\Base::check_permission()` method so that it references the correct `\Pods` object. (@sc0ttkclark)
= 2.8.14 - April 15th, 2022 =
* Added: New `$params` support in `Pods::total_found( $params )` to support `Pods::find( $params )` shorthand lookups for getting total number of records found more easily. (@sc0ttkclark)
* Added: New `pods_api_save_field_table_definition_mode` filter allows overriding the definition mode when saving a field (bypass/add/drop/change) for schema management. (@sc0ttkclark)
* Added: New `pods_podsrel_enabled()` arguments to allow filtering based on the field and context. (@sc0ttkclark)
* Added: New `pods_data_build_pre_traverse_args` filter allows for overriding the find/replace/traverse/params arguments for a `PodsData::build()` request before relationship traversal runs. (@sc0ttkclark)
* Added: New `pods_data_traverse_recurse_handle_join` filter allows for overriding the JOIN SQL used for relationship traversal. (@sc0ttkclark)
* Fixed: Resolved potential PHP issues with path checks in `PodsView` on certain environments. (@sc0ttkclark)
* Fixed: When a slug is set on a Pods Page, if the slug value comes through as empty due to a path issue, it will now enforce a 404 as expected. (@sc0ttkclark)
* Fixed: Resolved a few issues with the old field data coming through to the `pods_api_save_field_old_definition` filter. (@sc0ttkclark)
* Fixed: No longer showing WPDB errors from WPDB when query errors are forced off. (@sc0ttkclark)
= 2.8.13 - April 10th, 2022 =
* Fixed: Resolved PHP issues with PHP 7.x with the WPML integration. (@sc0ttkclark)
......@@ -228,7 +248,7 @@ Pods really wouldn't be where it is without all the contributions from our [dono
* Fixed: Pods Pages now loads the expected value for page_template when editing a Pod Page. #6355 (@sc0ttkclark)
* Fixed: Pods Pages now loads the labels for Associated Pod when editing a Pod Page. #6355 (@sc0ttkclark)
* Fixed: Prevent potential timeouts by reducing areas of conflict in `PodsMeta`. #6349 (@sc0ttkclark)
* Fixed: Resolved potential performance issues / timeouts with large datasets and many Pods Blocks when loading Block Editor by adding the filter `pods_blocks_types_preload_block` and returning `false` to disable preloading blocks on load of the edit post screen. #6349 (@sc0ttkclark)
* Fixed: Resolved potential performance issues / timeouts with large datasets and many Pods Blocks when loading Block Editor by adding the filter `pods_blocks_types_preload_block` and returning `false` to disable preloading blocks on load of the edit post screen. #6349 (@sc0ttkclark)
* Fixed: Enforce slug characters on registration of post type / taxonomy instead of the admin config field for Custom Rewrite Slug and Archive Page Slug Override. #6354 (@sc0ttkclark)
* Fixed: Resolve issues with `PodsAPI::save_field()` when trying to save a field just using the name, now you can pass the `override` parameter as true to bypass duplicate field checks to force saving as matching field. #6345 (@sc0ttkclark)
* Fixed: More robust checking for conflicts with extended post types and taxonomies before registering them. #6348 #6342 (@sc0ttkclark)
......@@ -244,7 +264,7 @@ Pods really wouldn't be where it is without all the contributions from our [dono
* Security: Escape/KSES labels and descriptions in more places. (@sc0ttkclark)
* Tweak: Added bbPress profile form support so that Pods fields appear like the other form fields. (@sc0ttkclark)
* Tweak: Added ability enable more consistent responses with REST API relationship depths. Filter `pods_api_export_pod_item_level_export_ids_at_final_depth` and return true to only export IDs at the final depth (note: depth set as 1 always returns IDs). #6260 (@sc0ttkclark)
* Tweak: Added ability enable more consistent responses with REST API relationship depths. Filter `pods_api_export_pod_item_level_export_ids_at_final_depth` and return true to only export IDs at the final depth (note: depth set as 1 always returns IDs). #6260 (@sc0ttkclark)
* Tweak: Added ability to force checking if a Pod has orphan fields that aren't assigned to groups and setting them to the first group. Add `pods_debug_find_orphan_fields=1` to the URL when editing a pod. (@sc0ttkclark)
* Tweak: Implement Block schema for Pods blocks and set the icons to use dashicons for WordPress.org. (@sc0ttkclark)
* Tweak: Improve performance by only checking a Pod once for a field when filtering meta related functions. (@sc0ttkclark)
......
......@@ -2,6 +2,7 @@
namespace Pods\REST\V1\Endpoints;
use Pods;
use Exception;
use Pods\Whatsit;
use Tribe__REST__Messages_Interface as Messages_Interface;
......@@ -26,13 +27,13 @@ abstract class Base {
public $route;
/**
* @since TBD
* @since 2.8.11
* @var string
*/
public $rest_route;
/**
* @since TBD
* @since 2.8.11
* @var string
*/
public $rest_doc_route;
......@@ -220,7 +221,7 @@ abstract class Base {
/**
* Get the Pod object for a specific item by ID or slug.
*
* @since TBD
* @since 2.8.11
*
* @param int|string $id_or_slug The item ID or slug.
*
......@@ -239,7 +240,7 @@ abstract class Base {
/**
* Validate the required params are set.
*
* @since TBD
* @since 2.8.11
*
* @param object $params The object params.
* @param array $required_params The list of required params.
......@@ -273,7 +274,7 @@ abstract class Base {
/**
* Check whether the user has access to the pod item.
*
* @since TBD
* @since 2.8.11
*
* @param Pods $pod The Pods object.
* @param string $author_field The author field to check permissions against.
......@@ -715,7 +716,7 @@ abstract class Base {
/**
* Register route for the endpoint automatically based on the supported methods.
*
* @since TBD
* @since 2.8.11
*
* @param string $namespace The route namespace.
* @param bool $add_to_docs Whether to add the route to the documentation endpoint.
......@@ -782,7 +783,7 @@ abstract class Base {
$registered = register_rest_route( $namespace, $rest_route, $methods );
// Maybe register route with the documentation handler.
if ( $registered ) {
if ( $registered && $add_to_docs ) {
$rest_doc_route = $this->route;
if ( ! empty( $this->rest_doc_route ) ) {
......
......@@ -20,14 +20,14 @@ class Field extends Base implements READ_Interface, UPDATE_Interface, DELETE_Int
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_route = '/fields/(?P<id>\\d+)';
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_doc_route = '/fields/{id}';
......
......@@ -16,14 +16,14 @@ class Field_Slug extends Field {
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_route = '/pods/(?P<pod>[\w\_\-]+)/fields/(?P<slug>[\w\_\-]+)';
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_doc_route = '/pods/{pod}/fields/{slug}';
......
......@@ -20,14 +20,14 @@ class Group extends Base implements READ_Interface, UPDATE_Interface, DELETE_Int
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_route = '/groups/(?P<id>\\d+)';
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_doc_route = '/groups/{id}';
......
......@@ -16,14 +16,14 @@ class Group_Slug extends Group {
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_route = '/pods/(?P<pod>[\w\_\-]+)/groups/(?P<slug>[\w\_\-]+)';
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_doc_route = '/pods/{pod}/groups/{slug}';
......
......@@ -20,14 +20,14 @@ class Pod extends Base implements READ_Interface, UPDATE_Interface, DELETE_Inter
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_route = '/pods/(?P<id>\\d+)';
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_doc_route = '/pods/{id}';
......
......@@ -16,14 +16,14 @@ class Pod_Slug extends Pod {
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_route = '/pods/(?P<slug>[\w\_\-]+)';
/**
* {@inheritdoc}
*
* @since TBD
* @since 2.8.11
*/
public $rest_doc_route = '/pods/{slug}';
......
......@@ -68,7 +68,7 @@ class Service_Provider extends \tad_DI52_ServiceProvider {
/**
* Get the list of endpoints.
*
* @since TBD
* @since 2.8.11
*
* @return string[] The list of endpoints.
*/
......
......@@ -27,7 +27,7 @@ class Base extends Validator_Base implements Validator_Interface {
/**
* Determine whether a Pod / Item ID is valid.
*
* @since TBD
* @since 2.8.11
*
* @param string $pod The pod name.
* @param int|string $id_or_slug The Item ID or slug.
......@@ -43,7 +43,7 @@ class Base extends Validator_Base implements Validator_Interface {
/**
* Determine whether a Pod / Item ID is valid.
*
* @since TBD
* @since 2.8.11
*
* @param string $pod The pod name.
* @param int|string $id The item ID.
......@@ -57,7 +57,7 @@ class Base extends Validator_Base implements Validator_Interface {
/**
* Determine whether a Pod / Item slug is valid.
*
* @since TBD
* @since 2.8.11
*
* @param string $pod The pod name.
* @param int|string $slug The Item slug.
......@@ -172,7 +172,7 @@ class Base extends Validator_Base implements Validator_Interface {
/**
* Handle other potential methods automatically if possible.
*
* @since TBD
* @since 2.8.11
*
* @param string $name The method name.
* @param array $arguments The arguments provided to the method.
......
......@@ -70,7 +70,7 @@
<div class="l-map--cities" id="js-map--cities" data-source="plunge"></div>
</div>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M" async defer></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDe9Z7EJMROLUEYOUe05zUnRFwxDrH56k0" async defer></script>
<?php
if ( is_active_sidebar( 'front_page_feedbacks' ) ) :
......
......@@ -85,7 +85,7 @@
</div>
</div>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M" async defer></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDe9Z7EJMROLUEYOUe05zUnRFwxDrH56k0" async defer></script>
<?php
if ( is_active_sidebar( 'front_page_feedbacks' ) ) :
......
......@@ -70,7 +70,7 @@
<div class="l-map--cities" id="js-map--cities" data-source="kazlu-ruda"></div>
</div>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M" async defer></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDe9Z7EJMROLUEYOUe05zUnRFwxDrH56k0" async defer></script>
<?php
if ( is_active_sidebar( 'front_page_feedbacks' ) ) :
......
......@@ -152,7 +152,7 @@
?>
<script src="/wp-content/themes/biuro/js/main-476e514c.min.js" async defer></script>
<script src="/wp-content/themes/biuro/js/main-54c15b04.min.js" async defer></script>
<script src="/wp-content/themes/biuro/js/vendor/modernizr-custom.js" async defer></script>
......
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{11:function(e,t,n){"use strict";n.r(t);var o,i=n(0);function s(e,t){const n=function(){function e(e,t,n="top"){this.position=e;var o=document.createElement("div");o.innerHTML=t||"",o.classList.add("popup-bubble"),o.classList.add("popup-bubble--"+n);var i=document.createElement("div");i.classList.add("popup-bubble-anchor"),i.appendChild(o),this.containerDiv=document.createElement("div"),this.containerDiv.classList.add("popup-container"),this.containerDiv.appendChild(i),window.google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.containerDiv)}return e.prototype=Object.create(window.google.maps.OverlayView.prototype),e.prototype.onAdd=function(){this.getPanes().floatPane.appendChild(this.containerDiv)},e.prototype.onRemove=function(){this.containerDiv.parentElement&&this.containerDiv.parentElement.removeChild(this.containerDiv)},e.prototype.draw=function(){var e=this.getProjection().fromLatLngToDivPixel(this.position),t=Math.abs(e.x)<4e3&&Math.abs(e.y)<4e3?"block":"none";"block"===t&&(this.containerDiv.style.left=e.x+"px",this.containerDiv.style.top=e.y+"px"),this.containerDiv.style.display!==t&&(this.containerDiv.style.display=t)},e}(),o=new window.google.maps.LatLngBounds;let i;for(var s=0;s<t.length;s++){const a=t[s],l=new window.google.maps.LatLng(a.lat,a.lng);i=new n(l,a.title,a.pos),i.setMap(e),o.extend(l)}e.fitBounds(o)}function a(e,t,n){for(var i=new window.google.maps.LatLngBounds,s=0;s<t.length;s++){const l=t[s],d=new window.google.maps.LatLng(l.lat,l.lng);var a=new window.google.maps.Marker({position:d,map:e,icon:"/wp-content/themes/biuro/i/ico--map-pin.svg",title:l.title||""});o&&o.close(),i.extend(d),l.content&&(a.content=l.content,window.google.maps.event.addListener(a,"click",(function(){o&&o.close(),(o=new window.google.maps.InfoWindow({content:this.content})).open(e,this)}))),n&&(window.innerWidth<960&&window.scrollTo(0,0),new google.maps.event.trigger(a,"click"))}e.fitBounds(i),window.innerWidth>1020?e.panBy(250,0):window.innerWidth>959&&e.panBy(180,0)}function l(e){var t=new window.google.maps.Map(e,{}),n=new window.google.maps.StyledMapType([{featureType:"all",elementType:"all",stylers:[{saturation:-92},{lightness:-8},{hue:"#004ed4"}]},{featureType:"water",elementType:"all",stylers:[{saturation:-95},{lightness:-25},{hue:"#004ed4"}]}],{name:"Biuro"});return t.mapTypes.set("biuro",n),t.setMapTypeId("biuro"),window.google.maps.event.addListenerOnce(t,"bounds_changed",(function(){this.getZoom()>15&&this.setZoom(14)})),t}t.default=()=>{const e=document.getElementById("js-map--divisions");e&&fetch("/wp-json/api/v1/divisions?langID="+e.dataset.id).then(e=>e.json()).then(t=>{!function(e,t){Object(i.a)("https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M").then(()=>{window.google&&setTimeout(()=>{var n=l(e);let o=[];Object.keys(t).forEach(e=>{const n=t[e];"city"===e.substr(0,4)&&(o=o.concat(n))}),document.querySelectorAll(".js-division").forEach(e=>{e.addEventListener("click",()=>{const i=e&&e.dataset.id?e.dataset.id:"";t[i]?a(n,t[i].filter(e=>e.lat&&e.lng),!0):a(n,o.filter(e=>e.lat&&e.lng))})}),a(n,o.filter(e=>e.lat&&e.lng))},50)})}(e,t)});const t=document.getElementById("js-map--cities");t&&fetch("/wp-content/themes/biuro/json/"+t.dataset.source+".json").then(e=>e.json()).then(e=>{!function e(t,n){if(window.google){var o=l(t);s(o,n),window.innerWidth>1020?o.panBy(-230,0):window.innerWidth>959&&o.panBy(-150,0)}else setTimeout(()=>{e(t,n)},250)}(t,e)});const n=document.getElementById("js-map--regions");n&&function e(t){if(!window.google)return void setTimeout(()=>{e(t)},250);a(l(t),[{title:"Vilnius",lat:54.687157,lng:25.279652},{title:"Rīga",lat:56.946285,lng:24.105078},{title:"Tallinn",lat:59.436962,lng:24.753574}])}(n)}}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{11:function(e,t,n){"use strict";n.r(t);var o,i=n(0);function s(e,t){const n=function(){function e(e,t,n="top"){this.position=e;var o=document.createElement("div");o.innerHTML=t||"",o.classList.add("popup-bubble"),o.classList.add("popup-bubble--"+n);var i=document.createElement("div");i.classList.add("popup-bubble-anchor"),i.appendChild(o),this.containerDiv=document.createElement("div"),this.containerDiv.classList.add("popup-container"),this.containerDiv.appendChild(i),window.google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.containerDiv)}return e.prototype=Object.create(window.google.maps.OverlayView.prototype),e.prototype.onAdd=function(){this.getPanes().floatPane.appendChild(this.containerDiv)},e.prototype.onRemove=function(){this.containerDiv.parentElement&&this.containerDiv.parentElement.removeChild(this.containerDiv)},e.prototype.draw=function(){var e=this.getProjection().fromLatLngToDivPixel(this.position),t=Math.abs(e.x)<4e3&&Math.abs(e.y)<4e3?"block":"none";"block"===t&&(this.containerDiv.style.left=e.x+"px",this.containerDiv.style.top=e.y+"px"),this.containerDiv.style.display!==t&&(this.containerDiv.style.display=t)},e}(),o=new window.google.maps.LatLngBounds;let i;for(var s=0;s<t.length;s++){const a=t[s],l=new window.google.maps.LatLng(a.lat,a.lng);i=new n(l,a.title,a.pos),i.setMap(e),o.extend(l)}e.fitBounds(o)}function a(e,t,n){for(var i=new window.google.maps.LatLngBounds,s=0;s<t.length;s++){const l=t[s],d=new window.google.maps.LatLng(l.lat,l.lng);var a=new window.google.maps.Marker({position:d,map:e,icon:"/wp-content/themes/biuro/i/ico--map-pin.svg",title:l.title||""});o&&o.close(),i.extend(d),l.content&&(a.content=l.content,window.google.maps.event.addListener(a,"click",(function(){o&&o.close(),(o=new window.google.maps.InfoWindow({content:this.content})).open(e,this)}))),n&&(window.innerWidth<960&&window.scrollTo(0,0),new google.maps.event.trigger(a,"click"))}e.fitBounds(i),window.innerWidth>1020?e.panBy(250,0):window.innerWidth>959&&e.panBy(180,0)}function l(e){var t=new window.google.maps.Map(e,{}),n=new window.google.maps.StyledMapType([{featureType:"all",elementType:"all",stylers:[{saturation:-92},{lightness:-8},{hue:"#004ed4"}]},{featureType:"water",elementType:"all",stylers:[{saturation:-95},{lightness:-25},{hue:"#004ed4"}]}],{name:"Biuro"});return t.mapTypes.set("biuro",n),t.setMapTypeId("biuro"),window.google.maps.event.addListenerOnce(t,"bounds_changed",(function(){this.getZoom()>15&&this.setZoom(14)})),t}t.default=()=>{const e=document.getElementById("js-map--divisions");e&&fetch("/wp-json/api/v1/divisions?langID="+e.dataset.id).then(e=>e.json()).then(t=>{!function(e,t){Object(i.a)("https://maps.googleapis.com/maps/api/js?key=AIzaSyDe9Z7EJMROLUEYOUe05zUnRFwxDrH56k0").then(()=>{window.google&&setTimeout(()=>{var n=l(e);let o=[];Object.keys(t).forEach(e=>{const n=t[e];"city"===e.substr(0,4)&&(o=o.concat(n))}),document.querySelectorAll(".js-division").forEach(e=>{e.addEventListener("click",()=>{const i=e&&e.dataset.id?e.dataset.id:"";t[i]?a(n,t[i].filter(e=>e.lat&&e.lng),!0):a(n,o.filter(e=>e.lat&&e.lng))})}),a(n,o.filter(e=>e.lat&&e.lng))},50)})}(e,t)});const t=document.getElementById("js-map--cities");t&&fetch("/wp-content/themes/biuro/json/"+t.dataset.source+".json").then(e=>e.json()).then(e=>{!function e(t,n){if(window.google){var o=l(t);s(o,n),window.innerWidth>1020?o.panBy(-230,0):window.innerWidth>959&&o.panBy(-150,0)}else setTimeout(()=>{e(t,n)},250)}(t,e)});const n=document.getElementById("js-map--regions");n&&function e(t){if(!window.google)return void setTimeout(()=>{e(t)},250);a(l(t),[{title:"Vilnius",lat:54.687157,lng:25.279652},{title:"Rīga",lat:56.946285,lng:24.105078},{title:"Tallinn",lat:59.436962,lng:24.753574}])}(n)}}}]);
\ No newline at end of file
......@@ -199,7 +199,7 @@ function initRegionsMap (node) {
}
function initDivisionsMap (node, data) {
loadJS('https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M').then(() => {
loadJS('https://maps.googleapis.com/maps/api/js?key=AIzaSyDe9Z7EJMROLUEYOUe05zUnRFwxDrH56k0').then(() => {
if (!window.google) {
return;
}
......@@ -235,7 +235,7 @@ function initDivisionsMap (node, data) {
}
const inititateMap = () => {
// <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M" async defer></script>
// <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDe9Z7EJMROLUEYOUe05zUnRFwxDrH56k0" async defer></script>
const division = document.getElementById('js-map--divisions');
......
!function(e){function t(t){for(var o,r,c=t[0],s=t[1],a=0,d=[];a<c.length;a++)r=c[a],Object.prototype.hasOwnProperty.call(n,r)&&n[r]&&d.push(n[r][0]),n[r]=0;for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o]);for(i&&i(t);d.length;)d.shift()()}var o={},n={4:0};function r(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var t=[],o=n[e];if(0!==o)if(o)t.push(o[2]);else{var c=new Promise((function(t,r){o=n[e]=[t,r]}));t.push(o[2]=c);var s,a=document.createElement("script");a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.src=function(e){return r.p+"wp-content/themes/biuro/js/components/"+({0:"accordion",1:"autocomplete",2:"feedback",3:"job-share",5:"map",6:"popup",7:"tabs"}[e]||e)+"-"+{0:"2f69296d",1:"df0794bc",2:"3d1a4d26",3:"cf7870c2",5:"c443fad5",6:"e893a8e4",7:"ab19a1f2"}[e]+".min.js"}(e);var i=new Error;s=function(t){a.onerror=a.onload=null,clearTimeout(d);var o=n[e];if(0!==o){if(o){var r=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+c+")",i.name="ChunkLoadError",i.type=r,i.request=c,o[1](i)}n[e]=void 0}};var d=setTimeout((function(){s({type:"timeout",target:a})}),12e4);a.onerror=a.onload=s,document.head.appendChild(a)}return Promise.all(t)},r.m=e,r.c=o,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw console.error(e),e};var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var a=0;a<c.length;a++)t(c[a]);var i=s;r(r.s=1)}([function(e,t,o){"use strict";function n(e){return new Promise((t,o)=>{const n=document.createElement("script");n.src=e,n.async=!0,n.onload=t,n.onerror=o,document.head.appendChild(n)})}o.d(t,"a",(function(){return n}))},function(e,t,o){e.exports=o(3)},function(e,t){window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}))},function(e,t,o){"use strict";o.r(t);o(2);var n=o(0);const r="6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu";let c;const s=(e,t)=>{const o=Math.floor(999999*Math.random())+1e5;window.grecaptcha.execute(r,{action:t+o}).then(t=>{e.value=t}),c||(c=setInterval(()=>{s(e,t)},9e4))},a=e=>{if(c)return;const t=e.dataset.action||"";Object(n.a)("https://www.google.com/recaptcha/api.js?render="+r).then(()=>{window.grecaptcha&&window.grecaptcha.ready((function(){s(e,t)}))})};(e=>{const t=document.getElementById("cookie-warning"),o=document.getElementById("cookie-agree"),n=document.getElementById("cookie-close"),r=!!c()&&localStorage.getItem("biuro-agree");function c(){try{return localStorage.setItem("a","a"),localStorage.removeItem("a"),!0}catch(e){return!1}}t&&o&&n&&!r&&(t.style.display="block",o.addEventListener("click",()=>{c()&&localStorage.setItem("biuro-agree","true"),t.style.display="none"}),n.addEventListener("click",()=>{t.style.display="none"}))})(window),(e=>{const t=document.querySelector(".c-nav--lang");t&&t.addEventListener("click",e=>{e.currentTarget.classList.toggle("c-nav--lang--is-open")})})(window),window,document.querySelectorAll(".js-toggle--nav").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.toggle("is-nav--open")})}),document.querySelectorAll(".js-toggle--aside").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.remove("is-aside--open"),document.body.classList.remove("is-aside--open-additional"),document.body.classList.remove("is-aside--open-city")})}),document.querySelectorAll(".js-toggle--aside-city").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.add("is-aside--open"),document.body.classList.remove("is-aside--open-additional"),document.body.classList.add("is-aside--open-city")})}),document.querySelectorAll(".js-toggle--aside--additional").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.toggle("is-aside--open"),document.body.classList.remove("is-aside--open-city"),document.body.classList.add("is-aside--open-additional")})}),document.querySelectorAll(".js-form--input-file").forEach(e=>{e.addEventListener("change",()=>{const t=e.parentNode,o=e.value.split(/\\|\//).pop(),n=t.querySelector(".js-form--input-file-text");n&&o&&(n.innerHTML=o)})}),document.querySelectorAll(".js-toggle--services").forEach(e=>{e.addEventListener("click",()=>{e.parentNode.classList.toggle("c-services--is-open")})}),document.querySelectorAll(".js-toggle--sections").forEach(e=>{e.addEventListener("click",()=>{const t=e.parentNode;t.classList.contains("c-sections--is-open")||document.querySelectorAll(".c-sections--is-open").forEach(e=>{e.classList.remove("c-sections--is-open")}),t.classList.toggle("c-sections--is-open")})}),document.querySelectorAll(".js-expand-jobs-section").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),e.parentNode.classList.remove("c-jobs-section--is-closed"),e.remove()})});const i=()=>{const e=document.querySelector('[name="s"][value="1"]');if(e)return void e.click();const t=document.querySelector('[name="name"]');t&&t.focus()};document.querySelector(".js-inititate-position-form")&&document.querySelector(".js-inititate-position-form").addEventListener("click",i),document.querySelector(".js-focus-form")&&document.querySelector(".js-focus-form").addEventListener("click",()=>{const e=document.querySelector(".c-form input:first-of-type");e&&e.focus()}),document.querySelector(".js-modal--close")&&document.querySelector(".js-modal--close").addEventListener("click",()=>{const e=document.querySelector(".c-modal");e&&e.remove();const t=document.querySelector(".c-form [autofocus]");t&&t.focus()}),(e=>{const t=document.querySelector(".c-form [autofocus]");if(t&&t.focus(),location.hash){const e=document.querySelector(".c-form--input-wrap--error input")||document.querySelector(".c-form--checkbox--error");if(e)return void e.focus();const t=document.querySelector('.c-form [name="name"]');t&&t.focus()}})(window),(e=>{window.dataLayer=window.dataLayer||[];const t=()=>{const e=document.querySelector('meta[itemprop="occupationalCategory"]');return e&&e.getAttribute("content")||""};document.querySelectorAll(".gtm-share-click").forEach(e=>{e.addEventListener("click",t=>{const o=e.dataset||{};window.dataLayer.push({event:"shareClick",shareLabel:o.label||""})})}),document.querySelectorAll(".gtm-click").forEach(e=>{e.addEventListener("click",t=>{const o=e.dataset||{};window.dataLayer.push({event:o.event||"",label:o.label||""})})});const o=window.sessionStorage,n=document.querySelector('[name="gtm-position-opened"]'),r=document.querySelector('[name="gtm-application-started"]'),c=document.querySelector('[name="gtm-application-submitted"]'),s=(()=>{const e=(document.querySelector('input[name="job_id"]')||{}).value;return e?parseInt(e):""})(),a=()=>{window.dataLayer.push({event:"applicationStarted",job_id:s,category:t()}),o.setItem("position-"+s,"started")},i=e=>{e.target.value&&(a(),e.target.removeEventListener("input",i))};if(n&&(o.getItem("position-"+s)||(window.dataLayer.push({event:"offerOpened",job_id:s,category:t()}),o.setItem("position-"+s,"opened"))),r&&"opened"===o.getItem("position-"+s)){const e=document.querySelector('[name="form-position"] #form-name')||{};e&&(e.value?a():e.addEventListener("input",i))}c&&"started"===o.getItem("position-"+s)&&(window.dataLayer.push({event:"applicationSuccess",job_id:s,category:t()}),o.setItem("position-"+s,"submitted"))})(window);document.querySelectorAll('[name="form-position"], [name="form-employees"], [name="form-employers"], [name="form-recommend"], [name="form-newsletter"]').forEach(e=>{e.addEventListener("submit",()=>{(e=>{e.querySelector('[type="submit"]')&&(e.querySelector('[type="submit"]').classList.add("c-btn--disabled"),e.querySelector('[type="submit"]').classList.add("c-btn--loading"))})(e)})}),document.querySelector("#submit-recommend")&&document.querySelector("#submit-recommend").addEventListener("click",e=>{e.preventDefault();const t=document.querySelector('[name="form-recommend"] [type="submit"]');t&&(e.currentTarget.classList.add("c-btn--disabled"),e.currentTarget.classList.add("c-btn--loading"),t.click())}),document.querySelector(".js-submit-employees-form")&&document.querySelector(".js-submit-employees-form").addEventListener("click",e=>{const t=document.querySelector('[name="form-employees"] [type="submit"]');t&&(e.preventDefault(),e.currentTarget.classList.add("c-btn--disabled"),e.currentTarget.classList.add("c-btn--loading"),t.click())}),document.querySelector(".js-accordion--header")&&async function(){const{default:e}=await o.e(0).then(o.bind(null,7));return e}().then(e=>{e()}),document.querySelector(".js-tabs")&&async function(){const{default:e}=await o.e(7).then(o.bind(null,8));return e}().then(e=>{e()});(e=>{if(!e)return;const t=()=>{(async function(){const{default:e}=await o.e(2).then(o.bind(null,9));return e})().then(e=>{e()})};if(!window.IntersectionObserver)return void t();const n=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(t(),n.unobserve(e.target))})},{});n.observe(e)})(document.querySelector(".c-feedbacks--inner"));const d=()=>{const e=()=>{(async function(){const{default:e}=await o.e(1).then(o.bind(null,10));return e})().then(e=>{e()})};window.requestIdleCallback?window.requestIdleCallback(e):e()};(document.getElementById("search")||document.getElementById("form-city")||document.getElementById("recommend-form-city"))&&d(),(document.getElementById("js-map--divisions")||document.getElementById("js-map--cities")||document.getElementById("js-map--regions"))&&async function(){const{default:e}=await o.e(5).then(o.bind(null,11));return e}().then(e=>{e()}),(document.querySelector(".js-copy-to-clipboard")||document.querySelector(".js-share-messenger")||document.querySelector(".js-share-whatsapp")||document.querySelector(".js-biuro-facebook"))&&async function(){const{default:e}=await o.e(3).then(o.bind(null,12));return e}().then(e=>{e()}),async function(){const{default:e}=await o.e(6).then(o.bind(null,13));e()}(),document.querySelector(".js-collapse-row--toggle")&&document.querySelector(".js-collapse-row--toggle").addEventListener("click",e=>{e.currentTarget.parentNode.classList.toggle("c-form--row--collapsed")});const l=document.getElementById("g-recaptcha-response");l&&async function(e){if("IntersectionObserver"in window){const t=e.closest("form"),o=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(a(e),o.unobserve(t.target))})},{});o.observe(t)}else window.requestIdleCallback?window.requestIdleCallback(()=>{a(e)}):a(e)}(l),(e=>{const t=document.getElementById("search");t&&document.querySelectorAll(".js-search--focus").forEach(e=>{e.addEventListener("focus",()=>{window.innerWidth<960&&t.getBoundingClientRect().top>80&&window.scroll(0,210)})})})(window),(e=>{const t="is-header--hidden",o=document.querySelector(".l-header");if(!o)return!0;let n=0,r=0,c=0,s=0,a=0;window.addEventListener("scroll",function(e,t){var o,n;return function(){const r=this,c=arguments,s=new Date;o&&s<o+e?(clearTimeout(n),n=setTimeout(()=>{o=s,t.apply(r,c)},e)):(o=s,t.apply(r,c))}}(250,(function(){n=document.body.offsetHeight,r=window.innerHeight,c=window.pageYOffset,a=s-c,c<=0||a>0&&o.classList.contains(t)?o.classList.remove(t):a<0&&(c+r>=n&&o.classList.contains(t)?o.classList.remove(t):document.body.classList.contains("is-nav--open")||o.classList.add(t)),s=c})))})(window)}]);
\ No newline at end of file
!function(e){function t(t){for(var o,r,c=t[0],s=t[1],a=0,d=[];a<c.length;a++)r=c[a],Object.prototype.hasOwnProperty.call(n,r)&&n[r]&&d.push(n[r][0]),n[r]=0;for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o]);for(i&&i(t);d.length;)d.shift()()}var o={},n={4:0};function r(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var t=[],o=n[e];if(0!==o)if(o)t.push(o[2]);else{var c=new Promise((function(t,r){o=n[e]=[t,r]}));t.push(o[2]=c);var s,a=document.createElement("script");a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.src=function(e){return r.p+"wp-content/themes/biuro/js/components/"+({0:"accordion",1:"autocomplete",2:"feedback",3:"job-share",5:"map",6:"popup",7:"tabs"}[e]||e)+"-"+{0:"2f69296d",1:"df0794bc",2:"3d1a4d26",3:"cf7870c2",5:"39b4e269",6:"e893a8e4",7:"ab19a1f2"}[e]+".min.js"}(e);var i=new Error;s=function(t){a.onerror=a.onload=null,clearTimeout(d);var o=n[e];if(0!==o){if(o){var r=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+c+")",i.name="ChunkLoadError",i.type=r,i.request=c,o[1](i)}n[e]=void 0}};var d=setTimeout((function(){s({type:"timeout",target:a})}),12e4);a.onerror=a.onload=s,document.head.appendChild(a)}return Promise.all(t)},r.m=e,r.c=o,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r.oe=function(e){throw console.error(e),e};var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=t,c=c.slice();for(var a=0;a<c.length;a++)t(c[a]);var i=s;r(r.s=1)}([function(e,t,o){"use strict";function n(e){return new Promise((t,o)=>{const n=document.createElement("script");n.src=e,n.async=!0,n.onload=t,n.onerror=o,document.head.appendChild(n)})}o.d(t,"a",(function(){return n}))},function(e,t,o){e.exports=o(3)},function(e,t){window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}))},function(e,t,o){"use strict";o.r(t);o(2);var n=o(0);const r="6Lc76qoUAAAAALk0aYR500zOZVG1BicNl3GTb-Hu";let c;const s=(e,t)=>{const o=Math.floor(999999*Math.random())+1e5;window.grecaptcha.execute(r,{action:t+o}).then(t=>{e.value=t}),c||(c=setInterval(()=>{s(e,t)},9e4))},a=e=>{if(c)return;const t=e.dataset.action||"";Object(n.a)("https://www.google.com/recaptcha/api.js?render="+r).then(()=>{window.grecaptcha&&window.grecaptcha.ready((function(){s(e,t)}))})};(e=>{const t=document.getElementById("cookie-warning"),o=document.getElementById("cookie-agree"),n=document.getElementById("cookie-close"),r=!!c()&&localStorage.getItem("biuro-agree");function c(){try{return localStorage.setItem("a","a"),localStorage.removeItem("a"),!0}catch(e){return!1}}t&&o&&n&&!r&&(t.style.display="block",o.addEventListener("click",()=>{c()&&localStorage.setItem("biuro-agree","true"),t.style.display="none"}),n.addEventListener("click",()=>{t.style.display="none"}))})(window),(e=>{const t=document.querySelector(".c-nav--lang");t&&t.addEventListener("click",e=>{e.currentTarget.classList.toggle("c-nav--lang--is-open")})})(window),window,document.querySelectorAll(".js-toggle--nav").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.toggle("is-nav--open")})}),document.querySelectorAll(".js-toggle--aside").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.remove("is-aside--open"),document.body.classList.remove("is-aside--open-additional"),document.body.classList.remove("is-aside--open-city")})}),document.querySelectorAll(".js-toggle--aside-city").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.add("is-aside--open"),document.body.classList.remove("is-aside--open-additional"),document.body.classList.add("is-aside--open-city")})}),document.querySelectorAll(".js-toggle--aside--additional").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),document.body.classList.toggle("is-aside--open"),document.body.classList.remove("is-aside--open-city"),document.body.classList.add("is-aside--open-additional")})}),document.querySelectorAll(".js-form--input-file").forEach(e=>{e.addEventListener("change",()=>{const t=e.parentNode,o=e.value.split(/\\|\//).pop(),n=t.querySelector(".js-form--input-file-text");n&&o&&(n.innerHTML=o)})}),document.querySelectorAll(".js-toggle--services").forEach(e=>{e.addEventListener("click",()=>{e.parentNode.classList.toggle("c-services--is-open")})}),document.querySelectorAll(".js-toggle--sections").forEach(e=>{e.addEventListener("click",()=>{const t=e.parentNode;t.classList.contains("c-sections--is-open")||document.querySelectorAll(".c-sections--is-open").forEach(e=>{e.classList.remove("c-sections--is-open")}),t.classList.toggle("c-sections--is-open")})}),document.querySelectorAll(".js-expand-jobs-section").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),e.parentNode.classList.remove("c-jobs-section--is-closed"),e.remove()})});const i=()=>{const e=document.querySelector('[name="s"][value="1"]');if(e)return void e.click();const t=document.querySelector('[name="name"]');t&&t.focus()};document.querySelector(".js-inititate-position-form")&&document.querySelector(".js-inititate-position-form").addEventListener("click",i),document.querySelector(".js-focus-form")&&document.querySelector(".js-focus-form").addEventListener("click",()=>{const e=document.querySelector(".c-form input:first-of-type");e&&e.focus()}),document.querySelector(".js-modal--close")&&document.querySelector(".js-modal--close").addEventListener("click",()=>{const e=document.querySelector(".c-modal");e&&e.remove();const t=document.querySelector(".c-form [autofocus]");t&&t.focus()}),(e=>{const t=document.querySelector(".c-form [autofocus]");if(t&&t.focus(),location.hash){const e=document.querySelector(".c-form--input-wrap--error input")||document.querySelector(".c-form--checkbox--error");if(e)return void e.focus();const t=document.querySelector('.c-form [name="name"]');t&&t.focus()}})(window),(e=>{window.dataLayer=window.dataLayer||[];const t=()=>{const e=document.querySelector('meta[itemprop="occupationalCategory"]');return e&&e.getAttribute("content")||""};document.querySelectorAll(".gtm-share-click").forEach(e=>{e.addEventListener("click",t=>{const o=e.dataset||{};window.dataLayer.push({event:"shareClick",shareLabel:o.label||""})})}),document.querySelectorAll(".gtm-click").forEach(e=>{e.addEventListener("click",t=>{const o=e.dataset||{};window.dataLayer.push({event:o.event||"",label:o.label||""})})});const o=window.sessionStorage,n=document.querySelector('[name="gtm-position-opened"]'),r=document.querySelector('[name="gtm-application-started"]'),c=document.querySelector('[name="gtm-application-submitted"]'),s=(()=>{const e=(document.querySelector('input[name="job_id"]')||{}).value;return e?parseInt(e):""})(),a=()=>{window.dataLayer.push({event:"applicationStarted",job_id:s,category:t()}),o.setItem("position-"+s,"started")},i=e=>{e.target.value&&(a(),e.target.removeEventListener("input",i))};if(n&&(o.getItem("position-"+s)||(window.dataLayer.push({event:"offerOpened",job_id:s,category:t()}),o.setItem("position-"+s,"opened"))),r&&"opened"===o.getItem("position-"+s)){const e=document.querySelector('[name="form-position"] #form-name')||{};e&&(e.value?a():e.addEventListener("input",i))}c&&"started"===o.getItem("position-"+s)&&(window.dataLayer.push({event:"applicationSuccess",job_id:s,category:t()}),o.setItem("position-"+s,"submitted"))})(window);document.querySelectorAll('[name="form-position"], [name="form-employees"], [name="form-employers"], [name="form-recommend"], [name="form-newsletter"]').forEach(e=>{e.addEventListener("submit",()=>{(e=>{e.querySelector('[type="submit"]')&&(e.querySelector('[type="submit"]').classList.add("c-btn--disabled"),e.querySelector('[type="submit"]').classList.add("c-btn--loading"))})(e)})}),document.querySelector("#submit-recommend")&&document.querySelector("#submit-recommend").addEventListener("click",e=>{e.preventDefault();const t=document.querySelector('[name="form-recommend"] [type="submit"]');t&&(e.currentTarget.classList.add("c-btn--disabled"),e.currentTarget.classList.add("c-btn--loading"),t.click())}),document.querySelector(".js-submit-employees-form")&&document.querySelector(".js-submit-employees-form").addEventListener("click",e=>{const t=document.querySelector('[name="form-employees"] [type="submit"]');t&&(e.preventDefault(),e.currentTarget.classList.add("c-btn--disabled"),e.currentTarget.classList.add("c-btn--loading"),t.click())}),document.querySelector(".js-accordion--header")&&async function(){const{default:e}=await o.e(0).then(o.bind(null,7));return e}().then(e=>{e()}),document.querySelector(".js-tabs")&&async function(){const{default:e}=await o.e(7).then(o.bind(null,8));return e}().then(e=>{e()});(e=>{if(!e)return;const t=()=>{(async function(){const{default:e}=await o.e(2).then(o.bind(null,9));return e})().then(e=>{e()})};if(!window.IntersectionObserver)return void t();const n=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(t(),n.unobserve(e.target))})},{});n.observe(e)})(document.querySelector(".c-feedbacks--inner"));const d=()=>{const e=()=>{(async function(){const{default:e}=await o.e(1).then(o.bind(null,10));return e})().then(e=>{e()})};window.requestIdleCallback?window.requestIdleCallback(e):e()};(document.getElementById("search")||document.getElementById("form-city")||document.getElementById("recommend-form-city"))&&d(),(document.getElementById("js-map--divisions")||document.getElementById("js-map--cities")||document.getElementById("js-map--regions"))&&async function(){const{default:e}=await o.e(5).then(o.bind(null,11));return e}().then(e=>{e()}),(document.querySelector(".js-copy-to-clipboard")||document.querySelector(".js-share-messenger")||document.querySelector(".js-share-whatsapp")||document.querySelector(".js-biuro-facebook"))&&async function(){const{default:e}=await o.e(3).then(o.bind(null,12));return e}().then(e=>{e()}),async function(){const{default:e}=await o.e(6).then(o.bind(null,13));e()}(),document.querySelector(".js-collapse-row--toggle")&&document.querySelector(".js-collapse-row--toggle").addEventListener("click",e=>{e.currentTarget.parentNode.classList.toggle("c-form--row--collapsed")});const l=document.getElementById("g-recaptcha-response");l&&async function(e){if("IntersectionObserver"in window){const t=e.closest("form"),o=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&(a(e),o.unobserve(t.target))})},{});o.observe(t)}else window.requestIdleCallback?window.requestIdleCallback(()=>{a(e)}):a(e)}(l),(e=>{const t=document.getElementById("search");t&&document.querySelectorAll(".js-search--focus").forEach(e=>{e.addEventListener("focus",()=>{window.innerWidth<960&&t.getBoundingClientRect().top>80&&window.scroll(0,210)})})})(window),(e=>{const t="is-header--hidden",o=document.querySelector(".l-header");if(!o)return!0;let n=0,r=0,c=0,s=0,a=0;window.addEventListener("scroll",function(e,t){var o,n;return function(){const r=this,c=arguments,s=new Date;o&&s<o+e?(clearTimeout(n),n=setTimeout(()=>{o=s,t.apply(r,c)},e)):(o=s,t.apply(r,c))}}(250,(function(){n=document.body.offsetHeight,r=window.innerHeight,c=window.pageYOffset,a=s-c,c<=0||a>0&&o.classList.contains(t)?o.classList.remove(t):a<0&&(c+r>=n&&o.classList.contains(t)?o.classList.remove(t):document.body.classList.contains("is-nav--open")||o.classList.add(t)),s=c})))})(window)}]);
\ No newline at end of file
......@@ -40,6 +40,6 @@ get_header(); ?>
</div><!-- #content -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBQjPQnLGLeICbpTTu8kLjVRrLUYYCTS2M" async defer></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDe9Z7EJMROLUEYOUe05zUnRFwxDrH56k0" async defer></script>
<?php get_footer();
......@@ -3,6 +3,6 @@ Theme Name: Biuro
Author: Biuro
Author URI: https://www.biuro.lt/
Description: Biuro multiregion theme
Version: 1.33.1
Version: 1.33.2
Text Domain: biuro
*/
......@@ -23,7 +23,7 @@ versionAkismet=4.2.2;
versionClassicWidgets=0.3;
versionGoogleSitemapGenerator=4.1.1;
versionLocoTranslate=2.6.1;
versionPods=2.8.13;
versionPods=2.8.15;
versionPolylang=3.2.1;
versionSiteReviews=5.23.6;
versionWordpressSeo=18.5.1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment