Skip to content

Instantly share code, notes, and snippets.

View salehahmadbabu's full-sized avatar

Saleh Ahmad salehahmadbabu

View GitHub Profile
/*!
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
/**
* WordPress Plugin Install Administration API
*
* @package WordPress
* @subpackage Administration
*/
/**
* Retrieves plugin installer pages from the WordPress.org Plugins API.
<?php
/**
* List Table API: WP_Plugin_Install_List_Table class
*
* @package WordPress
* @subpackage Administration
* @since 3.1.0
*/
/**
<?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
/*
Template Name: About Template
*/
$enable_about_promo = cs_get_option('enable_about_promo');
$enable_about_content = cs_get_option('enable_about_content');
$about_content_title = cs_get_option('about_content_title');
$about_content_text = cs_get_option('about_content_text');
// $about_content_image = cs_get_option('about_content_image');
<?php
/*
Template Name: About Template
*/
$enable_about_promo = cs_get_option('enable_about_promo');
$enable_about_content = cs_get_option('enable_about_content');
$about_content_title = cs_get_option('about_content_title');
$about_content_text = cs_get_option('about_content_text');
// $about_content_image = cs_get_option('about_content_image');
<?php
/*
Template Name: Homepage Template
*/
$home_content_title = cs_get_option('home_content_title');
$home_content_text = cs_get_option('home_content_text');
// $home_content_image = cs_get_option('home_content_image');
$home_content_image_array = wp_get_attachment_image_src( cs_get_option('home_content_image'), 'large' );
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
// ===============================================================================================
// -----------------------------------------------------------------------------------------------
// FRAMEWORK SETTINGS
// -----------------------------------------------------------------------------------------------
// ===============================================================================================
$settings = array(
'menu_title' => 'Theme options',
'menu_type' => 'theme', // menu, submenu, options, theme, etc.
'menu_slug' => 'neuron-theme-options',