Skip to content

Instantly share code, notes, and snippets.

View jjjjcccjjf's full-sized avatar
🎯
Focusing

endan jjjjcccjjf

🎯
Focusing
View GitHub Profile
// Put in head
// For adding class based on window hash
$(window).on('hashchange', function() {
let hash = window.location.hash;
$('a').removeClass('active');
$('a[href=\"' + hash + '\"]').addClass('active');
});
// ... in the body

So, you want to add a new estate, huh?

Add your estate here

/dashboard/application/models/Analytics_model.php

'filters' => "ga:pagePathLevel1==altaraza.ph/,ga:pagePathLevel1==arcasouth.ph/,ga:pagePathLevel1==bgc.ayalalandestates.com/,ga:pagePathLevel1==circuitmakati.com/,ga:pagePathLevel1==cloverleaf.ph/,ga:pagePathLevel1==evocity.com.ph/,ga:pagePathLevel1==makeitmakati.com/,ga:pagePathLevel1==nuvali.ph/,ga:pagePathLevel1==vermosa.ph/,ga:pagePathLevel1==vertis.ph/,ga:pagePathLevel1==www.alviera.ph/",

Don't forget to add your GA ID in this array

			$AYL_GA_ARR = [
<?php
/* Template Name: Inquire now */
get_header();
# Block for brand & project name
$page_id = 884; # Page ID: Welcome - Ayala Group Employee
if(isset($_SESSION['employer_type']) && $_SESSION['employer_type'] == "Corporate partners")
{
$page_id = 885; # Page ID: Welcome - Corporate partners
}
(array) [16 elements]
0:
(array) [12 elements]
blog_id: (string) 1
domain: (string) ayalalandestates.com
path: (string) /
site_id: (string) 1
registered: (string) 2017-11-14 05:35:36
last_updated: (string) 2017-11-23 09:48:18
public: (string) 1
@jjjjcccjjf
jjjjcccjjf / remove_slug.php
Created November 22, 2017 10:53
Put in functions.php wordpress
/** remove slugggg */
function na_remove_slug( $post_link, $post, $leavename ) {
if ( 'venue_cpt' != $post->post_type || 'publish' != $post->post_status ) {
return $post_link;
}
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );
return $post_link;
/* Pagination */
div.pagination {
margin: 0 0 50px; }
div.pagination ul {
text-align: center; }
div.pagination ul li {
display: inline-block;
margin: 10px; }
div.pagination ul li a, div.pagination ul li span.current { /* @jjjjcccjjf was here*/
color: #fff;
function wp_get_archives( $args = '' ) {
global $wpdb, $wp_locale;
$defaults = array(
'type' => 'monthly', 'limit' => '',
'format' => 'html', 'before' => '',
'after' => '', 'show_post_count' => false,
'echo' => 1, 'order' => 'DESC',
'post_type' => 'post'
);
@jjjjcccjjf
jjjjcccjjf / manifest.json
Created September 29, 2017 03:57
Manifest Example for PWA
{
"name": "Amaialand",
"short_name": "Amaialand",
"icons": [{
"src": "/images/icons/icon-48x48.png",
"sizes": "48x48",
"type": "image/png"
}, {
"src": "/images/icons/icon-96x96.png",
"sizes": "96x96",
@jjjjcccjjf
jjjjcccjjf / ajax sample.md
Last active March 7, 2018 03:22
Ajax sample code
// GET JSON BLOCK

$.getJSON('http://localhost/api/members', function(result){ 

});
// GET JSON BLOCK
@jjjjcccjjf
jjjjcccjjf / CheckEmoji.php
Created July 24, 2017 14:31 — forked from hnq90/CheckEmoji.php
Check Emoji exist in string
/**
* Check emoji from string
*
* @return bool if existed emoji in string
*/
function checkEmoji($str)
{
$regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u';
preg_match($regexEmoticons, $str, $matches_emo);
if (!empty($matches_emo[0])) {