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 | |
| function validateVAT($vatNumber) { | |
| $url = "https://ec.europa.eu/taxation_customs/vies/vatResponse.html"; | |
| $response = file_get_contents("$url?memberStateCode=" . substr($vatNumber, 0, 2) . "&number=" . substr($vatNumber, 2)); | |
| if (strpos($response, 'valid="true"') !== false) { | |
| return true; // VAT-ID ist gültig | |
| } | |
| return false; // VAT-ID ist ungültig |
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( 'init', 'Redpishi_Preloader' ); | |
| function Redpishi_Preloader() { if(!is_admin() && $GLOBALS["pagenow"] !== "wp-login.php" ) { | |
| $delay = 1; //seconds | |
| $loader = 'https://redpishi.com/wp-content/uploads/2022/06/preloader3.svg'; | |
| $overlayColor = '#ffffff'; | |
| echo '<div class="Preloader"><img src="'.$loader.'" alt="" style="height: 150px;"></div> |
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 | |
| /*IMPORT Plugins */ | |
| $roots_includes = array( | |
| '/functions/_snippets.php', | |
| '/functions/back-to-top.php', | |
| '/functions/darkmode-backend.php', | |
| '/functions/duplicate.php', | |
| '/functions/login.php', | |
| '/functions/rss-feed.php', |
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 | |
| function applyCustomStyles() { | |
| echo ' | |
| <style> | |
| /* Change link colour to white */ | |
| #wpbody-content a { | |
| color: #0026FC !important; | |
| } |
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_filter( 'post_row_actions', 'rd_duplicate_post_link', 10, 2 ); | |
| add_filter( 'page_row_actions', 'rd_duplicate_post_link', 10, 2 ); | |
| function rd_duplicate_post_link( $actions, $post ) { | |
| if( ! current_user_can( 'edit_posts' ) ) { | |
| return $actions; | |
| } | |
| $url = wp_nonce_url( |
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_footer', function () { if ( !is_admin() ) { | |
| $location = 'right'; // left or right | |
| $scale = '1'; | |
| $icon = ' | |
| <svg width="100%" height="100%" viewBox="0 0 1067 1067" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"><circle cx="533.333" cy="533.333" r="504.399" style="fill:#fff;stroke:#0026fc;stroke-width:38.74px;"/><circle cx="602.196" cy="738.431" r="12.648" style="fill:#ebebeb;"/><path d="M741.794,583.333l-208.252,-163.44l-208.67,160.276" style="fill:none;stroke:#0026fc;stroke-width:38.74px;"/></svg> | |
| '; | |
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 SVG to allowed file uploads - copy in the functions.php | |
| **/ | |
| function add_file_types_to_uploads($file_types){ | |
| $new_filetypes = array(); | |
| $new_filetypes['svg'] = 'image/svg+xml'; | |
| $file_types = array_merge($file_types, $new_filetypes ); |
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 | |
| // FEED EINZELABFRAGE | |
| function fetch_rss_feed($url) { | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, $url); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
| $data = curl_exec($ch); | |
| curl_close($ch); |
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 | |
| // Redpishi.com WordPress login page Photography Template | |
| add_filter( 'the_content', 'redpihi_custom_login' ); | |
| function redpihi_custom_login( $content ) { | |
| $fullScreen = 1; | |
| $logo = 'https://redpishi.com/wp-content/uploads/2022/06/3.png'; | |
| $bg ='https://redpishi.com/wp-content/uploads/2022/06/bg3-scaled.webp'; | |
| $loging_users = '<p>Hello '.wp_get_current_user()->user_login.'! You are logged in.</p>'; | |
| if (is_page(get_page_by_title( 'login' )->ID)) { |
NewerOlder