當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Projects::languages方法代碼示例

本文整理匯總了PHP中Projects::languages方法的典型用法代碼示例。如果您正苦於以下問題:PHP Projects::languages方法的具體用法?PHP Projects::languages怎麽用?PHP Projects::languages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Projects的用法示例。


在下文中一共展示了Projects::languages方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: project_index

    /**
     * Output the Project Index interface.
     *
     * @since 1.0.0
     *
     * @global string $plugin_page The slug of the current admin page.
     */
    protected static function project_index()
    {
        global $plugin_page;
        $projects = new Projects();
        $projects->scan();
        ?>
		<div class="tablenav top">
			<div class="alignleft actions">
				<label for="filter_by_type" class="screen-reader-text"><?php 
        _e('Filter by type', 'pomo-editor');
        ?>
</label>
				<select id="filter_by_type" class="pomoeditor-filter">
					<option value=""><?php 
        _e('All types', 'pomo-editor');
        ?>
</option>
					<?php 
        foreach ($projects->types() as $type => $label) {
            ?>
					<option value="<?php 
            echo $type;
            ?>
"><?php 
            echo $label;
            ?>
</option>
					<?php 
        }
        ?>
				</select>
				<label for="filter_by_package" class="screen-reader-text"><?php 
        _e('Filter by package', 'pomo-editor');
        ?>
</label>
				<select id="filter_by_package" class="pomoeditor-filter">
					<option value=""><?php 
        _e('All packages', 'pomo-editor');
        ?>
</option>
					<?php 
        foreach ($projects->packages() as $package => $label) {
            ?>
					<option value="<?php 
            echo $package;
            ?>
"><?php 
            echo $label;
            ?>
</option>
					<?php 
        }
        ?>
				</select>
				<label for="filter_by_language" class="screen-reader-text"><?php 
        _e('Filter by type', 'pomo-editor');
        ?>
</label>
				<select id="filter_by_language" class="pomoeditor-filter">
					<option value=""><?php 
        _e('All languages', 'pomo-editor');
        ?>
</option>
					<?php 
        foreach ($projects->languages() as $language => $label) {
            ?>
					<option value="<?php 
            echo $language;
            ?>
"><?php 
            echo $label;
            ?>
</option>
					<?php 
        }
        ?>
				</select>
				<label>
					<input type="checkbox" id="filter_modded_only" class="pomoeditor-filter" />
					<?php 
        _e('Show Edited Files Only', 'pomo-editor');
        ?>
				</label>
			</div>
		</div>

		<table id="pomoeditor_projects" class="wp-list-table widefat fixed striped">
			<thead>
				<tr>
					<th class="manage-column column-pmeproject-file"><?php 
        _e('File', 'pomo-editor');
        ?>
</th>
//.........這裏部分代碼省略.........
開發者ID:dougwollison,項目名稱:pomo-editor,代碼行數:101,代碼來源:class-pomoeditor-manager.php


注:本文中的Projects::languages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。