This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
jQuery(document).ready(function($) { | |
function findCommonElement(filters,classes) { | |
var result = true; | |
for(let i = 0; i < filters.length; i++) { | |
if(!classes.includes(filters[i])){ | |
result = false; | |
break; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function replacer($post_type, $field, $find, $replace, $wet){ | |
$args = array( | |
'post_type' => $post_type, | |
'posts_per_page' => -1, | |
'post_status' => 'any' | |
); | |
$the_query = new WP_Query( $args ); | |
if ($the_query->have_posts()) { | |
while ( $the_query->have_posts() ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for col in posts|batch((posts|length / 2)|round(0, 'ceil')) %} | |
<div class="col-12 col-sm-6"> | |
{% for item in col %} | |
<a href="{{ item.link }}"> | |
{{ item.title }} | |
</a> | |
{% endfor %} | |
</div> | |
{% endfor %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for POST in $(wp post list --post_type=post --category_name=tiskovky --format=ids); do wp post update $POST --post_type=tiskovky; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for POST in $(wp post list --post_type=locations --meta_key=page_subtype --meta_value=event --format=ids); do wp post update $POST --post_status=draft; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_json($url,$id){ | |
$_url = $url.$id; | |
$transient = get_transient( $_url ); | |
if(!empty($transient)){ | |
return $transient; | |
}else{ | |
$request = wp_remote_get( $_url ); | |
if( is_wp_error( $request ) ) { | |
return false; // Bail early |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for POST in $(wp post list --post_type=locations --meta_key=page_subtype --meta_value=event --format=ids); do wp post delete $POST --force; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// erase post meta | |
for id in $(wp post list –post_type=’locations’ –format=ids); do wp post meta update $id print_textarea ''; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php_flag display_startup_errors on | |
php_flag display_errors on | |
php_flag html_errors on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'base.twig' %} | |
{% import 'macro/edit-link.twig' as editLink %} | |
{% block content %} | |
{% for view in post.get_field('flexible_content') %} | |
{# guides #} | |
{% if view.acf_fc_layout == "guides" %} | |
<div class="container {{ view.acf_fc_layout }}"> | |
<div class="row"> | |
{% for item in view.guide %} |