Plugin Directory

Changeset 1713299


Ignore:
Timestamp:
08/14/2017 05:21:44 PM (9 years ago)
Author:
melkarim
Message:

show script cache status in the settings page

Location:
addefend-easy-integration
Files:
1 added
1 deleted
6 edited
8 copied

Legend:

Unmodified
Added
Removed
  • addefend-easy-integration/tags/1.2/Components/script_integration.php

    r1712151 r1713299  
    5757        addefend_log('ADDEFEND -- ERROR : Sticking with the old script');
    5858    }else{
    59         addefend_log('ADDEFEND -- INFO : Script is successfully downloaded');
     59        addefend_log('ADDEFEND -- TRACE : Script is downloaded successfully');
    6060        $new_script = wp_remote_retrieve_body($response);
    6161        global $wpdb;
     
    7070            addefend_log('ADDEFEND -- ERROR : script couldn\'t be saved in the database');
    7171        } else{
    72             addefend_log('ADDEFEND -- INFO : script is successfully saved in the database');
     72            addefend_log('ADDEFEND -- TRACE : script is successfully saved in the database');
    7373        }
    7474    }
     
    8080    global $wpdb;
    8181    $addefend_script = $wpdb->get_var("SELECT script FROM ".ADDEFEND_TABLE_NAME." WHERE (id = '1')");
    82     echo '<script type="text/javascript">'.$addefend_script.'</script>';
    83     addefend_log('ADDEFEND -- TRACE : Script injected in the footer');
     82    if(!$addefend_script){
     83        addefend_log('ADDEFEND -- ERROR : Failed to retrieve the script from the database');
     84    }else{
     85        echo '<script type="text/javascript">'.$addefend_script.'</script>';
     86        addefend_log('ADDEFEND -- TRACE : Script injected in the footer');
     87    }
    8488}
    8589
     
    8993    wp_clear_scheduled_hook('out_of_date_script');
    9094    global $wpdb;
    91     $wpdb->delete( ADDEFEND_TABLE_NAME, array( 'ID' => 1 ) );
     95    $wpdb->delete( ADDEFEND_TABLE_NAME, array( 'id' => '1' ) );
    9296}
     97
  • addefend-easy-integration/tags/1.2/View/options.php

    r1712151 r1713299  
    7373    }
    7474    echo ";\"'></div></td></tr>";
     75    echo "<tr><td><label>Script cache : </label></td><td><div style=\"height : 10px; width : 50px;background-color : ";
     76    global $wpdb;
     77    $addefend_script = $wpdb->get_var("SELECT script FROM ".ADDEFEND_TABLE_NAME." WHERE (id = '1')");
     78    if(!$addefend_script){
     79        echo 'red';
     80    }else{
     81        echo "green";
     82    }
     83    echo ";\"'></div></td></tr>";
    7584    echo "</table>";
    7685    echo '<p class="submit"><input type="submit" name="Submit" class="button-primary" value="Save Changes" /></p>';
  • addefend-easy-integration/tags/1.2/addefend-easy-integration.php

    r1712160 r1713299  
    44Plugin URI: https://wordpress.org/plugins/addefend-easy-integration/
    55Description: The AdDefend Easy Intregration plug-in supports publishers in integrating the AdDefend anti-adblock solution.
    6 Version: 1.1
     6Version: 1.2
    77Author: AdDefend GmbH
    88Author URI: http://www.addefend.com/
  • addefend-easy-integration/tags/1.2/readme.txt

    r1712156 r1713299  
    44Requires at least: 4.2
    55Tested up to: 4.8
    6 Stable tag: 1.1
     6Stable tag: 1.2
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl.html
     
    5050== Changelog ==
    5151
     52= 1.2 =
     53* show the script cache status in the settings page
     54
    5255= 1.1 =
    5356* show the cron job status in the settings page
  • addefend-easy-integration/trunk/Components/script_integration.php

    r1712151 r1713299  
    5757        addefend_log('ADDEFEND -- ERROR : Sticking with the old script');
    5858    }else{
    59         addefend_log('ADDEFEND -- INFO : Script is successfully downloaded');
     59        addefend_log('ADDEFEND -- TRACE : Script is downloaded successfully');
    6060        $new_script = wp_remote_retrieve_body($response);
    6161        global $wpdb;
     
    7070            addefend_log('ADDEFEND -- ERROR : script couldn\'t be saved in the database');
    7171        } else{
    72             addefend_log('ADDEFEND -- INFO : script is successfully saved in the database');
     72            addefend_log('ADDEFEND -- TRACE : script is successfully saved in the database');
    7373        }
    7474    }
     
    8080    global $wpdb;
    8181    $addefend_script = $wpdb->get_var("SELECT script FROM ".ADDEFEND_TABLE_NAME." WHERE (id = '1')");
    82     echo '<script type="text/javascript">'.$addefend_script.'</script>';
    83     addefend_log('ADDEFEND -- TRACE : Script injected in the footer');
     82    if(!$addefend_script){
     83        addefend_log('ADDEFEND -- ERROR : Failed to retrieve the script from the database');
     84    }else{
     85        echo '<script type="text/javascript">'.$addefend_script.'</script>';
     86        addefend_log('ADDEFEND -- TRACE : Script injected in the footer');
     87    }
    8488}
    8589
     
    8993    wp_clear_scheduled_hook('out_of_date_script');
    9094    global $wpdb;
    91     $wpdb->delete( ADDEFEND_TABLE_NAME, array( 'ID' => 1 ) );
     95    $wpdb->delete( ADDEFEND_TABLE_NAME, array( 'id' => '1' ) );
    9296}
     97
  • addefend-easy-integration/trunk/View/options.php

    r1712151 r1713299  
    7373    }
    7474    echo ";\"'></div></td></tr>";
     75    echo "<tr><td><label>Script cache : </label></td><td><div style=\"height : 10px; width : 50px;background-color : ";
     76    global $wpdb;
     77    $addefend_script = $wpdb->get_var("SELECT script FROM ".ADDEFEND_TABLE_NAME." WHERE (id = '1')");
     78    if(!$addefend_script){
     79        echo 'red';
     80    }else{
     81        echo "green";
     82    }
     83    echo ";\"'></div></td></tr>";
    7584    echo "</table>";
    7685    echo '<p class="submit"><input type="submit" name="Submit" class="button-primary" value="Save Changes" /></p>';
  • addefend-easy-integration/trunk/addefend-easy-integration.php

    r1712160 r1713299  
    44Plugin URI: https://wordpress.org/plugins/addefend-easy-integration/
    55Description: The AdDefend Easy Intregration plug-in supports publishers in integrating the AdDefend anti-adblock solution.
    6 Version: 1.1
     6Version: 1.2
    77Author: AdDefend GmbH
    88Author URI: http://www.addefend.com/
  • addefend-easy-integration/trunk/readme.txt

    r1712151 r1713299  
    44Requires at least: 4.2
    55Tested up to: 4.8
    6 Stable tag: 1.1
     6Stable tag: 1.2
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl.html
     
    5050== Changelog ==
    5151
     52= 1.2 =
     53* show the script cache status in the settings page
     54
    5255= 1.1 =
    5356* show the cron job status in the settings page
Note: See TracChangeset for help on using the changeset viewer.