* Note: Must load before the config template file
 * @global object $pl_section_factory
 * @since 4.0.0
 */
$GLOBALS['pl_section_factory'] = new PageLinesSectionFactory();

/**
 * Register and load all sections
 */
pagelines_register_sections();

pagelines_register_hook('pagelines_setup'); // Hook

load_section_persistent(); // Load persistent section functions (e.g. custom post types)
if(is_admin()) load_section_admin(); // Load admin only functions from sections
do_global_meta_options(); // Load the global meta settings tab

	
/**
 * Support optional WordPress functionality
 */
add_theme_support( 'post-thumbnails', apply_filters( 'pagelines_post-thumbnails', array('post') ) );
add_theme_support( 'menus' );
add_theme_support( 'automatic-feed-links' );

// Add editor styling
// -- relative link
add_editor_style( 'admin/css/editor-style.css' );

// Sets Content Width for Large images when adding media
// Re: if ( ! isset( $content_width ) ) $content_width = 640;
예제 #2
0
/**
 * Register and load all sections
 */
global $load_sections;
$load_sections = new PageLinesRegister();
$load_sections->pagelines_register_sections();
$load_sections->register_sidebars();
pagelines_register_hook('pagelines_setup');
// Hook
load_section_persistent();
// Load persistent section functions (e.g. custom post types)
if (is_admin()) {
    load_section_admin();
}
// Load admin only functions from sections
do_global_meta_options();
// Load the global meta settings tab
/**
 * Build Version
 */
require_once PL_INCLUDES . '/version.php';
require_once PL_INCLUDES . '/class.render.css.php';
if (defined('WP_CLI') && WP_CLI) {
    require_once PL_INCLUDES . '/cli.commands.php';
}
/**
 * Load site actions
 */
require_once PL_INCLUDES . '/actions.site.php';
if (ploption('enable_debug')) {
    require_once PL_ADMIN . '/class.debug.php';
    /**
     *
     * @TODO document
     *
     */
    function posts_metapanel($type, $mode = 'meta')
    {
        $option_engine = new OptEngine(PAGELINES_SPECIAL);
        $handle = 'postsTabs' . $type;
        // Zero Out Tabs
        $this->tabs = array();
        do_global_meta_options($mode);
        $special_template = new PageLinesTemplate($type);
        $special_template->load_section_optionator($mode, $type);
        ob_start();
        ?>

	<script type="text/javascript">
		jQuery(document).ready(function() {
			<?php 
        printf('var %1$s = jQuery("#%1$s").tabs({cookie: {  name: "htabs-%2$s" }, fx: { opacity: "toggle", duration: 150 }});', $handle, $type);
        ?>
		});
	</script>

		<div id="<?php 
        echo $handle;
        ?>
" class="plist-nav fix">


			<ul class="fix plist">
				<?php 
        if (count($this->tabs) != 1) {
            ?>
					<lh class="hlist-header">Select Settings Panel</lh>
					<?php 
            foreach ($this->tabs as $tab => $t) {
                ?>
						<li>
							<a class="<?php 
                echo $tab;
                ?>
  metapanel-tab <?php 
                if (!$t->active && $type != 'default') {
                    echo 'inactive-tab';
                }
                ?>
" href="#<?php 
                echo $tab;
                ?>
">
								<span class="metatab_pad fix">
									<span class="metatab_icon" style="background: transparent url(<?php 
                echo $t->icon;
                ?>
) no-repeat 0 0;display: block;">
										<?php 
                if (!$t->active && $type != 'default') {
                    printf('<span class="tab_inactive">inactive</span>');
                }
                echo substr($t->name, 0, 17);
                ?>
									</span>
								</span>
							</a>
						</li>
					<?php 
            }
            ?>
				<?php 
        } else {
            ?>
					<lh class="hlist-header"><?php 
            echo ucfirst($mode);
            ?>
 Settings</lh>
				<?php 
        }
        ?>
			</ul>

			<?php 
        foreach ($this->tabs as $tab => $t) {
            ?>
				<div id="<?php 
            echo $tab;
            ?>
" class="posts_tab_content">
					<div class="posts_tab_content_pad">
						<div class="metatab_title" style="background: url(<?php 
            echo $t->icon;
            ?>
) no-repeat 10px 13px;" >
							<?php 
            echo $t->name;
            if (!$t->active && $type != 'default') {
                echo OptEngine::superlink(__('Inactive On Template', 'pagelines'), 'black', 'right', admin_url('admin.php?page=pagelines_templates'));
            } elseif ($type == 'default') {
                echo OptEngine::superlink(__('Sitewide Defaults', 'pagelines'), null, 'right');
            }
            ?>
						</div>
						<?php 
            foreach ($t->options as $oid => $o) {
                $o['special'] = $type;
                $o['scontrol'] = $mode;
                $o['clone_id'] = isset($t->clone_id) ? $t->clone_id : 1;
                $option_engine->option_engine($oid, $o);
            }
            ?>
					</div>
				</div>

			<?php 
        }
        ?>
		</div>
		<?php 
        return ob_get_clean();
    }