Skip to content

Instantly share code, notes, and snippets.

View ibes's full-sized avatar

ibes ibes

View GitHub Profile
@ibes
ibes / content-teams.php
Created January 26, 2019 15:19
Building Content Teams with WP User Groups and Custom User Roles - https://webdevstudios.com/2016/03/22/building-content-teams-wp-user-groups/
<?php
/**
* Plugin Name: Content Teams
* Plugin URI: https://webdevstudios.com/2016/03/22/building-content-teams-wp-user-groups/
* Description: Putting together the pieces of Chris Reynolds tutorial to create Content Teams
* Version: 0.1.0
* Author: Sebastian Gärtner original by Chris Reynolds
* Author URI: https://webdevstudios.com/2016/03/22/building-content-teams-wp-user-groups/
* Text Domain: wds
* License: GPL-2.0+

Keybase proof

I hereby claim:

  • I am ibes on github.
  • I am ibes (https://keybase.io/ibes) on keybase.
  • I have a public key whose fingerprint is 055D A09D 2155 0C23 669B 8313 8942 6064 C685 2682

To claim this, I am signing this object:

@ibes
ibes / install-beans-in-wordplate.md
Last active June 20, 2018 17:29
Install Beans in WordPlate

Use Beans with WordPlate

What is WordPlate?

"WordPlate is a modern WordPress stack built with Composer. It simplifies the fuzziness around WordPress development." - that is, what they say on their website

I don't yet work with it in production but what I saw so far is brilliant. It has a similar approach to Bedrock. WordPlate offers a folder structure and a setup that enables you to manage your WordPress installation via Composer.

What is Composer?

@ibes
ibes / remove-taxonomie-slugs.php
Last active April 19, 2017 13:59
If you want to have cleaner URLs and want to delete the taxonomy part of the url
// add to functions.php
// thanks to: https://rudrastyh.com/wordpress/remove-taxonomy-slug-from-urls.html
add_filter('request', 'rudr_change_term_request', 1, 1 );
function rudr_change_term_request($query){
$tax_names = array('manufacturer', 'product_cat');
// specify you taxonomy name here, it can be also 'category' or 'post_tag'
@ibes
ibes / meta field
Created November 27, 2015 14:02
metabox.php
/**
* Generated by the WordPress Meta Box generator
* at http://jeremyhixon.com/tool/wordpress-meta-box-generator/
*/
function produktslogan_get_meta( $value ) {
global $post;
$field = get_post_meta( $post->ID, $value, true );
if ( ! empty( $field ) ) {
@ibes
ibes / Facebook.php
Created January 9, 2015 23:58
Count shows shares + likes
<?php
namespace Heise\Shariff\Backend;
class Facebook extends Request implements ServiceInterface
{
public function getName()
{
return 'facebook';
@ibes
ibes / array2csv.php
Created September 24, 2013 13:36
Custom Array to CSV function.
<?php
/**
* create CSV file from address data
*
* @var array Address Data
* @return string formated CSV file
*/
function createCsv($address) {
<?php
define('VERSION', '0.1');
/**
* Vanilla Attachments to FileUpload Porter
* This is not an official Vanilla Plugin, Layout was taken from Vanilla 2 Exporter
* This script puts Vanilla1 Attachment files to Vanilla 2 FileUpload
* see http://www.vanillaforums.org/discussion/13136/attachments-to-fileupload-importer for more information
* The function of this script comes from user rayk.
* brought to PHP and made more user friendly by user vegano
<html>
<body>
<?php
/* Someone should write an GUI for that.
* a form with files:
* csv_path, path to attachments-files, path to fileUpload-folder, checkbox wether it's a testrun or files should be copied, dispersion-factor
*
* What does this script?