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
*~ | |
.DS_Store | |
.svn | |
.cvs | |
*.bak | |
*.swp | |
Thumbs.db | |
wp-config.php | |
wp-content/uploads/ | |
wp-content/blogs.dir/ |
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
// STEP 1: | |
// Inside the start function, at around line 170 I commented out the assignation of the 'top' property, like this: | |
// Position Lightbox | |
var top = $window.scrollTop() + this.options.positionFromTop; | |
var left = $window.scrollLeft(); | |
this.$lightbox.css({ | |
// top: top + 'px', // comment out this line | |
left: left + 'px' | |
}).fadeIn(this.options.fadeDuration); |
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 | |
/* Get the Page Slug to Use as a Body Class, this will only return a value on pages! */ | |
$class = ''; | |
/* is it a page */ | |
if( is_page() ) { | |
global $post; | |
/* Get an array of Ancestors and Parents if they exist */ | |
$parents = wp_get_post_parent_id( $post->ID ); | |
$id = ($parents) ? $parents: $post->ID; |
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(){ | |
/* Get browser */ | |
$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase()); | |
/* Detect Chrome */ | |
if($.browser.chrome){ | |
/* Do something for Chrome at this point */ | |
alert("You are using Chrome!"); | |
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
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot DB-Name < /your/data/base/path.sql |
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
https://www.reviewplan.com/wp-content/uploads/2018/07/Siteground-php-version-change-edit.jpg | |
If you want to update to PHP 7.2– AddHandler application/x-httpd-php72 .php .php5 .php4 .php3 | |
For PHP 7.1– AddHandler application/x-httpd-php71 .php .php5 .php4 .php3 | |
For PHP 7.0– AddHandler application/x-httpd-php70 .php .php5 .php4 .php3 | |
For PHP 5.6– AddHandler application/x-httpd-php56 .php .php5 .php4 .php3 | |
For PHP 5.5– AddHandler application/x-httpd-php55 .php .php5 .php4 .php3 | |
So, copy and paste one of the lines from above to change the PHP version of your website. | |
For example, we have pasted the line‘AddHandler application/x-httpd-php72 .php .php5 .php4 .php3’ as we wanted to switch to PHP version 7.2 |
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 objectToArray($d) { | |
if (is_object($d)) { | |
// Gets the properties of the given object | |
// with get_object_vars function | |
$d = get_object_vars($d); | |
} | |
if (is_array($d)) { | |
/* | |
* Return array converted to object |
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 | |
// Using curl because if you use file_get_contents() it need more then 10s page to be loaded... | |
function curl_get_contents($url) { | |
// Initiate the curl session | |
$ch = curl_init(); | |
// Set the URL | |
curl_setopt($ch, CURLOPT_URL, $url); | |
// Removes the headers from the output | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
// Return the output instead of displaying it directly |
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 custom_login_shortcode() { | |
if ( ! is_user_logged_in() ) { // Display WordPress login form: | |
$args = array( | |
'redirect' => home_url() . '/alumni/', | |
'form_id' => 'loginform-custom', | |
'label_username' => __( 'Korisničko ime ili Email' ), | |
'label_password' => __( 'Lozinka' ), | |
'label_remember' => __( 'Zapamti me' ), | |
'label_log_in' => __( 'Prijavi se' ), |
OlderNewer