This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'manage_edit-product_columns', 'admin_products_sort_modified', 9999 ); | |
| function admin_products_sort_modified( $columns ){ | |
| $columns['laatst_bijgewerkt'] = 'Laatst bijgewerkt'; | |
| return $columns; | |
| } | |
| add_action( 'manage_product_posts_custom_column', 'admin_products_sort_modified_content', 10, 2 ); | |
| function admin_products_sort_modified_content( $column, $product_id ){ | |
| if ( $column == 'laatst_bijgewerkt' ) { | |
| //echo strtotime(get_the_modified_date("Y-m-d H:i:s", $product_id)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'wp_head', 'address_mobile_address_bar' ); | |
| function address_mobile_address_bar() { | |
| $color = '#ffffff'; | |
| echo '<meta name=”theme-color” content=”' . $color . '”>'; | |
| echo '<meta name=”msapplication-navbutton-color” content=”' . $color . '”>'; | |
| echo '<meta name=”apple-mobile-web-app-capable” content=”yes”>'; | |
| echo '<meta name=”apple-mobile-web-app-status-bar-style” content=”black-translucent”>'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Advanced Layout Builder Custom Post Types | |
| */ | |
| add_filter('avf_alb_supported_post_types', function ($array) { | |
| $array[] = 'projecten'; | |
| return $array; | |
| }, 10, 1); | |
| function avf_metabox_layout_post_types_mod( array $supported_post_types ) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('avia_layout_filter', 'enfold_portfolio_item_full_width', 10, 2); | |
| function enfold_portfolio_item_full_width($layout, $post_id){ | |
| if(is_singular('portfolio')) | |
| { | |
| $layout['current'] = $layout["fullsize"]; | |
| $layout['current']['main'] = "fullsize"; | |
| } | |
| return $layout; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Modify YouTube oEmbeds to use youtube-nocookie.com | |
| * | |
| * @param $cached_html | |
| * @param $url | |
| * | |
| * @return string | |
| */ | |
| function wpdev_filter_youtube_embed( $cached_html, $url = null ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('gettext', 'wpdev_change_text', 20, 3); | |
| function wpdev_change_text( $translated_text, $untranslated_text, $domain ) { | |
| if ($untranslated_text == 'Please enter your username or email address. You will receive a link to create a new password via email.'){ | |
| $translated_text = 'Vul onderstaand uw email in. U krijgt van ons een mail met een link om uw wachtwoord opnieuw in te stellen.'; | |
| } | |
| if ($untranslated_text =='Check your email for the confirmation link.'){ | |
| $translated_text = 'Check uw email voor de bevestigingslink.'; | |
| } | |
| if ($untranslated_text =='Enter your new password below.'){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('wp_head', 'wpdev_hook_gtag'); | |
| function wpdev_hook_gtag() { | |
| ?> | |
| <!-- Google Tag Manager --> | |
| <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
| new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
| j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
| 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
| })(window,document,'script','dataLayer','GTM-1234567');</script> | |
| <!-- End Google Tag Manager --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //function to retrieve user IP address | |
| function wpdev_get_user_ip(){ | |
| if(!empty($_SERVER['HTTP_CLIENT_IP'])){ | |
| //ip from share internet | |
| $ip = $_SERVER['HTTP_CLIENT_IP']; | |
| }elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){ | |
| //ip pass from proxy | |
| $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
| }else{ | |
| $ip = $_SERVER['REMOTE_ADDR']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'upload_mimes', 'allow_upload_new_mimes' ); | |
| function allow_upload_new_mimes( $mimes = array() ) { | |
| $mimes['svg'] = 'image/svg+xml'; | |
| return $mimes; | |
| } |