Changeset 3764362
- Timestamp:
- 10/25/2026 10:51:12 AM (4 days ago)
- Location:
- layers-doc-embed
- Files:
-
- 7 edited
- 8 copied
-
tags/1.3.0 (copied) (copied from layers-doc-embed/trunk )
-
tags/1.3.0/assets/embed.js (copied) (copied from layers-doc-embed/trunk/assets/embed.js ) (3 diffs)
-
tags/1.3.0/blocks/layers-doc/block.json (copied) (copied from layers-doc-embed/trunk/blocks/layers-doc/block.json ) (1 diff)
-
tags/1.3.0/blocks/layers-doc/index.asset.php (copied) (copied from layers-doc-embed/trunk/blocks/layers-doc/index.asset.php ) (1 diff)
-
tags/1.3.0/includes/render.php (copied) (copied from layers-doc-embed/trunk/includes/render.php ) (4 diffs)
-
tags/1.3.0/includes/settings.php (copied) (copied from layers-doc-embed/trunk/includes/settings.php ) (8 diffs)
-
tags/1.3.0/layers-doc-embed.php (copied) (copied from layers-doc-embed/trunk/layers-doc-embed.php ) (2 diffs)
-
tags/1.3.0/readme.txt (copied) (copied from layers-doc-embed/trunk/readme.txt ) (8 diffs)
-
trunk/assets/embed.js (modified) (3 diffs)
-
trunk/blocks/layers-doc/block.json (modified) (1 diff)
-
trunk/blocks/layers-doc/index.asset.php (modified) (1 diff)
-
trunk/includes/render.php (modified) (4 diffs)
-
trunk/includes/settings.php (modified) (8 diffs)
-
trunk/layers-doc-embed.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
layers-doc-embed/tags/1.3.0/assets/embed.js
r3764139 r3764362 11 11 } 12 12 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 28 13 function hello() { 29 14 var list = frames(); … … 31 16 try { 32 17 list[ i ].contentWindow.postMessage( { source: 'layers', type: 'layers:embed-hello' }, ORIGIN ); 33 sendConfig( list[ i ] );34 18 } catch ( e ) {} 35 19 } … … 42 26 var d = e.data; 43 27 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 }51 28 return; 52 29 } -
layers-doc-embed/tags/1.3.0/blocks/layers-doc/block.json
r3764139 r3764362 3 3 "apiVersion": 3, 4 4 "name": "layers-doc-embed/layers-doc", 5 "version": "1. 2.0",5 "version": "1.3.0", 6 6 "title": "Layers document", 7 7 "category": "embed", -
layers-doc-embed/tags/1.3.0/blocks/layers-doc/index.asset.php
r3764139 r3764362 2 2 return array( 3 3 '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', 5 5 ); -
layers-doc-embed/tags/1.3.0/includes/render.php
r3764139 r3764362 31 31 if ( '' === $from ) { 32 32 $host = wp_parse_url( home_url(), PHP_URL_HOST ); 33 $host = preg_replace( '/^www\./', '', (string) $host);33 $host = preg_replace( '/^www\./', '', strtolower( (string) $host ) ); 34 34 $from = 'embed-' . $host; 35 35 } … … 55 55 if ( '' === $slug ) { 56 56 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>'; 58 58 } 59 59 return ''; … … 72 72 'from' => $from, 73 73 ); 74 if ( '' !== $options['affiliate_code'] ) { 75 $args['ref'] = $options['affiliate_code']; 76 } 74 77 $view = isset( $atts['view'] ) && in_array( $atts['view'], array( 'page', 'file' ), true ) ? $atts['view'] : $options['view']; 75 78 if ( 'page' === $view ) { … … 88 91 $wrapper = 'class="layers-doc-embed"'; 89 92 } 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 }101 93 $html = '<div ' . $wrapper . '>'; 102 94 $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$sstyle="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>', 104 96 esc_url( $src ), 105 97 esc_attr( $title ), 106 $height, 107 $inquiry 98 $height 108 99 ); 109 100 if ( $options['credit'] ) { -
layers-doc-embed/tags/1.3.0/includes/settings.php
r3764139 r3764362 1 1 <?php 2 2 /** 3 * Settings → Layers Doc Embed.3 * Settings → Fillable Documents. 4 4 * 5 5 * @package LayersDocEmbed … … 16 16 * (wordpress.org plugin guideline 10). 17 17 * 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} 19 19 */ 20 20 function layers_doc_embed_options() { … … 27 27 'autoheight' => isset( $saved['autoheight'] ) ? (bool) $saved['autoheight'] : true, 28 28 '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'] : '', 30 30 ); 31 31 } … … 79 79 function layers_doc_embed_admin_menu() { 80 80 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' ), 83 83 'manage_options', 84 84 'layers-doc-embed', … … 123 123 $input = is_array( $input ) ? $input : array(); 124 124 $lang = isset( $input['lang'] ) ? sanitize_key( $input['lang'] ) : ''; 125 $code = isset( $input['affiliate_code'] ) ? strtolower( trim( sanitize_text_field( $input['affiliate_code'] ) ) ) : ''; 125 126 return array( 126 127 'lang' => array_key_exists( $lang, layers_doc_embed_languages() ) ? $lang : '', … … 129 130 'autoheight' => ! empty( $input['autoheight'] ), 130 131 '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 : '', 132 133 ); 133 134 } … … 144 145 ?> 145 146 <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> 147 148 <p> 148 149 <?php esc_html_e( 'Add a document with the "Layers document" block or the shortcode', 'layers-doc-embed' ); ?> … … 188 189 </tr> 189 190 <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> 194 195 </td> 195 196 </tr> -
layers-doc-embed/tags/1.3.0/layers-doc-embed.php
r3764139 r3764362 1 1 <?php 2 2 /** 3 * Plugin Name: Layers Doc Embed – Fillable Word, Excel & PowerPoint Documents3 * Plugin Name: Fillable Documents – let visitors fill Word and Excel forms on your page 4 4 * 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.05 * Description: Add live Word and Excel forms to any page. Visitors fill, calculate, print and download without signing in. 6 * Version: 1.3.0 7 7 * Requires at least: 6.3 8 8 * Requires PHP: 7.4 … … 20 20 } 21 21 22 define( 'LAYERS_DOC_EMBED_VERSION', '1. 2.0' );22 define( 'LAYERS_DOC_EMBED_VERSION', '1.3.0' ); 23 23 define( 'LAYERS_DOC_EMBED_FILE', __FILE__ ); 24 24 define( '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 === 2 2 Contributors: sumoffice 3 3 Tags: embed excel, embed word, embed powerpoint, fillable form, calculator … … 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 2.07 Stable tag: 1.3.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 48 48 * **Automatic height:** the frame follows the length of the document. The small script that does it ships inside the plugin. 49 49 * **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. 51 51 52 52 **Privacy** 53 53 54 54 * **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. 56 56 * **No credit link by default.** A "Powered by Layers" link appears only if you turn it on. 57 57 * **Clean uninstall:** removing the plugin deletes its settings and cached catalog. 58 59 = Optional 30% affiliate share = 60 61 If 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. 58 62 59 63 Browse the catalog and copy slugs at [layers.md/embed](https://layers.md/embed). … … 70 74 = Settings = 71 75 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).76 Settings → 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). 73 77 74 78 == External services == … … 77 81 78 82 * **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. 81 84 * **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. 82 85 … … 87 90 1. Install from Plugins → Add New, or upload the zip and activate. 88 91 2. 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.92 3. Optional: open Settings → Fillable Documents to set defaults or add your Layers affiliate code. 90 93 91 94 == Frequently Asked Questions == … … 109 112 = Which languages are in the catalog? = 110 113 111 28 languages, from English, Spanish, French and Arabic to Japanese, Korean and Vietnamese. In Settings → Layers Doc Embedyou 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.114 28 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. 112 115 113 116 = Can I embed my own .docx, .xlsx or .pptx? = … … 135 138 == Changelog == 136 139 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 137 145 = 1.2.0 = 138 146 * Optional consent-based “Send to this company” button for filled documents. -
layers-doc-embed/trunk/assets/embed.js
r3764139 r3764362 11 11 } 12 12 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 28 13 function hello() { 29 14 var list = frames(); … … 31 16 try { 32 17 list[ i ].contentWindow.postMessage( { source: 'layers', type: 'layers:embed-hello' }, ORIGIN ); 33 sendConfig( list[ i ] );34 18 } catch ( e ) {} 35 19 } … … 42 26 var d = e.data; 43 27 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 }51 28 return; 52 29 } -
layers-doc-embed/trunk/blocks/layers-doc/block.json
r3764139 r3764362 3 3 "apiVersion": 3, 4 4 "name": "layers-doc-embed/layers-doc", 5 "version": "1. 2.0",5 "version": "1.3.0", 6 6 "title": "Layers document", 7 7 "category": "embed", -
layers-doc-embed/trunk/blocks/layers-doc/index.asset.php
r3764139 r3764362 2 2 return array( 3 3 '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', 5 5 ); -
layers-doc-embed/trunk/includes/render.php
r3764139 r3764362 31 31 if ( '' === $from ) { 32 32 $host = wp_parse_url( home_url(), PHP_URL_HOST ); 33 $host = preg_replace( '/^www\./', '', (string) $host);33 $host = preg_replace( '/^www\./', '', strtolower( (string) $host ) ); 34 34 $from = 'embed-' . $host; 35 35 } … … 55 55 if ( '' === $slug ) { 56 56 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>'; 58 58 } 59 59 return ''; … … 72 72 'from' => $from, 73 73 ); 74 if ( '' !== $options['affiliate_code'] ) { 75 $args['ref'] = $options['affiliate_code']; 76 } 74 77 $view = isset( $atts['view'] ) && in_array( $atts['view'], array( 'page', 'file' ), true ) ? $atts['view'] : $options['view']; 75 78 if ( 'page' === $view ) { … … 88 91 $wrapper = 'class="layers-doc-embed"'; 89 92 } 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 }101 93 $html = '<div ' . $wrapper . '>'; 102 94 $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$sstyle="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>', 104 96 esc_url( $src ), 105 97 esc_attr( $title ), 106 $height, 107 $inquiry 98 $height 108 99 ); 109 100 if ( $options['credit'] ) { -
layers-doc-embed/trunk/includes/settings.php
r3764139 r3764362 1 1 <?php 2 2 /** 3 * Settings → Layers Doc Embed.3 * Settings → Fillable Documents. 4 4 * 5 5 * @package LayersDocEmbed … … 16 16 * (wordpress.org plugin guideline 10). 17 17 * 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} 19 19 */ 20 20 function layers_doc_embed_options() { … … 27 27 'autoheight' => isset( $saved['autoheight'] ) ? (bool) $saved['autoheight'] : true, 28 28 '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'] : '', 30 30 ); 31 31 } … … 79 79 function layers_doc_embed_admin_menu() { 80 80 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' ), 83 83 'manage_options', 84 84 'layers-doc-embed', … … 123 123 $input = is_array( $input ) ? $input : array(); 124 124 $lang = isset( $input['lang'] ) ? sanitize_key( $input['lang'] ) : ''; 125 $code = isset( $input['affiliate_code'] ) ? strtolower( trim( sanitize_text_field( $input['affiliate_code'] ) ) ) : ''; 125 126 return array( 126 127 'lang' => array_key_exists( $lang, layers_doc_embed_languages() ) ? $lang : '', … … 129 130 'autoheight' => ! empty( $input['autoheight'] ), 130 131 '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 : '', 132 133 ); 133 134 } … … 144 145 ?> 145 146 <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> 147 148 <p> 148 149 <?php esc_html_e( 'Add a document with the "Layers document" block or the shortcode', 'layers-doc-embed' ); ?> … … 188 189 </tr> 189 190 <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> 194 195 </td> 195 196 </tr> -
layers-doc-embed/trunk/layers-doc-embed.php
r3764139 r3764362 1 1 <?php 2 2 /** 3 * Plugin Name: Layers Doc Embed – Fillable Word, Excel & PowerPoint Documents3 * Plugin Name: Fillable Documents – let visitors fill Word and Excel forms on your page 4 4 * 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.05 * Description: Add live Word and Excel forms to any page. Visitors fill, calculate, print and download without signing in. 6 * Version: 1.3.0 7 7 * Requires at least: 6.3 8 8 * Requires PHP: 7.4 … … 20 20 } 21 21 22 define( 'LAYERS_DOC_EMBED_VERSION', '1. 2.0' );22 define( 'LAYERS_DOC_EMBED_VERSION', '1.3.0' ); 23 23 define( 'LAYERS_DOC_EMBED_FILE', __FILE__ ); 24 24 define( '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 === 2 2 Contributors: sumoffice 3 3 Tags: embed excel, embed word, embed powerpoint, fillable form, calculator … … 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 2.07 Stable tag: 1.3.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 48 48 * **Automatic height:** the frame follows the length of the document. The small script that does it ships inside the plugin. 49 49 * **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. 51 51 52 52 **Privacy** 53 53 54 54 * **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. 56 56 * **No credit link by default.** A "Powered by Layers" link appears only if you turn it on. 57 57 * **Clean uninstall:** removing the plugin deletes its settings and cached catalog. 58 59 = Optional 30% affiliate share = 60 61 If 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. 58 62 59 63 Browse the catalog and copy slugs at [layers.md/embed](https://layers.md/embed). … … 70 74 = Settings = 71 75 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).76 Settings → 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). 73 77 74 78 == External services == … … 77 81 78 82 * **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. 81 84 * **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. 82 85 … … 87 90 1. Install from Plugins → Add New, or upload the zip and activate. 88 91 2. 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.92 3. Optional: open Settings → Fillable Documents to set defaults or add your Layers affiliate code. 90 93 91 94 == Frequently Asked Questions == … … 109 112 = Which languages are in the catalog? = 110 113 111 28 languages, from English, Spanish, French and Arabic to Japanese, Korean and Vietnamese. In Settings → Layers Doc Embedyou 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.114 28 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. 112 115 113 116 = Can I embed my own .docx, .xlsx or .pptx? = … … 135 138 == Changelog == 136 139 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 137 145 = 1.2.0 = 138 146 * Optional consent-based “Send to this company” button for filled documents.
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)