Plugin Directory

Changeset 1342940


Ignore:
Timestamp:
02/04/2016 07:56:47 AM (10 years ago)
Author:
latorante
Message:

Updating to version 3.4.8 - missing method in API

Location:
genoo/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • genoo/trunk/Genoo.php

    r1336987 r1342940  
    66    Author URI: http://www.genoo.com/
    77    Author Email: info@genoo.com
    8     Version: 3.4.7
     8    Version: 3.4.8
    99    License: GPLv2
    1010    Text Domain: genoo
  • genoo/trunk/libs/Genoo/Api.php

    r1328926 r1342940  
    2727    const DEV = false;
    2828    const URL = 'https://api.genoo.com/api/rest';
    29     const URL_DEV = 'https://api-test.genoo.com/api/rest';
     29    const URL_DEV = '';
     30    const TIMEZONE = 'America/Chicago';
    3031
    3132    /** @var API key */
     
    734735    }
    735736
     737    /**
     738     * This is used by extensions to esaily insert activities
     739     *
     740     * @param $email
     741     * @param $activityType
     742     * @param $activityName
     743     * @param string $description
     744     * @param string $url
     745     * @return null
     746     */
     747    public function putActivityByMail($email, $activityType, $activityName, $description = '', $url = '')
     748    {
     749        try {
     750            $lead = $this->getLeadByEmail($email);
     751            if(is_array(($lead)) && isset($lead[0])){
     752                // Get Lead Id
     753                $leadid = $lead[0]->genoo_id;
     754                // Set timezone
     755                $dt = new \DateTime("now", new \DateTimeZone(self::TIMEZONE));
     756                $dt->setTimestamp(time()); //adjust the object to correct timestamp
     757                $this->putActivity($leadid, $dt->format('Y-m-d H:i:s'), $activityType, $activityName, $description, $url);
     758                return $leadid;
     759            } else {
     760                //logError('Warning: lead' . $email . ' does not exist.');
     761            }
     762        } catch (\Exception $e){
     763            //logError('Error during: ' . $activityType . ', Error: ' . $e->getMessage());
     764        }
     765        return NULL;
     766    }
    736767
    737768    /** ----------------------------------------------------- */
  • genoo/trunk/libs/Genoo/Frontend.php

    r1326466 r1342940  
    327327            }
    328328            // Fire filter to add additional Modals if needed by extensions
    329             // TODO: convert to Filter::apply()
    330329            apply_filters('wpmktengine_footer_modals', $footerModals);
    331330            // Add open modal javascript for PopOver (if set)
     
    334333                $footerModals = $footerModals . WidgetForm::getModalOpenJavascript('modalWindowGenooctaShortcodepopover');
    335334            }
     335            // print it out
     336            echo $footerModals;
     337        } else {
     338            // Fire filter to add additional Modals if needed by extensions
     339            apply_filters('wpmktengine_footer_modals', $footerModals);
    336340            // print it out
    337341            echo $footerModals;
  • genoo/trunk/libs/Genoo/RepositoryLumens.php

    r1178729 r1342940  
    9090            $lumens = $this->getLumens();
    9191            if(!empty($lumens)){
    92                 foreach($lumens as $lumen){
    93                     if(is_array($lumen) && !empty($lumen)){
    94                         $lumensVars[$lumen['id']] = $lumen['name'];
     92                if(is_array($lumens)){
     93                    foreach($lumens as $lumen){
     94                        if(is_array($lumen) && !empty($lumen)){
     95                            $lumensVars[$lumen['id']] = $lumen['name'];
     96                        }
    9597                    }
    9698                }
     
    113115        $lumens = $this->getLumens();
    114116        if(!empty($lumens)){
    115             foreach($lumens as $form){
    116                 $form = (object)$form;
    117                 $forms[] = array(
    118                     'id' => $form->id,
    119                     'name' => $form->name,
    120                 );
     117            if(is_array($lumens)){
     118                foreach($lumens as $form){
     119                    $form = (object)$form;
     120                    $forms[] = array(
     121                        'id' => $form->id,
     122                        'name' => $form->name,
     123                    );
     124                }
    121125            }
     126
    122127        }
    123128        return $forms;
  • genoo/trunk/readme.txt

    r1336987 r1342940  
    66License: GPLv2 or later
    77License URI: http://www.gnu.org/licenses/gpl-2.0.html
    8 Stable tag: 3.4.7
     8Stable tag: 3.4.8
    99
    1010Combine the flexibility of WordPress with the power of Genoo and experience amazing results!
     
    6868
    6969== Changelog ==
     70
     71= 3.4.8 =
     72* Extended API
    7073
    7174= 3.4.7 =
Note: See TracChangeset for help on using the changeset viewer.