public static function getTitles()
 {
     if (!is_array(AccesskeyHelper::$titles)) {
         AccesskeyHelper::init();
     }
     return AccesskeyHelper::$titles;
 }
Example #2
0
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
// No direct access.
defined('_JEXEC') or die;
// Access keys load
require_once dirname(__FILE__) . DS . "accesskey_helper.php";
$accesskeys = AccesskeyHelper::getAccessKeys();
$ak_titles = AccesskeyHelper::getTitles();
// Note. It is important to remove spaces between elements.
$class = $item->anchor_css ? 'class="external-link ' . $item->anchor_css . '" ' : 'class="external-link" ';
$title = @$ak_titles[$item->id] ? 'title="' . $ak_titles[$item->id] . '" ' : '';
if ($item->menu_image) {
    $item->params->get('menu_text', 1) ? $linktype = '<img src="' . $item->menu_image . '" alt="' . $item->title . '" /><span class="image-title">' . $item->title . '</span> ' : ($linktype = '<img src="' . $item->menu_image . '" alt="' . $item->title . '" />');
} else {
    $linktype = $item->title;
}
switch ($item->browserNav) {
    default:
    case 0:
        ?>
<a<?php 
        if (@$accesskeys[$item->id]) {
            echo " accesskey='{$accesskeys[$item->id]}'";