'merken', 'post_status'=> 'publish', 'order' => 'ASC', 'orderby' => 'title'))) $marq_count = count($children); if ($marq_count < 4) { $tick_id = "webticker_not_ticking"; $tick_id_2 = "
"; $tick_id_3 = "
"; } else { $tick_id = "webticker"; } { if ($marq_count == 0) {} else { echo "$tick_id_2$tick_id_3"; } $logobannerkleur = get_field("logobannerkleur", "options"); if (!$logobannerkleur) { iom_marquee_grayscale_jquery(); } } echo ""; } function iom_marquee_inverse(){ iom_marquee_scripts(); iom_marquee_layout( "998"); iom_marquee_webticker_jquery(); iom_marquee_topdiv(); if ( $children = get_children(array( 'post_type' => 'merken', 'post_status'=> 'publish', 'order' => 'ASC', 'orderby' => 'title'))) $marq_count = count($children); if ($marq_count < 4) { $tick_id = "webticker_not_ticking"; $tick_id_2 = "
"; $tick_id_3 = "
"; } else { $tick_id = "webticker"; } { if ($marq_count == 0) {} else { echo "$tick_id_2$tick_id_3"; } $logobannerkleur = get_field("logobannerkleur", "options"); if (!$logobannerkleur) { iom_marquee_grayscale_jquery(); } } echo ""; } // Script voor het laten zien van een marquee op een individuele pagina. Alleen gekoppelde merkenlogo's worden getoond function iom_marquee_page($thispost){ iom_marquee_scripts(); iom_marquee_layout("1000"); iom_marquee_webticker_jquery(); iom_marquee_topdiv(); $marquees = explode(",",get_post_meta( $thispost, 'in_collectie', true)); $marq_count = count($marquees); if ($marq_count < 8) { $tick_id = "webticker_not_ticking"; $tick_id_2 = "
"; $tick_id_3 = "
"; } else { $tick_id = "webticker"; } echo "$tick_id_2$tick_id_3"; $logobannerkleur = get_field("logobannerkleur", "options"); if (!$logobannerkleur) { iom_marquee_grayscale_jquery(); } echo ""; } // Script voor het laten zien van een marquee op een individuele pagina. Laat alleen de merkenlogo's van de childpages zien function iom_marquee_children($thispost){ iom_marquee_scripts(); iom_marquee_layout("1000"); iom_marquee_webticker_jquery(); iom_marquee_topdiv(); $pages = get_pages("child_of=$thispost"); foreach($pages as $child) { $marquees = get_post_meta( $child->ID, 'in_collectie', true); if ($marquees != "") { $marq .= $marquees; $marq .= ","; } } echo "
Merken in deze collectie:
"; $marq_array = array_unique(explode(",",$marq)); $marq_count = count($marq_array); if ($marq_count < 9) { $tick_id = "webticker_not_ticking"; $tick_id_2 = "
"; $tick_id_3 = "
"; } else { $tick_id = "webticker"; } echo "$tick_id_2$tick_id_3"; $logobannerkleur = get_field("logobannerkleur", "options"); if (!$logobannerkleur) { iom_marquee_grayscale_jquery(); } echo ""; } // Script voor het laten zien van een marquee op een individuele pagina. Laat zowel de gekoppelde als de merkenlogos van de childpages zien. function iom_marquee_combi($thispost){ iom_marquee_scripts(); iom_marquee_layout("1000"); iom_marquee_webticker_jquery(); iom_marquee_topdiv(); $marq_this = get_post_meta( $thispost, 'in_collectie', true); $marq .= $marq_this.","; $pages = get_pages("child_of=$thispost"); foreach($pages as $child) { $marquees = get_post_meta( $child->ID, 'in_collectie', true); if ($marquees != "") { $marq .= $marquees; $marq .= ","; } } echo "
Merken in deze collectie:
"; $marq_array = array_unique(explode(",",$marq)); $marq_count = count($marq_array); if ($marq_count < 9) { $tick_id = "webticker_not_ticking"; $tick_id_2 = "
"; $tick_id_3 = "
"; } else { $tick_id = "webticker"; } echo "$tick_id_2$tick_id_3"; $logobannerkleur = get_field("logobannerkleur", "options"); if (!$logobannerkleur) { iom_marquee_grayscale_jquery(); } echo ""; } // Script voor het laten zien van overzicht van merken in een collectie, in tegelvorm function iom_marquee_tegel($thispost){ iom_marquee_scripts(); $marq_this = get_post_meta( $thispost, 'in_collectie', true); $marq .= $marq_this.","; $pages = get_pages("child_of=$thispost"); foreach($pages as $child) { $marquees = get_post_meta( $child->ID, 'in_collectie', true); if ($marquees != "") { $marq .= $marquees; $marq .= ","; } } $marq_array = array_unique(explode(",",$marq)); $marq_count = count($marq_array); foreach( $marq_array as $merk ) { $link = get_permalink($merk); $logoimage = get_post_meta( $merk, 'merk_logo', true); $logo_image = wp_get_attachment_image_src( $logoimage , 'full' ); if (!empty($logo_image) && get_post_status( $merk ) == "publish") { echo "
"; } } $logobannerkleur = get_field("logobannerkleur", "options"); if (!$logobannerkleur) { iom_marquee_grayscale_jquery(); } } //=================================== Helper functies ================================== function iom_marquee_scripts() { wp_enqueue_script('iommarquee', WP_PLUGIN_URL . '/eur_marquee/js/jquery.webticker.js'); wp_enqueue_style('iommarquee.style', WP_PLUGIN_URL . '/eur_marquee/css/webticker.css'); } function iom_marquee_layout( $tickcontainer ){ $overlay_left = WP_PLUGIN_URL . '/iom_marquee/image/left.png'; $overlay_right = WP_PLUGIN_URL . '/iom_marquee/image/right.png'; echo " "; } function iom_marquee_webticker_jquery() { echo ' '; } function iom_marquee_topdiv() { echo "
"; } function iom_marquee_grayscale_jquery() { wp_enqueue_script('iomgreyscale', WP_PLUGIN_URL . '/iom_marquee/js/greyScale.js'); echo " "; } //=================================== Einde helper functies ================================== //=================================== Admin scherm ================================== function iom_marquee_admin() { if (function_exists('add_options_page')) { add_options_page('IOM Marquee Options', 'IOM Marquee Options', 8, 'iom_marquee_op', 'iom_marquee_op'); } } function iom_marquee_op() { if (isset($_POST['info_updatew'])) { $msg_desc = ""; // Field 1 if (empty($_POST['iom_field_1'])) { $iom_field_1 = ''; delete_option('iom_field_1'); } else { $iom_field_1 = $_POST['iom_field_1']; update_option('iom_field_1', $iom_field_1); } if (empty($_POST['iom_marquee_2'])) { $iom_field_1 = ''; delete_option('iom_marquee_2'); } else { $iom_marquee_2 = $_POST['iom_marquee_2']; $iom_marquee_checked = "Checked"; update_option('iom_marquee_2', $iom_marquee_2); } if (empty($_POST['iom_field_2'])) { $iom_field_2 = ''; delete_option('iom_field_2'); } else { $iom_field_2 = $_POST['iom_field_2']; $iom_field_2_content = get_the_title($iom_field_2); update_option('iom_field_2', $iom_field_2); } if ($msg_desc != '') { echo '

' . $msg_desc . '

'; } else { echo '

Your settings have been saved.

'; } } else { $iom_field_1 = get_option('iom_field_1'); $iom_field_2 = get_option('iom_field_2'); $iom_marquee_2 = get_option('iom_marquee_2'); if ($iom_marquee_2 == "Marquee") { $iom_marquee_checked = "Checked"; } $iom_field_2_content = get_the_title($iom_field_2); } echo '
'; echo '

IOM Marquee

'; echo '

Op deze pagina kan de merken-module worden aan/uit gezet. Alleen zichtbaar voor super-admin

'; echo '
'; echo '
'; echo ''; echo ''; echo '
'; echo ' Activeren '; echo '
'; echo '
'; echo '

'; echo '

Info: This plugin stores the options in the WordPress database. By leaving the above fields empty and hitting the "Update Options"'; echo ' button, the options are removed from the WordPress database. Although it is not necessary, you should consider doing this before uninstalling the plugin, so no trace is left behind.

'; echo '
'; echo '
'; echo '