Skip to content

Commit

Permalink
[N/A] More Rebrand Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bd-viget committed Jan 6, 2025
1 parent cabd573 commit 027a8e7
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion wp-content/plugins/viget-blocks-toolkit/build/index.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions wp-content/plugins/viget-blocks-toolkit/includes/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'admin_enqueue_scripts',
function () {
wp_enqueue_style(
'acfbt-admin-css',
'vgtbt-admin-css',
VGTBT_PLUGIN_URL . 'assets/css/admin.css',
[],
VGTBT_VERSION
Expand All @@ -24,21 +24,21 @@ function () {
$dependencies = array_merge( $asset_file['dependencies'], [ 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ] );

wp_register_script(
'acfbt-editor-scripts',
'vgtbt-editor-scripts',
VGTBT_PLUGIN_URL . 'build/index.js',
$dependencies,
$asset_file['version']
);

wp_register_style(
'acfbt-editor-styles',
'vgtbt-editor-styles',
VGTBT_PLUGIN_URL . 'build/editor.css',
[],
VGTBT_VERSION
);

wp_set_script_translations(
'acfbt-editor-scripts',
'vgtbt-editor-scripts',
'viget-blocks-toolkit',
VGTBT_PLUGIN_URL . 'languages'
);
Expand All @@ -48,8 +48,8 @@ function () {
add_action(
'enqueue_block_editor_assets',
function () {
wp_enqueue_script( 'acfbt-editor-scripts' );
wp_enqueue_style( 'acfbt-editor-styles' );
wp_enqueue_script( 'vgtbt-editor-scripts' );
wp_enqueue_style( 'vgtbt-editor-styles' );
},
30
);
Expand All @@ -60,7 +60,7 @@ function () {
$asset_file = include VGTBT_PLUGIN_PATH . 'build/style.asset.php';

wp_enqueue_style(
'acfbt-block-styles',
'vgtbt-block-styles',
VGTBT_PLUGIN_URL . 'build/style.css',
[],
$asset_file['version']
Expand Down
12 changes: 6 additions & 6 deletions wp-content/plugins/viget-blocks-toolkit/includes/helpers.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?php
/**
* ACF Block Helpers
* Helper functions
*
* @package VigetBlocksToolkit
*/

use Viget\VigetBlocksToolkit\Core;

if ( ! function_exists( 'acfbt' ) ) {
if ( ! function_exists( 'vgtbt' ) ) {
/**
* ACF Blocks Toolkit Core API instance.
* Viget Blocks Toolkit Core API instance.
*
* @return Core
*/
function acfbt(): Core {
function vgtbt(): Core {
return Core::instance();
}
}
Expand Down Expand Up @@ -157,7 +157,7 @@ function get_block_class( array $block, string $custom_class = '' ): string {
}

if ( ! empty( $block['data']['limit_visibility'] ) ) {
$classes[] = 'acfbt-limit-visibility';
$classes[] = 'vgtbt-limit-visibility';
}

return apply_filters( 'vgtbt_block_class', implode( ' ', $classes ), $block );
Expand Down Expand Up @@ -346,7 +346,7 @@ function inner_blocks( array $props = [] ): void {
*
* @return void
*/
function print_admin_message( string $notice = '', string $class = 'acfbt-admin-message' ): void {
function print_admin_message( string $notice = '', string $class = 'vgtbt-admin-message' ): void {
if ( ! is_admin() || ! $notice ) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,16 +282,16 @@ private function enqueue_editor_assets(): void {
'enqueue_block_editor_assets',
function () {
wp_localize_script(
'acfbt-editor-scripts',
'acfbtIcons',
'vgtbt-editor-scripts',
'vgtbtIcons',
[
'json' => $this->get_icons(),
'supportedBlocks' => $this->get_supported_blocks(),
]
);

wp_add_inline_style(
'acfbt-editor-styles',
'vgtbt-editor-styles',
$this->editor_css()
);
},
Expand All @@ -311,7 +311,7 @@ function (): void {
wp_enqueue_block_style(
$block_name,
[
'handle' => 'acfbt-block-styles',
'handle' => 'vgtbt-block-styles',
'src' => VGTBT_PLUGIN_URL . 'build/style.css',
'ver' => VGTBT_VERSION,
'path' => VGTBT_PLUGIN_PATH . 'build/style.css',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ function () {
$unregister_styles = apply_filters( 'vgtbt_unregister_block_styles', [] );

wp_localize_script(
'acfbt-editor-scripts',
'acfbtStyles',
'vgtbt-editor-scripts',
'vgtbtStyles',
[
'unregister' => $unregister_styles,
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** global acfbtIcons */
/** global vgtbtIcons */

/**
* External dependencies
Expand All @@ -19,7 +19,7 @@ import {
__experimentalGrid as Grid, // eslint-disable-line
} from '@wordpress/components';

const icons = acfbtIcons.json;
const icons = vgtbtIcons.json;

/**
* All available icons.
Expand All @@ -34,7 +34,7 @@ export const ICONS = icons;
* @param {Object} settings
*/
function addAttributes(settings) {
if (!acfbtIcons.supportedBlocks.includes(settings.name)) {
if (!vgtbtIcons.supportedBlocks.includes(settings.name)) {
return settings;
}

Expand Down Expand Up @@ -72,7 +72,7 @@ addFilter(
*/
function addInspectorControls(BlockEdit) {
return (props) => {
if (!acfbtIcons.supportedBlocks.includes(props.name)) {
if (!vgtbtIcons.supportedBlocks.includes(props.name)) {
return <BlockEdit {...props} />;
}

Expand Down Expand Up @@ -147,7 +147,7 @@ function addClasses(BlockListBlock) {
return (props) => {
const { name, attributes } = props;

if (!acfbtIcons.supportedBlocks.includes(name) || !attributes?.icon) {
if (!vgtbtIcons.supportedBlocks.includes(name) || !attributes?.icon) {
return <BlockListBlock {...props} />;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** global acfbtStyles */
/** global vgtbtStyles */

const unregisterStyles = acfbtStyles.unregister;
const unregisterStyles = vgtbtStyles.unregister;

/**
* WordPress Dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
require_once 'src/classes/BreakpointVisibility.php';

// Initialize the plugin.
acfbt();
vgtbt();

0 comments on commit 027a8e7

Please sign in to comment.