Advertisement 125 Widget gives errors

Support Forums for LiveMesh Themes & Plugins Forums Enticing Theme Support Advertisement 125 Widget gives errors

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #265
    tyrro
    Member

    Hi,

    I’m trying to use Advertisement 125 Widget but it’s giving me the following error after I move it to the sidebar widget area:

    Warning: _() expects exactly 1 parameter, 2 given in /Applications/XAMPP/xamppfiles/htdocs/rocketplay/wp-content/themes/rocketplay/framework/widgets/mo-advertisement-125-widget.php on line 154

    and this:

    Warning: _() expects exactly 1 parameter, 2 given in /Applications/XAMPP/xamppfiles/htdocs/rocketplay/wp-content/themes/rocketplay/framework/widgets/mo-advertisement-125-widget.php on line 159

    #272
    livemesh
    Keymaster

    It is a bug that escaped us (probably since it is a warning). I think you are still able to specify the ads and display them. If not, can you pls make the following change to file /Applications/XAMPP/xamppfiles/htdocs/rocketplay/wp-content/themes/rocketplay/framework/widgets/mo-advertisement-125-widget.php by replacing the line numbers 153 to 161 with the below code?

                                   <p>
    <label for="<?php echo $this->get_field_id($ad_link_id); ?>"><?php _e('Advertisement Link ', 'mo_theme') . $i; ?></label>
    <input type="text" class="widefat" id="<?php echo $this->get_field_id($ad_link_id); ?>" name="<?php echo $this->get_field_name($ad_link_id); ?>" value="<?php echo $instance[$ad_link_id]; ?>" style="width:100%;" />
    </p>
    <p>
    <label for="<?php echo $this->get_field_id($image_link_id); ?>"><?php _e('Image Link ', 'mo_theme') . $i; ?></label>
    <input type="text" class="widefat" id="<?php echo $this->get_field_id($image_link_id); ?>" name="<?php echo $this->get_field_name($image_link_id); ?>" value="<?php echo $instance[$image_link_id]; ?>" />
    </p>

    I have this change taken care of in my update coming this week. Thanks

    BTW, I am just replacing the echo _('Advertisement Link ', 'mo_theme') with _e('Advertisement Link ', 'mo_theme') on line 154 and a similar change is being made on line 159 as well.

    #275
    tyrro
    Member

    Thanks, it’s working now.

    #276
    tyrro
    Member

    You may also want to update line 31 of the same file and change the description of what this widget does 🙂

    #279
    livemesh
    Keymaster

    Sure. Done. Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Enticing Theme Support’ is closed to new topics and replies.