' . __( 'Continued', 'pressbooks-aldine' ) . ''; } /** * Add things to the menu. * * @param string $items * @param object $args * @return string */ function adjust_menu( $items, $args ) { if ( $args->theme_location === 'primary-menu' ) { return \Aldine\Helpers\get_default_menu( $items ); } return $items; } /** * Add TinyMCE Buttons. * * @since 1.1.0 */ function add_buttons( $plugin_array ) { $assets = new Assets( 'pressbooks-aldine', 'theme' ); $assets->setSrcDirectory( 'assets' )->setDistDirectory( 'dist' ); $plugin_array['aldine_call_to_action'] = $assets->getPath( 'scripts/call-to-action.js' ); $plugin_array['aldine_page_section'] = $assets->getPath( 'scripts/page-section.js' ); return $plugin_array; } /** * Register TinyMCE Buttons. * * @since 1.1.0 */ function register_buttons( $buttons ) { $c = count( $buttons ); $i = $c - 2; $new_items = [ 'aldine_page_section', 'aldine_call_to_action' ]; array_splice( $buttons, $i, 0, $new_items ); return $buttons; }