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


PHP TablePress::load_file方法代码示例

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


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

示例1: defined

<?php

/**
 * TablePress WP User Option Wrapper class for WordPress Options
 *
 * Wraps the WordPress Options API, so that (especially) arrays are stored as JSON, instead of being serialized by PHP.
 *
 * @package TablePress
 * @subpackage Classes
 * @author Tobias Bäthge
 * @since 1.0.0
 */
// Prohibit direct script loading.
defined('ABSPATH') || die('No direct script access allowed!');
// Load parent class.
TablePress::load_file('class-wp_option.php', 'classes');
/**
 * TablePress WP User Option Wrapper class
 * @package TablePress
 * @subpackage Classes
 * @author Tobias Bäthge
 * @since 1.0.0
 */
class TablePress_WP_User_Option extends TablePress_WP_Option
{
    /**
     * Get the value of a WP User Option with the WP User Options API.
     *
     * @since 1.0.0
     *
     * @param string $option_name   Name of the WP User Option.
开发者ID:pab44,项目名称:pab44,代码行数:31,代码来源:class-wp_user_option.php

示例2: import_xlsx

 /**
  * Import Microsoft Excel 2007-2013 data
  *
  * @since 1.1.0
  */
 protected function import_xlsx()
 {
     TablePress::load_file('simplexlsx.class.php', 'libraries');
     $simplexlsx = new SimpleXLSX($this->import_data, true);
     if ($simplexlsx->success() && 0 < $simplexlsx->sheetsCount()) {
         // Get Worksheet ID of the first Worksheet (not necessarily "1", which is the default in SimpleXLSX)
         $sheet_ids = array_keys($simplexlsx->sheetNames());
         $worksheet_id = $sheet_ids[0];
         $this->imported_table = array('data' => $this->pad_array_to_max_cols($simplexlsx->rows($worksheet_id)));
     } else {
         $output = '<strong>' . __('The imported file contains errors:', 'tablepress') . '</strong><br /><br />' . $simplexlsx->error() . '<br />';
         wp_die($output, 'Import Error', array('response' => 200, 'back_link' => true));
     }
 }
开发者ID:heyjones,项目名称:crossfitpurpose,代码行数:19,代码来源:class-import.php


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