See https://en.wikipedia.org/wiki/Strong_and_weak_typing on strong typing.
get_field
returns a string, maybe an array or object.
In this project I’m trying to produce strongly typed values https://github.com/szepeviktor/acf-get
Could it be http://connect.advancedcustomfields.com/index.php?t=5.7.11&p=pro&a=download&k=$KEY
?
The link to Polylang issue https://github.com/polylang/polylang/issues/154
It is possible to hook page_on_front
option during acf/location/rule_match/page_type
<?php
class ACF_Page_Type_Polylang {
// Whether we hooked page_on_front
private $filtered = false;
public function __construct() {
add_filter( 'acf/location/rule_match/page_type', array( $this, 'hook_page_on_front' ) );
}
public function hook_page_on_front( $match ) {
if ( ! $this->filtered ) {
add_filter( 'option_page_on_front', array( $this, 'translate_page_on_front' ) );
// Prevent second hooking
$this->filtered = true;
}
return $match;
}
public function translate_page_on_front( $value ) {
if ( function_exists( 'pll_get_post' ) ) {
$value = pll_get_post( $value );
}
return $value;
}
}
new ACF_Page_Type_Polylang();
Hello!
page_on_front
has still one value.
Could you help me to hook ACF to display all fields meant to be on the front page editor?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.