Skip to content

Commit

Permalink
Remove [post-edit] shortcode. metadates uses the Post Edit block. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Jan 10, 2022
1 parent f9638a8 commit 9df15f0
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ function fizzie_init() {
if (function_exists('bw_add_shortcode')) {
do_action("oik_add_shortcodes");
}
add_shortcode( 'post-edit', 'fizzie_post_edit' );
}

function fizzie_enqueue_styles() {
Expand All @@ -111,8 +110,6 @@ function fizzie_enqueue_a2z() {
wp_enqueue_style( "category-css", get_template_directory_uri() . '/category.css', array() );
}



add_action( 'after_setup_theme', 'fizzie_after_setup_theme');
//add_action( 'after_setup_theme', 'fizzie_stanley_theme_support');
add_action( 'init', 'fizzie_init', 20 );
Expand All @@ -132,38 +129,13 @@ function fizzie_front_page_template( $template ) {
}
add_filter( 'frontpage_template', 'fizzie_front_page_template' );

/**
* Implements [post-edit] shortcode.
*
* If the user is authorised return a post edit link for the current post.
*
* @param $attrs
* @param $content
* @param $tag
*
* @return string
*/

function fizzie_post_edit( $attrs, $content, $tag ) {
$link = '';
$url = get_edit_post_link();
if ( $url ) {
$class = 'bw_edit';
$text= __( '[Edit]', 'fizzie' );
$link='<a class="' . esc_attr( $class ) . '" href="' . esc_url( $url ) . '">' . $text . '</a>';
}
return $link;
}

function fizzie_enable_wp_navigation_editor( $post ) {
remove_action( 'edit_form_after_title', '_disable_content_editor_for_navigation_post_type' );
remove_action( 'edit_form_after_title', 'gutenberg_disable_content_editor_for_navigation_post_type');
}

require_once __DIR__ . '/includes/block-overrides.php';



if ( !function_exists( "bw_trace2" ) ) {
function bw_trace2( $content=null, $args=null) {
return $content;
Expand Down

0 comments on commit 9df15f0

Please sign in to comment.