{{-- Title: Fullwidth-launch Description: Fullwidth launch component for homepage Category: formatting Icon: columns Keywords: highlight banner Mode: edit Align: left PostTypes: page post SupportsAlign: full SupportsMode: true SupportsMultiple: true EnqueueStyle: EnqueueScript: EnqueueAssets: --}} @php $id = uniqid(); $title = get_field('title'); $description = get_field('description'); $description = strip_tags($description,'


'); $image = get_field('image'); $link = get_field('link'); $chime = get_field('chime'); $changemakers = get_field('changemakers'); $remove_link = get_field('remove_link'); $changemakers_image_first = get_field('image_first'); $exception = get_field('custom_position'); $alt = str_replace(['

', '

'], '', get_field('alt_cover')); if (!$link) { return; } $path = parse_url($link['url'], PHP_URL_PATH); $pathArray = explode("/", $path); $lastPath = $pathArray[count($pathArray) - 2]; $pageDest = ''; $name = ''; if (strpos($path,'/categoria/') !== false or strpos($path,'/category/') !== false) { do_action('disable_wpml_auto_id'); $enId = apply_filters( 'wpml_object_id', get_category_by_slug($lastPath)->term_id, 'category', true, 'en-gb'); $pageDest = get_category($enId); $name = $pageDest->name; do_action('enable_wpml_auto_id'); } else { do_action('disable_wpml_auto_id'); $enId = apply_filters( 'wpml_object_id', get_page_by_path($path)->ID, 'post', true, 'en-gb'); $pageDest = get_page($enId); $name = $pageDest->post_title; do_action('enable_wpml_auto_id'); } @endphp