MCPcopy Create free account
hub / github.com/EqualifyEverything/equalify / covert_code_shortcode

Function covert_code_shortcode

models/view_components.php:166–181  ·  view source on GitHub ↗

* Convert Code Shortcode */

($subject)

Source from the content-addressed store, hash-verified

164 * Convert Code Shortcode
165 */
166function covert_code_shortcode($subject){
167
168 // Convert text between [code][/code] into styled
169 // code.
170 $subject = str_replace(
171 '[code]', '<pre class="rounded bg-secondary
172 text-white p-3 mb-1"><code>', $subject
173 );
174 $subject = str_replace(
175 '[/code]', '</code></pre>', $subject
176 );
177
178 // [code] is converted!
179 return $subject;
180
181}
182
183/**
184 * Get Page Number

Callers 1

reports.phpFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected