Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function enigma_child_default_settings()
- {
- $wl_theme_optionss=array(
- 'blog_category'=>'',
- );
- return apply_filters( 'enigma_child_options', $wl_theme_optionss );
- }
- function enigma_child_get_options() {
- // Options API
- return wp_parse_args(
- get_option( 'enigma_child_options', array() ),
- enigma_child_default_settings()
- );
- }
- add_action('admin_menu', 'weblizar_admin_portfolio_2');
- function weblizar_admin_portfolio_2() {
- add_theme_page( 'theme', 'Slider Blog Options', 'edit_theme_options', 'theme', 'weblizar_option_panal_portfolio_2' );
- }
- function weblizar_option_panal_portfolio_2() { ?>
- <style type="text/css">
- .wrapper.sercive_second {
- padding: 20px;
- }
- .card {
- max-width: 100%;
- background-color: rgb(0, 133, 186);
- color: #fff;
- font-weight: bolder;
- }
- </style>
- <?php if(isset($_POST['save']))
- {
- $wl_theme_optionss['blog_category'] = $_POST['blog_category'];
- update_option('enigma_child_options', stripslashes_deep($wl_theme_optionss));
- }
- ?>
- <div class="wrapper sercive_second">
- <?php $wl_theme_optionss=get_option('enigma_child_options'); ?>
- <div class="block ui-tabs-panel deactive">
- <form method="post" id="second_service">
- <div class="card card-danger text-center z-depth-2 mb-1">
- <h2 style="color: #fff;font-size: 22px;"><?php _e('Slider Blog Settings','weblizar'); ?></h2>
- </div>
- <div class="section">
- <h3><?php _e('Select Blog Category','weblizar'); ?></h3>
- <?php $blog_category = $wl_theme_optionss['blog_category']; ?>
- <select name="blog_category" class="webriti_inpute" >
- <?php $categories = get_categories( array('orderby' => 'name') ); ?>
- <option value="default">Select Category</option>
- <?php foreach ( $categories as $category ) { ?>
- <option value="<?php echo esc_html( $category->slug ); ?>" <?php echo selected($blog_category, $category->slug ); ?>><?php echo esc_html( $category->name ); ?></option>
- <?php } ?>
- </select>
- <span class="explain"><?php _e('Select your Blog category.','weblizar'); ?></span>
- </div>
- <div id="button_section">
- <input class="button button-primary" name="save" type="submit" value="Save Options" >
- </div>
- </form>
- </div>
- </div>
- <?php
- }
Add Comment
Please, Sign In to add comment