├── .distignore
├── .github
└── workflows
│ └── wordpress.yml
├── .gitignore
├── .idea
├── copyright
│ └── profiles_settings.xml
├── misc.xml
├── modules.xml
├── posts-to-posts.iml
└── vcs.xml
├── .wordpress-org
├── banner-772x250.jpg
├── screenshot-1.png
├── screenshot-2.png
├── screenshot-3.png
├── screenshot-4.png
└── screenshot-5.png
├── CONTRIBUTING.md
├── admin
├── box-factory.php
├── box.css
├── box.js
├── box.php
├── column-factory.php
├── column-post.php
├── column-user.php
├── column.php
├── dropdown-factory.php
├── dropdown-post.php
├── dropdown-user.php
├── dropdown.php
├── factory.php
├── field-delete.php
├── field-generic.php
├── field-order.php
├── field-title-attachment.php
├── field-title-post.php
├── field-title-user.php
├── field-title.php
├── field.php
├── images
│ ├── minus.png
│ ├── plus.png
│ └── sort.png
├── mustache.js
├── mustache.php
├── templates
│ ├── box.html
│ ├── column-create.html
│ ├── column-delete-all.html
│ ├── column-delete.html
│ ├── column-title.html
│ ├── connection-types-form.html
│ ├── connection-types.html
│ ├── tab-create-post.html
│ ├── tab-list.html
│ ├── tab-search.html
│ └── table-row.html
├── tools-page.php
└── tools.css
├── command.php
├── composer.json
├── debug-utils.php
├── lang
├── posts-to-posts-da_DK.mo
├── posts-to-posts-da_DK.po
├── posts-to-posts-de_DE.mo
├── posts-to-posts-de_DE.po
├── posts-to-posts-es_ES.mo
├── posts-to-posts-es_ES.po
├── posts-to-posts-et_EE.mo
├── posts-to-posts-et_EE.po
├── posts-to-posts-fa_IR.mo
├── posts-to-posts-fa_IR.po
├── posts-to-posts-fi.mo
├── posts-to-posts-fi.po
├── posts-to-posts-fr_FR.mo
├── posts-to-posts-fr_FR.po
├── posts-to-posts-hr.mo
├── posts-to-posts-hr.po
├── posts-to-posts-it_IT.mo
├── posts-to-posts-it_IT.po
├── posts-to-posts-ja.mo
├── posts-to-posts-ja.po
├── posts-to-posts-nl_NL.mo
├── posts-to-posts-nl_NL.po
├── posts-to-posts-pt_BR.mo
├── posts-to-posts-pt_BR.po
├── posts-to-posts-ro_RO.mo
├── posts-to-posts-ro_RO.po
├── posts-to-posts-ru_RU.mo
├── posts-to-posts-ru_RU.po
├── posts-to-posts-sr_RS.mo
├── posts-to-posts-sr_RS.po
├── posts-to-posts-sv_SE.mo
├── posts-to-posts-sv_SE.po
├── posts-to-posts-tr_TR.mo
├── posts-to-posts-tr_TR.po
├── posts-to-posts-zh_CN.mo
├── posts-to-posts-zh_CN.po
└── posts-to-posts.pot
├── posts-to-posts.php
├── readme.txt
└── vendor
├── mustache
└── mustache
│ ├── .gitattributes
│ ├── LICENSE
│ ├── README.md
│ ├── bin
│ └── build_bootstrap.php
│ ├── composer.json
│ └── src
│ └── Mustache
│ ├── Autoloader.php
│ ├── Cache.php
│ ├── Cache
│ ├── AbstractCache.php
│ ├── FilesystemCache.php
│ └── NoopCache.php
│ ├── Compiler.php
│ ├── Context.php
│ ├── Engine.php
│ ├── Exception.php
│ ├── Exception
│ ├── InvalidArgumentException.php
│ ├── LogicException.php
│ ├── RuntimeException.php
│ ├── SyntaxException.php
│ ├── UnknownFilterException.php
│ ├── UnknownHelperException.php
│ └── UnknownTemplateException.php
│ ├── HelperCollection.php
│ ├── LambdaHelper.php
│ ├── Loader.php
│ ├── Loader
│ ├── ArrayLoader.php
│ ├── CascadingLoader.php
│ ├── FilesystemLoader.php
│ ├── InlineLoader.php
│ ├── MutableLoader.php
│ ├── ProductionFilesystemLoader.php
│ └── StringLoader.php
│ ├── Logger.php
│ ├── Logger
│ ├── AbstractLogger.php
│ └── StreamLogger.php
│ ├── Parser.php
│ ├── Source.php
│ ├── Source
│ └── FilesystemSource.php
│ ├── Template.php
│ └── Tokenizer.php
└── scribu
├── lib-posts-to-posts
├── .gitignore
├── README.md
├── api.php
├── autoload.php
├── composer.json
├── connection-type-factory.php
├── connection-type.php
├── determinate-connection-type.php
├── directed-connection-type.php
├── direction-strategy.php
├── exception.php
├── indeterminate-connection-type.php
├── indeterminate-directed-connection-type.php
├── item-any.php
├── item-attachment.php
├── item-post.php
├── item-user.php
├── item.php
├── list-renderer.php
├── list.php
├── query-post.php
├── query-user.php
├── query.php
├── reciprocal-connection-type.php
├── shortcodes.php
├── side-attachment.php
├── side-post.php
├── side-user.php
├── side.php
├── storage.php
├── url-query.php
├── util.php
└── widget.php
└── scb-framework
├── .gitignore
├── AdminPage.php
├── BoxesPage.php
├── Cron.php
├── Forms.php
├── Hooks.php
├── Options.php
├── PostMetabox.php
├── Table.php
├── Util.php
├── Widget.php
├── composer.json
├── load-composer.php
└── load.php
/.distignore:
--------------------------------------------------------------------------------
1 | # A set of files you probably don't want in your WordPress.org distribution
2 | /.wordpress-org
3 | /.git
4 | /.github
5 | /.idea
6 | .distignore
7 | .gitattributes
8 | .editorconfig
9 | .git
10 | .gitignore
11 | .gitlab-ci.yml
12 | .travis.yml
13 | .DS_Store
14 | Thumbs.db
15 | behat.yml
16 | bin
17 | circle.yml
18 | composer.json
19 | composer.lock
20 | CONTRIBUTING.md
21 | Gruntfile.js
22 | package.json
23 | phpunit.xml
24 | phpunit.xml.dist
25 | multisite.xml
26 | multisite.xml.dist
27 | phpcs.ruleset.xml
28 | README.md
29 | wp-cli.local.yml
30 | tests
31 | .github
32 | node_modules
33 | *.sql
34 | *.tar.gz
35 | *.zip
36 |
--------------------------------------------------------------------------------
/.github/workflows/wordpress.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to WordPress.org
2 | on:
3 | push:
4 | tags:
5 | - "*"
6 | jobs:
7 | tag:
8 | name: New tag
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@master
12 | - name: WordPress Plugin Deploy
13 | uses: 10up/action-wordpress-plugin-deploy@master
14 | env:
15 | SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
16 | SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
17 | SLUG: posts-to-posts
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vscode/
3 |
4 | # Composer
5 | composer.phar
6 | composer.lock
7 | vendor/composer
8 | vendor/autoload.php
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
{{help}}
3 | 4 | {{#connections}} 5 |{{{title}}} | 10 | {{/thead}} 11 |
---|
{{.}} | 7 | {{/columns}} 8 |||
---|---|---|
{{p2p_type}} | 14 |{{{desc}}} | 15 |{{count}} | 16 |
{{{no-rows}}}
23 |{{{no-rows2}}}
24 | {{/has-rows}} 25 | -------------------------------------------------------------------------------- /admin/templates/tab-create-post.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /admin/templates/tab-list.html: -------------------------------------------------------------------------------- 1 |\n"; 29 | 30 | foreach ( $posts as $post ) { 31 | echo str_repeat( "\t", $level ) . "$post->ID: $post->post_title\n"; 32 | 33 | if ( isset( $post->connected ) ) 34 | _p2p_walk( $post->connected, $level+1 ); 35 | } 36 | 37 | if ( 0 == $level ) 38 | echo "\n"; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /lang/posts-to-posts-da_DK.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-da_DK.mo -------------------------------------------------------------------------------- /lang/posts-to-posts-da_DK.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 2 | # This file is distributed under the same license as the package. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: Posts 2 Posts\n" 6 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/p2p\n" 7 | "POT-Creation-Date: 2013-02-17 08:06:11+00:00\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2014-10-07 15:48+0100\n" 12 | "Last-Translator: Phh
, 2012.
7 | #
8 | msgid ""
9 | msgstr ""
10 | "Project-Id-Version: Posts 2 Posts\n"
11 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/posts-to-posts\n"
12 | "POT-Creation-Date: 2011-03-30 21:56+0300\n"
13 | "PO-Revision-Date: 2012-08-20 18:21+0100\n"
14 | "Last-Translator: ms-studio \n"
15 | "Language-Team: \n"
16 | "MIME-Version: 1.0\n"
17 | "Content-Type: text/plain; charset=UTF-8\n"
18 | "Content-Transfer-Encoding: 8bit\n"
19 |
20 | #: admin/box.php:114
21 | msgid "Search"
22 | msgstr "Recherche"
23 |
24 | #: ui/boxes.php:108
25 | msgid "Previous"
26 | msgstr "Précédent"
27 |
28 | #: ui/boxes.php:109
29 | msgid "of"
30 | msgstr "sur"
31 |
32 | #: ui/boxes.php:110
33 | msgid "Next"
34 | msgstr "Suivant"
35 |
36 | #: scb/AdminPage.php:164
37 | msgid "Settings saved."
38 | msgstr "Réglages Enregistrés"
39 |
40 | #: scb/AdminPage.php:176 scb/AdminPage.php:186
41 | msgid "Save Changes"
42 | msgstr "Enregistrer Modifications"
43 |
44 | #: scb/AdminPage.php:368
45 | msgid "Settings"
46 | msgstr "Réglages"
47 |
48 | #: ui/boxes.php:88
49 | msgid "Create connections:"
50 | msgstr "Créer une connexion:"
51 |
52 | #: ui/boxes.php:114
53 | msgid "Recent"
54 | msgstr "Récent"
55 |
56 | #: ui/boxes.php:174 ui/boxes.php:175
57 | msgid "Create connection"
58 | msgstr "Nouvelle connexion"
59 |
60 | #: ui/boxes.php:182 ui/boxes.php:183
61 | msgid "Delete connection"
62 | msgstr "Supprimer la connexion"
63 |
64 | #: ui/boxes.php:189 ui/boxes.php:190
65 | msgid "Delete all connections"
66 | msgstr "Supprimer toutes les connexions"
67 |
68 | #: ui/ui.php:40
69 | #, php-format
70 | msgid "Connected %s"
71 | msgstr "%s Connectées"
72 |
73 | #: ui/ui.php:87
74 | msgid "Are you sure you want to delete all connections?"
75 | msgstr "Etes-vous sûr de vouloir supprimer toutes les connexions?"
76 |
77 | #. Plugin Name of the plugin/theme
78 | msgid "Posts 2 Posts"
79 | msgstr "Posts 2 Posts"
80 |
81 | #. Description of the plugin/theme
82 | msgid "Create many-to-many relationships between all types of posts"
83 | msgstr "Créer des relations multiples entre tous types d’articles et de pages"
84 |
85 | #: admin/box.php:236
86 | msgid "Can't create connection: %s"
87 | msgstr "Impossible de créer la connexion: %s"
88 |
89 | #: admin/factory.php:30
90 | msgid " (from)"
91 | msgstr " (de)"
92 |
93 | #: admin/factory.php:31
94 | msgid " (to)"
95 | msgstr " (à)"
96 |
97 | #: admin/tools.php:7
98 | msgid "Connection Types"
99 | msgstr "Types de Connexion"
100 |
101 | #: admin/tools.php:41
102 | msgid "%s is not a registered connection type."
103 | msgstr "%s n'est pas un type de connexion enregistré."
104 |
105 | #: admin/tools.php:50
106 | msgid "Converted %1$s connections from %2$s to %3$s."
107 | msgstr "%1$s connexions converties de %2$s à %3$s."
108 |
109 | #: admin/tools.php:64
110 | msgid "Name"
111 | msgstr "Nom"
112 |
113 | #: admin/tools.php:65
114 | msgid "Information"
115 | msgstr "Information"
116 |
117 | #: admin/tools.php:66
118 | msgid "Connections"
119 | msgstr "Connexions"
120 |
121 | #: admin/tools.php:74
122 | msgid "No connection types registered."
123 | msgstr "Aucun type de connexion enregistré."
124 |
125 | #: admin/tools.php:76
126 | msgid "To register a connection type, see the wiki."
127 | msgstr ""
128 | "Pour enregistrer un type de connexion, consulter le wiki."
129 |
130 | #: admin/tools.php:93
131 | msgid "Convert to registered connection type:"
132 | msgstr "Convertir en type de connexion:"
133 |
134 | #: admin/tools.php:129
135 | msgid "Go"
136 | msgstr "Go"
137 |
138 | #: core/extra.php:17
139 | msgid "A list of posts connected to the current post"
140 | msgstr "Une liste d'articles connectés à l'article courant"
141 |
142 | #: core/extra.php:34
143 | msgid "Title:"
144 | msgstr "Titre:"
145 |
146 | #: core/extra.php:41
147 | msgid "Connection type:"
148 | msgstr "Type de connexion:"
149 |
150 | #: core/extra.php:46
151 | msgid "Connection listing:"
152 | msgstr "Liste de connexions:"
153 |
154 | #: core/extra.php:52
155 | msgid "connected"
156 | msgstr "relié"
157 |
158 | #: core/extra.php:53
159 | msgid "related"
160 | msgstr "lié"
161 |
162 | #: core/side.php:210
163 | msgid "Users"
164 | msgstr "Utilisateurs"
165 |
166 | #: core/side.php:219
167 | msgid "User"
168 | msgstr "Utilisateur"
169 |
170 | #: core/side.php:220
171 | msgid "Search Users"
172 | msgstr "Rechercher les utilisateurs"
173 |
174 | #: core/side.php:221
175 | msgid "No users found."
176 | msgstr "Aucun utilisateur trouvé."
177 |
178 | #: core/type.php:79
179 | msgid "Create connections"
180 | msgstr "Nouvelle connexion"
181 |
--------------------------------------------------------------------------------
/lang/posts-to-posts-hr.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-hr.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-hr.po:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2010
2 | # This file is distributed under the same license as the package.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: \n"
6 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/p2p\n"
7 | "POT-Creation-Date: 2011-09-18 21:35:49+00:00\n"
8 | "MIME-Version: 1.0\n"
9 | "Content-Type: text/plain; charset=UTF-8\n"
10 | "Content-Transfer-Encoding: 8bit\n"
11 | "PO-Revision-Date: 2011-09-19 12:57+0200\n"
12 | "Last-Translator: scribu \n"
13 | "Language-Team: \n"
14 | "X-Poedit-Language: Croatian\n"
15 | "X-Poedit-Country: CROATIA\n"
16 |
17 | #: scb/AdminPage.php:163
18 | msgid "Settings saved."
19 | msgstr "Postavke spremljene."
20 |
21 | #: scb/AdminPage.php:176
22 | #: scb/AdminPage.php:187
23 | msgid "Save Changes"
24 | msgstr "Spremi Promjene"
25 |
26 | #: scb/AdminPage.php:348
27 | msgid "Settings"
28 | msgstr "Postavke"
29 |
30 | #: admin/fields.php:13
31 | msgid "Create connection"
32 | msgstr "Izradi poveznicu"
33 |
34 | #: admin/fields.php:25
35 | msgid "Delete all connections"
36 | msgstr "Izbriši sve poveznice"
37 |
38 | #: admin/fields.php:34
39 | msgid "Delete connection"
40 | msgstr "Obriši poveznicu"
41 |
42 | #: admin/box.php:58
43 | msgid "Are you sure you want to delete all connections?"
44 | msgstr "Sigurno želiš obrisati sve poveznice"
45 |
46 | #: admin/box.php:68
47 | msgid "Connected %s"
48 | msgstr "Povezano %s"
49 |
50 | #: admin/box.php:115
51 | msgid "Create connections:"
52 | msgstr "Izradi poveznice:"
53 |
54 | #: admin/box.php:124
55 | msgid "Search"
56 | msgstr "Pretraži"
57 |
58 | #: admin/box.php:132
59 | msgid "View All"
60 | msgstr "Pregledaj Sve"
61 |
62 | #: admin/box.php:215
63 | msgid "previous"
64 | msgstr "prethodna"
65 |
66 | #: admin/box.php:216
67 | msgid "next"
68 | msgstr "slijedeća"
69 |
70 | #: admin/box.php:217
71 | msgid "of"
72 | msgstr "od"
73 |
74 |
--------------------------------------------------------------------------------
/lang/posts-to-posts-it_IT.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-it_IT.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-it_IT.po:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2011
2 | # This file is distributed under the same license as the package.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: Posts 2 Posts 1.1.4\n"
6 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/p2p\n"
7 | "POT-Creation-Date: 2011-12-01 16:28:04+00:00\n"
8 | "MIME-Version: 1.0\n"
9 | "Content-Type: text/plain; charset=UTF-8\n"
10 | "Content-Transfer-Encoding: 8bit\n"
11 | "PO-Revision-Date: 2012-06-21 22:25+0200\n"
12 | "Last-Translator: Andrea Bersi\n"
13 | "Language-Team: \n"
14 | "X-Poedit-Language: Italian\n"
15 | "X-Poedit-Country: ITALY\n"
16 |
17 | #: admin/box-factory.php:56
18 | msgid " (from)"
19 | msgstr " (da)"
20 |
21 | #: admin/box-factory.php:57
22 | msgid " (to)"
23 | msgstr " (a)"
24 |
25 | #: admin/box.php:42
26 | msgid "Are you sure you want to delete all connections?"
27 | msgstr "Confermi la rimozione di tutte le relazioni?"
28 |
29 | #: admin/box.php:115
30 | msgid "Create connections:"
31 | msgstr "Crea relazioni:"
32 |
33 | #: admin/box.php:128
34 | msgid "Search"
35 | msgstr "Cerca"
36 |
37 | #: admin/box.php:136
38 | msgid "View All"
39 | msgstr "Vedi tutti"
40 |
41 | #: admin/box.php:204
42 | msgid "previous"
43 | msgstr "precedente"
44 |
45 | #: admin/box.php:205
46 | msgid "next"
47 | msgstr "successivo"
48 |
49 | #: admin/box.php:206
50 | msgid "of"
51 | msgstr "di"
52 |
53 | #: admin/fields.php:16
54 | msgid "Create connection"
55 | msgstr "Crea relazione"
56 |
57 | #: admin/fields.php:30
58 | msgid "Delete all connections"
59 | msgstr "Cancella tutte le relazioni"
60 |
61 | #: admin/fields.php:39
62 | msgid "Delete connection"
63 | msgstr "Cancella relazione"
64 |
65 | #: scb/AdminPage.php:165
66 | msgid "Settings saved."
67 | msgstr "Impostazioni salvate"
68 |
69 | #: scb/AdminPage.php:178
70 | #: scb/AdminPage.php:189
71 | msgid "Save Changes"
72 | msgstr "Salva"
73 |
74 | #: scb/AdminPage.php:350
75 | msgid "Settings"
76 | msgstr "Impostazioni"
77 |
78 | #: core/type.php:65
79 | msgid "Connected %s"
80 | msgstr "Collegato %s"
81 |
82 | #: core/widget.php:15
83 | msgid "Posts 2 Posts"
84 | msgstr "Posts 2 Posts"
85 |
86 | #: core/widget.php:16
87 | msgid "A list of posts connected to the current post"
88 | msgstr "Elenco dei contenuti collegati"
89 |
90 | #: core/widget.php:37
91 | msgid "Connection type:"
92 | msgstr "Tipo relazione:"
93 |
94 | #: core/widget.php:41
95 | msgid "Connection listing:"
96 | msgstr "Elenco relazioni:"
97 |
98 | #: core/widget.php:47
99 | msgid "connected"
100 | msgstr "connesso"
101 |
102 | #: core/widget.php:48
103 | msgid "related"
104 | msgstr "in relazione"
105 |
106 | #: core/widget.php:73
107 | msgid "Related %s"
108 | msgstr "In relazione %s"
109 |
110 | #: core/storage.php:35
111 | msgid "Upgraded %d connections."
112 | msgstr "Aggiornato %d relazioni"
113 |
114 | #: core/storage.php:38
115 | msgid "The Posts 2 Posts connections need to be upgraded. Proceed."
116 | msgstr "Posts 2 Posts ha un Upgrade. Procedi."
117 |
118 | #: core/side.php:110
119 | msgid "Users"
120 | msgstr "Utenti"
121 |
122 | #: core/side.php:115
123 | msgid "User"
124 | msgstr "Utente"
125 |
126 | #: core/side.php:116
127 | msgid "Search Users"
128 | msgstr "Cerca utenti"
129 |
130 | #: core/side.php:117
131 | msgid "No users found."
132 | msgstr "Nessun utente trovato."
133 |
134 |
--------------------------------------------------------------------------------
/lang/posts-to-posts-ja.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-ja.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-ja.po:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2013
2 | # This file is distributed under the same license as the package.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: ja\n"
6 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/p2p\n"
7 | "POT-Creation-Date: 2013-02-17 08:06:11+00:00\n"
8 | "MIME-Version: 1.0\n"
9 | "Content-Type: text/plain; charset=UTF-8\n"
10 | "Content-Transfer-Encoding: 8bit\n"
11 | "PO-Revision-Date: 2013-04-13 22:05+0900\n"
12 | "Last-Translator: MIKI, Toru \n"
13 | "Language-Team: ja \n"
14 | "X-Generator: Poedit 1.5.5\n"
15 | "Language: ja\n"
16 |
17 | #: admin/box.php:45
18 | msgid "Are you sure you want to delete all connections?"
19 | msgstr "全ての関連付けを削除してもよいですか?"
20 |
21 | #: admin/box.php:136
22 | msgid "Search"
23 | msgstr "検索"
24 |
25 | #: admin/box.php:213
26 | msgid "previous"
27 | msgstr "前へ"
28 |
29 | #: admin/box.php:214
30 | msgid "next"
31 | msgstr "次へ"
32 |
33 | #: admin/box.php:215
34 | msgid "of"
35 | msgstr " / "
36 |
37 | #: admin/dropdown-user.php:32
38 | msgid "Filter"
39 | msgstr "フィルター"
40 |
41 | #: admin/factory.php:88
42 | msgid " (from)"
43 | msgstr " (から)"
44 |
45 | #: admin/factory.php:89
46 | msgid " (to)"
47 | msgstr " (へ)"
48 |
49 | #: admin/field-delete.php:7
50 | msgid "Delete all connections"
51 | msgstr "全ての関連付けを削除"
52 |
53 | #: admin/field-delete.php:16
54 | msgid "Delete connection"
55 | msgstr "関連付けを削除"
56 |
57 | #: admin/tools-page.php:7
58 | msgid "Connection Types"
59 | msgstr "関連付け"
60 |
61 | #: admin/tools-page.php:41
62 | msgid "%s is not a registered connection type."
63 | msgstr "%s は登録された関連付けではありません。"
64 |
65 | #: admin/tools-page.php:50
66 | msgid "Converted %1$s connections from %2$s to %3$s."
67 | msgstr "%2$s から %3$s へ %1$s の関連付けを変換する。"
68 |
69 | #: admin/tools-page.php:64
70 | msgid "Name"
71 | msgstr "関連付けの名称"
72 |
73 | #: admin/tools-page.php:65
74 | msgid "Information"
75 | msgstr "内容"
76 |
77 | #: admin/tools-page.php:66
78 | msgid "Connections"
79 | msgstr "数"
80 |
81 | #: admin/tools-page.php:74
82 | msgid "No connection types registered."
83 | msgstr "関連付けは登録されていません。"
84 |
85 | #: admin/tools-page.php:76
86 | msgid "To register a connection type, see the wiki."
87 | msgstr "関連付けの登録方法は wiki をご覧ください。"
88 |
89 | #: admin/tools-page.php:93
90 | msgid "Convert to registered connection type:"
91 | msgstr "登録済みの関連付けに変換する:"
92 |
93 | #: admin/tools-page.php:129
94 | msgid "Go"
95 | msgstr "Go"
96 |
97 | #: core/connection-type.php:102
98 | msgid "Create connections"
99 | msgstr "関連付けを作成"
100 |
101 | #: core/connection-type.php:120
102 | msgid "Connected %s"
103 | msgstr "%s への関連付け"
104 |
105 | #: core/side-user.php:16
106 | msgid "Users"
107 | msgstr "ユーザー"
108 |
109 | #: core/side-user.php:25
110 | msgid "User"
111 | msgstr "ユーザー"
112 |
113 | #: core/side-user.php:26
114 | msgid "Search Users"
115 | msgstr "ユーザーを検索"
116 |
117 | #: core/side-user.php:27
118 | msgid "No users found."
119 | msgstr "ユーザーは見つかりませんでした。"
120 |
121 | #: core/widget.php:16
122 | msgid "Posts 2 Posts"
123 | msgstr "Posts 2 Posts"
124 |
125 | #: core/widget.php:17
126 | msgid "A list of posts connected to the current post"
127 | msgstr "この投稿に関連付けられた投稿一覧"
128 |
129 | #: core/widget.php:34
130 | msgid "Title:"
131 | msgstr "タイトル :"
132 |
133 | #: core/widget.php:41
134 | msgid "Connection type:"
135 | msgstr "関連付け:"
136 |
137 | #: core/widget.php:46
138 | msgid "Connection listing:"
139 | msgstr "表示するリスト:"
140 |
141 | #: core/widget.php:52
142 | msgid "connected"
143 | msgstr "関連付けられた投稿"
144 |
145 | #: core/widget.php:53
146 | msgid "related"
147 | msgstr "関係のある投稿"
148 |
149 | #: scb/AdminPage.php:227
150 | msgid "Settings saved."
151 | msgstr "設定を保存しました。"
152 |
153 | #: scb/AdminPage.php:466
154 | msgid "Settings"
155 | msgstr "設定"
156 |
--------------------------------------------------------------------------------
/lang/posts-to-posts-nl_NL.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-nl_NL.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-nl_NL.po:
--------------------------------------------------------------------------------
1 | # Translation of 1.4.3-alpha in Dutch
2 | # This file is distributed under the same license as the 1.4.3-alpha package.
3 | msgid ""
4 | msgstr ""
5 | "PO-Revision-Date: 2012-09-19 09:35+0100\n"
6 | "MIME-Version: 1.0\n"
7 | "Content-Type: text/plain; charset=UTF-8\n"
8 | "Content-Transfer-Encoding: 8bit\n"
9 | "Plural-Forms: nplurals=2; plural=n != 1;\n"
10 | "X-Generator: Poedit 1.5.3\n"
11 | "Project-Id-Version: 1.4.3-alpha\n"
12 | "POT-Creation-Date: \n"
13 | "Last-Translator: Remco Tolsma \n"
14 | "Language-Team: \n"
15 |
16 | #: admin/tools.php:7
17 | msgid "Connection Types"
18 | msgstr "Verbindingstypen"
19 |
20 | #: admin/tools.php:41
21 | msgid "%s is not a registered connection type."
22 | msgstr "%s is niet een geregistreerde verbindingstype."
23 |
24 | #: admin/tools.php:50
25 | msgid "Converted %1$s connections from %2$s to %3$s."
26 | msgstr "%1$s verbindingen omgezet van %2$s naar %3$s."
27 |
28 | #: admin/tools.php:64
29 | msgid "Name"
30 | msgstr "Naam"
31 |
32 | #: admin/tools.php:65
33 | msgid "Information"
34 | msgstr "Informatie"
35 |
36 | #: admin/tools.php:66
37 | msgid "Connections"
38 | msgstr "Verbindingen"
39 |
40 | #: admin/tools.php:74
41 | msgid "No connection types registered."
42 | msgstr "Geen verbindingstypen geregistreerd."
43 |
44 | #: admin/tools.php:76
45 | msgid "To register a connection type, see the wiki."
46 | msgstr ""
47 | "Bekijk de wiki om een verbindingstype te registeren."
48 |
49 | #: admin/tools.php:93
50 | msgid "Convert to registered connection type:"
51 | msgstr "Omzetten naar geregistreerde verbindingstype:"
52 |
53 | #: admin/tools.php:129
54 | msgid "Go"
55 | msgstr "Ga"
56 |
57 | #: admin/box.php:38
58 | msgid "Are you sure you want to delete all connections?"
59 | msgstr "Weet je zeker dat je alle verbindingen wilt verwijderen?"
60 |
61 | #: admin/box.php:114
62 | msgid "Search"
63 | msgstr "Zoeken"
64 |
65 | #: admin/box.php:191
66 | msgid "previous"
67 | msgstr "vorige"
68 |
69 | #: admin/box.php:192
70 | msgid "next"
71 | msgstr "volgende"
72 |
73 | #: admin/box.php:193
74 | msgid "of"
75 | msgstr "of"
76 |
77 | #: admin/factory.php:30
78 | msgid " (from)"
79 | msgstr "(van)"
80 |
81 | #: admin/factory.php:31
82 | msgid " (to)"
83 | msgstr "(naar)"
84 |
85 | #: admin/fields.php:7
86 | msgid "Delete all connections"
87 | msgstr "Verwijder alle verbindingen"
88 |
89 | #: admin/fields.php:16
90 | msgid "Delete connection"
91 | msgstr "Verwijder verbinding"
92 |
93 | #: core/type.php:85
94 | msgid "Create connections"
95 | msgstr "Verbindingen maken"
96 |
97 | #: core/type.php:108
98 | msgid "Connected %s"
99 | msgstr "Verbonden %s"
100 |
101 | #: core/side.php:224
102 | msgid "Users"
103 | msgstr "Gebruikers"
104 |
105 | #: core/side.php:233
106 | msgid "User"
107 | msgstr "Gebruiker"
108 |
109 | #: core/side.php:234
110 | msgid "Search Users"
111 | msgstr "Gebruikers zoeken"
112 |
113 | #: core/side.php:235
114 | msgid "No users found."
115 | msgstr "Geen gebruikers gevonden."
116 |
117 | #: core/extra.php:16
118 | msgid "Posts 2 Posts"
119 | msgstr "Posts 2 Posts"
120 |
121 | #: core/extra.php:17
122 | msgid "A list of posts connected to the current post"
123 | msgstr "Een lijst van berichten verbonden aan het huidige bericht."
124 |
125 | #: core/extra.php:34
126 | msgid "Title:"
127 | msgstr "Titel:"
128 |
129 | #: core/extra.php:41
130 | msgid "Connection type:"
131 | msgstr "Verbindingstype:"
132 |
133 | #: core/extra.php:46
134 | msgid "Connection listing:"
135 | msgstr "Verbindingslijst:"
136 |
137 | #: core/extra.php:52
138 | msgid "connected"
139 | msgstr "verbonden"
140 |
141 | #: core/extra.php:53
142 | msgid "related"
143 | msgstr "gerelateerd"
144 |
145 | #: scb/AdminPage.php:172
146 | msgid "Settings saved."
147 | msgstr "Instellingen opgeslagen."
148 |
149 | #: scb/AdminPage.php:185 scb/AdminPage.php:196
150 | msgid "Save Changes"
151 | msgstr "Wijzigingen opslaan"
152 |
153 | #: scb/AdminPage.php:346
154 | msgid "Settings"
155 | msgstr "Instellingen"
156 |
--------------------------------------------------------------------------------
/lang/posts-to-posts-pt_BR.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-pt_BR.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-pt_BR.po:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2010
2 | # This file is distributed under the same license as the package.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: Posts 2 Posts 0.4\n"
6 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/p2p\n"
7 | "POT-Creation-Date: 2011-07-22 13:03:03+00:00\n"
8 | "MIME-Version: 1.0\n"
9 | "Content-Type: text/plain; charset=UTF-8\n"
10 | "Content-Transfer-Encoding: 8bit\n"
11 | "PO-Revision-Date: 2011-08-31 17:26-0300\n"
12 | "Last-Translator: Marcelo Minholi \n"
13 | "Language-Team: \n"
14 | "X-Poedit-Language: Portuguese\n"
15 | "X-Poedit-Country: BRAZIL\n"
16 | "X-Poedit-SourceCharset: utf-8\n"
17 |
18 | #: scb/AdminPage.php:161
19 | msgid "Settings saved."
20 | msgstr "Configurações salvas."
21 |
22 | #: scb/AdminPage.php:174
23 | #: scb/AdminPage.php:185
24 | msgid "Save Changes"
25 | msgstr "Salvar Alterações"
26 |
27 | #: scb/AdminPage.php:367
28 | msgid "Settings"
29 | msgstr "Configurações"
30 |
31 | #: ui/box.php:14
32 | msgid "Are you sure you want to delete all connections?"
33 | msgstr "Você tem certeza que quer apagar todas as relações?"
34 |
35 | #: ui/box.php:33
36 | msgid "Create connections:"
37 | msgstr "Criar relações:"
38 |
39 | #: ui/box.php:64
40 | msgid "Search"
41 | msgstr "Buscar"
42 |
43 | #: ui/box.php:72
44 | msgid "Recent"
45 | msgstr "Recentes"
46 |
47 | #: ui/box.php:148
48 | msgid "Previous"
49 | msgstr "Anteriores"
50 |
51 | #: ui/box.php:149
52 | msgid "Next"
53 | msgstr "Próximas"
54 |
55 | #: ui/box.php:150
56 | msgid "of"
57 | msgstr "de"
58 |
59 | #: ui/box.php:182
60 | msgid "Create connection"
61 | msgstr "Criar relação"
62 |
63 | #: ui/box.php:191
64 | msgid "Delete connection"
65 | msgstr "Apagar relação"
66 |
67 | #: ui/box.php:199
68 | msgid "Delete all connections"
69 | msgstr "Apagar todas as relações"
70 |
71 | #: ui.php:33
72 | msgid "Connected %s"
73 | msgstr "%s Relacionado(a)"
74 |
75 |
--------------------------------------------------------------------------------
/lang/posts-to-posts-ro_RO.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-ro_RO.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-ru_RU.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-ru_RU.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-ru_RU.po:
--------------------------------------------------------------------------------
1 | msgid ""
2 | msgstr ""
3 | "Project-Id-Version: Posts-to-posts\n"
4 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/p2p\n"
5 | "POT-Creation-Date: 2011-09-24 13:12:56+00:00\n"
6 | "PO-Revision-Date: \n"
7 | "Last-Translator: foralien \n"
8 | "Language-Team: foalien\n"
9 | "MIME-Version: 1.0\n"
10 | "Content-Type: text/plain; charset=UTF-8\n"
11 | "Content-Transfer-Encoding: 8bit\n"
12 |
13 | #: scb/AdminPage.php:163
14 | msgid "Settings saved."
15 | msgstr "Настройки сохранены."
16 |
17 | #: scb/AdminPage.php:176
18 | #: scb/AdminPage.php:187
19 | msgid "Save Changes"
20 | msgstr "Сохранить изменения"
21 |
22 | #: scb/AdminPage.php:348
23 | msgid "Settings"
24 | msgstr "Настройки"
25 |
26 | #: admin/fields.php:13
27 | msgid "Create connection"
28 | msgstr "Создать взаимосвязь"
29 |
30 | #: admin/fields.php:25
31 | msgid "Delete all connections"
32 | msgstr "Удалить все взаимосвязи"
33 |
34 | #: admin/fields.php:34
35 | msgid "Delete connection"
36 | msgstr "Удалить взаимосвязь"
37 |
38 | #: admin/box.php:59
39 | msgid "Are you sure you want to delete all connections?"
40 | msgstr "Вы уверены, что хотите удалить все взаимосвязи?"
41 |
42 | #: admin/box.php:69
43 | msgid "Connected %s"
44 | msgstr "Связанные %s"
45 |
46 | #: admin/box.php:116
47 | msgid "Create connections:"
48 | msgstr "Создать взаимосвязи:"
49 |
50 | #: admin/box.php:125
51 | msgid "Search"
52 | msgstr "Поиск"
53 |
54 | #: admin/box.php:133
55 | msgid "View All"
56 | msgstr "Все"
57 |
58 | #: admin/box.php:216
59 | msgid "previous"
60 | msgstr "пред."
61 |
62 | #: admin/box.php:217
63 | msgid "next"
64 | msgstr "след."
65 |
66 | #: admin/box.php:218
67 | msgid "of"
68 | msgstr "из"
69 |
70 | #: core/widget.php:14
71 | msgid "Posts 2 Posts"
72 | msgstr "Posts 2 Posts"
73 |
74 | #: core/widget.php:15
75 | msgid "A list of posts connected to the current post"
76 | msgstr "Список всех записей, связанных с текущей"
77 |
78 | #: core/widget.php:29
79 | msgid "Connection type:"
80 | msgstr "Тип взаимосвязи:"
81 |
82 | #: core/widget.php:53
83 | msgid "Related %s"
84 | msgstr "Связанные %s"
85 |
86 | #~ msgid "Recent"
87 | #~ msgstr "Недавние"
88 |
89 |
--------------------------------------------------------------------------------
/lang/posts-to-posts-sr_RS.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-sr_RS.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-sv_SE.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-sv_SE.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-sv_SE.po:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2010
2 | # This file is distributed under the same license as the package.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: Posts 2 Posts sv_SE\n"
6 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/p2p\n"
7 | "POT-Creation-Date: 2013-02-17 08:06:11+00:00\n"
8 | "PO-Revision-Date: 2014-04-10 12:33+0100\n"
9 | "Last-Translator: Mattias Tengblad \n"
10 | "Language-Team: WordPress Sverige \n"
11 | "Language: sv_SE\n"
12 | "MIME-Version: 1.0\n"
13 | "Content-Type: text/plain; charset=UTF-8\n"
14 | "Content-Transfer-Encoding: 8bit\n"
15 | "X-Poedit-SourceCharset: UTF-8\n"
16 | "X-Generator: Poedit 1.6.4\n"
17 |
18 | #: admin/box.php:45
19 | msgid "Are you sure you want to delete all connections?"
20 | msgstr "Är du säker på att du vill radera alla kopplingar?"
21 |
22 | #: admin/box.php:136
23 | msgid "Search"
24 | msgstr "Sök"
25 |
26 | #: admin/box.php:213
27 | msgid "previous"
28 | msgstr "föregående"
29 |
30 | #: admin/box.php:214
31 | msgid "next"
32 | msgstr "nästa"
33 |
34 | #: admin/box.php:215
35 | msgid "of"
36 | msgstr "av"
37 |
38 | #: admin/dropdown-user.php:32
39 | msgid "Filter"
40 | msgstr "Filtrera"
41 |
42 | #: admin/factory.php:88
43 | msgid " (from)"
44 | msgstr "(från)"
45 |
46 | #: admin/factory.php:89
47 | msgid " (to)"
48 | msgstr " (till)"
49 |
50 | #: admin/field-delete.php:7
51 | msgid "Delete all connections"
52 | msgstr "Radera alla kopplingar"
53 |
54 | #: admin/field-delete.php:16
55 | msgid "Delete connection"
56 | msgstr "Radera koppling"
57 |
58 | #: admin/tools-page.php:7
59 | msgid "Connection Types"
60 | msgstr "Kopplingstyper"
61 |
62 | #: admin/tools-page.php:41
63 | msgid "%s is not a registered connection type."
64 | msgstr "%s är inte en registrerad kopplingstyp."
65 |
66 | #: admin/tools-page.php:50
67 | msgid "Converted %1$s connections from %2$s to %3$s."
68 | msgstr "Konverterade %1$s kopplingar från %2$s till %3$s."
69 |
70 | #: admin/tools-page.php:64
71 | msgid "Name"
72 | msgstr "Namn"
73 |
74 | #: admin/tools-page.php:65
75 | msgid "Information"
76 | msgstr "Information"
77 |
78 | #: admin/tools-page.php:66
79 | msgid "Connections"
80 | msgstr "Kopplingar"
81 |
82 | #: admin/tools-page.php:74
83 | msgid "No connection types registered."
84 | msgstr "Inga kopplingstyper registrerade."
85 |
86 | #: admin/tools-page.php:76
87 | msgid "To register a connection type, see the wiki."
88 | msgstr "För att registrera en kopplingstyp, se wikin."
89 |
90 | #: admin/tools-page.php:93
91 | msgid "Convert to registered connection type:"
92 | msgstr "Konvertera till registrerad kopplingstyp:"
93 |
94 | #: admin/tools-page.php:129
95 | msgid "Go"
96 | msgstr "Ok"
97 |
98 | #: core/connection-type.php:102
99 | msgid "Create connections"
100 | msgstr "Skapa kopplingar"
101 |
102 | #: core/connection-type.php:120
103 | msgid "Connected %s"
104 | msgstr "Kopplad till %s"
105 |
106 | #: core/side-user.php:16
107 | msgid "Users"
108 | msgstr "Användare"
109 |
110 | #: core/side-user.php:25
111 | msgid "User"
112 | msgstr "Användare"
113 |
114 | #: core/side-user.php:26
115 | msgid "Search Users"
116 | msgstr "Sök efter användare"
117 |
118 | #: core/side-user.php:27
119 | msgid "No users found."
120 | msgstr "Inga användare funna."
121 |
122 | #: core/widget.php:16
123 | msgid "Posts 2 Posts"
124 | msgstr "Posts 2 Posts"
125 |
126 | #: core/widget.php:17
127 | msgid "A list of posts connected to the current post"
128 | msgstr "En lista över inlägg kopplade till aktuellt inlägg"
129 |
130 | #: core/widget.php:34
131 | msgid "Title:"
132 | msgstr "Titel:"
133 |
134 | #: core/widget.php:41
135 | msgid "Connection type:"
136 | msgstr "Kopplingstyp: "
137 |
138 | #: core/widget.php:46
139 | msgid "Connection listing:"
140 | msgstr "Kopplingslistning:"
141 |
142 | #: core/widget.php:52
143 | msgid "connected"
144 | msgstr "kopplad"
145 |
146 | #: core/widget.php:53
147 | msgid "related"
148 | msgstr "relaterad"
149 |
150 | #: scb/AdminPage.php:227
151 | msgid "Settings saved."
152 | msgstr "Inställningar sparade."
153 |
154 | #: scb/AdminPage.php:466
155 | msgid "Settings"
156 | msgstr "Inställningar"
157 |
158 | #~ msgid "Save Changes"
159 | #~ msgstr "Spara ändringar"
160 |
161 | #~ msgid "Create connection"
162 | #~ msgstr "Skapa koppling"
163 |
164 | #~ msgid "View All"
165 | #~ msgstr "Visa alla"
166 |
--------------------------------------------------------------------------------
/lang/posts-to-posts-tr_TR.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-tr_TR.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-tr_TR.po:
--------------------------------------------------------------------------------
1 | # Translation of the WordPress plugin Posts 2 Posts 1.1.4 by scribu.
2 | # Copyright (C) 2011 scribu
3 | # This file is distributed under the same license as the Posts 2 Posts package.
4 | # ÖNDER CEYLAN , 2011.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: Posts 2 Posts 1.1.4\n"
9 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/posts-to-posts\n"
10 | "POT-Creation-Date: 2011-03-30 21:56+0300\n"
11 | "PO-Revision-Date: 2012-01-23 00:54+0200\n"
12 | "Last-Translator: \n"
13 | "Language-Team: \n"
14 | "Language: \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=UTF-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 |
19 | #: admin/box.php:42
20 | msgid "Are you sure you want to delete all connections?"
21 | msgstr "Tüm bağlantıları kaldırmak istediğinizden emin misiniz?"
22 |
23 | #: admin/box.php:120
24 | msgid "Create connections:"
25 | msgstr "Bağlantı yarat:"
26 |
27 | #: admin/box.php:133
28 | msgid "Search"
29 | msgstr "Ara"
30 |
31 | #: admin/box.php:141
32 | msgid "View All"
33 | msgstr "Tümünü Listele"
34 |
35 | #: admin/box.php:209
36 | msgid "previous"
37 | msgstr "önceki"
38 |
39 | #: admin/box.php:210
40 | msgid "next"
41 | msgstr "sonraki"
42 |
43 | #: admin/box.php:211
44 | msgid "of"
45 | msgstr "arasından"
46 |
47 | #: admin/fields.php:14
48 | msgid "Create connection"
49 | msgstr "Bağlantı ekle"
50 |
51 | #: admin/fields.php:27
52 | msgid "Delete all connections"
53 | msgstr "Tüm bağlantıları kaldır"
54 |
55 | #: admin/fields.php:36
56 | msgid "Delete connection"
57 | msgstr "Bağlantıyı kaldır"
58 |
59 | #: core/side.php:141
60 | msgid "Users"
61 | msgstr "Kullanıcılar"
62 |
63 | #: core/side.php:146
64 | msgid "User"
65 | msgstr "Kullanıcı"
66 |
67 | #: core/side.php:147
68 | msgid "Search Users"
69 | msgstr "Kullanıcı Ara"
70 |
71 | #: core/side.php:148
72 | msgid "No users found."
73 | msgstr "Kullanıcı bulunamadı."
74 |
75 | #: core/storage.php:35
76 | msgid "Upgraded %d connections."
77 | msgstr "%d bağlantı güncellendi."
78 |
79 | #: core/storage.php:38
80 | msgid "The Posts 2 Posts connections need to be upgraded. Proceed."
81 | msgstr "Posts 2 Posts bağlantılarının güncellenmesi gerekiyor. Devam et."
82 |
83 | #: core/type.php:73
84 | msgid "Connected %s"
85 | msgstr "%s Bağlandı"
86 |
87 | #: core/widget.php:15
88 | msgid "Posts 2 Posts"
89 | msgstr "Posts 2 Posts"
90 |
91 | #: core/widget.php:16
92 | msgid "A list of posts connected to the current post"
93 | msgstr "Mevcut sayfayla bağlantılı sayfalar"
94 |
95 | #: core/widget.php:37
96 | msgid "Connection type:"
97 | msgstr "Bağlantı türü:"
98 |
99 | #: core/widget.php:41
100 | msgid "Connection listing:"
101 | msgstr "Bağlantı listesi:"
102 |
103 | #: core/widget.php:47
104 | msgid "connected"
105 | msgstr "bağlı"
106 |
107 | #: core/widget.php:48
108 | msgid "related"
109 | msgstr "benzer"
110 |
111 | #: core/widget.php:73
112 | msgid "Related %s"
113 | msgstr "Benzer %s"
114 |
115 |
--------------------------------------------------------------------------------
/lang/posts-to-posts-zh_CN.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AyeCode/wp-posts-to-posts/77810b1d57fa9c65bae56add7f2de205c4e5e0e3/lang/posts-to-posts-zh_CN.mo
--------------------------------------------------------------------------------
/lang/posts-to-posts-zh_CN.po:
--------------------------------------------------------------------------------
1 | msgid ""
2 | msgstr ""
3 | "Project-Id-Version: Posts 2 Posts\n"
4 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/p2p\n"
5 | "POT-Creation-Date: 2013-02-17 08:06:11+00:00\n"
6 | "PO-Revision-Date: \n"
7 | "Last-Translator: Daniel Koskinen \n"
8 | "Language-Team: Amos Lee <4626395@gmail.com>\n"
9 | "MIME-Version: 1.0\n"
10 | "Content-Type: text/plain; charset=UTF-8\n"
11 | "Content-Transfer-Encoding: 8bit\n"
12 | "Plural-Forms: nplurals=2; plural=n != 1;\n"
13 | "X-Poedit-SourceCharset: UTF-8\n"
14 | "Language: zh_CN\n"
15 | "X-Generator: Poedit 1.7.5\n"
16 |
17 | #: admin/box.php:45
18 | msgid "Are you sure you want to delete all connections?"
19 | msgstr "确定要删除所有连接吗?"
20 |
21 | #: admin/box.php:136
22 | msgid "Search"
23 | msgstr "搜索."
24 |
25 | #: admin/box.php:213
26 | msgid "previous"
27 | msgstr "上一个"
28 |
29 | #: admin/box.php:214
30 | msgid "next"
31 | msgstr "下一个"
32 |
33 | #: admin/box.php:215
34 | msgid "of"
35 | msgstr "/"
36 |
37 | #: admin/dropdown-user.php:32
38 | msgid "Filter"
39 | msgstr "筛选"
40 |
41 | #: admin/factory.php:88
42 | msgid " (from)"
43 | msgstr "从"
44 |
45 | #: admin/factory.php:89
46 | msgid " (to)"
47 | msgstr "到"
48 |
49 | #: admin/field-delete.php:7
50 | msgid "Delete all connections"
51 | msgstr "删除所有连接"
52 |
53 | #: admin/field-delete.php:16
54 | msgid "Delete connection"
55 | msgstr "删除连接"
56 |
57 | #: admin/tools-page.php:7
58 | msgid "Connection Types"
59 | msgstr "连接类型"
60 |
61 | #: admin/tools-page.php:41
62 | msgid "%s is not a registered connection type."
63 | msgstr "%s 不是一个注册的连接类型"
64 |
65 | #: admin/tools-page.php:50
66 | msgid "Converted %1$s connections from %2$s to %3$s."
67 | msgstr "从 %2$s 到 %3$s转换了 %1$s 个连接"
68 |
69 | #: admin/tools-page.php:64
70 | msgid "Name"
71 | msgstr "名称"
72 |
73 | #: admin/tools-page.php:65
74 | msgid "Information"
75 | msgstr "信息"
76 |
77 | #: admin/tools-page.php:66
78 | msgid "Connections"
79 | msgstr "连接"
80 |
81 | #: admin/tools-page.php:74
82 | msgid "No connection types registered."
83 | msgstr "没有注册连接类型"
84 |
85 | #: admin/tools-page.php:76
86 | msgid "To register a connection type, see the wiki."
87 | msgstr "需要注册连接类型,查看 wiki."
88 |
89 | #: admin/tools-page.php:93
90 | msgid "Convert to registered connection type:"
91 | msgstr "转换到已注册的连接类型:"
92 |
93 | #: admin/tools-page.php:129
94 | msgid "Go"
95 | msgstr "转到"
96 |
97 | #: core/connection-type.php:102
98 | msgid "Create connections"
99 | msgstr "创建连接"
100 |
101 | #: core/connection-type.php:120
102 | msgid "Connected %s"
103 | msgstr "%s 已连接"
104 |
105 | #: core/side-user.php:16
106 | msgid "Users"
107 | msgstr "用户"
108 |
109 | #: core/side-user.php:25
110 | msgid "User"
111 | msgstr "用户"
112 |
113 | #: core/side-user.php:26
114 | msgid "Search Users"
115 | msgstr "搜索用户"
116 |
117 | #: core/side-user.php:27
118 | msgid "No users found."
119 | msgstr "没有找到用户"
120 |
121 | #: core/widget.php:16
122 | msgid "Posts 2 Posts"
123 | msgstr "Posts 2 Posts"
124 |
125 | #: core/widget.php:17
126 | msgid "A list of posts connected to the current post"
127 | msgstr "连接到本文的文章"
128 |
129 | #: core/widget.php:34
130 | msgid "Title:"
131 | msgstr "标题:"
132 |
133 | #: core/widget.php:41
134 | msgid "Connection type:"
135 | msgstr "连接类型:"
136 |
137 | #: core/widget.php:46
138 | msgid "Connection listing:"
139 | msgstr "连接列表:"
140 |
141 | #: core/widget.php:52
142 | msgid "connected"
143 | msgstr "已连接"
144 |
145 | #: core/widget.php:53
146 | msgid "related"
147 | msgstr "相关"
148 |
149 | #: scb/AdminPage.php:227
150 | msgid "Settings saved."
151 | msgstr "设置 已保存."
152 |
153 | #: scb/AdminPage.php:466
154 | msgid "Settings"
155 | msgstr "设置"
156 |
--------------------------------------------------------------------------------
/lang/posts-to-posts.pot:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2013
2 | # This file is distributed under the same license as the package.
3 | #, fuzzy
4 | msgid ""
5 | msgstr ""
6 | "Project-Id-Version: Posts 2 Posts 1.7.5\n"
7 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/p2p\n"
8 | "POT-Creation-Date: 2025-02-19 20:04+0530\n"
9 | "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
10 | "Last-Translator: \n"
11 | "Language-Team: AyeCode Ltd \n"
12 | "Language: en_US\n"
13 | "MIME-Version: 1.0\n"
14 | "Content-Type: text/plain; charset=UTF-8\n"
15 | "Content-Transfer-Encoding: 8bit\n"
16 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17 | "X-Poedit-KeywordsList: __;__ngettext:1,2;__ngettext_noop:1,2;_c;_e;_ex:1,2c;"
18 | "_n:1,2;_n_noop:1,2;_nc:4c,1,2;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;esc_attr__;"
19 | "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;gettext;"
20 | "gettext_noop\n"
21 | "X-Poedit-Basepath: ..\n"
22 | "X-Poedit-SourceCharset: UTF-8\n"
23 | "X-Generator: Poedit 3.5\n"
24 | "X-Poedit-SearchPath-0: .\n"
25 |
26 | #: admin/box.php:52
27 | msgid "Are you sure you want to delete all connections?"
28 | msgstr ""
29 |
30 | #: admin/box.php:144
31 | msgid "Search"
32 | msgstr ""
33 |
34 | #: admin/box.php:234
35 | msgid "previous"
36 | msgstr ""
37 |
38 | #: admin/box.php:235
39 | msgid "next"
40 | msgstr ""
41 |
42 | #: admin/box.php:236
43 | msgid "of"
44 | msgstr ""
45 |
46 | #: admin/dropdown-user.php:32
47 | msgid "Filter"
48 | msgstr ""
49 |
50 | #: admin/factory.php:88
51 | msgid " (from)"
52 | msgstr ""
53 |
54 | #: admin/factory.php:89
55 | msgid " (to)"
56 | msgstr ""
57 |
58 | #: admin/field-delete.php:7
59 | msgid "Delete all connections"
60 | msgstr ""
61 |
62 | #: admin/field-delete.php:16
63 | msgid "Delete connection"
64 | msgstr ""
65 |
66 | #: admin/tools-page.php:19
67 | msgid "Connection Types"
68 | msgstr ""
69 |
70 | #: admin/tools-page.php:51
71 | #, php-format
72 | msgid "%s is not a registered connection type."
73 | msgstr ""
74 |
75 | #: admin/tools-page.php:60
76 | #, php-format
77 | msgid "Converted %1$s connections from %2$s to %3$s."
78 | msgstr ""
79 |
80 | #: admin/tools-page.php:74
81 | msgid "Name"
82 | msgstr ""
83 |
84 | #: admin/tools-page.php:75
85 | msgid "Information"
86 | msgstr ""
87 |
88 | #: admin/tools-page.php:76
89 | msgid "Connections"
90 | msgstr ""
91 |
92 | #: admin/tools-page.php:84
93 | msgid "No connection types registered."
94 | msgstr ""
95 |
96 | #: admin/tools-page.php:86
97 | #, php-format
98 | msgid "To register a connection type, see the wiki."
99 | msgstr ""
100 |
101 | #: admin/tools-page.php:103
102 | msgid "Convert to registered connection type:"
103 | msgstr ""
104 |
105 | #: admin/tools-page.php:139
106 | msgid "Go"
107 | msgstr ""
108 |
109 | #: vendor/scribu/lib-posts-to-posts/connection-type.php:107
110 | msgid "Create connections"
111 | msgstr ""
112 |
113 | #: vendor/scribu/lib-posts-to-posts/connection-type.php:125
114 | #, php-format
115 | msgid "Connected %s"
116 | msgstr ""
117 |
118 | #: vendor/scribu/lib-posts-to-posts/side-user.php:18
119 | msgid "Users"
120 | msgstr ""
121 |
122 | #: vendor/scribu/lib-posts-to-posts/side-user.php:27
123 | msgid "User"
124 | msgstr ""
125 |
126 | #: vendor/scribu/lib-posts-to-posts/side-user.php:28
127 | msgid "Search Users"
128 | msgstr ""
129 |
130 | #: vendor/scribu/lib-posts-to-posts/side-user.php:29
131 | msgid "No users found."
132 | msgstr ""
133 |
134 | #: vendor/scribu/lib-posts-to-posts/widget.php:19
135 | msgid "Posts 2 Posts"
136 | msgstr ""
137 |
138 | #: vendor/scribu/lib-posts-to-posts/widget.php:20
139 | msgid "A list of posts connected to the current post"
140 | msgstr ""
141 |
142 | #: vendor/scribu/lib-posts-to-posts/widget.php:37
143 | msgid "Title:"
144 | msgstr ""
145 |
146 | #: vendor/scribu/lib-posts-to-posts/widget.php:44
147 | msgid "Connection type:"
148 | msgstr ""
149 |
150 | #: vendor/scribu/lib-posts-to-posts/widget.php:49
151 | msgid "Connection listing:"
152 | msgstr ""
153 |
154 | #: vendor/scribu/lib-posts-to-posts/widget.php:55
155 | msgid "connected"
156 | msgstr ""
157 |
158 | #: vendor/scribu/lib-posts-to-posts/widget.php:56
159 | msgid "related"
160 | msgstr ""
161 |
162 | #: vendor/scribu/scb-framework/AdminPage.php:264
163 | msgid "Settings saved."
164 | msgstr ""
165 |
166 | #: vendor/scribu/scb-framework/AdminPage.php:521
167 | msgid "Settings"
168 | msgstr ""
169 |
--------------------------------------------------------------------------------
/posts-to-posts.php:
--------------------------------------------------------------------------------
1 | ENT_QUOTES));
20 | echo $m->render('Hello {{planet}}', array('planet' => 'World!')); // "Hello World!"
21 | ```
22 |
23 |
24 | And a more in-depth example -- this is the canonical Mustache template:
25 |
26 | ```html+jinja
27 | Hello {{name}}
28 | You have just won {{value}} dollars!
29 | {{#in_ca}}
30 | Well, {{taxed_value}} dollars, after taxes.
31 | {{/in_ca}}
32 | ```
33 |
34 |
35 | Create a view "context" object -- which could also be an associative array, but those don't do functions quite as well:
36 |
37 | ```php
38 | value - ($this->value * 0.4);
45 | }
46 |
47 | public $in_ca = true;
48 | }
49 | ```
50 |
51 |
52 | And render it:
53 |
54 | ```php
55 | ENT_QUOTES));
57 | $chris = new Chris;
58 | echo $m->render($template, $chris);
59 | ```
60 |
61 | *Note:* we recommend using `ENT_QUOTES` as a default of [entity_flags](https://github.com/bobthecow/mustache.php/wiki#entity_flags) to decrease the chance of Cross-site scripting vulnerability.
62 |
63 | And That's Not All!
64 | -------------------
65 |
66 | Read [the Mustache.php documentation](https://github.com/bobthecow/mustache.php/wiki/Home) for more information.
67 |
68 |
69 | See Also
70 | --------
71 |
72 | * [mustache(5)](http://mustache.github.io/mustache.5.html) man page.
73 | * [Readme for the Ruby Mustache implementation](http://github.com/defunkt/mustache/blob/master/README.md).
74 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mustache/mustache",
3 | "description": "A Mustache implementation in PHP.",
4 | "keywords": ["templating", "mustache"],
5 | "homepage": "https://github.com/bobthecow/mustache.php",
6 | "type": "library",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Justin Hileman",
11 | "email": "justin@justinhileman.info",
12 | "homepage": "http://justinhileman.com"
13 | }
14 | ],
15 | "require": {
16 | "php": ">=5.2.4"
17 | },
18 | "require-dev": {
19 | "phpunit/phpunit": "~3.7|~4.0|~5.0",
20 | "friendsofphp/php-cs-fixer": "~1.11"
21 | },
22 | "autoload": {
23 | "psr-0": { "Mustache": "src/" }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Autoloader.php:
--------------------------------------------------------------------------------
1 | baseDir = $realDir;
42 | } else {
43 | $this->baseDir = $baseDir;
44 | }
45 | }
46 |
47 | /**
48 | * Register a new instance as an SPL autoloader.
49 | *
50 | * @param string $baseDir Mustache library base directory (default: dirname(__FILE__).'/..')
51 | *
52 | * @return Mustache_Autoloader Registered Autoloader instance
53 | */
54 | public static function register($baseDir = null)
55 | {
56 | $key = $baseDir ? $baseDir : 0;
57 |
58 | if (!isset(self::$instances[$key])) {
59 | self::$instances[$key] = new self($baseDir);
60 | }
61 |
62 | $loader = self::$instances[$key];
63 | spl_autoload_register(array($loader, 'autoload'));
64 |
65 | return $loader;
66 | }
67 |
68 | /**
69 | * Autoload Mustache classes.
70 | *
71 | * @param string $class
72 | */
73 | public function autoload($class)
74 | {
75 | if ($class[0] === '\\') {
76 | $class = substr($class, 1);
77 | }
78 |
79 | if (strpos($class, 'Mustache') !== 0) {
80 | return;
81 | }
82 |
83 | $file = sprintf('%s/%s.php', $this->baseDir, str_replace('_', '/', $class));
84 | if (is_file($file)) {
85 | require $file;
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Cache.php:
--------------------------------------------------------------------------------
1 | logger;
31 | }
32 |
33 | /**
34 | * Set a logger instance.
35 | *
36 | * @param Mustache_Logger|Psr\Log\LoggerInterface $logger
37 | */
38 | public function setLogger($logger = null)
39 | {
40 | if ($logger !== null && !($logger instanceof Mustache_Logger || is_a($logger, 'Psr\\Log\\LoggerInterface'))) {
41 | throw new Mustache_Exception_InvalidArgumentException('Expected an instance of Mustache_Logger or Psr\\Log\\LoggerInterface.');
42 | }
43 |
44 | $this->logger = $logger;
45 | }
46 |
47 | /**
48 | * Add a log record if logging is enabled.
49 | *
50 | * @param string $level The logging level
51 | * @param string $message The log message
52 | * @param array $context The log context
53 | */
54 | protected function log($level, $message, array $context = array())
55 | {
56 | if (isset($this->logger)) {
57 | $this->logger->log($level, $message, $context);
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Cache/NoopCache.php:
--------------------------------------------------------------------------------
1 | log(
41 | Mustache_Logger::WARNING,
42 | 'Template cache disabled, evaluating "{className}" class at runtime',
43 | array('className' => $key)
44 | );
45 | eval('?>' . $value);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Exception.php:
--------------------------------------------------------------------------------
1 | token = $token;
27 | if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
28 | parent::__construct($msg, 0, $previous);
29 | } else {
30 | parent::__construct($msg); // @codeCoverageIgnore
31 | }
32 | }
33 |
34 | /**
35 | * @return array
36 | */
37 | public function getToken()
38 | {
39 | return $this->token;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Exception/UnknownFilterException.php:
--------------------------------------------------------------------------------
1 | filterName = $filterName;
26 | $message = sprintf('Unknown filter: %s', $filterName);
27 | if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
28 | parent::__construct($message, 0, $previous);
29 | } else {
30 | parent::__construct($message); // @codeCoverageIgnore
31 | }
32 | }
33 |
34 | public function getFilterName()
35 | {
36 | return $this->filterName;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Exception/UnknownHelperException.php:
--------------------------------------------------------------------------------
1 | helperName = $helperName;
26 | $message = sprintf('Unknown helper: %s', $helperName);
27 | if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
28 | parent::__construct($message, 0, $previous);
29 | } else {
30 | parent::__construct($message); // @codeCoverageIgnore
31 | }
32 | }
33 |
34 | public function getHelperName()
35 | {
36 | return $this->helperName;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Exception/UnknownTemplateException.php:
--------------------------------------------------------------------------------
1 | templateName = $templateName;
26 | $message = sprintf('Unknown template: %s', $templateName);
27 | if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
28 | parent::__construct($message, 0, $previous);
29 | } else {
30 | parent::__construct($message); // @codeCoverageIgnore
31 | }
32 | }
33 |
34 | public function getTemplateName()
35 | {
36 | return $this->templateName;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/HelperCollection.php:
--------------------------------------------------------------------------------
1 | $helper` pairs.
23 | *
24 | * @throws Mustache_Exception_InvalidArgumentException if the $helpers argument isn't an array or Traversable
25 | *
26 | * @param array|Traversable $helpers (default: null)
27 | */
28 | public function __construct($helpers = null)
29 | {
30 | if ($helpers === null) {
31 | return;
32 | }
33 |
34 | if (!is_array($helpers) && !$helpers instanceof Traversable) {
35 | throw new Mustache_Exception_InvalidArgumentException('HelperCollection constructor expects an array of helpers');
36 | }
37 |
38 | foreach ($helpers as $name => $helper) {
39 | $this->add($name, $helper);
40 | }
41 | }
42 |
43 | /**
44 | * Magic mutator.
45 | *
46 | * @see Mustache_HelperCollection::add
47 | *
48 | * @param string $name
49 | * @param mixed $helper
50 | */
51 | public function __set($name, $helper)
52 | {
53 | $this->add($name, $helper);
54 | }
55 |
56 | /**
57 | * Add a helper to this collection.
58 | *
59 | * @param string $name
60 | * @param mixed $helper
61 | */
62 | public function add($name, $helper)
63 | {
64 | $this->helpers[$name] = $helper;
65 | }
66 |
67 | /**
68 | * Magic accessor.
69 | *
70 | * @see Mustache_HelperCollection::get
71 | *
72 | * @param string $name
73 | *
74 | * @return mixed Helper
75 | */
76 | public function __get($name)
77 | {
78 | return $this->get($name);
79 | }
80 |
81 | /**
82 | * Get a helper by name.
83 | *
84 | * @throws Mustache_Exception_UnknownHelperException If helper does not exist
85 | *
86 | * @param string $name
87 | *
88 | * @return mixed Helper
89 | */
90 | public function get($name)
91 | {
92 | if (!$this->has($name)) {
93 | throw new Mustache_Exception_UnknownHelperException($name);
94 | }
95 |
96 | return $this->helpers[$name];
97 | }
98 |
99 | /**
100 | * Magic isset().
101 | *
102 | * @see Mustache_HelperCollection::has
103 | *
104 | * @param string $name
105 | *
106 | * @return bool True if helper is present
107 | */
108 | public function __isset($name)
109 | {
110 | return $this->has($name);
111 | }
112 |
113 | /**
114 | * Check whether a given helper is present in the collection.
115 | *
116 | * @param string $name
117 | *
118 | * @return bool True if helper is present
119 | */
120 | public function has($name)
121 | {
122 | return array_key_exists($name, $this->helpers);
123 | }
124 |
125 | /**
126 | * Magic unset().
127 | *
128 | * @see Mustache_HelperCollection::remove
129 | *
130 | * @param string $name
131 | */
132 | public function __unset($name)
133 | {
134 | $this->remove($name);
135 | }
136 |
137 | /**
138 | * Check whether a given helper is present in the collection.
139 | *
140 | * @throws Mustache_Exception_UnknownHelperException if the requested helper is not present
141 | *
142 | * @param string $name
143 | */
144 | public function remove($name)
145 | {
146 | if (!$this->has($name)) {
147 | throw new Mustache_Exception_UnknownHelperException($name);
148 | }
149 |
150 | unset($this->helpers[$name]);
151 | }
152 |
153 | /**
154 | * Clear the helper collection.
155 | *
156 | * Removes all helpers from this collection
157 | */
158 | public function clear()
159 | {
160 | $this->helpers = array();
161 | }
162 |
163 | /**
164 | * Check whether the helper collection is empty.
165 | *
166 | * @return bool True if the collection is empty
167 | */
168 | public function isEmpty()
169 | {
170 | return empty($this->helpers);
171 | }
172 | }
173 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/LambdaHelper.php:
--------------------------------------------------------------------------------
1 | =}}`. (default: null)
31 | */
32 | public function __construct(Mustache_Engine $mustache, Mustache_Context $context, $delims = null)
33 | {
34 | $this->mustache = $mustache;
35 | $this->context = $context;
36 | $this->delims = $delims;
37 | }
38 |
39 | /**
40 | * Render a string as a Mustache template with the current rendering context.
41 | *
42 | * @param string $string
43 | *
44 | * @return string Rendered template
45 | */
46 | public function render($string)
47 | {
48 | return $this->mustache
49 | ->loadLambda((string) $string, $this->delims)
50 | ->renderInternal($this->context);
51 | }
52 |
53 | /**
54 | * Render a string as a Mustache template with the current rendering context.
55 | *
56 | * @param string $string
57 | *
58 | * @return string Rendered template
59 | */
60 | public function __invoke($string)
61 | {
62 | return $this->render($string);
63 | }
64 |
65 | /**
66 | * Get a Lambda Helper with custom delimiters.
67 | *
68 | * @param string $delims Custom delimiters, in the format `{{= <% %> =}}`
69 | *
70 | * @return Mustache_LambdaHelper
71 | */
72 | public function withDelimiters($delims)
73 | {
74 | return new self($this->mustache, $this->context, $delims);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Loader.php:
--------------------------------------------------------------------------------
1 | '{{ bar }}',
19 | * 'baz' => 'Hey {{ qux }}!'
20 | * );
21 | *
22 | * $tpl = $loader->load('foo'); // '{{ bar }}'
23 | *
24 | * The ArrayLoader is used internally as a partials loader by Mustache_Engine instance when an array of partials
25 | * is set. It can also be used as a quick-and-dirty Template loader.
26 | */
27 | class Mustache_Loader_ArrayLoader implements Mustache_Loader, Mustache_Loader_MutableLoader
28 | {
29 | private $templates;
30 |
31 | /**
32 | * ArrayLoader constructor.
33 | *
34 | * @param array $templates Associative array of Template source (default: array())
35 | */
36 | public function __construct(array $templates = array())
37 | {
38 | $this->templates = $templates;
39 | }
40 |
41 | /**
42 | * Load a Template.
43 | *
44 | * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
45 | *
46 | * @param string $name
47 | *
48 | * @return string Mustache Template source
49 | */
50 | public function load($name)
51 | {
52 | if (!isset($this->templates[$name])) {
53 | throw new Mustache_Exception_UnknownTemplateException($name);
54 | }
55 |
56 | return $this->templates[$name];
57 | }
58 |
59 | /**
60 | * Set an associative array of Template sources for this loader.
61 | *
62 | * @param array $templates
63 | */
64 | public function setTemplates(array $templates)
65 | {
66 | $this->templates = $templates;
67 | }
68 |
69 | /**
70 | * Set a Template source by name.
71 | *
72 | * @param string $name
73 | * @param string $template Mustache Template source
74 | */
75 | public function setTemplate($name, $template)
76 | {
77 | $this->templates[$name] = $template;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Loader/CascadingLoader.php:
--------------------------------------------------------------------------------
1 | loaders = array();
33 | foreach ($loaders as $loader) {
34 | $this->addLoader($loader);
35 | }
36 | }
37 |
38 | /**
39 | * Add a Loader instance.
40 | *
41 | * @param Mustache_Loader $loader
42 | */
43 | public function addLoader(Mustache_Loader $loader)
44 | {
45 | $this->loaders[] = $loader;
46 | }
47 |
48 | /**
49 | * Load a Template by name.
50 | *
51 | * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
52 | *
53 | * @param string $name
54 | *
55 | * @return string Mustache Template source
56 | */
57 | public function load($name)
58 | {
59 | foreach ($this->loaders as $loader) {
60 | try {
61 | return $loader->load($name);
62 | } catch (Mustache_Exception_UnknownTemplateException $e) {
63 | // do nothing, check the next loader.
64 | }
65 | }
66 |
67 | throw new Mustache_Exception_UnknownTemplateException($name);
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Loader/FilesystemLoader.php:
--------------------------------------------------------------------------------
1 | load('foo'); // equivalent to `file_get_contents(dirname(__FILE__).'/views/foo.mustache');
19 | *
20 | * This is probably the most useful Mustache Loader implementation. It can be used for partials and normal Templates:
21 | *
22 | * $m = new Mustache(array(
23 | * 'loader' => new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views'),
24 | * 'partials_loader' => new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views/partials'),
25 | * ));
26 | */
27 | class Mustache_Loader_FilesystemLoader implements Mustache_Loader
28 | {
29 | private $baseDir;
30 | private $extension = '.mustache';
31 | private $templates = array();
32 |
33 | /**
34 | * Mustache filesystem Loader constructor.
35 | *
36 | * Passing an $options array allows overriding certain Loader options during instantiation:
37 | *
38 | * $options = array(
39 | * // The filename extension used for Mustache templates. Defaults to '.mustache'
40 | * 'extension' => '.ms',
41 | * );
42 | *
43 | * @throws Mustache_Exception_RuntimeException if $baseDir does not exist
44 | *
45 | * @param string $baseDir Base directory containing Mustache template files
46 | * @param array $options Array of Loader options (default: array())
47 | */
48 | public function __construct($baseDir, array $options = array())
49 | {
50 | $this->baseDir = $baseDir;
51 |
52 | if (strpos($this->baseDir, '://') === false) {
53 | $this->baseDir = realpath($this->baseDir);
54 | }
55 |
56 | if ($this->shouldCheckPath() && !is_dir($this->baseDir)) {
57 | throw new Mustache_Exception_RuntimeException(sprintf('FilesystemLoader baseDir must be a directory: %s', $baseDir));
58 | }
59 |
60 | if (array_key_exists('extension', $options)) {
61 | if (empty($options['extension'])) {
62 | $this->extension = '';
63 | } else {
64 | $this->extension = '.' . ltrim($options['extension'], '.');
65 | }
66 | }
67 | }
68 |
69 | /**
70 | * Load a Template by name.
71 | *
72 | * $loader = new Mustache_Loader_FilesystemLoader(dirname(__FILE__).'/views');
73 | * $loader->load('admin/dashboard'); // loads "./views/admin/dashboard.mustache";
74 | *
75 | * @param string $name
76 | *
77 | * @return string Mustache Template source
78 | */
79 | public function load($name)
80 | {
81 | if (!isset($this->templates[$name])) {
82 | $this->templates[$name] = $this->loadFile($name);
83 | }
84 |
85 | return $this->templates[$name];
86 | }
87 |
88 | /**
89 | * Helper function for loading a Mustache file by name.
90 | *
91 | * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
92 | *
93 | * @param string $name
94 | *
95 | * @return string Mustache Template source
96 | */
97 | protected function loadFile($name)
98 | {
99 | $fileName = $this->getFileName($name);
100 |
101 | if ($this->shouldCheckPath() && !file_exists($fileName)) {
102 | throw new Mustache_Exception_UnknownTemplateException($name);
103 | }
104 |
105 | return file_get_contents($fileName);
106 | }
107 |
108 | /**
109 | * Helper function for getting a Mustache template file name.
110 | *
111 | * @param string $name
112 | *
113 | * @return string Template file name
114 | */
115 | protected function getFileName($name)
116 | {
117 | $fileName = $this->baseDir . '/' . $name;
118 | if (substr($fileName, 0 - strlen($this->extension)) !== $this->extension) {
119 | $fileName .= $this->extension;
120 | }
121 |
122 | return $fileName;
123 | }
124 |
125 | /**
126 | * Only check if baseDir is a directory and requested templates are files if
127 | * baseDir is using the filesystem stream wrapper.
128 | *
129 | * @return bool Whether to check `is_dir` and `file_exists`
130 | */
131 | protected function shouldCheckPath()
132 | {
133 | return strpos($this->baseDir, '://') === false || strpos($this->baseDir, 'file://') === 0;
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Loader/InlineLoader.php:
--------------------------------------------------------------------------------
1 | load('hello');
20 | * $goodbye = $loader->load('goodbye');
21 | *
22 | * __halt_compiler();
23 | *
24 | * @@ hello
25 | * Hello, {{ planet }}!
26 | *
27 | * @@ goodbye
28 | * Goodbye, cruel {{ planet }}
29 | *
30 | * Templates are deliniated by lines containing only `@@ name`.
31 | *
32 | * The InlineLoader is well-suited to micro-frameworks such as Silex:
33 | *
34 | * $app->register(new MustacheServiceProvider, array(
35 | * 'mustache.loader' => new Mustache_Loader_InlineLoader(__FILE__, __COMPILER_HALT_OFFSET__)
36 | * ));
37 | *
38 | * $app->get('/{name}', function ($name) use ($app) {
39 | * return $app['mustache']->render('hello', compact('name'));
40 | * })
41 | * ->value('name', 'world');
42 | *
43 | * // ...
44 | *
45 | * __halt_compiler();
46 | *
47 | * @@ hello
48 | * Hello, {{ name }}!
49 | */
50 | class Mustache_Loader_InlineLoader implements Mustache_Loader
51 | {
52 | protected $fileName;
53 | protected $offset;
54 | protected $templates;
55 |
56 | /**
57 | * The InlineLoader requires a filename and offset to process templates.
58 | *
59 | * The magic constants `__FILE__` and `__COMPILER_HALT_OFFSET__` are usually
60 | * perfectly suited to the job:
61 | *
62 | * $loader = new Mustache_Loader_InlineLoader(__FILE__, __COMPILER_HALT_OFFSET__);
63 | *
64 | * Note that this only works if the loader is instantiated inside the same
65 | * file as the inline templates. If the templates are located in another
66 | * file, it would be necessary to manually specify the filename and offset.
67 | *
68 | * @param string $fileName The file to parse for inline templates
69 | * @param int $offset A string offset for the start of the templates.
70 | * This usually coincides with the `__halt_compiler`
71 | * call, and the `__COMPILER_HALT_OFFSET__`
72 | */
73 | public function __construct($fileName, $offset)
74 | {
75 | if (!is_file($fileName)) {
76 | throw new Mustache_Exception_InvalidArgumentException('InlineLoader expects a valid filename.');
77 | }
78 |
79 | if (!is_int($offset) || $offset < 0) {
80 | throw new Mustache_Exception_InvalidArgumentException('InlineLoader expects a valid file offset.');
81 | }
82 |
83 | $this->fileName = $fileName;
84 | $this->offset = $offset;
85 | }
86 |
87 | /**
88 | * Load a Template by name.
89 | *
90 | * @throws Mustache_Exception_UnknownTemplateException If a template file is not found
91 | *
92 | * @param string $name
93 | *
94 | * @return string Mustache Template source
95 | */
96 | public function load($name)
97 | {
98 | $this->loadTemplates();
99 |
100 | if (!array_key_exists($name, $this->templates)) {
101 | throw new Mustache_Exception_UnknownTemplateException($name);
102 | }
103 |
104 | return $this->templates[$name];
105 | }
106 |
107 | /**
108 | * Parse and load templates from the end of a source file.
109 | */
110 | protected function loadTemplates()
111 | {
112 | if ($this->templates === null) {
113 | $this->templates = array();
114 | $data = file_get_contents($this->fileName, false, null, $this->offset);
115 | foreach (preg_split("/^@@(?= [\w\d\.]+$)/m", $data, -1) as $chunk) {
116 | if (trim($chunk)) {
117 | list($name, $content) = explode("\n", $chunk, 2);
118 | $this->templates[trim($name)] = trim($content);
119 | }
120 | }
121 | }
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Loader/MutableLoader.php:
--------------------------------------------------------------------------------
1 | '.ms',
31 | * 'stat_props' => array('size', 'mtime'),
32 | * );
33 | *
34 | * Specifying 'stat_props' overrides the stat properties used to invalidate the template cache. By default, this
35 | * uses 'mtime' and 'size', but this can be set to any of the properties supported by stat():
36 | *
37 | * http://php.net/manual/en/function.stat.php
38 | *
39 | * You can also disable filesystem stat entirely:
40 | *
41 | * $options = array('stat_props' => null);
42 | *
43 | * But with great power comes great responsibility. Namely, if you disable stat-based cache invalidation,
44 | * YOU MUST CLEAR THE TEMPLATE CACHE YOURSELF when your templates change. Make it part of your build or deploy
45 | * process so you don't forget!
46 | *
47 | * @throws Mustache_Exception_RuntimeException if $baseDir does not exist.
48 | *
49 | * @param string $baseDir Base directory containing Mustache template files.
50 | * @param array $options Array of Loader options (default: array())
51 | */
52 | public function __construct($baseDir, array $options = array())
53 | {
54 | parent::__construct($baseDir, $options);
55 |
56 | if (array_key_exists('stat_props', $options)) {
57 | if (empty($options['stat_props'])) {
58 | $this->statProps = array();
59 | } else {
60 | $this->statProps = $options['stat_props'];
61 | }
62 | } else {
63 | $this->statProps = array('size', 'mtime');
64 | }
65 | }
66 |
67 | /**
68 | * Helper function for loading a Mustache file by name.
69 | *
70 | * @throws Mustache_Exception_UnknownTemplateException If a template file is not found.
71 | *
72 | * @param string $name
73 | *
74 | * @return Mustache_Source Mustache Template source
75 | */
76 | protected function loadFile($name)
77 | {
78 | $fileName = $this->getFileName($name);
79 |
80 | if (!file_exists($fileName)) {
81 | throw new Mustache_Exception_UnknownTemplateException($name);
82 | }
83 |
84 | return new Mustache_Source_FilesystemSource($fileName, $this->statProps);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Loader/StringLoader.php:
--------------------------------------------------------------------------------
1 | load('{{ foo }}'); // '{{ foo }}'
19 | *
20 | * This is the default Template Loader instance used by Mustache:
21 | *
22 | * $m = new Mustache;
23 | * $tpl = $m->loadTemplate('{{ foo }}');
24 | * echo $tpl->render(array('foo' => 'bar')); // "bar"
25 | */
26 | class Mustache_Loader_StringLoader implements Mustache_Loader
27 | {
28 | /**
29 | * Load a Template by source.
30 | *
31 | * @param string $name Mustache Template source
32 | *
33 | * @return string Mustache Template source
34 | */
35 | public function load($name)
36 | {
37 | return $name;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Logger.php:
--------------------------------------------------------------------------------
1 | log(Mustache_Logger::EMERGENCY, $message, $context);
32 | }
33 |
34 | /**
35 | * Action must be taken immediately.
36 | *
37 | * Example: Entire website down, database unavailable, etc. This should
38 | * trigger the SMS alerts and wake you up.
39 | *
40 | * @param string $message
41 | * @param array $context
42 | */
43 | public function alert($message, array $context = array())
44 | {
45 | $this->log(Mustache_Logger::ALERT, $message, $context);
46 | }
47 |
48 | /**
49 | * Critical conditions.
50 | *
51 | * Example: Application component unavailable, unexpected exception.
52 | *
53 | * @param string $message
54 | * @param array $context
55 | */
56 | public function critical($message, array $context = array())
57 | {
58 | $this->log(Mustache_Logger::CRITICAL, $message, $context);
59 | }
60 |
61 | /**
62 | * Runtime errors that do not require immediate action but should typically
63 | * be logged and monitored.
64 | *
65 | * @param string $message
66 | * @param array $context
67 | */
68 | public function error($message, array $context = array())
69 | {
70 | $this->log(Mustache_Logger::ERROR, $message, $context);
71 | }
72 |
73 | /**
74 | * Exceptional occurrences that are not errors.
75 | *
76 | * Example: Use of deprecated APIs, poor use of an API, undesirable things
77 | * that are not necessarily wrong.
78 | *
79 | * @param string $message
80 | * @param array $context
81 | */
82 | public function warning($message, array $context = array())
83 | {
84 | $this->log(Mustache_Logger::WARNING, $message, $context);
85 | }
86 |
87 | /**
88 | * Normal but significant events.
89 | *
90 | * @param string $message
91 | * @param array $context
92 | */
93 | public function notice($message, array $context = array())
94 | {
95 | $this->log(Mustache_Logger::NOTICE, $message, $context);
96 | }
97 |
98 | /**
99 | * Interesting events.
100 | *
101 | * Example: User logs in, SQL logs.
102 | *
103 | * @param string $message
104 | * @param array $context
105 | */
106 | public function info($message, array $context = array())
107 | {
108 | $this->log(Mustache_Logger::INFO, $message, $context);
109 | }
110 |
111 | /**
112 | * Detailed debug information.
113 | *
114 | * @param string $message
115 | * @param array $context
116 | */
117 | public function debug($message, array $context = array())
118 | {
119 | $this->log(Mustache_Logger::DEBUG, $message, $context);
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/vendor/mustache/mustache/src/Mustache/Source.php:
--------------------------------------------------------------------------------
1 | fileName = $fileName;
35 | $this->statProps = $statProps;
36 | }
37 |
38 | /**
39 | * Get the Source key (used to generate the compiled class name).
40 | *
41 | * @throws Mustache_Exception_RuntimeException when a source file cannot be read
42 | *
43 | * @return string
44 | */
45 | public function getKey()
46 | {
47 | $chunks = array(
48 | 'fileName' => $this->fileName,
49 | );
50 |
51 | if (!empty($this->statProps)) {
52 | if (!isset($this->stat)) {
53 | $this->stat = @stat($this->fileName);
54 | }
55 |
56 | if ($this->stat === false) {
57 | throw new Mustache_Exception_RuntimeException(sprintf('Failed to read source file "%s".', $this->fileName));
58 | }
59 |
60 | foreach ($this->statProps as $prop) {
61 | $chunks[$prop] = $this->stat[$prop];
62 | }
63 | }
64 |
65 | return json_encode($chunks);
66 | }
67 |
68 | /**
69 | * Get the template Source.
70 | *
71 | * @return string
72 | */
73 | public function getSource()
74 | {
75 | return file_get_contents($this->fileName);
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/.gitignore:
--------------------------------------------------------------------------------
1 | vendor/
2 | composer.lock
3 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/README.md:
--------------------------------------------------------------------------------
1 | lib-posts-to-posts
2 | ==================
3 |
4 | This repository contains the library for managing connections and connection types. It does not contain any UI code.
5 |
6 | It is meant to be integrated into a theme or a plugin.
7 |
8 | See the [`_p2p_load()`](https://github.com/scribu/wp-posts-to-posts/blob/master/posts-to-posts.php) from the original Posts 2 Posts plugin to see what's needed for initializing it.
9 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/autoload.php:
--------------------------------------------------------------------------------
1 | prefix = $prefix;
11 | $this->basedir = $basedir;
12 | }
13 |
14 | static function register( $prefix, $basedir ) {
15 | $loader = new self( $prefix, $basedir );
16 |
17 | spl_autoload_register( array( $loader, 'autoload' ) );
18 | }
19 |
20 | function autoload( $class ) {
21 | if ( $class[0] === '\\' ) {
22 | $class = substr( $class, 1 );
23 | }
24 |
25 | if ( strpos( $class, $this->prefix ) !== 0 ) {
26 | return;
27 | }
28 |
29 | $path = str_replace( $this->prefix, '', $class );
30 | $path = str_replace( '_', '-', strtolower( $path ) );
31 |
32 | $file = sprintf( '%s/%s.php', $this->basedir, $path );
33 |
34 | if ( is_file( $file ) ) {
35 | require $file;
36 | }
37 | }
38 | }
39 |
40 |
41 | P2P_Autoload::register( 'P2P_', dirname( __FILE__ ) );
42 |
43 | require_once dirname( __FILE__ ) . '/util.php';
44 | require_once dirname( __FILE__ ) . '/api.php';
45 |
46 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "scribu/lib-posts-to-posts",
3 | "description": "A library for many-to-many relationships in WordPress",
4 | "homepage": "https://github.com/scribu/wp-lib-posts-to-posts",
5 | "license": "GPL-2.0+",
6 | "minimum-stability": "dev",
7 | "require": {
8 | "scribu/scb-framework": "dev-master"
9 | },
10 | "autoload": {
11 | "files": ["autoload.php"]
12 | },
13 | "repositories": [
14 | {
15 | "type": "vcs",
16 | "url": "https://github.com/jeffreyvr/wp-scb-framework/"
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/connection-type-factory.php:
--------------------------------------------------------------------------------
1 | false,
12 | 'from' => 'post',
13 | 'to' => 'post',
14 | 'from_query_vars' => array(),
15 | 'to_query_vars' => array(),
16 | 'fields' => array(),
17 | 'data' => array(),
18 | 'cardinality' => 'many-to-many',
19 | 'duplicate_connections' => false,
20 | 'self_connections' => false,
21 | 'sortable' => false,
22 | 'title' => array(),
23 | 'from_labels' => '',
24 | 'to_labels' => '',
25 | 'reciprocal' => false,
26 | );
27 |
28 | $args = shortcode_atts( $defaults, $args );
29 |
30 | if ( strlen( $args['name'] ) > 44 ) {
31 | trigger_error( sprintf( "Connection name '%s' is longer than 44 characters.", $args['name'] ), E_USER_WARNING );
32 | return false;
33 | }
34 |
35 | $sides = array();
36 |
37 | foreach ( array( 'from', 'to' ) as $direction ) {
38 | $sides[ $direction ] = self::create_side( $args, $direction );
39 | }
40 |
41 | if ( !$args['name'] ) {
42 | trigger_error( "Connection types without a 'name' parameter are deprecated.", E_USER_WARNING );
43 | $args['name'] = self::generate_name( $sides, $args );
44 | }
45 |
46 | $args = apply_filters( 'p2p_connection_type_args', $args, $sides );
47 |
48 | $ctype = new P2P_Connection_Type( $args, $sides );
49 | $ctype->strategy = self::get_direction_strategy( $sides, _p2p_pluck( $args, 'reciprocal' ) );
50 |
51 | self::$instances[ $ctype->name ] = $ctype;
52 |
53 | return $ctype;
54 | }
55 |
56 | private static function create_side( &$args, $direction ) {
57 | $object = _p2p_pluck( $args, $direction );
58 |
59 | if ( in_array( $object, array( 'user', 'attachment' ) ) )
60 | $object_type = $object;
61 | else
62 | $object_type = 'post';
63 |
64 | $query_vars = _p2p_pluck( $args, $direction . '_query_vars' );
65 |
66 | if ( 'post' == $object_type )
67 | $query_vars['post_type'] = (array) $object;
68 |
69 | $class = 'P2P_Side_' . ucfirst( $object_type );
70 |
71 | return new $class( $query_vars );
72 | }
73 |
74 | private static function generate_name( $sides, $args ) {
75 | $vals = array(
76 | $sides['from']->get_object_type(),
77 | $sides['to']->get_object_type(),
78 | $sides['from']->query_vars,
79 | $sides['to']->query_vars,
80 | $args['data']
81 | );
82 |
83 | return md5( serialize( $vals ) );
84 | }
85 |
86 | private static function get_direction_strategy( $sides, $reciprocal ) {
87 | if ( $sides['from']->is_same_type( $sides['to'] ) &&
88 | $sides['from']->is_indeterminate( $sides['to'] ) ) {
89 | if ( $reciprocal )
90 | $class = 'P2P_Reciprocal_Connection_Type';
91 | else
92 | $class = 'P2P_Indeterminate_Connection_Type';
93 | } else {
94 | $class = 'P2P_Determinate_Connection_Type';
95 | }
96 |
97 | return new $class;
98 | }
99 |
100 | public static function get_all_instances() {
101 | return self::$instances;
102 | }
103 |
104 | public static function get_instance( $hash ) {
105 | if ( isset( self::$instances[ $hash ] ) )
106 | return self::$instances[ $hash ];
107 |
108 | return false;
109 | }
110 | }
111 |
112 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/determinate-connection-type.php:
--------------------------------------------------------------------------------
1 | get( $side, 'side' )->item_recognize( $arg );
8 | if ( $item )
9 | return $item;
10 | }
11 |
12 | return false;
13 | }
14 |
15 | public function get_final_qv( $q, $unused = null ) {
16 | $side = $this->get( 'current', 'side' );
17 |
18 | // the sides are of the same type, so just use one for translating
19 | $q = $side->translate_qv( $q );
20 |
21 | $args = $side->get_base_qv( $q );
22 |
23 | $other_qv = $this->get( 'opposite', 'side' )->get_base_qv( $q );
24 |
25 | // need to be inclusive
26 | if ( isset( $other_qv['post_type'] ) ) {
27 | $args['post_type'] = array_unique( array_merge(
28 | (array) $args['post_type'],
29 | (array) $other_qv['post_type']
30 | ) );
31 | }
32 |
33 | return $args;
34 | }
35 |
36 | protected function get_non_connectable( $item, $extra_qv ) {
37 | $to_exclude = parent::get_non_connectable( $item, $extra_qv );
38 |
39 | if ( !$this->self_connections )
40 | $to_exclude[] = $item->get_id();
41 |
42 | return $to_exclude;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/item-any.php:
--------------------------------------------------------------------------------
1 | item->ID ) )
7 | return wp_get_attachment_image( $this->item->ID, 'thumbnail', false );
8 |
9 | return get_the_title( $this->item );
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/item-post.php:
--------------------------------------------------------------------------------
1 | item );
7 | }
8 |
9 | function get_permalink() {
10 | return get_permalink( $this->item );
11 | }
12 |
13 | function get_editlink() {
14 | return get_edit_post_link( $this->item );
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/item-user.php:
--------------------------------------------------------------------------------
1 | item->display_name;
7 | }
8 |
9 | function get_permalink() {
10 | return get_author_posts_url( $this->item->ID );
11 | }
12 |
13 | function get_editlink() {
14 | return get_edit_user_link( $this->item->ID );
15 | }
16 | }
17 |
18 |
19 | // WP < 3.5
20 | if ( !function_exists( 'get_edit_user_link' ) ) :
21 | function get_edit_user_link( $user_id = null ) {
22 | if ( ! $user_id )
23 | $user_id = get_current_user_id();
24 |
25 | if ( empty( $user_id ) || ! current_user_can( 'edit_user', $user_id ) )
26 | return '';
27 |
28 | $user = new WP_User( $user_id );
29 |
30 | if ( ! $user->exists() )
31 | return '';
32 |
33 | if ( get_current_user_id() == $user->ID )
34 | $link = get_edit_profile_url( $user->ID );
35 | else
36 | $link = add_query_arg( 'user_id', $user->ID, self_admin_url( 'user-edit.php' ) );
37 |
38 | return apply_filters( 'get_edit_user_link', $link, $user->ID );
39 | }
40 | endif;
41 |
42 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/item.php:
--------------------------------------------------------------------------------
1 | item = $item;
12 | }
13 |
14 | function __isset( $key ) {
15 | return isset( $this->item->$key );
16 | }
17 |
18 | function __get( $key ) {
19 | return $this->item->$key;
20 | }
21 |
22 | function __set( $key, $value ) {
23 | $this->item->$key = $value;
24 | }
25 |
26 | function get_object() {
27 | return $this->item;
28 | }
29 |
30 | function get_id() {
31 | return $this->item->ID;
32 | }
33 |
34 | abstract function get_permalink();
35 | abstract function get_title();
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/list-renderer.php:
--------------------------------------------------------------------------------
1 | find_direction( $args['item'] );
13 | if ( !$directed )
14 | return '';
15 |
16 | $context = $args['context'];
17 |
18 | $extra_qv = array(
19 | 'p2p:per_page' => -1,
20 | 'p2p:context' => $context
21 | );
22 |
23 | $connected = call_user_func( array( $directed, $args['method'] ), $args['item'], $extra_qv, 'abstract' );
24 |
25 | switch ( $args['mode'] ) {
26 | case 'inline':
27 | $render_args = array(
28 | 'separator' => ', '
29 | );
30 | break;
31 |
32 | case 'ol':
33 | $render_args = array(
34 | 'before_list' => '',
35 | 'after_list' => '
',
36 | );
37 | break;
38 |
39 | case 'ul':
40 | default:
41 | $render_args = array(
42 | 'before_list' => '',
43 | 'after_list' => '
',
44 | );
45 | break;
46 | }
47 |
48 | $render_args['echo'] = false;
49 |
50 | $html = self::render( $connected, $render_args );
51 |
52 | return apply_filters( "p2p_{$context}_html", $html, $connected, $directed, $args['mode'] );
53 | }
54 |
55 | static function render( $list, $args = array() ) {
56 | if ( empty( $list->items ) )
57 | return '';
58 |
59 | $args = wp_parse_args( $args, array(
60 | 'before_list' => '', 'after_list' => '
',
61 | 'before_item' => '', 'after_item' => ' ',
62 | 'separator' => false,
63 | 'echo' => true
64 | ) );
65 |
66 | if ( $args['separator'] ) {
67 | if ( '' == $args['before_list'] )
68 | $args['before_list'] = '';
69 |
70 | if ( '
' == $args['after_list'] )
71 | $args['after_list'] = '';
72 | }
73 |
74 | if ( !$args['echo'] )
75 | ob_start();
76 |
77 | echo $args['before_list'];
78 |
79 | if ( $args['separator'] ) {
80 | $rendered = array();
81 | foreach ( $list->items as $item ) {
82 | $rendered[] = self::render_item( $item );
83 | }
84 | echo implode( $args['separator'], $rendered );
85 | } else {
86 | foreach ( $list->items as $item ) {
87 | echo $args['before_item'] . self::render_item( $item ) . $args['after_item'];
88 | }
89 | }
90 |
91 | echo $args['after_list'];
92 |
93 | if ( !$args['echo'] )
94 | return ob_get_clean();
95 | }
96 |
97 | private static function render_item( $item ) {
98 | return html_link( $item->get_permalink(), $item->get_title() );
99 | }
100 | }
101 |
102 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/list.php:
--------------------------------------------------------------------------------
1 | items = $items;
13 | } else {
14 | $this->items = _p2p_wrap( $items, $item_type );
15 | }
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/query-post.php:
--------------------------------------------------------------------------------
1 | query_vars, 'post' );
14 |
15 | if ( is_wp_error( $r ) ) {
16 | $wp_query->_p2p_error = $r;
17 |
18 | $wp_query->set( 'year', 2525 );
19 | return;
20 | }
21 |
22 | if ( null === $r )
23 | return;
24 |
25 | list( $wp_query->_p2p_query, $wp_query->query_vars ) = $r;
26 |
27 | $wp_query->is_home = false;
28 | $wp_query->is_archive = true;
29 | }
30 |
31 | static function posts_clauses( $clauses, $wp_query ) {
32 | global $wpdb;
33 |
34 | if ( !isset( $wp_query->_p2p_query ) )
35 | return $clauses;
36 |
37 | return $wp_query->_p2p_query->alter_clauses( $clauses, "$wpdb->posts.ID" );
38 | }
39 |
40 | static function capture( $request, $wp_query ) {
41 | global $wpdb;
42 |
43 | if ( !isset( $wp_query->_p2p_capture ) )
44 | return $request;
45 |
46 | $wp_query->_p2p_sql = $request;
47 |
48 | return '';
49 | }
50 |
51 | /**
52 | * Pre-populates the p2p meta cache to decrease the number of queries.
53 | */
54 | static function cache_p2p_meta( $the_posts, $wp_query ) {
55 | if ( isset( $wp_query->_p2p_query ) && !empty( $the_posts ) )
56 | update_meta_cache( 'p2p', wp_list_pluck( $the_posts, 'p2p_id' ) );
57 |
58 | return $the_posts;
59 | }
60 | }
61 |
62 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/query-user.php:
--------------------------------------------------------------------------------
1 | query_vars, 'user' );
14 |
15 | if ( is_wp_error( $r ) ) {
16 | $query->_p2p_error = $r;
17 |
18 | $query->query_where = " AND 1=0";
19 | return;
20 | }
21 |
22 | if ( null === $r )
23 | return;
24 |
25 | list( $p2p_q, $query->query_vars ) = $r;
26 |
27 | $map = array(
28 | 'fields' => 'query_fields',
29 | 'join' => 'query_from',
30 | 'where' => 'query_where',
31 | 'orderby' => 'query_orderby',
32 | );
33 |
34 | $clauses = array();
35 |
36 | foreach ( $map as $clause => $key )
37 | $clauses[$clause] = $query->$key;
38 |
39 | $clauses = $p2p_q->alter_clauses( $clauses, "$wpdb->users.ID" );
40 |
41 | if ( 0 !== strpos( $clauses['orderby'], 'ORDER BY ' ) )
42 | $clauses['orderby'] = 'ORDER BY ' . $clauses['orderby'];
43 |
44 | foreach ( $map as $clause => $key )
45 | $query->$key = $clauses[ $clause ];
46 | }
47 |
48 | /**
49 | * Filter the WP_User_Query instance.
50 | *
51 | * @since 1.7.1
52 | *
53 | * @param WP_User_Query $query Current instance of WP_User_Query.
54 | */
55 | static function pre_get_users( $query ) {
56 | if ( ! empty( $query ) && $query->get( 'p2p:context' ) == 'admin_box' ) {
57 | $query->set( 'fields', array(
58 | 'id',
59 | 'user_login',
60 | 'user_pass',
61 | 'user_nicename',
62 | 'user_email',
63 | 'user_url',
64 | 'user_registered',
65 | 'user_activation_key',
66 | 'user_status',
67 | 'display_name'
68 | ) );
69 | }
70 |
71 | return $query;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/reciprocal-connection-type.php:
--------------------------------------------------------------------------------
1 | '',
23 | 'mode' => 'ul',
24 | ), $attr );
25 |
26 | return P2P_List_Renderer::query_and_render( array(
27 | 'ctype' => $attr['type'],
28 | 'method' => $method,
29 | 'item' => $post,
30 | 'mode' => $attr['mode'],
31 | 'context' => 'shortcode'
32 | ) );
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/side-attachment.php:
--------------------------------------------------------------------------------
1 | query_vars = $query_vars;
9 |
10 | $this->query_vars['post_type'] = array( 'attachment' );
11 | }
12 |
13 | function can_create_item() {
14 | return false;
15 | }
16 |
17 | function get_base_qv( $q ) {
18 | return array_merge( parent::get_base_qv( $q ), array(
19 | 'post_status' => 'inherit'
20 | ) );
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/side-post.php:
--------------------------------------------------------------------------------
1 | query_vars = $query_vars;
11 | }
12 |
13 | public function get_object_type() {
14 | return 'post';
15 | }
16 |
17 | public function first_post_type() {
18 | return $this->query_vars['post_type'][0];
19 | }
20 |
21 | private function get_ptype() {
22 | $ptype = $this->first_post_type();
23 |
24 | $ptype_object = get_post_type_object( $ptype );
25 |
26 | if ( !$ptype_object ) {
27 | throw new P2P_Exception( "Can't find post type $ptype." );
28 | }
29 |
30 | return $ptype_object;
31 | }
32 |
33 | function get_base_qv( $q ) {
34 | if ( isset( $q['post_type'] ) && 'any' != $q['post_type'] ) {
35 | $common = array_intersect( $this->query_vars['post_type'], (array) $q['post_type'] );
36 |
37 | if ( !$common )
38 | unset( $q['post_type'] );
39 | }
40 |
41 | return array_merge( $this->query_vars, $q, array(
42 | 'suppress_filters' => false,
43 | 'ignore_sticky_posts' => true,
44 | ) );
45 | }
46 |
47 | function get_desc() {
48 | return implode( ', ', array_map( array( $this, 'post_type_label' ), $this->query_vars['post_type'] ) );
49 | }
50 |
51 | private function post_type_label( $post_type ) {
52 | $cpt = get_post_type_object( $post_type );
53 | return $cpt ? $cpt->label : $post_type;
54 | }
55 |
56 | function get_title() {
57 | return $this->get_labels()->name;
58 | }
59 |
60 | function get_labels() {
61 | try {
62 | $labels = $this->get_ptype()->labels;
63 | } catch ( P2P_Exception $e ) {
64 | trigger_error( $e->getMessage(), E_USER_WARNING );
65 | $labels = new stdClass;
66 | }
67 |
68 | return $labels;
69 | }
70 |
71 | function can_edit_connections() {
72 | try {
73 | return current_user_can( $this->get_ptype()->cap->edit_posts );
74 | } catch ( P2P_Exception $e ) {
75 | trigger_error( $e->getMessage(), E_USER_WARNING );
76 | return false;
77 | }
78 | }
79 |
80 | function can_create_item() {
81 | if ( count( $this->query_vars['post_type'] ) > 1 )
82 | return false;
83 |
84 | if ( count( $this->query_vars ) > 1 )
85 | return false;
86 |
87 | return true;
88 | }
89 |
90 | function translate_qv( $qv ) {
91 | $map = array(
92 | 'include' => 'post__in',
93 | 'exclude' => 'post__not_in',
94 | 'search' => 's',
95 | 'page' => 'paged',
96 | 'per_page' => 'posts_per_page'
97 | );
98 |
99 | foreach ( $map as $old => $new )
100 | if ( isset( $qv["p2p:$old"] ) )
101 | $qv[$new] = _p2p_pluck( $qv, "p2p:$old" );
102 |
103 | return $qv;
104 | }
105 |
106 | function do_query( $args ) {
107 | return new WP_Query( $args );
108 | }
109 |
110 | function capture_query( $args ) {
111 | $q = new WP_Query;
112 | $q->_p2p_capture = true;
113 |
114 | $q->query( $args );
115 |
116 | return $q->_p2p_sql;
117 | }
118 |
119 | function get_list( $wp_query ) {
120 | $list = new P2P_List( $wp_query->posts, $this->item_type );
121 |
122 | $list->current_page = max( 1, $wp_query->get('paged') );
123 | $list->total_pages = $wp_query->max_num_pages;
124 |
125 | return $list;
126 | }
127 |
128 | function is_indeterminate( $side ) {
129 | $common = array_intersect(
130 | $this->query_vars['post_type'],
131 | $side->query_vars['post_type']
132 | );
133 |
134 | return !empty( $common );
135 | }
136 |
137 | protected function recognize( $arg ) {
138 | if ( is_object( $arg ) && !isset( $arg->post_type ) )
139 | return false;
140 |
141 | $post = get_post( $arg );
142 |
143 | if ( !is_object( $post ) )
144 | return false;
145 |
146 | if ( !$this->recognize_post_type( $post->post_type ) )
147 | return false;
148 |
149 | return $post;
150 | }
151 |
152 | public function recognize_post_type( $post_type ) {
153 | if ( !post_type_exists( $post_type ) )
154 | return false;
155 |
156 | return in_array( $post_type, $this->query_vars['post_type'] );
157 | }
158 | }
159 |
160 |
161 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/side-user.php:
--------------------------------------------------------------------------------
1 | query_vars = $query_vars;
11 | }
12 |
13 | function get_object_type() {
14 | return 'user';
15 | }
16 |
17 | function get_desc() {
18 | return __( 'Users', P2P_TEXTDOMAIN );
19 | }
20 |
21 | function get_title() {
22 | return $this->get_desc();
23 | }
24 |
25 | function get_labels() {
26 | return (object) array(
27 | 'singular_name' => __( 'User', P2P_TEXTDOMAIN ),
28 | 'search_items' => __( 'Search Users', P2P_TEXTDOMAIN ),
29 | 'not_found' => __( 'No users found.', P2P_TEXTDOMAIN ),
30 | );
31 | }
32 |
33 | function can_edit_connections() {
34 | return current_user_can( 'list_users' );
35 | }
36 |
37 | function can_create_item() {
38 | return false;
39 | }
40 |
41 | function translate_qv( $qv ) {
42 | if ( isset( $qv['p2p:include'] ) )
43 | $qv['include'] = _p2p_pluck( $qv, 'p2p:include' );
44 |
45 | if ( isset( $qv['p2p:exclude'] ) )
46 | $qv['exclude'] = _p2p_pluck( $qv, 'p2p:exclude' );
47 |
48 | if ( isset( $qv['p2p:search'] ) && $qv['p2p:search'] )
49 | $qv['search'] = '*' . _p2p_pluck( $qv, 'p2p:search' ) . '*';
50 |
51 | if ( isset( $qv['p2p:page'] ) && $qv['p2p:page'] > 0 ) {
52 | if ( isset( $qv['p2p:per_page'] ) && $qv['p2p:per_page'] > 0 ) {
53 | $qv['number'] = $qv['p2p:per_page'];
54 | $qv['offset'] = $qv['p2p:per_page'] * ( $qv['p2p:page'] - 1 );
55 | }
56 | }
57 |
58 | return $qv;
59 | }
60 |
61 | function do_query( $args ) {
62 | return new WP_User_Query( $args );
63 | }
64 |
65 | function capture_query( $args ) {
66 | $args['count_total'] = false;
67 |
68 | $uq = new WP_User_Query;
69 | $uq->_p2p_capture = true; // needed by P2P_URL_Query
70 |
71 | $uq->prepare_query( $args );
72 |
73 | return "SELECT $uq->query_fields $uq->query_from $uq->query_where $uq->query_orderby $uq->query_limit";
74 | }
75 |
76 | function get_list( $query ) {
77 | $list = new P2P_List( $query->get_results(), $this->item_type );
78 |
79 | $qv = $query->query_vars;
80 |
81 | if ( isset( $qv['p2p:page'] ) ) {
82 | $list->current_page = $qv['p2p:page'];
83 | $list->total_pages = ceil( $query->get_total() / $qv['p2p:per_page'] );
84 | }
85 |
86 | return $list;
87 | }
88 |
89 | function is_indeterminate( $side ) {
90 | return true;
91 | }
92 |
93 | function get_base_qv( $q ) {
94 | return array_merge( $this->query_vars, $q );
95 | }
96 |
97 | protected function recognize( $arg ) {
98 | if ( is_a( $arg, 'WP_User' ) )
99 | return $arg;
100 |
101 | return get_user_by( 'id', $arg );
102 | }
103 | }
104 |
105 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/side.php:
--------------------------------------------------------------------------------
1 | get_object_type() == $side->get_object_type();
26 | }
27 |
28 | /**
29 | * @param object Raw object or P2P_Item
30 | * @return bool|P2P_Item
31 | */
32 | function item_recognize( $arg ) {
33 | $class = $this->item_type;
34 |
35 | if ( is_a( $arg, 'P2P_Item' ) ) {
36 | if ( !is_a( $arg, $class ) ) {
37 | return false;
38 | }
39 |
40 | $arg = $arg->get_object();
41 | }
42 |
43 | $raw_item = $this->recognize( $arg );
44 | if ( !$raw_item )
45 | return false;
46 |
47 | return new $class( $raw_item );
48 | }
49 |
50 | /**
51 | * @param object Raw object
52 | */
53 | abstract protected function recognize( $arg );
54 | }
55 |
56 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/storage.php:
--------------------------------------------------------------------------------
1 | $ctype ) {
52 | foreach ( array( 'from', 'to' ) as $direction ) {
53 | if ( $object_type == $ctype->side[ $direction ]->get_object_type() ) {
54 | p2p_delete_connections( $p2p_type, array(
55 | $direction => $object_id,
56 | ) );
57 | }
58 | }
59 | }
60 | }
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/url-query.php:
--------------------------------------------------------------------------------
1 | 1 )
25 | return 'any';
26 |
27 | return reset( $directions );
28 | }
29 |
30 | /** @internal */
31 | function _p2p_flip_direction( $direction ) {
32 | $map = array(
33 | 'from' => 'to',
34 | 'to' => 'from',
35 | 'any' => 'any',
36 | );
37 |
38 | return $map[ $direction ];
39 | }
40 |
41 | /** @internal */
42 | function _p2p_normalize( $items ) {
43 | if ( !is_array( $items ) )
44 | $items = array( $items );
45 |
46 | foreach ( $items as &$item ) {
47 | if ( is_a( $item, 'P2P_Item' ) )
48 | $item = $item->get_id();
49 | elseif ( is_object( $item ) )
50 | $item = $item->ID;
51 | }
52 |
53 | return $items;
54 | }
55 |
56 | /** @internal */
57 | function _p2p_wrap( $items, $class ) {
58 | foreach ( $items as &$item ) {
59 | $item = new $class( $item );
60 | }
61 |
62 | return $items;
63 | }
64 |
65 | /** @internal */
66 | function _p2p_extract_post_types( $sides ) {
67 | $ptypes = array();
68 |
69 | foreach ( $sides as $side ) {
70 | if ( 'post' == $side->get_object_type() )
71 | _p2p_append( $ptypes, $side->query_vars['post_type'] );
72 | }
73 |
74 | return array_unique( $ptypes );
75 | }
76 |
77 | /** @internal */
78 | function _p2p_meta_sql_helper( $query ) {
79 | global $wpdb;
80 |
81 | if ( isset( $query[0] ) ) {
82 | $meta_query = $query;
83 | }
84 | else {
85 | $meta_query = array();
86 |
87 | foreach ( $query as $key => $value ) {
88 | $meta_query[] = compact( 'key', 'value' );
89 | }
90 | }
91 |
92 | return get_meta_sql( $meta_query, 'p2p', $wpdb->p2p, 'p2p_id' );
93 | }
94 |
95 | /** @internal */
96 | function _p2p_pluck( &$arr, $key ) {
97 | $value = $arr[ $key ];
98 | unset( $arr[ $key ] );
99 | return $value;
100 | }
101 |
102 | /** @internal */
103 | function _p2p_append( &$arr, $values ) {
104 | $arr = array_merge( $arr, $values );
105 | }
106 |
107 | /** @internal */
108 | function _p2p_first( $args ) {
109 | if ( empty( $args ) )
110 | return false;
111 |
112 | return reset( $args );
113 | }
114 |
115 | /** @internal */
116 | function _p2p_get_other_id( $item ) {
117 | if ( $item->ID == $item->p2p_from )
118 | return $item->p2p_to;
119 |
120 | if ( $item->ID == $item->p2p_to )
121 | return $item->p2p_from;
122 |
123 | trigger_error( "Corrupted data for item $inner_item->ID", E_USER_WARNING );
124 | }
125 |
126 |
--------------------------------------------------------------------------------
/vendor/scribu/lib-posts-to-posts/widget.php:
--------------------------------------------------------------------------------
1 | false,
7 | 'listing' => 'connected',
8 | 'title' => ''
9 | );
10 |
11 | static function init( $class = '', $file = false, $base = 'p2p' ) {
12 | if ( empty( $class ) )
13 | $class = __CLASS__;
14 |
15 | parent::init( $class, $file, $base );
16 | }
17 |
18 | function __construct() {
19 | parent::__construct( 'p2p', __( 'Posts 2 Posts', P2P_TEXTDOMAIN ), array(
20 | 'description' => __( 'A list of posts connected to the current post', P2P_TEXTDOMAIN )
21 | ) );
22 | }
23 |
24 | function form( $instance ) {
25 | if ( empty( $instance ) )
26 | $instance = $this->defaults;
27 |
28 | $ctypes = array();
29 |
30 | foreach ( P2P_Connection_Type_Factory::get_all_instances() as $p2p_type => $ctype ) {
31 | $ctypes[ $p2p_type ] = $ctype->get_desc();
32 | }
33 |
34 | echo html( 'p', $this->input( array(
35 | 'type' => 'text',
36 | 'name' => 'title',
37 | 'desc' => __( 'Title:', P2P_TEXTDOMAIN )
38 | ), $instance ) );
39 |
40 | echo html( 'p', $this->input( array(
41 | 'type' => 'select',
42 | 'name' => 'ctype',
43 | 'values' => $ctypes,
44 | 'desc' => __( 'Connection type:', P2P_TEXTDOMAIN ),
45 | 'extra' => "style='width: 100%'"
46 | ), $instance ) );
47 |
48 | echo html( 'p',
49 | __( 'Connection listing:', P2P_TEXTDOMAIN ),
50 | '
',
51 | $this->input( array(
52 | 'type' => 'radio',
53 | 'name' => 'listing',
54 | 'values' => array(
55 | 'connected' => __( 'connected', P2P_TEXTDOMAIN ),
56 | 'related' => __( 'related', P2P_TEXTDOMAIN )
57 | ),
58 | ), $instance )
59 | );
60 | }
61 |
62 | function widget( $args, $instance ) {
63 | $instance = array_merge( $this->defaults, $instance );
64 |
65 | $output = P2P_List_Renderer::query_and_render( array(
66 | 'ctype' => $instance['ctype'],
67 | 'method' => ( 'related' == $instance['listing'] ? 'get_related' : 'get_connected' ),
68 | 'item' => get_queried_object(),
69 | 'mode' => 'ul',
70 | 'context' => 'widget'
71 | ) );
72 |
73 | if ( !$output )
74 | return;
75 |
76 | $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
77 |
78 | echo $args['before_widget'];
79 |
80 | if ( ! empty( $title ) )
81 | echo $args['before_title'] . $title . $args['after_title'];
82 |
83 | echo $output;
84 |
85 | echo $args['after_widget'];
86 | }
87 | }
88 |
89 |
--------------------------------------------------------------------------------
/vendor/scribu/scb-framework/.gitignore:
--------------------------------------------------------------------------------
1 | .svn
2 |
--------------------------------------------------------------------------------
/vendor/scribu/scb-framework/Hooks.php:
--------------------------------------------------------------------------------
1 | ";
42 | self::_do( array( __CLASS__, '_print' ), $class );
43 | echo "";
44 | }
45 |
46 | /**
47 | * Prints.
48 | *
49 | * @param string $tag
50 | * @param array $callback
51 | * @param int $prio
52 | * @param int $argc
53 | *
54 | * @return void
55 | */
56 | private static function _print( $tag, $callback, $prio, $argc ) {
57 | $static = ! is_object( $callback[0] );
58 |
59 | if ( self::$mangle_name ) {
60 | $class = $static ? '__CLASS__' : '$this';
61 | } else if ( $static ) {
62 | $class = "'" . $callback[0] . "'";
63 | } else {
64 | $class = '$' . get_class( $callback[0] );
65 | }
66 |
67 | $func = "array( $class, '$callback[1]' )";
68 |
69 | echo "add_filter( '$tag', $func";
70 |
71 | if ( $prio != 10 || $argc > 1 ) {
72 | echo ", $prio";
73 |
74 | if ( $argc > 1 ) {
75 | echo ", $argc";
76 | }
77 | }
78 |
79 | echo " );\n";
80 | }
81 |
82 | /**
83 | * Processes.
84 | *
85 | * @param string $action
86 | * @param string $class
87 | *
88 | * @return void
89 | */
90 | private static function _do( $action, $class ) {
91 | $reflection = new ReflectionClass( $class );
92 |
93 | foreach ( $reflection->getMethods() as $method ) {
94 | if ( $method->isPublic() && ! $method->isConstructor() ) {
95 | $comment = $method->getDocComment();
96 |
97 | if ( preg_match( '/@nohook[ \t\*\n]+/', $comment ) ) {
98 | continue;
99 | }
100 |
101 | preg_match_all( '/@hook:?\s+([^\s]+)/', $comment, $matches ) ? $matches[1] : $method->name;
102 | if ( empty( $matches[1] ) ) {
103 | $hooks = array( $method->name );
104 | } else {
105 | $hooks = $matches[1];
106 | }
107 |
108 | $priority = preg_match( '/@priority:?\s+(\d+)/', $comment, $matches ) ? $matches[1] : 10;
109 |
110 | foreach ( $hooks as $hook ) {
111 | call_user_func( $action, $hook, array( $class, $method->name ), $priority, $method->getNumberOfParameters() );
112 | }
113 | }
114 | }
115 |
116 | }
117 |
118 | }
119 |
120 |
--------------------------------------------------------------------------------
/vendor/scribu/scb-framework/Options.php:
--------------------------------------------------------------------------------
1 | key = $key;
36 | $this->defaults = $defaults;
37 |
38 | if ( $file ) {
39 | scbUtil::add_activation_hook( $file, array( $this, '_activation' ) );
40 | scbUtil::add_uninstall_hook( $file, array( $this, 'delete' ) );
41 | }
42 | }
43 |
44 | /**
45 | * Returns option name.
46 | *
47 | * @return string
48 | */
49 | public function get_key() {
50 | return $this->key;
51 | }
52 |
53 | /**
54 | * Get option values for one or all fields.
55 | *
56 | * @param string|array $field (optional) The field to get.
57 | * @param mixed $default (optional) The value returned when the key is not found.
58 | *
59 | * @return mixed Whatever is in those fields.
60 | */
61 | public function get( $field = null, $default = null ) {
62 | $data = array_merge( $this->defaults, get_option( $this->key, array() ) );
63 |
64 | return scbForms::get_value( $field, $data, $default );
65 | }
66 |
67 | /**
68 | * Get default values for one or all fields.
69 | *
70 | * @param string|array $field (optional) The field to get.
71 | *
72 | * @return mixed Whatever is in those fields.
73 | */
74 | public function get_defaults( $field = null ) {
75 | return scbForms::get_value( $field, $this->defaults );
76 | }
77 |
78 | /**
79 | * Set all data fields, certain fields or a single field.
80 | *
81 | * @param string|array $field The field to update or an associative array.
82 | * @param mixed $value (optional) The new value ( ignored if $field is array ).
83 | *
84 | * @return void
85 | */
86 | public function set( $field, $value = '' ) {
87 | if ( is_array( $field ) ) {
88 | $newdata = $field;
89 | } else {
90 | $newdata = array( $field => $value );
91 | }
92 |
93 | $this->update( array_merge( $this->get(), $newdata ) );
94 | }
95 |
96 | /**
97 | * Reset option to defaults.
98 | *
99 | * @return void
100 | */
101 | public function reset() {
102 | $this->update( $this->defaults, false );
103 | }
104 |
105 | /**
106 | * Remove any keys that are not in the defaults array.
107 | *
108 | * @return void
109 | */
110 | public function cleanup() {
111 | $this->update( $this->get(), true );
112 | }
113 |
114 | /**
115 | * Update raw data.
116 | *
117 | * @param mixed $newdata
118 | * @param bool $clean (optional) Whether to remove unrecognized keys or not.
119 | *
120 | * @return void
121 | */
122 | public function update( $newdata, $clean = true ) {
123 | if ( $clean ) {
124 | $newdata = $this->_clean( $newdata );
125 | }
126 |
127 | update_option( $this->key, array_merge( $this->get(), $newdata ) );
128 | }
129 |
130 | /**
131 | * Delete the option.
132 | *
133 | * @return void
134 | */
135 | public function delete() {
136 | delete_option( $this->key );
137 | }
138 |
139 |
140 | //_____INTERNAL METHODS_____
141 |
142 |
143 | /**
144 | * Saves an extra query.
145 | *
146 | * @return void
147 | */
148 | public function _activation() {
149 | add_option( $this->key, $this->defaults );
150 | }
151 |
152 | /**
153 | * Keep only the keys defined in $this->defaults
154 | *
155 | * @param array $data
156 | *
157 | * @return array
158 | */
159 | private function _clean( $data ) {
160 | return wp_array_slice_assoc( $data, array_keys( $this->defaults ) );
161 | }
162 |
163 | private function &_get( $field, $data ) {
164 | }
165 |
166 | /**
167 | * Magic method: $options->field
168 | *
169 | * @param string|array $field The field to get.
170 | *
171 | * @return mixed
172 | */
173 | public function __get( $field ) {
174 | return $this->get( $field );
175 | }
176 |
177 | /**
178 | * Magic method: $options->field = $value
179 | *
180 | * @return void
181 | */
182 | public function __set( $field, $value ) {
183 | $this->set( $field, $value );
184 | }
185 |
186 | /**
187 | * Magic method: isset( $options->field )
188 | *
189 | * @return bool
190 | */
191 | public function __isset( $field ) {
192 | $data = $this->get();
193 | return isset( $data[ $field ] );
194 | }
195 | }
196 |
197 |
--------------------------------------------------------------------------------
/vendor/scribu/scb-framework/Table.php:
--------------------------------------------------------------------------------
1 | name = $name;
37 | $this->columns = $columns;
38 | $this->upgrade_method = $upgrade_method;
39 |
40 | scb_register_table( $name );
41 |
42 | if ( $file ) {
43 | scbUtil::add_activation_hook( $file, array( $this, 'install' ) );
44 | scbUtil::add_uninstall_hook( $file, array( $this, 'uninstall' ) );
45 | }
46 | }
47 |
48 | /**
49 | * Installs table.
50 | *
51 | * @return void
52 | */
53 | public function install() {
54 | scb_install_table( $this->name, $this->columns, $this->upgrade_method );
55 | }
56 |
57 | /**
58 | * Uninstalls table.
59 | *
60 | * @return void
61 | */
62 | public function uninstall() {
63 | scb_uninstall_table( $this->name );
64 | }
65 | }
66 |
67 |
--------------------------------------------------------------------------------
/vendor/scribu/scb-framework/Widget.php:
--------------------------------------------------------------------------------
1 | defaults );
60 |
61 | extract( $args );
62 |
63 | echo $before_widget;
64 |
65 | $title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '', $instance, $this->id_base );
66 |
67 | if ( ! empty( $title ) ) {
68 | echo $before_title . $title . $after_title;
69 | }
70 |
71 | $this->content( $instance );
72 |
73 | echo $after_widget;
74 | }
75 |
76 | /**
77 | * This is where the actual widget content goes.
78 | *
79 | * @param array $instance The settings for the particular instance of the widget.
80 | *
81 | * @return void
82 | */
83 | protected function content( $instance ) { }
84 |
85 |
86 | //_____HELPER METHODS_____
87 |
88 |
89 | /**
90 | * Generates a input form field.
91 | *
92 | * @param array $args
93 | * @param array $formdata (optional)
94 | *
95 | * @return string
96 | */
97 | protected function input( $args, $formdata = array() ) {
98 | $prefix = array( 'widget-' . $this->id_base, $this->number );
99 |
100 | $form = new scbForm( $formdata, $prefix );
101 |
102 | // Add default class
103 | if ( ! isset( $args['extra'] ) && 'text' == $args['type'] ) {
104 | $args['extra'] = array( 'class' => 'widefat' );
105 | }
106 |
107 | // Add default label position
108 | if ( ! in_array( $args['type'], array( 'checkbox', 'radio' ) ) && empty( $args['desc_pos'] ) ) {
109 | $args['desc_pos'] = 'before';
110 | }
111 |
112 | $name = $args['name'];
113 |
114 | if ( ! is_array( $name ) && '[]' == substr( $name, -2 ) ) {
115 | $name = array( substr( $name, 0, -2 ), '' );
116 | }
117 |
118 | $args['name'] = $name;
119 |
120 | return $form->input( $args );
121 | }
122 |
123 | }
124 |
125 |
--------------------------------------------------------------------------------
/vendor/scribu/scb-framework/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name" : "scribu/scb-framework",
3 | "description": "A set of useful classes for faster plugin development",
4 | "keywords" : ["wordpress"],
5 | "homepage" : "https://github.com/scribu/wp-scb-framework",
6 | "license" : "GPL-3.0+",
7 | "authors" : [
8 | {
9 | "name" : "Cristi Burcă",
10 | "homepage": "http://scribu.net/"
11 | }
12 | ],
13 | "support" : {
14 | "issues": "https://github.com/scribu/wp-scb-framework/issues",
15 | "source": "https://github.com/scribu/wp-scb-framework",
16 | "wiki": "https://github.com/scribu/wp-scb-framework/wiki"
17 | },
18 | "autoload" : {
19 | "classmap": ["."],
20 | "files" : ["load-composer.php", "Util.php"]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/scribu/scb-framework/load-composer.php:
--------------------------------------------------------------------------------
1 | $callback ) {
57 | if ( dirname( dirname( plugin_basename( $file ) ) ) == $plugin_dir ) {
58 | self::load( false );
59 | call_user_func( $callback );
60 | do_action( 'scb_activation_' . $plugin );
61 | break;
62 | }
63 | }
64 | }
65 |
66 | public static function load( $do_callbacks = true ) {
67 | arsort( self::$candidates );
68 |
69 | $file = key( self::$candidates );
70 |
71 | $path = dirname( $file ) . '/';
72 |
73 | foreach ( self::$classes[ $file ] as $class_name ) {
74 | if ( class_exists( $class_name ) ) {
75 | continue;
76 | }
77 |
78 | $fpath = $path . substr( $class_name, 3 ) . '.php';
79 | if ( file_exists( $fpath ) ) {
80 | include $fpath;
81 | self::$loaded[] = $fpath;
82 | }
83 | }
84 |
85 | if ( $do_callbacks ) {
86 | foreach ( self::$callbacks as $callback ) {
87 | call_user_func( $callback );
88 | }
89 | }
90 | }
91 |
92 | static function get_info() {
93 | arsort( self::$candidates );
94 |
95 | return array( self::$loaded, self::$candidates );
96 | }
97 | }
98 | endif;
99 |
100 | if ( ! function_exists( 'scb_init' ) ) :
101 | function scb_init( $callback = '' ) {
102 | scbLoad4::init( $callback );
103 | }
104 | endif;
105 |
106 |
--------------------------------------------------------------------------------