Changeset 2685668
- Timestamp:
- 02/27/2022 10:01:24 PM (4 years ago)
- Location:
- rimplates/trunk
- Files:
-
- 10 edited
-
README.txt (modified) (3 diffs)
-
admin/class-admin-template-settings.php (modified) (7 diffs)
-
admin/css/rimplates-admin.css (modified) (1 diff)
-
public/class-rimplates-public.php (modified) (2 diffs)
-
public/templates/default/assets/css/style.css (modified) (1 diff)
-
public/templates/default/assets/css/style4.css (modified) (5 diffs)
-
public/templates/default/footer.php (modified) (2 diffs)
-
public/templates/default/header.php (modified) (2 diffs)
-
public/templates/default/sidebar.php (modified) (1 diff)
-
rimplates.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rimplates/trunk/README.txt
r2679357 r2685668 4 4 Tags: user-dashboard, admin-dashboard, frontend-dashboard, portal-maker, user-menu, menu, admin, user, profile, templates, dashboard 5 5 Requires at least: 3.0.1 6 Tested up to: 5.9 7 Stable tag: 1.0. 46 Tested up to: 5.9.1 7 Stable tag: 1.0.5 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 62 62 == Changelog == 63 63 64 = 1.0.5 = 65 * Added Ability to change color & add html in footer copyright text. 64 66 = 1.0.4 = 65 67 * Automatically Create Page when creating Dasboard. … … 70 72 == Upgrade Notice == 71 73 74 = 1.0.5 = 75 * Ability to change template color & add html in footer copyright text. 72 76 = 1.0.4 = 73 77 * Automatically Create Page when creating Dasboard. -
rimplates/trunk/admin/class-admin-template-settings.php
r2679357 r2685668 13 13 //save meta value with save post hook when Template Settings is POSTED 14 14 add_action('save_post_rimplates', array($this,'save_settings'), 10,3 ); 15 add_action('save_rp_color_settings', array($this,'save_rp_color_settings'), 10,4 ); 15 16 16 17 } … … 27 28 function rimplates_template_register_meta_box() { 28 29 29 add_meta_box( 'rimplenet-admin-wallet-settings-meta-box', esc_html__( 'Templates Settings', 'rimplates' ), array($this,'rimplenet_admin_wallet_meta_box_callback'), 'rimplates', 'normal', 'high' ); 30 add_meta_box( 'rimplenet-admin-wallet-balance-shortcode-meta-box', esc_html__( 'Template Shortcode', 'rimplates' ), array($this,'rimplenet_admin_wallet_balance_shortcode_meta_box_callback'), 'rimplates', 'side', 'high' ); 31 32 } 33 34 function rimplenet_admin_wallet_meta_box_callback( $meta_id ) { 30 add_meta_box( 'rimplates-admin-basic-settings-meta-box', esc_html__( 'Templates Settings', 'rimplates' ), array($this,'rimplates_admin_basic_settings_meta_box_callback'), 'rimplates', 'normal', 'high' ); 31 add_meta_box( 'rimplates-admin-template-details-meta-box', esc_html__( 'Shortcode / Template Details', 'rimplates' ), array($this,'rimplates_template_details_meta_box_callback'), 'rimplates', 'side', 'high' ); 32 33 add_meta_box( 'rimplates-admin-template-color-meta-box', esc_html__( 'Color Settings', 'rimplates' ), array($this,'rimplates_template_color_meta_box_callback'), 'rimplates', 'side', 'high' ); 34 35 } 36 37 function rimplates_admin_basic_settings_meta_box_callback( $meta_id ) { 35 38 36 39 include_once plugin_dir_path( dirname( __FILE__ ) ) . '/admin/partials/metabox-template-settings.php'; … … 38 41 } 39 42 40 function rimplenet_admin_wallet_balance_shortcode_meta_box_callback($meta_id) { 43 //Color Settings Metabox Function 44 function rimplates_template_color_meta_box_callback($meta_id) { 45 46 $post_id = $meta_id->ID; 47 $template_id = $post_id; 48 $shortcode = "[rimplates-template id=$template_post_id]"; 49 50 $rp_primary_color_bg = get_post_meta($template_id, 'rp_primary_color_bg', true); 51 if(empty($rp_primary_color_bg)){ $rp_primary_color_bg = "#4463dc"; } 52 $rp_primary_color_text = get_post_meta($template_id, 'rp_primary_color_text', true); 53 if(empty($rp_primary_color_text)){ $rp_primary_color_text = "#ffffff"; } 54 55 $rp_secondary_color_bg = get_post_meta($template_id, 'rp_secondary_color_bg', true); 56 if(empty($rp_secondary_color_bg)){ $rp_secondary_color_bg = "#212529"; } 57 $rp_secondary_color_text = get_post_meta($template_id, 'rp_secondary_color_text', true); 58 if(empty($rp_secondary_color_text)){ $rp_secondary_color_text = "#ffffff"; } 59 60 61 62 ?> 63 64 <!-- Primary Colors --> 65 <div id="rimplates-primary-colors" class="rp-colors"> 66 <p> 67 <strong>Primary Colors</strong> 68 <span class="dashicons dashicons-editor-help rimplates-admin-tooltip" title="Primary color is used on the sidebar & some other places"></span> 69 </p> 70 71 <label for="rp_primary_color_bg">Background</label> 72 <input type="color" id="rp_primary_color_bg" name="rp_primary_color_bg" value="<?php echo $rp_primary_color_bg; ?>"> 73 74 <label for="rp_primary_color_text">Text</label> 75 <input type="color" id="rp_primary_color_text" name="rp_primary_color_text" value="<?php echo $rp_primary_color_text; ?>"> 76 77 </div> 78 79 <!-- Secondary Colors --> 80 <div id="rimplates-secondary-colors" class="rp-colors"> 81 <p> 82 <strong>Secondary Colors</strong> 83 <span class="dashicons dashicons-editor-help rimplates-admin-tooltip" title="Secondary color is used in footer & collapse button"></span> 84 </p> 85 86 <label for="rp_secondary_color_bg">Background</label> 87 <input type="color" id="rp_secondary_color_bg" name="rp_secondary_color_bg" value="<?php echo $rp_secondary_color_bg; ?>"> 88 89 <label for="rp_secondary_color_text">Text</label> 90 <input type="color" id="rp_secondary_color_text" name="rp_secondary_color_text" value="<?php echo $rp_secondary_color_text; ?>"> 91 92 </div> 93 94 <?php 95 //Hook for displaying rimplates color settings 96 do_action("rp_color_settings",$template_id); 97 98 } 99 100 function rimplates_template_details_meta_box_callback($meta_id) { 41 101 42 102 $post_id = $meta_id->ID; … … 64 124 65 125 } 66 126 127 128 //Save Color Settings Hook 67 129 function save_settings($post_id, $post, $update){ 68 130 $template_id = $post_id; 131 69 132 $rimplates_template = sanitize_text_field($_POST['rimplates_template']); 133 do_action("save_rp_color_settings", $template_id, $rimplates_template, $post, $update); 134 70 135 71 136 if(!empty($rimplates_template)){ … … 80 145 $rimplates_template_header_text = sanitize_text_field( $_POST['rimplates_template_header_text'] ); 81 146 82 $rimplates_template_footer_text = sanitize_text_field( $_POST['rimplates_template_footer_text'] );147 $rimplates_template_footer_text = wp_kses_post( $_POST['rimplates_template_footer_text'] ); 83 148 84 if($create_rimplate_page==true){ 85 $page_content = "[rimplates-template id=$post_id]"; 86 $args_page = array( 87 'post_title' => $post->post_title, 88 'post_content' => $page_content, 89 'post_status' => 'publish', 90 'post_type' => "page", 91 'page_template' => 'template-blank-page.php' 92 ) ; 93 $linked_rimplate_page_id = wp_insert_post($args_page); 94 } 95 else{ 96 $linked_rimplate_page_id = get_post_meta($post_id, 'linked_rimplate_page_id', true); 97 } 98 $metas = array( 149 if($create_rimplate_page==true){ 150 $page_content = "[rimplates-template id=$post_id]"; 151 $args_page = array( 152 'post_title' => $post->post_title, 153 'post_content' => $page_content, 154 'post_status' => 'publish', 155 'post_type' => "page", 156 'page_template' => 'template-blank-page.php' 157 ) ; 158 $linked_rimplate_page_id = wp_insert_post($args_page); 159 } 160 else{ 161 $linked_rimplate_page_id = get_post_meta($post_id, 'linked_rimplate_page_id', true); 162 } 163 164 $metas = array( 99 165 'template' => $template, 100 166 'linked_rimplate_page_id' => $linked_rimplate_page_id, … … 106 172 ); 107 173 108 foreach ($metas as $key => $value) {174 foreach ($metas as $key => $value) { 109 175 update_post_meta($post_id, $key, $value); 110 176 } … … 112 178 } 113 179 } 180 181 //Save Color Settings Function 182 function save_rp_color_settings($template_id, $rimplates_template, $post, $update){ 183 184 if(!empty($rimplates_template)){ 185 186 $rp_primary_color_bg = sanitize_text_field( $_POST['rp_primary_color_bg'] ); 187 $rp_primary_color_text = sanitize_text_field( $_POST['rp_primary_color_text'] ); 188 189 $rp_secondary_color_bg = sanitize_text_field( $_POST['rp_secondary_color_bg'] ); 190 $rp_secondary_color_text = sanitize_text_field( $_POST['rp_secondary_color_text'] ); 191 192 $metas = array( 193 'rp_primary_color_bg' => $rp_primary_color_bg, 194 'rp_primary_color_text' => $rp_primary_color_text, 195 'rp_secondary_color_bg' => $rp_secondary_color_bg, 196 'rp_secondary_color_text' => $rp_secondary_color_text, 197 ); 198 199 foreach ($metas as $key => $value) { 200 update_post_meta($template_id, $key, $value); 201 } 202 203 204 } 205 206 } 207 114 208 115 209 -
rimplates/trunk/admin/css/rimplates-admin.css
r2677631 r2685668 3 3 * included in this file. 4 4 */ 5 .rp-colors:nth-of-type(n+2) { 6 margin-top: 1.4rem; 7 border-top: 1px solid #ccc; 8 } -
rimplates/trunk/public/class-rimplates-public.php
r2677631 r2685668 56 56 add_action('wp', array($this, 'LoadTemplateFunctions')); 57 57 add_action('init', array($this, 'LoadTemplateServiceFunctions')); 58 58 add_action('display_rimplates_css_inline', array($this,'display_rimplates_css'), 10, 2 ); 59 } 60 61 62 public function display_rimplates_css($template_id, $user_id) { 63 64 $rp_primary_color_bg = get_post_meta($template_id,"rp_primary_color_bg",true); 65 $rp_primary_color_text = get_post_meta($template_id,"rp_primary_color_text",true); 66 $rp_secondary_color_bg = get_post_meta($template_id,"rp_secondary_color_bg",true); 67 $rp_secondary_color_text = get_post_meta($template_id,"rp_secondary_color_text",true); 68 ?> 69 <style> 70 .rp-primary{ 71 -class-pri-bg: #0076A5; 72 background:<?php echo $rp_primary_color_bg; ?>; 73 color:<?php echo $rp_primary_color_text; ?>; 74 } 75 .rp-secondary{ 76 background:<?php echo $rp_secondary_color_bg; ?>; 77 color:<?php echo $rp_secondary_color_text; ?>; 78 } 79 .rp-primary ul li a { 80 color: <?php echo $rp_primary_color_text; ?>; 81 } 82 .rp-primary ul li.active > a, .rp-primary a[aria-expanded="true"] { 83 background: <?php echo $rp_secondary_color_bg; ?>; 84 } 85 86 button.rp-secondary{ 87 background: <?php echo $rp_secondary_color_bg; ?>!important; 88 color: <?php echo $rp_secondary_color_text; ?>!important; 89 } 90 91 button.rp-secondary:hover{ 92 background:<?php echo $rp_primary_color_bg; ?>!important; 93 color:<?php echo $rp_primary_color_text; ?>!important; 94 } 95 96 button.rp-secondary:focus{ 97 box-shadow: none !important; 98 } 99 100 .copyright-rimplates { 101 background: <?php echo $rp_secondary_color_bg; ?>; 102 color: <?php echo $rp_secondary_color_text; ?>; 103 border-top: 1px solid <?php echo $rp_secondary_color_bg; ?>;; 104 } 105 106 </style> 107 108 109 <?php 110 59 111 } 60 112 … … 123 175 $template_id = "default"; 124 176 } 125 177 178 do_action("display_rimplates_css_inline", $template_id, $user_id); 126 179 127 180 $template_folder = get_post_meta($template_id, 'template',true); -
rimplates/trunk/public/templates/default/assets/css/style.css
r2677631 r2685668 130 130 131 131 .profile-bg { 132 border: 1px solid #5d7cf7;133 132 border-left: none; 134 133 border-right: none; -
rimplates/trunk/public/templates/default/assets/css/style4.css
r2677631 r2685668 82 82 min-width: 250px; 83 83 max-width: 250px; 84 background: #4c6ef5;85 color: #fff;86 84 transition: all 0.3s; 87 85 } … … 90 88 font-size: 2.3em; 91 89 letter-spacing: 3px; 92 color: #fff;90 color: inherit; 93 91 text-shadow: 2px 2px 3px #39393a; 94 92 } … … 157 155 #sidebar .sidebar-header { 158 156 padding: 20px; 159 background: #4463dc;157 background: inherit; 160 158 } 161 159 … … 175 173 letter-spacing: 0.6px; 176 174 display: block; 177 color: #fff;178 175 font-weight: 400; 179 176 } … … 192 189 #sidebar a[aria-expanded="true"] { 193 190 color: #fff; 194 background: #4463dc;195 191 } 196 192 -
rimplates/trunk/public/templates/default/footer.php
r2677631 r2685668 11 11 if(!empty($footer_copyright_text)){ 12 12 ?> 13 <div class="copyright- w3layouts py-xl-3 py-2 mt-xl-5 mt-4 text-center">13 <div class="copyright-rimplates py-xl-3 py-2 mt-xl-5 mt-4 text-center"> 14 14 <p> <?php echo do_shortcode($footer_copyright_text); ?></p> 15 15 </div> … … 22 22 23 23 (function( $ ) { 24 'use strict';25 //paste this code under head tag or in a seperate js file.26 24 'use strict'; 25 //paste this code under head tag or in a seperate js file. 26 27 27 <!-- loading-gif Js --> 28 28 // Wait for window load -
rimplates/trunk/public/templates/default/header.php
r2677631 r2685668 19 19 20 20 <div class="navbar-header"> 21 <button type="button" id="sidebarCollapse" class="btn btn-info navbar-btn">21 <button type="button" id="sidebarCollapse" class="btn navbar-btn rp-secondary"> 22 22 <i class="fas fa-bars"></i> 23 23 </button> … … 30 30 31 31 </div> 32 </nav>32 </nav> -
rimplates/trunk/public/templates/default/sidebar.php
r2678086 r2685668 24 24 ?> 25 25 26 <nav id="sidebar" class=" ">26 <nav id="sidebar" class="rp-primary"> 27 27 <div class="sidebar-header"> 28 28 <h1> -
rimplates/trunk/rimplates.php
r2679357 r2685668 17 17 * Plugin URI: https://rimplates.com 18 18 * Description: Rimplates is a dashboard maker for wordpress. Using this Plugin is simple, install it, RIMPLATES will appear on your admin dashboard menu (with ability to add / create templates, dashboard ~ it supports both admin dashboard & user dashboard). You display the created templates/dashboard with shortcode, Use shortcode [rimplenet-template id=ID], E.g if your ID is 5 , your valid shortcode will be [rimplenet-template id=5] 19 * Version: 1.0. 419 * Version: 1.0.5 20 20 * Author: rimplates 21 21 * Author URI: https://profiles.wordpress.org/rimplates/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'RIMPLATES_VERSION', '1.0. 4' );38 define( 'RIMPLATES_VERSION', '1.0.5' ); 39 39 40 40 /**
Note: See TracChangeset
for help on using the changeset viewer.