이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Advanced Custom Fields: Link Picker Field

설명

This add on for the already established Advanced Custom Fields plugin adds a new field type called ‘Link Picker’ which allows the user to enter a URL, or select from the existing pages. It is a thin wrapper around the link selector included with the WYSIWYG field editor.

This plugin is forked from the plugin of the same name hosted at https://github.com/BIOSTALL/ACF-Link-Picker-Field. This version is hosted at https://github.com/ahebrank/ACF-Link-Picker-Field and issues and PRs should be submitted there.

Note: Advanced Custom Fields must be installed for this add-on to work.

호환성

This ACF field type is compatible with:

  • ACF 5
  • ACF 4

ACF 4 support is deprecated, and new plugin features will generally not work with ACF 4.

사용방법

When outputting the link selection on the front end, you will have three object elements available:

  • url – The URL of the page
  • title – The title of the link, if entered
  • target – Will be either a blank string or ‘_blank’, depending on whether the user has ticked the box for the link to open in a new window/tab.
  • postid – Not available as part of wp_link, this is an ajax hack to attempt to look up the post ID of a selected link. This will return 0 if the post ID was not found.

Code example:

$mylink = get_field('mylink');
var_dump($mylink);

Outputs:

array(3) {
  ["url"]=>
  string(31) "http://mysite.com/selected/url/"
  ["title"]=>
  string(10) "Link Title"
  ["target"]=>
  string(6) "_blank"
  ["postid"]=>
  int 2231
}

스크린샷

설치

  1. Copy the acf-link_picker folder into your wp-content/plugins folder
  2. Activate the ‘Advanced Custom Fields: Link Picker’ plugin via the plugins admin page
  3. Create a new field via ACF and select the Link Picker type

FAQ

Installation Instructions
  1. Copy the acf-link_picker folder into your wp-content/plugins folder
  2. Activate the ‘Advanced Custom Fields: Link Picker’ plugin via the plugins admin page
  3. Create a new field via ACF and select the Link Picker type

후기

2018년 2월 24일
The great thing about this plugin is that the "open link in new window" works, unlike native ACF link field.
모든 2 평가 읽기

기여자 & 개발자

“Advanced Custom Fields: Link Picker Field”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Advanced Custom Fields: Link Picker Field”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.2.8

  • Some additional compatibility checks for ACF 4 (disable post ID lookups to suppress JS errors)

1.2.7

  • Enqueue wysiwyg assets if needed (thanks, dmarkowicz)

1.2.6

  • Bugfix: revert setting empty values

1.2.5

  • Multiple fixes from Jontis00, including:
    • Set a default (empty) value for the field
    • Refactor the post ID lookup
    • Add sv_SE translations

1.2.3

  • Make the link class a little more distinctive — thanks, dmarkowicz

1.2.2

  • New handlers for the updated link picker with WP 4.5.

1.2.1

  • Attempt to add a post ID ($link[“postid”]) to the field data

1.2

  • Automatically update the link title when clicking on a link. This functionality differs from the WYSIWYG link picker (which assumes highlighted text) but should be consistent with expected behavior of an ACF field.

1.1.2

1.1.1

  • Add PT translation support from alvarogois
  • Bump compatibility information

1.1

  • Bump version, preserve _blank target if set from philmprice

1.0.3

1.0.2

  • Forked by ahebrank and refactored, updated for compatibility with WP 4.2

1.0.1

  • Solve bug with repeater fields (credit to Willy Bahuaud http://wabeo.fr/)
  • Solve problem with empty values (credit to Willy Bahuaud http://wabeo.fr/)

1.0.0

  • 초기 릴리즈