Changeset 1255870
- Timestamp:
- 09/29/2015 02:57:58 PM (11 years ago)
- Location:
- clicksold-wordpress-plugin/trunk
- Files:
-
- 5 edited
-
CS_admin.php (modified) (1 diff)
-
CS_config.php (modified) (1 diff)
-
cs_functions.php (modified) (3 diffs)
-
cs_listings_plugin.php (modified) (1 diff)
-
views/idx-quick-search-widget.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
clicksold-wordpress-plugin/trunk/CS_admin.php
r1190416 r1255870 522 522 \" <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>\" + 523 523 \" <p class='cs_dashboard_widget_help_links_msg_header'>Free Tral:</p>\" + 524 \" <p>ClickSold offers a one month free trial o f our flagship Platinum package.</p>\" +524 \" <p>ClickSold offers a one month free trial on all our paid service tiers.</p>\" + 525 525 \" </div>\" + 526 526 -
clicksold-wordpress-plugin/trunk/CS_config.php
r834036 r1255870 92 92 cs_restore_cs_post_state( $prefix ); 93 93 94 // Additionally for the idx page, set the layout to full page IF th ey 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. 95 95 if( $prefix == 'idx' ) { 96 update_post_meta( $post_id, '_genesis_layout', 'full-width-content');96 cs_set_full_width( $post_id ); 97 97 } 98 98 } -
clicksold-wordpress-plugin/trunk/cs_functions.php
r1245223 r1255870 353 353 // For each registered sidebar. 354 354 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; } 355 358 356 359 // 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. … … 957 960 $found = 0; 958 961 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 959 967 foreach($CS_ADMIN_MENU_ITEMS as $key => $item){ 960 968 … … 967 975 } 968 976 977 /** 978 * Set the given page to full width, taking into account that cetain themes do this differently than others. 979 */ 980 function 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 */ 1004 function 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 969 1027 970 1028 -
clicksold-wordpress-plugin/trunk/cs_listings_plugin.php
r1245223 r1255870 1139 1139 register_deactivation_hook(__FILE__, array($cs_config, 'cs_deactivate')); 1140 1140 1141 /* Hooks for theme switching *******************************************************************/ 1142 add_action('switch_theme', 'cs_set_idx_to_full_width'); // Runs after theme is switched but before the next request. 1143 1141 1144 /* Administration Section **********************************************************************/ 1142 1145 /* Load the ClickSold widgets ******************************************************************/ -
clicksold-wordpress-plugin/trunk/views/idx-quick-search-widget.php
r921168 r1255870 10 10 (function($){ 11 11 $(document).ready(function(){ 12 $("#<?php echo $ widget_id ?>").IDXQuickSearchWidget({12 $("#<?php echo $this->get_field_id("") ?>container").IDXQuickSearchWidget({ 13 13 ajaxTarget : "<?php echo plugins_url( 'CS_ajax_request.php', dirname(__FILE__) ) ?>", 14 14 plugin : true,
Note: See TracChangeset
for help on using the changeset viewer.