Skip to content

Instantly share code, notes, and snippets.

@apatton-cnet
apatton-cnet / my_plugin_one_functions.php
Last active December 3, 2022 07:36
Wordpress settings page meta box problem. Works on one site, not on the other - same code, same WP Version
<?php
add_action( 'admin_menu' , 'my_plugin_register_plugin_settings', 10 );
function my_plugin_register_plugin_settings()
add_menu_page(
__( 'My Plugin Title', 'my_plugin' ),
__( 'My Plugin Menu Text', 'my_plugin' ),
'manage_options',
'my-plugin-menu',
'my_plugin_render_admin_menu_cb',
add_action( 'save_post', '_save_postdata' );
function _save_postdata( $post_id ) {
if ( 'location' == $_POST['post_type'] ) {
if ( ! current_user_can( 'edit_page', $post_id ) )
return;
} else {
return;
}
################################################
### --- Thinstation Build Config --- ###
################################################
#
#
# This is Thinstation s basic setup file. In this file you decide which
# hardware, programs and features to be included in the Thinstation
# boot image generated by running "./build".
#
# You can customize/limit the possibilities in the thinstation.conf
@apatton-cnet
apatton-cnet / gist:9491197
Created March 11, 2014 17:50
Lines 60-64 are looping indefinitely
<? $ebs_seo_cp_hours = array(
'Sunday' => array(
'closed' => $ebs_seo_cp_hours_sunday_check_open,
'shortname' => 'Su',
'open' => $ebs_seo_cp_hours_sunday_open,
'close' => $ebs_seo_cp_hours_sunday_close,
'label' => $ebs_seo_cp_hours_sunday_label
),
'Monday' => array(
'closed' => $ebs_seo_cp_hours_monday_check_open,
@apatton-cnet
apatton-cnet / gist:6175663
Created August 7, 2013 16:27
luketeaford
<?php
/*
Plugin Name: P-Ntil Quote Source
Plugin URI: http://luketeaford.com/plugins/pntil-quote-source
Description: A plugin to add author and source to quote post formats. Last updated 8/7/2013.
Version: 0.1
Author: Luke Teaford
Author URI: http://luketeaford.com
License: GPL2
*/
#adminmenu .toplevel_page_kebo-twitter div.wp-menu-image{background:url("../imgs/twitter_feed_icons_sprite.png") -92px -34px no-repeat}
#adminmenu .toplevel_page_kebo-twitter:hover div.wp-menu-image,#adminmenu .toplevel_page_kebo-twitter.current div.wp-menu-image,#adminmenu .toplevel_page_kebo-twitter.current:hover div.wp-menu-image{background-position:-92px -2px}
.social-link{padding:8px 16px 8px 14px;background:#eee;text-decoration:none;color:#fff;font-size:16px;display:inline-block;font-weight:normal}
.social-link:hover,.social-link:focus,.social-link:active{color:#fff}
.social-link i{margin-right:8px;font-size:16px}
.social-link.twitter{background:#0192c9}
.social-link.twitter:hover{background:#016d96}
.social-link.disabled{background:#aaa;text-decoration:none;color:#fff;font-size:16px;display:inline-block;font-weight:normal}
a.account{text-decoration:none}
.disconnect{text-decoration:none;color:#fff;padding:1px 3px 2px 3px;background:#dd4b39;border-radius:9999px;font-size:9px;font-weight:bold}
object(stdClass)#273 (9) {
["new_version"]=>
string(0) ""
["name"]=>
string(37) "Premium Local Search SEO Contact Page"
["version"]=>
string(0) ""
["slug"]=>
string(17) "ebs-seo-cp-output"
object(stdClass)#273 (9) {
["new_version"]=>
string(0) ""
["name"]=>
string(37) "Premium Local Search SEO Contact Page"
["version"]=>
string(0) ""
["slug"]=>
string(17) "ebs-seo-cp-output"
<?php
/**
* Page Template
*
* This template is the default page template. It is used to display content when someone is viewing a
* singular view of a page ('page' post_type) unless another page template overrules this one.
* @link http://codex.wordpress.org/Pages
*
* @package WooFramework
* @subpackage Template
<?php
$things = array (
'customer',
'invoicetype',
'invoicenumber',
'status',
'currency',
'period',
'invoicedate',
'duedate',