Commit 9503df0b authored by Simonas's avatar Simonas

Merge branch 'dev'

parents d94d49c9 36742b59
......@@ -17,10 +17,10 @@
- check if dev.biuro.lt, dev.biuro.lv, dev.biuro.ee works
### DB backup
- `C:\web\dev.biuro> docker exec -i mysql mysqldump -uroot -pIiIjnsLi2wR9i1kWVbVpUAzP --default-character-set=utf8 wordpress > docker/mariadb/db_008.sql`
- `C:\web\dev.biuro> docker exec -i mysql mysqldump -uroot -pIiIjnsLi2wR9i1kWVbVpUAzP --default-character-set=utf8 wordpress > docker/mariadb/db_010.sql`
### DB restore
- `C:\web\dev.biuro> docker exec -i mysql mysql -uroot -pIiIjnsLi2wR9i1kWVbVpUAzP --default-character-set=utf8 wordpress < docker/mariadb/db_007.sql`
- `C:\web\dev.biuro> docker exec -i mysql mysql -uroot -pIiIjnsLi2wR9i1kWVbVpUAzP --default-character-set=utf8 wordpress < docker/mariadb/db_009.sql`
## Development
- `C:\web\dev.biuro\wordpress>npm install`
......
This diff is collapsed.
This diff is collapsed.
</div><!-- #custom -->
</div><!-- .container -->
</div><!-- .advert_page -->
<?php
/*
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-THF42F');</script>
*/
if ( is_active_sidebar( 'append_area' ) ) :
dynamic_sidebar( 'append_area' );
endif;
?>
<script async src="/wp-content/themes/biuro/js/main.js"></script>
<script src="/wp-content/themes/biuro/_js/main.min.js" async></script>
</body>
</html>
<?php
$type = get_post_type( get_the_ID() );
?>
<?php
if ($type == 'page'):
?>
<?php
/*
<!--
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-116106305-1"></script>
<script>
// window.dataLayer = window.dataLayer || [];
// function gtag(){dataLayer.push(arguments);}
// gtag('js', new Date());
// gtag('config', 'UA-116106305-1');
</script>
-->
<footer role="contentinfo" class="l-footer">
footer goes here
</footer>
<?php wp_footer(); ?>
<script src="/wp-content/themes/biuro/js/main.js" async></script>
</body>
</html>
*/
?>
</div>
......@@ -54,19 +16,9 @@
</div>
<?php elseif ($type == 'job'): ?>
</div><!-- #advert_page -->
</div><!-- .container -->
</div><!-- #custom -->
<?php endif; ?>
<?php
/*
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
......@@ -83,8 +35,6 @@
endif;
?>
<script>
var coords = eval('') || null;
</script>
......
<?php
/**
* The front page template file
*
* If the user has selected a static page for their homepage, this is what will
* appear.
* Learn more: https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<?php
while ( have_posts() ) :
the_post();
the_content();
endwhile;
?>
<?php get_footer();
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<?php
include 'content/meta.html';
?>
<?php
include 'content/icons.html';
?>
<meta name="google-site-verification" content="Xlpzg6WVpXXrivwjXrOaEzjxZQcPP2x0oCoUizYyCDM" />
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" class="u-hidden">
<symbol id="biuro-logo" viewBox="0 0 108 63">
<title>Biuro</title>
<path d="M12.91 39.688L11.1 39.686v11.7h1.809c0.375 0 0.693-0.131 0.959-0.396 c0.264-0.263 0.398-0.584 0.398-0.962v-8.984c0-0.375-0.134-0.695-0.398-0.963C13.603 39.8 13.3 39.7 12.9 39.688z M63.684 23.92h-1.809v11.358h1.809c0.376 0 0.696-0.132 0.96-0.396c0.264-0.261 0.396-0.583 0.396-0.96v-8.645 c0-0.378-0.133-0.698-0.396-0.961C64.38 24.1 64.1 23.9 63.7 23.92z M12.91 23.92H11.1v9.608h1.809 c0.375 0 0.693-0.133 0.959-0.398c0.264-0.263 0.398-0.583 0.398-0.958v-6.896c0-0.378-0.134-0.698-0.398-0.961 C13.603 24.1 13.3 23.9 12.9 23.92z M107.216 7.496c-0.907-1.476-3.211-2.783-5.211-1.261l-12.774 9.1 c-0.426 0.014-0.844-0.206-1.058-0.607c-0.122-0.231-0.15-0.481-0.113-0.719l4.428-7.936c0.695-1.001 0.869-1.489 0.869-2.434 c0-1.856-1.621-3.525-3.477-3.525c-0.26 0-0.673-0.127-0.916-0.07H4.752C2.127 0 0 2.1 0 4.766V57.5 c0 2.6 2.1 4.8 4.8 4.752h98.176c2.627 0 4.753-2.128 4.753-4.752V8.919C107.641 8.4 107.5 8 107.2 7.496z M38.126 9.543c1.664 0 3 1.4 3 3.019c0 1.665-1.351 3.015-3.015 3.015c-1.666 0-3.017-1.35-3.017-3.015 C35.109 10.9 36.5 9.5 38.1 9.543z M27.623 9.543c1.666 0 3 1.4 3 3.019c0 1.665-1.352 3.015-3.018 3 c-1.665 0-3.017-1.35-3.017-3.015C24.606 10.9 26 9.5 27.6 9.543z M20.876 30.647c0 1.732-0.528 3.182-1.581 4.3 c-0.567 0.602-1.242 1.093-2.035 1.471c0.828 0.3 1.5 0.7 2 1.242c0.528 0.5 0.9 1.1 1.2 1.9 c0.263 0.7 0.4 1.5 0.4 2.371v8.365c0 0.98-0.188 1.901-0.564 2.768c-0.377 0.867-0.885 1.622-1.526 2.3 c-0.642 0.642-1.392 1.151-2.259 1.528c-0.867 0.374-1.792 0.564-2.769 0.564H5.28c-0.527 0-0.79-0.265-0.79-0.792V18.664 c0-0.525 0.262-0.79 0.79-0.79h8.478c0.976 0 1.9 0.2 2.8 0.565c0.867 0.4 1.6 0.9 2.3 1.5 c0.642 0.6 1.1 1.4 1.5 2.261c0.377 0.9 0.6 1.8 0.6 2.77V30.647z M31.067 56.193c0 0.529-0.264 0.792-0.789 0.8 h-5.031c-0.529 0-0.791-0.263-0.791-0.792V18.654c0-0.529 0.262-0.791 0.791-0.791h5.031c0.525 0 0.8 0.3 0.8 0.791V56.193z M51.261 50.706c0 0.981-0.189 1.904-0.566 2.77c-0.377 0.866-0.884 1.62-1.524 2.261c-0.645 0.64-1.396 1.148-2.261 1.5 c-0.868 0.374-1.792 0.563-2.771 0.563h-2.145c-0.982 0-1.907-0.189-2.771-0.563c-0.867-0.378-1.619-0.887-2.258-1.526 c-0.643-0.641-1.151-1.395-1.526-2.261c-0.377-0.865-0.566-1.788-0.566-2.77v-21.23c-0.005-0.054-0.022-0.1-0.022-0.157V18.654 c0-0.529 0.264-0.791 0.791-0.791h5.03c0.527 0 0.8 0.3 0.8 0.791v10.082c0.008 0 0 0.1 0 0.146v21.542 c0 0.4 0.1 0.7 0.4 0.962c0.262 0.3 0.6 0.4 1 0.395h0.453c0.375 0 0.697-0.13 0.961-0.395 c0.261-0.265 0.393-0.585 0.393-0.962V18.836c0-0.526 0.264-0.791 0.793-0.791h5.029c0.527 0 0.8 0.3 0.8 0.791V50.706z M72.216 57.433h-5.142c-0.225 0-0.442-0.077-0.65-0.227c-0.208-0.15-0.35-0.337-0.425-0.565l-4.125-13.845v14.637l-0.055-0.564 c-0.078 0.374-0.321 0.564-0.735 0.564h-5.031c-0.527 0-0.791-0.262-0.791-0.792V18.664c0-0.525 0.264-0.79 0.791-0.79h8.478 c0.979 0 1.9 0.2 2.8 0.565c0.867 0.4 1.6 0.9 2.3 1.524c0.641 0.6 1.1 1.4 1.5 2.3 c0.377 0.9 0.6 1.8 0.6 2.77v9.212c0 1.393-0.359 2.647-1.074 3.757c-0.718 1.111-1.657 1.97-2.826 2.572l5.029 16.1 C72.896 57.2 72.7 57.4 72.2 57.433z M91.941 50.706c0 0.981-0.188 1.904-0.565 2.77c-0.379 0.866-0.883 1.62-1.528 2.3 c-0.64 0.64-1.393 1.148-2.259 1.526c-0.864 0.374-1.79 0.563-2.769 0.563h-2.147c-0.979 0-1.904-0.189-2.769-0.563 c-0.869-0.378-1.621-0.887-2.261-1.526c-0.641-0.641-1.15-1.395-1.523-2.261c-0.379-0.865-0.566-1.788-0.566-2.77V24.598 c0-0.979 0.188-1.901 0.566-2.767c0.373-0.867 0.883-1.62 1.523-2.263c0.64-0.639 1.392-1.147 2.261-1.524 c0.864-0.377 1.789-0.565 2.769-0.565h2.147c0.979 0 1.9 0.2 2.8 0.565c0.866 0.4 1.6 0.9 2.3 1.5 c0.645 0.6 1.1 1.4 1.5 2.263c0.377 0.9 0.6 1.8 0.6 2.767V50.706z M83.972 23.525h-0.453 c-0.377 0-0.696 0.134-0.959 0.396c-0.265 0.264-0.396 0.585-0.396 0.961v25.543c0 0.4 0.1 0.7 0.4 1 c0.263 0.3 0.6 0.4 1 0.395h0.453c0.376 0 0.695-0.13 0.96-0.395c0.266-0.265 0.396-0.585 0.396-0.962V24.881 c0-0.376-0.131-0.697-0.396-0.961C84.668 23.7 84.3 23.5 84 23.525z" style="fill: #006957"/>
</symbol>
</svg>
<div class="advert_page">
<div class="container">
<div id="custom">
......@@ -36,61 +36,7 @@
</symbol>
</svg>
<?php
$type = get_post_type( get_the_ID() );
/*
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<?php
include 'content/meta.html';
?>
<?php
include 'content/icons.html';
?>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<header role="banner" class="l-header">
<a href="/" class="c-logo" title="">
<?php include 'content/logo.svg'; ?>
</a>
</header>
<nav role="navigation" class="l-nav">
<ul class="o-nav c-nav">
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link is-nav-link-active">Lorem ispum</a>
</li>
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link">Noster apster</a>
</li>
</ul>
</nav>
*/
?>
<?php
if ($type == 'page'):
?>
<div id="main" class="main">
......@@ -237,23 +183,53 @@
<div id="content">
<?php elseif ($type == 'job'): ?>
<div class="advert_page">
<?php
/*
<div class="container">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<div id="custom">
<?php
include 'content/meta.html';
?>
<div class="biuro-header">
<div class="logo">
<a href="<?php echo pll_home_url(); ?>" title="<?php echo get_the_title( get_option('page_on_front') ); ?>">
<svg width="133px" height="78px">
<use xlink:href="#biuro-logo"></use>
</svg>
<?php
include 'content/icons.html';
?>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<header role="banner" class="l-header">
<a href="/" class="c-logo" title="">
<?php include 'content/logo.svg'; ?>
</a>
</div>
<p>BIURO - padedame, kai labiausiai reikia. Paprastas ir greitas laikinasis įdarbinimas.</p>
</div>
</header>
<?php endif; ?>
<nav role="navigation" class="l-nav">
<ul class="o-nav c-nav">
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link is-nav-link-active">Lorem ispum</a>
</li>
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link">Noster apster</a>
</li>
</ul>
</nav>
*/
?>
......@@ -15,10 +15,12 @@
// debug( ( 'where' ) );
//get current item
$slug = pods_var( 'last', 'url' );
//get pods object for current item
$pods = pods( 'job', $slug );
// $slug = pods_v( 'last', 'url' );
debug( $pods->fetch() );
// echo '<p><b>slug:</b> ' . $slug . '</p>';
// //get pods object for current item
// $pods = pods( 'job' );
// debug( $pods->data() );
?>
......@@ -17,17 +17,6 @@
get_header(); ?>
<?php
if (get_post_type( get_the_ID() ) == 'job'):
?>
<div class="biuro-title">
<h1><span>IEŠKOME UŽSAKYMŲ KOMPLEKTUOTOJŲ! GALIMYBĖ UŽSIDIRBTI 1020 EUR Į RANKAS!</span></h1>
</div>
<?php
endif;
?>
<?php
while ( have_posts() ) :
......@@ -41,21 +30,29 @@ get_header(); ?>
<?php
/*
<main class="l-main" role="main">
<h1>index.php</h1>
<p>main</p>
<hr >
<!--
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-116106305-1"></script>
<script>
// window.dataLayer = window.dataLayer || [];
// function gtag(){dataLayer.push(arguments);}
// gtag('js', new Date());
// gtag('config', 'UA-116106305-1');
</script>
-->
<?php the_title( '<h1>', '</h1>' ); ?>
<?php the_content(); ?>
</main>
<footer role="contentinfo" class="l-footer">
footer goes here
</footer>
<aside role="complementary" class="l-aside">
<p>aside</p>
</aside>
<?php wp_footer(); ?>
<script src="/wp-content/themes/biuro/js/main.js" async></script>
</body>
</html>
*/
?>
<?php get_footer();
<?php
/**
* Template Name: Jobs listing
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<?php
// Use for search
// https://pods.io/docs/code/pods/find/
while ( have_posts() ) :
the_post();
the_content();
endwhile;
?>
<?php
$ID = get_the_ID();
$keys = get_post_custom_keys();
$taxonomies = array();
foreach ( $keys as $key => $value ) {
$val = trim($value);
$taxonomy = substr($val, 20);
if ( '_' == $val{0} || substr($val, 0, 20) != 'built_in_taxonomies_' || !$taxonomy):
continue;
endif;
$res = get_post_custom_values( $val, $ID );
if ( !$res ) {
continue;
}
$term = $res[0];
if ( !$term ) {
continue;
}
$taxonomies[] = array(
'taxonomy' => $taxonomy,
'field' => 'slug',
'terms' => $term
);
}
$jobs = get_posts( array(
'posts_per_page' => -1,
'post_type' => 'job',
'tax_query' => $taxonomies
) );
// debug($jobs);
foreach ($jobs as $job) :
echo '<h3><a href="' . get_post_permalink( $job->ID ) . '" target="_blank">' . $job->post_title . '</a></h3>';
endforeach;
?>
<?php get_footer();
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header('job'); ?>
<div class="biuro-header">
<div class="logo">
<a href="<?php echo pll_home_url(); ?>" title="<?php echo get_the_title( get_option('page_on_front') ); ?>">
<svg width="133px" height="78px">
<use xlink:href="#biuro-logo"></use>
</svg>
</a>
</div><!-- .logo -->
<p>BIURO - padedame, kai labiausiai reikia. Paprastas ir greitas laikinasis įdarbinimas.</p>
</div><!-- .biuro-header -->
<?php
while ( have_posts() ) :
?>
<div class="biuro-title">
<h1><span><?php the_title(); ?></span></h1>
</div><!-- .biuro-title -->
<?php
the_post();
the_content();
endwhile;
?>
<?php get_footer('job');
<!--
<link rel="apple-touch-icon" sizes="180x180" href="/wp-content/themes/biuro/i/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/wp-content/themes/biuro/i/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/wp-content/themes/biuro/i/icons/favicon-16x16.png">
......@@ -7,3 +8,4 @@
<meta name="msapplication-TileColor" content="#fcfcfc">
<meta name="msapplication-config" content="/wp-content/themes/biuro/i/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
-->
......@@ -212,7 +212,7 @@ class PLL_Admin_Filters extends PLL_Filters {
public function sanitize_title( $title, $raw_title, $context ) {
static $once = false;
if ( ! $once && 'save' == $context && ! empty( $this->curlang ) && ! empty( $title ) ) {
if ( ! $once && 'save' == $context && ! empty( $title ) ) {
$once = true;
add_filter( 'locale', array( $this, 'get_locale' ), 20 ); // After the filter for the admin interface
$title = sanitize_title( $raw_title, '', $context );
......@@ -235,7 +235,7 @@ class PLL_Admin_Filters extends PLL_Filters {
public function sanitize_user( $username, $raw_username, $strict ) {
static $once = false;
if ( ! $once && ! empty( $this->curlang ) ) {
if ( ! $once ) {
$once = true;
add_filter( 'locale', array( $this, 'get_locale' ), 20 ); // After the filter for the admin interface
$username = sanitize_user( $raw_username, '', $strict );
......
......@@ -2,6 +2,131 @@
This file contains only old changelog. See readme.txt for newer versions.
= 2.3.11 (2018-10-03) =
* Pro: Add action 'pll_created_sync_post'
* Pro: Fix language and translations not included for tags in the REST API
* Fix Assigning a parent category breaking the hierarchy of translated category
= 2.3.10 (2018-08-16) =
* Fix Lingotek notice not dismissable
* Fix fatal error with the widget calendar
= 2.3.9 (2018-08-14) =
* Add a notice to inform about Polylang for WooCommerce
* Deprecate PLL_Pointer
* Fix bulk editing pages with no language breaking hierarchy #281
* Fix an edge case where rewrite rules could be messed on a multisite
* MU Domain Mapping: fix secondary domain redirected to primary domain
= 2.3.8 (2018-07-16) =
* Pro: Duplicate term meta when duplicating a post creates new terms
* Pro: Add compatibility with ACF Pro when it's bundled with the theme
* Pro: Fix a fatal error when duplicating posts
* Set cookie during the home redirect
* Accept a port in the url to detect the site home
* Add filter 'pll_is_cache_active' to allow to load the cache compatibility #270 #274
* Fix potential fatal error when a 3rd party misuses the 'wpml_active_languages' filter #268
* Fix Uncaught TypeError: s.split is not a function. Props Wouter Van Vliet #262
* Fix text alignment for RTL scripts in Lingotek panel #247
* Fix html language attribute filter on admin
* Fix cookie expiration time when set in js. Props Jens Nachtigall #271
* Fix fatal error when a 3rd party misuses the WP_Query tax_query param. Props JanneAalto #252
* Fix an edge case which could mess home pages on a multisite
= 2.3.7 (2018-06-07) =
* Pro: The Events Calendar: Fix untranslated events shown in all languages
* Avoid displaying edit links of translations of the privacy policy page to non-admin
* Fix draft created when creating a new page on multisite
* Do not prevent using the cache for home when using WP Rocket 3.0.5 or later #236
* Fix language filter applied to wrong queries on admin side
= 2.3.6 (2018-05-17) =
* Pro: Fix post type archive slug not translated in ACF page link fields
* WP 4.9.6: Translate the privacy policy page
* WP 4.9.6: Add the translated user descriptions to exported personal data
* Update Plugin updater to version 1.6.16
* Fix conflict with the plugin View Admin As. Props Jory Hogeveen. #253
= 2.3.5 (2018-05-08) =
* Pro: Fix translated CPT slugs when one CPT name is a substring of another one. Props Steve Reimer.
* Pro: Fix canonical redirection for post types archives when the CPT slug is translated
* Pro: Fix ACF private key uselessly synchronized when the public custom field is not synchronized
* Add filter 'pll_filter_query_excluded_query_vars'
* Redirect www. to non www. when using multiple domains
* Fix Yoast SEO category sitemap not filtered by language when using multiple domains
* Fix PLL_COOKIE === false not honored when using a cache plugin. #248
* Fix empty predefined languages list
= 2.3.4 (2018-03-27) =
* Pro: Fix conflict with Pods related to translated slugs for custom post types
* Add Friulian to the predefined languages list
* Fix conflict (javascript error) with Gütenberg #225
* Fix conflict on ajax requests introduced by WooCoommerce 3.3.4
* Fix queries by 'category_name' not auto translated #238
= 2.3.3 (2018-03-15) =
* Pro: Fix tax query using a term sharing slugs (fix a conflict with Fusion Builder)
* Restore Polylang (free) on REST requests, while disabling the language filter as in v2.3
* Rework auto translated query with taxonomy in different language #223
* Synchronize Yoast SEO primary category (needs Yoast SEO 7.0+)
* Fix PHP warning introduced by Yoast SEO 7.0 #229
* Fix tax query when using the relation 'OR'
* Fix a conflict with the combination of Barrel + WP Bakery Page Builder
* Fix broken redirect with MU domain mapping #226
* Fix site title not translated in password change email
= 2.3.2 (2018-03-05) =
* Pro: Fix REST requests not filtered by the requested language (introduced in 2.3).
* Pro: Fix error 404 on single posts if posts are untranslatable
* Deactivate Polylang (free) on REST requests by default.
* Fix translated terms unassigned from posts when deleting a term
* Fix auto translated query with taxonomy in different language returning empty results since WP 4.9 #223
* Fix conflict with a homepage option of the theme Extra
* Fix warning when filtering get_pages()
= 2.3.1 (2018-02-15) =
* Pro: Fix GET REST request with slug parameter deleting the post slug
* Fix http request with a custom query var being redirected to the home page #216
= 2.3 (2018-01-30) =
* Pro: Duplicating a post now duplicates untranslated terms and the featured image (if media are translatable)
* Pro: Add filter 'pll_sync_post_fields'
* Pro: Translate ACF Pro clone fields when creating a new field group translation
* Pro: Allow to share slugs when creating a post or term with the REST API
* Pro: Load asynchronously the script added on front for multiple domains and subdomains
* Pro: Fix 'lang' parameter not interpreted when the query includes 'name'
* Refactor the synchronization of metas for better synchronization and performance improvement
* Refactor the synchronization of taxonomy terms for performance improvement
* Refactor language and translations saving for performance improvement
* Refactor the synchronization of sticky posts
* Remove all languages files. All translations are now maintained on https://translate.wordpress.org/projects/wp-plugins/polylang #199
* Refactor the list of languages to merge predefined languages, Facebook locales and fixes for W3C locales
* Automatically deactivate Polylang when activating Polylang Pro
* Disable programmatically translated post types and taxonomies in settings. Props Ulrich Pogson. #180
* Set the cookie language in Javascript when a cache plugin is active
* Automatically remove the home page from cache when requesting the detection of the browser preferred language
* Use relative urls for the admin language filter in admin bar. #209
* Disable auto translation of WP_Term_Query if it has a 'lang' parameter
* Don't filter REST requests by default. #211
* Fix Yoast SEO statistics in dashboard showing only the default language. #211
* Fix WP Rocket clearing the cache of the wrong adjacent post
* Fix random header image
* Fix home page not correctly loaded when adding a query var
* Fix: Impossible to change the language code when the language code is also a WordPress locale.
= 2.2.8 (2018-01-09) =
* Pro: Fix: Impossible to link past events by translation in The Events Calendar
......
......@@ -82,7 +82,8 @@ class PLL_Frontend_Filters extends PLL_Filters {
public function option_sticky_posts( $posts ) {
global $wpdb;
if ( $this->curlang && ! empty( $posts ) ) {
// Do not filter sticky posts on REST requests as $this->curlang is *not* the 'lang' parameter set in the request
if ( ! defined( 'REST_REQUEST' ) && $this->curlang && ! empty( $posts ) ) {
$_posts = wp_cache_get( 'sticky_posts', 'options' ); // This option is usually cached in 'all_options' by WP
if ( empty( $_posts ) || ! is_array( $_posts[ $this->curlang->term_taxonomy_id ] ) ) {
......@@ -145,6 +146,7 @@ class PLL_Frontend_Filters extends PLL_Filters {
* @return bool|array false if we hide the widget, unmodified $instance otherwise
*/
public function widget_display_callback( $instance, $widget ) {
// FIXME it looks like this filter is useless, now the we use the filter sidebars_widgets
return ! empty( $instance['pll_lang'] ) && $instance['pll_lang'] != $this->curlang->slug ? false : $instance;
}
......@@ -161,7 +163,12 @@ class PLL_Frontend_Filters extends PLL_Filters {
public function sidebars_widgets( $sidebars_widgets ) {
global $wp_registered_widgets;
$_sidebars_widgets = $this->cache->get( 'sidebars_widgets' );
if ( empty( $wp_registered_widgets ) ) {
return $sidebars_widgets;
}
$cache_key = md5( serialize( $sidebars_widgets ) );
$_sidebars_widgets = $this->cache->get( "sidebars_widgets_{$cache_key}" );
if ( false !== $_sidebars_widgets ) {
return $_sidebars_widgets;
......@@ -189,7 +196,7 @@ class PLL_Frontend_Filters extends PLL_Filters {
}
}
$this->cache->set( 'sidebars_widgets', $sidebars_widgets );
$this->cache->set( "sidebars_widgets_{$cache_key}", $sidebars_widgets );
return $sidebars_widgets;
}
......
......@@ -51,6 +51,28 @@ class PLL_Frontend extends PLL_Base {
}
}
/**
* Is the current request a REST API request?
* Inspired by WP::parse_request()
* Needed because at this point, the constant REST_REQUEST is not defined yet
*
* @since 2.4.1
*
* @return bool
*/
public function is_rest_request() {
$home_path = trim( parse_url( home_url(), PHP_URL_PATH ), '/' );
$home_path_regex = sprintf( '|^%s|i', preg_quote( $home_path, '|' ) );
$req_uri = trim( $_SERVER['REQUEST_URI'], '/' );
$req_uri = preg_replace( $home_path_regex, '', $req_uri );
$req_uri = trim( $req_uri, '/' );
$req_uri = str_replace( 'index.php', '', $req_uri );
$req_uri = trim( $req_uri, '/' );
return 0 === strpos( $req_uri, rest_get_url_prefix() . '/' );
}
/**
* Setups the language chooser based on options
*
......@@ -60,7 +82,7 @@ class PLL_Frontend extends PLL_Base {
$this->links = new PLL_Frontend_Links( $this );
// Don't set any language for REST requests when Polylang Pro is not active
if ( ! class_exists( 'PLL_REST_Translated_Object' ) && 0 === strpos( str_replace( 'index.php', '', $_SERVER['REQUEST_URI'] ), '/' . rest_get_url_prefix() . '/' ) ) {
if ( ! class_exists( 'PLL_REST_Translated_Object' ) && $this->is_rest_request() ) {
/** This action is documented in include/class-polylang.php */
do_action( 'pll_no_language_defined' );
} else {
......
......@@ -116,7 +116,7 @@ if ( ! function_exists( 'icl_link_to_element' ) ) {
}
$pll_type = ( 'post' == $type || pll_is_translated_post_type( $type ) ) ? 'post' : ( 'term' == $type || pll_is_translated_taxonomy( $type ) ? 'term' : false );
if ( $pll_type && ( $lang = pll_current_language() ) && ( $tr_id = PLL()->model->$pll_type->get_translation( $id, $lang ) ) && PLL()->links->current_user_can_read( $tr_id ) ) {
if ( $pll_type && ( $lang = pll_current_language() ) && ( $tr_id = PLL()->model->$pll_type->get_translation( $id, $lang ) ) && ( 'term' === $pll_type || PLL()->links->current_user_can_read( $tr_id ) ) ) {
$id = $tr_id;
} elseif ( ! $return_original_if_missing ) {
return '';
......
......@@ -3,7 +3,7 @@
/**
Plugin Name: Polylang
Plugin URI: https://polylang.pro
Version: 2.4
Version: 2.4.1
Author: Frédéric Demarle
Author uri: https://polylang.pro
Description: Adds multilingual capability to WordPress
......@@ -53,7 +53,7 @@ if ( defined( 'POLYLANG_BASENAME' ) ) {
}
} else {
// Go on loading the plugin
define( 'POLYLANG_VERSION', '2.4' );
define( 'POLYLANG_VERSION', '2.4.1' );
define( 'PLL_MIN_WP_VERSION', '4.7' );
define( 'POLYLANG_FILE', __FILE__ ); // this file
......
......@@ -4,7 +4,7 @@ Donate link: https://polylang.pro
Tags: multilingual, bilingual, translate, translation, language, multilanguage, international, localization
Requires at least: 4.7
Tested up to: 4.9
Stable tag: 2.4
Stable tag: 2.4.1
License: GPLv2 or later
Making WordPress multilingual
......@@ -76,6 +76,17 @@ Don't hesitate to [give your feedback](http://wordpress.org/support/view/plugin-
== Changelog ==
= 2.4.1 (2018-11-27) =
* Pro: Add compatibility with REST API changes made in WP 5.0
* Pro: Fix sticky posts in the REST API
* Pro: Fix overwritten custom post slug when the post is updated with the REST API
* Pro: Fix bulk translate for media
* Fix a conflict with Custom sidebars and Content aware sidebars
* Fix a conflict with the theme Pokemania
* Fix PHP notices when using the function 'icl_link_to_element' for terms
* Fix title slugs for posts written in German
= 2.4 (2018-11-12) =
* Minimum WordPress version is now 4.7
......@@ -87,7 +98,7 @@ Don't hesitate to [give your feedback](http://wordpress.org/support/view/plugin-
* Pro: Fix term not duplicated correctly when the language is set from the content
* Refactor the core to activate on front and for the REST api actions that were previously available only in the backend (language checks, synchronizations...).
* Add flags to widgets displayed in only one language (Props Jory Hogeveen) #257
* Honor 'pll_the_language_args' for all options in menus #237
* Honor the filter 'pll_the_language_args' for all options in menus #237
* Add better filters for default flags and custom flags
* Custom flags can now be stored in the polylang directory in the theme
* Custom flags can now use SVG
......@@ -99,129 +110,4 @@ Don't hesitate to [give your feedback](http://wordpress.org/support/view/plugin-
* Fix performance issue when using hundreds of widgets
* Fix translations possibly wrong if the post language is changed without saving the post after
= 2.3.11 (2018-10-03) =
* Pro: Add action 'pll_created_sync_post'
* Pro: Fix language and translations not included for tags in the REST API
* Fix Assigning a parent category breaking the hierarchy of translated category
= 2.3.10 (2018-08-16) =
* Fix Lingotek notice not dismissable
* Fix fatal error with the widget calendar
= 2.3.9 (2018-08-14) =
* Add a notice to inform about Polylang for WooCommerce
* Deprecate PLL_Pointer
* Fix bulk editing pages with no language breaking hierarchy #281
* Fix an edge case where rewrite rules could be messed on a multisite
* MU Domain Mapping: fix secondary domain redirected to primary domain
= 2.3.8 (2018-07-16) =
* Pro: Duplicate term meta when duplicating a post creates new terms
* Pro: Add compatibility with ACF Pro when it's bundled with the theme
* Pro: Fix a fatal error when duplicating posts
* Set cookie during the home redirect
* Accept a port in the url to detect the site home
* Add filter 'pll_is_cache_active' to allow to load the cache compatibility #270 #274
* Fix potential fatal error when a 3rd party misuses the 'wpml_active_languages' filter #268
* Fix Uncaught TypeError: s.split is not a function. Props Wouter Van Vliet #262
* Fix text alignment for RTL scripts in Lingotek panel #247
* Fix html language attribute filter on admin
* Fix cookie expiration time when set in js. Props Jens Nachtigall #271
* Fix fatal error when a 3rd party misuses the WP_Query tax_query param. Props JanneAalto #252
* Fix an edge case which could mess home pages on a multisite
= 2.3.7 (2018-06-07) =
* Pro: The Events Calendar: Fix untranslated events shown in all languages
* Avoid displaying edit links of translations of the privacy policy page to non-admin
* Fix draft created when creating a new page on multisite
* Do not prevent using the cache for home when using WP Rocket 3.0.5 or later #236
* Fix language filter applied to wrong queries on admin side
= 2.3.6 (2018-05-17) =
* Pro: Fix post type archive slug not translated in ACF page link fields
* WP 4.9.6: Translate the privacy policy page
* WP 4.9.6: Add the translated user descriptions to exported personal data
* Update Plugin updater to version 1.6.16
* Fix conflict with the plugin View Admin As. Props Jory Hogeveen. #253
= 2.3.5 (2018-05-08) =
* Pro: Fix translated CPT slugs when one CPT name is a substring of another one. Props Steve Reimer.
* Pro: Fix canonical redirection for post types archives when the CPT slug is translated
* Pro: Fix ACF private key uselessly synchronized when the public custom field is not synchronized
* Add filter 'pll_filter_query_excluded_query_vars'
* Redirect www. to non www. when using multiple domains
* Fix Yoast SEO category sitemap not filtered by language when using multiple domains
* Fix PLL_COOKIE === false not honored when using a cache plugin. #248
* Fix empty predefined languages list
= 2.3.4 (2018-03-27) =
* Pro: Fix conflict with Pods related to translated slugs for custom post types
* Add Friulian to the predefined languages list
* Fix conflict (javascript error) with Gütenberg #225
* Fix conflict on ajax requests introduced by WooCoommerce 3.3.4
* Fix queries by 'category_name' not auto translated #238
= 2.3.3 (2018-03-15) =
* Pro: Fix tax query using a term sharing slugs (fix a conflict with Fusion Builder)
* Restore Polylang (free) on REST requests, while disabling the language filter as in v2.3
* Rework auto translated query with taxonomy in different language #223
* Synchronize Yoast SEO primary category (needs Yoast SEO 7.0+)
* Fix PHP warning introduced by Yoast SEO 7.0 #229
* Fix tax query when using the relation 'OR'
* Fix a conflict with the combination of Barrel + WP Bakery Page Builder
* Fix broken redirect with MU domain mapping #226
* Fix site title not translated in password change email
= 2.3.2 (2018-03-05) =
* Pro: Fix REST requests not filtered by the requested language (introduced in 2.3).
* Pro: Fix error 404 on single posts if posts are untranslatable
* Deactivate Polylang (free) on REST requests by default.
* Fix translated terms unassigned from posts when deleting a term
* Fix auto translated query with taxonomy in different language returning empty results since WP 4.9 #223
* Fix conflict with a homepage option of the theme Extra
* Fix warning when filtering get_pages()
= 2.3.1 (2018-02-15) =
* Pro: Fix GET REST request with slug parameter deleting the post slug
* Fix http request with a custom query var being redirected to the home page #216
= 2.3 (2018-01-30) =
* Pro: Duplicating a post now duplicates untranslated terms and the featured image (if media are translatable)
* Pro: Add filter 'pll_sync_post_fields'
* Pro: Translate ACF Pro clone fields when creating a new field group translation
* Pro: Allow to share slugs when creating a post or term with the REST API
* Pro: Load asynchronously the script added on front for multiple domains and subdomains
* Pro: Fix 'lang' parameter not interpreted when the query includes 'name'
* Refactor the synchronization of metas for better synchronization and performance improvement
* Refactor the synchronization of taxonomy terms for performance improvement
* Refactor language and translations saving for performance improvement
* Refactor the synchronization of sticky posts
* Remove all languages files. All translations are now maintained on https://translate.wordpress.org/projects/wp-plugins/polylang #199
* Refactor the list of languages to merge predefined languages, Facebook locales and fixes for W3C locales
* Automatically deactivate Polylang when activating Polylang Pro
* Disable programmatically translated post types and taxonomies in settings. Props Ulrich Pogson. #180
* Set the cookie language in Javascript when a cache plugin is active
* Automatically remove the home page from cache when requesting the detection of the browser preferred language
* Use relative urls for the admin language filter in admin bar. #209
* Disable auto translation of WP_Term_Query if it has a 'lang' parameter
* Don't filter REST requests by default. #211
* Fix Yoast SEO statistics in dashboard showing only the default language. #211
* Fix WP Rocket clearing the cache of the wrong adjacent post
* Fix random header image
* Fix home page not correctly loaded when adding a query var
* Fix: Impossible to change the language code when the language code is also a WordPress locale.
See [changelog.txt](https://plugins.svn.wordpress.org/polylang/trunk/changelog.txt) for older changelog
<!--
<link rel="apple-touch-icon" sizes="180x180" href="/wp-content/themes/biuro/i/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/wp-content/themes/biuro/i/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/wp-content/themes/biuro/i/icons/favicon-16x16.png">
......@@ -7,3 +8,4 @@
<meta name="msapplication-TileColor" content="#fcfcfc">
<meta name="msapplication-config" content="/wp-content/themes/biuro/i/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
-->
</div><!-- #custom -->
</div><!-- .container -->
</div><!-- .advert_page -->
<?php
/*
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-THF42F');</script>
*/
if ( is_active_sidebar( 'append_area' ) ) :
dynamic_sidebar( 'append_area' );
endif;
?>
<script async src="/wp-content/themes/biuro/js/main.js"></script>
<script src="/wp-content/themes/biuro/_js/main.min.js" async></script>
</body>
</html>
<?php
$type = get_post_type( get_the_ID() );
?>
<?php
if ($type == 'page'):
?>
<?php
/*
<!--
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-116106305-1"></script>
<script>
// window.dataLayer = window.dataLayer || [];
// function gtag(){dataLayer.push(arguments);}
// gtag('js', new Date());
// gtag('config', 'UA-116106305-1');
</script>
-->
<footer role="contentinfo" class="l-footer">
footer goes here
</footer>
<?php wp_footer(); ?>
<script src="/wp-content/themes/biuro/js/main.js" async></script>
</body>
</html>
*/
?>
</div>
......@@ -54,19 +16,9 @@
</div>
<?php elseif ($type == 'job'): ?>
</div><!-- #advert_page -->
</div><!-- .container -->
</div><!-- #custom -->
<?php endif; ?>
<?php
/*
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
......@@ -83,8 +35,6 @@
endif;
?>
<script>
var coords = eval('') || null;
</script>
......
<?php
/**
* The front page template file
*
* If the user has selected a static page for their homepage, this is what will
* appear.
* Learn more: https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<?php
while ( have_posts() ) :
the_post();
the_content();
endwhile;
?>
<?php get_footer();
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<?php
include 'content/meta.html';
?>
<?php
include 'content/icons.html';
?>
<meta name="google-site-verification" content="Xlpzg6WVpXXrivwjXrOaEzjxZQcPP2x0oCoUizYyCDM" />
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" class="u-hidden">
<symbol id="biuro-logo" viewBox="0 0 108 63">
<title>Biuro</title>
<path d="M12.91 39.688L11.1 39.686v11.7h1.809c0.375 0 0.693-0.131 0.959-0.396 c0.264-0.263 0.398-0.584 0.398-0.962v-8.984c0-0.375-0.134-0.695-0.398-0.963C13.603 39.8 13.3 39.7 12.9 39.688z M63.684 23.92h-1.809v11.358h1.809c0.376 0 0.696-0.132 0.96-0.396c0.264-0.261 0.396-0.583 0.396-0.96v-8.645 c0-0.378-0.133-0.698-0.396-0.961C64.38 24.1 64.1 23.9 63.7 23.92z M12.91 23.92H11.1v9.608h1.809 c0.375 0 0.693-0.133 0.959-0.398c0.264-0.263 0.398-0.583 0.398-0.958v-6.896c0-0.378-0.134-0.698-0.398-0.961 C13.603 24.1 13.3 23.9 12.9 23.92z M107.216 7.496c-0.907-1.476-3.211-2.783-5.211-1.261l-12.774 9.1 c-0.426 0.014-0.844-0.206-1.058-0.607c-0.122-0.231-0.15-0.481-0.113-0.719l4.428-7.936c0.695-1.001 0.869-1.489 0.869-2.434 c0-1.856-1.621-3.525-3.477-3.525c-0.26 0-0.673-0.127-0.916-0.07H4.752C2.127 0 0 2.1 0 4.766V57.5 c0 2.6 2.1 4.8 4.8 4.752h98.176c2.627 0 4.753-2.128 4.753-4.752V8.919C107.641 8.4 107.5 8 107.2 7.496z M38.126 9.543c1.664 0 3 1.4 3 3.019c0 1.665-1.351 3.015-3.015 3.015c-1.666 0-3.017-1.35-3.017-3.015 C35.109 10.9 36.5 9.5 38.1 9.543z M27.623 9.543c1.666 0 3 1.4 3 3.019c0 1.665-1.352 3.015-3.018 3 c-1.665 0-3.017-1.35-3.017-3.015C24.606 10.9 26 9.5 27.6 9.543z M20.876 30.647c0 1.732-0.528 3.182-1.581 4.3 c-0.567 0.602-1.242 1.093-2.035 1.471c0.828 0.3 1.5 0.7 2 1.242c0.528 0.5 0.9 1.1 1.2 1.9 c0.263 0.7 0.4 1.5 0.4 2.371v8.365c0 0.98-0.188 1.901-0.564 2.768c-0.377 0.867-0.885 1.622-1.526 2.3 c-0.642 0.642-1.392 1.151-2.259 1.528c-0.867 0.374-1.792 0.564-2.769 0.564H5.28c-0.527 0-0.79-0.265-0.79-0.792V18.664 c0-0.525 0.262-0.79 0.79-0.79h8.478c0.976 0 1.9 0.2 2.8 0.565c0.867 0.4 1.6 0.9 2.3 1.5 c0.642 0.6 1.1 1.4 1.5 2.261c0.377 0.9 0.6 1.8 0.6 2.77V30.647z M31.067 56.193c0 0.529-0.264 0.792-0.789 0.8 h-5.031c-0.529 0-0.791-0.263-0.791-0.792V18.654c0-0.529 0.262-0.791 0.791-0.791h5.031c0.525 0 0.8 0.3 0.8 0.791V56.193z M51.261 50.706c0 0.981-0.189 1.904-0.566 2.77c-0.377 0.866-0.884 1.62-1.524 2.261c-0.645 0.64-1.396 1.148-2.261 1.5 c-0.868 0.374-1.792 0.563-2.771 0.563h-2.145c-0.982 0-1.907-0.189-2.771-0.563c-0.867-0.378-1.619-0.887-2.258-1.526 c-0.643-0.641-1.151-1.395-1.526-2.261c-0.377-0.865-0.566-1.788-0.566-2.77v-21.23c-0.005-0.054-0.022-0.1-0.022-0.157V18.654 c0-0.529 0.264-0.791 0.791-0.791h5.03c0.527 0 0.8 0.3 0.8 0.791v10.082c0.008 0 0 0.1 0 0.146v21.542 c0 0.4 0.1 0.7 0.4 0.962c0.262 0.3 0.6 0.4 1 0.395h0.453c0.375 0 0.697-0.13 0.961-0.395 c0.261-0.265 0.393-0.585 0.393-0.962V18.836c0-0.526 0.264-0.791 0.793-0.791h5.029c0.527 0 0.8 0.3 0.8 0.791V50.706z M72.216 57.433h-5.142c-0.225 0-0.442-0.077-0.65-0.227c-0.208-0.15-0.35-0.337-0.425-0.565l-4.125-13.845v14.637l-0.055-0.564 c-0.078 0.374-0.321 0.564-0.735 0.564h-5.031c-0.527 0-0.791-0.262-0.791-0.792V18.664c0-0.525 0.264-0.79 0.791-0.79h8.478 c0.979 0 1.9 0.2 2.8 0.565c0.867 0.4 1.6 0.9 2.3 1.524c0.641 0.6 1.1 1.4 1.5 2.3 c0.377 0.9 0.6 1.8 0.6 2.77v9.212c0 1.393-0.359 2.647-1.074 3.757c-0.718 1.111-1.657 1.97-2.826 2.572l5.029 16.1 C72.896 57.2 72.7 57.4 72.2 57.433z M91.941 50.706c0 0.981-0.188 1.904-0.565 2.77c-0.379 0.866-0.883 1.62-1.528 2.3 c-0.64 0.64-1.393 1.148-2.259 1.526c-0.864 0.374-1.79 0.563-2.769 0.563h-2.147c-0.979 0-1.904-0.189-2.769-0.563 c-0.869-0.378-1.621-0.887-2.261-1.526c-0.641-0.641-1.15-1.395-1.523-2.261c-0.379-0.865-0.566-1.788-0.566-2.77V24.598 c0-0.979 0.188-1.901 0.566-2.767c0.373-0.867 0.883-1.62 1.523-2.263c0.64-0.639 1.392-1.147 2.261-1.524 c0.864-0.377 1.789-0.565 2.769-0.565h2.147c0.979 0 1.9 0.2 2.8 0.565c0.866 0.4 1.6 0.9 2.3 1.5 c0.645 0.6 1.1 1.4 1.5 2.263c0.377 0.9 0.6 1.8 0.6 2.767V50.706z M83.972 23.525h-0.453 c-0.377 0-0.696 0.134-0.959 0.396c-0.265 0.264-0.396 0.585-0.396 0.961v25.543c0 0.4 0.1 0.7 0.4 1 c0.263 0.3 0.6 0.4 1 0.395h0.453c0.376 0 0.695-0.13 0.96-0.395c0.266-0.265 0.396-0.585 0.396-0.962V24.881 c0-0.376-0.131-0.697-0.396-0.961C84.668 23.7 84.3 23.5 84 23.525z" style="fill: #006957"/>
</symbol>
</svg>
<div class="advert_page">
<div class="container">
<div id="custom">
......@@ -36,61 +36,7 @@
</symbol>
</svg>
<?php
$type = get_post_type( get_the_ID() );
/*
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<?php
include 'content/meta.html';
?>
<?php
include 'content/icons.html';
?>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<header role="banner" class="l-header">
<a href="/" class="c-logo" title="">
<?php include 'content/logo.svg'; ?>
</a>
</header>
<nav role="navigation" class="l-nav">
<ul class="o-nav c-nav">
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link is-nav-link-active">Lorem ispum</a>
</li>
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link">Noster apster</a>
</li>
</ul>
</nav>
*/
?>
<?php
if ($type == 'page'):
?>
<div id="main" class="main">
......@@ -237,23 +183,53 @@
<div id="content">
<?php elseif ($type == 'job'): ?>
<div class="advert_page">
<?php
/*
<div class="container">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<div id="custom">
<?php
include 'content/meta.html';
?>
<div class="biuro-header">
<div class="logo">
<a href="<?php echo pll_home_url(); ?>" title="<?php echo get_the_title( get_option('page_on_front') ); ?>">
<svg width="133px" height="78px">
<use xlink:href="#biuro-logo"></use>
</svg>
<?php
include 'content/icons.html';
?>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<header role="banner" class="l-header">
<a href="/" class="c-logo" title="">
<?php include 'content/logo.svg'; ?>
</a>
</div>
<p>BIURO - padedame, kai labiausiai reikia. Paprastas ir greitas laikinasis įdarbinimas.</p>
</div>
</header>
<?php endif; ?>
<nav role="navigation" class="l-nav">
<ul class="o-nav c-nav">
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link is-nav-link-active">Lorem ispum</a>
</li>
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link">Noster apster</a>
</li>
</ul>
</nav>
*/
?>
......@@ -15,10 +15,12 @@
// debug( ( 'where' ) );
//get current item
$slug = pods_var( 'last', 'url' );
//get pods object for current item
$pods = pods( 'job', $slug );
// $slug = pods_v( 'last', 'url' );
debug( $pods->fetch() );
// echo '<p><b>slug:</b> ' . $slug . '</p>';
// //get pods object for current item
// $pods = pods( 'job' );
// debug( $pods->data() );
?>
......@@ -17,17 +17,6 @@
get_header(); ?>
<?php
if (get_post_type( get_the_ID() ) == 'job'):
?>
<div class="biuro-title">
<h1><span>IEŠKOME UŽSAKYMŲ KOMPLEKTUOTOJŲ! GALIMYBĖ UŽSIDIRBTI 1020 EUR Į RANKAS!</span></h1>
</div>
<?php
endif;
?>
<?php
while ( have_posts() ) :
......@@ -41,21 +30,29 @@ get_header(); ?>
<?php
/*
<main class="l-main" role="main">
<h1>index.php</h1>
<p>main</p>
<hr >
<!--
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-116106305-1"></script>
<script>
// window.dataLayer = window.dataLayer || [];
// function gtag(){dataLayer.push(arguments);}
// gtag('js', new Date());
// gtag('config', 'UA-116106305-1');
</script>
-->
<?php the_title( '<h1>', '</h1>' ); ?>
<?php the_content(); ?>
</main>
<footer role="contentinfo" class="l-footer">
footer goes here
</footer>
<aside role="complementary" class="l-aside">
<p>aside</p>
</aside>
<?php wp_footer(); ?>
<script src="/wp-content/themes/biuro/js/main.js" async></script>
</body>
</html>
*/
?>
<?php get_footer();
<?php
/**
* Template Name: Jobs listing
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<?php
// Use for search
// https://pods.io/docs/code/pods/find/
while ( have_posts() ) :
the_post();
the_content();
endwhile;
?>
<?php
$ID = get_the_ID();
$keys = get_post_custom_keys();
$taxonomies = array();
foreach ( $keys as $key => $value ) {
$val = trim($value);
$taxonomy = substr($val, 20);
if ( '_' == $val{0} || substr($val, 0, 20) != 'built_in_taxonomies_' || !$taxonomy):
continue;
endif;
$res = get_post_custom_values( $val, $ID );
if ( !$res ) {
continue;
}
$term = $res[0];
if ( !$term ) {
continue;
}
$taxonomies[] = array(
'taxonomy' => $taxonomy,
'field' => 'slug',
'terms' => $term
);
}
$jobs = get_posts( array(
'posts_per_page' => -1,
'post_type' => 'job',
'tax_query' => $taxonomies
) );
// debug($jobs);
foreach ($jobs as $job) :
echo '<h3><a href="' . get_post_permalink( $job->ID ) . '" target="_blank">' . $job->post_title . '</a></h3>';
endforeach;
?>
<?php get_footer();
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header('job'); ?>
<div class="biuro-header">
<div class="logo">
<a href="<?php echo pll_home_url(); ?>" title="<?php echo get_the_title( get_option('page_on_front') ); ?>">
<svg width="133px" height="78px">
<use xlink:href="#biuro-logo"></use>
</svg>
</a>
</div><!-- .logo -->
<p>BIURO - padedame, kai labiausiai reikia. Paprastas ir greitas laikinasis įdarbinimas.</p>
</div><!-- .biuro-header -->
<?php
while ( have_posts() ) :
?>
<div class="biuro-title">
<h1><span><?php the_title(); ?></span></h1>
</div><!-- .biuro-title -->
<?php
the_post();
the_content();
endwhile;
?>
<?php get_footer('job');
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