Giter Site home page Giter Site logo

rodrisan / acf-website-field Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeradin/acf-website-field

0.0 1.0 0.0 180 KB

Advanced Custom Fields add-on for Website URLs, allows for website URL, title and a checkbox to open externally or internally

CSS 1.53% PHP 98.47%

acf-website-field's Introduction

=== Advanced Custom Fields - Website field add-on ===

Contributors: Jeradin, jmslbam, patrickhafner Tags: acf, acf add-on, website url, website title
Requires at least: 4.0
Tested up to: 4.0 Stable tag: 4.3

License: GPLv2 or later

License URI: http://www.gnu.org/licenses/gpl-2.0.html

== Description == Adds a Website Field to Advanced Custom Fields. Select if link should be an external link, if it should show title or the url.

This works with ACF 4 and ACF5 / ACF5Pro

This is an add-on for the Advanced Custom Fields WordPress plugin and will not provide any functionality to WordPress unless Advanced Custom Fields is installed and activated.

The Website field gives a few basic options: -Show / Hide Title (if checked to No, than the website URL will show on the front end and the title field will not be shown in the admin) -Open in Current Window - default will make all URLs open a new browser window for external sites. ( if checked to Yes, than the admin section will have a checkbox to specify if the link should open the current window.) -Return array instead of Link - default will return a formatted URL with option to return as an array.

= Source Repository on GitHub = https://github.com/Jeradin/acf-website-field

= Bugs, Questions or Suggestions = https://github.com/Jeradin/acf-website-field/issues

== Installation ==

The Website Field plugin needs to be added to your themes.

1. Download the zip file and upload as any Wordpress plugin.

== How to Use ==

<?php the_field('website')?>

will output:

<a href="http://www.example.com" target="_blank">http://www.example.com</a>

or this (if you select title option):

<a href="http://www.example.com" target="_blank">Catalog</a>

or this (if you select current window option):

<a href="http://www.example.com">Example</a>

If you have the field return an array:

get_field('website')
array(3) { 
	["title"]=> "Example" 
	["url"]=> "http://example.com" 
	["external"]=> "1" 
} 

== Frequently Asked Questions ==

= I've activated the plugin, but nothing happens! =

Make sure you have Advanced Custom Fields installed and activated. This is not a standalone plugin for WordPress, it only adds additional functionality to Advanced Custom Fields.

== Screenshots ==

  1. Website Field.
  2. Front End View.

Changelog

2.0

  • Removed Auto github updater bundle, best to install their plugin : https://github.com/afragen/github-updater
  • Moved validation to the admin section, added HTML5 validation along with basic URL validation.
  • Added placeholder text thanks @chellman
  • Now works with ACF4 & ACF5 thanks @patrickhafner
  • Fixed display of field in seamless mode

1.5.9.5

  • Fixed issue with target link and some wording updates

1.5.9

  • Fixed issue when field was required

1.5.8

  • Replaced with better auto updater code

1.5.6

  • Bug fixes

1.5.5

  • Bug fixes

1.5.1

  • Fixing blank website fields.

1.5

  • Can now return array instead of formatted link.

1.4

  • Auto Update from github!

1.2

  • Merged fixes from jmslbam
  • -slight cleanup

1.1

  • Fixed bugs
  • -trailing urls
  • -not howing up in the admin
  • -other cleanup

1.0

  • Made it an uploadable plugin

0.8

  • Updated code for ACF 4.0

0.7

  • Initial Release

acf-website-field's People

Contributors

jeradin avatar jmslbam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.