Skip to content

Instantly share code, notes, and snippets.

View mmarj's full-sized avatar
🏠
Spreading H@ppiness!!

MM Aurangajeb mmarj

🏠
Spreading H@ppiness!!
View GitHub Profile
<?php
if (!defined('ABSPATH')) die('-1');
// Class started
class stockVCExtendAddonClass {
function __construct() {
// We safely integrate with VC with this hook
add_action( 'init', array( $this, 'stockIntegrateWithVC' ) );
@mmarj
mmarj / README.markdown
Created April 10, 2017 18:26 — forked from marijn/README.markdown
List of countries in YAML, CSV and TXT format

#List of countries

It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.

List of nationalities

I've also compiled a list of nationalities

@mmarj
mmarj / README.markdown
Created April 10, 2017 18:26 — forked from marijn/README.markdown
List of nationalities in YAML, CSV and TXT format

List of nationalities

It's time someone compiled a list of nationalities to use within a web application. This gist attempts to make a first move at that.

##List of countries

I've also compiled a list of countries

@mmarj
mmarj / js.md
Created August 25, 2017 09:13 — forked from nuhil/js.md
Javascript Handbook

Javascript Handbook

A hand crafted markdown document contains all major Javascript topics covered, taken from different sources. Brush Up your JS memory.

Comments


Single line comments start with //. For multi-line commands, you use /* ... */

// This is a single line comment
@mmarj
mmarj / custom-css.php
Created August 4, 2019 16:29 — forked from iqbalrony/custom-css.php
How to add custom css field with elementor free version.
<?php
use Elementor\Controls_Manager;
use Elementor\Element_Base;
use Elementor\Core\Files\CSS\Post;
use Elementor\Core\DynamicTags\Dynamic_CSS;
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
@mmarj
mmarj / my-wp-zapier-send-meta.php
Created December 13, 2019 20:26 — forked from andrewlimaza/my-wp-zapier-send-meta.php
Send WordPress user meta data to Zapier.
<?php
/**
* This requires version 1.3+ for WP Zapier Plugin - https://yoohooplugins.com/plugins/zapier-integration/
* You may follow this function as a guide to send user meta to Zapier, or any other data really.
* This code runs whenever a user's profile is updated.
* Add the below code to a custom plugin/Child Theme function.php
*/
function my_wp_zapier_send_meta( $array, $user, $user_id ) {
@mmarj
mmarj / apple-mq.css
Created January 3, 2020 22:38 — forked from AllThingsSmitty/apple-mq.css
iPhone 6/6 Plus and Apple Watch CSS media queries
/* iPhone 6 landscape */
@media only screen and (min-device-width: 375px)
and (max-device-width: 667px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 2)
{ }
/* iPhone 6 portrait */
@media only screen
and (min-device-width: 375px)
@mmarj
mmarj / gist:58706c6b8498901059d6aa27d211a248
Last active April 11, 2020 08:04 — forked from tobedoit/gist:4146888
Wordpress: Set display name with 'first name'
/* Sets the user's display name (always) to first name last name, when it's available **************************************
** http://stackoverflow.com/questions/9326315/wordpress-change-default-display-name-publicy-as-for-all-existing-users *** */
/* !아이디 대신 이름으로 나타내기 ********************************************************************************************* */
/* Sets the user's display name (always) to first name last name, when it's avail. */
add_action ('admin_head','make_display_name_f_name_last_name');
function make_display_name_f_name_last_name(){
$users = get_users(array('fields'=>'all'));
foreach($users as $user){
$user = get_userdata($user->ID);
$display_name = $user->first_name;
@mmarj
mmarj / hide-admin-notices.php
Last active January 22, 2021 17:30 — forked from digisavvy/hide-admin-notices.php
hide admin notices in WordPress.
add_action('admin_enqueue_scripts', 'ds_admin_theme_style');
add_action('login_enqueue_scripts', 'ds_admin_theme_style');
function ds_admin_theme_style() {
if (!current_user_can( 'manage_options' )) {
echo '<style>.update-nag, .updated, .error, .is-dismissible { display: none; }</style>';
}
}
/* Hide wp-admin side notice with CSS */
@mmarj
mmarj / dokan-theme-cat-menu-scrollable.css
Created June 29, 2020 15:32
Make Dokan Theme Category Menu Scrollable with simple CSS
/** Make Dokan theme Category Scroll-able **/
#cat-drop-stack ul{
height:250px; width:auto;
overflow:hidden; overflow-y:scroll;
}
#cat-drop-stack ul::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
}
#cat-drop-stack ul::-webkit-scrollbar-thumb {