Skip to content

Commit

Permalink
Update composer file
Browse files Browse the repository at this point in the history
  • Loading branch information
raftaar1191 committed Nov 30, 2023
1 parent 40d79d5 commit 66a8d6b
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 83 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
],
"require": {
"acrosswp/acrosswp-buddypress-or-buddyboss-dependency": "dev-main",
"yahnis-elsts/plugin-update-checker": "dev-master",
"acrosswp/acrosswp-plugin-update-checker-github": "dev-main",
"wpify/custom-fields": "dev-master"
},
Expand Down
22 changes: 12 additions & 10 deletions composer.lock

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
Expand Up @@ -11,6 +11,9 @@
"autoload": {
"files": ["updater.php"]
},
"require": {
"yahnis-elsts/plugin-update-checker": "dev-master"
},
"support": {
"issues": "https://github.com/acrosswp/acrosswp-plugin-update-checker-github/issues"
},
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

return array(
'ba3e6311190fef6b803d614907261c88' => $vendorDir . '/acrosswp/acrosswp-dependency/acrosswp-dependency.php',
'45a16669595eb3c0a9e2994e57fc3188' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v5p3.php',
'dc38373a0e8e9b61437f4120cca10acf' => $vendorDir . '/acrosswp/acrosswp-buddypress-or-buddyboss-dependency/dependency.php',
'b808676c575d8cc3a144a9eb5971e0d9' => $vendorDir . '/acrosswp/acrosswp-plugin-update-checker-github/updater.php',
'f6b87e4acab98b2fead22b4d637bae15' => $vendorDir . '/wpify/custom-fields/functions.php',
'45a16669595eb3c0a9e2994e57fc3188' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v5p3.php',
);
2 changes: 1 addition & 1 deletion vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class ComposerStaticInitc2f6021fd27f99fa8258c76527f1da4c
{
public static $files = array (
'ba3e6311190fef6b803d614907261c88' => __DIR__ . '/..' . '/acrosswp/acrosswp-dependency/acrosswp-dependency.php',
'45a16669595eb3c0a9e2994e57fc3188' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v5p3.php',
'dc38373a0e8e9b61437f4120cca10acf' => __DIR__ . '/..' . '/acrosswp/acrosswp-buddypress-or-buddyboss-dependency/dependency.php',
'b808676c575d8cc3a144a9eb5971e0d9' => __DIR__ . '/..' . '/acrosswp/acrosswp-plugin-update-checker-github/updater.php',
'f6b87e4acab98b2fead22b4d637bae15' => __DIR__ . '/..' . '/wpify/custom-fields/functions.php',
'45a16669595eb3c0a9e2994e57fc3188' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v5p3.php',
);

public static $prefixLengthsPsr4 = array (
Expand Down
19 changes: 11 additions & 8 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,18 @@
"source": {
"type": "git",
"url": "https://github.com/acrosswp/acrosswp-plugin-update-checker-github.git",
"reference": "9599e9ed6cbca3684b120f4174fa4780a6d57566"
"reference": "43933bdd6a4e46ce41d3b9427db4586f2d4ab39f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/acrosswp/acrosswp-plugin-update-checker-github/zipball/9599e9ed6cbca3684b120f4174fa4780a6d57566",
"reference": "9599e9ed6cbca3684b120f4174fa4780a6d57566",
"url": "https://api.github.com/repos/acrosswp/acrosswp-plugin-update-checker-github/zipball/43933bdd6a4e46ce41d3b9427db4586f2d4ab39f",
"reference": "43933bdd6a4e46ce41d3b9427db4586f2d4ab39f",
"shasum": ""
},
"time": "2023-11-11T23:01:45+00:00",
"require": {
"yahnis-elsts/plugin-update-checker": "dev-master"
},
"time": "2023-11-30T07:35:22+00:00",
"default-branch": true,
"type": "library",
"installation-source": "dist",
Expand Down Expand Up @@ -148,12 +151,12 @@
"source": {
"type": "git",
"url": "[email protected]:wpify/custom-fields.git",
"reference": "72ed78678be40ce193d517d079035bc61d41e7be"
"reference": "cd55e4f45aead746e6cfab63000ed1b5d4328409"
},
"dist": {
"type": "zip",
"url": "https://gitlab.com/api/v4/projects/wpify%2Fcustom-fields/repository/archive.zip?sha=72ed78678be40ce193d517d079035bc61d41e7be",
"reference": "72ed78678be40ce193d517d079035bc61d41e7be",
"url": "https://gitlab.com/api/v4/projects/wpify%2Fcustom-fields/repository/archive.zip?sha=cd55e4f45aead746e6cfab63000ed1b5d4328409",
"reference": "cd55e4f45aead746e6cfab63000ed1b5d4328409",
"shasum": ""
},
"require": {
Expand All @@ -163,7 +166,7 @@
"require-dev": {
"symfony/var-dumper": "^v5.4"
},
"time": "2023-11-13T14:55:35+00:00",
"time": "2023-11-29T14:20:47+00:00",
"default-branch": true,
"type": "library",
"installation-source": "dist",
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'acrosswp/view-analytics',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'af31c533eaa44e4857c53031eff00ec8e5dfc5fe',
'reference' => '40d79d55d8d7f2dc57ca32585c529abafd8f9adf',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -35,7 +35,7 @@
'acrosswp/acrosswp-plugin-update-checker-github' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '9599e9ed6cbca3684b120f4174fa4780a6d57566',
'reference' => '43933bdd6a4e46ce41d3b9427db4586f2d4ab39f',
'type' => 'library',
'install_path' => __DIR__ . '/../acrosswp/acrosswp-plugin-update-checker-github',
'aliases' => array(
Expand All @@ -46,7 +46,7 @@
'acrosswp/view-analytics' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'af31c533eaa44e4857c53031eff00ec8e5dfc5fe',
'reference' => '40d79d55d8d7f2dc57ca32585c529abafd8f9adf',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -55,7 +55,7 @@
'wpify/custom-fields' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '72ed78678be40ce193d517d079035bc61d41e7be',
'reference' => 'cd55e4f45aead746e6cfab63000ed1b5d4328409',
'type' => 'library',
'install_path' => __DIR__ . '/../wpify/custom-fields',
'aliases' => array(
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => 'baf0858230627966f45f');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => '8d1dfc25616b7cf99598');
2 changes: 1 addition & 1 deletion vendor/wpify/custom-fields/build/wpify-custom-blocks.js

Large diffs are not rendered by default.

80 changes: 25 additions & 55 deletions vendor/wpify/custom-fields/src/Implementations/GutenbergBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class GutenbergBlock extends AbstractImplementation {
/**
* GutenbergBlock constructor.
*
* @param array $args
* @param array $args
* @param CustomFields $wcf
*/
public function __construct( array $args, CustomFields $wcf ) {
Expand Down Expand Up @@ -90,7 +90,7 @@ public function __construct( array $args, CustomFields $wcf ) {
}

add_action( 'init', array( $this, 'register_block' ), $defaults['init_priority'] );
add_action( 'current_screen', array( $this, 'add_editor_script' ) );
add_action( 'enqueue_block_assets', array( $this, 'enqueue_block_assets' ) );
}

/**
Expand All @@ -108,25 +108,33 @@ public function register_block() {
register_block_type( $this->name, $args );
}

/**
* @return void
*/
public function add_editor_script( $current_screen ) {
$display_callback = $this->display;

if ( ! boolval( $display_callback() ) ) {
return;
}
public function enqueue_block_assets() {
if ( is_admin() ) {
wp_enqueue_editor();
wp_enqueue_code_editor( array( 'type' => 'text/html' ) );

$args = $this->get_args();
$script = $this->wcf->get_assets()->enqueue_script(
'wpify-custom-blocks.js',
array( 'wp-tinymce', 'code-editor' ),
true,
array(
'wcf_code_editor_settings' => $this->wcf->get_assets()->get_code_editor_settings(),
'wcf_build_url' => $this->get_build_url(),
'wcf_date' => array(
'date_format' => get_option( 'date_format' ),
'time_format' => get_option( 'time_format' )
),
)
);

if ( $current_screen->is_block_editor() || in_array( $current_screen->id, array( 'widgets', 'customize' ) ) ) {
$js_args = $this->get_args( array( 'render_callback' ) );
$js_args['items'] = $this->fill_selects( $js_args['items'] );
$script = 'window.wcf_blocks=(window.wcf_blocks||{});window.wcf_blocks[\'' . $this->name . '\']=' . wp_json_encode( $js_args, JSON_UNESCAPED_UNICODE ) . ';';
$script .= 'window.wcf_build_url=' . wp_json_encode( $this->get_build_url() ) . ';';
$inline_script = 'window.wcf_blocks=(window.wcf_blocks||{});window.wcf_blocks[\'' . $this->name . '\']=' . wp_json_encode( $js_args, JSON_UNESCAPED_UNICODE ) . ';';
$inline_script .= 'window.wcf_build_url=' . wp_json_encode( $this->get_build_url() ) . ';';

wp_add_inline_script( $args['editor_script'], $script, 'before' );
wp_add_inline_script( $script, $inline_script, 'before' );

$this->wcf->get_assets()->enqueue_style( 'wpify-custom-blocks.css' );
}
}

Expand Down Expand Up @@ -181,45 +189,6 @@ public function get_args( $exclude = array() ) {
return $args;
}

/**
* @return string|null
*/
public function get_editor_script() {
if ( empty( $this->editor_script ) ) {
if ( is_admin() ) {
wp_enqueue_editor();
wp_enqueue_code_editor( array( 'type' => 'text/html' ) );
}

return $this->wcf->get_assets()->register_script(
'wpify-custom-blocks.js',
array( 'wp-tinymce', 'code-editor' ),
true,
array(
'wcf_code_editor_settings' => $this->wcf->get_assets()->get_code_editor_settings(),
'wcf_build_url' => $this->get_build_url(),
'wcf_date' => array(
'date_format' => get_option( 'date_format' ),
'time_format' => get_option( 'time_format' )
),
)
);
}

return null;
}

/**
* @return string|null
*/
public function get_editor_style() {
if ( empty( $this->editor_style ) ) {
return $this->wcf->get_assets()->register_style( 'wpify-custom-blocks.css' );
}

return null;
}

/**
* @return array
*/
Expand Down Expand Up @@ -261,6 +230,7 @@ public function get_field( $name, $item ) {
/**
* @param string $name
* @param string $value
* @param $item
*
* @return mixed
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ protected function blockFencedCodeContinue($Line, $Block)
return $Block;
}

$Block['element']['text']['text'] .= "\n".$Line['body'];
$Block['element']['text']['text'] .= "\n".$Line['body'];;

return $Block;
}
Expand Down

0 comments on commit 66a8d6b

Please sign in to comment.