Skip to content

Instantly share code, notes, and snippets.

View salehahmadbabu's full-sized avatar

Saleh Ahmad salehahmadbabu

View GitHub Profile
<?php
/**
* Install plugin administration panel.
*
* @package WordPress
* @subpackage Administration
*/
// TODO route this pages via a specific iframe handler instead of the do_action below
if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) )
define( 'IFRAME_REQUEST', true );
<?php
/**
* List Table API: WP_Plugin_Install_List_Table class
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/**
<?php
/**
* WordPress Plugin Install Administration API
*
* @package WordPress
* @subpackage Administration
*/
/**
* Retrieves plugin installer pages from the WordPress.org Plugins API.
/*!
Theme Name: Stock
Theme URI: http://underscores.me/
Author: CrazyCafe
Author URI: http://www.crazycafe.net
Description: this is sample template
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: stock-theme
<?php
/*
Plugin Name: Stock Toolkit
*/
// test shortcode
function stock_alert_shortcode($atts, $content = '') {
<?php
/*
Plugin Name: Stock Toolkit
*/
add_action( 'init', 'stock_theme_custom_post' );
function stock_theme_custom_post() {
register_post_type( 'testimonial',
array(
<?php
/*
Plugin Name: Stock Toolkit
*/
add_action( 'init', 'stock_theme_custom_post' );
function stock_theme_custom_post() {
register_post_type( 'testimonial',
array(
<?php
if (!defined('ABSPATH')) die('-1');
// Class started
/**
*
*/
class stockVCExtendAddonClass {
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
function stock_theme_metabox($options){
$options = array(); // remove old options
$options[] = array(
'id' => 'stock_page_options',
'title' => esc_html__('Page Options', 'stock-theme'),
'post_type' => 'page',
'context' => 'normal',