Plugin Directory

Changeset 3764362


Ignore:
Timestamp:
10/25/2026 10:51:12 AM (4 days ago)
Author:
sumoffice
Message:

Layers Doc Embed 1.3.0: Fillable Documents name, optional affiliate code, inquiry relay removed

Location:
layers-doc-embed
Files:
7 edited
8 copied

Legend:

Unmodified
Added
Removed
  • layers-doc-embed/tags/1.3.0/assets/embed.js

    r3764139 r3764362  
    1111        }
    1212
    13         function sendConfig( frame ) {
    14                 var email = ( frame.getAttribute( 'data-layers-inquiry-email' ) || '' ).trim();
    15                 var company = ( frame.getAttribute( 'data-layers-inquiry-company' ) || '' ).trim();
    16                 if ( ! email || ! company ) {
    17                         return;
    18                 }
    19                 try {
    20                         frame.contentWindow.postMessage( {
    21                                 source: 'layers-embed',
    22                                 type: 'layers:embed-config',
    23                                 inquiry: { email: email, company: company }
    24                         }, ORIGIN );
    25                 } catch ( e ) {}
    26         }
    27 
    2813        function hello() {
    2914                var list = frames();
    … …  
    3116                        try {
    3217                                list[ i ].contentWindow.postMessage( { source: 'layers', type: 'layers:embed-hello' }, ORIGIN );
    33                                 sendConfig( list[ i ] );
    3418                        } catch ( e ) {}
    3519                }
    … …  
    4226                var d = e.data;
    4327                if ( ! d || d.source !== 'layers' ) {
    44                         return;
    45                 }
    46                 if ( d.type === 'layers:embed-inquiry-ready' ) {
    47                         var ready = frames();
    48                         for ( var r = 0; r < ready.length; r++ ) {
    49                                 if ( ready[ r ].contentWindow === e.source ) sendConfig( ready[ r ] );
    50                         }
    5128                        return;
    5229                }
  • layers-doc-embed/tags/1.3.0/blocks/layers-doc/block.json

    r3764139 r3764362  
    33        "apiVersion": 3,
    44        "name": "layers-doc-embed/layers-doc",
    5         "version": "1.2.0",
     5        "version": "1.3.0",
    66        "title": "Layers document",
    77        "category": "embed",
  • layers-doc-embed/tags/1.3.0/blocks/layers-doc/index.asset.php

    r3764139 r3764362  
    22return array(
    33        'dependencies' => array( 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-block-editor', 'wp-components', 'wp-api-fetch', 'wp-server-side-render' ),
    4         'version'      => '1.2.0',
     4        'version'      => '1.3.0',
    55);
  • layers-doc-embed/tags/1.3.0/includes/render.php

    r3764139 r3764362  
    3131        if ( '' === $from ) {
    3232                $host = wp_parse_url( home_url(), PHP_URL_HOST );
    33                 $host = preg_replace( '/^www\./', '', (string) $host );
     33                $host = preg_replace( '/^www\./', '', strtolower( (string) $host ) );
    3434                $from = 'embed-' . $host;
    3535        }
    … …  
    5555        if ( '' === $slug ) {
    5656                if ( current_user_can( 'edit_posts' ) ) {
    57                         return '<p class="layers-doc-embed-error">' . esc_html__( 'Layers Doc Embed: set a template slug, for example [layers-doc slug="affidavit-of-loss"].', 'layers-doc-embed' ) . '</p>';
     57                        return '<p class="layers-doc-embed-error">' . esc_html__( 'Fillable Documents: set a template slug, for example [layers-doc slug="affidavit-of-loss"].', 'layers-doc-embed' ) . '</p>';
    5858                }
    5959                return '';
    … …  
    7272                'from'  => $from,
    7373        );
     74        if ( '' !== $options['affiliate_code'] ) {
     75                $args['ref'] = $options['affiliate_code'];
     76        }
    7477        $view = isset( $atts['view'] ) && in_array( $atts['view'], array( 'page', 'file' ), true ) ? $atts['view'] : $options['view'];
    7578        if ( 'page' === $view ) {
    … …  
    8891                $wrapper = 'class="layers-doc-embed"';
    8992        }
    90         $inquiry = '';
    91         if ( ! empty( $options['inquiry_email'] ) ) {
    92                 $company = wp_strip_all_tags( get_bloginfo( 'name' ) );
    93                 if ( '' !== trim( $company ) ) {
    94                         $inquiry = sprintf(
    95                                 ' data-layers-inquiry-email="%1$s" data-layers-inquiry-company="%2$s"',
    96                                 esc_attr( $options['inquiry_email'] ),
    97                                 esc_attr( $company )
    98                         );
    99                 }
    100         }
    10193        $html  = '<div ' . $wrapper . '>';
    10294        $html .= sprintf(
    103                 '<iframe src="%1$s" title="%2$s" width="100%%" height="%3$d" loading="lazy" allow="clipboard-read; clipboard-write" data-layers-embed%4$s style="border:0;width:100%%;max-width:100%%;display:block"></iframe>',
     95                '<iframe src="%1$s" title="%2$s" width="100%%" height="%3$d" loading="lazy" allow="clipboard-read; clipboard-write" data-layers-embed style="border:0;width:100%%;max-width:100%%;display:block"></iframe>',
    10496                esc_url( $src ),
    10597                esc_attr( $title ),
    106                 $height,
    107                 $inquiry
     98                $height
    10899        );
    109100        if ( $options['credit'] ) {
  • layers-doc-embed/tags/1.3.0/includes/settings.php

    r3764139 r3764362  
    11<?php
    22/**
    3  * Settings → Layers Doc Embed.
     3 * Settings → Fillable Documents.
    44 *
    55 * @package LayersDocEmbed
    … …  
    1616 * (wordpress.org plugin guideline 10).
    1717 *
    18  * @return array{lang:string,height:int,view:string,autoheight:bool,credit:bool,inquiry_email:string}
     18 * @return array{lang:string,height:int,view:string,autoheight:bool,credit:bool,affiliate_code:string}
    1919 */
    2020function layers_doc_embed_options() {
    … …  
    2727                'autoheight'    => isset( $saved['autoheight'] ) ? (bool) $saved['autoheight'] : true,
    2828                'credit'        => ! empty( $saved['credit'] ),
    29                 'inquiry_email' => isset( $saved['inquiry_email'] ) && is_email( $saved['inquiry_email'] ) ? sanitize_email( $saved['inquiry_email'] ) : '',
     29                'affiliate_code' => isset( $saved['affiliate_code'] ) && preg_match( '/^[a-z2-9]{8}$/', $saved['affiliate_code'] ) ? $saved['affiliate_code'] : '',
    3030        );
    3131}
    … …  
    7979function layers_doc_embed_admin_menu() {
    8080        add_options_page(
    81                 __( 'Layers Doc Embed', 'layers-doc-embed' ),
    82                 __( 'Layers Doc Embed', 'layers-doc-embed' ),
     81                __( 'Fillable Documents', 'layers-doc-embed' ),
     82                __( 'Fillable Documents', 'layers-doc-embed' ),
    8383                'manage_options',
    8484                'layers-doc-embed',
    … …  
    123123        $input = is_array( $input ) ? $input : array();
    124124        $lang  = isset( $input['lang'] ) ? sanitize_key( $input['lang'] ) : '';
     125        $code  = isset( $input['affiliate_code'] ) ? strtolower( trim( sanitize_text_field( $input['affiliate_code'] ) ) ) : '';
    125126        return array(
    126127                'lang'          => array_key_exists( $lang, layers_doc_embed_languages() ) ? $lang : '',
    … …  
    129130                'autoheight'    => ! empty( $input['autoheight'] ),
    130131                'credit'        => ! empty( $input['credit'] ),
    131                 'inquiry_email' => isset( $input['inquiry_email'] ) && is_email( $input['inquiry_email'] ) ? sanitize_email( $input['inquiry_email'] ) : '',
     132                'affiliate_code' => preg_match( '/^[a-z2-9]{8}$/', $code ) ? $code : '',
    132133        );
    133134}
    … …  
    144145        ?>
    145146        <div class="wrap">
    146                 <h1><?php esc_html_e( 'Layers Doc Embed', 'layers-doc-embed' ); ?></h1>
     147                <h1><?php esc_html_e( 'Fillable Documents by Layers', 'layers-doc-embed' ); ?></h1>
    147148                <p>
    148149                        <?php esc_html_e( 'Add a document with the "Layers document" block or the shortcode', 'layers-doc-embed' ); ?>
    … …  
    188189                                </tr>
    189190                                <tr>
    190                                         <th scope="row"><label for="layers-doc-embed-inquiry-email"><?php esc_html_e( 'Email for document inquiries', 'layers-doc-embed' ); ?></label></th>
    191                                         <td>
    192                                                 <input id="layers-doc-embed-inquiry-email" type="email" name="<?php echo esc_attr( $name ); ?>[inquiry_email]" value="<?php echo esc_attr( $o['inquiry_email'] ); ?>" class="regular-text" autocomplete="email">
    193                                                 <p class="description"><?php esc_html_e( 'Optional. After filling a document, visitors can consent to send the filled file and their email to this address.', 'layers-doc-embed' ); ?></p>
     191                                        <th scope="row"><label for="layers-doc-embed-affiliate-code"><?php esc_html_e( 'Your Layers affiliate code', 'layers-doc-embed' ); ?></label></th>
     192                                        <td>
     193                                                <input id="layers-doc-embed-affiliate-code" type="text" inputmode="text" maxlength="8" pattern="[a-z2-9]{8}" name="<?php echo esc_attr( $name ); ?>[affiliate_code]" value="<?php echo esc_attr( $o['affiliate_code'] ); ?>" class="regular-text" autocomplete="off">
     194                                                <p class="description"><?php esc_html_e( 'Optional. Earn 30% of payments from visitors who become paying Layers customers. The code is added to the document frame; visitor contact details are never shared with you.', 'layers-doc-embed' ); ?></p>
    194195                                        </td>
    195196                                </tr>
  • layers-doc-embed/tags/1.3.0/layers-doc-embed.php

    r3764139 r3764362  
    11<?php
    22/**
    3  * Plugin Name:       Layers Doc Embed – Fillable Word, Excel & PowerPoint Documents
     3 * Plugin Name:       Fillable Documents – let visitors fill Word and Excel forms on your page
    44 * Plugin URI:        https://layers.md/embed
    5  * Description:       Embed a live, fillable Word document, Excel calculator or PowerPoint presentation on any page. Visitors fill it in, print and download it right on your site — no sign-in.
    6  * Version:           1.2.0
     5 * Description:       Add live Word and Excel forms to any page. Visitors fill, calculate, print and download without signing in.
     6 * Version:           1.3.0
    77 * Requires at least: 6.3
    88 * Requires PHP:      7.4
    … …  
    2020}
    2121
    22 define( 'LAYERS_DOC_EMBED_VERSION', '1.2.0' );
     22define( 'LAYERS_DOC_EMBED_VERSION', '1.3.0' );
    2323define( 'LAYERS_DOC_EMBED_FILE', __FILE__ );
    2424define( 'LAYERS_DOC_EMBED_DIR', plugin_dir_path( __FILE__ ) );
  • layers-doc-embed/tags/1.3.0/readme.txt

    r3764139 r3764362  
    1 === Layers Doc Embed – Fillable Word, Excel & PowerPoint Documents ===
     1=== Fillable Documents – let visitors fill Word and Excel forms on your page ===
    22Contributors: sumoffice
    33Tags: embed excel, embed word, embed powerpoint, fillable form, calculator
    … …  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.2.0
     7Stable tag: 1.3.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    4848* **Automatic height:** the frame follows the length of the document. The small script that does it ships inside the plugin.
    4949* **Lazy loading:** the frame waits until the visitor scrolls near it, so the rest of your page loads first.
    50 * **Settings page:** catalog language in the block picker, default height, default view, automatic height, and an optional email for document inquiries.
     50* **Settings page:** catalog language in the block picker, default height, default view, automatic height, and an optional Layers affiliate code.
    5151
    5252**Privacy**
    5353
    5454* **No advertising or analytics cookies in the frame**, so the embed adds nothing to your cookie banner for tracking.
    55 * **No sign-in and no personal data asked** from your visitors to fill in, print or download. The optional inquiry button asks for an email only after the visitor explicitly agrees to send the filled file and contact to your business.
     55* **No sign-in and no personal data asked** from your visitors to fill in, print or download. Visitor contact details are not sent to the website owner.
    5656* **No credit link by default.** A "Powered by Layers" link appears only if you turn it on.
    5757* **Clean uninstall:** removing the plugin deletes its settings and cached catalog.
     58
     59= Optional 30% affiliate share =
     60
     61If you have a Layers affiliate code, enter it in Settings → Fillable Documents. The plugin adds that eight-character code to the document frame as `ref`. If one of those visitors later becomes a paying Layers customer, the affiliate receives 30% of that payment under the Layers affiliate program. This does not give the affiliate the visitor's name, email, document or other contact details.
    5862
    5963Browse the catalog and copy slugs at [layers.md/embed](https://layers.md/embed).
    … …  
    7074= Settings =
    7175
    72 Settings → Layers Doc Embed: catalog language in the block picker, default height and view, automatic height, an optional email for filled-document inquiries, and an optional "Powered by Layers" credit link (off unless you turn it on).
     76Settings → Fillable Documents: catalog language in the block picker, default height and view, automatic height, an optional Layers affiliate code, and an optional "Powered by Layers" credit link (off unless you turn it on).
    7377
    7478== External services ==
    … …  
    7781
    7882* **What is loaded and when:** every page with a Layers block or shortcode shows a frame from `https://app.layers.md/t/<slug>`. The visitor's browser loads the document from Layers when the frame comes into view. When a visitor edits, prints or downloads the document, the browser exchanges the document with Layers.
    79 * **What is sent:** the template slug, a mark naming your site (`from=embed-<your-domain>`), and the standard request data of any web page (IP address, browser user agent, referring page). Layers counts opens and edits per site mark; it places no advertising or analytics cookies in the frame.
    80 * **Optional inquiry delivery:** if you configure an inquiry email, the plugin gives the frame that address and your site name without putting them in the frame URL. Only after the visitor enters their email and checks the consent box, Layers sends the filled document and visitor email to your configured address. Layers does not create a separate contact record for this request.
     83* **What is sent:** the template slug, a mark naming your site (`from=embed-<your-domain>`), the optional eight-character affiliate code (`ref`), and the standard request data of any web page (IP address, browser user agent, referring page). Layers counts opens and edits per site mark and attributes paid subscriptions to the affiliate code; it places no advertising or analytics cookies in the frame. Visitor contact details are not sent to the website owner.
    8184* **In the editor:** when an editor opens the block picker, your site (not the visitor's browser) fetches the public template list from `https://app.layers.md/v1/public/templates` and caches it for 12 hours.
    8285
    … …  
    87901. Install from Plugins → Add New, or upload the zip and activate.
    88912. Add the "Layers document" block to a page, search the catalog and pick a document. Or paste a shortcode.
    89 3. Optional: open Settings → Layers Doc Embed to set defaults.
     923. Optional: open Settings → Fillable Documents to set defaults or add your Layers affiliate code.
    9093
    9194== Frequently Asked Questions ==
    … …  
    109112= Which languages are in the catalog? =
    110113
    111 28 languages, from English, Spanish, French and Arabic to Japanese, Korean and Vietnamese. In Settings → Layers Doc Embed you can limit the block picker to one language. The documents keep their own language; the plugin's own screens are in English and can be translated.
     11428 languages, from English, Spanish, French and Arabic to Japanese, Korean and Vietnamese. In Settings → Fillable Documents you can limit the block picker to one language. The documents keep their own language; the plugin's own screens are in English and can be translated.
    112115
    113116= Can I embed my own .docx, .xlsx or .pptx? =
    … …  
    135138== Changelog ==
    136139
     140= 1.3.0 =
     141* New display name focused on the visitor action: fillable Word and Excel forms.
     142* Optional Layers affiliate code passes as `ref`; affiliates receive 30% of attributed payments without receiving visitor contact details.
     143* Removed the unreleased document-inquiry relay until that delivery path is ready.
     144
    137145= 1.2.0 =
    138146* Optional consent-based “Send to this company” button for filled documents.
  • layers-doc-embed/trunk/assets/embed.js

    r3764139 r3764362  
    1111        }
    1212
    13         function sendConfig( frame ) {
    14                 var email = ( frame.getAttribute( 'data-layers-inquiry-email' ) || '' ).trim();
    15                 var company = ( frame.getAttribute( 'data-layers-inquiry-company' ) || '' ).trim();
    16                 if ( ! email || ! company ) {
    17                         return;
    18                 }
    19                 try {
    20                         frame.contentWindow.postMessage( {
    21                                 source: 'layers-embed',
    22                                 type: 'layers:embed-config',
    23                                 inquiry: { email: email, company: company }
    24                         }, ORIGIN );
    25                 } catch ( e ) {}
    26         }
    27 
    2813        function hello() {
    2914                var list = frames();
    … …  
    3116                        try {
    3217                                list[ i ].contentWindow.postMessage( { source: 'layers', type: 'layers:embed-hello' }, ORIGIN );
    33                                 sendConfig( list[ i ] );
    3418                        } catch ( e ) {}
    3519                }
    … …  
    4226                var d = e.data;
    4327                if ( ! d || d.source !== 'layers' ) {
    44                         return;
    45                 }
    46                 if ( d.type === 'layers:embed-inquiry-ready' ) {
    47                         var ready = frames();
    48                         for ( var r = 0; r < ready.length; r++ ) {
    49                                 if ( ready[ r ].contentWindow === e.source ) sendConfig( ready[ r ] );
    50                         }
    5128                        return;
    5229                }
  • layers-doc-embed/trunk/blocks/layers-doc/block.json

    r3764139 r3764362  
    33        "apiVersion": 3,
    44        "name": "layers-doc-embed/layers-doc",
    5         "version": "1.2.0",
     5        "version": "1.3.0",
    66        "title": "Layers document",
    77        "category": "embed",
  • layers-doc-embed/trunk/blocks/layers-doc/index.asset.php

    r3764139 r3764362  
    22return array(
    33        'dependencies' => array( 'wp-blocks', 'wp-element', 'wp-i18n', 'wp-block-editor', 'wp-components', 'wp-api-fetch', 'wp-server-side-render' ),
    4         'version'      => '1.2.0',
     4        'version'      => '1.3.0',
    55);
  • layers-doc-embed/trunk/includes/render.php

    r3764139 r3764362  
    3131        if ( '' === $from ) {
    3232                $host = wp_parse_url( home_url(), PHP_URL_HOST );
    33                 $host = preg_replace( '/^www\./', '', (string) $host );
     33                $host = preg_replace( '/^www\./', '', strtolower( (string) $host ) );
    3434                $from = 'embed-' . $host;
    3535        }
    … …  
    5555        if ( '' === $slug ) {
    5656                if ( current_user_can( 'edit_posts' ) ) {
    57                         return '<p class="layers-doc-embed-error">' . esc_html__( 'Layers Doc Embed: set a template slug, for example [layers-doc slug="affidavit-of-loss"].', 'layers-doc-embed' ) . '</p>';
     57                        return '<p class="layers-doc-embed-error">' . esc_html__( 'Fillable Documents: set a template slug, for example [layers-doc slug="affidavit-of-loss"].', 'layers-doc-embed' ) . '</p>';
    5858                }
    5959                return '';
    … …  
    7272                'from'  => $from,
    7373        );
     74        if ( '' !== $options['affiliate_code'] ) {
     75                $args['ref'] = $options['affiliate_code'];
     76        }
    7477        $view = isset( $atts['view'] ) && in_array( $atts['view'], array( 'page', 'file' ), true ) ? $atts['view'] : $options['view'];
    7578        if ( 'page' === $view ) {
    … …  
    8891                $wrapper = 'class="layers-doc-embed"';
    8992        }
    90         $inquiry = '';
    91         if ( ! empty( $options['inquiry_email'] ) ) {
    92                 $company = wp_strip_all_tags( get_bloginfo( 'name' ) );
    93                 if ( '' !== trim( $company ) ) {
    94                         $inquiry = sprintf(
    95                                 ' data-layers-inquiry-email="%1$s" data-layers-inquiry-company="%2$s"',
    96                                 esc_attr( $options['inquiry_email'] ),
    97                                 esc_attr( $company )
    98                         );
    99                 }
    100         }
    10193        $html  = '<div ' . $wrapper . '>';
    10294        $html .= sprintf(
    103                 '<iframe src="%1$s" title="%2$s" width="100%%" height="%3$d" loading="lazy" allow="clipboard-read; clipboard-write" data-layers-embed%4$s style="border:0;width:100%%;max-width:100%%;display:block"></iframe>',
     95                '<iframe src="%1$s" title="%2$s" width="100%%" height="%3$d" loading="lazy" allow="clipboard-read; clipboard-write" data-layers-embed style="border:0;width:100%%;max-width:100%%;display:block"></iframe>',
    10496                esc_url( $src ),
    10597                esc_attr( $title ),
    106                 $height,
    107                 $inquiry
     98                $height
    10899        );
    109100        if ( $options['credit'] ) {
  • layers-doc-embed/trunk/includes/settings.php

    r3764139 r3764362  
    11<?php
    22/**
    3  * Settings → Layers Doc Embed.
     3 * Settings → Fillable Documents.
    44 *
    55 * @package LayersDocEmbed
    … …  
    1616 * (wordpress.org plugin guideline 10).
    1717 *
    18  * @return array{lang:string,height:int,view:string,autoheight:bool,credit:bool,inquiry_email:string}
     18 * @return array{lang:string,height:int,view:string,autoheight:bool,credit:bool,affiliate_code:string}
    1919 */
    2020function layers_doc_embed_options() {
    … …  
    2727                'autoheight'    => isset( $saved['autoheight'] ) ? (bool) $saved['autoheight'] : true,
    2828                'credit'        => ! empty( $saved['credit'] ),
    29                 'inquiry_email' => isset( $saved['inquiry_email'] ) && is_email( $saved['inquiry_email'] ) ? sanitize_email( $saved['inquiry_email'] ) : '',
     29                'affiliate_code' => isset( $saved['affiliate_code'] ) && preg_match( '/^[a-z2-9]{8}$/', $saved['affiliate_code'] ) ? $saved['affiliate_code'] : '',
    3030        );
    3131}
    … …  
    7979function layers_doc_embed_admin_menu() {
    8080        add_options_page(
    81                 __( 'Layers Doc Embed', 'layers-doc-embed' ),
    82                 __( 'Layers Doc Embed', 'layers-doc-embed' ),
     81                __( 'Fillable Documents', 'layers-doc-embed' ),
     82                __( 'Fillable Documents', 'layers-doc-embed' ),
    8383                'manage_options',
    8484                'layers-doc-embed',
    … …  
    123123        $input = is_array( $input ) ? $input : array();
    124124        $lang  = isset( $input['lang'] ) ? sanitize_key( $input['lang'] ) : '';
     125        $code  = isset( $input['affiliate_code'] ) ? strtolower( trim( sanitize_text_field( $input['affiliate_code'] ) ) ) : '';
    125126        return array(
    126127                'lang'          => array_key_exists( $lang, layers_doc_embed_languages() ) ? $lang : '',
    … …  
    129130                'autoheight'    => ! empty( $input['autoheight'] ),
    130131                'credit'        => ! empty( $input['credit'] ),
    131                 'inquiry_email' => isset( $input['inquiry_email'] ) && is_email( $input['inquiry_email'] ) ? sanitize_email( $input['inquiry_email'] ) : '',
     132                'affiliate_code' => preg_match( '/^[a-z2-9]{8}$/', $code ) ? $code : '',
    132133        );
    133134}
    … …  
    144145        ?>
    145146        <div class="wrap">
    146                 <h1><?php esc_html_e( 'Layers Doc Embed', 'layers-doc-embed' ); ?></h1>
     147                <h1><?php esc_html_e( 'Fillable Documents by Layers', 'layers-doc-embed' ); ?></h1>
    147148                <p>
    148149                        <?php esc_html_e( 'Add a document with the "Layers document" block or the shortcode', 'layers-doc-embed' ); ?>
    … …  
    188189                                </tr>
    189190                                <tr>
    190                                         <th scope="row"><label for="layers-doc-embed-inquiry-email"><?php esc_html_e( 'Email for document inquiries', 'layers-doc-embed' ); ?></label></th>
    191                                         <td>
    192                                                 <input id="layers-doc-embed-inquiry-email" type="email" name="<?php echo esc_attr( $name ); ?>[inquiry_email]" value="<?php echo esc_attr( $o['inquiry_email'] ); ?>" class="regular-text" autocomplete="email">
    193                                                 <p class="description"><?php esc_html_e( 'Optional. After filling a document, visitors can consent to send the filled file and their email to this address.', 'layers-doc-embed' ); ?></p>
     191                                        <th scope="row"><label for="layers-doc-embed-affiliate-code"><?php esc_html_e( 'Your Layers affiliate code', 'layers-doc-embed' ); ?></label></th>
     192                                        <td>
     193                                                <input id="layers-doc-embed-affiliate-code" type="text" inputmode="text" maxlength="8" pattern="[a-z2-9]{8}" name="<?php echo esc_attr( $name ); ?>[affiliate_code]" value="<?php echo esc_attr( $o['affiliate_code'] ); ?>" class="regular-text" autocomplete="off">
     194                                                <p class="description"><?php esc_html_e( 'Optional. Earn 30% of payments from visitors who become paying Layers customers. The code is added to the document frame; visitor contact details are never shared with you.', 'layers-doc-embed' ); ?></p>
    194195                                        </td>
    195196                                </tr>
  • layers-doc-embed/trunk/layers-doc-embed.php

    r3764139 r3764362  
    11<?php
    22/**
    3  * Plugin Name:       Layers Doc Embed – Fillable Word, Excel & PowerPoint Documents
     3 * Plugin Name:       Fillable Documents – let visitors fill Word and Excel forms on your page
    44 * Plugin URI:        https://layers.md/embed
    5  * Description:       Embed a live, fillable Word document, Excel calculator or PowerPoint presentation on any page. Visitors fill it in, print and download it right on your site — no sign-in.
    6  * Version:           1.2.0
     5 * Description:       Add live Word and Excel forms to any page. Visitors fill, calculate, print and download without signing in.
     6 * Version:           1.3.0
    77 * Requires at least: 6.3
    88 * Requires PHP:      7.4
    … …  
    2020}
    2121
    22 define( 'LAYERS_DOC_EMBED_VERSION', '1.2.0' );
     22define( 'LAYERS_DOC_EMBED_VERSION', '1.3.0' );
    2323define( 'LAYERS_DOC_EMBED_FILE', __FILE__ );
    2424define( 'LAYERS_DOC_EMBED_DIR', plugin_dir_path( __FILE__ ) );
  • layers-doc-embed/trunk/readme.txt

    r3764139 r3764362  
    1 === Layers Doc Embed – Fillable Word, Excel & PowerPoint Documents ===
     1=== Fillable Documents – let visitors fill Word and Excel forms on your page ===
    22Contributors: sumoffice
    33Tags: embed excel, embed word, embed powerpoint, fillable form, calculator
    … …  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.2.0
     7Stable tag: 1.3.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    4848* **Automatic height:** the frame follows the length of the document. The small script that does it ships inside the plugin.
    4949* **Lazy loading:** the frame waits until the visitor scrolls near it, so the rest of your page loads first.
    50 * **Settings page:** catalog language in the block picker, default height, default view, automatic height, and an optional email for document inquiries.
     50* **Settings page:** catalog language in the block picker, default height, default view, automatic height, and an optional Layers affiliate code.
    5151
    5252**Privacy**
    5353
    5454* **No advertising or analytics cookies in the frame**, so the embed adds nothing to your cookie banner for tracking.
    55 * **No sign-in and no personal data asked** from your visitors to fill in, print or download. The optional inquiry button asks for an email only after the visitor explicitly agrees to send the filled file and contact to your business.
     55* **No sign-in and no personal data asked** from your visitors to fill in, print or download. Visitor contact details are not sent to the website owner.
    5656* **No credit link by default.** A "Powered by Layers" link appears only if you turn it on.
    5757* **Clean uninstall:** removing the plugin deletes its settings and cached catalog.
     58
     59= Optional 30% affiliate share =
     60
     61If you have a Layers affiliate code, enter it in Settings → Fillable Documents. The plugin adds that eight-character code to the document frame as `ref`. If one of those visitors later becomes a paying Layers customer, the affiliate receives 30% of that payment under the Layers affiliate program. This does not give the affiliate the visitor's name, email, document or other contact details.
    5862
    5963Browse the catalog and copy slugs at [layers.md/embed](https://layers.md/embed).
    … …  
    7074= Settings =
    7175
    72 Settings → Layers Doc Embed: catalog language in the block picker, default height and view, automatic height, an optional email for filled-document inquiries, and an optional "Powered by Layers" credit link (off unless you turn it on).
     76Settings → Fillable Documents: catalog language in the block picker, default height and view, automatic height, an optional Layers affiliate code, and an optional "Powered by Layers" credit link (off unless you turn it on).
    7377
    7478== External services ==
    … …  
    7781
    7882* **What is loaded and when:** every page with a Layers block or shortcode shows a frame from `https://app.layers.md/t/<slug>`. The visitor's browser loads the document from Layers when the frame comes into view. When a visitor edits, prints or downloads the document, the browser exchanges the document with Layers.
    79 * **What is sent:** the template slug, a mark naming your site (`from=embed-<your-domain>`), and the standard request data of any web page (IP address, browser user agent, referring page). Layers counts opens and edits per site mark; it places no advertising or analytics cookies in the frame.
    80 * **Optional inquiry delivery:** if you configure an inquiry email, the plugin gives the frame that address and your site name without putting them in the frame URL. Only after the visitor enters their email and checks the consent box, Layers sends the filled document and visitor email to your configured address. Layers does not create a separate contact record for this request.
     83* **What is sent:** the template slug, a mark naming your site (`from=embed-<your-domain>`), the optional eight-character affiliate code (`ref`), and the standard request data of any web page (IP address, browser user agent, referring page). Layers counts opens and edits per site mark and attributes paid subscriptions to the affiliate code; it places no advertising or analytics cookies in the frame. Visitor contact details are not sent to the website owner.
    8184* **In the editor:** when an editor opens the block picker, your site (not the visitor's browser) fetches the public template list from `https://app.layers.md/v1/public/templates` and caches it for 12 hours.
    8285
    … …  
    87901. Install from Plugins → Add New, or upload the zip and activate.
    88912. Add the "Layers document" block to a page, search the catalog and pick a document. Or paste a shortcode.
    89 3. Optional: open Settings → Layers Doc Embed to set defaults.
     923. Optional: open Settings → Fillable Documents to set defaults or add your Layers affiliate code.
    9093
    9194== Frequently Asked Questions ==
    … …  
    109112= Which languages are in the catalog? =
    110113
    111 28 languages, from English, Spanish, French and Arabic to Japanese, Korean and Vietnamese. In Settings → Layers Doc Embed you can limit the block picker to one language. The documents keep their own language; the plugin's own screens are in English and can be translated.
     11428 languages, from English, Spanish, French and Arabic to Japanese, Korean and Vietnamese. In Settings → Fillable Documents you can limit the block picker to one language. The documents keep their own language; the plugin's own screens are in English and can be translated.
    112115
    113116= Can I embed my own .docx, .xlsx or .pptx? =
    … …  
    135138== Changelog ==
    136139
     140= 1.3.0 =
     141* New display name focused on the visitor action: fillable Word and Excel forms.
     142* Optional Layers affiliate code passes as `ref`; affiliates receive 30% of attributed payments without receiving visitor contact details.
     143* Removed the unreleased document-inquiry relay until that delivery path is ready.
     144
    137145= 1.2.0 =
    138146* Optional consent-based “Send to this company” button for filled documents.
Note: See TracChangeset for help on using the changeset viewer.