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


PHP MainWP_Utility::get_favico_url方法代码示例

本文整理汇总了PHP中MainWP_Utility::get_favico_url方法的典型用法代码示例。如果您正苦于以下问题:PHP MainWP_Utility::get_favico_url方法的具体用法?PHP MainWP_Utility::get_favico_url怎么用?PHP MainWP_Utility::get_favico_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MainWP_Utility的用法示例。


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

示例1: render

    public static function render()
    {
        self::renderHeader('');
        ?>
        <a class="button-primary mwp-child-scan" href="#"><?php 
        _e('Scan', 'mainwp');
        ?>
</a>
        <?php 
        $websites = MainWP_DB::Instance()->query(MainWP_DB::Instance()->getSQLWebsitesForCurrentUser());
        if (!$websites) {
            echo __('<p>No websites to scan.</p>', 'mainwp');
        } else {
            ?>
			<table id="mwp_child_scan_childsites">
				<tr><th>Child</th><th>Status</th></tr>
			<?php 
            while ($websites && ($website = @MainWP_DB::fetch_object($websites))) {
                $imgfavi = '';
                if ($website !== null) {
                    if (get_option('mainwp_use_favicon', 1) == 1) {
                        $favi = MainWP_DB::Instance()->getWebsiteOption($website, 'favi_icon', '');
                        $favi_url = MainWP_Utility::get_favico_url($favi, $website);
                        $imgfavi = '<img src="' . $favi_url . '" width="16" height="16" style="vertical-align:middle;"/>&nbsp;';
                    }
                }
                if ($website->sync_errors == '') {
                    echo '<tr siteid="' . $website->id . '"><td title="' . $website->url . '">' . $imgfavi . ' ' . stripslashes($website->name) . ':</td><td></td></tr>';
                } else {
                    echo '<tr><td title="' . $website->url . '">' . $imgfavi . ' ' . stripslashes($website->name) . ':</td><td>Sync errors</td></tr>';
                }
            }
            @MainWP_DB::free_result($websites);
            ?>
			</table>
			<?php 
        }
        ?>
    <?php 
        self::renderFooter('');
    }
开发者ID:sacredwebsite,项目名称:mainwp,代码行数:41,代码来源:page-mainwp-child-scan.php

示例2: sites_fly_menu

    function sites_fly_menu()
    {
        global $wpdb;
        $where = MainWP_DB::Instance()->getWhereAllowAccessSites();
        $websites = $wpdb->get_results('SELECT id,name,url FROM `' . $wpdb->prefix . 'mainwp_wp` WHERE 1 ' . $where);
        ?>
		<div id="mainwp-sites-menu" style="direction: rtl;">
			<div style="direction: ltr;">
				<ul>
					<?php 
        foreach ($websites as $website) {
            $imgfavi = '';
            if ($website !== null) {
                if (get_option('mainwp_use_favicon', 1) == 1) {
                    $favi = MainWP_DB::Instance()->getWebsiteOption($website, 'favi_icon', '');
                    $favi_url = MainWP_Utility::get_favico_url($favi, $website);
                    $imgfavi = '<img src="' . $favi_url . '" width="16" height="16" style="vertical-align:bottom;"/>&nbsp;';
                }
            }
            echo wp_kses_post('<li class="mwp-child-site-item" value="' . $website->id . '">' . $imgfavi . '<a href="admin.php?page=managesites&dashboard=' . $website->id . '" class="mainpw-fly-meny-lnk">' . MainWP_Utility::getNiceURL($website->url) . '</a></li>');
        }
        ?>
				</ul>
				<div id="mainwp-sites-menu-filter">
					<input id="mainwp-fly-manu-filter" style="margin-top: .5em; width: 100%;" type="text" value="" placeholder="<?php 
        esc_attr_e('Type here to filter sites', 'mainwp');
        ?>
" />
				</div>
			</div>
		</div>
		<?php 
    }
开发者ID:reeslo,项目名称:mainwp,代码行数:33,代码来源:class-mainwp-system.php

示例3: renderDashboardBody

    public static function renderDashboardBody($websites, $pDashboard, $pScreenLayout)
    {
        $opts = get_option('mainwp_opts_showhide_sections', false);
        $hide_shortcuts = is_array($opts) && isset($opts['welcome_shortcuts']) && $opts['welcome_shortcuts'] == 'hide' ? true : false;
        ?>
		<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 id="mainwp-welocme-bar" class="welcome-panel" style="padding-left: 2em;">
				<table id="mainwp-refresh-bar" width="100%">
					<tbody>
					<tr>
						<td>
							<div id="mainwp-welocme-bar-top">
                    <span style="float:right;">
                    <a style="font-size: 18px;" class="button-hero button mainwp-upgrade-button" id="dashboard_refresh" title="<?php 
        echo MainWP_Right_Now::renderLastUpdate();
        ?>
"><i class="fa fa-refresh"></i> <?php 
        _e('Sync Data with Child Sites', 'mainwp');
        ?>
</a>
                    <a style="font-size: 18px;" class="button-hero button-primary button" target="_blank" href="https://extensions.mainwp.com"><i class="fa fa-cart-plus"></i> <?php 
        _e('Get New Extensions', 'mainwp');
        ?>
</a>
                    </span>
								<?php 
        $current_wp_id = MainWP_Utility::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 = MainWP_DB::Instance()->getWebsiteOption($website, 'favi_icon', '');
                $favi_url = MainWP_Utility::get_favico_url($favi, $website);
                $imgfavi = '<img src="' . $favi_url . '" width="16" height="16" style="vertical-align:middle;"/>&nbsp;';
            }
        }
        if ($website !== null) {
            if (time() - $website->dtsSync > 60 * 60 * 24) {
                ?>
<h3>
										<i class="fa fa-flag"></i> <?php 
                _e('Your MainWP Dashboard has not been synced for 24 hours!', 'mainwp');
                ?>
										</h3>
										<p class="about-description"><?php 
                _e('Click the Sync Data button to get the latest data from child sites.', 'mainwp');
                ?>
</p>
										<?php 
            } else {
                ?>
										<h3><?php 
                echo sprintf(__('Welcome to %s Dashboard!', 'mainwp'), stripslashes($website->name));
                ?>
</h3>
										<p class="about-description"><?php 
                echo sprintf(__('This information is only for %s%s', 'mainwp'), $imgfavi, MainWP_Utility::getNiceURL($website->url, true));
                ?>
</p>
										<?php 
            }
        } else {
            $sync_status = MainWP_DB::Instance()->getLastSyncStatus();
            if ($sync_status === 'not_synced') {
                ?>
<h3>
										<i class="fa fa-flag"></i> <?php 
                _e('Your MainWP Dashboard has not been synced for 24 hours!', 'mainwp');
                ?>
										</h3>
										<p class="about-description"><?php 
                _e('Click the Sync Data button to get the latest data from child sites.', 'mainwp');
                ?>
</p>
										<?php 
            } else {
                if ($sync_status === 'all_synced') {
                    ?>
										<h3><?php 
                    echo __('All sites have been synced within the last 24 hours!', 'mainwp');
                    ?>
</h3>
										<p class="about-description"><?php 
                    echo __('Manage your WordPress sites with ease.', 'mainwp');
                    ?>
</p>
//.........这里部分代码省略.........
开发者ID:senlin,项目名称:mainwp,代码行数:101,代码来源:page-mainwp-main.php

示例4: column_site

 function column_site($item)
 {
     $actions = array('dashboard' => sprintf('<a href="admin.php?page=managesites&dashboard=%s">' . __('Dashboard', 'mainwp') . '</a>', $item['id']), 'edit' => sprintf('<a href="admin.php?page=managesites&id=%s">' . __('Edit', 'mainwp') . '</a>', $item['id']), 'delete' => sprintf('<a class="submitdelete" href="#" onClick="return managesites_remove(' . "'" . '%s' . "'" . ');">' . __('Delete', 'mainwp') . '</a>', $item['id']));
     if (!mainwp_current_user_can('dashboard', 'access_individual_dashboard')) {
         unset($actions['dashboard']);
     }
     if (!mainwp_current_user_can('dashboard', 'edit_sites')) {
         unset($actions['edit']);
     }
     if (!mainwp_current_user_can('dashboard', 'delete_sites')) {
         unset($actions['delete']);
     }
     if ($item['sync_errors'] != '') {
         $actions['reconnect'] = sprintf('<a class="mainwp_site_reconnect" href="#" siteid="%s">' . __('Reconnect', 'mainwp') . '</a>', $item['id']);
     }
     $imgfavi = '';
     if (get_option('mainwp_use_favicon', 1) == 1) {
         $siteObj = (object) $item;
         $favi = MainWP_DB::Instance()->getWebsiteOption($siteObj, 'favi_icon', '');
         $favi_url = MainWP_Utility::get_favico_url($favi, $siteObj);
         $imgfavi = '<img src="' . $favi_url . '" width="16" height="16" style="vertical-align:middle;"/>&nbsp;';
     }
     $loader = '<span class="bulk_running"><i class="fa fa-spinner fa-pulse" style="display:none"></i><span class="status hidden"></span></span>';
     return $imgfavi . sprintf('<a href="admin.php?page=managesites&dashboard=%s" id="mainwp_notes_%s_url">%s</a>%s' . $loader, $item['id'], $item['id'], stripslashes($item['name']), $this->row_actions($actions));
 }
开发者ID:sacredwebsite,项目名称:mainwp,代码行数:25,代码来源:table-mainwp-manage-sites-list-table.php

示例5: select_sites_box_body

    public static function select_sites_box_body(&$selected_websites = array(), &$selected_groups = array(), $type = 'checkbox', $show_group = true, $show_select_all = true, $updateQty = false, $enableOfflineSites = false)
    {
        $websites = MainWP_DB::Instance()->query(MainWP_DB::Instance()->getSQLWebsitesForCurrentUser());
        $groups = MainWP_DB::Instance()->getNotEmptyGroups(null, $enableOfflineSites);
        ?>
        <input type="hidden" name="select_by" id="select_by" value="<?php 
        echo esc_attr(count($selected_groups) > 0 ? 'group' : 'site');
        ?>
"/>
		<?php 
        if ($show_select_all) {
            ?>
			<div style="float:right"><?php 
            esc_html_e('Select: ', 'mainwp');
            ?>
				<a href="#" onClick="return mainwp_ss_select(this, true)"><?php 
            esc_html_e('All', 'mainwp');
            ?>
</a>
				| <a href="#" onClick="return mainwp_ss_select(this, false)"><?php 
            esc_html_e('None', 'mainwp');
            ?>
</a>
			</div>
		<?php 
        }
        ?>
		<?php 
        if ($show_group) {
            ?>
			<div id="mainwp_ss_site_link" <?php 
            echo esc_html(count($selected_groups) > 0 ? 'style="display: inline-block;"' : '');
            ?>
>
				<a href="#" onClick="return mainwp_ss_select_by(this, 'site')"><?php 
            esc_html_e('By site', 'mainwp');
            ?>
</a>
			</div>
			<div id="mainwp_ss_site_text" <?php 
            echo esc_html(count($selected_groups) > 0 ? 'style="display: none;"' : '');
            ?>
>
				<?php 
            esc_html_e('By site', 'mainwp');
            ?>
</div> |
			<div id="mainwp_ss_group_link" <?php 
            echo esc_html(count($selected_groups) > 0 ? 'style="display: none;"' : '');
            ?>
>
				<a href="#" onClick="return mainwp_ss_select_by(this, 'group')"><?php 
            esc_html_e('By group', 'mainwp');
            ?>
</a>
			</div>
			<div id="mainwp_ss_group_text" <?php 
            echo esc_html(count($selected_groups) > 0 ? 'style="display: inline-block;"' : '');
            ?>
>
				<?php 
            esc_html_e('By group', 'mainwp');
            ?>
			</div>
		<?php 
        }
        ?>
		<div id="selected_sites" <?php 
        echo esc_html(count($selected_groups) > 0 ? 'style="display: none;"' : '');
        ?>
>
			<?php 
        if (!$websites) {
            echo '<p>' . esc_html('No websites have been found.', 'mainwp') . '</p>';
        } else {
            while ($websites && ($website = @MainWP_DB::fetch_object($websites))) {
                $imgfavi = '';
                if ($website !== null) {
                    if (get_option('mainwp_use_favicon', 1) == 1) {
                        $favi = MainWP_DB::Instance()->getWebsiteOption($website, 'favi_icon', '');
                        $favi_url = MainWP_Utility::get_favico_url($favi, $website);
                        $imgfavi = '<img src="' . $favi_url . '" width="16" height="16" style="vertical-align:middle;"/>&nbsp;';
                    }
                }
                if ($website->sync_errors == '' || $enableOfflineSites) {
                    $selected = $selected_websites == 'all' || in_array($website->id, $selected_websites);
                    echo '<div title="' . $website->url . '" class="mainwp_selected_sites_item ' . ($selected ? 'selected_sites_item_checked' : '') . '"><input onClick="mainwp_site_select(this)" type="' . $type . '" name="' . ($type == 'radio' ? 'selected_site' : 'selected_sites[]') . '" siteid="' . $website->id . '" value="' . $website->id . '" id="selected_sites_' . $website->id . '" ' . ($selected ? 'checked="true"' : '') . '/> <label for="selected_sites_' . $website->id . '">' . $imgfavi . stripslashes($website->name) . '<span class="url">' . $website->url . '</span>' . '</label></div>';
                } else {
                    echo '<div title="' . $website->url . '" class="mainwp_selected_sites_item disabled"><input type="' . $type . '" disabled=disabled /> <label for="selected_sites_' . $website->id . '">' . $imgfavi . stripslashes($website->name) . '<span class="url">' . $website->url . '</span>' . '</label></div>';
                }
            }
            @MainWP_DB::free_result($websites);
        }
        ?>
		</div>
		<input id="selected_sites-filter" style="margin-top: .5em" type="text" value="" placeholder="<?php 
        esc_attr_e('Type here to filter sites', 'mainwp');
        ?>
" <?php 
        echo esc_attr(count($selected_groups) > 0 ? 'style="display: none;"' : '');
//.........这里部分代码省略.........
开发者ID:senlin,项目名称:mainwp,代码行数:101,代码来源:class-mainwp-ui.php


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