Skip to content

Instantly share code, notes, and snippets.

View advokatb's full-sized avatar

advokatb

  • Ukraine
View GitHub Profile
<?php
/**
* Change site url in admin bar
*
* @param WP_Admin_Bar $wp_admin_bar
*/
function admin_bar_menu_filter( WP_Admin_Bar $wp_admin_bar ) {
$new_url = 'site.org';
$site_name_node = $wp_admin_bar->get_nodes()['site-name'];
$site_name_node->href = $new_url;
@advokatb
advokatb / Gravity Forms and Fancybox
Created November 10, 2015 13:27 — forked from mandiwise/Gravity Forms and Fancybox
Using Gravity Forms with a modal and ajax
<div id="voting-form" style="display:none">
<?php echo do_shortcode( '[gravityform id="6" title="false" description="false" ajax="true"]' ) ?>
</div>
<a href="#voting-form" class="fancybox button">Vote Now</a>
add_filter( 'job_manager_application_email_subject', 'custom_job_manager_application_email_subject', 10, 2 );
// This is your hooked in function. Note: the $post variable is only available after v1.11.2
function custom_job_manager_application_email_subject( $subject, $post ) {
// By default, $subject will contain: Job Application via "X" listing on X. Change that below
$subject = 'New subject';
// Return the new subject
return $subject;
}
sub, sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
/* Where the magic happens: makes all browsers position