Skip to content

Instantly share code, notes, and snippets.

@Tmeister
Last active March 17, 2020 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tmeister/7b634723ec05ac5af6f0f7b44646f21e to your computer and use it in GitHub Desktop.
Save Tmeister/7b634723ec05ac5af6f0f7b44646f21e to your computer and use it in GitHub Desktop.
<?php
/**
* Proof of Concept
*/
$settings = [
[
'id' => 1,
'trigger' => 'comment_post',
'action' => 'delete',
'rule' => 'status:==:spam',
'ui' => [
'actor' => 'comment',
'action' => 'is created',
'rules' => [
[
'label' => 'and the status is %options% %action%',
'term' => 'status',
'action' => 'delete'
'options' => [
'1' => 'approved',
'0' => 'not approved',
'spam' => 'spam'
]
]
],
'label' => 'When a %actor% %action% %rules%'
]
],
[
'id' => 2,
'trigger' => 'comment_post',
'action' => 'delete',
'rule' => 'status:==:spam',
'ui' => [
'actor' => 'comentario',
'action' => 'es creado',
'rules' => [
[
'label' => 'y el estatus es %options% %action%',
'term' => 'status',
'action' => 'borralo'
'options' => [
'1' => 'aprobado',
'0' => 'no aprobado',
'spam' => 'spam'
]
]
],
'label' => 'Cuando un %actor% %action% %rules%'
]
],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment