2017 © Pedro Peláez
 

library wp-acf

Helper functions for working with Advanced Custom Fields

image

moxie-leean/wp-acf

Helper functions for working with Advanced Custom Fields

  • Tuesday, April 5, 2016
  • by mitogh
  • Repository
  • 3 Watchers
  • 0 Stars
  • 458 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 0 Forks
  • 6 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

ACF

Helper functions for working with the Advanced Custom Fields plugin., (*1)

Getting Started

The easiest way to install this package is by using composer from your terminal:, (*2)

composer require moxie-leean/acf --save

Or by adding the following lines on your composer.json file, (*3)

"require": {
  "moxie-leean/acf": "dev-master"
}

This will download the files from the packagelist site and set you up with the latest version located on master branch of the repository., (*4)

After that you can include the autoload.php file in order to be able to autoload the class during the object creation., (*5)

include '/vendor/autoload.php';

Usage

The module provides a class with a number of helper functions., (*6)

Except for is_active all functions return null if the ACF plugin is not active, otherwise they will return the value of the field., (*7)

For repeater fields they will return an empty array if there are no items., (*8)

\Leean\Acf::is_active()

Returns true if the ACf plugin is installed and active. False if not., (*9)

\Leean\Acf::get_post_field( $field, $post_id )

  • $field: The ACF field key or name. Note that ACF recommend always using the key.
  • $post_id: The id of the post, or the current post in the loop if left out.

\Leean\Acf::get_comment_field( $field, $comment )

  • $field: The ACF field key or name. Note that ACF recommend always using the key.
  • $comment: The id of the comment or the WP_Comment object.

\Leean\Acf::get_attachment_field( $field, $attachment_id )

  • $field: The ACF field key or name. Note that ACF recommend always using the key.
  • $attachment_id: The id of the attachment.

\Leean\Acf::function get_taxonomy_field( $field, $taxonomy_term )

  • $field: The ACF field key or name. Note that ACF recommend always using the key.
  • $taxonomy_term: The id of the taxonomy term or the WP_Term object.

\Leean\Acf::get_user_field( $field, $user_id )

  • $field: The ACF field key or name. Note that ACF recommend always using the key.
  • $comment: The id of the user.

\Leean\Acf::get_widget_field( $field, $widget_id )

  • $field: The ACF field key or name. Note that ACF recommend always using the key.
  • $widget_id: The id of the widget.

\Leean\Acf::get_option_field( $field )

  • $field: The ACF field key or name. Note that ACF recommend always using the key.

The Versions

05/04 2016

dev-master

9999999-dev https://github.com/moxie-leean/wp-acf

Helper functions for working with Advanced Custom Fields

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Crisoforo Gaspar
by Adam Fenton

wordpress acf

05/04 2016

0.4.4

0.4.4.0 https://github.com/moxie-leean/wp-acf

Helper functions for working with Advanced Custom Fields

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Crisoforo Gaspar
by Adam Fenton

wordpress acf

05/04 2016

dev-filter-fix

dev-filter-fix https://github.com/moxie-leean/wp-acf

Helper functions for working with Advanced Custom Fields

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Crisoforo Gaspar
by Adam Fenton

wordpress acf

31/03 2016

0.4.3

0.4.3.0 https://github.com/moxie-leean/wp-acf

Helper functions for working with Advanced Custom Fields

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Crisoforo Gaspar
by Adam Fenton

wordpress acf

30/03 2016

0.4.2

0.4.2.0 https://github.com/moxie-leean/wp-acf

Helper functions for working with Advanced Custom Fields

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Crisoforo Gaspar
by Adam Fenton

wordpress acf

29/03 2016

0.4.1

0.4.1.0 https://github.com/moxie-leean/wp-acf

Helper functions for working with Advanced Custom Fields

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Crisoforo Gaspar
by Adam Fenton

wordpress acf

28/03 2016

0.4.0

0.4.0.0 https://github.com/moxie-leean/wp-acf

Helper functions for working with Advanced Custom Fields

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Crisoforo Gaspar
by Adam Fenton

wordpress acf

22/03 2016

0.3.0

0.3.0.0 https://github.com/moxie-leean/wp-acf

Helper functions for working with Advanced Custom Fields

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Adam Fenton

wordpress acf

14/02 2016

0.2.0

0.2.0.0 https://github.com/moxie-leean/acf

Helper functions for working with Advanced Custom Fields

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Adam Fenton

wordpress acf

14/02 2016

0.1.0

0.1.0.0 https://github.com/moxie-leean/acf

Helper functions for working with Advanced Custom Fields

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Adam Fenton

wordpress acf