コード例 #1
0
ファイル: Cmb2GridPlugin.php プロジェクト: jmarceli/CMB2-grid
                require dirname(__FILE__) . '/Grid/Row.php';
                require dirname(__FILE__) . '/Grid/Group/Cmb2GroupGrid.php';
                require dirname(__FILE__) . '/Grid/Group/GroupRow.php';
                require dirname(__FILE__) . '/Grid/Group/GroupColumn.php';
                require dirname(__FILE__) . '/Cmb2/Utils.php';
            }
        }
        public function admin_enqueue_scripts()
        {
            wp_enqueue_style('bootstrap_light', plugins_url('assets/css/bootstrap.min.css', __FILE__));
        }
        public function wpHead()
        {
            ?>
			<style>			
				.cmb2GridRow .cmb-row{border:none !important;padding:0 !important}
				.cmb2GridRow .cmb-th label:after{border:none !important}
				.cmb2GridRow .cmb-th{width:100% !important}
				.cmb2GridRow .cmb-td{width:100% !important}
				.cmb2GridRow input[type="text"], .cmb2GridRow textarea, .cmb2GridRow select{width:100%}
				
				.cmb2GridRow .cmb-repeat-group-wrap{max-width:100% !important;}
				.cmb2GridRow .cmb-group-title{margin:0 !important;}
				.cmb2GridRow .cmb-repeat-group-wrap .cmb-row .cmbhandle, .cmb2GridRow .postbox-container .cmb-row .cmbhandle{right:0 !important}
			</style>
			<?php 
        }
    }
}
Cmb2GridPlugin::getInstance();
コード例 #2
0
 /**
  * Initialize the class only if CMB2 is detected.
  *
  * @return void
  */
 function init()
 {
     if (defined('CMB2_LOADED')) {
         if (!defined('CMB2GRID_DIR')) {
             define('CMB2GRID_DIR', trailingslashit(dirname(__FILE__)));
         }
         Cmb2GridPlugin::getInstance();
     }
 }