Skip to content

Commit

Permalink
added label to textarea component that is probably causing the cypres…
Browse files Browse the repository at this point in the history
…s test fail
  • Loading branch information
geckod22 committed Nov 28, 2024
1 parent 1a63d43 commit ae3e375
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions components/cacheExclusion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const CacheExclusion = ({ methods, constants }) => {
onChange={ handleCacheExclusionChange }
value={currentValue}
rows="1"
label={constants.text.cacheExclusionTitle}
/>
{isEdited &&
<Button
Expand Down
13 changes: 10 additions & 3 deletions includes/Performance.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

namespace NewfoldLabs\WP\Module\Performance;

use NewfoldLabs\WP\Module\Performance\CacheTypes\Browser;
use NewfoldLabs\WP\Module\Performance\CacheTypes\File;
use NewfoldLabs\WP\Module\Performance\CacheTypes\Skip404;
use NewfoldLabs\WP\ModuleLoader\Container;

/**
Expand Down Expand Up @@ -81,6 +78,8 @@ public function __construct( Container $container ) {
$container->set( 'cachePurger', $cachePurger );

$container->set( 'hasMustUsePlugin', file_exists( WPMU_PLUGIN_DIR . '/endurance-page-cache.php' ) );

add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
}

/**
Expand Down Expand Up @@ -289,4 +288,12 @@ public function adminBarMenu( \WP_Admin_Bar $wp_admin_bar ) {
);
}
}
/**
* Enqueue scripts and styles in admin
*/
public function enqueue_scripts() {
$plugin_url = $this->container->plugin()->url . get_styles_path();
wp_register_style( 'wp-module-performance-styles', $plugin_url, array(), $this->container->plugin()->version );
wp_enqueue_style( 'wp-module-performance-styles' );
}
}
9 changes: 9 additions & 0 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,12 @@ function toSnakeCase( string $value, string $delimiter = '_' ) {
function toStudlyCase( $value ) {
return str_replace( ' ', '', ucwords( str_replace( array( '-', '_' ), ' ', $value ) ) );
}

/**
* Get styles path.
*
* return string
*/
function get_styles_path() {
return 'vendor/newfold-labs/wp-module-performance/styles/styles.css';
}
1 change: 1 addition & 0 deletions styles/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.newfold-cache-exclusion .nfd-textarea-field label { display: none;}

0 comments on commit ae3e375

Please sign in to comment.