Skip to content

Commit

Permalink
Enable oik based shortcodes. Issue #4 - remote add_theme_support('ali…
Browse files Browse the repository at this point in the history
…gn-wide') to use the new declarative method
  • Loading branch information
bobbingwide committed Mar 24, 2021
1 parent 8078e49 commit fc142a5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
6 changes: 6 additions & 0 deletions block-templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- wp:html -->
<div class="WP_DEBUG">404.html</div>
<!-- /wp:html -->


<!-- wp:template-part {"slug":"header","theme":"sb"} /-->
19 changes: 18 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function sb_support() {
add_theme_support( 'post-thumbnails' );

// Adding support for alignwide and alignfull classes in the block editor.
add_theme_support( 'align-wide' );
//add_theme_support( 'align-wide' );

// Adding support for core block visual styles.
add_theme_support( 'wp-block-styles' );
Expand Down Expand Up @@ -74,3 +74,20 @@ function sb_scripts() {
//wp_enqueue_style( 'sb-alignments-style', get_template_directory_uri() . '/assets/alignments-front.css', array(), wp_get_theme()->get( 'Version' ) );
}
add_action( 'wp_enqueue_scripts', 'sb_scripts' );

/**
* Enables oik based shortcodes.
*/
function sb_init() {
if (function_exists('bw_add_shortcode')) {
do_action("oik_add_shortcodes");

}
else {
gob();
}
//add_shortcode( 'archive_description', 'fizzie_archive_description' );
//add_shortcode( 'post-edit', 'fizzie_post_edit' );
}

add_action( 'init', 'sb_init', 20);

0 comments on commit fc142a5

Please sign in to comment.