Skip to content

Commit

Permalink
WPCasa Ninja Forms 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
codestylist committed Nov 16, 2024
1 parent ab0b03f commit c99b79b
Show file tree
Hide file tree
Showing 21 changed files with 149 additions and 213 deletions.
9 changes: 0 additions & 9 deletions .gitattributes

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/action.yml

This file was deleted.

Binary file removed .wordpress-org/banner-772x250-rtl.png
Binary file not shown.
Binary file removed .wordpress-org/banner-772x250.png
Binary file not shown.
Binary file removed .wordpress-org/icon-256x256.png
Binary file not shown.
Binary file removed .wordpress-org/screenshot-1.png
Binary file not shown.
Binary file removed .wordpress-org/screenshot-2.png
Binary file not shown.
Binary file removed .wordpress-org/screenshot-3.png
Binary file not shown.
Binary file removed .wordpress-org/screenshot-4.png
Binary file not shown.
9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.

40 changes: 29 additions & 11 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
=== WPCasa Ninja Forms ===
Contributors: wpsight, simonrimkus
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZRR56U2VTPZAQ
Contributors: wpsight, kybernetikservices, mrinal013
Donate link: https://www.paypal.com/donate/?hosted_button_id=SYJNVSP2BKTQ4
Tags: real estate, realestate, ninja forms, ninjaforms, ninja, forms, contact, agent, listing, property, wpcasa
Requires at least: 4.0
Tested up to: 5.3.2
Stable tag: 1.1
Tested up to: 6.7
Stable tag: 2.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Add support for Ninja Forms plugin (v2.9) to attach property details to the contact email sent from WPCasa listing pages.
Add support for Ninja Forms plugin 3 an above to attach property details to the contact email sent from WPCasa listing pages. Support for Ninja Forms below 3 was dropped.

== Description ==

> This bridge add-on does currently NOT support the new Ninja Forms version 3.0
> This bridge add-on does support the Ninja Forms below 3.0!

The WPCasa Ninja Forms add-on is a bridge plugin for the Ninja Forms form builder (up to version 2.9) that can be used to display a contact form on single listing pages in WPCasa. The add-on makes sure that useful property information is attaced to the emails sent through the form. It also comes with a starter form that includes all the necessary fields to make your life easier.
The WPCasa Ninja Forms add-on is a bridge plugin for the Ninja Forms form builder (version 3.0 and above) that can be used to display a contact form on single listing pages in WPCasa. The add-on makes sure that useful property information is attaced to the emails sent through the form. It also comes with a starter form that includes all the necessary fields to make your life easier.

> This bridge add-on does NOT support anymore the new Ninja Forms version below 3.0

Starting with WPCasa Ninja Forms 2.0 we have dropped the support for Ninja Forms version below 3.0.

> Please notice that this plugin is an add-on for [WPCasa](https://wordpress.org/plugins/wpcasa/) and will NOT work without the core plugin.

WPCasa is a WordPress solution that provides an intuitive way to manage property listings and create first-class real estate websites.

* Website: [wpcasa.com](https://wpcasa.com)
* Demo: [demo.wpcasa.com](http://demo.wpcasa.com)
* Documentation: [docs.wpcasa.com](http://docs.wpcasa.com)
* Demo: [demo.wpcasa.com](https://demo.wpcasa.com)
* Documentation: [docs.wpcasa.com](https://docs.wpcasa.com)

== Installation ==

Expand All @@ -42,9 +46,9 @@ If you prefer to install the plugin manually, you need to download it to your lo

No, this is an add-on plugin for the WPCasa real estate framework in combination with the Ninja Forms form builder and will not work without the corresponding core plugins.

= Does this plugin support Ninja Forms 3.0? =
= Does this plugin support Ninja Forms below 3.0? =

Currently not. In order to use this plugin with WPCasa please use the Ninja Forms core plugin up to version 2.9.
Starting with version 2.0 of WPCasa Ninja Forms we have dropped the support for version below 3.0. In order to run WPCasa Ninja Forms make sure you have installed and activated at least Ninja Forms version 3.0.

== Screenshots ==

Expand All @@ -55,6 +59,10 @@ Currently not. In order to use this plugin with WPCasa please use the Ninja Form

== Changelog ==

= 2.0.0 =
* fixed guideline violations
* dropped support for Ninja Forms below 3.0

= 1.0.2 =
* Do not initiate plugin when Ninja Forms version is bigger than 2.9

Expand All @@ -66,5 +74,15 @@ Currently not. In order to use this plugin with WPCasa please use the Ninja Form

== Upgrade Notice ==

= 2.0.0 =
* With version 2.0.0 we have dropped support for Ninja Forms below 3.0.34
* A Further Ninja Form version is not supported anymore.
* If you need support for Ninja Form below 3.0.34, please do not update this plugin!

= 2.0.0 =
* With version 2.0.0 we have dropped support for Ninja Forms below 3.0.34
* Further Ninja Form version are not supported anymore.
* If you need support for Ninja Form below 3.0.34, please do not update this plugin!

= 1.0.1 =
* Fix error when Ninja Forms core plugin is not active
121 changes: 0 additions & 121 deletions entrypoint.sh

This file was deleted.

45 changes: 31 additions & 14 deletions includes/admin/class-wpsight-ninja-forms-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,31 @@ public function __construct() {
*
* @since 1.0.0
*/
public function ninja_options( $options ) {

// Prepare forms option
public function ninja_options( $options ): array {
$icon = 'dashicons dashicons-email';
$name = __( 'Ninja Forms', 'wpcasa-ninja-forms' );
// Prepare form option
$forms = array( '' => __( 'None', 'wpcasa-ninja-forms' ) );

foreach ( ninja_forms_get_all_forms() as $key => $form ) {
$id = $form['id'];
$forms[ $id ] = $form['name'];
$ninja_forms = Ninja_Forms()->form()->get_forms();

foreach ( $ninja_forms as $key => $form ) {
$id = $form->get_id();
$forms[ $id ] = $form->get_settings( 'title' );
}

$options_ninja = array(

'ninja_listing_form_pageheading' => array(
'name' => $name,
'desc' => '',
'link' => 'https://docs.wpcasa.com/article/wpcasa-ninja-forms/',
'icon' => $icon,
'id' => 'ninja_listing_form_pageheading',
'type' => 'pageheading',
'position' => 10
),

'ninja_listing_form_id' => array(
'name' => __( 'Listing Form', 'wpcasa-ninja-forms' ),
'desc' => __( 'Select the form that you want to use on listing pages.', 'wpcasa-ninja-forms' ),
Expand All @@ -62,10 +75,10 @@ public function ninja_options( $options ) {

$form_fields = array( '' => __( 'None', 'wpcasa-ninja-forms' ) );

foreach( Ninja_Forms()->form( absint( $form_id ) )->fields as $key => $field ) {
$form_field_id = $field['id'];
foreach( Ninja_Forms()->form( absint( $form_id ) )->get_fields() as $key => $field ) {
$form_field_id = $field->get_id();

if( '_hidden' == $field['type'] )
if( '_hidden' == $field->get_type() )
$form_fields[ $form_field_id ] = $field['data']['label'];
}

Expand Down Expand Up @@ -105,12 +118,16 @@ public function ninja_options( $options ) {
'type' => 'checkbox'
);

$options['ninja_forms'] = array(
__( 'Ninja Forms', 'wpcasa-ninja-forms' ),
apply_filters( 'wpsight_options_ninja', $options_ninja )
);
if ( version_compare( '1.1.0', WPSIGHT_VERSION, '<' ) ) {
$name = '<span class="' . $icon . '"></span>' . $name;
}

$options['ninja_forms'] = array(
$name,
apply_filters( 'wpsight_options_ninja', $options_ninja )
);

return $options;
return $options;

}

Expand Down
Binary file removed wp-assets/banner-772x250-rtl.png
Binary file not shown.
Binary file removed wp-assets/banner-772x250.png
Binary file not shown.
Binary file removed wp-assets/icon-256x256.png
Binary file not shown.
Binary file removed wp-assets/screenshot-1.png
Binary file not shown.
Binary file removed wp-assets/screenshot-2.png
Binary file not shown.
Binary file removed wp-assets/screenshot-3.png
Binary file not shown.
Binary file removed wp-assets/screenshot-4.png
Binary file not shown.
Loading

0 comments on commit c99b79b

Please sign in to comment.