Support Forum
When I bundle Meta Box Updater in my plugin, the settings page does not appear.
I am using TGMBPA to install the bundled zip file
Hi,
I've just tried including the updater extension in a custom plugin / theme (twentyseventeen), and including the main plugin file in the functions.php file. The settings page shows to me. Can you check the way you load the extension?
I also seem to be having issues with admin columns not working as well
this is my TGMPA activation file
<?php
/**
* Include the TGM_Plugin_Activation class.
*/
require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';
add_action( 'tgmpa_register', 'wcd_register_required_plugins' );
/**
* Register the required plugins for this theme.
*/
function wcd_register_required_plugins() {
$plugins = array(
// Bundled Plugins.
array(
'name' => 'MB Admin Columns',
'slug' => 'mb-admin-columns',
'source' => dirname( __FILE__ ) . '/plugins/mb-admin-columns.zip',
'required' => true,
'force_activation' => true,
'force_deactivation' => true,
),
array(
'name' => 'Meta Box Columns',
'slug' => 'meta-box-columns',
'source' => dirname( __FILE__ ) . '/plugins/meta-box-columns.zip',
'required' => true,
'force_activation' => true,
'force_deactivation' => true,
),
array(
'name' => 'Meta Box Group',
'slug' => 'meta-box-group',
'source' => dirname( __FILE__ ) . '/plugins/meta-box-group.zip',
'required' => true,
'force_activation' => true,
'force_deactivation' => true,
),
array(
'name' => 'Meta Box Tabs',
'slug' => 'meta-box-tabs',
'source' => dirname( __FILE__ ) . '/plugins/meta-box-tabs.zip',
'required' => true,
'force_activation' => true,
'force_deactivation' => true,
),
array(
'name' => 'Meta Box Updater',
'slug' => 'meta-box-updater',
'source' => dirname( __FILE__ ) . '/plugins/meta-box-updater.zip',
'required' => false,
'force_activation' => false,
'force_deactivation' => false,
),
// WordPress Plugin Repository.
array(
'name' => 'Meta Box',
'slug' => 'meta-box',
'required' => true,
'force_activation' => true,
'force_deactivation' => true,
),
);
$config = array(
'id' => 'wcd-team',
'default_path' => '',
'menu' => 'tgmpa-install-plugins',
'parent_slug' => 'plugins.php',
'capability' => 'manage_options',
'has_notices' => true,
'dismissable' => false,
'dismiss_msg' => '',
'is_automatic' => false,
'message' => '',
);
tgmpa( $plugins, $config );
}
If I delete the install from the bundle, then install the update plugin before activating my plugin, it works fine.
Same cannot be said about admin columns
this is one of the fields for my admin columns
array (
'id' => 'member_job_role',
'type' => 'text',
'name' => __( 'Job/Role', 'wcd-team' ),
'columns' => 6,
'tab' => 'team_name_tab',
'admin-columns' => array(
'position' => 'after title',
'title' => __( 'Position', 'wcd-team' ),
'sort' => true,
),
),
TGMA will install the extensions as separated plugins and then they have to work as normal install. Have you refresh the admin page after install and activate the extensions from TGMA page? I've just tried again with TGMA and it works for me.
The admin columns also works :(. Can you make a screenshot or short video?
I worked out why admin columns wasnt working
I had a "replace title" field, so "after title" no longer works, instead I needed to change title to field id eg "after slide_heading"
Glad that it works for you :). How about the update? Does it work?
The updater did when I did it within a theme, but not when I did it in my recent plugin.
I have not been back in the office (where the plugin sits on my local machine) to record a video as I have been working remotely off laptop.
Will be back in the office late today so will double check everything in my code and if still cannot get it to work, will report back with a video