- git init
- git remote add origin GIT_SSH_URL e.g: [email protected]:example/example.git
- git pull --rebase origin master
- git add .
- git commit -m "New Commit"
- git push --set-upstream origin master
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 ($) { | |
"use strict"; | |
// ========== Dynamic page content margin for fixed header JS Start ========== | |
$(window).on('resize load', function () { | |
var headerHeight = jQuery('#header').outerHeight(); | |
var pageContentWrap = jQuery('#page-content-wrapper'); | |
if(pageContentWrap.length){ | |
pageContentWrap.css('margin-top', headerHeight); | |
} |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
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 | |
// custom function for test only. You don't need to use this function if you use it with wordpress. | |
// Wordpress have already this function: https://developer.wordpress.org/reference/functions/username_exists/ | |
function username_exists($user_login){ | |
$names = ['Razon', 'Razon-1', 'Razon-2', "Supu"]; | |
if(in_array($user_login, $names)){ | |
return $user_login; | |
}else{ | |
return false; | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> | |
<title>How to upload preview image before upload through JavaScript</title> | |
</head> |
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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /staging/ | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /staging/index.php [L] | |
</IfModule> | |
# END WordPress |
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 | |
//------------------------------------------------------------------------------ | |
// Remove taxonomy slugs (categories, post tags and custom taxonomies) from URL | |
// Resource Link: https://rudrastyh.com/wordpress/remove-taxonomy-slug-from-urls.html | |
//------------------------------------------------------------------------------ | |
add_filter('request', 'ic_change_term_request', 1, 1 ); | |
function ic_change_term_request($query){ | |
$tax_name = 'category'; // specify you taxonomy name here, it can be also 'category' or 'post_tag' | |
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
/** | |
* Get current page url with query string | |
* @since 1.0.0 | |
* @return: full url of your current page with query string | |
* @use: echo get_current_page_url(); | |
*/ | |
if ( ! function_exists( 'get_current_page_url_with_query_string' ) ) { | |
function get_current_page_url_with_query_string() { | |
global $wp; | |
return add_query_arg( $_SERVER['QUERY_STRING'], '', home_url( $wp->request ) ); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Get my current address using javascript</title> | |
<link href="style.css" rel="stylesheet" type="text/css" /> | |
</head> |
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 | |
/* | |
* Custom Post Pagination | |
* @since 1.0.0 | |
* return | |
*/ | |
if (!function_exists('wpdocs_custom_posts_pagination')) : | |
function wpdocs_custom_posts_pagination($the_query=NULL, $paged=1){ | |
global $wp_query; |