Giter Site home page Giter Site logo

generatepress's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generatepress's Issues

Clear search on nav search close

It would be ideal to clear the left-over search text in the navigation search field if the search is closed without being executed.

Widgets in content areas and compatibility with Page Builder by SiteOrigin

@tomusborne @generatepress

Here is an example of the issue. I'm sure there will perhaps be more cases too:

  1. Install "Page Builder By SiteOrigin" (https://wordpress.org/plugins/siteorigin-panels/)

  2. Install "SiteOrigin Widgets Bundle" (https://wordpress.org/plugins/so-widgets-bundle/)

  3. Install GeneratePress

  4. Activate all the above

  5. Add a New Page and using the WordPress' standard editor (Visual tab) add a bullet point list.

  6. View the page and you can see the standard black bullet point circles on the front end

  7. Now edit the page and click on the "Page Builder" tab. It will automatically transfer the text content into its "SiteOrigin Editor" widget

  8. Update the the page and view the front end again and you will see the black bullet point circles have been removed from the list

From closer inspection I can see that its due to the following CSS rule in themes/generatepress/style.min.css?ver=2.0.2

.widget ul li {
list-style-type: none;
position: relative;
padding-bottom: 5px;
}

I guess this rule was added to remove the bullet circles from the sidebar and footer widget areas? But as Page Builder is based off of using widgets, this rule is affecting page content too.

Perhaps you could make your rule a little more specific e.g. ".sidebar .widget ul li {"

Thank you :-)

FR: More control typography in WooCommerce

The same options that are available in Headings (fonts, variants, size and line height) could be available in all elements of WooCommerce: title product, price, buttom and description, for archives page and simple product page.

Yes, this is easy to be solved by CSS, but if have a native option it is much better.

Feature request: Sticky desktop header

sticky menu is a great feature

I would like sticky header option on desktop

This is useful when header/logo/menu is thin strip across top of page

Thanks for consideration

remove the unsemantic grid

The unsemantic grid is almost unnecessary in the theme (making it easy to replace it) and removing it will make the theme more lightweight and less opinionated. I believe that many users should not even take advantage of this grid framework, but you should know it better than I do.

Extra caption padding

Right now, we have this function:

if ( ! function_exists( 'generate_remove_caption_padding' ) ) :
/**
 * Remove WordPress's default padding on images with captions
 *
 * @param int $width Default WP .wp-caption width (image width + 10px)
 * @return int Updated width to remove 10px padding
 */
add_filter( 'img_caption_shortcode_width', 'generate_remove_caption_padding' );
function generate_remove_caption_padding( $width ) {
	return $width - 10;
}
endif;

However, it looks like it isn't working as it should anymore:

Perhaps we should add this to the after_setup_theme hook instead:

add_filter( 'img_caption_shortcode_width', '__return_zero' );

A customizer mini-framework

It would be nice if generatepress had its own API/framework for creating customizer options. That way it would be very easy to add or remove options/fields in customizer.

// example
Generate_Customizer::add_field( 'my_field', array(
	'type'     => 'text',
    'label'    => __( 'My custom field', 'generate' ),
	'section'  => 'my_section',
	'default'  => 'lorem ipsum',
) );

Navigation $classes and PHPDoc

@tomusborne

https://github.com/tomusborne/generatepress/blob/master/inc/markup.php#L361

function generate_navigation_classes( $classes ) {
		$classes[] = 'main-navigation';
		// Get theme options
		$generate_settings = wp_parse_args(
			get_option( 'generate_settings', array() ),
			generate_get_defaults()
		);
		$nav_layout = $generate_settings['nav_layout_setting'];
		if ( $nav_layout == 'contained-nav' ) {
			$classes[] = 'grid-container';
			$classes[] = 'grid-parent';
		}
		return $classes;
	}
}

links to https://github.com/tomusborne/generatepress/blob/master/inc/element-classes.php#L234

/**
	 * Display the classes for the navigation.
	 *
	 * @since 0.1
	 * @param string|array $class One or more classes to add to the class list.
	 */

My IDE is barking about phpdoc params in https://github.com/tomusborne/generatepress/blob/master/inc/markup.php#L361

Is my IDE setup wrong or the function is incomplete?

GP Premium

I think that many users would welcome some breadcrumb functionality so we don't have to install another plugin?

Thanks

Abilitiy to disable individual tabs of layout metabox

Before 2.0 it was possible to hook out individual metaboxes, that was not needed for the project.

With the new tabbed metabox, it's not possible to only remove some components. The entire metabox is either removed or kept.

It would be really nice to be able to remove selective components via hooks.

Also, is this the best forum to inform you of bugs, or should i go somewhere else with it? I have noticed an issue with dropdown.js post 2.0.

missing title-hooks on pages

The hooks "generate_before_entry_title" and "generate_after_entry_title" should also be available in the page template.

capacity to disable support to old IE versions

WP 4.8 (next major release) will end support for IE 8, 9, 10. An option to disable the support to old IE will be nice in the GeneratePress too. Maybe a option in Apparence > GeneratePress or just a filter.

CSS selector too broad

Hello,

I noticed there is a clearfix targeting class names that contain "content". This is a way too broad selector as "content" can be found in many other class names that come from plugins or other components. One example of this causing issues is in Safari when the element has display: flex. Safari doesn't ignore pseudo elements visually for flexbox and treats them as elements inside the flexbox, allocating 1px for their display. This means that for elements containing "content" in the name of the class that have "display: flex" an override needs to be added.

This is the css I'm referring to:

.clear:before,
.clear:after,
[class*="content"]:before,
[class*="content"]:after,
[class*="site"]:before,
[class*="site"]:after {
content: '';
display: table;
}

Hope you can find a quick solution. Thanks!

horizontal scrollbar

Hello
I'm getting a horizontal scrollbar using the builder template - when adding a overflow: hidden to .container.grid-container the issue goes away?

Feature: GP Premium - Store *.json in uploads folder

Around line 82 of /plugins/generatepress_premium/import-export/functions/functions.php generate_process_settings_export() use something like wp_uploads_dir() with the parms to create /wp-content/uploads/gp-json/ if not exist.

Dynamically generate an array of active sub-parts for customizer. json import the array of files or export to that folder. And, have a new button at the bottom for import all and also a hook action to automate for child theme authors.

Consider using SemVer to versioning GeneratePress and GP Premium

Usage

The version number will use three numbers: MAJOR.MINOR.PATCH (Similar to your current approach).

MAJOR

Changes when a release breaks (not compatible with) the previous release.

MINOR

Changes when a release brings a new functionality BUT NOT breaks the previous release.

PATCH

Changes when a release brings a just bug fixes.


Reference: http://semver.org/

GP Hooks

Hello
what I was wondering whether it would be helpful to have a meta box for the hooks on the pages as well so it would apply only to the current page - that way we could have some global hook content as well as per page - the only other way to achieve this is having to put some PHP conditions into the hooks - maybe I'm missing something?

Accessibility Review

Here is the first list of accessibility review.

Keyboard Navigation

Test using Tab and Shift + Tab and check can you see where you're navigating.

  • In general all the links are missing good focus styles. There is color change from blue to black but even that doesn't have enough color contrast (1: 4.5).
  • In post author name, category/tags/next/previous post links there is no color change on focus.
  • I suggest that there would be some kind of outline when links are focused.
  • Usually color alone is not good way to style focus. It can be hard for color blinds for example.
  • In primary menu there is also same focus style issue but it's probably not that critical. But I suggest to have outline focus styles in there also.
  • In Firefox form fields focus styles could be better. I can see only subtle background-color change.
  • Form submit button (or other buttons) also have only color change on focus and doesn't meet color contrast criteria.
  • On mobile menu-toggle button doesn't have focus styles at all.
  • On mobile you can't access to dropdown menus using keyboard. dropdown-menu-toggle should be a button, not a span. Button would have native keyboard support.

Controls

  • From previous dropdown-menu-toggle should be a button, not a span.

Skip Links

  • Pass
  • Note that in IE11 skip link is broken, that's why we usually use skip-link-focus.js fix.

Forms

  • There are no labels in the comment form. Labels can be visually hidden, see examples.

Headings

  • No big issues but widget titles should probably be h2, not h4. Now heading hierarchy skips heading levels from h1 or h2 to h4.

ARIA Landmark Roles

  • All content should be inside main elements. For example footer widgets are not inside footer.
  • Even if we removed ARIA landmark roles we might add them back in due to recent changes. See ARIA landmark roles section.

Link Text

Contrasts

  • Pass. At least I couldn't find any big issues:)

Images

  • Feature image on blog archives should have alt attribute, not title attribute.

Screen Reader Text

Undefined index notices

I'm getting a number of "undefined index" error notices which seem to be generated by the generate_get_setting() function:

[05-Feb-2018 00:42:43 UTC] PHP Notice: Undefined index: dynamic_css_cache in ....\wp-content\themes\generatepress\inc\theme-functions.php on line 28

[05-Feb-2018 00:42:46 UTC] PHP Notice: Undefined index: dynamic_css_cache in ....\wp-content\themes\generatepress\inc\theme-functions.php on line 28

[05-Feb-2018 00:42:46 UTC] PHP Notice: Undefined index: font_awesome_essentials in ....\wp-content\themes\generatepress\inc\theme-functions.php on line 28

[05-Feb-2018 00:42:46 UTC] PHP Notice: Undefined index: dynamic_css_cache in ....\wp-content\themes\generatepress\inc\theme-functions.php on line 28

[05-Feb-2018 00:42:47 UTC] PHP Notice: Undefined index: retina_logo in ....\wp-content\themes\generatepress\inc\theme-functions.php on line 28

[05-Feb-2018 00:42:47 UTC] PHP Notice: Undefined index: font_awesome_essentials in ....\wp-content\themes\generatepress\inc\theme-functions.php on line 28

I think this line:

return $generate_settings[$setting];

Should probably say this:

return isset($generate_settings[$setting]) ? $generate_settings[$setting] : false;

GP Premium Deactivation Function

I noticed there wasn't a deactivation function to remove it from the database. I'd also like to propose something like...

add_filter( 'plugin_action_links', 'generate_add_action_plugin', 10, 5 );
function generate_add_action_plugin( $actions, $plugin_file )
{
	static $plugin;

	if (!isset($plugin))
		$plugin = plugin_basename(__FILE__);
	if ($plugin == $plugin_file) {

		$site_link = array('support' => '<a href="https://generatepress.com/support/" target="_blank">Support</a>');
		$purchase = array( 'Purchase' => '<a href="https://generatepress.com/?ref=667" target="_blank">Purchase</a>');

		$actions = array_merge($purchase, $actions);
		$actions = array_merge($site_link, $actions);

	}

	return $actions;
}

Something like that and with assets to affiliates. I plan on forking your theme and including the plugin to go purchase.

Add linefeed ( newline) to inc/structure/header.php

add_action( 'generate_before_header', 'generate_do_skip_to_content_link', 2 );
/**
 * Add skip to content link before the header.
 *
 * @since 2.0
 */
function generate_do_skip_to_content_link() {
	printf( '<a class="screen-reader-text skip-link" href="#content" title="%1$s">%2$s</a>',
		esc_attr__( 'Skip to content', 'generatepress' ),
		esc_html__( 'Skip to content', 'generatepress' )
	);
}

Needs to output and send a linefeed so that <header id="masthead" class="site-header"> is nested below it.

GeneratePress 2.1 - rc.3

This is a beta version, so please only install on testing sites.

Download 2.1-rc.4

Updating

Themes on WordPress.org don't have an automatic updater for beta versions, so we need to do things manually.

In the Dashboard

If you'd like to update to the beta within your Dashboard, you can install this plugin: Easy Theme & Plugin Upgrades

Once installed and activated, you'll be able to upload generatepresss.zip in Appearance > Themes > Add New > Upload Theme.

The plugin will overwrite the existing version, and you'll be good to go.

Via FTP

If you're comfortable with FTP, you can simply remove the generatepress folder in wp-content/themes, and upload the unzipped generatepress folder from your beta download.

Font Awesome 5

The biggest part of this update is the upgrade to Font Awesome 5 (FA5). FA5 was a huge update on their part, but we did our best to maintain as much backward compatibility as possible for those of you using FA4 still.

By default, Font Awesome is disabled. If you had Font Awesome Essentials disabled, then Font Awesome will turn itself on for you automatically when you update to 2.1.

See my comment below on why we reverted the Font Awesome 5 upgrade.

New Icons

Instead of using Font Awesome Essentials, we bundled the necessary icons into GeneratePress by default. All of these icons have been updated to FA5 icons, which are super clean.

Fewer HTTP Requests

We were able to optimize and move things around, which resulted in 2 fewer HTTP requests. This means when you first install GeneratePress, there's only 5 HTTP requests (3 CSS, 2 JS).

Cleaner CSS

We cleaned up style.css a bit, and removed any Secondary Navigation specific CSS, which was added to GP Premium 1.6. If you're using the Secondary Navigation and don't have GPP 1.6, open a support topic and we'll provide the necessary CSS for you.

We also removed a couple wildcard selectors, which were a little greedy and causing some weirdness with some plugins. More specific selectors are now used, which will reduce conflicts.

Easier Updated Date

The updated date HTML has been moved in front of the published date HTML, which should help Google pick up on it easier. It also makes it easier to display the updated date instead of the published date.

.posted-on .updated {
    display: inline-block;
}

.posted-on .updated:before {
    content: "Last Updated ";
}

.posted-on .updated + .entry-date {
    display: none;
}

Simplified Mobile Menu CSS

The mobile menu CSS has been simplified, which will make it much easier to initiate the mobile menu at a different width than the default.

Full Changelog

2.1-rc.4

  • Fix: Navigation aria-hidden issue

2.1-rc.3

  • Fix: sfHover issue when resizing window
  • Tweak: Deprecate Font Awesome
  • Tweak: Switch back to Font Awesome 4.7
  • Tweak: Remove FA option in the Customizer if it's turned off

2.1-rc.2

  • Tweak: Keep tab focus inside navigation search when open
  • Tweak: Remove roles from sidebars
  • Tweak: Fix mobile menu JS selector

2.1-rc.1

  • New: generate_after_footer hook
  • Tweak: Move back to top button to generate_after_footer
  • Tweak: Remove focus class from menu items on click if leaving site

2.1-beta.2

  • New: generate_metabox_tabs filter
  • New: generate_fontawesome_styles filter
  • Tweak: Make button/input line height consistent with link buttons
  • Tweak: Add version to database for future migrations
  • Tweak: Split up Font Awesome files (regular, strong, brands)
  • Tweak: Reduce new icon CSS

2.1-beta.1

  • New: generate_before_comments_container hook
  • New: Structured data to comments
  • New: aria-label to sidebar navigation mobile menu
  • New: Built in font icons where necessary
  • Tweak: Update to Font Awesome 5
  • Tweak: Simplify mobile menu CSS
  • Tweak: Load updated date before published date
  • Tweak: Force array in Layout metabox to prevent PHP notices
  • Tweak: Use https for schema.org references
  • Tweak: Replace wildcard CSS selectors with specific selectors
  • Tweak: Remove list item bullets in sidebar and footer widgets only
  • Fix: Sidebar sub-menu positioning after click
  • Fix: Rare Customizer JS error related to typography
  • Fix: Various small W3 errors
  • Remove: Font Awesome Essentials HTTP request
  • Remove: dropdown.js HTTP request
  • Remove: IE6 CSS
  • Remove: Secondary navigation CSS added to GPP 1.6
  • Remove: Secondary navigation JS

.entry-content margin when title is disabled

Currently the margin is removed on pages, but sometimes it needs to be removed elsewhere (Elementor library items).

Perhaps it would be better to apply the margin to the title itself instead of the content.

Make top bar widget display:block if alone

If there's only one widget in the top bar, change it from display: inline-block to display: block;

.top-bar .inside-top-bar .widget:first-child:last-child {
    display: block
}

Needs to be testing on all alignments.

Uncaught TypeError: Cannot read property 'addEventListener' of null at back-to-top.min.js?ver=2.0.2:1

Hi,

on my page https://teutonia-grossenlueder.de there is an issue with the back-to-top button.
It is not showing the back-to-top button, though it is active.
If I check the source, I can see the following error:

Uncaught TypeError: Cannot read property 'addEventListener' of null at back-to-top.min.js?ver=2.0.2:1

for code part

e = document.querySelector(".generate-back-to-top");
        e.addEventListener("click", function(i) {
            i.preventDefault(),
            t(document.body, e.getAttribute("data-scroll-speed") || 400)
        }, !1)

Kind regards
Jo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.