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
| var highest_index = 0, | |
| elements = document.getElementsByTagName('*'); | |
| for (var i = 0; i < elements.length - 1; i++) { | |
| if (parseInt(elements[i].style.zIndex) > highest_index) { | |
| highest_index = parseInt(elements[i].style.zIndex); | |
| }; | |
| }; | |
| var zIndex = highest_index + 10; |
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
| // Setting the Post ID in a variable for which the content is required | |
| $the_postid = 20; | |
| $the_post_content = get_post($the_postid); | |
| $content = $the_post_content->post_content; | |
| $content = apply_filters('the_content', $content); | |
| $content = str_replace(']]>', ']]>', $content); | |
| // Print Content data or further use it as required | |
| echo $content; |
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 mailTo ( $emails, $subject, $message ) { | |
| $mail = new PHPMailer; | |
| $mail->isSMTP(); | |
| $mail->isHTML(true); | |
| $mail->setFrom( SITE_EMAIL, SITE_NAME ); | |
| $mail->Host = 'smtp.gmail.com'; | |
| $mail->SMTPAuth = true; | |
| $mail->Username = SMTP_LOGIN; | |
| $mail->Password = SMTP_PASS; |
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( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' ); | |
| function custom_woocommerce_product_add_to_cart_text() { | |
| global $product; | |
| $product_type = $product->get_type(); | |
| switch ( $product_type ) { | |
| case 'external': | |
| return __( 'Take me to their site!', 'woocommerce' ); | |
| break; |
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
| window.history.replaceState({}, document.title, "?variant=" + variant.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
| var mail = $('input[type=email]').val(); | |
| //username is public API Key | |
| var url = "https://bpi.briteverify.com/emails.json?address="+mail+"&username=772454564564564564564563"; | |
| $.ajax({ | |
| url: url, | |
| dataType: "jsonp", | |
| success: function(data){ | |
| var status = data.status; | |
| $('input[type=email]').addClass(status); | |
| if(status === 'valid') { |
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
| /** | |
| * load csv | |
| */ | |
| add_action("init", "download_csv"); | |
| function download_csv() { | |
| if (isset($_POST['download_csv'])) { | |
| function outputCsv( $fileName, $assocDataArray ) { |
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 | |
| ini_set('display_errors', 1); | |
| ini_set('display_startup_errors', 1); | |
| error_reporting(E_ALL); | |
| $database = 'db'; | |
| $user = 'user'; | |
| $pass = 'pass'; | |
| $host = 'localhost'; |
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
| import firebase from "firebase/app"; | |
| import "firebase/analytics"; | |
| import "firebase/messaging"; | |
| import axios from "axios"; | |
| let firebaseInit = { | |
| methods: { | |
| firebaseInit: function () { | |
| const firebaseConfig = { | |
| apiKey: "AIzaSyAZW895vVsq-sGPPRm52fQI3V3j6yvylRc", |
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
| importScripts("https://www.gstatic.com/firebasejs/8.2.6/firebase-app.js"); | |
| importScripts("https://www.gstatic.com/firebasejs/8.2.6/firebase-messaging.js"); | |
| try { | |
| firebase.initializeApp({ | |
| apiKey: "AIzaSyAZW895vVsq-sGPPRm52fQI3V3j6yvylRc", | |
| authDomain: "push-project-e1ffa.firebaseapp.com", | |
| projectId: "push-project-e1ffa", | |
| storageBucket: "push-project-e1ffa.appspot.com", | |
| messagingSenderId: "237926722474", |
OlderNewer