Skip to content

Instantly share code, notes, and snippets.

Ralf Albert RalfAlbert

Block or report user

Report or block RalfAlbert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@RalfAlbert
RalfAlbert / themes_functions-php.part.php
Created Dec 31, 2012
themes_functions-php.part.php
View themes_functions-php.part.php
<?php
/**
* Remove forgetmenot-checkbox on login screen
* Uses the hook 'after_theme_setup' instead of 'plugins_loaded' because
* first the theme have to be setup for get_template_directory_uri()
*
* @uses add_action()
* @hook after_setup_theme
*/
@RalfAlbert
RalfAlbert / functions-php.part.php
Last active Dec 10, 2015
Removing the Forgetmenot-checkbox on the WordPress login screen.
View functions-php.part.php
<?php
/**
* Remove forgetmenot-checkbox on login screen
* Uses the hook 'after_theme_setup' instead of 'plugins_loaded' because
* first the theme have to be setup for get_template_directory_uri()
*
* @uses add_action()
* @hook after_setup_theme
*/
@RalfAlbert
RalfAlbert / class-collectionmanager.php
Last active Dec 10, 2015
Managing complex datastructures with a class
View class-collectionmanager.php
<?php
class CollectionManagement
{
/**
* Option key
* @var string
*/
const OPTION_KEY = 'collection_settings';
/**
@RalfAlbert
RalfAlbert / class-safe_register_scripts.php
Created Dec 16, 2012
A class to safely registering scripts in WordPress
View class-safe_register_scripts.php
<?php
/**
* Safely registering scripts without script collisions
* @package WordPress
* @author Ralf Albert
*
*/
class Safe_Registering_Scripts
{
@RalfAlbert
RalfAlbert / index.php
Created Dec 2, 2012
Insert custom fields at user registration v2
View index.php
<?php
/**
* Plugin Name: Custom user registration fields
* Plugin URI: http://yoda.neun12.de
* Description: Add custom fields to the user registration
* Version: 0.1
* Author: Ralf Albert
* Author URI: http://yoda.neun12.de
* Text Domain:
* Domain Path:
@RalfAlbert
RalfAlbert / index.php
Created Dec 2, 2012
Insert custom fields at user registration
View index.php
<?php
/**
* Plugin Name: Custom user registration fields
* Plugin URI: http://yoda.neun12.de
* Description: Add custom fields to the user registration
* Version: 0.1
* Author: Ralf Albert
* Author URI: http://yoda.neun12.de
* Text Domain:
* Domain Path:
@RalfAlbert
RalfAlbert / index.php
Created Dec 1, 2012
Keyboard shortcuts for HTML editor in WordPress
View index.php
<?php
/**
* Plugin Name: Keyboardshortcuts for html editor
* Plugin URI: http://yoda.neun12.de
* Description: Adding keyboardshortcuts to the html editor
* Version: 0.1
* Author: Ralf Albert
* Author URI: http://yoda.neun12.de
* Text Domain:
* Domain Path:
@RalfAlbert
RalfAlbert / switchtheme.php
Created Nov 25, 2012
Switch theme on specific page
View switchtheme.php
<?php
/*
Plugin Name: Switch Theme
Plugin URI:
Description:
Version:
Author:
Author URI:
License:
*/
@RalfAlbert
RalfAlbert / wp_use_smtp.php
Created Sep 27, 2012
WordPress use SMTP instead of mail()
View wp_use_smtp.php
<?php
/**
* WordPress-Plugin use smtp instead of mail()
*
* PHP version 5.2
*
* @category PHP
* @package WordPress
* @subpackage UseSMTP
* @author Ralf Albert <me@neun12.de>
@RalfAlbert
RalfAlbert / wp_last_post_change.php
Created Aug 8, 2012
Date of last modification if at least one day later than the post creation date.
View wp_last_post_change.php
<?php
/**
* Date of last modification if at least one day later than the post creation date.
*
* @author Thomas Scholz
* @param string $template Parsed with sprintf(). Must contain a '%s'.
* @param string|int $time_diff Time difference as string for strtotime() or integer as seconds
* @return string|void
*/
function t5_post_last_mode( $template = '%s', $time_diff )
You can’t perform that action at this time.