This file contains 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 | |
add_filter( 'block_catalog_block_title', function( $title, $block_name, $block ) { | |
$map = [ | |
"xyz/custom-block" => "My Custom Block", | |
]; | |
if ( ! empty( $map[ $block_name ] ) ) { | |
return $map[ $block_name ]; | |
} |
This file contains 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 | |
add_filter( 'js_do_concat', 'vip_gutenberg_disable_concat', 100, 1 ); | |
function vip_gutenberg_disable_concat( $handle ) { | |
if ( is_admin() && ( function_exists( 'is_gutenberg_page' ) && is_gutenberg_page() ) ) { | |
return false; | |
} | |
return $handle; |
This file contains 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 | |
function get_temperature() { | |
// api call | |
} | |
function get_cached( $method, $args ) { | |
$key = [ $method, $args ]; | |
$key = md5( $key ); | |
This file contains 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 | |
/* | |
Plugin Name: Bad Plugin | |
Description: Bad Plugin for testing PHP errors in QM | |
Version: 0.1.0 | |
Author: Darshan Sawardekar | |
License: GPL v2 or later | |
*/ | |
function bad_plugin_main() { |
This file contains 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 | |
class WPMDB_Test_Command extends WP_CLI_Command { | |
/** | |
* Adds Test Posts to WordPress | |
* | |
* ## OPTIONS | |
* | |
* <count> |
This file contains 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
grammar.y:557:in `rescue in parse': on line 1: (Riml::ParseError) | |
parse error on value "echo" (BUILTIN_COMMAND) | |
from grammar.y:547:in `parse' | |
from /home/dms/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/riml-0.3.0/lib/riml.rb:37:in `compile' | |
from /home/dms/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/riml-0.3.0/lib/riml.rb:93:in `compile_files' | |
from /home/dms/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/riml-0.3.0/bin/riml:108:in `start' | |
from /home/dms/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/riml-0.3.0/bin/riml:125:in `<module:Riml>' | |
from /home/dms/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/riml-0.3.0/bin/riml:6:in `<top (required)>' | |
from /home/dms/.rbenv/versions/1.9.3-p429/bin/riml:23:in `load' | |
from /home/dms/.rbenv/versions/1.9.3-p429/bin/riml:23:in `<main>' |
This file contains 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
def hello() | |
end |