inc2734/wp-basis

This library customizes HTML to use sass-basis in WordPress.

Installs: 2 057

Dependents: 1

Suggesters: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Language:CSS


README

Build Status Latest Stable Version License

Requirements

  • Node.js

Install

$ composer require inc2734/wp-basis

How to use

<?php
// When Using composer auto loader
$Basis = new Inc2734\WP_Basis\Bootstrap();
// in style.scss
$_font-path: '/PATH/TO/vendor/inc2734/wp-basis/src/assets/packages/sass-basis/src/font' !default;
@import '/PATH/TO/vendor/inc2734/wp-basis/src/assets/packages/sass-basis/src/css/basis';
// in js
import '/PATH/TO/vendor/inc2734/wp-basis/src/assets/packages/sass-basis/src/js/basis.js';

import BasisStickyHeader from '/PATH/TO/vendor/inc2734/wp-basis/src/assets/packages/sass-basis-layout/src/js/sticky-header.js';
document.addEventListener(
  'DOMContentLoaded',
  () => {
    new BasisStickyHeader();
  },
  false
);

## Walker_Nav_Menu for navbar

wp_nav_menu( [ 'walker' => new \Inc2734\WP_Basis\App\Walker\Navbar(), ] );


## Walker_Nav_Menu for drawer

wp_nav_menu( [ 'walker' => new \Inc2734\WP_Basis\App\Walker\Drawer(), ] );


## Filter hooks
### inc2734_wp_basis_use_responsive_iframe

/**

  • Return false when you don't want to use responsive iframe
  • @param boolean $use true
  • @return boolean */ add_filter( 'inc2734_wp_basis_use_responsive_iframe', function( $use ) { return false; } );

### inc2734_wp_basis_4to3_oembed_domains

/**

  • oEmbed container size is 16 to 9.
  • Return domains if you want to make the size 4 to 3 in some domains.
  • @param array $domains
  • @var string https?://www.slideshare.net
  • @var string https?://speakerdeck.com
  • @return array */ add_filter( 'inc2734_wp_basis_4to3_oembed_domains', function( $domains ) { return $domains; } );