itinerisltd / wp-hubspot-importer
将 HubSpot 博文导入 WordPress。
0.4.1
2019-07-15 10:19 UTC
Requires
- php: ^7.2
- ryanwinchester/hubspot-php: ^1.1
- typisttech/wp-kses-view: ^0.5.0
- typisttech/wp-option-store: ^0.2.0
Requires (Dev)
- itinerisltd/itineris-wp-coding-standards: ^0.2.3
- phpstan/phpstan: ^0.11.4
- phpstan/phpstan-strict-rules: ^0.11.0
- roave/security-advisories: dev-master
- roots/wordpress: ^5.1
- wp-cli/wp-cli: ^2.1
- dev-master / 0.4.x-dev
- 0.4.1
- 0.4.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.1
- 0.1.0
- dev-dependabot/add-v2-config-file
- dev-dependabot/composer/nikic/php-parser-4.10.3
- dev-dependabot/composer/symfony/finder-4.4.17
- dev-dependabot/composer/symfony/console-4.4.17
- dev-dependabot/composer/itinerisltd/itineris-wp-coding-standards-0.4.0
- dev-dependabot/composer/ocramius/package-versions-1.4.2
This package is auto-updated.
Last update: 2024-08-29 05:00:33 UTC
README
目标
将 HubSpot 博文导入 WordPress。
最低要求
- PHP v7.3
- WordPress v5.1
安装
Composer (推荐)
$ composer require itinerisltd/wp-hubspot-importer
经典
从 GitHub 发布 下载 wp-hubspot-importer.zip
。然后,按常规安装
使用方法
OAuth2 授权
- 转到 WP 控制台 > 工具 > WP HubSpot 导入器
- 授权
WP HubSpot 导入器
以代表您使用 HubSpot API
从 HubSpot 导入到 WordPress
$ wp hubspot import Importing from HubSpot... Fetching HubSpot blog topics... Success: Fetched Blog Topic: Blog (1111111111) Success: Fetched Blog Topic: News (2222222222) Fetching HubSpot blog posts updated since Tue, 23 Apr 2019 12:19:15 +0000... Success: Imported Blog Post: I am the blog post title (3333333333) Success: Imported Blog Post: Hello World (4444444444) Success: Finished at Tue, 23 Apr 2019 12:20:38 +0000
数据结构
默认情况下,WP HubSpot 导入器 将导入
- HubSpot 博文 作为
post
- HubSpot 博文主题 作为
post_tag
这些可以通过通过定义自己的容器来定制,容器由 wp_hubspot_importer_container_init
过滤器定义。
HubSpot 博文 ID
$wpPostId = 999; // Returns '1234567890' get_post_meta($wpPostId, Container::HUBSPOT_BLOG_POST_ID_META_KEY, true);
特色图片 URL
特色图片不会导入到 WordPress 媒体库,但 URL 将作为自定义帖子元数据存储。
$wpPostId = 999; // Returns 'https://cdn2.hubspot.net/hubfs/1234566/xxx.jpeg' get_post_meta($wpPostId, Container::HUBSPOT_FEATURED_IMAGE_URL_META_KEY, true);
常见问题解答
您是否会添加对旧 PHP 版本的支持?
绝对不!此插件只适用于 积极支持的 PHP 版本。
不要在 已停用 或仅 安全修复 的 PHP 版本上使用它。
看起来很棒。我在哪里可以找到更多类似的好东西?
- Itineris' blog 上的文章
- Itineris' GitHub profile 上的更多项目
- Itineris 和 TangRufus wp.org 个人资料上的更多插件
- 关注 @itineris_ltd 和 @TangRufus 在 Twitter 上
- 雇佣 Itineris 来构建您的下一个神奇网站
除了 wp.org,我还能在哪里给出 ⭐⭐⭐⭐⭐ 评价?
谢谢!很高兴你喜欢它。让我的老板知道有人在使用这个项目很重要。请考虑
- 在 wp.org 上给出 ⭐⭐⭐⭐⭐ 评价
- 发表一条提及 @itineris_ltd 和 @TangRufus 的好推特
- 🌟:star this Github 代码库
- watch this Github 代码库
- 写博客文章
- 提交 Pull 请求
- 雇佣 Itineris
测试
$ composer phpstan:analyse $ composer style:check
没有测试的 Pull 请求将不予接受!
反馈
请提供反馈! 我们希望这个库尽可能多地被项目使用。请提交一个 问题 并指出你喜欢和不喜欢的地方,或者fork 项目并提出建议。 任何问题都不小。
变更日志
有关最近更改的更多信息,请参阅 变更日志。
安全
如果你发现任何安全相关的问题,请通过电子邮件 hello@itineris.co.uk 而不是使用问题跟踪器。
鸣谢
WP HubSpot Importer 是由 Itineris Limited 创建的 Tang Rufus 的项目。
贡献者完整列表可在 此处 查找。
许可
WP HubSpot Importer 在 MIT 许可证 下发布。