File manager - Edit - /home/decorea/www/wp-includes/certificates/XML/samples.tar
Back
forminator-simple-autofill-plugin/forminator-simple-autofill-plugin.php 0000644 00000001360 15231510522 0022611 0 ustar 00 <?php /** * Plugin Name: Forminator Autofill Simple * Version: 1 * Description: Simple Addon Autofill Provider. * Author: WPMU DEV * Author URI: http://wpmudev.com * Text Domain: forminator * Domain Path: /languages/ * * @package Forminator */ add_action( 'forminator_register_autofill_provider', 'load_forminator_autofill_simple' ); /** * Load forminator autofill simple * * @return void */ function load_forminator_autofill_simple() { if ( class_exists( 'Forminator_Autofill_Provider_Abstract' ) ) { include_once plugin_dir_path( __FILE__ ) . 'forminator-autofill-simple.php'; if ( class_exists( 'Forminator_Autofill_Loader' ) ) { Forminator_Autofill_Loader::get_instance()->register( 'Forminator_Autofill_Simple' ); } } } forminator-simple-autofill-plugin/forminator-autofill-simple.php 0000644 00000006570 15231510522 0021325 0 ustar 00 <?php /** * The Forminator_Autofill_Simple class. * * @package Forminator */ /* @noinspection PhpUndefinedClassInspection */ /** * Class Forminator_Autofill_Simple */ class Forminator_Autofill_Simple extends Forminator_Autofill_Provider_Abstract { /** * Slug * * @var string */ protected $_slug = 'simple'; /** * Name * * @var string */ protected $_name = 'Simple'; /** * Short name * * @var string */ protected $_short_name = 'Simple'; /** * Simple data * * @var array */ private $my_simple_data; /** * Forminator_Autofill_Provider_Interface * * @var Forminator_Autofill_Provider_Interface|Forminator_Autofill_Simple|null */ private static $_instance = null; /** * Get instance * * @return Forminator_Autofill_Provider_Interface|Forminator_Autofill_Simple|null */ public static function get_instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); } return self::$_instance; } /** * Forminator_Autofill_Simple constructor */ public function __construct() { $attributes_map = array( 'simple_attribute_text' => array( 'name' => esc_html__( 'Text', 'forminator' ), 'value_getter' => array( $this, 'get_value_simple_text' ), ), 'simple_attribute_number' => array( 'name' => esc_html__( 'Number', 'forminator' ), 'value_getter' => array( $this, 'get_value_simple_number' ), ), ); $this->attributes_map = $attributes_map; // Call this to Start attaching your autofill provider to Forminator field. $this->hook_to_fields(); } /** * Define what field to be hooked and what attribute will be used as auto fill provider * * @example [ * 'FIELD_TYPE_TO_HOOK' => [ * 'PROVIDER_SLUG.ATTRIBUTE_PROVIDER_KEY' * ], * 'text' => [ * 'simple.simple_text', * ], * 'number' => [ * 'simple.simple_number', * ] * * * ]; * @return array */ public function get_attribute_to_hook() { return array( 'text' => array( // you can add multiple here. // or you can add other provider too! simply by knowing its slug and attribute key. 'simple.simple_attribute_text', 'simple.simple_attribute_number', ), 'number' => array( // you can add multiple here. 'simple.simple_attribute_number', ), ); } /** * Init your fillable data here, like feching data from your server or database, etc */ public function init() { $this->my_simple_data = array( 'simple_text' => 'I am text', 'simple_number' => 300, ); } /** * Check if autofill provider can be enabled * * @example check settings or domain * when its false, it wont show up on select autofill value of form setting * * @return bool */ public function is_enabled() { return true; } /** * Check if its fillable * * @example when when get data from server failed, then it shouldn't be fillable * * @return bool */ public function is_fillable() { if ( ! empty( $this->my_simple_data ) ) { return true; } return false; } /** * Get value simple text * * @return string */ public function get_value_simple_text() { return $this->my_simple_data['simple_text']; } /** * Get value simple number * * @return int */ public function get_value_simple_number() { return $this->my_simple_data['simple_number']; } } forminator-simple-autofill-plugin/uninstall.php 0000644 00000000160 15231510522 0016037 0 ustar 00 <?php /** * Uninstall file. * * @package Forminator */ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { die; } forminator-simple-addon-plugin/forminator-addon-simple.php 0000644 00000002761 15231510522 0020037 0 ustar 00 <?php /** * The Forminator_Integration_Simple class. * * @package Forminator */ /** * Class Forminator_Integration_Simple */ final class Forminator_Integration_Simple extends Forminator_Integration { /** * Slug * * @var string */ protected $_slug = 'simple'; /** * Version * * @var string */ protected $_version = FORMINATOR_ADDON_SIMPLE_VERSION; /** * Minimum Forminator version * * @var string */ protected $_min_forminator_version = '1.1'; /** * Short title * * @var string */ protected $_short_title = 'simple'; /** * Title * * @var string */ protected $_title = 'Simple'; /** * Forminator_Integration_Simple constructor */ public function __construct() { // late init to allow translation. $this->_description = esc_html__( 'Make your form Simple-able', 'forminator' ); } /** * Flag for check if and addon connected (global settings suchs as api key complete) * * @return bool */ public function is_connected() { return false; } /** * Authorized Callback * * @return bool */ public function is_authorized() { return false; } /** * Flag for check if and addon connected to a form(form settings such as list name completed) * * @param int $module_id Form ID. * @param string $module_slug Module type. * @param bool $check_lead Check is lead connected or not. * @return bool */ public function is_module_connected( $module_id, $module_slug = 'form', $check_lead = false ) { return false; } } forminator-simple-addon-plugin/forminator-simple-addon-plugin.php 0000644 00000001547 15231510522 0021334 0 ustar 00 <?php /** * Plugin Name: Forminator Simple Addon * Version: 1 * Description: Simple Addon forminator. * Author: WPMU DEV * Author URI: http://wpmudev.com * Text Domain: external_forminator * Domain Path: /languages/ * * @package Forminator */ // Direct Load. define( 'FORMINATOR_ADDON_SIMPLE_VERSION', '1.0' ); /** * Forminator addon simple URL * * @return string */ function forminator_addon_simple_url() { return trailingslashit( plugin_dir_url( __FILE__ ) ); } add_action( 'forminator_addons_loaded', 'load_forminator_addon_simple' ); /** * Load forminator addon simple * * @return void */ function load_forminator_addon_simple() { require_once __DIR__ . '/forminator-addon-simple.php'; if ( class_exists( 'Forminator_Integration_Loader' ) ) { Forminator_Integration_Loader::get_instance()->register( 'Forminator_Integration_Simple' ); } }
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings