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


PHP TGMPA_List_Table::current_action方法代码示例

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


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

示例1: install_plugins_page

        /**
         * Echoes plugin installation form.
         *
         * This method is the callback for the admin_menu method function.
         * This displays the admin page and form area where the user can select to install and activate the plugin.
         * Aborts early if we're processing a plugin installation action.
         *
         * @since 1.0.0
         *
         * @return null Aborts early if we're processing a plugin installation action.
         */
        public function install_plugins_page()
        {
            // Store new instance of plugin table in object.
            $plugin_table = new TGMPA_List_Table();
            // Return early if processing a plugin installation action.
            if (('tgmpa-bulk-install' === $plugin_table->current_action() || 'tgmpa-bulk-update' === $plugin_table->current_action()) && $plugin_table->process_bulk_actions() || $this->do_plugin_install()) {
                return;
            }
            // Force refresh of available plugin information so we'll know about manual updates/deletes.
            wp_clean_plugins_cache(false);
            ?>
            <div class="tgmpa wrap">
                <h2><?php 
            echo esc_html(get_admin_page_title());
            ?>
</h2>
                <?php 
            $plugin_table->prepare_items();
            ?>

                <?php 
            if (!empty($this->message) && is_string($this->message)) {
                echo wp_kses_post($this->message);
            }
            ?>
                <?php 
            $plugin_table->views();
            ?>

                <form id="tgmpa-plugins" action="" method="post">
                    <input type="hidden" name="tgmpa-page" value="<?php 
            echo esc_attr($this->menu);
            ?>
" />
                    <input type="hidden" name="plugin_status" value="<?php 
            echo esc_attr($plugin_table->view_context);
            ?>
" />
                    <?php 
            $plugin_table->display();
            ?>
                </form>
            </div>
            <?php 
        }
开发者ID:GvarimAZA,项目名称:website,代码行数:56,代码来源:class-tgm-plugin-activation.php

示例2: install_plugins_page

        /**
         * Echoes plugin installation form.
         *
         * This method is the callback for the admin_menu method function.
         * This displays the admin page and form area where the user can select to install and activate the plugin.
         *
         * @since 1.0.0
         *
         * @return null Aborts early if we're processing a plugin installation action
         */
        public function install_plugins_page()
        {
            // Store new instance of plugin table in object.
            $plugin_table = new TGMPA_List_Table();
            // Return early if processing a plugin installation action.
            if ('tgmpa-bulk-install' === $plugin_table->current_action() && $plugin_table->process_bulk_actions() || $this->do_plugin_install()) {
                return;
            }
            ?>

			<div class="tgmpa wrap">
				<h2><?php 
            echo esc_html(get_admin_page_title());
            ?>
</h2>
				<?php 
            $plugin_table->prepare_items();
            ?>


				<?php 
            if (isset($this->message)) {
                echo wp_kses_post($this->message);
            }
            ?>


				<form id="tgmpa-plugins" action="" method="post">
					<input type="hidden" name="tgmpa-page" value="<?php 
            echo esc_attr($this->menu);
            ?>
" />
					<?php 
            $plugin_table->display();
            ?>

				</form>

			</div>
			<?php 
        }
开发者ID:xmandxx,项目名称:Teahouse-Wordpress-Theme,代码行数:51,代码来源:class-tgm-plugin-activation.php


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