MCPcopy Create free account
hub / github.com/cedaro/shiny-code / get_languages

Method get_languages

php/Plugin.php:31–83  ·  view source on GitHub ↗

* Retrieve code language settings. * * @since 0.1.0 * * @return array */

()

Source from the content-addressed store, hash-verified

29 * @return array
30 */
31 public function get_languages(): array {
32 $languages = [
33 'css' => [
34 'name' => esc_html__( 'CSS', 'shiny-code' ),
35 'codemirror' => [
36 'autoCloseBrackets' => true,
37 'matchBrackets' => true,
38 ],
39 ],
40 'html' => [
41 'name' => esc_html__( 'HTML', 'shiny-code' ),
42 'codemirror' => [
43 'autoCloseBrackets' => true,
44 'autoCloseTags' => true,
45 'matchTags' => [
46 'bothTags' => true,
47 ],
48 'mode' => 'htmlmixed',
49 ],
50 ],
51 'javascript' => [
52 'name' => esc_html__( 'JavaScript', 'shiny-code' ),
53 'codemirror' => [
54 'autoCloseBrackets' => true,
55 'matchBrackets' => true,
56 ],
57 ],
58 'json' => [
59 'name' => esc_html__( 'JSON', 'shiny-code' ),
60 'codemirror' => [
61 'autoCloseBrackets' => true,
62 'matchBrackets' => true,
63 'mode' => [
64 'name' => 'javascript',
65 'json' => true,
66 ],
67 ],
68 ],
69 'php' => [
70 'name' => esc_html__( 'PHP', 'shiny-code' ),
71 'codemirror' => [
72 'autoCloseBrackets' => true,
73 'autoCloseTags' => true,
74 'matchBrackets' => true,
75 'matchTags' => [
76 'bothTags' => true,
77 ],
78 ],
79 ],
80 ];
81
82 return apply_filters( 'shiny_code_languages', $languages );
83 }
84
85 /**
86 * Retrieve syntax highlighting theme settings.

Callers 3

enqueue_assetsMethod · 0.80
enqueue_editor_assetsMethod · 0.80
register_assetsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected