Skip to content

Commit 0da4020

Browse files
committed
We were already enqueueing JS and CSS in blocks.php.
1 parent 37d0683 commit 0da4020

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

blocks/blocks.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ function pmpro_place_blocks_in_panel( $categories, $post ) {
4545
function pmpro_block_editor_scripts() {
4646
// Enqueue the bundled block JS file.
4747
wp_enqueue_script(
48-
'pmpro-blocks-js',
48+
'pmpro-blocks-editor-js',
4949
plugins_url( 'js/editor.blocks.js', PMPRO_BASE_FILE ),
5050
array('wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-api', 'wp-editor'),
5151
PMPRO_VERSION
5252
);
5353

5454
// Enqueue optional editor only styles.
5555
wp_enqueue_style(
56-
'pmpro-editor-css',
56+
'pmpro-blocks-editor-css',
5757
plugins_url( 'css/blocks.editor.css', PMPRO_BASE_FILE ),
5858
array(),
5959
PMPRO_VERSION

includes/init.php

-20
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ function pmpro_init() {
88
require_once(PMPRO_DIR . '/includes/states.php');
99
require_once(PMPRO_DIR . '/includes/currencies.php');
1010

11-
// Block styles loaded early in frontend and dashboard.
12-
wp_enqueue_style( 'pmpro_blocks_style', plugins_url( 'css/blocks.style.css', dirname(__FILE__), array(), PMPRO_VERSION, 'screen' ) );
13-
1411
if( is_admin() ) {
1512
// Admin scripts and styles. We could use the admin_enqueue_scripts, but this works too.
1613

@@ -26,9 +23,6 @@ function pmpro_init() {
2623
));
2724
wp_enqueue_script( 'pmpro_admin' );
2825

29-
// Block styles loaded in the editor only.
30-
wp_enqueue_style( 'pmpro_blocks_editor', plugins_url( 'css/blocks.editor.css', dirname(__FILE__), array(), PMPRO_VERSION, 'screen' ) );
31-
3226
$admin_css_rtl = false;
3327
if(file_exists(get_stylesheet_directory() . "/paid-memberships-pro/css/admin.css")) {
3428
$admin_css = get_stylesheet_directory_uri() . "/paid-memberships-pro/css/admin.css";
@@ -157,20 +151,6 @@ function pmpro_pages_shortcode($atts, $content=null, $code="")
157151
{
158152
global $pmpro_page_name;
159153
$temp_content = pmpro_loadTemplate($pmpro_page_name, 'local', 'pages');
160-
161-
/*
162-
ob_start();
163-
164-
if(file_exists(get_stylesheet_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php"))
165-
include(get_stylesheet_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php");
166-
elseif(file_exists(get_template_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php"))
167-
include(get_template_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php");
168-
else
169-
include(PMPRO_DIR . "/pages/" . $pmpro_page_name . ".php");
170-
171-
$temp_content = ob_get_contents();
172-
// ob_end_clean();
173-
*/
174154
return apply_filters("pmpro_pages_shortcode_" . $pmpro_page_name, $temp_content);
175155
}
176156
add_shortcode("pmpro_" . $pmpro_page_name, "pmpro_pages_shortcode");

0 commit comments

Comments
 (0)