[buddypress-trac] [BuddyPress Trac] #8315: Make all admin notices dismissible
buddypress-trac
noreply at wordpress.org
Sat Jun 13 11:51:37 UTC 2020
#8315: Make all admin notices dismissible
----------------------------+----------------------
Reporter: imath | Owner: slaFFik
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: good-first-bug |
----------------------------+----------------------
Comment (by imath):
Hi @immeet94 & @misfist
Thanks for your feedbacks. I'll write a new codex page asap as I've just
noticed a tutorial to quickly get started was missing.
I've also opened this ticket #8317 which should greatly improve how to set
up a development environment for BuddyPress.
In the meantime, you can:
- install your local development environment following this
[https://make.wordpress.org/core/handbook/tutorials/installing-a-local-
server/ WordPress documentation page].
[https://make.wordpress.org/core/handbook/tutorials/installing-a-local-
server/desktopserver/ Desktop server] seems to be the easiest one to use
as it includes WordPress already (make sure to download the free
version!!).
- we are using SVN to manage our code if you don't have SVN installed,
here's
[https://make.wordpress.org/core/handbook/tutorials/installing-a-vcs/ how
to install it]. If you prefer Git, that's probably because you already
have it installed, so you can alternatively use it.
- once done, using a terminal (or Windows command line tool like
Powershell), browse to the `/wp-content/plugins` directory of your
WordPress and checkout the development version of BuddyPress:
- SVN : `svn co https://buddypress.svn.wordpress.org/trunk/ buddypress`
- or Git : `git clone git://buddypress.git.wordpress.org/ buddypress`
- Activate BuddyPress
- Using a code editor like [https://code.visualstudio.com/ VSCode] Edit
the needed files to make all admin notices dismissible. For instance, in
`src/bp-activity/bp-activity-admin.php` at line 1174: replace `<div
id="moderated" class="<?php echo ( ! empty( $_REQUEST['error'] ) ) ?
'error' : 'updated'; ?>"><p><?php echo implode( "<br/>\n", $messages );
?></p></div>` by `<div id="moderated" class="<?php echo ( ! empty(
$_REQUEST['error'] ) ) ? 'error' : 'updated'; ?> notice is-
dismissible"><p><?php echo implode( "<br/>\n", $messages ); ?></p></div>`
as to make a notice dismissible, you simply need to add these two CSS
classes `notice is-dismissible`.
- Save your edits, Test them deleting an activity from the Activity
Administration screen and if it's ok, build a patch!
- go to your terminal app into the `/wp-content/plugins/buddypress`
directory and run `svn diff > path-to-your-patch/8315.patch` if you're
using SVN or `git diff --no-prefix > path-to-your-patch/8315.patch` if
you're using Git.
- the `path-to-your-patch/8315.patch` file is the one you'll need to
upload to this ticket.
- Find the other places where BuddyPress is adding admin notices and edit
the needed files to build a more complete patch and upload it here.
Now it's your turn!
Thanks in advance.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8315#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list