Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ web/wp-content/plugins/image-box/node_modules
web/wp-content/plugins/track-grid/node_modules
!web/wp-content/plugins/custom-iframe
web/wp-content/plugins/custom-iframe/node_modules
!web/wp-content/plugins/sessionize-schedule
web/wp-content/plugins/sessionize-schedule/node_modules
!web/wp-content/plugins/live-stream-gate-block
web/wp-content/plugins/live-stream-gate-block/node_modules
!web/wp-content/plugins/core-block-customisations
Expand Down
21 changes: 21 additions & 0 deletions web/wp-content/plugins/sessionize-schedule/.editorconfig
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
27 changes: 27 additions & 0 deletions web/wp-content/plugins/sessionize-schedule/.gitignore
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
14 changes: 14 additions & 0 deletions web/wp-content/plugins/sessionize-schedule/block.json
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",
Comment thread
cjyabraham marked this conversation as resolved.
Outdated
"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');
1 change: 1 addition & 0 deletions web/wp-content/plugins/sessionize-schedule/build/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/wp-content/plugins/sessionize-schedule/build/index.js

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 @@

Comment thread
cjyabraham marked this conversation as resolved.
Outdated
65 changes: 65 additions & 0 deletions web/wp-content/plugins/sessionize-schedule/custom-iframe.php
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
*
Comment thread
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__;

Comment thread
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',
)
Comment thread
cjyabraham marked this conversation as resolved.
Outdated
);
}
add_action( 'init', 'lf_custom_iframe_block_init' );
1 change: 1 addition & 0 deletions web/wp-content/themes/lfevents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Comment thread
cjyabraham marked this conversation as resolved.
Outdated
Comment thread
cjyabraham marked this conversation as resolved.
Outdated
"install-icon-list": "npm install --prefix ../../plugins/icon-list/",
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install-sessionize-schedule points to ../../plugins/sessionize-schedule/, but the plugin added in this PR is web/wp-content/plugins/sessionize-blocks/ (and there is no sessionize-schedule directory). Update the script name/path to install the correct plugin directory.

Copilot uses AI. Check for mistakes.
"install-image-box": "npm install --prefix ../../plugins/image-box/",
"install-live-stream-gate": "npm install --prefix ../../plugins/live-stream-gate-block/",
Expand Down
Loading