Use of undefined constant FS_CHMOD_DIR – assumed ‘FS_CHMOD_DIR’

It’s really quite simple. The theme author is using a constant that you can put in wp-config.php, but because you don’t use that constant, and the author never checks if it’s actually defined, the code throws a PHP warning https://codex.wordpress.org/Editing_wp-config.php#Override_of_default_file_permissions Override of default file permissions The FS_CHMOD_DIR and FS_CHMOD_FILE define statements allow override of default … Read more

How to get the name and description of a sidebar in theme?

You can use the $wp_registered_sidebars global variable. Like this: global $wp_registered_sidebars; if( is_active_sidebar( ‘activity_calendar_en’ ) ): esc_html_e( $wp_registered_sidebars[‘activity_calendar_en’][‘name’] ); dynamic_sidebar( ‘activity_calendar_en’ ); endif; If you check the WordPress core for is_registered_sidebar function, you’ll see that it’s using this global variable too: function is_registered_sidebar( $sidebar_id ) { global $wp_registered_sidebars; return isset( $wp_registered_sidebars[ $sidebar_id ] ); } … Read more

Change text of twentyseventeen_edit_link()

The twentyseventeen_edit_link() function returns an accessibility-friendly link to edit a post or page. Here is its content: function twentyseventeen_edit_link() { $link = edit_post_link( sprintf( /* translators: %s: Name of current post */ __( ‘Edit<span class=”screen-reader-text”> “%s”</span>’, ‘twentyseventeen’ ), get_the_title() ), ‘<span class=”edit-link”>’, ‘</span>’ ); return $link; } Since it doesn’t provide a hook or filter, … Read more

add_image_size is scaling, even though crop is set to true

from your question i under that you want fixed size cropped images when you upload image, why don’t you use wp_get_image_editor. I used it in my project where i wanted cropped images of fixed size so i did this code. $path = $newPath[‘basedir’].’/newImgas/’; $cropfile = uniqid() . ‘.png’; $cropfilename = $path.$cropfile; $cropImage = home_url(). ‘/wp-content/uploads/newImgas/’.$cropfile; … Read more

Where is default wp_head() implemented?

Is there somewhere I can see this default implementation? wp_head() function simply triggers the wp_head action hook that runs all callback functions that were added to this hook using add_action(‘wp_head’,’callback_function’); So there is no default implementation. Can this default implementation be “turned off”? Like we said before since there is no default implementation you need … Read more

add generated stylesheet from parent theme after child-themes style.css

Absolutely! Into functions.php, like you said. I’ll call it cache_busting_styles because I like how it sounds. First, you set up the style via wp_enqueue_style, then call it during the action hook wp_print_styles, Also, you’ll want to set up a variable and pass it in there as the version number as well: function cache_busting_styles() { //however … Read more