This file contains 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 | |
$file = fopen("dicar.csv","r"); | |
while (($data = fgetcsv($file)) !== FALSE) { | |
//echo "<pre>";print_r($data); | |
$split_old_url = explode("?", $data[0]); | |
$querystring = $split_old_url[1]; | |
$url = $split_old_url[0]; | |
$url = explode('/', $url); |
This file contains 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
// | |
// Set extra styles for TINY MCE | |
// 1. Enable the styles dropdown | |
add_filter( 'mce_buttons_2', 'my_mce_buttons_2' ); | |
function my_mce_buttons_2( $buttons ) { | |
array_unshift( $buttons, 'styleselect' ); | |
return $buttons; | |
} | |
// 2. Add the correct style |
This file contains 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 mens_project_init() { | |
register_post_type( 'mens_project', array( | |
'hierarchical' => false, | |
'public' => true, | |
'show_in_nav_menus' => true, | |
'show_ui' => true, | |
'supports' => array( 'title', 'editor', 'thumbnail' ), | |
'has_archive' => false, | |
'query_var' => true, | |
'rewrite' => array( |
This file contains 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
// | |
// Set extra styles for TINY MCE | |
// 1. Enable the styles dropdown | |
add_filter( 'mce_buttons_2', 'my_mce_buttons_2' ); | |
function my_mce_buttons_2( $buttons ) { | |
array_unshift( $buttons, 'styleselect' ); | |
return $buttons; | |
} | |
// 2. Add the correct style |
This file contains 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
module.exports = function(grunt) { | |
// 1. All configuration goes here | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
sass: { | |
files: ['*.{scss,sass}'], | |
tasks: ['sass:dist','postcss:dist'] | |
}, |
This file contains 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
for($x = 0; $x < $total_page_count; $++) { | |
echo '<a href="#">' . ($x+1) . '</a>'; | |
} |
This file contains 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
<!-- fout --> | |
<img src=''mijnafbeelding.jpg'' /> | |
<!-- juist --> | |
<img src="mijnafbeelding.jpg" /> |
This file contains 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
// global $wp_styles; | |
// echo "<pre> before colors";print_r($wp_styles);echo "</pre>"; | |
// returns: | |
WP_Styles Object | |
( | |
[base_url] => http://wphierarchy.dev | |
[content_url] => http://wphierarchy.dev/wp-content | |
[default_version] => 4.1.5 | |
[text_direction] => ltr |
This file contains 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
/* EXAMPLE CUSTOM LOOP (WPQUERY) WITH PAGINATION | |
function video_testimonial_loop() { | |
$per_page = 8; | |
$paged = get_query_var( 'page' ); | |
$args = array ( | |
'post_type' => 'defunktnutestimon', | |
'posts_per_page' => $per_page, | |
'paged' => $paged, | |
'meta_query' => array( |
This file contains 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 setup_custom_rules () { | |
add_filter( 'rewrite_rules_array','brabo_insert_rules' ); | |
brabo_flush_rules(); | |
} | |
function brabo_insert_rules( $rules ) { | |
$newrules = array(); | |
$newrules['^testsortable'] = 'index.php?ba=testsortable'; | |
$combined_rules = $newrules + $rules; |
NewerOlder