Buy Pro!'; return $links; } add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'tps_accordion_prover_action_links' ); # Register Meta Boxes function custom_accordion_wordpress_filter_meta_box( $meta_boxes ) { $meta_boxes[] = array( 'id' => 'custom_accordion_wordpress_feature', 'title' => 'Accordion', 'pages' => array('accordion_tp'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array( array( 'id' => 'custom_accordion_wordpresspro_columns', 'name' => 'Accordion Item Details', 'type' => 'group', 'repeatable' => true, 'sortable' => true, 'repeatable_max' => 5, 'fields' => array( array( 'id' => 'custom_accordions_pro_title', 'name' => 'Accordion Title', 'type' => 'text', 'cols' => 4 ), array( 'id' => 'custom_accordions_pro_details', 'name' => 'Description', 'type' => 'wysiwyg', 'sanitization_cb' => false, 'options' => array( 'textarea_rows' => 8, ), 'default' => 'Insert Your Description Here?', ), ) ) ) ); return $meta_boxes; } add_filter( 'cmb_meta_boxes', 'custom_accordion_wordpress_filter_meta_box' ); # Accordion Custom Title Filter function custom_accordion_wordpress_title( $title ){ $screen = get_current_screen(); if ( 'accordion_tp' == $screen->post_type ) { $title = 'Accordion Group Title'; } return $title; } add_filter( 'enter_title_here', 'custom_accordion_wordpress_title' ); function custom_accordion_free_redirect_options_page( $plugin ) { if ( $plugin == plugin_basename( __FILE__ ) ) { exit( wp_redirect( admin_url( 'options-general.php' ) ) ); } } add_action( 'activated_plugin', 'custom_accordion_free_redirect_options_page' ); # admin menu function custom_accordion_free_plugins_options_framwrork() { add_options_page( 'Accordion Pro Version Help & Features', '', 'manage_options', 'accordion-free-features', 'tp_accordions_frees_options_framework' ); } add_action( 'admin_menu', 'custom_accordion_free_plugins_options_framwrork' ); if ( is_admin() ) : // Load only if we are viewing an admin page function tp_accordions_options_framework_settings() { // Register settings and call sanitation functions register_setting( 'accordion_free_options', 'tp_accordion_free_options', 'tpls_accordion_free_options' ); } add_action( 'admin_init', 'tp_accordions_options_framework_settings' ); function tp_accordions_frees_options_framework() { if ( ! isset( $_REQUEST['updated'] ) ) { $_REQUEST['updated'] = false; } ?>