first commit
@@ -0,0 +1,118 @@
|
||||
.htcontact-form-features-area{
|
||||
margin: 10px 20px 0 2px
|
||||
}
|
||||
.htcontact-form-features-area{
|
||||
display: flex;
|
||||
}
|
||||
.htcontact-form-features-area > div{
|
||||
background: #fff;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
color: #444444;
|
||||
padding: 30px;
|
||||
box-shadow: 0 0 28px rgb(0 0 0 / 10%);
|
||||
}
|
||||
.htcontact-form-features-area > div > h2{
|
||||
font-size: 24px;
|
||||
margin-top: 0;
|
||||
}
|
||||
.htcontact-form-free-features {
|
||||
flex: 0 0 70%;
|
||||
}
|
||||
.htcontact-form-features {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
ul.htcontact-form-feature-list{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
ul.htcontact-form-feature-list li {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0 0 0 30px;
|
||||
}
|
||||
ul.htcontact-form-feature-list li::before {
|
||||
position: absolute;
|
||||
content: url(../images/icon/check.png);
|
||||
width: 15px;
|
||||
height: 20px;
|
||||
top: 4px;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
}
|
||||
a.htcontact-form-btn {
|
||||
background: #2bc48a;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
color: #fff;
|
||||
border: 1px solid #2bc48a;
|
||||
padding: 5px 5px 5px 20px;
|
||||
border-radius: 25px;
|
||||
outline: 0;
|
||||
transition: 0.4s;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
transition: 0.4s;
|
||||
}
|
||||
a.htcontact-form-btn:hover {
|
||||
background: #3aab80;
|
||||
box-shadow: 0 0 28px rgb(0 0 0 / 10%);
|
||||
}
|
||||
a.htcontact-form-btn .htcontact-form-btn-icon {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
background-color: #fff;
|
||||
border-radius: 100%;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 35px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
.htcontact-form-features-area > div.htcontact-form-pro-features {
|
||||
margin-left: 20px;
|
||||
height: 300px;
|
||||
background: #2bc48a;
|
||||
color: #fff;
|
||||
}
|
||||
.htcontact-form-features-area > div.htcontact-form-pro-features h2{
|
||||
color: #fff;
|
||||
}
|
||||
.htcontact-form-pro-features ul.htcontact-form-feature-list li::before{
|
||||
content: url(../images/icon/white-check.png);
|
||||
}
|
||||
.htcontact-form-pro-features a.htcontact-form-btn{
|
||||
background-color: #fff;
|
||||
color: #222;
|
||||
}
|
||||
.htcontact-form-pro-features a.htcontact-form-btn .htcontact-form-btn-icon{
|
||||
background-color: #2bc48a;
|
||||
}
|
||||
.htcontact-form-pro-features a.htcontact-form-btn:hover{
|
||||
color: #2bc48a;
|
||||
}
|
||||
|
||||
/*
|
||||
* Responsive CSS Here
|
||||
*/
|
||||
|
||||
/* Tablet desktop :768px. */
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
|
||||
}
|
||||
|
||||
/* small mobile :320px. */
|
||||
@media (max-width: 767px) {
|
||||
.htcontact-form-features-area {
|
||||
flex-flow: column;
|
||||
}
|
||||
.htcontact-form-pro-features {
|
||||
margin-left: 0;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Large Mobile :480px. */
|
||||
@media only screen and (min-width: 480px) and (max-width: 767px) {
|
||||
|
||||
}
|
||||
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 13 KiB |
BIN
wp-content/plugins/ht-contactform/assets/images/icon/check.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
wp-content/plugins/ht-contactform/assets/images/icon/plus.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
wp-content/plugins/ht-contactform/assets/images/icon/rating.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,159 @@
|
||||
/**
|
||||
* Plugins Install manager JS
|
||||
*/
|
||||
;( function ( $ ) {
|
||||
'use strict';
|
||||
|
||||
// Tab Menu
|
||||
$(".htrp-admin-tabs").on('click', 'a', function(e){
|
||||
e.preventDefault();
|
||||
var $this = $(this),
|
||||
$target = $this.attr('href');
|
||||
|
||||
$this.addClass('htrp-active').parent().siblings().children('a').removeClass('htrp-active');
|
||||
$( '.htrp-admin-tab-pane'+ $target ).addClass('htrp-active').siblings().removeClass('htrp-active');
|
||||
});
|
||||
|
||||
/*
|
||||
* Plugin Installation Manager
|
||||
*/
|
||||
var PluginInstallManager = {
|
||||
|
||||
init: function(){
|
||||
$( document ).on('click','.install-now', PluginInstallManager.installNow );
|
||||
$( document ).on('click','.activate-now', PluginInstallManager.activatePlugin);
|
||||
$( document ).on('wp-plugin-install-success', PluginInstallManager.installingSuccess);
|
||||
$( document ).on('wp-plugin-install-error', PluginInstallManager.installingError);
|
||||
$( document ).on('wp-plugin-installing', PluginInstallManager.installingProcess);
|
||||
},
|
||||
|
||||
/**
|
||||
* Installation Error.
|
||||
*/
|
||||
installingError: function( e, response ) {
|
||||
e.preventDefault();
|
||||
var $card = $( '.htrp-plugin-' + response.slug );
|
||||
$button = $card.find( '.button' );
|
||||
$button.removeClass( 'button-primary' ).addClass( 'disabled' ).html( wp.updates.l10n.installFailedShort );
|
||||
},
|
||||
|
||||
/**
|
||||
* Installing Process
|
||||
*/
|
||||
installingProcess: function(e, args){
|
||||
e.preventDefault();
|
||||
var $card = $( '.htrp-plugin-' + args.slug ),
|
||||
$button = $card.find( '.button' );
|
||||
$button.text( htrp_params.buttontxt.installing ).addClass( 'updating-message' );
|
||||
},
|
||||
|
||||
/**
|
||||
* Plugin Install Now
|
||||
*/
|
||||
installNow: function(e){
|
||||
e.preventDefault();
|
||||
|
||||
var $button = $( e.target ),
|
||||
$plugindata = $button.data('pluginopt');
|
||||
|
||||
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
|
||||
return;
|
||||
}
|
||||
if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) {
|
||||
wp.updates.requestFilesystemCredentials( e );
|
||||
$( document ).on( 'credential-modal-cancel', function() {
|
||||
var $message = $( '.htrp-install-now.updating-message' );
|
||||
$message.removeClass( 'updating-message' ).text( wp.updates.l10n.installNow );
|
||||
wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
|
||||
});
|
||||
}
|
||||
wp.updates.installPlugin( {
|
||||
slug: $plugindata['slug']
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* After Plugin Install success
|
||||
*/
|
||||
installingSuccess: function( e, response ) {
|
||||
var $message = $( '.htrp-plugin-' + response.slug ).find( '.button' );
|
||||
|
||||
var $plugindata = $message.data('pluginopt');
|
||||
|
||||
$message.removeClass( 'htrp-install-now installed button-disabled updated-message' )
|
||||
.addClass( 'updating-message' )
|
||||
.html( htrp_params.buttontxt.activating );
|
||||
|
||||
setTimeout( function() {
|
||||
$.ajax( {
|
||||
url: htrp_params.ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action : htrp_params.text_domain+'_ajax_plugin_activation',
|
||||
location : $plugindata['location'],
|
||||
nonce : htrp_params.nonce
|
||||
},
|
||||
} ).done( function( result ) {
|
||||
if ( result.success ) {
|
||||
$message.removeClass( 'button-primary htrp-install-now htrp-activate-now updating-message' )
|
||||
.attr( 'disabled', 'disabled' )
|
||||
.addClass( 'disabled' )
|
||||
.text( htrp_params.buttontxt.active );
|
||||
|
||||
} else {
|
||||
$message.removeClass( 'updating-message' );
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}, 1200 );
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Plugin Activate
|
||||
*/
|
||||
activatePlugin: function( e, response ) {
|
||||
e.preventDefault();
|
||||
|
||||
var $button = $( e.target ),
|
||||
$plugindata = $button.data('pluginopt');
|
||||
|
||||
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$button.addClass( 'updating-message button-primary' ).html( htrp_params.buttontxt.activating );
|
||||
|
||||
$.ajax( {
|
||||
url: htrp_params.ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action : htrp_params.text_domain+'_ajax_plugin_activation',
|
||||
location : $plugindata['location'],
|
||||
nonce : htrp_params.nonce
|
||||
},
|
||||
}).done( function( response ) {
|
||||
if ( response.success ) {
|
||||
$button.removeClass( 'button-primary htrp-install-now htrp-activate-now updating-message' )
|
||||
.attr( 'disabled', 'disabled' )
|
||||
.addClass( 'disabled' )
|
||||
.text( htrp_params.buttontxt.active );
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize PluginInstallManager
|
||||
*/
|
||||
$( document ).ready( function() {
|
||||
PluginInstallManager.init();
|
||||
});
|
||||
|
||||
} )( jQuery );
|
||||
341
wp-content/plugins/ht-contactform/blocks/block-init.php
Normal file
@@ -0,0 +1,341 @@
|
||||
<?php
|
||||
|
||||
namespace HtContactForm\Block;
|
||||
|
||||
|
||||
/**
|
||||
* analytical data store
|
||||
*/
|
||||
class Contactform_Block
|
||||
{
|
||||
/**
|
||||
* [$_instance]
|
||||
* @var null
|
||||
*/
|
||||
private static $_instance = null;
|
||||
|
||||
/**
|
||||
* [instance] Initializes a singleton instance
|
||||
* @return [Actions]
|
||||
*/
|
||||
public static function instance() {
|
||||
if ( is_null( self::$_instance ) ) {
|
||||
self::$_instance = new self();
|
||||
self::$_instance->define_constants();
|
||||
}
|
||||
return self::$_instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'enqueue_block_assets', [ $this, 'block_assets' ] );
|
||||
add_action( 'enqueue_block_editor_assets', [ $this, 'block_editor_assets' ] );
|
||||
add_action( 'init', [ $this, 'init' ] );
|
||||
add_action( 'rest_api_init', [ $this, 'register_api' ] );
|
||||
}
|
||||
|
||||
public function init(){
|
||||
|
||||
// Return early if this function does not exist.
|
||||
if ( ! function_exists( 'register_block_type' ) ) {
|
||||
return;
|
||||
}
|
||||
$this->register_block();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Block assets.
|
||||
*/
|
||||
public function block_assets() {
|
||||
|
||||
$dependencies = require_once( HTCONTACTFORM_BLOCK_PATH . '/build/htcontactform-block.asset.php' );
|
||||
|
||||
wp_enqueue_script(
|
||||
'ht-contactform-blocks',
|
||||
HTCONTACTFORM_BLOCK_URL . '/build/htcontactform-block.js',
|
||||
$dependencies['dependencies'],
|
||||
$dependencies['version'],
|
||||
true
|
||||
);
|
||||
|
||||
wp_enqueue_style(
|
||||
'ht-contactform-block-style',
|
||||
HTCONTACTFORM_BLOCK_URL . '/src/assets/css/style-index.css',
|
||||
array(),
|
||||
HTCONTACTFORM_VERSION
|
||||
);
|
||||
|
||||
wp_localize_script(
|
||||
'ht-contactform-blocks',
|
||||
'htcontactdata',
|
||||
[
|
||||
'pluginDirPath' => plugin_dir_path( __DIR__ ),
|
||||
'pluginDirUrl' => plugin_dir_url( __DIR__ ),
|
||||
'security' => wp_create_nonce('htcontactform-nonce'),
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Block editor assets.
|
||||
*/
|
||||
public function block_editor_assets() {
|
||||
wp_enqueue_style( 'ht-contactform-block-editor-style', HTCONTACTFORM_BLOCK_URL . '/src/assets/css/editor-style.css', false, HTCONTACTFORM_VERSION, 'all' );
|
||||
}
|
||||
|
||||
private function register_block(){
|
||||
|
||||
ob_start();
|
||||
include HTCONTACTFORM_BLOCK_PATH . '/src/ht-contactform-block/block.json';
|
||||
$attributes = json_decode( ob_get_clean(), true );
|
||||
|
||||
register_block_type(
|
||||
'block/ht-contactform', array(
|
||||
'render_callback' => [ $this, 'render_content' ],
|
||||
'attributes' => $attributes,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the required plugin constants
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function define_constants() {
|
||||
$this->define( 'HTCONTACTFORM_BLOCK_FILE', __FILE__ );
|
||||
$this->define( 'HTCONTACTFORM_BLOCK_PATH', __DIR__ );
|
||||
$this->define( 'HTCONTACTFORM_BLOCK_URL', plugins_url( '', HTCONTACTFORM_BLOCK_FILE ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define constant if not already set
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|bool $value
|
||||
* @return type
|
||||
*/
|
||||
private function define( $name, $value ) {
|
||||
if ( ! defined( $name ) ) {
|
||||
define( $name, $value );
|
||||
}
|
||||
}
|
||||
|
||||
public function render_content($attr){
|
||||
|
||||
if(isset($attr['formId']) && !empty($attr['formId'])){
|
||||
$block_uniqueid = '#ht-block-'.$attr['blockUniqId'];
|
||||
ob_start();
|
||||
echo '<div id="ht-block-'.$attr['blockUniqId'].'">';
|
||||
echo do_shortcode( '[contact-form-7 id="'.$attr['formId'].'"]' );
|
||||
echo "</div>";
|
||||
?>
|
||||
<style type="text/css">
|
||||
<?php echo $block_uniqueid; ?>{
|
||||
<?php echo $this->dimentation($attr,'areaMargin','','margin'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input:not([type="checkbox"]):not([type="submit"]),<?php echo $block_uniqueid; ?> .wpcf7 textarea{
|
||||
<?php echo $this->generate_css($attr,'inputBackground','','background'); ?>
|
||||
<?php echo $this->generate_css($attr,'inputTextColor','','color'); ?>
|
||||
<?php echo $this->dimentation($attr,'inputPadding','','padding'); ?>
|
||||
<?php echo $this->dimentation($attr,'inputMargin','','margin'); ?>
|
||||
<?php
|
||||
$border = $attr['borderWidth'] ? $attr['borderWidth'].'px'.' '.$attr['borderType'].' '.$attr['borderColor'] : '';
|
||||
echo $this->generate_css($attr, $border, '', 'border');
|
||||
?>
|
||||
<?php echo $this->dimentation($attr,'inputBorderRadius','','border-radius'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 label{
|
||||
<?php echo $this->generate_css($attr,'labelColor','','color'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=submit]{
|
||||
<?php echo $this->generate_css($attr,'btnBackgroundColor','','background'); ?>
|
||||
<?php echo $this->dimentation($attr,'btnTextColor','','color'); ?>
|
||||
<?php
|
||||
$btn_border = $attr['btnBorderWidth'] ? $attr['btnBorderWidth'].'px'.' '.$attr['btnBorderType'].' '.$attr['btnBorderColor'] : '';
|
||||
echo $this->generate_css($attr, $btn_border, '', 'border');
|
||||
?>
|
||||
<?php echo $this->dimentation($attr,'buttonBorderRadius','','border-radius'); ?>
|
||||
}
|
||||
|
||||
|
||||
/* Normal desktop*/
|
||||
@media (min-width: 1300px){
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=text],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=email],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=password],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=search],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=tel],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=url],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 select{
|
||||
height: <?php echo $attr['inputHight']['desktop'] ?>px;
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 textarea{
|
||||
height: <?php echo $attr['textAreaHight']['desktop'];?>px;
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input:not([type="checkbox"]):not([type="submit"]),<?php echo $block_uniqueid; ?> .wpcf7 textarea{
|
||||
<?php echo $this->generate_css($attr,'inputTextSize','desktop','font-size'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 label{
|
||||
<?php echo $this->generate_css($attr,'labelFontSize','desktop','font-size'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=submit]{
|
||||
<?php echo $this->generate_css($attr,'btnFontSize','desktop','font-size'); ?>
|
||||
<?php echo $this->dimentation($attr,'buttonPadding','desktop','padding'); ?>
|
||||
<?php echo $this->dimentation($attr,'buttonMargin','desktop','margin'); ?>
|
||||
}
|
||||
}
|
||||
|
||||
/* Normal laptop*/
|
||||
@media (min-width: 992px) and (max-width: 1299px){
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=text],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=email],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=password],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=search],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=tel],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=url],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 select{
|
||||
height: <?php echo $attr['inputHight']['laptop'] ?>px;
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 textarea{
|
||||
height: <?php echo $attr['textAreaHight']['laptop'];?>px;
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input:not([type="checkbox"]):not([type="submit"]),<?php echo $block_uniqueid; ?> .wpcf7 textarea{
|
||||
<?php echo $this->generate_css($attr,'inputTextSize','laptop','font-size'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 label{
|
||||
<?php echo $this->generate_css($attr,'labelFontSize','laptop','font-size'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=submit]{
|
||||
<?php echo $this->generate_css($attr,'btnFontSize','laptop','font-size'); ?>
|
||||
<?php echo $this->dimentation($attr,'buttonPadding','laptop','padding'); ?>
|
||||
<?php echo $this->dimentation($attr,'buttonMargin','laptop','margin'); ?>
|
||||
}
|
||||
}
|
||||
|
||||
/* Normal tablate*/
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=text],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=email],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=password],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=search],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=tel],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=url],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 select{
|
||||
height: <?php echo $attr['inputHight']['tablet'] ?>px;
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 textarea{
|
||||
height: <?php echo $attr['textAreaHight']['tablet'];?>px;
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input:not([type="checkbox"]):not([type="submit"]),<?php echo $block_uniqueid; ?> .wpcf7 textarea{
|
||||
<?php echo $this->generate_css($attr,'inputTextSize','tablet','font-size'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 label{
|
||||
<?php echo $this->generate_css($attr,'labelFontSize','tablet','font-size'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=submit]{
|
||||
<?php echo $this->generate_css($attr,'btnFontSize','tablet','font-size'); ?>
|
||||
<?php echo $this->dimentation($attr,'buttonPadding','tablet','padding'); ?>
|
||||
<?php echo $this->dimentation($attr,'buttonMargin','tablet','margin'); ?>
|
||||
}
|
||||
}
|
||||
|
||||
/* Normal mobile*/
|
||||
@media (max-width: 767px) {
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=text],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=email],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=password],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=search],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=tel],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=url],
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 select{
|
||||
height: <?php echo $attr['inputHight']['mobile'] ?>px;
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 textarea{
|
||||
height: <?php echo $attr['textAreaHight']['mobile'];?>px;
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input:not([type="checkbox"]):not([type="submit"]),<?php echo $block_uniqueid; ?> .wpcf7 textarea{
|
||||
<?php echo $this->generate_css($attr,'inputTextSize','mobile','font-size'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 label{
|
||||
<?php echo $this->generate_css($attr,'labelFontSize','mobile','font-size'); ?>
|
||||
}
|
||||
<?php echo $block_uniqueid; ?> .wpcf7 input[type=submit]{
|
||||
<?php echo $this->generate_css($attr,'btnFontSize','mobile','font-size'); ?>
|
||||
<?php echo $this->dimentation($attr,'buttonPadding','mobile','padding'); ?>
|
||||
<?php echo $this->dimentation($attr,'buttonMargin','mobile','margin'); ?>
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
return ob_get_clean();
|
||||
}else{
|
||||
return '<p class="ht-contactform-initial">'.esc_html__( "Please Select a contact form.", "ht-contactform" ).'</p>';
|
||||
}
|
||||
}
|
||||
|
||||
private function generate_css($settings, $attribute, $device, $css_attr, $important = ''){
|
||||
|
||||
if('' == $device && 'border' != $css_attr ){
|
||||
$value = !empty( $settings[$attribute] ) ? $settings[$attribute] : '';
|
||||
}else{
|
||||
$value = !empty( $settings[$attribute][$device] ) ? $settings[$attribute][$device] : '';
|
||||
}
|
||||
|
||||
if('border' == $css_attr){
|
||||
$value = $attribute;
|
||||
}
|
||||
|
||||
if( !empty( $value ) && 'NaN' !== $value ){
|
||||
$css_attr .= ":{$value}";
|
||||
return $css_attr."{$important};";
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
private function dimentation($settings, $attribute, $device, $css_attr, $important = ''){
|
||||
$dimensions = !empty( $settings[$attribute] ) ? $settings[$attribute] : array();
|
||||
if('' == $device){
|
||||
if( isset( $dimensions['top'] ) || isset( $dimensions['right'] ) || isset( $dimensions['bottom'] ) || isset( $dimensions['left'] ) ){
|
||||
$unit = empty( $dimensions['unit'] ) ? 'px' : $dimensions['unit'];
|
||||
$top = ( $dimensions['top'] !== '' ) ? $dimensions['top'].$unit : null;
|
||||
$right = ( $dimensions['right'] !== '' ) ? $dimensions['right'].$unit : null;
|
||||
$bottom = ( $dimensions['bottom'] !== '' ) ? $dimensions['bottom'].$unit : null;
|
||||
$left = ( $dimensions['left'] !== '' ) ? $dimensions['left'].$unit : null;
|
||||
$css_dimension = ( ($top != null) || ($right !=null) || ($bottom != null) || ($left != '') ) ? ( $css_attr.":{$top} {$right} {$bottom} {$left}" ) : '';
|
||||
|
||||
return $css_dimension."{$important};";
|
||||
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}else{
|
||||
if( isset( $dimensions[$device]['top'] ) || isset( $dimensions[$device]['right'] ) || isset( $dimensions[$device]['bottom'] ) || isset( $dimensions[$device]['left'] ) ){
|
||||
$unit = empty( $dimensions['unit'] ) ? 'px' : $dimensions['unit'];
|
||||
$top = ( $dimensions[$device]['top'] !== '' ) ? $dimensions[$device]['top'].$unit : null;
|
||||
$right = ( $dimensions[$device]['right'] !== '' ) ? $dimensions[$device]['right'].$unit : null;
|
||||
$bottom = ( $dimensions[$device]['bottom'] !== '' ) ? $dimensions[$device]['bottom'].$unit : null;
|
||||
$left = ( $dimensions[$device]['left'] !== '' ) ? $dimensions[$device]['left'].$unit : null;
|
||||
$css_dimension = ( ($top != null) || ($right !=null) || ($bottom != null) || ($left != '') ) ? ( $css_attr.":{$top} {$right} {$bottom} {$left}" ) : '';
|
||||
|
||||
return $css_dimension."{$important};";
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function register_api(){
|
||||
$api = new Api\Api();
|
||||
$api->register_routes();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Contactform_Block::instance();
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'ab7ab8c167d159b48fdb');
|
||||
@@ -0,0 +1,125 @@
|
||||
/**
|
||||
* #.# Editor Styles
|
||||
*
|
||||
* CSS for just Backend enqueued after style.scss
|
||||
* which makes it higher in priority.
|
||||
*/
|
||||
|
||||
.wp-block-cgb-block-ht-contactform-block {
|
||||
|
||||
}
|
||||
|
||||
h2.ht-contactform-blocks-section-title{
|
||||
margin: 0;
|
||||
padding: 10px 0 10px 10px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
margin-top: 10px;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.wpcf7 p{
|
||||
margin-top: 0px;
|
||||
margin-bottom: 1.2em !important;
|
||||
}
|
||||
|
||||
.wpcf7 input[type=text], .wpcf7 textarea,input[type=email], .wpcf7 input[type=password], .wpcf7 input[type=search], .wpcf7 input[type=tel],.wpcf7 input[type=url],.wpcf7 select{
|
||||
width:100%;
|
||||
padding: .75em;
|
||||
height: auto;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #eaeaea;
|
||||
border-radius: 2px;
|
||||
box-shadow: none;
|
||||
box-sizing: border-box;
|
||||
transition: all .2s linear;
|
||||
}
|
||||
|
||||
.wpcf7 input[type=checkbox]{
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.wpcf7 input[type=submit]{
|
||||
border-radius: 2px;
|
||||
border-color: #0170B9;
|
||||
background: #0170B9;
|
||||
color: #fff;
|
||||
padding-right: 40px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.wpcf7 label span{
|
||||
margin-top: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wp-block-selector-ht-contactform-dimensions-control{
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.wp-block-selector-ht-contactform-dimensions-control .components-panel__row{
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.wp-block-selector-ht-contactform-dimensions-control .ht-contactform-dimensions-btn-group button{
|
||||
padding: 1px 7px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.wp-block-selector-ht-contactform-dimensions-control button.components-button.has-icon {
|
||||
height: 100%;
|
||||
width: auto;
|
||||
padding: 4px 3px;
|
||||
border-radius: 0;
|
||||
border: 1px solid #222;
|
||||
}
|
||||
|
||||
.wp-block-selector-ht-contactform-dimensions-control h3{
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
.wp-block-selector-ht-contactform-dimensions-control .components-input-control{
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.wp-block-selector-ht-contactform-dimensions-control .components-input-control__backdrop{
|
||||
border-right: 0 !important;
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
.ht-contactform-panel-row-height-auto {
|
||||
min-height: inherit;
|
||||
}
|
||||
|
||||
.components-panel__row.ht-contactform-device-row {
|
||||
justify-content: start;
|
||||
}
|
||||
|
||||
.ht-contactform-device-button button.components-button {
|
||||
padding: 0 !important;
|
||||
min-width: inherit;
|
||||
height: inherit;
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
color: #222 !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.ht-contactform-device-button button.components-button span.dashicon {
|
||||
font-size: 13px;
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.ht-contactform-device-button button.components-button.is-primary {
|
||||
color: #007cba !important;
|
||||
}
|
||||
|
||||
.wp-block-block-ht-contactform p.ht-contactform-initial{
|
||||
padding: 16px 10px;
|
||||
background: #eee;
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
{
|
||||
"formId": {
|
||||
"type":"string",
|
||||
"default":""
|
||||
},
|
||||
"inputHight":{
|
||||
"type": "object",
|
||||
"default": {
|
||||
"desktop": 40,
|
||||
"laptop": 35,
|
||||
"tablet": 30,
|
||||
"mobile": 30
|
||||
}
|
||||
},
|
||||
"areaMargin": {
|
||||
"type": "object",
|
||||
"default": {
|
||||
"top":"0",
|
||||
"right":"0",
|
||||
"bottom":"0",
|
||||
"left":"0",
|
||||
"unit":"px",
|
||||
"link":"yes"
|
||||
}
|
||||
},
|
||||
"blockUniqId":{
|
||||
"type": "string",
|
||||
"default": ""
|
||||
},
|
||||
"inputTextColor":{
|
||||
"type" : "string",
|
||||
"default" : "#666"
|
||||
},
|
||||
"inputTextSize":{
|
||||
"type": "object",
|
||||
"default": {
|
||||
"desktop": "16px",
|
||||
"laptop": "14px",
|
||||
"tablet": "14px",
|
||||
"mobile": "14px"
|
||||
}
|
||||
},
|
||||
"inputBackground":{
|
||||
"type" : "string",
|
||||
"default" : "#fafafa"
|
||||
},
|
||||
"inputPadding": {
|
||||
"type": "object",
|
||||
"default": {
|
||||
"top":"8",
|
||||
"right":"8",
|
||||
"bottom":"8",
|
||||
"left":"8",
|
||||
"unit":"px",
|
||||
"link":"yes"
|
||||
}
|
||||
},
|
||||
"inputMargin": {
|
||||
"type": "object",
|
||||
"default": {
|
||||
"top":"0",
|
||||
"right":"0",
|
||||
"bottom":"0",
|
||||
"left":"0",
|
||||
"unit":"px",
|
||||
"link":"yes"
|
||||
}
|
||||
},
|
||||
"inputBorderRadius": {
|
||||
"type": "object",
|
||||
"default": {
|
||||
"top":"5",
|
||||
"right":"5",
|
||||
"bottom":"5",
|
||||
"left":"5",
|
||||
"unit":"px",
|
||||
"link":"yes"
|
||||
}
|
||||
},
|
||||
"borderType":{
|
||||
"type":"string",
|
||||
"default":"solid"
|
||||
},
|
||||
"borderWidth":{
|
||||
"type":"number",
|
||||
"default":1
|
||||
},
|
||||
"borderColor":{
|
||||
"type":"string",
|
||||
"default":"#c8c9cb"
|
||||
},
|
||||
"textAreaHight":{
|
||||
"type": "object",
|
||||
"default": {
|
||||
"desktop": 175,
|
||||
"laptop": 170,
|
||||
"tablet": 160,
|
||||
"mobile": 160
|
||||
}
|
||||
},
|
||||
"labelFontSize":{
|
||||
"type": "object",
|
||||
"default": {
|
||||
"desktop": "16px",
|
||||
"laptop": "14px",
|
||||
"tablet": "14px",
|
||||
"mobile": "14px"
|
||||
}
|
||||
},
|
||||
"labelColor":{
|
||||
"type" : "string",
|
||||
"default" : "#3a3a3a"
|
||||
},
|
||||
"buttonPadding": {
|
||||
"type": "object",
|
||||
"default": {
|
||||
"desktop":{
|
||||
"top":"10",
|
||||
"right":"40",
|
||||
"bottom":"10",
|
||||
"left":"40"
|
||||
},
|
||||
"laptop":{
|
||||
"top":"0",
|
||||
"right":"0",
|
||||
"bottom":"0",
|
||||
"left":"0"
|
||||
},
|
||||
"tablet":{
|
||||
"top":"0",
|
||||
"right":"0",
|
||||
"bottom":"0",
|
||||
"left":"0"
|
||||
},
|
||||
"mobile":{
|
||||
"top":"0",
|
||||
"right":"0",
|
||||
"bottom":"0",
|
||||
"left":"0"
|
||||
},
|
||||
"unit":"px",
|
||||
"link":"no"
|
||||
}
|
||||
},
|
||||
"buttonMargin": {
|
||||
"type": "object",
|
||||
"default": {
|
||||
"desktop":{
|
||||
"top":"10",
|
||||
"right":"0",
|
||||
"bottom":"10",
|
||||
"left":"0"
|
||||
},
|
||||
"laptop":{
|
||||
"top":"0",
|
||||
"right":"0",
|
||||
"bottom":"0",
|
||||
"left":"0"
|
||||
},
|
||||
"tablet":{
|
||||
"top":"0",
|
||||
"right":"0",
|
||||
"bottom":"0",
|
||||
"left":"0"
|
||||
},
|
||||
"mobile":{
|
||||
"top":"0",
|
||||
"right":"0",
|
||||
"bottom":"0",
|
||||
"left":"0"
|
||||
},
|
||||
"unit":"px",
|
||||
"link":"no"
|
||||
}
|
||||
},
|
||||
"buttonBorderRadius": {
|
||||
"type": "object",
|
||||
"default": {
|
||||
"top":"5",
|
||||
"right":"5",
|
||||
"bottom":"5",
|
||||
"left":"5",
|
||||
"unit":"px",
|
||||
"link":"yes"
|
||||
}
|
||||
},
|
||||
"btnBorderType":{
|
||||
"type":"string",
|
||||
"default":"none"
|
||||
},
|
||||
"btnBorderWidth":{
|
||||
"type":"number",
|
||||
"default":1
|
||||
},
|
||||
"btnBorderColor":{
|
||||
"type":"string",
|
||||
"default":"#000"
|
||||
},
|
||||
"btnBackgroundColor":{
|
||||
"type":"string",
|
||||
"default":"#0170B9"
|
||||
},
|
||||
"btnTextColor":{
|
||||
"type":"string",
|
||||
"default":"#fff"
|
||||
},
|
||||
"btnFontSize":{
|
||||
"type": "object",
|
||||
"default": {
|
||||
"desktop": "16px",
|
||||
"laptop": "14px",
|
||||
"tablet": "14px",
|
||||
"mobile": "14px"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: Contact Form 7 Widget For Elementor Page Builder & Gutenberg Blocks
|
||||
* Description: The Contact Form Widget is a elementor addons and Gutenberg blocks for WordPress.
|
||||
* Plugin URI: https://htplugins.com/
|
||||
* Author: HT Plugins
|
||||
* Author URI: https://profiles.wordpress.org/htplugins/#content-plugins
|
||||
* Version: 1.2.0
|
||||
* License: GPL2
|
||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
* Text Domain: ht-contactform
|
||||
* Domain Path: /languages
|
||||
* Elementor tested up to: 3.16.6
|
||||
* Elementor Pro tested up to: 3.16.2
|
||||
*/
|
||||
|
||||
if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
|
||||
|
||||
if ( ! function_exists('is_plugin_active')) { include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); }
|
||||
|
||||
define( 'HTCONTACTFORM_VERSION', '1.2.0' );
|
||||
define( 'HTCONTACTFORM_PL_URL', plugins_url( '/', __FILE__ ) );
|
||||
define( 'HTCONTACTFORM_PL_PATH', plugin_dir_path( __FILE__ ) );
|
||||
|
||||
if( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ){
|
||||
|
||||
// Elementor Widgets File Call
|
||||
function htcontactform_elementor_widgets(){
|
||||
include( HTCONTACTFORM_PL_PATH.'include/elementor_widgets.php' );
|
||||
}
|
||||
add_action('elementor/widgets/widgets_registered','htcontactform_elementor_widgets');
|
||||
|
||||
include( HTCONTACTFORM_PL_PATH.'blocks/block-init.php' );
|
||||
include( HTCONTACTFORM_PL_PATH.'include/class/Api.php' );
|
||||
|
||||
}
|
||||
|
||||
// Check Plugins is Installed or not
|
||||
if( !function_exists( 'htcontactform_is_plugins_active' ) ){
|
||||
function htcontactform_is_plugins_active( $pl_file_path = NULL ){
|
||||
$installed_plugins_list = get_plugins();
|
||||
return isset( $installed_plugins_list[$pl_file_path] );
|
||||
}
|
||||
}
|
||||
|
||||
// Load Plugins
|
||||
function htcontactform_load_plugin() {
|
||||
load_plugin_textdomain( 'ht-contactform' );
|
||||
|
||||
if( !is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ){
|
||||
add_action( 'admin_notices', 'htcontactform_check_contactform_status' );
|
||||
return;
|
||||
}
|
||||
}
|
||||
add_action( 'plugins_loaded', 'htcontactform_load_plugin' );
|
||||
|
||||
// Check Elementor install or not.
|
||||
function htcontactform_check_contactform_status(){
|
||||
$contactform = 'contact-form-7/wp-contact-form-7.php';
|
||||
if( htcontactform_is_plugins_active( $contactform ) ) {
|
||||
if( ! current_user_can( 'activate_plugins' ) ) {
|
||||
return;
|
||||
}
|
||||
$activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $contactform . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $contactform );
|
||||
|
||||
$message = '<p>' . __( 'HT Contact Form Addons not working because you need to activate the Contact Form 7 plugin.', 'ht-contactform' ) . '</p>';
|
||||
$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Now', 'ht-contactform' ) ) . '</p>';
|
||||
} else {
|
||||
if ( ! current_user_can( 'install_plugins' ) ) {
|
||||
return;
|
||||
}
|
||||
$install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=contact-form-7' ), 'install-plugin_contact-form-7' );
|
||||
$message = '<p>' . __( 'HT Contact Form Addons not working because you need to install the Contact Form 7 plugin', 'ht-contactform' ) . '</p>';
|
||||
$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $install_url, __( 'Install Now', 'ht-contactform' ) ) . '</p>';
|
||||
}
|
||||
echo '<div class="error"><p>' . $message . '</p></div>';
|
||||
}
|
||||
|
||||
if ( ( htcontactform_is_plugins_active( 'extension-for-cf7-pro/cf7-extensions-pro.php' ) && is_plugin_inactive( 'extension-for-cf7-pro/cf7-extensions-pro.php' ) ) || ! htcontactform_is_plugins_active( 'extension-for-cf7-pro/cf7-extensions-pro.php' ) ){
|
||||
include( HTCONTACTFORM_PL_PATH.'include/dashboard.php' );
|
||||
}
|
||||
|
||||
include( HTCONTACTFORM_PL_PATH.'include/recommended-plugins/class.recommended-plugins.php' );
|
||||
include( HTCONTACTFORM_PL_PATH.'include/recommended-plugins/recommended-plugins.php' );
|
||||
|
||||
|
||||
function htcontactform_redirection_page( $plugin ){
|
||||
if( plugin_basename( __FILE__ ) == $plugin ){
|
||||
if( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ){
|
||||
if ( ( htcontactform_is_plugins_active( 'extension-for-cf7-pro/cf7-extensions-pro.php' ) && is_plugin_inactive( 'extension-for-cf7-pro/cf7-extensions-pro.php' ) ) || ! htcontactform_is_plugins_active( 'extension-for-cf7-pro/cf7-extensions-pro.php' ) ){
|
||||
wp_redirect( admin_url("admin.php?page=htcontact-form") );
|
||||
}else{
|
||||
wp_redirect( admin_url("admin.php?page=ht-contactform_extensions") );
|
||||
}
|
||||
die();
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'activated_plugin', 'htcontactform_redirection_page' );
|
||||
79
wp-content/plugins/ht-contactform/include/class/Api.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
namespace HtContactForm\Block\Api;
|
||||
|
||||
use Exception;
|
||||
use WP_REST_Server;
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load general WP action hook
|
||||
*/
|
||||
class Api {
|
||||
|
||||
// Declare the property $namespace.
|
||||
private $namespace;
|
||||
|
||||
/**
|
||||
* The Constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->namespace = 'htcontactform/v1';
|
||||
}
|
||||
|
||||
/**
|
||||
* Resgister routes
|
||||
*/
|
||||
public function register_routes() {
|
||||
|
||||
register_rest_route( $this->namespace, 'posts',
|
||||
[
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'args' => [
|
||||
'wpnonce' => []
|
||||
],
|
||||
'callback' => [ $this, 'get_contactform_post' ],
|
||||
'permission_callback' => [ $this, 'permission_check' ],
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Api permission check
|
||||
*/
|
||||
public function permission_check() {
|
||||
if( current_user_can( 'edit_posts' ) ){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get category data
|
||||
*/
|
||||
public function get_contactform_post( $request ){
|
||||
|
||||
if ( !wp_verify_nonce( $_REQUEST['wpnonce'], 'htcontactform-nonce') ){
|
||||
return rest_ensure_response([]);
|
||||
}
|
||||
|
||||
$formlist = array();
|
||||
$forms_args = array( 'posts_per_page' => -1, 'post_type'=> 'wpcf7_contact_form' );
|
||||
$forms = get_posts( $forms_args );
|
||||
if( $forms ){
|
||||
foreach ( $forms as $form ){
|
||||
$formlist[$form->ID] = $form->post_title;
|
||||
}
|
||||
}else{
|
||||
$formlist['0'] = __('Form not found','ht-contactform');
|
||||
}
|
||||
return rest_ensure_response( $formlist );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
141
wp-content/plugins/ht-contactform/include/dashboard.php
Normal file
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
/* Active / Install Button Manager */
|
||||
function htcontactform_plugin_button( $location, $slug ){
|
||||
|
||||
if( htcontactform_is_plugins_active( $location ) ) {
|
||||
if( ! current_user_can( 'activate_plugins' ) ) { return; }
|
||||
|
||||
$activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $location . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $location );
|
||||
|
||||
$button = sprintf( '<a href="%s" class="htcontact-form-btn">%s</a>', $activation_url, __( 'Activate Now', 'ht-contactform' ) );
|
||||
|
||||
$button = sprintf( '<a href="%s" class="htcontact-form-btn"><span class="htcontact-form-btn-text">%s</span><span class="htcontact-form-btn-icon">%s</span></a>', $activation_url, __( 'Enable These Features', 'ht-contactform' ), '<img src="'.HTCONTACTFORM_PL_URL.'assets/images/icon/plus.png" alt="'.esc_attr__('Enable These Features','ht-contactform').'">' );
|
||||
|
||||
} else {
|
||||
if ( ! current_user_can( 'install_plugins' ) ) { return; }
|
||||
$install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin='.$slug ), 'install-plugin_'.$slug );
|
||||
|
||||
$button = sprintf( '<a href="%s" class="htcontact-form-btn"><span class="htcontact-form-btn-text">%s</span><span class="htcontact-form-btn-icon">%s</span></a>', $install_url, __( 'Enable These Features', 'ht-contactform' ), '<img src="'.HTCONTACTFORM_PL_URL.'assets/images/icon/plus.png" alt="'.esc_attr__('Enable These Features','ht-contactform').'">' );
|
||||
|
||||
}
|
||||
return $button;
|
||||
|
||||
}
|
||||
|
||||
/*Add Menu*/
|
||||
function htcontactform_add_menu(){
|
||||
global $submenu;
|
||||
|
||||
$menu_parent_hook = add_menu_page(
|
||||
esc_html__( 'HT Contact Form', 'ht-contactform' ),
|
||||
esc_html__( 'HT Contact Form', 'ht-contactform' ),
|
||||
'manage_options',
|
||||
'htcontact-form',
|
||||
'htcontactform_dashboard',
|
||||
'dashicons-email-alt',
|
||||
30
|
||||
);
|
||||
|
||||
add_action( 'load-' . $menu_parent_hook, 'htcontactform_init_hooks' );
|
||||
|
||||
}
|
||||
add_action( 'admin_menu', 'htcontactform_add_menu', 20 );
|
||||
|
||||
/* Menu Hook */
|
||||
function htcontactform_init_hooks() {
|
||||
add_action( 'admin_enqueue_scripts', 'htcontactform_enqueue_scripts' );
|
||||
}
|
||||
|
||||
/* Load Assets*/
|
||||
function htcontactform_enqueue_scripts() {
|
||||
wp_enqueue_style( 'htcontact-form-admin', HTCONTACTFORM_PL_URL.'assets/css/htcontact-form-admin.css', array(), '1.0.0' );
|
||||
|
||||
// Hide All Admin Notices
|
||||
echo '<style>.update-nag, .updated, .error, .is-dismissible { display: none; }</style>';
|
||||
|
||||
}
|
||||
|
||||
/* Extension Features HTML */
|
||||
function htcontactform_dashboard(){
|
||||
?>
|
||||
<div class="htcontact-form-setting-area">
|
||||
|
||||
<div class="htcontact-form-features-area">
|
||||
|
||||
<?php if ( ( htcontactform_is_plugins_active( 'extensions-for-cf7/extensions-for-cf7.php' ) && is_plugin_inactive( 'extensions-for-cf7/extensions-for-cf7.php' ) ) || ! htcontactform_is_plugins_active( 'extensions-for-cf7/extensions-for-cf7.php' ) ) : ?>
|
||||
<div class="htcontact-form-free-features">
|
||||
<h2><?php echo esc_html__( 'Enable These Features', 'ht-contactform' ); ?></h2>
|
||||
<div class="htcontact-form-features">
|
||||
|
||||
<h3><?php echo esc_html__('Contact form 7 database','ht-contactform'); ?></h3>
|
||||
<ul class="htcontact-form-feature-list">
|
||||
<li><?php echo esc_html__('Save contact form submission data and handle it through the dashboard.','ht-contactform'); ?></li>
|
||||
<li><?php echo esc_html__('Export and import CSV files easily.','ht-contactform'); ?></li>
|
||||
<li><?php echo esc_html__('Search the contact form submissions time and date wise.','ht-contactform'); ?></li>
|
||||
<li><?php echo esc_html__('Delete Submission Data.','ht-contactform'); ?></li>
|
||||
</ul>
|
||||
|
||||
<h3><?php echo esc_html__('Contact form 7 conditional field','ht-contactform'); ?></h3>
|
||||
<ul class="htcontact-form-feature-list">
|
||||
<li><?php echo esc_html__('Easily apply conditions to any field to show or hide.','ht-contactform'); ?></li>
|
||||
<li><?php echo esc_html__('Add multiple AND conditions.','ht-contactform'); ?></li>
|
||||
<li><?php echo esc_html__('Easily apply conditions with the exact value.','ht-contactform'); ?></li>
|
||||
</ul>
|
||||
|
||||
<h3><?php echo esc_html__('Contact form 7 redirection','ht-contactform'); ?></h3>
|
||||
<ul class="htcontact-form-feature-list">
|
||||
<li><?php echo esc_html__('Easily redirect to any page after form submission.','ht-contactform'); ?></li>
|
||||
<li><?php echo esc_html__('Redirect the page to a new tab.','ht-contactform'); ?></li>
|
||||
<li><?php echo esc_html__('Add specific JavaScript action.','ht-contactform'); ?></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<?php echo htcontactform_plugin_button( 'extensions-for-cf7/extensions-for-cf7.php', 'extensions-for-cf7' ); ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="htcontact-form-free-features">
|
||||
<h2><?php echo esc_html__( 'Purchase CF7 Pro Extensions', 'ht-contactform' ); ?></h2>
|
||||
<div class="htcontact-form-features">
|
||||
<ul class="htcontact-form-feature-list">
|
||||
<li><?php echo esc_html__( 'Already Submitted Notice', 'ht-contactform' ); ?></li>
|
||||
<li><?php echo esc_html__( 'Repeater Field', 'ht-contactform' ); ?></li>
|
||||
<li><?php echo esc_html__( 'Popup Form Response', 'ht-contactform' ); ?></li>
|
||||
<li><?php echo esc_html__( 'Advanced Telephone', 'ht-contactform' ); ?></li>
|
||||
<li><?php echo esc_html__( 'Acceptance Field', 'ht-contactform' ); ?></li>
|
||||
<li><?php echo esc_html__( 'Drag & Drop File Upload', 'ht-contactform' ); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="htcontact-form-btn" href="<?php echo esc_url('https://hasthemes.com/plugins/cf7-extensions/?utm_source=htcontactform&utm_medium=htcf7dashboard&utm_campaign=extension');?>" target="_blank">
|
||||
<span class="htcontact-form-btn-text"><?php echo esc_html__('Get Pro Now','ht-contactform'); ?></span>
|
||||
<span class="htcontact-form-btn-icon"><img src="<?php echo HTCONTACTFORM_PL_URL ?>assets/images/icon/plus.png" alt="<?php echo esc_attr__('Get Pro Now','ht-contactform'); ?>"></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="htcontact-form-pro-features">
|
||||
<h2><?php echo esc_html__( 'Purchase CF7 Pro Extensions', 'ht-contactform' ); ?></h2>
|
||||
<div class="htcontact-form-features">
|
||||
<ul class="htcontact-form-feature-list">
|
||||
<li><?php echo esc_html__( 'Already Submitted Notice', 'ht-contactform' ); ?></li>
|
||||
<li><?php echo esc_html__( 'Repeater Field', 'ht-contactform' ); ?></li>
|
||||
<li><?php echo esc_html__( 'Popup Form Response', 'ht-contactform' ); ?></li>
|
||||
<li><?php echo esc_html__( 'Advanced Telephone', 'ht-contactform' ); ?></li>
|
||||
<li><?php echo esc_html__( 'Acceptance Field', 'ht-contactform' ); ?></li>
|
||||
<li><?php echo esc_html__( 'Drag & Drop File Upload', 'ht-contactform' ); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="htcontact-form-action-btn">
|
||||
<a class="htcontact-form-btn" href="<?php echo esc_url('https://hasthemes.com/plugins/cf7-extensions/?utm_source=htcontactform&utm_medium=htcf7dashboard&utm_campaign=extension');?>" target="_blank">
|
||||
<span class="htcontact-form-btn-text"><?php echo esc_html__('Get Pro Now','ht-contactform'); ?></span>
|
||||
<span class="htcontact-form-btn-icon"><img src="<?php echo HTCONTACTFORM_PL_URL ?>assets/images/icon/white-plus.png" alt="<?php echo esc_attr__('Get Pro Now','ht-contactform'); ?>"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
715
wp-content/plugins/ht-contactform/include/elementor_widgets.php
Normal file
@@ -0,0 +1,715 @@
|
||||
<?php
|
||||
namespace Elementor;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
class HTContactForm_Elementor_Widget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'htcontactform-addons';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'HT Contact Form 7', 'ht-contactform' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-mail';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'general' ];
|
||||
}
|
||||
|
||||
public function htcontactform_forms(){
|
||||
$formlist = array();
|
||||
$forms_args = array( 'posts_per_page' => -1, 'post_type'=> 'wpcf7_contact_form' );
|
||||
$forms = get_posts( $forms_args );
|
||||
if( $forms ){
|
||||
foreach ( $forms as $form ){
|
||||
$formlist[$form->ID] = $form->post_title;
|
||||
}
|
||||
}else{
|
||||
$formlist['0'] = __('Form not found','ht-contactform');
|
||||
}
|
||||
return $formlist;
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'contactform_content',
|
||||
[
|
||||
'label' => __( 'Contact Form', 'ht-contactform' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'contact_form_id',
|
||||
[
|
||||
'label' => __( 'Select Form', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label_block' => true,
|
||||
'options' => $this->htcontactform_forms(),
|
||||
'default' => '0',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
// Style tab section
|
||||
$this->start_controls_section(
|
||||
'contactform_form_section_style',
|
||||
[
|
||||
'label' => __( 'Style', 'ht-contactform' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_form_section_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .htcontact-form-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_form_section_margin',
|
||||
[
|
||||
'label' => __( 'Margin', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .htcontact-form-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'contactform_form_section_background',
|
||||
'label' => __( 'Background', 'ht-contactform' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '{{WRAPPER}} .htcontact-form-wrapper',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_form_section_align',
|
||||
[
|
||||
'label' => __( 'Alignment', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'options' => [
|
||||
'left' => [
|
||||
'title' => __( 'Left', 'ht-contactform' ),
|
||||
'icon' => 'eicon-text-align-left',
|
||||
],
|
||||
'center' => [
|
||||
'title' => __( 'Center', 'ht-contactform' ),
|
||||
'icon' => 'eicon-text-align-center',
|
||||
],
|
||||
'right' => [
|
||||
'title' => __( 'Right', 'ht-contactform' ),
|
||||
'icon' => 'eicon-text-align-right',
|
||||
],
|
||||
'justify' => [
|
||||
'title' => __( 'Justified', 'ht-contactform' ),
|
||||
'icon' => 'eicon-text-align-justify',
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .htcontact-form-wrapper' => 'text-align: {{VALUE}};',
|
||||
],
|
||||
'default' => 'left',
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
// Input Field style tab start
|
||||
$this->start_controls_section(
|
||||
'contactform_contactform_input_style',
|
||||
[
|
||||
'label' => __( 'Input', 'ht-contactform' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'contactform_input_box_height',
|
||||
[
|
||||
'label' => __( 'Height', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 150,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'size' => 55,
|
||||
],
|
||||
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"]' => 'height: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"]' => 'height: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"]' => 'height: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"]' => 'height: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"]' => 'height: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"]' => 'height: {{SIZE}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap .wpcf7-select' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'contactform_input_box_background',
|
||||
[
|
||||
'label' => __( 'Background Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"]' => 'background-color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"]' => 'background-color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"]' => 'background-color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"]' => 'background-color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"]' => 'background-color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"]' => 'background-color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap .wpcf7-select' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'contactform_input_box_typography',
|
||||
'selector' => '{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap .wpcf7-select',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'contactform_input_box_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"]' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"]' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"]' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"]' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"]' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"]' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap .wpcf7-select' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'contactform_input_box_placeholder_color',
|
||||
[
|
||||
'label' => __( 'Placeholder Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"]::-webkit-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"]::-moz-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"]:-ms-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"]::-webkit-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"]::-moz-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"]:-ms-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"]::-webkit-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"]::-moz-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"]:-ms-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"]::-webkit-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"]::-moz-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"]:-ms-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"]::-webkit-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"]::-moz-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"]:-ms-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"]::-webkit-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"]::-moz-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"]:-ms-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap .wpcf7-select' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'contactform_input_box_border',
|
||||
'label' => __( 'Border', 'ht-contactform' ),
|
||||
'selector' => '{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"], {{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap .wpcf7-select',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_input_box_border_radius',
|
||||
[
|
||||
'label' => __( 'Border Radius', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"]' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"]' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"]' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"]' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"]' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"]' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap .wpcf7-select' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_input_box_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"]' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap .wpcf7-select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_input_box_margin',
|
||||
[
|
||||
'label' => __( 'Margin', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="text"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="email"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="url"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="number"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="tel"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap input[type*="date"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap .wpcf7-select' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section(); // Input Field style tab end
|
||||
|
||||
// Textarea style tab start
|
||||
$this->start_controls_section(
|
||||
'contactform_textarea_style',
|
||||
[
|
||||
'label' => __( 'Textarea', 'ht-contactform' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'contactform_textarea_box_height',
|
||||
[
|
||||
'label' => __( 'Height', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 500,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'size' => 175,
|
||||
],
|
||||
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'contactform_textarea_box_background',
|
||||
[
|
||||
'label' => __( 'Background Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'contactform_textarea_box_typography',
|
||||
'selector' => '{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'contactform_textarea_box_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'contactform_textarea_box_placeholder_color',
|
||||
[
|
||||
'label' => __( 'Placeholder Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea::-webkit-input-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea::-moz-placeholder' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea:-ms-input-placeholder' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'contactform_textarea_box_border',
|
||||
'label' => __( 'Border', 'ht-contactform' ),
|
||||
'selector' => '{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_textarea_box_border_radius',
|
||||
[
|
||||
'label' => __( 'Border Radius', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_textarea_box_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_textarea_box_margin',
|
||||
[
|
||||
'label' => __( 'Margin', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-form-control-wrap textarea' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section(); // Textarea style tab end
|
||||
|
||||
// Label style tab start
|
||||
$this->start_controls_section(
|
||||
'contactform_contactform_label_style',
|
||||
[
|
||||
'label' => __( 'Label', 'ht-contactform' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'contactform_label_background',
|
||||
[
|
||||
'label' => __( 'Background Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .htcontact-form-wrapper form.wpcf7-form label' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'contactform_label_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .htcontact-form-wrapper form.wpcf7-form label' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'contactform_label_typography',
|
||||
'selector' => '{{WRAPPER}} .htcontact-form-wrapper form.wpcf7-form label',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'contactform_label_border',
|
||||
'label' => __( 'Border', 'ht-contactform' ),
|
||||
'selector' => '{{WRAPPER}} .htcontact-form-wrapper form.wpcf7-form label',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_label_border_radius',
|
||||
[
|
||||
'label' => __( 'Border Radius', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .htcontact-form-wrapper form.wpcf7-form label' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_label_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .htcontact-form-wrapper form.wpcf7-form label' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'contactform_label_margin',
|
||||
[
|
||||
'label' => __( 'Margin', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .htcontact-form-wrapper form.wpcf7-form label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section(); // // Label style tab end
|
||||
|
||||
// Input submit button style tab start
|
||||
$this->start_controls_section(
|
||||
'contactform_inputsubmit_style',
|
||||
[
|
||||
'label' => __( 'Button', 'ht-contactform' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->start_controls_tabs('submit_style_tabs');
|
||||
|
||||
// Button Normal tab start
|
||||
$this->start_controls_tab(
|
||||
'submit_style_normal_tab',
|
||||
[
|
||||
'label' => __( 'Normal', 'ht-contactform' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'input_submit_height',
|
||||
[
|
||||
'label' => __( 'Height', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 150,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'size' => 55,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-submit' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'input_submit_typography',
|
||||
'selector' => '{{WRAPPER}} .wpcf7-form .wpcf7-submit',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'input_submit_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-submit' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'input_submit_background_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-submit' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'input_submit_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-submit' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'input_submit_margin',
|
||||
[
|
||||
'label' => __( 'Margin', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%', 'em' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-submit' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'input_submit_border',
|
||||
'label' => __( 'Border', 'ht-contactform' ),
|
||||
'selector' => '{{WRAPPER}} .wpcf7-form .wpcf7-submit',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'input_submit_border_radius',
|
||||
[
|
||||
'label' => __( 'Border Radius', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-submit' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
|
||||
],
|
||||
'separator' =>'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'htmega_input_submit_box_shadow',
|
||||
'label' => __( 'Box Shadow', 'ht-contactform' ),
|
||||
'selector' => '{{WRAPPER}} .wpcf7-form .wpcf7-submit',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab(); // Button Normal tab end
|
||||
|
||||
// Button Hover tab start
|
||||
$this->start_controls_tab(
|
||||
'submit_style_hover_tab',
|
||||
[
|
||||
'label' => __( 'Hover', 'ht-contactform' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'input_submithover_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-submit:hover' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'input_submithover_background_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'ht-contactform' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .wpcf7-form .wpcf7-submit:hover' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'input_submithover_border',
|
||||
'label' => __( 'Border', 'ht-contactform' ),
|
||||
'selector' => '{{WRAPPER}} .wpcf7-form .wpcf7-submit:hover',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab(); // Button Hover tab end
|
||||
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->end_controls_section(); // Input submit button style tab end
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected function render( $instance = [] ) {
|
||||
|
||||
$settings = $this->get_settings_for_display();
|
||||
$id = $this->get_id();
|
||||
|
||||
$this->add_render_attribute( 'htwpform_attr', 'class', 'htcontact-form-wrapper' );
|
||||
|
||||
$this->add_render_attribute( 'shortcode', 'id', $settings['contact_form_id'] );
|
||||
$shortcode = sprintf( '[contact-form-7 %s]', $this->get_render_attribute_string( 'shortcode' ) );
|
||||
|
||||
?>
|
||||
<div <?php echo $this->get_render_attribute_string('htwpform_attr'); ?> >
|
||||
<?php
|
||||
if( !empty( $settings['contact_form_id'] ) ){
|
||||
echo do_shortcode( $shortcode );
|
||||
}else{
|
||||
echo '<div class="form_no_select">' .__('Please Select contact form.','ht-contactform'). '</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
Plugin::instance()->widgets_manager->register_widget_type( new HTContactForm_Elementor_Widget() );
|
||||
@@ -0,0 +1,156 @@
|
||||
/**
|
||||
* Plugins Install manager JS
|
||||
*/
|
||||
;( function ( $ ) {
|
||||
'use strict';
|
||||
|
||||
// Tab Menu
|
||||
$(".htrp-admin-tabs").on('click', 'a', function(e){
|
||||
e.preventDefault();
|
||||
var $this = $(this),
|
||||
$target = $this.attr('href');
|
||||
|
||||
$this.addClass('htrp-active').parent().siblings().children('a').removeClass('htrp-active');
|
||||
$( '.htrp-admin-tab-pane'+ $target ).addClass('htrp-active').siblings().removeClass('htrp-active');
|
||||
});
|
||||
|
||||
/*
|
||||
* Plugin Installation Manager
|
||||
*/
|
||||
var PluginInstallManager = {
|
||||
|
||||
init: function(){
|
||||
$( document ).on('click','.install-now', PluginInstallManager.installNow );
|
||||
$( document ).on('click','.activate-now', PluginInstallManager.activatePlugin);
|
||||
$( document ).on('wp-plugin-install-success', PluginInstallManager.installingSuccess);
|
||||
$( document ).on('wp-plugin-install-error', PluginInstallManager.installingError);
|
||||
$( document ).on('wp-plugin-installing', PluginInstallManager.installingProcess);
|
||||
},
|
||||
|
||||
/**
|
||||
* Installation Error.
|
||||
*/
|
||||
installingError: function( e, response ) {
|
||||
e.preventDefault();
|
||||
var $card = $( '.htrp-plugin-' + response.slug );
|
||||
$button = $card.find( '.button' );
|
||||
$button.removeClass( 'button-primary' ).addClass( 'disabled' ).html( wp.updates.l10n.installFailedShort );
|
||||
},
|
||||
|
||||
/**
|
||||
* Installing Process
|
||||
*/
|
||||
installingProcess: function(e, args){
|
||||
e.preventDefault();
|
||||
var $card = $( '.htrp-plugin-' + args.slug ),
|
||||
$button = $card.find( '.button' );
|
||||
$button.text( htrp_params.buttontxt.installing ).addClass( 'updating-message' );
|
||||
},
|
||||
|
||||
/**
|
||||
* Plugin Install Now
|
||||
*/
|
||||
installNow: function(e){
|
||||
e.preventDefault();
|
||||
|
||||
var $button = $( e.target ),
|
||||
$plugindata = $button.data('pluginopt');
|
||||
|
||||
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
|
||||
return;
|
||||
}
|
||||
if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) {
|
||||
wp.updates.requestFilesystemCredentials( e );
|
||||
$( document ).on( 'credential-modal-cancel', function() {
|
||||
var $message = $( '.install-now.updating-message' );
|
||||
$message.removeClass( 'updating-message' ).text( wp.updates.l10n.installNow );
|
||||
wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
|
||||
});
|
||||
}
|
||||
wp.updates.installPlugin( {
|
||||
slug: $plugindata['slug']
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* After Plugin Install success
|
||||
*/
|
||||
installingSuccess: function( e, response ) {
|
||||
var $message = $( '.htrp-plugin-' + response.slug ).find( '.button' );
|
||||
|
||||
var $plugindata = $message.data('pluginopt');
|
||||
|
||||
$message.removeClass( 'install-now installed button-disabled updated-message' )
|
||||
.addClass( 'updating-message' )
|
||||
.html( htrp_params.buttontxt.activating );
|
||||
|
||||
setTimeout( function() {
|
||||
$.ajax( {
|
||||
url: htrp_params.ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action : htrp_params.text_domain+'_ajax_plugin_activation',
|
||||
location : $plugindata['location'],
|
||||
},
|
||||
} ).done( function( result ) {
|
||||
if ( result.success ) {
|
||||
$message.removeClass( 'button-primary install-now activate-now updating-message' )
|
||||
.attr( 'disabled', 'disabled' )
|
||||
.addClass( 'disabled' )
|
||||
.text( htrp_params.buttontxt.active );
|
||||
|
||||
} else {
|
||||
$message.removeClass( 'updating-message' );
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}, 1200 );
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Plugin Activate
|
||||
*/
|
||||
activatePlugin: function( e, response ) {
|
||||
e.preventDefault();
|
||||
|
||||
var $button = $( e.target ),
|
||||
$plugindata = $button.data('pluginopt');
|
||||
|
||||
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$button.addClass( 'updating-message button-primary' ).html( htrp_params.buttontxt.activating );
|
||||
|
||||
$.ajax( {
|
||||
url: htrp_params.ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action : htrp_params.text_domain+'_ajax_plugin_activation',
|
||||
location : $plugindata['location'],
|
||||
},
|
||||
}).done( function( response ) {
|
||||
if ( response.success ) {
|
||||
$button.removeClass( 'button-primary install-now activate-now updating-message' )
|
||||
.attr( 'disabled', 'disabled' )
|
||||
.addClass( 'disabled' )
|
||||
.text( htrp_params.buttontxt.active );
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize PluginInstallManager
|
||||
*/
|
||||
$( document ).ready( function() {
|
||||
PluginInstallManager.init();
|
||||
});
|
||||
|
||||
} )( jQuery );
|
||||
@@ -0,0 +1,440 @@
|
||||
<?php
|
||||
namespace Hasthemes\HTContact_Form;
|
||||
|
||||
/**
|
||||
* Recommended Plugins handlers class
|
||||
* @version 1.0.2
|
||||
*/
|
||||
class Recommended_Plugins {
|
||||
|
||||
/**
|
||||
* [$_instance]
|
||||
* @var null
|
||||
*/
|
||||
private static $_instance = null;
|
||||
|
||||
/**
|
||||
* [$plugins_allowedtags] allow tag
|
||||
* @var array
|
||||
*/
|
||||
public $plugins_allowedtags = array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'title' => array(),
|
||||
'target' => array(),
|
||||
),
|
||||
'abbr' => array( 'title' => array() ),
|
||||
'acronym' => array( 'title' => array() ),
|
||||
'code' => array(),
|
||||
'pre' => array(),
|
||||
'em' => array(),
|
||||
'strong' => array(),
|
||||
'ul' => array(),
|
||||
'ol' => array(),
|
||||
'li' => array(),
|
||||
'p' => array(),
|
||||
'br' => array(),
|
||||
);
|
||||
|
||||
/**
|
||||
* Veriable Initialize
|
||||
*/
|
||||
public $text_domain = '';
|
||||
public $parent_menu_slug = '';
|
||||
public $menu_label = '';
|
||||
public $menu_page_slug = '';
|
||||
public $menu_capability = '';
|
||||
public $menu_type = '';
|
||||
public $menu_icon = '';
|
||||
public $priority = '';
|
||||
public $hook_suffix = '';
|
||||
public $assets_url = '';
|
||||
public $tab_list = [];
|
||||
|
||||
/**
|
||||
* [instance] Initializes a singleton instance
|
||||
* @return [Recommended_Plugins]
|
||||
*/
|
||||
public static function instance( $args = [] ) {
|
||||
if ( is_null( self::$_instance ) ) {
|
||||
self::$_instance = new self( $args );
|
||||
}
|
||||
return self::$_instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* [__construct] Class construct
|
||||
*/
|
||||
function __construct( $args ) {
|
||||
|
||||
// Initialize properties
|
||||
$this->text_domain = !empty( $args['text_domain'] ) ? $args['text_domain'] : 'htrp';
|
||||
$this->parent_menu_slug = !empty( $args['parent_menu_slug'] ) ? $args['parent_menu_slug'] : 'plugins.php';
|
||||
$this->menu_type = !empty( $args['menu_type'] ) ? $args['menu_type'] : 'submenu';
|
||||
$this->menu_icon = !empty( $args['menu_icon'] ) ? $args['menu_icon'] : 'dashicons-plugins-checked';
|
||||
$this->menu_label = !empty( $args['menu_label'] ) ? $args['menu_label'] : esc_html__( 'Recommendations', $this->text_domain );
|
||||
$this->menu_capability = !empty( $args['menu_capability'] ) ? $args['menu_capability'] : 'manage_options';
|
||||
$this->menu_page_slug = !empty( $args['menu_page_slug'] ) ? $args['menu_page_slug'] : $this->text_domain . '_extensions';
|
||||
$this->priority = !empty( $args['priority'] ) ? $args['priority'] : 100;
|
||||
$this->hook_suffix = !empty( $args['hook_suffix'] ) ? $args['hook_suffix'] : '';
|
||||
$this->assets_url = !empty( $args['assets_url'] ) ? $args['assets_url'] : plugins_url( 'assets', __FILE__ );
|
||||
$this->tab_list = !empty( $args['tab_list'] ) ? $args['assets_url'] : [];
|
||||
|
||||
|
||||
add_action( 'admin_menu', [ $this, 'admin_menu' ], 20 );
|
||||
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
|
||||
|
||||
// Ajax Action
|
||||
add_action( 'wp_ajax_'.$this->text_domain.'_ajax_plugin_activation', [ $this, 'plugin_activation' ] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* [admin_menu] Add Recommended Menu
|
||||
* @return [void]
|
||||
*/
|
||||
public function admin_menu(){
|
||||
|
||||
if( $this->menu_type === 'submenu' ){
|
||||
add_submenu_page(
|
||||
$this->parent_menu_slug,
|
||||
$this->menu_label,
|
||||
$this->menu_label,
|
||||
$this->menu_capability,
|
||||
$this->menu_page_slug,
|
||||
[ $this, 'render_html' ]
|
||||
);
|
||||
}else{
|
||||
add_menu_page(
|
||||
$this->menu_label,
|
||||
$this->menu_label,
|
||||
$this->menu_capability,
|
||||
$this->menu_page_slug,
|
||||
[ $this,'render_html' ],
|
||||
$this->menu_icon,
|
||||
30
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* [enqueue_assets]
|
||||
* @param [string] $hook_suffix Current page hook
|
||||
* @return [void]
|
||||
*/
|
||||
public function enqueue_assets( $hook_suffix ) {
|
||||
if( $this->hook_suffix ){
|
||||
if( $this->hook_suffix == $hook_suffix ){
|
||||
add_thickbox();
|
||||
wp_enqueue_script( 'htrp-plugin-install-manager', $this->assets_url . '/js/plugins_install_manager.js', array('jquery','wp-util', 'updates'), '1.1.6', true );
|
||||
}
|
||||
} else {
|
||||
add_thickbox();
|
||||
wp_enqueue_script( 'htrp-plugin-install-manager', $this->assets_url . '/js/plugins_install_manager.js', array('jquery','wp-util', 'updates'), '1.1.6', true );
|
||||
}
|
||||
|
||||
$localize_vars['ajaxurl'] = admin_url('admin-ajax.php');
|
||||
$localize_vars['text_domain'] = sanitize_title_with_dashes( $this->text_domain );
|
||||
$localize_vars['nonce'] = wp_create_nonce('ht-contactform-nonce');
|
||||
$localize_vars['buttontxt'] = array(
|
||||
'buynow' => esc_html__( 'Buy Now', $this->text_domain ),
|
||||
'preview' => esc_html__( 'Preview', $this->text_domain ),
|
||||
'installing' => esc_html__( 'Installing..', $this->text_domain ),
|
||||
'activating' => esc_html__( 'Activating..', $this->text_domain ),
|
||||
'active' => esc_html__( 'Activated', $this->text_domain ),
|
||||
);
|
||||
wp_localize_script( 'htrp-plugin-install-manager', 'htrp_params', $localize_vars );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* [add_new_tab]
|
||||
* @param [void] set tab content
|
||||
*/
|
||||
public function add_new_tab( $tab_list ){
|
||||
$this->tab_list[] = $tab_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* [render_html]
|
||||
* @return [void] Render HTML
|
||||
*/
|
||||
public function render_html(){
|
||||
if ( ! function_exists('plugins_api') ){ include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); }
|
||||
|
||||
$htplugins_plugin_list = $this->get_plugins();
|
||||
$palscode_plugin_list = $this->get_plugins( 'palscode' );
|
||||
|
||||
$plugin_list = array_merge( $htplugins_plugin_list, $palscode_plugin_list );
|
||||
|
||||
$prepare_plugin = array();
|
||||
foreach ( $plugin_list as $plugin_key => $plugin ) {
|
||||
$prepare_plugin[$plugin['slug']] = $plugin;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h2><?php echo get_admin_page_title(); ?></h2>
|
||||
<style>
|
||||
.htrp-admin-tab-pane{
|
||||
display: none;
|
||||
}
|
||||
.htrp-admin-tab-pane.htrp-active{
|
||||
display: block;
|
||||
}
|
||||
.htrp-extension-admin-tab-area .filter-links li>a:focus, .htrp-extension-admin-tab-area .filter-links li>a:hover {
|
||||
color: inherit;
|
||||
box-shadow: none;
|
||||
}
|
||||
.filter-links .htrp-active{
|
||||
box-shadow: none;
|
||||
border-bottom: 4px solid #646970;
|
||||
color: #1d2327;
|
||||
}
|
||||
.downloaded-count{
|
||||
display: block;
|
||||
margin-top:5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="htrp-extension-admin-tab-area wp-filter">
|
||||
<ul class="htrp-admin-tabs filter-links">
|
||||
<?php
|
||||
foreach( $this->tab_list as $tab ){
|
||||
$active_class = isset( $tab['active'] ) && $tab['active'] ? 'htrp-active' : '';
|
||||
?>
|
||||
<li>
|
||||
<a href="#<?php echo esc_attr( sanitize_title_with_dashes( $tab['title'] ) ) ?>" class="<?php echo esc_attr( $active_class ) ?>"><?php echo esc_html( $tab['title'] ) ?></a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$plugins_type = '';
|
||||
foreach( $this->tab_list as $tab ):
|
||||
|
||||
$active_class = isset( $tab['active'] ) && $tab['active'] ? 'htrp-active' : '';
|
||||
$plugins = $tab['plugins'];
|
||||
|
||||
echo '<div id="'.esc_attr( sanitize_title_with_dashes( $tab['title'] ) ).'" class="htrp-admin-tab-pane '.esc_attr( $active_class ).'">';
|
||||
foreach( $plugins as $plugin ):
|
||||
|
||||
$data = array(
|
||||
'slug' => isset( $plugin['slug'] ) ? $plugin['slug'] : '',
|
||||
'location' => isset( $plugin['location'] ) ? $plugin['slug'].'/'.$plugin['location'] : '',
|
||||
'name' => isset( $plugin['name'] ) ? $plugin['name'] : '',
|
||||
);
|
||||
$title = wp_kses( $plugin['name'], $this->plugins_allowedtags );
|
||||
|
||||
if( array_key_exists( $plugin['slug'], $prepare_plugin ) ){
|
||||
$plugins_type = 'free';
|
||||
$image_url = $this->plugin_icon( $plugins_type, $prepare_plugin[$data['slug']]['icons'] );
|
||||
$description = strip_tags( $prepare_plugin[$data['slug']]['description'] );
|
||||
$author_name = wp_kses( $prepare_plugin[$data['slug']]['author'], $this->plugins_allowedtags );
|
||||
$details_link = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .'&TB_iframe=true&width=772&height=577');
|
||||
$target = '_self';
|
||||
$modal_class = 'class="thickbox open-plugin-details-modal"';
|
||||
|
||||
}else{
|
||||
$plugins_type = 'pro';
|
||||
$image_url = $this->plugin_icon( $plugins_type, $plugin['slug'] );
|
||||
$description = isset( $plugin['description'] ) ? $plugin['description'] : '';
|
||||
$author_name = esc_html__( 'HasTheme', $this->text_domain );
|
||||
$author_link = isset( $plugin['author_link'] ) ? $plugin['author_link'] : '';
|
||||
$details_link = isset( $plugin['link'] ) ? $plugin['link'] : '';
|
||||
$button_text = esc_html__('Buy Now', $this->text_domain );
|
||||
$button_classes = 'button button-primary';
|
||||
$target = '_blank';
|
||||
$modal_class = '';
|
||||
}
|
||||
|
||||
if ( ! is_wp_error( $data ) ):
|
||||
|
||||
// Installed but Inactive.
|
||||
if ( file_exists( WP_PLUGIN_DIR . '/' . $data['location'] ) && is_plugin_inactive( $data['location'] ) ) {
|
||||
|
||||
$button_classes = 'button activate-now button-primary';
|
||||
$button_text = esc_html__( 'Activate', $this->text_domain );
|
||||
|
||||
// Not Installed.
|
||||
} elseif ( ! file_exists( WP_PLUGIN_DIR . '/' . $data['location'] ) ) {
|
||||
|
||||
$button_classes = 'button install-now';
|
||||
$button_text = esc_html__( 'Install Now', $this->text_domain );
|
||||
|
||||
// Active.
|
||||
} else {
|
||||
$button_classes = 'button disabled';
|
||||
$button_text = esc_html__( 'Activated', $this->text_domain );
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="plugin-card htrp-plugin-<?php echo sanitize_html_class( $plugin['slug'] ); ?>">
|
||||
<div class="plugin-card-top">
|
||||
<div class="name column-name" style="margin-right: 0;">
|
||||
<h3>
|
||||
<a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>" <?php echo $modal_class; ?>>
|
||||
<?php echo esc_html( $title ) ?>
|
||||
<img src="<?php echo esc_url( $image_url ) ?>" class="plugin-icon" alt="<?php echo esc_attr( $title ) ?>">
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="desc column-description" style="margin-right: 0;">
|
||||
<p><?php echo wp_trim_words( $description, 23, '....'); ?></p>
|
||||
<p class="authors">
|
||||
<cite><?php echo esc_html__( 'By ', $this->text_domain ); ?>
|
||||
<?php if( $plugins_type == 'free' ): ?>
|
||||
<?php echo $author_name; ?>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo esc_url( $author_link ); ?>" target="_blank" ><?php echo $author_name; ?></a>
|
||||
<?php endif; ?>
|
||||
</cite>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plugin-card-bottom">
|
||||
<div class="column-updated">
|
||||
<?php
|
||||
if (! file_exists( WP_PLUGIN_DIR . '/' . $data['location'] ) && $plugins_type == 'pro' ) {
|
||||
echo '<a class="button button-primary" href="'.esc_url( $details_link ).'" target="'.esc_attr( $target ).'">'.esc_html__( 'Buy Now', $this->text_domain ).'</a>';
|
||||
}else{
|
||||
?>
|
||||
<button class="<?php echo esc_attr($button_classes); ?>" data-pluginopt='<?php echo wp_json_encode( $data ); ?>'><?php echo wp_kses_post( $button_text ); ?></button>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="column-downloaded">
|
||||
<a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>" <?php echo $modal_class; ?>><?php echo esc_html__('More Details', $this->text_domain) ?></a>
|
||||
<span class="downloaded-count">
|
||||
<?php
|
||||
if( $plugins_type == 'free' ){
|
||||
/* translators: %s: Number of installations. */
|
||||
printf( __( '%s Active Installations' ), $this->active_install_count( $prepare_plugin[$data['slug']]['active_installs'] ) );
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
endforeach;
|
||||
echo '</div>';
|
||||
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* [get_plugins] Get plugin from wp.org API
|
||||
* @param string $username wo.org username
|
||||
* @return [array] plugin list
|
||||
*/
|
||||
public function get_plugins( $username = 'htplugins' ){
|
||||
$transient_var = 'htrp_htplugins_list_'.$username;
|
||||
$org_plugins_list = get_transient( $transient_var );
|
||||
|
||||
if ( false === $org_plugins_list ) {
|
||||
$plugins_list_by_author = plugins_api( 'query_plugins', array( 'author' => $username, 'per_page' => 100 ) );
|
||||
set_transient( $transient_var, $plugins_list_by_author->plugins, 1 * WEEK_IN_SECONDS );
|
||||
$org_plugins_list = $plugins_list_by_author->plugins;
|
||||
}
|
||||
|
||||
return $org_plugins_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* [plugin_icon] Generate plugin icon
|
||||
* @param string $type plugin type
|
||||
* @param [array|string] $icon
|
||||
* @return [URL] icon URL
|
||||
*/
|
||||
public function plugin_icon( $type, $icon ){
|
||||
if( $type === 'free' ){
|
||||
if ( ! empty( $icon['svg'] ) ) {
|
||||
$plugin_icon_url = $icon['svg'];
|
||||
} elseif ( ! empty( $icon['2x'] ) ) {
|
||||
$plugin_icon_url = $icon['2x'];
|
||||
} elseif ( ! empty( $icon['1x'] ) ) {
|
||||
$plugin_icon_url = $icon['1x'];
|
||||
} else {
|
||||
$plugin_icon_url = $icon['default'];
|
||||
}
|
||||
}else{
|
||||
$plugin_icon_url = $this->assets_url .'/images/extensions/'.$icon.'.png';
|
||||
}
|
||||
|
||||
return $plugin_icon_url;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* [active_install_count] Manage Active install count
|
||||
* @param [int] $active_installs
|
||||
* @return [string]
|
||||
*/
|
||||
public function active_install_count( $active_installs ){
|
||||
|
||||
if ( $active_installs >= 1000000 ) {
|
||||
$active_installs_millions = floor( $active_installs / 1000000 );
|
||||
$active_installs_text = sprintf(
|
||||
/* translators: %s: Number of millions. */
|
||||
_nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ),
|
||||
number_format_i18n( $active_installs_millions )
|
||||
);
|
||||
} elseif ( 0 === $active_installs ) {
|
||||
$active_installs_text = _x( 'Less Than 10', 'Active plugin installations' );
|
||||
} else {
|
||||
$active_installs_text = number_format_i18n( $active_installs ) . '+';
|
||||
}
|
||||
return $active_installs_text;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* [plugin_activation] Plugin activation ajax callable function
|
||||
* @return [JSON]
|
||||
*/
|
||||
public function plugin_activation() {
|
||||
$nonce = sanitize_text_field($_POST['nonce']);
|
||||
if(wp_verify_nonce($nonce, 'ht-contactform-nonce')) {
|
||||
|
||||
if ( ! current_user_can( 'install_plugins' ) || ! isset( $_POST['location'] ) || ! sanitize_text_field($_POST['location']) ) {
|
||||
wp_send_json_error(
|
||||
array(
|
||||
'success' => false,
|
||||
'message' => esc_html__( 'Plugin Not Found', $this->text_domain ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$plugin_location = ( isset( $_POST['location'] ) ) ? sanitize_text_field( $_POST['location'] ) : '';
|
||||
$activate = activate_plugin( $plugin_location, '', false, true );
|
||||
|
||||
if ( is_wp_error( $activate ) ) {
|
||||
wp_send_json_error(
|
||||
array(
|
||||
'success' => false,
|
||||
'message' => $activate->get_error_message(),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
wp_send_json_success(
|
||||
array(
|
||||
'success' => true,
|
||||
'message' => esc_html__( 'Plugin Successfully Activated', $this->text_domain ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,333 @@
|
||||
<?php
|
||||
/**
|
||||
* Constructor Parameters
|
||||
*
|
||||
* @param string $text_domain your plugin text domain.
|
||||
* @param string $parent_menu_slug the menu slug name where the "Recommendations" submenu will appear.
|
||||
* @param string $submenu_label To change the submenu name.
|
||||
* @param string $submenu_page_name an unique page name for the submenu.
|
||||
* @param int $priority Submenu priority adjust.
|
||||
* @param string $hook_suffix use it to load this library assets only to the recommedded plugins page. Not into the whol admin area.
|
||||
*
|
||||
*/
|
||||
|
||||
if( class_exists('Hasthemes\HTContact_Form\Recommended_Plugins') ){
|
||||
$recommendations = new Hasthemes\HTContact_Form\Recommended_Plugins(
|
||||
array(
|
||||
'text_domain' => 'ht-contactform',
|
||||
'parent_menu_slug' => 'htcontact-form',
|
||||
'menu_type' => 'submenu',
|
||||
'menu_icon' => 'dashicons-email-alt',
|
||||
'menu_capability' => 'manage_options',
|
||||
'menu_page_slug' => '',
|
||||
'priority' => 300,
|
||||
'assets_url' => HTCONTACTFORM_PL_URL.'/assets',
|
||||
'hook_suffix' => '',
|
||||
)
|
||||
);
|
||||
|
||||
$recommendations->add_new_tab( array(
|
||||
|
||||
'title' => esc_html__( 'Recommended', 'ht-contactform' ),
|
||||
'active' => true,
|
||||
'plugins' => array(
|
||||
|
||||
array(
|
||||
'slug' => 'woolentor-addons',
|
||||
'location' => 'woolentor_addons_elementor.php',
|
||||
'name' => esc_html__( 'WooLentor', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-mega-for-elementor',
|
||||
'location' => 'htmega_addons_elementor.php',
|
||||
'name' => esc_html__( 'HT Mega', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'hashbar-wp-notification-bar',
|
||||
'location' => 'init.php',
|
||||
'name' => esc_html__( 'HashBar', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-slider-for-elementor',
|
||||
'location' => 'ht-slider-for-elementor.php',
|
||||
'name' => esc_html__( 'HT Slider For Elementor', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-wpform',
|
||||
'location' => 'wpform-widget-elementor.php',
|
||||
'name' => esc_html__( 'HT WPForms', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-menu-lite',
|
||||
'location' => 'ht-mega-menu.php',
|
||||
'name' => esc_html__( 'HT Menu', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'insert-headers-and-footers-script',
|
||||
'location' => 'init.php',
|
||||
'name' => esc_html__( 'HT Script', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'wp-plugin-manager',
|
||||
'location' => 'plugin-main.php',
|
||||
'name' => esc_html__( 'WP Plugin Manager', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'wc-builder',
|
||||
'location' => 'wc-builder.php',
|
||||
'name' => esc_html__( 'WC Builder', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'whols',
|
||||
'location' => 'whols.php',
|
||||
'name' => esc_html__( 'Whols', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'just-tables',
|
||||
'location' => 'just-tables.php',
|
||||
'name' => esc_html__( 'JustTables', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'wc-multi-currency',
|
||||
'location' => 'wcmilticurrency.php',
|
||||
'name' => esc_html__( 'Multi Currency', 'ht-contactform' )
|
||||
)
|
||||
)
|
||||
|
||||
) );
|
||||
|
||||
$recommendations->add_new_tab(array(
|
||||
'title' => esc_html__( 'You May Also Like', 'ht-contactform' ),
|
||||
'plugins' => array(
|
||||
|
||||
array(
|
||||
'slug' => 'woolentor-addons-pro',
|
||||
'location' => 'woolentor_addons_pro.php',
|
||||
'name' => esc_html__( 'WooLentor Pro', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/woolentor-pro-woocommerce-page-builder/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'WooLentor is one of the most popular WooCommerce Elementor Addons on WordPress.org. It has been downloaded more than 672,148 times and 60,000 stores are using WooLentor plugin. Why not you?', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'htmega-pro',
|
||||
'location' => 'htmega_pro.php',
|
||||
'name' => esc_html__( 'HT Mega Pro', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/ht-mega-pro/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'HTMega is an absolute addon for elementor that includes 80+ elements & 360 Blocks with unlimited variations. HT Mega brings limitless possibilities. Embellish your site with the elements of HT Mega.', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'swatchly-pro',
|
||||
'location' => 'swatchly-pro.php',
|
||||
'name' => esc_html__( 'Product Variation Swatches', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/swatchly-product-variation-swatches-for-woocommerce-products/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'Are you getting frustrated with WooCommerce’s current way of presenting the variants for your products? Well, say goodbye to dropdowns and start showing the product variations in a whole new light with Swatchly.', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'whols-pro',
|
||||
'location' => 'whols-pro.php',
|
||||
'name' => esc_html__( 'Whols Pro', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/whols-woocommerce-wholesale-prices/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'Whols is an outstanding WordPress plugin for WooCommerce that allows store owners to set wholesale prices for the products of their online stores. This plugin enables you to show special wholesale prices to the wholesaler. Users can easily request to become a wholesale customer by filling out a simple online registration form. Once the registration is complete, the owner of the store will be able to review the request and approve the request either manually or automatically.', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'just-tables-pro',
|
||||
'location' => 'just-tables-pro.php',
|
||||
'name' => esc_html__( 'JustTables Pro', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/wp/justtables/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'JustTables is an incredible WordPress plugin that lets you showcase all your WooCommerce products in a sortable and filterable table view. It allows your customers to easily navigate through different attributes of the products and compare them on a single page. This plugin will be of great help if you are looking for an easy solution that increases the chances of landing a sale on your online store.', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'multicurrencypro',
|
||||
'location' => 'multicurrencypro.php',
|
||||
'name' => esc_html__( 'Multi Currency Pro for WooCommerce', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/multi-currency-pro-for-woocommerce/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'Multi-Currency Pro for WooCommerce is a prominent currency switcher plugin for WooCommerce. This plugin allows your website or online store visitors to switch to their preferred currency or their country’s currency.', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'cf7-extensions-pro',
|
||||
'location' => 'cf7-extensions-pro.php',
|
||||
'name' => esc_html__( 'Extensions For CF7 Pro', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/cf7-extensions/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'Contact Form7 Extensions plugin is a fantastic WordPress plugin that enriches the functionalities of Contact Form 7.This all-in-one WordPress plugin will help you turn any contact page into a well-organized, engaging tool for communicating with your website visitors by providing tons of advanced features like drag and drop file upload, repeater field, trigger error for already submitted forms, popup form response, country flags and dial codes with a telephone input field and acceptance field, etc. in addition to its basic features.', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'hashbar-pro',
|
||||
'location' => 'init.php',
|
||||
'name' => esc_html__( 'HashBar Pro', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/wordpress-notification-bar-plugin/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'HashBar is a WordPress Notification / Alert / Offer Bar plugin which allows you to create unlimited notification bars to notify your customers. This plugin has option to show email subscription form (sometimes it increases up to 500% email subscriber), Offer text and buttons about your promotions. This plugin has the options to add unlimited background colors and images to make your notification bar more professional.', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'wp-plugin-manager-pro',
|
||||
'location' => 'plugin-main.php',
|
||||
'name' => esc_html__( 'WP Plugin Manager Pro', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/wp-plugin-manager-pro/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'WP Plugin Manager Pro is a specialized WordPress Plugin that helps you to deactivate unnecessary WordPress Plugins page wise and boosts the speed of your WordPress site to improve the overall site performance.', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-script-pro',
|
||||
'location' => 'plugin-main.php',
|
||||
'name' => esc_html__( 'HT Script Pro', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/insert-headers-and-footers-code-ht-script/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'Insert Headers and Footers Code allows you to insert Google Analytics, Facebook Pixel, custom CSS, custom HTML, JavaScript code to your website header and footer without modifying your theme code.This plugin has the option to add any custom code to your theme in one place, no need to edit the theme code. It will save your time and remove the hassle for the theme update.', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-menu',
|
||||
'location' => 'ht-mega-menu.php',
|
||||
'name' => esc_html__( 'HT Menu Pro', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/ht-menu-pro/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'WordPress Mega Menu Builder for Elementor', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-slider-addons-pro',
|
||||
'location' => 'ht-slider-addons-pro.php',
|
||||
'name' => esc_html__( 'HT Slider Pro For Elementor', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/ht-slider-pro-for-elementor/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'HT Slider Pro is a plugin to create a slider for WordPress websites easily using the Elementor page builder. 80+ prebuild slides/templates are included in this plugin. There is the option to create a post slider, WooCommerce product slider, Video slider, image slider, etc. Fullscreen, full width and box layout option are included.', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-google-place-review',
|
||||
'location' => 'ht-google-place-review.php',
|
||||
'name' => esc_html__( 'Google Place Review', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/google-place-review-plugin-for-wordpress/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( 'If you are searching for a modern and excellent google places review WordPress plugin to showcase reviews from Google Maps and strengthen trust between you and your site visitors, look no further than HT Google Place Review', 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'was-this-helpful',
|
||||
'location' => 'was-this-helpful.php',
|
||||
'name' => esc_html__( 'Was This Helpful?', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/was-this-helpful/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( "Was this helpful? is a WordPress plugin that allows you to take visitors' feedback on your post/pages or any article. A visitor can share his feedback by like/dislike/yes/no", 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-click-to-call',
|
||||
'location' => 'ht-click-to-call.php',
|
||||
'name' => esc_html__( 'HT Click To Call', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/ht-click-to-call/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( "HT – Click to Call is a lightweight WordPress plugin that allows you to add a floating click to call button on your website. It will offer your website visitors an opportunity to call your business immediately at the right moment, especially when they are interested in your products or services and seeking more information.", 'ht-contactform' ),
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'docus-pro',
|
||||
'location' => 'docus-pro.php',
|
||||
'name' => esc_html__( 'Docus Pro', 'ht-contactform' ),
|
||||
'link' => 'https://hasthemes.com/plugins/docus-pro-youtube-video-playlist/',
|
||||
'author_link'=> 'https://hasthemes.com/',
|
||||
'description'=> esc_html__( "Embedding a YouTube playlist into your website plays a vital role to curate your content into several categories and make your web content more engaging and popular by keeping the visitors on your website for a longer period.", 'ht-contactform' ),
|
||||
),
|
||||
|
||||
)
|
||||
));
|
||||
|
||||
$recommendations->add_new_tab(array(
|
||||
'title' => esc_html__( 'Others', 'ht-contactform' ),
|
||||
'plugins' => array(
|
||||
|
||||
array(
|
||||
'slug' => 'really-simple-google-tag-manager',
|
||||
'location' => 'really-simple-google-tag-manager.php',
|
||||
'name' => esc_html__( 'Really Simple Google Tag Manager', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-instagram',
|
||||
'location' => 'ht-instagram.php',
|
||||
'name' => esc_html__( 'HT Feed', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'faster-youtube-embed',
|
||||
'location' => 'faster-youtube-embed.php',
|
||||
'name' => esc_html__( 'Faster YouTube Embed', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'wc-sales-notification',
|
||||
'location' => 'wc-sales-notification.php',
|
||||
'name' => esc_html__( 'WC Sales Notification', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'preview-link-generator',
|
||||
'location' => 'preview-link-generator.php',
|
||||
'name' => esc_html__( 'Preview Link Generator', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'quickswish',
|
||||
'location' => 'quickswish.php',
|
||||
'name' => esc_html__( 'QuickSwish', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'docus',
|
||||
'location' => 'docus.php',
|
||||
'name' => esc_html__( 'Docus – YouTube Video Playlist', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'data-captia',
|
||||
'location' => 'data-captia.php',
|
||||
'name' => esc_html__( 'DataCaptia', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'coupon-zen',
|
||||
'location' => 'coupon-zen.php',
|
||||
'name' => esc_html__( 'Coupon Zen', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'sirve',
|
||||
'location' => 'sirve.php',
|
||||
'name' => esc_html__( 'Sirve – Simple Directory Listing', 'ht-contactform' )
|
||||
),
|
||||
|
||||
array(
|
||||
'slug' => 'ht-social-share',
|
||||
'location' => 'ht-social-share.php',
|
||||
'name' => esc_html__( 'HT Social Share', 'ht-contactform' )
|
||||
),
|
||||
|
||||
)
|
||||
));
|
||||
}
|
||||
3
wp-content/plugins/ht-contactform/index.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Direct access security
|
||||
wp_die();
|
||||
150
wp-content/plugins/ht-contactform/readme.txt
Normal file
@@ -0,0 +1,150 @@
|
||||
=== Contact Form 7 Widget For Elementor Page Builder & Gutenberg Blocks ===
|
||||
Contributors: htplugins, hasthemes, tarekht, zenaulislam, aslamhasib
|
||||
Tags: Contact Form, Elementor, Contact Form 7, Contact Form 7 Widget, Gutenberg Blocks
|
||||
Requires at least: 5.0
|
||||
Tested up to: 6.5
|
||||
Stable tag: 1.2.0
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
== Description ==
|
||||
Contact Form 7 Widget is a elementor addons for elementor page bulider and gutenberg blocks. It's Help to you easily drag and drop Contact Form 7 forms from a drop down list.
|
||||
[Required Plugin: Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
|
||||
|
||||
[youtube https://youtu.be/ZRTPsGZnJq4]
|
||||
|
||||
> ## Absolute Addons for Elementor Page Builder
|
||||
> Don't forgete to check our Unlimite mega addon for Elementor page Builder.
|
||||
> [HT Mega – Absolute Addons for Elementor Page Builder](https://wordpress.org/plugins/ht-mega-for-elementor/)
|
||||
> Includes 360 Blocke & 15 Landing Pages.
|
||||
|
||||
== Features: ==
|
||||
* Drag and drop the widget
|
||||
* Custom Styling Options
|
||||
* Show Contact form in any place on your website.
|
||||
|
||||
<h3><a href="https://wordpress.org/plugins/extensions-for-cf7/">Contact Form 7 Extensions</a></h3>
|
||||
Are you looking for a plugin to help with your Contact Form 7?
|
||||
|
||||
Extensions For Contact form 7 is the perfect extension for any WordPress site. It will allow you to create a contact form 7 database, conditional fields, and redirection. This extension is free! Check it out today!
|
||||
|
||||
You can now save all of your submissions in one place on your website without having to worry about them going missing or getting lost in the shuffle. With this extension, everything will be organized and easy to find when you need it most.
|
||||
|
||||
== Feature List of Extensions For Contact Form 7: ==
|
||||
|
||||
✔️ Create a contact form 7 database to save CF7 submissions to your WordPress.
|
||||
✔️ Contact form 7 conditional fields.
|
||||
✔️ Contact form 7 redirection.
|
||||
|
||||
Click here to download [Extensions For Contact form 7](https://wordpress.org/plugins/extensions-for-cf7/) today!
|
||||
|
||||
== Other Projects ==
|
||||
We have a lot of plugins and extensions that might interest you. Try out other projects by following this link:
|
||||
|
||||
<strong>[Woolentor Addons](https://wordpress.org/plugins/woolentor-addons/)</strong>
|
||||
Woolentor is a WooCommerce page builder plugin that extends the functionality of the WooCommerce store. These Elementor Addons provide additional features and options for WooCommerce stores. Woolentor is the best alternative for ShopReady, Kadence, JetWidgets, ShopEngine, and CoDesigner. The Woolentor addons come with 50+ free Elementor widgets like Wishlist Extension Addon, Product compare, Product Filters, Product Variation Swatches, Shopify Style Checkout, Product Slider and 50+ pro Elementor Widgets like Checkout Fields Editor, Partial Payment, Email Customizer for WooCommerce with ready Email Templates, WooCommerce Email Automation, Multi Step Checkout, and many much more. Also it provide 90+ WooCommerce Elementor templates, 22+ WooCommerce Modules, and Gutenberg Blocks.
|
||||
|
||||
<strong>[HT Mega For Elementor](https://wordpress.org/plugins/ht-mega-for-elementor/)</strong>
|
||||
HT Mega is an Elementor Addons that comes with custom page builder, header builder, footer builder, mega menus, and more for your Elementor based website. The HT Mega plugin also includes a comprehensive set of Elementor widgets, readymade Elementor templates and Elementor Blocks. HT Mega plugin works like ElementsKit, Essential Addons for Elementor, Royal Elementor Addons, Premium Addons, Happy Addons, PowerPack Addons, Unlimited Elements, Qi Addons, etc. The HT Mega plugin provides 84+ free Elementor widgets like Post Grid widget, Slider widget, Accordion widget, Elementor Forms widget, Contact Form Widget, Elementor tables, and other related items. It also provides 18+ pro widgets like Filterable Gallery Widget, Event Box Widget, Breadcrumbs Widget, Elementor Facebook Review Widget, Elementor Category List Widget, etc.
|
||||
|
||||
<strong>[Hashbar Wp Notification Bar](https://wordpress.org/plugins/hashbar-wp-notification-bar/)</strong>
|
||||
HashBar is a WordPress Notification Bar Plugin that enables you to create unlimited notification bars on your WordPress website. You can create as many notification bars as you want and customize their content to meet your needs.
|
||||
|
||||
<strong>[WP Plugin Manager - Deactivate plugins per page](https://wordpress.org/plugins/wp-plugin-manager/)</strong>
|
||||
WP Plugin Manager is the perfect solution for those who want to disable certain plugins on specific pages or posts. With this plugin, you can easily activate or deactivate plugins on a per-page or per-post basis. Whichever plugin you don’t need you can deactivate or disable that plugin with the help of WP plugin Manager.
|
||||
|
||||
<strong>[Whols](https://wordpress.org/plugins/whols/)</strong>
|
||||
Whols is an outstanding plugin for WooCommerce that allows store owners to set wholesale prices for the products of their online stores. With Whols, you can easily add custom fields to your registration form, set minimum product requirements, and control how wholesale prices are displayed on both the shop and product detail pages. Whols work like Wholesale Suite, B2Bking and B2B plugins.
|
||||
|
||||
<strong>[Just Tables](https://wordpress.org/plugins/just-tables/)</strong>
|
||||
JustTables is a WooCommerce product table plugin that helps you easily create and manage tables for your products. It includes 28 pre-built columns with options to enable/disable, and you can add custom columns with custom fields/taxonomies. Just Tables also allows you to order table columns using drag and drop and set the number of products per page.
|
||||
|
||||
<strong>[Swatchly](https://wordpress.org/plugins/swatchly/)</strong>
|
||||
Swatchly is a WooCommerce product variation swatches plugin that allows you to add color swatches to your product pages. With Swatchly, you can enable swatches for the shop, product list, and product details pages. There are three swatch types (label swatche, color swatche, image swatche), and the plugin supports multi-colored swatches.
|
||||
|
||||
<strong>[HT Slider For Elementor](https://wordpress.org/plugins/ht-slider-for-elementor/)</strong>
|
||||
HT Slider For Elementor is a powerful and user-friendly slider addon for Elementor. You can customize the look and feel of your slider with HT Slider's custom styling options. You also have the option to display your slides by id and category. Plus, HT Slider For Elementor comes with custom design options for slider navigation and pagination, so you can easily control the look and feel of your slider.
|
||||
|
||||
== Need Help? ==
|
||||
Is there any feature that you want to get in this plugin?
|
||||
Needs assistance to use this plugin?
|
||||
Feel free to [Contact us](https://hasthemes.com/contact-us/)
|
||||
|
||||
== Changelog ==
|
||||
= Version: 1.2.0 - Date: 23-Oct-2023 =
|
||||
* Updated: Elementor deprecated functions
|
||||
* Compatibility with WordPress latest version.
|
||||
* Compatibility With Elementor Latest Version.
|
||||
|
||||
= Version: 1.1.9 - Date: 19-July-2023 =
|
||||
* Fixed: Escaping issue in the recommended plugins
|
||||
|
||||
= Version: 1.1.7 - Date: 04-July-2023 =
|
||||
* Compatibility with WordPress latest version.
|
||||
* Compatibility With Elementor Latest Version.
|
||||
|
||||
= Version: 1.1.6 - Date: 01-Feb-2023 =
|
||||
* Added: Nonce verification for recommended plugins
|
||||
* Improved: Coding standards in some areas
|
||||
|
||||
= Version: 1.1.5 - Date: 07-Nov-2022 =
|
||||
* Compatibility with the latest WordPress version.
|
||||
|
||||
= Version: 1.1.4 - Date: 26-Sep-2022 =
|
||||
* Added: Recommendation Menu
|
||||
* Compatibility with latest WordPress version.
|
||||
|
||||
= Version: 1.1.3 - Date: 07-June-2022 =
|
||||
* Compatibility with latest WordPress version.
|
||||
|
||||
= Version: 1.1.2 - Date: 10-Feb-2022 =
|
||||
* Compatibility with latest WordPress version.
|
||||
|
||||
= Version: 1.1.1 - Date: 12-Dec-2021 =
|
||||
* Solved : Block showing issue in widget block editor
|
||||
* Solved : some minor css issue
|
||||
* Solved : redirection issue after plugin activation
|
||||
|
||||
= Version: 1.1.0 - Date: 21-Oct-2021 =
|
||||
* Add Gutenberg block for Contact Form 7
|
||||
|
||||
= Version: 1.0.9 - Date: 31-Aug-2021 =
|
||||
* Compatibility With Elementor Latest Version
|
||||
|
||||
= Version: 1.0.8 - Date: 25-July-2021 =
|
||||
* Compatibility With WordPress Latest Version
|
||||
* Compatibility With Elementor Latest Version
|
||||
|
||||
= Version: 1.0.7 - Date: 12-July-2021 =
|
||||
* Added Admin Menu.
|
||||
|
||||
= Version: 1.0.6 - Date: 31-May-2021 =
|
||||
* Elementor capability tag added.
|
||||
|
||||
= Version: 1.0.5 - Date: 25-April-2021 =
|
||||
* Capability With Latest Elementor Version.
|
||||
|
||||
= Version: 1.0.4 - Date: 24-March-2021 =
|
||||
* Capability With Latest WordPress.
|
||||
|
||||
= Version: 1.0.3 - Date: 29-Dec-2020 =
|
||||
* Capability With Latest WordPress.
|
||||
|
||||
== Installation ==
|
||||
This section describes how to install the Contact Form 7 Widget For Elementor Page Builder and Gutenberg block Plugins for WordPress get it working.
|
||||
|
||||
= 1) Install =
|
||||
|
||||
= Install: =
|
||||
1. Go to the WordPress Dashboard "Add New Plugin" section.
|
||||
2. Search For "WPForms Widget For Elementor Page Builder".
|
||||
3. Install, then Activate it.
|
||||
|
||||
= OR: =
|
||||
1. Unzip (if it is zipped) and Upload `ht-contactform` folder to the `/wp-content/plugins/` directory
|
||||
2. Activate the plugin through the 'Plugins' menu in WordPress
|
||||
|
||||
== Screenshots ==
|
||||
1. Elementor Addons Content Options
|
||||
2. Elementor Addons Styling Options
|
||||
3. Front end View
|
||||