| | |
| | | <?php |
| | | namespace JVBase\managers\SEO; |
| | | |
| | | use JVBase\registrar\Registrar; |
| | | |
| | | if (!defined('ABSPATH')) { |
| | | exit; |
| | | } |
| | |
| | | { |
| | | $options = ['' => '-- Select Post Type --']; |
| | | |
| | | if (defined('JVB_CONTENT')) { |
| | | foreach (JVB_CONTENT as $key => $config) { |
| | | $options[jvbCheckBase($key)] = $config['plural'] ?? $config['singular'] ?? ucwords($key); |
| | | $content = Registrar::getRegistered('post'); |
| | | if (!empty($content)){ |
| | | foreach ($content as $c) { |
| | | $registrar = Registrar::getInstance($c); |
| | | $options[jvbCheckBase($c)] = $registrar->getPlural(); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | $options = ['' => '-- Select Taxonomy --']; |
| | | |
| | | if (defined('JVB_TAXONOMY')) { |
| | | foreach (JVB_TAXONOMY as $key => $config) { |
| | | $options[jvbCheckBase($key)] = $config['plural'] ?? $config['singular'] ?? ucwords($key); |
| | | |
| | | $tax = Registrar::getRegistered('term'); |
| | | if (!empty($tax)){ |
| | | foreach ($tax as $c) { |
| | | $registrar = Registrar::getInstance($c); |
| | | $options[jvbCheckBase($c)] = $registrar->getPlural(); |
| | | } |
| | | } |
| | | |