Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devaloka/cfs-network-support
:electric_plug: [STAND-ALONE][Plugin] A Custom Field Suite add-on that adds an ability to support Network (Multisite environment).
https://github.com/devaloka/cfs-network-support
custom-fields multisite network plugin wordpress
Last synced: 27 days ago
JSON representation
:electric_plug: [STAND-ALONE][Plugin] A Custom Field Suite add-on that adds an ability to support Network (Multisite environment).
- Host: GitHub
- URL: https://github.com/devaloka/cfs-network-support
- Owner: devaloka
- License: gpl-2.0
- Created: 2016-01-30T14:37:31.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-12T02:25:44.000Z (over 7 years ago)
- Last Synced: 2024-12-03T07:17:16.618Z (about 1 month ago)
- Topics: custom-fields, multisite, network, plugin, wordpress
- Language: PHP
- Homepage:
- Size: 29.3 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# CFS Network Support
[![Latest Stable Version][stable-image]][stable-url]
[![Latest Unstable Version][unstable-image]][unstable-url]
[![License][license-image]][license-url]
[![Build Status][travis-image]][travis-url]A [Custom Field Suite][custom-field-suite] add-on plugin that adds an ability to
support Network (Multisite environment).## Installation
### Manual Installation
1. Just copy all files into `wp-content/plugins/cfs-network-support/`.
### Manual Installation (as a Must-Use plugin)
1. Just copy all files into
`wp-content/mu-plugins/cfs-network-support/`.2. Move `cfs-network-support/loader/50-cfs-network-support-loader.php`
into `wp-content/mu-plugins/`.### Installation via Composer
1. Install via Composer.
```sh
composer require devaloka/cfs-network-support
```### Installation via Composer (as a Must-Use plugin)
1. Install via Composer.
```sh
composer require devaloka/cfs-network-support
```2. Move `cfs-network-support` directory into
`wp-content/mu-plugins/`.3. Move `cfs-network-support/loader/50-cfs-network-support-loader.php`
into `wp-content/mu-plugins/`.## Usage
Just pass Site ID with `site_id` key to CFS API options.
### Get field value(s)
```php
echo CFS()->get('first_name', false, ['site_id' => 1]);
```See also [get - Custom Field Suite](http://docs.customfieldsuite.com/api/get.html).
### Save field value(s)
```php
$field_data = ['first_name' => 'Matt'];
$post_data = ['ID' => 678];CFS()->save($field_data, $post_data, ['site_id' => 1]);
```See also [save - Custom Field Suite](http://docs.customfieldsuite.com/api/save.html).
### Get reverse-related Posts
```php
$related_ids = CFS()->get_reverse_related($post->ID, [
'field_name' => 'related_events',
'post_type' => 'news',
'site_id' => 1,
]);
```See also [get\_reverse\_related - Custom Field Suite](http://docs.customfieldsuite.com/api/get_reverse_related.html).
[custom-field-suite]: https://wordpress.org/plugins/custom-field-suite/
[stable-image]: https://poser.pugx.org/devaloka/cfs-network-support/v/stable
[stable-url]: https://packagist.org/packages/devaloka/cfs-network-support[unstable-image]: https://poser.pugx.org/devaloka/cfs-network-support/v/unstable
[unstable-url]: https://packagist.org/packages/devaloka/cfs-network-support[license-image]: https://poser.pugx.org/devaloka/cfs-network-support/license
[license-url]: https://packagist.org/packages/devaloka/cfs-network-support[travis-image]: https://travis-ci.org/devaloka/cfs-network-support.svg?branch=master
[travis-url]: https://travis-ci.org/devaloka/cfs-network-support