├── templates
├── talk-plugin.php
├── talk-footer.php
├── archive.php
├── talk-header.php
├── signup.php
├── user-infos.php
├── talk-entry.php
├── talk-form.php
├── talk-loop.php
├── user-profile.php
└── user-comments.php
├── includes
├── comments
│ ├── classes.php
│ ├── wordcamp-talks-loop-comments.php
│ ├── functions.php
│ ├── tags.php
│ └── wordcamp-talks-comments.php
├── core
│ ├── status
│ │ ├── view.php
│ │ ├── controller.php
│ │ ├── views
│ │ │ ├── posts-list.php
│ │ │ └── publish-box.php
│ │ ├── post-status.php
│ │ └── taxonomy.php
│ ├── classes.php
│ ├── poststatus.php
│ ├── upgrade.php
│ ├── actions.php
│ ├── rewrites.php
│ ├── filters.php
│ ├── widgets.php
│ ├── wordcamp-talks-template-loader.php
│ ├── wordcamp-talks-rewrites.php
│ ├── wordcamp-talks-loop.php
│ ├── options.php
│ └── capabilities.php
├── talks
│ ├── wordcamp-talks-loop-talks.php
│ ├── wordcamp-talk-metas.php
│ └── wordcamp-talks-talk.php
├── users
│ └── tags.php
├── wordcamp-talks.php
└── admin
│ └── comments.php
├── wordcamp-talks.php
├── js
├── script.min.js
├── script.js
├── tagging.min.js
└── jquery.raty.min.js
└── README.md
/templates/talk-plugin.php:
--------------------------------------------------------------------------------
1 |
11 |
19 |
20 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/includes/core/status/controller.php:
--------------------------------------------------------------------------------
1 | post_status = $post_status;
22 | $this->taxonomy = $taxonomy;
23 | $this->view = $view;
24 | }
25 |
26 | /**
27 | * After the object is created, this tells it to start doing work
28 | *
29 | * @return void
30 | */
31 | public function run() {
32 | $this->post_status->run();
33 | $this->taxonomy->run();
34 | $this->view->run();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/includes/core/status/views/posts-list.php:
--------------------------------------------------------------------------------
1 | post_type ) {
38 | return false;
39 | }
40 | return $post_states;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/templates/talk-form.php:
--------------------------------------------------------------------------------
1 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/includes/core/poststatus.php:
--------------------------------------------------------------------------------
1 | statuses ) ) {
22 | $wct->statuses = new self;
23 | }
24 |
25 | return $wct->statuses;
26 | }
27 |
28 | public function __construct() {
29 | // register the various hooks
30 | add_action( 'admin_head-post-new.php', array( $this, 'set_publishing_actions' ) );
31 | add_action( 'pre_get_posts', array( $this, 'filter_talks' ) );
32 | }
33 |
34 | /**
35 | * Filter which talks are seen by who
36 | *
37 | * @param \WP_Query $q the query being filtered
38 | * @return void nothing, the query is passed by reference
39 | */
40 | function filter_talks( \WP_Query $q ) {
41 | if ( 'talks' === $q->get( 'post_type' ) ) {
42 | /**
43 | * logged out users should only be able to see those talks that have been picked
44 | */
45 | if ( ! is_user_logged_in() ) {
46 | // logged out users shouldn't be able to see any of these,
47 | // that's what sessions are for
48 | $q->set( 'post__in', [ 0 ] );
49 | return;
50 | }
51 |
52 | // are we on the frontend?
53 | if ( ! is_admin() ) {
54 | /**
55 | * This use is either a speaker or someone selecting, so show more post statuses.
56 | * We wouldn't want to do this in the admin area, else trashed posts and
57 | * published/private posts would be impossible to see, which would be difficult
58 | * to debug
59 | */
60 | $q->set( 'post_status', array( 'private' ) );
61 | }
62 |
63 | // If the user cannot select talks, they must be a speaker, only show talks belonging to them
64 | if ( ! wct_user_can( 'list_all_talks' ) ) {
65 | $q->set( 'author', get_current_user_id() );
66 | }
67 | }
68 | }
69 | }
70 | endif;
71 |
--------------------------------------------------------------------------------
/templates/user-comments.php:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
28 |
29 |
64 |
65 |
80 |
81 |
82 |
83 |
84 |
85 |