Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9.2 release #95

Merged
merged 33 commits into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
64c9c8e
WP-276 add bottom margin to search result pagination
johnpaulbalagolan Jul 22, 2022
e752d4b
Merge pull request #83 from navnorth/WP-276
johnpaulbalagolan Jul 22, 2022
0261d6c
WP-282 delete second author meta fields when the delete author is cli…
johnpaulbalagolan Aug 18, 2022
533a486
Merge pull request #84 from navnorth/WP-282
johnpaulbalagolan Aug 18, 2022
43b4dd3
WP-271 fix "See More" button showing up even no more fields need to b…
johnpaulbalagolan Aug 19, 2022
af0cbb6
WP-273 move validation to display more fields on each single resource…
johnpaulbalagolan Aug 19, 2022
e6e3252
Merge pull request #85 from navnorth/WP-273
johnpaulbalagolan Aug 20, 2022
d3498f2
WP-274 change data-toggle to data-bs-toggle attribute for collapsible…
johnpaulbalagolan Aug 20, 2022
0a3314b
Merge branch 'stage' of https://github.com/navnorth/wp-oer into WP-274
johnpaulbalagolan Aug 20, 2022
ffcbcec
Merge pull request #86 from navnorth/WP-274
johnpaulbalagolan Aug 22, 2022
f47642c
WP-275 fix arrow icon misalignment on subjects display
johnpaulbalagolan Aug 22, 2022
a03a329
Merge pull request #87 from navnorth/WP-275
johnpaulbalagolan Aug 22, 2022
ad9b7af
WP-280 fix read more button on more fields section redirecting to 404…
johnpaulbalagolan Aug 22, 2022
1b5d2b3
Merge pull request #88 from navnorth/WP-280
johnpaulbalagolan Aug 22, 2022
6892610
WP-281 fix selected substandards not displaying when editing a resource
johnpaulbalagolan Aug 25, 2022
f118194
Merge pull request #89 from navnorth/WP-281
johnpaulbalagolan Aug 25, 2022
1ac32cf
WP-271 fix filter button dropdown not working when clicked
johnpaulbalagolan Aug 26, 2022
a2fe38c
Merge pull request #90 from navnorth/WP-271
johnpaulbalagolan Aug 26, 2022
ac249a2
WP-279 add debugging to check if core/editor is present
johnpaulbalagolan Aug 26, 2022
745e83d
WP-279 add checking if core/editor is loaded on subscribe wrapper
johnpaulbalagolan Aug 26, 2022
93177be
Merge pull request #91 from navnorth/WP-279
johnpaulbalagolan Aug 26, 2022
d8a0620
WP-273 fix expand/collapse of "See More" button on resource page
johnpaulbalagolan Aug 30, 2022
6baf8dc
Merge pull request #92 from navnorth/WP-273
johnpaulbalagolan Aug 30, 2022
22cba5a
WP-274 fixed standards collapsible content on resource page
johnpaulbalagolan Aug 30, 2022
108e2d3
Merge pull request #93 from navnorth/WP-274
johnpaulbalagolan Aug 30, 2022
c0ad5c0
WP-286 fix overlapping text on settings and import page including sta…
johnpaulbalagolan Sep 19, 2022
6c0a629
WP-286 fix SLL collection not loading on the frontend
johnpaulbalagolan Sep 20, 2022
d5038da
WP-286 fix block display of resource without selected subject areas
johnpaulbalagolan Sep 21, 2022
e30316f
WP-286 fix subject resources block sorting
johnpaulbalagolan Sep 21, 2022
a519225
Merge pull request #94 from navnorth/WP-286
johnpaulbalagolan Sep 21, 2022
733e22b
WP-286 updated readme with tested up to 6.0.2
johnpaulbalagolan Sep 21, 2022
b64c3f6
WP-287 fix featured curriculum slider display on a resource template
johnpaulbalagolan Oct 5, 2022
7c4baff
WP-290 update changelog and bump version to 0.9.2
johnpaulbalagolan Oct 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions blocks/resource-block/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,13 @@ function oer_display_resource_block( $attributes, $ajax = false ){

<?php if ($showGrades=="true"):
$grade_levels = oer_resource_block_grade_levels($resource->ID);
if ($grade_levels):
?>
<div class="oer-resource-block-grade-levels">
<strong><?php esc_html_e('Grade Levels', OER_SLUG); ?>: </strong> <?php echo esc_html($grade_levels); ?>
</div>
<?php endif; ?>
<div class="oer-resource-block-grade-levels">
<strong><?php esc_html_e('Grade Levels', OER_SLUG); ?>: </strong> <?php echo esc_html($grade_levels); ?>
</div>
<?php endif;
endif; ?>
</div>

<?php
Expand All @@ -174,12 +176,14 @@ function oer_resource_block_subjects($resource_id){
$subjects = array();
$subj_arr = get_the_terms($resource_id, 'resource-subject-area');

foreach ($subj_arr as $subj){
$subjects[] = array(
"term_id" => $subj->term_id,
"name" => $subj->name,
"term_link" => get_term_link($subj->term_id,'resource-subject-area')
);
if (is_array($subj_arr)){
foreach ($subj_arr as $subj){
$subjects[] = array(
"term_id" => $subj->term_id,
"name" => $subj->name,
"term_link" => get_term_link($subj->term_id,'resource-subject-area')
);
}
}
return $subjects;
}
Expand Down
2 changes: 1 addition & 1 deletion blocks/subject-resources-block-v2/build/style-index.css

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

6 changes: 5 additions & 1 deletion blocks/subject-resources-block-v2/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,11 @@ function oer_ajax_get_subject_resources(){
// Sanitize POST parameters
$params = array();
$params['action'] = sanitize_text_field($_POST['action']);
$params['attributes'] = $_POST['attributes'];
if (isset($_POST['attributes']))
$params['attributes'] = $_POST['attributes'];
else
$params['attributes'] = $_POST;

array_walk($params['attributes'], function(&$value, &$key){
$value['displayCount'] = sanitize_text_field($value['displayCount']);
$value['sort'] = sanitize_text_field($value['sort']);
Expand Down
11 changes: 6 additions & 5 deletions css/back_styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ ul.oer_slctstandard > li
border: 1px solid #cccccc;
padding-left: 10px;
}
.oer-plugin-footer { margin:10px 0 0; }
.oer-plugin-info { display:inline-block; }
.oer-plugin-link { display:inline-block; margin-left:10px; }
.oer-plugin-footer { margin:10px 0 0; font-size:0.9em; }
.oer-plugin-info { display:inline-block; width: 49%; }
.oer-plugin-link { display:inline-block; margin-left:10px; width:48%; text-align:right; }
.clear { clear:both; }
#col-standards-left { width:40%; float:left; }
#col-standards-left .oer_pargrph { width:auto; float:none; }
Expand All @@ -221,8 +221,9 @@ ul.oer_slctstandard > li
.oer-plugin-row:first-child, .oer-import-row:first-child { padding:15px 15px 0; }
.oer-import-row:first-child { padding:10px 0 0; }
.oer-import-row { padding:0; }
.oer-plugin-row .oer-row-left, .oer-import-row .row-left { width:63%; float:left; }
.oer-plugin-row .oer-row-right, .oer-import-row .row-right { width:35%; float:right; }
.oer-import-row .row-left .fields table.form-table td label { display:inline; }
.oer-plugin-row .oer-row-left, .oer-import-row .row-left { width:68%; float:left; }
.oer-plugin-row .oer-row-right, .oer-import-row .row-right { width:30%; float:right; }
.oer-import-row .row2-left { width:85%; float:left; }
.oer-import-row .row2-right { width:13%; float:right; }
.oer-plugin-row fieldset, .oer-import-row fieldset { margin-bottom:15px; }
Expand Down
10 changes: 9 additions & 1 deletion css/front_styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ li.oer_sbstndard{
.search-results .type-resource .entry-header h2.entry-title { margin-bottom:0; }
.search-results .type-resource .entry-header h5.post-meta { margin-bottom:1.05em; }
.search-results .type-resource .entry-header h5.post-meta .post-meta-box { margin-right:15px; }
.search-results #content #posts-container .pagination { margin-bottom:20px; }
article.oer_sngl_resource_wrapper div#sngl-resource header.entry-header h1.entry-title {font-size: 20px; line-height: 30px;}
.oer-standards #content, .standards-template #content,
.substandards-template #content, .notation-template #content { width:100%; }
Expand Down Expand Up @@ -659,4 +660,11 @@ div#oer_related_resources_list label input {
.twenty-thirteen .wp-block-wp-oer-plugin-wp-oer-subjects-index .oer-cntnr .oer-ctgry-cntnr .oer_snglctwpr .oer-cat-div .oer-cat-txt-btm-cntnr ul li span:last-child { position:absolute; top:0; right:0; }
.twenty-twelve .wp-block-wp-oer-plugin-wp-oer-subjects-index .oer-cntnr .oer-ctgry-cntnr .oer_snglctwpr .oer-cat-div .oer-cat-txt-btm-cntnr ul li { margin-top:35px; margin-left:0; }
.twenty-twelve .wp-block-wp-oer-plugin-wp-oer-subjects-index .oer-cntnr .oer-ctgry-cntnr .oer_snglctwpr .oer-cat-div .oer-cat-txt-btm-cntnr ul li .oer-mne-sbjct-ttl { width:45%; }
.oer-subject-resources-list .oer-snglrsrc .oer-snglttldscrght .tagcloud span { margin:10px 0; }
.oer-subject-resources-list .oer-snglrsrc .oer-snglttldscrght .tagcloud span { margin:10px 0; }
.tc-oer-subject-areas-list li.lp-subject-hidden i {
display: inline-flex;
flex-direction: column;
justify-content: center;
margin-left: 3px;
margin-right: 3px;
}
1 change: 1 addition & 0 deletions css/resource-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ p.center { text-align:center; }
.oer-lp-full-content {
display: none;
}
.oer-lp-full-content .bx-wrapper.mobile .featuredwpr_bxslider li { width:375px !important; }
.oer-lp-full-content pre {
white-space: normal !important;
}
Expand Down
6 changes: 3 additions & 3 deletions includes/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
</div>
</div>
</div><!-- /.wrap -->
<div class="plugin-footer">
<div class="plugin-info"><?php echo OER_ADMIN_PLUGIN_NAME . " " . OER_VERSION .""; ?></div>
<div class="plugin-link"><a href="<?php echo esc_url('https://www.wp-oer.com/') ?>" target="_blank"><?php esc_html_e("More Information", OER_SLUG); ?></a></div>
<div class="oer-plugin-footer">
<div class="oer-plugin-info"><?php echo OER_ADMIN_PLUGIN_NAME . " " . OER_VERSION .""; ?></div>
<div class="oer-plugin-link"><a href="<?php echo esc_url('https://www.wp-oer.com/') ?>" target="_blank"><?php esc_html_e("More Information", OER_SLUG); ?></a></div>
<div class="clear"></div>
</div>
<?php oer_display_loader(); ?>
29 changes: 20 additions & 9 deletions includes/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,17 +385,16 @@ function oer_update_subject_area_meta( $term_id, $tt_id ){
function oer_save_customfields()
{
global $post, $wpdb, $_oer_prefix;

//Check first if screenshot is enabled
$screenshot_enabled = get_option( 'oer_enable_screenshot' );
$external_screenshot = get_option('oer_external_screenshots');

//Check first if $post is not empty
if ($post) {
if($post->post_type == 'resource')
{
if (isset($_GET['action']) && (sanitize_text_field($_GET['action'])=="trash" || sanitize_text_field($_GET['action'])=="untrash")){
return;
if($post->post_type == 'resource'){
if (isset($_GET['action']) && (sanitize_text_field($_GET['action'])=="trash" || sanitize_text_field($_GET['action'])=="untrash")){
return;
}
if (!isset($_POST['oer_metabox_nonce_field']) || !wp_verify_nonce( $_POST['oer_metabox_nonce_field'], 'oer_metabox_action' )) {
wp_die('Nonce verification failed');
Expand Down Expand Up @@ -427,20 +426,20 @@ function oer_save_customfields()
{
update_post_meta( $post->ID , 'oer_grade' , '');
}

// Save Age Levels
// Save Age Levels
if(isset($_POST['oer_age_levels']))
{
update_post_meta( $post->ID , 'oer_age_levels' , sanitize_text_field($_POST['oer_age_levels']));
}

// Save Instructional Time
// Save Instructional Time
if(isset($_POST['oer_instructional_time']))
{
update_post_meta( $post->ID , 'oer_instructional_time' , sanitize_text_field($_POST['oer_instructional_time']));
}

// Save Creative Commons License
// Save Creative Commons License
if(isset($_POST['oer_creativecommons_license']))
{
update_post_meta( $post->ID , 'oer_creativecommons_license' , sanitize_text_field($_POST['oer_creativecommons_license']));
Expand Down Expand Up @@ -558,11 +557,17 @@ function oer_save_customfields()
if(isset($_POST['oer_authortype2']))
{
update_post_meta( $post->ID , 'oer_authortype2' , sanitize_text_field($_POST['oer_authortype2']));
} else {
if (get_post_meta($post->ID, 'oer_authortype2'))
delete_post_meta($post->ID, 'oer_authortype2');
}

if(isset($_POST['oer_authorname2']))
{
update_post_meta( $post->ID , 'oer_authorname2' , sanitize_text_field($_POST['oer_authorname2']));
} else {
if (get_post_meta($post->ID, 'oer_authorname2'))
delete_post_meta($post->ID, 'oer_authorname2');
}

if(isset($_POST['oer_authorurl2']))
Expand All @@ -576,11 +581,17 @@ function oer_save_customfields()
}
}
update_post_meta( $post->ID , 'oer_authorurl2' , $oer_authorurl2);
} else {
if (get_post_meta($post->ID, 'oer_authorurl2'))
delete_post_meta($post->ID, 'oer_authorurl2');
}

if(isset($_POST['oer_authoremail2']))
{
update_post_meta( $post->ID , 'oer_authoremail2' , sanitize_email($_POST['oer_authoremail2']));
} else {
if (get_post_meta($post->ID, 'oer_authoremail2'))
delete_post_meta($post->ID, 'oer_authoremail2');
}

if(isset($_POST['oer_publishername']))
Expand Down
Loading