Skip to content

Commit

Permalink
Mesh Template Taxonomy exclusion for Yoast Sitemaps
Browse files Browse the repository at this point in the history
Fixed an issue with interchange not working properly with Foundation 6
Fixed an issue where the background would pull in FULL instead of a custom size.
ci skip
  • Loading branch information
aaronware committed Nov 16, 2016
1 parent 5a6cf69 commit bccce08
Show file tree
Hide file tree
Showing 14 changed files with 668 additions and 353 deletions.
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,12 @@
##Change Log For Mesh

## [1.1.3] - 2016-11-09

### Added
- Exclude mesh template taxonomies from being added to the WordPress SEO sitemap.xml

### Added
- Equalizer minimum breakpoint support for Foundation 6

## [1.1.2] - 2016-11-07

Expand Down
20 changes: 11 additions & 9 deletions README.md
Expand Up @@ -54,17 +54,19 @@ function add_multiple_content_sections( $the_content ) {
```

#### Available Filters

* `apply_filters( 'mesh_content_css', get_stylesheet_directory_uri() . '/css/admin-editor.css' , 'editor_path' ),`
* `apply_filters( 'mesh_section_templates', $section_templates );`
* `apply_filters( 'mesh_tabs', $tabs );`
* `apply_filters( 'mesh_css_mode', $css_mode );` Allow filtering of available css_mode options
* `apply_filters( 'mesh_allowed_html', array_merge_recursive( $post_allowed, $mesh_allowed );` Filter allowed HTML within Mesh
* `apply_filters( 'mesh_admin_pointers-' . $screen_id, array() );`
* `add_filter( 'mesh_content_css', get_stylesheet_directory_uri() . '/css/admin-editor.css' , 'editor_path' ),`
* `add_filter( 'mesh_section_templates', $section_templates );`
* `add_filter( 'mesh_tabs', $tabs );`
* `add_filter( 'mesh_css_mode', $css_mode );` Allow filtering of available css_mode options
* `add_filter( 'mesh_allowed_html', array_merge_recursive( $post_allowed, $mesh_allowed );` Filter allowed HTML within Mesh
* `add_filter( 'mesh_admin_pointers-' . $screen_id, array() );`

##### Filters added 1.1
* `apply_filters( 'mesh_templates_per_page', 50 );`
* `apply_filters( 'mesh_loop_end', $section_html_content );`
* `add_filter( 'mesh_templates_per_page', 50 );`
* `add_filter( 'mesh_loop_end', $section_html_content );`

##### Filters added 1.1.3
* `add_filter( 'mesh_default_bg_size', $size );`

### Recognition

Expand Down
31 changes: 29 additions & 2 deletions assets/js/admin-mesh-core.js
Expand Up @@ -29,7 +29,7 @@ mesh.admin = function ( $ ) {
*/
init : function() {

if ( 'post' !== mesh_data.screen && 'edit' !== mesh_data.screen ) {
if ( 'post' !== mesh_data.screen && 'edit' !== mesh_data.screen && 'settings_page_mesh' !== mesh_data.screen ) {
return;
}

Expand Down Expand Up @@ -65,7 +65,10 @@ mesh.admin = function ( $ ) {
.on('change', '.mesh-choose-layout', self.choose_layout )
.on('keypress', '.mesh-clean-edit-element', self.prevent_submit )
.on('keyup', '.mesh-clean-edit-element', self.change_input_title )
.on('change', 'select.mesh-clean-edit-element', self.change_select_title );
.on('change', 'select.mesh-clean-edit-element', self.change_select_title )

// @since 1.1.3
.on('change', '#mesh-css_mode', self.display_foundation_options );

$sections = $( '.mesh-section' );

Expand All @@ -88,6 +91,8 @@ mesh.admin = function ( $ ) {

self.setup_notifications( $meta_box_container );

self.display_foundation_options();

},

/**
Expand Down Expand Up @@ -955,6 +960,28 @@ mesh.admin = function ( $ ) {
}

$tgt.find('.inside').find( '.disabled-overlay' ).remove();
},

/**
* Allow the usage of Foundation 5 or 6 interchange
*
* @since 1.1.3
* @param event
*/
display_foundation_options : function( event ) {

var using_foundation = $('#mesh-css_mode').find('option:selected').val(),
$foundation_version = $('#mesh-foundation_version'),
$parent_row = $foundation_version.closest('tr');

console.log( using_foundation );

if( parseInt( using_foundation ) === 1 ) {
$parent_row.show();
} else {
$parent_row.hide();
$foundation_version.val('');
}
}
};
} ( jQuery );
Expand Down
31 changes: 29 additions & 2 deletions assets/js/admin-mesh.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/admin-mesh.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/admin-mesh.min.js

Large diffs are not rendered by default.

28 changes: 24 additions & 4 deletions class.mesh-settings.php
Expand Up @@ -91,8 +91,8 @@ public static function settings_init() {
$css_mode = array(
array( 'label' => __( 'Use Mesh CSS', 'mesh' ), 'value' => '' ),
array( 'label' => __( 'Disable Mesh CSS', 'mesh' ), 'value' => 0 ),
array( 'label' => __( 'Use Foundation w/ my theme', 'mesh' ), 'value' => 1 ),
array( 'label' => __( 'Use Bootstrap (coming soon)', 'mesh' ), 'value' => 2 ),
array( 'label' => __( 'Use Foundation built into my theme', 'mesh' ), 'value' => 1 ),
array( 'label' => __( 'Use Bootstrap', 'mesh' ), 'value' => 2 ),
);

// Allow filtering of available css_mode options.
Expand All @@ -112,6 +112,28 @@ public static function settings_init() {
)
);

// Option: Foundation Version
// Add an option for Foundation Version
// @since 1.1.3
$foundation_version = array(
array( 'label' => __( 'Foundation 5', 'mesh' ), 'value' => '' ),
array( 'label' => __( 'Foundation 6', 'mesh' ), 'value' => 6 ),
);

add_settings_field(
'foundation_version',
__( 'Foundation Version', 'mesh' ),
array( 'Mesh_Settings', 'add_select' ),
self::$settings_page,
'mesh_sections',
array(
'field' => 'foundation_version',
'label' => __( 'Foundation Version', 'mesh' ),
'description' => __( 'Choose which version of Foundation you are using. Foundation 5 and 6 have subtle yet important differences when it comes to markup for components like interchange that Mesh utilizes.', 'mesh' ),
'options' => $foundation_version,
)
);

// Add an option for each post type.
if ( $post_types = get_post_types() ) {
add_settings_section(
Expand Down Expand Up @@ -192,7 +214,6 @@ public static function add_textfield( $args ) {
<?php if ( ! empty( $args['description'] ) ) : ?>
<p class="description"><?php esc_html_e( $args['description'] ); ?></p>
<?php endif; ?>

<input type="<?php esc_attr_e( $args['type'] ); ?>" class="<?php esc_attr_e( $args['class'] ); ?>" name="mesh_settings[<?php esc_attr_e( $args['field'] ); ?>]" value="<?php esc_attr_e( $options[ $args['field'] ] ); ?>">

<?php
Expand Down Expand Up @@ -221,7 +242,6 @@ public static function add_select( $args ) {
$select_options = $args['options'];

?>

<?php if ( ! empty( $args['description'] ) ) : ?>
<p class="description"><?php esc_html_e( $args['description'] ); ?></p>
<?php endif; ?>
Expand Down

0 comments on commit bccce08

Please sign in to comment.