Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

$webinar = false;
if (get_post_type() == 'event') {
$cat = wp_get_object_terms(get_the_ID(), 'event_categories', []);
$cat = wp_get_object_terms((int)get_the_ID(), 'event_categories', []);
if ($cat) {
foreach ($cat as $c) {
if ($c->term_id == 250) { // event_categories Webinars
Expand Down Expand Up @@ -73,7 +73,8 @@
}

if (get_post_type() == 'event') {
$cat_id = get_queried_object()->term_id;
$queried_object = get_queried_object();
$cat_id = $queried_object instanceof WP_Term ? $queried_object->term_id : null;
}

?>
Expand Down
1 change: 0 additions & 1 deletion blocks/benefits3.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
$id = get_field('section_id');
$title = get_field('title');
$text = get_field('text');
$link = get_field('link');
?>
<section class="benefits3-section" id="<?php echo $id; ?>">
<div class="container">
Expand Down
6 changes: 3 additions & 3 deletions blocks/blog-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

if (isset($_GET['webinars'])) {

if (strip_tags($_GET['webinars']) == 'upcoming') {
if (is_string($_GET['webinars']) && strip_tags($_GET['webinars']) == 'upcoming') {
echo __('Upcoming webinars', 'nextcloud');
} else {
echo __('Webinar recordings', 'nextcloud');
Expand Down Expand Up @@ -70,7 +70,7 @@
]
];

if (strip_tags($_GET['webinars']) == 'upcoming') {
if (is_string($_GET['webinars']) && strip_tags($_GET['webinars']) == 'upcoming') {

$args['meta_query'] = [
[
Expand All @@ -82,7 +82,7 @@
];
$args['order'] = 'DESC';

} elseif (strip_tags($_GET['webinars']) == 'past') {
} elseif (is_string($_GET['webinars']) && strip_tags($_GET['webinars']) == 'past') {

$args['meta_query'] = [
'relation' => 'AND',
Expand Down
5 changes: 0 additions & 5 deletions blocks/carousel_slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
* Carousel Slider block template
*/
$id = get_field('id');
$autoplay_options = get_field_object('autoplay');
$autoplay = $autoplay_options['value'];
if (!$autoplay) {
$autoplay = 'false';
}

$boxed_layout_options = get_field_object('boxed_layout');
$boxed_layout = $boxed_layout_options['value'];
Expand Down
8 changes: 2 additions & 6 deletions blocks/case-study.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,12 @@
foreach ($studies as $study) {

$post_id = $study->ID;
$link = get_the_permalink($post_id);
$link = (string)get_the_permalink($post_id);

$featured_image = get_the_post_thumbnail($post_id, 'large', [ 'class' => 'feat_img' ]);

$img = wp_get_attachment_url(get_post_thumbnail_id($post_id) ?: 0) ?: '';
$header = get_the_title($post_id);
$ex = get_the_excerpt($post_id);
$custom_field = get_field('field_name', $post_id);
$att = get_field('attachment', $post_id);
$str = substr($att, 38);
echo '<div data-case-study-id="' . $post_id . '" class="' . $studies_col_css . '">';
echo '<div class="post-holder case_study" data-file="">';
//echo '<div class="post-img" style="background-image:url(' . $img . ');"></div>';
Expand All @@ -63,7 +59,7 @@
}

echo '<div class="btn_container">';
echo '<a href="' . get_the_permalink($post_id) . '" class="c-btn btn-top btn-small btn_see_case_study">' . __('Download', 'nextcloud') . '</a>';
echo '<a href="' . (string)get_the_permalink($post_id) . '" class="c-btn btn-top btn-small btn_see_case_study">' . __('Download', 'nextcloud') . '</a>';
echo '</div>';

echo '</div>';
Expand Down
1 change: 0 additions & 1 deletion blocks/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
$id = get_field('section_id');
$title = get_field('title');
$text = get_field('text');
$playground = str_contains(get_permalink() ?: '', 'playground');
?>
<section class="contact-section gr" id="<?php echo $id; ?>">
<div class="container">
Expand Down
6 changes: 2 additions & 4 deletions blocks/data-sheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@
echo '<div class="row">';
foreach ($studies as $study) {
$post_id = $study->ID;
$link = get_the_permalink($study->ID);
$link = (string)get_the_permalink($study->ID);
$featured_image = get_the_post_thumbnail($post_id, 'large', [ 'class' => 'feat_img' ]);

$img = wp_get_attachment_url(get_post_thumbnail_id($study->ID) ?: 0) ?: '';
$header = get_the_title($study->ID);
$ex = get_the_excerpt($study->ID);
$custom_field = get_field('field_name', $study->ID);
$att = get_field('attachment', $study->ID);
echo '<div class="col-lg-4 mb-3">';
echo '<div class="post-holder data_sheet" data-file="' . $att . '">';
Expand All @@ -53,7 +51,7 @@
}

echo '<div class="btn_container">';
echo '<a href="' . get_the_permalink($study->ID) . '" class="c-btn btn-top btn-small btn_see_data_sheet">' . __('Download', 'nextcloud') . '</a>';
echo '<a href="' . (string)get_the_permalink($study->ID) . '" class="c-btn btn-top btn-small btn_see_data_sheet">' . __('Download', 'nextcloud') . '</a>';
echo '</div>';

echo '</div>';
Expand Down
2 changes: 1 addition & 1 deletion blocks/faq.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
echo '</div>';
echo '<div class="accord-flex">';
$count = count(get_field('faq'));
$half = ceil($count / 2);
$half = (int)ceil($count / 2);
$i = 0;
while (have_rows('faq')) : the_row();
$q = get_sub_field('question');
Expand Down
1 change: 0 additions & 1 deletion blocks/hosting.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
echo '<div class="row">';
while (have_rows('columns')) {
the_row();
$header = get_sub_field('the_title');
$cont = get_sub_field('the_text');
$link = get_sub_field('link');
echo '<div class="col-lg-6 spacer">';
Expand Down
1 change: 0 additions & 1 deletion blocks/hosting2.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
echo '<div class="row">';
while (have_rows('columns')) {
the_row();
$header = get_sub_field('the_title');
$cont = get_sub_field('the_text');
$link = get_sub_field('link');
echo '<div class="col-lg-6 spacer">';
Expand Down
4 changes: 2 additions & 2 deletions blocks/img-cols.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
while (have_rows('column')) {
the_row();
$img_id = get_sub_field('column_image');
$img2 = wp_get_attachment_image($img_id, 'full', '', [ 'class' => 'img-responsive' ]);
$img_url = wp_get_attachment_image_url($img_id, 'full');
$img2 = wp_get_attachment_image($img_id, 'full', false, [ 'class' => 'img-responsive' ]);
$img_url = (string)wp_get_attachment_image_url($img_id, 'full');
$text = get_sub_field('column_text');
if ($count == '1') {
echo '<div class="col-lg-12 spacer">';
Expand Down
1 change: 0 additions & 1 deletion blocks/industries.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
$columns = get_field('no_of_columns');
$css = get_field('custom_css_classes');

$col_class = '';
if ($columns == 4) {
$col_class = 'col-lg-3';
} elseif ($columns == 3) {
Expand Down
12 changes: 2 additions & 10 deletions blocks/nc_videos_tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@
the_row();

$id = get_sub_field('id');
$icon = get_sub_field('icon');
//$title = str_replace('<br>', '\n', get_sub_field( 'title' ));
$title = str_replace('\n', '<br>', get_sub_field('title'));
$title = str_replace('\n', '<br>', (string)get_sub_field('title'));
$description = get_sub_field('description');
$video_url = get_sub_field('video_url');
$video_preview_image = get_sub_field('video_preview_image');
$link = get_sub_field('link');

$custom_css = '';
?>


Expand Down Expand Up @@ -130,13 +126,9 @@
the_row();

$id = get_sub_field('id');
$icon = get_sub_field('icon');
$title = str_replace('\n', '', get_sub_field('title'));
$description = get_sub_field('description');
$title = str_replace('\n', '', (string)get_sub_field('title'));
$video_url = get_sub_field('video_url');
$video_preview_image = get_sub_field('video_preview_image');
$link = get_sub_field('link');
$custom_css = '';

echo '<div id="' . $id . '-preview" class="nc_video_preview_box popup-video release_video">';
?>
Expand Down
1 change: 0 additions & 1 deletion blocks/podcast.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@
'order' => 'DSC',
]);
foreach ($onepost as $onepostsingle) {
$img = wp_get_attachment_url(get_post_thumbnail_id($onepostsingle->ID) ?: 0) ?: '';
$title = $onepostsingle->post_title;
$date = (string)get_the_date('F d, Y', $onepostsingle->ID);
$cat = get_the_category($onepostsingle->ID);
Expand Down
25 changes: 9 additions & 16 deletions blocks/promo.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
$bg_image = get_field('background_image');
$css_classes = get_field('custom_css_classes');
$expiration = get_field('expiration_date');
$show_promo = true;
if ($expiration) {
$expiration_ts = strtotime($expiration);
$now = time();
}

$show_promo = true;
if ($expiration) {
if ($expiration_ts < $now) {
$show_promo = false;
}
Expand Down Expand Up @@ -69,18 +66,14 @@
?>
<div class="btns-inline-centered">
<?php
if ($link) {
$link_url = $link['url'];
$link_title = $link['title'];
$link_target = $link['target'] ? $link['target'] : '_self';
echo '<a class="c-btn btn-white" href="' . esc_url($link_url) . '" target="' . esc_attr($link_target) . '">' . esc_html($link_title) . '</a>';
}
if ($sec_link) {
$sec_link_url = $sec_link['url'];
$sec_link_title = $sec_link['title'];
$sec_link_target = $sec_link['target'] ? $sec_link['target'] : '_self';
echo '<a class="c-btn btn-white-outline" href="' . esc_url($sec_link_url) . '" target="' . esc_attr($sec_link_target) . '">' . esc_html($sec_link_title) . '</a>';
}
$link_url = $link['url'];
$link_title = $link['title'];
$link_target = $link['target'] ? $link['target'] : '_self';
echo '<a class="c-btn btn-white" href="' . esc_url($link_url) . '" target="' . esc_attr($link_target) . '">' . esc_html($link_title) . '</a>';
$sec_link_url = $sec_link['url'];
$sec_link_title = $sec_link['title'];
$sec_link_target = $sec_link['target'] ? $sec_link['target'] : '_self';
echo '<a class="c-btn btn-white-outline" href="' . esc_url($sec_link_url) . '" target="' . esc_attr($sec_link_target) . '">' . esc_html($sec_link_title) . '</a>';
?>
</div>
<?php
Expand Down
1 change: 0 additions & 1 deletion blocks/release-changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
the_row();
$title = get_sub_field('title');
$product_image = get_sub_field('product_image');
$features = get_sub_field('features');
?>
<div class="changelog-item">

Expand Down
10 changes: 5 additions & 5 deletions blocks/signup.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ function __($string) {

<section class="section--providers">
<div id="register" class="container"
data-ip="<?php echo htmlspecialchars($ip) ?>"
data-ll="<?php echo htmlspecialchars(json_encode($location)) ?>"
data-ip="<?php echo htmlspecialchars((string)$ip) ?>"
data-ll="<?php echo htmlspecialchars((string)json_encode($location)) ?>"
data-ocsapi="<?php echo array_key_exists('HTTP_OCS_APIREQUEST', $_SERVER) ?>"
data-l10n="<?php echo htmlspecialchars(json_encode($registerL10n)) ?>"
data-officialapps="<?php echo htmlspecialchars(json_encode($officialApps)) ?>"
data-coreapps="<?php echo htmlspecialchars(json_encode($coreApps)) ?>">
data-l10n="<?php echo htmlspecialchars((string)json_encode($registerL10n)) ?>"
data-officialapps="<?php echo htmlspecialchars((string)json_encode($officialApps)) ?>"
data-coreapps="<?php echo htmlspecialchars((string)json_encode($coreApps)) ?>">
</div>
<div id="register-details" class="container"><p></p></div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion blocks/simple_slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<?php echo wp_get_attachment_image($image_id, $size); ?>
</a>
<?php if (wp_get_attachment_caption($image_id)) {
echo '<div class="caption">' . wp_get_attachment_caption($image_id) . '</div>';
echo '<div class="caption">' . (string)wp_get_attachment_caption($image_id) . '</div>';
}?>
</div>
<?php endforeach; ?>
Expand Down
1 change: 0 additions & 1 deletion blocks/squote2.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
$quote = get_field('quote');
$img = get_field('image');
$text = get_field('text');
$pos = get_field('position');
$link = get_field('link');
?>
<section class="squote2-section" id="<?php echo $id; ?>">
Expand Down
1 change: 0 additions & 1 deletion blocks/testimonial.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
$id = get_field('section_id');
$title = get_field('title');
$link = get_field('link');
?>
<section class="muchmore-section" id="<?php echo $id; ?>">
<div class="container">
Expand Down
5 changes: 1 addition & 4 deletions blocks/webinar_promo.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@
$popup_content = get_field('popup_content');
$custom_css_classes = get_field('custom_css_classes');
$expiration = get_field('expiration_date');
$show_promo = true;
if ($expiration) {
$expiration_ts = strtotime($expiration);
$now = time();
}

$show_promo = true;
if ($expiration) {
if ($expiration_ts < $now) {
$show_promo = false;
}
Expand Down
2 changes: 0 additions & 2 deletions blocks/whitepaper-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/*
* Whitepaper Blog Posts Block Template.
*/
$id = get_field('section_id');
$title = get_field('title');
$subtext = get_field('subtext');
?>
Expand Down Expand Up @@ -35,7 +34,6 @@
'order' => 'DSC',
]);
foreach ($onepost as $onepostsingle) {
$img = wp_get_attachment_url(get_post_thumbnail_id($onepostsingle->ID) ?: 0) ?: '';
$title = $onepostsingle->post_title;
$date = (string)get_the_date('F d, Y', $onepostsingle->ID);
$cat = get_the_category($onepostsingle->ID);
Expand Down
6 changes: 2 additions & 4 deletions blocks/whitepaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@
echo '<div class="row">';
foreach ($studies as $study) {
$post_id = $study->ID;
$link = get_the_permalink($study->ID);
$link = (string)get_the_permalink($study->ID);
//$img = wp_get_attachment_url(get_post_thumbnail_id($post_id) ?: 0) ?: '';
$featured_image = get_the_post_thumbnail($post_id, 'large', [ 'class' => 'feat_img' ]);

$img = wp_get_attachment_url(get_post_thumbnail_id($study->ID) ?: 0) ?: '';
$header = get_the_title($study->ID);
$ex = get_the_excerpt($study->ID);
$custom_field = get_field('field_name', $study->ID);
$att = get_field('attachment', $study->ID);
echo '<div class="col-lg-4 mb-3">';
echo '<div class="post-holder whitepaper" data-file="' . $att . '">';
Expand All @@ -55,7 +53,7 @@
}

echo '<div class="btn_container">';
echo '<a href="' . get_the_permalink($study->ID) . '" class="c-btn btn-top btn-small btn_see_whitepaper">' . __('Download', 'nextcloud') . '</a>';
echo '<a href="' . (string)get_the_permalink($study->ID) . '" class="c-btn btn-top btn-small btn_see_whitepaper">' . __('Download', 'nextcloud') . '</a>';
echo '</div>';

echo '</div>';
Expand Down
5 changes: 1 addition & 4 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
* The template for displaying the footer
*/

if (function_exists('get_field')) {
$flogo = get_field('footer_logo', 'options');
}
?>
<footer class="<?php
if (
Expand Down Expand Up @@ -76,7 +73,7 @@
|| get_current_template() == 'single-simplified.php'
|| get_current_template() == 'single-on-demand-webinar.php'
) {
echo '<li><a target="_blank" href="' . get_permalink(2371) . '">' . get_the_title(2371) . '</a></li>';
echo '<li><a target="_blank" href="' . (string)get_permalink(2371) . '">' . get_the_title(2371) . '</a></li>';
}

if (!is_page_template('page-simplified.php')
Expand Down
Loading
Loading