2015-08-10 17:30:30 +02:00
2015-08-10 17:30:30 +02:00
2015-08-09 22:17:35 +02:00
2015-08-09 22:05:11 +02:00
2015-08-03 16:04:55 +02:00
2015-07-14 18:18:34 +02:00
2015-08-09 22:17:35 +02:00
2015-08-10 16:47:55 +02:00
2015-08-10 14:53:50 +02:00
2015-07-17 22:43:22 +02:00
2015-07-09 23:04:41 +02:00
2015-07-09 23:04:41 +02:00
2015-08-09 21:57:30 +02:00
2015-08-10 14:28:51 +02:00
2015-07-09 23:04:41 +02:00
2015-08-07 18:30:31 +02:00
2015-07-09 23:04:41 +02:00

MailPoet.

MailPoet done the right way.

Install.

  • Install system dependencies:
php
nodejs
phantomjs
wordpress
  • Clone the repo in wp-content/plugins.

  • Install composer.

$ curl -sS https://getcomposer.org/installer | php
$ ./composer.phar install
  • Install dependencies.
$ ./do install
  • Update dependencies when needed.
$ ./do update
  • Copy .env.sample to .env.
$ cp .env.sample .env

Tests.

$ ./do test:unit
  • Acceptance tests:
$ ./do test:acceptance
  • Run all tests:
$ ./do test:all
  • Debug tests:
$ ./do test:debug

CSS

assets/css/lib -> link your dependencies here
assets/css/src -> place your *.styl files here

Watch for changes and recompile

$ ./do watch

JS

Dependency example:

  • add "handlebars" as a dependency in the package.json file
{
  "dependencies": {
    "handlebars": "3.0.3",
  },
  • Install dependencies.
$ ./do install
  • Symlink the dependency:
$ ln -s node_modules/handlebars/dist/handlebars.min.js assets/js/lib/handlebars.min.js

Handlebars (views/*.hbs)

<!-- use the `templates` block -->
<% block templates %>
  <!-- include a .hbs template -->
  <%= partial('my_template_1', 'form/templates/toolbar/fields.hbs') %>

  <!-- include a .hbs template and register it as a partial -->
  <%= partial('my_template_2', 'form/templates/blocks.hbs', '_my_partial') %>

  <!-- custom partial using partial defined above -->
  <script id="my_template_3" type="text/x-handlebars-template">
    {{> _my_partial }}
  </script>
<% endblock %>

i18n

  • Use the regular WordPress functions in PHP and Twig:
__()
_n()
<p>
  <%= __('Click %shere%s!') | format('<a href="#">', '</a>') | raw %>
</p>
<p>
  <%= _n('deleted %d message', 'deleted %d messages', count) | format(count) %>
  <!-- count === 1 -> "deleted 1 message" -->
  <!-- count > 1 -> "deleted $count messages" -->
</p>
  • Handlebars.

You can use Twig i18n functions in Handlebars, just load your template from a Twig view.

Description
I refuse to pay money to send emails from my own damn email server.
Readme 368 MiB
5.12.4-pirate Latest
2025-06-03 02:30:47 +00:00
Languages
PHP 73.2%
TypeScript 12.8%
JavaScript 7.7%
SCSS 2.5%
HTML 2%
Other 1.7%