Find MAMP's installed PHP version(s) you want to use the PHP CLI for:
$ ls -l /Applications/MAMP/bin/php/
- First, open your local user's
.bash_profilein edit mode, in order to add aliases for accessing the PHP CLI locally
$ pico ~/.bash_profile
Find MAMP's installed PHP version(s) you want to use the PHP CLI for:
$ ls -l /Applications/MAMP/bin/php/
.bash_profile in edit mode, in order to add aliases for accessing the PHP CLI locally$ pico ~/.bash_profile
| <?php | |
| /** | |
| * Plugin Name: Convert ACF PHP to JSON | |
| * Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON. | |
| */ | |
| namespace ConvertAcfPhpToJson; | |
| /** | |
| * Add submenu item under 'Custom Fields' |
| #loader { | |
| background: none repeat scroll 0 0 #ffffff; | |
| bottom: 0; | |
| height: 100%; | |
| left: 0; | |
| position: fixed; | |
| right: 0; | |
| top: 0; | |
| width: 100%; | |
| z-index: 9999; |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.html$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_FILENAME} !-l | |
| RewriteRule . /index.html [L] |
This limits the number of lines of any textarea that has the attribute 'data-limit-rows' set to 'true'. The limit is the 'rows'-attribute of the textarea.
To know how many lines have been entered you have to look at the number of newline characters (\n) in the text. You could do this by splitting text on the newline character, and looking at the length of the resulting array: i.e. myText.split(/\n/g).length; This would work fine in every browser, except for one special case in Internet Explorer 8, whereby the user hits the enter key several times in a row, thus producing empty lines. In this case Internet Explorer 8 excludes all empty values from the resulting array, ie those places where the delimiters appear next to each other. The result is that the usr can enter more lines of text than permitted. This is probably also true for Internet Explorer versions lower than 8, but I didn't check.
To know which key was pressed it's b
| <?php // loop for taxonomy in custom post-type | |
| $argsMine = array( | |
| 'numberposts' => -1, | |
| 'orderby' => 'desc', | |
| 'post_type' => 'info', | |
| 'section' => 'minesweeper', | |
| 'post_status' => 'publish' | |
| ); | |
| $postslist = get_posts($argsMine); | |
| foreach ($postslist as $post) : |