This file contains 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 register_user_question_content_type() { | |
$post_labels = array( | |
'name' => 'User Questions', | |
'singular_name' => 'User Question', | |
'add_new' => 'Add New', | |
'add_new_item' => 'Add New User Question', | |
'edit' => 'Edit', | |
'edit_item' => 'Edit User Question', | |
'new_item' => 'New User Question', |
This file contains 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
$( document).ready( function() { | |
var userSubmitButton = document.getElementById( 'user-submit-button' ); | |
var adminAjaxRequest = function( formData, action ) { | |
$.ajax({ | |
type: 'POST', | |
dataType: 'json', | |
url: screenReaderText.adminAjax, | |
data: { | |
action: action, |
This file contains 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
<div style="width: 70%; margin: 0 auto;"> | |
<form id="user-post"> | |
<?php wp_nonce_field( basename( __FILE__ ), 'user-submitted-question' ) ?> | |
<input type="text" id="user-name" name="user-name" placeholder="Name" style="margin-bottom: 10px;"> | |
<input type="text" id="user-email" name="user-email" placeholder="Email" style="margin-bottom: 10px;"> | |
<select name="product" id="product" style="margin-bottom: 10px;"> | |
<option value=""></option> | |
<option value="hosting">Hosting</option> | |
<option value="themes">Themes</option> | |
<option value="plugins">Plugins</option> |
This file contains 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
// Validate email address | |
var email = '[email protected]' | |
if(!(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(email))) | |
alert('Invalid Email'); | |
// Disable ri |
This file contains 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 BrowserDetect = { | |
init: function () { | |
this.browser = this.searchString(this.dataBrowser) || "An unknown | |
browser"; | |
this.version = this.searchVersion(navigator.userAgent) | |
|| this.searchVersion(navigator.appVersion) | |
|| "an unknown version"; | |
this.OS = this.searchString(this.dataOS) || "an unknown OS"; | |
}, | |
searchString: function (data) { |
This file contains 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 age($month, $day, $year){ | |
$y = gmstrftime("%Y"); | |
$m = gmstrftime("%m"); | |
$d = gmstrftime("%d"); | |
$age = $y - $year; | |
if($m <= $month) | |
{ | |
if($m == $month) | |
{ | |
if($d < $day) $age = $age - 1; |
This file contains 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 check_if_in_view() { | |
var window_height = $window.height(); | |
var window_top_position = $window.scrollTop(); | |
var window_bottom_position = (window_top_position + window_height); | |
$.each($animation_elements, function() { | |
var $element = $(this); | |
var element_height = $element.outerHeight(); | |
var element_top_position = $element.offset().top; | |
var element_bottom_position = (element_top_position + element_height); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="container" style="width:100%;"> | |
<div class="fb-like-box" data-href="https://www.facebook.com/adobegocreate" data-width="292" data-show-faces="true" data-stream="true" data-header="true"></div> | |
</div> |
This file contains 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
// Go to menue: | |
// find->find in files | |
// Switch on reg_ex button | |
// Find: | |
^(.*)$ | |
// Where: | |
c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/* | |
// Then click on the find button | |
// Be careful to not click on Replace!!! |
This file contains 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
let lastApp; | |
const reg = /\<a href\=\"\/room\/(.{4})/; | |
const link = 'https://www.mojcimer.si/search?city=koper&type=&minarea=&maxarea=&bedrooms=&bathrooms=&minprice=&maxprice='; | |
$.ajax({ url: link, success: function(data) { | |
lastApp = reg.exec(data)[1]; | |
}}); | |
setInterval(dejPreveri, 30000); |
OlderNewer