Changeset 3304643
- Timestamp:
- 06/02/2025 06:03:00 AM (10 months ago)
- Location:
- radas/trunk
- Files:
-
- 7 edited
-
admin/option-page.php (modified) (1 diff)
-
admin/rest/cpt/rest-option-page.php (modified) (1 diff)
-
inc/functions.php (modified) (2 diffs)
-
lib/helper/breadcrumb.php (modified) (3 diffs)
-
lib/helper/option.php (modified) (2 diffs)
-
radas.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
radas/trunk/admin/option-page.php
r3304101 r3304643 441 441 } 442 442 443 public function delete(){ 444 $deleted = false; 445 446 if( $this->page && get_option($this->page['slug']) && !delete_option($this->page['slug'])){ 447 $deleted = true; 448 } 449 450 if ($deleted && $this->is_wpml_active){ 443 public function delete(){ 444 if( $this->page && get_option($this->page['slug']) ){ 445 delete_option($this->page['slug']); 446 } 447 448 if ($this->is_wpml_active){ 451 449 $package = $this->get_wpml_package_kind(); 452 450 do_action( 'wpml_delete_package', $package['name'], $package['kind'] ); 453 451 } 454 452 455 return $deleted;453 return true; 456 454 } 457 455 } -
radas/trunk/admin/rest/cpt/rest-option-page.php
r3304101 r3304643 265 265 266 266 // refresh instance 267 Option::delete_instance_by_id($id); 268 Option::get_instance_by_id($id); 267 Option::refresh_instance_by_id($id); 269 268 270 269 return Util::rest_response( -
radas/trunk/inc/functions.php
r3304101 r3304643 1 1 <?php 2 2 3 use Radas\Lib\Helper\Breadcrumb; 3 4 use Radas\Lib\Helper\Option; 4 5 … … 14 15 } 15 16 } 17 18 add_shortcode( 'radas-breadcrumbs', function($atts){ 19 $atts = shortcode_atts( array( 20 'home_text' => null, 21 'separator' => null, 22 ), $atts, 'radas-breadcrumbs' ); 23 24 return Breadcrumb::get_breadcrumb( Breadcrumb::get_radas_breadcrumb_list( $atts['home_text'] ), $atts['separator'] ); 25 }); -
radas/trunk/lib/helper/breadcrumb.php
r3304101 r3304643 9 9 */ 10 10 class Breadcrumb { 11 public static function get_breadcrumb(array $breadcrumbs, $ home_text = null, $separator = null, $breadcrumb_list_div=true){11 public static function get_breadcrumb(array $breadcrumbs, $separator = null){ 12 12 $separator = $separator ?? "»"; 13 13 $separator = ' <span class="separator">' . esc_html($separator) . '</span> '; … … 16 16 $last = array_key_last($breadcrumbs); 17 17 18 $output =''; 19 20 if($breadcrumb_list_div){ 21 $output .= '<div itemscope itemtype="http://schema.org/BreadcrumbList" class="breadcrumbs bde-breadcrumbs" aria-label="breadcrumb">'; 22 } 23 24 $output .= "<span>"; 25 18 $output = '<div itemscope itemtype="http://schema.org/BreadcrumbList" class="rds-breadcrumbs" aria-label="breadcrumb"><span>'; 26 19 foreach($breadcrumbs as $i => $breadcrumb){ 27 20 $output .= '<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">'; … … 51 44 52 45 } 53 $output .= '</span>'; 54 55 if($breadcrumb_list_div){ 56 $output .= '</div>'; 57 } 46 $output .= '</span></div>'; 58 47 59 48 return $output; -
radas/trunk/lib/helper/option.php
r3304101 r3304643 57 57 $page = json_decode( get_post_meta( $post_id, 'op_json', true ), true ); 58 58 return self::delete_instance($page); 59 60 59 } 61 60 … … 68 67 return Instance::get_with_param(Option_Page::class, $slug, []); 69 68 } 69 70 public static function refresh_instance_by_id($post_id){ 71 self::delete_instance_by_id($post_id); 72 self::get_instance_by_id($post_id); 73 } 70 74 } -
radas/trunk/radas.php
r3304150 r3304643 4 4 * Plugin URI: https://wpradas.com 5 5 * Description: The Lightweight WordPress Plugin for Effortless Options Page Creation 6 * Version: 0.2. 46 * Version: 0.2.5 7 7 * Requires at least: 6.5 8 8 * Requires PHP: 8.0 -
radas/trunk/readme.txt
r3304150 r3304643 5 5 Requires at least: 6.5 6 6 Tested up to: 6.8.1 7 Stable tag: 0.2. 47 Stable tag: 0.2.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 42 42 * On-the-Go Management: Manage your options pages from anywhere, providing you with the flexibility and convenience to update your site on the move. 43 43 44 44 45 == Installation == 45 46 … … 70 71 71 72 == Changelog == 73 = 0.2.5 = 74 75 * Add radas-breadcrumbs shortcode 76 * Fix options page deletion 77 72 78 = 0.2.4 = 73 79
Note: See TracChangeset
for help on using the changeset viewer.