Skip to content

Instantly share code, notes, and snippets.

View mpro9x's full-sized avatar
🏠
Working from home

Mahinur Khan mpro9x

🏠
Working from home
View GitHub Profile
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
// ===============================================================================================
// -----------------------------------------------------------------------------------------------
// METABOX OPTIONS
// -----------------------------------------------------------------------------------------------
// ===============================================================================================
$options = array();
// -----------------------------------------
(function ($) {
"use strict";
jQuery(document).ready(function($) {
});
<?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' ) );
@mpro9x
mpro9x / Stock Toolkit
Last active March 23, 2019 09:39
stock-toolkit.php
<?php
/*
Plugin Name: Stock Toolkit
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' )) {
exit;
}
<?php
vc_map(
array(
"name" => __( "Stock Styled Map", "stock-toolkit" ),
"base" => "stock_styled_map",
"category" => __( "Stock", "stock-toolkit"),
"params" => array(
array(
<?php
function stock_styled_map_shortcode($atts, $content = null) {
extract( shortcode_atts( array(
'lat' => '40.7433379',
'lng' => '-74.0103219',
'title' => 'Head Office',
'desc' => 'House 21, Grand St.<br/> New York, USA',
if ( ! function_exists( 'prefix_fonts_url' ) ) :
/**
* Register Google fonts.
*
* @return string Google fonts URL for the theme.
*/
function prefix_fonts_url() {
$fonts_url = '';
$fonts = array();
$subsets = '';
// will be using this file in ystock-toolkit.php
function stock_toolkit_get_slide_as_list( ) {
$args = wp_parse_args( array(
'post_type' => 'slide',
'numberposts' => -1,
) );
a:focus, a:hover{
text-decoration: none;
}
a {
text-decoration: none;
position: relative;
}
a:after {
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('.up-down').on('click', function(){
$(this).toggleClass('opened');
})