Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wpmetabox/meta-box
Browse files Browse the repository at this point in the history
  • Loading branch information
rilwis committed Dec 21, 2024
2 parents 75eab01 + 1004e6c commit 7faa1b7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 33 deletions.
20 changes: 15 additions & 5 deletions css/image-select.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
.rwmb-image-select {
display: inline-block;
width: 80px;
height: 80px;
float: left;
margin: 0 10px 10px 0;
margin: 0 8px 8px 0;
border: 3px solid #d8d8d8;
border-radius: 3px;
border-radius: 4px;
padding: 1px;
cursor: pointer;

--color: #2271b1;
}

.block-editor-page .rwmb-image-select {
--color: var(--wp-admin-theme-color, #2271b1);
}

.rwmb-image-select img {
width: 100%;
height: 100%;
object-fit: cover;
}

.rwmb-image-select:hover,
.rwmb-image-select.rwmb-active {
border-color: #0074a2;
.rwmb-image-select:has(:checked) {
border-color: var(--color);
}

.rwmb-image_select.rwmb-image_select {
display: none;
}
1 change: 0 additions & 1 deletion inc/fields/image-select.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class RWMB_Image_Select_Field extends RWMB_Field {
public static function admin_enqueue_scripts() {
wp_enqueue_style( 'rwmb-image-select', RWMB_CSS_URL . 'image-select.css', [], RWMB_VER );
wp_style_add_data( 'rwmb-image-select', 'path', RWMB_CSS_DIR . 'image-select.css' );
wp_enqueue_script( 'rwmb-image-select', RWMB_JS_URL . 'image-select.js', [ 'jquery' ], RWMB_VER, true );
}

/**
Expand Down
27 changes: 0 additions & 27 deletions js/image-select.js

This file was deleted.

0 comments on commit 7faa1b7

Please sign in to comment.