+---------------- minute (0 - 59)
| +------------- hour (0 - 23)
| | +---------- day of month (1 - 31)
| | | +------- month (1 - 12)
| | | | +---- day of week (0 - 6) (Sunday=0)
| | | | |
* * * * *
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //Sometimes we need to submit only part of the form. Sure, if form has #required fields, all they will be highlighted with red, | |
| //and form will not be submitted if these elements have no value. | |
| //To workaround this, we can use '#limit_validation_errors' option AND custom submit function for every 'Partial Submit' button. | |
| //Interesting note: when we use '#limit_validation_errors', we will see ALL form fields in _validate function, | |
| //but in _submit function will be visible ONLY elements, included in '#limit_validation_errors' array!!! | |
| //Case 1. The most simple. | |
| //We want to make a 'reset' button, or 'previous step' button, so it must work even if some REQUIRED form elements are empty: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% for key, item in node.field_image.value %} | |
| <img src="{{ file_url(content.field_image[key]['#item'].entity.uri.value) }}" alt="{{ item.alt }}" title="{{ item.title }}" /> | |
| {# or #} | |
| {{ content.field_image[key] }} | |
| {% endfor %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Local development services. | |
| # | |
| # To activate this feature, follow the instructions at the top of the | |
| # 'example.settings.local.php' file, which sits next to this file. | |
| parameters: | |
| http.response.debug_cacheability_headers: true | |
| twig.config: | |
| debug: false | |
| auto_reload: true | |
| cache: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Map files directory with produciton | |
| RewriteRule ^sites/default/files/styles(.*)$ http://exampledomain.com/sites/default/files/styles/$1 [R=301,NC,L] | |
| RewriteRule ^sites/default/files(.*)$ http://exampledomain.com/sites/default/files/$1 [R=301,NC,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Git: Feature Branch Flow | |
| git checkout master | |
| git checkout -b develop | |
| git checkout -b feature_branch | |
| #work happens on feature branch | |
| git checkout develop | |
| git merge feature_branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # keep .htaccess under wp-admin folder, and .htpasswd under project root folder | |
| #example test credentials: admin:admin | |
| SetEnvIf Request_URI ^/path/to/project/root/folder/wp-admin/admin-ajax.php noauth=1 | |
| Authtype Basic | |
| AuthName "Restricted Access" | |
| AuthUserFile /path/to/project/root/folder/.htpasswd | |
| Require valid-user | |
| Order Deny,Allow | |
| Deny from all |
NewerOlder