symbiote/php-wordpress-database-tools 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

symbiote/php-wordpress-database-tools

Composer 安装命令:

composer require symbiote/php-wordpress-database-tools

包简介

A set of classes for connecting to a Wordpress database and querying it. The point of this library is to easily and effeciently iterate over Wordpress data and import into other CMS systems.

关键字:

README 文档

README

A set of classes for connecting to a Wordpress database and querying it. The point of this library is to easily and effeciently iterate over Wordpress data and import into other CMS systems.

Quick Start

  • Set Wordpress Database config details
<?php
$wpDB = new WordpressDatabase(array(
	'database' 	 	 => 'wordpress-database',
	'username'		 => 'root',
	'password'		 => '',
	'table_prefix'   => 'wp'
));
  • Loop over Wordpress data and do what you want with it.
<?php
foreach ($wpDB->getPages() as $wpData) {
	$wpMeta = $wpDB->attachAndGetPostMeta($wpData);

	$newRecord = array();
	$newRecord['Title'] = $wpDB->process('post_title', $wpData['post_title']);
	$newRecord['Permalink'] = $wpData['post_name'];
	$newRecord['Content'] = $wpDB->process('post_content', $wpData['post_content']);
	$newRecord['Created'] = $wpData['post_date'];
	$newRecord['LastEdited'] = $wpData['post_modified'];
	$newRecord['WordpressData'] = $wpData; // Since 'attachAndGetPostMeta' attaches the meta to $wpData, it'll store that too.
}

统计信息

  • 总下载量: 25
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-09-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固