Plugin Directory

Changeset 1151018


Ignore:
Timestamp:
05/01/2015 01:02:42 PM (11 years ago)
Author:
rfair404
Message:

fix up the errors when no addons are saved

Location:
lytics/trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lytics/trunk/lib/lytics-addons.php

    r1150989 r1151018  
    4545
    4646    foreach ($addons as $addon){
    47         if( in_array( $addon['id'] , $enabled_addons ) ){
     47        if( is_array( $enabled_addons) && in_array( $addon['id'] , $enabled_addons ) ){
    4848        $addon = $this->load_addon( $addon );
    4949        $this->addons[] = $addon;
  • lytics/trunk/lib/lytics-settings.php

    r1150989 r1151018  
    118118    * @todo clean up this output so that it is more readable
    119119    */
    120     function accout_instructions( ){
    121     _e( 'Enter your Lytics tracking tag as shown on your Lytics account dashboard.', 'lytics');
    122     _e( 'To find your Lytics tracking tag, visit the <i>Integrations</i> tab on your Lytics Dashboard and navigate to the instructions for integrating Lytics.', 'lytics');
    123     _e( 'https://admin.lytics.io/#/documentation/jstag_anon' );
    124     _e( 'Then click "Install Tag" to reveal your tracking tag.', 'lytics');
     120    function accout_instructions( ){ ?>
     121    <p> <?php _e( 'Enter your Lytics tracking tag as shown on your Lytics account dashboard.', 'lytics'); ?>
     122    <p> <?php _e( 'To find your Lytics tracking tag, visit the <i>Integrations</i> tab on your Lytics Dashboard and navigate to the instructions for integrating Lytics.', 'lytics'); ?>
     123    <p> <?php _e( 'https://admin.lytics.io/#/documentation/jstag_anon' ); ?>
     124    <p> <?php _e( 'Then click "Install Tag" to reveal your tracking tag.', 'lytics'); ?>
     125    <?php
    125126    }
    126127
     
    130131    * @author Russell Fair
    131132    */
    132     function addon_selection(){
    133     _e( 'Select the addons that you wish to enable on your site.' , 'lytics' );
     133    function addon_selection(){ ?>
     134    <p> <?php _e( 'Select the addons that you wish to enable on your site.' , 'lytics' ); ?>
     135    <?php
    134136    }
    135137
     
    169171
    170172    foreach ( $addon_list as $addon => $addon_settings ){
    171         $checked = ( in_array( $addon_settings['id'], $enabled_addons ) ) ? ' checked': '' ;
     173        $checked = ( is_array( $enabled_addons) && in_array( $addon_settings['id'], $enabled_addons ) ) ? ' checked': '' ;
    172174        printf('<p><input type="checkbox" name="lytics_addon_selection[%s]"%s/>', $addon_settings['id'], $checked );
    173175        printf('<label for="lytics_addon_selection[%s]">%s</label>', $addon_settings['id'], $addon_settings['name'] );
Note: See TracChangeset for help on using the changeset viewer.