tabs[$this->general_settings_key] = __('Settings'); register_setting( $this->general_settings_key, 'archivesCalendar', 'archivesCalendar_options_validate' ); add_settings_section( 'section_general', '', 'archivesCalendar_options', $this->general_settings_key ); } function register_advanced_settings() { $this->tabs[$this->advanced_settings_key] = __('Customize'); register_setting( $this->advanced_settings_key, 'archivesCalendarThemer', 'archivesCalendar_themer_validate' ); add_settings_section( 'section_themer', '', 'archivesCalendar_themer', $this->advanced_settings_key ); } function add_admin_menus() { global $archivesCalendar_options; $arcw_page = add_options_page('Archives Calendar Settings', 'Archives Calendar', 'manage_options', $this->plugin_options_key, array( &$this, 'archives_calendar_options_page' )); remove_submenu_page( 'options-general.php', 'archives_calendar_editor' ); if($archivesCalendar_options['show_settings'] == 0) remove_submenu_page( 'options-general.php', 'archives_calendar' ); add_action('admin_print_scripts-'.$arcw_page, 'arcw_admin_scripts'); } function archives_calendar_options_page() { $tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->general_settings_key; ?>

Archives Calendar Widget

tabs(); ?>
general_settings_key; echo ''; } }; add_action( 'plugins_loaded', create_function( '', '$settings_api_tabs_demo_plugin = new Archives_Calendar_Widget_Settings;' ) ); function arcw_admin_scripts() { wp_enqueue_script( 'accordion' ); wp_enqueue_script( 'wp-color-picker' ); wp_enqueue_style( 'customize-controls'); wp_enqueue_style( 'customize-widgets' ); wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_script( 'arcw-themer', plugins_url( '/admin/js/themer.min.js' , __FILE__ ), array( 'jquery' ) ); wp_enqueue_script( 'arcw-admin', plugins_url( '/admin/js/admin.min.js' , __FILE__ ), array( 'jquery' ) ); wp_register_style( 'acwr-themer-style', plugins_url('/admin/css/style.css', __FILE__) ); wp_enqueue_style( 'acwr-themer-style' ); } function archivesCalendar_options_validate($args) { if(!isset($args['show_settings'])) $args['show_settings'] = 0; else $args['show_settings'] = 1; if(!isset($args['css'])) $args['css'] = 0; else $args['css'] = 1; if(!isset($args['theme'])) $args['theme'] = "default"; if(!isset($args['jquery'])) $args['jquery'] = 0; else $args['jquery'] = 1; if(!isset($args['js'])) $args['js'] = 0; else $args['js'] = 1; if(!isset($args['shortcode'])) $args['shortcode'] = 0; else $args['shortcode'] = 1; if(!isset($args['javascript']) || $args['javascript'] == "" ) $args['javascript'] = "jQuery(document).ready(function($){\n\t$('.calendar-archives').archivesCW();\n});"; return $args; } function archivesCalendar_options() { global $archivesCalendar_options; $options = $archivesCalendar_options; $theme = $options['theme']; add_thickbox(); ?>

/>
It\'s recommended to copy the CSS code to your theme´s style.css and uncheck this option.', 'arwloc' ); ?>

: 'archivesCalendar[theme]', 'class' => 'theme_select', 'show_current' => true) ); ?>
NOTE: if you have modified any plugin's CSS file it will be restored on next plugin update.", 'arwloc' ); ?>


/>
jQuery library is required.', 'arwloc');?>

/>
. Uncheck only if you copy this code into your default .js file.', 'arwloc'); ?>



/>

[arcalendar next_text=">" prev_text="<" post_count="true" month_view="false"]


/>


item; $count = count($items); //echo $count; //} //else $count = 0; if($count > 0): ?>

RSS feed

pubDate); echo '

'; echo ''; echo ''.$item->title.''; echo '

'; } $i++; } if($count > 3){ $cat_url = 'http://labs.alek.be/category/archives-calendar/'; echo '

'; echo ''. __('More') .' ...'; echo '

'; } if($count <= 0) _e( 'No posts', 'arwloc' ); ?>


alek on GitHub alek´ on WordPress My blog alek´ portfolio


support my work, buy me a beer or a coffee. Click Donate and specify your amount.', 'arwloc');?>

Donate

null, 'id' => null, 'class' => null, 'show_current' => false ); $args = wp_parse_args( (array) $args, $defaults ); extract($args); echo ''; foreach($themes as $key=>$value) { if($archivesCalendar_options['theme'] != $key || $show_current) echo ''; } if( $custom = get_option( 'archivesCalendarThemer' )) { $i = 1; foreach ( $custom as $filename => $css ) { if ( $css ) { echo ''; $i ++; } } } echo ''; } /***** Walker for categories checkboxes *****/ class acw_Walker_Category_Checklist extends Walker { var $tree_type = 'category'; var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); var $conf; function __construct($conf) { $this->conf = $conf; } function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); $output .= "$indent\n"; } function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { extract($args); $conf = $this->conf; if ( empty($taxonomy) ) $taxonomy = 'category'; if ( $taxonomy == 'category' ) $name = 'post_category'; else $name = 'tax_input['.$taxonomy.']'; $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; /** This filter is documented in wp-includes/category-template.php */ $output .= "\n
  • " . ''; } function end_el( &$output, $category, $depth = 0, $args = array() ) { $output .= "
  • \n"; } } /***** CHECKBOXES CHECK *****/ function ac_checked($option, $value = 1) { $options = get_option('archivesCalendar'); if($options[$option] == $value) echo 'checked="checked"'; }