This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function prefix_init() { | |
register_post_type( 'project', array( | |
'public' => true, | |
'label' => __( 'Projects', 'text_domain' ), | |
'has_archive' => true, | |
'rewrite' => array( 'slug' => _x( 'projects', 'slug', 'text_domain' ) ), | |
) ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE | |
wp_postmeta | |
SET | |
meta_value = 'page-templates/template-overview.php' | |
WHERE | |
meta_key = '_wp_page_template' | |
AND | |
meta_value = 'page-templates/template-overzicht.php' | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define( 'WP_USE_THEMES', false ); | |
require './wp-blog-header.php'; | |
// Post | |
$url = 'https://www.example.com/'; | |
$data = 'key1=value1|key2=value2|key3=value3'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Title: WordPress pay extension Gravity Forms admin | |
* Description: | |
* Copyright: Copyright (c) 2005 - 2015 | |
* Company: Pronamic | |
* @author Remco Tolsma | |
* @version 1.1.0 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function prefix_get_the_terms( $terms, $post_id, $taxonomy ) { | |
if ( 'category' == $taxonomy ) { | |
if ( is_category() ) { | |
$current = get_queried_object(); | |
$sub_terms = get_terms( $taxonomy, array( | |
'child_of' => $current->term_id, | |
'fields' => 'ids', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( function( $ ) { | |
// ... | |
// FitVids | |
$( '.entry-content' ).fitVids(); | |
// ... | |
} )( jQuery ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueue scripts | |
*/ | |
function prefix_enqueue_scripts() { | |
$uri = get_template_directory_uri(); | |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The terms | |
*/ | |
function prefix_the_terms( $post_id, $taxonomy ) { | |
$term_ids = wp_get_post_terms( $post_id, $taxonomy, array( | |
'fields' => 'ids', | |
) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'wp-load.php'; | |
$login = 'remcotolsma'; | |
$passw = ''; | |
$email = '[email protected]'; | |
if ( !username_exists( $login ) && ! email_exists( $email ) ) { | |
$user_id = wp_create_user( $login, $passw, $email ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Title: Group iterator | |
* Description: | |
* Copyright: Copyright (c) 2005 - 2015 | |
* Company: Pronamic | |
* @author Remco Tolsma | |
* @version 1.0.0 | |
* @doc http://www.koders.com/java/fidC979E43601174F16239536C65E101FCB0C32E609.aspx?s=idef%3Asort |