コード例 #1
0
/**
 * Callback function for displaying the layout meta box.
 *
 * @since  1.0.0
 * @access public
 * @param  object $post The current WordPress post object.
 * @param  array  $box The current Meta box data.
 * @return void
 */
function carelib_metabox_post_layouts_box($post, $box)
{
    $current_layout = 'default';
    if (carelib_get_post_layout($post->ID)) {
        $current_layout = carelib_get_post_layout($post->ID);
    }
    require_once carelib_get_dir('admin/templates/metabox-post-layouts.php');
}
コード例 #2
0
/**
 * Callback function for displaying the style meta box.
 *
 * @since  1.0.0
 * @access public
 * @param  object  $object
 * @param  array   $box
 * @return void
 */
function carelib_metabox_post_styles_box($post, $box)
{
    $styles = carelib_get_post_styles($post->post_type);
    $post_style = carelib_get_post_style($post->ID);
    require_once carelib_get_dir('admin/templates/metabox-post-style.php');
}
コード例 #3
0
		<input type="radio" value="default" name="carelib-post-layout" <?php 
checked($current_layout, 'default');
?>
 />
		<span><?php 
esc_html_e('Default Layout');
?>
</span>
	</label>

	<?php 
foreach (carelib_get_layouts() as $name => $layout) {
    ?>

		<?php 
    if (carelib_layout_has_post_metabox($layout, $post->post_type)) {
        ?>

			<?php 
        require carelib_get_dir('admin/templates/layout-select.php');
        ?>

		<?php 
    }
    ?>

	<?php 
}
?>
</div>
コード例 #4
0
ファイル: dashboard.php プロジェクト: wpsitecare/carelib
/**
 * Include the base template for our dashboard page.
 *
 * @since   1.0.0
 * @access  public
 * @return  void
 */
function carelib_dashboard_page()
{
    require_once carelib_get_dir('admin/templates/dashboard.php');
}