Browse Source

Exibe input com shortcode no administrador apenas nos posts do glossário

master
Guilherme Capanema 6 years ago
parent
commit
d4642709c7
2 changed files with 7 additions and 4 deletions
  1. +5
    -2
      admin/class-reuna-glossario-admin.php
  2. +2
    -2
      reuna-glossario.php

+ 5
- 2
admin/class-reuna-glossario-admin.php View File

@ -120,9 +120,12 @@ class Reuna_Glossario_Admin {
* *
* @since 1.0.0 * @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'); require (plugin_dir_path(__FILE__) . 'partials/shortcode-metabox.php');
} }


+ 2
- 2
reuna-glossario.php View File

@ -16,7 +16,7 @@
* Plugin Name: Instituto Reúna - Glossário * Plugin Name: Instituto Reúna - Glossário
* Plugin URI: https://horizontes.info * Plugin URI: https://horizontes.info
* Description: Implementa função de glossário via shortcode * Description: Implementa função de glossário via shortcode
* Version: 1.0.0
* Version: 1.1.0
* Author: Horizontes Coop. * Author: Horizontes Coop.
* Author URI: https://horizontes.info * Author URI: https://horizontes.info
* License: GPL-2.0+ * License: GPL-2.0+
@ -35,7 +35,7 @@ if ( ! defined( 'WPINC' ) ) {
* Start at version 1.0.0 and use SemVer - https://semver.org * 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. * 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 * Require the Composer autoloader