-
Notifications
You must be signed in to change notification settings - Fork 9
Create blocks to integrate Sessionize schedules and speakers #1081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
8768d01
5ef8651
b316e0b
861fb58
fdee950
eb3a9dc
d919c7f
5d06d04
79ed35c
335e860
f7e0bef
f6a43f1
9a79543
4e77a2f
621fcb8
14fa8f8
4a45da3
4dca1bf
6e350b7
86bdbff
6a1bffd
4f62622
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # This file is for unifying the coding style for different editors and IDEs | ||
| # editorconfig.org | ||
|
|
||
| # WordPress Coding Standards | ||
| # https://make.wordpress.org/core/handbook/coding-standards/ | ||
|
|
||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
| indent_style = tab | ||
|
|
||
| [*.yml] | ||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| # Coverage directory used by tools like istanbul | ||
| coverage | ||
|
|
||
| # Compiled binary addons (https://nodejs.org/api/addons.html) | ||
| build/Release | ||
|
|
||
| # Dependency directories | ||
| node_modules/ | ||
|
|
||
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| # Optional eslint cache | ||
| .eslintcache | ||
|
|
||
| # Output of 'npm pack' | ||
| *.tgz | ||
|
|
||
| # dotenv environment variables file | ||
| .env |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "name": "lf/custom-iframe", | ||
| "title": "Custom iFrame", | ||
| "category": "common", | ||
| "icon": "smiley", | ||
| "description": "Embed an iframe, Google Sheet or Newsletter with better formatting", | ||
| "textdomain": "custom-iframe", | ||
| "supports": { | ||
| "html": false | ||
| }, | ||
| "editorScript": "file:./build/index.js", | ||
| "editorStyle": "file:./build/index.css", | ||
| "style": "file:./build/style-index.css" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '3210bbcd217e9b0eceab'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|
||
|
cjyabraham marked this conversation as resolved.
Outdated
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| <?php | ||
| /** | ||
| * Plugin Name: Custom iFrame | ||
| * Description: Embed an iframe, Google Sheet or Newsletter with better formatting | ||
| * Version: 0.1.0 | ||
| * Author: James Hunt | ||
| * License: GPL-2.0-or-later | ||
| * License URI: https://www.gnu.org/licenses/gpl-2.0.html | ||
| * Text Domain: custom-iframe | ||
| * | ||
|
cjyabraham marked this conversation as resolved.
Outdated
|
||
| * @package lf | ||
| */ | ||
|
|
||
| /** | ||
| * Registers all block assets so that they can be enqueued through the block editor | ||
| * in the corresponding context. | ||
| * | ||
| * @throws Error This. | ||
| * | ||
| * @see https://developer.wordpress.org/block-editor/tutorials/block-tutorial/applying-styles-with-stylesheets/ | ||
| */ | ||
| function lf_custom_iframe_block_init() { | ||
| $dir = __DIR__; | ||
|
|
||
|
cjyabraham marked this conversation as resolved.
Outdated
|
||
| $script_asset_path = "$dir/build/index.asset.php"; | ||
| if ( ! file_exists( $script_asset_path ) ) { | ||
| throw new Error( | ||
| 'You need to run `npm start` or `npm run build` for the "lf/custom-iframe" block first.' | ||
| ); | ||
| } | ||
| $index_js = 'build/index.js'; | ||
| $script_asset = require $script_asset_path; | ||
| wp_register_script( | ||
| 'lf-custom-iframe-block-editor', | ||
| plugins_url( $index_js, __FILE__ ), | ||
| $script_asset['dependencies'], | ||
| $script_asset['version'] | ||
| ); | ||
| wp_set_script_translations( 'lf-custom-iframe-block-editor', 'custom-iframe' ); | ||
|
|
||
| $editor_css = 'build/index.css'; | ||
| wp_register_style( | ||
| 'lf-custom-iframe-block-editor', | ||
| plugins_url( $editor_css, __FILE__ ), | ||
| array(), | ||
| filemtime( "$dir/$editor_css" ) | ||
| ); | ||
|
|
||
| $style_css = 'build/style-index.css'; | ||
| wp_register_style( | ||
| 'lf-custom-iframe-block', | ||
| plugins_url( $style_css, __FILE__ ), | ||
| array(), | ||
| filemtime( "$dir/$style_css" ) | ||
| ); | ||
|
|
||
| register_block_type( | ||
| 'lf/custom-iframe', | ||
| array( | ||
| 'editor_script' => 'lf-custom-iframe-block-editor', | ||
| 'editor_style' => 'lf-custom-iframe-block-editor', | ||
| ) | ||
|
cjyabraham marked this conversation as resolved.
Outdated
|
||
| ); | ||
| } | ||
| add_action( 'init', 'lf_custom_iframe_block_init' ); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ | |
| "install-core-block-customisations": "npm install --prefix ../../plugins/core-block-customisations/", | ||
| "install-countdown-block": "npm install --prefix ../../plugins/countdown-block/", | ||
| "install-custom-iframe": "npm install --prefix ../../plugins/custom-iframe/", | ||
| "install-sessionize-schedule": "npm install --prefix ../../plugins/sessionize-schedule/", | ||
|
cjyabraham marked this conversation as resolved.
Outdated
cjyabraham marked this conversation as resolved.
Outdated
|
||
| "install-icon-list": "npm install --prefix ../../plugins/icon-list/", | ||
|
||
| "install-image-box": "npm install --prefix ../../plugins/image-box/", | ||
| "install-live-stream-gate": "npm install --prefix ../../plugins/live-stream-gate-block/", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.