当前位置: 首页>>代码示例>>PHP>>正文


PHP wp_dashboard函数代码示例

本文整理汇总了PHP中wp_dashboard函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_dashboard函数的具体用法?PHP wp_dashboard怎么用?PHP wp_dashboard使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wp_dashboard函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wp_nonce_field

 		<?php 
    wp_nonce_field('welcome-panel-nonce', 'welcomepanelnonce', false);
    ?>
		<a class="welcome-panel-close" href="<?php 
    echo esc_url(admin_url('?welcome=0'));
    ?>
"><?php 
    _e('Dismiss');
    ?>
</a>
		<?php 
    do_action('welcome_panel');
    ?>
	</div>
<?php 
}
?>

<div id="dashboard-widgets-wrap">

<?php 
wp_dashboard();
?>

<div class="clear"></div>
</div><!-- dashboard-widgets-wrap -->

</div><!-- wrap -->

<?php 
require ABSPATH . 'wp-admin/admin-footer.php';
开发者ID:rodrigosantanati,项目名称:WordPress,代码行数:31,代码来源:index.php

示例2: wp_dashboard_setup

);

wp_dashboard_setup();

wp_enqueue_script( 'dashboard' );
wp_enqueue_script( 'plugin-install' );
wp_admin_css( 'dashboard' );
wp_admin_css( 'plugin-install' );
add_thickbox();

add_screen_option('layout_columns', array('max' => 4, 'default' => 2) );

require_once( '../admin-header.php' );

?>

<div class="wrap">
<?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); ?></h2>

<div id="dashboard-widgets-wrap">

<?php wp_dashboard(); ?>

<div class="clear"></div>
</div><!-- dashboard-widgets-wrap -->

</div><!-- wrap -->

<?php include( '../admin-footer.php' ); ?>
开发者ID:realfluid,项目名称:umbaugh,代码行数:30,代码来源:index.php

示例3: renderDashboardBody


//.........这里部分代码省略.........
											<a href="<?php 
        echo get_admin_url();
        ?>
admin.php?page=managesites&do=test"><i class="fa fa-globe"></i> <?php 
        _e('Test Connection', 'mainwp');
        ?>
											</a></li>
										<li>
											<a href="<?php 
        echo get_admin_url();
        ?>
admin.php?page=Extensions"><i class="fa fa-plug"></i> <?php 
        _e('Manage Extensions', 'mainwp');
        ?>
											</a></li>
										<li>
											<a href="<?php 
        echo get_admin_url();
        ?>
admin.php?page=ServerInformation"><i class="fa fa-server"></i> <?php 
        _e('Check MainWP Requirements', 'mainwp');
        ?>
											</a></li>
										<li>
											<a href="<?php 
        echo get_admin_url();
        ?>
admin.php?page=DashboardOptions"><i class="fa fa-cogs"></i> <?php 
        _e('Set Your Preferences', 'mainwp');
        ?>
											</a></li>
									</ul>
								</div>
							</div>
							<div id="dashboard_refresh_statusextra" style="display: none">
								<i class="fa fa-spinner fa-pulse"></i></div>
			</div>
			<div id="mainwp_dashboard_refresh_status"></div>
			</td></tr></tbody>
			</table>
			</div>
			<div id="mainwp_main_errors" class="mainwp_error"></div>
		</form>

		<div id="mainwp-dashboard-info-box">
		<?php 
        if (empty($current_wp_id) && MainWP_Twitter::enabledTwitterMessages()) {
            $filter = array('upgrade_everything', 'upgrade_all_wp_core', 'upgrade_all_plugins', 'upgrade_all_themes');
            foreach ($filter as $what) {
                $twitters = MainWP_Twitter::getTwitterNotice($what);
                if (is_array($twitters)) {
                    foreach ($twitters as $timeid => $twit_mess) {
                        $sendText = "";
                        if (!empty($twit_mess)) {
                            if (!empty($sendText)) {
                                $sendText = MainWP_Twitter::getTwitToSend($what, $timeid);
                                ?>
								<div class="mainwp-tips mainwp_info-box-blue twitter">
									<span class="mainwp-tip" twit-what="<?php 
                                echo $what;
                                ?>
"
										  twit-id="<?php 
                                echo $timeid;
                                ?>
"><?php 
                                echo $twit_mess;
                                ?>
</span>&nbsp;<?php 
                                MainWP_Twitter::genTwitterButton($sendText);
                                ?>
									<span><a href="#" class="mainwp-dismiss-twit"><i
												class="fa fa-times-circle"></i> <?php 
                                _e('Dismiss', 'mainwp');
                                ?>
										</a></span></div>
								<?php 
                            }
                        }
                    }
                }
            }
            ?>
		<?php 
        }
        ?>
		</div>


		<div id="dashboard-widgets-wrap">

			<?php 
        require_once ABSPATH . 'wp-admin/includes/dashboard.php';
        wp_dashboard();
        ?>

			<div class="clear"></div>
		</div><!-- dashboard-widgets-wrap -->
		<?php 
    }
开发者ID:senlin,项目名称:mainwp,代码行数:101,代码来源:page-mainwp-main.php

示例4: renderDashboardBody

    public static function renderDashboardBody($websites, $pDashboard, $pScreenLayout)
    {
        ?>
    <form action="admin-post.php" method="post">
        <?php 
        wp_nonce_field('mainwp_tab-general');
        ?>
        <?php 
        wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
        ?>
        <?php 
        wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
        ?>
        <input type="hidden" name="action" value="save_howto_testPages_general"/>
        <div class="postbox" style="padding-top: 1em;">
            <table id="mainwp-refresh-bar" width="100%">
                <tbody><tr>
                    <?php 
        $current_wp_id = MainWPUtility::get_current_wpid();
        $website = null;
        if (!empty($current_wp_id)) {
            $website = $websites[0];
        }
        $imgfavi = "";
        if ($website !== null) {
            if (get_option('mainwp_use_favicon', 1) == 1) {
                $favi = MainWPDB::Instance()->getWebsiteOption($website, 'favi_icon', "");
                $favi_url = MainWPUtility::get_favico_url($favi, $website);
                $imgfavi = '<img src="' . $favi_url . '" width="16" height="16" style="vertical-align:middle;"/>&nbsp;';
            }
        }
        if (time() - ($website == null ? MainWPDB::Instance()->getFirstSyncedSite() : $website->dtsSync) > 60 * 60 * 24) {
            ?>
                <td id="mainwp-welcome-bar" width="47%" style="padding-left: 1em;">
                    <span class="mainwp-reminder"><?php 
            _e('Your MainWP Dashboard has not been synced for 24 hours! Click the Sync Data button to get the latest data from child sites.', 'mainwp');
            ?>
</span><br/>
                </td>
                    <?php 
        } else {
            ?>
                <td id="mainwp-welcome-bar" width="47%" style="padding-left: 1em;">
                    <span style="font-size: 24px"><?php 
            echo $website == null ? __('Welcome to Your MainWP Dashboard!', 'mainwp') : sprintf(__('Welcome to %s Dashboard!', 'mainwp'), stripslashes($website->name));
            ?>
</span><br/>
                    <span style="font-style: italic; font-size: 14px;"><?php 
            echo $website == null ? __('Manage your WordPress sites with ease.', 'mainwp') : sprintf(__('This information is only for %s%s', 'mainwp'), $imgfavi, MainWPUtility::getNiceURL($website->url, true));
            ?>
</span>
                </td>
                    <?php 
        }
        ?>
                <td id="mainwp-refresh-bar-buttons">
                <a class="button-hero button mainwp-upgrade-button" id="dashboard_refresh" title="<?php 
        echo MainWPRightNow::renderLastUpdate();
        ?>
"><?php 
        _e('<i class="fa fa-refresh"></i> Sync Data', 'mainwp');
        ?>
</a>
                <a class="button-hero button-primary button mainwp-addsite-button" href="admin.php?page=managesites&do=new"><?php 
        _e('<i class="fa fa-plus"></i> Add New Site', 'mainwp');
        ?>
</a>
                <a class="button-hero button-primary button mainwp-button-red" target="_blank" href="https://extensions.mainwp.com"><?php 
        _e('<i class="fa fa-cart-plus"></i> Get New Extensions', 'mainwp');
        ?>
</a>
                </td>
            <div id="dashboard_refresh_statusextra" style="display: none"> <i class="fa fa-spinner fa-pulse"></i> </div>
                </tr></tbody>
            </table>
            <div id="mainwp_dashboard_refresh_status"></div>
        </div>
        <div id="mainwp_main_errors" class="mainwp_error"></div>
    </form>

    <div id="dashboard-widgets-wrap">

    <?php 
        require_once ABSPATH . 'wp-admin/includes/dashboard.php';
        wp_dashboard();
        ?>

    <div class="clear"></div>
    </div><!-- dashboard-widgets-wrap -->
    <?php 
    }
开发者ID:HasClass0,项目名称:mainwp,代码行数:91,代码来源:MainWPMain.page.php

示例5: tp_main

 function tp_main()
 {
     echo '<div id="dashboard-widgets-wrap">';
     /** Load WordPress dashboard API */
     require_once ABSPATH . 'wp-admin/includes/dashboard.php';
     wp_enqueue_script('dashboard');
     wp_admin_css('dashboard');
     add_thickbox();
     wp_dashboard();
     echo '<div class="clear"></div>';
 }
开发者ID:kosir,项目名称:thatcamp-org,代码行数:11,代码来源:transposh_admin.php

示例6: load_dashboard

    public function load_dashboard($load_title = false)
    {
        global $plugin_page, $hook_suffix, $current_screen, $title, $menu, $submenu, $pagenow, $typenow;
        $hook_suffix = 'admin.php';
        $pagenow = 'admin.php';
        $typenow = '';
        $title = __('Dashboard', 'mainwp');
        $this->init_load();
        if (wp_verify_nonce($_REQUEST['nonce'], 'mainwp_ajax')) {
            if ($load_title) {
                echo esc_html($this->get_title());
                exit;
            }
            set_current_screen();
            require_once ABSPATH . 'wp-admin/includes/dashboard.php';
            wp_dashboard_setup();
            wp_enqueue_script('dashboard');
            wp_enqueue_script('plugin-install');
            wp_enqueue_script('media-upload');
            add_thickbox();
            $title = __('Dashboard');
            $parent_file = 'index.php';
            if (is_user_admin()) {
                add_screen_option('layout_columns', array('max' => 4, 'default' => 2));
            } else {
                add_screen_option('layout_columns', array('max' => 4, 'default' => 2));
            }
            //$screen_layout_columns = 2;
            $help = '<p>' . __('Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the upper corner.', 'mainwp') . '</p>';
            get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => __('Overview', 'mainwp'), 'content' => $help));
            // Help tabs
            $help = '<p>' . __('The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.', 'mainwp') . '</p>';
            $help .= '<p>' . __('Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.', 'mainwp') . '</p>';
            get_current_screen()->add_help_tab(array('id' => 'help-navigation', 'title' => __('Navigation', 'mainwp'), 'content' => $help));
            $help = '<p>' . __('You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>Screen Options</strong> - Use the Screen Options tab to choose which Dashboard boxes to show, and how many columns to display.', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>Drag and Drop</strong> - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>Box Controls</strong> - Click the title bar of the box to expand or collapse it. In addition, some box have configurable content, and will show a &#8220;Configure&#8221; link in the title bar if you hover over it.', 'mainwp') . '</p>';
            get_current_screen()->add_help_tab(array('id' => 'help-layout', 'title' => __('Layout', 'mainwp'), 'content' => $help));
            $help = '<p>' . __('The boxes on your Dashboard screen are:', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>Right Now</strong> - Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>Recent Comments</strong> - Shows the most recent comments on your posts (configurable, up to 30) and allows you to moderate them.', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>Incoming Links</strong> - Shows links to your site found by Google Blog Search.', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>QuickPress</strong> - Allows you to create a new post and either publish it or save it as a draft.', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>Recent Drafts</strong> - Displays links to the 5 most recent draft posts you&#8217;ve started.', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>WordPress Blog</strong> - Latest news from the official WordPress project.', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>Other WordPress News</strong> - Shows the <a href="http://planet.wordpress.org" target="_blank">WordPress Planet</a> feed. You can configure it to show a different feed of your choosing.', 'mainwp') . '</p>';
            $help .= '<p>' . __('<strong>Plugins</strong> - Features the most popular, newest, and recently updated plugins from the WordPress.org Plugin Directory.', 'mainwp') . '</p>';
            get_current_screen()->add_help_tab(array('id' => 'help-content', 'title' => __('Content', 'mainwp'), 'content' => $help));
            unset($help);
            get_current_screen()->set_help_sidebar('<p><strong>' . __('For more information:', 'mainwp') . '</strong></p>' . '<p>' . __('<a href="http://codex.wordpress.org/Dashboard_Screen" target="_blank">Documentation on Dashboard</a>', 'mainwp') . '</p>' . '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>', 'mainwp') . '</p>');
            $today = current_time('mysql', 1);
            ?>

			<?php 
            screen_meta($current_screen);
            // Back compatibility with 3.2
            //$current_screen->render_screen_meta(); // For 3.3
            ?>
            <div class="wrap">
				<?php 
            screen_icon('index');
            ?>
				<h2><?php 
            echo esc_html($title);
            ?>
</h2>

				<?php 
            wp_welcome_panel();
            ?>

                <div id="dashboard-widgets-wrap">

					<?php 
            wp_dashboard();
            ?>

                    <div class="clear"></div>
                </div>
                <!-- dashboard-widgets-wrap -->

            </div><!-- wrap -->
			<?php 
        }
        exit;
    }
开发者ID:sacredwebsite,项目名称:mainwp,代码行数:87,代码来源:class-mainwp-ajax.php

示例7: Display


//.........这里部分代码省略.........
                    ?>
</h3>
<div id="wpfb-liking">
	<!-- <div style="text-align: center;"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwordpress.org%2Fextend%2Fplugins%2Fwp-filebase%2F&amp;send=false&amp;layout=button_count&amp;width=150&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:140px; height:21px; display:inline-block; text-align:center;" <?php 
                    echo ' allowTransparency="true"';
                    ?>
></iframe></div> -->
	
	<div style="text-align: center;" ><a href="https://twitter.com/wpfilebase" class="twitter-follow-button" data-show-count="false">Follow @wpfilebase</a>
			<script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div>
	
	<p>Please <a href="http://wordpress.org/support/view/plugin-reviews/wp-filebase">give it a good rating</a>.</p>
	<p>For Cloud support and lots of other advanced features consider an</p>
	<p style="text-align: center;"><a href="https://wpfilebase.com/?ref=dblike" class="button-primary">Upgrade to Pro</a></p>
	<p style="text-align: center;"><a href="http://demo.wpfilebase.com/?ref=dblike" class="button">Live Pro Demo</a></p>
	<p style="text-align:right;float:right;font-style:italic;">Thanks, Fabian</p> 
	<!-- <div style="text-align: center;">
	<?php 
                    //WPFB_Admin::PrintPayPalButton()
                    ?>
	<?php 
                    //WPFB_Admin::PrintFlattrButton()
                    ?>
	</div> -->
</div>
</div>
<?php 
                }
                ?>

	
	<div id="dashboard-widgets-wrap">
	<?php 
                wp_dashboard();
                ?>
	</div><!-- dashboard-widgets-wrap -->
	
	<?php 
                break;
            case 'convert-tags':
                ?>
<h2><?php 
                _e('Tag Conversion');
                ?>
</h2><?php 
                if (empty($_REQUEST['doit'])) {
                    echo '<div class="updated"><p>';
                    _e('<strong>Important:</strong> before updating, please <a href="http://codex.wordpress.org/WordPress_Backups">backup your database and files</a>. For help with updates, visit the <a href="http://codex.wordpress.org/Updating_WordPress">Updating WordPress</a> Codex page.');
                    echo '</p></div>';
                    echo '<p><a href="' . add_query_arg('doit', 1) . '" class="button">' . __('Continue') . '</a></p>';
                    break;
                }
                $result = wpfb_call('Setup', 'ConvertOldTags');
                ?>
		<p><?php 
                printf(__('%d Tags in %d Posts has been converted.'), $result['n_tags'], count($result['tags']));
                ?>
</p>
		<ul>
		<?php 
                if (!empty($result['tags'])) {
                    foreach ($result['tags'] as $post_title => $tags) {
                        echo "<li><strong>" . esc_html($post_title) . "</strong><ul>";
                        foreach ($tags as $old => $new) {
                            echo "<li>{$old} =&gt; {$new}</li>";
                        }
开发者ID:noxian,项目名称:WP-Filebase,代码行数:67,代码来源:AdminGuiManage.php

示例8: page_content

    /**
     * Displays page content.
     *
     * @return void
     */
    protected function page_content()
    {
        require_once ABSPATH . 'wp-admin/includes/dashboard.php';
        ?>
		<div id="dashboard-widgets-wrap">
			<?php 
        wp_dashboard();
        ?>
		</div>
		<?php 
    }
开发者ID:kalushta,项目名称:darom,代码行数:16,代码来源:class-dashboard.php


注:本文中的wp_dashboard函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。