From d4642709c73912a59c9dcf9083282738420983a4 Mon Sep 17 00:00:00 2001 From: Guilherme Capanema Date: Mon, 29 Jun 2020 20:10:19 -0300 Subject: [PATCH] =?UTF-8?q?Exibe=20input=20com=20shortcode=20no=20administ?= =?UTF-8?q?rador=20apenas=20nos=20posts=20do=20gloss=C3=A1rio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/class-reuna-glossario-admin.php | 7 +++++-- reuna-glossario.php | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/admin/class-reuna-glossario-admin.php b/admin/class-reuna-glossario-admin.php index 74873dc..f019dbc 100644 --- a/admin/class-reuna-glossario-admin.php +++ b/admin/class-reuna-glossario-admin.php @@ -120,9 +120,12 @@ class Reuna_Glossario_Admin { * * @since 1.0.0 */ - public function display_term_shortcode_after_title() + public function display_term_shortcode_after_title($post) { - global $post; + if (get_post_type($post) !== 'glossario') { + return; + } + require (plugin_dir_path(__FILE__) . 'partials/shortcode-metabox.php'); } diff --git a/reuna-glossario.php b/reuna-glossario.php index 023c27f..7b4a44d 100644 --- a/reuna-glossario.php +++ b/reuna-glossario.php @@ -16,7 +16,7 @@ * Plugin Name: Instituto Reúna - Glossário * Plugin URI: https://horizontes.info * Description: Implementa função de glossário via shortcode - * Version: 1.0.0 + * Version: 1.1.0 * Author: Horizontes Coop. * Author URI: https://horizontes.info * License: GPL-2.0+ @@ -35,7 +35,7 @@ if ( ! defined( 'WPINC' ) ) { * Start at version 1.0.0 and use SemVer - https://semver.org * Rename this for your plugin and update it as you release new versions. */ -define( 'REUNA_GLOSSARIO_VERSION', '1.0.0' ); +define( 'REUNA_GLOSSARIO_VERSION', '1.1.0' ); /** * Require the Composer autoloader