Skip to content

Instantly share code, notes, and snippets.

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

Gabor Javorszky javorszky

🏠
Working from home
View GitHub Profile
@javorszky
javorszky / array.php
Created November 26, 2012 01:28
Adding extra classes to wp_nav_menu - part 3
Array
(
[0] => Array
(
[1] => WP_Post Object
(
[ID] => 100
[post_author] => 1
[post_date] => 2012-11-26 00:09:23
[post_date_gmt] => 2012-11-26 00:09:23
@javorszky
javorszky / nav-menu-template.php
Created November 26, 2012 01:17
Adding extra classes to wp_nav_menu - part 1
<?php
function wp_nav_menu( $args = array() ) {
// function parts before
$sorted_menu_items = apply_filters( 'wp_nav_menu_objects', $sorted_menu_items, $args );
// rest of the function after
}
?>
@javorszky
javorszky / fuzzycoding.php
Created November 26, 2012 16:43
Fuzzy coding comment
<?php
//This will (should) make sure everything is loaded via SSL
//So that the "..not everything is secure.." message doesn't appear
//Still will be a problem if other themes and plugins do not implement ssl correctly
?>
@javorszky
javorszky / create-wp-admin-account.sql
Created October 14, 2015 14:29 — forked from azizur/create-wp-admin-account.sql
Create a WordPress Administrator user account using SQL
USE __DATABASE__;
SET @username = 'azizur';
SET @password = MD5('password');
SET @fullname = 'Azizur Rahman';
SET @email = 'azizur@example.com';
SET @url = 'http://azizur.com/';
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_status`, `display_name`) VALUES (@username, @password, @fullname, @email, @url, NOW(), '0', @fullname);
<?php
array(
'/' => array('GP_Route_Index', 'index'),
/**
* No permission check
*/
@javorszky
javorszky / jigoshop_admin_functions.md
Last active December 16, 2015 22:39
Functions relating to a Product in Jigoshop 1.6.5. Source can be found in `jigoshop_product.class.php`. If this is on Jigoshop documents, I managed not to find it.

This is a list of admin functions and which files they relate to

admin/jigoshop-admin-settings-api.php

class Jigoshop_Admin_Settings

__construct

Instantiates a Jigoshop_Options_Parser, and gets options, and parses it.

Accounts.createUser({
username: username
, email: email
, password: password
}, function(err){
if(err){
console.log(err);
}else{
Meteor.logout();
// Meteor.Router.to('/');
@javorszky
javorszky / client_meteor.js
Created May 27, 2013 09:12
What my meteor does
// The client side:
Template.resend_verification.rendered = function(){
console.log('this is the rendered function');
userId=Session.get('selectedUserId');
var user = Meteor.user(),
emails = user.emails,
verified = false,
sent = false;
{
"id": 4,
"name": "Bob",
"email": "bob@fromaccounting.com",
"meta": {
"plugins": [
"foo": {
"setting1": "value1",
"etc": "etc"
},
@javorszky
javorszky / 960-border-box.sass
Created June 5, 2013 10:26
960.gs is an awesome starter grid. Sadly it's content box... so I've made it play nice with border-box
$width: 960px
$cols: 12
$gutter: 16px
@mixin clearfix-micro()
&
*zoom: 1
&:before,
&:after