GithubHelp home page GithubHelp logo

wpsight / wpcasa-contact-form-7 Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 5.0 638 KB

Add support for Contact Form 7 to attach property details to the contact email sent from WPCasa listing pages.

Home Page: https://docs.wpcasa.com/article/wpcasa-contact-form-7/

License: GNU General Public License v2.0

CSS 1.67% PHP 98.33%
contact-form-7 wordpress wpcasa

wpcasa-contact-form-7's People

Contributors

codestylist avatar igorchernenko92 avatar joehana avatar wschaeffer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wpcasa-contact-form-7's Issues

feature request - add agent name as tag

We needed agent name as separate info in email template. Maybe it would be nice to have as default option

wpcf7_add_form_tag( 'listing_agent_name', array( $this, 'listing_agent_name_tag' ), true );

 	/**
	 *	listing_agent_name_tag()
	 *
	 *  Add CF7 shortcode to display display name
	 *	of a listing agent in a hidden field
	 *	protected by antispambot().
	 *
	 *	@uses	get_the_author_email()
	 *	@uses	antispambot()
	 *
	 *	@since	1.0.0
	 */
	function listing_agent_name_tag( $tag ) {

		if ( ! is_object( $tag ) || empty( $tag->name ) )
			return;
	
		return '<input type="hidden" name="' . esc_attr( $tag->name ) . '" value="' . esc_attr( antispambot( get_the_author_meta( 'display_name' ) ) ) . '" />';
	
	}

Thanks

Re-structure repo

In preparation for the automatic deployment we need to do the following things:

  • wp-assets needs to get moved into a separate branch assets
  • the content of the wpcasa-contact-form-7 plugin should get moved to the root of the master branch (where the readme.md is right now)

Output only the raw title in title tag

At the moment the title gets fully included - even with the filter hooks. That's a problem since it then adds additional markup which could break emails.

problem with activation

I couldn't get this plugin to work. After some time I found that it works only with first activation.

If you deactivate it, then you need to resave WpCasa options to rid contact_form_7_listing_form_id from options.

php 7.0 WP 4.9.5 CF 7 5.0.1

Maybe this helps somebody.

Why did you break with CF7 <4.8?

Hi,

current Version of CF7 doesn't work with Wordpress 4.8 at all. So we had to downgrade CF7 to 4.7. After hours of debugging i discovered that you totaly break support for Versions < 4.8 of CF7.

Why didn't you do a simple request for the CF7 Version and decide then if $tag should be an object or an array. Like this:

function listing_agent_shortcode( $tag ) {
  $cf7 = get_plugin_data( get_home_path()."/wp-content/plugins/contact-form-7/wp-contact-form-7.php", $markup = false, $translate = false );
  if ($cf7['Version'] <= 4.7) {
    if ( ! is_array( $tag ) || empty( $tag['name'] ) )
      return;

    return '<input type="hidden" name="' . esc_attr( $tag['name'] ) . '" value="' . esc_attr( antispambot( get_the_author_meta( 'email' ) ) ) . '" />';
  } else{
    if ( ! is_object( $tag ) || empty( $tag->name ) )
      return;

    return '<input type="hidden" name="' . esc_attr( $tag->name ) .'" value="' . esc_attr( esc_url( get_permalink() ) ) . '" />';
  }
}

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.