Plugin Directory

Changeset 1255870


Ignore:
Timestamp:
09/29/2015 02:57:58 PM (11 years ago)
Author:
ClickSold
Message:

cs-pkg-deploy.pl comitting clicksold vers (1.71) - Tue Sep 29 08:57:53 2015

Location:
clicksold-wordpress-plugin/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • clicksold-wordpress-plugin/trunk/CS_admin.php

    r1190416 r1255870  
    522522                                                            \"    <p>Clicking the above image or the same image in the Dashboard widget will allow you to upgrade your account or try a free demo package. Free demo packages allow you to see exactly how your plugin would behave after upgrading to the full ClickSold Platinum package.</p>\" +
    523523                                                            \"    <p class='cs_dashboard_widget_help_links_msg_header'>Free Tral:</p>\" +
    524                                                             \"    <p>ClickSold offers a one month free trial of our flagship Platinum package.</p>\" +
     524                                                            \"    <p>ClickSold offers a one month free trial on all our paid service tiers.</p>\" +
    525525                                                            \"  </div>\" +
    526526
  • clicksold-wordpress-plugin/trunk/CS_config.php

    r834036 r1255870  
    9292                cs_restore_cs_post_state( $prefix );
    9393
    94                 // Additionally for the idx page, set the layout to full page IF they are running a genesis theme.
     94                // Additionally for the idx page, set the layout to full page IF this site is running a theme that we know how to do that on.
    9595                if( $prefix == 'idx' ) {
    96                     update_post_meta( $post_id, '_genesis_layout', 'full-width-content' );
     96                    cs_set_full_width( $post_id );
    9797                }
    9898            }
  • clicksold-wordpress-plugin/trunk/cs_functions.php

    r1245223 r1255870  
    353353    // For each registered sidebar.
    354354    foreach( get_option('sidebars_widgets', array() ) as $sidebar_name => $sidebar_widget_list ) {
     355
     356        // If the value (sidebar_widget_list) is not an array we skip it as there are other keys in the sidebars_widgets array that are not actual arrays.
     357        if( !is_array( $sidebar_widget_list ) ) { continue; }
    355358
    356359        // In the sidebars_widgets array there is an element with the key of 'array_version' this is not a sidebar and it's value is numeric and not an array -- we skip it.
     
    957960    $found = 0;
    958961    global $CS_ADMIN_MENU_ITEMS;
     962   
     963    // Escape for if cs_constants.php has not been loaded... this happens during plugin activation which is handled by CS_config.php where the full cs_listings_plugin.php is not actually yet loaded.
     964    // Note, we could just include cs_constants.php but for this routine it does not make sense, because we can't be in a cs admin section while the plugin is being activated.
     965    if( !isset($CS_ADMIN_MENU_ITEMS) ) { return; }
     966   
    959967    foreach($CS_ADMIN_MENU_ITEMS as $key => $item){
    960968       
     
    967975}
    968976
     977/**
     978 * Set the given page to full width, taking into account that cetain themes do this differently than others.
     979 */
     980function cs_set_full_width( $post_id ) {
     981
     982    // Get a WP_Theme object with the details of the currently selected theme.
     983    $theme = wp_get_theme();
     984   
     985    if( $theme['Template'] == 'genesis' ) {                                         // Note we use "Template" here and not "Name" because all of the genesis ones have "Template" == genesis but have individual names.
     986       
     987        update_post_meta( $post_id, '_genesis_layout', 'full-width-content' );
     988       
     989    } else if(                                                                      // ClickSold Themes
     990        $theme['Template'] == 'Clicksold Theme 1' ||
     991        $theme['Template'] == 'xxxxxxxxxxxxxxxxx'
     992        //
     993        //
     994        // Add More Here as they become available.
     995        //
     996        //
     997    ) {
     998        update_post_meta( $post_id, '_wp_page_template', 'page-full-width.php' );
     999    }
     1000}
     1001/**
     1002 * Set the idx page to full width.
     1003 */
     1004function cs_set_idx_to_full_width() {
     1005
     1006    global $wpdb;
     1007   
     1008    // Find the page id of the idx page.
     1009    global $wpdb;
     1010    global $cs_posts_table;
     1011
     1012    // Get the one marked idx.
     1013    $idx_post_id = $wpdb->get_results( "SELECT postid FROM " . $wpdb->prefix . $cs_posts_table . " where prefix = 'idx'" );
     1014
     1015    // If we don't find anything return just bail.
     1016    if( count( $idx_post_id ) == 0 ) {
     1017        return;
     1018    } else { // We did find the idx post id.
     1019       
     1020        // Set it to a wide screen page.
     1021        cs_set_full_width( $idx_post_id[0]->postid );
     1022    }
     1023
     1024
     1025}
     1026
    9691027
    9701028
  • clicksold-wordpress-plugin/trunk/cs_listings_plugin.php

    r1245223 r1255870  
    11391139register_deactivation_hook(__FILE__, array($cs_config, 'cs_deactivate'));
    11401140
     1141/* Hooks for theme switching *******************************************************************/
     1142add_action('switch_theme', 'cs_set_idx_to_full_width');     // Runs after theme is switched but before the next request.
     1143
    11411144/* Administration Section **********************************************************************/
    11421145/* Load the ClickSold widgets ******************************************************************/
  • clicksold-wordpress-plugin/trunk/views/idx-quick-search-widget.php

    r921168 r1255870  
    1010(function($){
    1111    $(document).ready(function(){
    12         $("#<?php echo $widget_id ?>").IDXQuickSearchWidget({
     12        $("#<?php echo $this->get_field_id("") ?>container").IDXQuickSearchWidget({
    1313            ajaxTarget : "<?php echo plugins_url( 'CS_ajax_request.php', dirname(__FILE__) ) ?>",
    1414            plugin : true,
Note: See TracChangeset for help on using the changeset viewer.