2017 © Pedro Peláez
 

library cmb2-related-links

Custom field for CMB2 which adds a releated links repeatable group field.

image

jtsternberg/cmb2-related-links

Custom field for CMB2 which adds a releated links repeatable group field.

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

CMB2 Related Links

Special CMB2 Field that allows users to add a related links repeating field group. This is not a standard field type, but instead a function you use in combination with CMB2::add_field(). Each link can be populated with existing WordPress content by clicking on the search button., (*1)

The only required parameter is the 'id' parameter, though you can override almost all of the arguments by passing them in., (*2)

This field requires the CMB2 Post Search field., (*3)

Example

// Add a related links field.
$cmb->add_field( cmb2_related_links_field( array( 'id' => 'yourprefix_related_links' ) ) );

If you are looking to bundle this field in your plugin or theme, you will need to pass the second parameter which is an array of all the translateable strings:, (*4)

$translateable = array(
    'description' => __( 'Add links, or select from related content by clicking the search icon.', 'yourtextdomain' ),
    'group_title' => __( 'Link {#}', 'yourtextdomain' ),
    'link_title'  => __( 'Title', 'yourtextdomain' ),
    'link_url'    => __( 'URL', 'yourtextdomain' ),
    'find_text'   => __( 'Find/Select related content', 'yourtextdomain' ),
);
$cmb->add_field( cmb2_related_links_field(
    array( 'id' => 'yourprefix_related_links' ),
    $translateable
) );

The Versions

30/05 2016

dev-master

9999999-dev https://github.com/jtsternberg/CMB2-Related-Links

Custom field for CMB2 which adds a releated links repeatable group field.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.2

 

wordpress meta cmb2

30/05 2016

v0.1.1

0.1.1.0 https://github.com/jtsternberg/CMB2-Related-Links

Custom field for CMB2 which adds a releated links repeatable group field.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.2

 

wordpress meta cmb2

28/03 2016

v0.1.0

0.1.0.0 https://github.com/jtsternberg/CMB2-Related-Links

Custom field for CMB2 which adds a releated links repeatable group field.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.2

 

wordpress meta cmb2