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
function mysite_allow_form_tags( $tags, $context) { | |
$tags['form'] = array( | |
'action' => true, | |
'method' => true, | |
'enctype' => true, | |
'name' => true, | |
'id' => true, | |
'class' => true, | |
'target' => true |
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 | |
if ( ! function_exists( 'wds_get_acf_link_html' ) ) { | |
/** | |
* Get link html generated using acf link field | |
* | |
* @return string | |
*/ | |
function wds_get_acf_link_html( $link, $other_attr = array(), $icon = '' ) { | |
$other_attr_html = ''; |
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 | |
/** | |
* Get current page URL without query strings | |
*/ | |
function mytheme_get_current_url() { | |
if ( isset( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ) { | |
$host = $_SERVER['HTTP_X_FORWARDED_HOST']; | |
} else { | |
$host = $_SERVER['HTTP_HOST']; |
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
{ | |
"version": 1, | |
"settings": { | |
"color": { | |
"primary": "#0073aa", | |
"secondary": "#005b8e", | |
"text": "#333", | |
"background": "#f5f5f5" | |
}, | |
"typography": { |
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 | |
function my_plugin_enqueue($hook) { | |
if ( 'edit.php' === $hook ) { | |
$file_path = plugin_dir_path( __FILE__ ) . 'css/edit_page_styles.css'; | |
$version = filemtime( $file_path ); | |
wp_register_style( | |
'my_plugin_main_css', | |
plugins_url( '/css/edit_page_styles.css', __FILE__ ), | |
array(), | |
$version |
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 | |
function my_plugin_add_editor_style() { | |
$editor_style_url = plugins_url( 'css/editor-style.css', __FILE__ ); | |
$editor_style_path = plugin_dir_path( __FILE__ ) . 'css/editor-style.css'; | |
$editor_style_version = filemtime( $editor_style_path ); | |
add_editor_style( $editor_style_url . '?ver=' . $editor_style_version ); | |
} | |
add_action( 'admin_init', 'my_plugin_add_editor_style' ); |
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 | |
function my_theme_register_button_styles() { | |
wp_register_style( | |
'my-theme-button-styles', | |
get_stylesheet_directory_uri() . '/button-styles.css', | |
array(), | |
filemtime( get_stylesheet_directory() . '/button-styles.css' ) | |
); | |
register_block_style( |
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 | |
function my_enqueue_block_assets() { | |
wp_enqueue_style( | |
'my-block-editor-styles', | |
get_template_directory_uri() . '/css/my-block-styles.css', | |
array(), | |
filemtime( get_template_directory() . '/css/my-block-styles.css' ), | |
'all' | |
); | |
} |
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 | |
function my_enqueue_block_editor_assets() { | |
wp_enqueue_style( | |
'my-block-editor-styles', | |
get_theme_file_uri( 'block-editor-style.css' ), | |
array(), | |
filemtime( get_theme_file_path( 'block-editor-style.css' ) ), | |
'all' | |
); | |
} |
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 | |
function my_plugin_enqueue() { | |
$file_path = plugin_dir_path( __FILE__ ) . 'css/styles.css'; | |
$version = filemtime( $file_path ); | |
wp_register_style( | |
'my_plugin_main_css', | |
plugins_url( '/css/styles.css', __FILE__ ), | |
array(), | |
$version | |
); |
NewerOlder