| 1 | <?php |
||
| 8 | class Gravity_Form_Field extends Select_Field { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Whether the Gravity Forms plugin is installed and activated. |
||
| 12 | * |
||
| 13 | * @return bool |
||
| 14 | */ |
||
| 15 | public function is_plugin_active() { |
||
| 16 | if ( class_exists( '\RGFormsModel' ) && method_exists( '\RGFormsModel', 'get_forms' ) ) { |
||
| 17 | return true; |
||
| 18 | } |
||
| 19 | |||
| 20 | return false; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * {@inheritDoc} |
||
| 25 | */ |
||
| 26 | protected function load_options() { |
||
| 27 | return $this->get_gravity_form_options(); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Set the available forms as field options |
||
| 32 | * |
||
| 33 | * @return array |
||
| 34 | */ |
||
| 35 | protected function get_gravity_form_options() { |
||
| 56 | |||
| 57 | /** |
||
| 58 | * {@inheritDoc} |
||
| 59 | */ |
||
| 60 | public function to_json( $load ) { |
||
| 64 | } |
||
| 65 |