{"action":"published","release":{"url":"https://api.github.com/repos/lipemat/wordpress-libs/releases/14665580","assets_url":"https://api.github.com/repos/lipemat/wordpress-libs/releases/14665580/assets","upload_url":"https://uploads.github.com/repos/lipemat/wordpress-libs/releases/14665580/assets{?name,label}","html_url":"https://github.com/lipemat/wordpress-libs/releases/tag/2.1.0","id":14665580,"node_id":"MDc6UmVsZWFzZTE0NjY1NTgw","tag_name":"2.1.0","target_commitish":"master","name":"Array Utils","draft":false,"author":{"login":"lipemat","id":1688181,"node_id":"MDQ6VXNlcjE2ODgxODE=","avatar_url":"https://avatars0.githubusercontent.com/u/1688181?v=4","gravatar_id":"","url":"https://api.github.com/users/lipemat","html_url":"https://github.com/lipemat","followers_url":"https://api.github.com/users/lipemat/followers","following_url":"https://api.github.com/users/lipemat/following{/other_user}","gists_url":"https://api.github.com/users/lipemat/gists{/gist_id}","starred_url":"https://api.github.com/users/lipemat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lipemat/subscriptions","organizations_url":"https://api.github.com/users/lipemat/orgs","repos_url":"https://api.github.com/users/lipemat/repos","events_url":"https://api.github.com/users/lipemat/events{/privacy}","received_events_url":"https://api.github.com/users/lipemat/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2018-12-21T18:51:20Z","published_at":"2018-12-21T18:59:01Z","assets":[],"tarball_url":"https://api.github.com/repos/lipemat/wordpress-libs/tarball/2.1.0","zipball_url":"https://api.github.com/repos/lipemat/wordpress-libs/zipball/2.1.0","body":"## New Class `Utils\\Arrays`\r\n\r\nBeginnings if a central place to store specialize array handling. Starting with the first method `array_merge_recursive` which works like the native `array_merge_recursive` but it preserves data types. Think of it like `wp_parse_args_recursive`.\r\n\r\n```php\r\n/**\r\n\t * Works the same as `array_merge_recursive` except instead of turning\r\n\t * duplicate array keys into arrays, this will favor the $args over\r\n\t * the $defaults and clobber identical $default keys.\r\n\t *\r\n\t * @param array $args\r\n\t * @param array $defaults\r\n\t *\r\n\t * @since 2.1.0\r\n\t *\r\n\t * @return array\r\n\t */\r\n\tpublic function array_merge_recursive( array $args, array $defaults ) : array {\r\n```\r\n\r\n## Improvements to `Field_Type::textarea_code()`\r\n1. Pass `language` as a parameter.\r\n2. Pass `code_editor_arguments` as a parameter. \r\n\r\n```php\r\n/**\r\n\t * Code textarea.\r\n\t *\r\n\t * The defaults are most likely what you want to use, but just in case\r\n\t * there are arguments for specialize fine tuning\r\n\t *\r\n\t * @link https://github.com/CMB2/CMB2/wiki/Field-Types#textarea_code\r\n\t * @link https://www.ibenic.com/wordpress-code-editor#file-code-editor-js\r\n\t *\r\n\t * @param bool   $disable_codemirror    - disable code mirror handling in favor or a basic textbox\r\n\t * @param string $language              - [clike, css, diff, htmlmixed, http, javascript, jsx, markdown, gfm,\r\n\t *                                      nginx, php, sass, shell, sql, xml, yaml]\r\n\t * @param array  $code_editor_arguments - The arguments are then passed to `wp.codeEditor.initialize` method.\r\n\t *\r\n\t * @return Field\r\n\t */\r\n\tpublic function textarea_code( bool $disable_codemirror = false, ?string $language = null, array $code_editor_arguments = [] ) : Field {\r\n```"}}
{"actor":{"display_login":"lipemat"}}