Skip to content

Commit

Permalink
3.8.0
Browse files Browse the repository at this point in the history
POST COLUMN

- Refactored to have more friendly API.

EDITOR

- Temporarily removed "Slider" style in Gallery block.
- Added styling to fix the padding of ACF fields in sidebar.
  • Loading branch information
hrsetyono committed Apr 11, 2020
1 parent 61ce623 commit 41929d5
Show file tree
Hide file tree
Showing 10 changed files with 128 additions and 199 deletions.
19 changes: 0 additions & 19 deletions activation-hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,25 +116,6 @@ private function _create_default_nav() {
]
],

// BLOG
[
'name' => 'Blog Nav',
'location' => 'blog-nav',
'items' => [
[
'menu-item-title' => 'All Posts',
'menu-item-object' => 'post',
'menu-item-status' => 'publish',
'menu-item-type' => 'post_type_archive',
],
[
'menu-item-object-id' => 1,
'menu-item-object' => 'category',
'menu-item-status' => 'publish',
'menu-item-type' => 'taxonomy',
],
]
]
);

$locations = get_theme_mod( 'nav_menu_locations' );
Expand Down
4 changes: 2 additions & 2 deletions edje-wp-library.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* License: MIT
* Author: Pixel Studio
* Author URI: https://pixelstudio.id
* Version: 3.7.3
* Version: 3.8.0
*/

if( !defined( 'WPINC' ) ) { die; } // exit if accessed directly

// Constant
define( 'H_VERSION', '3.7.1' );
define( 'H_VERSION', '3.7.4' );
define( 'H_BASE', basename(dirname(__FILE__) ).'/'.basename(__FILE__) );

define( 'H_DIR', __DIR__ ); // for require
Expand Down
4 changes: 2 additions & 2 deletions module-editor/_index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/
function _h_enqueue_editor() {
$assets = plugin_dir_url(__FILE__) . 'assets';
wp_enqueue_style( 'h-editor', $assets . '/h-editor.css', [] );
wp_enqueue_script( 'h-editor', $assets . '/h-editor.js', [], false, true );
wp_enqueue_style( 'h-editor', $assets . '/h-editor.css', [], H_VERSION );
wp_enqueue_script( 'h-editor', $assets . '/h-editor.js', [], H_VERSION, true );
}

/**
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion module-editor/assets/h-editor.css

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions module-editor/assets/h-editor.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@

wp.domReady( function() {
// GALLERY
wp.blocks.registerBlockStyle( 'core/gallery', {
name: 'h-slider',
label: 'Slider'
} );

// MEDIA TEXT
wp.blocks.registerBlockStyle( 'core/media-text', {
name: 'h-larger-image',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// $include-grid: true
// $include-tile: true
// $output-framework: true
$acf-bg: #f3f3f4

.has-text-align-right
Expand All @@ -16,10 +12,23 @@ $acf-bg: #f3f3f4
&[data-align="wide"],
&[data-align="full"]
z-index: 25


///// COLUMNS
// Fixed bug where Wide column is almost full when on smaller screen
.wp-block[data-type="core/group"][data-align=full]>div>.wp-block-group>.wp-block-group__inner-container>.block-editor-inner-blocks
padding: 0 3rem

.editor-styles-wrapper > *
font-family: var(--fontFamily)

.editor-post-title__block .editor-post-title__input,
.editor-styles-wrapper .wp-block h1,
.editor-styles-wrapper .wp-block h2,
.editor-styles-wrapper .wp-block h3,
.editor-styles-wrapper .wp-block h4,
.editor-styles-wrapper .wp-block h5,
.editor-styles-wrapper .wp-block h6,
.editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter
font-family: var(--hFontFamily)


///// PARAGRAPH
Expand Down Expand Up @@ -109,31 +118,6 @@ $acf-bg: #f3f3f4
figcaption a
color: inherit

// Slider style
.wp-block-gallery.is-style-h-slider

.blocks-gallery-item
flex-grow: inherit

.blocks-gallery-item:nth-child(1),
.blocks-gallery-item:nth-child(2)
position: relative

&::before
position: absolute
top: 50%
font-size: 3rem
font-family: "dashicons"
transform: translateY( -50% )

.blocks-gallery-item:nth-child(1)::before
content: "\f341"
right: 100%

.blocks-gallery-item:nth-child(2)::before
content: "\f345"
left: 100%


///// COVER
Expand Down Expand Up @@ -339,10 +323,10 @@ div.acf-block-body .acf-fields
grid-row-gap: 1rem
border: none

.acf-block-panel &
min-height: auto
padding-top: 2rem
padding-bottom: 2rem
// .acf-block-panel &
// min-height: auto
// padding-top: 2rem
// padding-bottom: 2rem
> *
width: 100% !important
Expand Down Expand Up @@ -497,8 +481,10 @@ div.acf-block-body .acf-flexible-content
div.edit-post-sidebar .acf-block-fields
padding-top: 1rem
padding-bottom: 1rem
margin: 0

div.acf-field
margin: 0
margin-bottom: 1rem
padding: 0 1rem
width: 100% !important
Expand Down
8 changes: 4 additions & 4 deletions module-post-type/_index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ function h_register_taxonomy( string $name, array $args ) {
/**
* Override all columns in the Post Type table with this one.
*/
function h_override_columns( string $post_type, array $args ) {
function h_override_columns( string $post_type, array $columns ) {
if( !is_admin() ) { return; }

require_once __DIR__ . '/post-column.php';

$pc = new \h\Post_Column();
$pc->override( $post_type, $args );
$pc->override_columns( $post_type, $columns );
}

/**
Expand All @@ -64,13 +64,13 @@ function h_register_columns( string $post_type, array $args ) {
* @param string $post_type
* @param $args - Column keywords or arguments with callable
*/
function h_add_column( string $post_type, $args ) {
function h_add_column( string $post_type, $column ) {
if( !is_admin() ) { return; }

require_once __DIR__ . '/post-column.php';

$pc = new \h\Post_Column();
$pc->add( $post_type, $args );
$pc->add_column( $post_type, $column );
}


Expand Down
Loading

0 comments on commit 41929d5

Please sign in to comment.