inc2734 / wp-basis
This library customizes HTML to use sass-basis in WordPress.
Installs: 6 859
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 0
Open Issues: 3
Language:SCSS
Requires
- php: >=7.4
Requires (Dev)
- dev-master
- 13.0.2
- 13.0.1
- 13.0.0
- 12.1.3
- 12.1.2
- 12.1.1
- 12.1.0
- 12.0.17
- 12.0.16
- 12.0.15
- 12.0.14
- 12.0.13
- 12.0.12
- 12.0.11
- 12.0.10
- 12.0.9
- 12.0.8
- 12.0.7
- 12.0.6
- 12.0.5
- 12.0.4
- 12.0.3
- 12.0.2
- 12.0.1
- 12.0.0
- 11.1.1
- 11.1.0
- 11.0.2
- 11.0.1
- 11.0.0
- 10.0.3
- 10.0.2
- 10.0.1
- 10.0.0
- 9.0.7
- 9.0.6
- 9.0.5
- 9.0.4
- 9.0.1
- 8.0.4
- 8.0.3
- 8.0.2
- 8.0.1
- 8.0.0
- 7.7.2
- 7.7.1
- 7.7.0
- 7.6.3
- 7.6.2
- 7.6.1
- 7.6.0
- 7.5.3
- 7.5.2
- 7.5.1
- 7.5.0
- 7.4.1
- 7.4.0
- 7.3.0
- 7.2.1
- 7.2.0
- 7.1.0
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 5.6.7
- 5.6.6
- 5.6.5
- 5.6.4
- 5.6.3
- 5.6.2
- 5.6.1
- 5.6.0
- 5.5.1
- 5.5.0
- 5.4.2
- 5.4.1
- 5.4.0
- 5.3.4
- 5.3.3
- 5.3.2
- 5.3.1
- 5.3.0
- 5.2.1
- 5.2.0
- 5.1.1
- 5.1.0
- 5.0.6
- 5.0.5
- 5.0.4
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.0
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.1
- 1.0.0
- 0.7.7
- 0.7.6
- 0.7.5
- 0.7.4
- 0.7.3
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.0
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.0
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.0
- dev-dependabot/npm_and_yarn/http-cache-semantics-4.1.1
- dev-dependabot/npm_and_yarn/minimatch-3.0.8
- dev-dependabot/npm_and_yarn/shell-quote-1.7.4
This package is auto-updated.
Last update: 2024-10-14 13:06:06 UTC
README
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;
}
);
inc2734_wp_basis_wp_link_pages_args
/**
* @see https://developer.wordpress.org/reference/functions/wp_link_pages/
* @param array $args
* @return array
*/
add_filter(
'inc2734_wp_basis_wp_link_pages_args',
function( $args ) {
return $args;
}
);
inc2734_wp_basis_posts_pagination_args
/**
* @see https://developer.wordpress.org/reference/functions/get_the_posts_pagination/
* @param array $args
* @return array
*/
add_filter(
'inc2734_wp_basis_posts_pagination_args',
function( $args ) {
return $args;
}
);
inc2734_wp_basis_comments_pagination_args
/**
* @see https://developer.wordpress.org/reference/functions/get_the_comments_pagination/
* @param array $args
* @return array
*/
add_filter(
'inc2734_wp_basis_comments_pagination_args',
function( $args ) {
return $args;
}
);