PluginProbe
Pdf Embed / 0.2.2
Pdf Embed v0.2.2
0.6.2 0.6.1 trunk 0.1.0 0.1.1 0.1.2 0.1.3 0.1.4 0.1.5 0.1.6 0.1.7 0.1.8 0.1.9 0.2.0 0.2.1 0.2.2 0.2.3 0.2.4 0.2.5 0.2.6 0.2.7 0.2.8 0.2.9 0.3.0 0.3.1 All 54 releases
pdf-embed / pdf-embed.php

pdf-embed.php in Pdf Embed 0.2.2, at pdf-embed.php

44 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Pdf Embed
4 * Plugin URI: https://formello.net/
5 * Description: PDF embedded with official Adobe API.
6 * Version: 0.2.2
7 * Author: Formello
8 * Author URI: https://formello.net
9 * License: GPL2
10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11 * Text Domain: pdf-embed
12 *
13 * @package Formello/PdfEmbed
14 */
15
16 /**
17 * Registers the block using the metadata loaded from the `block.json` file.
18 * Behind the scenes, it registers also all assets so they can be enqueued
19 * through the block editor in the corresponding context.
20 *
21 * @see https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/writing-your-first-block-type/
22 */
23 function pdf_embed_block_init() {
24
25 register_block_type_from_metadata(
26 __DIR__,
27 );
28 }
29 add_action( 'init', 'pdf_embed_block_init' );
30
31 /**
32 * Register settings
33 */
34 function pdf_embed_setting() {
35 $args = array(
36 'type' => 'string',
37 'sanitize_callback' => 'sanitize_text_field',
38 'default' => '',
39 'show_in_rest' => true,
40 );
41 register_setting( 'embed_pdf', 'pdf_embed_api_key', $args );
42 }
43 add_action( 'init', 'pdf_embed_setting' );
44