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
add_filter( 'astra_comment_form_default_markup', 'astra_edit_comment_textarea_row_col' ); | |
function astra_edit_comment_textarea_row_col( $args ) { | |
$args['comment_field'] = '<div class="ast-row comment-textarea"><fieldset class="comment-form-comment"><div class="comment-form-textarea ast-col-lg-12"><label for="comment" class="screen-reader-text">' . esc_html( astra_default_strings( 'string-comment-label-message', false ) ) . '</label><textarea id="comment" name="comment" placeholder="' . esc_attr( astra_default_strings( 'string-comment-label-message', false ) ) . '" cols="5" rows="5" aria-required="true"></textarea></div></fieldset></div>'; | |
return $args; | |
} |
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
add_filter( | |
'init', | |
function() { | |
global $wp_locale, $wp_styles; | |
$direction = 'ltr'; | |
$wp_locale->text_direction = $direction; | |
if ( ! is_a( $wp_styles, 'WP_Styles' ) ) { | |
$wp_styles = new WP_Styles(); |
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
/** | |
* Display search form. | |
* | |
* @param bool $echo Default to echo and not return the form. | |
* @return string|void String when $echo is false. | |
*/ | |
function astra_get_search_form( $echo = true ) { | |
$form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '"> | |
<label> |
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
/** | |
* Add async attr to the Astra Script. | |
* | |
* @param string $tag Tag for the script. | |
* @param string $handle Handle for the script. | |
* | |
* @return string | |
*/ | |
function add_async_attribute( $tag, $handle ) { | |
if ( 'astra-theme-js' === $handle ) { |
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
/** | |
* Stop date from google crawling. | |
* | |
* @param string $output Markup for the last modified date. | |
* | |
* @return void | |
*/ | |
function your_prefix_post_date( $output ) { | |
$output = ''; |
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_filter( 'astra_schema_body', '__return_empty_string' ); | |
add_action( | |
'init', | |
function() { | |
remove_action( 'astra_masthead_content', 'astra_site_branding_markup', 8 ); | |
} | |
); |
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
/** | |
* Update Search Nothing Found String and Search Input Box Placeholder Strings | |
* | |
* @param array $strings List of default strings used in theme | |
* @return array $strings | |
*/ | |
function default_strings_callback( $strings ) { | |
// Replace by with empty string. | |
$strings['string-blog-meta-author-by'] = ''; |
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 | |
// Command - wp delete-astra-option delete --key={astra-settings key} | |
namespace DeleteAstraOption; | |
use WP_CLI, WP_CLI_Command; | |
if( class_exists( 'WP_CLI_Command' ) ) { | |
class Commands extends WP_CLI_Command { | |
public function delete( $args, $assoc_args ) { | |
$option_key = isset( $assoc_args['key'] ) ? $assoc_args['key'] : false; | |
if( ! $option_key ) { |
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
/** | |
* Archive Page Title | |
*/ | |
if ( ! function_exists( 'astra_archive_page_info' ) ) { | |
/** | |
* Wrapper function for the_title() | |
* | |
* Displays title only if the page title bar is disabled. | |
*/ |
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
add_filter( 'astra_comment_form_default_fields_markup', 'astra_remove_website_url_comment' ); | |
function astra_remove_website_url_comment( $fields ) { | |
if ( isset( $fields['url'] ) ) { | |
unset( $fields['url'] ); | |
return $fields; | |
} | |
} |
OlderNewer