承接 inn/wordpress-mailchimp-tools 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

inn/wordpress-mailchimp-tools

Composer 安装命令:

composer require inn/wordpress-mailchimp-tools

包简介

Collection of tools for authoring MailChimp newsletters via the WordPress dashboard

关键字:

README 文档

README

What is this?

This project aims to provide a simple set of tools for author MailChimp Campaigns via the WordPress post editor.

Right now, it provides:

  • A settings panel to add/save your MailChimp API Key.
  • A campaign editor meta box.
  • A campaign preview meta box.
  • A settings panel for setting campaign defaults on a per-post-type basis.

Getting started

This tool set is not a plugin. You won't see it available in the WordPress dashboard for activation.

You must include the library in your plugin.

You can add the tools via Composer:

composer require inn/wordpress-mailchimp-tools:dev-master

A simple example

require_once __DIR__ . '/vendor/autoload.php';

function my_plugin_init() {
    register_post_type('newsletter', array(
        'label' => 'Newsletter',
        'labels' => array(
            'name' => 'Newsletters',
            'singular_name' => 'Newsletter'
        ),
        'show_ui' => true,
        'public' => true
    ));

}
add_action( 'init', 'my_plugin_init' );

Templates

The campaign editor relies on an mc:edit="body" editable content area specified in whatever template you use.

When creating or updating a campaign, the tools will add the WordPress post's body to the element of your template that has the mc:edit="body" attribute.

A simple-one-column.html with the mc:edit="body" placemarker is included in the templates/ directory. You can copy the contents on simple-one-column.html and use MailChimp's template importer to add the template to your account.

Read more about MailChimp's templates here.

Set default content for your post type

You can use the default_content filter to load boilerplate markup into the post editor for your custom post type:

function my_default_content($content) {
    $screen = $screen = get_current_screen();
    if ( $screen->post_type ==  'newsletter' ) {
        $default_content = file_get_contents( __DIR__ . '/templates/my-newsletter-default-markup.html' );
        return $default_content;
    }
    return $content;
}
add_filter( 'default_content', 'my_default_content' );

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 6
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2016-01-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固