Giter Club home page Giter Club logo

bb-fields's Introduction

BB-fields

A few additional fields for Beaver Builder modules. Each field has a prefix of zestsms- to avoid conflict if the BB crew adds these fields later. Please see example-module.php

Feel free to modify or send a pull request.

Usage

Place the fields directory inside your plugin (recommended) or theme and include the following code before your module:

define('ZESTSMS_FIELDS_DIR', realpath(dirname(__FILE__)) . '/fields/');
define('ZESTSMS_FIELDS_URL', realpath(dirname(__FILE__)) . '/fields/');

$bb_plugin_fields = array(
  'datepicker/zestsms-datepicker.php'
  ,'geocomplete/zestsms-geocomplete.php'
  ,'pdf/zestsms-pdf.php'
  ,'timepicker/zestsms-timepicker.php'
  ,'timespan/zestsms-timespan.php'
  ,'wp-dropdown/zestsms-wp-dropdown.php'
);


function zestsms_load_custom_bb_files() {
  global $bb_plugin_fields;
  if(class_exists('FLBuilder') && is_array($bb_plugin_fields)) {
    foreach($bb_plugin_fields as $field) { echo ZESTSMS_FIELDS_DIR . $field . ' ';
      if(file_exists( ZESTSMS_FIELDS_DIR . $field)) {
        require_once ZESTSMS_FIELDS_DIR . $field;
      }
    }
  }
}

add_action( 'init', 'zestsms_load_custom_bb_files' );

Field Descriptions

Datepicker

Display a jquery-ui datepicker field. Datepicker

Geocomplete

Displays a geocomplete field and includes a hidden field which stores the lat/lang coordinates (useful for custom google map modules). Geocomplete

PDF

Creates an upload field to upload a PDF (copied from the photo module). PDF

Timepicker

Allows the user to input time with jquery-timepicker. Timepicker

Timespan

Allows the user to input 2 times to create a timespan. Timespan

WP-Dropdown

Show a dropdown of a post type (default: page) using wp_dropdown_pages which also indents child pages. You can pass any additional arguments found in the codex (see example-module.php) WP-Dropdown

Select2

Create a field with select2. Pass your own options or allow the user to create options on the go which are stored for later -- useful repeater fields. Select2

bb-fields's People

Contributors

absowoot avatar

Watchers

James Cloos 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.