GithubHelp home page GithubHelp logo

sectsect / cfs-post2post Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 17 KB

Automatic Two Way (Bidirectional) Relationships on Custom Field Suite

License: GNU Lesser General Public License v3.0

JavaScript 24.76% PHP 72.52% CSS 2.72%
cfs custom-fields custom-field-suite relationship two-way bidirectional wordpress

cfs-post2post's Introduction

CFS Post 2 Post

Creates two way (bidirectional) relationships in Custom Field Suite.

This plugin does not create a new type of field or any admin interface. This plugin when used as explained below makes the existing CFS Relationship work bi-directionaly, automatically updating the relationship field on the other end of the relationship.

This plugin is inspired by Hube2's Post 2 Post for ACF

Requirements

Installation

  1. cd /path-to-your/wp-content/plugins/
  2. git clone [email protected]:sectsect/cfs-post2post.git
  3. Activate the plugin through the 'Plugins' menu in WordPress.

That's it:ok_hand:

TIP

  • The field name must be the same on all posts. In other words if you want to have different post types be related then you must add a field with the same field name on both post types.
  • If you want to apply to some existing posts, Resave the post.

Overwrite Settings

If the field in a related post, whether it is a relationship field that has a maximum number of related posts, if the field in the related post already has the maximum number of values allowed then, by default, a new value will not be added. You can override this default by specifying overwrite settings.

You can access the Overwrite setting by going to Field Groups -> CFS Post 2 Post. And select overwrite type.

  • Do not overwrite
  • First Element
  • Last Element

The value selected in the field is deleted and the new value is added to the end.
๐Ÿ“ Also automatically removing the relationship field on the other end of the removed relationship.

NOTES for Developer

  • This Plugin does not hosting on the wordpress.org repo in order to prevent a flood of support requests from wide audience.

Change log

  • 1.0.1 - Change the page-type for setting to the sub-menu page
  • 1.0.0 - Initial Release

License

See LICENSE file.

Related Plugin

I have some plugins for Custom Field Suite.

cfs-post2post's People

Contributors

sectsect avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.