{"id":38849,"date":"2015-09-18T01:46:16","date_gmt":"2015-09-18T01:46:16","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/acf-link-picker-field\/"},"modified":"2016-12-07T22:41:01","modified_gmt":"2016-12-07T22:41:01","slug":"acf-link-picker-field","status":"closed","type":"plugin","link":"https:\/\/bn.wordpress.org\/plugins\/acf-link-picker-field\/","author":14464769,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.8","stable_tag":"trunk","tested":"4.8.28","requires":"3.5","requires_php":"","requires_plugins":"","header_name":"Advanced Custom Fields: Link Picker","header_author":"","header_description":"","assets_banners_color":"","last_updated":"2016-12-07 22:41:01","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/ahebrank\/ACF-Link-Picker-Field","header_author_uri":"http:\/\/biostall.com","rating":5,"author_block_rating":0,"active_installs":700,"downloads":17093,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog","faq"],"tags":[],"upgrade_notice":{"1.1":"<p>Adds target attribute preservation<\/p>","1.0.3":"<p>Adds German translation support<\/p>","1.0.2":"<p>Adds WP 4.2+ support<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"2"},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":"1552098","resolution":"","location":"assets"}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.0","1.1.1","1.1.2","1.2","1.2.1","1.2.2","1.2.3","1.2.5","1.2.6","1.2.7","1.2.8"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":"1673357","resolution":"1","location":"plugin"},"screenshot-2.jpg":{"filename":"screenshot-2.jpg","revision":"1673357","resolution":"2","location":"plugin"},"screenshot-4.jpg":{"filename":"screenshot-4.jpg","revision":"1673357","resolution":"4","location":"plugin"},"screenshot-3.jpg":{"filename":"screenshot-3.jpg","revision":"1673357","resolution":"3","location":"plugin"}},"screenshots":[]},"plugin_section":[],"plugin_tags":[2211,2267,2217,2266,2265],"plugin_category":[59],"plugin_contributors":[82685,84000],"plugin_business_model":[],"class_list":["post-38849","plugin","type-plugin","status-closed","hentry","plugin_tags-acf","plugin_tags-acf-link-picker","plugin_tags-advanced-custom-fields","plugin_tags-link-chooser","plugin_tags-link-picker","plugin_category-utilities-and-tools","plugin_contributors-biostall","plugin_contributors-caalami","plugin_committers-caalami"],"banners":[],"icons":{"svg":"https:\/\/ps.w.org\/acf-link-picker-field\/assets\/icon.svg?rev=1552098","icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/acf-link-picker-field.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/acf-link-picker-field\/trunk\/screenshot-1.jpg?rev=1673357","caption":""},{"src":"https:\/\/ps.w.org\/acf-link-picker-field\/trunk\/screenshot-2.jpg?rev=1673357","caption":""},{"src":"https:\/\/ps.w.org\/acf-link-picker-field\/trunk\/screenshot-3.jpg?rev=1673357","caption":""},{"src":"https:\/\/ps.w.org\/acf-link-picker-field\/trunk\/screenshot-4.jpg?rev=1673357","caption":""}],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>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.<\/p>\n\n<p>Note: Advanced Custom Fields must be installed for this add-on to work.<\/p>\n\n<h3>Compatibility<\/h3>\n\n<p>This ACF field type is compatible with:<\/p>\n\n<ul>\n<li>ACF 5<\/li>\n<li>ACF 4<\/li>\n<\/ul>\n\n<p><em>ACF 4 support is deprecated, and new plugin features will generally not work with ACF 4.<\/em><\/p>\n\n<h3>Usage<\/h3>\n\n<p>When outputting the link selection on the front end, you will have three object elements available:<\/p>\n\n<ul>\n<li>url - The URL of the page<\/li>\n<li>title - The title of the link, if entered<\/li>\n<li>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.<\/li>\n<li>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.<\/li>\n<\/ul>\n\n<p>Code example:<\/p>\n\n<pre><code>$mylink = get_field('mylink');\nvar_dump($mylink);\n<\/code><\/pre>\n\n<p>Outputs:<\/p>\n\n<pre><code>array(3) {\n  [\"url\"]=&gt;\n  string(31) \"http:\/\/mysite.com\/selected\/url\/\"\n  [\"title\"]=&gt;\n  string(10) \"Link Title\"\n  [\"target\"]=&gt;\n  string(6) \"_blank\"\n  [\"postid\"]=&gt;\n  int 2231\n}\n<\/code><\/pre>\n\n<!--section=installation-->\n<ol>\n<li>Copy the <code>acf-link_picker<\/code> folder into your <code>wp-content\/plugins<\/code> folder<\/li>\n<li>Activate the 'Advanced Custom Fields: Link Picker' plugin via the plugins admin page<\/li>\n<li>Create a new field via ACF and select the Link Picker type<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.2.8<\/h4>\n\n<ul>\n<li>Some additional compatibility checks for ACF 4 (disable post ID lookups to suppress JS errors)<\/li>\n<\/ul>\n\n<h4>1.2.7<\/h4>\n\n<ul>\n<li>Enqueue wysiwyg assets if needed (thanks, <a href=\"https:\/\/github.com\/dmarkowicz\">dmarkowicz<\/a>)<\/li>\n<\/ul>\n\n<h4>1.2.6<\/h4>\n\n<ul>\n<li>Bugfix: revert setting empty values<\/li>\n<\/ul>\n\n<h4>1.2.5<\/h4>\n\n<ul>\n<li>Multiple fixes from <a href=\"https:\/\/github.com\/Jontis00\">Jontis00<\/a>, including:\n\n<ul>\n<li>Set a default (empty) value for the field<\/li>\n<li>Refactor the post ID lookup<\/li>\n<li>Add sv_SE translations<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h4>1.2.3<\/h4>\n\n<ul>\n<li>Make the link class a little more distinctive -- thanks, <a href=\"https:\/\/github.com\/dmarkowicz\">dmarkowicz<\/a><\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>New handlers for the updated link picker with WP 4.5.<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Attempt to add a post ID ($link[\"postid\"]) to the field data<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>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.<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Add NL translation support from <a href=\"https:\/\/github.com\/vjanssens\">vjanssens<\/a><\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Add PT translation support from <a href=\"https:\/\/github.com\/alvarogois\">alvarogois<\/a><\/li>\n<li>Bump compatibility information<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Bump version, preserve _blank target if set from <a href=\"https:\/\/github.com\/philmprice\">philmprice<\/a><\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Translation support from <a href=\"https:\/\/github.com\/m0n0mind\">m0n0mind<\/a><\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Forked by ahebrank and refactored, updated for compatibility with WP 4.2<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Solve bug with repeater fields (credit to Willy Bahuaud http:\/\/wabeo.fr\/)<\/li>\n<li>Solve problem with empty values (credit to Willy Bahuaud http:\/\/wabeo.fr\/)<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial Release.<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ol>\n<li>Copy the <code>acf-link_picker<\/code> folder into your <code>wp-content\/plugins<\/code> folder<\/li>\n<li>Activate the 'Advanced Custom Fields: Link Picker' plugin via the plugins admin page<\/li>\n<li>Create a new field via ACF and select the Link Picker type<\/li>\n<\/ol><\/dd>\n\n<\/dl>","raw_excerpt":"Adds an Advanced Custom Field field that allows the selection of a link utilising the WordPress link picker modal dialog","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/38849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=38849"}],"author":[{"embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/caalami"}],"wp:attachment":[{"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=38849"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=38849"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=38849"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=38849"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=38849"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=38849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}