Skip to content

Commit

Permalink
Move assets to includes so it builds correctly with plugin-zip.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauteri committed Dec 23, 2024
1 parent 544a262 commit 2f56e1f
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/blocks/icon/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '1b4ece6e84f08bd51024');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'bde5c36600fbb0593248');
2 changes: 1 addition & 1 deletion build/blocks/icon/index.js

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

2 changes: 1 addition & 1 deletion build/blocks/icon/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$gatherpress_icon = ! empty( $attributes['icon'] ) ? $attributes['icon'] : 'nametag';
$gatherpress_icon_color = ! empty( $attributes['iconColor'] ) ? $attributes['iconColor'] : 'inherit';
$gatherpress_icon_size = ! empty( $attributes['iconSize'] ) ? $attributes['iconSize'] : 20;
$gatherpress_svg_base_url = GATHERPRESS_CORE_URL . '/assets/svg/';
$gatherpress_svg_base_url = GATHERPRESS_CORE_URL . '/includes/assets/svg/';
$gatherpress_svg_url = $gatherpress_svg_base_url . $gatherpress_icon . '.svg';
$gatherpress_svg_content = '<svg><text x="0" y="15">' . esc_html__( 'SVG Error', 'gatherpress' ) . '</text></svg>';
$gatherpress_response = wp_safe_remote_get( $gatherpress_svg_url );
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion src/blocks/icon/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Edit = ({ attributes, setAttributes }) => {
const blockProps = useBlockProps();
const { icon, iconColor, iconSize } = attributes;
const [svgContent, setSvgContent] = useState('');
const svgBaseUrl = `${getFromGlobal('urls.pluginUrl')}assets/svg/`;
const svgBaseUrl = `${getFromGlobal('urls.pluginUrl')}includes/assets/svg/`;

// Icon original source: https://github.com/WordPress/dashicons/tree/master/svg-min.
const ICON_OPTIONS = [
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/icon/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$gatherpress_icon = ! empty( $attributes['icon'] ) ? $attributes['icon'] : 'nametag';
$gatherpress_icon_color = ! empty( $attributes['iconColor'] ) ? $attributes['iconColor'] : 'inherit';
$gatherpress_icon_size = ! empty( $attributes['iconSize'] ) ? $attributes['iconSize'] : 20;
$gatherpress_svg_base_url = GATHERPRESS_CORE_URL . '/assets/svg/';
$gatherpress_svg_base_url = GATHERPRESS_CORE_URL . '/includes/assets/svg/';
$gatherpress_svg_url = $gatherpress_svg_base_url . $gatherpress_icon . '.svg';
$gatherpress_svg_content = '<svg><text x="0" y="15">' . esc_html__( 'SVG Error', 'gatherpress' ) . '</text></svg>';
$gatherpress_response = wp_safe_remote_get( $gatherpress_svg_url );
Expand Down

0 comments on commit 2f56e1f

Please sign in to comment.