Rilwis,
I have emailed you re this but probably better to put it on the forum so sorry for the duplication...
Loving the release of the MB Settings Plugin but am having an issue getting it to work with meta-box-columns etc.
I can now see in the code of the meta-box-columns.php file that the custom css (columns.css) is only loaded when on a post edit screen. A quick hack of the code around line 33 (see below for hack specific to my setup) to the following does now enqueue the necessary css but then brings with it another problem.
function admin_enqueue_scripts()
{
// Enqueue scripts and styles for post edit screen only
$screen = get_current_screen();
$is_admin_options = strpos($screen->base, 'site-settings');
if ( 'post' != $screen->base && $is_admin_options === false )
return;
wp_enqueue_style( 'rwmb-columns', plugins_url( 'columns.css', __FILE__ ) );
}
All fields with columns have are nested within two rwmb-row containers meaning that the negative margins applied to a rwmb-row are twice as much and as such the fields begin outside the postbox.
<div class="rwmb-meta-box" data-autosave="false">
<input type="hidden" id="nonce_company-settings" name="nonce_company-settings" value="****">
<input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=company-settings">
<div class="rwmb-row">
<div class="rwmb-row">
<div class="rwmb-field rwmb-text-wrapper rwmb-column rwmb-column-6 rwmb-column-first rwmb-column rwmb-column-6 rwmb-column-first">
<div class="rwmb-label">
<label for="company_name">Company Name (Required)</label>
</div>
<div class="rwmb-input">
<input size="30" class="rwmb-text" id="company_name" name="company_name" type="text" value="Test Company">
<p id="company_name_description" class="description">Enter the company name</p>
</div>
</div>
<div class="rwmb-field rwmb-text-wrapper rwmb-column rwmb-column-6 rwmb-column-last rwmb-column rwmb-column-6 rwmb-column-last">
<div class="rwmb-label">
<label for="company_email">Company Email (Required)</label>
</div>
<div class="rwmb-input">
<input size="30" class="rwmb-text" id="company_email" name="company_email" type="text" value="[email protected]">
<p id="company_email_description" class="description">Enter the company general email address</p>
</div>
</div>
</div>
</div>
</div>
So there are two issues.
1) Can the meta-box-columns plugin (and any other premium plugins) be updated to allow them to load if on a MB Settings Page?
2) Can you please work out why there are two lots of rwmb-row being loaded when using columns on a settings page?
Thanks in advance,
Will