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 | |
/* | |
Plugin Name: Theme drive | |
Description: Display different theme to user if logged in as admin | |
Author: Kyle Barber | |
*/ | |
add_filter('template', 'change_theme'); | |
add_filter('option_template', 'change_theme'); | |
add_filter('option_stylesheet', 'change_theme'); | |
function change_theme($theme) { |
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
$heading_image_url = MultiPostThumbnails::get_post_thumbnail_url('page', 'project-headr',$post->ID, 'full'); |
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() { | |
$('a.scroll').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html,body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); | |
return false; |
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 | |
// get the id of page laying next to the given one | |
// and only those that are chosen by meta value show_in_selected = 1 | |
function prev_next_page($step){ | |
global $post; | |
$actual_menu_order = $post->menu_order; | |
$args = array( | |
'post_type' => $post->post_type, | |
'posts_per_page' => -1, // we have to get all in order to get cycle results | |
'post_status' => 'publish', |
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
if (function_exists('icl_get_languages')){ | |
$languages = icl_get_languages('skip_missing=0'); | |
$lang_html = ''; | |
foreach($languages as $lang){ | |
$lang_html .= '<div'; | |
if ( $lang['native_name'] == ICL_LANGUAGE_NAME){ | |
$lang_html .= ' class="current-menu-item current_language lng"'; | |
} | |
else{ | |
$lang_html .= ' class="lng"'; |
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
wp plugin install custom-content-type-manager simple-image-sizes codepress-admin-columns adminimize |
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 be_attachment_field_credit( $form_fields, $post ) { | |
// | |
// ---- CS --- | |
// | |
$form_fields['media_date'] = array( | |
'label' => 'Datum', | |
'input' => 'text', | |
'value' => get_post_meta( $post->ID, 'media_date', true ), | |
// 'helps' => 'datace', |
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
!/bin/bash -e | |
#modified to personal user by 2046, original - https://www.ltconsulting.co.uk/automated-wordpress-installation-with-bash-wp-cli/ | |
wpuser='2046' | |
clear | |
echo "=================================================================" | |
echo "Awesome WordPress Installer!!" | |
echo "=================================================================" |
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
'meta_query' => [ | |
'date_' => [ | |
'key' => 'start_date', | |
'compare' => 'EXISTS', | |
], | |
'time_' => [ | |
'key' => 'start_time', | |
'compare' => 'EXISTS', | |
], | |
], |