PATH:
home
/
letacommog
/
metras
/
wp-content
/
plugins
/
wp-lastweets
/
vendor
/
htmlburger
/
carbon-fields
/
core
/
Field
<?php namespace Carbon_Fields\Field; /** * Gravity Form selection field class */ class Gravity_Form_Field extends Select_Field { /** * Whether the Gravity Forms plugin is installed and activated. * * @return bool */ public function is_plugin_active() { if ( class_exists( '\RGFormsModel' ) && method_exists( '\RGFormsModel', 'get_forms' ) ) { return true; } return false; } /** * {@inheritDoc} */ protected function load_options() { return $this->get_gravity_form_options(); } /** * Set the available forms as field options * * @return array */ protected function get_gravity_form_options() { if ( ! $this->is_plugin_active() ) { return array(); } $forms = \RGFormsModel::get_forms( null, 'title' ); if ( ! is_array( $forms ) || empty( $forms ) ) { return array(); } $options = array( '' => __( 'No form', 'carbon-fields' ), ); foreach ( $forms as $form ) { $options[ $form->id ] = $form->title; } return $options; } /** * {@inheritDoc} */ public function to_json( $load ) { $this->set_options( apply_filters( 'carbon_fields_gravity_form_options', $this->get_options() ) ); return parent::to_json( $load ); } }
[+]
..
[-] Date_Field.php
[edit]
[-] Checkbox_Field.php
[edit]
[-] Broken_Field.php
[edit]
[-] Sidebar_Field.php
[edit]
[-] Textarea_Field.php
[edit]
[-] Radio_Image_Field.php
[edit]
[-] Text_Field.php
[edit]
[-] Multiselect_Field.php
[edit]
[-] Set_Field.php
[edit]
[-] Radio_Field.php
[edit]
[-] Group_Field.php
[edit]
[-] Header_Scripts_Field.php
[edit]
[-] Oembed_Field.php
[edit]
[-] Scripts_Field.php
[edit]
[-] Hidden_Field.php
[edit]
[-] Field.php
[edit]
[-] Date_Time_Field.php
[edit]
[-] Footer_Scripts_Field.php
[edit]
[-] Time_Field.php
[edit]
[-] Image_Field.php
[edit]
[-] Gravity_Form_Field.php
[edit]
[-] Color_Field.php
[edit]
[-] Complex_Field.php
[edit]
[-] Select_Field.php
[edit]
[-] Predefined_Options_Field.php
[edit]
[-] Rich_Text_Field.php
[edit]
[-] Separator_Field.php
[edit]
[-] File_Field.php
[edit]
[-] Association_Field.php
[edit]
[-] Media_Gallery_Field.php
[edit]
[-] Map_Field.php
[edit]
[-] Html_Field.php
[edit]