Plugin helperΒΆ

  • creates the human-readable date for news
function time_ago( $time ){}
  • gets the related page for the $path
function get_page_by_path_and_lang($path){}
  • show fields only in appropriate language.
function cmb_only_show_for_external( $cmb ) {
        return ! pll_current_language() || endsWith($cmb->args['id'], "___" . pll_current_language()) || strpos($cmb->args['id'], "___") === false;
}