- Create a hierarchical post type
- Add a post under that post type called '1990'
- Slug is created with -2 on the end even if a similar post doesn't already exist i.e. 1990-2
Doesn't happen for non-hierarchical post types
| <?php | |
| function sample_mailshot($mailshots) { | |
| $mailshots[] = array( | |
| 'slug' => 'mailshot1', | |
| 'template' => 'mailshot1.php', | |
| 'page_title' => 'Mailshot 1', | |
| ); |
| @body-font: "Georgia", serif; | |
| @header-font: "Helvetica", sans-serif; | |
| /* Colours */ | |
| @brand-red: #b23636; | |
| @brand-blue: #257eb1; |
| .style-guide() { | |
| font-family: @body-font; | |
| h2, | |
| h3 { | |
| font-family: @header-font; | |
| } | |
| h2 { | |
| font-weight: 300; |
| @import "style-guide.less"; | |
| @import "variables.less"; | |
| body { | |
| font-size: 15px; | |
| } | |
| h1, | |
| h2, | |
| h3 { |
| @import "style-guide.less"; | |
| @import "variables.less"; | |
| #tinymce { | |
| .style-guide(); | |
| } |
| gulp.task('editor-style', function() { | |
| return gulp | |
| .src('css/editor-style.less') | |
| .pipe(less()) | |
| .pipe(autoprefixer('last 2 version', "> 1%", "ie 8")) | |
| .pipe(minify()) | |
| .pipe(gulp.dest('css')) | |
| .pipe(notify({ message: 'Editor Style Compiled'})); |
| <?php | |
| function stomp_add_editor_styles() { | |
| add_editor_style( 'css/editor-style.css' ); | |
| } | |
| add_action( 'admin_init', 'stomp_add_editor_styles' ); |
| <?php | |
| function maybe_filter_content() { | |
| if ('' != sanitize_text_field($_GET['op'])) { | |
| add_filter("the_content", "rc_content_handler"); | |
| } | |
| } | |
| add_action('init', 'maybe_filter_content'); |
| <?php | |
| function rmt_exclude_yoast_resource_centre( $plugins ) { | |
| if ('' == sanitize_text_field($_GET['op'])) { | |
| return $plugins; | |
| } | |
| $key = array_search('wordpress-seo/wp-seo.php', $plugins); | |
| unset( $plugins[$key] ); |