'', 'id' => '', 'title' => '' ); $args = wp_parse_args( $args, $defaults ); if ( $postId === true ) { $link = get_sub_field( $selector ); } else { $link = get_field( $selector, $postId ); } if ( empty( $link ) or !is_array( $link ) ) { return false; } $output = ''.$link['title'].''; $output = apply_filters( 'acf_snippet_get_link', $output ); return $output; } function acf_snippet_the_link( $selector = '', $postId = false, $args = null ) { echo acf_snippet_get_link( $selector, $postId, $args ); }