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 | |
add_filter( 'gform_pre_render_2', 'populate_open_positions' ); | |
add_filter( 'gform_pre_validation_2', 'populate_open_positions' ); | |
add_filter( 'gform_admin_pre_render_2', 'populate_open_positions' ); | |
add_filter( 'gform_pre_submission_filter_2', 'populate_open_positions' ); | |
function populate_open_positions( $form ) { | |
$field_id = 55; | |
$parent_page = get_page_by_title( 'Open positions' ); |
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 display_date( $atts ) { | |
$atts = shortcode_atts( | |
[ | |
'date_format' => 'd.m.Y', | |
], | |
$atts, | |
'date' | |
); |
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 () { | |
$("#input_field").autocomplete({ | |
source: your_data, | |
minLength: 0 | |
}).focus(function(){ | |
$(this).data("uiAutocomplete").search($(this).val()); | |
}); | |
}); |
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 | |
add_filter( 'wpseo_breadcrumb_links', 'override_yoast_breadcrumb_trail' ); | |
function override_yoast_breadcrumb_trail( $links ) { | |
if ( get_post_type() === 'employee' ) { | |
$breadcrumb[] = array( | |
'url' => get_permalink( get_page_by_title( 'contact' )->ID ), | |
'text' => __( 'Contact', 'your-text-domain' ), | |
); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<modification> | |
<id>ExampleId</id> | |
<version>0.1</version> | |
<vqmver>2.5.1</vqmver> | |
<author>Ville6000</author> | |
<file name="catalog/view/theme/journal/template/product/product.tpl"> | |
<operation> | |
<search position="replace"><![CDATA[<input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />]]></search> |
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 echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?> |
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 $object_id = apply_filters( 'wpml_object_id', YOUR-PAGE-ID-HERE, 'page' ); ?> | |
<a href="<?php echo get_permalink( $object_id ); ?>"> | |
<?php _e( 'Link text', 'text-domain' ); | |
</a> |
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 | |
$the_query = new WP_Query( array( | |
'orderby' => array( 'menu_order' => 'ASC', 'title' => 'DESC' ), | |
) ); |
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 | |
$field_config = wpcf_admin_fields_get_field( 'field-id' ); | |
$field_options = array(); | |
if ( isset( $field_config['data']['options'] ) ) { | |
foreach ( $field_config['data']['options'] as $option ) { | |
if ( isset( $option['value'] ) ) { | |
$field_options[ $option['title'] ] = $option['value']; | |
} | |
} |
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 Counter () { | |
var count = 0; | |
function logNewValue() { | |
console.log("Count is " + count); | |
} | |
return { | |
add: function () { | |
count += 1; |