Results 1 to 2 of 2

Thread: ClassiPress code contains unnecessary calls to echo

  1. #1
    Thread Starter
    Veteran almightyeric's Avatar
    Join Date
    Aug 2011
    Location
    Nothern CA, USA
    Posts
    416
    Thanks
    56
    Thanked 19 Times in 16 Posts

    ClassiPress code contains unnecessary calls to echo

    This is a little code clean-up suggestion.

    This file...
    classipress\tpl-edit-item.php

    ...contains the following code:
    PHP Code:
    // check and make sure images are allowed
    if ( $cp_options->ad_images ) {

        if ( 
    appthemes_plupload_is_enabled() ) {
            echo 
    appthemes_plupload_form$getad->ID );
        } else {
            
    $imagecount cp_get_ad_images$getad->ID );
            
    // print out image upload fields. pass in count of images allowed
            
    echo cp_ad_edit_image_input_fields$imagecount );
        } 
    The author is trying to echo the value returned by the following functions:
    - appthemes_plupload_form (which is defined in: classipress\framework\app-plupload\app-plupload.php)
    - cp_ad_edit_image_input_fields (which is defined in: classipress\includes\functions.php)

    The problem is: neither of those functions returns a value.

    The author can omit the "echo" construct in both cases.

  2. #2
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need code to echo images from single-ad_listing / Ad in order to print - Almost there
    By cgatherings in forum ClassiPress General Discussion
    Replies: 3
    Last Post: December 16th, 2016, 06:24 AM
  2. [SOLVED] which vantage file calls style.css
    By bradleyhebdon in forum Help Using Vantage (Legacy)
    Replies: 9
    Last Post: November 22nd, 2013, 06:40 AM
  3. Samcy CP 3.3.1 PHP Deprecated Function Calls.
    By seoagent in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: September 16th, 2013, 07:41 AM
  4. In CP 3.3, where is the code that calls up the main style.css?
    By talent in forum Help Using ClassiPress
    Replies: 1
    Last Post: April 28th, 2013, 07:12 AM