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 | |
/** | |
* Fix Gravity Form Tabindex Conflicts | |
* http://gravitywiz.com/fix-gravity-form-tabindex-conflicts/ | |
*/ | |
add_filter( 'gform_tabindex', 'gform_tabindexer', 10, 2 ); | |
function gform_tabindexer( $tab_index, $form = false ) { | |
$starting_index = 1000; // if you need a higher tabindex, update this number | |
if( $form ) | |
add_filter( 'gform_tabindex_' . $form['id'], 'gform_tabindexer' ); |
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 // add everything except for this opening line to your functions file | |
add_filter( 'wp_nav_menu_items', 'sp_add_loginout_link', 10, 2 ); | |
function sp_add_loginout_link( $items, $args ) { | |
// Change 'primary' to 'secondary' to put the login link in your secondary nav bar. | |
if ( $args->theme_location != 'primary' ) { | |
return $items; | |
} | |
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 | |
/** | |
* Create the image attachment and return the new media upload id. | |
* | |
* @author Joshua David Nelson, [email protected] | |
* | |
* @since 03.29.2017 updated to a class, utilizing code from Takuro Hishikawa's gist linked below. | |
* | |
* @see https://gist.github.com/hissy/7352933 | |
* |