first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/colorpicker.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<p class="form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<label for="<?php echo esc_attr( $key ); ?>">
<?php echo wp_kses_post( $args['label'] ); ?>
<?php if ( $args['required'] ) : ?>
<abbr class="required"
title="<?php echo esc_attr( __( 'Required Field', 'flexible-checkout-fields' ) ); ?>">*</abbr>
<?php endif; ?>
</label>
<input
type="text"
class="input-text fcf-load-colorpicker"
name="<?php echo esc_attr( $key ); ?>"
id="<?php echo esc_attr( $key ); ?>"
placeholder="<?php echo esc_attr( $args['placeholder'] ); ?>"
value="<?php echo esc_attr( $value ); ?>"
data-fcf-field-input="<?php echo esc_attr( $key ); ?>"
<?php foreach ( $custom_attributes as $attr_key => $attr_value ) : ?>
<?php echo esc_attr( $attr_key ); ?>="<?php echo esc_attr( $attr_value ); ?>"
<?php endforeach; ?> />
</p>

View File

@@ -0,0 +1,36 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/email.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<p class="form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<label for="<?php echo esc_attr( $key ); ?>">
<?php echo wp_kses_post( $args['label'] ); ?>
<?php if ( $args['required'] ) : ?>
<abbr class="required"
title="<?php echo esc_attr( __( 'Required Field', 'flexible-checkout-fields' ) ); ?>">*</abbr>
<?php endif; ?>
</label>
<input
type="email"
class="input-text"
name="<?php echo esc_attr( $key ); ?>"
id="<?php echo esc_attr( $key ); ?>"
placeholder="<?php echo esc_attr( $args['placeholder'] ); ?>"
value="<?php echo esc_attr( $value ); ?>"
data-fcf-field-input="<?php echo esc_attr( $key ); ?>"
<?php foreach ( $custom_attributes as $attr_key => $attr_value ) : ?>
<?php echo esc_attr( $attr_key ); ?>="<?php echo esc_attr( $attr_value ); ?>"
<?php endforeach; ?> />
</p>

View File

@@ -0,0 +1,19 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/heading.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<h4 class="form-heading form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<?php echo wp_kses_post( $args['label'] ); ?>
</h4>

View File

@@ -0,0 +1,28 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/image.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<p class="form-heading form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<?php
echo wp_get_attachment_image(
$args['image'],
[ $args['image_width'], $args['image_width'] ],
false,
[
'alt' => esc_attr( $args['label'] ),
]
);
?>
</p>

View File

@@ -0,0 +1,19 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/info.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<div class="form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<?php echo wp_kses_post( $args['label'] ); ?>
</div>

View File

@@ -0,0 +1,36 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/inspirecheckbox.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields PRO
*/
?>
<p class="form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<label for="<?php echo esc_attr( $key ); ?>">
<input
type="checkbox"
class="input-checkbox"
name="<?php echo esc_attr( $key ); ?>"
id="<?php echo esc_attr( $key ); ?>"
value="<?php echo ( $args['placeholder'] !== '' ) ? esc_attr( $args['placeholder'] ) : '1'; ?>"
<?php echo ( (string) $value === $args['placeholder'] ) ? 'checked' : ''; ?>
data-fcf-field-input="<?php echo esc_attr( $key ); ?>"
<?php foreach ( $custom_attributes as $attr_key => $attr_value ) : ?>
<?php echo esc_attr( $attr_key ); ?>="<?php echo esc_attr( $attr_value ); ?>"
<?php endforeach; ?> />
<?php echo wp_kses_post( $args['label'] ); ?>
<?php if ( $args['required'] ) : ?>
<abbr class="required"
title="<?php echo esc_attr( __( 'Required Field', 'flexible-checkout-fields' ) ); ?>">*</abbr>
<?php endif; ?>
</label>
</p>

View File

@@ -0,0 +1,39 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/number.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<p class="form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<label for="<?php echo esc_attr( $key ); ?>">
<?php echo wp_kses_post( $args['label'] ); ?>
<?php if ( $args['required'] ) : ?>
<abbr class="required"
title="<?php echo esc_attr( __( 'Required Field', 'flexible-checkout-fields' ) ); ?>">*</abbr>
<?php endif; ?>
</label>
<input
type="number"
class="input-text"
name="<?php echo esc_attr( $key ); ?>"
id="<?php echo esc_attr( $key ); ?>"
placeholder="<?php echo esc_attr( $args['placeholder'] ); ?>"
value="<?php echo esc_attr( $value ); ?>"
min="<?php echo esc_attr( $args['value_min'] ); ?>"
max="<?php echo esc_attr( $args['value_max'] ); ?>"
step="<?php echo esc_attr( $args['value_step'] ); ?>"
data-fcf-field-input="<?php echo esc_attr( $key ); ?>"
<?php foreach ( $custom_attributes as $attr_key => $attr_value ) : ?>
<?php echo esc_attr( $attr_key ); ?>="<?php echo esc_attr( $attr_value ); ?>"
<?php endforeach; ?> />
</p>

View File

@@ -0,0 +1,19 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/paragraph.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<p class="form-paragraph form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<?php echo wp_kses_post( $args['label'] ); ?>
</p>

View File

@@ -0,0 +1,36 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/phone.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<p class="form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<label for="<?php echo esc_attr( $key ); ?>">
<?php echo wp_kses_post( $args['label'] ); ?>
<?php if ( $args['required'] ) : ?>
<abbr class="required"
title="<?php echo esc_attr( __( 'Required Field', 'flexible-checkout-fields' ) ); ?>">*</abbr>
<?php endif; ?>
</label>
<input
type="tel"
class="input-text"
name="<?php echo esc_attr( $key ); ?>"
id="<?php echo esc_attr( $key ); ?>"
placeholder="<?php echo esc_attr( $args['placeholder'] ); ?>"
value="<?php echo esc_attr( $value ); ?>"
data-fcf-field-input="<?php echo esc_attr( $key ); ?>"
<?php foreach ( $custom_attributes as $attr_key => $attr_value ) : ?>
<?php echo esc_attr( $attr_key ); ?>="<?php echo esc_attr( $attr_value ); ?>"
<?php endforeach; ?> />
</p>

View File

@@ -0,0 +1,36 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/text.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<p class="form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<label for="<?php echo esc_attr( $key ); ?>">
<?php echo wp_kses_post( $args['label'] ); ?>
<?php if ( $args['required'] ) : ?>
<abbr class="required"
title="<?php echo esc_attr( __( 'Required Field', 'flexible-checkout-fields' ) ); ?>">*</abbr>
<?php endif; ?>
</label>
<input
type="text"
class="input-text"
name="<?php echo esc_attr( $key ); ?>"
id="<?php echo esc_attr( $key ); ?>"
placeholder="<?php echo esc_attr( $args['placeholder'] ); ?>"
value="<?php echo esc_attr( $value ); ?>"
data-fcf-field-input="<?php echo esc_attr( $key ); ?>"
<?php foreach ( $custom_attributes as $attr_key => $attr_value ) : ?>
<?php echo esc_attr( $attr_key ); ?>="<?php echo esc_attr( $attr_value ); ?>"
<?php endforeach; ?> />
</p>

View File

@@ -0,0 +1,36 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/textarea.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<p class="form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<label for="<?php echo esc_attr( $key ); ?>">
<?php echo wp_kses_post( $args['label'] ); ?>
<?php if ( $args['required'] ) : ?>
<abbr class="required"
title="<?php echo esc_attr( __( 'Required Field', 'flexible-checkout-fields' ) ); ?>">*</abbr>
<?php endif; ?>
</label>
<textarea
class="input-text"
name="<?php echo esc_attr( $key ); ?>"
id="<?php echo esc_attr( $key ); ?>"
rows="2"
placeholder="<?php echo esc_attr( $args['placeholder'] ); ?>"
data-fcf-field-input="<?php echo esc_attr( $key ); ?>"
<?php foreach ( $custom_attributes as $attr_key => $attr_value ) : ?>
<?php echo esc_attr( $attr_key ); ?>="<?php echo esc_attr( $attr_value ); ?>"
<?php endforeach; ?>
><?php echo esc_textarea( $value ); ?></textarea>
</p>

View File

@@ -0,0 +1,36 @@
<?php
/**
* This template can be overridden by copying it to yourtheme/flexible-checkout-fields/fields/url.php
*
* @var string $key Field ID.
* @var mixed[] $args Custom attributes for field.
* @var mixed $value Field value.
* @var string[] $custom_attributes .
*
* @package Flexible Checkout Fields
*/
?>
<p class="form-row <?php echo esc_attr( $args['class'] ); ?>"
id="<?php echo esc_attr( $key ); ?>_field"
data-priority="<?php echo esc_attr( $args['priority'] ); ?>"
data-fcf-field="<?php echo esc_attr( $key ); ?>">
<label for="<?php echo esc_attr( $key ); ?>">
<?php echo wp_kses_post( $args['label'] ); ?>
<?php if ( $args['required'] ) : ?>
<abbr class="required"
title="<?php echo esc_attr( __( 'Required Field', 'flexible-checkout-fields' ) ); ?>">*</abbr>
<?php endif; ?>
</label>
<input
type="url"
class="input-text"
name="<?php echo esc_attr( $key ); ?>"
id="<?php echo esc_attr( $key ); ?>"
placeholder="<?php echo esc_attr( $args['placeholder'] ); ?>"
value="<?php echo esc_attr( $value ); ?>"
data-fcf-field-input="<?php echo esc_attr( $key ); ?>"
<?php foreach ( $custom_attributes as $attr_key => $attr_value ) : ?>
<?php echo esc_attr( $attr_key ); ?>="<?php echo esc_attr( $attr_value ); ?>"
<?php endforeach; ?> />
</p>

View File

@@ -0,0 +1,47 @@
<?php
/**
* Notice about new plugin - Flexible Wishlist.
*
* @var string $ajax_url URL for Admin Ajax.
* @var string $ajax_action Action for Admin Ajax.
* @var string $image_url .
* @var string $install_url .
* @package Flexible Checkout Fields
*/
?>
<div class="notice notice-success is-dismissible"
data-notice="fcf-admin-notice"
data-notice-url="<?php echo esc_attr( $ajax_url ); ?>"
data-notice-action="<?php echo esc_attr( $ajax_action ); ?>"
>
<img src="<?php echo esc_attr( $image_url ); ?>" alt="">
<h2>
<?php echo esc_html( __( 'New free plugin by WP Desk: Flexible Wishlist for WooCommerce', 'flexible-checkout-fields' ) ); ?>
</h2>
<p>
<?php
echo wp_kses_post(
sprintf(
/* translators: %1$s: open strong tag, %2$s: open strong tag, %3$s: heart icon, %4$s: open anchor tag, %5$s: open anchor tag */
__( 'Introducing our new %1$sWooCommerce Wishlist plugin%2$s %3$s It\'s lightweight. It\'s free. Fits any theme. 100%% customizable and flexible. %4$sRead more%5$s and try it now. Uninstall any time with just one click.', 'flexible-checkout-fields' ),
'<strong>',
'</strong>',
'<span class="dashicons dashicons-heart"></span>',
'<a href="' . esc_url( apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-notice-fw-read-more' ) ) . '" target="_blank">',
'</a>'
)
);
?>
</p>
<div>
<a href="<?php echo esc_url( $install_url ); ?>"
class="button button-hero button-primary">
<?php echo esc_html( __( 'Try for free', 'flexible-checkout-fields' ) ); ?>
</a>
<button type="button"
class="button button-hero" data-notice-button>
<?php echo esc_html( __( 'Do not show again', 'flexible-checkout-fields' ) ); ?>
</button>
</div>
</div>

View File

@@ -0,0 +1,42 @@
<?php
/**
* Notice about plugin review.
*
* @var string $ajax_url URL for Admin Ajax.
* @var string $ajax_action Action for Admin Ajax.
* @package Flexible Checkout Fields
*/
?>
<div class="notice notice-success is-dismissible"
data-notice="fcf-admin-notice"
data-notice-url="<?php echo esc_attr( $ajax_url ); ?>"
data-notice-action="<?php echo esc_attr( $ajax_action ); ?>"
>
<h2>
<?php echo esc_html( __( 'Thanks for using the free version of Flexible Checkout Fields!', 'flexible-checkout-fields' ) ); ?>
</h2>
<p>
<?php
echo wp_kses_post(
sprintf(
/* translators: %1$s: dashicon, %2$s: break-line tag */
__( 'We are glad that (with our little help %1$s) the shop is now better suited to the needs. We will be grateful for the rating and feedback. %2$sIt will take less than reading this and it will help us a lot!', 'flexible-checkout-fields' ),
'<span class="dashicons dashicons-heart"></span>',
'<br>'
)
);
?>
</p>
<div>
<a href="<?php echo esc_url( apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-notice-review-button' ) ); ?>"
target="_blank"
class="button button-hero button-primary">
<?php echo esc_html( __( 'Add review', 'flexible-checkout-fields' ) ); ?>
</a>
<button type="button"
class="button button-hero" data-notice-button>
<?php echo esc_html( __( 'I added review, do not show again', 'flexible-checkout-fields' ) ); ?>
</button>
</div>
</div>

View File

@@ -0,0 +1,87 @@
<?php
/**
* Template of plugin admin page.
*
* @var array $settings Data for window.reactInit variable.
* @var array $menu_tabs List of items for primary nav.
* @var array $menu_sections List of items for second nav.
* @package Flexible Checkout Fields
*/
?>
<div class="wrap">
<hr class="wp-header-end">
<div class="fcfSettings">
<ul class="fcfSettings__columns">
<li class="fcfSettings__column">
<div class="fcfSettings__headline">
<?php echo esc_html__( 'Flexible Checkout Fields', 'flexible-checkout-fields' ); ?>
</div>
</li>
</ul>
<ul class="fcfSettings__columns">
<li class="fcfSettings__column">
<div class="fcfWidget">
<div class="fcfWidget__inner">
<div class="fcfTabs">
<ul class="fcfTabs__items">
<?php foreach ( $menu_tabs as $menu_tab ) : ?>
<li class="fcfTabs__item">
<a href="<?php echo esc_url( $menu_tab['url'] ); ?>"
class="fcfTabs__itemLink <?php echo ( $menu_tab['is_active'] ) ? 'fcfTabs__itemLink--active' : ''; ?>">
<?php echo esc_html( $menu_tab['label'] ); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>
<?php if ( $menu_sections ) : ?>
<div class="fcfTabs fcfTabs--small fcfTabs--lines">
<ul class="fcfTabs__items">
<?php foreach ( $menu_sections as $menu_section ) : ?>
<li class="fcfTabs__item">
<a href="<?php echo esc_url( $menu_section['url'] ); ?>"
class="fcfTabs__itemLink <?php echo ( $menu_section['is_active'] ) ? 'fcfTabs__itemLink--active' : ''; ?>">
<?php echo esc_html( $menu_section['label'] ); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</li>
</ul>
<div id="fcf-settings"></div>
<ul class="fcfSettings__columns fcfSettings__columns--margin">
<li class="fcfSettings__column">
<div class="fcfSettings__footer">
<?php
echo wp_kses_post(
sprintf(
/* translators: %$1s: love icon, %$2s: anchor opening tag, %$3s: anchor closing tag, %$4s: anchor opening tag, %$5s: anchor closing tag */
__( 'Created with %1$s by Rangers from %2$sWP Desk%3$s - if you like FCF %4$srate us%5$s', 'flexible-checkout-fields' ),
'<span class="fcfSettings__footerIcon fcfSettings__footerIcon--heart"></span>',
'<a href="' . esc_url( apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-footer-wpdesk-link' ) ) . '" target="_blank">',
'</a>',
'<a href="' . esc_url( apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-footer-review-link' ) ) . '" target="_blank">',
'<span class="fcfSettings__footerIcon fcfSettings__footerIcon--star"></span>
<span class="fcfSettings__footerIcon fcfSettings__footerIcon--star"></span>
<span class="fcfSettings__footerIcon fcfSettings__footerIcon--star"></span>
<span class="fcfSettings__footerIcon fcfSettings__footerIcon--star"></span>
<span class="fcfSettings__footerIcon fcfSettings__footerIcon--star"></span>
</a>'
)
);
?>
</div>
</li>
</ul>
</div>
</div>
<script>
window.reactInit = <?php echo json_encode( $settings ); ?>;
</script>