Plugin Directory

Changeset 2845386


Ignore:
Timestamp:
01/09/2023 09:48:14 AM (3 years ago)
Author:
outdooractive
Message:

version 1.5

Location:
outdooractive-embed
Files:
33 added
3 edited

Legend:

Unmodified
Added
Removed
  • outdooractive-embed/trunk/includes/check_id.php

    r1804335 r2845386  
    55    //get correct Frontend
    66    $frontendUrl = parse_url ("$url");
    7     $frontend = $frontendUrl['host'];
    8    
    9     return $frontend;
     7    if(isset($frontendUrl['host'])){
     8        return $frontendUrl['host'];
     9    } else {
     10        return null;
     11    }
    1012}
    1113
     
    2325   
    2426    $testurl = 'https://www.outdooractive.com/de/r/'.$id.'?page='.$shortcodeType.'2go';
    25    
    26     // $handler = curl_init($testurl);
    27     // curl_setopt($handler, CURLOPT_RETURNTRANSFER, TRUE);
    28     // $re = curl_exec($handler);
    29     // $httpcdd = curl_getinfo($handler, CURLINFO_HTTP_CODE);
    30     // $lasturl = curl_getinfo($handler, CURLINFO_REDIRECT_URL);
    31    
     27
    3228    $response = wp_remote_get( $testurl );
    3329   
    3430    $response_body = wp_remote_retrieve_body( $response );
    3531   
    36     // $lastsign = substr ( $lasturl, -1 );
    37    
    3832    //Check if id matches to shortcode
    39     if ( $httpcdd == '404' || strpos( $response_body, 'Iframe' ) === false ) {
     33    if (strpos( $response_body, 'Iframe' ) === false ) {
    4034        return false;
    4135    } else {
     
    5246    $response_body = wp_remote_retrieve_body( $response );
    5347   
    54     if ( $httpcdd == '404' ) {
    55         return false;
    56     } else {
    57         return true;
    58     }
     48    return true;
    5949}
    6050?>
  • outdooractive-embed/trunk/outdooractive.php

    r2694700 r2845386  
    44Plugin URI: https://corporate.outdooractive.com
    55Description: Embeds any kind of outdooractive content on your website.
    6 Version: 1.4
     6Version: 1.5
    77Author: Outdooractive AG
    88Author URI: https://corporate.outdooractive.com
     
    123123
    124124function server_renderer_outdooractive_embed( $attr ){
     125    $maxwidth = '';
     126    if(isset($attr['maxwidth'])){
     127        $maxwidth = esc_attr($attr['maxwidth']);
     128    }
     129
    125130    return do_shortcode('[oaembed '
    126131        . 'url="' . esc_attr($attr['url'])
    127         . '" maxwidth="'     . esc_attr($attr['maxwidth'])
     132        . '" maxwidth="' . $maxwidth
    128133        . '" ' . ($attr['pro'] === true ? 'usepro=true ' : '')
    129134        . ']');
  • outdooractive-embed/trunk/readme.txt

    r2694700 r2845386  
    22Contributors: Outdooractive AG
    33Tags: Biking, Mountaineering, Hiking, Trekking, Hut, Refuge, Outdoor, Tour, Outdooractive
    4 Requires at least: 4.0
    5 Tested up to: 5.9.2
    6 Stable Tag: 1.4
     4Requires at least: 5.0
     5Tested up to: 6.1.1
     6Stable Tag: 1.5
    77License: GPL v3
    88
     
    5353== Changelog ==
    5454
     55= 1.5 =
     56* fix php warnings shown on websites with enabled warning output
     57
    5558= 1.4 =
    5659* adjust supported wordpress version
Note: See TracChangeset for help on using the changeset viewer.