Skip to content

Commit

Permalink
Resolve codesniffer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sheabunge committed Jul 21, 2022
1 parent ddd9dc8 commit d4ade03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions php/admin-menus/class-manage-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function run() {
*/
public function register() {
$icon_xml = '<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024"><path fill="transparent" d="M191.968 464.224H350.88c23.68 0 42.656 19.2 42.656 42.656 0 11.488-4.48 21.984-11.968 29.632l.192.448-108.768 108.736c-75.104 75.136-75.104 196.512 0 271.584 74.88 74.848 196.448 74.848 271.552 0 74.88-75.104 74.88-196.48 0-271.584-21.76-21.504-47.36-37.12-74.464-46.272l28.608-28.576h365.248c87.04 0 157.856-74.016 159.968-166.4 0-1.472.224-2.752 0-4.256-2.112-23.904-22.368-42.656-46.912-42.656h-264.96L903.36 166.208c17.504-17.504 18.56-45.024 3.2-63.36-1.024-1.28-2.08-2.144-3.2-3.2-66.528-63.552-169.152-65.92-230.56-4.48L410.432 357.536h-46.528c12.8-25.6 20.032-54.624 20.032-85.344 0-106.016-85.952-192-192-192-106.016 0-191.968 85.984-191.968 192 .032 106.08 85.984 192.032 192 192.032zm85.344-191.968c0 47.136-38.176 85.344-85.344 85.344-47.136 0-85.312-38.176-85.312-85.344s38.176-85.344 85.312-85.344c47.168 0 85.344 38.208 85.344 85.344zm191.776 449.056c33.28 33.248 33.28 87.264 0 120.512-33.28 33.472-87.264 33.472-120.736 0-33.28-33.248-33.28-87.264 0-120.512 33.472-33.504 87.456-33.504 120.736 0z"/></svg>';
// phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
$encoded_icon = base64_encode( $icon_xml );

// Register the top-level menu.
Expand Down
12 changes: 8 additions & 4 deletions php/front-end/class-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,14 @@ public function enqueue_highlighting( $posts ) {
// Load Prism assets on the appropriate hook.
$this->register_prism_assets();

add_action( 'wp_enqueue_scripts', function () {
wp_enqueue_style( self::PRISM_HANDLE );
wp_enqueue_script( self::PRISM_HANDLE );
}, 100 );
add_action(
'wp_enqueue_scripts',
function () {
wp_enqueue_style( self::PRISM_HANDLE );
wp_enqueue_script( self::PRISM_HANDLE );
},
100
);

return $posts;
}
Expand Down

0 comments on commit d4ade03

Please sign in to comment.