Plugin Directory

Changeset 425979


Ignore:
Timestamp:
08/19/2011 06:46:09 PM (15 years ago)
Author:
JonBishop
Message:
 
Location:
hubspot
Files:
44 added
4 edited

Legend:

Unmodified
Added
Removed
  • hubspot/trunk/hubspot.php

    r420097 r425979  
    44Description: The HubSpot for WordPress plugin integrates the power of HubSpot with your WordPress site
    55Author: HubSpot
    6 Version: 1.5.2
     6Version: 1.5.3
    77Requires at least: 2.9
    88Author URI: http://www.hubspot.com
  • hubspot/trunk/inc/hs-action.php

    r373097 r425979  
    165165    function hs_display_action($before_widget, $after_widget, $before_title, $after_title, $hide_title = false, $action_ids = null){
    166166        global $myhubspotwp_action;
    167        
     167
    168168        $possible_actions = array();
    169169        $possible_titles = array();
     
    171171        $alt_titles = array();
    172172                $args = array('post_type' => 'hs-action');
    173                
     173
    174174                if($action_ids != null && trim($action_ids) != ""){
    175                     $args = wp_parse_args( array('include' => $action_ids), $args );
     175                    $args = wp_parse_args( array('post__in' => explode(',', $action_ids)), $args );
    176176                }
    177         $hs_actions = get_posts($args);
    178         foreach ($hs_actions as $hs_action) {
    179             setup_postdata($hs_action);
    180             array_push($possible_actions,array($hs_action->ID, $hs_action->post_title, $hs_action->post_content));
    181         }
    182         if ($hs_actions){
    183         //display results
    184         $rand_key = array_rand($possible_actions,1);
    185         $hs_id = $possible_actions[$rand_key][0];
    186         $hs_title = $possible_actions[$rand_key][1];
    187         $hs_content = $possible_actions[$rand_key][2];
    188        
    189         if($myhubspotwp_action->hs_actions_stats_enabled()){
    190             $siteurl = get_page_link();
    191             $symbol = (preg_match('/\?/', $siteurl)) ? '&' : '?';
    192             $hs_content = str_replace('"', '\'', $hs_content);
    193             $hs_content = str_replace('href=\'http', 'href=\'' . $siteurl . $symbol . 'hs_redirect_' . $hs_id . '=http', $hs_content);
    194         }
    195         $content = "";
    196        
    197         $content .= $before_widget;
    198         if(!$hide_title){
    199             $content .= $before_title . $hs_title . $after_title;
    200         }
    201         $content .= $hs_content;
    202         $content .= $after_widget;
    203         if($this->hs_actions_stats_enabled() && !$this->is_bot($_SERVER['HTTP_USER_AGENT'])){
    204             $this->hs_register_impression($hs_id);
    205         }
    206         $content = apply_filters('the_content',$content);
     177
     178                $queryObject = new WP_Query($args);
     179                // The Loop...
     180                if ($queryObject->have_posts()) {
     181                        while ($queryObject->have_posts()) {
     182                                $queryObject->the_post();
     183                                array_push($possible_actions,
     184                                        array(
     185                                            get_the_ID(),
     186                                            get_the_title(),
     187                                            wpautop(get_the_content())
     188                                        ));
     189                        }
     190
     191                    //display results
     192                    $rand_key = array_rand($possible_actions,1);
     193                    $hs_id = $possible_actions[$rand_key][0];
     194                    $hs_title = $possible_actions[$rand_key][1];
     195                    $hs_content = $possible_actions[$rand_key][2];
     196
     197                    if($myhubspotwp_action->hs_actions_stats_enabled()){
     198                            $siteurl = get_page_link();
     199                            $symbol = (preg_match('/\?/', $siteurl)) ? '&' : '?';
     200                            $hs_content = str_replace('"', '\'', $hs_content);
     201                            $hs_content = str_replace('href=\'http', 'href=\'' . $siteurl . $symbol . 'hs_redirect_' . $hs_id . '=http', $hs_content);
     202                    }
     203                    $content = "";
     204
     205                    $content .= $before_widget;
     206                    if(!$hide_title){
     207                            $content .= $before_title . $hs_title . $after_title;
     208                    }
     209                    $content .= $hs_content;
     210                    $content .= $after_widget;
     211                    if($this->hs_actions_stats_enabled() && !$this->is_bot($_SERVER['HTTP_USER_AGENT'])){
     212                            $this->hs_register_impression($hs_id);
     213                    }
    207214        } else {
    208215            $content = "";
    209216        }
    210            
     217
    211218        return $content;
    212219    }
  • hubspot/trunk/inc/hs-social.php

    r373097 r425979  
    2424            return;
    2525        }
     26                if (preg_match('/googlebot/i', $_SERVER['HTTP_USER_AGENT'])){
     27                        return;
     28                }
    2629        $hs_settings=get_option('hs_settings');
    2730        if ($feed != 'comments-rss2' && trim($hs_settings['hs_feedburner_url']) != '') {
  • hubspot/trunk/readme.txt

    r420097 r425979  
    44Requires at least: 2.9
    55Tested up to: 3.2.1
    6 Stable tag: 1.5.2
     6Stable tag: 1.5.3
    77
    88Allows WordPress users to take advantage of HubSpot lead nurturing, website analytics, and assorted features of the HubSpot CMS.
     
    173173
    174174== Changelog ==
     175= 1.5.3=
     176* Fixed duplicate content on calls to action
     177* Added support for Googlebot to index RSS
     178
    175179= 1.5.2=
    176180* Fixed losing forms on upgrade
Note: See TracChangeset for help on using the changeset viewer.