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
Accounts.createUser({
username: username
, email: email
, password: password
}, function(err){
if(err){
console.log(err);
}else{
Meteor.logout();
// Meteor.Router.to('/');
@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.

<?php
array(
'/' => array('GP_Route_Index', 'index'),
/**
* No permission check
*/
@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);
@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 / 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 / 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 / modified_classes.php
Created November 26, 2012 01:32
Adding extra classes to wp_nav_menu - part 4
<?php
function display_nav_menu_items( $items, $args ) {
foreach ($items as $item) {
if( $item->current ) {
$item->classes[] = 'active';
}
}
return $items;
}
@javorszky
javorszky / functions.php
Created November 26, 2012 01:23
Adding extra classes to wp_nav_menu - part 2
<?php
if( !function_exists( 'preit' ) ) {
function preit($obj, $return = false ) {
if( !$return ) {
echo '<pre>';
print_r($obj);
echo '</pre>';
} else {
$ret = '<pre>' . print_r( $obj, true ) . '</pre>';
return $ret;
@javorszky
javorszky / test.php
Created November 24, 2012 16:11
A test gist
<?php
$something = 'something';
global $post;
foreach( $post as $_t ) {
print_r( $_t );
}
?>