Skip to content

Instantly share code, notes, and snippets.

@klaude
Created July 14, 2015 21:19
Show Gist options
  • Select an option

  • Save klaude/05f6a8ffaa2e04f44a8f to your computer and use it in GitHub Desktop.

Select an option

Save klaude/05f6a8ffaa2e04f44a8f to your computer and use it in GitHub Desktop.

Revisions

  1. klaude created this gist Jul 14, 2015.
    25 changes: 25 additions & 0 deletions lol.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    <?php

    use WHMCS\View\Menu\Item as MenuItem;

    add_hook(
    'ClientAreaPrimarySidebar',
    1,
    function(MenuItem $primarySidebar)
    {
    if ($primarySidebar->hasChild('My Account')) {
    $primarySidebar->getChild('My Account')
    ->addChild(
    'Mailing List Subscription Prefs',
    array(
    'label' => 'Subscription Preferences',
    'uri' => 'subscriptionprefs.php',
    'order' => '100',
    'attributes' => array(
    'target' => '_blank',
    ),
    )
    );
    }
    }
    );