Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin
Created May 20, 2016 13:50
Show Gist options
  • Save tommcfarlin/052ce1b88ebec6ab7e27da5b35e3bcb2 to your computer and use it in GitHub Desktop.
Save tommcfarlin/052ce1b88ebec6ab7e27da5b35e3bcb2 to your computer and use it in GitHub Desktop.
[WordPress] Ignore Coding Standards in PHP CodeSniffer
<?php
public function highlight_draft_submenu( $parent_file ) {
global $submenu_file;
// Only update the submenu file value if we're on the Scheduled page.
if ( 'draft' === get_query_var( 'post_status' ) ) {
/**
* Removing unnecessary code for the purposes of the demo. Assume
* there is an associative array of key/value pairs referened by
* a variabled named `$args`.
*/
// @codingStandardsIgnoreStart
$submenu_file = add_query_arg( $args, $url );
// @codingStandardsIgnoreEnd
}
return $parent_file;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment