Changeset 237640
- Timestamp:
- 08/06/2024 08:24:28 AM (16 months ago)
- Location:
- educational-blocks/1.8
- Files:
-
- 8 edited
- 1 copied
-
. (copied) (copied from educational-blocks/1.7)
-
functions.php (modified) (4 diffs)
-
inc/customizer/customizer.css (modified) (3 diffs)
-
inc/customizer/customizer.php (modified) (4 diffs)
-
inc/dashboard/admin.js (modified) (1 diff)
-
inc/dashboard/dashboard.css (modified) (2 diffs)
-
inc/dashboard/dashboard.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
style.css (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
educational-blocks/1.8/functions.php
r229638 r237640 60 60 61 61 // Get start function 62 63 function educational_blocks_enqueue_admin_script($hook) { 64 // Admin JS 65 wp_enqueue_script('educational-blocks-admin-js', get_theme_file_uri('/inc/dashboard/admin.js'), array('jquery'), true); 66 wp_localize_script( 67 'educational-blocks-admin-js', 68 'educational_blocks', 69 array( 70 'admin_ajax' => admin_url('admin-ajax.php'), 71 'wpnonce' => wp_create_nonce('educational_blocks_dismissed_notice_nonce') 72 ) 73 ); 74 wp_enqueue_script('educational-blocks-admin-js'); 75 76 wp_localize_script( 'educational-blocks-admin-js', 'educational_blocks_scripts_localize', 77 array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) 78 ); 79 } 80 add_action('admin_enqueue_scripts', 'educational_blocks_enqueue_admin_script'); 81 82 //dismiss function 83 add_action( 'wp_ajax_educational_blocks_dismissed_notice_handler', 'educational_blocks_ajax_notice_dismiss_fuction' ); 84 85 function educational_blocks_ajax_notice_dismiss_fuction() { 86 if (!wp_verify_nonce($_POST['wpnonce'], 'educational_blocks_dismissed_notice_nonce')) { 87 exit; 88 } 89 if ( isset( $_POST['type'] ) ) { 90 $type = sanitize_text_field( wp_unslash( $_POST['type'] ) ); 91 update_option( 'dismissed-' . $type, TRUE ); 92 } 93 } 94 95 //get start box 62 96 function educational_blocks_custom_admin_notice() { 63 97 // Check if the notice is dismissed 64 if ( !get_user_meta(get_current_user_id(), 'dismissed_admin_notice', true)){98 if ( ! get_option('dismissed-get_started_notice', FALSE ) ) { 65 99 // Check if not on the theme documentation page 66 100 $educational_blocks_current_screen = get_current_screen(); … … 68 102 $educational_blocks_theme = wp_get_theme(); 69 103 ?> 70 <div class="notice notice-info is-dismissible" >104 <div class="notice notice-info is-dismissible" data-notice="get_started_notice"> 71 105 <div class="notice-div"> 72 106 <div> … … 74 108 <p><?php _e('For information and detailed instructions, check out our theme documentation.', 'educational-blocks'); ?></p> 75 109 </div> 76 <a class="button-primary" href="themes.php?page=educational-blocks-guide-page"><?php _e('Theme Documentation', 'educational-blocks'); ?></a> 110 <div class="notice-buttons-box"> 111 <a class="button-primary livedemo" href="<?php echo esc_url( EDUCATIONAL_BLOCKS_LIVE_DEMO ); ?>" target="_blank"><?php esc_html_e('Live Demo', 'educational-blocks'); ?></a> 112 <a class="button-primary buynow" href="<?php echo esc_url( EDUCATIONAL_BLOCKS_BUY_PRO ); ?>" target="_blank"><?php esc_html_e('Buy Now', 'educational-blocks'); ?></a> 113 <a class="button-primary theme-install" href="themes.php?page=educational-blocks-guide-page"><?php _e('Theme Installation', 'educational-blocks'); ?></a> 114 </div> 77 115 </div> 78 116 </div> … … 82 120 } 83 121 add_action('admin_notices', 'educational_blocks_custom_admin_notice'); 84 // Dismiss notice function 85 function educational_blocks_dismiss_admin_notice() { 86 update_user_meta(get_current_user_id(), 'dismissed_admin_notice', true); 122 123 //after switch theme 124 add_action('after_switch_theme', 'educational_blocks_after_switch_theme'); 125 function educational_blocks_after_switch_theme () { 126 update_option('dismissed-get_started_notice', FALSE ); 87 127 } 88 add_action('wp_ajax_educational_blocks_dismiss_admin_notice', 'educational_blocks_dismiss_admin_notice'); 89 // Enqueue scripts and styles 90 function educational_blocks_enqueue_admin_script($hook) { 91 // Admin JS 92 wp_enqueue_script('educational-blocks-admin.js', get_theme_file_uri('/inc/dashboard/admin.js'), array('jquery'), true); 93 94 wp_localize_script('educational-blocks-admin.js', 'educational_blocks_scripts_localize', array( 95 'ajax_url' => esc_url(admin_url('admin-ajax.php')) 96 )); 97 } 98 add_action('admin_enqueue_scripts', 'educational_blocks_enqueue_admin_script'); 99 // Reset the dismissed notice status when the theme is switched 100 function educational_blocks_after_switch_theme() { 101 delete_user_meta(get_current_user_id(), 'dismissed_admin_notice'); 102 } 103 add_action('after_switch_theme', 'educational_blocks_after_switch_theme'); 128 104 129 //get-start-function-end// 105 130 -
educational-blocks/1.8/inc/customizer/customizer.css
r229638 r237640 1 1 /*Cutomizer CSS*/ 2 2 #accordion-section-educational_blocks_pro h3.accordion-section-title{ 3 background: var(--wp--preset--color--primary);3 background: #ffbd0a; 4 4 color:#fff; 5 5 } 6 6 #customize-controls #accordion-section-educational_blocks_pro .accordion-section-title:focus, #customize-controls #accordion-section-educational_blocks_pro .accordion-section-title:hover, #customize-controls #accordion-section-educational_blocks_pro.open .accordion-section-title, #customize-controls #accordion-section-educational_blocks_pro:hover>.accordion-section-title{ 7 background: var(--wp--preset--color--primary);7 background: #ffbd0a; 8 8 color: #fff; 9 9 } … … 13 13 14 14 #customize-controls .control-section .accordion-section-title:hover,#customize-controls .control-section .accordion-section-title:focus{ 15 border-left-color: var(--wp--preset--color--primary);15 border-left-color:#ffbd0a; 16 16 } 17 17 .btn-lg, .btn-group-lg > .btn { … … 23 23 .upsell-btn > .btn-success { 24 24 color: #fff; 25 background: var(--wp--preset--color--primary);25 background: #ffbd0a; 26 26 text-decoration: none; 27 27 } -
educational-blocks/1.8/inc/customizer/customizer.php
r231826 r237640 13 13 // Pro Section 14 14 $wp_customize->add_section('educational_blocks_pro', array( 15 'title' => __('EDUCATION AL BLOCKSPREMIUM ', 'educational-blocks'),15 'title' => __('EDUCATION PREMIUM ', 'educational-blocks'), 16 16 'priority' => 1, 17 17 )); … … 21 21 )); 22 22 $wp_customize->add_control(new Educational_Blocks_Pro_Control($wp_customize, 'educational_blocks_pro', array( 23 'label' => __('EDUCATION AL BLOCKSPREMIUM', 'educational-blocks'),23 'label' => __('EDUCATION PREMIUM', 'educational-blocks'), 24 24 'section' => 'educational_blocks_pro', 25 25 'settings' => 'educational_blocks_pro', … … 39 39 <label style="overflow: hidden; zoom: 1;"> 40 40 <div class="col-md upsell-btn"> 41 <a href="<?php echo esc_url( EDUCATIONAL_BLOCKS_PRO_LINK ); ?>" target="blank" class="btn btn-success btn"><?php esc_html_e('UPGRADE EDUCATION AL BLOCKSPREMIUM ','educational-blocks');?> </a>41 <a href="<?php echo esc_url( EDUCATIONAL_BLOCKS_PRO_LINK ); ?>" target="blank" class="btn btn-success btn"><?php esc_html_e('UPGRADE EDUCATION PREMIUM ','educational-blocks');?> </a> 42 42 </div> 43 43 <div class="col-md"> … … 63 63 </div> 64 64 <div class="col-md upsell-btn upsell-btn-bottom"> 65 <a href="<?php echo esc_url( EDUCATIONAL_BLOCKS_PRO_LINK ); ?>" target="blank" class="btn btn-success btn"><?php esc_html_e('UPGRADE EDUCATION AL BLOCKSPREMIUM ','educational-blocks');?> </a>65 <a href="<?php echo esc_url( EDUCATIONAL_BLOCKS_PRO_LINK ); ?>" target="blank" class="btn btn-success btn"><?php esc_html_e('UPGRADE EDUCATION PREMIUM ','educational-blocks');?> </a> 66 66 </div> 67 67 </label> -
educational-blocks/1.8/inc/dashboard/admin.js
r221978 r237640 1 jQuery(document).ready(function($) { 2 $('.notice.is-dismissible').on('click', '.notice-dismiss', function () { 3 $.ajax({ 4 type: 'POST', 5 url: ajaxurl, 6 data: { 7 action: 'educational_blocks_dismiss_admin_notice', 8 }, 9 }); 10 }); 11 }); 1 ( function( jQuery ){ 2 jQuery( document ).on( 'click', '.notice-info .notice-dismiss', function () { 3 var type = jQuery( this ).closest( '.notice-info' ).data( 'notice' ); 4 jQuery.ajax( ajaxurl, 5 { 6 type: 'POST', 7 data: { 8 action: 'educational_blocks_dismissed_notice_handler', 9 type: type, 10 wpnonce: educational_blocks.wpnonce 11 } 12 } ); 13 } ); 14 }( jQuery ) ) -
educational-blocks/1.8/inc/dashboard/dashboard.css
r220660 r237640 40 40 text-align: right; 41 41 } 42 .wrap.getting-started .buynow {42 .wrap.getting-started .buynow,.notice-buttons-box .buynow { 43 43 background: #28a745; 44 44 border-color: #28a745; 45 45 } 46 .wrap.getting-started .livedemo {46 .wrap.getting-started .livedemo,.notice-buttons-box .livedemo { 47 47 background: #d39e00; 48 48 border-color: #d39e00; 49 49 } 50 .wrap.getting-started .docs {50 .wrap.getting-started .docs,.notice-buttons-box .theme-install { 51 51 background: #bd2130; 52 52 border-color: #bd2130; … … 69 69 } 70 70 .notice-div .button-primary{ 71 padding: 5px 10px;71 padding: 3px 15px; 72 72 } 73 74 .notice-buttons-box{ 75 display: flex; 76 justify-content: right; 77 align-items: center; 78 } 79 .notice-buttons-box .livedemo, 80 .notice-buttons-box .buynow{ 81 margin-right: 10px; 82 } 83 84 @media screen and (max-width:600px){ 85 .notice-div,.notice-buttons-box{ 86 display: block; 87 text-align: center; 88 } 89 .notice-buttons-box .theme-install{ 90 margin-top: 10px; 91 } 92 } -
educational-blocks/1.8/inc/dashboard/dashboard.php
r231826 r237640 3 3 add_action( 'admin_menu', 'educational_blocks_gettingstarted' ); 4 4 function educational_blocks_gettingstarted() { 5 add_theme_page( esc_html__('Theme Documentation', 'educational-blocks'), esc_html__('Theme Documentation', 'educational-blocks'), 'edit_theme_options', 'educational-blocks-guide-page', 'educational_blocks_guide');5 add_theme_page( esc_html__('Theme Installation', 'educational-blocks'), esc_html__('Theme Installation', 'educational-blocks'), 'edit_theme_options', 'educational-blocks-guide-page', 'educational_blocks_guide'); 6 6 } 7 7 -
educational-blocks/1.8/readme.txt
r235539 r237640 3 3 Contributors: pewilliams 4 4 Requires at least: 6.1 5 Tested up to: 6. 55 Tested up to: 6.6 6 6 Requires PHP: 5.6 7 Stable tag: 1. 77 Stable tag: 1.8 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html … … 189 189 * Added woocommerce css. 190 190 * Blog template css. 191 192 = 1.8 = 193 * Updated admin.js file. 194 * Added nonce. 195 * Updated Notice function. 196 * Added search page css. -
educational-blocks/1.8/style.css
r235539 r237640 6 6 Description: Educational Blocks is a tailored solution crafted especially for educators, schools, and educational institutions, prioritizing simplicity and accessibility in the digital realm. This theme stands out for its clean and intuitive design, providing a user-friendly platform that empowers educators to showcase educational content without the need for technical expertise. Central to the theme's appeal is its responsiveness, ensuring optimal viewing on diverse devices, ranging from desktops to tablets and smartphones. This adaptability guarantees accessibility for a broad audience, fostering an inclusive online learning environment. It is also cross-browser compatible, allowing your users to visit your website through the web browser of their choice and comfort. A notable feature of the Educational Blocks WordPress Theme is its robust customization options, allowing users to effortlessly personalize their websites. Whether highlighting courses, faculty profiles, or school events, the theme offers flexibility to create a unique and engaging online space that aligns seamlessly with the educational institution's identity. Practical functionalities include dedicated sections for course listings, events, and contact details, enhancing the overall user experience. While the theme emphasizes simplicity, it provides a valuable tool for educators seeking a professional online presence. Whether establishing connections with students or sharing educational content effectively, the Educational Blocks WordPress Theme serves as a foundational and accessible solution in the ever-evolving landscape of digital education. 7 7 Requires at least: 6.1 8 Tested up to: 6. 58 Tested up to: 6.6 9 9 Requires PHP: 5.6 10 Version: 1. 710 Version: 1.8 11 11 License: GNU General Public License 12 12 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html … … 652 652 @media screen and (max-width: 999px) and (min-width: 782px){ 653 653 .page-template-blog-right-sidebar .wp-block-post-template, 654 .page-template-blog-left-sidebar .wp-block-post-template{ 654 .page-template-blog-left-sidebar .wp-block-post-template, 655 .search-results .wp-block-post-template{ 655 656 grid-template-columns: 1fr !important; 656 657 } … … 680 681 .page-template-blog-right-sidebar .wp-block-post-template, 681 682 .page-template-blog-left-sidebar .wp-block-post-template, 682 .blog-section .wp-block-post-template{ 683 .blog-section .wp-block-post-template, 684 .search-results .wp-block-post-template{ 683 685 display: block !important; 684 686 } … … 686 688 .page-template-blog-right-sidebar .wp-block-post-template li, 687 689 .page-template-blog-left-sidebar .wp-block-post-template li, 688 .blog-section .wp-block-post-template li{ 690 .blog-section .wp-block-post-template li, 691 .search-results .wp-block-post-template li{ 689 692 margin-bottom: 30px; 690 693 } … … 692 695 .page-template-blog-right-sidebar .wp-block-post-template li:last-child, 693 696 .page-template-blog-left-sidebar .wp-block-post-template li:last-child, 694 .blog-section .wp-block-post-template li:last-child{ 697 .blog-section .wp-block-post-template li:last-child, 698 .search-results .wp-block-post-template li:last-child{ 695 699 margin-bottom: 0; 696 700 }
Note: See TracChangeset
for help on using the changeset viewer.