wpbrasil / odin-toolkit Goto Github PK
View Code? Open in Web Editor NEWAs funcionalidades já conhecidas do Odin Framework convertidas para um plugin
As funcionalidades já conhecidas do Odin Framework convertidas para um plugin
Change the Theme Options class name and add parameters to make easy to add settings page in any admin menu item.
Implement the autoload classes feature. http://php.net/manual/pt_BR/language.oop5.autoload.php
Galera,
Eu adicionei aqui no meu toolkit o shortcode [container], ainda falta ampliar ele um pouco mais, eu sei que possa parecer estranho, mas é uma opção para quem quer variar entre o container-fluid e o container normal. Basta criar um template page com o .container-fluid no lugar do .container, para quem é designer pode ser uma ótima opção. Eu ainda tenho que alterar algumas coisas, estou querendo colocar a opção de classes também, só não consegui fazer ele aparecer no menu de shortcodes, mas isso terá que ser revisto mesmo para usar no Gutenberg.
Eu acho uma ideia válida pois o Gutenberg tem suporte para inserção de shortcodes, e fica mais fácil de identificar e manipular os boxes do bootstrap. Mesmo que nativamente o Gutenberg e o WP coloquem tags <p>
e/ou <br>
entre os shortcodes, consegui bloquear esse comportamento.
Adicionei os códigos a seguir no arquivo includes/classes/class-shortecodes.php;
Na linha 26 logo abaixo de table, antes de row e col: add_shortcode( 'container', array( $this, 'container' ) );
Depois na linha 238:
/**
* Container shortcode.
*
* @param array $atts Shortcode attributes.
* @param string $content Content.
*
* @return string Contaner HTML.
*/
function container( $atts, $content = null ) {
extract( shortcode_atts( array(
'fluid' => false,
'class' => false
), $atts ) );
$html = '<div class="container';
$html .= ( $fluid ) ? '-' . esc_attr( $fluid ) : '';
$html .= ( $class ) ? ' ' . esc_attr( $class ) : '';
$html .= '">';
$html .= do_shortcode( $content );
$html .= '</div>';
return $html;
}
Quem achar válido me avise.
Remove the settings options to choose the Odin Toolkit modules that will be loaded. It's better to implement a autoload classes like in CMB2.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.