id
stringlengths 40
40
| text
stringlengths 29
2.03k
| original_text
stringlengths 3
154k
| subdomain
stringclasses 20
values | metadata
dict | emb
listlengths 1.02k
1.02k
|
---|---|---|---|---|---|
24ac1f0c46bf8ac9c21243a01f24900804f831f2 | Wordpress Stackexchange
Q: How do I count how many top level categories there are? I need to calculate some dynamic CSS based on how many top level categories exist. (NOT how many posts are in a category, or how many categories a post belongs to... Nothing about posts at all, just how many top level categories there are)
I am new to PHP, but I couldn't find any WP functions that would return the number I'm looking for.
Thanks in advance for any help.
A: As the Codex says, this is the code block to query for only the Top Level categories — the parents. With this, I used the PHP function count().
<?php
$args = array(
'parent' => 0,
'hide_empty' => 0
);
$categories = get_categories( $args );
echo count( $categories );
?>
| Q: How do I count how many top level categories there are? I need to calculate some dynamic CSS based on how many top level categories exist. (NOT how many posts are in a category, or how many categories a post belongs to... Nothing about posts at all, just how many top level categories there are)
I am new to PHP, but I couldn't find any WP functions that would return the number I'm looking for.
Thanks in advance for any help.
A: As the Codex says, this is the code block to query for only the Top Level categories — the parents. With this, I used the PHP function count().
<?php
$args = array(
'parent' => 0,
'hide_empty' => 0
);
$categories = get_categories( $args );
echo count( $categories );
?>
A: You could do it using get_categories()
<?php
$categories = get_categories('hide_empty=0');
echo count($categories);
?>
Wrap it in a function and return the value instead of echoing it if you need to store it for use in another part of your code.
Edit - I see another version of this was posted already. Either one should work. Mayeenul Islam's was probably a bit more elegant since he uses the count function (which I should have done... and now have). They're basically the same thing.
| wordpress | {
"language": "en",
"length": 215,
"provenance": "stackexchange_00019.jsonl.gz:438050",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/117345"
} | [
0.046051025390625,
-0.01212310791015625,
-0.0005450248718261719,
-0.044647216796875,
0.01265716552734375,
-0.0248870849609375,
0.05914306640625,
0.0238494873046875,
-0.0261383056640625,
0.001659393310546875,
-0.001979827880859375,
0.0050201416015625,
-0.04571533203125,
-0.033233642578125,
-0.007534027099609375,
-0.05108642578125,
0.038299560546875,
-0.00959014892578125,
0.02691650390625,
-0.01019287109375,
-0.018829345703125,
0.0256500244140625,
0.041534423828125,
0.08984375,
0.007213592529296875,
-0.0269927978515625,
0.032928466796875,
-0.04071044921875,
-0.00435638427734375,
-0.053497314453125,
0.005031585693359375,
0.06256103515625,
0.0020618438720703125,
0.015167236328125,
0.0260772705078125,
0.016265869140625,
0.023773193359375,
-0.00003933906555175781,
0.033935546875,
0.00797271728515625,
0.04052734375,
-0.0217132568359375,
0.06671142578125,
-0.016357421875,
0.0222015380859375,
-0.004566192626953125,
0.0204620361328125,
-0.052490234375,
0.02044677734375,
-0.0631103515625,
0.0286102294921875,
0.0222320556640625,
0.0457763671875,
-0.08599853515625,
-0.0157470703125,
0.0224456787109375,
0.031951904296875,
-0.0215606689453125,
0.0416259765625,
-0.034515380859375,
-0.05413818359375,
-0.0195159912109375,
0.055877685546875,
-0.01387786865234375,
-0.031158447265625,
0.00835418701171875,
-0.025726318359375,
0.0181732177734375,
0.029052734375,
-0.050628662109375,
-0.02850341796875,
0.0016355514526367188,
-0.00714111328125,
0.01311492919921875,
-0.0229339599609375,
-0.04132080078125,
0.01322174072265625,
-0.01503753662109375,
0.01403045654296875,
0.031402587890625,
0.002750396728515625,
0.03466796875,
-0.023590087890625,
0.01021575927734375,
0.00336456298828125,
0.033660888671875,
-0.0169525146484375,
-0.03900146484375,
-0.02813720703125,
0.0022602081298828125,
-0.0011005401611328125,
0.036224365234375,
-0.04296875,
0.020751953125,
0.016632080078125,
-0.028289794921875,
0.009002685546875,
0.03826904296875,
-0.042694091796875,
-0.061187744140625,
-0.0267486572265625,
-0.011871337890625,
-0.098388671875,
-0.002330780029296875,
0.04400634765625,
0.052734375,
-0.041778564453125,
-0.005828857421875,
0.07733154296875,
0.031341552734375,
0.0318603515625,
0.06463623046875,
-0.0167999267578125,
-0.01308441162109375,
-0.00559234619140625,
0.00467681884765625,
-0.06390380859375,
0.04730224609375,
-0.01340484619140625,
0.018585205078125,
-0.0185394287109375,
0.0134429931640625,
-0.021026611328125,
0.01087188720703125,
0.0270233154296875,
0.021392822265625,
0.010284423828125,
-0.013092041015625,
0.02984619140625,
0.007343292236328125,
-0.04730224609375,
0.024658203125,
0.045623779296875,
0.0028362274169921875,
-0.00004184246063232422,
-0.015777587890625,
0.00902557373046875,
-0.004299163818359375,
-0.00507354736328125,
-0.028289794921875,
0.0291900634765625,
-0.0007658004760742188,
0.0162353515625,
-0.01045989990234375,
0.0231475830078125,
0.0115966796875,
0.01824951171875,
0.021697998046875,
0.0105133056640625,
-0.04913330078125,
0.06640625,
-0.040557861328125,
0.045654296875,
0.00522613525390625,
-0.06182861328125,
-0.00264739990234375,
-0.015045166015625,
-0.01495361328125,
-0.0390625,
-0.0352783203125,
0.0121307373046875,
0.001110076904296875,
0.004123687744140625,
-0.0174102783203125,
-0.018951416015625,
-0.0103759765625,
-0.033538818359375,
0.00774383544921875,
0.0266265869140625,
-0.019744873046875,
0.041534423828125,
-0.00848388671875,
0.042938232421875,
0.004047393798828125,
0.00695037841796875,
0.00287628173828125,
-0.0360107421875,
-0.019927978515625,
0.04736328125,
0.0225067138671875,
-0.0066986083984375,
-0.0244598388671875,
0.023193359375,
0.0117950439453125,
-0.0098419189453125,
-0.0015954971313476562,
0.0033111572265625,
0.0220489501953125,
0.003261566162109375,
0.017242431640625,
-0.006107330322265625,
0.01678466796875,
-0.01678466796875,
-0.0172882080078125,
0.0220947265625,
0.023345947265625,
-0.0206756591796875,
0.0179290771484375,
0.005710601806640625,
-0.037506103515625,
0.0241241455078125,
0.004100799560546875,
-0.0204315185546875,
-0.0162506103515625,
-0.01971435546875,
-0.0105743408203125,
0.0082550048828125,
0.01849365234375,
0.00429534912109375,
0.022735595703125,
0.0039215087890625,
-0.0102691650390625,
-0.006572723388671875,
-0.042510986328125,
-0.0234375,
0.00400543212890625,
0.0034961700439453125,
-0.01222991943359375,
-0.01336669921875,
-0.008636474609375,
-0.02508544921875,
0.0233306884765625,
-0.0421142578125,
0.0196075439453125,
0.040679931640625,
0.0235748291015625,
-0.037506103515625,
-0.01537322998046875,
0.0135498046875,
0.040130615234375,
-0.09124755859375,
-0.0018138885498046875,
0.0355224609375,
0.01202392578125,
-0.0477294921875,
-0.0132293701171875,
-0.016021728515625,
-0.038360595703125,
-0.002628326416015625,
0.057525634765625,
0.0445556640625,
0.0222320556640625,
-0.01702880859375,
-0.024688720703125,
0.0615234375,
-0.06982421875,
-0.02825927734375,
-0.00701904296875,
-0.0170440673828125,
-0.0021686553955078125,
0.048828125,
0.01201629638671875,
0.01177978515625,
0.0018024444580078125,
0.0259857177734375,
0.0190582275390625,
0.01163482666015625,
-0.01357269287109375,
-0.018524169921875,
0.01971435546875,
0.032867431640625,
-0.045440673828125,
-0.06536865234375,
-0.0069427490234375,
0.0128936767578125,
-0.00853729248046875,
0.00969696044921875,
0.004749298095703125,
-0.02679443359375,
0.006450653076171875,
0.0237884521484375,
-0.004940032958984375,
0.003932952880859375,
-0.006320953369140625,
-0.03875732421875,
0.0242767333984375,
-0.0211029052734375,
0.007080078125,
0.0206451416015625,
-0.01192474365234375,
-0.026275634765625,
0.062225341796875,
-0.0259246826171875,
-0.0263824462890625,
-0.05859375,
-0.059539794921875,
-0.01324462890625,
0.00946044921875,
-0.002197265625,
0.0070343017578125,
0.03411865234375,
0.0179290771484375,
-0.01016998291015625,
0.00824737548828125,
0.01309967041015625,
0.003467559814453125,
0.01678466796875,
-0.0268402099609375,
0.03485107421875,
-0.0177764892578125,
0.041473388671875,
0.05462646484375,
-0.0196685791015625,
0.016204833984375,
-0.0014753341674804688,
0.0172119140625,
-0.0022735595703125,
0.015655517578125,
-0.004726409912109375,
-0.007801055908203125,
-0.03155517578125,
0.00933837890625,
0.0277252197265625,
0.040130615234375,
0.00482940673828125,
-0.035552978515625,
-0.0157318115234375,
0.005096435546875,
-0.09100341796875,
-0.06781005859375,
0.0244903564453125,
-0.05126953125,
0.0151519775390625,
0.00453948974609375,
-0.03466796875,
-0.027801513671875,
0.040863037109375,
-0.00771331787109375,
0.003997802734375,
-0.04278564453125,
-0.01381683349609375,
-0.041229248046875,
-0.049072265625,
-0.0027256011962890625,
0.0189208984375,
-0.0117645263671875,
0.007587432861328125,
0.059600830078125,
0.0018205642700195312,
-0.08758544921875,
-0.02105712890625,
0.032684326171875,
-0.0161895751953125,
0.024017333984375,
0.005615234375,
0.01441192626953125,
-0.02020263671875,
0.01425933837890625,
-0.05419921875,
-0.0033397674560546875,
0.00978851318359375,
-0.017547607421875,
-0.0104522705078125,
-0.00942230224609375,
0.01494598388671875,
0.0062103271484375,
0.005527496337890625,
0.0027408599853515625,
0.0166473388671875,
-0.0263671875,
-0.00446319580078125,
-0.0006699562072753906,
-0.0228424072265625,
-0.0154266357421875,
-0.01129913330078125,
0.0064849853515625,
-0.01491546630859375,
0.011932373046875,
-0.0022945404052734375,
-0.0014820098876953125,
-0.00445556640625,
-0.02850341796875,
0.0556640625,
-0.00231170654296875,
0.007106781005859375,
-0.002899169921875,
-0.018035888671875,
-0.03387451171875,
-0.0043487548828125,
-0.04351806640625,
0.00424957275390625,
-0.0250396728515625,
0.021697998046875,
-0.030059814453125,
-0.068359375,
0.06524658203125,
0.0245208740234375,
-0.0003402233123779297,
-0.00966644287109375,
-0.042144775390625,
0.03173828125,
0.09716796875,
-0.0012683868408203125,
-0.032440185546875,
-0.0595703125,
0.0116424560546875,
-0.0283355712890625,
-0.044586181640625,
0.022308349609375,
0.0016775131225585938,
-0.11053466796875,
0.0049591064453125,
0.00601959228515625,
-0.038299560546875,
-0.02081298828125,
0.01282501220703125,
-0.08172607421875,
-0.033233642578125,
0.034942626953125,
-0.039764404296875,
0.01512908935546875,
-0.0205841064453125,
-0.007709503173828125,
-0.031341552734375,
-0.017120361328125,
-0.0201873779296875,
-0.01181793212890625,
0.00363922119140625,
-0.056427001953125,
-0.006824493408203125,
0.01323699951171875,
0.005741119384765625,
0.005222320556640625,
0.01534271240234375,
0.01236724853515625,
0.03521728515625,
-0.01226043701171875,
0.0133209228515625,
-0.003337860107421875,
-0.03057861328125,
-0.01097869873046875,
-0.0218353271484375,
-0.0352783203125,
-0.03594970703125,
0.003704071044921875,
0.03143310546875,
-0.0159454345703125,
0.00991058349609375,
-0.025543212890625,
0.0050506591796875,
0.00632476806640625,
-0.0216064453125,
-0.037933349609375,
-0.003520965576171875,
-0.0174102783203125,
-0.0001327991485595703,
-0.0158233642578125,
-0.0180816650390625,
0.030426025390625,
0.01396942138671875,
-0.024200439453125,
0.0157928466796875,
0.06732177734375,
0.00833892822265625,
-0.0196533203125,
-0.09600830078125,
-0.0188751220703125,
0.042724609375,
-0.0188140869140625,
0.006427764892578125,
0.004970550537109375,
-0.04290771484375,
0.0711669921875,
0.0192413330078125,
0.0289764404296875,
-0.00426483154296875,
0.0232086181640625,
0.0211029052734375,
-0.0032291412353515625,
0.0157928466796875,
0.024658203125,
-0.0208587646484375,
0.0015621185302734375,
-0.0248260498046875,
0.0191192626953125,
-0.0124359130859375,
0.007381439208984375,
0.0141448974609375,
-0.0227203369140625,
-0.0219268798828125,
-0.029327392578125,
0.005672454833984375,
-0.022918701171875,
0.045074462890625,
0.02947998046875,
0.00007534027099609375,
0.040313720703125,
0.0288848876953125,
0.0257415771484375,
0.032012939453125,
0.0274505615234375,
-0.0284576416015625,
0.040191650390625,
0.01204681396484375,
0.00009530782699584961,
0.0224761962890625,
-0.004302978515625,
0.0268096923828125,
-0.006160736083984375,
-0.07354736328125,
0.0443115234375,
-0.01971435546875,
-0.01715087890625,
0.04400634765625,
-0.006259918212890625,
0.02349853515625,
-0.01001739501953125,
-0.02154541015625,
-0.00446319580078125,
-0.0287017822265625,
-0.046234130859375,
-0.03460693359375,
0.00183868408203125,
-0.0026912689208984375,
-0.004787445068359375,
0.040313720703125,
0.015106201171875,
0.0238494873046875,
0.032196044921875,
-0.02154541015625,
-0.0106964111328125,
0.00945281982421875,
0.029632568359375,
0.0399169921875,
-0.0176544189453125,
-0.003467559814453125,
-0.0095672607421875,
0.0213165283203125,
-0.066162109375,
-0.04559326171875,
0.035614013671875,
0.06756591796875,
0.0207977294921875,
-0.000012874603271484375,
-0.007053375244140625,
0.002948760986328125,
-0.031768798828125,
-0.0200653076171875,
-0.017425537109375,
0.0081329345703125,
-0.0185089111328125,
-0.0196990966796875,
0.00785064697265625,
0.034912109375,
-0.01522064208984375,
0.0016584396362304688,
-0.034210205078125,
0.0032634735107421875,
0.0226898193359375,
-0.021728515625,
0.01239013671875,
0.0081329345703125,
-0.1014404296875,
-0.0266571044921875,
0.024658203125,
-0.038604736328125,
-0.043426513671875,
-0.0033740997314453125,
-0.050079345703125,
0.007518768310546875,
-0.0093841552734375,
0.055450439453125,
-0.004123687744140625,
-0.0521240234375,
0.07989501953125,
-0.00251007080078125,
0.054840087890625,
0.036041259765625,
-0.040435791015625,
-0.01092529296875,
-0.06298828125,
-0.02978515625,
0.0284881591796875,
0.01285552978515625,
-0.0438232421875,
-0.00010335445404052734,
0.01081085205078125,
0.0106658935546875,
-0.006725311279296875,
0.002536773681640625,
-0.01277923583984375,
0.0282135009765625,
0.005954742431640625,
0.0261688232421875,
0.004901885986328125,
0.0205078125,
0.004638671875,
-0.01557159423828125,
0.00783538818359375,
0.030548095703125,
0.02960205078125,
-0.032318115234375,
0.039459228515625,
0.00872039794921875,
-0.03326416015625,
-0.0192413330078125,
-0.01251983642578125,
-0.06494140625,
0.00738525390625,
-0.0156707763671875,
0.046661376953125,
-0.01134490966796875,
0.0162811279296875,
0.00926971435546875,
-0.05853271484375,
-0.0227508544921875,
-0.0133819580078125,
0.07855224609375,
-0.0123138427734375,
0.019134521484375,
0.00978851318359375,
-0.0261077880859375,
0.036376953125,
-0.00811767578125,
0.043975830078125,
0.01727294921875,
-0.0521240234375,
0.0599365234375,
0.02862548828125,
0.004756927490234375,
0.0114593505859375,
0.021240234375,
0.00028443336486816406,
-0.03082275390625,
-0.0200653076171875,
0.035888671875,
0.009674072265625,
0.047027587890625,
-0.0164642333984375,
0.00995635986328125,
0.0260772705078125,
-0.022216796875,
-0.04241943359375,
0.0253448486328125,
0.0095672607421875,
-0.025360107421875,
-0.0245208740234375,
-0.01824951171875,
-0.014312744140625,
-0.004085540771484375,
0.01363372802734375,
-0.0007748603820800781,
-0.052520751953125,
0.0146026611328125,
-0.014373779296875,
-0.0160675048828125,
-0.006885528564453125,
-0.0290374755859375,
0.0115814208984375,
0.0154876708984375,
0.056976318359375,
0.02166748046875,
0.02349853515625,
-0.031463623046875,
-0.00557708740234375,
0.03173828125,
-0.0166778564453125,
0.0008502006530761719,
0.00829315185546875,
0.01031494140625,
-0.035308837890625,
0.0645751953125,
-0.046600341796875,
0.01904296875,
0.0225372314453125,
-0.0089874267578125,
0.006351470947265625,
0.0589599609375,
-0.01837158203125,
0.022674560546875,
0.0188140869140625,
-0.04461669921875,
0.008087158203125,
0.016754150390625,
0.0220947265625,
-0.022247314453125,
-0.057098388671875,
-0.0015344619750976562,
-0.060577392578125,
0.0288543701171875,
-0.01172637939453125,
0.0186767578125,
0.08453369140625,
-0.019378662109375,
-0.026824951171875,
0.041046142578125,
0.053985595703125,
-0.0282745361328125,
-0.00946044921875,
0.042236328125,
-0.0243072509765625,
0.0254974365234375,
0.0201416015625,
0.0579833984375,
0.01425933837890625,
0.0082855224609375,
-0.03265380859375,
0.0028629302978515625,
-0.02691650390625,
0.0131072998046875,
0.04705810546875,
-0.01302337646484375,
-0.01114654541015625,
-0.01934814453125,
-0.035858154296875,
0.049468994140625,
0.02923583984375,
0.007053375244140625,
-0.051055908203125,
-0.0282135009765625,
-0.015380859375,
0.039642333984375,
0.035430908203125,
-0.0007472038269042969,
0.004425048828125,
-0.014892578125,
0.054107666015625,
0.044677734375,
0.006103515625,
0.0155029296875,
0.00044989585876464844,
0.0014200210571289062,
0.0308837890625,
0.0039005279541015625,
0.04638671875,
-0.01474761962890625,
-0.015716552734375,
0.0203857421875,
0.015838623046875,
-0.0096282958984375,
0.0018558502197265625,
0.0208892822265625,
-0.05975341796875,
0.0030460357666015625,
0.03631591796875,
0.025360107421875,
-0.0206298828125,
0.07318115234375,
0.0224456787109375,
-0.0469970703125,
-0.04168701171875,
-0.038543701171875,
0.03741455078125,
-0.007350921630859375,
0.01302337646484375,
0.0213623046875,
0.0188751220703125,
0.0556640625,
-0.032135009765625,
-0.003543853759765625,
0.001434326171875,
-0.0261077880859375,
0.056243896484375,
0.0218963623046875,
0.025787353515625,
-0.0557861328125,
-0.033111572265625,
0.0261993408203125,
0.06915283203125,
-0.0418701171875,
-0.102294921875,
0.004833221435546875,
0.003864288330078125,
0.01323699951171875,
0.05938720703125,
0.05108642578125,
0.03631591796875,
0.08746337890625,
-0.0299530029296875,
-0.048126220703125,
0.0260162353515625,
0.0276641845703125,
0.0152130126953125,
-0.0091094970703125,
0.0166168212890625,
-0.06646728515625,
-0.0184478759765625,
-0.0299530029296875,
0.017578125,
0.0714111328125,
0.020843505859375,
0.0386962890625,
-0.0726318359375,
-0.03228759765625,
0.02410888671875,
-0.0095977783203125,
-0.01186370849609375,
-0.029998779296875,
0.0352783203125,
-0.0016012191772460938,
-0.002735137939453125,
0.003147125244140625,
-0.0097808837890625,
-0.0006923675537109375,
0.0362548828125,
0.0560302734375,
0.0171661376953125,
-0.0254974365234375,
0.0254974365234375,
-0.004375457763671875,
-0.0234222412109375,
-0.0130157470703125,
0.0202484130859375,
0.0292510986328125,
0.00951385498046875,
-0.005962371826171875,
0.0633544921875,
0.0300140380859375,
-0.0057220458984375,
-0.004772186279296875,
0.01508331298828125,
-0.047271728515625,
0.01380157470703125,
0.00823974609375,
0.042083740234375,
0.03253173828125,
-0.0576171875,
-0.0141754150390625,
-0.010986328125,
-0.034698486328125,
0.04583740234375,
0.032989501953125,
-0.03814697265625,
0.032135009765625,
-0.0224151611328125,
-0.048980712890625,
0.049102783203125,
-0.0007920265197753906,
0.01290130615234375,
0.01537322998046875,
-0.0079193115234375,
-0.0158843994140625,
-0.0104217529296875,
-0.004497528076171875,
0.01032257080078125,
0.0247039794921875,
0.047882080078125,
0.0462646484375,
-0.005035400390625,
0.02099609375,
-0.00914764404296875,
0.0242919921875,
-0.0333251953125,
-0.01593017578125,
0.0438232421875,
-0.002468109130859375,
-0.0135498046875,
-0.015045166015625,
-0.0667724609375,
0.0128326416015625,
0.04925537109375,
-0.0171661376953125,
0.003940582275390625,
0.004627227783203125,
0.01751708984375,
-0.0274810791015625,
0.03594970703125,
-0.020050048828125,
-0.003513336181640625,
-0.012481689453125,
-0.0355224609375,
0.028900146484375,
0.039642333984375,
0.02471923828125,
0.039520263671875,
-0.04083251953125,
-0.007633209228515625,
0.0208282470703125,
-0.02899169921875,
0.0006914138793945312,
0.0237579345703125,
-0.0137176513671875,
-0.0285491943359375,
0.0450439453125,
-0.00801849365234375,
0.0048370361328125,
0.016632080078125,
0.0256500244140625,
0.038177490234375,
-0.05950927734375,
-0.0158843994140625,
0.074951171875,
0.046051025390625,
-0.023345947265625,
0.0282745361328125,
0.032562255859375,
-0.04351806640625,
0.0233612060546875,
-0.003528594970703125,
-0.04144287109375,
-0.036376953125,
0.01361846923828125,
0.0139923095703125,
0.016143798828125,
0.0076751708984375,
-0.01280975341796875,
0.00733184814453125,
0.024688720703125,
0.0009851455688476562,
-0.0265655517578125,
0.03790283203125,
-0.041351318359375,
0.019561767578125,
-0.035980224609375,
-0.0081329345703125,
0.0251007080078125,
0.0193939208984375,
-0.07208251953125,
0.042205810546875,
-0.0264892578125,
-0.061676025390625,
-0.01678466796875,
0.051300048828125,
0.0491943359375,
-0.052734375,
0.00321197509765625,
0.016387939453125,
0.03326416015625,
0.06939697265625,
0.016632080078125,
0.01812744140625,
0.00978851318359375,
0.0178985595703125,
-0.05975341796875,
-0.03363037109375,
0.06768798828125,
-0.046600341796875,
-0.0648193359375,
-0.025146484375,
0.0302734375,
0.048736572265625,
-0.01415252685546875,
-0.045867919921875,
0.052093505859375,
-0.0299835205078125,
-0.02484130859375,
-0.052459716796875,
0.036376953125,
-0.01617431640625,
0.010406494140625,
-0.0095977783203125,
0.002857208251953125,
0.0277557373046875,
0.04364013671875,
0.04205322265625,
-0.0098114013671875,
0.04132080078125,
0.0200958251953125,
-0.09625244140625,
0.01873779296875,
0.0034160614013671875,
0.036712646484375,
0.002658843994140625,
0.0002257823944091797,
0.0261383056640625,
0.044830322265625,
-0.042236328125,
0.029632568359375,
-0.00937652587890625,
0.0220489501953125,
0.0189361572265625,
-0.0709228515625,
-0.03436279296875,
-0.0648193359375,
0.020599365234375,
-0.01303863525390625,
0.0149688720703125,
-0.00638580322265625,
-0.044036865234375,
-0.00933074951171875,
-0.01206207275390625,
0.0117645263671875,
0.0210418701171875,
-0.04364013671875,
0.01216888427734375,
-0.006565093994140625,
-0.0025615692138671875,
-0.021148681640625,
-0.036712646484375,
-0.032989501953125,
-0.033233642578125,
-0.048065185546875,
0.00803375244140625,
0.0021991729736328125,
0.0187530517578125,
-0.05010986328125,
0.0118255615234375,
-0.03631591796875,
-0.0182342529296875,
0.006954193115234375,
-0.06890869140625,
0.006336212158203125,
-0.0145721435546875,
0.00185394287109375,
-0.0030879974365234375,
0.0215911865234375,
0.00104522705078125,
0.0150299072265625,
-0.0106658935546875,
0.00893402099609375,
-0.0302734375,
0.0166778564453125,
0.01551055908203125,
0.01390838623046875,
-0.02386474609375,
0.051239013671875,
0.0369873046875,
0.038238525390625,
0.01200103759765625,
0.051116943359375,
0.0010595321655273438,
0.050506591796875,
-0.014617919921875,
-0.0306854248046875,
-0.0003058910369873047,
-0.038299560546875,
0.01380157470703125,
0.00653839111328125,
0.008880615234375,
-0.0257568359375,
0.01474761962890625,
0.046295166015625,
0.00969696044921875,
0.00958251953125
]
|
a3ac743c151a177b955429c6703b0045d36582d9 | Wordpress Stackexchange
Q: How to remove custom post type archive I have a custom post type called "recipe" with the has_archive parameter set to true. Visiting mysite.com/recipe/ gives a basic archive list of all the recipes posted and a page title of "Recipes". So far so good.
Now I'm looking to disable that recipe archive page (but keep individual recipe links working). My first thought was to try setting has_archive to false, which sounds like it should do the trick. Nope. The only difference this makes is the page title which for some reason becomes the name of the site. The actual archive is still displayed.
What is the best way to actually remove that archive completely? Is there a parameter of register_post_type that will achieve this or is it impossible and a case of a custom page template with a redirect in it?
Thanks.
A: The has_archive parameter for register_post_type() does exactly what you expect it to do. However, it modifies rewrite rules when set. So, if you change it to false, you'll need to flush your rewrite rules in order for the archive index display to be removed entirely.
| Q: How to remove custom post type archive I have a custom post type called "recipe" with the has_archive parameter set to true. Visiting mysite.com/recipe/ gives a basic archive list of all the recipes posted and a page title of "Recipes". So far so good.
Now I'm looking to disable that recipe archive page (but keep individual recipe links working). My first thought was to try setting has_archive to false, which sounds like it should do the trick. Nope. The only difference this makes is the page title which for some reason becomes the name of the site. The actual archive is still displayed.
What is the best way to actually remove that archive completely? Is there a parameter of register_post_type that will achieve this or is it impossible and a case of a custom page template with a redirect in it?
Thanks.
A: The has_archive parameter for register_post_type() does exactly what you expect it to do. However, it modifies rewrite rules when set. So, if you change it to false, you'll need to flush your rewrite rules in order for the archive index display to be removed entirely.
| wordpress | {
"language": "en",
"length": 189,
"provenance": "stackexchange_00019.jsonl.gz:438057",
"question_score": "19",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/117368"
} | [
0.066162109375,
0.0192108154296875,
0.002765655517578125,
0.0174407958984375,
0.019195556640625,
-0.051513671875,
0.09503173828125,
-0.04205322265625,
-0.03436279296875,
0.00864410400390625,
0.0968017578125,
-0.0413818359375,
0.0192108154296875,
-0.092041015625,
0.031158447265625,
0.00946044921875,
0.03009033203125,
-0.005706787109375,
0.026153564453125,
-0.01457977294921875,
0.037994384765625,
0.0016574859619140625,
0.00505828857421875,
0.02947998046875,
0.01274871826171875,
0.0245361328125,
0.05059814453125,
-0.0009722709655761719,
0.00911712646484375,
-0.011077880859375,
0.0243682861328125,
-0.0247344970703125,
0.0270843505859375,
0.045684814453125,
-0.045135498046875,
0.0011396408081054688,
-0.052490234375,
0.041259765625,
-0.01177215576171875,
0.02081298828125,
-0.0003609657287597656,
-0.00345611572265625,
0.02313232421875,
-0.051177978515625,
-0.00371551513671875,
-0.006053924560546875,
0.014678955078125,
-0.0214996337890625,
0.01154327392578125,
0.0152435302734375,
-0.016326904296875,
0.03363037109375,
0.00283050537109375,
-0.030853271484375,
-0.004810333251953125,
-0.005435943603515625,
0.0088348388671875,
-0.0124053955078125,
0.0262451171875,
-0.030517578125,
-0.017730712890625,
0.010345458984375,
0.023529052734375,
0.02105712890625,
0.019287109375,
0.01291656494140625,
0.0298614501953125,
0.01983642578125,
-0.1026611328125,
-0.01129150390625,
0.044281005859375,
-0.059814453125,
0.033203125,
-0.0173492431640625,
-0.037750244140625,
-0.046875,
0.0193939208984375,
-0.04229736328125,
-0.0012884140014648438,
-0.019012451171875,
-0.03485107421875,
0.0023136138916015625,
-0.00951385498046875,
-0.0272674560546875,
-0.004711151123046875,
-0.007457733154296875,
-0.0232696533203125,
0.00423431396484375,
-0.008056640625,
-0.0032215118408203125,
0.00787353515625,
-0.0667724609375,
0.00832366943359375,
0.0293731689453125,
0.0139007568359375,
-0.0253143310546875,
0.06829833984375,
0.044891357421875,
0.0018968582153320312,
-0.01800537109375,
0.03338623046875,
-0.074462890625,
0.042083740234375,
-0.0308837890625,
0.0113677978515625,
0.0517578125,
0.0032558441162109375,
0.035308837890625,
0.061798095703125,
0.0007500648498535156,
0.0208740234375,
0.0321044921875,
-0.034088134765625,
-0.0170745849609375,
-0.0182952880859375,
0.032867431640625,
-0.042022705078125,
-0.006023406982421875,
-0.002117156982421875,
0.031219482421875,
-0.0009975433349609375,
0.0287322998046875,
0.022247314453125,
-0.013092041015625,
-0.0022449493408203125,
0.01806640625,
-0.0092926025390625,
-0.054901123046875,
0.0294647216796875,
0.041900634765625,
-0.050811767578125,
-0.013275146484375,
0.03521728515625,
0.015106201171875,
0.0265350341796875,
-0.040130615234375,
0.021270751953125,
-0.0161895751953125,
-0.0206756591796875,
0.0235443115234375,
0.00972747802734375,
-0.034881591796875,
-0.00328826904296875,
-0.0014162063598632812,
-0.037811279296875,
0.02996826171875,
0.016754150390625,
0.003154754638671875,
-0.03411865234375,
-0.05609130859375,
-0.0157623291015625,
-0.041412353515625,
0.05560302734375,
-0.00717926025390625,
-0.0618896484375,
-0.038116455078125,
0.00463104248046875,
-0.01186370849609375,
-0.039215087890625,
-0.050537109375,
0.024078369140625,
-0.0072174072265625,
0.001129150390625,
-0.0014505386352539062,
-0.0521240234375,
0.0226287841796875,
-0.017120361328125,
-0.012969970703125,
0.0187225341796875,
0.03668212890625,
-0.010162353515625,
-0.030517578125,
0.0033855438232421875,
0.00769805908203125,
-0.01025390625,
0.022186279296875,
0.02838134765625,
0.003887176513671875,
-0.0142822265625,
0.08697509765625,
0.02032470703125,
-0.029510498046875,
-0.0018720626831054688,
-0.017913818359375,
-0.07379150390625,
0.046722412109375,
0.0228271484375,
0.06561279296875,
-0.0012388229370117188,
0.01371002197265625,
0.0693359375,
0.03594970703125,
-0.0292510986328125,
0.01554107666015625,
0.0246734619140625,
-0.0190887451171875,
-0.00806427001953125,
-0.0237274169921875,
0.0010480880737304688,
-0.0035800933837890625,
-0.012176513671875,
0.01535797119140625,
0.0012683868408203125,
0.0112457275390625,
-0.044158935546875,
0.0289306640625,
-0.034271240234375,
0.045623779296875,
-0.008514404296875,
0.02972412109375,
0.0296478271484375,
0.02838134765625,
-0.06842041015625,
0.048492431640625,
0.0028743743896484375,
-0.020233154296875,
0.00026988983154296875,
0.0113067626953125,
-0.033203125,
0.02154541015625,
-0.017547607421875,
-0.029083251953125,
-0.02001953125,
0.024261474609375,
0.06024169921875,
0.0027065277099609375,
-0.0133209228515625,
-0.0238494873046875,
0.01395416259765625,
0.01180267333984375,
-0.07366943359375,
0.05426025390625,
0.03607177734375,
0.0126190185546875,
-0.03271484375,
-0.0088958740234375,
-0.007389068603515625,
-0.081787109375,
0.0012121200561523438,
0.07122802734375,
0.0186767578125,
0.05084228515625,
-0.019287109375,
0.0228729248046875,
0.036346435546875,
-0.005428314208984375,
0.027496337890625,
-0.0025768280029296875,
0.0283966064453125,
0.05706787109375,
-0.019805908203125,
0.0093841552734375,
0.009063720703125,
0.01611328125,
0.05120849609375,
0.0032329559326171875,
0.0087738037109375,
-0.00379180908203125,
0.0447998046875,
0.01544952392578125,
-0.0134735107421875,
0.06903076171875,
0.02716064453125,
0.0195465087890625,
0.046661376953125,
0.0243377685546875,
0.057830810546875,
0.0517578125,
-0.043365478515625,
0.019378662109375,
0.021087646484375,
0.040618896484375,
-0.00370025634765625,
0.00677490234375,
0.064697265625,
0.0012874603271484375,
-0.043060302734375,
0.0106048583984375,
0.007656097412109375,
0.0016622543334960938,
-0.006500244140625,
0.023468017578125,
-0.0291748046875,
-0.0007338523864746094,
-0.011688232421875,
-0.09405517578125,
0.01220703125,
0.05902099609375,
-0.007350921630859375,
-0.0036773681640625,
0.004985809326171875,
0.035064697265625,
0.01296234130859375,
0.0167083740234375,
0.020538330078125,
-0.006259918212890625,
0.00762939453125,
-0.06805419921875,
0.044952392578125,
-0.03729248046875,
0.05877685546875,
0.07305908203125,
-0.0009222030639648438,
0.0193634033203125,
0.00547027587890625,
0.0191650390625,
0.0249786376953125,
0.0203857421875,
-0.0030612945556640625,
-0.018157958984375,
-0.04229736328125,
-0.01433563232421875,
0.03155517578125,
0.02825927734375,
0.02081298828125,
-0.014617919921875,
0.00580596923828125,
0.0352783203125,
-0.0404052734375,
-0.06500244140625,
0.0758056640625,
-0.02545166015625,
-0.0111846923828125,
0.0084991455078125,
-0.0201568603515625,
-0.037750244140625,
0.04046630859375,
-0.007373809814453125,
0.0139617919921875,
-0.01505279541015625,
-0.01493072509765625,
-0.02508544921875,
-0.054168701171875,
-0.031402587890625,
0.0157470703125,
-0.00408935546875,
0.00926971435546875,
0.08660888671875,
0.01068878173828125,
-0.07904052734375,
0.0222320556640625,
-0.038665771484375,
-0.02496337890625,
0.06689453125,
0.01459503173828125,
-0.0222930908203125,
0.0228424072265625,
0.00920867919921875,
0.008880615234375,
0.0291748046875,
-0.01523590087890625,
-0.0306549072265625,
0.004985809326171875,
0.025360107421875,
0.00981903076171875,
0.00923919677734375,
0.01385498046875,
-0.004795074462890625,
-0.02056884765625,
-0.05804443359375,
-0.0841064453125,
-0.0011005401611328125,
-0.06292724609375,
-0.01263427734375,
0.050689697265625,
0.0037288665771484375,
-0.06170654296875,
0.045745849609375,
0.01470184326171875,
-0.0020599365234375,
0.060272216796875,
-0.047760009765625,
0.049835205078125,
-0.0019855499267578125,
0.00437164306640625,
-0.0621337890625,
0.09832763671875,
-0.007007598876953125,
0.0221405029296875,
0.06689453125,
-0.0120849609375,
0.034393310546875,
-0.053070068359375,
0.0124053955078125,
-0.035491943359375,
0.035064697265625,
-0.03955078125,
0.0203857421875,
-0.0250701904296875,
-0.011627197265625,
0.00396728515625,
0.06866455078125,
-0.04656982421875,
-0.0038299560546875,
0.02691650390625,
0.0160675048828125,
0.01458740234375,
-0.0321044921875,
-0.0413818359375,
-0.02850341796875,
-0.068359375,
-0.005924224853515625,
-0.034637451171875,
-0.0255126953125,
-0.004123687744140625,
-0.060577392578125,
-0.0259246826171875,
-0.051483154296875,
0.04010009765625,
-0.000047206878662109375,
0.0004246234893798828,
0.0025272369384765625,
0.0007181167602539062,
-0.03594970703125,
-0.04046630859375,
-0.0015649795532226562,
-0.08685302734375,
0.000499725341796875,
-0.01544189453125,
0.0458984375,
0.0164031982421875,
-0.041259765625,
0.0006947517395019531,
0.037384033203125,
0.01461029052734375,
-0.007350921630859375,
-0.0089874267578125,
-0.0188446044921875,
-0.03277587890625,
-0.015167236328125,
-0.0273590087890625,
-0.0227203369140625,
0.019256591796875,
0.01708984375,
-0.03631591796875,
0.00981903076171875,
-0.030029296875,
-0.01110076904296875,
0.0275115966796875,
-0.0447998046875,
-0.051422119140625,
-0.04345703125,
-0.0290069580078125,
0.0170440673828125,
0.003353118896484375,
-0.0291290283203125,
-0.06121826171875,
-0.059906005859375,
0.0196380615234375,
0.01812744140625,
-0.01555633544921875,
0.00914764404296875,
0.0498046875,
0.01309967041015625,
-0.0248260498046875,
0.011627197265625,
0.032196044921875,
0.01171875,
-0.018402099609375,
0.061614990234375,
0.0208740234375,
0.0211639404296875,
0.009185791015625,
-0.022857666015625,
-0.034088134765625,
-0.01375579833984375,
0.0667724609375,
-0.011810302734375,
-0.01104736328125,
0.0029964447021484375,
-0.058502197265625,
0.06439208984375,
0.017547607421875,
0.020904541015625,
-0.050140380859375,
0.01088714599609375,
0.06396484375,
-0.011260986328125,
-0.0003573894500732422,
-0.058135986328125,
-0.0124053955078125,
0.01049041748046875,
0.033843994140625,
0.00952911376953125,
0.0269317626953125,
-0.0073699951171875,
0.007419586181640625,
-0.03277587890625,
0.0149078369140625,
-0.04498291015625,
-0.026214599609375,
-0.039398193359375,
0.02984619140625,
-0.046142578125,
0.0016450881958007812,
-0.011932373046875,
0.00852203369140625,
-0.0050506591796875,
-0.007373809814453125,
-0.0546875,
-0.027252197265625,
0.004039764404296875,
0.00815582275390625,
0.029571533203125,
-0.0164031982421875,
0.033660888671875,
0.03851318359375,
-0.006793975830078125,
0.0247955322265625,
0.000865936279296875,
0.00711822509765625,
-0.03759765625,
0.00789642333984375,
0.0338134765625,
-0.027130126953125,
0.00605010986328125,
0.031951904296875,
0.046875,
-0.00337982177734375,
-0.0269317626953125,
0.0119781494140625,
-0.01312255859375,
0.06121826171875,
0.0297698974609375,
-0.046661376953125,
-0.004779815673828125,
0.020782470703125,
-0.01763916015625,
-0.0288543701171875,
0.01068878173828125,
0.0401611328125,
0.048095703125,
-0.00777435302734375,
-0.035888671875,
0.0029964447021484375,
-0.0450439453125,
-0.005664825439453125,
0.039825439453125,
0.019927978515625,
-0.032196044921875,
-0.01250457763671875,
-0.0274200439453125,
0.00421142578125,
-0.034912109375,
-0.028045654296875,
0.0068511962890625,
-0.041046142578125,
-0.01323699951171875,
0.0325927734375,
-0.06939697265625,
0.0101318359375,
0.0266571044921875,
0.012420654296875,
-0.03216552734375,
-0.0184326171875,
-0.00537109375,
0.0166778564453125,
-0.02850341796875,
0.0064544677734375,
0.039825439453125,
-0.01081085205078125,
0.0039520263671875,
-0.01220703125,
-0.00518035888671875,
-0.022125244140625,
0.0113525390625,
0.019989013671875,
-0.01372528076171875,
-0.0338134765625,
0.0087738037109375,
-0.040771484375,
-0.0102386474609375,
-0.06256103515625,
-0.07318115234375,
-0.02996826171875,
0.0052032470703125,
-0.01186370849609375,
0.0098876953125,
-0.0029888153076171875,
0.0030727386474609375,
-0.0043792724609375,
0.02154541015625,
-0.006439208984375,
0.004055023193359375,
-0.02313232421875,
0.05340576171875,
0.0031909942626953125,
0.05242919921875,
0.0019464492797851562,
0.0126800537109375,
0.003875732421875,
-0.0053253173828125,
0.015228271484375,
-0.0295867919921875,
-0.0246429443359375,
-0.00345611572265625,
-0.002899169921875,
0.018707275390625,
0.018829345703125,
-0.006839752197265625,
-0.02569580078125,
-0.0142669677734375,
-0.01044464111328125,
-0.044158935546875,
0.07568359375,
-0.0174407958984375,
0.0260162353515625,
-0.0511474609375,
-0.0263519287109375,
0.06842041015625,
0.01271820068359375,
-0.0022029876708984375,
-0.00017058849334716797,
-0.03472900390625,
0.0203704833984375,
0.03265380859375,
-0.006633758544921875,
0.01313018798828125,
0.0304718017578125,
0.01097869873046875,
0.04925537109375,
-0.0020732879638671875,
0.01425933837890625,
0.024444580078125,
0.01128387451171875,
-0.01470947265625,
0.0006608963012695312,
0.002925872802734375,
-0.01229095458984375,
0.023712158203125,
-0.0023345947265625,
0.003391265869140625,
0.01171875,
0.06658935546875,
0.069091796875,
-0.09173583984375,
-0.0028514862060546875,
0.029083251953125,
0.005649566650390625,
0.004650115966796875,
-0.004833221435546875,
0.0099029541015625,
0.027191162109375,
-0.006420135498046875,
-0.0017604827880859375,
-0.03961181640625,
-0.0177459716796875,
0.021453857421875,
0.021881103515625,
0.01354217529296875,
0.047943115234375,
-0.002960205078125,
-0.0232391357421875,
-0.0264739990234375,
0.019500732421875,
0.00408172607421875,
-0.0165557861328125,
0.0184478759765625,
0.007556915283203125,
-0.01178741455078125,
-0.04071044921875,
0.01129913330078125,
-0.03375244140625,
-0.022308349609375,
0.03741455078125,
0.0199127197265625,
0.0193023681640625,
0.0280303955078125,
-0.01287841796875,
0.0279693603515625,
-0.006366729736328125,
-0.03460693359375,
-0.0489501953125,
-0.048126220703125,
0.01467132568359375,
0.0115966796875,
-0.019317626953125,
0.0260467529296875,
-0.005817413330078125,
-0.06903076171875,
-0.021759033203125,
-0.0087890625,
0.08990478515625,
-0.0134124755859375,
-0.023223876953125,
0.03509521484375,
0.0364990234375,
-0.025390625,
-0.021881103515625,
0.037261962890625,
-0.041473388671875,
-0.006610870361328125,
-0.00490570068359375,
-0.01000213623046875,
-0.024383544921875,
-0.0309600830078125,
-0.0345458984375,
0.09710693359375,
0.005222320556640625,
-0.0009508132934570312,
0.0008015632629394531,
0.046478271484375,
-0.0011034011840820312,
0.042938232421875,
-0.004528045654296875,
0.0275726318359375,
0.01206207275390625,
0.01258087158203125,
-0.0292816162109375,
-0.004726409912109375,
-0.01081085205078125,
0.04534912109375,
0.04315185546875,
0.00441741943359375,
0.01401519775390625,
-0.0200042724609375,
0.0037593841552734375,
0.040130615234375,
-0.01093292236328125,
-0.0128326416015625,
-0.00940704345703125,
0.0340576171875,
0.01995849609375,
-0.043212890625,
0.0218048095703125,
0.0100860595703125,
-0.04034423828125,
0.007843017578125,
0.0154571533203125,
0.033233642578125,
-0.00943756103515625,
0.0246124267578125,
0.0186614990234375,
-0.02227783203125,
0.012054443359375,
-0.0179290771484375,
-0.0204925537109375,
0.02392578125,
0.044158935546875,
-0.038360595703125,
-0.009124755859375,
-0.0360107421875,
0.05108642578125,
0.041534423828125,
0.025543212890625,
0.00899505615234375,
0.0103607177734375,
0.02044677734375,
-0.037811279296875,
0.006214141845703125,
0.01229095458984375,
-0.033477783203125,
-0.0022830963134765625,
0.01149749755859375,
0.0248565673828125,
0.0035495758056640625,
0.0146026611328125,
0.026763916015625,
0.0009603500366210938,
-0.011688232421875,
-0.04205322265625,
0.0235748291015625,
0.0015859603881835938,
-0.0231781005859375,
0.0015954971313476562,
-0.0249786376953125,
-0.0167083740234375,
0.018402099609375,
-0.021026611328125,
0.00974273681640625,
-0.0045013427734375,
0.02410888671875,
-0.0139312744140625,
-0.00618743896484375,
-0.0305328369140625,
-0.00849151611328125,
-0.024322509765625,
-0.034454345703125,
0.0008196830749511719,
0.05889892578125,
0.06573486328125,
0.007556915283203125,
0.005710601806640625,
-0.026580810546875,
-0.01885986328125,
0.03607177734375,
-0.054718017578125,
0.040557861328125,
-0.0677490234375,
-0.0654296875,
-0.0347900390625,
0.049530029296875,
0.0406494140625,
-0.01311492919921875,
0.04595947265625,
0.031219482421875,
-0.01617431640625,
0.0092620849609375,
0.03033447265625,
-0.007354736328125,
0.033233642578125,
-0.0295562744140625,
0.0212860107421875,
0.003086090087890625,
-0.0188446044921875,
-0.036468505859375,
-0.0027904510498046875,
0.038482666015625,
-0.0007300376892089844,
0.027130126953125,
0.0064544677734375,
-0.0141754150390625,
0.037261962890625,
0.004520416259765625,
0.057037353515625,
0.033050537109375,
-0.01113128662109375,
-0.0160675048828125,
-0.022491455078125,
-0.0379638671875,
0.028167724609375,
0.041656494140625,
-0.0156707763671875,
0.01090240478515625,
0.034393310546875,
0.0011892318725585938,
0.0025577545166015625,
-0.0107421875,
0.01250457763671875,
0.0039043426513671875,
0.018829345703125,
0.022369384765625,
-0.01204681396484375,
-0.01428985595703125,
0.0217132568359375,
0.031494140625,
-0.0297088623046875,
0.055145263671875,
-0.0228729248046875,
0.00013589859008789062,
0.0234527587890625,
0.05291748046875,
-0.0164794921875,
0.0028667449951171875,
0.006534576416015625,
0.002735137939453125,
0.041290283203125,
-0.0213165283203125,
-0.0350341796875,
-0.007686614990234375,
0.058441162109375,
-0.049713134765625,
0.0012731552124023438,
0.0024089813232421875,
0.0177459716796875,
-0.04998779296875,
-0.0186614990234375,
-0.03851318359375,
-0.05352783203125,
-0.016357421875,
0.0245361328125,
-0.0179443359375,
-0.015655517578125,
-0.0275421142578125,
0.037261962890625,
0.044769287109375,
-0.027008056640625,
0.01300811767578125,
-0.039764404296875,
0.062042236328125,
0.039459228515625,
0.0273895263671875,
-0.01146697998046875,
0.0396728515625,
-0.01195526123046875,
0.01479339599609375,
0.0218963623046875,
0.016265869140625,
0.041961669921875,
-0.0162353515625,
-0.024078369140625,
-0.0160064697265625,
0.00508880615234375,
0.006336212158203125,
-0.0109405517578125,
-0.028564453125,
-0.0177459716796875,
-0.0208892822265625,
0.0231475830078125,
-0.025054931640625,
0.000797271728515625,
0.0002090930938720703,
-0.00853729248046875,
0.012969970703125,
-0.028778076171875,
-0.0267486572265625,
-0.0078582763671875,
0.005767822265625,
-0.00719451904296875,
-0.061004638671875,
0.02734375,
-0.024383544921875,
0.0340576171875,
-0.05206298828125,
-0.03436279296875,
0.00788116455078125,
0.0399169921875,
-0.0220794677734375,
-0.00806427001953125,
-0.045745849609375,
-0.0032634735107421875,
-0.040618896484375,
-0.0015420913696289062,
0.0203857421875,
-0.014434814453125,
-0.010101318359375,
-0.0208282470703125,
-0.00270843505859375,
0.021575927734375,
-0.032196044921875,
0.00042057037353515625,
0.039459228515625,
-0.01271820068359375,
-0.0282745361328125,
-0.061614990234375,
0.00278472900390625,
-0.07073974609375,
-0.0222320556640625,
-0.0035648345947265625,
-0.0030269622802734375,
0.006565093994140625,
-0.0226593017578125,
-0.05816650390625,
0.0562744140625,
-0.0018205642700195312,
-0.0215301513671875,
-0.037017822265625,
0.03997802734375,
0.02716064453125,
-0.006259918212890625,
-0.01251220703125,
-0.004642486572265625,
-0.0169830322265625,
-0.01090240478515625,
0.01849365234375,
0.05853271484375,
0.00555419921875,
0.019195556640625,
-0.0247344970703125,
0.01480865478515625,
0.0009813308715820312,
0.039947509765625,
0.00011849403381347656,
0.0021209716796875,
0.0272979736328125,
0.0276641845703125,
-0.025360107421875,
0.07135009765625,
0.0094757080078125,
0.0185394287109375,
-0.0009441375732421875,
0.004955291748046875,
-0.040985107421875,
-0.034820556640625,
0.0379638671875,
0.040283203125,
0.01873779296875,
-0.007598876953125,
-0.0301361083984375,
-0.02447509765625,
0.0014200210571289062,
-0.043975830078125,
0.007755279541015625,
-0.0596923828125,
-0.0132904052734375,
-0.01540374755859375,
-0.011199951171875,
0.007556915283203125,
-0.02752685546875,
-0.036285400390625,
-0.00006109476089477539,
0.0057373046875,
0.0193939208984375,
-0.0246734619140625,
0.04248046875,
-0.0013322830200195312,
-0.01084136962890625,
0.0010786056518554688,
-0.0411376953125,
0.01190948486328125,
-0.0092620849609375,
-0.05218505859375,
-0.0247039794921875,
-0.013885498046875,
-0.019012451171875,
0.025299072265625,
-0.0195770263671875,
0.02313232421875,
-0.03759765625,
-0.004047393798828125,
0.0099639892578125,
0.002117156982421875,
0.0043487548828125,
-0.0087738037109375,
-0.02099609375,
0.01555633544921875,
0.0036334991455078125,
0.007289886474609375,
-0.008575439453125,
-0.03472900390625,
-0.01486968994140625,
0.0301666259765625,
-0.0254058837890625,
-0.0032672882080078125,
0.01210784912109375,
-0.02679443359375,
-0.0182952880859375,
-0.03656005859375,
-0.028533935546875,
-0.0950927734375,
0.039215087890625,
-0.06341552734375,
-0.0043792724609375,
0.038421630859375
]
|
4530fc1a4c8c26b8e5082772885b3337b95d1b96 | Wordpress Stackexchange
Q: How do I get a meta value from WP_Query? I've got the custom post type foo with meta fields called bar and baz. Now I get the WP_Query object using:
$args = array(
'post_type' => 'foo',
'meta_key' => 'bar',
'meta_value' => $bar_value,
'posts_per_page' => 10,
);
$res = new WP_Query($args);
Now I want to check if the value baz of the selected post is equal to $baz_value. How can I do that?
A: I've found a solution to my problem myself. Since none of the already existing answers solved the problem, I figured I could best post mine here to help people with similar problems.
The solution:
if($res->have_posts()) {
$id = $mail_res->posts[0]->ID; // blindly assuming there is only 1 post having baz = baz_value
$true_baz = get_post_meta($id, 'baz')[0];
if($true_baz== $baz) {
//success
} else {
//error
}
} else {
//error
}
| Q: How do I get a meta value from WP_Query? I've got the custom post type foo with meta fields called bar and baz. Now I get the WP_Query object using:
$args = array(
'post_type' => 'foo',
'meta_key' => 'bar',
'meta_value' => $bar_value,
'posts_per_page' => 10,
);
$res = new WP_Query($args);
Now I want to check if the value baz of the selected post is equal to $baz_value. How can I do that?
A: I've found a solution to my problem myself. Since none of the already existing answers solved the problem, I figured I could best post mine here to help people with similar problems.
The solution:
if($res->have_posts()) {
$id = $mail_res->posts[0]->ID; // blindly assuming there is only 1 post having baz = baz_value
$true_baz = get_post_meta($id, 'baz')[0];
if($true_baz== $baz) {
//success
} else {
//error
}
} else {
//error
}
A: Did you tried this one:
$args = array(
'post_type' => 'foo',
'meta_key' => 'bar',
'meta_value' => $bar_value,
'posts_per_page' => 10,
);
$res = new WP_Query($args);
to
$args = array(
'post_type' => 'foo',
'meta_key' => 'bar',
'meta_value' => $bar_value,
'meta_compare' => '=',
'posts_per_page' => 10,
);
$res = new WP_Query($args);
Read this: WP_Query
A: The query arguments are in several places in the query object. You can var_dump the object and see them.
*
*$res->query_vars
*$res->meta_query (in this case)
*$res->query
Items 1 and 3 will be easiest to work with. Simple PHP object and array syntax will get the information you need.
| wordpress | {
"language": "en",
"length": 245,
"provenance": "stackexchange_00019.jsonl.gz:438066",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/117397"
} | [
0.0201568603515625,
-0.001552581787109375,
0.02435302734375,
0.016632080078125,
-0.005523681640625,
-0.0225372314453125,
0.0205535888671875,
-0.05419921875,
0.0113067626953125,
0.0343017578125,
-0.0159149169921875,
-0.03173828125,
0.00476837158203125,
-0.0219573974609375,
-0.027862548828125,
-0.04119873046875,
0.015472412109375,
0.006866455078125,
0.0217437744140625,
-0.0235595703125,
0.03125,
-0.021514892578125,
0.017242431640625,
0.026123046875,
0.05731201171875,
-0.0606689453125,
0.04107666015625,
-0.00426483154296875,
0.048553466796875,
0.004817962646484375,
0.033721923828125,
-0.0208892822265625,
0.0230255126953125,
-0.034210205078125,
0.059234619140625,
0.0196990966796875,
0.04119873046875,
-0.0287933349609375,
0.0293121337890625,
0.003154754638671875,
0.0264892578125,
-0.01219940185546875,
-0.0199127197265625,
0.0157470703125,
-0.01556396484375,
-0.03240966796875,
0.018951416015625,
-0.021728515625,
0.0239715576171875,
-0.007762908935546875,
-0.018951416015625,
0.009490966796875,
-0.0037670135498046875,
-0.00629425048828125,
-0.0121002197265625,
-0.00919342041015625,
-0.0209808349609375,
-0.0445556640625,
0.045166015625,
0.0011606216430664062,
-0.0106964111328125,
-0.0440673828125,
0.0374755859375,
-0.0035076141357421875,
-0.012481689453125,
0.005298614501953125,
-0.0036029815673828125,
0.0206451416015625,
0.00846099853515625,
-0.022125244140625,
-0.01184844970703125,
-0.00931549072265625,
-0.0017404556274414062,
-0.0178985595703125,
0.0011119842529296875,
-0.0264739990234375,
0.00376129150390625,
-0.024017333984375,
-0.005924224853515625,
0.0211181640625,
0.03936767578125,
-0.03143310546875,
0.003665924072265625,
0.0252838134765625,
-0.003139495849609375,
0.045989990234375,
-0.007415771484375,
-0.0251007080078125,
-0.0017347335815429688,
-0.03814697265625,
-0.0101165771484375,
-0.028594970703125,
-0.039215087890625,
-0.007701873779296875,
-0.0142059326171875,
-0.048370361328125,
-0.004974365234375,
0.021026611328125,
-0.037078857421875,
0.00811767578125,
-0.039215087890625,
-0.01229095458984375,
0.00885009765625,
-0.0312347412109375,
0.0135345458984375,
0.017059326171875,
-0.0138702392578125,
-0.0031337738037109375,
0.031585693359375,
0.032867431640625,
0.0083770751953125,
0.016815185546875,
-0.03369140625,
-0.00991058349609375,
-0.044708251953125,
0.045684814453125,
-0.0184326171875,
-0.039215087890625,
-0.01824951171875,
-0.01506805419921875,
0.00901031494140625,
0.031402587890625,
0.087158203125,
-0.075439453125,
0.0217742919921875,
0.016571044921875,
-0.033355712890625,
-0.08251953125,
-0.045196533203125,
0.053192138671875,
-0.0293731689453125,
-0.0121612548828125,
0.05133056640625,
0.042755126953125,
0.01520538330078125,
-0.037261962890625,
-0.00264739990234375,
-0.02264404296875,
0.01340484619140625,
-0.00174713134765625,
0.021453857421875,
-0.021636962890625,
0.0192718505859375,
0.0104217529296875,
-0.01180267333984375,
0.039703369140625,
0.0180816650390625,
-0.006343841552734375,
-0.0220794677734375,
0.0003707408905029297,
-0.045166015625,
0.00292205810546875,
0.0203704833984375,
0.00647735595703125,
-0.0133819580078125,
0.03936767578125,
0.03973388671875,
-0.01213836669921875,
-0.07025146484375,
-0.0141754150390625,
-0.003570556640625,
0.00812530517578125,
0.018310546875,
-0.006778717041015625,
-0.0214691162109375,
-0.000247955322265625,
-0.00009900331497192383,
-0.01275634765625,
0.01262664794921875,
0.042938232421875,
0.0009675025939941406,
0.0260009765625,
0.0285491943359375,
-0.01128387451171875,
-0.0229644775390625,
-0.021820068359375,
0.00823211669921875,
0.0645751953125,
-0.01108551025390625,
0.0037479400634765625,
-0.00611114501953125,
-0.05078125,
0.03887939453125,
-0.0060272216796875,
-0.020233154296875,
0.0157318115234375,
0.0011873245239257812,
0.01232147216796875,
-0.0093231201171875,
0.00965118408203125,
0.007236480712890625,
0.046600341796875,
-0.0274200439453125,
0.031280517578125,
0.0140533447265625,
-0.0100860595703125,
-0.0025882720947265625,
0.003582000732421875,
0.00508880615234375,
-0.029541015625,
0.020263671875,
-0.0092315673828125,
0.0027103424072265625,
-0.001194000244140625,
-0.09149169921875,
0.01128387451171875,
-0.0341796875,
0.023040771484375,
-0.027496337890625,
0.0240020751953125,
0.0223236083984375,
-0.0059967041015625,
-0.036224365234375,
0.0266571044921875,
0.00847625732421875,
0.0011949539184570312,
-0.017547607421875,
0.00872039794921875,
-0.037200927734375,
0.00305938720703125,
-0.02996826171875,
-0.050994873046875,
-0.05047607421875,
0.036590576171875,
0.045867919921875,
-0.0068511962890625,
0.00669097900390625,
0.002910614013671875,
0.0777587890625,
0.0222625732421875,
0.0018892288208007812,
-0.0202178955078125,
0.00775146484375,
-0.017242431640625,
-0.016448974609375,
0.0114288330078125,
0.0290679931640625,
-0.08349609375,
0.00815582275390625,
0.052490234375,
0.036407470703125,
0.033050537109375,
-0.0032253265380859375,
0.00318145751953125,
0.054107666015625,
-0.036224365234375,
0.0032367706298828125,
-0.0148773193359375,
0.021026611328125,
0.0290679931640625,
-0.0185089111328125,
-0.02410888671875,
0.029266357421875,
-0.040557861328125,
0.00783538818359375,
0.01971435546875,
-0.0335693359375,
0.0477294921875,
-0.0282745361328125,
0.0123291015625,
-0.03485107421875,
-0.0225677490234375,
0.04803466796875,
-0.04339599609375,
0.042755126953125,
0.0005545616149902344,
0.044830322265625,
0.0362548828125,
-0.0269775390625,
-0.004726409912109375,
0.0007119178771972656,
0.032562255859375,
-0.0036373138427734375,
-0.0229339599609375,
-0.02667236328125,
0.0198974609375,
-0.057586669921875,
0.036224365234375,
0.052032470703125,
-0.01204681396484375,
-0.0011844635009765625,
-0.0088653564453125,
-0.051422119140625,
-0.0013151168823242188,
0.01922607421875,
-0.001735687255859375,
-0.0025157928466796875,
0.03558349609375,
-0.0006375312805175781,
-0.007537841796875,
0.011444091796875,
0.049346923828125,
0.0014352798461914062,
0.025787353515625,
0.0234832763671875,
-0.004608154296875,
0.0033817291259765625,
-0.03216552734375,
0.044403076171875,
-0.033599853515625,
0.0228424072265625,
0.06341552734375,
-0.03668212890625,
0.04180908203125,
-0.014129638671875,
-0.0251922607421875,
-0.05047607421875,
0.05328369140625,
0.005809783935546875,
-0.06884765625,
-0.0166015625,
0.0302276611328125,
0.041046142578125,
0.0293731689453125,
0.047454833984375,
-0.0103912353515625,
0.0156402587890625,
0.052978515625,
-0.0797119140625,
-0.11273193359375,
0.05340576171875,
-0.039642333984375,
-0.0208740234375,
-0.03363037109375,
-0.0271759033203125,
-0.0005106925964355469,
-0.042510986328125,
-0.006740570068359375,
0.0169677734375,
-0.031890869140625,
-0.111328125,
-0.0633544921875,
-0.089111328125,
0.012725830078125,
-0.0133209228515625,
0.0004010200500488281,
0.01354217529296875,
0.0450439453125,
0.003406524658203125,
-0.04498291015625,
-0.0034351348876953125,
0.0115203857421875,
-0.025543212890625,
-0.0167388916015625,
0.01074981689453125,
-0.0186920166015625,
0.001720428466796875,
-0.006561279296875,
-0.0133819580078125,
0.0216064453125,
-0.0206451416015625,
-0.0039215087890625,
0.0069580078125,
0.0296478271484375,
0.039459228515625,
-0.0216827392578125,
-0.018707275390625,
0.052154541015625,
0.03021240234375,
-0.007843017578125,
-0.0477294921875,
-0.009765625,
-0.054901123046875,
0.0254364013671875,
0.04803466796875,
0.0085906982421875,
-0.02386474609375,
0.026214599609375,
0.0086517333984375,
-0.0078125,
0.018157958984375,
-0.0175323486328125,
0.0287933349609375,
-0.000675201416015625,
0.01375579833984375,
-0.01461029052734375,
-0.0017614364624023438,
-0.03289794921875,
0.0285186767578125,
-0.00754547119140625,
-0.010101318359375,
-0.005786895751953125,
-0.01409149169921875,
-0.01776123046875,
-0.027496337890625,
0.08197021484375,
0.0396728515625,
0.0283966064453125,
-0.048248291015625,
-0.0634765625,
-0.03179931640625,
0.1036376953125,
0.015655517578125,
-0.0288238525390625,
-0.0274505615234375,
0.0110321044921875,
-0.054901123046875,
-0.032623291015625,
0.0124969482421875,
0.01132965087890625,
-0.08270263671875,
-0.0028400421142578125,
-0.02490234375,
-0.031341552734375,
-0.026580810546875,
-0.013885498046875,
-0.06597900390625,
-0.041351318359375,
0.05279541015625,
-0.058624267578125,
0.016998291015625,
0.042877197265625,
0.0037860870361328125,
-0.0007953643798828125,
-0.0489501953125,
-0.016815185546875,
-0.0355224609375,
-0.0009217262268066406,
0.005794525146484375,
0.0305633544921875,
-0.00531768798828125,
-0.0026378631591796875,
-0.0034961700439453125,
0.023681640625,
0.0103302001953125,
-0.0019931793212890625,
0.0123443603515625,
0.0022487640380859375,
0.0106201171875,
-0.004436492919921875,
0.01212310791015625,
-0.0302734375,
0.013946533203125,
0.0022068023681640625,
-0.0251617431640625,
-0.021209716796875,
-0.06298828125,
-0.04925537109375,
-0.01517486572265625,
-0.04736328125,
-0.018646240234375,
-0.00960540771484375,
-0.0055084228515625,
0.0101776123046875,
-0.0269927978515625,
0.01216888427734375,
-0.0113677978515625,
-0.020294189453125,
0.060455322265625,
0.00511932373046875,
-0.01605224609375,
-0.005466461181640625,
0.1038818359375,
0.016357421875,
-0.032318115234375,
-0.044036865234375,
0.0019044876098632812,
0.01348114013671875,
0.00691986083984375,
0.035491943359375,
-0.01171875,
-0.00792694091796875,
0.0657958984375,
-0.0098114013671875,
0.0229034423828125,
-0.00946044921875,
0.0634765625,
-0.001918792724609375,
0.00036644935607910156,
0.0175933837890625,
-0.01560211181640625,
-0.0440673828125,
0.051666259765625,
0.0069580078125,
-0.052215576171875,
0.004657745361328125,
0.055389404296875,
-0.02532958984375,
0.0206451416015625,
-0.035675048828125,
-0.001415252685546875,
0.0006709098815917969,
-0.0263824462890625,
0.042266845703125,
0.0221099853515625,
-0.0094451904296875,
0.0020694732666015625,
0.0190277099609375,
-0.00925445556640625,
0.0238494873046875,
0.031219482421875,
-0.0159912109375,
0.006320953369140625,
0.019195556640625,
-0.0396728515625,
-0.004657745361328125,
0.0009222030639648438,
0.0634765625,
-0.007472991943359375,
-0.048492431640625,
0.00647735595703125,
-0.01364898681640625,
0.0140838623046875,
0.030029296875,
-0.016632080078125,
0.07232666015625,
0.06549072265625,
-0.03472900390625,
-0.019287109375,
-0.0189208984375,
0.007045745849609375,
-0.07098388671875,
0.0023822784423828125,
-0.0143280029296875,
0.00916290283203125,
-0.0267333984375,
0.12091064453125,
-0.030731201171875,
0.07012939453125,
-0.0271148681640625,
0.0021076202392578125,
0.0134429931640625,
0.0322265625,
0.037933349609375,
-0.034271240234375,
-0.0188751220703125,
0.01544952392578125,
0.00264739990234375,
-0.0296783447265625,
-0.025604248046875,
0.0307464599609375,
0.04095458984375,
0.0085906982421875,
0.00220489501953125,
0.00399017333984375,
0.006404876708984375,
-0.03485107421875,
-0.01499176025390625,
0.0021572113037109375,
-0.002010345458984375,
-0.020660400390625,
-0.0030384063720703125,
-0.0012598037719726562,
0.02410888671875,
-0.01459503173828125,
0.0117950439453125,
-0.025054931640625,
0.057586669921875,
-0.055877685546875,
0.04205322265625,
0.00066375732421875,
-0.0085296630859375,
-0.01194000244140625,
-0.0223236083984375,
0.0032062530517578125,
-0.040252685546875,
0.005443572998046875,
-0.031524658203125,
-0.0374755859375,
0.0565185546875,
-0.0228118896484375,
0.02197265625,
-0.04327392578125,
0.0171966552734375,
-0.0181121826171875,
0.00789642333984375,
0.043304443359375,
0.0259552001953125,
-0.01053619384765625,
-0.02081298828125,
-0.02862548828125,
-0.005886077880859375,
0.03790283203125,
-0.035888671875,
0.0264739990234375,
-0.00945281982421875,
-0.026519775390625,
0.0391845703125,
-0.0260162353515625,
0.0023097991943359375,
0.03759765625,
0.00543212890625,
-0.0419921875,
0.04779052734375,
-0.0281829833984375,
0.036102294921875,
-0.0033206939697265625,
0.043487548828125,
-0.0032196044921875,
0.0004029273986816406,
-0.008514404296875,
-0.015777587890625,
0.006229400634765625,
-0.04010009765625,
-0.01476287841796875,
0.0002541542053222656,
-0.00951385498046875,
-0.01227569580078125,
-0.006015777587890625,
-0.009307861328125,
0.021026611328125,
-0.0257720947265625,
-0.0003058910369873047,
-0.0125579833984375,
0.006443023681640625,
-0.0256195068359375,
0.0066375732421875,
0.0303955078125,
-0.0299224853515625,
-0.044769287109375,
0.01043701171875,
-0.01263427734375,
0.0016422271728515625,
0.014007568359375,
-0.00536346435546875,
0.00876617431640625,
-0.031890869140625,
0.0268402099609375,
0.07635498046875,
0.031646728515625,
0.037628173828125,
0.00489044189453125,
0.028778076171875,
0.020538330078125,
0.01070404052734375,
0.0086517333984375,
-0.01495361328125,
0.04644775390625,
0.0036792755126953125,
-0.016448974609375,
0.02984619140625,
-0.02886962890625,
0.0107879638671875,
0.009185791015625,
0.06719970703125,
-0.039398193359375,
0.02459716796875,
0.043182373046875,
0.0017728805541992188,
0.01494598388671875,
0.0159454345703125,
-0.0159759521484375,
-0.026641845703125,
0.005947113037109375,
-0.03045654296875,
-0.0181427001953125,
0.01123046875,
0.004425048828125,
-0.0006966590881347656,
-0.028472900390625,
-0.0019588470458984375,
-0.00844573974609375,
-0.005214691162109375,
0.0006933212280273438,
0.024871826171875,
-0.01763916015625,
-0.00670623779296875,
0.0202178955078125,
-0.0245819091796875,
0.001384735107421875,
-0.08642578125,
-0.037994384765625,
-0.0177154541015625,
-0.042510986328125,
0.00749969482421875,
0.015594482421875,
0.0709228515625,
0.04278564453125,
0.02789306640625,
-0.026702880859375,
0.003490447998046875,
0.033294677734375,
-0.039093017578125,
-0.042999267578125,
-0.00835418701171875,
0.017822265625,
-0.04449462890625,
0.02947998046875,
-0.01383209228515625,
-0.0202484130859375,
-0.0119171142578125,
-0.003162384033203125,
0.06634521484375,
-0.03546142578125,
-0.01251220703125,
0.029266357421875,
0.01007843017578125,
-0.00402069091796875,
0.01336669921875,
0.0093536376953125,
-0.01296234130859375,
0.00046324729919433594,
0.0121307373046875,
-0.034210205078125,
-0.045989990234375,
-0.02581787109375,
-0.0704345703125,
0.063720703125,
0.0129241943359375,
0.033599853515625,
0.018218994140625,
0.004665374755859375,
-0.0295257568359375,
-0.01505279541015625,
-0.041595458984375,
0.07293701171875,
-0.0006756782531738281,
0.061614990234375,
-0.11541748046875,
-0.041229248046875,
0.0085296630859375,
0.07452392578125,
0.04302978515625,
0.0074462890625,
0.004306793212890625,
-0.030120849609375,
-0.00281524658203125,
0.042694091796875,
-0.01265716552734375,
0.0033702850341796875,
0.0105133056640625,
0.07611083984375,
0.1097412109375,
-0.08709716796875,
0.030609130859375,
-0.006748199462890625,
0.0248260498046875,
0.00661468505859375,
0.0028324127197265625,
-0.0181884765625,
-0.015960693359375,
0.0123138427734375,
-0.03204345703125,
-0.0174560546875,
0.00769805908203125,
-0.03271484375,
0.0423583984375,
0.0047149658203125,
0.04541015625,
-0.022003173828125,
0.0008115768432617188,
-0.0098419189453125,
0.042266845703125,
0.0005426406860351562,
-0.0017061233520507812,
0.03753662109375,
0.0013494491577148438,
0.0804443359375,
-0.00733184814453125,
-0.006534576416015625,
0.0024509429931640625,
0.050994873046875,
0.068359375,
0.0163726806640625,
0.002880096435546875,
-0.0567626953125,
0.0268096923828125,
0.050628662109375,
0.0662841796875,
-0.0738525390625,
-0.0281829833984375,
0.0113525390625,
-0.0231170654296875,
-0.0133209228515625,
-0.0192718505859375,
-0.01096343994140625,
0.018341064453125,
0.0208587646484375,
-0.036865234375,
0.0101776123046875,
0.0034503936767578125,
0.01708984375,
-0.016998291015625,
-0.0268707275390625,
-0.01611328125,
0.005504608154296875,
-0.06903076171875,
0.0207061767578125,
0.017547607421875,
0.06756591796875,
0.02947998046875,
0.03851318359375,
0.0035533905029296875,
-0.028350830078125,
-0.03057861328125,
0.042877197265625,
-0.0012807846069335938,
0.03173828125,
-0.0141143798828125,
-0.007419586181640625,
0.00940704345703125,
0.018585205078125,
0.00936126708984375,
0.01371002197265625,
0.045440673828125,
0.035980224609375,
-0.023162841796875,
-0.00708770751953125,
0.0618896484375,
-0.023712158203125,
-0.0130462646484375,
-0.02862548828125,
0.032073974609375,
0.0229339599609375,
0.010833740234375,
-0.015625,
0.042572021484375,
0.02008056640625,
0.034149169921875,
0.00815582275390625,
0.0196990966796875,
0.01132965087890625,
0.036468505859375,
0.0157470703125,
0.00921630859375,
0.043975830078125,
-0.0655517578125,
-0.0052490234375,
-0.00966644287109375,
-0.0443115234375,
0.01479339599609375,
0.04205322265625,
-0.00691986083984375,
0.00490570068359375,
-0.009613037109375,
0.0017347335815429688,
0.0087127685546875,
0.0122222900390625,
-0.0039215087890625,
0.01372528076171875,
0.02203369140625,
-0.0008420944213867188,
-0.074951171875,
-0.0465087890625,
0.007472991943359375,
0.01250457763671875,
-0.0037689208984375,
-0.022613525390625,
0.046630859375,
0.00335693359375,
-0.021270751953125,
-0.0015783309936523438,
-0.005237579345703125,
-0.024566650390625,
0.04754638671875,
0.0125274658203125,
-0.016571044921875,
-0.01116180419921875,
0.032623291015625,
0.00911712646484375,
0.0517578125,
-0.028900146484375,
-0.028411865234375,
-0.0007395744323730469,
0.02178955078125,
0.0007739067077636719,
-0.00923919677734375,
-0.039520263671875,
0.003753662109375,
-0.006267547607421875,
-0.042266845703125,
0.04144287109375,
0.0249176025390625,
0.0498046875,
0.023712158203125,
0.009185791015625,
-0.02752685546875,
0.0210723876953125,
-0.02581787109375,
0.041534423828125,
0.051422119140625,
-0.01207733154296875,
0.00911712646484375,
-0.0177154541015625,
-0.02764892578125,
0.02398681640625,
-0.0115509033203125,
0.0208740234375,
-0.0029239654541015625,
0.007373809814453125,
0.0010166168212890625,
-0.0020771026611328125,
0.035186767578125,
0.007488250732421875,
0.0008945465087890625,
-0.0050506591796875,
-0.005191802978515625,
-0.0193023681640625,
-0.0284271240234375,
-0.04730224609375,
-0.0462646484375,
0.0119781494140625,
0.0174407958984375,
-0.006717681884765625,
-0.040130615234375,
-0.0300445556640625,
-0.00930023193359375,
0.03271484375,
-0.00926971435546875,
-0.01546478271484375,
0.0035762786865234375,
-0.043701171875,
0.0031280517578125,
-0.01263427734375,
-0.018157958984375,
0.020355224609375,
0.046417236328125,
-0.029937744140625,
0.010345458984375,
-0.025787353515625,
-0.0228729248046875,
0.0012540817260742188,
0.0218658447265625,
0.017333984375,
-0.027923583984375,
-0.0021572113037109375,
0.00638580322265625,
0.0310211181640625,
0.039459228515625,
0.039764404296875,
-0.0191650390625,
0.005115509033203125,
0.0066070556640625,
-0.00222015380859375,
-0.064453125,
0.01276397705078125,
-0.064453125,
0.00815582275390625,
-0.0144500732421875,
0.03924560546875,
0.06201171875,
-0.0022258758544921875,
-0.062225341796875,
0.0278472900390625,
-0.0206298828125,
-0.027252197265625,
-0.027801513671875,
-0.026641845703125,
0.0302581787109375,
0.003177642822265625,
-0.0121917724609375,
-0.01119232177734375,
-0.08746337890625,
-0.0268707275390625,
0.037841796875,
-0.03924560546875,
0.053741455078125,
0.037750244140625,
-0.09716796875,
0.00724029541015625,
-0.02764892578125,
-0.004825592041015625,
-0.01197052001953125,
0.00506591796875,
-0.0014562606811523438,
-0.0017299652099609375,
-0.060455322265625,
-0.010009765625,
0.002254486083984375,
0.05633544921875,
0.00909423828125,
0.0196990966796875,
-0.04718017578125,
-0.00013899803161621094,
0.0760498046875,
0.0419921875,
0.02764892578125,
-0.0322265625,
0.003566741943359375,
-0.0350341796875,
-0.0243072509765625,
-0.040679931640625,
0.004184722900390625,
-0.08099365234375,
-0.0232391357421875,
0.00986480712890625,
-0.00457000732421875,
-0.0036144256591796875,
0.008575439453125,
-0.0201873779296875,
-0.004962921142578125,
0.0038623809814453125,
-0.0223541259765625,
-0.0089111328125,
-0.038787841796875,
0.0484619140625,
-0.01983642578125,
0.0287628173828125,
-0.01119232177734375,
0.0278778076171875,
0.032470703125,
0.02581787109375,
0.0024318695068359375,
-0.0167388916015625,
0.01537322998046875,
-0.0027313232421875,
0.02947998046875,
-0.0347900390625,
0.046875,
-0.0322265625,
-0.0027408599853515625,
0.019744873046875,
-0.00830841064453125,
0.01470947265625,
-0.01419830322265625,
0.022003173828125,
0.0102081298828125,
0.035125732421875,
0.024566650390625,
0.0248260498046875,
-0.0078125,
0.0372314453125,
0.009735107421875,
-0.03033447265625,
0.005184173583984375,
-0.0164337158203125,
-0.0015316009521484375,
0.0157623291015625,
0.00641632080078125,
-0.046630859375,
0.04058837890625,
0.049407958984375,
0.0055694580078125,
0.035003662109375
]
|
630276ff03aa8c4788e005ae74b51a0579cdc928 | Wordpress Stackexchange
Q: How to force TinyMCE in WordPress to replace newlines with tags and not with TinyMCE editor inserts <p> </p> instead of <br> tags when I press enter in my text for a new line.
How to force TinyMCE in WP to replace newlines with <br> and not <p> </p>?
A: Install this plugin:
http://wordpress.org/plugins/advanced-tinymce-configuration/
and then set forced_root_block to FALSE.
| Q: How to force TinyMCE in WordPress to replace newlines with tags and not with TinyMCE editor inserts <p> </p> instead of <br> tags when I press enter in my text for a new line.
How to force TinyMCE in WP to replace newlines with <br> and not <p> </p>?
A: Install this plugin:
http://wordpress.org/plugins/advanced-tinymce-configuration/
and then set forced_root_block to FALSE.
A: The answer suggested by GavinR is correct.
You don't need to install the suggested plug-in, though. Just add this mini plugin and you're set:
<?php
defined( 'ABSPATH' ) OR exit;
/* Plugin Name: TinyMCE break instead of paragraph */
function mytheme_tinymce_settings( $tinymce_init_settings ) {
$tinymce_init_settings['forced_root_block'] = false;
return $tinymce_init_settings;
}
add_filter( 'tiny_mce_before_init', 'mytheme_tinymce_settings' );
Now when you press enter, <br> tag will be inserted instead of creating new paragraph. But beware, if you create two consecutive newlines, the text will still be split to paragraph as a result of wpautop filter applied to your post content. You need to remove this filter first and create a new filter that will replace all newlines with <br> tags. Add something like this to your functions.php to display the <br> tags in your template:
remove_filter ( 'the_content', 'wpautop' );
add_filter ( 'the_content', 'add_newlines_to_post_content' );
function add_newlines_to_post_content( $content ) {
return nl2br( $content );
}
A: This might not work for you, because I'm not sure what the scenario is that would require the need for a linebreak rather than paragraphs. If it's for a particular post type or a particular template, you could do this.
*
*Implement Advanced Custom Fields plugin.
*Create a custom field for your text, and select field type "textarea" with formatting set to "convert new lines into <br /> tags".
*Set the "location" of this custom field to appear only on the post type or template desired (the field could replace the editor on the post type or template, if desired).
Obviously, this approach removes all the normal formatting options normally provided by TinyMCE, including linking and inserting media. So, it may not be an option for you.
A: As far as I'm aware.. the only way to do this is to remove the wpautop filter.
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
This definitely prevents WordPress from adding 'artificial' p tags.
My thinking is because WordPress is somewhat designed for the "layman".. they feel it necessary to include with wpautop filter, which processes the content after it is submitted (or switched between visual and text modes); running a series of "checks" for valid html.. and adjusting the content accordingly.
While this might be great for people who never touch the HTML side; it is a thorn in the side of many users trying to "fiddle" with HTML.
NOTE: Removing the wpautop filter, will cause all your posts/pages (old and new) to not use the filter. This will result in all your HTML in the content editor being (squashed) together. Visual side will appear fine... but Text side is squashed... making it difficult to modify code.
A: if you want to make intent in the beginning of sentence after <br> (SHIFT+ENTER), then you may need to use custom solution:
in functions.php add:
add_action('init', 'add_cust_button');
function add_cust_button() {
if ( get_user_option('rich_editing') == 'true') {
add_filter('mce_external_plugins', 'add_mycust_plugin');
add_filter('mce_buttons_2', 'register_mycust_plugin');
}
}
function register_mycust_plugin($buttons) {
array_push($buttons, "|", "indent_button");
return $buttons;
}
function add_mycust_plugin($plugin_array) {
$plugin_array['my_custom_button'] = get_bloginfo('template_url').'/scripts/button.js';
return $plugin_array;
}
add_filter( 'tiny_mce_version', 'my_refresh_mce');
function my_refresh_mce($ver) {
$ver += 3;
return $ver;
}
then in theme folder, make folder "scripts", and inside it create a icon file (named "indent_img.png") and javascript file (named "button.js"), with this content:
(function() {
tinymce.create('tinymce.plugins.Nlineeplg', {
init : function(ed, url) {
ed.addButton('indent_button', {
title : 'indent',
image : url+'/indent_img.png',
onclick : function() {
ed.execCommand('mceInsertContent', false, '<span style="margin:0 0 0 8px;"> </span>');
}
});
},
createControl : function(n, cm) {
return null;
}
});
tinymce.PluginManager.add('my_custom_button', tinymce.plugins.Nlineeplg);
})();
then, in the EDITOR page, you will have a special button, and when you click in the beginning of sentence and click that button, then it places an indent.
A: Thanks to Bigsmoke it is possible to play with wpautop :
A - Enabling or disabling wpautop on selected pages
B - Without modifying function.php
C - Without messing around old pages if Wpautop filter was removed
D - Without squaching the content in the text side of the editor
http://wordpress.org/plugins/wpautop-control/
Now i can make most of my text layout enjoying automatic paragraphs, then finalize the aspect without having wpautop on or off messing around.
| wordpress | {
"language": "en",
"length": 743,
"provenance": "stackexchange_00019.jsonl.gz:438075",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/117419"
} | [
0.013763427734375,
-0.0330810546875,
0.021026611328125,
0.0160064697265625,
-0.0257110595703125,
-0.01161956787109375,
0.051849365234375,
-0.0156097412109375,
-0.0105133056640625,
0.015625,
0.00815582275390625,
-0.0225067138671875,
-0.0024433135986328125,
-0.0377197265625,
-0.006343841552734375,
-0.032806396484375,
0.00545501708984375,
-0.0233917236328125,
-0.0220947265625,
-0.01739501953125,
0.0021915435791015625,
-0.006427764892578125,
-0.01155853271484375,
-0.00687408447265625,
0.00994110107421875,
0.026214599609375,
0.0762939453125,
-0.0531005859375,
0.00569915771484375,
-0.03436279296875,
0.01629638671875,
-0.004520416259765625,
0.025054931640625,
0.07501220703125,
-0.12371826171875,
0.035003662109375,
-0.053863525390625,
0.058837890625,
0.0056304931640625,
-0.0068817138671875,
0.01357269287109375,
0.002056121826171875,
0.0186004638671875,
0.0096893310546875,
-0.02899169921875,
-0.0026493072509765625,
0.0013761520385742188,
-0.03057861328125,
-0.0028400421142578125,
-0.0009021759033203125,
-0.0031909942626953125,
-0.0012264251708984375,
0.0133209228515625,
-0.018585205078125,
-0.0145263671875,
-0.00370025634765625,
-0.0182037353515625,
-0.0408935546875,
-0.00508880615234375,
0.04461669921875,
0.037139892578125,
0.03143310546875,
-0.00994110107421875,
0.01036834716796875,
-0.004512786865234375,
-0.03399658203125,
-0.032562255859375,
0.01422119140625,
-0.024993896484375,
-0.0051727294921875,
0.0418701171875,
-0.0194244384765625,
0.018798828125,
-0.0166778564453125,
0.0014753341674804688,
0.01200103759765625,
-0.0066986083984375,
0.0108489990234375,
0.00826263427734375,
-0.005218505859375,
0.026519775390625,
0.0164031982421875,
0.0171661376953125,
-0.06988525390625,
0.026275634765625,
-0.04046630859375,
0.0012388229370117188,
0.01323699951171875,
-0.043914794921875,
-0.02154541015625,
-0.03192138671875,
-0.0163726806640625,
-0.06658935546875,
0.02813720703125,
-0.006954193115234375,
0.007007598876953125,
-0.036407470703125,
-0.03546142578125,
-0.01369476318359375,
0.032135009765625,
0.004852294921875,
-0.0255279541015625,
0.05841064453125,
-0.02178955078125,
0.042755126953125,
-0.01338958740234375,
-0.0281219482421875,
-0.0143280029296875,
0.08111572265625,
0.04656982421875,
-0.00572967529296875,
0.051544189453125,
0.004627227783203125,
-0.0036449432373046875,
-0.01062774658203125,
0.007167816162109375,
-0.017059326171875,
0.0347900390625,
-0.0203704833984375,
0.0343017578125,
-0.032745361328125,
-0.0269927978515625,
-0.01111602783203125,
0.037353515625,
-0.01425933837890625,
-0.01436614990234375,
0.0018768310546875,
0.0242156982421875,
-0.054351806640625,
-0.004512786865234375,
0.0165557861328125,
0.01116943359375,
0.032958984375,
0.0806884765625,
0.01406097412109375,
0.004425048828125,
0.0090484619140625,
-0.02532958984375,
-0.0199127197265625,
0.03668212890625,
-0.03753662109375,
-0.0635986328125,
-0.0226593017578125,
-0.03680419921875,
0.038421630859375,
0.0343017578125,
0.020965576171875,
0.00855255126953125,
-0.0145416259765625,
-0.04620361328125,
0.042449951171875,
-0.0323486328125,
0.049835205078125,
0.004489898681640625,
-0.0261077880859375,
-0.042572021484375,
0.05731201171875,
-0.03729248046875,
-0.0316162109375,
-0.07952880859375,
-0.0080413818359375,
0.00533294677734375,
0.050018310546875,
-0.063720703125,
-0.05828857421875,
-0.0211944580078125,
-0.057769775390625,
-0.010894775390625,
0.0278167724609375,
0.0028743743896484375,
-0.0051116943359375,
-0.01259613037109375,
0.030120849609375,
-0.0012655258178710938,
-0.00897979736328125,
0.0148773193359375,
-0.01061248779296875,
0.0225982666015625,
0.040283203125,
0.039459228515625,
0.024810791015625,
-0.00994110107421875,
0.09417724609375,
-0.00791168212890625,
-0.038177490234375,
0.0156707763671875,
0.0234222412109375,
0.10198974609375,
0.01042938232421875,
0.055267333984375,
-0.0016584396362304688,
-0.02484130859375,
-0.0011873245239257812,
0.00592803955078125,
0.029754638671875,
-0.03851318359375,
-0.02545166015625,
-0.0242156982421875,
0.008697509765625,
-0.0207672119140625,
-0.0005369186401367188,
0.005405426025390625,
-0.0189056396484375,
0.001857757568359375,
-0.0306549072265625,
-0.00965118408203125,
0.00012433528900146484,
0.0294189453125,
0.0205841064453125,
-0.01288604736328125,
-0.0124969482421875,
-0.0226287841796875,
0.0275726318359375,
-0.0408935546875,
-0.040313720703125,
0.051300048828125,
0.0192718505859375,
0.016143798828125,
0.0156402587890625,
-0.017913818359375,
0.0408935546875,
0.01522064208984375,
0.0582275390625,
0.0226593017578125,
-0.00847625732421875,
-0.05560302734375,
-0.0032138824462890625,
-0.036041259765625,
-0.035308837890625,
-0.028594970703125,
0.001800537109375,
0.048126220703125,
0.0204620361328125,
0.061279296875,
-0.0357666015625,
-0.03253173828125,
-0.014312744140625,
-0.00841522216796875,
0.0262451171875,
0.035400390625,
0.02777099609375,
0.037506103515625,
0.0021820068359375,
-0.01116943359375,
0.0421142578125,
0.003692626953125,
0.032867431640625,
-0.043304443359375,
0.003231048583984375,
0.0301666259765625,
0.00001806020736694336,
-0.0269927978515625,
0.0258636474609375,
-0.048553466796875,
0.0031108856201171875,
0.03460693359375,
0.025146484375,
0.026580810546875,
0.012725830078125,
-0.00799560546875,
0.004547119140625,
0.036376953125,
0.005832672119140625,
-0.001255035400390625,
0.01739501953125,
0.0252838134765625,
0.032379150390625,
0.03924560546875,
-0.0106353759765625,
0.01332855224609375,
-0.0106964111328125,
-0.0040435791015625,
-0.0035953521728515625,
0.04473876953125,
-0.03497314453125,
0.0148773193359375,
-0.0240631103515625,
0.007007598876953125,
0.004337310791015625,
0.0175628662109375,
-0.0163116455078125,
0.035064697265625,
0.03521728515625,
-0.01328277587890625,
-0.0101165771484375,
-0.036865234375,
0.02679443359375,
-0.019012451171875,
-0.019500732421875,
-0.022308349609375,
0.004329681396484375,
0.0290985107421875,
-0.03033447265625,
0.042633056640625,
-0.0081939697265625,
0.0007963180541992188,
0.0411376953125,
-0.01654052734375,
0.038818359375,
-0.01849365234375,
0.049560546875,
0.051727294921875,
-0.01293182373046875,
0.0158538818359375,
0.016357421875,
0.00958251953125,
0.0277252197265625,
0.020172119140625,
0.01296234130859375,
0.04888916015625,
-0.09063720703125,
-0.028564453125,
0.01087188720703125,
0.0009822845458984375,
-0.006511688232421875,
-0.037353515625,
-0.01557159423828125,
0.0114898681640625,
-0.0305633544921875,
0.00394439697265625,
-0.02288818359375,
-0.0892333984375,
-0.0196380615234375,
0.0211029052734375,
-0.06048583984375,
0.0200347900390625,
0.058563232421875,
0.00007271766662597656,
-0.0189056396484375,
-0.0214080810546875,
-0.0408935546875,
-0.00673675537109375,
-0.0279388427734375,
0.06658935546875,
-0.01380157470703125,
0.006023406982421875,
0.006748199462890625,
0.061004638671875,
0.01303863525390625,
-0.047576904296875,
0.0201416015625,
-0.0413818359375,
-0.037078857421875,
0.0201568603515625,
-0.00399017333984375,
-0.0634765625,
-0.010406494140625,
-0.013031005859375,
0.023651123046875,
0.0041351318359375,
0.00797271728515625,
0.0213775634765625,
-0.027374267578125,
-0.0189971923828125,
0.0069122314453125,
0.00803375244140625,
0.00989532470703125,
-0.010772705078125,
0.0220489501953125,
-0.039306640625,
-0.02667236328125,
0.03839111328125,
-0.01213836669921875,
0.053741455078125,
-0.041900634765625,
-0.0355224609375,
0.00702667236328125,
0.0687255859375,
0.003673553466796875,
0.031494140625,
0.0460205078125,
-0.0167236328125,
0.031524658203125,
-0.0173187255859375,
-0.035247802734375,
-0.0535888671875,
-0.00560760498046875,
-0.0264129638671875,
0.0262298583984375,
-0.0289764404296875,
-0.01226806640625,
-0.042877197265625,
0.02703857421875,
-0.040679931640625,
0.020416259765625,
-0.00930023193359375,
-0.037811279296875,
0.048095703125,
-0.00472259521484375,
0.0005536079406738281,
-0.01068115234375,
0.044525146484375,
-0.034210205078125,
-0.0149688720703125,
0.005634307861328125,
0.0282135009765625,
-0.0419921875,
-0.051177978515625,
-0.03814697265625,
-0.00916290283203125,
0.0158538818359375,
-0.009979248046875,
-0.03765869140625,
0.003910064697265625,
-0.0266876220703125,
0.0014057159423828125,
0.0239105224609375,
-0.0256500244140625,
0.038330078125,
-0.0361328125,
0.00020992755889892578,
-0.00373077392578125,
-0.0059967041015625,
-0.047332763671875,
-0.01273345947265625,
-0.01751708984375,
-0.07867431640625,
0.003971099853515625,
-0.0804443359375,
0.06170654296875,
0.03289794921875,
-0.0174407958984375,
-0.0288543701171875,
0.03131103515625,
-0.00754547119140625,
-0.010345458984375,
0.0146026611328125,
0.0290679931640625,
-0.01422119140625,
-0.0058441162109375,
-0.0014324188232421875,
-0.04095458984375,
-0.028350830078125,
-0.001651763916015625,
-0.0232696533203125,
0.0185394287109375,
0.0012102127075195312,
-0.031219482421875,
0.0419921875,
-0.0236053466796875,
-0.0885009765625,
-0.046295166015625,
-0.027679443359375,
-0.0235137939453125,
-0.00286865234375,
-0.0195159912109375,
-0.0391845703125,
-0.05810546875,
0.045928955078125,
-0.0155029296875,
-0.0034427642822265625,
-0.01233673095703125,
0.08807373046875,
0.021728515625,
0.0012950897216796875,
0.031219482421875,
0.03436279296875,
0.03271484375,
0.02752685546875,
0.035858154296875,
0.0132904052734375,
-0.0180816650390625,
0.026153564453125,
0.0164031982421875,
0.046051025390625,
-0.0804443359375,
0.08770751953125,
-0.01519775390625,
0.004322052001953125,
0.0380859375,
0.00014472007751464844,
-0.002712249755859375,
-0.01522064208984375,
-0.0027294158935546875,
0.0291290283203125,
0.0242767333984375,
-0.007007598876953125,
0.01258087158203125,
-0.037933349609375,
-0.01372528076171875,
-0.025177001953125,
0.0157012939453125,
0.06744384765625,
-0.018096923828125,
0.01971435546875,
0.0009245872497558594,
-0.029998779296875,
-0.03363037109375,
-0.015289306640625,
-0.0106658935546875,
-0.037872314453125,
0.007205963134765625,
0.0265045166015625,
-0.026885986328125,
-0.012481689453125,
0.01397705078125,
-0.0079498291015625,
-0.0386962890625,
-0.005031585693359375,
-0.043792724609375,
-0.0162811279296875,
0.0229339599609375,
0.06280517578125,
0.0142974853515625,
0.018951416015625,
-0.01363372802734375,
-0.0085601806640625,
-0.0035552978515625,
0.0236968994140625,
0.062225341796875,
-0.047149658203125,
0.0028095245361328125,
-0.0016584396362304688,
0.0052947998046875,
-0.007152557373046875,
0.0031337738037109375,
0.0472412109375,
0.03570556640625,
-0.0003376007080078125,
-0.03167724609375,
0.0450439453125,
0.0099945068359375,
0.00826263427734375,
0.0093536376953125,
0.031219482421875,
-0.009185791015625,
-0.01093292236328125,
-0.021026611328125,
-0.031341552734375,
0.027008056640625,
0.022125244140625,
0.0173797607421875,
0.03497314453125,
-0.0221710205078125,
0.0167694091796875,
-0.034027099609375,
0.009765625,
-0.002941131591796875,
-0.0304718017578125,
-0.018463134765625,
-0.0244293212890625,
0.0016202926635742188,
0.0199127197265625,
-0.006961822509765625,
0.008056640625,
-0.007781982421875,
-0.0113983154296875,
-0.007049560546875,
0.0197601318359375,
-0.0279693603515625,
-0.03399658203125,
-0.019500732421875,
0.01152801513671875,
0.01239776611328125,
-0.0170745849609375,
-0.0008330345153808594,
-0.0303192138671875,
-0.0150604248046875,
-0.0012578964233398438,
0.04412841796875,
-0.058135986328125,
-0.00589752197265625,
-0.0203094482421875,
0.04248046875,
-0.09661865234375,
0.0215911865234375,
0.047393798828125,
0.06634521484375,
-0.0185699462890625,
-0.035003662109375,
-0.048370361328125,
-0.034637451171875,
-0.0158233642578125,
-0.005847930908203125,
-0.03656005859375,
-0.0031147003173828125,
0.055023193359375,
0.0355224609375,
-0.0006604194641113281,
-0.06060791015625,
0.0250701904296875,
0.01861572265625,
0.03668212890625,
0.067626953125,
-0.019195556640625,
0.01145172119140625,
0.0015935897827148438,
0.01291656494140625,
-0.0208587646484375,
-0.01387786865234375,
-0.007152557373046875,
-0.00894927978515625,
0.0247650146484375,
-0.007808685302734375,
-0.0092010498046875,
-0.01114654541015625,
0.0047760009765625,
-0.04486083984375,
-0.006175994873046875,
-0.0013189315795898438,
0.02911376953125,
0.005222320556640625,
-0.001247406005859375,
-0.01448822021484375,
-0.0105438232421875,
-0.004024505615234375,
0.042510986328125,
-0.042327880859375,
-0.0236663818359375,
-0.0201873779296875,
0.0049285888671875,
0.00511932373046875,
0.01180267333984375,
0.004364013671875,
0.0033702850341796875,
-0.026397705078125,
-0.00653839111328125,
-0.00428009033203125,
-0.006618499755859375,
-0.01384735107421875,
0.0264892578125,
0.008331298828125,
0.0188751220703125,
0.030517578125,
-0.0073699951171875,
0.0029754638671875,
0.0740966796875,
0.020263671875,
-0.0226593017578125,
-0.0076141357421875,
-0.01557159423828125,
-0.025146484375,
0.0245208740234375,
0.065185546875,
0.0841064453125,
-0.07708740234375,
0.0093231201171875,
0.02435302734375,
-0.0208740234375,
0.015625,
-0.0152740478515625,
-0.0205230712890625,
-0.050201416015625,
0.0721435546875,
-0.02728271484375,
-0.005039215087890625,
0.020263671875,
-0.006786346435546875,
-0.01415252685546875,
-0.046783447265625,
0.048797607421875,
0.0163726806640625,
-0.0157623291015625,
0.0259246826171875,
0.01251220703125,
0.01898193359375,
0.0002218484878540039,
0.0260772705078125,
0.0018177032470703125,
-0.00888824462890625,
-0.032012939453125,
0.0167694091796875,
-0.000423431396484375,
-0.0174560546875,
0.020416259765625,
-0.007419586181640625,
-0.0156402587890625,
0.049713134765625,
-0.046966552734375,
0.038604736328125,
0.0297698974609375,
-0.0574951171875,
-0.0029239654541015625,
0.0092315673828125,
0.0057525634765625,
0.0494384765625,
0.00879669189453125,
0.0109710693359375,
0.0013484954833984375,
0.00933837890625,
-0.00913238525390625,
-0.0108642578125,
0.0149383544921875,
0.00665283203125,
-0.021728515625,
0.0135955810546875,
0.01447296142578125,
0.01654052734375,
-0.055633544921875,
0.0036373138427734375,
-0.03662109375,
0.01543426513671875,
-0.061737060546875,
-0.00347900390625,
0.00930023193359375,
-0.11456298828125,
-0.08563232421875,
0.12384033203125,
0.06182861328125,
0.0260467529296875,
-0.0220947265625,
0.05084228515625,
-0.05340576171875,
0.034271240234375,
-0.01074981689453125,
0.0300750732421875,
-0.01171112060546875,
-0.01505279541015625,
-0.0211944580078125,
-0.0035305023193359375,
0.00226593017578125,
0.039031982421875,
-0.01385498046875,
-0.00589752197265625,
-0.00594329833984375,
0.024444580078125,
0.04949951171875,
0.047393798828125,
0.022918701171875,
0.0086822509765625,
-0.0017642974853515625,
-0.032257080078125,
-0.01091766357421875,
-0.00875091552734375,
0.02423095703125,
-0.03692626953125,
-0.01169586181640625,
0.0275115966796875,
0.0185394287109375,
0.0279693603515625,
-0.0258636474609375,
-0.045989990234375,
0.022796630859375,
-0.0220184326171875,
-0.0154266357421875,
-0.0258941650390625,
-0.0110931396484375,
0.029693603515625,
0.01035308837890625,
-0.10235595703125,
-0.07476806640625,
-0.029571533203125,
0.0223236083984375,
-0.00563812255859375,
0.0234527587890625,
-0.0140838623046875,
-0.006679534912109375,
0.054412841796875,
-0.0404052734375,
-0.00701904296875,
0.010894775390625,
-0.011077880859375,
-0.0309906005859375,
-0.01090240478515625,
0.01654052734375,
-0.040985107421875,
-0.0033359527587890625,
0.0712890625,
0.005035400390625,
-0.002056121826171875,
-0.02978515625,
-0.000682830810546875,
-0.01154327392578125,
-0.01270294189453125,
-0.0197601318359375,
-0.01007080078125,
-0.03546142578125,
-0.004207611083984375,
0.04229736328125,
-0.02410888671875,
-0.04095458984375,
0.0071868896484375,
0.0170745849609375,
0.0572509765625,
0.017364501953125,
-0.024627685546875,
-0.057586669921875,
0.036895751953125,
0.019866943359375,
0.020111083984375,
0.00910186767578125,
0.033294677734375,
0.0343017578125,
-0.00704193115234375,
-0.01279449462890625,
-0.01509857177734375,
0.00162506103515625,
-0.00034880638122558594,
0.0011196136474609375,
0.00748443603515625,
-0.0014867782592773438,
0.0209197998046875,
0.005115509033203125,
0.036224365234375,
0.033447265625,
0.0244140625,
-0.0192413330078125,
0.0005478858947753906,
0.040771484375,
-0.0159149169921875,
-0.0460205078125,
-0.0233612060546875,
-0.06390380859375,
0.012664794921875,
-0.006633758544921875,
0.032501220703125,
-0.0263671875,
0.0305633544921875,
0.01187896728515625,
0.0226593017578125,
0.005340576171875,
0.0006890296936035156,
-0.01441192626953125,
0.0009551048278808594,
0.0061187744140625,
0.04217529296875,
-0.0011138916015625,
-0.00644683837890625,
-0.00576019287109375,
-0.01568603515625,
0.00826263427734375,
0.036346435546875,
0.005840301513671875,
0.0044708251953125,
-0.003742218017578125,
-0.0162353515625,
-0.02557373046875,
0.01806640625,
0.016815185546875,
0.035858154296875,
0.0113525390625,
0.0182647705078125,
-0.060516357421875,
-0.045501708984375,
-0.002315521240234375,
0.0294647216796875,
0.002689361572265625,
0.035430908203125,
0.0236053466796875,
0.019927978515625,
-0.025115966796875,
0.033477783203125,
-0.03997802734375,
-0.016357421875,
-0.0267486572265625,
0.020477294921875,
0.0310211181640625,
-0.01012420654296875,
-0.0075836181640625,
0.045684814453125,
0.0231170654296875,
0.00957489013671875,
0.0261383056640625,
-0.0060577392578125,
0.003185272216796875,
-0.005092620849609375,
0.0211181640625,
-0.017730712890625,
-0.036895751953125,
-0.041473388671875,
-0.005474090576171875,
0.012054443359375,
-0.004413604736328125,
-0.004123687744140625,
0.044708251953125,
-0.0015811920166015625,
-0.043304443359375,
0.034271240234375,
-0.07342529296875,
0.01467132568359375,
0.018463134765625,
0.0248565673828125,
-0.02056884765625,
-0.0018892288208007812,
-0.02154541015625,
-0.0212860107421875,
0.021240234375,
-0.00824737548828125,
-0.0013027191162109375,
-0.08428955078125,
0.032257080078125,
0.01329803466796875,
0.0804443359375,
-0.001949310302734375,
0.0280609130859375,
-0.0291748046875,
0.035430908203125,
0.0350341796875,
0.0196075439453125,
-0.019805908203125,
-0.00553131103515625,
-0.00045418739318847656,
0.01267242431640625,
-0.0044097900390625,
-0.0247955322265625,
-0.09912109375,
-0.046295166015625,
0.031219482421875,
0.01360321044921875,
-0.0413818359375,
0.012969970703125,
-0.002704620361328125,
-0.0103912353515625,
0.0023784637451171875,
-0.0017995834350585938,
-0.0144500732421875,
0.0028934478759765625,
-0.040252685546875,
-0.059051513671875,
-0.07275390625,
0.044342041015625,
-0.054107666015625,
0.02423095703125,
0.058502197265625,
-0.0125732421875,
-0.0028400421142578125,
-0.01303863525390625,
0.02099609375,
0.02996826171875,
-0.01910400390625,
0.007526397705078125,
0.0355224609375,
-0.00661468505859375,
-0.0440673828125,
-0.06378173828125,
0.00884246826171875,
-0.045654296875,
-0.0027294158935546875,
-0.0286865234375,
0.021453857421875,
0.01222991943359375,
-0.060638427734375,
-0.12322998046875,
-0.00714874267578125,
-0.032073974609375,
-0.03802490234375,
0.0293426513671875,
-0.036224365234375,
-0.0178680419921875,
0.00182342529296875,
0.0087890625,
0.0035419464111328125,
0.0010709762573242188,
0.0294036865234375,
0.015594482421875,
0.055145263671875,
-0.008331298828125,
-0.003711700439453125,
-0.0006504058837890625,
0.04718017578125,
0.0321044921875,
0.03094482421875,
-0.007419586181640625,
0.01751708984375,
-0.0115203857421875,
0.039398193359375,
-0.0087890625,
-0.07708740234375,
-0.032257080078125,
-0.059417724609375,
-0.012237548828125,
-0.03814697265625,
-0.028228759765625,
-0.0171966552734375,
0.053253173828125,
0.041961669921875,
0.0033435821533203125,
-0.03485107421875,
0.0302581787109375,
0.016815185546875,
-0.041229248046875,
-0.0195770263671875,
0.018951416015625,
-0.0523681640625,
-0.0256805419921875,
-0.00592803955078125,
-0.00013196468353271484,
-0.011749267578125,
-0.022674560546875,
-0.024169921875,
-0.01311492919921875,
-0.0128936767578125,
-0.01666259765625,
0.0202789306640625,
-0.01082611083984375,
0.06964111328125,
-0.055145263671875,
-0.05511474609375,
0.01300811767578125,
0.00487518310546875,
-0.010162353515625,
-0.0001735687255859375,
-0.01203155517578125,
0.02862548828125,
-0.05419921875,
0.00815582275390625,
0.00920867919921875,
0.036834716796875,
-0.0309906005859375,
0.0119171142578125,
0.0026569366455078125,
0.0033054351806640625,
-0.01102447509765625,
-0.0014104843139648438,
0.00746917724609375,
-0.00960540771484375,
-0.0264739990234375,
0.034698486328125,
-0.032012939453125,
-0.0201263427734375,
-0.0186614990234375,
0.0024738311767578125,
-0.011688232421875,
0.0301513671875,
0.0157928466796875,
-0.0269317626953125,
0.0124664306640625,
0.0296783447265625,
-0.01053619384765625,
0.002696990966796875,
-0.01096343994140625,
0.0552978515625,
0.01105499267578125,
-0.007171630859375
]
|
f757c03dcf6af203cf482b4d09b898ae5ac20777 | Wordpress Stackexchange
Q: How to remove WPML Generator Meta Tag by theme's functions.php (override plugin function)? I've tried hard to find a way to not let plugin WPML output the following <meta name="generator" content="WPML ver:2.8.1 stt:3,1;0" /> tag in <head> via help of theme's function.php:
It's called in sitepress.class.php beginning with line 255
if ( !is_admin() ) {
add_action( 'wp_head', array( $this, 'meta_generator_tag' ) );
}
This specific question has already been asked once in WPML forum.
I've tried:
/* ::: Disable WPML Meta Generator Tag ::: */
if ( ! is_admin() ) {
remove_action( 'wp_head', 'meta_generator_tag', 20 );
}
add_filter( 'meta_generator_tag', 'theme_generator_tag' );
function theme_generator_tag() {
return false;
}
-- without success
A: The instance of this class is made global by WPML, so this should work:
if ( ! empty ( $GLOBALS['sitepress'] ) ) {
add_action( 'wp_head', function()
{
remove_action(
current_filter(),
array ( $GLOBALS['sitepress'], 'meta_generator_tag' )
);
},
0
);
}
| Q: How to remove WPML Generator Meta Tag by theme's functions.php (override plugin function)? I've tried hard to find a way to not let plugin WPML output the following <meta name="generator" content="WPML ver:2.8.1 stt:3,1;0" /> tag in <head> via help of theme's function.php:
It's called in sitepress.class.php beginning with line 255
if ( !is_admin() ) {
add_action( 'wp_head', array( $this, 'meta_generator_tag' ) );
}
This specific question has already been asked once in WPML forum.
I've tried:
/* ::: Disable WPML Meta Generator Tag ::: */
if ( ! is_admin() ) {
remove_action( 'wp_head', 'meta_generator_tag', 20 );
}
add_filter( 'meta_generator_tag', 'theme_generator_tag' );
function theme_generator_tag() {
return false;
}
-- without success
A: The instance of this class is made global by WPML, so this should work:
if ( ! empty ( $GLOBALS['sitepress'] ) ) {
add_action( 'wp_head', function()
{
remove_action(
current_filter(),
array ( $GLOBALS['sitepress'], 'meta_generator_tag' )
);
},
0
);
}
A: Try this (note different remove_action():
if(!is_admin()){
remove_action( 'wp_head', array($sitepress, 'meta_generator_tag') );
}
add_filter( 'meta_generator_tag', 'theme_generator_tag' );
function theme_generator_tag() {
return false;
}
It worked for versions 2.0.4.1 and before, but not tested for newer ones.
| wordpress | {
"language": "en",
"length": 187,
"provenance": "stackexchange_00019.jsonl.gz:438088",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/117469"
} | [
0.05615234375,
0.029052734375,
-0.0160980224609375,
-0.005130767822265625,
0.050018310546875,
-0.044586181640625,
0.0611572265625,
-0.04925537109375,
-0.002166748046875,
0.0183258056640625,
0.0228424072265625,
-0.021514892578125,
0.016265869140625,
-0.053558349609375,
0.0015535354614257812,
-0.006206512451171875,
0.0183563232421875,
0.0201416015625,
0.022735595703125,
0.01090240478515625,
0.0037021636962890625,
0.023468017578125,
-0.0223236083984375,
0.0211181640625,
0.0152587890625,
-0.032135009765625,
0.0880126953125,
-0.0085296630859375,
0.0159759521484375,
-0.0287933349609375,
0.022216796875,
0.0086822509765625,
0.0064544677734375,
0.02532958984375,
-0.03826904296875,
-0.0305023193359375,
-0.0177764892578125,
0.01788330078125,
0.005237579345703125,
-0.0087432861328125,
0.000553131103515625,
-0.009124755859375,
-0.0496826171875,
-0.00936126708984375,
-0.047637939453125,
-0.030609130859375,
0.00986480712890625,
-0.00339508056640625,
-0.003444671630859375,
0.01171875,
0.0038547515869140625,
0.0085601806640625,
0.0192718505859375,
-0.0221710205078125,
-0.017486572265625,
-0.01331329345703125,
-0.041839599609375,
-0.007205963134765625,
0.01186370849609375,
0.01546478271484375,
0.021087646484375,
-0.0106353759765625,
0.0093231201171875,
0.0077056884765625,
0.01264190673828125,
-0.01458740234375,
0.00604248046875,
0.0258636474609375,
-0.038909912109375,
0.0141143798828125,
0.04876708984375,
-0.030609130859375,
0.00011527538299560547,
0.006847381591796875,
-0.018310546875,
-0.0191802978515625,
0.0290679931640625,
-0.0101470947265625,
0.021575927734375,
-0.00640869140625,
0.0241546630859375,
-0.015625,
-0.018951416015625,
0.006134033203125,
0.0374755859375,
0.0604248046875,
-0.00034880638122558594,
-0.04144287109375,
-0.01416015625,
-0.025054931640625,
-0.01715087890625,
-0.030181884765625,
0.0015420913696289062,
-0.01493072509765625,
-0.01219940185546875,
-0.033294677734375,
0.00817108154296875,
0.03082275390625,
-0.024169921875,
-0.0080108642578125,
0.008087158203125,
-0.0328369140625,
0.018280029296875,
-0.035736083984375,
0.01035308837890625,
0.0531005859375,
-0.0200653076171875,
0.0230865478515625,
0.0305328369140625,
0.017333984375,
0.00867462158203125,
-0.032440185546875,
-0.0016155242919921875,
-0.0246124267578125,
-0.0093231201171875,
0.007144927978515625,
-0.034698486328125,
0.028533935546875,
0.01163482666015625,
0.006313323974609375,
-0.002338409423828125,
0.0197296142578125,
0.0284423828125,
-0.013641357421875,
0.02264404296875,
0.02099609375,
-0.024566650390625,
-0.04168701171875,
-0.017730712890625,
-0.004520416259765625,
-0.0243988037109375,
0.0179595947265625,
0.06378173828125,
0.0362548828125,
0.001216888427734375,
-0.004276275634765625,
0.05462646484375,
0.0018892288208007812,
-0.01165771484375,
0.0293426513671875,
-0.0019588470458984375,
-0.03192138671875,
-0.037567138671875,
-0.0224761962890625,
0.04052734375,
0.00893402099609375,
0.00841522216796875,
0.010345458984375,
0.0204620361328125,
0.004055023193359375,
0.00455474853515625,
-0.0164337158203125,
0.0214996337890625,
0.005157470703125,
0.032989501953125,
-0.027557373046875,
0.056671142578125,
-0.049041748046875,
-0.01203155517578125,
-0.042449951171875,
-0.019195556640625,
-0.0172882080078125,
0.003948211669921875,
-0.03900146484375,
-0.044586181640625,
0.0281219482421875,
0.003040313720703125,
0.00897979736328125,
0.018096923828125,
0.00244903564453125,
0.0201263427734375,
0.0161895751953125,
0.09149169921875,
0.0052337646484375,
-0.015899658203125,
-0.007518768310546875,
0.007549285888671875,
0.0207061767578125,
-0.00605010986328125,
0.00862884521484375,
0.00818634033203125,
-0.0394287109375,
0.0239105224609375,
-0.0032787322998046875,
-0.11663818359375,
0.0202789306640625,
0.0080413818359375,
0.05401611328125,
0.037078857421875,
-0.008514404296875,
0.12017822265625,
-0.02227783203125,
-0.0273284912109375,
0.022613525390625,
0.00981903076171875,
-0.0192108154296875,
-0.02178955078125,
-0.002079010009765625,
-0.01126861572265625,
-0.0213165283203125,
0.031585693359375,
0.042327880859375,
-0.01026153564453125,
-0.005977630615234375,
-0.10321044921875,
0.041717529296875,
-0.044464111328125,
0.057403564453125,
0.00595855712890625,
0.022186279296875,
0.01515960693359375,
-0.0173187255859375,
-0.0271453857421875,
0.029998779296875,
-0.01361846923828125,
-0.00848388671875,
-0.016937255859375,
0.0226593017578125,
0.0224609375,
0.0239410400390625,
0.03515625,
0.0007205009460449219,
0.004344940185546875,
-0.0288543701171875,
0.052886962890625,
0.004108428955078125,
-0.03631591796875,
-0.0172576904296875,
0.01207733154296875,
0.004825592041015625,
-0.05328369140625,
0.0672607421875,
-0.009521484375,
0.018341064453125,
-0.0279388427734375,
-0.0284576416015625,
-0.016510009765625,
-0.055450439453125,
0.005336761474609375,
0.059783935546875,
0.023956298828125,
0.03424072265625,
-0.01418304443359375,
0.0025653839111328125,
0.0679931640625,
-0.02923583984375,
0.0001920461654663086,
0.0020904541015625,
0.0209503173828125,
-0.007305145263671875,
-0.03204345703125,
-0.03564453125,
0.064697265625,
-0.02069091796875,
0.031646728515625,
0.0294952392578125,
-0.040679931640625,
-0.047149658203125,
0.034942626953125,
-0.04144287109375,
0.02752685546875,
-0.040802001953125,
-0.048095703125,
0.005504608154296875,
0.0280303955078125,
0.0179443359375,
0.0256805419921875,
0.02777099609375,
-0.0182647705078125,
0.006683349609375,
0.041107177734375,
0.025970458984375,
-0.009765625,
0.0093231201171875,
0.02227783203125,
-0.006725311279296875,
-0.044830322265625,
0.0171661376953125,
-0.0201873779296875,
0.0026988983154296875,
-0.00634765625,
0.039581298828125,
-0.0277862548828125,
-0.0084686279296875,
-0.01421356201171875,
-0.03302001953125,
-0.008148193359375,
0.010101318359375,
-0.0100250244140625,
-0.0172576904296875,
-0.005756378173828125,
0.03619384765625,
-0.02813720703125,
0.041656494140625,
0.0054931640625,
-0.01092529296875,
0.01751708984375,
-0.022064208984375,
0.0216064453125,
-0.0447998046875,
0.0694580078125,
0.055023193359375,
-0.044036865234375,
0.025390625,
-0.00374603271484375,
-0.01519775390625,
0.02520751953125,
-0.008087158203125,
-0.0237579345703125,
-0.0021991729736328125,
-0.064208984375,
-0.0146331787109375,
0.0214080810546875,
-0.022491455078125,
0.038360595703125,
-0.0307159423828125,
0.00144195556640625,
0.0014371871948242188,
-0.061981201171875,
-0.00445556640625,
0.0266571044921875,
-0.0036468505859375,
0.01409149169921875,
0.003437042236328125,
-0.0049896240234375,
-0.0306396484375,
0.0201568603515625,
0.0079803466796875,
0.0256500244140625,
-0.04608154296875,
-0.049346923828125,
-0.04827880859375,
-0.0628662109375,
-0.01422882080078125,
-0.00007599592208862305,
-0.00305938720703125,
0.001434326171875,
0.099853515625,
0.0177154541015625,
-0.08050537109375,
0.01177215576171875,
-0.031463623046875,
-0.006816864013671875,
0.07110595703125,
-0.0107574462890625,
-0.00844573974609375,
-0.00289154052734375,
-0.001338958740234375,
0.0207672119140625,
0.01464080810546875,
0.002994537353515625,
-0.0149078369140625,
-0.00611114501953125,
-0.005207061767578125,
0.0241851806640625,
-0.0283355712890625,
0.0015954971313476562,
-0.0180511474609375,
-0.00040912628173828125,
-0.0528564453125,
-0.032958984375,
0.0005950927734375,
-0.04156494140625,
0.0438232421875,
-0.0019197463989257812,
-0.0186767578125,
0.0164947509765625,
0.0227203369140625,
0.0263519287109375,
0.01904296875,
0.0211029052734375,
0.00688934326171875,
0.0085296630859375,
-0.0120086669921875,
0.00981903076171875,
-0.040496826171875,
0.02996826171875,
-0.023956298828125,
0.023040771484375,
0.009124755859375,
-0.0103607177734375,
-0.0017480850219726562,
-0.03485107421875,
-0.0223236083984375,
0.0021800994873046875,
0.042724609375,
-0.0168609619140625,
0.0018739700317382812,
-0.00876617431640625,
-0.01554107666015625,
-0.009918212890625,
0.042877197265625,
-0.043426513671875,
-0.0164337158203125,
-0.0268402099609375,
0.0019969940185546875,
0.0176544189453125,
-0.01922607421875,
-0.005435943603515625,
-0.0266571044921875,
-0.139404296875,
0.0173492431640625,
-0.0119476318359375,
-0.0309600830078125,
-0.016204833984375,
0.029144287109375,
-0.07659912109375,
-0.0697021484375,
0.01190185546875,
0.0159149169921875,
-0.00583648681640625,
-0.0100555419921875,
-0.038330078125,
-0.015838623046875,
-0.01435089111328125,
-0.0132598876953125,
-0.0980224609375,
-0.022003173828125,
-0.057342529296875,
0.0953369140625,
0.023895263671875,
-0.0150146484375,
-0.027862548828125,
0.048187255859375,
0.012298583984375,
0.01244354248046875,
-0.00811004638671875,
-0.02252197265625,
0.03851318359375,
0.023590087890625,
-0.007579803466796875,
0.01354217529296875,
-0.03009033203125,
0.023712158203125,
-0.00994110107421875,
0.035186767578125,
0.01421356201171875,
-0.04180908203125,
0.05926513671875,
-0.041534423828125,
-0.036651611328125,
-0.030029296875,
-0.053680419921875,
-0.0092620849609375,
-0.04541015625,
-0.0010080337524414062,
-0.0303192138671875,
-0.0465087890625,
0.057830810546875,
-0.026123046875,
0.0026760101318359375,
0.00007665157318115234,
0.0950927734375,
0.01265716552734375,
-0.0158233642578125,
-0.03411865234375,
0.028167724609375,
0.0229949951171875,
-0.031585693359375,
0.052978515625,
-0.0088958740234375,
-0.00911712646484375,
0.053802490234375,
-0.0259552001953125,
0.025238037109375,
-0.0567626953125,
0.08709716796875,
-0.038848876953125,
-0.0413818359375,
0.050811767578125,
-0.041107177734375,
0.0203399658203125,
0.0043182373046875,
-0.0017309188842773438,
-0.040863037109375,
0.0024776458740234375,
0.042724609375,
0.032501220703125,
-0.0006632804870605469,
-0.033203125,
-0.0290374755859375,
0.0159912109375,
-0.025482177734375,
-0.0110015869140625,
0.0239410400390625,
-0.0134735107421875,
-0.0166168212890625,
-0.047882080078125,
0.00362396240234375,
-0.0290069580078125,
0.03192138671875,
-0.049835205078125,
0.0254669189453125,
-0.010162353515625,
-0.04107666015625,
-0.0207977294921875,
-0.006916046142578125,
0.0191497802734375,
0.00466156005859375,
-0.0243072509765625,
-0.019927978515625,
-0.0016489028930664062,
0.026580810546875,
-0.00846099853515625,
-0.00820159912109375,
0.040557861328125,
0.036163330078125,
-0.0234527587890625,
0.00412750244140625,
-0.00469970703125,
-0.0056304931640625,
-0.04791259765625,
-0.00797271728515625,
-0.00949859619140625,
-0.0149078369140625,
0.031494140625,
-0.0009036064147949219,
-0.00678253173828125,
0.0050201416015625,
-0.00897216796875,
0.01837158203125,
-0.004161834716796875,
0.042816162109375,
0.0106201171875,
-0.0355224609375,
0.0084381103515625,
0.00020992755889892578,
0.0054931640625,
-0.020294189453125,
0.0005240440368652344,
0.036346435546875,
0.0211181640625,
-0.0058441162109375,
-0.0123291015625,
0.01067352294921875,
-0.023956298828125,
-0.00257110595703125,
0.006999969482421875,
-0.0237579345703125,
-0.0299835205078125,
0.00844573974609375,
0.010894775390625,
0.0088348388671875,
-0.02935791015625,
-0.003208160400390625,
0.045013427734375,
0.0182647705078125,
0.04071044921875,
0.0164031982421875,
-0.02679443359375,
0.0024433135986328125,
0.0300750732421875,
-0.06787109375,
-0.007205963134765625,
0.0184478759765625,
-0.0762939453125,
-0.03314208984375,
0.0016050338745117188,
-0.029266357421875,
0.022003173828125,
-0.035797119140625,
-0.01029205322265625,
-0.0181121826171875,
0.0249481201171875,
-0.031219482421875,
0.005725860595703125,
0.0595703125,
0.03509521484375,
-0.07232666015625,
-0.002063751220703125,
-0.046234130859375,
-0.0114898681640625,
-0.036163330078125,
-0.0369873046875,
-0.03179931640625,
0.005764007568359375,
-0.002216339111328125,
0.0212860107421875,
-0.0308074951171875,
-0.001796722412109375,
0.0238494873046875,
0.042816162109375,
-0.0079498291015625,
0.06878662109375,
-0.0182342529296875,
0.06011962890625,
0.032073974609375,
-0.003299713134765625,
0.0262298583984375,
0.043914794921875,
0.0080413818359375,
-0.020843505859375,
0.050262451171875,
-0.0268096923828125,
-0.040374755859375,
-0.051239013671875,
-0.04693603515625,
-0.043212890625,
0.0187225341796875,
-0.0279388427734375,
0.0006403923034667969,
0.0011749267578125,
0.01442718505859375,
-0.0238037109375,
0.0014677047729492188,
-0.01311492919921875,
-0.0259857177734375,
0.0226287841796875,
-0.0309295654296875,
-0.0019483566284179688,
-0.0258331298828125,
0.043670654296875,
0.01096343994140625,
-0.042266845703125,
-0.000438690185546875,
0.0113372802734375,
-0.0182952880859375,
0.03594970703125,
0.08251953125,
-0.0013294219970703125,
0.055450439453125,
0.01483917236328125,
0.00763702392578125,
0.0238494873046875,
0.01678466796875,
-0.0207366943359375,
-0.01503753662109375,
0.07196044921875,
0.029022216796875,
0.00009107589721679688,
0.07647705078125,
-0.017730712890625,
0.0203399658203125,
0.04541015625,
0.055389404296875,
-0.06585693359375,
0.01319122314453125,
0.0177001953125,
0.01509857177734375,
0.04803466796875,
-0.024627685546875,
-0.0096588134765625,
-0.0665283203125,
0.06707763671875,
0.035186767578125,
-0.0043182373046875,
0.0307769775390625,
0.0159454345703125,
-0.0163421630859375,
-0.02496337890625,
0.006328582763671875,
0.0085296630859375,
0.0263824462890625,
-0.009185791015625,
-0.0011920928955078125,
-0.0161285400390625,
-0.035125732421875,
0.0230865478515625,
0.0265655517578125,
-0.0252532958984375,
-0.08544921875,
0.0285186767578125,
0.04852294921875,
-0.03765869140625,
0.001926422119140625,
-0.0167083740234375,
-0.00701141357421875,
0.033416748046875,
-0.04266357421875,
0.035400390625,
0.000048160552978515625,
-0.017669677734375,
-0.042633056640625,
-0.042449951171875,
0.0223388671875,
0.0020847320556640625,
0.00890350341796875,
0.032012939453125,
0.0088958740234375,
-0.0780029296875,
0.00592803955078125,
-0.005268096923828125,
0.0728759765625,
-0.0185699462890625,
-0.0248565673828125,
0.0161590576171875,
0.00475311279296875,
-0.0015115737915039062,
0.006122589111328125,
0.0148468017578125,
-0.0159912109375,
0.006389617919921875,
-0.0034580230712890625,
0.005352020263671875,
0.001033782958984375,
0.0185699462890625,
-0.06488037109375,
0.093017578125,
0.028350830078125,
0.00897216796875,
0.0136260986328125,
0.038848876953125,
-0.052032470703125,
-0.0038928985595703125,
-0.04144287109375,
0.06622314453125,
0.0059051513671875,
0.0262908935546875,
-0.0285491943359375,
0.0099639892578125,
0.008514404296875,
0.00467681884765625,
0.047332763671875,
0.018890380859375,
-0.0141448974609375,
-0.0234222412109375,
0.01132965087890625,
0.01552581787109375,
-0.0275115966796875,
0.03619384765625,
-0.01129913330078125,
0.01861572265625,
0.00046634674072265625,
-0.07696533203125,
0.01520538330078125,
-0.048248291015625,
-0.012054443359375,
-0.0009107589721679688,
0.017059326171875,
0.0114898681640625,
-0.0218353271484375,
-0.01381683349609375,
-0.0021190643310546875,
-0.01849365234375,
-0.007572174072265625,
0.0129852294921875,
-0.0302581787109375,
0.035797119140625,
-0.0006442070007324219,
-0.0253753662109375,
-0.02337646484375,
-0.0248870849609375,
0.03851318359375,
0.01128387451171875,
0.0089111328125,
0.024444580078125,
0.00858306884765625,
0.00540924072265625,
-0.02740478515625,
-0.0030307769775390625,
-0.007843017578125,
-0.00688934326171875,
0.031646728515625,
-0.0007200241088867188,
0.007053375244140625,
-0.03173828125,
0.06182861328125,
0.03216552734375,
0.01160430908203125,
-0.042877197265625,
-0.049896240234375,
0.0020961761474609375,
0.006134033203125,
0.0108795166015625,
0.01038360595703125,
0.03253173828125,
-0.004886627197265625,
0.017822265625,
-0.033477783203125,
0.00469207763671875,
0.0159912109375,
0.029510498046875,
0.007022857666015625,
0.049957275390625,
-0.0535888671875,
-0.0197906494140625,
-0.05120849609375,
0.0202789306640625,
0.034027099609375,
0.0804443359375,
0.0171661376953125,
0.06610107421875,
-0.026641845703125,
-0.034332275390625,
-0.059814453125,
0.08172607421875,
-0.0364990234375,
0.0660400390625,
-0.0911865234375,
-0.0469970703125,
0.0023555755615234375,
0.043853759765625,
0.007843017578125,
-0.00013363361358642578,
0.02587890625,
0.0247039794921875,
-0.00905609130859375,
-0.006046295166015625,
0.00835418701171875,
-0.016143798828125,
-0.0021381378173828125,
-0.020355224609375,
-0.01043701171875,
-0.002498626708984375,
-0.0113983154296875,
0.0084686279296875,
0.01088714599609375,
0.006649017333984375,
-0.02752685546875,
-0.00977325439453125,
-0.0034027099609375,
-0.040863037109375,
0.0251007080078125,
0.0014171600341796875,
0.00977325439453125,
-0.0010175704956054688,
-0.0816650390625,
0.002201080322265625,
-0.0572509765625,
-0.034912109375,
0.0499267578125,
0.035247802734375,
-0.060089111328125,
0.0615234375,
0.0210418701171875,
-0.0191650390625,
0.03619384765625,
-0.0031890869140625,
-0.0214691162109375,
0.004085540771484375,
0.0292205810546875,
-0.0067901611328125,
-0.03564453125,
-0.023681640625,
-0.0143280029296875,
0.052032470703125,
0.01097869873046875,
0.07611083984375,
-0.031829833984375,
0.02508544921875,
-0.02532958984375,
0.0177001953125,
0.001190185546875,
-0.0118255615234375,
0.0234527587890625,
0.024169921875,
0.01313018798828125,
-0.0157012939453125,
-0.07965087890625,
-0.005218505859375,
0.0560302734375,
-0.0269927978515625,
0.031829833984375,
-0.00958251953125,
0.020599365234375,
-0.054901123046875,
0.0098724365234375,
-0.0150146484375,
-0.030242919921875,
-0.0411376953125,
0.01033782958984375,
0.03094482421875,
0.06549072265625,
0.01206207275390625,
-0.01107025146484375,
-0.0136566162109375,
-0.01629638671875,
0.0139007568359375,
0.0325927734375,
-0.004817962646484375,
0.037109375,
-0.026641845703125,
-0.06610107421875,
0.0225830078125,
-0.01165771484375,
0.001026153564453125,
0.0163116455078125,
0.0653076171875,
0.006832122802734375,
-0.0250396728515625,
-0.02392578125,
-0.0205535888671875,
0.0067901611328125,
-0.018157958984375,
-0.00278472900390625,
0.00510406494140625,
0.007778167724609375,
-0.039642333984375,
-0.0197906494140625,
-0.023651123046875,
-0.0394287109375,
-0.029998779296875,
0.03302001953125,
-0.045074462890625,
-0.039764404296875,
-0.06549072265625,
0.0002281665802001953,
0.02777099609375,
0.003631591796875,
-0.037750244140625,
0.023406982421875,
-0.022491455078125,
0.00004696846008300781,
0.01480865478515625,
0.031494140625,
-0.03729248046875,
0.00688934326171875,
-0.0347900390625,
-0.046356201171875,
-0.0623779296875,
0.07025146484375,
-0.049041748046875,
0.01450347900390625,
0.03759765625,
-0.01204681396484375,
-0.004665374755859375,
0.0026035308837890625,
0.0087738037109375,
0.050537109375,
0.01085662841796875,
-0.00481414794921875,
0.0235748291015625,
0.0169830322265625,
-0.01352691650390625,
-0.0693359375,
-0.01812744140625,
-0.0293731689453125,
0.0099334716796875,
0.0080108642578125,
0.0091552734375,
0.035675048828125,
-0.0242156982421875,
-0.0897216796875,
0.03125,
-0.01181793212890625,
-0.036590576171875,
0.005054473876953125,
0.02056884765625,
0.0157318115234375,
-0.0262298583984375,
0.0015077590942382812,
-0.025848388671875,
-0.002346038818359375,
-0.01226043701171875,
0.0216217041015625,
0.044677734375,
0.004970550537109375,
0.01311492919921875,
0.0223388671875,
0.045074462890625,
0.040802001953125,
0.01488494873046875,
-0.047637939453125,
0.0361328125,
-0.005718231201171875,
-0.003204345703125,
-0.0296783447265625,
0.023468017578125,
0.0118255615234375,
0.050018310546875,
0.003284454345703125,
-0.042999267578125,
-0.0242767333984375,
-0.01050567626953125,
0.04864501953125,
0.025848388671875,
0.01128387451171875,
-0.025787353515625,
-0.0102081298828125,
0.01348876953125,
-0.050079345703125,
-0.0212860107421875,
0.045440673828125,
-0.09283447265625,
-0.03118896484375,
0.0141143798828125,
-0.027252197265625,
-0.00591278076171875,
-0.020111083984375,
-0.03955078125,
0.01385498046875,
-0.0009326934814453125,
0.0166473388671875,
-0.01531219482421875,
-0.01131439208984375,
-0.01334381103515625,
-0.00504302978515625,
0.012969970703125,
-0.0262603759765625,
0.0164794921875,
0.0015411376953125,
-0.004810333251953125,
-0.01552581787109375,
0.005374908447265625,
-0.005279541015625,
0.0241546630859375,
0.01071929931640625,
0.004917144775390625,
-0.006328582763671875,
0.00243377685546875,
-0.00630950927734375,
0.01953125,
-0.005096435546875,
0.023284912109375,
-0.0120849609375,
0.012847900390625,
0.00389862060546875,
-0.0010499954223632812,
-0.0135040283203125,
0.0200958251953125,
-0.01568603515625,
0.01727294921875,
0.0095367431640625,
-0.001895904541015625,
0.03936767578125,
0.0006341934204101562,
-0.00916290283203125,
0.0018663406372070312,
0.0166473388671875,
-0.051849365234375,
0.007537841796875,
-0.06109619140625,
0.029815673828125,
0.01554107666015625
]
|
7bedc2d0a69de8d31e0ba07fd578bfe09a5f7313 | Wordpress Stackexchange
Q: Database connection close Is there any method to close connection similar to mysql_close() for $wpdb in WordPress?
Is it not necessary to close connection for global $wpdb?
A: You don't have to worry about closing connection to you DB because it will be automatically closed when a request will be processed by your server.
But if you have to close it, then you can do something like this:
@mysql_close( $wpdb->dbh );
Pay attention that it could lead to unexpected results because other plugins could rely on this connection.
| Q: Database connection close Is there any method to close connection similar to mysql_close() for $wpdb in WordPress?
Is it not necessary to close connection for global $wpdb?
A: You don't have to worry about closing connection to you DB because it will be automatically closed when a request will be processed by your server.
But if you have to close it, then you can do something like this:
@mysql_close( $wpdb->dbh );
Pay attention that it could lead to unexpected results because other plugins could rely on this connection.
A: I don't think wpdb actually cares to have a way for explicitly closing connection.
From search through code base the WP's unit tests (not actual core code) are doing the following (note the difference in API used since latest WP versions):
if ( $wpdb->use_mysqli ) {
mysqli_close( $wpdb->dbh );
} else {
mysql_close( $wpdb->dbh );
}
unset( $wpdb->dbh );
A: $wpdb is a global instance of the wpdb class. That class is what creates the database connection and that single database connection is reused repeatedly by the WordPress Core, as well as by most plugins, and themes. You don't want to close it. If you look at the source for wpdb there isn't even a method provided within the class to kill the connection.
The only time I would close a wpdb connections would be for connections you've created, and never for the $wpdb instance, and then you will have to follow the pattern suggested by @EugeneManuilov:
$mydb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
@mysql_close( $mydb->dbh );
That is likely to be a bit squirrelly in itself because the $mydb object doesn't really know that the connection is gone. You've reached in and pulled the carpet out from under it without really resyncing things. The object isn't meant to function like that. I'd probably explicitly kill the object afterwards with unset($mydb);
| wordpress | {
"language": "en",
"length": 311,
"provenance": "stackexchange_00019.jsonl.gz:438097",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/117495"
} | [
0.0625,
0.03546142578125,
-0.0040740966796875,
-0.0132598876953125,
0.044921875,
-0.045257568359375,
0.050811767578125,
-0.041961669921875,
0.06787109375,
0.032867431640625,
-0.05535888671875,
-0.03607177734375,
0.0296478271484375,
-0.01288604736328125,
-0.058013916015625,
-0.0213165283203125,
0.05645751953125,
-0.0307464599609375,
0.0313720703125,
0.008026123046875,
-0.0148162841796875,
0.059112548828125,
0.0257568359375,
0.0233154296875,
0.003040313720703125,
0.00818634033203125,
0.06451416015625,
0.004261016845703125,
0.0028133392333984375,
-0.01336669921875,
0.0163116455078125,
-0.02813720703125,
-0.004383087158203125,
0.0648193359375,
-0.021820068359375,
0.0146942138671875,
0.01523590087890625,
0.03240966796875,
0.034454345703125,
0.02288818359375,
0.0064697265625,
0.011749267578125,
0.011932373046875,
0.003810882568359375,
-0.01195526123046875,
-0.04962158203125,
0.032318115234375,
-0.032745361328125,
0.021636962890625,
-0.050537109375,
0.0240631103515625,
0.040771484375,
0.046112060546875,
-0.034332275390625,
-0.0111083984375,
0.043975830078125,
-0.01568603515625,
-0.042938232421875,
0.03955078125,
-0.00431060791015625,
-0.0177001953125,
-0.05950927734375,
0.031036376953125,
-0.0220489501953125,
-0.002834320068359375,
0.0020389556884765625,
-0.004512786865234375,
0.022674560546875,
0.01151275634765625,
-0.000006496906280517578,
-0.01296234130859375,
-0.011505126953125,
-0.033966064453125,
0.035888671875,
-0.016632080078125,
-0.0028820037841796875,
0.047821044921875,
0.0026912689208984375,
-0.01090240478515625,
0.066650390625,
-0.0149688720703125,
-0.01287841796875,
-0.02886962890625,
-0.013916015625,
0.0171966552734375,
0.0106201171875,
-0.0157928466796875,
-0.0014925003051757812,
0.01078033447265625,
-0.0223541259765625,
-0.00360107421875,
0.006809234619140625,
-0.003017425537109375,
0.0147857666015625,
-0.03192138671875,
-0.0205535888671875,
-0.005161285400390625,
-0.0224456787109375,
-0.0338134765625,
-0.0255584716796875,
0.01143646240234375,
-0.01415252685546875,
-0.01259613037109375,
0.0098876953125,
0.00710296630859375,
0.041046142578125,
-0.023406982421875,
-0.06695556640625,
-0.0082244873046875,
0.0066986083984375,
-0.0014514923095703125,
-0.0171966552734375,
-0.0254058837890625,
-0.01448822021484375,
0.00702667236328125,
0.0031833648681640625,
-0.053375244140625,
0.042755126953125,
-0.00579833984375,
0.0250244140625,
-0.038543701171875,
-0.028472900390625,
-0.059234619140625,
0.008026123046875,
0.028961181640625,
-0.050994873046875,
-0.01702880859375,
0.08935546875,
-0.054412841796875,
0.04034423828125,
-0.023956298828125,
-0.00650787353515625,
0.07855224609375,
0.05242919921875,
0.0186614990234375,
-0.0247344970703125,
0.0288848876953125,
0.033599853515625,
0.00177001953125,
0.023590087890625,
0.03387451171875,
-0.04071044921875,
-0.0228424072265625,
0.029541015625,
0.00769805908203125,
-0.005359649658203125,
0.01206207275390625,
0.022979736328125,
0.0007371902465820312,
-0.004665374755859375,
0.0091705322265625,
-0.0005536079406738281,
0.00963592529296875,
-0.0008406639099121094,
0.04608154296875,
-0.028411865234375,
0.0228118896484375,
-0.01959228515625,
0.00930023193359375,
0.00563812255859375,
-0.0254364013671875,
-0.03936767578125,
0.00484466552734375,
-0.0226898193359375,
-0.047515869140625,
0.05267333984375,
-0.031585693359375,
-0.0069427490234375,
0.0227508544921875,
-0.00457000732421875,
0.038116455078125,
-0.0197601318359375,
0.031005859375,
0.002124786376953125,
-0.01128387451171875,
0.0179901123046875,
-0.0352783203125,
-0.0013885498046875,
0.03619384765625,
-0.01047515869140625,
-0.0204315185546875,
-0.02899169921875,
0.049774169921875,
0.00018799304962158203,
-0.0423583984375,
0.04046630859375,
0.0078582763671875,
0.07257080078125,
0.0115966796875,
0.032073974609375,
-0.01873779296875,
0.0078582763671875,
-0.0026988983154296875,
0.037445068359375,
-0.0205078125,
-0.052825927734375,
0.0174407958984375,
0.0259552001953125,
-0.0229644775390625,
-0.035552978515625,
-0.0172882080078125,
0.0286102294921875,
-0.012847900390625,
0.0244140625,
-0.056396484375,
0.046722412109375,
-0.0234375,
0.031768798828125,
0.002140045166015625,
-0.005157470703125,
0.0027141571044921875,
-0.0156707763671875,
-0.0033740997314453125,
-0.039703369140625,
-0.056396484375,
0.003162384033203125,
-0.0198974609375,
0.044189453125,
-0.003612518310546875,
0.05224609375,
-0.0433349609375,
-0.0219879150390625,
-0.0304412841796875,
-0.0306396484375,
-0.022247314453125,
-0.0178070068359375,
-0.016357421875,
-0.0010175704956054688,
-0.020965576171875,
-0.00826263427734375,
0.01678466796875,
0.029937744140625,
0.037689208984375,
0.0238037109375,
-0.00839996337890625,
0.00954437255859375,
-0.0011005401611328125,
-0.10162353515625,
-0.006816864013671875,
0.050262451171875,
0.0521240234375,
0.00572967529296875,
-0.02606201171875,
-0.04754638671875,
-0.007354736328125,
-0.089599609375,
0.00479888916015625,
-0.030548095703125,
0.01337432861328125,
0.0135040283203125,
-0.00457763671875,
-0.047882080078125,
0.03131103515625,
-0.0670166015625,
0.0022449493408203125,
0.0284423828125,
-0.02685546875,
-0.03228759765625,
0.022003173828125,
-0.01421356201171875,
0.01201629638671875,
-0.0218505859375,
-0.01537322998046875,
-0.00879669189453125,
0.0335693359375,
-0.061920166015625,
0.03106689453125,
0.021759033203125,
0.03167724609375,
-0.05975341796875,
0.005863189697265625,
-0.01129913330078125,
-0.0019683837890625,
0.017242431640625,
-0.0239105224609375,
0.0249481201171875,
-0.03765869140625,
0.01245880126953125,
-0.0142974853515625,
0.0054931640625,
-0.0228729248046875,
0.0295867919921875,
-0.0073089599609375,
-0.0224151611328125,
0.0029392242431640625,
-0.039764404296875,
-0.00720977783203125,
-0.04400634765625,
0.02728271484375,
-0.0213165283203125,
0.0016222000122070312,
0.042266845703125,
-0.0247955322265625,
0.052581787109375,
0.0294036865234375,
-0.033843994140625,
0.052734375,
0.0044403076171875,
0.002094268798828125,
-0.01522064208984375,
0.035125732421875,
0.03948974609375,
-0.00830841064453125,
0.00768280029296875,
-0.0025997161865234375,
0.03265380859375,
0.0281982421875,
-0.0243682861328125,
-0.036407470703125,
0.0208282470703125,
-0.09588623046875,
-0.051055908203125,
0.01273345947265625,
0.067626953125,
-0.033477783203125,
-0.055816650390625,
0.0078277587890625,
0.0260467529296875,
-0.0220184326171875,
-0.045623779296875,
-0.048828125,
0.01666259765625,
0.0261688232421875,
-0.00933837890625,
0.0281982421875,
-0.0126953125,
-0.0290985107421875,
0.0122833251953125,
-0.022003173828125,
-0.0272674560546875,
-0.10003662109375,
-0.097900390625,
-0.08892822265625,
0.003406524658203125,
-0.01219940185546875,
0.035003662109375,
0.0009293556213378906,
0.0241851806640625,
-0.01500701904296875,
-0.0310211181640625,
-0.01776123046875,
-0.0506591796875,
0.0034465789794921875,
0.0015659332275390625,
0.004425048828125,
-0.035064697265625,
0.00257110595703125,
0.005107879638671875,
-0.0021228790283203125,
0.01053619384765625,
-0.005619049072265625,
-0.003559112548828125,
0.03582763671875,
0.0316162109375,
0.06671142578125,
0.01788330078125,
-0.0550537109375,
0.0416259765625,
0.042755126953125,
-0.023162841796875,
-0.025146484375,
0.0114288330078125,
-0.032684326171875,
-0.0455322265625,
-0.0071563720703125,
-0.0106048583984375,
-0.00789642333984375,
0.0040283203125,
0.030426025390625,
0.021392822265625,
-0.059661865234375,
0.01113128662109375,
0.07049560546875,
0.005767822265625,
0.034912109375,
0.01207733154296875,
0.0312347412109375,
-0.0252227783203125,
-0.0111846923828125,
0.005847930908203125,
-0.01000213623046875,
0.019439697265625,
-0.0192108154296875,
0.00525665283203125,
-0.04644775390625,
0.037261962890625,
-0.018890380859375,
0.0097503662109375,
-0.039337158203125,
-0.024566650390625,
-0.020355224609375,
0.0819091796875,
-0.017364501953125,
-0.0321044921875,
0.0243377685546875,
0.01433563232421875,
-0.03759765625,
0.0254669189453125,
-0.03619384765625,
-0.004756927490234375,
-0.029296875,
0.00865936279296875,
-0.01184844970703125,
-0.00429534912109375,
-0.02825927734375,
0.0252838134765625,
-0.0206298828125,
-0.032745361328125,
0.0197601318359375,
-0.02020263671875,
0.00710296630859375,
0.0152587890625,
0.01206207275390625,
-0.005626678466796875,
0.0124359130859375,
-0.046630859375,
-0.055450439453125,
-0.00444793701171875,
-0.06268310546875,
0.05517578125,
0.033172607421875,
0.01242828369140625,
-0.0149688720703125,
0.0300750732421875,
0.0277862548828125,
0.028594970703125,
-0.01483917236328125,
-0.0292510986328125,
-0.014739990234375,
0.0250244140625,
0.0189666748046875,
-0.0007348060607910156,
-0.006805419921875,
-0.06048583984375,
-0.0201416015625,
-0.0167388916015625,
-0.0301361083984375,
0.026092529296875,
-0.025634765625,
0.006168365478515625,
0.0173187255859375,
0.0012350082397460938,
-0.0270233154296875,
0.03594970703125,
-0.034515380859375,
0.0095062255859375,
-0.0123748779296875,
-0.02728271484375,
0.0227813720703125,
0.02618408203125,
-0.0035686492919921875,
0.017547607421875,
0.0499267578125,
0.01181793212890625,
-0.024810791015625,
-0.059661865234375,
-0.01282501220703125,
0.042999267578125,
-0.0360107421875,
0.06231689453125,
0.034942626953125,
-0.0307769775390625,
0.107666015625,
0.0215301513671875,
0.0133209228515625,
-0.04217529296875,
0.06695556640625,
-0.018829345703125,
-0.03857421875,
0.045196533203125,
-0.033660888671875,
-0.0093536376953125,
-0.0019407272338867188,
-0.010833740234375,
0.0267486572265625,
-0.0042266845703125,
0.0012025833129882812,
0.031707763671875,
-0.032958984375,
-0.040435791015625,
-0.0615234375,
0.025360107421875,
-0.04486083984375,
0.0199737548828125,
0.00791168212890625,
0.0084228515625,
0.03717041015625,
0.0178375244140625,
0.0168609619140625,
-0.00574493408203125,
0.01488494873046875,
-0.019683837890625,
0.033355712890625,
0.01812744140625,
0.01222991943359375,
-0.02130126953125,
-0.0214996337890625,
0.082275390625,
0.024627685546875,
-0.01364898681640625,
0.01617431640625,
-0.033355712890625,
-0.00506591796875,
0.00954437255859375,
0.0167236328125,
0.022918701171875,
0.0008368492126464844,
-0.01364898681640625,
-0.005916595458984375,
0.017791748046875,
-0.01206207275390625,
-0.0227813720703125,
0.025177001953125,
0.0183258056640625,
-0.00989532470703125,
-0.0035228729248046875,
0.06854248046875,
-0.006366729736328125,
0.037994384765625,
-0.0108642578125,
0.06451416015625,
0.011871337890625,
0.03594970703125,
-0.007549285888671875,
0.020965576171875,
0.0140838623046875,
-0.0007672309875488281,
-0.0273895263671875,
-0.040557861328125,
-0.0357666015625,
0.0026702880859375,
0.023681640625,
-0.0145721435546875,
0.016876220703125,
0.02691650390625,
0.0309295654296875,
-0.0399169921875,
0.056365966796875,
0.06500244140625,
-0.0306854248046875,
-0.021240234375,
0.00304412841796875,
0.0238037109375,
0.020355224609375,
0.014007568359375,
-0.037445068359375,
0.00569915771484375,
-0.001956939697265625,
-0.03509521484375,
-0.011993408203125,
-0.001972198486328125,
0.003124237060546875,
0.044342041015625,
-0.025238037109375,
-0.0535888671875,
0.0206146240234375,
0.026763916015625,
-0.0281982421875,
0.0072784423828125,
0.032806396484375,
-0.0474853515625,
0.040435791015625,
-0.0136566162109375,
-0.02313232421875,
-0.0170135498046875,
0.0151214599609375,
0.06976318359375,
0.07659912109375,
0.009033203125,
-0.033233642578125,
-0.028472900390625,
-0.03680419921875,
-0.0187530517578125,
-0.03985595703125,
-0.02923583984375,
-0.005466461181640625,
0.01751708984375,
0.004009246826171875,
0.00835418701171875,
-0.0242156982421875,
-0.00739288330078125,
0.0196075439453125,
0.0252532958984375,
-0.00476837158203125,
-0.021697998046875,
0.037445068359375,
-0.003566741943359375,
0.01629638671875,
0.00914764404296875,
0.0284423828125,
0.040008544921875,
-0.040985107421875,
0.0294189453125,
-0.01849365234375,
-0.0322265625,
-0.034698486328125,
-0.01113128662109375,
-0.05059814453125,
-0.036041259765625,
-0.02288818359375,
0.010955810546875,
-0.007232666015625,
0.0019931793212890625,
-0.0216522216796875,
0.015411376953125,
-0.0237884521484375,
0.0089569091796875,
-0.006618499755859375,
-0.01352691650390625,
-0.0011739730834960938,
-0.0095367431640625,
0.01412200927734375,
-0.005603790283203125,
-0.01195526123046875,
-0.0159759521484375,
0.003009796142578125,
0.00881195068359375,
0.03240966796875,
0.024932861328125,
-0.022674560546875,
0.007701873779296875,
0.01308441162109375,
-0.003551483154296875,
-0.0118865966796875,
0.03948974609375,
-0.045135498046875,
-0.041412353515625,
0.0251007080078125,
0.01800537109375,
-0.0469970703125,
-0.0009927749633789062,
-0.0362548828125,
0.033599853515625,
0.05059814453125,
0.096435546875,
-0.0655517578125,
0.01617431640625,
0.03228759765625,
-0.054656982421875,
-0.025054931640625,
-0.01288604736328125,
-0.028533935546875,
-0.027801513671875,
0.0047149658203125,
-0.0016651153564453125,
-0.050933837890625,
-0.022796630859375,
0.019989013671875,
0.0125579833984375,
-0.03662109375,
0.0311737060546875,
-0.004688262939453125,
-0.0455322265625,
0.0016298294067382812,
0.023681640625,
-0.01474761962890625,
0.0037937164306640625,
0.023681640625,
-0.027435302734375,
0.0036373138427734375,
-0.0261077880859375,
0.008209228515625,
-0.0276947021484375,
-0.00562286376953125,
-0.0004067420959472656,
0.024169921875,
0.047607421875,
0.061309814453125,
-0.0036830902099609375,
-0.0003883838653564453,
0.038818359375,
0.03924560546875,
-0.05340576171875,
0.0081939697265625,
0.0296478271484375,
0.021575927734375,
-0.05242919921875,
0.0259246826171875,
-0.070556640625,
0.00726318359375,
0.0003077983856201172,
0.019317626953125,
0.08135986328125,
-0.06683349609375,
-0.0037784576416015625,
0.0220794677734375,
0.00605010986328125,
0.01442718505859375,
-0.0243072509765625,
0.00007963180541992188,
-0.05572509765625,
-0.01036834716796875,
-0.023590087890625,
-0.02252197265625,
0.023895263671875,
-0.025909423828125,
-0.037139892578125,
0.044189453125,
0.00804901123046875,
-0.02252197265625,
0.006805419921875,
0.016937255859375,
-0.015380859375,
0.0175628662109375,
-0.0251922607421875,
0.051300048828125,
0.05029296875,
-0.00542449951171875,
-0.02362060546875,
0.00213623046875,
0.005931854248046875,
0.01224517822265625,
-0.0025463104248046875,
0.002727508544921875,
-0.00699615478515625,
-0.030517578125,
0.0080718994140625,
0.051849365234375,
0.021514892578125,
-0.0010881423950195312,
-0.01526641845703125,
0.027740478515625,
0.055572509765625,
-0.050628662109375,
0.029266357421875,
-0.0007886886596679688,
0.0021419525146484375,
0.001140594482421875,
0.0238037109375,
0.0255584716796875,
0.0015668869018554688,
0.0251312255859375,
0.025482177734375,
-0.006259918212890625,
0.0026092529296875,
0.00435638427734375,
-0.006740570068359375,
0.040985107421875,
0.024871826171875,
-0.050628662109375,
-0.007049560546875,
-0.03778076171875,
0.043121337890625,
-0.0175323486328125,
-0.01446533203125,
0.042938232421875,
0.011260986328125,
0.051513671875,
-0.02532958984375,
-0.034210205078125,
-0.0121612548828125,
0.00923919677734375,
0.087158203125,
0.01837158203125,
0.040771484375,
-0.045745849609375,
-0.0100250244140625,
0.0100555419921875,
0.09930419921875,
-0.0531005859375,
-0.04656982421875,
0.00905609130859375,
0.0112152099609375,
0.005390167236328125,
-0.005283355712890625,
0.01561737060546875,
-0.0244598388671875,
0.030426025390625,
-0.0035800933837890625,
0.0249481201171875,
0.03424072265625,
-0.0355224609375,
0.017425537109375,
0.072021484375,
-0.03271484375,
0.037933349609375,
-0.00417327880859375,
-0.05401611328125,
0.037139892578125,
0.0169830322265625,
0.01275634765625,
0.00180816650390625,
0.039031982421875,
0.002742767333984375,
-0.033599853515625,
0.05523681640625,
0.0019702911376953125,
0.038604736328125,
-0.0869140625,
-0.0888671875,
0.062225341796875,
0.06121826171875,
0.0026073455810546875,
0.002349853515625,
0.038848876953125,
0.03302001953125,
-0.02227783203125,
-0.007678985595703125,
-0.00379180908203125,
-0.02947998046875,
-0.010467529296875,
-0.046905517578125,
0.0166473388671875,
0.0067138671875,
0.020751953125,
-0.012298583984375,
0.052581787109375,
-0.002758026123046875,
-0.018463134765625,
0.022216796875,
-0.008270263671875,
-0.025665283203125,
0.0279388427734375,
-0.050750732421875,
0.056854248046875,
-0.01428985595703125,
-0.037689208984375,
-0.020416259765625,
0.0010824203491210938,
0.01482391357421875,
0.0018329620361328125,
0.020263671875,
-0.00984954833984375,
0.037567138671875,
-0.01398468017578125,
0.005008697509765625,
0.01355743408203125,
0.0080413818359375,
-0.050994873046875,
-0.046173095703125,
0.052825927734375,
-0.04046630859375,
-0.023712158203125,
-0.02349853515625,
-0.0162200927734375,
0.0433349609375,
-0.00872039794921875,
0.0274810791015625,
-0.0197296142578125,
0.031951904296875,
0.0081787109375,
0.00954437255859375,
-0.0018253326416015625,
0.028778076171875,
-0.0499267578125,
0.0029888153076171875,
0.037078857421875,
-0.0204925537109375,
-0.03607177734375,
0.01078033447265625,
0.022796630859375,
-0.024383544921875,
0.001430511474609375,
-0.003185272216796875,
0.0264892578125,
-0.00016891956329345703,
0.004215240478515625,
-0.0192718505859375,
0.01043701171875,
0.0249176025390625,
-0.0080718994140625,
0.032867431640625,
-0.0008540153503417969,
-0.00528717041015625,
0.049224853515625,
-0.060150146484375,
0.018951416015625,
0.003993988037109375,
-0.035247802734375,
-0.0174713134765625,
0.0204925537109375,
-0.05914306640625,
-0.01983642578125,
-0.0157623291015625,
-0.040374755859375,
0.0207672119140625,
-0.034423828125,
0.04864501953125,
-0.01422119140625,
-0.04254150390625,
-0.0241241455078125,
0.0242919921875,
0.038909912109375,
0.01215362548828125,
0.026611328125,
-0.021728515625,
-0.0085906982421875,
-0.003871917724609375,
-0.004787445068359375,
-0.00835418701171875,
0.020233154296875,
-0.038330078125,
-0.006870269775390625,
-0.015350341796875,
-0.060302734375,
-0.031890869140625,
-0.00984954833984375,
0.052032470703125,
0.0181427001953125,
-0.04876708984375,
0.0016260147094726562,
-0.0256195068359375,
0.042083740234375,
0.0041961669921875,
-0.020416259765625,
-0.0013885498046875,
0.02825927734375,
0.01294708251953125,
-0.04437255859375,
-0.029022216796875,
0.03973388671875,
-0.011444091796875,
0.005870819091796875,
-0.0182037353515625,
-0.038238525390625,
0.045654296875,
0.01421356201171875,
0.03790283203125,
0.0643310546875,
0.0682373046875,
-0.047393798828125,
0.01428985595703125,
-0.0013303756713867188,
0.01090240478515625,
-0.00916290283203125,
-0.0026397705078125,
-0.024749755859375,
0.00457000732421875,
-0.01629638671875,
-0.014190673828125,
-0.008514404296875,
-0.05755615234375,
-0.07635498046875,
0.0673828125,
-0.0118255615234375,
-0.03570556640625,
-0.0447998046875,
0.007305145263671875,
0.005481719970703125,
-0.007419586181640625,
-0.0121307373046875,
-0.0147552490234375,
-0.02838134765625,
0.0166473388671875,
0.00485992431640625,
-0.00846099853515625,
0.0172119140625,
-0.01467132568359375,
-0.035858154296875,
0.026458740234375,
0.03363037109375,
0.00531768798828125,
0.01202392578125,
0.005054473876953125,
0.01678466796875,
0.046539306640625,
-0.022705078125,
-0.00478363037109375,
-0.023468017578125,
-0.044281005859375,
-0.007755279541015625,
0.032501220703125,
0.01708984375,
0.0390625,
-0.0043487548828125,
0.06268310546875,
-0.00826263427734375,
-0.044647216796875,
-0.01192474365234375,
-0.015716552734375,
-0.018585205078125,
-0.0185546875,
0.027557373046875,
-0.0787353515625,
-0.027496337890625,
0.0247802734375,
0.00714874267578125,
-0.0053863525390625,
-0.01361083984375,
0.01303863525390625,
-0.005680084228515625,
0.0716552734375,
0.004482269287109375,
0.01280975341796875,
-0.036468505859375,
0.022064208984375,
-0.0286407470703125,
-0.035430908203125,
0.0066986083984375,
0.0261993408203125,
-0.0294036865234375,
-0.0020656585693359375,
-0.005115509033203125,
-0.019744873046875,
0.01143646240234375,
0.036041259765625,
0.00020635128021240234,
-0.01070404052734375,
-0.023956298828125,
-0.0108489990234375,
-0.0243682861328125,
0.02569580078125,
0.0244903564453125,
0.056915283203125,
-0.0133819580078125,
0.0240478515625,
0.0306549072265625,
-0.0284271240234375,
-0.0080718994140625,
0.0046844482421875,
-0.0026569366455078125,
0.0222625732421875,
0.012420654296875,
-0.015472412109375,
0.0494384765625,
-0.0257568359375,
0.00982666015625,
-0.01385498046875,
0.0277252197265625,
-0.0625,
0.0548095703125,
0.01513671875,
0.0265960693359375,
0.042724609375
]
|
1a05ad279ac5c9803f3eb8fb37fcdf02332eff45 | Wordpress Stackexchange
Q: Is there an easy way to separate themes on network? Assume we have a multisite network. All sites in the network are separated into groups by some option value. What I want to do is to separate network available themes to be available to specific groups.
For instance, I have A-Z themes installed. I want to activate A-K themes to group 1, L-O themes to group 2 and P-Z themes to group 3.
Is there an easy way to do it?
A: You'd have to make you site categories slug match your theme categories folder names.
Here's how to filter themes: Hide a theme on list of themes in wp-admin without editing core files
And then, supposing a site has the category a-p and the themes are stored in themes/a-p/, this will filter them out:
add_filter( 'all_themes', 'remove_themes_ms_wpse_117537' );
function remove_themes_ms_wpse_117537( $themes )
{
if( 'site-themes-network' != get_current_screen()->id )
return $themes;
$site_cat = get_blog_option( absint( $_GET['id'] ), 'site_category' );
if( $site_cat )
{
# Unset themes not in the folder /themes/$site_cat/
foreach( $themes as $key => $theme )
{
if( strpos( $key, "$site_cat/" ) === false )
unset($themes[$key]);
}
}
return $themes;
}
| Q: Is there an easy way to separate themes on network? Assume we have a multisite network. All sites in the network are separated into groups by some option value. What I want to do is to separate network available themes to be available to specific groups.
For instance, I have A-Z themes installed. I want to activate A-K themes to group 1, L-O themes to group 2 and P-Z themes to group 3.
Is there an easy way to do it?
A: You'd have to make you site categories slug match your theme categories folder names.
Here's how to filter themes: Hide a theme on list of themes in wp-admin without editing core files
And then, supposing a site has the category a-p and the themes are stored in themes/a-p/, this will filter them out:
add_filter( 'all_themes', 'remove_themes_ms_wpse_117537' );
function remove_themes_ms_wpse_117537( $themes )
{
if( 'site-themes-network' != get_current_screen()->id )
return $themes;
$site_cat = get_blog_option( absint( $_GET['id'] ), 'site_category' );
if( $site_cat )
{
# Unset themes not in the folder /themes/$site_cat/
foreach( $themes as $key => $theme )
{
if( strpos( $key, "$site_cat/" ) === false )
unset($themes[$key]);
}
}
return $themes;
}
| wordpress | {
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:438112",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/117537"
} | [
-0.0017194747924804688,
-0.019256591796875,
-0.0150604248046875,
-0.005970001220703125,
0.00548553466796875,
-0.021942138671875,
0.039337158203125,
0.000568389892578125,
0.010162353515625,
0.011444091796875,
0.00031113624572753906,
-0.0218048095703125,
-0.0120849609375,
-0.043975830078125,
-0.01055145263671875,
-0.0176239013671875,
0.0165252685546875,
-0.0209197998046875,
-0.0020580291748046875,
-0.0097808837890625,
-0.0186767578125,
0.0048675537109375,
-0.006343841552734375,
0.0215301513671875,
0.0082550048828125,
-0.009613037109375,
0.06573486328125,
0.0026607513427734375,
-0.0283966064453125,
-0.036834716796875,
0.0150299072265625,
0.03131103515625,
0.0171966552734375,
0.007274627685546875,
-0.0014514923095703125,
0.0018262863159179688,
-0.0078277587890625,
0.0081939697265625,
0.0158538818359375,
0.0013942718505859375,
0.00205230712890625,
-0.005031585693359375,
0.050323486328125,
0.005786895751953125,
0.024810791015625,
-0.037933349609375,
0.0034084320068359375,
-0.08404541015625,
0.01071929931640625,
-0.0108184814453125,
0.01541900634765625,
0.002422332763671875,
0.045684814453125,
-0.0101165771484375,
-0.041961669921875,
-0.031341552734375,
-0.007904052734375,
-0.0152435302734375,
0.04547119140625,
0.0226898193359375,
-0.032989501953125,
-0.03778076171875,
0.0232696533203125,
-0.06201171875,
0.0024814605712890625,
0.0026397705078125,
0.044403076171875,
0.0223846435546875,
-0.07855224609375,
-0.01076507568359375,
0.042999267578125,
-0.032379150390625,
0.026763916015625,
-0.0293426513671875,
-0.00377655029296875,
0.02056884765625,
-0.023223876953125,
0.00350189208984375,
0.05194091796875,
-0.0450439453125,
-0.03802490234375,
-0.00682830810546875,
-0.0797119140625,
-0.0341796875,
0.0251922607421875,
0.030517578125,
-0.01045989990234375,
-0.0118865966796875,
-0.046905517578125,
0.0099029541015625,
-0.032135009765625,
0.0100860595703125,
-0.032196044921875,
-0.00521087646484375,
-0.004772186279296875,
-0.0012378692626953125,
0.033294677734375,
0.063720703125,
-0.01523590087890625,
-0.020263671875,
0.0171051025390625,
-0.03863525390625,
-0.000370025634765625,
-0.033416748046875,
-0.01248931884765625,
0.0296173095703125,
-0.01258087158203125,
-0.0024700164794921875,
0.03448486328125,
0.04034423828125,
0.005382537841796875,
-0.02569580078125,
-0.0013856887817382812,
0.01495361328125,
-0.049163818359375,
-0.01432037353515625,
-0.047027587890625,
0.0007791519165039062,
-0.0125732421875,
-0.0179595947265625,
-0.0164031982421875,
0.017303466796875,
-0.0214691162109375,
-0.0220489501953125,
-0.00800323486328125,
-0.023223876953125,
-0.0243072509765625,
-0.01137542724609375,
-0.0009069442749023438,
0.0364990234375,
-0.03204345703125,
-0.0233306884765625,
0.032012939453125,
0.045196533203125,
0.02294921875,
-0.02410888671875,
0.032073974609375,
0.037841796875,
-0.0020294189453125,
0.005428314208984375,
0.08056640625,
-0.045745849609375,
-0.0626220703125,
0.04833984375,
0.01082611083984375,
0.0262298583984375,
0.0293426513671875,
0.0036602020263671875,
-0.007694244384765625,
-0.0267486572265625,
0.01493072509765625,
-0.043121337890625,
0.025146484375,
0.01116943359375,
-0.0242767333984375,
-0.0204315185546875,
0.035064697265625,
-0.045501708984375,
-0.021484375,
-0.05859375,
0.0265960693359375,
-0.00411224365234375,
0.00699615478515625,
0.00036716461181640625,
-0.0160064697265625,
-0.00958251953125,
-0.01544952392578125,
-0.0020236968994140625,
0.017181396484375,
-0.0137481689453125,
-0.0293731689453125,
-0.03125,
0.06494140625,
0.01181793212890625,
-0.0005044937133789062,
0.06451416015625,
0.0180511474609375,
-0.01279449462890625,
0.01313018798828125,
0.046173095703125,
-0.00943756103515625,
-0.03387451171875,
-0.000972747802734375,
0.0013418197631835938,
-0.07861328125,
0.01018524169921875,
0.00977325439453125,
0.0679931640625,
0.027435302734375,
0.0019931793212890625,
0.101806640625,
-0.032745361328125,
0.03802490234375,
-0.06494140625,
0.0038585662841796875,
-0.01474761962890625,
0.0164794921875,
0.00849151611328125,
0.006504058837890625,
0.005191802978515625,
0.0181884765625,
-0.01275634765625,
0.042755126953125,
0.005901336669921875,
0.00009989738464355469,
0.0185089111328125,
-0.0266265869140625,
0.0194854736328125,
-0.016998291015625,
-0.01458740234375,
0.0267333984375,
-0.01329803466796875,
-0.00981903076171875,
-0.036834716796875,
-0.031036376953125,
0.04290771484375,
0.0119476318359375,
0.023834228515625,
0.003932952880859375,
-0.01354217529296875,
0.0232391357421875,
0.000324249267578125,
0.007266998291015625,
0.03460693359375,
0.068603515625,
-0.0033817291259765625,
-0.020721435546875,
-0.033355712890625,
0.0304718017578125,
0.0006990432739257812,
-0.039703369140625,
0.055816650390625,
0.0264892578125,
0.05316162109375,
0.00319671630859375,
0.034637451171875,
0.076171875,
0.0193328857421875,
-0.0209808349609375,
-0.014862060546875,
0.058990478515625,
0.043304443359375,
-0.0311279296875,
-0.08349609375,
0.054718017578125,
-0.04986572265625,
0.0002608299255371094,
-0.04083251953125,
0.04150390625,
0.05108642578125,
-0.02264404296875,
-0.0027446746826171875,
0.0216827392578125,
0.0178680419921875,
0.0298309326171875,
0.017974853515625,
-0.031463623046875,
-0.0231475830078125,
0.00798797607421875,
-0.012542724609375,
0.0184478759765625,
-0.0281829833984375,
-0.0247344970703125,
0.0027179718017578125,
0.09375,
-0.039306640625,
0.0204315185546875,
0.0010528564453125,
-0.0275115966796875,
0.0030803680419921875,
0.0158233642578125,
-0.051666259765625,
0.002025604248046875,
0.04302978515625,
-0.004730224609375,
0.01776123046875,
-0.01506805419921875,
-0.017791748046875,
0.010040283203125,
0.0151519775390625,
-0.04046630859375,
0.059326171875,
-0.0033550262451171875,
-0.031219482421875,
-0.041473388671875,
-0.06719970703125,
-0.000009775161743164062,
-0.05682373046875,
-0.007305145263671875,
0.001239776611328125,
0.00726318359375,
0.0499267578125,
-0.00525665283203125,
0.0233612060546875,
-0.00457763671875,
0.010345458984375,
0.0369873046875,
-0.02508544921875,
0.03515625,
-0.03509521484375,
0.015289306640625,
0.045379638671875,
-0.01401519775390625,
-0.01422119140625,
0.0001323223114013672,
-0.024688720703125,
0.0005383491516113281,
0.01303863525390625,
-0.0018625259399414062,
-0.0119781494140625,
-0.06939697265625,
0.004032135009765625,
0.004734039306640625,
-0.01800537109375,
0.00878143310546875,
-0.03759765625,
-0.0013952255249023438,
-0.01201629638671875,
-0.0841064453125,
-0.057525634765625,
0.06402587890625,
-0.023773193359375,
0.00423431396484375,
-0.032440185546875,
-0.01983642578125,
-0.03533935546875,
-0.0276641845703125,
-0.019683837890625,
-0.000006377696990966797,
-0.034637451171875,
-0.06939697265625,
-0.03857421875,
-0.07427978515625,
0.00371551513671875,
-0.001338958740234375,
0.01351165771484375,
0.00039839744567871094,
0.09161376953125,
0.030120849609375,
-0.005641937255859375,
0.037078857421875,
0.02294921875,
-0.00445556640625,
0.011199951171875,
-0.018341064453125,
0.02685546875,
0.003459930419921875,
0.0082550048828125,
-0.00839996337890625,
0.00777435302734375,
-0.017333984375,
-0.022125244140625,
-0.0028400421142578125,
0.0114593505859375,
0.0166473388671875,
-0.01071929931640625,
0.0022106170654296875,
-0.006229400634765625,
-0.032867431640625,
-0.0550537109375,
-0.047607421875,
0.0012254714965820312,
-0.04583740234375,
0.023345947265625,
0.00504302978515625,
0.01457977294921875,
-0.0025177001953125,
0.032501220703125,
-0.00238037109375,
-0.00930023193359375,
-0.016510009765625,
-0.057281494140625,
0.07769775390625,
0.02642822265625,
0.0300140380859375,
-0.007106781005859375,
0.01068115234375,
-0.02740478515625,
-0.0003256797790527344,
-0.020233154296875,
-0.00811767578125,
-0.0131988525390625,
-0.002643585205078125,
-0.0134429931640625,
-0.007415771484375,
0.038299560546875,
0.007549285888671875,
0.00045609474182128906,
-0.01551055908203125,
-0.0268096923828125,
-0.040008544921875,
0.037078857421875,
-0.0953369140625,
-0.005401611328125,
-0.0309600830078125,
0.0235137939453125,
0.0139312744140625,
-0.033782958984375,
-0.0243072509765625,
-0.0197296142578125,
-0.12066650390625,
0.00827789306640625,
-0.0157470703125,
-0.0177459716796875,
-0.0204620361328125,
-0.04107666015625,
-0.0670166015625,
-0.052734375,
0.037689208984375,
0.0291748046875,
0.005214691162109375,
-0.04443359375,
0.005245208740234375,
-0.058685302734375,
-0.0130157470703125,
-0.0011949539184570312,
-0.0036067962646484375,
0.0076904296875,
-0.044219970703125,
0.0011930465698242188,
0.0250396728515625,
0.022430419921875,
-0.005672454833984375,
0.005977630615234375,
0.019317626953125,
-0.0162811279296875,
-0.00753021240234375,
-0.0157623291015625,
0.0190887451171875,
0.022491455078125,
-0.0179595947265625,
-0.0012807846069335938,
0.007740020751953125,
-0.005573272705078125,
-0.077880859375,
-0.005657196044921875,
0.0122528076171875,
0.032073974609375,
0.070068359375,
-0.058929443359375,
-0.00780487060546875,
0.004169464111328125,
-0.03802490234375,
0.0038280487060546875,
-0.034027099609375,
-0.01041412353515625,
0.0061492919921875,
-0.0220794677734375,
0.052642822265625,
0.0160064697265625,
-0.0231170654296875,
-0.005390167236328125,
0.07794189453125,
0.01427459716796875,
-0.024200439453125,
-0.04193115234375,
-0.016387939453125,
0.029327392578125,
0.006008148193359375,
0.0406494140625,
0.0097503662109375,
-0.0221405029296875,
0.05889892578125,
0.0132598876953125,
-0.055450439453125,
0.021209716796875,
0.0423583984375,
0.0172271728515625,
-0.01702880859375,
-0.006496429443359375,
-0.01145172119140625,
0.035888671875,
-0.0186004638671875,
0.013763427734375,
-0.020538330078125,
0.0128173828125,
0.019378662109375,
0.035797119140625,
-0.0279998779296875,
-0.0428466796875,
-0.050323486328125,
0.0211181640625,
0.005126953125,
0.0227203369140625,
0.00960540771484375,
0.0110626220703125,
0.0101776123046875,
0.02020263671875,
0.005092620849609375,
-0.00669097900390625,
0.017669677734375,
-0.053924560546875,
0.0227813720703125,
-0.0345458984375,
-0.057891845703125,
0.0156402587890625,
-0.0207672119140625,
0.035675048828125,
-0.026275634765625,
-0.051544189453125,
0.0048828125,
-0.0279693603515625,
0.058868408203125,
0.035003662109375,
-0.0202178955078125,
0.0382080078125,
0.0255584716796875,
-0.0266571044921875,
-0.00371551513671875,
-0.03411865234375,
-0.022308349609375,
-0.05487060546875,
-0.032379150390625,
-0.0186309814453125,
-0.018890380859375,
0.056671142578125,
-0.02618408203125,
-0.0557861328125,
0.034454345703125,
0.007579803466796875,
0.0178375244140625,
0.03179931640625,
-0.004863739013671875,
0.004528045654296875,
0.0011587142944335938,
-0.006107330322265625,
-0.006927490234375,
0.0263824462890625,
-0.0254974365234375,
-0.0147857666015625,
0.0682373046875,
0.053863525390625,
0.016143798828125,
0.0017557144165039062,
-0.04937744140625,
-0.0160980224609375,
-0.0254058837890625,
0.034820556640625,
-0.013458251953125,
-0.040802001953125,
-0.036224365234375,
-0.0152740478515625,
0.0283050537109375,
-0.0269927978515625,
-0.0065460205078125,
-0.02239990234375,
-0.011566162109375,
-0.041748046875,
0.036102294921875,
-0.089111328125,
0.0203704833984375,
0.06390380859375,
-0.042236328125,
0.00055694580078125,
0.04083251953125,
-0.10504150390625,
-0.034027099609375,
-0.0234222412109375,
-0.0294952392578125,
0.051116943359375,
0.01065826416015625,
0.042938232421875,
-0.030670166015625,
-0.032073974609375,
-0.0142974853515625,
-0.017486572265625,
0.047088623046875,
0.01275634765625,
-0.0621337890625,
0.036041259765625,
-0.035125732421875,
0.01172637939453125,
-0.0265350341796875,
-0.07305908203125,
-0.036834716796875,
-0.0297088623046875,
0.005451202392578125,
0.00811004638671875,
-0.0106964111328125,
-0.035736083984375,
-0.004405975341796875,
0.02716064453125,
0.0099029541015625,
0.0212249755859375,
-0.0242767333984375,
0.0254058837890625,
-0.01561737060546875,
0.04534912109375,
-0.0066375732421875,
0.003940582275390625,
-0.007015228271484375,
-0.0101318359375,
-0.01666259765625,
-0.09368896484375,
-0.0016460418701171875,
0.040008544921875,
-0.047882080078125,
0.0165252685546875,
-0.01073455810546875,
0.01241302490234375,
-0.0006203651428222656,
-0.00974273681640625,
0.0097808837890625,
-0.037353515625,
-0.01514434814453125,
-0.037689208984375,
-0.01300811767578125,
-0.01548004150390625,
-0.027618408203125,
0.0175018310546875,
-0.0104522705078125,
-0.038299560546875,
0.03887939453125,
-0.019195556640625,
0.025421142578125,
0.060821533203125,
-0.0548095703125,
0.06011962890625,
0.051422119140625,
-0.006023406982421875,
0.0242156982421875,
-0.00128936767578125,
-0.0152130126953125,
-0.0076141357421875,
-0.002166748046875,
0.016510009765625,
0.0244903564453125,
0.003940582275390625,
-0.007709503173828125,
0.0296630859375,
0.00418853759765625,
-0.01043701171875,
-0.012359619140625,
0.03826904296875,
0.035491943359375,
-0.0577392578125,
-0.001628875732421875,
0.0069427490234375,
-0.01183319091796875,
-0.0224151611328125,
0.003932952880859375,
0.00295257568359375,
-0.01245880126953125,
0.026092529296875,
-0.01129150390625,
-0.01068115234375,
0.001056671142578125,
-0.01117706298828125,
-0.006015777587890625,
0.0007014274597167969,
0.00007909536361694336,
0.0122222900390625,
-0.0286102294921875,
-0.0008034706115722656,
0.035003662109375,
-0.0071868896484375,
-0.043182373046875,
0.0135498046875,
0.00616455078125,
-0.02325439453125,
-0.092529296875,
-0.0179901123046875,
0.02386474609375,
-0.0206756591796875,
0.006805419921875,
-0.0122222900390625,
-0.0262603759765625,
0.0305633544921875,
-0.02947998046875,
-0.000965118408203125,
0.0211944580078125,
-0.068359375,
-0.018646240234375,
-0.006824493408203125,
0.014404296875,
-0.01739501953125,
0.01561737060546875,
0.0193328857421875,
-0.0170135498046875,
-0.039215087890625,
-0.0251007080078125,
-0.0101776123046875,
0.0701904296875,
0.0037097930908203125,
-0.0258026123046875,
0.039337158203125,
0.050506591796875,
-0.0227203369140625,
0.0172271728515625,
0.05780029296875,
-0.066650390625,
-0.05902099609375,
0.038665771484375,
-0.025909423828125,
-0.007595062255859375,
0.020233154296875,
-0.050750732421875,
0.079345703125,
-0.033599853515625,
0.039642333984375,
-0.0011014938354492188,
0.027923583984375,
0.020111083984375,
0.0204315185546875,
-0.03472900390625,
0.05291748046875,
0.0256500244140625,
0.019927978515625,
-0.0201873779296875,
0.001659393310546875,
0.00862884521484375,
-0.0015277862548828125,
-0.00232696533203125,
-0.004352569580078125,
-0.039215087890625,
-0.002899169921875,
0.0258331298828125,
0.048797607421875,
0.02838134765625,
0.0173187255859375,
-0.026947021484375,
0.01181793212890625,
0.01197052001953125,
-0.0438232421875,
0.0134124755859375,
-0.006031036376953125,
-0.04290771484375,
-0.006175994873046875,
0.025390625,
0.0286865234375,
0.01290130615234375,
-0.0049285888671875,
-0.0301666259765625,
0.016357421875,
0.033447265625,
0.0120391845703125,
0.00946807861328125,
0.03997802734375,
-0.001861572265625,
0.00568389892578125,
-0.0031909942626953125,
-0.012054443359375,
0.04022216796875,
-0.0166473388671875,
0.04962158203125,
0.0374755859375,
0.033599853515625,
0.04156494140625,
-0.01050567626953125,
0.0311737060546875,
0.01519775390625,
-0.032073974609375,
0.0234375,
0.006374359130859375,
0.02191162109375,
-0.01146697998046875,
0.0263519287109375,
-0.00917816162109375,
0.0198516845703125,
-0.025665283203125,
-0.07073974609375,
0.0224151611328125,
0.0034198760986328125,
0.01513671875,
0.0421142578125,
0.038787841796875,
-0.04449462890625,
0.0079803466796875,
-0.03887939453125,
0.00467681884765625,
0.047882080078125,
0.0206298828125,
0.0089569091796875,
0.00982666015625,
-0.035247802734375,
-0.0016937255859375,
-0.04046630859375,
0.0276336669921875,
0.032318115234375,
0.036956787109375,
-0.01059722900390625,
0.060150146484375,
-0.018341064453125,
-0.016387939453125,
0.0034942626953125,
0.04071044921875,
-0.0270233154296875,
-0.0111083984375,
-0.01947021484375,
-0.0673828125,
-0.024200439453125,
0.03997802734375,
-0.0012607574462890625,
-0.02880859375,
0.030517578125,
0.0601806640625,
-0.025115966796875,
-0.031005859375,
-0.005138397216796875,
-0.0096588134765625,
-0.01041412353515625,
-0.030487060546875,
-0.0178375244140625,
-0.0238800048828125,
-0.0205841064453125,
0.01003265380859375,
0.005718231201171875,
0.00435638427734375,
0.0208892822265625,
0.033447265625,
0.00295257568359375,
0.0095977783203125,
-0.0107574462890625,
0.016693115234375,
0.003841400146484375,
0.042938232421875,
-0.08709716796875,
-0.00325775146484375,
-0.05950927734375,
0.0089569091796875,
0.0198822021484375,
0.023284912109375,
-0.01219940185546875,
0.0265655517578125,
0.047149658203125,
0.005901336669921875,
0.00811767578125,
0.0069580078125,
-0.01824951171875,
-0.01666259765625,
0.0704345703125,
0.0045928955078125,
-0.056488037109375,
-0.0457763671875,
-0.0268402099609375,
0.046295166015625,
-0.0215606689453125,
0.09814453125,
-0.034088134765625,
0.0147857666015625,
0.00666046142578125,
-0.004932403564453125,
-0.0016736984252929688,
0.0011234283447265625,
0.00363922119140625,
0.012786865234375,
-0.0029582977294921875,
-0.019195556640625,
0.0203857421875,
-0.02008056640625,
0.0662841796875,
-0.04302978515625,
-0.0254974365234375,
0.01357269287109375,
0.02813720703125,
-0.0272674560546875,
0.04327392578125,
-0.0069732666015625,
-0.052581787109375,
-0.06890869140625,
0.004241943359375,
0.042205810546875,
0.07843017578125,
-0.030670166015625,
0.004329681396484375,
0.002674102783203125,
-0.0037384033203125,
0.0262908935546875,
0.0301361083984375,
0.004718780517578125,
0.0231781005859375,
-0.024627685546875,
-0.03497314453125,
0.0234832763671875,
0.0009293556213378906,
-0.0200347900390625,
0.022216796875,
0.04156494140625,
0.0206756591796875,
-0.0149383544921875,
0.046783447265625,
0.037200927734375,
0.03302001953125,
-0.0281829833984375,
-0.005184173583984375,
0.059295654296875,
-0.003482818603515625,
-0.01580810546875,
-0.0009298324584960938,
-0.029266357421875,
-0.0198211669921875,
-0.01294708251953125,
0.0174713134765625,
-0.0139312744140625,
-0.0260772705078125,
-0.05865478515625,
0.026824951171875,
0.03424072265625,
0.0131378173828125,
-0.0665283203125,
0.0467529296875,
-0.035980224609375,
0.061431884765625,
0.006801605224609375,
-0.020263671875,
-0.0166015625,
-0.035614013671875,
-0.0401611328125,
-0.01192474365234375,
-0.046661376953125,
0.0110931396484375,
-0.0166778564453125,
-0.01143646240234375,
0.00591278076171875,
0.0101470947265625,
-0.01081085205078125,
0.00567626953125,
-0.0203094482421875,
0.034271240234375,
-0.01300048828125,
-0.0198211669921875,
0.0014905929565429688,
0.0010623931884765625,
-0.02972412109375,
-0.0154571533203125,
0.012725830078125,
-0.025848388671875,
-0.02667236328125,
-0.0232086181640625,
-0.0207366943359375,
-0.02947998046875,
-0.043731689453125,
-0.02117919921875,
0.050018310546875,
0.00565338134765625,
-0.01453399658203125,
-0.019744873046875,
-0.008331298828125,
-0.004302978515625,
-0.0122833251953125,
0.005962371826171875,
-0.033966064453125,
-0.0043487548828125,
0.0338134765625,
0.0181884765625,
0.036773681640625,
-0.0099029541015625,
0.02142333984375,
-0.017974853515625,
0.031768798828125,
0.01087188720703125,
0.00415802001953125,
0.0188751220703125,
-0.01299285888671875,
0.0269927978515625,
0.02099609375,
-0.029266357421875,
0.033905029296875,
0.00897979736328125,
-0.02362060546875,
-0.00629425048828125,
-0.00745391845703125,
-0.039306640625,
-0.0167083740234375,
0.051971435546875,
0.051025390625,
0.0218963623046875,
-0.021484375,
-0.07464599609375,
-0.0282135009765625,
0.001514434814453125,
-0.035369873046875,
0.034912109375,
-0.1163330078125,
-0.0120086669921875,
-0.00609588623046875,
-0.0045318603515625,
0.06207275390625,
-0.058319091796875,
-0.004680633544921875,
0.0111236572265625,
-0.0008463859558105469,
0.015716552734375,
-0.04541015625,
-0.01233673095703125,
0.0017728805541992188,
-0.004215240478515625,
-0.00839996337890625,
-0.030731201171875,
0.0206298828125,
-0.0184783935546875,
0.0120086669921875,
-0.0290374755859375,
-0.0269775390625,
-0.0246429443359375,
0.031219482421875,
-0.01363372802734375,
0.022918701171875,
-0.0278472900390625,
-0.0009131431579589844,
-0.006622314453125,
-0.007472991943359375,
0.0104217529296875,
-0.03936767578125,
-0.0230712890625,
-0.0014238357543945312,
-0.0119781494140625,
0.045562744140625,
-0.01334381103515625,
0.0303802490234375,
-0.0156707763671875,
0.04888916015625,
-0.023956298828125,
-0.01207733154296875,
-0.0022430419921875,
-0.033233642578125,
-0.004974365234375,
-0.010498046875,
0.00867462158203125,
-0.0621337890625,
0.04058837890625,
-0.01690673828125,
0.03131103515625,
0.0362548828125
]
|
4f67bfc7de2cfd3d5274d953d11ed4de58c64124 | Wordpress Stackexchange
Q: Registering custom taxonomy with unique name, a good practise? Is it a good practise to register custom taxonomy with a unique name (the $taxonomy parameter), and then use the rewrite argument to set a custom slug?
For example, I could create a taxonomy called list in two different ways. Like this:
add_action( 'init', 'custom_taxonomy_lists' );
function custom_taxonomy_lists() {
register_taxonomy(
'lists',
// [...]
);
}
OR, like this:
add_action( 'init', 'custom_taxonomy_lists' );
function custom_taxonomy_lists() {
register_taxonomy(
'john28_lists',
// [...]
array(
'rewrite' => array( 'slug' => 'lists' ),
// [...]
)
);
}
What I am asking is, is the latter (the 2nd code block) considered a good practise?
(This is the recommended way for registering custom post types, so I thought maybe it applies to custom taxonomies as well.)
A: I don't see any downside to a more unique taxonomy name, or having the taxonomy name and slug be different. The downside to a dictionary word taxonomy name is a potential conflict if some other code registers a taxonomy with the same name.
| Q: Registering custom taxonomy with unique name, a good practise? Is it a good practise to register custom taxonomy with a unique name (the $taxonomy parameter), and then use the rewrite argument to set a custom slug?
For example, I could create a taxonomy called list in two different ways. Like this:
add_action( 'init', 'custom_taxonomy_lists' );
function custom_taxonomy_lists() {
register_taxonomy(
'lists',
// [...]
);
}
OR, like this:
add_action( 'init', 'custom_taxonomy_lists' );
function custom_taxonomy_lists() {
register_taxonomy(
'john28_lists',
// [...]
array(
'rewrite' => array( 'slug' => 'lists' ),
// [...]
)
);
}
What I am asking is, is the latter (the 2nd code block) considered a good practise?
(This is the recommended way for registering custom post types, so I thought maybe it applies to custom taxonomies as well.)
A: I don't see any downside to a more unique taxonomy name, or having the taxonomy name and slug be different. The downside to a dictionary word taxonomy name is a potential conflict if some other code registers a taxonomy with the same name.
| wordpress | {
"language": "en",
"length": 173,
"provenance": "stackexchange_00019.jsonl.gz:438141",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/117638"
} | [
0.045074462890625,
0.0012836456298828125,
0.004039764404296875,
-0.045501708984375,
0.02056884765625,
0.0005998611450195312,
0.0164947509765625,
-0.00241851806640625,
-0.03125,
0.005130767822265625,
0.0130462646484375,
0.0114898681640625,
-0.026519775390625,
-0.04266357421875,
0.02679443359375,
-0.0250244140625,
0.00782012939453125,
0.03033447265625,
0.049468994140625,
-0.00041103363037109375,
0.01447296142578125,
0.015838623046875,
0.00983428955078125,
-0.0083770751953125,
0.055999755859375,
-0.1077880859375,
0.03729248046875,
0.006038665771484375,
0.0355224609375,
-0.0128631591796875,
0.0328369140625,
0.004550933837890625,
0.0216827392578125,
-0.0226287841796875,
0.04107666015625,
0.041046142578125,
0.0244903564453125,
-0.0082244873046875,
0.01317596435546875,
0.032623291015625,
0.0406494140625,
-0.0299224853515625,
0.00893402099609375,
-0.0025882720947265625,
-0.0006022453308105469,
-0.0321044921875,
0.0250091552734375,
-0.029052734375,
-0.016571044921875,
-0.012969970703125,
0.0458984375,
-0.01107025146484375,
0.05902099609375,
-0.0572509765625,
-0.004669189453125,
0.01155853271484375,
-0.010589599609375,
-0.007091522216796875,
0.01371002197265625,
-0.0008611679077148438,
-0.01207733154296875,
-0.0034961700439453125,
0.04107666015625,
-0.00820159912109375,
0.01702880859375,
0.0080413818359375,
-0.0009403228759765625,
0.0189666748046875,
-0.06378173828125,
0.002178192138671875,
0.032012939453125,
-0.06512451171875,
0.0059661865234375,
0.0113983154296875,
-0.00559234619140625,
-0.06707763671875,
0.0207061767578125,
-0.04058837890625,
-0.001110076904296875,
0.0187530517578125,
0.00720977783203125,
-0.053436279296875,
0.005542755126953125,
0.01020050048828125,
0.01541900634765625,
0.043182373046875,
-0.01201629638671875,
-0.0166015625,
-0.0197296142578125,
-0.0251922607421875,
-0.0268096923828125,
-0.041229248046875,
-0.035003662109375,
0.0521240234375,
-0.004428863525390625,
-0.0020809173583984375,
0.024688720703125,
0.0450439453125,
-0.0217437744140625,
0.0115509033203125,
0.0008029937744140625,
-0.0421142578125,
0.03887939453125,
-0.03656005859375,
0.022308349609375,
0.069580078125,
0.01200103759765625,
-0.005523681640625,
0.0245513916015625,
-0.01763916015625,
0.01220703125,
0.0213470458984375,
0.0169219970703125,
-0.03851318359375,
-0.00872802734375,
0.00684356689453125,
0.0030269622802734375,
0.00717926025390625,
0.019439697265625,
-0.029571533203125,
0.0225830078125,
0.039520263671875,
0.032073974609375,
-0.00653076171875,
-0.0026645660400390625,
0.019622802734375,
-0.0043487548828125,
-0.07733154296875,
0.013519287109375,
0.0029773712158203125,
-0.022735595703125,
0.016693115234375,
0.047698974609375,
0.0255584716796875,
-0.000017404556274414062,
-0.010498046875,
0.01386260986328125,
0.02197265625,
0.01067352294921875,
-0.0016498565673828125,
-0.01467132568359375,
-0.0102081298828125,
0.0279693603515625,
-0.011688232421875,
0.0364990234375,
0.018585205078125,
-0.0021209716796875,
-0.0036830902099609375,
0.034454345703125,
0.0202484130859375,
-0.01080322265625,
-0.056365966796875,
0.055084228515625,
-0.006256103515625,
-0.0833740234375,
-0.02178955078125,
-0.033966064453125,
-0.0179443359375,
-0.0261993408203125,
-0.046875,
0.034271240234375,
-0.0265350341796875,
-0.062255859375,
-0.035491943359375,
-0.048370361328125,
0.034210205078125,
-0.00991058349609375,
0.0059051513671875,
0.016387939453125,
-0.01459503173828125,
0.0386962890625,
0.006320953369140625,
-0.0060882568359375,
-0.00885772705078125,
0.022430419921875,
-0.006786346435546875,
0.003856658935546875,
0.0040435791015625,
0.0303802490234375,
0.0439453125,
0.007198333740234375,
-0.0279541015625,
0.059478759765625,
-0.03265380859375,
-0.06610107421875,
0.038665771484375,
-0.005970001220703125,
0.0673828125,
0.046142578125,
0.001369476318359375,
0.040008544921875,
-0.0099945068359375,
-0.0640869140625,
0.035064697265625,
0.011871337890625,
-0.004459381103515625,
-0.01329803466796875,
-0.006908416748046875,
0.0076904296875,
-0.0207672119140625,
-0.058135986328125,
-0.002376556396484375,
-0.01549530029296875,
0.01264190673828125,
-0.050567626953125,
0.029998779296875,
-0.0390625,
0.054901123046875,
-0.039886474609375,
-0.01175689697265625,
0.00927734375,
-0.0372314453125,
-0.011505126953125,
0.00444793701171875,
-0.0109100341796875,
0.0035419464111328125,
-0.03741455078125,
-0.043731689453125,
-0.01262664794921875,
-0.03729248046875,
-0.008270263671875,
0.0186920166015625,
-0.01441192626953125,
0.0177001953125,
0.006351470947265625,
0.019317626953125,
-0.05902099609375,
-0.019439697265625,
-0.049896240234375,
0.0292816162109375,
-0.053558349609375,
0.06585693359375,
0.045623779296875,
0.044891357421875,
-0.01364898681640625,
-0.0035839080810546875,
0.008514404296875,
-0.057464599609375,
0.0031642913818359375,
0.051116943359375,
0.0007328987121582031,
0.00044345855712890625,
-0.041259765625,
0.002597808837890625,
0.02520751953125,
-0.00942230224609375,
-0.02325439453125,
0.02349853515625,
-0.00524139404296875,
0.02984619140625,
0.01519775390625,
0.0261993408203125,
0.00290679931640625,
0.009185791015625,
0.005649566650390625,
0.02777099609375,
-0.061920166015625,
-0.05731201171875,
0.07086181640625,
-0.036712646484375,
0.0186920166015625,
-0.00543975830078125,
0.01727294921875,
-0.0027141571044921875,
-0.032623291015625,
0.0242919921875,
-0.0182037353515625,
-0.01141357421875,
-0.0210113525390625,
0.028289794921875,
0.0179595947265625,
-0.047027587890625,
-0.01435089111328125,
0.022918701171875,
0.0518798828125,
-0.03857421875,
-0.029083251953125,
-0.005512237548828125,
-0.0019235610961914062,
0.0036716461181640625,
0.0097808837890625,
0.06304931640625,
-0.0192413330078125,
-0.01273345947265625,
-0.0443115234375,
-0.0904541015625,
-0.005706787109375,
0.045013427734375,
-0.05841064453125,
-0.0472412109375,
-0.0184173583984375,
0.0294647216796875,
-0.04962158203125,
0.03021240234375,
-0.00536346435546875,
-0.01247406005859375,
0.0002791881561279297,
0.003173828125,
0.01934814453125,
-0.00453948974609375,
0.0034694671630859375,
0.0391845703125,
0.0130462646484375,
-0.0126495361328125,
0.01776123046875,
-0.0176239013671875,
0.007801055908203125,
0.024017333984375,
0.0028228759765625,
-0.032928466796875,
-0.0234375,
0.0226898193359375,
0.009796142578125,
0.050140380859375,
0.006778717041015625,
-0.0379638671875,
0.01317596435546875,
0.0269622802734375,
0.006221771240234375,
0.0136871337890625,
0.0179443359375,
-0.00981903076171875,
0.022796630859375,
-0.00010716915130615234,
0.003711700439453125,
-0.036834716796875,
4.172325134277344e-7,
0.01128387451171875,
0.032196044921875,
-0.062164306640625,
-0.0792236328125,
-0.1063232421875,
-0.0892333984375,
-0.03204345703125,
0.01934814453125,
0.010528564453125,
0.00974273681640625,
0.07525634765625,
0.02789306640625,
-0.032562255859375,
0.06427001953125,
-0.00609588623046875,
-0.0171356201171875,
0.04742431640625,
0.0207977294921875,
-0.037689208984375,
0.0036029815673828125,
-0.00579071044921875,
0.039306640625,
0.0303497314453125,
-0.0198211669921875,
-0.007335662841796875,
0.0174102783203125,
0.017913818359375,
0.0226898193359375,
0.0211181640625,
-0.0119476318359375,
0.03167724609375,
0.033050537109375,
-0.0182037353515625,
-0.0283203125,
0.0004611015319824219,
-0.0025482177734375,
0.0130157470703125,
-0.034210205078125,
0.0037708282470703125,
-0.0133209228515625,
0.06304931640625,
-0.031494140625,
0.01085662841796875,
-0.005542755126953125,
-0.0238800048828125,
0.018524169921875,
-0.00832366943359375,
-0.01219940185546875,
0.0184173583984375,
0.0186004638671875,
0.005298614501953125,
-0.0185394287109375,
-0.000675201416015625,
0.03424072265625,
-0.028350830078125,
0.047943115234375,
-0.0836181640625,
-0.09124755859375,
0.04620361328125,
-0.045318603515625,
-0.01678466796875,
-0.044281005859375,
-0.0162353515625,
0.00464630126953125,
0.08831787109375,
-0.03765869140625,
-0.0254669189453125,
0.01085662841796875,
-0.0031948089599609375,
0.03759765625,
-0.0037631988525390625,
-0.01001739501953125,
-0.034698486328125,
-0.05859375,
0.001956939697265625,
0.00533294677734375,
-0.0297698974609375,
-0.0287017822265625,
0.002216339111328125,
-0.042694091796875,
-0.01824951171875,
0.036163330078125,
-0.05419921875,
0.02978515625,
0.01500701904296875,
0.03558349609375,
-0.032562255859375,
-0.0252685546875,
-0.0302734375,
-0.06463623046875,
-0.00492095947265625,
-0.01316070556640625,
0.037933349609375,
0.00926971435546875,
-0.005596160888671875,
-0.00650787353515625,
0.041168212890625,
0.00823211669921875,
0.03985595703125,
0.016510009765625,
0.01474761962890625,
0.0181884765625,
0.016845703125,
0.0203094482421875,
-0.013275146484375,
-0.0015535354614257812,
-0.004230499267578125,
-0.02508544921875,
0.038330078125,
-0.007190704345703125,
0.02667236328125,
0.0130615234375,
-0.04217529296875,
-0.07366943359375,
-0.0154876708984375,
-0.004421234130859375,
0.0004496574401855469,
0.017486572265625,
-0.0228271484375,
-0.0107421875,
-0.06201171875,
0.01279449462890625,
0.00026726722717285156,
-0.04864501953125,
0.0221710205078125,
0.05377197265625,
0.0211944580078125,
-0.0140380859375,
-0.061065673828125,
0.0195465087890625,
0.024261474609375,
-0.0186920166015625,
-0.01436614990234375,
-0.00504302978515625,
-0.01430511474609375,
0.00865936279296875,
-0.019195556640625,
-0.016204833984375,
0.006160736083984375,
0.029083251953125,
0.00489044189453125,
-0.0020046234130859375,
-0.00829315185546875,
-0.04498291015625,
0.036773681640625,
0.033843994140625,
-0.0119476318359375,
-0.021209716796875,
-0.00241851806640625,
0.052337646484375,
-0.027374267578125,
0.0298309326171875,
-0.042816162109375,
-0.08074951171875,
0.046722412109375,
-0.058074951171875,
-0.0220489501953125,
-0.019500732421875,
-0.005641937255859375,
-0.0041046142578125,
-0.059234619140625,
-0.002079010009765625,
0.01251220703125,
-0.0017948150634765625,
0.009521484375,
0.006397247314453125,
0.019744873046875,
-0.005584716796875,
-0.01361846923828125,
-0.0006551742553710938,
0.039276123046875,
-0.002788543701171875,
-0.04315185546875,
0.0016527175903320312,
-0.009796142578125,
-0.0135650634765625,
0.007415771484375,
0.00970458984375,
0.03009033203125,
0.022613525390625,
0.022216796875,
0.021575927734375,
-0.0269012451171875,
0.01313018798828125,
-0.019287109375,
-0.033416748046875,
-0.0006556510925292969,
-0.02960205078125,
0.004230499267578125,
0.00531768798828125,
0.0201263427734375,
-0.022613525390625,
-0.01461029052734375,
0.05633544921875,
0.06781005859375,
0.0167388916015625,
0.0270233154296875,
-0.0224456787109375,
-0.04962158203125,
0.01806640625,
-0.052154541015625,
-0.041748046875,
0.023193359375,
0.0008907318115234375,
0.0179290771484375,
-0.0038433074951171875,
-0.0299224853515625,
0.0379638671875,
-0.0213775634765625,
-0.0240631103515625,
-0.0220489501953125,
-0.031951904296875,
-0.01678466796875,
-0.020843505859375,
-0.001453399658203125,
0.0148773193359375,
0.005489349365234375,
0.0097503662109375,
-0.0285186767578125,
-0.0384521484375,
0.00443267822265625,
-0.041717529296875,
0.039398193359375,
-0.032318115234375,
-0.03668212890625,
-0.037200927734375,
0.0034885406494140625,
0.0335693359375,
-0.038299560546875,
-0.04119873046875,
-0.010986328125,
-0.042083740234375,
0.047637939453125,
-0.0008006095886230469,
0.0653076171875,
-0.0231475830078125,
-0.05047607421875,
0.005401611328125,
0.0017566680908203125,
0.050323486328125,
0.01470947265625,
-0.05126953125,
0.0168914794921875,
-0.0265655517578125,
0.0265960693359375,
0.0290069580078125,
-0.0501708984375,
-0.003795623779296875,
-0.024444580078125,
-0.00739288330078125,
-0.0020809173583984375,
0.007904052734375,
0.00589752197265625,
-0.0292816162109375,
0.0250244140625,
0.0038509368896484375,
-0.0018587112426757812,
-0.03387451171875,
-0.03265380859375,
0.05767822265625,
-0.002040863037109375,
-0.006977081298828125,
-0.04205322265625,
0.0073699951171875,
-0.0233917236328125,
-0.043365478515625,
-0.07763671875,
-0.01508331298828125,
0.0261688232421875,
-0.0191650390625,
0.09320068359375,
0.0787353515625,
0.0196380615234375,
0.0313720703125,
-0.0156402587890625,
0.0018377304077148438,
0.01009368896484375,
-0.0030078887939453125,
-0.0228118896484375,
-0.006244659423828125,
0.061676025390625,
-0.0140838623046875,
0.0283050537109375,
0.0076141357421875,
-0.01169586181640625,
0.016204833984375,
-0.0104827880859375,
0.0135955810546875,
0.0269927978515625,
-0.015472412109375,
-0.01995849609375,
-0.0029964447021484375,
0.02618408203125,
0.02447509765625,
-0.00150299072265625,
0.024658203125,
0.01129913330078125,
-0.01015472412109375,
-0.005084991455078125,
-0.02288818359375,
0.045135498046875,
-0.0006031990051269531,
-0.0007424354553222656,
0.03778076171875,
-0.024169921875,
-0.016998291015625,
0.039276123046875,
0.037139892578125,
-0.06707763671875,
0.0006861686706542969,
0.019866943359375,
0.01197052001953125,
-0.0172576904296875,
0.006717681884765625,
-0.0147705078125,
-0.01258087158203125,
0.013092041015625,
-0.04315185546875,
-0.047332763671875,
-0.014862060546875,
-0.0133819580078125,
-0.0074615478515625,
-0.024169921875,
0.033905029296875,
0.016937255859375,
0.0175933837890625,
-0.0152740478515625,
-0.01468658447265625,
0.0006399154663085938,
-0.00698089599609375,
0.018646240234375,
-0.01515960693359375,
-0.01904296875,
-0.00868988037109375,
0.02294921875,
-0.045196533203125,
0.011749267578125,
0.038330078125,
-0.01029205322265625,
0.0092926025390625,
0.03790283203125,
-0.023101806640625,
0.012115478515625,
0.0011587142944335938,
-0.054779052734375,
0.00969696044921875,
0.007843017578125,
0.010009765625,
0.0019931793212890625,
-0.01003265380859375,
0.004657745361328125,
-0.037353515625,
0.0105133056640625,
-0.017547607421875,
-0.038848876953125,
0.08843994140625,
-0.0478515625,
-0.0115966796875,
-0.013671875,
0.00676727294921875,
0.034271240234375,
0.0254364013671875,
0.0271453857421875,
-0.0634765625,
-0.0716552734375,
0.03253173828125,
-0.08477783203125,
-0.00524139404296875,
0.01702880859375,
-0.042755126953125,
0.11114501953125,
0.0164794921875,
0.012603759765625,
0.005474090576171875,
0.04266357421875,
-0.007770538330078125,
0.04425048828125,
-0.025360107421875,
0.0179901123046875,
-0.0051116943359375,
0.031097412109375,
0.001461029052734375,
0.0159149169921875,
0.0203094482421875,
0.008636474609375,
0.072509765625,
0.0250244140625,
-0.02978515625,
0.0254974365234375,
0.058502197265625,
-0.004566192626953125,
-0.0413818359375,
0.054168701171875,
-0.0203857421875,
-0.003326416015625,
0.0018815994262695312,
0.00388336181640625,
0.029754638671875,
0.021209716796875,
-0.057830810546875,
0.01335906982421875,
-0.0069580078125,
-0.0190277099609375,
-0.0225677490234375,
-0.002780914306640625,
-0.0582275390625,
-0.01216888427734375,
0.0290985107421875,
0.01348876953125,
-0.0187530517578125,
0.0223541259765625,
-0.0242767333984375,
0.0029277801513671875,
0.046630859375,
-0.03729248046875,
0.04083251953125,
-0.0218048095703125,
0.02716064453125,
0.04156494140625,
-0.002201080322265625,
0.084716796875,
0.007694244384765625,
0.01336669921875,
0.0196075439453125,
0.006114959716796875,
0.0435791015625,
0.0004906654357910156,
0.0230255126953125,
-0.056365966796875,
-0.0227508544921875,
0.045806884765625,
0.0640869140625,
-0.02947998046875,
-0.0267486572265625,
0.01336669921875,
0.0189208984375,
0.00628662109375,
0.0174407958984375,
0.04412841796875,
0.0330810546875,
0.0447998046875,
-0.06365966796875,
0.00696563720703125,
0.01538848876953125,
0.029998779296875,
-0.0241546630859375,
-0.005504608154296875,
-0.037139892578125,
-0.017974853515625,
-0.048248291015625,
0.00772857666015625,
0.01134490966796875,
0.1004638671875,
0.0303497314453125,
0.060791015625,
-0.045501708984375,
-0.05230712890625,
-0.014801025390625,
0.020843505859375,
0.041412353515625,
-0.00804901123046875,
-0.02740478515625,
-0.0122222900390625,
0.06329345703125,
0.031158447265625,
0.031494140625,
0.0286102294921875,
0.040679931640625,
0.026641845703125,
0.01264190673828125,
0.0040130615234375,
0.0276947021484375,
-0.00739288330078125,
0.0203094482421875,
-0.04541015625,
0.0225067138671875,
-0.00482940673828125,
-0.004566192626953125,
-0.00946044921875,
0.0028934478759765625,
0.036285400390625,
-0.0091094970703125,
0.00960540771484375,
0.0061798095703125,
-0.032562255859375,
0.038482666015625,
-0.015228271484375,
0.0782470703125,
0.03106689453125,
-0.06427001953125,
-0.010406494140625,
-0.028564453125,
-0.06341552734375,
0.03643798828125,
0.055206298828125,
-0.0032024383544921875,
-0.0047607421875,
-0.00949859619140625,
0.00337982177734375,
-0.043243408203125,
0.0037326812744140625,
0.02337646484375,
-0.0233001708984375,
0.006805419921875,
0.00804901123046875,
0.00885009765625,
0.01432037353515625,
0.017669677734375,
0.0164031982421875,
-0.0017042160034179688,
0.128662109375,
-0.055206298828125,
-0.0031280517578125,
-0.015777587890625,
0.00732421875,
-0.037811279296875,
-0.0309295654296875,
0.051971435546875,
-0.0382080078125,
-0.0355224609375,
0.0009145736694335938,
-0.03814697265625,
0.01351165771484375,
0.037628173828125,
-0.06317138671875,
-0.01197052001953125,
0.0146942138671875,
0.01074981689453125,
-0.0011281967163085938,
0.03326416015625,
-0.026153564453125,
-0.04827880859375,
-0.041595458984375,
-0.00626373291015625,
0.0128936767578125,
0.0119781494140625,
-0.0307159423828125,
0.0080108642578125,
-0.0209808349609375,
-0.051025390625,
0.013885498046875,
-0.037384033203125,
0.0227813720703125,
0.0291595458984375,
0.0076446533203125,
-0.0634765625,
-0.014068603515625,
-0.0128936767578125,
-0.035125732421875,
0.013427734375,
0.03271484375,
-0.01393890380859375,
-0.022247314453125,
-0.0209197998046875,
-0.0112762451171875,
0.0218963623046875,
-0.025482177734375,
0.00676727294921875,
-0.0129547119140625,
0.0094451904296875,
0.0184326171875,
-0.045166015625,
-0.01800537109375,
-0.0279693603515625,
-0.0223846435546875,
0.02978515625,
-0.0167694091796875,
-0.0115203857421875,
-0.04425048828125,
-0.0081024169921875,
0.041961669921875,
-0.0130767822265625,
-0.0005769729614257812,
0.006710052490234375,
-0.040313720703125,
-0.01221466064453125,
0.004924774169921875,
-0.018585205078125,
0.00974273681640625,
0.01410675048828125,
-0.037353515625,
-0.026885986328125,
-0.01261138916015625,
0.023193359375,
-0.01715087890625,
0.0162200927734375,
0.019683837890625,
-0.01983642578125,
-0.04052734375,
0.005161285400390625,
0.01390838623046875,
0.042633056640625,
0.03173828125,
-0.0230560302734375,
0.0382080078125,
-0.04364013671875,
-0.018402099609375,
-0.038116455078125,
0.0199127197265625,
-0.0810546875,
-0.052276611328125,
-0.0223236083984375,
0.0160980224609375,
0.0211029052734375,
-0.0325927734375,
-0.046600341796875,
0.039794921875,
0.0042877197265625,
-0.0230560302734375,
-0.008697509765625,
0.004810333251953125,
-0.0023593902587890625,
0.0103302001953125,
0.004795074462890625,
-0.02813720703125,
-0.0072784423828125,
0.0165557861328125,
-0.0040435791015625,
0.061309814453125,
0.0054931640625,
0.0250244140625,
0.004268646240234375,
0.01195526123046875,
-0.00803375244140625,
-0.03564453125,
0.021636962890625,
-0.006725311279296875,
0.0271148681640625,
0.047515869140625,
-0.041656494140625,
0.0200958251953125,
-0.015533447265625,
-0.0027370452880859375,
-0.032867431640625,
-0.0283660888671875,
-0.019317626953125,
-0.0248260498046875,
0.06280517578125,
0.042236328125,
0.007282257080078125,
-0.02349853515625,
-0.066650390625,
-0.03570556640625,
-0.0009293556213378906,
0.003383636474609375,
0.041656494140625,
-0.113525390625,
0.0021495819091796875,
0.06298828125,
-0.0026683807373046875,
-0.0159759521484375,
-0.0075225830078125,
-0.016143798828125,
-0.00997161865234375,
0.0166778564453125,
0.0088043212890625,
-0.0224456787109375,
0.0099029541015625,
-0.0175323486328125,
-0.00728607177734375,
-0.02423095703125,
-0.03485107421875,
0.0209503173828125,
-0.05157470703125,
-0.025726318359375,
-0.0250396728515625,
0.01678466796875,
-0.0024166107177734375,
0.01800537109375,
-0.005367279052734375,
0.002506256103515625,
-0.0084075927734375,
0.036468505859375,
0.01108551025390625,
0.0217437744140625,
-0.01036834716796875,
0.02581787109375,
-0.0034637451171875,
0.060516357421875,
0.0096282958984375,
0.016815185546875,
-0.0164642333984375,
0.0217437744140625,
-0.003200531005859375,
0.01922607421875,
-0.0199432373046875,
0.0171966552734375,
0.01067352294921875,
-0.02032470703125,
0.0171051025390625,
-0.01526641845703125,
0.0006952285766601562,
-0.0193328857421875,
-0.0006804466247558594,
0.005786895751953125,
-0.0184326171875,
0.0219879150390625
]
|
ec72cd6c17a5748c52d82303e2b911c5eedf08eb | Wordpress Stackexchange
Q: Get a list of all Widgets registered in WordPress admin widgets-area I'm trying to disable a couple standard widgets in my theme functions.php.
Therefore I wrote this little function, which works well:
function my_widget_ctrl() {
unregister_widget('WP_Widget_Pages');
unregister_widget('WP_Widget_Calendar');
unregister_widget('WP_Widget_Archives');
unregister_widget('WP_Widget_Links');
unregister_widget('WP_Widget_Meta');
unregister_widget('WP_Widget_Text');
unregister_widget('WP_Widget_Recent_Posts');
unregister_widget('WP_Widget_Recent_Comments');
unregister_widget('WP_Widget_RSS');
unregister_widget('WP_Widget_Tag_Cloud');
}
add_action('widgets_init', 'my_widget_ctrl', 11);
Now I want to disable some other Widgets, which may be installed/activated by other Plugins. But I don’t know how to get a list of all widget-class-names registered, so I can unregister them with unregister_widget()?
A: Widgets are stored in a public variable $widgets in the class WP_Widget_Factory. You can access this class per global variable $wp_widget_factory.
To get all registered widgets, list the keys:
add_action( 'wp_footer', function()
{
if ( empty ( $GLOBALS['wp_widget_factory'] ) )
return;
$widgets = array_keys( $GLOBALS['wp_widget_factory']->widgets );
print '<pre>$widgets = ' . esc_html( var_export( $widgets, TRUE ) ) . '</pre>';
});
To remove all widgets either unregister each widget separately with unregister_widget() (preferred) or empty the array in one run:
add_action( 'widgets_init', function()
{
if ( empty ( $GLOBALS['wp_widget_factory'] ) )
return;
$GLOBALS['wp_widget_factory']->widgets = array();
}, 20);
| Q: Get a list of all Widgets registered in WordPress admin widgets-area I'm trying to disable a couple standard widgets in my theme functions.php.
Therefore I wrote this little function, which works well:
function my_widget_ctrl() {
unregister_widget('WP_Widget_Pages');
unregister_widget('WP_Widget_Calendar');
unregister_widget('WP_Widget_Archives');
unregister_widget('WP_Widget_Links');
unregister_widget('WP_Widget_Meta');
unregister_widget('WP_Widget_Text');
unregister_widget('WP_Widget_Recent_Posts');
unregister_widget('WP_Widget_Recent_Comments');
unregister_widget('WP_Widget_RSS');
unregister_widget('WP_Widget_Tag_Cloud');
}
add_action('widgets_init', 'my_widget_ctrl', 11);
Now I want to disable some other Widgets, which may be installed/activated by other Plugins. But I don’t know how to get a list of all widget-class-names registered, so I can unregister them with unregister_widget()?
A: Widgets are stored in a public variable $widgets in the class WP_Widget_Factory. You can access this class per global variable $wp_widget_factory.
To get all registered widgets, list the keys:
add_action( 'wp_footer', function()
{
if ( empty ( $GLOBALS['wp_widget_factory'] ) )
return;
$widgets = array_keys( $GLOBALS['wp_widget_factory']->widgets );
print '<pre>$widgets = ' . esc_html( var_export( $widgets, TRUE ) ) . '</pre>';
});
To remove all widgets either unregister each widget separately with unregister_widget() (preferred) or empty the array in one run:
add_action( 'widgets_init', function()
{
if ( empty ( $GLOBALS['wp_widget_factory'] ) )
return;
$GLOBALS['wp_widget_factory']->widgets = array();
}, 20);
| wordpress | {
"language": "en",
"length": 182,
"provenance": "stackexchange_00019.jsonl.gz:438159",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/118684"
} | [
0.0289306640625,
-0.0139923095703125,
-0.0008025169372558594,
-0.00830841064453125,
0.007732391357421875,
-0.04071044921875,
0.0419921875,
-0.0251922607421875,
0.035675048828125,
0.01593017578125,
0.005588531494140625,
-0.0196990966796875,
0.0003192424774169922,
-0.0295562744140625,
-0.0109405517578125,
-0.006725311279296875,
0.0343017578125,
0.031829833984375,
0.052490234375,
0.0182952880859375,
0.00630950927734375,
0.0316162109375,
-0.0005731582641601562,
0.047607421875,
0.0007839202880859375,
-0.04296875,
0.057647705078125,
-0.0216064453125,
-0.00908660888671875,
-0.043487548828125,
0.016632080078125,
0.044464111328125,
-0.01480865478515625,
0.042144775390625,
-0.00795745849609375,
-0.07757568359375,
-0.0139923095703125,
0.0284271240234375,
0.029266357421875,
-0.011474609375,
0.04437255859375,
-0.034820556640625,
-0.018402099609375,
-0.003215789794921875,
-0.0291595458984375,
-0.020233154296875,
0.033172607421875,
-0.00391387939453125,
0.0131988525390625,
-0.014068603515625,
0.0172576904296875,
-0.01546478271484375,
0.04241943359375,
-0.05010986328125,
-0.033477783203125,
-0.01123046875,
0.01081085205078125,
-0.01885986328125,
0.0227813720703125,
0.04632568359375,
-0.015777587890625,
-0.0076904296875,
-0.003509521484375,
-0.07470703125,
-0.0193328857421875,
-0.00899505615234375,
-0.007030487060546875,
0.015838623046875,
-0.0240631103515625,
-0.0196533203125,
0.0560302734375,
-0.00756072998046875,
0.00250244140625,
0.007183074951171875,
0.0232086181640625,
-0.00879669189453125,
-0.007289886474609375,
0.00865936279296875,
0.01479339599609375,
0.0224456787109375,
0.05804443359375,
0.01317596435546875,
-0.0247039794921875,
0.0487060546875,
-0.009246826171875,
0.038177490234375,
0.0018444061279296875,
-0.04315185546875,
0.001346588134765625,
-0.0029010772705078125,
-0.0133056640625,
-0.030364990234375,
0.020050048828125,
0.018463134765625,
0.0121002197265625,
-0.032867431640625,
0.06109619140625,
0.052581787109375,
-0.00580596923828125,
-0.0187530517578125,
0.01125335693359375,
-0.039154052734375,
-0.007328033447265625,
-0.0228729248046875,
0.0196685791015625,
0.0762939453125,
-0.04656982421875,
0.0017061233520507812,
0.028839111328125,
0.018798828125,
0.049468994140625,
-0.04351806640625,
0.003665924072265625,
-0.0273590087890625,
-0.0229034423828125,
-0.004669189453125,
-0.00978851318359375,
-0.01561737060546875,
0.014892578125,
-0.037445068359375,
-0.000946044921875,
0.01132965087890625,
0.03460693359375,
-0.003185272216796875,
-0.012451171875,
-0.0136566162109375,
-0.008392333984375,
-0.04119873046875,
0.00859832763671875,
-0.005878448486328125,
-0.0295257568359375,
-0.00002086162567138672,
0.0445556640625,
0.0237274169921875,
0.0098114013671875,
-0.01007080078125,
0.034881591796875,
0.0347900390625,
0.017822265625,
0.042205810546875,
-0.00936126708984375,
-0.072509765625,
-0.0255584716796875,
0.013275146484375,
0.0014190673828125,
0.01348114013671875,
0.013336181640625,
-0.018310546875,
0.00672149658203125,
-0.0016508102416992188,
-0.0246734619140625,
-0.0208282470703125,
0.0423583984375,
0.043426513671875,
0.0203094482421875,
-0.00433349609375,
0.10089111328125,
-0.04107666015625,
-0.05157470703125,
-0.06903076171875,
0.01216888427734375,
-0.01280975341796875,
-0.0169219970703125,
-0.032440185546875,
-0.0565185546875,
0.0198822021484375,
0.0020160675048828125,
-0.00954437255859375,
0.03302001953125,
0.0289154052734375,
0.0277252197265625,
-0.030303955078125,
0.0218353271484375,
0.01947021484375,
-0.00617218017578125,
0.033111572265625,
-0.0355224609375,
-0.00555419921875,
0.01541900634765625,
-0.01479339599609375,
-0.02252197265625,
-0.0294342041015625,
-0.003765106201171875,
0.0247039794921875,
-0.077880859375,
0.0007419586181640625,
0.0310516357421875,
0.0684814453125,
0.01081085205078125,
0.01345062255859375,
0.07989501953125,
-0.0220184326171875,
-0.0205230712890625,
-0.0210113525390625,
0.005157470703125,
-0.0002963542938232422,
-0.016021728515625,
0.00466156005859375,
-0.007556915283203125,
0.0055999755859375,
0.046783447265625,
-0.04180908203125,
0.0291595458984375,
-0.049224853515625,
-0.1187744140625,
0.00087738037109375,
-0.0235137939453125,
0.0418701171875,
-0.034454345703125,
0.005496978759765625,
0.052978515625,
0.0126953125,
-0.0662841796875,
0.051666259765625,
-0.01715087890625,
-0.0221405029296875,
-0.0126953125,
0.06719970703125,
0.0255889892578125,
0.0284423828125,
0.0264739990234375,
-0.030181884765625,
0.04632568359375,
0.005817413330078125,
0.040069580078125,
0.01406097412109375,
-0.0247650146484375,
-0.0250396728515625,
0.0248260498046875,
-0.004993438720703125,
-0.0302581787109375,
0.05963134765625,
-0.042449951171875,
0.00463104248046875,
-0.0258636474609375,
-0.01473236083984375,
-0.01131439208984375,
-0.00652313232421875,
0.0184173583984375,
0.021514892578125,
0.0377197265625,
0.04461669921875,
-0.0236968994140625,
-0.0305938720703125,
0.0211944580078125,
-0.09698486328125,
-0.0137939453125,
-0.0123291015625,
-0.006389617919921875,
0.06622314453125,
0.01100921630859375,
0.064208984375,
-0.0000718235969543457,
0.052886962890625,
-0.01329803466796875,
0.03662109375,
-0.0242919921875,
-0.011810302734375,
-0.00390625,
0.018951416015625,
-0.0063018798828125,
-0.0193328857421875,
-0.0061492919921875,
-0.0233001708984375,
0.048187255859375,
0.01406097412109375,
0.021209716796875,
0.0166778564453125,
-0.042083740234375,
0.021636962890625,
0.0300750732421875,
-0.033111572265625,
-0.0156097412109375,
0.002899169921875,
0.04583740234375,
-0.025634765625,
-0.054534912109375,
0.0037937164306640625,
0.004177093505859375,
-0.015899658203125,
0.01422119140625,
0.057037353515625,
-0.0020008087158203125,
-0.01261138916015625,
-0.0130157470703125,
-0.05450439453125,
0.0019893646240234375,
0.0226593017578125,
-0.03350830078125,
-0.00432586669921875,
-0.013763427734375,
0.07318115234375,
-0.0010204315185546875,
0.019012451171875,
0.055267333984375,
0.00930023193359375,
0.055633544921875,
-0.01056671142578125,
0.0244598388671875,
0.0168304443359375,
0.037261962890625,
0.0450439453125,
0.0198822021484375,
-0.009735107421875,
0.001934051513671875,
-0.019439697265625,
0.007904052734375,
-0.0174713134765625,
-0.005878448486328125,
0.0173187255859375,
-0.100830078125,
0.02264404296875,
0.00212860107421875,
0.06854248046875,
-0.0389404296875,
-0.0665283203125,
-0.016204833984375,
0.01044464111328125,
-0.072265625,
-0.029937744140625,
-0.01070404052734375,
-0.01251983642578125,
0.01210784912109375,
0.0128326416015625,
-0.0198974609375,
-0.006923675537109375,
0.04510498046875,
0.0097198486328125,
-0.00936126708984375,
0.011077880859375,
-0.040069580078125,
-0.0247650146484375,
-0.032135009765625,
0.01351165771484375,
-0.0112457275390625,
0.01328277587890625,
0.00984954833984375,
0.068603515625,
0.0016412734985351562,
-0.050506591796875,
0.0092010498046875,
0.01131439208984375,
-0.00591278076171875,
0.01043701171875,
-0.00963592529296875,
-0.00850677490234375,
-0.016693115234375,
0.003917694091796875,
-0.001312255859375,
-0.005947113037109375,
0.003078460693359375,
-0.00991058349609375,
0.064208984375,
-0.00771331787109375,
0.069580078125,
0.00714874267578125,
-0.087158203125,
-0.0328369140625,
0.01154327392578125,
-0.06695556640625,
0.006622314453125,
-0.004119873046875,
-0.0156097412109375,
0.00908660888671875,
-0.004138946533203125,
-0.0164642333984375,
0.015838623046875,
-0.01287841796875,
0.024200439453125,
0.01485443115234375,
-0.0026721954345703125,
-0.0252227783203125,
0.059906005859375,
0.006259918212890625,
0.0380859375,
-0.00475311279296875,
0.007030487060546875,
-0.018951416015625,
0.01467132568359375,
0.0020580291748046875,
0.000020623207092285156,
-0.010711669921875,
0.0087738037109375,
-0.0174713134765625,
-0.024505615234375,
0.029541015625,
-0.044403076171875,
-0.01318359375,
-0.01424407958984375,
-0.00848388671875,
0.0164031982421875,
0.06500244140625,
-0.06109619140625,
-0.02099609375,
-0.0194244384765625,
0.019378662109375,
-0.032073974609375,
-0.0767822265625,
-0.0121612548828125,
-0.0030956268310546875,
-0.1314697265625,
0.00891876220703125,
0.0098876953125,
-0.06768798828125,
-0.01319122314453125,
-0.044219970703125,
-0.08868408203125,
-0.034393310546875,
0.028900146484375,
-0.01517486572265625,
0.00782012939453125,
-0.0122222900390625,
0.029632568359375,
-0.048431396484375,
0.0321044921875,
-0.02362060546875,
-0.06512451171875,
0.0038051605224609375,
-0.048828125,
0.061492919921875,
0.045745849609375,
-0.039093017578125,
-0.0360107421875,
0.007663726806640625,
0.0222930908203125,
-0.01314544677734375,
0.0478515625,
0.0268707275390625,
0.0176239013671875,
-0.0183868408203125,
0.00890350341796875,
-0.03692626953125,
-0.00557708740234375,
-0.01611328125,
-0.07232666015625,
-0.0533447265625,
-0.026397705078125,
-0.019256591796875,
0.052978515625,
-0.04998779296875,
0.024810791015625,
0.002773284912109375,
-0.0300140380859375,
-0.0024700164794921875,
-0.01399993896484375,
0.0006570816040039062,
0.0013418197631835938,
-0.00885772705078125,
0.0063018798828125,
-0.0003921985626220703,
-0.00959014892578125,
0.0193634033203125,
0.050262451171875,
0.0272216796875,
-0.01285552978515625,
-0.024658203125,
-0.0018444061279296875,
0.04046630859375,
-0.0029506683349609375,
0.0235595703125,
0.0478515625,
-0.0205230712890625,
-0.0013275146484375,
0.026214599609375,
-0.034027099609375,
0.01001739501953125,
0.08074951171875,
0.03240966796875,
0.0027618408203125,
-0.029144287109375,
-0.00872802734375,
-0.0215606689453125,
0.0194549560546875,
0.01081085205078125,
-0.052734375,
0.04290771484375,
0.04620361328125,
-0.02008056640625,
0.019256591796875,
-0.00724029541015625,
0.015380859375,
-0.00604248046875,
0.01435089111328125,
0.00531768798828125,
0.01036834716796875,
0.0169525146484375,
-0.04583740234375,
0.0021076202392578125,
0.0133514404296875,
0.032623291015625,
0.05230712890625,
-0.0070953369140625,
0.03948974609375,
0.025299072265625,
-0.01276397705078125,
-0.0022907257080078125,
-0.009124755859375,
0.045654296875,
-0.021392822265625,
-0.0621337890625,
-0.0045013427734375,
0.0022525787353515625,
0.005523681640625,
0.0343017578125,
0.00995635986328125,
0.057586669921875,
0.061431884765625,
-0.021270751953125,
-0.04962158203125,
-0.0022602081298828125,
0.0288238525390625,
-0.062164306640625,
-0.05267333984375,
0.0167236328125,
-0.037109375,
-0.0234527587890625,
0.03900146484375,
-0.005977630615234375,
-0.00391387939453125,
-0.0016498565673828125,
0.07269287109375,
0.0191650390625,
0.0654296875,
0.0031604766845703125,
-0.0501708984375,
0.0208282470703125,
0.0108489990234375,
-0.046661376953125,
-0.0163726806640625,
0.01139068603515625,
0.023529052734375,
0.016845703125,
0.0303192138671875,
0.000171661376953125,
-0.0025730133056640625,
-0.016998291015625,
-0.031890869140625,
0.08343505859375,
0.034149169921875,
-0.0540771484375,
-0.04833984375,
-0.01250457763671875,
0.04852294921875,
-0.0126495361328125,
-0.0165863037109375,
-0.00884246826171875,
-0.037750244140625,
-0.0220489501953125,
0.029754638671875,
-0.040924072265625,
0.004619598388671875,
0.022705078125,
-0.049072265625,
-0.015899658203125,
0.0016918182373046875,
-0.0889892578125,
-0.046844482421875,
0.01087188720703125,
-0.014923095703125,
0.0112152099609375,
-0.032379150390625,
0.0406494140625,
-0.029876708984375,
0.0025386810302734375,
-0.056610107421875,
0.02154541015625,
0.02313232421875,
0.03424072265625,
-0.031463623046875,
-0.028656005859375,
-0.058441162109375,
-0.03619384765625,
-0.02069091796875,
-0.016082763671875,
-0.03662109375,
0.004703521728515625,
0.0268402099609375,
-0.00505828857421875,
0.04327392578125,
0.0147552490234375,
0.00701141357421875,
0.03265380859375,
0.0186920166015625,
0.0116119384765625,
0.016815185546875,
0.026092529296875,
-0.00557708740234375,
0.05865478515625,
0.0218048095703125,
-0.004119873046875,
-0.033294677734375,
-0.029815673828125,
0.02850341796875,
-0.008514404296875,
-0.0293731689453125,
-0.01229095458984375,
-0.0268096923828125,
-0.0474853515625,
0.00112152099609375,
-0.0247650146484375,
-0.0098876953125,
-0.0181732177734375,
-0.000881195068359375,
-0.01861572265625,
0.01073455810546875,
-0.0069122314453125,
0.01074981689453125,
0.00627899169921875,
-0.021331787109375,
-0.007228851318359375,
0.00658416748046875,
0.0085601806640625,
0.0106353759765625,
-0.001102447509765625,
-0.0138397216796875,
-0.0033092498779296875,
-0.04541015625,
0.039337158203125,
0.0333251953125,
0.01313018798828125,
0.054107666015625,
-0.02264404296875,
0.032928466796875,
0.04229736328125,
0.01259613037109375,
-0.017364501953125,
-0.00048160552978515625,
0.07470703125,
0.0069122314453125,
-0.0238189697265625,
0.06085205078125,
-0.033966064453125,
0.00457000732421875,
0.04730224609375,
0.032440185546875,
-0.0853271484375,
0.00624847412109375,
0.0013589859008789062,
0.004253387451171875,
-0.006015777587890625,
0.035003662109375,
-0.047637939453125,
-0.05401611328125,
0.016876220703125,
-0.027435302734375,
-0.001438140869140625,
0.01506805419921875,
0.027679443359375,
-0.00959014892578125,
0.00025653839111328125,
0.02691650390625,
0.0228271484375,
0.0005121231079101562,
-0.01226806640625,
0.01482391357421875,
0.006259918212890625,
-0.03753662109375,
-0.00434112548828125,
0.007778167724609375,
-0.0236358642578125,
-0.08544921875,
0.0027217864990234375,
0.00470733642578125,
-0.0023193359375,
0.0034313201904296875,
-0.0202484130859375,
0.0487060546875,
0.039154052734375,
-0.01116943359375,
0.005924224853515625,
-0.0075225830078125,
0.00847625732421875,
-0.04248046875,
0.0158538818359375,
0.0166473388671875,
0.0086517333984375,
0.01059722900390625,
0.024505615234375,
-0.031494140625,
-0.0197296142578125,
-0.007328033447265625,
0.01739501953125,
0.0830078125,
-0.01538848876953125,
-0.022003173828125,
0.0226593017578125,
0.03045654296875,
-0.004184722900390625,
-0.0273895263671875,
0.0186004638671875,
-0.046722412109375,
0.01262664794921875,
-0.0155029296875,
-0.00482940673828125,
-0.006359100341796875,
-0.0369873046875,
-0.0276947021484375,
0.09912109375,
0.01309967041015625,
-0.0132904052734375,
0.0257568359375,
0.038330078125,
-0.04827880859375,
0.0289459228515625,
-0.0266571044921875,
0.0249786376953125,
0.005218505859375,
0.01081085205078125,
0.0178985595703125,
0.01490020751953125,
0.0208740234375,
-0.01189422607421875,
0.0755615234375,
-0.0006608963012695312,
-0.0021228790283203125,
-0.01416015625,
0.03143310546875,
0.044036865234375,
-0.01190185546875,
0.0147247314453125,
0.0215911865234375,
0.0233306884765625,
0.025604248046875,
-0.0179595947265625,
0.02264404296875,
-0.02545166015625,
-0.0186767578125,
0.04034423828125,
-0.00580596923828125,
-0.012847900390625,
-0.0236053466796875,
0.0063018798828125,
0.0249481201171875,
-0.03155517578125,
-0.028778076171875,
0.002750396728515625,
-0.01045989990234375,
0.037078857421875,
0.0238037109375,
0.019073486328125,
0.04425048828125,
-0.0303955078125,
0.047393798828125,
0.0088043212890625,
0.007534027099609375,
0.004695892333984375,
0.01030731201171875,
-0.0076141357421875,
0.0203399658203125,
-0.001674652099609375,
0.037811279296875,
-0.003448486328125,
0.027008056640625,
0.033050537109375,
0.03253173828125,
-0.0006160736083984375,
0.03887939453125,
0.006496429443359375,
0.01116180419921875,
-0.0289764404296875,
-0.0985107421875,
0.01497650146484375,
0.01125335693359375,
0.00864410400390625,
0.0653076171875,
0.04925537109375,
-0.06591796875,
0.0276641845703125,
-0.01006317138671875,
-0.01450347900390625,
0.02972412109375,
0.050323486328125,
-0.01453399658203125,
-0.0396728515625,
-0.013427734375,
-0.03466796875,
-0.0234527587890625,
-0.01221466064453125,
0.01361083984375,
0.0301666259765625,
-0.001399993896484375,
0.02288818359375,
0.005924224853515625,
-0.00891876220703125,
-0.01473236083984375,
0.0241851806640625,
0.013763427734375,
0.01142120361328125,
-0.019500732421875,
-0.0160675048828125,
0.01218414306640625,
0.0169677734375,
0.0228729248046875,
-0.0023021697998046875,
0.049285888671875,
0.0506591796875,
-0.031585693359375,
-0.003459930419921875,
0.04644775390625,
-0.00894927978515625,
-0.0020618438720703125,
-0.022735595703125,
0.0004940032958984375,
-0.0027408599853515625,
-0.008026123046875,
0.0006995201110839844,
0.045166015625,
-0.0056915283203125,
-0.04876708984375,
0.038818359375,
-0.012664794921875,
0.0108795166015625,
0.032318115234375,
-0.003078460693359375,
-0.0083160400390625,
-0.0321044921875,
-0.1080322265625,
-0.0207061767578125,
0.004116058349609375,
-0.043609619140625,
0.0241851806640625,
0.036956787109375,
-0.0614013671875,
0.0274505615234375,
0.0243377685546875,
0.00836181640625,
-0.0264739990234375,
0.00783538818359375,
0.01404571533203125,
0.006565093994140625,
0.020904541015625,
0.032623291015625,
-0.0168304443359375,
0.00435638427734375,
-0.0092620849609375,
0.0009136199951171875,
0.049468994140625,
0.00916290283203125,
0.02911376953125,
0.0228118896484375,
-0.0084991455078125,
-0.00774383544921875,
0.00774383544921875,
-0.031463623046875,
0.039031982421875,
0.00014925003051757812,
0.0027561187744140625,
-0.01203155517578125,
-0.04998779296875,
0.042816162109375,
0.0211029052734375,
-0.0219879150390625,
0.044525146484375,
0.0053558349609375,
-0.0010766983032226562,
-0.040435791015625,
0.0017499923706054688,
-0.021240234375,
-0.040435791015625,
-0.000698089599609375,
0.01331329345703125,
-0.0085601806640625,
0.022308349609375,
0.02093505859375,
-0.0111541748046875,
0.013214111328125,
-0.0196380615234375,
0.003467559814453125,
0.014068603515625,
-0.02142333984375,
0.0167999267578125,
0.0175933837890625,
-0.034942626953125,
-0.006565093994140625,
-0.0149078369140625,
-0.0109405517578125,
0.015777587890625,
-0.0064849853515625,
-0.00772857666015625,
-0.026092529296875,
-0.03143310546875,
0.0289459228515625,
0.00460052490234375,
-0.0223541259765625,
0.01438140869140625,
0.02880859375,
-0.03204345703125,
0.001491546630859375,
-0.0701904296875,
-0.0273590087890625,
-0.0640869140625,
-0.0144195556640625,
0.033355712890625,
-0.04864501953125,
-0.04461669921875,
-0.03289794921875,
0.00321197509765625,
0.0199737548828125,
0.0214080810546875,
-0.054779052734375,
0.020477294921875,
0.0006422996520996094,
0.0240325927734375,
-0.00801849365234375,
0.0426025390625,
-0.033050537109375,
-0.01126861572265625,
-0.0260162353515625,
-0.004772186279296875,
-0.03497314453125,
0.0494384765625,
-0.0024738311767578125,
-0.002254486083984375,
0.006744384765625,
-0.01317596435546875,
0.0172882080078125,
0.0187225341796875,
0.01873779296875,
0.044097900390625,
-0.0017414093017578125,
-0.0089263916015625,
-0.0168609619140625,
0.019805908203125,
-0.01389312744140625,
-0.07110595703125,
0.01751708984375,
-0.06463623046875,
-0.00838470458984375,
0.005481719970703125,
-0.01074981689453125,
0.0034732818603515625,
-0.041473388671875,
-0.06280517578125,
0.0440673828125,
0.0018091201782226562,
-0.029327392578125,
-0.033111572265625,
0.0004658699035644531,
-0.00994110107421875,
-0.0168304443359375,
0.0081634521484375,
-0.055572509765625,
-0.01558685302734375,
0.038848876953125,
0.03912353515625,
0.0189361572265625,
0.041961669921875,
0.029632568359375,
-0.04638671875,
0.01043701171875,
-0.0246124267578125,
0.0310211181640625,
-0.036834716796875,
-0.0032405853271484375,
0.0179595947265625,
0.0406494140625,
-0.0262451171875,
0.009002685546875,
0.01410675048828125,
0.036346435546875,
0.007022857666015625,
-0.06915283203125,
-0.04443359375,
-0.041961669921875,
0.0275421142578125,
0.044097900390625,
0.0214080810546875,
-0.005092620849609375,
-0.0018596649169921875,
-0.013336181640625,
0.002079010009765625,
-0.0386962890625,
0.00792694091796875,
-0.055633544921875,
-0.0284271240234375,
-0.0101776123046875,
0.01554107666015625,
0.0228424072265625,
-0.04437255859375,
-0.004550933837890625,
-0.0019893646240234375,
0.0386962890625,
0.03826904296875,
-0.0206451416015625,
0.017425537109375,
-0.0168304443359375,
-0.0012922286987304688,
0.039337158203125,
-0.057037353515625,
0.0209503173828125,
0.0121612548828125,
-0.020416259765625,
-0.057464599609375,
-0.0159759521484375,
-0.01300048828125,
0.0261383056640625,
-0.0255889892578125,
0.0408935546875,
-0.0258331298828125,
0.0251312255859375,
-0.020477294921875,
0.014495849609375,
0.0065155029296875,
0.02685546875,
-0.00800323486328125,
0.038177490234375,
0.0223846435546875,
0.020721435546875,
0.006046295166015625,
0.05426025390625,
0.003841400146484375,
0.05194091796875,
0.0309906005859375,
-0.024932861328125,
0.054656982421875,
-0.043243408203125,
0.00921630859375,
0.0201568603515625,
0.0189971923828125,
-0.043975830078125,
0.031097412109375,
-0.0166778564453125,
0.01543426513671875,
0.022186279296875
]
|
2b9a9a5a6ed860f1f0e7304d18d541b78bc570c3 | Wordpress Stackexchange
Q: Add a meta description to home page? I have the theme Hatch and I can't figure out how to change the meta-description of the home-page. It is not an actual page, it is the default view for posts.
Have searched everywhere for an answer but really can't figure it out. I have downloaded the plug-in SEO by Yoast, but only seem to be able to change the meta-description on pages and posts...?
A: You do not need to add Yoast if you only want to add meta tags to the homepage. Just some minor editing will save you on performance.
You can use the is_home() function.
Insert this to your header.php:
<?php if (is_home()) { ?>
<meta name="description" content="Your description for homepage..." />
<?php } else { ?>
<meta name="description" content="Description for other pages..." />
<?php } ?>
| Q: Add a meta description to home page? I have the theme Hatch and I can't figure out how to change the meta-description of the home-page. It is not an actual page, it is the default view for posts.
Have searched everywhere for an answer but really can't figure it out. I have downloaded the plug-in SEO by Yoast, but only seem to be able to change the meta-description on pages and posts...?
A: You do not need to add Yoast if you only want to add meta tags to the homepage. Just some minor editing will save you on performance.
You can use the is_home() function.
Insert this to your header.php:
<?php if (is_home()) { ?>
<meta name="description" content="Your description for homepage..." />
<?php } else { ?>
<meta name="description" content="Description for other pages..." />
<?php } ?>
A: You can also do by this
<?php
the_post();
if ( is_home() ) { ?>
<meta name="description" content="YOUR DESCRIPTION" />
<?php } elseif (is_single()) { ?>
<meta name="description" content="<?php the_excerpt(); ?>" />
<?php } ?>
this will set different description for home and other.
A: I had the same issue, and since this post is one of the first results that comes up in Google, I wanted to share the solution that I found.
The code that Christine provides is good, but the problem is that you shouldn't generally edit the header.php file directly, since your changes would be erased when you update the theme.
The solution is to insert the code into your own plugin, and to use an action hook in order to insert the description into the header:
<?php
function add_meta_home() {
if (is_home() || is_front_page()) { ?>
<meta name="description" content="Lorem ipsum dolor sit amet."/>
<?php
}
}
add_action('wp_head', 'add_meta_home');
?>
The use of (is_home() || is_front_page()) ensures that the meta description displays for your website's homepage, regardless of how it's configured.
A: For WordPress SEO (by Yoast) - it's under titles and meta - there will be a home tab. The All in one SEO plugin gives the option to autogenerate or customize the description
I made an SEO video using Yoast: https://www.w3bdesign.ca/free-wordpress-seo/
| wordpress | {
"language": "en",
"length": 356,
"provenance": "stackexchange_00019.jsonl.gz:438197",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/118809"
} | [
-0.003406524658203125,
0.0221099853515625,
-0.00019693374633789062,
0.06341552734375,
0.00750732421875,
-0.0298919677734375,
0.04840087890625,
-0.08038330078125,
-0.039764404296875,
0.05438232421875,
0.0010118484497070312,
-0.00543212890625,
0.0145111083984375,
-0.0245819091796875,
-0.013702392578125,
-0.034759521484375,
0.034759521484375,
-0.01149749755859375,
0.049896240234375,
0.00844573974609375,
0.0054168701171875,
0.0215911865234375,
0.030426025390625,
-0.002010345458984375,
0.00252532958984375,
-0.0250396728515625,
0.062164306640625,
-0.039093017578125,
0.018890380859375,
0.0023899078369140625,
0.030181884765625,
-0.0096588134765625,
0.0271759033203125,
0.0033206939697265625,
-0.019561767578125,
0.0274810791015625,
0.0081634521484375,
0.004550933837890625,
0.0090789794921875,
0.016510009765625,
0.0256500244140625,
-0.01232147216796875,
-0.0010309219360351562,
0.00433349609375,
-0.00116729736328125,
-0.01169586181640625,
-0.00019681453704833984,
-0.048858642578125,
0.023040771484375,
-0.0132904052734375,
-0.01500701904296875,
-0.01067352294921875,
0.002166748046875,
-0.055145263671875,
-0.01235198974609375,
-0.01526641845703125,
-0.006488800048828125,
-0.00482177734375,
0.02960205078125,
-0.05072021484375,
-0.0218963623046875,
-0.0149688720703125,
0.03466796875,
0.0357666015625,
-0.005573272705078125,
-0.015472412109375,
-0.0026149749755859375,
0.028045654296875,
-0.0714111328125,
-0.0325927734375,
0.04595947265625,
-0.032440185546875,
-0.007259368896484375,
-0.038665771484375,
-0.015960693359375,
0.007709503173828125,
0.01088714599609375,
-0.038238525390625,
0.00809478759765625,
-0.00027871131896972656,
0.03045654296875,
-0.052215576171875,
0.0236053466796875,
-0.0189361572265625,
0.0125274658203125,
-0.00968170166015625,
0.0012350082397460938,
-0.0034465789794921875,
-0.029052734375,
0.00617218017578125,
-0.0164337158203125,
-0.026885986328125,
-0.03668212890625,
-0.0004925727844238281,
0.0019016265869140625,
-0.00390625,
-0.02264404296875,
0.039886474609375,
-0.0428466796875,
0.017578125,
-0.046417236328125,
0.0024871826171875,
0.034698486328125,
-0.046783447265625,
0.004543304443359375,
-0.041107177734375,
-0.0245208740234375,
0.017181396484375,
0.03375244140625,
0.058807373046875,
-0.0188751220703125,
-0.01934814453125,
-0.056182861328125,
-0.051971435546875,
-0.0258941650390625,
0.0604248046875,
-0.0440673828125,
-0.016998291015625,
0.0018148422241210938,
0.00870513916015625,
0.01415252685546875,
0.035186767578125,
0.021209716796875,
-0.044647216796875,
-0.01277923583984375,
-0.0270538330078125,
-0.037506103515625,
-0.031768798828125,
-0.00795745849609375,
-0.032012939453125,
-0.0224151611328125,
0.051513671875,
0.087158203125,
-0.0009608268737792969,
-0.038116455078125,
0.001186370849609375,
0.00948333740234375,
-0.0301513671875,
-0.027435302734375,
0.049163818359375,
-0.039642333984375,
-0.053070068359375,
-0.0047454833984375,
-0.04107666015625,
-0.01303863525390625,
-0.0013933181762695312,
0.0228118896484375,
0.041778564453125,
-0.0118408203125,
-0.0251617431640625,
0.0221099853515625,
-0.0009717941284179688,
0.05328369140625,
0.0035076141357421875,
-0.0182037353515625,
-0.0293426513671875,
0.02099609375,
-0.0249176025390625,
-0.0107879638671875,
-0.037322998046875,
-0.008209228515625,
-0.003864288330078125,
-0.0024814605712890625,
-0.014678955078125,
-0.025909423828125,
0.002582550048828125,
0.025360107421875,
0.0029926300048828125,
0.00939178466796875,
0.048919677734375,
0.01329803466796875,
-0.0026378631591796875,
-0.0347900390625,
-0.00446319580078125,
-0.0167999267578125,
-0.034912109375,
-0.005207061767578125,
0.0491943359375,
0.005374908447265625,
0.00577545166015625,
0.003345489501953125,
-0.028839111328125,
0.06695556640625,
-0.010711669921875,
-0.047149658203125,
0.052032470703125,
0.0097503662109375,
0.06719970703125,
0.0011682510375976562,
0.010498046875,
0.02117919921875,
0.01476287841796875,
-0.01287078857421875,
0.0130615234375,
0.0197906494140625,
-0.0223846435546875,
-0.035919189453125,
-0.03338623046875,
-0.0175628662109375,
0.018798828125,
0.0187835693359375,
-0.0081939697265625,
-0.0019817352294921875,
-0.001850128173828125,
-0.038970947265625,
-0.024261474609375,
-0.0127410888671875,
0.027587890625,
0.010528564453125,
0.0123291015625,
-0.0067901611328125,
-0.056121826171875,
0.0222625732421875,
-0.043426513671875,
-0.062164306640625,
-0.050506591796875,
-0.0221710205078125,
0.0245513916015625,
0.0284423828125,
0.04034423828125,
0.05035400390625,
-0.011505126953125,
0.031646728515625,
0.0133514404296875,
0.075439453125,
0.00982666015625,
-0.034698486328125,
-0.0193328857421875,
0.043853759765625,
0.0150146484375,
-0.0628662109375,
0.0411376953125,
0.040802001953125,
-0.00814056396484375,
-0.025634765625,
0.0261383056640625,
0.04156494140625,
-0.052154541015625,
-0.02032470703125,
0.035980224609375,
0.0148162841796875,
-0.0083160400390625,
-0.000020205974578857422,
0.06396484375,
0.0289764404296875,
-0.006832122802734375,
0.0164337158203125,
0.03167724609375,
-0.01134490966796875,
-0.00785064697265625,
0.00521087646484375,
0.00860595703125,
0.0313720703125,
-0.06475830078125,
-0.00849151611328125,
0.057830810546875,
-0.033599853515625,
-0.01427459716796875,
0.01055145263671875,
-0.0203094482421875,
0.00736236572265625,
0.0175323486328125,
-0.0034656524658203125,
0.0190582275390625,
0.019317626953125,
0.013916015625,
0.033966064453125,
0.044525146484375,
-0.0201873779296875,
-0.00589752197265625,
0.0095367431640625,
0.062469482421875,
0.01556396484375,
0.0426025390625,
0.0228424072265625,
0.012786865234375,
-0.04119873046875,
-0.022216796875,
0.033172607421875,
0.01390838623046875,
0.01026153564453125,
0.02056884765625,
-0.02191162109375,
0.004955291748046875,
-0.0030651092529296875,
-0.059478759765625,
0.0030040740966796875,
0.058807373046875,
0.03546142578125,
0.028778076171875,
0.0270233154296875,
0.0220794677734375,
-0.03411865234375,
0.04595947265625,
0.0139312744140625,
-0.0136566162109375,
-0.01861572265625,
-0.03924560546875,
0.03106689453125,
-0.01212310791015625,
0.046173095703125,
0.0731201171875,
-0.016265869140625,
0.01611328125,
-0.002246856689453125,
-0.033782958984375,
-0.0264434814453125,
0.0200042724609375,
-0.0127716064453125,
-0.0124359130859375,
-0.029541015625,
0.04302978515625,
0.019439697265625,
0.03546142578125,
0.00246429443359375,
-0.0206756591796875,
-0.0050201416015625,
0.01474761962890625,
-0.049835205078125,
-0.04400634765625,
0.0307769775390625,
-0.01055908203125,
0.004085540771484375,
0.009735107421875,
-0.01508331298828125,
-0.0301513671875,
0.0221710205078125,
-0.0035400390625,
-0.02392578125,
-0.040557861328125,
-0.055938720703125,
-0.0694580078125,
-0.04791259765625,
-0.0259246826171875,
-0.0038661956787109375,
-0.00846099853515625,
0.0008893013000488281,
0.0281829833984375,
0.018463134765625,
-0.0093994140625,
0.01904296875,
0.028533935546875,
-0.01169586181640625,
-0.0029621124267578125,
0.01020050048828125,
-0.041168212890625,
0.046600341796875,
-0.002300262451171875,
0.002887725830078125,
0.038360595703125,
-0.007122039794921875,
-0.01259613037109375,
-0.031097412109375,
0.01812744140625,
0.00502777099609375,
-0.0196533203125,
0.0289306640625,
0.0267333984375,
0.0011739730834960938,
-0.01389312744140625,
-0.039031982421875,
0.022003173828125,
-0.062347412109375,
-0.01141357421875,
0.041595458984375,
-0.015625,
-0.0006113052368164062,
-0.0255126953125,
-0.01222991943359375,
-0.007648468017578125,
0.0859375,
-0.006198883056640625,
-0.038818359375,
-0.04620361328125,
-0.056304931640625,
-0.039093017578125,
0.0221405029296875,
-0.0072174072265625,
0.003108978271484375,
-0.003711700439453125,
0.033294677734375,
-0.014251708984375,
0.0175933837890625,
-0.05340576171875,
-0.03314208984375,
0.006702423095703125,
-0.018646240234375,
0.045745849609375,
-0.03228759765625,
-0.0175628662109375,
-0.01371002197265625,
0.074462890625,
-0.01302337646484375,
-0.0312042236328125,
0.0330810546875,
0.00344085693359375,
0.00872802734375,
0.0521240234375,
-0.0474853515625,
-0.0213623046875,
-0.08526611328125,
0.0203857421875,
0.0023651123046875,
-0.029937744140625,
-0.039337158203125,
0.081298828125,
-0.053985595703125,
-0.020416259765625,
0.02752685546875,
0.06707763671875,
-0.0323486328125,
0.0242462158203125,
-0.038726806640625,
0.0109405517578125,
-0.0181884765625,
0.0259857177734375,
-0.035552978515625,
-0.02423095703125,
-0.0099945068359375,
0.044219970703125,
0.0184783935546875,
-0.0313720703125,
0.006061553955078125,
0.052520751953125,
0.032135009765625,
0.0151824951171875,
0.0245361328125,
-0.0216064453125,
0.05303955078125,
-0.005123138427734375,
0.0151519775390625,
-0.006702423095703125,
-0.0093231201171875,
0.02740478515625,
-0.01873779296875,
0.03631591796875,
-0.0104827880859375,
-0.00829315185546875,
0.06787109375,
-0.03302001953125,
-0.039215087890625,
-0.05255126953125,
-0.0103607177734375,
-0.004383087158203125,
0.01085662841796875,
-0.007343292236328125,
-0.04803466796875,
-0.0171966552734375,
0.042724609375,
0.01849365234375,
-0.039215087890625,
0.00621795654296875,
0.03948974609375,
0.01149749755859375,
-0.037994384765625,
-0.06646728515625,
0.0224456787109375,
0.025787353515625,
0.0177459716796875,
0.007587432861328125,
-0.005764007568359375,
-0.02471923828125,
0.010833740234375,
-0.00038051605224609375,
-0.006267547607421875,
-0.0270538330078125,
0.0750732421875,
-0.0227813720703125,
-0.0433349609375,
0.042388916015625,
-0.026123046875,
0.00649261474609375,
0.003467559814453125,
-0.0083465576171875,
0.003208160400390625,
-0.017059326171875,
0.0182952880859375,
0.0069580078125,
0.0024394989013671875,
-0.026031494140625,
0.0243682861328125,
-0.01552581787109375,
0.04705810546875,
0.0257720947265625,
0.01416015625,
0.00496673583984375,
-0.0350341796875,
0.00011736154556274414,
0.0087127685546875,
-0.048126220703125,
-0.040679931640625,
-0.05596923828125,
-0.01386260986328125,
-0.0467529296875,
-0.040069580078125,
0.018310546875,
0.0001035928726196289,
0.02996826171875,
-0.040985107421875,
-0.07513427734375,
0.002506256103515625,
-0.036651611328125,
0.040069580078125,
0.062255859375,
0.060394287109375,
0.0226898193359375,
-0.006671905517578125,
-0.0213623046875,
-0.03717041015625,
0.045074462890625,
-0.019989013671875,
-0.03973388671875,
-0.00927734375,
-0.0083770751953125,
-0.0201873779296875,
0.024749755859375,
0.01297760009765625,
0.0173797607421875,
0.006969451904296875,
-0.030792236328125,
-0.049652099609375,
-0.01399993896484375,
0.0062103271484375,
0.0217742919921875,
0.0219268798828125,
-0.01416015625,
-0.0015268325805664062,
0.0572509765625,
-0.00982666015625,
0.0035991668701171875,
0.0161285400390625,
0.0408935546875,
0.007518768310546875,
-0.0288238525390625,
-0.016357421875,
-0.060821533203125,
0.0096893310546875,
-0.010345458984375,
-0.04754638671875,
-0.04754638671875,
0.002780914306640625,
0.01142120361328125,
0.0034046173095703125,
-0.031524658203125,
-0.0121002197265625,
0.0004165172576904297,
-0.0112457275390625,
0.04522705078125,
-0.0535888671875,
0.0245513916015625,
0.018951416015625,
-0.0013761520385742188,
-0.01552581787109375,
0.00426483154296875,
0.0239410400390625,
-0.071533203125,
-0.031982421875,
-0.0235595703125,
-0.004871368408203125,
0.038604736328125,
-0.01454925537109375,
0.038330078125,
-0.01024627685546875,
-0.00811767578125,
0.005672454833984375,
0.0207672119140625,
0.004154205322265625,
0.0004849433898925781,
-0.012115478515625,
-0.029571533203125,
-0.064208984375,
-0.032257080078125,
-0.0159454345703125,
-0.03436279296875,
-0.0225372314453125,
0.00875091552734375,
-0.01401519775390625,
0.0209808349609375,
-0.002288818359375,
0.010498046875,
-0.02935791015625,
0.01104736328125,
0.005466461181640625,
0.02362060546875,
-0.01425933837890625,
0.044921875,
-0.007144927978515625,
0.0150604248046875,
-0.00954437255859375,
0.0251617431640625,
0.00656890869140625,
-0.0207366943359375,
0.040435791015625,
0.0032749176025390625,
-0.029022216796875,
-0.033782958984375,
-0.06536865234375,
-0.0090179443359375,
0.069580078125,
-0.018402099609375,
0.01039886474609375,
-0.0114898681640625,
-0.0025997161865234375,
-0.0289764404296875,
0.017974853515625,
-0.045379638671875,
-0.01454925537109375,
0.0149993896484375,
-0.0205841064453125,
0.008087158203125,
-0.01076507568359375,
-0.011871337890625,
0.033172607421875,
-0.01357269287109375,
0.0233154296875,
0.0202178955078125,
-0.09686279296875,
0.105224609375,
0.085693359375,
0.0293731689453125,
0.04681396484375,
-0.0146484375,
0.00855255126953125,
-0.00746917724609375,
0.0191497802734375,
-0.01465606689453125,
0.00714874267578125,
0.0517578125,
-0.0082550048828125,
-0.026611328125,
0.01499176025390625,
-0.032257080078125,
0.00959014892578125,
0.047119140625,
0.033477783203125,
-0.07275390625,
0.01788330078125,
0.0265655517578125,
0.0127105712890625,
0.0487060546875,
0.0139312744140625,
-0.01180267333984375,
0.01812744140625,
-0.00457000732421875,
-0.0271148681640625,
-0.036346435546875,
0.007289886474609375,
0.028411865234375,
-0.01332855224609375,
-0.050018310546875,
-0.00632476806640625,
0.005207061767578125,
-0.0272064208984375,
0.0110321044921875,
0.0267181396484375,
-0.026397705078125,
-0.032318115234375,
-0.0328369140625,
0.0360107421875,
-0.048309326171875,
-0.07244873046875,
0.025970458984375,
-0.01525115966796875,
0.005352020263671875,
0.0330810546875,
0.0270538330078125,
-0.0173492431640625,
0.021453857421875,
-0.00673675537109375,
0.006801605224609375,
-0.017333984375,
-0.0130462646484375,
-0.0004856586456298828,
-0.0117340087890625,
-0.0051116943359375,
-0.0102081298828125,
-0.0008654594421386719,
0.007228851318359375,
-0.023529052734375,
-0.0195159912109375,
-0.0009560585021972656,
-0.061798095703125,
0.034912109375,
-0.0019083023071289062,
-0.01715087890625,
0.0037364959716796875,
-0.0272369384765625,
0.01171875,
0.01218414306640625,
0.03302001953125,
-0.0253448486328125,
0.013580322265625,
0.036346435546875,
0.0204620361328125,
-0.025604248046875,
0.046966552734375,
-0.07501220703125,
0.08892822265625,
-0.004985809326171875,
0.0221405029296875,
0.005344390869140625,
0.03326416015625,
-0.048828125,
-0.001918792724609375,
-0.0156707763671875,
0.048248291015625,
0.01366424560546875,
0.04119873046875,
-0.008270263671875,
-0.00827789306640625,
0.0300750732421875,
0.056121826171875,
0.031463623046875,
0.0105438232421875,
0.01345062255859375,
-0.02081298828125,
0.01806640625,
-0.0090179443359375,
-0.040618896484375,
0.034912109375,
-0.032684326171875,
-0.01436614990234375,
-0.0386962890625,
-0.006847381591796875,
0.0236968994140625,
-0.00635528564453125,
-0.0732421875,
0.00783538818359375,
-0.0225830078125,
-0.051361083984375,
-0.021728515625,
0.01593017578125,
-0.0213165283203125,
-0.01309967041015625,
-0.01544189453125,
-0.006122589111328125,
-0.00951385498046875,
0.0426025390625,
0.005519866943359375,
0.026123046875,
0.0194854736328125,
-0.032928466796875,
0.0377197265625,
-0.0116424560546875,
0.062286376953125,
0.0203857421875,
0.0191497802734375,
0.039794921875,
-0.0030155181884765625,
0.0290985107421875,
0.027252197265625,
-0.02874755859375,
0.061492919921875,
0.0537109375,
0.026153564453125,
-0.014739990234375,
0.01540374755859375,
0.03131103515625,
0.07977294921875,
-0.0523681640625,
-0.00991058349609375,
-0.0005731582641601562,
-0.0194854736328125,
-0.0082550048828125,
-0.0155181884765625,
0.0103912353515625,
0.033294677734375,
-0.0007929801940917969,
-0.00299835205078125,
-0.0203704833984375,
-0.0240325927734375,
0.032989501953125,
-0.004901885986328125,
-0.01239013671875,
0.01392364501953125,
-0.0258636474609375,
-0.036956787109375,
0.0238494873046875,
0.006694793701171875,
0.02691650390625,
0.005832672119140625,
0.032684326171875,
0.0264892578125,
0.0010442733764648438,
-0.0211944580078125,
0.04998779296875,
-0.0140380859375,
0.026397705078125,
-0.048614501953125,
-0.046417236328125,
0.0279998779296875,
0.03131103515625,
-0.0204010009765625,
0.07330322265625,
0.03253173828125,
0.047607421875,
-0.01204681396484375,
-0.0033702850341796875,
0.08026123046875,
-0.04296875,
-0.002941131591796875,
-0.0552978515625,
0.035858154296875,
0.0142822265625,
0.00727081298828125,
-0.036956787109375,
0.035369873046875,
0.0443115234375,
-0.018218994140625,
0.0212249755859375,
0.0130462646484375,
-0.045745849609375,
0.007152557373046875,
0.0272064208984375,
0.04095458984375,
0.00797271728515625,
-0.01486968994140625,
0.00693511962890625,
-0.04937744140625,
-0.03759765625,
0.044158935546875,
0.044708251953125,
0.00301361083984375,
0.0069427490234375,
0.004852294921875,
-0.0169830322265625,
0.036163330078125,
-0.0180206298828125,
0.0003323554992675781,
0.0240020751953125,
0.0204315185546875,
-0.01261138916015625,
-0.06866455078125,
-0.0210113525390625,
-0.032318115234375,
0.0059051513671875,
0.01446533203125,
0.09783935546875,
0.0025348663330078125,
0.030029296875,
-0.048370361328125,
0.01399993896484375,
-0.0249481201171875,
-0.06903076171875,
0.0657958984375,
0.01448822021484375,
-0.0061798095703125,
-0.015655517578125,
-0.08233642578125,
0.01873779296875,
0.045623779296875,
0.0036983489990234375,
0.0843505859375,
-0.01397705078125,
-0.01305389404296875,
-0.09527587890625,
-0.0139007568359375,
-0.0259552001953125,
-0.0024662017822265625,
-0.0304718017578125,
-0.01020050048828125,
0.052581787109375,
0.029693603515625,
-0.016876220703125,
0.035491943359375,
0.0347900390625,
-0.020111083984375,
0.03265380859375,
-0.0213470458984375,
0.053253173828125,
0.031768798828125,
0.0148468017578125,
-0.04278564453125,
0.049835205078125,
0.0102386474609375,
0.045654296875,
0.004863739013671875,
0.093994140625,
0.03948974609375,
-0.03369140625,
-0.004680633544921875,
-0.0016193389892578125,
0.000194549560546875,
-0.037261962890625,
-0.01355743408203125,
0.0308074951171875,
-0.0160064697265625,
-0.00185394287109375,
-0.01003265380859375,
-0.0149993896484375,
-0.06378173828125,
-0.01152801513671875,
0.0165863037109375,
-0.04339599609375,
-0.0196075439453125,
-0.0274810791015625,
-0.0023288726806640625,
0.0019502639770507812,
-0.03350830078125,
0.0127410888671875,
0.00653839111328125,
-0.035369873046875,
0.0074920654296875,
-0.0156402587890625,
-0.017608642578125,
0.00014138221740722656,
0.037872314453125,
-0.03326416015625,
0.0121612548828125,
-0.03607177734375,
-0.032562255859375,
-0.023529052734375,
0.022705078125,
0.04742431640625,
-0.01364898681640625,
-0.0244140625,
-0.01326751708984375,
0.0083770751953125,
0.0537109375,
-0.0024433135986328125,
-0.025482177734375,
0.00913238525390625,
-0.02850341796875,
0.012298583984375,
-0.0423583984375,
0.00579071044921875,
-0.07806396484375,
-0.0198516845703125,
-0.011199951171875,
0.00858306884765625,
0.0166015625,
-0.0316162109375,
-0.06805419921875,
0.08123779296875,
-0.0213470458984375,
-0.027099609375,
0.0000998377799987793,
0.01355743408203125,
-0.002353668212890625,
-0.0134429931640625,
0.01396942138671875,
-0.04705810546875,
-0.015167236328125,
0.00028324127197265625,
0.03668212890625,
0.0191192626953125,
0.0237274169921875,
0.024627685546875,
0.00922393798828125,
0.04833984375,
0.029815673828125,
-0.0004930496215820312,
-0.0211944580078125,
0.007904052734375,
-0.0191192626953125,
0.02166748046875,
-0.056365966796875,
-0.05572509765625,
-0.0119781494140625,
0.043853759765625,
0.013946533203125,
-0.055084228515625,
0.0007014274597167969,
0.01415252685546875,
0.022613525390625,
0.02752685546875,
-0.005573272705078125,
-0.054443359375,
0.027801513671875,
-0.013671875,
-0.0267791748046875,
-0.00598907470703125,
0.00939178466796875,
-0.041595458984375,
-0.0279388427734375,
0.018310546875,
-0.021697998046875,
-0.07244873046875,
-0.0002989768981933594,
-0.06280517578125,
-0.01348876953125,
-0.005199432373046875,
0.01486968994140625,
-0.00806427001953125,
-0.03472900390625,
0.0792236328125,
-0.05804443359375,
0.0038204193115234375,
0.00907135009765625,
0.0301361083984375,
0.035430908203125,
-0.0193634033203125,
-0.0016050338745117188,
-0.00103759765625,
0.00604248046875,
0.01617431640625,
0.01447296142578125,
0.01280975341796875,
0.007740020751953125,
-0.014129638671875,
0.0014238357543945312,
0.0179290771484375,
0.008758544921875,
0.027923583984375,
-0.040069580078125,
-0.009368896484375,
-0.0223541259765625,
0.0030345916748046875,
-0.0266571044921875,
0.0171356201171875,
-0.014617919921875,
0.0224761962890625,
-0.01274871826171875,
-0.0013580322265625,
0.0207061767578125,
-0.0059051513671875,
0.00791168212890625,
-0.0034122467041015625,
0.03741455078125,
-0.01131439208984375,
0.00791168212890625,
-0.058319091796875,
-0.0025806427001953125,
0.01325225830078125
]
|
e00ccaba702c9593b5797b9a3e5942f1f88d3672 | Wordpress Stackexchange
Q: Remove custom meta boxes from custom post type Is there a way to create a custom post type in WordPress that will only include the default meta boxes and not any other meta box that was added by other plugins?
The idea is to use the custom post to develop a plugin, this plugin will need to have all the functions custom post type but with all the meta boxes that the plugin adds like All in One SEO.
I want to create a clean interface for the user and those extra meta boxes are in the way :-)
A: Off the top of my head, without actually testing it, this should work. You want to test for is_admin so we don't go running the code on the front end, then also test for the post type being equal to its slug. Edited this because I made a silly mistake before.
Reference this page of the Codex: http://codex.wordpress.org/Function_Reference/remove_meta_box
if( is_admin() ) {
remove_meta_box('linktargetdiv', '$posttype', 'normal');
remove_meta_box('linkxfndiv', '$posttype', 'normal');
remove_meta_box('linkadvanceddiv', '$posttype', 'normal');
remove_meta_box('postexcerpt', '$posttype', 'normal');
remove_meta_box('trackbacksdiv', '$posttype', 'normal');
remove_meta_box('postcustom', '$posttype', 'normal');
remove_meta_box('commentstatusdiv', '$posttype', 'normal');
remove_meta_box('commentsdiv', '$posttype', 'normal');
remove_meta_box('revisionsdiv', '$posttype', 'normal');
remove_meta_box('authordiv', '$posttype', 'normal');
remove_meta_box('sqpt-meta-tags', '$posttype', 'normal');
}
| Q: Remove custom meta boxes from custom post type Is there a way to create a custom post type in WordPress that will only include the default meta boxes and not any other meta box that was added by other plugins?
The idea is to use the custom post to develop a plugin, this plugin will need to have all the functions custom post type but with all the meta boxes that the plugin adds like All in One SEO.
I want to create a clean interface for the user and those extra meta boxes are in the way :-)
A: Off the top of my head, without actually testing it, this should work. You want to test for is_admin so we don't go running the code on the front end, then also test for the post type being equal to its slug. Edited this because I made a silly mistake before.
Reference this page of the Codex: http://codex.wordpress.org/Function_Reference/remove_meta_box
if( is_admin() ) {
remove_meta_box('linktargetdiv', '$posttype', 'normal');
remove_meta_box('linkxfndiv', '$posttype', 'normal');
remove_meta_box('linkadvanceddiv', '$posttype', 'normal');
remove_meta_box('postexcerpt', '$posttype', 'normal');
remove_meta_box('trackbacksdiv', '$posttype', 'normal');
remove_meta_box('postcustom', '$posttype', 'normal');
remove_meta_box('commentstatusdiv', '$posttype', 'normal');
remove_meta_box('commentsdiv', '$posttype', 'normal');
remove_meta_box('revisionsdiv', '$posttype', 'normal');
remove_meta_box('authordiv', '$posttype', 'normal');
remove_meta_box('sqpt-meta-tags', '$posttype', 'normal');
}
A: You can find the best answer here:
http://codex.wordpress.org/Function_Reference/remove_meta_box
Certain meta boxes can be removed by adding something like the code below to the functions.php file in your WordPress theme:
// hide certain meta boxes on the 'YOUR_CUSTOM_POST_TYPE' custom post type
add_filter('add_meta_boxes', 'hide_meta_boxes_YOUR_CUSTOM_POST_TYPE');
function hide_meta_boxes_YOUR_CUSTOM_POST_TYPE() {
remove_meta_box('postexcerpt', 'YOUR_CUSTOM_POST_TYPE', 'normal');
remove_meta_box('trackbacksdiv', 'YOUR_CUSTOM_POST_TYPE', 'normal');
remove_meta_box('postcustom', 'YOUR_CUSTOM_POST_TYPE', 'normal');
remove_meta_box('slugdiv', 'YOUR_CUSTOM_POST_TYPE', 'normal');
remove_meta_box('commentstatusdiv', 'YOUR_CUSTOM_POST_TYPE', 'normal');
remove_meta_box('commentsdiv', 'YOUR_CUSTOM_POST_TYPE', 'normal');
remove_meta_box('revisionsdiv', 'YOUR_CUSTOM_POST_TYPE', 'normal');
}
A: Along with the other answers I found that if you create your Custom post type with
$args = array(
...
public => false
...
)
Some metaboxes won't be included such as Wordpress Seo by Yoast for example. On my case im Using the cpt for a popup, so other metaboxes are not needed and the cpt is not needed to be public.
A: some times adding the style display none is a bad option for this purpose work very well and does not make errors on the program.
I am using this technique to remove meta boxes from custom post types and normal posts and pages.
to remove the meta box take the main id of the meta box for this you can consult the inspect tool with the right-click option
to make this work just take the meta box id and add a style display: none;
#metab-box-id {
display:none;
}
A: First of all you shouldn't do it. If a user have installed other plugins, it is because he/she want ot use it, even if your plugin provide all functionalities of that plugins, who say that for the users your plugin is better than others?
And if that users already have tons of settings with other plugins and see them disappear installing your plugin? I bet that users immediately unistall your plugin (and if there is possibility very low votes will come in that case).
Also consider that another plugin can use the same technique to remove your metaboxes. An the another plugin will remove the metaboxes of that plugin, and so on...
What it will be, the war of metaboxes?
My suggestion is to add your metaboxes and let users decide what metaboxes to leave and what to remove (unistalling plugin or unchecking the metabox from the "screen help" tab).
Finally, note that you can't remove metaboxes of a plugin if you don't know the id of those metaboxes. So to do what you want you should install all your "competitors" plugins, look at the id of their metaboxes and remove them using remove_meta_box.
And if a plugin get updated and change the id of its metaboxes?
Believe me, it's and hard, dirty, no-benefit work.
| wordpress | {
"language": "en",
"length": 634,
"provenance": "stackexchange_00019.jsonl.gz:438220",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/118888"
} | [
0.035003662109375,
-0.0159912109375,
-0.0004591941833496094,
-0.0247039794921875,
0.0010480880737304688,
-0.01739501953125,
0.043731689453125,
-0.002674102783203125,
-0.027130126953125,
0.0193328857421875,
0.03302001953125,
-0.02484130859375,
-0.035430908203125,
-0.039642333984375,
-0.0266571044921875,
-0.03253173828125,
0.0235748291015625,
0.01342010498046875,
0.014404296875,
-0.0259857177734375,
0.02294921875,
-0.0200042724609375,
0.00897216796875,
0.08929443359375,
-0.006687164306640625,
-0.05926513671875,
0.06671142578125,
-0.004810333251953125,
-0.007488250732421875,
-0.0160675048828125,
0.0185089111328125,
0.0269012451171875,
0.0012636184692382812,
0.0469970703125,
-0.03314208984375,
0.042938232421875,
-0.01421356201171875,
0.03936767578125,
0.04266357421875,
-0.018463134765625,
0.006866455078125,
-0.00589752197265625,
-0.00830841064453125,
-0.0228271484375,
-0.018951416015625,
-0.0229339599609375,
0.001613616943359375,
-0.02801513671875,
0.040618896484375,
0.002765655517578125,
-0.0076904296875,
-0.007724761962890625,
0.0162811279296875,
-0.06121826171875,
-0.029449462890625,
-0.0482177734375,
-0.0029811859130859375,
-0.0204620361328125,
0.03167724609375,
0.0201263427734375,
-0.0008153915405273438,
-0.0028285980224609375,
0.00482940673828125,
-0.031524658203125,
0.0002682209014892578,
-0.0068206787109375,
-0.0214080810546875,
0.0218963623046875,
-0.057373046875,
0.0189208984375,
0.05401611328125,
-0.042266845703125,
0.01456451416015625,
-0.00455474853515625,
-0.00942230224609375,
-0.0211639404296875,
-0.00914764404296875,
-0.0145111083984375,
0.023468017578125,
-0.008941650390625,
0.04010009765625,
0.02264404296875,
-0.0175628662109375,
0.00635528564453125,
0.007076263427734375,
0.018646240234375,
-0.007732391357421875,
-0.0372314453125,
-0.0283355712890625,
-0.036041259765625,
-0.034423828125,
-0.1162109375,
-0.01558685302734375,
0.0280609130859375,
0.00014269351959228516,
-0.010498046875,
0.032867431640625,
0.046600341796875,
-0.0086517333984375,
0.0016727447509765625,
0.004711151123046875,
-0.0428466796875,
0.0155029296875,
-0.03851318359375,
0.0146636962890625,
0.0110321044921875,
-0.047821044921875,
-0.045501708984375,
0.034942626953125,
0.05902099609375,
0.0011920928955078125,
-0.035400390625,
-0.020904541015625,
-0.01300811767578125,
-0.0301055908203125,
0.02642822265625,
-0.023590087890625,
-0.004291534423828125,
-0.02294921875,
0.0186767578125,
0.003570556640625,
0.0157928466796875,
0.043853759765625,
-0.07440185546875,
0.03717041015625,
0.0056610107421875,
-0.05169677734375,
-0.03369140625,
-0.00966644287109375,
0.0013856887817382812,
-0.04986572265625,
-0.00572967529296875,
0.0908203125,
0.06646728515625,
0.038330078125,
-0.0302886962890625,
0.030517578125,
-0.02496337890625,
-0.01015472412109375,
0.02117919921875,
-0.005847930908203125,
-0.043670654296875,
-0.00745391845703125,
0.00366973876953125,
-0.0298309326171875,
0.0311279296875,
0.017852783203125,
-0.0009899139404296875,
-0.016448974609375,
-0.061859130859375,
-0.0151519775390625,
-0.0330810546875,
0.0638427734375,
-0.00591278076171875,
-0.01421356201171875,
-0.018829345703125,
0.07513427734375,
-0.039398193359375,
-0.0665283203125,
-0.056304931640625,
0.0154876708984375,
-0.026123046875,
-0.0218658447265625,
0.01654052734375,
-0.029510498046875,
0.043243408203125,
0.0186309814453125,
-0.005191802978515625,
0.0200347900390625,
0.0050048828125,
0.031494140625,
-0.0261993408203125,
-0.01015472412109375,
0.01018524169921875,
0.0020885467529296875,
0.019866943359375,
0.01473236083984375,
0.0283660888671875,
-0.0025997161865234375,
0.0185089111328125,
-0.0086669921875,
-0.045562744140625,
0.0333251953125,
-0.030548095703125,
-0.0931396484375,
0.056549072265625,
0.011138916015625,
0.0687255859375,
0.0100860595703125,
0.0014085769653320312,
0.083251953125,
0.0203094482421875,
-0.04425048828125,
-0.007762908935546875,
0.01058197021484375,
0.0174102783203125,
-0.022369384765625,
-0.01129913330078125,
-0.0048370361328125,
0.029083251953125,
-0.0279998779296875,
-0.0007405281066894531,
-0.006008148193359375,
0.004184722900390625,
-0.07293701171875,
-0.0016765594482421875,
-0.03131103515625,
0.05255126953125,
-0.038330078125,
0.0011587142944335938,
0.0399169921875,
-0.0169219970703125,
-0.03955078125,
0.0325927734375,
-0.00017118453979492188,
0.0027103424072265625,
0.0198516845703125,
0.033233642578125,
-0.01324462890625,
0.0160675048828125,
-0.024505615234375,
-0.04327392578125,
-0.023529052734375,
0.028656005859375,
0.05523681640625,
0.02783203125,
-0.0058746337890625,
-0.00811004638671875,
0.06011962890625,
0.03118896484375,
-0.04095458984375,
0.003589630126953125,
0.0126495361328125,
-0.01250457763671875,
-0.0266265869140625,
0.0004940032958984375,
0.0198974609375,
-0.06060791015625,
0.0025005340576171875,
0.042327880859375,
0.0025844573974609375,
0.042388916015625,
-0.0330810546875,
0.01910400390625,
0.0318603515625,
-0.0133209228515625,
-0.0018529891967773438,
0.01953125,
0.01006317138671875,
0.03912353515625,
-0.04864501953125,
0.0165557861328125,
0.036712646484375,
0.0036220550537109375,
0.038665771484375,
0.032684326171875,
-0.0115203857421875,
-0.047149658203125,
0.046783447265625,
-0.01055145263671875,
0.0009436607360839844,
-0.0400390625,
-0.0226898193359375,
-0.007518768310546875,
0.052459716796875,
-0.01071929931640625,
0.046234130859375,
0.03509521484375,
-0.032318115234375,
-0.007122039794921875,
0.0128021240234375,
0.013458251953125,
-0.0176544189453125,
0.034576416015625,
0.07147216796875,
0.006839752197265625,
-0.05810546875,
-0.0068817138671875,
0.00745391845703125,
0.03509521484375,
0.00041413307189941406,
0.032989501953125,
-0.0213165283203125,
-0.007099151611328125,
0.005390167236328125,
-0.06134033203125,
-0.00734710693359375,
0.004856109619140625,
-0.0016727447509765625,
-0.017822265625,
0.02288818359375,
-0.01482391357421875,
-0.026153564453125,
0.0142974853515625,
0.026702880859375,
-0.04449462890625,
0.003093719482421875,
-0.0557861328125,
0.056732177734375,
-0.05401611328125,
0.037384033203125,
0.06512451171875,
-0.0390625,
0.032806396484375,
-0.003131866455078125,
-0.0026607513427734375,
-0.02508544921875,
0.0255584716796875,
-0.0028591156005859375,
-0.039215087890625,
-0.0196533203125,
0.01483917236328125,
-0.0017299652099609375,
0.0128021240234375,
0.0024204254150390625,
-0.0212554931640625,
0.00970458984375,
0.01371002197265625,
-0.0066986083984375,
0.0009088516235351562,
0.048004150390625,
-0.01439666748046875,
-0.041412353515625,
-0.026763916015625,
-0.0372314453125,
0.01093292236328125,
-0.0243682861328125,
-0.018829345703125,
0.01100921630859375,
-0.0254669189453125,
-0.06634521484375,
-0.044281005859375,
-0.060455322265625,
-0.048583984375,
-0.0016813278198242188,
-0.006256103515625,
0.0077972412109375,
0.07562255859375,
0.02508544921875,
-0.03253173828125,
0.02374267578125,
0.048431396484375,
-0.0079803466796875,
0.0195770263671875,
0.020233154296875,
-0.01195526123046875,
0.056884765625,
0.0023593902587890625,
0.011749267578125,
0.039886474609375,
-0.0237884521484375,
-0.034210205078125,
-0.017303466796875,
-0.0006670951843261719,
-0.004192352294921875,
0.035308837890625,
0.028472900390625,
0.0022602081298828125,
0.0236663818359375,
-0.0266265869140625,
-0.0158233642578125,
0.0277252197265625,
-0.00907135009765625,
0.019744873046875,
-0.041961669921875,
-0.0080108642578125,
0.0049896240234375,
0.06292724609375,
0.053863525390625,
0.043426513671875,
0.0521240234375,
0.005176544189453125,
0.005641937255859375,
0.004730224609375,
0.0219879150390625,
-0.071533203125,
0.01166534423828125,
-0.022796630859375,
0.01363372802734375,
-0.003353118896484375,
0.0185699462890625,
0.01221466064453125,
-0.0267486572265625,
0.006557464599609375,
-0.04449462890625,
0.0447998046875,
-0.0438232421875,
0.0023193359375,
-0.0302581787109375,
-0.01239776611328125,
-0.009979248046875,
0.06805419921875,
-0.08599853515625,
-0.0017032623291015625,
0.005706787109375,
-0.00507354736328125,
0.0288238525390625,
-0.004100799560546875,
-0.0555419921875,
-0.0281829833984375,
-0.10076904296875,
-0.0054168701171875,
0.01346588134765625,
-0.0491943359375,
-0.0086669921875,
0.03240966796875,
-0.06451416015625,
-0.038970947265625,
0.0574951171875,
-0.03997802734375,
-0.0008544921875,
0.00899505615234375,
0.0114593505859375,
-0.0447998046875,
-0.03912353515625,
-0.0001862049102783203,
-0.067626953125,
-0.00844573974609375,
-0.032135009765625,
0.055328369140625,
-0.006011962890625,
0.0096435546875,
-0.031341552734375,
0.018341064453125,
0.0078125,
0.0027637481689453125,
-0.0035247802734375,
0.0033969879150390625,
0.008880615234375,
-0.0005235671997070312,
-0.0012359619140625,
-0.00811767578125,
-0.01324462890625,
0.0305633544921875,
0.00287628173828125,
0.08251953125,
-0.003326416015625,
0.0104217529296875,
0.020599365234375,
-0.02947998046875,
-0.006984710693359375,
-0.053802490234375,
-0.061248779296875,
0.0030803680419921875,
-0.014404296875,
-0.0055084228515625,
-0.058197021484375,
-0.038116455078125,
-0.033233642578125,
0.05010986328125,
-0.04144287109375,
0.0263824462890625,
0.003757476806640625,
0.03411865234375,
-0.0189971923828125,
-0.0078582763671875,
-0.032470703125,
0.0206146240234375,
-0.01078033447265625,
0.00551605224609375,
0.00920867919921875,
-0.009124755859375,
0.0236053466796875,
-0.017059326171875,
0.01549530029296875,
-0.04632568359375,
0.075439453125,
-0.0268402099609375,
-0.0275421142578125,
0.0216217041015625,
-0.058258056640625,
0.0312347412109375,
0.0031795501708984375,
0.00267791748046875,
-0.0249786376953125,
-0.011810302734375,
0.038726806640625,
0.014251708984375,
-0.0020427703857421875,
-0.036773681640625,
0.004871368408203125,
0.0008378028869628906,
0.003620147705078125,
0.0240020751953125,
0.041473388671875,
-0.01168060302734375,
-0.0137786865234375,
-0.032440185546875,
-0.0017223358154296875,
0.017425537109375,
0.00884246826171875,
-0.0239715576171875,
0.002838134765625,
0.044952392578125,
-0.0242156982421875,
0.011016845703125,
0.0133514404296875,
-0.01459503173828125,
-0.0052947998046875,
-0.0576171875,
-0.027618408203125,
0.0147247314453125,
0.043609619140625,
0.0063934326171875,
0.0182952880859375,
0.050811767578125,
-0.00205230712890625,
0.0012989044189453125,
-0.0247802734375,
-0.006259918212890625,
-0.020660400390625,
-0.05682373046875,
-0.002410888671875,
0.004150390625,
-0.0194244384765625,
0.018341064453125,
0.037384033203125,
-0.0034332275390625,
0.0298919677734375,
-0.018768310546875,
0.048675537109375,
0.01222991943359375,
0.0550537109375,
0.006374359130859375,
-0.0202789306640625,
-0.0189361572265625,
0.051483154296875,
-0.03460693359375,
-0.031524658203125,
-0.0239410400390625,
0.020904541015625,
0.02069091796875,
0.0033054351806640625,
0.010223388671875,
0.0048828125,
-0.00452423095703125,
-0.0185394287109375,
0.01181793212890625,
0.01248931884765625,
-0.0312042236328125,
0.0034122467041015625,
0.0034694671630859375,
-0.007648468017578125,
-0.0177001953125,
-0.0089263916015625,
0.00269317626953125,
-0.016357421875,
0.00008380413055419922,
-0.0193939208984375,
-0.0587158203125,
0.00574493408203125,
0.043853759765625,
-0.06683349609375,
-0.0335693359375,
0.01117706298828125,
-0.0697021484375,
-0.0235137939453125,
0.007534027099609375,
-0.00568389892578125,
-0.0216064453125,
-0.032196044921875,
0.0215911865234375,
-0.0151214599609375,
0.01605224609375,
-0.01435089111328125,
0.0250396728515625,
0.00909423828125,
0.00042819976806640625,
0.03704833984375,
-0.0027256011962890625,
-0.039794921875,
-0.0299835205078125,
-0.004749298095703125,
-0.043670654296875,
-0.010833740234375,
-0.0298004150390625,
0.01904296875,
0.0250244140625,
-0.0112152099609375,
-0.0020809173583984375,
0.0008759498596191406,
-0.0005397796630859375,
0.01296234130859375,
0.03759765625,
-0.0241241455078125,
0.0357666015625,
0.01812744140625,
0.0460205078125,
0.01154327392578125,
0.004276275634765625,
0.01421356201171875,
-0.0280914306640625,
0.0175628662109375,
-0.07208251953125,
-0.0482177734375,
-0.041229248046875,
-0.036590576171875,
0.06884765625,
0.0665283203125,
-0.01123046875,
-0.01233673095703125,
-0.01000213623046875,
0.0005035400390625,
-0.047393798828125,
0.042877197265625,
-0.01849365234375,
0.018951416015625,
-0.0355224609375,
-0.021240234375,
0.0233154296875,
-0.00542449951171875,
-0.0027713775634765625,
0.0146636962890625,
-0.0276641845703125,
0.01503753662109375,
0.03631591796875,
-0.0292205810546875,
0.0266876220703125,
0.042266845703125,
0.02056884765625,
0.047088623046875,
0.005695343017578125,
0.03509521484375,
0.0289306640625,
-0.043853759765625,
0.007457733154296875,
0.03485107421875,
0.0701904296875,
-0.00447845458984375,
-0.00714111328125,
0.0653076171875,
-0.0209503173828125,
0.0330810546875,
0.049346923828125,
0.064208984375,
-0.1033935546875,
0.032806396484375,
0.03521728515625,
0.02642822265625,
0.059967041015625,
-0.00965118408203125,
-0.01351165771484375,
-0.03826904296875,
-0.0100250244140625,
0.03125,
-0.037109375,
-0.01314544677734375,
0.03985595703125,
-0.027679443359375,
-0.020233154296875,
-0.0040435791015625,
0.0124664306640625,
0.0115966796875,
0.036346435546875,
-0.0237274169921875,
0.021331787109375,
-0.01396942138671875,
0.0009274482727050781,
-0.0011014938354492188,
-0.034881591796875,
-0.08868408203125,
-0.0282745361328125,
-0.0284271240234375,
-0.0226287841796875,
0.06591796875,
0.009368896484375,
0.03192138671875,
0.039459228515625,
-0.0190887451171875,
0.0160980224609375,
-0.0171966552734375,
-0.016204833984375,
-0.08941650390625,
-0.05157470703125,
0.003963470458984375,
0.01303863525390625,
0.0018510818481445312,
0.052886962890625,
-0.0064239501953125,
-0.0732421875,
0.0013666152954101562,
0.0263824462890625,
0.06683349609375,
-0.0170745849609375,
-0.03607177734375,
0.019927978515625,
0.00916290283203125,
0.00035071372985839844,
0.010650634765625,
0.020782470703125,
-0.0029010772705078125,
0.0031681060791015625,
0.0029964447021484375,
-0.03436279296875,
-0.017578125,
-0.007488250732421875,
-0.107666015625,
0.09185791015625,
-0.0035610198974609375,
0.0726318359375,
-0.006488800048828125,
0.01488494873046875,
-0.01256561279296875,
-0.007526397705078125,
-0.01425933837890625,
0.042083740234375,
0.0302276611328125,
-0.0029697418212890625,
-0.0230560302734375,
-0.01322174072265625,
-0.0079345703125,
0.033233642578125,
0.06494140625,
0.0123443603515625,
-0.0010213851928710938,
-0.006229400634765625,
0.049957275390625,
0.046112060546875,
-0.0077056884765625,
0.00270843505859375,
-0.01824951171875,
0.053009033203125,
0.0225677490234375,
-0.0362548828125,
0.049072265625,
-0.03326416015625,
-0.06146240234375,
-0.0042877197265625,
0.04010009765625,
0.02825927734375,
-0.0187530517578125,
0.018890380859375,
-0.003475189208984375,
-0.01433563232421875,
0.00506591796875,
0.015625,
0.014617919921875,
0.03851318359375,
0.05389404296875,
-0.01549530029296875,
-0.01407623291015625,
-0.024688720703125,
0.056427001953125,
0.0212554931640625,
0.025390625,
0.028961181640625,
0.022186279296875,
0.038970947265625,
-0.032470703125,
0.01502227783203125,
0.0057525634765625,
-0.007904052734375,
0.004734039306640625,
0.00792694091796875,
-0.00841522216796875,
-0.028717041015625,
0.04693603515625,
0.029998779296875,
0.009368896484375,
-0.05059814453125,
-0.052490234375,
0.007259368896484375,
-0.00980377197265625,
0.00919342041015625,
-0.0008435249328613281,
0.03216552734375,
-0.01953125,
0.0022563934326171875,
-0.04278564453125,
0.00814056396484375,
-0.01049041748046875,
0.01445770263671875,
-0.0280609130859375,
-0.022491455078125,
0.0016889572143554688,
0.011444091796875,
-0.052825927734375,
-0.016937255859375,
0.0389404296875,
0.06781005859375,
0.034393310546875,
0.047576904296875,
0.0256195068359375,
-0.0281829833984375,
0.006137847900390625,
0.00968170166015625,
-0.0004801750183105469,
-0.0208892822265625,
-0.002620697021484375,
-0.00914764404296875,
-0.0042266845703125,
0.017730712890625,
0.032012939453125,
0.051513671875,
0.04473876953125,
0.0115509033203125,
0.013946533203125,
0.00823974609375,
0.0156402587890625,
-0.02264404296875,
-0.0211029052734375,
-0.035064697265625,
0.0037517547607421875,
0.00937652587890625,
-0.00792694091796875,
0.006378173828125,
0.0107574462890625,
0.00811004638671875,
0.0318603515625,
-0.0011119842529296875,
0.0265045166015625,
-0.0037403106689453125,
0.05084228515625,
0.01458740234375,
0.01557159423828125,
0.04364013671875,
-0.034698486328125,
-0.026824951171875,
0.00528717041015625,
-0.01416778564453125,
0.0128173828125,
0.025482177734375,
-0.033477783203125,
0.03851318359375,
0.029815673828125,
-0.00687408447265625,
0.0144195556640625,
-0.0247344970703125,
0.0274658203125,
0.0231170654296875,
0.01328277587890625,
0.0311431884765625,
-0.006259918212890625,
-0.022125244140625,
0.01534271240234375,
0.03582763671875,
-0.007289886474609375,
0.061798095703125,
-0.027252197265625,
-0.0009064674377441406,
-0.03765869140625,
0.019561767578125,
-0.035247802734375,
-0.0350341796875,
0.0022792816162109375,
0.01812744140625,
0.00637054443359375,
-0.0021038055419921875,
-0.0166168212890625,
0.01145172119140625,
0.04461669921875,
-0.021759033203125,
0.0029697418212890625,
0.00852203369140625,
0.0193328857421875,
-0.026153564453125,
0.0140228271484375,
-0.0250244140625,
0.01342010498046875,
-0.025177001953125,
-0.032684326171875,
0.05047607421875,
0.002941131591796875,
0.0012063980102539062,
0.0186920166015625,
0.020355224609375,
-0.0135345458984375,
0.02960205078125,
-0.0106658935546875,
0.037750244140625,
0.03472900390625,
-0.01029205322265625,
-0.0241546630859375,
0.03125,
-0.00795745849609375,
0.01629638671875,
0.0216522216796875,
0.0298004150390625,
0.036651611328125,
-0.0992431640625,
-9.5367431640625e-7,
0.004543304443359375,
0.02972412109375,
-0.017059326171875,
-0.0030384063720703125,
0.00963592529296875,
-0.00356292724609375,
-0.034027099609375,
0.050567626953125,
-0.00618743896484375,
-0.029693603515625,
-0.0153656005859375,
0.00414276123046875,
-0.0152435302734375,
-0.0283966064453125,
-0.031494140625,
0.00316619873046875,
0.0006256103515625,
0.00951385498046875,
-0.06500244140625,
0.0343017578125,
0.00861358642578125,
0.032745361328125,
-0.031982421875,
0.0031890869140625,
-0.0226593017578125,
0.044281005859375,
0.00685882568359375,
-0.031585693359375,
-0.050750732421875,
0.056915283203125,
-0.046234130859375,
0.039642333984375,
0.0294342041015625,
-0.038665771484375,
0.0123748779296875,
0.0190582275390625,
0.04498291015625,
0.060211181640625,
0.0205078125,
-0.0268707275390625,
-0.00354766845703125,
0.027618408203125,
-0.00952911376953125,
-0.065185546875,
-0.001964569091796875,
-0.046966552734375,
-0.0186920166015625,
0.0186767578125,
0.0085906982421875,
0.02984619140625,
-0.0111083984375,
-0.05059814453125,
0.044189453125,
-0.007686614990234375,
-0.025543212890625,
-0.03240966796875,
0.01071929931640625,
0.01788330078125,
0.040557861328125,
0.0006628036499023438,
-0.00818634033203125,
-0.047576904296875,
-0.0167694091796875,
0.003734588623046875,
-0.0050048828125,
0.04840087890625,
-0.021820068359375,
-0.001628875732421875,
0.005420684814453125,
0.01904296875,
-0.007114410400390625,
-0.0190582275390625,
0.0013751983642578125,
0.0201416015625,
0.0210723876953125,
-0.0301361083984375,
0.01349639892578125,
0.0171356201171875,
0.0219879150390625,
-0.01059722900390625,
-0.043670654296875,
-0.01395416259765625,
-0.0005168914794921875,
0.05718994140625,
0.03399658203125,
0.01358795166015625,
-0.03338623046875,
-0.01171112060546875,
-0.0548095703125,
-0.027435302734375,
-0.051483154296875,
0.022003173828125,
-0.08599853515625,
-0.025054931640625,
0.01377105712890625,
-0.01512908935546875,
0.01108551025390625,
-0.0208587646484375,
-0.0222015380859375,
0.00910186767578125,
0.0271453857421875,
0.00861358642578125,
-0.031951904296875,
0.0625,
-0.004810333251953125,
-0.00867462158203125,
0.02850341796875,
-0.032867431640625,
-0.0207061767578125,
0.022186279296875,
0.005130767822265625,
-0.0271759033203125,
-0.0108489990234375,
-0.0259552001953125,
0.032989501953125,
-0.024169921875,
0.052032470703125,
-0.057952880859375,
-0.0086822509765625,
-0.040740966796875,
0.00394439697265625,
0.02166748046875,
0.00501251220703125,
-0.0355224609375,
0.0203399658203125,
0.034271240234375,
0.00492095947265625,
-0.0006666183471679688,
-0.00772857666015625,
0.004322052001953125,
0.01104736328125,
0.0218353271484375,
-0.01216888427734375,
0.0545654296875,
-0.018646240234375,
-0.0027179718017578125,
-0.021209716796875,
-0.037017822265625,
-0.05657958984375,
0.0263671875,
0.04638671875,
-0.0235443115234375,
0.044464111328125
]
|
eb73e0709ac9d0b03415c97c751e6ac4eecb8ebc | Wordpress Stackexchange
Q: Working with l10n contexts (_x etc) Basic l10n from a .mo file generated out of PoEdit works fine.
But as soon as I introduce _x, or variants, the link breaks, because as best as I can tell, PoEdit, completely ignores the context, and does not generate the corresponding msgctxt line in the .po/.mo files.
_x, _ex and other variants are all added to the keywords, and PoEdit is finding and parsing _x() occurrences within my source code. It's just not capturing the context and it is not generating the msgctxt line in the resulting .po file.
What's the workaround (other than manually editing the .po or .pot file?)
A: When adding _x to the keywords, try it this way:
_x:1,2c
This tells the parser to watch out for _x and to take the first argument as msgid and the second argument as a comment, which will then be recognized as context by poEdit and inserted as msgctxt.
Oddly enough, my poEdit then shows me the msgid twice in the "new/old" messages window. However, in the messagelist everysthing is correct then.
| Q: Working with l10n contexts (_x etc) Basic l10n from a .mo file generated out of PoEdit works fine.
But as soon as I introduce _x, or variants, the link breaks, because as best as I can tell, PoEdit, completely ignores the context, and does not generate the corresponding msgctxt line in the .po/.mo files.
_x, _ex and other variants are all added to the keywords, and PoEdit is finding and parsing _x() occurrences within my source code. It's just not capturing the context and it is not generating the msgctxt line in the resulting .po file.
What's the workaround (other than manually editing the .po or .pot file?)
A: When adding _x to the keywords, try it this way:
_x:1,2c
This tells the parser to watch out for _x and to take the first argument as msgid and the second argument as a comment, which will then be recognized as context by poEdit and inserted as msgctxt.
Oddly enough, my poEdit then shows me the msgid twice in the "new/old" messages window. However, in the messagelist everysthing is correct then.
A: In your poedit project settings, add _x to the keywords
http://wp.tutsplus.com/tutorials/theme-development/translating-your-theme/
| wordpress | {
"language": "en",
"length": 193,
"provenance": "stackexchange_00019.jsonl.gz:438255",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119019"
} | [
0.026641845703125,
-0.01092529296875,
0.001140594482421875,
-0.01160430908203125,
-0.01495361328125,
-0.00305938720703125,
-0.0080413818359375,
-0.04486083984375,
0.0196533203125,
0.0316162109375,
-0.09417724609375,
0.006877899169921875,
0.01494598388671875,
0.0203094482421875,
-0.01340484619140625,
-0.04412841796875,
-0.0026569366455078125,
0.00896453857421875,
-0.035186767578125,
-0.041717529296875,
0.0003876686096191406,
-0.04400634765625,
-0.01861572265625,
0.0100860595703125,
0.0153656005859375,
-0.03076171875,
0.0848388671875,
-0.04522705078125,
0.0276947021484375,
-0.01007843017578125,
0.0180816650390625,
-0.02008056640625,
0.072021484375,
-0.00196075439453125,
-0.052337646484375,
-0.01497650146484375,
-0.02691650390625,
-0.008026123046875,
-0.042694091796875,
0.005889892578125,
-0.0058746337890625,
0.0198974609375,
0.0330810546875,
0.049652099609375,
-0.01983642578125,
-0.044097900390625,
-0.00463104248046875,
-0.035247802734375,
-0.00847625732421875,
0.01294708251953125,
0.035064697265625,
-0.021636962890625,
0.05230712890625,
-0.030242919921875,
-0.015716552734375,
-0.00033164024353027344,
-0.062164306640625,
-0.003063201904296875,
0.00847625732421875,
0.0494384765625,
0.060760498046875,
-0.00836181640625,
-0.0025615692138671875,
-0.007541656494140625,
0.02777099609375,
-0.0184478759765625,
-0.023162841796875,
0.007083892822265625,
-0.016021728515625,
0.02667236328125,
0.042083740234375,
-0.04022216796875,
0.01239013671875,
-0.04144287109375,
0.006877899169921875,
-0.00433349609375,
0.032135009765625,
-0.03216552734375,
-0.02191162109375,
0.002536773681640625,
0.05694580078125,
0.003917694091796875,
-0.04730224609375,
0.040069580078125,
-0.019317626953125,
0.0394287109375,
0.0057830810546875,
-0.041168212890625,
-0.0014944076538085938,
-0.0352783203125,
-0.0126953125,
-0.0565185546875,
-0.014007568359375,
-0.003215789794921875,
0.006931304931640625,
-0.0782470703125,
0.00897979736328125,
0.0269927978515625,
-0.01213836669921875,
-0.00798797607421875,
0.01265716552734375,
-0.035797119140625,
-0.004955291748046875,
-0.031951904296875,
0.0162811279296875,
0.027923583984375,
-0.02581787109375,
0.02203369140625,
0.05804443359375,
0.0258636474609375,
-0.005741119384765625,
-0.0265960693359375,
0.0207977294921875,
-0.07672119140625,
0.0018177032470703125,
0.06329345703125,
0.045928955078125,
0.00696563720703125,
0.04193115234375,
-0.01213836669921875,
-0.00795745849609375,
0.00936126708984375,
0.057464599609375,
-0.0299072265625,
0.02313232421875,
0.026275634765625,
-0.007354736328125,
-0.07470703125,
0.015899658203125,
0.03656005859375,
-0.027099609375,
0.0162506103515625,
0.0212554931640625,
-0.0194244384765625,
-0.03460693359375,
-0.019683837890625,
0.0380859375,
0.0079193115234375,
-0.038665771484375,
0.01324462890625,
0.0164642333984375,
-0.018035888671875,
-0.0313720703125,
-0.01386260986328125,
-0.0030155181884765625,
0.026702880859375,
0.0163421630859375,
0.0139923095703125,
-0.026885986328125,
-0.012298583984375,
-0.003322601318359375,
-0.03546142578125,
0.058441162109375,
-0.0185394287109375,
-0.077392578125,
-0.065673828125,
-0.01213836669921875,
-0.046661376953125,
0.006343841552734375,
-0.0743408203125,
-0.047607421875,
-0.004352569580078125,
0.02374267578125,
-0.0809326171875,
-0.0635986328125,
0.002086639404296875,
-0.00989532470703125,
-0.009033203125,
0.02801513671875,
0.046661376953125,
0.0086822509765625,
0.02166748046875,
0.035247802734375,
0.037353515625,
0.02191162109375,
0.005229949951171875,
-0.02587890625,
-0.0158233642578125,
0.020111083984375,
0.0242156982421875,
-0.0027599334716796875,
-0.02081298828125,
0.017242431640625,
-0.00420379638671875,
-0.0653076171875,
0.018798828125,
0.01010894775390625,
0.06561279296875,
0.03271484375,
0.0033245086669921875,
0.057373046875,
-0.01013946533203125,
-0.053619384765625,
0.0190277099609375,
-0.0267333984375,
0.035369873046875,
-0.0447998046875,
0.03997802734375,
-0.02215576171875,
-0.00731658935546875,
-0.00928497314453125,
0.0104522705078125,
-0.0166168212890625,
-0.01239013671875,
-0.053619384765625,
0.01412200927734375,
-0.036773681640625,
0.07000732421875,
0.0249176025390625,
0.019287109375,
-0.01235198974609375,
-0.050872802734375,
0.02886962890625,
-0.042938232421875,
-0.0249481201171875,
-0.01397705078125,
0.00726318359375,
0.0288238525390625,
0.0310211181640625,
0.027099609375,
0.031494140625,
0.004573822021484375,
0.0162506103515625,
0.01374053955078125,
-0.01515960693359375,
0.032318115234375,
-0.0261688232421875,
0.04498291015625,
-0.005462646484375,
0.049285888671875,
0.0224151611328125,
-0.0158843994140625,
-0.008544921875,
-0.01471710205078125,
-0.01528167724609375,
-0.00872802734375,
0.005046844482421875,
-0.06353759765625,
0.0214080810546875,
0.048675537109375,
0.025238037109375,
0.028106689453125,
-0.046112060546875,
-0.047637939453125,
0.06866455078125,
-0.01519775390625,
-0.0055694580078125,
-0.007495880126953125,
-0.0010404586791992188,
0.029510498046875,
-0.0156402587890625,
-0.0096282958984375,
0.009979248046875,
-0.04522705078125,
-0.01446533203125,
0.028839111328125,
-0.0046234130859375,
-0.02691650390625,
-0.003276824951171875,
0.022613525390625,
0.005931854248046875,
0.035064697265625,
-0.001552581787109375,
0.017669677734375,
0.04290771484375,
-0.040374755859375,
0.01971435546875,
0.00009971857070922852,
-0.026092529296875,
-0.013275146484375,
0.0308685302734375,
0.0164794921875,
0.01258087158203125,
0.0158233642578125,
-0.051025390625,
0.01038360595703125,
0.0173797607421875,
-0.002735137939453125,
0.0002446174621582031,
-0.01357269287109375,
-0.0106201171875,
0.022125244140625,
0.020721435546875,
-0.01458740234375,
-0.01448822021484375,
0.040283203125,
0.041290283203125,
-0.0010585784912109375,
-0.03350830078125,
-0.02874755859375,
-0.0201263427734375,
0.051361083984375,
-0.01035308837890625,
0.024261474609375,
0.0006837844848632812,
-0.00838470458984375,
0.043060302734375,
-0.03948974609375,
0.0168914794921875,
-0.0330810546875,
0.035736083984375,
0.055419921875,
0.0174560546875,
-0.0364990234375,
-0.0297088623046875,
0.0252685546875,
0.00159454345703125,
-0.0180511474609375,
-0.0192108154296875,
-0.028106689453125,
-0.0113525390625,
-0.022064208984375,
-0.007282257080078125,
0.049560546875,
-0.0709228515625,
-0.0721435546875,
-0.01558685302734375,
0.0029449462890625,
-0.08563232421875,
-0.039581298828125,
0.11529541015625,
0.0011262893676757812,
0.0178375244140625,
-0.0125885009765625,
-0.00406646728515625,
-0.04638671875,
0.00797271728515625,
-0.02996826171875,
-0.01678466796875,
-0.0185089111328125,
-0.042205810546875,
-0.034271240234375,
-0.05596923828125,
0.017425537109375,
0.01018524169921875,
0.0165252685546875,
0.0091094970703125,
-0.022308349609375,
-0.028289794921875,
-0.05279541015625,
-0.01122283935546875,
0.01152801513671875,
0.008575439453125,
-0.0004906654357910156,
-0.0175628662109375,
-0.00881195068359375,
0.03582763671875,
0.002429962158203125,
-0.0015573501586914062,
0.02044677734375,
-0.003734588623046875,
-0.01306915283203125,
0.0130767822265625,
0.006420135498046875,
0.052490234375,
-0.070068359375,
-0.04888916015625,
0.047698974609375,
0.0232086181640625,
-0.020172119140625,
-0.0006518363952636719,
-0.002407073974609375,
-0.0066070556640625,
0.0440673828125,
-0.0193939208984375,
-0.013885498046875,
-0.01490020751953125,
0.06689453125,
-0.040008544921875,
-0.00965118408203125,
0.059844970703125,
-0.0179901123046875,
-0.0180511474609375,
-0.046142578125,
-0.052459716796875,
-0.0284423828125,
0.0205230712890625,
-0.00856781005859375,
-0.0213775634765625,
-0.014556884765625,
0.01480865478515625,
-0.00006824731826782227,
-0.0102996826171875,
-0.0045318603515625,
0.07696533203125,
0.018829345703125,
-0.0120697021484375,
0.017547607421875,
0.01287078857421875,
-0.00791168212890625,
-0.034637451171875,
-0.018798828125,
-0.014434814453125,
-0.051849365234375,
0.0016145706176757812,
0.039031982421875,
-0.019683837890625,
-0.056060791015625,
0.04229736328125,
-0.03680419921875,
-0.0260467529296875,
0.004718780517578125,
-0.003383636474609375,
-0.016754150390625,
-0.0189971923828125,
0.02935791015625,
-0.03851318359375,
-0.0261688232421875,
0.00653076171875,
0.02349853515625,
0.0214996337890625,
-0.0204925537109375,
0.0157470703125,
-0.007228851318359375,
0.017791748046875,
-0.0360107421875,
-0.051513671875,
-0.01519775390625,
-0.006786346435546875,
0.038177490234375,
0.01491546630859375,
-0.033203125,
-0.002532958984375,
0.054534912109375,
0.027435302734375,
0.01995849609375,
0.03472900390625,
-0.007511138916015625,
0.01309967041015625,
0.039642333984375,
0.05340576171875,
-0.0252532958984375,
0.0275115966796875,
0.0399169921875,
-0.08221435546875,
0.039306640625,
0.018096923828125,
0.00004482269287109375,
0.08050537109375,
-0.08343505859375,
-0.0243682861328125,
-0.0230865478515625,
-0.044403076171875,
0.00027823448181152344,
-0.03961181640625,
0.0027561187744140625,
-0.014190673828125,
-0.0280303955078125,
0.0306243896484375,
-0.0016937255859375,
-0.01435089111328125,
-0.0035343170166015625,
-0.016265869140625,
0.0185699462890625,
-0.03460693359375,
0.0091705322265625,
0.006298065185546875,
0.0179901123046875,
0.0004730224609375,
0.046722412109375,
0.0255126953125,
0.0108184814453125,
0.0146331787109375,
-0.00858306884765625,
0.0208892822265625,
0.00980377197265625,
0.02362060546875,
0.039520263671875,
-0.0007343292236328125,
0.0012693405151367188,
0.07598876953125,
-0.0684814453125,
0.00521087646484375,
0.0229644775390625,
-0.0033245086669921875,
0.01081085205078125,
0.00803375244140625,
0.01483917236328125,
-0.0177459716796875,
-0.0095672607421875,
-0.0171356201171875,
0.0158538818359375,
-0.07354736328125,
-0.02105712890625,
0.007389068603515625,
-0.0006947517395019531,
-0.0457763671875,
-0.021942138671875,
0.0029296875,
0.01214599609375,
0.0219573974609375,
-0.0088043212890625,
0.019561767578125,
0.0184478759765625,
-0.01849365234375,
-0.016998291015625,
-0.0101165771484375,
0.007740020751953125,
-0.035736083984375,
-0.073486328125,
0.03900146484375,
-0.028289794921875,
-0.00833892822265625,
0.057281494140625,
0.0289764404296875,
0.0211944580078125,
-0.0029754638671875,
-0.01421356201171875,
0.0013799667358398438,
0.0186309814453125,
-0.0171661376953125,
-0.038421630859375,
-0.0217132568359375,
0.00930023193359375,
-0.0240631103515625,
0.0293426513671875,
-0.00045943260192871094,
-0.042327880859375,
0.016571044921875,
0.0035800933837890625,
-0.03460693359375,
-0.021942138671875,
0.052490234375,
0.0218963623046875,
-0.0511474609375,
0.0135345458984375,
0.023712158203125,
0.04937744140625,
-0.0002713203430175781,
-0.0198974609375,
0.022918701171875,
0.033599853515625,
-0.035736083984375,
-0.01473236083984375,
0.00213623046875,
-0.021759033203125,
-0.007457733154296875,
0.0009946823120117188,
0.04541015625,
0.0221099853515625,
-0.0149993896484375,
-0.0209503173828125,
0.0060882568359375,
0.0298919677734375,
-0.00409698486328125,
-0.01123046875,
0.01367950439453125,
-0.00446319580078125,
-0.0205078125,
-0.047576904296875,
-0.00949859619140625,
0.036285400390625,
-0.028411865234375,
-0.023468017578125,
-0.0361328125,
0.051971435546875,
-0.01788330078125,
0.01751708984375,
-0.0107421875,
0.00904083251953125,
0.0223846435546875,
0.01540374755859375,
-0.0251922607421875,
-0.0171966552734375,
0.00716400146484375,
-0.0137481689453125,
0.04193115234375,
-0.0261993408203125,
0.0012502670288085938,
-0.019561767578125,
0.013641357421875,
-0.0184326171875,
-0.0164031982421875,
-0.061004638671875,
0.0173797607421875,
-0.0126953125,
0.00467681884765625,
0.037689208984375,
0.0016946792602539062,
0.02349853515625,
-0.0125579833984375,
0.022186279296875,
-0.0122833251953125,
0.07757568359375,
0.00641632080078125,
-0.0087432861328125,
-0.0017919540405273438,
0.005054473876953125,
-0.0006351470947265625,
-0.002593994140625,
-0.0111541748046875,
-0.009796142578125,
0.0178985595703125,
-0.046783447265625,
-0.0144805908203125,
-0.026519775390625,
0.01561737060546875,
0.00373077392578125,
0.00939178466796875,
0.00392913818359375,
0.01418304443359375,
0.008819580078125,
0.00980377197265625,
-0.02410888671875,
0.01403045654296875,
-0.0063018798828125,
0.00531005859375,
0.02423095703125,
-0.05523681640625,
-0.00659942626953125,
-0.0045623779296875,
0.040313720703125,
0.0182342529296875,
-0.06585693359375,
0.0238494873046875,
0.0263519287109375,
-0.028289794921875,
-0.00031828880310058594,
0.0012598037719726562,
0.025604248046875,
0.0184173583984375,
-0.0098419189453125,
0.0233612060546875,
-0.0280914306640625,
-0.00489044189453125,
-0.00011211633682250977,
0.0139007568359375,
0.03485107421875,
-0.0173797607421875,
-0.05230712890625,
0.007312774658203125,
-0.04388427734375,
0.0255584716796875,
0.0694580078125,
0.052276611328125,
-0.06463623046875,
-0.0240631103515625,
-0.01111602783203125,
-0.05047607421875,
0.00298309326171875,
0.023406982421875,
0.018402099609375,
0.049285888671875,
-0.0256805419921875,
0.02557373046875,
-0.01409912109375,
0.01438140869140625,
0.0222015380859375,
-0.0276031494140625,
-0.0767822265625,
-0.0273590087890625,
0.0048980712890625,
-0.0098876953125,
0.060760498046875,
-0.00968170166015625,
0.006710052490234375,
-0.002338409423828125,
-0.0086669921875,
-0.0225982666015625,
-0.051605224609375,
-0.0305938720703125,
-0.02203369140625,
-0.0276336669921875,
-0.005924224853515625,
0.0174407958984375,
0.06982421875,
0.012908935546875,
0.065673828125,
-0.0153045654296875,
0.0238037109375,
0.0195159912109375,
0.04486083984375,
0.0518798828125,
-0.040130615234375,
-0.01088714599609375,
0.0169525146484375,
0.01500701904296875,
0.0017452239990234375,
0.0230560302734375,
-0.04071044921875,
-0.00304412841796875,
0.002964019775390625,
0.03936767578125,
-0.058868408203125,
0.00568389892578125,
0.043792724609375,
0.034210205078125,
-0.0183563232421875,
0.02020263671875,
-0.031494140625,
-0.033172607421875,
-0.01006317138671875,
-0.0182647705078125,
-0.056182861328125,
0.0085906982421875,
-0.005096435546875,
-0.06683349609375,
0.04937744140625,
-0.007320404052734375,
0.00897216796875,
-0.0222625732421875,
0.019775390625,
0.0177001953125,
0.006793975830078125,
-0.05157470703125,
0.098876953125,
-0.01093292236328125,
0.07421875,
-0.075439453125,
-0.0202484130859375,
0.041473388671875,
0.0535888671875,
0.031951904296875,
-0.007274627685546875,
-0.0176239013671875,
-0.0155181884765625,
0.0750732421875,
0.00800323486328125,
-0.0024929046630859375,
0.03656005859375,
0.00844573974609375,
-0.009246826171875,
-0.00885772705078125,
0.00438690185546875,
0.036376953125,
-0.048858642578125,
-0.0236968994140625,
0.0177154541015625,
-0.031951904296875,
-0.048919677734375,
0.031982421875,
-0.007198333740234375,
-0.0195159912109375,
0.01024627685546875,
-0.0191497802734375,
-0.033966064453125,
0.048065185546875,
-0.03564453125,
0.0199127197265625,
0.0298309326171875,
-0.007381439208984375,
0.0037899017333984375,
0.03192138671875,
0.0107879638671875,
0.037261962890625,
0.02105712890625,
0.0248870849609375,
0.0921630859375,
-0.10394287109375,
0.00478363037109375,
-0.039398193359375,
-0.0289764404296875,
0.007843017578125,
0.0033321380615234375,
0.027130126953125,
-0.0013751983642578125,
-0.0031185150146484375,
0.0062103271484375,
0.011749267578125,
-0.0094146728515625,
0.00017082691192626953,
0.002849578857421875,
0.00887298583984375,
0.0076904296875,
-0.0115509033203125,
0.0474853515625,
-0.019195556640625,
-0.00690460205078125,
-0.05572509765625,
0.01364898681640625,
-0.02191162109375,
0.0126953125,
-0.032562255859375,
0.002613067626953125,
0.0209808349609375,
0.01751708984375,
-0.0615234375,
0.08587646484375,
0.00279998779296875,
0.01251220703125,
-0.0099945068359375,
0.02349853515625,
-0.00490570068359375,
0.0188751220703125,
-0.006008148193359375,
0.0323486328125,
0.015777587890625,
-0.01044464111328125,
-0.0286102294921875,
-0.0211944580078125,
0.034881591796875,
0.0300750732421875,
0.0305938720703125,
0.052520751953125,
0.0303192138671875,
0.0035610198974609375,
0.00814056396484375,
0.0168609619140625,
0.0175018310546875,
-0.028228759765625,
0.005413055419921875,
0.006103515625,
-0.0171966552734375,
0.026611328125,
-0.02667236328125,
-0.019683837890625,
-0.003528594970703125,
0.050750732421875,
-0.0301361083984375,
0.034423828125,
-0.0021266937255859375,
-0.056884765625,
0.0181884765625,
-0.0281982421875,
0.08416748046875,
-0.0236358642578125,
-0.00628662109375,
0.0011310577392578125,
-0.043792724609375,
0.01171875,
0.0038852691650390625,
0.032562255859375,
0.0173187255859375,
0.016326904296875,
-0.06597900390625,
0.05804443359375,
-0.007293701171875,
-0.05145263671875,
-0.0211944580078125,
0.0274810791015625,
0.055755615234375,
0.01373291015625,
-0.0253448486328125,
-0.01053619384765625,
0.0226593017578125,
0.0094146728515625,
0.0088348388671875,
0.053436279296875,
-0.020416259765625,
0.0128326416015625,
0.0007367134094238281,
-0.040679931640625,
0.0156402587890625,
0.006622314453125,
-0.0302581787109375,
-0.0077972412109375,
0.0108642578125,
-0.0031833648681640625,
-0.0216522216796875,
0.01194000244140625,
0.0413818359375,
-0.04327392578125,
0.0129547119140625,
-0.006908416748046875,
0.00951385498046875,
-0.0287933349609375,
0.04742431640625,
-0.02093505859375,
-0.0152130126953125,
-0.03277587890625,
-0.0357666015625,
0.0287933349609375,
0.0204925537109375,
0.00626373291015625,
0.035614013671875,
0.0775146484375,
0.006366729736328125,
-0.01137542724609375,
0.0204315185546875,
-0.0161285400390625,
0.0297698974609375,
0.08343505859375,
0.04681396484375,
-0.0007581710815429688,
-0.031097412109375,
0.0406494140625,
0.0007357597351074219,
0.00005346536636352539,
0.0216522216796875,
-0.02386474609375,
0.004573822021484375,
0.016693115234375,
0.076904296875,
-0.006694793701171875,
0.03558349609375,
-0.01413726806640625,
0.024658203125,
0.0210418701171875,
-0.0183563232421875,
-0.0009641647338867188,
0.000804901123046875,
-0.032318115234375,
0.0093231201171875,
-0.0148162841796875,
-0.019989013671875,
0.006984710693359375,
-0.03302001953125,
0.0267791748046875,
0.0010461807250976562,
-0.010528564453125,
-0.01410675048828125,
0.00646209716796875,
-0.006618499755859375,
0.01161956787109375,
0.00768280029296875,
-0.0303497314453125,
0.0077667236328125,
0.0022754669189453125,
-0.0584716796875,
-0.06719970703125,
0.07989501953125,
-0.05841064453125,
0.00045800209045410156,
0.01488494873046875,
-0.006290435791015625,
-0.0457763671875,
0.007106781005859375,
-0.00032329559326171875,
0.06292724609375,
-0.00714874267578125,
0.002147674560546875,
0.0029582977294921875,
0.0199432373046875,
-0.042816162109375,
-0.052703857421875,
0.00897216796875,
-0.03045654296875,
-0.0275115966796875,
0.055145263671875,
-0.039215087890625,
-0.007228851318359375,
-0.0318603515625,
-0.05615234375,
0.033203125,
0.0290069580078125,
-0.0455322265625,
-0.0256500244140625,
-0.013671875,
-0.0024700164794921875,
0.022491455078125,
-0.00965118408203125,
-0.004299163818359375,
-0.044952392578125,
-0.0015506744384765625,
-0.037139892578125,
0.0462646484375,
0.0121307373046875,
-0.07220458984375,
0.0133819580078125,
-0.0294952392578125,
-0.00975799560546875,
-0.022979736328125,
-0.035980224609375,
0.0221099853515625,
0.00785064697265625,
0.03564453125,
-0.0110626220703125,
-0.0262603759765625,
0.008544921875,
0.00803375244140625,
0.004116058349609375,
0.003509521484375,
0.00537872314453125,
0.01239776611328125,
-0.0044708251953125,
0.0265655517578125,
-0.0089263916015625,
-0.0304718017578125,
0.06536865234375,
0.0171356201171875,
-0.005359649658203125,
0.0021572113037109375,
-0.0222625732421875,
0.0015087127685546875,
-0.0253448486328125,
-0.0137939453125,
-0.02618408203125,
0.034881591796875,
0.051361083984375,
-0.03216552734375,
0.02313232421875,
0.022430419921875,
-0.05877685546875,
-0.08001708984375,
-0.045684814453125,
0.041748046875,
-0.01293182373046875,
0.0162353515625,
-0.0343017578125,
0.040924072265625,
0.01947021484375,
-0.0126953125,
0.0287628173828125,
0.00455474853515625,
-0.0207672119140625,
-0.007587432861328125,
0.0242919921875,
0.018890380859375,
0.03857421875,
-0.0335693359375,
-0.0114593505859375,
-0.00214385986328125,
-0.0142974853515625,
-0.01314544677734375,
0.0264892578125,
-0.006977081298828125,
0.0066070556640625,
0.0560302734375,
-0.0168914794921875,
-0.015045166015625,
-0.03643798828125,
0.041412353515625,
-0.06744384765625,
0.0094146728515625,
-0.046295166015625,
-0.0037689208984375,
0.0230255126953125,
-0.00559234619140625,
-0.027587890625,
0.00865936279296875,
-0.01419830322265625,
0.05609130859375,
-0.03656005859375,
0.016387939453125
]
|
8154d4feaacd52174ba35d75391f6c867cf65899 | Wordpress Stackexchange
Q: Populate a ACF Select Dropdown from Custom Post Type Is it possible to populate an Advanced Custom Fields (ACF) Select Dropdown - options - with all the posts within a specific Custom Post Type (PCT)?
Thanks in advance, Ian.
A: I think you’re looking for this field: http://www.advancedcustomfields.com/resources/field-types/post-object/
It should allow you to choose any registered custom post type.
| Q: Populate a ACF Select Dropdown from Custom Post Type Is it possible to populate an Advanced Custom Fields (ACF) Select Dropdown - options - with all the posts within a specific Custom Post Type (PCT)?
Thanks in advance, Ian.
A: I think you’re looking for this field: http://www.advancedcustomfields.com/resources/field-types/post-object/
It should allow you to choose any registered custom post type.
| wordpress | {
"language": "en",
"length": 60,
"provenance": "stackexchange_00019.jsonl.gz:438278",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119090"
} | [
0.059478759765625,
0.01406097412109375,
0.030242919921875,
-0.0406494140625,
0.0226593017578125,
-0.01493072509765625,
0.0361328125,
-0.0233612060546875,
-0.0014467239379882812,
0.01299285888671875,
-0.030548095703125,
0.04278564453125,
-0.0265655517578125,
-0.0196380615234375,
0.01265716552734375,
-0.0220489501953125,
0.026641845703125,
0.007366180419921875,
0.02703857421875,
-0.0121612548828125,
0.014801025390625,
0.0013666152954101562,
0.028778076171875,
0.0419921875,
-0.00505828857421875,
0.0030956268310546875,
0.0004832744598388672,
0.0272064208984375,
-0.0250396728515625,
0.0211639404296875,
0.003936767578125,
-0.0081939697265625,
0.0024967193603515625,
0.002094268798828125,
0.033660888671875,
0.0037841796875,
0.06243896484375,
-0.019012451171875,
0.0164642333984375,
0.03173828125,
-0.00017631053924560547,
0.0130462646484375,
-0.01471710205078125,
0.050506591796875,
-0.05157470703125,
-0.0282440185546875,
-0.009246826171875,
-0.00978851318359375,
0.049896240234375,
-0.038238525390625,
-0.0034999847412109375,
0.00803375244140625,
0.01580810546875,
-0.0504150390625,
-0.035919189453125,
-0.032379150390625,
0.0189361572265625,
0.03204345703125,
0.0635986328125,
-0.03680419921875,
-0.07183837890625,
-0.023895263671875,
0.02703857421875,
-0.0295257568359375,
0.01038360595703125,
0.0195770263671875,
-0.01288604736328125,
0.01508331298828125,
-0.01181793212890625,
0.01062774658203125,
0.01303863525390625,
-0.0311737060546875,
0.0175933837890625,
-0.0213623046875,
-0.00876617431640625,
-0.00920867919921875,
0.0129241943359375,
-0.00835418701171875,
0.0195159912109375,
0.004642486572265625,
-0.03485107421875,
0.040985107421875,
-0.02569580078125,
-0.0130767822265625,
-0.0660400390625,
-0.04718017578125,
-0.03143310546875,
0.0142669677734375,
-0.00839996337890625,
-0.02093505859375,
-0.021026611328125,
-0.039825439453125,
-0.0309600830078125,
0.052886962890625,
-0.01361083984375,
0.0059814453125,
0.040191650390625,
-0.004428863525390625,
0.015289306640625,
0.01238250732421875,
0.004428863525390625,
-0.0443115234375,
0.03961181640625,
-0.0194549560546875,
0.002506256103515625,
0.0259552001953125,
0.0028514862060546875,
0.0035247802734375,
0.035247802734375,
0.0171356201171875,
-0.01021575927734375,
-0.0027561187744140625,
0.0024013519287109375,
0.04205322265625,
-0.0416259765625,
-0.036895751953125,
-0.04058837890625,
-0.0013799667358398438,
-0.03167724609375,
0.017669677734375,
0.0009093284606933594,
0.0086517333984375,
0.07110595703125,
-0.0284576416015625,
-0.0246124267578125,
-0.0281982421875,
-0.034423828125,
-0.052734375,
-0.0307464599609375,
0.04217529296875,
-0.032562255859375,
-0.0011835098266601562,
0.07098388671875,
0.04486083984375,
0.0094757080078125,
-0.0250701904296875,
-0.00467681884765625,
-0.0157928466796875,
0.00811004638671875,
-0.00766754150390625,
0.06793212890625,
-0.045806884765625,
-0.033905029296875,
0.0634765625,
-0.006282806396484375,
0.0201568603515625,
0.0220794677734375,
0.009674072265625,
-0.021514892578125,
-0.037322998046875,
-0.012176513671875,
-0.00646209716796875,
0.047454833984375,
-0.0035400390625,
-0.0029468536376953125,
-0.0265960693359375,
0.042449951171875,
-0.036468505859375,
-0.0091400146484375,
-0.043426513671875,
0.03375244140625,
0.00970458984375,
-0.0227813720703125,
-0.003192901611328125,
-0.0126190185546875,
-0.019287109375,
-0.017120361328125,
0.0031890869140625,
0.03082275390625,
-0.03900146484375,
0.0078582763671875,
-0.029998779296875,
0.0384521484375,
0.0176544189453125,
0.00004673004150390625,
0.042816162109375,
0.01512908935546875,
-0.00341796875,
0.0050506591796875,
0.0078582763671875,
0.0008111000061035156,
-0.0276031494140625,
0.01538848876953125,
0.00012433528900146484,
-0.03851318359375,
0.0308074951171875,
-0.00662994384765625,
0.0516357421875,
0.02642822265625,
0.015289306640625,
-0.00589752197265625,
0.0028820037841796875,
-0.0092315673828125,
0.005207061767578125,
-0.00995635986328125,
-0.00850677490234375,
-0.018951416015625,
0.006999969482421875,
-0.0264434814453125,
-0.007476806640625,
-0.049285888671875,
0.0193023681640625,
-0.0260162353515625,
0.044891357421875,
0.035125732421875,
-0.01078033447265625,
0.0229339599609375,
0.0090179443359375,
0.007808685302734375,
0.00396728515625,
0.01326751708984375,
0.019195556640625,
-0.0192413330078125,
-0.04052734375,
-0.03118896484375,
0.044158935546875,
0.0109710693359375,
0.0017490386962890625,
-0.0241546630859375,
-0.0077667236328125,
-0.0271453857421875,
-0.01300811767578125,
-0.0352783203125,
0.058746337890625,
0.035797119140625,
0.01409912109375,
-0.0038909912109375,
0.00708770751953125,
0.06048583984375,
0.027130126953125,
0.0056915283203125,
-0.015960693359375,
-0.01318359375,
-0.00678253173828125,
-0.048736572265625,
-0.02032470703125,
-0.0289306640625,
-0.03143310546875,
0.01322174072265625,
0.0526123046875,
0.019195556640625,
0.006465911865234375,
-0.006076812744140625,
0.0079803466796875,
0.08453369140625,
0.0252838134765625,
0.004913330078125,
-0.0008687973022460938,
-0.028472900390625,
0.01227569580078125,
0.052154541015625,
0.02081298828125,
-0.004367828369140625,
-0.03466796875,
0.021270751953125,
0.0166168212890625,
-0.0210723876953125,
0.011260986328125,
-0.0214080810546875,
-0.00843048095703125,
0.005950927734375,
-0.033111572265625,
-0.023681640625,
-0.0175933837890625,
0.0887451171875,
-0.0272979736328125,
0.045074462890625,
0.021728515625,
-0.035919189453125,
-0.007381439208984375,
0.01207733154296875,
0.01242828369140625,
-0.0009126663208007812,
0.020782470703125,
-0.006591796875,
-0.005672454833984375,
-0.02606201171875,
0.0027008056640625,
0.00775909423828125,
0.004886627197265625,
-0.00679779052734375,
0.0196075439453125,
-0.03668212890625,
-0.01245880126953125,
0.0140380859375,
-0.021026611328125,
-0.0020008087158203125,
0.00971221923828125,
-0.0224151611328125,
-0.0056915283203125,
0.020660400390625,
0.00508880615234375,
-0.0008997917175292969,
-0.00904083251953125,
0.0281219482421875,
-0.008880615234375,
0.018341064453125,
-0.0784912109375,
0.053619384765625,
-0.0289306640625,
0.026214599609375,
0.0828857421875,
0.024993896484375,
-0.005710601806640625,
-0.0213623046875,
-0.021392822265625,
-0.01617431640625,
0.043548583984375,
-0.0016527175903320312,
-0.09552001953125,
0.0192413330078125,
-0.007293701171875,
0.0282440185546875,
0.0888671875,
-0.0126953125,
-0.045196533203125,
0.0271148681640625,
0.05084228515625,
-0.0256195068359375,
-0.050994873046875,
0.040374755859375,
-0.0391845703125,
0.0097198486328125,
-0.031982421875,
-0.0094146728515625,
-0.0157928466796875,
-0.01934814453125,
0.007732391357421875,
-0.0382080078125,
-0.0174102783203125,
-0.01380157470703125,
-0.061431884765625,
-0.051483154296875,
-0.036376953125,
-0.0012617111206054688,
0.0018796920776367188,
-0.00849151611328125,
0.07977294921875,
0.0007543563842773438,
-0.058380126953125,
-0.0222320556640625,
-0.0204925537109375,
-0.009246826171875,
-0.002674102783203125,
0.04205322265625,
-0.06561279296875,
0.05194091796875,
-0.004467010498046875,
0.0285186767578125,
0.04620361328125,
-0.02935791015625,
-0.006458282470703125,
-0.028350830078125,
0.01885986328125,
0.0030269622802734375,
0.01311492919921875,
0.0163726806640625,
0.017852783203125,
0.015869140625,
-0.03717041015625,
0.0240020751953125,
0.0094146728515625,
-0.0025348663330078125,
-0.0038852691650390625,
-0.04180908203125,
-0.0015306472778320312,
0.0013551712036132812,
0.0302734375,
-0.0182342529296875,
-0.0200042724609375,
0.01367950439453125,
-0.03411865234375,
-0.0099639892578125,
-0.0038318634033203125,
0.0182037353515625,
0.01155853271484375,
0.015350341796875,
-0.038848876953125,
0.0560302734375,
0.01522064208984375,
0.0010881423950195312,
0.018157958984375,
-0.0085601806640625,
-0.0015439987182617188,
-0.11676025390625,
0.057830810546875,
-0.067626953125,
-0.06439208984375,
-0.02532958984375,
-0.021331787109375,
0.041656494140625,
0.1334228515625,
-0.037506103515625,
0.00910186767578125,
-0.0269012451171875,
-0.002716064453125,
0.0247650146484375,
-0.0208587646484375,
-0.03704833984375,
-0.021728515625,
-0.0751953125,
-0.0118255615234375,
-0.00844573974609375,
-0.034332275390625,
-0.0277099609375,
0.0504150390625,
-0.063232421875,
-0.01678466796875,
0.03778076171875,
-0.03167724609375,
0.033782958984375,
-0.0183258056640625,
0.03631591796875,
-0.04180908203125,
-0.01105499267578125,
-0.0208587646484375,
-0.09027099609375,
-0.0188140869140625,
-0.00675201416015625,
0.046630859375,
0.0028553009033203125,
-0.006954193115234375,
-0.01432037353515625,
0.02777099609375,
0.0163421630859375,
0.0226898193359375,
0.0101165771484375,
-0.0126953125,
0.00708770751953125,
-0.0143280029296875,
0.01148223876953125,
-0.030792236328125,
-0.0022907257080078125,
-0.0294647216796875,
-0.01360321044921875,
-0.0181732177734375,
-0.0263824462890625,
-0.011016845703125,
-0.0182647705078125,
-0.0162506103515625,
-0.03131103515625,
-0.002315521240234375,
-0.057342529296875,
-0.007328033447265625,
-0.01605224609375,
-0.0270538330078125,
-0.0054168701171875,
-0.06170654296875,
0.02789306640625,
0.0121612548828125,
-0.003520965576171875,
0.016998291015625,
0.02996826171875,
0.003326416015625,
-0.0247955322265625,
-0.0689697265625,
-0.0460205078125,
0.0159759521484375,
0.019500732421875,
0.042083740234375,
0.017059326171875,
0.0067901611328125,
0.0367431640625,
0.005710601806640625,
0.0250091552734375,
-0.05914306640625,
0.049896240234375,
0.0157470703125,
0.0150909423828125,
0.0119781494140625,
0.021240234375,
0.02252197265625,
0.037567138671875,
0.006984710693359375,
-0.03265380859375,
0.007266998291015625,
0.048828125,
-0.01300048828125,
-0.0025196075439453125,
-0.035369873046875,
-0.056121826171875,
0.0309295654296875,
-0.007720947265625,
0.01552581787109375,
0.005218505859375,
-0.006107330322265625,
0.03778076171875,
-0.0022735595703125,
0.0161895751953125,
0.0029315948486328125,
0.0254364013671875,
-0.0111083984375,
0.020416259765625,
0.052978515625,
0.009521484375,
-0.017669677734375,
-0.0099334716796875,
0.0258636474609375,
-0.039031982421875,
-0.08746337890625,
0.015716552734375,
-0.0240936279296875,
0.0137176513671875,
0.060943603515625,
0.017669677734375,
0.033203125,
0.058837890625,
0.02618408203125,
0.0015583038330078125,
0.01381683349609375,
0.05072021484375,
-0.00798797607421875,
0.04962158203125,
0.020965576171875,
0.01142120361328125,
0.0018644332885742188,
0.0877685546875,
0.030914306640625,
0.030914306640625,
-0.0291748046875,
0.04071044921875,
0.055450439453125,
0.00698089599609375,
0.0262908935546875,
-0.00801849365234375,
-0.0009174346923828125,
-0.0248870849609375,
-0.0027637481689453125,
-0.0228271484375,
-0.034942626953125,
-0.0170135498046875,
0.0227813720703125,
-0.0190582275390625,
0.007694244384765625,
0.048553466796875,
0.00872802734375,
-0.018585205078125,
0.0140533447265625,
-0.010284423828125,
-0.051055908203125,
-0.00518798828125,
-0.01041412353515625,
-0.0152587890625,
-0.00909423828125,
-0.0116729736328125,
0.0171661376953125,
-0.006359100341796875,
0.02734375,
-0.032867431640625,
-0.007175445556640625,
0.006404876708984375,
0.01617431640625,
-0.026702880859375,
-0.019317626953125,
-0.01189422607421875,
0.00792694091796875,
-0.0384521484375,
0.0177154541015625,
-0.00745391845703125,
0.01157379150390625,
-0.0286102294921875,
-0.0095672607421875,
-0.01763916015625,
0.020660400390625,
-0.03692626953125,
-0.003093719482421875,
0.059967041015625,
0.03076171875,
0.038818359375,
-0.0079193115234375,
-0.013458251953125,
-0.04119873046875,
-0.0260009765625,
-0.03607177734375,
-0.03155517578125,
-0.0281524658203125,
0.0419921875,
0.03057861328125,
0.004150390625,
-0.06524658203125,
0.03143310546875,
-0.0311126708984375,
-0.0027942657470703125,
-0.00859832763671875,
0.01068115234375,
0.050018310546875,
0.004222869873046875,
0.04620361328125,
0.019561767578125,
0.02252197265625,
-0.032257080078125,
-0.005832672119140625,
-0.037200927734375,
-0.0704345703125,
0.007354736328125,
0.0311279296875,
0.01413726806640625,
0.050079345703125,
0.01232147216796875,
0.0178375244140625,
0.0147857666015625,
-0.030914306640625,
0.007183074951171875,
-0.0198822021484375,
0.03460693359375,
-0.049072265625,
-0.0238800048828125,
0.031280517578125,
-0.0173187255859375,
0.00196075439453125,
0.0109710693359375,
-0.0189666748046875,
0.002361297607421875,
-0.00492095947265625,
0.01186370849609375,
0.01375579833984375,
-0.038818359375,
0.041168212890625,
0.021240234375,
-0.01401519775390625,
-0.001644134521484375,
-0.005016326904296875,
-0.015899658203125,
-0.040740966796875,
0.024444580078125,
-0.0743408203125,
-0.053131103515625,
0.01953125,
0.01947021484375,
-0.065185546875,
0.02215576171875,
-0.0263671875,
0.0002663135528564453,
0.058807373046875,
0.04913330078125,
-0.08526611328125,
0.01120758056640625,
0.008758544921875,
-0.00701904296875,
0.0164794921875,
-0.0011796951293945312,
-0.0029621124267578125,
0.0229339599609375,
-0.0258026123046875,
0.039276123046875,
-0.031890869140625,
-0.003173828125,
0.03582763671875,
-0.00626373291015625,
0.001087188720703125,
0.0009975433349609375,
-0.00852203369140625,
0.01355743408203125,
-0.0117950439453125,
-0.036468505859375,
0.0016889572143554688,
-0.042999267578125,
0.0296173095703125,
-0.01490020751953125,
-0.004924774169921875,
-0.0447998046875,
0.0168609619140625,
-0.0022411346435546875,
0.013336181640625,
-0.0134429931640625,
0.0222625732421875,
0.055511474609375,
0.057952880859375,
-0.0078277587890625,
0.005245208740234375,
0.0202789306640625,
0.046173095703125,
-0.041229248046875,
-0.03759765625,
-0.0048980712890625,
0.00331878662109375,
0.0068206787109375,
0.0260009765625,
-0.004791259765625,
-0.0538330078125,
-0.0145111083984375,
0.04290771484375,
0.072509765625,
-0.003993988037109375,
-0.042083740234375,
0.031982421875,
0.0147247314453125,
-0.00040531158447265625,
0.0092010498046875,
-0.004573822021484375,
-0.0278472900390625,
-0.01149749755859375,
-0.006092071533203125,
-0.0308990478515625,
0.0031070709228515625,
0.002399444580078125,
-0.026123046875,
0.08575439453125,
0.01131439208984375,
-0.0179290771484375,
0.025848388671875,
0.0545654296875,
-0.04345703125,
0.0305023193359375,
-0.01094818115234375,
0.0640869140625,
0.04144287109375,
0.0008454322814941406,
-0.05267333984375,
-0.04132080078125,
-0.01468658447265625,
0.0704345703125,
-0.0245208740234375,
-0.00753021240234375,
-0.02325439453125,
-0.0015869140625,
0.041351318359375,
0.06329345703125,
0.043365478515625,
-0.00588226318359375,
0.01468658447265625,
0.058929443359375,
0.03729248046875,
-0.062408447265625,
0.0067596435546875,
0.00429534912109375,
-0.0004074573516845703,
0.045501708984375,
0.014556884765625,
0.049072265625,
-0.00988006591796875,
-0.01641845703125,
-0.003704071044921875,
-0.01364898681640625,
0.01107025146484375,
0.018310546875,
0.017669677734375,
0.05255126953125,
0.08404541015625,
-0.005138397216796875,
0.01824951171875,
-0.027313232421875,
0.07330322265625,
0.02593994140625,
0.0251312255859375,
0.040283203125,
0.027862548828125,
0.0304718017578125,
-0.05084228515625,
0.0082855224609375,
-0.026611328125,
-0.0099945068359375,
-0.0153656005859375,
-0.032928466796875,
0.0155792236328125,
-0.0372314453125,
0.002712249755859375,
0.01538848876953125,
-0.017242431640625,
-0.015655517578125,
-0.042205810546875,
0.020416259765625,
0.032257080078125,
0.017852783203125,
0.025909423828125,
0.04437255859375,
-0.01171112060546875,
0.034576416015625,
-0.048492431640625,
0.00017964839935302734,
0.0251312255859375,
0.031982421875,
-0.01123046875,
-0.0189056396484375,
-0.0408935546875,
-0.01045989990234375,
-0.00434112548828125,
-0.018707275390625,
0.010528564453125,
0.057525634765625,
0.0162811279296875,
0.040740966796875,
-0.059906005859375,
-0.025726318359375,
-0.01004791259765625,
-0.0025081634521484375,
0.0278472900390625,
-0.0001571178436279297,
0.01361846923828125,
0.014404296875,
-0.0003199577331542969,
0.00989532470703125,
0.01502227783203125,
0.0693359375,
0.039337158203125,
0.040924072265625,
0.02960205078125,
0.01464080810546875,
0.050445556640625,
-0.01361846923828125,
-0.004306793212890625,
-0.053131103515625,
0.0189666748046875,
0.0261077880859375,
0.006317138671875,
0.0408935546875,
-0.04229736328125,
0.057098388671875,
-0.0029087066650390625,
0.007160186767578125,
0.007404327392578125,
-0.0201416015625,
0.0008759498596191406,
-0.0224151611328125,
-0.0034847259521484375,
0.005420684814453125,
-0.057861328125,
-0.004138946533203125,
-0.068115234375,
-0.06988525390625,
0.052520751953125,
0.056365966796875,
0.00565338134765625,
-0.0191497802734375,
0.005523681640625,
-0.030364990234375,
0.0002090930938720703,
0.04241943359375,
0.00038933753967285156,
0.0204010009765625,
0.02716064453125,
0.01195526123046875,
-0.090087890625,
-0.041412353515625,
-0.00021338462829589844,
0.01702880859375,
-0.0028171539306640625,
0.00890350341796875,
0.034576416015625,
0.0096893310546875,
-0.006504058837890625,
-0.002529144287109375,
0.0009860992431640625,
-0.0012044906616210938,
0.03314208984375,
0.0240020751953125,
-0.01385498046875,
-0.0255279541015625,
0.046051025390625,
0.02374267578125,
0.0300750732421875,
-0.0523681640625,
-0.012908935546875,
-0.0160369873046875,
0.0167083740234375,
-0.0036144256591796875,
0.0216522216796875,
-0.0170440673828125,
0.0016193389892578125,
-0.022918701171875,
-0.034759521484375,
0.031707763671875,
0.017791748046875,
0.003406524658203125,
0.0237274169921875,
0.01849365234375,
0.01378631591796875,
0.01152801513671875,
-0.00980377197265625,
0.03363037109375,
0.03466796875,
-0.024627685546875,
0.03631591796875,
0.0592041015625,
-0.00678253173828125,
0.0657958984375,
0.009246826171875,
0.0262298583984375,
0.055328369140625,
-0.031005859375,
-0.00769805908203125,
0.008209228515625,
0.049835205078125,
0.01024627685546875,
0.011016845703125,
-0.036468505859375,
-0.0008635520935058594,
-0.0084075927734375,
-0.00943756103515625,
-0.019744873046875,
-0.0228118896484375,
-0.01336669921875,
-0.0041961669921875,
-0.005916595458984375,
-0.0260162353515625,
0.0028400421142578125,
-0.007724761962890625,
0.0281982421875,
-0.0008091926574707031,
-0.030364990234375,
0.0271148681640625,
-0.027679443359375,
0.0031833648681640625,
-0.01364898681640625,
-0.039031982421875,
0.0213165283203125,
0.0479736328125,
-0.00325775146484375,
-0.00244903564453125,
0.0157623291015625,
0.00025844573974609375,
0.0203857421875,
0.026824951171875,
0.04327392578125,
-0.0328369140625,
-0.0675048828125,
0.0286102294921875,
0.034210205078125,
0.05377197265625,
0.0264129638671875,
0.006389617919921875,
0.0300750732421875,
0.01361083984375,
-0.05206298828125,
-0.0760498046875,
0.024871826171875,
-0.053070068359375,
-0.0168914794921875,
-0.07135009765625,
0.0236663818359375,
0.0272674560546875,
-0.0230712890625,
-0.031341552734375,
0.0606689453125,
-0.033416748046875,
-0.00650787353515625,
-0.0667724609375,
0.0209808349609375,
0.01190185546875,
0.039459228515625,
-0.0031032562255859375,
-0.039215087890625,
-0.03826904296875,
0.00888824462890625,
0.0161590576171875,
0.044342041015625,
0.00010293722152709961,
0.01137542724609375,
-0.057037353515625,
0.015411376953125,
-0.0022678375244140625,
0.039031982421875,
0.050537109375,
-0.032684326171875,
0.0194549560546875,
0.0333251953125,
-0.0631103515625,
-0.0723876953125,
-0.045806884765625,
-0.015716552734375,
0.0333251953125,
-0.0633544921875,
-0.0457763671875,
-0.04229736328125,
0.016754150390625,
-0.005329132080078125,
0.0266876220703125,
-0.019287109375,
-0.033111572265625,
-0.0350341796875,
-0.0194091796875,
-0.017974853515625,
-0.00969696044921875,
-0.01212310791015625,
0.036895751953125,
-0.04473876953125,
-0.0166168212890625,
-0.0085601806640625,
0.012176513671875,
-0.0185089111328125,
-0.004726409912109375,
0.0254058837890625,
-0.0211639404296875,
-0.0345458984375,
0.07275390625,
-0.01007080078125,
-0.0173187255859375,
-0.03948974609375,
0.017852783203125,
-0.03173828125,
-0.0233917236328125,
0.0267791748046875,
-0.0238037109375,
-0.0531005859375,
0.0227508544921875,
0.028900146484375,
-0.01261138916015625,
0.061370849609375,
-0.0095977783203125,
-0.01128387451171875,
-0.005039215087890625,
0.0079345703125,
-0.00301361083984375,
0.01140594482421875,
-0.01493072509765625,
0.055511474609375,
0.0239715576171875,
0.000008285045623779297,
0.031646728515625,
0.0086517333984375,
-0.0027904510498046875,
0.03271484375,
0.006900787353515625,
-0.0386962890625,
-0.0083770751953125,
-0.035980224609375,
0.0007228851318359375,
-0.011474609375,
-0.041778564453125,
-0.0086822509765625,
0.0081024169921875,
0.100830078125,
-0.03851318359375,
0.01209259033203125
]
|
78bf64281b61673d899f1d082e1d90b0cebc77a7 | Wordpress Stackexchange
Q: Which hooks is this? add_action('wp', I have seen it here: wp_schedule_event
Code snippet:
add_action( 'wp', 'prefix_setup_schedule' );
I couldn't find this hook anywhere in documentation, how does it work?
A: The hook is described on this page in Action reference section.
| Q: Which hooks is this? add_action('wp', I have seen it here: wp_schedule_event
Code snippet:
add_action( 'wp', 'prefix_setup_schedule' );
I couldn't find this hook anywhere in documentation, how does it work?
A: The hook is described on this page in Action reference section.
| wordpress | {
"language": "en",
"length": 42,
"provenance": "stackexchange_00019.jsonl.gz:438290",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119130"
} | [
0.03314208984375,
-0.013427734375,
-0.034149169921875,
-0.03424072265625,
0.00516510009765625,
-0.061798095703125,
0.0211181640625,
-0.0012369155883789062,
-0.024810791015625,
0.02978515625,
0.004642486572265625,
0.0035572052001953125,
-0.0206756591796875,
-0.0283203125,
-0.00853729248046875,
-0.025390625,
0.046661376953125,
-0.0406494140625,
-0.00542449951171875,
-0.017333984375,
-0.01207733154296875,
0.019927978515625,
-0.003459930419921875,
0.100341796875,
0.034423828125,
-0.02777099609375,
0.044677734375,
-0.0302276611328125,
0.039154052734375,
0.01537322998046875,
0.0118408203125,
-0.038330078125,
0.024627685546875,
0.0193634033203125,
-0.0219573974609375,
0.03607177734375,
0.007717132568359375,
0.015533447265625,
0.005828857421875,
0.034393310546875,
0.006763458251953125,
-0.0040435791015625,
0.0145111083984375,
-0.0105133056640625,
-0.0102996826171875,
-0.034942626953125,
0.037139892578125,
-0.01273345947265625,
-0.0025424957275390625,
-0.0345458984375,
0.0150604248046875,
0.001796722412109375,
0.040374755859375,
-0.01287841796875,
-0.0178985595703125,
0.0179901123046875,
-0.02337646484375,
0.052886962890625,
0.009063720703125,
0.0112152099609375,
-0.0007381439208984375,
0.047210693359375,
-0.005950927734375,
-0.007419586181640625,
0.0224456787109375,
0.003452301025390625,
-0.007778167724609375,
0.0115966796875,
0.02197265625,
0.00714874267578125,
-0.002162933349609375,
-0.014862060546875,
-0.04864501953125,
0.0235595703125,
-0.00576019287109375,
-0.030059814453125,
0.00684356689453125,
-0.06683349609375,
0.00652313232421875,
0.07012939453125,
0.0197601318359375,
-0.0199432373046875,
0.028228759765625,
-0.03570556640625,
0.01334381103515625,
-0.039093017578125,
-0.00037360191345214844,
0.0090789794921875,
-0.03167724609375,
-0.01397705078125,
-0.025604248046875,
0.0015201568603515625,
-0.0264434814453125,
-0.0323486328125,
-0.02984619140625,
-0.028472900390625,
0.01947021484375,
0.067626953125,
-0.034393310546875,
0.00408172607421875,
-0.0112457275390625,
-0.00555419921875,
0.005809783935546875,
-0.0302276611328125,
-0.01328277587890625,
0.0262298583984375,
0.03240966796875,
0.0298004150390625,
-0.005565643310546875,
0.01470184326171875,
-0.0311279296875,
-0.0250701904296875,
0.0223846435546875,
0.0209503173828125,
-0.0178375244140625,
-0.0570068359375,
-0.057220458984375,
0.04925537109375,
-0.005634307861328125,
0.00562286376953125,
0.0037975311279296875,
0.02044677734375,
-0.0078277587890625,
-0.01052093505859375,
-0.0092010498046875,
-0.00809478759765625,
-0.00849151611328125,
-0.032470703125,
-0.0006256103515625,
-0.005977630615234375,
-0.0162200927734375,
0.033111572265625,
0.0277252197265625,
-0.00588226318359375,
-0.0301971435546875,
-0.0022106170654296875,
0.04376220703125,
-0.02392578125,
-0.0200347900390625,
0.04986572265625,
-0.035369873046875,
-0.026885986328125,
-0.0126190185546875,
-0.0234832763671875,
0.056854248046875,
-0.031158447265625,
-0.00921630859375,
0.037353515625,
0.05902099609375,
0.041778564453125,
0.0234527587890625,
0.0030422210693359375,
-0.015655517578125,
0.04351806640625,
-0.005428314208984375,
0.06536865234375,
-0.0015544891357421875,
0.0125274658203125,
-0.01654052734375,
0.01366424560546875,
-0.0194549560546875,
-0.028411865234375,
0.023101806640625,
-0.01287841796875,
-0.036651611328125,
0.03839111328125,
-0.0295867919921875,
-0.00914764404296875,
0.021209716796875,
0.0182342529296875,
0.03350830078125,
0.0248260498046875,
0.0243072509765625,
0.0301971435546875,
-0.006916046142578125,
0.0079803466796875,
-0.019287109375,
0.01446533203125,
0.025634765625,
0.02001953125,
-0.0032558441162109375,
-0.028411865234375,
0.053436279296875,
-0.010711669921875,
-0.03607177734375,
0.0106658935546875,
0.0269927978515625,
0.034942626953125,
-0.0018968582153320312,
0.0228424072265625,
0.03411865234375,
0.04150390625,
-0.0301513671875,
-0.0198211669921875,
-0.0142059326171875,
0.0200347900390625,
-0.017059326171875,
0.01435089111328125,
-0.01398468017578125,
0.00492095947265625,
0.0002167224884033203,
0.0091400146484375,
0.022857666015625,
-0.00677490234375,
-0.04248046875,
0.047119140625,
-0.0330810546875,
0.051605224609375,
0.039886474609375,
-0.01629638671875,
-0.015838623046875,
0.0022125244140625,
0.0170135498046875,
-0.0947265625,
-0.07318115234375,
0.053375244140625,
-0.057708740234375,
0.04620361328125,
0.003917694091796875,
0.05828857421875,
-0.0010881423950195312,
-0.037017822265625,
0.01209259033203125,
-0.036407470703125,
0.037261962890625,
-0.03662109375,
-0.009918212890625,
-0.0310516357421875,
-0.003932952880859375,
-0.00975799560546875,
-0.035186767578125,
0.0330810546875,
-0.0031871795654296875,
0.0255584716796875,
-0.0205230712890625,
0.01214599609375,
0.01508331298828125,
-0.01197052001953125,
-0.0002932548522949219,
0.014801025390625,
0.0239105224609375,
0.066162109375,
0.0037441253662109375,
0.023162841796875,
0.070556640625,
-0.021240234375,
0.018463134765625,
-0.0007572174072265625,
-0.005695343017578125,
0.04669189453125,
-0.0006098747253417969,
0.03515625,
0.0027713775634765625,
-0.02410888671875,
-0.0035037994384765625,
0.038238525390625,
-0.0166473388671875,
-0.0247344970703125,
0.0029201507568359375,
0.001262664794921875,
0.0285186767578125,
-0.046630859375,
-0.05096435546875,
-0.00635528564453125,
0.02325439453125,
-0.00919342041015625,
0.03033447265625,
0.016387939453125,
0.00891876220703125,
-0.0168609619140625,
0.0122833251953125,
-0.0119476318359375,
-0.014984130859375,
0.00789642333984375,
-0.0121917724609375,
0.0293426513671875,
-0.01523590087890625,
0.01241302490234375,
-0.018096923828125,
0.0001367330551147461,
-0.03082275390625,
0.039093017578125,
-0.017547607421875,
-0.0299530029296875,
-0.02001953125,
-0.03961181640625,
-0.01055145263671875,
-0.056365966796875,
-0.01007080078125,
-0.056427001953125,
-0.011505126953125,
0.04315185546875,
-0.038116455078125,
0.04351806640625,
-0.019195556640625,
-0.0229339599609375,
-0.043060302734375,
0.0007677078247070312,
0.0194549560546875,
-0.0552978515625,
-0.031707763671875,
0.0210113525390625,
-0.01922607421875,
-0.037139892578125,
0.016815185546875,
-0.0357666015625,
0.019073486328125,
-0.002010345458984375,
-0.005054473876953125,
0.0240020751953125,
-0.06683349609375,
0.0330810546875,
0.033233642578125,
0.07061767578125,
-0.027923583984375,
-0.04718017578125,
-0.010101318359375,
0.019256591796875,
-0.03302001953125,
-0.054656982421875,
-0.028564453125,
-0.05291748046875,
0.00786590576171875,
-0.031097412109375,
-0.0274505615234375,
0.007781982421875,
-0.0020046234130859375,
0.007526397705078125,
-0.0799560546875,
0.030029296875,
0.0228424072265625,
-0.0309295654296875,
0.00841522216796875,
-0.00021648406982421875,
0.00019180774688720703,
0.01458740234375,
0.00247955322265625,
0.074462890625,
0.0114593505859375,
-0.057098388671875,
0.005359649658203125,
-0.00817108154296875,
-0.02880859375,
0.009429931640625,
-0.02685546875,
-0.01983642578125,
0.03497314453125,
-0.007904052734375,
0.03546142578125,
0.01403045654296875,
-0.0137176513671875,
-0.00821685791015625,
-0.004901885986328125,
-0.048583984375,
-0.01248931884765625,
0.11785888671875,
0.0305023193359375,
-0.059234619140625,
0.04632568359375,
-0.07720947265625,
0.062103271484375,
0.0160064697265625,
0.0218505859375,
-0.0203399658203125,
-0.02252197265625,
-0.049072265625,
0.025543212890625,
-0.03826904296875,
-0.00511932373046875,
0.0140838623046875,
0.02386474609375,
-0.01224517822265625,
0.03253173828125,
-0.026824951171875,
-0.032928466796875,
-0.0259857177734375,
0.001873016357421875,
-0.01332855224609375,
0.0303192138671875,
-0.00225830078125,
0.02264404296875,
-0.013092041015625,
0.0211181640625,
-0.04986572265625,
-0.03466796875,
0.031829833984375,
-0.0128326416015625,
0.006465911865234375,
-0.0267486572265625,
-0.015899658203125,
-0.0004100799560546875,
0.045623779296875,
-0.0595703125,
-0.03759765625,
0.01093292236328125,
0.030517578125,
-0.07366943359375,
-0.0372314453125,
0.007038116455078125,
-0.0093841552734375,
-0.0618896484375,
-0.00592041015625,
0.004596710205078125,
-0.0271148681640625,
-0.0212554931640625,
0.00904083251953125,
-0.06103515625,
-0.0201568603515625,
0.0234527587890625,
-0.0016002655029296875,
0.006481170654296875,
0.032958984375,
-0.0133819580078125,
0.0168914794921875,
-0.017059326171875,
-0.018951416015625,
-0.0653076171875,
-0.0119171142578125,
-0.050140380859375,
0.08673095703125,
0.059814453125,
-0.053131103515625,
-0.01158905029296875,
0.025177001953125,
0.06298828125,
0.01065826416015625,
0.0289459228515625,
-0.0443115234375,
0.033966064453125,
-0.01163482666015625,
0.015899658203125,
-0.0170440673828125,
0.0171051025390625,
0.01947021484375,
-0.042449951171875,
0.040557861328125,
-0.01885986328125,
0.0294189453125,
0.01323699951171875,
-0.0391845703125,
-0.01222991943359375,
0.0024242401123046875,
0.0307159423828125,
0.04150390625,
0.0007715225219726562,
0.02423095703125,
-0.0152740478515625,
-0.01406097412109375,
0.02227783203125,
-0.049530029296875,
-0.0078277587890625,
0.0018520355224609375,
0.07373046875,
0.03240966796875,
-0.005672454833984375,
0.0128631591796875,
0.0272674560546875,
0.02490234375,
0.0198974609375,
0.017730712890625,
-0.0081024169921875,
-0.00864410400390625,
0.01059722900390625,
-0.0069122314453125,
0.02001953125,
-0.0333251953125,
0.0221710205078125,
0.01654052734375,
0.01934814453125,
-0.007556915283203125,
0.004566192626953125,
0.035003662109375,
0.008209228515625,
-0.0142059326171875,
-0.0164794921875,
0.0572509765625,
0.03729248046875,
-0.052215576171875,
0.039093017578125,
-0.0167999267578125,
0.04742431640625,
-0.032135009765625,
0.0550537109375,
0.0282135009765625,
0.04364013671875,
0.001667022705078125,
-0.066162109375,
-0.0050048828125,
0.0189666748046875,
-0.001171112060546875,
-0.04815673828125,
-0.00199127197265625,
0.03125,
0.0127410888671875,
0.0280609130859375,
0.0118408203125,
-0.0099639892578125,
0.0433349609375,
-0.005977630615234375,
-0.0277099609375,
-0.0316162109375,
0.01169586181640625,
0.047149658203125,
0.037322998046875,
-0.03900146484375,
0.040191650390625,
0.063232421875,
-0.01064300537109375,
-0.0125732421875,
-0.00716400146484375,
0.005725860595703125,
-0.039764404296875,
-0.0160064697265625,
-0.010528564453125,
-0.0177001953125,
0.03631591796875,
-0.0177764892578125,
0.00024890899658203125,
-0.005084991455078125,
-0.0160980224609375,
0.049163818359375,
0.06451416015625,
0.0005459785461425781,
0.0011005401611328125,
0.0120391845703125,
-0.01137542724609375,
0.00222015380859375,
0.01399993896484375,
-0.022735595703125,
-0.0204010009765625,
0.027801513671875,
0.03070068359375,
-0.01043701171875,
0.00263214111328125,
0.005199432373046875,
0.00739288330078125,
-0.029998779296875,
0.0169677734375,
0.008544921875,
-0.019256591796875,
-0.031402587890625,
0.007320404052734375,
0.034332275390625,
0.0287017822265625,
-0.0250091552734375,
0.08306884765625,
-0.0045318603515625,
0.037139892578125,
0.05084228515625,
-0.005741119384765625,
-0.012451171875,
-0.0067138671875,
-0.009674072265625,
0.0031909942626953125,
0.0018491744995117188,
-0.039825439453125,
-0.0338134765625,
0.011871337890625,
-0.01082611083984375,
0.03240966796875,
-0.031219482421875,
0.006267547607421875,
-0.03863525390625,
0.00907135009765625,
-0.08355712890625,
-0.0003266334533691406,
0.07916259765625,
0.061737060546875,
-0.061248779296875,
-0.004619598388671875,
-0.005336761474609375,
-0.00936126708984375,
-0.07843017578125,
-0.035186767578125,
-0.052276611328125,
0.01329803466796875,
-0.003635406494140625,
0.0156402587890625,
-0.0019054412841796875,
0.01009368896484375,
-0.01371002197265625,
0.01076507568359375,
-0.007053375244140625,
0.0230865478515625,
0.01580810546875,
0.078125,
-0.05023193359375,
0.06976318359375,
0.0126953125,
0.027130126953125,
-0.0276947021484375,
-0.01357269287109375,
-0.0007967948913574219,
-0.035491943359375,
-0.00457000732421875,
-0.00858306884765625,
-0.001953125,
0.04339599609375,
0.039794921875,
0.0005054473876953125,
-0.00502777099609375,
-0.0161590576171875,
-0.0140380859375,
-0.01611328125,
0.01806640625,
-0.0160675048828125,
-0.041290283203125,
0.0016918182373046875,
-0.038421630859375,
0.03778076171875,
-0.0262451171875,
0.0208282470703125,
0.042877197265625,
-0.07757568359375,
0.035064697265625,
0.03131103515625,
-0.040863037109375,
0.067138671875,
0.0797119140625,
0.0005698204040527344,
0.05389404296875,
0.00893402099609375,
0.0214385986328125,
0.031890869140625,
0.0333251953125,
-0.064453125,
-0.0230255126953125,
0.041961669921875,
0.0095672607421875,
-0.0367431640625,
0.0269317626953125,
-0.0203857421875,
-0.00217437744140625,
0.026885986328125,
0.0276947021484375,
-0.057342529296875,
0.005275726318359375,
-0.017913818359375,
-0.01267242431640625,
0.0243988037109375,
-0.00708770751953125,
0.00933837890625,
-0.01419830322265625,
0.021270751953125,
0.0091552734375,
-0.0168914794921875,
-0.005725860595703125,
-0.010223388671875,
-0.0250244140625,
-0.01348876953125,
0.0158843994140625,
0.00478363037109375,
-0.00930023193359375,
0.0155029296875,
0.0041656494140625,
0.0216064453125,
-0.0396728515625,
0.02520751953125,
0.029296875,
0.0021495819091796875,
-0.04998779296875,
0.03436279296875,
-0.00952911376953125,
0.0117645263671875,
-0.03887939453125,
-0.036834716796875,
0.0294036865234375,
0.0261993408203125,
-0.02520751953125,
-0.0069732666015625,
0.01415252685546875,
0.0004646778106689453,
-0.02325439453125,
-0.0139923095703125,
0.018463134765625,
0.038909912109375,
-0.051605224609375,
0.032135009765625,
-0.03216552734375,
-0.00757598876953125,
0.0039005279541015625,
-0.0189361572265625,
0.048492431640625,
-0.065673828125,
0.0016698837280273438,
0.0205230712890625,
-0.02435302734375,
0.00604248046875,
0.02154541015625,
0.0184478759765625,
-0.005748748779296875,
-0.033660888671875,
0.019775390625,
-0.0589599609375,
-0.023529052734375,
-0.00020968914031982422,
-0.00005930662155151367,
0.09112548828125,
0.01241302490234375,
-0.05865478515625,
0.01158905029296875,
0.06488037109375,
-0.050262451171875,
0.048675537109375,
-0.06451416015625,
0.061187744140625,
-0.01468658447265625,
0.057373046875,
-0.035064697265625,
0.009521484375,
0.0279541015625,
-0.0171661376953125,
0.049224853515625,
0.012939453125,
-0.023162841796875,
-0.0017423629760742188,
0.018096923828125,
-0.01020050048828125,
-0.03533935546875,
0.04217529296875,
-0.015045166015625,
-0.0107421875,
0.00664520263671875,
0.0234527587890625,
0.05426025390625,
-0.035675048828125,
-0.05291748046875,
0.00052642822265625,
-0.019561767578125,
-0.03277587890625,
0.022705078125,
-0.0092620849609375,
-0.0155792236328125,
0.0016193389892578125,
0.0039215087890625,
-0.035491943359375,
0.002162933349609375,
0.010589599609375,
0.0005054473876953125,
-0.00914764404296875,
-0.01471710205078125,
-0.019683837890625,
0.029083251953125,
0.002902984619140625,
0.0231170654296875,
0.032440185546875,
0.04638671875,
-0.0225372314453125,
-0.0252838134765625,
0.006687164306640625,
0.014251708984375,
-0.044677734375,
0.0272216796875,
0.01457977294921875,
0.0184783935546875,
-0.030029296875,
0.01898193359375,
0.017333984375,
0.041015625,
-0.044830322265625,
-0.005298614501953125,
0.0170135498046875,
0.00621795654296875,
-0.003192901611328125,
-0.0038318634033203125,
0.0164947509765625,
-0.060699462890625,
-0.035369873046875,
-0.02972412109375,
-0.0130157470703125,
0.021942138671875,
0.0406494140625,
-0.002262115478515625,
0.0179595947265625,
-0.034423828125,
-0.0228424072265625,
-0.037841796875,
0.010528564453125,
0.00748443603515625,
0.06939697265625,
0.0021381378173828125,
0.0758056640625,
-0.02886962890625,
-0.0335693359375,
-0.006229400634765625,
0.03668212890625,
-0.0185546875,
0.0196685791015625,
-0.01739501953125,
-0.0238189697265625,
-0.029266357421875,
0.02154541015625,
0.0501708984375,
0.033599853515625,
0.0260009765625,
0.02337646484375,
0.0092010498046875,
0.0229644775390625,
0.061859130859375,
-0.006183624267578125,
0.01560211181640625,
-0.0307464599609375,
0.05078125,
0.012298583984375,
-0.0010595321655273438,
-0.0213775634765625,
0.0167083740234375,
0.05572509765625,
-0.046356201171875,
-0.006061553955078125,
-0.0180816650390625,
-0.01511383056640625,
0.022125244140625,
-0.005298614501953125,
0.0059051513671875,
-0.0188140869140625,
-0.0650634765625,
-0.002323150634765625,
-0.0298614501953125,
-0.06451416015625,
0.041107177734375,
0.05413818359375,
-0.0187225341796875,
0.00026798248291015625,
0.0171661376953125,
-0.003841400146484375,
0.037628173828125,
0.0019321441650390625,
-0.0183868408203125,
-0.0007109642028808594,
0.025146484375,
-0.0175628662109375,
-0.0460205078125,
-0.0218505859375,
-0.0264892578125,
0.033538818359375,
0.0189361572265625,
0.0399169921875,
-0.01023101806640625,
0.035247802734375,
0.04302978515625,
-0.01070404052734375,
0.037261962890625,
0.0380859375,
-0.0312042236328125,
0.01018524169921875,
0.02886962890625,
-0.042205810546875,
-0.0297698974609375,
-0.00872039794921875,
0.0416259765625,
-0.027313232421875,
0.0094146728515625,
-0.0300750732421875,
0.03594970703125,
-0.0201416015625,
0.04693603515625,
-0.004604339599609375,
-0.03399658203125,
-0.0260772705078125,
-0.00479888916015625,
0.0300445556640625,
0.069091796875,
0.034820556640625,
-0.018524169921875,
-0.0306396484375,
-0.045135498046875,
0.00389862060546875,
-0.005664825439453125,
-0.016265869140625,
0.0162811279296875,
-0.00403594970703125,
0.004970550537109375,
0.033721923828125,
-0.010345458984375,
0.0212249755859375,
0.027130126953125,
0.0017709732055664062,
0.039886474609375,
-0.057373046875,
-0.00864410400390625,
0.02581787109375,
0.049407958984375,
-0.0125579833984375,
0.028472900390625,
-0.0033130645751953125,
-0.024078369140625,
0.0269622802734375,
0.0283660888671875,
-0.00926971435546875,
-0.017791748046875,
-0.0185394287109375,
0.004390716552734375,
-0.0240325927734375,
-0.01605224609375,
-0.057952880859375,
-0.014801025390625,
0.01488494873046875,
-0.0126953125,
0.0123748779296875,
-0.0243682861328125,
0.0008320808410644531,
-0.0084075927734375,
-0.004550933837890625,
-0.0021114349365234375,
-0.00469207763671875,
0.01381683349609375,
-0.038604736328125,
-0.03546142578125,
-0.05194091796875,
0.03662109375,
-0.058990478515625,
-0.0012054443359375,
0.039093017578125,
-0.0022029876708984375,
-0.031524658203125,
-0.00954437255859375,
-0.0104827880859375,
0.048919677734375,
-0.038604736328125,
-0.032135009765625,
-0.0008449554443359375,
0.025054931640625,
-0.00893402099609375,
0.001251220703125,
0.0028057098388671875,
0.01235198974609375,
-0.0238494873046875,
-0.0153350830078125,
-0.025054931640625,
-0.0231170654296875,
-0.0687255859375,
-0.1314697265625,
0.039642333984375,
-0.02294921875,
-0.037811279296875,
-0.1041259765625,
0.0408935546875,
0.01491546630859375,
0.006046295166015625,
-0.051300048828125,
0.026153564453125,
-0.0258941650390625,
0.024871826171875,
0.004337310791015625,
-0.0005421638488769531,
0.0283050537109375,
-0.0300140380859375,
-0.04193115234375,
-0.01389312744140625,
0.0024204254150390625,
-0.0030956268310546875,
0.055206298828125,
-0.050933837890625,
0.07855224609375,
0.041351318359375,
-0.043609619140625,
-0.0189208984375,
-0.01175689697265625,
-0.0355224609375,
-0.0084381103515625,
-0.014984130859375,
-0.00811004638671875,
0.0171051025390625,
0.05322265625,
0.03082275390625,
0.0102996826171875,
-0.04522705078125,
0.0059356689453125,
-0.04254150390625,
-0.06451416015625,
-0.03240966796875,
0.01122283935546875,
-0.0411376953125,
-0.01224517822265625,
-0.03076171875,
0.0036830902099609375,
-0.01263427734375,
0.0032558441162109375,
-0.02777099609375,
-0.025390625,
-0.0022411346435546875,
0.01056671142578125,
-0.06842041015625,
-0.036956787109375,
0.07830810546875,
-0.0430908203125,
-0.01727294921875,
0.02923583984375,
0.0196075439453125,
0.020751953125,
0.02972412109375,
0.017242431640625,
-0.0054779052734375,
-0.02020263671875,
0.00746917724609375,
0.0125579833984375,
-0.005832672119140625,
-0.015838623046875,
-0.0226593017578125,
0.0027332305908203125,
0.01152801513671875,
-0.0195770263671875,
0.013916015625,
0.0243988037109375,
0.0211944580078125,
-0.0233917236328125,
0.09033203125,
0.0056304931640625,
0.03863525390625,
-0.016387939453125,
0.038787841796875,
-0.01983642578125,
-0.00566864013671875,
-0.00753021240234375,
0.01496124267578125,
0.0070953369140625,
-0.00034737586975097656,
0.0157012939453125,
-0.04302978515625,
0.024383544921875,
-0.05828857421875,
0.006256103515625,
0.0217132568359375
]
|
e80b5c2cbd46b3c079fa5f34d3103529761a5460 | Wordpress Stackexchange
Q: How to display custom user meta from registration in backend? I'm considering using the hooks for the WordPress registration form to add some custom fields: https://codex.wordpress.org/Customizing_the_Registration_Form
My question is, if it's even possible, how do I display some of these custom fields in the backend Users > All Users? For example if I have fields for 'zip code' and 'address', how would I display this data in the backend? Thanks.
A: Actually I found this to be more strait forward and simpler:
//add columns to User panel list page
function add_user_columns($column) {
$column['address'] = 'Street Address';
$column['zipcode'] = 'Zip Code';
return $column;
}
add_filter( 'manage_users_columns', 'add_user_columns' );
//add the data
function add_user_column_data( $val, $column_name, $user_id ) {
$user = get_userdata($user_id);
switch ($column_name) {
case 'address' :
return $user->address;
break;
default:
}
return;
}
add_filter( 'manage_users_custom_column', 'add_user_column_data', 10, 3 );
More info for hooks for custom columns can be found here: http://tareq.wedevs.com/2011/07/add-your-custom-columns-to-wordpress-admin-panel-tables/
| Q: How to display custom user meta from registration in backend? I'm considering using the hooks for the WordPress registration form to add some custom fields: https://codex.wordpress.org/Customizing_the_Registration_Form
My question is, if it's even possible, how do I display some of these custom fields in the backend Users > All Users? For example if I have fields for 'zip code' and 'address', how would I display this data in the backend? Thanks.
A: Actually I found this to be more strait forward and simpler:
//add columns to User panel list page
function add_user_columns($column) {
$column['address'] = 'Street Address';
$column['zipcode'] = 'Zip Code';
return $column;
}
add_filter( 'manage_users_columns', 'add_user_columns' );
//add the data
function add_user_column_data( $val, $column_name, $user_id ) {
$user = get_userdata($user_id);
switch ($column_name) {
case 'address' :
return $user->address;
break;
default:
}
return;
}
add_filter( 'manage_users_custom_column', 'add_user_column_data', 10, 3 );
More info for hooks for custom columns can be found here: http://tareq.wedevs.com/2011/07/add-your-custom-columns-to-wordpress-admin-panel-tables/
A: To display the user meta data in the User's page, you need the filters manage_users_custom_column and manage_users_columns: Sortable Custom Columns in User Panel (users.php)?
And to add the fields in the User/Profile pages, the following (from Checkboxes in registration form):
// PROFILE
add_action( 'show_user_profile', 'user_field_wpse_87261' );
add_action( 'personal_options_update', 'save_profile_fields_87261' );
// USER EDIT
add_action( 'edit_user_profile', 'user_field_wpse_87261' );
add_action( 'edit_user_profile_update', 'save_profile_fields_87261' );
| wordpress | {
"language": "en",
"length": 214,
"provenance": "stackexchange_00019.jsonl.gz:438323",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119250"
} | [
0.0545654296875,
0.00386810302734375,
0.0099029541015625,
-0.052825927734375,
0.007335662841796875,
-0.00977325439453125,
-0.01169586181640625,
-0.0245819091796875,
-0.0021343231201171875,
0.0216827392578125,
-0.00948333740234375,
-0.01102447509765625,
-0.012603759765625,
-0.03460693359375,
-0.02984619140625,
-0.038604736328125,
0.033050537109375,
0.0013723373413085938,
0.029754638671875,
-0.0034961700439453125,
0.01280975341796875,
0.0254974365234375,
0.0175933837890625,
0.0394287109375,
0.00836944580078125,
-0.036865234375,
0.022552490234375,
-0.026824951171875,
0.0157928466796875,
-0.01251220703125,
0.00797271728515625,
0.01273345947265625,
0.0252838134765625,
0.0010194778442382812,
-0.0036487579345703125,
-0.0081329345703125,
0.04107666015625,
-0.01375579833984375,
-0.00728607177734375,
0.029388427734375,
0.048126220703125,
-0.03363037109375,
-0.0294647216796875,
0.00031375885009765625,
-0.00016939640045166016,
-0.049560546875,
0.07183837890625,
-0.020355224609375,
-0.006275177001953125,
-0.0066375732421875,
0.028167724609375,
0.0323486328125,
0.0362548828125,
-0.0238800048828125,
0.0190277099609375,
0.0343017578125,
-0.039337158203125,
0.00009810924530029297,
0.038604736328125,
0.0250396728515625,
-0.005641937255859375,
-0.038848876953125,
0.0133209228515625,
-0.047210693359375,
0.00970458984375,
-0.0282135009765625,
-0.039337158203125,
0.0303802490234375,
-0.01116943359375,
-0.007717132568359375,
0.0159149169921875,
-0.0232086181640625,
-0.01154327392578125,
-0.01141357421875,
-0.025787353515625,
0.032989501953125,
0.019195556640625,
0.005863189697265625,
0.00992584228515625,
0.00298309326171875,
-0.0269012451171875,
-0.0440673828125,
-0.008636474609375,
0.005802154541015625,
-0.0247650146484375,
0.013580322265625,
-0.02960205078125,
0.0096282958984375,
-0.008056640625,
-0.00385284423828125,
0.0011072158813476562,
-0.07373046875,
-0.0224151611328125,
0.04632568359375,
0.039337158203125,
-0.035186767578125,
0.0143280029296875,
0.035247802734375,
0.005931854248046875,
0.00391387939453125,
0.004283905029296875,
-0.0325927734375,
0.0275421142578125,
-0.0330810546875,
0.019561767578125,
0.03411865234375,
-0.035888671875,
-0.021759033203125,
0.01611328125,
0.04156494140625,
0.010467529296875,
-0.03668212890625,
-0.0152587890625,
0.007297515869140625,
-0.048614501953125,
0.00782012939453125,
-0.01366424560546875,
-0.043609619140625,
-0.037139892578125,
-0.0119781494140625,
-0.01204681396484375,
-0.0032138824462890625,
0.0032405853271484375,
-0.0447998046875,
0.0316162109375,
-0.0232696533203125,
-0.045806884765625,
0.0156707763671875,
-0.0303497314453125,
0.0109405517578125,
-0.0183258056640625,
0.01195526123046875,
0.06182861328125,
0.0511474609375,
-0.0037899017333984375,
-0.0023956298828125,
0.0234527587890625,
-0.035400390625,
-0.0224456787109375,
0.062744140625,
-0.0545654296875,
-0.0687255859375,
-0.0174102783203125,
-0.02471923828125,
-0.0062255859375,
0.008544921875,
0.019073486328125,
0.007411956787109375,
0.005298614501953125,
-0.018035888671875,
-0.04217529296875,
0.00885772705078125,
0.00701141357421875,
0.0316162109375,
-0.0229644775390625,
0.05902099609375,
0.0013132095336914062,
0.0207672119140625,
-0.04058837890625,
0.01409149169921875,
0.0279083251953125,
-0.0163116455078125,
-0.023834228515625,
-0.0457763671875,
-0.072509765625,
0.021270751953125,
-0.0233154296875,
-0.005756378173828125,
0.019195556640625,
-0.0219268798828125,
0.042510986328125,
0.015411376953125,
-0.00013625621795654297,
-0.0007991790771484375,
0.01171112060546875,
-0.01351165771484375,
-0.007503509521484375,
0.055450439453125,
0.016510009765625,
0.01220703125,
0.00307464599609375,
-0.036865234375,
0.0709228515625,
-0.0047454833984375,
-0.04638671875,
0.056671142578125,
-0.003101348876953125,
0.06842041015625,
0.036865234375,
0.00696563720703125,
0.00559234619140625,
0.00736236572265625,
-0.007785797119140625,
-0.0157623291015625,
-0.0099945068359375,
-0.024139404296875,
0.005214691162109375,
-0.01416015625,
-0.00959014892578125,
0.039093017578125,
0.00409698486328125,
-0.0216064453125,
0.03125,
-0.0109405517578125,
-0.0543212890625,
0.02191162109375,
-0.04400634765625,
0.039764404296875,
-0.01788330078125,
0.004077911376953125,
0.0239715576171875,
0.004215240478515625,
-0.045501708984375,
0.041473388671875,
-0.007694244384765625,
-0.007213592529296875,
0.01038360595703125,
0.0269012451171875,
0.00745391845703125,
0.0118255615234375,
0.024078369140625,
-0.03375244140625,
0.00531005859375,
0.0157318115234375,
-0.0028591156005859375,
-0.035552978515625,
-0.0005102157592773438,
-0.0284271240234375,
0.0097503662109375,
0.007282257080078125,
0.019805908203125,
0.0150604248046875,
-0.0177764892578125,
-0.004360198974609375,
-0.03448486328125,
-0.004703521728515625,
-0.0191192626953125,
-0.0260772705078125,
0.00807952880859375,
0.041748046875,
0.027069091796875,
0.018157958984375,
0.0016298294067382812,
0.0206451416015625,
0.028289794921875,
0.01503753662109375,
0.039276123046875,
-0.011444091796875,
-0.0033435821533203125,
0.0201416015625,
-0.00899505615234375,
0.015167236328125,
0.02166748046875,
-0.0301361083984375,
0.0282135009765625,
0.0374755859375,
-0.034027099609375,
-0.001068115234375,
0.01279449462890625,
-0.0289154052734375,
0.0007839202880859375,
-0.04266357421875,
-0.01629638671875,
-0.024505615234375,
0.0051727294921875,
0.00020313262939453125,
0.01416778564453125,
-0.0017423629760742188,
-0.03302001953125,
-0.00421905517578125,
0.02960205078125,
0.0177764892578125,
0.003509521484375,
-0.038330078125,
-0.00662994384765625,
0.041412353515625,
-0.041595458984375,
0.0170440673828125,
0.036590576171875,
-0.0247344970703125,
-0.00213623046875,
-0.0040283203125,
-0.03106689453125,
0.00859832763671875,
0.0275421142578125,
-0.05987548828125,
0.006046295166015625,
0.04388427734375,
-0.004974365234375,
-0.037994384765625,
0.003520965576171875,
0.018890380859375,
-0.020416259765625,
0.0256500244140625,
-0.019683837890625,
-0.0230712890625,
-0.0126495361328125,
0.0096435546875,
0.0019969940185546875,
-0.008148193359375,
-0.007061004638671875,
0.04205322265625,
-0.005817413330078125,
-0.00467681884765625,
0.0003352165222167969,
-0.01511383056640625,
-0.044281005859375,
0.048614501953125,
0.016754150390625,
-0.06353759765625,
0.0124969482421875,
0.051422119140625,
0.032470703125,
0.052459716796875,
-0.0041961669921875,
-0.044464111328125,
-0.02655029296875,
0.031890869140625,
-0.037872314453125,
-0.031036376953125,
0.00849151611328125,
-0.004756927490234375,
-0.032623291015625,
-0.025634765625,
-0.016448974609375,
0.022308349609375,
-0.03863525390625,
-0.006862640380859375,
0.00392913818359375,
-0.0207366943359375,
-0.042877197265625,
-0.036590576171875,
-0.05389404296875,
-0.016082763671875,
-0.0016841888427734375,
0.002727508544921875,
-0.000003039836883544922,
0.060882568359375,
-0.0025234222412109375,
-0.07269287109375,
-0.01467132568359375,
-0.03350830078125,
-0.0177764892578125,
0.018524169921875,
0.003734588623046875,
-0.0275115966796875,
0.054595947265625,
-0.0032215118408203125,
-0.0069427490234375,
0.025115966796875,
-0.01509857177734375,
-0.034454345703125,
-0.0135345458984375,
-0.040252685546875,
-0.0150909423828125,
0.02618408203125,
0.0133819580078125,
-0.009033203125,
0.041534423828125,
-0.03558349609375,
-0.00872802734375,
0.052001953125,
0.0111541748046875,
-0.037139892578125,
-0.04156494140625,
-0.042938232421875,
-0.0142974853515625,
0.04217529296875,
0.0200042724609375,
0.0202789306640625,
-0.006603240966796875,
0.0169677734375,
-0.00826263427734375,
0.00730133056640625,
0.0226287841796875,
-0.007801055908203125,
-0.0033054351806640625,
-0.006717681884765625,
0.0064849853515625,
-0.006591796875,
0.05621337890625,
0.0004105567932128906,
0.05181884765625,
-0.025421142578125,
-0.11480712890625,
0.05804443359375,
-0.00800323486328125,
-0.0055999755859375,
-0.03515625,
-0.0394287109375,
0.01739501953125,
0.128662109375,
-0.0404052734375,
-0.00467681884765625,
0.027923583984375,
0.003711700439453125,
-0.0308685302734375,
0.0006284713745117188,
-0.09088134765625,
0.00014925003051757812,
-0.057373046875,
-0.0013027191162109375,
0.0005002021789550781,
-0.02362060546875,
0.00844573974609375,
-0.0020046234130859375,
-0.0226593017578125,
-0.0235137939453125,
0.035736083984375,
0.0178375244140625,
-0.00009906291961669922,
0.03521728515625,
-0.00347900390625,
0.0163726806640625,
-0.01450347900390625,
0.01512908935546875,
-0.0870361328125,
-0.038299560546875,
0.00830841064453125,
0.074462890625,
0.0254058837890625,
-0.042236328125,
-0.004474639892578125,
0.056396484375,
0.03668212890625,
0.00600433349609375,
0.019561767578125,
-0.005237579345703125,
0.0252685546875,
-0.0731201171875,
-0.0038928985595703125,
-0.048614501953125,
-0.0247802734375,
-0.059661865234375,
0.005878448486328125,
0.00449371337890625,
-0.041229248046875,
0.0408935546875,
-0.0333251953125,
0.00691986083984375,
0.01067352294921875,
-0.0258941650390625,
-0.02252197265625,
0.006534576416015625,
-0.00916290283203125,
-0.0098724365234375,
-0.011383056640625,
0.00858306884765625,
-0.0025043487548828125,
-0.00042247772216796875,
-0.0025501251220703125,
0.0183258056640625,
0.057586669921875,
0.025390625,
-0.004001617431640625,
-0.0291290283203125,
-0.0194244384765625,
0.030517578125,
-0.021209716796875,
0.031219482421875,
0.026519775390625,
-0.014801025390625,
0.032318115234375,
-0.0037059783935546875,
0.00936126708984375,
-0.02410888671875,
0.03009033203125,
0.00457000732421875,
0.00946807861328125,
-0.0018672943115234375,
0.006916046142578125,
0.006561279296875,
-0.0134429931640625,
-0.02203369140625,
0.004192352294921875,
0.017059326171875,
0.034149169921875,
-0.01580810546875,
0.0156402587890625,
-0.02447509765625,
-0.0186004638671875,
-0.00048828125,
-0.055389404296875,
0.031524658203125,
0.0012035369873046875,
0.006256103515625,
-0.0150299072265625,
-0.01030731201171875,
-0.02252197265625,
0.0014324188232421875,
-0.0665283203125,
0.0184783935546875,
0.003223419189453125,
-0.0178070068359375,
-0.003910064697265625,
0.025604248046875,
-0.01416015625,
0.0732421875,
-0.0218963623046875,
-0.06024169921875,
-0.00022876262664794922,
-0.027374267578125,
0.02789306640625,
0.020843505859375,
0.00498199462890625,
0.038848876953125,
0.06707763671875,
-0.00902557373046875,
-0.00843048095703125,
0.00511932373046875,
0.037353515625,
-0.047943115234375,
0.007694244384765625,
0.00782012939453125,
-0.01006317138671875,
-0.030670166015625,
0.0526123046875,
0.03436279296875,
-0.0090179443359375,
-0.0177001953125,
0.06170654296875,
0.04718017578125,
0.030120849609375,
0.0168609619140625,
-0.004100799560546875,
-0.039031982421875,
0.033538818359375,
-0.049041748046875,
-0.00372314453125,
0.0792236328125,
-0.00122833251953125,
0.010406494140625,
0.05657958984375,
-0.02972412109375,
0.00923919677734375,
-0.06329345703125,
-0.00027251243591308594,
0.0270233154296875,
-0.0498046875,
-0.066650390625,
-0.027984619140625,
-0.0173187255859375,
0.01348876953125,
-0.0565185546875,
-0.0012922286987304688,
0.04168701171875,
-0.029815673828125,
0.029205322265625,
0.0021877288818359375,
0.0212249755859375,
-0.041229248046875,
-0.04534912109375,
-0.00495147705078125,
0.00154876708984375,
0.0157470703125,
-0.04754638671875,
-0.0267333984375,
-0.01561737060546875,
-0.01020050048828125,
0.01230621337890625,
-0.018798828125,
0.00754547119140625,
-0.04791259765625,
0.02410888671875,
-0.049957275390625,
-0.01384735107421875,
0.056854248046875,
0.025238037109375,
-0.04095458984375,
-0.01849365234375,
-0.041351318359375,
0.006717681884765625,
0.0191497802734375,
-0.0106048583984375,
0.006099700927734375,
-0.004962921142578125,
0.03515625,
0.03656005859375,
0.011474609375,
-0.045440673828125,
-0.0255126953125,
-0.0196380615234375,
0.043243408203125,
0.033050537109375,
-0.006244659423828125,
0.04974365234375,
-0.026275634765625,
0.05615234375,
0.0115814208984375,
0.01348876953125,
-0.021331787109375,
-0.0223388671875,
0.0211944580078125,
-0.021942138671875,
-0.049835205078125,
-0.015869140625,
-0.03399658203125,
0.0011997222900390625,
0.036712646484375,
-0.0194549560546875,
-0.015960693359375,
-0.014862060546875,
-0.002376556396484375,
-0.01374053955078125,
0.055908203125,
0.0267486572265625,
-0.00707244873046875,
0.041046142578125,
-0.0037975311279296875,
0.0293426513671875,
-0.00479888916015625,
-0.048858642578125,
0.0540771484375,
-0.0045166015625,
0.046722412109375,
-0.0019197463989257812,
-0.06884765625,
0.0645751953125,
0.0504150390625,
0.0011281967163085938,
0.03704833984375,
0.00722503662109375,
0.01245880126953125,
0.0245208740234375,
-0.0025177001953125,
-0.02197265625,
0.038177490234375,
0.055084228515625,
-0.003696441650390625,
-0.0206298828125,
0.0302276611328125,
-0.024383544921875,
0.006092071533203125,
0.06512451171875,
0.053436279296875,
-0.1043701171875,
0.0130157470703125,
0.00595855712890625,
0.0035839080810546875,
0.0258636474609375,
0.00920867919921875,
-0.0137939453125,
-0.00726318359375,
0.00110626220703125,
-0.0037250518798828125,
-0.025848388671875,
0.006961822509765625,
0.031036376953125,
-0.00896453857421875,
0.025360107421875,
0.0169219970703125,
-0.0017919540405273438,
0.033355712890625,
-0.038665771484375,
-0.0309295654296875,
0.01380157470703125,
0.0111083984375,
0.01126861572265625,
-0.0197296142578125,
-0.0177764892578125,
-0.035797119140625,
-0.0225067138671875,
-0.035858154296875,
-0.040008544921875,
0.0394287109375,
0.044830322265625,
0.07012939453125,
0.03265380859375,
0.0413818359375,
-0.03240966796875,
0.01038360595703125,
0.003154754638671875,
-0.01261138916015625,
-0.029510498046875,
-0.032257080078125,
-0.00859832763671875,
-0.023193359375,
0.01497650146484375,
-0.0194244384765625,
-0.00930023193359375,
-0.016265869140625,
0.01715087890625,
0.06793212890625,
0.0226898193359375,
-0.0616455078125,
0.02191162109375,
-0.005741119384765625,
-0.01471710205078125,
0.01363372802734375,
0.011962890625,
-0.03338623046875,
-0.029449462890625,
0.005645751953125,
-0.057464599609375,
-0.01090240478515625,
0.01348876953125,
-0.045501708984375,
0.039306640625,
0.0046234130859375,
0.01345062255859375,
-0.0090484619140625,
0.01214599609375,
0.0025463104248046875,
0.0084381103515625,
-0.034820556640625,
0.03424072265625,
0.01520538330078125,
0.05474853515625,
-0.047027587890625,
-0.0209197998046875,
0.0242156982421875,
0.058349609375,
0.03338623046875,
0.0183563232421875,
-0.0171051025390625,
-0.03271484375,
-0.020355224609375,
-0.0136260986328125,
-0.035888671875,
0.040802001953125,
-0.01041412353515625,
0.039642333984375,
0.0614013671875,
-0.015899658203125,
0.05194091796875,
-0.00519561767578125,
-0.027099609375,
0.00231170654296875,
0.01532745361328125,
0.034942626953125,
-0.01128387451171875,
0.0157318115234375,
-0.0220794677734375,
-0.0102996826171875,
0.025115966796875,
-0.020904541015625,
-0.0230865478515625,
0.017791748046875,
0.01360321044921875,
-0.02813720703125,
0.0005812644958496094,
-0.0273284912109375,
0.037445068359375,
0.02587890625,
0.046844482421875,
0.02679443359375,
0.02374267578125,
0.032318115234375,
0.0213470458984375,
0.04449462890625,
0.0455322265625,
-0.026824951171875,
0.061431884765625,
0.02032470703125,
0.016143798828125,
-0.032257080078125,
0.02288818359375,
0.029388427734375,
0.06170654296875,
-0.049591064453125,
-0.06390380859375,
0.0126800537109375,
0.022705078125,
0.01517486572265625,
0.03350830078125,
0.0123443603515625,
-0.02435302734375,
0.051422119140625,
-0.07354736328125,
-0.01044464111328125,
0.0149993896484375,
0.06207275390625,
-0.01483154296875,
-0.0186309814453125,
-0.0416259765625,
-0.052825927734375,
-0.049102783203125,
0.0189056396484375,
0.046966552734375,
0.036529541015625,
-0.006591796875,
0.038818359375,
0.0404052734375,
-0.01502227783203125,
-0.0228118896484375,
0.0126953125,
0.0211334228515625,
0.0262298583984375,
-0.04791259765625,
-0.017852783203125,
0.028594970703125,
0.047149658203125,
-0.01222991943359375,
0.0158538818359375,
0.01230621337890625,
0.02764892578125,
-0.006237030029296875,
-0.02044677734375,
0.030548095703125,
-0.0186004638671875,
0.005084991455078125,
-0.04913330078125,
0.0209197998046875,
-0.001338958740234375,
0.00017702579498291016,
-0.00727081298828125,
-0.0305328369140625,
0.049346923828125,
-0.017364501953125,
0.037078857421875,
-0.0141448974609375,
-0.0264434814453125,
0.00543975830078125,
-0.0313720703125,
0.06292724609375,
0.0011310577392578125,
-0.08087158203125,
-0.0004439353942871094,
-0.051116943359375,
-0.04571533203125,
0.038299560546875,
0.032623291015625,
-0.0088958740234375,
0.0064544677734375,
0.0145263671875,
-0.0352783203125,
0.026336669921875,
0.0189361572265625,
0.0119781494140625,
0.020263671875,
0.01131439208984375,
0.00191497802734375,
-0.055328369140625,
-0.0119476318359375,
-0.01367950439453125,
-0.0004673004150390625,
-0.0221099853515625,
0.09503173828125,
-0.0145111083984375,
0.0018138885498046875,
-0.0116119384765625,
-0.00710296630859375,
0.0033512115478515625,
-0.0154266357421875,
0.037811279296875,
0.01320648193359375,
-0.0172882080078125,
-0.0240478515625,
0.01007843017578125,
0.018524169921875,
0.03814697265625,
-0.064697265625,
-0.0044403076171875,
0.01375579833984375,
0.00799560546875,
-0.033447265625,
-0.006298065185546875,
-0.026702880859375,
-0.041412353515625,
-0.03021240234375,
0.012481689453125,
0.01953125,
0.00635528564453125,
-0.038909912109375,
0.011016845703125,
0.0116424560546875,
-0.035888671875,
0.0097198486328125,
-0.0205535888671875,
0.03497314453125,
0.03857421875,
-0.00409698486328125,
0.0289764404296875,
0.036895751953125,
-0.005496978759765625,
0.048431396484375,
0.0205078125,
0.003948211669921875,
0.04754638671875,
-0.01910400390625,
0.031646728515625,
0.05841064453125,
0.07452392578125,
0.00438690185546875,
0.0238494873046875,
0.013580322265625,
-0.0092926025390625,
0.036468505859375,
-0.025115966796875,
-0.0416259765625,
-0.040924072265625,
0.006488800048828125,
0.04608154296875,
-0.016754150390625,
-0.01953125,
-0.1270751953125,
-0.01102447509765625,
0.023590087890625,
0.0065765380859375,
-0.040191650390625,
0.004627227783203125,
0.00911712646484375,
0.03662109375,
-0.01186370849609375,
0.004703521728515625,
0.0118560791015625,
0.039154052734375,
-0.021331787109375,
0.0274810791015625,
-0.0016231536865234375,
-0.00839996337890625,
0.01995849609375,
0.021636962890625,
0.040130615234375,
-0.010223388671875,
-0.027496337890625,
0.0258941650390625,
0.0017414093017578125,
0.06622314453125,
0.002582550048828125,
-0.028533935546875,
-0.0206146240234375,
0.025390625,
0.0028057098388671875,
-0.06341552734375,
-0.0041046142578125,
-0.0390625,
0.015716552734375,
-0.036956787109375,
0.029144287109375,
0.037567138671875,
-0.032470703125,
-0.09332275390625,
0.1029052734375,
-0.047821044921875,
-0.0196990966796875,
-0.0537109375,
0.018890380859375,
0.0105133056640625,
-0.0190582275390625,
-0.00963592529296875,
-0.0224609375,
-0.02484130859375,
0.0247955322265625,
0.035675048828125,
-0.026641845703125,
0.036407470703125,
0.032257080078125,
-0.06915283203125,
0.0305328369140625,
0.0009479522705078125,
0.001522064208984375,
0.047393798828125,
-0.041961669921875,
0.047393798828125,
0.026580810546875,
-0.048919677734375,
-0.021697998046875,
-0.0164642333984375,
-0.019317626953125,
-0.00920867919921875,
-0.052215576171875,
-0.0083160400390625,
-0.03759765625,
0.054229736328125,
-0.004894256591796875,
0.01165771484375,
0.00042438507080078125,
-0.047882080078125,
-0.04949951171875,
-0.002918243408203125,
-0.026885986328125,
0.017913818359375,
-0.10711669921875,
-0.015869140625,
0.04156494140625,
-0.024322509765625,
-0.0002803802490234375,
0.0240936279296875,
-0.0205535888671875,
0.0254974365234375,
0.0751953125,
0.0005412101745605469,
-0.04559326171875,
-0.01241302490234375,
0.02410888671875,
-0.02252197265625,
-0.032440185546875,
-0.00018358230590820312,
0.0186614990234375,
-0.023193359375,
-0.0014295578002929688,
-0.031829833984375,
-0.064697265625,
-0.00696563720703125,
0.061767578125,
-0.038482666015625,
0.049713134765625,
-0.058502197265625,
-0.0191802978515625,
-0.002819061279296875,
0.025543212890625,
-0.01450347900390625,
0.020538330078125,
0.01418304443359375,
0.038177490234375,
-0.0023746490478515625,
0.07794189453125,
-0.015777587890625,
-0.0046539306640625,
-0.03887939453125,
0.03387451171875,
0.0216522216796875,
0.0004379749298095703,
0.0252685546875,
0.0218963623046875,
-0.00547027587890625,
-0.0124359130859375,
-0.0186004638671875,
-0.0496826171875,
0.00965118408203125,
0.027801513671875,
-0.01025390625,
0.0254974365234375
]
|
772dd26c2e2f43e5f7ad5b3d8fb95e2e65300159 | Wordpress Stackexchange
Q: Check if add_menu_page exists or not I'm working on a plugin that I have to release in parts.
The problem is, if there is a menu in the page then add the new plugin to the 2nd or next submenu else add a new menu and then add the plugin to 1st submenu.
My questions:
*
*How to check that there exists a menu?
*If I'm coding a reusable function , that will go with every plugin then that causes conflict option.
*I don't know the order of the plugin release.
add_menu_page(
'Page Title',
'Top Menu Title',
'manage_options',
'my_unique_slug',
'my_magic_function'
);
add_submenu_page(
'my_unique_slug',
'page title',
'submenu title',
'manage_options',
'my_submenu_slug',
'my_magic_function_of_submenu'
);
A: You can use the fourth parameter of add_menu_page(), the my_unique_slug, to check if the page exists:
if ( empty ( $GLOBALS['admin_page_hooks']['my_unique_slug'] ) )
add_menu_page(
'Page Title',
'Top Menu Title',
'manage_options',
'my_unique_slug',
'my_magic_function'
);
$GLOBALS['admin_page_hooks'] is the list of registered pages.
| Q: Check if add_menu_page exists or not I'm working on a plugin that I have to release in parts.
The problem is, if there is a menu in the page then add the new plugin to the 2nd or next submenu else add a new menu and then add the plugin to 1st submenu.
My questions:
*
*How to check that there exists a menu?
*If I'm coding a reusable function , that will go with every plugin then that causes conflict option.
*I don't know the order of the plugin release.
add_menu_page(
'Page Title',
'Top Menu Title',
'manage_options',
'my_unique_slug',
'my_magic_function'
);
add_submenu_page(
'my_unique_slug',
'page title',
'submenu title',
'manage_options',
'my_submenu_slug',
'my_magic_function_of_submenu'
);
A: You can use the fourth parameter of add_menu_page(), the my_unique_slug, to check if the page exists:
if ( empty ( $GLOBALS['admin_page_hooks']['my_unique_slug'] ) )
add_menu_page(
'Page Title',
'Top Menu Title',
'manage_options',
'my_unique_slug',
'my_magic_function'
);
$GLOBALS['admin_page_hooks'] is the list of registered pages.
| wordpress | {
"language": "en",
"length": 153,
"provenance": "stackexchange_00019.jsonl.gz:438335",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119281"
} | [
0.044769287109375,
0.0263519287109375,
0.0100250244140625,
-0.0077667236328125,
0.03369140625,
-0.0233306884765625,
0.0633544921875,
-0.056640625,
-0.04766845703125,
0.005706787109375,
0.005153656005859375,
0.0308837890625,
-0.045989990234375,
-0.0357666015625,
0.0276641845703125,
-0.0233154296875,
0.03070068359375,
-0.0139617919921875,
0.005950927734375,
-0.00778961181640625,
0.005329132080078125,
0.0225677490234375,
-0.03057861328125,
0.048065185546875,
0.04205322265625,
-0.12054443359375,
0.0013685226440429688,
-0.0021953582763671875,
0.00260162353515625,
-0.0281829833984375,
0.0214385986328125,
0.0618896484375,
0.0026378631591796875,
-0.00322723388671875,
0.04718017578125,
0.00904083251953125,
0.01800537109375,
0.005855560302734375,
0.035797119140625,
0.00400543212890625,
0.040557861328125,
-0.0030918121337890625,
0.006404876708984375,
0.03253173828125,
-0.01474761962890625,
-0.0589599609375,
0.0458984375,
-0.027557373046875,
-0.01312255859375,
-0.0129241943359375,
0.019439697265625,
-0.041839599609375,
0.016357421875,
0.008514404296875,
0.0019311904907226562,
0.022186279296875,
-0.00449371337890625,
-0.0026912689208984375,
0.0163421630859375,
0.026947021484375,
-0.0157470703125,
0.000308990478515625,
-0.0019550323486328125,
-0.049896240234375,
0.00885772705078125,
0.007106781005859375,
-0.0177764892578125,
0.0167999267578125,
-0.0219268798828125,
0.01312255859375,
0.0291900634765625,
-0.033782958984375,
-0.01264190673828125,
0.0295257568359375,
-0.01751708984375,
-0.055023193359375,
0.007518768310546875,
-0.030670166015625,
0.0239410400390625,
0.03363037109375,
0.0170135498046875,
-0.0012578964233398438,
0.002155303955078125,
0.0021152496337890625,
-0.01007080078125,
0.01335906982421875,
-0.0127105712890625,
-0.00972747802734375,
-0.035430908203125,
0.0263519287109375,
-0.0246429443359375,
-0.0096588134765625,
0.018341064453125,
-0.0008873939514160156,
-0.00695037841796875,
0.00189971923828125,
0.04791259765625,
0.10986328125,
-0.0174102783203125,
0.025054931640625,
0.009368896484375,
-0.04791259765625,
0.04156494140625,
-0.07623291015625,
0.0249176025390625,
0.08807373046875,
0.0119781494140625,
-0.046539306640625,
-0.001796722412109375,
-0.0251007080078125,
-0.004268646240234375,
0.00882720947265625,
-0.0010166168212890625,
-0.052886962890625,
0.0194091796875,
0.011993408203125,
-0.037872314453125,
0.0269927978515625,
0.02313232421875,
-0.0262298583984375,
0.0046539306640625,
0.0218505859375,
0.0018587112426757812,
-0.0129547119140625,
0.01541900634765625,
0.00872802734375,
-0.0295257568359375,
-0.0164337158203125,
-0.02288818359375,
0.030975341796875,
-0.02301025390625,
0.0203399658203125,
0.06292724609375,
0.0056304931640625,
-0.0242156982421875,
-0.0201568603515625,
-0.02447509765625,
0.00240325927734375,
-0.0128326416015625,
0.006473541259765625,
0.006824493408203125,
-0.0189971923828125,
0.020477294921875,
-0.01904296875,
-0.0251312255859375,
0.007259368896484375,
-0.0021572113037109375,
0.0026035308837890625,
0.0164947509765625,
-0.031707763671875,
-0.0013179779052734375,
-0.051910400390625,
0.034210205078125,
0.0005173683166503906,
-0.0546875,
-0.00921630859375,
-0.03057861328125,
-0.0020084381103515625,
0.0006413459777832031,
-0.01512908935546875,
-0.0304107666015625,
-0.021026611328125,
0.00946044921875,
-0.06890869140625,
-0.05230712890625,
0.01995849609375,
-0.02301025390625,
0.01035308837890625,
0.019439697265625,
0.020233154296875,
0.002838134765625,
0.004718780517578125,
0.0223388671875,
0.0183563232421875,
-0.00457763671875,
0.017242431640625,
0.0097808837890625,
0.017181396484375,
0.00986480712890625,
0.0224761962890625,
-0.004779815673828125,
-0.0294189453125,
0.0550537109375,
-0.022247314453125,
-0.10479736328125,
0.06640625,
-0.0012369155883789062,
0.103515625,
0.05426025390625,
0.006031036376953125,
0.054901123046875,
-0.031005859375,
-0.0038700103759765625,
0.0081634521484375,
-0.007488250732421875,
-0.0027751922607421875,
0.03448486328125,
0.0474853515625,
-0.0114898681640625,
-0.0404052734375,
-0.0380859375,
0.0308990478515625,
-0.01251220703125,
0.0191497802734375,
-0.0301971435546875,
0.0224761962890625,
-0.0198211669921875,
0.047149658203125,
0.0391845703125,
0.028594970703125,
-0.0225677490234375,
-0.034454345703125,
0.01513671875,
-0.00577545166015625,
-0.0200347900390625,
-0.023162841796875,
-0.036651611328125,
0.007381439208984375,
-0.0265045166015625,
0.040374755859375,
-0.0175018310546875,
-0.01165771484375,
-0.032196044921875,
-0.0219268798828125,
0.03131103515625,
0.0191802978515625,
-0.03118896484375,
-0.007167816162109375,
-0.01372528076171875,
0.03216552734375,
-0.06494140625,
0.0311126708984375,
0.039459228515625,
0.0268096923828125,
-0.0142974853515625,
0.01837158203125,
0.0072021484375,
-0.049407958984375,
-0.0199432373046875,
0.03155517578125,
0.05364990234375,
0.039093017578125,
0.005687713623046875,
-0.018890380859375,
0.00528717041015625,
-0.12939453125,
-0.011962890625,
-0.01708984375,
-0.020355224609375,
0.006305694580078125,
0.05767822265625,
0.023284912109375,
-0.004810333251953125,
0.037017822265625,
0.019256591796875,
-0.0008487701416015625,
-0.046783447265625,
-0.03216552734375,
0.040374755859375,
-0.0170440673828125,
-0.004833221435546875,
-0.021820068359375,
0.0296783447265625,
-0.0211944580078125,
-0.0028533935546875,
0.012664794921875,
0.0026836395263671875,
0.0138397216796875,
-0.0199432373046875,
0.0056610107421875,
0.033294677734375,
0.011474609375,
-0.01358795166015625,
0.01019287109375,
0.05670166015625,
0.0121612548828125,
-0.0491943359375,
-0.0007333755493164062,
0.01383209228515625,
0.012115478515625,
-0.030609130859375,
0.04736328125,
-0.016204833984375,
-0.01971435546875,
-0.03515625,
-0.050537109375,
-0.0014638900756835938,
-0.030975341796875,
0.04595947265625,
-0.0058135986328125,
0.035400390625,
-0.022247314453125,
-0.046142578125,
0.07281494140625,
0.00457763671875,
-0.0533447265625,
0.011474609375,
-0.0026454925537109375,
0.02239990234375,
-0.0247344970703125,
0.033538818359375,
0.047119140625,
-0.0164642333984375,
0.0011110305786132812,
0.0029773712158203125,
-0.01061248779296875,
-0.039642333984375,
0.031219482421875,
0.013641357421875,
0.006801605224609375,
-0.048492431640625,
0.0677490234375,
0.01415252685546875,
-0.006832122802734375,
0.006366729736328125,
-0.035858154296875,
-0.029327392578125,
-0.01678466796875,
-0.08416748046875,
-0.06622314453125,
-0.003387451171875,
-0.02215576171875,
0.046905517578125,
0.03643798828125,
0.005855560302734375,
-0.047515869140625,
0.06793212890625,
0.023284912109375,
-0.043731689453125,
-0.01251983642578125,
-0.049591064453125,
-0.0770263671875,
-0.055145263671875,
0.021575927734375,
-0.009979248046875,
0.0204010009765625,
-0.0030078887939453125,
0.07073974609375,
0.0086822509765625,
-0.05938720703125,
0.023712158203125,
-0.016876220703125,
-0.00870513916015625,
0.039031982421875,
0.011016845703125,
-0.0147247314453125,
0.0209503173828125,
0.0009002685546875,
0.034423828125,
0.037506103515625,
-0.01898193359375,
-0.00795745849609375,
-0.0216827392578125,
0.00966644287109375,
0.015960693359375,
-0.0009822845458984375,
0.0305023193359375,
0.033660888671875,
0.034332275390625,
-0.004451751708984375,
-0.020904541015625,
0.0044708251953125,
-0.02581787109375,
0.0643310546875,
0.002685546875,
-0.00940704345703125,
0.03753662109375,
0.0217437744140625,
-0.0007047653198242188,
0.0168609619140625,
0.022979736328125,
0.009246826171875,
-0.03369140625,
-0.03643798828125,
-0.044403076171875,
-0.00045490264892578125,
0.035797119140625,
0.005374908447265625,
-0.0191650390625,
0.007587432861328125,
0.0245513916015625,
-0.00008571147918701172,
0.025604248046875,
-0.02166748046875,
-0.015869140625,
0.0262298583984375,
-0.00753021240234375,
0.045867919921875,
-0.0428466796875,
-0.019805908203125,
-0.041961669921875,
0.046844482421875,
-0.0020751953125,
-0.02032470703125,
-0.03326416015625,
-0.0015573501586914062,
0.0220489501953125,
-0.039886474609375,
0.0306396484375,
-0.0176849365234375,
-0.078125,
0.03289794921875,
0.0087890625,
-0.01163482666015625,
-0.01245880126953125,
0.03546142578125,
-0.037017822265625,
-0.029327392578125,
0.0264892578125,
-0.045166015625,
0.03399658203125,
0.035736083984375,
0.00225067138671875,
0.0207366943359375,
-0.0213470458984375,
-0.034637451171875,
-0.07037353515625,
-0.004638671875,
-0.04217529296875,
0.046295166015625,
0.02532958984375,
-0.0279693603515625,
-0.00754547119140625,
0.017333984375,
0.01373291015625,
0.012481689453125,
0.018646240234375,
0.0082550048828125,
0.0278472900390625,
-0.0283660888671875,
-0.01073455810546875,
-0.027130126953125,
0.00940704345703125,
0.0009412765502929688,
-0.0267333984375,
0.001636505126953125,
-0.021087646484375,
0.0138092041015625,
0.006191253662109375,
-0.04254150390625,
-0.0214996337890625,
-0.0084991455078125,
0.00982666015625,
-0.0163116455078125,
0.022979736328125,
-0.027008056640625,
0.007389068603515625,
-0.0325927734375,
-0.0214080810546875,
-0.0309600830078125,
-0.047210693359375,
0.031219482421875,
0.034698486328125,
0.0426025390625,
0.00518035888671875,
-0.029388427734375,
-0.0075531005859375,
0.006008148193359375,
0.00829315185546875,
0.04022216796875,
0.016448974609375,
0.0164337158203125,
-0.003421783447265625,
-0.006439208984375,
0.0230560302734375,
-0.039794921875,
0.03631591796875,
-0.0167236328125,
0.001636505126953125,
0.0011301040649414062,
-0.0198974609375,
0.021881103515625,
0.036529541015625,
-0.0245819091796875,
-0.004871368408203125,
-0.0382080078125,
0.046234130859375,
-0.0003383159637451172,
0.00994110107421875,
-0.049072265625,
-0.0312347412109375,
-0.0024814605712890625,
0.01461029052734375,
0.041046142578125,
0.025848388671875,
-0.003337860107421875,
0.0262908935546875,
0.0196533203125,
-0.0096588134765625,
0.04180908203125,
0.0758056640625,
0.005535125732421875,
0.0390625,
0.005390167236328125,
-0.018585205078125,
-0.031280517578125,
-0.0077972412109375,
0.042633056640625,
-0.003910064697265625,
-0.03851318359375,
-0.0374755859375,
-0.01195526123046875,
0.00417327880859375,
-0.0022754669189453125,
0.0214996337890625,
0.0151824951171875,
-0.0138702392578125,
-0.032470703125,
-0.009857177734375,
0.022552490234375,
-0.0335693359375,
-0.02557373046875,
0.00789642333984375,
0.0023937225341796875,
-0.0162353515625,
-0.010406494140625,
0.041412353515625,
0.004909515380859375,
0.0011072158813476562,
-0.006744384765625,
0.0226898193359375,
0.0202484130859375,
0.02471923828125,
0.02294921875,
-0.0028362274169921875,
-0.0214691162109375,
0.021087646484375,
-0.004253387451171875,
-0.02886962890625,
-0.0186004638671875,
-0.0005364418029785156,
-0.0007238388061523438,
0.01132965087890625,
0.00905609130859375,
0.0276947021484375,
0.0283355712890625,
-0.0236358642578125,
0.031768798828125,
-0.0211029052734375,
-0.07196044921875,
-0.02093505859375,
0.028350830078125,
0.029388427734375,
-0.038604736328125,
-0.02862548828125,
0.0152587890625,
-0.0077972412109375,
0.027801513671875,
-0.005443572998046875,
-0.0374755859375,
0.044891357421875,
0.05230712890625,
-0.0297088623046875,
-0.0188446044921875,
0.024932861328125,
-0.03875732421875,
-0.0261993408203125,
-0.0274200439453125,
0.002323150634765625,
0.03741455078125,
-0.0116119384765625,
0.0296173095703125,
-0.01397705078125,
-0.03326416015625,
0.011077880859375,
-0.007755279541015625,
0.0469970703125,
0.0213775634765625,
-0.026397705078125,
-0.0186767578125,
-0.02642822265625,
-0.004673004150390625,
0.041412353515625,
-0.02239990234375,
-0.00937652587890625,
-0.02984619140625,
0.01503753662109375,
0.0009007453918457031,
-0.0006651878356933594,
-0.0240325927734375,
-0.00936126708984375,
0.0162353515625,
0.038818359375,
0.011962890625,
-0.0028076171875,
0.030517578125,
0.007259368896484375,
-0.0011072158813476562,
0.0087432861328125,
-0.00846099853515625,
-0.011383056640625,
-0.0166015625,
0.00429534912109375,
0.0018329620361328125,
-0.0228424072265625,
-0.040863037109375,
0.0164337158203125,
0.01316070556640625,
0.06365966796875,
0.0009212493896484375,
0.007480621337890625,
0.00870513916015625,
0.0015840530395507812,
-0.0038089752197265625,
-0.000035822391510009766,
0.031829833984375,
-0.0169525146484375,
0.088134765625,
-0.056060791015625,
0.007183074951171875,
0.0068817138671875,
0.01250457763671875,
0.0289154052734375,
-0.044952392578125,
0.0312042236328125,
0.03973388671875,
-0.06256103515625,
0.09539794921875,
0.05596923828125,
-0.0001531839370727539,
0.0207366943359375,
-0.0103302001953125,
-0.0022830963134765625,
-0.01163482666015625,
-0.030914306640625,
0.057373046875,
0.03692626953125,
0.06390380859375,
-0.01088714599609375,
0.02996826171875,
0.05499267578125,
-0.0243682861328125,
0.003070831298828125,
0.049896240234375,
0.0413818359375,
-0.0667724609375,
0.0027103424072265625,
0.0283355712890625,
0.00732421875,
-0.0145416259765625,
-0.0279998779296875,
0.022247314453125,
-0.01030731201171875,
0.07080078125,
-0.022430419921875,
-0.015655517578125,
0.0142059326171875,
-0.047760009765625,
-0.0312347412109375,
-0.00521087646484375,
0.0167694091796875,
0.0216827392578125,
0.03216552734375,
-0.00011742115020751953,
-0.022674560546875,
0.015411376953125,
0.0202178955078125,
0.00839996337890625,
-0.00860595703125,
-0.005344390869140625,
0.004596710205078125,
0.0300140380859375,
-0.057830810546875,
0.00244140625,
0.032867431640625,
0.0506591796875,
0.00392913818359375,
0.047882080078125,
0.0009832382202148438,
-0.00531005859375,
0.021697998046875,
-0.01500701904296875,
-0.0401611328125,
-0.01042938232421875,
0.031280517578125,
0.00013828277587890625,
-0.03057861328125,
0.0215606689453125,
-0.034393310546875,
-0.02862548828125,
0.002361297607421875,
-0.0005970001220703125,
0.0848388671875,
-0.0269622802734375,
-0.034393310546875,
0.0126953125,
-0.0086669921875,
0.004611968994140625,
-0.01122283935546875,
0.06951904296875,
-0.0216217041015625,
0.022186279296875,
0.0249176025390625,
0.0263671875,
-0.0400390625,
0.0023365020751953125,
-0.07562255859375,
0.10870361328125,
-0.0235443115234375,
0.0290679931640625,
-0.0097503662109375,
0.041534423828125,
0.001087188720703125,
0.030517578125,
-0.040252685546875,
0.077880859375,
0.00041866302490234375,
0.047882080078125,
-0.035919189453125,
0.002628326416015625,
0.0304718017578125,
0.0352783203125,
0.0213775634765625,
0.01036834716796875,
0.00801849365234375,
0.01422882080078125,
0.032379150390625,
-0.01092529296875,
-0.0245513916015625,
0.0288543701171875,
-0.0206756591796875,
-0.027374267578125,
0.0255584716796875,
-0.01049041748046875,
0.035125732421875,
-0.050384521484375,
-0.00682830810546875,
-0.0033893585205078125,
-0.004638671875,
-0.0126800537109375,
-0.01091766357421875,
-0.01177215576171875,
-0.0037708282470703125,
-0.00978851318359375,
-0.00949859619140625,
0.0040435791015625,
-0.00701904296875,
-0.02801513671875,
-0.0335693359375,
-0.0035610198974609375,
0.0023212432861328125,
-0.0023097991943359375,
0.0167388916015625,
0.0049896240234375,
-0.003917694091796875,
-0.01739501953125,
0.00213623046875,
0.0172271728515625,
-0.02471923828125,
-0.0224151611328125,
0.01444244384765625,
-0.005962371826171875,
0.049896240234375,
0.031524658203125,
0.032196044921875,
-0.02203369140625,
-0.026336669921875,
0.027313232421875,
0.06463623046875,
-0.030975341796875,
-0.04388427734375,
0.0151519775390625,
0.003749847412109375,
-0.034332275390625,
0.03936767578125,
-0.00994873046875,
0.043243408203125,
0.1024169921875,
-0.044921875,
-0.0023555755615234375,
0.0250701904296875,
0.0072174072265625,
-0.01580810546875,
-0.016815185546875,
0.00382232666015625,
0.01038360595703125,
-0.062255859375,
0.0421142578125,
0.034210205078125,
0.0767822265625,
-0.01029205322265625,
0.07525634765625,
-0.0255889892578125,
-0.033782958984375,
-0.01149749755859375,
0.0115203857421875,
-0.0027923583984375,
0.01641845703125,
-0.07147216796875,
-0.060516357421875,
0.03875732421875,
0.060699462890625,
0.0219879150390625,
0.014617919921875,
0.031158447265625,
0.029266357421875,
0.0016765594482421875,
0.0015478134155273438,
0.0294189453125,
-0.007450103759765625,
-0.01641845703125,
0.000010967254638671875,
-0.0012197494506835938,
0.0007724761962890625,
-0.0020351409912109375,
-0.01523590087890625,
0.049072265625,
-0.0181732177734375,
0.00577545166015625,
-0.002643585205078125,
0.012237548828125,
-0.0198211669921875,
0.04534912109375,
0.042755126953125,
0.0792236328125,
0.05224609375,
-0.07147216796875,
-0.007068634033203125,
-0.03961181640625,
-0.046661376953125,
0.033233642578125,
0.043853759765625,
-0.01611328125,
0.0161285400390625,
0.027587890625,
-0.0005412101745605469,
0.0102996826171875,
0.0005350112915039062,
0.0073394775390625,
0.02972412109375,
0.033538818359375,
0.036224365234375,
0.00457763671875,
0.01535797119140625,
0.0115509033203125,
0.01557159423828125,
0.006313323974609375,
0.02142333984375,
-0.0158538818359375,
0.0162506103515625,
-0.01222991943359375,
-0.0194091796875,
0.0008869171142578125,
-0.0274658203125,
0.03912353515625,
-0.0135955810546875,
-0.0225067138671875,
-0.00536346435546875,
-0.04638671875,
0.0025615692138671875,
0.050628662109375,
-0.01152801513671875,
-0.020477294921875,
0.00859832763671875,
0.03363037109375,
-0.003269195556640625,
0.010498046875,
-0.0032215118408203125,
0.0028476715087890625,
0.0161285400390625,
0.0013294219970703125,
0.03424072265625,
0.0535888671875,
0.0014104843139648438,
0.0160369873046875,
-0.04241943359375,
-0.0240478515625,
-0.00429534912109375,
-0.01207733154296875,
-0.0352783203125,
0.0267791748046875,
-0.0278778076171875,
-0.0007872581481933594,
-0.0014562606811523438,
-0.01358795166015625,
0.02093505859375,
0.01512908935546875,
0.0030803680419921875,
0.00823211669921875,
0.01358795166015625,
0.043182373046875,
0.01142120361328125,
0.01275634765625,
-0.05975341796875,
-0.01788330078125,
0.056640625,
0.004520416259765625,
0.01222991943359375,
-0.025360107421875,
-0.039276123046875,
-0.047882080078125,
0.0117340087890625,
0.0264892578125,
-0.0029010772705078125,
-0.00870513916015625,
-0.05169677734375,
0.0268402099609375,
0.0120849609375,
-0.011505126953125,
-0.034210205078125,
0.018829345703125,
-0.030487060546875,
0.053802490234375,
-0.043853759765625,
0.036102294921875,
-0.005859375,
0.003681182861328125,
-0.03875732421875,
0.0374755859375,
-0.0005311965942382812,
-0.00885772705078125,
0.0435791015625,
0.00959014892578125,
0.03338623046875,
-0.038482666015625,
-0.050140380859375,
-0.00983428955078125,
0.0213165283203125,
0.0195770263671875,
0.056488037109375,
-0.024017333984375,
0.00902557373046875,
-0.020477294921875,
0.01136016845703125,
-0.0277862548828125,
0.0121612548828125,
-0.07330322265625,
-0.022735595703125,
-0.0217742919921875,
0.0010623931884765625,
0.01065826416015625,
-0.037139892578125,
-0.06329345703125,
0.06488037109375,
-0.0084991455078125,
-0.018341064453125,
-0.03631591796875,
-0.00804901123046875,
-0.022613525390625,
0.00969696044921875,
-0.01177978515625,
-0.0157012939453125,
0.005100250244140625,
0.0584716796875,
-0.0038318634033203125,
0.039306640625,
0.030853271484375,
-0.0219879150390625,
-0.0416259765625,
-0.0267333984375,
-0.027099609375,
0.0051727294921875,
0.04510498046875,
-0.0299224853515625,
0.035186767578125,
0.037109375,
-0.0372314453125,
-0.08074951171875,
-0.04742431640625,
-0.0570068359375,
-0.0037059783935546875,
-0.0309600830078125,
-0.025238037109375,
-0.00885772705078125,
0.06854248046875,
0.05950927734375,
0.020355224609375,
-0.039031982421875,
-0.0193023681640625,
-0.059051513671875,
-0.028961181640625,
-0.0028228759765625,
0.0296478271484375,
-0.06292724609375,
0.0272064208984375,
0.003620147705078125,
-0.00907135009765625,
-0.03375244140625,
0.0251312255859375,
-0.0281524658203125,
-0.0158538818359375,
0.0281982421875,
0.012847900390625,
-0.03350830078125,
-0.0253753662109375,
0.047149658203125,
-0.03216552734375,
-0.00970458984375,
-0.0052947998046875,
0.0225830078125,
-0.0012874603271484375,
-0.01290130615234375,
-0.01399993896484375,
0.007595062255859375,
-0.05291748046875,
-0.004062652587890625,
-0.0074615478515625,
0.032379150390625,
-0.025848388671875,
-0.0201263427734375,
-0.0230560302734375,
0.0267333984375,
0.00989532470703125,
0.02569580078125,
-0.036102294921875,
0.046783447265625,
0.01448822021484375,
0.0679931640625,
0.01520538330078125,
0.09552001953125,
0.0220489501953125,
0.037017822265625,
0.0166168212890625,
-0.02972412109375,
0.02423095703125,
-0.0390625,
-0.01554107666015625,
-0.0017719268798828125,
-0.0482177734375,
-0.09600830078125,
0.053924560546875,
-0.0251617431640625,
0.004573822021484375,
0.0386962890625
]
|
e774c2ac40cfad3fd70fabe2dbcb46c57cec6fa2 | Wordpress Stackexchange
Q: Can we load "load_theme_textdomain" multiple times with different domains? Supposing that I have two domains in my theme named "basic" and "advance".
Is it possible to load two different domains in my theme?
load_theme_textdomain( 'basic', TEMPLATEPATH.'/languages' );
load_theme_textdomain( 'advance', TEMPLATEPATH.'/languages' );
A: If you're creating this theme or plugin for inclusion in the official plugin or theme directories on WordPress.org, then you need to use the plugin or theme's slug as the text-domain. You cannot have multiple text domains, and the text domain cannot be anything other than the slug of the plugin or theme.
This is due to the new language pack support coming in 3.7. The language pack system will use the slug for the text domain, and won't work with anything else there.
| Q: Can we load "load_theme_textdomain" multiple times with different domains? Supposing that I have two domains in my theme named "basic" and "advance".
Is it possible to load two different domains in my theme?
load_theme_textdomain( 'basic', TEMPLATEPATH.'/languages' );
load_theme_textdomain( 'advance', TEMPLATEPATH.'/languages' );
A: If you're creating this theme or plugin for inclusion in the official plugin or theme directories on WordPress.org, then you need to use the plugin or theme's slug as the text-domain. You cannot have multiple text domains, and the text domain cannot be anything other than the slug of the plugin or theme.
This is due to the new language pack support coming in 3.7. The language pack system will use the slug for the text domain, and won't work with anything else there.
A: You certainly can.. however, you cannot use two separate language translations on a single text string.
For example, let's consider we have this text string somewhere on our page:
Hello World!
Now, if we want to set that up for language localization, here is what we do:
<?php _e('Hello World!', 'my_language_localization'); ?>
In your case, it could be either:
<?php _e('Hello World!', 'basic'); ?>
Or,
<?php _e('Hello World!', 'advance'); ?>
But, it is not possible to translate the single string into two localizations.
Also, when using a localization name; make it something unique so that it does not clash with other plugins/themes.
A: Note that if you put your mo-files inside your theme’s directory, the same mo-file will be loaded for every theme textdomain. That is because a theme mo-file is based solely on the locale. For example:
load_theme_textdomain( 'basic', get_template_directory() . '/languages' );
load_theme_textdomain( 'advance', get_template_directory() . '/languages' );
load_theme_textdomain( 'whatever', get_template_directory() . '/languages' );
Given that “en_US” is your WPLANG locale, the code above will load wp-content/themes/your-theme/languages/en_US.mo three times! Bad because having the same mo-file imported multiple times only causes superfluous work. In that case you’re better off using a single theme domain.
However, if the wp-content/themes/your-theme/languages/en_US.mo does not exist, WordPress will have a look in the subdirectory “themes” of the default language directory and in that case it does take the domain into account as part of the filename. You can learn all that from a quick look at the load_theme_textdomain() function:
function load_theme_textdomain( $domain, $path = false ) {
$locale = apply_filters( 'theme_locale', get_locale(), $domain );
if ( ! $path )
$path = get_template_directory();
// Load the textdomain from the Theme provided location, or theme directory first
$mofile = "{$path}/{$locale}.mo";
if ( $loaded = load_textdomain($domain, $mofile) )
return $loaded;
// Else, load textdomain from the Language directory
$mofile = WP_LANG_DIR . "/themes/{$domain}-{$locale}.mo";
return load_textdomain($domain, $mofile);
}
A: Since Wordpress 4, I suggest you create a simple plugin and "only" load the needed text domain. All strings in your Theme folders or templates or everywhere will be translated. Example:
<?php
/*
Plugin Name: UA Translation UA Tiny select
Description: Translation for Theme templates outside the main text domain
Version: 1.0
Author: Jonas Lundman
Author URI: http://lundman.info
Text Domain: ua-tiny-select
Domain Path: /languages/
*/
// Updated 2015 04 22 (21:00)
function ua_load_plugin_textdomain_tiny_select() {
load_plugin_textdomain( 'ua-tiny-select', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
}
add_action( 'plugins_loaded', 'ua_load_plugin_textdomain_tiny_select');
?>
Works great for custom changes in woocommerce template files or Buddypress template files in your main domain Theme!
Remember to give the mo and po files the slug, in my case above:
languages/ua-tiny-select-sv_SE.mo
And the folder Languages goes in your plugin folder
| wordpress | {
"language": "en",
"length": 571,
"provenance": "stackexchange_00019.jsonl.gz:438377",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119452"
} | [
0.04486083984375,
-0.026458740234375,
0.01351165771484375,
-0.0751953125,
-0.0234832763671875,
0.0000718235969543457,
-0.0026092529296875,
0.031402587890625,
-0.0221710205078125,
0.047027587890625,
-0.006275177001953125,
0.03216552734375,
-0.0222625732421875,
0.004772186279296875,
-0.026336669921875,
-0.00508880615234375,
0.00315093994140625,
-0.006328582763671875,
-0.00720977783203125,
-0.035430908203125,
0.01488494873046875,
-0.0333251953125,
-0.009490966796875,
0.0667724609375,
0.023468017578125,
-0.054168701171875,
0.10296630859375,
-0.03717041015625,
0.0167083740234375,
-0.0335693359375,
0.033935546875,
0.01250457763671875,
0.00897216796875,
0.0101318359375,
-0.0065460205078125,
-0.02001953125,
0.0043792724609375,
-0.0022983551025390625,
-0.00760650634765625,
0.0311126708984375,
0.0119171142578125,
0.00882720947265625,
0.039459228515625,
0.096923828125,
0.00830078125,
-0.07470703125,
0.0289154052734375,
-0.09051513671875,
0.0165557861328125,
0.006580352783203125,
0.023712158203125,
0.00926971435546875,
0.02496337890625,
-0.0017709732055664062,
-0.0111236572265625,
-0.0042266845703125,
-0.056732177734375,
0.042724609375,
0.0171051025390625,
0.01450347900390625,
-0.018463134765625,
-0.007904052734375,
0.008270263671875,
-0.00592041015625,
-0.021728515625,
-0.0003821849822998047,
-0.0211029052734375,
0.019317626953125,
-0.0238189697265625,
-0.00388336181640625,
0.0089111328125,
-0.0234832763671875,
0.026611328125,
-0.0333251953125,
-0.01293182373046875,
0.01264190673828125,
-0.029022216796875,
-0.0239410400390625,
0.05157470703125,
-0.02593994140625,
-0.0283660888671875,
-0.042266845703125,
-0.048126220703125,
0.0149688720703125,
-0.0167388916015625,
0.055755615234375,
-0.022735595703125,
-0.0158843994140625,
-0.031524658203125,
-0.0164947509765625,
-0.02020263671875,
-0.02996826171875,
-0.021759033203125,
0.01715087890625,
-0.0235443115234375,
0.00531005859375,
0.017486572265625,
0.03558349609375,
-0.0026302337646484375,
0.003162384033203125,
-0.0015726089477539062,
-0.03741455078125,
0.02813720703125,
-0.02410888671875,
-0.007526397705078125,
0.046173095703125,
0.00930023193359375,
0.0203094482421875,
0.0235748291015625,
0.016845703125,
0.0177001953125,
0.02178955078125,
0.0283203125,
0.00437164306640625,
-0.0203399658203125,
-0.0286712646484375,
-0.03466796875,
0.041229248046875,
-0.01214599609375,
0.03143310546875,
0.0165557861328125,
0.04345703125,
0.01479339599609375,
-0.0286712646484375,
-0.053741455078125,
-0.05474853515625,
-0.019439697265625,
-0.040863037109375,
0.01654052734375,
0.018035888671875,
-0.00467681884765625,
-0.005115509033203125,
-0.0298919677734375,
0.004444122314453125,
-0.019683837890625,
0.001056671142578125,
-0.01120758056640625,
0.0115509033203125,
0.009124755859375,
-0.014373779296875,
0.04180908203125,
-0.033782958984375,
-0.005451202392578125,
0.0306854248046875,
-0.0626220703125,
-0.0113525390625,
0.01275634765625,
0.037567138671875,
-0.03106689453125,
-0.0654296875,
0.01372528076171875,
-0.028045654296875,
0.04296875,
0.01507568359375,
-0.025604248046875,
-0.0391845703125,
0.004791259765625,
-0.0239105224609375,
0.0010747909545898438,
-0.043853759765625,
-0.040771484375,
-0.0225067138671875,
-0.0019969940185546875,
-0.04656982421875,
-0.056427001953125,
0.01702880859375,
0.01212310791015625,
0.00743865966796875,
0.02398681640625,
-0.0538330078125,
0.033660888671875,
0.0086517333984375,
0.05108642578125,
0.00064849853515625,
0.01788330078125,
0.02703857421875,
0.038909912109375,
0.0299835205078125,
-0.0125579833984375,
0.058258056640625,
-0.00016129016876220703,
-0.03875732421875,
0.06756591796875,
-0.038360595703125,
-0.04864501953125,
0.02362060546875,
-0.01055145263671875,
0.0579833984375,
0.01192474365234375,
0.0209808349609375,
-0.017120361328125,
-0.0072479248046875,
-0.022491455078125,
-0.012908935546875,
-0.022247314453125,
0.0010557174682617188,
-0.0156707763671875,
0.02227783203125,
-0.015716552734375,
0.00170135498046875,
0.0032672882080078125,
-0.023162841796875,
0.0189361572265625,
0.0069580078125,
0.0011949539184570312,
-0.00893402099609375,
0.001224517822265625,
0.00844573974609375,
0.039794921875,
0.02032470703125,
-0.007381439208984375,
0.0144195556640625,
-0.0226287841796875,
0.0015745162963867188,
-0.046783447265625,
0.025848388671875,
-0.009033203125,
0.033538818359375,
0.0005869865417480469,
0.00513458251953125,
0.022369384765625,
-0.0250701904296875,
0.00754547119140625,
0.031951904296875,
0.0003123283386230469,
0.01328277587890625,
-0.02227783203125,
-0.01593017578125,
0.0033435821533203125,
-0.00238037109375,
0.0035037994384765625,
0.033660888671875,
0.043365478515625,
0.054473876953125,
-0.0063323974609375,
0.01465606689453125,
0.012603759765625,
-0.036590576171875,
0.00411224365234375,
0.0294036865234375,
0.04058837890625,
0.023101806640625,
-0.0266265869140625,
-0.03094482421875,
0.019134521484375,
-0.07147216796875,
-0.0081024169921875,
-0.0228729248046875,
0.0330810546875,
0.08221435546875,
-0.0255279541015625,
0.01042938232421875,
0.0226287841796875,
-0.0285797119140625,
-0.006603240966796875,
0.05670166015625,
0.0015916824340820312,
-0.032440185546875,
-0.00548553466796875,
0.0027065277099609375,
0.0193328857421875,
0.0037899017333984375,
-0.0264892578125,
0.017303466796875,
-0.0028839111328125,
0.0024204254150390625,
-0.01194000244140625,
-0.004917144775390625,
-0.0225677490234375,
-0.0046539306640625,
0.01861572265625,
-0.0224456787109375,
-0.0162506103515625,
0.01297760009765625,
-0.015594482421875,
-0.00293731689453125,
0.01149749755859375,
0.023590087890625,
-0.051971435546875,
-0.0168914794921875,
-0.02362060546875,
0.0029621124267578125,
-0.032379150390625,
-0.004467010498046875,
-0.0168304443359375,
-0.05792236328125,
0.01021575927734375,
0.01568603515625,
0.036468505859375,
-0.0017881393432617188,
-0.01174163818359375,
0.0621337890625,
-0.004924774169921875,
0.07257080078125,
0.0150909423828125,
-0.0240631103515625,
0.07562255859375,
-0.0157623291015625,
0.017578125,
-0.01129150390625,
0.03729248046875,
0.040924072265625,
0.00815582275390625,
-0.0340576171875,
0.0041961669921875,
-0.01104736328125,
0.0265350341796875,
0.0112152099609375,
0.0016126632690429688,
-0.0198974609375,
-0.051483154296875,
-0.002246856689453125,
0.0167388916015625,
0.001163482666015625,
0.006191253662109375,
-0.01220703125,
-0.0014905929565429688,
0.01334381103515625,
-0.07928466796875,
-0.05780029296875,
0.005523681640625,
-0.0191497802734375,
0.054840087890625,
-0.0016832351684570312,
0.0005249977111816406,
-0.0474853515625,
0.0159759521484375,
0.01021575927734375,
0.034912109375,
-0.064208984375,
-0.053619384765625,
-0.04510498046875,
-0.061859130859375,
-0.029754638671875,
0.00830841064453125,
-0.00983428955078125,
0.0066986083984375,
0.0155181884765625,
-0.01021575927734375,
-0.00823211669921875,
0.0131378173828125,
0.060089111328125,
0.0170440673828125,
-0.0217437744140625,
-0.0279388427734375,
-0.01399993896484375,
0.028472900390625,
-0.0014743804931640625,
0.00799560546875,
0.01049041748046875,
0.0126800537109375,
0.005634307861328125,
0.025909423828125,
0.004154205322265625,
0.039794921875,
-0.0104522705078125,
-0.030670166015625,
0.005985260009765625,
0.012054443359375,
-0.05023193359375,
-0.04534912109375,
0.0017175674438476562,
-0.057861328125,
-0.01218414306640625,
0.033843994140625,
-0.006603240966796875,
-0.0003573894500732422,
-0.0072174072265625,
-0.0015783309936523438,
0.0004949569702148438,
0.0100555419921875,
-0.0391845703125,
0.038543701171875,
-0.0126800537109375,
0.003757476806640625,
-0.019866943359375,
0.0289154052734375,
-0.028045654296875,
-0.0306396484375,
-0.0115966796875,
0.006191253662109375,
-0.0216827392578125,
-0.001438140869140625,
-0.029022216796875,
-0.05023193359375,
0.044525146484375,
-0.0364990234375,
-0.0295257568359375,
-0.028106689453125,
-0.020538330078125,
-0.0148468017578125,
0.056793212890625,
-0.09197998046875,
0.00273895263671875,
0.033721923828125,
0.049468994140625,
-0.041595458984375,
-0.040863037109375,
-0.059539794921875,
-0.01390838623046875,
-0.00736236572265625,
-0.007083892822265625,
-0.0049591064453125,
-0.0015716552734375,
-0.0185546875,
0.033843994140625,
0.0263519287109375,
-0.026580810546875,
0.03863525390625,
-0.0263519287109375,
0.0226287841796875,
0.005115509033203125,
0.0058441162109375,
-0.0008077621459960938,
-0.0238494873046875,
-0.0222625732421875,
-0.05572509765625,
-0.00986480712890625,
-0.0101165771484375,
0.0465087890625,
0.0175323486328125,
-0.0251312255859375,
0.0250091552734375,
0.05279541015625,
0.00830078125,
0.0810546875,
-0.01129913330078125,
-0.0005092620849609375,
0.0302886962890625,
0.005779266357421875,
0.02691650390625,
-0.005832672119140625,
-0.01415252685546875,
-0.0166015625,
-0.0263671875,
0.0081939697265625,
-0.018096923828125,
-0.0129241943359375,
0.00295257568359375,
-0.021759033203125,
-0.037353515625,
-0.0011873245239257812,
-0.0021514892578125,
-0.03179931640625,
0.01690673828125,
-0.0313720703125,
0.031646728515625,
-0.01451873779296875,
0.0526123046875,
0.003658294677734375,
-0.0087127685546875,
0.0006122589111328125,
0.06512451171875,
0.022216796875,
-0.02862548828125,
-0.025299072265625,
0.0192413330078125,
0.0457763671875,
0.037261962890625,
0.0175018310546875,
-0.00035834312438964844,
-0.039337158203125,
0.050445556640625,
0.033721923828125,
-0.010650634765625,
0.0186920166015625,
0.01372528076171875,
0.0202178955078125,
-0.0215301513671875,
0.00460052490234375,
0.018096923828125,
-0.00862884521484375,
0.04998779296875,
-0.01202392578125,
-0.0204010009765625,
-0.06097412109375,
0.021240234375,
-0.0023250579833984375,
0.03515625,
-0.056610107421875,
-0.0223388671875,
0.00392913818359375,
0.0328369140625,
0.0123443603515625,
-0.004222869873046875,
0.01457977294921875,
-0.01174163818359375,
0.016204833984375,
-0.00730133056640625,
0.034393310546875,
-0.00040221214294433594,
0.01425933837890625,
-0.007152557373046875,
0.076904296875,
-0.01395416259765625,
0.00809478759765625,
-0.004703521728515625,
0.056488037109375,
-0.0169525146484375,
-0.054962158203125,
-0.0221710205078125,
0.0180511474609375,
0.04522705078125,
0.05133056640625,
0.015838623046875,
0.0147705078125,
-0.023895263671875,
-0.011993408203125,
0.01302337646484375,
0.0638427734375,
-0.07086181640625,
-0.0148773193359375,
0.0204925537109375,
0.0037097930908203125,
-0.0222015380859375,
-0.0222930908203125,
0.038116455078125,
-0.030517578125,
0.01373291015625,
-0.00017654895782470703,
-0.005706787109375,
0.028045654296875,
0.043914794921875,
0.0191497802734375,
-0.021392822265625,
-0.02197265625,
0.059661865234375,
0.0164642333984375,
-0.03094482421875,
0.039276123046875,
0.058349609375,
0.053955078125,
-0.0175933837890625,
-0.04913330078125,
-0.01049041748046875,
-0.0650634765625,
-0.0158843994140625,
0.016143798828125,
0.002193450927734375,
-0.033416748046875,
-0.024566650390625,
0.0225067138671875,
0.015777587890625,
0.014923095703125,
0.01111602783203125,
-0.0214080810546875,
0.0037288665771484375,
-0.015655517578125,
0.0213775634765625,
-0.0433349609375,
-0.00525665283203125,
0.0037250518798828125,
-0.0158538818359375,
-0.00476837158203125,
0.00255584716796875,
-0.058685302734375,
-0.0167083740234375,
-0.0176544189453125,
-0.00449371337890625,
0.038543701171875,
-0.00676727294921875,
0.01229095458984375,
-0.029876708984375,
-0.00792694091796875,
-0.0158233642578125,
0.0059814453125,
0.048919677734375,
0.002262115478515625,
-0.04132080078125,
0.0209808349609375,
-0.043487548828125,
-0.001583099365234375,
-0.026580810546875,
-0.060150146484375,
-0.037078857421875,
-0.01079559326171875,
0.017730712890625,
0.04632568359375,
-0.032196044921875,
-0.045196533203125,
0.0186767578125,
-0.019927978515625,
-0.0018215179443359375,
0.044342041015625,
-0.00946044921875,
0.0296630859375,
0.01290130615234375,
0.01038360595703125,
0.0265960693359375,
0.0285186767578125,
0.0276947021484375,
-0.046295166015625,
-0.020355224609375,
-0.0938720703125,
-0.00644683837890625,
0.042999267578125,
-0.01395416259765625,
0.0435791015625,
0.002185821533203125,
0.0178070068359375,
0.0254058837890625,
-0.03936767578125,
0.004489898681640625,
-0.023590087890625,
0.020965576171875,
-0.062347412109375,
-0.01172637939453125,
0.0196075439453125,
-0.022186279296875,
0.0182037353515625,
-0.006671905517578125,
-0.011077880859375,
0.04541015625,
-0.0223846435546875,
0.0275726318359375,
0.041290283203125,
-0.047393798828125,
0.0210418701171875,
-0.0227203369140625,
-0.025115966796875,
0.01334381103515625,
-0.0028972625732421875,
0.02056884765625,
0.04876708984375,
-0.003215789794921875,
-0.037811279296875,
0.0110321044921875,
0.0033359527587890625,
-0.00449371337890625,
0.0032196044921875,
0.0012731552124023438,
-0.0004944801330566406,
-0.0117645263671875,
0.0479736328125,
0.0584716796875,
-0.08135986328125,
-0.00638580322265625,
0.024261474609375,
-0.01427459716796875,
-0.032440185546875,
-0.0259857177734375,
0.00995635986328125,
0.01617431640625,
0.02301025390625,
0.036041259765625,
-0.00640106201171875,
0.0218048095703125,
0.02447509765625,
-0.01934814453125,
0.0202789306640625,
-0.015594482421875,
0.02972412109375,
-0.0014600753784179688,
0.005672454833984375,
0.020263671875,
0.005870819091796875,
-0.025115966796875,
-0.019195556640625,
0.0257415771484375,
-0.0391845703125,
-0.05938720703125,
0.01186370849609375,
-0.021942138671875,
0.01262664794921875,
-0.0128631591796875,
-0.0129852294921875,
0.05987548828125,
0.03741455078125,
-0.022430419921875,
-0.018310546875,
0.0216217041015625,
0.008575439453125,
0.026947021484375,
-0.00388336181640625,
0.01183319091796875,
-0.01517486572265625,
-0.01294708251953125,
-0.00548553466796875,
-0.03326416015625,
-0.0080108642578125,
-0.0208892822265625,
-0.04296875,
-0.00870513916015625,
0.0155181884765625,
-0.0178985595703125,
0.033111572265625,
0.0224609375,
-0.0139617919921875,
0.0024318695068359375,
0.033599853515625,
-0.050994873046875,
-0.033721923828125,
0.00931549072265625,
-0.043426513671875,
-0.029632568359375,
-0.01355743408203125,
-0.1138916015625,
0.1572265625,
0.043487548828125,
0.095947265625,
-0.0088958740234375,
0.048065185546875,
-0.0162811279296875,
0.02130126953125,
0.00801849365234375,
0.0234527587890625,
0.0212249755859375,
-0.029754638671875,
0.00428009033203125,
-0.005619049072265625,
0.0006256103515625,
0.0105133056640625,
0.00038933753967285156,
0.0124969482421875,
-0.02313232421875,
0.0108795166015625,
0.03570556640625,
0.023956298828125,
-0.01418304443359375,
0.0262603759765625,
-0.00707244873046875,
0.0171356201171875,
-0.0101470947265625,
-0.0226898193359375,
0.006317138671875,
-0.0447998046875,
-0.04345703125,
0.0162353515625,
0.00992584228515625,
-0.004840850830078125,
0.010162353515625,
-0.04205322265625,
-0.06658935546875,
0.01214599609375,
0.02789306640625,
0.0188751220703125,
0.01092529296875,
0.0139312744140625,
0.01128387451171875,
-0.013214111328125,
0.06976318359375,
-0.04180908203125,
0.0546875,
-0.00901031494140625,
-0.007778167724609375,
0.0350341796875,
0.0144500732421875,
0.0198822021484375,
0.004657745361328125,
-0.002918243408203125,
0.00511932373046875,
0.00811767578125,
0.032562255859375,
0.0006175041198730469,
0.023681640625,
-0.03045654296875,
0.0263519287109375,
0.022613525390625,
0.03961181640625,
-0.035430908203125,
-0.03973388671875,
-0.0003402233123779297,
-0.0213470458984375,
0.02685546875,
-0.0211029052734375,
0.0225830078125,
-0.0044097900390625,
-0.0017671585083007812,
-0.00470733642578125,
-0.0262451171875,
0.0200042724609375,
-0.0263519287109375,
-0.0009946823120117188,
-0.0011339187622070312,
0.054351806640625,
0.0148773193359375,
-0.06561279296875,
0.03851318359375,
0.0111236572265625,
0.08648681640625,
-0.0029964447021484375,
0.0841064453125,
-0.04156494140625,
-0.038543701171875,
-0.0155181884765625,
0.0304107666015625,
-0.0198974609375,
0.0257110595703125,
-0.05706787109375,
-0.06024169921875,
-0.01279449462890625,
0.057342529296875,
0.041412353515625,
0.031951904296875,
0.06854248046875,
0.06439208984375,
-0.01177978515625,
0.01375579833984375,
0.0433349609375,
0.004993438720703125,
0.040985107421875,
-0.042816162109375,
0.00917816162109375,
-0.007053375244140625,
-0.0220489501953125,
-0.033172607421875,
-0.046783447265625,
0.036376953125,
-0.003276824951171875,
-0.00662994384765625,
0.002628326416015625,
-0.0181427001953125,
-0.0026760101318359375,
-0.0204620361328125,
-0.00885772705078125,
0.0104827880859375,
-0.07037353515625,
-0.0233306884765625,
-0.02789306640625,
-0.0271148681640625,
0.030914306640625,
0.045440673828125,
-0.01690673828125,
0.016326904296875,
0.06695556640625,
-0.0261993408203125,
-0.0226898193359375,
0.0031490325927734375,
0.053253173828125,
-0.00550079345703125,
-0.0113525390625,
0.039031982421875,
-0.0419921875,
-0.0143585205078125,
0.033660888671875,
-0.004009246826171875,
-0.0218048095703125,
0.01776123046875,
0.027099609375,
-0.0237884521484375,
0.0243377685546875,
0.01526641845703125,
0.01126861572265625,
0.0179443359375,
-0.0180206298828125,
0.0083770751953125,
0.0343017578125,
-0.0093841552734375,
-0.03363037109375,
0.02850341796875,
-0.01016998291015625,
-0.01418304443359375,
0.03387451171875,
-0.0304412841796875,
0.0091400146484375,
-0.0002655982971191406,
0.06195068359375,
-0.0230712890625,
-0.0772705078125,
-0.08880615234375,
0.03106689453125,
0.025909423828125,
0.032379150390625,
-0.0687255859375,
0.0185394287109375,
-0.0130462646484375,
-0.00736236572265625,
0.021942138671875,
-0.018798828125,
-0.01456451416015625,
-0.002033233642578125,
0.027587890625,
-0.020477294921875,
0.062042236328125,
-0.005168914794921875,
0.043792724609375,
-0.0086822509765625,
0.099609375,
0.0236053466796875,
-0.0109100341796875,
0.046722412109375,
-0.0225982666015625,
0.026031494140625,
-0.01386260986328125,
-0.0007958412170410156,
-0.007061004638671875,
0.022705078125,
0.014404296875,
-0.041900634765625,
-0.00909423828125,
-0.027435302734375,
-0.00672149658203125,
0.0192413330078125,
-0.0058441162109375,
0.004795074462890625,
0.01055908203125,
-0.00971221923828125,
0.01235198974609375,
0.0150604248046875,
-0.055145263671875,
0.03887939453125,
-0.00905609130859375,
0.0192718505859375,
-0.0153961181640625,
-0.031646728515625,
-0.004058837890625,
-0.015655517578125,
-0.027801513671875,
-0.031982421875,
-0.035064697265625,
0.0216217041015625,
-0.0283966064453125,
0.005092620849609375,
0.005916595458984375,
0.00038814544677734375,
-0.016937255859375,
0.02923583984375,
-0.0179595947265625,
0.064697265625,
-0.030487060546875,
0.01398468017578125,
0.06536865234375,
-0.00806427001953125,
-0.06280517578125,
-0.10150146484375,
0.0026683807373046875,
-0.048370361328125,
0.0185394287109375,
-0.03118896484375,
0.006778717041015625,
0.0093536376953125,
-0.042694091796875,
-0.04119873046875,
0.07855224609375,
-0.0106048583984375,
-0.0237274169921875,
-0.068359375,
-0.01296234130859375,
-0.0005068778991699219,
0.045379638671875,
-0.003574371337890625,
-0.036529541015625,
-0.04803466796875,
0.057525634765625,
-0.0004208087921142578,
0.02935791015625,
-0.0031871795654296875,
0.032073974609375,
-0.006809234619140625,
0.0272979736328125,
0.01120758056640625,
-0.032684326171875,
0.03436279296875,
-0.00980377197265625,
0.024627685546875,
0.0584716796875,
-0.033599853515625,
0.0038776397705078125,
-0.0286865234375,
-0.01149749755859375,
-0.0162200927734375,
-0.0804443359375,
-0.0048828125,
-0.02593994140625,
0.0631103515625,
0.00934600830078125,
0.006664276123046875,
-0.01145172119140625,
-0.047149658203125,
-0.03363037109375,
-0.0018825531005859375,
-0.0020503997802734375,
0.020751953125,
-0.090576171875,
0.0022830963134765625,
0.033050537109375,
-0.00820159912109375,
0.08135986328125,
-0.033447265625,
0.0016851425170898438,
0.01169586181640625,
0.0288238525390625,
-0.00006818771362304688,
-0.084228515625,
-0.0200958251953125,
0.0611572265625,
-0.035186767578125,
0.00146484375,
-0.004302978515625,
0.034637451171875,
0.0218505859375,
-0.0129852294921875,
0.040679931640625,
-0.0128021240234375,
-0.0240020751953125,
0.0028057098388671875,
0.0214080810546875,
0.03155517578125,
0.0052947998046875,
-0.07025146484375,
-0.027923583984375,
-0.0124969482421875,
0.01096343994140625,
-0.01318359375,
-0.007080078125,
0.0038928985595703125,
0.007709503173828125,
0.00689697265625,
-0.01430511474609375,
0.0226898193359375,
-0.0114593505859375,
0.0137939453125,
-0.056121826171875,
0.0309600830078125,
-0.0433349609375,
0.0009908676147460938,
0.0007801055908203125,
0.0341796875,
-0.0233001708984375,
-0.0285186767578125,
0.0202484130859375,
-0.0008406639099121094,
0.02130126953125,
0.01076507568359375
]
|
1c75fb3ae7a421b1671108707448219d3209c13c | Wordpress Stackexchange
Q: How do I change the value of lang=en-US I have noticed that in the <html> tag on my WP site that the language is defined as US English.
<html lang="en-US" prefix="og: http://ogp.me/ns#">
I would like to change it to British English en-GB but I'm not sure of the best way.
I dug around and found language_attributes() in general-template.php which makes a call to get_bloginfo('language'). I could manually insert the value here but that doesn't seem like the best way to do it.
What is the proper way to change this value?
A: The value for that string is normally taken from the option WPLANG in your database table $prefix_options. You can set it in the backend under Settings/General (wp-admin/options-general.php) or per SQL.
There several ways to change that value per PHP:
*
*Create a global variable $locale in your wp-config.php:
$locale = 'en_GB';
*Declare the constant WPLANG in your wp-config.php:
define( 'WPLANG', 'en_GB' );
This has been deprecated, but it'll still work.
*Filter locale:
add_filter( 'locale', function() {
return 'en_GB';
});
This a very flexible way, because you can add more conditions to that function, for example check the current site ID in a multisite.
| Q: How do I change the value of lang=en-US I have noticed that in the <html> tag on my WP site that the language is defined as US English.
<html lang="en-US" prefix="og: http://ogp.me/ns#">
I would like to change it to British English en-GB but I'm not sure of the best way.
I dug around and found language_attributes() in general-template.php which makes a call to get_bloginfo('language'). I could manually insert the value here but that doesn't seem like the best way to do it.
What is the proper way to change this value?
A: The value for that string is normally taken from the option WPLANG in your database table $prefix_options. You can set it in the backend under Settings/General (wp-admin/options-general.php) or per SQL.
There several ways to change that value per PHP:
*
*Create a global variable $locale in your wp-config.php:
$locale = 'en_GB';
*Declare the constant WPLANG in your wp-config.php:
define( 'WPLANG', 'en_GB' );
This has been deprecated, but it'll still work.
*Filter locale:
add_filter( 'locale', function() {
return 'en_GB';
});
This a very flexible way, because you can add more conditions to that function, for example check the current site ID in a multisite.
A: As for recent version of WordPress 4+ the solution provided here is deprecated, please check my answer here for more details
https://stackoverflow.com/a/37571439/1358670
| wordpress | {
"language": "en",
"length": 219,
"provenance": "stackexchange_00019.jsonl.gz:438389",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119495"
} | [
0.0171356201171875,
0.01517486572265625,
-0.0168914794921875,
-0.00348663330078125,
0.0237884521484375,
-0.0301971435546875,
0.03863525390625,
-0.02410888671875,
0.042236328125,
-0.0007734298706054688,
0.00640869140625,
-0.0183868408203125,
-0.0094146728515625,
-0.04833984375,
0.011932373046875,
-0.0025272369384765625,
0.0213775634765625,
-0.0257415771484375,
-0.00972747802734375,
-0.0132293701171875,
0.0024127960205078125,
-0.00836944580078125,
0.004917144775390625,
0.004032135009765625,
0.06097412109375,
-0.0980224609375,
0.0714111328125,
-0.047760009765625,
0.0379638671875,
-0.0248565673828125,
0.036468505859375,
0.00902557373046875,
0.0200042724609375,
0.01053619384765625,
-0.0421142578125,
-0.0628662109375,
0.0198211669921875,
-0.006374359130859375,
-0.0253753662109375,
0.036224365234375,
0.04095458984375,
-0.0247344970703125,
-0.03515625,
0.07440185546875,
-0.0172882080078125,
-0.06097412109375,
0.036773681640625,
-0.032318115234375,
-0.0083160400390625,
0.021575927734375,
0.044403076171875,
-0.00658416748046875,
0.041748046875,
-0.0328369140625,
-0.00518798828125,
0.003448486328125,
-0.0634765625,
0.051055908203125,
0.00803375244140625,
0.021820068359375,
0.00649261474609375,
0.01995849609375,
-0.004894256591796875,
0.019775390625,
0.0017118453979492188,
-0.0104827880859375,
0.017974853515625,
0.01122283935546875,
-0.0290985107421875,
-0.019927978515625,
0.0284271240234375,
-0.00959014892578125,
0.00199127197265625,
-0.0396728515625,
0.0049285888671875,
0.018524169921875,
-0.03741455078125,
-0.038604736328125,
0.03564453125,
-0.0167236328125,
0.04290771484375,
-0.00962066650390625,
0.0067596435546875,
-0.0311126708984375,
0.0210113525390625,
-0.009307861328125,
0.00720977783203125,
-0.01180267333984375,
-0.049407958984375,
-0.0159759521484375,
-0.03582763671875,
0.002353668212890625,
-0.08416748046875,
0.0034580230712890625,
0.00362396240234375,
-0.0308837890625,
0.005062103271484375,
0.015899658203125,
-0.0158538818359375,
-0.0015163421630859375,
0.01544189453125,
-0.041259765625,
0.0158538818359375,
-0.01861572265625,
0.01360321044921875,
0.031280517578125,
-0.01496124267578125,
0.04791259765625,
0.049407958984375,
0.0311737060546875,
0.0247955322265625,
0.0072021484375,
-0.055023193359375,
-0.033203125,
-0.0243988037109375,
0.05352783203125,
-0.04083251953125,
-0.01824951171875,
-0.0038967132568359375,
-0.005115509033203125,
0.02301025390625,
0.04803466796875,
-0.00960540771484375,
-0.0290069580078125,
-0.0110321044921875,
-0.03460693359375,
-0.0167694091796875,
-0.0240936279296875,
-0.00909423828125,
0.030548095703125,
-0.02099609375,
-0.0030651092529296875,
0.00803375244140625,
0.037567138671875,
-0.0062408447265625,
-0.017608642578125,
0.056304931640625,
0.01059722900390625,
-0.0005278587341308594,
0.00878143310546875,
-0.005313873291015625,
0.0033702850341796875,
-0.0022449493408203125,
-0.0064697265625,
-0.01995849609375,
0.00009721517562866211,
0.0230560302734375,
0.04412841796875,
-0.0167694091796875,
-0.04168701171875,
0.049407958984375,
-0.006977081298828125,
0.03668212890625,
0.00628662109375,
-0.04833984375,
-0.0243072509765625,
0.007366180419921875,
-0.03411865234375,
-0.02056884765625,
-0.054718017578125,
-0.031280517578125,
-0.042236328125,
-0.0042724609375,
-0.05328369140625,
-0.059112548828125,
0.0482177734375,
-0.023101806640625,
-0.0011396408081054688,
0.0089263916015625,
-0.021148681640625,
-0.014007568359375,
0.03485107421875,
-0.003154754638671875,
0.00212860107421875,
0.017578125,
0.004108428955078125,
-0.06097412109375,
0.052337646484375,
0.0301361083984375,
0.0256805419921875,
0.05224609375,
-0.0157012939453125,
0.0721435546875,
0.043792724609375,
-0.036590576171875,
-0.03436279296875,
0.036376953125,
0.050506591796875,
0.018402099609375,
0.03253173828125,
0.03546142578125,
-0.01873779296875,
-0.04498291015625,
-0.012359619140625,
0.0195770263671875,
-0.0018167495727539062,
-0.00559234619140625,
-0.00402069091796875,
0.007503509521484375,
-0.006526947021484375,
0.0416259765625,
-0.015899658203125,
0.0252227783203125,
0.00604248046875,
-0.04620361328125,
0.01036834716796875,
-0.021881103515625,
0.0201873779296875,
0.0019445419311523438,
-0.0202789306640625,
0.00710296630859375,
-0.0114898681640625,
0.007053375244140625,
-0.032958984375,
-0.044097900390625,
0.024261474609375,
-0.0178680419921875,
0.0384521484375,
0.0217132568359375,
0.0150604248046875,
0.04931640625,
-0.0306549072265625,
0.034393310546875,
-0.005462646484375,
-0.003009796142578125,
-0.004436492919921875,
-0.004558563232421875,
0.0022449493408203125,
0.0092315673828125,
0.0185546875,
-0.0051422119140625,
0.004985809326171875,
-0.0029544830322265625,
0.0183258056640625,
0.00530242919921875,
0.006938934326171875,
0.011749267578125,
-0.06732177734375,
0.00795745849609375,
0.033416748046875,
0.03411865234375,
0.042938232421875,
0.0215301513671875,
0.0084381103515625,
0.07183837890625,
0.0008740425109863281,
0.027923583984375,
-0.0133819580078125,
0.0268096923828125,
0.042938232421875,
-0.04803466796875,
-0.018218994140625,
0.02923583984375,
-0.03704833984375,
-0.0016622543334960938,
0.04010009765625,
-0.039031982421875,
-0.077880859375,
0.04766845703125,
0.007213592529296875,
0.01357269287109375,
-0.0084686279296875,
-0.029327392578125,
0.019866943359375,
0.01392364501953125,
-0.049835205078125,
-0.005786895751953125,
-0.0256500244140625,
-0.007076263427734375,
-0.01708984375,
0.0352783203125,
-0.0234375,
-0.0004761219024658203,
-0.01221466064453125,
-0.03936767578125,
0.0182342529296875,
-0.0233306884765625,
0.0253753662109375,
-0.006748199462890625,
-0.0204925537109375,
-0.00267791748046875,
0.061279296875,
-0.0091552734375,
-0.0168914794921875,
-0.0238800048828125,
-0.0281982421875,
-0.01351165771484375,
0.002651214599609375,
-0.021575927734375,
-0.04058837890625,
-0.0008635520935058594,
-0.01470947265625,
-0.043701171875,
0.037322998046875,
-0.03302001953125,
-0.04998779296875,
0.0145111083984375,
-0.045013427734375,
0.0304107666015625,
-0.044708251953125,
0.0259246826171875,
0.05816650390625,
-0.0016813278198242188,
-0.005428314208984375,
0.005176544189453125,
-0.008819580078125,
-0.026214599609375,
0.00826263427734375,
-0.009063720703125,
0.0002161264419555664,
-0.0404052734375,
0.05908203125,
-0.01100921630859375,
-0.056365966796875,
-0.03851318359375,
-0.04241943359375,
-0.0699462890625,
-0.07183837890625,
-0.1082763671875,
-0.022491455078125,
-0.0260772705078125,
-0.0230560302734375,
0.01497650146484375,
0.009521484375,
-0.0017461776733398438,
-0.01214599609375,
0.012542724609375,
0.01071929931640625,
0.0193634033203125,
0.00689697265625,
-0.044769287109375,
-0.0260162353515625,
-0.062225341796875,
-0.033050537109375,
0.0025272369384765625,
0.0008378028869628906,
0.01450347900390625,
0.00688934326171875,
0.00592803955078125,
-0.02569580078125,
0.01222991943359375,
0.045623779296875,
-0.027862548828125,
-0.02392578125,
-0.027435302734375,
-0.047210693359375,
0.02703857421875,
-0.03167724609375,
-0.0189056396484375,
0.0088958740234375,
0.0308380126953125,
0.0097503662109375,
0.008026123046875,
0.0165863037109375,
0.03985595703125,
-0.051361083984375,
-0.03167724609375,
0.025238037109375,
-0.0143890380859375,
-0.043853759765625,
-0.044952392578125,
0.0174560546875,
-0.0178985595703125,
0.063232421875,
0.007160186767578125,
-0.0367431640625,
0.0146331787109375,
0.044921875,
-0.00707244873046875,
-0.01493072509765625,
0.056121826171875,
-0.0406494140625,
0.0362548828125,
-0.0018072128295898438,
-0.03375244140625,
-0.037445068359375,
0.048858642578125,
-0.0211334228515625,
-0.0204315185546875,
0.0076446533203125,
-0.006336212158203125,
0.0022335052490234375,
-0.050323486328125,
-0.0281219482421875,
-0.0149078369140625,
0.039306640625,
-0.0161590576171875,
0.0267791748046875,
-0.00968170166015625,
-0.0306549072265625,
0.00836944580078125,
0.0782470703125,
-0.045166015625,
-0.01293182373046875,
0.0094757080078125,
0.03240966796875,
-0.043792724609375,
-0.0733642578125,
-0.0260467529296875,
-0.026702880859375,
-0.0240020751953125,
-0.003498077392578125,
-0.0196533203125,
-0.00333404541015625,
-0.047760009765625,
0.03900146484375,
-0.02008056640625,
-0.013153076171875,
0.037689208984375,
-0.0301971435546875,
-0.0104522705078125,
0.03656005859375,
-0.01204681396484375,
0.00991058349609375,
-0.03704833984375,
-0.004108428955078125,
-0.03460693359375,
-0.0048675537109375,
-0.046112060546875,
0.0489501953125,
0.022705078125,
0.003932952880859375,
0.003936767578125,
0.042724609375,
0.0234527587890625,
0.03466796875,
0.004222869873046875,
-0.00612640380859375,
0.0411376953125,
-0.004985809326171875,
0.01451873779296875,
-0.0115203857421875,
-0.00560760498046875,
-0.01276397705078125,
-0.06072998046875,
0.02618408203125,
0.006351470947265625,
0.03717041015625,
0.03790283203125,
-0.037200927734375,
-0.10931396484375,
-0.055572509765625,
-0.00849151611328125,
-0.021942138671875,
-0.017974853515625,
0.0078887939453125,
-0.0280914306640625,
-0.07269287109375,
0.06317138671875,
0.058685302734375,
0.00435638427734375,
-0.0161895751953125,
0.050445556640625,
-0.0038471221923828125,
-0.06536865234375,
-0.0684814453125,
0.012359619140625,
0.0263671875,
-0.01169586181640625,
0.05462646484375,
0.030670166015625,
-0.0038738250732421875,
0.041229248046875,
-0.0087432861328125,
0.002490997314453125,
0.00620269775390625,
0.043975830078125,
0.019439697265625,
0.0020084381103515625,
0.0159454345703125,
0.0200653076171875,
-0.0654296875,
-0.0011768341064453125,
-0.00144195556640625,
-0.004222869873046875,
0.0195770263671875,
0.019561767578125,
0.0223846435546875,
-0.02862548828125,
-0.02862548828125,
-0.044097900390625,
0.02655029296875,
-0.037872314453125,
-0.01849365234375,
-0.0220184326171875,
0.0196685791015625,
-0.023773193359375,
0.007648468017578125,
0.010345458984375,
-0.00589752197265625,
-0.00247955322265625,
0.00958251953125,
0.0194854736328125,
-0.00734710693359375,
-0.00609588623046875,
-0.00875091552734375,
-0.0260772705078125,
0.0673828125,
0.018951416015625,
-0.027252197265625,
0.058837890625,
0.001979827880859375,
0.0261383056640625,
0.03070068359375,
-0.01372528076171875,
0.0017232894897460938,
0.0082244873046875,
-0.0022602081298828125,
0.0037689208984375,
-0.0163421630859375,
0.007221221923828125,
-0.031982421875,
-0.0208740234375,
-0.00731658935546875,
0.00347137451171875,
0.00539398193359375,
0.037994384765625,
-0.0010547637939453125,
0.022369384765625,
-0.02142333984375,
0.014068603515625,
-0.006805419921875,
0.03045654296875,
0.015869140625,
-0.0163421630859375,
0.0126953125,
0.01369476318359375,
0.00662994384765625,
0.003978729248046875,
0.0310211181640625,
0.021148681640625,
0.009429931640625,
-0.0298004150390625,
-0.0294647216796875,
0.0176849365234375,
-0.0382080078125,
-0.017059326171875,
0.049713134765625,
-0.0011196136474609375,
-0.0670166015625,
-0.0341796875,
-0.0010519027709960938,
0.05230712890625,
-0.0325927734375,
-0.0026874542236328125,
-0.01568603515625,
-0.04156494140625,
-0.0185394287109375,
0.01201629638671875,
-0.02337646484375,
-0.0169219970703125,
-0.028411865234375,
-0.025909423828125,
-0.0119171142578125,
-0.013916015625,
-0.0660400390625,
-0.027313232421875,
0.01495361328125,
-0.0028972625732421875,
0.01715087890625,
-0.0303497314453125,
0.0285491943359375,
0.013458251953125,
-0.02410888671875,
0.0276641845703125,
0.0282135009765625,
0.031982421875,
-0.00623321533203125,
0.007434844970703125,
-0.0189666748046875,
-0.02191162109375,
-0.02471923828125,
0.007785797119140625,
0.0016088485717773438,
0.0023212432861328125,
0.0170440673828125,
0.0095367431640625,
0.034454345703125,
-0.0284423828125,
-0.03765869140625,
0.014923095703125,
-0.01151275634765625,
-0.0022830963134765625,
0.0184173583984375,
-0.03546142578125,
0.050567626953125,
0.034088134765625,
-0.0243377685546875,
-0.0110015869140625,
0.03143310546875,
0.0135345458984375,
0.0016756057739257812,
0.0220489501953125,
0.0139007568359375,
-0.01103973388671875,
0.0032958984375,
-0.072021484375,
-0.045806884765625,
0.05718994140625,
-0.01169586181640625,
0.03387451171875,
-0.0023860931396484375,
0.001766204833984375,
-0.01751708984375,
-0.047149658203125,
-0.035003662109375,
0.036163330078125,
0.0005326271057128906,
-0.054443359375,
-0.0088348388671875,
-0.0166778564453125,
0.040740966796875,
0.021514892578125,
-0.05926513671875,
0.01094818115234375,
0.0301971435546875,
-0.037567138671875,
0.0294952392578125,
0.030426025390625,
0.031402587890625,
0.046875,
0.0189666748046875,
0.02459716796875,
-0.0099639892578125,
-0.0131988525390625,
0.00823211669921875,
0.0223388671875,
0.02032470703125,
-0.0268402099609375,
-0.0017242431640625,
-0.01200103759765625,
-0.01580810546875,
0.0272216796875,
0.053680419921875,
0.061126708984375,
-0.08038330078125,
0.00461578369140625,
-0.0025119781494140625,
-0.00897979736328125,
0.039794921875,
-0.0009260177612304688,
-0.03265380859375,
-0.031951904296875,
0.0421142578125,
-0.06884765625,
-0.0447998046875,
0.004978179931640625,
0.0005173683166503906,
-0.0033550262451171875,
-0.0251922607421875,
0.02587890625,
0.00868988037109375,
-0.006496429443359375,
0.010284423828125,
-0.0009512901306152344,
0.0248565673828125,
-0.023590087890625,
0.01395416259765625,
0.012969970703125,
-0.035186767578125,
-0.11700439453125,
-0.041473388671875,
-0.01910400390625,
-0.040130615234375,
0.027069091796875,
-0.007549285888671875,
0.0149078369140625,
0.0557861328125,
-0.01053619384765625,
-0.00554656982421875,
0.020263671875,
-0.017822265625,
0.007415771484375,
-0.01392364501953125,
-0.0081024169921875,
0.02618408203125,
-0.0247344970703125,
0.0176239013671875,
-0.0217132568359375,
0.00579833984375,
0.0016832351684570312,
-0.048797607421875,
-0.02728271484375,
0.034454345703125,
-0.014007568359375,
0.01375579833984375,
0.0173492431640625,
0.00997161865234375,
-0.0126190185546875,
0.0174560546875,
-0.06805419921875,
-0.07757568359375,
0.0017757415771484375,
-0.0877685546875,
-0.012969970703125,
-0.0276947021484375,
-0.08599853515625,
0.0640869140625,
0.01488494873046875,
0.05767822265625,
-0.0276947021484375,
0.02203369140625,
-0.004512786865234375,
0.0002491474151611328,
-0.01366424560546875,
0.01548004150390625,
-0.0144195556640625,
0.0160675048828125,
-0.0265045166015625,
0.01419830322265625,
0.01326751708984375,
0.0311279296875,
0.00936126708984375,
0.01317596435546875,
0.0019369125366210938,
-0.01806640625,
0.004833221435546875,
0.01415252685546875,
-0.004360198974609375,
0.0207672119140625,
-0.0015583038330078125,
0.050811767578125,
0.0029277801513671875,
-0.062042236328125,
0.031341552734375,
-0.08013916015625,
-0.0082855224609375,
0.001064300537109375,
0.01001739501953125,
0.00965118408203125,
-0.008575439453125,
-0.00811767578125,
0.02557373046875,
-0.018798828125,
-0.0171661376953125,
-0.0316162109375,
-0.0169219970703125,
0.049041748046875,
0.0213165283203125,
-0.0150604248046875,
-0.0246124267578125,
-0.0255584716796875,
0.0377197265625,
-0.0019311904907226562,
-0.0015096664428710938,
0.039337158203125,
0.01151275634765625,
0.004817962646484375,
0.00044798851013183594,
-0.0210418701171875,
-0.005039215087890625,
0.0380859375,
0.006961822509765625,
0.0435791015625,
0.0181884765625,
0.01232147216796875,
0.035400390625,
0.04119873046875,
0.01543426513671875,
-0.0306243896484375,
-0.016448974609375,
0.00030994415283203125,
-0.01422882080078125,
-0.0130157470703125,
-0.0220947265625,
-0.012420654296875,
-0.007556915283203125,
-0.0109710693359375,
-0.047882080078125,
0.00469207763671875,
0.04083251953125,
0.01317596435546875,
-0.00513458251953125,
0.0269317626953125,
-0.0181732177734375,
0.01024627685546875,
-0.0760498046875,
0.0006995201110839844,
0.0201873779296875,
0.080078125,
0.048248291015625,
0.058135986328125,
0.03900146484375,
-0.051055908203125,
-0.035125732421875,
0.0250091552734375,
0.01387786865234375,
0.0081024169921875,
-0.01320648193359375,
0.0211181640625,
-0.005184173583984375,
0.015960693359375,
0.0275726318359375,
-0.0304412841796875,
0.061798095703125,
0.0119171142578125,
-0.11065673828125,
-0.0173492431640625,
0.04425048828125,
-0.0318603515625,
0.006008148193359375,
-0.01474761962890625,
0.029541015625,
0.0330810546875,
-0.0070648193359375,
-0.01544952392578125,
0.05889892578125,
0.01497650146484375,
-0.0254058837890625,
0.02886962890625,
-0.0159912109375,
-0.049652099609375,
0.0008821487426757812,
0.0008878707885742188,
0.08367919921875,
0.003673553466796875,
-0.050079345703125,
-0.0166473388671875,
-0.02032470703125,
-0.04791259765625,
0.0269012451171875,
0.04266357421875,
-0.01300811767578125,
0.00417327880859375,
-0.0322265625,
-0.0209503173828125,
0.0299835205078125,
-0.00392913818359375,
-0.009613037109375,
0.019439697265625,
0.018768310546875,
-0.0186309814453125,
-0.04693603515625,
-0.02423095703125,
-0.025115966796875,
0.03802490234375,
0.02398681640625,
0.01357269287109375,
0.021087646484375,
0.050933837890625,
-0.01435089111328125,
-0.01251983642578125,
0.0233001708984375,
-0.0092620849609375,
0.0253448486328125,
0.0404052734375,
0.0159759521484375,
-0.0289306640625,
0.009979248046875,
-0.0150604248046875,
0.0193328857421875,
-0.04547119140625,
-0.0135345458984375,
-0.052093505859375,
0.0262603759765625,
0.0007524490356445312,
0.043609619140625,
-0.0223541259765625,
-0.04449462890625,
-0.033660888671875,
0.003398895263671875,
0.04046630859375,
0.0360107421875,
-0.0167999267578125,
-0.01007080078125,
-0.0207977294921875,
-0.0160064697265625,
0.02532958984375,
0.01145172119140625,
0.014251708984375,
0.02203369140625,
-0.043701171875,
-0.0076141357421875,
0.0012369155883789062,
-0.027801513671875,
0.00397491455078125,
0.006130218505859375,
0.0279541015625,
-0.01262664794921875,
-0.003509521484375,
-0.04461669921875,
-0.037994384765625,
-0.005321502685546875,
-0.024169921875,
0.0008244514465332031,
-0.020721435546875,
0.01430511474609375,
-0.029632568359375,
-0.01428985595703125,
-0.0205535888671875,
0.0058135986328125,
-0.0033512115478515625,
0.007228851318359375,
0.0223541259765625,
-0.05712890625,
-0.010345458984375,
-0.002483367919921875,
0.042327880859375,
-0.007808685302734375,
-0.02215576171875,
-0.0119476318359375,
-0.042938232421875,
0.05859375,
-0.024505615234375,
-0.028533935546875,
0.006099700927734375,
0.01447296142578125,
-0.044708251953125,
-0.036651611328125,
-0.052459716796875,
-0.01023101806640625,
-0.051605224609375,
-0.012176513671875,
0.0157623291015625,
0.01934814453125,
-0.0254058837890625,
0.025909423828125,
-0.01320648193359375,
0.07415771484375,
-0.056365966796875,
-0.0140838623046875,
0.042083740234375,
-0.028350830078125,
-0.038177490234375,
-0.11328125,
0.01364898681640625,
-0.1337890625,
0.01322174072265625,
0.01003265380859375,
-0.01690673828125,
-0.0035610198974609375,
-0.052490234375,
-0.11517333984375,
0.024749755859375,
-0.0113983154296875,
-0.037109375,
-0.032196044921875,
0.03759765625,
-0.00991058349609375,
-0.012969970703125,
-0.00049591064453125,
-0.03997802734375,
-0.0120697021484375,
-0.0183868408203125,
0.0257720947265625,
0.047454833984375,
0.012908935546875,
0.013702392578125,
0.003856658935546875,
0.024200439453125,
0.0204925537109375,
0.01018524169921875,
0.00650787353515625,
-0.0258636474609375,
0.00429534912109375,
0.00963592529296875,
-0.042449951171875,
-0.079345703125,
-0.0005469322204589844,
0.0037479400634765625,
0.0097808837890625,
-0.0733642578125,
-0.029327392578125,
-0.0557861328125,
0.05621337890625,
0.00023853778839111328,
0.01421356201171875,
-0.00003075599670410156,
0.0004248619079589844,
-0.00591278076171875,
-0.0175018310546875,
-0.01056671142578125,
0.0171661376953125,
-0.061553955078125,
-0.020965576171875,
0.010589599609375,
0.01641845703125,
-0.0121612548828125,
-0.008636474609375,
-0.006786346435546875,
-0.0362548828125,
-0.00893402099609375,
-0.006988525390625,
0.00868988037109375,
-0.033355712890625,
0.023834228515625,
-0.0180206298828125,
-0.0153961181640625,
0.00839996337890625,
0.02935791015625,
-0.0111846923828125,
0.041961669921875,
-0.038299560546875,
-0.0159912109375,
0.0236358642578125,
0.031524658203125,
0.006732940673828125,
-0.033233642578125,
0.0208282470703125,
0.0196685791015625,
-0.027587890625,
0.02142333984375,
0.016693115234375,
0.03887939453125,
-0.023223876953125,
0.014556884765625,
0.031707763671875,
-0.00531005859375,
-0.042999267578125,
0.01355743408203125,
-0.01116180419921875,
-0.00209808349609375,
-0.0703125,
0.0457763671875,
-0.0199737548828125,
-0.020172119140625,
0.0169677734375,
0.01428985595703125,
0.0005741119384765625,
-0.032073974609375,
0.046539306640625,
-0.0263519287109375,
0.0114898681640625,
0.0170440673828125
]
|
4d0cfb2c3732d177f3faaf864cb009ad9461ef62 | Wordpress Stackexchange
Q: paginate_links and query vars I have using the Wordpress paginate_links() to build a paginator on a custom archive template for a custom post type. My site uses permalinks:
<?php echo paginate_links(array(
'base' => get_pagenum_link(1) . '%_%',
'current' => max(1, get_query_var('paged')),
'format' => 'page/%#%',
'total' => $wp_query->max_num_pages,
)); ?>
This works fine until I try to add query string vars to build a custom search string when the paginator echoes:
.../entries?post_type=entry&s=testpage/1
.../entries?post_type=entry&s=testpage/2
Instead of:
.../entries/page/1?post_type=entry&s=test
.../entries/page/2?post_type=entry&s=test
and so on... How can I get the correctly formatted URLs?
A: Seems that the query string is coming from the base argument call to get_pagenum_link() so I have removed the query string component and re-add it with 'add_args'. Like so:
<?php echo paginate_links(array(
'base' => preg_replace('/\?.*/', '/', get_pagenum_link(1)) . '%_%',
'current' => max(1, get_query_var('paged')),
'format' => 'page/%#%',
'total' => $wp_query->max_num_pages,
'add_args' => array(
's' => get_query_var('s'),
'post_type' => get_query_var('post_type'),
)
)); ?>
| Q: paginate_links and query vars I have using the Wordpress paginate_links() to build a paginator on a custom archive template for a custom post type. My site uses permalinks:
<?php echo paginate_links(array(
'base' => get_pagenum_link(1) . '%_%',
'current' => max(1, get_query_var('paged')),
'format' => 'page/%#%',
'total' => $wp_query->max_num_pages,
)); ?>
This works fine until I try to add query string vars to build a custom search string when the paginator echoes:
.../entries?post_type=entry&s=testpage/1
.../entries?post_type=entry&s=testpage/2
Instead of:
.../entries/page/1?post_type=entry&s=test
.../entries/page/2?post_type=entry&s=test
and so on... How can I get the correctly formatted URLs?
A: Seems that the query string is coming from the base argument call to get_pagenum_link() so I have removed the query string component and re-add it with 'add_args'. Like so:
<?php echo paginate_links(array(
'base' => preg_replace('/\?.*/', '/', get_pagenum_link(1)) . '%_%',
'current' => max(1, get_query_var('paged')),
'format' => 'page/%#%',
'total' => $wp_query->max_num_pages,
'add_args' => array(
's' => get_query_var('s'),
'post_type' => get_query_var('post_type'),
)
)); ?>
A: The following works for pages with any query-vars.
If you visit
example.com/blog/?foo=bar&baz the link for the next page will have the same query-vars set:
example.com/blog/page/1/?foo=bar&baz.
$link_unescaped = get_pagenum_link( 1, false ); // esc=false so parse_url works.
$url_components = wp_parse_url( $link_unescaped );
$add_args = array();
if ( isset( $url_components['query'] ) ) {
wp_parse_str( $url_components['query'], $add_args ); // $add_args is updated.
}
echo paginate_links(
array(
'base' => strtok( $link_unescaped, '?' ) . '%_%',
'format' => 'page/%#%/',
'current' => max( 1, get_query_var( 'paged' ) ),
'total' => $query->max_num_pages,
'add_args' => $add_args,
)
);
| wordpress | {
"language": "en",
"length": 240,
"provenance": "stackexchange_00019.jsonl.gz:438420",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119617"
} | [
0.08111572265625,
-0.0204620361328125,
0.0455322265625,
-0.051422119140625,
0.003917694091796875,
-0.00815582275390625,
0.058258056640625,
0.010772705078125,
-0.00994110107421875,
-0.007526397705078125,
0.0003383159637451172,
-0.01221466064453125,
-0.031494140625,
-0.041107177734375,
0.029937744140625,
-0.00878143310546875,
0.0281524658203125,
-0.01904296875,
0.00057220458984375,
-0.01343536376953125,
0.00972747802734375,
-0.00806427001953125,
0.0186767578125,
0.07476806640625,
0.01806640625,
-0.0012464523315429688,
0.057647705078125,
-0.0249481201171875,
0.004215240478515625,
-0.024566650390625,
-0.003692626953125,
-0.002864837646484375,
0.040283203125,
-0.03887939453125,
0.01751708984375,
-0.00420379638671875,
0.01381683349609375,
-0.0202789306640625,
-0.0082855224609375,
0.0185546875,
-0.0054473876953125,
0.01047515869140625,
0.00846099853515625,
-0.0206146240234375,
-0.027587890625,
-0.0167083740234375,
-0.008392333984375,
-0.00897216796875,
-0.0188140869140625,
0.029266357421875,
0.0033092498779296875,
0.0352783203125,
0.00206756591796875,
0.031402587890625,
0.00922393798828125,
0.00870513916015625,
0.0281524658203125,
-0.045257568359375,
0.027313232421875,
-0.051788330078125,
-0.0212554931640625,
-0.0235595703125,
0.046966552734375,
0.0310821533203125,
-0.0294036865234375,
0.008026123046875,
-0.005382537841796875,
0.005115509033203125,
-0.0012044906616210938,
-0.0251617431640625,
0.0012454986572265625,
-0.003139495849609375,
-0.00811767578125,
0.01427459716796875,
-0.005092620849609375,
-0.0213165283203125,
-0.0059661865234375,
-0.0269317626953125,
0.010162353515625,
0.0285491943359375,
0.04888916015625,
0.0227813720703125,
-0.0240478515625,
0.01543426513671875,
0.019775390625,
0.0261688232421875,
0.006805419921875,
-0.04254150390625,
-0.0142822265625,
-0.0008578300476074219,
-0.0111846923828125,
-0.0230865478515625,
0.01422119140625,
-0.00820159912109375,
0.0059356689453125,
-0.03814697265625,
0.0023250579833984375,
0.0229339599609375,
0.0137176513671875,
0.0105133056640625,
-0.00202178955078125,
-0.034912109375,
0.0200042724609375,
-0.037261962890625,
-0.005374908447265625,
0.036529541015625,
0.04278564453125,
0.07989501953125,
0.051513671875,
0.0110015869140625,
0.0191497802734375,
0.0521240234375,
-0.047119140625,
-0.0225067138671875,
-0.0266876220703125,
0.0242919921875,
-0.061859130859375,
-0.01488494873046875,
0.0083465576171875,
-0.0000057220458984375,
-0.0258941650390625,
0.0146942138671875,
0.0035247802734375,
-0.005275726318359375,
0.00690460205078125,
0.003986358642578125,
0.02764892578125,
-0.056121826171875,
0.013092041015625,
0.06280517578125,
-0.034698486328125,
-0.0146331787109375,
0.0421142578125,
0.0084381103515625,
0.0003783702850341797,
-0.043121337890625,
0.02923583984375,
-0.07171630859375,
-0.0249481201171875,
0.030364990234375,
-0.0182037353515625,
-0.0217742919921875,
0.01409912109375,
-0.034881591796875,
0.0193328857421875,
0.00974273681640625,
0.036651611328125,
0.013397216796875,
-0.010528564453125,
-0.0157470703125,
-0.005001068115234375,
0.0083465576171875,
0.0557861328125,
-0.003307342529296875,
-0.05987548828125,
-0.00835418701171875,
-0.0137786865234375,
-0.01102447509765625,
-0.025634765625,
-0.031829833984375,
0.008514404296875,
-0.00524139404296875,
0.01264190673828125,
-0.0616455078125,
-0.0771484375,
-0.01110076904296875,
-0.031951904296875,
-0.02362060546875,
0.0155487060546875,
-0.00267791748046875,
0.001605987548828125,
-0.03155517578125,
-0.015869140625,
0.016693115234375,
0.0028133392333984375,
0.0201873779296875,
0.01050567626953125,
0.019134521484375,
0.0186004638671875,
0.050079345703125,
0.00278472900390625,
-0.038177490234375,
0.048797607421875,
-0.0250396728515625,
-0.0748291015625,
0.063720703125,
0.0010900497436523438,
0.06036376953125,
0.0013866424560546875,
0.008270263671875,
0.038543701171875,
0.026824951171875,
-0.048431396484375,
0.0009751319885253906,
0.0229339599609375,
-0.01031494140625,
-0.0215301513671875,
-0.0254364013671875,
-0.00873565673828125,
0.0067901611328125,
-0.02703857421875,
-0.006866455078125,
-0.01256561279296875,
0.034637451171875,
-0.036956787109375,
0.0045623779296875,
-0.010101318359375,
0.020660400390625,
-0.0181121826171875,
0.040069580078125,
0.0253143310546875,
0.014556884765625,
-0.03173828125,
-0.004650115966796875,
-0.003986358642578125,
0.005279541015625,
0.0289764404296875,
-0.00001150369644165039,
-0.01088714599609375,
-0.019622802734375,
-0.00179290771484375,
-0.0126800537109375,
-0.01502227783203125,
0.052276611328125,
0.045562744140625,
-0.0223236083984375,
-0.0213470458984375,
-0.041259765625,
-0.0203857421875,
-0.0027179718017578125,
-0.07843017578125,
0.08538818359375,
0.062042236328125,
0.07379150390625,
-0.0059967041015625,
-0.0037860870361328125,
0.022003173828125,
-0.030975341796875,
0.0068511962890625,
0.0379638671875,
0.04461669921875,
0.0151824951171875,
0.0010118484497070312,
-0.020050048828125,
0.045623779296875,
-0.0184783935546875,
0.0206298828125,
-0.0210113525390625,
-0.031219482421875,
0.048980712890625,
0.0203857421875,
0.0290374755859375,
-0.0185699462890625,
-0.0086212158203125,
-0.03912353515625,
0.0479736328125,
0.031341552734375,
0.061248779296875,
-0.02960205078125,
0.0219268798828125,
-0.032470703125,
-0.0130615234375,
-0.00627899169921875,
-0.0147247314453125,
0.034881591796875,
0.009368896484375,
0.021026611328125,
0.020050048828125,
-0.029022216796875,
0.0016660690307617188,
0.0079803466796875,
0.0049591064453125,
-0.0131988525390625,
-0.0168609619140625,
-0.0254364013671875,
-0.031585693359375,
-0.0259246826171875,
0.043243408203125,
-0.0157470703125,
-0.03826904296875,
-0.01183319091796875,
0.0254364013671875,
-0.0171051025390625,
-0.007160186767578125,
-0.01275634765625,
-0.0164794921875,
-0.005359649658203125,
0.0127105712890625,
-0.01482391357421875,
-0.0281524658203125,
0.0081329345703125,
0.01297760009765625,
-0.0426025390625,
0.03802490234375,
-0.0152435302734375,
-0.013671875,
0.02362060546875,
-0.058013916015625,
0.06353759765625,
-0.044952392578125,
0.0311431884765625,
0.05364990234375,
-0.037872314453125,
0.033721923828125,
-0.0191192626953125,
-0.007396697998046875,
-0.004405975341796875,
-0.0175323486328125,
-0.03460693359375,
-0.041900634765625,
-0.0111541748046875,
0.03515625,
0.001277923583984375,
0.0158233642578125,
-0.00220489501953125,
-0.045074462890625,
-0.0005383491516113281,
-0.010650634765625,
-0.076904296875,
-0.06817626953125,
0.045440673828125,
-0.0740966796875,
-0.025787353515625,
-0.0041351318359375,
-0.051666259765625,
-0.004657745361328125,
0.0382080078125,
-0.01519775390625,
0.00586700439453125,
-0.040985107421875,
-0.06707763671875,
-0.0628662109375,
-0.0865478515625,
0.0250091552734375,
0.0033016204833984375,
0.0117950439453125,
-0.01309967041015625,
0.055511474609375,
0.00421142578125,
-0.055999755859375,
-0.0028228759765625,
0.03912353515625,
-0.0003132820129394531,
0.0032329559326171875,
-0.0139923095703125,
0.01551055908203125,
0.0225677490234375,
-0.01435089111328125,
0.07257080078125,
0.058074951171875,
-0.052215576171875,
0.034637451171875,
0.029296875,
-0.01384735107421875,
0.032073974609375,
0.048248291015625,
-0.031707763671875,
0.0236663818359375,
0.049163818359375,
-0.0289154052734375,
-0.0225372314453125,
-0.0085906982421875,
-0.045806884765625,
0.055511474609375,
0.035247802734375,
-0.0018014907836914062,
0.003711700439453125,
0.002193450927734375,
-0.0080718994140625,
0.008636474609375,
0.033935546875,
-0.04229736328125,
0.0310211181640625,
-0.003143310546875,
-0.012908935546875,
-0.0216217041015625,
0.06182861328125,
-0.01245880126953125,
0.038238525390625,
0.048309326171875,
-0.01812744140625,
0.0012531280517578125,
-0.0421142578125,
-0.004322052001953125,
-0.0635986328125,
0.0498046875,
-0.0316162109375,
-0.0276641845703125,
-0.03704833984375,
-0.02313232421875,
-0.0002409219741821289,
0.07940673828125,
-0.04339599609375,
-0.03485107421875,
0.001628875732421875,
0.037261962890625,
-0.016998291015625,
-0.058502197265625,
0.01641845703125,
-0.021392822265625,
-0.0665283203125,
0.004665374755859375,
0.00025343894958496094,
-0.040679931640625,
0.0016489028930664062,
0.015380859375,
-0.0306854248046875,
-0.0210418701171875,
0.04168701171875,
0.0175628662109375,
-0.0141143798828125,
0.0222320556640625,
-0.01459503173828125,
-0.0007557868957519531,
-0.03607177734375,
0.0121917724609375,
-0.08441162109375,
-0.04193115234375,
0.0330810546875,
0.0859375,
0.0118560791015625,
-0.0513916015625,
-0.042236328125,
0.046478271484375,
0.024261474609375,
0.0047149658203125,
0.0369873046875,
0.01041412353515625,
-0.037353515625,
0.0029201507568359375,
0.0277252197265625,
-0.042388916015625,
-0.00860595703125,
-0.01140594482421875,
-0.010833740234375,
-0.01513671875,
-0.0165557861328125,
-0.018463134765625,
0.01568603515625,
-0.016815185546875,
-0.08648681640625,
-0.0188751220703125,
0.00661468505859375,
0.0118560791015625,
-0.005298614501953125,
-0.01172637939453125,
-0.01153564453125,
-0.0804443359375,
0.042388916015625,
0.0096893310546875,
-0.024871826171875,
-0.01141357421875,
0.05828857421875,
0.0238494873046875,
-0.0293121337890625,
0.00272369384765625,
-0.01494598388671875,
0.019775390625,
-0.0128021240234375,
0.042236328125,
0.0185699462890625,
-0.021209716796875,
0.04449462890625,
-0.00467681884765625,
-0.0093841552734375,
-0.00414276123046875,
0.0009703636169433594,
0.0196380615234375,
-0.0211181640625,
0.00604248046875,
0.0021648406982421875,
0.0299835205078125,
0.024444580078125,
-0.021575927734375,
-0.019683837890625,
0.0008382797241210938,
0.07440185546875,
-0.03216552734375,
0.057373046875,
-0.051055908203125,
-0.0263671875,
0.001689910888671875,
0.0198211669921875,
0.0440673828125,
0.004425048828125,
-0.0119781494140625,
0.0261077880859375,
0.0258026123046875,
0.024932861328125,
0.037261962890625,
0.04595947265625,
-0.0039215087890625,
0.047271728515625,
0.007045745849609375,
0.00009864568710327148,
-0.006275177001953125,
0.01047515869140625,
0.0001990795135498047,
-0.0007848739624023438,
0.006145477294921875,
-0.0655517578125,
-0.00490570068359375,
-0.0020999908447265625,
-0.0256195068359375,
0.0187225341796875,
0.0445556640625,
0.029449462890625,
-0.0109405517578125,
-0.0120391845703125,
-0.007198333740234375,
0.00676727294921875,
-0.037261962890625,
0.046417236328125,
-0.0042572021484375,
0.014190673828125,
-0.036346435546875,
0.1007080078125,
0.0175933837890625,
0.0268096923828125,
-0.026092529296875,
-0.03692626953125,
-0.0246429443359375,
0.056549072265625,
0.0289764404296875,
-0.025634765625,
0.002079010009765625,
0.0360107421875,
0.035919189453125,
-0.027008056640625,
-0.01474761962890625,
0.01270294189453125,
0.053070068359375,
0.0009670257568359375,
0.002910614013671875,
-0.01061248779296875,
-0.033233642578125,
-0.0244903564453125,
0.0252532958984375,
0.0250701904296875,
-0.0170745849609375,
-0.0265045166015625,
-0.00421142578125,
0.02471923828125,
0.006572723388671875,
-0.0241851806640625,
0.040435791015625,
-0.039764404296875,
0.034088134765625,
0.0174713134765625,
-0.0001842975616455078,
-0.003448486328125,
-0.021392822265625,
0.0131683349609375,
-0.042755126953125,
0.0110015869140625,
-0.01224517822265625,
0.0379638671875,
-0.042236328125,
-0.0165863037109375,
0.0303497314453125,
-0.0163726806640625,
0.045166015625,
-0.04974365234375,
-0.00968170166015625,
-0.01348114013671875,
-0.0005364418029785156,
0.037994384765625,
0.009552001953125,
-0.0284881591796875,
0.0179290771484375,
-0.07061767578125,
-0.0163116455078125,
0.0006737709045410156,
-0.0177154541015625,
-0.0190277099609375,
-0.012237548828125,
0.006000518798828125,
0.0100860595703125,
0.019439697265625,
0.008514404296875,
-0.0130767822265625,
0.01523590087890625,
0.01239013671875,
0.03021240234375,
-0.020660400390625,
0.050811767578125,
-0.002956390380859375,
0.052703857421875,
0.0004916191101074219,
0.005374908447265625,
-0.0142669677734375,
-0.01558685302734375,
0.01690673828125,
-0.056549072265625,
-0.0357666015625,
-0.0153961181640625,
0.0008206367492675781,
0.0171051025390625,
0.01294708251953125,
-0.00139617919921875,
0.0014219284057617188,
-0.006267547607421875,
-0.00531768798828125,
-0.0199432373046875,
0.0185394287109375,
0.006397247314453125,
0.0216522216796875,
0.00742340087890625,
0.016510009765625,
0.026123046875,
0.00868988037109375,
-0.009033203125,
-0.006481170654296875,
0.01062774658203125,
0.003726959228515625,
-0.031158447265625,
-0.0406494140625,
0.0174560546875,
0.0753173828125,
0.060028076171875,
0.06591796875,
0.0031528472900390625,
0.0467529296875,
0.0264892578125,
0.0137176513671875,
0.06683349609375,
0.0280609130859375,
0.0653076171875,
-0.0148468017578125,
0.01378631591796875,
0.025054931640625,
-0.03955078125,
-0.005733489990234375,
0.0229949951171875,
0.041839599609375,
-0.0460205078125,
0.003810882568359375,
0.013153076171875,
0.0041351318359375,
0.0243072509765625,
0.03643798828125,
-0.0018720626831054688,
-0.0108489990234375,
-0.016448974609375,
-0.006587982177734375,
-0.00018286705017089844,
-0.00039649009704589844,
-0.0012912750244140625,
-0.01357269287109375,
0.0050811767578125,
-0.01476287841796875,
-0.0109405517578125,
-0.039093017578125,
-0.0274505615234375,
0.0283050537109375,
-0.0196075439453125,
-0.0138397216796875,
-0.01444244384765625,
0.003902435302734375,
-0.0222015380859375,
-0.037109375,
0.0158538818359375,
-0.049407958984375,
0.01203155517578125,
0.01401519775390625,
0.03302001953125,
0.0151519775390625,
0.04376220703125,
0.01088714599609375,
-0.0210418701171875,
0.0225372314453125,
-0.00894927978515625,
0.0244903564453125,
-0.01410675048828125,
-0.0026493072509765625,
0.0012350082397460938,
0.0038776397705078125,
-0.005992889404296875,
-0.0213775634765625,
-0.00847625732421875,
-0.01509857177734375,
0.011627197265625,
0.0958251953125,
-0.0755615234375,
0.004764556884765625,
0.0170745849609375,
0.060821533203125,
0.0026264190673828125,
-0.008636474609375,
-0.017730712890625,
-0.0650634765625,
-0.02734375,
-0.0059051513671875,
-0.0266265869140625,
0.047821044921875,
-0.0130157470703125,
-0.0450439453125,
0.0787353515625,
-0.025177001953125,
0.0338134765625,
0.03607177734375,
0.0288238525390625,
-0.01056671142578125,
0.0199737548828125,
-0.039337158203125,
0.041961669921875,
-0.000919342041015625,
0.061279296875,
-0.052276611328125,
-0.005588531494140625,
0.03173828125,
0.031524658203125,
0.0219879150390625,
0.0052337646484375,
-0.01885986328125,
0.0204010009765625,
0.07037353515625,
0.053070068359375,
0.018218994140625,
0.00899505615234375,
0.0269012451171875,
0.04925537109375,
0.08172607421875,
-0.048187255859375,
0.0256195068359375,
0.0088043212890625,
0.0124969482421875,
0.042388916015625,
0.010284423828125,
0.01226806640625,
0.0014286041259765625,
-0.03411865234375,
-0.0496826171875,
0.0096893310546875,
0.036834716796875,
-0.01342010498046875,
0.0230865478515625,
0.0426025390625,
0.056671142578125,
-0.0516357421875,
-0.07965087890625,
-0.006603240966796875,
0.0389404296875,
-0.005035400390625,
0.002399444580078125,
0.0211639404296875,
0.0203857421875,
0.0380859375,
-0.035003662109375,
-0.0032939910888671875,
-0.0028171539306640625,
-0.0005254745483398438,
0.0885009765625,
0.01314544677734375,
0.036956787109375,
-0.0491943359375,
-0.03271484375,
0.03778076171875,
0.09954833984375,
-0.04058837890625,
-0.06396484375,
-0.00262451171875,
-0.00853729248046875,
0.023406982421875,
0.0229644775390625,
0.0294342041015625,
0.03717041015625,
0.059539794921875,
-0.01824951171875,
-0.038360595703125,
-0.0015516281127929688,
0.04022216796875,
-0.006557464599609375,
-0.020355224609375,
-0.0017948150634765625,
-0.043548583984375,
-0.038482666015625,
-0.0097198486328125,
0.0164031982421875,
0.060760498046875,
0.00811004638671875,
0.04150390625,
-0.034912109375,
-0.0270538330078125,
-0.0232391357421875,
0.040130615234375,
-0.0249481201171875,
0.038116455078125,
-0.047698974609375,
-0.01258087158203125,
-0.03778076171875,
0.04400634765625,
0.038818359375,
0.0093536376953125,
0.0022735595703125,
-0.02325439453125,
0.004421234130859375,
0.0221099853515625,
0.03033447265625,
-0.01007843017578125,
-0.0086212158203125,
-0.044708251953125,
0.03448486328125,
0.0173187255859375,
0.01342010498046875,
0.024200439453125,
0.01739501953125,
0.00905609130859375,
0.00433349609375,
0.0237579345703125,
0.0087890625,
-0.0033664703369140625,
-0.0022907257080078125,
-0.0287933349609375,
0.028839111328125,
0.0301513671875,
-0.07354736328125,
-0.018646240234375,
-0.0266265869140625,
-0.043548583984375,
0.0307464599609375,
0.0396728515625,
-0.00444793701171875,
-0.01090240478515625,
-0.02685546875,
0.008453369140625,
0.01080322265625,
-0.00983428955078125,
-0.00799560546875,
0.01788330078125,
0.0206756591796875,
0.0099945068359375,
-0.01323699951171875,
-0.01354217529296875,
0.006008148193359375,
0.030120849609375,
-0.00652313232421875,
0.094482421875,
-0.03656005859375,
-0.009246826171875,
0.034149169921875,
0.01050567626953125,
-0.0178680419921875,
0.0308074951171875,
0.0026988983154296875,
-0.040069580078125,
0.0022411346435546875,
-0.009002685546875,
-0.00029850006103515625,
0.0095367431640625,
0.038970947265625,
-0.0214385986328125,
-0.01522064208984375,
-0.01425933837890625,
0.031402587890625,
0.0079498291015625,
0.0019216537475585938,
-0.0303192138671875,
-0.01751708984375,
0.003978729248046875,
-0.01369476318359375,
0.01004791259765625,
0.01377105712890625,
0.01654052734375,
0.0416259765625,
0.032257080078125,
-0.00936126708984375,
0.033721923828125,
-0.039825439453125,
0.093994140625,
0.048675537109375,
-0.01154327392578125,
-0.0097503662109375,
0.0010166168212890625,
-0.01456451416015625,
0.00024247169494628906,
0.0149688720703125,
-0.002223968505859375,
-0.006397247314453125,
-0.013214111328125,
0.005451202392578125,
-0.019195556640625,
0.01531219482421875,
-0.015777587890625,
-0.007152557373046875,
0.0022563934326171875,
0.006988525390625,
-0.004947662353515625,
-0.0167083740234375,
-0.0203857421875,
-0.0511474609375,
-0.0010671615600585938,
0.00335693359375,
-0.006862640380859375,
-0.040924072265625,
-0.004871368408203125,
0.00566864013671875,
-0.004093170166015625,
0.038421630859375,
-0.092529296875,
0.06817626953125,
0.0102386474609375,
0.01155853271484375,
-0.0229949951171875,
-0.0036144256591796875,
-0.015899658203125,
-0.00630950927734375,
-0.0210113525390625,
0.006107330322265625,
-0.046722412109375,
0.00533294677734375,
-0.005847930908203125,
0.016937255859375,
0.060699462890625,
-0.0140380859375,
-0.0753173828125,
0.00069427490234375,
-0.01354217529296875,
0.049896240234375,
-0.0263824462890625,
-0.01169586181640625,
0.05224609375,
-0.0054779052734375,
-0.050567626953125,
-0.09796142578125,
-0.01383209228515625,
-0.06414794921875,
0.034027099609375,
0.044158935546875,
-0.0157928466796875,
0.0369873046875,
-0.0099029541015625,
-0.052459716796875,
0.08502197265625,
-0.0012140274047851562,
-0.0286407470703125,
-0.036865234375,
0.0181427001953125,
-0.0019407272338867188,
-0.000713348388671875,
-0.00472259521484375,
-0.008575439453125,
-0.0186920166015625,
0.00323486328125,
0.029998779296875,
0.00897216796875,
0.01319122314453125,
0.0165557861328125,
-0.070556640625,
0.031494140625,
0.01152801513671875,
0.03741455078125,
0.0021190643310546875,
-0.0101470947265625,
0.0218048095703125,
0.031005859375,
-0.04058837890625,
-0.0290374755859375,
0.0009579658508300781,
0.0204010009765625,
0.004917144775390625,
-0.0286865234375,
-0.030548095703125,
-0.021575927734375,
0.059173583984375,
-0.004772186279296875,
0.0185089111328125,
0.002117156982421875,
-0.021881103515625,
-0.0245361328125,
-0.037628173828125,
-0.01068115234375,
0.03277587890625,
-0.07257080078125,
0.0047149658203125,
0.0177764892578125,
0.004535675048828125,
0.004261016845703125,
-0.021575927734375,
-0.0169677734375,
-0.015960693359375,
-0.016357421875,
0.00803375244140625,
-0.02783203125,
0.013397216796875,
0.053314208984375,
-0.0439453125,
-0.027191162109375,
0.005462646484375,
0.002040863037109375,
-0.010345458984375,
-0.024169921875,
-0.039337158203125,
0.024017333984375,
-0.0263671875,
-0.004116058349609375,
0.00826263427734375,
0.0278472900390625,
0.0136260986328125,
0.02294921875,
-0.004482269287109375,
0.032989501953125,
-0.00441741943359375,
0.0116729736328125,
-0.036376953125,
0.06317138671875,
0.0076141357421875,
0.0845947265625,
-0.0018482208251953125,
0.041717529296875,
0.004261016845703125,
0.0236358642578125,
-0.01425933837890625,
0.009002685546875,
0.0014181137084960938,
-0.0125885009765625,
0.002452850341796875,
-0.0220794677734375,
-0.03375244140625,
-0.055694580078125,
-0.00438690185546875,
-0.017913818359375,
-0.01241302490234375,
0.0307769775390625
]
|
309e38367818465741a4bb988b7555fa9f62e53c | Wordpress Stackexchange
Q: Difference between w3total cache disk enhanced and disk basic Regarding the w3total cache working mechanism, I searched the internet but couldnt find any proper information regarding these two. What is the difference between the disk enhanced and disk basic in w3Total cache.And why is disk enhanced preferred over disk basic? What the advantages and disadvantages of using the options disk enhanced and disk cache repectively?
A: You should use "Enhanced" if it's available. It serves cached pages using the server's URL rewriting capabilities, skipping PHP and WordPress entirely. It's faster and more efficient.
| Q: Difference between w3total cache disk enhanced and disk basic Regarding the w3total cache working mechanism, I searched the internet but couldnt find any proper information regarding these two. What is the difference between the disk enhanced and disk basic in w3Total cache.And why is disk enhanced preferred over disk basic? What the advantages and disadvantages of using the options disk enhanced and disk cache repectively?
A: You should use "Enhanced" if it's available. It serves cached pages using the server's URL rewriting capabilities, skipping PHP and WordPress entirely. It's faster and more efficient.
| wordpress | {
"language": "en",
"length": 94,
"provenance": "stackexchange_00019.jsonl.gz:438476",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119807"
} | [
0.0611572265625,
0.000823974609375,
-0.0277862548828125,
-0.10919189453125,
0.02783203125,
-0.01776123046875,
-0.0203399658203125,
0.03509521484375,
0.07684326171875,
0.0313720703125,
-0.03179931640625,
-0.02532958984375,
0.05035400390625,
-0.0267486572265625,
-0.0245819091796875,
0.031982421875,
0.04254150390625,
-0.02301025390625,
0.017669677734375,
-0.011016845703125,
0.0061492919921875,
0.025177001953125,
0.001712799072265625,
0.058502197265625,
0.00231170654296875,
0.0010671615600585938,
0.01227569580078125,
-0.0136871337890625,
-0.003681182861328125,
-0.011749267578125,
-0.0064849853515625,
0.0007987022399902344,
0.02667236328125,
0.03857421875,
-0.06005859375,
-0.041534423828125,
-0.0159149169921875,
0.01366424560546875,
-0.0225677490234375,
0.0092926025390625,
-0.032196044921875,
0.0239410400390625,
0.035247802734375,
-0.00804901123046875,
-0.0367431640625,
-0.0012369155883789062,
-0.0465087890625,
-0.019561767578125,
0.0391845703125,
0.03851318359375,
-0.01560211181640625,
0.05792236328125,
-0.0141448974609375,
-0.012908935546875,
-0.00390625,
-0.01471710205078125,
-0.0030536651611328125,
0.0158843994140625,
0.039764404296875,
-0.015045166015625,
-0.024505615234375,
0.011016845703125,
0.018280029296875,
0.0017156600952148438,
-0.00801849365234375,
0.0004305839538574219,
0.06365966796875,
0.01380157470703125,
-0.08441162109375,
-0.0408935546875,
0.04058837890625,
-0.019073486328125,
0.0222320556640625,
-0.025482177734375,
0.00501251220703125,
0.01934814453125,
-0.01165008544921875,
0.00875091552734375,
0.037017822265625,
-0.0008912086486816406,
-0.027801513671875,
0.01291656494140625,
0.005130767822265625,
-0.07763671875,
-0.011505126953125,
-0.07537841796875,
-0.023193359375,
0.013671875,
-0.00433349609375,
-0.02996826171875,
-0.00995635986328125,
-0.0675048828125,
0.0010862350463867188,
0.0297698974609375,
0.00519561767578125,
-0.0247955322265625,
-0.002498626708984375,
0.034576416015625,
-0.032012939453125,
0.0006728172302246094,
-0.0038909912109375,
-0.01334381103515625,
0.0152435302734375,
-0.044952392578125,
0.01070404052734375,
0.01152801513671875,
-0.01401519775390625,
0.0196380615234375,
0.07269287109375,
0.03094482421875,
-0.0015344619750976562,
0.03326416015625,
-0.02386474609375,
-0.0240936279296875,
-0.0159454345703125,
0.0273895263671875,
-0.032318115234375,
0.029388427734375,
0.01062774658203125,
0.05328369140625,
0.002838134765625,
0.00708770751953125,
0.04779052734375,
-0.0017461776733398438,
-0.0222625732421875,
-0.02001953125,
-0.0247802734375,
-0.0484619140625,
-0.04156494140625,
0.0095977783203125,
-0.03619384765625,
0.0352783203125,
0.08221435546875,
-0.0016536712646484375,
-0.0214996337890625,
-0.0233154296875,
0.0220947265625,
0.01898193359375,
0.004878997802734375,
0.00308990478515625,
-0.0092010498046875,
-0.030914306640625,
0.008697509765625,
-0.0006957054138183594,
0.00952911376953125,
0.017425537109375,
0.04266357421875,
0.01934814453125,
-0.01180267333984375,
-0.026702880859375,
0.01337432861328125,
0.03546142578125,
0.036529541015625,
-0.030731201171875,
-0.06695556640625,
-0.006710052490234375,
-0.08544921875,
0.01480865478515625,
-0.00908660888671875,
0.01202392578125,
0.020904541015625,
-0.004657745361328125,
-0.0013875961303710938,
-0.0084686279296875,
-0.0239410400390625,
-0.004398345947265625,
-0.006961822509765625,
-0.003711700439453125,
0.01861572265625,
0.0228271484375,
0.039215087890625,
-0.051025390625,
-0.0290985107421875,
0.020751953125,
0.01088714599609375,
0.03021240234375,
0.03363037109375,
0.006683349609375,
0.0216522216796875,
0.0203094482421875,
-0.0187835693359375,
-0.0235595703125,
0.06463623046875,
-0.0257568359375,
-0.044464111328125,
0.0213623046875,
0.0157012939453125,
0.0694580078125,
0.02301025390625,
0.025360107421875,
0.0159454345703125,
-0.007358551025390625,
0.021759033203125,
0.0299835205078125,
0.01001739501953125,
-0.03369140625,
-0.03594970703125,
0.005825042724609375,
-0.01392364501953125,
-0.04107666015625,
0.06463623046875,
0.0254974365234375,
-0.0311126708984375,
-0.0214691162109375,
-0.103515625,
-0.0136871337890625,
-0.0266265869140625,
0.033172607421875,
0.00948333740234375,
0.040435791015625,
0.0301361083984375,
0.050323486328125,
-0.0467529296875,
-0.00592803955078125,
-0.0265045166015625,
-0.0101776123046875,
-0.026947021484375,
0.033660888671875,
0.027191162109375,
0.025299072265625,
0.01251220703125,
-0.00965118408203125,
0.0034389495849609375,
-0.040069580078125,
0.036651611328125,
0.005970001220703125,
0.0009050369262695312,
0.0027217864990234375,
0.09136962890625,
0.034393310546875,
0.04412841796875,
-0.042388916015625,
0.056365966796875,
0.0234527587890625,
-0.0237274169921875,
-0.001689910888671875,
-0.0084686279296875,
-0.07623291015625,
-0.018157958984375,
0.07196044921875,
0.0302886962890625,
0.07037353515625,
0.01354217529296875,
0.048980712890625,
0.055450439453125,
-0.0216064453125,
-0.0003600120544433594,
0.01322174072265625,
0.026885986328125,
0.03448486328125,
0.003917694091796875,
-0.033660888671875,
0.0293426513671875,
-0.0184173583984375,
0.0036869049072265625,
0.0119171142578125,
0.0170135498046875,
0.0401611328125,
-0.01617431640625,
0.0087890625,
0.0015316009521484375,
-0.006145477294921875,
-0.0191192626953125,
-0.0007076263427734375,
0.039306640625,
0.01177978515625,
0.0284423828125,
0.035430908203125,
-0.0207672119140625,
0.02545166015625,
0.01076507568359375,
-0.028533935546875,
0.01020050048828125,
0.029998779296875,
-0.020660400390625,
0.030975341796875,
-0.02093505859375,
0.007762908935546875,
-0.0318603515625,
0.0019702911376953125,
0.00194549560546875,
-0.02276611328125,
-0.038543701171875,
-0.01091766357421875,
0.065185546875,
-0.002658843994140625,
-0.0256805419921875,
-0.0145263671875,
-0.05078125,
-0.02252197265625,
0.03399658203125,
0.0138702392578125,
-0.0247650146484375,
-0.005702972412109375,
-0.01824951171875,
-0.016998291015625,
0.035797119140625,
0.02008056640625,
-0.006473541259765625,
-0.0101470947265625,
-0.0208892822265625,
0.02264404296875,
0.00864410400390625,
-0.0255584716796875,
-0.0194854736328125,
0.0301666259765625,
0.0143280029296875,
-0.0267791748046875,
-0.0193328857421875,
0.01149749755859375,
-0.048919677734375,
-0.004138946533203125,
0.01251220703125,
0.0419921875,
-0.029083251953125,
-0.052734375,
-0.021575927734375,
-0.0050201416015625,
-0.12042236328125,
-0.092529296875,
-0.1163330078125,
-0.0438232421875,
0.0259552001953125,
0.0171661376953125,
0.00360107421875,
0.006000518798828125,
0.029693603515625,
0.036865234375,
-0.007129669189453125,
-0.003627777099609375,
0.02325439453125,
-0.041259765625,
-0.03302001953125,
-0.07080078125,
0.00665283203125,
-0.019317626953125,
-0.0145721435546875,
-0.004974365234375,
-0.02294921875,
0.023040771484375,
-0.0181884765625,
-0.01076507568359375,
0.0171966552734375,
-0.07281494140625,
-0.0030803680419921875,
0.0008001327514648438,
-0.003360748291015625,
0.01361846923828125,
-0.0277252197265625,
0.0088043212890625,
-0.006832122802734375,
-0.0274658203125,
-0.0236663818359375,
0.018463134765625,
0.0084075927734375,
0.004558563232421875,
0.03729248046875,
0.01126861572265625,
0.00832366943359375,
-0.039825439453125,
-0.0038242340087890625,
0.03533935546875,
-0.0167388916015625,
0.00553131103515625,
-0.0013208389282226562,
-0.027587890625,
0.037109375,
-0.01094818115234375,
0.00612640380859375,
0.0276641845703125,
-0.0029277801513671875,
-0.030853271484375,
0.03662109375,
-0.01050567626953125,
-0.0010051727294921875,
-0.020751953125,
0.07843017578125,
0.01087188720703125,
-0.0091552734375,
0.041107177734375,
0.00582122802734375,
-0.002201080322265625,
-0.007518768310546875,
-0.006195068359375,
-0.041259765625,
-0.006443023681640625,
-0.0819091796875,
0.00707244873046875,
-0.04388427734375,
0.0109100341796875,
0.005741119384765625,
0.064453125,
0.04534912109375,
-0.034027099609375,
-0.021575927734375,
-0.0028362274169921875,
-0.0299072265625,
0.002719879150390625,
0.01380157470703125,
-0.0037746429443359375,
0.0027637481689453125,
0.02874755859375,
0.019195556640625,
0.0157623291015625,
-0.025238037109375,
0.043548583984375,
0.0024356842041015625,
-0.0091094970703125,
0.027587890625,
-0.0266571044921875,
0.003643035888671875,
-0.0303802490234375,
-0.0032138824462890625,
-0.0516357421875,
-0.00768280029296875,
-0.023284912109375,
-0.01123046875,
-0.01145172119140625,
0.029144287109375,
-0.0322265625,
-0.007465362548828125,
-0.030029296875,
0.0108184814453125,
0.0169219970703125,
0.0028629302978515625,
0.00901031494140625,
-0.0025310516357421875,
0.00537109375,
-0.043609619140625,
-0.0059967041015625,
0.01213836669921875,
-0.04095458984375,
-0.0236968994140625,
-0.057159423828125,
-0.03448486328125,
-0.048004150390625,
-0.01348876953125,
-0.0076751708984375,
0.002849578857421875,
-0.0005707740783691406,
-0.0242919921875,
-0.02044677734375,
-0.03131103515625,
-0.044677734375,
-0.041656494140625,
0.00592803955078125,
0.0167388916015625,
0.01062774658203125,
0.056976318359375,
0.065185546875,
0.01397705078125,
-0.0126190185546875,
0.0650634765625,
0.01267242431640625,
-0.054901123046875,
-0.023223876953125,
-0.002902984619140625,
0.032470703125,
0.0139617919921875,
0.004711151123046875,
-0.0197296142578125,
-0.0285797119140625,
0.06170654296875,
-0.021636962890625,
0.056121826171875,
-0.02197265625,
0.06085205078125,
0.00777435302734375,
0.007472991943359375,
0.01232147216796875,
0.034698486328125,
-0.0733642578125,
0.01345062255859375,
-0.0070343017578125,
0.04083251953125,
0.002185821533203125,
0.0014066696166992188,
0.0299530029296875,
-0.0689697265625,
-0.039459228515625,
-0.02142333984375,
0.0021686553955078125,
0.037689208984375,
0.04290771484375,
0.04864501953125,
-0.02044677734375,
0.022674560546875,
0.021087646484375,
0.00940704345703125,
0.048858642578125,
0.0033664703369140625,
0.004894256591796875,
-0.010040283203125,
0.0811767578125,
-0.0188446044921875,
0.0256500244140625,
0.016021728515625,
-0.0287628173828125,
-0.008697509765625,
-0.05029296875,
-0.016143798828125,
0.0300445556640625,
-0.006816864013671875,
0.00620269775390625,
0.0328369140625,
0.0396728515625,
-0.03466796875,
0.007709503173828125,
-0.002910614013671875,
0.0021228790283203125,
-0.0279083251953125,
-0.027435302734375,
0.045928955078125,
-0.01366424560546875,
0.0005660057067871094,
0.0323486328125,
-0.00872802734375,
-0.032318115234375,
0.010162353515625,
0.004169464111328125,
0.04608154296875,
0.05914306640625,
-0.0019397735595703125,
-0.0088653564453125,
0.04205322265625,
0.00919342041015625,
-0.00980377197265625,
0.0283660888671875,
-0.01219940185546875,
-0.033233642578125,
0.01006317138671875,
0.0161590576171875,
-0.045257568359375,
0.0009918212890625,
0.019195556640625,
0.0008788108825683594,
-0.00835418701171875,
0.0428466796875,
-0.01204681396484375,
-0.05810546875,
-0.03472900390625,
0.017364501953125,
0.0455322265625,
-0.010467529296875,
-0.00637054443359375,
0.00716400146484375,
-0.004886627197265625,
0.04498291015625,
0.04046630859375,
-0.01812744140625,
0.003620147705078125,
0.0032291412353515625,
0.0223388671875,
-0.031829833984375,
-0.006206512451171875,
-0.01308441162109375,
0.0209808349609375,
-0.0224609375,
0.00249481201171875,
0.02337646484375,
-0.024505615234375,
-0.000024616718292236328,
-0.0281219482421875,
0.0216064453125,
-0.02362060546875,
0.0175933837890625,
0.030181884765625,
0.006229400634765625,
-0.020172119140625,
-0.023193359375,
-0.04052734375,
-0.0263671875,
-0.06536865234375,
-0.03167724609375,
-0.0139007568359375,
0.04730224609375,
-0.0174407958984375,
0.0058746337890625,
-0.0198974609375,
-0.029449462890625,
-0.0162200927734375,
0.03204345703125,
0.0222625732421875,
0.005603790283203125,
0.0248260498046875,
-0.04229736328125,
-0.00972747802734375,
0.0113525390625,
-0.0030040740966796875,
-0.024810791015625,
0.0140228271484375,
-0.035247802734375,
0.003787994384765625,
-0.12188720703125,
-0.0113525390625,
-0.0024738311767578125,
-0.0550537109375,
0.042938232421875,
-0.00669097900390625,
0.00820159912109375,
0.013946533203125,
0.0091552734375,
0.0077667236328125,
-0.0172576904296875,
-0.00923919677734375,
-0.007904052734375,
0.038604736328125,
-0.0205078125,
0.0677490234375,
0.046844482421875,
-0.031494140625,
-0.066650390625,
0.00365447998046875,
0.05670166015625,
0.0297393798828125,
-0.060211181640625,
-0.052520751953125,
0.02093505859375,
0.0068359375,
0.01331329345703125,
0.029388427734375,
-0.002780914306640625,
0.02935791015625,
0.00978851318359375,
-0.0165252685546875,
-0.01873779296875,
0.0172576904296875,
0.01445770263671875,
-0.015350341796875,
-0.0174407958984375,
0.006984710693359375,
-0.01383209228515625,
0.036224365234375,
0.04901123046875,
0.08367919921875,
-0.04351806640625,
-0.0120391845703125,
0.026702880859375,
-0.0804443359375,
-0.03314208984375,
0.002445220947265625,
-0.02630615234375,
-0.0228271484375,
0.0017499923706054688,
0.0027313232421875,
-0.03179931640625,
-0.0008215904235839844,
0.0127410888671875,
-0.0114288330078125,
-0.01419830322265625,
0.00661468505859375,
0.0267486572265625,
-0.005504608154296875,
0.0439453125,
-0.0088653564453125,
0.0306243896484375,
-0.0184173583984375,
0.006008148193359375,
0.035797119140625,
-0.0276031494140625,
-0.057281494140625,
0.0161285400390625,
0.0013523101806640625,
-0.04010009765625,
-0.0014476776123046875,
0.022125244140625,
0.064697265625,
0.04949951171875,
0.006072998046875,
0.00850677490234375,
0.0013360977172851562,
0.06683349609375,
0.016998291015625,
-0.03631591796875,
0.02496337890625,
-0.0301055908203125,
-0.03125,
0.01210784912109375,
-0.0117645263671875,
-0.05975341796875,
-0.00978851318359375,
0.00772857666015625,
0.0158843994140625,
-0.039581298828125,
0.0010919570922851562,
0.034881591796875,
0.04571533203125,
-0.0007257461547851562,
0.00708770751953125,
-0.00308990478515625,
-0.0247802734375,
-0.00801849365234375,
-0.00415802001953125,
-0.030853271484375,
0.00800323486328125,
0.00452423095703125,
-0.025054931640625,
0.0262451171875,
0.0479736328125,
0.00536346435546875,
0.0138397216796875,
0.01131439208984375,
-0.050537109375,
-0.03033447265625,
-0.0219268798828125,
0.053253173828125,
-0.0214080810546875,
-0.005245208740234375,
-0.007061004638671875,
0.03509521484375,
-0.0022678375244140625,
-0.044219970703125,
0.0080108642578125,
-0.0038623809814453125,
0.00392913818359375,
0.0120086669921875,
0.0143585205078125,
0.00922393798828125,
-0.0139617919921875,
0.0236968994140625,
0.01439666748046875,
0.05059814453125,
0.0250396728515625,
-0.046478271484375,
0.0156097412109375,
-0.007640838623046875,
-0.0211944580078125,
0.049713134765625,
0.016571044921875,
0.03814697265625,
0.0007939338684082031,
0.06396484375,
-0.023651123046875,
-0.0035686492919921875,
0.03814697265625,
-0.040802001953125,
-0.022979736328125,
0.052734375,
0.02996826171875,
-0.01148223876953125,
-0.08612060546875,
-0.0147552490234375,
0.0182342529296875,
0.022735595703125,
0.0430908203125,
0.049346923828125,
0.032867431640625,
-0.0277862548828125,
0.0328369140625,
0.0391845703125,
0.024200439453125,
-0.038177490234375,
-0.016876220703125,
-0.03094482421875,
0.008209228515625,
-0.054351806640625,
0.0192108154296875,
0.033843994140625,
-0.0089263916015625,
-0.0197296142578125,
0.00519561767578125,
0.022308349609375,
0.00617218017578125,
-0.0133209228515625,
-0.056243896484375,
-0.0240325927734375,
-0.06732177734375,
-0.034210205078125,
0.00930023193359375,
-0.0092315673828125,
0.0194549560546875,
-0.01529693603515625,
0.00865936279296875,
-0.0011444091796875,
0.033538818359375,
0.04754638671875,
-0.0004792213439941406,
-0.0208892822265625,
0.01568603515625,
0.0112762451171875,
0.005626678466796875,
-0.0006632804870605469,
-0.003215789794921875,
-0.006160736083984375,
-0.0308837890625,
0.06915283203125,
0.0300140380859375,
0.038604736328125,
-0.0694580078125,
-0.046356201171875,
0.051513671875,
0.036346435546875,
0.01751708984375,
0.0302581787109375,
0.042236328125,
0.026092529296875,
-0.010162353515625,
-0.00017714500427246094,
0.0657958984375,
-0.02001953125,
-0.0010662078857421875,
-0.026153564453125,
0.01178741455078125,
0.0396728515625,
0.0147705078125,
0.006786346435546875,
0.0133514404296875,
0.05706787109375,
0.0005612373352050781,
-0.004550933837890625,
0.006725311279296875,
-0.01261138916015625,
0.0112152099609375,
0.013702392578125,
-0.006397247314453125,
0.02789306640625,
0.009490966796875,
-0.016021728515625,
0.006542205810546875,
0.023162841796875,
-0.00952911376953125,
0.018646240234375,
0.0362548828125,
0.00917816162109375,
0.02764892578125,
0.017822265625,
-0.01409149169921875,
0.007656097412109375,
-0.0173187255859375,
0.00904083251953125,
0.057464599609375,
0.01136016845703125,
-0.0240478515625,
-0.015289306640625,
0.0011072158813476562,
0.018096923828125,
0.015533447265625,
0.0189361572265625,
0.0090484619140625,
0.0262451171875,
0.0264434814453125,
-0.00037479400634765625,
-0.0197296142578125,
0.0022335052490234375,
-0.02557373046875,
-0.046051025390625,
0.004302978515625,
0.016021728515625,
-0.061126708984375,
-0.0176239013671875,
0.036468505859375,
-0.0006289482116699219,
0.0183258056640625,
-0.05181884765625,
0.031219482421875,
-0.017181396484375,
-0.0215606689453125,
-0.049468994140625,
-0.024139404296875,
-0.007251739501953125,
-0.0128936767578125,
-0.0015325546264648438,
-0.0430908203125,
-0.008270263671875,
-0.0280303955078125,
0.0229949951171875,
-0.039337158203125,
0.03753662109375,
0.0093994140625,
0.05377197265625,
0.033966064453125,
0.0029277801513671875,
-0.03826904296875,
0.0283050537109375,
-0.01064300537109375,
-0.01557159423828125,
0.01082611083984375,
0.03521728515625,
0.007091522216796875,
-0.09075927734375,
0.0051727294921875,
0.0302886962890625,
0.0025234222412109375,
-0.0621337890625,
-0.01374053955078125,
0.06097412109375,
-0.0227813720703125,
0.0217742919921875,
0.0594482421875,
0.0310516357421875,
0.0299530029296875,
-0.046722412109375,
-0.0208282470703125,
0.007808685302734375,
-0.0367431640625,
0.0009450912475585938,
0.01222991943359375,
0.01338958740234375,
0.01462554931640625,
-0.06292724609375,
0.042572021484375,
-0.01123046875,
0.01128387451171875,
0.002933502197265625,
-0.01071929931640625,
-0.0278472900390625,
-0.0249481201171875,
-0.0217742919921875,
-0.0235443115234375,
-0.0738525390625,
0.027496337890625,
-0.0283355712890625,
0.001804351806640625,
0.031005859375,
-0.028900146484375,
0.021331787109375,
-0.0128173828125,
0.020263671875,
0.03143310546875,
0.0177154541015625,
-0.028594970703125,
0.0038204193115234375,
-0.0219879150390625,
-0.0214691162109375,
-0.00450897216796875,
0.0447998046875,
-0.048919677734375,
-0.061798095703125,
0.00006717443466186523,
-0.01061248779296875,
-0.0002949237823486328,
-0.030487060546875,
0.0013265609741210938,
0.0181732177734375,
0.024322509765625,
-0.026397705078125,
-0.05426025390625,
-0.034912109375,
-0.0163421630859375,
0.07135009765625,
-0.00525665283203125,
-0.051422119140625,
-0.0506591796875,
0.036529541015625,
0.05047607421875,
-0.01233673095703125,
0.040008544921875,
0.030303955078125,
-0.004703521728515625,
0.07373046875,
0.06005859375,
0.01537322998046875,
0.0030117034912109375,
0.01352691650390625,
-0.0013189315795898438,
0.029449462890625,
-0.043121337890625,
-0.01490020751953125,
-0.00907135009765625,
0.0100555419921875,
-0.0292816162109375,
-0.04278564453125,
-0.006015777587890625,
0.023529052734375,
0.062225341796875,
0.053009033203125,
0.00913238525390625,
-0.0772705078125,
-0.0220184326171875,
0.0255126953125,
-0.005947113037109375,
-0.0203094482421875,
0.0007610321044921875,
-0.039642333984375,
-0.00789642333984375,
-0.0360107421875,
-0.0276031494140625,
0.03692626953125,
0.0197601318359375,
-0.023406982421875,
0.005298614501953125,
0.034271240234375,
-0.031982421875,
-0.04962158203125,
-0.059906005859375,
0.039154052734375,
-0.0253143310546875,
0.00884246826171875,
-0.0206756591796875,
0.055206298828125,
0.0078887939453125,
-0.0137176513671875,
-0.051055908203125,
-0.00449371337890625,
0.01558685302734375,
0.0208282470703125,
-0.0222930908203125,
0.01418304443359375,
-0.0142822265625,
0.031402587890625,
-0.00466156005859375,
0.0216522216796875,
0.010986328125,
0.022979736328125,
-0.0190277099609375,
0.04791259765625,
0.005306243896484375,
0.0088958740234375,
0.01103973388671875,
0.036346435546875,
-0.010162353515625,
0.03448486328125,
-0.02288818359375,
-0.00728607177734375,
-0.01447296142578125,
-0.006343841552734375,
-0.012969970703125,
0.01027679443359375,
-0.055206298828125,
-0.06585693359375,
0.0132904052734375,
-0.06396484375,
0.00826263427734375,
0.01427459716796875
]
|
48f5f379291cb14c4a3043ff3c36bad20c0c3d1f | Wordpress Stackexchange
Q: How to prevent spam users registering even with registration disabled I have Wordpress Multisite with bbPress. I've disabled new user registration from network settings but I still seem to get new registrations regardless. I've read that bbPress is most likely the cause but I don't know how to prevent the registration. I use Wanguard and bbPress moderation plugins so I am preventing them from actually posting anything but is there a way of stopping them from getting in to begin with?
A: This code should make it impossible to add a new user, as long as it is being added with wp_insert_user().
add_filter( 'pre_user_login', '__return_false' );
That filter is applied to the user's login name before it is saved. If the result is empty, the user isn't added. This will make it so the login will always be empty, so it will be impossible to add new users, even from the administration panels.
| Q: How to prevent spam users registering even with registration disabled I have Wordpress Multisite with bbPress. I've disabled new user registration from network settings but I still seem to get new registrations regardless. I've read that bbPress is most likely the cause but I don't know how to prevent the registration. I use Wanguard and bbPress moderation plugins so I am preventing them from actually posting anything but is there a way of stopping them from getting in to begin with?
A: This code should make it impossible to add a new user, as long as it is being added with wp_insert_user().
add_filter( 'pre_user_login', '__return_false' );
That filter is applied to the user's login name before it is saved. If the result is empty, the user isn't added. This will make it so the login will always be empty, so it will be impossible to add new users, even from the administration panels.
| wordpress | {
"language": "en",
"length": 154,
"provenance": "stackexchange_00019.jsonl.gz:438480",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119818"
} | [
0.09918212890625,
0.0204010009765625,
0.046539306640625,
-0.04864501953125,
0.0272369384765625,
-0.0201873779296875,
0.026397705078125,
-0.06573486328125,
0.0087738037109375,
0.0291595458984375,
-0.00331878662109375,
-0.0006666183471679688,
0.01204681396484375,
-0.023040771484375,
-0.0094757080078125,
-0.01654052734375,
-0.0233001708984375,
0.0203399658203125,
-0.003910064697265625,
-0.046539306640625,
0.0210723876953125,
-0.07208251953125,
0.00685882568359375,
-0.0212860107421875,
-0.0071868896484375,
-0.0229339599609375,
0.08538818359375,
-0.0249481201171875,
0.031341552734375,
-0.00672149658203125,
0.0173797607421875,
-0.023406982421875,
-0.00115203857421875,
0.048370361328125,
-0.0305938720703125,
-0.0428466796875,
-0.0006723403930664062,
0.0279388427734375,
0.018829345703125,
0.00124359130859375,
0.0223846435546875,
-0.0096282958984375,
0.0124969482421875,
-0.0145263671875,
-0.0024509429931640625,
-0.0277862548828125,
0.041046142578125,
-0.01520538330078125,
0.0487060546875,
-0.00951385498046875,
0.0257720947265625,
-0.0012302398681640625,
0.04046630859375,
-0.0250244140625,
-0.0261077880859375,
0.01142120361328125,
-0.056488037109375,
0.0290679931640625,
0.0325927734375,
0.0305023193359375,
-0.005611419677734375,
-0.0245361328125,
0.0101165771484375,
-0.03173828125,
0.0235443115234375,
-0.042755126953125,
-0.040679931640625,
0.041839599609375,
-0.059722900390625,
0.006984710693359375,
0.053680419921875,
-0.0496826171875,
-0.003376007080078125,
0.007633209228515625,
-0.0263824462890625,
-0.0245361328125,
-0.0132598876953125,
-0.036285400390625,
0.034759521484375,
0.01120758056640625,
-0.03997802734375,
-0.07073974609375,
-0.0230255126953125,
0.0028781890869140625,
-0.00909423828125,
0.050994873046875,
-0.0175628662109375,
0.0104217529296875,
-0.0167694091796875,
0.002925872802734375,
-0.01219940185546875,
-0.028564453125,
-0.0199737548828125,
0.053253173828125,
-0.003997802734375,
0.011199951171875,
0.04339599609375,
0.0447998046875,
-0.0282440185546875,
-0.04144287109375,
0.0160980224609375,
-0.0341796875,
-0.0299072265625,
-0.0009694099426269531,
0.0023365020751953125,
0.080322265625,
0.0060577392578125,
-0.005435943603515625,
-0.00017571449279785156,
0.01108551025390625,
0.020233154296875,
-0.01195526123046875,
-0.0233001708984375,
-0.01155853271484375,
-0.02569580078125,
0.0223388671875,
-0.03729248046875,
-0.0088348388671875,
-0.01352691650390625,
-0.0174102783203125,
-0.0015850067138671875,
0.031707763671875,
0.0098876953125,
-0.03314208984375,
-0.005359649658203125,
-0.0207366943359375,
-0.02410888671875,
-0.0224151611328125,
-0.0229644775390625,
-0.013916015625,
-0.03656005859375,
0.014862060546875,
0.060638427734375,
0.034210205078125,
0.0147552490234375,
-0.0024433135986328125,
0.016693115234375,
-0.01751708984375,
-0.013763427734375,
0.032928466796875,
-0.0097503662109375,
-0.055328369140625,
-0.024749755859375,
-0.0212554931640625,
0.014312744140625,
0.0239105224609375,
-0.0013885498046875,
0.009307861328125,
0.0250701904296875,
-0.0081329345703125,
-0.0167236328125,
-0.0389404296875,
0.025634765625,
0.007801055908203125,
-0.0076751708984375,
0.034637451171875,
0.0178070068359375,
0.01531982421875,
-0.0701904296875,
-0.007091522216796875,
0.0249786376953125,
0.0027637481689453125,
0.0279083251953125,
-0.0279388427734375,
-0.04595947265625,
-0.0222015380859375,
-0.06011962890625,
-0.0214996337890625,
0.01311492919921875,
-0.01392364501953125,
0.0086669921875,
0.03619384765625,
0.0259552001953125,
-0.00753021240234375,
0.00945281982421875,
-0.0196380615234375,
0.0222625732421875,
0.0274658203125,
0.0234222412109375,
0.032135009765625,
-0.004383087158203125,
-0.0225067138671875,
0.1058349609375,
-0.04107666015625,
-0.05859375,
0.0296630859375,
-0.00799560546875,
0.037078857421875,
0.036956787109375,
-0.0141143798828125,
0.042816162109375,
0.0215911865234375,
0.00933074951171875,
-0.02154541015625,
0.013336181640625,
-0.061248779296875,
0.038909912109375,
-0.027557373046875,
0.0185394287109375,
0.035400390625,
0.0126190185546875,
-0.0168914794921875,
0.043975830078125,
-0.029998779296875,
-0.010284423828125,
-0.00860595703125,
-0.004001617431640625,
0.0243988037109375,
-0.0180816650390625,
0.024993896484375,
0.0237274169921875,
0.008575439453125,
-0.03411865234375,
0.020751953125,
0.00934600830078125,
-0.0035419464111328125,
-0.04400634765625,
0.0562744140625,
0.0022716522216796875,
0.056610107421875,
-0.007518768310546875,
-0.020721435546875,
0.017974853515625,
-0.051361083984375,
0.006359100341796875,
-0.039886474609375,
-0.006320953369140625,
-0.025177001953125,
-0.00949859619140625,
-0.0089874267578125,
0.0091705322265625,
0.04718017578125,
-0.02459716796875,
-0.017425537109375,
-0.043121337890625,
-0.002231597900390625,
-0.0175018310546875,
-0.010406494140625,
0.0061798095703125,
0.033111572265625,
0.0264892578125,
0.00917816162109375,
0.0205078125,
0.04217529296875,
0.0164337158203125,
-0.0244140625,
0.010498046875,
0.01096343994140625,
0.0160980224609375,
0.046905517578125,
0.0186920166015625,
-0.0009093284606933594,
0.007595062255859375,
-0.005512237548828125,
0.01383209228515625,
0.0111541748046875,
-0.0112152099609375,
-0.038909912109375,
0.0082244873046875,
-0.0037384033203125,
0.01491546630859375,
-0.034881591796875,
-0.0270843505859375,
-0.0130157470703125,
-0.046844482421875,
-0.02154541015625,
-0.00881195068359375,
-0.00719451904296875,
0.05029296875,
-0.044219970703125,
0.002300262451171875,
-0.08184814453125,
-0.0023441314697265625,
-0.041259765625,
0.042449951171875,
0.016387939453125,
-0.044891357421875,
0.009918212890625,
0.046630859375,
-0.0092620849609375,
-0.039031982421875,
-0.045867919921875,
0.0181884765625,
0.0016689300537109375,
0.004589080810546875,
-0.045684814453125,
0.06658935546875,
-0.0182952880859375,
-0.07293701171875,
-0.07867431640625,
-0.03240966796875,
0.045257568359375,
-0.016876220703125,
0.004932403564453125,
-0.0156707763671875,
-0.0108642578125,
-0.044464111328125,
-0.0249481201171875,
0.0229339599609375,
-0.0204925537109375,
0.01349639892578125,
0.0794677734375,
0.0286102294921875,
-0.0149688720703125,
0.00832366943359375,
-0.0006151199340820312,
0.00518035888671875,
0.0148162841796875,
0.00685882568359375,
-0.017913818359375,
-0.035675048828125,
0.019805908203125,
0.01320648193359375,
0.023406982421875,
0.0016794204711914062,
-0.0203704833984375,
0.0032863616943359375,
0.01169586181640625,
0.004222869873046875,
0.0288238525390625,
-0.10638427734375,
-0.01375579833984375,
0.0300750732421875,
0.0148468017578125,
0.017486572265625,
0.0011014938354492188,
0.0246734619140625,
0.034912109375,
0.004535675048828125,
-0.04290771484375,
-0.038116455078125,
-0.052764892578125,
-0.036834716796875,
0.0261688232421875,
0.00033164024353027344,
-0.01385498046875,
0.0017728805541992188,
0.041900634765625,
-0.0023899078369140625,
-0.0207672119140625,
-0.004024505615234375,
-0.0167999267578125,
-0.0103759765625,
-0.0280303955078125,
-0.0254974365234375,
-0.00501251220703125,
0.0271453857421875,
0.007232666015625,
-0.00855255126953125,
0.01511383056640625,
0.0097808837890625,
-0.028106689453125,
0.0237579345703125,
-0.049957275390625,
0.020538330078125,
0.019195556640625,
-0.033782958984375,
-0.05572509765625,
0.0186767578125,
-0.0621337890625,
0.00476837158203125,
-0.007465362548828125,
-0.039794921875,
-0.020294189453125,
0.01885986328125,
-0.0238800048828125,
0.033203125,
-0.03668212890625,
0.034942626953125,
-0.0006427764892578125,
-0.0204010009765625,
-0.023223876953125,
0.040557861328125,
0.00841522216796875,
0.049041748046875,
-0.0015239715576171875,
0.030914306640625,
-0.027740478515625,
-0.00800323486328125,
-0.008148193359375,
-0.01983642578125,
-0.046539306640625,
0.0237274169921875,
-0.0494384765625,
-0.043914794921875,
0.0316162109375,
-0.0247039794921875,
0.043609619140625,
-0.056549072265625,
-0.01441192626953125,
-0.01934814453125,
0.1036376953125,
-0.0347900390625,
0.0003991127014160156,
0.0029582977294921875,
-0.0008635520935058594,
-0.037994384765625,
-0.00861358642578125,
-0.063232421875,
-0.0046844482421875,
0.0162811279296875,
-0.043182373046875,
-0.041351318359375,
-0.0137786865234375,
0.01047515869140625,
-0.059600830078125,
0.021331787109375,
-0.025177001953125,
0.060028076171875,
-0.037811279296875,
0.033721923828125,
-0.01528167724609375,
0.0214691162109375,
-0.065673828125,
-0.04229736328125,
0.00862884521484375,
-0.052276611328125,
0.0003769397735595703,
-0.037322998046875,
0.0268707275390625,
0.006809234619140625,
0.0205230712890625,
-0.029541015625,
0.0022029876708984375,
0.0235443115234375,
0.0022182464599609375,
0.03369140625,
-0.00289154052734375,
0.049530029296875,
-0.005130767822265625,
0.004177093505859375,
-0.03851318359375,
0.01183319091796875,
0.00604248046875,
-0.03436279296875,
-0.0092010498046875,
-0.053558349609375,
-0.019622802734375,
-0.0016698837280273438,
-0.0340576171875,
-0.034088134765625,
-0.060394287109375,
0.004184722900390625,
-0.00644683837890625,
0.006206512451171875,
-0.016357421875,
-0.04718017578125,
-0.0151214599609375,
0.01190948486328125,
-0.0298614501953125,
0.004802703857421875,
0.01096343994140625,
0.060028076171875,
0.0170745849609375,
0.00628662109375,
0.01485443115234375,
0.043853759765625,
0.0306854248046875,
-0.0107879638671875,
0.00800323486328125,
0.00296783447265625,
-0.00699615478515625,
0.01983642578125,
-0.0128936767578125,
0.0018558502197265625,
0.0011186599731445312,
0.023590087890625,
-0.0087127685546875,
-0.0261993408203125,
0.007965087890625,
-0.03277587890625,
0.0206298828125,
0.047027587890625,
0.01042938232421875,
-0.022064208984375,
0.00891876220703125,
0.02667236328125,
0.006622314453125,
-0.0265350341796875,
-0.03143310546875,
-0.039276123046875,
0.0209197998046875,
-0.037628173828125,
-0.0191802978515625,
-0.0291900634765625,
0.028961181640625,
-0.033843994140625,
-0.0164794921875,
-0.017608642578125,
-0.005428314208984375,
-0.04071044921875,
0.00603485107421875,
0.022064208984375,
-0.03643798828125,
-0.006687164306640625,
0.0154266357421875,
-0.0154266357421875,
0.0484619140625,
0.0102996826171875,
-0.03863525390625,
0.00359344482421875,
-0.01122283935546875,
0.00872802734375,
0.0211029052734375,
0.0304718017578125,
0.02349853515625,
0.00579833984375,
-0.0113677978515625,
-0.0198822021484375,
0.0263519287109375,
0.003063201904296875,
-0.042266845703125,
-0.0160369873046875,
-0.0012922286987304688,
-0.01873779296875,
0.007251739501953125,
-0.00047087669372558594,
0.03460693359375,
-0.0181121826171875,
-0.01454925537109375,
0.041748046875,
0.064697265625,
-0.01061248779296875,
0.0291290283203125,
0.0167694091796875,
-0.042388916015625,
0.003284454345703125,
-0.0100860595703125,
-0.00716400146484375,
0.02398681640625,
0.030181884765625,
0.028961181640625,
0.035797119140625,
-0.0081634521484375,
-0.016815185546875,
-0.0540771484375,
-0.0252227783203125,
0.03668212890625,
0.0141143798828125,
-0.023712158203125,
-0.057037353515625,
-0.0166473388671875,
0.031585693359375,
0.00826263427734375,
0.0340576171875,
-0.0521240234375,
-0.0019989013671875,
-0.0322265625,
0.0163726806640625,
-0.0149688720703125,
-0.053619384765625,
-0.03533935546875,
-0.004138946533203125,
-0.043212890625,
-0.00792694091796875,
-0.00319671630859375,
0.043487548828125,
-0.037750244140625,
-0.0249786376953125,
0.01357269287109375,
-0.0180816650390625,
0.0007581710815429688,
-0.0286102294921875,
0.030426025390625,
-0.05389404296875,
0.0140228271484375,
0.029052734375,
0.007175445556640625,
0.0037021636962890625,
0.0029697418212890625,
-0.04180908203125,
-0.051055908203125,
-0.045867919921875,
-0.029632568359375,
-0.0308990478515625,
-0.00006896257400512695,
0.040802001953125,
0.02496337890625,
-0.0244140625,
-0.07562255859375,
-0.011810302734375,
0.0083770751953125,
0.05126953125,
0.04364013671875,
-0.050018310546875,
0.018463134765625,
0.0262908935546875,
0.0201416015625,
-0.00919342041015625,
0.0038394927978515625,
0.0379638671875,
-0.0166168212890625,
0.00420379638671875,
-0.02935791015625,
-0.0161285400390625,
0.0088958740234375,
-0.019744873046875,
0.011322021484375,
0.038818359375,
-0.005462646484375,
-0.016021728515625,
-0.004108428955078125,
0.003086090087890625,
-0.0153350830078125,
0.01136016845703125,
0.0189971923828125,
-0.00634002685546875,
-0.0005207061767578125,
-0.04010009765625,
-0.01390838623046875,
0.01543426513671875,
-0.01519012451171875,
0.04046630859375,
-0.02569580078125,
0.01300811767578125,
0.0194091796875,
-0.006317138671875,
0.01192474365234375,
-0.0018033981323242188,
0.0031566619873046875,
0.0270843505859375,
-0.00957489013671875,
0.0307464599609375,
0.01021575927734375,
0.01000213623046875,
-0.0252685546875,
-0.018310546875,
0.04522705078125,
0.0187530517578125,
-0.007061004638671875,
0.038787841796875,
-0.01483917236328125,
0.005725860595703125,
0.06634521484375,
0.0435791015625,
-0.09332275390625,
0.002117156982421875,
0.001434326171875,
-0.004726409912109375,
-0.013458251953125,
0.014984130859375,
-0.0157012939453125,
-0.0248870849609375,
0.042022705078125,
-0.053497314453125,
-0.00601959228515625,
0.0142059326171875,
-0.006519317626953125,
-0.0173187255859375,
0.0294647216796875,
0.03662109375,
0.0117340087890625,
0.0179595947265625,
-0.022186279296875,
-0.022186279296875,
0.02606201171875,
-0.0247039794921875,
-0.004421234130859375,
0.0124664306640625,
-0.02386474609375,
-0.0855712890625,
-0.035186767578125,
-0.0026702880859375,
-0.0146331787109375,
0.00875091552734375,
0.00893402099609375,
0.068359375,
0.0271759033203125,
0.0307159423828125,
-0.0244293212890625,
0.004428863525390625,
0.0135650634765625,
0.022552490234375,
-0.0293731689453125,
0.0010309219360351562,
-0.037445068359375,
0.0024967193603515625,
0.00881195068359375,
0.01422119140625,
-0.054046630859375,
-0.005451202392578125,
-0.0303497314453125,
0.03839111328125,
-0.0102386474609375,
-0.0241241455078125,
0.0206298828125,
-0.01442718505859375,
-0.003658294677734375,
-0.031463623046875,
-0.01070404052734375,
-0.05780029296875,
-0.01470947265625,
-0.0191802978515625,
-0.0234375,
0.0220489501953125,
-0.006786346435546875,
-0.08477783203125,
0.05908203125,
-0.0095367431640625,
0.045135498046875,
-0.00177764892578125,
0.00809478759765625,
-0.00540924072265625,
-0.01580810546875,
-0.047088623046875,
0.04486083984375,
-0.020751953125,
0.0897216796875,
-0.05499267578125,
-0.0035381317138671875,
0.044219970703125,
0.031982421875,
0.071044921875,
0.01255035400390625,
-0.0184326171875,
-0.00443267822265625,
0.03509521484375,
0.0098114013671875,
-0.032989501953125,
0.043487548828125,
-0.0203704833984375,
0.0225830078125,
0.04803466796875,
-0.050567626953125,
0.0217132568359375,
0.024627685546875,
-0.0263671875,
-0.0002949237823486328,
-0.0294647216796875,
-0.047454833984375,
-0.008453369140625,
0.01690673828125,
-0.0289306640625,
-0.01139068603515625,
-0.001636505126953125,
0.01262664794921875,
-0.0286102294921875,
0.03521728515625,
-0.0240478515625,
-0.0069580078125,
0.05865478515625,
-0.046417236328125,
0.041656494140625,
-0.019989013671875,
0.019989013671875,
0.038421630859375,
0.0294952392578125,
0.01280975341796875,
0.002777099609375,
0.013946533203125,
0.00872802734375,
-0.01026153564453125,
-0.00739288330078125,
0.02447509765625,
0.034027099609375,
-0.0631103515625,
-0.09405517578125,
0.090087890625,
0.0543212890625,
-0.0009489059448242188,
-0.060943603515625,
0.0290679931640625,
0.0275115966796875,
0.003017425537109375,
0.058807373046875,
0.0570068359375,
-0.004711151123046875,
0.0611572265625,
-0.040069580078125,
-0.010833740234375,
0.0330810546875,
0.01258087158203125,
-0.002506256103515625,
0.01432037353515625,
0.01187896728515625,
-0.0404052734375,
-0.016632080078125,
-0.0196533203125,
0.032562255859375,
0.0022182464599609375,
0.0113677978515625,
0.0247802734375,
0.060882568359375,
0.0026035308837890625,
-0.032379150390625,
0.0198822021484375,
0.0258941650390625,
0.029083251953125,
-0.033599853515625,
-0.011260986328125,
0.043304443359375,
0.028564453125,
-0.0174407958984375,
0.038177490234375,
0.056671142578125,
0.0655517578125,
-0.0222320556640625,
-0.0157470703125,
0.07891845703125,
-0.0165557861328125,
-0.01280975341796875,
-0.01390838623046875,
-0.041656494140625,
-0.0188140869140625,
-0.0303955078125,
-0.0220794677734375,
0.0148162841796875,
0.004669189453125,
0.01209259033203125,
0.0184783935546875,
-0.0015916824340820312,
-0.0091094970703125,
0.0355224609375,
-0.0026092529296875,
0.01354217529296875,
0.02459716796875,
-0.115966796875,
-0.039093017578125,
-0.0170745849609375,
-0.0361328125,
0.0313720703125,
0.0452880859375,
-0.0218658447265625,
0.0076904296875,
0.0264892578125,
-0.018035888671875,
0.034942626953125,
-0.0311126708984375,
0.0194244384765625,
-0.00653839111328125,
-0.00838470458984375,
-0.00614166259765625,
-0.044952392578125,
-0.004058837890625,
0.037078857421875,
-0.0007128715515136719,
-0.059844970703125,
0.093505859375,
-0.0153961181640625,
-0.042266845703125,
-0.028900146484375,
-0.013580322265625,
0.0214385986328125,
-0.02117919921875,
0.01336669921875,
0.05108642578125,
0.00006502866744995117,
-0.0281829833984375,
-0.0648193359375,
0.05865478515625,
0.01387786865234375,
0.02838134765625,
0.0621337890625,
-0.00843048095703125,
-0.00669097900390625,
-0.00336456298828125,
0.0245513916015625,
-0.0310821533203125,
-0.037017822265625,
-0.06781005859375,
0.001621246337890625,
0.0194549560546875,
0.00041961669921875,
-0.0484619140625,
0.025787353515625,
-0.0136871337890625,
-0.032073974609375,
-0.034820556640625,
-0.024383544921875,
-0.052978515625,
0.029632568359375,
0.00608062744140625,
-0.004726409912109375,
-0.0105743408203125,
-0.0167083740234375,
-0.0169830322265625,
0.01517486572265625,
-0.022918701171875,
0.0217132568359375,
-0.0292205810546875,
0.011383056640625,
0.01503753662109375,
0.0313720703125,
-0.01425933837890625,
0.0144500732421875,
0.027740478515625,
-0.01419830322265625,
0.0010251998901367188,
-0.0340576171875,
-0.03314208984375,
-0.03228759765625,
-0.00408935546875,
0.02899169921875,
-0.02862548828125,
-0.04205322265625,
-0.0775146484375,
0.006572723388671875,
0.032379150390625,
0.0010967254638671875,
-0.07122802734375,
0.028076171875,
-0.03216552734375,
0.041961669921875,
-0.0256195068359375,
-0.0266876220703125,
-0.0026702880859375,
0.021728515625,
-0.003204345703125,
-0.00971221923828125,
-0.016143798828125,
0.0247955322265625,
0.0018186569213867188,
-0.0141448974609375,
0.034759521484375,
0.022491455078125,
-0.01313018798828125,
-0.0478515625,
-0.0572509765625,
-0.000021398067474365234,
-0.0643310546875,
-0.006595611572265625,
0.021636962890625,
-0.014373779296875,
0.004528045654296875,
-0.036285400390625,
-0.0235595703125,
-0.016021728515625,
-0.01163482666015625,
-0.05670166015625,
0.044464111328125,
0.031890869140625,
-0.0272674560546875,
-0.07733154296875,
0.016571044921875,
-0.020050048828125,
-0.041229248046875,
-0.08282470703125,
0.0178680419921875,
0.0155029296875,
-0.056884765625,
-0.052276611328125,
-0.003009796142578125,
-0.0224609375,
0.0513916015625,
0.0284271240234375,
-0.03192138671875,
0.043853759765625,
0.0084686279296875,
-0.025970458984375,
0.030670166015625,
0.03680419921875,
0.00641632080078125,
-0.0209503173828125,
-0.0015897750854492188,
0.04461669921875,
0.050323486328125,
-0.0018253326416015625,
0.076171875,
0.03466796875,
-0.02301025390625,
-0.0269012451171875,
-0.0657958984375,
-0.0021209716796875,
-0.03839111328125,
0.07958984375,
0.027587890625,
0.0003504753112792969,
-0.0189208984375,
-0.047576904296875,
-0.024169921875,
0.0179443359375,
0.0037364959716796875,
0.0087432861328125,
-0.0648193359375,
-0.0008778572082519531,
-0.004505157470703125,
-0.002178192138671875,
-0.01146697998046875,
-0.006870269775390625,
-0.032989501953125,
-0.00443267822265625,
0.0021991729736328125,
-0.00911712646484375,
-0.00598907470703125,
-0.02557373046875,
-0.001678466796875,
-0.02313232421875,
-0.045166015625,
-0.023040771484375,
0.0210113525390625,
-0.059539794921875,
-0.0394287109375,
-0.0120697021484375,
0.006069183349609375,
-0.0399169921875,
0.020233154296875,
-0.00026416778564453125,
0.01535797119140625,
-0.044708251953125,
0.00980377197265625,
0.01430511474609375,
0.045318603515625,
0.004360198974609375,
0.0697021484375,
0.005290985107421875,
0.033782958984375,
0.012603759765625,
0.0008111000061035156,
0.01141357421875,
-0.039764404296875,
-0.03204345703125,
0.04638671875,
0.0218505859375,
-0.02764892578125,
0.0325927734375,
-0.0112457275390625,
0.00864410400390625,
0.028228759765625,
-0.01300811767578125,
-0.005710601806640625,
0.0161285400390625,
-0.0258941650390625,
0.017181396484375,
-0.005558013916015625
]
|
796a91d6fe3ec028f23bf22ed64f036cd72812fa | Wordpress Stackexchange
Q: Custom Post Type Archive in Sub Folder I have a sub-directory in my Wordpress theme (there are a lot of pages and I want a more logical structure). I have a custom post type called "entry" but if I place the archive-entry.php template in my sub-directory it is no longer picked up by the theme.
Is there a way I can put my custom post type archive templates in a sub-directory?
A: Unlike page templates, WordPress doesn't look in subdirectories for post template pages. The base function used for locating such templates is locate_template() (see source), which looks in the root directory of your theme (and parent theme).
(On the other hand get_page_templates() searches sub-directory).
You can use template_include filter (which filters the absolute path to your template) to change the template used:
add_filter( 'template_include', 'wpse119820_use_different_template' );
function wpse119820_use_different_template( $template ){
if( is_post_type_archive( 'entry' ) ){
//"Entry" Post type archive. Find template in sub-dir. Look in child then parent theme
if( $_template = locate_template( 'my-sub-dir/archive-entry.php' ) ){
//Template found, - use that
$template = $_template;
}
}
return $template;
}
| Q: Custom Post Type Archive in Sub Folder I have a sub-directory in my Wordpress theme (there are a lot of pages and I want a more logical structure). I have a custom post type called "entry" but if I place the archive-entry.php template in my sub-directory it is no longer picked up by the theme.
Is there a way I can put my custom post type archive templates in a sub-directory?
A: Unlike page templates, WordPress doesn't look in subdirectories for post template pages. The base function used for locating such templates is locate_template() (see source), which looks in the root directory of your theme (and parent theme).
(On the other hand get_page_templates() searches sub-directory).
You can use template_include filter (which filters the absolute path to your template) to change the template used:
add_filter( 'template_include', 'wpse119820_use_different_template' );
function wpse119820_use_different_template( $template ){
if( is_post_type_archive( 'entry' ) ){
//"Entry" Post type archive. Find template in sub-dir. Look in child then parent theme
if( $_template = locate_template( 'my-sub-dir/archive-entry.php' ) ){
//Template found, - use that
$template = $_template;
}
}
return $template;
}
A: As explained by @StephenHarris, the template loader does not do this by default.
While Stephen's answer looks fine to me, I was working on one before he posted and it is a bit different. I used the archive_template hook and generated the template name using get_queried_object.
add_action(
'archive_template',
function($template) {
$path = pathinfo($template);
if (!empty($path['filename'] && 'archive' === $path['filename']) {
$pg = get_queried_object();
if (!empty($pg->name)) {
$t = locate_template('archive/'.$pg->name.'.php');
if (!empty($t)) {
$template = $t;
}
}
}
return $template;
}
);
It is rough code. It may be buggy.
| wordpress | {
"language": "en",
"length": 272,
"provenance": "stackexchange_00019.jsonl.gz:438481",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119820"
} | [
0.043304443359375,
-0.0123291015625,
0.004199981689453125,
-0.0009675025939941406,
0.00399017333984375,
-0.03924560546875,
0.061126708984375,
-0.0367431640625,
-0.00263214111328125,
0.01113128662109375,
-0.004856109619140625,
-0.041900634765625,
-0.004016876220703125,
-0.036529541015625,
-0.0167999267578125,
-0.046417236328125,
0.025543212890625,
-0.05718994140625,
-0.01094818115234375,
-0.0254669189453125,
0.0230712890625,
-0.0080413818359375,
0.0091400146484375,
0.0128021240234375,
0.0027980804443359375,
0.036865234375,
0.0950927734375,
0.015350341796875,
-0.0084686279296875,
-0.005126953125,
0.0219573974609375,
-0.03033447265625,
0.0302581787109375,
-0.0093231201171875,
0.0218658447265625,
0.0625,
-0.014129638671875,
0.0080108642578125,
0.0175018310546875,
-0.00435638427734375,
-0.0087738037109375,
0.011138916015625,
0.017730712890625,
-0.0176544189453125,
-0.0096282958984375,
-0.029876708984375,
0.0084228515625,
-0.028045654296875,
0.032562255859375,
0.02490234375,
0.0165557861328125,
0.000904083251953125,
0.01611328125,
-0.043182373046875,
-0.003498077392578125,
0.00690460205078125,
-0.0083160400390625,
0.002231597900390625,
0.03253173828125,
-0.0369873046875,
-0.0333251953125,
-0.01383209228515625,
0.036834716796875,
0.0211029052734375,
0.02081298828125,
-0.002323150634765625,
0.024871826171875,
0.01030731201171875,
-0.048919677734375,
0.0283203125,
0.0445556640625,
-0.03558349609375,
0.0182647705078125,
-0.033233642578125,
-0.0208892822265625,
-0.01873779296875,
0.03216552734375,
-0.021087646484375,
-0.0022411346435546875,
-0.0099029541015625,
0.0022945404052734375,
0.01119232177734375,
-0.0181427001953125,
-0.0416259765625,
0.0167083740234375,
-0.011322021484375,
-0.0176849365234375,
-0.01180267333984375,
-0.03216552734375,
0.0225372314453125,
-0.0278778076171875,
-0.054901123046875,
0.036956787109375,
0.0213775634765625,
-0.0185546875,
0.006610870361328125,
0.0166778564453125,
0.07464599609375,
-0.023895263671875,
0.025787353515625,
-0.00978851318359375,
-0.0284423828125,
0.054779052734375,
-0.064453125,
0.0257568359375,
0.034759521484375,
0.0004353523254394531,
0.0225372314453125,
0.06268310546875,
0.0139617919921875,
0.007213592529296875,
0.041839599609375,
-0.011566162109375,
-0.039794921875,
-0.028045654296875,
0.047515869140625,
-0.002170562744140625,
-0.0240478515625,
0.0164031982421875,
-0.00015628337860107422,
0.031951904296875,
0.039520263671875,
0.039947509765625,
-0.042572021484375,
-0.0010519027709960938,
-0.00902557373046875,
-0.040863037109375,
-0.055267333984375,
0.018707275390625,
0.032958984375,
-0.0275115966796875,
-0.004009246826171875,
0.00797271728515625,
-0.012786865234375,
-0.0218048095703125,
-0.018524169921875,
0.005268096923828125,
-0.00536346435546875,
0.008544921875,
-0.012115478515625,
0.0484619140625,
-0.01448822021484375,
-0.01904296875,
0.03411865234375,
-0.0221710205078125,
0.04168701171875,
0.0173187255859375,
0.01026153564453125,
-0.0205841064453125,
-0.0806884765625,
0.00571441650390625,
-0.029449462890625,
0.046417236328125,
-0.0278472900390625,
-0.00341033935546875,
-0.0770263671875,
-0.004863739013671875,
-0.035003662109375,
0.0190582275390625,
-0.04656982421875,
-0.0023517608642578125,
-0.0026187896728515625,
0.0229034423828125,
-0.025115966796875,
-0.042938232421875,
0.0236968994140625,
-0.022705078125,
-0.017791748046875,
0.0158233642578125,
0.02642822265625,
0.020721435546875,
-0.012237548828125,
-0.0270843505859375,
0.0004911422729492188,
0.0020656585693359375,
-0.008880615234375,
-0.015594482421875,
0.026275634765625,
0.004482269287109375,
0.05712890625,
0.01898193359375,
-0.0377197265625,
0.01398468017578125,
0.0170135498046875,
-0.04266357421875,
0.0008420944213867188,
0.02215576171875,
0.0094146728515625,
-0.01554107666015625,
0.01511383056640625,
0.054351806640625,
0.058990478515625,
-0.05126953125,
0.02398681640625,
0.00496673583984375,
-0.01220703125,
-0.0098114013671875,
0.0011081695556640625,
-0.006954193115234375,
-0.00475311279296875,
-0.0538330078125,
0.0110015869140625,
0.003780364990234375,
0.0265655517578125,
-0.021026611328125,
0.0213623046875,
-0.0223541259765625,
0.036346435546875,
0.008392333984375,
0.015655517578125,
0.00855255126953125,
-0.00302886962890625,
-0.002994537353515625,
-0.044219970703125,
-0.0243988037109375,
0.022796630859375,
0.0006237030029296875,
0.0137176513671875,
-0.0217742919921875,
0.029510498046875,
-0.02886962890625,
-0.033966064453125,
-0.046112060546875,
0.006092071533203125,
0.0504150390625,
0.030181884765625,
-0.040283203125,
0.00600433349609375,
-0.01183319091796875,
0.07171630859375,
-0.13818359375,
0.01910400390625,
0.005756378173828125,
-0.007068634033203125,
-0.041717529296875,
-0.00504302978515625,
-0.031646728515625,
-0.03582763671875,
-0.015045166015625,
0.05657958984375,
0.026123046875,
0.06585693359375,
0.004856109619140625,
0.0312042236328125,
0.093017578125,
-0.0283966064453125,
-0.00913238525390625,
0.00620269775390625,
0.021942138671875,
0.053619384765625,
-0.0218048095703125,
-0.0014390945434570312,
0.0034332275390625,
-0.031494140625,
0.00336456298828125,
0.032012939453125,
0.01207733154296875,
0.0028514862060546875,
0.033477783203125,
0.0128631591796875,
-0.01448822021484375,
0.0361328125,
-0.0030670166015625,
0.0129241943359375,
0.049713134765625,
0.035552978515625,
0.049652099609375,
0.0222015380859375,
-0.04339599609375,
0.031951904296875,
0.03363037109375,
0.0023670196533203125,
0.01180267333984375,
0.01029205322265625,
0.01287078857421875,
0.03045654296875,
-0.04681396484375,
0.003993988037109375,
0.031005859375,
0.0109100341796875,
0.006099700927734375,
0.05377197265625,
-0.026336669921875,
-0.0064239501953125,
-0.043365478515625,
-0.10321044921875,
0.00128173828125,
0.0726318359375,
0.004543304443359375,
0.0033969879150390625,
0.0149078369140625,
0.04248046875,
0.005657196044921875,
0.0243988037109375,
-0.004253387451171875,
0.0017194747924804688,
0.054901123046875,
-0.041961669921875,
0.05194091796875,
-0.03173828125,
0.04583740234375,
0.0562744140625,
-0.037628173828125,
0.01493072509765625,
-0.01506805419921875,
0.0117340087890625,
-0.006832122802734375,
0.0098114013671875,
-0.037689208984375,
-0.0667724609375,
-0.00951385498046875,
-0.004558563232421875,
0.0157012939453125,
0.047698974609375,
-0.00042247772216796875,
-0.026458740234375,
0.0215606689453125,
0.0200042724609375,
-0.01503753662109375,
-0.04119873046875,
0.054779052734375,
-0.067626953125,
0.0037403106689453125,
-0.02838134765625,
-0.044830322265625,
-0.04217529296875,
-0.00434112548828125,
-0.00473785400390625,
0.0181427001953125,
-0.02764892578125,
-0.023956298828125,
-0.045501708984375,
-0.06280517578125,
-0.0679931640625,
0.01018524169921875,
-0.00896453857421875,
-0.002349853515625,
0.09716796875,
0.0198516845703125,
-0.09320068359375,
-0.0031414031982421875,
0.06689453125,
-0.02886962890625,
0.021484375,
0.030303955078125,
-0.048492431640625,
0.0263671875,
0.0032825469970703125,
0.012481689453125,
0.0172271728515625,
-0.00658416748046875,
-0.0226593017578125,
-0.0258636474609375,
-0.031402587890625,
-0.007549285888671875,
0.04510498046875,
0.03338623046875,
-0.023223876953125,
0.0274810791015625,
-0.04449462890625,
-0.0411376953125,
-0.041168212890625,
-0.053131103515625,
0.068115234375,
0.045135498046875,
0.0003287792205810547,
-0.0167388916015625,
0.03533935546875,
0.01438140869140625,
0.0301513671875,
0.0207061767578125,
-0.03375244140625,
0.03033447265625,
0.0037097930908203125,
0.0159149169921875,
-0.0245208740234375,
0.034759521484375,
-0.0267791748046875,
0.026641845703125,
0.037872314453125,
-0.00815582275390625,
-0.004550933837890625,
-0.0094451904296875,
-0.0155029296875,
-0.08612060546875,
0.047210693359375,
-0.034698486328125,
-0.025146484375,
-0.0406494140625,
-0.0185546875,
0.0108795166015625,
0.07598876953125,
-0.059600830078125,
-0.0012378692626953125,
-0.0234832763671875,
-0.01015472412109375,
0.034088134765625,
-0.0178680419921875,
-0.03228759765625,
-0.017303466796875,
-0.04034423828125,
0.00218963623046875,
-0.023193359375,
-0.006824493408203125,
0.00012445449829101562,
-0.0021381378173828125,
-0.006893157958984375,
-0.035186767578125,
0.02044677734375,
-0.0240325927734375,
0.0304107666015625,
0.00824737548828125,
0.0274658203125,
-0.03326416015625,
-0.010894775390625,
-0.040985107421875,
-0.05517578125,
-0.0187835693359375,
-0.0128631591796875,
0.037261962890625,
0.0177459716796875,
-0.0268707275390625,
-0.004909515380859375,
0.0418701171875,
0.004917144775390625,
-0.019378662109375,
-0.0063934326171875,
0.0150604248046875,
-0.040313720703125,
-0.0082244873046875,
-0.01031494140625,
-0.0173797607421875,
0.01078033447265625,
-0.001064300537109375,
-0.05963134765625,
0.0216064453125,
-0.0102996826171875,
0.042938232421875,
0.0330810546875,
-0.03997802734375,
-0.0311737060546875,
-0.018341064453125,
0.020751953125,
0.01355743408203125,
0.0026187896728515625,
-0.003047943115234375,
-0.0185089111328125,
-0.0121917724609375,
0.033966064453125,
0.052947998046875,
-0.0188446044921875,
-0.00421142578125,
0.03656005859375,
0.0183563232421875,
-0.052520751953125,
-0.028411865234375,
0.0258026123046875,
0.017913818359375,
-0.01561737060546875,
0.049591064453125,
0.027801513671875,
0.006244659423828125,
0.004512786865234375,
-0.01427459716796875,
-0.0161285400390625,
-0.006511688232421875,
0.050872802734375,
-0.01329803466796875,
-0.031585693359375,
0.0257110595703125,
-0.0302734375,
0.0232086181640625,
0.02020263671875,
-0.0151214599609375,
-0.049285888671875,
-0.0194854736328125,
0.0748291015625,
-0.00785064697265625,
0.0313720703125,
-0.061004638671875,
-0.0330810546875,
0.00853729248046875,
0.0011854171752929688,
0.04052734375,
0.0225830078125,
-0.01241302490234375,
0.034088134765625,
-0.00913238525390625,
-0.0005970001220703125,
0.0113983154296875,
0.022003173828125,
0.01568603515625,
0.022796630859375,
0.0238494873046875,
0.0021038055419921875,
-0.0248870849609375,
0.00872039794921875,
0.004535675048828125,
0.0032596588134765625,
-0.00922393798828125,
-0.0230865478515625,
0.005401611328125,
0.007598876953125,
-0.0016651153564453125,
-0.055206298828125,
0.01678466796875,
0.04302978515625,
-0.0275726318359375,
0.0352783203125,
-0.028717041015625,
-0.0098724365234375,
-0.04638671875,
-0.00560760498046875,
0.01233673095703125,
-0.00809478759765625,
-0.0063629150390625,
0.044189453125,
0.01175689697265625,
0.0030460357666015625,
-0.008941650390625,
-0.027862548828125,
-0.00962066650390625,
0.046966552734375,
0.043243408203125,
-0.05572509765625,
-0.00919342041015625,
0.030181884765625,
0.0258331298828125,
-0.030517578125,
0.003765106201171875,
-0.004802703857421875,
0.052093505859375,
0.0007410049438476562,
-0.015899658203125,
0.037078857421875,
-0.038818359375,
0.0014085769653320312,
-0.0088043212890625,
-0.0160675048828125,
-0.032623291015625,
0.00110626220703125,
-0.000244140625,
0.0016841888427734375,
-0.020294189453125,
-0.0216827392578125,
0.0069427490234375,
-0.039459228515625,
-0.00665283203125,
0.026824951171875,
-0.0528564453125,
0.003803253173828125,
-0.0034275054931640625,
-0.06610107421875,
-0.001728057861328125,
0.031829833984375,
-0.039398193359375,
-0.0499267578125,
-0.00771331787109375,
-0.0270233154296875,
0.05255126953125,
-0.04486083984375,
-0.00682830810546875,
0.0154266357421875,
0.0076446533203125,
-0.0004367828369140625,
0.0243072509765625,
0.023590087890625,
0.01031494140625,
-0.0673828125,
0.01934814453125,
-0.046630859375,
-0.00632476806640625,
-0.0465087890625,
-0.06915283203125,
-0.0673828125,
0.01434326171875,
-0.03759765625,
-0.0184326171875,
-0.0086212158203125,
0.0176239013671875,
-0.0308837890625,
0.0430908203125,
0.00022161006927490234,
-0.00008028745651245117,
-0.0362548828125,
0.11517333984375,
-0.0275726318359375,
0.0226898193359375,
-0.01153564453125,
0.041229248046875,
0.006175994873046875,
0.020843505859375,
-0.01511383056640625,
-0.049957275390625,
0.0098876953125,
0.00008952617645263672,
0.006824493408203125,
0.059783935546875,
0.06817626953125,
0.018341064453125,
-0.001743316650390625,
-0.0309600830078125,
-0.00568389892578125,
-0.0242462158203125,
0.0523681640625,
-0.0296630859375,
-0.008148193359375,
-0.000026047229766845703,
-0.00653839111328125,
0.00823974609375,
0.007083892822265625,
-0.03515625,
0.0253143310546875,
0.0080413818359375,
0.00687408447265625,
0.01097869873046875,
-0.06097412109375,
0.07177734375,
0.0548095703125,
0.0521240234375,
0.039642333984375,
-0.0174407958984375,
0.02679443359375,
-0.041168212890625,
0.0082855224609375,
0.025054931640625,
0.03192138671875,
0.06976318359375,
0.0041961669921875,
-0.03997802734375,
0.0224609375,
-0.052032470703125,
-0.0350341796875,
0.016876220703125,
0.00836944580078125,
-0.013885498046875,
-0.031341552734375,
-0.00853729248046875,
-0.01451873779296875,
-0.00919342041015625,
0.0028247833251953125,
-0.0174407958984375,
-0.0229339599609375,
0.01512908935546875,
0.002796173095703125,
-0.01483917236328125,
0.00875091552734375,
0.0189971923828125,
-0.005474090576171875,
-0.0064239501953125,
0.061553955078125,
0.006557464599609375,
-0.0120697021484375,
0.01171112060546875,
0.00016379356384277344,
0.034088134765625,
-0.013519287109375,
0.0144500732421875,
-0.046234130859375,
-0.0040283203125,
-0.0247039794921875,
-0.007549285888671875,
-0.03619384765625,
0.0002894401550292969,
0.01544952392578125,
0.017181396484375,
0.064453125,
0.034454345703125,
0.01064300537109375,
-0.0004248619079589844,
-0.0025806427001953125,
0.01537322998046875,
-0.029815673828125,
-0.0256195068359375,
0.0049896240234375,
0.0306243896484375,
-0.05181884765625,
0.0245819091796875,
-0.0167236328125,
-0.003734588623046875,
-0.00736236572265625,
-0.0074462890625,
0.09393310546875,
-0.033935546875,
-0.0196075439453125,
0.024322509765625,
0.02093505859375,
-0.01367950439453125,
0.0369873046875,
0.042266845703125,
-0.0270233154296875,
-0.051788330078125,
0.04840087890625,
-0.049835205078125,
-0.036041259765625,
0.06060791015625,
-0.038482666015625,
0.09588623046875,
-0.01271820068359375,
0.020538330078125,
0.00769805908203125,
0.04290771484375,
-0.0017452239990234375,
0.047027587890625,
-0.0008640289306640625,
0.01047515869140625,
-0.00693511962890625,
0.0223846435546875,
-0.00739288330078125,
0.005374908447265625,
0.003620147705078125,
0.039886474609375,
0.00852203369140625,
0.0052337646484375,
-0.0027256011962890625,
-0.0038928985595703125,
0.0213775634765625,
0.0035381317138671875,
-0.0150909423828125,
0.035919189453125,
0.0160064697265625,
0.005828857421875,
0.018951416015625,
-0.01335906982421875,
0.0206146240234375,
-0.0095977783203125,
-0.0100250244140625,
0.026611328125,
0.02325439453125,
0.025482177734375,
-0.0152587890625,
-0.01345062255859375,
-0.036956787109375,
-0.0116424560546875,
0.035064697265625,
-0.03143310546875,
0.00817108154296875,
0.01120758056640625,
0.0321044921875,
-0.057861328125,
-0.060760498046875,
-0.0122833251953125,
0.03533935546875,
0.021881103515625,
0.009552001953125,
-0.0170745849609375,
-0.00012958049774169922,
0.02728271484375,
-0.0299530029296875,
-0.021881103515625,
0.0211181640625,
-0.01030731201171875,
0.0228118896484375,
0.029449462890625,
0.0153656005859375,
-0.02178955078125,
0.041473388671875,
0.04779052734375,
0.025421142578125,
-0.047607421875,
-0.036773681640625,
0.022430419921875,
0.01393890380859375,
-0.023284912109375,
-0.007289886474609375,
-0.02166748046875,
0.0175323486328125,
0.049102783203125,
-0.01320648193359375,
-0.0247039794921875,
0.0092315673828125,
-0.006725311279296875,
-0.00730133056640625,
-0.02508544921875,
0.04461669921875,
-0.00591278076171875,
-0.030059814453125,
-0.004688262939453125,
0.0517578125,
0.0426025390625,
0.00827789306640625,
0.043975830078125,
0.034088134765625,
-0.01512908935546875,
-0.03143310546875,
0.017425537109375,
-0.011749267578125,
0.032623291015625,
-0.032470703125,
-0.01255035400390625,
0.01264190673828125,
0.030242919921875,
0.0199737548828125,
0.0189971923828125,
0.021087646484375,
-0.0141448974609375,
-0.0255584716796875,
0.0020732879638671875,
0.004055023193359375,
-0.03192138671875,
0.05084228515625,
-0.0164794921875,
0.01062774658203125,
0.0009121894836425781,
-0.03045654296875,
-0.0217742919921875,
-0.027099609375,
0.072021484375,
-0.004871368408203125,
0.03662109375,
0.0013551712036132812,
0.00379180908203125,
0.03448486328125,
0.0138397216796875,
0.0263824462890625,
0.03564453125,
-0.04736328125,
0.003894805908203125,
-0.04949951171875,
-0.042724609375,
0.028350830078125,
0.0518798828125,
-0.005695343017578125,
0.0032711029052734375,
0.056304931640625,
-0.01387786865234375,
-0.0206756591796875,
0.004619598388671875,
0.036529541015625,
0.0006413459777832031,
0.0185699462890625,
0.033721923828125,
-0.0280914306640625,
-0.0309600830078125,
-0.025177001953125,
0.0401611328125,
0.0258636474609375,
0.082763671875,
-0.035400390625,
0.03057861328125,
0.0121002197265625,
0.006931304931640625,
-0.01398468017578125,
-0.007122039794921875,
0.0418701171875,
-0.033935546875,
-0.0005245208740234375,
-0.005741119384765625,
-0.0450439453125,
-0.005405426025390625,
0.048797607421875,
-0.043853759765625,
-0.00870513916015625,
0.00893402099609375,
0.0190582275390625,
-0.02301025390625,
0.005809783935546875,
-0.0172271728515625,
-0.0164337158203125,
-0.039520263671875,
-0.018585205078125,
0.047332763671875,
0.032470703125,
0.0016918182373046875,
0.0687255859375,
-0.0268707275390625,
-0.039886474609375,
0.03558349609375,
-0.08642578125,
0.0292510986328125,
0.0270538330078125,
0.0117950439453125,
-0.0224761962890625,
0.019775390625,
-0.0185546875,
0.021575927734375,
-0.0017070770263671875,
0.06451416015625,
-0.0004343986511230469,
-0.01175689697265625,
-0.0063323974609375,
-0.037384033203125,
0.0110321044921875,
-0.0155792236328125,
-0.0069580078125,
-0.025054931640625,
0.00458526611328125,
-0.0055084228515625,
-0.022491455078125,
-0.03240966796875,
-0.017425537109375,
0.0191802978515625,
0.0124359130859375,
0.030120849609375,
-0.0247650146484375,
-0.01221466064453125,
-0.024139404296875,
0.05828857421875,
0.0126800537109375,
-0.02447509765625,
-0.031280517578125,
-0.0140533447265625,
0.043365478515625,
0.030242919921875,
-0.03875732421875,
0.017913818359375,
0.0260467529296875,
0.0003871917724609375,
0.0028076171875,
-0.0321044921875,
-0.0213623046875,
0.0022220611572265625,
-0.00853729248046875,
0.02496337890625,
-0.00002294778823852539,
-0.0311737060546875,
-0.00562286376953125,
-0.0289764404296875,
0.039154052734375,
-0.0484619140625,
-0.0164031982421875,
0.009002685546875,
0.01230621337890625,
-0.01090240478515625,
-0.045562744140625,
0.0073394775390625,
-0.03631591796875,
0.002223968505859375,
0.01007080078125,
0.0212554931640625,
0.0565185546875,
-0.029998779296875,
-0.08636474609375,
0.039886474609375,
-0.0095062255859375,
-0.04022216796875,
-0.0657958984375,
0.037384033203125,
-0.00836944580078125,
0.0004661083221435547,
-0.012725830078125,
-0.0374755859375,
0.0224151611328125,
0.056915283203125,
0.01203155517578125,
-0.0169219970703125,
0.033660888671875,
-0.00008028745651245117,
-0.07135009765625,
-0.007232666015625,
-0.01229095458984375,
-0.018829345703125,
-0.0002263784408569336,
-0.01216888427734375,
0.015106201171875,
0.01338958740234375,
-0.0457763671875,
-0.02142333984375,
0.003490447998046875,
0.023193359375,
0.00441741943359375,
-0.01184844970703125,
-0.0158538818359375,
-0.01297760009765625,
0.04754638671875,
0.020660400390625,
0.0170745849609375,
-0.024261474609375,
-0.016510009765625,
-0.02880859375,
-0.06475830078125,
0.0032978057861328125,
0.033416748046875,
-0.0389404296875,
0.034759521484375,
-0.0018262863159179688,
0.00208282470703125,
-0.00466156005859375,
-0.039581298828125,
-0.01522064208984375,
-0.01410675048828125,
-0.0177154541015625,
-0.0157470703125,
0.016845703125,
0.019134521484375,
0.041168212890625,
-0.032958984375,
-0.003421783447265625,
-0.026153564453125,
0.01242828369140625,
0.0119476318359375,
-0.043701171875,
-0.01052093505859375,
0.039794921875,
-0.052642822265625,
-0.01148223876953125,
0.004184722900390625,
0.0245208740234375,
-0.0281982421875,
0.0135040283203125,
0.011077880859375,
-0.006397247314453125,
-0.0249786376953125,
-0.043609619140625,
-0.0189361572265625,
0.06878662109375,
-0.0267181396484375,
0.1463623046875,
0.00965118408203125,
0.02874755859375,
-0.0177764892578125,
0.055816650390625,
-0.026214599609375,
-0.0258026123046875,
-0.0306854248046875,
-0.0028896331787109375,
-0.008087158203125,
-0.00942230224609375,
-0.052276611328125,
-0.060150146484375,
0.01861572265625,
0.0170745849609375,
-0.006504058837890625,
0.0198822021484375
]
|
ffb0b92ba4c2d952c3d25f3483e350882281566c | Wordpress Stackexchange
Q: How to get author's name by author's id I want to show recent posts like this.
<ul id="recent-posts">
<?php foreach( wp_get_recent_posts() as $recent ){ ?>
<li>
<a href="<?php echo get_permalink($recent['ID']); ?>">
<?php echo $recent["post_title"]; ?> by
<?php echo $recent["post_author"]; ?>
</a>
</li>
<?php } ?>
</ul>
But $recent["post_author"] returns only id of author. And this is outside The Loop, so I can't use the_author() function.
How can I get author's name from ID?
Or maybe there is a better way to do it?
A: Try get_user_by():
get_user_by( $field, $value );
In your case, you'd pass ID, and the user ID:
// Get user object
$recent_author = get_user_by( 'ID', $recent["post_author"] );
// Get user display name
$author_display_name = $recent_author->display_name;
| Q: How to get author's name by author's id I want to show recent posts like this.
<ul id="recent-posts">
<?php foreach( wp_get_recent_posts() as $recent ){ ?>
<li>
<a href="<?php echo get_permalink($recent['ID']); ?>">
<?php echo $recent["post_title"]; ?> by
<?php echo $recent["post_author"]; ?>
</a>
</li>
<?php } ?>
</ul>
But $recent["post_author"] returns only id of author. And this is outside The Loop, so I can't use the_author() function.
How can I get author's name from ID?
Or maybe there is a better way to do it?
A: Try get_user_by():
get_user_by( $field, $value );
In your case, you'd pass ID, and the user ID:
// Get user object
$recent_author = get_user_by( 'ID', $recent["post_author"] );
// Get user display name
$author_display_name = $recent_author->display_name;
A: echo get_the_author_meta('display_name', $recent["post_author"]);
// code from deprecated.php function @get_author_name
More examples of get_the_author_meta($meta_key, $author_id) you can find at Codex.
A: The wp_posts table, which is the one you are querying with wp_get_recent_posts() does not include an author name column. It only carries the author ID (as you have already found out).
So, what you have to do is use another WordPress function called get_user_by(). This will allow you to take the author ID and find the corresponding author name.
Something like this should work (untested):
<ul id="recent-posts">
<?php foreach( wp_get_recent_posts() as $recent ){
$user_id = get_user_by('id', $recent["post_author"]); // Get user name by user id
?>
<li>
<a href="<?php echo get_permalink($recent['ID']); ?>">
<?php echo $recent["post_title"]; ?> by
<?php echo $user_id->display_name; ?>
</a>
</li>
<?php
} ?>
</ul>
A: In your case this could work:
<?php $user_info = get_userdata($recent["post_author"]);
echo $user_info->user_login; ?>
| wordpress | {
"language": "en",
"length": 260,
"provenance": "stackexchange_00019.jsonl.gz:438483",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119829"
} | [
0.04290771484375,
0.002166748046875,
0.01514434814453125,
-0.016143798828125,
0.015716552734375,
-0.01470184326171875,
0.0256195068359375,
-0.024383544921875,
0.01103973388671875,
0.04833984375,
-0.0186920166015625,
0.043609619140625,
-0.009124755859375,
-0.006622314453125,
-0.022918701171875,
-0.00814056396484375,
0.037567138671875,
-0.01100921630859375,
0.0584716796875,
0.01453399658203125,
-0.0174560546875,
0.0322265625,
0.08892822265625,
-0.01009368896484375,
0.034881591796875,
-0.05419921875,
0.076416015625,
-0.0011529922485351562,
0.03778076171875,
-0.0146942138671875,
0.0263671875,
-0.03338623046875,
-0.020233154296875,
0.033935546875,
0.0027828216552734375,
0.0250244140625,
-0.00946044921875,
0.034576416015625,
0.04229736328125,
-0.0002739429473876953,
0.0001291036605834961,
0.0010900497436523438,
-0.0806884765625,
0.017242431640625,
-0.06878662109375,
-0.047821044921875,
0.004360198974609375,
0.0276031494140625,
0.0214996337890625,
0.036590576171875,
0.00942230224609375,
0.036529541015625,
-0.004299163818359375,
0.036407470703125,
-0.0215606689453125,
-0.035491943359375,
0.03729248046875,
-0.0204620361328125,
0.042572021484375,
-0.048309326171875,
-0.057769775390625,
-0.017608642578125,
0.039886474609375,
-0.00908660888671875,
0.0257720947265625,
-0.006317138671875,
0.046905517578125,
0.041290283203125,
0.01224517822265625,
0.01519012451171875,
-0.007503509521484375,
-0.00481414794921875,
-0.0118560791015625,
-0.0129852294921875,
-0.039215087890625,
-0.0296478271484375,
0.0028018951416015625,
-0.0675048828125,
-0.0018930435180664062,
0.0012989044189453125,
-0.047027587890625,
0.003620147705078125,
-0.0684814453125,
-0.0168304443359375,
0.004180908203125,
0.01453399658203125,
-0.02691650390625,
-0.00606536865234375,
-0.034393310546875,
-0.026458740234375,
-0.018890380859375,
-0.06243896484375,
-0.0214996337890625,
0.023529052734375,
-0.0013380050659179688,
-0.021087646484375,
0.07281494140625,
0.1005859375,
-0.0128021240234375,
-0.0276031494140625,
0.006160736083984375,
-0.034698486328125,
-0.01200103759765625,
-0.035675048828125,
-0.023956298828125,
0.025238037109375,
0.021087646484375,
0.053009033203125,
0.0238189697265625,
0.0484619140625,
0.01049041748046875,
-0.03900146484375,
-0.00614166259765625,
-0.0140533447265625,
-0.01140594482421875,
0.0200347900390625,
-0.04364013671875,
0.0333251953125,
0.0092315673828125,
0.0251922607421875,
-0.00661468505859375,
0.007720947265625,
-0.006855010986328125,
0.0199127197265625,
0.00713348388671875,
-0.00024211406707763672,
-0.0287322998046875,
-0.003406524658203125,
0.00609588623046875,
0.0164642333984375,
-0.059326171875,
-0.0111083984375,
0.064453125,
0.033477783203125,
0.02435302734375,
-0.0294036865234375,
0.0279388427734375,
-0.004558563232421875,
0.004489898681640625,
-0.0006856918334960938,
-0.03912353515625,
-0.00537109375,
0.031402587890625,
-0.0382080078125,
-0.00817108154296875,
0.0150146484375,
-0.0142822265625,
0.0182952880859375,
0.00931549072265625,
-0.031341552734375,
0.005889892578125,
-0.0379638671875,
0.0092620849609375,
0.0007147789001464844,
0.052215576171875,
-0.0226593017578125,
0.050018310546875,
-0.03411865234375,
0.0197601318359375,
-0.0240020751953125,
0.055694580078125,
0.00010383129119873047,
-0.03167724609375,
-0.0170440673828125,
-0.05743408203125,
-0.02105712890625,
-0.0259552001953125,
-0.01531219482421875,
0.0233001708984375,
0.033660888671875,
0.00939178466796875,
-0.0165557861328125,
0.03399658203125,
0.046173095703125,
0.0007281303405761719,
0.022430419921875,
-0.0188140869140625,
0.0005068778991699219,
0.010009765625,
0.031524658203125,
-0.0102386474609375,
-0.0252838134765625,
-0.0189208984375,
0.0098114013671875,
-0.02215576171875,
0.03021240234375,
0.019195556640625,
0.059814453125,
0.004314422607421875,
0.0085601806640625,
0.02239990234375,
0.0198974609375,
-0.052490234375,
-0.0022563934326171875,
0.00433349609375,
0.016571044921875,
0.004413604736328125,
0.007476806640625,
0.0088043212890625,
-0.0099639892578125,
0.0298614501953125,
-0.0161285400390625,
0.03863525390625,
-0.006061553955078125,
-0.0626220703125,
0.03070068359375,
-0.027496337890625,
0.032867431640625,
0.017913818359375,
-0.007595062255859375,
0.0166168212890625,
0.000469207763671875,
-0.0374755859375,
0.00267791748046875,
-0.039581298828125,
0.038604736328125,
-0.0267333984375,
-0.01000213623046875,
-0.0094451904296875,
0.0081787109375,
-0.004638671875,
-0.00084686279296875,
-0.0097503662109375,
0.022613525390625,
0.03131103515625,
-0.046844482421875,
-0.00366973876953125,
-0.048065185546875,
-0.0193939208984375,
-0.002140045166015625,
-0.035858154296875,
0.03143310546875,
0.0246734619140625,
0.010467529296875,
-0.0192718505859375,
-0.0012874603271484375,
0.0269622802734375,
-0.053314208984375,
0.01407623291015625,
0.04278564453125,
0.032196044921875,
-0.01519012451171875,
0.01058197021484375,
0.014678955078125,
0.02947998046875,
0.00403594970703125,
0.036224365234375,
-0.0343017578125,
0.004573822021484375,
0.0279388427734375,
-0.0116119384765625,
0.0025348663330078125,
0.029693603515625,
-0.034698486328125,
-0.00006693601608276367,
0.0556640625,
-0.01087188720703125,
0.02392578125,
-0.02606201171875,
0.0264739990234375,
-0.0214996337890625,
-0.0239105224609375,
0.021392822265625,
-0.03399658203125,
-0.002017974853515625,
0.0262298583984375,
-0.00039887428283691406,
0.0095062255859375,
-0.0250396728515625,
-0.00140380859375,
0.00720977783203125,
0.004180908203125,
0.01611328125,
0.035888671875,
-0.0291595458984375,
-0.01476287841796875,
-0.0013275146484375,
-0.01360321044921875,
0.005870819091796875,
0.0018625259399414062,
-0.0156707763671875,
0.0023365020751953125,
0.0338134765625,
-0.005039215087890625,
0.01499176025390625,
-0.040496826171875,
0.0265655517578125,
-0.0187835693359375,
-0.023895263671875,
0.0011501312255859375,
0.00304412841796875,
0.059906005859375,
-0.039520263671875,
0.0672607421875,
-0.0433349609375,
0.0174713134765625,
0.039093017578125,
-0.02825927734375,
0.041595458984375,
-0.0343017578125,
0.044342041015625,
0.050384521484375,
-0.034820556640625,
0.04766845703125,
-0.0009174346923828125,
-0.026031494140625,
0.0089263916015625,
-0.0219268798828125,
-0.0243072509765625,
-0.00421142578125,
-0.04278564453125,
0.0170440673828125,
0.0184173583984375,
0.09381103515625,
-0.03167724609375,
-0.051177978515625,
0.0107879638671875,
0.027862548828125,
-0.07159423828125,
-0.0859375,
-0.01009368896484375,
-0.0614013671875,
-0.026123046875,
-0.01398468017578125,
-0.0421142578125,
0.01534271240234375,
0.0082244873046875,
-0.00908660888671875,
0.033935546875,
-0.04425048828125,
-0.08642578125,
-0.04541015625,
-0.07928466796875,
0.001865386962890625,
-0.01332855224609375,
-0.002285003662109375,
0.002056121826171875,
-0.006275177001953125,
-0.0235137939453125,
-0.0401611328125,
-0.039886474609375,
0.0149688720703125,
0.0029315948486328125,
-0.037384033203125,
-0.00750732421875,
0.0216217041015625,
-0.0249786376953125,
0.0234222412109375,
-0.00583648681640625,
0.0003249645233154297,
-0.01496124267578125,
-0.02862548828125,
-0.0136260986328125,
0.0247650146484375,
0.0369873046875,
0.03204345703125,
0.00943756103515625,
0.03887939453125,
0.06011962890625,
-0.020477294921875,
0.006450653076171875,
-0.031646728515625,
-0.03240966796875,
0.032958984375,
-0.0005464553833007812,
0.0034351348876953125,
0.0011262893676757812,
0.0159454345703125,
0.0006422996520996094,
0.005123138427734375,
-0.01136016845703125,
-0.03271484375,
0.017242431640625,
0.0283966064453125,
0.053253173828125,
0.0286102294921875,
-0.0126953125,
-0.0161895751953125,
0.01352691650390625,
-0.01262664794921875,
0.0255279541015625,
-0.00806427001953125,
0.01171112060546875,
-0.03607177734375,
-0.04736328125,
0.05792236328125,
-0.0228729248046875,
-0.03448486328125,
-0.020751953125,
-0.033294677734375,
0.01061248779296875,
0.0736083984375,
0.00412750244140625,
-0.018524169921875,
0.0140533447265625,
0.00333404541015625,
-0.031494140625,
-0.003566741943359375,
-0.0621337890625,
-0.00177764892578125,
-0.037384033203125,
0.01287078857421875,
-0.0141754150390625,
-0.0057373046875,
-0.03350830078125,
0.068359375,
-0.011566162109375,
-0.006717681884765625,
0.0185089111328125,
0.00428009033203125,
-0.02349853515625,
0.043792724609375,
-0.042266845703125,
0.0283050537109375,
-0.024322509765625,
-0.00818634033203125,
-0.0792236328125,
-0.0233154296875,
-0.01029205322265625,
0.06390380859375,
-0.00531005859375,
0.0111846923828125,
-0.044891357421875,
0.039031982421875,
0.0035076141357421875,
0.0335693359375,
0.031341552734375,
0.00870513916015625,
0.0254058837890625,
-0.0159149169921875,
0.0285491943359375,
-0.0389404296875,
0.0196380615234375,
-0.00861358642578125,
-0.031005859375,
-0.029205322265625,
-0.0758056640625,
-0.0207061767578125,
-0.043212890625,
-0.042449951171875,
-0.0455322265625,
-0.0372314453125,
-0.00992584228515625,
0.0195465087890625,
-0.01499176025390625,
0.0157012939453125,
-0.04638671875,
-0.07501220703125,
0.06390380859375,
0.01546478271484375,
-0.01702880859375,
-0.021240234375,
0.08642578125,
0.0279388427734375,
-0.04248046875,
0.00970458984375,
-0.006343841552734375,
0.048614501953125,
-0.03472900390625,
0.0146026611328125,
0.016876220703125,
-0.0469970703125,
0.05755615234375,
-0.0023040771484375,
-0.004810333251953125,
0.01103973388671875,
0.0149078369140625,
-0.00007283687591552734,
-0.020843505859375,
0.00792694091796875,
0.0012636184692382812,
0.01143646240234375,
0.0259246826171875,
-0.02435302734375,
-0.019561767578125,
-0.011138916015625,
0.05426025390625,
-0.036529541015625,
0.042388916015625,
-0.021484375,
-0.04168701171875,
0.01189422607421875,
-0.0221710205078125,
0.0325927734375,
0.029388427734375,
-0.014495849609375,
0.027801513671875,
-0.00347900390625,
-0.005847930908203125,
-0.0341796875,
-0.06597900390625,
0.01788330078125,
0.007335662841796875,
-0.044677734375,
-0.005596160888671875,
0.02484130859375,
-0.019561767578125,
0.1064453125,
0.029693603515625,
-0.030792236328125,
0.0606689453125,
-0.039825439453125,
0.01605224609375,
0.0022449493408203125,
-0.01091766357421875,
0.049407958984375,
0.04486083984375,
-0.0031414031982421875,
0.005649566650390625,
-0.038604736328125,
0.029205322265625,
-0.027862548828125,
-0.0005183219909667969,
-0.0145263671875,
0.018096923828125,
0.002155303955078125,
0.102294921875,
0.03326416015625,
0.0455322265625,
-0.056549072265625,
0.035491943359375,
-0.009552001953125,
0.043701171875,
0.030487060546875,
-0.01904296875,
0.0190582275390625,
-0.004062652587890625,
-0.018310546875,
-0.04290771484375,
0.01483154296875,
0.022247314453125,
0.039093017578125,
0.0181884765625,
-0.013397216796875,
0.027313232421875,
-0.01885986328125,
-0.006221771240234375,
0.055145263671875,
0.05157470703125,
-0.0233612060546875,
-0.0220184326171875,
0.00896453857421875,
0.0188446044921875,
0.0004825592041015625,
0.0023326873779296875,
0.004291534423828125,
-0.00396728515625,
0.01418304443359375,
-0.0156402587890625,
0.0231170654296875,
-0.01861572265625,
-0.008026123046875,
-0.003726959228515625,
-0.03173828125,
0.00965118408203125,
-0.0145416259765625,
0.02313232421875,
-0.039215087890625,
-0.0302734375,
0.07196044921875,
0.00418853759765625,
0.0677490234375,
-0.0496826171875,
-0.0214691162109375,
0.004436492919921875,
-0.0191497802734375,
0.0625,
0.03338623046875,
-0.047576904296875,
0.0191497802734375,
-0.020416259765625,
0.018280029296875,
0.0208892822265625,
-0.04644775390625,
-0.0171356201171875,
-0.046844482421875,
-0.0015764236450195312,
0.007720947265625,
0.007190704345703125,
0.01788330078125,
0.00244903564453125,
0.022918701171875,
-0.0295562744140625,
0.02410888671875,
0.0111236572265625,
0.039154052734375,
0.0171051025390625,
0.05560302734375,
0.01488494873046875,
0.0032482147216796875,
-0.07257080078125,
-0.015777587890625,
0.0092010498046875,
-0.004505157470703125,
-0.01207733154296875,
-0.01215362548828125,
-0.0265655517578125,
-0.0538330078125,
0.0242919921875,
-0.009796142578125,
0.0004916191101074219,
-0.0014772415161132812,
0.01357269287109375,
-0.006343841552734375,
-0.0540771484375,
0.02374267578125,
-0.04083251953125,
0.0193634033203125,
-0.038360595703125,
-0.030609130859375,
-0.0084381103515625,
0.00333404541015625,
-0.0299224853515625,
-0.00832366943359375,
-0.056121826171875,
0.050689697265625,
-0.02032470703125,
0.036773681640625,
0.050018310546875,
0.02789306640625,
0.038177490234375,
0.0286407470703125,
0.0384521484375,
0.003025054931640625,
0.01340484619140625,
-0.015960693359375,
-0.0010023117065429688,
0.05865478515625,
0.032073974609375,
0.008544921875,
0.047210693359375,
-0.02191162109375,
-0.0013551712036132812,
0.002574920654296875,
0.036468505859375,
-0.00798797607421875,
0.005023956298828125,
0.0124969482421875,
-0.0254669189453125,
0.0192413330078125,
0.01380157470703125,
-0.021392822265625,
-0.0426025390625,
0.046295166015625,
-0.03900146484375,
-0.00897216796875,
0.0209197998046875,
-0.00490570068359375,
0.024383544921875,
-0.050994873046875,
0.07745361328125,
-0.00487518310546875,
-0.028167724609375,
-0.01332855224609375,
0.0089569091796875,
-0.002391815185546875,
-0.04241943359375,
0.00879669189453125,
0.005344390869140625,
0.0034847259521484375,
-0.042205810546875,
0.046630859375,
-0.0233001708984375,
0.0227508544921875,
0.021270751953125,
0.0110626220703125,
0.0039005279541015625,
0.043792724609375,
-0.01235198974609375,
-0.0005488395690917969,
0.0212554931640625,
-0.040008544921875,
0.004726409912109375,
-0.0224456787109375,
-0.0094451904296875,
0.02001953125,
-0.029327392578125,
0.013885498046875,
-0.0106201171875,
-0.00872802734375,
-0.01401519775390625,
-0.00632476806640625,
0.0789794921875,
0.0009918212890625,
-0.048431396484375,
0.01605224609375,
0.0270538330078125,
-0.0139312744140625,
0.0305328369140625,
0.01393890380859375,
-0.0341796875,
0.0004265308380126953,
0.00885772705078125,
-0.01190185546875,
0.02508544921875,
0.003772735595703125,
-0.06060791015625,
0.0283355712890625,
0.017547607421875,
0.0175323486328125,
-0.00862884521484375,
0.00940704345703125,
0.005664825439453125,
-0.0271759033203125,
-0.0275421142578125,
0.03887939453125,
-0.0256805419921875,
0.034027099609375,
-0.0465087890625,
-0.0166473388671875,
0.0034198760986328125,
0.046630859375,
0.062225341796875,
0.01471710205078125,
-0.0400390625,
-0.00481414794921875,
0.029754638671875,
0.01629638671875,
-0.03204345703125,
0.0595703125,
0.0135040283203125,
0.0267791748046875,
0.051422119140625,
-0.0182342529296875,
0.035003662109375,
0.0176544189453125,
-0.015869140625,
0.03424072265625,
0.0288543701171875,
0.04217529296875,
-0.0198822021484375,
-0.023345947265625,
-0.0294647216796875,
-0.0172576904296875,
0.03717041015625,
-0.047393798828125,
0.035430908203125,
0.0285186767578125,
0.11126708984375,
-0.03448486328125,
0.01312255859375,
-0.0224151611328125,
0.08447265625,
0.05841064453125,
0.0089874267578125,
0.025146484375,
0.02484130859375,
-0.0290679931640625,
0.03125,
0.0260162353515625,
0.033599853515625,
-0.011474609375,
0.06524658203125,
0.0203704833984375,
0.00450897216796875,
-0.06817626953125,
-0.0202178955078125,
0.0670166015625,
0.09307861328125,
-0.047210693359375,
-0.010467529296875,
0.00676727294921875,
-0.0240478515625,
0.0011034011840820312,
-0.0234222412109375,
-0.007427215576171875,
0.037261962890625,
0.0174560546875,
-0.043670654296875,
-0.006072998046875,
0.028900146484375,
0.034393310546875,
0.005077362060546875,
-0.019134521484375,
-0.0280303955078125,
-0.018218994140625,
-0.03448486328125,
-0.0259552001953125,
0.019317626953125,
0.035552978515625,
0.0294342041015625,
0.0312347412109375,
0.0127716064453125,
-0.0115203857421875,
0.0189666748046875,
0.0005960464477539062,
-0.007404327392578125,
-0.0054779052734375,
0.007183074951171875,
-0.0017614364624023438,
-0.0087738037109375,
0.01274871826171875,
0.006092071533203125,
0.0029087066650390625,
0.0206146240234375,
-0.00209808349609375,
-0.031494140625,
-0.007625579833984375,
0.0028705596923828125,
-0.0321044921875,
-0.0163421630859375,
-0.025604248046875,
-0.0239410400390625,
0.002315521240234375,
-0.016754150390625,
-0.01491546630859375,
-0.01331329345703125,
0.0357666015625,
-0.059326171875,
0.05230712890625,
-0.01161956787109375,
-0.0028171539306640625,
0.01203155517578125,
0.00384521484375,
0.00930023193359375,
-0.0267181396484375,
-0.07342529296875,
0.0084991455078125,
-0.05438232421875,
-0.0221099853515625,
0.02801513671875,
0.0167694091796875,
-0.0220489501953125,
0.031768798828125,
-0.030242919921875,
-0.00859832763671875,
0.021392822265625,
-0.0206146240234375,
0.00603485107421875,
0.0496826171875,
0.0121002197265625,
0.0030498504638671875,
-0.04486083984375,
-0.0166168212890625,
0.01105499267578125,
-0.003749847412109375,
0.04022216796875,
-0.051300048828125,
0.058807373046875,
0.01605224609375,
-0.0582275390625,
0.0175018310546875,
-0.09576416015625,
-0.0662841796875,
0.09381103515625,
-0.060577392578125,
-0.07196044921875,
0.03143310546875,
-0.060302734375,
0.0643310546875,
0.00128173828125,
0.02264404296875,
0.050018310546875,
-0.01299285888671875,
0.00751495361328125,
-0.0037021636962890625,
-0.007965087890625,
-0.044769287109375,
-0.036590576171875,
-0.051025390625,
-0.01389312744140625,
0.0182952880859375,
-0.0309600830078125,
-0.04266357421875,
-0.01727294921875,
0.046051025390625,
-0.04638671875,
0.0167388916015625,
0.0282745361328125,
0.037017822265625,
0.0295562744140625,
0.04364013671875,
-0.026885986328125,
-0.010101318359375,
-0.017578125,
0.0003185272216796875,
0.01070404052734375,
0.0125732421875,
-0.006824493408203125,
0.002193450927734375,
0.034942626953125,
-0.02593994140625,
0.0562744140625,
-0.0035953521728515625,
-0.00234222412109375,
-0.0253143310546875,
0.031005859375,
-0.037322998046875,
-0.04803466796875,
-0.0135955810546875,
-0.0265655517578125,
0.004184722900390625,
0.037628173828125,
0.00743865966796875,
0.011993408203125,
-0.036651611328125,
0.0050811767578125,
-0.01317596435546875,
-0.017303466796875,
0.00017976760864257812,
0.018310546875,
-0.02587890625,
0.005779266357421875,
-0.041107177734375,
-0.028411865234375,
0.01082611083984375,
0.0472412109375,
-0.0187530517578125,
0.00926971435546875,
-0.044403076171875,
-0.044952392578125,
-0.0316162109375,
0.00467681884765625,
0.01253509521484375,
-0.007709503173828125,
-0.006755828857421875,
0.025787353515625,
0.0077056884765625,
0.06695556640625,
-0.0056915283203125,
-0.004146575927734375,
0.019989013671875,
0.0019025802612304688,
-0.035400390625,
-0.07513427734375,
0.0325927734375,
-0.0703125,
-0.0198974609375,
-0.01468658447265625,
0.0035610198974609375,
0.0102386474609375,
-0.01186370849609375,
-0.012847900390625,
0.039337158203125,
0.0037250518798828125,
-0.0322265625,
-0.005268096923828125,
-0.0032062530517578125,
-0.00502777099609375,
0.0013055801391601562,
0.01568603515625,
-0.05963134765625,
-0.0160369873046875,
0.00795745849609375,
0.005126953125,
0.01580810546875,
0.0308074951171875,
-0.015411376953125,
-0.035614013671875,
-0.003681182861328125,
-0.018829345703125,
0.0018262863159179688,
-0.01233673095703125,
0.005702972412109375,
0.00873565673828125,
0.025970458984375,
-0.026763916015625,
0.0270233154296875,
-0.0006499290466308594,
0.042205810546875,
-0.032928466796875,
-0.057098388671875,
-0.02801513671875,
0.0025653839111328125,
0.059295654296875,
0.0772705078125,
0.01605224609375,
-0.06353759765625,
0.0294647216796875,
-0.000514984130859375,
-0.02569580078125,
-0.0105133056640625,
0.0016546249389648438,
-0.0245208740234375,
-0.0246124267578125,
-0.00662994384765625,
-0.034332275390625,
0.01220703125,
-0.004932403564453125,
-0.03082275390625,
0.02276611328125,
0.01410675048828125,
-0.005680084228515625,
-0.0199737548828125,
0.019073486328125,
0.033905029296875,
-0.0328369140625,
-0.007137298583984375,
0.01256561279296875,
-0.01343536376953125,
0.01041412353515625,
-0.00403594970703125,
-0.005413055419921875,
0.01459503173828125,
0.005695343017578125,
-0.004119873046875,
0.0204010009765625,
0.0010356903076171875,
0.024810791015625,
0.0027523040771484375,
-0.038818359375,
0.0229949951171875,
-0.0015058517456054688,
-0.00295257568359375,
0.0218048095703125,
-0.0003757476806640625,
0.01425933837890625,
0.06451416015625,
-0.0200042724609375,
0.0247039794921875,
-0.0279083251953125,
0.054290771484375,
-0.02191162109375,
-0.00264739990234375,
0.00952911376953125,
-0.0108184814453125,
0.0012273788452148438,
0.0010232925415039062,
0.024169921875,
-0.026397705078125,
0.0163116455078125,
0.0305023193359375,
-0.0103759765625,
0.02020263671875
]
|
cad81c966b824f31f9b4c5ee3a905fac5118e5e2 | Wordpress Stackexchange
Q: Make password invalid once logged out of password-protected page In a WP-based site I have a custom form which I need to hide from the general public and give access to only a select few who would then get a password from me, enter it and access the form and submit it. On form submission, I redirect them to another page. I have employed this bit of code below in my functions.php, which logs them out of the password-protected page, once redirected:
add_action( 'wp', 'post_pw_sess_expire' );
function post_pw_sess_expire() {
if ( isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) )
// Setting a time of 0 in setcookie() forces the cookie to expire with the session
setcookie('wp-postpass_' . COOKIEHASH, '', 0, COOKIEPATH);
}
Now the twist: once any of these select few are logged out of the password-protected page, I need the password to become invalid. Not necessarily, but sort of like a one-time password. A solution would be great, or please give me some pointers or alternatives if it's not possible.
A: After submitting the form and before redirecting to new page, reset the current user's password.
A simple wp_update_user(array('ID' => $userid, 'user_pass' => 'YourNewPaSSword')); will do everything for you.
| Q: Make password invalid once logged out of password-protected page In a WP-based site I have a custom form which I need to hide from the general public and give access to only a select few who would then get a password from me, enter it and access the form and submit it. On form submission, I redirect them to another page. I have employed this bit of code below in my functions.php, which logs them out of the password-protected page, once redirected:
add_action( 'wp', 'post_pw_sess_expire' );
function post_pw_sess_expire() {
if ( isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) )
// Setting a time of 0 in setcookie() forces the cookie to expire with the session
setcookie('wp-postpass_' . COOKIEHASH, '', 0, COOKIEPATH);
}
Now the twist: once any of these select few are logged out of the password-protected page, I need the password to become invalid. Not necessarily, but sort of like a one-time password. A solution would be great, or please give me some pointers or alternatives if it's not possible.
A: After submitting the form and before redirecting to new page, reset the current user's password.
A simple wp_update_user(array('ID' => $userid, 'user_pass' => 'YourNewPaSSword')); will do everything for you.
A: I did this small test and it works, but I have no idea if it's technically correct:
add_action( 'wp', 'post_pw_sess_expire' );
function post_pw_sess_expire()
{
if ( isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) )
{
// Setting a time of 0 in setcookie() forces the cookie to expire with the session
setcookie('wp-postpass_' . COOKIEHASH, '', 0, COOKIEPATH);
add_action( 'wp_footer', 'change_pw_wpse_119986' );
}
}
function change_pw_wpse_119986()
{
global $post;
if( $post->post_password == md5('something') )
return;
$post->post_password = md5('something');
wp_update_post( $post );
remove_action( 'wp_footer', 'change_pw_wpse_119986' );
}
But there's a bigger problem: we have one password per page, not one password per person. Once the first one enters the pass, the next ones won't be able to use it. You'll need to build your own solution setting different passwords and unsetting each one as soon as the person uses it.
| wordpress | {
"language": "en",
"length": 336,
"provenance": "stackexchange_00019.jsonl.gz:438519",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/119986"
} | [
0.0869140625,
-0.005260467529296875,
0.0036792755126953125,
-0.0229034423828125,
0.022064208984375,
-0.046417236328125,
0.032806396484375,
-0.04058837890625,
-0.0219268798828125,
0.0059814453125,
-0.00849151611328125,
-0.027374267578125,
-0.041656494140625,
-0.046783447265625,
-0.00988006591796875,
-0.045166015625,
0.006099700927734375,
0.01529693603515625,
-0.0020961761474609375,
-0.0291900634765625,
-0.0126495361328125,
-0.02899169921875,
0.0004017353057861328,
-0.00489044189453125,
-0.00778961181640625,
0.007228851318359375,
0.07965087890625,
-0.0298309326171875,
0.0013484954833984375,
-0.0225067138671875,
0.009490966796875,
-0.0187530517578125,
-0.00905609130859375,
0.0518798828125,
-0.035797119140625,
-0.03424072265625,
0.007633209228515625,
0.025177001953125,
-0.0079498291015625,
0.04827880859375,
0.021728515625,
-0.023284912109375,
-0.0089111328125,
0.01275634765625,
-0.01727294921875,
-0.024139404296875,
0.0176239013671875,
-0.024505615234375,
0.017913818359375,
0.0467529296875,
0.0279998779296875,
0.0013322830200195312,
0.025604248046875,
0.0185546875,
-0.022247314453125,
-0.004749298095703125,
-0.0160980224609375,
-0.0229339599609375,
0.036834716796875,
0.02734375,
-0.0232086181640625,
-0.041107177734375,
0.0098876953125,
-0.0643310546875,
-0.01503753662109375,
-0.0092010498046875,
0.01277923583984375,
0.0190582275390625,
-0.04248046875,
-0.021514892578125,
0.0218658447265625,
-0.01424407958984375,
-0.0285186767578125,
-0.01148223876953125,
-0.029388427734375,
0.01312255859375,
0.009521484375,
-0.0196075439453125,
0.005115509033203125,
0.0167236328125,
-0.0263824462890625,
0.0021839141845703125,
-0.028564453125,
0.00016629695892333984,
-0.0085906982421875,
0.03363037109375,
-0.0198974609375,
-0.01374053955078125,
-0.0159454345703125,
-0.015106201171875,
-0.0156707763671875,
0.0053558349609375,
-0.046234130859375,
0.01407623291015625,
-0.01343536376953125,
-0.0178985595703125,
0.037567138671875,
0.053955078125,
0.00701141357421875,
0.0157012939453125,
0.00667572021484375,
-0.0419921875,
0.01458740234375,
-0.0260467529296875,
-0.023651123046875,
0.041015625,
0.05596923828125,
0.0056610107421875,
-0.02227783203125,
-0.018096923828125,
-0.018768310546875,
-0.0400390625,
-0.042572021484375,
-0.0496826171875,
-0.0579833984375,
0.07073974609375,
-0.0088043212890625,
-0.05731201171875,
0.0007414817810058594,
-0.01322174072265625,
-0.030975341796875,
-0.024810791015625,
-0.00983428955078125,
-0.016265869140625,
0.01611328125,
-0.0270538330078125,
-0.025360107421875,
0.05419921875,
0.00911712646484375,
0.0267333984375,
-0.07281494140625,
-0.0012960433959960938,
0.09869384765625,
0.0266876220703125,
0.0298919677734375,
-0.03607177734375,
0.0212554931640625,
0.01412200927734375,
-0.00826263427734375,
0.03857421875,
-0.02093505859375,
-0.04681396484375,
0.01015472412109375,
0.0035419464111328125,
0.007625579833984375,
0.032012939453125,
0.033203125,
0.0010089874267578125,
-0.0165557861328125,
-0.068359375,
0.0203094482421875,
-0.01343536376953125,
-0.0024433135986328125,
0.01280975341796875,
0.0312347412109375,
0.0127410888671875,
0.03436279296875,
-0.01326751708984375,
0.0000286102294921875,
0.0030460357666015625,
0.04681396484375,
-0.00745391845703125,
-0.01267242431640625,
0.0105743408203125,
-0.0110626220703125,
-0.01461029052734375,
-0.031707763671875,
-0.006977081298828125,
0.0322265625,
0.0201568603515625,
0.040283203125,
-0.062103271484375,
-0.002826690673828125,
0.00860595703125,
-0.004909515380859375,
0.04217529296875,
-0.0126495361328125,
0.0263519287109375,
0.0102996826171875,
0.019775390625,
0.0065460205078125,
-0.031585693359375,
0.041656494140625,
-0.0027256011962890625,
-0.021881103515625,
-0.006076812744140625,
0.034332275390625,
0.047119140625,
0.007717132568359375,
0.03570556640625,
0.017303466796875,
0.008392333984375,
-0.02142333984375,
0.060760498046875,
-0.01378631591796875,
-0.0257568359375,
-0.0177459716796875,
0.00910186767578125,
-0.032989501953125,
-0.0013751983642578125,
0.031036376953125,
-0.019378662109375,
-0.0030612945556640625,
-0.0033550262451171875,
-0.07623291015625,
-0.0157623291015625,
-0.024566650390625,
0.022430419921875,
-0.01617431640625,
0.0254974365234375,
0.0164642333984375,
-0.0031108856201171875,
-0.02435302734375,
0.0063629150390625,
-0.0283203125,
-0.046356201171875,
-0.0211181640625,
0.081787109375,
0.0097198486328125,
0.09991455078125,
0.00685882568359375,
-0.053131103515625,
0.0083465576171875,
-0.06951904296875,
0.03363037109375,
-0.04229736328125,
0.0036220550537109375,
-0.0340576171875,
0.01953125,
-0.0350341796875,
0.001033782958984375,
0.057952880859375,
0.01291656494140625,
0.033203125,
-0.048614501953125,
-0.02392578125,
-0.06103515625,
-0.0280609130859375,
-0.002582550048828125,
0.054962158203125,
0.030609130859375,
0.011688232421875,
-0.0201416015625,
-0.0031147003173828125,
0.0411376953125,
-0.044281005859375,
-0.005069732666015625,
0.00955963134765625,
-0.00811767578125,
0.046783447265625,
-0.006000518798828125,
0.00371551513671875,
0.0142669677734375,
-0.04150390625,
-0.01433563232421875,
0.052764892578125,
-0.0245208740234375,
0.02294921875,
-0.004451751708984375,
0.00798797607421875,
-0.03680419921875,
-0.051177978515625,
0.01186370849609375,
-0.043243408203125,
0.05029296875,
-0.029266357421875,
0.0087432861328125,
-0.0098419189453125,
-0.0223846435546875,
-0.016387939453125,
0.026885986328125,
-0.03961181640625,
0.005764007568359375,
0.044677734375,
-0.015167236328125,
-0.035247802734375,
-0.00562286376953125,
-0.0087127685546875,
-0.0107269287109375,
-0.006328582763671875,
-0.001300811767578125,
-0.00820159912109375,
-0.005245208740234375,
-0.006622314453125,
0.0121307373046875,
-0.00319671630859375,
0.025360107421875,
0.03759765625,
0.03558349609375,
-0.0165557861328125,
0.0224151611328125,
0.00821685791015625,
-0.0245208740234375,
0.061370849609375,
0.03436279296875,
-0.04473876953125,
-0.055419921875,
-0.031524658203125,
0.03167724609375,
-0.04266357421875,
0.00235748291015625,
0.058563232421875,
0.00495147705078125,
0.0047149658203125,
0.01312255859375,
0.01250457763671875,
0.0157318115234375,
0.01605224609375,
0.00713348388671875,
-0.0159912109375,
-0.0178985595703125,
-0.016082763671875,
0.0283203125,
0.02374267578125,
0.0095062255859375,
-0.030242919921875,
0.00264739990234375,
0.0200653076171875,
-0.045501708984375,
-0.04046630859375,
-0.07733154296875,
-0.10986328125,
0.0275726318359375,
-0.025482177734375,
-0.0289459228515625,
0.017730712890625,
0.0099334716796875,
0.04547119140625,
-0.032989501953125,
-0.0196990966796875,
-0.0081787109375,
-0.047088623046875,
-0.02911376953125,
0.00858306884765625,
0.0119171142578125,
0.00399017333984375,
-0.01105499267578125,
0.08349609375,
0.0016260147094726562,
-0.06317138671875,
-0.0426025390625,
0.028778076171875,
-0.02398681640625,
-0.0245819091796875,
-0.0303497314453125,
-0.01393890380859375,
0.0095672607421875,
-0.0021533966064453125,
-0.01496124267578125,
-0.0308837890625,
0.0462646484375,
-0.0192413330078125,
0.01207733154296875,
-0.048004150390625,
0.027984619140625,
-0.007465362548828125,
-0.0294189453125,
-0.01288604736328125,
0.021759033203125,
-0.051055908203125,
-0.007160186767578125,
0.0084075927734375,
-0.042205810546875,
0.003200531005859375,
0.019500732421875,
-0.027862548828125,
0.0221405029296875,
-0.0151824951171875,
-0.00861358642578125,
0.019439697265625,
0.00931549072265625,
-0.00832366943359375,
0.019805908203125,
-0.0172119140625,
-0.009613037109375,
-0.0182952880859375,
0.041748046875,
0.0009741783142089844,
0.007099151611328125,
0.02496337890625,
0.033203125,
0.0304412841796875,
-0.0091400146484375,
-0.0032405853271484375,
-0.09320068359375,
0.05096435546875,
-0.053558349609375,
-0.0099334716796875,
-0.051025390625,
-0.026031494140625,
-0.0023365020751953125,
0.1175537109375,
-0.025146484375,
-0.0294189453125,
0.006221771240234375,
0.01358795166015625,
0.0020599365234375,
-0.00569915771484375,
-0.01316070556640625,
-0.031707763671875,
-0.050506591796875,
0.0085296630859375,
-0.02264404296875,
0.00009047985076904297,
-0.0061798095703125,
-0.0714111328125,
-0.018218994140625,
-0.048736572265625,
0.0116424560546875,
-0.035797119140625,
0.0306549072265625,
-0.03192138671875,
0.0029144287109375,
-0.052093505859375,
0.022216796875,
-0.044525146484375,
-0.0484619140625,
0.0006465911865234375,
-0.01023101806640625,
0.03216552734375,
0.01161956787109375,
-0.01812744140625,
-0.00539398193359375,
0.02703857421875,
0.0260467529296875,
0.0009436607360839844,
-0.00455474853515625,
-0.0254974365234375,
0.0258331298828125,
0.0290069580078125,
-0.0157318115234375,
0.0204315185546875,
-0.00551605224609375,
-0.0177459716796875,
-0.0172882080078125,
-0.01800537109375,
-0.043426513671875,
-0.03289794921875,
0.0004930496215820312,
-0.0212554931640625,
-0.047607421875,
-0.03570556640625,
-0.0062408447265625,
0.0223236083984375,
-0.005626678466796875,
0.006748199462890625,
-0.032501220703125,
-0.049713134765625,
0.08905029296875,
0.01239013671875,
-0.01898193359375,
-0.00817108154296875,
0.041748046875,
-0.001773834228515625,
-0.03289794921875,
-0.0193634033203125,
-0.01474761962890625,
0.0178985595703125,
0.008026123046875,
-0.006336212158203125,
-0.01641845703125,
-0.00778961181640625,
0.0135498046875,
-0.034271240234375,
-0.01282501220703125,
-0.035186767578125,
0.0214385986328125,
-0.01160430908203125,
-0.0300750732421875,
0.00836181640625,
-0.03753662109375,
0.0555419921875,
0.0164794921875,
0.0249481201171875,
0.006381988525390625,
0.01117706298828125,
-0.022979736328125,
0.017852783203125,
-0.05059814453125,
0.006702423095703125,
-0.0609130859375,
0.0157623291015625,
0.0033512115478515625,
-0.018402099609375,
0.0007195472717285156,
0.00862884521484375,
0.00928497314453125,
0.0016918182373046875,
0.0156707763671875,
-0.04132080078125,
-0.056182861328125,
-0.00893402099609375,
0.030517578125,
-0.04986572265625,
0.019622802734375,
0.0024929046630859375,
-0.02313232421875,
0.10076904296875,
0.0185546875,
-0.056488037109375,
0.0298919677734375,
-0.0310516357421875,
0.0226898193359375,
0.001377105712890625,
-0.0194549560546875,
0.00373077392578125,
-0.058502197265625,
-0.01090240478515625,
0.013275146484375,
-0.03375244140625,
-0.04754638671875,
-0.017974853515625,
0.037445068359375,
0.028076171875,
-0.0157928466796875,
0.0302734375,
0.021881103515625,
0.0283355712890625,
0.01102447509765625,
-0.016571044921875,
0.037506103515625,
0.04248046875,
-0.005939483642578125,
-0.006610870361328125,
0.0770263671875,
-0.037353515625,
0.01523590087890625,
0.0255889892578125,
-0.05657958984375,
-0.05950927734375,
0.034698486328125,
0.04766845703125,
-0.0013055801391601562,
0.0260467529296875,
-0.01323699951171875,
0.02020263671875,
0.0156707763671875,
0.0248260498046875,
-0.0169677734375,
-0.08258056640625,
0.0034084320068359375,
0.052764892578125,
0.0262451171875,
-0.05340576171875,
0.01389312744140625,
-0.044769287109375,
-0.0323486328125,
-0.03173828125,
0.00727081298828125,
0.00011456012725830078,
-0.053375244140625,
-0.0594482421875,
-0.01399993896484375,
-0.00904083251953125,
-0.048980712890625,
0.0257568359375,
-0.012542724609375,
-0.005161285400390625,
-0.0191802978515625,
0.05047607421875,
-0.01206207275390625,
-0.011138916015625,
-0.04150390625,
0.023712158203125,
0.0178680419921875,
0.00016629695892333984,
0.029541015625,
-0.01873779296875,
-0.0535888671875,
-0.00972747802734375,
-0.00943756103515625,
-0.00588226318359375,
0.01010894775390625,
-0.018890380859375,
-0.0267181396484375,
-0.0226898193359375,
0.032318115234375,
0.0209503173828125,
0.023895263671875,
-0.0128936767578125,
-0.05426025390625,
-0.00121307373046875,
0.0306854248046875,
0.007404327392578125,
0.00701141357421875,
0.02490234375,
0.0006480216979980469,
0.03143310546875,
0.021484375,
0.0182342529296875,
-0.00965118408203125,
-0.0196685791015625,
0.01123046875,
-0.0006079673767089844,
0.00014293193817138672,
-0.039093017578125,
0.039398193359375,
-0.00910186767578125,
0.053253173828125,
-0.002880096435546875,
-0.027008056640625,
-0.008880615234375,
0.003528594970703125,
-0.031585693359375,
0.06439208984375,
0.01629638671875,
-0.01461029052734375,
0.003528594970703125,
-0.03753662109375,
0.008148193359375,
0.0322265625,
-0.00035500526428222656,
0.03955078125,
-0.032470703125,
0.044189453125,
-0.0011320114135742188,
0.006702423095703125,
0.0130157470703125,
0.0106201171875,
-0.0305023193359375,
0.0188751220703125,
-0.0002675056457519531,
0.0128936767578125,
0.032562255859375,
-0.0640869140625,
-0.03582763671875,
0.049957275390625,
0.036041259765625,
-0.01465606689453125,
0.00864410400390625,
0.04931640625,
-0.0029735565185546875,
0.00150299072265625,
0.06976318359375,
0.07037353515625,
-0.0948486328125,
0.006439208984375,
0.01194000244140625,
0.00775909423828125,
0.03497314453125,
0.00031113624572753906,
-0.0066680908203125,
0.00450897216796875,
0.015899658203125,
-0.017974853515625,
-0.02825927734375,
0.01474761962890625,
0.01277923583984375,
0.01123046875,
-0.025238037109375,
0.06842041015625,
0.01108551025390625,
-0.07794189453125,
0.032745361328125,
0.0570068359375,
-0.01419830322265625,
-0.0254669189453125,
-0.02880859375,
0.01556396484375,
-0.053985595703125,
-0.0743408203125,
-0.020233154296875,
-0.0199127197265625,
-0.00957489013671875,
0.0166015625,
0.035064697265625,
0.0595703125,
0.041656494140625,
0.0227508544921875,
-0.012359619140625,
0.0025882720947265625,
0.023590087890625,
0.0135498046875,
-0.027557373046875,
-0.01369476318359375,
-0.00945281982421875,
-0.0272674560546875,
0.0089263916015625,
-0.02203369140625,
-0.02508544921875,
-0.01485443115234375,
-0.054962158203125,
0.046478271484375,
-0.01238250732421875,
-0.002933502197265625,
0.02484130859375,
0.0225067138671875,
-0.004711151123046875,
-0.00274658203125,
0.004840850830078125,
-0.046905517578125,
0.01934814453125,
-0.01012420654296875,
-0.0081787109375,
-0.0218505859375,
-0.020660400390625,
-0.07647705078125,
0.1180419921875,
-0.0006933212280273438,
0.0382080078125,
0.01580810546875,
0.03802490234375,
-0.043701171875,
0.002635955810546875,
-0.024169921875,
0.027923583984375,
-0.01163482666015625,
0.03173828125,
-0.0221405029296875,
-0.003574371337890625,
0.00853729248046875,
0.0160675048828125,
0.01236724853515625,
0.01507568359375,
-0.041259765625,
-0.023468017578125,
-0.00047898292541503906,
0.01837158203125,
0.00022232532501220703,
0.037353515625,
-0.00018656253814697266,
0.01611328125,
0.0223236083984375,
-0.060455322265625,
0.0266265869140625,
-0.036224365234375,
-0.0023136138916015625,
-0.0017261505126953125,
0.006824493408203125,
-0.0206451416015625,
0.004390716552734375,
0.046234130859375,
-0.10089111328125,
0.0229339599609375,
0.045166015625,
0.06231689453125,
0.01386260986328125,
0.01727294921875,
0.0196685791015625,
0.00550079345703125,
0.04644775390625,
-0.0281982421875,
0.042694091796875,
-0.006072998046875,
0.007762908935546875,
0.04827880859375,
0.026123046875,
0.0175323486328125,
0.033111572265625,
0.02044677734375,
0.0257415771484375,
0.00055694580078125,
0.08258056640625,
0.0238494873046875,
0.031829833984375,
-0.0189666748046875,
0.04583740234375,
0.002315521240234375,
0.06903076171875,
-0.06463623046875,
-0.0004181861877441406,
0.01329803466796875,
0.01434326171875,
0.0173187255859375,
-0.007152557373046875,
0.0640869140625,
0.0052947998046875,
-0.019622802734375,
-0.021575927734375,
0.0240936279296875,
0.01806640625,
0.000507354736328125,
-0.0113067626953125,
0.00791168212890625,
-0.0195465087890625,
0.0487060546875,
0.00740814208984375,
-0.049072265625,
0.01248931884765625,
0.016387939453125,
0.014190673828125,
-0.0111236572265625,
0.014801025390625,
0.00397491455078125,
-0.0166778564453125,
0.01885986328125,
0.011260986328125,
0.02496337890625,
-0.013275146484375,
0.0006318092346191406,
0.010498046875,
0.0220794677734375,
0.00026488304138183594,
-0.0225830078125,
0.01030731201171875,
0.021575927734375,
-0.0224151611328125,
-0.0264434814453125,
0.0019092559814453125,
-0.01202392578125,
0.022308349609375,
0.009307861328125,
-0.00417327880859375,
-0.0021209716796875,
-0.0222320556640625,
-0.05999755859375,
0.027557373046875,
0.0216827392578125,
0.0269622802734375,
0.0328369140625,
0.0149383544921875,
-0.00792694091796875,
-0.00847625732421875,
0.020263671875,
0.033843994140625,
0.06463623046875,
-0.029541015625,
0.004032135009765625,
-0.033599853515625,
-0.0310821533203125,
0.016265869140625,
0.023895263671875,
-0.0224761962890625,
0.0285186767578125,
0.02325439453125,
-0.005207061767578125,
0.01380157470703125,
0.0097808837890625,
-0.003147125244140625,
-0.0017948150634765625,
0.030792236328125,
-0.00513458251953125,
-0.08624267578125,
-0.043060302734375,
-0.0254364013671875,
0.004863739013671875,
0.0079498291015625,
0.0574951171875,
0.019500732421875,
0.006771087646484375,
-0.026275634765625,
0.031494140625,
-0.046356201171875,
-0.036407470703125,
-0.002483367919921875,
0.0007290840148925781,
0.02783203125,
0.0172119140625,
-0.0633544921875,
0.08489990234375,
-0.037841796875,
0.058074951171875,
0.057281494140625,
-0.05242919921875,
0.0046234130859375,
0.045684814453125,
-0.00701904296875,
-0.0294342041015625,
-0.035003662109375,
0.01708984375,
0.025543212890625,
0.0006661415100097656,
0.0280914306640625,
-0.0045623779296875,
0.05047607421875,
-0.0430908203125,
0.01293182373046875,
0.00010406970977783203,
-0.044647216796875,
-0.018035888671875,
0.020233154296875,
-0.040771484375,
0.01264190673828125,
-0.03363037109375,
-0.0244903564453125,
-0.0187225341796875,
0.0188751220703125,
-0.0531005859375,
0.00424957275390625,
0.01605224609375,
0.0241851806640625,
0.037628173828125,
0.058563232421875,
-0.0007281303405761719,
0.0263671875,
-0.005336761474609375,
0.005035400390625,
0.021820068359375,
-0.0535888671875,
-0.039642333984375,
-0.0574951171875,
-0.0008549690246582031,
0.0230865478515625,
-0.04241943359375,
-0.045318603515625,
-0.07977294921875,
0.00334930419921875,
0.0210723876953125,
-0.0079193115234375,
-0.060821533203125,
0.023773193359375,
-0.0109405517578125,
0.05438232421875,
-0.0377197265625,
-0.00742340087890625,
0.0239410400390625,
0.058197021484375,
-0.02685546875,
-0.019622802734375,
-0.016448974609375,
-0.005130767822265625,
-0.04693603515625,
-0.023284912109375,
0.04620361328125,
0.0183258056640625,
-0.044921875,
-0.038848876953125,
-0.044769287109375,
-0.0008111000061035156,
-0.087646484375,
-0.0266265869140625,
0.002597808837890625,
0.0155792236328125,
0.02252197265625,
-0.07598876953125,
-0.0296630859375,
-0.03778076171875,
0.0243988037109375,
0.01374053955078125,
-0.01207733154296875,
-0.003429412841796875,
-0.025604248046875,
-0.0281982421875,
0.00836181640625,
0.0231475830078125,
-0.0222930908203125,
-0.0071258544921875,
0.0295257568359375,
-0.0131378173828125,
0.00966644287109375,
-0.0001169443130493164,
-0.01806640625,
0.0178680419921875,
-0.0036602020263671875,
0.0225067138671875,
0.020782470703125,
0.040008544921875,
0.032928466796875,
-0.0025539398193359375,
0.023712158203125,
0.0089111328125,
-0.0008869171142578125,
-0.01531219482421875,
0.00370025634765625,
0.0212249755859375,
0.033416748046875,
-0.00923919677734375,
0.02044677734375,
0.0140380859375,
-0.01287078857421875,
-0.0207977294921875,
0.0031986236572265625,
0.0031070709228515625,
-0.01419830322265625,
0.03802490234375,
0.0299224853515625,
0.00335693359375,
-0.007648468017578125,
-0.057464599609375,
-0.0084686279296875,
-0.032440185546875,
-0.0251312255859375,
0.0209808349609375,
-0.06982421875,
-0.00531005859375,
-0.03228759765625,
-0.00847625732421875,
-0.0347900390625,
0.006221771240234375,
-0.0257720947265625,
-0.0154266357421875,
0.0111541748046875,
-0.01526641845703125,
0.02880859375,
-0.046966552734375,
0.048614501953125,
-0.025604248046875,
0.007568359375,
0.004619598388671875,
0.041290283203125,
0.0172882080078125,
0.0205230712890625,
0.0312347412109375,
0.01137542724609375,
-0.036224365234375,
0.0171661376953125,
0.0019521713256835938,
0.031646728515625,
-0.037506103515625,
-0.0357666015625,
-0.0173797607421875,
-0.0003116130828857422,
-0.005069732666015625,
-0.009063720703125,
0.0013275146484375,
0.049072265625,
0.018280029296875,
0.020477294921875,
-0.03009033203125,
-0.036224365234375,
-0.040496826171875,
0.016265869140625,
0.021087646484375,
-0.0049285888671875,
0.07415771484375,
-0.012176513671875,
-0.0045318603515625,
-0.007007598876953125,
0.017120361328125,
-0.04296875,
0.053802490234375,
-0.019866943359375,
0.01824951171875,
0.0252227783203125
]
|
2be1ec017c4fffd1f1590bb8ba364ce436352642 | Wordpress Stackexchange
Q: How can I find plugins' slug? I'm wondering how can I find plugins' slug (slug = internal name used by WordPress to do plugin updates and to determine which plugins are currently active)? It is usually plugin's folder name but if a plugin doesn't have a folder, it is its file name (like hello.php). Are there any other exceptions?
*
*Do lowercase and uppercase characters matter?
*Can a plugin have different slug than its folder name? What if there's a plugin called hello.php and another /hello.php/hello.php?
A: If you install WP-CLI then you can get the list of plugins with their slug and version from the command line:
> wp plugin list
I know that's probably not what you want, if you need to find the slug in code, but it has helped me while working with the TGM-Plugin-Activation plugin.
I find it hard to work with WordPress without the WP-CLI, in general it's a very useful tool for many common tasks related to WordPress.
| Q: How can I find plugins' slug? I'm wondering how can I find plugins' slug (slug = internal name used by WordPress to do plugin updates and to determine which plugins are currently active)? It is usually plugin's folder name but if a plugin doesn't have a folder, it is its file name (like hello.php). Are there any other exceptions?
*
*Do lowercase and uppercase characters matter?
*Can a plugin have different slug than its folder name? What if there's a plugin called hello.php and another /hello.php/hello.php?
A: If you install WP-CLI then you can get the list of plugins with their slug and version from the command line:
> wp plugin list
I know that's probably not what you want, if you need to find the slug in code, but it has helped me while working with the TGM-Plugin-Activation plugin.
I find it hard to work with WordPress without the WP-CLI, in general it's a very useful tool for many common tasks related to WordPress.
A: For most plugins, the "slug" will be the same as the directory name. Although the .org people can set the directory name to anything they want.
$slug = (dirname(plugin_basename(__FILE__)));
A: The difference between the plugin (main) file and the plugin's slug is a place where the WordPress Codex could do much better.
I understand your confusion as I have felt it too recently (mixed with frustration).
This is what I have learned by doing some "detective work" on the WordPress core code.
The plugin file
This is the unique way WordPress identifies and records a plugin. It is made up of the plugin's directory AND the main plugin file (the one with the file header containing the various plugin details like version, author, etc.).
It would look something like this: your-plugin-directory/main-file.php
If you look at the active plugins data (returned by get_option( 'active_plugins' ) ), you will see that WordPress only needs this plugin file to properly identify plugins.
You could choose to think of it as your plugin's main file relative path (relative to the wp-content/plugins/ directory that is). You could "compose" the absolute path of the main plugin file with something like this: trailingslashit( WP_PLUGIN_DIR ) . $plugin_main_file
The core itself generates the plugin file like this:
$plugin_main_file = plugin_basename( trim( $plugin_main_file_absolute_path ) );
The plugin slug
One would expect the plugin "slug" to be some sort of standardized ID for the plugin like the post slug is for posts - so you could use this "slug" to provide it to WordPress core functions and get things going.
Not really. After searching the core for references to plugin slugs (or themes for what matters) and finding almost nothing, I think I have a grasp on it.
The only real slugs are those for things accessible via a unique URL: posts, pages, taxonomies, etc. That is the whole point of taking the name of something (like a post title) and generating a URL friendly version of that: to use it in a URL.
But where do we use theme/plugins "slugs" in URLs?
We don't do that on individual WordPress installations - neither in the WP admin or the frontend.
However, there is a place very much entangled with the WordPress code, the WordPress.org site. People are having a hard time distinguishing between the two, including that it got somehow common among developers to consider the WordPress.org theme or plugin slugs should work the same as a post or page slug.
They serve the same purpose but on separate websites. On WordPress.org they are used to uniquely identify a theme from others, and a plugin from the rest (in URLs like https://wordpress.org/plugins/akismet/).
But when it comes to individual WordPress installations, the same uniqueness can't be guaranteed because there is no authority to enforce it (like on WordPress.org). It could work if all the plugins and themes came from WordPress.org, but thankfully that is not the case.
What does the WordPress code do with theme/plugin slugs?
The WordPress core code doesn't rely on theme/plugin slugs to do things like installing, activating, updating, deleting themes or plugins.
For themes, it relies on the theme directory since the main entry point into a theme is the style.css file (you can't use another CSS file to hold your theme details header).
For plugins, it relies on the plugin directory AND the main plugin file, since plugins can call their main file however they like.
The only thing the core uses theme/plugins slugs for is when it handles themes and plugins from the WordPress.org directory: fetching lists of plugins, checking for updates, reporting back to the directory usage data, and so on.
To wrap things up about plugin slugs: whenever you find plugin data with the slug entry, 99% of the time it will refer to the WordPress.org slug of the plugin.
How do we go about identifying plugins?
If you want to programmatically activate, update, deactivate or delete a certain plugin on a WordPress installation, you need to use the plugin file. You can get it like this from your plugin's main file:
$plugin_file = plugin_basename( __FILE__ );
If you want to target a certain plugin from another plugin, things get a bit trickier since you need to rely on a bit of "guesswork".
You could hard-code the plugin name, search the plugin in the list of all plugins (see get_plugins()) and get the plugin file from there.
If you know a class or function that is defined by that plugin you could use reflection (see this answer for classes and this one for functions).
I hope this helps you and others that might have a hard time dealing with "plugin slugs". It could have saved me a couple of hours :)
A: The string used in WordPress to identify the plugin is:
plugin_basename($file);
… where $file is a file with the plugin headers.
So if you are in your plugin, get the slug with:
$slug = plugin_basename( __FILE__ );
A: Unfortunately the slug is returned via the Update API, the answer to this question is not so obvious unless you query the API itself. However, if you want to see a list of your current plugin slugs and related plugin data you can simply do:
print_r(get_site_transient('update_plugins'));
But, this will not have info on a newly installed plugin for another 12 hours, you would have to do something different for those, eg. use a modified version of code from wp_update_plugins in wp-includes/update.php...
Having done this to test it out, it seems to confirm that, regardless of the plugin filename or location or uppercase, it is actually the Plugin Name that generates the update slug, most likely via sanitize_title. So I believe the correct answer should be:
// if you have the plugin basename:
// $pluginfile = WP_PLUGIN_DIR.'/'.$pluginbasename;
// otherwise if you have the absolute path already:
$plugin = get_plugin_data($pluginfile);
$pluginslug = sanitize_title($plugin['Name']);
A: Just to clarify since the original post.
The way I have found the plugin slug is by first navigating to your plugin folder then opening the folder associated with the plugin, and finally finding the file that houses the below code. Once you have found this file, the file name minus the extension should be your plugin slug.
For example if the i found the below code in a file named advanced-plugin-awesomeness.php my slug would be advanced-plugin-awesomeness.
Hope this helps!
/*
Plugin Name: Name of plugin here
Version: 2.4.6
Description: plugin description here
Author: plugin author here
A: You can get the plugin's folder name (PHP5.3+) by passing DIR to plugin_basename(), like so:
$plugin_foldername = plugin_basename( __DIR__ );
A: Try this:
function get_slugname(){
$tmp = array();
$plugins_all = get_plugins() ;
$plugin_slug = explode('/',dirname(plugin_basename(__FILE__)));
foreach ($plugins_all as $key=>$value) {
if ($plugin_slug[0] == explode('/',$key)[0] ) {
$tmp = $value;
$tmp['slug'] = explode('/',$key)[0];
$tmp['file'] = explode('/',$key)[1];
}
}
return $tmp;
}
| wordpress | {
"language": "en",
"length": 1304,
"provenance": "stackexchange_00019.jsonl.gz:438525",
"question_score": "17",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120004"
} | [
0.0160675048828125,
0.010528564453125,
-0.02655029296875,
-0.0012388229370117188,
-0.0001857280731201172,
-0.01806640625,
0.0126953125,
-0.0194854736328125,
-0.02020263671875,
0.038665771484375,
-0.0234832763671875,
0.03802490234375,
-0.004802703857421875,
-0.01033782958984375,
0.0174713134765625,
-0.014251708984375,
0.03887939453125,
-0.0159759521484375,
-0.0084381103515625,
-0.018402099609375,
0.0020656585693359375,
0.0257720947265625,
-0.023590087890625,
0.10345458984375,
0.04315185546875,
-0.044769287109375,
0.08404541015625,
-0.0279998779296875,
0.021087646484375,
-0.038970947265625,
0.035125732421875,
0.015777587890625,
0.027130126953125,
-0.00469207763671875,
0.0242462158203125,
0.03350830078125,
0.0149078369140625,
0.000012278556823730469,
0.028076171875,
-0.01136016845703125,
0.03436279296875,
-0.01227569580078125,
0.03460693359375,
0.0092926025390625,
0.01062774658203125,
-0.0350341796875,
0.0236968994140625,
-0.0546875,
0.026397705078125,
-0.0144500732421875,
-0.01032257080078125,
0.0163726806640625,
0.007602691650390625,
-0.0204925537109375,
-0.016387939453125,
-0.00400543212890625,
-0.0167236328125,
0.07073974609375,
0.012298583984375,
-0.03033447265625,
-0.022369384765625,
0.040924072265625,
0.01611328125,
0.0338134765625,
0.00740814208984375,
-0.01611328125,
-0.028350830078125,
0.02642822265625,
0.0027675628662109375,
0.01476287841796875,
0.0176544189453125,
-0.0118255615234375,
0.0251007080078125,
0.018341064453125,
-0.01690673828125,
-0.035125732421875,
0.01418304443359375,
-0.0006089210510253906,
0.0274200439453125,
0.002338409423828125,
0.044647216796875,
-0.0157470703125,
0.009674072265625,
0.03082275390625,
0.00824737548828125,
0.056640625,
-0.0032291412353515625,
-0.041656494140625,
-0.02655029296875,
0.00977325439453125,
-0.032379150390625,
0.05670166015625,
-0.0054168701171875,
-0.00007963180541992188,
-0.040679931640625,
0.022705078125,
0.043182373046875,
0.0285491943359375,
0.01117706298828125,
-0.01178741455078125,
0.0391845703125,
-0.04681396484375,
-0.006099700927734375,
-0.00873565673828125,
0.0098876953125,
0.06451416015625,
0.01519012451171875,
0.0156097412109375,
0.012451171875,
0.005191802978515625,
0.00713348388671875,
0.0007162094116210938,
-0.004878997802734375,
-0.03204345703125,
0.0013113021850585938,
0.039825439453125,
-0.025909423828125,
0.017974853515625,
-0.005096435546875,
-0.0037555694580078125,
0.011627197265625,
0.032135009765625,
0.0155792236328125,
-0.020111083984375,
-0.037353515625,
-0.03521728515625,
-0.0144500732421875,
-0.03948974609375,
-0.01110076904296875,
0.03936767578125,
-0.0268707275390625,
0.00624847412109375,
0.03497314453125,
0.00806427001953125,
-0.0213470458984375,
-0.01094818115234375,
0.01245880126953125,
0.0029163360595703125,
0.01511383056640625,
-0.007129669189453125,
-0.0034809112548828125,
0.0026798248291015625,
0.030029296875,
-0.0126495361328125,
0.0228271484375,
-0.0158538818359375,
-0.0009551048278808594,
0.0298004150390625,
0.0140380859375,
0.04046630859375,
-0.013427734375,
-0.01898193359375,
0.0247650146484375,
0.007175445556640625,
-0.009124755859375,
0.0002682209014892578,
0.01226806640625,
-0.01314544677734375,
-0.0205535888671875,
-0.0224151611328125,
-0.0281829833984375,
0.0008196830749511719,
0.034637451171875,
-0.039886474609375,
-0.0176849365234375,
-0.0010995864868164062,
-0.0160369873046875,
0.00754547119140625,
0.0094757080078125,
-0.0114898681640625,
0.00492095947265625,
0.0189666748046875,
0.01397705078125,
0.004367828369140625,
0.0128021240234375,
-0.0046844482421875,
-0.0225677490234375,
0.0513916015625,
0.0278472900390625,
0.036407470703125,
0.036529541015625,
-0.01068115234375,
0.080810546875,
-0.000827789306640625,
-0.06463623046875,
-0.002490997314453125,
0.0026836395263671875,
0.0179595947265625,
0.03021240234375,
-0.00696563720703125,
0.049163818359375,
0.004512786865234375,
-0.02520751953125,
0.02679443359375,
-0.04302978515625,
0.0095062255859375,
0.00789642333984375,
0.050537109375,
-0.02471923828125,
-0.032623291015625,
-0.0161285400390625,
-0.009307861328125,
-0.031768798828125,
0.002773284912109375,
-0.11767578125,
-0.00970458984375,
-0.027496337890625,
0.03955078125,
0.01788330078125,
0.00022721290588378906,
-0.0029697418212890625,
-0.0147247314453125,
0.011016845703125,
-0.04705810546875,
-0.044464111328125,
0.0254058837890625,
-0.042633056640625,
-0.0257568359375,
-0.0134429931640625,
0.037109375,
-0.0323486328125,
0.0274200439453125,
-0.058013916015625,
-0.0460205078125,
0.01824951171875,
0.0201568603515625,
-0.03375244140625,
-0.004528045654296875,
-0.0016698837280273438,
0.0265655517578125,
-0.038360595703125,
0.0164947509765625,
0.027984619140625,
0.01898193359375,
-0.023773193359375,
-0.003086090087890625,
0.0246734619140625,
-0.039031982421875,
0.0025577545166015625,
0.032928466796875,
0.03375244140625,
0.0318603515625,
-0.02740478515625,
-0.033050537109375,
0.04107666015625,
-0.06890869140625,
-0.0171966552734375,
-0.0025959014892578125,
0.0269927978515625,
0.0406494140625,
-0.035308837890625,
0.0156402587890625,
0.0289306640625,
0.039520263671875,
0.0011539459228515625,
0.0443115234375,
-0.0169677734375,
-0.04937744140625,
0.002490997314453125,
0.048065185546875,
-0.007659912109375,
-0.054290771484375,
-0.0064849853515625,
-0.026031494140625,
-0.03302001953125,
0.0217742919921875,
-0.00015795230865478516,
0.00888824462890625,
-0.01934814453125,
0.002483367919921875,
0.0197601318359375,
0.0255279541015625,
-0.004619598388671875,
0.05633544921875,
0.050018310546875,
-0.0057373046875,
-0.02996826171875,
-0.0283355712890625,
0.0033359527587890625,
0.03863525390625,
-0.037841796875,
-0.00667572021484375,
0.01151275634765625,
-0.013397216796875,
-0.037322998046875,
-0.059722900390625,
0.045166015625,
-0.004749298095703125,
-0.032562255859375,
0.012420654296875,
0.03314208984375,
0.0228729248046875,
-0.03143310546875,
0.0299224853515625,
-0.0163421630859375,
-0.00015163421630859375,
0.05633544921875,
-0.0159759521484375,
0.0078582763671875,
0.0158538818359375,
0.06317138671875,
0.055877685546875,
0.01171112060546875,
0.0035400390625,
-0.0032329559326171875,
-0.03485107421875,
-0.01058197021484375,
-0.0140838623046875,
-0.03570556640625,
0.004810333251953125,
-0.06292724609375,
0.0447998046875,
0.0014257431030273438,
0.01904296875,
-0.041656494140625,
-0.06732177734375,
-0.0418701171875,
-0.0168609619140625,
-0.12841796875,
-0.0643310546875,
-0.0308380126953125,
-0.062286376953125,
-0.003902435302734375,
0.00394439697265625,
-0.03887939453125,
0.0001004934310913086,
0.034820556640625,
0.02392578125,
0.00890350341796875,
-0.046844482421875,
-0.041717529296875,
-0.0518798828125,
-0.072998046875,
0.00576019287109375,
0.009521484375,
0.0022106170654296875,
0.0007162094116210938,
0.024810791015625,
-0.007732391357421875,
-0.050384521484375,
-0.01198577880859375,
0.032501220703125,
-0.00618743896484375,
0.0105743408203125,
0.0008339881896972656,
-0.0182037353515625,
-0.005279541015625,
0.003101348876953125,
0.040802001953125,
0.021484375,
-0.006694793701171875,
-0.0019683837890625,
0.0006017684936523438,
-0.03802490234375,
0.016876220703125,
0.01126861572265625,
-0.016876220703125,
-0.0386962890625,
0.0208282470703125,
-0.057891845703125,
0.00765228271484375,
-0.023223876953125,
-0.027557373046875,
0.027069091796875,
0.00746917724609375,
0.00330352783203125,
-0.0023632049560546875,
-0.00186920166015625,
0.004581451416015625,
0.0305633544921875,
-0.0012035369873046875,
-0.0166778564453125,
0.0273284912109375,
-0.01419830322265625,
-0.0068206787109375,
-0.0177764892578125,
0.04815673828125,
0.003330230712890625,
-0.00713348388671875,
0.01340484619140625,
0.046630859375,
0.0074615478515625,
0.0226593017578125,
-0.03717041015625,
0.0095672607421875,
0.0192718505859375,
0.00048542022705078125,
0.0184173583984375,
-0.01166534423828125,
0.0005211830139160156,
-0.034820556640625,
0.024444580078125,
-0.03936767578125,
-0.031524658203125,
0.030120849609375,
0.00951385498046875,
0.00439453125,
0.0104217529296875,
-0.045806884765625,
-0.03564453125,
-0.0655517578125,
0.00972747802734375,
0.01064300537109375,
-0.02435302734375,
-0.0255126953125,
0.0423583984375,
-0.0601806640625,
-0.032867431640625,
0.037994384765625,
-0.03155517578125,
0.027923583984375,
-0.007022857666015625,
0.005596160888671875,
-0.0177154541015625,
-0.045257568359375,
-0.0160369873046875,
-0.04730224609375,
-0.005992889404296875,
-0.006397247314453125,
0.04217529296875,
0.0196380615234375,
-0.038116455078125,
-0.02130126953125,
0.030609130859375,
0.0106964111328125,
0.060302734375,
0.019775390625,
0.003704071044921875,
0.0399169921875,
0.0215301513671875,
0.03564453125,
-0.0018301010131835938,
0.0004878044128417969,
-0.022674560546875,
-0.069091796875,
0.02490234375,
-0.00002181529998779297,
0.06866455078125,
0.025787353515625,
-0.03106689453125,
0.0089874267578125,
-0.01271820068359375,
-0.0027408599853515625,
-0.0014829635620117188,
-0.01483154296875,
0.01340484619140625,
0.0034008026123046875,
0.019287109375,
0.06219482421875,
0.00957489013671875,
-0.0013523101806640625,
-0.0007982254028320312,
0.07745361328125,
0.002605438232421875,
-0.034576416015625,
-0.0714111328125,
-0.0004048347473144531,
0.03375244140625,
0.059417724609375,
0.00612640380859375,
0.006439208984375,
-0.0174560546875,
-0.0127105712890625,
0.02789306640625,
-0.046966552734375,
0.00011670589447021484,
0.0238037109375,
0.007720947265625,
-0.003574371337890625,
-0.0322265625,
-0.030517578125,
0.062225341796875,
0.046142578125,
-0.02154541015625,
-0.01519012451171875,
-0.033050537109375,
0.045501708984375,
-0.020355224609375,
0.033599853515625,
-0.03912353515625,
-0.1219482421875,
0.0296630859375,
-0.037994384765625,
0.01751708984375,
0.03790283203125,
-0.0250091552734375,
0.09539794921875,
0.028717041015625,
0.0009565353393554688,
0.0077667236328125,
0.0149078369140625,
-0.004207611083984375,
0.032745361328125,
0.00696563720703125,
-0.002338409423828125,
-0.005035400390625,
-0.0187530517578125,
0.059967041015625,
-0.01092529296875,
-0.04534912109375,
-0.00018787384033203125,
-0.0298004150390625,
-0.01059722900390625,
0.037017822265625,
0.0179443359375,
0.0303802490234375,
0.031494140625,
-0.0301055908203125,
-0.0211181640625,
-0.01186370849609375,
0.03863525390625,
-0.04425048828125,
0.002910614013671875,
-0.035003662109375,
0.00252532958984375,
-0.0149078369140625,
0.04168701171875,
0.01471710205078125,
0.0030612945556640625,
-0.0122833251953125,
-0.0129852294921875,
-0.01361083984375,
0.0235443115234375,
0.037689208984375,
-0.04571533203125,
0.01485443115234375,
-0.031158447265625,
0.0216827392578125,
-0.0267333984375,
0.0201263427734375,
0.0008802413940429688,
0.01548004150390625,
-0.00998687744140625,
-0.031646728515625,
0.040985107421875,
-0.0084381103515625,
0.00855255126953125,
0.0183868408203125,
-0.0028285980224609375,
-0.00798797607421875,
-0.01873779296875,
-0.00875091552734375,
0.0228424072265625,
-0.01305389404296875,
-0.0213470458984375,
0.00943756103515625,
-0.005527496337890625,
0.0015497207641601562,
0.03955078125,
-0.07855224609375,
0.022979736328125,
0.053619384765625,
0.0039825439453125,
-0.0167083740234375,
-0.02349853515625,
-0.0205535888671875,
-0.0113525390625,
-0.0229949951171875,
-0.0089263916015625,
0.06396484375,
-0.025177001953125,
0.0309906005859375,
-0.0117034912109375,
-0.019134521484375,
0.039337158203125,
0.0190277099609375,
0.0269012451171875,
0.006862640380859375,
-0.0927734375,
0.0124053955078125,
-0.0236968994140625,
0.0062255859375,
0.039520263671875,
-0.02294921875,
-0.040924072265625,
-0.038421630859375,
-0.0139312744140625,
0.037628173828125,
-0.0009465217590332031,
0.03485107421875,
-0.002628326416015625,
0.004535675048828125,
-0.024139404296875,
0.05322265625,
-0.013580322265625,
0.01039886474609375,
0.03717041015625,
0.0017681121826171875,
0.0162353515625,
-0.0054931640625,
-0.006313323974609375,
-0.0172271728515625,
-0.000028192996978759766,
0.035675048828125,
-0.01165008544921875,
-0.0140838623046875,
0.028900146484375,
-0.0223846435546875,
0.053466796875,
-0.00861358642578125,
-0.01568603515625,
0.0030689239501953125,
0.0012598037719726562,
-0.00885772705078125,
0.03472900390625,
0.020477294921875,
-0.0304412841796875,
0.053131103515625,
-0.059234619140625,
-0.034210205078125,
0.019317626953125,
0.003971099853515625,
0.02227783203125,
-0.0294952392578125,
-0.00806427001953125,
0.037689208984375,
-0.0341796875,
0.0677490234375,
0.051055908203125,
-0.004642486572265625,
0.020477294921875,
0.019683837890625,
0.015655517578125,
-0.00722503662109375,
-0.02862548828125,
0.0584716796875,
0.00701141357421875,
0.10394287109375,
0.010040283203125,
-0.01447296142578125,
0.083984375,
-0.0457763671875,
-0.0035572052001953125,
0.0106048583984375,
0.0035247802734375,
-0.03704833984375,
-0.0017175674438476562,
0.003936767578125,
-0.006885528564453125,
0.007518768310546875,
0.00986480712890625,
-0.01529693603515625,
-0.01454925537109375,
0.03948974609375,
-0.022979736328125,
-0.011077880859375,
0.01690673828125,
0.006137847900390625,
-0.027496337890625,
0.00919342041015625,
0.03753662109375,
0.022674560546875,
-0.019073486328125,
-0.0174102783203125,
-0.0102691650390625,
-0.0010538101196289062,
-0.02105712890625,
0.010772705078125,
0.0038318634033203125,
-0.0059814453125,
-0.01154327392578125,
0.04425048828125,
-0.0166015625,
0.029205322265625,
0.057403564453125,
0.0088958740234375,
0.04779052734375,
0.05377197265625,
0.00437164306640625,
0.006114959716796875,
0.024688720703125,
-0.0299530029296875,
0.0260772705078125,
-0.011627197265625,
-0.006740570068359375,
0.042938232421875,
-0.04278564453125,
-0.0034389495849609375,
-0.0160980224609375,
0.04290771484375,
-0.0244293212890625,
-0.05621337890625,
0.062042236328125,
-0.0212249755859375,
-0.01116180419921875,
0.005340576171875,
0.0266876220703125,
0.0089111328125,
-0.00432586669921875,
0.035400390625,
-0.037872314453125,
0.0167388916015625,
0.00844573974609375,
0.00943756103515625,
-0.022552490234375,
-0.005916595458984375,
-0.06024169921875,
0.08807373046875,
-0.0147247314453125,
0.038604736328125,
0.023468017578125,
0.0302886962890625,
-0.00806427001953125,
0.0063018798828125,
-0.040191650390625,
0.0526123046875,
-0.040374755859375,
0.057647705078125,
-0.040679931640625,
0.011077880859375,
0.0146331787109375,
-0.0005125999450683594,
0.07867431640625,
0.019012451171875,
-0.03143310546875,
0.003787994384765625,
0.036102294921875,
-0.0189361572265625,
-0.050079345703125,
0.08355712890625,
0.040283203125,
0.0191650390625,
0.0694580078125,
0.004375457763671875,
0.051300048828125,
-0.0295562744140625,
0.03399658203125,
0.040618896484375,
0.01320648193359375,
0.01517486572265625,
-0.0218505859375,
0.032562255859375,
0.006153106689453125,
-0.023590087890625,
-0.00591278076171875,
0.00832366943359375,
-0.03460693359375,
0.05133056640625,
0.032257080078125,
-0.058563232421875,
-0.059539794921875,
-0.0292816162109375,
0.0472412109375,
0.00023353099822998047,
0.00641632080078125,
-0.0307159423828125,
-0.00226593017578125,
0.0274505615234375,
-0.040679931640625,
-0.0164642333984375,
0.035888671875,
-0.03607177734375,
0.03753662109375,
0.0038089752197265625,
0.027496337890625,
-0.017303466796875,
0.01506805419921875,
0.03521728515625,
0.04229736328125,
-0.04022216796875,
-0.06866455078125,
0.0181427001953125,
0.005809783935546875,
-0.017059326171875,
0.030731201171875,
-0.0165557861328125,
-0.0009183883666992188,
0.07305908203125,
-0.05718994140625,
-0.01136016845703125,
0.040283203125,
0.022186279296875,
-0.00998687744140625,
-0.031829833984375,
-0.00513458251953125,
-0.0243682861328125,
-0.0251007080078125,
0.028106689453125,
0.01316070556640625,
0.03857421875,
-0.0188140869140625,
0.0694580078125,
0.0063323974609375,
-0.01049041748046875,
-0.02655029296875,
0.04644775390625,
-0.01922607421875,
0.0394287109375,
-0.07171630859375,
-0.040863037109375,
0.0174407958984375,
0.049072265625,
0.061370849609375,
-0.00498199462890625,
0.0288238525390625,
-0.004413604736328125,
-0.0270233154296875,
0.017974853515625,
0.0239715576171875,
-0.01261138916015625,
0.0294036865234375,
-0.02935791015625,
0.042388916015625,
0.00238037109375,
-0.0031375885009765625,
-0.0421142578125,
0.0216217041015625,
0.041778564453125,
-0.0318603515625,
0.037200927734375,
-0.004756927490234375,
0.00867462158203125,
0.052459716796875,
-0.00701141357421875,
0.013092041015625,
-0.005443572998046875,
-0.051055908203125,
-0.01885986328125,
-0.01511383056640625,
-0.0293731689453125,
0.02215576171875,
0.04144287109375,
-0.0106658935546875,
0.0242767333984375,
0.007335662841796875,
-0.0147247314453125,
0.00855255126953125,
0.0081787109375,
0.0234222412109375,
0.034698486328125,
0.0121917724609375,
0.0182342529296875,
-0.01325225830078125,
-0.0005998611450195312,
-0.00595855712890625,
0.0100860595703125,
0.0228729248046875,
0.078125,
-0.022491455078125,
0.00804901123046875,
-0.0209503173828125,
-0.03125,
0.0059051513671875,
-0.0261077880859375,
0.0167694091796875,
0.0006613731384277344,
-0.02740478515625,
-0.00635528564453125,
-0.03680419921875,
0.004398345947265625,
0.03204345703125,
-0.0086212158203125,
-0.01427459716796875,
-0.00350189208984375,
0.0191650390625,
0.0171356201171875,
0.031402587890625,
-0.01251983642578125,
-0.034942626953125,
0.0008254051208496094,
0.0126190185546875,
0.01068115234375,
0.0217437744140625,
-0.0102081298828125,
0.00048041343688964844,
-0.02630615234375,
-0.0274505615234375,
-0.012847900390625,
0.01253509521484375,
-0.047882080078125,
0.0230712890625,
0.00830078125,
-0.040252685546875,
-0.021240234375,
-0.01461029052734375,
0.0029735565185546875,
-0.004947662353515625,
0.0521240234375,
-0.019439697265625,
0.01142120361328125,
0.0216064453125,
-0.0240478515625,
0.00934600830078125,
-0.04241943359375,
0.0062408447265625,
-0.019622802734375,
0.031341552734375,
0.040283203125,
-0.110595703125,
-0.03887939453125,
-0.08294677734375,
0.00600433349609375,
0.050079345703125,
-0.046234130859375,
-0.0018491744995117188,
-0.035614013671875,
-0.0178680419921875,
0.00897979736328125,
-0.006954193115234375,
-0.0031604766845703125,
-0.00634765625,
-0.01464080810546875,
0.00391387939453125,
-0.01238250732421875,
0.01126861572265625,
-0.0014667510986328125,
-0.01538848876953125,
-0.053466796875,
0.01140594482421875,
-0.01316070556640625,
0.00612640380859375,
0.0396728515625,
0.02880859375,
0.06414794921875,
-0.038482666015625,
-0.016937255859375,
0.0125579833984375,
0.035919189453125,
0.049072265625,
-0.0233917236328125,
-0.00823974609375,
0.05755615234375,
-0.0304107666015625,
-0.0211029052734375,
-0.0509033203125,
-0.01104736328125,
-0.0254364013671875,
0.0048828125,
-0.00975799560546875,
-0.0013723373413085938,
-0.01047515869140625,
-0.0626220703125,
-0.07781982421875,
0.06719970703125,
-0.01497650146484375,
-0.035430908203125,
-0.07373046875,
0.00450897216796875,
0.0279388427734375,
-0.0208587646484375,
-0.041839599609375,
-0.00043582916259765625,
-0.06591796875,
0.018341064453125,
0.00952911376953125,
0.0300445556640625,
-0.006183624267578125,
0.0198822021484375,
0.01177978515625,
0.072265625,
0.061553955078125,
-0.016937255859375,
0.020965576171875,
0.01244354248046875,
0.00730133056640625,
0.05047607421875,
-0.03363037109375,
-0.0107269287109375,
-0.0341796875,
-0.048065185546875,
-0.0023651123046875,
-0.03448486328125,
-0.0419921875,
-0.01214599609375,
0.0694580078125,
0.061676025390625,
0.024993896484375,
-0.035308837890625,
-0.0421142578125,
-0.00394439697265625,
-0.0400390625,
0.00604248046875,
0.040374755859375,
-0.06890869140625,
0.0222930908203125,
0.009307861328125,
0.01393890380859375,
-0.02227783203125,
-0.005809783935546875,
-0.00653076171875,
-0.0267181396484375,
-0.0026035308837890625,
0.0010423660278320312,
-0.0019130706787109375,
-0.04547119140625,
0.065185546875,
-0.029144287109375,
0.0192413330078125,
-0.01433563232421875,
0.03955078125,
0.049163818359375,
0.004459381103515625,
-0.0004646778106689453,
0.00940704345703125,
-0.008026123046875,
0.0160064697265625,
0.00899505615234375,
0.01435089111328125,
-0.0025844573974609375,
-0.01125335693359375,
-0.005451202392578125,
0.0269622802734375,
0.005428314208984375,
0.01215362548828125,
-0.0341796875,
0.06427001953125,
0.00821685791015625,
0.0792236328125,
0.0285491943359375,
-0.040069580078125,
-0.0006842613220214844,
0.055694580078125,
0.014801025390625,
-0.053619384765625,
0.01129150390625,
-0.06317138671875,
-0.0006799697875976562,
0.0060272216796875,
-0.01285552978515625,
-0.0496826171875,
0.0202484130859375,
-0.005146026611328125,
-0.001712799072265625,
0.0266571044921875
]
|
032489758f4d94d55ba152800f58d3ebfd33e465 | Wordpress Stackexchange
Q: How to change "Registration complete. Please check your e-mail." in wp-login.php I want to override the phrase "Registration complete. Please check your e-mail." without modifying the core code in wp-login.php
Does anyone know what the add_filter() or add_action() might look like?
Thanks.
A: After wp-login.php figures out what error messages to display, the $errors object gets passed through the wp_login_errors filter:
$errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
When that error message is added to the list of "errors", wp-login uses the code 'registered', which you can use to narrow down your search.
So something like this should do it (untested, but this is the basic flow of the code):
add_filter( 'wp_login_errors', 'override_reg_complete_msg', 10, 2 );
function override_reg_complete_msg( $errors, $redirect_to ) {
if( isset( $errors->errors['registered'] ) ) {
$needle = __('Registration complete. Please check your e-mail.');
foreach( $errors->errors['registered'] as $index => $msg ) {
if( $msg === $needle ) {
$errors->errors['registered'][$index] = 'Your new message';
}
}
}
return $errors;
}
| Q: How to change "Registration complete. Please check your e-mail." in wp-login.php I want to override the phrase "Registration complete. Please check your e-mail." without modifying the core code in wp-login.php
Does anyone know what the add_filter() or add_action() might look like?
Thanks.
A: After wp-login.php figures out what error messages to display, the $errors object gets passed through the wp_login_errors filter:
$errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
When that error message is added to the list of "errors", wp-login uses the code 'registered', which you can use to narrow down your search.
So something like this should do it (untested, but this is the basic flow of the code):
add_filter( 'wp_login_errors', 'override_reg_complete_msg', 10, 2 );
function override_reg_complete_msg( $errors, $redirect_to ) {
if( isset( $errors->errors['registered'] ) ) {
$needle = __('Registration complete. Please check your e-mail.');
foreach( $errors->errors['registered'] as $index => $msg ) {
if( $msg === $needle ) {
$errors->errors['registered'][$index] = 'Your new message';
}
}
}
return $errors;
}
| wordpress | {
"language": "en",
"length": 162,
"provenance": "stackexchange_00019.jsonl.gz:438528",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120026"
} | [
0.06964111328125,
-0.00397491455078125,
-0.01313018798828125,
-0.0258331298828125,
0.01690673828125,
-0.0662841796875,
0.056884765625,
-0.0244903564453125,
0.0124053955078125,
0.038604736328125,
-0.0167236328125,
-0.00732421875,
0.020538330078125,
-0.0195770263671875,
-0.0189666748046875,
-0.0200653076171875,
-0.01287841796875,
0.003143310546875,
0.0119171142578125,
-0.02294921875,
0.0097503662109375,
-0.021240234375,
-0.006221771240234375,
0.03448486328125,
-0.0239105224609375,
-0.0210723876953125,
0.10650634765625,
-0.046966552734375,
-0.00039076805114746094,
-0.027862548828125,
-0.0006036758422851562,
0.01447296142578125,
0.00963592529296875,
0.06219482421875,
-0.0672607421875,
-0.0474853515625,
0.0296783447265625,
0.005878448486328125,
-0.020233154296875,
0.049713134765625,
0.058319091796875,
-0.027984619140625,
0.050262451171875,
-0.017791748046875,
0.01129913330078125,
0.0014886856079101562,
0.06329345703125,
-0.0157318115234375,
0.03912353515625,
-0.0025691986083984375,
0.01442718505859375,
0.049072265625,
0.0166168212890625,
-0.043792724609375,
-0.01119232177734375,
0.02020263671875,
-0.050567626953125,
0.034271240234375,
0.027587890625,
0.05029296875,
0.01255035400390625,
0.0167083740234375,
-0.0216064453125,
-0.0379638671875,
-0.01415252685546875,
-0.0272979736328125,
-0.05517578125,
0.0005660057067871094,
-0.0289459228515625,
-0.0195770263671875,
0.0362548828125,
-0.0206146240234375,
0.0083160400390625,
-0.00534820556640625,
-0.004520416259765625,
0.026641845703125,
-0.02734375,
0.00807952880859375,
0.0450439453125,
0.00913238525390625,
0.016998291015625,
-0.031707763671875,
0.011688232421875,
0.03851318359375,
-0.007198333740234375,
0.049407958984375,
-0.00586700439453125,
-0.0291290283203125,
0.0028018951416015625,
-0.0081329345703125,
-0.0039043426513671875,
0.00876617431640625,
-0.016357421875,
0.0025463104248046875,
-0.00827789306640625,
-0.04571533203125,
0.0256195068359375,
0.047943115234375,
-0.036376953125,
-0.005779266357421875,
-0.030120849609375,
-0.0014820098876953125,
-0.020477294921875,
-0.02056884765625,
-0.0149993896484375,
0.050689697265625,
-0.018768310546875,
0.016937255859375,
0.0032405853271484375,
0.02996826171875,
0.0253448486328125,
-0.026702880859375,
-0.03912353515625,
-0.050811767578125,
-0.038970947265625,
0.039886474609375,
-0.02618408203125,
-0.034942626953125,
0.0206451416015625,
-0.01154327392578125,
0.01520538330078125,
0.034332275390625,
0.013427734375,
-0.037994384765625,
-0.00807952880859375,
-0.01454925537109375,
-0.01186370849609375,
-0.055419921875,
0.046630859375,
0.00739288330078125,
-0.0271148681640625,
0.037506103515625,
0.01448822021484375,
-0.028167724609375,
-0.0292510986328125,
-0.002498626708984375,
0.0258636474609375,
0.021697998046875,
-0.025390625,
0.0308837890625,
-0.001201629638671875,
-0.0361328125,
-0.02728271484375,
0.0030574798583984375,
0.004344940185546875,
0.007663726806640625,
0.01100921630859375,
0.0220489501953125,
0.00439453125,
-0.005558013916015625,
-0.01226043701171875,
0.00788116455078125,
-0.01332855224609375,
0.033660888671875,
0.00614166259765625,
0.05364990234375,
0.01334381103515625,
0.0147857666015625,
-0.0223541259765625,
0.0038433074951171875,
0.037384033203125,
-0.00861358642578125,
-0.0143585205078125,
-0.037322998046875,
-0.07415771484375,
0.005008697509765625,
-0.056610107421875,
-0.0142059326171875,
0.0287628173828125,
0.0267333984375,
0.046051025390625,
0.022918701171875,
0.025726318359375,
0.0219573974609375,
0.0013418197631835938,
-0.029571533203125,
-0.00812530517578125,
0.0362548828125,
0.01377105712890625,
0.0011854171752929688,
-0.002330780029296875,
-0.0347900390625,
0.038726806640625,
-0.002338409423828125,
-0.0684814453125,
0.006145477294921875,
0.020263671875,
0.032440185546875,
0.01983642578125,
0.006977081298828125,
0.0882568359375,
-0.00885009765625,
-0.0179290771484375,
-0.00464630126953125,
-0.0435791015625,
-0.050445556640625,
0.05242919921875,
0.01357269287109375,
-0.01227569580078125,
0.052581787109375,
0.01348876953125,
0.00754547119140625,
0.0010976791381835938,
0.002063751220703125,
-0.061248779296875,
0.004581451416015625,
-0.0302581787109375,
0.028533935546875,
-0.043792724609375,
0.0119781494140625,
0.03082275390625,
-0.0119781494140625,
-0.0272979736328125,
-0.0089263916015625,
-0.005626678466796875,
-0.029022216796875,
-0.0311431884765625,
0.042205810546875,
0.00310516357421875,
0.04681396484375,
0.00481414794921875,
-0.0290069580078125,
0.0013217926025390625,
-0.0181427001953125,
-0.0010652542114257812,
-0.00757598876953125,
-0.0098114013671875,
-0.01439666748046875,
0.0159759521484375,
-0.0018606185913085938,
0.020355224609375,
0.0163726806640625,
-0.00540924072265625,
-0.007579803466796875,
-0.045684814453125,
-0.0035839080810546875,
-0.0085296630859375,
-0.0307159423828125,
0.00563812255859375,
0.038421630859375,
0.0279541015625,
0.035400390625,
0.00043320655822753906,
0.036651611328125,
0.033935546875,
-0.04229736328125,
0.00974273681640625,
0.0185699462890625,
0.0178680419921875,
0.01543426513671875,
-0.01110076904296875,
-0.015289306640625,
0.044586181640625,
-0.01149749755859375,
0.00852203369140625,
0.041168212890625,
-0.00638580322265625,
-0.043426513671875,
-0.0482177734375,
0.0302886962890625,
0.01511383056640625,
-0.08135986328125,
-0.051849365234375,
-0.02703857421875,
0.007167816162109375,
-0.0455322265625,
-0.0247344970703125,
-0.0523681640625,
-0.037322998046875,
-0.01471710205078125,
0.049835205078125,
-0.04473876953125,
-0.002605438232421875,
-0.0011310577392578125,
-0.01444244384765625,
0.0282745361328125,
-0.050811767578125,
0.031829833984375,
0.012359619140625,
-0.012054443359375,
-0.03436279296875,
-0.019317626953125,
-0.038726806640625,
-0.0011034011840820312,
0.00608062744140625,
-0.0282440185546875,
0.014129638671875,
0.0037708282470703125,
0.0163726806640625,
-0.03314208984375,
0.01434326171875,
-0.0118408203125,
-0.051727294921875,
0.051513671875,
-0.0036983489990234375,
-0.037933349609375,
-0.017120361328125,
-0.032745361328125,
0.042510986328125,
-0.05072021484375,
-0.0006289482116699219,
0.05389404296875,
-0.003986358642578125,
0.0015506744384765625,
0.0026035308837890625,
-0.0190582275390625,
-0.017242431640625,
0.010986328125,
-0.00885772705078125,
-0.021484375,
-0.002941131591796875,
0.080322265625,
0.0248565673828125,
0.0162200927734375,
-0.001491546630859375,
-0.0411376953125,
-0.017608642578125,
0.004535675048828125,
-0.051300048828125,
-0.055694580078125,
-0.059478759765625,
-0.0247344970703125,
0.003864288330078125,
0.025177001953125,
0.0037250518798828125,
0.00667572021484375,
0.022186279296875,
0.01355743408203125,
0.0029964447021484375,
-0.032806396484375,
-0.05712890625,
-0.052734375,
-0.060791015625,
0.012969970703125,
0.0018262863159179688,
0.0228118896484375,
0.0008573532104492188,
0.0304718017578125,
0.01265716552734375,
-0.01007080078125,
0.023193359375,
0.03570556640625,
0.00040841102600097656,
-0.00960540771484375,
-0.014617919921875,
-0.0440673828125,
0.013397216796875,
-0.0008406639099121094,
-0.0256195068359375,
-0.01861572265625,
0.03936767578125,
-0.01186370849609375,
0.01194000244140625,
-0.01306915283203125,
0.00917816162109375,
-0.02197265625,
-0.0216522216796875,
-0.0005750656127929688,
-0.008148193359375,
-0.03973388671875,
-0.0067138671875,
0.0013875961303710938,
-0.02508544921875,
-0.0279388427734375,
-0.0103302001953125,
-0.0208892822265625,
0.01421356201171875,
-0.037078857421875,
0.00562286376953125,
-0.0198974609375,
0.03399658203125,
-0.0462646484375,
0.047027587890625,
-0.00893402099609375,
-0.007808685302734375,
-0.045074462890625,
0.00823974609375,
-0.02435302734375,
-0.03265380859375,
-0.023345947265625,
0.03143310546875,
0.00478363037109375,
-0.00922393798828125,
-0.044036865234375,
-0.07952880859375,
0.02197265625,
-0.08306884765625,
-0.00566864013671875,
-0.053009033203125,
0.00212860107421875,
0.0084381103515625,
0.09539794921875,
-0.0010404586791992188,
-0.01506805419921875,
-0.0134429931640625,
-0.0232696533203125,
0.041290283203125,
0.00176239013671875,
-0.0037174224853515625,
-0.015716552734375,
-0.045745849609375,
0.009307861328125,
-0.00846099853515625,
-0.01410675048828125,
0.0076446533203125,
-0.033416748046875,
0.0007786750793457031,
-0.040771484375,
0.032012939453125,
0.0138397216796875,
-0.0022144317626953125,
0.037261962890625,
-0.007808685302734375,
0.007648468017578125,
-0.01198577880859375,
-0.0083770751953125,
-0.10858154296875,
-0.013427734375,
-0.04974365234375,
0.0960693359375,
0.03375244140625,
-0.03607177734375,
-0.0238037109375,
0.044525146484375,
0.0007519721984863281,
-0.0180816650390625,
0.0129852294921875,
0.01126861572265625,
-0.01326751708984375,
0.0059661865234375,
0.0014905929565429688,
-0.0187530517578125,
0.004734039306640625,
0.00566864013671875,
-0.077392578125,
0.00579833984375,
0.0009021759033203125,
0.0161590576171875,
0.062347412109375,
-0.052734375,
-0.032684326171875,
-0.022705078125,
-0.047088623046875,
-0.0250244140625,
0.00594329833984375,
-0.06768798828125,
-0.0002307891845703125,
-0.043487548828125,
0.04364013671875,
-0.0213623046875,
-0.0282135009765625,
0.0005397796630859375,
0.034149169921875,
0.01158905029296875,
-0.01885986328125,
0.0018587112426757812,
0.007022857666015625,
0.0267333984375,
0.0013704299926757812,
0.00690460205078125,
-0.00124359130859375,
-0.0096588134765625,
0.02886962890625,
-0.01045989990234375,
-0.044769287109375,
0.040069580078125,
0.0238800048828125,
0.0469970703125,
-0.007228851318359375,
-0.0223236083984375,
0.015106201171875,
0.0180206298828125,
-0.006622314453125,
0.01242828369140625,
-0.006839752197265625,
0.046051025390625,
0.0043792724609375,
-0.0141448974609375,
0.0131072998046875,
0.015899658203125,
-0.05084228515625,
0.0205535888671875,
0.004329681396484375,
-0.0455322265625,
0.0038394927978515625,
-0.005176544189453125,
-0.0220794677734375,
-0.0193023681640625,
-0.0001558065414428711,
-0.00920867919921875,
-0.0271759033203125,
-0.01116943359375,
0.0153961181640625,
0.0132598876953125,
-0.013214111328125,
0.0120697021484375,
-0.013427734375,
0.0258026123046875,
0.006008148193359375,
-0.0692138671875,
0.047454833984375,
0.00267791748046875,
0.00791168212890625,
0.031890869140625,
-0.025146484375,
0.052978515625,
0.03839111328125,
-0.02813720703125,
-0.00445556640625,
-0.01513671875,
0.0024662017822265625,
-0.048065185546875,
-0.02032470703125,
0.0002644062042236328,
-0.017181396484375,
-0.02044677734375,
0.022125244140625,
0.00435638427734375,
-0.0140838623046875,
0.0037059783935546875,
0.0147857666015625,
0.019866943359375,
0.03173828125,
0.025054931640625,
-0.00861358642578125,
-0.0101165771484375,
0.01050567626953125,
0.016876220703125,
-0.01971435546875,
0.004909515380859375,
-0.034912109375,
0.0197601318359375,
0.0018854141235351562,
-0.003246307373046875,
0.03619384765625,
-0.016510009765625,
-0.006763458251953125,
0.07562255859375,
0.00945281982421875,
-0.063232421875,
-0.051422119140625,
-0.007080078125,
0.05023193359375,
-0.048583984375,
0.00997161865234375,
-0.0170135498046875,
-0.01258087158203125,
-0.0013713836669921875,
0.04925537109375,
-0.01123809814453125,
-0.03619384765625,
-0.03253173828125,
0.013916015625,
-0.0231170654296875,
-0.00960540771484375,
-0.05694580078125,
-0.004718780517578125,
-0.02899169921875,
0.002582550048828125,
0.05023193359375,
-0.0284423828125,
0.007110595703125,
-0.0194549560546875,
0.006839752197265625,
-0.034088134765625,
0.005550384521484375,
0.03997802734375,
0.005924224853515625,
-0.00562286376953125,
0.000308990478515625,
-0.0235748291015625,
-0.0274200439453125,
-0.029083251953125,
-0.032470703125,
-0.03302001953125,
-0.00887298583984375,
-0.0100555419921875,
-0.005702972412109375,
-0.01557159423828125,
-0.0287628173828125,
-0.0297088623046875,
0.0274200439453125,
0.04315185546875,
-0.005321502685546875,
-0.0207061767578125,
0.015594482421875,
0.01139068603515625,
-0.044921875,
-0.019775390625,
-0.0040435791015625,
0.010986328125,
-0.00004595518112182617,
-0.01160430908203125,
-0.038665771484375,
0.0003566741943359375,
0.01018524169921875,
-0.02337646484375,
0.026336669921875,
0.04046630859375,
0.00412750244140625,
0.01493072509765625,
-0.00868988037109375,
-0.006824493408203125,
-0.0116424560546875,
0.031707763671875,
0.01104736328125,
0.0026149749755859375,
0.052825927734375,
-0.0230712890625,
-0.0196380615234375,
-0.0086669921875,
0.0543212890625,
-0.0019969940185546875,
-0.034210205078125,
-0.00431060791015625,
-0.0186309814453125,
-0.03814697265625,
0.044677734375,
0.0168914794921875,
-0.00893402099609375,
0.02899169921875,
-0.01390838623046875,
0.0264739990234375,
0.031341552734375,
-0.01335906982421875,
0.025177001953125,
0.034576416015625,
0.057342529296875,
-0.003902435302734375,
-0.0164031982421875,
0.022857666015625,
-0.03570556640625,
0.0169219970703125,
0.07562255859375,
0.0643310546875,
-0.133056640625,
0.0220794677734375,
0.01763916015625,
0.018890380859375,
0.0300445556640625,
0.042266845703125,
0.002292633056640625,
0.047027587890625,
-0.05096435546875,
-0.044677734375,
-0.0283355712890625,
-0.01824951171875,
0.024139404296875,
-0.0087432861328125,
0.004810333251953125,
0.0745849609375,
0.019195556640625,
-0.025115966796875,
-0.01274871826171875,
-0.006931304931640625,
0.00693511962890625,
-0.0188751220703125,
0.03851318359375,
0.02581787109375,
-0.0074615478515625,
-0.0762939453125,
0.00899505615234375,
0.017791748046875,
-0.042724609375,
-0.0098419189453125,
-0.055511474609375,
0.027099609375,
-0.0015201568603515625,
-0.0162811279296875,
-0.0308685302734375,
-0.01424407958984375,
-0.046905517578125,
0.031097412109375,
0.01358795166015625,
-0.0180816650390625,
-0.0076751708984375,
0.006549835205078125,
0.0028553009033203125,
-0.0090179443359375,
-0.004589080810546875,
-0.002410888671875,
-0.043182373046875,
0.047088623046875,
-0.02410888671875,
-0.0195159912109375,
0.01593017578125,
-0.01525115966796875,
-0.0014390945434570312,
-0.01122283935546875,
0.0180511474609375,
-0.07904052734375,
-0.06768798828125,
-0.0009059906005859375,
-0.0771484375,
-0.031646728515625,
-0.0264129638671875,
-0.048919677734375,
0.1654052734375,
0.0034999847412109375,
0.020599365234375,
0.01148223876953125,
0.0772705078125,
-0.04815673828125,
0.06475830078125,
-0.044342041015625,
0.04132080078125,
0.00768280029296875,
0.07427978515625,
0.00907135009765625,
0.01030731201171875,
0.047088623046875,
-0.0015583038330078125,
0.047393798828125,
0.01201629638671875,
-0.00264739990234375,
-0.0253143310546875,
0.00689697265625,
0.01273345947265625,
-0.0291595458984375,
0.0177154541015625,
-0.004283905029296875,
0.04010009765625,
0.034576416015625,
-0.0853271484375,
0.0191802978515625,
-0.038116455078125,
0.0023899078369140625,
0.024383544921875,
0.002872467041015625,
-0.01229095458984375,
0.006328582763671875,
0.0187530517578125,
-0.07293701171875,
0.0138092041015625,
0.046905517578125,
0.0141448974609375,
0.0008492469787597656,
0.035064697265625,
0.017425537109375,
0.0040130615234375,
0.04046630859375,
-0.032196044921875,
0.038116455078125,
-0.01128387451171875,
0.03070068359375,
0.0285491943359375,
0.00786590576171875,
0.080322265625,
0.0138092041015625,
0.00994110107421875,
0.0248565673828125,
0.02532958984375,
-0.0225372314453125,
0.0031108856201171875,
0.01904296875,
-0.0166778564453125,
0.029296875,
0.053863525390625,
-0.0018177032470703125,
-0.0046844482421875,
-0.046661376953125,
-0.00392913818359375,
-0.00601959228515625,
0.035736083984375,
0.0081634521484375,
0.039398193359375,
-0.08331298828125,
-0.0190887451171875,
-0.032745361328125,
-0.01537322998046875,
0.03363037109375,
-0.01433563232421875,
-0.0104217529296875,
-0.016876220703125,
0.044586181640625,
-0.00023663043975830078,
-0.0181427001953125,
-0.0010976791381835938,
0.0238494873046875,
0.01142120361328125,
-0.0260162353515625,
0.043060302734375,
0.02264404296875,
0.0140533447265625,
-0.033843994140625,
0.011138916015625,
0.00975799560546875,
0.03192138671875,
-0.061859130859375,
-0.006114959716796875,
0.0302886962890625,
0.043975830078125,
0.0019397735595703125,
-0.023956298828125,
0.03948974609375,
0.0341796875,
-0.058563232421875,
-0.0216522216796875,
0.058319091796875,
-0.016448974609375,
-0.017333984375,
-0.0110626220703125,
-0.01413726806640625,
0.0036106109619140625,
-0.01004791259765625,
-0.006488800048828125,
0.004299163818359375,
0.03460693359375,
-0.00868988037109375,
0.03118896484375,
-0.0086517333984375,
-0.0009746551513671875,
0.0025539398193359375,
0.0102691650390625,
0.0210723876953125,
0.02496337890625,
-0.07171630859375,
-0.036651611328125,
-0.0019855499267578125,
-0.016265869140625,
0.0179901123046875,
0.039215087890625,
0.0174102783203125,
0.000002682209014892578,
0.033355712890625,
-0.0258026123046875,
0.043487548828125,
-0.0203857421875,
-0.00121307373046875,
-0.002033233642578125,
0.01430511474609375,
-0.012969970703125,
-0.013031005859375,
-0.0006089210510253906,
0.0030498504638671875,
0.0202789306640625,
0.01154327392578125,
0.042236328125,
0.000926971435546875,
0.004146575927734375,
-0.04498291015625,
-0.0038738250732421875,
-0.0433349609375,
-0.044769287109375,
0.00888824462890625,
-0.03302001953125,
-0.0244598388671875,
0.0262908935546875,
-0.07452392578125,
0.05987548828125,
-0.0179290771484375,
0.021881103515625,
0.10418701171875,
-0.05877685546875,
-0.01056671142578125,
-0.0269622802734375,
0.031402587890625,
-0.0301055908203125,
-0.06640625,
-0.01910400390625,
0.01983642578125,
-0.018096923828125,
0.0169525146484375,
0.0269317626953125,
0.0198516845703125,
-0.042327880859375,
-0.019622802734375,
0.00732421875,
-0.0253753662109375,
-0.00848388671875,
0.023406982421875,
-0.039642333984375,
0.005336761474609375,
-0.028717041015625,
-0.0198516845703125,
-0.01068115234375,
0.01287841796875,
-0.004459381103515625,
-0.010040283203125,
0.005825042724609375,
-0.00696563720703125,
-0.004703521728515625,
0.006740570068359375,
-0.01727294921875,
-0.007274627685546875,
0.01534271240234375,
-0.022064208984375,
-0.01444244384765625,
-0.01409149169921875,
-0.0256805419921875,
-0.040771484375,
-0.023590087890625,
-0.002880096435546875,
-0.0214691162109375,
-0.068603515625,
0.007801055908203125,
0.0009937286376953125,
0.0190582275390625,
-0.009796142578125,
-0.037139892578125,
-0.01141357421875,
0.00283050537109375,
0.0638427734375,
-0.01157379150390625,
-0.009124755859375,
-0.01226806640625,
-0.0069427490234375,
-0.03704833984375,
-0.0204620361328125,
-0.06268310546875,
0.00710296630859375,
-0.0220947265625,
-0.048553466796875,
0.03155517578125,
0.00569915771484375,
-0.061676025390625,
-0.0931396484375,
-0.055511474609375,
-0.050445556640625,
-0.04290771484375,
-0.0247039794921875,
0.0173797607421875,
0.0153656005859375,
-0.0200042724609375,
-0.056884765625,
-0.0137176513671875,
-0.005779266357421875,
0.0288848876953125,
0.005352020263671875,
-0.02569580078125,
-0.01934814453125,
-0.0550537109375,
-0.0911865234375,
0.032196044921875,
-0.006496429443359375,
-0.035552978515625,
-0.07379150390625,
0.0322265625,
-0.005535125732421875,
0.0282745361328125,
-0.01218414306640625,
-0.0260162353515625,
-0.005794525146484375,
0.032470703125,
0.0185089111328125,
-0.00833892822265625,
0.039581298828125,
0.0263671875,
-0.047576904296875,
0.0153656005859375,
-0.0022411346435546875,
0.0011043548583984375,
0.006389617919921875,
-0.00867462158203125,
0.0264739990234375,
0.041534423828125,
-0.0212554931640625,
-0.0187225341796875,
-0.016754150390625,
-0.032257080078125,
0.00431060791015625,
-0.103515625,
0.00829315185546875,
0.004962921142578125,
0.06610107421875,
-0.01409912109375,
0.00400543212890625,
-0.044219970703125,
-0.02880859375,
0.0011682510375976562,
0.00621795654296875,
-0.0139923095703125,
0.0048828125,
-0.059326171875,
-0.013031005859375,
-0.009857177734375,
-0.0230865478515625,
-0.0217437744140625,
-0.01274871826171875,
-0.04425048828125,
0.00205230712890625,
0.000035643577575683594,
-0.00934600830078125,
0.0087432861328125,
-0.061279296875,
0.055999755859375,
-0.02197265625,
-0.003490447998046875,
-0.01056671142578125,
0.045623779296875,
0.005573272705078125,
0.0045623779296875,
0.0113067626953125,
-0.00531005859375,
-0.0313720703125,
-0.016754150390625,
0.004795074462890625,
-0.005523681640625,
-0.005359649658203125,
-0.036285400390625,
-0.00006115436553955078,
0.0221099853515625,
-0.0091552734375,
0.0228118896484375,
0.00463104248046875,
0.0167388916015625,
-0.0179595947265625,
0.07781982421875,
0.0110321044921875,
0.004848480224609375,
-0.01666259765625,
0.0188751220703125,
0.0185394287109375,
-0.01739501953125,
0.0219268798828125,
0.0060577392578125,
0.021728515625,
0.01351165771484375,
0.0682373046875,
-0.0106964111328125,
0.0355224609375,
-0.0034313201904296875,
0.029754638671875,
0.0214080810546875
]
|
3301881a53f58c4fa83d5277a2015bfb87c45213 | Wordpress Stackexchange
Q: Add a Custom Field in Comment Box AFTER text area BUT BEFORE Send button I was inspired by this Q&A: Add a Custom Field in Comment Box next to the Text area but I have to insert the custom field after the textarea but before the Send button.
I did not found the proper action to customize and I guess it not exists at all.
comment_form_after_fields puts my output before textarea
comment_form_after puts my output after Send button
Am I wrong?
add_action( 'comment_form_after', 'test');
function test(){
echo "TEST";
}
add_action( 'comment_form_after_fields', 'test');
function test(){
echo "TEST";
}
A: Filter comment_form_defaults and add your code to the textarea.
Sample code, not tested:
add_filter( 'comment_form_defaults', 'wpse_120049_extend_textarea' );
function wpse_120049_extend_textarea( $args )
{
$args['comment_field'] .= '<p>Extra text.</p>';
return $args;
}
| Q: Add a Custom Field in Comment Box AFTER text area BUT BEFORE Send button I was inspired by this Q&A: Add a Custom Field in Comment Box next to the Text area but I have to insert the custom field after the textarea but before the Send button.
I did not found the proper action to customize and I guess it not exists at all.
comment_form_after_fields puts my output before textarea
comment_form_after puts my output after Send button
Am I wrong?
add_action( 'comment_form_after', 'test');
function test(){
echo "TEST";
}
add_action( 'comment_form_after_fields', 'test');
function test(){
echo "TEST";
}
A: Filter comment_form_defaults and add your code to the textarea.
Sample code, not tested:
add_filter( 'comment_form_defaults', 'wpse_120049_extend_textarea' );
function wpse_120049_extend_textarea( $args )
{
$args['comment_field'] .= '<p>Extra text.</p>';
return $args;
}
| wordpress | {
"language": "en",
"length": 128,
"provenance": "stackexchange_00019.jsonl.gz:438536",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120049"
} | [
0.032257080078125,
-0.0181732177734375,
-0.01361846923828125,
-0.0496826171875,
0.006931304931640625,
-0.022613525390625,
0.01068878173828125,
0.00379180908203125,
-0.0258026123046875,
0.01293182373046875,
-0.029266357421875,
0.0030727386474609375,
-0.036224365234375,
-0.0262908935546875,
-0.01141357421875,
-0.06549072265625,
-0.0014057159423828125,
0.018280029296875,
0.0158233642578125,
-0.0215606689453125,
0.019561767578125,
-0.033416748046875,
0.0044097900390625,
0.001209259033203125,
0.00131988525390625,
-0.0222320556640625,
0.11138916015625,
-0.01108551025390625,
0.01287841796875,
0.0010166168212890625,
0.018463134765625,
-0.0443115234375,
0.0108642578125,
0.05810546875,
-0.059295654296875,
0.001514434814453125,
0.0086517333984375,
0.011566162109375,
-0.0137939453125,
0.058929443359375,
0.04180908203125,
-0.028533935546875,
-0.006793975830078125,
0.029205322265625,
-0.007396697998046875,
-0.0217437744140625,
0.04345703125,
-0.03857421875,
0.042236328125,
0.00958251953125,
-0.0241241455078125,
0.0135955810546875,
-0.007122039794921875,
-0.01033782958984375,
-0.0166015625,
-0.0182952880859375,
-0.06280517578125,
0.01078033447265625,
0.0051116943359375,
0.05303955078125,
0.043060302734375,
0.01059722900390625,
-0.017364501953125,
-0.0086517333984375,
-0.0019245147705078125,
0.001438140869140625,
-0.00775909423828125,
0.0178375244140625,
-0.0194549560546875,
-0.02447509765625,
0.0006561279296875,
-0.04827880859375,
0.007568359375,
-0.049530029296875,
0.0299224853515625,
-0.004962921142578125,
-0.0175018310546875,
-0.028778076171875,
0.01200103759765625,
0.01247406005859375,
-0.0289154052734375,
0.004329681396484375,
-0.01244354248046875,
-0.048126220703125,
-0.00800323486328125,
-0.040863037109375,
-0.0292816162109375,
0.01110076904296875,
-0.01430511474609375,
-0.0469970703125,
-0.009033203125,
-0.07867431640625,
-0.047515869140625,
0.0430908203125,
0.00920867919921875,
-0.024078369140625,
0.00027108192443847656,
-0.004741668701171875,
0.0065460205078125,
0.005847930908203125,
0.0204010009765625,
-0.0255584716796875,
0.0212554931640625,
-0.01430511474609375,
0.024078369140625,
0.00750732421875,
-0.05767822265625,
-0.07305908203125,
0.023712158203125,
0.0362548828125,
-0.0218505859375,
-0.048553466796875,
0.031890869140625,
-0.002376556396484375,
-0.0210723876953125,
-0.01297760009765625,
-0.0033054351806640625,
-0.003017425537109375,
-0.012237548828125,
-0.0017080307006835938,
-0.0219268798828125,
-0.042388916015625,
0.024139404296875,
-0.0104217529296875,
0.04815673828125,
-0.001956939697265625,
-0.043243408203125,
0.04315185546875,
0.0205230712890625,
0.0287628173828125,
-0.0286102294921875,
0.00550079345703125,
0.039825439453125,
0.0248260498046875,
0.01605224609375,
-0.021392822265625,
0.024658203125,
-0.01934814453125,
-0.0062255859375,
0.036407470703125,
-0.020599365234375,
-0.040802001953125,
-0.018157958984375,
-0.006572723388671875,
-0.039703369140625,
0.033782958984375,
0.0193634033203125,
-0.003925323486328125,
-0.0309600830078125,
-0.105712890625,
0.0273590087890625,
-0.0256805419921875,
0.049072265625,
0.01093292236328125,
-0.044586181640625,
-0.0260162353515625,
-0.0041351318359375,
-0.0261077880859375,
-0.01276397705078125,
-0.0474853515625,
0.0156097412109375,
-0.00418853759765625,
-0.01439666748046875,
-0.081298828125,
-0.07769775390625,
-0.025421142578125,
-0.042205810546875,
0.0035381317138671875,
0.033843994140625,
0.02630615234375,
0.00579071044921875,
0.010498046875,
0.040374755859375,
0.0296173095703125,
0.0040283203125,
0.01557159423828125,
0.006961822509765625,
0.0301971435546875,
0.00415802001953125,
-0.0085906982421875,
-0.0167694091796875,
-0.043609619140625,
0.059906005859375,
-0.0323486328125,
-0.0555419921875,
0.053497314453125,
0.01335906982421875,
0.07305908203125,
-0.003871917724609375,
0.02496337890625,
0.0088043212890625,
0.02020263671875,
-0.0011348724365234375,
-0.0144195556640625,
-0.01514434814453125,
-0.00588226318359375,
-0.005092620849609375,
0.0100860595703125,
-0.020233154296875,
0.01983642578125,
-0.0225982666015625,
-0.017303466796875,
0.0233154296875,
0.03985595703125,
-0.00396728515625,
0.039154052734375,
-0.02496337890625,
0.025482177734375,
0.0169219970703125,
-0.0035533905029296875,
0.013671875,
-0.0251007080078125,
0.0005817413330078125,
-0.036468505859375,
-0.05364990234375,
-0.005886077880859375,
-0.0035228729248046875,
0.036895751953125,
0.00714874267578125,
0.037841796875,
0.000026166439056396484,
-0.0404052734375,
-0.00885009765625,
-0.01099395751953125,
0.00760650634765625,
-0.0164337158203125,
-0.031341552734375,
-0.01141357421875,
0.01338958740234375,
-0.01129150390625,
0.005191802978515625,
0.046142578125,
0.041839599609375,
0.01035308837890625,
-0.029510498046875,
0.01264190673828125,
-0.0011882781982421875,
-0.07757568359375,
-0.02203369140625,
0.061126708984375,
0.01861572265625,
0.0250244140625,
0.00731658935546875,
0.0511474609375,
0.03302001953125,
0.0182952880859375,
0.029449462890625,
-0.004222869873046875,
0.03582763671875,
0.065185546875,
-0.02349853515625,
0.006610870361328125,
0.0146331787109375,
-0.061859130859375,
0.03912353515625,
0.0252227783203125,
-0.03338623046875,
-0.0421142578125,
0.0231781005859375,
-0.0325927734375,
0.028228759765625,
-0.04937744140625,
-0.05438232421875,
-0.007587432861328125,
0.0247955322265625,
0.022674560546875,
0.0155487060546875,
0.01306915283203125,
-0.052642822265625,
0.0274658203125,
0.03045654296875,
-0.0089874267578125,
-0.0029354095458984375,
-0.01264190673828125,
-0.0178680419921875,
0.01255035400390625,
-0.0202484130859375,
0.0169830322265625,
-0.00974273681640625,
-0.003879547119140625,
0.00025534629821777344,
0.0240478515625,
-0.0240020751953125,
-0.015777587890625,
0.02191162109375,
-0.04052734375,
-0.0142059326171875,
-0.0223846435546875,
-0.004512786865234375,
-0.0535888671875,
-0.007602691650390625,
-0.009490966796875,
-0.04229736328125,
0.02862548828125,
0.006916046142578125,
-0.058624267578125,
-0.01149749755859375,
-0.0010662078857421875,
0.0230560302734375,
-0.02789306640625,
0.00899505615234375,
0.049072265625,
-0.0237884521484375,
0.00921630859375,
-0.0195465087890625,
-0.019073486328125,
-0.033172607421875,
-0.00004094839096069336,
-0.02471923828125,
-0.036956787109375,
-0.05487060546875,
0.005207061767578125,
0.02734375,
0.05126953125,
0.020782470703125,
-0.0260772705078125,
0.02557373046875,
0.0421142578125,
-0.0086212158203125,
-0.0209808349609375,
0.035552978515625,
-0.052093505859375,
-0.03521728515625,
-0.0128631591796875,
-0.036346435546875,
0.0061492919921875,
-0.0171051025390625,
-0.00884246826171875,
-0.0245361328125,
-0.04461669921875,
-0.0384521484375,
-0.05853271484375,
-0.046234130859375,
0.0005998611450195312,
-0.00270843505859375,
0.00360870361328125,
0.01290130615234375,
0.0726318359375,
0.0222930908203125,
-0.029998779296875,
0.0286865234375,
-0.0210723876953125,
-0.002166748046875,
0.0305633544921875,
0.0036067962646484375,
-0.0265045166015625,
0.04345703125,
0.0091400146484375,
0.0256195068359375,
0.02880859375,
-0.01300811767578125,
-0.03448486328125,
-0.029632568359375,
-0.01346588134765625,
-0.0056304931640625,
-0.00832366943359375,
0.0283355712890625,
-0.01479339599609375,
0.0063629150390625,
-0.04827880859375,
0.0165863037109375,
0.021484375,
0.0035686492919921875,
-0.0256195068359375,
-0.01727294921875,
-0.019073486328125,
-0.00667572021484375,
0.027252197265625,
-0.007266998291015625,
0.006366729736328125,
0.05987548828125,
-0.01026153564453125,
0.002201080322265625,
-0.0164031982421875,
-0.041900634765625,
-0.04071044921875,
-0.0233001708984375,
-0.04034423828125,
0.031890869140625,
-0.01543426513671875,
0.01271820068359375,
-0.01308441162109375,
0.034698486328125,
-0.01922607421875,
-0.0640869140625,
0.04608154296875,
-0.032745361328125,
0.005496978759765625,
-0.0626220703125,
-0.02935791015625,
-0.00940704345703125,
0.073974609375,
-0.0450439453125,
-0.002777099609375,
-0.006168365478515625,
0.0005578994750976562,
0.0038166046142578125,
-0.02197265625,
-0.043548583984375,
-0.022308349609375,
-0.0352783203125,
0.048614501953125,
0.00853729248046875,
0.007720947265625,
-0.049285888671875,
0.070068359375,
-0.033050537109375,
-0.018035888671875,
0.006351470947265625,
-0.0460205078125,
-0.021697998046875,
0.0180206298828125,
-0.05902099609375,
0.01161956787109375,
0.012847900390625,
-0.060577392578125,
-0.077880859375,
-0.0016832351684570312,
-0.0501708984375,
0.036712646484375,
0.0203704833984375,
0.00567626953125,
-0.00420379638671875,
0.04376220703125,
0.0251007080078125,
0.0003147125244140625,
0.0231475830078125,
0.0030670166015625,
-0.005298614501953125,
0.0183258056640625,
0.0303497314453125,
-0.022613525390625,
0.01422119140625,
0.029876708984375,
-0.0086212158203125,
0.070068359375,
-0.0261993408203125,
0.013092041015625,
0.015289306640625,
-0.05126953125,
0.033782958984375,
-0.02764892578125,
-0.029510498046875,
0.0201416015625,
-0.04400634765625,
0.016632080078125,
-0.0244598388671875,
-0.0009551048278808594,
-0.0379638671875,
-0.042083740234375,
0.007160186767578125,
0.02862548828125,
0.0246734619140625,
0.031585693359375,
0.006500244140625,
0.01143646240234375,
-0.0174713134765625,
0.03692626953125,
0.0221405029296875,
-0.017059326171875,
-0.0081787109375,
-0.050262451171875,
0.056732177734375,
0.00865936279296875,
0.0207672119140625,
-0.027862548828125,
0.08056640625,
0.0003581047058105469,
0.0012674331665039062,
0.0193328857421875,
-0.0113677978515625,
-0.017913818359375,
-0.0212860107421875,
-0.024200439453125,
0.0030078887939453125,
-0.006290435791015625,
0.035491943359375,
-0.0159912109375,
0.033660888671875,
-0.026580810546875,
-0.032684326171875,
0.0012216567993164062,
0.0030689239501953125,
0.054168701171875,
0.033935546875,
-0.0017337799072265625,
0.042205810546875,
0.004459381103515625,
0.0064697265625,
0.01311492919921875,
-0.04205322265625,
0.0073699951171875,
0.0280609130859375,
0.01132965087890625,
0.01424407958984375,
0.0285186767578125,
-0.0032176971435546875,
0.048431396484375,
0.0301055908203125,
-0.005199432373046875,
-0.0246734619140625,
-0.01070404052734375,
0.0215301513671875,
-0.039794921875,
0.01306915283203125,
0.006134033203125,
0.0003974437713623047,
-0.0009937286376953125,
0.022979736328125,
-0.00919342041015625,
0.01297760009765625,
-0.01326751708984375,
0.020263671875,
0.0260162353515625,
-0.0008845329284667969,
0.0009450912475585938,
0.051727294921875,
-0.0189208984375,
0.0272216796875,
-0.00882720947265625,
0.05572509765625,
0.049072265625,
0.00829315185546875,
0.01357269287109375,
0.0172119140625,
-0.00412750244140625,
-0.0171966552734375,
-0.01245880126953125,
-0.0046234130859375,
0.0140380859375,
0.02154541015625,
0.017913818359375,
0.0252838134765625,
0.004276275634765625,
-0.0082855224609375,
-0.01457977294921875,
-0.006107330322265625,
-0.0020275115966796875,
0.05078125,
-0.0186767578125,
0.0231781005859375,
0.034027099609375,
-0.0173797607421875,
0.017120361328125,
0.00040912628173828125,
0.0233001708984375,
-0.031829833984375,
0.0157623291015625,
0.01392364501953125,
0.0182037353515625,
-0.027862548828125,
-0.037567138671875,
0.036773681640625,
0.00702667236328125,
-0.023529052734375,
-0.0175933837890625,
-0.054534912109375,
0.0189666748046875,
0.0189208984375,
0.00850677490234375,
0.000033855438232421875,
0.015625,
-0.05328369140625,
0.0248260498046875,
-0.07733154296875,
0.0026683807373046875,
-0.0019197463989257812,
-0.0171356201171875,
-0.01861572265625,
-0.004180908203125,
-0.03436279296875,
-0.020721435546875,
-0.0499267578125,
-0.038665771484375,
-0.032806396484375,
0.01654052734375,
0.0216827392578125,
0.038604736328125,
-0.013641357421875,
-0.05010986328125,
-0.001995086669921875,
-0.005157470703125,
0.01092529296875,
0.03240966796875,
-0.009918212890625,
0.0704345703125,
0.0015048980712890625,
0.051605224609375,
0.0225982666015625,
0.04986572265625,
0.0023136138916015625,
-0.02825927734375,
-0.0005559921264648438,
-0.042449951171875,
-0.04302978515625,
-0.0196685791015625,
-0.018218994140625,
0.05853271484375,
0.0562744140625,
-0.0075531005859375,
0.018524169921875,
0.00649261474609375,
-0.004421234130859375,
-0.0135040283203125,
-0.007122039794921875,
0.0175933837890625,
0.0256500244140625,
0.0251922607421875,
-0.01131439208984375,
0.031402587890625,
-0.01161956787109375,
-0.013519287109375,
0.01424407958984375,
-0.0164031982421875,
0.0171966552734375,
0.0179290771484375,
-0.07470703125,
0.07244873046875,
0.051422119140625,
0.010345458984375,
0.048004150390625,
0.0013418197631835938,
0.0247039794921875,
0.0113525390625,
0.00750732421875,
-0.05267333984375,
-0.057464599609375,
0.06378173828125,
0.025390625,
-0.0306396484375,
0.0947265625,
-0.0247955322265625,
0.0308990478515625,
0.023834228515625,
0.07781982421875,
-0.06915283203125,
0.0130462646484375,
-0.004856109619140625,
-0.006809234619140625,
0.0867919921875,
-0.038360595703125,
0.0235595703125,
-0.0033893585205078125,
0.09100341796875,
0.03216552734375,
0.004856109619140625,
0.05224609375,
-0.016204833984375,
-0.010833740234375,
-0.002628326416015625,
0.0180511474609375,
0.00121307373046875,
-0.0184173583984375,
-0.0079345703125,
0.0029315948486328125,
-0.0181427001953125,
-0.011016845703125,
0.005825042724609375,
0.01666259765625,
-0.026580810546875,
-0.05584716796875,
0.0202484130859375,
-0.023681640625,
-0.0175933837890625,
0.0445556640625,
-0.0008287429809570312,
0.0269927978515625,
0.0162811279296875,
0.0002961158752441406,
0.0290374755859375,
-0.0323486328125,
0.0028553009033203125,
0.0151824951171875,
-0.035491943359375,
-0.0236358642578125,
0.037445068359375,
0.005298614501953125,
0.0193634033203125,
0.0193634033203125,
-0.0254364013671875,
-0.0022373199462890625,
0.05059814453125,
0.08062744140625,
-0.0234832763671875,
-0.0251617431640625,
0.0282135009765625,
0.01361083984375,
0.007648468017578125,
-0.0215301513671875,
-0.035430908203125,
-0.00783538818359375,
0.0236663818359375,
-0.051513671875,
-0.04931640625,
0.040435791015625,
-0.051361083984375,
-0.06915283203125,
0.11639404296875,
0.0191650390625,
0.029144287109375,
-0.0010356903076171875,
0.045166015625,
-0.03729248046875,
0.033782958984375,
-0.0030345916748046875,
0.01355743408203125,
-0.0190582275390625,
0.0382080078125,
-0.061614990234375,
-0.04852294921875,
-0.005817413330078125,
0.11810302734375,
0.050567626953125,
0.004730224609375,
-0.00678253173828125,
0.01558685302734375,
0.07574462890625,
0.051177978515625,
-0.00865936279296875,
0.006435394287109375,
0.02288818359375,
-0.0106201171875,
0.01451873779296875,
0.0206756591796875,
0.040985107421875,
-0.03369140625,
-0.0176239013671875,
0.0220794677734375,
0.02587890625,
0.0214691162109375,
-0.00716400146484375,
0.076416015625,
-0.0094451904296875,
-0.01276397705078125,
0.0244140625,
-0.0325927734375,
-0.043853759765625,
0.05548095703125,
-0.0024242401123046875,
0.0030670166015625,
0.010101318359375,
-0.038818359375,
0.037567138671875,
0.01399993896484375,
0.0703125,
0.051025390625,
0.0447998046875,
0.0233154296875,
0.00302886962890625,
0.055206298828125,
0.0180511474609375,
-0.050933837890625,
0.010223388671875,
0.00899505615234375,
0.0034618377685546875,
-0.020843505859375,
0.017730712890625,
0.01922607421875,
0.01442718505859375,
-0.02606201171875,
0.023284912109375,
0.0092926025390625,
-0.00878143310546875,
0.01181793212890625,
-0.040618896484375,
0.021759033203125,
-0.00850677490234375,
-0.0223541259765625,
-0.02886962890625,
0.0023212432861328125,
0.002292633056640625,
0.044769287109375,
-0.0110321044921875,
-0.01268768310546875,
-0.0330810546875,
-0.0156707763671875,
-0.0406494140625,
0.00948333740234375,
-0.003936767578125,
0.0282135009765625,
0.032745361328125,
0.0261993408203125,
0.0352783203125,
-0.0121307373046875,
-0.00666046142578125,
-0.005939483642578125,
0.027130126953125,
0.00359344482421875,
0.02679443359375,
0.039764404296875,
-0.0274200439453125,
-0.003574371337890625,
0.032012939453125,
0.0361328125,
0.023162841796875,
0.0038242340087890625,
0.0173187255859375,
0.0185394287109375,
0.00782012939453125,
-0.024261474609375,
-0.0113677978515625,
-0.04718017578125,
0.0248870849609375,
0.0462646484375,
0.0177764892578125,
0.01369476318359375,
-0.037567138671875,
0.067626953125,
-0.0040283203125,
-0.00728607177734375,
0.0097808837890625,
-0.0236053466796875,
0.047119140625,
0.019439697265625,
0.043731689453125,
0.034576416015625,
-0.05169677734375,
-0.00653839111328125,
0.006206512451171875,
-0.05517578125,
0.005115509033203125,
0.05084228515625,
-0.0019817352294921875,
0.0016584396362304688,
0.0232696533203125,
-0.02789306640625,
-0.0001767873764038086,
-0.0234832763671875,
0.03717041015625,
0.0018634796142578125,
-0.027069091796875,
0.00829315185546875,
-0.0418701171875,
-0.025360107421875,
-0.01128387451171875,
0.023468017578125,
0.042999267578125,
0.00817108154296875,
0.027130126953125,
0.0460205078125,
-0.043304443359375,
0.0215301513671875,
-0.019195556640625,
-0.046600341796875,
0.073486328125,
0.058502197265625,
0.00048470497131347656,
-0.0311431884765625,
-0.00775146484375,
0.03125,
0.0202484130859375,
-0.0151214599609375,
0.0194854736328125,
-0.01337432861328125,
0.01093292236328125,
-0.02069091796875,
0.0027408599853515625,
-0.037017822265625,
-0.0438232421875,
-0.0297698974609375,
-0.0015439987182617188,
-0.0036792755126953125,
-0.0310211181640625,
-0.0288543701171875,
0.0190582275390625,
0.00753021240234375,
0.03436279296875,
0.025482177734375,
0.01116943359375,
0.03265380859375,
0.0249481201171875,
-0.056060791015625,
-0.004852294921875,
0.01016998291015625,
-0.01313018798828125,
0.017333984375,
-0.0001010894775390625,
0.033203125,
0.0093841552734375,
0.016632080078125,
-0.01355743408203125,
-0.0008487701416015625,
0.05938720703125,
-0.0059661865234375,
0.01849365234375,
-0.03143310546875,
0.007598876953125,
0.0080718994140625,
-0.036956787109375,
-0.03656005859375,
-0.0218658447265625,
0.024658203125,
0.038360595703125,
0.0122833251953125,
0.01531982421875,
-0.051116943359375,
-0.0020847320556640625,
0.039276123046875,
0.0091094970703125,
-0.07177734375,
0.0234375,
-0.0127410888671875,
0.032928466796875,
-0.013458251953125,
-0.00640869140625,
0.0146484375,
0.0335693359375,
-0.0227813720703125,
-0.020355224609375,
-0.0211639404296875,
0.0182952880859375,
-0.0267181396484375,
0.017425537109375,
0.022918701171875,
-0.00952911376953125,
-0.0277862548828125,
0.03094482421875,
0.0038814544677734375,
0.06683349609375,
0.020782470703125,
-0.02557373046875,
0.038299560546875,
-0.0195465087890625,
-0.01383209228515625,
-0.048431396484375,
0.01195526123046875,
-0.0650634765625,
0.005329132080078125,
-0.034454345703125,
0.0323486328125,
0.038818359375,
-0.0268402099609375,
-0.07904052734375,
-0.005657196044921875,
-0.00841522216796875,
-0.03271484375,
-0.0291900634765625,
0.0006246566772460938,
-0.00417327880859375,
0.02862548828125,
-0.000732421875,
-0.016845703125,
-0.006866455078125,
0.026641845703125,
0.002094268798828125,
0.0307769775390625,
0.0236663818359375,
-0.0187530517578125,
-0.051055908203125,
-0.018829345703125,
-0.0229339599609375,
0.0174407958984375,
0.0078277587890625,
-0.0335693359375,
0.0295562744140625,
0.014373779296875,
-0.04400634765625,
-0.042022705078125,
0.004650115966796875,
0.01142120361328125,
-0.0297698974609375,
-0.00926971435546875,
0.0039005279541015625,
0.0202789306640625,
0.0300750732421875,
0.07196044921875,
0.005153656005859375,
-0.053619384765625,
0.0259246826171875,
0.0145721435546875,
-0.0006389617919921875,
-0.019622802734375,
-0.0030155181884765625,
-0.042877197265625,
-0.0305938720703125,
-0.0038204193115234375,
-0.00213623046875,
-0.01024627685546875,
0.023773193359375,
-0.00818634033203125,
-0.0010480880737304688,
0.0587158203125,
-0.01207733154296875,
-0.0162811279296875,
-0.0157928466796875,
0.10986328125,
-0.055999755859375,
-0.0025634765625,
0.022857666015625,
0.0131072998046875,
0.04705810546875,
0.01213836669921875,
0.0049591064453125,
-0.01325225830078125,
-0.03448486328125,
0.0199737548828125,
-0.01540374755859375,
0.06549072265625,
-0.04364013671875,
-0.03472900390625,
-0.015472412109375,
0.0121917724609375,
-0.00594329833984375,
-0.0007781982421875,
-0.011077880859375,
0.0282745361328125,
-0.01183319091796875,
0.06634521484375,
-0.046875,
0.031463623046875,
-0.029998779296875,
0.015655517578125,
0.0024127960205078125,
0.024810791015625,
0.0614013671875,
-0.0007262229919433594,
-0.00769805908203125,
0.042022705078125,
-0.0355224609375,
-0.04052734375,
0.0267181396484375,
0.10833740234375,
0.021453857421875,
0.01529693603515625
]
|
8bf9617e4075281f8645d6c3c00d230af4062376 | Wordpress Stackexchange
Q: Get multiple shortcode attribute values I'm trying to get several values from a shortcode. I tried several things without success.
The shortcode looks like this:
[myshortcode metakey="<field_key:key1, title:Title 1><field_key:key2, title:Title 2><field_key:key3, title:Title 3> ]
How would I get the field_key values? So in this case key1, key2 and key3?
A: Don't try to shove everything into a single attribute, or a single shortcode even. The string parsing you have to do will get more and more complicated. Try this:
function myshortcode_cb( $atts ) {
$atts = shortcode_atts(
array(
'cat' => '',
'title' => ''
),
$atts
);
// var_dump($atts); // debug
return "{$atts['cat']} :: {$atts['title']}";
}
add_shortcode('myshortcode','myshortcode_cb');
With this:
[myshortcode cat="key1" title="Title 1" /]
And create a shortcode for each case.
| Q: Get multiple shortcode attribute values I'm trying to get several values from a shortcode. I tried several things without success.
The shortcode looks like this:
[myshortcode metakey="<field_key:key1, title:Title 1><field_key:key2, title:Title 2><field_key:key3, title:Title 3> ]
How would I get the field_key values? So in this case key1, key2 and key3?
A: Don't try to shove everything into a single attribute, or a single shortcode even. The string parsing you have to do will get more and more complicated. Try this:
function myshortcode_cb( $atts ) {
$atts = shortcode_atts(
array(
'cat' => '',
'title' => ''
),
$atts
);
// var_dump($atts); // debug
return "{$atts['cat']} :: {$atts['title']}";
}
add_shortcode('myshortcode','myshortcode_cb');
With this:
[myshortcode cat="key1" title="Title 1" /]
And create a shortcode for each case.
| wordpress | {
"language": "en",
"length": 122,
"provenance": "stackexchange_00019.jsonl.gz:438552",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120083"
} | [
-0.0167694091796875,
-0.0198974609375,
0.00814056396484375,
-0.0117950439453125,
-0.05328369140625,
0.00484466552734375,
-0.022613525390625,
-0.0200653076171875,
0.005504608154296875,
0.037078857421875,
0.0258331298828125,
-0.00743865966796875,
-0.0404052734375,
-0.027130126953125,
-0.044830322265625,
-0.0360107421875,
0.025054931640625,
-0.0077362060546875,
0.01038360595703125,
-0.00955963134765625,
0.01544189453125,
0.0135650634765625,
-0.006916046142578125,
0.061767578125,
0.03582763671875,
-0.06793212890625,
0.05035400390625,
-0.0178070068359375,
0.0255126953125,
-0.006259918212890625,
0.028533935546875,
0.00666046142578125,
0.0712890625,
-0.040374755859375,
-0.007450103759765625,
0.07220458984375,
0.0160675048828125,
-0.030487060546875,
-0.00762176513671875,
0.0185089111328125,
0.017913818359375,
-0.0141448974609375,
0.0633544921875,
0.0300750732421875,
0.0169525146484375,
-0.024017333984375,
0.039703369140625,
-0.048797607421875,
-0.00821685791015625,
-0.0232086181640625,
0.018768310546875,
0.01049041748046875,
0.028350830078125,
0.01557159423828125,
-0.0025081634521484375,
0.01316070556640625,
-0.0207672119140625,
-0.059478759765625,
0.03509521484375,
0.0245513916015625,
-0.0182342529296875,
-0.048431396484375,
0.026947021484375,
-0.050018310546875,
-0.022003173828125,
0.012664794921875,
0.0194549560546875,
-0.0011157989501953125,
0.001346588134765625,
-0.01461029052734375,
0.0197601318359375,
-0.0164337158203125,
0.01332855224609375,
-0.03778076171875,
-0.013519287109375,
0.0075531005859375,
-0.00222015380859375,
-0.0226593017578125,
-0.0032100677490234375,
-0.006465911865234375,
0.004123687744140625,
-0.05078125,
-0.051849365234375,
0.0224609375,
0.00830078125,
0.035980224609375,
0.0018463134765625,
-0.00444793701171875,
0.024383544921875,
-0.035064697265625,
0.00992584228515625,
0.01184844970703125,
-0.032470703125,
0.037628173828125,
-0.003650665283203125,
-0.0293426513671875,
-0.0169830322265625,
0.022247314453125,
-0.01288604736328125,
0.0032672882080078125,
-0.003414154052734375,
-0.0250396728515625,
-0.00977325439453125,
-0.025726318359375,
-0.00856781005859375,
-0.016326904296875,
-0.0078887939453125,
0.00881195068359375,
0.025848388671875,
0.043914794921875,
-0.03424072265625,
0.021728515625,
-0.0364990234375,
0.0206451416015625,
-0.047271728515625,
0.017364501953125,
-0.0577392578125,
-0.0188751220703125,
-0.032440185546875,
-0.0005507469177246094,
0.003696441650390625,
0.03472900390625,
0.0266876220703125,
-0.062744140625,
0.0052642822265625,
-0.00020635128021240234,
-0.015899658203125,
-0.056427001953125,
0.0158538818359375,
-0.0014925003051757812,
-0.0192108154296875,
0.0178985595703125,
0.031341552734375,
0.0184326171875,
-0.004673004150390625,
0.00568389892578125,
-0.0394287109375,
-0.00565338134765625,
-0.0008635520935058594,
-0.0035305023193359375,
-0.0137176513671875,
-0.00965118408203125,
0.049530029296875,
-0.01971435546875,
-0.019866943359375,
0.00893402099609375,
0.007640838623046875,
0.0178375244140625,
-0.004154205322265625,
-0.0367431640625,
0.004169464111328125,
-0.01303863525390625,
0.01357269287109375,
0.0266876220703125,
-0.003963470458984375,
0.0293426513671875,
0.04559326171875,
-0.0191192626953125,
-0.027618408203125,
-0.024932861328125,
0.0124359130859375,
-0.016876220703125,
-0.00548553466796875,
-0.054046630859375,
-0.080078125,
0.00519561767578125,
-0.0256500244140625,
-0.02886962890625,
0.016326904296875,
0.041168212890625,
-0.016510009765625,
0.004947662353515625,
-0.01155853271484375,
0.0128936767578125,
-0.0010232925415039062,
0.006565093994140625,
-0.037872314453125,
0.019683837890625,
0.0267333984375,
-0.03466796875,
-0.0279083251953125,
-0.04266357421875,
0.014678955078125,
0.022308349609375,
-0.0523681640625,
0.035919189453125,
0.0049285888671875,
0.109130859375,
0.0254364013671875,
0.0303955078125,
0.004627227783203125,
-0.01605224609375,
0.01253509521484375,
-0.0038814544677734375,
-0.00048065185546875,
0.00501251220703125,
-0.0292205810546875,
0.0333251953125,
-0.01274871826171875,
-0.056365966796875,
0.035736083984375,
-0.042205810546875,
0.036834716796875,
0.0077972412109375,
0.0452880859375,
-0.023895263671875,
0.01476287841796875,
-0.01261138916015625,
-0.061431884765625,
-0.0020885467529296875,
0.0302886962890625,
-0.034637451171875,
-0.0283050537109375,
0.034698486328125,
0.029205322265625,
0.0027828216552734375,
-0.0234375,
0.0338134765625,
-0.00995635986328125,
0.01023101806640625,
0.004241943359375,
-0.0333251953125,
0.003238677978515625,
0.02294921875,
0.0217132568359375,
0.0182037353515625,
-0.0252685546875,
0.0032253265380859375,
0.01114654541015625,
0.041259765625,
-0.050201416015625,
-0.01385498046875,
-0.0119171142578125,
0.0012445449829101562,
-0.047515869140625,
0.00445556640625,
-0.03466796875,
-0.0129241943359375,
0.0004096031188964844,
0.04107666015625,
0.035919189453125,
0.053863525390625,
-0.00893402099609375,
-0.0175933837890625,
0.0509033203125,
0.006824493408203125,
0.02728271484375,
-0.034088134765625,
0.0172576904296875,
0.057525634765625,
-0.0200347900390625,
0.01123046875,
0.0008111000061035156,
-0.0728759765625,
0.0106964111328125,
0.039794921875,
-0.039093017578125,
-0.01477813720703125,
-0.0017709732055664062,
-0.006694793701171875,
0.0011386871337890625,
-0.08587646484375,
-0.013214111328125,
-0.05377197265625,
0.0826416015625,
0.02197265625,
0.051422119140625,
0.034271240234375,
-0.04052734375,
0.044677734375,
-0.00707244873046875,
-0.045013427734375,
-0.0014905929565429688,
-0.012054443359375,
-0.0030765533447265625,
0.0255279541015625,
-0.0164947509765625,
0.0149688720703125,
0.005443572998046875,
-0.0103912353515625,
-0.0023345947265625,
0.03631591796875,
-0.035003662109375,
-0.01959228515625,
-0.006778717041015625,
-0.015716552734375,
-0.0130462646484375,
-0.0005469322204589844,
-0.0113983154296875,
0.01116180419921875,
0.00905609130859375,
0.06298828125,
-0.0108184814453125,
0.02838134765625,
0.019317626953125,
0.0101165771484375,
0.0400390625,
-0.027099609375,
0.041290283203125,
-0.0301055908203125,
0.026458740234375,
0.05657958984375,
-0.0273590087890625,
0.01104736328125,
-0.0125885009765625,
-0.005420684814453125,
-0.03631591796875,
-0.0035839080810546875,
-0.00864410400390625,
-0.019927978515625,
-0.0465087890625,
0.045166015625,
0.022705078125,
0.10833740234375,
-0.00948333740234375,
-0.04254150390625,
0.0225067138671875,
0.052520751953125,
-0.07427978515625,
-0.1357421875,
0.052001953125,
-0.0272216796875,
0.01419830322265625,
-0.0308074951171875,
-0.0231475830078125,
-0.032440185546875,
0.00160980224609375,
0.00482940673828125,
0.007511138916015625,
0.00818634033203125,
-0.04400634765625,
0.0045928955078125,
-0.055389404296875,
0.015167236328125,
-0.0035800933837890625,
0.0230560302734375,
0.0032711029052734375,
-0.0015354156494140625,
-0.0286865234375,
-0.01433563232421875,
-0.00003826618194580078,
-0.00501251220703125,
-0.00684356689453125,
-0.022613525390625,
-0.0013666152954101562,
-0.0290069580078125,
-0.0202789306640625,
-0.011962890625,
-0.03466796875,
0.0069427490234375,
0.011932373046875,
-0.01274871826171875,
0.018035888671875,
0.0252227783203125,
0.06536865234375,
-0.02264404296875,
-0.04547119140625,
0.066650390625,
0.055908203125,
-0.00887298583984375,
-0.0215911865234375,
-0.0163116455078125,
-0.054290771484375,
-0.03521728515625,
0.04327392578125,
0.0032672882080078125,
-0.01436614990234375,
-0.0078887939453125,
-0.0012559890747070312,
-0.0145111083984375,
0.0020389556884765625,
-0.0117340087890625,
0.0104522705078125,
-0.0097503662109375,
0.002593994140625,
-0.0146331787109375,
-0.0166778564453125,
-0.04339599609375,
-0.003673553466796875,
-0.0229339599609375,
-0.00949859619140625,
-0.00994873046875,
-0.00467681884765625,
0.0092010498046875,
-0.038177490234375,
0.0755615234375,
0.0212860107421875,
0.056976318359375,
-0.070068359375,
-0.058441162109375,
-0.056854248046875,
0.08587646484375,
-0.053680419921875,
-0.0181732177734375,
0.0158538818359375,
0.03387451171875,
-0.055755615234375,
-0.034820556640625,
-0.042724609375,
-0.0015506744384765625,
-0.0748291015625,
0.01277923583984375,
0.0012025833129882812,
-0.0169219970703125,
-0.0099945068359375,
-0.0251922607421875,
-0.038421630859375,
-0.039764404296875,
0.03387451171875,
0.004058837890625,
0.024444580078125,
-0.023468017578125,
0.01959228515625,
-0.034576416015625,
-0.020782470703125,
0.01198577880859375,
-0.00481414794921875,
-0.01520538330078125,
0.033050537109375,
0.04510498046875,
0.0120086669921875,
-0.058135986328125,
-0.0005731582641601562,
0.0333251953125,
-0.050811767578125,
0.002838134765625,
-0.0212860107421875,
0.033843994140625,
-0.002063751220703125,
0.01540374755859375,
-0.025726318359375,
-0.0027980804443359375,
-0.01192474365234375,
-0.023895263671875,
-0.00787353515625,
-0.0155029296875,
-0.05670166015625,
-0.023406982421875,
-0.035491943359375,
-0.01904296875,
-0.0261077880859375,
-0.00205230712890625,
0.00786590576171875,
0.01317596435546875,
-0.0198211669921875,
0.009368896484375,
-0.006427764892578125,
-0.026641845703125,
0.0361328125,
0.018829345703125,
-0.0121307373046875,
0.0022449493408203125,
0.0178070068359375,
0.0030651092529296875,
-0.043701171875,
-0.0537109375,
-0.01204681396484375,
0.038970947265625,
-0.0232086181640625,
0.006317138671875,
-0.004802703857421875,
-0.0307159423828125,
0.0523681640625,
-0.021331787109375,
0.025146484375,
-0.0189361572265625,
0.036529541015625,
-0.004161834716796875,
0.0058746337890625,
-0.004520416259765625,
0.0003516674041748047,
-0.021392822265625,
0.003673553466796875,
-0.017913818359375,
0.00441741943359375,
0.0007343292236328125,
0.01519775390625,
0.0070953369140625,
-0.0113677978515625,
-0.0179290771484375,
-0.022735595703125,
0.00225830078125,
0.058868408203125,
-0.004642486572265625,
0.046173095703125,
-0.0052642822265625,
0.0156097412109375,
0.004985809326171875,
0.00940704345703125,
-0.0136566162109375,
-0.00800323486328125,
-0.02911376953125,
0.0277862548828125,
-0.043731689453125,
-0.0193634033203125,
0.0010690689086914062,
-0.00821685791015625,
0.0287017822265625,
-0.0345458984375,
-0.0682373046875,
-0.00031256675720214844,
-0.036865234375,
0.0009207725524902344,
0.027984619140625,
-0.041595458984375,
0.02484130859375,
0.0726318359375,
-0.0101318359375,
0.01238250732421875,
-0.025726318359375,
0.0404052734375,
-0.02532958984375,
-0.0019073486328125,
-0.0224761962890625,
0.00804901123046875,
-0.020355224609375,
0.0860595703125,
-0.07244873046875,
0.073486328125,
0.0098114013671875,
0.022491455078125,
0.0191802978515625,
0.0302581787109375,
0.0194091796875,
-0.0225982666015625,
-0.00203704833984375,
0.020599365234375,
-0.01482391357421875,
-0.0192108154296875,
-0.00315093994140625,
0.0380859375,
0.037139892578125,
0.004940032958984375,
-0.0186309814453125,
0.0012340545654296875,
-0.0237274169921875,
-0.015625,
-0.007045745849609375,
-0.008575439453125,
-0.009185791015625,
-0.01268768310546875,
0.0055389404296875,
0.01485443115234375,
0.01511383056640625,
0.00499725341796875,
-0.0276947021484375,
-0.005466461181640625,
-0.006999969482421875,
-0.03790283203125,
-0.0165863037109375,
-0.00957489013671875,
-0.00347137451171875,
-0.00473785400390625,
-0.003833770751953125,
-0.01824951171875,
-0.0299530029296875,
-0.041259765625,
0.006504058837890625,
-0.0179901123046875,
0.0281982421875,
-0.0213623046875,
0.0058746337890625,
-0.03167724609375,
0.0313720703125,
-0.001636505126953125,
-0.00823211669921875,
0.05975341796875,
0.0136566162109375,
-0.003780364990234375,
-0.0196380615234375,
-0.023590087890625,
0.004718780517578125,
0.05499267578125,
-0.028900146484375,
0.0218353271484375,
-0.038360595703125,
-0.006763458251953125,
0.035003662109375,
0.01271820068359375,
0.02313232421875,
0.04248046875,
0.01090240478515625,
-0.06475830078125,
0.035919189453125,
-0.003993988037109375,
0.0143280029296875,
0.0439453125,
0.045684814453125,
0.0205841064453125,
0.003631591796875,
-0.0273284912109375,
-0.0285491943359375,
0.044769287109375,
-0.0309906005859375,
-0.040252685546875,
-0.02923583984375,
-0.038421630859375,
-0.02301025390625,
0.025665283203125,
-0.01531219482421875,
-0.0043182373046875,
-0.001949310302734375,
0.01129150390625,
-0.01216888427734375,
0.037200927734375,
0.0023632049560546875,
-0.037506103515625,
0.0390625,
-0.03387451171875,
0.0016660690307617188,
-0.03167724609375,
-0.0301361083984375,
0.056793212890625,
-0.0230255126953125,
0.0263519287109375,
0.049896240234375,
0.01079559326171875,
0.0294189453125,
0.060394287109375,
-0.0176544189453125,
0.03717041015625,
0.0411376953125,
0.01142120361328125,
0.0204925537109375,
-0.002960205078125,
0.042388916015625,
0.031158447265625,
0.0625,
-0.0165863037109375,
-0.023773193359375,
0.0169525146484375,
-0.03192138671875,
0.0193023681640625,
0.01727294921875,
0.0609130859375,
-0.042724609375,
0.0206451416015625,
0.03326416015625,
-0.020263671875,
-0.0281982421875,
0.009552001953125,
-0.006465911865234375,
-0.031402587890625,
-0.0479736328125,
0.005046844482421875,
-0.051605224609375,
-0.036529541015625,
0.0257110595703125,
0.01030731201171875,
-0.022979736328125,
-0.0024051666259765625,
-0.00580596923828125,
-0.02398681640625,
-0.01520538330078125,
0.0311737060546875,
-0.01433563232421875,
-0.004199981689453125,
-0.006103515625,
0.018096923828125,
-0.052276611328125,
-0.0850830078125,
-0.02191162109375,
-0.0016756057739257812,
-0.054229736328125,
-0.06744384765625,
0.033203125,
0.05303955078125,
0.0423583984375,
0.00919342041015625,
-0.042938232421875,
0.033721923828125,
0.04876708984375,
0.01483154296875,
-0.0343017578125,
-0.0251007080078125,
0.02655029296875,
-0.0208282470703125,
0.01195526123046875,
0.0171356201171875,
0.006977081298828125,
0.0024166107177734375,
0.046478271484375,
0.02386474609375,
-0.0005564689636230469,
-0.034393310546875,
0.043975830078125,
0.0120391845703125,
-0.01372528076171875,
0.01641845703125,
0.0215301513671875,
-0.0270843505859375,
-0.0127716064453125,
0.0241851806640625,
-0.027557373046875,
-0.0177001953125,
0.0202178955078125,
-0.08099365234375,
0.037261962890625,
0.015869140625,
0.01611328125,
-0.0256500244140625,
0.0169219970703125,
0.00557708740234375,
-0.00839996337890625,
-0.032135009765625,
0.05743408203125,
-0.0014867782592773438,
0.0167236328125,
-0.0655517578125,
-0.0239410400390625,
-0.005985260009765625,
0.058563232421875,
0.0301971435546875,
0.002033233642578125,
-0.0155487060546875,
0.0127105712890625,
0.06707763671875,
-0.0106964111328125,
-0.024322509765625,
0.050750732421875,
0.001026153564453125,
0.0110015869140625,
0.0751953125,
-0.01427459716796875,
0.0323486328125,
-0.0019502639770507812,
0.01421356201171875,
0.0360107421875,
-0.01421356201171875,
-0.0379638671875,
0.01171112060546875,
-0.00846099853515625,
-0.0032138824462890625,
-0.0033893585205078125,
-0.01898193359375,
-0.0089263916015625,
-0.0095672607421875,
0.0124359130859375,
-0.00481414794921875,
-0.001953125,
-0.0166168212890625,
-0.00997161865234375,
0.02215576171875,
0.005260467529296875,
0.024688720703125,
0.041290283203125,
0.011627197265625,
0.0673828125,
0.0302734375,
0.022857666015625,
0.0308837890625,
0.0172271728515625,
0.03887939453125,
-0.0117645263671875,
-0.00109100341796875,
-0.041534423828125,
0.054168701171875,
0.003406524658203125,
0.030548095703125,
-0.0604248046875,
-0.0250396728515625,
0.0121307373046875,
0.004894256591796875,
-0.0138092041015625,
-0.024169921875,
-0.018402099609375,
-0.01174163818359375,
0.044342041015625,
-0.0307159423828125,
0.00395965576171875,
0.041595458984375,
0.0391845703125,
0.016326904296875,
0.02679443359375,
-0.07952880859375,
-0.032684326171875,
-0.040863037109375,
0.005252838134765625,
0.001922607421875,
0.0654296875,
0.020965576171875,
0.0670166015625,
-0.055908203125,
-0.048583984375,
0.0330810546875,
0.0224761962890625,
-0.00745391845703125,
-0.03582763671875,
0.0208282470703125,
-0.053070068359375,
-0.035308837890625,
0.01053619384765625,
0.058258056640625,
0.02789306640625,
0.058624267578125,
0.03466796875,
-0.0183258056640625,
0.01442718505859375,
0.060150146484375,
-0.004306793212890625,
-0.0416259765625,
-0.027862548828125,
-0.01580810546875,
0.01348876953125,
-0.0099639892578125,
-0.006549835205078125,
0.019927978515625,
0.00447845458984375,
-0.006443023681640625,
0.019744873046875,
0.01377105712890625,
0.005443572998046875,
-0.002155303955078125,
-0.0078277587890625,
-0.022613525390625,
0.0085296630859375,
-0.040069580078125,
0.0175018310546875,
-0.03472900390625,
-0.065185546875,
0.01477813720703125,
0.040496826171875,
-0.0218505859375,
0.022125244140625,
-0.0034694671630859375,
-0.038330078125,
0.007068634033203125,
0.0535888671875,
-0.00418853759765625,
0.011932373046875,
0.01041412353515625,
-0.0260467529296875,
-0.06671142578125,
-0.0187530517578125,
0.0179595947265625,
-0.012603759765625,
0.020416259765625,
-0.0377197265625,
0.061370849609375,
0.005413055419921875,
0.01369476318359375,
0.0078277587890625,
-0.0089569091796875,
0.0000756978988647461,
0.03411865234375,
-0.0225067138671875,
0.0026702880859375,
-0.01122283935546875,
0.058013916015625,
0.037689208984375,
0.042266845703125,
-0.0139923095703125,
-0.0169677734375,
0.008392333984375,
0.0163421630859375,
0.002773284912109375,
0.0667724609375,
-0.021331787109375,
-0.030975341796875,
-0.07965087890625,
-0.036834716796875,
0.046600341796875,
0.050048828125,
0.014495849609375,
-0.03546142578125,
0.1094970703125,
-0.00287628173828125,
0.048583984375,
0.0452880859375,
0.0975341796875,
0.043670654296875,
0.005069732666015625,
0.022979736328125,
0.0014162063598632812,
-0.029541015625,
0.044952392578125,
-0.0034503936767578125,
0.0045318603515625,
0.01302337646484375,
0.01194000244140625,
0.06463623046875,
0.0654296875,
0.064697265625,
0.007595062255859375,
0.0177459716796875,
0.0640869140625,
-0.01123046875,
-0.0208282470703125,
0.0023097991943359375,
-0.017822265625,
-0.053436279296875,
0.01342010498046875,
0.0090179443359375,
-0.016754150390625,
-0.0024700164794921875,
-0.01033782958984375,
0.0003333091735839844,
-0.01517486572265625,
-0.0273590087890625,
0.021881103515625,
-0.00981903076171875,
-0.00948333740234375,
-0.010467529296875,
-0.03204345703125,
0.009613037109375,
0.0002875328063964844,
-0.0027790069580078125,
-0.046142578125,
0.002315521240234375,
-0.038909912109375,
0.0126190185546875,
-0.0129241943359375,
0.031494140625,
0.0245208740234375,
-0.0285797119140625,
-0.0283355712890625,
0.040985107421875,
0.038299560546875,
0.07818603515625,
0.0265655517578125,
-0.0034427642822265625,
0.048309326171875,
-0.0015668869018554688,
-0.047515869140625,
-0.100341796875,
-0.0011425018310546875,
-0.033447265625,
0.0158843994140625,
-0.0196075439453125,
-0.0005125999450683594,
0.016510009765625,
-0.0310821533203125,
-0.03857421875,
0.060638427734375,
-0.01364898681640625,
-0.026123046875,
-0.023834228515625,
-0.03973388671875,
-0.0032196044921875,
0.030487060546875,
0.00659942626953125,
-0.02923583984375,
-0.04766845703125,
0.0235748291015625,
0.016845703125,
-0.001995086669921875,
0.022491455078125,
0.03704833984375,
-0.0718994140625,
0.00679779052734375,
-0.045166015625,
-0.0230865478515625,
0.008941650390625,
-0.020751953125,
0.0161895751953125,
0.01349639892578125,
-0.0667724609375,
-0.051116943359375,
-0.00643157958984375,
0.0233001708984375,
0.0178680419921875,
-0.029815673828125,
-0.0251922607421875,
-0.0243072509765625,
0.048004150390625,
0.01200103759765625,
0.005199432373046875,
-0.01568603515625,
0.03271484375,
0.0003094673156738281,
-0.004901885986328125,
-0.0416259765625,
-0.0042572021484375,
-0.05316162109375,
-0.06134033203125,
-0.0284881591796875,
-0.0167999267578125,
-0.040252685546875,
-0.0224761962890625,
-0.043792724609375,
0.0023593902587890625,
0.01184844970703125,
0.0136871337890625,
0.007091522216796875,
0.0188446044921875,
0.051300048828125,
-0.040802001953125,
0.00008147954940795898,
-0.01003265380859375,
0.00818634033203125,
0.02294921875,
-0.03778076171875,
-0.019500732421875,
-0.006412506103515625,
-0.0102081298828125,
0.004299163818359375,
-0.0006670951843261719,
0.04388427734375,
-0.00930023193359375,
0.0027866363525390625,
-0.0031890869140625,
0.0199127197265625,
0.00458526611328125,
0.0126495361328125,
-0.01491546630859375,
0.02069091796875,
0.004116058349609375,
-0.0010538101196289062,
-0.0193328857421875,
0.07269287109375,
0.0081024169921875,
0.04766845703125,
-0.045257568359375,
-0.005382537841796875,
-0.012054443359375,
-0.043060302734375,
0.006458282470703125,
0.046783447265625,
0.026214599609375,
-0.01568603515625,
0.030120849609375,
0.047821044921875,
0.0300140380859375,
0.005992889404296875
]
|
3793d3dae17ef2625db6ee0d81575d34676a18ea | Wordpress Stackexchange
Q: How do I set a custom WordPress update repository? I'm co-authoring a white paper on utilising WordPress as a foundation for a web-app, I would like to change the repository that the core WordPress updates from, the latest additions of automatic updates in 3.7 are very nice, but how would I go about pointing some installations at a custom server repository of mine? I understand the principals behind custom plugin and theme repositories, but updating the core is a necessity.
I think that it queries api.wordpress.org, but what about the server-side code? Is this available anywhere?
If this isn't possible, how would I go about having my WordPress core fetch updates through another manner? Using git/SVN on these other installs won't be an option unfortunately and neither will deploying to them directly, it needs to be via the internal WordPress protocols as this whole paper is about showing that WordPress is a very solid foundation to build upon.
I guess you could consider this a custom fork of WordPress aimed at office usage.
Thanks in advance,
Hamual
| Q: How do I set a custom WordPress update repository? I'm co-authoring a white paper on utilising WordPress as a foundation for a web-app, I would like to change the repository that the core WordPress updates from, the latest additions of automatic updates in 3.7 are very nice, but how would I go about pointing some installations at a custom server repository of mine? I understand the principals behind custom plugin and theme repositories, but updating the core is a necessity.
I think that it queries api.wordpress.org, but what about the server-side code? Is this available anywhere?
If this isn't possible, how would I go about having my WordPress core fetch updates through another manner? Using git/SVN on these other installs won't be an option unfortunately and neither will deploying to them directly, it needs to be via the internal WordPress protocols as this whole paper is about showing that WordPress is a very solid foundation to build upon.
I guess you could consider this a custom fork of WordPress aimed at office usage.
Thanks in advance,
Hamual
| wordpress | {
"language": "en",
"length": 178,
"provenance": "stackexchange_00019.jsonl.gz:438586",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120210"
} | [
0.0399169921875,
-0.0005712509155273438,
-0.0085601806640625,
-0.020050048828125,
0.0067138671875,
-0.0202789306640625,
0.052581787109375,
-0.0234527587890625,
0.00799560546875,
0.0215301513671875,
-0.0391845703125,
-0.0101776123046875,
0.0104522705078125,
-0.00868988037109375,
-0.0173187255859375,
-0.039825439453125,
0.08935546875,
-0.040496826171875,
0.054412841796875,
0.01483917236328125,
0.0029544830322265625,
0.0648193359375,
0.06317138671875,
0.04296875,
0.03680419921875,
0.00820159912109375,
0.05181884765625,
-0.0038852691650390625,
0.04351806640625,
0.014404296875,
0.0404052734375,
-0.06793212890625,
0.0421142578125,
-0.007415771484375,
-0.0155487060546875,
-0.032684326171875,
0.00949859619140625,
-0.0240936279296875,
-0.040496826171875,
0.0382080078125,
0.0226287841796875,
-0.004993438720703125,
0.053924560546875,
-0.0021686553955078125,
0.023345947265625,
-0.042266845703125,
0.015716552734375,
-0.07403564453125,
0.032745361328125,
-0.02276611328125,
-0.0291595458984375,
0.041595458984375,
-0.00464630126953125,
-0.048583984375,
-0.004558563232421875,
-0.0216827392578125,
0.03387451171875,
-0.00597381591796875,
0.032470703125,
-0.04559326171875,
-0.045135498046875,
-0.004657745361328125,
0.039764404296875,
0.0084686279296875,
0.004833221435546875,
-0.025665283203125,
0.048431396484375,
0.01971435546875,
-0.0589599609375,
-0.0193939208984375,
0.0333251953125,
0.00388336181640625,
-0.0013580322265625,
-0.0194549560546875,
0.0146942138671875,
-0.0020122528076171875,
0.0139617919921875,
-0.0197906494140625,
0.004344940185546875,
0.0213775634765625,
0.040740966796875,
0.00820159912109375,
0.03753662109375,
-0.03204345703125,
0.032562255859375,
-0.0002510547637939453,
0.0002694129943847656,
-0.0177764892578125,
-0.01312255859375,
0.007778167724609375,
-0.004070281982421875,
-0.037261962890625,
-0.043304443359375,
0.054534912109375,
0.025115966796875,
0.002727508544921875,
-0.01499176025390625,
0.01213836669921875,
-0.01885986328125,
0.0252685546875,
0.002635955810546875,
-0.0322265625,
0.06695556640625,
-0.03570556640625,
-0.0230560302734375,
0.0178375244140625,
0.006427764892578125,
0.006572723388671875,
0.0132904052734375,
0.0204620361328125,
-0.01346588134765625,
-0.0265045166015625,
-0.009918212890625,
-0.0172119140625,
0.0003561973571777344,
0.00373077392578125,
-0.03900146484375,
0.01555633544921875,
-0.0150909423828125,
0.003704071044921875,
0.01641845703125,
0.048095703125,
-0.01142120361328125,
-0.0340576171875,
-0.0138702392578125,
-0.0193328857421875,
0.0004818439483642578,
-0.058135986328125,
-0.06640625,
-0.005596160888671875,
-0.05908203125,
0.029205322265625,
0.11383056640625,
0.08319091796875,
0.03619384765625,
-0.0182342529296875,
0.023681640625,
0.01137542724609375,
-0.010711669921875,
0.0048370361328125,
0.020263671875,
0.017730712890625,
0.0138397216796875,
-0.026824951171875,
0.006412506103515625,
0.016937255859375,
0.00843048095703125,
0.027984619140625,
0.010345458984375,
-0.01477813720703125,
-0.004116058349609375,
0.004604339599609375,
0.0214385986328125,
0.00021588802337646484,
0.04388427734375,
-0.054931640625,
0.06890869140625,
-0.06597900390625,
0.03436279296875,
-0.0496826171875,
-0.060699462890625,
-0.023834228515625,
0.0196075439453125,
0.01227569580078125,
-0.005832672119140625,
0.056671142578125,
0.042755126953125,
0.0203704833984375,
0.0294952392578125,
-0.00023293495178222656,
0.000957489013671875,
-0.007274627685546875,
0.036041259765625,
0.0233001708984375,
0.009490966796875,
0.01898193359375,
0.01702880859375,
-0.00428009033203125,
0.027801513671875,
0.048187255859375,
-0.003849029541015625,
-0.02764892578125,
0.055419921875,
-0.026580810546875,
-0.0276031494140625,
-0.007724761962890625,
-0.0012884140014648438,
0.032318115234375,
0.033966064453125,
0.01375579833984375,
-0.0187835693359375,
-0.0196990966796875,
-0.034637451171875,
0.070068359375,
-0.00911712646484375,
-0.0235443115234375,
-0.0160675048828125,
0.02069091796875,
-0.020660400390625,
-0.0452880859375,
-0.053558349609375,
-0.0024929046630859375,
0.006412506103515625,
-0.0023632049560546875,
-0.016632080078125,
0.00807952880859375,
-0.0202789306640625,
0.047515869140625,
0.01268768310546875,
-0.0212249755859375,
0.005626678466796875,
-0.0242156982421875,
0.0274200439453125,
-0.074951171875,
-0.0634765625,
0.0010290145874023438,
-0.008270263671875,
0.007343292236328125,
-0.0141754150390625,
0.0233001708984375,
-0.0113525390625,
-0.00994110107421875,
-0.0178070068359375,
0.0202484130859375,
0.0215911865234375,
-0.0287933349609375,
-0.0002532005310058594,
-0.017425537109375,
0.01654052734375,
0.01415252685546875,
-0.04217529296875,
-0.01012420654296875,
0.0166015625,
0.01250457763671875,
-0.0084228515625,
-0.0108184814453125,
0.0068359375,
-0.04486083984375,
0.01476287841796875,
0.040313720703125,
0.0230865478515625,
0.0139617919921875,
-0.024169921875,
-0.0261383056640625,
0.034210205078125,
-0.0106048583984375,
0.01236724853515625,
-0.0178680419921875,
0.02069091796875,
0.0240936279296875,
-0.00485992431640625,
-0.038116455078125,
0.01776123046875,
-0.044036865234375,
0.0013437271118164062,
0.038665771484375,
-0.0014352798461914062,
-0.04620361328125,
0.0021724700927734375,
-0.01806640625,
0.0257110595703125,
-0.047332763671875,
-0.0711669921875,
0.0018310546875,
0.0401611328125,
0.0154876708984375,
0.061431884765625,
0.06781005859375,
-0.0096282958984375,
-0.004184722900390625,
-0.0115966796875,
0.014068603515625,
0.0064697265625,
0.01165771484375,
-0.0302734375,
-0.0004010200500488281,
-0.0009446144104003906,
0.00946807861328125,
-0.01422119140625,
-0.01386260986328125,
-0.018463134765625,
-0.007266998291015625,
0.0022563934326171875,
-0.0006265640258789062,
-0.00629425048828125,
-0.0489501953125,
0.03826904296875,
0.01155853271484375,
-0.057586669921875,
-0.031982421875,
0.0214996337890625,
-0.005367279052734375,
-0.0443115234375,
-0.004199981689453125,
0.0008645057678222656,
-0.02142333984375,
0.064208984375,
-0.03546142578125,
0.02972412109375,
-0.0227508544921875,
0.039794921875,
0.0631103515625,
-0.01081085205078125,
0.003810882568359375,
0.0145111083984375,
-0.00670623779296875,
0.004367828369140625,
0.0210723876953125,
0.0039825439453125,
0.0135345458984375,
-0.0704345703125,
0.01053619384765625,
0.01194000244140625,
0.016510009765625,
0.002166748046875,
-0.0343017578125,
-0.00922393798828125,
0.011627197265625,
-0.0660400390625,
-0.056427001953125,
0.050537109375,
-0.01708984375,
0.029571533203125,
0.0007615089416503906,
0.005115509033203125,
-0.050872802734375,
0.023162841796875,
-0.004314422607421875,
0.0077972412109375,
-0.036102294921875,
-0.058441162109375,
-0.0723876953125,
-0.09918212890625,
-0.040435791015625,
0.01806640625,
0.025146484375,
-0.0066070556640625,
0.0548095703125,
0.0018110275268554688,
-0.063232421875,
-0.0241546630859375,
0.052093505859375,
-0.004634857177734375,
-0.0133819580078125,
0.0241851806640625,
-0.025115966796875,
0.03778076171875,
-0.0081634521484375,
0.046173095703125,
0.0482177734375,
-0.043975830078125,
-0.0098724365234375,
-0.01788330078125,
-0.034698486328125,
-0.01041412353515625,
-0.0031147003173828125,
0.014434814453125,
-0.028472900390625,
-0.00469970703125,
-0.0579833984375,
-0.0123291015625,
0.00861358642578125,
-0.0173187255859375,
0.006072998046875,
0.017242431640625,
-0.0242156982421875,
-0.031768798828125,
0.03948974609375,
-0.024810791015625,
0.01030731201171875,
0.05682373046875,
-0.0255126953125,
0.0097808837890625,
-0.032196044921875,
-0.050140380859375,
-0.044647216796875,
0.01557159423828125,
-0.0255126953125,
0.041839599609375,
0.01331329345703125,
-0.00003641843795776367,
-0.032257080078125,
0.0298004150390625,
-0.06475830078125,
-0.0628662109375,
0.07537841796875,
0.0289459228515625,
0.037384033203125,
-0.036773681640625,
-0.05780029296875,
0.0142974853515625,
0.1285400390625,
-0.0118560791015625,
-0.0177459716796875,
0.007076263427734375,
0.0225677490234375,
-0.0295562744140625,
-0.0073089599609375,
-0.03717041015625,
-0.01202392578125,
-0.0694580078125,
-0.00005036592483520508,
-0.0226898193359375,
-0.02081298828125,
0.00360107421875,
-0.028778076171875,
-0.0203094482421875,
-0.051727294921875,
0.0014591217041015625,
-0.05572509765625,
0.0011854171752929688,
-0.0005402565002441406,
-0.021881103515625,
-0.0231170654296875,
0.01488494873046875,
-0.04693603515625,
-0.08892822265625,
-0.0035076141357421875,
-0.029388427734375,
0.0291290283203125,
0.0226593017578125,
-0.0303192138671875,
-0.01190948486328125,
0.025970458984375,
0.0135040283203125,
0.00982666015625,
0.00963592529296875,
0.00856781005859375,
-0.01155853271484375,
-0.0024585723876953125,
0.01666259765625,
-0.040191650390625,
-0.00814056396484375,
-0.015716552734375,
-0.0560302734375,
0.0127410888671875,
0.0059051513671875,
0.0291748046875,
0.04815673828125,
-0.034027099609375,
-0.037384033203125,
-0.025177001953125,
-0.03179931640625,
0.016021728515625,
-0.0204010009765625,
-0.01580810546875,
-0.036224365234375,
-0.06378173828125,
0.051483154296875,
0.00429534912109375,
-0.017608642578125,
0.0009317398071289062,
0.058868408203125,
0.01079559326171875,
-0.0258941650390625,
-0.033050537109375,
-0.01348876953125,
0.03143310546875,
0.04296875,
-0.0007543563842773438,
-0.006366729736328125,
-0.016326904296875,
-0.000014066696166992188,
0.020263671875,
-0.0145263671875,
0.0285797119140625,
0.0031986236572265625,
0.02581787109375,
0.0058135986328125,
-0.0195465087890625,
0.01284027099609375,
-0.0018320083618164062,
0.00684356689453125,
-0.015838623046875,
-0.0148773193359375,
-0.00922393798828125,
0.032684326171875,
-0.012237548828125,
0.03271484375,
-0.0322265625,
-0.051513671875,
0.034088134765625,
-0.0341796875,
0.0248260498046875,
-0.00811004638671875,
-0.002681732177734375,
0.027496337890625,
-0.00830841064453125,
0.0005736351013183594,
-0.029632568359375,
-0.038055419921875,
-0.0021762847900390625,
0.0133056640625,
-0.01508331298828125,
0.0007290840148925781,
-0.009918212890625,
-0.017791748046875,
0.10406494140625,
-0.0054779052734375,
-0.06884765625,
0.00356292724609375,
-0.0122833251953125,
0.033935546875,
0.0367431640625,
-0.018096923828125,
0.039154052734375,
0.009765625,
-0.0189666748046875,
-0.0013666152954101562,
-0.07342529296875,
-0.005054473876953125,
-0.0560302734375,
-0.01178741455078125,
0.01300048828125,
-0.0291748046875,
-0.0089569091796875,
0.00853729248046875,
0.036865234375,
-0.0195159912109375,
-0.01861572265625,
0.04962158203125,
0.062744140625,
-0.0242462158203125,
0.0103759765625,
0.048095703125,
0.0107574462890625,
-0.062042236328125,
0.0158843994140625,
-0.015960693359375,
0.0036907196044921875,
-0.006549835205078125,
0.047607421875,
0.00759124755859375,
-0.015655517578125,
0.0200347900390625,
-0.053863525390625,
-0.0016412734985351562,
0.0021190643310546875,
-0.0037708282470703125,
-0.0036907196044921875,
-0.0195159912109375,
0.004253387451171875,
0.04180908203125,
0.0006737709045410156,
-0.012603759765625,
0.01349639892578125,
-0.0435791015625,
0.0102081298828125,
0.0193634033203125,
-0.01044464111328125,
-0.006404876708984375,
-0.002620697021484375,
-0.022918701171875,
-0.0077056884765625,
-0.00031638145446777344,
-0.02618408203125,
-0.019989013671875,
-0.0117034912109375,
-0.0384521484375,
0.038055419921875,
-0.044921875,
-0.0166015625,
-0.0281219482421875,
0.042388916015625,
-0.07440185546875,
0.0244293212890625,
0.032196044921875,
0.019317626953125,
-0.0654296875,
0.01132965087890625,
-0.032867431640625,
-0.017547607421875,
-0.0104827880859375,
-0.061859130859375,
-0.06298828125,
0.0032024383544921875,
0.004512786865234375,
0.017669677734375,
-0.018890380859375,
-0.021148681640625,
-0.0361328125,
0.0238494873046875,
0.01021575927734375,
0.0009784698486328125,
0.0008187294006347656,
0.042999267578125,
-0.0176849365234375,
0.071044921875,
0.01152801513671875,
0.00872802734375,
-0.0201263427734375,
-0.0232391357421875,
0.0149078369140625,
-0.0283355712890625,
-0.0280609130859375,
-0.0014190673828125,
-0.007720947265625,
-0.0038433074951171875,
-0.00510406494140625,
-0.0119476318359375,
0.0072021484375,
-0.031982421875,
0.005008697509765625,
-0.023162841796875,
0.037200927734375,
-0.0321044921875,
-0.01259613037109375,
0.0129547119140625,
-0.01422119140625,
0.00603485107421875,
-0.00841522216796875,
-0.0212860107421875,
0.01538848876953125,
-0.0034656524658203125,
-0.0018815994262695312,
0.01085662841796875,
-0.0265045166015625,
0.040008544921875,
0.098876953125,
0.002777099609375,
0.0682373046875,
0.0281829833984375,
0.01013946533203125,
0.043121337890625,
-0.01258087158203125,
-0.0117340087890625,
-0.0042877197265625,
0.01088714599609375,
-0.006786346435546875,
-0.0029964447021484375,
0.00936126708984375,
-0.006511688232421875,
0.024566650390625,
0.025604248046875,
0.0631103515625,
-0.047393798828125,
0.0225677490234375,
0.018585205078125,
-0.015380859375,
0.0302276611328125,
0.01255035400390625,
-0.0499267578125,
-0.04351806640625,
0.026214599609375,
-0.07989501953125,
-0.0305938720703125,
-0.01158905029296875,
-0.005161285400390625,
-0.017364501953125,
-0.016265869140625,
0.0230255126953125,
0.0207366943359375,
0.04327392578125,
-0.0028400421142578125,
-0.031524658203125,
0.0177154541015625,
0.016754150390625,
-0.0004949569702148438,
0.000698089599609375,
-0.033416748046875,
-0.029327392578125,
0.0048675537109375,
-0.0372314453125,
-0.0198516845703125,
0.031524658203125,
-0.009765625,
-0.006061553955078125,
0.032958984375,
-0.01222991943359375,
0.0166778564453125,
0.0029392242431640625,
-0.017364501953125,
-0.020172119140625,
-0.036834716796875,
0.0220489501953125,
0.0322265625,
-0.053009033203125,
0.032867431640625,
-0.0179595947265625,
-0.0176544189453125,
-0.0004220008850097656,
0.025909423828125,
0.09930419921875,
-0.038665771484375,
-0.01336669921875,
0.033355712890625,
0.009429931640625,
-0.0219268798828125,
0.0096435546875,
0.003070831298828125,
-0.051483154296875,
-0.0241241455078125,
0.0079498291015625,
-0.0221405029296875,
-0.00428009033203125,
0.01291656494140625,
-0.0037994384765625,
0.11212158203125,
-0.038970947265625,
-0.039703369140625,
0.01568603515625,
0.07232666015625,
-0.024444580078125,
0.06280517578125,
-0.0149993896484375,
0.026031494140625,
-0.01074981689453125,
0.007152557373046875,
-0.0501708984375,
-0.006061553955078125,
-0.0220947265625,
0.0286712646484375,
0.027191162109375,
0.027008056640625,
-0.0780029296875,
-0.01491546630859375,
0.007770538330078125,
0.0272674560546875,
0.0188751220703125,
0.069091796875,
-0.0247344970703125,
-0.003143310546875,
0.00033473968505859375,
-0.0343017578125,
0.02471923828125,
-0.01337432861328125,
-0.036102294921875,
0.0072784423828125,
0.030181884765625,
0.0243377685546875,
-0.0008382797241210938,
0.0506591796875,
-0.034515380859375,
0.00933837890625,
0.0426025390625,
0.0015668869018554688,
0.01708984375,
-0.0012483596801757812,
0.011932373046875,
0.024566650390625,
0.0215911865234375,
-0.0109710693359375,
0.02862548828125,
-0.00980377197265625,
0.00896453857421875,
0.025238037109375,
0.025115966796875,
-0.004878997802734375,
0.0016241073608398438,
0.01214599609375,
0.02801513671875,
-0.0222015380859375,
0.06317138671875,
0.01509857177734375,
0.0325927734375,
-0.01561737060546875,
0.0194549560546875,
0.01824951171875,
0.058349609375,
-0.04779052734375,
0.0014057159423828125,
0.01422882080078125,
-0.013275146484375,
0.00574493408203125,
-0.049713134765625,
-0.002353668212890625,
-0.003948211669921875,
-0.028839111328125,
-0.050567626953125,
-0.0047149658203125,
0.0177154541015625,
0.025238037109375,
-0.011383056640625,
-0.0185699462890625,
-0.005306243896484375,
-0.0240936279296875,
-0.015960693359375,
0.0126953125,
0.005512237548828125,
0.0193328857421875,
-0.00634765625,
0.0574951171875,
0.00833892822265625,
0.0032558441162109375,
0.00916290283203125,
0.05645751953125,
0.01393890380859375,
-0.01436614990234375,
-0.01136016845703125,
-0.06982421875,
0.01806640625,
0.036224365234375,
0.0172576904296875,
0.0111236572265625,
0.02734375,
0.00740814208984375,
-0.035064697265625,
-0.005157470703125,
0.04547119140625,
-0.014312744140625,
0.001415252685546875,
-0.0276641845703125,
0.005664825439453125,
0.01342010498046875,
-0.0029754638671875,
-0.0178985595703125,
0.0030536651611328125,
0.051025390625,
-0.00327301025390625,
0.0286865234375,
0.004703521728515625,
-0.0225372314453125,
0.040496826171875,
-0.0130157470703125,
0.06695556640625,
0.0232696533203125,
-0.0017480850219726562,
-0.01555633544921875,
0.006259918212890625,
-0.000568389892578125,
-0.006725311279296875,
0.02374267578125,
0.002582550048828125,
0.023834228515625,
-0.0169219970703125,
-0.0135650634765625,
0.001529693603515625,
0.011199951171875,
0.00920867919921875,
-0.02301025390625,
0.004451751708984375,
-0.014892578125,
-0.019500732421875,
-0.0270843505859375,
0.0097808837890625,
0.0458984375,
0.008148193359375,
0.04473876953125,
-0.019561767578125,
0.006267547607421875,
-0.0309906005859375,
-0.0015058517456054688,
-0.0191650390625,
-0.01885986328125,
-0.019775390625,
0.0179290771484375,
0.0163726806640625,
-0.0029277801513671875,
-0.00800323486328125,
0.0267791748046875,
0.01087188720703125,
-0.032562255859375,
0.0036220550537109375,
-0.0447998046875,
0.01262664794921875,
0.01500701904296875,
-0.0194244384765625,
-0.04669189453125,
-0.050567626953125,
-0.005359649658203125,
0.005767822265625,
-0.032928466796875,
-0.04010009765625,
0.0023860931396484375,
0.039093017578125,
0.0123748779296875,
0.01184844970703125,
0.0023193359375,
-0.01190948486328125,
0.031463623046875,
0.04400634765625,
-0.019775390625,
-0.0260009765625,
-0.0135650634765625,
-0.0169830322265625,
-0.01812744140625,
0.0025081634521484375,
0.0110015869140625,
-0.022308349609375,
-0.020416259765625,
0.001983642578125,
0.02081298828125,
0.046234130859375,
0.011505126953125,
0.029205322265625,
-0.032440185546875,
0.0191192626953125,
0.0172576904296875,
-0.0204620361328125,
-0.0160369873046875,
-0.0338134765625,
-0.0017385482788085938,
0.00922393798828125,
-0.011688232421875,
-0.0030345916748046875,
-0.0177001953125,
0.0021419525146484375,
0.05364990234375,
0.03338623046875,
-0.11077880859375,
0.061920166015625,
-0.017608642578125,
0.052886962890625,
0.0035266876220703125,
-0.01296234130859375,
-0.0164794921875,
0.0231475830078125,
0.022735595703125,
-0.039703369140625,
-0.035186767578125,
0.0506591796875,
-0.0140533447265625,
0.018402099609375,
0.036041259765625,
-0.01739501953125,
-0.0601806640625,
0.0130157470703125,
0.007354736328125,
0.0491943359375,
-0.0021457672119140625,
-0.0047149658203125,
0.02667236328125,
-0.035247802734375,
-0.0389404296875,
-0.07098388671875,
0.034576416015625,
-0.1160888671875,
-0.027984619140625,
-0.076416015625,
0.0338134765625,
0.0205841064453125,
-0.04364013671875,
-0.08343505859375,
0.032073974609375,
-0.037628173828125,
-0.031158447265625,
-0.027008056640625,
-0.0007786750793457031,
-0.0258636474609375,
0.04058837890625,
0.0008244514465332031,
-0.030853271484375,
-0.01055145263671875,
0.03326416015625,
0.0099334716796875,
0.07196044921875,
-0.024810791015625,
0.065673828125,
-0.01372528076171875,
0.04010009765625,
0.011566162109375,
-0.0193939208984375,
-0.01102447509765625,
0.01267242431640625,
0.0010213851928710938,
0.036376953125,
-0.0182952880859375,
-0.00414276123046875,
-0.0079498291015625,
-0.031494140625,
-0.0234222412109375,
-0.036346435546875,
-0.031036376953125,
-0.0024261474609375,
0.07244873046875,
0.069091796875,
0.0209197998046875,
-0.042938232421875,
0.0010528564453125,
0.0043487548828125,
-0.01505279541015625,
-0.001270294189453125,
0.0115509033203125,
-0.044281005859375,
0.0024623870849609375,
0.01084136962890625,
-0.0203857421875,
0.0007753372192382812,
-0.00397491455078125,
-0.031005859375,
-0.003154754638671875,
-0.016571044921875,
-0.02423095703125,
-0.0273284912109375,
0.004650115966796875,
0.0445556640625,
-0.0191497802734375,
0.0335693359375,
0.0006589889526367188,
-0.005680084228515625,
0.03643798828125,
0.04571533203125,
0.004749298095703125,
0.04364013671875,
-0.06463623046875,
0.0103912353515625,
-0.00390625,
-0.01030731201171875,
-0.04339599609375,
-0.00637054443359375,
0.0009479522705078125,
0.01763916015625,
0.0008344650268554688,
0.0175323486328125,
-0.0254364013671875,
0.028045654296875,
-0.0106658935546875,
0.058319091796875,
-0.0013179779052734375,
-0.07904052734375,
-0.034576416015625,
0.029296875,
-0.044219970703125,
-0.002498626708984375,
-0.024383544921875,
-0.0302581787109375,
0.0220794677734375,
0.01178741455078125,
0.03839111328125,
-0.0285186767578125,
0.02056884765625,
0.01560211181640625,
0.01611328125,
0.01186370849609375
]
|
e1443b194d4d6b7896c9fcb6a008964ccb3bf809 | Wordpress Stackexchange
Q: Can my "add_action" function know the name of the hook calling it? Lots of hooks:
add_action('thesis_hook_after_comment', 'pj_time');
add_action('thesis_hook_after_comments', 'pj_time');
add_action('thesis_hook_after_comment_box', 'pj_time');
add_action('thesis_hook_after_comment_meta', 'pj_time');
add_action('thesis_hook_after_content', 'pj_time');
add_action('thesis_hook_after_content_area', 'pj_time');
add_action('thesis_hook_after_content_box', 'pj_time');
add_action('thesis_hook_after_footer', 'pj_time');
add_action('thesis_hook_after_header', 'pj_time');
add_action('thesis_hook_after_headline', 'pj_time');
// etc.
How can function pj_time() know which hook called it? Is there a global variable or something that tells me which hook we're on? So pj_time() could output something like: "The hook (name of hook here) rocks."
I don't know the order the hooks are called either, they're just in alphabetical order here. Otherwise I could use a counter to figure how many hooks we've done so far and determine the name of the hook that way.
So I want to know if it's possible to get the name of the hook. Thanks.
A: function pj_time () {
echo current_filter();
}
Easier than I thought ;-)
http://codex.wordpress.org/Function_Reference/current_filter
| Q: Can my "add_action" function know the name of the hook calling it? Lots of hooks:
add_action('thesis_hook_after_comment', 'pj_time');
add_action('thesis_hook_after_comments', 'pj_time');
add_action('thesis_hook_after_comment_box', 'pj_time');
add_action('thesis_hook_after_comment_meta', 'pj_time');
add_action('thesis_hook_after_content', 'pj_time');
add_action('thesis_hook_after_content_area', 'pj_time');
add_action('thesis_hook_after_content_box', 'pj_time');
add_action('thesis_hook_after_footer', 'pj_time');
add_action('thesis_hook_after_header', 'pj_time');
add_action('thesis_hook_after_headline', 'pj_time');
// etc.
How can function pj_time() know which hook called it? Is there a global variable or something that tells me which hook we're on? So pj_time() could output something like: "The hook (name of hook here) rocks."
I don't know the order the hooks are called either, they're just in alphabetical order here. Otherwise I could use a counter to figure how many hooks we've done so far and determine the name of the hook that way.
So I want to know if it's possible to get the name of the hook. Thanks.
A: function pj_time () {
echo current_filter();
}
Easier than I thought ;-)
http://codex.wordpress.org/Function_Reference/current_filter
| wordpress | {
"language": "en",
"length": 144,
"provenance": "stackexchange_00019.jsonl.gz:438592",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120230"
} | [
0.0149383544921875,
0.02880859375,
-0.055999755859375,
-0.0269775390625,
0.04510498046875,
-0.02899169921875,
0.0309295654296875,
0.0033092498779296875,
-0.0335693359375,
0.0191650390625,
-0.00832366943359375,
0.019927978515625,
-0.0105438232421875,
-0.02825927734375,
0.0182037353515625,
-0.025543212890625,
0.0665283203125,
-0.046539306640625,
0.03314208984375,
-0.00490570068359375,
0.01904296875,
0.02532958984375,
0.0360107421875,
0.10479736328125,
0.055877685546875,
-0.054595947265625,
0.0994873046875,
-0.03759765625,
0.09210205078125,
0.01287078857421875,
0.051544189453125,
-0.0902099609375,
-0.0058441162109375,
0.049224853515625,
0.00020837783813476562,
0.085693359375,
0.03948974609375,
0.0174407958984375,
0.05157470703125,
0.0255889892578125,
0.056488037109375,
-0.040618896484375,
-0.042999267578125,
0.0306854248046875,
-0.022247314453125,
-0.05987548828125,
0.0772705078125,
-0.0121612548828125,
0.045074462890625,
-0.01102447509765625,
0.0266876220703125,
0.0247955322265625,
0.02777099609375,
0.0209503173828125,
-0.021697998046875,
0.00849151611328125,
-0.0272369384765625,
0.059234619140625,
0.0201568603515625,
0.021514892578125,
-0.015838623046875,
0.022705078125,
-0.01334381103515625,
-0.0399169921875,
-0.0035533905029296875,
0.0044097900390625,
-0.026611328125,
-0.003387451171875,
0.0038509368896484375,
0.001682281494140625,
-0.00339508056640625,
-0.0207672119140625,
-0.006175994873046875,
0.01019287109375,
-0.007648468017578125,
-0.0687255859375,
0.0157012939453125,
-0.04534912109375,
0.0182952880859375,
0.02410888671875,
-0.011016845703125,
-0.0214996337890625,
-0.05657958984375,
0.0177154541015625,
-0.01148223876953125,
0.0277557373046875,
-0.0220489501953125,
-0.0097808837890625,
-0.03497314453125,
-0.035797119140625,
-0.042510986328125,
-0.039276123046875,
-0.0033168792724609375,
-0.0244293212890625,
-0.0311126708984375,
-0.018341064453125,
-0.007572174072265625,
0.026519775390625,
-0.04107666015625,
-0.02728271484375,
-0.003498077392578125,
-0.01097869873046875,
-0.043731689453125,
-0.01355743408203125,
-0.0193328857421875,
0.036224365234375,
0.0477294921875,
0.0230560302734375,
-0.0039043426513671875,
0.005237579345703125,
-0.01080322265625,
-0.0232696533203125,
-0.01548004150390625,
-0.0106658935546875,
-0.0016117095947265625,
0.015472412109375,
-0.03668212890625,
0.01538848876953125,
-0.0157928466796875,
0.00981903076171875,
0.019439697265625,
0.005352020263671875,
0.00958251953125,
-0.028228759765625,
0.04541015625,
0.015289306640625,
-0.054718017578125,
0.015838623046875,
0.0125885009765625,
0.0187530517578125,
-0.020050048828125,
0.0086212158203125,
0.025543212890625,
-0.0025463104248046875,
-0.01441192626953125,
-0.01141357421875,
0.027191162109375,
0.00799560546875,
-0.027191162109375,
0.039581298828125,
-0.04107666015625,
-0.048187255859375,
-0.014129638671875,
-0.048583984375,
-0.0038623809814453125,
-0.033721923828125,
-0.00955963134765625,
0.03863525390625,
0.032745361328125,
-0.005260467529296875,
0.027862548828125,
-0.04205322265625,
0.019775390625,
-0.006755828857421875,
-0.005184173583984375,
-0.0012216567993164062,
-0.0253753662109375,
-0.01021575927734375,
0.01209259033203125,
0.01454925537109375,
-0.0089263916015625,
-0.045196533203125,
-0.053253173828125,
-0.0252838134765625,
-0.05206298828125,
0.06304931640625,
0.01375579833984375,
0.0056610107421875,
0.01497650146484375,
0.015289306640625,
-0.00788116455078125,
0.029388427734375,
0.037567138671875,
0.0017480850219726562,
-0.0005812644958496094,
0.0036163330078125,
-0.025970458984375,
0.0127105712890625,
0.01508331298828125,
-0.005001068115234375,
-0.032928466796875,
-0.055999755859375,
0.0131072998046875,
-0.0143585205078125,
-0.056060791015625,
0.0198974609375,
0.03216552734375,
0.053131103515625,
0.0007853507995605469,
0.01201629638671875,
0.07061767578125,
0.01531982421875,
-0.005908966064453125,
0.0237579345703125,
-0.0019350051879882812,
0.0021953582763671875,
-0.0240631103515625,
0.0232391357421875,
-0.0182647705078125,
-0.029052734375,
0.028900146484375,
0.026031494140625,
-0.00481414794921875,
-0.0271453857421875,
-0.08837890625,
0.029937744140625,
-0.03668212890625,
0.053863525390625,
-0.0160369873046875,
-0.013092041015625,
0.0013294219970703125,
-0.032684326171875,
0.004276275634765625,
-0.03607177734375,
-0.01456451416015625,
0.051727294921875,
-0.03338623046875,
0.026153564453125,
0.005847930908203125,
0.0311126708984375,
-0.002964019775390625,
0.00457000732421875,
0.0085296630859375,
-0.0226593017578125,
0.0305633544921875,
0.03472900390625,
-0.051544189453125,
-0.0011920928955078125,
-0.0135345458984375,
0.036865234375,
-0.060211181640625,
0.0546875,
0.03326416015625,
0.0689697265625,
0.0113525390625,
0.005542755126953125,
0.0206756591796875,
-0.0670166015625,
0.0083770751953125,
0.03485107421875,
0.02545166015625,
0.038726806640625,
0.0130767822265625,
0.0316162109375,
0.039520263671875,
-0.035797119140625,
0.00739288330078125,
0.00809478759765625,
-0.0145263671875,
0.046142578125,
0.011199951171875,
0.04742431640625,
0.00235748291015625,
0.0058135986328125,
-0.00868988037109375,
0.03857421875,
-0.014892578125,
-0.0222930908203125,
0.00769805908203125,
-0.007293701171875,
0.0243988037109375,
-0.044769287109375,
-0.0577392578125,
-0.01446533203125,
0.0207366943359375,
-0.036224365234375,
0.01268768310546875,
0.01107025146484375,
0.0074462890625,
-0.03912353515625,
0.030975341796875,
0.00826263427734375,
-0.022308349609375,
0.0181121826171875,
0.04998779296875,
-0.059112548828125,
-0.01068115234375,
0.000988006591796875,
-0.06329345703125,
-0.0205841064453125,
-0.010772705078125,
0.0286865234375,
-0.01204681396484375,
-0.022247314453125,
-0.00768280029296875,
-0.028717041015625,
-0.01294708251953125,
-0.00463104248046875,
0.007022857666015625,
0.033447265625,
0.02099609375,
0.038818359375,
0.006053924560546875,
0.016693115234375,
0.03814697265625,
0.00711822509765625,
-0.01555633544921875,
0.023956298828125,
0.0111541748046875,
-0.0266571044921875,
-0.010162353515625,
0.0360107421875,
-0.0140533447265625,
-0.01555633544921875,
0.0004820823669433594,
-0.022308349609375,
-0.01340484619140625,
-0.01450347900390625,
-0.018463134765625,
0.026031494140625,
-0.08428955078125,
0.032989501953125,
0.022064208984375,
0.09625244140625,
-0.0244140625,
-0.04437255859375,
-0.00180816650390625,
0.019134521484375,
-0.02703857421875,
-0.037261962890625,
0.007289886474609375,
-0.050567626953125,
0.03741455078125,
-0.031494140625,
-0.0212860107421875,
-0.042083740234375,
-0.0006041526794433594,
0.01519775390625,
-0.005603790283203125,
-0.033935546875,
-0.0114288330078125,
-0.045745849609375,
-0.0404052734375,
0.00228118896484375,
0.021514892578125,
0.016021728515625,
0.010345458984375,
0.033050537109375,
0.003265380859375,
-0.0146942138671875,
0.02655029296875,
-0.0369873046875,
-0.0308685302734375,
-0.0183563232421875,
-0.03179931640625,
-0.0240936279296875,
0.0257568359375,
-0.015716552734375,
-0.00556182861328125,
0.021759033203125,
0.016693115234375,
0.003887176513671875,
-0.0311126708984375,
-0.05145263671875,
0.0201263427734375,
0.055419921875,
0.00720977783203125,
-0.0197296142578125,
0.08197021484375,
-0.040802001953125,
0.0194091796875,
-0.002285003662109375,
-0.004642486572265625,
0.035888671875,
-0.0013713836669921875,
0.004543304443359375,
0.0017681121826171875,
0.020263671875,
-0.01155853271484375,
0.0036945343017578125,
0.009552001953125,
0.0138702392578125,
-0.028839111328125,
-0.026214599609375,
-0.028564453125,
0.00943756103515625,
0.0176239013671875,
0.000370025634765625,
0.018463134765625,
0.00855255126953125,
0.05804443359375,
0.0080718994140625,
0.050689697265625,
-0.037689208984375,
-0.007598876953125,
0.015167236328125,
-0.04168701171875,
-0.0170135498046875,
-0.014129638671875,
0.00007253885269165039,
0.0027523040771484375,
0.036865234375,
-0.031036376953125,
-0.0263519287109375,
-0.0235443115234375,
0.01464080810546875,
-0.0214691162109375,
-0.01934814453125,
0.0093994140625,
-0.004917144775390625,
-0.1331787109375,
0.04473876953125,
0.0107421875,
-0.029632568359375,
-0.032562255859375,
0.021209716796875,
-0.08453369140625,
-0.048095703125,
0.0197906494140625,
-0.03765869140625,
-0.004669189453125,
0.042236328125,
-0.043243408203125,
0.049835205078125,
-0.03857421875,
-0.0323486328125,
-0.0467529296875,
0.0052642822265625,
-0.06072998046875,
0.0638427734375,
0.043914794921875,
-0.003437042236328125,
-0.007312774658203125,
0.01800537109375,
0.037078857421875,
0.0518798828125,
0.0130157470703125,
-0.011962890625,
0.03424072265625,
-0.019256591796875,
0.0081787109375,
-0.0209808349609375,
0.01068115234375,
0.0098114013671875,
-0.011566162109375,
0.024932861328125,
-0.02972412109375,
-0.00533294677734375,
0.005634307861328125,
-0.033050537109375,
-0.0159912109375,
-0.01136016845703125,
-0.0110931396484375,
0.0230865478515625,
-0.0205841064453125,
0.0081634521484375,
-0.0196685791015625,
-0.0322265625,
0.0198516845703125,
-0.040130615234375,
-0.011474609375,
0.000576019287109375,
0.06982421875,
0.02734375,
-0.005519866943359375,
0.0227508544921875,
0.03564453125,
0.04534912109375,
-0.0196533203125,
0.050750732421875,
-0.00238800048828125,
-0.0307464599609375,
0.08721923828125,
0.0069732666015625,
-0.00384521484375,
-0.033966064453125,
0.052520751953125,
0.0176849365234375,
0.0262298583984375,
-0.0209503173828125,
0.0024127960205078125,
0.03558349609375,
-0.0255889892578125,
-0.044525146484375,
0.005008697509765625,
0.01397705078125,
0.038909912109375,
-0.06292724609375,
0.11322021484375,
-0.00022614002227783203,
0.0112457275390625,
-0.007328033447265625,
-0.0283966064453125,
0.0127716064453125,
0.0222320556640625,
-0.005443572998046875,
-0.03070068359375,
-0.0208282470703125,
0.00318145751953125,
-0.016326904296875,
-0.0020275115966796875,
-0.039215087890625,
0.01091766357421875,
0.01190948486328125,
-0.01336669921875,
0.004955291748046875,
-0.0084381103515625,
0.0582275390625,
0.0173492431640625,
-0.01438140869140625,
0.0111083984375,
-0.0158843994140625,
0.005016326904296875,
0.004497528076171875,
-0.01519775390625,
-0.005096435546875,
0.0478515625,
0.0215911865234375,
0.01206207275390625,
-0.021942138671875,
0.05908203125,
-0.0017232894897460938,
0.0399169921875,
0.01551055908203125,
-0.004520416259765625,
0.01910400390625,
0.033355712890625,
0.033599853515625,
0.01280975341796875,
-0.02117919921875,
0.005279541015625,
-0.009674072265625,
0.0231475830078125,
0.02734375,
-0.0048065185546875,
-0.0202178955078125,
0.0194244384765625,
-0.0139312744140625,
-0.005832672119140625,
-0.0037059783935546875,
0.007068634033203125,
0.023345947265625,
-0.0005049705505371094,
-0.002460479736328125,
0.0131378173828125,
-0.0268402099609375,
-0.028045654296875,
0.0249481201171875,
0.07586669921875,
-0.002941131591796875,
-0.01336669921875,
-0.0158538818359375,
-0.01045989990234375,
0.0411376953125,
0.0252227783203125,
0.002094268798828125,
0.0295867919921875,
-0.006221771240234375,
-0.01123046875,
-0.01560211181640625,
-0.00870513916015625,
0.0189971923828125,
-0.0736083984375,
-0.0189971923828125,
-0.005046844482421875,
-0.0290985107421875,
-0.06451416015625,
0.01360321044921875,
-0.026092529296875,
0.04217529296875,
-0.01038360595703125,
0.0638427734375,
-0.034393310546875,
-0.03253173828125,
-0.006740570068359375,
-0.002140045166015625,
0.047027587890625,
0.0237274169921875,
-0.08990478515625,
-0.005077362060546875,
-0.0517578125,
0.01398468017578125,
-0.0176239013671875,
-0.0191497802734375,
-0.0026950836181640625,
0.0119171142578125,
-0.033935546875,
0.0188140869140625,
0.0130615234375,
0.0802001953125,
0.04833984375,
0.0166778564453125,
-0.0589599609375,
0.0136566162109375,
-0.0231781005859375,
0.05242919921875,
-0.003520965576171875,
0.04669189453125,
-0.007480621337890625,
0.000011920928955078125,
-0.0141143798828125,
0.0004906654357910156,
-0.00930023193359375,
-0.01471710205078125,
0.01395416259765625,
0.0021648406982421875,
-0.0020771026611328125,
-0.0178070068359375,
0.034088134765625,
-0.01053619384765625,
-0.03497314453125,
0.018951416015625,
0.00731658935546875,
0.00457000732421875,
0.003086090087890625,
0.0859375,
-0.0400390625,
0.054656982421875,
-0.0294647216796875,
0.04608154296875,
-0.029937744140625,
0.007511138916015625,
0.0269927978515625,
-0.042022705078125,
0.04547119140625,
0.03338623046875,
-0.050140380859375,
0.0191192626953125,
0.039642333984375,
0.028411865234375,
0.054290771484375,
-0.00754547119140625,
0.03729248046875,
0.04083251953125,
0.030487060546875,
0.02520751953125,
-0.02020263671875,
0.07421875,
0.01390838623046875,
-0.00010889768600463867,
0.0633544921875,
-0.035980224609375,
-0.003940582275390625,
-0.04144287109375,
0.0199432373046875,
0.00446319580078125,
0.0128173828125,
0.006366729736328125,
-0.01166534423828125,
0.01214599609375,
-0.00891876220703125,
0.0218963623046875,
0.035400390625,
0.04010009765625,
0.018798828125,
-0.0108795166015625,
0.05615234375,
0.0025730133056640625,
-0.016876220703125,
-0.017791748046875,
0.030975341796875,
0.0086822509765625,
0.0013418197631835938,
-0.0009174346923828125,
-0.0095367431640625,
0.004642486572265625,
-0.03662109375,
-0.0151214599609375,
0.0286102294921875,
-0.0172119140625,
-0.0274658203125,
0.062286376953125,
-0.0227508544921875,
0.0360107421875,
-0.028594970703125,
-0.036865234375,
0.006732940673828125,
0.00841522216796875,
-0.038787841796875,
-0.0220947265625,
-0.0007028579711914062,
-0.049835205078125,
-0.040313720703125,
0.017364501953125,
0.0173797607421875,
-0.0169525146484375,
-0.01702880859375,
0.014678955078125,
-0.05804443359375,
0.0013494491577148438,
0.00769805908203125,
0.0584716796875,
0.05657958984375,
-0.0046234130859375,
-0.04840087890625,
0.033355712890625,
-0.0024967193603515625,
-0.006103515625,
0.01495361328125,
0.0292205810546875,
-0.01506805419921875,
-0.00833892822265625,
0.0211334228515625,
-0.0285797119140625,
-0.003742218017578125,
0.020263671875,
-0.045623779296875,
0.052642822265625,
0.00424957275390625,
0.01334381103515625,
-0.0187225341796875,
0.0269012451171875,
-0.004486083984375,
0.01210784912109375,
-0.059661865234375,
0.0599365234375,
0.003574371337890625,
0.08984375,
-0.06927490234375,
-0.0150299072265625,
0.0328369140625,
0.04412841796875,
0.039459228515625,
-0.0014286041259765625,
0.006328582763671875,
-0.0130462646484375,
0.046234130859375,
0.0380859375,
-0.00039124488830566406,
-0.01381683349609375,
0.0150909423828125,
-0.006610870361328125,
0.033355712890625,
0.019012451171875,
0.041778564453125,
-0.0194854736328125,
-0.0181732177734375,
0.0152435302734375,
0.016571044921875,
0.025604248046875,
-0.00040602684020996094,
0.0165252685546875,
-0.0142364501953125,
-0.015869140625,
0.01715087890625,
-0.05889892578125,
-0.0297393798828125,
0.0428466796875,
0.042633056640625,
-0.0469970703125,
-0.0278778076171875,
-0.0256500244140625,
0.06646728515625,
0.03521728515625,
-0.0009183883666992188,
0.04034423828125,
0.030426025390625,
0.003650665283203125,
-0.009063720703125,
0.0011043548583984375,
-0.00250244140625,
-0.004024505615234375,
0.0714111328125,
0.04058837890625,
0.034881591796875,
-0.019439697265625,
-0.0294952392578125,
0.019256591796875,
0.07708740234375,
-0.030059814453125,
-0.016754150390625,
-0.0006566047668457031,
-0.006618499755859375,
0.0078582763671875,
-0.0157012939453125,
0.0211639404296875,
-0.0064239501953125,
0.0080108642578125,
-0.0149078369140625,
-0.032073974609375,
-0.00720977783203125,
0.056671142578125,
0.00501251220703125,
0.000934600830078125,
-0.015411376953125,
-0.056793212890625,
-0.03533935546875,
0.034271240234375,
0.0038604736328125,
0.02972412109375,
-0.0243377685546875,
0.059967041015625,
-0.009765625,
0.00946044921875,
-0.0148468017578125,
0.041595458984375,
-0.027557373046875,
0.01476287841796875,
-0.01953125,
-0.0303955078125,
-0.028533935546875,
0.024383544921875,
0.0848388671875,
0.048065185546875,
0.03839111328125,
0.00115966796875,
0.01288604736328125,
0.0318603515625,
0.006282806396484375,
-0.0219879150390625,
0.0151824951171875,
-0.047027587890625,
0.011749267578125,
-0.024200439453125,
-0.00991058349609375,
0.015411376953125,
-0.01033782958984375,
0.00006669759750366211,
-0.04132080078125,
0.0341796875,
-0.0035858154296875,
-0.0067138671875,
0.05255126953125,
-0.0105438232421875,
0.0264892578125,
-0.01715087890625,
-0.0692138671875,
-0.01378631591796875,
-0.044097900390625,
-0.021575927734375,
0.01427459716796875,
0.032501220703125,
0.00992584228515625,
0.00359344482421875,
0.000017762184143066406,
-0.0213470458984375,
0.00870513916015625,
0.0080413818359375,
0.00357818603515625,
0.035430908203125,
0.0106353759765625,
0.01222991943359375,
-0.02362060546875,
0.0110321044921875,
0.00832366943359375,
-0.000030100345611572266,
0.032257080078125,
0.0029582977294921875,
0.0230255126953125,
0.021270751953125,
0.007747650146484375,
-0.02008056640625,
0.018218994140625,
0.0032444000244140625,
0.028839111328125,
0.01387786865234375,
-0.0144500732421875,
-0.0192108154296875,
-0.045654296875,
0.0333251953125,
0.0260162353515625,
-0.006557464599609375,
0.022979736328125,
-0.0121002197265625,
0.01511383056640625,
-0.0017976760864257812,
0.050262451171875,
-0.01549530029296875,
-0.04547119140625,
0.0283966064453125,
0.0176849365234375,
-0.003917694091796875,
0.0389404296875,
0.0540771484375,
-0.0076751708984375,
-0.004375457763671875,
0.0202178955078125,
-0.01128387451171875,
0.0482177734375,
-0.025146484375,
0.01148223876953125,
-0.04351806640625,
-0.033355712890625,
0.01544189453125,
-0.0115966796875,
-0.0026073455810546875,
0.0202484130859375,
0.025726318359375,
0.0008077621459960938,
-0.00154876708984375,
-0.03125,
-0.02276611328125,
0.026092529296875,
-0.005863189697265625,
0.0121917724609375,
-0.010589599609375,
0.00998687744140625,
-0.033538818359375,
-0.03619384765625,
-0.03857421875,
-0.04351806640625,
-0.00115203857421875,
0.031494140625,
-0.02459716796875,
0.0028820037841796875,
-0.05694580078125,
-0.05633544921875,
0.052825927734375,
0.01120758056640625,
0.01514434814453125,
-0.0276031494140625,
-0.005504608154296875,
-0.05029296875,
0.038299560546875,
-0.00833892822265625,
0.0024356842041015625,
-0.00704193115234375,
-0.0191802978515625,
0.0078887939453125,
-0.033111572265625,
0.0374755859375,
-0.0010356903076171875,
0.007205963134765625,
0.0218048095703125,
-0.0222320556640625,
-0.06951904296875,
-0.0025577545166015625,
0.0123748779296875,
0.037200927734375,
0.021697998046875,
-0.0149993896484375,
0.046630859375,
0.0157318115234375,
-0.048187255859375,
-0.07025146484375,
0.003009796142578125,
-0.0309600830078125,
0.0222015380859375,
0.00943756103515625,
-0.0029697418212890625,
0.0026378631591796875,
-0.0299072265625,
-0.0304718017578125,
0.0401611328125,
0.010101318359375,
-0.028411865234375,
-0.06304931640625,
0.0288238525390625,
-0.00066375732421875,
0.03521728515625,
-0.01751708984375,
0.0015048980712890625,
-0.01425933837890625,
0.033477783203125,
-0.00952911376953125,
0.0184326171875,
0.031341552734375,
-0.0010175704956054688,
0.0193328857421875,
-0.002353668212890625,
0.01171875,
-0.049591064453125,
0.031524658203125,
-0.0305023193359375,
0.04852294921875,
0.041656494140625,
-0.0274658203125,
-0.0074462890625,
0.0037403106689453125,
-0.0090484619140625,
-0.004299163818359375,
-0.05450439453125,
-0.0478515625,
-0.0026950836181640625,
0.0831298828125,
0.0467529296875,
0.030792236328125,
-0.042327880859375,
0.0321044921875,
-0.0175628662109375,
-0.055999755859375,
-0.0005884170532226562,
0.0111236572265625,
-0.041259765625,
-0.004730224609375,
0.0186004638671875,
-0.00392913818359375,
-0.0357666015625,
0.0148468017578125,
-0.03936767578125,
0.004535675048828125,
0.033447265625,
0.0081939697265625,
-0.002899169921875,
-0.031829833984375,
0.030029296875,
-0.029388427734375,
-0.033782958984375,
0.00824737548828125,
0.0185699462890625,
-0.0166168212890625,
-0.003993988037109375,
0.00232696533203125,
0.01995849609375,
-0.022979736328125,
-0.005580902099609375,
0.0179901123046875,
0.007221221923828125,
0.01290130615234375,
-0.01690673828125,
0.0015382766723632812,
0.0106353759765625,
-0.0145416259765625,
0.0089569091796875,
0.0169677734375,
0.02581787109375,
-0.016876220703125,
0.07586669921875,
-0.013580322265625,
0.07635498046875,
0.0232391357421875,
0.03466796875,
0.016845703125,
-0.01525115966796875,
0.06463623046875,
-0.06280517578125,
0.0020351409912109375,
0.0247039794921875,
0.002895355224609375,
-0.047698974609375,
0.05450439453125,
0.039276123046875,
0.0121307373046875,
0.019012451171875
]
|
037277b2c4c53577a24e9347bc1ceea02805a3b9 | Wordpress Stackexchange
Q: Strategy for handling hierarchical pages with empty parent content Let assume I have the following page structure
/about-us (used as a parent holder only)
/about-us/history (real page)
/about-us/team (real page)
/about-us/industry (real page)
There is no content in the page "about-us ", but it is needed for two purpose
*
*Allow hierarchical structure in url
*Allow hierarchical structure in menu
But one of the issue is when user type "/about-us" then they will enter a blank page with non content.
So, should I auto forward user to url say "/about-us/history" by default?
Or it is the common way of handling hierarchical pages?
A: I am using two strategies here...
1) is simple redirection to first child (using menu order)
page-redirect.php
<?php
/*
* Template Name: Redirector
* Description: Empty Holder (redirect page)
*/
$rp = new WP_Query(array(
'post_parent' => get_the_id(),
'post_type' => 'page',
'order' => 'asc',
'orderby' => 'menu_order'
));
if ($rp->have_posts())
while ( $rp->have_posts() ) {
$rp->the_post();
wp_redirect(get_permalink(get_the_id()));
exit;
}
wp_redirect(dirname(home_url($wp->request)));
exit;
2) generating a menu on a parent with a links to children (as example of it - http://unu.edu/about)
| Q: Strategy for handling hierarchical pages with empty parent content Let assume I have the following page structure
/about-us (used as a parent holder only)
/about-us/history (real page)
/about-us/team (real page)
/about-us/industry (real page)
There is no content in the page "about-us ", but it is needed for two purpose
*
*Allow hierarchical structure in url
*Allow hierarchical structure in menu
But one of the issue is when user type "/about-us" then they will enter a blank page with non content.
So, should I auto forward user to url say "/about-us/history" by default?
Or it is the common way of handling hierarchical pages?
A: I am using two strategies here...
1) is simple redirection to first child (using menu order)
page-redirect.php
<?php
/*
* Template Name: Redirector
* Description: Empty Holder (redirect page)
*/
$rp = new WP_Query(array(
'post_parent' => get_the_id(),
'post_type' => 'page',
'order' => 'asc',
'orderby' => 'menu_order'
));
if ($rp->have_posts())
while ( $rp->have_posts() ) {
$rp->the_post();
wp_redirect(get_permalink(get_the_id()));
exit;
}
wp_redirect(dirname(home_url($wp->request)));
exit;
2) generating a menu on a parent with a links to children (as example of it - http://unu.edu/about)
A: Create a new file called page-parent.php and enter the following code in your new file:
<?php
/*
* Template Name: Parent Menu
* Description: Redirects empty parent page to first child page
*/
# Parent menu goes to first child page
# askwpgirl.com/redirect-parent-page-first-child-page-wordpress
$child_page = get_pages( "child_of=" . $post->ID . "&sort_column=menu_order" );
if ( $child_page ) {
$parent_page = $child_page[0];
wp_redirect( get_permalink( $parent_page->ID ) );
}
Then, place the page-parent.php in the root directory of your child theme, for example:
/wp-content/themes/child-theme
After that, you will see the new template Parent Menu in the Template option.
Save the parent menu with the new template and whenever tried to access the parent page directly, it will redirect to the first child page.
| wordpress | {
"language": "en",
"length": 303,
"provenance": "stackexchange_00019.jsonl.gz:438594",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120240"
} | [
0.053466796875,
0.01071929931640625,
0.0085601806640625,
-0.0316162109375,
0.005767822265625,
-0.0157928466796875,
0.01922607421875,
-0.0287322998046875,
-0.01058197021484375,
0.005275726318359375,
-0.01222991943359375,
0.00006908178329467773,
-0.0129241943359375,
-0.0499267578125,
0.019989013671875,
-0.0241241455078125,
0.02630615234375,
-0.05560302734375,
0.0193023681640625,
-0.01446533203125,
-0.0020046234130859375,
-0.0150299072265625,
0.09173583984375,
-0.0162506103515625,
0.0191497802734375,
-0.04473876953125,
0.01442718505859375,
-0.01099395751953125,
0.000331878662109375,
-0.02813720703125,
0.006343841552734375,
0.0099029541015625,
0.016143798828125,
-0.029052734375,
0.05914306640625,
-0.008392333984375,
0.031646728515625,
-0.014739990234375,
0.01715087890625,
0.0297393798828125,
0.004398345947265625,
0.00890350341796875,
0.0252227783203125,
0.00860595703125,
-0.0104217529296875,
-0.025146484375,
-0.003688812255859375,
-0.036163330078125,
-0.005229949951171875,
-0.0014753341674804688,
0.0305328369140625,
-0.0020847320556640625,
0.024932861328125,
0.0240936279296875,
-0.01125335693359375,
0.0201416015625,
0.01544189453125,
-0.0428466796875,
0.0212249755859375,
-0.0291900634765625,
-0.01514434814453125,
-0.0157623291015625,
0.03271484375,
0.01849365234375,
-0.006320953369140625,
0.009552001953125,
-0.017181396484375,
0.0261383056640625,
-0.04351806640625,
-0.001918792724609375,
0.0174713134765625,
-0.032745361328125,
-0.00687408447265625,
0.0008683204650878906,
-0.033355712890625,
-0.039947509765625,
0.01334381103515625,
-0.04327392578125,
0.01219940185546875,
0.02154541015625,
-0.0267333984375,
0.01149749755859375,
-0.05877685546875,
-0.046173095703125,
0.0228424072265625,
-0.0156097412109375,
-0.024658203125,
-0.00843048095703125,
-0.039825439453125,
-0.0222320556640625,
-0.03240966796875,
-0.0018157958984375,
-0.018798828125,
-0.003192901611328125,
-0.026702880859375,
-0.01229095458984375,
0.034820556640625,
0.04833984375,
-0.00908660888671875,
0.004032135009765625,
-0.0251617431640625,
-0.029052734375,
0.0020580291748046875,
-0.0218048095703125,
0.0182647705078125,
0.057586669921875,
0.018310546875,
-0.0106658935546875,
0.05322265625,
-0.0065765380859375,
0.015167236328125,
0.051666259765625,
0.00506591796875,
-0.0204620361328125,
-0.00518798828125,
0.0249176025390625,
-0.01666259765625,
0.01171112060546875,
0.004283905029296875,
0.0203704833984375,
-0.0361328125,
-0.0164794921875,
0.01372528076171875,
-0.01456451416015625,
0.01375579833984375,
-0.006511688232421875,
0.01082611083984375,
-0.01433563232421875,
0.0523681640625,
0.01055145263671875,
-0.032257080078125,
-0.0062408447265625,
0.0474853515625,
0.03485107421875,
0.0235137939453125,
-0.0240631103515625,
0.0044403076171875,
-0.034515380859375,
-0.0238800048828125,
0.012237548828125,
0.023193359375,
-0.033447265625,
-0.0066986083984375,
0.007709503173828125,
-0.001422882080078125,
0.030670166015625,
0.02392578125,
0.00302886962890625,
-0.017852783203125,
-0.049224853515625,
0.0172271728515625,
-0.037628173828125,
0.05755615234375,
-0.0228118896484375,
-0.0404052734375,
-0.0509033203125,
-0.013946533203125,
-0.033782958984375,
-0.0128326416015625,
-0.04541015625,
0.034210205078125,
-0.004444122314453125,
0.0022525787353515625,
-0.06024169921875,
-0.079345703125,
-0.0141754150390625,
-0.06976318359375,
-0.01971435546875,
0.037384033203125,
-0.0074310302734375,
0.06793212890625,
-0.043975830078125,
-0.040374755859375,
0.0199432373046875,
0.0194091796875,
0.016571044921875,
-0.03924560546875,
-0.0002760887145996094,
0.0114288330078125,
0.062286376953125,
0.0287628173828125,
-0.02337646484375,
-0.01549530029296875,
0.04107666015625,
-0.032135009765625,
0.06207275390625,
0.012664794921875,
0.07562255859375,
-0.01551055908203125,
0.022247314453125,
-0.0174102783203125,
0.01544189453125,
-0.0802001953125,
0.0322265625,
-0.0136871337890625,
-0.01424407958984375,
0.007282257080078125,
0.002960205078125,
-0.00286865234375,
0.0007815361022949219,
-0.0028228759765625,
0.027984619140625,
-0.005615234375,
0.0242462158203125,
-0.00823211669921875,
0.022735595703125,
-0.01436614990234375,
0.0258636474609375,
0.052459716796875,
0.044189453125,
-0.01116180419921875,
0.02459716796875,
-0.02154541015625,
-0.0443115234375,
-0.048675537109375,
0.01262664794921875,
-0.0081634521484375,
0.0020198822021484375,
-0.01395416259765625,
0.0191802978515625,
-0.0137939453125,
-0.011749267578125,
-0.028839111328125,
-0.00424957275390625,
0.059814453125,
-0.02197265625,
-0.00284576416015625,
-0.0216522216796875,
0.04205322265625,
-0.0008406639099121094,
-0.0245208740234375,
0.0302886962890625,
0.045989990234375,
-0.00730133056640625,
-0.0679931640625,
0.0240936279296875,
-0.0031795501708984375,
0.01641845703125,
-0.035614013671875,
0.0311126708984375,
0.0025577545166015625,
0.042633056640625,
-0.044647216796875,
0.018310546875,
0.0303802490234375,
-0.10455322265625,
-0.050384521484375,
0.05810546875,
-0.0318603515625,
0.01457977294921875,
0.027862548828125,
0.007793426513671875,
0.01715087890625,
0.005565643310546875,
-0.0186767578125,
0.0166473388671875,
-0.023834228515625,
-0.007373809814453125,
-0.01245880126953125,
-0.0079193115234375,
0.017852783203125,
-0.011077880859375,
-0.0274810791015625,
-0.0024662017822265625,
0.0125885009765625,
-0.00485992431640625,
0.017791748046875,
0.00494384765625,
-0.0231781005859375,
-0.029266357421875,
0.032684326171875,
0.0304718017578125,
0.0118560791015625,
0.0119476318359375,
0.0193634033203125,
-0.057159423828125,
0.0125732421875,
-0.0223541259765625,
0.021942138671875,
-0.028289794921875,
-0.00902557373046875,
0.02142333984375,
-0.01141357421875,
-0.0015268325805664062,
-0.0283050537109375,
-0.0594482421875,
0.0200653076171875,
0.044647216796875,
0.041717529296875,
0.0211029052734375,
0.039794921875,
0.01128387451171875,
-0.01068878173828125,
0.037628173828125,
0.015625,
-0.034912109375,
0.0070037841796875,
0.003376007080078125,
0.0209197998046875,
-0.0132293701171875,
-0.00197601318359375,
0.033660888671875,
-0.004993438720703125,
-0.00498199462890625,
0.002101898193359375,
-0.00839996337890625,
0.01029205322265625,
0.01216888427734375,
-0.004383087158203125,
-0.034637451171875,
-0.0245513916015625,
-0.004444122314453125,
0.04278564453125,
0.06292724609375,
0.0123443603515625,
-0.038848876953125,
0.0177764892578125,
0.047698974609375,
-0.05615234375,
-0.10125732421875,
-0.02325439453125,
-0.0675048828125,
0.01108551025390625,
0.039703369140625,
-0.0222625732421875,
-0.01313018798828125,
0.061920166015625,
0.01251220703125,
-0.0140380859375,
-0.03009033203125,
-0.07257080078125,
-0.06640625,
-0.08087158203125,
0.03497314453125,
-0.00875091552734375,
0.041168212890625,
0.005931854248046875,
-0.01898193359375,
-0.0008034706115722656,
-0.035797119140625,
0.0030803680419921875,
0.06268310546875,
0.0037403106689453125,
-0.010894775390625,
-0.023681640625,
0.01629638671875,
0.023834228515625,
0.0120391845703125,
0.03668212890625,
0.0041351318359375,
-0.007762908935546875,
-0.0128021240234375,
-0.0291595458984375,
0.0023059844970703125,
0.0016937255859375,
-0.02044677734375,
0.0221710205078125,
0.034423828125,
0.0207977294921875,
-0.0206756591796875,
-0.052154541015625,
-0.033905029296875,
-0.08856201171875,
0.0011472702026367188,
0.0648193359375,
0.03717041015625,
-0.00582122802734375,
-0.0211639404296875,
0.01143646240234375,
0.0418701171875,
-0.0018825531005859375,
0.004367828369140625,
0.032806396484375,
-0.0011997222900390625,
0.009307861328125,
-0.0252685546875,
0.054931640625,
-0.005550384521484375,
-0.014434814453125,
0.0135040283203125,
-0.01183319091796875,
0.01177215576171875,
-0.04522705078125,
-0.0236663818359375,
-0.01495361328125,
0.01201629638671875,
-0.0277252197265625,
0.01531982421875,
-0.00910186767578125,
-0.0087890625,
0.0070343017578125,
0.05584716796875,
-0.022674560546875,
0.00559234619140625,
-0.0330810546875,
-0.0061798095703125,
0.00591278076171875,
-0.082275390625,
-0.03955078125,
-0.0123138427734375,
-0.0538330078125,
-0.0110931396484375,
-0.01050567626953125,
-0.032501220703125,
0.00927734375,
-0.01079559326171875,
-0.01554107666015625,
-0.0295562744140625,
0.0413818359375,
-0.01568603515625,
-0.0022602081298828125,
0.026763916015625,
-0.0116729736328125,
0.0011386871337890625,
-0.031341552734375,
-0.01122283935546875,
-0.0635986328125,
-0.0246429443359375,
0.044525146484375,
0.054931640625,
-0.01312255859375,
-0.0157623291015625,
-0.01277923583984375,
0.07220458984375,
-0.0088043212890625,
0.036651611328125,
-0.004589080810546875,
0.013275146484375,
-0.0128936767578125,
-0.032470703125,
-0.0032138824462890625,
-0.0213470458984375,
-0.003513336181640625,
-0.019744873046875,
-0.0248260498046875,
-0.0139312744140625,
-0.046539306640625,
-0.03094482421875,
-0.0106048583984375,
-0.01294708251953125,
-0.0753173828125,
-0.034271240234375,
-0.08026123046875,
0.0023937225341796875,
-0.021759033203125,
-0.031890869140625,
-0.05047607421875,
-0.116455078125,
0.0098419189453125,
-0.0103607177734375,
-0.0194244384765625,
-0.0126953125,
0.018798828125,
0.028106689453125,
-0.0179443359375,
0.035736083984375,
-0.0217742919921875,
0.00989532470703125,
-0.02593994140625,
0.0275421142578125,
-0.0175933837890625,
-0.0111846923828125,
0.0640869140625,
-0.03460693359375,
0.03143310546875,
0.0242919921875,
0.007198333740234375,
-0.00946044921875,
-0.03466796875,
0.039764404296875,
0.00975799560546875,
-0.045745849609375,
0.056610107421875,
-0.004673004150390625,
-0.033660888671875,
-0.04425048828125,
0.055206298828125,
0.005245208740234375,
0.0142974853515625,
-0.06475830078125,
-0.01256561279296875,
-0.001407623291015625,
0.0458984375,
0.0228729248046875,
0.00003135204315185547,
0.00710296630859375,
0.0142059326171875,
0.036773681640625,
0.009735107421875,
0.006771087646484375,
0.045135498046875,
-0.0270233154296875,
0.039703369140625,
-0.0184173583984375,
-0.031341552734375,
-0.01120758056640625,
0.0037021636962890625,
0.073486328125,
0.03021240234375,
0.002288818359375,
-0.03375244140625,
0.0023288726806640625,
-0.019378662109375,
-0.040435791015625,
0.016448974609375,
0.01067352294921875,
0.00861358642578125,
-0.0012884140014648438,
0.006511688232421875,
0.0235595703125,
0.010040283203125,
-0.023101806640625,
0.0057830810546875,
-0.002166748046875,
-0.00476837158203125,
-0.029083251953125,
0.0419921875,
0.03338623046875,
-0.005405426025390625,
-0.0269012451171875,
-0.0224761962890625,
0.0272216796875,
0.00843048095703125,
0.032806396484375,
-0.0034008026123046875,
-0.00010418891906738281,
-0.00628662109375,
0.064697265625,
-0.062255859375,
-0.068115234375,
0.051422119140625,
0.11126708984375,
-0.01128387451171875,
-0.0035305023193359375,
-0.02679443359375,
-0.00980377197265625,
-0.00687408447265625,
0.0289764404296875,
-0.00211334228515625,
-0.04803466796875,
-0.006927490234375,
0.0196533203125,
0.034454345703125,
-0.01140594482421875,
-0.0389404296875,
0.031463623046875,
-0.03118896484375,
0.00699615478515625,
0.0249481201171875,
-0.04986572265625,
0.022064208984375,
0.032745361328125,
0.0056610107421875,
-0.0255126953125,
0.0173492431640625,
-0.038970947265625,
0.045074462890625,
-0.052734375,
-0.0309906005859375,
0.07110595703125,
-0.02520751953125,
0.03326416015625,
-0.0653076171875,
0.0263824462890625,
-0.0382080078125,
-0.01163482666015625,
0.08050537109375,
0.055694580078125,
-0.05645751953125,
0.01898193359375,
-0.0257415771484375,
0.0033702850341796875,
-0.03961181640625,
-0.07159423828125,
-0.040313720703125,
-0.01629638671875,
-0.0150909423828125,
-0.0002644062042236328,
0.01387786865234375,
0.037384033203125,
-0.04345703125,
0.016876220703125,
-0.004566192626953125,
0.005908966064453125,
-0.0105438232421875,
0.1075439453125,
-0.06005859375,
0.03985595703125,
0.006587982177734375,
0.061798095703125,
0.00559234619140625,
-0.0087890625,
0.0198974609375,
-0.0157623291015625,
-0.0438232421875,
-0.0246124267578125,
-0.0272369384765625,
0.0123443603515625,
0.057525634765625,
-0.0163421630859375,
0.01468658447265625,
0.0139312744140625,
0.00292205810546875,
-0.024169921875,
-0.018218994140625,
-0.0103302001953125,
0.019805908203125,
0.005405426025390625,
0.0178985595703125,
0.04034423828125,
0.0181427001953125,
-0.0181884765625,
-0.01320648193359375,
0.01558685302734375,
0.01030731201171875,
-0.0059661865234375,
-0.052703857421875,
0.048828125,
0.0751953125,
0.02587890625,
0.057708740234375,
0.0168914794921875,
0.01348876953125,
0.028533935546875,
0.031829833984375,
0.0010356903076171875,
0.00463104248046875,
0.0684814453125,
0.018157958984375,
-0.0012226104736328125,
0.039337158203125,
-0.02532958984375,
-0.046142578125,
0.0092926025390625,
0.025634765625,
-0.016357421875,
-0.01322174072265625,
0.03619384765625,
0.01352691650390625,
-0.01473236083984375,
0.01183319091796875,
-0.0028743743896484375,
0.04150390625,
-0.048583984375,
-0.0182342529296875,
-0.03753662109375,
-0.0257720947265625,
0.01293182373046875,
-0.0110321044921875,
-0.0099639892578125,
0.04595947265625,
-0.0005040168762207031,
-0.010711669921875,
-0.03350830078125,
0.00975799560546875,
-0.005619049072265625,
-0.0267791748046875,
0.0032978057861328125,
-0.01454925537109375,
-0.0018186569213867188,
-0.032012939453125,
0.0171661376953125,
-0.0440673828125,
0.0367431640625,
0.05450439453125,
0.004192352294921875,
-0.0136871337890625,
0.044036865234375,
-0.03228759765625,
0.0562744140625,
0.002685546875,
-0.038818359375,
-0.0211334228515625,
-0.03497314453125,
0.027130126953125,
-0.003269195556640625,
-0.031890869140625,
0.0301513671875,
-0.026824951171875,
-0.043487548828125,
-0.0118408203125,
-0.0576171875,
0.039764404296875,
-0.036102294921875,
-0.012847900390625,
-0.002040863037109375,
0.01293182373046875,
0.01464080810546875,
0.02490234375,
0.0305633544921875,
-0.03509521484375,
-0.03009033203125,
0.01922607421875,
-0.01519012451171875,
-0.0072021484375,
-0.006931304931640625,
-0.047271728515625,
0.110595703125,
-0.031829833984375,
0.0286407470703125,
0.00380706787109375,
0.049468994140625,
-0.0092926025390625,
0.032379150390625,
-0.036712646484375,
0.084228515625,
0.046661376953125,
0.0137176513671875,
-0.0131988525390625,
0.0017108917236328125,
0.016693115234375,
-0.01360321044921875,
0.01441192626953125,
0.00539398193359375,
-0.0897216796875,
-0.0005736351013183594,
0.052642822265625,
-0.017242431640625,
-0.0011739730834960938,
0.09100341796875,
-0.015625,
0.01409149169921875,
0.0191192626953125,
-0.054595947265625,
0.029876708984375,
-0.05670166015625,
-0.00888824462890625,
-0.0176239013671875,
0.0211029052734375,
0.01290130615234375,
-0.02325439453125,
-0.006011962890625,
-0.09185791015625,
0.00783538818359375,
0.0596923828125,
0.01165008544921875,
0.02569580078125,
-0.0178070068359375,
0.0230560302734375,
-0.079833984375,
0.00921630859375,
-0.0242767333984375,
0.036376953125,
0.0003070831298828125,
0.007663726806640625,
0.032928466796875,
0.024688720703125,
0.043487548828125,
-0.010528564453125,
0.00882720947265625,
0.00897216796875,
-0.00980377197265625,
0.06610107421875,
0.02459716796875,
0.021575927734375,
-0.05413818359375,
-0.032867431640625,
0.04443359375,
0.0947265625,
-0.044830322265625,
-0.00691986083984375,
0.0179443359375,
0.0156402587890625,
-0.004444122314453125,
0.00423431396484375,
0.0389404296875,
0.0117645263671875,
0.0171356201171875,
-0.0296783447265625,
-0.0113677978515625,
0.04644775390625,
-0.0015096664428710938,
0.00916290283203125,
-0.012420654296875,
-0.007762908935546875,
0.0038967132568359375,
-0.01393890380859375,
-0.0191802978515625,
0.0570068359375,
0.02484130859375,
-0.0211334228515625,
0.0182342529296875,
0.0024547576904296875,
-0.00678253173828125,
0.0136871337890625,
-0.0333251953125,
-0.01702880859375,
0.00010585784912109375,
-0.0191802978515625,
-0.0157012939453125,
0.00934600830078125,
0.0421142578125,
0.0096588134765625,
0.0207366943359375,
0.005840301513671875,
0.003841400146484375,
0.000835418701171875,
-0.0009851455688476562,
0.0225982666015625,
-0.0302276611328125,
0.0290374755859375,
0.0080108642578125,
-0.01080322265625,
-0.0110931396484375,
-0.03399658203125,
-0.0164794921875,
0.0141143798828125,
0.00684356689453125,
0.00435638427734375,
0.05194091796875,
-0.0130157470703125,
0.013153076171875,
0.0426025390625,
-0.01512908935546875,
0.06866455078125,
0.02850341796875,
-0.08123779296875,
-0.0357666015625,
-0.0097503662109375,
0.0035495758056640625,
0.048675537109375,
0.04156494140625,
0.0009446144104003906,
-0.0006165504455566406,
-0.0015430450439453125,
0.0125274658203125,
0.0174560546875,
-0.0177154541015625,
0.0012063980102539062,
0.036865234375,
0.029052734375,
0.03228759765625,
-0.00916290283203125,
0.016754150390625,
0.003444671630859375,
-0.0236663818359375,
0.0033817291259765625,
0.08941650390625,
-0.0196990966796875,
0.00733184814453125,
0.0057220458984375,
0.012054443359375,
-0.01007843017578125,
-0.006565093994140625,
0.037078857421875,
-0.0003342628479003906,
0.0224151611328125,
-0.01480865478515625,
-0.07720947265625,
0.00444793701171875,
0.015716552734375,
-0.03045654296875,
0.04498291015625,
-0.0253753662109375,
0.00991058349609375,
-0.033905029296875,
0.016387939453125,
-0.036407470703125,
-0.036407470703125,
-0.07269287109375,
-0.032867431640625,
0.036163330078125,
0.042327880859375,
-0.00008571147918701172,
0.04571533203125,
-0.0208587646484375,
-0.044036865234375,
0.01849365234375,
-0.0865478515625,
0.02081298828125,
0.040618896484375,
-0.00794219970703125,
-0.0195770263671875,
0.044830322265625,
-0.0018367767333984375,
0.0158233642578125,
0.0308990478515625,
0.007572174072265625,
0.05267333984375,
-0.040313720703125,
-0.02130126953125,
0.016845703125,
0.01126861572265625,
-0.0250701904296875,
0.0036487579345703125,
0.0051422119140625,
-0.0215606689453125,
0.0009570121765136719,
-0.0229949951171875,
-0.01340484619140625,
-0.04278564453125,
0.00786590576171875,
0.0189361572265625,
-0.01393890380859375,
0.001148223876953125,
-0.0032787322998046875,
0.02178955078125,
0.039764404296875,
0.0273590087890625,
-0.0625,
0.034149169921875,
-0.0037555694580078125,
0.037384033203125,
0.00661468505859375,
0.037872314453125,
0.0017271041870117188,
0.01198577880859375,
-0.0574951171875,
0.016387939453125,
-0.0189666748046875,
-0.01348114013671875,
-0.021392822265625,
0.01812744140625,
0.021453857421875,
-0.017913818359375,
0.0027294158935546875,
-0.00952911376953125,
0.01042938232421875,
0.0609130859375,
0.03375244140625,
-0.032135009765625,
0.0169830322265625,
-0.00818634033203125,
0.004978179931640625,
0.0304718017578125,
0.01088714599609375,
0.0018587112426757812,
-0.01513671875,
-0.011444091796875,
-0.006999969482421875,
-0.0005841255187988281,
-0.0390625,
-0.058197021484375,
0.07611083984375,
-0.01068878173828125,
-0.0203094482421875,
0.0013885498046875,
0.0218658447265625,
-0.010467529296875,
0.0094451904296875,
0.02069091796875,
-0.044219970703125,
0.016632080078125,
0.007175445556640625,
-0.01380157470703125,
0.0478515625,
-0.0037059783935546875,
0.0019092559814453125,
-0.0190582275390625,
0.0090789794921875,
0.0008454322814941406,
-0.00264739990234375,
-0.01177215576171875,
0.0020580291748046875,
0.0236358642578125,
0.04345703125,
-0.004459381103515625,
-0.003002166748046875,
0.005847930908203125,
-0.01212310791015625,
0.005779266357421875,
0.00013959407806396484,
-0.020721435546875,
-0.035003662109375,
-0.0112762451171875,
0.016876220703125,
0.0011262893676757812,
0.0177459716796875,
-0.01898193359375,
-0.0214691162109375,
-0.032257080078125,
0.00446319580078125,
0.0279693603515625,
-0.07220458984375,
-0.0039520263671875,
0.015869140625,
-0.00963592529296875,
-0.03192138671875,
0.01502227783203125,
-0.019073486328125,
-0.017547607421875,
0.018463134765625,
-0.00440216064453125,
0.00092315673828125,
-0.027099609375,
0.04071044921875,
-0.03460693359375,
-0.04443359375,
0.0257110595703125,
0.0178070068359375,
-0.038604736328125,
0.009796142578125,
0.0011129379272460938,
0.0660400390625,
-0.052001953125,
-0.0131378173828125,
0.003627777099609375,
0.010528564453125,
-0.0423583984375,
0.005733489990234375,
-0.007274627685546875,
0.0194091796875,
-0.00568389892578125,
0.0270843505859375,
-0.0260772705078125,
0.049102783203125,
-0.0063934326171875,
0.0276947021484375,
-0.0028171539306640625,
0.0156402587890625,
-0.01018524169921875,
0.042510986328125,
-0.006526947021484375,
-0.0115509033203125,
0.011688232421875,
-0.01505279541015625,
0.001850128173828125,
-0.007251739501953125,
-0.034820556640625,
-0.052001953125,
0.0340576171875,
0.009857177734375,
-0.0149078369140625,
0.0188140869140625
]
|
f715b88a3d55aa1d2216f3d036407f9b8a02b280 | Wordpress Stackexchange
Q: Modify featured image path to Amazon S3 I have uploaded my images to Amazon S3. There are some featured images. In order to modify their path, I run the update scripts to change the path of wp_posts.guid. But the image still points to the old path.
How can I change the featured image url so as to point to the Amazon S3 path?
Thanks
A: You can hook into the output and modify the URL there.
add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 5 );
function my_post_image_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
$upload_dir = wp_upload_dir();
$base_url = $upload_dir['baseurl'];
// Change the default upload directory to AWS Bucket link
$AWSBucket = 'http://s3.amazonaws.com/bucket';
$html = str_replace($base_url, $AWSBucket, $html);
return $html;
}
Output the image
echo get_the_post_thumbnail ();
Reference:
*
*https://developer.wordpress.org/reference/hooks/post_thumbnail_html/
*https://codex.wordpress.org/Function_Reference/wp_upload_dir
*https://developer.wordpress.org/reference/functions/get_the_post_thumbnail/
| Q: Modify featured image path to Amazon S3 I have uploaded my images to Amazon S3. There are some featured images. In order to modify their path, I run the update scripts to change the path of wp_posts.guid. But the image still points to the old path.
How can I change the featured image url so as to point to the Amazon S3 path?
Thanks
A: You can hook into the output and modify the URL there.
add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 5 );
function my_post_image_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
$upload_dir = wp_upload_dir();
$base_url = $upload_dir['baseurl'];
// Change the default upload directory to AWS Bucket link
$AWSBucket = 'http://s3.amazonaws.com/bucket';
$html = str_replace($base_url, $AWSBucket, $html);
return $html;
}
Output the image
echo get_the_post_thumbnail ();
Reference:
*
*https://developer.wordpress.org/reference/hooks/post_thumbnail_html/
*https://codex.wordpress.org/Function_Reference/wp_upload_dir
*https://developer.wordpress.org/reference/functions/get_the_post_thumbnail/
A: Then you have to point the uploads folder to the same location. You can do it by making the below changes in the wp-config.php file
Open up your wp-config.php file, located at the root of your WordPress installation, and add the following code:
define('UPLOADS', 'http://amazon_url/uploads'); //Replace the url here with folder in Amazon
The codex specifies that it should be added before the line that says require_once(ABSPATH.’wp-settings.php’);.
Make sure the uploads folder is writable.
| wordpress | {
"language": "en",
"length": 205,
"provenance": "stackexchange_00019.jsonl.gz:438619",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120326"
} | [
0.03387451171875,
-0.01021575927734375,
0.01560211181640625,
-0.0172576904296875,
0.00928497314453125,
-0.03143310546875,
0.0631103515625,
-0.0155792236328125,
0.009490966796875,
0.01047515869140625,
0.042755126953125,
-0.001224517822265625,
-0.0186614990234375,
-0.056915283203125,
0.0025882720947265625,
-0.0019683837890625,
0.05877685546875,
-0.021820068359375,
0.06378173828125,
0.02703857421875,
0.0006604194641113281,
0.06964111328125,
0.0457763671875,
0.03271484375,
0.0110931396484375,
-0.00745391845703125,
0.06683349609375,
-0.03839111328125,
-0.007534027099609375,
-0.020477294921875,
0.01171875,
-0.002498626708984375,
0.02874755859375,
0.010284423828125,
-0.02239990234375,
0.007091522216796875,
0.019989013671875,
-0.004589080810546875,
-0.0218353271484375,
0.042816162109375,
0.0261688232421875,
-0.0014562606811523438,
0.013427734375,
-0.033660888671875,
-0.00589752197265625,
-0.01202392578125,
0.01129913330078125,
-0.02557373046875,
0.047698974609375,
0.0594482421875,
-0.002094268798828125,
0.04083251953125,
-0.0039825439453125,
0.0186004638671875,
-0.0053863525390625,
-0.01282501220703125,
-0.039642333984375,
0.06475830078125,
0.0321044921875,
-0.01739501953125,
-0.032928466796875,
0.00780487060546875,
0.0002658367156982422,
-0.013702392578125,
0.0017242431640625,
0.0095672607421875,
0.0169830322265625,
0.024444580078125,
-0.07952880859375,
-0.045501708984375,
0.025360107421875,
-0.045501708984375,
-0.01328277587890625,
0.0102996826171875,
-0.0143280029296875,
-0.007251739501953125,
0.0203704833984375,
-0.01357269287109375,
0.007312774658203125,
0.0227813720703125,
0.037353515625,
-0.02508544921875,
0.03240966796875,
-0.01268768310546875,
0.0225372314453125,
0.01538848876953125,
0.0126800537109375,
-0.017547607421875,
-0.02728271484375,
0.016082763671875,
-0.0308837890625,
-0.00658416748046875,
-0.0032196044921875,
0.0264434814453125,
-0.00543975830078125,
-0.00992584228515625,
0.0191192626953125,
-0.034271240234375,
0.0211639404296875,
0.01044464111328125,
0.0211181640625,
-0.05291748046875,
0.0350341796875,
-0.007526397705078125,
0.032012939453125,
0.038055419921875,
0.001983642578125,
-0.06243896484375,
0.031402587890625,
0.00933837890625,
0.0010347366333007812,
0.04241943359375,
-0.00335693359375,
0.01052093505859375,
-0.0447998046875,
-0.01134490966796875,
-0.039825439453125,
0.00905609130859375,
-0.0073089599609375,
0.0250091552734375,
0.005504608154296875,
0.007640838623046875,
0.03240966796875,
-0.020782470703125,
0.040863037109375,
0.034332275390625,
-0.038482666015625,
-0.030548095703125,
-0.0010442733764648438,
0.007381439208984375,
-0.0212249755859375,
0.03717041015625,
0.026123046875,
-0.003448486328125,
-0.0226593017578125,
-0.001285552978515625,
-0.025146484375,
-0.018646240234375,
-0.0018520355224609375,
0.0283355712890625,
-0.01934814453125,
-0.034515380859375,
0.035400390625,
-0.01739501953125,
0.0284881591796875,
0.0252227783203125,
0.01837158203125,
0.0235595703125,
-0.01788330078125,
-0.048614501953125,
0.03692626953125,
-0.01708984375,
0.0191497802734375,
0.01239013671875,
0.0235748291015625,
-0.051666259765625,
0.055816650390625,
-0.0577392578125,
0.0352783203125,
-0.060760498046875,
0.00270843505859375,
-0.0203094482421875,
0.041015625,
-0.01617431640625,
-0.029327392578125,
0.01806640625,
-0.051849365234375,
-0.01232147216796875,
0.0199127197265625,
-0.001735687255859375,
0.00989532470703125,
0.013671875,
0.01104736328125,
-0.0012044906616210938,
0.004451751708984375,
0.0018625259399414062,
0.0232391357421875,
0.050537109375,
0.016265869140625,
0.03790283203125,
0.0174102783203125,
-0.0322265625,
0.1015625,
-0.039459228515625,
-0.03411865234375,
0.015655517578125,
0.0084075927734375,
0.044464111328125,
0.006786346435546875,
0.01103973388671875,
0.03619384765625,
-0.00342559814453125,
-0.060760498046875,
0.020660400390625,
0.0224761962890625,
0.0003490447998046875,
-0.0313720703125,
-0.01702880859375,
0.0143280029296875,
-0.01506805419921875,
0.00482940673828125,
0.00823211669921875,
-0.0019474029541015625,
0.0102081298828125,
-0.0041656494140625,
-0.0228729248046875,
0.003437042236328125,
0.01120758056640625,
-0.00911712646484375,
0.0091705322265625,
0.01282501220703125,
0.0254364013671875,
-0.021636962890625,
-0.05072021484375,
-0.00829315185546875,
0.042510986328125,
-0.005237579345703125,
0.021209716796875,
-0.0120697021484375,
0.043548583984375,
-0.0227813720703125,
-0.0025997161865234375,
-0.034698486328125,
0.0107269287109375,
0.039093017578125,
0.033172607421875,
-0.0165863037109375,
0.003314971923828125,
0.037567138671875,
0.036865234375,
-0.038726806640625,
-0.01406097412109375,
-0.06695556640625,
-0.0182647705078125,
-0.0308837890625,
-0.0245513916015625,
-0.01313018798828125,
-0.049102783203125,
0.034820556640625,
0.04827880859375,
0.05615234375,
0.029083251953125,
0.01044464111328125,
0.0021953582763671875,
0.06396484375,
-0.021697998046875,
0.0183868408203125,
-0.0257110595703125,
-0.0159454345703125,
0.005809783935546875,
0.0244293212890625,
-0.00649261474609375,
0.013824462890625,
-0.059814453125,
0.00914764404296875,
0.03668212890625,
-0.005016326904296875,
-0.0254364013671875,
-0.01140594482421875,
0.0179443359375,
0.00191497802734375,
-0.000030279159545898438,
-0.02545166015625,
-0.0017919540405273438,
0.00754547119140625,
0.03216552734375,
0.006378173828125,
0.0164947509765625,
-0.0200347900390625,
0.027069091796875,
0.021575927734375,
-0.046783447265625,
-0.0029754638671875,
0.056732177734375,
0.0307159423828125,
-0.0212860107421875,
0.0038700103759765625,
-0.0241851806640625,
-0.0159454345703125,
0.019561767578125,
-0.0214080810546875,
-0.0184783935546875,
-0.0052642822265625,
0.0105743408203125,
-0.033538818359375,
-0.06640625,
0.055694580078125,
0.04168701171875,
-0.0308380126953125,
0.025360107421875,
0.051025390625,
0.0221710205078125,
0.0014429092407226562,
0.017852783203125,
-0.034698486328125,
0.01885986328125,
0.0189361572265625,
-0.027313232421875,
0.034942626953125,
-0.04168701171875,
0.03863525390625,
0.051055908203125,
-0.0220794677734375,
0.01160430908203125,
-0.0034656524658203125,
-0.0103759765625,
-0.01141357421875,
0.0258026123046875,
-0.0030231475830078125,
-0.0196075439453125,
-0.0237274169921875,
0.029815673828125,
0.01418304443359375,
-0.00811004638671875,
-0.0007233619689941406,
-0.028717041015625,
-0.01110076904296875,
0.001461029052734375,
-0.0927734375,
-0.07781982421875,
0.01363372802734375,
-0.04205322265625,
0.01242828369140625,
0.0111846923828125,
-0.019775390625,
-0.03509521484375,
0.04364013671875,
-0.004703521728515625,
-0.0198822021484375,
0.003887176513671875,
-0.053070068359375,
-0.050628662109375,
-0.062286376953125,
-0.0073089599609375,
-0.007289886474609375,
0.0175018310546875,
0.01493072509765625,
0.049774169921875,
0.019012451171875,
-0.036163330078125,
0.0027637481689453125,
0.10089111328125,
-0.0217437744140625,
-0.021087646484375,
0.053070068359375,
-0.0027027130126953125,
0.003997802734375,
0.00005346536636352539,
0.0684814453125,
0.07574462890625,
-0.10546875,
0.0082244873046875,
-0.046142578125,
-0.0198211669921875,
-0.02606201171875,
0.05548095703125,
0.06988525390625,
-0.0048828125,
0.0145263671875,
-0.034881591796875,
-0.0005750656127929688,
-0.034393310546875,
-0.023101806640625,
0.01074981689453125,
0.0035190582275390625,
0.0109405517578125,
-0.0206451416015625,
0.032012939453125,
0.022918701171875,
0.03375244140625,
0.0034694671630859375,
-0.00707244873046875,
0.014190673828125,
-0.0174407958984375,
-0.0062713623046875,
-0.0262298583984375,
0.05694580078125,
0.0098724365234375,
-0.003082275390625,
0.01708984375,
0.045745849609375,
-0.0182342529296875,
0.0181121826171875,
-0.086181640625,
-0.0174560546875,
0.0211334228515625,
-0.0521240234375,
0.0260162353515625,
-0.0277252197265625,
-0.02001953125,
-0.015167236328125,
0.0726318359375,
-0.048797607421875,
-0.004489898681640625,
0.006793975830078125,
-0.01065826416015625,
-0.016510009765625,
-0.0110931396484375,
-0.0855712890625,
0.007541656494140625,
-0.01479339599609375,
-0.0056915283203125,
-0.0011739730834960938,
-0.02398681640625,
0.006450653076171875,
-0.0239105224609375,
-0.0211029052734375,
-0.0295867919921875,
0.034088134765625,
-0.055511474609375,
0.003696441650390625,
0.03973388671875,
-0.005733489990234375,
0.01052093505859375,
-0.045135498046875,
-0.0174102783203125,
-0.09222412109375,
-0.011505126953125,
0.00028824806213378906,
0.055572509765625,
-0.023651123046875,
0.0178680419921875,
-0.049652099609375,
0.061248779296875,
-0.0011243820190429688,
0.00424957275390625,
0.003993988037109375,
-0.006969451904296875,
0.00997161865234375,
0.00414276123046875,
0.00457763671875,
-0.00801849365234375,
-0.01531982421875,
-0.0748291015625,
-0.07574462890625,
-0.059478759765625,
-0.0003693103790283203,
0.0499267578125,
0.031585693359375,
-0.00807952880859375,
-0.061553955078125,
-0.0298309326171875,
0.01202392578125,
0.0390625,
0.0195159912109375,
-0.0198211669921875,
-0.0670166015625,
-0.06329345703125,
0.06890869140625,
0.006862640380859375,
0.014190673828125,
-0.00461578369140625,
0.059814453125,
0.008209228515625,
-0.040924072265625,
-0.044952392578125,
0.00650787353515625,
0.0290985107421875,
0.00923919677734375,
0.05078125,
0.039306640625,
0.01151275634765625,
-0.005580902099609375,
0.0225982666015625,
0.032562255859375,
-0.0170135498046875,
0.0079498291015625,
0.0166473388671875,
0.00928497314453125,
-0.0028839111328125,
0.0357666015625,
-0.01251220703125,
0.01313018798828125,
-0.03057861328125,
0.0303955078125,
-0.05572509765625,
-0.026092529296875,
0.029632568359375,
-0.0225677490234375,
-0.0258331298828125,
-0.0361328125,
0.00763702392578125,
0.005084991455078125,
0.0648193359375,
0.026947021484375,
-0.01068115234375,
0.039520263671875,
0.03778076171875,
0.0152130126953125,
-0.01189422607421875,
-0.00798797607421875,
0.01544952392578125,
0.05364990234375,
-0.00844573974609375,
0.037872314453125,
-0.0215606689453125,
0.00977325439453125,
-0.0269012451171875,
0.0142822265625,
-0.00592803955078125,
-0.04443359375,
0.007297515869140625,
0.0190582275390625,
-0.043731689453125,
-0.04144287109375,
0.0418701171875,
0.046539306640625,
-0.03076171875,
-0.033935546875,
-0.036590576171875,
-0.0244903564453125,
-0.07000732421875,
0.054107666015625,
0.05169677734375,
-0.0181884765625,
0.03045654296875,
0.0026187896728515625,
0.06976318359375,
-0.024993896484375,
-0.0271453857421875,
0.03253173828125,
0.019287109375,
0.0054168701171875,
-0.01275634765625,
0.06866455078125,
-0.033843994140625,
0.00888824462890625,
0.0159149169921875,
-0.019622802734375,
-0.002376556396484375,
0.003650665283203125,
0.048828125,
-0.0535888671875,
-0.029022216796875,
0.0340576171875,
-0.042816162109375,
-0.002429962158203125,
-0.01412200927734375,
-0.0567626953125,
-0.03009033203125,
-0.004833221435546875,
0.0074462890625,
0.044097900390625,
-0.01287841796875,
-0.004779815673828125,
-0.026153564453125,
-0.048309326171875,
-0.007434844970703125,
-0.030731201171875,
0.0109710693359375,
-0.0213470458984375,
-0.03887939453125,
0.00598907470703125,
0.0019969940185546875,
0.00206756591796875,
-0.0099029541015625,
-0.0291748046875,
-0.023284912109375,
-0.0015745162963867188,
0.0687255859375,
-0.03179931640625,
-0.0183258056640625,
-0.01190185546875,
0.017822265625,
-0.05029296875,
0.00862884521484375,
0.0261077880859375,
0.003772735595703125,
-0.0406494140625,
0.0023136138916015625,
-0.04443359375,
0.01274871826171875,
0.0877685546875,
0.0083160400390625,
-0.00782012939453125,
-0.0421142578125,
0.01416015625,
0.0263671875,
-0.007144927978515625,
-0.0028820037841796875,
-0.007110595703125,
0.016204833984375,
0.0194244384765625,
0.058563232421875,
-0.0217437744140625,
0.00673675537109375,
0.00555419921875,
0.00783538818359375,
-0.0081024169921875,
-0.0274810791015625,
0.0220184326171875,
-0.0168914794921875,
-0.045745849609375,
-0.069091796875,
0.03271484375,
0.021759033203125,
-0.01084136962890625,
0.047210693359375,
0.0386962890625,
0.039764404296875,
0.018280029296875,
-0.0182037353515625,
-0.0029125213623046875,
-0.031280517578125,
0.0188751220703125,
-0.050506591796875,
0.01000213623046875,
-0.02880859375,
-0.004077911376953125,
0.03009033203125,
0.005825042724609375,
0.002071380615234375,
0.006763458251953125,
-0.01534271240234375,
-0.00037384033203125,
0.01055145263671875,
-0.02191162109375,
0.0297698974609375,
0.0498046875,
-0.001270294189453125,
0.0440673828125,
0.024200439453125,
0.01462554931640625,
0.01384735107421875,
0.0023097991943359375,
-0.01776123046875,
0.018890380859375,
0.03802490234375,
-0.0017910003662109375,
-0.003997802734375,
0.0233612060546875,
-0.01336669921875,
0.0151824951171875,
-0.0005650520324707031,
0.039031982421875,
0.018310546875,
-0.0011835098266601562,
0.012725830078125,
-0.058074951171875,
0.007598876953125,
0.034637451171875,
0.0072021484375,
0.031768798828125,
-0.015869140625,
-0.05010986328125,
-0.011138916015625,
-0.00946044921875,
-0.00844573974609375,
-0.00838470458984375,
0.028656005859375,
0.0024166107177734375,
-0.0034027099609375,
-0.08154296875,
-0.04193115234375,
0.07562255859375,
-0.059661865234375,
-0.0307464599609375,
-0.0281524658203125,
0.0168304443359375,
-0.028564453125,
-0.0802001953125,
-0.00754547119140625,
-0.0242462158203125,
0.014251708984375,
0.01326751708984375,
0.0085296630859375,
0.02789306640625,
0.04376220703125,
0.00312042236328125,
-0.01116180419921875,
0.02197265625,
-0.0004715919494628906,
0.03961181640625,
0.00571441650390625,
0.00527191162109375,
0.0124664306640625,
-0.05682373046875,
-0.00946807861328125,
-0.054229736328125,
0.051971435546875,
0.01073455810546875,
-0.00982666015625,
-0.007534027099609375,
-0.044464111328125,
0.0073089599609375,
0.028045654296875,
0.033050537109375,
0.00904083251953125,
0.007526397705078125,
0.0215911865234375,
-0.044219970703125,
-0.0361328125,
0.0018367767333984375,
-0.058135986328125,
-0.002971649169921875,
-0.0228271484375,
-0.0308380126953125,
0.0640869140625,
-0.00807952880859375,
0.0147552490234375,
0.0101165771484375,
0.0247039794921875,
-0.01207733154296875,
0.00490570068359375,
-0.007648468017578125,
0.007965087890625,
-0.01461029052734375,
0.00655364990234375,
0.004871368408203125,
0.0223846435546875,
0.0046539306640625,
-0.0019588470458984375,
0.0025882720947265625,
-0.0007147789001464844,
-0.0297393798828125,
-0.0293121337890625,
-0.004131317138671875,
0.050628662109375,
0.01519012451171875,
0.00701141357421875,
-0.0306243896484375,
0.01010894775390625,
0.01206207275390625,
-0.041473388671875,
0.01395416259765625,
-0.02008056640625,
-0.050384521484375,
-0.0083160400390625,
0.021514892578125,
0.035614013671875,
-0.00629425048828125,
0.02783203125,
-0.0018367767333984375,
-0.01123046875,
0.02874755859375,
-0.064453125,
-0.011260986328125,
0.026123046875,
-0.009246826171875,
0.00308990478515625,
-0.03558349609375,
-0.00689697265625,
0.024932861328125,
-0.00684356689453125,
-0.007335662841796875,
0.0058746337890625,
0.00563812255859375,
-0.0232696533203125,
0.03338623046875,
-0.019012451171875,
0.0400390625,
0.01506805419921875,
0.041412353515625,
0.0158843994140625,
0.0296630859375,
-0.0172271728515625,
0.053253173828125,
0.018280029296875,
0.0325927734375,
-0.05914306640625,
-0.0028553009033203125,
0.01285552978515625,
-0.0019369125366210938,
-0.007076263427734375,
-0.052215576171875,
-0.0122222900390625,
-0.077392578125,
-0.05084228515625,
-0.0115966796875,
-0.003978729248046875,
0.04449462890625,
0.01751708984375,
0.00966644287109375,
-0.007564544677734375,
-0.039520263671875,
-0.01212310791015625,
-0.00258636474609375,
-0.0235595703125,
-0.0016393661499023438,
0.009552001953125,
0.01334381103515625,
0.0180511474609375,
0.0086517333984375,
0.0195159912109375,
-0.047088623046875,
0.062255859375,
0.0244140625,
0.07122802734375,
-0.0418701171875,
-0.01081085205078125,
0.041229248046875,
0.01348114013671875,
0.043426513671875,
-0.00031280517578125,
0.0277862548828125,
0.0015697479248046875,
-0.040679931640625,
0.006175994873046875,
0.038360595703125,
-0.0144805908203125,
0.0162506103515625,
-0.05377197265625,
0.00955963134765625,
0.0014429092407226562,
-0.0161590576171875,
-0.0031280517578125,
-0.037811279296875,
0.03741455078125,
-0.0435791015625,
0.054779052734375,
-0.031463623046875,
-0.0218505859375,
0.0237579345703125,
-0.0291290283203125,
0.0755615234375,
-0.0328369140625,
-0.031005859375,
-0.01250457763671875,
0.01105499267578125,
-0.04486083984375,
0.00644683837890625,
0.036895751953125,
-0.00907135009765625,
0.01241302490234375,
0.022796630859375,
0.00505828857421875,
-0.0224456787109375,
-0.0014362335205078125,
0.0156707763671875,
0.001308441162109375,
0.0345458984375,
0.0266876220703125,
0.005046844482421875,
-0.0251617431640625,
-0.00943756103515625,
0.0660400390625,
0.04779052734375,
-0.0061798095703125,
-0.005298614501953125,
0.048370361328125,
-0.0035419464111328125,
0.0180511474609375,
-0.062408447265625,
0.01346588134765625,
-0.0184478759765625,
-0.04254150390625,
-0.0006222724914550781,
0.00959014892578125,
0.02667236328125,
0.01291656494140625,
0.0445556640625,
-0.020355224609375,
-0.0127716064453125,
-0.020263671875,
0.0266571044921875,
0.015472412109375,
0.021209716796875,
-0.035491943359375,
0.001613616943359375,
-0.018280029296875,
-0.0260772705078125,
0.02056884765625,
0.0033092498779296875,
0.01465606689453125,
0.04180908203125,
0.01499176025390625,
-0.0182647705078125,
0.058990478515625,
-0.05810546875,
0.0887451171875,
0.046173095703125,
-0.041656494140625,
-0.006328582763671875,
0.0095672607421875,
-0.00476837158203125,
0.005710601806640625,
0.014434814453125,
0.029754638671875,
0.020111083984375,
-0.0232696533203125,
-0.054718017578125,
-0.00020110607147216797,
-0.02813720703125,
-0.02935791015625,
-0.0030517578125,
-0.0025577545166015625,
-0.03436279296875,
-0.01210784912109375,
0.033294677734375,
0.0182952880859375,
-0.0288848876953125,
-0.018341064453125,
0.01045989990234375,
-0.0259246826171875,
0.01366424560546875,
-0.033294677734375,
0.010284423828125,
0.046630859375,
0.03045654296875,
-0.0782470703125,
0.02813720703125,
0.0027751922607421875,
0.047760009765625,
0.01480865478515625,
-0.024658203125,
-0.007080078125,
0.0311279296875,
-0.036712646484375,
-0.07818603515625,
-0.056488037109375,
0.0161895751953125,
-0.0926513671875,
0.005252838134765625,
0.0318603515625,
0.00316619873046875,
-0.01739501953125,
-0.005001068115234375,
-0.0179901123046875,
0.056060791015625,
-0.07586669921875,
-0.0258636474609375,
-0.039306640625,
0.0090789794921875,
0.00606536865234375,
0.005176544189453125,
0.024749755859375,
-0.02349853515625,
-0.052703857421875,
-0.0246429443359375,
0.0180511474609375,
0.02874755859375,
-0.03607177734375,
-0.08209228515625,
0.0296478271484375,
-0.016265869140625,
-0.03369140625,
-0.003231048583984375,
0.00345611572265625,
-0.0208892822265625,
0.06396484375,
0.0108795166015625,
-0.0101165771484375,
-0.0189361572265625,
0.008880615234375,
0.0246734619140625,
0.055938720703125,
-0.002071380615234375,
0.0202789306640625,
-0.00960540771484375,
0.047149658203125,
0.0226287841796875,
0.037689208984375,
-0.01454925537109375,
0.026123046875,
0.00534820556640625,
0.0211029052734375,
-0.00939178466796875,
-0.005901336669921875,
-0.006221771240234375,
-0.024932861328125,
-0.0191802978515625,
0.01438140869140625,
-0.0443115234375,
-0.01441192626953125,
0.059234619140625,
0.08453369140625,
0.0281829833984375,
-0.0180511474609375,
-0.00238037109375,
-0.065185546875,
-0.0007791519165039062,
-0.0013399124145507812,
0.006072998046875,
-0.0531005859375,
0.0097198486328125,
0.042266845703125,
-0.00885009765625,
-0.03765869140625,
-0.0223846435546875,
-0.052215576171875,
-0.01322174072265625,
-0.0299072265625,
-0.01432037353515625,
0.030242919921875,
0.01617431640625,
0.037811279296875,
-0.019866943359375,
0.033660888671875,
-0.04296875,
0.01555633544921875,
0.035552978515625,
-0.037261962890625,
-0.040008544921875,
-0.02734375,
-0.0135040283203125,
0.03466796875,
-0.031585693359375,
0.0169525146484375,
-0.0286102294921875,
0.0201416015625,
0.00970458984375,
0.0014057159423828125,
-0.03131103515625,
-0.0140533447265625,
0.01497650146484375,
0.019805908203125,
-0.032501220703125,
0.080078125,
-0.0014410018920898438,
-0.0360107421875,
-0.020721435546875,
0.0193023681640625,
-0.058258056640625,
-0.00254058837890625,
-0.0217742919921875,
-0.0276336669921875,
0.0211181640625,
0.00968170166015625,
0.022430419921875,
-0.01528167724609375,
-0.0005254745483398438,
-0.01739501953125,
-0.001129150390625,
-0.005970001220703125
]
|
69eb85eb6a63a959f710bd4856189c00cb57816e | Wordpress Stackexchange
Q: save_post action firing before I publish / save the post I'm trying to update a posts meta only after it has been saved or updated.
My function is pretty simple
function update_test( $post_id ) {
update_post_meta($post_id, 'copied', '1');
update_post_meta($post_id, 'blurb', 'this value updated by save_post action');
}
add_action( 'save_post', 'update_test');
When I add a new post at wp-admin/post-new.php I can see the two custom fields values have already been updated. The fields themselves exist with Advanced Custom Fields. But shouldn't be updated until after the post has been published / saved and or updated. Why is this updating the fields as soon as the post-new.php form loads?
A: A draft or "blank" is saved as soon as you start to create a new post. Those new posts have the post_status of auto-draft. Check for that to prevent your callback from firing on those "blank" post saves.
function update_test( $post_id, $post ) {
if (isset($post->post_status) && 'auto-draft' == $post->post_status) {
return;
}
update_post_meta($post_id, 'copied', '1');
update_post_meta($post_id, 'blurb', 'this value updated by save_post action');
}
add_action( 'save_post', 'update_test', 1, 2);
You may also want to check for the DOING_AJAX and DOING_AUTOSAVE constants.
| Q: save_post action firing before I publish / save the post I'm trying to update a posts meta only after it has been saved or updated.
My function is pretty simple
function update_test( $post_id ) {
update_post_meta($post_id, 'copied', '1');
update_post_meta($post_id, 'blurb', 'this value updated by save_post action');
}
add_action( 'save_post', 'update_test');
When I add a new post at wp-admin/post-new.php I can see the two custom fields values have already been updated. The fields themselves exist with Advanced Custom Fields. But shouldn't be updated until after the post has been published / saved and or updated. Why is this updating the fields as soon as the post-new.php form loads?
A: A draft or "blank" is saved as soon as you start to create a new post. Those new posts have the post_status of auto-draft. Check for that to prevent your callback from firing on those "blank" post saves.
function update_test( $post_id, $post ) {
if (isset($post->post_status) && 'auto-draft' == $post->post_status) {
return;
}
update_post_meta($post_id, 'copied', '1');
update_post_meta($post_id, 'blurb', 'this value updated by save_post action');
}
add_action( 'save_post', 'update_test', 1, 2);
You may also want to check for the DOING_AJAX and DOING_AUTOSAVE constants.
| wordpress | {
"language": "en",
"length": 191,
"provenance": "stackexchange_00019.jsonl.gz:438645",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120421"
} | [
0.05450439453125,
-0.00362396240234375,
0.0207672119140625,
-0.044921875,
0.00452423095703125,
-0.0036258697509765625,
-0.005138397216796875,
-0.041534423828125,
0.004787445068359375,
0.01322174072265625,
-0.031219482421875,
0.0083770751953125,
0.0031948089599609375,
-0.027313232421875,
0.00716400146484375,
-0.02447509765625,
0.04901123046875,
-0.01058197021484375,
0.0272216796875,
-0.0026721954345703125,
-0.0227508544921875,
0.038818359375,
0.04315185546875,
0.0255889892578125,
0.0355224609375,
-0.033172607421875,
-0.004791259765625,
-0.00785064697265625,
0.0267486572265625,
0.009063720703125,
0.02593994140625,
-0.01050567626953125,
0.0245361328125,
0.0224456787109375,
-0.0191650390625,
0.02960205078125,
0.0205841064453125,
0.0021495819091796875,
0.0166778564453125,
0.03350830078125,
0.041229248046875,
-0.0220947265625,
0.00667572021484375,
-0.0033016204833984375,
-0.002925872802734375,
-0.030517578125,
0.0440673828125,
-0.0227813720703125,
0.040130615234375,
0.01430511474609375,
-0.00789642333984375,
0.019500732421875,
-0.019561767578125,
0.04339599609375,
-0.003871917724609375,
-0.01009368896484375,
-0.054473876953125,
0.0289764404296875,
0.053741455078125,
0.041717529296875,
-0.019317626953125,
-0.052703857421875,
-0.0013666152954101562,
-0.07928466796875,
0.0018405914306640625,
0.00905609130859375,
0.01212310791015625,
0.00833892822265625,
-0.055999755859375,
-0.002468109130859375,
0.0299835205078125,
-0.052825927734375,
-0.01384735107421875,
0.01152801513671875,
0.01029205322265625,
-0.016998291015625,
0.0149383544921875,
0.00186920166015625,
-0.005367279052734375,
0.047821044921875,
0.0244293212890625,
0.017669677734375,
0.0251007080078125,
-0.02197265625,
-0.006134033203125,
0.009246826171875,
-0.0259857177734375,
-0.00989532470703125,
-0.035369873046875,
-0.06378173828125,
-0.0217437744140625,
-0.04473876953125,
-0.0455322265625,
-0.038604736328125,
-0.007686614990234375,
-0.05133056640625,
-0.0013751983642578125,
0.06671142578125,
-0.03631591796875,
-0.005359649658203125,
-0.006999969482421875,
-0.01995849609375,
0.0020999908447265625,
-0.0390625,
0.00504302978515625,
0.0279693603515625,
0.0012140274047851562,
-0.0445556640625,
-0.00905609130859375,
0.01605224609375,
-0.024505615234375,
-0.0272979736328125,
-0.010223388671875,
0.002002716064453125,
-0.0246734619140625,
-0.0001289844512939453,
-0.05609130859375,
0.0247650146484375,
-0.0118255615234375,
0.0161895751953125,
0.01922607421875,
0.0266265869140625,
0.0141754150390625,
-0.027374267578125,
0.027313232421875,
0.019195556640625,
-0.027618408203125,
-0.0296173095703125,
0.0168304443359375,
0.007415771484375,
-0.0494384765625,
-0.0032634735107421875,
0.1104736328125,
0.047271728515625,
0.041778564453125,
-0.018402099609375,
-0.0107269287109375,
-0.0262603759765625,
-0.0246734619140625,
0.038299560546875,
-0.0338134765625,
-0.07171630859375,
-0.00007474422454833984,
-0.012176513671875,
-0.00904083251953125,
0.030303955078125,
0.006496429443359375,
-0.0016241073608398438,
0.003509521484375,
-0.052154541015625,
-0.00708770751953125,
-0.04095458984375,
0.04522705078125,
0.012725830078125,
-0.01395416259765625,
-0.0235595703125,
0.052093505859375,
-0.04345703125,
-0.021881103515625,
-0.047027587890625,
0.024200439453125,
0.0102386474609375,
0.0253143310546875,
-0.01029205322265625,
-0.06298828125,
-0.0093536376953125,
-0.03985595703125,
-0.0225372314453125,
0.0265960693359375,
0.036102294921875,
0.0270233154296875,
0.032012939453125,
0.06280517578125,
-0.0147552490234375,
-0.033416748046875,
-0.0223236083984375,
0.01885986328125,
-0.014678955078125,
0.0284423828125,
-0.0034923553466796875,
-0.044342041015625,
-0.021148681640625,
0.046112060546875,
-0.03570556640625,
-0.0268096923828125,
0.053314208984375,
-0.005168914794921875,
0.06610107421875,
0.0031871795654296875,
0.0183563232421875,
-0.00556182861328125,
0.0161285400390625,
-0.0245208740234375,
0.0121307373046875,
-0.0017757415771484375,
-0.0108489990234375,
0.0157470703125,
0.0106048583984375,
-0.0026683807373046875,
-0.0302276611328125,
-0.0013284683227539062,
0.006938934326171875,
-0.0239410400390625,
0.0283660888671875,
-0.07073974609375,
-0.005542755126953125,
-0.0263519287109375,
0.03277587890625,
-0.01166534423828125,
0.026092529296875,
0.015869140625,
-0.022003173828125,
-0.0022449493408203125,
-0.006534576416015625,
-0.0164642333984375,
-0.033905029296875,
-0.036346435546875,
0.0028285980224609375,
-0.0007824897766113281,
0.01033782958984375,
-0.004058837890625,
-0.0206146240234375,
-0.0243377685546875,
-0.0175933837890625,
0.0279693603515625,
-0.03497314453125,
0.003753662109375,
-0.028076171875,
0.028411865234375,
-0.00855255126953125,
-0.01629638671875,
0.030975341796875,
0.02099609375,
0.0017261505126953125,
-0.044891357421875,
-0.018646240234375,
-0.056610107421875,
-0.1148681640625,
0.0113372802734375,
0.08709716796875,
0.0242919921875,
0.007617950439453125,
0.00585174560546875,
0.05108642578125,
0.01904296875,
0.0245819091796875,
0.0266876220703125,
0.004016876220703125,
0.0236358642578125,
0.0625,
-0.044921875,
0.0021419525146484375,
0.01195526123046875,
-0.08990478515625,
-0.0106964111328125,
0.057830810546875,
-0.03118896484375,
-0.020172119140625,
0.01494598388671875,
-0.024871826171875,
0.0001767873764038086,
-0.06854248046875,
-0.0174407958984375,
-0.0278167724609375,
0.04925537109375,
0.005950927734375,
0.04156494140625,
0.017974853515625,
-0.03985595703125,
0.00597381591796875,
0.033355712890625,
0.0065765380859375,
0.002979278564453125,
0.036468505859375,
-0.004093170166015625,
0.0243377685546875,
-0.0181884765625,
-0.007843017578125,
-0.004474639892578125,
0.033111572265625,
-0.00969696044921875,
0.027435302734375,
0.0222625732421875,
-0.01039886474609375,
0.01290130615234375,
-0.0330810546875,
0.01433563232421875,
-0.0296630859375,
0.00882720947265625,
-0.0200653076171875,
0.0290985107421875,
-0.01416778564453125,
-0.0240936279296875,
0.0288848876953125,
0.003925323486328125,
-0.043243408203125,
0.01142120361328125,
-0.0199737548828125,
0.023590087890625,
0.0015316009521484375,
0.0498046875,
0.07073974609375,
-0.0160064697265625,
0.045166015625,
-0.0175018310546875,
-0.004421234130859375,
-0.036163330078125,
0.035369873046875,
-0.0238494873046875,
-0.08648681640625,
-0.01122283935546875,
-0.01611328125,
0.0302734375,
0.05950927734375,
-0.0065155029296875,
-0.040069580078125,
0.00913238525390625,
0.03759765625,
-0.045257568359375,
-0.050384521484375,
-0.024810791015625,
-0.046112060546875,
-0.0145416259765625,
-0.0259857177734375,
-0.021514892578125,
0.01629638671875,
-0.03875732421875,
0.0191192626953125,
-0.037445068359375,
-0.0146484375,
-0.036102294921875,
-0.049896240234375,
-0.038177490234375,
-0.01031494140625,
-0.0025787353515625,
0.0022296905517578125,
0.0165863037109375,
0.083740234375,
0.0203399658203125,
-0.06683349609375,
0.0057373046875,
-0.00502777099609375,
-0.047760009765625,
0.0198974609375,
0.042266845703125,
-0.035980224609375,
-0.01021575927734375,
0.00499725341796875,
0.0240631103515625,
0.0171661376953125,
-0.0186309814453125,
-0.0098876953125,
-0.018035888671875,
-0.015625,
0.022796630859375,
-0.01064300537109375,
-0.00627899169921875,
0.032867431640625,
0.046112060546875,
-0.01436614990234375,
-0.011932373046875,
-0.0255889892578125,
-0.0426025390625,
0.00675201416015625,
0.0204315185546875,
0.0123291015625,
-0.01155853271484375,
0.0213775634765625,
-0.0053253173828125,
0.026580810546875,
0.07421875,
0.004730224609375,
-0.005420684814453125,
-0.049163818359375,
-0.0545654296875,
-0.058563232421875,
-0.01425933837890625,
-0.0166015625,
0.043670654296875,
-0.01482391357421875,
0.05535888671875,
0.0051422119140625,
0.0281829833984375,
-0.046783447265625,
-0.0213165283203125,
0.0154266357421875,
-0.060302734375,
0.051177978515625,
-0.08160400390625,
-0.0126953125,
-0.07586669921875,
0.06915283203125,
-0.01070404052734375,
-0.0181732177734375,
-0.0110626220703125,
0.01311492919921875,
-0.018310546875,
-0.04034423828125,
-0.010711669921875,
-0.004886627197265625,
-0.0021610260009765625,
0.005123138427734375,
-0.019866943359375,
0.00632476806640625,
-0.024993896484375,
0.04290771484375,
-0.01445770263671875,
-0.00867462158203125,
0.041961669921875,
-0.02471923828125,
0.0010423660278320312,
0.012298583984375,
0.009368896484375,
-0.040679931640625,
-0.006313323974609375,
-0.01335906982421875,
-0.09124755859375,
-0.00852203369140625,
-0.00711822509765625,
0.05145263671875,
0.00217437744140625,
0.0139923095703125,
-0.005313873291015625,
0.03875732421875,
0.0297698974609375,
0.0243988037109375,
-0.0074615478515625,
-0.008575439453125,
-0.014495849609375,
-0.0101165771484375,
0.0156707763671875,
-0.016448974609375,
-0.0159912109375,
-0.01512908935546875,
-0.0131988525390625,
-0.0005984306335449219,
-0.0496826171875,
-0.04620361328125,
-0.0184326171875,
-0.01751708984375,
-0.02703857421875,
-0.016510009765625,
-0.023345947265625,
0.00635528564453125,
-0.02777099609375,
0.01367950439453125,
-0.03680419921875,
-0.0445556640625,
0.051544189453125,
-0.038787841796875,
0.0083465576171875,
-0.0160064697265625,
0.08612060546875,
0.021240234375,
-0.00736236572265625,
0.053466796875,
-0.001056671142578125,
0.0328369140625,
0.0268707275390625,
-0.0116119384765625,
0.005443572998046875,
-0.037994384765625,
0.01154327392578125,
0.030975341796875,
-0.00412750244140625,
-0.0231781005859375,
0.047943115234375,
-0.0109100341796875,
-0.0138397216796875,
0.001033782958984375,
-0.04071044921875,
0.040557861328125,
0.01248931884765625,
-0.024688720703125,
0.0040740966796875,
-0.0176544189453125,
0.0218658447265625,
-0.0269317626953125,
0.0396728515625,
-0.01611328125,
-0.0242919921875,
0.0086212158203125,
0.0168914794921875,
0.005977630615234375,
0.0236663818359375,
-0.00672149658203125,
0.019989013671875,
0.004734039306640625,
-0.01256561279296875,
-0.0253753662109375,
-0.0002911090850830078,
-0.013824462890625,
-0.01136016845703125,
0.02880859375,
-0.0171966552734375,
-0.030975341796875,
-0.00383758544921875,
0.0277099609375,
-0.0203399658203125,
-0.0633544921875,
-0.041107177734375,
0.001567840576171875,
0.0684814453125,
0.01543426513671875,
0.0291595458984375,
0.0230255126953125,
0.02166748046875,
-0.0253143310546875,
-0.0178375244140625,
0.036102294921875,
0.0172119140625,
-0.035980224609375,
-0.00765228271484375,
0.039337158203125,
-0.03424072265625,
0.01367950439453125,
0.016632080078125,
0.052001953125,
-0.01495361328125,
-0.04205322265625,
0.07928466796875,
0.03466796875,
0.01959228515625,
0.00597381591796875,
-0.00778961181640625,
0.01261138916015625,
-0.01549530029296875,
-0.038726806640625,
-0.03192138671875,
0.0166168212890625,
0.0296478271484375,
0.0196533203125,
-0.01351165771484375,
-0.0271759033203125,
0.03375244140625,
-0.00905609130859375,
-0.006591796875,
0.02166748046875,
0.02520751953125,
-0.04388427734375,
0.013153076171875,
0.016448974609375,
-0.019744873046875,
-0.01629638671875,
0.0178985595703125,
-0.01055145263671875,
-0.021392822265625,
0.038330078125,
-0.09619140625,
0.049560546875,
-0.037109375,
-0.04254150390625,
0.019256591796875,
-0.0228271484375,
-0.014434814453125,
0.05389404296875,
0.04205322265625,
-0.044891357421875,
-0.05322265625,
0.07489013671875,
-0.0159912109375,
0.0156707763671875,
-0.03460693359375,
0.0142059326171875,
-0.0172271728515625,
0.01029205322265625,
0.03228759765625,
0.00820159912109375,
0.016845703125,
-0.02056884765625,
-0.01486968994140625,
-0.0179901123046875,
0.0160064697265625,
-0.0283355712890625,
0.0019245147705078125,
-0.032318115234375,
0.0219268798828125,
0.023895263671875,
-0.01277923583984375,
-0.046112060546875,
0.020172119140625,
-0.01517486572265625,
0.01470184326171875,
0.0321044921875,
0.01094818115234375,
0.07440185546875,
-0.026947021484375,
0.064697265625,
0.021026611328125,
0.0185394287109375,
-0.047576904296875,
-0.01213836669921875,
-0.032318115234375,
-0.00997161865234375,
0.02215576171875,
0.031646728515625,
0.007663726806640625,
-0.025482177734375,
0.0240325927734375,
0.00371551513671875,
-0.0139312744140625,
-0.005908966064453125,
0.0005335807800292969,
-0.0281982421875,
0.0311431884765625,
0.0070953369140625,
-0.01349639892578125,
0.0245513916015625,
-0.04864501953125,
-0.036956787109375,
0.0211639404296875,
0.0219879150390625,
0.0143890380859375,
-0.036376953125,
0.0022640228271484375,
0.02545166015625,
-0.03424072265625,
0.02032470703125,
0.0625,
0.0293121337890625,
0.057373046875,
-0.007411956787109375,
0.035400390625,
0.044464111328125,
-0.0083770751953125,
-0.024749755859375,
0.01056671142578125,
0.08404541015625,
0.01174163818359375,
-0.0253448486328125,
0.06463623046875,
-0.034088134765625,
0.042083740234375,
0.01308441162109375,
0.065673828125,
-0.0345458984375,
0.04022216796875,
0.03759765625,
-0.023162841796875,
0.046173095703125,
-0.00702667236328125,
-0.0144500732421875,
-0.0224151611328125,
0.0286102294921875,
-0.02386474609375,
-0.0261077880859375,
0.0172119140625,
0.008575439453125,
-0.00556182861328125,
-0.0171356201171875,
-0.00829315185546875,
0.0077972412109375,
-0.01338958740234375,
0.01995849609375,
0.0158843994140625,
0.01239776611328125,
-0.0540771484375,
0.003986358642578125,
0.0016794204711914062,
-0.0188446044921875,
-0.0623779296875,
0.0322265625,
0.016571044921875,
0.01544952392578125,
0.0030002593994140625,
0.04132080078125,
0.06634521484375,
0.04681396484375,
0.0272216796875,
-0.01336669921875,
0.0029811859130859375,
0.06695556640625,
-0.09039306640625,
-0.037109375,
0.0251312255859375,
0.042144775390625,
-0.01209259033203125,
0.044830322265625,
-0.0014390945434570312,
-0.059051513671875,
-0.0106964111328125,
-0.003917694091796875,
0.08697509765625,
-0.0291748046875,
-0.0301361083984375,
-0.0006275177001953125,
0.0190887451171875,
0.0036373138427734375,
0.00516510009765625,
-0.02239990234375,
-0.0276031494140625,
-0.0097198486328125,
-0.0220184326171875,
-0.0634765625,
-0.0229644775390625,
-0.035614013671875,
-0.09210205078125,
0.1151123046875,
0.041717529296875,
0.0379638671875,
-0.01038360595703125,
0.03167724609375,
-0.041961669921875,
0.0104827880859375,
-0.0694580078125,
0.06585693359375,
-0.009002685546875,
0.027069091796875,
-0.08734130859375,
-0.004344940185546875,
-0.021759033203125,
0.007221221923828125,
0.053955078125,
0.01751708984375,
-0.0049285888671875,
-0.0016937255859375,
0.04376220703125,
0.031219482421875,
-0.0056304931640625,
0.004985809326171875,
0.00676727294921875,
0.03302001953125,
0.04034423828125,
-0.045013427734375,
0.03436279296875,
-0.0276336669921875,
-0.020843505859375,
0.023834228515625,
0.0228271484375,
0.0140228271484375,
-0.00986480712890625,
0.01374053955078125,
-0.009246826171875,
0.00506591796875,
0.015289306640625,
0.023101806640625,
0.0052642822265625,
-0.007160186767578125,
0.0037021636962890625,
-0.0082855224609375,
0.0270233154296875,
-0.02069091796875,
0.040618896484375,
0.017303466796875,
0.008331298828125,
0.0206146240234375,
0.002552032470703125,
0.04345703125,
0.03472900390625,
0.01000213623046875,
0.04022216796875,
0.01320648193359375,
0.06964111328125,
0.04888916015625,
0.00908660888671875,
-0.0160064697265625,
0.034881591796875,
0.037933349609375,
0.0791015625,
-0.06732177734375,
-0.00969696044921875,
0.00565338134765625,
-0.01959228515625,
-0.0206298828125,
-0.032318115234375,
-0.01453399658203125,
-0.021697998046875,
-0.005023956298828125,
-0.0245513916015625,
-0.003509521484375,
-0.000644683837890625,
0.01605224609375,
-0.0026092529296875,
0.02716064453125,
-0.0137176513671875,
-0.0250091552734375,
-0.052276611328125,
-0.0092010498046875,
0.0295257568359375,
0.06341552734375,
0.042205810546875,
0.037689208984375,
0.022247314453125,
-0.0257110595703125,
-0.0238189697265625,
0.02166748046875,
-0.00499725341796875,
0.025177001953125,
-0.0276336669921875,
-0.034576416015625,
0.0123138427734375,
0.032623291015625,
0.0077056884765625,
0.07098388671875,
0.07293701171875,
0.0325927734375,
-0.0478515625,
0.0147857666015625,
0.06353759765625,
-0.04205322265625,
0.006366729736328125,
-0.025054931640625,
0.031951904296875,
0.0076904296875,
0.0173187255859375,
-0.0154876708984375,
0.04583740234375,
0.0034503936767578125,
-0.013946533203125,
0.047760009765625,
-0.003314971923828125,
0.0008778572082519531,
0.03350830078125,
0.0092315673828125,
0.053314208984375,
0.01511383056640625,
-0.0035114288330078125,
0.031585693359375,
-0.042755126953125,
-0.06890869140625,
0.01155853271484375,
0.0169525146484375,
-0.042633056640625,
0.06951904296875,
-0.0205841064453125,
0.017059326171875,
0.023651123046875,
-0.037078857421875,
0.006458282470703125,
0.03228759765625,
0.0164642333984375,
0.0205535888671875,
0.0006403923034667969,
-0.004032135009765625,
0.041595458984375,
0.02783203125,
-0.0160980224609375,
0.034637451171875,
-0.033935546875,
-0.00689697265625,
0.021240234375,
0.04443359375,
-0.03936767578125,
-0.0020542144775390625,
0.0170135498046875,
-0.0282135009765625,
0.026397705078125,
0.006702423095703125,
-0.0097808837890625,
0.0311279296875,
0.035888671875,
-0.004840850830078125,
0.0294647216796875,
-0.023590087890625,
0.01142120361328125,
-0.0212860107421875,
-0.004123687744140625,
-0.0310516357421875,
-0.001983642578125,
-0.016387939453125,
-0.00927734375,
0.0218658447265625,
-0.00911712646484375,
0.0142364501953125,
0.0199432373046875,
0.0183563232421875,
0.003704071044921875,
0.00662994384765625,
0.004924774169921875,
0.01403045654296875,
0.020538330078125,
-0.0255126953125,
0.026336669921875,
0.01274871826171875,
-0.0234375,
0.0068359375,
0.024322509765625,
-0.00211334228515625,
0.007480621337890625,
-0.0212860107421875,
-0.0216522216796875,
0.027313232421875,
0.02093505859375,
-0.0262451171875,
0.0136260986328125,
0.0198822021484375,
-0.02081298828125,
-0.0025634765625,
-0.0165252685546875,
-0.023773193359375,
-0.0174407958984375,
-0.01432037353515625,
0.006229400634765625,
-0.0289764404296875,
-0.0257568359375,
-0.025177001953125,
-0.01343536376953125,
0.0293426513671875,
0.0011854171752929688,
-0.04412841796875,
0.016571044921875,
-0.0186767578125,
0.029052734375,
-0.0177459716796875,
-0.0531005859375,
0.006145477294921875,
0.0753173828125,
0.0302734375,
-0.01445770263671875,
-0.01446533203125,
0.0272369384765625,
-0.0013666152954101562,
-0.01413726806640625,
0.0017633438110351562,
-0.00662994384765625,
-0.028564453125,
-0.0190582275390625,
-0.00014328956604003906,
-0.0016956329345703125,
0.03289794921875,
-0.04046630859375,
0.0079193115234375,
0.0005230903625488281,
0.042449951171875,
-0.040191650390625,
-0.0303955078125,
-0.038970947265625,
0.0245819091796875,
-0.033843994140625,
0.0252227783203125,
0.03057861328125,
-0.0129852294921875,
-0.0263671875,
0.023681640625,
-0.0024662017822265625,
-0.0242919921875,
-0.02142333984375,
-0.0014858245849609375,
-0.0050048828125,
0.027435302734375,
-0.005908966064453125,
-0.0266571044921875,
-0.0242462158203125,
0.0126495361328125,
-0.00007551908493041992,
0.031402587890625,
0.008697509765625,
-0.021881103515625,
-0.053863525390625,
-0.00823974609375,
-0.0187530517578125,
0.0184326171875,
-0.021026611328125,
0.004596710205078125,
0.014068603515625,
0.0211029052734375,
-0.023406982421875,
-0.028076171875,
0.0229339599609375,
-0.0036563873291015625,
-0.0081024169921875,
-0.034820556640625,
-0.04046630859375,
-0.00017344951629638672,
0.10565185546875,
0.029571533203125,
0.0289306640625,
-0.0526123046875,
0.067626953125,
-0.006885528564453125,
-0.049468994140625,
-0.003406524658203125,
0.006591796875,
-0.013824462890625,
-0.0247344970703125,
0.01428985595703125,
0.0195465087890625,
-0.019622802734375,
0.00933074951171875,
-0.002635955810546875,
-0.0225677490234375,
0.037353515625,
0.0097808837890625,
-0.0240631103515625,
-0.0283966064453125,
0.057281494140625,
-0.03485107421875,
-0.009613037109375,
0.042816162109375,
-0.000047147274017333984,
0.0230560302734375,
0.08966064453125,
0.0574951171875,
0.04638671875,
-0.039794921875,
-0.0169677734375,
0.0360107421875,
0.0007481575012207031,
-0.000888824462890625,
-0.0380859375,
-0.0203094482421875,
0.0004963874816894531,
0.0038299560546875,
-0.008575439453125,
-0.01180267333984375,
0.00234222412109375,
-0.00872802734375,
0.06243896484375,
-0.0255126953125,
0.0255126953125,
-0.0017910003662109375,
-0.003482818603515625,
0.01230621337890625,
0.006969451904296875,
0.07080078125,
-0.0272064208984375,
0.005584716796875,
-0.0122222900390625,
0.004131317138671875,
-0.0180511474609375,
0.006561279296875,
-0.0279541015625,
-0.0276947021484375,
0.01474761962890625
]
|
d3865bb35a018e539900b49df128f34a21a4c7ce | Wordpress Stackexchange
Q: What's $GLOBALS['wp_settings']['media']['embeds']? In wp-admin/options-media.php, there are a few lines that go:
<?php if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) : ?>
<h3 class="title"><?php _e('Embeds') ?></h3>
<table class="form-table">
<?php do_settings_fields( 'media', 'embeds' ); ?>
</table>
<?php endif; ?>
'embeds' and "embeds" are nowhere else to be found in the WP code base. Might anyone know what it's for?
A: Per the two comments by Rarst and myself, the variable itself is is potentially populated by add_settings_field(), and the related logic is present for historical/backwards compatibility reasons. (There used to be fields in this area.)
The related ticket and changeset for reference:
*
*http://core.trac.wordpress.org/ticket/21719
*http://core.trac.wordpress.org/changeset/21998
| Q: What's $GLOBALS['wp_settings']['media']['embeds']? In wp-admin/options-media.php, there are a few lines that go:
<?php if ( isset( $GLOBALS['wp_settings']['media']['embeds'] ) ) : ?>
<h3 class="title"><?php _e('Embeds') ?></h3>
<table class="form-table">
<?php do_settings_fields( 'media', 'embeds' ); ?>
</table>
<?php endif; ?>
'embeds' and "embeds" are nowhere else to be found in the WP code base. Might anyone know what it's for?
A: Per the two comments by Rarst and myself, the variable itself is is potentially populated by add_settings_field(), and the related logic is present for historical/backwards compatibility reasons. (There used to be fields in this area.)
The related ticket and changeset for reference:
*
*http://core.trac.wordpress.org/ticket/21719
*http://core.trac.wordpress.org/changeset/21998
| wordpress | {
"language": "en",
"length": 103,
"provenance": "stackexchange_00019.jsonl.gz:438663",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120471"
} | [
0.0251617431640625,
-0.00843048095703125,
0.0047454833984375,
0.032989501953125,
-0.004749298095703125,
-0.032867431640625,
0.07122802734375,
-0.03936767578125,
0.01934814453125,
-0.02874755859375,
-0.05908203125,
0.0222015380859375,
-0.0272216796875,
-0.0243072509765625,
0.0279388427734375,
-0.018035888671875,
0.0207061767578125,
-0.000457763671875,
0.0391845703125,
-0.00875091552734375,
0.0110321044921875,
-0.0004935264587402344,
0.04718017578125,
0.006244659423828125,
0.001865386962890625,
-0.0703125,
0.0716552734375,
-0.050079345703125,
0.0270538330078125,
-0.0275115966796875,
0.0120697021484375,
0.024871826171875,
0.021575927734375,
0.0186614990234375,
-0.028900146484375,
0.028350830078125,
0.00423431396484375,
0.008544921875,
0.0254364013671875,
0.0015850067138671875,
0.0121612548828125,
0.003017425537109375,
0.0543212890625,
0.00017714500427246094,
-0.0006823539733886719,
-0.04278564453125,
0.0277252197265625,
-0.01457977294921875,
0.002025604248046875,
-0.01087188720703125,
-0.0169677734375,
-0.0208282470703125,
0.0003879070281982422,
-0.0028629302978515625,
-0.01152801513671875,
-0.0202178955078125,
0.0254364013671875,
-0.025726318359375,
0.0264129638671875,
0.01036834716796875,
-0.041259765625,
-0.00007092952728271484,
0.0006146430969238281,
-0.0406494140625,
0.0172882080078125,
-0.0222015380859375,
0.0121917724609375,
0.032501220703125,
-0.056793212890625,
-0.0205078125,
0.043182373046875,
0.006214141845703125,
0.0130462646484375,
-0.044586181640625,
-0.017608642578125,
0.023345947265625,
0.01458740234375,
0.004550933837890625,
0.00395965576171875,
-0.0197296142578125,
0.00368499755859375,
0.003948211669921875,
-0.0010881423950195312,
-0.0190277099609375,
0.043853759765625,
0.017608642578125,
-0.00992584228515625,
-0.0234527587890625,
0.026031494140625,
-0.02471923828125,
-0.00004410743713378906,
0.0077056884765625,
0.015960693359375,
0.00948333740234375,
-0.031890869140625,
-0.0221099853515625,
0.0692138671875,
0.09722900390625,
-0.022003173828125,
-0.0255279541015625,
-0.015380859375,
-0.0172271728515625,
-0.0236358642578125,
-0.030517578125,
0.03143310546875,
0.041839599609375,
-0.02020263671875,
-0.07513427734375,
0.0058746337890625,
-0.00445556640625,
-0.0322265625,
-0.01229095458984375,
0.00518798828125,
-0.01227569580078125,
-0.033538818359375,
-0.0178680419921875,
-0.03564453125,
0.006256103515625,
-0.01122283935546875,
-0.01361083984375,
0.035675048828125,
0.0272369384765625,
-0.0280609130859375,
0.01047515869140625,
0.0009860992431640625,
0.0064239501953125,
-0.015625,
-0.018463134765625,
-0.02862548828125,
0.058380126953125,
-0.01523590087890625,
-0.0188446044921875,
0.052581787109375,
0.0312347412109375,
-0.00614166259765625,
-0.033203125,
-0.01172637939453125,
-0.0030956268310546875,
0.007091522216796875,
0.0372314453125,
-0.0274505615234375,
-0.06903076171875,
0.0276947021484375,
0.0178680419921875,
-0.0107421875,
0.013763427734375,
0.034332275390625,
0.0178680419921875,
-0.04010009765625,
-0.07763671875,
0.0203094482421875,
0.0162811279296875,
0.031768798828125,
0.00849151611328125,
0.004726409912109375,
-0.005126953125,
0.054931640625,
-0.0283203125,
-0.0210723876953125,
-0.0280914306640625,
-0.040496826171875,
-0.029541015625,
0.0208892822265625,
-0.046905517578125,
-0.044281005859375,
0.0338134765625,
-0.01702880859375,
-0.0029430389404296875,
0.016357421875,
0.055694580078125,
-0.0289764404296875,
-0.0029888153076171875,
0.01343536376953125,
0.0225067138671875,
-0.003864288330078125,
0.023773193359375,
0.0313720703125,
-0.02752685546875,
0.027740478515625,
0.01055908203125,
-0.0232086181640625,
-0.009857177734375,
0.033111572265625,
-0.04083251953125,
-0.0555419921875,
0.019195556640625,
-0.0018301010131835938,
0.0274658203125,
0.049560546875,
0.0005002021789550781,
0.03070068359375,
-0.0007367134094238281,
0.04205322265625,
0.0007500648498535156,
0.0108642578125,
-0.01332855224609375,
-0.03192138671875,
0.0180816650390625,
-0.0206756591796875,
-0.041473388671875,
0.044952392578125,
-0.01506805419921875,
0.0189971923828125,
-0.0182647705078125,
-0.06793212890625,
0.00307464599609375,
-0.0190277099609375,
0.00212860107421875,
-0.0273895263671875,
0.0022792816162109375,
0.0135650634765625,
-0.023681640625,
0.0107269287109375,
-0.022430419921875,
-0.025604248046875,
0.011138916015625,
-0.01192474365234375,
0.08056640625,
0.00829315185546875,
0.07696533203125,
-0.0401611328125,
-0.024658203125,
0.004390716552734375,
-0.02685546875,
0.054168701171875,
0.049102783203125,
-0.040374755859375,
0.005008697509765625,
0.0555419921875,
0.0208282470703125,
0.003265380859375,
0.004543304443359375,
-0.0080413818359375,
0.0175018310546875,
-0.0030670166015625,
-0.006145477294921875,
-0.00910186767578125,
-0.07940673828125,
0.01528167724609375,
0.044403076171875,
0.054595947265625,
0.02764892578125,
0.035614013671875,
-0.007083892822265625,
0.055389404296875,
-0.035552978515625,
0.031982421875,
-0.051605224609375,
0.00826263427734375,
0.057373046875,
0.00455474853515625,
-0.0078887939453125,
-0.01374053955078125,
-0.056488037109375,
0.023651123046875,
0.0015773773193359375,
-0.047210693359375,
-0.01322174072265625,
0.030181884765625,
0.01080322265625,
-0.0301666259765625,
-0.035736083984375,
0.047760009765625,
-0.040924072265625,
0.060333251953125,
-0.0108184814453125,
0.0055084228515625,
-0.002899169921875,
-0.0316162109375,
0.035858154296875,
0.0234375,
-0.0477294921875,
-0.005527496337890625,
0.02764892578125,
0.0240325927734375,
-0.034423828125,
-0.054473876953125,
0.017791748046875,
0.028778076171875,
-0.007434844970703125,
-0.01690673828125,
0.01209259033203125,
-0.050933837890625,
-0.01084136962890625,
-0.0100250244140625,
-0.08270263671875,
-0.002635955810546875,
0.017913818359375,
0.0196685791015625,
-0.033294677734375,
-0.00408935546875,
0.03460693359375,
-0.01776123046875,
0.037994384765625,
0.0187530517578125,
-0.033782958984375,
-0.0205230712890625,
-0.0275726318359375,
0.024749755859375,
-0.03936767578125,
0.0303497314453125,
0.0467529296875,
-0.016876220703125,
0.005626678466796875,
0.0038585662841796875,
0.002338409423828125,
-0.002960205078125,
0.0272674560546875,
0.00583648681640625,
0.0009531974792480469,
-0.03240966796875,
0.03045654296875,
-0.0007328987121582031,
0.0108489990234375,
-0.04376220703125,
-0.055999755859375,
-0.052337646484375,
-0.035614013671875,
-0.10919189453125,
-0.031951904296875,
0.007671356201171875,
-0.06524658203125,
0.00846099853515625,
0.01468658447265625,
-0.026123046875,
-0.02001953125,
0.062042236328125,
-0.00356292724609375,
-0.009552001953125,
-0.02685546875,
-0.044097900390625,
-0.058807373046875,
-0.06744384765625,
-0.036346435546875,
-0.005451202392578125,
0.0233154296875,
-0.006542205810546875,
0.0650634765625,
0.01302337646484375,
-0.024139404296875,
0.01158905029296875,
-0.02984619140625,
0.0022125244140625,
0.004344940185546875,
0.0159454345703125,
-0.03277587890625,
0.0191802978515625,
-0.0031833648681640625,
-0.00939178466796875,
0.03973388671875,
-0.036529541015625,
-0.0026683807373046875,
-0.03521728515625,
-0.01898193359375,
-0.00543975830078125,
0.0260162353515625,
0.0318603515625,
-0.0271453857421875,
0.0087432861328125,
-0.04595947265625,
-0.04632568359375,
0.0229949951171875,
-0.024566650390625,
0.043975830078125,
0.00777435302734375,
-0.0093841552734375,
0.0190277099609375,
0.0367431640625,
-0.014404296875,
0.0005388259887695312,
0.004520416259765625,
-0.0030918121337890625,
0.0143280029296875,
-0.01390838623046875,
-0.00937652587890625,
0.003444671630859375,
-0.01145172119140625,
-0.0287017822265625,
-0.0034084320068359375,
-0.00875091552734375,
-0.0011529922485351562,
-0.015228271484375,
0.005496978759765625,
-0.034027099609375,
-0.0251617431640625,
0.0135650634765625,
-0.001186370849609375,
0.070068359375,
-0.0235748291015625,
-0.0218505859375,
-0.0211181640625,
0.06585693359375,
-0.0533447265625,
-0.0207366943359375,
0.0170440673828125,
0.0271453857421875,
-0.033050537109375,
-0.034881591796875,
-0.0195770263671875,
-0.0135498046875,
-0.01273345947265625,
-0.0007448196411132812,
-0.0184783935546875,
-0.004718780517578125,
-0.01068115234375,
0.04931640625,
0.003620147705078125,
-0.01123046875,
0.00244140625,
0.0034732818603515625,
0.00925445556640625,
0.007022857666015625,
-0.034576416015625,
0.0275115966796875,
0.00598907470703125,
-0.048065185546875,
-0.0794677734375,
-0.0236358642578125,
0.0229949951171875,
0.043792724609375,
0.0164031982421875,
-0.055877685546875,
0.018341064453125,
0.056976318359375,
0.007598876953125,
-0.015533447265625,
0.0005555152893066406,
-0.00455474853515625,
-0.01558685302734375,
-0.01128387451171875,
-0.014678955078125,
-0.025604248046875,
-0.0147705078125,
0.005527496337890625,
-0.01215362548828125,
0.049407958984375,
0.023101806640625,
-0.0040283203125,
0.0413818359375,
-0.036834716796875,
-0.04681396484375,
-0.0133819580078125,
0.016571044921875,
0.0222930908203125,
-0.0203704833984375,
0.024322509765625,
-0.0106353759765625,
-0.032867431640625,
0.012542724609375,
0.0156402587890625,
-0.0330810546875,
0.027435302734375,
0.0650634765625,
0.02459716796875,
-0.022491455078125,
-0.0606689453125,
-0.004207611083984375,
0.044891357421875,
-0.0201568603515625,
0.020843505859375,
0.01313018798828125,
-0.027252197265625,
0.038970947265625,
-0.002666473388671875,
0.02740478515625,
-0.032745361328125,
0.05731201171875,
0.003391265869140625,
0.00777435302734375,
0.006534576416015625,
-0.0030956268310546875,
-0.0005540847778320312,
-0.01384735107421875,
0.013885498046875,
-0.029266357421875,
0.00876617431640625,
0.05401611328125,
0.00829315185546875,
0.0205078125,
-0.0389404296875,
-0.024383544921875,
-0.0142974853515625,
-0.003963470458984375,
0.07244873046875,
0.044097900390625,
0.004947662353515625,
0.03875732421875,
0.0401611328125,
0.0007762908935546875,
-0.005046844482421875,
0.0426025390625,
0.015716552734375,
0.0210418701171875,
0.03173828125,
0.00598907470703125,
-0.050323486328125,
-0.01081085205078125,
0.0161285400390625,
-0.0191497802734375,
-0.040802001953125,
-0.0024776458740234375,
-0.00010818243026733398,
0.0121612548828125,
0.03143310546875,
0.0149993896484375,
0.03094482421875,
0.021820068359375,
-0.0177001953125,
-0.00841522216796875,
0.00576019287109375,
0.0214996337890625,
-0.0357666015625,
0.0254974365234375,
-0.0218658447265625,
0.0122528076171875,
0.0202178955078125,
0.0511474609375,
-0.045562744140625,
0.051727294921875,
-0.00921630859375,
0.00939178466796875,
0.03277587890625,
-0.006916046142578125,
0.0223846435546875,
0.0217132568359375,
-0.01361846923828125,
0.0022296905517578125,
0.015350341796875,
-0.038909912109375,
0.0006957054138183594,
0.024658203125,
0.0150146484375,
0.04058837890625,
-0.009552001953125,
-0.0031585693359375,
-0.007518768310546875,
-0.04656982421875,
0.036834716796875,
0.00426483154296875,
-0.03875732421875,
-0.035430908203125,
0.01042938232421875,
0.0230560302734375,
0.005809783935546875,
-0.0189208984375,
-0.0008616447448730469,
-0.0309600830078125,
-0.01206207275390625,
0.05340576171875,
-0.06292724609375,
0.01207733154296875,
0.026641845703125,
-0.041015625,
-0.0182952880859375,
-0.01052093505859375,
-0.07373046875,
-0.041412353515625,
0.0111236572265625,
-0.015380859375,
0.003757476806640625,
-0.04681396484375,
0.043121337890625,
0.0013170242309570312,
-0.0193023681640625,
0.0389404296875,
0.004405975341796875,
0.0328369140625,
0.03204345703125,
-0.04962158203125,
0.0156707763671875,
-0.036285400390625,
-0.0124969482421875,
-0.02557373046875,
-0.043121337890625,
-0.05517578125,
-0.01334381103515625,
-0.026275634765625,
-0.0017490386962890625,
-0.01103973388671875,
-0.0082244873046875,
-0.01189422607421875,
0.0518798828125,
0.0245208740234375,
0.05029296875,
-0.0022792816162109375,
0.0303802490234375,
0.000507354736328125,
0.0248260498046875,
-0.004245758056640625,
0.0213470458984375,
-0.0015592575073242188,
-0.0233612060546875,
0.004150390625,
-0.0217437744140625,
-0.01113128662109375,
-0.004150390625,
-0.0160675048828125,
0.0076141357421875,
0.0609130859375,
-0.0094451904296875,
0.02630615234375,
0.01102447509765625,
0.0112762451171875,
0.007110595703125,
-0.0285186767578125,
-0.01580810546875,
-0.030029296875,
0.06671142578125,
-0.020538330078125,
0.011474609375,
-0.0258026123046875,
-0.031646728515625,
0.06182861328125,
-0.0288238525390625,
0.037811279296875,
0.04083251953125,
-0.07391357421875,
0.060943603515625,
0.0950927734375,
0.03607177734375,
0.064697265625,
0.0015573501586914062,
0.020050048828125,
0.0231170654296875,
0.038909912109375,
-0.043914794921875,
-0.0211944580078125,
0.0306243896484375,
0.007617950439453125,
-0.0191650390625,
0.00803375244140625,
-0.021881103515625,
0.0312042236328125,
0.04278564453125,
0.05389404296875,
-0.027862548828125,
-0.01319122314453125,
0.00516510009765625,
-0.04840087890625,
0.0214385986328125,
-0.01245880126953125,
-0.021728515625,
-0.0251007080078125,
0.01971435546875,
-0.038116455078125,
-0.03277587890625,
-0.01192474365234375,
-0.0144500732421875,
-0.00818634033203125,
0.016693115234375,
0.01561737060546875,
0.0137786865234375,
-0.020172119140625,
-0.0008378028869628906,
0.0024356842041015625,
-0.0004611015319824219,
0.0214996337890625,
0.01380157470703125,
-0.047882080078125,
-0.043701171875,
-0.0240020751953125,
-0.0252685546875,
-0.00286102294921875,
-0.0288543701171875,
-0.04266357421875,
-0.0306854248046875,
0.0255279541015625,
0.032958984375,
-0.0169830322265625,
-0.006595611572265625,
0.0028324127197265625,
0.0218963623046875,
-0.05462646484375,
0.01021575927734375,
0.056365966796875,
0.07373046875,
-0.048828125,
0.043792724609375,
-0.032867431640625,
-0.0184478759765625,
-0.024169921875,
-0.043365478515625,
0.052978515625,
-0.02618408203125,
-0.0124053955078125,
0.0133209228515625,
0.0390625,
-0.006328582763671875,
-0.0234222412109375,
0.0112152099609375,
-0.10552978515625,
-0.0648193359375,
0.0081634521484375,
-0.046600341796875,
-0.0133209228515625,
-0.016021728515625,
-0.06463623046875,
0.06646728515625,
0.00698089599609375,
0.0248870849609375,
0.0157470703125,
0.01396942138671875,
-0.034698486328125,
-0.0180511474609375,
-0.0268402099609375,
0.0374755859375,
0.0147247314453125,
0.034454345703125,
-0.056060791015625,
-0.0191497802734375,
0.00963592529296875,
0.06854248046875,
0.016815185546875,
0.003177642822265625,
0.0006203651428222656,
-0.00713348388671875,
0.025787353515625,
0.043487548828125,
0.0031414031982421875,
0.01238250732421875,
-0.018218994140625,
0.01123809814453125,
0.0085601806640625,
-0.031585693359375,
0.03515625,
-0.0740966796875,
-0.0129852294921875,
-0.0032901763916015625,
0.0100860595703125,
0.007198333740234375,
0.02325439453125,
-0.00015556812286376953,
0.0082550048828125,
-0.0015163421630859375,
-0.0083465576171875,
-0.039031982421875,
0.0007872581481933594,
0.035369873046875,
-0.02288818359375,
-0.0003523826599121094,
0.01531219482421875,
-0.020721435546875,
0.04010009765625,
-0.038116455078125,
-0.0262908935546875,
0.0899658203125,
0.020538330078125,
-0.013153076171875,
-0.0083465576171875,
-0.00876617431640625,
-0.043182373046875,
0.0289306640625,
0.03302001953125,
0.0283203125,
0.028961181640625,
-0.043212890625,
-0.01276397705078125,
0.013580322265625,
0.04052734375,
-0.0360107421875,
-0.07708740234375,
0.01406097412109375,
-0.00550079345703125,
-0.0313720703125,
0.0259246826171875,
-0.03350830078125,
-0.01000213623046875,
0.048828125,
-0.0279998779296875,
-0.00310516357421875,
0.04376220703125,
-0.03582763671875,
0.0263671875,
0.076904296875,
-0.023284912109375,
0.0063934326171875,
-0.032623291015625,
-0.00885009765625,
0.0203094482421875,
0.08258056640625,
0.04052734375,
0.047698974609375,
0.01279449462890625,
-0.041046142578125,
-0.035430908203125,
0.0181427001953125,
0.00933074951171875,
0.035186767578125,
-0.0367431640625,
0.0066070556640625,
0.0198822021484375,
0.0299835205078125,
0.0207977294921875,
0.0009255409240722656,
0.04052734375,
0.0345458984375,
-0.035125732421875,
0.0003943443298339844,
0.02813720703125,
-0.031890869140625,
-0.0186309814453125,
-0.03533935546875,
0.023193359375,
0.0184783935546875,
0.0254669189453125,
-0.018096923828125,
0.01953125,
0.035430908203125,
-0.04730224609375,
0.017913818359375,
0.0031909942626953125,
-0.02685546875,
0.0082244873046875,
0.01280975341796875,
0.0450439453125,
-0.001148223876953125,
-0.06011962890625,
0.02532958984375,
-0.05419921875,
-0.08404541015625,
0.0147247314453125,
0.0242767333984375,
-0.040313720703125,
0.0311279296875,
0.0018815994262695312,
-0.004573822021484375,
-0.025054931640625,
0.0015287399291992188,
0.0194091796875,
-0.0097198486328125,
0.01250457763671875,
-0.000015556812286376953,
0.007358551025390625,
-0.02685546875,
-0.01053619384765625,
0.0733642578125,
0.0361328125,
0.04229736328125,
-0.0311126708984375,
0.038116455078125,
-0.00786590576171875,
-0.038421630859375,
0.0312042236328125,
0.0123291015625,
-0.021484375,
0.013946533203125,
-0.0028171539306640625,
-0.0217742919921875,
-0.00621795654296875,
0.07037353515625,
0.033599853515625,
-0.01078033447265625,
0.042205810546875,
0.0018100738525390625,
0.01477813720703125,
-0.029144287109375,
0.0286712646484375,
-0.00797271728515625,
-0.038330078125,
0.0258026123046875,
0.031524658203125,
-0.00556182861328125,
0.030364990234375,
0.01062774658203125,
0.0211944580078125,
0.0244598388671875,
-0.01043701171875,
0.0203094482421875,
0.0032215118408203125,
0.0185089111328125,
0.032379150390625,
0.01522064208984375,
-0.04730224609375,
-0.0287322998046875,
-0.0178985595703125,
-0.0249786376953125,
0.0203857421875,
0.038726806640625,
-0.035919189453125,
0.00864410400390625,
-0.0316162109375,
0.049591064453125,
0.0059814453125,
-0.030609130859375,
0.00025653839111328125,
0.059173583984375,
-0.034881591796875,
0.001140594482421875,
-0.0399169921875,
-0.0196990966796875,
-0.006755828857421875,
-0.0309906005859375,
0.037384033203125,
-0.0316162109375,
-0.06549072265625,
-0.114013671875,
-0.015899658203125,
0.053009033203125,
0.01641845703125,
-0.050079345703125,
0.009063720703125,
-0.006229400634765625,
0.060302734375,
-0.0117034912109375,
-0.0079498291015625,
-0.002132415771484375,
0.0017518997192382812,
-0.02252197265625,
0.0033054351806640625,
-0.036376953125,
0.0025157928466796875,
0.0096588134765625,
0.029083251953125,
0.0474853515625,
-0.0205078125,
-0.018096923828125,
0.0380859375,
0.0120849609375,
0.07000732421875,
-0.0212554931640625,
-0.02972412109375,
0.00972747802734375,
0.031951904296875,
-0.041656494140625,
-0.032012939453125,
0.001979827880859375,
-0.0209503173828125,
0.00908660888671875,
-0.03759765625,
-0.01483154296875,
-0.01812744140625,
-0.0523681640625,
-0.09405517578125,
0.06658935546875,
-0.0184326171875,
-0.039276123046875,
-0.032745361328125,
-0.00445556640625,
-0.0093231201171875,
0.0196380615234375,
0.01181793212890625,
-0.052581787109375,
-0.01922607421875,
0.01073455810546875,
-0.0005159378051757812,
-0.00921630859375,
0.0277099609375,
-0.0045318603515625,
-0.09478759765625,
-0.046142578125,
-0.05169677734375,
-0.01367950439453125,
0.01007843017578125,
0.007091522216796875,
-0.0084991455078125,
0.012603759765625,
-0.0276641845703125,
-0.0419921875,
-0.02880859375,
-0.003597259521484375,
0.02349853515625,
-0.0313720703125,
-0.034027099609375,
-0.0141754150390625,
0.046295166015625,
0.01068878173828125,
0.0281219482421875,
-0.0307464599609375,
-0.0046234130859375,
0.0194549560546875,
-0.060943603515625,
-0.017547607421875,
0.0178070068359375,
-0.054229736328125,
-0.024383544921875,
-0.0300750732421875,
-0.00818634033203125,
-0.02044677734375,
0.00563812255859375,
-0.033782958984375,
-0.0135345458984375,
0.0160369873046875,
-0.0026187896728515625,
0.01557159423828125,
-0.030548095703125,
0.0595703125,
-0.057159423828125,
-0.0443115234375,
0.016815185546875,
0.01116943359375,
-0.0163116455078125,
-0.01122283935546875,
-0.0194854736328125,
-0.030242919921875,
-0.00887298583984375,
0.0278167724609375,
-0.004009246826171875,
0.042633056640625,
-0.0288848876953125,
-0.0203857421875,
-0.01070404052734375,
0.004428863525390625,
-0.004245758056640625,
-0.00225067138671875,
0.0141754150390625,
0.0267333984375,
-0.0187225341796875,
0.05181884765625,
-0.045196533203125,
0.08477783203125,
0.006473541259765625,
0.01360321044921875,
-0.008270263671875,
0.032012939453125,
0.032867431640625,
-0.00740814208984375,
0.006855010986328125,
-0.0028057098388671875,
0.006183624267578125,
-0.046844482421875,
0.0159454345703125,
-0.010986328125,
0.01171112060546875,
0.0221710205078125
]
|
dd7270bae5efd4ff7798543bb32f7deb04c5c58b | Wordpress Stackexchange
Q: Add Title Attribute to WordPress Image the_post_thumbnail i use this code to show post's thumbnail in my site but this code cant show the title Attribute of the thumbnails.
how can i add Title Attribute to WordPress thumbnails?
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail('large');
} else {?>
<img alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php bloginfo('template_url'); ?>/img/thumbnail.png"/>
<?php }?>
you can see my site with this url : http://rokesh.ir
A: You can do that because you can add all the attributes you need:
the_post_thumbnail( 'large', array( 'title' => get_the_title() ) );
Please read on in the Function Reference of the_post_thumbnail.
| Q: Add Title Attribute to WordPress Image the_post_thumbnail i use this code to show post's thumbnail in my site but this code cant show the title Attribute of the thumbnails.
how can i add Title Attribute to WordPress thumbnails?
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail('large');
} else {?>
<img alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php bloginfo('template_url'); ?>/img/thumbnail.png"/>
<?php }?>
you can see my site with this url : http://rokesh.ir
A: You can do that because you can add all the attributes you need:
the_post_thumbnail( 'large', array( 'title' => get_the_title() ) );
Please read on in the Function Reference of the_post_thumbnail.
A: As per the Codex entry for the_post_thumbnail(), you can pass an attributes array as a parameter:
<?php the_post_thumbnail( $size, $attr ); ?>
So you would just need to define the array; here's the Codex example, modified to include the title attribute:
$post_thumbnail_attr = array(
'src' => $src,
'class' => "attachment-$size",
'alt' => 'alt here',
'title' => 'title here',
);
...which you could then pass to the_post_thumbnail():
the_post_thumbnail( 'large', $post_thumbnail_attr );
| wordpress | {
"language": "en",
"length": 173,
"provenance": "stackexchange_00019.jsonl.gz:438676",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120527"
} | [
0.05548095703125,
-0.0010013580322265625,
0.058685302734375,
0.003757476806640625,
0.0107421875,
-0.0181121826171875,
0.09710693359375,
-0.061065673828125,
-0.0012302398681640625,
0.03472900390625,
-0.0214385986328125,
-0.002330780029296875,
0.0022869110107421875,
-0.0208740234375,
-0.001659393310546875,
-0.0251617431640625,
0.047760009765625,
-0.0323486328125,
0.051666259765625,
0.0173797607421875,
0.000926971435546875,
0.05364990234375,
0.05694580078125,
0.01061248779296875,
0.00720977783203125,
-0.0264434814453125,
0.078369140625,
-0.0230255126953125,
0.0123748779296875,
-0.0181427001953125,
0.023040771484375,
0.00574493408203125,
0.031890869140625,
-0.0198516845703125,
0.0290985107421875,
0.06744384765625,
0.03363037109375,
-0.027069091796875,
0.009765625,
0.032196044921875,
0.023956298828125,
-0.00196075439453125,
0.0308837890625,
0.0147247314453125,
0.01232147216796875,
-0.0305328369140625,
0.0230712890625,
-0.0472412109375,
-0.0108795166015625,
-0.044830322265625,
0.0119476318359375,
0.0031585693359375,
0.038238525390625,
-0.053070068359375,
-0.0008687973022460938,
0.023284912109375,
-0.0225067138671875,
0.01507568359375,
0.035430908203125,
-0.006988525390625,
-0.032867431640625,
-0.0141754150390625,
0.0203704833984375,
-0.0248870849609375,
0.0036563873291015625,
0.0218353271484375,
0.021728515625,
-0.004673004150390625,
-0.01084136962890625,
-0.01617431640625,
-0.0022029876708984375,
-0.033416748046875,
-0.0033740997314453125,
-0.029205322265625,
-0.005130767822265625,
0.0232696533203125,
-0.00848388671875,
-0.0243988037109375,
0.0105743408203125,
-0.004833221435546875,
0.03656005859375,
-0.0299835205078125,
-0.004108428955078125,
0.01486968994140625,
0.03887939453125,
0.0482177734375,
0.00818634033203125,
-0.035125732421875,
-0.00005137920379638672,
-0.0153961181640625,
-0.007549285888671875,
-0.0081024169921875,
-0.043609619140625,
0.03448486328125,
0.0218963623046875,
-0.036376953125,
0.0244598388671875,
0.039306640625,
-0.01495361328125,
0.0088348388671875,
0.0130462646484375,
-0.05023193359375,
0.04541015625,
-0.0457763671875,
-0.00594329833984375,
-0.0145111083984375,
-0.01247406005859375,
-0.0191192626953125,
-0.005512237548828125,
0.052764892578125,
-0.039276123046875,
-0.0328369140625,
-0.0010547637939453125,
0.00794219970703125,
-0.036163330078125,
0.0014667510986328125,
-0.0457763671875,
0.0214691162109375,
-0.003940582275390625,
0.040924072265625,
-0.002681732177734375,
0.004077911376953125,
0.01404571533203125,
-0.004711151123046875,
0.0161590576171875,
0.0218353271484375,
-0.0244140625,
-0.034149169921875,
-0.0195770263671875,
-0.006130218505859375,
-0.004138946533203125,
0.04144287109375,
0.0271759033203125,
0.019195556640625,
-0.0184783935546875,
0.0015954971313476562,
-0.02764892578125,
-0.0258331298828125,
-0.0303497314453125,
0.00827789306640625,
-0.0308990478515625,
-0.0111846923828125,
0.053192138671875,
-0.039947509765625,
0.0121917724609375,
0.00846099853515625,
-0.012847900390625,
0.0283355712890625,
0.0122528076171875,
-0.05078125,
0.07861328125,
-0.0654296875,
-0.01538848876953125,
0.0300445556640625,
0.030548095703125,
-0.01251983642578125,
0.0286865234375,
-0.0311431884765625,
0.050994873046875,
-0.00974273681640625,
0.01593017578125,
-0.00027179718017578125,
-0.01178741455078125,
-0.0008149147033691406,
-0.01470947265625,
-0.0035858154296875,
-0.01171875,
0.0028057098388671875,
0.01244354248046875,
0.012298583984375,
0.01580810546875,
0.0177154541015625,
0.03863525390625,
-0.003803253173828125,
-0.01493072509765625,
-0.00998687744140625,
0.01357269287109375,
0.0001735687255859375,
0.02703857421875,
0.038909912109375,
-0.01027679443359375,
-0.0164642333984375,
0.055938720703125,
-0.01395416259765625,
-0.02227783203125,
-0.02130126953125,
-0.0062255859375,
0.0202789306640625,
0.0323486328125,
0.0238037109375,
-0.021331787109375,
-0.00028324127197265625,
-0.03662109375,
0.01157379150390625,
0.0099029541015625,
-0.01149749755859375,
-0.031646728515625,
-0.0116729736328125,
-0.00835418701171875,
0.0003609657287597656,
0.0225067138671875,
-0.0010499954223632812,
0.0021991729736328125,
0.01386260986328125,
-0.0046844482421875,
-0.021087646484375,
-0.0010919570922851562,
0.00580596923828125,
0.00406646728515625,
0.027191162109375,
0.00611114501953125,
-0.01129913330078125,
-0.0108184814453125,
-0.0213165283203125,
-0.017486572265625,
0.00791168212890625,
-0.0303955078125,
-0.0242156982421875,
-0.019927978515625,
0.022491455078125,
-0.0235595703125,
0.00836944580078125,
-0.03656005859375,
0.00974273681640625,
0.072509765625,
0.003650665283203125,
-0.033782958984375,
-0.0306549072265625,
0.0010852813720703125,
0.032379150390625,
-0.123291015625,
0.045684814453125,
-0.004016876220703125,
-0.00722503662109375,
-0.03656005859375,
-0.0223388671875,
-0.036895751953125,
-0.08447265625,
0.024200439453125,
0.07806396484375,
0.034393310546875,
0.0496826171875,
0.016998291015625,
0.028717041015625,
0.0692138671875,
-0.0025310516357421875,
0.0286407470703125,
-0.0193939208984375,
0.0019216537475585938,
-0.00644683837890625,
0.0251617431640625,
-0.020599365234375,
0.0244598388671875,
-0.07373046875,
0.006786346435546875,
0.05023193359375,
-0.007781982421875,
0.006687164306640625,
-0.01479339599609375,
0.0196990966796875,
-0.0005335807800292969,
-0.0012693405151367188,
0.012481689453125,
-0.0200653076171875,
0.007633209228515625,
0.05615234375,
0.0001735687255859375,
0.01360321044921875,
-0.053802490234375,
0.0589599609375,
0.0207366943359375,
-0.0172271728515625,
0.00778961181640625,
0.032073974609375,
0.00774383544921875,
0.0143280029296875,
-0.04541015625,
0.0013914108276367188,
0.0308380126953125,
0.0193939208984375,
-0.0238037109375,
-0.0244903564453125,
-0.003429412841796875,
-0.0008883476257324219,
-0.0024890899658203125,
-0.0655517578125,
0.04254150390625,
0.02276611328125,
-0.026458740234375,
-0.0014371871948242188,
0.0150604248046875,
0.02886962890625,
-0.0205535888671875,
0.02471923828125,
-0.0201873779296875,
0.0106201171875,
-0.015625,
-0.06732177734375,
0.06402587890625,
-0.0435791015625,
0.060333251953125,
0.0872802734375,
-0.02587890625,
0.044952392578125,
0.01056671142578125,
-0.022705078125,
-0.016754150390625,
0.0225067138671875,
-0.0036773681640625,
-0.0008320808410644531,
-0.06488037109375,
0.0191650390625,
0.0081634521484375,
0.062744140625,
-0.0377197265625,
-0.053375244140625,
-0.005809783935546875,
0.01343536376953125,
-0.058837890625,
-0.0423583984375,
-0.0011301040649414062,
-0.06671142578125,
-0.0176849365234375,
0.006473541259765625,
-0.042755126953125,
-0.002197265625,
0.0533447265625,
0.002197265625,
-0.036285400390625,
-0.0037174224853515625,
-0.01470184326171875,
-0.04705810546875,
-0.055023193359375,
-0.0180206298828125,
-0.0127716064453125,
0.0242767333984375,
0.00365447998046875,
0.03485107421875,
-0.0096893310546875,
-0.048309326171875,
-0.001201629638671875,
0.0196380615234375,
0.0007863044738769531,
0.01422882080078125,
0.0172576904296875,
0.015899658203125,
-0.0291748046875,
0.0158538818359375,
-0.0015544891357421875,
0.026031494140625,
-0.03253173828125,
-0.01206207275390625,
-0.0238800048828125,
0.01335906982421875,
-0.01210784912109375,
0.03570556640625,
0.044586181640625,
0.01519775390625,
0.01406097412109375,
-0.037078857421875,
-0.03741455078125,
-0.0161285400390625,
-0.06292724609375,
-0.00345611572265625,
0.05224609375,
-0.004100799560546875,
-0.031890869140625,
0.010406494140625,
-0.0018825531005859375,
0.00997161865234375,
0.022247314453125,
-0.00305938720703125,
0.01026153564453125,
-0.01033782958984375,
-0.01412200927734375,
-0.0216064453125,
-0.01023101806640625,
-0.0163726806640625,
0.021240234375,
-0.0189361572265625,
0.0321044921875,
-0.01220703125,
0.031494140625,
-0.033294677734375,
-0.01849365234375,
0.031005859375,
-0.019775390625,
0.0384521484375,
-0.040191650390625,
-0.03973388671875,
-0.01007080078125,
0.0740966796875,
-0.042236328125,
-0.024322509765625,
-0.027496337890625,
0.025604248046875,
-0.015594482421875,
-0.058746337890625,
-0.0010805130004882812,
-0.0181732177734375,
-0.07855224609375,
0.0235748291015625,
0.00467681884765625,
-0.025360107421875,
-0.01605224609375,
0.036102294921875,
-0.037567138671875,
-0.024505615234375,
0.005035400390625,
0.01186370849609375,
-0.006702423095703125,
0.058837890625,
-0.04510498046875,
0.079833984375,
-0.0217437744140625,
-0.018707275390625,
-0.11016845703125,
-0.0195770263671875,
-0.00885009765625,
0.0960693359375,
-0.0394287109375,
0.046142578125,
-0.0660400390625,
0.030242919921875,
-0.01074981689453125,
0.01290130615234375,
-0.0007305145263671875,
0.00907135009765625,
0.01351165771484375,
0.013946533203125,
0.0022125244140625,
-0.020751953125,
-0.00022971630096435547,
-0.04400634765625,
-0.0487060546875,
-0.01084136962890625,
-0.037261962890625,
0.0282440185546875,
-0.0191802978515625,
-0.0166015625,
-0.0021820068359375,
-0.00838470458984375,
0.05328369140625,
0.047576904296875,
0.01085662841796875,
0.0200347900390625,
-0.033294677734375,
-0.00312042236328125,
0.07421875,
0.00949859619140625,
-0.011566162109375,
-0.0088348388671875,
0.06396484375,
0.00885009765625,
-0.045074462890625,
-0.05517578125,
-0.00009816884994506836,
0.02691650390625,
-0.02886962890625,
0.04296875,
0.0001291036605834961,
-0.01331329345703125,
0.0511474609375,
-0.0117034912109375,
0.01189422607421875,
-0.0149383544921875,
0.03521728515625,
-0.006076812744140625,
-0.03045654296875,
0.0272216796875,
-0.002651214599609375,
0.007965087890625,
0.006175994873046875,
-0.0108642578125,
-0.017425537109375,
-0.007038116455078125,
0.036346435546875,
-0.01377105712890625,
0.03521728515625,
-0.02093505859375,
-0.02655029296875,
0.00965118408203125,
0.0021305084228515625,
0.02764892578125,
0.032562255859375,
-0.01088714599609375,
-0.0049591064453125,
-0.017822265625,
-0.0010232925415039062,
-0.031005859375,
-0.0082244873046875,
0.0017528533935546875,
0.039642333984375,
-0.0399169921875,
0.00946044921875,
-0.026092529296875,
-0.009765625,
0.061309814453125,
0.01971435546875,
-0.034027099609375,
-0.013214111328125,
-0.01148223876953125,
0.0672607421875,
-0.005954742431640625,
0.00524139404296875,
0.03875732421875,
0.046051025390625,
0.00983428955078125,
-0.006744384765625,
-0.040985107421875,
0.051849365234375,
-0.041778564453125,
0.0226593017578125,
0.02532958984375,
-0.004215240478515625,
0.026458740234375,
0.040740966796875,
0.02435302734375,
0.035858154296875,
-0.0204620361328125,
0.033599853515625,
0.007659912109375,
0.06048583984375,
0.01491546630859375,
-0.02557373046875,
-0.0133209228515625,
0.051300048828125,
-0.0147552490234375,
-0.0380859375,
0.01555633544921875,
0.01258087158203125,
0.041748046875,
-0.005649566650390625,
-0.039306640625,
0.034423828125,
-0.033966064453125,
-0.00878143310546875,
0.0022335052490234375,
-0.00859832763671875,
-0.04718017578125,
0.0006241798400878906,
0.0233154296875,
0.02178955078125,
-0.0065460205078125,
-0.0177001953125,
0.0302886962890625,
-0.0035228729248046875,
0.033233642578125,
0.0038509368896484375,
-0.006076812744140625,
0.0126953125,
0.0036029815673828125,
-0.01218414306640625,
-0.03594970703125,
-0.03729248046875,
0.0546875,
0.0166473388671875,
-0.02130126953125,
-0.023590087890625,
0.0297393798828125,
-0.0201873779296875,
0.049530029296875,
-0.02703857421875,
-0.024139404296875,
-0.01348114013671875,
0.0036334991455078125,
0.043731689453125,
0.021484375,
-0.052825927734375,
-0.006526947021484375,
-0.043548583984375,
-0.00518798828125,
0.01593017578125,
-0.00785064697265625,
-0.041748046875,
-0.02685546875,
0.0023193359375,
0.0241241455078125,
-0.01071929931640625,
0.00817108154296875,
-0.0083770751953125,
0.0258941650390625,
0.0052032470703125,
0.0628662109375,
-0.0162506103515625,
0.036041259765625,
0.016845703125,
0.0721435546875,
0.005558013916015625,
0.0038738250732421875,
-0.0145111083984375,
-0.03497314453125,
0.0242462158203125,
-0.0616455078125,
-0.040863037109375,
0.0005402565002441406,
-0.0517578125,
0.01190185546875,
0.0206451416015625,
-0.00765228271484375,
0.004848480224609375,
-0.0228271484375,
-0.0108795166015625,
-0.011749267578125,
0.0210418701171875,
-0.01580810546875,
-0.035247802734375,
0.040557861328125,
-0.03509521484375,
0.05413818359375,
-0.0132598876953125,
-0.00533294677734375,
0.0179595947265625,
-0.047149658203125,
0.013580322265625,
0.070556640625,
-0.0247802734375,
0.04791259765625,
0.1007080078125,
0.00666046142578125,
0.049072265625,
0.0460205078125,
0.0053253173828125,
0.010498046875,
0.00728607177734375,
0.004329681396484375,
-0.020416259765625,
0.06500244140625,
0.00630950927734375,
-0.027923583984375,
0.04150390625,
-0.044586181640625,
0.038238525390625,
-0.024017333984375,
0.057342529296875,
0.0225982666015625,
0.020599365234375,
0.02081298828125,
-0.0257110595703125,
0.08135986328125,
-0.008758544921875,
0.0191497802734375,
0.02484130859375,
0.048065185546875,
-0.0406494140625,
-0.02301025390625,
0.0246734619140625,
-0.01000213623046875,
-0.0020904541015625,
0.00032019615173339844,
-0.0010328292846679688,
0.0057220458984375,
-0.0926513671875,
-0.0063934326171875,
0.07098388671875,
-0.053131103515625,
-0.0013418197631835938,
0.0145111083984375,
-0.0180511474609375,
-0.01068878173828125,
-0.04266357421875,
0.01036834716796875,
-0.0187530517578125,
-0.00860595703125,
0.02764892578125,
0.032470703125,
0.0181732177734375,
0.04486083984375,
0.0115203857421875,
0.0166473388671875,
0.011199951171875,
-0.03240966796875,
0.0135345458984375,
-0.00473785400390625,
0.00930023193359375,
0.0107421875,
-0.029937744140625,
0.0053863525390625,
-0.0257110595703125,
0.01043701171875,
0.00244140625,
0.01486968994140625,
0.051177978515625,
-0.00801849365234375,
-0.038330078125,
0.0263519287109375,
-0.0018596649169921875,
-0.00815582275390625,
-0.0168304443359375,
0.0360107421875,
-0.047882080078125,
0.0070343017578125,
-0.00772857666015625,
-0.0008683204650878906,
0.0015077590942382812,
-0.019805908203125,
-0.069091796875,
0.06610107421875,
-0.0210113525390625,
0.031463623046875,
-0.01125335693359375,
0.022705078125,
0.00199127197265625,
0.0006866455078125,
-0.01454925537109375,
0.05035400390625,
-0.037994384765625,
0.0274505615234375,
-0.04510498046875,
0.010528564453125,
0.0196380615234375,
0.03173828125,
0.07525634765625,
0.0115509033203125,
-0.041473388671875,
-0.0220184326171875,
0.07330322265625,
0.07659912109375,
0.025634765625,
0.01800537109375,
-0.0154571533203125,
-0.0198516845703125,
0.005870819091796875,
-0.007076263427734375,
0.0255126953125,
-0.00580596923828125,
-0.033294677734375,
0.006916046142578125,
0.003047943115234375,
0.003936767578125,
0.01102447509765625,
-0.003086090087890625,
-0.0242919921875,
0.0033931732177734375,
0.028778076171875,
-0.0391845703125,
0.00266265869140625,
0.041534423828125,
0.00975799560546875,
0.0241546630859375,
-0.0596923828125,
-0.0037994384765625,
0.031982421875,
0.01470947265625,
0.01239013671875,
0.022613525390625,
0.0184326171875,
0.011627197265625,
0.03533935546875,
0.02044677734375,
0.061431884765625,
-0.010650634765625,
0.02178955078125,
0.02801513671875,
0.00922393798828125,
-0.03387451171875,
-0.00948333740234375,
0.04351806640625,
0.040130615234375,
-0.040252685546875,
0.0165252685546875,
0.0186767578125,
0.00862884521484375,
-0.00836181640625,
-0.05499267578125,
-0.0176239013671875,
-0.027191162109375,
-0.0019474029541015625,
-0.0222625732421875,
0.00978851318359375,
0.0574951171875,
0.03887939453125,
0.0153350830078125,
0.00504302978515625,
-0.08795166015625,
-0.00748443603515625,
-0.018890380859375,
-0.00417327880859375,
-0.00553131103515625,
0.056915283203125,
0.019866943359375,
0.05889892578125,
-0.046173095703125,
-0.020782470703125,
-0.0019550323486328125,
0.038787841796875,
-0.00901031494140625,
-0.00450897216796875,
-0.0277862548828125,
-0.062255859375,
0.0199432373046875,
0.0306549072265625,
0.046600341796875,
0.000751495361328125,
0.043060302734375,
0.036590576171875,
-0.0509033203125,
-0.0023632049560546875,
0.021514892578125,
-0.014739990234375,
0.026458740234375,
-0.00882720947265625,
0.049774169921875,
0.041168212890625,
-0.01294708251953125,
-0.0220184326171875,
0.02593994140625,
0.055084228515625,
-0.061309814453125,
0.050262451171875,
-0.022613525390625,
-0.0200653076171875,
0.0186309814453125,
-0.00791168212890625,
0.04571533203125,
-0.0261383056640625,
-0.053314208984375,
-0.00513458251953125,
0.004474639892578125,
-0.068359375,
0.0207366943359375,
0.032012939453125,
-0.044219970703125,
0.0271148681640625,
0.0184783935546875,
-0.0219573974609375,
0.02569580078125,
-0.0020389556884765625,
0.01403045654296875,
0.02191162109375,
0.017303466796875,
0.01548004150390625,
-0.03192138671875,
-0.017791748046875,
-0.01120758056640625,
0.03912353515625,
0.0290069580078125,
0.0248870849609375,
-0.0058746337890625,
0.03277587890625,
-0.0185089111328125,
0.009429931640625,
-0.0242767333984375,
-0.00885772705078125,
0.01195526123046875,
0.004955291748046875,
0.01513671875,
-0.0181121826171875,
-0.042022705078125,
0.005847930908203125,
0.0189971923828125,
-0.0067291259765625,
0.0005259513854980469,
-0.0215911865234375,
0.0211639404296875,
0.007717132568359375,
0.038421630859375,
-0.016815185546875,
-0.0214996337890625,
-0.0604248046875,
-0.031463623046875,
0.03546142578125,
0.01210784912109375,
0.0020389556884765625,
-0.0011491775512695312,
0.035736083984375,
-0.00829315185546875,
0.039276123046875,
-0.003139495849609375,
0.059722900390625,
0.04974365234375,
-0.033203125,
-0.054534912109375,
0.00258636474609375,
-0.0037384033203125,
-0.004062652587890625,
0.01495361328125,
0.036895751953125,
0.016998291015625,
-0.003673553466796875,
-0.01148223876953125,
-0.029937744140625,
0.0242156982421875,
-0.01544952392578125,
0.01041412353515625,
-0.029449462890625,
0.0162506103515625,
-0.038238525390625,
0.0041656494140625,
-0.03778076171875,
-0.08416748046875,
0.01296234130859375,
0.0258636474609375,
-0.04559326171875,
0.0016088485717773438,
-0.0762939453125,
-0.015960693359375,
0.01556396484375,
-0.004276275634765625,
-0.0090484619140625,
-0.0002570152282714844,
-0.01506805419921875,
-0.0019168853759765625,
-0.0136566162109375,
-0.043426513671875,
0.014984130859375,
0.0310516357421875,
-0.021331787109375,
-0.0276336669921875,
-0.049530029296875,
-0.0013332366943359375,
-0.04302978515625,
0.049560546875,
0.0587158203125,
-0.06048583984375,
-0.005420684814453125,
0.061279296875,
0.0579833984375,
0.1051025390625,
0.0006551742553710938,
-0.024078369140625,
0.0023555755615234375,
-0.0152435302734375,
-0.01128387451171875,
-0.055694580078125,
0.0178985595703125,
-0.076904296875,
-0.02777099609375,
-0.0189361572265625,
0.01052093505859375,
0.016510009765625,
-0.032867431640625,
-0.046356201171875,
0.050048828125,
-0.00951385498046875,
-0.0291900634765625,
-0.018768310546875,
0.00563812255859375,
-0.0189971923828125,
0.0068206787109375,
0.01012420654296875,
-0.0189971923828125,
0.01239013671875,
0.0191497802734375,
0.01519775390625,
-0.0008420944213867188,
0.03192138671875,
0.0007090568542480469,
-0.0036945343017578125,
0.01678466796875,
0.0224761962890625,
-0.02130126953125,
0.026214599609375,
-0.0308380126953125,
0.0247802734375,
0.04449462890625,
-0.043060302734375,
-0.055389404296875,
-0.02777099609375,
-0.0244903564453125,
-0.01413726806640625,
-0.0230712890625,
-0.030059814453125,
-0.024688720703125,
0.058349609375,
0.04266357421875,
0.01384735107421875,
-0.01126861572265625,
0.016387939453125,
0.0090789794921875,
-0.048736572265625,
0.00457763671875,
0.026123046875,
-0.046875,
-0.022979736328125,
0.0027065277099609375,
-0.0017528533935546875,
-0.0143890380859375,
0.007251739501953125,
-0.031494140625,
-0.01320648193359375,
-0.00789642333984375,
0.011962890625,
-0.05645751953125,
0.017425537109375,
0.096923828125,
-0.06903076171875,
-0.016815185546875,
-0.01019287109375,
0.0188751220703125,
0.024658203125,
-0.08868408203125,
-0.006206512451171875,
0.0024204254150390625,
-0.004276275634765625,
0.0189208984375,
-0.00754547119140625,
0.008575439453125,
-0.0185546875,
-0.0005240440368652344,
-0.0254669189453125,
0.025238037109375,
0.00998687744140625,
0.028045654296875,
-0.0073699951171875,
0.037628173828125,
0.020721435546875,
0.04443359375,
0.0139312744140625,
-0.0009450912475585938,
-0.002445220947265625,
0.0301361083984375,
-0.039794921875,
-0.00618743896484375,
-0.041046142578125,
-0.006778717041015625,
0.0137176513671875,
0.01515960693359375,
-0.0019006729125976562,
-0.03302001953125,
0.002994537353515625,
-0.036041259765625,
0.002285003662109375,
0.012298583984375
]
|
020ae9e6d67c2f5cd1c159fd6fd23e48cf22adf8 | Wordpress Stackexchange
Q: How to disable core and plugin updates Is there any way to disable core and plugin updates? I am modifying a plugin and bit of WordPress Core (I know its a sin to do so), but can't help it.
A: Yes you can do that…
define( 'DISALLOW_FILE_MODS', true );
Put this snippet in your wp-config.php file and you will able to disable core and plugin updates.
| Q: How to disable core and plugin updates Is there any way to disable core and plugin updates? I am modifying a plugin and bit of WordPress Core (I know its a sin to do so), but can't help it.
A: Yes you can do that…
define( 'DISALLOW_FILE_MODS', true );
Put this snippet in your wp-config.php file and you will able to disable core and plugin updates.
A: Disable Plugin updates all together
It should be as easy as that:
<?php
defined( 'ABSPATH' ) or exit;
/* Plugin Name: (#120589) Disable Plugin Updates */
remove_action( 'load-update-core.php', 'wp_update_plugins' );
Deny (or reroute) Updates for Themes/Plugins
Single core and theme updates can be deactivated by this script my Mark Jaquith:
For plugins from within some themes files
// Plugins
add_filter( 'http_request_args', 'cws_hidden_plugin_12345', 5, 2 );
function cws_hidden_plugin_12345( $r, $url )
{
if ( 0 !== strpos( $url, 'http://api.wordpress.org/plugins/update-check' ) )
return $r;
$plugins = unserialize( $r['body']['plugins'] );
unset(
$plugins->plugins[ plugin_basename( __FILE__ ) ],
$plugins->active[ array_search( plugin_basename( __FILE__ ), $plugins->active ) ]
);
$r['body']['plugins'] = serialize( $plugins );
return $r;
}
For themes from within a themes functions.php file
// Themes
add_filter( 'http_request_args', 'cws_hidden_theme_12345', 5, 2 );
function cws_hidden_theme_12345( $r, $url )
{
if ( 0 !== strpos( $url, 'http://api.wordpress.org/themes/update-check' ) )
return $r;
$themes = unserialize( $r['body']['themes'] );
unset(
$themes[ get_option( 'template' ) ],
$themes[ get_option( 'stylesheet' ) ]
);
$r['body']['themes'] = serialize( $themes );
return $r;
}
Disable specific plugins
From within any custom plugin as described in this answer here on the stack:
<?php
defined( 'ABSPATH' ) or exit;
/* Plugin Name: (#120589) Disable Aksimet Updates */
add_filter( 'site_transient_update_plugins', 'wpse120589DisableAkismetUpdates' );
function filter_plugin_updates( $value )
{
unset( $value->response['akismet/akismet.php'] );
return $value;
}
Core updates
Actually that should be as easy as that:
<?php
defined( 'ABSPATH' ) or exit;
/* Plugin Name: (#120589) Disable Core Updates */
add_filter( 'pre_site_transient_update_core', '__return_null' );
For older versions John Billion has written a complete plugin that targets them all.
Further info and fine grained control for Automatic updates
Andi Nacin just put up a post on WordPress/Make that gets into detail on that topic:
Version Control is a shut down switch:
If WordPress detects a version control system, it recognizes you know what you are doing and avoids automatic updates of any kind. It looks for Subversion, Git, Mercurial, and Bazaar, and it looks everywhere.
It works by searching two directories (ABSPATH and whatever you are updating, like WP_PLUGINS_DIR, or WP_LANG_DIR) for VCS directories (.svn, .git, .hg, .bz). And it looks a level up, too — and keeps looking until it reaches the root of the drive. So if you are running a single Subversion checkout at / or /var/www/ or /var/www/mysite.com/, the WordPress install at /var/www/mysite.com/public_html/wordpress/ will be blocked from receiving updates. Clearly, it errs on the site of caution.
The same goes for disabling the File and Themes Editor:
The DISALLOW_FILE_MODS constant blocks any kind of filesystem changes, not just by background updates but by all users as well. So, gone are the file editors; the ability to update core, themes, or plugins; and the ability to install new themes or plugins.
Single wp-config.php switch:
define( 'AUTOMATIC_UPDATER_DISABLED', (bool) true/false );
and
# Disables all core updates:
define( 'WP_AUTO_UPDATE_CORE', false );
# Enables all core updates, including minor and major:
define( 'WP_AUTO_UPDATE_CORE', true );
# Enables core updates for minor releases (default):
define( 'WP_AUTO_UPDATE_CORE', 'minor' );
More detail on the linked post.
Note: All above code is scraped during a 5 minute google search run and therefore not tested, only visually diffed/tested against the GitHub WordPress source code and GitHub search results. You have to verify the contents yourself. Also, for the future, please include such research in your question.
A: simple, don't modify the core...... modifying the core is basically forking wordpress and unless you part of a development team that can maintain a fork for a long time you are putting your client into a dead end where the only upgrade path is to redevelop the site. He might be ok with that but it is something that needs to be agreed in advance.
Anyway, disabling the automatic update will not be enough in your case and you will need to also remove all the upgrade notifications from the dashboard, or better make sure that the cient doesn't have FTP access to the server.
Same logic applies to non trivial plugins from a reputable source (example, jetpack) with the exception that in this case you might be able to maintain the fork for a long term.
To disable plugin updates and discourage anybody from trying to upgrade it manually you can just change the plugin's name and its directory.
Of course you should use a plugin name and directory name not used by another plugin, something like "${original plugin name} tailored for $client DON"T UPGRADE" as the new plugin name and ${original plugin name}-for-$client as the new directory.
| wordpress | {
"language": "en",
"length": 816,
"provenance": "stackexchange_00019.jsonl.gz:438695",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120589"
} | [
0.06524658203125,
0.006465911865234375,
0.00396728515625,
-0.0164794921875,
0.022216796875,
-0.041290283203125,
0.069091796875,
-0.005340576171875,
0.01039886474609375,
0.03472900390625,
-0.01324462890625,
-0.01873779296875,
0.031951904296875,
-0.0194091796875,
-0.0281982421875,
-0.0227203369140625,
0.039154052734375,
0.0208892822265625,
0.0289764404296875,
-0.01032257080078125,
0.0150299072265625,
0.02032470703125,
-0.0112152099609375,
0.09552001953125,
-0.01384735107421875,
0.00004011392593383789,
0.0592041015625,
-0.0036106109619140625,
-0.0123291015625,
-0.020172119140625,
0.0171661376953125,
-0.00833892822265625,
0.00307464599609375,
0.06866455078125,
-0.06536865234375,
-0.049346923828125,
-0.0287322998046875,
0.039703369140625,
0.00811767578125,
0.0119781494140625,
0.024261474609375,
-0.00717926025390625,
0.01519775390625,
0.0225830078125,
-0.0097198486328125,
-0.031280517578125,
0.0125274658203125,
-0.03924560546875,
0.04034423828125,
-0.01788330078125,
-0.01442718505859375,
0.02777099609375,
0.01045989990234375,
-0.06854248046875,
-0.030487060546875,
-0.0243682861328125,
-0.013702392578125,
0.04998779296875,
0.0295867919921875,
-0.0091705322265625,
-0.031585693359375,
-0.0002225637435913086,
0.0184173583984375,
-0.0034847259521484375,
0.048248291015625,
-0.057708740234375,
0.0084075927734375,
0.03265380859375,
-0.0855712890625,
0.059326171875,
0.096923828125,
-0.041534423828125,
0.017578125,
-0.0335693359375,
0.0194091796875,
-0.005222320556640625,
-0.01238250732421875,
-0.0098419189453125,
0.0284271240234375,
-0.0047454833984375,
0.01190185546875,
0.0022430419921875,
0.0182342529296875,
-0.00933074951171875,
0.0008311271667480469,
0.023773193359375,
0.0009984970092773438,
-0.01500701904296875,
-0.0023021697998046875,
0.037841796875,
-0.017120361328125,
0.037750244140625,
0.0111236572265625,
0.0262603759765625,
-0.01078033447265625,
0.00782012939453125,
0.0257720947265625,
0.0621337890625,
-0.035614013671875,
0.00045752525329589844,
0.01617431640625,
-0.035614013671875,
0.0201873779296875,
-0.0338134765625,
-0.020599365234375,
0.0257568359375,
0.0164642333984375,
0.006999969482421875,
0.0189361572265625,
0.0210113525390625,
-0.001300811767578125,
0.03460693359375,
-0.026275634765625,
-0.0287322998046875,
0.00591278076171875,
0.0125732421875,
-0.058868408203125,
0.037261962890625,
-0.006336212158203125,
0.00823974609375,
0.0132293701171875,
0.039947509765625,
-0.03680419921875,
0.0312042236328125,
-0.00848388671875,
-0.0109100341796875,
0.0019063949584960938,
-0.006763458251953125,
-0.053497314453125,
0.027374267578125,
-0.032867431640625,
0.000835418701171875,
0.07684326171875,
0.0643310546875,
0.0279388427734375,
-0.0170745849609375,
0.0242156982421875,
-0.01255035400390625,
-0.00641632080078125,
0.0008263587951660156,
-0.00218963623046875,
-0.004428863525390625,
0.00482940673828125,
-0.03173828125,
0.007488250732421875,
-0.0199432373046875,
-0.003337860107421875,
0.04388427734375,
0.0261077880859375,
0.003879547119140625,
0.01160430908203125,
-0.0080108642578125,
0.021240234375,
-0.004833221435546875,
0.02783203125,
-0.020111083984375,
0.051605224609375,
-0.03466796875,
-0.02374267578125,
-0.0311431884765625,
-0.0214385986328125,
-0.003101348876953125,
0.038970947265625,
0.002552032470703125,
0.0055999755859375,
0.0126190185546875,
-0.00910186767578125,
0.01216888427734375,
0.01849365234375,
0.0009002685546875,
-0.00461578369140625,
-0.011566162109375,
0.0072174072265625,
0.02642822265625,
0.0036754608154296875,
0.0302886962890625,
-0.009307861328125,
-0.037200927734375,
0.032470703125,
0.05120849609375,
0.0026397705078125,
-0.001495361328125,
0.0208282470703125,
0.018035888671875,
-0.053802490234375,
0.01512908935546875,
-0.0144500732421875,
0.040557861328125,
0.04931640625,
-0.017120361328125,
0.047393798828125,
-0.0298004150390625,
-0.00628662109375,
0.010650634765625,
-0.0124664306640625,
-0.00836944580078125,
-0.042327880859375,
0.0259857177734375,
-0.02947998046875,
-0.0238800048828125,
0.01325225830078125,
-0.0008640289306640625,
-0.023101806640625,
-0.035614013671875,
-0.10321044921875,
-0.0316162109375,
-0.0246734619140625,
0.04425048828125,
0.0169525146484375,
0.044036865234375,
0.0176544189453125,
0.041748046875,
-0.0229339599609375,
-0.034912109375,
-0.0251007080078125,
-0.003841400146484375,
-0.0174560546875,
0.0167999267578125,
0.024444580078125,
0.027313232421875,
0.013092041015625,
0.0195159912109375,
0.0088958740234375,
-0.03717041015625,
0.00313568115234375,
-0.0305328369140625,
0.0189666748046875,
-0.01483917236328125,
0.0128021240234375,
0.0077056884765625,
0.01348114013671875,
-0.00933074951171875,
0.037139892578125,
-0.0018129348754882812,
-0.0099945068359375,
-0.00891876220703125,
0.0010471343994140625,
-0.10821533203125,
-0.000331878662109375,
0.0633544921875,
0.023345947265625,
0.0108642578125,
-0.02294921875,
0.0016994476318359375,
0.033843994140625,
-0.0289764404296875,
-0.0038585662841796875,
0.0271148681640625,
0.05987548828125,
0.041473388671875,
0.0003666877746582031,
-0.037353515625,
0.042144775390625,
-0.01103973388671875,
0.04315185546875,
0.0180816650390625,
-0.01500701904296875,
0.0024356842041015625,
-0.018585205078125,
-0.0110321044921875,
0.0135498046875,
-0.016265869140625,
-0.0186309814453125,
-0.00213623046875,
0.0236663818359375,
0.007068634033203125,
0.0274810791015625,
0.02783203125,
-0.01036834716796875,
0.006381988525390625,
0.0013141632080078125,
-0.0275726318359375,
0.0015287399291992188,
0.045074462890625,
-0.006931304931640625,
-0.010467529296875,
-0.01922607421875,
-0.00559234619140625,
0.006130218505859375,
0.019561767578125,
-0.03662109375,
-0.054931640625,
-0.0073089599609375,
-0.0038909912109375,
0.020416259765625,
-0.0253753662109375,
0.045928955078125,
-0.0213623046875,
-0.035675048828125,
-0.040985107421875,
0.0080108642578125,
-0.0017652511596679688,
-0.0309906005859375,
0.00885772705078125,
0.0161285400390625,
-0.034149169921875,
-0.007778167724609375,
-0.027923583984375,
0.01104736328125,
-0.0029964447021484375,
0.043975830078125,
0.0794677734375,
0.0249481201171875,
0.01012420654296875,
0.031829833984375,
-0.012847900390625,
0.040008544921875,
0.006206512451171875,
0.007503509521484375,
0.0836181640625,
-0.11785888671875,
-0.007213592529296875,
0.00809478759765625,
0.0439453125,
-0.03375244140625,
-0.06231689453125,
-0.0224761962890625,
0.025054931640625,
-0.059783935546875,
-0.0124664306640625,
-0.04144287109375,
-0.0256500244140625,
0.0182952880859375,
0.017364501953125,
0.0004334449768066406,
-0.00838470458984375,
0.053466796875,
0.0158843994140625,
-0.046295166015625,
0.0015668869018554688,
-0.01494598388671875,
-0.0272369384765625,
-0.04913330078125,
0.004856109619140625,
0.0006589889526367188,
0.01934814453125,
-0.00467681884765625,
0.12152099609375,
0.003826141357421875,
-0.09503173828125,
-0.0176239013671875,
-0.0291900634765625,
-0.017242431640625,
0.03814697265625,
0.01300048828125,
0.0262908935546875,
-0.0011568069458007812,
0.0298309326171875,
-0.01806640625,
0.025634765625,
-0.02996826171875,
-0.038909912109375,
0.0294342041015625,
0.01904296875,
0.00939178466796875,
-0.0175933837890625,
-0.0192413330078125,
-0.0162200927734375,
-0.048614501953125,
-0.06341552734375,
-0.039581298828125,
-0.0085296630859375,
-0.0537109375,
0.00988006591796875,
0.0276031494140625,
0.00518035888671875,
-0.0127105712890625,
0.0251312255859375,
0.0108184814453125,
-0.012725830078125,
0.0247955322265625,
-0.037200927734375,
0.053680419921875,
-0.01078033447265625,
0.015106201171875,
-0.046112060546875,
0.0222625732421875,
-0.0212860107421875,
0.05133056640625,
0.00923919677734375,
-0.00016677379608154297,
-0.039764404296875,
0.03717041015625,
-0.069091796875,
0.01473236083984375,
0.040283203125,
-0.04119873046875,
-0.006298065185546875,
-0.00676727294921875,
-0.01340484619140625,
0.0246124267578125,
0.0643310546875,
-0.056243896484375,
-0.01474761962890625,
-0.003955841064453125,
0.0287628173828125,
-0.03741455078125,
-0.048065185546875,
-0.035980224609375,
-0.01194000244140625,
-0.0574951171875,
0.00974273681640625,
-0.0102691650390625,
-0.02410888671875,
-0.0017690658569335938,
-0.030120849609375,
-0.0221099853515625,
-0.03900146484375,
0.026611328125,
-0.00812530517578125,
-0.00487518310546875,
-0.00443267822265625,
-0.0186309814453125,
-0.0250244140625,
-0.0229034423828125,
0.01459503173828125,
-0.0960693359375,
-0.005718231201171875,
-0.029144287109375,
0.06024169921875,
0.0063934326171875,
0.0217132568359375,
-0.028076171875,
0.0389404296875,
-0.01387786865234375,
-0.0225372314453125,
0.00804901123046875,
0.0107421875,
0.0276947021484375,
0.04583740234375,
0.0145111083984375,
0.006717681884765625,
-0.0165863037109375,
-0.003498077392578125,
0.00018703937530517578,
0.0210418701171875,
-0.0203857421875,
-0.0279388427734375,
0.0184478759765625,
-0.019989013671875,
0.002166748046875,
-0.046295166015625,
-0.07391357421875,
0.01123809814453125,
-0.05450439453125,
0.018310546875,
-0.04754638671875,
-0.03411865234375,
0.06793212890625,
-0.016876220703125,
0.0008845329284667969,
0.0008869171142578125,
0.08929443359375,
0.00658416748046875,
-0.01499176025390625,
-0.0728759765625,
0.01238250732421875,
0.021392822265625,
0.0026683807373046875,
0.0338134765625,
-0.006702423095703125,
-0.0109710693359375,
0.034393310546875,
-0.00920867919921875,
0.0122528076171875,
-0.0325927734375,
0.062469482421875,
-0.006481170654296875,
-0.0189056396484375,
0.021575927734375,
-0.0163421630859375,
-0.0002560615539550781,
0.01947021484375,
-0.010833740234375,
-0.00418853759765625,
-0.002635955810546875,
0.0173492431640625,
-0.0027179718017578125,
-0.0004253387451171875,
-0.02386474609375,
-0.0487060546875,
0.0233612060546875,
0.0168914794921875,
0.001979827880859375,
0.0223846435546875,
-0.0060577392578125,
0.0034465789794921875,
-0.0018138885498046875,
-0.007747650146484375,
-0.0309906005859375,
0.00543212890625,
-0.032867431640625,
0.032623291015625,
-0.0262603759765625,
-0.020721435546875,
-0.0276031494140625,
-0.0225067138671875,
0.07421875,
-0.024169921875,
-0.05560302734375,
-0.00868988037109375,
0.0004482269287109375,
0.07232666015625,
0.0567626953125,
-0.034881591796875,
0.00839996337890625,
0.0265655517578125,
-0.031036376953125,
0.006282806396484375,
-0.0206451416015625,
-0.01898193359375,
-0.0307464599609375,
0.0195159912109375,
0.03826904296875,
-0.0289306640625,
0.03179931640625,
0.00948333740234375,
0.041259765625,
-0.01001739501953125,
-0.0161285400390625,
0.0301055908203125,
0.02227783203125,
-0.0105438232421875,
0.0222015380859375,
-0.005947113037109375,
0.01910400390625,
-0.06201171875,
0.01200103759765625,
-0.0214691162109375,
-0.0111083984375,
0.03875732421875,
0.020599365234375,
0.01465606689453125,
-0.01080322265625,
0.005615234375,
0.004638671875,
-0.00261688232421875,
0.039093017578125,
0.00962066650390625,
-0.0163421630859375,
-0.0284881591796875,
0.0144195556640625,
0.0462646484375,
-0.0088043212890625,
-0.006267547607421875,
-0.0156707763671875,
-0.032470703125,
-0.03338623046875,
0.01995849609375,
-0.07275390625,
0.01149749755859375,
0.036895751953125,
-0.0095672607421875,
-0.02154541015625,
0.0032520294189453125,
-0.04534912109375,
-0.0266876220703125,
-0.02239990234375,
0.01450347900390625,
0.028594970703125,
-0.0190277099609375,
0.004024505615234375,
-0.0182647705078125,
0.0174713134765625,
0.058563232421875,
0.004413604736328125,
0.06011962890625,
0.0017194747924804688,
-0.03363037109375,
-0.02215576171875,
-0.058441162109375,
-0.04254150390625,
-0.09442138671875,
-0.05133056640625,
-0.0594482421875,
0.031707763671875,
0.0260772705078125,
0.0208892822265625,
-0.0011138916015625,
-0.0364990234375,
0.016632080078125,
0.01230621337890625,
-0.0071563720703125,
0.03466796875,
-0.014068603515625,
0.056060791015625,
0.00957489013671875,
0.07513427734375,
0.024444580078125,
0.0205078125,
-0.0289459228515625,
-0.0399169921875,
0.033660888671875,
-0.042755126953125,
-0.04754638671875,
-0.0229644775390625,
-0.0189666748046875,
-0.0211334228515625,
-0.0165557861328125,
-0.01317596435546875,
-0.0165252685546875,
-0.0267333984375,
0.006542205810546875,
-0.04400634765625,
0.0241546630859375,
-0.04852294921875,
-0.0241546630859375,
-0.0254058837890625,
-0.030792236328125,
-0.032745361328125,
-0.01407623291015625,
-0.056396484375,
0.043609619140625,
0.01873779296875,
-0.006435394287109375,
0.007415771484375,
-0.0014848709106445312,
0.03155517578125,
0.043487548828125,
-0.005222320556640625,
0.0263824462890625,
0.037750244140625,
0.0172271728515625,
-0.01861572265625,
0.0242919921875,
0.004611968994140625,
-0.00652313232421875,
0.059722900390625,
0.01442718505859375,
-0.0215301513671875,
0.03668212890625,
-0.0170745849609375,
0.03924560546875,
0.055938720703125,
0.06634521484375,
-0.08966064453125,
0.0287017822265625,
-0.0020809173583984375,
0.0034027099609375,
0.082763671875,
-0.006439208984375,
-0.00302886962890625,
-0.0303955078125,
0.0249176025390625,
-0.0024871826171875,
-0.012725830078125,
-0.0056304931640625,
0.01087188720703125,
-0.0224609375,
-0.03118896484375,
0.0240325927734375,
0.0282440185546875,
-0.005222320556640625,
0.0284423828125,
-0.00704193115234375,
0.01340484619140625,
0.001983642578125,
0.01276397705078125,
-0.01372528076171875,
-0.0340576171875,
-0.035430908203125,
0.00528717041015625,
0.00829315185546875,
-0.020538330078125,
0.042633056640625,
-0.00539398193359375,
0.016357421875,
0.037261962890625,
-0.003429412841796875,
0.01015472412109375,
0.01123809814453125,
-0.03668212890625,
-0.037017822265625,
-0.054290771484375,
-0.0086822509765625,
0.0279388427734375,
-0.00975799560546875,
0.020111083984375,
0.00476837158203125,
-0.04669189453125,
-0.0208282470703125,
-0.01560211181640625,
0.0928955078125,
0.0020122528076171875,
-0.04229736328125,
0.00612640380859375,
-0.00992584228515625,
-0.008575439453125,
-0.0161285400390625,
0.00789642333984375,
-0.03131103515625,
0.0289459228515625,
-0.02105712890625,
0.03192138671875,
0.01435089111328125,
-0.010101318359375,
-0.034881591796875,
0.10797119140625,
-0.01385498046875,
0.000020384788513183594,
0.014617919921875,
0.054046630859375,
-0.017120361328125,
0.0294036865234375,
-0.005710601806640625,
0.07720947265625,
-0.019927978515625,
0.045562744140625,
-0.01462554931640625,
0.0059661865234375,
0.04522705078125,
0.0231781005859375,
0.038665771484375,
0.0173187255859375,
-0.0098114013671875,
-0.0260162353515625,
0.0227203369140625,
0.0455322265625,
0.00582122802734375,
0.017181396484375,
-0.01959228515625,
0.000774383544921875,
0.01010894775390625,
-0.00905609130859375,
0.038177490234375,
-0.038848876953125,
-0.05108642578125,
-0.01080322265625,
0.0215606689453125,
0.036346435546875,
-0.019622802734375,
0.04644775390625,
0.03570556640625,
-0.0192413330078125,
-0.014739990234375,
0.0227203369140625,
-0.0027332305908203125,
0.00980377197265625,
-0.0060577392578125,
0.030120849609375,
0.0256500244140625,
-0.012054443359375,
0.03485107421875,
0.014617919921875,
0.0173492431640625,
0.0176849365234375,
0.0232696533203125,
-0.0308837890625,
-0.00783538818359375,
0.01515960693359375,
0.0325927734375,
-0.045562744140625,
-0.0186004638671875,
-0.0089263916015625,
0.01654052734375,
-0.0175628662109375,
0.006023406982421875,
0.0279388427734375,
-0.0108795166015625,
-0.009124755859375,
-0.0171051025390625,
0.01165008544921875,
-0.018524169921875,
-0.0059967041015625,
-0.028289794921875,
-0.0109100341796875,
0.01128387451171875,
0.001800537109375,
-0.02099609375,
-0.0244140625,
0.028289794921875,
0.02740478515625,
0.01479339599609375,
-0.006252288818359375,
0.0009031295776367188,
-0.0304412841796875,
-0.005237579345703125,
0.00011724233627319336,
-0.01200103759765625,
0.01219940185546875,
0.02349853515625,
0.0178985595703125,
0.0025634765625,
-0.002811431884765625,
0.0006098747253417969,
0.061187744140625,
-0.007434844970703125,
0.00628662109375,
-0.0467529296875,
-0.07708740234375,
0.0022525787353515625,
0.04443359375,
0.0230255126953125,
0.038421630859375,
0.056854248046875,
0.0819091796875,
-0.0093841552734375,
0.006969451904296875,
0.11334228515625,
0.006023406982421875,
0.0050811767578125,
-0.035552978515625,
0.033599853515625,
0.0110321044921875,
0.01508331298828125,
-0.0196075439453125,
0.01525115966796875,
0.046356201171875,
0.0135498046875,
0.0030364990234375,
0.0194854736328125,
-0.004497528076171875,
0.023590087890625,
0.0254974365234375,
0.007251739501953125,
0.047210693359375,
-0.0005745887756347656,
0.01629638671875,
-0.0225067138671875,
-0.03369140625,
0.01934814453125,
0.02508544921875,
-0.04644775390625,
0.057830810546875,
-0.033172607421875,
-0.01032257080078125,
-0.0070343017578125,
-0.0069122314453125,
0.0199127197265625,
-0.00612640380859375,
-0.014739990234375,
-0.0167999267578125,
-0.0251922607421875,
-0.0148468017578125,
-0.029693603515625,
0.04473876953125,
0.0335693359375,
0.0645751953125,
-0.04046630859375,
0.037628173828125,
-0.006011962890625,
-0.0271148681640625,
0.0010900497436523438,
0.01898193359375,
-0.032470703125,
0.0157623291015625,
-0.0034732818603515625,
-0.01078033447265625,
-0.04583740234375,
0.0223541259765625,
0.01226806640625,
-0.0190277099609375,
0.01776123046875,
-0.02410888671875,
0.00733184814453125,
-0.00959014892578125,
-0.01654052734375,
-0.033172607421875,
-0.030731201171875,
0.038330078125,
0.010223388671875,
-0.0298004150390625,
-0.033111572265625,
0.0169525146484375,
-0.006465911865234375,
0.05194091796875,
0.0235595703125,
-0.008697509765625,
0.050750732421875,
-0.0003705024719238281,
0.042083740234375,
-0.0005278587341308594,
-0.0511474609375,
-0.016143798828125,
-0.021026611328125,
-0.02471923828125,
0.0012941360473632812,
0.032928466796875,
-0.032989501953125,
-0.0268096923828125,
-0.004848480224609375,
0.0279083251953125,
0.03314208984375,
0.0008358955383300781,
0.0197601318359375,
-0.01128387451171875,
-0.00554656982421875,
0.006000518798828125,
-0.04425048828125,
-0.0146331787109375,
-0.060546875,
-0.0143890380859375,
0.003231048583984375,
-0.027099609375,
-0.052978515625,
0.015655517578125,
-0.0009908676147460938,
0.042572021484375,
0.004039764404296875,
-0.06646728515625,
0.0134429931640625,
-0.0223846435546875,
0.0814208984375,
-0.0218505859375,
-0.0004851818084716797,
-0.027862548828125,
0.0165252685546875,
-0.004497528076171875,
-0.057403564453125,
-0.038818359375,
0.07830810546875,
-0.031707763671875,
0.0311737060546875,
0.037200927734375,
-0.03302001953125,
-0.00197601318359375,
0.03643798828125,
0.033843994140625,
0.0859375,
-0.00803375244140625,
-0.0145416259765625,
0.0040740966796875,
-0.0149688720703125,
-0.0160369873046875,
-0.0279541015625,
0.016326904296875,
-0.080078125,
-0.049346923828125,
-0.06732177734375,
0.005344390869140625,
-0.0190582275390625,
-0.0550537109375,
-0.065185546875,
-0.005657196044921875,
-0.0112762451171875,
-0.03643798828125,
-0.0197906494140625,
0.0006041526794433594,
-0.0028629302978515625,
-0.0094146728515625,
-0.0036830902099609375,
-0.0229034423828125,
-0.0292205810546875,
0.01358795166015625,
0.0193328857421875,
0.021209716796875,
-0.002834320068359375,
0.0217132568359375,
0.0161285400390625,
0.062042236328125,
0.04571533203125,
-0.0232696533203125,
-0.0206146240234375,
0.0113525390625,
0.031005859375,
0.030029296875,
-0.0216522216796875,
0.06951904296875,
0.0175323486328125,
-0.006378173828125,
-0.0260772705078125,
-0.034637451171875,
-0.033233642578125,
0.00653839111328125,
0.07427978515625,
0.0853271484375,
0.01983642578125,
-0.05609130859375,
0.0010328292846679688,
-0.03204345703125,
-0.0157012939453125,
0.0015478134155273438,
0.0086517333984375,
-0.044921875,
0.005687713623046875,
0.011688232421875,
0.002269744873046875,
0.002208709716796875,
-0.007305145263671875,
-0.00803375244140625,
-0.029998779296875,
-0.0134124755859375,
-0.0170745849609375,
-0.0031108856201171875,
0.01158905029296875,
-0.0028247833251953125,
0.00003725290298461914,
0.042327880859375,
-0.0291290283203125,
-0.0006017684936523438,
0.02392578125,
0.0153961181640625,
-0.00746917724609375,
0.02105712890625,
-0.004024505615234375,
0.02215576171875,
0.0169219970703125,
0.00824737548828125,
0.0008749961853027344,
0.004810333251953125,
0.00148773193359375,
0.0274810791015625,
0.0157623291015625,
0.031402587890625,
-0.06341552734375,
0.052276611328125,
-0.0047149658203125,
0.041839599609375,
0.004070281982421875,
-0.0161285400390625,
0.0008988380432128906,
0.01323699951171875,
-0.03302001953125,
-0.015045166015625,
-0.01099395751953125,
-0.0548095703125,
0.005672454833984375,
0.034881591796875,
0.00444793701171875,
-0.02545166015625,
0.00818634033203125,
-0.06182861328125,
0.0180511474609375,
0.000015616416931152344
]
|
2043fd0f56a2d9449f610d9b7cb1ce797fd34ec0 | Wordpress Stackexchange
Q: How to redirect to post if search results only returns one post I want to send visitors to my search.php after a search to display list of posts. If there is only one search result, user can directlyto the post in question(something like GOOGLE's I am Feeling Lucky Button)
Thank you all.
A: Add this snippet to your functions.php
function redirect_the_single_post() {
if (is_search() && is_main_query()) {
global $wp_query;
if ($wp_query->post_count == 1 && $wp_query->max_num_pages == 1) {
wp_redirect( get_permalink( $wp_query->posts['0']->ID ) );
exit;
}
}
}
add_action('template_redirect', 'redirect_the_single_post' );
hope this will help you!!
| Q: How to redirect to post if search results only returns one post I want to send visitors to my search.php after a search to display list of posts. If there is only one search result, user can directlyto the post in question(something like GOOGLE's I am Feeling Lucky Button)
Thank you all.
A: Add this snippet to your functions.php
function redirect_the_single_post() {
if (is_search() && is_main_query()) {
global $wp_query;
if ($wp_query->post_count == 1 && $wp_query->max_num_pages == 1) {
wp_redirect( get_permalink( $wp_query->posts['0']->ID ) );
exit;
}
}
}
add_action('template_redirect', 'redirect_the_single_post' );
hope this will help you!!
| wordpress | {
"language": "en",
"length": 96,
"provenance": "stackexchange_00019.jsonl.gz:438696",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120598"
} | [
0.09906005859375,
-0.02435302734375,
0.052886962890625,
-0.00865936279296875,
0.0006961822509765625,
-0.0304412841796875,
0.095458984375,
-0.059967041015625,
0.022796630859375,
0.015472412109375,
-0.0187835693359375,
0.0195159912109375,
-0.028289794921875,
-0.0302581787109375,
-0.01067352294921875,
-0.0244903564453125,
0.04449462890625,
-0.061737060546875,
0.0028533935546875,
-0.0225067138671875,
0.036956787109375,
0.004123687744140625,
0.0257568359375,
0.031463623046875,
-0.0078582763671875,
-0.0038242340087890625,
0.072265625,
-0.05841064453125,
-0.01551055908203125,
-0.05010986328125,
-0.002132415771484375,
0.055419921875,
0.044342041015625,
-0.01502227783203125,
-0.01473236083984375,
-0.00337982177734375,
-0.004840850830078125,
-0.0015153884887695312,
-0.01032257080078125,
0.0183258056640625,
0.0288238525390625,
-0.0273895263671875,
-0.04058837890625,
0.0191497802734375,
-0.0086517333984375,
-0.038299560546875,
0.0374755859375,
-0.046295166015625,
0.02001953125,
-0.021636962890625,
0.02032470703125,
-0.004634857177734375,
0.0294342041015625,
-0.042266845703125,
-0.035369873046875,
0.0088348388671875,
0.009124755859375,
-0.03448486328125,
0.028961181640625,
-0.01654052734375,
-0.0157012939453125,
-0.026824951171875,
0.03564453125,
0.00662994384765625,
-0.037384033203125,
0.020751953125,
-0.053497314453125,
-0.00567626953125,
-0.04693603515625,
-0.046875,
0.01904296875,
-0.05352783203125,
-0.0031414031982421875,
0.0263671875,
-0.025390625,
-0.051116943359375,
0.046661376953125,
-0.006011962890625,
-0.01221466064453125,
0.031463623046875,
-0.0166015625,
-0.006107330322265625,
0.0072479248046875,
-0.0579833984375,
0.0209808349609375,
-0.03192138671875,
-0.0167999267578125,
0.0140380859375,
-0.036712646484375,
-0.033935546875,
-0.03302001953125,
-0.0012159347534179688,
-0.0288238525390625,
-0.0186309814453125,
-0.040283203125,
-0.0171661376953125,
0.034698486328125,
0.043609619140625,
0.0165252685546875,
-0.006389617919921875,
-0.015167236328125,
-0.0269317626953125,
-0.0269012451171875,
-0.0238800048828125,
0.01088714599609375,
0.0192413330078125,
0.0172119140625,
-0.005840301513671875,
0.032623291015625,
0.01415252685546875,
-0.0022735595703125,
0.04742431640625,
-0.025360107421875,
-0.002590179443359375,
-0.041351318359375,
0.016021728515625,
-0.0386962890625,
-0.019989013671875,
-0.0131378173828125,
0.0130615234375,
-0.006801605224609375,
0.01300811767578125,
0.052520751953125,
-0.030029296875,
-0.01007843017578125,
-0.013153076171875,
-0.0069427490234375,
-0.0574951171875,
0.04412841796875,
-0.0169219970703125,
-0.0149383544921875,
0.0159759521484375,
0.0170745849609375,
0.0143280029296875,
-0.0030651092529296875,
0.0018186569213867188,
0.01702880859375,
0.0023288726806640625,
-0.0130767822265625,
0.0020732879638671875,
0.0260772705078125,
-0.0364990234375,
-0.0174102783203125,
0.0171051025390625,
0.04229736328125,
0.01328277587890625,
0.0257568359375,
0.0257568359375,
0.002227783203125,
-0.03271484375,
-0.0018663406372070312,
0.06109619140625,
0.0207061767578125,
-0.00806427001953125,
-0.03741455078125,
-0.053436279296875,
-0.036376953125,
-0.01181793212890625,
0.035675048828125,
-0.02520751953125,
0.0638427734375,
0.014984130859375,
0.0218963623046875,
0.0305938720703125,
-0.01129913330078125,
-0.02606201171875,
-0.061065673828125,
-0.0232696533203125,
0.003238677978515625,
0.004268646240234375,
-0.0149383544921875,
-0.0009965896606445312,
-0.0015621185302734375,
-0.042449951171875,
-0.030792236328125,
-0.01849365234375,
0.025787353515625,
-0.00431060791015625,
0.0086212158203125,
0.061279296875,
0.03131103515625,
-0.005168914794921875,
0.05548095703125,
-0.00908660888671875,
-0.046142578125,
0.10430908203125,
-0.00226593017578125,
0.0640869140625,
-0.0369873046875,
0.01232147216796875,
0.01045989990234375,
0.08984375,
-0.0264739990234375,
0.018890380859375,
-0.0169219970703125,
-0.03515625,
-0.01084136962890625,
-0.021575927734375,
-0.0213623046875,
0.021942138671875,
0.032440185546875,
0.0209503173828125,
-0.008392333984375,
0.0018129348754882812,
-0.041534423828125,
0.0196533203125,
-0.0180206298828125,
0.02569580078125,
-0.0281219482421875,
0.0233154296875,
0.023406982421875,
-0.0126190185546875,
-0.0029773712158203125,
-0.040679931640625,
0.00447845458984375,
0.0013227462768554688,
-0.017578125,
0.0103302001953125,
-0.0257415771484375,
-0.00926971435546875,
-0.006748199462890625,
-0.041534423828125,
-0.016632080078125,
0.019073486328125,
0.08489990234375,
-0.0179290771484375,
-0.0022678375244140625,
-0.038482666015625,
0.051666259765625,
0.0010509490966796875,
-0.068603515625,
0.053741455078125,
0.03607177734375,
0.0255584716796875,
-0.0241241455078125,
0.038665771484375,
-0.0073394775390625,
0.02606201171875,
-0.02166748046875,
0.03472900390625,
0.01021575927734375,
0.042999267578125,
-0.0242919921875,
0.0234832763671875,
0.027862548828125,
-0.04876708984375,
-0.0101776123046875,
0.033843994140625,
0.03448486328125,
0.054534912109375,
0.0002219676971435547,
-0.01678466796875,
0.012969970703125,
-0.08319091796875,
0.0260009765625,
0.0200347900390625,
0.0010986328125,
0.0312347412109375,
-0.03948974609375,
-0.0128936767578125,
0.006500244140625,
-0.0182952880859375,
-0.0237579345703125,
-0.01506805419921875,
-0.0299530029296875,
-0.0029506683349609375,
-0.00907135009765625,
-0.002246856689453125,
-0.038330078125,
-0.0105438232421875,
0.0318603515625,
0.0193939208984375,
-0.0004146099090576172,
0.0250701904296875,
-0.0032596588134765625,
-0.00469970703125,
-0.0136260986328125,
0.0007891654968261719,
0.01493072509765625,
-0.0007691383361816406,
-0.005096435546875,
0.01520538330078125,
-0.0225677490234375,
-0.018218994140625,
0.0053253173828125,
-0.005207061767578125,
0.005615234375,
0.01149749755859375,
0.043548583984375,
0.028839111328125,
0.046630859375,
0.0218963623046875,
0.00691986083984375,
0.02081298828125,
-0.0011320114135742188,
-0.020843505859375,
-0.006305694580078125,
-0.05999755859375,
0.04046630859375,
-0.03106689453125,
0.05938720703125,
0.060333251953125,
-0.019287109375,
0.02899169921875,
-0.018280029296875,
0.043975830078125,
-0.01143646240234375,
-0.01386260986328125,
-0.04339599609375,
-0.041656494140625,
-0.044586181640625,
-0.043426513671875,
0.0264129638671875,
0.048492431640625,
0.01016998291015625,
-0.0364990234375,
0.005237579345703125,
0.02996826171875,
-0.0821533203125,
-0.09033203125,
-0.0218505859375,
-0.06256103515625,
0.0164794921875,
0.0079345703125,
-0.01166534423828125,
-0.0219879150390625,
0.0197296142578125,
0.010101318359375,
0.018096923828125,
0.006542205810546875,
-0.04632568359375,
0.0357666015625,
-0.047119140625,
0.047760009765625,
-0.00936126708984375,
0.004749298095703125,
0.01270294189453125,
0.0211944580078125,
0.024017333984375,
-0.0248565673828125,
0.033203125,
0.09454345703125,
-0.0440673828125,
-0.0243072509765625,
-0.026031494140625,
-0.041900634765625,
-0.0231170654296875,
0.0038471221923828125,
0.0271759033203125,
-0.019683837890625,
0.025177001953125,
0.00591278076171875,
-0.0005269050598144531,
0.0023555755615234375,
0.02813720703125,
-0.0287628173828125,
-0.032073974609375,
0.02020263671875,
0.007694244384765625,
-0.0287933349609375,
-0.003322601318359375,
-0.0245208740234375,
-0.071533203125,
-0.03985595703125,
0.042694091796875,
0.01473236083984375,
-0.049560546875,
-0.02423095703125,
0.029998779296875,
-0.000522613525390625,
-0.0205230712890625,
-0.0189056396484375,
0.051116943359375,
0.0174407958984375,
0.043304443359375,
-0.01142120361328125,
0.0016450881958007812,
-0.0243377685546875,
0.007434844970703125,
-0.0094146728515625,
0.009521484375,
0.0074920654296875,
-0.0152130126953125,
-0.03741455078125,
-0.034576416015625,
0.0308685302734375,
-0.0241241455078125,
0.02215576171875,
-0.035888671875,
-0.031829833984375,
-0.0103912353515625,
0.08721923828125,
-0.040679931640625,
-0.0167388916015625,
-0.0284576416015625,
-0.004726409912109375,
0.01024627685546875,
-0.053955078125,
0.004184722900390625,
-0.025390625,
-0.089599609375,
-0.0164642333984375,
-0.023712158203125,
-0.0087127685546875,
-0.010498046875,
-0.020172119140625,
-0.038970947265625,
-0.048095703125,
0.0179901123046875,
-0.04351806640625,
0.02166748046875,
-0.01232147216796875,
0.00833892822265625,
-0.01126861572265625,
0.01325225830078125,
-0.056304931640625,
-0.0333251953125,
-0.0149078369140625,
0.04736328125,
0.00713348388671875,
-0.01134490966796875,
-0.0085906982421875,
0.0019178390502929688,
0.04205322265625,
0.0214691162109375,
0.03863525390625,
-0.0115966796875,
-0.0265655517578125,
0.022857666015625,
0.0246429443359375,
0.01155853271484375,
0.00878143310546875,
-0.0107879638671875,
-0.02362060546875,
0.0210113525390625,
0.00930023193359375,
-0.050994873046875,
-0.0123138427734375,
-0.030181884765625,
-0.003307342529296875,
-0.05694580078125,
-0.036102294921875,
0.0089569091796875,
0.01690673828125,
-0.020416259765625,
0.0169525146484375,
-0.024932861328125,
-0.04486083984375,
-0.007045745849609375,
0.01407623291015625,
-0.027801513671875,
0.016754150390625,
0.00598907470703125,
0.010284423828125,
-0.01090240478515625,
-0.0302886962890625,
0.0258636474609375,
0.020294189453125,
0.0249481201171875,
0.01079559326171875,
-0.0283966064453125,
-0.021759033203125,
0.057830810546875,
-0.014617919921875,
-0.0232696533203125,
0.005695343017578125,
0.05389404296875,
-0.01751708984375,
-0.041748046875,
0.04083251953125,
-0.05029296875,
0.00569915771484375,
0.03729248046875,
-0.002735137939453125,
-0.0137786865234375,
0.027587890625,
0.049224853515625,
-0.0116424560546875,
-0.005870819091796875,
-0.046112060546875,
-0.03485107421875,
-0.005954742431640625,
0.0501708984375,
0.0238494873046875,
0.043243408203125,
-0.0103759765625,
0.0343017578125,
0.0494384765625,
-0.0154876708984375,
0.0161285400390625,
0.0139617919921875,
0.0242462158203125,
0.0255126953125,
0.0023136138916015625,
-0.011077880859375,
-0.01207733154296875,
-0.0008716583251953125,
0.0506591796875,
0.04931640625,
-0.01800537109375,
0.0186614990234375,
-0.010894775390625,
-0.047027587890625,
-0.03521728515625,
0.01093292236328125,
0.024810791015625,
0.0118255615234375,
-0.0176239013671875,
0.0023403167724609375,
-0.00035691261291503906,
-0.012664794921875,
-0.039581298828125,
0.01236724853515625,
-0.008026123046875,
0.01314544677734375,
0.0214385986328125,
0.0726318359375,
-0.00478363037109375,
0.06475830078125,
-0.026611328125,
-0.004367828369140625,
-0.00336456298828125,
0.03350830078125,
0.0165252685546875,
0.0011167526245117188,
-0.002628326416015625,
0.005523681640625,
0.029937744140625,
-0.04150390625,
-0.010284423828125,
0.01436614990234375,
0.034576416015625,
0.006595611572265625,
-0.0012636184692382812,
0.0296630859375,
0.0070343017578125,
-0.029571533203125,
0.044830322265625,
0.041961669921875,
-0.0276031494140625,
-0.035614013671875,
-0.021453857421875,
0.018829345703125,
0.0159149169921875,
-0.001979827880859375,
-0.005290985107421875,
-0.0240478515625,
0.00797271728515625,
-0.007350921630859375,
-0.004123687744140625,
-0.011993408203125,
-0.005443572998046875,
0.0007672309875488281,
-0.043914794921875,
0.01580810546875,
-0.0125579833984375,
0.031494140625,
-0.044769287109375,
-0.0208282470703125,
0.0423583984375,
-0.0189666748046875,
0.0052642822265625,
-0.01305389404296875,
-0.0097808837890625,
0.0035686492919921875,
0.01004791259765625,
0.07257080078125,
0.023345947265625,
-0.06298828125,
-0.01413726806640625,
-0.033782958984375,
0.0039005279541015625,
0.0599365234375,
0.0013866424560546875,
-0.0248565673828125,
-0.02874755859375,
0.052825927734375,
0.043487548828125,
0.0311279296875,
-0.034088134765625,
-0.01983642578125,
-0.016143798828125,
0.0173797607421875,
0.01134490966796875,
-0.012969970703125,
0.042236328125,
-0.01296234130859375,
0.0164642333984375,
-0.00002193450927734375,
0.034637451171875,
0.0303955078125,
-0.0222930908203125,
0.0199127197265625,
-0.05853271484375,
-0.043487548828125,
0.014404296875,
-0.03271484375,
-0.003040313720703125,
-0.002231597900390625,
-0.00994110107421875,
-0.0433349609375,
0.0267486572265625,
0.019287109375,
-0.0163421630859375,
0.0034198760986328125,
0.05743408203125,
-0.017974853515625,
0.02056884765625,
0.0269012451171875,
0.021331787109375,
-0.01197052001953125,
-0.0037021636962890625,
-0.02764892578125,
0.028656005859375,
0.0017042160034179688,
-0.039825439453125,
-0.0185394287109375,
0.033843994140625,
0.07562255859375,
0.004215240478515625,
0.047576904296875,
0.01306915283203125,
0.0015459060668945312,
0.0343017578125,
-0.0147705078125,
-0.0118408203125,
0.032501220703125,
0.04119873046875,
-0.0292205810546875,
-0.0008878707885742188,
0.01995849609375,
-0.028228759765625,
-0.0124053955078125,
0.048431396484375,
0.0166778564453125,
-0.0816650390625,
0.0082855224609375,
-0.0011548995971679688,
-0.00675201416015625,
-0.0058441162109375,
-0.01085662841796875,
0.01012420654296875,
-0.0275726318359375,
0.0419921875,
0.059234619140625,
0.0009703636169433594,
0.01102447509765625,
0.0025920867919921875,
-0.0018415451049804688,
-0.0081939697265625,
0.050994873046875,
0.005908966064453125,
-0.09442138671875,
0.002269744873046875,
0.061187744140625,
-0.02886962890625,
-0.031890869140625,
-0.0196380615234375,
0.029144287109375,
-0.00972747802734375,
-0.08111572265625,
0.0219879150390625,
-0.0263519287109375,
0.035400390625,
0.0263214111328125,
-0.0017108917236328125,
0.016082763671875,
0.058868408203125,
-0.016265869140625,
0.020050048828125,
0.034698486328125,
-0.0307159423828125,
-0.034210205078125,
-0.029541015625,
0.006679534912109375,
0.0182342529296875,
-0.05316162109375,
0.040496826171875,
-0.0290679931640625,
-0.0274658203125,
-0.0193634033203125,
-0.02862548828125,
0.0760498046875,
-0.02642822265625,
-0.012664794921875,
0.015411376953125,
0.015777587890625,
-0.00888824462890625,
-0.021331787109375,
0.0005011558532714844,
-0.02337646484375,
0.00444793701171875,
-0.027191162109375,
-0.0203704833984375,
0.007778167724609375,
-0.03228759765625,
-0.057769775390625,
0.0941162109375,
0.0023403167724609375,
0.034027099609375,
0.0090179443359375,
0.028076171875,
-0.00803375244140625,
0.0304412841796875,
-0.0222320556640625,
0.0670166015625,
0.002735137939453125,
0.059417724609375,
-0.0279541015625,
-0.0039825439453125,
0.0294189453125,
0.0302886962890625,
0.0445556640625,
0.02752685546875,
-0.048858642578125,
0.0214385986328125,
0.044952392578125,
0.0278472900390625,
-0.00867462158203125,
0.04681396484375,
0.0125732421875,
0.039276123046875,
0.055908203125,
-0.03179931640625,
0.0211181640625,
0.0163726806640625,
0.007076263427734375,
0.03912353515625,
0.0225830078125,
0.0197601318359375,
0.004878997802734375,
-0.0130615234375,
-0.06866455078125,
0.005146026611328125,
0.044036865234375,
0.0305633544921875,
0.0308685302734375,
0.008819580078125,
0.019195556640625,
-0.0987548828125,
0.011962890625,
-0.03497314453125,
0.028228759765625,
-0.01336669921875,
0.0250396728515625,
0.0208587646484375,
0.021820068359375,
0.06719970703125,
-0.005954742431640625,
0.0189208984375,
0.01776123046875,
-0.024444580078125,
0.0670166015625,
0.03466796875,
0.023712158203125,
-0.03533935546875,
-0.0198211669921875,
0.032501220703125,
0.0859375,
-0.04833984375,
-0.0107879638671875,
0.00447845458984375,
0.0179901123046875,
0.02191162109375,
-0.02960205078125,
0.0206298828125,
0.0242462158203125,
0.039459228515625,
-0.0303192138671875,
-0.0025501251220703125,
0.032745361328125,
0.0084991455078125,
0.0019550323486328125,
-0.00521087646484375,
-0.01316070556640625,
-0.00881195068359375,
-0.001544952392578125,
-0.00894927978515625,
0.01508331298828125,
0.042938232421875,
-0.0177764892578125,
0.038421630859375,
-0.04931640625,
0.006870269775390625,
-0.017486572265625,
-0.0111846923828125,
0.005725860595703125,
0.0199432373046875,
-0.035888671875,
-0.0160675048828125,
0.022308349609375,
0.0465087890625,
0.021881103515625,
-0.01515960693359375,
0.0106658935546875,
0.04095458984375,
0.006580352783203125,
-0.01861572265625,
0.033050537109375,
-0.0074005126953125,
0.005214691162109375,
-0.0215301513671875,
0.00411224365234375,
0.0184783935546875,
0.0003237724304199219,
0.0011091232299804688,
0.013916015625,
0.03521728515625,
-0.0007967948913574219,
0.031494140625,
0.0023193359375,
-0.03289794921875,
0.0293426513671875,
-0.006305694580078125,
0.1112060546875,
0.02923583984375,
-0.065673828125,
-0.015838623046875,
0.0252227783203125,
-0.06878662109375,
0.02099609375,
0.044708251953125,
-0.0364990234375,
0.00833892822265625,
-0.0008578300476074219,
0.01904296875,
0.02008056640625,
-0.04864501953125,
0.022979736328125,
0.002384185791015625,
0.006710052490234375,
0.0155792236328125,
-0.06024169921875,
-0.03125,
0.007526397705078125,
0.024566650390625,
-0.0318603515625,
0.0209808349609375,
0.0160369873046875,
0.007251739501953125,
0.0055084228515625,
0.033721923828125,
-0.04132080078125,
-0.0212860107421875,
0.053192138671875,
-0.04595947265625,
-0.008636474609375,
0.01377105712890625,
-0.0401611328125,
-0.0014743804931640625,
0.0467529296875,
-0.01479339599609375,
0.005039215087890625,
-0.0057830810546875,
0.01201629638671875,
-0.0218048095703125,
0.0179443359375,
-0.0362548828125,
-0.004276275634765625,
-0.035430908203125,
-0.041107177734375,
0.033966064453125,
0.0159454345703125,
0.01727294921875,
0.048309326171875,
-0.023895263671875,
-0.045806884765625,
0.022979736328125,
-0.09027099609375,
0.00665283203125,
0.03289794921875,
0.00820159912109375,
0.022613525390625,
-0.005016326904296875,
-0.0198516845703125,
-0.00859832763671875,
0.01568603515625,
-0.054351806640625,
-0.0025482177734375,
0.0239105224609375,
-0.03411865234375,
-0.07647705078125,
-0.01430511474609375,
-0.01126861572265625,
-0.036376953125,
-0.0374755859375,
-0.001750946044921875,
-0.06182861328125,
0.045654296875,
-0.0050201416015625,
-0.01166534423828125,
-0.02392578125,
-0.0225067138671875,
0.005123138427734375,
-0.059173583984375,
0.013397216796875,
0.0018901824951171875,
0.028594970703125,
-0.020782470703125,
0.01070404052734375,
0.00844573974609375,
-0.049041748046875,
0.007568359375,
-0.019561767578125,
-0.0160369873046875,
0.021331787109375,
0.08099365234375,
-0.0543212890625,
-0.0099945068359375,
-0.0198974609375,
-0.0311279296875,
-0.0501708984375,
-0.001209259033203125,
0.040130615234375,
-0.01107025146484375,
-0.00835418701171875,
-0.0299835205078125,
-0.016632080078125,
0.0208282470703125,
-0.01378631591796875,
-0.016510009765625,
0.03045654296875,
0.0025463104248046875,
-0.0224456787109375,
-0.03253173828125,
0.0054931640625,
-0.01031494140625,
-0.0095672607421875,
0.0137939453125,
0.0017309188842773438,
0.024749755859375,
-0.0085906982421875,
-0.035614013671875,
0.058013916015625,
-0.01373291015625,
-0.0188751220703125,
-0.0282745361328125,
-0.01080322265625,
0.005069732666015625,
-0.0194091796875,
-0.0028781890869140625,
-0.004581451416015625,
-0.040374755859375,
0.01401519775390625,
0.00821685791015625,
0.0291900634765625,
0.0232696533203125,
0.0243682861328125,
-0.00031566619873046875,
0.0235443115234375,
0.00238037109375,
-0.0198211669921875,
0.00597381591796875,
-0.0165557861328125,
0.02703857421875,
0.045135498046875,
-0.0335693359375,
-0.01119232177734375,
0.004062652587890625,
-0.01168060302734375,
0.0152587890625,
-0.007328033447265625,
-0.051513671875,
-0.039581298828125,
0.036346435546875,
0.016143798828125,
0.0185699462890625,
0.00794219970703125,
-0.01410675048828125,
-0.029388427734375,
-0.05511474609375,
0.0172271728515625,
0.030792236328125,
-0.040283203125,
0.026153564453125,
0.0021495819091796875,
-0.01351165771484375,
0.0364990234375,
0.005382537841796875,
-0.0160980224609375,
0.010589599609375,
0.0054931640625,
-0.00585174560546875,
-0.063232421875,
0.0200958251953125,
0.036041259765625,
-0.0308837890625,
-0.0248260498046875,
0.01480865478515625,
-0.00495147705078125,
-0.01947021484375,
-0.0037326812744140625,
0.07049560546875,
0.07269287109375,
-0.045684814453125,
-0.046844482421875,
0.0767822265625,
-0.0281219482421875,
0.0067901611328125,
-0.040771484375,
-0.02093505859375,
0.05126953125,
0.0188140869140625,
0.05120849609375,
-0.011322021484375,
0.0019502639770507812,
0.0110626220703125,
0.035552978515625,
-0.0189971923828125,
0.07305908203125,
-0.00720977783203125,
0.057098388671875,
-0.0294647216796875,
-0.004276275634765625,
0.007110595703125,
-0.0188446044921875,
0.007778167724609375,
0.043731689453125,
0.04754638671875,
-0.0015382766723632812,
0.02911376953125,
0.0212249755859375,
0.038421630859375,
0.01360321044921875
]
|
e70cbbe18d0fddad4229bc469bfe005c06d3ef69 | Wordpress Stackexchange
Q: How to do a wp_query using "BETWEEN" with two meta_values? I'm starting with Wordpress, already achieved some queries, but this one... ugh! It's being a pain to me!
What i want to do is this part of query:
" ... WHERE "VALUE_THAT_I_WANT" BETWEEN event_start_date AND event_end_date ..."
Where "event_start_date" and "event_end_date" are meta keys ( i want to use their values, not mine!)
This is what i had so far..
$tEA = array(
'post_type' => 'event',
'meta_key' => $metaKey,
'orderby' => 'meta_value',
'order' => $order,
'posts_per_page' => $postPerPage,
'meta_query' => array(
array(
'key' => $metaKey,
'value' => $today,
'compare' => "=",
'type' => 'DATE'
),
array(
'key' => '_event_end_time'
)
)
);
A: This should work for you:
$tEA = array(
'post_type' => 'event',
// you dont need meta_key as you use meta_query
//'meta_key' => $metaKey,
'orderby' => 'meta_value',
'order' => $order,
'posts_per_page' => $postPerPage,
'meta_query' => array(
array(
'key' => $metaKey,
// value should be array of (lower, higher) with BETWEEN
'value' => array('START_DATE', 'END_DATE'),
'compare' => 'BETWEEN',
'type' => 'DATE'
),
)
);
Note that START_DATE and END_DATE should be in MySQL date format YYYY-MM-DD
| Q: How to do a wp_query using "BETWEEN" with two meta_values? I'm starting with Wordpress, already achieved some queries, but this one... ugh! It's being a pain to me!
What i want to do is this part of query:
" ... WHERE "VALUE_THAT_I_WANT" BETWEEN event_start_date AND event_end_date ..."
Where "event_start_date" and "event_end_date" are meta keys ( i want to use their values, not mine!)
This is what i had so far..
$tEA = array(
'post_type' => 'event',
'meta_key' => $metaKey,
'orderby' => 'meta_value',
'order' => $order,
'posts_per_page' => $postPerPage,
'meta_query' => array(
array(
'key' => $metaKey,
'value' => $today,
'compare' => "=",
'type' => 'DATE'
),
array(
'key' => '_event_end_time'
)
)
);
A: This should work for you:
$tEA = array(
'post_type' => 'event',
// you dont need meta_key as you use meta_query
//'meta_key' => $metaKey,
'orderby' => 'meta_value',
'order' => $order,
'posts_per_page' => $postPerPage,
'meta_query' => array(
array(
'key' => $metaKey,
// value should be array of (lower, higher) with BETWEEN
'value' => array('START_DATE', 'END_DATE'),
'compare' => 'BETWEEN',
'type' => 'DATE'
),
)
);
Note that START_DATE and END_DATE should be in MySQL date format YYYY-MM-DD
A: Didn't test it, but what about this?
$tEA = array(
'post_type' => 'event',
'meta_key' => $metaKey,
'orderby' => 'meta_value',
'order' => $order,
'posts_per_page' => $postPerPage,
'meta_query' => array(
array(
'key' => 'event_start_date',
'value' => 'VALUE_THAT_I_WANT',
'compare' => '>='
),
array(
'key' => 'event_end_date',
'value' => 'VALUE_THAT_I_WANT',
'compare' => '<='
),
array(
'key' => '_event_end_time'
)
)
);
I am not sure if you needed the other compare, if you do, just prepend it :P
A: Since WP 3.7 you can pass 'date_query' as an argument.
Example that returns posts from January 1st to February 28th:
$args = array(
'date_query' => array(
array(
'after' => 'January 1st, 2013',
'before' => array(
'year' => 2013,
'month' => 2,
'day' => 28,
),
'inclusive' => true,
),
),
'posts_per_page' => -1,
);
$query = new WP_Query( $args );
Code taken from https://codex.wordpress.org/Class_Reference/WP_Query
| wordpress | {
"language": "en",
"length": 328,
"provenance": "stackexchange_00019.jsonl.gz:438716",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120686"
} | [
0.0374755859375,
-0.005733489990234375,
0.0245208740234375,
-0.00505828857421875,
0.01457977294921875,
-0.0263671875,
0.04052734375,
-0.048187255859375,
0.056732177734375,
0.003986358642578125,
-0.0110931396484375,
-0.02899169921875,
-0.023590087890625,
-0.03753662109375,
-0.0166015625,
-0.0181732177734375,
0.0357666015625,
-0.02227783203125,
0.0302581787109375,
0.005413055419921875,
0.03253173828125,
0.035736083984375,
0.0080108642578125,
-0.016632080078125,
0.052764892578125,
-0.036651611328125,
0.09405517578125,
-0.037872314453125,
0.07464599609375,
0.005390167236328125,
0.043609619140625,
-0.08148193359375,
-0.00426483154296875,
-0.00701904296875,
0.0309295654296875,
-0.031005859375,
0.023681640625,
-0.00855255126953125,
0.023468017578125,
0.004978179931640625,
0.033294677734375,
-0.0130157470703125,
-0.060333251953125,
0.059234619140625,
-0.057281494140625,
-0.032928466796875,
0.0295867919921875,
-0.0018472671508789062,
0.00972747802734375,
0.0147247314453125,
0.0031032562255859375,
-0.00836944580078125,
-0.001956939697265625,
0.00856781005859375,
-0.00438690185546875,
0.0010614395141601562,
0.00846099853515625,
-0.0307159423828125,
0.01450347900390625,
0.00653839111328125,
-0.00922393798828125,
0.0134735107421875,
0.012420654296875,
0.00032329559326171875,
-0.0289459228515625,
0.01479339599609375,
0.04827880859375,
0.01206207275390625,
-0.005550384521484375,
-0.048431396484375,
-0.00415802001953125,
0.033111572265625,
0.006885528564453125,
-0.04534912109375,
0.0216827392578125,
0.020355224609375,
-0.0158843994140625,
-0.0031585693359375,
-0.0075836181640625,
0.0212554931640625,
-0.019195556640625,
-0.00392913818359375,
-0.00731658935546875,
-0.0460205078125,
0.0186614990234375,
-0.02606201171875,
-0.029144287109375,
0.0135040283203125,
-0.038421630859375,
-0.0386962890625,
-0.0312042236328125,
-0.0482177734375,
-0.041748046875,
0.00757598876953125,
0.004070281982421875,
-0.042877197265625,
-0.0033416748046875,
0.04443359375,
-0.03070068359375,
0.018310546875,
-0.028167724609375,
-0.00844573974609375,
0.0145416259765625,
-0.037322998046875,
0.0233612060546875,
0.0088348388671875,
-0.027923583984375,
0.0257110595703125,
0.06640625,
0.04779052734375,
0.012939453125,
0.01312255859375,
-0.029205322265625,
-0.0369873046875,
-0.007030487060546875,
0.0268402099609375,
-0.031341552734375,
0.02960205078125,
0.03424072265625,
0.00441741943359375,
0.035400390625,
0.042327880859375,
0.0151519775390625,
-0.041046142578125,
0.01434326171875,
0.002391815185546875,
-0.048126220703125,
-0.04229736328125,
-0.06536865234375,
0.0804443359375,
-0.0208282470703125,
-0.01120758056640625,
0.039215087890625,
0.024505615234375,
-0.027252197265625,
-0.024261474609375,
0.016571044921875,
-0.0297698974609375,
0.009033203125,
0.0246429443359375,
-0.0152587890625,
-0.048065185546875,
0.0160980224609375,
0.0082244873046875,
0.0011587142944335938,
0.00537109375,
0.0251007080078125,
0.01169586181640625,
-0.009674072265625,
-0.0305938720703125,
-0.0150146484375,
-0.0033283233642578125,
0.0263824462890625,
-0.005279541015625,
-0.0701904296875,
0.004138946533203125,
-0.0204010009765625,
0.006862640380859375,
-0.0148773193359375,
-0.01062774658203125,
-0.054168701171875,
0.0135498046875,
0.03045654296875,
-0.08154296875,
-0.039398193359375,
-0.042724609375,
-0.01910400390625,
-0.005878448486328125,
0.0245208740234375,
0.00907135009765625,
-0.0015392303466796875,
0.0125885009765625,
0.056884765625,
0.0260009765625,
-0.008209228515625,
0.0235137939453125,
-0.00939178466796875,
0.0005421638488769531,
0.008880615234375,
-0.0002722740173339844,
-0.022613525390625,
-0.038604736328125,
0.006496429443359375,
-0.0054168701171875,
-0.04791259765625,
0.05731201171875,
0.01422882080078125,
0.0227203369140625,
-0.0272216796875,
-0.0052490234375,
0.060516357421875,
0.053253173828125,
-0.031829833984375,
0.035125732421875,
0.0106964111328125,
-0.034515380859375,
-0.00955963134765625,
-0.002593994140625,
-0.0022449493408203125,
-0.0309906005859375,
-0.039031982421875,
0.050506591796875,
-0.058563232421875,
0.0204010009765625,
-0.08526611328125,
0.0170440673828125,
-0.02337646484375,
0.043975830078125,
-0.08160400390625,
0.0147552490234375,
0.045745849609375,
0.00007772445678710938,
-0.0345458984375,
-0.0020313262939453125,
0.037994384765625,
-0.006946563720703125,
0.0135498046875,
0.046417236328125,
-0.01158905029296875,
0.031341552734375,
-0.035125732421875,
-0.0298919677734375,
-0.0163116455078125,
0.0110931396484375,
0.055023193359375,
-0.0172119140625,
-0.0025997161865234375,
-0.02142333984375,
0.052825927734375,
0.005443572998046875,
-0.02911376953125,
0.0074615478515625,
0.0418701171875,
0.006439208984375,
-0.01861572265625,
0.038787841796875,
0.0467529296875,
-0.01529693603515625,
-0.020355224609375,
0.0184783935546875,
0.0361328125,
0.06890869140625,
0.017608642578125,
-0.0008630752563476562,
0.039886474609375,
-0.06463623046875,
0.01259613037109375,
-0.04254150390625,
-0.0102996826171875,
0.0116119384765625,
-0.0157470703125,
-0.0114288330078125,
0.041656494140625,
0.0263519287109375,
-0.0178375244140625,
0.036712646484375,
-0.01412200927734375,
-0.0030231475830078125,
0.009765625,
0.00981903076171875,
-0.0120086669921875,
-0.0101318359375,
0.00656890869140625,
-0.013214111328125,
0.04583740234375,
-0.026763916015625,
0.03961181640625,
0.020355224609375,
-0.00402069091796875,
-0.0273284912109375,
0.0018529891967773438,
0.010467529296875,
-0.001712799072265625,
-0.004215240478515625,
-0.057586669921875,
0.0289459228515625,
0.0024623870849609375,
0.03289794921875,
-0.02557373046875,
-0.007297515869140625,
-0.01393890380859375,
0.026763916015625,
-0.04010009765625,
-0.01345062255859375,
-0.0095672607421875,
-0.01047515869140625,
-0.006603240966796875,
0.0196533203125,
-0.003025054931640625,
-0.028350830078125,
0.010650634765625,
0.000606536865234375,
-0.0565185546875,
0.0498046875,
-0.0005393028259277344,
-0.042755126953125,
0.00823974609375,
-0.01561737060546875,
0.033294677734375,
-0.035797119140625,
0.036346435546875,
0.037078857421875,
-0.03173828125,
0.0026035308837890625,
-0.01513671875,
0.01459503173828125,
-0.0238189697265625,
0.004108428955078125,
-0.02081298828125,
-0.032928466796875,
-0.0205841064453125,
-0.0007805824279785156,
0.0399169921875,
0.0193023681640625,
0.05816650390625,
-0.004337310791015625,
0.0268096923828125,
0.0309600830078125,
-0.06561279296875,
-0.11688232421875,
-0.015777587890625,
-0.04058837890625,
-0.040252685546875,
-0.00662994384765625,
-0.02630615234375,
0.0293426513671875,
-0.01561737060546875,
-0.0026912689208984375,
-0.06591796875,
-0.0169525146484375,
-0.0357666015625,
-0.07452392578125,
-0.028076171875,
0.0106658935546875,
-0.0016765594482421875,
0.00737762451171875,
0.0086669921875,
0.0657958984375,
-0.00768280029296875,
-0.09344482421875,
-0.057098388671875,
0.0144195556640625,
-0.049407958984375,
-0.0178070068359375,
-0.001079559326171875,
-0.0218353271484375,
0.0283966064453125,
-0.019744873046875,
0.059356689453125,
0.034698486328125,
-0.03192138671875,
0.01140594482421875,
0.0176849365234375,
0.0217437744140625,
0.046722412109375,
-0.0050201416015625,
-0.04071044921875,
0.04522705078125,
0.033233642578125,
-0.017120361328125,
0.0011777877807617188,
-0.038177490234375,
-0.0537109375,
0.00214385986328125,
0.0718994140625,
-0.004138946533203125,
0.006107330322265625,
-0.050750732421875,
-0.01253509521484375,
-0.0146331787109375,
0.016387939453125,
-0.047210693359375,
0.0297698974609375,
-0.00417327880859375,
0.009063720703125,
-0.01727294921875,
-0.01934814453125,
-0.0350341796875,
0.025787353515625,
-0.0179595947265625,
-0.00276947021484375,
-0.01641845703125,
0.0055389404296875,
-0.021759033203125,
-0.01861572265625,
0.06463623046875,
0.0254364013671875,
0.020751953125,
-0.041534423828125,
-0.055908203125,
-0.0472412109375,
0.049224853515625,
-0.0016145706176757812,
-0.0209503173828125,
-0.006862640380859375,
-0.00882720947265625,
0.0021686553955078125,
0.031280517578125,
-0.026763916015625,
0.0074462890625,
-0.07379150390625,
-0.00469207763671875,
-0.01194000244140625,
-0.0206451416015625,
-0.0189208984375,
-0.01039886474609375,
-0.03485107421875,
-0.04559326171875,
0.0233306884765625,
0.020416259765625,
-0.0129241943359375,
0.0396728515625,
-0.0266876220703125,
0.027618408203125,
-0.00894927978515625,
0.01708984375,
-0.0377197265625,
-0.006435394287109375,
-0.0021114349365234375,
0.03765869140625,
0.018157958984375,
-0.02032470703125,
-0.0011806488037109375,
0.0291595458984375,
0.0113372802734375,
-0.0126190185546875,
0.045684814453125,
0.00859832763671875,
0.026336669921875,
-0.001800537109375,
0.023529052734375,
-0.04461669921875,
-0.0347900390625,
-0.046539306640625,
0.022430419921875,
-0.010772705078125,
-0.023162841796875,
-0.00876617431640625,
-0.025421142578125,
0.011932373046875,
-0.0204620361328125,
-0.0023860931396484375,
0.025665283203125,
0.03533935546875,
-0.03485107421875,
0.0244293212890625,
0.0018873214721679688,
-0.0362548828125,
0.02203369140625,
0.0318603515625,
-0.038970947265625,
0.01349639892578125,
0.037750244140625,
0.01383209228515625,
-0.039581298828125,
-0.05206298828125,
-0.0235595703125,
0.00865936279296875,
-0.00960540771484375,
0.0197906494140625,
-0.0181427001953125,
-0.01064300537109375,
0.036163330078125,
-0.029052734375,
0.0217132568359375,
-0.0175018310546875,
0.052093505859375,
-0.007427215576171875,
-0.0261993408203125,
0.034149169921875,
-0.033843994140625,
-0.0192108154296875,
0.0286407470703125,
0.0033702850341796875,
-0.03839111328125,
-0.01261138916015625,
0.048004150390625,
0.00547027587890625,
0.01293182373046875,
-0.0288848876953125,
-0.0164794921875,
-0.00185394287109375,
0.007904052734375,
0.0201568603515625,
0.0192718505859375,
-0.006805419921875,
-0.02215576171875,
0.00930023193359375,
0.003231048583984375,
0.01386260986328125,
0.00366973876953125,
-0.0213623046875,
0.016876220703125,
0.0223541259765625,
-0.005168914794921875,
0.01265716552734375,
0.0013284683227539062,
0.03369140625,
0.00818634033203125,
-0.0119781494140625,
-0.0233917236328125,
-0.0194244384765625,
-0.0082244873046875,
0.0013093948364257812,
-0.04144287109375,
0.00009757280349731445,
0.0157318115234375,
-0.006195068359375,
0.003391265869140625,
-0.04742431640625,
0.00334930419921875,
-0.0166473388671875,
-0.005863189697265625,
-0.0218048095703125,
-0.003276824951171875,
-0.01093292236328125,
0.08270263671875,
-0.055511474609375,
0.057220458984375,
-0.0163116455078125,
0.0152130126953125,
0.032928466796875,
0.032135009765625,
0.038482666015625,
-0.04376220703125,
-0.0299530029296875,
0.04034423828125,
-0.0176544189453125,
-0.005615234375,
-0.032562255859375,
0.01171112060546875,
-0.0178070068359375,
-0.0280914306640625,
0.03857421875,
0.02886962890625,
0.054107666015625,
-0.0345458984375,
0.006908416748046875,
0.0755615234375,
0.0338134765625,
-0.01261138916015625,
-0.0179901123046875,
0.0075225830078125,
0.0667724609375,
0.0088653564453125,
0.0531005859375,
0.026031494140625,
0.07586669921875,
-0.01467132568359375,
0.06842041015625,
-0.018890380859375,
-0.0287933349609375,
0.0149383544921875,
-0.0076904296875,
-0.0236663818359375,
0.0357666015625,
0.000995635986328125,
-0.00829315185546875,
-0.0213470458984375,
0.056060791015625,
-0.06793212890625,
0.034759521484375,
-0.05828857421875,
0.0528564453125,
-0.07928466796875,
0.01824951171875,
0.007537841796875,
0.037445068359375,
-0.013336181640625,
-0.00469970703125,
-0.05169677734375,
-0.0077056884765625,
0.0020599365234375,
-0.0236358642578125,
-0.0160675048828125,
-0.0004343986511230469,
0.0082855224609375,
0.0443115234375,
-0.007061004638671875,
-0.035430908203125,
0.0196075439453125,
-0.034088134765625,
-0.0292510986328125,
0.0162811279296875,
0.0121307373046875,
0.049346923828125,
-0.03045654296875,
0.06787109375,
0.019775390625,
0.0104827880859375,
-0.0372314453125,
-0.026031494140625,
0.0236663818359375,
-0.05279541015625,
-0.03564453125,
-0.0283966064453125,
-0.07012939453125,
-0.0117034912109375,
0.01235198974609375,
-0.01143646240234375,
0.053558349609375,
-0.022918701171875,
0.0052947998046875,
-0.006771087646484375,
-0.01268768310546875,
-0.051544189453125,
0.005298614501953125,
0.043212890625,
-0.03350830078125,
0.00656890869140625,
-0.004039764404296875,
-0.0032558441162109375,
0.021209716796875,
-0.026885986328125,
0.0308990478515625,
0.035430908203125,
-0.0135345458984375,
0.048919677734375,
0.04998779296875,
0.00916290283203125,
0.041259765625,
0.00041413307189941406,
0.0225982666015625,
0.0121612548828125,
0.027984619140625,
0.007404327392578125,
0.00980377197265625,
0.057464599609375,
0.005565643310546875,
-0.008819580078125,
0.02606201171875,
-0.0251007080078125,
-0.0176544189453125,
0.0276336669921875,
-0.00653839111328125,
-0.031341552734375,
-0.0178070068359375,
-0.01824951171875,
-0.0105438232421875,
0.01226043701171875,
-0.002635955810546875,
-0.007099151611328125,
-0.0086212158203125,
-0.01050567626953125,
-0.014678955078125,
-0.041351318359375,
-0.02386474609375,
0.00893402099609375,
-0.0003459453582763672,
-0.038543701171875,
0.02508544921875,
-0.003192901611328125,
-0.0289764404296875,
0.01294708251953125,
0.0016145706176757812,
-0.007171630859375,
-0.0279388427734375,
0.0122833251953125,
-0.0211181640625,
-0.022125244140625,
-0.0892333984375,
-0.034912109375,
-0.01983642578125,
-0.0163421630859375,
-0.01172637939453125,
-0.016265869140625,
0.058837890625,
0.021331787109375,
0.005985260009765625,
-0.05108642578125,
0.004901885986328125,
0.01873779296875,
-0.0146484375,
-0.010589599609375,
-0.00389862060546875,
-0.020477294921875,
0.006252288818359375,
0.00865936279296875,
-0.027557373046875,
-0.0263519287109375,
-0.0139923095703125,
-0.005401611328125,
0.068115234375,
0.0019969940185546875,
-0.03228759765625,
0.035858154296875,
0.044708251953125,
-0.034210205078125,
0.046356201171875,
0.042144775390625,
-0.0157928466796875,
-0.0223388671875,
0.0361328125,
-0.032989501953125,
-0.03173828125,
0.0158233642578125,
-0.039703369140625,
0.07110595703125,
-0.007183074951171875,
-0.0035858154296875,
0.01316070556640625,
0.049591064453125,
-0.032623291015625,
0.0077667236328125,
-0.0193634033203125,
0.059967041015625,
0.00838470458984375,
0.0355224609375,
-0.061065673828125,
-0.031524658203125,
0.005176544189453125,
0.07244873046875,
0.033050537109375,
0.0029659271240234375,
-0.0293121337890625,
0.0018072128295898438,
0.07220458984375,
0.05316162109375,
0.0087127685546875,
0.0288848876953125,
0.03948974609375,
0.041107177734375,
0.06292724609375,
-0.016265869140625,
0.056732177734375,
-0.0615234375,
0.01137542724609375,
0.04107666015625,
0.00109100341796875,
-0.00582122802734375,
-0.008819580078125,
-0.0302886962890625,
-0.0005927085876464844,
-0.01418304443359375,
-0.0009675025939941406,
-0.032562255859375,
0.04205322265625,
-0.01348876953125,
0.04736328125,
-0.04144287109375,
-0.0516357421875,
0.00492095947265625,
0.037384033203125,
0.03533935546875,
0.035614013671875,
0.062347412109375,
0.0269775390625,
0.035247802734375,
0.002300262451171875,
0.03045654296875,
-0.01468658447265625,
-0.0048980712890625,
0.0494384765625,
0.0099334716796875,
0.002185821533203125,
-0.06292724609375,
0.0171966552734375,
0.0777587890625,
0.0792236328125,
-0.04644775390625,
0.01654052734375,
0.0015287399291992188,
-0.00786590576171875,
-0.00989532470703125,
-0.063720703125,
-0.0106048583984375,
0.02191162109375,
0.0045623779296875,
-0.023468017578125,
0.0028533935546875,
0.03192138671875,
-0.01531219482421875,
0.014617919921875,
0.05206298828125,
-0.031341552734375,
0.0166473388671875,
-0.05322265625,
0.037689208984375,
0.0238800048828125,
0.0205078125,
-0.0157623291015625,
0.030517578125,
0.03521728515625,
0.003726959228515625,
-0.02374267578125,
0.036407470703125,
-0.01540374755859375,
0.0318603515625,
-0.0243072509765625,
0.00943756103515625,
-0.03314208984375,
0.0328369140625,
0.0161895751953125,
0.0217742919921875,
0.047149658203125,
0.053375244140625,
0.00042510032653808594,
-0.0074462890625,
0.0283966064453125,
-0.0125579833984375,
-0.044219970703125,
-0.044158935546875,
0.00984954833984375,
0.01345062255859375,
0.01250457763671875,
0.01275634765625,
0.038909912109375,
0.0009174346923828125,
0.00612640380859375,
0.0266876220703125,
0.00646209716796875,
0.035552978515625,
-0.005443572998046875,
-0.0024566650390625,
-0.040740966796875,
0.0193328857421875,
-0.03375244140625,
0.00027632713317871094,
-0.023101806640625,
-0.0253448486328125,
0.01018524169921875,
0.028167724609375,
0.0002524852752685547,
-0.0012464523315429688,
-0.01345062255859375,
-0.00732421875,
0.0140838623046875,
0.00921630859375,
-0.0010404586791992188,
0.0250091552734375,
0.01427459716796875,
0.00612640380859375,
-0.0606689453125,
-0.034393310546875,
0.00833892822265625,
0.0130157470703125,
-0.013336181640625,
-0.0244903564453125,
0.0423583984375,
0.0011835098266601562,
0.01448822021484375,
-0.0023403167724609375,
0.0200653076171875,
-0.018524169921875,
0.06964111328125,
-0.007709503173828125,
-0.01439666748046875,
-0.03363037109375,
0.07147216796875,
0.0076446533203125,
0.038177490234375,
-0.057098388671875,
-0.01535797119140625,
-0.0413818359375,
0.018310546875,
0.0128631591796875,
0.0081634521484375,
-0.01430511474609375,
0.00043582916259765625,
0.001850128173828125,
-0.020294189453125,
0.03131103515625,
-0.00978851318359375,
-0.017547607421875,
0.0170135498046875,
0.022857666015625,
-0.01311492919921875,
0.036376953125,
-0.003070831298828125,
0.059967041015625,
0.0333251953125,
-0.0241241455078125,
0.04449462890625,
0.0262451171875,
-0.020660400390625,
0.054351806640625,
0.0052947998046875,
0.01033782958984375,
0.01280975341796875,
0.01096343994140625,
0.0011501312255859375,
0.037811279296875,
0.03204345703125,
0.018951416015625,
-0.010467529296875,
0.036590576171875,
-0.047882080078125,
-0.03155517578125,
0.01169586181640625,
-0.026153564453125,
-0.02899169921875,
0.002445220947265625,
0.0008463859558105469,
0.006938934326171875,
-0.01467132568359375,
-0.017608642578125,
-0.0041961669921875,
0.020904541015625,
0.0179290771484375,
-0.0199432373046875,
0.0143280029296875,
-0.004627227783203125,
-0.027496337890625,
0.0229644775390625,
-0.038726806640625,
-0.0081024169921875,
0.01300048828125,
-0.0175628662109375,
-0.033905029296875,
-0.0374755859375,
0.0262603759765625,
-0.0394287109375,
-0.01139068603515625,
0.038299560546875,
-0.0010423660278320312,
-0.0670166015625,
-0.019012451171875,
-0.029022216796875,
0.01025390625,
-0.0185699462890625,
0.004669189453125,
0.046905517578125,
0.013275146484375,
-0.06304931640625,
-0.07745361328125,
0.01056671142578125,
-0.02197265625,
0.01641845703125,
-0.00560760498046875,
-0.0005340576171875,
0.016204833984375,
-0.035675048828125,
-0.10125732421875,
0.0849609375,
-0.025634765625,
-0.019317626953125,
-0.043121337890625,
-0.0306396484375,
0.01132965087890625,
0.0029354095458984375,
-0.01383209228515625,
-0.031707763671875,
-0.06304931640625,
0.007415771484375,
0.0281524658203125,
0.0115203857421875,
0.0113983154296875,
0.042510986328125,
-0.075927734375,
0.017120361328125,
-0.0221405029296875,
0.02447509765625,
-0.026702880859375,
0.02459716796875,
0.019256591796875,
0.02734375,
-0.0033473968505859375,
0.00496673583984375,
0.019134521484375,
-0.0266571044921875,
0.0225982666015625,
-0.038787841796875,
-0.060821533203125,
0.0011663436889648438,
0.0400390625,
0.07794189453125,
0.032562255859375,
-0.068603515625,
0.01849365234375,
-0.041534423828125,
0.01081085205078125,
-0.0209503173828125,
-0.01366424560546875,
-0.04693603515625,
-0.045806884765625,
0.01229095458984375,
-0.024566650390625,
0.0253448486328125,
-0.01336669921875,
-0.01412200927734375,
0.00029659271240234375,
-0.00620269775390625,
-0.0090179443359375,
-0.039276123046875,
0.0224609375,
0.033050537109375,
-0.03692626953125,
-0.00665283203125,
-0.0244140625,
0.0072021484375,
0.003875732421875,
-0.0361328125,
-0.001399993896484375,
0.0086212158203125,
0.05194091796875,
0.000008046627044677734,
0.041107177734375,
-0.0118255615234375,
0.04541015625,
-0.007160186767578125,
-0.03619384765625,
0.01293182373046875,
-0.0031299591064453125,
0.0086669921875,
-0.0028018951416015625,
-0.002758026123046875,
0.03216552734375,
0.020751953125,
0.001888275146484375,
0.106201171875,
0.0037937164306640625,
0.05108642578125,
-0.0269927978515625,
-0.011627197265625,
0.00614166259765625,
-0.01261138916015625,
0.004024505615234375,
-0.01552581787109375,
-0.0235748291015625,
-0.0283203125,
-0.0193939208984375,
0.021514892578125,
-0.0171051025390625,
0.0062408447265625
]
|
49c82ac805bfe7dd45eeb7e68020e3317affab8f | Wordpress Stackexchange
Q: Overwrite rewrite-slug of built in post-type 'post' I need to change the rewrite-slug of the built in post-type 'post' to 'example.com/magazine/news/any-nice-news-item'.
When I re-register the post-type 'post' and set the rewrite-slug to 'magazine/news' it works fine. But now I'm not sure about any side-effects. Does anybody have any positive or negative experience with that?
Here is the code:
register_post_type( 'post', array(
'labels' => array(
'name_admin_bar' => _x( 'Post', 'add new on admin bar' ),
),
'public' => true,
/* internal use only. don't use this when registering your own post type. */
'_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
'capability_type' => 'post',
'map_meta_cap' => true,
'hierarchical' => false,
'rewrite' => array('slug' => 'magazine/news'),
'query_var' => false,
'delete_with_user' => true,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats' ),
) );
A: You do not need to re register post type.
Symply go in you backend, Settings > Permalinks and set the permalink structure to a custom one: /magazine/news/%postname%/ then save changes.
See image below:
| Q: Overwrite rewrite-slug of built in post-type 'post' I need to change the rewrite-slug of the built in post-type 'post' to 'example.com/magazine/news/any-nice-news-item'.
When I re-register the post-type 'post' and set the rewrite-slug to 'magazine/news' it works fine. But now I'm not sure about any side-effects. Does anybody have any positive or negative experience with that?
Here is the code:
register_post_type( 'post', array(
'labels' => array(
'name_admin_bar' => _x( 'Post', 'add new on admin bar' ),
),
'public' => true,
/* internal use only. don't use this when registering your own post type. */
'_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */
'capability_type' => 'post',
'map_meta_cap' => true,
'hierarchical' => false,
'rewrite' => array('slug' => 'magazine/news'),
'query_var' => false,
'delete_with_user' => true,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats' ),
) );
A: You do not need to re register post type.
Symply go in you backend, Settings > Permalinks and set the permalink structure to a custom one: /magazine/news/%postname%/ then save changes.
See image below:
A: I wouldn't recommend reregistering the 'posts' post-type. Modifying _builtins can be a headache.
It may be best to simply change the "category Permalink" under Settings > Permalinks to:
'magazine/news/'
Or to create a subcategory named "news" with a parent category named "magazine", and use something like the "WP Htaccess Control" plugin to strip out the "category/" portion of the slug from posts.
A: The options above re-write every URL to be under that slug. You need to hook in with the registered_post_type to adjust it "solely" for the 'post' post type.
| wordpress | {
"language": "en",
"length": 272,
"provenance": "stackexchange_00019.jsonl.gz:438717",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120689"
} | [
0.00994873046875,
-0.01393890380859375,
0.0105133056640625,
-0.010101318359375,
-0.0245513916015625,
-0.0007500648498535156,
0.0225067138671875,
-0.0294036865234375,
-0.022735595703125,
-0.00946044921875,
0.0244598388671875,
-0.003612518310546875,
-0.0135345458984375,
-0.06201171875,
0.05364990234375,
-0.002269744873046875,
0.0239410400390625,
-0.032440185546875,
0.0049285888671875,
-0.03857421875,
0.002178192138671875,
-0.021881103515625,
0.054107666015625,
0.045989990234375,
0.01480865478515625,
-0.017730712890625,
0.0384521484375,
-0.03411865234375,
-0.0125274658203125,
-0.04510498046875,
0.0243377685546875,
0.022186279296875,
0.0195159912109375,
-0.009490966796875,
0.0143280029296875,
-0.0012493133544921875,
0.023590087890625,
-0.00429534912109375,
0.0167083740234375,
-0.0011186599731445312,
0.023651123046875,
-0.0170440673828125,
0.03082275390625,
0.01262664794921875,
0.00955963134765625,
-0.03497314453125,
0.0297088623046875,
-0.0406494140625,
0.01329803466796875,
-0.046142578125,
-0.0111083984375,
0.0396728515625,
0.006641387939453125,
-0.00908660888671875,
-0.0035152435302734375,
0.004413604736328125,
-0.01824951171875,
-0.005344390869140625,
0.0362548828125,
0.00201416015625,
-0.003208160400390625,
-0.0214080810546875,
0.028045654296875,
-0.006244659423828125,
0.003826141357421875,
-0.00862884521484375,
-0.007022857666015625,
0.0216064453125,
-0.044586181640625,
-0.00035834312438964844,
0.040618896484375,
-0.03857421875,
0.01190185546875,
-0.0162200927734375,
-0.0219268798828125,
0.0213775634765625,
-0.00612640380859375,
0.018218994140625,
0.00995635986328125,
-0.0199432373046875,
-0.00286865234375,
0.00728607177734375,
0.0269775390625,
-0.034698486328125,
0.0093994140625,
-0.03045654296875,
-0.01482391357421875,
-0.0063934326171875,
-0.04937744140625,
-0.0167083740234375,
-0.035308837890625,
-0.0323486328125,
-0.0079345703125,
0.005870819091796875,
-0.017486572265625,
-0.00455474853515625,
0.049591064453125,
0.054229736328125,
0.01375579833984375,
0.025115966796875,
0.0015087127685546875,
-0.05810546875,
0.0440673828125,
-0.0482177734375,
0.030517578125,
0.01541900634765625,
-0.022857666015625,
0.015411376953125,
0.07635498046875,
0.0276336669921875,
0.008270263671875,
0.0679931640625,
-0.027191162109375,
0.00400543212890625,
-0.051513671875,
0.06292724609375,
-0.033538818359375,
-0.0283355712890625,
-0.0015735626220703125,
0.04803466796875,
0.0183868408203125,
0.040069580078125,
0.03173828125,
-0.033416748046875,
-0.0194549560546875,
-0.007747650146484375,
-0.00838470458984375,
-0.08282470703125,
0.014190673828125,
0.038604736328125,
-0.025665283203125,
0.00914764404296875,
0.0760498046875,
0.0158233642578125,
0.01114654541015625,
-0.0197906494140625,
0.0205841064453125,
-0.01132965087890625,
-0.01415252685546875,
0.0305328369140625,
-0.032470703125,
-0.031463623046875,
0.0094146728515625,
-0.0049285888671875,
0.0745849609375,
0.0211029052734375,
0.031280517578125,
0.001953125,
0.0202178955078125,
-0.0026569366455078125,
-0.0098876953125,
-0.0030612945556640625,
0.061737060546875,
-0.0106353759765625,
-0.032562255859375,
-0.041351318359375,
0.024566650390625,
-0.04559326171875,
-0.0220489501953125,
-0.046630859375,
0.0248260498046875,
-0.0017080307006835938,
0.001800537109375,
-0.0491943359375,
-0.0611572265625,
-0.0027141571044921875,
-0.05810546875,
-0.0107879638671875,
0.025390625,
-0.004535675048828125,
0.072509765625,
-0.01708984375,
-0.01812744140625,
-0.01422882080078125,
-0.0027446746826171875,
-0.009857177734375,
-0.0245361328125,
0.0281982421875,
0.004734039306640625,
0.057891845703125,
0.02630615234375,
-0.00745391845703125,
0.003543853759765625,
0.0230255126953125,
-0.06939697265625,
0.0277252197265625,
0.01256561279296875,
0.055938720703125,
0.035980224609375,
0.01165008544921875,
0.0203857421875,
-0.0115203857421875,
-0.007221221923828125,
-0.01483154296875,
-0.0251007080078125,
-0.0271453857421875,
0.032562255859375,
0.0018138885498046875,
-0.01291656494140625,
0.036163330078125,
0.000007569789886474609,
0.040069580078125,
-0.0126953125,
0.033905029296875,
-0.04779052734375,
0.027801513671875,
-0.018524169921875,
0.046112060546875,
0.002162933349609375,
0.031341552734375,
0.0248565673828125,
0.0241241455078125,
-0.044677734375,
-0.01157379150390625,
-0.0164947509765625,
0.0283966064453125,
-0.007709503173828125,
-0.01641845703125,
-0.02886962890625,
0.04205322265625,
-0.0220794677734375,
0.00531768798828125,
-0.0482177734375,
0.0196533203125,
0.0736083984375,
-0.01207733154296875,
-0.00908660888671875,
-0.040069580078125,
0.01274871826171875,
0.00555419921875,
-0.09161376953125,
0.05792236328125,
0.0021495819091796875,
-0.0012464523315429688,
-0.0182952880859375,
0.024078369140625,
0.00628662109375,
-0.0265350341796875,
-0.008270263671875,
0.0484619140625,
0.0207977294921875,
0.0308990478515625,
-0.01519012451171875,
-0.014190673828125,
0.016632080078125,
-0.00004869699478149414,
0.0283203125,
-0.0204315185546875,
-0.00753021240234375,
0.05523681640625,
-0.00853729248046875,
0.038848876953125,
0.024505615234375,
-0.0107574462890625,
-0.00954437255859375,
0.06671142578125,
-0.01171112060546875,
-0.0050201416015625,
0.0262451171875,
-0.011199951171875,
0.0013675689697265625,
0.00685882568359375,
0.004962921142578125,
-0.006221771240234375,
0.0135498046875,
0.01172637939453125,
0.017822265625,
0.0224456787109375,
-0.0121612548828125,
-0.0126800537109375,
0.0012073516845703125,
0.01366424560546875,
0.003177642822265625,
0.0389404296875,
0.03167724609375,
-0.039703369140625,
-0.035614013671875,
0.007732391357421875,
0.0275726318359375,
0.0023555755615234375,
-0.0274505615234375,
0.0034847259521484375,
-0.01806640625,
-0.00870513916015625,
-0.0277252197265625,
-0.0697021484375,
0.0255584716796875,
0.029632568359375,
0.021575927734375,
0.004119873046875,
0.017913818359375,
0.0215606689453125,
-0.023712158203125,
0.048248291015625,
0.0174102783203125,
-0.0207672119140625,
0.031951904296875,
-0.042388916015625,
0.0333251953125,
-0.037628173828125,
0.056732177734375,
0.0501708984375,
0.0034618377685546875,
-0.0281829833984375,
0.01114654541015625,
-0.02117919921875,
-0.0179595947265625,
0.0198516845703125,
-0.0100555419921875,
-0.01629638671875,
-0.05316162109375,
0.0246429443359375,
0.032806396484375,
0.0013647079467773438,
0.02569580078125,
-0.00927734375,
-0.0091094970703125,
0.03125,
-0.054473876953125,
-0.0209503173828125,
-0.0245208740234375,
-0.054351806640625,
0.00762176513671875,
0.0145111083984375,
-0.01507568359375,
-0.0137176513671875,
0.0284423828125,
0.01171112060546875,
0.03753662109375,
-0.0037822723388671875,
-0.061767578125,
-0.039764404296875,
-0.08245849609375,
-0.07244873046875,
-0.00984954833984375,
0.01526641845703125,
0.0233917236328125,
0.0140533447265625,
0.0013294219970703125,
-0.053985595703125,
0.0283966064453125,
0.009368896484375,
-0.030426025390625,
0.01146697998046875,
0.0014181137084960938,
-0.0243682861328125,
0.00904083251953125,
-0.01324462890625,
0.07208251953125,
0.040313720703125,
-0.034698486328125,
0.01009368896484375,
-0.006290435791015625,
-0.004146575927734375,
0.011688232421875,
0.0281982421875,
0.0256195068359375,
0.003997802734375,
0.027557373046875,
-0.037567138671875,
-0.06866455078125,
-0.0208587646484375,
-0.06829833984375,
0.007198333740234375,
0.044830322265625,
0.030364990234375,
-0.02850341796875,
0.04095458984375,
0.01091766357421875,
0.047454833984375,
0.0401611328125,
-0.0283203125,
0.0677490234375,
-0.0225830078125,
-0.0200958251953125,
-0.062042236328125,
0.039520263671875,
0.000046193599700927734,
0.00830078125,
0.0228271484375,
-0.006412506103515625,
-0.0021800994873046875,
0.0062713623046875,
-0.01427459716796875,
-0.07666015625,
0.036376953125,
-0.07098388671875,
-0.0252532958984375,
-0.0394287109375,
-0.003108978271484375,
-0.004024505615234375,
0.07330322265625,
-0.020172119140625,
-0.00658416748046875,
-0.010284423828125,
-0.009185791015625,
0.00994873046875,
-0.025634765625,
-0.033447265625,
-0.0038471221923828125,
-0.006473541259765625,
-0.022674560546875,
-0.008148193359375,
-0.021240234375,
-0.01032257080078125,
0.028045654296875,
0.00357818603515625,
-0.00919342041015625,
0.03253173828125,
-0.0012683868408203125,
0.004383087158203125,
0.050689697265625,
0.004192352294921875,
0.0244598388671875,
-0.048553466796875,
0.0005888938903808594,
-0.11163330078125,
-0.0247650146484375,
0.00644683837890625,
0.1099853515625,
0.0092010498046875,
-0.0200653076171875,
-0.0262451171875,
0.0650634765625,
0.0014810562133789062,
-0.020599365234375,
0.0096435546875,
0.00131988525390625,
-0.00600433349609375,
0.036407470703125,
0.0004901885986328125,
0.00548553466796875,
0.01666259765625,
0.011016845703125,
-0.042327880859375,
0.0279388427734375,
-0.0200042724609375,
0.0283050537109375,
0.0181121826171875,
-0.045623779296875,
-0.0279083251953125,
-0.0131378173828125,
-0.035186767578125,
-0.0084381103515625,
0.007747650146484375,
-0.04229736328125,
-0.0157318115234375,
-0.030853271484375,
0.032073974609375,
-0.00925445556640625,
0.00608062744140625,
0.01141357421875,
0.058074951171875,
0.002048492431640625,
-0.0211639404296875,
-0.013916015625,
0.030517578125,
0.0248565673828125,
0.00952911376953125,
0.04168701171875,
0.017578125,
0.0221710205078125,
-0.003448486328125,
-0.0094146728515625,
-0.037353515625,
-0.009765625,
-0.0042877197265625,
-0.0007009506225585938,
-0.01806640625,
-0.016387939453125,
-0.04791259765625,
0.10052490234375,
0.044647216796875,
-0.01178741455078125,
0.0030384063720703125,
-0.0175323486328125,
0.035186767578125,
-0.0248260498046875,
0.030120849609375,
-0.040771484375,
-0.0294647216796875,
0.0215911865234375,
0.0212249755859375,
0.048431396484375,
0.0175323486328125,
-0.01276397705078125,
0.034881591796875,
-0.019805908203125,
-0.009552001953125,
0.007266998291015625,
-0.0107879638671875,
0.01314544677734375,
0.010406494140625,
0.0163421630859375,
-0.0127716064453125,
-0.0152587890625,
-0.006053924560546875,
0.0247802734375,
0.006099700927734375,
-0.0087890625,
-0.03973388671875,
-0.01026153564453125,
0.003997802734375,
-0.0035724639892578125,
0.01268768310546875,
0.03436279296875,
0.062408447265625,
-0.008087158203125,
0.000015020370483398438,
0.0016336441040039062,
0.04400634765625,
-0.04150390625,
0.032806396484375,
0.018524169921875,
-0.01137542724609375,
-0.0224761962890625,
0.036773681640625,
0.0244598388671875,
-0.020599365234375,
-0.00545501708984375,
0.04107666015625,
0.0416259765625,
0.00621795654296875,
-0.002197265625,
0.0240325927734375,
0.0019054412841796875,
-0.0111236572265625,
0.0052032470703125,
-0.041259765625,
-0.0277557373046875,
0.03204345703125,
0.0469970703125,
-0.01029205322265625,
0.002544403076171875,
-0.00896453857421875,
-0.0165252685546875,
-0.0028820037841796875,
0.01407623291015625,
-0.05084228515625,
-0.054840087890625,
-0.0006737709045410156,
0.00276947021484375,
0.0140380859375,
-0.04852294921875,
-0.0061798095703125,
-0.0302276611328125,
-0.0217742919921875,
0.0022296905517578125,
0.019775390625,
-0.0158538818359375,
0.00603485107421875,
-0.001941680908203125,
0.03485107421875,
-0.017669677734375,
0.0138702392578125,
-0.005550384521484375,
0.028900146484375,
-0.038787841796875,
-0.00839996337890625,
0.047271728515625,
-0.04339599609375,
0.02362060546875,
0.0017547607421875,
-0.00638580322265625,
0.02911376953125,
0.006908416748046875,
0.0411376953125,
0.0117340087890625,
0.02325439453125,
-0.0071258544921875,
-0.016143798828125,
-0.00864410400390625,
0.01861572265625,
-0.01245880126953125,
-0.0035190582275390625,
-0.032012939453125,
0.0164031982421875,
0.03582763671875,
0.0023517608642578125,
-0.00469970703125,
-0.0243377685546875,
0.015655517578125,
0.029052734375,
0.07489013671875,
-0.012847900390625,
0.02899169921875,
-0.0079803466796875,
0.007541656494140625,
-0.0186309814453125,
-0.0086517333984375,
-0.03204345703125,
0.0084381103515625,
-0.03497314453125,
-0.062469482421875,
0.0009984970092773438,
0.035400390625,
-0.0321044921875,
0.060821533203125,
0.0875244140625,
0.02252197265625,
-0.0200347900390625,
-0.023468017578125,
-0.015533447265625,
-0.0296783447265625,
0.031951904296875,
-0.030120849609375,
0.0160064697265625,
-0.05755615234375,
0.0172882080078125,
0.060638427734375,
-0.0180816650390625,
0.0114898681640625,
-0.038360595703125,
-0.00705718994140625,
-0.004177093505859375,
0.0126953125,
-0.03179931640625,
0.0089874267578125,
0.06781005859375,
-0.0221710205078125,
0.046173095703125,
0.009185791015625,
0.011688232421875,
0.058868408203125,
-0.0253143310546875,
0.036102294921875,
0.041168212890625,
0.043182373046875,
-0.020477294921875,
0.0234375,
0.029571533203125,
-0.01222991943359375,
0.00864410400390625,
0.07476806640625,
0.053680419921875,
-0.09716796875,
0.001583099365234375,
0.0297393798828125,
0.0209808349609375,
0.039154052734375,
0.022003173828125,
-0.0034084320068359375,
0.054351806640625,
-0.0225830078125,
-0.0245208740234375,
-0.042572021484375,
-0.00916290283203125,
0.0279083251953125,
-0.004840850830078125,
0.026275634765625,
0.048828125,
0.0081787109375,
0.0214691162109375,
-0.0555419921875,
-0.022979736328125,
0.0194244384765625,
0.0008783340454101562,
-0.0089263916015625,
-0.004398345947265625,
-0.03216552734375,
-0.0176849365234375,
0.025054931640625,
-0.0266571044921875,
0.0134124755859375,
0.06085205078125,
-0.00165557861328125,
0.00881195068359375,
0.046173095703125,
-0.01335906982421875,
0.01004791259765625,
-0.00295257568359375,
-0.0135955810546875,
0.016143798828125,
-0.00365447998046875,
-0.0004811286926269531,
0.0129852294921875,
-0.004180908203125,
-0.00021183490753173828,
-0.0182037353515625,
-0.0223541259765625,
-0.0197601318359375,
-0.056915283203125,
0.06158447265625,
-0.03094482421875,
-0.018463134765625,
-0.0135345458984375,
0.009552001953125,
0.01641845703125,
-0.00548553466796875,
-0.00920867919921875,
-0.0377197265625,
-0.017669677734375,
-0.0226287841796875,
-0.052581787109375,
0.0030670166015625,
-0.023651123046875,
-0.07427978515625,
0.1290283203125,
0.0165863037109375,
0.056365966796875,
0.03125,
0.036529541015625,
-0.059326171875,
-0.01493072509765625,
-0.01328277587890625,
0.05157470703125,
0.0012865066528320312,
0.0379638671875,
0.0028209686279296875,
0.017364501953125,
0.0316162109375,
0.0114898681640625,
0.0804443359375,
0.019805908203125,
-0.041015625,
-0.0156707763671875,
0.039642333984375,
0.0247650146484375,
-0.002437591552734375,
0.0355224609375,
-0.0266876220703125,
0.0238800048828125,
0.0281829833984375,
-0.05364990234375,
0.02532958984375,
-0.0357666015625,
-0.029449462890625,
0.0008716583251953125,
0.0208740234375,
0.027740478515625,
0.0184783935546875,
-0.006443023681640625,
-0.013519287109375,
0.0130615234375,
0.03778076171875,
-0.009674072265625,
0.005199432373046875,
-0.01806640625,
0.0106048583984375,
-0.0552978515625,
0.00917816162109375,
-0.0261077880859375,
0.03790283203125,
0.002712249755859375,
0.028778076171875,
-0.006313323974609375,
0.01171875,
0.03558349609375,
-0.0249176025390625,
-0.0003666877746582031,
0.01910400390625,
-0.0114898681640625,
0.029144287109375,
0.03656005859375,
0.0186309814453125,
-0.0026493072509765625,
0.0286407470703125,
0.08026123046875,
0.050872802734375,
-0.05157470703125,
-0.0186767578125,
0.0229644775390625,
0.043670654296875,
-0.01531219482421875,
0.0021820068359375,
0.004863739013671875,
-0.0267486572265625,
0.030853271484375,
-0.071044921875,
-0.024200439453125,
0.02691650390625,
0.037567138671875,
-0.01904296875,
-0.059173583984375,
0.0014581680297851562,
-0.031982421875,
-0.08111572265625,
0.03338623046875,
0.032501220703125,
0.0791015625,
0.0279541015625,
0.08697509765625,
0.02264404296875,
-0.043060302734375,
0.005863189697265625,
0.0010843276977539062,
-0.00957489013671875,
0.0199737548828125,
-0.040435791015625,
-0.045196533203125,
0.05194091796875,
0.04132080078125,
0.0489501953125,
0.0047454833984375,
0.01444244384765625,
-0.01019287109375,
-0.03521728515625,
0.0089569091796875,
0.03143310546875,
-0.01256561279296875,
0.01824951171875,
-0.0296783447265625,
0.0172882080078125,
-0.019805908203125,
-0.00591278076171875,
-0.03594970703125,
0.0208282470703125,
-0.0079803466796875,
0.00359344482421875,
0.0269775390625,
0.005702972412109375,
0.005977630615234375,
0.0648193359375,
0.01471710205078125,
0.054229736328125,
0.0296173095703125,
-0.0615234375,
0.00006330013275146484,
-0.0283050537109375,
-0.1103515625,
0.0357666015625,
0.0506591796875,
-0.028350830078125,
-0.00666046142578125,
0.022003173828125,
0.025909423828125,
0.0299072265625,
-0.025115966796875,
0.0024356842041015625,
0.0294189453125,
0.045196533203125,
0.031341552734375,
-0.035125732421875,
-0.014556884765625,
-0.00653839111328125,
0.034820556640625,
-0.01025390625,
0.1220703125,
-0.03790283203125,
0.01030731201171875,
-0.0272064208984375,
0.00888824462890625,
-0.02606201171875,
-0.0142364501953125,
-0.0218353271484375,
0.0078582763671875,
0.0193939208984375,
0.01070404052734375,
0.0010843276977539062,
0.0211181640625,
0.040740966796875,
-0.057586669921875,
0.019439697265625,
-0.0236053466796875,
-0.0010528564453125,
-0.059600830078125,
-0.049346923828125,
-0.0384521484375,
-0.0214080810546875,
-0.0017118453979492188,
-0.002605438232421875,
0.006961822509765625,
-0.00370025634765625,
-0.0095367431640625,
0.05523681640625,
0.005893707275390625,
-0.01117706298828125,
-0.0009899139404296875,
-0.04632568359375,
-0.0122833251953125,
0.038299560546875,
-0.0018444061279296875,
-0.012115478515625,
0.0606689453125,
0.00037598609924316406,
0.0215301513671875,
0.03521728515625,
0.045501708984375,
0.0273895263671875,
-0.00576019287109375,
-0.03680419921875,
-0.050079345703125,
-0.006877899169921875,
-0.033905029296875,
-0.00458526611328125,
-0.0474853515625,
0.01123809814453125,
0.01494598388671875,
0.0033283233642578125,
-0.01378631591796875,
-0.0226593017578125,
-0.03289794921875,
0.0167388916015625,
-0.026580810546875,
-0.02679443359375,
-0.052886962890625,
0.0115203857421875,
0.02667236328125,
0.001621246337890625,
-0.04656982421875,
0.024383544921875,
-0.015869140625,
0.06011962890625,
-0.022430419921875,
-0.033660888671875,
-0.0029239654541015625,
0.0307159423828125,
-0.038848876953125,
-0.020538330078125,
-0.058837890625,
-0.01345062255859375,
-0.06939697265625,
0.015777587890625,
0.06866455078125,
-0.0443115234375,
-0.033905029296875,
-0.0181884765625,
-0.0028438568115234375,
0.044342041015625,
-0.00337982177734375,
-0.01861572265625,
-0.0026950836181640625,
0.0107574462890625,
-0.007640838623046875,
-0.08154296875,
-0.0162200927734375,
-0.072021484375,
-0.00495147705078125,
0.02264404296875,
-0.0282745361328125,
-0.005527496337890625,
-0.0272216796875,
-0.0152740478515625,
0.037811279296875,
0.02508544921875,
-0.017242431640625,
-0.04376220703125,
0.005130767822265625,
-0.0025920867919921875,
0.01324462890625,
-0.0095367431640625,
-0.0059051513671875,
-0.0416259765625,
0.0046539306640625,
0.00942230224609375,
0.062744140625,
-0.003887176513671875,
0.0247802734375,
-0.0005898475646972656,
0.01470947265625,
-0.0011157989501953125,
-0.0178680419921875,
0.03668212890625,
-0.009735107421875,
0.039306640625,
0.042724609375,
-0.036712646484375,
0.0175018310546875,
-0.0271148681640625,
-0.01812744140625,
-0.0181121826171875,
-0.002292633056640625,
-0.04095458984375,
-0.009368896484375,
0.08929443359375,
0.03656005859375,
0.0325927734375,
-0.01047515869140625,
-0.0021686553955078125,
-0.0172271728515625,
-0.019561767578125,
0.020751953125,
0.031219482421875,
-0.05609130859375,
0.01049041748046875,
0.0310211181640625,
0.01447296142578125,
-0.03582763671875,
-0.0024242401123046875,
0.00567626953125,
-0.027191162109375,
0.01331329345703125,
-0.00594329833984375,
0.0258636474609375,
0.0123443603515625,
0.0426025390625,
-0.0172271728515625,
0.0213470458984375,
-0.0011129379272460938,
0.00679779052734375,
0.01593017578125,
-0.0269622802734375,
-0.014923095703125,
0.0187225341796875,
-0.007518768310546875,
0.00601959228515625,
0.00730133056640625,
0.043182373046875,
-0.003467559814453125,
0.0010194778442382812,
-0.00223541259765625,
0.026763916015625,
0.004932403564453125,
0.021331787109375,
-0.03375244140625,
0.047393798828125,
-0.00916290283203125,
0.0731201171875,
0.00040078163146972656,
0.01540374755859375,
0.004154205322265625,
0.0208892822265625,
-0.007137298583984375,
0.000736236572265625,
0.003070831298828125,
-0.0276947021484375,
0.0076904296875,
-0.0231170654296875,
-0.00400543212890625,
-0.0298919677734375,
-0.0106658935546875,
0.0074310302734375,
-0.02423095703125,
0.0185699462890625
]
|
6da1dd6234028ca83900871dedcc23c7f31ae47f | Wordpress Stackexchange
Q: WordPress filtering utm_ GET variables from url unless logged in as admin, not sure why? So I am having an issue where I can't pull variables such as mysite.com/?utm_campaign=testing unless I am logged in as admin or editor.
When logged out and just a regular users I can't grab any variables which start in utm_ such as utm_campaign. However utmcampaign works, and any other variable I try. Just not utm_ ones.
I disabled all my plugins but still have the same issue. Not sure where the filtering is coming from and not sure why it only filters when not logged in as admin.
I tried accessing the variable using three different methods:
1. Injecting PHP code using the "Code Insert Manager" plugin
<?php echo $_GET['utm_testing']; ?>
*
*Using the built-in function of formidablepro to grab the GET variables.
*Using the same code as #1 but inside my footer.php file of my template.
All have same results.
A: did you try the get_query_var function ?
| Q: WordPress filtering utm_ GET variables from url unless logged in as admin, not sure why? So I am having an issue where I can't pull variables such as mysite.com/?utm_campaign=testing unless I am logged in as admin or editor.
When logged out and just a regular users I can't grab any variables which start in utm_ such as utm_campaign. However utmcampaign works, and any other variable I try. Just not utm_ ones.
I disabled all my plugins but still have the same issue. Not sure where the filtering is coming from and not sure why it only filters when not logged in as admin.
I tried accessing the variable using three different methods:
1. Injecting PHP code using the "Code Insert Manager" plugin
<?php echo $_GET['utm_testing']; ?>
*
*Using the built-in function of formidablepro to grab the GET variables.
*Using the same code as #1 but inside my footer.php file of my template.
All have same results.
A: did you try the get_query_var function ?
A: It's not a core behaviour to overwrite the global $_GET array, which means it's likely that something else then WordPress itself is the issue here.
I would suggest the following steps to debug the issue:
*
*Disable all active plugins and revert to standard theme, see if the problem persists.
*If the problem is still there, open the index.php in your document root and write var_dump($_GET); exit(); in the first line to see if the variable is making it through the webserver. If it isn't showing up now, it means that it is filtered for some reason by the webserver (i.e. bad .htaccess rule, or conflicting mod_security rule).
A: If you have a hosted solution check to see if any page caches are stripping/ignoring the values. Get Parameters generally require the page request to be processed by the origin server. If the request does not hit the origin then you will not get an opportunity to process the GET params - equally if the params are stripped upstream - you may receive the request but the params may no longer exist.
Data capture vs performance
d.
| wordpress | {
"language": "en",
"length": 352,
"provenance": "stackexchange_00019.jsonl.gz:438754",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120825"
} | [
0.029449462890625,
-0.0008769035339355469,
0.03533935546875,
-0.03173828125,
-0.00760650634765625,
0.0084381103515625,
-0.00714874267578125,
-0.03863525390625,
0.03662109375,
-0.0205535888671875,
-0.005771636962890625,
0.000911712646484375,
-0.058441162109375,
-0.032623291015625,
-0.003002166748046875,
-0.02880859375,
-0.0170135498046875,
-0.01190185546875,
-0.03216552734375,
-0.041473388671875,
0.0183258056640625,
-0.045440673828125,
-0.0218353271484375,
0.006366729736328125,
-0.0011110305786132812,
-0.0011835098266601562,
0.05743408203125,
-0.0166015625,
0.0195465087890625,
-0.0128173828125,
0.0034637451171875,
-0.0249786376953125,
0.0163116455078125,
0.00908660888671875,
0.006984710693359375,
0.00431060791015625,
-0.01457977294921875,
0.00247955322265625,
0.0281982421875,
-0.025421142578125,
0.038116455078125,
-0.037750244140625,
-0.051422119140625,
0.0262451171875,
-0.02447509765625,
-0.039459228515625,
0.025146484375,
-0.03173828125,
-0.00711822509765625,
0.046783447265625,
0.007236480712890625,
0.0194549560546875,
0.01322174072265625,
0.061248779296875,
0.0003018379211425781,
-0.028106689453125,
-0.0059967041015625,
-0.0574951171875,
0.0001379251480102539,
-0.0296173095703125,
0.01476287841796875,
-0.01274871826171875,
0.03924560546875,
0.040771484375,
-0.00518798828125,
0.003818511962890625,
0.0175933837890625,
0.0122833251953125,
-0.08203125,
-0.0169219970703125,
0.03692626953125,
-0.041717529296875,
0.005596160888671875,
0.0192718505859375,
-0.05096435546875,
-0.0625,
0.035369873046875,
-0.0240325927734375,
0.0166778564453125,
0.0010433197021484375,
0.0218658447265625,
-0.045013427734375,
-0.0176849365234375,
0.0618896484375,
-0.0335693359375,
0.07293701171875,
0.006805419921875,
-0.02947998046875,
0.007549285888671875,
0.014617919921875,
-0.01312255859375,
0.0157623291015625,
0.0067291259765625,
0.037811279296875,
-0.019287109375,
-0.0028228759765625,
0.02239990234375,
0.07879638671875,
-0.01214599609375,
0.006572723388671875,
-0.037445068359375,
-0.007724761962890625,
-0.041900634765625,
-0.03924560546875,
-0.044342041015625,
0.034454345703125,
0.0278472900390625,
0.07611083984375,
0.01148223876953125,
0.03131103515625,
0.01389312744140625,
-0.0239410400390625,
-0.007568359375,
0.01102447509765625,
-0.043060302734375,
-0.011932373046875,
-0.0282135009765625,
-0.0096435546875,
-0.01371002197265625,
0.0173187255859375,
0.00972747802734375,
0.00600433349609375,
0.012969970703125,
-0.0135955810546875,
0.01442718505859375,
-0.0035076141357421875,
-0.03851318359375,
-0.005687713623046875,
-0.04644775390625,
0.06536865234375,
-0.029815673828125,
-0.0083160400390625,
-0.0016241073608398438,
0.01470184326171875,
-0.00435638427734375,
-0.03887939453125,
0.00949859619140625,
0.0070037841796875,
0.0078887939453125,
0.017059326171875,
-0.01483917236328125,
-0.0206146240234375,
-0.0004572868347167969,
-0.00975799560546875,
-0.034210205078125,
0.0419921875,
0.027313232421875,
0.00301361083984375,
-0.0246734619140625,
-0.059783935546875,
-0.0302734375,
0.01396942138671875,
0.0169677734375,
0.00971221923828125,
0.031280517578125,
0.0014181137084960938,
0.08843994140625,
-0.037506103515625,
-0.030487060546875,
-0.034820556640625,
0.059051513671875,
-0.013092041015625,
-0.016845703125,
0.0252532958984375,
-0.037078857421875,
0.0048675537109375,
-0.0088348388671875,
-0.0140380859375,
0.0267791748046875,
0.0206146240234375,
0.02490234375,
-0.01447296142578125,
0.043548583984375,
0.035369873046875,
0.02398681640625,
0.031707763671875,
-0.0098114013671875,
0.0828857421875,
0.032318115234375,
-0.053314208984375,
-0.005283355712890625,
-0.036407470703125,
0.09228515625,
-0.0163726806640625,
-0.04425048828125,
0.0306396484375,
-0.0164642333984375,
0.0172576904296875,
0.03863525390625,
-0.006587982177734375,
0.035858154296875,
0.03021240234375,
-0.0157623291015625,
0.0282440185546875,
-0.003993988037109375,
-0.04583740234375,
0.00806427001953125,
-0.00634002685546875,
-0.0009560585021972656,
0.0174560546875,
0.050689697265625,
-0.0264892578125,
0.005390167236328125,
-0.025970458984375,
-0.0179595947265625,
-0.0413818359375,
-0.00543212890625,
-0.01104736328125,
-0.03070068359375,
0.00817108154296875,
0.02081298828125,
-0.037994384765625,
-0.016387939453125,
-0.00860595703125,
-0.01873779296875,
-0.004791259765625,
0.0009050369262695312,
0.0574951171875,
0.00482940673828125,
0.036895751953125,
0.01666259765625,
-0.05670166015625,
0.0189361572265625,
0.004810333251953125,
0.0007610321044921875,
0.00439453125,
-0.0115814208984375,
0.009674072265625,
0.01087188720703125,
0.012542724609375,
0.023712158203125,
0.005859375,
-0.01284027099609375,
0.0156707763671875,
-0.0253448486328125,
-0.00585174560546875,
-0.02276611328125,
-0.0638427734375,
0.0250396728515625,
0.0465087890625,
0.058685302734375,
0.041961669921875,
0.0115966796875,
-0.026824951171875,
0.06927490234375,
-0.0411376953125,
0.0183563232421875,
-0.05023193359375,
0.02349853515625,
0.043701171875,
0.0011167526245117188,
0.0011425018310546875,
0.0091400146484375,
0.0018205642700195312,
0.021697998046875,
0.03192138671875,
-0.007030487060546875,
-0.01451873779296875,
-0.007236480712890625,
-0.0018949508666992188,
0.0202178955078125,
-0.0196685791015625,
-0.0240020751953125,
-0.0031986236572265625,
-0.01045989990234375,
-0.007266998291015625,
0.014129638671875,
0.0028018951416015625,
0.0070648193359375,
-0.02056884765625,
0.01505279541015625,
-0.0177001953125,
-0.03057861328125,
0.01189422607421875,
0.0704345703125,
-0.05181884765625,
-0.06011962890625,
0.0241546630859375,
0.0019159317016601562,
0.0034198760986328125,
-0.0022449493408203125,
0.028289794921875,
0.032196044921875,
-0.0081024169921875,
0.01212310791015625,
-0.0012216567993164062,
0.021484375,
-0.0224761962890625,
0.05224609375,
0.0144500732421875,
0.0435791015625,
-0.007232666015625,
-0.00646209716796875,
0.0521240234375,
-0.050079345703125,
-0.0341796875,
0.05511474609375,
-0.03558349609375,
0.02484130859375,
-0.0377197265625,
0.0362548828125,
0.047393798828125,
-0.0027484893798828125,
-0.0098419189453125,
-0.00167083740234375,
-0.0133819580078125,
-0.021881103515625,
-0.00860595703125,
0.0013628005981445312,
0.01290130615234375,
-0.036407470703125,
0.07611083984375,
0.019500732421875,
0.00470733642578125,
0.004085540771484375,
-0.03338623046875,
-0.0259552001953125,
0.0196380615234375,
-0.0706787109375,
-0.040069580078125,
0.020477294921875,
-0.0330810546875,
0.0085601806640625,
-0.00891876220703125,
-0.0259857177734375,
-0.002819061279296875,
-0.0021572113037109375,
-0.00012409687042236328,
0.04705810546875,
-0.0021839141845703125,
-0.1060791015625,
-0.0019989013671875,
-0.07501220703125,
0.03448486328125,
-0.017669677734375,
0.0125885009765625,
-0.004154205322265625,
0.037261962890625,
-0.01708984375,
0.00384521484375,
-0.02484130859375,
-0.01329803466796875,
-0.0080718994140625,
-0.0830078125,
-0.045928955078125,
0.0026493072509765625,
0.0262603759765625,
-0.01432037353515625,
0.0201873779296875,
0.01194000244140625,
-0.006771087646484375,
-0.006595611572265625,
0.037384033203125,
0.0262908935546875,
0.062744140625,
-0.0263671875,
-0.055755615234375,
0.0251312255859375,
0.035858154296875,
-0.036651611328125,
-0.01079559326171875,
-0.01387786865234375,
-0.03570556640625,
0.0703125,
0.059173583984375,
-0.04840087890625,
0.006542205810546875,
0.00928497314453125,
-0.00449371337890625,
-0.000039458274841308594,
-0.00608062744140625,
-0.0152435302734375,
-0.021270751953125,
0.0003371238708496094,
0.01165008544921875,
0.03271484375,
-0.006256103515625,
-0.043426513671875,
0.0406494140625,
0.0009679794311523438,
0.0009179115295410156,
0.018829345703125,
-0.029083251953125,
0.01024627685546875,
0.0007801055908203125,
0.046783447265625,
0.0232696533203125,
0.0019664764404296875,
-0.00740814208984375,
-0.0199432373046875,
-0.022125244140625,
0.035919189453125,
-0.046875,
-0.00157928466796875,
0.015716552734375,
0.01605224609375,
-0.0304718017578125,
-0.0330810546875,
-0.051422119140625,
-0.007373809814453125,
-0.062255859375,
0.00018024444580078125,
-0.00980377197265625,
-0.01548004150390625,
-0.01264190673828125,
0.01427459716796875,
-0.034515380859375,
-0.051300048828125,
0.04302978515625,
-0.03973388671875,
0.007648468017578125,
-0.01763916015625,
-0.01004791259765625,
-0.040252685546875,
-0.0333251953125,
-0.00202178955078125,
-0.0251007080078125,
-0.0236663818359375,
0.00745391845703125,
0.066650390625,
0.0372314453125,
-0.055267333984375,
-0.008056640625,
0.02447509765625,
-0.021392822265625,
0.0092010498046875,
-0.01068878173828125,
-0.00021409988403320312,
0.00783538818359375,
0.04962158203125,
-0.0020847320556640625,
0.00415802001953125,
-0.0173492431640625,
-0.007228851318359375,
-0.015411376953125,
0.0186614990234375,
-0.003986358642578125,
-0.039703369140625,
0.0193939208984375,
-0.0222320556640625,
-0.01824951171875,
-0.0240631103515625,
-0.0248870849609375,
-0.0299530029296875,
-0.0048828125,
-0.0285797119140625,
0.0075836181640625,
0.00647735595703125,
0.01543426513671875,
0.01212310791015625,
-0.00901031494140625,
-0.015472412109375,
0.020294189453125,
0.0487060546875,
-0.024017333984375,
0.060089111328125,
-0.0185699462890625,
0.04559326171875,
-0.037353515625,
-0.006275177001953125,
0.0003523826599121094,
-0.040618896484375,
0.039642333984375,
-0.01071929931640625,
0.0191192626953125,
-0.026336669921875,
0.0155487060546875,
0.014801025390625,
-0.02691650390625,
0.035491943359375,
0.042205810546875,
-0.021484375,
0.0103302001953125,
-0.04864501953125,
-0.0245208740234375,
-0.0193634033203125,
0.0738525390625,
-0.047393798828125,
0.05609130859375,
-0.056396484375,
-0.02032470703125,
-0.0005426406860351562,
-0.052215576171875,
0.040863037109375,
0.021759033203125,
-0.0041961669921875,
0.0021839141845703125,
0.0182952880859375,
0.0203399658203125,
-0.01136016845703125,
0.004730224609375,
-0.011566162109375,
0.054718017578125,
-0.023834228515625,
0.002685546875,
-0.0157318115234375,
-0.0114288330078125,
0.052032470703125,
-0.01189422607421875,
-0.05859375,
0.0207366943359375,
0.0009870529174804688,
-0.03155517578125,
0.06072998046875,
-0.03802490234375,
-0.00270843505859375,
0.0277862548828125,
-0.0029354095458984375,
0.005825042724609375,
0.0272979736328125,
-0.0183868408203125,
-0.007640838623046875,
0.071044921875,
-0.0032711029052734375,
0.012847900390625,
-0.0206146240234375,
0.10223388671875,
-0.0496826171875,
0.0531005859375,
-0.007221221923828125,
0.0207672119140625,
0.0297088623046875,
-0.0096893310546875,
0.0111541748046875,
0.016632080078125,
0.0141448974609375,
-0.0302734375,
0.02313232421875,
-0.00144195556640625,
0.0101165771484375,
0.009979248046875,
0.0242156982421875,
-0.0035228729248046875,
-0.0082244873046875,
0.0205230712890625,
-0.041290283203125,
-0.018890380859375,
0.016845703125,
-0.004802703857421875,
-0.00370025634765625,
-0.046051025390625,
-0.035858154296875,
0.049224853515625,
0.0238037109375,
-0.01433563232421875,
-0.029327392578125,
-0.044036865234375,
-0.019012451171875,
0.01175689697265625,
-0.0266571044921875,
-0.0310516357421875,
-0.033416748046875,
0.01125335693359375,
-0.033782958984375,
-0.039764404296875,
-0.040863037109375,
0.00229644775390625,
-0.0108642578125,
0.006160736083984375,
0.039154052734375,
-0.01473236083984375,
0.011322021484375,
-0.00836181640625,
0.009857177734375,
0.015838623046875,
-0.0017786026000976562,
0.0283355712890625,
0.006145477294921875,
-0.0296630859375,
-0.0109100341796875,
-0.032867431640625,
-0.02044677734375,
-0.0447998046875,
0.000965118408203125,
-0.02569580078125,
0.01427459716796875,
-0.003192901611328125,
0.0241851806640625,
-0.013458251953125,
-0.0298004150390625,
-0.036895751953125,
0.00518035888671875,
0.04534912109375,
0.0806884765625,
0.002986907958984375,
0.0413818359375,
0.0020618438720703125,
0.0089111328125,
0.0012063980102539062,
0.022125244140625,
-0.0197906494140625,
-0.00118255615234375,
-0.00020813941955566406,
-0.017425537109375,
-0.0060577392578125,
0.00897216796875,
-0.003421783447265625,
0.01104736328125,
0.04949951171875,
0.007534027099609375,
-0.01513671875,
0.0022068023681640625,
0.00955963134765625,
-0.0219573974609375,
0.03271484375,
0.0181427001953125,
-0.024658203125,
0.0301513671875,
-0.009735107421875,
-0.0016393661499023438,
0.007843017578125,
0.003734588623046875,
0.0172882080078125,
0.0016384124755859375,
0.011749267578125,
-0.0232696533203125,
0.022216796875,
0.038360595703125,
0.10333251953125,
-0.01194000244140625,
0.052490234375,
0.045196533203125,
0.0102386474609375,
0.00814056396484375,
0.004638671875,
0.0125885009765625,
-0.0245513916015625,
0.00408172607421875,
-0.020111083984375,
-0.0136871337890625,
-0.006397247314453125,
-0.03192138671875,
0.010040283203125,
0.061248779296875,
0.076904296875,
-0.1024169921875,
0.0194091796875,
0.038238525390625,
-0.0120391845703125,
-0.039794921875,
0.022735595703125,
-0.019287109375,
-0.071533203125,
-0.0240631103515625,
0.041015625,
0.004291534423828125,
0.00473785400390625,
0.02606201171875,
-0.00811004638671875,
0.0012197494506835938,
0.07122802734375,
0.0188446044921875,
0.0218658447265625,
-0.0198974609375,
-0.0022525787353515625,
0.00592803955078125,
-0.023406982421875,
0.0286865234375,
-0.01020050048828125,
-0.01213836669921875,
-0.054595947265625,
-0.00605010986328125,
-0.00006628036499023438,
-0.0218658447265625,
-0.01568603515625,
0.0262298583984375,
0.056182861328125,
0.012054443359375,
0.0290069580078125,
-0.041473388671875,
0.02239990234375,
-0.061279296875,
0.054931640625,
-0.00926971435546875,
0.00142669677734375,
0.01885986328125,
-0.02105712890625,
0.0017404556274414062,
0.005855560302734375,
-0.00464630126953125,
-0.0147247314453125,
-0.031646728515625,
0.032562255859375,
-0.00484466552734375,
-0.0141448974609375,
0.035919189453125,
0.019622802734375,
-0.009002685546875,
-0.00429534912109375,
0.01213836669921875,
-0.01255035400390625,
0.0185089111328125,
0.01513671875,
-0.0018491744995117188,
-0.052886962890625,
-0.0165557861328125,
-0.07269287109375,
0.050811767578125,
0.00733184814453125,
0.052703857421875,
0.0187225341796875,
0.01214599609375,
-0.022125244140625,
-0.01812744140625,
-0.0657958984375,
0.037109375,
0.0201873779296875,
0.0592041015625,
-0.0804443359375,
-0.023040771484375,
0.005069732666015625,
0.03369140625,
0.058837890625,
0.00792694091796875,
-0.00835418701171875,
-0.00432586669921875,
0.0494384765625,
0.01200103759765625,
-0.0175933837890625,
0.027862548828125,
0.07891845703125,
0.0609130859375,
0.06353759765625,
-0.03265380859375,
0.0206451416015625,
-0.0386962890625,
0.03826904296875,
0.08984375,
-0.034393310546875,
-0.064453125,
0.008026123046875,
-0.0265655517578125,
-0.05364990234375,
0.0036411285400390625,
0.0124664306640625,
-0.0341796875,
-0.027099609375,
0.0196380615234375,
-0.0121002197265625,
0.015625,
-0.06591796875,
0.004364013671875,
0.0179901123046875,
0.030731201171875,
-0.006252288818359375,
0.051300048828125,
0.0190582275390625,
0.032867431640625,
-0.04058837890625,
-0.005474090576171875,
-0.01480865478515625,
0.00992584228515625,
-0.00583648681640625,
0.022247314453125,
0.014404296875,
-0.0268096923828125,
0.00699615478515625,
0.0870361328125,
0.022705078125,
-0.022003173828125,
-0.01947021484375,
-0.0173187255859375,
-0.032318115234375,
-0.004894256591796875,
-0.0075836181640625,
-0.0171356201171875,
0.09539794921875,
0.07281494140625,
-0.03704833984375,
0.0271759033203125,
0.0302276611328125,
0.0191497802734375,
-0.01898193359375,
-0.010711669921875,
-0.0090484619140625,
0.051116943359375,
-0.0210723876953125,
-0.022308349609375,
-0.00600433349609375,
0.05224609375,
0.050140380859375,
0.0296630859375,
-0.035400390625,
-0.029815673828125,
-0.01543426513671875,
0.01183319091796875,
-0.003772735595703125,
0.01312255859375,
-0.028961181640625,
-0.02392578125,
0.0239715576171875,
0.0218505859375,
-0.01702880859375,
-0.022735595703125,
0.02386474609375,
0.028564453125,
-0.055419921875,
-0.0338134765625,
0.015167236328125,
-0.0355224609375,
0.020111083984375,
-0.03369140625,
0.0168914794921875,
0.01361083984375,
-0.013946533203125,
-0.00848388671875,
0.008331298828125,
0.0217437744140625,
-0.0262603759765625,
0.028076171875,
-0.00012671947479248047,
-0.030975341796875,
-0.004444122314453125,
-0.028778076171875,
0.042816162109375,
-0.01015472412109375,
-0.036529541015625,
0.022064208984375,
-0.0814208984375,
-0.043975830078125,
0.0106201171875,
0.0272064208984375,
0.0036182403564453125,
-0.00027871131896972656,
0.002025604248046875,
-0.041961669921875,
-0.0004107952117919922,
0.028045654296875,
0.00748443603515625,
-0.01995849609375,
-0.00601959228515625,
-0.036346435546875,
-0.00608062744140625,
-0.01120758056640625,
0.0206451416015625,
0.022613525390625,
0.0034542083740234375,
0.06005859375,
-0.0208892822265625,
0.0002734661102294922,
-0.002902984619140625,
-0.0032196044921875,
-0.016082763671875,
0.0030384063720703125,
-0.007904052734375,
0.0023136138916015625,
-0.006084442138671875,
-0.007534027099609375,
0.0007252693176269531,
0.06658935546875,
-0.0130615234375,
0.0002505779266357422,
0.0213470458984375,
-0.01052093505859375,
-0.0019378662109375,
0.032623291015625,
0.06121826171875,
-0.0096893310546875,
-0.0560302734375,
-0.032470703125,
0.016387939453125,
0.0198211669921875,
0.061737060546875,
0.005828857421875,
0.01529693603515625,
-0.00859832763671875,
-0.00760650634765625,
0.01427459716796875,
-0.002719879150390625,
0.0026760101318359375,
0.018096923828125,
-0.0285797119140625,
0.0673828125,
0.031341552734375,
-0.0155029296875,
0.03277587890625,
0.02044677734375,
-0.013397216796875,
0.0283203125,
-0.014129638671875,
0.007686614990234375,
-0.0088958740234375,
0.02532958984375,
-0.00778961181640625,
-0.008392333984375,
0.0216217041015625,
0.0031490325927734375,
-0.057098388671875,
-0.047607421875,
-0.0318603515625,
-0.031829833984375,
-0.0121612548828125,
0.0095672607421875,
0.00408935546875,
-0.048797607421875,
-0.01221466064453125,
-0.00022339820861816406,
0.038787841796875,
0.00041484832763671875,
-0.06689453125,
0.0455322265625,
-0.02935791015625,
0.05303955078125,
-0.00894927978515625,
0.0294647216796875,
-0.0178375244140625,
-0.03948974609375,
-0.05126953125,
0.009918212890625,
-0.0298919677734375,
0.00795745849609375,
0.01496124267578125,
-0.00807952880859375,
0.02392578125,
0.0218353271484375,
-0.0005211830139160156,
-0.004802703857421875,
-0.034027099609375,
0.031341552734375,
-0.1025390625,
-0.0274200439453125,
0.01678466796875,
-0.02020263671875,
-0.0157012939453125,
-0.0384521484375,
0.01531219482421875,
-0.0682373046875,
0.0162353515625,
0.0650634765625,
-0.02288818359375,
0.041412353515625,
-0.0293731689453125,
-0.0833740234375,
0.062286376953125,
0.0034694671630859375,
-0.04840087890625,
-0.09490966796875,
0.03515625,
0.01238250732421875,
-0.010528564453125,
-0.033233642578125,
-0.0216064453125,
-0.01445770263671875,
0.04180908203125,
0.02197265625,
-0.0360107421875,
0.060028076171875,
-0.0101470947265625,
-0.041961669921875,
-0.00151824951171875,
-0.0022716522216796875,
-0.0189971923828125,
-0.017578125,
0.0303955078125,
0.016937255859375,
0.041900634765625,
0.0010690689086914062,
0.0160675048828125,
0.01544952392578125,
-0.039794921875,
-0.00457763671875,
-0.025604248046875,
-0.0386962890625,
-0.01190948486328125,
0.05255126953125,
0.05731201171875,
0.00414276123046875,
-0.0263519287109375,
-0.02325439453125,
-0.04119873046875,
-0.038970947265625,
-0.0222625732421875,
0.027496337890625,
-0.07684326171875,
-0.015106201171875,
0.025543212890625,
0.0022640228271484375,
-0.01445770263671875,
-0.0207061767578125,
-0.050994873046875,
-0.0148773193359375,
0.0015735626220703125,
0.036651611328125,
-0.031280517578125,
-0.01026153564453125,
-0.007106781005859375,
-0.025604248046875,
-0.058624267578125,
0.0062255859375,
0.0216217041015625,
-0.05078125,
-0.01947021484375,
0.0022907257080078125,
-0.0034275054931640625,
-0.05169677734375,
0.0022487640380859375,
0.005382537841796875,
0.0244903564453125,
-0.0302734375,
-0.01953125,
-0.032257080078125,
0.0128936767578125,
0.00839996337890625,
-0.00433349609375,
-0.0240631103515625,
-0.007740020751953125,
0.00460052490234375,
0.045196533203125,
-0.01300811767578125,
-0.042266845703125,
-0.033172607421875,
0.047698974609375,
0.02044677734375,
-0.02105712890625,
0.061920166015625,
-0.021636962890625,
-0.017303466796875,
0.0189971923828125,
-0.037689208984375,
-0.057525634765625,
0.0176239013671875,
0.00457000732421875,
0.0165863037109375,
0.0194244384765625
]
|
190aa3d3cea1898e54bcf27cda0d01f5f93aa71b | Wordpress Stackexchange
Q: How do I display the text inside the WP editor for a page with a custom template? I am working in a Child theme on a page with a custom template. That custom template is not displaying any text that I enter into the wordpress editor. How do I "call" that text and display it in my custom template?
Is there something like
<?php get_editor_text(); ?>
I just need a way to display the text inside the editor box on the custom teplate page. How would I accomplish this in wordpress?
A: I was able to fix my problem. In order to access the content I used --
<?php /* Start the Loop */ ?>
<?php while(have_posts()) : the_post(); ?>
<?php the_content();?>
<?php endwhile; ?>
By adding that snippet of code directly into my template page I was able to easily add the content from the visual editor. I had attempted to use "the_content()" but this was nonfunctional because I was not within the loop.
The loop is an integral part of Wordpress and more information on the Loop can be found at http://codex.wordpress.org/The_Loop .
| Q: How do I display the text inside the WP editor for a page with a custom template? I am working in a Child theme on a page with a custom template. That custom template is not displaying any text that I enter into the wordpress editor. How do I "call" that text and display it in my custom template?
Is there something like
<?php get_editor_text(); ?>
I just need a way to display the text inside the editor box on the custom teplate page. How would I accomplish this in wordpress?
A: I was able to fix my problem. In order to access the content I used --
<?php /* Start the Loop */ ?>
<?php while(have_posts()) : the_post(); ?>
<?php the_content();?>
<?php endwhile; ?>
By adding that snippet of code directly into my template page I was able to easily add the content from the visual editor. I had attempted to use "the_content()" but this was nonfunctional because I was not within the loop.
The loop is an integral part of Wordpress and more information on the Loop can be found at http://codex.wordpress.org/The_Loop .
A: You do it like in any other template. the_title() for the title, the_content() for the content etc.
| wordpress | {
"language": "en",
"length": 204,
"provenance": "stackexchange_00019.jsonl.gz:438755",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/120828"
} | [
-0.00569915771484375,
-0.0216217041015625,
0.01116943359375,
0.01947021484375,
-0.042144775390625,
-0.0229644775390625,
0.0248565673828125,
-0.035369873046875,
0.0251922607421875,
0.042144775390625,
-0.0560302734375,
-0.0305328369140625,
-0.01004791259765625,
0.003559112548828125,
-0.053466796875,
-0.0589599609375,
0.0257415771484375,
-0.0138092041015625,
0.038909912109375,
-0.002410888671875,
0.01233673095703125,
0.0046234130859375,
0.039093017578125,
-0.001583099365234375,
0.0139617919921875,
-0.017059326171875,
0.07666015625,
-0.0165557861328125,
0.00354766845703125,
-0.0265960693359375,
0.0164794921875,
0.00406646728515625,
0.0190582275390625,
0.0418701171875,
-0.051910400390625,
-0.00433349609375,
-0.00795745849609375,
0.007129669189453125,
-0.0080413818359375,
0.0261077880859375,
-0.00322723388671875,
0.0172271728515625,
0.0017681121826171875,
0.0146942138671875,
-0.00548553466796875,
-0.061767578125,
0.00373077392578125,
-0.056671142578125,
-0.0244903564453125,
-0.0030918121337890625,
0.02587890625,
0.0023288726806640625,
0.045867919921875,
-0.010498046875,
0.004947662353515625,
0.024139404296875,
-0.04705810546875,
0.0194854736328125,
0.00821685791015625,
0.02886962890625,
0.005611419677734375,
0.008819580078125,
0.00974273681640625,
-0.0123291015625,
0.0298309326171875,
-0.0012216567993164062,
0.041656494140625,
0.027740478515625,
-0.032806396484375,
0.0019512176513671875,
0.003437042236328125,
-0.0291290283203125,
0.0012712478637695312,
-0.07525634765625,
-0.02197265625,
0.03778076171875,
-0.01136016845703125,
-0.045928955078125,
0.0011529922485351562,
-0.0277252197265625,
-0.00022518634796142578,
0.01708984375,
-0.045501708984375,
0.0011148452758789062,
-0.0118255615234375,
0.0010595321655273438,
-0.0238494873046875,
-0.01267242431640625,
-0.0005125999450683594,
-0.0023593902587890625,
-0.01554107666015625,
0.033905029296875,
-0.0007038116455078125,
0.00902557373046875,
-0.0330810546875,
-0.01143646240234375,
0.001087188720703125,
0.038726806640625,
-0.031585693359375,
0.033050537109375,
0.00856781005859375,
-0.035247802734375,
0.0894775390625,
-0.057525634765625,
0.01093292236328125,
0.00357818603515625,
-0.0218963623046875,
0.00756072998046875,
0.049346923828125,
0.0399169921875,
0.0072479248046875,
0.0123443603515625,
-0.01397705078125,
-0.032562255859375,
-0.007610321044921875,
0.03662109375,
-0.01541900634765625,
-0.0110321044921875,
0.000640869140625,
0.004528045654296875,
-0.002040863037109375,
0.01529693603515625,
0.0010013580322265625,
-0.036590576171875,
-0.00817108154296875,
-0.031036376953125,
-0.0149383544921875,
-0.01068115234375,
0.044189453125,
-0.0172119140625,
-0.03802490234375,
0.0185089111328125,
0.04937744140625,
0.0440673828125,
0.031158447265625,
0.0007772445678710938,
-0.008453369140625,
-0.01708984375,
0.01438140869140625,
-0.0129852294921875,
-0.0229644775390625,
0.004974365234375,
0.034759521484375,
-0.0229339599609375,
-0.0302276611328125,
0.034393310546875,
0.00312042236328125,
0.00615692138671875,
-0.01568603515625,
-0.07025146484375,
0.0027065277099609375,
-0.0216827392578125,
0.02392578125,
-0.00551605224609375,
0.043060302734375,
-0.04052734375,
0.03253173828125,
-0.03582763671875,
0.0177459716796875,
-0.02069091796875,
-0.0088958740234375,
-0.002468109130859375,
0.021270751953125,
-0.0310211181640625,
-0.017425537109375,
-0.006282806396484375,
-0.035888671875,
-0.00164794921875,
0.0238494873046875,
-0.005336761474609375,
0.0272979736328125,
-0.0133819580078125,
0.00746917724609375,
-0.00969696044921875,
-0.008544921875,
0.00848388671875,
-0.0182647705078125,
0.02099609375,
0.00360107421875,
0.035552978515625,
0.002475738525390625,
-0.04156494140625,
0.034912109375,
-0.0140838623046875,
-0.043121337890625,
-0.01378631591796875,
-0.00933074951171875,
0.031707763671875,
0.036224365234375,
0.02490234375,
-0.000141143798828125,
-0.00933074951171875,
-0.024169921875,
0.024444580078125,
0.00321197509765625,
-0.0180816650390625,
-0.042083740234375,
-0.00922393798828125,
-0.01294708251953125,
-0.00545501708984375,
-0.0200958251953125,
-0.036895751953125,
0.0258941650390625,
-0.026123046875,
-0.051605224609375,
-0.0009508132934570312,
-0.03631591796875,
0.04412841796875,
0.021240234375,
-0.007549285888671875,
-0.0029315948486328125,
-0.0233612060546875,
-0.004970550537109375,
-0.030029296875,
-0.049774169921875,
0.0080413818359375,
-0.0131683349609375,
0.050384521484375,
0.0181884765625,
0.02825927734375,
0.047943115234375,
-0.03436279296875,
0.03662109375,
0.0016164779663085938,
0.0245819091796875,
-0.0179901123046875,
-0.01885986328125,
-0.01020050048828125,
0.023529052734375,
0.022369384765625,
-0.0276336669921875,
-0.006717681884765625,
0.00337982177734375,
-0.0039825439453125,
-0.04742431640625,
-0.00337982177734375,
-0.031097412109375,
-0.0285797119140625,
-0.00728607177734375,
0.04620361328125,
0.0232086181640625,
0.06103515625,
-0.0197296142578125,
-0.01206207275390625,
0.087890625,
-0.00897216796875,
0.00789642333984375,
-0.0231475830078125,
0.030364990234375,
0.042388916015625,
-0.0013370513916015625,
-0.0158538818359375,
0.02294921875,
-0.0682373046875,
0.021270751953125,
0.041748046875,
0.042083740234375,
0.0303192138671875,
-0.0272064208984375,
0.012359619140625,
0.021484375,
0.04150390625,
-0.032928466796875,
0.0216064453125,
0.01268768310546875,
0.038299560546875,
0.03082275390625,
0.028472900390625,
-0.054931640625,
0.016326904296875,
0.0203857421875,
0.038299560546875,
0.004543304443359375,
-0.019866943359375,
-0.035888671875,
-0.007328033447265625,
-0.0136260986328125,
0.0138702392578125,
0.011749267578125,
-0.0110321044921875,
0.00731658935546875,
0.0177459716796875,
-0.01922607421875,
-0.0033969879150390625,
0.01222991943359375,
-0.045074462890625,
-0.0066986083984375,
0.00916290283203125,
0.041473388671875,
0.0268707275390625,
0.0244140625,
0.056915283203125,
-0.01190948486328125,
0.062286376953125,
-0.006389617919921875,
0.00089263916015625,
0.07513427734375,
-0.01081085205078125,
0.036224365234375,
0.0025844573974609375,
0.033599853515625,
0.055450439453125,
-0.0170745849609375,
0.0035762786865234375,
0.0215911865234375,
-0.028778076171875,
0.0220184326171875,
0.0255889892578125,
0.02227783203125,
0.00969696044921875,
-0.05255126953125,
0.006984710693359375,
0.0263519287109375,
0.0765380859375,
-0.01477813720703125,
-0.042388916015625,
-0.0081329345703125,
0.05645751953125,
-0.0263671875,
-0.039520263671875,
0.0445556640625,
-0.05609130859375,
-0.0302734375,
-0.046112060546875,
-0.048919677734375,
0.0023059844970703125,
-0.037872314453125,
-0.019744873046875,
0.010345458984375,
-0.016082763671875,
-0.07281494140625,
-0.048675537109375,
-0.08612060546875,
-0.031524658203125,
-0.01085662841796875,
0.0102081298828125,
0.004669189453125,
0.033721923828125,
0.004886627197265625,
-0.06036376953125,
-0.0077972412109375,
0.0013742446899414062,
-0.006072998046875,
0.0280609130859375,
0.044158935546875,
-0.0482177734375,
0.02374267578125,
0.0143890380859375,
-0.036376953125,
0.0113983154296875,
0.001895904541015625,
-0.0379638671875,
0.0028095245361328125,
-0.0101776123046875,
0.01454925537109375,
-0.005123138427734375,
0.01232147216796875,
0.039154052734375,
0.04241943359375,
-0.0186004638671875,
-0.038970947265625,
0.003681182861328125,
-0.0372314453125,
0.044586181640625,
0.01995849609375,
-0.00804901123046875,
-0.0173797607421875,
0.054168701171875,
-0.0285186767578125,
0.00705718994140625,
0.0325927734375,
-0.03350830078125,
0.045684814453125,
-0.014556884765625,
-0.0341796875,
-0.017333984375,
0.029754638671875,
-0.0050048828125,
0.019989013671875,
0.0153961181640625,
0.0150146484375,
-0.0195770263671875,
0.02142333984375,
-0.043548583984375,
-0.054779052734375,
0.06646728515625,
0.02392578125,
-0.00809478759765625,
-0.01995849609375,
-0.059967041015625,
0.0196533203125,
0.08978271484375,
-0.02069091796875,
-0.0146026611328125,
-0.0165252685546875,
-0.0010976791381835938,
-0.022369384765625,
-0.0020351409912109375,
-0.0295257568359375,
0.0080718994140625,
-0.0750732421875,
0.027252197265625,
-0.010711669921875,
0.00897979736328125,
-0.0257568359375,
0.044219970703125,
-0.0477294921875,
-0.0296783447265625,
0.0208892822265625,
-0.0251312255859375,
0.015228271484375,
0.02001953125,
-0.002117156982421875,
-0.00910186767578125,
-0.0013322830200195312,
-0.052947998046875,
-0.0692138671875,
-0.0211334228515625,
-0.0283660888671875,
0.0628662109375,
0.031585693359375,
-0.03204345703125,
-0.007114410400390625,
0.051727294921875,
0.024078369140625,
0.0537109375,
0.00354766845703125,
-0.007476806640625,
0.0018901824951171875,
-0.007106781005859375,
0.037017822265625,
-0.033721923828125,
-0.0112762451171875,
-0.002285003662109375,
-0.00608062744140625,
0.045745849609375,
-0.03387451171875,
-0.0252685546875,
-0.01319122314453125,
-0.005870819091796875,
-0.01549530029296875,
0.0030727386474609375,
-0.0167999267578125,
0.0276031494140625,
0.00890350341796875,
-0.016571044921875,
0.0017404556274414062,
-0.038848876953125,
0.0105133056640625,
0.0042572021484375,
-0.017822265625,
0.016845703125,
0.052032470703125,
0.0259857177734375,
-0.02099609375,
-0.038909912109375,
-0.0028591156005859375,
0.050140380859375,
0.0106964111328125,
0.005664825439453125,
0.037109375,
-0.0243377685546875,
0.0080413818359375,
0.0396728515625,
0.0293731689453125,
-0.00855255126953125,
0.09344482421875,
0.0017042160034179688,
-0.007587432861328125,
0.024505615234375,
0.01107025146484375,
-0.051177978515625,
0.0253753662109375,
-0.021514892578125,
-0.0164031982421875,
0.036346435546875,
0.04095458984375,
-0.05902099609375,
0.054046630859375,
-0.022613525390625,
-0.0201873779296875,
-0.01154327392578125,
-0.0017309188842773438,
0.049896240234375,
0.0298004150390625,
0.008575439453125,
0.0033111572265625,
0.021728515625,
0.001842498779296875,
0.0236053466796875,
-0.021881103515625,
0.023284912109375,
0.00974273681640625,
0.023468017578125,
0.00428009033203125,
0.0224761962890625,
-0.01459503173828125,
0.04705810546875,
-0.0156707763671875,
-0.03533935546875,
-0.01329803466796875,
-0.00888824462890625,
0.05804443359375,
0.029144287109375,
0.035797119140625,
-0.00018715858459472656,
0.0146636962890625,
0.0080718994140625,
0.0215911865234375,
0.0667724609375,
0.03277587890625,
0.005390167236328125,
-0.042999267578125,
0.00019502639770507812,
-0.0211944580078125,
-0.020904541015625,
0.046295166015625,
-0.027618408203125,
0.00978851318359375,
0.0024204254150390625,
0.0276947021484375,
0.0200042724609375,
0.0278472900390625,
0.0298309326171875,
-0.022216796875,
0.036865234375,
-0.038299560546875,
0.011688232421875,
-0.0288543701171875,
-0.008453369140625,
-0.0016508102416992188,
0.057342529296875,
-0.015289306640625,
-0.0185546875,
0.02008056640625,
-0.05584716796875,
-0.011962890625,
0.018463134765625,
0.0184783935546875,
-0.0266265869140625,
-0.0176239013671875,
0.0268096923828125,
0.0229644775390625,
0.0157470703125,
-0.00632476806640625,
0.021270751953125,
-0.0284271240234375,
0.024078369140625,
-0.035247802734375,
0.006107330322265625,
-0.01549530029296875,
-0.0311737060546875,
-0.0193634033203125,
0.0013399124145507812,
0.0015659332275390625,
-0.05084228515625,
-0.047515869140625,
-0.00141143798828125,
-0.01557159423828125,
0.042724609375,
-0.004482269287109375,
0.01079559326171875,
-0.04248046875,
0.00023066997528076172,
-0.08441162109375,
0.01267242431640625,
0.0533447265625,
0.026519775390625,
-0.049041748046875,
0.019927978515625,
-0.0266265869140625,
-0.003955841064453125,
-0.0531005859375,
-0.07958984375,
-0.047027587890625,
-0.0233306884765625,
-0.0015764236450195312,
0.0271148681640625,
-0.0131072998046875,
-0.002208709716796875,
-0.03363037109375,
0.040191650390625,
0.0186004638671875,
0.106689453125,
0.01776123046875,
0.08184814453125,
-0.00885772705078125,
0.087646484375,
0.041534423828125,
0.045928955078125,
-0.027801513671875,
-0.047119140625,
0.02093505859375,
0.01116180419921875,
-0.013031005859375,
-0.04962158203125,
0.03558349609375,
-0.0217437744140625,
0.022064208984375,
-0.007415771484375,
0.004913330078125,
-0.02349853515625,
-0.00441741943359375,
-0.01087188720703125,
0.04876708984375,
-0.0130615234375,
-0.03350830078125,
0.022308349609375,
-0.04290771484375,
-0.03387451171875,
0.039947509765625,
-0.0094146728515625,
0.027374267578125,
0.009796142578125,
-0.0107269287109375,
0.0171966552734375,
-0.029815673828125,
0.0677490234375,
0.07159423828125,
-0.00862884521484375,
0.0430908203125,
0.00859832763671875,
0.0093841552734375,
0.012664794921875,
0.028045654296875,
-0.01433563232421875,
-0.0305023193359375,
0.05322265625,
0.022003173828125,
-0.0168609619140625,
0.0406494140625,
-0.01406097412109375,
-0.017608642578125,
0.056060791015625,
0.0721435546875,
-0.0364990234375,
-0.0255279541015625,
0.0185089111328125,
-0.0192413330078125,
-0.03228759765625,
-0.01081085205078125,
-0.00714874267578125,
-0.036865234375,
0.05963134765625,
0.005573272705078125,
0.0038738250732421875,
0.03302001953125,
-0.01023101806640625,
0.0027980804443359375,
-0.0390625,
0.048614501953125,
0.006809234619140625,
-0.0100250244140625,
0.0142669677734375,
0.02044677734375,
0.035888671875,
-0.03607177734375,
-0.00499725341796875,
-0.02813720703125,
0.00382232666015625,
-0.0256805419921875,
0.0030803680419921875,
-0.0249481201171875,
0.02703857421875,
0.006900787353515625,
0.025970458984375,
-0.02789306640625,
0.067138671875,
-0.034912109375,
0.048370361328125,
0.031890869140625,
-0.0343017578125,
0.0218658447265625,
-0.0184478759765625,
0.0016880035400390625,
0.037872314453125,
-0.079833984375,
0.0123291015625,
-0.01947021484375,
0.033447265625,
-0.006023406982421875,
0.01763916015625,
0.08099365234375,
-0.008209228515625,
-0.043548583984375,
0.0452880859375,
-0.02227783203125,
-0.039306640625,
-0.026885986328125,
0.0125579833984375,
-0.03289794921875,
0.0272979736328125,
-0.0168304443359375,
-0.004993438720703125,
0.00258636474609375,
-0.0221710205078125,
-0.0728759765625,
0.127685546875,
0.01200103759765625,
0.01678466796875,
-0.00020706653594970703,
0.05181884765625,
-0.0343017578125,
0.02227783203125,
-0.0200653076171875,
0.036285400390625,
0.029266357421875,
0.0243377685546875,
-0.06390380859375,
-0.0271759033203125,
0.007694244384765625,
0.077880859375,
0.03399658203125,
-0.003078460693359375,
-0.040130615234375,
-0.037261962890625,
0.0160980224609375,
0.0469970703125,
-0.0011692047119140625,
0.0257720947265625,
0.032257080078125,
0.0211181640625,
0.00910186767578125,
-0.003612518310546875,
0.0294342041015625,
-0.00943756103515625,
-0.015167236328125,
0.06732177734375,
0.01349639892578125,
0.00482177734375,
0.0128936767578125,
-0.0264892578125,
-0.052001953125,
0.00516510009765625,
0.042999267578125,
-0.052215576171875,
-0.034515380859375,
0.05029296875,
0.0272369384765625,
-0.057769775390625,
-0.037567138671875,
-0.040130615234375,
0.0213775634765625,
0.005489349365234375,
-0.00020956993103027344,
-0.017120361328125,
0.0038738250732421875,
-0.0291900634765625,
-0.0313720703125,
-0.01433563232421875,
0.037567138671875,
-0.0377197265625,
-0.035186767578125,
-0.0123291015625,
-0.005588531494140625,
-0.0284423828125,
0.0391845703125,
0.033172607421875,
-0.035186767578125,
-0.0216064453125,
-0.0021152496337890625,
0.013336181640625,
0.00336456298828125,
-0.0278778076171875,
-0.0214691162109375,
-0.0190582275390625,
0.058013916015625,
0.05181884765625,
-0.01495361328125,
-0.032012939453125,
-0.006221771240234375,
0.026275634765625,
-0.0162811279296875,
-0.022796630859375,
0.0220947265625,
-0.045623779296875,
-0.046173095703125,
0.01904296875,
0.016082763671875,
0.031768798828125,
0.00982666015625,
0.0458984375,
0.013214111328125,
-0.01186370849609375,
-0.0275421142578125,
0.01461029052734375,
0.0093231201171875,
0.0174560546875,
-0.021820068359375,
0.01580810546875,
0.01287078857421875,
0.0224761962890625,
0.0259552001953125,
0.006069183349609375,
0.029815673828125,
0.00434112548828125,
-0.031005859375,
-0.0013856887817382812,
0.007717132568359375,
-0.0174102783203125,
-0.0290679931640625,
-0.04296875,
-0.00484466552734375,
0.0250244140625,
0.008758544921875,
0.01161956787109375,
0.009246826171875,
0.035430908203125,
-0.01318359375,
0.0291900634765625,
-0.007049560546875,
-0.0168304443359375,
-0.0018644332885742188,
-0.038665771484375,
0.0156707763671875,
0.0035152435302734375,
-0.10052490234375,
-0.01540374755859375,
-0.0033435821533203125,
-0.058685302734375,
0.021514892578125,
0.055877685546875,
-0.020751953125,
0.008880615234375,
0.0309906005859375,
0.0025081634521484375,
-0.0005941390991210938,
0.0020904541015625,
0.0160064697265625,
-0.02325439453125,
0.0037555694580078125,
-0.00030922889709472656,
-0.0491943359375,
-0.02801513671875,
-0.01342010498046875,
0.028961181640625,
0.002349853515625,
0.0443115234375,
0.001590728759765625,
0.030242919921875,
-0.006137847900390625,
0.0226898193359375,
-0.0195465087890625,
-0.035247802734375,
0.07861328125,
0.02203369140625,
0.022735595703125,
-0.037353515625,
-0.07525634765625,
0.04547119140625,
0.01071929931640625,
0.01271820068359375,
0.031402587890625,
0.00231170654296875,
0.007568359375,
-0.0165252685546875,
0.01116943359375,
-0.01190185546875,
-0.02325439453125,
-0.01483917236328125,
0.011138916015625,
0.024658203125,
0.039642333984375,
-0.00075531005859375,
0.0183868408203125,
-0.002521514892578125,
-0.034698486328125,
0.0244598388671875,
-0.0275421142578125,
0.0175628662109375,
0.032684326171875,
0.016510009765625,
-0.0386962890625,
0.01462554931640625,
-0.01800537109375,
0.0191497802734375,
0.0008034706115722656,
0.0523681640625,
0.029144287109375,
-0.02972412109375,
0.0187835693359375,
-0.041748046875,
0.031005859375,
-0.026397705078125,
-0.0022563934326171875,
-0.006175994873046875,
0.019622802734375,
0.0165863037109375,
-0.034637451171875,
-0.0227203369140625,
-0.06982421875,
-0.005031585693359375,
0.012451171875,
-0.03826904296875,
-0.01227569580078125,
-0.055938720703125,
-0.0013942718505859375,
0.0325927734375,
0.007083892822265625,
-0.026947021484375,
-0.0146331787109375,
-0.018585205078125,
0.0307159423828125,
0.00595855712890625,
-0.0119476318359375,
0.033538818359375,
0.0445556640625,
-0.0038051605224609375,
-0.0004992485046386719,
-0.00815582275390625,
-0.00820159912109375,
0.00193023681640625,
0.0224609375,
0.031280517578125,
-0.0234832763671875,
-0.005222320556640625,
0.034912109375,
0.0196533203125,
0.0892333984375,
0.012847900390625,
-0.01085662841796875,
-0.00328826904296875,
0.0206298828125,
-0.0194549560546875,
-0.048309326171875,
0.0261688232421875,
-0.0247955322265625,
-0.0021457672119140625,
-0.00594329833984375,
0.0242462158203125,
0.040802001953125,
-0.0421142578125,
-0.0977783203125,
-0.00982666015625,
-0.015716552734375,
-0.049224853515625,
-0.0234527587890625,
-0.006061553955078125,
-0.021453857421875,
0.0124359130859375,
-0.00048351287841796875,
-0.01366424560546875,
-0.0108642578125,
0.036773681640625,
0.0028743743896484375,
0.007793426513671875,
0.043701171875,
0.005573272705078125,
-0.08251953125,
-0.03326416015625,
-0.050323486328125,
-0.02703857421875,
0.023773193359375,
-0.0230865478515625,
-0.00489044189453125,
0.014862060546875,
-0.058837890625,
-0.09039306640625,
-0.038482666015625,
-0.0116729736328125,
0.0013294219970703125,
-0.0400390625,
-0.0092315673828125,
-0.01666259765625,
0.03228759765625,
0.01035308837890625,
-0.0034694671630859375,
-0.00766754150390625,
0.01418304443359375,
-0.0176849365234375,
-0.052215576171875,
-0.0023555755615234375,
0.0159149169921875,
-0.053070068359375,
-0.0008668899536132812,
0.02166748046875,
-0.0426025390625,
0.01019287109375,
-0.0181732177734375,
-0.06781005859375,
0.0016412734985351562,
-0.0447998046875,
0.006847381591796875,
-0.06536865234375,
-0.0540771484375,
0.09063720703125,
-0.040435791015625,
0.0004849433898925781,
-0.0012350082397460938,
0.037994384765625,
0.0265655517578125,
-0.00464630126953125,
0.01287841796875,
-0.000919342041015625,
-0.056488037109375,
0.0245513916015625,
-0.025238037109375,
0.054901123046875,
-0.0546875,
-0.0239410400390625,
0.01041412353515625,
0.01393890380859375,
-0.0250396728515625,
-0.008331298828125,
0.0036525726318359375,
0.039520263671875,
-0.0286865234375,
0.08795166015625,
-0.0176239013671875,
0.04754638671875,
-0.0228118896484375,
0.0267486572265625,
-0.03179931640625,
0.03472900390625,
-0.0233612060546875,
0.0013818740844726562,
0.017730712890625,
-0.004703521728515625,
-0.0064239501953125,
-0.002017974853515625,
-0.0210113525390625,
-0.01904296875,
-0.01605224609375,
-0.009674072265625
]
|
c264b3a146c8487fac9418649e83d92ae1d26329 | Wordpress Stackexchange
Q: Possible to make custom role in multisite that can add sites? I am creating a network on MultiSite, and am wanting to keep the Super Admin privileges very tightly locked. This setup is hosed on WPengine, and they add their plugin in the dashboard that shows the super admin a menu area that gets access to some server stuff, I obviously want that blocked from folks who may go poking around.
I am using the Premium version of the plugin User Role Editor to create a custom role, call it "Sub Admin".
I am trying to find out, if it is possible, to give this role the ability to add new sites?
I have added the manage_sites capability, but the Add Site menu item is not showing up. I tried also adding capabilities for manage_network and manage_network_options to test if they were somehow requisite, but no.
Has anyone done this, or know if it is possible? Or do I have to bite the bullet and dish out super admin rights?
A: From a quick glans at 3.7 code it seems that the "Add Site" menu is accessible only to users with "create_sites" capability
| Q: Possible to make custom role in multisite that can add sites? I am creating a network on MultiSite, and am wanting to keep the Super Admin privileges very tightly locked. This setup is hosed on WPengine, and they add their plugin in the dashboard that shows the super admin a menu area that gets access to some server stuff, I obviously want that blocked from folks who may go poking around.
I am using the Premium version of the plugin User Role Editor to create a custom role, call it "Sub Admin".
I am trying to find out, if it is possible, to give this role the ability to add new sites?
I have added the manage_sites capability, but the Add Site menu item is not showing up. I tried also adding capabilities for manage_network and manage_network_options to test if they were somehow requisite, but no.
Has anyone done this, or know if it is possible? Or do I have to bite the bullet and dish out super admin rights?
A: From a quick glans at 3.7 code it seems that the "Add Site" menu is accessible only to users with "create_sites" capability
| wordpress | {
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:438823",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/121040"
} | [
0.046783447265625,
-0.0042572021484375,
0.0163421630859375,
0.01171875,
0.01015472412109375,
-0.0281524658203125,
0.052703857421875,
-0.04132080078125,
-0.0200347900390625,
-0.00347137451171875,
0.0058135986328125,
-0.0075836181640625,
-0.0259552001953125,
-0.059539794921875,
0.02972412109375,
-0.03363037109375,
0.0176849365234375,
0.00516510009765625,
0.01338958740234375,
-0.0242156982421875,
-0.00439453125,
-0.01206207275390625,
-0.00145721435546875,
0.0240020751953125,
0.0136566162109375,
-0.01270294189453125,
0.0252685546875,
0.0037860870361328125,
0.0113525390625,
0.0105743408203125,
0.026885986328125,
-0.01983642578125,
0.02447509765625,
-0.011962890625,
0.009796142578125,
-0.0450439453125,
0.039703369140625,
-0.028076171875,
-0.019439697265625,
0.037994384765625,
-0.0076446533203125,
0.023773193359375,
0.0377197265625,
0.04864501953125,
0.0019550323486328125,
-0.078125,
0.027984619140625,
-0.049102783203125,
0.0064697265625,
-0.038818359375,
0.004695892333984375,
-0.0313720703125,
0.0193023681640625,
-0.04638671875,
-0.0211334228515625,
-0.026458740234375,
-0.02838134765625,
0.007434844970703125,
0.0214080810546875,
0.01059722900390625,
-0.00598907470703125,
-0.00930023193359375,
0.00945281982421875,
-0.0161895751953125,
0.01528167724609375,
0.0106658935546875,
0.0258026123046875,
0.00782012939453125,
-0.04345703125,
-0.005794525146484375,
0.01311492919921875,
-0.041473388671875,
0.038909912109375,
0.00299835205078125,
-0.03619384765625,
-0.037811279296875,
0.006145477294921875,
-0.0216827392578125,
0.05316162109375,
-0.04986572265625,
0.004119873046875,
0.0152130126953125,
0.0152740478515625,
-0.00577545166015625,
-0.0142364501953125,
0.00701904296875,
-0.0164642333984375,
-0.0046844482421875,
0.019989013671875,
0.01837158203125,
-0.00688934326171875,
-0.00653076171875,
0.0128631591796875,
0.06451416015625,
0.0024127960205078125,
-0.005573272705078125,
0.0384521484375,
0.064697265625,
0.004638671875,
0.01189422607421875,
0.0037593841552734375,
-0.047515869140625,
0.02044677734375,
-0.049072265625,
0.013916015625,
0.020660400390625,
-0.004161834716796875,
0.017913818359375,
0.042327880859375,
0.02899169921875,
-0.0002512931823730469,
-0.0100860595703125,
0.0147552490234375,
-0.0283203125,
-0.031707763671875,
-0.007579803466796875,
0.0047454833984375,
-0.0186309814453125,
0.0010318756103515625,
-0.031982421875,
-0.0281219482421875,
-0.00508880615234375,
0.007312774658203125,
-0.0011463165283203125,
-0.0012750625610351562,
-0.0293426513671875,
-0.019805908203125,
-0.00225067138671875,
-0.07928466796875,
0.0055389404296875,
-0.0234832763671875,
0.0408935546875,
0.053192138671875,
0.05230712890625,
-0.00998687744140625,
-0.00948333740234375,
0.033599853515625,
0.01511383056640625,
-0.0036106109619140625,
0.00917816162109375,
0.025360107421875,
-0.0140533447265625,
-0.035858154296875,
-0.004047393798828125,
0.0130157470703125,
0.03521728515625,
0.005779266357421875,
0.006420135498046875,
0.0233917236328125,
-0.0302734375,
-0.00783538818359375,
-0.04193115234375,
0.03033447265625,
-0.0062408447265625,
0.00815582275390625,
-0.039581298828125,
0.03143310546875,
-0.0188446044921875,
-0.005954742431640625,
-0.0180511474609375,
-0.01409149169921875,
0.0021038055419921875,
0.02813720703125,
-0.0380859375,
-0.03656005859375,
-0.0089569091796875,
-0.0308990478515625,
-0.0081329345703125,
0.0299224853515625,
-0.035614013671875,
0.00208282470703125,
-0.0025691986083984375,
0.054656982421875,
0.0254669189453125,
0.005306243896484375,
0.04254150390625,
0.0289154052734375,
0.01849365234375,
0.00818634033203125,
0.035614013671875,
0.01256561279296875,
-0.027435302734375,
0.07171630859375,
-0.033538818359375,
-0.049407958984375,
0.0025234222412109375,
-0.015899658203125,
0.04315185546875,
0.056793212890625,
0.01271820068359375,
0.0225372314453125,
-0.0201416015625,
0.007526397705078125,
-0.0111236572265625,
-0.0037746429443359375,
-0.034820556640625,
0.00165557861328125,
-0.006206512451171875,
-0.0223846435546875,
0.002777099609375,
-0.01300048828125,
-0.032806396484375,
0.042633056640625,
0.021942138671875,
0.0294036865234375,
0.023284912109375,
-0.0082550048828125,
0.01422119140625,
0.034088134765625,
-0.0138092041015625,
-0.0243377685546875,
-0.014892578125,
0.0269012451171875,
-0.10394287109375,
-0.05535888671875,
0.0287628173828125,
-0.0230712890625,
0.058258056640625,
0.0093994140625,
0.0333251953125,
0.0303192138671875,
-0.036712646484375,
0.03765869140625,
-0.0075225830078125,
0.036285400390625,
-0.00998687744140625,
-0.0097503662109375,
0.0027618408203125,
0.042388916015625,
0.0318603515625,
-0.02947998046875,
-0.004627227783203125,
0.046539306640625,
0.00882720947265625,
-0.0244140625,
0.0098419189453125,
0.01552581787109375,
-0.0809326171875,
-0.0166778564453125,
0.054779052734375,
0.035675048828125,
0.04180908203125,
-0.0003445148468017578,
-0.01556396484375,
-0.0121002197265625,
-0.0714111328125,
0.01593017578125,
-0.03192138671875,
-0.016815185546875,
0.037811279296875,
-0.0113372802734375,
0.0270233154296875,
0.0193328857421875,
0.032745361328125,
-0.013580322265625,
0.037261962890625,
-0.0221405029296875,
-0.031829833984375,
0.034698486328125,
-0.03521728515625,
0.0311279296875,
0.01226806640625,
-0.01454925537109375,
0.01837158203125,
0.00414276123046875,
0.00661468505859375,
0.018341064453125,
0.028961181640625,
0.00025916099548339844,
-0.00101470947265625,
0.016204833984375,
-0.02581787109375,
-0.0097198486328125,
0.0010623931884765625,
0.049285888671875,
-0.0193939208984375,
-0.050262451171875,
0.00279998779296875,
0.0015773773193359375,
-0.0023555755615234375,
-0.0162353515625,
0.0482177734375,
-0.017852783203125,
-0.0292510986328125,
-0.0211181640625,
-0.06402587890625,
-0.0102691650390625,
-0.015960693359375,
0.01351165771484375,
-0.02740478515625,
0.01490020751953125,
-0.0313720703125,
-0.045013427734375,
0.0283660888671875,
0.00949859619140625,
-0.05328369140625,
0.01409149169921875,
-0.0628662109375,
0.04876708984375,
-0.0217132568359375,
0.0322265625,
0.08404541015625,
-0.00643157958984375,
0.01378631591796875,
0.01485443115234375,
-0.04595947265625,
-0.0304718017578125,
0.050933837890625,
0.0131378173828125,
-0.0287017822265625,
-0.0284881591796875,
0.043426513671875,
0.0026874542236328125,
-0.0372314453125,
0.0179443359375,
0.007221221923828125,
-0.0026416778564453125,
-0.01317596435546875,
0.0095672607421875,
0.0268707275390625,
0.00445556640625,
-0.0634765625,
0.00977325439453125,
-0.00933837890625,
-0.021392822265625,
-0.01806640625,
0.0212249755859375,
0.00908660888671875,
-0.05120849609375,
-0.00882720947265625,
-0.004833221435546875,
-0.03973388671875,
-0.028717041015625,
0.019989013671875,
0.008941650390625,
0.002582550048828125,
-0.004913330078125,
0.04937744140625,
-0.005535125732421875,
-0.044677734375,
-0.007747650146484375,
0.0013303756713867188,
-0.0037441253662109375,
-0.0251007080078125,
-0.0011386871337890625,
-0.00899505615234375,
0.031585693359375,
-0.0032958984375,
-0.0247039794921875,
0.018646240234375,
0.0011606216430664062,
-0.03570556640625,
-0.005886077880859375,
0.005329132080078125,
0.025482177734375,
-0.0006680488586425781,
0.0093994140625,
0.0352783203125,
0.0166015625,
-0.0240020751953125,
0.0165863037109375,
0.006622314453125,
-0.003570556640625,
0.0021076202392578125,
-0.0301513671875,
-0.02752685546875,
0.00971221923828125,
0.02252197265625,
0.00357818603515625,
-0.006374359130859375,
0.01381683349609375,
-0.0187835693359375,
-0.016082763671875,
-0.01446533203125,
-0.0136260986328125,
-0.0076446533203125,
0.041534423828125,
-0.02154541015625,
0.00403594970703125,
0.012664794921875,
0.004497528076171875,
-0.00861358642578125,
0.00646209716796875,
-0.04193115234375,
-0.037994384765625,
0.02154541015625,
-0.06341552734375,
0.04290771484375,
-0.069091796875,
-0.00951385498046875,
-0.037994384765625,
0.089111328125,
-0.041900634765625,
0.0029315948486328125,
-0.007404327392578125,
0.01666259765625,
-0.00989532470703125,
-0.03314208984375,
-0.034149169921875,
-0.0208587646484375,
-0.054290771484375,
0.0003151893615722656,
-0.01702880859375,
-0.006458282470703125,
-0.028076171875,
-0.002796173095703125,
-0.016265869140625,
-0.037994384765625,
0.03863525390625,
-0.0435791015625,
0.01381683349609375,
0.008270263671875,
0.00858306884765625,
-0.041839599609375,
-0.016143798828125,
-0.038421630859375,
-0.0697021484375,
-0.0016107559204101562,
-0.041595458984375,
0.035919189453125,
-0.00295257568359375,
0.05389404296875,
-0.0271148681640625,
0.032318115234375,
0.0287017822265625,
-0.02044677734375,
0.00897979736328125,
-0.0037994384765625,
0.0044708251953125,
-0.01959228515625,
-0.003925323486328125,
-0.045013427734375,
-0.0194549560546875,
-0.004032135009765625,
-0.0007848739624023438,
0.021484375,
-0.01904296875,
-0.04132080078125,
0.00986480712890625,
-0.0272979736328125,
-0.011962890625,
-0.03485107421875,
-0.0411376953125,
-0.005947113037109375,
-0.03033447265625,
-0.0006585121154785156,
-0.02789306640625,
-0.014373779296875,
-0.0090484619140625,
-0.047515869140625,
-0.0005345344543457031,
0.031646728515625,
0.064208984375,
0.0242767333984375,
0.01751708984375,
-0.0008654594421386719,
0.019744873046875,
0.03375244140625,
-0.018798828125,
0.014892578125,
0.0455322265625,
0.00353240966796875,
-0.0246124267578125,
-0.00930023193359375,
0.0364990234375,
-0.0060577392578125,
0.000518798828125,
0.021728515625,
-0.01898193359375,
0.0278778076171875,
0.038482666015625,
-0.052642822265625,
-0.024658203125,
-0.019317626953125,
-0.018157958984375,
-0.0231170654296875,
0.056915283203125,
0.0197906494140625,
0.01432037353515625,
-0.055023193359375,
-0.00003212690353393555,
-0.00414276123046875,
-0.0516357421875,
0.0204620361328125,
0.01788330078125,
-0.00798797607421875,
-0.0230865478515625,
-0.006866455078125,
0.01131439208984375,
-0.0231475830078125,
-0.0167388916015625,
-0.041229248046875,
0.028656005859375,
-0.037506103515625,
-0.023895263671875,
0.01326751708984375,
-0.0213623046875,
0.09423828125,
0.003314971923828125,
-0.0450439453125,
0.030059814453125,
-0.02557373046875,
0.049652099609375,
0.0226898193359375,
0.028106689453125,
0.01155853271484375,
0.02337646484375,
-0.0032901763916015625,
0.00803375244140625,
0.0298614501953125,
0.00443267822265625,
-0.024383544921875,
-0.024200439453125,
-0.00917816162109375,
-0.005706787109375,
0.0219573974609375,
0.01549530029296875,
-0.0038661956787109375,
0.0164031982421875,
-0.01080322265625,
0.056488037109375,
0.0716552734375,
-0.0286865234375,
-0.017608642578125,
0.07080078125,
-0.0276947021484375,
-0.0250244140625,
0.01067352294921875,
0.01384735107421875,
0.00787353515625,
0.0274200439453125,
0.019866943359375,
0.035888671875,
0.01349639892578125,
-0.03985595703125,
-0.039764404296875,
-0.023284912109375,
0.060089111328125,
0.002490997314453125,
-0.06707763671875,
-0.032623291015625,
0.0005903244018554688,
0.0252685546875,
-0.0287933349609375,
-0.00582122802734375,
0.0013179779052734375,
-0.01442718505859375,
-0.00589752197265625,
-0.0231170654296875,
-0.02960205078125,
-0.007358551025390625,
0.0106353759765625,
-0.038787841796875,
-0.00937652587890625,
0.016571044921875,
-0.033447265625,
-0.01361846923828125,
-0.006580352783203125,
-0.049407958984375,
0.002628326416015625,
-0.0181121826171875,
0.0299530029296875,
-0.050872802734375,
0.004444122314453125,
-0.0469970703125,
0.0171661376953125,
0.0209503173828125,
0.00174713134765625,
0.00984954833984375,
-0.00927734375,
-0.0198516845703125,
-0.03240966796875,
-0.02484130859375,
-0.00604248046875,
-0.02117919921875,
0.00689697265625,
0.0276641845703125,
0.023284912109375,
-0.009918212890625,
-0.0667724609375,
-0.040313720703125,
0.014801025390625,
0.054656982421875,
0.022491455078125,
-0.006244659423828125,
0.03265380859375,
0.00916290283203125,
0.04962158203125,
0.025970458984375,
0.021209716796875,
0.01605224609375,
-0.029083251953125,
0.005756378173828125,
-0.054168701171875,
-0.036346435546875,
-0.0070953369140625,
-0.0017242431640625,
0.04071044921875,
0.0138397216796875,
-0.01436614990234375,
0.0290069580078125,
-0.002201080322265625,
0.007205963134765625,
-0.015716552734375,
-0.06268310546875,
-0.01361846923828125,
0.043304443359375,
-0.0184173583984375,
-0.038116455078125,
0.052276611328125,
0.0191650390625,
-0.0006856918334960938,
0.016693115234375,
-0.042938232421875,
0.03118896484375,
0.045379638671875,
-0.053253173828125,
0.0625,
0.06927490234375,
0.00928497314453125,
0.03729248046875,
-0.002086639404296875,
0.009979248046875,
-0.005123138427734375,
-0.033111572265625,
-0.0301055908203125,
0.00963592529296875,
-0.01904296875,
-0.01523590087890625,
0.013275146484375,
-0.009979248046875,
0.0037860870361328125,
0.0214080810546875,
0.05889892578125,
0.048980712890625,
-0.09185791015625,
0.0038623809814453125,
-0.01837158203125,
0.01093292236328125,
0.048126220703125,
-0.021453857421875,
-0.0015964508056640625,
-0.0237274169921875,
0.0584716796875,
-0.0018863677978515625,
-0.0223388671875,
0.02386474609375,
-0.01183319091796875,
-0.0224761962890625,
0.005828857421875,
-0.00939178466796875,
0.0270843505859375,
0.07989501953125,
0.0106964111328125,
-0.057830810546875,
0.061004638671875,
0.0253448486328125,
0.0164947509765625,
-0.038238525390625,
-0.01824951171875,
-0.022705078125,
-0.0263671875,
-0.039093017578125,
-0.03204345703125,
0.03472900390625,
0.010589599609375,
0.0130615234375,
0.06036376953125,
-0.031646728515625,
0.044708251953125,
0.0294647216796875,
0.005390167236328125,
0.020355224609375,
-0.0281219482421875,
0.0218963623046875,
-0.03472900390625,
-0.0139007568359375,
0.003070831298828125,
0.0018634796142578125,
-0.06707763671875,
-0.01496124267578125,
0.0274810791015625,
0.05230712890625,
-0.01209259033203125,
-0.0237579345703125,
0.04327392578125,
0.0294036865234375,
-0.0279693603515625,
-0.006168365478515625,
-0.003612518310546875,
-0.08465576171875,
-0.051025390625,
0.006488800048828125,
-0.030548095703125,
0.0254058837890625,
0.047119140625,
-0.0253753662109375,
0.071044921875,
-0.020751953125,
-0.005855560302734375,
0.023193359375,
0.0411376953125,
-0.0206146240234375,
0.023651123046875,
-0.0277557373046875,
0.044921875,
-0.00788116455078125,
0.041839599609375,
-0.041900634765625,
-0.007659912109375,
0.00988006591796875,
0.03155517578125,
0.0249176025390625,
0.0243682861328125,
-0.049652099609375,
-0.015045166015625,
-0.00949859619140625,
-0.00568389892578125,
-0.0164947509765625,
0.049102783203125,
-0.018310546875,
0.0186920166015625,
0.02099609375,
-0.01715087890625,
0.04339599609375,
-0.0013990402221679688,
-0.04144287109375,
-0.01068115234375,
-0.0192108154296875,
-0.036956787109375,
-0.01654052734375,
-0.004215240478515625,
-0.06536865234375,
0.00012695789337158203,
0.0212554931640625,
-0.00504302978515625,
-0.00975799560546875,
0.0073699951171875,
-0.032257080078125,
0.058135986328125,
0.0562744140625,
-0.0229034423828125,
0.031036376953125,
-0.005767822265625,
0.0033664703369140625,
-0.00749969482421875,
0.016510009765625,
-0.050567626953125,
0.0228424072265625,
0.00946044921875,
0.07012939453125,
-0.048431396484375,
0.00264739990234375,
0.012969970703125,
0.0281982421875,
-0.034454345703125,
-0.0201568603515625,
0.0467529296875,
0.025634765625,
0.000881195068359375,
-0.045501708984375,
0.00966644287109375,
0.0037517547607421875,
0.0200347900390625,
0.0234222412109375,
0.0345458984375,
0.028839111328125,
0.06024169921875,
-0.056121826171875,
0.00774383544921875,
0.0276031494140625,
0.00754547119140625,
-0.0089569091796875,
0.006465911865234375,
-0.01898193359375,
0.00313568115234375,
-0.022705078125,
-0.0259246826171875,
-0.0033283233642578125,
0.037567138671875,
0.041473388671875,
0.0303955078125,
-0.00884246826171875,
-0.0203399658203125,
0.0036640167236328125,
0.0509033203125,
-0.00760650634765625,
-0.0215606689453125,
-0.031341552734375,
-0.09014892578125,
0.013153076171875,
0.027801513671875,
-0.0005831718444824219,
0.0251007080078125,
0.0361328125,
0.004467010498046875,
-0.01081085205078125,
-0.0028133392333984375,
0.0306854248046875,
-0.023773193359375,
-0.009002685546875,
-0.058441162109375,
-0.003284454345703125,
0.006862640380859375,
-0.024688720703125,
0.027130126953125,
-0.0173187255859375,
0.053192138671875,
-0.005130767822265625,
0.0095367431640625,
0.0000011324882507324219,
-0.0265350341796875,
0.0311279296875,
-0.033966064453125,
0.037506103515625,
0.0013093948364257812,
-0.055084228515625,
0.00861358642578125,
-0.055389404296875,
-0.071044921875,
0.0247344970703125,
0.044677734375,
-0.0103607177734375,
-0.0079345703125,
0.01192474365234375,
-0.019287109375,
0.033599853515625,
0.0037822723388671875,
-0.0231781005859375,
-0.0018396377563476562,
0.031829833984375,
-0.01433563232421875,
-0.048370361328125,
-0.027374267578125,
-0.0027713775634765625,
0.0226593017578125,
-0.00872802734375,
0.050933837890625,
-0.0146636962890625,
0.01666259765625,
-0.02838134765625,
-0.0128326416015625,
-0.000701904296875,
-0.0293731689453125,
-0.0234527587890625,
0.03485107421875,
0.0226898193359375,
-0.007110595703125,
-0.03338623046875,
0.0205841064453125,
0.03729248046875,
-0.04931640625,
-0.0127410888671875,
0.0300445556640625,
0.0019893646240234375,
-0.0176849365234375,
0.038848876953125,
-0.0211944580078125,
-0.01131439208984375,
-0.054473876953125,
-0.043121337890625,
0.044036865234375,
0.007152557373046875,
-0.00833892822265625,
0.041168212890625,
-0.033843994140625,
-0.0338134765625,
-0.0026340484619140625,
-0.064208984375,
-0.00643157958984375,
0.0333251953125,
-0.0169525146484375,
-0.0214385986328125,
0.034515380859375,
-0.004058837890625,
-0.003353118896484375,
0.0213775634765625,
0.0235595703125,
0.04803466796875,
-0.046112060546875,
0.024688720703125,
0.0308685302734375,
0.05950927734375,
-0.01953125,
0.0235748291015625,
0.004482269287109375,
0.00856781005859375,
0.00948333740234375,
-0.0222930908203125,
-0.045135498046875,
-0.059326171875,
0.00934600830078125,
0.03302001953125,
-0.0430908203125,
-0.0230865478515625,
-0.10321044921875,
0.0229339599609375,
0.0645751953125,
0.035247802734375,
-0.12646484375,
0.1083984375,
-0.03472900390625,
0.045074462890625,
0.0176849365234375,
-0.04010009765625,
0.0185699462890625,
0.0095977783203125,
0.0176849365234375,
0.0307769775390625,
-0.016876220703125,
-0.0195465087890625,
0.023193359375,
0.020050048828125,
0.01219940185546875,
-0.005229949951171875,
0.00798797607421875,
0.0404052734375,
-0.006084442138671875,
0.08447265625,
-0.021484375,
0.004566192626953125,
-0.004093170166015625,
-0.006839752197265625,
-0.0295562744140625,
-0.036376953125,
0.0272064208984375,
-0.051910400390625,
-0.053436279296875,
-0.01418304443359375,
0.0016393661499023438,
0.020477294921875,
-0.02410888671875,
-0.0283050537109375,
0.04443359375,
0.0021038055419921875,
-0.0260009765625,
-0.0672607421875,
0.00000768899917602539,
0.00382232666015625,
-0.0119171142578125,
-0.024383544921875,
-0.0012054443359375,
-0.028045654296875,
0.03875732421875,
0.0125885009765625,
-0.01580810546875,
0.015655517578125,
0.01983642578125,
-0.05279541015625,
0.027374267578125,
0.0270233154296875,
-0.030487060546875,
0.038360595703125,
-0.027923583984375,
0.03070068359375,
0.05609130859375,
-0.0172576904296875,
-0.06182861328125,
-0.0178375244140625,
-0.058380126953125,
-0.0347900390625,
-0.019012451171875,
-0.0345458984375,
-0.029541015625,
0.10455322265625,
0.0863037109375,
0.0208587646484375,
-0.036163330078125,
-0.0121917724609375,
-0.05072021484375,
-0.04364013671875,
-0.0213775634765625,
0.0296173095703125,
-0.0780029296875,
-0.010345458984375,
0.0198516845703125,
-0.0235595703125,
0.036102294921875,
0.0181884765625,
-0.0269622802734375,
0.013092041015625,
0.01450347900390625,
-0.017852783203125,
-0.0662841796875,
0.050323486328125,
0.0631103515625,
-0.06341552734375,
-0.033782958984375,
-0.00965118408203125,
-0.01294708251953125,
-0.00518035888671875,
-0.057464599609375,
-0.04815673828125,
-0.0274200439453125,
-0.0228424072265625,
0.048187255859375,
-0.042755126953125,
0.034149169921875,
-0.06982421875,
0.02276611328125,
-0.0040283203125,
0.037445068359375,
-0.0087738037109375,
0.058837890625,
-0.00916290283203125,
0.039093017578125,
-0.0001550912857055664,
0.053985595703125,
-0.035980224609375,
0.017303466796875,
-0.042724609375,
0.0268707275390625,
-0.0222320556640625,
0.020172119140625,
0.027923583984375,
-0.0225982666015625,
-0.00019359588623046875,
0.0164337158203125,
-0.00931549072265625,
-0.048797607421875,
0.0259246826171875,
-0.00926971435546875,
0.00948333740234375,
0.00786590576171875
]
|
9557bc000f06cce6720122a1c4272dd94b06f57b | Wordpress Stackexchange
Q: Get value in custom field with taxonomy I have custom field my_cf for Taxonomy/Term. How can I get and output value with custom field for taxonomy/term?
I've tried using:
$variable = get_field('my_cf', 'basic');
echo $variable;
where basic - name for my taxonomy. But this doesn't work.
Any suggestions?
A: I can't really explain it any better than the ACF documentation page I posted in the comments:
All the API functions can be used with a taxonomy term, however, a second parameter is required to target the term ID. This is similar to passing through a post_id to target a specific post object.
The $post_id needed is a string containing the taxonomy name + the term ID in this format: $TaxonomyName_$TermID
So if your custom field is my_cf, and your taxonomy name is basic (not term name) and the term ID within your taxonomy is 42, then you need:
$variable = get_field( 'my_cf', 'basic_42' );
| Q: Get value in custom field with taxonomy I have custom field my_cf for Taxonomy/Term. How can I get and output value with custom field for taxonomy/term?
I've tried using:
$variable = get_field('my_cf', 'basic');
echo $variable;
where basic - name for my taxonomy. But this doesn't work.
Any suggestions?
A: I can't really explain it any better than the ACF documentation page I posted in the comments:
All the API functions can be used with a taxonomy term, however, a second parameter is required to target the term ID. This is similar to passing through a post_id to target a specific post object.
The $post_id needed is a string containing the taxonomy name + the term ID in this format: $TaxonomyName_$TermID
So if your custom field is my_cf, and your taxonomy name is basic (not term name) and the term ID within your taxonomy is 42, then you need:
$variable = get_field( 'my_cf', 'basic_42' );
A: Is your field data stored in wp_options? If so...
$term_id = 12345;
$term_meta = get_option( 'taxonomy_' . $term_id );
$my_cf = $term_meta[ 'my_cf' ];
echo $my_cf;
A: I use CMB2 to set up custom fields, and the logic is not so different from ACF in many cases. For my specific use case I've created a very simple but flexible function in order to make a few checks for the taxonomy before displaying the custom field value.
Considering one have created a custom field named my_cf for let's say a taxonomy named basic as per your example, the following function might help answer your question and perhaps extend your custom field's usage a bit.
function get_taxonomy_terms_custom_fields( $taxonomy = '' ) {
global $post;
$terms = get_the_terms( $post->ID, $taxonomy );
// Check if we have a taxonomy and that it is valid. If not, return false
if ( !$taxonomy )
return false;
// Sanitize the taxonomy input
$taxonomy = filter_var( $taxonomy, FILTER_SANITIZE_STRING );
// keep playing safe
if ( !taxonomy_exists( $taxonomy ) )
return false;
foreach ( $terms as $term ) {
// Set a variable for taxonomy term_id
$tax_term_id = $term->term_id;
$my_field = get_term_meta( $tax_term_id, 'my_cf', true );
// Make sure we do not have a WP_Error object, not really necessary, but better be safe
if ( is_wp_error( $term ) )
continue;
// escaping the returned value // esc_html(), esc_url(), esc_attr()
return esc_html($my_field);
}
}
Simply use <?php get_taxonomy_terms_custom_fields ('basic'); ?> replacing basic with you own taxonomy name.
The function get_taxonomy_terms_custom_fields () will check for the specified taxonomy and kind of loop through all categories assigned to a post, post_type and then return the custom field value if present, avoiding erros if not. It could also be extended to check for a field which produces an array() such as a repeatable field.
I hope it helps - Good Luck!
| wordpress | {
"language": "en",
"length": 464,
"provenance": "stackexchange_00019.jsonl.gz:438838",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/121080"
} | [
0.007732391357421875,
-0.0212860107421875,
-0.016448974609375,
-0.04461669921875,
-0.02716064453125,
-0.0018587112426757812,
-0.0206756591796875,
0.01849365234375,
0.005489349365234375,
-0.026214599609375,
-0.043365478515625,
0.00928497314453125,
-0.07647705078125,
-0.0233001708984375,
0.0141143798828125,
-0.0604248046875,
0.03399658203125,
-0.00823974609375,
0.04010009765625,
-0.005451202392578125,
0.01708984375,
0.01050567626953125,
0.0513916015625,
0.02008056640625,
0.0478515625,
-0.0614013671875,
0.0160675048828125,
0.00836944580078125,
0.019256591796875,
-0.0008111000061035156,
0.033935546875,
-0.00445556640625,
0.01375579833984375,
0.01104736328125,
-0.00106048583984375,
-0.01163482666015625,
0.023590087890625,
-0.0036468505859375,
-0.0027179718017578125,
0.038299560546875,
0.0266265869140625,
-0.003841400146484375,
-0.04638671875,
0.0248870849609375,
-0.0413818359375,
-0.05059814453125,
0.01971435546875,
-0.018768310546875,
-0.0089111328125,
0.0172271728515625,
0.0166778564453125,
0.0185699462890625,
0.0085906982421875,
0.0275421142578125,
-0.0020294189453125,
-0.004119873046875,
-0.005420684814453125,
-0.034820556640625,
0.0338134765625,
-0.01165008544921875,
-0.0189361572265625,
-0.034088134765625,
0.039306640625,
-0.00925445556640625,
0.0007915496826171875,
0.0169830322265625,
0.006908416748046875,
0.0167388916015625,
-0.00888824462890625,
-0.00240325927734375,
0.00971221923828125,
-0.015380859375,
0.0162200927734375,
0.019256591796875,
-0.0159149169921875,
-0.095458984375,
0.05364990234375,
-0.03460693359375,
-0.00994110107421875,
0.032501220703125,
-0.005863189697265625,
-0.02642822265625,
-0.06890869140625,
0.0614013671875,
-0.0364990234375,
0.0653076171875,
-0.00838470458984375,
-0.0310211181640625,
-0.031402587890625,
-0.04510498046875,
-0.01861572265625,
-0.017120361328125,
-0.0293121337890625,
-0.004878997802734375,
-0.0300445556640625,
-0.00826263427734375,
-0.004528045654296875,
0.034423828125,
-0.0219268798828125,
0.0194091796875,
-0.0168304443359375,
-0.026580810546875,
0.0163116455078125,
-0.034332275390625,
-0.00643157958984375,
0.040313720703125,
0.0153656005859375,
0.0111083984375,
0.004230499267578125,
0.0059967041015625,
0.00214385986328125,
-0.03326416015625,
-0.0157928466796875,
0.015533447265625,
-0.0131988525390625,
0.0223846435546875,
-0.031951904296875,
-0.024444580078125,
-0.039581298828125,
0.0021572113037109375,
0.006439208984375,
0.0240631103515625,
0.01473236083984375,
0.0202789306640625,
-0.019927978515625,
0.00836944580078125,
-0.010528564453125,
-0.041229248046875,
-0.042144775390625,
0.0250244140625,
-0.04241943359375,
0.00025582313537597656,
0.0958251953125,
0.06109619140625,
0.035430908203125,
-0.0234375,
-0.020416259765625,
-0.0233306884765625,
0.00860595703125,
-0.01136016845703125,
-0.0070343017578125,
-0.0099334716796875,
0.0345458984375,
-0.00833892822265625,
-0.0264129638671875,
0.0025882720947265625,
0.028778076171875,
0.0270233154296875,
-0.049591064453125,
-0.043243408203125,
0.0005536079406738281,
0.0180511474609375,
0.0386962890625,
0.037353515625,
-0.062286376953125,
0.01319122314453125,
0.0205535888671875,
-0.0285491943359375,
-0.0289764404296875,
-0.06158447265625,
0.02545166015625,
-0.01555633544921875,
0.01024627685546875,
0.00836181640625,
0.00962066650390625,
0.007488250732421875,
-0.029815673828125,
-0.01097869873046875,
0.0206298828125,
-0.020233154296875,
0.0498046875,
0.01654052734375,
0.009307861328125,
0.001514434814453125,
0.0184173583984375,
-0.0089569091796875,
-0.03082275390625,
0.047760009765625,
0.037078857421875,
-0.00391387939453125,
-0.007633209228515625,
-0.047088623046875,
0.052581787109375,
0.004100799560546875,
0.00385284423828125,
-0.0139617919921875,
0.004119873046875,
0.01413726806640625,
0.003269195556640625,
0.02508544921875,
-0.03326416015625,
0.004444122314453125,
-0.058197021484375,
0.00823211669921875,
0.01493072509765625,
0.0295867919921875,
-0.024505615234375,
0.0026149749755859375,
0.0002551078796386719,
-0.0226898193359375,
-0.0083160400390625,
0.01506805419921875,
-0.004611968994140625,
0.017730712890625,
-0.016937255859375,
-0.0016107559204101562,
0.00652313232421875,
0.0217742919921875,
-0.017242431640625,
0.031341552734375,
0.0189056396484375,
-0.008636474609375,
-0.0112762451171875,
-0.028564453125,
-0.01029205322265625,
-0.016265869140625,
0.00384521484375,
0.0323486328125,
-0.004486083984375,
0.00800323486328125,
0.01404571533203125,
-0.034088134765625,
0.006397247314453125,
0.055877685546875,
-0.00273895263671875,
0.0127105712890625,
-0.0026187896728515625,
0.0141143798828125,
0.0242156982421875,
0.0218353271484375,
0.0116424560546875,
-0.0200347900390625,
0.005603790283203125,
-0.021209716796875,
-0.025604248046875,
0.011993408203125,
0.00861358642578125,
-0.07586669921875,
0.0009279251098632812,
0.05413818359375,
0.03533935546875,
0.0260162353515625,
-0.0298919677734375,
-0.03631591796875,
0.08685302734375,
0.0162811279296875,
0.002166748046875,
-0.0352783203125,
0.04754638671875,
0.07855224609375,
-0.01934814453125,
-0.0102691650390625,
-0.0006585121154785156,
-0.039031982421875,
0.0005178451538085938,
0.02801513671875,
-0.01519775390625,
-0.0216064453125,
0.01666259765625,
-0.005615234375,
-0.007434844970703125,
-0.018218994140625,
-0.0139007568359375,
-0.00027561187744140625,
0.0230560302734375,
0.030059814453125,
0.026641845703125,
0.01177978515625,
-0.0361328125,
0.0221710205078125,
0.018096923828125,
-0.01509857177734375,
-0.004230499267578125,
-0.01393890380859375,
-0.00978851318359375,
-0.037872314453125,
-0.01119232177734375,
0.0227508544921875,
-0.0233154296875,
-0.03125,
0.00727081298828125,
0.042816162109375,
-0.0257568359375,
-0.01410675048828125,
-0.01580810546875,
-0.022003173828125,
-0.0108642578125,
0.023773193359375,
-0.02587890625,
-0.02099609375,
-0.007305145263671875,
0.0672607421875,
-0.012054443359375,
0.03045654296875,
-0.010650634765625,
0.00782012939453125,
-0.0017919540405273438,
-0.043182373046875,
0.036163330078125,
-0.05682373046875,
-0.0172271728515625,
0.040130615234375,
-0.00942230224609375,
-0.01178741455078125,
-0.00691986083984375,
-0.021514892578125,
-0.021697998046875,
0.02099609375,
-0.006134033203125,
-0.0404052734375,
-0.0278472900390625,
0.00907135009765625,
0.0209197998046875,
0.06915283203125,
0.005092620849609375,
-0.044342041015625,
-0.0036373138427734375,
0.041107177734375,
-0.08099365234375,
-0.0853271484375,
0.0159454345703125,
-0.051116943359375,
0.0282135009765625,
-0.01248931884765625,
-0.0186309814453125,
-0.0196990966796875,
0.01267242431640625,
0.0089874267578125,
0.057098388671875,
-0.05487060546875,
-0.049072265625,
-0.04949951171875,
-0.09918212890625,
-0.02508544921875,
0.01357269287109375,
0.006885528564453125,
-0.005138397216796875,
0.070556640625,
-0.00168609619140625,
-0.032745361328125,
0.00980377197265625,
-0.0173492431640625,
-0.005950927734375,
0.0145416259765625,
0.003269195556640625,
-0.036468505859375,
0.0009732246398925781,
-0.01114654541015625,
0.0086669921875,
0.00946807861328125,
-0.0037784576416015625,
-0.00696563720703125,
-0.018768310546875,
0.00011271238327026367,
0.01450347900390625,
-0.0149383544921875,
0.00592803955078125,
0.005126953125,
0.00557708740234375,
-0.039794921875,
-0.0152587890625,
-0.00768280029296875,
-0.0160369873046875,
0.08099365234375,
-0.015106201171875,
-0.00614166259765625,
0.01198577880859375,
0.0537109375,
-0.05328369140625,
-0.0269775390625,
-0.039093017578125,
-0.057373046875,
0.03759765625,
0.0018758773803710938,
-0.01715087890625,
0.050048828125,
0.03302001953125,
-0.0160980224609375,
0.01187896728515625,
0.025543212890625,
0.00449371337890625,
-0.02996826171875,
0.0220184326171875,
-0.044189453125,
-0.0732421875,
0.037109375,
-0.060882568359375,
-0.0290069580078125,
-0.0235137939453125,
-0.0039825439453125,
0.0258941650390625,
0.09375,
-0.023956298828125,
-0.0009493827819824219,
0.0178985595703125,
0.00833892822265625,
-0.003414154052734375,
-0.04119873046875,
-0.043731689453125,
-0.02886962890625,
-0.082275390625,
0.01157379150390625,
0.0016326904296875,
-0.010345458984375,
-0.034881591796875,
0.035675048828125,
-0.0721435546875,
-0.033416748046875,
0.0220794677734375,
-0.046051025390625,
0.0112457275390625,
0.022857666015625,
-0.0010461807250976562,
0.005558013916015625,
-0.0147552490234375,
-0.03106689453125,
-0.01161956787109375,
-0.013427734375,
0.037384033203125,
0.00743865966796875,
-0.0186004638671875,
0.007568359375,
0.01474761962890625,
0.038330078125,
-0.00417327880859375,
0.00208282470703125,
-0.0040130615234375,
0.00240325927734375,
0.005126953125,
0.00146484375,
-0.00044989585876464844,
-0.0175323486328125,
-0.002628326416015625,
-0.030975341796875,
-0.01519012451171875,
0.01556396484375,
-0.0303497314453125,
0.035675048828125,
-0.0175628662109375,
-0.017425537109375,
-0.05133056640625,
0.007091522216796875,
-0.04815673828125,
-0.034027099609375,
-0.00910186767578125,
-0.029052734375,
0.01235198974609375,
-0.07049560546875,
0.037322998046875,
0.047607421875,
-0.011932373046875,
0.01168060302734375,
0.0457763671875,
0.0096435546875,
-0.02789306640625,
-0.06103515625,
0.00140380859375,
0.04266357421875,
0.007843017578125,
0.026092529296875,
0.00617218017578125,
-0.04351806640625,
0.08428955078125,
0.01080322265625,
0.024383544921875,
-0.028411865234375,
0.048980712890625,
-0.003223419189453125,
-0.01300048828125,
0.0222625732421875,
0.0068206787109375,
-0.020843505859375,
0.020416259765625,
-0.029022216796875,
-0.0504150390625,
-0.00005525350570678711,
0.07452392578125,
-0.06671142578125,
0.0894775390625,
-0.04046630859375,
-0.068115234375,
0.03515625,
-0.033355712890625,
-0.00728607177734375,
0.0005354881286621094,
0.003276824951171875,
0.02532958984375,
-0.01030731201171875,
0.0017185211181640625,
-0.0167083740234375,
-0.0130462646484375,
-0.0013027191162109375,
0.0085296630859375,
0.01861572265625,
-0.0048828125,
-0.004680633544921875,
-0.006855010986328125,
0.036865234375,
-0.028045654296875,
-0.052734375,
0.0013599395751953125,
-0.027008056640625,
0.004573822021484375,
0.050201416015625,
-0.025482177734375,
0.034912109375,
0.0474853515625,
-0.0041656494140625,
0.01171875,
-0.018890380859375,
0.01007843017578125,
-0.023773193359375,
0.005947113037109375,
0.003421783447265625,
-0.0153656005859375,
-0.0304107666015625,
0.088623046875,
-0.00848388671875,
0.0151214599609375,
-0.0174102783203125,
0.033660888671875,
0.0239715576171875,
0.0256195068359375,
0.032745361328125,
-0.0102691650390625,
0.00811767578125,
-0.0189361572265625,
-0.01062774658203125,
-0.0298919677734375,
-0.01212310791015625,
-0.029998779296875,
0.01085662841796875,
-0.0274200439453125,
-0.002628326416015625,
0.07012939453125,
0.0117034912109375,
-0.0126800537109375,
-0.007205963134765625,
-0.049224853515625,
-0.0237579345703125,
-0.0188140869140625,
0.0095062255859375,
0.024017333984375,
0.005157470703125,
0.0002853870391845703,
0.0063323974609375,
-0.0195770263671875,
0.06414794921875,
-0.05755615234375,
0.06414794921875,
-0.033843994140625,
-0.05126953125,
-0.01386260986328125,
0.0101470947265625,
0.00025177001953125,
-0.0279693603515625,
-0.04571533203125,
-0.006099700927734375,
-0.0191650390625,
0.055694580078125,
-0.01212310791015625,
0.026275634765625,
-0.030517578125,
-0.00907135009765625,
-0.01192474365234375,
-0.0240020751953125,
0.0810546875,
0.053497314453125,
-0.04803466796875,
0.027923583984375,
-0.0328369140625,
0.011016845703125,
-0.0016841888427734375,
-0.049468994140625,
-0.025238037109375,
-0.03564453125,
-0.01560211181640625,
0.011993408203125,
0.0135650634765625,
-0.0012722015380859375,
0.00531768798828125,
0.0183868408203125,
-0.004955291748046875,
0.01477813720703125,
0.03900146484375,
-0.00884246826171875,
-0.00970458984375,
0.047882080078125,
0.035125732421875,
-0.0120849609375,
-0.03802490234375,
-0.041534423828125,
-0.02294921875,
-0.048492431640625,
0.019012451171875,
0.0037384033203125,
0.0113525390625,
0.0198516845703125,
0.02398681640625,
0.0213470458984375,
0.01154327392578125,
0.0016489028930664062,
0.00457000732421875,
-0.01261138916015625,
0.0009756088256835938,
0.006351470947265625,
0.00036144256591796875,
0.030303955078125,
-0.01971435546875,
-0.00615692138671875,
-0.0035915374755859375,
0.0014505386352539062,
0.0279541015625,
-0.0245208740234375,
0.0235443115234375,
0.0024509429931640625,
-0.0261688232421875,
0.04425048828125,
0.03533935546875,
-0.0037631988525390625,
0.01390838623046875,
0.0077056884765625,
0.00377655029296875,
-0.01800537109375,
0.06890869140625,
-0.05047607421875,
-0.061248779296875,
0.0380859375,
0.029296875,
-0.04913330078125,
0.019439697265625,
-0.03253173828125,
-0.00794219970703125,
0.0263671875,
0.049560546875,
-0.0167083740234375,
-0.004596710205078125,
0.037261962890625,
-0.040191650390625,
-0.052734375,
0.0103759765625,
-0.0161895751953125,
-0.0367431640625,
-0.02874755859375,
0.0056304931640625,
-0.0119476318359375,
-0.0167388916015625,
0.00946044921875,
-0.0142974853515625,
-0.0038356781005859375,
0.032684326171875,
0.0169525146484375,
-0.008056640625,
0.0008287429809570312,
0.00917816162109375,
0.01042938232421875,
-0.0172271728515625,
-0.00443267822265625,
-0.00406646728515625,
-0.04376220703125,
-0.07666015625,
-0.0187835693359375,
-0.018218994140625,
-0.00677490234375,
0.0275726318359375,
0.0245819091796875,
0.040618896484375,
0.038726806640625,
0.015655517578125,
0.00568389892578125,
0.0019140243530273438,
-0.009674072265625,
0.00853729248046875,
-0.0279541015625,
-0.002704620361328125,
0.040802001953125,
-0.040771484375,
0.020660400390625,
0.000553131103515625,
-0.0130157470703125,
-0.01092529296875,
0.0287628173828125,
0.08636474609375,
-0.031280517578125,
-0.0188751220703125,
0.0367431640625,
0.045562744140625,
-0.0185394287109375,
0.0036640167236328125,
0.0216217041015625,
-0.0231170654296875,
-0.0016412734985351562,
0.015228271484375,
-0.010833740234375,
-0.0004165172576904297,
0.0193023681640625,
-0.0716552734375,
0.096435546875,
0.0323486328125,
0.0040435791015625,
-0.0245361328125,
0.0533447265625,
-0.0267486572265625,
0.02398681640625,
-0.03985595703125,
0.017059326171875,
0.03192138671875,
0.01282501220703125,
-0.08013916015625,
-0.034820556640625,
-0.03851318359375,
0.0618896484375,
0.04083251953125,
-0.0011682510375976562,
0.01032257080078125,
0.01490020751953125,
0.0633544921875,
0.03228759765625,
-0.01654052734375,
0.00582122802734375,
0.049530029296875,
0.046600341796875,
0.08721923828125,
-0.0169219970703125,
0.043243408203125,
-0.01154327392578125,
0.0279083251953125,
0.065185546875,
0.012481689453125,
0.0182647705078125,
-0.004589080810546875,
-0.0016489028930664062,
-0.0382080078125,
-0.002429962158203125,
0.0357666015625,
-0.01751708984375,
0.0004856586456298828,
0.0347900390625,
0.027252197265625,
-0.01163482666015625,
0.063720703125,
-0.032257080078125,
0.05108642578125,
-0.01041412353515625,
0.02911376953125,
0.041900634765625,
0.0050048828125,
0.069580078125,
0.005496978759765625,
0.0202484130859375,
-0.00011283159255981445,
0.032562255859375,
0.0149993896484375,
0.0009946823120117188,
0.00832366943359375,
-0.03228759765625,
0.036590576171875,
0.031341552734375,
0.0211029052734375,
-0.04449462890625,
-0.01175689697265625,
0.0179443359375,
0.014404296875,
0.0018520355224609375,
0.01387786865234375,
0.040283203125,
0.07965087890625,
0.0657958984375,
-0.07623291015625,
0.01812744140625,
0.04473876953125,
0.04498291015625,
-0.017364501953125,
-0.01461029052734375,
-0.08770751953125,
-0.01245880126953125,
-0.04864501953125,
-0.01180267333984375,
0.0008296966552734375,
0.06622314453125,
0.0350341796875,
0.050628662109375,
-0.025421142578125,
-0.0300445556640625,
0.006496429443359375,
0.030487060546875,
0.036468505859375,
-0.01131439208984375,
0.0081329345703125,
0.004489898681640625,
-0.005832672119140625,
0.0006499290466308594,
-0.0252532958984375,
0.0338134765625,
0.01416778564453125,
0.02362060546875,
-0.01294708251953125,
-0.01343536376953125,
0.041168212890625,
-0.0299530029296875,
-0.0095977783203125,
-0.0587158203125,
-0.006038665771484375,
0.0080413818359375,
-0.016937255859375,
0.0189971923828125,
-0.041748046875,
0.03778076171875,
-0.01316070556640625,
0.0203094482421875,
-0.0007739067077636719,
-0.0275421142578125,
0.023590087890625,
-0.046112060546875,
0.040069580078125,
-0.003498077392578125,
-0.01348114013671875,
0.0224151611328125,
-0.052978515625,
-0.07159423828125,
0.015716552734375,
0.04998779296875,
0.0186614990234375,
-0.0222015380859375,
-0.03857421875,
-0.003986358642578125,
-0.0308990478515625,
0.03546142578125,
-0.00940704345703125,
-0.0211334228515625,
0.0182952880859375,
-0.0253143310546875,
0.0023708343505859375,
-0.01399993896484375,
0.00148773193359375,
0.03424072265625,
-0.016021728515625,
0.00611114501953125,
-0.003814697265625,
0.0247650146484375,
-0.0271148681640625,
0.0176849365234375,
-0.047637939453125,
-0.02276611328125,
0.038909912109375,
0.00794219970703125,
-0.01447296142578125,
-0.0016870498657226562,
-0.03424072265625,
0.01751708984375,
0.045379638671875,
-0.028564453125,
0.0030765533447265625,
0.007476806640625,
0.0169525146484375,
-0.00940704345703125,
0.0312042236328125,
-0.00179290771484375,
-0.034637451171875,
-0.0478515625,
-0.0198516845703125,
0.05206298828125,
0.07904052734375,
0.00757598876953125,
-0.01094818115234375,
0.04351806640625,
-0.0102691650390625,
0.030853271484375,
0.0007557868957519531,
0.068359375,
0.040679931640625,
-0.01451873779296875,
0.0003714561462402344,
-0.0010480880737304688,
-0.031463623046875,
0.038665771484375,
-0.0148468017578125,
0.0301666259765625,
0.0102996826171875,
-0.0093536376953125,
0.005863189697265625,
-0.030303955078125,
0.0196685791015625,
-0.01617431640625,
-0.0022907257080078125,
-0.01000213623046875,
0.02081298828125,
0.003177642822265625,
-0.08062744140625,
-0.0228118896484375,
-0.02496337890625,
-0.00047588348388671875,
0.03155517578125,
0.0024127960205078125,
-0.0225830078125,
-0.020965576171875,
-0.0041046142578125,
0.0214691162109375,
-0.022216796875,
0.0298309326171875,
-0.0152587890625,
-0.043487548828125,
-0.0217742919921875,
0.01277923583984375,
-0.03656005859375,
0.034210205078125,
0.06341552734375,
-0.0181121826171875,
0.004970550537109375,
-0.0147857666015625,
-0.024627685546875,
-0.0048675537109375,
0.01528167724609375,
0.0175018310546875,
-0.0191650390625,
-0.001506805419921875,
0.0235443115234375,
0.0068817138671875,
0.060211181640625,
0.0008482933044433594,
-0.03790283203125,
0.00972747802734375,
-0.010040283203125,
-0.0257568359375,
-0.0253753662109375,
0.047637939453125,
-0.080322265625,
-0.0157928466796875,
0.0009784698486328125,
0.0204315185546875,
0.057037353515625,
-0.0303497314453125,
-0.06915283203125,
0.029388427734375,
-0.016998291015625,
-0.04095458984375,
-0.0258331298828125,
-0.048095703125,
0.005771636962890625,
0.005573272705078125,
-0.0011281967163085938,
-0.042694091796875,
-0.08447265625,
0.0178680419921875,
0.03369140625,
-0.0408935546875,
0.05340576171875,
0.041717529296875,
-0.1339111328125,
-0.0054168701171875,
-0.04833984375,
0.0176239013671875,
0.01013946533203125,
-0.0204010009765625,
-0.011688232421875,
0.005817413330078125,
-0.06201171875,
-0.08203125,
-0.0194549560546875,
0.0089569091796875,
-0.006679534912109375,
-0.041534423828125,
-0.0168609619140625,
-0.0267791748046875,
0.06793212890625,
-0.01544189453125,
0.01519012451171875,
-0.0106353759765625,
-0.0484619140625,
-0.013916015625,
-0.03399658203125,
-0.049407958984375,
0.043670654296875,
-0.1048583984375,
-0.0117034912109375,
-0.01387786865234375,
0.007358551025390625,
0.0013141632080078125,
-0.0435791015625,
-0.0165252685546875,
-0.01216888427734375,
0.0052642822265625,
0.0190277099609375,
-0.03387451171875,
-0.003971099853515625,
-0.00835418701171875,
-0.0114898681640625,
-0.00206756591796875,
-0.01035308837890625,
0.012664794921875,
-0.010955810546875,
0.0180511474609375,
-0.006031036376953125,
-0.0152435302734375,
-0.0287017822265625,
-0.0041351318359375,
0.003143310546875,
0.018524169921875,
0.0191650390625,
-0.02362060546875,
-0.0294189453125,
0.01485443115234375,
-0.01412200927734375,
0.010467529296875,
0.0042266845703125,
0.01360321044921875,
0.0221099853515625,
0.0496826171875,
-0.023590087890625,
0.02203369140625,
-0.026336669921875,
0.02783203125,
-0.0447998046875,
0.01251220703125,
-0.012969970703125,
-0.013275146484375,
0.007007598876953125,
0.012451171875,
0.00460052490234375,
-0.007160186767578125,
0.014312744140625,
0.0279083251953125,
0.00787353515625,
0.00615692138671875
]
|
539b298175f08423deca2ffc8ba78076994ac712 | Wordpress Stackexchange
Q: Get wp_get_attachment_url outside of loop I need to get the featured image outside the loop. This is so that I can have a different full-screen background image for each page, set by the featured image.
After doing some research I was able to get the post ID outside the loop.
This is what I've got:
$page_object = get_queried_object();
$page_id = get_queried_object_id();
$bkgdImg = wp_get_attachment_url( $page_id );
if (!empty($bkgdImg)) {
$backgroundImg = $bkgdImg;
}
else {
$defaultbackground = . get_template_directory_uri() . "/images/default-background.jpg";
$backgroundImg = $defaultBackground;
}
echo $backgroundImg;
Thanks!
A: if the result you're looking for is a printout of the URL, like in your example, then this should work:
$page_id = get_queried_object_id();
if ( has_post_thumbnail( $page_id ) ) :
$image_array = wp_get_attachment_image_src( get_post_thumbnail_id( $page_id ), 'optional-size' );
$image = $image_array[0];
else :
$image = get_template_directory_uri() . '/images/default-background.jpg';
endif;
echo $image;
| Q: Get wp_get_attachment_url outside of loop I need to get the featured image outside the loop. This is so that I can have a different full-screen background image for each page, set by the featured image.
After doing some research I was able to get the post ID outside the loop.
This is what I've got:
$page_object = get_queried_object();
$page_id = get_queried_object_id();
$bkgdImg = wp_get_attachment_url( $page_id );
if (!empty($bkgdImg)) {
$backgroundImg = $bkgdImg;
}
else {
$defaultbackground = . get_template_directory_uri() . "/images/default-background.jpg";
$backgroundImg = $defaultBackground;
}
echo $backgroundImg;
Thanks!
A: if the result you're looking for is a printout of the URL, like in your example, then this should work:
$page_id = get_queried_object_id();
if ( has_post_thumbnail( $page_id ) ) :
$image_array = wp_get_attachment_image_src( get_post_thumbnail_id( $page_id ), 'optional-size' );
$image = $image_array[0];
else :
$image = get_template_directory_uri() . '/images/default-background.jpg';
endif;
echo $image;
A: You have a couple of syntax errors, but in your question you state that...
This is so that I can have a different full-screen background image
for each page, set by the featured image.
wp_get_attachment_url takes the actual attachment ID, not the page ID to which the featured image is attached. I therefore assume that the question is "Why am I not getting the image URL that I expect?"
What you need is to use get_post_thumbnail_id and pass that to wp_get_attacment_url...
$bkgdImg = wp_get_attachment_url(get_post_thumbnail_id( $page_id ));
... possibly with a second argument to specify size.
I hope I guessed correctly :)
A: Little late here, but I created a solution that is a bit cleaner and reusable with some of the suggestions in this thread. Add this anywhere in your functions.php file, then simply call this function wherever you need it. You can supply the post id if you have it, if not it's not required.
function iprice_get_attachment_url($post_id = null) {
$post = $post_id ? get_post( $post_id ) : get_post( get_the_ID() );
$thumbnail_id = get_post_thumbnail_id($post);
$thumbnail_url = wp_get_attachment_url($thumbnail_id);
return apply_filters( 'wp_get_attachment_url', $thumbnail_url, $post );
}
A: This got it working and got me the image URL:
$page_id = get_queried_object_id();
$post_thumbnail_id = get_post_thumbnail_id( $page_id );
$bkgdImg = wp_get_attachment_url( $post_thumbnail_id );
echo $bkgdImg;
Thanks for all your help, it put me in the right direction.
A: Add theme support for thumbnail add_theme_support('post-thumbnails');
Then write the below code on your archive page. It works before your WordPress loop
$thumb_id = get_post_thumbnail_id();
$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail-size', true);
$thumb_url = $thumb_url_array[0];
echo $thumb_url;
| wordpress | {
"language": "en",
"length": 400,
"provenance": "stackexchange_00019.jsonl.gz:438843",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/121089"
} | [
0.059906005859375,
-0.0218048095703125,
0.027587890625,
-0.056488037109375,
0.0170440673828125,
-0.014434814453125,
0.0341796875,
-0.0246429443359375,
0.037689208984375,
0.0108795166015625,
-0.054595947265625,
0.002994537353515625,
-0.057403564453125,
0.007366180419921875,
-0.049652099609375,
-0.03533935546875,
0.05816650390625,
-0.0308837890625,
0.045928955078125,
0.01485443115234375,
0.00469970703125,
0.04913330078125,
0.0280914306640625,
0.03936767578125,
0.0211639404296875,
-0.0271148681640625,
0.042449951171875,
0.0036773681640625,
-0.00550079345703125,
-0.015960693359375,
0.006137847900390625,
0.0250091552734375,
-0.01055145263671875,
0.0255126953125,
0.00789642333984375,
-0.0215911865234375,
0.004146575927734375,
0.01242828369140625,
0.00452423095703125,
0.0179443359375,
0.01248931884765625,
0.0032215118408203125,
0.02191162109375,
0.0153045654296875,
-0.032806396484375,
-0.0140228271484375,
0.0080108642578125,
-0.0178375244140625,
0.0282745361328125,
0.0469970703125,
0.0166473388671875,
0.038177490234375,
0.00708770751953125,
0.0645751953125,
-0.01416778564453125,
-0.005237579345703125,
0.0179443359375,
-0.00337982177734375,
0.061981201171875,
-0.03857421875,
-0.06976318359375,
-0.043060302734375,
0.05023193359375,
-0.03961181640625,
0.0123443603515625,
0.0006747245788574219,
-0.00946044921875,
0.0214996337890625,
-0.03753662109375,
-0.0007462501525878906,
0.0205230712890625,
-0.040374755859375,
-0.034088134765625,
-0.06219482421875,
-0.03314208984375,
0.04010009765625,
-0.0023193359375,
-0.065185546875,
-0.01629638671875,
-0.00844573974609375,
-0.01119232177734375,
-0.048858642578125,
-0.05072021484375,
0.027679443359375,
0.00902557373046875,
0.06939697265625,
-0.011138916015625,
-0.01934814453125,
-0.016448974609375,
-0.0003387928009033203,
-0.0217437744140625,
0.007701873779296875,
0.01345062255859375,
-0.0214080810546875,
-0.03118896484375,
-0.03387451171875,
0.02911376953125,
0.039398193359375,
-0.0213165283203125,
0.019439697265625,
0.001239776611328125,
-0.04364013671875,
0.05218505859375,
-0.04595947265625,
0.005214691162109375,
0.0289154052734375,
0.01522064208984375,
-0.01506805419921875,
0.01214599609375,
0.007495880126953125,
-0.018280029296875,
0.0164337158203125,
-0.003871917724609375,
-0.00872039794921875,
-0.01513671875,
0.005397796630859375,
-0.048187255859375,
0.0010595321655273438,
-0.003173828125,
-0.032012939453125,
-0.006870269775390625,
-0.002429962158203125,
0.0318603515625,
-0.0419921875,
0.01239013671875,
0.00699615478515625,
-0.038604736328125,
-0.039276123046875,
0.0034427642822265625,
0.0406494140625,
-0.039093017578125,
0.00586700439453125,
0.05035400390625,
-0.01142120361328125,
-0.007068634033203125,
-0.0208282470703125,
-0.021728515625,
-0.0008802413940429688,
0.0131683349609375,
0.01374053955078125,
-0.0110626220703125,
-0.031219482421875,
0.0325927734375,
0.01027679443359375,
-0.00833892822265625,
0.0233612060546875,
0.0218353271484375,
0.016387939453125,
-0.01739501953125,
-0.0877685546875,
0.03900146484375,
-0.018890380859375,
0.005283355712890625,
0.03436279296875,
0.0298309326171875,
-0.0232391357421875,
0.053680419921875,
-0.0207977294921875,
0.0275115966796875,
-0.03515625,
0.02764892578125,
0.0147552490234375,
0.026336669921875,
0.0012025833129882812,
-0.01416778564453125,
-0.01308441162109375,
-0.048126220703125,
-0.01343536376953125,
0.028350830078125,
0.04144287109375,
0.0037288665771484375,
-0.02008056640625,
0.007251739501953125,
0.004230499267578125,
-0.01605224609375,
0.0108795166015625,
0.027191162109375,
-0.02191162109375,
0.01546478271484375,
0.0277099609375,
-0.042724609375,
-0.048431396484375,
0.0238037109375,
-0.046722412109375,
-0.053802490234375,
0.04241943359375,
0.01021575927734375,
0.0660400390625,
0.0205230712890625,
0.0203399658203125,
0.051025390625,
0.00887298583984375,
-0.0703125,
0.039154052734375,
-0.0322265625,
-0.011322021484375,
-0.007175445556640625,
0.019805908203125,
-0.0234222412109375,
-0.00666046142578125,
0.036407470703125,
-0.006603240966796875,
0.0196990966796875,
-0.004638671875,
0.0198822021484375,
-0.00836181640625,
0.0015001296997070312,
0.01186370849609375,
-0.0380859375,
0.0220947265625,
0.0260009765625,
0.0031223297119140625,
-0.01509857177734375,
-0.038726806640625,
0.007266998291015625,
0.0244293212890625,
0.0032405853271484375,
-0.005657196044921875,
0.003734588623046875,
0.04583740234375,
-0.024749755859375,
0.00896453857421875,
-0.02606201171875,
0.005397796630859375,
0.0806884765625,
0.0037708282470703125,
-0.022430419921875,
-0.038177490234375,
0.0384521484375,
0.01544952392578125,
-0.073974609375,
0.033782958984375,
-0.0162506103515625,
-0.006011962890625,
-0.0290069580078125,
-0.0025177001953125,
0.0205535888671875,
-0.052947998046875,
0.0189971923828125,
0.050506591796875,
0.035369873046875,
0.040618896484375,
-0.0248260498046875,
-0.036773681640625,
0.10992431640625,
0.031280517578125,
0.0104827880859375,
-0.03338623046875,
0.0108795166015625,
0.01678466796875,
-0.032745361328125,
-0.004268646240234375,
0.02850341796875,
-0.04541015625,
0.0078887939453125,
0.048095703125,
-0.007770538330078125,
-0.01070404052734375,
-0.0294036865234375,
0.041961669921875,
-0.0023651123046875,
0.047760009765625,
0.004810333251953125,
0.004558563232421875,
-0.002185821533203125,
0.005352020263671875,
0.01763916015625,
0.0033359527587890625,
-0.0189971923828125,
-0.00890350341796875,
0.01342010498046875,
-0.022552490234375,
-0.0038738250732421875,
0.0261993408203125,
0.01568603515625,
-0.021728515625,
0.0010280609130859375,
-0.00928497314453125,
-0.01056671142578125,
-0.005767822265625,
-0.0045013427734375,
0.0281982421875,
0.005748748779296875,
-0.011871337890625,
-0.0179595947265625,
-0.0643310546875,
0.01385498046875,
0.0144195556640625,
-0.01922607421875,
0.0017232894897460938,
0.008880615234375,
0.056915283203125,
0.0017309188842773438,
0.0377197265625,
-0.022613525390625,
0.010894775390625,
0.032958984375,
-0.0033111572265625,
0.02056884765625,
-0.0218048095703125,
0.042022705078125,
0.046173095703125,
-0.04290771484375,
0.040618896484375,
-0.00673675537109375,
-0.00783538818359375,
0.01454925537109375,
-0.0079193115234375,
-0.024017333984375,
0.009429931640625,
-0.06475830078125,
0.0098114013671875,
-0.0033512115478515625,
0.03265380859375,
-0.03570556640625,
-0.055389404296875,
-0.032379150390625,
-0.0144195556640625,
-0.1104736328125,
-0.0972900390625,
0.037994384765625,
-0.058868408203125,
-0.046630859375,
-0.03326416015625,
-0.05828857421875,
0.0251922607421875,
-0.0230712890625,
-0.0188446044921875,
-0.0005884170532226562,
-0.0185699462890625,
-0.06414794921875,
-0.07427978515625,
-0.08172607421875,
-0.041595458984375,
-0.00878143310546875,
0.01549530029296875,
0.003383636474609375,
0.002147674560546875,
0.005462646484375,
-0.0168914794921875,
0.00269317626953125,
0.053070068359375,
0.006038665771484375,
-0.025970458984375,
-0.0318603515625,
0.011810302734375,
-0.04425048828125,
-0.001983642578125,
-0.002117156982421875,
0.0031032562255859375,
-0.0019588470458984375,
0.0203399658203125,
-0.0279083251953125,
-0.03192138671875,
-0.02581787109375,
0.038909912109375,
0.039154052734375,
-0.005710601806640625,
0.0260162353515625,
-0.04095458984375,
-0.044036865234375,
-0.0302276611328125,
-0.0731201171875,
0.03997802734375,
0.050201416015625,
0.02490234375,
0.01204681396484375,
-0.007381439208984375,
0.00568389892578125,
0.0051116943359375,
-0.02301025390625,
-0.01528167724609375,
0.048980712890625,
-0.00461578369140625,
0.0184783935546875,
-0.00524139404296875,
0.0291748046875,
-0.0013217926025390625,
-0.00818634033203125,
0.00775909423828125,
0.0374755859375,
0.01837158203125,
-0.01522064208984375,
-0.0258636474609375,
-0.0294342041015625,
0.046356201171875,
-0.0169830322265625,
0.0193023681640625,
-0.05096435546875,
-0.0257720947265625,
-0.028594970703125,
0.062347412109375,
-0.038665771484375,
-0.031494140625,
-0.0290374755859375,
0.012969970703125,
-0.02020263671875,
-0.028228759765625,
-0.00225067138671875,
0.0006418228149414062,
-0.09002685546875,
0.00901031494140625,
-0.008392333984375,
-0.007122039794921875,
0.0029621124267578125,
0.01861572265625,
-0.0350341796875,
-0.0645751953125,
0.014892578125,
0.029571533203125,
-0.00252532958984375,
0.057525634765625,
-0.0231781005859375,
0.057861328125,
-0.028106689453125,
-0.0021839141845703125,
-0.09356689453125,
-0.00995635986328125,
0.00574493408203125,
0.053192138671875,
-0.02178955078125,
0.03143310546875,
-0.0303192138671875,
0.044677734375,
-0.00443267822265625,
0.0123748779296875,
0.00806427001953125,
0.02862548828125,
-0.0310211181640625,
-0.0149993896484375,
0.0256195068359375,
-0.0478515625,
0.00441741943359375,
-0.035247802734375,
-0.054840087890625,
-0.05047607421875,
-0.04669189453125,
-0.002010345458984375,
0.004550933837890625,
-0.007843017578125,
-0.005603790283203125,
0.0211334228515625,
0.036651611328125,
0.049560546875,
0.00670623779296875,
-0.006622314453125,
-0.00946044921875,
-0.0026035308837890625,
0.04302978515625,
0.02362060546875,
-0.025421142578125,
-0.00377655029296875,
0.05517578125,
0.02239990234375,
-0.033172607421875,
-0.046295166015625,
-0.01849365234375,
0.0479736328125,
0.01544189453125,
0.035552978515625,
0.038970947265625,
-0.03216552734375,
0.053558349609375,
0.040313720703125,
-0.02978515625,
0.01947021484375,
0.0892333984375,
-0.0120086669921875,
-0.03515625,
0.01378631591796875,
-0.051361083984375,
-0.0120697021484375,
0.0086212158203125,
-0.02032470703125,
0.007305145263671875,
-0.011383056640625,
0.0203704833984375,
-0.005764007568359375,
0.00849151611328125,
-0.0312347412109375,
-0.0296173095703125,
-0.008819580078125,
0.00981903076171875,
0.062225341796875,
0.043182373046875,
-0.017822265625,
0.048248291015625,
0.044464111328125,
0.024627685546875,
0.039947509765625,
0.013885498046875,
0.0390625,
0.04486083984375,
0.0352783203125,
0.03302001953125,
-0.0036144256591796875,
0.0127716064453125,
-0.0289764404296875,
-0.0208587646484375,
-0.02435302734375,
-0.056640625,
0.01378631591796875,
0.0157928466796875,
0.0081634521484375,
-0.01885986328125,
0.052490234375,
0.01218414306640625,
-0.0284423828125,
-0.03924560546875,
-0.035614013671875,
-0.035888671875,
-0.07550048828125,
0.033294677734375,
0.017822265625,
-0.00968170166015625,
0.0233306884765625,
0.061126708984375,
-0.01451873779296875,
0.027435302734375,
-0.008941650390625,
0.0064239501953125,
-0.0055389404296875,
0.0223236083984375,
-0.0169830322265625,
0.0357666015625,
-0.00460052490234375,
0.0173797607421875,
0.046234130859375,
-0.02337646484375,
0.0218505859375,
0.024017333984375,
0.07659912109375,
-0.0231170654296875,
-0.05853271484375,
0.00014507770538330078,
-0.06451416015625,
-0.007205963134765625,
0.044342041015625,
0.00572967529296875,
-0.0438232421875,
-0.03173828125,
0.017974853515625,
0.0648193359375,
-0.010162353515625,
-0.034515380859375,
0.01316070556640625,
-0.007358551025390625,
0.01512908935546875,
-0.0036067962646484375,
-0.05670166015625,
0.042724609375,
0.039825439453125,
-0.0380859375,
-0.01169586181640625,
-0.0262298583984375,
0.0233306884765625,
-0.0061492919921875,
-0.0172271728515625,
-0.0172271728515625,
0.0305023193359375,
-0.04730224609375,
0.0299835205078125,
-0.01177215576171875,
-0.01561737060546875,
-0.042694091796875,
0.0187530517578125,
0.0496826171875,
0.043853759765625,
0.0181884765625,
0.016998291015625,
-0.0382080078125,
-0.007053375244140625,
0.03680419921875,
-0.061798095703125,
-0.0146484375,
-0.05279541015625,
0.0253753662109375,
0.023529052734375,
0.0180206298828125,
0.0119171142578125,
-0.01116180419921875,
0.024322509765625,
0.004085540771484375,
0.07183837890625,
-0.00982666015625,
0.01319122314453125,
0.00872039794921875,
-0.0082244873046875,
0.01165008544921875,
-0.00505828857421875,
-0.01983642578125,
-0.00121307373046875,
-0.042266845703125,
-0.0457763671875,
0.054931640625,
0.035858154296875,
0.0201263427734375,
0.0015268325805664062,
-0.01123809814453125,
0.042633056640625,
-0.007358551025390625,
-0.017547607421875,
-0.012847900390625,
-0.03643798828125,
0.042633056640625,
-0.00685882568359375,
0.0003437995910644531,
-0.018798828125,
-0.019622802734375,
-0.031524658203125,
-0.00939178466796875,
0.017822265625,
-0.014007568359375,
-0.0200958251953125,
-0.038543701171875,
0.0211029052734375,
-0.04345703125,
0.052459716796875,
0.10577392578125,
0.0072174072265625,
0.0494384765625,
0.0200958251953125,
-0.00021529197692871094,
0.0164337158203125,
0.0369873046875,
-0.004825592041015625,
-0.05072021484375,
0.08111572265625,
0.02655029296875,
-0.004642486572265625,
0.08660888671875,
-0.03515625,
0.032196044921875,
-0.043212890625,
0.05438232421875,
0.0310211181640625,
0.021881103515625,
0.026702880859375,
-0.0186004638671875,
0.05096435546875,
0.03607177734375,
0.00942230224609375,
0.02130126953125,
0.0238800048828125,
-0.031829833984375,
-0.0026531219482421875,
0.01107025146484375,
0.0013761520385742188,
0.00865936279296875,
-0.006076812744140625,
0.030914306640625,
0.0020923614501953125,
-0.062042236328125,
-0.0155029296875,
0.041717529296875,
-0.01873779296875,
-0.038787841796875,
0.0290069580078125,
-0.032684326171875,
-0.00400543212890625,
-0.039794921875,
-0.004337310791015625,
0.011566162109375,
0.00006395578384399414,
0.0052032470703125,
-0.00010055303573608398,
0.0169677734375,
0.0251007080078125,
0.0103759765625,
-0.0010557174682617188,
0.00029158592224121094,
-0.021270751953125,
0.01434326171875,
0.01837158203125,
0.0054931640625,
0.006526947021484375,
-0.0223388671875,
0.0009179115295410156,
-0.035247802734375,
0.0347900390625,
-0.020050048828125,
-0.01393890380859375,
0.07452392578125,
-0.047149658203125,
-0.0062103271484375,
0.028839111328125,
0.0251007080078125,
-0.01410675048828125,
0.0028591156005859375,
0.053863525390625,
-0.041717529296875,
-0.02813720703125,
0.0300445556640625,
-0.0243682861328125,
-0.026336669921875,
-0.01422119140625,
-0.05120849609375,
0.0494384765625,
-0.00980377197265625,
0.0347900390625,
0.01068878173828125,
0.007724761962890625,
0.005352020263671875,
-0.0060882568359375,
-0.0117645263671875,
0.00164794921875,
-0.004833221435546875,
0.0036182403564453125,
-0.0032367706298828125,
0.01218414306640625,
-0.01081085205078125,
0.026031494140625,
0.08953857421875,
0.0190887451171875,
-0.0215606689453125,
-0.01324462890625,
0.03826904296875,
0.0311126708984375,
-0.02691650390625,
0.014129638671875,
0.0224761962890625,
0.03167724609375,
0.047210693359375,
-0.043609619140625,
0.0259857177734375,
-0.05755615234375,
0.0307769775390625,
0.031829833984375,
0.0298309326171875,
0.032379150390625,
0.035675048828125,
0.04046630859375,
-0.06982421875,
0.0281219482421875,
0.07373046875,
-0.070556640625,
0.0020847320556640625,
0.0311126708984375,
0.00260162353515625,
-0.0147705078125,
-0.0159149169921875,
-0.0201263427734375,
0.0304718017578125,
-0.00717926025390625,
0.00970458984375,
0.01515960693359375,
0.007232666015625,
0.05029296875,
-0.027191162109375,
-0.00560760498046875,
0.0175018310546875,
-0.0063934326171875,
0.0133819580078125,
0.0210113525390625,
0.0194854736328125,
-0.03253173828125,
0.0147552490234375,
0.052001953125,
0.0272674560546875,
-0.0380859375,
-0.0034770965576171875,
0.022552490234375,
0.01557159423828125,
-0.0049591064453125,
-0.018096923828125,
0.016082763671875,
-0.0316162109375,
0.00681304931640625,
-0.038482666015625,
-0.004962921142578125,
0.04083251953125,
0.01299285888671875,
-0.01486968994140625,
-0.04632568359375,
-0.0150909423828125,
-0.001811981201171875,
-0.022247314453125,
0.019927978515625,
0.0113372802734375,
0.0053253173828125,
-0.007595062255859375,
0.007720947265625,
0.00933074951171875,
0.0163116455078125,
-0.01494598388671875,
0.048309326171875,
0.0201416015625,
0.030181884765625,
-0.014068603515625,
-0.0052490234375,
-0.0146942138671875,
0.0255126953125,
0.041351318359375,
-0.0296783447265625,
0.0341796875,
-0.0162353515625,
-0.06683349609375,
0.0066375732421875,
0.0101165771484375,
-0.0426025390625,
0.01458740234375,
-0.055084228515625,
0.034515380859375,
0.0150909423828125,
-0.0033283233642578125,
0.01302337646484375,
-0.028717041015625,
0.056915283203125,
-0.0254364013671875,
0.042633056640625,
-0.0036220550537109375,
-0.0028247833251953125,
0.00470733642578125,
-0.0145111083984375,
0.04705810546875,
0.0109710693359375,
-0.10107421875,
-0.01499176025390625,
-0.01397705078125,
-0.060211181640625,
0.0179901123046875,
0.035308837890625,
-0.021087646484375,
0.0124053955078125,
-0.01074981689453125,
-0.005191802978515625,
0.0194549560546875,
-0.0174560546875,
-0.00435638427734375,
-0.0297088623046875,
0.00894927978515625,
-0.02886962890625,
-0.047637939453125,
-0.0369873046875,
-0.0278778076171875,
0.038055419921875,
0.0200958251953125,
0.036102294921875,
-0.0084075927734375,
0.0237274169921875,
0.01080322265625,
0.0119171142578125,
-0.01158905029296875,
0.001308441162109375,
-0.0047607421875,
-0.0185546875,
0.0167083740234375,
-0.0161895751953125,
-0.0130615234375,
0.0244903564453125,
0.0236663818359375,
-0.022064208984375,
-0.003292083740234375,
-0.01042938232421875,
0.01445770263671875,
0.0112457275390625,
0.035308837890625,
-0.0269622802734375,
-0.0159149169921875,
-0.0413818359375,
-0.0167236328125,
0.04705810546875,
0.0265045166015625,
-0.004840850830078125,
0.0172576904296875,
-0.0145111083984375,
0.019866943359375,
0.040496826171875,
-0.009857177734375,
0.07525634765625,
0.040496826171875,
-0.1077880859375,
-0.0170745849609375,
-0.02935791015625,
-0.01293182373046875,
-0.0018482208251953125,
-0.0017499923706054688,
0.0216827392578125,
-0.0216522216796875,
0.031097412109375,
0.017364501953125,
-0.0035457611083984375,
0.0311126708984375,
-0.0408935546875,
0.003307342529296875,
0.0275115966796875,
0.009918212890625,
-0.01436614990234375,
-0.032318115234375,
0.00817108154296875,
-0.040985107421875,
-0.006656646728515625,
0.01169586181640625,
-0.004108428955078125,
0.01552581787109375,
0.0290069580078125,
-0.0238494873046875,
0.0182342529296875,
0.02545166015625,
-0.04986572265625,
0.0255584716796875,
0.0157928466796875,
-0.01377105712890625,
-0.0063018798828125,
0.005126953125,
-0.0143280029296875,
-0.01177978515625,
-0.021026611328125,
0.00513458251953125,
-0.0282440185546875,
-0.0006885528564453125,
0.01174163818359375,
0.00888824462890625,
0.041748046875,
0.0015459060668945312,
-0.0038604736328125,
0.01358795166015625,
-0.0000069141387939453125,
0.057647705078125,
-0.06903076171875,
-0.0246429443359375,
-0.031585693359375,
0.025115966796875,
-0.0211639404296875,
-0.041107177734375,
0.0189361572265625,
-0.036529541015625,
-0.0303955078125,
-0.004852294921875,
-0.00846099853515625,
0.0104217529296875,
-0.0517578125,
-0.0640869140625,
0.0251922607421875,
-0.01111602783203125,
-0.033660888671875,
-0.0089569091796875,
0.031982421875,
0.0013933181762695312,
-0.0082855224609375,
0.0110931396484375,
-0.0270233154296875,
0.0007548332214355469,
-0.0029850006103515625,
0.032867431640625,
-0.045074462890625,
0.056121826171875,
-0.0105438232421875,
-0.08978271484375,
0.00846099853515625,
-0.0033512115478515625,
0.0236663818359375,
0.02069091796875,
-0.00836181640625,
0.032012939453125,
0.0181121826171875,
-0.0338134765625,
0.0067901611328125,
-0.0013885498046875,
-0.0192413330078125,
-0.031707763671875,
0.003658294677734375,
-0.0168304443359375,
0.0173797607421875,
0.0863037109375,
0.04083251953125,
0.0299072265625,
-0.043853759765625,
-0.01007843017578125,
-0.04046630859375,
-0.0300140380859375,
-0.00807952880859375,
0.031585693359375,
-0.0755615234375,
-0.016998291015625,
0.031646728515625,
-0.0289154052734375,
-0.0285186767578125,
0.0013332366943359375,
-0.061859130859375,
-0.003841400146484375,
-0.0296630859375,
-0.006561279296875,
-0.033294677734375,
-0.0034084320068359375,
0.01788330078125,
-0.013214111328125,
0.0108184814453125,
-0.03472900390625,
0.0181884765625,
0.0190582275390625,
-0.004917144775390625,
-0.01666259765625,
0.042083740234375,
-0.035430908203125,
-0.00815582275390625,
0.01029205322265625,
-0.0318603515625,
-0.01332855224609375,
0.0263519287109375,
-0.00972747802734375,
0.0160675048828125,
-0.003620147705078125,
0.00063323974609375,
0.01050567626953125,
0.0277862548828125,
-0.002712249755859375,
0.0467529296875,
-0.01206207275390625,
0.060760498046875,
0.0164794921875,
0.0164794921875,
-0.0091552734375,
0.00011241436004638672,
0.0305633544921875,
-0.04180908203125,
-0.00885772705078125,
0.007663726806640625,
-0.034149169921875,
-0.0379638671875,
-0.0013332366943359375,
-0.034820556640625,
-0.0020198822021484375,
0.00612640380859375
]
|
3c0dbe9c78a6f32c093be786618d24e8e85a9f08 | Wordpress Stackexchange
Q: if the post has content I am setting up a one page WordPress site. I am getting some pages listed in my site that does not have content. For example, I will get the empty blog page as well as the blog template. So I thought I could throw in a check to see if the page has content and if it does go ahead and post that information. I am having trouble getting it to work. I am using a custom query for the homepage. So I thought I could do this
if ( $page_query->have_posts() ) : while ( $page_query->have_posts() ) : $page_query->the_post();
if( $page_query->post_content != ''){
get_template_part( 'content', get_post_format() );
}
endwhile; endif;
problem is that I get an error on that code and I can't figure out why. I get this error
Notice: Undefined property: WP_Query::$post_content in
A: What about
if ( !empty( get_the_content() ) ){
//code
}
| Q: if the post has content I am setting up a one page WordPress site. I am getting some pages listed in my site that does not have content. For example, I will get the empty blog page as well as the blog template. So I thought I could throw in a check to see if the page has content and if it does go ahead and post that information. I am having trouble getting it to work. I am using a custom query for the homepage. So I thought I could do this
if ( $page_query->have_posts() ) : while ( $page_query->have_posts() ) : $page_query->the_post();
if( $page_query->post_content != ''){
get_template_part( 'content', get_post_format() );
}
endwhile; endif;
problem is that I get an error on that code and I can't figure out why. I get this error
Notice: Undefined property: WP_Query::$post_content in
A: What about
if ( !empty( get_the_content() ) ){
//code
}
A: i have implemented some "has_content()" methods for several times over years now and there is always enough time in between so i need to search again a bit to answer this question.
anyways - this is my solution, which i like to find the next time here - so its for reference.
all "inside loop" functions can be replaced by a post objects "post_content"
in functions.php and similar files:
// write inside the loop
$the_content = apply_filters('the_content', get_the_content());
if ( !empty($the_content) ) {
echo $the_content;
}
// with post object by id
$post = get_post(12); // specific post
$the_content = apply_filters('the_content', $post->post_content);
if ( !empty($the_content) ) {
echo $the_content;
}
as function
// call inside the loop
function mytheme_has_content(){
return !empty(apply_filters('the_content', get_the_content()));
}
template inside the loop:
<?php if ( $customQuery->have_posts() ) {?>
<?php while ( $customQuery->have_posts() ) {
$customQuery->the_post(); ?>
<?php $the_content = apply_filters('the_content', get_the_content()); ?>
<!-- html -->
<?php if ( !empty($the_content) ) { ?>
<div class="content">
<?php echo $the_content; ?>
</div>
<?php } ?>
<?php } ?>
<?php wp_reset_postdata(); ?>
<?php } ?>
A: The content is a property of the post object, not of the query object.
Use $post or get_post() instead:
if( '' !== get_post()->post_content ) {
// do something
}
A: This also works, and tests for things like empty paragraph tags or in the content which might cause a normal check to fail. See http://blog.room34.com/archives/5360 for the original idea - just recording it here so I can find it again. :O)
Put this in your functions.php:
function empty_content($str) {
return trim(str_replace(' ','',strip_tags($str))) == '';
}
And put this where you want to run the check:
if (function_exists('empty_content') && empty_content($post->post_content)) { ... }
That will return true if the content is empty, false if not.
| wordpress | {
"language": "en",
"length": 444,
"provenance": "stackexchange_00019.jsonl.gz:438923",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/121359"
} | [
0.0109405517578125,
0.00140380859375,
0.01534271240234375,
0.0265655517578125,
0.003833770751953125,
-0.01526641845703125,
0.0467529296875,
-0.0716552734375,
0.03570556640625,
-0.01300811767578125,
-0.06951904296875,
-0.0159149169921875,
-0.02569580078125,
-0.0169219970703125,
0.00337982177734375,
-0.046478271484375,
0.044525146484375,
-0.033905029296875,
0.032196044921875,
-0.0172271728515625,
0.028656005859375,
0.00023877620697021484,
0.039398193359375,
0.00334930419921875,
0.016143798828125,
-0.0254669189453125,
0.0728759765625,
-0.0035686492919921875,
0.0099334716796875,
-0.0204010009765625,
0.0299072265625,
0.0016460418701171875,
0.03289794921875,
0.01522064208984375,
-0.047607421875,
-0.0158233642578125,
-0.035430908203125,
0.01041412353515625,
-0.0256805419921875,
0.03070068359375,
0.00669097900390625,
-0.005512237548828125,
0.025238037109375,
0.03167724609375,
0.010009765625,
-0.01140594482421875,
-0.01201629638671875,
-0.07562255859375,
0.0205230712890625,
0.00897216796875,
0.024688720703125,
-0.0185546875,
0.01421356201171875,
-0.01116180419921875,
-0.02850341796875,
-0.0231475830078125,
-0.00624847412109375,
-0.019989013671875,
0.047943115234375,
-0.03912353515625,
-0.056365966796875,
-0.0450439453125,
0.04241943359375,
-0.01258087158203125,
-0.019378662109375,
0.01959228515625,
0.0169830322265625,
-0.00010353326797485352,
-0.041351318359375,
-0.023284912109375,
0.0186309814453125,
-0.0260162353515625,
-0.01605224609375,
0.02001953125,
-0.0006875991821289062,
-0.0369873046875,
-0.01092529296875,
-0.0423583984375,
0.012054443359375,
0.052398681640625,
-0.0255126953125,
0.018798828125,
-0.039031982421875,
-0.0295257568359375,
0.023773193359375,
-0.003856658935546875,
-0.0234527587890625,
-0.0011854171752929688,
-0.0179443359375,
-0.0084991455078125,
-0.00817108154296875,
0.015869140625,
-0.01087188720703125,
-0.027374267578125,
-0.0242156982421875,
-0.033935546875,
0.02557373046875,
0.09625244140625,
-0.0333251953125,
0.006961822509765625,
-0.0200042724609375,
-0.035003662109375,
0.029937744140625,
-0.056976318359375,
0.032684326171875,
0.018341064453125,
-0.00621795654296875,
-0.033477783203125,
0.0682373046875,
0.022613525390625,
-0.007415771484375,
0.0908203125,
-0.0237884521484375,
-0.02191162109375,
-0.0243988037109375,
0.058074951171875,
0.0008153915405273438,
-0.03369140625,
0.0113525390625,
-0.0010509490966796875,
0.0233917236328125,
0.033355712890625,
0.0029850006103515625,
-0.04156494140625,
0.0175933837890625,
0.0164337158203125,
-0.0269775390625,
-0.028106689453125,
0.0290679931640625,
0.031097412109375,
-0.03204345703125,
0.00234222412109375,
0.031005859375,
-0.00923919677734375,
-0.0236053466796875,
-0.0307464599609375,
0.0009164810180664062,
-0.0249786376953125,
-0.01152801513671875,
0.0110931396484375,
0.0003757476806640625,
-0.022705078125,
0.02520751953125,
-0.0228118896484375,
-0.00897979736328125,
0.0225067138671875,
0.041290283203125,
0.0205841064453125,
-0.034820556640625,
-0.071044921875,
0.037261962890625,
0.011077880859375,
0.0209808349609375,
-0.01169586181640625,
-0.01947021484375,
-0.052978515625,
-0.020263671875,
-0.0291290283203125,
0.011138916015625,
-0.0309600830078125,
0.041351318359375,
-0.00946807861328125,
0.01029205322265625,
-0.01474761962890625,
-0.027618408203125,
-0.0198822021484375,
-0.060546875,
-0.0123291015625,
0.0181121826171875,
-0.00910186767578125,
0.0018186569213867188,
-0.0284423828125,
0.01861572265625,
0.0028209686279296875,
-0.01788330078125,
0.0225067138671875,
0.017669677734375,
0.000438690185546875,
-0.004398345947265625,
0.0802001953125,
0.0031147003173828125,
-0.02081298828125,
0.048431396484375,
-0.032623291015625,
-0.0635986328125,
0.040679931640625,
0.0165557861328125,
0.016357421875,
-0.0027217864990234375,
-0.006259918212890625,
0.0782470703125,
0.046875,
-0.043212890625,
0.016693115234375,
-0.00836181640625,
-0.0262451171875,
0.00797271728515625,
-0.0114593505859375,
-0.002986907958984375,
0.01263427734375,
0.051513671875,
-0.0048828125,
-0.0011510848999023438,
-0.01297760009765625,
-0.041748046875,
-0.00775909423828125,
-0.0016422271728515625,
0.0052490234375,
-0.0263824462890625,
0.0244598388671875,
0.0290679931640625,
0.004772186279296875,
-0.031036376953125,
-0.0246734619140625,
-0.0247802734375,
-0.01520538330078125,
-0.01078033447265625,
-0.0202178955078125,
-0.014068603515625,
0.01296234130859375,
-0.01983642578125,
-0.01348114013671875,
-0.032867431640625,
0.028228759765625,
0.07586669921875,
0.004100799560546875,
-0.01477813720703125,
-0.0156402587890625,
0.040679931640625,
0.0341796875,
-0.060333251953125,
0.005741119384765625,
0.04156494140625,
-0.0012845993041992188,
-0.0384521484375,
0.0112762451171875,
0.0211944580078125,
-0.03851318359375,
-0.005054473876953125,
0.054656982421875,
0.045379638671875,
0.0595703125,
-0.024261474609375,
-0.035675048828125,
0.0836181640625,
-0.04547119140625,
-0.01239013671875,
-0.0075836181640625,
0.0435791015625,
0.087646484375,
-0.000530242919921875,
0.01036834716796875,
-0.006259918212890625,
-0.0034732818603515625,
-0.0017881393432617188,
0.020965576171875,
-0.0012521743774414062,
0.048431396484375,
-0.045257568359375,
0.019195556640625,
-0.01009368896484375,
0.035125732421875,
0.0180511474609375,
-0.003681182861328125,
0.037841796875,
0.021453857421875,
0.034759521484375,
0.029449462890625,
-0.0293121337890625,
0.0128021240234375,
0.0073089599609375,
0.010528564453125,
0.004497528076171875,
0.053070068359375,
-0.0194854736328125,
0.04248046875,
-0.0251617431640625,
-0.0121002197265625,
0.006778717041015625,
0.0418701171875,
-0.0214996337890625,
-0.0014896392822265625,
-0.034423828125,
-0.008209228515625,
-0.0021648406982421875,
-0.018218994140625,
0.0028018951416015625,
0.0031909942626953125,
0.04486083984375,
-0.00972747802734375,
0.00914764404296875,
0.0292816162109375,
-0.020263671875,
0.0733642578125,
-0.014190673828125,
-0.0258331298828125,
0.016571044921875,
-0.04241943359375,
0.036529541015625,
-0.02447509765625,
0.02685546875,
0.062408447265625,
0.0021495819091796875,
0.00252532958984375,
0.01322174072265625,
0.0157470703125,
0.01103973388671875,
0.026824951171875,
0.024139404296875,
0.01165771484375,
-0.0210418701171875,
0.03436279296875,
0.0262451171875,
0.045654296875,
0.022705078125,
-0.0244903564453125,
0.01334381103515625,
0.0323486328125,
-0.068603515625,
-0.09234619140625,
-0.01000213623046875,
-0.061614990234375,
0.0007219314575195312,
-0.0179290771484375,
-0.01331329345703125,
-0.007564544677734375,
-0.00995635986328125,
0.005138397216796875,
-0.040557861328125,
-0.0142364501953125,
-0.10125732421875,
-0.05523681640625,
-0.0765380859375,
0.04754638671875,
-0.02838134765625,
0.041595458984375,
-0.004154205322265625,
0.084716796875,
0.002338409423828125,
-0.08856201171875,
-0.0238800048828125,
0.03192138671875,
-0.0282440185546875,
0.009490966796875,
-0.0202178955078125,
0.0266571044921875,
-0.007770538330078125,
0.0110626220703125,
-0.0136871337890625,
-0.0013360977172851562,
-0.0030994415283203125,
-0.0223846435546875,
-0.030487060546875,
-0.0141754150390625,
0.0084075927734375,
-0.0002956390380859375,
0.02801513671875,
0.00634002685546875,
0.0293426513671875,
-0.035491943359375,
-0.0462646484375,
-0.017425537109375,
-0.09033203125,
0.02899169921875,
0.07818603515625,
-0.0007338523864746094,
0.0159454345703125,
-0.041107177734375,
-0.01058197021484375,
-0.01032257080078125,
-0.0115509033203125,
-0.0037174224853515625,
0.032623291015625,
-0.003276824951171875,
-0.01059722900390625,
0.012939453125,
0.0187225341796875,
-0.01074981689453125,
0.027801513671875,
0.0133056640625,
0.00928497314453125,
-0.01250457763671875,
0.007518768310546875,
-0.049652099609375,
-0.023529052734375,
0.044097900390625,
0.023284912109375,
0.0301055908203125,
-0.0293426513671875,
-0.049835205078125,
-0.0083160400390625,
0.0787353515625,
0.0027294158935546875,
-0.0292205810546875,
-0.024993896484375,
-0.00014221668243408203,
-0.0369873046875,
-0.0256500244140625,
0.00139617919921875,
-0.001796722412109375,
-0.0148773193359375,
-0.004669189453125,
-0.0222320556640625,
-0.01441192626953125,
-0.03033447265625,
0.0029811859130859375,
-0.0139617919921875,
-0.01190185546875,
0.0265960693359375,
-0.02508544921875,
0.02191162109375,
0.0281524658203125,
-0.02703857421875,
0.0284423828125,
-0.03173828125,
-0.035400390625,
-0.05743408203125,
-0.021331787109375,
0.0222015380859375,
0.008209228515625,
-0.0035552978515625,
-0.019317626953125,
-0.010498046875,
0.02410888671875,
0.007076263427734375,
0.011932373046875,
0.00905609130859375,
0.0047607421875,
0.0007357597351074219,
-0.021148681640625,
-0.0019235610961914062,
-0.031036376953125,
0.002899169921875,
0.005340576171875,
0.0162506103515625,
0.038848876953125,
-0.060516357421875,
-0.03466796875,
-0.050567626953125,
-0.01337432861328125,
0.00972747802734375,
0.00678253173828125,
-0.0016298294067382812,
0.0157012939453125,
-0.0105133056640625,
0.001251220703125,
0.01268768310546875,
-0.0026836395263671875,
0.036712646484375,
0.01483917236328125,
-0.054779052734375,
0.0019054412841796875,
0.057861328125,
0.0263214111328125,
-0.0255126953125,
-0.054534912109375,
0.003803253173828125,
0.0345458984375,
-0.0066680908203125,
0.048980712890625,
0.0246429443359375,
-0.035308837890625,
0.057830810546875,
0.0116424560546875,
-0.0083770751953125,
0.0047454833984375,
0.07623291015625,
0.004180908203125,
-0.002696990966796875,
0.007366180419921875,
-0.0116119384765625,
-0.01332855224609375,
0.0282440185546875,
-0.0284271240234375,
0.005157470703125,
0.0261993408203125,
0.006866455078125,
-0.050994873046875,
0.05035400390625,
-0.000225067138671875,
-0.01202392578125,
-0.01328277587890625,
0.037017822265625,
0.02508544921875,
0.0137786865234375,
0.0135650634765625,
-0.0028076171875,
0.031982421875,
-0.005031585693359375,
0.01947021484375,
0.03692626953125,
-0.0205535888671875,
0.037139892578125,
-0.017242431640625,
-0.035614013671875,
0.00498199462890625,
-0.003582000732421875,
0.056640625,
-0.0269927978515625,
-0.055145263671875,
-0.01336669921875,
-0.0291748046875,
0.005725860595703125,
0.047119140625,
0.03778076171875,
0.0087127685546875,
-0.0031185150146484375,
-0.01197052001953125,
-0.01837158203125,
0.036712646484375,
-0.013824462890625,
-0.032379150390625,
-0.03802490234375,
-0.00029158592224121094,
-0.0179595947265625,
0.0114288330078125,
0.0168914794921875,
-0.01389312744140625,
0.0101470947265625,
-0.0105743408203125,
-0.0028705596923828125,
0.00122833251953125,
0.054351806640625,
0.035491943359375,
-0.03363037109375,
-0.015869140625,
0.03558349609375,
-0.002391815185546875,
-0.031280517578125,
-0.032012939453125,
0.0165863037109375,
0.04339599609375,
-0.041107177734375,
-0.0243072509765625,
0.0328369140625,
0.005596160888671875,
-0.0159759521484375,
0.01042938232421875,
0.017486572265625,
-0.01082611083984375,
-0.0287017822265625,
-0.006298065185546875,
0.01192474365234375,
0.01763916015625,
-0.020782470703125,
0.043121337890625,
-0.0189971923828125,
0.038116455078125,
0.060882568359375,
-0.024505615234375,
0.0146331787109375,
-0.0019989013671875,
0.01366424560546875,
-0.032470703125,
-0.001178741455078125,
0.0007042884826660156,
0.0305633544921875,
-0.03912353515625,
-0.0162353515625,
0.031494140625,
-0.0288238525390625,
0.0091400146484375,
-0.03399658203125,
0.01435089111328125,
-0.04632568359375,
0.01418304443359375,
0.034820556640625,
0.0081939697265625,
-0.046173095703125,
0.019195556640625,
-0.06097412109375,
-0.015716552734375,
-0.04150390625,
-0.06671142578125,
-0.0587158203125,
-0.03448486328125,
0.0216827392578125,
0.024444580078125,
-0.0011758804321289062,
-0.04425048828125,
-0.043212890625,
0.01019287109375,
0.0390625,
0.04290771484375,
-0.00542449951171875,
0.0758056640625,
-0.01605224609375,
0.033782958984375,
0.0187530517578125,
0.058258056640625,
0.01091766357421875,
-0.0318603515625,
0.01371002197265625,
-0.041290283203125,
-0.0028629302978515625,
-0.011688232421875,
0.0144500732421875,
0.009979248046875,
0.002201080322265625,
0.006687164306640625,
-0.002109527587890625,
-0.0162200927734375,
-0.01007080078125,
-0.016632080078125,
0.038787841796875,
-0.0062103271484375,
-0.005306243896484375,
0.034393310546875,
-0.00922393798828125,
0.0214691162109375,
0.006145477294921875,
-0.015533447265625,
0.007663726806640625,
-0.006214141845703125,
0.0031948089599609375,
-0.004474639892578125,
-0.016143798828125,
0.047119140625,
0.045989990234375,
-0.01166534423828125,
0.038055419921875,
0.0052947998046875,
0.00254058837890625,
0.0191497802734375,
-0.0011739730834960938,
-0.039031982421875,
-0.026031494140625,
0.04034423828125,
0.0102386474609375,
0.01441192626953125,
0.06048583984375,
-0.018768310546875,
0.0307464599609375,
0.06884765625,
0.0947265625,
-0.065185546875,
-0.00411224365234375,
0.03509521484375,
-0.03118896484375,
0.0222930908203125,
-0.01149749755859375,
0.012939453125,
0.0096893310546875,
0.03387451171875,
0.0035839080810546875,
-0.014404296875,
0.01215362548828125,
-0.0179290771484375,
-0.0267181396484375,
-0.015777587890625,
0.04443359375,
0.0213775634765625,
-0.055572509765625,
0.054656982421875,
0.034912109375,
0.0142974853515625,
-0.0228271484375,
0.04345703125,
-0.043701171875,
0.0154876708984375,
-0.019866943359375,
0.00347900390625,
-0.00820159912109375,
-0.0031147003173828125,
-0.01044464111328125,
0.0296173095703125,
-0.034271240234375,
0.064208984375,
-0.040374755859375,
0.02838134765625,
0.04595947265625,
-0.05816650390625,
-0.040130615234375,
0.0015020370483398438,
0.05340576171875,
0.042144775390625,
-0.0443115234375,
0.0416259765625,
-0.0222015380859375,
-0.031097412109375,
-0.00513458251953125,
-0.05572509765625,
0.054962158203125,
-0.050048828125,
0.009429931640625,
0.0215301513671875,
0.0012874603271484375,
-0.0137176513671875,
-0.00443267822265625,
0.048858642578125,
-0.0271759033203125,
0.0198516845703125,
0.0124053955078125,
0.03851318359375,
-0.02093505859375,
0.0029754638671875,
-0.0682373046875,
0.09234619140625,
-0.008209228515625,
0.0352783203125,
0.00931549072265625,
0.0233917236328125,
-0.03765869140625,
-0.002010345458984375,
-0.06439208984375,
0.07904052734375,
0.0285186767578125,
0.06610107421875,
-0.10430908203125,
-0.0207366943359375,
-0.00482940673828125,
0.042510986328125,
0.028228759765625,
-0.005268096923828125,
-0.015869140625,
-0.006793975830078125,
0.0233001708984375,
0.0168914794921875,
-0.0050506591796875,
0.0299835205078125,
-0.008941650390625,
0.0251617431640625,
0.0292205810546875,
-0.0631103515625,
0.0307769775390625,
-0.03826904296875,
-0.01345062255859375,
0.0017652511596679688,
0.01519012451171875,
0.01187896728515625,
0.0206298828125,
-0.01214599609375,
-0.0227508544921875,
-0.0004754066467285156,
0.0257568359375,
-0.03619384765625,
0.0019969940185546875,
0.03521728515625,
0.0310516357421875,
-0.06304931640625,
-0.0212249755859375,
-0.03466796875,
0.04315185546875,
-0.014892578125,
0.046234130859375,
0.0037288665771484375,
0.027191162109375,
0.07305908203125,
-0.03509521484375,
0.024444580078125,
0.023712158203125,
-0.047271728515625,
0.040191650390625,
0.0307159423828125,
0.0197906494140625,
-0.0177001953125,
-0.00670623779296875,
0.009033203125,
0.046905517578125,
-0.026702880859375,
-0.01117706298828125,
0.01325225830078125,
-0.00225067138671875,
-0.0225677490234375,
-0.031646728515625,
-0.040557861328125,
0.0523681640625,
0.062042236328125,
-0.0390625,
-0.013031005859375,
0.044342041015625,
-0.016082763671875,
-0.013031005859375,
-0.0200042724609375,
0.010284423828125,
0.0009131431579589844,
0.0033855438232421875,
-0.01184844970703125,
0.01308441162109375,
0.0452880859375,
-0.0022945404052734375,
0.0213165283203125,
-0.052764892578125,
-0.0092010498046875,
-0.0036602020263671875,
0.019317626953125,
-0.0188446044921875,
0.0002675056457519531,
-0.0162353515625,
-0.04571533203125,
0.005611419677734375,
0.01203155517578125,
0.0274658203125,
-0.04498291015625,
0.0089569091796875,
0.0306549072265625,
0.005901336669921875,
-0.01378631591796875,
0.00701141357421875,
-0.00426483154296875,
0.00446319580078125,
-0.0394287109375,
0.020355224609375,
0.01983642578125,
0.006160736083984375,
0.0034046173095703125,
0.01995849609375,
0.04052734375,
0.017669677734375,
0.0182952880859375,
0.01203155517578125,
-0.0159912109375,
0.0231781005859375,
0.01947021484375,
0.0650634765625,
0.0462646484375,
-0.0703125,
-0.03533935546875,
-0.00426483154296875,
-0.035308837890625,
0.0246124267578125,
0.052215576171875,
0.006969451904296875,
-0.0214996337890625,
-0.0018014907836914062,
0.005550384521484375,
-0.004116058349609375,
-0.0188446044921875,
-0.0004897117614746094,
0.016387939453125,
0.0179443359375,
0.01328277587890625,
-0.03973388671875,
-0.036376953125,
-0.004436492919921875,
0.0239715576171875,
0.005496978759765625,
0.06939697265625,
0.000056743621826171875,
0.012786865234375,
0.0050048828125,
0.016571044921875,
-0.0285186767578125,
-0.003993988037109375,
0.0191192626953125,
-0.0224151611328125,
0.00751495361328125,
0.00260162353515625,
-0.0633544921875,
-0.004871368408203125,
0.05804443359375,
-0.01090240478515625,
-0.0084686279296875,
0.0086822509765625,
0.0252685546875,
-0.0264129638671875,
0.00827789306640625,
-0.0283050537109375,
0.01349639892578125,
0.0106658935546875,
-0.0181121826171875,
0.037445068359375,
0.01180267333984375,
0.025177001953125,
0.058929443359375,
-0.0235748291015625,
-0.06561279296875,
0.012725830078125,
-0.09368896484375,
0.0186614990234375,
0.0390625,
0.0217742919921875,
-0.026153564453125,
0.00832366943359375,
-0.01397705078125,
0.004596710205078125,
0.0260772705078125,
-0.0014257431030273438,
0.0158843994140625,
0.00595855712890625,
0.00540924072265625,
-0.0250091552734375,
0.00923919677734375,
-0.036163330078125,
-0.0149383544921875,
0.022796630859375,
0.011199951171875,
-0.00904083251953125,
-0.0118408203125,
-0.0033779144287109375,
-0.028533935546875,
-0.0233306884765625,
-0.018402099609375,
-0.0032062530517578125,
-0.057037353515625,
0.0223541259765625,
-0.0132904052734375,
0.0159759521484375,
-0.0170745849609375,
-0.01751708984375,
-0.006435394287109375,
-0.0408935546875,
0.022735595703125,
-0.043243408203125,
0.02276611328125,
0.01320648193359375,
0.0296630859375,
-0.0293426513671875,
0.056610107421875,
-0.0022735595703125,
-0.046478271484375,
0.047821044921875,
0.04150390625,
0.06353759765625,
-0.0445556640625,
-0.04022216796875,
0.0239105224609375,
0.02288818359375,
0.05767822265625,
0.01885986328125,
0.0035686492919921875,
0.04669189453125,
-0.0253448486328125,
-0.03570556640625,
-0.0073089599609375,
0.0212860107421875,
-0.03271484375,
-0.0240478515625,
-0.0214080810546875,
0.0061798095703125,
0.01126861572265625,
-0.0295867919921875,
-0.06048583984375,
0.01372528076171875,
-0.0045318603515625,
-0.02105712890625,
-0.0091705322265625,
0.0073699951171875,
-0.0081329345703125,
-0.0263214111328125,
0.0059967041015625,
-0.0113525390625,
0.003513336181640625,
0.007663726806640625,
0.003932952880859375,
0.029327392578125,
0.040069580078125,
-0.0195770263671875,
-0.0816650390625,
-0.049285888671875,
-0.0804443359375,
0.007312774658203125,
0.035552978515625,
-0.0250701904296875,
0.0147857666015625,
0.0175323486328125,
-0.054718017578125,
-0.06365966796875,
-0.018463134765625,
-0.02972412109375,
0.002216339111328125,
0.0005388259887695312,
-0.0278167724609375,
-0.01371002197265625,
0.06549072265625,
0.022125244140625,
0.0283203125,
-0.019195556640625,
-0.0233612060546875,
-0.0238037109375,
-0.060516357421875,
-0.014892578125,
0.03759765625,
-0.06732177734375,
0.0165557861328125,
-0.01708984375,
-0.0257110595703125,
-0.013885498046875,
-0.02899169921875,
-0.054412841796875,
0.0031337738037109375,
-0.04718017578125,
0.0177154541015625,
-0.021270751953125,
-0.047210693359375,
0.0170745849609375,
-0.00038123130798339844,
0.03289794921875,
-0.0248870849609375,
0.039154052734375,
0.0221099853515625,
0.045745849609375,
0.036346435546875,
0.01641845703125,
-0.050537109375,
-0.0166778564453125,
0.01812744140625,
-0.014984130859375,
0.0009331703186035156,
-0.03765869140625,
0.0232086181640625,
0.01546478271484375,
-0.032623291015625,
0.032562255859375,
0.055419921875,
0.001495361328125,
-0.02685546875,
-0.0090179443359375,
-0.0118255615234375,
0.05767822265625,
0.010345458984375,
0.0226898193359375,
0.007694244384765625,
-0.01313018798828125,
0.04791259765625,
-0.041229248046875,
-0.009246826171875,
0.01436614990234375,
-0.00934600830078125,
-0.06634521484375,
0.039886474609375,
-0.0265960693359375,
0.014495849609375,
0.01485443115234375
]
|
180f545dd91f8ba2e658705810e1cc7fa7b034f6 | Wordpress Stackexchange
Q: Wordpress core responsive video not working with shortcode I cannot get the video from Wordpress core to behave responsively.
I'm using the following CSS:
.videocontent {
width: 100%;
height: 100%;
max-width: 1024px;
margin: 0 auto;
}
.wp-video-shortcode {
max-width: 100%;
}
The following HTML using the shortcode doesn't scale to the full size of the containing div:
<div class="videocontent">
<?php
echo do_shortcode('[video webm="http://localhost/dnp/stalker.webm" width=100%]');
?>
</div>
But using HTML directly it works fine:
<div class="videocontent">
<video id="myvideo2" style="width:90%;height:100%;" controls="controls">
<source src="http://localhost/dnp/stalker.webm" type="video/webm"/>
</video>
</div>
I have tried various settings with the shortcode - such as height 100%, height and width 100%, and width 100%.
What am I doing wrong?
Screenshot -> screen shot
Live Site : http://www.deekwa.com/dnp
A: The width=100% parameter is not valid in the video shortcode. It must be a number, in pixels, or omitted entirely.
If it is omitted, then the code will use the $content_width global from the theme to define the width of the containing DIV.
For more info on Content Width, see here:
http://codex.wordpress.org/Content_Width
| Q: Wordpress core responsive video not working with shortcode I cannot get the video from Wordpress core to behave responsively.
I'm using the following CSS:
.videocontent {
width: 100%;
height: 100%;
max-width: 1024px;
margin: 0 auto;
}
.wp-video-shortcode {
max-width: 100%;
}
The following HTML using the shortcode doesn't scale to the full size of the containing div:
<div class="videocontent">
<?php
echo do_shortcode('[video webm="http://localhost/dnp/stalker.webm" width=100%]');
?>
</div>
But using HTML directly it works fine:
<div class="videocontent">
<video id="myvideo2" style="width:90%;height:100%;" controls="controls">
<source src="http://localhost/dnp/stalker.webm" type="video/webm"/>
</video>
</div>
I have tried various settings with the shortcode - such as height 100%, height and width 100%, and width 100%.
What am I doing wrong?
Screenshot -> screen shot
Live Site : http://www.deekwa.com/dnp
A: The width=100% parameter is not valid in the video shortcode. It must be a number, in pixels, or omitted entirely.
If it is omitted, then the code will use the $content_width global from the theme to define the width of the containing DIV.
For more info on Content Width, see here:
http://codex.wordpress.org/Content_Width
| wordpress | {
"language": "en",
"length": 171,
"provenance": "stackexchange_00019.jsonl.gz:438938",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/121410"
} | [
-0.0169830322265625,
-0.004901885986328125,
-0.026641845703125,
0.01519012451171875,
-0.021881103515625,
-0.0220794677734375,
0.031524658203125,
-0.021240234375,
0.032562255859375,
0.024261474609375,
-0.05804443359375,
-0.0017442703247070312,
-0.024505615234375,
0.002841949462890625,
-0.04571533203125,
-0.056793212890625,
0.03741455078125,
-0.0185089111328125,
0.018768310546875,
-0.023193359375,
0.00809478759765625,
-0.004119873046875,
0.0164794921875,
0.07745361328125,
-0.02911376953125,
0.0039005279541015625,
0.0660400390625,
-0.01294708251953125,
-0.0291900634765625,
-0.0160980224609375,
-0.0021839141845703125,
0.0223388671875,
0.06732177734375,
0.031158447265625,
-0.1094970703125,
-0.019805908203125,
0.01177978515625,
-0.0273895263671875,
-0.06866455078125,
0.047088623046875,
-0.034759521484375,
0.052825927734375,
0.07086181640625,
0.005016326904296875,
-0.0010509490966796875,
-0.061492919921875,
-0.01751708984375,
-0.0455322265625,
-0.00716400146484375,
-0.01029205322265625,
0.027862548828125,
0.024688720703125,
0.03955078125,
0.0158538818359375,
-0.0043487548828125,
0.0219573974609375,
-0.080810546875,
-0.01502227783203125,
0.024932861328125,
0.03485107421875,
0.020111083984375,
-0.0263214111328125,
0.014617919921875,
0.0009121894836425781,
-0.0010137557983398438,
-0.027618408203125,
-0.01209259033203125,
0.00931549072265625,
0.02154541015625,
0.018310546875,
0.0182647705078125,
0.00861358642578125,
-0.01161956787109375,
-0.02142333984375,
0.0182952880859375,
-0.01216888427734375,
-0.0084075927734375,
-0.01495361328125,
0.0092926025390625,
0.005039215087890625,
0.0303955078125,
-0.0038909912109375,
0.01507568359375,
-0.0220489501953125,
0.0089569091796875,
-0.0183258056640625,
-0.00026798248291015625,
-0.0002994537353515625,
0.00432586669921875,
-0.0137939453125,
-0.00717926025390625,
0.0134124755859375,
-0.033477783203125,
-0.020111083984375,
-0.01702880859375,
-0.048095703125,
-0.0220184326171875,
0.044677734375,
-0.0036106109619140625,
0.0408935546875,
0.0247039794921875,
-0.055206298828125,
0.056854248046875,
-0.061981201171875,
0.01120758056640625,
-0.0005788803100585938,
-0.002223968505859375,
0.00101470947265625,
0.04779052734375,
0.0263671875,
-0.012359619140625,
0.0955810546875,
-0.042327880859375,
-0.0085906982421875,
-0.0496826171875,
0.006732940673828125,
-0.05419921875,
-0.0281982421875,
-0.020782470703125,
-0.0228424072265625,
0.0308380126953125,
0.034210205078125,
0.059661865234375,
-0.02484130859375,
-0.013336181640625,
0.01055145263671875,
-0.0261383056640625,
-0.084716796875,
0.001987457275390625,
0.055084228515625,
-0.0268096923828125,
-0.004749298095703125,
0.0322265625,
-0.003894805908203125,
-0.005954742431640625,
-0.01520538330078125,
-0.004375457763671875,
-0.06573486328125,
-0.038604736328125,
0.01393890380859375,
-0.0093536376953125,
0.035919189453125,
0.046142578125,
-0.050872802734375,
0.017303466796875,
-0.010589599609375,
0.0026454925537109375,
0.04644775390625,
0.0246734619140625,
-0.07373046875,
0.06390380859375,
-0.01514434814453125,
0.039947509765625,
0.03033447265625,
0.0034732818603515625,
0.007648468017578125,
0.09710693359375,
-0.0447998046875,
-0.07672119140625,
-0.07049560546875,
0.0241851806640625,
0.03265380859375,
0.059600830078125,
-0.0286865234375,
0.01053619384765625,
-0.047943115234375,
-0.081787109375,
-0.0009975433349609375,
0.025726318359375,
0.0889892578125,
-0.02532958984375,
0.017181396484375,
-0.00724029541015625,
0.035797119140625,
0.0013427734375,
0.004962921142578125,
-0.0206451416015625,
-0.014556884765625,
0.043853759765625,
-0.0015974044799804688,
-0.004596710205078125,
-0.0017347335815429688,
0.057159423828125,
-0.004886627197265625,
0.02081298828125,
-0.0101776123046875,
0.006610870361328125,
-0.03521728515625,
-0.014984130859375,
0.01406097412109375,
0.006473541259765625,
0.038665771484375,
-0.0217742919921875,
0.037200927734375,
-0.0034313201904296875,
-0.03179931640625,
-0.0221099853515625,
-0.0009508132934570312,
-0.00949859619140625,
-0.01219940185546875,
0.050628662109375,
-0.0191192626953125,
0.031036376953125,
-0.032012939453125,
-0.055511474609375,
0.0026836395263671875,
-0.0295257568359375,
0.027313232421875,
0.0022182464599609375,
-0.008575439453125,
0.00562286376953125,
0.01024627685546875,
-0.004734039306640625,
-0.062164306640625,
-0.034271240234375,
0.037811279296875,
0.0183258056640625,
0.058837890625,
0.0007467269897460938,
0.035400390625,
-0.00543212890625,
-0.04339599609375,
0.00902557373046875,
0.0208282470703125,
0.021942138671875,
-0.029266357421875,
0.006877899169921875,
-0.030670166015625,
0.04229736328125,
-0.012939453125,
0.005649566650390625,
0.0187530517578125,
-0.002361297607421875,
-0.035614013671875,
-0.060821533203125,
-0.00945281982421875,
0.003856658935546875,
0.02166748046875,
0.01568603515625,
0.04925537109375,
0.04608154296875,
0.0249786376953125,
-0.00494384765625,
-0.012420654296875,
0.066650390625,
-0.0008630752563476562,
0.02252197265625,
-0.02899169921875,
0.00390625,
0.00885772705078125,
0.0156097412109375,
-0.00662994384765625,
0.02069091796875,
-0.042877197265625,
0.0241851806640625,
0.032684326171875,
0.01409912109375,
0.0535888671875,
-0.035430908203125,
0.033111572265625,
-0.036407470703125,
-0.002010345458984375,
0.0217742919921875,
-0.035980224609375,
-0.01114654541015625,
0.026336669921875,
0.033477783203125,
0.0389404296875,
-0.003650665283203125,
0.01239776611328125,
0.00008475780487060547,
0.0010347366333007812,
-0.0171661376953125,
0.0594482421875,
0.051910400390625,
-0.042266845703125,
-0.028778076171875,
-0.0167083740234375,
0.0004711151123046875,
0.00864410400390625,
-0.0215606689453125,
0.0223541259765625,
-0.0701904296875,
-0.025115966796875,
0.0011615753173828125,
-0.032012939453125,
-0.044586181640625,
-0.02685546875,
0.0189666748046875,
-0.007068634033203125,
0.01342010498046875,
0.05010986328125,
0.0096282958984375,
0.039520263671875,
0.0198974609375,
-0.0032138824462890625,
0.05889892578125,
-0.07275390625,
0.07305908203125,
-0.0215606689453125,
0.0838623046875,
0.091064453125,
-0.03631591796875,
0.049560546875,
-0.0029163360595703125,
0.0265350341796875,
-0.01013946533203125,
-0.003398895263671875,
-0.00714111328125,
0.0016660690307617188,
-0.018280029296875,
0.0174713134765625,
0.025909423828125,
0.0328369140625,
-0.01080322265625,
-0.04107666015625,
-0.0102081298828125,
0.031524658203125,
-0.052520751953125,
-0.018768310546875,
0.022796630859375,
-0.09613037109375,
0.045257568359375,
-0.02142333984375,
-0.043121337890625,
-0.0389404296875,
0.039093017578125,
0.011199951171875,
-0.010650634765625,
-0.02130126953125,
-0.0130767822265625,
-0.032867431640625,
-0.04486083984375,
0.01873779296875,
0.01220703125,
0.008026123046875,
0.017730712890625,
-0.033538818359375,
0.0202178955078125,
-0.0142669677734375,
0.01715087890625,
0.045684814453125,
-0.031494140625,
-0.0458984375,
0.04071044921875,
-0.0087738037109375,
-0.0207061767578125,
0.0177154541015625,
-0.03424072265625,
0.0013942718505859375,
-0.00876617431640625,
-0.03533935546875,
-0.003787994384765625,
-0.0303192138671875,
-0.0076751708984375,
0.0203857421875,
0.00492095947265625,
-0.0595703125,
0.003681182861328125,
-0.080322265625,
-0.0116119384765625,
-0.03961181640625,
-0.049285888671875,
0.0174713134765625,
0.0292205810546875,
-0.0007634162902832031,
-0.039764404296875,
0.0064239501953125,
0.0003325939178466797,
-0.004974365234375,
0.0197906494140625,
-0.0305023193359375,
0.0196533203125,
-0.00997161865234375,
0.0053558349609375,
-0.0249481201171875,
0.005908966064453125,
-0.0173797607421875,
-0.00585174560546875,
-0.022186279296875,
0.01250457763671875,
-0.01374053955078125,
0.006641387939453125,
-0.031707763671875,
-0.0013589859008789062,
0.0526123046875,
0.054840087890625,
0.034271240234375,
-0.0049896240234375,
-0.042938232421875,
-0.0140228271484375,
0.051055908203125,
-0.006305694580078125,
-0.0221405029296875,
-0.00569915771484375,
0.0039825439453125,
-0.014190673828125,
-0.032135009765625,
-0.025848388671875,
0.00324249267578125,
-0.0272979736328125,
0.0008058547973632812,
-0.01102447509765625,
0.0010118484497070312,
-0.02105712890625,
-0.005786895751953125,
-0.0263824462890625,
-0.033538818359375,
0.0267486572265625,
0.044769287109375,
0.032135009765625,
0.00019407272338867188,
0.001163482666015625,
0.026519775390625,
0.01303863525390625,
-0.0124053955078125,
-0.058135986328125,
-0.0163421630859375,
0.0003104209899902344,
0.0589599609375,
0.022064208984375,
-0.0362548828125,
-0.034912109375,
0.037322998046875,
0.01006317138671875,
-0.02935791015625,
0.0202484130859375,
-0.00457000732421875,
-0.0098114013671875,
0.0721435546875,
0.039276123046875,
0.0109710693359375,
0.005374908447265625,
0.01134490966796875,
-0.0249481201171875,
0.0240478515625,
-0.048980712890625,
-0.031982421875,
0.00591278076171875,
-0.0277099609375,
-0.07135009765625,
-0.058349609375,
-0.0192718505859375,
0.0189208984375,
-0.035675048828125,
0.030792236328125,
-0.0645751953125,
-0.04638671875,
0.04736328125,
-0.004985809326171875,
0.0007758140563964844,
-0.0013227462768554688,
0.0301971435546875,
0.007778167724609375,
-0.0236968994140625,
-0.03082275390625,
0.0290069580078125,
0.0635986328125,
-0.0038356781005859375,
0.006000518798828125,
0.0115814208984375,
-0.0616455078125,
0.07366943359375,
0.03179931640625,
0.0037097930908203125,
0.05841064453125,
0.010528564453125,
0.0231781005859375,
-0.048309326171875,
0.040496826171875,
0.0233306884765625,
-0.09033203125,
-0.0233154296875,
-0.0093841552734375,
0.0117950439453125,
0.0312042236328125,
-0.0018014907836914062,
0.0192108154296875,
-0.01812744140625,
-0.0012674331665039062,
-0.0491943359375,
0.003864288330078125,
0.01149749755859375,
0.049560546875,
0.045135498046875,
-0.01052093505859375,
0.0455322265625,
0.0300140380859375,
-0.01038360595703125,
0.05462646484375,
0.00830078125,
-0.0248870849609375,
0.05535888671875,
-0.0103912353515625,
-0.0297393798828125,
0.0474853515625,
0.011810302734375,
0.0055084228515625,
0.0168609619140625,
-0.0167999267578125,
-0.0440673828125,
0.005706787109375,
-0.0059967041015625,
-0.00943756103515625,
-0.02996826171875,
0.0496826171875,
0.063232421875,
-0.005489349365234375,
-0.00884246826171875,
-0.03973388671875,
0.004947662353515625,
-0.053558349609375,
-0.0014333724975585938,
0.0107574462890625,
-0.0152740478515625,
0.005130767822265625,
0.0055694580078125,
0.0322265625,
-0.01666259765625,
-0.004207611083984375,
0.02899169921875,
0.02508544921875,
0.01788330078125,
0.04656982421875,
0.002361297607421875,
-0.050079345703125,
0.0121002197265625,
-0.07061767578125,
-0.003482818603515625,
-0.01364898681640625,
-0.0020732879638671875,
0.0079498291015625,
-0.01273345947265625,
0.015106201171875,
0.018463134765625,
-0.0189208984375,
-0.008819580078125,
-0.0265960693359375,
-0.048828125,
0.00847625732421875,
-0.00865936279296875,
0.042236328125,
0.046478271484375,
0.01375579833984375,
-0.0257568359375,
-0.041717529296875,
-0.043060302734375,
-0.0017309188842773438,
0.047393798828125,
-0.05633544921875,
0.045318603515625,
0.03131103515625,
0.029266357421875,
-0.040924072265625,
-0.047821044921875,
-0.023834228515625,
0.022064208984375,
-0.0254364013671875,
0.0007476806640625,
0.0298919677734375,
-0.04888916015625,
0.0223846435546875,
-0.039825439453125,
0.038604736328125,
-0.0288238525390625,
0.0202484130859375,
0.02374267578125,
0.0219573974609375,
0.01593017578125,
-0.01139068603515625,
-0.00717926025390625,
-0.032440185546875,
0.050994873046875,
-0.023681640625,
-0.0299835205078125,
-0.050506591796875,
-0.0157012939453125,
-0.0107421875,
0.00662994384765625,
0.01509857177734375,
-0.0440673828125,
0.06170654296875,
0.0163421630859375,
0.01491546630859375,
-0.01519775390625,
0.004474639892578125,
0.0238189697265625,
0.004978179931640625,
0.0121307373046875,
-0.001220703125,
0.023773193359375,
-0.016632080078125,
0.041534423828125,
-0.004425048828125,
-0.07830810546875,
-0.026885986328125,
-0.0293121337890625,
-0.01641845703125,
0.0158538818359375,
-0.03515625,
0.028228759765625,
-0.023101806640625,
0.00560760498046875,
-0.0233612060546875,
0.039276123046875,
-0.0303802490234375,
0.0157470703125,
0.015899658203125,
-0.007350921630859375,
0.0333251953125,
-0.044830322265625,
-0.0302734375,
0.02392578125,
-0.027801513671875,
0.0149078369140625,
0.057952880859375,
0.04449462890625,
-0.0155029296875,
0.0821533203125,
-0.0220489501953125,
0.0302734375,
0.054443359375,
-0.0073394775390625,
0.0129241943359375,
0.046356201171875,
-0.010955810546875,
-0.0015630722045898438,
0.0099945068359375,
-0.00600433349609375,
-0.0077362060546875,
-0.0301666259765625,
-0.005496978759765625,
0.044921875,
-0.003528594970703125,
0.05950927734375,
-0.009735107421875,
0.018646240234375,
0.0177459716796875,
-0.05108642578125,
0.0211639404296875,
-0.036773681640625,
-0.001689910888671875,
-0.006504058837890625,
0.04107666015625,
0.05584716796875,
-0.029205322265625,
0.01421356201171875,
0.0255126953125,
0.0156097412109375,
-0.0159912109375,
0.041229248046875,
0.01021575927734375,
-0.0543212890625,
0.02020263671875,
0.0204620361328125,
0.025146484375,
0.011993408203125,
0.04241943359375,
-0.0360107421875,
-0.01026153564453125,
0.01385498046875,
0.006237030029296875,
0.016845703125,
-0.028472900390625,
0.0175933837890625,
0.01198577880859375,
-0.041473388671875,
0.0460205078125,
-0.040679931640625,
0.051788330078125,
0.0071258544921875,
-0.034088134765625,
0.003162384033203125,
-0.04052734375,
0.005420684814453125,
0.0013446807861328125,
-0.0188140869140625,
0.016082763671875,
-0.004489898681640625,
-0.04595947265625,
0.0013914108276367188,
-0.032867431640625,
0.04364013671875,
-0.03485107421875,
-0.0040283203125,
0.01245880126953125,
0.011505126953125,
0.00681304931640625,
0.005779266357421875,
0.039398193359375,
-0.0631103515625,
-0.04400634765625,
0.029510498046875,
-0.050262451171875,
-0.034698486328125,
-0.0029144287109375,
-0.037017822265625,
0.02545166015625,
-0.00066375732421875,
-0.021270751953125,
0.01145172119140625,
0.016265869140625,
-0.031646728515625,
-0.0098419189453125,
-0.0009455680847167969,
0.041473388671875,
0.013702392578125,
-0.0101470947265625,
-0.0093231201171875,
-0.002239227294921875,
0.0162811279296875,
0.0218353271484375,
-0.005420684814453125,
-0.004741668701171875,
-0.01143646240234375,
0.0164642333984375,
0.07452392578125,
0.024688720703125,
0.0191650390625,
0.02471923828125,
-0.0288848876953125,
-0.01111602783203125,
-0.0276031494140625,
0.01004791259765625,
0.0229339599609375,
-0.02191162109375,
-0.0709228515625,
-0.00452423095703125,
0.0003581047058105469,
-0.0207061767578125,
0.00363922119140625,
0.033966064453125,
-0.02410888671875,
0.0035495758056640625,
0.006702423095703125,
-0.03179931640625,
0.006740570068359375,
0.00957489013671875,
0.01407623291015625,
-0.0745849609375,
-0.0043792724609375,
-0.03314208984375,
0.046630859375,
-0.0065765380859375,
-0.01499176025390625,
0.0338134765625,
0.019622802734375,
0.031219482421875,
-0.025360107421875,
-0.01145172119140625,
-0.0002582073211669922,
0.01275634765625,
-0.0178375244140625,
-0.0182647705078125,
-0.0047454833984375,
-0.0318603515625,
0.0280303955078125,
0.015716552734375,
-0.0159454345703125,
-0.0268402099609375,
-0.0087432861328125,
0.00901031494140625,
0.022003173828125,
-0.01019287109375,
-0.0380859375,
-0.027923583984375,
0.0123443603515625,
0.0220489501953125,
-0.041656494140625,
0.00888824462890625,
0.0228118896484375,
0.0247344970703125,
0.0038433074951171875,
0.0222015380859375,
-0.03369140625,
-0.01509857177734375,
-0.05474853515625,
0.0262908935546875,
0.01995849609375,
0.06927490234375,
0.03509521484375,
0.042266845703125,
-0.008087158203125,
-0.023956298828125,
0.006183624267578125,
0.0247039794921875,
0.00858306884765625,
-0.01593017578125,
-0.0274505615234375,
-0.03460693359375,
0.0064849853515625,
0.041900634765625,
-0.00848388671875,
0.0240020751953125,
0.0186767578125,
0.04327392578125,
-0.0160675048828125,
-0.015899658203125,
0.04931640625,
-0.0188446044921875,
0.01297760009765625,
-0.04107666015625,
-0.00811004638671875,
-0.02984619140625,
-0.0152130126953125,
0.018585205078125,
0.0070037841796875,
0.0089874267578125,
-0.0026607513427734375,
0.0004718303680419922,
0.015899658203125,
-0.005359649658203125,
0.00557708740234375,
0.001308441162109375,
-0.0145721435546875,
0.032135009765625,
-0.01010894775390625,
0.0005517005920410156,
-0.05120849609375,
-0.037200927734375,
0.028106689453125,
0.035491943359375,
-0.0013980865478515625,
0.0216064453125,
0.005741119384765625,
-0.0268096923828125,
-0.0201416015625,
0.049072265625,
0.02685546875,
0.0032253265380859375,
0.01377105712890625,
0.004619598388671875,
-0.042388916015625,
-0.0176544189453125,
-0.02532958984375,
0.03997802734375,
-0.050689697265625,
0.12261962890625,
-0.06182861328125,
-0.00705718994140625,
0.012481689453125,
-0.054962158203125,
0.03277587890625,
-0.01399993896484375,
0.032928466796875,
-0.02520751953125,
-0.0169830322265625,
-0.0132904052734375,
0.0078277587890625,
0.01560211181640625,
0.0137481689453125,
-0.021697998046875,
-0.0028591156005859375,
-0.033111572265625,
0.01629638671875,
0.005931854248046875,
-0.034698486328125,
-0.04052734375,
-0.046966552734375,
0.0173797607421875,
0.040924072265625,
-0.050140380859375,
-0.04473876953125,
-0.01238250732421875,
0.0638427734375,
0.04052734375,
0.01190185546875,
0.02996826171875,
-0.058319091796875,
0.050811767578125,
0.03704833984375,
-0.0160675048828125,
-0.0142059326171875,
0.004730224609375,
-0.0236968994140625,
0.004138946533203125,
-0.009613037109375,
0.0267486572265625,
-0.006099700927734375,
-0.06640625,
-0.0024280548095703125,
0.04571533203125,
0.02484130859375,
-0.037933349609375,
0.009033203125,
0.06353759765625,
-0.036865234375,
0.0148162841796875,
0.01284027099609375,
-0.01093292236328125,
-0.043182373046875,
-0.01141357421875,
0.006679534912109375,
-0.0049285888671875,
-0.0187225341796875,
0.0167083740234375,
-0.0312042236328125,
0.0262298583984375,
0.0166473388671875,
-0.03533935546875,
-0.036163330078125,
0.032989501953125,
0.023468017578125,
0.0198211669921875,
0.0281982421875,
-0.0271453857421875,
0.01593017578125,
-0.0180511474609375,
-0.0295257568359375,
-0.043975830078125,
0.0269317626953125,
-0.0194091796875,
0.0124359130859375,
0.037750244140625,
-0.01922607421875,
-0.04888916015625,
0.03424072265625,
0.0298309326171875,
0.07342529296875,
-0.00838470458984375,
-0.0099029541015625,
0.0029697418212890625,
0.023773193359375,
-0.00371551513671875,
-0.03094482421875,
-0.0168914794921875,
-0.00714111328125,
-0.004863739013671875,
0.0142669677734375,
-0.032257080078125,
-0.0296630859375,
-0.049713134765625,
-0.003635406494140625,
-0.00406646728515625,
0.0394287109375,
-0.033599853515625,
-0.025970458984375,
0.0025653839111328125,
-0.002414703369140625,
-0.003688812255859375,
-0.01132965087890625,
-0.01004791259765625,
-0.01328277587890625,
0.0215606689453125,
0.0172576904296875,
0.0159759521484375,
0.03302001953125,
0.01480865478515625,
-0.0274658203125,
0.01383209228515625,
-0.006977081298828125,
-0.004947662353515625,
-0.0108642578125,
0.00965118408203125,
-0.00957489013671875,
0.006244659423828125,
-0.02093505859375,
-0.062255859375,
-0.0004189014434814453,
-0.01476287841796875,
-0.0126495361328125,
-0.0282440185546875,
0.000179290771484375,
-0.013580322265625,
-0.0016002655029296875,
0.053314208984375,
-0.02606201171875,
-0.019134521484375,
-0.03350830078125,
0.0006890296936035156,
-0.0229034423828125,
-0.00482177734375,
0.0144500732421875,
-0.06475830078125,
-0.024566650390625,
-0.034576416015625,
0.004329681396484375,
0.002361297607421875,
-0.045440673828125,
-0.030853271484375,
-0.01666259765625,
-0.03619384765625,
0.01221466064453125,
-0.01093292236328125,
0.011688232421875,
0.0718994140625,
-0.049896240234375,
-0.01361846923828125,
0.01335906982421875,
0.00724029541015625,
0.024505615234375,
-0.0118865966796875,
0.003673553466796875,
0.032745361328125,
-0.032379150390625,
-0.002452850341796875,
0.031280517578125,
0.01430511474609375,
-0.00836181640625,
-0.0168304443359375,
0.0130767822265625,
-0.00910186767578125,
-0.0092926025390625,
-0.0035762786865234375,
0.0224151611328125,
-0.05035400390625,
-0.0282440185546875,
-0.01247406005859375,
-0.019073486328125,
-0.0135498046875,
-0.0283203125,
0.0014028549194335938,
0.0292205810546875,
-0.00946807861328125,
0.06646728515625,
-0.0244140625,
0.004108428955078125,
0.01371002197265625,
-0.0404052734375,
-0.07073974609375,
0.0162353515625,
-0.0167694091796875,
0.028533935546875,
0.0157318115234375
]
|
4d541fe36222245d15eed708c52704d596fc05ac | Wordpress Stackexchange
Q: How is comment spam received without a comments form? The theme one of my sites is using does not have a comments form nor is there any HTML markup for comments anywhere within the code.
So, how am I receiving spam comments?
All the spam is caught by akismet and I can change the Discussion Settings so only registered and logged-in users can comment (and a few other settings) -- so the question is not "HOW to reduce spam" but how do spammers (bots or humans) submit spam without a form?
A: You don't need a form to submit a comment to the wp-comments-post.php file, or to send a pingback or trackback. Spammers don't use forms, they simply send their spam directly.
Removing the form doesn't "turn off" comments. To do that, go to the Posts screen, and use the Quick Edit to actually disable comments and trackbacks for the various posts. Also visit the Settings->Discussion page, and set it to disable comments and trackbacks for new posts as well.
Once you do this, then the comments being sent directly will be rejected by WordPress. That will actually turn them off.
| Q: How is comment spam received without a comments form? The theme one of my sites is using does not have a comments form nor is there any HTML markup for comments anywhere within the code.
So, how am I receiving spam comments?
All the spam is caught by akismet and I can change the Discussion Settings so only registered and logged-in users can comment (and a few other settings) -- so the question is not "HOW to reduce spam" but how do spammers (bots or humans) submit spam without a form?
A: You don't need a form to submit a comment to the wp-comments-post.php file, or to send a pingback or trackback. Spammers don't use forms, they simply send their spam directly.
Removing the form doesn't "turn off" comments. To do that, go to the Posts screen, and use the Quick Edit to actually disable comments and trackbacks for the various posts. Also visit the Settings->Discussion page, and set it to disable comments and trackbacks for new posts as well.
Once you do this, then the comments being sent directly will be rejected by WordPress. That will actually turn them off.
A: If you just want to know how they do it, one idea is these spammers mostly use scripts that bypass your comment form, and even if it is not there, the script directly access your site's wp-comments-post.php and write on it directly.
| wordpress | {
"language": "en",
"length": 235,
"provenance": "stackexchange_00019.jsonl.gz:438948",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/121437"
} | [
0.0909423828125,
0.00421905517578125,
0.02032470703125,
-0.036285400390625,
0.0135040283203125,
-0.03814697265625,
0.04937744140625,
-0.03302001953125,
0.0097808837890625,
0.01708984375,
-0.022979736328125,
-0.005859375,
-0.0256805419921875,
-0.029144287109375,
-0.0232086181640625,
-0.0277252197265625,
0.0010042190551757812,
0.025970458984375,
0.0217132568359375,
-0.024627685546875,
0.038177490234375,
-0.022705078125,
-0.021575927734375,
0.052825927734375,
-0.016265869140625,
-0.0230865478515625,
0.163818359375,
-0.011138916015625,
0.00018095970153808594,
-0.0171661376953125,
0.01418304443359375,
-0.03607177734375,
0.033782958984375,
0.01428985595703125,
-0.03448486328125,
0.0009965896606445312,
-0.0190277099609375,
0.01453399658203125,
-0.0175323486328125,
0.0213623046875,
0.01470184326171875,
-0.011383056640625,
0.01062774658203125,
-0.0274658203125,
-0.01861572265625,
0.01213836669921875,
0.0079345703125,
-0.02484130859375,
0.052886962890625,
-0.051422119140625,
0.0179290771484375,
0.035186767578125,
0.05413818359375,
-0.0294036865234375,
-0.045440673828125,
-0.008209228515625,
-0.0433349609375,
-0.002590179443359375,
0.0145263671875,
-0.0005950927734375,
0.0181121826171875,
-0.0139617919921875,
0.01522064208984375,
0.0248565673828125,
-0.00478363037109375,
0.0004987716674804688,
0.027008056640625,
0.0154266357421875,
-0.0243988037109375,
0.004974365234375,
0.025909423828125,
-0.01873779296875,
-0.020721435546875,
-0.05072021484375,
0.0229339599609375,
0.01399993896484375,
-0.00901031494140625,
-0.039581298828125,
0.0024471282958984375,
0.0305633544921875,
-0.0029010772705078125,
-0.024169921875,
0.0007596015930175781,
-0.01169586181640625,
0.004364013671875,
0.015838623046875,
-0.0114288330078125,
-0.0194091796875,
-0.036529541015625,
-0.038299560546875,
-0.026763916015625,
-0.058135986328125,
-0.033660888671875,
0.017669677734375,
-0.01019287109375,
-0.01212310791015625,
-0.026275634765625,
0.0012493133544921875,
-0.004718780517578125,
-0.01140594482421875,
-0.0036640167236328125,
-0.00360107421875,
-0.039764404296875,
-0.004852294921875,
0.00031280517578125,
0.02215576171875,
-0.0018024444580078125,
-0.06585693359375,
0.006038665771484375,
0.00901031494140625,
-0.0201263427734375,
0.0143280029296875,
-0.00830078125,
0.003021240234375,
-0.027557373046875,
0.004535675048828125,
-0.04974365234375,
0.011627197265625,
-0.02740478515625,
0.0322265625,
-0.00943756103515625,
0.0216217041015625,
0.00746917724609375,
-0.00057220458984375,
0.0013875961303710938,
0.00342559814453125,
0.006591796875,
-0.029296875,
0.03216552734375,
0.0075836181640625,
-0.044921875,
0.01348876953125,
0.07366943359375,
0.01483917236328125,
0.0177154541015625,
-0.0102691650390625,
-0.0123443603515625,
-0.0211334228515625,
-0.0241851806640625,
0.02978515625,
0.03582763671875,
-0.060577392578125,
-0.0280609130859375,
0.031890869140625,
-0.0035533905029296875,
0.005306243896484375,
0.00864410400390625,
0.015350341796875,
0.017181396484375,
-0.021575927734375,
-0.02117919921875,
0.004329681396484375,
0.023406982421875,
0.003993988037109375,
-0.01126861572265625,
-0.0030765533447265625,
0.0133819580078125,
-0.020233154296875,
-0.031402587890625,
-0.033111572265625,
0.0343017578125,
0.0081329345703125,
0.00766754150390625,
-0.0183258056640625,
-0.0204010009765625,
-0.0213623046875,
-0.0245361328125,
0.007904052734375,
0.0154571533203125,
-0.0177001953125,
0.002498626708984375,
-0.03875732421875,
0.01111602783203125,
0.0002472400665283203,
0.0032501220703125,
0.034637451171875,
-0.000005841255187988281,
0.0277099609375,
0.0298004150390625,
-0.0270843505859375,
-0.018829345703125,
-0.02471923828125,
0.06500244140625,
-0.0156707763671875,
-0.053802490234375,
0.057830810546875,
0.0345458984375,
0.09075927734375,
-0.019744873046875,
0.0279083251953125,
0.030181884765625,
0.05084228515625,
0.0200958251953125,
-0.00677490234375,
-0.002170562744140625,
-0.050872802734375,
0.0149383544921875,
-0.0041961669921875,
0.00008362531661987305,
0.0189208984375,
-0.006641387939453125,
-0.0272064208984375,
0.0128173828125,
-0.00667572021484375,
-0.0033702850341796875,
-0.0283050537109375,
-0.00814056396484375,
0.01531219482421875,
-0.040374755859375,
0.0214385986328125,
0.0242462158203125,
-0.0266571044921875,
-0.03314208984375,
0.03375244140625,
0.006649017333984375,
-0.03790283203125,
-0.03643798828125,
0.05438232421875,
-0.022430419921875,
0.07110595703125,
-0.032562255859375,
-0.06982421875,
-0.0161895751953125,
-0.022247314453125,
0.0172271728515625,
-0.01042938232421875,
-0.0112457275390625,
-0.01291656494140625,
0.0152130126953125,
-0.006988525390625,
-0.005283355712890625,
0.035400390625,
-0.0209197998046875,
-0.0307464599609375,
-0.0281219482421875,
0.009674072265625,
0.017181396484375,
-0.038970947265625,
0.0018939971923828125,
0.039215087890625,
0.0225677490234375,
-0.01235198974609375,
0.027069091796875,
0.07574462890625,
0.016204833984375,
-0.005889892578125,
0.0260162353515625,
0.0259857177734375,
0.030364990234375,
-0.006305694580078125,
0.057098388671875,
-0.050323486328125,
0.0305633544921875,
-0.0198822021484375,
0.036834716796875,
-0.00795745849609375,
-0.004833221435546875,
-0.0037517547607421875,
-0.006298065185546875,
0.0028781890869140625,
0.0139312744140625,
-0.0017251968383789062,
-0.0227203369140625,
0.0008802413940429688,
0.0034084320068359375,
-0.0338134765625,
-0.01174163818359375,
-0.00951385498046875,
0.0027523040771484375,
-0.01435089111328125,
0.0146636962890625,
-0.05633544921875,
-0.005077362060546875,
0.0406494140625,
0.0148468017578125,
0.0435791015625,
0.0183258056640625,
-0.035400390625,
-0.023101806640625,
0.0299072265625,
-0.03973388671875,
-0.01114654541015625,
0.025482177734375,
-0.0153656005859375,
-0.0182342529296875,
0.016448974609375,
0.041290283203125,
-0.037872314453125,
-0.0301971435546875,
-0.00377655029296875,
0.02313232421875,
0.040740966796875,
0.01488494873046875,
-0.017364501953125,
0.0211944580078125,
0.01324462890625,
-0.03570556640625,
-0.0540771484375,
0.042938232421875,
-0.0284271240234375,
0.0124969482421875,
0.06591796875,
0.038726806640625,
-0.0310516357421875,
0.0112457275390625,
0.01436614990234375,
0.0238494873046875,
0.005435943603515625,
-0.00565338134765625,
0.02099609375,
-0.045562744140625,
0.0007343292236328125,
-0.0057525634765625,
0.029632568359375,
-0.049285888671875,
-0.060272216796875,
-0.01255035400390625,
0.00926971435546875,
-0.00799560546875,
0.04754638671875,
0.037017822265625,
-0.0328369140625,
0.006748199462890625,
-0.00763702392578125,
-0.0188140869140625,
-0.0159149169921875,
-0.005535125732421875,
-0.00913238525390625,
-0.004520416259765625,
-0.024627685546875,
-0.06268310546875,
-0.043182373046875,
-0.06781005859375,
0.036376953125,
-0.0105133056640625,
0.023590087890625,
0.012481689453125,
0.044677734375,
0.006622314453125,
-0.033721923828125,
0.005992889404296875,
-0.00543975830078125,
-0.0267791748046875,
-0.00079345703125,
-0.007472991943359375,
-0.0193634033203125,
0.07012939453125,
0.0008721351623535156,
-0.07501220703125,
0.015228271484375,
0.017364501953125,
-0.04632568359375,
0.017486572265625,
0.0018825531005859375,
0.00952911376953125,
-0.00873565673828125,
-0.006435394287109375,
-0.00525665283203125,
-0.01407623291015625,
-0.037200927734375,
0.004840850830078125,
0.0035037994384765625,
-0.03741455078125,
-0.0654296875,
0.01617431640625,
-0.0189208984375,
-0.00849151611328125,
-0.0209808349609375,
0.06024169921875,
0.0262908935546875,
0.01727294921875,
0.0025272369384765625,
-0.018096923828125,
0.018585205078125,
0.050933837890625,
-0.0296630859375,
0.004856109619140625,
-0.029541015625,
0.026092529296875,
0.007579803466796875,
0.00455474853515625,
-0.01910400390625,
0.05169677734375,
-0.013580322265625,
-0.035491943359375,
0.0189208984375,
-0.038421630859375,
-0.0076904296875,
-0.00873565673828125,
0.0033435821533203125,
-0.0015745162963867188,
0.057525634765625,
0.00890350341796875,
-0.006195068359375,
-0.02838134765625,
-0.0013093948364257812,
-0.01849365234375,
-0.04022216796875,
-0.0165863037109375,
-0.0108795166015625,
-0.0212860107421875,
0.007503509521484375,
-0.00641632080078125,
-0.01104736328125,
-0.0187225341796875,
-0.0160980224609375,
-0.017059326171875,
-0.015960693359375,
0.01084136962890625,
-0.055694580078125,
0.01204681396484375,
-0.025848388671875,
-0.01210784912109375,
-0.03289794921875,
0.0118255615234375,
-0.053955078125,
0.004642486572265625,
-0.0008306503295898438,
0.004772186279296875,
-0.000797271728515625,
-0.006542205810546875,
0.019439697265625,
-0.00591278076171875,
0.01229095458984375,
0.0012121200561523438,
0.0039520263671875,
0.0005831718444824219,
0.023529052734375,
-0.04229736328125,
0.01218414306640625,
0.00498199462890625,
-0.0213623046875,
-0.005649566650390625,
0.03424072265625,
0.02325439453125,
0.072021484375,
-0.01239776611328125,
-0.0157928466796875,
0.0298309326171875,
-0.0302886962890625,
-0.0152435302734375,
-0.05828857421875,
-0.02825927734375,
0.01052093505859375,
-0.0380859375,
0.0269775390625,
-0.054412841796875,
-0.01023101806640625,
-0.0018930435180664062,
-0.0210113525390625,
0.0031280517578125,
0.0239410400390625,
0.038299560546875,
0.01126861572265625,
-0.0105133056640625,
-0.02081298828125,
0.01323699951171875,
0.0164642333984375,
0.031585693359375,
0.006916046142578125,
0.003009796142578125,
-0.02117919921875,
0.0225677490234375,
0.010162353515625,
0.0118408203125,
-0.04052734375,
0.03466796875,
-0.017120361328125,
-0.02423095703125,
0.03594970703125,
-0.03289794921875,
0.047698974609375,
0.0186614990234375,
0.02099609375,
-0.0309295654296875,
0.002689361572265625,
0.032562255859375,
0.0139007568359375,
-0.001071929931640625,
-0.019775390625,
-0.0386962890625,
0.022216796875,
-0.075439453125,
0.0309906005859375,
-0.0008993148803710938,
0.0038242340087890625,
0.011749267578125,
0.0086669921875,
-0.0181732177734375,
-0.026092529296875,
-0.057159423828125,
-0.00801849365234375,
0.021575927734375,
-0.023834228515625,
-0.005527496337890625,
0.003765106201171875,
-0.00424957275390625,
0.0439453125,
0.024322509765625,
-0.0130462646484375,
-0.033355712890625,
0.003566741943359375,
-0.0119171142578125,
-0.00714874267578125,
0.055328369140625,
0.0379638671875,
-0.043487548828125,
0.006717681884765625,
-0.00861358642578125,
-0.01276397705078125,
-0.01146697998046875,
-0.043487548828125,
-0.0030002593994140625,
0.003787994384765625,
-0.01617431640625,
0.03680419921875,
0.00788116455078125,
0.00201416015625,
0.007045745849609375,
-0.01025390625,
0.035736083984375,
0.04339599609375,
0.002239227294921875,
0.01413726806640625,
0.01003265380859375,
0.01294708251953125,
-0.0413818359375,
0.01546478271484375,
-0.0279083251953125,
-0.029266357421875,
0.0214385986328125,
0.01715087890625,
0.0183868408203125,
0.0350341796875,
-0.01139068603515625,
0.00952911376953125,
-0.0523681640625,
0.0200653076171875,
0.0733642578125,
0.004032135009765625,
-0.01303863525390625,
-0.03228759765625,
-0.0286865234375,
0.046234130859375,
-0.01340484619140625,
-0.00199127197265625,
-0.0239715576171875,
-0.01482391357421875,
0.0281219482421875,
-0.0400390625,
0.005779266357421875,
0.0090179443359375,
0.0479736328125,
-0.0147247314453125,
-0.023956298828125,
-0.0758056640625,
-0.00238037109375,
-0.0238800048828125,
0.030792236328125,
0.044403076171875,
0.0035266876220703125,
0.00661468505859375,
0.006603240966796875,
-0.0155029296875,
-0.028350830078125,
0.01209259033203125,
0.00738525390625,
-0.01544189453125,
0.001552581787109375,
0.0147552490234375,
-0.060882568359375,
-0.043853759765625,
-0.08349609375,
-0.031768798828125,
-0.054595947265625,
-0.0022430419921875,
0.015594482421875,
0.0266571044921875,
-0.0272064208984375,
-0.051055908203125,
-0.0214691162109375,
0.019744873046875,
0.0255889892578125,
0.038726806640625,
-0.033782958984375,
0.04815673828125,
0.035430908203125,
-0.0094146728515625,
0.00299835205078125,
0.0262908935546875,
0.009124755859375,
-0.01025390625,
0.0279083251953125,
-0.05743408203125,
-0.053863525390625,
-0.00989532470703125,
-0.03759765625,
0.0265350341796875,
0.0166473388671875,
-0.00971221923828125,
-0.00579071044921875,
-0.01224517822265625,
0.006702423095703125,
-0.040924072265625,
0.041046142578125,
-0.01433563232421875,
0.023834228515625,
-0.056671142578125,
-0.0173187255859375,
0.00762176513671875,
-0.034515380859375,
0.005893707275390625,
0.01358795166015625,
-0.02032470703125,
0.0091400146484375,
0.009735107421875,
0.01544952392578125,
0.00980377197265625,
0.0144805908203125,
-0.040618896484375,
0.016876220703125,
0.0187530517578125,
-0.0018138885498046875,
0.01120758056640625,
0.047149658203125,
-0.028228759765625,
-0.0712890625,
0.0654296875,
0.04583740234375,
-0.0269927978515625,
0.07318115234375,
-0.029998779296875,
0.050262451171875,
0.05657958984375,
0.097412109375,
-0.08416748046875,
0.0250701904296875,
0.021575927734375,
-0.041229248046875,
0.0145416259765625,
-0.0185699462890625,
0.004657745361328125,
-0.085205078125,
0.048614501953125,
0.03997802734375,
0.004207611083984375,
-0.00432586669921875,
-0.025421142578125,
-0.00839996337890625,
0.032257080078125,
0.053863525390625,
0.000255584716796875,
-0.021636962890625,
-0.03662109375,
0.0112457275390625,
-0.016387939453125,
-0.0318603515625,
-0.025787353515625,
0.03778076171875,
-0.049530029296875,
-0.08892822265625,
-0.00812530517578125,
-0.0302276611328125,
-0.0013055801391601562,
0.01422119140625,
0.02410888671875,
0.0004398822784423828,
0.0225982666015625,
-0.003871917724609375,
-0.013397216796875,
-0.00566864013671875,
-0.02923583984375,
0.005062103271484375,
-0.04949951171875,
0.02252197265625,
0.01053619384765625,
0.0229644775390625,
0.033782958984375,
0.0450439453125,
-0.09686279296875,
0.001964569091796875,
0.0239715576171875,
0.0694580078125,
-0.00676727294921875,
-0.030029296875,
0.031829833984375,
-0.00302886962890625,
-0.00811767578125,
-0.056732177734375,
-0.0199127197265625,
-0.0023860931396484375,
0.07598876953125,
-0.0604248046875,
0.024627685546875,
0.0125885009765625,
-0.07257080078125,
-0.08270263671875,
0.07745361328125,
0.003360748291015625,
0.0286407470703125,
0.0051727294921875,
0.016632080078125,
-0.020721435546875,
-0.014678955078125,
-0.0274810791015625,
0.045623779296875,
-0.022308349609375,
0.062286376953125,
-0.070068359375,
-0.01702880859375,
0.004901885986328125,
0.057281494140625,
0.08514404296875,
0.0129241943359375,
0.0286712646484375,
0.021331787109375,
0.08538818359375,
0.03411865234375,
-0.028076171875,
-0.00801849365234375,
-0.00885009765625,
0.033233642578125,
0.059051513671875,
-0.045318603515625,
0.024566650390625,
0.0103607177734375,
-0.01042938232421875,
0.00846099853515625,
-0.00470733642578125,
-0.02203369140625,
0.023406982421875,
0.0592041015625,
-0.014984130859375,
0.007770538330078125,
0.014739990234375,
-0.0350341796875,
-0.040802001953125,
0.0517578125,
0.036041259765625,
-0.0582275390625,
0.007537841796875,
-0.057647705078125,
0.056121826171875,
0.015655517578125,
0.041229248046875,
0.0236053466796875,
0.0278167724609375,
0.0711669921875,
-0.0501708984375,
0.0148773193359375,
0.0014591217041015625,
-0.04669189453125,
0.0285491943359375,
-0.01041412353515625,
0.04071044921875,
-0.0592041015625,
-0.075439453125,
0.0007452964782714844,
0.05206298828125,
-0.00666046142578125,
0.01168060302734375,
0.0098724365234375,
0.0017385482788085938,
0.0238494873046875,
-0.01016998291015625,
0.058349609375,
0.039520263671875,
-0.01715087890625,
-0.025665283203125,
-0.011962890625,
-0.006298065185546875,
0.00026988983154296875,
-0.0181121826171875,
0.0258331298828125,
0.050750732421875,
-0.003742218017578125,
0.0096282958984375,
-0.0114288330078125,
-0.0022125244140625,
-0.01026153564453125,
-0.013275146484375,
0.020782470703125,
-0.0125732421875,
0.016876220703125,
0.0036716461181640625,
-0.009613037109375,
0.0185089111328125,
-0.0170440673828125,
0.032684326171875,
0.0157928466796875,
-0.0009407997131347656,
0.0032100677490234375,
0.0236053466796875,
0.00415802001953125,
0.0034236907958984375,
-0.0054779052734375,
0.001216888427734375,
0.00508880615234375,
-0.000904083251953125,
-0.02276611328125,
-0.00989532470703125,
-0.0264739990234375,
-0.029541015625,
0.018707275390625,
-0.026641845703125,
0.007656097412109375,
-0.049285888671875,
0.08001708984375,
-0.00928497314453125,
0.0150604248046875,
0.00852203369140625,
-0.0308380126953125,
0.034912109375,
-0.00615692138671875,
0.02313232421875,
0.006290435791015625,
-0.0733642578125,
-0.034210205078125,
0.049713134765625,
-0.0384521484375,
0.0019407272338867188,
0.04376220703125,
-0.044921875,
0.0212554931640625,
0.002216339111328125,
-0.006160736083984375,
0.017791748046875,
-0.034576416015625,
0.02984619140625,
-0.007656097412109375,
-0.0170135498046875,
-0.006046295166015625,
-0.038726806640625,
-0.0215301513671875,
0.00927734375,
0.029022216796875,
0.0028514862060546875,
0.06939697265625,
-0.017547607421875,
0.0120086669921875,
-0.0599365234375,
0.045135498046875,
-0.03094482421875,
-0.03692626953125,
0.0723876953125,
0.0745849609375,
-0.003032684326171875,
-0.036529541015625,
-0.006610870361328125,
0.07818603515625,
0.0268707275390625,
0.00598907470703125,
0.0697021484375,
0.00543975830078125,
-0.0173797607421875,
-0.035736083984375,
-0.0010747909545898438,
-0.0199432373046875,
-0.0261993408203125,
-0.0080718994140625,
-0.00429534912109375,
0.01220703125,
0.0221405029296875,
0.0047454833984375,
0.0596923828125,
-0.01366424560546875,
0.0396728515625,
-0.008087158203125,
-0.028717041015625,
-0.00879669189453125,
0.026031494140625,
-0.0640869140625,
0.060394287109375,
0.03594970703125,
-0.0234832763671875,
0.051055908203125,
0.0024700164794921875,
0.01493072509765625,
0.0280914306640625,
0.02239990234375,
0.0123748779296875,
-0.01053619384765625,
0.034210205078125,
-0.006610870361328125,
-0.01459503173828125,
-0.01435089111328125,
0.00559234619140625,
-0.0220947265625,
-0.036956787109375,
-0.01415252685546875,
-0.0225677490234375,
-0.0174102783203125,
0.00974273681640625,
-0.02252197265625,
-0.02587890625,
-0.02001953125,
0.001094818115234375,
-0.0190887451171875,
-0.01142120361328125,
-0.053070068359375,
-0.00923919677734375,
0.0190277099609375,
0.06756591796875,
-0.0609130859375,
0.0457763671875,
-0.0219268798828125,
-0.0231781005859375,
-0.060882568359375,
-0.02227783203125,
-0.046630859375,
0.038482666015625,
-0.036163330078125,
0.035064697265625,
0.03607177734375,
-0.02191162109375,
0.01934814453125,
0.036773681640625,
0.0230560302734375,
0.0904541015625,
-0.0287322998046875,
0.00698089599609375,
0.0469970703125,
-0.0044403076171875,
-0.038055419921875,
-0.05487060546875,
-0.005275726318359375,
-0.01763916015625,
-0.01386260986328125,
-0.0380859375,
0.0333251953125,
0.0261688232421875,
-0.043548583984375,
-0.079833984375,
-0.01248931884765625,
-0.0147552490234375,
-0.039764404296875,
-0.0419921875,
-0.0247650146484375,
0.02423095703125,
-0.0250701904296875,
-0.0288543701171875,
-0.01357269287109375,
-0.056549072265625,
0.035614013671875,
-0.007556915283203125,
0.00010901689529418945,
0.021209716796875,
-0.023956298828125,
0.021148681640625,
0.0256500244140625,
0.060302734375,
-0.020111083984375,
-0.0007977485656738281,
-0.0004184246063232422,
0.0267333984375,
0.0186920166015625,
-0.0498046875,
0.0548095703125,
-0.0016584396362304688,
0.043487548828125,
0.0021381378173828125,
-0.02557373046875,
-0.0172576904296875,
0.017486572265625,
0.036956787109375,
0.0572509765625,
0.006923675537109375,
-0.04376220703125,
-0.00506591796875,
-0.007396697998046875,
-0.035491943359375,
0.003948211669921875,
0.007312774658203125,
-0.0192108154296875,
0.00876617431640625,
-0.025299072265625,
0.017242431640625,
-0.05145263671875,
-0.0447998046875,
-0.0231475830078125,
-0.0272216796875,
-0.0266571044921875,
0.00437164306640625,
0.054656982421875,
-0.06097412109375,
0.036651611328125,
-0.01422882080078125,
0.0191802978515625,
-0.0091094970703125,
0.04425048828125,
0.007381439208984375,
0.0290679931640625,
-0.0198516845703125,
-0.0157623291015625,
-0.0187530517578125,
0.04351806640625,
-0.004955291748046875,
0.027252197265625,
-0.0467529296875,
-0.0038204193115234375,
0.020416259765625,
0.0159759521484375,
0.00008422136306762695,
0.03948974609375,
-0.007904052734375,
0.00250244140625,
-0.01192474365234375,
0.00809478759765625,
-0.00830078125,
-0.027740478515625,
-0.0189208984375,
0.034820556640625,
0.00469970703125,
-0.0224151611328125,
0.048004150390625,
-0.035552978515625,
0.0008206367492675781,
-0.0029544830322265625,
0.00751495361328125,
-0.070556640625,
0.057403564453125,
0.0280303955078125,
0.01456451416015625,
0.04217529296875
]
|
6346889aa014957db54e2023ea6e364ae9a3b350 | Wordpress Stackexchange
Q: URL to download latest version of WP for other languages than English I'm considering he possibility of automating/scripting a basic WP install. Part of it will include downloading the latest WordPress version.
The en-us version can be obtained by downloading http://wordpress.org/latest.zip (or tar.gz), is there any way to get an always up-to-date file URL for other languages?
A: Can you include WP-CLI in your script? Then it could be as easy as:
wp core config --dbname=wordpress_default --locale="<your locale>" --dbuser=sqluser --dbpass=sqlpass --quiet
wp core install --url=local.wordpress.dev --quiet --title="Local WordPress Dev" --admin_name=admin --admin_email="[email protected]" --admin_password="password"
Docs for wp core config and wp core install
| Q: URL to download latest version of WP for other languages than English I'm considering he possibility of automating/scripting a basic WP install. Part of it will include downloading the latest WordPress version.
The en-us version can be obtained by downloading http://wordpress.org/latest.zip (or tar.gz), is there any way to get an always up-to-date file URL for other languages?
A: Can you include WP-CLI in your script? Then it could be as easy as:
wp core config --dbname=wordpress_default --locale="<your locale>" --dbuser=sqluser --dbpass=sqlpass --quiet
wp core install --url=local.wordpress.dev --quiet --title="Local WordPress Dev" --admin_name=admin --admin_email="[email protected]" --admin_password="password"
Docs for wp core config and wp core install
| wordpress | {
"language": "en",
"length": 102,
"provenance": "stackexchange_00019.jsonl.gz:439000",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/121586"
} | [
0.00789642333984375,
-0.037353515625,
0.01483917236328125,
-0.032257080078125,
-0.033447265625,
0.004192352294921875,
-0.0204315185546875,
-0.01453399658203125,
0.022308349609375,
0.04046630859375,
0.01824951171875,
0.002567291259765625,
-0.00043511390686035156,
-0.01071929931640625,
-0.01233673095703125,
-0.0016021728515625,
0.07000732421875,
-0.02923583984375,
0.0323486328125,
0.027984619140625,
-0.046630859375,
0.072021484375,
0.055419921875,
0.048675537109375,
-0.0033740997314453125,
0.0134735107421875,
0.06866455078125,
-0.0318603515625,
-0.0022068023681640625,
-0.030487060546875,
0.0292510986328125,
0.0015106201171875,
0.011383056640625,
0.0172119140625,
-0.0279083251953125,
-0.047210693359375,
-0.0267791748046875,
0.01229095458984375,
-0.0309295654296875,
0.032135009765625,
-0.0030384063720703125,
-0.00380706787109375,
-0.021209716796875,
0.056488037109375,
-0.027099609375,
-0.061065673828125,
0.004131317138671875,
-0.0140838623046875,
-0.0084991455078125,
0.020843505859375,
0.0276031494140625,
0.004833221435546875,
0.0256805419921875,
0.02557373046875,
-0.008819580078125,
0.01085662841796875,
-0.00848388671875,
0.052764892578125,
0.033294677734375,
-0.044281005859375,
-0.055999755859375,
0.02838134765625,
0.0194549560546875,
0.0108642578125,
-0.026702880859375,
0.0117034912109375,
0.065673828125,
0.0027561187744140625,
-0.035125732421875,
-0.041046142578125,
0.0176239013671875,
-0.0029125213623046875,
0.0018310546875,
-0.051849365234375,
0.003810882568359375,
0.050445556640625,
-0.02325439453125,
-0.03424072265625,
0.02081298828125,
-0.006137847900390625,
0.0060882568359375,
-0.01213836669921875,
-0.00809478759765625,
-0.046173095703125,
0.038360595703125,
-0.00460052490234375,
-0.0024013519287109375,
-0.00591278076171875,
-0.032135009765625,
-0.037872314453125,
-0.039520263671875,
-0.0234222412109375,
-0.06982421875,
0.0085296630859375,
-0.000995635986328125,
-0.03729248046875,
0.006195068359375,
0.0157470703125,
-0.007720947265625,
0.00783538818359375,
0.006153106689453125,
-0.045989990234375,
0.0279693603515625,
-0.01800537109375,
0.00021886825561523438,
0.021392822265625,
0.0018186569213867188,
0.0032253265380859375,
0.0254669189453125,
0.029296875,
0.014312744140625,
0.0274810791015625,
-0.0276336669921875,
-0.03729248046875,
0.024169921875,
0.05694580078125,
-0.037628173828125,
0.0266265869140625,
-0.0006561279296875,
0.0221099853515625,
0.0036163330078125,
0.0401611328125,
-0.026824951171875,
0.014556884765625,
-0.024078369140625,
-0.0078277587890625,
0.007709503173828125,
-0.0293731689453125,
-0.03546142578125,
0.04034423828125,
-0.022674560546875,
-0.0015010833740234375,
0.0107879638671875,
-0.0005521774291992188,
-0.031707763671875,
-0.02935791015625,
-0.0284576416015625,
0.023895263671875,
0.0196075439453125,
0.0102081298828125,
-0.038299560546875,
0.0029888153076171875,
0.07305908203125,
-0.01983642578125,
0.016082763671875,
0.0015192031860351562,
-0.00836944580078125,
0.01186370849609375,
0.0271759033203125,
0.0277099609375,
-0.01001739501953125,
-0.0252838134765625,
0.05780029296875,
-0.0002428293228149414,
-0.032958984375,
-0.04925537109375,
0.03369140625,
-0.052032470703125,
-0.01183319091796875,
-0.059600830078125,
-0.00798797607421875,
-0.01043701171875,
0.005702972412109375,
0.022216796875,
-0.006061553955078125,
0.018829345703125,
0.0048980712890625,
0.0016841888427734375,
0.035186767578125,
0.005153656005859375,
0.0192413330078125,
-0.0504150390625,
0.049285888671875,
-0.01190185546875,
-0.017333984375,
0.0289154052734375,
0.004711151123046875,
-0.01934814453125,
0.0260162353515625,
0.0228424072265625,
-0.01140594482421875,
-0.018524169921875,
0.04779052734375,
-0.006916046142578125,
-0.01471710205078125,
-0.0252685546875,
0.0202484130859375,
0.06195068359375,
0.0219573974609375,
0.03436279296875,
-0.018646240234375,
-0.049774169921875,
-0.049468994140625,
0.0293731689453125,
-0.04046630859375,
0.034149169921875,
-0.0166168212890625,
0.0684814453125,
-0.034332275390625,
-0.034576416015625,
0.0280609130859375,
0.0181427001953125,
-0.024749755859375,
0.01275634765625,
-0.040496826171875,
0.0015821456909179688,
-0.0137481689453125,
0.0278778076171875,
0.0023784637451171875,
-0.0296478271484375,
0.008056640625,
-0.0224151611328125,
0.01477813720703125,
-0.0496826171875,
-0.043914794921875,
0.02520751953125,
-0.045379638671875,
0.049072265625,
0.00696563720703125,
0.08038330078125,
0.01184844970703125,
-0.0263214111328125,
0.02239990234375,
-0.034515380859375,
-0.02557373046875,
-0.00406646728515625,
-0.0068511962890625,
0.005191802978515625,
0.033203125,
0.005603790283203125,
0.075927734375,
-0.0190582275390625,
0.00855255126953125,
-0.011566162109375,
-0.0223388671875,
0.006145477294921875,
0.021484375,
-0.0190582275390625,
0.01422119140625,
0.048309326171875,
0.015899658203125,
0.021240234375,
-0.001216888427734375,
0.007511138916015625,
0.03326416015625,
-0.034576416015625,
0.004512786865234375,
-0.00152587890625,
-0.0003650188446044922,
0.0230255126953125,
0.035736083984375,
-0.00052642822265625,
-0.001033782958984375,
-0.04345703125,
0.0031147003173828125,
0.0164794921875,
-0.027496337890625,
-0.031036376953125,
0.006999969482421875,
0.0177764892578125,
0.0041656494140625,
-0.052978515625,
-0.0318603515625,
-0.027984619140625,
-0.031829833984375,
0.0013523101806640625,
0.0154876708984375,
0.019622802734375,
0.0098114013671875,
-0.038818359375,
0.01183319091796875,
0.039947509765625,
0.0125274658203125,
0.043853759765625,
-0.0182952880859375,
0.01352691650390625,
0.02386474609375,
-0.0268402099609375,
0.007541656494140625,
0.01666259765625,
-0.00482177734375,
0.0136260986328125,
0.01531219482421875,
-0.00652313232421875,
0.0121612548828125,
-0.02655029296875,
0.01151275634765625,
0.00458526611328125,
-0.006317138671875,
0.0032405853271484375,
0.0516357421875,
-0.042449951171875,
-0.038238525390625,
0.00426483154296875,
0.0013256072998046875,
-0.044677734375,
0.07635498046875,
-0.02435302734375,
0.0160980224609375,
-0.004787445068359375,
0.06201171875,
0.053985595703125,
-0.003345489501953125,
0.0008516311645507812,
0.01541900634765625,
-0.0027618408203125,
0.042724609375,
-0.017730712890625,
-0.03106689453125,
0.034271240234375,
-0.105712890625,
-0.046539306640625,
0.01293182373046875,
-0.002635955810546875,
-0.00875091552734375,
-0.034454345703125,
-0.02154541015625,
-0.0164031982421875,
-0.1334228515625,
-0.115234375,
-0.0251617431640625,
-0.025970458984375,
0.04376220703125,
0.0262603759765625,
0.0063629150390625,
-0.039459228515625,
0.0523681640625,
0.01329803466796875,
0.0027904510498046875,
-0.036834716796875,
-0.079345703125,
-0.06915283203125,
-0.060791015625,
-0.03070068359375,
-0.011749267578125,
-0.01806640625,
0.01287841796875,
0.01319122314453125,
-0.00945281982421875,
-0.05133056640625,
-0.0172271728515625,
0.06561279296875,
-0.0178375244140625,
-0.029327392578125,
-0.001953125,
-0.02001953125,
0.033294677734375,
-0.01142120361328125,
0.020660400390625,
0.0229034423828125,
-0.007080078125,
-0.0145416259765625,
-0.024383544921875,
0.016632080078125,
0.00730133056640625,
-0.0308990478515625,
0.0145263671875,
0.0235137939453125,
-0.033447265625,
-0.041168212890625,
-0.00884246826171875,
0.02056884765625,
0.00327301025390625,
0.0633544921875,
-0.01123809814453125,
-0.0445556640625,
0.006069183349609375,
0.05078125,
-0.0111236572265625,
-0.0291900634765625,
0.04412841796875,
-0.0129852294921875,
0.021453857421875,
-0.01611328125,
-0.043060302734375,
-0.041778564453125,
0.09051513671875,
0.00873565673828125,
-0.0341796875,
0.035797119140625,
0.0028743743896484375,
0.002750396728515625,
-0.05352783203125,
-0.047607421875,
-0.03118896484375,
0.061859130859375,
-0.0076751708984375,
0.04339599609375,
-0.040130615234375,
-0.04742431640625,
-0.008392333984375,
0.09912109375,
-0.0089569091796875,
-0.0171051025390625,
0.038818359375,
0.03131103515625,
-0.059234619140625,
-0.045166015625,
-0.060302734375,
-0.0028057098388671875,
-0.034027099609375,
-0.002349853515625,
-0.01641845703125,
0.00872039794921875,
-0.01348114013671875,
-0.0123138427734375,
-0.005352020263671875,
-0.039215087890625,
0.03082275390625,
0.0162200927734375,
-0.0247039794921875,
0.0218505859375,
-0.0214996337890625,
0.01099395751953125,
-0.033599853515625,
0.01334381103515625,
-0.075439453125,
-0.0126495361328125,
-0.01373291015625,
0.0304107666015625,
-0.00897216796875,
-0.0296630859375,
-0.02374267578125,
0.0322265625,
-0.027587890625,
0.0251922607421875,
-0.00983428955078125,
0.028350830078125,
0.0167083740234375,
0.0259246826171875,
-0.00295257568359375,
0.0009093284606933594,
0.00212860107421875,
-0.02496337890625,
-0.07269287109375,
-0.031280517578125,
-0.00830841064453125,
0.0134124755859375,
0.04754638671875,
-0.04327392578125,
-0.0270538330078125,
-0.0233917236328125,
-0.00208282470703125,
0.01861572265625,
-0.01166534423828125,
0.00849151611328125,
-0.0182037353515625,
-0.031341552734375,
0.07122802734375,
0.034515380859375,
-0.025970458984375,
-0.006679534912109375,
0.045135498046875,
-0.00493621826171875,
-0.04827880859375,
-0.06536865234375,
0.035858154296875,
0.050811767578125,
0.01409149169921875,
0.07659912109375,
0.049591064453125,
-0.0250244140625,
0.0579833984375,
0.053863525390625,
-0.0208892822265625,
0.0765380859375,
-0.01042938232421875,
0.049835205078125,
-0.01187896728515625,
0.00005364418029785156,
0.052703857421875,
-0.0723876953125,
0.034515380859375,
0.003208160400390625,
-0.03253173828125,
0.001800537109375,
0.029449462890625,
-0.00390625,
0.006473541259765625,
-0.0218353271484375,
-0.089111328125,
0.031402587890625,
-0.03887939453125,
-0.0180511474609375,
-0.0191497802734375,
0.007175445556640625,
0.035125732421875,
0.024322509765625,
-0.01560211181640625,
0.016845703125,
0.0024471282958984375,
0.038787841796875,
0.0199432373046875,
0.02728271484375,
-0.014129638671875,
-0.01727294921875,
-0.01174163818359375,
0.06396484375,
-0.0168609619140625,
-0.050079345703125,
0.0068359375,
-0.0030269622802734375,
0.0226287841796875,
0.058502197265625,
-0.004657745361328125,
0.0220489501953125,
0.0228424072265625,
-0.0214691162109375,
-0.0120849609375,
-0.01519775390625,
-0.02801513671875,
-0.052001953125,
-0.039276123046875,
0.0117645263671875,
-0.0194244384765625,
-0.02349853515625,
0.06085205078125,
-0.021636962890625,
0.019622802734375,
-0.0020999908447265625,
-0.0141448974609375,
0.029327392578125,
-0.0017271041870117188,
0.02606201171875,
0.0028438568115234375,
0.0056610107421875,
-0.034393310546875,
0.028656005859375,
-0.0034122467041015625,
0.0033130645751953125,
-0.004405975341796875,
0.046112060546875,
-0.0103607177734375,
-0.0198516845703125,
0.0249786376953125,
-0.05621337890625,
-0.0018796920776367188,
0.01023101806640625,
0.0254974365234375,
-0.00946044921875,
-0.00713348388671875,
0.01035308837890625,
0.00708770751953125,
0.003726959228515625,
-0.01629638671875,
0.0027027130126953125,
-0.039703369140625,
-0.020477294921875,
0.045257568359375,
-0.04705810546875,
0.0008606910705566406,
-0.008819580078125,
0.0321044921875,
-0.03497314453125,
-0.01528167724609375,
0.0102691650390625,
0.023406982421875,
-0.0300445556640625,
-0.01219940185546875,
0.0282745361328125,
0.0124053955078125,
0.01422119140625,
-0.031585693359375,
-0.01654052734375,
-0.009033203125,
0.006771087646484375,
0.03656005859375,
-0.0171356201171875,
-0.0013685226440429688,
-0.0191650390625,
-0.0167083740234375,
-0.033905029296875,
-0.006366729736328125,
0.0018100738525390625,
-0.040191650390625,
0.00811004638671875,
0.0291595458984375,
0.0185394287109375,
-0.0206756591796875,
-0.0301666259765625,
-0.019744873046875,
0.0235137939453125,
0.020843505859375,
0.0297393798828125,
-0.027374267578125,
0.0980224609375,
0.00965118408203125,
0.032806396484375,
0.01317596435546875,
0.047637939453125,
-0.03179931640625,
0.0060272216796875,
0.0360107421875,
0.0088958740234375,
-0.030120849609375,
-0.02947998046875,
-0.0185546875,
-0.050262451171875,
0.0191650390625,
-0.015289306640625,
-0.001476287841796875,
-0.01432037353515625,
-0.003551483154296875,
-0.015045166015625,
-0.004375457763671875,
0.0103302001953125,
0.01514434814453125,
-0.031402587890625,
-0.053619384765625,
0.01861572265625,
-0.01332855224609375,
0.0303497314453125,
0.00868988037109375,
-0.04901123046875,
-0.00910186767578125,
0.0640869140625,
-0.019195556640625,
0.051513671875,
0.09979248046875,
0.01526641845703125,
0.0784912109375,
0.05419921875,
0.03167724609375,
0.0105743408203125,
-0.01021575927734375,
-0.0230255126953125,
-0.0283966064453125,
0.02020263671875,
-0.004711151123046875,
0.0015277862548828125,
0.0171051025390625,
-0.00504302978515625,
0.034393310546875,
0.033538818359375,
0.055938720703125,
-0.032379150390625,
0.00897216796875,
0.000988006591796875,
-0.059844970703125,
0.00482177734375,
0.0079193115234375,
-0.039276123046875,
-0.09197998046875,
0.0748291015625,
-0.04449462890625,
0.011688232421875,
0.0207061767578125,
-0.02276611328125,
-0.00838470458984375,
0.007396697998046875,
0.00411224365234375,
0.01302337646484375,
-0.03662109375,
-0.0259857177734375,
0.007640838623046875,
-0.0171661376953125,
-0.01226806640625,
-0.0123443603515625,
0.005157470703125,
-0.04034423828125,
-0.061431884765625,
-0.0003993511199951172,
-0.0153350830078125,
-0.00555419921875,
-0.024017333984375,
-0.0196685791015625,
0.0131378173828125,
0.043670654296875,
-0.032318115234375,
-0.00899505615234375,
0.032257080078125,
0.016754150390625,
0.03131103515625,
0.01233673095703125,
-0.002346038818359375,
0.004878997802734375,
0.01552581787109375,
-0.009735107421875,
-0.032379150390625,
-0.0119476318359375,
0.007671356201171875,
-0.01428985595703125,
0.0694580078125,
-0.03448486328125,
0.001277923583984375,
0.0265960693359375,
0.0024318695068359375,
-0.0041961669921875,
0.013671875,
0.00931549072265625,
-0.0543212890625,
-0.027008056640625,
0.00705718994140625,
-0.0256500244140625,
0.00643157958984375,
0.028594970703125,
-0.032989501953125,
0.050994873046875,
-0.0028934478759765625,
-0.01129150390625,
0.006465911865234375,
0.027496337890625,
-0.0245513916015625,
0.00968170166015625,
-0.0033626556396484375,
0.031524658203125,
0.027801513671875,
-0.0108642578125,
-0.0014123916625976562,
0.0070648193359375,
-0.006072998046875,
0.01352691650390625,
-0.004993438720703125,
-0.0000870823860168457,
-0.019561767578125,
-0.003284454345703125,
0.04473876953125,
0.043304443359375,
0.019012451171875,
0.0178070068359375,
0.001544952392578125,
0.045379638671875,
0.0218353271484375,
-0.041351318359375,
0.036590576171875,
-0.0265350341796875,
-0.01068878173828125,
0.023162841796875,
0.0233612060546875,
0.007537841796875,
0.0130767822265625,
0.0343017578125,
-0.07318115234375,
0.0158538818359375,
0.053314208984375,
-0.0210418701171875,
0.0104827880859375,
0.01105499267578125,
0.025634765625,
-0.0236358642578125,
-0.01253509521484375,
-0.0256500244140625,
0.040679931640625,
0.01396942138671875,
-0.02081298828125,
0.016021728515625,
0.0169677734375,
0.0179595947265625,
-0.01078033447265625,
-0.0179290771484375,
0.01042938232421875,
0.01287078857421875,
0.0460205078125,
0.03424072265625,
0.04681396484375,
0.0113372802734375,
0.039520263671875,
0.018096923828125,
0.053192138671875,
-0.049346923828125,
-0.04248046875,
-0.0027484893798828125,
-0.0174560546875,
-0.0034465789794921875,
-0.00917816162109375,
-0.006565093994140625,
0.0206756591796875,
0.03521728515625,
-0.023834228515625,
-0.01297760009765625,
0.029449462890625,
0.0132293701171875,
0.0013294219970703125,
-0.0251007080078125,
0.00323486328125,
-0.00007069110870361328,
0.0124359130859375,
-0.0301361083984375,
0.0220184326171875,
0.02410888671875,
0.005596160888671875,
0.0265045166015625,
-0.01995849609375,
-0.004241943359375,
-0.00505828857421875,
0.05029296875,
-0.004734039306640625,
0.0081329345703125,
-0.0203704833984375,
-0.05419921875,
0.01297760009765625,
0.03375244140625,
0.029205322265625,
-0.02734375,
0.06488037109375,
0.0745849609375,
-0.04644775390625,
-0.0306549072265625,
0.045928955078125,
0.00601959228515625,
-0.001483917236328125,
-0.04986572265625,
0.029815673828125,
0.01165008544921875,
-0.01248931884765625,
0.00267791748046875,
0.00972747802734375,
0.0097808837890625,
-0.041473388671875,
0.066650390625,
-0.017181396484375,
0.00707244873046875,
0.0209503173828125,
-0.0170440673828125,
0.039276123046875,
-0.0012025833129882812,
-0.0301055908203125,
0.01050567626953125,
-0.0419921875,
0.006378173828125,
0.0115966796875,
0.019775390625,
-0.005908966064453125,
0.04107666015625,
0.005657196044921875,
-0.006992340087890625,
0.01800537109375,
-0.002513885498046875,
0.0015363693237304688,
-0.00904083251953125,
0.0199737548828125,
-0.01145172119140625,
-0.032135009765625,
-0.036590576171875,
-0.044342041015625,
0.056549072265625,
0.037872314453125,
0.07666015625,
-0.0182647705078125,
0.03955078125,
-0.0247650146484375,
0.00618743896484375,
-0.03814697265625,
-0.0169677734375,
0.0012407302856445312,
0.038421630859375,
0.021331787109375,
-0.01421356201171875,
-0.06646728515625,
-0.0163116455078125,
0.0296173095703125,
-0.032318115234375,
0.012847900390625,
-0.054779052734375,
0.037506103515625,
-0.0002484321594238281,
-0.004894256591796875,
-0.04876708984375,
-0.058990478515625,
-0.037750244140625,
0.01319122314453125,
0.003063201904296875,
-0.0122222900390625,
-0.0231475830078125,
-0.01690673828125,
0.015777587890625,
-0.0022735595703125,
0.007747650146484375,
0.04827880859375,
0.0280303955078125,
0.0283203125,
-0.036773681640625,
0.0284881591796875,
-0.01861572265625,
-0.027008056640625,
-0.01727294921875,
-0.00341033935546875,
-0.0113677978515625,
-0.044342041015625,
0.02435302734375,
-0.018646240234375,
0.000118255615234375,
0.0281829833984375,
-0.006427764892578125,
0.0208740234375,
-0.0006818771362304688,
-0.005558013916015625,
0.0035915374755859375,
-0.0080108642578125,
0.0194549560546875,
-0.0019702911376953125,
-0.0242156982421875,
0.006763458251953125,
-0.0085906982421875,
-0.01477813720703125,
0.0210723876953125,
-0.009429931640625,
0.0009169578552246094,
-0.017059326171875,
-0.015716552734375,
0.004924774169921875,
-0.01296234130859375,
0.04437255859375,
-0.052398681640625,
-0.005809783935546875,
-0.0196533203125,
0.0106658935546875,
-0.007076263427734375,
-0.03057861328125,
-0.034759521484375,
0.037078857421875,
-0.0299224853515625,
0.006137847900390625,
-0.005725860595703125,
-0.004520416259765625,
0.0290374755859375,
0.004703521728515625,
0.00778961181640625,
0.0548095703125,
0.01788330078125,
-0.01666259765625,
0.00843048095703125,
-0.01233673095703125,
-0.03656005859375,
-0.08795166015625,
0.0204010009765625,
-0.09375,
-0.013641357421875,
-0.04254150390625,
0.0195465087890625,
0.020782470703125,
-0.05517578125,
-0.1097412109375,
0.051300048828125,
-0.037200927734375,
-0.041473388671875,
-0.044036865234375,
0.040191650390625,
0.021148681640625,
-0.028564453125,
-0.02459716796875,
0.0203094482421875,
-0.0245361328125,
-0.003238677978515625,
0.0239105224609375,
0.06256103515625,
-0.01453399658203125,
0.0283966064453125,
0.03717041015625,
0.06048583984375,
0.053985595703125,
0.01021575927734375,
0.01110076904296875,
-0.0076446533203125,
0.01837158203125,
0.040863037109375,
-0.018280029296875,
-0.0019245147705078125,
0.004184722900390625,
-0.021331787109375,
-0.043182373046875,
-0.059661865234375,
-0.00647735595703125,
-0.038330078125,
0.042236328125,
0.059173583984375,
0.006381988525390625,
-0.028076171875,
0.01313018798828125,
0.0135040283203125,
0.0034389495849609375,
-0.02264404296875,
-0.01287078857421875,
-0.0163726806640625,
-0.006153106689453125,
-0.0220794677734375,
0.00695037841796875,
-0.02886962890625,
-0.005733489990234375,
-0.021881103515625,
-0.017303466796875,
-0.0015363693237304688,
-0.00791168212890625,
-0.01690673828125,
0.004482269287109375,
0.09796142578125,
-0.04864501953125,
0.0258026123046875,
0.019805908203125,
0.00716400146484375,
0.08697509765625,
0.03167724609375,
-0.029754638671875,
0.0214691162109375,
-0.004161834716796875,
0.00839996337890625,
-0.002948760986328125,
0.0094451904296875,
-0.005466461181640625,
0.006439208984375,
0.002010345458984375,
0.038299560546875,
-0.000919342041015625,
0.043670654296875,
-0.006710052490234375,
0.04949951171875,
0.0120391845703125,
0.042083740234375,
-0.00832366943359375,
-0.017730712890625,
-0.0308074951171875,
0.020294189453125,
-0.059478759765625,
0.0029582977294921875,
-0.007724761962890625,
-0.04058837890625,
0.0211181640625,
0.0005102157592773438,
0.0179443359375,
-0.015625,
0.004070281982421875,
0.004451751708984375,
-0.0221099853515625,
0.0048065185546875
]
|
ee340572bd8eac0242524449589366ad1f19dbb0 | Wordpress Stackexchange
Q: Cron firing my function everytime wp-admin is visited This is a MU-plugin I'm developing, and I want it to run hourly. Unfortunately, it's running every time I visit any site's wp-admin page. I've used the Debug Bar plugin with the Cron plugin, and it consistently says that the next event is in the past. Any ideas?
add_action('admin_menu', 'dhg_cron_menu');
function dhg_cron_menu()
{
add_options_page('NEW WPMS Stats', 'NEW WPMS Stats', 'manage-options', 'dhg-cron', 'dhg_cron_settings');
}
function dhg_cron_settings()
{
if(!wp_next_scheduled('dhg_cron_hook'))
{
wp_schedule_event(time(), 'hourly', 'dhg_cron_hook');
}
}
add_action('dhg_cron_hook', 'dhg_cron_get_stats');
function dhg_cron_get_stats()
{
// this is a custom function I use to log to a file for testing...
log_wpms_stats("testing!");
}
A: An idea I came up with was using the new WP Heartbeat API as opposed to using cron. Have your plugin fire off a call to your logging system every hour.
Pippin's tutorial contains the majority of the code you'll need to get started.
| Q: Cron firing my function everytime wp-admin is visited This is a MU-plugin I'm developing, and I want it to run hourly. Unfortunately, it's running every time I visit any site's wp-admin page. I've used the Debug Bar plugin with the Cron plugin, and it consistently says that the next event is in the past. Any ideas?
add_action('admin_menu', 'dhg_cron_menu');
function dhg_cron_menu()
{
add_options_page('NEW WPMS Stats', 'NEW WPMS Stats', 'manage-options', 'dhg-cron', 'dhg_cron_settings');
}
function dhg_cron_settings()
{
if(!wp_next_scheduled('dhg_cron_hook'))
{
wp_schedule_event(time(), 'hourly', 'dhg_cron_hook');
}
}
add_action('dhg_cron_hook', 'dhg_cron_get_stats');
function dhg_cron_get_stats()
{
// this is a custom function I use to log to a file for testing...
log_wpms_stats("testing!");
}
A: An idea I came up with was using the new WP Heartbeat API as opposed to using cron. Have your plugin fire off a call to your logging system every hour.
Pippin's tutorial contains the majority of the code you'll need to get started.
| wordpress | {
"language": "en",
"length": 149,
"provenance": "stackexchange_00019.jsonl.gz:439005",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/121605"
} | [
0.030181884765625,
0.005401611328125,
-0.022308349609375,
-0.0255584716796875,
0.0167694091796875,
-0.0300445556640625,
-0.01045989990234375,
-0.03643798828125,
-0.01354217529296875,
0.0308685302734375,
-0.034210205078125,
0.051849365234375,
0.0061798095703125,
0.005016326904296875,
0.00919342041015625,
-0.02227783203125,
0.04022216796875,
-0.005290985107421875,
0.0276641845703125,
-0.001537322998046875,
0.010498046875,
0.04052734375,
-0.006717681884765625,
0.081298828125,
0.03369140625,
-0.0153350830078125,
-0.0002493858337402344,
-0.00299835205078125,
0.025726318359375,
0.00688934326171875,
0.024169921875,
-0.0350341796875,
0.0064544677734375,
0.03125,
-0.02227783203125,
0.0310821533203125,
0.0168914794921875,
0.0033893585205078125,
0.01259613037109375,
0.0362548828125,
0.0233001708984375,
-0.01416015625,
0.016448974609375,
0.01349639892578125,
-0.004024505615234375,
-0.04510498046875,
0.031585693359375,
-0.047149658203125,
0.0009984970092773438,
0.0177001953125,
0.01238250732421875,
-0.038421630859375,
0.0177154541015625,
0.046661376953125,
-0.01611328125,
-0.036102294921875,
-0.05255126953125,
0.03759765625,
0.029937744140625,
-0.031341552734375,
-0.0188140869140625,
-0.01506805419921875,
0.0278167724609375,
0.019378662109375,
0.01934814453125,
-0.00687408447265625,
-0.017242431640625,
0.007503509521484375,
-0.05126953125,
0.0277252197265625,
0.0487060546875,
-0.046356201171875,
0.0003368854522705078,
0.0313720703125,
-0.044189453125,
-0.080810546875,
0.0443115234375,
-0.0400390625,
0.01099395751953125,
0.01319122314453125,
0.0299224853515625,
-0.006305694580078125,
0.01000213623046875,
0.026702880859375,
-0.01200103759765625,
0.02752685546875,
0.0007925033569335938,
-0.021453857421875,
-0.041107177734375,
-0.024169921875,
-0.0210418701171875,
0.075439453125,
-0.050323486328125,
-0.044586181640625,
-0.031890869140625,
-0.023895263671875,
0.01416778564453125,
0.034454345703125,
-0.0269927978515625,
-0.0299530029296875,
-0.0206146240234375,
0.0126495361328125,
-0.09197998046875,
0.008056640625,
-0.0094757080078125,
0.0809326171875,
0.01280975341796875,
-0.01534271240234375,
0.006732940673828125,
-0.0010309219360351562,
0.01503753662109375,
-0.0101318359375,
0.051116943359375,
-0.0234832763671875,
0.032745361328125,
-0.0270843505859375,
-0.01172637939453125,
0.053985595703125,
0.0148162841796875,
-0.043548583984375,
0.0091705322265625,
0.01198577880859375,
-0.0012655258178710938,
-0.034698486328125,
-0.00032830238342285156,
-0.02294921875,
-0.0269317626953125,
-0.006988525390625,
-0.0159149169921875,
0.0269622802734375,
-0.00439453125,
0.0013866424560546875,
-0.0303955078125,
0.00753021240234375,
-0.0250244140625,
-0.00763702392578125,
0.0251007080078125,
-0.05419921875,
0.0054931640625,
-0.002971649169921875,
0.017669677734375,
-0.0166168212890625,
-0.0156707763671875,
-0.0014848709106445312,
0.0171356201171875,
0.01195526123046875,
0.006313323974609375,
0.00820159912109375,
0.0210723876953125,
0.0180206298828125,
-0.047607421875,
0.007221221923828125,
0.006069183349609375,
0.0106048583984375,
0.019805908203125,
0.0013971328735351562,
0.0109100341796875,
-0.005157470703125,
0.0016717910766601562,
0.002231597900390625,
-0.0277099609375,
-0.0101165771484375,
-0.0135955810546875,
-0.0458984375,
-0.0584716796875,
0.01531219482421875,
-0.0094451904296875,
-0.0016393661499023438,
0.034637451171875,
0.007755279541015625,
0.038055419921875,
-0.0179290771484375,
0.06671142578125,
0.0133056640625,
0.0011224746704101562,
0.0137176513671875,
-0.006183624267578125,
0.02001953125,
0.042816162109375,
-0.0178070068359375,
-0.0413818359375,
-0.03253173828125,
0.0743408203125,
-0.0335693359375,
-0.039031982421875,
-0.0045166015625,
0.027496337890625,
0.050384521484375,
0.02313232421875,
0.0232086181640625,
0.0164337158203125,
-0.0260772705078125,
-0.0165252685546875,
0.0263671875,
0.009979248046875,
-0.017669677734375,
-0.06451416015625,
-0.017791748046875,
-0.02593994140625,
-0.01263427734375,
-0.0117950439453125,
0.047515869140625,
-0.0303802490234375,
0.0194244384765625,
-0.11065673828125,
0.042083740234375,
-0.042083740234375,
0.053070068359375,
0.03192138671875,
0.004703521728515625,
-0.0036525726318359375,
0.00969696044921875,
0.0210113525390625,
-0.09539794921875,
-0.063232421875,
0.0233001708984375,
-0.0213470458984375,
0.035858154296875,
-0.00848388671875,
0.04266357421875,
-0.0211181640625,
-0.03546142578125,
-0.023193359375,
-0.0244903564453125,
-0.00841522216796875,
-0.0166015625,
-0.0257110595703125,
-0.01611328125,
-0.0242919921875,
-0.0070953369140625,
0.0022563934326171875,
0.060638427734375,
0.01349639892578125,
0.04400634765625,
-0.0113983154296875,
-0.00839996337890625,
0.0055694580078125,
-0.03564453125,
0.01629638671875,
0.03765869140625,
0.036041259765625,
0.04498291015625,
0.017181396484375,
0.043060302734375,
0.01061248779296875,
-0.06915283203125,
0.021087646484375,
0.0012054443359375,
-0.04864501953125,
0.0042572021484375,
-0.00881195068359375,
0.0027713775634765625,
0.01910400390625,
-0.056793212890625,
-0.05517578125,
0.058502197265625,
0.015869140625,
-0.00458526611328125,
-0.0181427001953125,
0.037322998046875,
0.0061187744140625,
0.032745361328125,
-0.019500732421875,
0.0163726806640625,
-0.0196380615234375,
-0.00872802734375,
-0.008026123046875,
-0.0077362060546875,
-0.015106201171875,
-0.0164031982421875,
0.042205810546875,
0.00543975830078125,
-0.0049896240234375,
0.024200439453125,
0.038543701171875,
-0.042449951171875,
-0.043609619140625,
0.0043792724609375,
0.0167388916015625,
-0.005268096923828125,
-0.000640869140625,
0.04119873046875,
-0.04534912109375,
-0.02166748046875,
-0.0304107666015625,
-0.031524658203125,
-0.0233154296875,
0.0007123947143554688,
0.0019550323486328125,
-0.006069183349609375,
0.0237274169921875,
0.00855255126953125,
-0.040924072265625,
0.045806884765625,
-0.0044708251953125,
-0.034759521484375,
-0.020172119140625,
-0.035064697265625,
0.032012939453125,
-0.03955078125,
0.047119140625,
0.0765380859375,
0.0003829002380371094,
0.0004978179931640625,
-0.004032135009765625,
-0.04583740234375,
-0.0328369140625,
0.025146484375,
-0.01221466064453125,
0.0046539306640625,
-0.0909423828125,
0.048736572265625,
0.0223541259765625,
0.0631103515625,
0.0024509429931640625,
-0.04168701171875,
0.0009984970092773438,
0.0289459228515625,
-0.07720947265625,
-0.1019287109375,
-0.056793212890625,
-0.0677490234375,
-0.0012912750244140625,
-0.0261077880859375,
-0.01114654541015625,
0.0205230712890625,
-0.0298919677734375,
0.0187835693359375,
-0.047515869140625,
0.006298065185546875,
-0.0091400146484375,
-0.0460205078125,
-0.0341796875,
0.0157470703125,
-0.00829315185546875,
0.0270233154296875,
0.0028553009033203125,
0.0836181640625,
-0.002902984619140625,
-0.08306884765625,
-0.0188751220703125,
0.0104217529296875,
-0.0268707275390625,
0.029998779296875,
0.0012559890747070312,
-0.0220489501953125,
0.01531219482421875,
-0.001861572265625,
-0.0012140274047851562,
0.027557373046875,
-0.0159912109375,
-0.0017185211181640625,
-0.01763916015625,
-0.017242431640625,
0.019622802734375,
0.004520416259765625,
0.0036106109619140625,
0.007205963134765625,
0.03607177734375,
-0.02880859375,
0.027374267578125,
0.00787353515625,
0.002941131591796875,
0.0006160736083984375,
-0.0157012939453125,
-0.0184478759765625,
0.01219940185546875,
-0.0023670196533203125,
0.00713348388671875,
0.032470703125,
0.028656005859375,
0.0160675048828125,
-0.0187835693359375,
-0.0217132568359375,
-0.038238525390625,
-0.0335693359375,
-0.00576019287109375,
-0.03265380859375,
0.015625,
-0.0158843994140625,
-0.01227569580078125,
-0.032073974609375,
0.0161590576171875,
-0.07147216796875,
0.03424072265625,
0.037200927734375,
0.027496337890625,
0.0259552001953125,
0.0041961669921875,
-0.029693603515625,
-0.019622802734375,
0.04217529296875,
-0.00806427001953125,
-0.019622802734375,
0.0026531219482421875,
0.0075836181640625,
-0.048919677734375,
-0.018218994140625,
-0.04547119140625,
0.00458526611328125,
-0.0574951171875,
0.0209808349609375,
0.0055389404296875,
-0.0212554931640625,
-0.03143310546875,
0.0277099609375,
-0.05963134765625,
-0.032745361328125,
0.00978851318359375,
-0.0090484619140625,
0.0159759521484375,
0.00324249267578125,
0.016082763671875,
-0.006771087646484375,
0.0148773193359375,
-0.039642333984375,
-0.0823974609375,
-0.01265716552734375,
-0.0362548828125,
0.07977294921875,
0.04425048828125,
-0.061859130859375,
-0.01256561279296875,
0.039398193359375,
0.0247344970703125,
0.032440185546875,
0.0229949951171875,
-0.028778076171875,
0.01068878173828125,
0.0287017822265625,
0.032379150390625,
-0.007419586181640625,
-0.01541900634765625,
-0.039398193359375,
-0.0254058837890625,
0.0190277099609375,
-0.03216552734375,
-0.0091552734375,
-0.040374755859375,
-0.008209228515625,
-0.042236328125,
-0.02667236328125,
-0.002655029296875,
0.0009660720825195312,
-0.00536346435546875,
0.004547119140625,
-0.034820556640625,
-0.01213836669921875,
0.0117034912109375,
-0.0255584716796875,
-0.01041412353515625,
0.002197265625,
0.06439208984375,
0.0257415771484375,
0.00032591819763183594,
0.01708984375,
0.00971221923828125,
0.029876708984375,
-0.03936767578125,
0.032989501953125,
-0.0118408203125,
-0.0211181640625,
0.0679931640625,
-0.017120361328125,
-0.006198883056640625,
-0.028778076171875,
0.061065673828125,
0.00569915771484375,
-0.0239105224609375,
0.0257110595703125,
-0.01511383056640625,
0.0011234283447265625,
0.0236053466796875,
0.006557464599609375,
-0.041717529296875,
0.007190704345703125,
0.03253173828125,
-0.0187225341796875,
0.015167236328125,
-0.0299530029296875,
-0.001434326171875,
-0.00025653839111328125,
-0.01444244384765625,
0.0303955078125,
0.0400390625,
-0.016876220703125,
0.00937652587890625,
0.0249176025390625,
0.006580352783203125,
0.0149383544921875,
0.046966552734375,
0.0123291015625,
0.029205322265625,
0.057342529296875,
-0.0037937164306640625,
-0.06341552734375,
-0.006359100341796875,
0.048370361328125,
0.0181427001953125,
-0.037872314453125,
0.0213775634765625,
-0.00908660888671875,
-0.025054931640625,
-0.009735107421875,
-0.04644775390625,
0.040283203125,
0.04705810546875,
-0.0169525146484375,
-0.0030307769775390625,
-0.041290283203125,
0.01451873779296875,
-0.048492431640625,
-0.015625,
-0.0195465087890625,
-0.0068511962890625,
0.025421142578125,
0.0256195068359375,
-0.020843505859375,
0.031341552734375,
-0.0195770263671875,
0.08013916015625,
0.025054931640625,
0.0631103515625,
0.0179443359375,
-0.03753662109375,
-0.01447296142578125,
0.0250396728515625,
-0.05438232421875,
-0.0102386474609375,
0.002471923828125,
0.024810791015625,
0.03656005859375,
-0.0006704330444335938,
-0.0032444000244140625,
-0.0016946792602539062,
-0.03375244140625,
-0.0362548828125,
0.0033626556396484375,
-0.01081085205078125,
-0.03765869140625,
0.006519317626953125,
0.050201416015625,
0.02044677734375,
0.0167694091796875,
0.009033203125,
0.0215301513671875,
-0.0018320083618164062,
0.042388916015625,
-0.044647216796875,
0.04534912109375,
-0.04290771484375,
-0.032501220703125,
-0.054901123046875,
-0.0178985595703125,
0.015045166015625,
-0.05499267578125,
-0.0303192138671875,
-0.0006632804870605469,
-0.011932373046875,
0.031036376953125,
-0.03668212890625,
0.010223388671875,
-0.0086212158203125,
0.005645751953125,
-0.0389404296875,
0.0023822784423828125,
0.0723876953125,
0.0400390625,
-0.0673828125,
-0.0049896240234375,
-0.024566650390625,
-0.00803375244140625,
-0.026336669921875,
-0.00811767578125,
-0.054290771484375,
-0.00742340087890625,
0.0004222393035888672,
0.015716552734375,
-0.02691650390625,
-0.0364990234375,
-0.00933074951171875,
0.005126953125,
0.0194854736328125,
0.012298583984375,
-0.017547607421875,
0.0733642578125,
-0.017242431640625,
0.039093017578125,
-0.00455474853515625,
0.025421142578125,
-0.024505615234375,
0.004974365234375,
0.016021728515625,
0.0513916015625,
-0.0059814453125,
-0.053802490234375,
0.035003662109375,
-0.065185546875,
0.037200927734375,
-0.01554107666015625,
0.01214599609375,
-0.0203094482421875,
-0.00623321533203125,
-0.02288818359375,
0.0482177734375,
-0.021331787109375,
-0.004913330078125,
0.007305145263671875,
-0.019744873046875,
-0.00560760498046875,
0.01047515869140625,
0.01226043701171875,
-0.0019512176513671875,
-0.0013875961303710938,
-0.0033435821533203125,
-0.01363372802734375,
-0.041900634765625,
0.07861328125,
0.08160400390625,
0.003753662109375,
0.037078857421875,
0.0235748291015625,
0.0005664825439453125,
-0.01068115234375,
0.0175933837890625,
0.0450439453125,
-0.00043463706970214844,
0.050811767578125,
-0.0228271484375,
-0.016937255859375,
0.0071258544921875,
-0.041015625,
-0.004241943359375,
0.0232391357421875,
0.020660400390625,
-0.063720703125,
0.01352691650390625,
0.0012655258178710938,
0.025054931640625,
0.0275115966796875,
-0.0238494873046875,
-0.0164337158203125,
-0.08111572265625,
0.0703125,
0.0078277587890625,
-0.00389862060546875,
0.00928497314453125,
-0.0178375244140625,
-0.006439208984375,
-0.005298614501953125,
0.00914764404296875,
0.01427459716796875,
-0.0184173583984375,
0.00690460205078125,
0.0142822265625,
0.03680419921875,
-0.050201416015625,
0.0240936279296875,
0.007373809814453125,
-0.000049233436584472656,
-0.0301513671875,
0.0543212890625,
0.015533447265625,
0.03167724609375,
0.002689361572265625,
0.005764007568359375,
0.031524658203125,
0.0238494873046875,
0.01064300537109375,
-0.029022216796875,
0.004016876220703125,
0.018798828125,
-0.058135986328125,
-0.020782470703125,
0.038970947265625,
0.054534912109375,
-0.06951904296875,
0.03802490234375,
-0.036346435546875,
-0.0227813720703125,
-0.0106048583984375,
-0.0430908203125,
0.059967041015625,
-0.021484375,
-0.0149078369140625,
-0.004085540771484375,
-0.00542449951171875,
0.03240966796875,
0.003810882568359375,
0.053131103515625,
-0.05157470703125,
-0.034515380859375,
0.00945281982421875,
-0.045745849609375,
-0.04669189453125,
-0.01258087158203125,
0.0021076202392578125,
0.0941162109375,
0.01377105712890625,
-0.0673828125,
0.0097198486328125,
0.05023193359375,
-0.0257568359375,
0.050567626953125,
-0.0238494873046875,
0.033172607421875,
-0.0135345458984375,
0.020965576171875,
-0.0234375,
-0.004085540771484375,
-0.01442718505859375,
0.0258026123046875,
0.02471923828125,
0.0030918121337890625,
0.014190673828125,
0.00783538818359375,
0.035552978515625,
-0.030487060546875,
-0.041839599609375,
0.03662109375,
-0.0013151168823242188,
0.02520751953125,
0.062744140625,
-0.047119140625,
0.033935546875,
-0.01263427734375,
0.005657196044921875,
0.0114593505859375,
0.005401611328125,
0.004268646240234375,
0.006633758544921875,
-0.0146484375,
0.0093994140625,
-0.0035152435302734375,
-0.0258026123046875,
0.028289794921875,
-0.01010894775390625,
0.06036376953125,
0.041229248046875,
0.0225067138671875,
-0.00531005859375,
-0.03057861328125,
0.04437255859375,
-0.00272369384765625,
-0.03057861328125,
-0.006313323974609375,
0.0105438232421875,
0.004878997802734375,
-0.0706787109375,
-0.057708740234375,
0.003421783447265625,
-0.0177001953125,
-0.0091705322265625,
0.00044226646423339844,
0.0159149169921875,
-0.0166168212890625,
0.0283050537109375,
0.040283203125,
0.003490447998046875,
-0.0191497802734375,
-0.05645751953125,
-0.004547119140625,
-0.0038089752197265625,
0.02099609375,
0.0139312744140625,
0.022003173828125,
-0.0018253326416015625,
0.0157012939453125,
0.055511474609375,
-0.009490966796875,
-0.0185546875,
-0.01995849609375,
0.02294921875,
0.05023193359375,
0.0145111083984375,
0.01328277587890625,
-0.00012946128845214844,
0.030364990234375,
0.00525665283203125,
0.0196380615234375,
-0.0233154296875,
0.032379150390625,
-0.034881591796875,
0.01015472412109375,
0.017333984375,
0.023468017578125,
0.004547119140625,
-0.0226898193359375,
-0.0169830322265625,
-0.036865234375,
0.00513458251953125,
0.01727294921875,
0.007678985595703125,
0.0229339599609375,
0.041046142578125,
0.015228271484375,
-0.003253936767578125,
-0.00312042236328125,
0.038299560546875,
-0.0170745849609375,
-0.049163818359375,
0.0016078948974609375,
-0.019195556640625,
0.0102386474609375,
-0.0005884170532226562,
0.0155029296875,
0.06866455078125,
-0.040313720703125,
-0.004779815673828125,
0.00788116455078125,
-0.0065460205078125,
-0.023406982421875,
0.0305633544921875,
0.01439666748046875,
0.04156494140625,
0.0113067626953125,
-0.04217529296875,
0.0017328262329101562,
-0.0182952880859375,
-0.0296173095703125,
0.0100250244140625,
0.021942138671875,
-0.02813720703125,
0.051971435546875,
0.0151824951171875,
0.03070068359375,
0.021240234375,
-0.037384033203125,
-0.0157470703125,
-0.054901123046875,
0.034820556640625,
-0.0184478759765625,
-0.032806396484375,
-0.0300445556640625,
-0.01303863525390625,
0.05621337890625,
-0.00489044189453125,
0.06097412109375,
-0.024688720703125,
0.01142120361328125,
0.03668212890625,
-0.01259613037109375,
0.046661376953125,
0.0306854248046875,
0.0092010498046875,
0.0217437744140625,
0.01375579833984375,
-0.0280609130859375,
-0.07080078125,
0.0236968994140625,
0.00998687744140625,
-0.0020618438720703125,
-0.00836181640625,
0.0157928466796875,
0.0183868408203125,
0.02703857421875,
0.0115509033203125,
-0.027557373046875,
-0.00571441650390625,
-0.0214385986328125,
-0.0192718505859375,
0.0238037109375,
-0.0159149169921875,
-0.0166473388671875,
0.04180908203125,
-0.01453399658203125,
0.016204833984375,
0.00373077392578125,
-0.01507568359375,
-0.013214111328125,
0.0235137939453125,
-0.03179931640625,
0.0066375732421875,
-0.00492095947265625,
-0.02093505859375,
0.00690460205078125,
0.008209228515625,
0.03778076171875,
-0.021575927734375,
0.0023784637451171875,
-0.0218353271484375,
0.01922607421875,
0.0106048583984375,
-0.0223236083984375,
0.009490966796875,
0.01202392578125,
-0.00952911376953125,
-0.0015001296997070312,
-0.0755615234375,
-0.030487060546875,
-0.066650390625,
-0.01428985595703125,
0.022186279296875,
-0.0362548828125,
-0.049346923828125,
-0.0360107421875,
0.00691986083984375,
0.044891357421875,
-0.01444244384765625,
-0.0299530029296875,
0.0082855224609375,
-0.035400390625,
0.060760498046875,
-0.00904083251953125,
-0.00875091552734375,
-0.0057830810546875,
0.0188140869140625,
-0.0194244384765625,
-0.038055419921875,
-0.047149658203125,
0.0206756591796875,
-0.043365478515625,
-0.03363037109375,
0.000118255615234375,
0.006069183349609375,
-0.031494140625,
-0.06658935546875,
-0.044525146484375,
-0.007244110107421875,
-0.0101165771484375,
-0.0117034912109375,
0.0010395050048828125,
0.017486572265625,
-0.0303192138671875,
-0.005199432373046875,
0.0211639404296875,
-0.0071868896484375,
-0.031982421875,
-0.0328369140625,
-0.0034503936767578125,
-0.005901336669921875,
-0.04315185546875,
-0.059295654296875,
0.06317138671875,
-0.01378631591796875,
-0.01290130615234375,
-0.10003662109375,
0.0379638671875,
0.005107879638671875,
-0.02178955078125,
-0.04339599609375,
-0.002613067626953125,
-0.028076171875,
0.0280914306640625,
0.033233642578125,
-0.05511474609375,
0.049560546875,
0.036773681640625,
-0.02056884765625,
0.053375244140625,
0.049468994140625,
-0.020599365234375,
-0.01763916015625,
0.0149383544921875,
0.0112762451171875,
0.0135650634765625,
-0.005107879638671875,
-0.006290435791015625,
0.00019347667694091797,
-0.01224517822265625,
-0.035430908203125,
0.00261688232421875,
-0.037384033203125,
0.01360321044921875,
0.134033203125,
0.07098388671875,
0.04443359375,
-0.063232421875,
-0.050689697265625,
-0.057525634765625,
0.0099945068359375,
-0.048126220703125,
0.0030422210693359375,
-0.068115234375,
0.00771331787109375,
-0.01522064208984375,
-0.0123138427734375,
0.0186767578125,
0.0106201171875,
0.0046234130859375,
-0.01514434814453125,
0.02044677734375,
-0.04327392578125,
0.0235595703125,
-0.0413818359375,
0.0555419921875,
-0.037017822265625,
0.0212249755859375,
0.01117706298828125,
0.019866943359375,
0.038787841796875,
0.058807373046875,
0.01458740234375,
0.050689697265625,
-0.0435791015625,
-0.02001953125,
0.0183868408203125,
0.00926971435546875,
-0.01535797119140625,
-0.0210113525390625,
0.01410675048828125,
-0.0026187896728515625,
-0.014892578125,
0.018218994140625,
0.0229949951171875,
-0.04034423828125,
-0.0183563232421875,
-0.0297393798828125,
0.01506805419921875,
-0.0158843994140625,
-0.00970458984375,
0.0362548828125,
-0.016876220703125,
-0.025482177734375,
-0.002323150634765625,
-0.041229248046875,
0.012237548828125,
-0.0141754150390625,
0.00016570091247558594,
-0.0304107666015625,
0.0189361572265625,
-0.021209716796875,
-0.039093017578125,
0.0233612060546875
]
|
336d319d2801d144082433786840546af09dfdf3 | Wordpress Stackexchange
Q: Hide View and preview from custom post types Is it possible to hide the ability to view or preview custom post types? I as, for custom post types like carousels and other forms that render in a particular way where viewing or previewing them out side their intended rendering purpose would not make any sense.
A: You need to set argument public to false at register_post_type() function.
Whether a post type is intended to be used publicly either via the
admin interface or by front-end users. Default: false
*
*'false' - Post type is not intended to be used publicly and should generally be unavailable in wp-admin and on the front end unless
explicitly planned for elsewhere.
*'true' - Post type is intended for public use. This includes on the front end and in wp-admin.
| Q: Hide View and preview from custom post types Is it possible to hide the ability to view or preview custom post types? I as, for custom post types like carousels and other forms that render in a particular way where viewing or previewing them out side their intended rendering purpose would not make any sense.
A: You need to set argument public to false at register_post_type() function.
Whether a post type is intended to be used publicly either via the
admin interface or by front-end users. Default: false
*
*'false' - Post type is not intended to be used publicly and should generally be unavailable in wp-admin and on the front end unless
explicitly planned for elsewhere.
*'true' - Post type is intended for public use. This includes on the front end and in wp-admin.
A: I did this by removing the post_row_action.
So, setup a function using that filter:
add_filter( 'post_row_actions', 'remove_view_link_cpt' );
function remove_view_link_cpt( $action ) {
unset ($action['view']);
return $action;
}
You will want to add a check to ensure you are on your CPT page when applying this code... otherwise it will remove the 'view' button from all post types. You didn't mention this in your question.. so I can't make my answer more specific.
A: If you are not going to view the posts on front-end set publicly_queryable to false
This will make the post updates without any view post link or preview changes button
http://codex.wordpress.org/Function_Reference/register_post_type
| wordpress | {
"language": "en",
"length": 242,
"provenance": "stackexchange_00019.jsonl.gz:439017",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/121640"
} | [
0.061614990234375,
-0.0078277587890625,
0.03485107421875,
-0.028350830078125,
-0.00921630859375,
-0.01904296875,
0.036834716796875,
-0.0294189453125,
-0.01253509521484375,
-0.013214111328125,
-0.0450439453125,
-0.037872314453125,
-0.044219970703125,
-0.0345458984375,
0.002170562744140625,
-0.0799560546875,
0.038360595703125,
0.0229034423828125,
0.0751953125,
-0.00707244873046875,
0.027099609375,
0.00585174560546875,
0.051055908203125,
0.031036376953125,
0.0293426513671875,
-0.0215301513671875,
0.04168701171875,
-0.02874755859375,
0.0165863037109375,
-0.00836181640625,
0.0294647216796875,
-0.0252532958984375,
0.00502777099609375,
0.035736083984375,
-0.01397705078125,
0.021026611328125,
-0.01267242431640625,
0.0300445556640625,
0.042388916015625,
-0.003665924072265625,
-0.0028400421142578125,
0.01206207275390625,
-0.033538818359375,
-0.0264892578125,
-0.06610107421875,
0.0158538818359375,
-0.0596923828125,
-0.0021820068359375,
0.01306915283203125,
-0.00003886222839355469,
0.0152587890625,
-0.01549530029296875,
0.028167724609375,
-0.004993438720703125,
-0.0248260498046875,
-0.02508544921875,
-0.00795745849609375,
0.01021575927734375,
0.04669189453125,
0.01397705078125,
-0.0264892578125,
-0.00861358642578125,
-0.00649261474609375,
-0.051666259765625,
-0.0018405914306640625,
-0.005046844482421875,
-0.0026531219482421875,
0.019561767578125,
-0.02777099609375,
0.0035552978515625,
0.04632568359375,
-0.028167724609375,
0.048004150390625,
-0.05743408203125,
-0.01245880126953125,
0.007480621337890625,
0.004673004150390625,
-0.0036525726318359375,
0.017242431640625,
-0.032806396484375,
-0.013336181640625,
-0.0216827392578125,
-0.06378173828125,
-0.01357269287109375,
0.0158538818359375,
0.0311737060546875,
-0.0231475830078125,
-0.012847900390625,
0.032012939453125,
-0.0188751220703125,
0.01409912109375,
0.013519287109375,
-0.002880096435546875,
0.043426513671875,
-0.0123138427734375,
-0.0283355712890625,
0.033782958984375,
0.0107269287109375,
0.007904052734375,
-0.0107574462890625,
0.02374267578125,
-0.04278564453125,
0.0204315185546875,
-0.005771636962890625,
0.01800537109375,
0.03509521484375,
-0.00787353515625,
0.0195770263671875,
0.052764892578125,
0.0146636962890625,
0.0281982421875,
0.02532958984375,
-0.01143646240234375,
-0.007297515869140625,
-0.0211181640625,
0.005062103271484375,
-0.041595458984375,
0.0268402099609375,
-0.017791748046875,
0.046875,
0.019195556640625,
0.03424072265625,
0.024993896484375,
-0.01214599609375,
0.0183563232421875,
0.027801513671875,
-0.0228729248046875,
-0.0438232421875,
0.02703857421875,
0.055908203125,
-0.04937744140625,
-0.022064208984375,
0.04925537109375,
0.0160369873046875,
0.028411865234375,
-0.034942626953125,
-0.01271820068359375,
-0.00923919677734375,
-0.028961181640625,
0.014739990234375,
-0.00882720947265625,
-0.024200439453125,
0.00949859619140625,
-0.027618408203125,
-0.01465606689453125,
0.03814697265625,
-0.000007987022399902344,
-0.005550384521484375,
-0.00634002685546875,
-0.023529052734375,
-0.046112060546875,
-0.054107666015625,
0.002941131591796875,
0.044708251953125,
0.01534271240234375,
0.0099334716796875,
0.0650634765625,
-0.010284423828125,
-0.033050537109375,
-0.02935791015625,
0.0180511474609375,
0.0027294158935546875,
-0.005336761474609375,
-0.0029277801513671875,
-0.031402587890625,
0.01470947265625,
-0.036102294921875,
-0.00038933753967285156,
0.02984619140625,
0.0221099853515625,
0.02618408203125,
-0.056304931640625,
-0.010009765625,
0.0032138824462890625,
-0.0258026123046875,
0.018463134765625,
0.01496124267578125,
0.001964569091796875,
0.0012788772583007812,
0.036773681640625,
-0.0020751953125,
-0.0195465087890625,
0.03533935546875,
-0.017913818359375,
-0.061767578125,
0.041046142578125,
0.01322174072265625,
0.0255889892578125,
0.0091705322265625,
-0.005344390869140625,
0.054412841796875,
0.048309326171875,
-0.01532745361328125,
-0.017913818359375,
0.0166473388671875,
0.003597259521484375,
-0.0225372314453125,
-0.00968170166015625,
-0.00315093994140625,
0.001987457275390625,
-0.02630615234375,
-0.0017404556274414062,
-0.002567291259765625,
-0.01430511474609375,
-0.052001953125,
-0.0041046142578125,
-0.01465606689453125,
0.0516357421875,
-0.038818359375,
0.037689208984375,
0.0474853515625,
0.0211639404296875,
-0.068603515625,
0.045257568359375,
0.00995635986328125,
-0.006488800048828125,
-0.0154571533203125,
0.0572509765625,
-0.01934814453125,
0.0264129638671875,
-0.0114288330078125,
-0.058563232421875,
-0.006160736083984375,
0.0164031982421875,
0.0291900634765625,
0.0236968994140625,
-0.010223388671875,
0.00836944580078125,
0.063720703125,
0.0250701904296875,
0.006664276123046875,
-0.0145721435546875,
-0.00981903076171875,
-0.02398681640625,
-0.0208282470703125,
-0.01462554931640625,
0.0039520263671875,
-0.103515625,
0.0265350341796875,
0.072021484375,
0.011016845703125,
0.0173187255859375,
-0.02593994140625,
0.037872314453125,
0.04913330078125,
0.01050567626953125,
0.0181427001953125,
0.010528564453125,
0.004100799560546875,
-0.0190887451171875,
0.007305145263671875,
-0.011627197265625,
0.044464111328125,
0.0037784576416015625,
0.05584716796875,
0.0046539306640625,
0.0120086669921875,
0.01001739501953125,
0.0252685546875,
-0.029693603515625,
0.0136566162109375,
0.0120697021484375,
-0.027252197265625,
0.01088714599609375,
0.02777099609375,
-0.0155181884765625,
0.04656982421875,
0.0306854248046875,
-0.00809478759765625,
-0.024810791015625,
0.003997802734375,
0.0167694091796875,
0.0165557861328125,
0.01483154296875,
0.03729248046875,
0.007457733154296875,
-0.0258941650390625,
-0.0193634033203125,
0.0465087890625,
0.001102447509765625,
-0.020721435546875,
-0.0041656494140625,
-0.0662841796875,
-0.015167236328125,
0.01493072509765625,
-0.057525634765625,
-0.01214599609375,
-0.0010576248168945312,
-0.003475189208984375,
-0.0034046173095703125,
0.0048370361328125,
0.03240966796875,
-0.0201568603515625,
0.04058837890625,
0.005001068115234375,
-0.016448974609375,
-0.035308837890625,
-0.084716796875,
0.058074951171875,
-0.05047607421875,
0.055450439453125,
0.09320068359375,
0.0022106170654296875,
0.0222320556640625,
0.0205841064453125,
0.0306396484375,
0.0255279541015625,
0.0167694091796875,
-0.003284454345703125,
-0.022216796875,
-0.032958984375,
-0.0196990966796875,
0.01393890380859375,
0.00011706352233886719,
-0.0239715576171875,
-0.0192108154296875,
-0.004444122314453125,
0.0183868408203125,
0.0021076202392578125,
0.0391845703125,
-0.004810333251953125,
-0.045928955078125,
-0.0235137939453125,
-0.029571533203125,
-0.03021240234375,
0.00882720947265625,
-0.02215576171875,
0.006580352783203125,
-0.0026264190673828125,
-0.03173828125,
-0.043548583984375,
-0.050048828125,
-0.041656494140625,
-0.0130157470703125,
0.005214691162109375,
-0.008148193359375,
0.017059326171875,
0.07269287109375,
0.0302734375,
-0.0499267578125,
0.03753662109375,
0.00714874267578125,
-0.0307464599609375,
0.0394287109375,
0.01690673828125,
-0.01776123046875,
0.02337646484375,
0.023040771484375,
-0.0288848876953125,
0.006832122802734375,
0.0016031265258789062,
-0.052703857421875,
0.0030689239501953125,
-0.01806640625,
0.0204315185546875,
0.0372314453125,
-0.01052093505859375,
0.00847625732421875,
0.05078125,
-0.0347900390625,
-0.0297088623046875,
-0.009307861328125,
-0.041015625,
-0.036407470703125,
0.0175628662109375,
-0.013092041015625,
-0.04107666015625,
0.025970458984375,
0.029052734375,
0.041107177734375,
-0.0077667236328125,
-0.024017333984375,
0.03973388671875,
0.01412200927734375,
0.045166015625,
-0.0245361328125,
-0.004467010498046875,
-0.0311126708984375,
0.05059814453125,
0.0013151168823242188,
0.00594329833984375,
0.00040030479431152344,
0.01094818115234375,
-0.00836181640625,
-0.0732421875,
0.0364990234375,
-0.0537109375,
-0.0057220458984375,
-0.050872802734375,
-0.007663726806640625,
-0.0187835693359375,
0.086181640625,
-0.03204345703125,
0.021697998046875,
-0.006343841552734375,
-0.00803375244140625,
0.0004127025604248047,
-0.019073486328125,
-0.076171875,
0.001422882080078125,
-0.07861328125,
0.04754638671875,
0.0124664306640625,
-0.0234222412109375,
-0.0313720703125,
-0.045562744140625,
-0.062225341796875,
-0.043792724609375,
0.043212890625,
0.00971221923828125,
0.0198211669921875,
-0.004573822021484375,
0.047332763671875,
-0.042327880859375,
-0.0253448486328125,
0.00213623046875,
-0.0555419921875,
-0.00914764404296875,
0.0063934326171875,
0.0294952392578125,
-0.0288543701171875,
0.040496826171875,
-0.02935791015625,
0.01126861572265625,
0.047149658203125,
0.02178955078125,
0.0014410018920898438,
-0.033782958984375,
-0.0192413330078125,
-0.001903533935546875,
0.014739990234375,
-0.01409912109375,
-0.0018310546875,
-0.031707763671875,
-0.04254150390625,
-0.0202789306640625,
-0.025543212890625,
-0.012542724609375,
0.0145263671875,
-0.0264739990234375,
-0.016387939453125,
-0.0285797119140625,
-0.0556640625,
0.0013942718505859375,
-0.029052734375,
-0.018646240234375,
-0.041900634765625,
-0.043701171875,
0.021514892578125,
-0.016387939453125,
-0.01009368896484375,
0.01275634765625,
0.037506103515625,
0.0167083740234375,
-0.004871368408203125,
-0.0321044921875,
-0.00514984130859375,
0.036163330078125,
0.0178070068359375,
0.023834228515625,
0.007396697998046875,
-0.01348876953125,
0.032257080078125,
0.015655517578125,
-0.016357421875,
-0.0173797607421875,
0.06231689453125,
-0.0120849609375,
-0.02978515625,
0.0211029052734375,
-0.0550537109375,
0.035186767578125,
0.024871826171875,
0.0174713134765625,
-0.04925537109375,
0.0289764404296875,
0.0528564453125,
-0.0399169921875,
0.035064697265625,
-0.01340484619140625,
0.03302001953125,
-0.01226806640625,
0.052459716796875,
0.0212860107421875,
0.0187530517578125,
0.005855560302734375,
-0.02813720703125,
-0.020294189453125,
0.0003361701965332031,
0.0234375,
-0.0217132568359375,
-0.0078125,
-0.0084991455078125,
0.06494140625,
-0.0025177001953125,
0.022491455078125,
0.0087890625,
-0.054962158203125,
-0.042755126953125,
-0.08148193359375,
-0.0340576171875,
0.014739990234375,
0.040802001953125,
0.037872314453125,
0.004695892333984375,
0.034027099609375,
0.0210418701171875,
0.01885986328125,
-0.001293182373046875,
0.0182647705078125,
0.009307861328125,
-0.0255279541015625,
0.015167236328125,
0.004611968994140625,
-0.005947113037109375,
0.0236358642578125,
0.029266357421875,
-0.0035266876220703125,
0.01464080810546875,
-0.02130126953125,
0.05499267578125,
0.0650634765625,
-0.0161895751953125,
0.004787445068359375,
0.032501220703125,
0.0013179779052734375,
-0.0491943359375,
-0.005016326904296875,
-0.0091094970703125,
-0.028900146484375,
0.005725860595703125,
0.0025310516357421875,
0.017486572265625,
0.0322265625,
0.0198211669921875,
0.013916015625,
-0.0237884521484375,
0.02685546875,
-0.001392364501953125,
-0.043701171875,
-0.040740966796875,
0.0087890625,
0.045135498046875,
-0.0022373199462890625,
-0.0193023681640625,
-0.0135650634765625,
-0.017425537109375,
-0.007808685302734375,
-0.0101470947265625,
-0.0916748046875,
0.040985107421875,
0.06341552734375,
0.0011501312255859375,
-0.01336669921875,
0.0066375732421875,
-0.026580810546875,
-0.0024433135986328125,
-0.01800537109375,
-0.0064849853515625,
0.03533935546875,
-0.01611328125,
0.007350921630859375,
-0.019561767578125,
-0.01255035400390625,
0.006343841552734375,
0.016876220703125,
0.0595703125,
0.00225830078125,
-0.031951904296875,
0.005008697509765625,
-0.04302978515625,
-0.01291656494140625,
-0.055877685546875,
-0.056365966796875,
-0.0345458984375,
-0.000804901123046875,
0.024871826171875,
0.011810302734375,
-0.01526641845703125,
-0.068603515625,
-0.00359344482421875,
0.0235595703125,
0.053802490234375,
0.024871826171875,
-0.0088043212890625,
0.07135009765625,
-0.01120758056640625,
0.07208251953125,
0.0017652511596679688,
-0.0032596588134765625,
-0.055999755859375,
-0.00649261474609375,
0.0079803466796875,
-0.0183258056640625,
-0.01056671142578125,
-0.0005445480346679688,
-0.0196380615234375,
-0.01027679443359375,
0.0184173583984375,
-0.006374359130859375,
0.0182647705078125,
-0.0215301513671875,
-0.01235198974609375,
-0.0362548828125,
0.04400634765625,
-0.050689697265625,
0.01050567626953125,
-0.0277252197265625,
0.0239410400390625,
0.0194854736328125,
0.0236053466796875,
-0.03289794921875,
-0.01274871826171875,
0.038909912109375,
0.00992584228515625,
-0.03662109375,
-0.022674560546875,
0.01239013671875,
0.07659912109375,
0.0161895751953125,
0.0732421875,
0.01690673828125,
0.03369140625,
0.06988525390625,
0.0038585662841796875,
-0.05523681640625,
-0.021820068359375,
0.016082763671875,
0.0097503662109375,
-0.0209808349609375,
0.0171051025390625,
-0.00048065185546875,
0.002651214599609375,
0.0780029296875,
0.06640625,
-0.12225341796875,
0.004215240478515625,
0.02398681640625,
0.005939483642578125,
-0.00875091552734375,
0.004650115966796875,
-0.0029850006103515625,
0.0026378631591796875,
-0.024505615234375,
-0.035064697265625,
-0.04290771484375,
-0.0199737548828125,
0.00736236572265625,
0.01515960693359375,
0.00921630859375,
0.05059814453125,
0.002471923828125,
-0.02471923828125,
-0.0281524658203125,
0.003223419189453125,
0.0001131892204284668,
-0.034759521484375,
0.0124664306640625,
0.00890350341796875,
-0.01406097412109375,
-0.06402587890625,
0.0232696533203125,
-0.0177459716796875,
0.00003933906555175781,
0.05633544921875,
0.0217742919921875,
-0.0026264190673828125,
0.048004150390625,
-0.03338623046875,
0.0479736328125,
-0.0098724365234375,
-0.0004839897155761719,
-0.006000518798828125,
-0.031951904296875,
0.0087738037109375,
0.06719970703125,
-0.054290771484375,
0.03228759765625,
-0.01045989990234375,
-0.006610870361328125,
-0.01157379150390625,
0.0183563232421875,
0.07342529296875,
-0.009124755859375,
-0.024993896484375,
0.03265380859375,
0.0310516357421875,
-0.02264404296875,
-0.006900787353515625,
-0.0240936279296875,
-0.005687713623046875,
0.023956298828125,
-0.041748046875,
-0.034027099609375,
-0.00441741943359375,
-0.03851318359375,
-0.043914794921875,
0.0311737060546875,
-0.01302337646484375,
0.03759765625,
0.04425048828125,
-0.0089874267578125,
-0.01155853271484375,
-0.01488494873046875,
-0.011871337890625,
0.025543212890625,
-0.0184783935546875,
0.042724609375,
-0.0168609619140625,
-0.0166473388671875,
0.0150909423828125,
0.042022705078125,
-0.0013790130615234375,
-0.01184844970703125,
0.01568603515625,
0.005985260009765625,
0.0469970703125,
0.0419921875,
0.003437042236328125,
-0.01030731201171875,
-0.006198883056640625,
0.028717041015625,
0.0304718017578125,
-0.0416259765625,
0.0313720703125,
-0.0173187255859375,
-0.0190277099609375,
0.01154327392578125,
0.015899658203125,
0.034210205078125,
0.01280975341796875,
-0.00807952880859375,
-0.0308380126953125,
0.01268768310546875,
0.03790283203125,
0.00751495361328125,
-0.0224609375,
-0.005001068115234375,
0.01505279541015625,
-0.057373046875,
0.001773834228515625,
-0.037872314453125,
0.04107666015625,
0.0273895263671875,
0.0026264190673828125,
0.0240325927734375,
0.011077880859375,
-0.0247802734375,
-0.0230255126953125,
-0.0008563995361328125,
-0.001239776611328125,
-0.01898193359375,
-0.0115814208984375,
-0.00031828880310058594,
0.025726318359375,
-0.0277862548828125,
0.0142669677734375,
0.029632568359375,
0.0083465576171875,
-0.0120391845703125,
-0.0269317626953125,
0.0087432861328125,
0.002567291259765625,
-0.0174560546875,
-0.022613525390625,
-0.03289794921875,
0.0102996826171875,
0.041107177734375,
-0.058441162109375,
-0.01122283935546875,
0.0462646484375,
0.04681396484375,
-0.009979248046875,
-0.0272216796875,
-0.038421630859375,
-0.046173095703125,
-0.046478271484375,
-0.04461669921875,
0.0307769775390625,
0.0634765625,
0.058197021484375,
0.034759521484375,
0.0304412841796875,
-0.03082275390625,
-0.0223388671875,
0.0066986083984375,
-0.0239105224609375,
0.03106689453125,
-0.06689453125,
-0.034149169921875,
0.0282745361328125,
0.049346923828125,
-0.0025539398193359375,
0.032928466796875,
0.03826904296875,
0.040374755859375,
-0.00482940673828125,
-0.0117034912109375,
0.06134033203125,
-0.00916290283203125,
-0.01454925537109375,
-0.037445068359375,
-0.010650634765625,
0.0000693202018737793,
-0.012481689453125,
0.01224517822265625,
-0.03302001953125,
0.0333251953125,
-0.039459228515625,
0.026336669921875,
-0.01288604736328125,
-0.043426513671875,
0.06903076171875,
-0.04705810546875,
0.0775146484375,
-0.0244140625,
-0.0718994140625,
-0.0176544189453125,
-0.0347900390625,
-0.053192138671875,
0.048736572265625,
0.04541015625,
-0.0281829833984375,
0.017120361328125,
0.01239776611328125,
0.01320648193359375,
-0.009735107421875,
-0.031585693359375,
0.040802001953125,
-0.032745361328125,
-0.01247406005859375,
0.00789642333984375,
-0.0570068359375,
-0.044952392578125,
-0.043914794921875,
0.043792724609375,
-0.004657745361328125,
0.1156005859375,
-0.0384521484375,
0.0242919921875,
-0.01415252685546875,
0.0648193359375,
-0.08056640625,
-0.03546142578125,
0.0452880859375,
-0.01500701904296875,
0.0187530517578125,
0.013702392578125,
0.0016345977783203125,
0.01111602783203125,
0.0187225341796875,
-0.053863525390625,
0.0217437744140625,
-0.0303802490234375,
0.01168060302734375,
-0.03741455078125,
-0.01131439208984375,
-0.016448974609375,
-0.0283050537109375,
-0.019866943359375,
0.0158843994140625,
0.01800537109375,
0.0157928466796875,
-0.041229248046875,
0.01488494873046875,
0.01422882080078125,
-0.0655517578125,
0.031097412109375,
-0.0673828125,
0.057373046875,
0.036468505859375,
0.0362548828125,
0.01419830322265625,
-0.01457977294921875,
-0.0108795166015625,
0.01010894775390625,
0.03204345703125,
-0.035980224609375,
-0.0029087066650390625,
-0.0088043212890625,
-0.033721923828125,
-0.0428466796875,
-0.02197265625,
-0.057708740234375,
-0.0197296142578125,
0.004306793212890625,
0.00009542703628540039,
-0.030792236328125,
0.018341064453125,
-0.0130462646484375,
-0.0008168220520019531,
-0.0005807876586914062,
0.019866943359375,
0.006622314453125,
-0.0291748046875,
-0.06488037109375,
0.005130767822265625,
0.03472900390625,
0.007781982421875,
-0.043731689453125,
0.010009765625,
-0.0250244140625,
0.0416259765625,
0.014556884765625,
0.0079803466796875,
0.03204345703125,
0.058990478515625,
-0.001407623291015625,
0.01439666748046875,
0.0115203857421875,
-0.00005900859832763672,
0.026123046875,
0.032196044921875,
0.032379150390625,
-0.049957275390625,
0.00115203857421875,
0.0194091796875,
0.0254364013671875,
0.0609130859375,
0.0243682861328125,
-0.0307159423828125,
-0.032196044921875,
0.0277557373046875,
0.007656097412109375,
-0.042236328125,
0.0023975372314453125,
-0.040130615234375,
-0.02349853515625,
-0.0260772705078125,
0.01494598388671875,
0.02203369140625,
-0.03289794921875,
-0.0679931640625,
0.04559326171875,
-0.0186309814453125,
-0.016265869140625,
-0.0182952880859375,
0.0027370452880859375,
-0.0256805419921875,
0.049560546875,
0.016876220703125,
-0.041839599609375,
0.0081634521484375,
0.025726318359375,
0.0003981590270996094,
0.02593994140625,
0.023956298828125,
-0.01074981689453125,
0.00865936279296875,
0.0018749237060546875,
0.014617919921875,
-0.0171051025390625,
-0.04852294921875,
0.0224609375,
-0.01363372802734375,
0.026275634765625,
-0.01448822021484375,
-0.006557464599609375,
0.02838134765625,
0.044708251953125,
0.0260009765625,
-0.0311737060546875,
-0.033905029296875,
-0.03057861328125,
0.0000749826431274414,
0.0325927734375,
0.01439666748046875,
-0.00838470458984375,
-0.006710052490234375,
-0.042816162109375,
-0.07318115234375,
-0.028076171875,
0.05206298828125,
-0.10467529296875,
-0.006565093994140625,
0.048828125,
0.0239105224609375,
-0.0163116455078125,
0.00589752197265625,
-0.0018825531005859375,
-0.041534423828125,
0.0010004043579101562,
-0.001407623291015625,
-0.040557861328125,
0.062164306640625,
-0.0127716064453125,
-0.0143890380859375,
-0.006679534912109375,
-0.01383209228515625,
-0.0242767333984375,
-0.005435943603515625,
-0.007640838623046875,
-0.0499267578125,
-0.03399658203125,
0.0164031982421875,
0.0311279296875,
-0.016448974609375,
0.0438232421875,
-0.0176849365234375,
0.0173492431640625,
-0.027923583984375,
0.0235748291015625,
0.0113677978515625,
0.0278778076171875,
-0.027923583984375,
0.0222930908203125,
0.037017822265625,
0.006137847900390625,
-0.0147552490234375,
0.0276336669921875,
-0.00507354736328125,
0.0166778564453125,
-0.01082611083984375,
0.00792694091796875,
0.032196044921875,
-0.014373779296875,
0.01678466796875,
-0.02508544921875,
-0.041229248046875,
-0.0137786865234375,
-0.0005822181701660156,
0.011260986328125,
-0.040863037109375,
0.00270843505859375
]
|
b94f7915c51d9db267b74b57eaf4bc91cc9b858b | Wordpress Stackexchange
Q: How to hook a filter to catch get_post_meta when alternate a custom field output? How to hook a filter to catch get_post_meta when alternate a custom field output?
I have fill a custom field(meta data) in a post, just like this:
<!--:de-->Nominale spanning<!--:--><!--:zh/cn-->额定电压<!--:--><!--:en-->Arrester Accessories<!--:-->
I need to get this output translated,so I wondering how to hook into "get_post_meta" before the meta data output.
Here is what I've tried for a few days, but no luck.
function getqtlangcustomfieldvalue($metadata, $object_id, $meta_key, $single){
$fieldtitle="fields_titles";
if($meta_key==$fieldtitle&& isset($meta_key)){
//here is the catch, but no value has been passed
}
}
//Specify 4 arguments for this filter in the last parameter.
add_filter('get_post_metadata', 'getqtlangcustomfieldvalue', 10, 4);
A: Just had the same problem and, using your code above, here is how I solved it:
function getqtlangcustomfieldvalue($metadata, $object_id, $meta_key, $single) {
$fieldtitle="fields_titles";
if($meta_key==$fieldtitle&& isset($meta_key)) {
//use $wpdb to get the value
global $wpdb;
$value = $wpdb->get_var( "SELECT meta_value FROM $wpdb->postmeta WHERE post_id = $object_id AND meta_key = '".$meta_key."'" );
//do whatever with $value
return $value;
}
}
add_filter('get_post_metadata', 'getqtlangcustomfieldvalue', 10, 4);
I tried using apply_filters, get_metadata, get_post_meta directly within the function but they wouldn't allow me to manipulate the resulting output, so I resorted to using $wpdb.
| Q: How to hook a filter to catch get_post_meta when alternate a custom field output? How to hook a filter to catch get_post_meta when alternate a custom field output?
I have fill a custom field(meta data) in a post, just like this:
<!--:de-->Nominale spanning<!--:--><!--:zh/cn-->额定电压<!--:--><!--:en-->Arrester Accessories<!--:-->
I need to get this output translated,so I wondering how to hook into "get_post_meta" before the meta data output.
Here is what I've tried for a few days, but no luck.
function getqtlangcustomfieldvalue($metadata, $object_id, $meta_key, $single){
$fieldtitle="fields_titles";
if($meta_key==$fieldtitle&& isset($meta_key)){
//here is the catch, but no value has been passed
}
}
//Specify 4 arguments for this filter in the last parameter.
add_filter('get_post_metadata', 'getqtlangcustomfieldvalue', 10, 4);
A: Just had the same problem and, using your code above, here is how I solved it:
function getqtlangcustomfieldvalue($metadata, $object_id, $meta_key, $single) {
$fieldtitle="fields_titles";
if($meta_key==$fieldtitle&& isset($meta_key)) {
//use $wpdb to get the value
global $wpdb;
$value = $wpdb->get_var( "SELECT meta_value FROM $wpdb->postmeta WHERE post_id = $object_id AND meta_key = '".$meta_key."'" );
//do whatever with $value
return $value;
}
}
add_filter('get_post_metadata', 'getqtlangcustomfieldvalue', 10, 4);
I tried using apply_filters, get_metadata, get_post_meta directly within the function but they wouldn't allow me to manipulate the resulting output, so I resorted to using $wpdb.
A: After a lot of messing around with this, I think I found a fairly good solution here. I realize this is over a year after you asked but this was bothering me and I couldn't find a good solution until now.
The problem is that the get_post_metadata function doesn't allow you to access the current value. This means you aren't able to transform the value, just replace it. I needed to append content to a meta field and where it was output did not allow filters of any kind.
Here's my solution, altered to fit what this question asks:
function getqtlangcustomfieldvalue($metadata, $object_id, $meta_key, $single){
// Here is the catch, add additional controls if needed (post_type, etc)
$meta_needed = 'fields_titles';
if ( isset( $meta_key ) && $meta_needed == $meta_key ){
remove_filter( 'get_post_metadata', 'getqtlangcustomfieldvalue', 100 );
$current_meta = get_post_meta( $object_id, $meta_needed, TRUE );
add_filter('get_post_metadata', 'getqtlangcustomfieldvalue', 100, 4);
// Do what you need to with the meta value - translate, append, etc
// $current_meta = qtlangcustomfieldvalue_translate( $current_meta );
// $current_meta .= ' Appended text';
return $current_meta;
}
// Return original if the check does not pass
return $metadata;
}
add_filter( 'get_post_metadata', 'getqtlangcustomfieldvalue', 100, 4 );
This will keep any other get_post_metadata filters intact and allow modification of the original value.
A: Here's my solution for filtering post meta. This then calls a custom function to perform any required data manipulation.
public function filter_post_meta($metadata = null, $object_id, $meta_key, $single)
{
$meta_cache = wp_cache_get($object_id, 'post_meta');
if ( !$meta_cache ) {
$meta_cache = update_meta_cache( 'post', array( $object_id ) );
$meta_cache = $meta_cache[$object_id];
}
if ( ! $meta_key ) {
foreach ($meta_cache as $key => $val) {
foreach ($val as $k => $v) {
$meta_cache[$key][$k] = yourCustomFunction($v);
}
}
return $meta_cache;
}
if ( isset($meta_cache[$meta_key]) ) {
if ( $single ) {
$value = maybe_unserialize( $meta_cache[$meta_key][0] );
return yourCustomFunction($value);
} else {
return array_map(
'maybe_unserialize',
array_map(
'yourCustomFunction',
$meta_cache[$meta_key]
)
);
}
}
return $single ? '' : [];
}
add_filter('get_post_metadata', 'filter_post_meta', 100, 4);
| wordpress | {
"language": "en",
"length": 526,
"provenance": "stackexchange_00019.jsonl.gz:439030",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/121679"
} | [
0.01270294189453125,
-0.0107269287109375,
0.0204315185546875,
-0.00865936279296875,
-0.024505615234375,
-0.0004916191101074219,
0.020904541015625,
-0.01678466796875,
0.01837158203125,
0.00699615478515625,
-0.005096435546875,
-0.0192108154296875,
-0.01006317138671875,
-0.03924560546875,
-0.007648468017578125,
-0.03173828125,
0.036407470703125,
-0.016387939453125,
0.03753662109375,
0.0015115737915039062,
0.046051025390625,
0.0150146484375,
-0.0062255859375,
-0.010406494140625,
0.0487060546875,
-0.0543212890625,
0.031219482421875,
-0.04119873046875,
0.050018310546875,
-0.00620269775390625,
0.02850341796875,
-0.007450103759765625,
0.038421630859375,
-0.01314544677734375,
-0.00798797607421875,
0.01386260986328125,
0.0249786376953125,
-0.007572174072265625,
-0.0079193115234375,
0.033599853515625,
0.01397705078125,
0.0101165771484375,
-0.0654296875,
0.04144287109375,
-0.04962158203125,
-0.07427978515625,
0.04510498046875,
-0.00494384765625,
0.021728515625,
0.035003662109375,
-0.007568359375,
0.0005488395690917969,
-0.0126495361328125,
0.01354217529296875,
0.0010614395141601562,
-0.019866943359375,
-0.04290771484375,
-0.036529541015625,
0.044281005859375,
0.0521240234375,
-0.002025604248046875,
-0.05218505859375,
0.001338958740234375,
-0.05426025390625,
0.0201873779296875,
-0.00018918514251708984,
-0.0103302001953125,
0.0195465087890625,
-0.030120849609375,
-0.00659942626953125,
0.0264129638671875,
-0.04022216796875,
-0.00051116943359375,
0.00469207763671875,
-0.0172119140625,
-0.048919677734375,
0.0227508544921875,
-0.04986572265625,
0.004611968994140625,
0.027130126953125,
0.00865936279296875,
-0.0440673828125,
-0.0386962890625,
-0.00010412931442260742,
0.0204925537109375,
0.0278778076171875,
-0.00998687744140625,
0.0005860328674316406,
-0.00934600830078125,
-0.03515625,
-0.011077880859375,
-0.019378662109375,
-0.055755615234375,
-0.0010023117065429688,
0.00315093994140625,
-0.036651611328125,
0.0193634033203125,
0.0626220703125,
-0.034515380859375,
-0.01483917236328125,
0.0032596588134765625,
-0.0166015625,
-0.00852203369140625,
-0.038177490234375,
0.010833740234375,
0.0244598388671875,
-0.025909423828125,
-0.039215087890625,
0.01139068603515625,
0.02392578125,
-0.01384735107421875,
-0.0292205810546875,
-0.02392578125,
-0.0180816650390625,
-0.04803466796875,
0.041961669921875,
0.0005850791931152344,
-0.05352783203125,
-0.00738525390625,
-0.02984619140625,
0.01934814453125,
-0.0001735687255859375,
0.048980712890625,
-0.052703857421875,
0.041534423828125,
0.0027618408203125,
-0.07476806640625,
-0.0040283203125,
-0.0209197998046875,
0.0144500732421875,
-0.022491455078125,
-0.016815185546875,
0.06463623046875,
0.05517578125,
0.02838134765625,
-0.0170745849609375,
-0.0037403106689453125,
-0.0168609619140625,
0.004360198974609375,
0.01271820068359375,
0.022308349609375,
0.00039839744567871094,
0.003932952880859375,
0.0201873779296875,
-0.0211639404296875,
-0.0134429931640625,
0.037078857421875,
0.0187225341796875,
-0.042022705078125,
-0.0311279296875,
-0.0138397216796875,
0.057525634765625,
0.0095367431640625,
0.006084442138671875,
0.0038280487060546875,
-0.007793426513671875,
0.044464111328125,
-0.03472900390625,
-0.01251983642578125,
-0.047271728515625,
-0.02459716796875,
-0.0284271240234375,
-0.0295562744140625,
-0.046844482421875,
-0.05938720703125,
0.045135498046875,
0.004695892333984375,
0.01169586181640625,
0.00833892822265625,
0.0192108154296875,
0.0421142578125,
0.031982421875,
-0.0269927978515625,
-0.02899169921875,
-0.0074310302734375,
-0.0439453125,
-0.036346435546875,
0.0252227783203125,
0.0262298583984375,
-0.03143310546875,
-0.00859832763671875,
-0.0198516845703125,
0.063232421875,
0.003139495849609375,
-0.04840087890625,
0.017425537109375,
0.0141448974609375,
0.050201416015625,
0.025970458984375,
0.00669097900390625,
0.0377197265625,
-0.00887298583984375,
-0.0262908935546875,
0.01165771484375,
-0.01139068603515625,
0.0008320808410644531,
0.0071868896484375,
0.0170745849609375,
-0.00867462158203125,
-0.017822265625,
0.01837158203125,
-0.0045928955078125,
0.00455474853515625,
-0.01531219482421875,
-0.0426025390625,
-0.020782470703125,
-0.01611328125,
0.0217132568359375,
-0.07122802734375,
0.01324462890625,
0.03277587890625,
-0.008087158203125,
-0.035369873046875,
0.045684814453125,
0.0282135009765625,
-0.0325927734375,
-0.0279388427734375,
0.007015228271484375,
-0.00772857666015625,
-0.0005064010620117188,
0.00844573974609375,
-0.0322265625,
-0.0187530517578125,
0.01214599609375,
0.0271148681640625,
0.00980377197265625,
0.00543212890625,
0.0146484375,
0.0767822265625,
0.036590576171875,
0.007587432861328125,
-0.0306549072265625,
0.00582122802734375,
0.00780487060546875,
-0.0208587646484375,
-0.0008573532104492188,
-0.01410675048828125,
-0.060516357421875,
0.0028514862060546875,
0.05517578125,
0.0305328369140625,
0.040435791015625,
-0.0037403106689453125,
0.0287628173828125,
0.035491943359375,
-0.0256500244140625,
0.013092041015625,
-0.00934600830078125,
0.0185546875,
0.06756591796875,
-0.035308837890625,
0.00487518310546875,
0.019989013671875,
-0.059906005859375,
0.0005478858947753906,
0.043670654296875,
-0.057586669921875,
-0.027679443359375,
0.032867431640625,
-0.02264404296875,
-0.00254058837890625,
-0.039306640625,
0.00897979736328125,
-0.014739990234375,
0.027069091796875,
0.006988525390625,
0.0281829833984375,
0.0305023193359375,
-0.0240325927734375,
0.00937652587890625,
0.0239105224609375,
0.022918701171875,
0.018402099609375,
-0.0120391845703125,
-0.024749755859375,
0.02178955078125,
-0.01403045654296875,
0.00923919677734375,
0.0124053955078125,
-0.0185699462890625,
0.017730712890625,
0.06060791015625,
0.0012645721435546875,
-0.01456451416015625,
0.00363922119140625,
-0.03399658203125,
-0.01318359375,
0.01119232177734375,
0.00821685791015625,
-0.0139312744140625,
0.0121612548828125,
0.03558349609375,
-0.00991058349609375,
0.037445068359375,
-0.0112152099609375,
-0.0261993408203125,
-0.005939483642578125,
-0.0218963623046875,
0.03533935546875,
-0.0430908203125,
0.0083160400390625,
0.059539794921875,
-0.04705810546875,
0.036224365234375,
-0.0057373046875,
-0.026458740234375,
-0.0382080078125,
0.00833892822265625,
-0.01451873779296875,
-0.0268402099609375,
-0.0248870849609375,
0.049224853515625,
0.015960693359375,
0.048370361328125,
-0.0041046142578125,
-0.03717041015625,
0.00812530517578125,
0.015594482421875,
-0.06982421875,
-0.10089111328125,
0.039947509765625,
-0.0191650390625,
0.0128021240234375,
-0.03533935546875,
-0.018402099609375,
-0.0165863037109375,
-0.0287933349609375,
-0.007442474365234375,
0.0240478515625,
0.0131378173828125,
-0.0806884765625,
0.00432586669921875,
-0.07025146484375,
0.00749969482421875,
-0.01290130615234375,
0.022064208984375,
0.0014677047729492188,
0.038482666015625,
-0.002643585205078125,
-0.0343017578125,
0.003231048583984375,
-0.00440216064453125,
-0.00856781005859375,
0.00916290283203125,
-0.0133514404296875,
-0.057220458984375,
-0.0027980804443359375,
-0.01116180419921875,
-0.00783538818359375,
-0.003551483154296875,
0.0180206298828125,
0.005550384521484375,
-0.0015420913696289062,
0.0113067626953125,
0.044097900390625,
-0.01461029052734375,
-0.006832122802734375,
0.046295166015625,
0.062347412109375,
0.0014524459838867188,
0.0031261444091796875,
-0.0298004150390625,
-0.0186614990234375,
0.053314208984375,
0.01282501220703125,
-0.0169677734375,
-0.0102996826171875,
0.05975341796875,
-0.0189666748046875,
-0.014739990234375,
0.01367950439453125,
-0.01983642578125,
0.02142333984375,
-0.004730224609375,
0.002765655517578125,
0.002513885498046875,
-0.0154266357421875,
-0.0238037109375,
0.030364990234375,
-0.009002685546875,
0.027984619140625,
0.0196685791015625,
0.00909423828125,
0.0010824203491210938,
-0.0311126708984375,
0.06304931640625,
0.005779266357421875,
0.0199737548828125,
-0.03692626953125,
-0.03765869140625,
-0.029815673828125,
0.06707763671875,
-0.02764892578125,
-0.037750244140625,
0.01131439208984375,
0.0237579345703125,
-0.0184173583984375,
-0.00887298583984375,
0.0026874542236328125,
-0.0125885009765625,
-0.13720703125,
0.042144775390625,
0.0206756591796875,
-0.04351806640625,
-0.003387451171875,
-0.02423095703125,
-0.08856201171875,
-0.042510986328125,
0.02850341796875,
-0.0203857421875,
0.0039520263671875,
0.0439453125,
-0.00388336181640625,
0.0216064453125,
-0.0305023193359375,
-0.0128631591796875,
-0.046875,
-0.01453399658203125,
-0.005001068115234375,
0.044158935546875,
0.005092620849609375,
-0.00203704833984375,
-0.007183074951171875,
0.030609130859375,
0.00527191162109375,
0.0167236328125,
-0.0224761962890625,
-0.007389068603515625,
0.0079803466796875,
-0.0090179443359375,
-0.022430419921875,
-0.0193939208984375,
-0.020965576171875,
0.0023403167724609375,
-0.02789306640625,
0.0450439453125,
-0.00800323486328125,
-0.0004305839538574219,
0.005390167236328125,
-0.0340576171875,
-0.0538330078125,
-0.01172637939453125,
0.004817962646484375,
-0.029937744140625,
-0.01129150390625,
-0.003810882568359375,
0.00872802734375,
-0.0430908203125,
0.042510986328125,
0.0347900390625,
-0.0167388916015625,
-0.01184844970703125,
0.054595947265625,
0.0172576904296875,
-0.048309326171875,
-0.004974365234375,
0.003856658935546875,
0.0224456787109375,
-0.0225677490234375,
0.053955078125,
0.0035877227783203125,
-0.02685546875,
0.1107177734375,
-0.01132965087890625,
0.024078369140625,
-0.0296630859375,
0.057037353515625,
-0.005214691162109375,
0.0199127197265625,
0.00934600830078125,
-0.00901031494140625,
-0.0039043426513671875,
0.0138397216796875,
-0.00565338134765625,
-0.019683837890625,
0.0304107666015625,
0.026641845703125,
-0.01605224609375,
0.00878143310546875,
-0.01177978515625,
-0.016632080078125,
0.00983428955078125,
0.019866943359375,
0.019500732421875,
-0.015228271484375,
0.03228759765625,
-0.00923919677734375,
0.007091522216796875,
0.025634765625,
-0.0183868408203125,
0.016357421875,
-0.0200347900390625,
0.03887939453125,
0.0022029876708984375,
0.020233154296875,
-0.0261077880859375,
-0.01500701904296875,
0.0231475830078125,
-0.02191162109375,
-0.053070068359375,
0.02288818359375,
-0.036285400390625,
0.0210418701171875,
0.031646728515625,
-0.04669189453125,
0.00843048095703125,
0.07391357421875,
-0.06298828125,
0.0214996337890625,
-0.026611328125,
0.044708251953125,
-0.04437255859375,
-0.025482177734375,
-0.0031375885009765625,
0.0008492469787597656,
-0.0305023193359375,
0.109130859375,
-0.0301513671875,
0.0548095703125,
-0.0235443115234375,
0.037811279296875,
0.03216552734375,
0.041229248046875,
0.01129913330078125,
-0.050537109375,
-0.015960693359375,
0.0543212890625,
-0.0081024169921875,
-0.0211029052734375,
-0.01605224609375,
0.0063629150390625,
0.005817413330078125,
0.00658416748046875,
0.0088958740234375,
0.034515380859375,
0.0321044921875,
-0.02734375,
0.035003662109375,
0.009674072265625,
-0.050140380859375,
-0.033538818359375,
-0.0103912353515625,
-0.00592041015625,
-0.007572174072265625,
0.003208160400390625,
-0.020782470703125,
0.03118896484375,
0.046875,
-0.06768798828125,
0.03570556640625,
-0.0017194747924804688,
-0.0031452178955078125,
0.0007390975952148438,
0.0032405853271484375,
0.01399993896484375,
-0.047515869140625,
-0.03106689453125,
-0.01007080078125,
-0.0226287841796875,
0.03759765625,
-0.037567138671875,
0.020660400390625,
-0.01227569580078125,
0.006587982177734375,
-0.03375244140625,
0.01308441162109375,
0.048828125,
0.032379150390625,
0.0035915374755859375,
-0.00335693359375,
-0.0136566162109375,
-0.0071258544921875,
0.035247802734375,
-0.0194854736328125,
0.019561767578125,
-0.034027099609375,
0.00809478759765625,
0.01293182373046875,
0.02386474609375,
-0.0009007453918457031,
-0.003414154052734375,
0.0125885009765625,
0.00710296630859375,
0.032196044921875,
-0.01947021484375,
0.053070068359375,
0.02178955078125,
0.042022705078125,
0.00978851318359375,
0.01206207275390625,
-0.020416259765625,
-0.005352020263671875,
-0.0154876708984375,
-0.0191650390625,
0.005767822265625,
0.01119232177734375,
0.002803802490234375,
-0.00496673583984375,
0.0219573974609375,
0.0122528076171875,
-0.015106201171875,
-0.004795074462890625,
-0.009063720703125,
-0.0023040771484375,
0.031402587890625,
0.039825439453125,
-0.049346923828125,
0.06451416015625,
-0.0213165283203125,
-0.0236053466796875,
-0.021636962890625,
-0.01113128662109375,
0.05340576171875,
-0.006732940673828125,
0.01265716552734375,
0.0222930908203125,
-0.023681640625,
0.03131103515625,
0.05126953125,
0.021759033203125,
0.037933349609375,
-0.0023365020751953125,
0.02337646484375,
-0.00394439697265625,
-0.0130462646484375,
0.0050201416015625,
0.0191802978515625,
0.0498046875,
-0.0208587646484375,
-0.01654052734375,
0.0273895263671875,
-0.0214691162109375,
0.0054473876953125,
0.004093170166015625,
0.0560302734375,
-0.031646728515625,
0.0184478759765625,
0.0267333984375,
0.01384735107421875,
0.0005092620849609375,
0.006755828857421875,
-0.05218505859375,
-0.03619384765625,
-0.006435394287109375,
-0.0211639404296875,
-0.0438232421875,
-0.004795074462890625,
0.038177490234375,
-0.00257110595703125,
-0.0310821533203125,
0.01445770263671875,
0.007904052734375,
0.039398193359375,
-0.014556884765625,
-0.01247406005859375,
0.01995849609375,
0.01247406005859375,
0.0151214599609375,
-0.020233154296875,
-0.0249176025390625,
-0.051971435546875,
-0.0413818359375,
-0.01898193359375,
-0.046630859375,
0.0041961669921875,
0.0182037353515625,
0.050018310546875,
0.0175628662109375,
0.032470703125,
-0.03662109375,
-0.006900787353515625,
0.0009479522705078125,
-0.045867919921875,
-0.0292205810546875,
0.0050506591796875,
0.06793212890625,
-0.01332855224609375,
0.03399658203125,
0.01114654541015625,
-0.026580810546875,
-0.00518035888671875,
-0.01366424560546875,
0.04925537109375,
0.0252838134765625,
-0.036651611328125,
0.0191192626953125,
0.005519866943359375,
-0.0144195556640625,
0.0216522216796875,
0.049163818359375,
-0.034332275390625,
-0.02532958984375,
0.027008056640625,
-0.0430908203125,
-0.0523681640625,
0.02423095703125,
-0.09490966796875,
0.06048583984375,
0.051361083984375,
0.00516510009765625,
-0.03521728515625,
0.022979736328125,
-0.036163330078125,
-0.0025081634521484375,
-0.05218505859375,
0.07745361328125,
0.0031948089599609375,
0.0283355712890625,
-0.071533203125,
-0.0079345703125,
0.0012884140014648438,
0.028350830078125,
0.035369873046875,
0.0166778564453125,
-0.0277557373046875,
-0.02392578125,
-0.005382537841796875,
0.01280975341796875,
-0.0216522216796875,
0.05572509765625,
-0.0027179718017578125,
0.07928466796875,
0.05206298828125,
-0.0689697265625,
0.0264129638671875,
-0.00513458251953125,
-0.016632080078125,
0.0268707275390625,
0.007175445556640625,
-0.00324249267578125,
-0.0004901885986328125,
0.040191650390625,
-0.005077362060546875,
-0.00844573974609375,
-0.002193450927734375,
-0.022918701171875,
-0.0008883476257324219,
0.007152557373046875,
0.0291290283203125,
-0.01097869873046875,
0.021728515625,
-0.0254058837890625,
0.036285400390625,
0.0222930908203125,
0.0343017578125,
0.04241943359375,
0.0224456787109375,
0.035430908203125,
-0.027435302734375,
-0.00018322467803955078,
-0.0217132568359375,
0.0151214599609375,
0.06134033203125,
0.003971099853515625,
0.0028285980224609375,
-0.001979827880859375,
0.082763671875,
0.0016345977783203125,
0.019439697265625,
-0.07110595703125,
-0.0501708984375,
0.0086517333984375,
-0.020721435546875,
-0.034210205078125,
-0.01035308837890625,
-0.05914306640625,
0.03875732421875,
0.058990478515625,
-0.056182861328125,
0.0256195068359375,
0.033172607421875,
0.0406494140625,
-0.007595062255859375,
-0.01238250732421875,
-0.0718994140625,
0.013397216796875,
-0.0780029296875,
0.00673675537109375,
0.04315185546875,
0.12396240234375,
0.04278564453125,
0.07763671875,
-0.0108489990234375,
-0.0634765625,
-0.0174713134765625,
-0.01259613037109375,
0.0162506103515625,
0.01312255859375,
-0.04119873046875,
-0.0139923095703125,
0.0191650390625,
0.035308837890625,
0.041046142578125,
-0.0103912353515625,
0.0347900390625,
0.01052093505859375,
-0.03216552734375,
-0.001659393310546875,
0.041290283203125,
-0.0106201171875,
-0.021392822265625,
-0.045257568359375,
0.000058591365814208984,
0.0077972412109375,
0.00353240966796875,
0.00753021240234375,
-0.00450897216796875,
0.017669677734375,
-0.014434814453125,
0.0185089111328125,
0.0001201629638671875,
-0.033050537109375,
-0.0091705322265625,
0.019195556640625,
0.04681396484375,
0.016571044921875,
-0.0989990234375,
0.0010957717895507812,
-0.046173095703125,
-0.08489990234375,
0.030548095703125,
0.05609130859375,
-0.0276641845703125,
0.004596710205078125,
-0.01444244384765625,
-0.00989532470703125,
-0.0062408447265625,
0.0147247314453125,
0.01319122314453125,
0.0187225341796875,
0.00485992431640625,
0.001049041748046875,
-0.0325927734375,
-0.0192413330078125,
-0.0014715194702148438,
0.016448974609375,
0.01134490966796875,
0.022186279296875,
0.0095977783203125,
0.023529052734375,
-0.037445068359375,
-0.032623291015625,
-0.00786590576171875,
-0.005504608154296875,
0.0011301040649414062,
0.002796173095703125,
-0.017608642578125,
-0.012725830078125,
0.01404571533203125,
-0.01104736328125,
0.03485107421875,
-0.045745849609375,
-0.051422119140625,
-0.01444244384765625,
0.04046630859375,
0.01502227783203125,
0.04437255859375,
-0.034332275390625,
-0.01434326171875,
-0.06317138671875,
-0.0372314453125,
0.0655517578125,
0.0452880859375,
0.0328369140625,
-0.0125274658203125,
0.0200347900390625,
-0.0017175674438476562,
0.0144805908203125,
0.03704833984375,
0.04425048828125,
0.0401611328125,
-0.055694580078125,
0.0364990234375,
0.00875091552734375,
-0.02362060546875,
0.02618408203125,
0.016876220703125,
-0.0010242462158203125,
-0.00027179718017578125,
-0.019287109375,
-0.0124359130859375,
-0.01751708984375,
0.03521728515625,
-0.0156402587890625,
0.01239013671875,
0.00681304931640625,
0.01227569580078125,
-0.032135009765625,
0.005584716796875,
-0.0198211669921875,
-0.0258941650390625,
-0.021209716796875,
0.00023758411407470703,
-0.0196380615234375,
-0.050933837890625,
-0.0462646484375,
-0.028045654296875,
0.0209503173828125,
-0.002048492431640625,
-0.032623291015625,
0.004547119140625,
-0.0188751220703125,
-0.001285552978515625,
-0.01123046875,
0.0113983154296875,
0.0015535354614257812,
0.03253173828125,
-0.035369873046875,
-0.0257110595703125,
-0.010345458984375,
0.0367431640625,
-0.0146484375,
-0.006107330322265625,
0.00043892860412597656,
-0.01502227783203125,
-0.041717529296875,
-0.0090484619140625,
0.00743865966796875,
0.0239715576171875,
0.01148223876953125,
-0.028045654296875,
-0.004459381103515625,
0.032470703125,
-0.00811004638671875,
-0.045318603515625,
0.0181427001953125,
-0.034423828125,
0.00255584716796875,
0.00577545166015625,
0.003826141357421875,
0.0252838134765625,
-0.03564453125,
-0.07562255859375,
0.06488037109375,
-0.0106048583984375,
-0.0218658447265625,
-0.042755126953125,
-0.0257568359375,
0.003971099853515625,
0.05877685546875,
0.0012006759643554688,
-0.03369140625,
-0.0609130859375,
0.0162811279296875,
0.023193359375,
-0.054534912109375,
0.0557861328125,
0.0230712890625,
-0.069580078125,
0.01345062255859375,
0.0093231201171875,
-0.01287841796875,
-0.030426025390625,
-0.007717132568359375,
-0.0007300376892089844,
-0.025848388671875,
-0.062255859375,
-0.017059326171875,
0.01959228515625,
0.044891357421875,
-0.0030345916748046875,
-0.058258056640625,
-0.0296630859375,
-0.005889892578125,
0.09271240234375,
0.04876708984375,
0.0229949951171875,
-0.05889892578125,
-0.0124359130859375,
-0.0031375885009765625,
-0.058868408203125,
-0.024169921875,
0.033355712890625,
-0.08544921875,
-0.02764892578125,
0.004344940185546875,
0.0012187957763671875,
-0.0196990966796875,
0.01172637939453125,
-0.00891876220703125,
-0.01800537109375,
0.047637939453125,
0.013763427734375,
-0.037506103515625,
-0.065185546875,
0.0836181640625,
-0.050933837890625,
-0.0128326416015625,
0.031341552734375,
0.027008056640625,
0.020233154296875,
0.017120361328125,
-0.0343017578125,
-0.029388427734375,
0.01085662841796875,
0.01105499267578125,
0.0069427490234375,
0.05072021484375,
0.02301025390625,
-0.001949310302734375,
-0.02392578125,
0.0212249755859375,
0.007312774658203125,
0.031982421875,
0.0257415771484375,
-0.0166015625,
0.0116119384765625,
0.0110931396484375,
-0.045135498046875,
0.058135986328125,
-0.0030689239501953125,
-0.00868988037109375,
-0.028717041015625,
0.036895751953125,
0.0206298828125,
-0.00344085693359375,
-0.0083160400390625,
0.0033779144287109375,
-0.037384033203125,
-0.03216552734375,
0.0200653076171875,
-0.00168609619140625,
-0.01800537109375,
0.019073486328125
]
|
3bb38e4e5e1f47999bde44a7280959fe9ff72b7b | Wordpress Stackexchange
Q: How to remove "read more" link from custom post type excerpt Is there a way I can add some kind of pre_get_posts() filter to strip out the "read more" link that appears at the end of the_excerpt() for only 1 certain custom post type that I specify?
If so, can someone please help me out with the code? I've been working at it for a while but haven't gotten anywhere. Any help would be greatly appreciated. Thanks!
A: I fixed this by adding the below to functions.php
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
Courtesy of Remove more or [...] text from short post
| Q: How to remove "read more" link from custom post type excerpt Is there a way I can add some kind of pre_get_posts() filter to strip out the "read more" link that appears at the end of the_excerpt() for only 1 certain custom post type that I specify?
If so, can someone please help me out with the code? I've been working at it for a while but haven't gotten anywhere. Any help would be greatly appreciated. Thanks!
A: I fixed this by adding the below to functions.php
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
Courtesy of Remove more or [...] text from short post
A: Put the following code in functions.php to show "read more" on all post types except custom_post_type.
function excerpt_read_more_link($output) {
global $post;
if ($post->post_type != 'custom_post_type')
{
$output .= '<p><a href="'. get_permalink($post->ID) . '">read more</a></p>';
}
return $output;
}
add_filter('the_excerpt', 'excerpt_read_more_link');
A: An easy solution is to put following code inside style.css:
a.read-more {
display:none;
}
This targets <a class="read-more">
A: What about this? Basically it's a way to customize the text by adding a callback function to the functions.php file. I'm thinking, however, if you just return a space instead, then it should override it and not display anything.
// Replaces the excerpt "more" text by a link
function new_excerpt_more($more) {
global $post;
return ' ';
}
add_filter('excerpt_more', 'new_excerpt_more');
I got this from The Wordpress codex
Edit:
This is untested, but what if you do this:
// Replaces the excerpt "more" text by a link
function new_excerpt_more($more) {
global $post;
if ($post->post_type == 'your-cpt')
{
return " ";
}
}
add_filter('excerpt_more', 'new_excerpt_more');
To reiterate, I haven't tested this, but may get you on the right track (i.e. var_dump($post) to see how you can bend it to your will from within the new_excerpt_more function.
A: function custom_theme_developement_view_product_button(){
global $product;
$link = $product->get_permalink();
echo '<a href="" class="added_to_cart wc-forward" title="View cart"></a>';
}
add_action( 'woocommerce_after_shop_loop_item', 'custom_theme_developement_view_product_button', 11 );
| wordpress | {
"language": "en",
"length": 314,
"provenance": "stackexchange_00019.jsonl.gz:439105",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/122927"
} | [
0.0858154296875,
-0.004085540771484375,
0.0350341796875,
0.012115478515625,
0.01206207275390625,
-0.0596923828125,
0.09185791015625,
-0.0305328369140625,
-0.0305633544921875,
0.0261993408203125,
0.0308074951171875,
-0.0298919677734375,
-0.020538330078125,
-0.0421142578125,
-0.0069122314453125,
-0.0386962890625,
0.024200439453125,
0.004985809326171875,
0.036865234375,
-0.0139312744140625,
0.00885772705078125,
0.004611968994140625,
0.047882080078125,
0.01035308837890625,
-0.01078033447265625,
0.00814056396484375,
0.1236572265625,
-0.004604339599609375,
-0.004123687744140625,
-0.03424072265625,
0.0108642578125,
-0.003116607666015625,
0.01441192626953125,
0.030029296875,
-0.0250396728515625,
-0.0228729248046875,
0.0100250244140625,
0.0022068023681640625,
-0.0016317367553710938,
0.01629638671875,
-0.020599365234375,
0.01233673095703125,
-0.049285888671875,
-0.014190673828125,
-0.04559326171875,
-0.026214599609375,
-0.01558685302734375,
-0.019500732421875,
-0.0009002685546875,
0.0129547119140625,
0.0182647705078125,
0.0203094482421875,
0.03485107421875,
-0.0501708984375,
-0.0180206298828125,
0.0002956390380859375,
0.00986480712890625,
0.01430511474609375,
0.03216552734375,
-0.0297698974609375,
-0.0274505615234375,
0.0234375,
0.00609588623046875,
0.01139068603515625,
-0.029083251953125,
0.0012073516845703125,
-0.0140838623046875,
0.010284423828125,
-0.04473876953125,
-0.027984619140625,
0.0271148681640625,
-0.02838134765625,
0.029998779296875,
-0.0341796875,
-0.03076171875,
0.018463134765625,
-0.0178070068359375,
-0.004718780517578125,
0.0269317626953125,
-0.038360595703125,
-0.022369384765625,
-0.07073974609375,
-0.037445068359375,
-0.0098724365234375,
0.016357421875,
-0.0045318603515625,
-0.009124755859375,
0.01500701904296875,
-0.0138397216796875,
-0.005115509033203125,
-0.015655517578125,
-0.01287841796875,
0.02349853515625,
0.025054931640625,
-0.035003662109375,
-0.002986907958984375,
0.027679443359375,
0.026885986328125,
0.0033283233642578125,
0.000885009765625,
-0.00194549560546875,
-0.026580810546875,
0.03900146484375,
-0.0239105224609375,
0.012664794921875,
-0.01373291015625,
-0.0311126708984375,
0.03125,
0.084228515625,
0.05450439453125,
-0.0120849609375,
0.007415771484375,
-0.0274200439453125,
-0.03375244140625,
-0.034271240234375,
0.049102783203125,
-0.01537322998046875,
-0.0233001708984375,
-0.010162353515625,
0.0149688720703125,
-0.00701904296875,
0.0261077880859375,
-0.0124969482421875,
-0.038360595703125,
0.023193359375,
-0.00252532958984375,
0.0027484893798828125,
-0.0205078125,
0.02392578125,
0.04168701171875,
-0.039215087890625,
-0.00719451904296875,
0.0261688232421875,
0.0109100341796875,
0.0134429931640625,
-0.04052734375,
-0.0023784637451171875,
0.00513458251953125,
-0.00037288665771484375,
-0.000008165836334228516,
0.009185791015625,
-0.05377197265625,
0.004207611083984375,
0.0186767578125,
-0.0219268798828125,
0.05059814453125,
0.0029449462890625,
0.007564544677734375,
0.0157470703125,
-0.024993896484375,
-0.0364990234375,
-0.028106689453125,
0.0850830078125,
-0.01210784912109375,
-0.07415771484375,
-0.07879638671875,
0.0030231475830078125,
-0.0465087890625,
0.0027751922607421875,
-0.084716796875,
0.036224365234375,
-0.008392333984375,
-0.029571533203125,
-0.01025390625,
-0.07037353515625,
0.0154571533203125,
-0.02667236328125,
-0.022857666015625,
0.016571044921875,
0.0304412841796875,
0.002960205078125,
-0.060333251953125,
-0.015289306640625,
-0.005649566650390625,
-0.0208892822265625,
0.0290679931640625,
0.0189666748046875,
-0.024932861328125,
0.03375244140625,
0.007350921630859375,
-0.032196044921875,
-0.033355712890625,
0.052886962890625,
-0.0404052734375,
-0.06500244140625,
0.044525146484375,
0.01910400390625,
0.09307861328125,
0.00579833984375,
0.0236358642578125,
0.028839111328125,
0.01087188720703125,
-0.00818634033203125,
-0.060028076171875,
0.0078582763671875,
-0.021240234375,
0.0352783203125,
-0.0272064208984375,
0.00931549072265625,
0.049652099609375,
-0.016693115234375,
-0.00011497735977172852,
-0.01383209228515625,
-0.0016574859619140625,
-0.07171630859375,
0.0022945404052734375,
-0.03033447265625,
0.05194091796875,
-0.03558349609375,
0.02935791015625,
0.0408935546875,
0.026214599609375,
-0.04779052734375,
-0.0035610198974609375,
-0.0217132568359375,
-0.0091552734375,
-0.012115478515625,
0.0004589557647705078,
-0.003597259521484375,
0.0006365776062011719,
0.033294677734375,
-0.01096343994140625,
0.0203094482421875,
0.046844482421875,
0.0556640625,
-0.03485107421875,
-0.005031585693359375,
-0.05047607421875,
0.0182952880859375,
-0.0120849609375,
-0.051300048828125,
0.04034423828125,
0.07769775390625,
0.030792236328125,
-0.027313232421875,
0.035797119140625,
0.01172637939453125,
-0.02789306640625,
-0.041107177734375,
0.041900634765625,
0.03240966796875,
0.042266845703125,
-0.01102447509765625,
-0.034271240234375,
0.042022705078125,
-0.053680419921875,
0.014251708984375,
-0.0308990478515625,
0.003940582275390625,
0.02874755859375,
-0.001247406005859375,
-0.0009150505065917969,
0.00981903076171875,
0.0014057159423828125,
0.01186370849609375,
0.0220184326171875,
0.054168701171875,
0.022247314453125,
-0.0027751922607421875,
0.0071868896484375,
0.00958251953125,
0.01297760009765625,
-0.05078125,
0.0000508427619934082,
0.00711822509765625,
0.020904541015625,
0.039093017578125,
0.047332763671875,
-0.028167724609375,
-0.016876220703125,
0.02410888671875,
0.0682373046875,
-0.01715087890625,
0.003597259521484375,
0.0238800048828125,
-0.0166168212890625,
-0.00525665283203125,
0.01885986328125,
-0.06256103515625,
-0.006679534912109375,
-0.024200439453125,
-0.00975799560546875,
-0.01116943359375,
-0.01580810546875,
0.031158447265625,
-0.05108642578125,
-0.0031185150146484375,
-0.006122589111328125,
0.0169830322265625,
-0.0053863525390625,
0.0168914794921875,
-0.00026297569274902344,
-0.013397216796875,
0.01561737060546875,
-0.01364898681640625,
-0.0279388427734375,
0.0030059814453125,
-0.08575439453125,
0.06964111328125,
-0.040924072265625,
0.0570068359375,
0.079833984375,
0.00586700439453125,
0.003498077392578125,
0.01555633544921875,
-0.00511932373046875,
-0.002368927001953125,
0.01287841796875,
0.00936126708984375,
0.016510009765625,
-0.07867431640625,
0.0186004638671875,
0.02081298828125,
-0.002857208251953125,
0.0231475830078125,
0.010009765625,
-0.00267791748046875,
0.037139892578125,
-0.00931549072265625,
0.02703857421875,
0.03662109375,
-0.0154876708984375,
-0.0304718017578125,
0.01416015625,
-0.0273590087890625,
-0.0078125,
0.0290069580078125,
-0.0158233642578125,
0.052093505859375,
-0.039459228515625,
-0.061279296875,
-0.020660400390625,
-0.07208251953125,
-0.011260986328125,
0.0009636878967285156,
-0.00623321533203125,
0.01129913330078125,
0.0465087890625,
0.0250244140625,
-0.029052734375,
0.0355224609375,
-0.01102447509765625,
-0.038055419921875,
0.016448974609375,
-0.0028839111328125,
0.0087127685546875,
-0.015472412109375,
0.004894256591796875,
0.04412841796875,
0.0084381103515625,
-0.0088958740234375,
-0.027496337890625,
-0.01195526123046875,
0.0297698974609375,
0.011138916015625,
0.0217742919921875,
0.021453857421875,
0.042694091796875,
0.0188446044921875,
-0.0187835693359375,
-0.018341064453125,
-0.022491455078125,
-0.0433349609375,
0.021728515625,
0.01218414306640625,
0.0015802383422851562,
-0.04827880859375,
0.0687255859375,
0.0287017822265625,
0.0113983154296875,
0.05242919921875,
-0.0233306884765625,
0.04736328125,
0.00909423828125,
0.022674560546875,
-0.052703857421875,
0.043701171875,
-0.0016269683837890625,
-0.0164642333984375,
0.007572174072265625,
0.025848388671875,
0.00772857666015625,
-0.01617431640625,
-0.048858642578125,
-0.032745361328125,
0.055694580078125,
-0.0267181396484375,
0.006237030029296875,
-0.0168914794921875,
-0.0288848876953125,
0.010467529296875,
0.0924072265625,
-0.0192718505859375,
-0.01291656494140625,
-0.039520263671875,
-0.016448974609375,
0.0089569091796875,
-0.026824951171875,
-0.00843048095703125,
-0.00955963134765625,
-0.051361083984375,
-0.00650787353515625,
-0.007778167724609375,
-0.00699615478515625,
-0.069091796875,
0.05908203125,
-0.05718994140625,
-0.0027790069580078125,
0.05072021484375,
-0.0036334991455078125,
-0.00833892822265625,
0.002979278564453125,
-0.00214385986328125,
-0.034912109375,
-0.06005859375,
0.007633209228515625,
-0.05096435546875,
-0.0180816650390625,
-0.002048492431640625,
0.04644775390625,
-0.0035190582275390625,
-0.00423431396484375,
-0.01953125,
0.04046630859375,
0.05987548828125,
0.00417327880859375,
0.01366424560546875,
-0.0677490234375,
0.0017833709716796875,
0.057220458984375,
0.0428466796875,
-0.01416778564453125,
-0.00640106201171875,
-0.00034499168395996094,
-0.013824462890625,
0.045562744140625,
-0.016754150390625,
-0.008331298828125,
0.006534576416015625,
-0.007656097412109375,
-0.048492431640625,
-0.055938720703125,
-0.00982666015625,
0.0110321044921875,
0.0159149169921875,
-0.010650634765625,
-0.06536865234375,
-0.05865478515625,
0.03289794921875,
0.050048828125,
-0.0182952880859375,
-0.0077667236328125,
0.03497314453125,
0.0211639404296875,
-0.03314208984375,
-0.028839111328125,
0.0146484375,
0.048736572265625,
-0.02728271484375,
0.016021728515625,
0.0092010498046875,
-0.03509521484375,
0.055084228515625,
-0.01328277587890625,
-0.026031494140625,
0.00823211669921875,
0.051971435546875,
0.0164031982421875,
-0.0088958740234375,
0.01018524169921875,
-0.02227783203125,
0.01078033447265625,
-0.01308441162109375,
0.01605224609375,
-0.01360321044921875,
0.05377197265625,
0.023773193359375,
-0.029754638671875,
0.0379638671875,
0.014007568359375,
0.0005345344543457031,
0.0015611648559570312,
0.051177978515625,
0.0498046875,
0.023681640625,
-0.01080322265625,
0.0202789306640625,
0.0005536079406738281,
0.007198333740234375,
-0.042877197265625,
-0.003665924072265625,
-0.033477783203125,
0.044830322265625,
-0.04937744140625,
-0.0036678314208984375,
-0.03558349609375,
-0.004791259765625,
0.045074462890625,
-0.00714111328125,
-0.045745849609375,
-0.01849365234375,
-0.0165863037109375,
-0.0279541015625,
-0.0003323554992675781,
0.01995849609375,
0.025360107421875,
0.0293731689453125,
0.01044464111328125,
0.01503753662109375,
0.0236968994140625,
0.024322509765625,
-0.02337646484375,
-0.01311492919921875,
-0.01387786865234375,
0.01192474365234375,
0.026092529296875,
0.0699462890625,
-0.04443359375,
0.0714111328125,
-0.0179595947265625,
0.034759521484375,
-0.0027675628662109375,
0.038726806640625,
0.0191802978515625,
0.0108489990234375,
0.0032100677490234375,
0.00817108154296875,
-0.01160430908203125,
-0.048492431640625,
-0.058135986328125,
0.017852783203125,
0.0278167724609375,
-0.0184478759765625,
-0.00196075439453125,
0.0253753662109375,
0.0163421630859375,
-0.048583984375,
0.0271148681640625,
0.035675048828125,
-0.032745361328125,
-0.01983642578125,
0.0201568603515625,
0.005611419677734375,
0.033477783203125,
0.004009246826171875,
-0.01361083984375,
0.006378173828125,
-0.0223541259765625,
0.0156402587890625,
-0.062347412109375,
-0.009307861328125,
0.00821685791015625,
-0.0081939697265625,
-0.0242462158203125,
-0.0193328857421875,
0.0032291412353515625,
-0.0182647705078125,
0.00611114501953125,
0.0117950439453125,
0.034210205078125,
-0.04248046875,
-0.0020008087158203125,
-0.0161590576171875,
0.0318603515625,
-0.0213623046875,
0.022186279296875,
0.037353515625,
0.02288818359375,
-0.040191650390625,
0.00885772705078125,
-0.07073974609375,
-0.028106689453125,
-0.09759521484375,
-0.0821533203125,
-0.060882568359375,
0.020904541015625,
0.00791168212890625,
0.033050537109375,
0.0024566650390625,
-0.022735595703125,
0.01377105712890625,
-0.006824493408203125,
-0.006015777587890625,
0.028564453125,
-0.010101318359375,
0.033843994140625,
0.026763916015625,
0.0421142578125,
0.0170745849609375,
0.01522064208984375,
0.0007977485656738281,
-0.042388916015625,
-0.0039520263671875,
-0.0411376953125,
-0.0226898193359375,
0.002166748046875,
0.00705718994140625,
0.0287933349609375,
0.0189971923828125,
-0.00881195068359375,
-0.028564453125,
-0.0057373046875,
0.0023670196533203125,
-0.039398193359375,
0.033721923828125,
0.0183868408203125,
0.00389862060546875,
-0.0384521484375,
0.01776123046875,
0.042755126953125,
0.0187530517578125,
0.027618408203125,
-0.033721923828125,
0.014923095703125,
0.001445770263671875,
-0.045166015625,
-0.020660400390625,
0.016876220703125,
0.03485107421875,
0.00690460205078125,
0.0472412109375,
0.01273345947265625,
0.016326904296875,
0.050567626953125,
-0.0024623870849609375,
0.018463134765625,
-0.0011997222900390625,
0.041107177734375,
-0.0021266937255859375,
0.0182952880859375,
0.037689208984375,
-0.019866943359375,
0.00711822509765625,
0.037445068359375,
0.041290283203125,
-0.05902099609375,
0.0035915374755859375,
0.0109100341796875,
-0.00551605224609375,
0.041259765625,
0.006725311279296875,
0.0012521743774414062,
-0.04364013671875,
0.00592041015625,
-0.040069580078125,
-0.03125,
-0.0192718505859375,
-0.032745361328125,
0.024383544921875,
-0.0408935546875,
0.06256103515625,
0.0034542083740234375,
-0.035064697265625,
-0.004772186279296875,
0.033447265625,
-0.023406982421875,
-0.01056671142578125,
0.02691650390625,
0.008575439453125,
-0.0211334228515625,
-0.066650390625,
0.00849151611328125,
-0.0220794677734375,
-0.0290069580078125,
0.031402587890625,
0.006130218505859375,
-0.0027294158935546875,
0.016510009765625,
-0.011474609375,
0.0013942718505859375,
0.000621795654296875,
-0.052581787109375,
-0.02435302734375,
-0.05615234375,
-0.01140594482421875,
0.01132965087890625,
-0.02471923828125,
0.0301666259765625,
-0.0017347335815429688,
-0.0596923828125,
-0.00722503662109375,
-0.007320404052734375,
0.0841064453125,
-0.0267791748046875,
-0.026763916015625,
0.029693603515625,
-0.0176239013671875,
-0.03143310546875,
-0.001987457275390625,
0.0288848876953125,
-0.027618408203125,
0.018646240234375,
-0.02020263671875,
-0.005527496337890625,
-0.01102447509765625,
-0.0242462158203125,
-0.07891845703125,
0.06011962890625,
0.006702423095703125,
0.019500732421875,
-0.00125885009765625,
0.028717041015625,
-0.033477783203125,
-0.0027484893798828125,
-0.044097900390625,
0.0229034423828125,
0.0018606185913085938,
0.044219970703125,
-0.0322265625,
-0.00971221923828125,
0.0169219970703125,
0.0059051513671875,
0.0662841796875,
0.01439666748046875,
0.0215301513671875,
-0.021209716796875,
0.0293426513671875,
0.0592041015625,
-0.013397216796875,
-0.01390838623046875,
0.0220184326171875,
0.06732177734375,
0.045654296875,
-0.059112548828125,
0.03814697265625,
-0.0164031982421875,
-0.006427764892578125,
0.03179931640625,
0.020782470703125,
0.0250701904296875,
0.0255584716796875,
0.003017425537109375,
-0.036712646484375,
0.006103515625,
0.040069580078125,
-0.044097900390625,
0.0183563232421875,
0.04736328125,
0.064453125,
-0.06494140625,
-0.033355712890625,
-0.030609130859375,
0.054412841796875,
0.0135955810546875,
0.06781005859375,
0.0419921875,
0.0259857177734375,
0.049224853515625,
-0.022674560546875,
0.033294677734375,
-0.0032806396484375,
-0.0273895263671875,
0.0198822021484375,
0.0158538818359375,
0.00734710693359375,
-0.033905029296875,
0.025390625,
0.052764892578125,
0.0281829833984375,
-0.040313720703125,
-0.026336669921875,
0.027252197265625,
-0.006435394287109375,
-0.0257568359375,
-0.02337646484375,
-0.0262908935546875,
-0.036834716796875,
0.004741668701171875,
-0.0277252197265625,
-0.036346435546875,
0.004444122314453125,
0.0450439453125,
0.006786346435546875,
0.00951385498046875,
-0.0196685791015625,
-0.05914306640625,
-0.025970458984375,
-0.032867431640625,
0.01983642578125,
0.01174163818359375,
0.038818359375,
0.0242462158203125,
0.046722412109375,
-0.00033545494079589844,
0.0204010009765625,
0.017578125,
-0.037841796875,
-0.0147247314453125,
-0.0286712646484375,
-0.0694580078125,
-0.030792236328125,
0.03564453125,
0.045013427734375,
-0.01800537109375,
0.007171630859375,
-0.0149383544921875,
-0.0166778564453125,
0.0136871337890625,
0.0321044921875,
-0.00676727294921875,
0.0106353759765625,
-0.0257110595703125,
0.005214691162109375,
0.0111083984375,
-0.011474609375,
-0.0177154541015625,
-0.00876617431640625,
0.05853271484375,
0.01514434814453125,
0.015960693359375,
0.01495361328125,
0.0006704330444335938,
0.009490966796875,
0.0018787384033203125,
-0.00440216064453125,
0.0352783203125,
-0.05731201171875,
-0.008880615234375,
-0.0265045166015625,
-0.017181396484375,
0.032623291015625,
0.03924560546875,
-0.0306396484375,
0.03515625,
-0.0124664306640625,
0.01383209228515625,
0.0030345916748046875,
-0.042510986328125,
0.0083770751953125,
0.0047760009765625,
0.005588531494140625,
0.01087188720703125,
-0.00917816162109375,
-0.006267547607421875,
0.03363037109375,
0.00545501708984375,
0.0164337158203125,
0.0112152099609375,
0.014617919921875,
0.005859375,
-0.0274810791015625,
0.040435791015625,
-0.043731689453125,
-0.0240325927734375,
-0.0046844482421875,
0.03466796875,
0.045013427734375,
-0.0110321044921875,
-0.0194549560546875,
0.045806884765625,
0.03424072265625,
0.002033233642578125,
0.0653076171875,
-0.0322265625,
-0.009674072265625,
-0.052459716796875,
0.0187835693359375,
-0.0341796875,
0.01554107666015625,
0.0019683837890625,
-0.028656005859375,
0.034759521484375,
-0.01448822021484375,
0.0092010498046875,
0.0168609619140625,
0.0616455078125,
0.038177490234375,
0.028350830078125,
0.050201416015625,
0.062347412109375,
0.0294952392578125,
-0.01194000244140625,
-0.00443267822265625,
0.0280914306640625,
-0.0113067626953125,
0.0183258056640625,
0.0164031982421875,
0.020599365234375,
0.042388916015625,
-0.03643798828125,
-0.02777099609375,
-0.016204833984375,
0.042694091796875,
-0.002521514892578125,
0.0107574462890625,
-0.050689697265625,
0.01715087890625,
-0.006908416748046875,
0.00738525390625,
-0.0237274169921875,
-0.01500701904296875,
-0.03143310546875,
-0.01087188720703125,
-0.0328369140625,
-0.07684326171875,
-0.054534912109375,
-0.01104736328125,
0.008758544921875,
0.0208740234375,
-0.0968017578125,
0.051055908203125,
0.02557373046875,
0.06939697265625,
-0.041412353515625,
-0.01041412353515625,
0.0104827880859375,
0.035858154296875,
-0.01995849609375,
-0.0545654296875,
-0.042999267578125,
0.046295166015625,
-0.053619384765625,
-0.004077911376953125,
0.033203125,
-0.019073486328125,
-0.057525634765625,
0.02862548828125,
0.015289306640625,
0.05712890625,
-0.01873779296875,
-0.0277557373046875,
-0.00106048583984375,
0.0187530517578125,
0.0015697479248046875,
-0.0733642578125,
-0.0006375312805175781,
-0.043426513671875,
0.004486083984375,
-0.00466156005859375,
-0.0062103271484375,
-0.0024890899658203125,
-0.01824951171875,
-0.0299224853515625,
0.0389404296875,
-0.0107574462890625,
-0.0268707275390625,
-0.045166015625,
-0.0024662017822265625,
0.0009298324584960938,
0.01280975341796875,
0.001953125,
-0.030975341796875,
-0.0255889892578125,
0.01531982421875,
0.004764556884765625,
0.029388427734375,
0.0081634521484375,
-0.01043701171875,
-0.01422119140625,
0.048309326171875,
0.060150146484375,
0.01336669921875,
0.00814056396484375,
-0.0020046234130859375,
0.010955810546875,
0.017303466796875,
-0.044281005859375,
0.0256805419921875,
0.0024662017822265625,
0.023284912109375,
-0.01018524169921875,
-0.01302337646484375,
-0.01409149169921875,
0.0102691650390625,
0.0225372314453125,
0.0509033203125,
0.005481719970703125,
-0.041473388671875,
0.00812530517578125,
0.01568603515625,
-0.0248870849609375,
-0.0225067138671875,
0.006771087646484375,
-0.0242767333984375,
-0.0218353271484375,
-0.0386962890625,
-0.0231475830078125,
-0.0106048583984375,
-0.038909912109375,
-0.07281494140625,
-0.0108489990234375,
-0.05157470703125,
0.055023193359375,
-0.06622314453125,
0.037567138671875,
0.019317626953125,
-0.03497314453125,
-0.0093994140625,
-0.0146331787109375,
-0.006954193115234375,
-0.0076904296875,
-0.05059814453125,
-0.044403076171875,
-0.0282135009765625,
0.0160064697265625,
0.03131103515625,
-0.01007080078125,
0.0189208984375,
-0.012054443359375,
0.0090789794921875,
-0.01168060302734375,
0.01291656494140625,
-0.0034999847412109375,
0.0002837181091308594,
-0.0011768341064453125,
0.0228271484375,
0.002429962158203125,
0.042816162109375,
0.0045318603515625,
0.017242431640625,
-0.007259368896484375,
0.0275726318359375,
0.00322723388671875,
-0.0105438232421875,
0.018463134765625,
-0.0214080810546875,
0.00029206275939941406,
0.0220794677734375,
-0.042083740234375,
-0.0101318359375,
-0.02740478515625,
0.0101470947265625,
-0.006504058837890625,
-0.0122528076171875
]
|
3d043dcc2442d7b88c66a6f832b26ea6476a0754 | Wordpress Stackexchange
Q: Disable the visibility options in WP Is there a way to disable the public vs private vs password-protected visibility UI when editing or quick-editing a post?
A quick scan in the code yields #visibility, which I could hide using jQuery, but I was wondering if there was a documented way to do this "properly".
A: Quick hack to get the job done, in case anyone else needs to do this:
add_action('add_meta_boxes', function() {
add_action('admin_head', function() {
echo <<<EOS
<style type="text/css">
#visibility {
display: none;
}
</style>
EOS;
});
});
add_action('restrict_manage_posts', function() {
echo <<<EOS
<script type="text/javascript">
jQuery(document).ready(function($) {
$("input[name='keep_private']").parents("div.inline-edit-group:first").hide();
});
</script>
EOS;
});
(Still curious to know if there's a better way.)
| Q: Disable the visibility options in WP Is there a way to disable the public vs private vs password-protected visibility UI when editing or quick-editing a post?
A quick scan in the code yields #visibility, which I could hide using jQuery, but I was wondering if there was a documented way to do this "properly".
A: Quick hack to get the job done, in case anyone else needs to do this:
add_action('add_meta_boxes', function() {
add_action('admin_head', function() {
echo <<<EOS
<style type="text/css">
#visibility {
display: none;
}
</style>
EOS;
});
});
add_action('restrict_manage_posts', function() {
echo <<<EOS
<script type="text/javascript">
jQuery(document).ready(function($) {
$("input[name='keep_private']").parents("div.inline-edit-group:first").hide();
});
</script>
EOS;
});
(Still curious to know if there's a better way.)
| wordpress | {
"language": "en",
"length": 113,
"provenance": "stackexchange_00019.jsonl.gz:439126",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/122996"
} | [
0.054412841796875,
-0.01605224609375,
0.019866943359375,
-0.01202392578125,
0.0019273757934570312,
-0.0347900390625,
0.039276123046875,
-0.0273895263671875,
-0.003086090087890625,
0.0278778076171875,
-0.00217437744140625,
-0.05426025390625,
-0.03070068359375,
-0.0270538330078125,
-0.045501708984375,
-0.0672607421875,
0.019775390625,
0.007427215576171875,
0.037506103515625,
-0.01020050048828125,
0.01010894775390625,
-0.00785064697265625,
0.041351318359375,
-0.0076904296875,
0.0304107666015625,
-0.0248565673828125,
0.051513671875,
-0.0504150390625,
0.04180908203125,
-0.0273284912109375,
0.0274505615234375,
-0.015625,
-0.0019893646240234375,
0.03326416015625,
0.0026226043701171875,
0.00960540771484375,
-0.03179931640625,
0.037200927734375,
0.0400390625,
-0.0164031982421875,
0.011138916015625,
-0.018096923828125,
-0.031280517578125,
-0.02001953125,
-0.0301666259765625,
-0.0184783935546875,
0.0235748291015625,
-0.00984954833984375,
0.0018768310546875,
0.0240020751953125,
0.01300811767578125,
0.016571044921875,
0.0084228515625,
-0.02667236328125,
-0.0035343170166015625,
-0.01070404052734375,
-0.0165863037109375,
0.00928497314453125,
0.04498291015625,
0.0222930908203125,
-0.036376953125,
-0.02557373046875,
0.003391265869140625,
-0.0726318359375,
-0.017669677734375,
-0.0180206298828125,
-0.0305633544921875,
0.01629638671875,
-0.05096435546875,
0.007289886474609375,
0.049102783203125,
-0.045654296875,
-0.0066375732421875,
-0.0462646484375,
0.009368896484375,
0.0345458984375,
-0.0151214599609375,
-0.01282501220703125,
0.01250457763671875,
0.0021076202392578125,
0.0243377685546875,
0.005298614501953125,
-0.037353515625,
0.034088134765625,
0.00077056884765625,
0.052734375,
-0.0158843994140625,
-0.034881591796875,
0.023895263671875,
0.00655364990234375,
-0.005077362060546875,
-0.01043701171875,
0.0038852691650390625,
0.076171875,
-0.005001068115234375,
0.01312255859375,
0.040130615234375,
0.01885986328125,
-0.01245880126953125,
-0.0304107666015625,
0.021636962890625,
-0.03558349609375,
-0.00664520263671875,
-0.0005269050598144531,
0.0007166862487792969,
0.061279296875,
0.0092315673828125,
0.047882080078125,
0.0278472900390625,
0.01343536376953125,
0.0182342529296875,
-0.053741455078125,
-0.0005192756652832031,
-0.0046234130859375,
0.005512237548828125,
0.0092926025390625,
-0.031951904296875,
0.0292816162109375,
-0.0156707763671875,
0.0227508544921875,
-0.006793975830078125,
0.005401611328125,
-0.010162353515625,
0.0059051513671875,
0.0122528076171875,
-0.00875091552734375,
-0.0225372314453125,
0.007396697998046875,
0.018402099609375,
-0.00939178466796875,
-0.060272216796875,
0.00557708740234375,
0.1064453125,
0.054290771484375,
0.052001953125,
-0.0159912109375,
-0.035125732421875,
-0.006931304931640625,
0.006072998046875,
-0.001003265380859375,
-0.0169525146484375,
-0.02301025390625,
0.04241943359375,
-0.01001739501953125,
-0.045684814453125,
0.049407958984375,
0.033477783203125,
-0.01102447509765625,
-0.037689208984375,
-0.061614990234375,
-0.037841796875,
-0.017669677734375,
0.0250091552734375,
0.0244140625,
0.0157928466796875,
0.016510009765625,
0.08648681640625,
-0.03155517578125,
-0.03887939453125,
-0.04229736328125,
0.034912109375,
0.0271453857421875,
0.0259857177734375,
0.0269317626953125,
0.002620697021484375,
-0.03472900390625,
-0.023193359375,
-0.00677490234375,
0.0257415771484375,
0.03887939453125,
0.0355224609375,
-0.0557861328125,
0.0070648193359375,
-0.00782012939453125,
-0.0253143310546875,
0.01171875,
0.0044403076171875,
-0.01593017578125,
0.02069091796875,
-0.0038394927978515625,
-0.0195159912109375,
-0.041656494140625,
0.0214385986328125,
0.0005698204040527344,
-0.06402587890625,
0.04412841796875,
0.0192108154296875,
0.047607421875,
-0.0091705322265625,
0.005573272705078125,
0.073486328125,
0.039794921875,
0.0199432373046875,
0.0204620361328125,
0.006694793701171875,
-0.044952392578125,
-0.03216552734375,
-0.01049041748046875,
-0.011871337890625,
-0.01053619384765625,
0.01702880859375,
0.0019292831420898438,
-0.04095458984375,
-0.005657196044921875,
-0.07318115234375,
-0.044525146484375,
-0.01183319091796875,
0.0146331787109375,
-0.0487060546875,
-0.036407470703125,
0.037628173828125,
-0.034332275390625,
-0.015716552734375,
-0.0016527175903320312,
-0.0265045166015625,
-0.01436614990234375,
-0.0212554931640625,
0.05426025390625,
0.00580596923828125,
0.0419921875,
0.024658203125,
-0.045440673828125,
0.026824951171875,
-0.0027923583984375,
0.038848876953125,
-0.0084075927734375,
-0.0031299591064453125,
-0.0042877197265625,
0.06085205078125,
-0.027587890625,
0.0693359375,
0.017364501953125,
0.0007567405700683594,
0.0231475830078125,
-0.014617919921875,
-0.0009975433349609375,
0.0003685951232910156,
-0.07171630859375,
-0.0009207725524902344,
0.04949951171875,
0.04083251953125,
0.0233306884765625,
-0.01361846923828125,
0.00782012939453125,
0.0634765625,
-0.00939178466796875,
0.00827789306640625,
-0.004230499267578125,
-0.0212860107421875,
-0.029083251953125,
0.0045166015625,
0.0091705322265625,
0.032806396484375,
-0.01323699951171875,
0.0174560546875,
0.033111572265625,
-0.02716064453125,
0.026947021484375,
0.02197265625,
-0.019378662109375,
-0.000013232231140136719,
-0.016143798828125,
0.0208740234375,
-0.02203369140625,
0.00968170166015625,
-0.016876220703125,
0.0007843971252441406,
-0.000217437744140625,
-0.00545501708984375,
-0.00980377197265625,
0.021453857421875,
-0.027801513671875,
-0.0007348060607910156,
-0.0022945404052734375,
0.040130615234375,
-0.0148468017578125,
-0.031646728515625,
-0.01389312744140625,
0.0249176025390625,
-0.0028820037841796875,
-0.0157318115234375,
-0.0115203857421875,
-0.06878662109375,
-0.00502777099609375,
0.03448486328125,
-0.0164031982421875,
-0.004451751708984375,
-0.0055084228515625,
0.0003902912139892578,
-0.009490966796875,
0.01561737060546875,
0.003910064697265625,
-0.014404296875,
0.0182037353515625,
0.0286865234375,
-0.031768798828125,
0.00011998414993286133,
-0.09466552734375,
0.06280517578125,
-0.063720703125,
0.08636474609375,
0.0845947265625,
-0.0173187255859375,
0.0300140380859375,
0.016632080078125,
-0.018096923828125,
0.0137481689453125,
0.025115966796875,
0.01303863525390625,
0.03009033203125,
-0.0712890625,
0.03466796875,
-0.01177215576171875,
-0.031494140625,
-0.0139923095703125,
-0.05047607421875,
0.0021877288818359375,
-0.0224609375,
-0.02734375,
0.061126708984375,
-0.04443359375,
-0.11956787109375,
-0.01154327392578125,
0.0161285400390625,
-0.07342529296875,
0.0188140869140625,
0.05938720703125,
0.0297088623046875,
-0.029510498046875,
-0.0232696533203125,
-0.0247955322265625,
-0.027496337890625,
-0.025726318359375,
0.029510498046875,
-0.0016775131225585938,
0.011627197265625,
0.0169525146484375,
0.077880859375,
0.0296173095703125,
-0.04217529296875,
0.016845703125,
-0.035858154296875,
-0.036407470703125,
0.029998779296875,
0.008270263671875,
-0.02838134765625,
-0.0246124267578125,
0.011932373046875,
-0.054901123046875,
-0.027374267578125,
0.0260162353515625,
-0.0225372314453125,
0.004871368408203125,
-0.0173492431640625,
0.01708984375,
0.0528564453125,
-0.0204620361328125,
-0.0156707763671875,
0.03509521484375,
-0.046661376953125,
-0.0241851806640625,
-0.0085906982421875,
-0.033477783203125,
-0.0259552001953125,
0.0250244140625,
-0.001972198486328125,
-0.042816162109375,
0.01212310791015625,
0.01496124267578125,
0.015289306640625,
-0.0171051025390625,
-0.0042724609375,
0.015350341796875,
0.00902557373046875,
0.03106689453125,
-0.005290985107421875,
0.003139495849609375,
-0.0279388427734375,
0.03515625,
-0.00511932373046875,
-0.01120758056640625,
-0.022003173828125,
0.0225067138671875,
0.0010528564453125,
-0.0090484619140625,
0.0258331298828125,
-0.03271484375,
-0.0121002197265625,
-0.022064208984375,
-0.004825592041015625,
-0.025543212890625,
0.023681640625,
-0.0233154296875,
-0.0009694099426269531,
-0.003993988037109375,
0.0047760009765625,
-0.03924560546875,
-0.024139404296875,
-0.04583740234375,
-0.0022487640380859375,
-0.1055908203125,
0.0286102294921875,
-0.0017452239990234375,
-0.033660888671875,
-0.02337646484375,
-0.06243896484375,
-0.07562255859375,
-0.043243408203125,
0.036895751953125,
-0.005580902099609375,
0.013763427734375,
-0.0010576248168945312,
0.0200653076171875,
-0.0214996337890625,
-0.0323486328125,
-0.0149078369140625,
-0.06805419921875,
-0.01023101806640625,
-0.028564453125,
0.059600830078125,
0.02313232421875,
-0.002178192138671875,
0.0065460205078125,
0.0496826171875,
0.013427734375,
0.0164794921875,
0.00014960765838623047,
0.00571441650390625,
-0.002227783203125,
-0.00669097900390625,
-0.004180908203125,
-0.01812744140625,
0.00012183189392089844,
-0.02294921875,
-0.08819580078125,
-0.055908203125,
-0.0241851806640625,
-0.0181884765625,
0.032684326171875,
-0.05438232421875,
-0.0467529296875,
-0.039947509765625,
-0.05767822265625,
-0.00017118453979492188,
-0.045928955078125,
-0.005290985107421875,
-0.026611328125,
-0.07122802734375,
0.0093536376953125,
-0.014068603515625,
-0.018707275390625,
-0.0006413459777832031,
0.0394287109375,
0.0175018310546875,
-0.004817962646484375,
0.00850677490234375,
-0.01983642578125,
0.01557159423828125,
0.02386474609375,
0.007678985595703125,
0.0018711090087890625,
0.004039764404296875,
0.00453948974609375,
-0.00389862060546875,
-0.002986907958984375,
-0.0295257568359375,
0.05859375,
-0.0273284912109375,
-0.034515380859375,
0.024566650390625,
-0.041015625,
0.0219573974609375,
0.018646240234375,
0.004871368408203125,
0.01103973388671875,
-0.0200958251953125,
0.01496124267578125,
-0.0019664764404296875,
-0.0294647216796875,
-0.0352783203125,
0.0250091552734375,
-0.0152740478515625,
-0.01091766357421875,
0.05010986328125,
0.0384521484375,
-0.0004360675811767578,
-0.008209228515625,
0.0121002197265625,
-0.0243682861328125,
-0.008758544921875,
0.0247955322265625,
-0.0193939208984375,
0.007495880126953125,
0.0029048919677734375,
-0.035064697265625,
-0.0255889892578125,
-0.0196990966796875,
0.0738525390625,
0.00394439697265625,
-0.06634521484375,
0.0196075439453125,
-0.01129150390625,
0.05523681640625,
0.0086669921875,
-0.003070831298828125,
0.0211029052734375,
0.002803802490234375,
-0.0078582763671875,
0.026824951171875,
0.0223846435546875,
-0.0222320556640625,
-0.01093292236328125,
0.0247039794921875,
0.00623321533203125,
0.0001010894775390625,
0.0204925537109375,
0.0298004150390625,
-0.0011119842529296875,
0.01255035400390625,
-0.012939453125,
0.0187530517578125,
0.0035152435302734375,
-0.018768310546875,
-0.01210784912109375,
0.056427001953125,
0.037078857421875,
-0.0556640625,
0.054931640625,
-0.044525146484375,
-0.037628173828125,
0.02850341796875,
0.0243682861328125,
0.0233306884765625,
0.0079193115234375,
0.00569915771484375,
0.035858154296875,
-0.036956787109375,
0.013885498046875,
0.05120849609375,
-0.031951904296875,
-0.005664825439453125,
0.0123138427734375,
-0.00669097900390625,
0.0184326171875,
0.00711822509765625,
-0.007602691650390625,
-0.01116180419921875,
-0.029327392578125,
0.012664794921875,
-0.051025390625,
-0.0188140869140625,
0.01319122314453125,
-0.0281219482421875,
-0.013427734375,
0.00323486328125,
-0.0261993408203125,
-0.023101806640625,
0.00406646728515625,
-0.0002079010009765625,
0.005023956298828125,
-0.001651763916015625,
0.0023403167724609375,
0.01395416259765625,
-0.0202484130859375,
0.050048828125,
0.0087890625,
0.025665283203125,
-0.012664794921875,
-0.004302978515625,
-0.0083465576171875,
-0.07366943359375,
-0.0258331298828125,
-0.03619384765625,
-0.0244293212890625,
-0.034576416015625,
0.00966644287109375,
0.0131683349609375,
0.003814697265625,
-0.0037021636962890625,
-0.040679931640625,
-0.020721435546875,
0.0241851806640625,
0.038360595703125,
0.0261077880859375,
-0.003261566162109375,
0.051025390625,
-0.0355224609375,
0.050567626953125,
-0.00727081298828125,
0.0238037109375,
-0.0204010009765625,
-0.0188140869140625,
0.031494140625,
-0.049163818359375,
-0.06854248046875,
-0.007366180419921875,
-0.03802490234375,
0.00423431396484375,
0.006988525390625,
-0.0312042236328125,
0.0260467529296875,
-0.00698089599609375,
0.005126953125,
-0.024139404296875,
0.0077056884765625,
-0.0567626953125,
0.03204345703125,
-0.019134521484375,
-0.0081024169921875,
0.0305633544921875,
-0.00445556640625,
-0.06390380859375,
0.061614990234375,
0.00473785400390625,
0.05047607421875,
0.0003380775451660156,
-0.041290283203125,
0.0190887451171875,
0.06414794921875,
0.0032291412353515625,
0.052947998046875,
-0.0015268325805664062,
0.0282440185546875,
0.072998046875,
-0.006710052490234375,
-0.08135986328125,
0.02484130859375,
0.01788330078125,
0.0078277587890625,
-0.00913238525390625,
0.0189361572265625,
-0.007476806640625,
0.021209716796875,
0.07427978515625,
0.06805419921875,
-0.1051025390625,
0.01230621337890625,
0.0270233154296875,
-0.025177001953125,
0.022491455078125,
0.01000213623046875,
-0.00841522216796875,
0.00045037269592285156,
0.0233001708984375,
-0.041412353515625,
-0.0302886962890625,
0.01007080078125,
0.0007114410400390625,
-0.0184326171875,
-0.0252532958984375,
0.001903533935546875,
0.001918792724609375,
-0.02056884765625,
0.0155029296875,
0.0214996337890625,
0.00879669189453125,
-0.0198211669921875,
-0.041351318359375,
-0.0031642913818359375,
-0.06103515625,
-0.129638671875,
-0.0697021484375,
-0.0382080078125,
-0.015716552734375,
0.06829833984375,
-0.01329803466796875,
-0.00635528564453125,
0.044677734375,
-0.0372314453125,
0.052337646484375,
-0.01445770263671875,
-0.033050537109375,
0.0253448486328125,
0.012237548828125,
0.007015228271484375,
0.02386474609375,
-0.048309326171875,
-0.00815582275390625,
-0.0243377685546875,
0.0406494140625,
-0.0065155029296875,
-0.0081329345703125,
0.047821044921875,
-0.01354217529296875,
-0.0290985107421875,
0.0265960693359375,
0.01486968994140625,
-0.019073486328125,
-0.0088043212890625,
-0.0006957054138183594,
-0.04205322265625,
-0.0014734268188476562,
-0.0155487060546875,
-0.029876708984375,
0.00885009765625,
-0.028350830078125,
-0.0460205078125,
0.0999755859375,
-0.03387451171875,
0.01531219482421875,
0.01043701171875,
0.0305938720703125,
-0.0226287841796875,
0.0260772705078125,
0.00023436546325683594,
0.0247955322265625,
-0.01324462890625,
0.0268707275390625,
-0.0014505386352539062,
0.0003254413604736328,
0.0184326171875,
0.031524658203125,
0.0282440185546875,
0.0147857666015625,
-0.01230621337890625,
-0.030242919921875,
-0.0033740997314453125,
0.0523681640625,
-0.00688934326171875,
0.01358795166015625,
0.0143585205078125,
0.033203125,
0.027496337890625,
-0.0693359375,
0.0111083984375,
-0.056060791015625,
0.0204620361328125,
0.024871826171875,
0.0146484375,
0.0182647705078125,
0.016632080078125,
0.034759521484375,
-0.02203369140625,
0.006954193115234375,
0.00853729248046875,
0.0243682861328125,
-0.007328033447265625,
0.0213470458984375,
0.009796142578125,
-0.06292724609375,
-0.048004150390625,
-0.0164031982421875,
0.031036376953125,
0.0242462158203125,
0.012481689453125,
0.0254058837890625,
0.016082763671875,
-0.04217529296875,
0.017730712890625,
0.01812744140625,
0.02001953125,
-0.0304107666015625,
0.0247344970703125,
0.01038360595703125,
0.028076171875,
-0.062225341796875,
-0.0073394775390625,
0.0222930908203125,
0.051788330078125,
-0.028839111328125,
-0.0261993408203125,
0.01271820068359375,
-0.00022411346435546875,
0.01378631591796875,
-0.02801513671875,
0.021942138671875,
0.021820068359375,
0.03125,
0.00777435302734375,
0.0094146728515625,
0.03851318359375,
-0.0032176971435546875,
0.0141143798828125,
0.01031494140625,
-0.02239990234375,
0.02008056640625,
-0.01497650146484375,
-0.0723876953125,
0.0186614990234375,
0.049224853515625,
0.056304931640625,
-0.005001068115234375,
0.023590087890625,
-0.03204345703125,
-0.04071044921875,
-0.0185394287109375,
0.0057525634765625,
0.05108642578125,
-0.07537841796875,
0.02435302734375,
0.026702880859375,
0.050537109375,
0.0160064697265625,
0.08251953125,
0.08282470703125,
0.0212554931640625,
-0.038330078125,
0.0136260986328125,
0.0157470703125,
-0.0307464599609375,
-0.0019092559814453125,
0.0038051605224609375,
0.01100921630859375,
0.0235137939453125,
-0.00461578369140625,
-0.040374755859375,
0.061737060546875,
0.03436279296875,
0.0036258697509765625,
0.00634002685546875,
0.0024166107177734375,
-0.00870513916015625,
0.065673828125,
-0.003322601318359375,
0.0164794921875,
0.00701904296875,
-0.0103607177734375,
0.00899505615234375,
-0.0170745849609375,
-0.06610107421875,
0.01142120361328125,
0.0268707275390625,
-0.006885528564453125,
0.01427459716796875,
0.01654052734375,
0.01552581787109375,
-0.024810791015625,
-0.038848876953125,
0.056915283203125,
0.0124359130859375,
-0.00577545166015625,
0.039642333984375,
-0.057220458984375,
-0.034515380859375,
-0.060943603515625,
0.06207275390625,
0.029022216796875,
0.07232666015625,
-0.015228271484375,
0.048065185546875,
-0.0203704833984375,
0.0005931854248046875,
-0.03839111328125,
-0.0287628173828125,
-0.0075225830078125,
-0.0214385986328125,
-0.0014276504516601562,
0.0210418701171875,
-0.00023484230041503906,
0.051025390625,
-0.0159759521484375,
-0.020660400390625,
0.0291748046875,
-0.0377197265625,
0.00479888916015625,
0.005611419677734375,
-0.0033283233642578125,
-0.0316162109375,
-0.0185089111328125,
-0.0230255126953125,
-0.00379180908203125,
0.006069183349609375,
-0.007694244384765625,
-0.025604248046875,
0.005069732666015625,
0.0019741058349609375,
-0.032501220703125,
0.0030002593994140625,
-0.0018491744995117188,
-0.001800537109375,
0.03314208984375,
-0.0187835693359375,
-0.0033931732177734375,
-0.0008130073547363281,
-0.00498199462890625,
0.005054473876953125,
0.0290374755859375,
-0.042022705078125,
0.028076171875,
-0.0172271728515625,
-0.03765869140625,
0.01529693603515625,
0.01412200927734375,
-0.040191650390625,
0.004955291748046875,
0.022369384765625,
-0.0236053466796875,
-0.01232147216796875,
0.039093017578125,
-0.0091094970703125,
-0.01000213623046875,
-0.024658203125,
0.0113677978515625,
-0.0128936767578125,
-0.04754638671875,
-0.04840087890625,
-0.0265960693359375,
0.00350189208984375,
0.0102386474609375,
-0.049560546875,
-0.0004730224609375,
0.01222991943359375,
0.029449462890625,
-0.033782958984375,
0.037353515625,
-0.008209228515625,
0.01346588134765625,
-0.0052947998046875,
0.0016384124755859375,
0.00070953369140625,
0.03082275390625,
0.025360107421875,
0.029937744140625,
0.04107666015625,
-0.007312774658203125,
0.0241851806640625,
-0.0015850067138671875,
0.003482818603515625,
0.051177978515625,
-0.02764892578125,
-0.0413818359375,
-0.04046630859375,
0.027313232421875,
0.0333251953125,
-0.0181884765625,
-0.01342010498046875,
0.0019207000732421875,
-0.0200958251953125,
-0.022735595703125,
-0.02227783203125,
-0.0143280029296875,
-0.05633544921875,
-0.08056640625,
0.053955078125,
0.0017213821411132812,
-0.03143310546875,
0.0162353515625,
-0.01450347900390625,
-0.031646728515625,
0.048675537109375,
0.0279083251953125,
-0.0574951171875,
-0.003887176513671875,
-0.0025730133056640625,
0.007198333740234375,
0.038055419921875,
0.0136260986328125,
0.02069091796875,
0.0228118896484375,
0.0266571044921875,
0.006191253662109375,
-0.032562255859375,
-0.061309814453125,
0.0270843505859375,
-0.012542724609375,
0.017547607421875,
-0.0194244384765625,
0.013916015625,
0.0285491943359375,
0.039581298828125,
-0.011383056640625,
-0.043731689453125,
-0.02349853515625,
-0.020263671875,
0.0499267578125,
0.0244293212890625,
0.010101318359375,
-0.0247039794921875,
0.003002166748046875,
-0.03912353515625,
-0.0133514404296875,
-0.012359619140625,
0.0046539306640625,
-0.05389404296875,
0.005126953125,
0.023101806640625,
0.020477294921875,
0.02044677734375,
-0.036285400390625,
0.00696563720703125,
-0.0233154296875,
-0.005550384521484375,
-0.013641357421875,
-0.0221710205078125,
0.0204620361328125,
0.00777435302734375,
-0.03546142578125,
-0.0163726806640625,
-0.004558563232421875,
-0.01097869873046875,
-0.006702423095703125,
-0.0034637451171875,
-0.04522705078125,
-0.0273590087890625,
-0.0022373199462890625,
0.051300048828125,
-0.037109375,
0.04278564453125,
-0.056488037109375,
0.02203369140625,
-0.0230865478515625,
0.0184173583984375,
0.0105438232421875,
0.01233673095703125,
-0.04443359375,
0.03564453125,
0.032196044921875,
0.0160369873046875,
-0.07000732421875,
0.047149658203125,
-0.03692626953125,
0.0096435546875,
-0.005634307861328125,
0.041961669921875,
0.061248779296875,
0.021148681640625,
0.00458526611328125,
0.01519012451171875,
0.0012521743774414062,
-0.0205078125,
0.0177459716796875,
-0.053863525390625,
0.0002892017364501953,
0.006927490234375
]
|
55d79c02af797cc6d571f6ab8773b0b4e34af5c3 | Wordpress Stackexchange
Q: bloginfo() vs get_option? What's the difference between:
bloginfo('name');
vs
get_option('blogname');
The parameter is just an example, but I see no differences in terms displaying what I want.
Are there any particular differences? Or are they just for semantic reasons.
Thanks in advance.
A: The two functions output exactly the same thing.
From the Codex entry for get_bloginfo():
'name' - Returns the "Site Title" set in Settings > General. This data is retrieved from the "blogname" record in the wp_options table.
From source:
case 'name':
default:
$output = get_option('blogname');
Neither get_bloginfo() nor bloginfo() do any sort of sanitization or escaping; so both get_bloginfo( 'name' ) and get_option( 'blogname' ) return exactly the same value.
| Q: bloginfo() vs get_option? What's the difference between:
bloginfo('name');
vs
get_option('blogname');
The parameter is just an example, but I see no differences in terms displaying what I want.
Are there any particular differences? Or are they just for semantic reasons.
Thanks in advance.
A: The two functions output exactly the same thing.
From the Codex entry for get_bloginfo():
'name' - Returns the "Site Title" set in Settings > General. This data is retrieved from the "blogname" record in the wp_options table.
From source:
case 'name':
default:
$output = get_option('blogname');
Neither get_bloginfo() nor bloginfo() do any sort of sanitization or escaping; so both get_bloginfo( 'name' ) and get_option( 'blogname' ) return exactly the same value.
A: First of all, bloginfo will output value ;) If you want to get the value, you should use get_bloginfo.
get_bloginfo takes one param from predefined set (You can find all possible values here: http://codex.wordpress.org/Function_Reference/bloginfo). Only part of these values are values of options (in such case bloginfo returns value of that option).
Returns information about your site which can then be used elsewhere
in your PHP code. This function, as well as bloginfo(), can also be
used to display your site information anywhere within a template file.
On the other hand, get_option can be used to retrieve value of any option stored in options table.
A safe way of getting values for a named option from the options
database table. If the desired option does not exist, or no value is
associated with it, FALSE will be returned.
A: bloginfo
Displays information about your site, mostly gathered from the information you supply in your User Profile and General Settings WordPress Administration Screens. It can be used anywhere within a template file. This always prints a result to the browser. If you need the values for use in PHP, use
get_bloginfo().
Where as get_option() is far different from that, you can get any option from the options.php the link for the options.php is http:yoursite/wp-admin/options.php this display all the fields. you can get the value from
$field_val = get_option('name_of_field');. For more about get_option refer codex get_option
| wordpress | {
"language": "en",
"length": 349,
"provenance": "stackexchange_00019.jsonl.gz:439132",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123015"
} | [
0.01081085205078125,
-0.046051025390625,
0.0013408660888671875,
-0.004810333251953125,
-0.025604248046875,
-0.0164947509765625,
0.04425048828125,
0.0187530517578125,
-0.0119781494140625,
0.0030689239501953125,
-0.05902099609375,
0.0218505859375,
-0.0217742919921875,
-0.008697509765625,
0.0161285400390625,
-0.0555419921875,
0.060546875,
-0.039947509765625,
0.034637451171875,
-0.006793975830078125,
0.0163726806640625,
0.0203399658203125,
0.0227203369140625,
0.055999755859375,
0.056854248046875,
-0.12335205078125,
0.05291748046875,
0.01129150390625,
0.04443359375,
0.0030612945556640625,
0.02789306640625,
-0.0244903564453125,
0.0092010498046875,
0.037353515625,
-0.0300750732421875,
-0.00566864013671875,
0.010986328125,
0.0155181884765625,
-0.0017223358154296875,
0.03948974609375,
0.0031337738037109375,
0.0032501220703125,
-0.01824951171875,
-0.01474761962890625,
-0.00881195068359375,
-0.035736083984375,
0.01007080078125,
-0.0330810546875,
0.0007734298706054688,
-0.0102996826171875,
0.0321044921875,
0.006801605224609375,
0.033935546875,
0.0230865478515625,
-0.0283660888671875,
-0.02978515625,
0.00420379638671875,
0.05596923828125,
0.0088653564453125,
-0.053619384765625,
-0.039215087890625,
0.042633056640625,
0.02178955078125,
0.0298614501953125,
0.0081939697265625,
0.00672149658203125,
0.048095703125,
0.03338623046875,
-0.048370361328125,
0.00400543212890625,
0.0251007080078125,
-0.0276031494140625,
0.01125335693359375,
-0.01064300537109375,
-0.02117919921875,
-0.0266876220703125,
0.02239990234375,
-0.0303192138671875,
0.01442718505859375,
-0.015472412109375,
-0.01537322998046875,
-0.0221099853515625,
-0.081787109375,
0.0046234130859375,
0.03216552734375,
0.040374755859375,
-0.01041412353515625,
-0.016693115234375,
-0.00917816162109375,
-0.03485107421875,
-0.007625579833984375,
-0.03961181640625,
-0.048370361328125,
0.033966064453125,
0.004695892333984375,
-0.0207366943359375,
-0.002105712890625,
0.042144775390625,
-0.0411376953125,
-0.001255035400390625,
-0.034210205078125,
-0.0030193328857421875,
-0.01468658447265625,
-0.0269622802734375,
0.00006848573684692383,
0.0198974609375,
0.0229034423828125,
0.057373046875,
0.0295257568359375,
0.00007385015487670898,
-0.0193939208984375,
0.0053558349609375,
-0.0268707275390625,
-0.09161376953125,
0.03839111328125,
0.016937255859375,
-0.0487060546875,
0.054046630859375,
0.040924072265625,
-0.016082763671875,
0.0211334228515625,
0.043487548828125,
-0.01003265380859375,
-0.0128326416015625,
-0.0205535888671875,
0.00856781005859375,
0.020355224609375,
-0.0474853515625,
-0.04840087890625,
0.0384521484375,
-0.01103973388671875,
0.0090484619140625,
0.0252838134765625,
-0.002361297607421875,
-0.01464080810546875,
-0.030853271484375,
-0.05975341796875,
0.0196533203125,
0.00470733642578125,
-0.0111846923828125,
0.03143310546875,
-0.04034423828125,
0.00795745849609375,
0.033050537109375,
-0.007720947265625,
-0.0014801025390625,
0.042144775390625,
0.0263519287109375,
-0.0051727294921875,
-0.031646728515625,
-0.01026153564453125,
0.055267333984375,
0.0137939453125,
-0.00902557373046875,
0.0003254413604736328,
-0.05584716796875,
-0.0247039794921875,
-0.047760009765625,
0.05987548828125,
-0.01309967041015625,
-0.00856781005859375,
-0.00853729248046875,
-0.01432037353515625,
-0.0138092041015625,
-0.044830322265625,
0.01605224609375,
0.01343536376953125,
-0.0114898681640625,
0.0166015625,
-0.0296173095703125,
0.05035400390625,
-0.002719879150390625,
0.003612518310546875,
-0.00792694091796875,
0.00630950927734375,
-0.0005974769592285156,
-0.049835205078125,
0.006473541259765625,
0.015289306640625,
-0.0152130126953125,
-0.010101318359375,
-0.019744873046875,
0.01409912109375,
0.017303466796875,
-0.07562255859375,
0.02325439453125,
0.0157318115234375,
0.04840087890625,
0.0242462158203125,
0.0139007568359375,
0.051025390625,
0.01244354248046875,
-0.03790283203125,
0.0186309814453125,
0.0144500732421875,
-0.021026611328125,
0.00884246826171875,
0.0015783309936523438,
0.01153564453125,
-0.0290069580078125,
-0.0235748291015625,
0.041748046875,
-0.0119171142578125,
0.01073455810546875,
-0.052734375,
0.019012451171875,
-0.0232391357421875,
0.05670166015625,
-0.0015697479248046875,
0.033538818359375,
0.01438140869140625,
0.01214599609375,
-0.03765869140625,
0.032928466796875,
-0.0024566650390625,
0.01326751708984375,
-0.03997802734375,
0.01383209228515625,
0.00669097900390625,
0.0125885009765625,
-0.006168365478515625,
-0.00333404541015625,
-0.01282501220703125,
0.0014085769653320312,
0.05517578125,
-0.0198516845703125,
-0.0003790855407714844,
-0.037200927734375,
0.052276611328125,
-0.0087432861328125,
-0.0036792755126953125,
0.037109375,
0.011688232421875,
0.04901123046875,
0.0067901611328125,
-0.024505615234375,
0.006397247314453125,
-0.0867919921875,
0.045806884765625,
0.05657958984375,
0.00867462158203125,
0.025299072265625,
-0.0211181640625,
0.010498046875,
0.039581298828125,
0.01593017578125,
0.0279541015625,
0.006908416748046875,
0.044342041015625,
0.07122802734375,
-0.008087158203125,
-0.0265655517578125,
0.005695343017578125,
-0.01464080810546875,
-0.004970550537109375,
0.0288238525390625,
-0.03497314453125,
-0.0121917724609375,
-0.0010480880737304688,
0.030426025390625,
-0.0286407470703125,
-0.0110626220703125,
0.032470703125,
-0.0300445556640625,
-0.0038928985595703125,
-0.0000027418136596679688,
-0.035430908203125,
-0.0234222412109375,
-0.06304931640625,
0.036407470703125,
0.052337646484375,
0.0169219970703125,
0.0177459716796875,
0.08270263671875,
0.018341064453125,
-0.016357421875,
0.020172119140625,
-0.047760009765625,
-0.03204345703125,
0.00908660888671875,
-0.0093231201171875,
-0.0163726806640625,
-0.03289794921875,
-0.0087127685546875,
0.047943115234375,
-0.033050537109375,
0.007305145263671875,
0.01346588134765625,
-0.0222930908203125,
0.00586700439453125,
0.0252227783203125,
0.019805908203125,
-0.0118408203125,
0.0164337158203125,
-0.0267333984375,
-0.0150146484375,
0.01300811767578125,
-0.0338134765625,
0.00402069091796875,
-0.0153350830078125,
0.071533203125,
0.06036376953125,
0.00463104248046875,
-0.007843017578125,
0.0008907318115234375,
-0.0169677734375,
-0.0229644775390625,
-0.004302978515625,
-0.0214996337890625,
0.0189208984375,
-0.07220458984375,
0.06658935546875,
0.0032596588134765625,
0.017578125,
0.0005993843078613281,
-0.0225372314453125,
-0.0240936279296875,
-0.00482940673828125,
-0.047607421875,
-0.0167236328125,
-0.045196533203125,
-0.06298828125,
0.0209808349609375,
-0.031280517578125,
-0.01036834716796875,
0.0124359130859375,
-0.041046142578125,
0.02532958984375,
0.051605224609375,
-0.04180908203125,
-0.066162109375,
-0.0574951171875,
-0.07159423828125,
-0.02490234375,
-0.0050201416015625,
-0.0011243820190429688,
-0.00286102294921875,
0.0233917236328125,
-0.00013256072998046875,
-0.03863525390625,
0.01457977294921875,
0.00313568115234375,
0.01236724853515625,
0.022613525390625,
0.0013494491577148438,
-0.0158233642578125,
-0.01251983642578125,
0.0016117095947265625,
0.00855255126953125,
0.018096923828125,
-0.0251007080078125,
0.0017375946044921875,
0.0112152099609375,
0.01096343994140625,
0.03131103515625,
0.01000213623046875,
-0.021636962890625,
0.04107666015625,
0.043121337890625,
-0.03155517578125,
-0.019378662109375,
-0.034454345703125,
-0.0265350341796875,
0.07562255859375,
0.033599853515625,
0.003192901611328125,
-0.01166534423828125,
0.03741455078125,
-0.0171966552734375,
-0.01020050048828125,
-0.0189666748046875,
-0.0169677734375,
0.02349853515625,
-0.01136016845703125,
0.0006456375122070312,
0.0204925537109375,
0.00021183490753173828,
-0.033966064453125,
-0.00921630859375,
-0.019195556640625,
-0.00205230712890625,
0.004734039306640625,
-0.032989501953125,
-0.01287078857421875,
-0.08111572265625,
0.0186920166015625,
-0.08563232421875,
-0.03814697265625,
-0.014984130859375,
0.0038166046142578125,
0.029327392578125,
0.07269287109375,
0.01303863525390625,
-0.01165771484375,
-0.01425933837890625,
0.00421905517578125,
-0.035552978515625,
-0.0335693359375,
-0.01177978515625,
0.0038166046142578125,
-0.07708740234375,
0.004364013671875,
0.009307861328125,
-0.0297393798828125,
-0.028228759765625,
0.015899658203125,
-0.06939697265625,
-0.0203857421875,
0.0020751953125,
0.0158538818359375,
0.0200958251953125,
-0.035919189453125,
0.001598358154296875,
-0.017913818359375,
0.0150909423828125,
-0.0212249755859375,
-0.030792236328125,
-0.021820068359375,
0.04266357421875,
0.014434814453125,
-0.0184173583984375,
0.006137847900390625,
-0.01070404052734375,
0.028900146484375,
-0.007015228271484375,
0.002368927001953125,
0.0175628662109375,
0.01152801513671875,
0.0158233642578125,
-0.00812530517578125,
0.0030040740966796875,
-0.0292510986328125,
-0.034088134765625,
-0.06494140625,
-0.035736083984375,
0.00710296630859375,
0.0123443603515625,
0.051971435546875,
0.007015228271484375,
0.0012350082397460938,
-0.06488037109375,
-0.0027313232421875,
-0.005306243896484375,
-0.02313232421875,
-0.00791168212890625,
-0.0137939453125,
0.00815582275390625,
-0.04022216796875,
0.0306243896484375,
-0.006744384765625,
-0.0019550323486328125,
-0.004016876220703125,
0.11846923828125,
0.0296630859375,
-0.007965087890625,
0.006557464599609375,
-0.005168914794921875,
0.01190948486328125,
-0.0160675048828125,
0.0809326171875,
0.039459228515625,
-0.00579071044921875,
0.05194091796875,
-0.008148193359375,
0.050201416015625,
-0.01043701171875,
-0.004711151123046875,
-0.004779815673828125,
0.007122039794921875,
0.01401519775390625,
0.03216552734375,
-0.036041259765625,
0.00986480712890625,
-0.021453857421875,
-0.002254486083984375,
-0.0333251953125,
0.0335693359375,
-0.0307159423828125,
0.05194091796875,
-0.0166015625,
-0.0102691650390625,
0.005329132080078125,
-0.045745849609375,
0.0172576904296875,
0.026275634765625,
-0.00966644287109375,
-0.0150299072265625,
-0.00835418701171875,
-0.021453857421875,
0.019805908203125,
0.01050567626953125,
0.012542724609375,
0.00528717041015625,
0.00994110107421875,
-0.0231781005859375,
-0.0223846435546875,
-0.0200042724609375,
0.05194091796875,
0.017364501953125,
-0.0321044921875,
0.0080108642578125,
0.004238128662109375,
0.040283203125,
0.0266876220703125,
0.01053619384765625,
0.042144775390625,
0.03680419921875,
-0.0126800537109375,
-0.0154876708984375,
0.01209259033203125,
0.01129913330078125,
-0.054290771484375,
0.0217437744140625,
-0.0014295578002929688,
-0.002628326416015625,
0.028900146484375,
0.055450439453125,
-0.0233306884765625,
0.05877685546875,
-0.0291290283203125,
-0.0244140625,
0.00916290283203125,
0.0010805130004882812,
0.0556640625,
-0.0135345458984375,
-0.01447296142578125,
-0.0289154052734375,
-0.012603759765625,
-0.0194854736328125,
0.0009694099426269531,
-0.00939178466796875,
0.01239776611328125,
-0.0219879150390625,
-0.00257110595703125,
0.0295257568359375,
-0.00836944580078125,
-0.01422119140625,
0.0182342529296875,
0.01751708984375,
-0.0241241455078125,
-0.0208740234375,
0.0048980712890625,
0.012664794921875,
0.0015964508056640625,
0.0086669921875,
-0.0029354095458984375,
0.01377105712890625,
0.0041656494140625,
0.0211639404296875,
-0.02899169921875,
0.00311279296875,
0.0193023681640625,
-0.02264404296875,
-0.022552490234375,
-0.01114654541015625,
-0.03570556640625,
-0.031707763671875,
0.01070404052734375,
-0.00426483154296875,
0.04071044921875,
-0.04742431640625,
0.038818359375,
-0.028961181640625,
-0.00960540771484375,
-0.0704345703125,
0.01277923583984375,
0.055938720703125,
0.07098388671875,
-0.015899658203125,
0.0217437744140625,
-0.004741668701171875,
0.006595611572265625,
0.043670654296875,
-0.0262451171875,
-0.018951416015625,
-0.053192138671875,
-0.019439697265625,
-0.004329681396484375,
0.007129669189453125,
0.044158935546875,
0.01800537109375,
0.034820556640625,
-0.031005859375,
0.0035552978515625,
0.0068206787109375,
-0.0024089813232421875,
0.0268402099609375,
-0.0231475830078125,
0.0369873046875,
0.006008148193359375,
-0.02178955078125,
-0.0247344970703125,
0.0164947509765625,
-0.059722900390625,
-0.0360107421875,
-0.021392822265625,
-0.0105743408203125,
0.0193634033203125,
0.0185089111328125,
0.004016876220703125,
-0.0177764892578125,
0.011932373046875,
0.006931304931640625,
-0.0004508495330810547,
-0.03729248046875,
0.020538330078125,
-0.016815185546875,
-0.0009899139404296875,
-0.0183868408203125,
0.0016775131225585938,
-0.0093994140625,
-0.0015430450439453125,
0.01123809814453125,
-0.0095062255859375,
0.0016813278198242188,
0.02008056640625,
-0.05438232421875,
0.064697265625,
0.05535888671875,
-0.0027523040771484375,
0.037933349609375,
0.01031494140625,
0.0119171142578125,
-0.009002685546875,
0.031280517578125,
-0.029144287109375,
-0.033355712890625,
0.0830078125,
0.0302886962890625,
-0.018035888671875,
0.06134033203125,
-0.044769287109375,
0.06414794921875,
0.03070068359375,
0.0972900390625,
-0.06781005859375,
0.036865234375,
0.053314208984375,
-0.0288238525390625,
0.0443115234375,
0.0073699951171875,
-0.035491943359375,
-0.032745361328125,
0.052581787109375,
-0.05609130859375,
-0.0183258056640625,
0.0247344970703125,
0.00018107891082763672,
-0.02996826171875,
-0.03814697265625,
0.0185699462890625,
0.0350341796875,
0.007404327392578125,
0.0270233154296875,
0.015655517578125,
0.005008697509765625,
-0.01198577880859375,
0.0260162353515625,
-0.02630615234375,
-0.01264190673828125,
-0.0831298828125,
-0.036956787109375,
-0.025482177734375,
-0.036590576171875,
0.0186767578125,
0.009857177734375,
0.01418304443359375,
0.05029296875,
-0.0131988525390625,
0.0157012939453125,
0.03216552734375,
-0.0217437744140625,
0.0049591064453125,
-0.01544952392578125,
-0.003376007080078125,
0.025970458984375,
-0.009124755859375,
0.01287841796875,
0.0026149749755859375,
-0.01378631591796875,
-0.01239013671875,
-0.052734375,
0.07476806640625,
-0.00289154052734375,
-0.019989013671875,
0.051971435546875,
-0.046539306640625,
-0.044189453125,
0.005523681640625,
0.03857421875,
-0.041656494140625,
-0.028045654296875,
0.0255889892578125,
-0.0460205078125,
-0.027618408203125,
0.0049285888671875,
-0.0787353515625,
0.0819091796875,
0.0134429931640625,
0.051116943359375,
-0.001987457275390625,
0.01226043701171875,
-0.02984619140625,
-0.0233001708984375,
-0.053070068359375,
0.040252685546875,
0.0009288787841796875,
0.0198211669921875,
-0.06829833984375,
0.0089569091796875,
-0.0286712646484375,
-0.0004856586456298828,
0.0233917236328125,
-0.004787445068359375,
0.0277099609375,
-0.03118896484375,
0.013092041015625,
0.0445556640625,
-0.00830841064453125,
-0.031005859375,
0.04510498046875,
0.04364013671875,
0.0948486328125,
-0.012054443359375,
0.03924560546875,
-0.0174102783203125,
0.0400390625,
0.05401611328125,
0.006931304931640625,
-0.0250091552734375,
-0.01436614990234375,
-0.0124359130859375,
-0.0238189697265625,
-0.0093841552734375,
-0.0107879638671875,
-0.005035400390625,
-0.008087158203125,
0.058319091796875,
0.0458984375,
-0.06512451171875,
0.01104736328125,
-0.0413818359375,
0.062469482421875,
-0.0168914794921875,
-0.01666259765625,
0.02838134765625,
0.01003265380859375,
0.0215301513671875,
-0.01538848876953125,
-0.0020904541015625,
0.002353668212890625,
0.00972747802734375,
0.043670654296875,
0.0216217041015625,
0.02947998046875,
-0.0233917236328125,
0.00605010986328125,
0.04925537109375,
0.050048828125,
-0.021728515625,
-0.0186767578125,
0.006908416748046875,
0.005268096923828125,
0.0183258056640625,
-0.021392822265625,
-0.0010919570922851562,
-0.03436279296875,
-0.00493621826171875,
-0.036834716796875,
0.021942138671875,
0.050445556640625,
-0.0345458984375,
0.0167236328125,
0.039276123046875,
-0.0335693359375,
0.03485107421875,
-0.0265350341796875,
0.0148773193359375,
0.01763916015625,
0.049896240234375,
-0.0012102127075195312,
0.057464599609375,
-0.042022705078125,
-0.01136016845703125,
-0.0433349609375,
0.05462646484375,
0.0153656005859375,
0.044708251953125,
-0.08642578125,
-0.04949951171875,
0.05279541015625,
0.0604248046875,
0.0440673828125,
0.0096893310546875,
0.0175018310546875,
0.0229339599609375,
0.01241302490234375,
0.0204925537109375,
0.040863037109375,
-0.006168365478515625,
0.011871337890625,
-0.018829345703125,
0.0269317626953125,
0.0272369384765625,
-0.0107574462890625,
-0.022918701171875,
0.0230255126953125,
0.0298309326171875,
-0.0257415771484375,
0.055877685546875,
0.00334930419921875,
-0.010345458984375,
0.0271759033203125,
-0.00955963134765625,
0.047882080078125,
0.01528167724609375,
-0.019287109375,
-0.02398681640625,
-0.00394439697265625,
-0.019439697265625,
0.01116180419921875,
0.039825439453125,
0.034027099609375,
-0.01468658447265625,
-0.02386474609375,
-0.0029315948486328125,
-0.016571044921875,
0.01238250732421875,
0.007160186767578125,
0.0284881591796875,
0.0200653076171875,
0.0124053955078125,
-0.0372314453125,
-0.03765869140625,
-0.004787445068359375,
0.034820556640625,
-0.01065826416015625,
0.0233917236328125,
0.0007271766662597656,
0.0149993896484375,
0.008819580078125,
0.01056671142578125,
-0.0254974365234375,
-0.0256195068359375,
0.05596923828125,
-0.0321044921875,
-0.024993896484375,
-0.00392913818359375,
-0.0499267578125,
0.007659912109375,
0.0291290283203125,
-0.033111572265625,
0.03118896484375,
-0.017669677734375,
0.0006995201110839844,
-0.04571533203125,
-0.01055908203125,
-0.018798828125,
-0.016265869140625,
0.00034117698669433594,
-0.01218414306640625,
0.0318603515625,
0.006908416748046875,
-0.019500732421875,
0.021575927734375,
0.00693511962890625,
-0.01129150390625,
0.0167236328125,
-0.02423095703125,
0.00415802001953125,
0.01264190673828125,
0.01013946533203125,
-0.01219940185546875,
0.00022530555725097656,
-0.0270538330078125,
0.0170745849609375,
-0.00039386749267578125,
0.03326416015625,
-0.0047454833984375,
-0.005359649658203125,
-0.00450897216796875,
-0.04974365234375,
0.0032634735107421875,
-0.0458984375,
-0.0054779052734375,
-0.0015468597412109375,
0.04583740234375,
-0.023834228515625,
-0.0227813720703125,
-0.00875091552734375,
-0.005054473876953125,
-0.041595458984375,
-0.0009202957153320312,
-0.015228271484375,
-0.053802490234375,
-0.00583648681640625,
-0.0016937255859375,
-0.020355224609375,
-0.032135009765625,
0.037567138671875,
-0.00795745849609375,
-0.026458740234375,
-0.042938232421875,
-0.0450439453125,
-0.02667236328125,
0.006931304931640625,
0.03070068359375,
-0.0284271240234375,
-0.01560211181640625,
-0.018157958984375,
-0.0059967041015625,
-0.0285491943359375,
0.0176849365234375,
0.032958984375,
-0.01885986328125,
-0.038665771484375,
0.0577392578125,
0.01702880859375,
0.09295654296875,
-0.03558349609375,
-0.0256500244140625,
-0.01140594482421875,
-0.01259613037109375,
-0.0219268798828125,
-0.06146240234375,
0.0386962890625,
-0.085693359375,
-0.058502197265625,
0.05108642578125,
-0.05804443359375,
-0.0265045166015625,
-0.047882080078125,
-0.0191497802734375,
0.04998779296875,
0.05865478515625,
-0.033660888671875,
-0.016815185546875,
-0.04669189453125,
0.01181793212890625,
0.05780029296875,
0.003688812255859375,
-0.0142822265625,
-0.0782470703125,
-0.0009908676147460938,
0.0032329559326171875,
0.0300140380859375,
0.0169525146484375,
-0.01486968994140625,
-0.0012369155883789062,
0.00800323486328125,
0.0239410400390625,
-0.0248870849609375,
-0.0005483627319335938,
-0.019744873046875,
0.0280609130859375,
0.040252685546875,
-0.048126220703125,
0.01041412353515625,
0.004184722900390625,
0.007354736328125,
-0.010467529296875,
-0.035552978515625,
0.0018024444580078125,
0.0183258056640625,
0.043121337890625,
0.04974365234375,
0.00865936279296875,
-0.05902099609375,
-0.0284271240234375,
0.00043845176696777344,
-0.053497314453125,
-0.01593017578125,
0.05645751953125,
-0.10601806640625,
-0.0028667449951171875,
0.0306396484375,
-0.0289459228515625,
-0.0021495819091796875,
0.01116180419921875,
-0.04339599609375,
0.00885009765625,
0.002197265625,
-0.0164337158203125,
-0.0204010009765625,
-0.0770263671875,
0.0487060546875,
-0.034393310546875,
-0.02667236328125,
0.007068634033203125,
0.046417236328125,
-0.02178955078125,
0.031402587890625,
-0.008514404296875,
0.0025730133056640625,
-0.006397247314453125,
0.014373779296875,
0.0026760101318359375,
0.00226593017578125,
0.0102081298828125,
-0.0159759521484375,
-0.0245208740234375,
-0.005523681640625,
0.0004127025604248047,
-0.0157470703125,
0.01467132568359375,
0.028900146484375,
0.0182952880859375,
0.00518035888671875,
-0.00262451171875,
0.0797119140625,
0.0098419189453125,
0.053436279296875,
-0.0175018310546875,
-0.01313018798828125,
-0.00457763671875,
-0.014434814453125,
0.002838134765625,
-0.021087646484375,
-0.0103302001953125,
-0.05645751953125,
0.037567138671875,
0.0125579833984375,
-0.002559661865234375,
0.0372314453125
]
|
af5f9b5f4056521c86b33723d27710c45d40bb79 | Wordpress Stackexchange
Q: 2 seperate installation 1 theme same server i got 2 separate installation on the same folder
each in their own sub folder - they use the same theme
which i copied twice.
Every time i edit a file i need to do it twice and its
a real hassle... How can i define so that they both
use the same theme - a shared theme but a different
database?
I have no "initial code" to share since i don't know
where to begin so an example code would be much appreciated
A: Three fast and easy options™:
*
*Setup revision control (git) for your theme and just pull/push the data around.
*WordPress Network
*Create a symlink to your theme folders
Option 1 is the best because it's doesn't matter which theme you edit.
| Q: 2 seperate installation 1 theme same server i got 2 separate installation on the same folder
each in their own sub folder - they use the same theme
which i copied twice.
Every time i edit a file i need to do it twice and its
a real hassle... How can i define so that they both
use the same theme - a shared theme but a different
database?
I have no "initial code" to share since i don't know
where to begin so an example code would be much appreciated
A: Three fast and easy options™:
*
*Setup revision control (git) for your theme and just pull/push the data around.
*WordPress Network
*Create a symlink to your theme folders
Option 1 is the best because it's doesn't matter which theme you edit.
| wordpress | {
"language": "en",
"length": 134,
"provenance": "stackexchange_00019.jsonl.gz:439153",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123094"
} | [
0.005847930908203125,
-0.0178070068359375,
-0.005619049072265625,
-0.040283203125,
-0.0178375244140625,
-0.007740020751953125,
-0.0189361572265625,
-0.0188446044921875,
-0.0173187255859375,
0.01105499267578125,
-0.00628662109375,
0.013702392578125,
0.001743316650390625,
-0.03533935546875,
0.0291290283203125,
-0.0198516845703125,
0.03863525390625,
-0.035552978515625,
-0.0164337158203125,
-0.0223541259765625,
-0.02886962890625,
0.021209716796875,
-0.0186614990234375,
0.08074951171875,
0.0185546875,
-0.018310546875,
0.034393310546875,
0.007266998291015625,
0.0001666545867919922,
-0.001621246337890625,
0.0241241455078125,
-0.03045654296875,
0.00630950927734375,
0.018402099609375,
-0.00666046142578125,
-0.04302978515625,
0.0077056884765625,
0.006938934326171875,
0.006885528564453125,
-0.00672149658203125,
0.0145721435546875,
-0.004978179931640625,
0.0474853515625,
0.025726318359375,
0.01039886474609375,
-0.057037353515625,
0.031890869140625,
-0.06622314453125,
0.018585205078125,
-0.04736328125,
0.0095062255859375,
0.0252838134765625,
0.037261962890625,
-0.03173828125,
-0.02020263671875,
-0.0006399154663085938,
0.0340576171875,
-0.0296783447265625,
0.038482666015625,
-0.061004638671875,
-0.055419921875,
-0.041717529296875,
0.05242919921875,
-0.00934600830078125,
0.02471923828125,
-0.0181884765625,
0.0124359130859375,
0.03875732421875,
-0.08477783203125,
0.004657745361328125,
0.040435791015625,
-0.043304443359375,
0.0200347900390625,
-0.0443115234375,
-0.014739990234375,
0.02490234375,
-0.01326751708984375,
-0.0008373260498046875,
0.0308990478515625,
-0.039398193359375,
-0.0240936279296875,
-0.004718780517578125,
-0.051177978515625,
-0.061553955078125,
0.0171966552734375,
-0.0154571533203125,
-0.01020050048828125,
0.01082611083984375,
-0.02587890625,
-0.013092041015625,
-0.01123809814453125,
-0.0225830078125,
-0.04425048828125,
0.022247314453125,
0.008544921875,
-0.022552490234375,
0.039093017578125,
0.10003662109375,
-0.039031982421875,
0.019866943359375,
-0.0266571044921875,
-0.020965576171875,
0.028472900390625,
-0.059906005859375,
0.01071929931640625,
0.041412353515625,
-0.0019025802612304688,
-0.0204010009765625,
0.026580810546875,
0.00872802734375,
-0.0004477500915527344,
0.0384521484375,
-0.005535125732421875,
-0.0692138671875,
-0.00479888916015625,
0.04486083984375,
-0.01009368896484375,
0.0051116943359375,
0.043182373046875,
-0.0171356201171875,
0.01323699951171875,
0.025543212890625,
0.00658416748046875,
0.0123291015625,
-0.0240631103515625,
-0.003856658935546875,
-0.004364013671875,
-0.05804443359375,
0.0026416778564453125,
-0.00690460205078125,
-0.025360107421875,
0.0044403076171875,
0.07049560546875,
0.0687255859375,
0.023529052734375,
0.001613616943359375,
0.04095458984375,
0.0233917236328125,
-0.01505279541015625,
0.0254058837890625,
-0.0031890869140625,
-0.023101806640625,
-0.00879669189453125,
-0.03216552734375,
-0.05523681640625,
0.0399169921875,
0.004772186279296875,
0.001621246337890625,
-0.0229949951171875,
-0.057647705078125,
-0.02276611328125,
-0.05010986328125,
0.0098724365234375,
-0.00327301025390625,
0.01519012451171875,
-0.012237548828125,
-0.036346435546875,
-0.0010480880737304688,
0.028656005859375,
0.0267791748046875,
-0.01473236083984375,
-0.0165252685546875,
0.024383544921875,
0.01201629638671875,
-0.0307159423828125,
0.0299072265625,
0.008697509765625,
-0.0032825469970703125,
0.01360321044921875,
-0.051513671875,
-0.0196533203125,
-0.01413726806640625,
0.02362060546875,
-0.019134521484375,
-0.0003554821014404297,
0.0273284912109375,
0.024871826171875,
-0.040435791015625,
0.0114288330078125,
0.055572509765625,
-0.00850677490234375,
-0.03741455078125,
-0.0022830963134765625,
-0.0158538818359375,
-0.054290771484375,
0.032867431640625,
-0.004657745361328125,
0.0565185546875,
0.029022216796875,
0.0186004638671875,
0.006740570068359375,
-0.00620269775390625,
-0.00004392862319946289,
0.01102447509765625,
0.0002884864807128906,
-0.0286712646484375,
-0.00882720947265625,
0.006561279296875,
-0.0062408447265625,
-0.019989013671875,
-0.0170440673828125,
-0.00632476806640625,
0.01461029052734375,
0.01131439208984375,
-0.00876617431640625,
0.002201080322265625,
-0.00860595703125,
0.00579833984375,
-0.0262603759765625,
0.01438140869140625,
0.01367950439453125,
-0.0082550048828125,
0.01226806640625,
-0.06536865234375,
-0.00030350685119628906,
0.022857666015625,
-0.01251983642578125,
0.0180816650390625,
0.01556396484375,
0.0166168212890625,
0.019378662109375,
-0.0094146728515625,
0.0012350082397460938,
-0.0162353515625,
0.0206146240234375,
-0.007476806640625,
-0.0003466606140136719,
-0.00333404541015625,
0.01258087158203125,
0.0276947021484375,
-0.01195526123046875,
-0.0008440017700195312,
0.0301055908203125,
0.0599365234375,
-0.002994537353515625,
0.006359100341796875,
0.020172119140625,
-0.0216217041015625,
-0.00156402587890625,
0.01983642578125,
0.030120849609375,
0.01080322265625,
-0.0284271240234375,
-0.0216217041015625,
0.044952392578125,
-0.0244598388671875,
0.00970458984375,
-0.007106781005859375,
0.021514892578125,
0.0267333984375,
0.0081329345703125,
-0.0220947265625,
0.02313232421875,
-0.06805419921875,
0.007293701171875,
0.03387451171875,
-0.036834716796875,
-0.0158538818359375,
0.0477294921875,
-0.02386474609375,
-0.0020580291748046875,
-0.030609130859375,
-0.005939483642578125,
-0.0190277099609375,
0.0219879150390625,
0.03125,
0.04754638671875,
0.03289794921875,
-0.020904541015625,
0.019256591796875,
0.01155853271484375,
-0.00225830078125,
0.003742218017578125,
0.02154541015625,
0.00559234619140625,
0.01251983642578125,
-0.0023479461669921875,
-0.0135040283203125,
0.0026645660400390625,
0.0119476318359375,
-0.04266357421875,
-0.0152435302734375,
-0.047760009765625,
-0.0198974609375,
-0.006259918212890625,
-0.06500244140625,
0.00254058837890625,
-0.022186279296875,
-0.009735107421875,
0.000017642974853515625,
0.01528167724609375,
-0.003246307373046875,
-0.044677734375,
0.034454345703125,
-0.0108184814453125,
-0.021575927734375,
0.04901123046875,
-0.01953125,
0.0238037109375,
-0.02581787109375,
0.00061798095703125,
0.043121337890625,
0.01812744140625,
-0.0286102294921875,
-0.0078582763671875,
0.0004024505615234375,
-0.0019683837890625,
-0.01010894775390625,
-0.0255279541015625,
0.0020160675048828125,
-0.0953369140625,
-0.020050048828125,
0.026611328125,
-0.0294647216796875,
0.03607177734375,
-0.00321197509765625,
0.00933837890625,
0.0167083740234375,
-0.027740478515625,
-0.0394287109375,
-0.0474853515625,
-0.01380157470703125,
0.04595947265625,
-0.006076812744140625,
0.0244903564453125,
-0.0263824462890625,
-0.002933502197265625,
0.0270538330078125,
0.0251007080078125,
-0.07110595703125,
-0.039581298828125,
-0.07147216796875,
-0.078125,
-0.0287017822265625,
0.01529693603515625,
-0.005046844482421875,
0.00589752197265625,
0.0305328369140625,
0.00921630859375,
-0.01715087890625,
0.03314208984375,
0.036163330078125,
0.0024433135986328125,
0.006591796875,
0.02386474609375,
-0.05255126953125,
0.00485992431640625,
0.0020294189453125,
0.00479888916015625,
0.0005922317504882812,
0.0025577545166015625,
-0.0281524658203125,
0.005359649658203125,
-0.01690673828125,
0.0055999755859375,
0.007564544677734375,
-0.01416778564453125,
0.006885528564453125,
0.0196685791015625,
-0.043609619140625,
-0.04608154296875,
-0.005809783935546875,
-0.0577392578125,
-0.03704833984375,
0.0577392578125,
-0.01715087890625,
-0.050201416015625,
0.002017974853515625,
0.0008783340454101562,
-0.00978851318359375,
0.0070953369140625,
-0.05255126953125,
0.04962158203125,
0.01399993896484375,
0.018341064453125,
-0.0183563232421875,
-0.0498046875,
-0.050811767578125,
0.06298828125,
-0.032806396484375,
-0.007228851318359375,
-0.041107177734375,
0.052398681640625,
-0.025604248046875,
-0.04107666015625,
0.0281829833984375,
0.001983642578125,
0.047454833984375,
-0.031158447265625,
-0.032806396484375,
-0.0032978057861328125,
0.0947265625,
-0.07147216796875,
0.00864410400390625,
0.03582763671875,
0.0086822509765625,
-0.0165252685546875,
-0.00209808349609375,
-0.09466552734375,
-0.0168914794921875,
-0.052490234375,
-0.010101318359375,
-0.023162841796875,
-0.02276611328125,
-0.00394439697265625,
-0.041473388671875,
-0.02386474609375,
-0.04278564453125,
0.03582763671875,
-0.0290069580078125,
0.0297393798828125,
-0.02484130859375,
0.0100250244140625,
-0.0306549072265625,
-0.025634765625,
-0.02923583984375,
-0.04534912109375,
-0.0036029815673828125,
-0.0186614990234375,
0.0255279541015625,
0.00830841064453125,
0.01033782958984375,
-0.0226898193359375,
0.0162506103515625,
-0.017913818359375,
0.0411376953125,
-0.039276123046875,
0.0014181137084960938,
-0.019866943359375,
0.028839111328125,
-0.0080413818359375,
0.01090240478515625,
0.0124359130859375,
-0.03179931640625,
-0.04144287109375,
-0.01209259033203125,
-0.035003662109375,
0.03961181640625,
-0.0176239013671875,
-0.0208282470703125,
-0.053253173828125,
0.0026607513427734375,
0.0330810546875,
0.0019989013671875,
0.0178985595703125,
-0.014678955078125,
0.0090789794921875,
-0.0267181396484375,
0.0291595458984375,
-0.00911712646484375,
-0.00800323486328125,
0.0100250244140625,
0.052459716796875,
0.01001739501953125,
-0.019561767578125,
-0.05560302734375,
-0.00322723388671875,
0.018707275390625,
0.0113525390625,
0.0277099609375,
0.00873565673828125,
0.00041794776916503906,
-0.002292633056640625,
0.006900787353515625,
-0.0189971923828125,
0.0150299072265625,
0.03460693359375,
-0.00865936279296875,
-0.03790283203125,
0.011749267578125,
-0.0282135009765625,
0.0189361572265625,
-0.0009374618530273438,
-0.0147857666015625,
0.005786895751953125,
-0.034698486328125,
0.0043792724609375,
0.0206298828125,
0.0023250579833984375,
-0.03094482421875,
-0.037200927734375,
0.01407623291015625,
-0.041290283203125,
0.017822265625,
-0.010772705078125,
0.0206298828125,
0.024078369140625,
0.025604248046875,
-0.006023406982421875,
0.0367431640625,
0.0728759765625,
-0.01983642578125,
0.0214691162109375,
0.046295166015625,
-0.026153564453125,
-0.0223388671875,
-0.0164947509765625,
0.069091796875,
0.0472412109375,
-0.0306549072265625,
0.007503509521484375,
0.01039886474609375,
0.026885986328125,
-0.022125244140625,
-0.01418304443359375,
-0.0040435791015625,
-0.040679931640625,
-0.0292816162109375,
0.021209716796875,
0.0135955810546875,
-0.07904052734375,
-0.016571044921875,
-0.029571533203125,
0.004711151123046875,
-0.0301361083984375,
0.060546875,
-0.033599853515625,
-0.013031005859375,
0.0122222900390625,
-0.013092041015625,
0.01538848876953125,
0.056243896484375,
0.00374603271484375,
0.00479888916015625,
0.0160980224609375,
-0.00649261474609375,
-0.020538330078125,
0.0308990478515625,
-0.058685302734375,
0.0108489990234375,
0.039886474609375,
0.07281494140625,
0.025146484375,
-0.044281005859375,
-0.0038738250732421875,
-0.051605224609375,
-0.004817962646484375,
-0.0276336669921875,
-0.05657958984375,
-0.044189453125,
0.00688934326171875,
0.04656982421875,
0.031951904296875,
-0.0158538818359375,
-0.011566162109375,
0.00977325439453125,
-0.027435302734375,
0.0011796951293945312,
0.0290374755859375,
-0.0330810546875,
0.0005178451538085938,
0.0110626220703125,
0.010406494140625,
0.0195465087890625,
-0.0009665489196777344,
-0.0709228515625,
-0.03607177734375,
-0.0157012939453125,
0.001129150390625,
0.06707763671875,
-0.0019893646240234375,
0.0238800048828125,
-0.01617431640625,
-0.037078857421875,
-0.050567626953125,
-0.006191253662109375,
0.058624267578125,
0.033203125,
-0.10137939453125,
0.041748046875,
-0.0413818359375,
0.00543212890625,
-0.005859375,
-0.08258056640625,
-0.07421875,
-0.040863037109375,
-0.01708984375,
0.0057220458984375,
-0.0206146240234375,
-0.00385284423828125,
-0.01352691650390625,
0.019744873046875,
-0.00003975629806518555,
-0.0005159378051757812,
-0.027496337890625,
0.052490234375,
-0.014007568359375,
0.035888671875,
-0.030029296875,
0.0008893013000488281,
-0.00872039794921875,
0.0065460205078125,
-0.034576416015625,
-0.06549072265625,
0.019866943359375,
0.034027099609375,
0.0050506591796875,
0.035003662109375,
0.007625579833984375,
0.02276611328125,
0.022735595703125,
-0.041595458984375,
-0.011810302734375,
-0.0191192626953125,
0.041839599609375,
-0.05499267578125,
0.009246826171875,
0.01036834716796875,
-0.037750244140625,
-0.005695343017578125,
0.005748748779296875,
-0.01442718505859375,
0.015716552734375,
-0.012542724609375,
-0.001171112060546875,
0.05487060546875,
-0.0163116455078125,
-0.0053253173828125,
0.07110595703125,
0.01342010498046875,
0.050048828125,
0.00855255126953125,
0.02294921875,
0.030670166015625,
0.01425933837890625,
-0.0212554931640625,
-0.0148468017578125,
0.00982666015625,
0.003444671630859375,
0.0178680419921875,
0.018768310546875,
-0.005870819091796875,
0.0275115966796875,
0.051361083984375,
0.096435546875,
-0.0650634765625,
0.007144927978515625,
0.046356201171875,
-0.0281982421875,
-0.0318603515625,
0.0022602081298828125,
0.0016155242919921875,
-0.025146484375,
0.006031036376953125,
0.0164031982421875,
-0.006378173828125,
0.005786895751953125,
-0.007648468017578125,
-0.01509857177734375,
-0.0179595947265625,
-0.00353240966796875,
0.0126953125,
0.046875,
-0.00200653076171875,
-0.0094757080078125,
0.026885986328125,
-0.016815185546875,
-0.007167816162109375,
-0.0090789794921875,
-0.032073974609375,
-0.07305908203125,
-0.027191162109375,
-0.0208892822265625,
-0.003910064697265625,
-0.0244293212890625,
0.021942138671875,
0.037811279296875,
0.054656982421875,
-0.01502227783203125,
0.0015058517456054688,
0.03546142578125,
0.04608154296875,
-0.0006608963012695312,
-0.005725860595703125,
0.0426025390625,
-0.00579833984375,
-0.042755126953125,
0.0160064697265625,
-0.0435791015625,
-0.0194854736328125,
-0.01538848876953125,
0.017059326171875,
0.10980224609375,
-0.0540771484375,
-0.01409912109375,
0.04241943359375,
0.034576416015625,
-0.0270233154296875,
0.004306793212890625,
0.043853759765625,
-0.06976318359375,
-0.07891845703125,
0.02447509765625,
-0.05865478515625,
-0.0161590576171875,
0.00975799560546875,
-0.061126708984375,
0.11285400390625,
-0.0146942138671875,
0.035736083984375,
0.01018524169921875,
0.0404052734375,
-0.0248565673828125,
0.02117919921875,
-0.026947021484375,
0.0615234375,
-0.01503753662109375,
0.0162200927734375,
-0.0284271240234375,
0.0241851806640625,
-0.006702423095703125,
-0.006801605224609375,
0.03997802734375,
0.006191253662109375,
-0.0017423629760742188,
0.01806640625,
0.0704345703125,
0.007312774658203125,
-0.01363372802734375,
0.035980224609375,
0.001888275146484375,
-0.0087127685546875,
0.008056640625,
-0.007152557373046875,
0.0128021240234375,
-0.01465606689453125,
-0.0271453857421875,
0.0172271728515625,
0.00971221923828125,
-0.005962371826171875,
0.015106201171875,
-0.004840850830078125,
-0.06982421875,
0.0228271484375,
0.0343017578125,
0.0206298828125,
0.01021575927734375,
-0.0146942138671875,
-0.0005626678466796875,
-0.0005106925964355469,
0.01690673828125,
-0.0112457275390625,
0.03643798828125,
-0.0011997222900390625,
0.0027713775634765625,
-0.006488800048828125,
0.0096435546875,
0.037078857421875,
0.00848388671875,
-0.0089569091796875,
0.04998779296875,
-0.02313232421875,
0.00531768798828125,
0.0170135498046875,
0.0280609130859375,
-0.0294952392578125,
-0.0018758773803710938,
0.0196075439453125,
0.0191802978515625,
-0.0208740234375,
-0.0234375,
0.017120361328125,
-0.009857177734375,
-0.0232391357421875,
-0.0103302001953125,
-0.05029296875,
-0.01171875,
0.01056671142578125,
0.006137847900390625,
-0.00731658935546875,
0.00791168212890625,
0.00333404541015625,
0.00612640380859375,
0.005908966064453125,
0.027099609375,
0.019500732421875,
-0.029998779296875,
0.031585693359375,
0.025238037109375,
0.0171356201171875,
-0.03167724609375,
0.05914306640625,
0.002056121826171875,
0.00885772705078125,
-0.028289794921875,
0.06329345703125,
0.00013625621795654297,
0.0311126708984375,
-0.0828857421875,
-0.0859375,
0.044647216796875,
0.049652099609375,
0.0190582275390625,
0.000499725341796875,
0.0261383056640625,
0.0452880859375,
-0.00037097930908203125,
-0.010223388671875,
0.015472412109375,
-0.0106201171875,
0.03924560546875,
-0.01442718505859375,
0.00432586669921875,
-0.01739501953125,
-0.0308837890625,
-0.03326416015625,
0.03948974609375,
0.007534027099609375,
-0.006877899169921875,
0.006618499755859375,
0.00006473064422607422,
-0.022796630859375,
-0.0106048583984375,
-0.00890350341796875,
0.0090789794921875,
0.0267791748046875,
-0.02874755859375,
-0.0013856887817382812,
-0.033721923828125,
-0.034759521484375,
0.0019330978393554688,
0.035308837890625,
0.004383087158203125,
0.01168060302734375,
0.04571533203125,
-0.01041412353515625,
-0.02435302734375,
0.00872802734375,
0.031463623046875,
0.00691986083984375,
0.0174102783203125,
0.0262451171875,
-0.0487060546875,
-0.04779052734375,
-0.017333984375,
0.056488037109375,
0.0278778076171875,
0.04742431640625,
0.0004496574401855469,
0.02508544921875,
0.0224609375,
0.0280914306640625,
-0.020782470703125,
-0.00020492076873779297,
0.030853271484375,
-0.02117919921875,
0.0265045166015625,
-0.00811004638671875,
-0.01090240478515625,
0.01393890380859375,
0.03570556640625,
-0.03741455078125,
0.01442718505859375,
-0.0180511474609375,
0.022491455078125,
-0.0186004638671875,
-0.00646209716796875,
-0.0191650390625,
-0.0198516845703125,
-0.012176513671875,
0.013580322265625,
0.01123809814453125,
0.004302978515625,
-0.022247314453125,
-0.0017948150634765625,
0.00970458984375,
-0.00431060791015625,
0.01471710205078125,
0.03375244140625,
-0.0025691986083984375,
0.019927978515625,
-0.015472412109375,
-0.086669921875,
0.00905609130859375,
-0.01169586181640625,
-0.0062255859375,
0.004901885986328125,
0.08770751953125,
0.01690673828125,
-0.07672119140625,
0.03790283203125,
0.08233642578125,
0.056915283203125,
-0.01369476318359375,
0.0218658447265625,
0.0771484375,
-0.0224761962890625,
0.004146575927734375,
-0.01035308837890625,
-0.02630615234375,
-0.018707275390625,
-0.0012035369873046875,
0.0233001708984375,
-0.000316619873046875,
-0.0261688232421875,
-0.04571533203125,
0.0100250244140625,
0.042816162109375,
0.0016069412231445312,
-0.0406494140625,
0.0247344970703125,
-0.025665283203125,
0.03759765625,
0.005794525146484375,
-0.061767578125,
-0.0010623931884765625,
0.0163726806640625,
0.007549285888671875,
-0.0657958984375,
-0.0513916015625,
0.0535888671875,
-0.03692626953125,
0.0066070556640625,
0.033599853515625,
-0.0185394287109375,
0.01168060302734375,
0.001224517822265625,
0.020355224609375,
0.03387451171875,
0.00010794401168823242,
-0.0295257568359375,
-0.007579803466796875,
-0.01129150390625,
-0.0050506591796875,
-0.035797119140625,
0.00360870361328125,
-0.048126220703125,
-0.0232391357421875,
-0.036285400390625,
0.001117706298828125,
0.00017511844635009766,
-0.040374755859375,
-0.05950927734375,
0.038543701171875,
-0.0014495849609375,
-0.035308837890625,
-0.050384521484375,
-0.002140045166015625,
-0.033935546875,
0.0159149169921875,
-0.0270233154296875,
-0.015960693359375,
0.017486572265625,
0.09100341796875,
0.00927734375,
0.020416259765625,
0.006343841552734375,
0.024078369140625,
-0.00690460205078125,
0.0260009765625,
0.0223541259765625,
-0.0155029296875,
0.039459228515625,
-0.014892578125,
0.025726318359375,
0.06689453125,
-0.01287078857421875,
-0.02935791015625,
-0.0318603515625,
-0.068359375,
-0.01180267333984375,
-0.023651123046875,
0.0032291412353515625,
-0.0036563873291015625,
0.05157470703125,
0.041534423828125,
0.005420684814453125,
-0.033416748046875,
-0.06658935546875,
-0.053375244140625,
0.03131103515625,
0.01232147216796875,
0.0097503662109375,
-0.08935546875,
0.02301025390625,
0.06268310546875,
-0.0362548828125,
0.037017822265625,
0.01409149169921875,
-0.04205322265625,
0.0244903564453125,
0.0035858154296875,
-0.0123291015625,
-0.072998046875,
0.00478363037109375,
0.033538818359375,
-0.00048351287841796875,
0.0516357421875,
-0.01526641845703125,
-0.001262664794921875,
0.05010986328125,
0.044036865234375,
0.052947998046875,
0.034912109375,
-0.06304931640625,
-0.0004012584686279297,
0.0173492431640625,
0.0321044921875,
-0.037261962890625,
-0.048736572265625,
0.0150909423828125,
0.006977081298828125,
-0.01611328125,
-0.01532745361328125,
0.0091094970703125,
0.019622802734375,
-0.0302734375,
0.0797119140625,
-0.0194244384765625,
-0.0028438568115234375,
-0.030059814453125,
0.055145263671875,
-0.06488037109375,
0.008544921875,
-0.0267333984375,
-0.0283966064453125,
0.01139068603515625,
-0.0195465087890625,
0.019134521484375,
-0.0249786376953125,
0.039581298828125,
0.0197601318359375,
-0.0111083984375,
0.03973388671875
]
|
cbe88d529a4ebb8cf54683838bcd1fe9c427f708 | Wordpress Stackexchange
Q: Is it possible to work on localhost but have the upload folder linked remotly for dev? I would like to develop my website locally on my computer WAMP server but the thing is that all images and stuff are on the remote server in the uploads folder. Is there a way to work locally for files and link the upload folder to the remote server for media content ? Maybe a vhost setting or something like that.
A: Check out Paul Clark's Uploads by Proxy plugin:
For local development: Automatically load images from the production version of wp-content/uploads if they are missing locally.
| Q: Is it possible to work on localhost but have the upload folder linked remotly for dev? I would like to develop my website locally on my computer WAMP server but the thing is that all images and stuff are on the remote server in the uploads folder. Is there a way to work locally for files and link the upload folder to the remote server for media content ? Maybe a vhost setting or something like that.
A: Check out Paul Clark's Uploads by Proxy plugin:
For local development: Automatically load images from the production version of wp-content/uploads if they are missing locally.
A: There are tools available to map a remote folder to a local one, but there are a couple of things to watch for with that. One is that even if you have the uploads folder synchronized, your local WordPress media admin won't know they exist since that info is stored in the database.
You would also want to be sure you don't erase any of the files in your local folder or those changes may sync back and break your live site.
If you're on a *nix or OS X machine, look into rsync, or mounting a folder via ssh.
A: Not answering the question, but a possible solution for someone with a similar problem and just wanting to have placeholder images for their media content: http://placehold.it
I use it a lot during developing stages of a design.
| wordpress | {
"language": "en",
"length": 243,
"provenance": "stackexchange_00019.jsonl.gz:439155",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123098"
} | [
0.0229034423828125,
0.00672149658203125,
0.01393890380859375,
-0.0217437744140625,
-0.006839752197265625,
-0.00786590576171875,
0.01398468017578125,
-0.0219879150390625,
0.0296478271484375,
-0.00014603137969970703,
-0.0011377334594726562,
-0.036407470703125,
-0.006732940673828125,
-0.043731689453125,
-0.004741668701171875,
-0.034820556640625,
0.0169525146484375,
0.01049041748046875,
0.01354217529296875,
-0.020660400390625,
-0.01751708984375,
-0.005764007568359375,
0.01070404052734375,
0.031524658203125,
0.018280029296875,
0.016204833984375,
0.031982421875,
0.007633209228515625,
-0.013458251953125,
-0.0274200439453125,
0.0308074951171875,
0.01255035400390625,
0.02362060546875,
0.0091705322265625,
-0.0218658447265625,
-0.0205078125,
0.03131103515625,
-0.0201263427734375,
-0.03826904296875,
0.056854248046875,
0.00350189208984375,
0.00855255126953125,
0.05535888671875,
0.02020263671875,
0.0011920928955078125,
-0.028472900390625,
0.0243682861328125,
-0.03076171875,
0.0266571044921875,
-0.000026524066925048828,
-0.015350341796875,
0.0116119384765625,
-0.018524169921875,
-0.01050567626953125,
-0.0013875961303710938,
-0.007045745849609375,
-0.009246826171875,
-0.00815582275390625,
0.051055908203125,
-0.036865234375,
-0.05712890625,
-0.0538330078125,
0.0457763671875,
-0.0026378631591796875,
-0.0243988037109375,
0.0067291259765625,
0.0253143310546875,
0.0030994415283203125,
-0.047271728515625,
-0.021575927734375,
0.02960205078125,
-0.036163330078125,
0.01495361328125,
-0.039825439453125,
-0.01800537109375,
0.00843048095703125,
0.003490447998046875,
-0.0304718017578125,
0.0244598388671875,
-0.0213775634765625,
0.01837158203125,
-0.03350830078125,
0.0039520263671875,
-0.044891357421875,
0.061187744140625,
0.025634765625,
0.0007991790771484375,
-0.01593017578125,
-0.02239990234375,
0.0173492431640625,
-0.033203125,
0.0158843994140625,
-0.017364501953125,
0.00389862060546875,
-0.0276641845703125,
0.02178955078125,
-0.01308441162109375,
-0.0019779205322265625,
-0.0031890869140625,
0.006683349609375,
-0.0024166107177734375,
-0.0259246826171875,
0.01503753662109375,
-0.0239410400390625,
0.01270294189453125,
-0.0000966191291809082,
-0.01143646240234375,
-0.0273284912109375,
0.037567138671875,
0.0266265869140625,
-0.014892578125,
0.023345947265625,
-0.01459503173828125,
-0.02923583984375,
0.00910186767578125,
0.059051513671875,
-0.0100250244140625,
0.0477294921875,
0.0097503662109375,
0.0511474609375,
-0.01076507568359375,
0.037628173828125,
-0.042236328125,
0.00469207763671875,
0.03228759765625,
0.0032711029052734375,
0.00433349609375,
-0.004253387451171875,
0.0086212158203125,
0.057647705078125,
-0.032989501953125,
-0.00586700439453125,
0.0626220703125,
-0.0196380615234375,
-0.0157318115234375,
-0.0307464599609375,
0.008514404296875,
0.01332855224609375,
-0.007778167724609375,
0.04302978515625,
-0.0218963623046875,
-0.022918701171875,
0.037872314453125,
-0.00968170166015625,
0.00321197509765625,
0.0151824951171875,
0.0181427001953125,
0.01983642578125,
-0.0240478515625,
-0.024383544921875,
0.0160369873046875,
-0.01335906982421875,
0.0032520294189453125,
0.0109710693359375,
0.0906982421875,
-0.042236328125,
0.09002685546875,
-0.05621337890625,
0.0083160400390625,
-0.0187530517578125,
0.03594970703125,
0.019439697265625,
0.041351318359375,
-0.042266845703125,
-0.03277587890625,
-0.04547119140625,
-0.07733154296875,
-0.0229339599609375,
0.0225677490234375,
-0.011810302734375,
0.00222015380859375,
-0.040191650390625,
0.0274658203125,
-0.01346588134765625,
-0.0183868408203125,
0.028778076171875,
0.04217529296875,
0.02215576171875,
-0.00081634521484375,
0.0455322265625,
0.0278778076171875,
-0.01129150390625,
0.0716552734375,
-0.0086669921875,
-0.0157470703125,
0.0228424072265625,
-0.0102081298828125,
0.0267486572265625,
0.0175933837890625,
0.0213165283203125,
-0.0113372802734375,
0.0221099853515625,
-0.0236358642578125,
-0.0089263916015625,
-0.01324462890625,
-0.007053375244140625,
-0.0211334228515625,
0.000015139579772949219,
-0.00487518310546875,
-0.0017175674438476562,
-0.02691650390625,
-0.005764007568359375,
0.0232696533203125,
0.0139923095703125,
0.037933349609375,
-0.0210418701171875,
0.0120086669921875,
0.01287841796875,
0.05279541015625,
0.0010089874267578125,
-0.0276336669921875,
0.011688232421875,
0.032379150390625,
-0.1181640625,
-0.038665771484375,
0.07159423828125,
-0.0482177734375,
0.011322021484375,
0.005123138427734375,
0.03582763671875,
-0.00643157958984375,
-0.01099395751953125,
-0.0121612548828125,
-0.0406494140625,
-0.0123443603515625,
0.077392578125,
-0.050201416015625,
0.047698974609375,
0.01129150390625,
0.045074462890625,
0.01291656494140625,
-0.0096435546875,
-0.0222015380859375,
-0.0046539306640625,
-0.0155487060546875,
0.00028967857360839844,
-0.020843505859375,
-0.0697021484375,
0.0146026611328125,
0.049835205078125,
0.031280517578125,
-0.025177001953125,
0.005519866943359375,
0.031646728515625,
0.045989990234375,
-0.007694244384765625,
0.0159759521484375,
0.0026187896728515625,
-0.001953125,
-0.0046844482421875,
-0.006061553955078125,
-0.03125,
0.038055419921875,
-0.097900390625,
-0.0016355514526367188,
0.04608154296875,
-0.0706787109375,
-0.0362548828125,
-0.01198577880859375,
0.00128936767578125,
0.01045989990234375,
-0.00460052490234375,
0.02520751953125,
-0.01433563232421875,
0.0033664703369140625,
0.003612518310546875,
0.0148468017578125,
0.021087646484375,
-0.0298004150390625,
0.006526947021484375,
0.0291595458984375,
-0.023406982421875,
0.01461029052734375,
0.06146240234375,
0.01873779296875,
0.0254364013671875,
-0.0206298828125,
-0.0350341796875,
0.0201568603515625,
0.047332763671875,
-0.050750732421875,
-0.035675048828125,
0.0271453857421875,
-0.0094757080078125,
-0.00946807861328125,
-0.039306640625,
0.06463623046875,
-0.0357666015625,
0.03643798828125,
0.038177490234375,
0.060211181640625,
0.006744384765625,
-0.0106201171875,
0.04150390625,
-0.00592803955078125,
-0.020233154296875,
0.0670166015625,
0.0135040283203125,
0.0027484893798828125,
0.0253753662109375,
0.0237274169921875,
0.04669189453125,
-0.007144927978515625,
0.01522064208984375,
-0.002170562744140625,
0.0163421630859375,
0.0290374755859375,
-0.0192108154296875,
-0.0203094482421875,
-0.00977325439453125,
-0.0262298583984375,
-0.025299072265625,
0.003124237060546875,
-0.039398193359375,
-0.0226593017578125,
-0.016693115234375,
-0.023162841796875,
-0.035369873046875,
-0.109130859375,
-0.0791015625,
-0.01617431640625,
-0.0185699462890625,
0.00594329833984375,
0.031005859375,
-0.0160064697265625,
-0.0302276611328125,
0.07061767578125,
0.01329803466796875,
-0.00450897216796875,
-0.03472900390625,
0.018707275390625,
-0.0251312255859375,
-0.0265045166015625,
-0.01081085205078125,
0.022491455078125,
-0.0123748779296875,
0.00795745849609375,
0.032928466796875,
0.006679534912109375,
-0.0234832763671875,
0.03741455078125,
0.06866455078125,
0.01502227783203125,
0.00363922119140625,
0.00978851318359375,
-0.038665771484375,
0.05426025390625,
-0.00862884521484375,
-0.0011568069458007812,
0.040313720703125,
-0.01548004150390625,
-0.021270751953125,
0.0025310516357421875,
-0.001918792724609375,
-0.0081024169921875,
0.01206207275390625,
0.0206146240234375,
-0.02838134765625,
-0.03125,
-0.06597900390625,
-0.004974365234375,
-0.02899169921875,
-0.044830322265625,
-0.0005927085876464844,
0.028839111328125,
-0.01126861572265625,
-0.0318603515625,
0.009124755859375,
0.0684814453125,
0.036224365234375,
0.004505157470703125,
-0.0030670166015625,
0.035888671875,
0.0206451416015625,
0.05224609375,
-0.042144775390625,
0.0445556640625,
-0.01541900634765625,
0.0123291015625,
0.0208587646484375,
-0.0201263427734375,
-0.040771484375,
0.041412353515625,
-0.06158447265625,
-0.037017822265625,
0.021636962890625,
-0.03521728515625,
0.025054931640625,
-0.026885986328125,
-0.01369476318359375,
-0.0152740478515625,
0.063720703125,
-0.0531005859375,
-0.0081024169921875,
0.019317626953125,
0.037078857421875,
-0.053680419921875,
-0.04766845703125,
-0.04962158203125,
0.0007562637329101562,
0.027252197265625,
-0.042388916015625,
-0.03607177734375,
-0.0125732421875,
0.017822265625,
-0.055206298828125,
0.03851318359375,
-0.035400390625,
0.035614013671875,
-0.019378662109375,
0.0200042724609375,
0.0081787109375,
0.0048828125,
-0.0222015380859375,
-0.0205841064453125,
-0.0272674560546875,
-0.10662841796875,
-0.0200653076171875,
-0.01546478271484375,
0.07061767578125,
-0.0036373138427734375,
0.015106201171875,
-0.03369140625,
0.0548095703125,
-0.018280029296875,
-0.002391815185546875,
-0.02154541015625,
0.01111602783203125,
0.004383087158203125,
-0.00936126708984375,
-0.0086822509765625,
-0.01529693603515625,
-0.0024242401123046875,
-0.046875,
-0.059661865234375,
-0.0308837890625,
-0.033111572265625,
0.03863525390625,
-0.04449462890625,
-0.01485443115234375,
0.03399658203125,
0.01055145263671875,
-0.0035266876220703125,
0.06768798828125,
0.0014009475708007812,
0.0084075927734375,
-0.0223541259765625,
-0.01120758056640625,
0.0312042236328125,
-0.0010175704956054688,
0.0117340087890625,
0.00183868408203125,
0.0626220703125,
0.00824737548828125,
-0.022216796875,
-0.0178985595703125,
0.005565643310546875,
0.03070068359375,
0.04443359375,
0.0230865478515625,
0.016632080078125,
-0.019378662109375,
0.0219268798828125,
0.041412353515625,
0.0384521484375,
0.0020236968994140625,
-0.01273345947265625,
0.01316070556640625,
0.0010242462158203125,
0.0044097900390625,
0.041046142578125,
-0.051116943359375,
-0.0028400421142578125,
-0.004261016845703125,
-0.005191802978515625,
-0.031829833984375,
0.038330078125,
0.0389404296875,
-0.01715087890625,
-0.054962158203125,
-0.0270843505859375,
0.0085296630859375,
-0.052398681640625,
0.06689453125,
0.0269317626953125,
0.00011140108108520508,
0.02203369140625,
0.035888671875,
0.00768280029296875,
-0.007671356201171875,
-0.006229400634765625,
-0.00621795654296875,
0.021392822265625,
0.0193634033203125,
0.0161590576171875,
-0.01453399658203125,
0.0023136138916015625,
-0.006916046142578125,
0.01401519775390625,
-0.005615234375,
-0.01019287109375,
0.01383209228515625,
0.004032135009765625,
0.00262451171875,
0.0223388671875,
0.020751953125,
-0.02130126953125,
-0.0011987686157226562,
-0.0063934326171875,
0.01702880859375,
-0.0243377685546875,
-0.035430908203125,
-0.0012826919555664062,
-0.0164947509765625,
-0.0091705322265625,
0.00824737548828125,
0.00679779052734375,
-0.035186767578125,
0.0001055598258972168,
-0.0008625984191894531,
0.0228271484375,
0.049072265625,
-0.00873565673828125,
0.01486968994140625,
0.0167694091796875,
0.01303863525390625,
-0.037384033203125,
0.0280609130859375,
-0.042236328125,
0.01009368896484375,
0.040771484375,
0.0645751953125,
0.0101165771484375,
-0.032257080078125,
-0.0205535888671875,
-0.054901123046875,
-0.00894927978515625,
0.01003265380859375,
-0.048980712890625,
-0.03363037109375,
-0.04132080078125,
-0.0374755859375,
0.027008056640625,
-0.0139312744140625,
-0.028656005859375,
-0.01116943359375,
-0.0245819091796875,
-0.0026416778564453125,
0.0256195068359375,
-0.056854248046875,
0.0305023193359375,
0.03509521484375,
-0.0115966796875,
-0.02032470703125,
-0.009521484375,
-0.007080078125,
0.012359619140625,
-0.0215301513671875,
-0.02374267578125,
0.0293731689453125,
-0.010162353515625,
-0.039093017578125,
-0.01120758056640625,
0.014923095703125,
-0.0252532958984375,
0.00946044921875,
0.0094146728515625,
-0.0203704833984375,
-0.049591064453125,
0.0246429443359375,
-0.045867919921875,
-0.0088653564453125,
0.0108184814453125,
-0.004901885986328125,
-0.06744384765625,
-0.0333251953125,
0.00942230224609375,
0.0197296142578125,
-0.0242156982421875,
-0.026275634765625,
-0.02593994140625,
0.0197906494140625,
0.037109375,
0.0158538818359375,
0.0026836395263671875,
0.040740966796875,
-0.0003352165222167969,
0.040191650390625,
0.0259857177734375,
0.003017425537109375,
-0.046966552734375,
-0.02142333984375,
-0.0026416778564453125,
-0.04083251953125,
-0.027923583984375,
0.00020265579223632812,
-0.0174560546875,
0.039031982421875,
0.04998779296875,
0.0012340545654296875,
0.01959228515625,
-0.03656005859375,
0.0011701583862304688,
-0.0247039794921875,
0.07110595703125,
-0.07421875,
0.01247406005859375,
0.00461578369140625,
0.00494384765625,
0.011627197265625,
-0.002109527587890625,
-0.0404052734375,
0.0164642333984375,
0.0245208740234375,
0.007419586181640625,
0.00024771690368652344,
0.03997802734375,
0.01374053955078125,
0.0679931640625,
0.0002593994140625,
0.061065673828125,
0.05499267578125,
0.02203369140625,
0.042724609375,
0.06829833984375,
-0.030914306640625,
-0.0496826171875,
-0.007480621337890625,
0.01080322265625,
-0.0170135498046875,
-0.03900146484375,
-0.0036525726318359375,
0.0281829833984375,
0.033477783203125,
0.055084228515625,
-0.022369384765625,
-0.0005278587341308594,
-0.0010194778442382812,
-0.045867919921875,
0.011810302734375,
-0.0203857421875,
0.0259246826171875,
-0.021484375,
-0.01502227783203125,
0.038909912109375,
-0.03546142578125,
-0.0308990478515625,
-0.002361297607421875,
0.012420654296875,
0.02667236328125,
0.052978515625,
0.01111602783203125,
-0.058868408203125,
-0.038116455078125,
0.05224609375,
-0.01317596435546875,
0.025909423828125,
0.023712158203125,
-0.039642333984375,
-0.014190673828125,
-0.01078033447265625,
-0.0087127685546875,
-0.0033721923828125,
-0.018341064453125,
-0.0113525390625,
-0.016265869140625,
0.0384521484375,
0.0084991455078125,
0.011016845703125,
-0.0300140380859375,
-0.0019273757934570312,
-0.0110321044921875,
0.006237030029296875,
-0.00782012939453125,
-0.01519012451171875,
-0.0224609375,
-0.0003809928894042969,
-0.004482269287109375,
-0.01690673828125,
-0.01184844970703125,
0.01229095458984375,
0.01065826416015625,
0.00946044921875,
-0.042816162109375,
0.0005712509155273438,
0.041778564453125,
0.01739501953125,
-0.011627197265625,
-0.009124755859375,
-0.020599365234375,
-0.0595703125,
-0.03662109375,
-0.036865234375,
-0.06707763671875,
0.0258026123046875,
-0.050567626953125,
-0.0201568603515625,
0.0633544921875,
-0.00782012939453125,
0.00799560546875,
0.075927734375,
0.029693603515625,
-0.044525146484375,
0.005001068115234375,
-0.01432037353515625,
0.0523681640625,
-0.0008401870727539062,
-0.02239990234375,
-0.0721435546875,
-0.01033782958984375,
-0.0200347900390625,
0.03521728515625,
0.09039306640625,
0.0233917236328125,
-0.042877197265625,
-0.0240325927734375,
0.029022216796875,
0.03582763671875,
-0.0173797607421875,
0.05389404296875,
0.001735687255859375,
-0.0166778564453125,
-0.0084991455078125,
-0.0159454345703125,
0.0023479461669921875,
-0.00820159912109375,
-0.0234222412109375,
0.0367431640625,
0.0153350830078125,
0.01053619384765625,
-0.0014104843139648438,
0.038055419921875,
-0.035614013671875,
-0.01364898681640625,
0.0364990234375,
0.0006818771362304688,
-0.0030975341796875,
0.021881103515625,
-0.0018548965454101562,
-0.038665771484375,
-0.041290283203125,
-0.01140594482421875,
0.026580810546875,
-0.01641845703125,
-0.031707763671875,
0.00382232666015625,
0.0003554821014404297,
-0.01374053955078125,
-0.0020008087158203125,
-0.029998779296875,
0.0197906494140625,
0.004276275634765625,
0.033416748046875,
0.0211334228515625,
0.0258636474609375,
-0.0355224609375,
-0.02362060546875,
0.03448486328125,
0.045501708984375,
-0.02423095703125,
-0.051025390625,
0.0089111328125,
-0.02557373046875,
-0.00740814208984375,
0.004108428955078125,
-0.0116119384765625,
-0.038604736328125,
0.006565093994140625,
-0.00199127197265625,
-0.0014286041259765625,
0.01175689697265625,
-0.0025272369384765625,
0.0185394287109375,
0.06689453125,
-0.01300811767578125,
-0.008087158203125,
-0.0272216796875,
0.0261688232421875,
0.00875091552734375,
0.033355712890625,
-0.0181427001953125,
0.042510986328125,
-0.0264892578125,
-0.0093841552734375,
-0.009765625,
0.0183258056640625,
-0.00437164306640625,
0.0186920166015625,
-0.056427001953125,
-0.052001953125,
0.038482666015625,
0.043365478515625,
0.047637939453125,
0.007404327392578125,
0.05316162109375,
0.037750244140625,
-0.0177459716796875,
0.001949310302734375,
0.0164031982421875,
-0.01003265380859375,
-0.0014352798461914062,
-0.04522705078125,
0.04327392578125,
0.037628173828125,
0.00734710693359375,
-0.00958251953125,
-0.019622802734375,
0.0703125,
-0.04901123046875,
0.0596923828125,
-0.0287628173828125,
-0.05126953125,
0.023956298828125,
-0.0540771484375,
0.107421875,
-0.035125732421875,
0.003810882568359375,
0.01097869873046875,
-0.0007405281066894531,
-0.018829345703125,
-0.016448974609375,
0.0245208740234375,
-0.00881195068359375,
0.02264404296875,
-0.0037822723388671875,
-0.01395416259765625,
-0.018768310546875,
0.01494598388671875,
0.01419830322265625,
-0.00547027587890625,
0.010498046875,
-0.00605010986328125,
0.001739501953125,
-0.0094757080078125,
-0.021392822265625,
0.04534912109375,
0.0034027099609375,
0.160400390625,
-0.075439453125,
0.019989013671875,
0.042327880859375,
0.000051856040954589844,
0.01285552978515625,
0.039581298828125,
-0.03192138671875,
0.005130767822265625,
0.0206146240234375,
-0.026214599609375,
0.0013246536254882812,
-0.01522064208984375,
0.01343536376953125,
-0.061767578125,
-0.02728271484375,
-0.0263671875,
0.0243072509765625,
0.032257080078125,
0.0228118896484375,
-0.0277099609375,
-0.0100555419921875,
-0.0279388427734375,
-0.0159912109375,
0.0311737060546875,
0.00738525390625,
-0.005168914794921875,
0.041717529296875,
-0.00872802734375,
-0.02532958984375,
0.0191650390625,
-0.06121826171875,
0.00006157159805297852,
0.027130126953125,
0.00612640380859375,
-0.05364990234375,
0.02874755859375,
0.00991058349609375,
0.0006198883056640625,
-0.00276947021484375,
0.079345703125,
0.032318115234375,
-0.032623291015625,
0.0261993408203125,
0.025909423828125,
0.03302001953125,
-0.0109100341796875,
-0.0028667449951171875,
0.022308349609375,
-0.018218994140625,
0.0198211669921875,
-0.024658203125,
-0.00946044921875,
-0.0256500244140625,
-0.0028476715087890625,
0.0227508544921875,
0.000484466552734375,
-0.020751953125,
-0.0103607177734375,
-0.022979736328125,
0.05108642578125,
0.0149078369140625,
-0.035308837890625,
0.00966644287109375,
-0.0204010009765625,
0.020263671875,
0.0252532958984375,
0.004795074462890625,
-0.0262298583984375,
-0.0027751922607421875,
-0.029083251953125,
-0.050872802734375,
-0.034454345703125,
0.054443359375,
-0.0233612060546875,
0.043365478515625,
0.0213470458984375,
-0.0255889892578125,
0.01275634765625,
0.0821533203125,
0.04669189453125,
0.131103515625,
0.005580902099609375,
-0.0224151611328125,
0.0092620849609375,
-0.00760650634765625,
-0.000759124755859375,
-0.01537322998046875,
0.01113128662109375,
-0.033050537109375,
-0.0005755424499511719,
-0.018951416015625,
0.0026493072509765625,
0.0216064453125,
-0.04925537109375,
-0.0953369140625,
-0.0004515647888183594,
-0.0031833648681640625,
-0.05419921875,
-0.035858154296875,
0.0266265869140625,
0.0018281936645507812,
0.0288848876953125,
-0.0022068023681640625,
-0.02581787109375,
-0.0066986083984375,
0.034881591796875,
-0.020355224609375,
0.00787353515625,
0.004283905029296875,
-0.00821685791015625,
0.00469207763671875,
0.0058441162109375,
0.0189208984375,
-0.0504150390625,
0.0289154052734375,
-0.003520965576171875,
0.03515625,
0.0635986328125,
-0.01406097412109375,
0.0665283203125,
-0.01898193359375,
-0.07183837890625,
-0.0212860107421875,
-0.00965118408203125,
-0.0271759033203125,
-0.0460205078125,
0.06622314453125,
0.044525146484375,
0.0269317626953125,
-0.0025005340576171875,
-0.0333251953125,
-0.0242767333984375,
-0.0003979206085205078,
-0.022308349609375,
0.01195526123046875,
-0.039154052734375,
0.004833221435546875,
-0.0277862548828125,
-0.007686614990234375,
0.00234222412109375,
0.007297515869140625,
-0.01849365234375,
-0.00380706787109375,
-0.00270843505859375,
-0.03765869140625,
-0.006633758544921875,
-0.0125274658203125,
0.0672607421875,
-0.02435302734375,
0.04559326171875,
-0.0037555694580078125,
0.0186004638671875,
0.06744384765625,
0.046051025390625,
0.022857666015625,
-0.01076507568359375,
0.00957489013671875,
0.024627685546875,
0.036712646484375,
-0.007373809814453125,
0.00608062744140625,
-0.03948974609375,
-0.01500701904296875,
-0.006420135498046875,
0.0140533447265625,
-0.00771331787109375,
-0.0165557861328125,
0.00946044921875,
-0.0110321044921875,
0.04638671875,
-0.0164794921875,
-0.045989990234375,
-0.0195159912109375,
0.01824951171875,
-0.068359375,
0.01340484619140625,
-0.0330810546875,
-0.037841796875,
0.0069427490234375,
-0.003322601318359375,
-0.0264892578125,
-0.03936767578125,
0.025787353515625,
0.0109710693359375,
-0.016998291015625,
0.025665283203125
]
|
a3a9b219026b946b9828d3a49b0ef2cb5315e8d0 | Wordpress Stackexchange
Q: How to redirect url requests to https? I've searched far and wide for a solution to this and I am sure it's simple but I simply couldn't find a solution.
This is the regular wordpress redirect code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
How do I make it so that this will always route the url request to https://?
Note: The reason this is posted here and not on any other SO site is that I thought there might be a catch when it comes to WP.
BTW, I put the same question on ServerFault and got a big On Hold because "I did not try to solve this myself".
A: This really belongs on ServerFault, StackOverflow or Webmasters...
But basically, you need to add something along these lines before the WP rules begin:
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
| Q: How to redirect url requests to https? I've searched far and wide for a solution to this and I am sure it's simple but I simply couldn't find a solution.
This is the regular wordpress redirect code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
How do I make it so that this will always route the url request to https://?
Note: The reason this is posted here and not on any other SO site is that I thought there might be a catch when it comes to WP.
BTW, I put the same question on ServerFault and got a big On Hold because "I did not try to solve this myself".
A: This really belongs on ServerFault, StackOverflow or Webmasters...
But basically, you need to add something along these lines before the WP rules begin:
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
| wordpress | {
"language": "en",
"length": 159,
"provenance": "stackexchange_00019.jsonl.gz:439162",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123124"
} | [
0.0628662109375,
0.01513671875,
-0.0043487548828125,
-0.0014934539794921875,
0.0276336669921875,
-0.035888671875,
0.060028076171875,
-0.03302001953125,
0.0005288124084472656,
0.0009522438049316406,
-0.018280029296875,
0.004207611083984375,
-0.04730224609375,
-0.034210205078125,
0.0185394287109375,
-0.036163330078125,
0.016998291015625,
-0.035430908203125,
-0.0057830810546875,
-0.020111083984375,
0.0239410400390625,
-0.0092620849609375,
0.028533935546875,
0.0118560791015625,
-0.00211334228515625,
-0.01084136962890625,
0.10443115234375,
-0.039886474609375,
-0.0113983154296875,
-0.0462646484375,
0.011871337890625,
-0.0007328987121582031,
0.01336669921875,
0.0258636474609375,
-0.050567626953125,
-0.047882080078125,
-0.005733489990234375,
0.009918212890625,
-0.0187530517578125,
0.0274810791015625,
0.0283355712890625,
-0.038543701171875,
0.061981201171875,
-0.00237274169921875,
0.010406494140625,
-0.00174713134765625,
0.016082763671875,
-0.03765869140625,
-0.00960540771484375,
-0.0007510185241699219,
0.013397216796875,
0.040679931640625,
0.041259765625,
-0.0234832763671875,
-0.0116119384765625,
-0.00229644775390625,
0.004093170166015625,
0.00498199462890625,
0.0148162841796875,
-0.033111572265625,
-0.0246429443359375,
0.016998291015625,
0.0198211669921875,
0.032379150390625,
-0.02276611328125,
-0.006595611572265625,
0.0032749176025390625,
0.0011577606201171875,
-0.057586669921875,
-0.04315185546875,
0.0271148681640625,
-0.01313018798828125,
-0.00788116455078125,
-0.0245513916015625,
0.00263214111328125,
0.0171966552734375,
0.026275634765625,
0.02362060546875,
-0.005405426025390625,
0.006839752197265625,
0.0124359130859375,
-0.016082763671875,
-0.0133209228515625,
-0.0345458984375,
0.03143310546875,
-0.020538330078125,
0.005374908447265625,
-0.005275726318359375,
-0.019287109375,
-0.022003173828125,
-0.02227783203125,
0.0276031494140625,
-0.01186370849609375,
-0.0267333984375,
-0.037261962890625,
-0.0308685302734375,
0.039825439453125,
0.0298919677734375,
0.046234130859375,
-0.0016269683837890625,
0.032958984375,
-0.061065673828125,
0.0005545616149902344,
-0.02947998046875,
-0.0125274658203125,
0.032958984375,
0.015533447265625,
0.048187255859375,
0.0302734375,
0.0189666748046875,
0.02276611328125,
0.0025348663330078125,
-0.0236053466796875,
-0.0313720703125,
-0.04400634765625,
0.0310821533203125,
-0.028717041015625,
-0.04046630859375,
-0.0031261444091796875,
-0.0030364990234375,
-0.005107879638671875,
0.02587890625,
0.0014677047729492188,
0.0006566047668457031,
-0.00348663330078125,
-0.0095672607421875,
0.006458282470703125,
-0.0435791015625,
-0.0091552734375,
0.007843017578125,
-0.049713134765625,
0.01242828369140625,
0.08575439453125,
0.044342041015625,
0.0219268798828125,
-0.0311279296875,
0.043853759765625,
-0.0243988037109375,
0.0004642009735107422,
0.029571533203125,
-0.01690673828125,
-0.042755126953125,
-0.00939178466796875,
0.00013327598571777344,
0.05303955078125,
0.0263671875,
0.011260986328125,
0.0238189697265625,
0.010986328125,
-0.046234130859375,
0.03790283203125,
-0.0267181396484375,
0.031036376953125,
0.0157470703125,
-0.0014553070068359375,
-0.01006317138671875,
0.04412841796875,
-0.0279541015625,
-0.029022216796875,
-0.041839599609375,
-0.015716552734375,
-0.003025054931640625,
0.029022216796875,
-0.00799560546875,
-0.00713348388671875,
0.0009741783142089844,
-0.05224609375,
-0.007537841796875,
0.0231170654296875,
0.01348876953125,
0.0177001953125,
-0.007648468017578125,
-0.0164031982421875,
-0.002895355224609375,
-0.00923919677734375,
0.000850677490234375,
0.00811767578125,
-0.002605438232421875,
0.0014848709106445312,
0.0621337890625,
0.0284576416015625,
-0.0219268798828125,
0.019927978515625,
0.01397705078125,
-0.034912109375,
0.047943115234375,
-0.0281524658203125,
0.03326416015625,
0.01087188720703125,
0.002635955810546875,
-0.01197052001953125,
0.019805908203125,
-0.03472900390625,
0.05322265625,
-0.034088134765625,
-0.043487548828125,
-0.0208892822265625,
-0.01262664794921875,
-0.028717041015625,
0.013885498046875,
-0.0233154296875,
0.01332855224609375,
-0.027923583984375,
0.0294036865234375,
0.040679931640625,
-0.020843505859375,
0.02642822265625,
-0.01349639892578125,
0.0081024169921875,
0.0108489990234375,
0.01324462890625,
0.0014781951904296875,
-0.0090789794921875,
-0.035064697265625,
-0.0234222412109375,
0.0362548828125,
-0.02069091796875,
0.008209228515625,
-0.01247406005859375,
0.020263671875,
0.0061492919921875,
-0.0266571044921875,
-0.00015485286712646484,
-0.004779815673828125,
0.0311279296875,
-0.029449462890625,
-0.010406494140625,
-0.023529052734375,
0.01093292236328125,
-0.0066070556640625,
-0.048858642578125,
0.0219573974609375,
0.0254669189453125,
0.02423095703125,
-0.047271728515625,
0.0006685256958007812,
-0.012115478515625,
0.0049285888671875,
-0.0051116943359375,
0.0328369140625,
0.03424072265625,
0.0211029052734375,
-0.029632568359375,
-0.0262603759765625,
0.016632080078125,
-0.06536865234375,
-0.00180816650390625,
-0.01483917236328125,
0.0068359375,
-0.011810302734375,
0.0299530029296875,
-0.0435791015625,
0.01358795166015625,
-0.05462646484375,
0.0172271728515625,
0.0154571533203125,
0.01861572265625,
0.0015497207641601562,
-0.0283203125,
-0.0096435546875,
0.0198211669921875,
-0.045013427734375,
-0.06219482421875,
-0.016387939453125,
-0.0113372802734375,
-0.016571044921875,
-0.00954437255859375,
-0.004337310791015625,
-0.00504302978515625,
-0.0297393798828125,
0.0147705078125,
-0.024139404296875,
-0.00510406494140625,
0.06024169921875,
0.061614990234375,
-0.034027099609375,
-0.02777099609375,
-0.00835418701171875,
0.0062103271484375,
0.0360107421875,
0.01617431640625,
0.049591064453125,
-0.0005626678466796875,
-0.01334381103515625,
-0.0236968994140625,
-0.0283050537109375,
0.0016326904296875,
0.016204833984375,
0.0352783203125,
0.02099609375,
0.049591064453125,
-0.015472412109375,
-0.014556884765625,
0.019866943359375,
0.007049560546875,
-0.037445068359375,
0.031646728515625,
-0.049835205078125,
0.048492431640625,
-0.0350341796875,
0.0670166015625,
0.06427001953125,
-0.0247039794921875,
0.02978515625,
0.0037097930908203125,
0.003681182861328125,
0.017242431640625,
-0.0272216796875,
-0.0307464599609375,
0.017364501953125,
-0.084716796875,
-0.05218505859375,
0.02484130859375,
-0.023284912109375,
0.03143310546875,
-0.0072021484375,
0.0016222000122070312,
0.00981903076171875,
-0.0738525390625,
-0.0662841796875,
-0.050384521484375,
-0.05340576171875,
0.000713348388671875,
0.022125244140625,
-0.01053619384765625,
-0.004261016845703125,
0.0443115234375,
0.0204620361328125,
0.007610321044921875,
-0.02032470703125,
-0.06451416015625,
-0.06060791015625,
-0.0902099609375,
0.00855255126953125,
-0.01116943359375,
0.02618408203125,
0.0030117034912109375,
0.01200103759765625,
-0.0037403106689453125,
-0.02154541015625,
0.011505126953125,
0.0216064453125,
-0.01047515869140625,
-0.0207672119140625,
-0.02301025390625,
-0.02227783203125,
0.0017957687377929688,
-0.0144500732421875,
0.062744140625,
0.0128021240234375,
0.00838470458984375,
0.0299530029296875,
0.00206756591796875,
-0.044647216796875,
0.005283355712890625,
-0.032135009765625,
-0.021392822265625,
-0.0216827392578125,
-0.0106353759765625,
-0.051025390625,
-0.0020618438720703125,
-0.0100250244140625,
-0.0207366943359375,
-0.035980224609375,
0.0196990966796875,
-0.0160369873046875,
-0.0423583984375,
0.00983428955078125,
0.0280303955078125,
0.0113983154296875,
0.019256591796875,
-0.01554107666015625,
0.025421142578125,
-0.00882720947265625,
0.01708984375,
-0.048065185546875,
0.047332763671875,
-0.0003647804260253906,
-0.0140838623046875,
0.0069580078125,
-0.004360198974609375,
-0.03643798828125,
0.01015472412109375,
-0.09814453125,
-0.06011962890625,
0.0423583984375,
-0.023193359375,
-0.006908416748046875,
-0.0180816650390625,
-0.01849365234375,
-0.007625579833984375,
0.084228515625,
-0.003353118896484375,
-0.022064208984375,
-0.012298583984375,
0.0196075439453125,
-0.011688232421875,
-0.00933074951171875,
0.0020008087158203125,
-0.0166473388671875,
-0.12249755859375,
0.005710601806640625,
-0.007289886474609375,
-0.04229736328125,
0.0173187255859375,
-0.07989501953125,
-0.043792724609375,
-0.06719970703125,
0.034637451171875,
-0.0176544189453125,
0.0232391357421875,
0.01519012451171875,
0.0003914833068847656,
-0.0015478134155273438,
-0.01422882080078125,
-0.0284423828125,
-0.042083740234375,
-0.0160369873046875,
0.038848876953125,
0.0411376953125,
-0.005992889404296875,
-0.015411376953125,
0.00994110107421875,
0.06842041015625,
0.029144287109375,
0.023223876953125,
0.0238189697265625,
-0.030792236328125,
0.04998779296875,
0.039642333984375,
0.027618408203125,
-0.00209808349609375,
-0.018096923828125,
-0.01690673828125,
0.01171112060546875,
0.0304107666015625,
-0.017974853515625,
-0.01141357421875,
0.01149749755859375,
-0.026123046875,
-0.06005859375,
-0.0186614990234375,
-0.03662109375,
0.0159759521484375,
-0.00926971435546875,
-0.01502227783203125,
-0.0225677490234375,
-0.08050537109375,
0.05712890625,
-0.0064544677734375,
-0.0124969482421875,
0.01055145263671875,
0.057342529296875,
0.007602691650390625,
-0.032257080078125,
-0.0109405517578125,
-0.0098724365234375,
0.030487060546875,
-0.0213470458984375,
0.0576171875,
0.0247802734375,
-0.0010986328125,
0.0650634765625,
-0.014068603515625,
-0.00030922889709472656,
-0.002349853515625,
0.0228729248046875,
-0.0160980224609375,
-0.0244293212890625,
0.0034961700439453125,
-0.03564453125,
-0.0010223388671875,
0.035308837890625,
0.0098876953125,
-0.006984710693359375,
0.005329132080078125,
-0.0007081031799316406,
0.01123809814453125,
-0.0228271484375,
-0.0036525726318359375,
-0.006778717041015625,
0.0034198760986328125,
-0.0030117034912109375,
0.0677490234375,
0.027313232421875,
0.00726318359375,
0.0253753662109375,
0.042999267578125,
0.010406494140625,
-0.05499267578125,
-0.00981903076171875,
-0.02423095703125,
0.055755615234375,
-0.063232421875,
-0.00118255615234375,
-0.02764892578125,
-0.0173797607421875,
0.122802734375,
0.052459716796875,
-0.0341796875,
0.0249176025390625,
-0.0171661376953125,
-0.0675048828125,
-0.00634002685546875,
-0.02490234375,
0.03643798828125,
0.00392913818359375,
-0.01511383056640625,
0.0125732421875,
-0.062469482421875,
-0.0235595703125,
-0.054107666015625,
0.043853759765625,
-0.0021076202392578125,
0.01227569580078125,
0.0189361572265625,
0.07635498046875,
0.01438140869140625,
0.05523681640625,
-0.01444244384765625,
0.0175323486328125,
0.0165252685546875,
-0.00656890869140625,
0.01263427734375,
0.047882080078125,
0.0184326171875,
-0.038848876953125,
0.014312744140625,
-0.0240020751953125,
-0.0233612060546875,
0.0219573974609375,
0.031982421875,
0.019927978515625,
-0.006336212158203125,
0.004619598388671875,
0.0010633468627929688,
-0.018280029296875,
0.0081939697265625,
0.0149688720703125,
-0.021209716796875,
-0.0340576171875,
-0.021942138671875,
0.01715087890625,
0.024017333984375,
-0.033599853515625,
0.0214691162109375,
-0.03057861328125,
0.04608154296875,
0.0236358642578125,
0.010284423828125,
0.01267242431640625,
-0.0037784576416015625,
-0.0172271728515625,
-0.047760009765625,
-0.012359619140625,
-0.026123046875,
0.0296783447265625,
-0.035736083984375,
-0.014984130859375,
0.043975830078125,
-0.01654052734375,
0.021759033203125,
0.00646209716796875,
-0.0273895263671875,
0.06964111328125,
-0.00012826919555664062,
0.05596923828125,
0.005512237548828125,
-0.038726806640625,
-0.0217437744140625,
-0.047607421875,
0.005008697509765625,
0.0419921875,
0.00951385498046875,
-0.00930023193359375,
-0.01465606689453125,
0.039642333984375,
0.02813720703125,
0.00850677490234375,
-0.0255279541015625,
-0.044830322265625,
0.0036067962646484375,
0.0287933349609375,
0.0206146240234375,
-0.01363372802734375,
0.050445556640625,
-0.01435089111328125,
0.053558349609375,
-0.0010356903076171875,
0.0224609375,
-0.014495849609375,
-0.0169525146484375,
0.013885498046875,
-0.04583740234375,
-0.0220794677734375,
-0.035919189453125,
-0.0095062255859375,
0.0236968994140625,
0.0438232421875,
-0.014190673828125,
-0.01548004150390625,
0.0004954338073730469,
0.01297760009765625,
-0.0310821533203125,
0.0150604248046875,
0.0052490234375,
0.0027103424072265625,
-0.01291656494140625,
0.034881591796875,
0.045166015625,
-0.039093017578125,
-0.018951416015625,
-0.021575927734375,
0.025848388671875,
-0.002410888671875,
-0.01548004150390625,
-0.02044677734375,
0.01381683349609375,
0.07281494140625,
0.0122528076171875,
0.053558349609375,
-0.0000979304313659668,
0.0079193115234375,
0.050872802734375,
-0.0033626556396484375,
-0.0450439453125,
-0.001697540283203125,
0.011474609375,
-0.001773834228515625,
-0.0007867813110351562,
0.023895263671875,
-0.0145721435546875,
0.0167083740234375,
0.0980224609375,
0.0894775390625,
-0.11541748046875,
-0.006420135498046875,
0.0216217041015625,
-0.0325927734375,
0.00103759765625,
0.00980377197265625,
-0.021759033203125,
-0.029510498046875,
0.006305694580078125,
-0.003139495849609375,
-0.026519775390625,
-0.0013828277587890625,
0.039337158203125,
0.0003654956817626953,
0.0010776519775390625,
0.05010986328125,
-0.00994873046875,
-0.06085205078125,
-0.0310211181640625,
0.0263824462890625,
-0.036468505859375,
-0.01320648193359375,
0.0244293212890625,
-0.00740814208984375,
-0.0046234130859375,
-0.042449951171875,
0.0106658935546875,
-0.0060272216796875,
-0.006816864013671875,
0.0171356201171875,
-0.0008959770202636719,
0.0276947021484375,
0.0809326171875,
-0.0161895751953125,
0.004909515380859375,
0.0582275390625,
-0.039947509765625,
0.0290374755859375,
-0.026123046875,
0.0004754066467285156,
-0.0278472900390625,
-0.0234222412109375,
-0.001949310302734375,
-0.0267181396484375,
-0.021514892578125,
-0.01473236083984375,
-0.0011816024780273438,
0.08941650390625,
-0.0487060546875,
-0.021881103515625,
0.0173187255859375,
0.0075225830078125,
-0.0013055801391601562,
-0.014190673828125,
0.034698486328125,
-0.0083160400390625,
0.03277587890625,
-0.01555633544921875,
0.039825439453125,
-0.0012483596801757812,
-0.0445556640625,
-0.02203369140625,
0.0706787109375,
0.013580322265625,
-0.0247955322265625,
0.006023406982421875,
0.0430908203125,
-0.02001953125,
0.039093017578125,
-0.005947113037109375,
0.057647705078125,
0.047576904296875,
-0.00850677490234375,
-0.0161895751953125,
-0.01108551025390625,
0.004566192626953125,
0.0548095703125,
0.07232666015625,
0.0275115966796875,
-0.08026123046875,
0.026611328125,
0.09588623046875,
0.04632568359375,
0.0273284912109375,
0.068359375,
-0.0019378662109375,
-0.0015621185302734375,
0.053436279296875,
-0.0419921875,
0.01525115966796875,
0.0069732666015625,
0.0005931854248046875,
-0.003856658935546875,
0.014984130859375,
-0.0120086669921875,
0.0011882781982421875,
-0.034393310546875,
-0.047088623046875,
0.02606201171875,
0.01445770263671875,
0.03729248046875,
0.03106689453125,
-0.00522613525390625,
0.01232147216796875,
-0.0267791748046875,
0.023040771484375,
-0.02685546875,
0.04241943359375,
-0.0142669677734375,
-0.0041351318359375,
0.01026153564453125,
0.0058135986328125,
-0.005992889404296875,
0.0007376670837402344,
-0.00040459632873535156,
0.0205078125,
-0.0014581680297851562,
0.03643798828125,
0.0294647216796875,
0.009002685546875,
-0.0263824462890625,
0.001636505126953125,
0.03460693359375,
0.041717529296875,
-0.037017822265625,
-0.028564453125,
-0.0238189697265625,
-0.0251922607421875,
0.03582763671875,
-0.0254058837890625,
0.0249176025390625,
-0.02618408203125,
-0.037017822265625,
0.01328277587890625,
0.01263427734375,
0.0280303955078125,
0.01300811767578125,
0.014617919921875,
0.03118896484375,
-0.07000732421875,
0.02142333984375,
-0.03271484375,
-0.0312042236328125,
-0.0004849433898925781,
0.04986572265625,
0.026275634765625,
0.0504150390625,
0.01593017578125,
-0.0325927734375,
0.0208892822265625,
0.020294189453125,
0.02569580078125,
-0.040802001953125,
-0.000942230224609375,
-0.044281005859375,
0.038238525390625,
0.036102294921875,
0.04058837890625,
0.0013513565063476562,
0.029998779296875,
0.01294708251953125,
-0.002155303955078125,
0.00634002685546875,
0.01491546630859375,
-0.0211334228515625,
0.045196533203125,
-0.041656494140625,
0.014190673828125,
0.00904083251953125,
-0.00986480712890625,
-0.01139068603515625,
-0.038818359375,
0.055908203125,
0.0270538330078125,
0.037841796875,
0.003265380859375,
-0.021392822265625,
-0.011199951171875,
-0.0280609130859375,
0.04144287109375,
0.032012939453125,
-0.028717041015625,
-0.01308441162109375,
0.01079559326171875,
-0.02020263671875,
0.0155487060546875,
0.03057861328125,
0.00859832763671875,
0.0034656524658203125,
0.0244598388671875,
-0.0172271728515625,
0.03631591796875,
0.00559234619140625,
-0.0101165771484375,
-0.0153350830078125,
0.0164031982421875,
-0.017303466796875,
-0.035858154296875,
-0.015106201171875,
-0.0174713134765625,
0.023681640625,
-0.005340576171875,
0.0933837890625,
-0.033905029296875,
-0.0010986328125,
-0.016845703125,
-0.0181732177734375,
0.018890380859375,
-0.01280975341796875,
-0.0005502700805664062,
0.013092041015625,
-0.0018873214721679688,
-0.007488250732421875,
-0.06890869140625,
0.0173797607421875,
-0.0046234130859375,
-0.02130126953125,
0.023193359375,
-0.00640869140625,
0.0089263916015625,
-0.00554656982421875,
-0.014801025390625,
-0.049041748046875,
-0.07720947265625,
-0.04376220703125,
0.040252685546875,
-0.01395416259765625,
0.0074310302734375,
-0.0302276611328125,
0.06597900390625,
-0.038360595703125,
0.0073394775390625,
-0.0211029052734375,
-0.046783447265625,
-0.051483154296875,
0.01934814453125,
-0.026123046875,
-0.0030956268310546875,
0.0207061767578125,
-0.018280029296875,
0.0231170654296875,
-0.007755279541015625,
0.0228729248046875,
0.00044083595275878906,
0.0062255859375,
-0.050994873046875,
-0.0189056396484375,
-0.011688232421875,
0.007701873779296875,
-0.0077362060546875,
-0.01093292236328125,
-0.0347900390625,
-0.0360107421875,
-0.019317626953125,
-0.0191650390625,
-0.01233673095703125,
-0.006542205810546875,
0.00640869140625,
0.00881195068359375,
-0.05731201171875,
-0.004688262939453125,
-0.012725830078125,
0.0155487060546875,
-0.03387451171875,
-0.006740570068359375,
-0.0262451171875,
-0.034393310546875,
0.06353759765625,
-0.05242919921875,
0.046356201171875,
0.017547607421875,
0.049468994140625,
-0.0859375,
-0.00873565673828125,
-0.011016845703125,
-0.004741668701171875,
-0.04754638671875,
0.024322509765625,
0.056610107421875,
-0.0115814208984375,
-0.006862640380859375,
-0.01666259765625,
-0.0237274169921875,
0.036865234375,
-0.05303955078125,
0.0006256103515625,
0.0163421630859375,
0.0170135498046875,
-0.048004150390625,
-0.0308685302734375,
0.0185546875,
-0.0125579833984375,
-0.01001739501953125,
-0.002292633056640625,
0.007358551025390625,
0.0007419586181640625,
-0.04052734375,
-0.08184814453125,
0.0626220703125,
-0.011077880859375,
-0.0289154052734375,
-0.037109375,
0.005374908447265625,
-0.00763702392578125,
0.020782470703125,
-0.00583648681640625,
-0.0235595703125,
-0.01678466796875,
0.0282135009765625,
0.0189208984375,
0.058258056640625,
-0.0242919921875,
0.06396484375,
0.0028133392333984375,
0.059051513671875,
0.02899169921875,
-0.00311279296875,
0.004886627197265625,
0.006114959716796875,
0.036163330078125,
0.070556640625,
0.013458251953125,
0.046722412109375,
0.00005435943603515625,
-0.052886962890625,
-0.0027904510498046875,
-0.036651611328125,
-0.017364501953125,
-0.051971435546875,
0.02447509765625,
-0.0050506591796875,
0.0037937164306640625,
0.01016998291015625,
-0.06719970703125,
-0.0304412841796875,
0.003345489501953125,
-0.0189056396484375,
0.0035915374755859375,
-0.0294036865234375,
0.026458740234375,
-0.0254974365234375,
-0.006267547607421875,
-0.0160675048828125,
-0.004016876220703125,
-0.045867919921875,
-0.003635406494140625,
-0.01324462890625,
-0.0141754150390625,
-0.0180816650390625,
0.029266357421875,
0.08111572265625,
-0.0513916015625,
0.01348114013671875,
-0.01503753662109375,
0.0258941650390625,
0.028717041015625,
-0.07281494140625,
0.0192108154296875,
0.03955078125,
0.00951385498046875,
-0.011932373046875,
0.02935791015625,
-0.035736083984375,
0.00787353515625,
-0.01476287841796875,
-0.0181427001953125,
0.035430908203125,
0.0111541748046875,
0.037322998046875,
-0.00897979736328125,
0.0304412841796875,
0.0298919677734375,
0.00962066650390625,
-0.0124969482421875,
-0.04669189453125,
-0.0259857177734375,
0.05816650390625,
-0.021575927734375,
-0.01503753662109375,
0.0240020751953125,
-0.042510986328125,
0.01715087890625,
0.05877685546875,
0.00835418701171875,
0.027801513671875,
-0.0106353759765625,
-0.06463623046875,
-0.003231048583984375,
-0.0170440673828125
]
|
d2068e3417d4518e1e2ebb9ca0a525862e9f9fbc | Wordpress Stackexchange
Q: Can I use MariaDB instead of MySQL in wordpress? Is it possible to use MariaDB instead of MySQL in Wordpress installation?
If possible: how do I do that?
Is there any drawback or complexities?
A: To answer your exact questions:
*
*Yes.
*Just use MariaDB instead of MySQL.
*No, it is a straight replacement.
The exact details depend heavily upon your exact situation. However, MariaDB is marketed as a compatible MySQL replacement. AFAIK, it works with WordPress with no changes at all.
| Q: Can I use MariaDB instead of MySQL in wordpress? Is it possible to use MariaDB instead of MySQL in Wordpress installation?
If possible: how do I do that?
Is there any drawback or complexities?
A: To answer your exact questions:
*
*Yes.
*Just use MariaDB instead of MySQL.
*No, it is a straight replacement.
The exact details depend heavily upon your exact situation. However, MariaDB is marketed as a compatible MySQL replacement. AFAIK, it works with WordPress with no changes at all.
| wordpress | {
"language": "en",
"length": 83,
"provenance": "stackexchange_00019.jsonl.gz:439197",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123225"
} | [
0.034912109375,
-0.00710296630859375,
0.0031909942626953125,
-0.0174713134765625,
0.0160980224609375,
-0.031951904296875,
0.06585693359375,
-0.0036869049072265625,
0.033905029296875,
0.0273284912109375,
-0.0098724365234375,
-0.02581787109375,
0.0254669189453125,
-0.0225830078125,
-0.02325439453125,
-0.007572174072265625,
0.03839111328125,
-0.019775390625,
0.00327301025390625,
-0.006000518798828125,
-0.0081634521484375,
0.013458251953125,
0.0206146240234375,
0.00879669189453125,
0.04541015625,
-0.0120849609375,
0.03607177734375,
-0.03656005859375,
0.03594970703125,
-0.006572723388671875,
0.03363037109375,
-0.01514434814453125,
0.0207061767578125,
0.0112762451171875,
0.0161590576171875,
0.045196533203125,
-0.02716064453125,
0.0269012451171875,
0.03216552734375,
-0.0005025863647460938,
0.0161590576171875,
-0.0121612548828125,
0.0286712646484375,
0.0146026611328125,
0.012359619140625,
-0.035247802734375,
0.02935791015625,
-0.05230712890625,
-0.007266998291015625,
-0.07037353515625,
0.0003154277801513672,
-0.00704193115234375,
0.0374755859375,
-0.05029296875,
-0.0195465087890625,
0.01229095458984375,
0.0132598876953125,
0.039520263671875,
0.0017385482788085938,
-0.01258087158203125,
-0.005985260009765625,
0.05169677734375,
0.00524139404296875,
0.039520263671875,
0.0101470947265625,
-0.0028896331787109375,
-0.01776123046875,
0.0301513671875,
0.01538848876953125,
0.00982666015625,
0.005908966064453125,
-0.015045166015625,
-0.03955078125,
-0.006038665771484375,
-0.034088134765625,
0.040252685546875,
0.0411376953125,
-0.0114898681640625,
-0.01544189453125,
0.01702880859375,
0.0033473968505859375,
0.0204925537109375,
-0.03057861328125,
-0.043304443359375,
0.0205841064453125,
-0.011932373046875,
-0.01251983642578125,
-0.0171356201171875,
-0.034576416015625,
-0.047882080078125,
-0.01727294921875,
-0.0517578125,
-0.10174560546875,
0.043243408203125,
0.0184478759765625,
-0.0118865966796875,
-0.0233154296875,
-0.0294647216796875,
-0.0048065185546875,
0.0023860931396484375,
-0.00836944580078125,
-0.018157958984375,
0.0167083740234375,
-0.00827789306640625,
-0.009979248046875,
0.00681304931640625,
0.01525115966796875,
-0.0340576171875,
-0.00258636474609375,
0.0225677490234375,
-0.0285797119140625,
0.0042724609375,
0.0116729736328125,
-0.024749755859375,
-0.01314544677734375,
0.044921875,
0.01593017578125,
-0.022613525390625,
-0.00714111328125,
-0.0161895751953125,
0.0017881393432617188,
0.016326904296875,
-0.04119873046875,
-0.0050048828125,
0.0135650634765625,
-0.0184783935546875,
-0.0328369140625,
0.041534423828125,
-0.0941162109375,
0.0831298828125,
-0.01641845703125,
-0.0225067138671875,
0.049407958984375,
0.06640625,
-0.006320953369140625,
-0.03173828125,
0.02130126953125,
-0.0003445148468017578,
0.01494598388671875,
0.0163421630859375,
0.0289764404296875,
-0.0692138671875,
-0.04736328125,
0.039642333984375,
0.011199951171875,
-0.01515960693359375,
0.033477783203125,
0.050628662109375,
-0.006862640380859375,
0.013397216796875,
-0.0075531005859375,
0.047210693359375,
-0.0296630859375,
0.0189971923828125,
0.0738525390625,
0.027496337890625,
0.007297515869140625,
0.0166778564453125,
0.0204010009765625,
0.052215576171875,
-0.01148223876953125,
0.021148681640625,
0.061920166015625,
0.002685546875,
-0.0080413818359375,
-0.0216522216796875,
-0.04254150390625,
-0.01245880126953125,
0.0234375,
-0.039093017578125,
0.0143280029296875,
-0.01016998291015625,
0.0638427734375,
-0.011199951171875,
-0.01279449462890625,
0.0103302001953125,
-0.0064239501953125,
0.061248779296875,
0.028411865234375,
0.03643798828125,
0.0202789306640625,
-0.0298004150390625,
0.09552001953125,
-0.026611328125,
-0.035125732421875,
0.052520751953125,
-0.001552581787109375,
0.0643310546875,
0.0275115966796875,
0.01220703125,
-0.01103973388671875,
0.00550079345703125,
-0.0205230712890625,
0.0718994140625,
-0.0010690689086914062,
-0.0626220703125,
-0.038360595703125,
-0.01605224609375,
-0.0208587646484375,
-0.019317626953125,
0.0465087890625,
0.03485107421875,
-0.053466796875,
0.007221221923828125,
-0.127197265625,
0.01904296875,
-0.03759765625,
0.0261688232421875,
0.003757476806640625,
0.021331787109375,
0.00921630859375,
-0.00035762786865234375,
-0.02520751953125,
0.0045013427734375,
-0.0364990234375,
-0.01904296875,
0.0092926025390625,
0.052001953125,
0.00701141357421875,
0.033172607421875,
-0.0012359619140625,
-0.0161285400390625,
0.0004534721374511719,
-0.004344940185546875,
0.006500244140625,
-0.02618408203125,
-0.00029730796813964844,
-0.01247406005859375,
-0.0098114013671875,
-0.0004000663757324219,
-0.012359619140625,
0.04058837890625,
-0.044342041015625,
-0.03326416015625,
-0.002605438232421875,
0.00632476806640625,
0.01203155517578125,
-0.07342529296875,
0.018768310546875,
0.041168212890625,
0.033172607421875,
-0.01177978515625,
-0.02166748046875,
-0.00711822509765625,
0.006805419921875,
-0.050048828125,
0.01229095458984375,
-0.00193023681640625,
-0.003753662109375,
0.0294036865234375,
-0.00547027587890625,
-0.012115478515625,
-0.0064544677734375,
-0.037567138671875,
-0.001613616943359375,
0.019561767578125,
0.030364990234375,
0.01496124267578125,
-0.002288818359375,
0.0117950439453125,
0.0037097930908203125,
0.0399169921875,
-0.0201263427734375,
0.02532958984375,
0.00011295080184936523,
0.02557373046875,
0.04656982421875,
0.03680419921875,
-0.0053863525390625,
-0.00518798828125,
0.0045166015625,
0.01224517822265625,
0.0178680419921875,
0.00443267822265625,
-0.048065185546875,
0.061187744140625,
-0.02545166015625,
-0.01392364501953125,
0.0455322265625,
0.0218963623046875,
-0.029449462890625,
-0.019683837890625,
-0.0501708984375,
-0.009002685546875,
0.0009374618530273438,
-0.06298828125,
0.0117340087890625,
0.01458740234375,
-0.0552978515625,
-0.007015228271484375,
0.032470703125,
0.018096923828125,
-0.0283966064453125,
-0.003631591796875,
-0.0220184326171875,
-0.007030487060546875,
0.0302581787109375,
-0.0026149749755859375,
0.00614166259765625,
-0.00262451171875,
0.0139312744140625,
0.04071044921875,
-0.0017786026000976562,
0.01111602783203125,
0.0020351409912109375,
0.00444793701171875,
0.038818359375,
-0.004627227783203125,
-0.006221771240234375,
0.0030193328857421875,
-0.0699462890625,
-0.046173095703125,
0.01004791259765625,
0.0104522705078125,
0.0169525146484375,
-0.01335906982421875,
0.01055145263671875,
0.0128326416015625,
-0.06439208984375,
-0.07489013671875,
-0.01336669921875,
-0.00635528564453125,
-0.028106689453125,
0.0182647705078125,
-0.004177093505859375,
0.00566864013671875,
0.0177001953125,
-0.00426483154296875,
0.029083251953125,
-0.0087738037109375,
-0.05963134765625,
-0.04559326171875,
-0.06988525390625,
-0.0175018310546875,
-0.0084991455078125,
0.0230560302734375,
0.01123809814453125,
0.0242462158203125,
-0.00466156005859375,
-0.04986572265625,
-0.0221710205078125,
-0.03802490234375,
-0.005092620849609375,
0.0039043426513671875,
0.048187255859375,
-0.04180908203125,
-0.035308837890625,
-0.001499176025390625,
0.0831298828125,
0.0270233154296875,
-0.053253173828125,
0.0225982666015625,
-0.0104827880859375,
0.030853271484375,
0.0085906982421875,
-0.05450439453125,
0.007366180419921875,
0.055389404296875,
-0.00860595703125,
-0.02508544921875,
-0.02557373046875,
0.0283203125,
-0.0254669189453125,
-0.051361083984375,
-0.02587890625,
-0.01165008544921875,
-0.01141357421875,
0.002227783203125,
0.044677734375,
0.0167999267578125,
-0.0149993896484375,
-0.0181427001953125,
0.0244140625,
0.02374267578125,
0.06182861328125,
-0.01080322265625,
0.0060577392578125,
-0.04376220703125,
0.0168914794921875,
-0.00839996337890625,
-0.01073455810546875,
-0.02490234375,
0.01264190673828125,
-0.040802001953125,
-0.032135009765625,
0.04833984375,
-0.02313232421875,
0.010650634765625,
-0.0107879638671875,
-0.037109375,
0.02197265625,
0.11016845703125,
-0.01959228515625,
-0.0305328369140625,
0.0269317626953125,
0.0246429443359375,
-0.05535888671875,
0.006763458251953125,
-0.057830810546875,
-0.003875732421875,
0.0045166015625,
-0.038726806640625,
-0.0077056884765625,
-0.031005859375,
0.00531768798828125,
0.0024394989013671875,
0.0199127197265625,
-0.006702423095703125,
0.01837158203125,
-0.03802490234375,
0.009552001953125,
0.0150604248046875,
-0.0015935897827148438,
-0.004543304443359375,
0.01155853271484375,
-0.051361083984375,
-0.0887451171875,
-0.01180267333984375,
-0.07159423828125,
0.0869140625,
0.02398681640625,
0.0270538330078125,
-0.03204345703125,
0.02630615234375,
0.0163116455078125,
0.038787841796875,
-0.00351715087890625,
-0.003814697265625,
-0.0031375885009765625,
-0.03460693359375,
0.00646209716796875,
-0.032684326171875,
-0.016082763671875,
-0.04144287109375,
0.0178070068359375,
-0.00020682811737060547,
-0.03289794921875,
0.033966064453125,
-0.038055419921875,
0.010284423828125,
-0.0247344970703125,
-0.0130157470703125,
0.006359100341796875,
0.0322265625,
-0.0113677978515625,
0.012664794921875,
-0.0265655517578125,
-0.03509521484375,
0.049346923828125,
0.01959228515625,
0.003475189208984375,
-0.0184173583984375,
0.0712890625,
0.017669677734375,
-0.036468505859375,
-0.007434844970703125,
0.0025787353515625,
0.0086517333984375,
-0.0231781005859375,
0.05126953125,
-0.0107574462890625,
-0.005748748779296875,
0.0408935546875,
-0.0249176025390625,
-0.0277252197265625,
-0.002300262451171875,
0.0200653076171875,
0.01351165771484375,
-0.00641632080078125,
-0.0014963150024414062,
-0.00576019287109375,
0.028076171875,
0.053436279296875,
0.0162506103515625,
-0.00015091896057128906,
0.049346923828125,
-0.0111846923828125,
-0.006744384765625,
-0.05810546875,
-0.0105743408203125,
-0.0333251953125,
0.0126190185546875,
-0.07818603515625,
0.035980224609375,
0.011077880859375,
-0.00896453857421875,
0.01340484619140625,
0.01151275634765625,
-0.020172119140625,
0.0213623046875,
0.01611328125,
0.0160980224609375,
0.029632568359375,
0.01081085205078125,
-0.0189361572265625,
-0.0106658935546875,
-0.01474761962890625,
0.07501220703125,
0.012298583984375,
-0.055145263671875,
0.0032405853271484375,
-0.0299072265625,
0.004589080810546875,
0.021209716796875,
-0.03131103515625,
0.020050048828125,
0.02252197265625,
-0.040863037109375,
0.0014581680297851562,
-0.0005116462707519531,
-0.044097900390625,
-0.03387451171875,
0.0175628662109375,
-0.0034809112548828125,
0.004955291748046875,
-0.010833740234375,
0.058258056640625,
-0.00450897216796875,
0.020599365234375,
-0.01094818115234375,
0.04437255859375,
0.0364990234375,
0.019256591796875,
-0.01358795166015625,
0.0220184326171875,
0.0041656494140625,
0.0051422119140625,
0.0205078125,
-0.030914306640625,
-0.00740814208984375,
-0.007190704345703125,
0.0426025390625,
-0.0247344970703125,
-0.01186370849609375,
0.0276031494140625,
-0.01158905029296875,
-0.01340484619140625,
-0.009429931640625,
-0.071533203125,
-0.018707275390625,
-0.0200347900390625,
0.00394439697265625,
0.033599853515625,
-0.00707244873046875,
-0.0201873779296875,
-0.0057220458984375,
-0.032928466796875,
0.027862548828125,
-0.021331787109375,
0.03619384765625,
-0.0029888153076171875,
-0.024627685546875,
0.03704833984375,
-0.034027099609375,
-0.066162109375,
0.031829833984375,
0.0184326171875,
-0.0190582275390625,
-0.006046295166015625,
0.0289306640625,
-0.01345062255859375,
0.00907135009765625,
-0.01934814453125,
0.00024580955505371094,
-0.06439208984375,
-0.00753021240234375,
0.063232421875,
0.04266357421875,
0.0116729736328125,
-0.04052734375,
-0.050384521484375,
-0.0401611328125,
-0.03179931640625,
-0.00543975830078125,
-0.03955078125,
0.017364501953125,
0.00853729248046875,
0.017364501953125,
-0.016510009765625,
-0.0244598388671875,
-0.00862884521484375,
0.020904541015625,
0.01247406005859375,
0.0296783447265625,
-0.021514892578125,
0.038604736328125,
0.0179595947265625,
0.025390625,
0.0252227783203125,
0.03387451171875,
0.0127410888671875,
-0.034332275390625,
0.022552490234375,
-0.038360595703125,
-0.033050537109375,
-0.0284423828125,
0.00559234619140625,
-0.00872039794921875,
-0.0245513916015625,
-0.01340484619140625,
-0.0040283203125,
-0.0134124755859375,
-0.003047943115234375,
-0.0311737060546875,
0.0167083740234375,
-0.01751708984375,
0.0040435791015625,
-0.00756072998046875,
-0.026519775390625,
0.0173492431640625,
-0.0207672119140625,
-0.020904541015625,
0.01561737060546875,
-0.0128326416015625,
-0.007434844970703125,
0.027191162109375,
-0.002635955810546875,
0.051055908203125,
0.0579833984375,
-0.039093017578125,
0.006847381591796875,
0.031524658203125,
-0.0188751220703125,
-0.0077362060546875,
0.0122833251953125,
-0.061370849609375,
-0.01131439208984375,
0.026519775390625,
0.01444244384765625,
-0.0268707275390625,
0.0113983154296875,
-0.021820068359375,
0.0015478134155273438,
0.06341552734375,
0.06634521484375,
-0.0465087890625,
-0.01531982421875,
0.0247802734375,
-0.05792236328125,
-0.05035400390625,
-0.0215606689453125,
-0.01580810546875,
-0.02154541015625,
0.0305938720703125,
0.03228759765625,
-0.026641845703125,
-0.01213836669921875,
0.010223388671875,
-0.0160980224609375,
-0.0367431640625,
0.04278564453125,
0.0220489501953125,
0.01751708984375,
0.03375244140625,
-0.02239990234375,
0.050445556640625,
-0.007419586181640625,
0.031402587890625,
-0.0070648193359375,
-0.024261474609375,
-0.0352783203125,
0.01053619384765625,
-0.004909515380859375,
-0.0030384063720703125,
-0.01593017578125,
0.055816650390625,
0.0285491943359375,
0.02008056640625,
0.02227783203125,
-0.034210205078125,
0.0030059814453125,
0.0038356781005859375,
-0.014984130859375,
0.017364501953125,
0.035308837890625,
0.00673675537109375,
-0.0214080810546875,
0.01392364501953125,
-0.054412841796875,
-0.006683349609375,
0.0093994140625,
0.0439453125,
0.05572509765625,
-0.0276031494140625,
-0.0222625732421875,
0.040557861328125,
-0.006458282470703125,
-0.010711669921875,
-0.0032672882080078125,
0.0224151611328125,
-0.047149658203125,
-0.03460693359375,
0.01464080810546875,
-0.0333251953125,
-0.01244354248046875,
-0.006351470947265625,
-0.0625,
0.09613037109375,
0.0146636962890625,
0.0034885406494140625,
0.00423431396484375,
0.042724609375,
-0.046173095703125,
0.00859832763671875,
0.004642486572265625,
0.0292510986328125,
-0.0213623046875,
0.0184478759765625,
-0.00556182861328125,
0.005931854248046875,
0.0164794921875,
0.01739501953125,
-0.0148162841796875,
-0.007518768310546875,
-0.036956787109375,
0.00797271728515625,
0.0382080078125,
0.051025390625,
0.0362548828125,
0.008575439453125,
-0.019012451171875,
-0.0302734375,
0.044464111328125,
-0.0213775634765625,
0.005764007568359375,
0.02264404296875,
-0.005565643310546875,
-0.00879669189453125,
0.00988006591796875,
0.0194244384765625,
0.01227569580078125,
-0.00040078163146972656,
-0.0030670166015625,
-0.0029277801513671875,
0.0093994140625,
-0.041656494140625,
0.011016845703125,
0.00952911376953125,
0.0096435546875,
-0.0478515625,
-0.019287109375,
-0.022369384765625,
0.043792724609375,
-0.006793975830078125,
-0.027984619140625,
0.0021915435791015625,
-0.01177215576171875,
0.02825927734375,
0.009490966796875,
-0.03125,
0.01276397705078125,
0.03424072265625,
0.027191162109375,
0.040802001953125,
0.0209197998046875,
-0.00997161865234375,
0.038970947265625,
0.0499267578125,
0.03326416015625,
-0.054931640625,
-0.00948333740234375,
0.019317626953125,
0.018341064453125,
0.005947113037109375,
-0.017791748046875,
0.0008497238159179688,
0.0032291412353515625,
0.0191650390625,
0.004474639892578125,
-0.0128021240234375,
0.0157928466796875,
-0.027557373046875,
0.01215362548828125,
0.0672607421875,
0.0240325927734375,
0.0145111083984375,
-0.0104522705078125,
-0.01003265380859375,
0.0087432861328125,
0.050750732421875,
0.00838470458984375,
0.0347900390625,
-0.01873779296875,
-0.0310516357421875,
-0.00739288330078125,
0.0237884521484375,
-0.04656982421875,
0.028533935546875,
-0.07275390625,
-0.07196044921875,
-0.00394439697265625,
0.065673828125,
-0.00974273681640625,
0.07012939453125,
0.0202484130859375,
0.03924560546875,
0.04473876953125,
0.01078033447265625,
0.068115234375,
-0.01534271240234375,
-0.0008263587951660156,
-0.028961181640625,
-0.0193939208984375,
0.016326904296875,
-0.01548004150390625,
0.01116943359375,
0.014556884765625,
0.02142333984375,
0.0152130126953125,
0.0111236572265625,
0.0180816650390625,
-0.02557373046875,
0.00893402099609375,
0.0289306640625,
0.049102783203125,
0.041290283203125,
-0.0036144256591796875,
-0.039794921875,
0.01617431640625,
0.0504150390625,
-0.01678466796875,
0.0100860595703125,
0.035125732421875,
0.0009694099426269531,
0.0250244140625,
-0.02166748046875,
0.0176239013671875,
0.0347900390625,
-0.04473876953125,
-0.0611572265625,
0.04132080078125,
-0.05120849609375,
-0.0157623291015625,
-0.010467529296875,
0.005054473876953125,
0.03106689453125,
-0.011199951171875,
0.05389404296875,
-0.0186920166015625,
0.016265869140625,
-0.02020263671875,
0.032257080078125,
-0.028717041015625,
-0.015472412109375,
-0.00629425048828125,
0.0229034423828125,
0.0323486328125,
-0.00902557373046875,
0.0297698974609375,
0.0111846923828125,
0.0235443115234375,
-0.057373046875,
-0.01175689697265625,
-0.02935791015625,
0.0166473388671875,
-0.0015583038330078125,
-0.0017642974853515625,
-0.023651123046875,
-0.018035888671875,
-0.00882720947265625,
0.00624847412109375,
0.0262451171875,
0.0169219970703125,
-0.00402069091796875,
0.0276947021484375,
-0.015655517578125,
0.006793975830078125,
-0.0021877288818359375,
-0.0186767578125,
-0.007076263427734375,
0.0399169921875,
-0.04400634765625,
-0.021148681640625,
0.007602691650390625,
-0.0160369873046875,
-0.01219940185546875,
0.00971221923828125,
0.0193023681640625,
0.0226898193359375,
-0.08648681640625,
0.0007495880126953125,
0.0374755859375,
0.04071044921875,
-0.0104217529296875,
0.0180206298828125,
0.0168304443359375,
-0.017608642578125,
0.023651123046875,
0.050506591796875,
-0.0209808349609375,
0.01270294189453125,
-0.023956298828125,
-0.00679779052734375,
-0.0199737548828125,
-0.05755615234375,
-0.08380126953125,
-0.00815582275390625,
0.0263671875,
-0.00363922119140625,
-0.026123046875,
0.006084442138671875,
-0.0200958251953125,
0.004421234130859375,
-0.029449462890625,
-0.05426025390625,
0.0115966796875,
0.01338958740234375,
0.00771331787109375,
-0.06964111328125,
-0.0284271240234375,
0.065185546875,
-0.0169525146484375,
0.035736083984375,
0.048431396484375,
-0.018890380859375,
0.0264434814453125,
0.02923583984375,
0.01482391357421875,
0.085693359375,
-0.037872314453125,
-0.02362060546875,
-0.01111602783203125,
-0.0102081298828125,
-0.0209808349609375,
-0.04266357421875,
0.035186767578125,
-0.089111328125,
-0.045135498046875,
-0.0821533203125,
0.0196990966796875,
-0.00957489013671875,
-0.048431396484375,
-0.09625244140625,
0.041412353515625,
-0.041656494140625,
-0.0227203369140625,
-0.031494140625,
-0.006198883056640625,
-0.0138702392578125,
0.027008056640625,
-0.0113525390625,
0.0002884864807128906,
-0.007717132568359375,
0.041656494140625,
0.045074462890625,
-0.00260162353515625,
0.0174560546875,
0.04388427734375,
-0.044769287109375,
0.058380126953125,
0.0276031494140625,
0.045654296875,
-0.00415802001953125,
0.0110015869140625,
0.014495849609375,
0.03826904296875,
-0.0206298828125,
0.033477783203125,
-0.005275726318359375,
-0.01155853271484375,
-0.0228729248046875,
0.032257080078125,
-0.029052734375,
0.0250091552734375,
0.07489013671875,
0.0908203125,
0.03240966796875,
-0.056243896484375,
-0.0229034423828125,
-0.04266357421875,
-0.0179443359375,
-0.00452423095703125,
0.026123046875,
-0.07440185546875,
0.0018787384033203125,
0.040435791015625,
-0.01168060302734375,
-0.001285552978515625,
0.01995849609375,
-0.0200653076171875,
-0.01113128662109375,
-0.0250244140625,
-0.050994873046875,
-0.034942626953125,
0.02215576171875,
0.0828857421875,
-0.064208984375,
-0.00949859619140625,
0.021636962890625,
-0.0119171142578125,
0.021209716796875,
0.0229034423828125,
-0.007205963134765625,
-0.03314208984375,
0.0467529296875,
0.0199127197265625,
0.0289306640625,
-0.0220794677734375,
0.050018310546875,
-0.01129150390625,
-0.021820068359375,
0.04290771484375,
0.0184783935546875,
0.063720703125,
-0.036376953125,
0.078125,
0.054779052734375,
-0.0003859996795654297,
0.00789642333984375,
-0.0567626953125,
-0.0330810546875,
0.041290283203125,
0.0021610260009765625,
-0.031951904296875,
0.024993896484375,
-0.02435302734375,
0.00647735595703125,
-0.029815673828125,
0.0002880096435546875,
-0.0382080078125,
-0.0043182373046875,
0.0110015869140625,
-0.0288543701171875,
0.02777099609375
]
|
10d1d9daaedfe9adf8b3fbc83183d8e046d3aa1b | Wordpress Stackexchange
Q: Add a YouTube or Vimeo video as a post attachment? I'm developing a gallery plugin and I was wondering if I could add a YouTube and Vimeo "embed" option to the media uploader to be able to add YouTube and Vimeo videos as attachments to a post instead of uploading the video files directly to the server. I'm thinking along the lines of an option with a textarea where one could put the YouTube or Vimeo HTML embed code and this would be added to the media library with a mime type of "text/html".
Any clues would be much appreciated
A: Attachment represents a file on your server that you may include its url in your content. All attachments are supposed to be in the media library. It is easy to see that by this definition your idea doesn't fit the wordpress attachment model (images that are off server are not attachments).
Your idea has merit but since it doesn't fit the wordpress model right now (version 3.7) I am not sure how easy it will be to implement it.
| Q: Add a YouTube or Vimeo video as a post attachment? I'm developing a gallery plugin and I was wondering if I could add a YouTube and Vimeo "embed" option to the media uploader to be able to add YouTube and Vimeo videos as attachments to a post instead of uploading the video files directly to the server. I'm thinking along the lines of an option with a textarea where one could put the YouTube or Vimeo HTML embed code and this would be added to the media library with a mime type of "text/html".
Any clues would be much appreciated
A: Attachment represents a file on your server that you may include its url in your content. All attachments are supposed to be in the media library. It is easy to see that by this definition your idea doesn't fit the wordpress attachment model (images that are off server are not attachments).
Your idea has merit but since it doesn't fit the wordpress model right now (version 3.7) I am not sure how easy it will be to implement it.
A: The OEmbed in Library plugin shows that it can be done. It just lacks a link on the media uploader.
| wordpress | {
"language": "en",
"length": 202,
"provenance": "stackexchange_00019.jsonl.gz:439275",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123465"
} | [
0.09375,
0.02410888671875,
-0.0141754150390625,
-0.032470703125,
0.043365478515625,
-0.042877197265625,
0.09197998046875,
-0.0161895751953125,
-0.00637054443359375,
0.02313232421875,
-0.0084686279296875,
0.00038743019104003906,
-0.027679443359375,
-0.01209259033203125,
-0.0305633544921875,
-0.0289154052734375,
0.0157012939453125,
0.07489013671875,
0.08245849609375,
0.0091400146484375,
0.0035762786865234375,
0.033660888671875,
0.031524658203125,
-0.02862548828125,
-0.003696441650390625,
0.04229736328125,
0.060089111328125,
-0.039215087890625,
0.0035266876220703125,
-0.01453399658203125,
0.008148193359375,
-0.01036834716796875,
0.040191650390625,
0.009735107421875,
-0.032196044921875,
0.003444671630859375,
0.039306640625,
-0.028076171875,
-0.01267242431640625,
0.0430908203125,
0.006595611572265625,
0.01495361328125,
0.0869140625,
0.017425537109375,
0.0211334228515625,
-0.0017805099487304688,
-0.0058441162109375,
-0.06103515625,
0.0079803466796875,
-0.0059661865234375,
-0.014739990234375,
0.007476806640625,
-0.01345062255859375,
-0.024139404296875,
0.00901031494140625,
-0.0017833709716796875,
-0.0406494140625,
0.0243072509765625,
0.0014400482177734375,
0.0193634033203125,
0.007457733154296875,
0.0176849365234375,
0.00136566162109375,
-0.00644683837890625,
-0.0216522216796875,
-0.00922393798828125,
-0.004222869873046875,
0.006992340087890625,
-0.037384033203125,
-0.03314208984375,
0.034332275390625,
-0.0162506103515625,
-0.01090240478515625,
-0.05047607421875,
-0.0005350112915039062,
0.008148193359375,
0.0301055908203125,
-0.009002685546875,
-0.0241241455078125,
0.0032253265380859375,
-0.00553131103515625,
0.0197601318359375,
0.059478759765625,
-0.057220458984375,
0.040863037109375,
-0.0112457275390625,
-0.0218505859375,
-0.01554107666015625,
-0.003192901611328125,
-0.0318603515625,
0.001964569091796875,
-0.0504150390625,
-0.01401519775390625,
0.01389312744140625,
-0.0114593505859375,
-0.0279083251953125,
0.0195770263671875,
0.01324462890625,
0.0031032562255859375,
0.0418701171875,
-0.0236053466796875,
-0.039886474609375,
0.054779052734375,
-0.0367431640625,
0.03228759765625,
0.00391387939453125,
-0.0157318115234375,
-0.063720703125,
0.0311431884765625,
0.0043792724609375,
-0.034637451171875,
0.1029052734375,
0.06695556640625,
0.004177093505859375,
-0.00875091552734375,
-0.053070068359375,
0.006649017333984375,
0.028594970703125,
0.0059814453125,
-0.023681640625,
-0.0211334228515625,
0.00205230712890625,
-0.006130218505859375,
-0.00946044921875,
0.014007568359375,
0.0031108856201171875,
-0.005252838134765625,
0.0005559921264648438,
0.0181884765625,
0.036468505859375,
-0.029144287109375,
0.010955810546875,
0.051239013671875,
0.0089111328125,
0.004009246826171875,
-0.0264129638671875,
-0.028717041015625,
-0.0011749267578125,
0.0012979507446289062,
0.018463134765625,
-0.02471923828125,
-0.04266357421875,
0.0156402587890625,
0.00014781951904296875,
-0.0089874267578125,
0.006500244140625,
0.0061187744140625,
0.0250244140625,
-0.0006918907165527344,
-0.05291748046875,
0.037109375,
-0.04486083984375,
0.0290374755859375,
-0.004558563232421875,
0.018951416015625,
-0.0279998779296875,
0.0251312255859375,
-0.0271759033203125,
0.0101318359375,
-0.02276611328125,
0.00814056396484375,
0.006237030029296875,
0.0310516357421875,
-0.008026123046875,
-0.0031185150146484375,
-0.00867462158203125,
-0.047760009765625,
-0.0099029541015625,
0.02630615234375,
0.09307861328125,
-0.00868988037109375,
-0.03985595703125,
0.0151519775390625,
0.0106658935546875,
-0.035888671875,
0.000812530517578125,
0.01409149169921875,
0.01445770263671875,
0.006256103515625,
0.057342529296875,
0.03240966796875,
-0.004505157470703125,
0.07757568359375,
-0.032562255859375,
-0.0307159423828125,
0.0391845703125,
-0.006610870361328125,
0.02996826171875,
0.01959228515625,
0.0059814453125,
0.00702667236328125,
0.036956787109375,
0.007488250732421875,
-0.00412750244140625,
-0.005550384521484375,
-0.031768798828125,
0.001079559326171875,
-0.0098114013671875,
-0.0086669921875,
-0.0008344650268554688,
0.00677490234375,
0.0257110595703125,
-0.0003147125244140625,
0.01302337646484375,
0.00894927978515625,
0.0003218650817871094,
0.01097869873046875,
0.01561737060546875,
-0.045196533203125,
0.021881103515625,
0.0277099609375,
0.00823974609375,
-0.03759765625,
0.00720977783203125,
0.02386474609375,
0.0211639404296875,
-0.0126953125,
0.051361083984375,
-0.0186767578125,
0.06988525390625,
-0.047149658203125,
-0.0211639404296875,
-0.026092529296875,
-0.0239105224609375,
0.0244903564453125,
-0.00836944580078125,
-0.01384735107421875,
-0.0199737548828125,
0.0180206298828125,
0.0022449493408203125,
-0.033905029296875,
0.03875732421875,
0.006099700927734375,
-0.019500732421875,
-0.0489501953125,
-0.012237548828125,
-0.04840087890625,
-0.07391357421875,
0.003887176513671875,
0.0743408203125,
0.025543212890625,
0.0258026123046875,
0.004119873046875,
0.0160980224609375,
0.0731201171875,
0.0148162841796875,
0.01560211181640625,
-0.007358551025390625,
-0.005771636962890625,
0.0144500732421875,
0.01001739501953125,
0.00417327880859375,
-0.0034847259521484375,
-0.110107421875,
0.025665283203125,
0.0269927978515625,
0.013641357421875,
0.018798828125,
-0.04522705078125,
0.02239990234375,
-0.0111541748046875,
0.0211639404296875,
0.00018227100372314453,
-0.0056304931640625,
0.01418304443359375,
0.011749267578125,
0.0295257568359375,
0.02288818359375,
-0.0185546875,
0.00305938720703125,
0.01102447509765625,
-0.0022640228271484375,
-0.00014007091522216797,
0.0938720703125,
0.06329345703125,
0.005252838134765625,
0.00705718994140625,
-0.0679931640625,
-0.012420654296875,
0.06011962890625,
-0.00958251953125,
-0.0064697265625,
-0.007320404052734375,
-0.00801849365234375,
0.0146636962890625,
-0.0283203125,
0.0089569091796875,
0.003070831298828125,
-0.0243682861328125,
-0.06427001953125,
-0.0165863037109375,
0.038238525390625,
-0.01910400390625,
0.045501708984375,
0.01456451416015625,
-0.030120849609375,
0.05877685546875,
-0.028350830078125,
0.033111572265625,
-0.0230865478515625,
0.03594970703125,
0.032073974609375,
-0.0228424072265625,
0.005268096923828125,
-0.0015268325805664062,
0.01526641845703125,
-0.04473876953125,
0.04736328125,
0.018829345703125,
-0.057373046875,
-0.00524139404296875,
-0.0006051063537597656,
-0.006683349609375,
0.0017061233520507812,
-0.0303192138671875,
-0.045074462890625,
-0.023651123046875,
-0.0238037109375,
-0.080078125,
-0.03228759765625,
0.0202789306640625,
-0.08819580078125,
0.015350341796875,
0.0214385986328125,
-0.0579833984375,
-0.0191802978515625,
0.09405517578125,
0.003055572509765625,
-0.03070068359375,
-0.00524139404296875,
0.004669189453125,
-0.018341064453125,
-0.03692626953125,
-0.0259246826171875,
-0.0004296302795410156,
0.0058135986328125,
0.0178375244140625,
0.0069580078125,
0.006130218505859375,
0.0075225830078125,
0.04083251953125,
-0.01233673095703125,
0.004993438720703125,
-0.01471710205078125,
0.0276031494140625,
-0.003421783447265625,
-0.0266265869140625,
0.017425537109375,
-0.00540924072265625,
0.0169525146484375,
-0.018890380859375,
-0.0085601806640625,
-0.0122833251953125,
-0.01561737060546875,
-0.0022830963134765625,
-0.0019588470458984375,
0.01323699951171875,
-0.0030040740966796875,
0.00644683837890625,
-0.054931640625,
0.03533935546875,
0.0201416015625,
0.0189361572265625,
-0.036468505859375,
-0.03887939453125,
-0.0361328125,
-0.0049285888671875,
0.003902435302734375,
-0.0208587646484375,
0.0004239082336425781,
0.03631591796875,
-0.0217742919921875,
-0.01238250732421875,
-0.03985595703125,
-0.05145263671875,
-0.00806427001953125,
-0.018951416015625,
-0.030670166015625,
0.028564453125,
-0.01358795166015625,
-0.00022590160369873047,
-0.01922607421875,
0.06427001953125,
0.002979278564453125,
-0.01525115966796875,
0.0265045166015625,
-0.041717529296875,
0.050872802734375,
-0.043975830078125,
-0.0222930908203125,
-0.027252197265625,
0.0755615234375,
-0.048187255859375,
-0.0188446044921875,
-0.004116058349609375,
0.00986480712890625,
0.01505279541015625,
-0.025299072265625,
-0.019500732421875,
-0.032806396484375,
0.0222625732421875,
-0.00872802734375,
-0.0234222412109375,
0.0175323486328125,
-0.025177001953125,
0.051116943359375,
0.0168304443359375,
-0.01552581787109375,
0.034423828125,
0.0038967132568359375,
0.0256805419921875,
0.01473236083984375,
0.01015472412109375,
-0.001178741455078125,
-0.0272216796875,
-0.0135040283203125,
-0.07684326171875,
-0.0161895751953125,
0.03448486328125,
0.035430908203125,
-0.0220947265625,
-0.0292510986328125,
-0.003780364990234375,
0.055084228515625,
-0.0022144317626953125,
-0.01367950439453125,
0.00920867919921875,
-0.002716064453125,
-0.0084686279296875,
-0.0008440017700195312,
0.00894927978515625,
-0.027587890625,
-0.00951385498046875,
-0.043701171875,
-0.0390625,
-0.02020263671875,
-0.0216064453125,
0.0181732177734375,
-0.008636474609375,
-0.0022735595703125,
-0.06378173828125,
-0.0217132568359375,
0.04364013671875,
0.0260772705078125,
-0.005146026611328125,
0.033538818359375,
-0.028167724609375,
-0.04095458984375,
0.01334381103515625,
-0.015106201171875,
-0.006702423095703125,
0.0333251953125,
0.041839599609375,
0.005268096923828125,
-0.0088348388671875,
-0.09027099609375,
0.020538330078125,
0.0537109375,
-0.029083251953125,
-0.0005273818969726562,
0.0303192138671875,
-0.0455322265625,
0.02667236328125,
0.0169677734375,
0.049957275390625,
-0.017669677734375,
0.01045989990234375,
0.01064300537109375,
0.0014133453369140625,
0.032379150390625,
0.04364013671875,
-0.038238525390625,
-0.02923583984375,
-0.0284423828125,
0.01131439208984375,
0.014862060546875,
0.0076446533203125,
-0.00978851318359375,
0.033416748046875,
0.004459381103515625,
-0.045379638671875,
0.0217132568359375,
-0.046234130859375,
0.0364990234375,
0.01105499267578125,
0.0082855224609375,
0.019622802734375,
0.007015228271484375,
-0.01007080078125,
-0.0099945068359375,
-0.0289459228515625,
-0.0038166046142578125,
0.007091522216796875,
0.0098114013671875,
-0.006534576416015625,
0.01476287841796875,
0.00815582275390625,
-0.04840087890625,
-0.0003559589385986328,
-0.0216827392578125,
-0.0701904296875,
0.00591278076171875,
0.0143280029296875,
-0.00989532470703125,
0.026702880859375,
0.0250091552734375,
-0.005096435546875,
0.0040740966796875,
-0.014984130859375,
-0.0438232421875,
0.026519775390625,
-0.0323486328125,
0.032806396484375,
-0.0080413818359375,
0.002017974853515625,
-0.0129852294921875,
0.06378173828125,
-0.04541015625,
0.0294189453125,
0.006256103515625,
0.024810791015625,
0.0312347412109375,
0.0269622802734375,
0.0209197998046875,
-0.01666259765625,
-0.01593017578125,
0.029022216796875,
-0.015472412109375,
-0.0218963623046875,
0.0374755859375,
-0.031524658203125,
0.0270538330078125,
-0.03857421875,
-0.054718017578125,
0.06256103515625,
-0.0830078125,
-0.039215087890625,
-0.029510498046875,
0.00827789306640625,
0.034759521484375,
-0.0042266845703125,
0.012969970703125,
-0.0003712177276611328,
0.04876708984375,
-0.0003523826599121094,
-0.005462646484375,
0.0250396728515625,
0.0018339157104492188,
0.029327392578125,
-0.069580078125,
0.018707275390625,
0.03057861328125,
0.0281982421875,
-0.00185394287109375,
-0.00801849365234375,
-0.08001708984375,
-0.039215087890625,
-0.0211639404296875,
0.00972747802734375,
0.08154296875,
-0.01407623291015625,
0.0025177001953125,
-0.0168304443359375,
-0.0090484619140625,
-0.006801605224609375,
0.00994110107421875,
0.0272979736328125,
-0.0036334991455078125,
-0.0252532958984375,
-0.0163421630859375,
-0.027984619140625,
-0.032257080078125,
0.00966644287109375,
-0.00234222412109375,
-0.035919189453125,
-0.01837158203125,
-0.022491455078125,
0.00653839111328125,
-0.01274871826171875,
0.0218353271484375,
-0.00022113323211669922,
0.0286102294921875,
-0.0097198486328125,
0.0157012939453125,
0.004009246826171875,
0.0119476318359375,
-0.00693511962890625,
0.05389404296875,
0.001987457275390625,
-0.0165252685546875,
-0.0313720703125,
-0.0279388427734375,
0.003475189208984375,
-0.0860595703125,
-0.036529541015625,
0.0244903564453125,
-0.023162841796875,
0.014404296875,
-0.045013427734375,
0.0004944801330566406,
0.0019121170043945312,
-0.01212310791015625,
0.00009870529174804688,
-0.0084228515625,
0.03411865234375,
0.006999969482421875,
-0.0046844482421875,
0.0219573974609375,
-0.0205841064453125,
0.042877197265625,
-0.022308349609375,
0.023590087890625,
0.005817413330078125,
-0.055938720703125,
0.0186920166015625,
0.032073974609375,
-0.0174407958984375,
0.043243408203125,
0.05743408203125,
0.0158233642578125,
0.04656982421875,
0.016204833984375,
0.0271759033203125,
0.00031185150146484375,
0.0304107666015625,
-0.01323699951171875,
-0.050537109375,
0.0277862548828125,
0.0188446044921875,
-0.0126495361328125,
0.0268096923828125,
-0.0251922607421875,
0.035888671875,
-0.0469970703125,
0.0263671875,
0.01543426513671875,
0.034759521484375,
-0.0222625732421875,
-0.0272216796875,
0.053985595703125,
-0.0229339599609375,
0.030731201171875,
0.03021240234375,
0.066650390625,
-0.0008435249328613281,
-0.005809783935546875,
0.02764892578125,
-0.017852783203125,
-0.006839752197265625,
-0.0035552978515625,
-0.03448486328125,
-0.0013399124145507812,
-0.04656982421875,
-0.004795074462890625,
0.038909912109375,
-0.02972412109375,
0.0050506591796875,
-0.0037479400634765625,
-0.0245208740234375,
-0.01422882080078125,
-0.024505615234375,
-0.01529693603515625,
-0.061065673828125,
0.021728515625,
0.034881591796875,
-0.014801025390625,
0.026885986328125,
0.041259765625,
0.00008153915405273438,
-0.0011186599731445312,
0.01470947265625,
-0.035400390625,
0.02117919921875,
-0.006542205810546875,
0.0165863037109375,
0.042388916015625,
-0.04522705078125,
0.0128173828125,
-0.0303497314453125,
0.0233001708984375,
0.0071563720703125,
-0.01165008544921875,
0.0106201171875,
-0.032562255859375,
-0.005580902099609375,
0.01568603515625,
-0.0018978118896484375,
0.0032024383544921875,
0.00004762411117553711,
0.02069091796875,
-0.05303955078125,
-0.01546478271484375,
0.0197601318359375,
-0.043182373046875,
-0.01404571533203125,
0.021240234375,
-0.0682373046875,
0.09124755859375,
0.0184783935546875,
0.0084075927734375,
-0.020904541015625,
0.053680419921875,
-0.0127410888671875,
0.034912109375,
-0.0015707015991210938,
0.0283050537109375,
0.0211029052734375,
-0.036041259765625,
-0.01861572265625,
-0.0016679763793945312,
-0.032501220703125,
0.030487060546875,
0.052947998046875,
0.0011234283447265625,
-0.0266571044921875,
-0.0096588134765625,
0.09161376953125,
0.09613037109375,
0.050811767578125,
0.0046539306640625,
0.01012420654296875,
-0.04180908203125,
0.0144805908203125,
0.0303802490234375,
0.0269622802734375,
-0.019012451171875,
-0.0099639892578125,
0.0227813720703125,
-0.00605010986328125,
-0.00011557340621948242,
0.01593017578125,
0.0325927734375,
0.0230560302734375,
-0.01529693603515625,
0.0037746429443359375,
-0.053680419921875,
0.01342010498046875,
0.0460205078125,
0.0120697021484375,
-0.00540924072265625,
0.006198883056640625,
-0.0279083251953125,
0.04925537109375,
-0.00807952880859375,
-0.004581451416015625,
0.0270233154296875,
0.003662109375,
-0.0015106201171875,
0.0012655258178710938,
0.0006365776062011719,
0.00920867919921875,
-0.0048828125,
0.03912353515625,
-0.032318115234375,
0.004241943359375,
-0.07098388671875,
-0.00269317626953125,
0.00728607177734375,
0.0292816162109375,
-0.04290771484375,
-0.0380859375,
0.0306549072265625,
-0.0018873214721679688,
-0.01285552978515625,
-0.0019664764404296875,
-0.025146484375,
-0.069091796875,
-0.01151275634765625,
-0.035797119140625,
0.0143890380859375,
0.01153564453125,
0.031280517578125,
-0.006443023681640625,
0.0178375244140625,
-0.04595947265625,
0.01308441162109375,
-0.043914794921875,
-0.0005803108215332031,
0.00569915771484375,
0.04925537109375,
0.0269927978515625,
0.045684814453125,
0.00881195068359375,
-0.0167388916015625,
-0.0097503662109375,
0.00909423828125,
-0.0017995834350585938,
0.00531768798828125,
-0.03033447265625,
-0.06719970703125,
0.04974365234375,
0.0345458984375,
0.02392578125,
0.036590576171875,
0.03802490234375,
0.028472900390625,
0.007411956787109375,
0.0016908645629882812,
0.022979736328125,
-0.01483917236328125,
0.0262298583984375,
-0.049468994140625,
0.01580810546875,
0.0171051025390625,
-0.00630950927734375,
-0.0153656005859375,
-0.041656494140625,
0.07025146484375,
-0.0599365234375,
0.02001953125,
-0.0163726806640625,
-0.0177154541015625,
0.046173095703125,
-0.026885986328125,
0.021240234375,
-0.033721923828125,
-0.0231781005859375,
0.0215301513671875,
-0.04559326171875,
-0.0670166015625,
-0.01192474365234375,
0.0210113525390625,
-0.04779052734375,
0.05291748046875,
0.01108551025390625,
-0.007305145263671875,
-0.0141754150390625,
-0.00011807680130004883,
0.006610870361328125,
-0.055816650390625,
0.005519866943359375,
-0.01763916015625,
-0.04937744140625,
-0.047393798828125,
-0.00917816162109375,
0.046722412109375,
0.007080078125,
0.051116943359375,
-0.00537872314453125,
0.0124664306640625,
-0.00283050537109375,
-0.0166168212890625,
-0.0030994415283203125,
0.01271820068359375,
-0.0474853515625,
-0.0122222900390625,
-0.01157379150390625,
-0.007640838623046875,
-0.0022735595703125,
0.030609130859375,
0.01383209228515625,
-0.0230255126953125,
0.00701141357421875,
-0.0162811279296875,
0.009765625,
0.00524139404296875,
0.0256805419921875,
-0.0237884521484375,
-0.03851318359375,
-0.00919342041015625,
0.0240631103515625,
0.0070648193359375,
0.02508544921875,
-0.00571441650390625,
0.039703369140625,
-0.01447296142578125,
0.00919342041015625,
0.01229095458984375,
-0.0222625732421875,
0.006946563720703125,
0.021575927734375,
-0.03839111328125,
-0.04071044921875,
0.046356201171875,
0.0008487701416015625,
0.0128936767578125,
0.0124359130859375,
0.06243896484375,
0.045623779296875,
-0.078369140625,
-0.02496337890625,
0.019561767578125,
0.028350830078125,
0.0157928466796875,
0.0146636962890625,
-0.034271240234375,
-0.021240234375,
0.01422119140625,
-0.01012420654296875,
-0.040496826171875,
-0.021240234375,
-0.01459503173828125,
0.0229644775390625,
-0.0205230712890625,
-0.0499267578125,
-0.10723876953125,
-0.0025615692138671875,
0.0312042236328125,
0.01430511474609375,
-0.07196044921875,
0.028564453125,
0.0040740966796875,
0.044403076171875,
-0.01287841796875,
0.00870513916015625,
0.005657196044921875,
0.053466796875,
-0.00794219970703125,
-0.027984619140625,
-0.012847900390625,
0.033966064453125,
-0.0080718994140625,
0.0439453125,
0.047576904296875,
-0.041595458984375,
0.006908416748046875,
0.06671142578125,
0.048614501953125,
0.11114501953125,
-0.01119232177734375,
-0.00872039794921875,
-0.007965087890625,
0.003307342529296875,
0.0069122314453125,
-0.0283660888671875,
0.007778167724609375,
-0.0269012451171875,
-0.03497314453125,
0.0301666259765625,
-0.05303955078125,
-0.038665771484375,
-0.047149658203125,
-0.04229736328125,
-0.005176544189453125,
0.032196044921875,
-0.0477294921875,
-0.01255035400390625,
0.00943756103515625,
-0.0173492431640625,
0.0269927978515625,
0.00485992431640625,
-0.0028514862060546875,
0.005382537841796875,
0.02667236328125,
-0.0283050537109375,
-0.003387451171875,
0.0252532958984375,
-0.035858154296875,
-0.0357666015625,
-0.01702880859375,
-0.0027256011962890625,
-0.0254364013671875,
0.03009033203125,
-0.0384521484375,
0.080322265625,
0.054290771484375,
-0.024749755859375,
0.03582763671875,
0.0099639892578125,
-0.0440673828125,
0.00017321109771728516,
-0.0343017578125,
-0.07000732421875,
-0.0400390625,
0.05926513671875,
0.0816650390625,
0.0211334228515625,
-0.0172271728515625,
-0.040802001953125,
-0.02569580078125,
-0.013214111328125,
-0.01229095458984375,
0.01329803466796875,
-0.052490234375,
0.004978179931640625,
-0.0175323486328125,
0.0038604736328125,
-0.0235748291015625,
-0.01132965087890625,
-0.0258331298828125,
-0.01885986328125,
-0.00150299072265625,
0.01154327392578125,
-0.016937255859375,
0.014434814453125,
0.1015625,
-0.06707763671875,
-0.031524658203125,
0.044921875,
-0.01485443115234375,
0.02325439453125,
0.0013399124145507812,
0.036224365234375,
-0.049560546875,
0.006923675537109375,
0.0341796875,
0.026336669921875,
0.0196533203125,
0.00832366943359375,
-0.06304931640625,
-0.0188446044921875,
0.002178192138671875,
0.0008091926574707031,
0.00409698486328125,
-0.0099639892578125,
0.044097900390625,
0.00664520263671875,
0.04229736328125,
-0.037445068359375,
-0.0382080078125,
-0.0288543701171875,
-0.00033164024353027344,
-0.0096588134765625,
0.0249786376953125,
0.041595458984375,
-0.0205078125,
0.00302886962890625,
0.011566162109375,
-0.0227813720703125,
-0.04144287109375,
-0.0008244514465332031,
-0.07562255859375,
0.00482177734375,
0.01000213623046875
]
|
d75e573fba1d36fe46c46fc58bf8ceaf23500780 | Wordpress Stackexchange
Q: enqueue script only if it is not already enqueue I want to include a script in a shortcode output, so I am trying this:
function my_shortcode( $atts, $content = null ) {
extract(shortcode_atts(array(
'title' => '',
), $atts));
wp_enqueue_script('custom-script');
}
I have registered the script already and enqueue it if the above shortcode is used.
However I want to include the file only once, even if the shortcode is used multiple times. Currently, if the shortcode is used multiple times, it will include the script for each time. Is it possible?
A: You can use wp_script_is() to determine if a script is enqueued - and use it in a conditional, like this:
if( ! wp_script_is( 'custom-script', 'enqueued' ) ) {
// your code here
}
wp_script_is() takes two parameters - $handle and $list - the latter can be: registered, enqueued/queue, done or to_do; and it returns true or false.
| Q: enqueue script only if it is not already enqueue I want to include a script in a shortcode output, so I am trying this:
function my_shortcode( $atts, $content = null ) {
extract(shortcode_atts(array(
'title' => '',
), $atts));
wp_enqueue_script('custom-script');
}
I have registered the script already and enqueue it if the above shortcode is used.
However I want to include the file only once, even if the shortcode is used multiple times. Currently, if the shortcode is used multiple times, it will include the script for each time. Is it possible?
A: You can use wp_script_is() to determine if a script is enqueued - and use it in a conditional, like this:
if( ! wp_script_is( 'custom-script', 'enqueued' ) ) {
// your code here
}
wp_script_is() takes two parameters - $handle and $list - the latter can be: registered, enqueued/queue, done or to_do; and it returns true or false.
A: The WordPress enqueue system should prevent the inclusion of the same script multiple times, and does when I test it. For example, the following enqueues a Core script and echos a counter. If I put this shortcode into a post 4 times, I get "0123" but the media script only loads one time. The same test works with several other scripts I tried.
function my_shortcode( $atts, $content = null ) {
extract(shortcode_atts(array(
'title' => '',
), $atts));
static $counter = 0;
echo $counter++;
wp_enqueue_script('wp-mediaelement');
}
add_shortcode('enq','my_shortcode');
If you are getting the same script loaded over and over, there is a problem with your site, but I am not sure where start guessing at what.
| wordpress | {
"language": "en",
"length": 265,
"provenance": "stackexchange_00019.jsonl.gz:439304",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123547"
} | [
0.046112060546875,
0.0051727294921875,
-0.004955291748046875,
-0.0294952392578125,
0.004673004150390625,
-0.0225067138671875,
0.0254058837890625,
-0.0156402587890625,
-0.022918701171875,
0.03131103515625,
-0.039947509765625,
0.038238525390625,
-0.043701171875,
0.01139068603515625,
-0.02252197265625,
-0.054168701171875,
0.04644775390625,
-0.0281219482421875,
-0.0095062255859375,
-0.0193328857421875,
0.01354217529296875,
0.01453399658203125,
-0.028717041015625,
0.094482421875,
0.00452423095703125,
-0.025115966796875,
0.1146240234375,
-0.00836181640625,
-0.0033931732177734375,
-0.021942138671875,
0.0147552490234375,
-0.0096588134765625,
0.035064697265625,
0.0340576171875,
-0.05169677734375,
0.046478271484375,
-0.0046234130859375,
0.0131072998046875,
0.005611419677734375,
0.030792236328125,
0.01085662841796875,
-0.0022563934326171875,
0.0318603515625,
0.0050811767578125,
0.002956390380859375,
-0.0187225341796875,
-0.01302337646484375,
-0.043792724609375,
-0.001384735107421875,
0.0279693603515625,
0.02655029296875,
-0.02520751953125,
0.02691650390625,
0.044342041015625,
-0.0031414031982421875,
-0.00563812255859375,
-0.0178680419921875,
-0.048553466796875,
0.027435302734375,
0.036712646484375,
-0.00968170166015625,
-0.029571533203125,
0.020721435546875,
-0.044647216796875,
-0.00905609130859375,
0.0014410018920898438,
-0.054534912109375,
0.00415802001953125,
-0.0191192626953125,
-0.00858306884765625,
0.0318603515625,
-0.040130615234375,
-0.00824737548828125,
-0.0013151168823242188,
-0.052978515625,
0.031494140625,
0.01117706298828125,
-0.00292205810546875,
0.0246734619140625,
-0.01181793212890625,
-0.0159454345703125,
-0.03558349609375,
-0.02423095703125,
0.00001811981201171875,
-0.01397705078125,
0.015045166015625,
-0.01471710205078125,
0.0036640167236328125,
-0.0085906982421875,
0.0025730133056640625,
-0.0218048095703125,
0.01412200927734375,
0.00919342041015625,
-0.0131072998046875,
-0.0316162109375,
0.00244903564453125,
0.048980712890625,
0.07373046875,
-0.0139923095703125,
0.041748046875,
-0.008270263671875,
-0.035919189453125,
0.052734375,
-0.058685302734375,
0.0006222724914550781,
0.0367431640625,
-0.019561767578125,
-0.039947509765625,
0.01314544677734375,
0.0264434814453125,
-0.0022430419921875,
-0.016815185546875,
0.006256103515625,
-0.004241943359375,
-0.040496826171875,
-0.01265716552734375,
-0.0328369140625,
0.004886627197265625,
-0.0112457275390625,
0.01534271240234375,
0.026702880859375,
0.059173583984375,
0.00293731689453125,
-0.09979248046875,
-0.0283966064453125,
-0.053009033203125,
-0.011627197265625,
-0.04150390625,
0.036865234375,
0.045440673828125,
-0.018218994140625,
-0.02642822265625,
0.032745361328125,
0.03546142578125,
0.010772705078125,
-0.025543212890625,
0.0347900390625,
0.00872039794921875,
-0.0086822509765625,
-0.007205963134765625,
-0.00807952880859375,
-0.0005249977111816406,
0.003742218017578125,
-0.037322998046875,
-0.030609130859375,
0.033782958984375,
0.00844573974609375,
-0.00010436773300170898,
-0.0162200927734375,
-0.0701904296875,
0.0025577545166015625,
-0.030242919921875,
0.026458740234375,
0.0011949539184570312,
-0.01666259765625,
-0.0041961669921875,
-0.00457000732421875,
-0.007717132568359375,
0.0015306472778320312,
-0.007106781005859375,
-0.01239013671875,
0.0009369850158691406,
-0.0330810546875,
-0.044830322265625,
-0.043426513671875,
-0.021728515625,
0.027435302734375,
0.0081939697265625,
0.01328277587890625,
0.0301971435546875,
-0.0301513671875,
-0.013763427734375,
-0.005725860595703125,
0.0133514404296875,
-0.00481414794921875,
0.02239990234375,
-0.0039825439453125,
0.0184326171875,
0.036407470703125,
0.0000820159912109375,
-0.00554656982421875,
-0.0281829833984375,
0.06640625,
-0.023956298828125,
-0.06549072265625,
0.0017518997192382812,
0.022552490234375,
0.0723876953125,
0.025115966796875,
0.022186279296875,
0.054962158203125,
0.00008779764175415039,
-0.0017271041870117188,
-0.0212249755859375,
0.00899505615234375,
-0.004299163818359375,
-0.00739288330078125,
-0.004352569580078125,
0.0023555755615234375,
-0.0012998580932617188,
0.03973388671875,
-0.04559326171875,
0.0460205078125,
-0.028717041015625,
-0.050537109375,
0.0050201416015625,
-0.03558349609375,
0.0215911865234375,
-0.03948974609375,
-0.0212860107421875,
0.0124053955078125,
-0.01483154296875,
-0.008148193359375,
0.0064849853515625,
0.0020618438720703125,
0.0172271728515625,
-0.02130126953125,
0.08038330078125,
0.0031337738037109375,
0.04656982421875,
0.0256500244140625,
-0.049102783203125,
0.029876708984375,
-0.004261016845703125,
0.0267181396484375,
-0.0165557861328125,
-0.033294677734375,
-0.0254364013671875,
-0.0069427490234375,
-0.0017604827880859375,
-0.017486572265625,
0.0595703125,
0.01239013671875,
0.0201416015625,
-0.0213470458984375,
-0.006549835205078125,
-0.0035533905029296875,
-0.0123443603515625,
0.005748748779296875,
0.0232391357421875,
0.04534912109375,
0.047119140625,
0.0164031982421875,
0.01297760009765625,
0.04278564453125,
-0.043304443359375,
0.0217437744140625,
-0.014923095703125,
0.0023059844970703125,
0.020294189453125,
-0.01253509521484375,
0.0137939453125,
0.0295257568359375,
-0.05419921875,
-0.004062652587890625,
0.060150146484375,
-0.026031494140625,
0.0160064697265625,
-0.0001538991928100586,
-0.016021728515625,
0.01178741455078125,
-0.021240234375,
0.0159454345703125,
-0.025482177734375,
0.045440673828125,
0.003925323486328125,
0.034423828125,
0.0281219482421875,
-0.0224609375,
0.01434326171875,
0.002048492431640625,
-0.01262664794921875,
-0.00830078125,
0.0193634033203125,
0.032989501953125,
0.01447296142578125,
-0.0223236083984375,
-0.016021728515625,
0.0230865478515625,
0.03143310546875,
-0.0097503662109375,
0.0058135986328125,
-0.05145263671875,
-0.007568359375,
-0.0015420913696289062,
-0.0357666015625,
0.0003478527069091797,
0.022216796875,
0.0131072998046875,
-0.0178070068359375,
0.00838470458984375,
0.046600341796875,
0.0095062255859375,
0.02142333984375,
0.040863037109375,
-0.015869140625,
0.034515380859375,
-0.0102996826171875,
0.030364990234375,
-0.0236663818359375,
0.0002562999725341797,
0.049102783203125,
-0.0169830322265625,
0.0191650390625,
-0.006137847900390625,
0.017425537109375,
-0.00904083251953125,
-0.0040740966796875,
-0.01216888427734375,
0.0000985264778137207,
-0.07769775390625,
-0.01432037353515625,
0.02490234375,
0.09832763671875,
-0.01666259765625,
-0.0225677490234375,
0.0182037353515625,
0.04730224609375,
-0.0350341796875,
-0.10455322265625,
0.016021728515625,
-0.024871826171875,
0.0816650390625,
-0.04376220703125,
0.02142333984375,
-0.0606689453125,
-0.0200958251953125,
0.0247344970703125,
-0.04541015625,
-0.00025963783264160156,
-0.00444793701171875,
-0.03955078125,
-0.046051025390625,
0.031829833984375,
0.0160980224609375,
0.019439697265625,
-0.00240325927734375,
0.055023193359375,
0.01079559326171875,
-0.0321044921875,
0.033966064453125,
0.0027599334716796875,
-0.0214385986328125,
0.00495147705078125,
0.037750244140625,
-0.0789794921875,
-0.01517486572265625,
-0.009613037109375,
-0.020050048828125,
-0.001979827880859375,
0.028228759765625,
-0.00360107421875,
-0.0002655982971191406,
-0.0250396728515625,
0.049224853515625,
0.005970001220703125,
-0.03955078125,
0.0135650634765625,
0.0760498046875,
-0.03009033203125,
-0.006710052490234375,
0.038970947265625,
-0.02130126953125,
-0.042266845703125,
0.002803802490234375,
-0.04290771484375,
-0.0177764892578125,
-0.0004010200500488281,
0.028289794921875,
0.019256591796875,
-0.03375244140625,
0.01419830322265625,
0.0633544921875,
0.006862640380859375,
0.042694091796875,
-0.0149078369140625,
0.022216796875,
-0.03887939453125,
0.00922393798828125,
-0.01194000244140625,
0.01922607421875,
0.004619598388671875,
-0.02532958984375,
-0.037841796875,
0.007236480712890625,
0.019134521484375,
-0.0217132568359375,
0.040008544921875,
-0.0281982421875,
-0.005828857421875,
-0.0023479461669921875,
0.058380126953125,
-0.057037353515625,
-0.0079345703125,
-0.005062103271484375,
0.005252838134765625,
-0.01074981689453125,
-0.00778961181640625,
-0.03790283203125,
-0.0213775634765625,
-0.03594970703125,
0.00621795654296875,
-0.03662109375,
0.013153076171875,
-0.017669677734375,
-0.042877197265625,
-0.00530242919921875,
-0.046875,
0.05572509765625,
-0.08416748046875,
0.06292724609375,
-0.00406646728515625,
0.0232696533203125,
-0.03515625,
-0.040985107421875,
-0.050384521484375,
-0.0304107666015625,
0.003810882568359375,
-0.05560302734375,
0.02459716796875,
0.04705810546875,
-0.03948974609375,
-0.0145721435546875,
-0.00255584716796875,
-0.01010894775390625,
0.00799560546875,
0.0265350341796875,
0.00988006591796875,
-0.00179290771484375,
0.045928955078125,
0.0100250244140625,
-0.01026153564453125,
-0.00644683837890625,
0.01389312744140625,
-0.017913818359375,
0.016937255859375,
-0.01499176025390625,
-0.03448486328125,
0.0377197265625,
-0.0457763671875,
0.0125579833984375,
-0.007343292236328125,
0.00424957275390625,
0.0110931396484375,
0.002933502197265625,
-0.0169525146484375,
-0.01110076904296875,
0.0010957717895507812,
0.017059326171875,
-0.0233154296875,
-0.0134124755859375,
0.012939453125,
0.038177490234375,
0.0219879150390625,
-0.018951416015625,
-0.050689697265625,
0.049774169921875,
0.02838134765625,
-0.0161590576171875,
0.053741455078125,
-0.0005826950073242188,
-0.009002685546875,
0.0440673828125,
-0.006404876708984375,
-0.0104827880859375,
0.0107879638671875,
0.0538330078125,
0.035614013671875,
0.0246124267578125,
-0.0258636474609375,
0.0260772705078125,
-0.032745361328125,
-0.0068511962890625,
-0.00971221923828125,
-0.0003185272216796875,
0.0143585205078125,
0.0159759521484375,
-0.00453948974609375,
0.0015010833740234375,
-0.024322509765625,
-0.0338134765625,
-0.0180816650390625,
0.01554107666015625,
0.041473388671875,
0.0283966064453125,
-0.0022373199462890625,
0.0390625,
0.07916259765625,
0.00792694091796875,
0.0180206298828125,
0.028228759765625,
0.005573272705078125,
0.06591796875,
-0.006015777587890625,
0.012969970703125,
-0.011505126953125,
0.01409149169921875,
-0.01116180419921875,
0.0172882080078125,
-0.03173828125,
-0.0309600830078125,
0.0192718505859375,
0.020538330078125,
-0.0185699462890625,
0.027679443359375,
0.04656982421875,
0.041168212890625,
-0.00927734375,
-0.0041656494140625,
0.00716400146484375,
0.039520263671875,
-0.0287322998046875,
-0.01100921630859375,
-0.01078033447265625,
-0.0166473388671875,
-0.02264404296875,
0.039306640625,
-0.038543701171875,
0.037353515625,
-0.0029773712158203125,
0.0233154296875,
0.044830322265625,
0.0157318115234375,
0.0285797119140625,
-0.02197265625,
-0.024688720703125,
0.0206451416015625,
-0.00801849365234375,
-0.03582763671875,
0.004718780517578125,
0.035888671875,
0.031280517578125,
-0.004039764404296875,
-0.0252838134765625,
0.01045989990234375,
-0.0177001953125,
-0.046356201171875,
0.0228424072265625,
0.04364013671875,
0.01097869873046875,
-0.052154541015625,
-0.0418701171875,
0.0266876220703125,
0.0675048828125,
-0.009246826171875,
-0.0020999908447265625,
-0.032470703125,
-0.0202789306640625,
-0.002948760986328125,
-0.03558349609375,
-0.0199127197265625,
-0.00466156005859375,
0.0361328125,
0.00731658935546875,
-0.00408935546875,
-0.01496124267578125,
-0.0281829833984375,
-0.006481170654296875,
-0.01036834716796875,
0.017059326171875,
-0.015838623046875,
0.0026073455810546875,
-0.0216217041015625,
-0.01058197021484375,
0.0211944580078125,
0.01519012451171875,
0.048736572265625,
0.01319122314453125,
-0.01348114013671875,
-0.03076171875,
-0.049652099609375,
-0.0028858184814453125,
0.00893402099609375,
-0.06390380859375,
0.01152801513671875,
-0.0139007568359375,
-0.00815582275390625,
0.0293731689453125,
-0.038238525390625,
-0.02410888671875,
0.01438140869140625,
0.0145111083984375,
-0.0243377685546875,
0.073974609375,
-0.038848876953125,
0.0543212890625,
0.067626953125,
0.0300445556640625,
0.01222991943359375,
0.054443359375,
0.055419921875,
-0.038421630859375,
0.017364501953125,
-0.0565185546875,
0.00815582275390625,
-0.024932861328125,
0.023529052734375,
0.002849578857421875,
-0.0020751953125,
0.005397796630859375,
0.04559326171875,
0.00591278076171875,
-0.004726409912109375,
0.006122589111328125,
-0.0301361083984375,
0.0081634521484375,
0.0005435943603515625,
0.052886962890625,
-0.0200347900390625,
0.01030731201171875,
-0.00774383544921875,
0.0157623291015625,
0.01209259033203125,
-0.028411865234375,
0.024261474609375,
-0.004608154296875,
-0.0254058837890625,
0.041412353515625,
0.0460205078125,
-0.007843017578125,
0.0262603759765625,
0.0186004638671875,
0.0008363723754882812,
0.0017795562744140625,
-0.01209259033203125,
-0.01007080078125,
-0.01444244384765625,
-0.0018367767333984375,
-0.033172607421875,
-0.00017118453979492188,
-0.0158233642578125,
0.004791259765625,
-0.0022830963134765625,
0.0214996337890625,
0.053070068359375,
-0.025238037109375,
0.0089263916015625,
0.0277252197265625,
-0.0189208984375,
-0.04486083984375,
-0.04168701171875,
0.0274505615234375,
0.0010976791381835938,
0.066650390625,
0.044952392578125,
-0.017578125,
0.04345703125,
-0.01922607421875,
-0.0196380615234375,
-0.049407958984375,
-0.0238189697265625,
0.01561737060546875,
-0.01044464111328125,
0.04412841796875,
0.0166168212890625,
0.0123138427734375,
-0.01546478271484375,
0.0017747879028320312,
0.0035724639892578125,
-0.0174713134765625,
-0.044677734375,
0.01265716552734375,
-0.03277587890625,
-0.01413726806640625,
-0.0139923095703125,
0.01018524169921875,
0.02911376953125,
0.037200927734375,
-0.01512908935546875,
0.014495849609375,
0.017303466796875,
-0.00844573974609375,
-0.005344390869140625,
-0.04736328125,
0.0303497314453125,
0.049346923828125,
-0.07415771484375,
0.03436279296875,
0.0130615234375,
-0.0186614990234375,
-0.006931304931640625,
-0.037200927734375,
0.0254058837890625,
-0.040924072265625,
-0.00710296630859375,
-0.0111083984375,
0.01220703125,
0.040771484375,
-0.0204010009765625,
0.029266357421875,
-0.093994140625,
-0.07830810546875,
0.0153656005859375,
-0.09234619140625,
-0.0645751953125,
-0.04827880859375,
-0.048309326171875,
0.1328125,
0.003437042236328125,
0.0026454925537109375,
-0.0035266876220703125,
0.068603515625,
-0.014129638671875,
0.04449462890625,
-0.0157928466796875,
0.04058837890625,
0.021636962890625,
0.0589599609375,
-0.031951904296875,
-0.031402587890625,
0.041473388671875,
0.07281494140625,
-0.00879669189453125,
-0.0017137527465820312,
0.0212554931640625,
0.036468505859375,
0.053924560546875,
0.0235748291015625,
-0.00640106201171875,
-0.0009126663208007812,
-0.00400543212890625,
0.0279083251953125,
-0.0039825439453125,
-0.0208740234375,
0.030792236328125,
-0.0401611328125,
-0.0280303955078125,
0.026611328125,
-0.0007352828979492188,
0.0013437271118164062,
-0.0060577392578125,
-0.05181884765625,
0.0014028549194335938,
0.0024204254150390625,
-0.0367431640625,
0.055084228515625,
-0.047210693359375,
0.04925537109375,
-0.0223846435546875,
-0.005153656005859375,
-0.04833984375,
-0.0200347900390625,
0.012969970703125,
-0.03106689453125,
0.02191162109375,
0.0296630859375,
0.00753021240234375,
0.0457763671875,
0.0207977294921875,
0.0216064453125,
0.038726806640625,
-0.0162811279296875,
0.00634002685546875,
0.00666046142578125,
0.0096435546875,
-0.01255035400390625,
0.03179931640625,
0.00988006591796875,
0.0019464492797851562,
-0.0335693359375,
-0.005046844482421875,
0.0121307373046875,
0.024322509765625,
-0.0083160400390625,
-0.036834716796875,
-0.005290985107421875,
-0.0006465911865234375,
0.0269927978515625,
0.0205841064453125,
0.0118560791015625,
0.0196685791015625,
0.0032291412353515625,
0.02587890625,
0.0033473968505859375,
-0.0340576171875,
0.038665771484375,
-0.05206298828125,
0.0362548828125,
0.0012445449829101562,
0.09332275390625,
0.0247802734375,
0.05157470703125,
-0.07611083984375,
-0.052154541015625,
-0.004825592041015625,
0.03411865234375,
-0.038177490234375,
0.0172576904296875,
-0.0416259765625,
-0.059234619140625,
-0.01438140869140625,
0.0494384765625,
0.013671875,
-0.016510009765625,
0.015655517578125,
0.007160186767578125,
-0.026336669921875,
-0.006160736083984375,
0.057037353515625,
-0.008209228515625,
0.0272674560546875,
-0.003627777099609375,
-0.0115509033203125,
0.009307861328125,
-0.0242767333984375,
-0.04718017578125,
0.033477783203125,
0.03875732421875,
-0.0182647705078125,
0.01444244384765625,
0.00585174560546875,
-0.036468505859375,
0.0223846435546875,
0.0093994140625,
0.08477783203125,
0.0149383544921875,
-0.0018396377563476562,
-0.0080413818359375,
-0.0191802978515625,
-0.0164337158203125,
-0.004291534423828125,
0.0261077880859375,
0.0004978179931640625,
0.0183563232421875,
0.06768798828125,
0.0006194114685058594,
-0.0167236328125,
0.03448486328125,
-0.0027179718017578125,
-0.04364013671875,
0.055572509765625,
0.007762908935546875,
-0.05877685546875,
-0.031402587890625,
-0.0139007568359375,
0.0298004150390625,
0.04193115234375,
-0.036956787109375,
0.0263519287109375,
0.0306243896484375,
0.0633544921875,
-0.005615234375,
0.025177001953125,
0.0301055908203125,
0.0005030632019042969,
-0.0156707763671875,
0.0235443115234375,
-0.028564453125,
-0.032562255859375,
0.007251739501953125,
0.038055419921875,
0.0241546630859375,
0.0100250244140625,
-0.02691650390625,
0.037200927734375,
-0.01552581787109375,
0.0018548965454101562,
-0.038299560546875,
-0.01009368896484375,
0.00408172607421875,
0.0029926300048828125,
0.0018491744995117188,
-0.038543701171875,
-0.012359619140625,
-0.01183319091796875,
0.0426025390625,
-0.041259765625,
0.02203369140625,
-0.003650665283203125,
0.0218505859375,
0.01233673095703125,
0.07220458984375,
0.01386260986328125,
0.003604888916015625,
-0.0193023681640625,
0.016876220703125,
0.0191192626953125,
0.0017557144165039062,
0.0186767578125,
-0.036834716796875,
-0.016632080078125,
0.05145263671875,
0.040313720703125,
0.00021541118621826172,
0.042388916015625,
0.005626678466796875,
-0.031982421875,
-0.01806640625,
-0.0347900390625,
-0.0231475830078125,
-0.0159149169921875,
0.007061004638671875,
0.0174407958984375,
0.003490447998046875,
-0.01016998291015625,
-0.0213165283203125,
-0.003597259521484375,
0.037872314453125,
0.0091552734375,
-0.0570068359375,
0.040191650390625,
-0.03619384765625,
0.01319122314453125,
-0.005344390869140625,
0.0296173095703125,
0.0019388198852539062,
0.0017061233520507812,
-0.07373046875,
-0.050445556640625,
-0.028533935546875,
0.049591064453125,
-0.0229644775390625,
0.0127105712890625,
0.0345458984375,
-0.0245819091796875,
-0.0175628662109375,
0.037322998046875,
0.006099700927734375,
0.08319091796875,
-0.033416748046875,
-0.0243988037109375,
-0.0023517608642578125,
0.026611328125,
0.005290985107421875,
-0.062103271484375,
0.0095672607421875,
-0.0364990234375,
0.0257720947265625,
-0.0102996826171875,
0.01268768310546875,
0.0264892578125,
-0.034027099609375,
-0.0810546875,
0.040985107421875,
-0.020111083984375,
-0.03985595703125,
-0.08856201171875,
0.0021114349365234375,
0.013092041015625,
0.00289154052734375,
-0.0299224853515625,
-0.0430908203125,
-0.0421142578125,
0.041107177734375,
-0.0017118453979492188,
0.053466796875,
0.031036376953125,
-0.0080413818359375,
-0.0235748291015625,
-0.03399658203125,
-0.052764892578125,
-0.0020542144775390625,
0.0010538101196289062,
-0.0008907318115234375,
0.040740966796875,
0.046112060546875,
-0.00850677490234375,
-0.004634857177734375,
0.0011224746704101562,
-0.0675048828125,
-0.0014066696166992188,
-0.0266265869140625,
-0.03277587890625,
-0.0014591217041015625,
0.10980224609375,
0.0308074951171875,
0.032623291015625,
-0.051483154296875,
-0.034332275390625,
-0.047149658203125,
-0.0178375244140625,
-0.016387939453125,
-0.003246307373046875,
-0.0233612060546875,
0.0290985107421875,
-0.026458740234375,
-0.041717529296875,
-0.020294189453125,
-0.021759033203125,
-0.0672607421875,
0.005435943603515625,
-0.0261077880859375,
0.0150299072265625,
-0.03192138671875,
-0.019287109375,
0.046600341796875,
-0.01132965087890625,
0.04962158203125,
0.003307342529296875,
0.02276611328125,
0.06231689453125,
0.04437255859375,
0.02197265625,
0.029144287109375,
-0.039154052734375,
-0.01110076904296875,
0.021881103515625,
0.01175689697265625,
0.0005340576171875,
-0.0095977783203125,
0.01837158203125,
0.0214385986328125,
0.01305389404296875,
0.0247955322265625,
-0.0219573974609375,
-0.005855560302734375,
-0.0162811279296875,
-0.030609130859375,
-0.063232421875,
0.0305023193359375,
-0.0117645263671875,
-0.00939178466796875,
-0.00035834312438964844,
0.0413818359375,
0.057861328125,
-0.0168304443359375,
0.0038242340087890625,
0.040313720703125,
-0.0029659271240234375,
-0.0002455711364746094,
0.01404571533203125,
-0.0214996337890625,
0.01039886474609375,
-0.012542724609375
]
|
a778f6847f65105c19aea540595e5eb769c3f1c0 | Wordpress Stackexchange
Q: How can I target WordPress 3.8 new interface MP6 with CSS? When MP6 was a plugin in WordPress 3.6+ it changes the body class of the admin and added an "admin-mp6" class which helps me to style my plugin accordingly.
Now with the latest Alpha of WordPress 3.8 the class was removed. I know since it's an alpha version the class may come back but I wonder if there are any official "best practices"
A: While it's not specific to MP6 (I am not following its development) and its CSS, to me your question sounds like "how to check that WP version is equal to greater than one some feature was introduced in?".
So I would just examine content of $wp_version global. If it's 3.8 feature then anything with fitting version has it.
Also from quick look at body classes in admin there is branch-3-7 class, which makes possible to target branch-3-8 (however cannot be targeted conditionally as anything >=3.8 since that's not something CSS does).
| Q: How can I target WordPress 3.8 new interface MP6 with CSS? When MP6 was a plugin in WordPress 3.6+ it changes the body class of the admin and added an "admin-mp6" class which helps me to style my plugin accordingly.
Now with the latest Alpha of WordPress 3.8 the class was removed. I know since it's an alpha version the class may come back but I wonder if there are any official "best practices"
A: While it's not specific to MP6 (I am not following its development) and its CSS, to me your question sounds like "how to check that WP version is equal to greater than one some feature was introduced in?".
So I would just examine content of $wp_version global. If it's 3.8 feature then anything with fitting version has it.
Also from quick look at body classes in admin there is branch-3-7 class, which makes possible to target branch-3-8 (however cannot be targeted conditionally as anything >=3.8 since that's not something CSS does).
A: I also prefer a CSS-only variant. Unfortunately, that's not entirely possible. The route I'm taking is a hybrid of CSS and PHP.
First, we use PHP to detect the version of WordPress installed and, optionally, whether or not MP6 is installed. This is fairly easy using the MP6 constant defined by the plugin and the $wp_version global as suggested by Rarst. Once we know we're living in an MP6 world, we add our own body class. I'm choosing to use the class name "flaticons":
/**
* Filter body classes to detect MP6 or WordPress 3.8 so we can substitute the correct styles.
*
* @param array $classes
*
* @global $wp_version
*
* @return array
*/
function flaticons_body_class( $classes ) {
global $wp_version;
if ( ( defined( 'MP6' ) && MP6 ) || version_compare( $wp_version, '3.8', '>=' ) ) {
$classes[] = 'flaticons';
}
return $classes;
}
Now, in our CSS wherever we were previously using the .admin-mp6, .admin-color-mp6, or .mp6 selectors, we can use .flaticons instead.
This will work both with MP6 on older installs and WordPress 3.8+ once it's released. Not optimal, but a solid, future-proof solution.
A: Andrew Nacin posted some "offical" approach to this topic here
The CSS only variant should use the branch-3-x class to target the versions before 3.8 and the defaults should get applied to all upcoming versions so you don't have to care about further version:
.branch-3-6 .some-selector,
.branch-3-7 .some-selector {
/* some rules go here for 3.6 and 3.7 */
}
.some-selector {
/* 3.8+ rules go here */
}
Read more about this topic on the make.wordpress.org page
| wordpress | {
"language": "en",
"length": 436,
"provenance": "stackexchange_00019.jsonl.gz:439305",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123551"
} | [
0.0254669189453125,
0.0096435546875,
-0.04541015625,
-0.010284423828125,
0.01158905029296875,
-0.046661376953125,
0.01230621337890625,
-0.035491943359375,
0.00031495094299316406,
-0.0059356689453125,
-0.00896453857421875,
0.047149658203125,
-0.05316162109375,
-0.01447296142578125,
0.004802703857421875,
-0.029571533203125,
0.049591064453125,
-0.01294708251953125,
0.0277099609375,
0.019317626953125,
-0.0286865234375,
0.053466796875,
0.00983428955078125,
0.005794525146484375,
0.032684326171875,
-0.0186920166015625,
0.0533447265625,
0.002716064453125,
0.0030155181884765625,
-0.032318115234375,
0.0224609375,
0.0013227462768554688,
0.02593994140625,
0.038177490234375,
-0.04901123046875,
0.018951416015625,
0.0232696533203125,
0.006534576416015625,
0.00679779052734375,
-0.003734588623046875,
-0.0152130126953125,
0.02191162109375,
-0.0072479248046875,
-0.0220947265625,
-0.040802001953125,
-0.0033893585205078125,
-0.042083740234375,
-0.0161285400390625,
0.013763427734375,
-0.0192718505859375,
-0.0306549072265625,
-0.007434844970703125,
-0.0161285400390625,
0.01155853271484375,
-0.0238037109375,
-0.00638580322265625,
-0.0340576171875,
0.05828857421875,
0.0261077880859375,
0.0408935546875,
-0.0087738037109375,
0.018218994140625,
-0.025970458984375,
-0.057464599609375,
-0.0219573974609375,
-0.004901885986328125,
0.040069580078125,
0.006862640380859375,
-0.062225341796875,
-0.031158447265625,
0.042205810546875,
-0.01207733154296875,
-0.031402587890625,
-0.043731689453125,
-0.00797271728515625,
0.00922393798828125,
0.0066375732421875,
-0.0457763671875,
-0.018768310546875,
0.034210205078125,
0.044830322265625,
0.04742431640625,
-0.0225830078125,
0.01849365234375,
0.00984954833984375,
0.0457763671875,
0.001171112060546875,
-0.055633544921875,
-0.0144500732421875,
-0.0178680419921875,
-0.026153564453125,
0.0489501953125,
-0.016571044921875,
-0.042236328125,
-0.035675048828125,
-0.0262908935546875,
0.012969970703125,
0.037445068359375,
-0.0142822265625,
0.02117919921875,
-0.00907135009765625,
-0.02154541015625,
0.00592041015625,
-0.047515869140625,
0.0144500732421875,
0.05926513671875,
0.0106658935546875,
-0.0015840530395507812,
0.0162200927734375,
0.002685546875,
0.005764007568359375,
0.01378631591796875,
-0.0307159423828125,
-0.0015106201171875,
-0.01873779296875,
-0.004421234130859375,
-0.06512451171875,
0.0328369140625,
-0.01031494140625,
0.004863739013671875,
-0.0069580078125,
0.0126800537109375,
0.01415252685546875,
-0.02239990234375,
-0.006900787353515625,
-0.00994873046875,
-0.0172271728515625,
-0.03143310546875,
0.01161956787109375,
-0.0227203369140625,
0.00449371337890625,
0.026336669921875,
0.0305328369140625,
0.0196685791015625,
-0.00576019287109375,
0.0185699462890625,
0.05426025390625,
-0.03131103515625,
-0.0033779144287109375,
0.04833984375,
-0.04595947265625,
-0.04949951171875,
-0.0095977783203125,
-0.03302001953125,
0.0167388916015625,
0.0159912109375,
-0.002532958984375,
-0.0012693405151367188,
0.006748199462890625,
-0.04559326171875,
0.042816162109375,
-0.0733642578125,
0.03790283203125,
0.0271453857421875,
-0.00015854835510253906,
-0.0042724609375,
0.103759765625,
-0.046783447265625,
-0.058197021484375,
-0.08795166015625,
-0.00014150142669677734,
0.0123443603515625,
0.025360107421875,
-0.055389404296875,
-0.054779052734375,
-0.00601959228515625,
-0.046173095703125,
-0.0257415771484375,
0.0193023681640625,
-0.024993896484375,
-0.0210723876953125,
0.01273345947265625,
0.06463623046875,
-0.00982666015625,
-0.00885009765625,
0.0261077880859375,
0.0021152496337890625,
0.002620697021484375,
0.027313232421875,
0.04376220703125,
-0.0026702880859375,
-0.0265960693359375,
0.07220458984375,
-0.03839111328125,
-0.03350830078125,
-0.059356689453125,
0.0035152435302734375,
-0.0294952392578125,
0.06524658203125,
-0.001605987548828125,
0.06207275390625,
-0.0254058837890625,
0.0269012451171875,
0.01910400390625,
-0.01357269287109375,
0.0019588470458984375,
-0.016845703125,
0.0555419921875,
-0.025421142578125,
-0.05828857421875,
-0.0191497802734375,
0.054595947265625,
-0.017852783203125,
0.01471710205078125,
-0.048797607421875,
0.03265380859375,
-0.02056884765625,
0.054534912109375,
-0.028411865234375,
0.00211334228515625,
0.01145172119140625,
0.008331298828125,
-0.0167236328125,
-0.01548004150390625,
-0.0148773193359375,
-0.017486572265625,
-0.002613067626953125,
0.0040283203125,
0.00351715087890625,
0.0197601318359375,
0.01271820068359375,
-0.0273895263671875,
-0.003551483154296875,
-0.0158233642578125,
-0.0090179443359375,
0.0228118896484375,
0.0002505779266357422,
0.023193359375,
0.06494140625,
0.054931640625,
0.04345703125,
-0.077880859375,
0.01123809814453125,
0.05877685546875,
-0.010711669921875,
-0.04443359375,
-0.02008056640625,
-0.093017578125,
0.040252685546875,
0.047698974609375,
0.062469482421875,
0.0265960693359375,
0.020416259765625,
-0.0268402099609375,
0.0723876953125,
-0.01861572265625,
0.0306396484375,
-0.047821044921875,
-0.0174407958984375,
0.01300811767578125,
0.0264739990234375,
-0.0193023681640625,
0.0022144317626953125,
-0.02972412109375,
-0.0099945068359375,
0.0267181396484375,
0.0162353515625,
-0.027801513671875,
-0.00705718994140625,
0.048370361328125,
0.004154205322265625,
0.02557373046875,
-0.0302734375,
0.021270751953125,
0.015716552734375,
0.0203399658203125,
0.052032470703125,
0.050048828125,
-0.005405426025390625,
-0.017547607421875,
0.01439666748046875,
0.0450439453125,
0.020355224609375,
0.034088134765625,
0.023712158203125,
0.0010204315185546875,
-0.024749755859375,
-0.0216064453125,
0.017974853515625,
0.01367950439453125,
-0.0127105712890625,
0.01265716552734375,
-0.0294342041015625,
-0.01441192626953125,
-0.007659912109375,
-0.03515625,
0.003368377685546875,
0.01322174072265625,
-0.0361328125,
-0.04412841796875,
-0.00170135498046875,
0.0274658203125,
-0.0241546630859375,
0.0293121337890625,
0.0009984970092773438,
-0.03253173828125,
0.020172119140625,
-0.0087890625,
0.019287109375,
-0.0335693359375,
0.0012903213500976562,
0.0310516357421875,
-0.0110931396484375,
-0.0165252685546875,
-0.0012054443359375,
0.02081298828125,
0.01971435546875,
0.00582122802734375,
-0.0002053976058959961,
-0.00494384765625,
0.000537872314453125,
0.0135345458984375,
0.04547119140625,
-0.037506103515625,
0.06170654296875,
0.00018322467803955078,
-0.00400543212890625,
0.02484130859375,
-0.05926513671875,
-0.049835205078125,
-0.0222320556640625,
-0.07269287109375,
-0.01523590087890625,
0.0019321441650390625,
-0.038604736328125,
0.0199127197265625,
0.03656005859375,
0.00809478759765625,
0.04833984375,
-0.01329803466796875,
-0.0018510818481445312,
-0.00786590576171875,
-0.041229248046875,
-0.0428466796875,
0.01381683349609375,
-0.00933837890625,
0.015777587890625,
0.025390625,
0.006992340087890625,
-0.060760498046875,
0.029815673828125,
0.0251007080078125,
-0.003055572509765625,
0.035552978515625,
0.01029205322265625,
-0.011016845703125,
-0.038604736328125,
0.01483154296875,
0.0173797607421875,
-0.01125335693359375,
-0.00737762451171875,
-0.01279449462890625,
-0.0306396484375,
-0.038177490234375,
-0.00841522216796875,
-0.0247344970703125,
0.020111083984375,
-0.0112152099609375,
-0.00557708740234375,
-0.040313720703125,
-0.03533935546875,
0.04547119140625,
-0.003063201904296875,
0.0203399658203125,
-0.0352783203125,
-0.043548583984375,
0.0277252197265625,
0.034820556640625,
-0.007526397705078125,
0.0028667449951171875,
0.037628173828125,
-0.03704833984375,
0.0479736328125,
-0.01593017578125,
-0.0234832763671875,
-0.03948974609375,
0.007305145263671875,
-0.02703857421875,
0.0196990966796875,
0.0010995864868164062,
0.0031986236572265625,
-0.01415252685546875,
0.0472412109375,
-0.0225982666015625,
-0.0004286766052246094,
0.0308380126953125,
0.01493072509765625,
0.057525634765625,
-0.032806396484375,
-0.0278472900390625,
-0.03436279296875,
0.0592041015625,
-0.034820556640625,
-0.01447296142578125,
0.0024433135986328125,
-0.001220703125,
0.00566864013671875,
0.015045166015625,
-0.049285888671875,
-0.0211029052734375,
-0.059295654296875,
-0.016143798828125,
0.001384735107421875,
-0.0543212890625,
-0.011077880859375,
0.0023899078369140625,
-0.0496826171875,
-0.027099609375,
0.0272979736328125,
0.00763702392578125,
-0.0281829833984375,
0.04669189453125,
-0.042236328125,
0.026123046875,
-0.0168304443359375,
0.003795623779296875,
-0.046478271484375,
-0.0007219314575195312,
-0.047576904296875,
0.041412353515625,
0.0239105224609375,
0.0019683837890625,
-0.02093505859375,
0.0109405517578125,
0.000010907649993896484,
0.02532958984375,
-0.03558349609375,
-0.016632080078125,
-0.0382080078125,
0.0211334228515625,
-0.00762176513671875,
0.0071258544921875,
0.0006990432739257812,
-0.045257568359375,
-0.092529296875,
-0.0767822265625,
-0.027191162109375,
0.005039215087890625,
0.00785064697265625,
-0.023284912109375,
-0.00815582275390625,
-0.040191650390625,
0.0035610198974609375,
-0.0008778572082519531,
-0.005786895751953125,
0.01141357421875,
-0.03546142578125,
0.01806640625,
0.034210205078125,
0.0027561187744140625,
0.000652313232421875,
-0.006984710693359375,
0.07586669921875,
0.01690673828125,
-0.01119232177734375,
-0.01444244384765625,
-0.018524169921875,
0.020111083984375,
0.001468658447265625,
0.03265380859375,
-0.003753662109375,
-0.0240631103515625,
0.047515869140625,
0.01351165771484375,
-0.0084228515625,
0.02276611328125,
-0.0149383544921875,
0.038482666015625,
-0.01116943359375,
-0.0090179443359375,
0.0400390625,
-0.00494384765625,
-0.006450653076171875,
-0.0171661376953125,
-0.0131683349609375,
-0.02691650390625,
0.0633544921875,
0.0279998779296875,
-0.01361846923828125,
-0.076171875,
-0.0286712646484375,
0.00858306884765625,
-0.037353515625,
0.02410888671875,
-0.00679779052734375,
0.00492095947265625,
-0.0023365020751953125,
0.031097412109375,
0.003307342529296875,
-0.005847930908203125,
0.0268402099609375,
0.006938934326171875,
0.05810546875,
-0.01947021484375,
0.007244110107421875,
-0.0145416259765625,
-0.01556396484375,
0.034637451171875,
-0.00446319580078125,
-0.048248291015625,
0.004451751708984375,
-0.0037841796875,
-0.030731201171875,
0.0308380126953125,
-0.05511474609375,
0.0654296875,
0.0445556640625,
0.0009126663208007812,
-0.0203399658203125,
-0.09173583984375,
-0.0032176971435546875,
-0.06378173828125,
0.007686614990234375,
-0.020843505859375,
0.01406097412109375,
0.0501708984375,
0.0390625,
-0.00865936279296875,
0.0665283203125,
-0.0273284912109375,
0.033233642578125,
-0.0239715576171875,
0.0206146240234375,
0.0007872581481933594,
-0.00505828857421875,
0.04443359375,
-0.033447265625,
0.0092315673828125,
-0.0305633544921875,
-0.0469970703125,
0.0289459228515625,
0.0003857612609863281,
-0.00476837158203125,
0.02935791015625,
0.0133819580078125,
0.0648193359375,
-0.0254364013671875,
0.0030517578125,
0.01099395751953125,
-0.017242431640625,
-0.0032482147216796875,
0.02130126953125,
0.0162506103515625,
0.013092041015625,
-0.02020263671875,
0.017822265625,
-0.0528564453125,
-0.024261474609375,
0.0528564453125,
-0.07818603515625,
0.00222015380859375,
0.0222625732421875,
-0.0129241943359375,
-0.034271240234375,
-0.0130462646484375,
-0.015777587890625,
0.01123046875,
-0.0201416015625,
-0.01218414306640625,
0.035369873046875,
-0.049285888671875,
-0.003742218017578125,
-0.0103607177734375,
0.00687408447265625,
-0.03704833984375,
0.0276947021484375,
0.02642822265625,
0.042388916015625,
-0.0262451171875,
-0.01087188720703125,
-0.037750244140625,
-0.030517578125,
-0.01442718505859375,
-0.0186004638671875,
-0.045654296875,
0.01546478271484375,
-0.0160980224609375,
0.00478363037109375,
-0.0284423828125,
-0.02264404296875,
-0.0148773193359375,
0.054443359375,
0.0421142578125,
0.047637939453125,
-0.01078033447265625,
0.00234222412109375,
-0.01010894775390625,
-0.01751708984375,
-0.006023406982421875,
0.006443023681640625,
0.031097412109375,
-0.0083160400390625,
0.019012451171875,
-0.03851318359375,
-0.0151824951171875,
0.0161285400390625,
-0.02923583984375,
-0.030242919921875,
-0.007419586181640625,
-0.00804901123046875,
0.0062408447265625,
-0.0008707046508789062,
0.0115814208984375,
-0.038818359375,
-0.006000518798828125,
-0.028594970703125,
-0.0198516845703125,
-0.0222930908203125,
-0.01222991943359375,
0.0261993408203125,
-0.044647216796875,
0.01366424560546875,
-0.022491455078125,
-0.0224609375,
-0.026336669921875,
0.04498291015625,
-0.0268707275390625,
0.0158843994140625,
-0.040130615234375,
-0.031341552734375,
0.01096343994140625,
-0.0232086181640625,
-0.00113677978515625,
0.00788116455078125,
-0.026611328125,
0.060546875,
0.01265716552734375,
0.0594482421875,
-0.0212249755859375,
0.013763427734375,
0.0165252685546875,
-0.0219879150390625,
0.0262298583984375,
-0.006587982177734375,
0.0209808349609375,
-0.002475738525390625,
0.01580810546875,
-0.033477783203125,
-0.04278564453125,
0.039306640625,
-0.0028285980224609375,
-0.008514404296875,
-0.01171112060546875,
0.032867431640625,
-0.004032135009765625,
-0.0189971923828125,
0.02154541015625,
0.0002548694610595703,
-0.01541900634765625,
-0.006500244140625,
0.0026988983154296875,
0.01061248779296875,
0.0260162353515625,
-0.037078857421875,
-0.0299072265625,
0.006542205810546875,
-0.0027179718017578125,
-0.00514984130859375,
-0.0007252693176269531,
-0.05511474609375,
-0.061920166015625,
-0.042236328125,
-0.0112457275390625,
-0.030426025390625,
0.003559112548828125,
0.0090789794921875,
-0.04681396484375,
0.02740478515625,
-0.0277099609375,
0.020172119140625,
0.0024700164794921875,
-0.07745361328125,
0.0345458984375,
-0.0160675048828125,
0.02667236328125,
0.016510009765625,
-0.0230255126953125,
0.01111602783203125,
0.0078582763671875,
-0.04656982421875,
0.01068115234375,
0.03887939453125,
0.044158935546875,
-0.026153564453125,
-0.0159912109375,
0.051300048828125,
0.0212554931640625,
-0.024169921875,
0.0279541015625,
-0.001922607421875,
-0.06298828125,
-0.053192138671875,
0.00954437255859375,
-0.06719970703125,
0.016998291015625,
0.035980224609375,
-0.0308685302734375,
0.0215606689453125,
0.027496337890625,
-0.030975341796875,
-0.00615692138671875,
0.0171051025390625,
-0.04168701171875,
-0.00360107421875,
-0.0139923095703125,
0.03350830078125,
-0.0186920166015625,
-0.030731201171875,
-0.0361328125,
0.0194244384765625,
-0.03802490234375,
-0.0109710693359375,
0.004428863525390625,
-0.002147674560546875,
-0.031341552734375,
0.011505126953125,
0.0869140625,
0.0418701171875,
0.03515625,
0.02911376953125,
-0.02777099609375,
0.033355712890625,
-0.0311279296875,
-0.057220458984375,
0.006740570068359375,
-0.02703857421875,
-0.0511474609375,
0.0240478515625,
0.005756378173828125,
0.00960540771484375,
0.032318115234375,
0.031890869140625,
0.006969451904296875,
0.007747650146484375,
0.012451171875,
-0.05950927734375,
0.034942626953125,
0.00334930419921875,
0.0229644775390625,
0.01424407958984375,
0.0173797607421875,
-0.01290130615234375,
0.042816162109375,
-0.01322174072265625,
-0.03070068359375,
-0.032135009765625,
-0.00676727294921875,
-0.021636962890625,
0.0086669921875,
-0.033935546875,
0.067626953125,
-0.025360107421875,
0.03253173828125,
-0.007549285888671875,
0.03302001953125,
-0.0035533905029296875,
0.02044677734375,
-0.016845703125,
0.00844573974609375,
-0.0237579345703125,
-0.0364990234375,
0.0182342529296875,
0.01003265380859375,
-0.005641937255859375,
0.019683837890625,
0.0051422119140625,
-0.01470184326171875,
0.02117919921875,
-0.02435302734375,
0.0024013519287109375,
0.03668212890625,
0.0148162841796875,
0.01070404052734375,
0.0237274169921875,
-0.02691650390625,
-0.006137847900390625,
-0.0113983154296875,
0.024810791015625,
0.0123443603515625,
0.00499725341796875,
-0.021759033203125,
0.053466796875,
-0.01708984375,
0.01861572265625,
-0.00925445556640625,
-0.00890350341796875,
-0.0016078948974609375,
-0.00994873046875,
-0.0311431884765625,
-0.0009918212890625,
0.0025768280029296875,
0.037750244140625,
-0.048919677734375,
0.018707275390625,
0.03436279296875,
0.05908203125,
-0.01204681396484375,
-0.035888671875,
0.028106689453125,
-0.0216827392578125,
-0.030426025390625,
-0.01418304443359375,
-0.02691650390625,
0.0328369140625,
-0.025299072265625,
0.035308837890625,
-0.021148681640625,
0.051483154296875,
0.0018663406372070312,
0.032379150390625,
0.015960693359375,
-0.031494140625,
-0.0301971435546875,
0.0143280029296875,
0.044891357421875,
0.047454833984375,
-0.0214996337890625,
-0.0009822845458984375,
0.007488250732421875,
-0.00951385498046875,
-0.024444580078125,
0.00536346435546875,
-0.017791748046875,
0.034912109375,
0.0249176025390625,
-0.0270538330078125,
-0.00287628173828125,
-0.0201568603515625,
0.0245361328125,
-0.0462646484375,
-0.01071929931640625,
-0.01233673095703125,
-0.038909912109375,
-0.042572021484375,
-0.0239105224609375,
0.0550537109375,
0.0030879974365234375,
0.07177734375,
-0.0259246826171875,
0.033477783203125,
-0.023651123046875,
0.04541015625,
-0.06805419921875,
-0.026824951171875,
0.0080718994140625,
-0.041961669921875,
0.0008525848388671875,
0.0312042236328125,
-0.093505859375,
0.038818359375,
0.029144287109375,
-0.01175689697265625,
0.030242919921875,
0.028778076171875,
-0.007030487060546875,
-0.0228424072265625,
-0.01250457763671875,
-0.051055908203125,
-0.041046142578125,
-0.03680419921875,
-0.00841522216796875,
0.00734710693359375,
-0.04644775390625,
-0.0268402099609375,
-0.0279083251953125,
-0.0030879974365234375,
-0.068359375,
0.0261993408203125,
-0.00881195068359375,
0.042144775390625,
0.03607177734375,
0.0008683204650878906,
-0.01397705078125,
-0.006458282470703125,
-0.00981903076171875,
0.0155181884765625,
0.0181884765625,
0.024932861328125,
0.004791259765625,
0.0208740234375,
0.07293701171875,
0.055908203125,
0.06402587890625,
-0.0261993408203125,
0.00832366943359375,
0.069091796875,
-0.00690460205078125,
-0.010498046875,
-0.033447265625,
-0.0236053466796875,
-0.0228729248046875,
-0.006656646728515625,
0.030426025390625,
-0.0110321044921875,
-0.0239715576171875,
-0.08746337890625,
0.049560546875,
0.007732391357421875,
0.0061798095703125,
-0.0687255859375,
0.102783203125,
-0.039337158203125,
-0.007232666015625,
0.00981903076171875,
0.0810546875,
-0.01751708984375,
0.021697998046875,
-0.064453125,
-0.05450439453125,
-0.005229949951171875,
0.0633544921875,
-0.032470703125,
0.0276947021484375,
0.06451416015625,
-0.04595947265625,
-0.051483154296875,
-0.003021240234375,
0.023406982421875,
0.029296875,
0.0102386474609375,
-0.003223419189453125,
0.0173187255859375,
-0.0037746429443359375,
-0.01971435546875,
-0.060882568359375,
0.0030078887939453125,
-0.04901123046875,
-0.0021038055419921875,
-0.0034732818603515625,
-0.0154266357421875,
-0.014862060546875,
-0.0494384765625,
-0.0736083984375,
0.03289794921875,
-0.005779266357421875,
-0.03289794921875,
-0.039794921875,
0.052886962890625,
0.003643035888671875,
-0.006977081298828125,
-0.00829315185546875,
-0.023406982421875,
0.0201416015625,
0.0104522705078125,
0.0207061767578125,
0.0299530029296875,
0.002513885498046875,
-0.0034389495849609375,
-0.01369476318359375,
0.0404052734375,
0.0236663818359375,
0.031829833984375,
-0.05438232421875,
0.03167724609375,
-0.0213165283203125,
0.0039215087890625,
-0.037994384765625,
-0.031341552734375,
0.0119781494140625,
0.058074951171875,
0.01030731201171875,
-0.00600433349609375,
-0.061676025390625,
-0.0238189697265625,
0.1011962890625,
0.062408447265625,
0.0297393798828125,
-0.024383544921875,
0.00864410400390625,
0.0325927734375,
-0.0254974365234375,
0.0007395744323730469,
0.03460693359375,
-0.0458984375,
-0.015411376953125,
-0.01041412353515625,
0.0023937225341796875,
-0.0084991455078125,
0.020721435546875,
-0.032318115234375,
-0.025726318359375,
-0.0271453857421875,
-0.02496337890625,
-0.058563232421875,
-0.020050048828125,
0.06005859375,
-0.03961181640625,
-0.01175689697265625,
0.0245361328125,
0.009429931640625,
0.035675048828125,
0.031280517578125,
0.0391845703125,
-0.006343841552734375,
-0.0125885009765625,
0.027679443359375,
0.034210205078125,
-0.005580902099609375,
-0.00907135009765625,
-0.046356201171875,
-0.01354217529296875,
0.01165771484375,
0.00829315185546875,
0.0117340087890625,
0.000027894973754882812,
0.0103607177734375,
-0.002353668212890625,
0.04534912109375,
-0.00344085693359375,
-0.00933074951171875,
-0.0235443115234375,
0.04180908203125,
0.03973388671875,
-0.04443359375,
0.08819580078125,
-0.036773681640625,
0.009796142578125,
0.006748199462890625,
0.035369873046875,
-0.0308380126953125,
0.01190948486328125,
-0.00980377197265625,
0.0121002197265625,
0.007183074951171875
]
|
9887ca771cd444e1687b3c3c92ad064ff49487ae | Wordpress Stackexchange
Q: Filter Orders in Admin area, based on Custom meta Story:
I have custom role Staff for my WooCommerce shop,
When a Customer create an Order, the Order is assigned a custom meta name handle_by where the value is a random value of user where role is Staff.
When Staff is login and click WooCoomerce > Orders, He/She will only see Orders where handle_by is match current user id.
Problem:
How to filter WooCommerce > Order to only show Order where the custom meta handle_by is match with current user login.
A: Solved it, using pre_get_posts filter and WP_Query->set() method
function foo_filter_orders($query) {
global $pagenow;
$qv = &$query->query_vars;
$currentUserRoles = wp_get_current_user()->roles;
if (in_array('shop_manager', $currentUserRoles)) {
if ( $pagenow == 'edit.php' &&
isset($qv['post_type']) && $qv['post_type'] == 'shop_order' ) {
$query->set('meta_key', 'handle_by');
$query->set('meta_value', 'shopmanager1');
}
}
return $query;
}
add_filter('pre_get_posts', 'foo_filter_orders');
| Q: Filter Orders in Admin area, based on Custom meta Story:
I have custom role Staff for my WooCommerce shop,
When a Customer create an Order, the Order is assigned a custom meta name handle_by where the value is a random value of user where role is Staff.
When Staff is login and click WooCoomerce > Orders, He/She will only see Orders where handle_by is match current user id.
Problem:
How to filter WooCommerce > Order to only show Order where the custom meta handle_by is match with current user login.
A: Solved it, using pre_get_posts filter and WP_Query->set() method
function foo_filter_orders($query) {
global $pagenow;
$qv = &$query->query_vars;
$currentUserRoles = wp_get_current_user()->roles;
if (in_array('shop_manager', $currentUserRoles)) {
if ( $pagenow == 'edit.php' &&
isset($qv['post_type']) && $qv['post_type'] == 'shop_order' ) {
$query->set('meta_key', 'handle_by');
$query->set('meta_value', 'shopmanager1');
}
}
return $query;
}
add_filter('pre_get_posts', 'foo_filter_orders');
A: add_action( 'restrict_manage_posts', 'display_admin_shop_order_language_filter' );
function display_admin_shop_order_language_filter(){
global $pagenow, $post_type;
if( 'shop_order' === $post_type && 'edit.php' === $pagenow ) {
$domain = 'woodmart';
$languages = array(array(__('Ebay', $domain),'ebay_managed_payment') );
$current = isset($_GET['filter_shop_order_payment_method'])? $_GET['filter_shop_order_payment_method'] : '';
echo '<select name="filter_shop_order_payment_method">
<option value="">' . __('Filter By Payment Method ', $domain) . '</option>';
foreach ( $languages as $value ) {
printf( '<option value="%s"%s>%s</option>', $value[1],
$value[1] === $current ? '" selected="selected"' : '', $value[0] );
}
echo '</select>';
}
}
add_action( 'pre_get_posts', 'process_admin_shop_order_language_filter' );
function process_admin_shop_order_language_filter( $query ) {
global $pagenow;
if ( $query->is_admin && $pagenow == 'edit.php' && isset( $_GET['filter_shop_order_payment_method'] )
&& $_GET['filter_shop_order_payment_method'] != '' && $_GET['post_type'] == 'shop_order' ) {
//$meta_query = $query->get( 'meta_query' ); // Get the current "meta query"
/*$meta_query[] = array( // Add to "meta query"
'meta_key' => '_payment_method',
'value' => esc_attr( $_GET['filter_shop_order_payment_method'] ),
);*/
$meta_query = array(
array(
'key' => '_payment_method',
'value' => esc_attr( $_GET['filter_shop_order_payment_method'] ),
'compare' => '='
)
);
$query->set( 'meta_query', $meta_query ); // Set the new "meta query"
$query->set( 'posts_per_page', 10 ); // Set "posts per page"
$query->set( 'paged', ( get_query_var('paged') ? get_query_var('paged') : 1 ) ); // Set "paged"
}
}
| wordpress | {
"language": "en",
"length": 324,
"provenance": "stackexchange_00019.jsonl.gz:439318",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123586"
} | [
0.059539794921875,
0.005462646484375,
0.023712158203125,
-0.05340576171875,
0.022613525390625,
-0.01345062255859375,
0.0401611328125,
-0.01837158203125,
0.011077880859375,
0.032135009765625,
-0.00818634033203125,
-0.00852203369140625,
0.0145263671875,
-0.036834716796875,
-0.0004429817199707031,
-0.0115203857421875,
0.00873565673828125,
0.025177001953125,
0.044464111328125,
0.0032405853271484375,
-0.005847930908203125,
0.0176544189453125,
0.025115966796875,
-0.0251922607421875,
0.03271484375,
-0.05755615234375,
0.095947265625,
-0.037322998046875,
0.07061767578125,
0.0093536376953125,
0.0236968994140625,
-0.0799560546875,
0.01059722900390625,
-0.0120697021484375,
0.01318359375,
-0.0175628662109375,
0.0028095245361328125,
0.0035037994384765625,
0.01251220703125,
-0.0210113525390625,
0.01812744140625,
0.0048675537109375,
-0.028594970703125,
0.03204345703125,
-0.0237884521484375,
-0.07659912109375,
0.04852294921875,
-0.020111083984375,
0.0443115234375,
0.03399658203125,
0.01160430908203125,
0.05499267578125,
0.0078277587890625,
-0.0098724365234375,
-0.0103302001953125,
-0.002948760986328125,
-0.03857421875,
-0.006778717041015625,
0.00975799560546875,
0.022369384765625,
0.01018524169921875,
-0.00714111328125,
0.006305694580078125,
-0.01076507568359375,
0.0081024169921875,
-0.0027141571044921875,
0.0296783447265625,
0.0196685791015625,
-0.006988525390625,
0.0008058547973632812,
0.01287841796875,
0.0089263916015625,
0.0121917724609375,
-0.0040283203125,
-0.03179931640625,
-0.034515380859375,
0.0142364501953125,
-0.019287109375,
0.01343536376953125,
-0.0011663436889648438,
0.011138916015625,
-0.0266265869140625,
-0.008331298828125,
0.01544952392578125,
-0.020751953125,
0.03173828125,
-0.0087432861328125,
-0.006809234619140625,
0.01203155517578125,
-0.011474609375,
0.0011453628540039062,
-0.0323486328125,
0.01486968994140625,
0.0184173583984375,
-0.025787353515625,
-0.0285491943359375,
0.0201873779296875,
0.017913818359375,
-0.02777099609375,
-0.02764892578125,
0.01538848876953125,
-0.020477294921875,
-0.01323699951171875,
-0.01074981689453125,
0.006175994873046875,
0.01392364501953125,
-0.0159454345703125,
0.0455322265625,
0.050201416015625,
0.040924072265625,
0.01422119140625,
-0.0007791519165039062,
-0.011444091796875,
-0.044403076171875,
0.006256103515625,
0.0301361083984375,
-0.0222625732421875,
0.0030384063720703125,
0.00646209716796875,
-0.0037708282470703125,
0.006195068359375,
0.01300048828125,
0.05328369140625,
-0.0546875,
0.0120086669921875,
0.004558563232421875,
-0.032562255859375,
-0.058013916015625,
-0.00244140625,
0.0158538818359375,
-0.018035888671875,
-0.0018310546875,
0.0499267578125,
0.04144287109375,
0.0083770751953125,
-0.012939453125,
0.03118896484375,
-0.0030155181884765625,
0.0184326171875,
-0.03466796875,
0.031097412109375,
0.0136260986328125,
-0.02227783203125,
-0.00891876220703125,
0.01441192626953125,
0.002353668212890625,
-0.006763458251953125,
0.014007568359375,
0.0222930908203125,
0.024749755859375,
-0.05804443359375,
0.017120361328125,
0.0148773193359375,
0.005847930908203125,
0.0301666259765625,
0.03558349609375,
0.041900634765625,
0.0056304931640625,
-0.0435791015625,
-0.012969970703125,
-0.00743865966796875,
0.0121307373046875,
0.0338134765625,
-0.057830810546875,
-0.06298828125,
0.0105133056640625,
-0.039459228515625,
-0.01114654541015625,
0.0171661376953125,
0.00800323486328125,
0.0236663818359375,
-0.0064849853515625,
-0.0011730194091796875,
-0.013580322265625,
-0.01751708984375,
0.0014743804931640625,
0.005977630615234375,
0.043914794921875,
0.029266357421875,
-0.0282440185546875,
-0.02880859375,
-0.042938232421875,
0.050628662109375,
-0.0083770751953125,
-0.04345703125,
-0.00562286376953125,
0.00846099853515625,
0.00121307373046875,
0.012115478515625,
0.00698089599609375,
0.06024169921875,
0.019500732421875,
-0.0628662109375,
0.02313232421875,
-0.002399444580078125,
-0.0288848876953125,
0.043914794921875,
-0.0005083084106445312,
0.020843505859375,
-0.00479888916015625,
0.030181884765625,
-0.0240478515625,
0.051025390625,
-0.0401611328125,
-0.032867431640625,
-0.0087738037109375,
-0.01433563232421875,
0.03033447265625,
-0.021514892578125,
0.001949310302734375,
0.0310516357421875,
0.0144195556640625,
-0.0513916015625,
0.02276611328125,
0.0006160736083984375,
-0.01438140869140625,
-0.01143646240234375,
0.086181640625,
-0.005687713623046875,
0.0682373046875,
-0.01262664794921875,
-0.07220458984375,
0.0026187896728515625,
-0.01934814453125,
0.0416259765625,
0.025115966796875,
-0.007640838623046875,
0.0081329345703125,
0.08184814453125,
0.01535797119140625,
0.0207366943359375,
-0.01085662841796875,
0.05859375,
0.032135009765625,
-0.0216064453125,
0.0033245086669921875,
0.0196685791015625,
-0.080078125,
0.006397247314453125,
0.050048828125,
0.0213470458984375,
0.06768798828125,
0.027252197265625,
0.052886962890625,
0.03155517578125,
-0.050628662109375,
0.0220794677734375,
-0.0006508827209472656,
-0.02227783203125,
0.01120758056640625,
-0.035064697265625,
-0.00894927978515625,
0.03778076171875,
-0.01085662841796875,
0.005321502685546875,
0.0430908203125,
-0.0166015625,
-0.01232147216796875,
0.0159912109375,
-0.009368896484375,
-0.0100555419921875,
-0.018035888671875,
0.00695037841796875,
-0.0190277099609375,
0.01528167724609375,
0.0143890380859375,
0.0118255615234375,
0.00612640380859375,
-0.041961669921875,
0.0089111328125,
0.037750244140625,
0.004108428955078125,
0.00386810302734375,
-0.002239227294921875,
-0.0180511474609375,
-0.0111541748046875,
-0.03668212890625,
0.0158538818359375,
0.0162506103515625,
-0.01995849609375,
0.002399444580078125,
0.00183868408203125,
0.0020275115966796875,
0.00954437255859375,
-0.00510406494140625,
-0.034698486328125,
0.032196044921875,
0.04388427734375,
0.026824951171875,
0.00843048095703125,
0.03173828125,
0.016876220703125,
0.006984710693359375,
0.0279388427734375,
-0.0184478759765625,
-0.0240936279296875,
0.0533447265625,
-0.01462554931640625,
0.026275634765625,
-0.032501220703125,
0.03570556640625,
0.04425048828125,
-0.0169677734375,
0.004657745361328125,
0.0217132568359375,
-0.038909912109375,
-0.0069580078125,
0.054412841796875,
0.0227813720703125,
-0.0193634033203125,
-0.00037026405334472656,
0.0550537109375,
0.01983642578125,
0.0430908203125,
-0.0048675537109375,
-0.01554107666015625,
-0.0040283203125,
0.01038360595703125,
-0.03680419921875,
-0.0574951171875,
0.01678466796875,
-0.01401519775390625,
-0.019378662109375,
-0.00911712646484375,
-0.00589752197265625,
0.0087890625,
-0.023681640625,
-0.016448974609375,
0.00714111328125,
0.00772857666015625,
-0.007228851318359375,
0.01384735107421875,
-0.01500701904296875,
0.021575927734375,
-0.006748199462890625,
-0.01690673828125,
-0.01016998291015625,
0.059814453125,
0.01465606689453125,
-0.0192108154296875,
0.0133514404296875,
0.0099334716796875,
-0.0041046142578125,
0.01275634765625,
-0.0177459716796875,
-0.023895263671875,
0.034637451171875,
-0.00322723388671875,
0.0377197265625,
0.01326751708984375,
-0.000049114227294921875,
-0.006801605224609375,
0.0224456787109375,
0.0142974853515625,
0.04010009765625,
-0.0015363693237304688,
-0.04010009765625,
0.01715087890625,
0.040130615234375,
-0.030731201171875,
-0.0231475830078125,
-0.046356201171875,
-0.056915283203125,
0.06866455078125,
0.052001953125,
0.00028252601623535156,
-0.01549530029296875,
0.0287017822265625,
0.042724609375,
0.045806884765625,
-0.0178680419921875,
-0.0217742919921875,
-0.0330810546875,
0.0433349609375,
0.04791259765625,
0.008209228515625,
0.054107666015625,
0.0017948150634765625,
0.01763916015625,
0.0350341796875,
0.018280029296875,
0.010406494140625,
-0.0022182464599609375,
-0.0214080810546875,
-0.02587890625,
0.06060791015625,
0.0091705322265625,
0.007564544677734375,
-0.0380859375,
-0.035186767578125,
-0.029144287109375,
0.0804443359375,
0.006671905517578125,
-0.01558685302734375,
-0.00017452239990234375,
-0.0169677734375,
0.007488250732421875,
0.033935546875,
-0.0252685546875,
-0.006214141845703125,
-0.1014404296875,
0.0170440673828125,
-0.023162841796875,
-0.0219268798828125,
0.0003046989440917969,
-0.06866455078125,
-0.042510986328125,
-0.055328369140625,
0.06280517578125,
-0.036041259765625,
0.037384033203125,
0.01197052001953125,
0.00841522216796875,
-0.00582122802734375,
-0.04156494140625,
-0.009307861328125,
-0.045501708984375,
-0.007526397705078125,
0.00408172607421875,
0.0543212890625,
-0.0017194747924804688,
0.01348876953125,
-0.048492431640625,
0.0174102783203125,
0.0114593505859375,
0.0501708984375,
-0.0115966796875,
0.004184722900390625,
0.0280303955078125,
-0.03143310546875,
-0.01519012451171875,
-0.0165863037109375,
-0.006195068359375,
0.0196685791015625,
-0.020111083984375,
-0.0005211830139160156,
-0.036468505859375,
-0.046539306640625,
0.0296173095703125,
-0.05126953125,
-0.12841796875,
-0.062744140625,
0.008026123046875,
0.002197265625,
-0.0108642578125,
0.0017709732055664062,
-0.064208984375,
-0.08953857421875,
-0.01290130615234375,
-0.0469970703125,
0.00568389892578125,
0.0180816650390625,
0.03302001953125,
0.01873779296875,
0.010284423828125,
0.028106689453125,
-0.00814056396484375,
0.01849365234375,
0.0280303955078125,
0.0386962890625,
0.03057861328125,
0.01488494873046875,
-0.035675048828125,
0.0038604736328125,
-0.019287109375,
-0.0262603759765625,
0.07147216796875,
-0.0230712890625,
-0.05340576171875,
0.03985595703125,
-0.059478759765625,
0.033294677734375,
0.031707763671875,
0.004917144775390625,
-0.05377197265625,
0.0199127197265625,
0.039581298828125,
-0.01251220703125,
0.0285491943359375,
-0.0009336471557617188,
-0.024688720703125,
0.0012664794921875,
0.0025310516357421875,
0.06878662109375,
0.024932861328125,
0.0023403167724609375,
0.036346435546875,
0.02093505859375,
0.01346588134765625,
-0.00665283203125,
0.0028171539306640625,
-0.0206298828125,
0.035400390625,
-0.0221099853515625,
0.003719329833984375,
-0.01519775390625,
-0.0169525146484375,
0.0845947265625,
-0.030853271484375,
-0.05694580078125,
-0.0016260147094726562,
-0.03814697265625,
0.0186614990234375,
0.054290771484375,
-0.020843505859375,
0.035400390625,
0.0038909912109375,
-0.0166015625,
0.00861358642578125,
-0.04736328125,
-0.00749969482421875,
-0.043670654296875,
-0.0006771087646484375,
-0.0033550262451171875,
0.0036487579345703125,
-0.0011730194091796875,
0.1026611328125,
-0.01044464111328125,
0.057220458984375,
-0.01433563232421875,
0.041534423828125,
0.023681640625,
0.00643157958984375,
0.005420684814453125,
0.02947998046875,
0.001995086669921875,
-0.0004658699035644531,
0.0222930908203125,
0.002231597900390625,
-0.035614013671875,
0.02392578125,
-0.008148193359375,
0.0005006790161132812,
0.036468505859375,
0.00701904296875,
0.0289154052734375,
-0.0182952880859375,
0.00939178466796875,
-0.01032257080078125,
-0.0241546630859375,
-0.02484130859375,
-0.01416015625,
0.0034942626953125,
-0.00806427001953125,
0.0038280487060546875,
0.0221710205078125,
0.01274871826171875,
0.016265869140625,
-0.0284271240234375,
-0.01425933837890625,
-0.025970458984375,
-0.0039043426513671875,
-0.02166748046875,
-0.002086639404296875,
0.0042877197265625,
-0.060272216796875,
-0.03070068359375,
0.0027866363525390625,
-0.00989532470703125,
0.0390625,
-0.0391845703125,
0.04193115234375,
-0.0386962890625,
0.006595611572265625,
-0.04766845703125,
0.018341064453125,
0.0237579345703125,
0.01490020751953125,
-0.049346923828125,
-0.0010328292846679688,
-0.037994384765625,
-0.0202178955078125,
-0.0239105224609375,
-0.0164947509765625,
-0.02789306640625,
-0.0007638931274414062,
-0.03863525390625,
0.0166778564453125,
-0.020660400390625,
0.010101318359375,
-0.0220947265625,
-0.0038700103759765625,
0.0017595291137695312,
0.0037441253662109375,
-0.0261688232421875,
0.0684814453125,
0.00626373291015625,
0.03692626953125,
-0.0124053955078125,
-0.0200958251953125,
-0.036651611328125,
0.030059814453125,
0.00795745849609375,
-0.032928466796875,
-0.040008544921875,
-0.023834228515625,
-0.0504150390625,
0.034332275390625,
0.052337646484375,
-0.0162200927734375,
0.04833984375,
-0.011016845703125,
-0.002864837646484375,
-0.01328277587890625,
-0.078857421875,
-0.02325439453125,
-0.00255584716796875,
0.007221221923828125,
-0.01061248779296875,
0.0322265625,
-0.0028533935546875,
0.0169219970703125,
-0.002185821533203125,
-0.016357421875,
0.015655517578125,
0.0006442070007324219,
-0.066162109375,
0.063232421875,
0.0765380859375,
0.019195556640625,
0.039031982421875,
0.00083160400390625,
0.01800537109375,
0.0026702880859375,
0.0023517608642578125,
0.044464111328125,
0.0188446044921875,
0.05859375,
-0.0120391845703125,
-0.01085662841796875,
0.048614501953125,
-0.0213623046875,
0.0211334228515625,
0.05682373046875,
0.07403564453125,
-0.10882568359375,
0.014495849609375,
0.0452880859375,
0.0211639404296875,
0.01230621337890625,
-0.003055572509765625,
-0.0101470947265625,
-0.023895263671875,
0.05133056640625,
-0.0240478515625,
-0.0164794921875,
0.030364990234375,
-0.01224517822265625,
-0.0005235671997070312,
0.0004892349243164062,
0.0008974075317382812,
-0.02740478515625,
0.0384521484375,
-0.06500244140625,
-0.021697998046875,
-0.02166748046875,
-0.035888671875,
0.036956787109375,
-0.022216796875,
0.0178985595703125,
-0.07476806640625,
-0.0079498291015625,
-0.01103973388671875,
0.007312774658203125,
0.0626220703125,
0.0160064697265625,
0.017608642578125,
0.0418701171875,
0.007568359375,
-0.00714111328125,
0.00977325439453125,
0.0029163360595703125,
-0.005535125732421875,
-0.046966552734375,
-0.00380706787109375,
0.02691650390625,
-0.0709228515625,
0.0191497802734375,
-0.011138916015625,
-0.0143585205078125,
-0.020965576171875,
-0.03997802734375,
0.0155487060546875,
0.005084991455078125,
-0.0244903564453125,
0.01457977294921875,
0.05206298828125,
-0.01432037353515625,
0.045257568359375,
0.014678955078125,
-0.0251617431640625,
-0.05560302734375,
0.0355224609375,
-0.068359375,
-0.0172119140625,
0.044403076171875,
-0.08172607421875,
0.005184173583984375,
-0.04119873046875,
0.03717041015625,
-0.01245880126953125,
-0.01186370849609375,
0.0202789306640625,
-0.029754638671875,
-0.053985595703125,
0.06341552734375,
0.0057525634765625,
0.0950927734375,
-0.052825927734375,
-0.01129913330078125,
0.0401611328125,
0.0297393798828125,
0.030731201171875,
0.0206451416015625,
-0.058990478515625,
-0.0196685791015625,
0.034088134765625,
0.0031871795654296875,
0.003326416015625,
0.07135009765625,
-0.00780487060546875,
0.04119873046875,
0.02117919921875,
-0.03997802734375,
0.0281982421875,
-0.01605224609375,
-0.03607177734375,
0.020294189453125,
0.005245208740234375,
0.0080718994140625,
-0.036346435546875,
0.048065185546875,
-0.043670654296875,
-0.0226593017578125,
0.038726806640625,
-0.051025390625,
0.01461029052734375,
0.006717681884765625,
0.03997802734375,
-0.046112060546875,
-0.045562744140625,
-0.0088958740234375,
0.038238525390625,
0.03778076171875,
0.032379150390625,
0.029754638671875,
0.0298004150390625,
0.067626953125,
-0.045135498046875,
0.0143280029296875,
-0.0096588134765625,
-0.034698486328125,
0.0161590576171875,
0.0032062530517578125,
0.01424407958984375,
-0.0295562744140625,
0.0185089111328125,
0.009429931640625,
0.01522064208984375,
-0.0230560302734375,
0.0166015625,
-0.004154205322265625,
-0.0247955322265625,
0.00007659196853637695,
-0.051300048828125,
-0.012451171875,
-0.01702880859375,
-0.037994384765625,
-0.06634521484375,
0.046234130859375,
0.0179443359375,
0.0230865478515625,
-0.023406982421875,
0.00731658935546875,
-0.081787109375,
0.019683837890625,
-0.04632568359375,
0.025604248046875,
0.020355224609375,
0.0309600830078125,
-0.006351470947265625,
0.057647705078125,
0.003162384033203125,
-0.01256561279296875,
-0.0109405517578125,
0.003509521484375,
-0.0233306884765625,
0.017852783203125,
-0.05316162109375,
-0.037750244140625,
-0.017242431640625,
0.05328369140625,
-0.01119232177734375,
0.014312744140625,
0.00548553466796875,
0.01192474365234375,
0.00829315185546875,
-0.007511138916015625,
0.02435302734375,
-0.0307159423828125,
0.01517486572265625,
-0.00829315185546875,
-0.012298583984375,
-0.041748046875,
-0.025482177734375,
-0.0204925537109375,
0.061065673828125,
-0.046966552734375,
-0.02099609375,
0.0421142578125,
-0.0043792724609375,
-0.01375579833984375,
0.01163482666015625,
0.00302886962890625,
0.052703857421875,
0.00835418701171875,
-0.028289794921875,
-0.0020351409912109375,
-0.040863037109375,
-0.00791168212890625,
0.00626373291015625,
0.0290679931640625,
-0.0027332305908203125,
0.044830322265625,
0.015594482421875,
-0.0214080810546875,
0.0238037109375,
-0.0170440673828125,
0.034759521484375,
-0.00319671630859375,
-0.0067596435546875,
0.01070404052734375,
-0.01131439208984375,
-0.00411224365234375,
0.01959228515625,
0.0018787384033203125,
0.0313720703125,
-0.0176544189453125,
0.035980224609375,
0.024017333984375,
-0.0240631103515625,
0.0103302001953125,
-0.024627685546875,
-0.04119873046875,
0.0712890625,
-0.00860595703125,
-0.0301055908203125,
0.0077667236328125,
0.037017822265625,
-0.0246429443359375,
0.067626953125,
-0.0799560546875,
-0.04791259765625,
0.01788330078125,
0.0239410400390625,
-0.025665283203125,
0.049468994140625,
-0.00937652587890625,
-0.01459503173828125,
-0.019317626953125,
-0.0209197998046875,
0.037750244140625,
0.0504150390625,
0.03973388671875,
0.0209197998046875,
0.01058197021484375,
-0.0238189697265625,
0.039398193359375,
-0.023468017578125,
0.061798095703125,
0.03326416015625,
-0.035980224609375,
0.01390838623046875,
-0.005451202392578125,
-0.00540924072265625,
-0.0231170654296875,
0.04913330078125,
-0.06842041015625,
0.03179931640625,
-0.0220184326171875,
0.0019779205322265625,
0.033599853515625,
0.058013916015625,
0.007396697998046875,
0.0162811279296875,
0.0007014274597167969,
-0.01355743408203125,
-0.00736236572265625,
-0.00975799560546875,
0.0018768310546875,
0.0160675048828125,
-0.0267791748046875,
-0.0025157928466796875,
0.03076171875,
-0.05780029296875,
-0.00719451904296875,
-0.01343536376953125,
0.0240936279296875,
0.0087890625,
-0.04730224609375,
0.0243377685546875,
-0.005779266357421875,
-0.005542755126953125,
0.01050567626953125,
-0.01428985595703125,
0.004070281982421875,
0.0171661376953125,
-0.0005779266357421875,
0.03369140625,
-0.04034423828125,
-0.0203704833984375,
0.01285552978515625,
-0.056121826171875,
-0.0194244384765625,
0.031036376953125,
-0.0303802490234375,
-0.031280517578125,
-0.0535888671875,
0.01288604736328125,
-0.04473876953125,
-0.021026611328125,
0.002048492431640625,
0.00771331787109375,
-0.0033092498779296875,
-0.0789794921875,
-0.004299163818359375,
-0.03582763671875,
-0.0036525726318359375,
-0.0176239013671875,
-0.0128936767578125,
-0.0009675025939941406,
-0.0355224609375,
-0.05413818359375,
0.034088134765625,
-0.00701141357421875,
-0.0283203125,
-0.050872802734375,
-0.0206756591796875,
-0.0198822021484375,
0.030914306640625,
-0.01200103759765625,
-0.0474853515625,
-0.049407958984375,
0.03729248046875,
-0.01654052734375,
-0.0028743743896484375,
0.014892578125,
-0.010467529296875,
-0.0230712890625,
0.0091400146484375,
0.02716064453125,
-0.01519012451171875,
-0.0004229545593261719,
-0.0085601806640625,
0.0264434814453125,
0.004825592041015625,
-0.01245880126953125,
-0.000705718994140625,
0.03271484375,
-0.00794219970703125,
0.004566192626953125,
-0.014495849609375,
-0.030609130859375,
-0.0210418701171875,
0.033843994140625,
0.0460205078125,
0.016326904296875,
-0.00998687744140625,
-0.00971221923828125,
-0.0187835693359375,
-0.024749755859375,
-0.004230499267578125,
0.007427215576171875,
-0.05401611328125,
-0.00414276123046875,
0.00335693359375,
-0.058380126953125,
0.00910186767578125,
0.0157623291015625,
-0.06561279296875,
0.0210113525390625,
-0.00109100341796875,
-0.0020294189453125,
-0.06036376953125,
0.0281219482421875,
0.021514892578125,
-0.049957275390625,
-0.0374755859375,
0.00034165382385253906,
-0.008941650390625,
-0.0220794677734375,
-0.05108642578125,
-0.0181732177734375,
-0.0177764892578125,
-0.02496337890625,
0.0033721923828125,
-0.005435943603515625,
0.0159759521484375,
-0.0164947509765625,
-0.009124755859375,
-0.0297393798828125,
0.0264129638671875,
-0.00894927978515625,
0.0022335052490234375,
0.0102691650390625,
0.0362548828125,
0.023162841796875,
0.084716796875,
-0.0078887939453125,
0.04522705078125,
-0.0021915435791015625,
0.03289794921875,
0.050201416015625,
-0.03173828125,
0.09222412109375,
-0.041656494140625,
-0.00801849365234375,
0.0021381378173828125,
-0.04229736328125,
-0.051513671875,
-0.0035991668701171875,
0.02435302734375,
-0.0087890625,
0.006481170654296875
]
|
0d460e7fc484072f9a8d5fa559446bf3bcdaea56 | Wordpress Stackexchange
Q: Add custom directory in URL How can i add custom "directory" in my URL for pages and posts?
So the main website url is: http://www.example.com, but when i go to a page I want this kind of URL: http://www.example.com/SOMETHING/new_page
How can I put that "SOMETHING" in URL without affecting Wordpress functions?
A: Go to your
Dashboard => Settings => Permalinks
click on Custom Structure and paste this /something/%postname%/
And you can replace something
It will add the something keyword before pages and post url slugs.
| Q: Add custom directory in URL How can i add custom "directory" in my URL for pages and posts?
So the main website url is: http://www.example.com, but when i go to a page I want this kind of URL: http://www.example.com/SOMETHING/new_page
How can I put that "SOMETHING" in URL without affecting Wordpress functions?
A: Go to your
Dashboard => Settings => Permalinks
click on Custom Structure and paste this /something/%postname%/
And you can replace something
It will add the something keyword before pages and post url slugs.
A: You have to select "Custom structure" and add a prefix to your permalink structure in the permalinks settings, like:
/SOMETHING/%postname%/
Here is the the Wordpress Codex Page that explain how to choose permalink structure.
| wordpress | {
"language": "en",
"length": 121,
"provenance": "stackexchange_00019.jsonl.gz:439397",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123865"
} | [
0.08062744140625,
-0.019927978515625,
0.018707275390625,
-0.047607421875,
-0.01251220703125,
-0.01165771484375,
0.045623779296875,
-0.0010900497436523438,
-0.05218505859375,
0.01514434814453125,
0.04290771484375,
0.011077880859375,
-0.01293182373046875,
-0.05987548828125,
0.036407470703125,
-0.003078460693359375,
0.02716064453125,
-0.00665283203125,
0.028564453125,
-0.0131072998046875,
0.0042572021484375,
-0.00829315185546875,
0.059295654296875,
0.033782958984375,
0.0168304443359375,
0.026519775390625,
0.034759521484375,
-0.029083251953125,
0.0012998580932617188,
-0.0165252685546875,
0.0171966552734375,
-0.0133209228515625,
0.0128173828125,
-0.002048492431640625,
0.038177490234375,
0.0160980224609375,
0.04022216796875,
-0.014892578125,
0.029083251953125,
0.0028839111328125,
0.03619384765625,
-0.0197906494140625,
0.041656494140625,
0.01352691650390625,
0.01421356201171875,
-0.03436279296875,
0.057861328125,
-0.035003662109375,
0.01910400390625,
-0.01433563232421875,
-0.01226806640625,
0.0261383056640625,
-0.0177001953125,
-0.0009775161743164062,
-0.007503509521484375,
-0.0257720947265625,
0.030731201171875,
-0.024871826171875,
0.0246429443359375,
-0.06243896484375,
-0.03863525390625,
-0.00844573974609375,
0.04443359375,
0.047698974609375,
-0.006328582763671875,
-0.00994110107421875,
-0.0167388916015625,
0.028778076171875,
-0.04547119140625,
-0.0167999267578125,
0.0248870849609375,
-0.0274200439453125,
-0.014556884765625,
-0.039703369140625,
-0.0291290283203125,
0.02703857421875,
-0.01055145263671875,
-0.0289459228515625,
0.004756927490234375,
0.01473236083984375,
-0.007740020751953125,
-0.0168609619140625,
-0.0125274658203125,
-0.0643310546875,
0.03704833984375,
-0.03546142578125,
-0.005550384521484375,
-0.00093841552734375,
-0.02532958984375,
0.00629425048828125,
-0.028289794921875,
-0.0217437744140625,
0.01001739501953125,
-0.00679779052734375,
-0.0243072509765625,
0.005126953125,
-0.00714874267578125,
0.031036376953125,
0.00138092041015625,
0.054840087890625,
-0.0189666748046875,
-0.0291748046875,
0.07269287109375,
-0.0540771484375,
0.0028057098388671875,
0.049072265625,
0.0264129638671875,
0.0306243896484375,
0.038299560546875,
-0.0018739700317382812,
0.01280975341796875,
0.056884765625,
0.006130218505859375,
0.0100250244140625,
-0.04302978515625,
0.01024627685546875,
-0.01812744140625,
-0.02191162109375,
-0.0195770263671875,
0.01384735107421875,
-0.004791259765625,
0.0477294921875,
-0.00250244140625,
-0.06298828125,
-0.006591796875,
-0.02130126953125,
-0.0008993148803710938,
-0.0521240234375,
0.037322998046875,
0.01123046875,
-0.01141357421875,
-0.0026035308837890625,
0.0157623291015625,
0.03155517578125,
0.007293701171875,
-0.01023101806640625,
0.0255279541015625,
-0.0284881591796875,
-0.032379150390625,
0.0377197265625,
-0.0246124267578125,
-0.03179931640625,
0.0025272369384765625,
-0.0206451416015625,
0.02032470703125,
0.01552581787109375,
0.00838470458984375,
0.034332275390625,
0.01358795166015625,
-0.01052093505859375,
-0.00738525390625,
-0.004192352294921875,
0.0235137939453125,
0.0063934326171875,
-0.00466156005859375,
-0.0167388916015625,
-0.01551055908203125,
-0.0187835693359375,
0.03326416015625,
-0.00263214111328125,
-0.00286102294921875,
0.00922393798828125,
0.0204925537109375,
-0.0236053466796875,
-0.0213775634765625,
-0.036041259765625,
-0.03558349609375,
0.0016126632690429688,
0.013824462890625,
-0.0009489059448242188,
0.0019817352294921875,
-0.0015974044799804688,
-0.0200958251953125,
-0.005863189697265625,
0.002384185791015625,
-0.00537872314453125,
-0.00533294677734375,
0.01026153564453125,
-0.00780487060546875,
0.10943603515625,
0.0606689453125,
-0.00424957275390625,
0.01253509521484375,
0.0240631103515625,
-0.060089111328125,
0.03363037109375,
-0.0024871826171875,
0.0609130859375,
0.00457763671875,
0.01462554931640625,
0.0382080078125,
0.01259613037109375,
-0.048797607421875,
0.0058135986328125,
-0.0187530517578125,
-0.010650634765625,
0.015960693359375,
0.004299163818359375,
-0.0110321044921875,
0.00411224365234375,
-0.041412353515625,
0.030364990234375,
0.01387786865234375,
0.05535888671875,
0.05255126953125,
0.036346435546875,
-0.0009012222290039062,
0.0222320556640625,
0.04400634765625,
-0.0011205673217773438,
-0.006702423095703125,
0.00510406494140625,
0.004913330078125,
-0.0943603515625,
-0.0904541015625,
0.018280029296875,
0.023345947265625,
-0.0001550912857055664,
0.00008994340896606445,
0.00506591796875,
-0.01006317138671875,
0.01352691650390625,
-0.037322998046875,
0.0088958740234375,
0.05181884765625,
-0.031646728515625,
-0.0173797607421875,
-0.04541015625,
-0.0201263427734375,
0.0097808837890625,
-0.12744140625,
0.05706787109375,
0.015777587890625,
-0.006412506103515625,
-0.044586181640625,
-0.0120391845703125,
-0.00833892822265625,
-0.0209503173828125,
0.016021728515625,
0.05255126953125,
0.0106658935546875,
0.0166473388671875,
-0.0000985860824584961,
0.0294189453125,
0.02386474609375,
-0.0215911865234375,
-0.003971099853515625,
0.00830078125,
0.0018157958984375,
0.056396484375,
0.0123138427734375,
0.006893157958984375,
0.0024394989013671875,
-0.0445556640625,
-0.009490966796875,
0.029571533203125,
-0.00018167495727539062,
-0.0163726806640625,
-0.0063629150390625,
-0.0007529258728027344,
0.0265655517578125,
0.041748046875,
-0.0338134765625,
0.03326416015625,
-0.018280029296875,
0.03082275390625,
0.0221405029296875,
0.0286407470703125,
0.005481719970703125,
0.0014934539794921875,
-0.01213836669921875,
-0.042083740234375,
-0.00991058349609375,
0.0224609375,
0.04949951171875,
-0.06378173828125,
-0.00786590576171875,
-0.0023326873779296875,
-0.005130767822265625,
-0.004550933837890625,
-0.0120697021484375,
0.01328277587890625,
-0.0272674560546875,
-0.01224517822265625,
-0.0095977783203125,
-0.046630859375,
0.0106658935546875,
0.021728515625,
0.0152587890625,
-0.01483154296875,
0.022430419921875,
-0.01287841796875,
-0.04132080078125,
0.044525146484375,
0.00826263427734375,
-0.048095703125,
0.043701171875,
-0.024688720703125,
0.0195465087890625,
-0.0216522216796875,
0.0225830078125,
0.045379638671875,
0.0094451904296875,
-0.0273590087890625,
0.0104522705078125,
0.0027599334716796875,
0.01399993896484375,
0.006855010986328125,
-0.0002739429473876953,
-0.028533935546875,
-0.041534423828125,
-0.036590576171875,
0.01198577880859375,
-0.025848388671875,
0.0090179443359375,
-0.025360107421875,
-0.004398345947265625,
-0.0014095306396484375,
-0.09942626953125,
-0.07440185546875,
0.00984954833984375,
-0.031585693359375,
-0.01045989990234375,
0.03070068359375,
-0.0167999267578125,
-0.0155792236328125,
0.055572509765625,
-0.00843048095703125,
-0.00021457672119140625,
-0.0229949951171875,
-0.054351806640625,
-0.0751953125,
-0.07867431640625,
-0.038177490234375,
-0.005825042724609375,
0.0017061233520507812,
0.0096282958984375,
-0.0082244873046875,
-0.0062103271484375,
-0.0010051727294921875,
0.040557861328125,
0.040374755859375,
0.01534271240234375,
-0.01123046875,
0.0279388427734375,
-0.01276397705078125,
0.0087890625,
-0.006565093994140625,
0.0985107421875,
0.07513427734375,
-0.0714111328125,
0.016937255859375,
-0.037017822265625,
0.01367950439453125,
-0.0234832763671875,
-0.01043701171875,
0.054718017578125,
-0.0122222900390625,
-0.002407073974609375,
-0.05047607421875,
-0.0369873046875,
-0.007503509521484375,
-0.041259765625,
0.0036869049072265625,
0.0182342529296875,
0.00021922588348388672,
-0.0167694091796875,
0.0185546875,
-0.0029964447021484375,
-0.00037789344787597656,
0.0179595947265625,
-0.01262664794921875,
0.0173797607421875,
-0.0303192138671875,
-0.01280975341796875,
-0.032318115234375,
0.0430908203125,
-0.0164337158203125,
0.0215606689453125,
0.0178680419921875,
0.02685546875,
0.0173492431640625,
-0.0203704833984375,
-0.0408935546875,
-0.0689697265625,
0.027801513671875,
-0.045074462890625,
-0.00562286376953125,
-0.022308349609375,
-0.01233673095703125,
0.0035877227783203125,
0.0762939453125,
-0.08050537109375,
-0.00702667236328125,
0.00958251953125,
0.011993408203125,
0.002532958984375,
-0.04254150390625,
-0.048858642578125,
-0.034454345703125,
-0.0204925537109375,
-0.01325225830078125,
-0.0180816650390625,
-0.0173492431640625,
-0.0009326934814453125,
0.001399993896484375,
-0.004119873046875,
-0.03192138671875,
0.03564453125,
-0.0191192626953125,
0.005771636962890625,
0.0162811279296875,
0.0030612945556640625,
-0.01336669921875,
-0.028228759765625,
-0.00206756591796875,
-0.0660400390625,
-0.0224609375,
0.007297515869140625,
0.04449462890625,
-0.0011844635009765625,
-0.0355224609375,
-0.01531219482421875,
0.041046142578125,
0.01251983642578125,
-0.0086669921875,
0.0167083740234375,
-0.02178955078125,
0.031585693359375,
0.040191650390625,
0.01434326171875,
-0.0169219970703125,
0.00426483154296875,
-0.0152435302734375,
-0.0523681640625,
0.00820159912109375,
-0.0114898681640625,
0.0085296630859375,
0.0147247314453125,
-0.0307159423828125,
-0.049468994140625,
-0.0282440185546875,
-0.0240020751953125,
0.0270538330078125,
-0.010101318359375,
-0.026123046875,
-0.042083740234375,
-0.07415771484375,
0.0154876708984375,
-0.00939178466796875,
-0.01197052001953125,
0.0106964111328125,
0.0198516845703125,
0.00804901123046875,
-0.02435302734375,
-0.00922393798828125,
-0.00028204917907714844,
0.0252227783203125,
0.00949859619140625,
0.03790283203125,
0.0242156982421875,
0.01036834716796875,
-0.022613525390625,
-0.01462554931640625,
-0.0017337799072265625,
-0.0237274169921875,
0.029541015625,
-0.0027294158935546875,
-0.0286102294921875,
0.01312255859375,
-0.017913818359375,
0.0251922607421875,
0.019805908203125,
-0.035430908203125,
0.004306793212890625,
-0.037353515625,
0.024383544921875,
-0.00981903076171875,
0.049407958984375,
-0.0298309326171875,
-0.046539306640625,
0.016143798828125,
0.000060617923736572266,
0.0362548828125,
0.010040283203125,
-0.00037097930908203125,
0.03363037109375,
0.00466156005859375,
0.006656646728515625,
0.02490234375,
0.02117919921875,
0.02374267578125,
0.0311737060546875,
0.0142364501953125,
-0.0012121200561523438,
0.005863189697265625,
-0.003101348876953125,
0.058685302734375,
0.030731201171875,
-0.03076171875,
0.0028858184814453125,
-0.0101776123046875,
0.029205322265625,
0.002506256103515625,
0.01439666748046875,
0.0186767578125,
-0.00797271728515625,
-0.0001666545867919922,
-0.005474090576171875,
-0.0005316734313964844,
-0.0191650390625,
-0.0236358642578125,
0.0193939208984375,
0.0193634033203125,
-0.01947021484375,
-0.012939453125,
0.037078857421875,
0.0288238525390625,
-0.006072998046875,
-0.02618408203125,
-0.01026153564453125,
0.052825927734375,
0.004970550537109375,
-0.0106353759765625,
0.045928955078125,
-0.0181121826171875,
0.0205841064453125,
0.048553466796875,
-0.008544921875,
-0.0012025833129882812,
-0.0170135498046875,
0.045013427734375,
-0.04150390625,
-0.0213470458984375,
0.0232391357421875,
-0.033905029296875,
-0.00533294677734375,
-0.005420684814453125,
-0.02978515625,
-0.0229949951171875,
-0.021453857421875,
-0.016815185546875,
0.0311279296875,
-0.0117034912109375,
-0.0162506103515625,
0.0295257568359375,
-0.0201416015625,
0.0447998046875,
0.017791748046875,
0.0133819580078125,
-0.0065155029296875,
-0.02130126953125,
-0.00841522216796875,
-0.0011510848999023438,
0.0194549560546875,
-0.01491546630859375,
-0.0203704833984375,
-0.0302276611328125,
-0.0225830078125,
0.04571533203125,
0.002201080322265625,
0.052703857421875,
-0.0239105224609375,
-0.041473388671875,
0.00344085693359375,
0.0088043212890625,
0.0087738037109375,
-0.01800537109375,
-0.048187255859375,
-0.0120086669921875,
-0.036102294921875,
0.0017347335815429688,
0.053375244140625,
0.0012788772583007812,
-0.0217437744140625,
-0.026702880859375,
0.0102081298828125,
0.02166748046875,
0.01253509521484375,
0.0027599334716796875,
-0.053375244140625,
0.01357269287109375,
0.0289764404296875,
0.02008056640625,
-0.002643585205078125,
0.034393310546875,
-0.0211334228515625,
0.02630615234375,
0.005268096923828125,
0.0248870849609375,
0.00942230224609375,
-0.03253173828125,
0.00920867919921875,
-0.039337158203125,
-0.04339599609375,
-0.0161590576171875,
-0.021820068359375,
0.0599365234375,
0.064697265625,
-0.0027027130126953125,
-0.00827789306640625,
-0.007740020751953125,
0.00608062744140625,
-0.044189453125,
0.0237579345703125,
-0.0254669189453125,
-0.005138397216796875,
-0.0252838134765625,
0.00797271728515625,
0.065673828125,
0.016265869140625,
0.00963592529296875,
0.00765228271484375,
-0.01335906982421875,
0.04046630859375,
-0.01108551025390625,
-0.081298828125,
0.057403564453125,
0.10137939453125,
0.03570556640625,
0.0819091796875,
0.0011606216430664062,
0.03009033203125,
0.027069091796875,
-0.00527191162109375,
0.005313873291015625,
0.0201873779296875,
0.07537841796875,
0.00838470458984375,
-0.039459228515625,
0.0587158203125,
-0.03839111328125,
0.0284271240234375,
0.046356201171875,
0.057861328125,
-0.09423828125,
0.033355712890625,
-0.00380706787109375,
0.006130218505859375,
0.0694580078125,
0.019195556640625,
-0.005748748779296875,
0.0200958251953125,
0.0080108642578125,
-0.00910186767578125,
0.006500244140625,
0.01506805419921875,
0.0178375244140625,
0.0055694580078125,
-0.01727294921875,
0.0263214111328125,
-0.0009279251098632812,
0.0085296630859375,
-0.03997802734375,
-0.00041675567626953125,
-0.03558349609375,
-0.00896453857421875,
-0.004467010498046875,
0.00836944580078125,
-0.005817413330078125,
0.015625,
0.06036376953125,
-0.048980712890625,
0.047332763671875,
0.048370361328125,
0.0016412734985351562,
0.02294921875,
0.00946044921875,
-0.000732421875,
0.0211334228515625,
-0.0245208740234375,
-0.0141448974609375,
0.07733154296875,
0.007396697998046875,
-0.01531982421875,
-0.01317596435546875,
0.0001475811004638672,
-0.0277099609375,
-0.02978515625,
0.009674072265625,
-0.01323699951171875,
0.004741668701171875,
0.1273193359375,
-0.0677490234375,
-0.0184783935546875,
0.0191192626953125,
-0.0034542083740234375,
-0.009124755859375,
0.017791748046875,
0.0027332305908203125,
-0.0164947509765625,
0.0166015625,
-0.0195159912109375,
-0.03594970703125,
0.0189208984375,
-0.0278778076171875,
-0.06390380859375,
0.11083984375,
-0.0313720703125,
0.04205322265625,
0.0228118896484375,
0.0472412109375,
-0.0244598388671875,
0.0268707275390625,
-0.03607177734375,
0.0548095703125,
0.004528045654296875,
0.0263671875,
-0.053619384765625,
-0.01268768310546875,
-0.01207733154296875,
0.034515380859375,
0.08343505859375,
0.0224609375,
-0.031219482421875,
-0.026092529296875,
0.0177459716796875,
0.01499176025390625,
-0.028961181640625,
0.04840087890625,
-0.03192138671875,
0.023193359375,
0.017303466796875,
-0.0169677734375,
0.018768310546875,
0.0190277099609375,
-0.0589599609375,
-0.0150909423828125,
0.004230499267578125,
0.004833221435546875,
0.0160369873046875,
-0.0243682861328125,
-0.02874755859375,
0.00806427001953125,
0.021514892578125,
-0.013946533203125,
-0.01209259033203125,
0.038543701171875,
0.01611328125,
-0.0096893310546875,
-0.042510986328125,
-0.01074981689453125,
0.032012939453125,
0.003307342529296875,
0.0178680419921875,
0.0095062255859375,
0.01366424560546875,
-0.0009484291076660156,
0.0102691650390625,
0.0164031982421875,
0.038299560546875,
-0.03814697265625,
0.09619140625,
0.061798095703125,
0.039093017578125,
-0.0207672119140625,
0.001201629638671875,
0.028594970703125,
0.0997314453125,
-0.06475830078125,
-0.0218048095703125,
-0.0025234222412109375,
-0.033172607421875,
0.0081024169921875,
-0.025543212890625,
0.00696563720703125,
0.005096435546875,
-0.020294189453125,
-0.059600830078125,
0.00258636474609375,
0.01275634765625,
0.040313720703125,
-0.035125732421875,
-0.04827880859375,
-0.03302001953125,
-0.01027679443359375,
-0.0306854248046875,
-0.004108428955078125,
-0.01114654541015625,
0.0279388427734375,
0.03411865234375,
0.0214080810546875,
0.0002512931823730469,
-0.01480865478515625,
0.004009246826171875,
0.03875732421875,
-0.0031871795654296875,
0.01392364501953125,
-0.046600341796875,
-0.05645751953125,
0.006015777587890625,
0.035980224609375,
0.036285400390625,
0.0245361328125,
0.0256805419921875,
-0.0159759521484375,
-0.022918701171875,
0.009307861328125,
0.03302001953125,
-0.0233917236328125,
0.063720703125,
-0.04327392578125,
0.043060302734375,
0.00597381591796875,
-0.00963592529296875,
-0.039764404296875,
-0.01617431640625,
0.0528564453125,
-0.01280975341796875,
0.023345947265625,
-0.00380706787109375,
-0.03155517578125,
0.0416259765625,
-0.027984619140625,
0.059844970703125,
0.000015020370483398438,
-0.0165557861328125,
0.006710052490234375,
-0.0283050537109375,
-0.08221435546875,
0.0374755859375,
0.04815673828125,
-0.00127410888671875,
-0.011199951171875,
0.041412353515625,
0.0230560302734375,
-0.0010175704956054688,
-0.0200653076171875,
-0.0101776123046875,
0.0222320556640625,
0.05419921875,
0.037109375,
-0.033477783203125,
-0.0162506103515625,
-0.0014104843139648438,
0.0206451416015625,
0.01342010498046875,
0.10382080078125,
-0.032470703125,
0.004932403564453125,
0.0142822265625,
-0.0098419189453125,
0.014190673828125,
0.00672149658203125,
-0.0072479248046875,
-0.007404327392578125,
0.01001739501953125,
-0.013946533203125,
-0.02777099609375,
-0.008941650390625,
0.01971435546875,
-0.049468994140625,
0.0138397216796875,
-0.05908203125,
0.0199737548828125,
-0.021453857421875,
0.03851318359375,
-0.01959228515625,
-0.03704833984375,
-0.050079345703125,
-0.0171051025390625,
0.0211944580078125,
0.0200958251953125,
-0.034210205078125,
0.0384521484375,
-0.001323699951171875,
-0.00481414794921875,
0.0190277099609375,
-0.033782958984375,
0.047393798828125,
0.03692626953125,
-0.0265960693359375,
-0.0292510986328125,
-0.00885009765625,
-0.01727294921875,
0.015625,
-0.00740814208984375,
0.02642822265625,
0.0244140625,
-0.02960205078125,
-0.061553955078125,
-0.025604248046875,
0.0104522705078125,
0.0013141632080078125,
0.002899169921875,
-0.0626220703125,
-0.00841522216796875,
0.0130157470703125,
-0.0178070068359375,
-0.0219268798828125,
-0.019744873046875,
-0.0047760009765625,
0.0183563232421875,
-0.0137176513671875,
-0.0308837890625,
-0.041778564453125,
0.003047943115234375,
0.03778076171875,
0.007526397705078125,
-0.0811767578125,
0.031982421875,
-0.0033054351806640625,
0.0657958984375,
-0.0215301513671875,
0.0127105712890625,
0.009063720703125,
0.06280517578125,
-0.0268096923828125,
-0.0231475830078125,
0.00007271766662597656,
0.004444122314453125,
-0.016021728515625,
0.025482177734375,
0.05194091796875,
-0.02557373046875,
-0.01494598388671875,
0.00011456012725830078,
-0.005100250244140625,
0.0615234375,
-0.022705078125,
-0.030792236328125,
0.000881195068359375,
-0.008453369140625,
-0.0211181640625,
-0.038909912109375,
0.017364501953125,
-0.039642333984375,
-0.01898193359375,
0.020721435546875,
-0.021087646484375,
-0.004413604736328125,
-0.033416748046875,
-0.07183837890625,
0.059967041015625,
0.000782012939453125,
-0.0330810546875,
-0.046051025390625,
0.0063018798828125,
-0.0092926025390625,
0.036224365234375,
-0.00673675537109375,
-0.00638580322265625,
-0.01727294921875,
0.0308074951171875,
0.032379150390625,
0.066162109375,
-0.01241302490234375,
0.0616455078125,
-0.011383056640625,
0.052886962890625,
0.01300048828125,
0.0094757080078125,
0.054534912109375,
-0.0167694091796875,
0.03472900390625,
0.052703857421875,
-0.036712646484375,
0.005855560302734375,
-0.036529541015625,
-0.050628662109375,
-0.0289764404296875,
-0.036163330078125,
-0.0179443359375,
-0.027618408203125,
0.060546875,
0.033294677734375,
0.00809478759765625,
-0.006847381591796875,
-0.03936767578125,
-0.049072265625,
-0.00804901123046875,
-0.0012521743774414062,
0.0180511474609375,
-0.041290283203125,
0.03253173828125,
0.0146026611328125,
0.01244354248046875,
-0.00798797607421875,
0.0006361007690429688,
-0.0088958740234375,
-0.0110931396484375,
0.03302001953125,
-0.0005702972412109375,
-0.025482177734375,
0.038848876953125,
0.0885009765625,
-0.0565185546875,
0.0054931640625,
-0.0022373199462890625,
-0.0003185272216796875,
0.02886962890625,
-0.05487060546875,
-0.00115203857421875,
0.0120697021484375,
-0.014556884765625,
0.0168304443359375,
0.005626678466796875,
0.0310211181640625,
-0.0255584716796875,
0.0005273818969726562,
-0.01445770263671875,
0.03143310546875,
0.0045013427734375,
0.01561737060546875,
-0.0257568359375,
0.056549072265625,
-0.002017974853515625,
0.08770751953125,
0.0009627342224121094,
-0.0243377685546875,
-0.00527191162109375,
0.019256591796875,
-0.031982421875,
-0.00597381591796875,
-0.0008335113525390625,
-0.038543701171875,
-0.0034637451171875,
-0.013031005859375,
-0.04473876953125,
-0.0294342041015625,
-0.022613525390625,
-0.019439697265625,
-0.020904541015625,
0.00876617431640625
]
|
28c21b494b88d653c56e487ec560fe9f9e1f568b | Wordpress Stackexchange
Q: Get an uploaded attachments local server path? All the wordpress functions for retrieving media details seem to give you the web url of a file uploaded. I want to the local server drive/folder path, ideally relative to the install of wordpress. I have the attachment id value to hand so can parse that to a function, if only I knew what it was.
Is this possible with a function built in that I've missed? If not does anyone have anything pre-written for this function?
A: get_attached_file returns the server path of an attachment.
| Q: Get an uploaded attachments local server path? All the wordpress functions for retrieving media details seem to give you the web url of a file uploaded. I want to the local server drive/folder path, ideally relative to the install of wordpress. I have the attachment id value to hand so can parse that to a function, if only I knew what it was.
Is this possible with a function built in that I've missed? If not does anyone have anything pre-written for this function?
A: get_attached_file returns the server path of an attachment.
A: You can use the 'wp_upload_dir()' function to get an array of all the path information of the currently configured uploads directory.
Example:
$upload_dir = wp_upload_dir();
echo $upload_dir['path'];
http://codex.wordpress.org/Function_Reference/wp_upload_dir
| wordpress | {
"language": "en",
"length": 123,
"provenance": "stackexchange_00019.jsonl.gz:439423",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123942"
} | [
0.00582122802734375,
-0.0216827392578125,
0.01218414306640625,
-0.023284912109375,
-0.0293426513671875,
0.00836181640625,
0.0136871337890625,
-0.022216796875,
0.0294952392578125,
0.00913238525390625,
-0.0170440673828125,
-0.01346588134765625,
-0.006343841552734375,
-0.033721923828125,
-0.0107269287109375,
-0.0236968994140625,
0.06353759765625,
-0.00920867919921875,
0.058837890625,
0.01105499267578125,
-0.01515960693359375,
0.05853271484375,
0.051300048828125,
0.0310821533203125,
0.0283660888671875,
0.04974365234375,
0.047637939453125,
-0.0074920654296875,
-0.0001074075698852539,
-0.0092315673828125,
0.0267181396484375,
-0.010528564453125,
-0.0018491744995117188,
-0.000012218952178955078,
0.02569580078125,
-0.04119873046875,
0.017333984375,
0.0087738037109375,
-0.005756378173828125,
0.032958984375,
0.028839111328125,
-0.0157318115234375,
0.01384735107421875,
0.025848388671875,
-0.00823974609375,
-0.028167724609375,
0.028564453125,
-0.038543701171875,
0.020904541015625,
0.052947998046875,
-0.007232666015625,
-0.0063323974609375,
-0.0165252685546875,
0.007083892822265625,
-0.0013685226440429688,
-0.0243072509765625,
0.01094818115234375,
0.0142669677734375,
0.034912109375,
-0.07598876953125,
-0.06683349609375,
-0.00968170166015625,
0.05316162109375,
0.01053619384765625,
-0.000423431396484375,
0.004817962646484375,
0.039459228515625,
0.01165008544921875,
-0.041778564453125,
-0.013824462890625,
0.0304412841796875,
-0.01910400390625,
-0.000031888484954833984,
-0.0249786376953125,
-0.006153106689453125,
0.0006580352783203125,
-0.0020084381103515625,
-0.0297698974609375,
0.00861358642578125,
0.0103302001953125,
0.0084228515625,
-0.03289794921875,
-0.06768798828125,
0.015625,
0.034393310546875,
0.0662841796875,
0.00475311279296875,
-0.03985595703125,
-0.0219879150390625,
-0.01267242431640625,
-0.02520751953125,
-0.0021533966064453125,
0.0148468017578125,
-0.01480865478515625,
-0.053741455078125,
-0.00452423095703125,
0.02362060546875,
0.0006222724914550781,
-0.0017108917236328125,
-0.0023365020751953125,
0.02545166015625,
-0.04547119140625,
0.01485443115234375,
-0.00798797607421875,
-0.0088958740234375,
0.0191802978515625,
0.0164031982421875,
-0.032440185546875,
0.006702423095703125,
0.003021240234375,
-0.0335693359375,
0.040374755859375,
0.0079803466796875,
-0.005382537841796875,
-0.004878997802734375,
0.0271453857421875,
-0.0085296630859375,
0.0238037109375,
-0.007568359375,
0.0283355712890625,
0.0257110595703125,
0.03045654296875,
-0.02764892578125,
0.01247406005859375,
-0.004688262939453125,
-0.00731658935546875,
-0.0302886962890625,
0.00632476806640625,
0.0208282470703125,
0.03173828125,
-0.018951416015625,
0.0008111000061035156,
0.00482940673828125,
-0.020050048828125,
-0.0251007080078125,
-0.0130157470703125,
-0.0036373138427734375,
-0.016693115234375,
0.01094818115234375,
0.014923095703125,
-0.00907135009765625,
-0.0181121826171875,
0.031829833984375,
0.01190948486328125,
-0.042694091796875,
-0.01393890380859375,
0.025054931640625,
0.0372314453125,
-0.0283355712890625,
-0.039093017578125,
-0.01354217529296875,
0.0211639404296875,
0.0274658203125,
0.01371002197265625,
-0.0213623046875,
-0.0201873779296875,
0.0285186767578125,
-0.04052734375,
-0.006816864013671875,
-0.054168701171875,
0.0396728515625,
-0.0042572021484375,
-0.01509857177734375,
-0.0085601806640625,
-0.0027294158935546875,
-0.01509857177734375,
-0.033538818359375,
0.002483367919921875,
0.0181427001953125,
0.063720703125,
-0.004367828369140625,
-0.01270294189453125,
-0.004375457763671875,
0.00440216064453125,
-0.01268768310546875,
-0.00920867919921875,
0.0302734375,
-0.037017822265625,
-0.00025081634521484375,
0.0833740234375,
0.024566650390625,
-0.0037631988525390625,
0.017791748046875,
-0.00991058349609375,
-0.01934814453125,
0.045135498046875,
-0.004657745361328125,
0.043212890625,
0.0213470458984375,
0.00637054443359375,
-0.0243988037109375,
0.01541900634765625,
-0.0233001708984375,
0.0015821456909179688,
-0.0308837890625,
0.033111572265625,
-0.015655517578125,
0.04852294921875,
-0.0171661376953125,
-0.036041259765625,
-0.034332275390625,
-0.006603240966796875,
0.039031982421875,
0.0190887451171875,
0.03277587890625,
0.0105438232421875,
-0.006534576416015625,
0.0290985107421875,
-0.01403045654296875,
0.002471923828125,
0.01555633544921875,
0.0107269287109375,
-0.0023212432861328125,
-0.08026123046875,
-0.0150146484375,
0.040557861328125,
-0.0347900390625,
-0.00640869140625,
-0.0311737060546875,
0.0267181396484375,
-0.072265625,
0.0083465576171875,
-0.06695556640625,
-0.00489044189453125,
-0.002811431884765625,
0.0300750732421875,
-0.0408935546875,
0.019989013671875,
0.0267333984375,
0.0204010009765625,
0.0238037109375,
0.0080108642578125,
-0.0187835693359375,
0.0093841552734375,
-0.01027679443359375,
-0.01029205322265625,
-0.0236053466796875,
-0.0921630859375,
0.025360107421875,
0.05389404296875,
0.039825439453125,
0.0238494873046875,
0.00225830078125,
0.0218048095703125,
0.06048583984375,
-0.00759124755859375,
0.0189361572265625,
-0.01019287109375,
0.021881103515625,
0.0408935546875,
-0.0286712646484375,
0.001495361328125,
-0.00107574462890625,
-0.08697509765625,
0.001434326171875,
0.044097900390625,
-0.003917694091796875,
0.016998291015625,
-0.01515960693359375,
0.042266845703125,
-0.01483154296875,
0.02606201171875,
0.022186279296875,
-0.0021514892578125,
-0.01343536376953125,
0.043548583984375,
0.0277252197265625,
0.045867919921875,
-0.016937255859375,
0.0181427001953125,
0.00757598876953125,
0.0163116455078125,
-0.00311279296875,
0.07171630859375,
0.050201416015625,
-0.03448486328125,
-0.002750396728515625,
-0.033905029296875,
-0.01470947265625,
0.0206756591796875,
-0.0232391357421875,
-0.005779266357421875,
0.01751708984375,
-0.005950927734375,
-0.0125885009765625,
-0.04901123046875,
0.04248046875,
0.0041656494140625,
0.00836181640625,
0.02630615234375,
0.0479736328125,
0.0172576904296875,
0.0009002685546875,
0.011322021484375,
0.01219940185546875,
-0.01461029052734375,
0.0635986328125,
0.01007843017578125,
0.00548553466796875,
0.001346588134765625,
0.0160064697265625,
0.0382080078125,
0.0010232925415039062,
-0.0161895751953125,
-0.003173828125,
0.011871337890625,
0.012542724609375,
-0.0117645263671875,
-0.007480621337890625,
-0.0021686553955078125,
-0.0391845703125,
0.007251739501953125,
-0.0113677978515625,
0.00475311279296875,
-0.05816650390625,
-0.06524658203125,
-0.038055419921875,
-0.053497314453125,
-0.1669921875,
-0.1043701171875,
0.01543426513671875,
-0.06756591796875,
-0.008148193359375,
-0.0009088516235351562,
-0.0487060546875,
-0.011505126953125,
0.032928466796875,
0.01207733154296875,
0.0130615234375,
-0.01093292236328125,
-0.037109375,
-0.0304718017578125,
-0.061431884765625,
-0.03106689453125,
-0.0023899078369140625,
-0.0010776519775390625,
0.00687408447265625,
0.0274810791015625,
0.00638580322265625,
-0.0208282470703125,
0.006992340087890625,
0.02374267578125,
0.003387451171875,
-0.0161285400390625,
-0.005340576171875,
-0.009246826171875,
0.0196380615234375,
-0.00264739990234375,
0.0190887451171875,
0.020172119140625,
-0.0135498046875,
-0.0233612060546875,
-0.006244659423828125,
0.01506805419921875,
0.0165557861328125,
0.012237548828125,
0.0029888153076171875,
-0.01357269287109375,
-0.0064239501953125,
-0.058837890625,
0.0026988983154296875,
0.0151214599609375,
-0.016632080078125,
0.03936767578125,
0.004970550537109375,
-0.03985595703125,
0.00537109375,
0.0160980224609375,
0.0173797607421875,
-0.0005064010620117188,
-0.00907135009765625,
-0.0163421630859375,
0.0538330078125,
-0.00019681453704833984,
0.026336669921875,
-0.003101348876953125,
0.0367431640625,
-0.0068511962890625,
0.022613525390625,
0.007171630859375,
0.00428009033203125,
-0.0111236572265625,
-0.00394439697265625,
-0.06207275390625,
-0.05780029296875,
0.0679931640625,
-0.01629638671875,
0.0201263427734375,
-0.0570068359375,
-0.045440673828125,
-0.018524169921875,
0.103271484375,
0.0016946792602539062,
-0.0220489501953125,
-0.004703521728515625,
0.0244140625,
-0.07733154296875,
-0.053375244140625,
-0.020660400390625,
0.00533294677734375,
-0.0185699462890625,
-0.012664794921875,
-0.021392822265625,
-0.018096923828125,
-0.002651214599609375,
-0.0307464599609375,
-0.0095062255859375,
-0.03729248046875,
0.007579803466796875,
-0.0252227783203125,
0.04559326171875,
-0.009429931640625,
0.0230255126953125,
-0.01143646240234375,
-0.0217742919921875,
-0.042938232421875,
-0.0638427734375,
-0.0192413330078125,
0.0011911392211914062,
0.04742431640625,
-0.006011962890625,
-0.0093231201171875,
0.007083892822265625,
0.0634765625,
-0.0145416259765625,
0.00882720947265625,
0.01378631591796875,
0.0032863616943359375,
0.007404327392578125,
-0.00901031494140625,
0.016815185546875,
-0.0298614501953125,
-0.002330780029296875,
-0.07867431640625,
-0.109619140625,
-0.07171630859375,
-0.0207672119140625,
0.0594482421875,
0.00823974609375,
-0.0185394287109375,
-0.0189666748046875,
-0.0048980712890625,
0.0091400146484375,
0.059295654296875,
-0.00978851318359375,
0.01552581787109375,
-0.037567138671875,
-0.03729248046875,
0.039520263671875,
0.0196075439453125,
-0.004039764404296875,
-0.003978729248046875,
0.05859375,
0.00777435302734375,
-0.0233001708984375,
-0.0411376953125,
0.013214111328125,
0.046539306640625,
0.00531005859375,
0.047882080078125,
0.04412841796875,
-0.032928466796875,
0.0543212890625,
0.0278778076171875,
0.039581298828125,
-0.020660400390625,
0.04150390625,
-0.013641357421875,
0.016937255859375,
0.0158233642578125,
0.01593017578125,
-0.02117919921875,
0.0199737548828125,
-0.0173187255859375,
-0.0146942138671875,
-0.0162811279296875,
0.036285400390625,
-0.0251312255859375,
0.041778564453125,
-0.0200958251953125,
-0.0718994140625,
0.03021240234375,
-0.056610107421875,
0.03460693359375,
0.007778167724609375,
-0.00716400146484375,
0.048126220703125,
0.036651611328125,
-0.005588531494140625,
0.01485443115234375,
-0.004207611083984375,
0.0011091232299804688,
0.0214080810546875,
0.00197601318359375,
-0.0171661376953125,
0.01258087158203125,
0.0027179718017578125,
-0.00940704345703125,
0.0030517578125,
-0.01412200927734375,
-0.01161956787109375,
-0.0018215179443359375,
0.0093841552734375,
0.0158538818359375,
-0.035980224609375,
0.023101806640625,
0.002513885498046875,
-0.0186004638671875,
-0.00820159912109375,
-0.036956787109375,
-0.0196380615234375,
-0.048004150390625,
0.04498291015625,
-0.01546478271484375,
0.007556915283203125,
0.0218048095703125,
0.033782958984375,
-0.0127716064453125,
0.0167236328125,
0.0025348663330078125,
-0.01043701171875,
0.0118865966796875,
-0.01041412353515625,
0.0182342529296875,
0.0249786376953125,
-0.0081939697265625,
-0.033416748046875,
0.031982421875,
-0.034912109375,
0.0181884765625,
0.018768310546875,
0.056976318359375,
-0.0301361083984375,
-0.052978515625,
0.035919189453125,
-0.060211181640625,
-0.0031833648681640625,
0.03466796875,
0.00379180908203125,
-0.047210693359375,
-0.005680084228515625,
0.0042266845703125,
0.0186309814453125,
-0.025543212890625,
-0.01264190673828125,
0.02203369140625,
0.016265869140625,
-0.00145721435546875,
0.051361083984375,
-0.0882568359375,
0.0262603759765625,
0.05157470703125,
-0.01544189453125,
-0.009521484375,
-0.01140594482421875,
-0.01282501220703125,
-0.01328277587890625,
-0.0252838134765625,
-0.0120086669921875,
0.0732421875,
0.006519317626953125,
0.038665771484375,
-0.0325927734375,
-0.0228424072265625,
-0.0733642578125,
-0.00475311279296875,
0.058349609375,
0.033477783203125,
-0.04718017578125,
-0.0026340484619140625,
-0.036956787109375,
-0.005970001220703125,
0.0117645263671875,
-0.032684326171875,
-0.033935546875,
-0.01349639892578125,
-0.0239715576171875,
0.021331787109375,
-0.007678985595703125,
0.0193328857421875,
0.026611328125,
0.0212249755859375,
-0.0287933349609375,
0.0286865234375,
0.0307464599609375,
0.0230712890625,
0.017364501953125,
0.0313720703125,
0.042938232421875,
0.01325225830078125,
-0.061004638671875,
-0.0340576171875,
0.0114593505859375,
-0.02001953125,
-0.012908935546875,
-0.00380706787109375,
0.007541656494140625,
-0.0279388427734375,
-0.0003523826599121094,
0.00630950927734375,
0.006725311279296875,
-0.0283203125,
-0.0182952880859375,
-0.01641845703125,
0.0767822265625,
-0.01255035400390625,
0.0172119140625,
-0.02862548828125,
-0.0258636474609375,
-0.00789642333984375,
0.0003247261047363281,
0.01294708251953125,
-0.003658294677734375,
-0.013427734375,
-0.00502777099609375,
0.032684326171875,
-0.01409149169921875,
0.0286712646484375,
0.0960693359375,
0.0135650634765625,
0.0638427734375,
0.048492431640625,
0.0121917724609375,
0.0283050537109375,
0.033111572265625,
-0.004642486572265625,
-0.052001953125,
0.042877197265625,
0.019622802734375,
-0.01486968994140625,
0.0347900390625,
-0.022064208984375,
0.03436279296875,
-0.0237884521484375,
0.045684814453125,
0.00685882568359375,
0.01468658447265625,
0.01171112060546875,
-0.037872314453125,
0.027587890625,
-0.0166778564453125,
0.0218048095703125,
-0.00049591064453125,
0.0211944580078125,
0.00829315185546875,
-0.0318603515625,
-0.0172882080078125,
-0.01462554931640625,
0.00421905517578125,
-0.0172882080078125,
0.02130126953125,
-0.007293701171875,
-0.00994873046875,
-0.04595947265625,
0.032318115234375,
-0.0311126708984375,
-0.01146697998046875,
0.0169525146484375,
-0.01514434814453125,
-0.00283050537109375,
-0.040863037109375,
-0.01259613037109375,
-0.030487060546875,
-0.003437042236328125,
-0.0247650146484375,
-0.02825927734375,
0.0465087890625,
0.025421142578125,
-0.0036449432373046875,
-0.032012939453125,
0.01320648193359375,
-0.022369384765625,
0.040557861328125,
-0.016204833984375,
0.0010461807250976562,
0.0265960693359375,
-0.051605224609375,
-0.002277374267578125,
-0.02093505859375,
0.0174560546875,
0.0010967254638671875,
-0.01421356201171875,
0.0221099853515625,
-0.045867919921875,
0.00579071044921875,
0.043853759765625,
0.0235137939453125,
-0.004276275634765625,
-0.0008149147033691406,
0.000980377197265625,
-0.043670654296875,
-0.0082855224609375,
0.006320953369140625,
-0.0224609375,
-0.0092620849609375,
-0.0091094970703125,
-0.033538818359375,
0.030181884765625,
-0.00748443603515625,
0.0240631103515625,
0.02264404296875,
-0.0002605915069580078,
-0.01166534423828125,
-0.006221771240234375,
-0.033966064453125,
0.0261688232421875,
0.046173095703125,
-0.0122833251953125,
-0.0330810546875,
-0.01526641845703125,
-0.0236968994140625,
0.0369873046875,
0.0750732421875,
0.007495880126953125,
-0.018463134765625,
-0.0279998779296875,
0.04534912109375,
0.0609130859375,
0.0009636878967285156,
0.00763702392578125,
0.023468017578125,
0.02032470703125,
0.06817626953125,
-0.024078369140625,
0.037322998046875,
-0.03277587890625,
0.0294952392578125,
0.0292205810546875,
0.0172576904296875,
0.024993896484375,
-0.01107025146484375,
0.02728271484375,
-0.01446533203125,
-0.0124664306640625,
0.028900146484375,
-0.050872802734375,
-0.0226898193359375,
0.032196044921875,
0.02056884765625,
-0.03466796875,
-0.005474090576171875,
-0.034271240234375,
0.0411376953125,
0.0015230178833007812,
-0.0258331298828125,
0.019866943359375,
0.003387451171875,
-0.0040435791015625,
0.0208587646484375,
-0.02532958984375,
0.01392364501953125,
0.030303955078125,
0.0283355712890625,
0.00653839111328125,
0.008880615234375,
-0.036376953125,
-0.01377105712890625,
0.0533447265625,
0.036956787109375,
-0.0229034423828125,
-0.03936767578125,
0.010498046875,
-0.0240936279296875,
-0.0205535888671875,
-0.01507568359375,
-0.0347900390625,
-0.0121917724609375,
0.02593994140625,
-0.038299560546875,
0.01207733154296875,
0.019561767578125,
0.040557861328125,
0.0014362335205078125,
-0.0038700103759765625,
-0.048065185546875,
-0.00983428955078125,
-0.019927978515625,
-0.0022983551025390625,
-0.0032482147216796875,
0.01116180419921875,
0.007476806640625,
0.037139892578125,
0.0098419189453125,
-0.00634002685546875,
-0.0073394775390625,
0.047698974609375,
-0.0091400146484375,
0.0074310302734375,
-0.032806396484375,
-0.0657958984375,
0.031951904296875,
0.037017822265625,
0.0762939453125,
0.01255035400390625,
0.03759765625,
-0.0106964111328125,
-0.022552490234375,
0.0227203369140625,
0.0116119384765625,
-0.01641845703125,
0.0185394287109375,
-0.0704345703125,
0.0477294921875,
0.0347900390625,
0.0167999267578125,
0.0027523040771484375,
-0.04827880859375,
0.087890625,
-0.04364013671875,
0.038055419921875,
-0.0177154541015625,
-0.0283203125,
0.0263214111328125,
-0.0257720947265625,
0.040679931640625,
-0.0166015625,
-0.059295654296875,
-0.0053558349609375,
-0.022491455078125,
-0.0123138427734375,
-0.004848480224609375,
0.02813720703125,
0.0032978057861328125,
0.02349853515625,
-0.017181396484375,
-0.0105133056640625,
0.00881195068359375,
-0.0119781494140625,
0.005184173583984375,
0.00022017955780029297,
0.01396942138671875,
-0.00765228271484375,
-0.058929443359375,
-0.039794921875,
-0.050628662109375,
0.042205810546875,
0.036285400390625,
0.0992431640625,
-0.0218963623046875,
0.037078857421875,
0.0286407470703125,
0.0267791748046875,
-0.0247650146484375,
0.021240234375,
0.0034542083740234375,
-0.003917694091796875,
0.00943756103515625,
-0.0229034423828125,
0.025177001953125,
0.020782470703125,
0.012786865234375,
-0.038787841796875,
-0.02655029296875,
-0.00798797607421875,
0.01264190673828125,
0.032470703125,
0.038970947265625,
-0.016265869140625,
-0.037506103515625,
-0.027679443359375,
-0.017333984375,
0.0177459716796875,
0.05096435546875,
0.036407470703125,
0.032440185546875,
0.02838134765625,
-0.00604248046875,
0.034454345703125,
-0.0178070068359375,
0.07177734375,
0.04400634765625,
-0.047454833984375,
-0.0247955322265625,
0.021148681640625,
-0.01557159423828125,
0.0343017578125,
-0.0083465576171875,
0.0751953125,
0.0074310302734375,
-0.0011377334594726562,
-0.0172576904296875,
-0.0025844573974609375,
0.035736083984375,
0.02508544921875,
0.00592041015625,
-0.03289794921875,
-0.01192474365234375,
-0.0152435302734375,
-0.078369140625,
-0.01343536376953125,
-0.0609130859375,
0.0159912109375,
0.036407470703125,
-0.002918243408203125,
0.02545166015625,
0.045623779296875,
-0.025360107421875,
0.008148193359375,
-0.01136016845703125,
-0.0240478515625,
-0.00887298583984375,
0.0009522438049316406,
0.0182342529296875,
-0.035552978515625,
0.0215911865234375,
-0.0211944580078125,
-0.0085296630859375,
-0.01340484619140625,
-0.06365966796875,
-0.0408935546875,
0.0771484375,
-0.039093017578125,
0.052032470703125,
0.037750244140625,
-0.036712646484375,
0.00984954833984375,
0.0882568359375,
0.06085205078125,
0.13037109375,
-0.042236328125,
-0.056671142578125,
-0.03466796875,
0.00933837890625,
0.0310821533203125,
0.01474761962890625,
-0.002933502197265625,
-0.01055145263671875,
-0.0021915435791015625,
-0.024688720703125,
0.00479888916015625,
0.01947021484375,
-0.04400634765625,
-0.056182861328125,
0.023223876953125,
-0.0091094970703125,
-0.037933349609375,
-0.054290771484375,
0.06463623046875,
0.01274871826171875,
-0.02569580078125,
-0.0125732421875,
-0.00884246826171875,
0.0087738037109375,
0.005344390869140625,
0.019866943359375,
-0.0092926025390625,
0.0290679931640625,
-0.00018346309661865234,
-0.0721435546875,
0.006214141845703125,
-0.004207611083984375,
0.01262664794921875,
0.015625,
-0.01285552978515625,
0.048309326171875,
0.0557861328125,
-0.01806640625,
0.0178985595703125,
-0.003711700439453125,
-0.050872802734375,
-0.045562744140625,
-0.0088348388671875,
-0.00026869773864746094,
0.01580810546875,
0.0618896484375,
0.0843505859375,
0.0054931640625,
-0.046539306640625,
-0.0217437744140625,
-0.010009765625,
-0.058807373046875,
-0.0225677490234375,
0.038909912109375,
-0.0682373046875,
0.0091094970703125,
-0.01033782958984375,
-0.0072174072265625,
-0.01325225830078125,
0.001117706298828125,
-0.040008544921875,
-0.006744384765625,
-0.0008697509765625,
-0.0009255409240722656,
-0.030242919921875,
-0.048248291015625,
0.09326171875,
-0.035430908203125,
0.0189666748046875,
0.0161285400390625,
0.0291595458984375,
0.063232421875,
0.036346435546875,
0.053863525390625,
0.0364990234375,
-0.0190277099609375,
-0.0064849853515625,
0.0635986328125,
0.001983642578125,
0.01263427734375,
-0.035858154296875,
-0.0030364990234375,
-0.004314422607421875,
-0.004329681396484375,
-0.0002315044403076172,
0.032989501953125,
0.0197296142578125,
0.0026798248291015625,
0.038421630859375,
-0.0037822723388671875,
0.0244293212890625,
-0.0080413818359375,
0.035247802734375,
-0.03680419921875,
-0.00058746337890625,
-0.01052093505859375,
-0.035003662109375,
-0.0005588531494140625,
0.00557708740234375,
-0.01154327392578125,
-0.055816650390625,
0.03924560546875,
0.0022754669189453125,
0.005157470703125,
0.034149169921875
]
|
84c171e82f359b2344cb6295d2f46a1384379846 | Wordpress Stackexchange
Q: Delete all the custom post types when deleting user
I have a problem in custom post types, when I remove user, I can't deleted there post or attribute all posts.
A: If you will delete the custom posts, if you kill a user, then hook inside the delete_user Hook. This hook give you the possibility to call actions and doing other jobs, like delete posts to this user id.
See the codex for more information and a example source.
| Q: Delete all the custom post types when deleting user
I have a problem in custom post types, when I remove user, I can't deleted there post or attribute all posts.
A: If you will delete the custom posts, if you kill a user, then hook inside the delete_user Hook. This hook give you the possibility to call actions and doing other jobs, like delete posts to this user id.
See the codex for more information and a example source.
A: I use custom posts on my site and once the user is deleted all their custom posts also go.
Are you sure that in your code that the user ID is the correct author for those posts - depending on how it is coded the author can end up being the administrator. I have seen before with custom post moderation that the author is actually stored as a separate meta tag but wordpress thinks the author is actually the admin that approved it.
It depends on how your theme has been written and how other functions on your website work.
I would recommend having a look at one of these custom posts to make sure who the registered author is, if it is different you will need to put some sort of post query in the delete_user hook as suggested by @bueltge and delete the found posts with author meta tag == user
A: 1) Your post types that you want to delete, they must have an active field for the author (register_post_type -> supports -> author).
2) Or you can use the post_types_to_delete_with_user filter, see:
add_filter("post_types_to_delete_with_user", "post_types_to_delete_with_user_callback", 10, 2);
function post_types_to_delete_with_user_callback(array $postTypesToDelete, $userId) {
$postTypesToDelete[] = "YOUR_POST_TYPE_KEY";
return $postTypesToDelete;
}
A: I add an answer for those who like me pass here and not found a solution.
Do not write:
'support' => array('title', 'author'),
Instead do not forget the s:
'supports' => array('title', 'author'),
| wordpress | {
"language": "en",
"length": 316,
"provenance": "stackexchange_00019.jsonl.gz:439433",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/123986"
} | [
0.06805419921875,
-0.0014219284057617188,
-0.002147674560546875,
-0.000029861927032470703,
0.0149078369140625,
-0.03741455078125,
0.076416015625,
-0.0265960693359375,
-0.0070343017578125,
0.04486083984375,
0.01090240478515625,
-0.00844573974609375,
0.041900634765625,
-0.0261688232421875,
-0.00753021240234375,
-0.00606536865234375,
0.031524658203125,
-0.0097198486328125,
0.005489349365234375,
-0.035125732421875,
0.0101165771484375,
-0.01617431640625,
0.034820556640625,
0.0384521484375,
-0.01009368896484375,
0.0303192138671875,
0.0029239654541015625,
-0.0110321044921875,
-0.0240631103515625,
-0.0271453857421875,
0.000022470951080322266,
0.0235595703125,
-0.019012451171875,
0.057952880859375,
-0.0201568603515625,
0.023162841796875,
-0.0017271041870117188,
0.037322998046875,
0.052825927734375,
-0.0205841064453125,
0.018096923828125,
0.005657196044921875,
0.022705078125,
0.0202789306640625,
-0.006214141845703125,
-0.0546875,
0.03997802734375,
-0.033203125,
0.033782958984375,
-0.002285003662109375,
0.0199432373046875,
-0.036468505859375,
0.033111572265625,
-0.0175933837890625,
-0.02630615234375,
-0.0106964111328125,
-0.004940032958984375,
-0.01032257080078125,
0.05401611328125,
-0.0099639892578125,
-0.042633056640625,
-0.037872314453125,
0.040374755859375,
-0.03814697265625,
0.010162353515625,
-0.003223419189453125,
0.0217132568359375,
0.0179443359375,
-0.046356201171875,
0.01116943359375,
0.039154052734375,
-0.0245361328125,
-0.004878997802734375,
0.0028400421142578125,
0.0157012939453125,
-0.036346435546875,
0.0088348388671875,
-0.01007080078125,
-0.00795745849609375,
0.045989990234375,
-0.00017595291137695312,
0.0009775161743164062,
-0.06298828125,
0.001373291015625,
-0.050994873046875,
-0.01081085205078125,
-0.015625,
-0.0004410743713378906,
-0.017333984375,
-0.00821685791015625,
-0.0222015380859375,
-0.04156494140625,
-0.0003273487091064453,
0.0240020751953125,
-0.0116119384765625,
0.00007319450378417969,
0.0211944580078125,
0.013885498046875,
0.0131683349609375,
0.0055694580078125,
0.0164337158203125,
-0.045654296875,
0.005611419677734375,
-0.0169525146484375,
0.007373809814453125,
0.007091522216796875,
-0.009552001953125,
-0.0125274658203125,
0.0150604248046875,
0.037933349609375,
-0.01047515869140625,
-0.022308349609375,
0.00379180908203125,
-0.00664520263671875,
-0.01030731201171875,
0.006107330322265625,
-0.042388916015625,
0.0382080078125,
-0.01812744140625,
0.032623291015625,
-0.01245880126953125,
-0.0088958740234375,
0.007305145263671875,
-0.0198211669921875,
0.0093536376953125,
-0.016845703125,
-0.034942626953125,
0.006992340087890625,
0.016357421875,
0.0071563720703125,
-0.0286865234375,
0.0243377685546875,
0.049835205078125,
0.0002791881561279297,
-0.0091400146484375,
-0.017181396484375,
-0.0098419189453125,
-0.033660888671875,
-0.038848876953125,
0.027008056640625,
0.028350830078125,
-0.04498291015625,
-0.033935546875,
-0.00020003318786621094,
0.062225341796875,
0.0275726318359375,
0.01189422607421875,
-0.01062774658203125,
0.031768798828125,
-0.007244110107421875,
-0.0133819580078125,
-0.00951385498046875,
0.0089263916015625,
0.022247314453125,
0.056243896484375,
-0.0390625,
0.0780029296875,
-0.058502197265625,
0.019683837890625,
-0.041290283203125,
0.0252685546875,
-0.028472900390625,
-0.0093994140625,
-0.00974273681640625,
-0.0604248046875,
0.040283203125,
-0.037811279296875,
-0.018218994140625,
0.028167724609375,
-0.024871826171875,
-0.012542724609375,
-0.0102691650390625,
0.028778076171875,
0.0252838134765625,
0.01288604736328125,
0.047027587890625,
-0.018646240234375,
0.0024890899658203125,
0.0209808349609375,
0.003612518310546875,
-0.0163726806640625,
-0.035369873046875,
0.0030364990234375,
0.007537841796875,
-0.0650634765625,
0.017425537109375,
0.0212554931640625,
0.0897216796875,
0.033111572265625,
0.0256805419921875,
0.044769287109375,
0.00201416015625,
0.002948760986328125,
0.00986480712890625,
0.0098876953125,
-0.050567626953125,
-0.0236358642578125,
-0.044921875,
-0.0090484619140625,
0.0306243896484375,
0.008819580078125,
-0.00606536865234375,
0.01183319091796875,
-0.0308074951171875,
-0.06756591796875,
0.017364501953125,
-0.02716064453125,
0.04638671875,
-0.017852783203125,
0.039642333984375,
0.0265655517578125,
0.0234222412109375,
-0.048583984375,
0.011077880859375,
0.01102447509765625,
-0.007465362548828125,
0.004718780517578125,
0.027435302734375,
-0.00893402099609375,
0.027191162109375,
-0.02679443359375,
-0.0399169921875,
-0.02764892578125,
0.007465362548828125,
0.0307159423828125,
0.0007495880126953125,
-0.01239776611328125,
-0.007114410400390625,
0.0202789306640625,
0.03570556640625,
-0.053131103515625,
-0.00524139404296875,
0.00791168212890625,
0.00782012939453125,
-0.04193115234375,
-0.01256561279296875,
-0.000054895877838134766,
-0.048309326171875,
0.0175628662109375,
0.055328369140625,
0.00901031494140625,
0.01367950439453125,
-0.027252197265625,
0.006740570068359375,
0.01324462890625,
0.01277923583984375,
0.032470703125,
0.0015954971313476562,
0.02423095703125,
0.074462890625,
0.0136260986328125,
0.0161285400390625,
-0.0005917549133300781,
-0.03045654296875,
0.038360595703125,
0.0152740478515625,
0.01250457763671875,
0.0168914794921875,
0.0014314651489257812,
-0.0011243820190429688,
0.0128936767578125,
-0.007904052734375,
-0.034637451171875,
-0.0014190673828125,
0.060882568359375,
-0.039154052734375,
0.0347900390625,
0.0087432861328125,
-0.02642822265625,
-0.00782012939453125,
0.036590576171875,
-0.0279388427734375,
-0.0072174072265625,
-0.0017910003662109375,
0.061370849609375,
0.031280517578125,
-0.050994873046875,
-0.01043701171875,
0.039337158203125,
0.00519561767578125,
-0.01332855224609375,
0.004970550537109375,
0.0151214599609375,
-0.0006690025329589844,
-0.0036869049072265625,
-0.03424072265625,
0.039794921875,
0.016326904296875,
-0.0082855224609375,
-0.032623291015625,
-0.004245758056640625,
0.025787353515625,
-0.0029144287109375,
0.0223846435546875,
0.0270538330078125,
-0.01953125,
-0.01274871826171875,
-0.07257080078125,
0.04681396484375,
-0.031585693359375,
0.01605224609375,
0.0875244140625,
0.0274658203125,
-0.00881195068359375,
0.0233917236328125,
0.00641632080078125,
0.041595458984375,
0.0266876220703125,
0.020172119140625,
-0.0430908203125,
0.004283905029296875,
-0.006900787353515625,
0.03564453125,
0.0924072265625,
-0.005573272705078125,
-0.0276031494140625,
0.014404296875,
0.056121826171875,
-0.002750396728515625,
-0.0416259765625,
0.05059814453125,
-0.005687713623046875,
-0.017791748046875,
-0.042236328125,
-0.0023555755615234375,
-0.01288604736328125,
-0.04364013671875,
-0.01288604736328125,
-0.0306854248046875,
0.0205535888671875,
0.0258331298828125,
-0.0051422119140625,
-0.0173797607421875,
-0.02239990234375,
0.003475189208984375,
0.0092926025390625,
0.00799560546875,
0.058074951171875,
0.00339508056640625,
-0.0699462890625,
-0.005771636962890625,
0.010498046875,
-0.025482177734375,
0.01384735107421875,
0.0033550262451171875,
0.02960205078125,
0.0289459228515625,
0.01947021484375,
0.028961181640625,
0.04779052734375,
-0.06329345703125,
-0.047760009765625,
-0.0023021697998046875,
-0.0258331298828125,
0.0204315185546875,
0.0132598876953125,
-0.013458251953125,
0.0018520355224609375,
0.036224365234375,
-0.037261962890625,
0.002613067626953125,
-0.01355743408203125,
-0.01201629638671875,
0.033416748046875,
-0.0021457672119140625,
-0.0137176513671875,
-0.0165863037109375,
0.03729248046875,
0.041351318359375,
0.04644775390625,
-0.050628662109375,
0.0487060546875,
-0.01019287109375,
0.00908660888671875,
0.055328369140625,
0.01175689697265625,
0.0005550384521484375,
-0.028564453125,
0.0330810546875,
-0.0029087066650390625,
-0.00824737548828125,
-0.0256805419921875,
0.01462554931640625,
-0.0439453125,
-0.044464111328125,
0.05609130859375,
0.01163482666015625,
0.01617431640625,
-0.0135345458984375,
-0.0261993408203125,
0.007518768310546875,
0.086669921875,
-0.038238525390625,
-0.0008921623229980469,
-0.006511688232421875,
0.005523681640625,
0.00820159912109375,
-0.005916595458984375,
-0.041961669921875,
-0.0219879150390625,
-0.058685302734375,
0.0079803466796875,
0.01340484619140625,
-0.01995849609375,
-0.045501708984375,
0.0701904296875,
-0.060028076171875,
-0.0133209228515625,
0.0283660888671875,
-0.0543212890625,
0.051239013671875,
-0.0250091552734375,
0.0131683349609375,
-0.0280914306640625,
-0.012969970703125,
-0.050048828125,
-0.046661376953125,
-0.0037174224853515625,
-0.0284881591796875,
0.0300140380859375,
0.0279541015625,
-0.0025882720947265625,
-0.0225677490234375,
0.01276397705078125,
0.0284271240234375,
0.0172271728515625,
-0.03375244140625,
-0.0399169921875,
-0.01311492919921875,
0.0355224609375,
-0.0216064453125,
0.017059326171875,
-0.000011086463928222656,
-0.00446319580078125,
-0.012115478515625,
0.020751953125,
-0.029296875,
0.004825592041015625,
-0.00843048095703125,
-0.03204345703125,
-0.050140380859375,
-0.0271148681640625,
-0.06427001953125,
0.00035452842712402344,
-0.032623291015625,
-0.01015472412109375,
-0.04461669921875,
-0.0760498046875,
0.040008544921875,
-0.0025539398193359375,
-0.0169830322265625,
-0.00740814208984375,
0.06427001953125,
0.0114593505859375,
-0.0190887451171875,
0.003719329833984375,
-0.0106353759765625,
0.03619384765625,
-0.01407623291015625,
0.058319091796875,
0.05108642578125,
0.0172271728515625,
-0.00392913818359375,
0.0171966552734375,
-0.0037212371826171875,
-0.05438232421875,
0.078369140625,
-0.0294036865234375,
-0.0032444000244140625,
0.00885009765625,
-0.056396484375,
0.0589599609375,
0.018096923828125,
0.01055145263671875,
-0.01531219482421875,
0.050048828125,
0.033111572265625,
-0.0209503173828125,
-0.00901031494140625,
-0.019439697265625,
-0.0304107666015625,
0.0208282470703125,
-0.0487060546875,
0.004245758056640625,
-0.00588226318359375,
0.01029205322265625,
-0.021484375,
-0.037872314453125,
0.005222320556640625,
-0.053802490234375,
-0.01410675048828125,
-0.0252838134765625,
0.0201568603515625,
-0.0223541259765625,
0.01259613037109375,
-0.044769287109375,
-0.00824737548828125,
0.071533203125,
-0.0010499954223632812,
-0.0560302734375,
-0.0084686279296875,
-0.0163726806640625,
0.0158233642578125,
0.024200439453125,
0.01177215576171875,
0.023773193359375,
0.0330810546875,
0.016571044921875,
0.0002620220184326172,
-0.010162353515625,
0.0460205078125,
-0.0266265869140625,
0.0274810791015625,
0.018463134765625,
-0.0219268798828125,
0.031982421875,
0.01445770263671875,
0.031982421875,
0.00275421142578125,
-0.0287933349609375,
0.06964111328125,
0.0144195556640625,
0.036529541015625,
0.005161285400390625,
0.0112152099609375,
-0.0206451416015625,
0.0242462158203125,
-0.047210693359375,
-0.0226593017578125,
-0.0230560302734375,
0.04486083984375,
0.039886474609375,
0.0267791748046875,
0.0154876708984375,
-0.0264434814453125,
-0.01641845703125,
0.0114593505859375,
0.0207366943359375,
-0.00650787353515625,
-0.054412841796875,
0.00336456298828125,
0.024993896484375,
0.0118408203125,
-0.03594970703125,
0.00312042236328125,
-0.00792694091796875,
-0.030426025390625,
-0.01019287109375,
-0.0081024169921875,
-0.0238494873046875,
-0.034210205078125,
-0.0244140625,
-0.022857666015625,
-0.040802001953125,
0.0168609619140625,
-0.01117706298828125,
0.01061248779296875,
-0.0222930908203125,
-0.026123046875,
0.018890380859375,
0.0016765594482421875,
-0.0005211830139160156,
-0.0333251953125,
-0.0068359375,
-0.0061492919921875,
0.0013065338134765625,
0.06256103515625,
0.01690673828125,
-0.042083740234375,
-0.00099945068359375,
-0.0192108154296875,
-0.00766754150390625,
-0.031768798828125,
-0.060333251953125,
-0.032989501953125,
-0.0007710456848144531,
0.03131103515625,
0.026947021484375,
0.01303863525390625,
-0.0194549560546875,
0.0024547576904296875,
0.00444793701171875,
0.008148193359375,
0.034759521484375,
-0.004817962646484375,
0.03509521484375,
-0.022857666015625,
0.048828125,
0.0124969482421875,
0.0290985107421875,
0.01477813720703125,
-0.030029296875,
0.027496337890625,
-0.027313232421875,
-0.043243408203125,
-0.048828125,
0.0016222000122070312,
0.0169219970703125,
0.053497314453125,
-0.0189361572265625,
-0.0386962890625,
0.0014715194702148438,
-0.003795623779296875,
-0.0435791015625,
0.061279296875,
0.037994384765625,
0.019561767578125,
-0.064208984375,
0.003520965576171875,
0.03350830078125,
0.02093505859375,
-0.01898193359375,
-0.007694244384765625,
0.01093292236328125,
0.017547607421875,
-0.0106658935546875,
0.004390716552734375,
0.01052093505859375,
-0.00806427001953125,
-0.042572021484375,
-0.00873565673828125,
0.007709503173828125,
0.00020575523376464844,
0.0063934326171875,
0.00069427490234375,
-0.019561767578125,
-0.0238800048828125,
0.01064300537109375,
-0.0148468017578125,
-0.02655029296875,
-0.000006258487701416016,
-0.025848388671875,
0.00006645917892456055,
0.0911865234375,
0.0745849609375,
-0.132568359375,
0.0136871337890625,
0.0020999908447265625,
0.01454925537109375,
0.036651611328125,
-0.008209228515625,
0.03131103515625,
0.04522705078125,
0.0007843971252441406,
-0.006816864013671875,
-0.034637451171875,
0.00809478759765625,
-0.00641632080078125,
0.004024505615234375,
0.005970001220703125,
0.01163482666015625,
-0.00015819072723388672,
0.0027332305908203125,
-0.00788116455078125,
-0.00014543533325195312,
0.02850341796875,
0.0008831024169921875,
0.00548553466796875,
0.0052947998046875,
0.0037517547607421875,
-0.0341796875,
0.02349853515625,
-0.0479736328125,
-0.01654052734375,
0.04022216796875,
-0.00986480712890625,
0.0216522216796875,
0.02825927734375,
-0.0099334716796875,
-0.000029325485229492188,
-0.01296234130859375,
-0.032318115234375,
-0.08721923828125,
-0.04315185546875,
0.0036411285400390625,
0.038909912109375,
-0.012054443359375,
0.05181884765625,
-0.01508331298828125,
-0.042236328125,
-0.020050048828125,
-0.004940032958984375,
0.08319091796875,
-0.033111572265625,
-0.00934600830078125,
0.0328369140625,
0.051300048828125,
-0.0229644775390625,
-0.00307464599609375,
-0.041900634765625,
-0.0179443359375,
0.0072479248046875,
-0.03265380859375,
-0.039337158203125,
0.00792694091796875,
-0.012115478515625,
-0.074462890625,
0.066650390625,
0.01255035400390625,
0.0205535888671875,
-0.042999267578125,
0.0280303955078125,
0.0208587646484375,
0.0219268798828125,
-0.0367431640625,
0.0684814453125,
0.0025196075439453125,
0.041229248046875,
-0.05279541015625,
-0.00421142578125,
0.0066375732421875,
0.0283203125,
0.0521240234375,
0.0138092041015625,
-0.00281524658203125,
-0.01629638671875,
0.0169830322265625,
0.02947998046875,
-0.01041412353515625,
0.0165863037109375,
-0.00859832763671875,
0.0156707763671875,
0.01120758056640625,
-0.001270294189453125,
0.049224853515625,
-0.016357421875,
-0.057464599609375,
-0.000035762786865234375,
0.019134521484375,
0.0148162841796875,
0.0159454345703125,
-0.00337982177734375,
-0.0199737548828125,
0.00679779052734375,
0.0095367431640625,
0.0037403106689453125,
0.0108184814453125,
0.0197906494140625,
0.057403564453125,
-0.047332763671875,
-0.00815582275390625,
-0.01800537109375,
0.057952880859375,
0.03741455078125,
0.01399993896484375,
0.0256805419921875,
0.0242462158203125,
-0.0253143310546875,
-0.05322265625,
0.005096435546875,
-0.005218505859375,
-0.04736328125,
0.060791015625,
0.0440673828125,
0.0189208984375,
-0.032989501953125,
0.0003752708435058594,
0.0364990234375,
0.07806396484375,
-0.05633544921875,
-0.0584716796875,
0.0107421875,
0.0263671875,
0.028564453125,
0.03814697265625,
0.0523681640625,
-0.0313720703125,
0.03228759765625,
-0.07879638671875,
0.0212860107421875,
0.00504302978515625,
0.04498291015625,
-0.0083160400390625,
0.00860595703125,
-0.06964111328125,
-0.00959014892578125,
-0.029449462890625,
-0.0106353759765625,
0.008941650390625,
-0.006175994873046875,
0.029571533203125,
-0.00028967857360839844,
0.0638427734375,
0.009246826171875,
0.026824951171875,
-0.002468109130859375,
-0.0022716522216796875,
-0.0303497314453125,
-0.043426513671875,
-0.077880859375,
0.02764892578125,
0.050994873046875,
0.01468658447265625,
-0.0006570816040039062,
0.02557373046875,
0.025543212890625,
-0.0269012451171875,
-0.015777587890625,
0.03863525390625,
-0.0185089111328125,
0.0007786750793457031,
-0.01285552978515625,
-0.01129150390625,
-0.0199737548828125,
-0.037384033203125,
0.012115478515625,
0.004238128662109375,
0.0116424560546875,
0.00814056396484375,
0.04852294921875,
-0.00029659271240234375,
-0.005268096923828125,
0.047088623046875,
0.0160980224609375,
0.07635498046875,
0.0372314453125,
-0.0360107421875,
-0.0038700103759765625,
-0.058837890625,
0.00608062744140625,
-0.0022335052490234375,
0.01471710205078125,
0.007747650146484375,
0.01235198974609375,
0.005779266357421875,
-0.0635986328125,
0.028167724609375,
0.04547119140625,
0.0166015625,
0.0177459716796875,
-0.0014810562133789062,
-0.0146942138671875,
-0.020355224609375,
0.004070281982421875,
0.037017822265625,
0.0016946792602539062,
-0.037994384765625,
0.05169677734375,
-0.006687164306640625,
-0.0150909423828125,
-0.05352783203125,
0.0550537109375,
-0.05072021484375,
-0.04290771484375,
0.040435791015625,
0.048004150390625,
0.01165771484375,
-0.0181732177734375,
-0.044097900390625,
0.053009033203125,
0.0223541259765625,
0.0050811767578125,
0.03399658203125,
-0.006244659423828125,
0.002685546875,
-0.0016050338745117188,
0.007293701171875,
-0.018768310546875,
0.0258026123046875,
-0.006542205810546875,
-0.0380859375,
0.05133056640625,
0.00322723388671875,
-0.0077056884765625,
0.0226287841796875,
0.00919342041015625,
-0.041046142578125,
0.014190673828125,
-0.03485107421875,
-0.0009608268737792969,
0.01262664794921875,
0.018707275390625,
-0.0384521484375,
0.01447296142578125,
0.004993438720703125,
-0.00614166259765625,
0.023468017578125,
0.01873779296875,
0.034210205078125,
-0.0295562744140625,
-0.0166778564453125,
-0.041412353515625,
0.0266571044921875,
0.01160430908203125,
-0.00511932373046875,
-0.06768798828125,
0.01528167724609375,
0.00012063980102539062,
0.01401519775390625,
-0.0212860107421875,
0.0057830810546875,
-0.00841522216796875,
0.0077972412109375,
0.01142120361328125,
-0.04534912109375,
-0.07403564453125,
-0.0166168212890625,
0.035491943359375,
0.0160064697265625,
-0.06390380859375,
0.0238494873046875,
-0.0167999267578125,
0.01117706298828125,
0.0020294189453125,
-0.050567626953125,
0.0172882080078125,
0.040435791015625,
-0.0296783447265625,
-0.0195770263671875,
-0.0179595947265625,
-0.0004930496215820312,
-0.004924774169921875,
0.03057861328125,
0.049774169921875,
-0.0243682861328125,
-0.032745361328125,
0.03253173828125,
0.028900146484375,
0.0667724609375,
0.0165252685546875,
-0.04058837890625,
-0.0099334716796875,
0.00916290283203125,
0.017913818359375,
-0.048065185546875,
-0.0031452178955078125,
-0.0469970703125,
-0.01934814453125,
-0.0115814208984375,
0.03466796875,
0.059814453125,
-0.014556884765625,
-0.07354736328125,
0.099609375,
-0.02459716796875,
-0.0280303955078125,
-0.02935791015625,
0.01004791259765625,
0.0143280029296875,
-0.028045654296875,
-0.0099945068359375,
-0.0238800048828125,
-0.043060302734375,
0.0152587890625,
-0.006053924560546875,
0.031494140625,
0.006683349609375,
0.00833892822265625,
-0.0036945343017578125,
0.01140594482421875,
-0.0005421638488769531,
-0.0350341796875,
0.039154052734375,
-0.036163330078125,
0.041473388671875,
0.04559326171875,
-0.031524658203125,
-0.0075531005859375,
-0.00856781005859375,
-0.0307159423828125,
-0.047821044921875,
-0.01274871826171875,
-0.01702880859375,
-0.01508331298828125,
0.06793212890625,
0.08062744140625,
0.0251007080078125,
-0.035308837890625,
0.004810333251953125,
-0.0287933349609375,
-0.02154541015625,
-0.0244293212890625,
0.01529693603515625,
-0.045318603515625,
-0.01253509521484375,
-0.0116424560546875,
-0.04132080078125,
-0.01451873779296875,
-0.032379150390625,
-0.07061767578125,
0.00878143310546875,
-0.030975341796875,
0.01043701171875,
-0.0175933837890625,
0.06573486328125,
0.0014772415161132812,
-0.00827789306640625,
0.0187225341796875,
-0.02471923828125,
-0.0172882080078125,
0.01296234130859375,
-0.00725555419921875,
-0.0404052734375,
-0.04376220703125,
-0.0185699462890625,
0.060516357421875,
-0.035552978515625,
0.07000732421875,
-0.06744384765625,
0.004512786865234375,
0.0009965896606445312,
0.0264129638671875,
0.002231597900390625,
0.031585693359375,
-0.00589752197265625,
0.058349609375,
0.022186279296875,
0.005428314208984375,
-0.00518798828125,
0.0222320556640625,
-0.006927490234375,
0.017059326171875,
-0.0133819580078125,
0.0009107589721679688,
0.0179901123046875,
-0.020538330078125,
-0.0153045654296875,
0.004638671875,
-0.007801055908203125,
-0.08074951171875,
0.065673828125,
0.10467529296875,
0.035430908203125,
0.043182373046875
]
|
3aba4c2bff35da090f97725895a3cf5a2f23860b | Wordpress Stackexchange
Q: Sort posts by category name and title Trying to figure out how I can output my posts based on category title (a–z) and secondly, the title of the posts within the category:
A CATEGORY
– A post beginning with a
– Because I want to be output second
– Come on, and output me already
B CATEGORY
– Another post beginning with a
– Bother, can't come up with another title on B
– I guess you get the point
How do I achieve this?
A: To get them broken down by Category, you need to loop through the list of categories and then query on each category:
$categories = get_categories( array ('orderby' => 'name', 'order' => 'asc' ) );
foreach ($categories as $category) {
echo "Category is: $category->name <br/>";
$catPosts = new WP_Query( array ( 'category_name' => $category->slug, 'orderby' => 'title' ) );
if ( $catPosts->have_posts() ) {
while ( $catPosts->have_posts() ) {
$catPosts->the_post();
echo "<a href='the_permalink()'>the_title()</a>";
}
echo "<p><a href='category/$category->slug'>More in this category</a></p>";
} //end if
} //end foreach
wp_reset_postdata();
| Q: Sort posts by category name and title Trying to figure out how I can output my posts based on category title (a–z) and secondly, the title of the posts within the category:
A CATEGORY
– A post beginning with a
– Because I want to be output second
– Come on, and output me already
B CATEGORY
– Another post beginning with a
– Bother, can't come up with another title on B
– I guess you get the point
How do I achieve this?
A: To get them broken down by Category, you need to loop through the list of categories and then query on each category:
$categories = get_categories( array ('orderby' => 'name', 'order' => 'asc' ) );
foreach ($categories as $category) {
echo "Category is: $category->name <br/>";
$catPosts = new WP_Query( array ( 'category_name' => $category->slug, 'orderby' => 'title' ) );
if ( $catPosts->have_posts() ) {
while ( $catPosts->have_posts() ) {
$catPosts->the_post();
echo "<a href='the_permalink()'>the_title()</a>";
}
echo "<p><a href='category/$category->slug'>More in this category</a></p>";
} //end if
} //end foreach
wp_reset_postdata();
A: I think do you mean GROUP Post by category/taxonomy NOT SORT.
Here, Is a code to GROUP by category/taxonomy
*
*$terms = get_terms( 'my_cat_name' );
Here, cat_name name is the name of taxonomy, When you register it like this: e.g.
register_taxonomy( 'my_cat_name', array( 'custom_post_name' ), $args )
*Use it in Query e.g.:
$args = array(
'post_type' => 'custom_post_name',
'my_cat_name' => $term->slug,
'posts_per_page' => $no_of_posts,
);
*Complete code:
$terms = get_terms( 'CUSTOM_TAXONOMY_SLUG' );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
$output .= '<ul class="category-list">';
foreach ( $terms as $term ) {
$output .= '<li class="single-cat">';
$output .= ' <h3>' . $term->name . '</h3>'; // Taxonomy/Category Name
$args = array(
'post_type' => 'POST_TYPE_SLUG',
'CUSTOM_TAXONOMY_SLUG' => $term->slug,
'posts_per_page' => -1,
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) {
$output .= '<ul class="cat-post-list">';
while ( $the_query->have_posts() ) {
$the_query->the_post();
$output .=' <li class="cat-single-post">';
$output .=' <h4><a href="'.get_the_permalink().'">' .get_the_title(). '</a></h4>';
$output .=' </li><!-- .cat-single-post -->';
}
$output .= '</ul><!-- .cat-post-list -->';
}
wp_reset_postdata();
$output .= '</li><!-- .single-cat-item -->';
}
$output .= '</ul><!-- .category-list -->';
}
A: Expanding on Maheshwaghmare's work;
<?
$terms = get_terms( 'CUSTOM_TAXONOMY' );
if ( ! empty( $terms ) ){ ?>
<div class="POST_TYPE_PLURAL">
<? foreach ( $terms as $term ) {
//print_r($term) // DEBUG;
$term_slug = $term->slug;
$term_name = $term->name;
$term_description = $term->description;
?>
<div class="POST_TYPE_CATEGORY <?=$term_slug; ?>">
<h1 class="section-head"> <?=$term_name; ?> </h1>
<p><?=$term_description; ?> </p>
<?
$args = array(
'post_type' => 'CUSTOM_POST_TYPE',
'tax_query' => array(
array(
'taxonomy' => 'CUSTOM_TAXONOMY',
'field' => 'slug',
'terms' => $term_slug,
),
),
'posts_per_page' => -1,
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) : ?>
<? while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class="POST_TYPE_SINGLE">
<h3> <? the_title(); ?> </h3>
<? // MORE TEMPLATING CODE ?>
</div>
<? endwhile;
endif;
wp_reset_postdata(); ?>
</div>
<? } // foreach
} //if terms
?>
A: You can use orderby parameter for a new wp_query instance:
$query = new WP_Query( array ( 'orderby' => 'title', 'order' => 'DESC' ) );
Soo for every category use a separate instance.
More information here: http://codex.wordpress.org/Class_Reference/WP_Query
| wordpress | {
"language": "en",
"length": 518,
"provenance": "stackexchange_00019.jsonl.gz:439450",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124037"
} | [
0.03594970703125,
0.0161895751953125,
-0.0292816162109375,
-0.01419830322265625,
0.0384521484375,
-0.034088134765625,
0.052459716796875,
-0.0221710205078125,
0.0223541259765625,
0.0104827880859375,
-0.0341796875,
0.0204315185546875,
0.0108184814453125,
-0.0272216796875,
0.0016565322875976562,
-0.01410675048828125,
0.0377197265625,
-0.02435302734375,
0.027923583984375,
0.006511688232421875,
-0.0007252693176269531,
0.041351318359375,
0.0271759033203125,
0.03216552734375,
0.005626678466796875,
-0.0272216796875,
0.05999755859375,
-0.0355224609375,
0.007038116455078125,
-0.0389404296875,
0.0210113525390625,
0.0170745849609375,
0.01141357421875,
-0.01045989990234375,
0.04815673828125,
0.0430908203125,
0.0440673828125,
-0.0106658935546875,
0.027618408203125,
0.0241546630859375,
0.007160186767578125,
-0.0026874542236328125,
0.0509033203125,
0.0155181884765625,
0.0227508544921875,
-0.03253173828125,
0.01430511474609375,
-0.05987548828125,
0.03533935546875,
-0.0367431640625,
0.01165771484375,
0.027130126953125,
0.0208892822265625,
-0.0350341796875,
-0.02288818359375,
0.01241302490234375,
0.0033397674560546875,
-0.000026285648345947266,
0.0457763671875,
-0.0181884765625,
-0.0521240234375,
-0.0164794921875,
0.021148681640625,
-0.0253753662109375,
-0.028961181640625,
0.01409912109375,
0.07208251953125,
0.0020427703857421875,
0.0015993118286132812,
-0.01178741455078125,
0.0209503173828125,
0.00783538818359375,
-0.00927734375,
-0.001155853271484375,
-0.013458251953125,
-0.0262451171875,
-0.005706787109375,
-0.04095458984375,
0.025421142578125,
0.0140228271484375,
0.00983428955078125,
-0.01255035400390625,
-0.005420684814453125,
-0.0147247314453125,
0.007694244384765625,
-0.002838134765625,
-0.00727081298828125,
-0.0038547515869140625,
-0.0216522216796875,
-0.040863037109375,
-0.00942230224609375,
0.0166015625,
-0.0546875,
0.0004222393035888672,
0.001728057861328125,
-0.0296478271484375,
0.00043845176696777344,
0.055084228515625,
-0.01381683349609375,
0.0013713836669921875,
-0.003711700439453125,
-0.015655517578125,
-0.027923583984375,
-0.021209716796875,
0.0208282470703125,
-0.01091766357421875,
-0.0203857421875,
0.01331329345703125,
0.05242919921875,
0.05938720703125,
-0.013214111328125,
0.01934814453125,
-0.004283905029296875,
-0.015899658203125,
-0.00788116455078125,
0.038604736328125,
-0.0214385986328125,
0.0160064697265625,
-0.014495849609375,
0.01385498046875,
0.00616455078125,
0.04736328125,
0.031707763671875,
-0.0206451416015625,
0.0095367431640625,
0.043304443359375,
0.0162353515625,
-0.09356689453125,
0.007244110107421875,
0.00946044921875,
-0.033050537109375,
0.0192718505859375,
0.054718017578125,
0.0139617919921875,
-0.0031795501708984375,
-0.019378662109375,
-0.005222320556640625,
-0.0292510986328125,
-0.01318359375,
-0.01032257080078125,
-0.0023288726806640625,
-0.00482177734375,
0.02471923828125,
-0.0089569091796875,
0.027130126953125,
0.016204833984375,
-0.0086517333984375,
0.0092010498046875,
0.0222015380859375,
-0.015411376953125,
0.0301666259765625,
-0.053619384765625,
0.028594970703125,
0.0006251335144042969,
-0.0301513671875,
-0.0183563232421875,
-0.0186920166015625,
-0.0131988525390625,
-0.00286865234375,
-0.037811279296875,
0.047393798828125,
0.021209716796875,
0.019744873046875,
-0.036895751953125,
-0.041107177734375,
-0.014190673828125,
-0.08746337890625,
-0.01041412353515625,
0.0084075927734375,
-0.0203857421875,
0.0083160400390625,
-0.0011339187622070312,
0.004215240478515625,
-0.006214141845703125,
0.00031375885009765625,
-0.0010271072387695312,
-0.0158233642578125,
-0.059967041015625,
0.00896453857421875,
0.038055419921875,
-0.01079559326171875,
-0.014312744140625,
-0.06060791015625,
0.028717041015625,
-0.03656005859375,
0.0218658447265625,
0.023101806640625,
0.042510986328125,
-0.00954437255859375,
0.01824951171875,
0.04327392578125,
0.034820556640625,
-0.06805419921875,
0.033172607421875,
-0.006732940673828125,
-0.0176544189453125,
-0.0074920654296875,
-0.0022983551025390625,
0.004974365234375,
0.0033702850341796875,
-0.005809783935546875,
0.0079345703125,
-0.01377105712890625,
0.01800537109375,
-0.040679931640625,
0.001438140869140625,
-0.0189666748046875,
0.0419921875,
0.0246734619140625,
0.0288848876953125,
0.01934814453125,
0.0266571044921875,
-0.031829833984375,
-0.053009033203125,
-0.060577392578125,
0.002880096435546875,
0.009735107421875,
-0.04937744140625,
-0.0242156982421875,
-0.02606201171875,
-0.0239715576171875,
0.012298583984375,
-0.045562744140625,
0.0694580078125,
0.079833984375,
-0.00443267822265625,
-0.01971435546875,
-0.048828125,
0.01129913330078125,
0.029327392578125,
-0.11712646484375,
0.0318603515625,
0.044891357421875,
0.06707763671875,
-0.025299072265625,
0.010345458984375,
0.03521728515625,
0.04034423828125,
0.0031337738037109375,
0.0067901611328125,
0.0296173095703125,
0.00482940673828125,
-0.0238189697265625,
-0.01497650146484375,
0.01439666748046875,
-0.04620361328125,
0.0023288726806640625,
-0.019775390625,
0.0304107666015625,
0.0675048828125,
0.0197906494140625,
0.020233154296875,
0.0199737548828125,
0.046844482421875,
-0.0002770423889160156,
0.04022216796875,
0.0096282958984375,
0.0079193115234375,
-0.0198974609375,
0.0096588134765625,
0.01177978515625,
-0.025054931640625,
-0.036285400390625,
0.007781982421875,
0.033966064453125,
0.004619598388671875,
0.011962890625,
-0.00014889240264892578,
-0.04888916015625,
0.0212860107421875,
0.021331787109375,
-0.0162200927734375,
0.004756927490234375,
0.0241546630859375,
-0.0023403167724609375,
-0.021331787109375,
-0.028228759765625,
0.0016574859619140625,
0.0092315673828125,
-0.01457977294921875,
-0.00823974609375,
0.039581298828125,
0.02642822265625,
-0.006626129150390625,
-0.03851318359375,
-0.10498046875,
0.021575927734375,
0.045074462890625,
-0.045379638671875,
0.007015228271484375,
0.0285491943359375,
0.049041748046875,
-0.007904052734375,
0.016815185546875,
-0.031463623046875,
0.02777099609375,
0.021026611328125,
-0.024658203125,
0.0202789306640625,
-0.0235443115234375,
0.05206298828125,
0.062347412109375,
-0.00902557373046875,
0.0200042724609375,
-0.000579833984375,
-0.0099334716796875,
0.0022220611572265625,
-0.003734588623046875,
-0.0223388671875,
-0.01995849609375,
-0.060089111328125,
-0.002758026123046875,
0.03668212890625,
0.040557861328125,
0.038848876953125,
-0.031707763671875,
0.03753662109375,
0.047454833984375,
-0.0693359375,
-0.1102294921875,
0.0083465576171875,
-0.048370361328125,
0.044036865234375,
0.01020050048828125,
-0.01113128662109375,
-0.053070068359375,
0.036346435546875,
0.0136566162109375,
0.040313720703125,
-0.034912109375,
-0.06951904296875,
-0.0222930908203125,
-0.07391357421875,
-0.00292205810546875,
0.0021114349365234375,
0.0140838623046875,
0.013427734375,
0.039276123046875,
0.01119232177734375,
-0.048004150390625,
0.01058197021484375,
0.020477294921875,
-0.04217529296875,
-0.006488800048828125,
0.01236724853515625,
-0.0038051605224609375,
-0.02191162109375,
0.01422119140625,
0.0594482421875,
0.01934814453125,
-0.025634765625,
0.0023517608642578125,
-0.025390625,
0.01461029052734375,
0.034820556640625,
0.00569915771484375,
0.00763702392578125,
0.0430908203125,
0.039764404296875,
-0.01104736328125,
0.0053863525390625,
-0.026214599609375,
-0.031768798828125,
-0.0175323486328125,
0.009735107421875,
0.00815582275390625,
-0.01177978515625,
-0.02337646484375,
-0.01611328125,
-0.0023708343505859375,
-0.00807952880859375,
-0.03961181640625,
0.037628173828125,
0.0018291473388671875,
0.0147552490234375,
0.006832122802734375,
-0.00997161865234375,
-0.034149169921875,
-0.004650115966796875,
-0.0328369140625,
-0.007259368896484375,
-0.0308990478515625,
0.015838623046875,
-0.035400390625,
-0.041229248046875,
0.0494384765625,
-0.0076904296875,
0.005809783935546875,
-0.0225982666015625,
-0.037628173828125,
0.0008063316345214844,
0.07623291015625,
-0.0379638671875,
-0.0274200439453125,
-0.029266357421875,
-0.0046844482421875,
-0.00798797607421875,
0.0138702392578125,
-0.0276031494140625,
-0.01345062255859375,
-0.09881591796875,
0.01371002197265625,
-0.0104217529296875,
-0.031158447265625,
-0.029144287109375,
0.040740966796875,
-0.0675048828125,
-0.029205322265625,
0.034912109375,
-0.0310211181640625,
0.00907135009765625,
-0.0165252685546875,
-0.028106689453125,
-0.0118255615234375,
-0.04559326171875,
-0.016876220703125,
-0.041351318359375,
-0.0113525390625,
0.0114593505859375,
0.0125579833984375,
-0.01071929931640625,
-0.021759033203125,
-0.0112457275390625,
0.040863037109375,
0.00225830078125,
0.0294342041015625,
0.0156707763671875,
0.01148223876953125,
-0.009307861328125,
0.00034689903259277344,
0.0141143798828125,
-0.025360107421875,
0.00420379638671875,
-0.037628173828125,
-0.020355224609375,
0.011993408203125,
-0.04827880859375,
0.04632568359375,
-0.0491943359375,
-0.004039764404296875,
-0.048919677734375,
-0.005886077880859375,
-0.00576019287109375,
-0.0017595291137695312,
-0.006580352783203125,
-0.004604339599609375,
-0.006256103515625,
-0.05029296875,
0.030029296875,
0.01078033447265625,
-0.015625,
0.01308441162109375,
0.03857421875,
0.00597381591796875,
-0.03631591796875,
-0.07281494140625,
-0.00600433349609375,
0.0207672119140625,
0.0014448165893554688,
0.018280029296875,
-0.0313720703125,
-0.03582763671875,
0.08184814453125,
-0.00951385498046875,
-0.016571044921875,
-0.0125732421875,
0.02093505859375,
0.003231048583984375,
-0.0137786865234375,
-0.0084686279296875,
-0.01174163818359375,
0.04229736328125,
0.0244293212890625,
-0.00556182861328125,
-0.0138702392578125,
-0.021820068359375,
0.03875732421875,
0.00957489013671875,
-0.00070953369140625,
-0.033599853515625,
-0.023284912109375,
0.0031909942626953125,
0.01904296875,
0.042694091796875,
0.032684326171875,
-0.00534820556640625,
0.01320648193359375,
0.0099029541015625,
-0.004184722900390625,
-0.0252227783203125,
-0.016387939453125,
0.002597808837890625,
0.02984619140625,
-0.037445068359375,
-0.0012063980102539062,
-0.006046295166015625,
0.00738525390625,
0.0020618438720703125,
0.004184722900390625,
-0.00785064697265625,
-0.0396728515625,
-0.0075836181640625,
0.0170745849609375,
0.00513458251953125,
-0.0017576217651367188,
0.02197265625,
0.01556396484375,
0.026092529296875,
0.036224365234375,
-0.05157470703125,
0.022064208984375,
-0.000232696533203125,
0.00911712646484375,
0.007556915283203125,
-0.01328277587890625,
0.01068878173828125,
0.06219482421875,
-0.00727081298828125,
0.0411376953125,
-0.012298583984375,
0.0182037353515625,
-0.00701904296875,
0.01507568359375,
0.01435089111328125,
-0.00698089599609375,
-0.0004436969757080078,
-0.00572967529296875,
0.0245361328125,
-0.0404052734375,
-0.0111846923828125,
-0.0016050338745117188,
0.0322265625,
-0.0357666015625,
-0.040130615234375,
0.047637939453125,
-0.00347900390625,
-0.029571533203125,
0.031829833984375,
0.026092529296875,
-0.0188751220703125,
-0.03021240234375,
-0.031524658203125,
0.00994110107421875,
0.0135955810546875,
-0.0129547119140625,
0.0294036865234375,
-0.0000059604644775390625,
0.0447998046875,
-0.0080413818359375,
0.0003330707550048828,
0.00033783912658691406,
0.009063720703125,
-0.03204345703125,
-0.0106201171875,
0.01403045654296875,
0.0257110595703125,
-0.0167236328125,
-0.005733489990234375,
-0.0265960693359375,
0.02783203125,
0.01387786865234375,
0.049713134765625,
-0.04571533203125,
-0.0027027130126953125,
-0.006786346435546875,
-0.0175323486328125,
0.056854248046875,
0.01337432861328125,
-0.048309326171875,
0.0128631591796875,
-0.054901123046875,
-0.01690673828125,
0.015960693359375,
-0.03472900390625,
-0.044219970703125,
-0.03887939453125,
0.0245208740234375,
0.0122222900390625,
0.0246124267578125,
-0.0175628662109375,
-0.03033447265625,
0.01216888427734375,
0.03125,
0.004154205322265625,
-0.0204315185546875,
0.036590576171875,
0.016845703125,
0.03143310546875,
-0.0017299652099609375,
-0.01258087158203125,
-0.00952911376953125,
-0.017974853515625,
0.004852294921875,
-0.05645751953125,
-0.032470703125,
0.04144287109375,
-0.0531005859375,
0.005779266357421875,
0.05010986328125,
-0.00710296630859375,
-0.0089263916015625,
0.0034046173095703125,
0.020111083984375,
-0.0163726806640625,
-0.02001953125,
0.00412750244140625,
-0.0273590087890625,
0.031585693359375,
0.0024261474609375,
0.042938232421875,
-0.01190948486328125,
-0.03558349609375,
0.015167236328125,
-0.00797271728515625,
0.02203369140625,
0.007038116455078125,
-0.060333251953125,
0.0513916015625,
0.05572509765625,
0.05474853515625,
0.042388916015625,
0.028564453125,
0.037933349609375,
-0.01666259765625,
-0.0251312255859375,
0.09381103515625,
0.0238037109375,
0.09234619140625,
-0.0208740234375,
-0.01161956787109375,
0.041351318359375,
-0.067626953125,
-0.027557373046875,
0.04132080078125,
0.046539306640625,
-0.01078033447265625,
-0.02471923828125,
0.0123138427734375,
-0.0239105224609375,
-0.0127410888671875,
0.0267791748046875,
-0.01220703125,
-0.0153961181640625,
0.00429534912109375,
-0.061279296875,
-0.027557373046875,
-0.009521484375,
-0.0128631591796875,
0.015716552734375,
0.00998687744140625,
0.053192138671875,
0.0183563232421875,
-0.07952880859375,
-0.01337432861328125,
0.0472412109375,
-0.0025634765625,
-0.061981201171875,
-0.0209503173828125,
0.03790283203125,
-0.0197601318359375,
-0.06768798828125,
0.056884765625,
0.00353240966796875,
0.032470703125,
0.027099609375,
-0.0301971435546875,
0.006992340087890625,
0.0248870849609375,
-0.017608642578125,
0.01471710205078125,
0.00457000732421875,
-0.055633544921875,
0.00701141357421875,
0.0037860870361328125,
-0.03179931640625,
0.020050048828125,
-0.00787353515625,
0.0015125274658203125,
-0.018402099609375,
0.026153564453125,
-0.01509857177734375,
-0.015716552734375,
0.06512451171875,
-0.0086212158203125,
-0.03314208984375,
0.00931549072265625,
0.05303955078125,
0.01207733154296875,
0.00496673583984375,
0.03204345703125,
-0.03076171875,
0.01177215576171875,
0.01464080810546875,
0.0153350830078125,
-0.00397491455078125,
0.00926971435546875,
-0.0767822265625,
0.078857421875,
-0.006504058837890625,
0.05047607421875,
0.00206756591796875,
0.0131072998046875,
-0.00774383544921875,
0.0126495361328125,
-0.05267333984375,
0.08624267578125,
0.0274658203125,
0.057647705078125,
-0.09112548828125,
-0.0258941650390625,
0.00782012939453125,
0.0623779296875,
0.03125,
-0.003681182861328125,
-0.04534912109375,
-0.00855255126953125,
0.046051025390625,
0.04693603515625,
0.01068878173828125,
0.03729248046875,
-0.00439453125,
0.01006317138671875,
0.040130615234375,
-0.007205963134765625,
0.038726806640625,
-0.01251983642578125,
-0.0156402587890625,
0.016632080078125,
0.0268707275390625,
0.03765869140625,
0.008544921875,
-0.00467681884765625,
-0.02667236328125,
-0.005886077880859375,
0.034820556640625,
-0.0308380126953125,
0.017486572265625,
0.041046142578125,
0.07366943359375,
-0.09185791015625,
-0.028564453125,
-0.0345458984375,
0.06915283203125,
0.018707275390625,
0.040130615234375,
0.0272216796875,
0.01407623291015625,
0.034210205078125,
-0.0231475830078125,
0.022674560546875,
-0.006351470947265625,
-0.0287628173828125,
0.061676025390625,
0.03143310546875,
0.032379150390625,
-0.0274505615234375,
-0.010223388671875,
0.057769775390625,
0.08636474609375,
-0.051788330078125,
-0.038604736328125,
0.0200347900390625,
0.01611328125,
-0.0066070556640625,
0.00705718994140625,
0.00325775146484375,
0.01678466796875,
0.055572509765625,
-0.023040771484375,
-0.011077880859375,
0.0303497314453125,
0.0413818359375,
-0.007221221923828125,
-0.04034423828125,
-0.0177459716796875,
-0.00823211669921875,
-0.0474853515625,
0.04669189453125,
0.0260772705078125,
0.060943603515625,
-0.00954437255859375,
0.08270263671875,
-0.044097900390625,
-0.0333251953125,
0.0157470703125,
0.0018358230590820312,
-0.02349853515625,
-0.0160980224609375,
0.002338409423828125,
-0.02874755859375,
-0.0301361083984375,
0.0220489501953125,
0.059173583984375,
-0.0194549560546875,
0.052825927734375,
0.04376220703125,
-0.00992584228515625,
-0.01338958740234375,
0.0102386474609375,
-0.00013387203216552734,
-0.002582550048828125,
-0.025299072265625,
0.02801513671875,
0.01029205322265625,
-0.0089569091796875,
0.001689910888671875,
0.050018310546875,
0.00357818603515625,
-0.020660400390625,
0.00563812255859375,
0.00868988037109375,
-0.035247802734375,
0.038604736328125,
0.01200103759765625,
0.041595458984375,
0.0021915435791015625,
-0.1114501953125,
-0.003082275390625,
-0.042022705078125,
-0.0726318359375,
0.0283660888671875,
0.0479736328125,
-0.006290435791015625,
-0.0155181884765625,
0.01416015625,
-0.05364990234375,
0.045379638671875,
0.031829833984375,
-0.003742218017578125,
0.02667236328125,
0.0239105224609375,
-0.0094757080078125,
-0.004276275634765625,
-0.0167999267578125,
0.0279388427734375,
0.05206298828125,
0.01122283935546875,
0.007099151611328125,
-0.01270294189453125,
0.032073974609375,
-0.0751953125,
0.033416748046875,
-0.07501220703125,
-0.06658935546875,
0.06103515625,
0.00659942626953125,
-0.0171661376953125,
0.003147125244140625,
-0.0016183853149414062,
-0.00765228271484375,
0.045806884765625,
-0.038604736328125,
-0.023834228515625,
-0.019775390625,
0.020294189453125,
-0.0207977294921875,
0.0304107666015625,
-0.01348114013671875,
0.01033782958984375,
-0.01324462890625,
-0.03228759765625,
0.04205322265625,
0.036834716796875,
0.0106658935546875,
0.00875091552734375,
-0.01708984375,
-0.00560760498046875,
-0.0007543563842773438,
0.0123138427734375,
0.00022339820861816406,
0.036895751953125,
-0.032440185546875,
-0.023345947265625,
0.030426025390625,
-0.0020008087158203125,
-0.0019893646240234375,
0.035552978515625,
-0.01201629638671875,
0.026275634765625,
-0.056396484375,
-0.0291900634765625,
0.0266876220703125,
0.04248046875,
-0.00850677490234375,
0.03497314453125,
-0.03436279296875,
-0.00015461444854736328,
0.0174407958984375,
-0.014434814453125,
-0.03668212890625,
-0.0232696533203125,
-0.00556182861328125,
0.0164947509765625,
-0.0100555419921875,
-0.03125,
-0.038604736328125,
-0.0219268798828125,
0.00849151611328125,
-0.0161590576171875,
0.037841796875,
-0.0262298583984375,
-0.0218963623046875,
0.004650115966796875,
-0.0304718017578125,
-0.040252685546875,
0.00495147705078125,
0.005229949951171875,
-0.0297393798828125,
0.011932373046875,
-0.050384521484375,
-0.03497314453125,
-0.02728271484375,
0.0209808349609375,
0.0251312255859375,
-0.03863525390625,
-0.043914794921875,
-0.0012197494506835938,
0.036773681640625,
0.032745361328125,
0.05902099609375,
-0.01096343994140625,
0.019378662109375,
0.035888671875,
-0.066162109375,
-0.054229736328125,
0.0255584716796875,
0.0030956268310546875,
-0.0092315673828125,
0.0041351318359375,
0.0009732246398925781,
0.01910400390625,
-0.01422119140625,
-0.02264404296875,
0.085205078125,
-0.013397216796875,
-0.01441192626953125,
-0.0208740234375,
0.01123809814453125,
0.003978729248046875,
0.01001739501953125,
0.01456451416015625,
-0.033782958984375,
-0.0423583984375,
-0.0083770751953125,
0.0338134765625,
0.01432037353515625,
0.0076751708984375,
0.045562744140625,
-0.07122802734375,
0.05902099609375,
0.00897216796875,
0.0119781494140625,
0.01308441162109375,
-0.00782012939453125,
0.033355712890625,
0.0307769775390625,
-0.04107666015625,
0.01111602783203125,
-0.01605224609375,
0.0010833740234375,
0.0203094482421875,
-0.039306640625,
-0.05731201171875,
-0.039215087890625,
0.03131103515625,
0.02471923828125,
0.016845703125,
-0.00970458984375,
-0.03253173828125,
-0.023223876953125,
-0.007381439208984375,
-0.0220184326171875,
0.01042938232421875,
-0.040069580078125,
-0.0016546249389648438,
-0.0220794677734375,
0.0155792236328125,
0.016021728515625,
-0.0169219970703125,
-0.01218414306640625,
-0.0272369384765625,
-0.011474609375,
-0.0012664794921875,
-0.04986572265625,
0.0140380859375,
0.007717132568359375,
-0.0305938720703125,
-0.0357666015625,
-0.005321502685546875,
0.0071258544921875,
-0.0272064208984375,
-0.02899169921875,
-0.0253753662109375,
0.005924224853515625,
0.0194549560546875,
0.0025348663330078125,
0.0215606689453125,
0.0189971923828125,
0.0186309814453125,
0.0125732421875,
-0.047210693359375,
0.007717132568359375,
0.0310516357421875,
-0.0125274658203125,
-0.05517578125,
0.03558349609375,
0.04742431640625,
0.057281494140625,
0.03485107421875,
-0.016998291015625,
0.01039886474609375,
0.06903076171875,
0.0006785392761230469,
-0.069091796875,
-0.00460052490234375,
-0.055877685546875,
0.002140045166015625,
0.0075531005859375,
0.0167388916015625,
-0.01064300537109375,
0.00554656982421875,
0.007785797119140625,
0.0024127960205078125,
0.01654052734375
]
|
22e038d4234efd1f7da15c355ad71b9997fb23bb | Wordpress Stackexchange
Q: Determine Term depth I'm looking to be able to find the depth of a term within it's hierarchical tree.
Produce
-- Vegetables
---- Carrot
---- Onion
---- Celery
-- Fruit
---- Apple
------ HoneyCrisp
----Orange
Produce is level 0 (or 1), Fruit is level 1, Apple is 2, HoneyCrisp is 3, etc.
Ideal usage is $depth = get_term_depth( $term_id );. Anyone have experience with this?
I essentially want a different rendering depending on depth on a term archive page.
A: Not trying to bump my rep, but I found my own answer. get_ancestors allows you to get the hierarchy of any item. Since terms can only have 1 parent, this is all we need: the number of items in this list equates to the term depth level, and even provides term ids.
Usage:
$ancestors = get_ancestors( $term_id, 'custom-taxonomy-slug' );
print_r( $ancestors ) ; // array( 0 => 15, 1 => 45 ) - 3rd level term
| Q: Determine Term depth I'm looking to be able to find the depth of a term within it's hierarchical tree.
Produce
-- Vegetables
---- Carrot
---- Onion
---- Celery
-- Fruit
---- Apple
------ HoneyCrisp
----Orange
Produce is level 0 (or 1), Fruit is level 1, Apple is 2, HoneyCrisp is 3, etc.
Ideal usage is $depth = get_term_depth( $term_id );. Anyone have experience with this?
I essentially want a different rendering depending on depth on a term archive page.
A: Not trying to bump my rep, but I found my own answer. get_ancestors allows you to get the hierarchy of any item. Since terms can only have 1 parent, this is all we need: the number of items in this list equates to the term depth level, and even provides term ids.
Usage:
$ancestors = get_ancestors( $term_id, 'custom-taxonomy-slug' );
print_r( $ancestors ) ; // array( 0 => 15, 1 => 45 ) - 3rd level term
| wordpress | {
"language": "en",
"length": 157,
"provenance": "stackexchange_00019.jsonl.gz:439491",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124172"
} | [
0.00875091552734375,
0.01428985595703125,
-0.042236328125,
-0.0316162109375,
0.018798828125,
-0.007457733154296875,
-0.005889892578125,
-0.01001739501953125,
0.04913330078125,
0.0021190643310546875,
-0.0209503173828125,
-0.022125244140625,
-0.01454925537109375,
-0.0278472900390625,
-0.033905029296875,
-0.047515869140625,
0.04351806640625,
-0.023651123046875,
0.040008544921875,
0.006992340087890625,
0.0179443359375,
0.032318115234375,
0.051849365234375,
0.009796142578125,
0.034637451171875,
-0.0189208984375,
0.04833984375,
-0.055084228515625,
0.03155517578125,
-0.0318603515625,
0.0117645263671875,
-0.019561767578125,
0.00894927978515625,
-0.0284423828125,
0.04400634765625,
0.018463134765625,
0.006206512451171875,
-0.01386260986328125,
0.03564453125,
-0.01153564453125,
0.0280303955078125,
-0.0007996559143066406,
-0.01486968994140625,
-0.0031032562255859375,
-0.03289794921875,
-0.039337158203125,
0.0168914794921875,
-0.021820068359375,
0.016754150390625,
-0.00589752197265625,
0.0384521484375,
0.00670623779296875,
0.03472900390625,
-0.0038585662841796875,
-0.0048370361328125,
0.031829833984375,
0.0638427734375,
-0.057403564453125,
0.0338134765625,
-0.07342529296875,
-0.03472900390625,
-0.009063720703125,
0.061859130859375,
0.036590576171875,
0.023651123046875,
0.00017499923706054688,
0.0257415771484375,
0.0294189453125,
-0.036773681640625,
0.01617431640625,
0.0177764892578125,
-0.020111083984375,
0.0001552104949951172,
0.03033447265625,
-0.02191162109375,
-0.08599853515625,
0.01293182373046875,
-0.061065673828125,
0.0130767822265625,
0.0293731689453125,
-0.036895751953125,
0.00537872314453125,
-0.048095703125,
-0.02398681640625,
0.0216217041015625,
0.02392578125,
-0.0254058837890625,
-0.01074981689453125,
-0.0241851806640625,
-0.03240966796875,
-0.01654052734375,
0.0007567405700683594,
-0.0252532958984375,
-0.0126800537109375,
-0.0226287841796875,
-0.0291748046875,
0.0159454345703125,
0.028564453125,
-0.03717041015625,
-0.001399993896484375,
-0.03790283203125,
-0.004749298095703125,
0.004543304443359375,
-0.025543212890625,
0.0138397216796875,
0.0200347900390625,
-0.0022125244140625,
0.0186920166015625,
0.06842041015625,
0.0338134765625,
0.00461578369140625,
0.07647705078125,
-0.008209228515625,
-0.031585693359375,
-0.0075225830078125,
0.03155517578125,
-0.013458251953125,
0.03369140625,
0.016021728515625,
0.025146484375,
-0.0305633544921875,
0.005184173583984375,
-0.01250457763671875,
0.0258636474609375,
0.00896453857421875,
0.01885986328125,
0.00897979736328125,
-0.00846099853515625,
-0.0159912109375,
0.021087646484375,
-0.0408935546875,
0.042449951171875,
0.057647705078125,
-0.0224609375,
-0.01910400390625,
-0.002353668212890625,
-0.03082275390625,
-0.0299072265625,
-0.0294647216796875,
0.03594970703125,
0.01345062255859375,
-0.0196533203125,
0.0300750732421875,
-0.00270843505859375,
-0.0273895263671875,
0.0032176971435546875,
0.007747650146484375,
0.0281982421875,
-0.024169921875,
-0.064453125,
0.00289154052734375,
-0.0187835693359375,
0.0538330078125,
-0.01413726806640625,
-0.0640869140625,
-0.04266357421875,
-0.030853271484375,
-0.0178680419921875,
-0.015838623046875,
-0.06103515625,
-0.0305328369140625,
-0.03143310546875,
0.00734710693359375,
-0.043914794921875,
-0.06268310546875,
0.037994384765625,
-0.030853271484375,
-0.00695037841796875,
0.021514892578125,
-0.042327880859375,
0.007724761962890625,
0.0029773712158203125,
0.0384521484375,
0.0184478759765625,
0.0196533203125,
0.03558349609375,
-0.0115814208984375,
0.01386260986328125,
0.01329803466796875,
0.019927978515625,
0.000537872314453125,
-0.03717041015625,
0.0029449462890625,
0.0117340087890625,
0.007678985595703125,
0.049468994140625,
-0.01354217529296875,
0.02557373046875,
0.0003533363342285156,
0.0124969482421875,
-0.03338623046875,
0.031585693359375,
-0.05291748046875,
0.07281494140625,
-0.029052734375,
-0.0137176513671875,
0.0003285408020019531,
0.031951904296875,
-0.021453857421875,
-0.030975341796875,
-0.0224456787109375,
0.002223968505859375,
-0.0031147003173828125,
0.0169525146484375,
-0.05133056640625,
0.01357269287109375,
-0.0217742919921875,
0.020263671875,
0.036224365234375,
0.016510009765625,
-0.0041656494140625,
0.0023517608642578125,
-0.0086517333984375,
-0.027069091796875,
-0.03350830078125,
0.014984130859375,
0.01189422607421875,
0.0033721923828125,
-0.00798797607421875,
-0.05206298828125,
-0.0004363059997558594,
0.016082763671875,
-0.00007343292236328125,
0.03619384765625,
0.012664794921875,
0.04376220703125,
-0.01284027099609375,
0.04400634765625,
0.04388427734375,
0.047454833984375,
0.00835418701171875,
-0.045318603515625,
0.052398681640625,
0.0198822021484375,
-0.027862548828125,
0.0022907257080078125,
0.0102691650390625,
-0.0662841796875,
-0.005157470703125,
0.06396484375,
0.0299530029296875,
0.044891357421875,
-0.037200927734375,
-0.05914306640625,
0.06591796875,
-0.073974609375,
-0.03277587890625,
-0.01494598388671875,
-0.00876617431640625,
0.06103515625,
-0.0218963623046875,
0.027557373046875,
-0.0137481689453125,
0.0183868408203125,
-0.0133056640625,
0.0400390625,
-0.022613525390625,
-0.0017156600952148438,
0.01145172119140625,
-0.0009441375732421875,
-0.0003063678741455078,
-0.0377197265625,
0.0138092041015625,
-0.03192138671875,
0.00856781005859375,
0.0304107666015625,
0.037689208984375,
0.052154541015625,
-0.049285888671875,
0.004726409912109375,
0.0305023193359375,
0.061798095703125,
0.00157928466796875,
0.0038204193115234375,
0.01355743408203125,
-0.031280517578125,
-0.036895751953125,
0.005214691162109375,
0.02313232421875,
0.001140594482421875,
0.0215301513671875,
0.09051513671875,
0.006603240966796875,
-0.0102691650390625,
-0.056396484375,
-0.0445556640625,
0.003936767578125,
0.06121826171875,
-0.0279388427734375,
0.03363037109375,
0.013580322265625,
0.08587646484375,
0.0156402587890625,
0.013336181640625,
-0.022430419921875,
0.04644775390625,
-0.0574951171875,
-0.0178680419921875,
0.022857666015625,
-0.034423828125,
-0.0019779205322265625,
0.04925537109375,
0.0204620361328125,
-0.03289794921875,
0.005794525146484375,
-0.00942230224609375,
-0.0017690658569335938,
0.0108795166015625,
0.00445556640625,
0.003444671630859375,
-0.030517578125,
0.02911376953125,
0.013427734375,
0.00667572021484375,
0.0202484130859375,
-0.01467132568359375,
0.00811004638671875,
0.0169219970703125,
-0.022491455078125,
-0.0269317626953125,
0.0139617919921875,
-0.068359375,
-0.00013720989227294922,
-0.020904541015625,
-0.036163330078125,
-0.0109710693359375,
-0.006378173828125,
-0.00037169456481933594,
0.0019626617431640625,
-0.0294342041015625,
-0.041015625,
-0.040618896484375,
-0.0626220703125,
-0.0082855224609375,
-0.0006389617919921875,
0.0025157928466796875,
0.0159149169921875,
0.055206298828125,
-0.00029587745666503906,
-0.048828125,
0.003131866455078125,
0.050262451171875,
-0.0194854736328125,
0.0050811767578125,
0.001628875732421875,
-0.026031494140625,
0.018798828125,
-0.0017566680908203125,
-0.06982421875,
0.0060882568359375,
0.0235748291015625,
-0.0241851806640625,
-0.0073089599609375,
0.0244140625,
0.038421630859375,
-0.0213470458984375,
-0.0121917724609375,
0.037811279296875,
0.0333251953125,
-0.013427734375,
-0.050048828125,
0.0176849365234375,
-0.0289459228515625,
0.0285491943359375,
0.01085662841796875,
-0.0232086181640625,
0.01073455810546875,
0.026702880859375,
-0.024017333984375,
-0.01549530029296875,
0.0070343017578125,
-0.0307769775390625,
0.02288818359375,
-0.0018482208251953125,
-0.04095458984375,
-0.00653076171875,
0.03680419921875,
-0.028961181640625,
-0.0089569091796875,
0.0081329345703125,
-0.00264739990234375,
0.0216827392578125,
-0.0265350341796875,
0.0107421875,
-0.008514404296875,
0.0013141632080078125,
-0.024139404296875,
0.033050537109375,
-0.01861572265625,
0.0032711029052734375,
-0.0209808349609375,
0.0223388671875,
-0.032196044921875,
-0.01064300537109375,
-0.016876220703125,
0.021148681640625,
0.0008263587951660156,
-0.06591796875,
-0.01983642578125,
-0.0207366943359375,
-0.0523681640625,
-0.0276336669921875,
-0.01922607421875,
-0.0295562744140625,
-0.02838134765625,
0.04449462890625,
-0.04541015625,
-0.0274810791015625,
-0.00018644332885742188,
-0.047515869140625,
-0.0438232421875,
0.051605224609375,
-0.059417724609375,
0.051300048828125,
0.0097198486328125,
-0.052764892578125,
-0.01256561279296875,
-0.02313232421875,
0.054351806640625,
-0.0264129638671875,
-0.032318115234375,
0.0030460357666015625,
0.01390838623046875,
0.04705810546875,
-0.01142120361328125,
0.04437255859375,
-0.01064300537109375,
0.03668212890625,
-0.0360107421875,
-0.06768798828125,
-0.01287841796875,
-0.059814453125,
-0.02362060546875,
-0.0228271484375,
-0.0044403076171875,
0.039581298828125,
-0.00789642333984375,
0.00936126708984375,
-0.0188446044921875,
-0.0009584426879882812,
-0.06317138671875,
-0.0391845703125,
-0.056304931640625,
0.020904541015625,
-0.0186004638671875,
-0.005828857421875,
-0.0635986328125,
-0.0946044921875,
0.04840087890625,
0.0206451416015625,
-0.0285797119140625,
-0.0032711029052734375,
0.05517578125,
0.0014810562133789062,
-0.04974365234375,
-0.044921875,
-0.01019287109375,
0.003765106201171875,
-0.015594482421875,
0.038330078125,
0.0133514404296875,
0.002758026123046875,
0.02142333984375,
-0.03076171875,
0.0202178955078125,
0.01247406005859375,
0.019287109375,
0.012664794921875,
-0.0328369140625,
0.043304443359375,
0.0158843994140625,
-0.03485107421875,
0.005474090576171875,
-0.0439453125,
-0.0287628173828125,
-0.050750732421875,
0.100830078125,
-0.02069091796875,
0.04949951171875,
-0.072509765625,
-0.054351806640625,
0.03173828125,
-0.051239013671875,
0.00489044189453125,
-0.01192474365234375,
0.010498046875,
-0.002399444580078125,
-0.0105133056640625,
0.0265960693359375,
-0.03179931640625,
0.0007729530334472656,
-0.04827880859375,
0.037872314453125,
-0.0272216796875,
0.0003294944763183594,
-0.0184478759765625,
-0.00907135009765625,
0.037567138671875,
0.0025806427001953125,
-0.0635986328125,
0.0335693359375,
-0.01331329345703125,
-0.0406494140625,
0.035736083984375,
-0.0467529296875,
0.035797119140625,
0.049530029296875,
-0.0087738037109375,
0.0160369873046875,
-0.065185546875,
0.0245361328125,
-0.038360595703125,
-0.0012760162353515625,
-0.0084075927734375,
-0.0241241455078125,
-0.019012451171875,
0.0247650146484375,
0.01442718505859375,
-0.01329803466796875,
-0.0148162841796875,
-0.031982421875,
-0.01084136962890625,
0.03875732421875,
0.046875,
-0.045074462890625,
-0.007076263427734375,
0.0135650634765625,
0.0236968994140625,
-0.0377197265625,
-0.0150146484375,
0.0251922607421875,
0.0384521484375,
-0.01363372802734375,
-0.0215606689453125,
0.016143798828125,
-0.017425537109375,
0.0031833648681640625,
-0.00543212890625,
0.01393890380859375,
0.008941650390625,
0.0037899017333984375,
0.0275421142578125,
0.012176513671875,
0.0002651214599609375,
-0.02313232421875,
0.0034999847412109375,
-0.016632080078125,
0.0269317626953125,
-0.00547027587890625,
-0.0187530517578125,
0.0240631103515625,
0.0284271240234375,
-0.10498046875,
-0.03125,
0.0198974609375,
-0.0273895263671875,
-0.01177215576171875,
-0.00951385498046875,
-0.0570068359375,
0.001888275146484375,
-0.00847625732421875,
0.02215576171875,
-0.0296478271484375,
0.002681732177734375,
-0.00799560546875,
0.005878448486328125,
0.0150299072265625,
-0.007171630859375,
-0.039459228515625,
-0.0006628036499023438,
-0.05413818359375,
0.00445556640625,
-0.0347900390625,
-0.046234130859375,
-0.01012420654296875,
0.021942138671875,
-0.06512451171875,
-0.01557159423828125,
-0.0012407302856445312,
0.10382080078125,
0.045135498046875,
0.054107666015625,
-0.07989501953125,
-0.015960693359375,
0.014312744140625,
0.0196685791015625,
-0.026092529296875,
0.047119140625,
0.00945281982421875,
0.00649261474609375,
-0.0074005126953125,
-0.0305938720703125,
0.0236663818359375,
-0.057525634765625,
-0.029876708984375,
-0.043121337890625,
0.005023956298828125,
0.001369476318359375,
-0.00850677490234375,
-0.00159454345703125,
0.02667236328125,
0.0009484291076660156,
0.0182037353515625,
0.0077056884765625,
-0.02972412109375,
0.01340484619140625,
-0.013336181640625,
0.064697265625,
-0.035369873046875,
0.0233612060546875,
-0.00859832763671875,
-0.02056884765625,
0.0181732177734375,
-0.020751953125,
0.000980377197265625,
0.06842041015625,
0.0177154541015625,
0.01410675048828125,
-0.00046133995056152344,
-0.0237274169921875,
0.003421783447265625,
0.01271820068359375,
-0.00528717041015625,
-0.0177001953125,
0.0225982666015625,
0.027130126953125,
-0.027557373046875,
0.035888671875,
-0.0005764961242675781,
0.003631591796875,
0.01374053955078125,
-0.033721923828125,
-0.039093017578125,
-0.037689208984375,
-0.01226806640625,
0.032501220703125,
-0.009735107421875,
-0.00754547119140625,
-0.0221405029296875,
-0.006519317626953125,
0.01270294189453125,
0.017425537109375,
0.008392333984375,
-0.043243408203125,
0.0171051025390625,
-0.023895263671875,
-0.02227783203125,
0.004261016845703125,
-0.003047943115234375,
-0.024658203125,
0.0249786376953125,
0.0101318359375,
0.0263214111328125,
0.00461578369140625,
-0.032867431640625,
0.03118896484375,
-0.037994384765625,
-0.0087127685546875,
-0.012542724609375,
0.003376007080078125,
-0.03167724609375,
0.0233001708984375,
-0.07000732421875,
0.0460205078125,
0.0400390625,
-0.02996826171875,
0.0233612060546875,
0.01873779296875,
-0.023834228515625,
0.00433349609375,
-0.005184173583984375,
-0.0634765625,
0.0202789306640625,
-0.00128173828125,
-0.0013189315795898438,
-0.006214141845703125,
-0.056671142578125,
0.00093841552734375,
-0.053558349609375,
0.0302734375,
-0.02294921875,
-0.0545654296875,
0.0411376953125,
0.0255126953125,
-0.0296478271484375,
0.0194244384765625,
0.0189056396484375,
-0.015289306640625,
-0.01204681396484375,
0.04290771484375,
-0.0430908203125,
-0.0008497238159179688,
0.02423095703125,
0.0301055908203125,
0.00588226318359375,
0.021270751953125,
-0.036407470703125,
0.034942626953125,
-0.029266357421875,
0.01277923583984375,
0.0020656585693359375,
0.00832366943359375,
0.006481170654296875,
-0.0011453628540039062,
-0.03466796875,
0.02581787109375,
0.059356689453125,
0.015716552734375,
-0.039520263671875,
-0.0266265869140625,
-0.0196380615234375,
0.045440673828125,
-0.005779266357421875,
0.0025157928466796875,
-0.038543701171875,
0.0007886886596679688,
0.028839111328125,
0.0217132568359375,
0.01172637939453125,
0.050689697265625,
0.04705810546875,
0.01070404052734375,
0.059906005859375,
0.0105438232421875,
0.06500244140625,
-0.058135986328125,
0.027740478515625,
0.053619384765625,
-0.00022685527801513672,
-0.004482269287109375,
-0.0190582275390625,
0.0016965866088867188,
-0.00807952880859375,
-0.02978515625,
0.015106201171875,
-0.0303802490234375,
0.012176513671875,
0.03515625,
0.032928466796875,
-0.055389404296875,
-0.0144500732421875,
-0.021484375,
0.050750732421875,
-0.0021266937255859375,
0.0496826171875,
0.044281005859375,
0.025360107421875,
0.034515380859375,
0.0174102783203125,
0.038909912109375,
0.0222015380859375,
-0.0341796875,
0.009246826171875,
-0.006099700927734375,
0.01165008544921875,
-0.0283203125,
0.01141357421875,
0.043975830078125,
0.0335693359375,
-0.0264892578125,
-0.052459716796875,
0.0069427490234375,
0.0253448486328125,
0.022674560546875,
0.038330078125,
0.050872802734375,
0.08306884765625,
0.1099853515625,
-0.0645751953125,
-0.04345703125,
0.0128936767578125,
0.045166015625,
-0.0105133056640625,
-0.06402587890625,
0.0042572021484375,
-0.06939697265625,
-0.0005397796630859375,
-0.01300048828125,
-0.01216888427734375,
-0.038543701171875,
-0.006427764892578125,
0.0153045654296875,
0.04388427734375,
0.035797119140625,
0.00435638427734375,
0.00035881996154785156,
0.0261077880859375,
-0.0361328125,
0.031951904296875,
0.0399169921875,
-0.0160675048828125,
-0.005802154541015625,
0.00621795654296875,
0.0243988037109375,
0.0280914306640625,
0.00849151611328125,
-0.0016660690307617188,
-0.0145721435546875,
-0.003387451171875,
-0.039459228515625,
-0.01139068603515625,
-0.01456451416015625,
-0.017181396484375,
0.0139007568359375,
-0.01523590087890625,
-0.01297760009765625,
0.00616455078125,
0.0224609375,
0.02044677734375,
0.054351806640625,
0.010772705078125,
0.0377197265625,
0.000171661376953125,
0.0079803466796875,
0.003719329833984375,
0.05279541015625,
-0.030426025390625,
-0.015289306640625,
-0.00567626953125,
-0.001834869384765625,
0.0271148681640625,
0.03472900390625,
-0.01056671142578125,
0.0223846435546875,
0.01605224609375,
-0.025054931640625,
-0.01007843017578125,
0.02459716796875,
0.015899658203125,
-0.0030612945556640625,
0.00827789306640625,
-0.000728607177734375,
0.042083740234375,
0.0159912109375,
0.040771484375,
0.0256195068359375,
-0.0157012939453125,
0.04608154296875,
-0.03253173828125,
-0.00499725341796875,
0.0006704330444335938,
0.00951385498046875,
-0.0299835205078125,
-0.03448486328125,
0.047119140625,
-0.0230712890625,
0.00371551513671875,
-0.0020923614501953125,
-0.0479736328125,
0.0108642578125,
0.0293426513671875,
-0.01922607421875,
0.0190277099609375,
-0.0176239013671875,
0.024139404296875,
-0.0235137939453125,
0.0227508544921875,
-0.029876708984375,
-0.0170440673828125,
-0.041595458984375,
-0.037353515625,
0.03875732421875,
0.0185089111328125,
0.00020420551300048828,
0.047576904296875,
0.0265045166015625,
-0.0151214599609375,
0.0308380126953125,
-0.036895751953125,
0.043426513671875,
0.0251007080078125,
0.022064208984375,
0.0028209686279296875,
0.05828857421875,
-0.01270294189453125,
0.0478515625,
-0.0016613006591796875,
0.0328369140625,
0.037353515625,
-0.049285888671875,
0.02056884765625,
0.0284576416015625,
0.042938232421875,
0.00496673583984375,
-0.01568603515625,
0.00344085693359375,
-0.0009288787841796875,
-0.0220947265625,
-0.03271484375,
-0.0202789306640625,
-0.019775390625,
0.0011014938354492188,
0.0175628662109375,
0.01360321044921875,
-0.01152801513671875,
-0.02099609375,
0.00470733642578125,
0.059356689453125,
0.0237884521484375,
-0.064697265625,
0.05438232421875,
-0.0287933349609375,
0.033050537109375,
0.040740966796875,
-0.011016845703125,
0.030059814453125,
0.0258331298828125,
-0.05596923828125,
0.052001953125,
-0.00336456298828125,
-0.06536865234375,
0.0149688720703125,
0.04132080078125,
0.0299072265625,
-0.03326416015625,
0.007785797119140625,
0.037872314453125,
0.053680419921875,
0.051025390625,
0.017913818359375,
0.001434326171875,
0.00855255126953125,
-0.005809783935546875,
-0.047332763671875,
-0.047210693359375,
0.048858642578125,
-0.07843017578125,
-0.064697265625,
-0.043487548828125,
0.03729248046875,
0.04547119140625,
-0.0265045166015625,
-0.07476806640625,
-0.0107574462890625,
-0.0115509033203125,
-0.03717041015625,
-0.0079803466796875,
-0.01335906982421875,
-0.032745361328125,
0.0277557373046875,
0.01006317138671875,
-0.020355224609375,
0.00943756103515625,
0.0338134765625,
-0.0089874267578125,
0.032958984375,
0.00853729248046875,
0.026580810546875,
-0.004673004150390625,
0.0205230712890625,
0.007511138916015625,
-0.0230712890625,
0.00914764404296875,
0.027130126953125,
-0.0005183219909667969,
0.0307769775390625,
-0.031524658203125,
0.00884246826171875,
-0.020782470703125,
0.008941650390625,
0.0195159912109375,
-0.04302978515625,
-0.01531982421875,
-0.0389404296875,
0.0653076171875,
-0.046783447265625,
0.01021575927734375,
0.01491546630859375,
-0.0226898193359375,
-0.026611328125,
-0.00734710693359375,
0.007518768310546875,
0.01380157470703125,
-0.048095703125,
0.0192413330078125,
0.019683837890625,
-0.0279388427734375,
0.00168609619140625,
-0.010986328125,
-0.0440673828125,
0.01153564453125,
-0.004123687744140625,
-0.0193023681640625,
0.01456451416015625,
-0.00466156005859375,
0.0157470703125,
-0.032257080078125,
-0.040679931640625,
-0.0144805908203125,
0.018096923828125,
-0.0224609375,
-0.0199432373046875,
-0.038726806640625,
-0.0126800537109375,
0.0165252685546875,
0.007099151611328125,
0.0007815361022949219,
0.006053924560546875,
0.0198822021484375,
0.01413726806640625,
-0.01361846923828125,
0.002532958984375,
-0.001953125,
-0.03277587890625,
-0.042449951171875,
0.018890380859375,
-0.00807952880859375,
0.094482421875,
-0.01922607421875,
0.027313232421875,
-0.005512237548828125,
0.037567138671875,
-0.0198974609375,
-0.004543304443359375,
0.0167999267578125,
-0.03326416015625,
-0.0016946792602539062,
-0.000009119510650634766,
-0.0126495361328125,
-0.0361328125,
0.01026153564453125,
0.09844970703125,
-0.01482391357421875,
0.02545166015625
]
|
9e8552e02cf646b2cddf9fc42e659482a412fcdc | Wordpress Stackexchange
Q: wp_users user_status field I have found an answer to my question here but it's 7 years old. I simply want to know if I can use this column for my own purposes.
I'm planning to use the user_activation_key column to store a hashed key upon user registration and set an inactive flag in the user_status column. This flag will prevent users from logging in until their e-mail address has been verified.
A: As far as I know it isn't used, but to avoid conflicts/problems, other plugins might use it, I'd go with adding a meta to the wp_usermeta table. There is a set of functions for handling that:
*
*add_user_meta()
*get_user_meta()
*update_user_meta()
*delete_user_meta()
Shouldn't make a big difference for the functionality you want to implement, but you're on the saver side of things.
| Q: wp_users user_status field I have found an answer to my question here but it's 7 years old. I simply want to know if I can use this column for my own purposes.
I'm planning to use the user_activation_key column to store a hashed key upon user registration and set an inactive flag in the user_status column. This flag will prevent users from logging in until their e-mail address has been verified.
A: As far as I know it isn't used, but to avoid conflicts/problems, other plugins might use it, I'd go with adding a meta to the wp_usermeta table. There is a set of functions for handling that:
*
*add_user_meta()
*get_user_meta()
*update_user_meta()
*delete_user_meta()
Shouldn't make a big difference for the functionality you want to implement, but you're on the saver side of things.
| wordpress | {
"language": "en",
"length": 134,
"provenance": "stackexchange_00019.jsonl.gz:439507",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124218"
} | [
0.0885009765625,
0.0089874267578125,
-0.023712158203125,
-0.03204345703125,
0.0390625,
-0.055755615234375,
0.0361328125,
-0.0278472900390625,
0.02178955078125,
0.043487548828125,
-0.0005450248718261719,
-0.0247802734375,
0.0203857421875,
-0.0201416015625,
-0.050506591796875,
-0.0127716064453125,
0.01116180419921875,
-0.00540924072265625,
0.006160736083984375,
-0.007137298583984375,
-0.004878997802734375,
-0.00031495094299316406,
0.0018253326416015625,
-0.058258056640625,
0.0159149169921875,
-0.03936767578125,
0.05816650390625,
-0.0264892578125,
0.0328369140625,
-0.0021991729736328125,
0.0110321044921875,
-0.01366424560546875,
-0.0011548995971679688,
-0.007396697998046875,
0.0254364013671875,
-0.0141448974609375,
0.006183624267578125,
0.0146636962890625,
0.0122222900390625,
-0.005603790283203125,
0.0213470458984375,
-0.0170745849609375,
-0.006572723388671875,
-0.01476287841796875,
-0.0107879638671875,
-0.040191650390625,
0.05401611328125,
-0.0086212158203125,
0.040802001953125,
-0.00868988037109375,
0.005397796630859375,
0.0311431884765625,
0.0238494873046875,
-0.028228759765625,
-0.0241241455078125,
-0.0210418701171875,
-0.0167694091796875,
0.017608642578125,
0.02685546875,
0.06787109375,
-0.004276275634765625,
0.01416015625,
-0.02410888671875,
-0.08258056640625,
0.0203094482421875,
-0.028564453125,
-0.0236968994140625,
0.028045654296875,
-0.0254364013671875,
0.004276275634765625,
0.038787841796875,
-0.0191497802734375,
0.0132293701171875,
-0.016632080078125,
-0.059417724609375,
-0.0025768280029296875,
0.034454345703125,
-0.0262451171875,
0.01013946533203125,
-0.0287322998046875,
-0.027191162109375,
0.01338958740234375,
-0.07470703125,
-0.01448822021484375,
0.0196685791015625,
0.01041412353515625,
-0.02069091796875,
-0.005634307861328125,
0.002532958984375,
-0.0277557373046875,
-0.01113128662109375,
-0.031097412109375,
-0.002445220947265625,
0.0189056396484375,
-0.021270751953125,
-0.023284912109375,
0.031341552734375,
0.0478515625,
-0.004322052001953125,
-0.0056304931640625,
0.02154541015625,
-0.034576416015625,
-0.019012451171875,
-0.00909423828125,
-0.0118408203125,
0.0985107421875,
0.01171112060546875,
0.002178192138671875,
-0.036224365234375,
-0.01004791259765625,
0.01055145263671875,
-0.0867919921875,
0.0202484130859375,
-0.028350830078125,
-0.0224609375,
0.00341796875,
-0.00439453125,
-0.0036411285400390625,
0.0034332275390625,
-0.0163421630859375,
0.0134124755859375,
0.0243072509765625,
-0.01091766357421875,
-0.00916290283203125,
-0.018707275390625,
-0.037139892578125,
-0.0229034423828125,
-0.0025730133056640625,
-0.007144927978515625,
0.051971435546875,
-0.04254150390625,
-0.01027679443359375,
0.0264129638671875,
0.0109100341796875,
-0.006488800048828125,
-0.0269317626953125,
-0.002796173095703125,
-0.02374267578125,
-0.0159759521484375,
0.049102783203125,
-0.03607177734375,
-0.07769775390625,
0.00989532470703125,
-0.01410675048828125,
-0.0034885406494140625,
0.06353759765625,
0.008636474609375,
-0.0253448486328125,
-0.0013837814331054688,
-0.046966552734375,
-0.0306854248046875,
-0.0455322265625,
-0.017364501953125,
0.026763916015625,
0.0195159912109375,
0.036285400390625,
-0.01007843017578125,
0.00257110595703125,
-0.018951416015625,
0.0257110595703125,
0.0733642578125,
-0.02777099609375,
-0.053314208984375,
0.0079193115234375,
-0.05133056640625,
0.0308074951171875,
-0.038421630859375,
-0.00873565673828125,
0.031494140625,
-0.01549530029296875,
0.0228729248046875,
0.01100921630859375,
0.01172637939453125,
-0.00286102294921875,
0.00421905517578125,
-0.003818511962890625,
0.0088653564453125,
0.034149169921875,
0.019683837890625,
-0.00989532470703125,
-0.037261962890625,
-0.044158935546875,
0.07574462890625,
-0.038543701171875,
-0.0128021240234375,
0.03387451171875,
0.00258636474609375,
0.0265655517578125,
0.0078277587890625,
0.01319122314453125,
-0.0157928466796875,
0.037384033203125,
-0.0026645660400390625,
0.007259368896484375,
-0.0025920867919921875,
-0.03424072265625,
0.0248565673828125,
0.00024330615997314453,
-0.006710052490234375,
0.002674102783203125,
0.07147216796875,
-0.0170440673828125,
0.0251007080078125,
-0.04791259765625,
-0.07220458984375,
-0.01149749755859375,
-0.0243682861328125,
0.0181732177734375,
-0.0340576171875,
-0.0050506591796875,
0.0207977294921875,
-0.0261383056640625,
-0.0209503173828125,
0.02349853515625,
0.01076507568359375,
-0.0029354095458984375,
-0.025054931640625,
0.006801605224609375,
0.016448974609375,
0.048736572265625,
0.0023746490478515625,
0.0120849609375,
-0.007091522216796875,
-0.046112060546875,
-0.021453857421875,
-0.039825439453125,
-0.00739288330078125,
-0.0210418701171875,
0.006622314453125,
-0.0162506103515625,
0.06646728515625,
0.0272064208984375,
0.0253143310546875,
0.0060272216796875,
-0.0221710205078125,
0.03118896484375,
-0.0054779052734375,
-0.0540771484375,
-0.01824951171875,
0.04290771484375,
0.01241302490234375,
-0.03302001953125,
-0.0235595703125,
0.0248260498046875,
0.03375244140625,
0.0160064697265625,
0.01087188720703125,
0.027069091796875,
-0.024993896484375,
0.0181427001953125,
-0.0090179443359375,
0.022491455078125,
0.01410675048828125,
-0.0477294921875,
-0.0184478759765625,
0.045196533203125,
-0.030853271484375,
-0.042724609375,
0.036224365234375,
0.006366729736328125,
-0.00978851318359375,
-0.03094482421875,
-0.0033626556396484375,
-0.032867431640625,
0.021759033203125,
-0.0150299072265625,
0.0300140380859375,
0.00946044921875,
-0.00481414794921875,
-0.007656097412109375,
0.007537841796875,
-0.04071044921875,
0.002544403076171875,
-0.0015459060668945312,
0.00209808349609375,
0.038604736328125,
-0.01580810546875,
-0.011383056640625,
0.009735107421875,
0.006191253662109375,
-0.03741455078125,
-0.03936767578125,
-0.0225830078125,
-0.00909423828125,
0.0186920166015625,
-0.023590087890625,
0.0304412841796875,
-0.01617431640625,
-0.0263671875,
-0.048736572265625,
0.00005835294723510742,
0.00910186767578125,
-0.0257110595703125,
0.033966064453125,
-0.011627197265625,
-0.033416748046875,
0.0005540847778320312,
-0.043365478515625,
0.04632568359375,
-0.05438232421875,
-0.00008672475814819336,
0.06402587890625,
-0.00901031494140625,
0.01374053955078125,
0.00403594970703125,
-0.01220703125,
-0.0183563232421875,
0.0156402587890625,
-0.006687164306640625,
-0.045257568359375,
0.01548004150390625,
0.0487060546875,
0.0301666259765625,
0.060272216796875,
-0.00922393798828125,
-0.0416259765625,
-0.006526947021484375,
0.040863037109375,
-0.030792236328125,
-0.051300048828125,
-0.056671142578125,
-0.07366943359375,
0.04327392578125,
-0.007259368896484375,
-0.0180511474609375,
-0.007686614990234375,
0.03228759765625,
0.0380859375,
-0.053314208984375,
-0.0007090568542480469,
-0.060089111328125,
-0.03607177734375,
-0.04144287109375,
0.0634765625,
-0.0214385986328125,
0.01450347900390625,
-0.0083770751953125,
0.05328369140625,
-0.010833740234375,
-0.0384521484375,
-0.034820556640625,
-0.0191192626953125,
0.00428009033203125,
0.0014371871948242188,
-0.0242462158203125,
0.01554107666015625,
-0.01108551025390625,
0.022613525390625,
-0.0243682861328125,
-0.0305023193359375,
0.01605224609375,
-0.039886474609375,
0.028778076171875,
0.0099334716796875,
0.02154541015625,
-0.0038814544677734375,
-0.04150390625,
0.0143585205078125,
0.01140594482421875,
-0.027862548828125,
0.0188751220703125,
-0.0027141571044921875,
-0.03472900390625,
-0.0231170654296875,
0.010772705078125,
0.0005259513854980469,
0.0182647705078125,
-0.050048828125,
0.0416259765625,
0.043121337890625,
-0.005496978759765625,
0.0156097412109375,
0.033721923828125,
0.0015039443969726562,
0.0183868408203125,
-0.03173828125,
0.01335906982421875,
-0.0260467529296875,
0.01495361328125,
-0.012786865234375,
0.002044677734375,
-0.02093505859375,
0.007297515869140625,
-0.05023193359375,
-0.0455322265625,
0.033782958984375,
-0.01021575927734375,
0.02593994140625,
-0.04180908203125,
-0.01959228515625,
-0.0165863037109375,
0.08013916015625,
-0.0215911865234375,
-0.0247344970703125,
0.004970550537109375,
0.03558349609375,
-0.103271484375,
-0.03204345703125,
-0.052398681640625,
0.01241302490234375,
-0.02960205078125,
-0.005889892578125,
0.0155181884765625,
-0.031646728515625,
-0.0023632049560546875,
-0.049468994140625,
-0.030670166015625,
-0.02874755859375,
0.0218505859375,
-0.003894805908203125,
0.0081329345703125,
0.00684356689453125,
-0.022186279296875,
0.0081024169921875,
-0.0018396377563476562,
-0.032684326171875,
-0.0540771484375,
-0.026123046875,
0.035003662109375,
0.021270751953125,
0.01305389404296875,
-0.06512451171875,
0.02362060546875,
0.046234130859375,
-0.01482391357421875,
0.019500732421875,
-0.006549835205078125,
0.0015134811401367188,
0.012603759765625,
0.005870819091796875,
-0.0112762451171875,
0.0012197494506835938,
0.0089874267578125,
-0.025604248046875,
-0.050384521484375,
-0.048614501953125,
-0.061676025390625,
-0.0178375244140625,
-0.0186004638671875,
-0.038299560546875,
0.0309295654296875,
-0.0036296844482421875,
0.00243377685546875,
0.05157470703125,
-0.0033130645751953125,
0.0035305023193359375,
-0.01953125,
0.004909515380859375,
0.040802001953125,
-0.017364501953125,
0.005794525146484375,
0.002162933349609375,
0.064453125,
0.0126800537109375,
-0.0108489990234375,
-0.002521514892578125,
-0.0034542083740234375,
0.031829833984375,
-0.0031909942626953125,
0.021331787109375,
0.0032939910888671875,
-0.038299560546875,
0.050872802734375,
0.0122528076171875,
-0.031646728515625,
0.0278167724609375,
0.040985107421875,
0.00457763671875,
-0.0311279296875,
-0.00728607177734375,
-0.029144287109375,
0.004634857177734375,
0.0218048095703125,
-0.0008749961853027344,
-0.019287109375,
-0.0017786026000976562,
0.032928466796875,
-0.01551055908203125,
0.0124053955078125,
-0.0222930908203125,
-0.02874755859375,
0.0019483566284179688,
-0.0667724609375,
-0.01166534423828125,
0.005023956298828125,
0.00006020069122314453,
-0.0263519287109375,
-0.01250457763671875,
-0.00859832763671875,
-0.06396484375,
-0.04534912109375,
-0.0135498046875,
0.003055572509765625,
-0.0095672607421875,
-0.0006723403930664062,
-0.043731689453125,
-0.020050048828125,
0.07098388671875,
-0.0035800933837890625,
-0.06109619140625,
0.037994384765625,
-0.0114898681640625,
0.0276641845703125,
0.052520751953125,
0.0175628662109375,
0.06463623046875,
0.0210418701171875,
0.002716064453125,
0.00263214111328125,
0.0035419464111328125,
-0.0126495361328125,
-0.039825439453125,
-0.012237548828125,
0.035736083984375,
-0.019622802734375,
0.004901885986328125,
0.07940673828125,
0.004695892333984375,
0.041412353515625,
-0.02227783203125,
0.05133056640625,
0.059417724609375,
0.0010271072387695312,
0.0166473388671875,
0.01018524169921875,
-0.033416748046875,
0.00412750244140625,
-0.0139923095703125,
-0.01507568359375,
0.0170440673828125,
0.0257110595703125,
0.0242156982421875,
0.05059814453125,
0.0180511474609375,
-0.0265960693359375,
-0.0271759033203125,
0.006488800048828125,
0.048004150390625,
-0.041534423828125,
-0.08447265625,
-0.0234375,
0.00681304931640625,
0.0207061767578125,
-0.0706787109375,
-0.01152801513671875,
-0.005092620849609375,
-0.043731689453125,
0.01334381103515625,
0.01441192626953125,
-0.004486083984375,
-0.014404296875,
-0.0020160675048828125,
-0.004550933837890625,
-0.018707275390625,
0.00887298583984375,
-0.01337432861328125,
0.0018215179443359375,
-0.01885986328125,
0.007305145263671875,
0.004375457763671875,
0.00374603271484375,
-0.00470733642578125,
-0.058746337890625,
0.028167724609375,
-0.051849365234375,
-0.015045166015625,
0.0355224609375,
-0.006992340087890625,
-0.035125732421875,
-0.023529052734375,
0.0021076202392578125,
-0.0115509033203125,
-0.03729248046875,
-0.0276031494140625,
-0.0226593017578125,
0.00814056396484375,
0.04974365234375,
0.037200927734375,
0.00754547119140625,
-0.0587158203125,
-0.053375244140625,
0.0167388916015625,
0.09600830078125,
0.04541015625,
0.0020198822021484375,
0.04595947265625,
0.0020618438720703125,
0.05596923828125,
0.0284423828125,
0.033111572265625,
-0.025909423828125,
-0.0285491943359375,
-0.00054931640625,
-0.00244903564453125,
0.00038743019104003906,
-0.034210205078125,
0.01171875,
-0.0150604248046875,
0.055023193359375,
-0.00811767578125,
0.0217742919921875,
0.006183624267578125,
0.01279449462890625,
-0.005306243896484375,
-0.01885986328125,
0.00811004638671875,
0.007701873779296875,
0.033172607421875,
-0.0267181396484375,
0.005451202392578125,
-0.00884246826171875,
0.01335906982421875,
0.002574920654296875,
-0.0253753662109375,
-0.002719879150390625,
0.03729248046875,
-0.05712890625,
0.053314208984375,
0.048095703125,
0.00540924072265625,
0.01788330078125,
-0.018798828125,
-0.001720428466796875,
-0.0019245147705078125,
0.0160980224609375,
-0.055389404296875,
0.003673553466796875,
0.056549072265625,
0.0202789306640625,
-0.03057861328125,
0.036865234375,
-0.031585693359375,
0.01593017578125,
0.075439453125,
0.06732177734375,
-0.11474609375,
0.019134521484375,
0.0059051513671875,
0.00335693359375,
0.042236328125,
0.01221466064453125,
-0.0245361328125,
-0.08929443359375,
0.04608154296875,
-0.026397705078125,
0.00009679794311523438,
0.0001958608627319336,
-0.0229644775390625,
-0.008941650390625,
0.009857177734375,
0.040283203125,
0.01192474365234375,
0.0006909370422363281,
-0.028533935546875,
0.0087890625,
0.00901031494140625,
-0.0190277099609375,
0.01000213623046875,
0.004886627197265625,
-0.017730712890625,
-0.046630859375,
0.007293701171875,
0.00620269775390625,
-0.0205230712890625,
-0.02850341796875,
0.0163116455078125,
0.061187744140625,
0.018890380859375,
0.015625,
-0.053985595703125,
0.0006041526794433594,
0.01800537109375,
-0.0755615234375,
-0.0369873046875,
-0.00699615478515625,
0.002513885498046875,
0.0421142578125,
0.039154052734375,
0.0230560302734375,
-0.06561279296875,
-0.006687164306640625,
-0.0092010498046875,
0.06982421875,
-0.036102294921875,
-0.0142974853515625,
0.009765625,
-0.01519012451171875,
0.00894927978515625,
-0.00463104248046875,
0.0257568359375,
-0.03955078125,
-0.0190277099609375,
-0.006198883056640625,
-0.03460693359375,
-0.01016998291015625,
-0.007419586181640625,
-0.0268707275390625,
0.038330078125,
-0.017303466796875,
-0.002147674560546875,
-0.002685546875,
0.02423095703125,
0.0182342529296875,
0.0266571044921875,
-0.058837890625,
0.09490966796875,
-0.022918701171875,
0.06097412109375,
-0.04669189453125,
0.0095367431640625,
0.0323486328125,
-0.00768280029296875,
0.08740234375,
0.033935546875,
-0.05908203125,
-0.054931640625,
-0.0251617431640625,
-0.0184326171875,
-0.041259765625,
0.07965087890625,
-0.02520751953125,
0.0347900390625,
0.039459228515625,
-0.038360595703125,
0.0289306640625,
-0.0029430389404296875,
-0.050079345703125,
-0.01605224609375,
0.0106201171875,
-0.00952911376953125,
0.01294708251953125,
0.056243896484375,
-0.057525634765625,
0.00592803955078125,
0.044677734375,
-0.0159454345703125,
0.00342559814453125,
0.01715087890625,
0.00408935546875,
0.033447265625,
0.0255279541015625,
-0.0029430389404296875,
0.04046630859375,
-0.0019025802612304688,
0.018157958984375,
0.033935546875,
0.0084381103515625,
0.0269927978515625,
-0.001865386962890625,
0.017059326171875,
0.0199432373046875,
-0.0158233642578125,
0.050323486328125,
0.005523681640625,
0.00945281982421875,
-0.0477294921875,
0.0278778076171875,
-0.0009927749633789062,
0.05224609375,
-0.055145263671875,
-0.03741455078125,
0.0163726806640625,
0.0312347412109375,
0.0302734375,
0.036376953125,
0.0621337890625,
0.007476806640625,
0.048614501953125,
-0.0599365234375,
0.032958984375,
0.0438232421875,
0.008758544921875,
-0.0006499290466308594,
0.0238494873046875,
-0.06805419921875,
0.0171661376953125,
-0.034210205078125,
-0.01849365234375,
0.016693115234375,
-0.0279083251953125,
0.0295562744140625,
-0.0236358642578125,
0.1173095703125,
0.0156402587890625,
-0.01398468017578125,
0.037322998046875,
0.0113525390625,
0.0017461776733398438,
-0.0279083251953125,
-0.0286865234375,
0.01355743408203125,
0.027374267578125,
-0.0076446533203125,
-0.0142822265625,
0.0179595947265625,
0.034210205078125,
-0.0197296142578125,
-0.01824951171875,
0.040771484375,
-0.0170440673828125,
0.014556884765625,
-0.055572509765625,
0.06842041015625,
0.040283203125,
0.0283966064453125,
0.0004551410675048828,
0.0041961669921875,
0.0692138671875,
0.01519775390625,
0.027374267578125,
0.004856109619140625,
-0.00580596923828125,
0.025299072265625,
0.0102691650390625,
0.01331329345703125,
0.048004150390625,
-0.060791015625,
-0.03350830078125,
-0.01377105712890625,
-0.0079803466796875,
0.011505126953125,
0.031890869140625,
-0.0022945404052734375,
0.0101470947265625,
-0.0185699462890625,
-0.00982666015625,
0.0250091552734375,
-0.0242462158203125,
0.00923919677734375,
0.029541015625,
-0.0004260540008544922,
-0.0032215118408203125,
0.005462646484375,
0.02178955078125,
0.0251617431640625,
-0.025390625,
0.0166778564453125,
0.00466156005859375,
0.0330810546875,
0.019134521484375,
-0.0224456787109375,
0.01470184326171875,
-0.01224517822265625,
0.0003998279571533203,
-0.01256561279296875,
0.024169921875,
0.01309967041015625,
-0.0174713134765625,
-0.028289794921875,
0.06329345703125,
0.00952911376953125,
0.00853729248046875,
0.04486083984375,
0.004852294921875,
-0.002513885498046875,
-0.01328277587890625,
-0.020904541015625,
-0.043426513671875,
-0.049163818359375,
-0.022674560546875,
0.00695037841796875,
0.0056610107421875,
0.0105743408203125,
-0.0005207061767578125,
0.0155792236328125,
-0.043487548828125,
-0.0509033203125,
-0.004150390625,
-0.027496337890625,
-0.05218505859375,
0.00038242340087890625,
0.053436279296875,
0.068603515625,
0.03350830078125,
-0.02532958984375,
0.039215087890625,
0.0030269622802734375,
-0.0199127197265625,
0.032501220703125,
-0.0249176025390625,
0.0177459716796875,
0.050048828125,
0.038909912109375,
0.00232696533203125,
0.00757598876953125,
0.046661376953125,
-0.0267181396484375,
0.0186920166015625,
-0.036224365234375,
-0.0234527587890625,
-0.0311737060546875,
-0.015167236328125,
0.0157928466796875,
-0.0198516845703125,
-0.043670654296875,
-0.044921875,
-0.002674102783203125,
0.0197296142578125,
-0.0064849853515625,
-0.0155792236328125,
0.01483154296875,
-0.0178985595703125,
0.0091552734375,
-0.01181793212890625,
-0.007354736328125,
0.006511688232421875,
0.0328369140625,
-0.03155517578125,
-0.0233154296875,
-0.01319122314453125,
0.0300750732421875,
-0.01192474365234375,
0.0007119178771972656,
0.0396728515625,
0.00353240966796875,
-0.0587158203125,
0.00827789306640625,
-0.0307769775390625,
0.052520751953125,
-0.0391845703125,
-0.025665283203125,
-0.01399993896484375,
0.00345611572265625,
0.00595855712890625,
-0.0396728515625,
0.012664794921875,
-0.055511474609375,
-0.0183258056640625,
-0.0029964447021484375,
-0.0161590576171875,
0.003955841064453125,
-0.056396484375,
-0.08837890625,
0.061614990234375,
-0.0213165283203125,
-0.043731689453125,
-0.03265380859375,
-0.0017118453979492188,
0.01064300537109375,
-0.0211944580078125,
-0.01233673095703125,
-0.022918701171875,
-0.026702880859375,
0.032989501953125,
0.00382232666015625,
0.012115478515625,
-0.0022144317626953125,
0.03643798828125,
-0.06951904296875,
0.0096435546875,
-0.0012111663818359375,
-0.0009284019470214844,
-0.0109100341796875,
0.0164031982421875,
0.0113677978515625,
0.046112060546875,
-0.0273895263671875,
0.0031032562255859375,
-0.01291656494140625,
0.0020732879638671875,
-0.01727294921875,
-0.05572509765625,
0.007595062255859375,
-0.0092620849609375,
0.041107177734375,
0.018157958984375,
0.0036525726318359375,
-0.0177154541015625,
-0.06915283203125,
-0.0775146484375,
0.043701171875,
-0.032379150390625,
-0.0115814208984375,
-0.08819580078125,
-0.008148193359375,
0.03851318359375,
-0.00311279296875,
-0.02252197265625,
-0.0082244873046875,
-0.01152801513671875,
-0.002513885498046875,
0.0623779296875,
0.0198974609375,
0.01555633544921875,
-0.048187255859375,
0.00493621826171875,
-0.00545501708984375,
-0.0272216796875,
0.00345611572265625,
0.031585693359375,
-0.03387451171875,
0.0227508544921875,
0.031494140625,
0.00531005859375,
-0.0290374755859375,
0.0027942657470703125,
0.0178985595703125,
0.007228851318359375,
-0.0171966552734375,
-0.031494140625,
0.002170562744140625,
0.031219482421875,
0.00848388671875,
0.02081298828125,
-0.026611328125,
0.051025390625,
0.0038852691650390625,
0.020172119140625,
0.0025310516357421875,
-0.0171661376953125,
-0.0228424072265625,
0.049957275390625,
0.013885498046875,
-0.03155517578125,
0.022003173828125,
-0.0225677490234375,
-0.00386810302734375,
-0.032867431640625,
0.05596923828125,
-0.06256103515625,
0.04681396484375,
-0.06134033203125,
0.01352691650390625,
0.038604736328125
]
|
77fbfbd52b80471a06cfdd533a71fb4950d18bbd | Wordpress Stackexchange
Q: ThickBox replacement I'm searching, unsuccessfully unfortunately, for a ThickBox replacement used in Media Uploader.
Any search fails on how to leverage Media Uploader and nothing about a script used for modal windows.
Can somebody help me? Is there a way to use the same modal as Media Uploader is using, but to put custom content in it like it was possible with ThickBox?
A: For what it's worth, I have integrated the new media uploader in a plugin which allows the admin to select or upload media from the standard media dialog instead of having to copy/paste URLs, and it seems to work well.
I posted an answer here that might be what you're looking for.
Tom McFarlin has a tuts+ series in the works as of last month.
Other links that may help:
*
*How to use WordPress 3.5 Media Uploader in Theme Options
*Display Media Uploader in Own Plugin on Wordpress 3.5
| Q: ThickBox replacement I'm searching, unsuccessfully unfortunately, for a ThickBox replacement used in Media Uploader.
Any search fails on how to leverage Media Uploader and nothing about a script used for modal windows.
Can somebody help me? Is there a way to use the same modal as Media Uploader is using, but to put custom content in it like it was possible with ThickBox?
A: For what it's worth, I have integrated the new media uploader in a plugin which allows the admin to select or upload media from the standard media dialog instead of having to copy/paste URLs, and it seems to work well.
I posted an answer here that might be what you're looking for.
Tom McFarlin has a tuts+ series in the works as of last month.
Other links that may help:
*
*How to use WordPress 3.5 Media Uploader in Theme Options
*Display Media Uploader in Own Plugin on Wordpress 3.5
A: My understanding of your question is that you want to use a popup that has contents other than Media Uploader. To achieve this follow these steps:
*
*Add this code to include the thickbox script.
<?php
add_action('init', 'init_theme_method');
function init_theme_method() {
add_thickbox();
}
?>
*Add class='thickbox' to any clickable element that will show the popup.
<input alt="#TB_inline?height=300&width=400&inlineId=examplePopup1" title="add a caption to title attribute / or leave blank" class="thickbox" type="button" value="Show Thickbox Example Pop-up 1" />
*Notice in the last code there is inlineId parameter. This will be the code to be displayed inside popup box.
<div id="examplePopup1" style="display:none">
<h2>Example Pop-up Window 1</h2>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sed laoreet est. Etiam nec nibh aliquam leo maximus hendrerit. Aliquam velit erat, pretium eget faucibus ut, ullamcorper in sapien. Nulla dignissim turpis et pharetra vestibulum. Nulla et mattis eros. Integer consequat, odio sed gravida bibendum, dui purus viverra nisl, nec fringilla ante nibh non lorem. Morbi at tristique diam. Mauris et aliquam tellus, vehicula dapibus odio. Maecenas vulputate turpis ac orci fringilla, id cursus augue mollis. Aliquam sit amet ligula tellus.
<strong>Just click outside the pop-up to close it.</strong>
</div>
I hope this helps
Source: Create Pop-up Windows in Your WordPress Blog with Thickbox
| wordpress | {
"language": "en",
"length": 362,
"provenance": "stackexchange_00019.jsonl.gz:439523",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124277"
} | [
0.0196075439453125,
-0.00838470458984375,
0.004489898681640625,
-0.01271820068359375,
-0.00323486328125,
-0.0174560546875,
0.0242462158203125,
-0.0129547119140625,
0.0333251953125,
0.00968170166015625,
-0.0158843994140625,
0.00678253173828125,
0.015960693359375,
-0.03662109375,
0.004154205322265625,
0.0019969940185546875,
0.03619384765625,
-0.0135955810546875,
0.0273895263671875,
-0.0457763671875,
0.016754150390625,
-0.021453857421875,
0.0704345703125,
0.068603515625,
0.0257568359375,
0.0141754150390625,
0.037139892578125,
-0.00394439697265625,
-0.004001617431640625,
-0.0287628173828125,
0.0213470458984375,
-0.0016326904296875,
0.00850677490234375,
0.043487548828125,
-0.05035400390625,
-0.0207061767578125,
-0.002330780029296875,
0.02325439453125,
0.0198822021484375,
0.0018720626831054688,
-0.0024204254150390625,
0.0162353515625,
0.0302886962890625,
0.0073394775390625,
-0.002346038818359375,
-0.022613525390625,
0.004390716552734375,
-0.0300140380859375,
0.0479736328125,
-0.0037174224853515625,
0.00891876220703125,
0.01776123046875,
0.01311492919921875,
-0.0016222000122070312,
-0.0227508544921875,
-0.0145111083984375,
-0.0159149169921875,
0.019744873046875,
0.01146697998046875,
0.0287933349609375,
-0.002193450927734375,
0.041229248046875,
-0.0101470947265625,
-0.006740570068359375,
-0.0211639404296875,
-0.0210723876953125,
-0.033599853515625,
-0.0006833076477050781,
-0.0496826171875,
-0.039093017578125,
0.03271484375,
-0.020904541015625,
0.0103607177734375,
-0.0234832763671875,
-0.046783447265625,
0.030426025390625,
-0.0263671875,
-0.04058837890625,
0.04296875,
-0.039947509765625,
0.00460052490234375,
0.046356201171875,
0.017669677734375,
-0.04266357421875,
0.02191162109375,
-0.020050048828125,
-0.01470947265625,
-0.0131988525390625,
-0.020904541015625,
0.006786346435546875,
-0.0177764892578125,
-0.03167724609375,
0.005977630615234375,
0.0145721435546875,
-0.021270751953125,
-0.01009368896484375,
-0.024810791015625,
-0.0240936279296875,
0.0073089599609375,
-0.0105438232421875,
0.004047393798828125,
-0.0238800048828125,
-0.0134124755859375,
-0.01181793212890625,
0.0176544189453125,
0.00995635986328125,
-0.01377105712890625,
-0.07415771484375,
0.010467529296875,
0.01335906982421875,
-0.0308837890625,
0.0148773193359375,
0.01380157470703125,
0.0081329345703125,
-0.0250244140625,
0.012420654296875,
0.007099151611328125,
0.0035800933837890625,
-0.0129547119140625,
0.029510498046875,
-0.00952911376953125,
0.01467132568359375,
-0.0023021697998046875,
-0.00659942626953125,
0.0131072998046875,
-0.0035953521728515625,
-0.004909515380859375,
-0.0031452178955078125,
0.00437164306640625,
-0.011871337890625,
-0.0189971923828125,
0.01776123046875,
0.0318603515625,
0.03924560546875,
0.020111083984375,
-0.004222869873046875,
0.0228424072265625,
-0.022064208984375,
0.04150390625,
-0.018341064453125,
0.05548095703125,
-0.01959228515625,
-0.01010894775390625,
0.04376220703125,
-0.004161834716796875,
0.046356201171875,
0.0246124267578125,
-0.021484375,
-0.0257568359375,
-0.07037353515625,
-0.003185272216796875,
-0.01306915283203125,
0.04302978515625,
0.00725555419921875,
0.0091552734375,
-0.00978851318359375,
0.0872802734375,
-0.046600341796875,
-0.04132080078125,
-0.060791015625,
-0.00010734796524047852,
0.00565338134765625,
0.046173095703125,
-0.007160186767578125,
0.0013904571533203125,
-0.0152130126953125,
-0.048370361328125,
0.0100250244140625,
0.0270538330078125,
-0.0168914794921875,
0.03179931640625,
-0.035369873046875,
-0.01971435546875,
0.0216522216796875,
0.0224609375,
0.034149169921875,
0.0306243896484375,
0.09423828125,
0.0079193115234375,
0.0149993896484375,
-0.0019130706787109375,
-0.04901123046875,
0.1434326171875,
-0.06439208984375,
-0.0394287109375,
0.01436614990234375,
0.034423828125,
0.046234130859375,
-0.00278472900390625,
0.0164337158203125,
0.052001953125,
0.0119476318359375,
-0.017913818359375,
-0.004093170166015625,
0.0258331298828125,
-0.0164642333984375,
-0.0235595703125,
-0.0165557861328125,
0.012786865234375,
-0.0005130767822265625,
-0.01383209228515625,
0.0147705078125,
0.00543212890625,
0.0302581787109375,
-0.0218048095703125,
0.038299560546875,
-0.0174560546875,
0.019927978515625,
-0.03594970703125,
-0.0028209686279296875,
0.029266357421875,
0.020263671875,
-0.0311126708984375,
-0.01029205322265625,
0.00775909423828125,
0.01317596435546875,
-0.017333984375,
0.038299560546875,
0.0000928044319152832,
0.061126708984375,
-0.034088134765625,
0.01508331298828125,
-0.0211334228515625,
-0.0236358642578125,
0.00428009033203125,
0.02777099609375,
-0.0282745361328125,
0.01515960693359375,
-0.0123748779296875,
0.010772705078125,
-0.003955841064453125,
0.03204345703125,
-0.00821685791015625,
0.01183319091796875,
-0.018951416015625,
-0.0240020751953125,
-0.036895751953125,
-0.091064453125,
0.01284027099609375,
0.07073974609375,
0.030364990234375,
0.040374755859375,
0.04364013671875,
0.0546875,
0.061065673828125,
0.0030078887939453125,
0.0222320556640625,
-0.0014715194702148438,
-0.0228424072265625,
0.042205810546875,
-0.017974853515625,
0.0035648345947265625,
0.0011444091796875,
-0.0211029052734375,
-0.01531982421875,
0.0311737060546875,
0.01213836669921875,
0.0294342041015625,
0.00814056396484375,
-0.01078033447265625,
-0.01297760009765625,
-0.0016632080078125,
-0.007495880126953125,
-0.0162200927734375,
-0.004413604736328125,
-0.00238800048828125,
0.028411865234375,
0.02099609375,
-0.01389312744140625,
0.00353240966796875,
0.007415771484375,
-0.0233917236328125,
-0.00768280029296875,
0.0009851455688476562,
0.043853759765625,
0.036865234375,
-0.0229949951171875,
-0.023590087890625,
0.03924560546875,
0.019989013671875,
-0.006076812744140625,
-0.00020253658294677734,
-0.0767822265625,
-0.01354217529296875,
0.00099945068359375,
-0.0582275390625,
-0.01132965087890625,
0.0226593017578125,
0.0131378173828125,
-0.0027675628662109375,
0.037811279296875,
0.000579833984375,
-0.04705810546875,
0.06439208984375,
-0.029998779296875,
-0.040771484375,
-0.025848388671875,
-0.057220458984375,
0.0377197265625,
-0.01445770263671875,
0.07904052734375,
0.09747314453125,
0.01071929931640625,
0.033203125,
-0.006317138671875,
0.01229095458984375,
-0.033782958984375,
0.044769287109375,
0.01556396484375,
-0.01380157470703125,
-0.0496826171875,
-0.029052734375,
0.0102386474609375,
0.01216888427734375,
-0.007503509521484375,
-0.024078369140625,
-0.0014362335205078125,
-0.00698089599609375,
-0.032989501953125,
0.000048160552978515625,
0.0107574462890625,
-0.10491943359375,
0.006591796875,
-0.01306915283203125,
-0.05963134765625,
-0.0224151611328125,
0.047454833984375,
0.005504608154296875,
0.01496124267578125,
0.0006246566772460938,
0.00727081298828125,
0.00005841255187988281,
-0.03924560546875,
-0.06549072265625,
0.00933074951171875,
0.00629425048828125,
-0.0036640167236328125,
-0.0073699951171875,
-0.0118560791015625,
-0.0189361572265625,
0.014495849609375,
0.017608642578125,
0.006870269775390625,
-0.01329803466796875,
0.06201171875,
-0.048614501953125,
-0.0210723876953125,
0.00008589029312133789,
0.022735595703125,
0.035003662109375,
-0.03515625,
-0.008514404296875,
-0.02801513671875,
-0.05999755859375,
-0.042388916015625,
0.05859375,
0.048583984375,
-0.047271728515625,
-0.005939483642578125,
-0.05999755859375,
0.045135498046875,
0.01552581787109375,
0.0087890625,
-0.0218963623046875,
-0.0208892822265625,
-0.042236328125,
0.014801025390625,
-0.0197296142578125,
0.00609588623046875,
0.0357666015625,
-0.013916015625,
-0.020538330078125,
-0.036285400390625,
0.01509857177734375,
0.0216522216796875,
0.0304718017578125,
-0.036285400390625,
-0.046478271484375,
0.00833892822265625,
-0.0263214111328125,
-0.011505126953125,
-0.0150299072265625,
0.049652099609375,
0.01800537109375,
-0.037689208984375,
0.04150390625,
-0.008392333984375,
0.052978515625,
-0.046417236328125,
-0.03692626953125,
-0.01395416259765625,
0.1085205078125,
-0.050994873046875,
-0.006793975830078125,
0.005352020263671875,
0.0008115768432617188,
0.0167694091796875,
-0.025238037109375,
-0.042083740234375,
-0.0151824951171875,
-0.019989013671875,
-0.01131439208984375,
-0.00138092041015625,
-0.0172271728515625,
-0.0167083740234375,
-0.0022640228271484375,
-0.03155517578125,
-0.0293426513671875,
0.04150390625,
-0.063232421875,
0.008209228515625,
-0.0014371871948242188,
-0.01142120361328125,
-0.045074462890625,
-0.0100250244140625,
-0.034027099609375,
-0.10797119140625,
-0.0133514404296875,
-0.01277923583984375,
0.03240966796875,
-0.0139923095703125,
-0.003551483154296875,
-0.060546875,
0.023040771484375,
0.04931640625,
0.02874755859375,
0.0085601806640625,
-0.0313720703125,
0.06719970703125,
-0.0426025390625,
-0.007137298583984375,
-0.025665283203125,
-0.0091400146484375,
-0.069091796875,
-0.039703369140625,
-0.027099609375,
-0.0192108154296875,
0.034332275390625,
-0.00833892822265625,
-0.0035610198974609375,
-0.0386962890625,
-0.01837158203125,
-0.036224365234375,
-0.00923919677734375,
-0.0184326171875,
-0.01641845703125,
-0.00659942626953125,
-0.044036865234375,
-0.00200653076171875,
0.026336669921875,
-0.00426483154296875,
0.01236724853515625,
0.035369873046875,
0.022186279296875,
-0.016754150390625,
-0.045654296875,
-0.0144500732421875,
0.036376953125,
0.004238128662109375,
-0.020965576171875,
-0.0212554931640625,
-0.06048583984375,
0.050140380859375,
0.002590179443359375,
0.0183868408203125,
-0.0225067138671875,
0.035308837890625,
0.02490234375,
0.005161285400390625,
0.002227783203125,
0.0096893310546875,
-0.0220489501953125,
-0.0164031982421875,
-0.0200347900390625,
0.031280517578125,
-0.01491546630859375,
0.0125885009765625,
0.022613525390625,
-0.0311737060546875,
-0.04412841796875,
-0.0657958984375,
0.0217132568359375,
-0.045745849609375,
0.031524658203125,
-0.018157958984375,
0.016876220703125,
0.05731201171875,
0.04913330078125,
0.006439208984375,
0.0245208740234375,
0.0033416748046875,
0.0025234222412109375,
0.058807373046875,
-0.00010728836059570312,
0.01024627685546875,
0.00917816162109375,
0.027252197265625,
-0.04852294921875,
0.0011720657348632812,
-0.0103607177734375,
-0.061676025390625,
0.00774383544921875,
0.0028533935546875,
0.005889892578125,
-0.004657745361328125,
0.0129547119140625,
0.05718994140625,
0.01349639892578125,
-0.008087158203125,
0.00986480712890625,
0.050079345703125,
-0.02801513671875,
0.005451202392578125,
0.021759033203125,
-0.024505615234375,
-0.026397705078125,
0.050048828125,
0.0009398460388183594,
-0.00969696044921875,
0.005542755126953125,
0.01549530029296875,
0.0168609619140625,
0.01509857177734375,
0.0223236083984375,
-0.0267791748046875,
0.0134124755859375,
-0.015960693359375,
0.0169677734375,
-0.0196990966796875,
0.0030879974365234375,
-0.0181884765625,
0.00855255126953125,
0.0084991455078125,
-0.004421234130859375,
0.0255279541015625,
-0.0169525146484375,
-0.018402099609375,
-0.0178070068359375,
-0.02435302734375,
-0.016510009765625,
-0.01090240478515625,
-0.0194854736328125,
-0.0103302001953125,
0.0221405029296875,
-0.02239990234375,
-0.012908935546875,
-0.0533447265625,
-0.04925537109375,
-0.0242462158203125,
-0.0679931640625,
0.0150299072265625,
0.046417236328125,
0.0275115966796875,
-0.0210113525390625,
0.0005998611450195312,
-0.054412841796875,
-0.006130218505859375,
-0.03179931640625,
0.00766754150390625,
0.05889892578125,
-0.0345458984375,
0.01323699951171875,
-0.005405426025390625,
-0.0213775634765625,
-0.0718994140625,
0.0345458984375,
-0.0093994140625,
0.00824737548828125,
0.0257415771484375,
-0.027862548828125,
-0.004711151123046875,
-0.038970947265625,
-0.05206298828125,
-0.0229034423828125,
-0.025421142578125,
-0.003299713134765625,
-0.02032470703125,
0.0302276611328125,
-0.0209808349609375,
0.0036296844482421875,
0.0233154296875,
0.0191192626953125,
-0.0172271728515625,
0.0645751953125,
-0.01406097412109375,
-0.00597381591796875,
0.049407958984375,
0.03570556640625,
0.01515960693359375,
-0.00841522216796875,
-0.0099945068359375,
-0.035400390625,
-0.014678955078125,
-0.048370361328125,
-0.0240325927734375,
0.0194091796875,
-0.0138702392578125,
0.064453125,
0.04693603515625,
0.00475311279296875,
0.0252838134765625,
-0.0261688232421875,
0.01372528076171875,
-0.023468017578125,
0.0277557373046875,
-0.05816650390625,
-0.0246734619140625,
0.032806396484375,
-0.03741455078125,
-0.01300048828125,
0.01262664794921875,
0.0151214599609375,
0.0156707763671875,
-0.021453857421875,
0.0011777877807617188,
0.0009527206420898438,
-0.0272674560546875,
0.05780029296875,
0.07403564453125,
0.0309600830078125,
0.04315185546875,
0.00537109375,
0.0055999755859375,
-0.0023365020751953125,
-0.016357421875,
-0.0020351409912109375,
0.0005669593811035156,
0.0572509765625,
0.0025005340576171875,
-0.006786346435546875,
0.0623779296875,
-0.01654052734375,
0.00794219970703125,
-0.0243072509765625,
0.0279998779296875,
0.0128326416015625,
0.01128387451171875,
0.0014219284057617188,
-0.0211639404296875,
0.00469970703125,
-0.034912109375,
0.0023365020751953125,
-0.0226593017578125,
0.007488250732421875,
0.0137939453125,
-0.05181884765625,
-0.019287109375,
-0.01148223876953125,
-0.00586700439453125,
0.01245880126953125,
-0.004482269287109375,
0.001987457275390625,
-0.0322265625,
0.0016260147094726562,
0.00681304931640625,
0.034698486328125,
0.0175018310546875,
0.034698486328125,
-0.054351806640625,
0.012939453125,
-0.006809234619140625,
-0.01078033447265625,
-0.035736083984375,
0.00196075439453125,
0.01377105712890625,
0.0047607421875,
0.049041748046875,
0.029266357421875,
0.0036106109619140625,
0.0018711090087890625,
-0.00765228271484375,
0.023773193359375,
0.00672149658203125,
-0.0178985595703125,
0.033355712890625,
0.032379150390625,
-0.08270263671875,
0.0154571533203125,
-0.0240936279296875,
-0.006664276123046875,
0.01401519775390625,
0.0479736328125,
0.04168701171875,
-0.024932861328125,
-0.0310211181640625,
0.03546142578125,
-0.04656982421875,
-0.0030574798583984375,
0.00780487060546875,
0.034820556640625,
-0.0904541015625,
-0.077880859375,
0.021697998046875,
-0.058258056640625,
-0.0028781890869140625,
0.027435302734375,
-0.0899658203125,
0.1490478515625,
0.06488037109375,
0.0202789306640625,
-0.0031566619873046875,
0.06341552734375,
-0.07177734375,
0.006072998046875,
-0.01995849609375,
-0.0163116455078125,
-0.052520751953125,
0.0187530517578125,
-0.0297698974609375,
0.004718780517578125,
-0.010040283203125,
0.0195465087890625,
0.00513458251953125,
-0.00835418701171875,
-0.026092529296875,
0.00724029541015625,
0.06640625,
0.031982421875,
0.0280914306640625,
0.0257568359375,
0.0031757354736328125,
0.041748046875,
0.0352783203125,
-0.05206298828125,
0.02435302734375,
-0.018524169921875,
-0.01299285888671875,
0.006351470947265625,
0.018402099609375,
0.03070068359375,
0.019287109375,
0.03668212890625,
-0.0265960693359375,
0.000881195068359375,
0.036163330078125,
-0.04632568359375,
0.0053558349609375,
0.0567626953125,
-0.005283355712890625,
0.00815582275390625,
0.0176849365234375,
-0.0298309326171875,
0.0307464599609375,
-0.033172607421875,
-0.00409698486328125,
0.0007758140563964844,
0.01197052001953125,
-0.0408935546875,
-0.0165252685546875,
-0.0256195068359375,
0.0062408447265625,
0.0015115737915039062,
0.00516510009765625,
-0.01178741455078125,
0.00571441650390625,
-0.038848876953125,
0.011077880859375,
0.0465087890625,
0.01502227783203125,
-0.01873779296875,
-0.0296783447265625,
-0.00908660888671875,
-0.016510009765625,
0.0157470703125,
-0.01113128662109375,
0.02142333984375,
-0.02593994140625,
-0.0264129638671875,
-0.0177001953125,
0.0015783309936523438,
0.02166748046875,
0.019989013671875,
0.003826141357421875,
0.020050048828125,
-0.037078857421875,
-0.01548004150390625,
0.005702972412109375,
0.007354736328125,
-0.0292510986328125,
0.0010929107666015625,
-0.00373077392578125,
0.019866943359375,
-0.03607177734375,
0.0102386474609375,
-0.00357818603515625,
0.00418853759765625,
0.0205078125,
0.00782012939453125,
-0.0182342529296875,
-0.0195159912109375,
0.048553466796875,
0.033111572265625,
0.0071868896484375,
0.08892822265625,
0.06585693359375,
0.04510498046875,
0.024871826171875,
0.00943756103515625,
0.02154541015625,
-0.021697998046875,
-0.0208282470703125,
-0.0226287841796875,
-0.0152130126953125,
0.0198974609375,
0.0072021484375,
-0.023773193359375,
-0.00861358642578125,
0.051177978515625,
0.007373809814453125,
0.056732177734375,
-0.003734588623046875,
0.00681304931640625,
0.01287841796875,
-0.01385498046875,
0.07373046875,
0.0187530517578125,
-0.041351318359375,
-0.0313720703125,
0.004825592041015625,
0.016937255859375,
-0.0108642578125,
0.020660400390625,
-0.015472412109375,
0.02911376953125,
-0.029022216796875,
-0.0060272216796875,
-0.01373291015625,
-0.01016998291015625,
0.01445770263671875,
-0.0271148681640625,
-0.00958251953125,
-0.0093536376953125,
-0.0098876953125,
-0.0228729248046875,
0.029510498046875,
0.032989501953125,
-0.01739501953125,
0.046783447265625,
-0.0142059326171875,
-0.007171630859375,
-0.0013208389282226562,
0.00820159912109375,
-0.00698089599609375,
0.02484130859375,
-0.05157470703125,
0.01611328125,
0.0214385986328125,
-0.018096923828125,
0.03851318359375,
0.0269012451171875,
0.0303802490234375,
-0.02294921875,
-0.0308380126953125,
0.01508331298828125,
0.0125885009765625,
0.034332275390625,
-0.026153564453125,
-0.03460693359375,
-0.00914764404296875,
0.043304443359375,
-0.006168365478515625,
-0.008575439453125,
-0.002536773681640625,
0.040679931640625,
0.029205322265625,
0.0034160614013671875,
0.00772857666015625,
0.0017032623291015625,
0.00847625732421875,
-0.00815582275390625,
0.023773193359375,
-0.031585693359375,
-0.045501708984375,
-0.000347137451171875,
-0.003658294677734375,
-0.01416015625,
0.01548004150390625,
0.01506805419921875,
0.029541015625,
-0.08587646484375,
0.0611572265625,
-0.0020294189453125,
0.017608642578125,
-0.0513916015625,
-0.01439666748046875,
0.053497314453125,
0.0135650634765625,
0.0197601318359375,
-0.061553955078125,
-0.0121612548828125,
-0.0204925537109375,
-0.032196044921875,
0.04620361328125,
-0.042816162109375,
-0.0015306472778320312,
-0.08782958984375,
-0.006923675537109375,
-0.0007505416870117188,
0.0123138427734375,
-0.0665283203125,
0.0280914306640625,
0.0139617919921875,
0.006748199462890625,
-0.03509521484375,
0.01155853271484375,
-0.0068511962890625,
0.0214691162109375,
-0.0229644775390625,
-0.031646728515625,
-0.032684326171875,
0.037078857421875,
-0.0222625732421875,
0.0294647216796875,
0.024383544921875,
-0.0406494140625,
-0.01477813720703125,
0.054229736328125,
0.04705810546875,
0.1009521484375,
-0.0026683807373046875,
-0.0205841064453125,
-0.0289459228515625,
0.026641845703125,
-0.0012054443359375,
0.0199127197265625,
0.019378662109375,
-0.009368896484375,
-0.0211181640625,
0.0166015625,
-0.030609130859375,
-0.01309967041015625,
-0.04718017578125,
-0.091552734375,
-0.01922607421875,
0.01102447509765625,
-0.056365966796875,
-0.01111602783203125,
0.00005435943603515625,
-0.01163482666015625,
0.026336669921875,
-0.008148193359375,
-0.001148223876953125,
-0.0023326873779296875,
0.030517578125,
-0.01226043701171875,
0.0341796875,
-0.00765228271484375,
-0.005908966064453125,
-0.029388427734375,
0.017059326171875,
0.01146697998046875,
-0.0035610198974609375,
0.0141143798828125,
-0.0016145706176757812,
0.006656646728515625,
0.0194549560546875,
-0.0258331298828125,
-0.024993896484375,
-0.0241546630859375,
-0.03363037109375,
-0.0019407272338867188,
0.04388427734375,
-0.0162200927734375,
0.0164642333984375,
0.039764404296875,
0.0859375,
0.0032978057861328125,
-0.0374755859375,
0.0100250244140625,
0.0028533935546875,
-0.01837158203125,
-0.014373779296875,
0.00814056396484375,
-0.0595703125,
-0.033538818359375,
0.007320404052734375,
-0.006725311279296875,
-0.002315521240234375,
-0.01018524169921875,
-0.006175994873046875,
-0.018157958984375,
-0.00972747802734375,
-0.0258941650390625,
0.0176544189453125,
0.03057861328125,
0.131591796875,
-0.05523681640625,
0.0182952880859375,
0.0309600830078125,
-0.01448822021484375,
0.08099365234375,
0.0016603469848632812,
0.0166473388671875,
-0.0220184326171875,
-0.0260467529296875,
0.035400390625,
0.00019311904907226562,
0.0313720703125,
-0.0269775390625,
-0.0416259765625,
-0.00739288330078125,
0.0161285400390625,
-0.00775909423828125,
0.032562255859375,
0.004093170166015625,
0.0061798095703125,
-0.011627197265625,
0.06927490234375,
-0.02728271484375,
-0.0867919921875,
-0.04034423828125,
0.0037059783935546875,
0.0232696533203125,
0.0006375312805175781,
0.07757568359375,
-0.049224853515625,
0.023956298828125,
-0.023162841796875,
-0.016204833984375,
-0.01092529296875,
-0.0021381378173828125,
0.01465606689453125,
-0.0521240234375,
0.0056304931640625
]
|
f75f36d9fb0a48b79488a8c5d50e19d53d6a37ce | Wordpress Stackexchange
Q: Remove settings if theme is deleted? Is it possible to perform an action only if the theme is deleted (not deactivated) from the theme directory ?
For example, I want to remove the theme settings from database after the theme is removed. So I want to run this when the theme is deleted:
delete_option( 'mysettings' );
A: As the other answers seem to imply, there is no built-in way to do this. There is no theme uninstall API similar to that for plugins. There is actually a long-standing ticket to get this feature added to WordPress core, so that themes can uninstall themselves. The consensus from the lead developers there seems to be that this isn't a feature that want themes to have. I'm not sure what the rationale for that is. Maybe you can help explain to them the benefits of it.
| Q: Remove settings if theme is deleted? Is it possible to perform an action only if the theme is deleted (not deactivated) from the theme directory ?
For example, I want to remove the theme settings from database after the theme is removed. So I want to run this when the theme is deleted:
delete_option( 'mysettings' );
A: As the other answers seem to imply, there is no built-in way to do this. There is no theme uninstall API similar to that for plugins. There is actually a long-standing ticket to get this feature added to WordPress core, so that themes can uninstall themselves. The consensus from the lead developers there seems to be that this isn't a feature that want themes to have. I'm not sure what the rationale for that is. Maybe you can help explain to them the benefits of it.
A: It is very complex to know which option was generated by your theme settings.
But if you follow name convension for example Woocommerce (All options created by Woocomerce have a name like woocommerce_* and woocommerce as the plugin directory name). It makes easy to search and delete theme options.
So for the theme options you could look for this:
If the current theme is called Deepfocus, it's option name should be like like deepfocus_*
If the current theme is Twenty Twelve, it's option name should be like like twentytwelve_*
Note:
I created a simple plugin ( WP-Delete-Theme-Option ) which follows these conventions to delete theme specific option.
Plugin generates option name from theme's directory name.
A: The only action/filter hook that I've found in this part of code is in
do_action( 'delete_site_transient_' . $transient, $transient );
It's called inside delete_site_transient('update_themes'); which is called in function delete_theme($stylesheet, $redirect = '') after the theme is successfully deleted.
So I would do this adding my action to delete_site_transient_update_themes.
In this action you can check some conditions (name of theme) and then delete some options.
Of course this code is called when the theme is inactive and after its directory is deleted from server. So you can't add this action inside that theme (it would be nice) and you have to place it in some plugin. (I'm not convinced if installing additional plugin just to be sure that theme options are deleted after that theme is deleted is a great idea).
A: I'm not sure if I understand the question, so I'm going to rephrase it first, but if I do, I have done a workaround for this.
Understanding the question as:
If the theme is deactivated, the site options are preserved so if activated again they don't need to be re-entered, but when deleted they are completely removed.
This is not a full answer because it speaks to the plugin deactivate versus uninstall hooks rather than theme, but assuming theme has something similar, what I did was this:
*
*On deactivate, I pushed the option settings into a small backup table.
*On activate, check to see if the backup table exists and if so, restore the option settings from the backup and drop the table (or just check for the row and delete the row). Make sure you name the table so it's clearly tied to the theme like the above notes on woocommerce. And always delete the settings after they're used so that you ensure the most recent settings are available.
*On delete, behave normally (which purges the option settings permanently).
This way the user doesn't have to redo the option settings if they have to deactivate to check for plugin and theme conflicts (as I recently had to do with a Woo theme).
A: it really totally depends on theme author I think...some do better garbage collection than others. I just got done going completely through my wp_options table trying to locate a cause...and in doing so, I found a TON of theme options for themes long since deleted and gone from the server. Luckily, the ones with the most options that I wanted to get rid of and clean up my table, the author had put a nice prefix on all 'his' files so they could be easily identified. Go into your table, and see if this is a case for you. If it is, then you can write an appropriate query.
Also, transients and site_transients are supposed to remove themselves after a certain time passes...this is not always the case either. I deleted pages and pages of those manually also.
I don't know if that answers the question. It looks like you want to generate a php function...I would do a mySql query and do it that way. (with db backups first, of course!)
| wordpress | {
"language": "en",
"length": 780,
"provenance": "stackexchange_00019.jsonl.gz:439590",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124499"
} | [
-0.00328826904296875,
0.005069732666015625,
-0.005847930908203125,
0.00913238525390625,
-0.00122833251953125,
-0.0198822021484375,
0.036346435546875,
-0.038848876953125,
0.032440185546875,
0.0297393798828125,
0.0023555755615234375,
-0.00582122802734375,
0.009857177734375,
-0.035491943359375,
-0.027679443359375,
-0.0024871826171875,
0.032379150390625,
-0.00830841064453125,
0.036651611328125,
-0.014495849609375,
0.007843017578125,
0.01004791259765625,
0.018341064453125,
0.06689453125,
0.01207733154296875,
0.0221405029296875,
0.06878662109375,
-0.0188751220703125,
-0.0238189697265625,
-0.044708251953125,
0.002300262451171875,
0.0218353271484375,
-0.0204620361328125,
0.025665283203125,
0.045196533203125,
0.0190277099609375,
0.029052734375,
0.0164947509765625,
0.0537109375,
-0.0184478759765625,
0.0288238525390625,
-0.0116119384765625,
0.00022280216217041016,
0.01898193359375,
-0.01727294921875,
-0.061431884765625,
0.051910400390625,
-0.044158935546875,
0.01329803466796875,
-0.0205078125,
0.01372528076171875,
-0.01404571533203125,
0.047882080078125,
-0.0443115234375,
-0.042083740234375,
-0.043212890625,
-0.0021076202392578125,
0.03448486328125,
0.028533935546875,
-0.0136566162109375,
-0.041900634765625,
0.00799560546875,
0.01531982421875,
-0.03173828125,
0.0203094482421875,
0.0037937164306640625,
-0.040985107421875,
0.026885986328125,
-0.08050537109375,
0.021270751953125,
0.047637939453125,
-0.07147216796875,
-0.00921630859375,
-0.0157623291015625,
0.018280029296875,
-0.0009064674377441406,
-0.0015687942504882812,
-0.0022373199462890625,
0.0150146484375,
0.0227813720703125,
0.0162200927734375,
0.006137847900390625,
-0.024932861328125,
-0.0157623291015625,
0.016357421875,
0.0184326171875,
0.005290985107421875,
-0.024993896484375,
-0.03460693359375,
-0.00885009765625,
-0.02996826171875,
-0.020843505859375,
-0.0181732177734375,
0.0170135498046875,
-0.0180816650390625,
0.0251312255859375,
0.02386474609375,
0.04571533203125,
-0.00594329833984375,
-0.016357421875,
0.015869140625,
-0.05218505859375,
-0.0008759498596191406,
-0.03021240234375,
-0.0193939208984375,
0.03509521484375,
0.0011959075927734375,
-0.053314208984375,
-0.0206451416015625,
0.0245819091796875,
-0.0150146484375,
-0.052703857421875,
0.005710601806640625,
-0.03143310546875,
-0.0214996337890625,
0.027008056640625,
-0.002490997314453125,
-0.00972747802734375,
0.00847625732421875,
-0.0006475448608398438,
-0.006931304931640625,
0.0133209228515625,
-0.04931640625,
-0.0169219970703125,
0.01110076904296875,
-0.0280914306640625,
-0.01471710205078125,
0.0235137939453125,
0.005405426025390625,
0.01538848876953125,
-0.03814697265625,
0.018585205078125,
0.053955078125,
0.0049896240234375,
-0.005168914794921875,
-0.027984619140625,
0.023162841796875,
0.022003173828125,
-0.0105438232421875,
-0.01702880859375,
0.0789794921875,
-0.017120361328125,
-0.046051025390625,
0.0216217041015625,
0.0090179443359375,
0.024749755859375,
0.01546478271484375,
0.01123046875,
0.0099334716796875,
-0.048126220703125,
-0.0023632049560546875,
-0.0190277099609375,
0.03466796875,
0.01027679443359375,
0.0199737548828125,
-0.0367431640625,
0.0574951171875,
-0.05438232421875,
-0.00780487060546875,
-0.064697265625,
-0.007781982421875,
-0.0283203125,
-0.0143585205078125,
0.0043487548828125,
-0.0287628173828125,
0.0494384765625,
-0.0071563720703125,
0.004367828369140625,
0.01214599609375,
0.00894927978515625,
-0.0236053466796875,
-0.034027099609375,
0.00830078125,
0.00667572021484375,
-0.00885009765625,
0.05078125,
0.0211334228515625,
-0.0104827880859375,
0.0216827392578125,
0.01556396484375,
-0.0124969482421875,
-0.036468505859375,
0.01247406005859375,
-0.00485992431640625,
-0.054962158203125,
0.004547119140625,
0.0225067138671875,
0.0728759765625,
0.020416259765625,
0.044677734375,
0.0201416015625,
-0.0234832763671875,
-0.002422332763671875,
-0.01137542724609375,
0.0050506591796875,
-0.0222015380859375,
-0.036834716796875,
-0.01366424560546875,
-0.00927734375,
0.0160064697265625,
0.0209197998046875,
-0.0149993896484375,
0.01486968994140625,
-0.0318603515625,
-0.0888671875,
-0.00922393798828125,
-0.0296783447265625,
0.036865234375,
-0.031280517578125,
0.016815185546875,
0.0217132568359375,
-0.003780364990234375,
-0.0190582275390625,
-0.03839111328125,
-0.0230255126953125,
-0.0007853507995605469,
-0.01457977294921875,
0.0190887451171875,
-0.0017757415771484375,
0.0287933349609375,
0.014434814453125,
-0.0161895751953125,
0.00522613525390625,
0.003963470458984375,
0.032928466796875,
-0.00933074951171875,
-0.004581451416015625,
-0.0250396728515625,
0.057220458984375,
-0.01398468017578125,
0.03253173828125,
0.0303192138671875,
-0.0037746429443359375,
-0.021514892578125,
-0.01374053955078125,
0.004680633544921875,
0.01494598388671875,
-0.09381103515625,
0.01245880126953125,
0.055023193359375,
0.0243988037109375,
0.036285400390625,
-0.042266845703125,
-0.036956787109375,
0.0479736328125,
-0.025909423828125,
-0.0038928985595703125,
0.00433349609375,
0.04962158203125,
0.055419921875,
0.006267547607421875,
-0.039886474609375,
-0.0030059814453125,
-0.008209228515625,
0.0036220550537109375,
0.0040435791015625,
-0.006103515625,
-0.024444580078125,
0.007770538330078125,
0.003017425537109375,
0.0005931854248046875,
-0.01904296875,
-0.03558349609375,
0.005229949951171875,
0.0411376953125,
-0.0141754150390625,
0.003414154052734375,
-0.0046234130859375,
-0.012237548828125,
0.0146942138671875,
0.0225067138671875,
-0.07049560546875,
0.000010609626770019531,
0.045013427734375,
0.021575927734375,
0.005352020263671875,
-0.027008056640625,
-0.0152740478515625,
-0.00469970703125,
0.024932861328125,
-0.0308074951171875,
-0.00757598876953125,
-0.042816162109375,
-0.0195159912109375,
-0.0011968612670898438,
-0.03857421875,
0.005184173583984375,
0.0091705322265625,
0.006420135498046875,
0.020965576171875,
0.0201263427734375,
0.053985595703125,
-0.019866943359375,
0.039337158203125,
-0.01190948486328125,
0.0150909423828125,
-0.002101898193359375,
-0.0163726806640625,
0.01209259033203125,
-0.01013946533203125,
-0.00235748291015625,
0.05859375,
0.034576416015625,
-0.036834716796875,
0.022979736328125,
0.0007061958312988281,
0.0750732421875,
-0.01482391357421875,
-0.00913238525390625,
0.01702880859375,
-0.059234619140625,
-0.008148193359375,
0.02752685546875,
0.0039825439453125,
0.019989013671875,
-0.018310546875,
-0.01447296142578125,
0.0162811279296875,
-0.041717529296875,
-0.02996826171875,
0.01192474365234375,
-0.0178680419921875,
0.006801605224609375,
-0.0197601318359375,
0.0008611679077148438,
-0.02191162109375,
-0.0179290771484375,
-0.004718780517578125,
0.021087646484375,
-0.0278778076171875,
0.0182037353515625,
-0.017608642578125,
-0.056488037109375,
-0.055908203125,
0.0254974365234375,
0.00397491455078125,
0.006359100341796875,
0.07794189453125,
-0.0008387565612792969,
-0.08203125,
-0.0034942626953125,
-0.023101806640625,
0.0060882568359375,
0.04254150390625,
0.04693603515625,
0.0007634162902832031,
-0.02459716796875,
0.0181884765625,
-0.021697998046875,
0.038848876953125,
-0.06817626953125,
-0.037261962890625,
-0.042449951171875,
-0.0176544189453125,
-0.0231170654296875,
-0.01476287841796875,
0.050567626953125,
-0.0241546630859375,
-0.040618896484375,
-0.061553955078125,
-0.039703369140625,
0.00461578369140625,
-0.044158935546875,
0.039947509765625,
0.0225067138671875,
-0.001819610595703125,
-0.0022411346435546875,
0.0245208740234375,
0.0169525146484375,
0.0032634735107421875,
-0.005859375,
0.00047588348388671875,
0.0460205078125,
-0.01438140869140625,
0.0012340545654296875,
-0.01171112060546875,
0.018157958984375,
-0.03765869140625,
-0.007171630859375,
-0.0145263671875,
0.0021686553955078125,
-0.022308349609375,
0.0010786056518554688,
-0.06988525390625,
-0.0157928466796875,
0.038909912109375,
0.0171356201171875,
0.02545166015625,
0.003093719482421875,
-0.0265350341796875,
0.0151214599609375,
0.0797119140625,
-0.07623291015625,
-0.0322265625,
0.00447845458984375,
0.032379150390625,
0.004993438720703125,
-0.0164031982421875,
0.0012884140014648438,
-0.0418701171875,
-0.1290283203125,
0.0103912353515625,
-0.0171661376953125,
-0.026702880859375,
-0.040008544921875,
0.017608642578125,
-0.08221435546875,
-0.0615234375,
0.044586181640625,
-0.03948974609375,
0.0452880859375,
-0.0286865234375,
0.0237274169921875,
-0.054046630859375,
-0.025115966796875,
-0.039031982421875,
-0.019500732421875,
-0.00330352783203125,
-0.004817962646484375,
0.00865936279296875,
0.01552581787109375,
-0.01551055908203125,
0.0026092529296875,
0.035675048828125,
-0.003143310546875,
0.022125244140625,
0.01084136962890625,
0.0205841064453125,
-0.0140838623046875,
-0.007297515869140625,
0.01068115234375,
-0.038360595703125,
0.0028972625732421875,
0.0011529922485351562,
-0.03057861328125,
0.03167724609375,
0.0004601478576660156,
0.0303497314453125,
0.031402587890625,
-0.040924072265625,
-0.00780487060546875,
0.01641845703125,
-0.039276123046875,
-0.01190948486328125,
-0.025787353515625,
-0.0140228271484375,
0.0164642333984375,
-0.02056884765625,
0.040313720703125,
-0.0063934326171875,
-0.0151214599609375,
0.003448486328125,
0.10504150390625,
0.01342010498046875,
-0.0168914794921875,
-0.031280517578125,
0.00372314453125,
0.048553466796875,
0.0227203369140625,
0.0035686492919921875,
-0.0016546249389648438,
-0.028350830078125,
0.0263519287109375,
0.0243377685546875,
-0.052490234375,
-0.038909912109375,
0.08087158203125,
0.0008869171142578125,
-0.0006270408630371094,
-0.007396697998046875,
-0.052581787109375,
0.0858154296875,
0.0233917236328125,
0.018768310546875,
-0.004566192626953125,
0.04278564453125,
-0.02178955078125,
-0.0233612060546875,
-0.006572723388671875,
0.01099395751953125,
-0.02593994140625,
0.0130462646484375,
-0.0024013519287109375,
0.0213470458984375,
0.015045166015625,
-0.0018491744995117188,
0.01509857177734375,
0.012786865234375,
-0.002254486083984375,
-0.0287628173828125,
0.0469970703125,
-0.06689453125,
0.037872314453125,
-0.0215606689453125,
-0.03515625,
-0.039794921875,
-0.016876220703125,
0.072509765625,
0.01021575927734375,
-0.042083740234375,
-0.017303466796875,
-0.01490020751953125,
0.039215087890625,
0.0251312255859375,
-0.0191650390625,
0.038848876953125,
0.03912353515625,
-0.0169677734375,
0.004543304443359375,
-0.017608642578125,
0.003093719482421875,
-0.04742431640625,
-0.0182037353515625,
-0.003875732421875,
-0.0181884765625,
0.064453125,
-0.01183319091796875,
-0.042816162109375,
0.042999267578125,
0.0118255615234375,
0.00789642333984375,
0.0158538818359375,
-0.01080322265625,
0.01378631591796875,
0.03851318359375,
0.0245513916015625,
-0.059326171875,
0.03082275390625,
-0.03216552734375,
-0.0003867149353027344,
0.01377105712890625,
0.0286102294921875,
-0.019805908203125,
-0.0149993896484375,
0.0270843505859375,
-0.0197601318359375,
-0.0201873779296875,
0.0242156982421875,
-0.0430908203125,
-0.0560302734375,
-0.0146026611328125,
0.03485107421875,
0.0401611328125,
-0.0164794921875,
-0.0018129348754882812,
0.0011157989501953125,
-0.02490234375,
-0.0248870849609375,
0.04638671875,
-0.05181884765625,
-0.0190887451171875,
-0.000858306884765625,
-0.06890869140625,
-0.0257568359375,
-0.0010576248168945312,
-0.06396484375,
-0.041717529296875,
0.004459381103515625,
-0.00783538818359375,
0.0186920166015625,
0.0002987384796142578,
0.0189971923828125,
-0.00470733642578125,
-0.0308685302734375,
0.038055419921875,
-0.008148193359375,
0.0694580078125,
0.0173797607421875,
-0.082275390625,
0.0114898681640625,
-0.0335693359375,
-0.004619598388671875,
-0.03546142578125,
-0.0501708984375,
-0.057281494140625,
0.004619598388671875,
0.0196380615234375,
0.021026611328125,
-0.020965576171875,
-0.046295166015625,
-0.0184478759765625,
0.038970947265625,
0.038421630859375,
0.05670166015625,
0.01038360595703125,
0.0411376953125,
0.006072998046875,
0.031829833984375,
0.04248046875,
0.032867431640625,
-0.0117034912109375,
-0.035064697265625,
0.034210205078125,
-0.0037994384765625,
-0.029937744140625,
-0.038543701171875,
-0.0082550048828125,
-0.0238037109375,
0.0440673828125,
-0.013336181640625,
-0.01232147216796875,
-0.020782470703125,
-0.0161285400390625,
-0.0404052734375,
0.058258056640625,
-0.0233917236328125,
0.01195526123046875,
-0.02484130859375,
-0.04888916015625,
-0.0269012451171875,
0.019989013671875,
0.03466796875,
-0.0006594657897949219,
-0.0266265869140625,
-0.0174560546875,
0.0482177734375,
-0.025543212890625,
0.062286376953125,
0.060302734375,
-0.026702880859375,
0.0162506103515625,
0.0195159912109375,
-0.0121612548828125,
-0.01131439208984375,
0.01056671142578125,
-0.020172119140625,
-0.017822265625,
0.0230865478515625,
0.0190277099609375,
0.006984710693359375,
0.0293731689453125,
-0.017364501953125,
0.01910400390625,
0.07781982421875,
0.0657958984375,
-0.1285400390625,
0.00530242919921875,
0.0186920166015625,
0.024749755859375,
0.042999267578125,
0.00001615285873413086,
0.016998291015625,
0.003444671630859375,
0.006137847900390625,
0.0053863525390625,
-0.00466156005859375,
0.01381683349609375,
-0.00774383544921875,
-0.00814056396484375,
-0.017486572265625,
0.024688720703125,
0.0006856918334960938,
-0.0244903564453125,
0.01873779296875,
0.035247802734375,
-0.0188751220703125,
-0.0240631103515625,
0.019378662109375,
0.01092529296875,
-0.0036029815673828125,
-0.080810546875,
0.00940704345703125,
-0.0197601318359375,
-0.0296173095703125,
0.005542755126953125,
-0.003246307373046875,
0.0192108154296875,
0.055999755859375,
-0.034637451171875,
0.01404571533203125,
0.02337646484375,
-0.0027751922607421875,
-0.04718017578125,
-0.006359100341796875,
0.05023193359375,
0.0031986236572265625,
-0.050933837890625,
0.035858154296875,
-0.04425048828125,
-0.0440673828125,
-0.022064208984375,
-0.004940032958984375,
0.061614990234375,
-0.04107666015625,
0.0002422332763671875,
0.041229248046875,
0.0638427734375,
-0.0157470703125,
-0.0211334228515625,
0.0302276611328125,
-0.0494384765625,
-0.01055145263671875,
-0.00628662109375,
0.0103607177734375,
-0.0086669921875,
-0.0227813720703125,
-0.035888671875,
0.09246826171875,
-0.036376953125,
-0.00998687744140625,
-0.01261138916015625,
0.0625,
-0.005107879638671875,
0.047821044921875,
-0.0128631591796875,
0.034393310546875,
-0.0144805908203125,
0.011016845703125,
-0.0160675048828125,
0.0229949951171875,
-0.016510009765625,
0.005832672119140625,
0.0845947265625,
0.01027679443359375,
0.03125,
0.010833740234375,
0.07293701171875,
0.024383544921875,
-0.0230560302734375,
0.0001583099365234375,
-0.023681640625,
0.0159454345703125,
0.01334381103515625,
-0.037322998046875,
0.036041259765625,
-0.027923583984375,
-0.034515380859375,
-0.007068634033203125,
0.00656890869140625,
0.0032253265380859375,
0.023773193359375,
0.024505615234375,
0.002056121826171875,
0.0030765533447265625,
-0.00595855712890625,
-0.034271240234375,
0.0037670135498046875,
-0.0001577138900756836,
-0.0023326873779296875,
-0.03863525390625,
0.01015472412109375,
-0.019561767578125,
0.03546142578125,
-0.0116119384765625,
-0.0017423629760742188,
0.02166748046875,
0.0181121826171875,
-0.038970947265625,
-0.047760009765625,
-0.0116729736328125,
0.0227508544921875,
-0.051422119140625,
0.04510498046875,
0.0057373046875,
0.0260772705078125,
-0.01666259765625,
0.0428466796875,
-0.0198516845703125,
0.027374267578125,
-0.038909912109375,
-0.06573486328125,
0.022064208984375,
0.002620697021484375,
-0.0005097389221191406,
0.0292816162109375,
-0.0002396106719970703,
-0.039337158203125,
0.03466796875,
-0.0224609375,
0.0013589859008789062,
0.0302734375,
0.023681640625,
0.013214111328125,
0.043182373046875,
-0.049285888671875,
-0.0182647705078125,
-0.007541656494140625,
0.01222991943359375,
0.001461029052734375,
-0.00623321533203125,
-0.0136871337890625,
0.0254364013671875,
0.0024166107177734375,
0.018157958984375,
0.007793426513671875,
0.033172607421875,
-0.014068603515625,
-0.00101470947265625,
-0.0445556640625,
-0.0682373046875,
-0.00260162353515625,
0.04412841796875,
0.020751953125,
-0.01149749755859375,
0.046356201171875,
0.03985595703125,
-0.016143798828125,
-0.01377105712890625,
-0.0027923583984375,
-0.0115509033203125,
0.0027618408203125,
-0.014862060546875,
0.0132598876953125,
0.0027790069580078125,
-0.017608642578125,
-0.034576416015625,
0.0321044921875,
0.0218048095703125,
-0.019195556640625,
0.01261138916015625,
0.006038665771484375,
0.00434112548828125,
0.0278778076171875,
-0.006561279296875,
-0.020599365234375,
0.01244354248046875,
-0.003444671630859375,
0.0118408203125,
-0.029205322265625,
0.00732421875,
-0.036529541015625,
0.00689697265625,
-0.005657196044921875,
0.045379638671875,
0.0038776397705078125,
-0.01305389404296875,
0.0049896240234375,
0.0111236572265625,
-0.01042938232421875,
-0.004001617431640625,
0.02923583984375,
-0.0095062255859375,
-0.01329803466796875,
-0.031768798828125,
0.0018129348754882812,
0.064453125,
-0.0037860870361328125,
0.07928466796875,
-0.036590576171875,
0.01763916015625,
-0.0065765380859375,
0.032257080078125,
-0.0157012939453125,
-0.0197601318359375,
0.042388916015625,
0.0019855499267578125,
-0.00418853759765625,
-0.023162841796875,
-0.049896240234375,
0.049163818359375,
0.0251312255859375,
-0.005924224853515625,
0.021575927734375,
0.01009368896484375,
-0.0008378028869628906,
-0.01129913330078125,
-0.016571044921875,
-0.0164947509765625,
-0.032318115234375,
0.0163116455078125,
0.0268402099609375,
-0.01507568359375,
0.0125274658203125,
0.00797271728515625,
0.01049041748046875,
0.01322174072265625,
0.0026569366455078125,
0.00479888916015625,
0.03692626953125,
-0.0216827392578125,
0.0210723876953125,
-0.00007939338684082031,
-0.062469482421875,
-0.0046234130859375,
-0.00762176513671875,
-0.01258087158203125,
0.007732391357421875,
0.06451416015625,
0.0078887939453125,
-0.0033435821533203125,
-0.03546142578125,
-0.0018587112426757812,
0.03289794921875,
-0.0013494491577148438,
0.0018320083618164062,
-0.0218658447265625,
0.016326904296875,
-0.004413604736328125,
-0.00414276123046875,
-0.0279541015625,
-0.0286865234375,
-0.032135009765625,
0.01474761962890625,
-0.04107666015625,
-0.060211181640625,
-0.06829833984375,
0.01849365234375,
0.0220489501953125,
0.02655029296875,
-0.09234619140625,
0.061187744140625,
-0.0012769699096679688,
0.01226043701171875,
-0.00934600830078125,
-0.037506103515625,
0.0107879638671875,
0.006404876708984375,
-0.0207061767578125,
-0.050018310546875,
-0.0258331298828125,
0.05303955078125,
-0.0304718017578125,
-0.0019550323486328125,
0.00885009765625,
-0.00983428955078125,
0.0202178955078125,
0.03729248046875,
-0.00030112266540527344,
0.07568359375,
-0.006072998046875,
-0.0254364013671875,
0.0264739990234375,
-0.00714874267578125,
-0.01129913330078125,
-0.039459228515625,
-0.0056304931640625,
-0.020294189453125,
0.002857208251953125,
-0.03399658203125,
0.0069122314453125,
0.01300811767578125,
-0.035888671875,
-0.06097412109375,
0.0157012939453125,
-0.003082275390625,
-0.0421142578125,
-0.041473388671875,
0.02935791015625,
-0.004611968994140625,
-0.0303192138671875,
-0.01334381103515625,
-0.01439666748046875,
-0.00560760498046875,
0.0310821533203125,
0.01444244384765625,
0.03643798828125,
-0.0017232894897460938,
0.007366180419921875,
-0.0555419921875,
0.0019016265869140625,
-0.01314544677734375,
0.021148681640625,
0.01983642578125,
-0.0306243896484375,
0.0374755859375,
0.056671142578125,
-0.0386962890625,
0.0016727447509765625,
-0.0230865478515625,
-0.026580810546875,
-0.031280517578125,
-0.035614013671875,
-0.01125335693359375,
-0.0026340484619140625,
0.07977294921875,
0.06951904296875,
0.0157470703125,
-0.023895263671875,
-0.08343505859375,
-0.05615234375,
0.00511932373046875,
-0.04461669921875,
0.0322265625,
-0.10235595703125,
0.0017642974853515625,
0.02960205078125,
-0.022369384765625,
0.016204833984375,
-0.039154052734375,
-0.0305938720703125,
0.003124237060546875,
-0.0249786376953125,
0.0204315185546875,
-0.04156494140625,
-0.0166015625,
0.00763702392578125,
0.003459930419921875,
0.04437255859375,
-0.0202178955078125,
0.0213775634765625,
0.029937744140625,
0.056884765625,
0.01334381103515625,
0.027587890625,
-0.036773681640625,
0.02679443359375,
0.004852294921875,
0.059906005859375,
-0.0401611328125,
-0.032501220703125,
0.00762176513671875,
0.01251983642578125,
-0.006427764892578125,
0.009857177734375,
-0.017333984375,
0.036224365234375,
-0.0226898193359375,
0.0523681640625,
-0.0008044242858886719,
0.0489501953125,
-0.0108489990234375,
0.053070068359375,
0.004352569580078125,
-0.0202789306640625,
0.020965576171875,
-0.02978515625,
-0.01473236083984375,
-0.00986480712890625,
0.0205078125,
-0.1031494140625,
0.08636474609375,
0.037109375,
0.041961669921875,
0.0618896484375
]
|
efb2d948332e4abe894df869856b8626dfd37f6c | Wordpress Stackexchange
Q: Get term name from term ID? I cannot figure out how to get the taxonomy term name if I have the taxonomy term's ID.
This is my current code
// create a dropdown menu of the quantity taxonomy
wp_dropdown_categories(
array('taxonomy' => 'quantity_category', 'name' => 'productQuantity', 'hide_empty' => 0)
);
$quantityTerms = $_POST['productQuantity'];
$quantityTax = 'quantity_category';
The value of $quantityTerms is not the "name" of the quantity but the ID of the quantity category. When it sets the object terms, it creates a new category called "ID#" and not inserting it into the category by name.
wp_set_object_terms( $post_id, $quantityTerms, $quantityTax, $append );
A: The function get_term_by() would allow you to get the taxonomy term name from the id.
$quantityTermObject = get_term_by( 'id', absint( $quantityTerms ), 'quantity_category' );
$quantityTermName = $quantityTermObject->name;
| Q: Get term name from term ID? I cannot figure out how to get the taxonomy term name if I have the taxonomy term's ID.
This is my current code
// create a dropdown menu of the quantity taxonomy
wp_dropdown_categories(
array('taxonomy' => 'quantity_category', 'name' => 'productQuantity', 'hide_empty' => 0)
);
$quantityTerms = $_POST['productQuantity'];
$quantityTax = 'quantity_category';
The value of $quantityTerms is not the "name" of the quantity but the ID of the quantity category. When it sets the object terms, it creates a new category called "ID#" and not inserting it into the category by name.
wp_set_object_terms( $post_id, $quantityTerms, $quantityTax, $append );
A: The function get_term_by() would allow you to get the taxonomy term name from the id.
$quantityTermObject = get_term_by( 'id', absint( $quantityTerms ), 'quantity_category' );
$quantityTermName = $quantityTermObject->name;
| wordpress | {
"language": "en",
"length": 130,
"provenance": "stackexchange_00019.jsonl.gz:439628",
"question_score": "11",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124616"
} | [
-0.01885986328125,
0.02557373046875,
-0.04583740234375,
-0.00847625732421875,
0.020660400390625,
-0.026275634765625,
-0.01172637939453125,
-0.02130126953125,
0.0309906005859375,
0.015838623046875,
-0.042724609375,
-0.01171875,
-0.020355224609375,
-0.025360107421875,
-0.022674560546875,
-0.0295562744140625,
0.02734375,
-0.00687408447265625,
0.0294036865234375,
0.0064697265625,
0.00563812255859375,
0.01910400390625,
0.0220489501953125,
-0.0031070709228515625,
0.03961181640625,
-0.02618408203125,
0.01181793212890625,
-0.018310546875,
0.0270538330078125,
-0.0142974853515625,
0.0214691162109375,
-0.01471710205078125,
0.01201629638671875,
-0.0174102783203125,
0.036529541015625,
-0.02191162109375,
0.00669097900390625,
-0.003543853759765625,
0.007232666015625,
0.02020263671875,
0.04736328125,
-0.0204315185546875,
-0.01114654541015625,
0.03704833984375,
-0.036712646484375,
-0.03814697265625,
0.031341552734375,
-0.0152435302734375,
-0.009765625,
-0.01102447509765625,
0.0482177734375,
0.02569580078125,
0.076416015625,
-0.037750244140625,
-0.0142364501953125,
-0.00934600830078125,
-0.006946563720703125,
0.00783538818359375,
0.02667236328125,
-0.01163482666015625,
-0.042724609375,
-0.024658203125,
0.03131103515625,
-0.02313232421875,
0.0211029052734375,
0.030517578125,
0.05010986328125,
0.007419586181640625,
-0.029144287109375,
0.0037078857421875,
0.01415252685546875,
-0.043212890625,
0.0035343170166015625,
0.0413818359375,
-0.0333251953125,
-0.109375,
0.05926513671875,
-0.04217529296875,
-0.003337860107421875,
0.03271484375,
0.01378631591796875,
-0.04718017578125,
-0.029754638671875,
0.017669677734375,
0.030487060546875,
0.067626953125,
-0.00875091552734375,
-0.025238037109375,
-0.015716552734375,
-0.047637939453125,
-0.01110076904296875,
-0.0300140380859375,
-0.04205322265625,
0.0246429443359375,
-0.0213623046875,
-0.0272064208984375,
0.01432037353515625,
0.04522705078125,
-0.0369873046875,
0.0023956298828125,
0.0039825439453125,
-0.05029296875,
0.03021240234375,
-0.03948974609375,
-0.0027179718017578125,
0.03887939453125,
0.02105712890625,
0.0155792236328125,
0.0225372314453125,
0.00016820430755615234,
0.010284423828125,
0.00691986083984375,
-0.006336212158203125,
-0.0293426513671875,
0.017608642578125,
0.0186614990234375,
-0.0238189697265625,
0.0201568603515625,
0.0078582763671875,
-0.012939453125,
-0.007343292236328125,
0.0012292861938476562,
0.005786895751953125,
0.032928466796875,
0.004741668701171875,
0.016754150390625,
-0.004756927490234375,
-0.01465606689453125,
-0.017822265625,
-0.016448974609375,
-0.045684814453125,
0.02349853515625,
0.10015869140625,
0.0316162109375,
0.027008056640625,
-0.01529693603515625,
0.00627899169921875,
0.006015777587890625,
0.0007529258728027344,
-0.0179443359375,
0.0296173095703125,
0.03387451171875,
0.038330078125,
-0.019866943359375,
-0.019134521484375,
0.046234130859375,
0.0209503173828125,
-0.0159912109375,
-0.01319122314453125,
-0.06561279296875,
-0.005313873291015625,
-0.0396728515625,
0.0592041015625,
0.01552581787109375,
-0.06781005859375,
0.008270263671875,
0.058197021484375,
-0.034423828125,
-0.0655517578125,
-0.07208251953125,
-0.007762908935546875,
-0.0213165283203125,
-0.01343536376953125,
0.0123748779296875,
-0.0206298828125,
0.039764404296875,
0.006961822509765625,
0.00024199485778808594,
0.0226287841796875,
0.0310211181640625,
0.0280303955078125,
-0.0059814453125,
-0.01068878173828125,
0.006481170654296875,
-0.0003082752227783203,
-0.0034332275390625,
-0.02587890625,
-0.0087890625,
0.0313720703125,
-0.0430908203125,
-0.062164306640625,
-0.0458984375,
0.01438140869140625,
-0.025726318359375,
-0.036590576171875,
0.0225677490234375,
0.01013946533203125,
0.059173583984375,
0.018218994140625,
0.018798828125,
0.019287109375,
0.00025010108947753906,
-0.0789794921875,
0.024688720703125,
0.0135345458984375,
0.007904052734375,
-0.0210723876953125,
-0.00047278404235839844,
-0.00014901161193847656,
-0.01239776611328125,
0.0140838623046875,
0.0301513671875,
-0.0306243896484375,
0.0030059814453125,
-0.05712890625,
0.0153045654296875,
-0.01397705078125,
0.03277587890625,
-0.0154266357421875,
0.007022857666015625,
0.0188446044921875,
-0.006992340087890625,
-0.005096435546875,
-0.039642333984375,
-0.0233306884765625,
0.008270263671875,
-0.03662109375,
0.010040283203125,
-0.01334381103515625,
0.0008788108825683594,
-0.0251922607421875,
-0.006122589111328125,
-0.00922393798828125,
0.0130462646484375,
-0.00440216064453125,
0.032257080078125,
-0.032318115234375,
0.0221710205078125,
0.031768798828125,
0.023712158203125,
0.041229248046875,
-0.0079803466796875,
0.0236053466796875,
0.04119873046875,
0.006923675537109375,
-0.0092010498046875,
0.02166748046875,
-0.11248779296875,
0.0245361328125,
0.0560302734375,
0.031524658203125,
0.0252532958984375,
-0.0172271728515625,
-0.01439666748046875,
0.0909423828125,
-0.0222320556640625,
-0.0174102783203125,
-0.0127716064453125,
0.014923095703125,
0.0633544921875,
0.0257720947265625,
0.018951416015625,
-0.01512908935546875,
0.008880615234375,
-0.0004601478576660156,
0.0167083740234375,
-0.044830322265625,
-0.01056671142578125,
0.02532958984375,
-0.002368927001953125,
-0.005939483642578125,
-0.037384033203125,
0.0228118896484375,
-0.036529541015625,
0.03216552734375,
0.05413818359375,
0.04010009765625,
0.035369873046875,
-0.0289764404296875,
0.0501708984375,
-0.00264739990234375,
-0.04840087890625,
-0.00316619873046875,
0.0246124267578125,
0.0289154052734375,
-0.041046142578125,
-0.01262664794921875,
-0.0012388229370117188,
-0.0198974609375,
-0.00223541259765625,
0.0218658447265625,
0.061187744140625,
0.026397705078125,
-0.01812744140625,
0.0007076263427734375,
-0.10015869140625,
-0.01552581787109375,
0.01296234130859375,
-0.08721923828125,
-0.029998779296875,
-0.000377655029296875,
0.05657958984375,
-0.0161285400390625,
-0.00595855712890625,
-0.032806396484375,
0.01812744140625,
0.019439697265625,
0.00022864341735839844,
0.01129913330078125,
-0.001857757568359375,
0.034912109375,
0.051422119140625,
0.0072021484375,
-0.006351470947265625,
0.0159759521484375,
-0.03668212890625,
0.01678466796875,
-0.006679534912109375,
-0.01288604736328125,
0.0248870849609375,
-0.0736083984375,
0.037567138671875,
0.00772857666015625,
0.07598876953125,
-0.031402587890625,
-0.0506591796875,
-0.0096893310546875,
0.0128936767578125,
-0.07794189453125,
-0.06427001953125,
0.00444793701171875,
-0.02630615234375,
0.028778076171875,
-0.01065826416015625,
-0.0031032562255859375,
-0.032318115234375,
-0.0009589195251464844,
0.005275726318359375,
0.004734039306640625,
-0.033172607421875,
-0.057708740234375,
-0.0478515625,
-0.058135986328125,
-0.008270263671875,
-0.00644683837890625,
0.0008268356323242188,
0.0079193115234375,
0.032073974609375,
-0.00618743896484375,
-0.018463134765625,
0.018280029296875,
0.045928955078125,
0.00627899169921875,
-0.004421234130859375,
-0.0015516281127929688,
-0.04144287109375,
-0.0284881591796875,
-0.008453369140625,
0.026123046875,
0.01505279541015625,
-0.004871368408203125,
0.01442718505859375,
0.023712158203125,
0.031951904296875,
0.0445556640625,
-0.004425048828125,
-0.032470703125,
0.04437255859375,
0.052764892578125,
-0.005863189697265625,
-0.0195465087890625,
-0.041229248046875,
-0.03680419921875,
0.06414794921875,
0.0279541015625,
0.0027294158935546875,
0.01070404052734375,
0.013824462890625,
-0.02691650390625,
-0.0138092041015625,
-0.023468017578125,
-0.0274200439453125,
0.006561279296875,
0.00974273681640625,
-0.006725311279296875,
0.030364990234375,
0.0292510986328125,
-0.030853271484375,
0.0117950439453125,
0.010986328125,
-0.0204925537109375,
0.0009665489196777344,
-0.026763916015625,
0.01117706298828125,
-0.05877685546875,
0.0234832763671875,
-0.07666015625,
-0.017303466796875,
-0.046112060546875,
0.00298309326171875,
-0.003253936767578125,
0.0723876953125,
0.004253387451171875,
-0.02545166015625,
-0.030975341796875,
0.0074005126953125,
-0.0252532958984375,
-0.051116943359375,
0.00891876220703125,
-0.006381988525390625,
-0.09991455078125,
0.0121002197265625,
0.0024089813232421875,
-0.026275634765625,
-0.0252227783203125,
0.0341796875,
-0.0714111328125,
-0.032745361328125,
0.04022216796875,
-0.11126708984375,
0.036895751953125,
0.029541015625,
0.0005445480346679688,
0.0145721435546875,
-0.0292510986328125,
-0.059967041015625,
0.0013294219970703125,
-0.01416015625,
0.043060302734375,
-0.0008864402770996094,
0.0010967254638671875,
-0.04852294921875,
0.007038116455078125,
0.0389404296875,
0.0328369140625,
-0.0019989013671875,
0.00815582275390625,
0.0007867813110351562,
-0.01364898681640625,
-0.024322509765625,
0.0005040168762207031,
-0.040435791015625,
-0.01500701904296875,
-0.01088714599609375,
-0.03289794921875,
0.027679443359375,
-0.01210784912109375,
0.04345703125,
0.01016998291015625,
-0.023956298828125,
-0.09674072265625,
-0.01450347900390625,
-0.00598907470703125,
-0.0242156982421875,
-0.029632568359375,
0.00403594970703125,
-0.006591796875,
-0.07708740234375,
0.0396728515625,
-0.0008101463317871094,
0.005565643310546875,
0.005062103271484375,
0.058929443359375,
0.007598876953125,
-0.033538818359375,
-0.04229736328125,
0.00569915771484375,
0.0267791748046875,
0.042449951171875,
0.0125579833984375,
-0.022186279296875,
-0.0303802490234375,
0.051666259765625,
0.0188140869140625,
0.0082855224609375,
-0.016143798828125,
0.04437255859375,
-0.0049591064453125,
-0.0306243896484375,
0.0160064697265625,
-0.02081298828125,
-0.00662994384765625,
0.0180206298828125,
-0.03564453125,
-0.0231170654296875,
-0.01155853271484375,
0.06671142578125,
-0.050628662109375,
0.0841064453125,
-0.0251617431640625,
-0.0560302734375,
0.0372314453125,
-0.037384033203125,
0.0034770965576171875,
-0.0091552734375,
0.0128021240234375,
-0.0187835693359375,
-0.041290283203125,
0.0161285400390625,
-0.005634307861328125,
-0.007411956787109375,
-0.018890380859375,
0.0133514404296875,
-0.006771087646484375,
-0.0251922607421875,
0.00782012939453125,
-0.00791168212890625,
0.0132293701171875,
-0.01346588134765625,
-0.04486083984375,
0.01203155517578125,
-0.0169677734375,
-0.01611328125,
0.050994873046875,
-0.00429534912109375,
0.0181121826171875,
0.02276611328125,
0.009185791015625,
0.0157470703125,
-0.03717041015625,
0.03240966796875,
-0.017822265625,
0.0027790069580078125,
-0.007350921630859375,
-0.01166534423828125,
0.006824493408203125,
0.07794189453125,
-0.025299072265625,
0.052764892578125,
-0.0184326171875,
0.0297393798828125,
0.00620269775390625,
0.02685546875,
0.0249176025390625,
-0.035400390625,
0.01305389404296875,
-0.01523590087890625,
-0.00962066650390625,
-0.025360107421875,
-0.024169921875,
-0.0199432373046875,
0.0167083740234375,
-0.03375244140625,
-0.01715087890625,
0.04638671875,
-0.004638671875,
0.01203155517578125,
-0.00302886962890625,
-0.0341796875,
-0.0216217041015625,
-0.0111236572265625,
-0.0160980224609375,
0.01474761962890625,
-0.0238189697265625,
0.00524139404296875,
-0.0160980224609375,
-0.0067291259765625,
-0.002346038818359375,
-0.0049591064453125,
-0.00478363037109375,
-0.020416259765625,
-0.012481689453125,
-0.033355712890625,
0.002777099609375,
-0.0181884765625,
0.0007910728454589844,
-0.041046142578125,
-0.0016145706176757812,
-0.0229644775390625,
0.0728759765625,
-0.0185699462890625,
0.032562255859375,
-0.020172119140625,
-0.015167236328125,
-0.045013427734375,
-0.00311279296875,
0.032989501953125,
0.0294342041015625,
-0.01183319091796875,
-0.0121612548828125,
-0.0301666259765625,
-0.004039764404296875,
0.030731201171875,
-0.0472412109375,
0.01335906982421875,
-0.00969696044921875,
-0.01678466796875,
0.0006866455078125,
0.02783203125,
0.032745361328125,
-0.008697509765625,
0.024261474609375,
-0.009857177734375,
-0.039276123046875,
0.00839996337890625,
-0.01953125,
0.03289794921875,
0.03564453125,
0.0218658447265625,
-0.042572021484375,
-0.058197021484375,
-0.025665283203125,
-0.028167724609375,
-0.040435791015625,
0.007701873779296875,
0.005306243896484375,
-0.01849365234375,
0.026458740234375,
0.0377197265625,
0.0161895751953125,
0.0210418701171875,
0.01146697998046875,
-0.0015535354614257812,
-0.0054473876953125,
-0.048431396484375,
0.0330810546875,
-0.000972747802734375,
0.03338623046875,
-0.08294677734375,
-0.0166015625,
0.02178955078125,
0.042755126953125,
0.038055419921875,
-0.07080078125,
0.02264404296875,
0.053131103515625,
-0.0230865478515625,
0.005458831787109375,
0.0266265869140625,
0.0162506103515625,
0.0236663818359375,
-0.007251739501953125,
0.00975799560546875,
-0.00847625732421875,
0.0201263427734375,
-0.0382080078125,
-0.0201416015625,
0.048797607421875,
0.01169586181640625,
-0.018035888671875,
0.05120849609375,
-0.0253143310546875,
-0.00930023193359375,
-0.0241546630859375,
0.0198822021484375,
0.01238250732421875,
0.01024627685546875,
0.0294189453125,
-0.035400390625,
-0.0209503173828125,
0.0106353759765625,
-0.01100921630859375,
-0.0013332366943359375,
-0.0176544189453125,
-0.0059814453125,
-0.042266845703125,
-0.0026264190673828125,
0.01125335693359375,
0.006092071533203125,
-0.003917694091796875,
0.036468505859375,
0.005939483642578125,
-0.047454833984375,
0.0109100341796875,
0.005199432373046875,
0.02044677734375,
-0.05224609375,
-0.0136566162109375,
0.041900634765625,
-0.0211181640625,
-0.056304931640625,
0.057159423828125,
-0.021392822265625,
0.04388427734375,
-0.0118408203125,
0.0008616447448730469,
0.004100799560546875,
0.0313720703125,
-0.0163421630859375,
-0.01995849609375,
0.00975799560546875,
-0.03729248046875,
0.040557861328125,
0.004917144775390625,
-0.005077362060546875,
-0.00011903047561645508,
-0.04656982421875,
-0.006496429443359375,
-0.043731689453125,
0.0445556640625,
-0.0242462158203125,
-0.0225677490234375,
0.0677490234375,
-0.018524169921875,
-0.003673553466796875,
0.031463623046875,
0.051300048828125,
-0.006168365478515625,
0.026092529296875,
0.0300140380859375,
-0.002681732177734375,
0.0139312744140625,
0.0206298828125,
0.00901031494140625,
0.0044097900390625,
0.01446533203125,
-0.06781005859375,
0.0888671875,
-0.0041046142578125,
0.01025390625,
-0.0244293212890625,
0.029754638671875,
-0.0104522705078125,
0.014892578125,
-0.06634521484375,
0.0186767578125,
0.0302276611328125,
0.051361083984375,
-0.031646728515625,
-0.0004489421844482422,
-0.001514434814453125,
0.0206146240234375,
0.0556640625,
0.0024356842041015625,
-0.0060882568359375,
-0.0164642333984375,
0.06549072265625,
0.057708740234375,
0.01232147216796875,
-0.004199981689453125,
0.03564453125,
-0.012359619140625,
0.0709228515625,
0.02484130859375,
0.033843994140625,
0.008209228515625,
0.0253143310546875,
0.06903076171875,
0.0034542083740234375,
0.01554107666015625,
-0.0114593505859375,
-0.0184173583984375,
0.00848388671875,
-0.0177459716796875,
0.00399017333984375,
-0.0404052734375,
-0.003108978271484375,
0.0304412841796875,
0.032928466796875,
-0.034515380859375,
0.0183563232421875,
-0.03253173828125,
0.06036376953125,
0.005733489990234375,
0.0084991455078125,
0.0286865234375,
0.0036678314208984375,
0.0615234375,
-0.026031494140625,
-0.003231048583984375,
0.00019598007202148438,
0.02777099609375,
0.01288604736328125,
-0.0081939697265625,
0.01488494873046875,
-0.037506103515625,
-0.01190948486328125,
0.03839111328125,
0.03656005859375,
-0.0157012939453125,
-0.0196685791015625,
0.0157928466796875,
0.0122833251953125,
-0.01654052734375,
0.0037364959716796875,
0.00783538818359375,
0.081298828125,
0.087646484375,
-0.037750244140625,
0.01190948486328125,
0.04010009765625,
0.038482666015625,
0.00420379638671875,
0.0086212158203125,
-0.07379150390625,
-0.0197906494140625,
-0.0712890625,
0.03546142578125,
0.0172119140625,
0.0877685546875,
-0.00876617431640625,
0.08502197265625,
-0.045135498046875,
-0.039337158203125,
-0.0005269050598144531,
0.01385498046875,
0.06060791015625,
-0.0308685302734375,
0.0374755859375,
0.044036865234375,
0.0015382766723632812,
-0.008087158203125,
0.0276641845703125,
0.04180908203125,
0.038482666015625,
0.0184478759765625,
-0.005992889404296875,
0.002056121826171875,
0.017608642578125,
-0.032562255859375,
-0.004619598388671875,
-0.0219268798828125,
0.005229949951171875,
0.00994873046875,
-0.01324462890625,
-0.005840301513671875,
-0.001888275146484375,
0.0408935546875,
-0.044586181640625,
0.07183837890625,
-0.0157623291015625,
-0.0033931732177734375,
0.018096923828125,
-0.040496826171875,
0.027862548828125,
-0.031982421875,
-0.06365966796875,
0.009185791015625,
-0.07745361328125,
-0.0219573974609375,
0.01012420654296875,
0.0304107666015625,
0.007587432861328125,
0.007770538330078125,
-0.0226898193359375,
-0.0025272369384765625,
-0.01224517822265625,
0.0096282958984375,
0.00923919677734375,
0.0025787353515625,
-0.0029392242431640625,
-0.0045013427734375,
-0.00342559814453125,
0.00518798828125,
0.036224365234375,
0.0133056640625,
-0.0113067626953125,
-0.031768798828125,
0.034881591796875,
0.00804901123046875,
-0.04010009765625,
0.025848388671875,
-0.068115234375,
-0.0643310546875,
0.08660888671875,
-0.0228729248046875,
-0.036285400390625,
0.00887298583984375,
-0.0130615234375,
0.029327392578125,
0.0231170654296875,
-0.0247802734375,
0.0006899833679199219,
-0.028167724609375,
0.019775390625,
0.0012292861938476562,
0.05859375,
-0.014129638671875,
-0.006572723388671875,
-0.0028667449951171875,
-0.029571533203125,
0.0467529296875,
0.039886474609375,
0.0049285888671875,
0.0182952880859375,
-0.006298065185546875,
-0.01174163818359375,
0.0227508544921875,
-0.0204620361328125,
0.032501220703125,
0.0248260498046875,
-0.0257568359375,
-0.0131988525390625,
0.023956298828125,
-0.01241302490234375,
0.0208282470703125,
-0.00030684471130371094,
0.0239410400390625,
0.025390625,
-0.033782958984375,
0.0251007080078125,
-0.002742767333984375,
0.039337158203125,
-0.00615692138671875,
0.0109405517578125,
0.0208282470703125,
0.022186279296875,
-0.03289794921875,
-0.08477783203125,
-0.0259246826171875,
-0.0357666015625,
0.0111541748046875,
0.031280517578125,
0.002132415771484375,
0.0026187896728515625,
-0.005878448486328125,
-0.0156402587890625,
0.036590576171875,
0.01152801513671875,
-0.03179931640625,
0.0306549072265625,
-0.0192718505859375,
-0.01486968994140625,
0.01271820068359375,
-0.01279449462890625,
0.018890380859375,
0.0212554931640625,
-0.063720703125,
-0.0015649795532226562,
-0.0222015380859375,
-0.0209808349609375,
-0.023345947265625,
0.00634002685546875,
0.0172576904296875,
-0.0267791748046875,
-0.003993988037109375,
0.011260986328125,
0.034881591796875,
0.031280517578125,
0.0194549560546875,
-0.01522064208984375,
0.045745849609375,
-0.0062103271484375,
-0.027313232421875,
-0.062744140625,
0.0085296630859375,
-0.049591064453125,
-0.0025501251220703125,
-0.00830078125,
-0.0231170654296875,
-0.0204925537109375,
-0.052154541015625,
-0.055755615234375,
0.0008625984191894531,
0.0101165771484375,
-0.033172607421875,
-0.03955078125,
-0.0265350341796875,
-0.01148223876953125,
0.0278778076171875,
-0.0086517333984375,
0.014007568359375,
-0.021881103515625,
0.051727294921875,
0.006786346435546875,
0.0178985595703125,
0.046051025390625,
-0.01279449462890625,
-0.054443359375,
-0.01102447509765625,
-0.029083251953125,
0.032379150390625,
-0.0028858184814453125,
-0.0014705657958984375,
0.01446533203125,
0.0194244384765625,
-0.048583984375,
-0.019287109375,
0.00264739990234375,
0.035064697265625,
-0.0117034912109375,
-0.060272216796875,
-0.0167236328125,
-0.022003173828125,
0.045562744140625,
0.0171051025390625,
0.00873565673828125,
-0.02655029296875,
-0.053375244140625,
-0.03466796875,
-0.00176239013671875,
0.0012674331665039062,
0.0004925727844238281,
-0.037200927734375,
0.03131103515625,
-0.0027027130126953125,
-0.045013427734375,
0.00980377197265625,
-0.004241943359375,
-0.0692138671875,
0.017303466796875,
-0.040008544921875,
-0.0181732177734375,
-0.032684326171875,
0.00405120849609375,
-0.01611328125,
-0.041900634765625,
-0.0670166015625,
-0.02813720703125,
0.0177459716796875,
-0.06719970703125,
-0.06451416015625,
-0.044189453125,
0.00563812255859375,
0.0240020751953125,
0.0158538818359375,
0.004489898681640625,
-0.0077362060546875,
0.01490020751953125,
0.0293426513671875,
-0.0194549560546875,
0.02813720703125,
0.00434112548828125,
0.02764892578125,
-0.01375579833984375,
0.057281494140625,
0.01467132568359375,
0.0533447265625,
-0.00742340087890625,
0.002765655517578125,
0.0013256072998046875,
0.0270538330078125,
0.0007753372192382812,
-0.00911712646484375,
0.0308380126953125,
-0.04705810546875,
0.000579833984375,
-0.01207733154296875,
-0.01352691650390625,
-0.03338623046875,
0.01181793212890625,
0.036956787109375,
-0.0259857177734375,
0.027252197265625
]
|
e27dbb4ac028bb8a2384ffb4faa7ab2fa61aaca4 | Wordpress Stackexchange
Q: How to use wp_insert_user on Wordpress Multisite? I previously had a WordpressMU install, but this is deprecated and I'm trying to find my way around multisite.
I need to programatically create a new user account for a particular site. wp_insert_user looks like it does everything except say which site the user is for (perhaps it takes this from the domain the request was sent to?).
It's important that the created user is a member on one blog (site), but not the other(s).
A: You can use the add_user_to_blog function after creating the user.
$userid = 1;
$blogid = 5;
$role = 'administrator';
add_user_to_blog( $blogid, $userid, $role );
| Q: How to use wp_insert_user on Wordpress Multisite? I previously had a WordpressMU install, but this is deprecated and I'm trying to find my way around multisite.
I need to programatically create a new user account for a particular site. wp_insert_user looks like it does everything except say which site the user is for (perhaps it takes this from the domain the request was sent to?).
It's important that the created user is a member on one blog (site), but not the other(s).
A: You can use the add_user_to_blog function after creating the user.
$userid = 1;
$blogid = 5;
$role = 'administrator';
add_user_to_blog( $blogid, $userid, $role );
A: Assuming you have Wordpress Multisite, with sites: example.com, foo.example.com and bar.example.com and you want to add a new user to foo.example.com, then create a script and execute that script via a URL containing foo.example.com/path/to/your/script.ph.
Wordpress detects the URL, maps it to a blog and assigns users created by wp_insert_user() to that blog, and not to the other blogs.
See the answer by Chittaranjan if you then want to add the user to a other blogs/sites, too.
| wordpress | {
"language": "en",
"length": 185,
"provenance": "stackexchange_00019.jsonl.gz:439642",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124655"
} | [
0.0992431640625,
-0.01398468017578125,
0.02587890625,
-0.016571044921875,
0.013885498046875,
-0.04632568359375,
0.06781005859375,
-0.039215087890625,
0.00411224365234375,
0.0286102294921875,
-0.029052734375,
0.00787353515625,
0.0186614990234375,
-0.007228851318359375,
-0.006465911865234375,
-0.00788116455078125,
0.004589080810546875,
-0.00382232666015625,
-0.0005512237548828125,
-0.0177459716796875,
-0.004238128662109375,
-0.0219268798828125,
0.017425537109375,
-0.037200927734375,
0.0054473876953125,
-0.00146484375,
0.0194091796875,
-0.0186920166015625,
0.0171356201171875,
-0.008575439453125,
0.0118255615234375,
-0.005298614501953125,
0.0012979507446289062,
0.01190185546875,
0.0017442703247070312,
0.0097808837890625,
0.036285400390625,
-0.0012102127075195312,
0.03582763671875,
0.017333984375,
0.0086212158203125,
0.017303466796875,
-0.004817962646484375,
0.0435791015625,
-0.0160675048828125,
-0.09210205078125,
0.044464111328125,
-0.02783203125,
0.0029239654541015625,
-0.0430908203125,
0.033416748046875,
-0.0096282958984375,
0.0675048828125,
-0.0238037109375,
-0.0291290283203125,
0.007053375244140625,
0.0304412841796875,
0.001552581787109375,
0.03900146484375,
-0.038970947265625,
-0.05609130859375,
0.002910614013671875,
0.0328369140625,
-0.0081024169921875,
0.01824951171875,
0.005878448486328125,
0.010955810546875,
0.0265655517578125,
-0.0408935546875,
-0.007190704345703125,
0.0029315948486328125,
-0.0335693359375,
0.0007810592651367188,
0.03192138671875,
-0.052337646484375,
-0.0229034423828125,
0.025665283203125,
0.0021686553955078125,
0.0304107666015625,
-0.00991058349609375,
-0.020599365234375,
-0.022430419921875,
-0.027099609375,
-0.036834716796875,
0.007259368896484375,
-0.005367279052734375,
-0.00940704345703125,
0.0007824897766113281,
-0.03521728515625,
0.0167388916015625,
-0.0186309814453125,
-0.0165252685546875,
-0.024322509765625,
0.0211029052734375,
0.001766204833984375,
-0.013031005859375,
-0.0017366409301757812,
0.06475830078125,
-0.0223846435546875,
0.00678253173828125,
-0.01776123046875,
-0.01934814453125,
-0.00768280029296875,
-0.0369873046875,
0.01253509521484375,
0.06597900390625,
0.01415252685546875,
-0.035400390625,
-0.015838623046875,
-0.003871917724609375,
0.0074462890625,
-0.01398468017578125,
0.00438690185546875,
-0.039642333984375,
-0.01343536376953125,
0.021240234375,
-0.0090179443359375,
-0.007648468017578125,
0.0039215087890625,
-0.0261993408203125,
-0.02313232421875,
0.020751953125,
-0.0250091552734375,
-0.00958251953125,
-0.0214080810546875,
-0.032196044921875,
0.0125885009765625,
-0.0218505859375,
-0.07440185546875,
-0.01039886474609375,
-0.03955078125,
0.037567138671875,
0.10504150390625,
0.05096435546875,
0.01222991943359375,
-0.020538330078125,
0.0251312255859375,
0.029083251953125,
0.003414154052734375,
0.02008056640625,
0.00386810302734375,
-0.049224853515625,
-0.0379638671875,
-0.00205230712890625,
-0.0050048828125,
0.036346435546875,
0.0186920166015625,
0.00560760498046875,
0.0018167495727539062,
-0.0438232421875,
-0.01175689697265625,
-0.0215301513671875,
-0.032196044921875,
0.020721435546875,
0.07427978515625,
-0.006900787353515625,
0.0179443359375,
-0.01141357421875,
0.044708251953125,
0.0182342529296875,
-0.0052032470703125,
0.00934600830078125,
0.0621337890625,
-0.0196990966796875,
-0.027374267578125,
-0.0160369873046875,
-0.05609130859375,
-0.01027679443359375,
0.0285186767578125,
-0.021453857421875,
-0.03125,
-0.0197906494140625,
0.045257568359375,
0.0435791015625,
0.0126190185546875,
0.05706787109375,
0.00893402099609375,
0.0335693359375,
0.01399993896484375,
0.0190887451171875,
-0.007781982421875,
-0.033416748046875,
0.054443359375,
-0.01459503173828125,
-0.0108489990234375,
-0.0006012916564941406,
0.013427734375,
0.02374267578125,
0.0008268356323242188,
0.0211181640625,
0.0009369850158691406,
0.037017822265625,
0.01161956787109375,
0.006481170654296875,
-0.0045318603515625,
-0.037506103515625,
-0.0210113525390625,
-0.0033550262451171875,
-0.02593994140625,
0.0111541748046875,
0.0277252197265625,
-0.017913818359375,
0.042724609375,
-0.0151519775390625,
-0.040252685546875,
0.01152801513671875,
-0.0287322998046875,
0.018890380859375,
0.0028781890869140625,
-0.01039886474609375,
0.0077362060546875,
-0.0137481689453125,
0.013275146484375,
-0.074462890625,
-0.04132080078125,
0.0189666748046875,
-0.0144500732421875,
0.047821044921875,
0.0035991668701171875,
0.042510986328125,
-0.024261474609375,
-0.0101470947265625,
-0.00980377197265625,
-0.042694091796875,
0.03662109375,
-0.052764892578125,
-0.00423431396484375,
-0.037506103515625,
-0.001811981201171875,
0.00042510032653808594,
-0.04949951171875,
0.0419921875,
0.0328369140625,
0.03521728515625,
-0.0280303955078125,
-0.00528717041015625,
-0.00849151611328125,
-0.037933349609375,
0.005519866943359375,
0.043792724609375,
0.043914794921875,
0.01111602783203125,
0.019775390625,
0.0084075927734375,
-0.01995849609375,
-0.052734375,
0.03729248046875,
-0.028289794921875,
0.00860595703125,
0.09307861328125,
0.00048804283142089844,
0.02056884765625,
-0.01430511474609375,
-0.07122802734375,
-0.0162353515625,
0.04107666015625,
-0.0169677734375,
0.006092071533203125,
-0.00382232666015625,
-0.0186004638671875,
-0.0029621124267578125,
-0.079345703125,
-0.01558685302734375,
-0.041595458984375,
0.00138092041015625,
0.0184478759765625,
0.017059326171875,
0.0174713134765625,
-0.00833892822265625,
0.0029773712158203125,
0.0038127899169921875,
-0.045684814453125,
0.0038909912109375,
0.02496337890625,
0.0264892578125,
0.0158538818359375,
-0.036651611328125,
-0.00868988037109375,
0.0245513916015625,
0.0131988525390625,
-0.025665283203125,
0.025360107421875,
0.007686614990234375,
-0.00865936279296875,
-0.01080322265625,
-0.0236968994140625,
0.016754150390625,
-0.0267181396484375,
-0.0067901611328125,
-0.052734375,
0.0015077590942382812,
0.0098114013671875,
-0.033203125,
0.043975830078125,
-0.0096588134765625,
-0.0439453125,
-0.0055694580078125,
-0.041015625,
0.03924560546875,
-0.03375244140625,
0.01299285888671875,
0.068359375,
0.004001617431640625,
-0.0059967041015625,
-0.0053558349609375,
-0.00798797607421875,
-0.0248870849609375,
0.02532958984375,
0.01204681396484375,
-0.04754638671875,
0.026824951171875,
0.07177734375,
0.01558685302734375,
0.005268096923828125,
-0.003765106201171875,
-0.016143798828125,
-0.0122528076171875,
-0.0110931396484375,
-0.04022216796875,
-0.023529052734375,
-0.047821044921875,
-0.1011962890625,
-0.0145416259765625,
-0.0186767578125,
-0.049346923828125,
0.0333251953125,
0.01259613037109375,
0.01306915283203125,
-0.00740814208984375,
-0.0284423828125,
-0.0225372314453125,
-0.046539306640625,
-0.05926513671875,
-0.01104736328125,
0.005023956298828125,
0.006931304931640625,
-0.001399993896484375,
0.0241546630859375,
-0.003032684326171875,
-0.016143798828125,
-0.020172119140625,
0.00789642333984375,
-0.0123748779296875,
-0.0645751953125,
-0.02294921875,
-0.02191162109375,
0.006195068359375,
-0.007965087890625,
0.02789306640625,
0.01085662841796875,
0.004505157470703125,
0.01291656494140625,
0.0269622802734375,
-0.041473388671875,
0.034271240234375,
0.004146575927734375,
-0.043426513671875,
-0.0168304443359375,
0.0229949951171875,
-0.056732177734375,
0.0230712890625,
-0.0070953369140625,
-0.020965576171875,
-0.0146026611328125,
-0.0126953125,
-0.01800537109375,
0.0164031982421875,
-0.0267486572265625,
0.003017425537109375,
-0.00839996337890625,
0.012420654296875,
-0.00589752197265625,
0.006496429443359375,
0.0010671615600585938,
-0.0051422119140625,
-0.00957489013671875,
0.0259857177734375,
-0.01995849609375,
-0.0079498291015625,
-0.01605224609375,
0.0055389404296875,
-0.027130126953125,
0.01104736328125,
-0.0511474609375,
-0.062164306640625,
0.0262908935546875,
-0.043975830078125,
0.04583740234375,
-0.06243896484375,
-0.019805908203125,
-0.021575927734375,
0.1060791015625,
-0.0290985107421875,
-0.0020351409912109375,
0.0290985107421875,
0.01708984375,
-0.06280517578125,
0.004383087158203125,
-0.0888671875,
0.006641387939453125,
0.0019178390502929688,
-0.0181121826171875,
-0.0290985107421875,
0.0002446174621582031,
-0.02362060546875,
0.00018286705017089844,
0.018585205078125,
-0.01436614990234375,
0.0186309814453125,
-0.03448486328125,
0.035308837890625,
0.00797271728515625,
0.0165863037109375,
-0.01201629638671875,
0.010772705078125,
-0.04803466796875,
-0.06951904296875,
-0.0006933212280273438,
-0.025238037109375,
0.06195068359375,
0.0120849609375,
-0.0005660057067871094,
-0.0205230712890625,
0.0311126708984375,
-0.015533447265625,
0.0384521484375,
-0.01421356201171875,
0.0192108154296875,
0.004131317138671875,
-0.0284576416015625,
-0.00958251953125,
-0.01558685302734375,
-0.0162200927734375,
-0.017547607421875,
-0.0151519775390625,
0.021240234375,
-0.03399658203125,
0.0114593505859375,
-0.01239776611328125,
-0.004230499267578125,
-0.038238525390625,
-0.057037353515625,
0.01922607421875,
0.03167724609375,
-0.0018100738525390625,
0.02734375,
-0.047393798828125,
-0.01983642578125,
0.046112060546875,
-0.022918701171875,
0.0193328857421875,
-0.00514984130859375,
0.0989990234375,
0.0118408203125,
-0.0101776123046875,
-0.00920867919921875,
0.004619598388671875,
0.026092529296875,
-0.023223876953125,
0.037322998046875,
0.04718017578125,
0.00018095970153808594,
-0.0246429443359375,
0.000972747802734375,
0.0213165283203125,
-0.00848388671875,
0.0097808837890625,
0.00787353515625,
-0.0211181640625,
0.0283660888671875,
0.0002799034118652344,
-0.0116424560546875,
-0.009185791015625,
-0.0106658935546875,
-0.040191650390625,
0.005367279052734375,
0.051361083984375,
0.005550384521484375,
0.0281524658203125,
-0.03759765625,
-0.0750732421875,
0.0307159423828125,
-0.0933837890625,
-0.0307769775390625,
-0.023651123046875,
0.008758544921875,
-0.0161285400390625,
-0.0187530517578125,
-0.00020372867584228516,
0.01216888427734375,
-0.038665771484375,
0.02130126953125,
0.019561767578125,
-0.0102081298828125,
-0.00203704833984375,
0.018829345703125,
-0.0204010009765625,
0.078369140625,
0.0130157470703125,
-0.038970947265625,
0.01788330078125,
-0.005596160888671875,
0.045654296875,
0.017913818359375,
0.0147247314453125,
0.03857421875,
0.01416778564453125,
-0.00795745849609375,
0.00015807151794433594,
-0.012603759765625,
-0.00604248046875,
-0.037353515625,
-0.00807952880859375,
-0.008575439453125,
-0.0013875961303710938,
0.0110626220703125,
0.053924560546875,
-0.0374755859375,
0.04888916015625,
-0.0070648193359375,
0.055419921875,
0.0740966796875,
-0.00400543212890625,
0.009490966796875,
0.0242919921875,
-0.02337646484375,
-0.001739501953125,
-0.0014801025390625,
-0.01143646240234375,
0.01374053955078125,
0.038848876953125,
0.0265655517578125,
0.032867431640625,
-0.0015401840209960938,
-0.034942626953125,
-0.029388427734375,
-0.00791168212890625,
0.0253448486328125,
-0.0267333984375,
-0.05023193359375,
-0.02264404296875,
0.023101806640625,
0.031768798828125,
-0.0496826171875,
0.0193328857421875,
-0.014556884765625,
-0.0269317626953125,
-0.01064300537109375,
0.005462646484375,
0.032684326171875,
-0.05517578125,
-0.051055908203125,
-0.0197906494140625,
-0.0211944580078125,
-0.0046234130859375,
0.0067138671875,
0.01806640625,
-0.032257080078125,
-0.05194091796875,
0.037322998046875,
-0.00467681884765625,
-0.002544403076171875,
-0.056396484375,
0.038604736328125,
-0.0484619140625,
-0.01387786865234375,
0.05548095703125,
0.0212554931640625,
0.0008497238159179688,
-0.00159454345703125,
-0.032806396484375,
-0.01348876953125,
0.0033016204833984375,
-0.01444244384765625,
-0.027191162109375,
-0.00440216064453125,
0.01012420654296875,
0.0202178955078125,
-0.01512908935546875,
-0.028839111328125,
0.001705169677734375,
0.00197601318359375,
-0.002880096435546875,
0.00782012939453125,
-0.034088134765625,
0.044189453125,
0.035491943359375,
0.0232391357421875,
0.04058837890625,
0.055389404296875,
0.0253448486328125,
-0.048858642578125,
0.0065460205078125,
-0.0080413818359375,
-0.0106964111328125,
-0.02825927734375,
-0.0021114349365234375,
0.007282257080078125,
0.06549072265625,
-0.006687164306640625,
0.0242767333984375,
0.007144927978515625,
0.007045745849609375,
-0.009857177734375,
-0.035369873046875,
0.007213592529296875,
-0.0029754638671875,
0.038421630859375,
-0.0253448486328125,
0.0228424072265625,
0.0024166107177734375,
0.022552490234375,
-0.01003265380859375,
-0.027099609375,
-0.006988525390625,
0.025421142578125,
-0.05303955078125,
0.0517578125,
0.052215576171875,
-0.0005688667297363281,
0.0413818359375,
0.011566162109375,
-0.00016033649444580078,
0.022003173828125,
-0.0131378173828125,
-0.04217529296875,
-0.009185791015625,
0.0008068084716796875,
-0.0012121200561523438,
-0.00734710693359375,
0.00551605224609375,
-0.00691986083984375,
0.038482666015625,
0.06732177734375,
0.0814208984375,
-0.07720947265625,
0.007598876953125,
0.007350921630859375,
-0.034942626953125,
0.040008544921875,
-0.0283660888671875,
-0.0034008026123046875,
-0.03155517578125,
0.08868408203125,
-0.0191650390625,
-0.0091705322265625,
0.0310516357421875,
-0.017852783203125,
0.00007414817810058594,
-0.0074310302734375,
0.0155029296875,
0.025909423828125,
0.039642333984375,
0.0200042724609375,
-0.036407470703125,
0.073974609375,
-0.006626129150390625,
-0.00917816162109375,
0.00988006591796875,
-0.0217742919921875,
-0.06451416015625,
-0.00881195068359375,
-0.0377197265625,
-0.0104217529296875,
-0.0218658447265625,
-0.003570556640625,
0.08270263671875,
0.050048828125,
0.019989013671875,
-0.038604736328125,
0.045440673828125,
0.00104522705078125,
-0.0306396484375,
-0.007358551025390625,
0.0161895751953125,
0.01488494873046875,
-0.021453857421875,
0.03173828125,
-0.0272979736328125,
-0.016632080078125,
0.0024967193603515625,
-0.00441741943359375,
0.016754150390625,
-0.053466796875,
0.012969970703125,
0.036163330078125,
0.0177764892578125,
0.0025539398193359375,
-0.008636474609375,
0.031463623046875,
-0.08746337890625,
-0.07977294921875,
0.0172271728515625,
-0.0560302734375,
-0.0026378631591796875,
0.004154205322265625,
-0.0804443359375,
0.08740234375,
0.0266265869140625,
0.046173095703125,
-0.005062103271484375,
0.0211181640625,
-0.027740478515625,
-0.00331878662109375,
-0.024017333984375,
0.042694091796875,
0.0235595703125,
0.032135009765625,
-0.03741455078125,
-0.011688232421875,
0.00897979736328125,
0.044525146484375,
0.04705810546875,
0.033599853515625,
-0.0775146484375,
-0.0297698974609375,
-0.0115509033203125,
0.0198211669921875,
-0.00028634071350097656,
0.07208251953125,
-0.0093994140625,
0.0008068084716796875,
0.01554107666015625,
-0.02508544921875,
0.023956298828125,
-0.00527191162109375,
-0.02178955078125,
0.005462646484375,
-0.0109405517578125,
-0.03326416015625,
-0.00926971435546875,
0.0069732666015625,
-0.03765869140625,
-0.0024166107177734375,
0.005001068115234375,
0.008697509765625,
0.0169677734375,
-0.00800323486328125,
-0.0161895751953125,
0.027313232421875,
0.0638427734375,
-0.02496337890625,
0.049072265625,
0.0005326271057128906,
0.00949859619140625,
0.0303802490234375,
0.021942138671875,
0.004116058349609375,
0.033355712890625,
0.004482269287109375,
0.028594970703125,
0.0015392303466796875,
0.05108642578125,
0.044525146484375,
0.026947021484375,
-0.050323486328125,
-0.0316162109375,
0.06292724609375,
0.07806396484375,
-0.0307464599609375,
-0.00934600830078125,
0.026336669921875,
0.0283966064453125,
0.00009316205978393555,
0.009765625,
0.048431396484375,
-0.01812744140625,
0.00873565673828125,
-0.035003662109375,
-0.00357818603515625,
0.011016845703125,
0.004520416259765625,
0.00063323974609375,
0.0048065185546875,
0.011322021484375,
0.003246307373046875,
-0.035675048828125,
0.0066070556640625,
-0.0030384063720703125,
0.02362060546875,
0.01947021484375,
0.0298919677734375,
0.01184844970703125,
-0.00919342041015625,
-0.0117950439453125,
0.038726806640625,
0.0164031982421875,
-0.007293701171875,
-0.0196380615234375,
-0.050750732421875,
0.050445556640625,
0.0224609375,
-0.00861358642578125,
0.0430908203125,
0.042022705078125,
0.03302001953125,
-0.0360107421875,
-0.01355743408203125,
0.007656097412109375,
-0.036956787109375,
0.0142974853515625,
-0.032867431640625,
-0.001209259033203125,
-0.015289306640625,
-0.02178955078125,
-0.032684326171875,
0.01369476318359375,
0.030364990234375,
-0.0200958251953125,
0.0377197265625,
-0.01666259765625,
-0.017242431640625,
0.02471923828125,
-0.0022411346435546875,
0.04437255859375,
-0.003070831298828125,
-0.09051513671875,
-0.0075225830078125,
-0.055908203125,
-0.0218048095703125,
0.021575927734375,
0.0345458984375,
-0.0018911361694335938,
-0.0025119781494140625,
0.01311492919921875,
-0.00812530517578125,
0.0294647216796875,
-0.00226593017578125,
-0.005008697509765625,
0.0017862319946289062,
0.031982421875,
-0.01218414306640625,
-0.0748291015625,
-0.0152435302734375,
-0.003265380859375,
-0.004055023193359375,
-0.01236724853515625,
0.04229736328125,
0.0129241943359375,
-0.0028324127197265625,
-0.0301361083984375,
-0.00435638427734375,
-0.0089874267578125,
-0.04241943359375,
0.00646209716796875,
0.01097869873046875,
-0.00018846988677978516,
0.0015058517456054688,
-0.038299560546875,
0.036285400390625,
0.0014638900756835938,
0.01128387451171875,
0.01480865478515625,
-0.022064208984375,
0.01508331298828125,
0.037200927734375,
0.0618896484375,
-0.025909423828125,
-0.0264892578125,
-0.0855712890625,
-0.0263214111328125,
0.062225341796875,
0.0158843994140625,
-0.035888671875,
0.050140380859375,
-0.00383758544921875,
-0.0281829833984375,
-0.017303466796875,
-0.046356201171875,
-0.0489501953125,
0.01035308837890625,
0.043243408203125,
-0.0070648193359375,
-0.010986328125,
-0.015289306640625,
-0.01485443115234375,
0.004425048828125,
-0.01183319091796875,
0.008453369140625,
-0.05938720703125,
0.0282745361328125,
0.0574951171875,
0.06964111328125,
0.007778167724609375,
0.031005859375,
0.01885986328125,
-0.0121002197265625,
0.005809783935546875,
-0.03350830078125,
-0.04644775390625,
-0.07733154296875,
0.016021728515625,
0.028076171875,
-0.052581787109375,
-0.01363372802734375,
-0.09637451171875,
-0.0098419189453125,
0.03912353515625,
-0.0010528564453125,
-0.0250701904296875,
0.00963592529296875,
-0.040313720703125,
0.031341552734375,
-0.01371002197265625,
-0.055816650390625,
0.014434814453125,
0.05859375,
-0.00785064697265625,
-0.005619049072265625,
-0.03076171875,
-0.02276611328125,
-0.034759521484375,
0.01373291015625,
0.048919677734375,
-0.00945281982421875,
-0.008697509765625,
0.0222930908203125,
-0.01113128662109375,
0.061798095703125,
-0.0611572265625,
-0.0127410888671875,
-0.006404876708984375,
-0.005031585693359375,
-0.00797271728515625,
-0.047332763671875,
0.0157012939453125,
-0.07080078125,
-0.02227783203125,
-0.032470703125,
0.0257568359375,
0.033294677734375,
-0.024810791015625,
-0.053314208984375,
0.038116455078125,
-0.01849365234375,
-0.033111572265625,
-0.04656982421875,
0.0018377304077148438,
-0.00585174560546875,
-0.012237548828125,
-0.0264434814453125,
-0.00858306884765625,
-0.021270751953125,
0.044403076171875,
0.0129547119140625,
-0.0209808349609375,
0.03509521484375,
-0.0089569091796875,
-0.033172607421875,
0.00785064697265625,
0.018646240234375,
-0.0081634521484375,
0.040679931640625,
-0.041595458984375,
0.04736328125,
0.06231689453125,
-0.0158843994140625,
-0.01275634765625,
0.0032329559326171875,
-0.049957275390625,
-0.038482666015625,
-0.0162811279296875,
-0.026641845703125,
-0.01224517822265625,
0.12237548828125,
0.051177978515625,
0.0284271240234375,
-0.042938232421875,
-0.026580810546875,
-0.034454345703125,
-0.04962158203125,
-0.00803375244140625,
0.0270233154296875,
-0.0592041015625,
0.01824951171875,
-0.0060272216796875,
-0.0212554931640625,
0.0157928466796875,
-0.01052093505859375,
-0.0322265625,
0.0167083740234375,
0.0297393798828125,
0.00499725341796875,
-0.01557159423828125,
0.00966644287109375,
0.041900634765625,
-0.044769287109375,
-0.043365478515625,
-0.0037288665771484375,
0.0010890960693359375,
-0.034881591796875,
-0.04052734375,
-0.00872802734375,
-0.0003018379211425781,
-0.03509521484375,
0.0308074951171875,
-0.01444244384765625,
0.036102294921875,
-0.0419921875,
-0.00420379638671875,
0.004573822021484375,
0.01947021484375,
-0.0292816162109375,
0.025421142578125,
0.046844482421875,
0.048126220703125,
-0.00823211669921875,
0.053985595703125,
-0.0175323486328125,
0.004180908203125,
-0.048370361328125,
0.052825927734375,
-0.018096923828125,
0.004428863525390625,
0.004131317138671875,
0.007305145263671875,
-0.01099395751953125,
0.02056884765625,
-0.001873016357421875,
-0.05450439453125,
0.03363037109375,
0.0173797607421875,
0.033966064453125,
0.0216522216796875
]
|
683fc2daa0a985830e7285caf5e3a5905a99c02e | Wordpress Stackexchange
Q: wordpress query - orderby child post date I have support ticket system which i have built using wordpress.
The basic functionality is that when a "ticket" is created, it creates a post. When an admin replies, it then add a child post to the original post.
My question is how can i order my posts by the child post_date is ASC order?
My query args at the moment are:
$args = array(
'post_type' => 'support_tickets',
'numberposts' => -1,
'post_parent' => 0,
'orderby' => 'date',
'order' => 'DESC' );
This only obviously orders the parent post's in ASC by date. Is what i require achievable?
A: You should be able to do this with the get_children function (see the codex),
$ticket_id = 34; // assume you want to retried the replies of ticket post id=34
$args = array(
'post_type' => 'support_tickets',
'numberposts' => -1,
'post_parent' => $ticket_id,
'orderby' => 'date',
'order' => 'DESC' );
$replies = get_children( $args );
Assuming that your custom post support_tickets has been registered with the attribute hierarchical set to true (see codex).
| Q: wordpress query - orderby child post date I have support ticket system which i have built using wordpress.
The basic functionality is that when a "ticket" is created, it creates a post. When an admin replies, it then add a child post to the original post.
My question is how can i order my posts by the child post_date is ASC order?
My query args at the moment are:
$args = array(
'post_type' => 'support_tickets',
'numberposts' => -1,
'post_parent' => 0,
'orderby' => 'date',
'order' => 'DESC' );
This only obviously orders the parent post's in ASC by date. Is what i require achievable?
A: You should be able to do this with the get_children function (see the codex),
$ticket_id = 34; // assume you want to retried the replies of ticket post id=34
$args = array(
'post_type' => 'support_tickets',
'numberposts' => -1,
'post_parent' => $ticket_id,
'orderby' => 'date',
'order' => 'DESC' );
$replies = get_children( $args );
Assuming that your custom post support_tickets has been registered with the attribute hierarchical set to true (see codex).
| wordpress | {
"language": "en",
"length": 177,
"provenance": "stackexchange_00019.jsonl.gz:439650",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124677"
} | [
0.06494140625,
-0.0233306884765625,
0.03692626953125,
-0.07763671875,
-0.00884246826171875,
-0.00978851318359375,
0.005229949951171875,
-0.005313873291015625,
0.015777587890625,
0.01702880859375,
-0.020263671875,
-0.0253448486328125,
-0.039276123046875,
-0.02569580078125,
-0.052154541015625,
-0.0594482421875,
0.068115234375,
-0.041473388671875,
0.024139404296875,
-0.004215240478515625,
0.015899658203125,
0.029388427734375,
0.0430908203125,
0.046875,
0.039306640625,
0.01248931884765625,
0.037078857421875,
-0.050445556640625,
0.07940673828125,
0.0169525146484375,
0.0330810546875,
-0.07525634765625,
0.030364990234375,
-0.00853729248046875,
0.0110931396484375,
-0.05621337890625,
0.0543212890625,
-0.040557861328125,
-0.00981903076171875,
0.03875732421875,
0.006427764892578125,
-0.004261016845703125,
0.01068115234375,
-0.00646209716796875,
-0.0164642333984375,
-0.007293701171875,
0.0052490234375,
-0.01061248779296875,
0.0183868408203125,
0.0169525146484375,
0.0181427001953125,
-0.019805908203125,
0.03466796875,
-0.01806640625,
-0.0294952392578125,
-0.02105712890625,
0.008514404296875,
-0.00934600830078125,
0.0014829635620117188,
-0.02728271484375,
-0.0027256011962890625,
0.0237884521484375,
0.0318603515625,
0.03936767578125,
-0.033477783203125,
0.0127410888671875,
0.02532958984375,
-0.003955841064453125,
-0.0220947265625,
-0.042938232421875,
0.011932373046875,
-0.0003237724304199219,
-0.0189056396484375,
-0.0247955322265625,
0.0020236968994140625,
-0.028900146484375,
-0.01145172119140625,
-0.07293701171875,
-0.0012598037719726562,
0.04327392578125,
-0.00913238525390625,
0.0147552490234375,
-0.0318603515625,
-0.01253509521484375,
-0.00553131103515625,
-0.012664794921875,
-0.031494140625,
0.0030059814453125,
-0.018096923828125,
-0.0260009765625,
-0.00228118896484375,
-0.0280303955078125,
-0.0194244384765625,
0.0215301513671875,
-0.01557159423828125,
-0.0184173583984375,
0.0234832763671875,
0.07293701171875,
-0.057586669921875,
-0.042083740234375,
-0.03997802734375,
0.01152801513671875,
-0.068115234375,
0.0007948875427246094,
0.00412750244140625,
0.0180206298828125,
-0.01500701904296875,
-0.074462890625,
0.039642333984375,
0.037261962890625,
-0.0031185150146484375,
0.05902099609375,
-0.00498199462890625,
-0.0064544677734375,
-0.0175018310546875,
0.044769287109375,
-0.01129913330078125,
0.01047515869140625,
0.0003838539123535156,
0.0308380126953125,
-0.0184478759765625,
0.0011014938354492188,
-0.0377197265625,
-0.0243988037109375,
0.0052032470703125,
-0.0158538818359375,
-0.017578125,
0.0128173828125,
-0.02142333984375,
0.0167083740234375,
-0.03790283203125,
0.01345062255859375,
0.05328369140625,
0.01495361328125,
-0.006999969482421875,
-0.01206207275390625,
-0.0015058517456054688,
-0.0224151611328125,
0.00351715087890625,
-0.004024505615234375,
0.0304718017578125,
-0.047515869140625,
0.00577545166015625,
0.0255126953125,
-0.0335693359375,
0.0018739700317382812,
0.003772735595703125,
0.01464080810546875,
-0.0015802383422851562,
-0.029754638671875,
-0.01776123046875,
-0.0120086669921875,
0.0283660888671875,
-0.00888824462890625,
-0.055938720703125,
-0.006572723388671875,
-0.0338134765625,
-0.004283905029296875,
-0.0125885009765625,
-0.005069732666015625,
0.00028061866760253906,
0.00299072265625,
0.041961669921875,
-0.058929443359375,
-0.0712890625,
0.003948211669921875,
-0.0731201171875,
-0.0296630859375,
0.01267242431640625,
-0.032196044921875,
0.00872802734375,
-0.022247314453125,
-0.004711151123046875,
-0.01226806640625,
0.00620269775390625,
0.0223541259765625,
-0.02239990234375,
-0.0012063980102539062,
0.012664794921875,
0.0164947509765625,
0.00875091552734375,
-0.03448486328125,
0.01100921630859375,
0.0159759521484375,
-0.01189422607421875,
0.01788330078125,
0.0012521743774414062,
0.00045609474182128906,
-0.01336669921875,
0.00942230224609375,
0.0022563934326171875,
0.057403564453125,
-0.0699462890625,
0.0745849609375,
0.01003265380859375,
-0.052001953125,
-0.0070037841796875,
-0.017181396484375,
0.00958251953125,
-0.023223876953125,
-0.022491455078125,
0.0128326416015625,
-0.004306793212890625,
0.0169677734375,
-0.0005435943603515625,
0.006069183349609375,
-0.0025653839111328125,
0.024932861328125,
-0.0027008056640625,
0.0399169921875,
0.02154541015625,
0.015777587890625,
-0.04864501953125,
0.027191162109375,
-0.01070404052734375,
-0.0259552001953125,
0.0296783447265625,
0.042877197265625,
-0.0251312255859375,
0.0220947265625,
-0.036712646484375,
-0.062042236328125,
-0.0156402587890625,
0.06390380859375,
0.062042236328125,
-0.049530029296875,
0.012420654296875,
-0.03009033203125,
0.079345703125,
-0.0168914794921875,
0.01146697998046875,
-0.006038665771484375,
0.0217437744140625,
0.03741455078125,
-0.025634765625,
0.0024166107177734375,
0.0112152099609375,
-0.0079803466796875,
0.006744384765625,
0.0258636474609375,
0.03033447265625,
0.009613037109375,
0.0318603515625,
0.057861328125,
0.0008897781372070312,
-0.04833984375,
0.0097198486328125,
0.00601959228515625,
0.00760650634765625,
0.078369140625,
0.0418701171875,
0.034454345703125,
-0.0114593505859375,
0.0102386474609375,
0.01035308837890625,
0.0251312255859375,
0.0225982666015625,
0.00196075439453125,
-0.042877197265625,
0.022247314453125,
0.0208892822265625,
-0.04742431640625,
-0.087158203125,
0.0029773712158203125,
-0.0005488395690917969,
-0.0034236907958984375,
0.021881103515625,
0.01079559326171875,
-0.01129150390625,
-0.009979248046875,
0.019927978515625,
-0.017181396484375,
0.0218505859375,
0.0155181884765625,
-0.058837890625,
0.025115966796875,
0.0012121200561523438,
-0.0016613006591796875,
-0.0053253173828125,
-0.0016984939575195312,
0.01910400390625,
0.06781005859375,
0.0005965232849121094,
-0.01319122314453125,
-0.02520751953125,
-0.02386474609375,
-0.0020580291748046875,
0.045806884765625,
-0.053863525390625,
-0.015380859375,
0.005184173583984375,
0.08782958984375,
0.00917816162109375,
0.01104736328125,
0.00650787353515625,
0.0229949951171875,
-0.01055908203125,
-0.0111846923828125,
0.016448974609375,
-0.0213470458984375,
0.0155181884765625,
0.054351806640625,
0.03656005859375,
-0.03924560546875,
-0.0128326416015625,
-0.01184844970703125,
-0.0193634033203125,
0.028656005859375,
0.002895355224609375,
-0.045867919921875,
0.0110931396484375,
0.047698974609375,
0.04180908203125,
0.0994873046875,
0.01062774658203125,
-0.03515625,
0.0264129638671875,
0.0576171875,
-0.049530029296875,
-0.12054443359375,
-0.01097869873046875,
-0.08502197265625,
-0.0052490234375,
-0.0195159912109375,
-0.0391845703125,
-0.0016231536865234375,
-0.0012845993041992188,
0.01366424560546875,
-0.0153961181640625,
0.002960205078125,
-0.03704833984375,
-0.00811004638671875,
-0.018280029296875,
0.02154541015625,
-0.00836181640625,
0.0007390975952148438,
0.00972747802734375,
0.0853271484375,
0.0215911865234375,
-0.0743408203125,
-0.006183624267578125,
0.0228118896484375,
-0.0401611328125,
0.0122222900390625,
-0.00881195068359375,
-0.02593994140625,
0.01010894775390625,
-0.006740570068359375,
0.004322052001953125,
0.0110015869140625,
0.0016803741455078125,
0.007091522216796875,
-0.01519012451171875,
0.0638427734375,
0.0210113525390625,
-0.0012912750244140625,
0.030364990234375,
0.07574462890625,
0.0267486572265625,
0.0012979507446289062,
0.0161285400390625,
-0.0289459228515625,
-0.024139404296875,
-0.011138916015625,
-0.0014238357543945312,
0.0243988037109375,
-0.032623291015625,
0.005825042724609375,
0.0049896240234375,
-0.01224517822265625,
0.0638427734375,
-0.031463623046875,
0.01947021484375,
-0.01018524169921875,
-0.00717926025390625,
-0.054779052734375,
0.04083251953125,
-0.0024318695068359375,
-0.0201263427734375,
0.018890380859375,
0.01441192626953125,
0.01430511474609375,
-0.015777587890625,
-0.04046630859375,
-0.052154541015625,
0.052032470703125,
0.0179290771484375,
0.009002685546875,
-0.029693603515625,
-0.034088134765625,
-0.0082244873046875,
0.072509765625,
-0.0787353515625,
-0.036224365234375,
0.0292510986328125,
0.033111572265625,
-0.00116729736328125,
-0.0240631103515625,
-0.004199981689453125,
-0.038482666015625,
-0.0266571044921875,
0.01224517822265625,
0.00922393798828125,
-0.00829315185546875,
-0.0223541259765625,
0.0302886962890625,
-0.0030841827392578125,
-0.0092926025390625,
0.0499267578125,
-0.0501708984375,
0.0232086181640625,
0.0157470703125,
0.0155029296875,
-0.00737762451171875,
-0.02215576171875,
-0.01047515869140625,
-0.11614990234375,
-0.017059326171875,
0.0087127685546875,
0.05560302734375,
-0.005466461181640625,
-0.048828125,
-0.0171356201171875,
0.053863525390625,
0.0010538101196289062,
0.00907135009765625,
-0.00020015239715576172,
-0.00501251220703125,
-0.018585205078125,
0.0220489501953125,
0.007080078125,
-0.020660400390625,
-0.026519775390625,
-0.0021419525146484375,
0.0169677734375,
0.0259552001953125,
-0.028594970703125,
-0.0318603515625,
0.0009026527404785156,
0.00017642974853515625,
-0.0236968994140625,
-0.041961669921875,
-0.058135986328125,
0.005268096923828125,
-0.04998779296875,
-0.0081024169921875,
-0.039794921875,
-0.0780029296875,
-0.031341552734375,
-0.0194549560546875,
-0.0203399658203125,
0.02557373046875,
0.038818359375,
0.0274505615234375,
0.01340484619140625,
-0.02227783203125,
-0.0021228790283203125,
0.035980224609375,
0.0015811920166015625,
0.060791015625,
0.032012939453125,
-0.0263519287109375,
0.0576171875,
0.0150604248046875,
-0.002994537353515625,
0.032806396484375,
0.0188751220703125,
0.0170135498046875,
-0.038116455078125,
0.0271759033203125,
0.018798828125,
-0.053924560546875,
0.036376953125,
0.007236480712890625,
-0.0379638671875,
-0.01485443115234375,
0.051177978515625,
-0.00015866756439208984,
0.01496124267578125,
-0.044891357421875,
-0.047637939453125,
0.0209503173828125,
-0.042572021484375,
-0.03155517578125,
0.00028967857360839844,
-0.0010776519775390625,
-0.0067138671875,
0.0037212371826171875,
0.0081939697265625,
0.0216064453125,
0.02191162109375,
-0.0128021240234375,
0.0235595703125,
0.0295867919921875,
-0.00001621246337890625,
0.0062255859375,
0.0005764961242675781,
0.033905029296875,
0.00838470458984375,
-0.0165863037109375,
-0.034576416015625,
0.0038967132568359375,
0.0106658935546875,
-0.00927734375,
-0.01203155517578125,
0.033233642578125,
0.023101806640625,
0.014556884765625,
-0.01702880859375,
-0.03436279296875,
0.035675048828125,
-0.02532958984375,
-0.01049041748046875,
0.026611328125,
-0.041259765625,
-0.01065826416015625,
0.0207061767578125,
0.002685546875,
-0.01374053955078125,
-0.00859832763671875,
-0.0149383544921875,
0.0116424560546875,
0.0076904296875,
0.048828125,
-0.0020084381103515625,
-0.00690460205078125,
0.006008148193359375,
0.022705078125,
-0.00463104248046875,
-0.0367431640625,
0.052947998046875,
0.0187530517578125,
0.010040283203125,
0.033538818359375,
-0.0234527587890625,
0.035369873046875,
-0.0277099609375,
0.0039215087890625,
0.044189453125,
0.01495361328125,
-0.0270233154296875,
-0.031982421875,
0.0019006729125976562,
0.05218505859375,
-0.0213775634765625,
0.0626220703125,
-0.036163330078125,
0.041015625,
-0.01837158203125,
0.0039520263671875,
-0.0070953369140625,
-0.005336761474609375,
0.0157318115234375,
-0.002506256103515625,
-0.0078887939453125,
0.00571441650390625,
-0.009613037109375,
-0.01226043701171875,
-0.019683837890625,
0.04827880859375,
-0.01097869873046875,
0.06048583984375,
-0.07171630859375,
0.00666046142578125,
-0.0721435546875,
0.0162506103515625,
-0.0011196136474609375,
0.0146942138671875,
-0.043548583984375,
-0.0005593299865722656,
-0.004619598388671875,
-0.02325439453125,
-0.01389312744140625,
-0.0523681640625,
-0.0377197265625,
-0.008697509765625,
0.00030422210693359375,
0.031707763671875,
-0.0027980804443359375,
-0.0352783203125,
-0.0230255126953125,
-0.0195159912109375,
0.0067291259765625,
-0.004894256591796875,
0.0301055908203125,
0.083984375,
-0.0631103515625,
0.045684814453125,
0.042236328125,
0.0650634765625,
-0.0211181640625,
-0.0126495361328125,
-0.0015802383422851562,
-0.0265655517578125,
0.007236480712890625,
-0.007144927978515625,
0.01263427734375,
-0.00516510009765625,
0.01169586181640625,
-0.00029206275939941406,
0.030548095703125,
0.0145263671875,
0.015869140625,
-0.006740570068359375,
-0.034454345703125,
-0.00513458251953125,
0.035308837890625,
0.0202484130859375,
-0.032257080078125,
-0.0181732177734375,
-0.0016078948974609375,
0.00991058349609375,
0.005359649658203125,
-0.018310546875,
-0.0017375946044921875,
0.007625579833984375,
-0.040802001953125,
0.050262451171875,
0.08258056640625,
0.034210205078125,
0.034088134765625,
0.002208709716796875,
0.023406982421875,
-0.01947021484375,
0.0672607421875,
-0.00551605224609375,
-0.04718017578125,
0.088623046875,
0.0198516845703125,
-0.0338134765625,
0.0135498046875,
-0.047454833984375,
-0.0197601318359375,
-0.03240966796875,
0.006885528564453125,
0.0200958251953125,
-0.002361297607421875,
-0.0114898681640625,
-0.00957489013671875,
0.040618896484375,
0.006549835205078125,
-0.01047515869140625,
-0.0249786376953125,
-0.006351470947265625,
-0.0180816650390625,
-0.03179931640625,
-0.02197265625,
-0.0213623046875,
-0.0128173828125,
-0.00988006591796875,
0.0284271240234375,
-0.0147705078125,
0.0133056640625,
-0.0421142578125,
-0.0297698974609375,
-0.01248931884765625,
-0.0255584716796875,
0.003620147705078125,
0.0003192424774169922,
-0.01039886474609375,
-0.06976318359375,
-0.0021839141845703125,
-0.043365478515625,
0.00701141357421875,
0.0253143310546875,
-0.042022705078125,
0.01523590087890625,
0.0194091796875,
-0.030914306640625,
0.01119232177734375,
-0.022857666015625,
-0.0041961669921875,
-0.0504150390625,
-0.01158905029296875,
0.00498199462890625,
-0.0004706382751464844,
0.0023193359375,
0.029205322265625,
-0.0399169921875,
-0.01434326171875,
-0.0018453598022460938,
0.0297088623046875,
0.06414794921875,
-0.041351318359375,
-0.02679443359375,
0.027496337890625,
0.04302978515625,
-0.011505126953125,
0.01461029052734375,
0.01148223876953125,
-0.054931640625,
-0.027496337890625,
0.01522064208984375,
-0.031707763671875,
-0.03863525390625,
-0.026275634765625,
-0.046417236328125,
0.09161376953125,
-0.01026153564453125,
0.004863739013671875,
0.0211029052734375,
0.03692626953125,
-0.050048828125,
0.0089111328125,
-0.0301971435546875,
0.04632568359375,
0.0278778076171875,
0.03448486328125,
-0.06903076171875,
-0.02783203125,
-0.004604339599609375,
0.049896240234375,
0.0572509765625,
0.0153045654296875,
-0.088134765625,
0.0037631988525390625,
0.0623779296875,
0.036956787109375,
0.02911376953125,
0.0810546875,
0.028106689453125,
0.0192108154296875,
0.035797119140625,
-0.01110076904296875,
0.0428466796875,
-0.042266845703125,
0.0015439987182617188,
0.038818359375,
0.0224151611328125,
0.01337432861328125,
0.0009131431579589844,
0.006500244140625,
-0.0631103515625,
0.0105743408203125,
0.050048828125,
-0.031036376953125,
0.0302581787109375,
0.0292205810546875,
0.032470703125,
-0.0693359375,
-0.040283203125,
-0.0240325927734375,
0.048736572265625,
0.00075531005859375,
0.0037517547607421875,
0.0151214599609375,
0.040283203125,
-0.0386962890625,
-0.01409912109375,
0.0027599334716796875,
0.035064697265625,
-0.07232666015625,
0.00606536865234375,
-0.0018949508666992188,
0.03192138671875,
-0.02386474609375,
0.0150909423828125,
0.03448486328125,
0.02490234375,
-0.02215576171875,
0.015655517578125,
0.014862060546875,
0.02734375,
0.0189056396484375,
-0.06488037109375,
0.020416259765625,
-0.022186279296875,
0.01041412353515625,
-0.0614013671875,
-0.00676727294921875,
0.03338623046875,
0.036346435546875,
-0.0081787109375,
-0.01024627685546875,
-0.031829833984375,
-0.03302001953125,
-0.004627227783203125,
0.00920867919921875,
0.0157318115234375,
-0.00904083251953125,
-0.0157623291015625,
0.0198822021484375,
-0.018341064453125,
0.0281219482421875,
0.012481689453125,
-0.034454345703125,
0.01030731201171875,
-0.0265655517578125,
0.03326416015625,
0.0232696533203125,
-0.034881591796875,
0.0167236328125,
0.0164947509765625,
0.039581298828125,
0.0369873046875,
0.015350341796875,
-0.03662109375,
0.0007214546203613281,
0.03076171875,
-0.03656005859375,
-0.0009756088256835938,
-0.0295867919921875,
-0.037872314453125,
-0.02093505859375,
-0.024658203125,
0.03643798828125,
-0.018829345703125,
0.0008592605590820312,
0.0174407958984375,
0.047210693359375,
-0.005374908447265625,
0.0246429443359375,
0.072509765625,
-0.0037097930908203125,
0.04888916015625,
0.02825927734375,
-0.09429931640625,
-0.051422119140625,
0.017913818359375,
0.01885986328125,
0.03619384765625,
0.038330078125,
-0.0009675025939941406,
0.0108489990234375,
-0.00838470458984375,
0.01123809814453125,
-0.0096435546875,
-0.021759033203125,
0.0214996337890625,
0.00885009765625,
0.00928497314453125,
0.0172576904296875,
-0.032257080078125,
-0.0251312255859375,
-0.00983428955078125,
0.0186767578125,
-0.01549530029296875,
0.039825439453125,
0.016510009765625,
0.00995635986328125,
-0.01104736328125,
0.034881591796875,
-0.04754638671875,
-0.038299560546875,
0.0716552734375,
-0.04156494140625,
-0.0291748046875,
0.0007762908935546875,
0.0008182525634765625,
0.0225982666015625,
0.0255279541015625,
-0.031280517578125,
-0.013519287109375,
-0.0143585205078125,
0.01444244384765625,
-0.0079345703125,
-0.00637054443359375,
-0.034332275390625,
-0.01297760009765625,
-0.016082763671875,
-0.0221099853515625,
0.01300811767578125,
0.0012369155883789062,
0.00901031494140625,
0.0535888671875,
0.04791259765625,
-0.01447296142578125,
0.057861328125,
-0.0662841796875,
0.10784912109375,
0.03399658203125,
-0.016845703125,
0.01873779296875,
-0.009765625,
-0.01702880859375,
0.0268707275390625,
0.01155853271484375,
-0.0264739990234375,
0.00652313232421875,
-0.005126953125,
0.03271484375,
0.01593017578125,
0.045013427734375,
-0.0186614990234375,
-0.0254974365234375,
0.0133514404296875,
-0.0176239013671875,
0.0021114349365234375,
-0.005451202392578125,
-0.0233917236328125,
-0.041412353515625,
0.022979736328125,
0.017730712890625,
-0.00568389892578125,
0.0003399848937988281,
-0.01074981689453125,
-0.0031604766845703125,
0.016754150390625,
0.0081329345703125,
-0.03253173828125,
0.0355224609375,
-0.00251007080078125,
-0.03167724609375,
0.01490020751953125,
0.013458251953125,
-0.02081298828125,
-0.039093017578125,
-0.0237274169921875,
0.004383087158203125,
-0.04364013671875,
0.02764892578125,
-0.00269317626953125,
0.002620697021484375,
0.029449462890625,
-0.013275146484375,
0.0021076202392578125,
-0.00696563720703125,
0.0034332275390625,
0.0328369140625,
-0.0075225830078125,
-0.0203094482421875,
0.006374359130859375,
0.0257415771484375,
-0.04180908203125,
-0.0131988525390625,
0.0274200439453125,
-0.022674560546875,
-0.0011453628540039062,
-0.01666259765625,
0.043701171875,
0.06463623046875,
-0.0128326416015625,
-0.0572509765625,
0.0797119140625,
-0.025390625,
-0.03155517578125,
-0.0089874267578125,
-0.01136016845703125,
-0.0121612548828125,
0.042266845703125,
0.0114898681640625,
-0.0294189453125,
-0.0248565673828125,
0.0212554931640625,
-0.00823211669921875,
0.03155517578125,
-0.0085601806640625,
0.0259246826171875,
-0.0711669921875,
0.01739501953125,
-0.007381439208984375,
-0.00972747802734375,
-0.020416259765625,
0.0186767578125,
0.0107269287109375,
0.03424072265625,
-0.00897216796875,
-0.01141357421875,
0.01702880859375,
-0.00948333740234375,
0.0135650634765625,
-0.0005931854248046875,
-0.0286865234375,
-0.0252532958984375,
-0.0192108154296875,
0.06500244140625,
-0.0009431838989257812,
-0.0113525390625,
-0.02471923828125,
-0.04388427734375,
-0.0235137939453125,
-0.0204010009765625,
0.0135040283203125,
-0.0765380859375,
-0.019927978515625,
0.02001953125,
0.003139495849609375,
-0.0176849365234375,
0.0095672607421875,
-0.030914306640625,
-0.0199432373046875,
-0.0021076202392578125,
-0.0088043212890625,
-0.03009033203125,
0.044281005859375,
0.03961181640625,
-0.04498291015625,
-0.0268402099609375,
-0.01062774658203125,
-0.0074310302734375,
0.0006070137023925781,
-0.0176239013671875,
-0.036712646484375,
0.037506103515625,
0.0095367431640625,
-0.0013866424560546875,
0.018585205078125,
0.0170745849609375,
0.0236053466796875,
0.0401611328125,
-0.0206298828125,
-0.005069732666015625,
-0.016876220703125,
-0.03192138671875,
0.0220489501953125,
0.05712890625,
0.004791259765625,
0.07891845703125,
-0.00939178466796875,
0.06646728515625,
0.003284454345703125,
0.02911376953125,
-0.00611114501953125,
-0.00830078125,
0.02801513671875,
-0.0246734619140625,
0.0142059326171875,
-0.02752685546875,
0.00881195068359375,
-0.049713134765625,
0.021392822265625,
0.042236328125,
-0.017730712890625,
0.030059814453125
]
|
335948e076731b9f00d8d6d7b0bdbb54d9d4340e | Wordpress Stackexchange
Q: How to restore deleted pages/posts? I recently deleted some pages in my wordpress site. Now I want to re-store them. How can I do this?
Any suggestions will be appreciated.
Thanks in advance
A: Since you only moved them to trash, you can easily restore them
When you are on the posts or pages page in the admin area, click on the trash link at the top of the screen. Now you will see your posts or pages that you moved to trash, just hover over one of them and click on "restore"
You can also use the checkboxes to select multiple at once, and from the dropdown menu that says "bulk actions", select restore to place them all back
| Q: How to restore deleted pages/posts? I recently deleted some pages in my wordpress site. Now I want to re-store them. How can I do this?
Any suggestions will be appreciated.
Thanks in advance
A: Since you only moved them to trash, you can easily restore them
When you are on the posts or pages page in the admin area, click on the trash link at the top of the screen. Now you will see your posts or pages that you moved to trash, just hover over one of them and click on "restore"
You can also use the checkboxes to select multiple at once, and from the dropdown menu that says "bulk actions", select restore to place them all back
A: Then you should see a link "Trash" on the top of pages/posts listing section.
*
*Click on that link which will take you the section where all the trashed pages/posts are listed.
*Select the pages/posts using the checkboxes against them.
*Select Restore from Bulk Actions dropdown, then hit the Apply button.
*Now go to pages/posts listing section and you should see the trashed pages/posts published again.
| wordpress | {
"language": "en",
"length": 188,
"provenance": "stackexchange_00019.jsonl.gz:439699",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124854"
} | [
0.0161590576171875,
-0.00272369384765625,
0.02227783203125,
0.0149383544921875,
-0.00803375244140625,
-0.01812744140625,
0.04901123046875,
-0.043304443359375,
0.034759521484375,
0.006587982177734375,
-0.0419921875,
-0.017486572265625,
0.032135009765625,
-0.03179931640625,
-0.00007450580596923828,
-0.0185699462890625,
0.043212890625,
-0.01061248779296875,
0.0623779296875,
0.005580902099609375,
0.006412506103515625,
0.0240478515625,
0.0677490234375,
-0.0030231475830078125,
0.0088653564453125,
0.03131103515625,
0.04351806640625,
-0.0250244140625,
-0.003330230712890625,
-0.0306854248046875,
0.0135345458984375,
0.000797271728515625,
0.0205078125,
-0.0233001708984375,
0.04180908203125,
-0.041290283203125,
-0.0179443359375,
-0.0012989044189453125,
0.00894927978515625,
-0.017303466796875,
0.019805908203125,
-0.0003447532653808594,
0.0232391357421875,
-0.0101165771484375,
-0.0079498291015625,
-0.031219482421875,
0.018402099609375,
-0.034637451171875,
0.004581451416015625,
0.00955963134765625,
0.0121917724609375,
-0.02972412109375,
0.038665771484375,
-0.0168304443359375,
-0.0185699462890625,
-0.026397705078125,
0.039154052734375,
0.01058197021484375,
0.040802001953125,
-0.04058837890625,
-0.059967041015625,
0.007511138916015625,
0.022918701171875,
-0.02496337890625,
-0.004772186279296875,
0.0095977783203125,
0.0263824462890625,
0.006763458251953125,
-0.08538818359375,
-0.0218963623046875,
0.056182861328125,
-0.04949951171875,
0.00608062744140625,
-0.007671356201171875,
0.018463134765625,
0.0058441162109375,
-0.004512786865234375,
0.00872039794921875,
-0.0032176971435546875,
0.040679931640625,
0.017578125,
0.024139404296875,
-0.0135650634765625,
-0.0271148681640625,
-0.006053924560546875,
-0.0237579345703125,
-0.0199127197265625,
-0.01983642578125,
-0.028778076171875,
-0.033172607421875,
-0.0139312744140625,
-0.060791015625,
-0.0362548828125,
0.0149383544921875,
-0.01282501220703125,
-0.005359649658203125,
0.020660400390625,
0.054046630859375,
0.020660400390625,
0.017852783203125,
-0.01122283935546875,
-0.037933349609375,
0.024261474609375,
-0.0421142578125,
0.006526947021484375,
-0.02545166015625,
-0.01555633544921875,
-0.03814697265625,
0.0262603759765625,
0.046478271484375,
-0.035552978515625,
0.037445068359375,
-0.0005788803100585938,
-0.029876708984375,
-0.01465606689453125,
0.037139892578125,
-0.007503509521484375,
0.0145263671875,
0.01047515869140625,
0.0108184814453125,
-0.01050567626953125,
0.0276031494140625,
-0.059844970703125,
-0.01424407958984375,
0.005252838134765625,
-0.01519012451171875,
0.0035037994384765625,
0.01055908203125,
0.0228729248046875,
0.01415252685546875,
-0.031585693359375,
0.03302001953125,
0.02880859375,
-0.031768798828125,
-0.031280517578125,
-0.01148223876953125,
-0.00390625,
-0.039398193359375,
-0.0009584426879882812,
0.0008511543273925781,
0.001407623291015625,
-0.03466796875,
0.0078887939453125,
-0.0021152496337890625,
0.031280517578125,
0.00966644287109375,
-0.0020656585693359375,
0.02227783203125,
0.0230560302734375,
-0.01493072509765625,
0.006420135498046875,
-0.008270263671875,
0.0150146484375,
0.007904052734375,
0.01372528076171875,
-0.05078125,
0.03021240234375,
-0.050567626953125,
0.0308990478515625,
-0.0523681640625,
0.040283203125,
0.0253143310546875,
0.037689208984375,
0.0219268798828125,
-0.0185089111328125,
-0.037384033203125,
-0.053009033203125,
-0.0238494873046875,
0.0191650390625,
0.009918212890625,
-0.011810302734375,
-0.027130126953125,
-0.0179901123046875,
-0.0016469955444335938,
-0.0051422119140625,
0.04351806640625,
0.0218658447265625,
-0.034454345703125,
0.01222991943359375,
0.071533203125,
0.0018901824951171875,
-0.006259918212890625,
-0.01387786865234375,
0.0051727294921875,
-0.0103302001953125,
-0.01468658447265625,
0.01470184326171875,
0.047515869140625,
-0.00757598876953125,
0.046966552734375,
-0.0270843505859375,
-0.0072021484375,
-0.018035888671875,
-0.028045654296875,
0.0190887451171875,
-0.01409149169921875,
-0.01544189453125,
-0.01535797119140625,
0.0021457672119140625,
0.01024627685546875,
0.01849365234375,
0.01373291015625,
-0.013763427734375,
0.006053924560546875,
-0.04248046875,
0.00485992431640625,
-0.0193634033203125,
0.02850341796875,
-0.006183624267578125,
0.0183563232421875,
0.026702880859375,
0.00592803955078125,
-0.01983642578125,
-0.0192718505859375,
-0.01873779296875,
0.017181396484375,
-0.01503753662109375,
-0.039276123046875,
-0.023956298828125,
-0.0165863037109375,
-0.0257415771484375,
0.01104736328125,
-0.0615234375,
-0.00046706199645996094,
0.036285400390625,
-0.03179931640625,
-0.0238800048828125,
-0.05072021484375,
-0.0229034423828125,
-0.031341552734375,
-0.048492431640625,
0.08251953125,
0.0140533447265625,
0.06683349609375,
0.0247344970703125,
-0.00807952880859375,
0.01531982421875,
-0.06671142578125,
0.01947021484375,
0.0419921875,
0.0275421142578125,
0.027435302734375,
-0.003238677978515625,
0.029205322265625,
0.0163116455078125,
-0.05621337890625,
0.006927490234375,
0.0161285400390625,
0.0140838623046875,
0.06768798828125,
0.0283203125,
0.000850677490234375,
-0.0137481689453125,
-0.02313232421875,
-0.005474090576171875,
0.0232391357421875,
-0.0256195068359375,
0.01457977294921875,
-0.0186920166015625,
-0.011505126953125,
-0.007160186767578125,
-0.026031494140625,
-0.0047607421875,
-0.028289794921875,
0.037078857421875,
0.0107421875,
0.04071044921875,
0.03729248046875,
0.0116119384765625,
0.00316619873046875,
-0.0010890960693359375,
-0.05560302734375,
0.01375579833984375,
0.000614166259765625,
0.0203857421875,
0.0192413330078125,
-0.029937744140625,
-0.009979248046875,
0.045440673828125,
0.0085296630859375,
-0.00984954833984375,
0.02044677734375,
-0.01071929931640625,
-0.0078582763671875,
-0.0144195556640625,
-0.0399169921875,
0.0167388916015625,
0.031219482421875,
-0.0123138427734375,
-0.00714874267578125,
0.0131683349609375,
0.04107666015625,
-0.017059326171875,
0.030303955078125,
-0.0162200927734375,
0.0006952285766601562,
0.0216522216796875,
-0.072509765625,
0.043731689453125,
-0.0423583984375,
0.0325927734375,
0.0738525390625,
0.0296783447265625,
-0.028656005859375,
0.00469207763671875,
0.04254150390625,
0.049530029296875,
-0.01477813720703125,
-0.02349853515625,
0.0006003379821777344,
-0.038848876953125,
-0.0180206298828125,
0.04205322265625,
0.0394287109375,
0.0077667236328125,
-0.0234222412109375,
-0.01125335693359375,
0.0207366943359375,
-0.107666015625,
-0.1077880859375,
-0.03857421875,
-0.06732177734375,
-0.0008502006530761719,
-0.003406524658203125,
-0.027618408203125,
0.0001761913299560547,
0.033477783203125,
0.0194091796875,
0.037933349609375,
-0.01110076904296875,
-0.00861358642578125,
-0.005340576171875,
-0.0474853515625,
-0.046356201171875,
0.0037784576416015625,
-0.0235443115234375,
0.00901031494140625,
0.038543701171875,
-0.0086212158203125,
-0.05560302734375,
-0.019561767578125,
0.0213165283203125,
-0.02520751953125,
-0.042266845703125,
-0.01165771484375,
0.00359344482421875,
0.02203369140625,
0.006435394287109375,
0.037445068359375,
0.025970458984375,
-0.0203704833984375,
-0.01399993896484375,
-0.04559326171875,
-0.016754150390625,
-0.0223388671875,
-0.0032901763916015625,
0.054534912109375,
-0.007556915283203125,
-0.0309295654296875,
-0.03717041015625,
-0.048187255859375,
-0.004749298095703125,
-0.0477294921875,
-0.01482391357421875,
0.01812744140625,
0.01181793212890625,
-0.0292816162109375,
0.0287628173828125,
0.0347900390625,
0.024871826171875,
0.01152801513671875,
0.04534912109375,
-0.035919189453125,
-0.02093505859375,
-0.0012359619140625,
-0.01122283935546875,
0.059661865234375,
0.003101348876953125,
0.003177642822265625,
0.030364990234375,
-0.004306793212890625,
-0.018310546875,
-0.01390838623046875,
-0.050933837890625,
-0.05950927734375,
0.020111083984375,
-0.05572509765625,
0.0197296142578125,
-0.04290771484375,
-0.004619598388671875,
-0.02294921875,
0.08709716796875,
-0.06756591796875,
-0.0251617431640625,
-0.0283660888671875,
0.01320648193359375,
0.006359100341796875,
-0.049041748046875,
0.00016641616821289062,
-0.0288543701171875,
-0.09967041015625,
0.0187530517578125,
-0.00107574462890625,
-0.0250701904296875,
-0.0242462158203125,
-0.0081024169921875,
-0.04681396484375,
-0.04107666015625,
0.0228424072265625,
-0.054840087890625,
0.006542205810546875,
0.0030498504638671875,
0.005046844482421875,
-0.0362548828125,
0.0070037841796875,
-0.053436279296875,
-0.099853515625,
-0.01369476318359375,
0.0003685951232910156,
0.048187255859375,
0.0122222900390625,
-0.061431884765625,
-0.01050567626953125,
0.03948974609375,
0.01377105712890625,
0.01230621337890625,
-0.001495361328125,
0.0187835693359375,
-0.031951904296875,
-0.052978515625,
-0.0084686279296875,
-0.06890869140625,
0.0162506103515625,
-0.0149993896484375,
-0.004123687744140625,
-0.007411956787109375,
-0.052215576171875,
-0.002712249755859375,
-0.0281524658203125,
-0.01012420654296875,
-0.02099609375,
-0.00823974609375,
-0.00749969482421875,
0.0023555755615234375,
-0.01593017578125,
-0.0135040283203125,
-0.010345458984375,
-0.0184478759765625,
-0.00482940673828125,
0.050537109375,
-0.0239715576171875,
0.019805908203125,
0.00791168212890625,
0.0212249755859375,
-0.0243682861328125,
-0.037353515625,
0.02105712890625,
0.0188446044921875,
-0.027801513671875,
0.0616455078125,
0.0186920166015625,
0.015716552734375,
0.006961822509765625,
-0.0253753662109375,
-0.01544189453125,
-0.0648193359375,
0.062408447265625,
-0.00994873046875,
-0.005893707275390625,
0.006877899169921875,
-0.045318603515625,
0.068359375,
0.06829833984375,
-0.0002180337905883789,
-0.02435302734375,
0.0072021484375,
0.03955078125,
-0.0246734619140625,
-0.013641357421875,
-0.044219970703125,
-0.052825927734375,
-0.0007638931274414062,
-0.050323486328125,
0.0753173828125,
0.036529541015625,
-0.0196075439453125,
0.088623046875,
0.06427001953125,
-0.003536224365234375,
0.002857208251953125,
0.00905609130859375,
-0.01221466064453125,
0.02911376953125,
-0.0137176513671875,
-0.0022945404052734375,
-0.0121917724609375,
-0.00592041015625,
0.022796630859375,
0.0124969482421875,
-0.037628173828125,
-0.0152130126953125,
-0.0092620849609375,
-0.00872802734375,
0.00894927978515625,
-0.0159149169921875,
0.0178985595703125,
0.0246429443359375,
-0.0177154541015625,
0.026153564453125,
-0.0102081298828125,
0.0106658935546875,
-0.032470703125,
-0.004192352294921875,
0.0004968643188476562,
-0.004360198974609375,
0.024749755859375,
0.07086181640625,
-0.0235595703125,
0.0584716796875,
-0.0200042724609375,
0.0362548828125,
0.0268707275390625,
0.00998687744140625,
0.0276947021484375,
0.017333984375,
0.0086517333984375,
-0.02606201171875,
-0.001903533935546875,
-0.00945281982421875,
0.004772186279296875,
0.006999969482421875,
0.029205322265625,
-0.00601959228515625,
-0.01666259765625,
0.0186309814453125,
-0.038299560546875,
0.0027790069580078125,
0.0300750732421875,
-0.0082855224609375,
-0.06732177734375,
-0.0069427490234375,
0.0200347900390625,
0.0330810546875,
-0.037445068359375,
-0.0017070770263671875,
-0.0111083984375,
-0.04974365234375,
0.0007987022399902344,
-0.0015239715576171875,
-0.002567291259765625,
-0.0160675048828125,
-0.0281219482421875,
-0.00029015541076660156,
-0.027679443359375,
-0.0110931396484375,
-0.01873779296875,
0.0265045166015625,
-0.0247650146484375,
-0.02520751953125,
0.04296875,
0.0013380050659179688,
0.01947021484375,
-0.018951416015625,
-0.005298614501953125,
0.032928466796875,
0.0118408203125,
0.0306854248046875,
-0.0265045166015625,
-0.0189971923828125,
-0.033172607421875,
-0.045013427734375,
-0.05279541015625,
-0.01384735107421875,
0.0249786376953125,
-0.0540771484375,
0.0206146240234375,
-0.00951385498046875,
0.02935791015625,
-0.0232391357421875,
-0.01509857177734375,
0.00457763671875,
-0.01045989990234375,
-0.01543426513671875,
-0.0081329345703125,
0.0107421875,
0.05328369140625,
-0.02197265625,
0.0784912109375,
0.02301025390625,
0.0285491943359375,
-0.042022705078125,
-0.0291748046875,
0.017120361328125,
-0.0164337158203125,
-0.02447509765625,
-0.0289306640625,
-0.0236663818359375,
0.0275115966796875,
0.06207275390625,
-0.002994537353515625,
-0.029144287109375,
-0.02911376953125,
0.0027370452880859375,
-0.0255279541015625,
0.08160400390625,
-0.04193115234375,
-0.01995849609375,
-0.00592041015625,
-0.0276947021484375,
-0.00905609130859375,
0.00748443603515625,
0.0098419189453125,
0.0103607177734375,
-0.0179290771484375,
0.00771331787109375,
-0.01056671142578125,
-0.0261993408203125,
0.01471710205078125,
0.045989990234375,
0.01296234130859375,
0.038299560546875,
0.01317596435546875,
0.018524169921875,
0.0290985107421875,
-0.0009617805480957031,
-0.004360198974609375,
0.00852203369140625,
0.07427978515625,
0.0032958984375,
-0.028411865234375,
0.02557373046875,
-0.034942626953125,
-0.01430511474609375,
0.048126220703125,
0.0223541259765625,
-0.09649658203125,
0.012603759765625,
-0.00333404541015625,
0.020263671875,
0.01108551025390625,
-0.0006308555603027344,
0.0037288665771484375,
-0.007015228271484375,
0.0008473396301269531,
0.007328033447265625,
-0.0335693359375,
-0.00890350341796875,
-0.00457000732421875,
-0.017791748046875,
-0.0036907196044921875,
0.0157928466796875,
0.004276275634765625,
-0.059722900390625,
0.030120849609375,
0.032745361328125,
-0.0012826919555664062,
-0.042510986328125,
0.0007829666137695312,
0.00457000732421875,
-0.007038116455078125,
-0.04095458984375,
0.041900634765625,
-0.0357666015625,
0.028228759765625,
-0.01248931884765625,
-0.014923095703125,
0.026458740234375,
0.047760009765625,
-0.0232696533203125,
0.00396728515625,
0.01593017578125,
-0.01096343994140625,
-0.04730224609375,
-0.01197052001953125,
0.045928955078125,
-0.03912353515625,
-0.02801513671875,
0.0159149169921875,
-0.055084228515625,
-0.057464599609375,
-0.02642822265625,
-0.01062774658203125,
0.07720947265625,
-0.0255584716796875,
-0.0252227783203125,
0.0208892822265625,
0.018798828125,
-0.0093994140625,
-0.03375244140625,
0.021392822265625,
-0.01873779296875,
0.045654296875,
-0.0177001953125,
0.03704833984375,
-0.022552490234375,
-0.04705810546875,
-0.083984375,
0.08233642578125,
-0.0020389556884765625,
0.022552490234375,
-0.0175628662109375,
0.044189453125,
-0.024200439453125,
-0.00433349609375,
-0.0191497802734375,
0.0533447265625,
-0.00365447998046875,
0.01525115966796875,
-0.059661865234375,
-0.0101776123046875,
-0.00881195068359375,
0.04254150390625,
0.052490234375,
0.00916290283203125,
-0.031890869140625,
-0.00673675537109375,
0.055877685546875,
0.041900634765625,
0.0216522216796875,
0.040496826171875,
-0.037322998046875,
0.00812530517578125,
0.0185546875,
-0.08404541015625,
-0.0093841552734375,
0.00695037841796875,
-0.012542724609375,
-0.0007863044738769531,
-0.0112457275390625,
-0.0291900634765625,
-0.01003265380859375,
0.00405120849609375,
-0.023468017578125,
-0.004741668701171875,
-0.00469207763671875,
0.003864288330078125,
0.043792724609375,
-0.0102081298828125,
0.04779052734375,
-0.0174560546875,
-0.03216552734375,
-0.000004291534423828125,
0.037261962890625,
0.02301025390625,
0.03741455078125,
0.08056640625,
0.03753662109375,
0.0175628662109375,
-0.0211639404296875,
0.03314208984375,
-0.02777099609375,
-0.0292510986328125,
0.0645751953125,
0.039520263671875,
0.038116455078125,
-0.033355712890625,
-0.0256500244140625,
0.01245880126953125,
0.07659912109375,
-0.034576416015625,
-0.0784912109375,
0.01165008544921875,
0.004810333251953125,
0.017578125,
0.0240325927734375,
0.026397705078125,
-0.023040771484375,
0.05218505859375,
-0.0048370361328125,
-0.034637451171875,
-0.01416778564453125,
0.0081939697265625,
-0.005401611328125,
0.0254058837890625,
0.0290679931640625,
-0.026458740234375,
-0.00665283203125,
0.007198333740234375,
0.0216064453125,
-0.0246734619140625,
-0.01097869873046875,
-0.004802703857421875,
0.07232666015625,
0.031829833984375,
0.004024505615234375,
0.0233917236328125,
0.00414276123046875,
0.00539398193359375,
-0.02703857421875,
-0.056854248046875,
0.0204620361328125,
0.0406494140625,
-0.033172607421875,
-0.0156707763671875,
0.05731201171875,
0.061309814453125,
-0.0732421875,
-0.0509033203125,
0.007442474365234375,
-0.037506103515625,
0.015380859375,
-0.009368896484375,
-0.0174102783203125,
0.0005888938903808594,
-0.01800537109375,
-0.0265655517578125,
-0.0102996826171875,
0.0262298583984375,
-0.0283203125,
0.0411376953125,
-0.00699615478515625,
-0.00321197509765625,
0.032867431640625,
-0.00917816162109375,
0.0171661376953125,
0.00311279296875,
-0.04913330078125,
-0.02374267578125,
-0.043670654296875,
0.0028018951416015625,
0.015716552734375,
0.031402587890625,
0.024566650390625,
-0.005268096923828125,
0.01206207275390625,
-0.044219970703125,
0.01198577880859375,
0.0247344970703125,
0.028564453125,
0.037078857421875,
0.0010404586791992188,
0.01074981689453125,
-0.07879638671875,
-0.04052734375,
-0.03851318359375,
0.0301055908203125,
0.01259613037109375,
0.06939697265625,
0.008148193359375,
0.0236053466796875,
-0.0281829833984375,
0.03851318359375,
-0.06103515625,
-0.03570556640625,
0.03607177734375,
-0.0269927978515625,
-0.01678466796875,
0.008880615234375,
-0.01096343994140625,
0.0546875,
-0.00031828880310058594,
-0.0283966064453125,
-0.007617950439453125,
-0.017181396484375,
-0.005756378173828125,
0.0292816162109375,
-0.00334930419921875,
-0.0226593017578125,
-0.01242828369140625,
-0.009307861328125,
-0.001312255859375,
0.01369476318359375,
-0.0157928466796875,
-0.047637939453125,
0.0254974365234375,
0.01535797119140625,
-0.0267791748046875,
0.0296783447265625,
-0.03582763671875,
0.033355712890625,
0.027130126953125,
0.0232086181640625,
-0.0377197265625,
0.0251007080078125,
-0.005779266357421875,
-0.01001739501953125,
0.0316162109375,
0.0051727294921875,
0.056365966796875,
-0.048309326171875,
-0.0284423828125,
-0.05328369140625,
0.0011663436889648438,
-0.014007568359375,
-0.0212554931640625,
-0.03277587890625,
0.0240631103515625,
-0.0207061767578125,
0.048797607421875,
-0.031341552734375,
-0.0242156982421875,
-0.0079803466796875,
0.0174102783203125,
-0.0273590087890625,
0.0040130615234375,
-0.059783935546875,
0.0036869049072265625,
0.03765869140625,
0.0443115234375,
-0.09808349609375,
0.07073974609375,
-0.01035308837890625,
-0.0166473388671875,
0.0206146240234375,
-0.0010290145874023438,
-0.0169525146484375,
0.00592803955078125,
-0.0223236083984375,
-0.0224151611328125,
-0.05316162109375,
0.0122528076171875,
-0.037445068359375,
0.032318115234375,
0.032958984375,
-0.032012939453125,
0.0254669189453125,
0.0121917724609375,
0.034393310546875,
0.06402587890625,
0.028717041015625,
-0.0134124755859375,
0.02593994140625,
0.0207977294921875,
0.0024585723876953125,
-0.069580078125,
-0.0255126953125,
-0.0195465087890625,
0.038665771484375,
-0.0438232421875,
0.0273284912109375,
0.036041259765625,
-0.0235748291015625,
-0.0227203369140625,
0.06170654296875,
-0.0115966796875,
-0.01451873779296875,
-0.0589599609375,
0.010955810546875,
-0.0065765380859375,
0.0006184577941894531,
-0.0188446044921875,
-0.0115814208984375,
-0.03497314453125,
0.0183258056640625,
0.00034618377685546875,
0.086181640625,
-0.02252197265625,
0.036590576171875,
-0.01305389404296875,
0.0189666748046875,
-0.01357269287109375,
0.00910186767578125,
0.026824951171875,
-0.0231781005859375,
0.044158935546875,
0.0859375,
-0.02545166015625,
-0.02191162109375,
-0.03424072265625,
-0.042236328125,
-0.003284454345703125,
0.01535797119140625,
-0.044677734375,
-0.041961669921875,
0.0284881591796875,
0.0638427734375,
0.0149383544921875,
-0.00969696044921875,
-0.0172271728515625,
-0.01486968994140625,
-0.00023055076599121094,
-0.00800323486328125,
0.006908416748046875,
-0.048797607421875,
-0.01078033447265625,
-0.01308441162109375,
0.006328582763671875,
0.0243377685546875,
-0.04705810546875,
-0.0029430389404296875,
-0.02899169921875,
-0.0313720703125,
-0.0035800933837890625,
-0.02947998046875,
0.023956298828125,
0.0183563232421875,
-0.00719451904296875,
0.019989013671875,
-0.0236053466796875,
0.007472991943359375,
0.0224456787109375,
0.0086517333984375,
-0.0166015625,
0.0296783447265625,
-0.03759765625,
0.0061492919921875,
-0.008636474609375,
0.00882720947265625,
-0.027252197265625,
0.0102386474609375,
0.00788116455078125,
0.0299530029296875,
-0.0164337158203125,
0.031158447265625,
0.0178985595703125,
0.005130767822265625,
-0.02337646484375,
0.06060791015625,
0.00821685791015625,
0.004848480224609375,
-0.00016176700592041016,
0.03973388671875,
-0.0301055908203125,
-0.035980224609375,
0.03387451171875,
-0.0859375,
-0.0104217529296875,
-0.007537841796875,
-0.0019779205322265625,
-0.083251953125,
0.045135498046875,
0.0187225341796875,
0.0281524658203125,
0.029510498046875
]
|
b3386357a2971e4f0f66374ff0e02ce62d49deff | Wordpress Stackexchange
Q: Change the default number of posts to show on mobile version I want to change the default number of posts shown for my mobile site. Here is my theme's loop
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'mobile-content' ); ?>
<?php endwhile; ?>
I have 25 posts showing on desktop version set in wordpress settings but how can I show 15 posts per page for mobile version?
A: Firstly, you need to detect mobile devices, probably the easiest and a built in possibility is wp_is_mobile. It is simpler then other solutions that are available, but works reasonably well. It can be altered, if necessary, take a look at this question for a first insight into that.
Secondly, if that concerns your main query, like your code suggests, you can use pre_get_posts to alter it.
Below a basic example on how to bring those together:
Code:
add_action('pre_get_posts','wpse124949_alter_main_query_ppp_mobile');
function wpse124949_alter_main_query_ppp_mobile( $query ){
if ( is_admin() || ! $query->is_main_query() ) {
return;
}
if( $query->is_main_query() && wp_is_mobile() ) {
$query->set('posts_per_page', '15');
}
}
| Q: Change the default number of posts to show on mobile version I want to change the default number of posts shown for my mobile site. Here is my theme's loop
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'mobile-content' ); ?>
<?php endwhile; ?>
I have 25 posts showing on desktop version set in wordpress settings but how can I show 15 posts per page for mobile version?
A: Firstly, you need to detect mobile devices, probably the easiest and a built in possibility is wp_is_mobile. It is simpler then other solutions that are available, but works reasonably well. It can be altered, if necessary, take a look at this question for a first insight into that.
Secondly, if that concerns your main query, like your code suggests, you can use pre_get_posts to alter it.
Below a basic example on how to bring those together:
Code:
add_action('pre_get_posts','wpse124949_alter_main_query_ppp_mobile');
function wpse124949_alter_main_query_ppp_mobile( $query ){
if ( is_admin() || ! $query->is_main_query() ) {
return;
}
if( $query->is_main_query() && wp_is_mobile() ) {
$query->set('posts_per_page', '15');
}
}
A: You can use this function in your child theme functions.php or as a plugin to show 15 posts per page on mobile devices.
function custom_posts_per_page($query) {
if (wp_is_mobile()) {
$query->set('posts_per_page', 15);
} //endif
} //function
//this adds the function above to the 'pre_get_posts' action
add_action('pre_get_posts', 'custom_posts_per_page');
| wordpress | {
"language": "en",
"length": 228,
"provenance": "stackexchange_00019.jsonl.gz:439719",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124949"
} | [
0.0156707763671875,
-0.0019159317016601562,
0.005954742431640625,
0.014068603515625,
0.01464080810546875,
-0.0184173583984375,
0.057342529296875,
-0.03863525390625,
-0.0260162353515625,
-0.02642822265625,
-0.027679443359375,
0.0165863037109375,
-0.061126708984375,
-0.028076171875,
0.0506591796875,
-0.044219970703125,
0.03643798828125,
-0.020477294921875,
-0.00824737548828125,
-0.0205078125,
-0.01126861572265625,
-0.004230499267578125,
0.0213623046875,
0.10247802734375,
-0.005825042724609375,
-0.041534423828125,
0.08050537109375,
-0.0341796875,
-0.04107666015625,
-0.0631103515625,
-0.0032138824462890625,
0.072998046875,
0.040191650390625,
-0.0064697265625,
-0.0136566162109375,
0.024566650390625,
0.0305938720703125,
-0.0186004638671875,
0.0006132125854492188,
0.02874755859375,
0.01540374755859375,
-0.0167694091796875,
0.00783538818359375,
-0.0236358642578125,
-0.0204925537109375,
-0.007030487060546875,
0.012176513671875,
-0.0225677490234375,
0.01084136962890625,
-0.023101806640625,
0.005092620849609375,
0.047027587890625,
0.036407470703125,
-0.0313720703125,
-0.019195556640625,
0.0050506591796875,
-0.0005688667297363281,
-0.0251922607421875,
0.04827880859375,
0.0050048828125,
-0.029083251953125,
-0.051055908203125,
0.0256500244140625,
-0.052154541015625,
-0.0236663818359375,
-0.00519561767578125,
0.00449371337890625,
0.00926971435546875,
0.00008177757263183594,
-0.041046142578125,
0.003742218017578125,
0.010772705078125,
0.0015583038330078125,
-0.0102386474609375,
-0.0289459228515625,
-0.01207733154296875,
0.024688720703125,
0.005847930908203125,
0.02435302734375,
-0.013763427734375,
0.0243072509765625,
0.00846099853515625,
-0.006290435791015625,
-0.0218963623046875,
0.00405120849609375,
-0.014801025390625,
-0.003009796142578125,
-0.0187225341796875,
-0.03863525390625,
0.00350189208984375,
-0.015167236328125,
-0.036376953125,
-0.03729248046875,
0.0218963623046875,
0.037445068359375,
-0.047088623046875,
-0.012939453125,
0.0221710205078125,
-0.0192108154296875,
0.004657745361328125,
-0.048065185546875,
0.00370025634765625,
-0.051513671875,
-0.0161895751953125,
0.0175323486328125,
0.0318603515625,
-0.0011835098266601562,
0.003612518310546875,
0.047760009765625,
0.024444580078125,
0.0225067138671875,
0.043853759765625,
-0.03289794921875,
0.046356201171875,
-0.0609130859375,
-0.046722412109375,
-0.0677490234375,
-0.026885986328125,
-0.03314208984375,
-0.00908660888671875,
-0.0191802978515625,
0.013671875,
-0.019439697265625,
-0.05126953125,
0.0229644775390625,
-0.017578125,
-0.01312255859375,
0.0045318603515625,
-0.037872314453125,
0.047943115234375,
-0.0099334716796875,
-0.0034732818603515625,
0.0208892822265625,
0.029998779296875,
-0.014892578125,
-0.017333984375,
0.0240325927734375,
-0.015106201171875,
-0.0261993408203125,
0.04351806640625,
-0.0220184326171875,
-0.041595458984375,
0.01849365234375,
-0.01274871826171875,
0.017913818359375,
0.01505279541015625,
0.047760009765625,
0.0239410400390625,
-0.020477294921875,
-0.01165771484375,
-0.0187835693359375,
0.0496826171875,
0.037322998046875,
-0.03509521484375,
-0.02197265625,
-0.007717132568359375,
-0.0080718994140625,
-0.00897216796875,
-0.0286865234375,
0.0006313323974609375,
0.00920867919921875,
0.018646240234375,
0.0557861328125,
-0.020660400390625,
-0.0176849365234375,
-0.0305938720703125,
-0.044586181640625,
-0.00925445556640625,
0.0195159912109375,
0.022705078125,
0.030853271484375,
-0.0252532958984375,
0.038543701171875,
0.00754547119140625,
-0.01702880859375,
0.007678985595703125,
-0.04754638671875,
0.03057861328125,
0.043426513671875,
-0.0261993408203125,
-0.007724761962890625,
-0.046295166015625,
0.06268310546875,
0.0006008148193359375,
-0.0352783203125,
0.05230712890625,
-0.01207733154296875,
0.004680633544921875,
0.00809478759765625,
-0.012969970703125,
0.01374053955078125,
0.058074951171875,
-0.053314208984375,
0.0494384765625,
-0.007843017578125,
-0.035369873046875,
-0.0220184326171875,
-0.022186279296875,
-0.00428009033203125,
0.014129638671875,
0.0120697021484375,
0.0037059783935546875,
-0.004756927490234375,
0.0218353271484375,
-0.04718017578125,
0.0029506683349609375,
-0.005657196044921875,
0.00861358642578125,
0.0426025390625,
0.04351806640625,
-0.0002956390380859375,
0.0194549560546875,
-0.026214599609375,
-0.0240936279296875,
-0.04815673828125,
0.014312744140625,
0.006439208984375,
0.0462646484375,
0.00354766845703125,
0.00351715087890625,
0.0225830078125,
-0.05535888671875,
0.017669677734375,
0.033905029296875,
0.0811767578125,
-0.0217132568359375,
-0.0230560302734375,
-0.042877197265625,
0.058502197265625,
-0.0023212432861328125,
-0.0465087890625,
0.059173583984375,
0.031402587890625,
0.0169219970703125,
-0.030059814453125,
0.005634307861328125,
0.0357666015625,
-0.030242919921875,
0.007678985595703125,
0.04071044921875,
0.02703857421875,
0.005680084228515625,
0.01277923583984375,
0.019012451171875,
0.0355224609375,
-0.042205810546875,
0.00975799560546875,
-0.010650634765625,
-0.014373779296875,
-0.022979736328125,
0.0224151611328125,
-0.042083740234375,
0.033935546875,
-0.061279296875,
0.0016880035400390625,
0.0178375244140625,
0.04351806640625,
0.0374755859375,
-0.038177490234375,
-0.008941650390625,
0.00414276123046875,
-0.0005860328674316406,
-0.04852294921875,
0.016754150390625,
0.01059722900390625,
-0.012359619140625,
0.01568603515625,
0.0142364501953125,
-0.0008635520935058594,
-0.0068511962890625,
0.0139312744140625,
-0.0210113525390625,
-0.005615234375,
-0.01107025146484375,
-0.057373046875,
-0.0219879150390625,
-0.053314208984375,
0.05462646484375,
-0.0003407001495361328,
-0.02801513671875,
-0.017974853515625,
0.023223876953125,
-0.0828857421875,
-0.0187835693359375,
-0.01157379150390625,
-0.06890869140625,
-0.037200927734375,
0.01129150390625,
0.0191802978515625,
0.0278778076171875,
0.036468505859375,
0.0305938720703125,
-0.00390625,
0.040252685546875,
-0.038909912109375,
0.0042724609375,
0.033477783203125,
-0.068359375,
0.0758056640625,
-0.06793212890625,
0.04486083984375,
0.0638427734375,
-0.052703857421875,
0.05804443359375,
-0.0153961181640625,
0.04571533203125,
-0.0029449462890625,
0.0178680419921875,
-0.00676727294921875,
-0.0406494140625,
-0.00963592529296875,
-0.0181732177734375,
0.004253387451171875,
0.001026153564453125,
-0.02777099609375,
-0.03533935546875,
-0.00954437255859375,
-0.01221466064453125,
-0.07281494140625,
-0.041412353515625,
0.034515380859375,
-0.07489013671875,
-0.00666046142578125,
-0.00884246826171875,
-0.04296875,
-0.01898193359375,
0.00757598876953125,
-0.0032978057861328125,
-0.006420135498046875,
-0.01117706298828125,
-0.0279998779296875,
-0.030303955078125,
-0.04339599609375,
0.013031005859375,
0.005489349365234375,
0.007740020751953125,
-0.00748443603515625,
0.10467529296875,
0.0202178955078125,
-0.024993896484375,
0.004638671875,
0.0016546249389648438,
-0.0179443359375,
-0.00696563720703125,
0.007747650146484375,
-0.0262908935546875,
-0.00373077392578125,
-0.00611114501953125,
-0.0257720947265625,
0.0265350341796875,
-0.005413055419921875,
-0.00376129150390625,
-0.0103302001953125,
-0.007396697998046875,
0.0165557861328125,
-0.005580902099609375,
-0.004146575927734375,
0.0273284912109375,
0.02215576171875,
-0.0194854736328125,
-0.0419921875,
-0.0161590576171875,
-0.06597900390625,
0.04168701171875,
0.012176513671875,
0.029693603515625,
0.007228851318359375,
0.0189666748046875,
0.025177001953125,
-0.0207366943359375,
0.0350341796875,
-0.0550537109375,
0.04083251953125,
0.026092529296875,
0.057159423828125,
-0.049285888671875,
-0.0070037841796875,
-0.0301513671875,
0.0228424072265625,
-0.00493621826171875,
-0.007343292236328125,
0.00013947486877441406,
0.01302337646484375,
0.0026836395263671875,
-0.046295166015625,
0.01104736328125,
-0.080078125,
-0.0100250244140625,
-0.033660888671875,
0.01360321044921875,
-0.01009368896484375,
0.058746337890625,
-0.0826416015625,
-0.0153961181640625,
-0.02618408203125,
0.0300445556640625,
-0.033660888671875,
-0.09295654296875,
-0.0169219970703125,
-0.01297760009765625,
-0.038543701171875,
-0.020233154296875,
-0.0175933837890625,
-0.02728271484375,
-0.02227783203125,
-0.00400543212890625,
-0.030487060546875,
-0.0262451171875,
0.049713134765625,
0.0309600830078125,
-0.028167724609375,
-0.0296173095703125,
-0.034637451171875,
-0.020172119140625,
-0.033843994140625,
0.031829833984375,
-0.06854248046875,
-0.035247802734375,
0.02459716796875,
0.059722900390625,
0.00820159912109375,
-0.059173583984375,
-0.0186004638671875,
0.059906005859375,
0.01299285888671875,
0.042755126953125,
-0.020904541015625,
-0.0016927719116210938,
-0.02081298828125,
-0.00716400146484375,
0.005828857421875,
-0.01528167724609375,
-0.007022857666015625,
-0.01351165771484375,
0.01360321044921875,
0.00933837890625,
-0.04583740234375,
-0.0037746429443359375,
-0.03955078125,
-0.00960540771484375,
-0.048919677734375,
-0.00852203369140625,
0.004150390625,
0.0278472900390625,
-0.0292816162109375,
0.0167694091796875,
-0.005512237548828125,
-0.052978515625,
0.050201416015625,
0.002349853515625,
-0.03192138671875,
-0.002819061279296875,
0.06475830078125,
0.01971435546875,
-0.02972412109375,
-0.04266357421875,
-0.0189666748046875,
0.008880615234375,
0.033935546875,
0.0273895263671875,
-0.0007486343383789062,
-0.0031223297119140625,
0.024169921875,
-0.01273345947265625,
0.012481689453125,
-0.01377105712890625,
0.0268096923828125,
0.012481689453125,
-0.021728515625,
0.041961669921875,
0.0232696533203125,
-0.007602691650390625,
-0.0052032470703125,
-0.00701904296875,
-0.022247314453125,
0.0118560791015625,
0.048553466796875,
-0.0017299652099609375,
0.025665283203125,
-0.0267181396484375,
-0.01580810546875,
0.0157928466796875,
-0.00005316734313964844,
0.0034847259521484375,
-0.050201416015625,
0.035186767578125,
-0.0196380615234375,
0.00008678436279296875,
0.004901885986328125,
0.00719451904296875,
0.07489013671875,
-0.002841949462890625,
0.0716552734375,
-0.0186309814453125,
0.007572174072265625,
-0.047088623046875,
-0.007549285888671875,
0.001194000244140625,
-0.00588226318359375,
-0.039886474609375,
-0.003795623779296875,
0.0017404556274414062,
0.0230865478515625,
0.0174713134765625,
-0.015167236328125,
0.04058837890625,
-0.005474090576171875,
-0.0250396728515625,
-0.034271240234375,
-0.046478271484375,
-0.048583984375,
-0.06268310546875,
-0.0231170654296875,
0.01291656494140625,
-0.0248870849609375,
0.0452880859375,
0.01247406005859375,
0.0024089813232421875,
0.04248046875,
-0.021270751953125,
0.0251617431640625,
0.0027713775634765625,
0.031829833984375,
0.001293182373046875,
0.0163116455078125,
-0.034027099609375,
0.03814697265625,
-0.01172637939453125,
0.00986480712890625,
-0.0165252685546875,
0.0132598876953125,
-0.0204925537109375,
0.021148681640625,
0.0382080078125,
-0.0028438568115234375,
0.0192108154296875,
-0.00005233287811279297,
0.01904296875,
-0.044952392578125,
-0.03302001953125,
-0.02410888671875,
0.0204925537109375,
0.0631103515625,
-0.041961669921875,
0.004253387451171875,
-0.02752685546875,
-0.0088043212890625,
0.041229248046875,
-0.028564453125,
0.0450439453125,
-0.0130157470703125,
-0.0139617919921875,
-0.01265716552734375,
-0.01496124267578125,
-0.0200042724609375,
-0.030914306640625,
-0.0247039794921875,
-0.003131866455078125,
0.00977325439453125,
0.005702972412109375,
-0.0203704833984375,
0.03350830078125,
-0.0157623291015625,
-0.0271759033203125,
-0.0022430419921875,
0.0198516845703125,
0.0169677734375,
0.012939453125,
-0.02801513671875,
-0.0157318115234375,
-0.05474853515625,
-0.035003662109375,
-0.00971221923828125,
-0.00481414794921875,
-0.044830322265625,
0.00772857666015625,
0.04296875,
0.029754638671875,
-0.01457977294921875,
-0.080810546875,
-0.0501708984375,
0.022918701171875,
0.07147216796875,
0.10296630859375,
-0.03863525390625,
0.0677490234375,
0.006130218505859375,
0.0222930908203125,
0.01558685302734375,
0.047119140625,
0.044708251953125,
-0.031219482421875,
0.01015472412109375,
-0.05584716796875,
0.0037994384765625,
0.0141143798828125,
-0.0401611328125,
-0.055511474609375,
-0.0333251953125,
0.0027027130126953125,
0.0138397216796875,
-0.01464080810546875,
-0.01158905029296875,
-0.0278472900390625,
0.008514404296875,
-0.026519775390625,
0.05621337890625,
-0.0087432861328125,
-0.0195465087890625,
-0.041168212890625,
-0.02423095703125,
0.0200958251953125,
-0.0245361328125,
-0.007354736328125,
-0.054046630859375,
0.0177001953125,
-0.06195068359375,
0.08245849609375,
0.1116943359375,
0.002124786376953125,
0.046173095703125,
0.02447509765625,
-0.002941131591796875,
-0.012298583984375,
-0.02886962890625,
-0.0030364990234375,
0.05584716796875,
0.050262451171875,
-0.00897979736328125,
-0.01262664794921875,
0.0249481201171875,
-0.0282745361328125,
-0.01751708984375,
0.01210784912109375,
-0.0017366409301757812,
-0.039215087890625,
-0.00647735595703125,
-0.0272674560546875,
0.0108642578125,
0.0185546875,
0.01043701171875,
0.0022735595703125,
-0.0096588134765625,
0.021453857421875,
0.006778717041015625,
0.0064239501953125,
0.0205841064453125,
0.009307861328125,
-0.0203857421875,
-0.019989013671875,
0.00887298583984375,
0.006511688232421875,
0.0026397705078125,
0.007450103759765625,
0.005573272705078125,
-0.0211944580078125,
-0.015350341796875,
0.04071044921875,
-0.0223236083984375,
0.0052337646484375,
-0.07952880859375,
-0.0177459716796875,
-0.0070648193359375,
-0.0253143310546875,
0.019927978515625,
0.0084991455078125,
0.0014190673828125,
0.052001953125,
-0.02703857421875,
0.035369873046875,
0.029998779296875,
-0.0487060546875,
0.002048492431640625,
-0.006671905517578125,
0.032257080078125,
0.0219268798828125,
-0.08770751953125,
0.0164642333984375,
-0.0609130859375,
0.0163726806640625,
-0.01038360595703125,
-0.041015625,
0.056915283203125,
-0.0008387565612792969,
-0.0203094482421875,
0.02313232421875,
0.00791168212890625,
-0.0249481201171875,
-0.012451171875,
0.00647735595703125,
-0.01445770263671875,
0.01398468017578125,
-0.01251220703125,
-0.0018768310546875,
-0.01459503173828125,
-0.0185699462890625,
-0.043548583984375,
0.0714111328125,
-0.0203094482421875,
0.037994384765625,
0.022125244140625,
0.0131378173828125,
-0.0104217529296875,
0.005107879638671875,
-0.045623779296875,
0.046539306640625,
0.046173095703125,
0.06585693359375,
-0.0408935546875,
-0.0086822509765625,
0.040924072265625,
0.033050537109375,
0.038726806640625,
0.00719451904296875,
-0.033660888671875,
0.029296875,
0.08001708984375,
0.07275390625,
0.0253753662109375,
0.0203704833984375,
-0.007633209228515625,
0.005916595458984375,
0.0138702392578125,
-0.0032062530517578125,
0.027099609375,
0.0107574462890625,
-0.0653076171875,
0.0311431884765625,
0.0307159423828125,
0.040130615234375,
0.019683837890625,
0.0274658203125,
-0.0095062255859375,
-0.0007219314575195312,
0.0304412841796875,
-0.01499176025390625,
0.00518035888671875,
0.0694580078125,
0.067626953125,
-0.024078369140625,
-0.016998291015625,
-0.033233642578125,
0.056365966796875,
0.00293731689453125,
0.0298919677734375,
0.04852294921875,
0.004581451416015625,
0.08856201171875,
0.0218963623046875,
0.0105438232421875,
0.0174102783203125,
0.00632476806640625,
0.05364990234375,
0.02264404296875,
0.018035888671875,
-0.04144287109375,
0.032073974609375,
0.040069580078125,
0.0819091796875,
-0.05108642578125,
-0.0248260498046875,
0.02178955078125,
0.0056915283203125,
-0.0185394287109375,
-0.01236724853515625,
-0.0030841827392578125,
-0.014312744140625,
0.0187225341796875,
0.0141143798828125,
-0.006603240966796875,
-0.0158233642578125,
0.00891876220703125,
-0.0009713172912597656,
0.010040283203125,
0.024505615234375,
0.003200531005859375,
-0.01129150390625,
0.0013427734375,
0.01371002197265625,
0.00011557340621948242,
0.001651763916015625,
-0.00020551681518554688,
0.0174713134765625,
0.0127410888671875,
-0.01372528076171875,
0.0267791748046875,
-0.00435638427734375,
0.0157012939453125,
-0.01849365234375,
-0.0177154541015625,
-0.0185089111328125,
0.0311126708984375,
0.03253173828125,
0.0170135498046875,
0.046875,
0.0276336669921875,
-0.004116058349609375,
0.007129669189453125,
0.0265960693359375,
-0.0158233642578125,
-0.020751953125,
-0.01020050048828125,
0.0004134178161621094,
0.007801055908203125,
0.00904083251953125,
0.004177093505859375,
0.06640625,
-0.0015869140625,
0.0099334716796875,
-0.01184844970703125,
0.020599365234375,
-0.02825927734375,
0.046142578125,
0.020111083984375,
0.045379638671875,
0.03851318359375,
-0.054229736328125,
-0.004543304443359375,
-0.0031833648681640625,
-0.057891845703125,
0.023223876953125,
0.02752685546875,
-0.0322265625,
0.0201416015625,
-0.004856109619140625,
0.02789306640625,
0.02215576171875,
-0.06756591796875,
0.014404296875,
0.0380859375,
0.019195556640625,
0.0241546630859375,
-0.039794921875,
-0.0282745361328125,
-0.0165863037109375,
0.0430908203125,
-0.0172271728515625,
0.07244873046875,
-0.03082275390625,
0.01056671142578125,
-0.020721435546875,
-0.0107269287109375,
0.01161956787109375,
-0.0191650390625,
-0.0003905296325683594,
0.0030975341796875,
-0.008148193359375,
-0.0109710693359375,
-0.00411224365234375,
-0.003063201904296875,
0.0469970703125,
-0.0439453125,
0.03790283203125,
-0.032012939453125,
0.01183319091796875,
-0.06585693359375,
-0.015594482421875,
-0.021820068359375,
-0.00901031494140625,
-0.004547119140625,
-0.00995635986328125,
0.026641845703125,
-0.0067596435546875,
-0.0374755859375,
0.042022705078125,
-0.005199432373046875,
-0.00433349609375,
0.028106689453125,
-0.0275115966796875,
0.04473876953125,
0.05194091796875,
-0.0367431640625,
0.01448822021484375,
-0.01306915283203125,
-0.0255889892578125,
0.004180908203125,
0.0185546875,
-0.040985107421875,
0.00901031494140625,
-0.037078857421875,
0.023895263671875,
0.01480865478515625,
0.025390625,
-0.0462646484375,
-0.0005822181701660156,
0.0196380615234375,
0.00966644287109375,
0.03961181640625,
0.016448974609375,
-0.0230255126953125,
-0.0243682861328125,
-0.018890380859375,
-0.0069427490234375,
-0.024566650390625,
-0.02899169921875,
-0.0174102783203125,
0.0207366943359375,
0.0189056396484375,
-0.0158538818359375,
-0.0390625,
0.04327392578125,
-0.04290771484375,
0.03546142578125,
-0.04241943359375,
-0.00572967529296875,
-0.0015916824340820312,
-0.00592803955078125,
-0.048492431640625,
0.029632568359375,
-0.043212890625,
-0.035888671875,
-0.01131439208984375,
0.007289886474609375,
0.0252685546875,
-0.015960693359375,
-0.01111602783203125,
-0.0167236328125,
0.001819610595703125,
0.0295867919921875,
0.00399017333984375,
0.0009136199951171875,
0.036895751953125,
-0.0008940696716308594,
-0.036834716796875,
-0.087158203125,
0.0128631591796875,
-0.07501220703125,
0.007053375244140625,
-0.038787841796875,
0.0257720947265625,
0.017822265625,
-0.0242767333984375,
-0.061126708984375,
0.0276641845703125,
-0.0221710205078125,
-0.0177764892578125,
0.01038360595703125,
-0.0035953521728515625,
-0.0207672119140625,
-0.00211334228515625,
0.0229949951171875,
-0.04241943359375,
0.0019683837890625,
0.0110931396484375,
-0.0006318092346191406,
0.003604888916015625,
0.02447509765625,
0.00048160552978515625,
-0.07159423828125,
-0.01209259033203125,
-0.0246734619140625,
-0.01641845703125,
0.0279998779296875,
-0.0017032623291015625,
0.003932952880859375,
0.013641357421875,
-0.065185546875,
-0.004764556884765625,
-0.04901123046875,
0.0048828125,
-0.01239776611328125,
-0.034027099609375,
-0.028656005859375,
-0.0165252685546875,
0.0814208984375,
0.0159454345703125,
0.022308349609375,
-0.035675048828125,
-0.01488494873046875,
-0.01178741455078125,
-0.005298614501953125,
-0.0137176513671875,
0.00557708740234375,
-0.0491943359375,
0.0010004043579101562,
-0.01157379150390625,
-0.021270751953125,
0.00048732757568359375,
0.019256591796875,
-0.05718994140625,
-0.01043701171875,
-0.042144775390625,
0.00021839141845703125,
-0.09527587890625,
0.0232391357421875,
-0.016021728515625,
-0.002277374267578125,
-0.0325927734375,
-0.01812744140625,
-0.005420684814453125,
-0.036712646484375,
0.003681182861328125,
-0.0029449462890625,
-0.0021839141845703125,
-0.021270751953125,
-0.00829315185546875,
0.00780487060546875,
-0.0421142578125,
-0.0041961669921875,
0.01105499267578125,
-0.0096893310546875,
0.02850341796875,
-0.000354766845703125,
0.049041748046875,
0.0208587646484375,
-0.0091400146484375,
-0.00983428955078125,
0.0172882080078125,
-0.03155517578125,
0.077880859375,
0.0300750732421875,
-0.0018262863159179688,
-0.00994110107421875,
0.024566650390625,
0.04052734375,
-0.0374755859375,
-0.006473541259765625,
0.0018358230590820312,
-0.048370361328125,
-0.027130126953125,
-0.0178680419921875,
0.00623321533203125,
-0.0192718505859375,
-0.003173828125
]
|
01aac68e266c0037a4d5c5b6d0c0ace6f5b39298 | Wordpress Stackexchange
Q: Include jQuery UI as a whole Is it possible to include jQuery UI as a whole instead of:
wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-effects-core');
// a lot of other jquery ui imports....
I've searched in the codex and was able to find the full list of included scripts, but could not find a way to include the full jQuery UI version as one import like:
wp_enqueue_script('jquery-ui');
Sources:
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
A: If you take a look at registrations in source there is no alias to load all of jQuery UI in bulk available and WP core itself uses pieces as dependencies individually.
You could create and use such alias yourself (registered script handle with no URL and all of needed scripts as dependencies), but it might be overkill - there are a lot of scripts there to load.
| Q: Include jQuery UI as a whole Is it possible to include jQuery UI as a whole instead of:
wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-effects-core');
// a lot of other jquery ui imports....
I've searched in the codex and was able to find the full list of included scripts, but could not find a way to include the full jQuery UI version as one import like:
wp_enqueue_script('jquery-ui');
Sources:
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
A: If you take a look at registrations in source there is no alias to load all of jQuery UI in bulk available and WP core itself uses pieces as dependencies individually.
You could create and use such alias yourself (registered script handle with no URL and all of needed scripts as dependencies), but it might be overkill - there are a lot of scripts there to load.
A: You can filter out all jQuery UI scripts from the global $wp_scripts:
function wpse124959_wp_scripts_filter() {
global $wp_scripts;
foreach ($wp_scripts->registered as $reg) {
if ( preg_match('/^jquery-ui/', $reg->handle ) )
$script_hs[ $reg->handle ] = $reg->src;
}
print_r( $script_hs );
}
add_filter( 'wp_head', 'wpse124959_wp_scripts_filter' );
This could theoretically be used to enqueue them or build the alias @rarst suggested.
A: Just include the pieces you actually need. It will handle the dependencies for you.
For example, if you needed jquery-ui-dialog, then you can just enqueue that one and it will then go and automatically add jquery-ui-resizable, jquery-ui-draggable, jquery-ui-button, jquery-ui-position, jquery-ui-core, jquery-ui-mouse, jquery-ui-widget, and jquery all by itself.
A: You should enqueue just the scripts you need, and it will add in the script dependencies. You don't need to worry about picking which ones to enqueue. For example, if you want to include the scripts required for the Accordion widget, just add the following snippet and it will load all the dependencies too (jQuery, jQuery-UI core, jQuery widget).
wp_enqueue_script('jquery-ui-accordion');
If what you want to do is load them all as a single minified resource, install Use Google Downloads plugin. It will load the appropriate version from the Google CDN, minified and served with gzip compression and a long expiry time.
| wordpress | {
"language": "en",
"length": 340,
"provenance": "stackexchange_00019.jsonl.gz:439722",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/124959"
} | [
0.0452880859375,
-0.0098876953125,
-0.07794189453125,
-0.056060791015625,
0.0308074951171875,
-0.064208984375,
0.06756591796875,
0.047821044921875,
-0.0023441314697265625,
0.03143310546875,
-0.01519012451171875,
0.004428863525390625,
0.0196533203125,
0.0022716522216796875,
-0.01303863525390625,
-0.026092529296875,
0.048187255859375,
-0.056976318359375,
-0.003673553466796875,
-0.0062103271484375,
0.0245361328125,
0.013671875,
0.01275634765625,
0.078369140625,
0.0157012939453125,
-0.0294342041015625,
0.039306640625,
0.01520538330078125,
0.01178741455078125,
0.00656890869140625,
0.01885986328125,
-0.0012645721435546875,
0.01134490966796875,
0.00644683837890625,
0.006473541259765625,
0.0078125,
0.0174560546875,
0.006290435791015625,
0.026397705078125,
-0.004604339599609375,
0.01763916015625,
-0.01324462890625,
0.0219573974609375,
0.041778564453125,
-0.015289306640625,
-0.01678466796875,
0.006328582763671875,
-0.0251007080078125,
0.0242919921875,
-0.0002315044403076172,
0.01885986328125,
-0.01183319091796875,
0.03564453125,
-0.040069580078125,
-0.01537322998046875,
0.0017786026000976562,
-0.0023860931396484375,
-0.052490234375,
0.04705810546875,
0.04925537109375,
-0.0057525634765625,
-0.035736083984375,
0.01213836669921875,
-0.07525634765625,
-0.006134033203125,
-0.0321044921875,
-0.057373046875,
0.006641387939453125,
-0.01261138916015625,
0.0246124267578125,
0.04754638671875,
-0.005611419677734375,
-0.00301361083984375,
-0.00847625732421875,
-0.007808685302734375,
-0.0262603759765625,
0.001651763916015625,
-0.03668212890625,
0.01061248779296875,
0.00550079345703125,
0.032867431640625,
0.01177978515625,
-0.03387451171875,
-0.0179290771484375,
-0.0006737709045410156,
0.0019178390502929688,
0.004962921142578125,
-0.01947021484375,
-0.0302734375,
-0.00730133056640625,
-0.0157623291015625,
-0.062286376953125,
-0.066650390625,
0.06353759765625,
0.041290283203125,
0.007312774658203125,
0.0400390625,
0.052154541015625,
0.045684814453125,
0.038116455078125,
0.022918701171875,
-0.0655517578125,
0.057403564453125,
-0.0394287109375,
-0.020965576171875,
0.062469482421875,
0.0220947265625,
0.03240966796875,
0.0008797645568847656,
0.0107269287109375,
0.01276397705078125,
-0.0089874267578125,
0.040985107421875,
0.004665374755859375,
-0.01317596435546875,
-0.01561737060546875,
-0.01361846923828125,
0.034637451171875,
-0.01161956787109375,
0.032470703125,
0.0093994140625,
0.0284271240234375,
-0.0469970703125,
0.0223541259765625,
-0.0146484375,
-0.0136260986328125,
0.024139404296875,
-0.025054931640625,
-0.0069580078125,
-0.009124755859375,
0.0002951622009277344,
0.00902557373046875,
0.03466796875,
0.041351318359375,
0.0087738037109375,
-0.005031585693359375,
0.0302276611328125,
-0.0230255126953125,
-0.001796722412109375,
-0.05145263671875,
0.052764892578125,
0.0177764892578125,
0.004993438720703125,
0.023712158203125,
-0.011627197265625,
-0.003406524658203125,
0.00463104248046875,
0.0269775390625,
0.01482391357421875,
-0.02288818359375,
0.0150604248046875,
-0.0021839141845703125,
0.01177978515625,
0.01058197021484375,
0.03558349609375,
-0.0171356201171875,
0.0655517578125,
-0.04058837890625,
-0.0099639892578125,
-0.028472900390625,
-0.0250091552734375,
0.0116424560546875,
-0.01313018798828125,
-0.00804901123046875,
0.005084991455078125,
-0.038360595703125,
0.057952880859375,
0.03076171875,
0.026885986328125,
0.0240936279296875,
-0.049285888671875,
-0.02294921875,
0.03717041015625,
0.0250396728515625,
-0.009002685546875,
0.047576904296875,
0.013824462890625,
0.0160980224609375,
0.03460693359375,
0.0147247314453125,
-0.02459716796875,
-0.0400390625,
0.084716796875,
-0.0552978515625,
-0.053863525390625,
-0.01367950439453125,
0.01025390625,
0.04705810546875,
0.0262298583984375,
0.006305694580078125,
0.0599365234375,
-0.008270263671875,
-0.00884246826171875,
-0.0189056396484375,
-0.01654052734375,
-0.01523590087890625,
-0.0113067626953125,
0.0140838623046875,
-0.014801025390625,
0.0172119140625,
0.030242919921875,
-0.0226898193359375,
0.000048100948333740234,
-0.015167236328125,
-0.06732177734375,
-0.032318115234375,
-0.021209716796875,
0.0258941650390625,
0.0195159912109375,
0.0190277099609375,
0.0227813720703125,
0.06268310546875,
-0.04974365234375,
-0.0188446044921875,
-0.043426513671875,
0.0176239013671875,
0.004268646240234375,
0.062225341796875,
0.0157012939453125,
0.0198211669921875,
0.016876220703125,
-0.048858642578125,
0.017578125,
0.0309600830078125,
0.007572174072265625,
-0.002735137939453125,
-0.0274505615234375,
-0.0203094482421875,
0.005931854248046875,
-0.0059051513671875,
-0.006572723388671875,
0.038421630859375,
0.0457763671875,
0.049102783203125,
-0.01531219482421875,
-0.00006592273712158203,
-0.0234222412109375,
-0.006977081298828125,
-0.00545501708984375,
0.0247955322265625,
0.0221710205078125,
0.0631103515625,
0.0003762245178222656,
0.04644775390625,
0.01253509521484375,
-0.059600830078125,
0.00945281982421875,
0.0131072998046875,
-0.027008056640625,
0.00247955322265625,
-0.010406494140625,
0.010650634765625,
0.023773193359375,
-0.04547119140625,
-0.0198822021484375,
0.0626220703125,
0.004985809326171875,
0.0138092041015625,
-0.03460693359375,
0.01013946533203125,
-0.0011663436889648438,
-0.0248870849609375,
-0.0271148681640625,
-0.01047515869140625,
-0.00380706787109375,
-0.00806427001953125,
0.0234832763671875,
0.027313232421875,
0.029937744140625,
-0.02996826171875,
0.0016298294067382812,
-0.02569580078125,
-0.004180908203125,
0.039764404296875,
-0.0148773193359375,
0.017059326171875,
-0.03314208984375,
0.0012950897216796875,
-0.0010137557983398438,
0.0261383056640625,
-0.014129638671875,
-0.02069091796875,
0.0072479248046875,
-0.007549285888671875,
0.03759765625,
-0.025115966796875,
0.01593017578125,
-0.009063720703125,
0.039825439453125,
0.00333404541015625,
0.0290985107421875,
0.036041259765625,
0.0306243896484375,
0.004146575927734375,
0.038726806640625,
-0.0297393798828125,
0.09295654296875,
0.002750396728515625,
0.00859832763671875,
0.00032019615173339844,
0.0455322265625,
0.02642822265625,
-0.0033168792724609375,
-0.01309967041015625,
-0.0033168792724609375,
0.0057373046875,
0.01494598388671875,
-0.027435302734375,
-0.0277252197265625,
-0.0014619827270507812,
-0.0733642578125,
0.0257720947265625,
0.033416748046875,
0.055084228515625,
0.0229644775390625,
-0.0364990234375,
0.0121917724609375,
0.024658203125,
-0.07818603515625,
-0.1258544921875,
-0.032928466796875,
-0.058380126953125,
0.019439697265625,
-0.01433563232421875,
-0.016204833984375,
-0.0005006790161132812,
0.01184844970703125,
0.01537322998046875,
-0.032989501953125,
-0.00678253173828125,
-0.056365966796875,
-0.06072998046875,
-0.07794189453125,
-0.021575927734375,
-0.0089263916015625,
-0.002025604248046875,
0.00634002685546875,
0.007617950439453125,
0.01177978515625,
-0.03424072265625,
0.0015172958374023438,
0.08416748046875,
-0.020965576171875,
-0.0275421142578125,
0.0477294921875,
-0.048248291015625,
-0.0304718017578125,
0.014373779296875,
-0.056976318359375,
0.01200103759765625,
0.0013608932495117188,
-0.0166473388671875,
-0.030029296875,
-0.0218048095703125,
-0.007404327392578125,
0.080810546875,
0.019805908203125,
-0.04840087890625,
0.0273590087890625,
-0.054840087890625,
-0.04180908203125,
0.04351806640625,
-0.0286407470703125,
0.00482177734375,
-0.01305389404296875,
-0.020660400390625,
0.0234832763671875,
0.027130126953125,
0.0233001708984375,
0.0030307769775390625,
0.01517486572265625,
0.01076507568359375,
0.03228759765625,
-0.01172637939453125,
-0.005008697509765625,
-0.04791259765625,
0.03302001953125,
-0.02630615234375,
0.0008311271667480469,
0.0017671585083007812,
-0.00824737548828125,
0.00634002685546875,
-0.0271453857421875,
0.023956298828125,
0.0026226043701171875,
0.0174102783203125,
-0.006977081298828125,
0.0253143310546875,
-0.00865936279296875,
-0.00884246826171875,
0.006427764892578125,
0.05474853515625,
-0.010223388671875,
-0.007526397705078125,
-0.01451873779296875,
0.01049041748046875,
-0.035308837890625,
-0.064697265625,
-0.036346435546875,
-0.011993408203125,
-0.033294677734375,
0.0189666748046875,
-0.01528167724609375,
-0.005985260009765625,
0.0183868408203125,
-0.007122039794921875,
0.0172271728515625,
-0.04278564453125,
0.023773193359375,
-0.028533935546875,
0.0176239013671875,
-0.00757598876953125,
0.011810302734375,
-0.015289306640625,
-0.0004661083221435547,
-0.03778076171875,
-0.0562744140625,
-0.006145477294921875,
-0.10235595703125,
0.09002685546875,
0.08013916015625,
-0.044158935546875,
0.01277923583984375,
0.041046142578125,
0.0007505416870117188,
0.0433349609375,
0.0142059326171875,
0.027099609375,
0.0006623268127441406,
0.00817108154296875,
0.037567138671875,
-0.0241241455078125,
-0.0159759521484375,
-0.02325439453125,
-0.061920166015625,
-0.06103515625,
-0.0170135498046875,
-0.0281219482421875,
0.039215087890625,
-0.024566650390625,
-0.00628662109375,
-0.041107177734375,
-0.040924072265625,
-0.00971221923828125,
-0.0110015869140625,
-0.01280975341796875,
-0.03778076171875,
-0.00775909423828125,
0.00003975629806518555,
0.00582122802734375,
-0.01305389404296875,
0.0228271484375,
0.0211639404296875,
0.027313232421875,
0.0020427703857421875,
-0.051361083984375,
0.00470733642578125,
0.01934814453125,
0.0043182373046875,
0.00324249267578125,
-0.03662109375,
-0.012725830078125,
0.036529541015625,
-0.02032470703125,
0.018341064453125,
0.0016965866088867188,
0.020355224609375,
0.01244354248046875,
-0.0024242401123046875,
0.00574493408203125,
0.0258941650390625,
-0.0289459228515625,
0.00734710693359375,
-0.005641937255859375,
0.0021877288818359375,
0.0288848876953125,
0.017791748046875,
-0.0235443115234375,
0.002735137939453125,
-0.021575927734375,
-0.005718231201171875,
-0.0036258697509765625,
-0.014404296875,
0.0697021484375,
0.00649261474609375,
0.007541656494140625,
0.0160064697265625,
0.04736328125,
0.004947662353515625,
0.032684326171875,
0.0135955810546875,
0.0219573974609375,
0.02935791015625,
0.06402587890625,
0.017730712890625,
-0.00917816162109375,
-0.004985809326171875,
0.036285400390625,
0.019256591796875,
-0.046478271484375,
-0.0036487579345703125,
0.00605010986328125,
0.08544921875,
-0.0274200439453125,
0.0025844573974609375,
0.00360107421875,
0.056396484375,
-0.0029239654541015625,
-0.0125274658203125,
0.023529052734375,
0.0220947265625,
-0.010986328125,
0.034912109375,
0.022216796875,
-0.022216796875,
-0.00820159912109375,
0.00931549072265625,
-0.0021305084228515625,
-0.0013790130615234375,
0.01270294189453125,
0.06463623046875,
0.004940032958984375,
0.03961181640625,
0.005962371826171875,
-0.0019388198852539062,
-0.0020809173583984375,
0.02349853515625,
-0.037750244140625,
-0.004222869873046875,
0.0157318115234375,
0.03509521484375,
0.01407623291015625,
0.01053619384765625,
-0.00726318359375,
-0.0196990966796875,
-0.02288818359375,
-0.0306549072265625,
0.0204925537109375,
0.0263671875,
-0.0191497802734375,
-0.0194854736328125,
-0.019256591796875,
0.0048065185546875,
0.035552978515625,
0.005428314208984375,
0.038726806640625,
0.009521484375,
0.010009765625,
0.045166015625,
-0.05224609375,
-0.0171356201171875,
0.00884246826171875,
0.005870819091796875,
0.02618408203125,
-0.0014066696166992188,
-0.07940673828125,
-0.05560302734375,
-0.00591278076171875,
0.006885528564453125,
0.05291748046875,
-0.0082550048828125,
-0.00653076171875,
-0.039642333984375,
0.0214691162109375,
-0.03582763671875,
-0.004245758056640625,
0.06268310546875,
0.01177978515625,
0.0021820068359375,
0.0007886886596679688,
-0.053863525390625,
-0.030242919921875,
-0.032135009765625,
-0.06915283203125,
-0.0257415771484375,
-0.01053619384765625,
-0.00940704345703125,
0.015838623046875,
-0.004642486572265625,
0.00141143798828125,
-0.019561767578125,
0.04595947265625,
0.00853729248046875,
0.059906005859375,
-0.040985107421875,
0.07696533203125,
0.0274505615234375,
0.021728515625,
0.0074005126953125,
0.03448486328125,
0.006168365478515625,
-0.009613037109375,
0.0023288726806640625,
-0.08746337890625,
-0.003864288330078125,
-0.0241546630859375,
-0.00732421875,
0.0304718017578125,
0.01197052001953125,
0.019805908203125,
0.033172607421875,
-0.0204620361328125,
0.0105133056640625,
-0.004665374755859375,
0.0219573974609375,
-0.03131103515625,
-0.0031833648681640625,
0.04656982421875,
-0.006122589111328125,
-0.0173492431640625,
-0.007312774658203125,
-0.00301361083984375,
0.00508880615234375,
0.00787353515625,
-0.0198211669921875,
-0.015594482421875,
-0.04815673828125,
0.065673828125,
0.052032470703125,
-0.0103759765625,
0.019012451171875,
0.0212554931640625,
-0.0160980224609375,
-0.001850128173828125,
0.026275634765625,
-0.067626953125,
-0.059051513671875,
-0.01117706298828125,
-0.007144927978515625,
-0.031524658203125,
-0.0074920654296875,
0.01033782958984375,
0.0126800537109375,
0.007694244384765625,
0.034515380859375,
-0.03167724609375,
0.0299224853515625,
-0.00662994384765625,
-0.0272369384765625,
0.0114288330078125,
-0.02667236328125,
0.039794921875,
0.0167388916015625,
0.017486572265625,
0.03631591796875,
-0.01143646240234375,
0.007335662841796875,
-0.006938934326171875,
-0.0199127197265625,
-0.03167724609375,
-0.050872802734375,
0.005016326904296875,
0.007480621337890625,
0.0225982666015625,
-0.0211334228515625,
0.0202178955078125,
-0.0144195556640625,
-0.01389312744140625,
0.0007376670837402344,
-0.0013523101806640625,
-0.0196685791015625,
0.03656005859375,
-0.07110595703125,
0.021087646484375,
0.040130615234375,
0.0042724609375,
0.0288543701171875,
0.03399658203125,
0.005096435546875,
0.02264404296875,
-0.022186279296875,
0.022125244140625,
0.0234832763671875,
-0.02606201171875,
0.01090240478515625,
0.006183624267578125,
-0.033599853515625,
0.00598907470703125,
-0.007007598876953125,
-0.019683837890625,
-0.00472259521484375,
-0.00687408447265625,
0.08514404296875,
-0.019989013671875,
-0.024871826171875,
0.00045609474182128906,
0.00615692138671875,
-0.0033245086669921875,
0.01837158203125,
0.0228424072265625,
-0.0625,
-0.07330322265625,
0.032073974609375,
-0.08135986328125,
-0.03759765625,
-0.00730133056640625,
-0.01456451416015625,
0.099609375,
-0.0117950439453125,
-0.0098724365234375,
0.043548583984375,
0.04949951171875,
-0.031524658203125,
0.035247802734375,
0.0102081298828125,
0.04583740234375,
-0.02923583984375,
0.0037784576416015625,
0.002040863037109375,
0.01385498046875,
0.01201629638671875,
0.0008854866027832031,
-0.0305633544921875,
-0.00787353515625,
0.0203857421875,
0.007293701171875,
0.0217132568359375,
0.050750732421875,
0.020355224609375,
-0.0032138824462890625,
0.013153076171875,
-0.01453399658203125,
0.0093231201171875,
0.00580596923828125,
0.0252838134765625,
-0.036041259765625,
-0.01425933837890625,
0.033660888671875,
0.00965118408203125,
0.025299072265625,
0.03131103515625,
0.0242919921875,
0.05047607421875,
0.0033779144287109375,
-0.01152801513671875,
-0.008880615234375,
-0.0165863037109375,
0.005916595458984375,
-0.0438232421875,
0.0183258056640625,
-0.03680419921875,
-0.00501251220703125,
-0.01090240478515625,
-0.0128936767578125,
-0.01528167724609375,
0.014404296875,
0.0029315948486328125,
-0.0159759521484375,
0.0154876708984375,
-0.016510009765625,
0.041839599609375,
-0.0123291015625,
0.0017385482788085938,
0.0064697265625,
0.034820556640625,
-0.046539306640625,
-0.044342041015625,
0.02996826171875,
0.037017822265625,
-0.01146697998046875,
-0.06097412109375,
0.005435943603515625,
0.00013017654418945312,
0.03192138671875,
0.0103607177734375,
0.042724609375,
-0.0518798828125,
-0.015777587890625,
-0.003582000732421875,
-0.012786865234375,
0.020172119140625,
-0.009735107421875,
0.01346588134765625,
-0.00806427001953125,
0.026214599609375,
0.042999267578125,
-0.037139892578125,
0.0152130126953125,
0.0115509033203125,
0.06805419921875,
0.01387786865234375,
0.05059814453125,
-0.03289794921875,
-0.0311737060546875,
-0.00258636474609375,
0.034759521484375,
-0.0030879974365234375,
-0.0003421306610107422,
0.00205230712890625,
-0.02618408203125,
-0.00954437255859375,
0.01445770263671875,
0.0194091796875,
0.00047206878662109375,
0.0196075439453125,
0.02154541015625,
-0.042083740234375,
-0.0038928985595703125,
0.060455322265625,
-0.021484375,
0.04296875,
-0.004848480224609375,
0.038299560546875,
0.04864501953125,
-0.0007882118225097656,
-0.016571044921875,
0.03350830078125,
0.0745849609375,
-0.0264739990234375,
0.01317596435546875,
0.0029811859130859375,
-0.04449462890625,
0.031707763671875,
0.01454925537109375,
0.08905029296875,
0.0178375244140625,
-0.0290069580078125,
-0.00768280029296875,
-0.017059326171875,
-0.01116943359375,
0.0249176025390625,
0.0352783203125,
-0.0133819580078125,
0.025238037109375,
0.061065673828125,
-0.01788330078125,
0.0132598876953125,
0.012115478515625,
0.01531982421875,
-0.01067352294921875,
0.03240966796875,
0.0222015380859375,
0.0024871826171875,
0.017059326171875,
0.025909423828125,
0.0008168220520019531,
0.032684326171875,
-0.02764892578125,
0.01399993896484375,
0.0191802978515625,
0.06878662109375,
-0.0220184326171875,
0.06463623046875,
0.053924560546875,
-0.0165863037109375,
0.0012426376342773438,
0.01274871826171875,
-0.039215087890625,
-0.058349609375,
0.0272216796875,
0.0026302337646484375,
-0.0026874542236328125,
0.01364898681640625,
-0.007450103759765625,
0.01519775390625,
0.00412750244140625,
0.052886962890625,
-0.028289794921875,
-0.034423828125,
-0.024200439453125,
-0.02838134765625,
0.00794219970703125,
0.0104827880859375,
0.03399658203125,
-0.044952392578125,
0.050262451171875,
-0.019073486328125,
-0.01007080078125,
0.059173583984375,
-0.033538818359375,
0.006145477294921875,
0.049041748046875,
-0.001232147216796875,
0.032867431640625,
-0.007274627685546875,
-0.01380157470703125,
0.0224609375,
0.00963592529296875,
-0.0081329345703125,
-0.060577392578125,
0.00005418062210083008,
0.06280517578125,
0.041412353515625,
0.011505126953125,
0.03656005859375,
0.0223388671875,
-0.0303802490234375,
-0.02777099609375,
0.0035076141357421875,
0.001430511474609375,
-0.01197052001953125,
-0.0196533203125,
-0.00732421875,
-0.00609588623046875,
-0.0310516357421875,
-0.0160980224609375,
-0.0203704833984375,
0.044281005859375,
0.029937744140625,
-0.08319091796875,
0.05291748046875,
-0.023040771484375,
0.0288848876953125,
-0.0142364501953125,
0.01340484619140625,
-0.01715087890625,
-0.0167236328125,
-0.043487548828125,
-0.027618408203125,
-0.03546142578125,
0.02325439453125,
-0.0057830810546875,
0.037200927734375,
0.0570068359375,
-0.0458984375,
-0.007965087890625,
0.014495849609375,
0.0450439453125,
0.07147216796875,
-0.0033054351806640625,
-0.03082275390625,
-0.03021240234375,
0.048431396484375,
0.01470184326171875,
-0.06219482421875,
-0.0088653564453125,
-0.0308380126953125,
0.007678985595703125,
-0.033782958984375,
0.02264404296875,
-0.0024089813232421875,
-0.052947998046875,
-0.104248046875,
0.026611328125,
-0.0260009765625,
-0.04766845703125,
-0.0491943359375,
0.0240325927734375,
0.0144500732421875,
-0.047119140625,
-0.03289794921875,
-0.00557708740234375,
-0.0202789306640625,
0.0235443115234375,
0.0166168212890625,
0.02020263671875,
0.021759033203125,
-0.021514892578125,
-0.0435791015625,
0.0035839080810546875,
-0.000004291534423828125,
0.0362548828125,
-0.04620361328125,
0.01971435546875,
0.006134033203125,
0.0322265625,
-0.017364501953125,
-0.0202178955078125,
0.01145172119140625,
-0.0027446746826171875,
-0.00817108154296875,
-0.0189056396484375,
-0.041961669921875,
-0.0287933349609375,
0.0872802734375,
-0.0074462890625,
0.016204833984375,
-0.006580352783203125,
-0.01273345947265625,
-0.037353515625,
0.026763916015625,
0.0168609619140625,
-0.0257415771484375,
-0.004398345947265625,
0.0261383056640625,
0.0008058547973632812,
-0.025360107421875,
-0.006122589111328125,
-0.032623291015625,
-0.061553955078125,
-0.000027239322662353516,
-0.05841064453125,
-0.0006613731384277344,
-0.0462646484375,
0.033416748046875,
0.08392333984375,
-0.03326416015625,
0.0164947509765625,
0.0192108154296875,
-0.013916015625,
0.060211181640625,
0.01380157470703125,
-0.046600341796875,
-0.006439208984375,
0.00450897216796875,
0.022857666015625,
-0.022247314453125,
0.016571044921875,
0.01043701171875,
0.019775390625,
-0.0033969879150390625,
0.024139404296875,
0.0201263427734375,
0.040435791015625,
-0.0219573974609375,
0.022308349609375,
-0.0029163360595703125,
0.0184173583984375,
-0.053924560546875,
0.032623291015625,
-0.02008056640625,
-0.015625,
0.031341552734375,
0.02734375,
0.10223388671875,
-0.0204315185546875,
0.005001068115234375,
0.0491943359375,
-0.052032470703125,
0.035797119140625,
-0.04461669921875,
-0.050933837890625,
-0.0230712890625,
-0.039276123046875
]
|
3834c76c6eebb3edb99dae323aee81c9655a59cc | Wordpress Stackexchange
Q: Execution of JavaScript on save post I got stuck with one problem, can somebody please help.. :)
I would like to execute custom JavaScript function before post is saved, and i can't find how to do that. Something like JavaScript version of save_post action hook :)
Thank you!
A: Do it like shown below, as suggested by @gyo and done by @Howdy_McGee in his answer.
function admin_queue( $hook ) {
global $post;
if ( $hook == 'post-new.php' || $hook == 'post.php' ) {
if ( 'targeted-posttype' === $post->post_type ) {
wp_enqueue_script(
'custom-title-here',
bloginfo( 'template_directory' ) . '/scripts/custom-script.js',
'jquery',
'',
true
);
}
}
}
add_action( 'admin_enqueue_scripts', 'admin_queue' );
| Q: Execution of JavaScript on save post I got stuck with one problem, can somebody please help.. :)
I would like to execute custom JavaScript function before post is saved, and i can't find how to do that. Something like JavaScript version of save_post action hook :)
Thank you!
A: Do it like shown below, as suggested by @gyo and done by @Howdy_McGee in his answer.
function admin_queue( $hook ) {
global $post;
if ( $hook == 'post-new.php' || $hook == 'post.php' ) {
if ( 'targeted-posttype' === $post->post_type ) {
wp_enqueue_script(
'custom-title-here',
bloginfo( 'template_directory' ) . '/scripts/custom-script.js',
'jquery',
'',
true
);
}
}
}
add_action( 'admin_enqueue_scripts', 'admin_queue' );
| wordpress | {
"language": "en",
"length": 109,
"provenance": "stackexchange_00019.jsonl.gz:439769",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125135"
} | [
0.01715087890625,
-0.0244293212890625,
-0.0256805419921875,
-0.0175323486328125,
-0.00455474853515625,
-0.0361328125,
0.038116455078125,
0.0028667449951171875,
-0.054534912109375,
-0.006366729736328125,
-0.01519775390625,
0.03424072265625,
-0.03900146484375,
-0.031524658203125,
0.055328369140625,
-0.034698486328125,
0.0584716796875,
-0.0137939453125,
0.045806884765625,
-0.01220703125,
0.003986358642578125,
0.0201416015625,
0.04608154296875,
0.10498046875,
0.026123046875,
0.007083892822265625,
0.09625244140625,
-0.01534271240234375,
0.037445068359375,
0.002498626708984375,
0.041839599609375,
-0.07330322265625,
0.025054931640625,
0.0141448974609375,
-0.016571044921875,
0.02838134765625,
-0.020660400390625,
0.0261993408203125,
0.0229949951171875,
0.00335693359375,
0.025146484375,
-0.0064849853515625,
-0.014801025390625,
0.017242431640625,
-0.029266357421875,
-0.02020263671875,
0.0204010009765625,
-0.01373291015625,
0.0267333984375,
-0.01207733154296875,
0.003627777099609375,
-0.0259552001953125,
0.005523681640625,
0.01308441162109375,
-0.018280029296875,
0.0112457275390625,
-0.055267333984375,
0.0341796875,
0.03985595703125,
0.0892333984375,
-0.0009140968322753906,
-0.01415252685546875,
-0.02520751953125,
-0.08966064453125,
0.010345458984375,
0.00601959228515625,
0.0062408447265625,
-0.00434112548828125,
-0.0513916015625,
0.01433563232421875,
0.041717529296875,
-0.060150146484375,
-0.00084686279296875,
0.0014944076538085938,
0.019012451171875,
-0.0199432373046875,
0.033233642578125,
0.0343017578125,
-0.019073486328125,
0.044097900390625,
0.025115966796875,
0.001789093017578125,
0.039154052734375,
0.0002167224884033203,
-0.0178985595703125,
-0.00545501708984375,
-0.023468017578125,
-0.0005965232849121094,
-0.05059814453125,
-0.0618896484375,
-0.031951904296875,
-0.0140380859375,
-0.063232421875,
-0.062042236328125,
-0.038787841796875,
-0.0266571044921875,
0.0176239013671875,
0.007328033447265625,
0.005779266357421875,
-0.0016508102416992188,
0.005565643310546875,
-0.0284271240234375,
0.003292083740234375,
-0.006031036376953125,
0.005519866943359375,
0.0335693359375,
0.0234832763671875,
-0.0523681640625,
-0.022796630859375,
-0.01502227783203125,
-0.031280517578125,
-0.033905029296875,
0.020599365234375,
0.01435089111328125,
-0.019256591796875,
-0.03546142578125,
-0.028900146484375,
0.024261474609375,
-0.005207061767578125,
-0.00010454654693603516,
0.00885772705078125,
0.00710296630859375,
-0.00496673583984375,
-0.0034275054931640625,
0.050872802734375,
0.032562255859375,
-0.0273895263671875,
-0.00958251953125,
0.026824951171875,
0.01280975341796875,
-0.0175933837890625,
0.002040863037109375,
0.06561279296875,
0.038330078125,
0.01922607421875,
-0.003482818603515625,
0.012054443359375,
-0.0183258056640625,
-0.0157928466796875,
0.000026285648345947266,
0.01678466796875,
-0.038055419921875,
-0.03912353515625,
-0.011260986328125,
0.018402099609375,
0.03094482421875,
-0.00861358642578125,
0.0033111572265625,
0.034637451171875,
-0.0272216796875,
-0.0029163360595703125,
-0.0323486328125,
0.043426513671875,
0.002460479736328125,
-0.0276336669921875,
-0.03265380859375,
0.0130157470703125,
-0.0311737060546875,
-0.003231048583984375,
-0.04193115234375,
-0.0198211669921875,
0.010498046875,
0.01134490966796875,
-0.0228271484375,
-0.036407470703125,
-0.01284027099609375,
0.007648468017578125,
0.005359649658203125,
0.0271759033203125,
0.0161285400390625,
0.0163116455078125,
-0.01015472412109375,
0.005702972412109375,
0.0090484619140625,
-0.0061492919921875,
0.01898193359375,
-0.0205535888671875,
-0.036712646484375,
0.04461669921875,
-0.01373291015625,
-0.0241241455078125,
-0.01461029052734375,
0.0225982666015625,
-0.0091552734375,
-0.017059326171875,
0.01287078857421875,
0.0338134765625,
0.0750732421875,
-0.01226806640625,
0.045806884765625,
-0.0162353515625,
0.020233154296875,
-0.0282745361328125,
0.044921875,
0.0101165771484375,
-0.0270538330078125,
-0.02581787109375,
-0.01354217529296875,
-0.01320648193359375,
-0.0073699951171875,
-0.0014982223510742188,
0.0026683807373046875,
-0.01505279541015625,
0.00577545166015625,
-0.05938720703125,
-0.01288604736328125,
-0.023529052734375,
0.038482666015625,
-0.0007061958312988281,
0.0093231201171875,
0.01611328125,
0.0182342529296875,
-0.006717681884765625,
-0.05877685546875,
-0.03692626953125,
-0.004329681396484375,
-0.03515625,
0.035491943359375,
-0.00746917724609375,
0.0521240234375,
0.004299163818359375,
-0.059356689453125,
-0.009613037109375,
-0.0256500244140625,
0.00508880615234375,
-0.0243072509765625,
-0.0131988525390625,
-0.0142364501953125,
-0.018402099609375,
0.0028324127197265625,
-0.01169586181640625,
0.056060791015625,
0.0316162109375,
0.0543212890625,
-0.0172576904296875,
-0.0323486328125,
-0.039764404296875,
-0.07421875,
0.0237579345703125,
0.06353759765625,
0.0008068084716796875,
0.055267333984375,
-0.016815185546875,
0.03216552734375,
0.03387451171875,
0.0265655517578125,
0.038909912109375,
-0.00881195068359375,
0.03668212890625,
0.055328369140625,
-0.029296875,
-0.0129547119140625,
0.031585693359375,
-0.0809326171875,
0.0166015625,
0.0631103515625,
-0.00012493133544921875,
-0.0093231201171875,
0.0075836181640625,
-0.0115203857421875,
0.004520416259765625,
-0.0145263671875,
-0.041290283203125,
0.00791168212890625,
0.042755126953125,
-0.019561767578125,
0.0275726318359375,
0.004364013671875,
-0.00963592529296875,
0.0022068023681640625,
0.0250396728515625,
-0.054412841796875,
0.00429534912109375,
0.03173828125,
0.040771484375,
0.0170135498046875,
-0.044219970703125,
-0.0018138885498046875,
0.0037479400634765625,
0.0252685546875,
0.01485443115234375,
0.038848876953125,
-0.028778076171875,
-0.0129241943359375,
0.01105499267578125,
-0.050384521484375,
-0.01331329345703125,
0.0230712890625,
-0.006072998046875,
-0.01641845703125,
0.0178680419921875,
0.01042938232421875,
-0.017181396484375,
0.0282135009765625,
-0.00676727294921875,
-0.03741455078125,
0.01020050048828125,
-0.0333251953125,
0.02197265625,
-0.001708984375,
0.064208984375,
0.0732421875,
-0.004795074462890625,
0.035888671875,
0.00624847412109375,
0.00957489013671875,
0.0236053466796875,
0.0192718505859375,
-0.0012140274047851562,
-0.033905029296875,
-0.002872467041015625,
-0.004253387451171875,
0.01806640625,
0.08331298828125,
-0.01580810546875,
-0.0413818359375,
0.021453857421875,
0.0283203125,
-0.049072265625,
-0.0848388671875,
-0.01479339599609375,
-0.07415771484375,
0.0322265625,
-0.0297393798828125,
-0.0192718505859375,
-0.00556182861328125,
-0.00301361083984375,
0.0240020751953125,
-0.07373046875,
0.01238250732421875,
-0.006103515625,
-0.038116455078125,
-0.01250457763671875,
0.03399658203125,
-0.00043082237243652344,
0.0089874267578125,
0.0239715576171875,
0.03253173828125,
0.0033359527587890625,
-0.07550048828125,
0.0235137939453125,
-0.0240020751953125,
-0.0457763671875,
0.0245361328125,
-0.0037937164306640625,
-0.0489501953125,
-0.01084136962890625,
-0.006046295166015625,
0.015716552734375,
0.0025196075439453125,
0.01104736328125,
0.00800323486328125,
-0.0248260498046875,
-0.026611328125,
-0.0029201507568359375,
0.037322998046875,
0.0253143310546875,
0.0023097991943359375,
0.04962158203125,
-0.04010009765625,
-0.01947021484375,
-0.00461578369140625,
-0.036346435546875,
0.01337432861328125,
0.029022216796875,
-0.0136566162109375,
-0.0269622802734375,
0.026214599609375,
0.026336669921875,
-0.017333984375,
-0.00955963134765625,
0.0228118896484375,
-0.022308349609375,
-0.001880645751953125,
0.035797119140625,
-0.00441741943359375,
0.067626953125,
0.0042724609375,
0.00330352783203125,
0.034423828125,
0.0236358642578125,
0.00800323486328125,
-0.0243072509765625,
-0.04608154296875,
-0.0296783447265625,
-0.00408935546875,
-0.042694091796875,
0.037506103515625,
-0.0277099609375,
0.00528717041015625,
-0.00620269775390625,
0.051605224609375,
0.0125732421875,
-0.000056743621826171875,
-0.004756927490234375,
-0.01236724853515625,
-0.0103912353515625,
-0.0211639404296875,
-0.0540771484375,
0.0033283233642578125,
-0.057769775390625,
0.0330810546875,
-0.01177978515625,
0.001895904541015625,
-0.034088134765625,
0.0355224609375,
-0.03729248046875,
-0.0292816162109375,
0.028594970703125,
-0.057342529296875,
0.01186370849609375,
-0.01525115966796875,
-0.002544403076171875,
-0.04486083984375,
-0.01120758056640625,
-0.029541015625,
-0.09039306640625,
-0.00856781005859375,
-0.04351806640625,
0.059326171875,
0.0251007080078125,
0.01451873779296875,
-0.019195556640625,
0.04620361328125,
0.0162811279296875,
0.0274658203125,
0.0020465850830078125,
0.00788116455078125,
-0.0179443359375,
-0.0562744140625,
0.005634307861328125,
-0.05572509765625,
-0.0032825469970703125,
0.0161895751953125,
0.0081787109375,
0.01541900634765625,
-0.033203125,
-0.037750244140625,
-0.006359100341796875,
-0.03472900390625,
-0.06231689453125,
-0.048095703125,
-0.0233917236328125,
-0.003223419189453125,
-0.001720428466796875,
-0.018280029296875,
-0.047332763671875,
-0.0535888671875,
0.0232086181640625,
-0.031341552734375,
0.0203704833984375,
0.0005769729614257812,
0.07464599609375,
0.021697998046875,
0.0033721923828125,
0.0307769775390625,
-0.01654052734375,
0.0220947265625,
-0.015899658203125,
0.028778076171875,
-0.00739288330078125,
-0.0288848876953125,
0.0859375,
-0.013519287109375,
0.0054931640625,
-0.051605224609375,
0.08428955078125,
0.012054443359375,
0.027801513671875,
-0.0032138824462890625,
-0.0017185211181640625,
0.014404296875,
-0.0007038116455078125,
-0.036590576171875,
0.02459716796875,
0.00164031982421875,
0.0060577392578125,
-0.046234130859375,
0.050537109375,
-0.0172271728515625,
-0.033447265625,
-0.0016775131225585938,
0.0120697021484375,
0.030059814453125,
0.029327392578125,
-0.006870269775390625,
0.0399169921875,
0.036346435546875,
-0.01313018798828125,
0.0170135498046875,
0.00710296630859375,
-0.0010042190551757812,
0.01187896728515625,
0.01418304443359375,
-0.00962066650390625,
-0.0005016326904296875,
0.01358795166015625,
-0.041839599609375,
0.006626129150390625,
-0.0292205810546875,
-0.0693359375,
0.032958984375,
0.0289764404296875,
-0.02838134765625,
0.00585174560546875,
0.04656982421875,
0.0562744140625,
-0.017333984375,
-0.01309967041015625,
0.009124755859375,
0.027801513671875,
-0.051177978515625,
0.004058837890625,
0.023406982421875,
-0.023040771484375,
0.0157623291015625,
-0.004337310791015625,
0.029693603515625,
-0.01947021484375,
-0.02239990234375,
0.10302734375,
0.0511474609375,
0.016845703125,
0.0179595947265625,
-0.00916290283203125,
-0.01110076904296875,
-0.016876220703125,
-0.05999755859375,
-0.0177154541015625,
0.0194854736328125,
0.01073455810546875,
-0.015594482421875,
-0.00965118408203125,
-0.0243377685546875,
0.039215087890625,
0.008026123046875,
-0.0235595703125,
0.00777435302734375,
0.0428466796875,
-0.00115203857421875,
-0.00455474853515625,
-0.022308349609375,
-0.0265960693359375,
0.0287017822265625,
0.01763916015625,
0.013397216796875,
0.00553131103515625,
0.031463623046875,
-0.0511474609375,
0.031982421875,
-0.0299530029296875,
-0.0265350341796875,
-0.01263427734375,
0.0162200927734375,
0.0273895263671875,
0.029205322265625,
-0.027923583984375,
-0.021331787109375,
-0.0111541748046875,
0.0523681640625,
0.0058441162109375,
-0.007080078125,
-0.036529541015625,
-0.012481689453125,
-0.008331298828125,
0.0034160614013671875,
0.05108642578125,
-0.00493621826171875,
-0.0123291015625,
-0.0089874267578125,
-0.041015625,
-0.028900146484375,
-0.007137298583984375,
-0.00998687744140625,
-0.037506103515625,
-0.00923919677734375,
0.001964569091796875,
0.01129913330078125,
-0.005523681640625,
-0.003665924072265625,
0.006626129150390625,
0.03271484375,
0.0056610107421875,
0.040863037109375,
-0.038848876953125,
0.0697021484375,
-0.0024242401123046875,
0.03375244140625,
-0.0201568603515625,
0.011749267578125,
-0.004810333251953125,
0.00469207763671875,
-0.01702880859375,
-0.03204345703125,
0.00199127197265625,
0.026641845703125,
-0.00832366943359375,
0.0139312744140625,
0.0142822265625,
0.0024051666259765625,
0.018402099609375,
0.041168212890625,
0.019134521484375,
-0.01666259765625,
-0.046478271484375,
0.054443359375,
0.0036029815673828125,
0.04522705078125,
-0.0186920166015625,
-0.005126953125,
-0.0090179443359375,
-0.01337432861328125,
0.04388427734375,
-0.01287841796875,
0.0164031982421875,
-0.00567626953125,
-0.0138092041015625,
0.0183868408203125,
0.00695037841796875,
0.006687164306640625,
0.0316162109375,
-0.006092071533203125,
0.01629638671875,
0.0013170242309570312,
0.0005688667297363281,
-0.024658203125,
-0.0262298583984375,
0.036407470703125,
0.0030384063720703125,
-0.0212249755859375,
0.0251922607421875,
-0.0193328857421875,
0.0184326171875,
0.0655517578125,
0.052154541015625,
-0.08203125,
0.01276397705078125,
-0.01410675048828125,
-0.03118896484375,
0.01227569580078125,
-0.02789306640625,
0.0341796875,
0.0065460205078125,
0.04534912109375,
0.0374755859375,
-0.01454925537109375,
0.0228729248046875,
-0.0194854736328125,
-0.016143798828125,
-0.0245208740234375,
-0.02618408203125,
-0.0016164779663085938,
-0.034820556640625,
0.041168212890625,
0.0257568359375,
-0.000553131103515625,
-0.041839599609375,
-0.0034046173095703125,
0.0063018798828125,
-0.0014171600341796875,
-0.04339599609375,
0.036041259765625,
-0.04205322265625,
0.024810791015625,
-0.01013946533203125,
0.016082763671875,
0.056884765625,
0.04779052734375,
-0.00112152099609375,
-0.002105712890625,
0.0132598876953125,
0.045684814453125,
-0.059722900390625,
-0.0197906494140625,
0.03570556640625,
0.0227203369140625,
-0.05078125,
0.023284912109375,
-0.027008056640625,
-0.032501220703125,
0.0124053955078125,
-0.0005564689636230469,
0.03125,
-0.01245880126953125,
-0.02362060546875,
0.0333251953125,
0.01114654541015625,
-0.012603759765625,
-0.02947998046875,
-0.00910186767578125,
-0.0672607421875,
-0.013885498046875,
-0.02069091796875,
-0.0306243896484375,
-0.037994384765625,
-0.0504150390625,
-0.0643310546875,
0.1318359375,
0.0017528533935546875,
0.0162506103515625,
-0.0213623046875,
0.058685302734375,
-0.01195526123046875,
0.04547119140625,
-0.05621337890625,
0.043426513671875,
-0.023651123046875,
0.0386962890625,
-0.09149169921875,
-0.005596160888671875,
-0.0201263427734375,
0.01062774658203125,
-0.0113677978515625,
-0.00208282470703125,
-0.005725860595703125,
-0.006778717041015625,
0.01366424560546875,
0.0638427734375,
0.0236053466796875,
-0.0095977783203125,
0.0193939208984375,
0.025543212890625,
0.0269927978515625,
-0.0064239501953125,
0.033935546875,
-0.0147705078125,
-0.0207366943359375,
0.042877197265625,
0.01029205322265625,
0.005054473876953125,
-0.00701141357421875,
-0.0055694580078125,
-0.058349609375,
0.009124755859375,
0.031646728515625,
-0.006237030029296875,
-0.024658203125,
0.03662109375,
0.019683837890625,
-0.037872314453125,
-0.055511474609375,
-0.035064697265625,
0.02691650390625,
-0.0017223358154296875,
0.0066070556640625,
0.0242767333984375,
0.019805908203125,
-0.047393798828125,
0.0182647705078125,
-0.003971099853515625,
0.04266357421875,
-0.032806396484375,
0.053375244140625,
0.004154205322265625,
0.00817108154296875,
-0.060394287109375,
0.007503509521484375,
0.038787841796875,
0.0714111328125,
-0.05450439453125,
0.016754150390625,
0.0157623291015625,
0.0247802734375,
-0.01226043701171875,
-0.032562255859375,
-0.00200653076171875,
0.00785064697265625,
0.011932373046875,
0.0230255126953125,
-0.0205841064453125,
0.01120758056640625,
0.002689361572265625,
0.023834228515625,
0.04412841796875,
-0.006259918212890625,
-0.0224456787109375,
-0.054046630859375,
0.0170440673828125,
0.01526641845703125,
0.06304931640625,
0.05169677734375,
0.01424407958984375,
-0.011810302734375,
-0.035308837890625,
0.00662994384765625,
-0.00141143798828125,
-0.01531982421875,
0.006805419921875,
-0.0284271240234375,
-0.018096923828125,
-0.0165557861328125,
0.038543701171875,
-0.0030651092529296875,
0.06494140625,
0.053466796875,
0.0357666015625,
-0.009185791015625,
0.01116180419921875,
0.0650634765625,
-0.02667236328125,
-0.006999969482421875,
-0.0193634033203125,
0.028900146484375,
0.01494598388671875,
0.00545501708984375,
-0.01058197021484375,
0.059661865234375,
0.0236053466796875,
-0.0496826171875,
0.0721435546875,
-0.0140838623046875,
-0.0251312255859375,
0.051025390625,
0.00559234619140625,
0.112060546875,
-0.00354766845703125,
-0.001983642578125,
0.014251708984375,
-0.02130126953125,
-0.06884765625,
0.001659393310546875,
0.026123046875,
-0.043853759765625,
0.055023193359375,
0.051544189453125,
-0.01922607421875,
0.031036376953125,
-0.0013990402221679688,
0.0193939208984375,
0.00907135009765625,
0.01404571533203125,
0.017181396484375,
-0.047607421875,
-0.02252197265625,
-0.036712646484375,
0.026885986328125,
-0.004497528076171875,
0.0170440673828125,
0.00788116455078125,
0.0253448486328125,
0.019317626953125,
0.01470947265625,
-0.0186614990234375,
0.0097198486328125,
-0.012786865234375,
-0.02392578125,
0.024505615234375,
-0.004329681396484375,
-0.0312042236328125,
0.01641845703125,
0.00922393798828125,
0.0005850791931152344,
0.00015425682067871094,
-0.0177001953125,
0.0213470458984375,
0.03485107421875,
0.0038738250732421875,
-0.0285797119140625,
-0.020172119140625,
-0.0064239501953125,
-0.0084228515625,
0.0159912109375,
0.00553131103515625,
0.0164947509765625,
0.01324462890625,
0.006938934326171875,
-0.026031494140625,
0.016815185546875,
-0.02972412109375,
0.0252685546875,
0.03448486328125,
-0.020538330078125,
0.017303466796875,
0.02862548828125,
-0.00836181640625,
0.012939453125,
0.03363037109375,
-0.01535797119140625,
0.03271484375,
-0.031494140625,
-0.0474853515625,
0.032196044921875,
0.039794921875,
0.004154205322265625,
0.033721923828125,
-0.01215362548828125,
-0.0304412841796875,
-0.01152801513671875,
0.0232391357421875,
-0.0303955078125,
-0.0108642578125,
0.02435302734375,
0.033172607421875,
0.003612518310546875,
-0.00908660888671875,
-0.07330322265625,
-0.00391387939453125,
0.02008056640625,
-0.0081634521484375,
-0.006885528564453125,
0.02459716796875,
-0.06011962890625,
-0.017669677734375,
0.00641632080078125,
0.035308837890625,
-0.0023059844970703125,
0.04766845703125,
0.0130462646484375,
-0.040802001953125,
-0.004512786865234375,
0.07110595703125,
0.00519561767578125,
0.00594329833984375,
0.021942138671875,
-0.0162506103515625,
-0.0185546875,
-0.005191802978515625,
0.00673675537109375,
0.04522705078125,
0.0287017822265625,
-0.015960693359375,
0.009918212890625,
0.035858154296875,
-0.01641845703125,
-0.046844482421875,
0.007457733154296875,
0.0024471282958984375,
0.005489349365234375,
-0.024932861328125,
0.043487548828125,
0.07476806640625,
-0.005817413330078125,
-0.08270263671875,
0.032989501953125,
-0.02679443359375,
-0.025634765625,
-0.01558685302734375,
0.0301361083984375,
0.0253753662109375,
-0.036346435546875,
-0.021148681640625,
-0.00035572052001953125,
-0.0399169921875,
-0.01505279541015625,
0.00171661376953125,
0.0107574462890625,
0.0191192626953125,
0.002288818359375,
-0.053619384765625,
-0.003925323486328125,
-0.005886077880859375,
0.00269317626953125,
-0.0003535747528076172,
-0.0082855224609375,
0.032135009765625,
0.03497314453125,
-0.00971221923828125,
-0.01061248779296875,
0.020538330078125,
-0.03179931640625,
-0.016754150390625,
-0.026763916015625,
-0.026611328125,
0.01305389404296875,
0.09326171875,
0.06732177734375,
0.0223846435546875,
-0.06451416015625,
-0.0128326416015625,
-0.0257568359375,
0.001285552978515625,
0.013702392578125,
0.0055999755859375,
-0.0214385986328125,
0.0216217041015625,
0.013458251953125,
0.0079498291015625,
-0.038787841796875,
0.0248870849609375,
-0.009429931640625,
-0.0253448486328125,
0.022003173828125,
-0.0161590576171875,
-0.036376953125,
-0.01132965087890625,
0.09588623046875,
-0.043182373046875,
0.0259552001953125,
0.04144287109375,
0.0034885406494140625,
0.067626953125,
0.0799560546875,
0.005451202392578125,
0.06683349609375,
-0.07476806640625,
-0.01153564453125,
0.004688262939453125,
0.02008056640625,
-0.0285797119140625,
0.0017185211181640625,
-0.0175323486328125,
0.008544921875,
0.01169586181640625,
-0.004840850830078125,
-0.0223388671875,
0.0149383544921875,
0.0009765625,
0.044708251953125,
-0.073486328125,
0.044586181640625,
-0.0205078125,
-0.0215301513671875,
-0.0031948089599609375,
0.047454833984375,
0.08233642578125,
-0.0209503173828125,
-0.0011234283447265625,
0.0148162841796875,
-0.01384735107421875,
-0.024566650390625,
-0.0031948089599609375,
0.026458740234375,
-0.00411224365234375,
-0.01021575927734375
]
|
12963a8f98818585959936b949527e368aa4d01e | Wordpress Stackexchange
Q: Change wording of default thumbnail metabox I want to change the wording in the Default thumbnail metabox to 'Set default thumbnail' instead of 'Set featured image'. How can I do this?
A: This is usually what I go with:
/** Use "Featured Image" Box As A Custom Box **/
function customposttype_image_box() {
remove_meta_box('postimagediv', 'page', 'side');
add_meta_box('postimagediv', __('Set Dat Image'), 'post_thumbnail_meta_box', 'page', 'side');
}
add_action('do_meta_boxes', 'customposttype_image_box');
/** Change "Featured Image" box Link Text **/
function custom_admin_post_thumbnail_html( $content ) {
global $post;
if($post->post_type == 'page')
{
$content = str_replace( __( 'Set featured image' ), __( 'Upload dat Image' ), $content);
$content = str_replace( __( 'Remove featured image' ), __( 'Remove dat image' ), $content);
}
return $content;
}
add_filter( 'admin_post_thumbnail_html', 'custom_admin_post_thumbnail_html' );
| Q: Change wording of default thumbnail metabox I want to change the wording in the Default thumbnail metabox to 'Set default thumbnail' instead of 'Set featured image'. How can I do this?
A: This is usually what I go with:
/** Use "Featured Image" Box As A Custom Box **/
function customposttype_image_box() {
remove_meta_box('postimagediv', 'page', 'side');
add_meta_box('postimagediv', __('Set Dat Image'), 'post_thumbnail_meta_box', 'page', 'side');
}
add_action('do_meta_boxes', 'customposttype_image_box');
/** Change "Featured Image" box Link Text **/
function custom_admin_post_thumbnail_html( $content ) {
global $post;
if($post->post_type == 'page')
{
$content = str_replace( __( 'Set featured image' ), __( 'Upload dat Image' ), $content);
$content = str_replace( __( 'Remove featured image' ), __( 'Remove dat image' ), $content);
}
return $content;
}
add_filter( 'admin_post_thumbnail_html', 'custom_admin_post_thumbnail_html' );
A: Use media_view_strings to filter the default text.
Use the below in the active theme's function.php file
add_filter( 'media_view_strings', function( $strings ) {
$strings['setFeaturedImageTitle'] = __( 'Set default thumbnail' );
$strings['setFeaturedImage'] = __( 'Set default thumbnail' );
return $strings;
});
Found in WordPress/wp-includes/media.php
| wordpress | {
"language": "en",
"length": 164,
"provenance": "stackexchange_00019.jsonl.gz:439776",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125163"
} | [
0.047607421875,
-0.006927490234375,
0.0191192626953125,
-0.045501708984375,
0.0187530517578125,
-0.0141448974609375,
0.04718017578125,
-0.02984619140625,
0.0173187255859375,
0.00750732421875,
0.010955810546875,
-0.0200347900390625,
-0.029998779296875,
-0.03765869140625,
-0.0303497314453125,
-0.020477294921875,
0.0284576416015625,
0.0177154541015625,
0.039154052734375,
-0.0022125244140625,
0.004360198974609375,
0.0271759033203125,
0.0207672119140625,
0.0369873046875,
0.00820159912109375,
-0.046234130859375,
0.0372314453125,
-0.00627899169921875,
-0.0222015380859375,
-0.025360107421875,
0.0143890380859375,
0.030487060546875,
0.005535125732421875,
0.016845703125,
-0.0237884521484375,
0.00618743896484375,
0.01529693603515625,
0.00873565673828125,
-0.00023257732391357422,
0.0169525146484375,
0.0223846435546875,
-0.009124755859375,
-0.0069580078125,
-0.0136566162109375,
-0.0245819091796875,
-0.00954437255859375,
0.005359649658203125,
-0.034271240234375,
0.03558349609375,
0.0016870498657226562,
0.006061553955078125,
0.004810333251953125,
0.027984619140625,
-0.089599609375,
-0.02685546875,
-0.03277587890625,
-0.03436279296875,
0.03021240234375,
0.044952392578125,
0.022308349609375,
-0.029449462890625,
-0.0087890625,
-0.0095062255859375,
-0.0548095703125,
-0.0010318756103515625,
-0.0143890380859375,
-0.00363922119140625,
0.01174163818359375,
-0.02886962890625,
-0.0055999755859375,
0.0274200439453125,
-0.017669677734375,
0.0195465087890625,
-0.042388916015625,
0.0007810592651367188,
0.0618896484375,
-0.03948974609375,
0.0213623046875,
0.0330810546875,
-0.035430908203125,
0.0673828125,
-0.023284912109375,
0.0280609130859375,
0.020294189453125,
0.0253143310546875,
0.049163818359375,
0.0118408203125,
-0.033782958984375,
-0.0218048095703125,
-0.018951416015625,
-0.007476806640625,
-0.05450439453125,
-0.037445068359375,
0.0218048095703125,
0.01983642578125,
-0.0266265869140625,
0.013397216796875,
0.0300140380859375,
-0.019256591796875,
-0.006435394287109375,
-0.0177459716796875,
-0.0250396728515625,
-0.00727081298828125,
-0.0279083251953125,
0.033416748046875,
0.0185699462890625,
-0.055572509765625,
-0.035186767578125,
0.06427001953125,
0.053466796875,
0.01436614990234375,
-0.003040313720703125,
-0.0019397735595703125,
0.01065826416015625,
-0.044891357421875,
-0.0007429122924804688,
-0.0251617431640625,
-0.010986328125,
-0.0167388916015625,
0.01483917236328125,
0.018402099609375,
-0.00009685754776000977,
0.05572509765625,
-0.038055419921875,
0.0340576171875,
0.01177978515625,
-0.069580078125,
-0.0343017578125,
-0.0172271728515625,
0.00919342041015625,
-0.044158935546875,
0.001995086669921875,
0.11572265625,
0.06219482421875,
0.046173095703125,
-0.019287109375,
0.0233001708984375,
-0.0170440673828125,
-0.018707275390625,
0.022186279296875,
-0.0238494873046875,
-0.033538818359375,
0.0140380859375,
-0.040771484375,
-0.005558013916015625,
0.05413818359375,
0.0131683349609375,
-0.0133056640625,
-0.0159912109375,
-0.07684326171875,
0.010833740234375,
-0.0606689453125,
0.022430419921875,
0.022003173828125,
-0.00421905517578125,
-0.01512908935546875,
0.061309814453125,
-0.0345458984375,
-0.006427764892578125,
-0.05010986328125,
0.0374755859375,
-0.0352783203125,
-0.043670654296875,
0.01477813720703125,
-0.0222015380859375,
0.05609130859375,
-0.0074462890625,
0.00921630859375,
0.01548004150390625,
0.0087432861328125,
0.04400634765625,
0.01435089111328125,
-0.0374755859375,
0.01363372802734375,
0.0209808349609375,
-0.0089874267578125,
0.0035839080810546875,
0.036651611328125,
0.0108795166015625,
0.0266265869140625,
-0.0074920654296875,
-0.04779052734375,
0.0640869140625,
-0.03973388671875,
-0.0394287109375,
0.00514984130859375,
0.0075531005859375,
0.0212554931640625,
0.031494140625,
0.00998687744140625,
0.0323486328125,
-0.01390838623046875,
-0.05865478515625,
0.008575439453125,
0.0364990234375,
0.002712249755859375,
-0.0614013671875,
-0.042022705078125,
0.0023441314697265625,
-0.0016002655029296875,
0.019683837890625,
-0.024505615234375,
0.0301513671875,
-0.0015687942504882812,
-0.0188751220703125,
-0.0014390945434570312,
-0.0233306884765625,
0.032684326171875,
-0.0132904052734375,
0.00968170166015625,
0.0077972412109375,
-0.00975799560546875,
0.00400543212890625,
-0.0289154052734375,
-0.0057830810546875,
0.007476806640625,
0.00276947021484375,
0.025238037109375,
0.003147125244140625,
0.040374755859375,
0.00689697265625,
-0.03070068359375,
-0.01102447509765625,
0.01139068603515625,
0.075439453125,
0.0430908203125,
-0.05120849609375,
-0.004207611083984375,
0.042724609375,
0.015869140625,
-0.0667724609375,
0.060943603515625,
0.0012598037719726562,
-0.022369384765625,
-0.0183258056640625,
-0.005954742431640625,
0.044647216796875,
-0.093505859375,
0.02099609375,
0.056915283203125,
0.023345947265625,
0.047943115234375,
-0.011749267578125,
0.01885986328125,
0.0699462890625,
0.008392333984375,
0.0159149169921875,
-0.00334930419921875,
-0.0149383544921875,
-0.034149169921875,
-0.040557861328125,
-0.038665771484375,
0.0478515625,
-0.05487060546875,
0.0155181884765625,
0.032684326171875,
-0.0009899139404296875,
-0.0273895263671875,
0.004497528076171875,
0.0149688720703125,
0.01267242431640625,
0.03271484375,
-0.0222015380859375,
0.02239990234375,
0.030609130859375,
0.011383056640625,
0.03546142578125,
0.0251922607421875,
-0.0273590087890625,
0.01305389404296875,
0.0147552490234375,
0.005908966064453125,
-0.0163421630859375,
0.01091766357421875,
0.057403564453125,
-0.007343292236328125,
-0.05242919921875,
0.004161834716796875,
0.0194244384765625,
0.0032825469970703125,
-0.01276397705078125,
0.0200653076171875,
-0.045623779296875,
-0.0049896240234375,
-0.025482177734375,
-0.06231689453125,
0.0101165771484375,
0.03997802734375,
0.00518798828125,
-0.00713348388671875,
0.02984619140625,
0.008697509765625,
-0.01413726806640625,
0.0304107666015625,
-0.037261962890625,
-0.01003265380859375,
-0.00786590576171875,
-0.046112060546875,
0.041351318359375,
-0.05792236328125,
0.053741455078125,
0.060943603515625,
-0.0300445556640625,
0.01312255859375,
-0.0131072998046875,
0.00783538818359375,
-0.0423583984375,
0.027862548828125,
-0.007843017578125,
-0.01824951171875,
-0.049041748046875,
-0.00885772705078125,
0.015716552734375,
0.043914794921875,
-0.026336669921875,
-0.035980224609375,
0.00800323486328125,
0.0066680908203125,
-0.030853271484375,
-0.0290985107421875,
0.0026149749755859375,
-0.041595458984375,
-0.0247039794921875,
0.00600433349609375,
-0.0274658203125,
0.00446319580078125,
0.0262908935546875,
-0.0097503662109375,
-0.0081939697265625,
-0.0091400146484375,
-0.0294342041015625,
-0.027557373046875,
-0.0384521484375,
-0.037353515625,
-0.0088958740234375,
0.0010585784912109375,
0.004974365234375,
0.0426025390625,
-0.00019443035125732422,
-0.05841064453125,
0.00482940673828125,
0.0491943359375,
0.005130767822265625,
0.020751953125,
0.02691650390625,
-0.02520751953125,
0.001995086669921875,
-0.01161956787109375,
0.028564453125,
0.049560546875,
-0.042205810546875,
-0.0028209686279296875,
-0.055877685546875,
0.01314544677734375,
-0.007472991943359375,
0.0204620361328125,
0.060333251953125,
0.031463623046875,
0.032562255859375,
-0.010040283203125,
-0.0214996337890625,
-0.0005626678466796875,
-0.0282135009765625,
0.0237274169921875,
-0.005512237548828125,
0.00653839111328125,
-0.0017414093017578125,
0.0401611328125,
0.00949859619140625,
0.01380157470703125,
0.051544189453125,
-0.020416259765625,
-0.0120697021484375,
-0.006618499755859375,
-0.0008077621459960938,
-0.045928955078125,
0.0122833251953125,
-0.007251739501953125,
0.04132080078125,
0.017974853515625,
0.052032470703125,
0.01056671142578125,
0.027618408203125,
-0.0244293212890625,
-0.0556640625,
0.02789306640625,
-0.04681396484375,
0.0016956329345703125,
-0.0180511474609375,
-0.0191192626953125,
0.01446533203125,
0.0709228515625,
-0.058807373046875,
-0.019378662109375,
-0.01031494140625,
-0.00960540771484375,
0.036590576171875,
0.0027751922607421875,
-0.0307159423828125,
-0.02679443359375,
-0.10870361328125,
0.00968170166015625,
0.0007147789001464844,
-0.04498291015625,
-0.0281982421875,
0.0265655517578125,
-0.0914306640625,
-0.038360595703125,
0.046112060546875,
-0.0190277099609375,
-0.01395416259765625,
0.086181640625,
-0.03765869140625,
0.0452880859375,
-0.048980712890625,
-0.0023784637451171875,
-0.0982666015625,
-0.0233001708984375,
-0.0210113525390625,
0.09002685546875,
-0.0029449462890625,
-0.0004372596740722656,
-0.062164306640625,
0.036163330078125,
0.0019741058349609375,
-0.0093536376953125,
0.0127410888671875,
0.006343841552734375,
0.01715087890625,
-0.0136566162109375,
0.00945281982421875,
-0.0290069580078125,
-0.00608062744140625,
-0.03021240234375,
-0.046478271484375,
-0.0014448165893554688,
-0.0014982223510742188,
0.030670166015625,
0.032928466796875,
-0.018310546875,
-0.058441162109375,
-0.032989501953125,
-0.0003693103790283203,
0.0226287841796875,
0.0198211669921875,
-0.029632568359375,
-0.05535888671875,
-0.058868408203125,
0.0341796875,
0.016387939453125,
-0.023223876953125,
0.0148162841796875,
0.048797607421875,
0.02899169921875,
-0.0270843505859375,
-0.07232666015625,
0.00901031494140625,
0.0259552001953125,
-0.03192138671875,
0.02471923828125,
0.0234222412109375,
-0.0016536712646484375,
0.0194549560546875,
-0.0091094970703125,
0.0140380859375,
-0.053314208984375,
0.066162109375,
-0.0020809173583984375,
0.006359100341796875,
0.0091705322265625,
-0.0146636962890625,
0.02874755859375,
0.0124664306640625,
-0.00897979736328125,
-0.00022840499877929688,
-0.057464599609375,
0.0093841552734375,
0.037933349609375,
-0.0294342041015625,
-0.042938232421875,
0.02197265625,
-0.00893402099609375,
0.0002720355987548828,
0.03985595703125,
0.02032470703125,
0.00817108154296875,
-0.0265960693359375,
0.00693511962890625,
0.0027484893798828125,
-0.013671875,
-0.0167236328125,
0.00635528564453125,
0.0179901123046875,
0.01763916015625,
0.02142333984375,
-0.007080078125,
0.010009765625,
-0.0192413330078125,
-0.00473785400390625,
-0.004360198974609375,
-0.059844970703125,
0.0230865478515625,
0.0599365234375,
-0.01044464111328125,
0.01337432861328125,
0.0171051025390625,
0.0257415771484375,
0.0005922317504882812,
-0.01885986328125,
-0.01204681396484375,
0.032501220703125,
-0.037567138671875,
0.00479888916015625,
0.0290069580078125,
-0.0203399658203125,
0.029876708984375,
0.052398681640625,
-0.0092620849609375,
0.044921875,
-0.0129241943359375,
0.0312347412109375,
-0.0253448486328125,
0.0374755859375,
0.003917694091796875,
0.01541900634765625,
-0.0005931854248046875,
0.007129669189453125,
-0.006927490234375,
0.003612518310546875,
-0.0014410018920898438,
0.00119781494140625,
0.036224365234375,
-0.033172607421875,
-0.01375579833984375,
0.005435943603515625,
-0.054351806640625,
-0.017913818359375,
-0.0139312744140625,
-0.04364013671875,
-0.0537109375,
0.01244354248046875,
0.0010538101196289062,
-0.0005588531494140625,
-0.020538330078125,
-0.0489501953125,
0.027862548828125,
-0.04229736328125,
0.02484130859375,
-0.06793212890625,
-0.021209716796875,
0.0232086181640625,
0.0256500244140625,
-0.015625,
-0.00782012939453125,
-0.0160064697265625,
-0.01192474365234375,
-0.0198516845703125,
-0.0150909423828125,
-0.00872039794921875,
0.060577392578125,
-0.05078125,
0.03533935546875,
-0.005146026611328125,
-0.0082550048828125,
-0.032440185546875,
0.036102294921875,
0.00833892822265625,
0.020660400390625,
-0.0250091552734375,
0.0042724609375,
-0.053466796875,
-0.00860595703125,
0.01357269287109375,
-0.028076171875,
-0.014984130859375,
-0.0312347412109375,
0.018096923828125,
0.02484130859375,
-0.0103912353515625,
-0.0227203369140625,
0.00649261474609375,
-0.005733489990234375,
0.00783538818359375,
0.06890869140625,
-0.0214996337890625,
-0.00527191162109375,
0.028839111328125,
0.016204833984375,
-0.0181427001953125,
-0.058441162109375,
-0.00440216064453125,
0.0013589859008789062,
-0.0240325927734375,
-0.050628662109375,
0.0149078369140625,
0.0182342529296875,
-0.02142333984375,
0.0215911865234375,
0.037933349609375,
0.01036834716796875,
0.00743865966796875,
-0.0201416015625,
-0.0204010009765625,
-0.0239105224609375,
0.0265960693359375,
-0.0202789306640625,
0.035736083984375,
-0.05181884765625,
-0.034210205078125,
0.0238189697265625,
-0.01141357421875,
-0.003223419189453125,
0.038970947265625,
-0.062255859375,
0.0186614990234375,
0.0634765625,
-0.048248291015625,
0.03582763671875,
0.042266845703125,
0.0203704833984375,
0.0457763671875,
0.0093841552734375,
0.023773193359375,
0.004283905029296875,
-0.0163726806640625,
0.004848480224609375,
-0.00823974609375,
0.049652099609375,
0.004886627197265625,
-0.00011968612670898438,
0.065673828125,
-0.0145263671875,
0.0294952392578125,
0.009857177734375,
0.0693359375,
-0.033599853515625,
0.027862548828125,
0.0281829833984375,
-0.01403045654296875,
0.041717529296875,
0.01145172119140625,
-0.00902557373046875,
0.004909515380859375,
0.01331329345703125,
-0.04803466796875,
-0.0174102783203125,
0.010162353515625,
0.00792694091796875,
-0.0244598388671875,
0.0016241073608398438,
-0.03826904296875,
0.01074981689453125,
-0.029449462890625,
0.01250457763671875,
0.01361083984375,
-0.015716552734375,
-0.003993988037109375,
0.017425537109375,
-0.030426025390625,
-0.0203399658203125,
-0.0821533203125,
-0.041107177734375,
-0.002593994140625,
-0.0256195068359375,
0.046417236328125,
0.024261474609375,
0.00023984909057617188,
0.049530029296875,
-0.01462554931640625,
0.03662109375,
0.004154205322265625,
-0.048370361328125,
-0.042572021484375,
0.0017499923706054688,
0.01456451416015625,
-0.0029048919677734375,
-0.022186279296875,
0.0307159423828125,
-0.047821044921875,
-0.0194244384765625,
-0.00798797607421875,
-0.0127716064453125,
0.0582275390625,
0.007511138916015625,
-0.033111572265625,
0.01349639892578125,
0.0066986083984375,
-0.0130615234375,
-0.0178375244140625,
0.010009765625,
-0.06463623046875,
-0.037750244140625,
-0.0191802978515625,
-0.051422119140625,
0.00933074951171875,
-0.03619384765625,
-0.08868408203125,
0.08929443359375,
-0.00713348388671875,
0.05810546875,
-0.0204925537109375,
0.02301025390625,
0.0030193328857421875,
0.006618499755859375,
0.00789642333984375,
-0.0240936279296875,
-0.0335693359375,
0.0240020751953125,
0.0160369873046875,
0.01490020751953125,
0.01385498046875,
0.00803375244140625,
0.0243377685546875,
0.01361846923828125,
-0.028289794921875,
-0.00684356689453125,
0.0301513671875,
0.050537109375,
0.019287109375,
0.01145172119140625,
-0.031280517578125,
0.04656982421875,
0.0029449462890625,
-0.0458984375,
0.016510009765625,
-0.02001953125,
-0.07635498046875,
0.0032863616943359375,
0.028717041015625,
0.043548583984375,
0.017608642578125,
0.053009033203125,
-0.0300445556640625,
0.005374908447265625,
0.0528564453125,
-0.06634521484375,
0.0031681060791015625,
0.046630859375,
0.0259552001953125,
-0.00661468505859375,
-0.03350830078125,
-0.01380157470703125,
0.037078857421875,
0.01476287841796875,
0.024566650390625,
0.01482391357421875,
0.018890380859375,
0.0255584716796875,
-0.0292205810546875,
0.00897216796875,
0.0109710693359375,
-0.0230712890625,
0.01187896728515625,
-0.00308990478515625,
-0.0005550384521484375,
-0.040191650390625,
0.02886962890625,
0.039947509765625,
0.016998291015625,
-0.0382080078125,
-0.040191650390625,
-0.0011491775512695312,
-0.005878448486328125,
0.01348876953125,
-0.015960693359375,
0.006198883056640625,
-0.040435791015625,
-0.0126495361328125,
-0.041473388671875,
0.00638580322265625,
0.026031494140625,
-0.006694793701171875,
-0.026031494140625,
-0.018035888671875,
0.0033206939697265625,
0.0196685791015625,
-0.005474090576171875,
-0.01544189453125,
0.0137176513671875,
0.0243988037109375,
0.0173492431640625,
0.029052734375,
-0.014617919921875,
0.006221771240234375,
-0.006687164306640625,
0.0212554931640625,
-0.009124755859375,
0.01306915283203125,
-0.036224365234375,
-0.028961181640625,
0.016754150390625,
0.0267791748046875,
0.00836944580078125,
0.0191650390625,
0.04254150390625,
0.03900146484375,
-0.0321044921875,
-0.01488494873046875,
0.01947021484375,
-0.0216064453125,
-0.0012950897216796875,
-0.0418701171875,
0.036834716796875,
0.015869140625,
0.00946807861328125,
0.0052947998046875,
0.01395416259765625,
0.0301513671875,
-0.0106201171875,
0.02069091796875,
0.003047943115234375,
-0.0333251953125,
0.04583740234375,
-0.01233673095703125,
0.0809326171875,
0.0077972412109375,
-0.0487060546875,
-0.007080078125,
0.0166473388671875,
-0.08807373046875,
0.007587432861328125,
0.039276123046875,
-0.04949951171875,
0.01085662841796875,
0.00605010986328125,
0.03369140625,
0.01377105712890625,
-0.049652099609375,
0.001964569091796875,
-0.0016384124755859375,
0.0343017578125,
0.026763916015625,
0.0026073455810546875,
-0.00494384765625,
0.021728515625,
0.04022216796875,
-0.0184783935546875,
0.0269622802734375,
-0.026397705078125,
0.023590087890625,
-0.02056884765625,
-0.0027065277099609375,
-0.034027099609375,
-0.01456451416015625,
0.002979278564453125,
-0.0195159912109375,
-0.0014600753784179688,
0.0095062255859375,
-0.006847381591796875,
0.007480621337890625,
0.0382080078125,
-0.0261993408203125,
-0.02630615234375,
0.0196380615234375,
0.019195556640625,
-0.00153350830078125,
0.0243072509765625,
-0.0237579345703125,
-0.0195465087890625,
-0.07147216796875,
-0.02996826171875,
0.040283203125,
0.01544189453125,
0.0165252685546875,
0.038970947265625,
0.02423095703125,
0.0333251953125,
0.037353515625,
-0.01537322998046875,
0.06597900390625,
0.053466796875,
-0.091064453125,
-0.032928466796875,
-0.01142120361328125,
-0.0035724639892578125,
-0.0186614990234375,
0.0179901123046875,
0.0196380615234375,
0.006450653076171875,
-0.0450439453125,
-0.0212249755859375,
-0.015625,
-0.0040740966796875,
-0.03179931640625,
-0.013336181640625,
0.0014743804931640625,
-0.00972747802734375,
-0.0265960693359375,
0.01216888427734375,
0.0047760009765625,
-0.037017822265625,
-0.0193328857421875,
0.00960540771484375,
-0.01007080078125,
-0.0255279541015625,
-0.03924560546875,
0.0215606689453125,
0.0254669189453125,
0.01953125,
-0.06488037109375,
0.0667724609375,
-0.004787445068359375,
0.01190948486328125,
0.0216064453125,
-0.0400390625,
0.0015659332275390625,
0.03131103515625,
-0.01715087890625,
-0.0482177734375,
-0.0677490234375,
0.00183868408203125,
-0.0810546875,
0.03271484375,
0.05072021484375,
-0.03466796875,
-0.00745391845703125,
0.00506591796875,
0.00421142578125,
0.063232421875,
-0.031585693359375,
-0.0187835693359375,
-0.0284881591796875,
0.0297698974609375,
-0.03363037109375,
-0.06646728515625,
0.0237579345703125,
-0.0555419921875,
-0.025390625,
0.04864501953125,
-0.0301055908203125,
0.01084136962890625,
-0.037841796875,
-0.0806884765625,
0.0214996337890625,
0.0081787109375,
-0.04034423828125,
-0.005863189697265625,
0.0093994140625,
-0.01387786865234375,
0.0140380859375,
0.0122528076171875,
-0.0085296630859375,
-0.01056671142578125,
-0.00913238525390625,
0.0285186767578125,
-0.0178680419921875,
0.0653076171875,
-0.0101318359375,
-0.01428985595703125,
-0.0034942626953125,
0.005702972412109375,
0.0026092529296875,
0.01496124267578125,
-0.0088043212890625,
0.0284881591796875,
0.0341796875,
-0.03216552734375,
-0.07305908203125,
-0.02362060546875,
-0.0279083251953125,
-0.021759033203125,
-0.03704833984375,
-0.015716552734375,
-0.007598876953125,
0.077880859375,
0.045196533203125,
0.0131072998046875,
-0.026702880859375,
0.00476837158203125,
-0.0855712890625,
-0.0272064208984375,
-0.039520263671875,
0.010406494140625,
-0.08831787109375,
-0.0275115966796875,
0.0439453125,
-0.033966064453125,
0.01116943359375,
0.0196380615234375,
-0.054473876953125,
0.0184783935546875,
-0.0007314682006835938,
-0.00701904296875,
-0.07684326171875,
0.01393890380859375,
0.06732177734375,
-0.0477294921875,
0.018585205078125,
-0.0078125,
-0.0001233816146850586,
0.042022705078125,
-0.031951904296875,
-0.0162353515625,
0.009735107421875,
-0.037750244140625,
0.006320953369140625,
-0.0133514404296875,
0.01160430908203125,
-0.032867431640625,
0.007251739501953125,
-0.0189666748046875,
0.009521484375,
0.004673004150390625,
0.0119781494140625,
-0.007801055908203125,
0.00821685791015625,
0.0014896392822265625,
0.0033817291259765625,
-0.037017822265625,
-0.027740478515625,
-0.0177001953125,
-0.0110931396484375,
-0.014617919921875,
0.0226593017578125,
0.03924560546875,
-0.00904083251953125,
0.0199737548828125,
0.001255035400390625,
0.028656005859375,
-0.016326904296875,
0.006591796875,
-0.0258941650390625,
-0.003795623779296875,
0.01384735107421875
]
|
1453a33602415c4373d26d01cd12dc590bb16d8a | Wordpress Stackexchange
Q: How to parse nested shortcodes? The nested shortcodes won't parse correctly:
[row]
[col size="6"]...[/col]
[col size="6"]
[row]
[col size="6"]...[/col]
[col size="6"]...[/col]
[/row]
[/col]
[/row]
From the WordPress documentation, I understand that it is a WordPress shortcodes limitation. Is it still possible to get it work?
Edit:
Here's my shortcodes code, it works fine if its not nested (ie., row shortcode is not used inside the col shortcode).
add_shortcode( 'row', 'row_cb' );
function row_cb( $atts, $content = null ) {
$output = '';
$output .= '<div class="row">';
$output .= do_shortcode( $content );
$output .= '</div>';
return $output;
}
add_shortcode( 'col', 'col_cb' );
function col_cb( $atts, $content = null ) {
extract( shortcode_atts( array(
'size' => '',
), $atts ) );
$output = '';
$output .= '<div class="col">';
$output .= do_shortcode( $content );
$output .= '</div>';
return $output;
}
A: There's a solution for that, actually. The shortcode you are using has the variable $content, whithout the filter do_shortcode, like this:
do_shortcode($content)
Open the file where there are the shortcodes and change $content for do_shortcode($content). It will work.
| Q: How to parse nested shortcodes? The nested shortcodes won't parse correctly:
[row]
[col size="6"]...[/col]
[col size="6"]
[row]
[col size="6"]...[/col]
[col size="6"]...[/col]
[/row]
[/col]
[/row]
From the WordPress documentation, I understand that it is a WordPress shortcodes limitation. Is it still possible to get it work?
Edit:
Here's my shortcodes code, it works fine if its not nested (ie., row shortcode is not used inside the col shortcode).
add_shortcode( 'row', 'row_cb' );
function row_cb( $atts, $content = null ) {
$output = '';
$output .= '<div class="row">';
$output .= do_shortcode( $content );
$output .= '</div>';
return $output;
}
add_shortcode( 'col', 'col_cb' );
function col_cb( $atts, $content = null ) {
extract( shortcode_atts( array(
'size' => '',
), $atts ) );
$output = '';
$output .= '<div class="col">';
$output .= do_shortcode( $content );
$output .= '</div>';
return $output;
}
A: There's a solution for that, actually. The shortcode you are using has the variable $content, whithout the filter do_shortcode, like this:
do_shortcode($content)
Open the file where there are the shortcodes and change $content for do_shortcode($content). It will work.
A: I created a solution for my nested shortcodes, maybe you could use something from it.
I used a recursive regex (notice |(?R)), so it might be not that fast as the official do_shortcode, but it allows nesting shortcodes with the same name.
My request for it was to not have a fixed list of shortcodes (so all existing in the content shortcodes must be parsed), to allow any level of nesting, and also to use a structure of $atts, which contain some parameters, existing at the time of filling this exact content.
For $atts I wrote my own function, too, as I wanted $atts to include both everything coming from the content (and not only those, whose default value is defined), and the default values for those fields, existing in the default array and not coming from the shortcode values.
Here's my atts function:
function complete_atts_with_defaults( $pairs, $atts = array() ) {
$out = $atts;
foreach ($pairs as $name => $default) {
if ( array_key_exists($name, $atts) && !empty( $atts[$name] ) ) { continue; }
//else
$out[$name] = $default;
}
return $out;
}
And here's the other code:
define( 'OUR_SHORTCODE_FULL_REGEX', '@\[([a-z0-9_]+)([^\]]*)\]((?:[^[]|(?R))+)\[\/\1\]@' );
define( 'OUR_SHORTCODE_HALF_REGEX', '@\[([a-z0-9_]+)([^\]]*)\/\]@' );
function fill_all_post_placeholders( $text, $atts = array() ) {
//...
$text = str_replace( '%5B', '[', $text );
$text = str_replace( '%5D', ']', $text );
$atts = complete_atts_with_defaults(
array(
'value1' => 'Hi :)',
'value2' => '',
'value3' => '',
), $atts );
//...
$text = preg_replace_callback( OUR_SHORTCODE_HALF_REGEX, function( $match ) use ( $atts ) { return replace_half_shortcode_placeholder( $match[1], $match[2], $atts ); }, $text );
$text = preg_replace_callback( OUR_SHORTCODE_FULL_REGEX, function( $match ) use ( $atts ) { return replace_shortcode_placeholder( $match[1], $match[2], $match[3], $atts ); }, $text );
return $text;
}
function replace_shortcode_placeholder( $name, $params, $content, $atts ) {
$content = preg_replace_callback( OUR_SHORTCODE_FULL_REGEX, function( $match ) use ( $atts ) { return replace_shortcode_placeholder( $match[1], $match[2], $match[3], $atts ); }, $content );
// $function_to_call = '_rp_' . $name;
// if ( function_exists( $function_to_call ) ) { return $function_to_call( $name, $params, $atts ); }
// //else
// $value = $atts[ $name ];
// if ( empty( $value ) ) { return ''; }
// //else
// return $value;
return '<br>name: ' . $name . ' <br>params: ' . $params . ' <br>content: (' . $content . ')<br><br>';
}
function replace_half_shortcode_placeholder( $name, $params, $atts ) {
// $function_to_call = '_rp_' . $name;
// if ( function_exists( $function_to_call ) ) { return $function_to_call( $name, $params, $atts ); }
// //else
// $value = $atts[ $name ];
// if ( empty( $value ) ) { return ''; }
// //else
// return $value;
return '<br>name half: ' . $name . ' <br>params half: ' . $params . '<br><br>';
}
I left for you the commented area intact, so that you could see how those functions could be used.
These "shortcodes" of mine are not registered, as you can see in the commented code, they work differently, dynamically.
Also, the necessary rule for these shortcodes to work would be, to always add '/' to the self-closing tags, like one would do in XML. (In the code they are called "half-shortcodes".)
Example to the content parsed by this code (sorry for the gibberish):
[show_text_if campaign="2899"]subscribing to this newsletter [show_text_if campaign="2901" field_value="'a href='http://ajshdash.com/asdhal/asdasdasd'" field_value2="айксчд асй даксчй д"]subscribing to this new newsletter[/show_text_if] [red value1="dfsdfs" value2="sdfkls dfh skjha skd"/][/show_text_if]
[color value3="askdfjajls" value4="lskdfhjsldhfs df"/]
[show_text_if_not campaign="2899"]asdklja slkd alkd alskdj alsjd alsj als jdalsk jals dalskj asjd <a href="http://example.com/experiment/" target="_blank">Experiment</a> once more hooray! [green value4="askljjlaskd"/] Я сегодня это Я и я! :)[/show_text_if_not]
[show_text_if field_name="campaign" field_value="2899"]slkjd alsjkd aljsd ajs d new[/show_text_if]
And I understand, that this code is not a direct solution to what you asked for, but maybe you could use some of it, to work out the solution yourself.
A: Your shortcode callback should appears something like:
add_shortcode('col', 'col_cb');
add_shortcode('row', 'row_cb');
function col_cb( $atts, $content ) {
$content = do_shortcode($content);
// ...
}
function row_cb( $atts, $content ) {
$content = do_shortcode($content);
// ...
}
| wordpress | {
"language": "en",
"length": 833,
"provenance": "stackexchange_00019.jsonl.gz:439817",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125328"
} | [
-0.02227783203125,
-0.045379638671875,
-0.01222991943359375,
-0.0243682861328125,
-0.050262451171875,
-0.00455474853515625,
-0.0345458984375,
0.01004791259765625,
-0.01297760009765625,
0.0192718505859375,
-0.0306549072265625,
-0.01348876953125,
-0.043914794921875,
-0.015533447265625,
-0.029937744140625,
-0.06304931640625,
0.029693603515625,
-0.0036640167236328125,
0.00603485107421875,
-0.020477294921875,
-0.0189208984375,
0.0100555419921875,
-0.02008056640625,
0.08477783203125,
0.0154876708984375,
-0.0065765380859375,
0.09222412109375,
-0.0179901123046875,
0.00278472900390625,
-0.022674560546875,
0.017303466796875,
-0.0140228271484375,
0.04498291015625,
-0.004772186279296875,
-0.03179931640625,
0.058746337890625,
-0.03875732421875,
0.014312744140625,
-0.01409149169921875,
0.0186920166015625,
0.005767822265625,
0.0052337646484375,
0.081298828125,
-0.0115203857421875,
0.0251922607421875,
-0.0057373046875,
0.0200958251953125,
-0.055328369140625,
-0.0212554931640625,
0.0175933837890625,
0.0273590087890625,
0.026031494140625,
0.04351806640625,
-0.00323486328125,
0.007114410400390625,
0.0193328857421875,
-0.016693115234375,
-0.044189453125,
0.03460693359375,
0.0191192626953125,
-0.0146331787109375,
-0.031463623046875,
0.02593994140625,
-0.035552978515625,
0.00010710954666137695,
0.006443023681640625,
0.0015897750854492188,
0.0087127685546875,
0.0009813308715820312,
0.03753662109375,
0.02130126953125,
-0.0197601318359375,
-0.025421142578125,
-0.01255035400390625,
0.00116729736328125,
0.047943115234375,
-0.0194854736328125,
-0.01320648193359375,
0.01509857177734375,
0.024169921875,
-0.0102081298828125,
-0.019561767578125,
-0.0236358642578125,
0.0157470703125,
-0.005893707275390625,
0.0293426513671875,
-0.005168914794921875,
-0.009185791015625,
-0.0224761962890625,
-0.0019989013671875,
-0.0149383544921875,
0.050628662109375,
-0.051361083984375,
-0.0077972412109375,
-0.019012451171875,
-0.00801849365234375,
-0.005035400390625,
0.05523681640625,
-0.042144775390625,
0.027496337890625,
-0.02996826171875,
-0.02313232421875,
0.03448486328125,
-0.07147216796875,
0.01093292236328125,
0.00020492076873779297,
-0.0197601318359375,
-0.05792236328125,
0.051727294921875,
0.034088134765625,
-0.004665374755859375,
0.043121337890625,
-0.065185546875,
-0.059783935546875,
0.0006222724914550781,
0.049560546875,
-0.086181640625,
0.0294952392578125,
0.004833221435546875,
0.007572174072265625,
-0.0014934539794921875,
0.0093536376953125,
0.006931304931640625,
-0.02825927734375,
-0.018798828125,
-0.0225067138671875,
-0.01024627685546875,
-0.02294921875,
0.0469970703125,
-0.014068603515625,
-0.032745361328125,
0.0185089111328125,
0.04901123046875,
0.031005859375,
0.02294921875,
-0.003101348876953125,
-0.005786895751953125,
-0.0133819580078125,
0.0004825592041015625,
0.000054001808166503906,
0.0173187255859375,
-0.0012454986572265625,
0.011322021484375,
0.0026645660400390625,
-0.01010894775390625,
0.037872314453125,
0.053009033203125,
-0.013824462890625,
-0.051483154296875,
-0.11077880859375,
0.019744873046875,
0.0210113525390625,
0.056671142578125,
0.006076812744140625,
-0.0523681640625,
-0.01453399658203125,
0.051544189453125,
-0.050689697265625,
-0.0287628173828125,
-0.0882568359375,
0.00299072265625,
0.002918243408203125,
0.033905029296875,
-0.044036865234375,
-0.036163330078125,
-0.0192413330078125,
-0.07073974609375,
-0.0036411285400390625,
0.0230712890625,
0.032440185546875,
0.0000022649765014648438,
0.0002052783966064453,
-0.0518798828125,
0.00872039794921875,
0.004917144775390625,
-0.0086517333984375,
-0.053436279296875,
-0.0019893646240234375,
0.0272369384765625,
-0.0135040283203125,
-0.0213775634765625,
-0.045928955078125,
-0.007965087890625,
0.0301361083984375,
-0.0139312744140625,
0.03704833984375,
0.0128326416015625,
0.056304931640625,
-0.011566162109375,
0.0191650390625,
-0.0209503173828125,
0.0007410049438476562,
-0.051788330078125,
-0.00003272294998168945,
0.0018863677978515625,
-0.0172882080078125,
-0.00418853759765625,
-0.0035686492919921875,
-0.0023365020751953125,
0.01230621337890625,
-0.01233673095703125,
-0.0020809173583984375,
0.0081024169921875,
0.003948211669921875,
-0.022918701171875,
0.01346588134765625,
-0.026885986328125,
0.0278778076171875,
-0.06048583984375,
-0.0250701904296875,
0.0312042236328125,
-0.047637939453125,
-0.01099395751953125,
0.0246734619140625,
0.0151519775390625,
0.02734375,
-0.002750396728515625,
0.036468505859375,
0.019439697265625,
0.044097900390625,
0.024444580078125,
-0.01837158203125,
0.0009436607360839844,
-0.0027904510498046875,
0.06097412109375,
-0.031494140625,
0.013702392578125,
-0.0279083251953125,
0.02569580078125,
0.0193634033203125,
-0.0400390625,
0.007358551025390625,
0.0487060546875,
0.0263519287109375,
-0.057952880859375,
0.0090484619140625,
-0.0260162353515625,
-0.017364501953125,
-0.0221710205078125,
0.0399169921875,
0.04364013671875,
0.0679931640625,
-0.02410888671875,
-0.057647705078125,
0.1112060546875,
0.0035762786865234375,
0.01837158203125,
-0.0218505859375,
-0.003650665283203125,
0.047698974609375,
-0.01300811767578125,
0.0104827880859375,
-0.0044708251953125,
-0.06524658203125,
-0.02606201171875,
0.04974365234375,
-0.059234619140625,
-0.0165252685546875,
-0.01593017578125,
0.0245513916015625,
0.0032215118408203125,
-0.0283050537109375,
0.021331787109375,
-0.047027587890625,
0.030609130859375,
0.01055145263671875,
0.0408935546875,
0.02618408203125,
-0.034423828125,
0.0298614501953125,
0.0178680419921875,
-0.00255584716796875,
-0.001373291015625,
0.0638427734375,
0.00179290771484375,
-0.0043487548828125,
-0.0175323486328125,
-0.01560211181640625,
-0.0108184814453125,
0.020111083984375,
-0.0103912353515625,
0.055267333984375,
-0.05499267578125,
-0.013397216796875,
-0.01151275634765625,
0.0260467529296875,
-0.016082763671875,
0.01113128662109375,
0.0199127197265625,
0.034393310546875,
0.0205535888671875,
0.0858154296875,
0.0217132568359375,
0.038116455078125,
0.0128326416015625,
0.0257415771484375,
0.06695556640625,
-0.022613525390625,
0.043212890625,
-0.0196075439453125,
0.0304107666015625,
0.05364990234375,
-0.051513671875,
0.04302978515625,
-0.01029205322265625,
0.0296783447265625,
0.001697540283203125,
-0.0172271728515625,
-0.01287078857421875,
0.00392913818359375,
-0.034393310546875,
0.040069580078125,
0.018157958984375,
0.082763671875,
0.0166473388671875,
-0.0323486328125,
0.0148773193359375,
0.04852294921875,
-0.034393310546875,
-0.10260009765625,
0.0130157470703125,
-0.042205810546875,
-0.005401611328125,
-0.03509521484375,
-0.025146484375,
0.0002510547637939453,
-0.026092529296875,
-0.00736236572265625,
0.0225982666015625,
-0.006977081298828125,
-0.04608154296875,
-0.00399017333984375,
-0.06597900390625,
0.028106689453125,
-0.00328826904296875,
0.024017333984375,
-0.00009745359420776367,
-0.00542449951171875,
0.0006999969482421875,
-0.0076446533203125,
0.0308380126953125,
0.01412200927734375,
-0.0078582763671875,
-0.006591796875,
-0.0144195556640625,
0.01055908203125,
-0.019775390625,
0.00417327880859375,
-0.013458251953125,
0.00411224365234375,
0.0019969940185546875,
-0.0154266357421875,
-0.00992584228515625,
0.00328826904296875,
0.0262908935546875,
0.0187225341796875,
-0.003948211669921875,
0.016937255859375,
0.05401611328125,
-0.0234375,
-0.03240966796875,
-0.0106048583984375,
-0.053558349609375,
0.018524169921875,
0.036163330078125,
-0.0020542144775390625,
-0.00896453857421875,
0.008209228515625,
0.036346435546875,
0.035888671875,
0.03424072265625,
-0.0032978057861328125,
0.006893157958984375,
-0.0015325546264648438,
0.009307861328125,
-0.035919189453125,
0.0340576171875,
0.01338958740234375,
-0.0258941650390625,
0.0088958740234375,
0.04498291015625,
0.0004105567932128906,
0.0184326171875,
-0.039520263671875,
-0.053741455078125,
0.07427978515625,
0.0212249755859375,
0.01129150390625,
-0.048675537109375,
-0.044891357421875,
-0.025482177734375,
0.0758056640625,
-0.07135009765625,
0.00000762939453125,
-0.0131378173828125,
0.00470733642578125,
0.01358795166015625,
-0.047271728515625,
-0.050994873046875,
-0.01010894775390625,
-0.033111572265625,
-0.00325775146484375,
-0.0126953125,
-0.01209259033203125,
-0.029815673828125,
-0.0017576217651367188,
-0.033477783203125,
-0.032196044921875,
0.0254058837890625,
0.06597900390625,
0.0175018310546875,
0.020477294921875,
-0.02008056640625,
0.050537109375,
-0.027374267578125,
0.013427734375,
-0.051910400390625,
-0.0244598388671875,
0.038818359375,
0.0216522216796875,
0.00260162353515625,
-0.034210205078125,
-0.031768798828125,
0.027618408203125,
-0.053131103515625,
0.0258331298828125,
-0.022003173828125,
0.050872802734375,
-0.037017822265625,
0.0279083251953125,
-0.00296783447265625,
-0.0161895751953125,
-0.0242767333984375,
0.01194000244140625,
0.0195159912109375,
0.039215087890625,
-0.03094482421875,
-0.0213470458984375,
-0.00701141357421875,
-0.00838470458984375,
-0.0487060546875,
-0.0297393798828125,
0.0009675025939941406,
0.03411865234375,
-0.030426025390625,
0.0325927734375,
-0.04278564453125,
-0.0537109375,
0.0298919677734375,
0.06207275390625,
-0.018951416015625,
-0.025238037109375,
0.0289154052734375,
0.020416259765625,
-0.050018310546875,
-0.030792236328125,
-0.00846099853515625,
0.04364013671875,
-0.0254669189453125,
0.07598876953125,
0.032867431640625,
-0.004024505615234375,
0.045928955078125,
0.0123138427734375,
0.027191162109375,
-0.0206146240234375,
0.05548095703125,
0.0111236572265625,
0.0255279541015625,
0.004116058349609375,
0.0143280029296875,
-0.0036716461181640625,
0.0037212371826171875,
-0.016754150390625,
0.01337432861328125,
-0.01384735107421875,
0.0304107666015625,
0.0012607574462890625,
0.00926971435546875,
-0.034576416015625,
-0.044158935546875,
0.01129913330078125,
0.011016845703125,
0.029327392578125,
0.0092010498046875,
0.01462554931640625,
0.02154541015625,
0.01451873779296875,
0.0182342529296875,
-0.0120697021484375,
-0.0164947509765625,
-0.02117919921875,
0.049285888671875,
-0.06231689453125,
-0.0090179443359375,
0.0015010833740234375,
-0.0002396106719970703,
0.004497528076171875,
0.016021728515625,
-0.02862548828125,
-0.02386474609375,
0.0298309326171875,
0.006885528564453125,
-0.00026154518127441406,
0.02850341796875,
0.04119873046875,
0.050140380859375,
0.0203704833984375,
-0.0168304443359375,
0.0189361572265625,
0.042724609375,
-0.0298919677734375,
-0.0239410400390625,
-0.029083251953125,
-0.01520538330078125,
0.025238037109375,
0.007965087890625,
-0.0709228515625,
0.044586181640625,
-0.00009018182754516602,
-0.040863037109375,
0.03485107421875,
0.0014848709106445312,
0.047119140625,
-0.02862548828125,
-0.0246429443359375,
-0.00113677978515625,
0.0440673828125,
-0.04144287109375,
-0.0121917724609375,
0.0721435546875,
0.058929443359375,
-0.00848388671875,
-0.0227508544921875,
-0.01491546630859375,
0.001995086669921875,
-0.01453399658203125,
0.0238494873046875,
0.007617950439453125,
-0.004306793212890625,
-0.044158935546875,
0.0157318115234375,
0.043060302734375,
0.0264434814453125,
-0.00890350341796875,
-0.02313232421875,
-0.0421142578125,
-0.0189056396484375,
0.0081634521484375,
-0.0243377685546875,
-0.006336212158203125,
-0.02520751953125,
0.01345062255859375,
-0.01119232177734375,
-0.0305023193359375,
-0.0204010009765625,
-0.02569580078125,
0.005702972412109375,
0.0042266845703125,
0.051849365234375,
-0.0204925537109375,
0.02777099609375,
-0.058563232421875,
0.02587890625,
-0.012420654296875,
-0.018280029296875,
0.06689453125,
0.038543701171875,
-0.048858642578125,
0.016357421875,
-0.034454345703125,
-0.00562286376953125,
0.044647216796875,
-0.005771636962890625,
-0.03350830078125,
-0.0296783447265625,
-0.0119476318359375,
0.0228424072265625,
0.0005712509155273438,
0.01300811767578125,
-0.0218353271484375,
0.00726318359375,
-0.0177459716796875,
0.045196533203125,
-0.0184478759765625,
0.0341796875,
-0.0026607513427734375,
0.0299072265625,
0.01393890380859375,
0.05926513671875,
0.0234375,
-0.039215087890625,
0.045562744140625,
-0.0286865234375,
-0.056976318359375,
-0.0152587890625,
0.0020084381103515625,
-0.0171966552734375,
-0.01080322265625,
-0.020263671875,
0.01045989990234375,
-0.003910064697265625,
0.0014190673828125,
-0.01605224609375,
-0.002719879150390625,
0.004619598388671875,
-0.01270294189453125,
0.027862548828125,
-0.0045318603515625,
0.0313720703125,
-0.0231781005859375,
-0.046722412109375,
0.029022216796875,
0.007076263427734375,
0.025482177734375,
0.013702392578125,
-0.01479339599609375,
0.0311431884765625,
0.054290771484375,
-0.040771484375,
0.0079345703125,
0.04986572265625,
-0.030059814453125,
0.00015652179718017578,
0.0044708251953125,
0.07281494140625,
0.044708251953125,
0.06622314453125,
-0.0204010009765625,
-0.00916290283203125,
0.007297515869140625,
-0.04022216796875,
0.032623291015625,
0.02685546875,
0.057861328125,
-0.0400390625,
0.00972747802734375,
0.01447296142578125,
-0.050750732421875,
0.017486572265625,
-0.005146026611328125,
0.026458740234375,
0.054534912109375,
0.0010223388671875,
0.043731689453125,
-0.0196380615234375,
0.0177001953125,
0.037689208984375,
-0.007171630859375,
0.0036754608154296875,
0.0252838134765625,
0.0106201171875,
-0.0265045166015625,
0.003963470458984375,
0.0033721923828125,
0.053497314453125,
-0.0231170654296875,
0.038543701171875,
-0.042205810546875,
-0.01430511474609375,
-0.0234222412109375,
-0.01306915283203125,
0.020660400390625,
-0.017822265625,
-0.032562255859375,
-0.033843994140625,
0.0157318115234375,
0.046783447265625,
-0.04656982421875,
0.0172882080078125,
0.0408935546875,
-0.052581787109375,
0.06256103515625,
-0.0176849365234375,
0.0187225341796875,
0.06011962890625,
-0.061065673828125,
0.005588531494140625,
0.0149688720703125,
0.016326904296875,
-0.00386810302734375,
0.002796173095703125,
0.036285400390625,
-0.04742431640625,
-0.00795745849609375,
0.03759765625,
0.0160369873046875,
-0.0089263916015625,
-0.01593017578125,
0.0260162353515625,
-0.054443359375,
-0.037139892578125,
0.0154876708984375,
-0.0201416015625,
-0.01143646240234375,
-0.021942138671875,
-0.07110595703125,
0.08685302734375,
0.018463134765625,
0.010528564453125,
-0.00542449951171875,
0.045013427734375,
-0.0447998046875,
-0.009002685546875,
-0.032745361328125,
0.053558349609375,
0.016754150390625,
0.0307159423828125,
-0.043365478515625,
-0.02239990234375,
0.0142822265625,
0.05682373046875,
-0.016815185546875,
0.00470733642578125,
-0.0254364013671875,
-0.0002865791320800781,
0.0438232421875,
0.015533447265625,
0.00591278076171875,
0.0291290283203125,
-0.0152587890625,
0.01131439208984375,
0.0200042724609375,
-0.05169677734375,
0.0200042724609375,
-0.046234130859375,
-0.00392913818359375,
0.01837158203125,
0.0224151611328125,
0.0101470947265625,
0.0426025390625,
-0.0029163360595703125,
-0.0228424072265625,
0.032012939453125,
0.026031494140625,
-0.0244903564453125,
-0.023895263671875,
0.04156494140625,
0.036407470703125,
-0.06512451171875,
-0.003948211669921875,
-0.03680419921875,
0.047454833984375,
0.01107025146484375,
0.058197021484375,
0.02423095703125,
0.0225372314453125,
0.1048583984375,
0.00923919677734375,
0.04168701171875,
0.036956787109375,
-0.016265869140625,
-0.02630615234375,
0.0184173583984375,
0.008148193359375,
-0.004528045654296875,
0.0220794677734375,
0.0474853515625,
0.00579833984375,
-0.01397705078125,
-0.01152801513671875,
0.0215911865234375,
0.015350341796875,
-0.005710601806640625,
-0.015899658203125,
-0.0034046173095703125,
0.006397247314453125,
0.0266876220703125,
-0.03607177734375,
-0.029327392578125,
0.029754638671875,
0.029541015625,
0.0009775161743164062,
-0.005184173583984375,
0.0014247894287109375,
-0.038787841796875,
-0.024444580078125,
0.011962890625,
0.00710296630859375,
0.054595947265625,
-0.009002685546875,
0.044586181640625,
-0.05377197265625,
-0.0272064208984375,
0.00955963134765625,
-0.0177154541015625,
-0.023712158203125,
0.0009012222290039062,
-0.00012409687042236328,
-0.01209259033203125,
-0.004741668701171875,
0.039093017578125,
-0.01763916015625,
0.0180511474609375,
0.00988006591796875,
0.01409912109375,
-0.0258636474609375,
0.00620269775390625,
0.061431884765625,
-0.023956298828125,
0.003910064697265625,
-0.02813720703125,
-0.00933074951171875,
0.00897979736328125,
-0.0228271484375,
-0.004764556884765625,
-0.00864410400390625,
0.050689697265625,
-0.01482391357421875,
0.05377197265625,
-0.0006999969482421875,
0.0171966552734375,
-0.006099700927734375,
-0.0321044921875,
0.00798797607421875,
-0.007572174072265625,
-0.054656982421875,
-0.026611328125,
-0.02606201171875,
-0.035552978515625,
0.048614501953125,
0.06298828125,
0.03851318359375,
-0.04901123046875,
0.0099029541015625,
-0.02655029296875,
-0.01291656494140625,
0.045074462890625,
-0.00009846687316894531,
0.005672454833984375,
0.0215606689453125,
-0.00945281982421875,
-0.0109405517578125,
-0.0228271484375,
-0.01849365234375,
0.06298828125,
0.036895751953125,
0.0567626953125,
-0.030364990234375,
0.05841064453125,
0.001445770263671875,
-0.0094451904296875,
-0.002124786376953125,
-0.0154266357421875,
0.05572509765625,
-0.0052337646484375,
-0.012969970703125,
-0.02392578125,
0.060455322265625,
0.004055023193359375,
0.04705810546875,
-0.03375244140625,
-0.009521484375,
-0.03302001953125,
0.0255279541015625,
-0.0117034912109375,
-0.0140228271484375,
-0.0352783203125,
-0.0148162841796875,
-0.028594970703125,
-0.0179290771484375,
0.0295257568359375,
0.01294708251953125,
0.0007658004760742188,
0.0122222900390625,
0.07269287109375,
-0.00994110107421875,
0.045166015625,
-0.004482269287109375,
0.08575439453125,
0.031524658203125,
0.0269775390625,
0.0316162109375,
0.0213775634765625,
-0.023345947265625,
0.035400390625,
0.02197265625,
-0.031585693359375,
0.0253143310546875,
-0.051605224609375,
0.06597900390625,
0.06512451171875,
0.0687255859375,
-0.0159912109375,
0.02447509765625,
0.0721435546875,
-0.01255035400390625,
-0.00217437744140625,
0.046783447265625,
-0.003692626953125,
0.0004203319549560547,
0.00588226318359375,
0.0008625984191894531,
0.029296875,
0.0081634521484375,
-0.0159759521484375,
-0.0289459228515625,
0.044189453125,
0.0065155029296875,
-0.0031299591064453125,
-0.025848388671875,
-0.0096435546875,
-0.00952911376953125,
0.0228424072265625,
0.0289764404296875,
-0.019744873046875,
-0.014495849609375,
-0.034332275390625,
-0.012908935546875,
-0.023284912109375,
0.033660888671875,
0.0022411346435546875,
0.0092620849609375,
0.03424072265625,
-0.024749755859375,
-0.0419921875,
0.0233612060546875,
0.0088958740234375,
0.064208984375,
0.007297515869140625,
-0.0302276611328125,
-0.0004341602325439453,
0.006565093994140625,
-0.0184478759765625,
-0.0293731689453125,
0.017333984375,
-0.0478515625,
0.0181427001953125,
0.00959014892578125,
-0.006591796875,
0.0182647705078125,
-0.033660888671875,
-0.09051513671875,
0.049072265625,
-0.0185394287109375,
-0.03753662109375,
-0.0296783447265625,
-0.0013761520385742188,
-0.00396728515625,
0.032470703125,
-0.00597381591796875,
0.0016422271728515625,
-0.0276641845703125,
0.00501251220703125,
-0.0168304443359375,
-0.00421142578125,
0.00348663330078125,
-0.004428863525390625,
-0.008331298828125,
0.0247955322265625,
0.0283050537109375,
-0.04669189453125,
-0.0148468017578125,
-0.00408935546875,
0.0250244140625,
0.0114898681640625,
-0.0309906005859375,
-0.003536224365234375,
0.020599365234375,
-0.0236358642578125,
0.021240234375,
-0.0682373046875,
-0.00749969482421875,
-0.030303955078125,
0.040679931640625,
-0.0267333984375,
0.0004718303680419922,
-0.00302886962890625,
-0.0109710693359375,
-0.00463104248046875,
-0.036102294921875,
-0.007122039794921875,
0.0111541748046875,
-0.042449951171875,
-0.01197052001953125,
-0.020416259765625,
-0.0178985595703125,
-0.0261383056640625,
-0.0188751220703125,
-0.035858154296875,
-0.0026092529296875,
-0.01215362548828125,
-0.01155853271484375,
0.00720977783203125,
-0.0462646484375,
0.00567626953125,
-0.016448974609375,
0.0022563934326171875,
-0.0028076171875,
0.04144287109375,
-0.01788330078125,
0.024139404296875,
-0.032623291015625,
0.0204010009765625,
-0.026031494140625,
0.0179595947265625,
0.00266265869140625,
0.0775146484375,
-0.0211334228515625,
0.00872039794921875,
-0.0058746337890625,
0.007843017578125,
-0.0012998580932617188,
-0.01389312744140625,
-0.00872039794921875,
-0.0006604194641113281,
-0.01059722900390625,
0.0187225341796875,
-0.01248931884765625,
0.06597900390625,
0.0233306884765625,
0.018218994140625,
-0.00424957275390625,
-0.0140228271484375,
0.021240234375,
-0.052154541015625,
0.0225067138671875,
0.0141143798828125,
0.00879669189453125,
-0.0234375,
0.05316162109375,
0.034393310546875,
-0.006336212158203125,
0.0251007080078125
]
|
a25377c6c374bc7006d07d094cde51740aeee939 | Wordpress Stackexchange
Q: How to delete all records from or empty a custom database table? I can't seem to find a simple reliable way to do this - perhaps?:
// delete row ##
global $wpdb;
$delete = $wpdb->query(
$wpdb->prepare(
"DELETE * FROM `wp_table_name`"
)
);
// return ##
$return = __('Table Emptied.');
if ( $wpdb->last_error ) {
$return = $wpdb->last_error;
}
But this gives me the classic:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM wp_table_name' at line 1
A: 2 years late, but maybe this will help someone in the future :)
The correct syntax for deleting rows from a MySQL table is:
DELETE FROM `wp_table_name`
WHERE 1 = 1;
| Q: How to delete all records from or empty a custom database table? I can't seem to find a simple reliable way to do this - perhaps?:
// delete row ##
global $wpdb;
$delete = $wpdb->query(
$wpdb->prepare(
"DELETE * FROM `wp_table_name`"
)
);
// return ##
$return = __('Table Emptied.');
if ( $wpdb->last_error ) {
$return = $wpdb->last_error;
}
But this gives me the classic:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM wp_table_name' at line 1
A: 2 years late, but maybe this will help someone in the future :)
The correct syntax for deleting rows from a MySQL table is:
DELETE FROM `wp_table_name`
WHERE 1 = 1;
A: I would just modify Q Studio example to:
global $wpdb;
$table = $wpdb->prefix . 'table_name';
$delete = $wpdb->query("TRUNCATE TABLE $table");
A: Thanks @s_ha_dum - Truncate does the job nicely:
// delete row ##
global $wpdb;
$delete = $wpdb->query("TRUNCATE TABLE `wp_table_name`");
A: This is late and the answer been accepted. But no one mentioned that your DELETE SQL statement is incorrect. Try this:
DELETE FROM `wp_table_name`
However, this might still not work. You might need to change your MariaDB/MySQL settings, which protects such deletes, to prevent you from mistakenly deleting a full set of data. To make it work, you have to
DELETE FROM `wp_table_name` WHERE `some_column` = 'some_value'
Cheers
| wordpress | {
"language": "en",
"length": 238,
"provenance": "stackexchange_00019.jsonl.gz:439831",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125380"
} | [
0.0243072509765625,
0.01313018798828125,
-0.0246429443359375,
-0.0080413818359375,
0.026580810546875,
-0.03302001953125,
0.0595703125,
-0.0163421630859375,
0.036468505859375,
0.0308380126953125,
-0.048919677734375,
-0.0239410400390625,
0.020599365234375,
-0.011260986328125,
-0.0240936279296875,
-0.042694091796875,
0.05999755859375,
-0.038665771484375,
0.04034423828125,
0.00299072265625,
0.01418304443359375,
0.03472900390625,
0.0576171875,
0.005157470703125,
-0.010955810546875,
-0.012664794921875,
0.0301971435546875,
-0.0183258056640625,
0.003704071044921875,
-0.0284576416015625,
0.0028629302978515625,
0.038330078125,
-0.0302276611328125,
0.061798095703125,
0.0059051513671875,
0.002681732177734375,
0.020355224609375,
0.03240966796875,
0.039886474609375,
0.0245513916015625,
0.03741455078125,
-0.01523590087890625,
-0.01172637939453125,
0.00946044921875,
-0.01837158203125,
-0.0310516357421875,
0.03369140625,
-0.01885986328125,
0.002399444580078125,
0.01319122314453125,
0.031890869140625,
0.02069091796875,
0.040771484375,
-0.0301055908203125,
-0.0033416748046875,
0.005062103271484375,
0.01531982421875,
-0.035247802734375,
0.034210205078125,
0.02642822265625,
-0.02838134765625,
-0.001102447509765625,
0.0206298828125,
-0.050537109375,
0.002338409423828125,
-0.004772186279296875,
0.0086669921875,
0.0255279541015625,
-0.006267547607421875,
-0.0162811279296875,
0.00785064697265625,
-0.00046539306640625,
-0.0188446044921875,
-0.026214599609375,
-0.004024505615234375,
-0.0032405853271484375,
0.03826904296875,
-0.007785797119140625,
-0.01070404052734375,
0.0268707275390625,
0.00745391845703125,
-0.019317626953125,
-0.06378173828125,
-0.0016622543334960938,
0.006137847900390625,
0.0085906982421875,
-0.00978851318359375,
-0.0013647079467773438,
0.009796142578125,
-0.060546875,
-0.0010805130004882812,
-0.02642822265625,
-0.03680419921875,
-0.01279449462890625,
-0.004634857177734375,
-0.0689697265625,
0.0289154052734375,
0.03021240234375,
-0.0171966552734375,
-0.01015472412109375,
-0.00287628173828125,
-0.025177001953125,
-0.02105712890625,
-0.0167236328125,
0.01206207275390625,
0.0160675048828125,
-0.027801513671875,
-0.055999755859375,
0.01113128662109375,
0.038970947265625,
0.0017786026000976562,
-0.030731201171875,
-0.033416748046875,
-0.0082855224609375,
-0.03924560546875,
0.0048828125,
-0.054412841796875,
-0.003177642822265625,
-0.01425933837890625,
-0.003955841064453125,
-0.01486968994140625,
0.0068817138671875,
-0.08642578125,
0.006725311279296875,
-0.021514892578125,
-0.055206298828125,
0.00223541259765625,
0.05096435546875,
-0.0138702392578125,
0.01134490966796875,
-0.0511474609375,
0.02886962890625,
0.0853271484375,
0.0273895263671875,
0.01459503173828125,
-0.017425537109375,
0.0491943359375,
0.01513671875,
0.031707763671875,
-0.00847625732421875,
0.0533447265625,
-0.02056884765625,
-0.0445556640625,
0.035980224609375,
0.0294647216796875,
0.051239013671875,
0.0284881591796875,
-0.03009033203125,
-0.0176849365234375,
-0.019775390625,
-0.033111572265625,
0.009429931640625,
0.01177215576171875,
0.015228271484375,
0.046112060546875,
-0.0250244140625,
0.060546875,
-0.051605224609375,
-0.006412506103515625,
-0.037506103515625,
0.01123046875,
-0.0290069580078125,
-0.0028057098388671875,
-0.019012451171875,
-0.05670166015625,
0.039825439453125,
-0.0513916015625,
-0.020538330078125,
0.02618408203125,
-0.027679443359375,
-0.0042572021484375,
-0.03106689453125,
0.042236328125,
0.0084991455078125,
-0.00047469139099121094,
0.0654296875,
-0.028350830078125,
-0.061767578125,
0.036651611328125,
0.0275726318359375,
-0.029510498046875,
-0.02215576171875,
-0.0186309814453125,
0.0173492431640625,
-0.0423583984375,
0.0060577392578125,
0.014923095703125,
0.0811767578125,
0.01806640625,
0.030731201171875,
0.0102386474609375,
-0.027130126953125,
-0.016082763671875,
0.0255126953125,
0.01800537109375,
-0.04803466796875,
-0.06024169921875,
-0.049285888671875,
-0.01418304443359375,
0.01629638671875,
-0.00794219970703125,
0.02203369140625,
-0.00618743896484375,
-0.0186614990234375,
-0.06646728515625,
0.0296478271484375,
-0.0174102783203125,
0.051300048828125,
-0.0293121337890625,
0.004726409912109375,
0.036773681640625,
-0.0063323974609375,
-0.037322998046875,
-0.0143585205078125,
-0.038818359375,
-0.0300750732421875,
0.01358795166015625,
0.05035400390625,
-0.004314422607421875,
0.0552978515625,
-0.018341064453125,
-0.0562744140625,
-0.0202789306640625,
0.0170440673828125,
0.027801513671875,
-0.038299560546875,
0.0009746551513671875,
-0.030609130859375,
0.043487548828125,
-0.0292510986328125,
0.015838623046875,
0.031341552734375,
0.037933349609375,
0.0129241943359375,
-0.0357666015625,
-0.00440216064453125,
0.00647735595703125,
-0.07672119140625,
-0.0030498504638671875,
0.05389404296875,
0.0170440673828125,
-0.00832366943359375,
-0.022064208984375,
0.0196380615234375,
0.0166015625,
-0.038421630859375,
-0.00699615478515625,
0.0162353515625,
0.01190948486328125,
0.03826904296875,
-0.0172576904296875,
-0.017303466796875,
0.016937255859375,
-0.037109375,
-0.002643585205078125,
0.043853759765625,
-0.008880615234375,
0.01172637939453125,
-0.0014371871948242188,
0.0005106925964355469,
-0.008392333984375,
-0.0202178955078125,
-0.007740020751953125,
-0.0163421630859375,
0.03460693359375,
-0.00600433349609375,
0.032928466796875,
0.0238189697265625,
-0.01338958740234375,
0.0031681060791015625,
0.02508544921875,
-0.038055419921875,
0.0019683837890625,
0.0126800537109375,
-0.036529541015625,
0.033111572265625,
-0.05438232421875,
0.025909423828125,
0.0230712890625,
0.0009708404541015625,
-0.012939453125,
0.018768310546875,
0.005329132080078125,
-0.007904052734375,
0.00722503662109375,
-0.03350830078125,
0.016510009765625,
0.0035648345947265625,
-0.01067352294921875,
-0.01235198974609375,
0.0036773681640625,
0.05718994140625,
-0.0104217529296875,
0.030853271484375,
-0.00820159912109375,
-0.0022296905517578125,
0.07122802734375,
-0.039642333984375,
0.0309295654296875,
-0.0149993896484375,
0.011016845703125,
0.067138671875,
0.003345489501953125,
-0.016448974609375,
-0.0036258697509765625,
-0.016510009765625,
0.028076171875,
-0.000018596649169921875,
-0.004741668701171875,
0.00054931640625,
-0.04620361328125,
0.01470184326171875,
0.03985595703125,
0.0986328125,
0.0021343231201171875,
-0.036651611328125,
0.023345947265625,
0.069091796875,
-0.034942626953125,
-0.06927490234375,
0.018524169921875,
0.01337432861328125,
0.005420684814453125,
-0.0233154296875,
0.015106201171875,
-0.00460052490234375,
-0.0207061767578125,
-0.00079345703125,
0.0318603515625,
-0.00982666015625,
0.0143890380859375,
-0.004535675048828125,
-0.04779052734375,
-0.054656982421875,
0.0163726806640625,
0.00499725341796875,
-0.002475738525390625,
0.07061767578125,
0.001735687255859375,
-0.051605224609375,
-0.0156402587890625,
-0.0229034423828125,
-0.0230865478515625,
-0.00732421875,
0.0229034423828125,
-0.0251312255859375,
0.0021686553955078125,
0.0003380775451660156,
-0.0017919540405273438,
0.034759521484375,
-0.03680419921875,
-0.00995635986328125,
0.006084442138671875,
0.0088958740234375,
0.0325927734375,
-0.01453399658203125,
-0.0228118896484375,
0.003047943115234375,
-0.005634307861328125,
-0.04449462890625,
0.0059967041015625,
-0.01873779296875,
-0.01050567626953125,
0.01035308837890625,
-0.0193328857421875,
0.0031528472900390625,
0.016510009765625,
0.0268707275390625,
0.05902099609375,
0.038482666015625,
-0.006008148193359375,
0.0433349609375,
-0.036590576171875,
0.01439666748046875,
0.0528564453125,
-0.0207672119140625,
0.0684814453125,
-0.019439697265625,
-0.0004322528839111328,
0.030364990234375,
-0.01334381103515625,
0.0023555755615234375,
-0.053192138671875,
-0.048065185546875,
-0.03399658203125,
0.046112060546875,
0.0217742919921875,
0.04486083984375,
-0.0261077880859375,
-0.04339599609375,
0.005035400390625,
0.102783203125,
0.01535797119140625,
-0.032257080078125,
-0.0175323486328125,
-0.0108184814453125,
0.0208740234375,
0.007556915283203125,
-0.001415252685546875,
-0.0262603759765625,
-0.07305908203125,
0.0131683349609375,
-0.00811004638671875,
-0.01523590087890625,
-0.0253753662109375,
0.00508880615234375,
-0.057769775390625,
-0.03973388671875,
0.0298309326171875,
-0.07000732421875,
0.0086517333984375,
-0.00518035888671875,
-0.01036834716796875,
-0.019256591796875,
0.0036907196044921875,
-0.062408447265625,
-0.033416748046875,
0.0031223297119140625,
-0.0460205078125,
0.022613525390625,
0.02557373046875,
0.0224609375,
-0.02447509765625,
0.01397705078125,
0.0014371871948242188,
0.01076507568359375,
-0.01345062255859375,
0.005008697509765625,
-0.062347412109375,
-0.00032806396484375,
0.00049591064453125,
-0.03961181640625,
-0.0271759033203125,
-0.055145263671875,
0.0253448486328125,
-0.0031147003173828125,
-0.0299072265625,
0.016510009765625,
-0.04498291015625,
0.0145111083984375,
0.0021915435791015625,
-0.013702392578125,
-0.06829833984375,
0.01080322265625,
-0.04931640625,
-0.0182037353515625,
-0.0252227783203125,
-0.03143310546875,
0.042205810546875,
0.006122589111328125,
-0.0151519775390625,
0.016937255859375,
0.06585693359375,
0.01264190673828125,
-0.039459228515625,
-0.0867919921875,
-0.0158843994140625,
0.050445556640625,
-0.03955078125,
0.06365966796875,
0.047943115234375,
-0.0244140625,
0.058258056640625,
0.0227813720703125,
-0.002376556396484375,
-0.0384521484375,
0.057525634765625,
-0.02642822265625,
-0.02508544921875,
0.012054443359375,
-0.046844482421875,
0.034088134765625,
0.045745849609375,
-0.004070281982421875,
-0.0024089813232421875,
0.026275634765625,
0.0264739990234375,
-0.0138092041015625,
-0.0313720703125,
-0.037139892578125,
-0.025146484375,
0.011199951171875,
-0.0272369384765625,
0.0316162109375,
-0.00647735595703125,
0.0081024169921875,
0.007137298583984375,
0.0089263916015625,
0.00719451904296875,
-0.0262298583984375,
0.04266357421875,
-0.029327392578125,
0.039398193359375,
-0.007640838623046875,
-0.0009169578552246094,
-0.0477294921875,
-0.016876220703125,
0.07806396484375,
0.0017156600952148438,
-0.056488037109375,
0.01690673828125,
-0.0203857421875,
-0.01081085205078125,
0.0189208984375,
-0.00438690185546875,
0.0281982421875,
0.052032470703125,
-0.01837158203125,
-0.003681182861328125,
-0.0221405029296875,
0.0406494140625,
-0.038604736328125,
0.0085601806640625,
0.0294342041015625,
-0.0260467529296875,
-0.006092071533203125,
0.045257568359375,
0.0035247802734375,
0.01255035400390625,
-0.0102691650390625,
0.04718017578125,
0.004322052001953125,
0.078125,
0.007144927978515625,
-0.028717041015625,
0.00347137451171875,
0.0290679931640625,
-0.047271728515625,
-0.047332763671875,
-0.042266845703125,
0.036468505859375,
0.061370849609375,
-0.01091766357421875,
-0.0133819580078125,
0.0165557861328125,
-0.0043487548828125,
-0.01324462890625,
0.01708984375,
0.00669097900390625,
-0.052520751953125,
-0.0191497802734375,
0.0109405517578125,
0.0195465087890625,
-0.0024738311767578125,
0.005542755126953125,
0.0042724609375,
-0.02532958984375,
0.02911376953125,
-0.0198822021484375,
0.045135498046875,
-0.04266357421875,
-0.048828125,
-0.0187530517578125,
-0.0504150390625,
-0.022003173828125,
0.002964019775390625,
0.01409149169921875,
-0.0237884521484375,
-0.03790283203125,
0.030120849609375,
-0.0014657974243164062,
0.0180206298828125,
-0.02069091796875,
-0.006771087646484375,
-0.01345062255859375,
-0.0024814605712890625,
0.076171875,
0.043701171875,
0.0036449432373046875,
-0.03448486328125,
-0.01568603515625,
-0.0171661376953125,
-0.020599365234375,
-0.0518798828125,
-0.01496124267578125,
-0.0091552734375,
0.007358551025390625,
-0.004894256591796875,
0.0190887451171875,
-0.0211029052734375,
-0.01392364501953125,
0.0139007568359375,
0.018035888671875,
-0.050872802734375,
-0.011260986328125,
0.0535888671875,
0.003719329833984375,
0.0199737548828125,
0.021331787109375,
0.05517578125,
0.0146331787109375,
-0.035980224609375,
0.05035400390625,
0.00070953369140625,
-0.045989990234375,
-0.04443359375,
-0.0335693359375,
-0.062744140625,
0.00872802734375,
-0.0287933349609375,
0.01218414306640625,
-0.026885986328125,
-0.00821685791015625,
-0.0235595703125,
0.07122802734375,
-0.03546142578125,
0.03497314453125,
-0.01236724853515625,
0.0036296844482421875,
0.031524658203125,
-0.004367828369140625,
0.023712158203125,
-0.01380157470703125,
-0.015533447265625,
0.006622314453125,
-0.0165557861328125,
-0.0020732879638671875,
0.04364013671875,
0.0399169921875,
-0.031707763671875,
0.0236358642578125,
0.01111602783203125,
-0.005840301513671875,
0.03033447265625,
-0.0095977783203125,
-0.0247344970703125,
-0.0031642913818359375,
0.03314208984375,
-0.00603485107421875,
-0.0201263427734375,
0.018096923828125,
-0.0167694091796875,
0.01448822021484375,
0.07012939453125,
0.0865478515625,
-0.0914306640625,
0.02703857421875,
0.03314208984375,
-0.0176544189453125,
0.000022470951080322266,
-0.0294952392578125,
-0.00159454345703125,
0.0178070068359375,
-0.01067352294921875,
0.01226806640625,
-0.05224609375,
-0.0240020751953125,
0.0273590087890625,
0.01490020751953125,
-0.01410675048828125,
0.014862060546875,
-0.005741119384765625,
-0.025909423828125,
0.0027904510498046875,
0.0294952392578125,
-0.0036754608154296875,
0.0145416259765625,
0.0183563232421875,
0.0237274169921875,
0.00655364990234375,
-0.01541900634765625,
0.05078125,
-0.03643798828125,
-0.0214691162109375,
0.042144775390625,
-0.03106689453125,
-0.016204833984375,
0.037261962890625,
-0.03778076171875,
0.0458984375,
-0.0015459060668945312,
-0.021514892578125,
-0.08941650390625,
-0.016387939453125,
0.006351470947265625,
0.02386474609375,
-0.03912353515625,
0.035797119140625,
-0.06292724609375,
0.0018253326416015625,
-0.00777435302734375,
-0.03082275390625,
0.0804443359375,
-0.06256103515625,
0.001491546630859375,
0.0196533203125,
0.033233642578125,
-0.0046234130859375,
-0.019073486328125,
-0.020233154296875,
-0.06768798828125,
-0.00447845458984375,
-0.0279541015625,
0.0034389495849609375,
0.0238800048828125,
-0.0026950836181640625,
-0.0621337890625,
0.0958251953125,
0.002071380615234375,
0.0033016204833984375,
0.01103973388671875,
0.038299560546875,
-0.03192138671875,
0.0232696533203125,
-0.043853759765625,
0.058349609375,
0.02264404296875,
0.02142333984375,
-0.02410888671875,
0.0024566650390625,
0.00616455078125,
-0.00617218017578125,
0.051361083984375,
0.0024261474609375,
0.008056640625,
-0.0066986083984375,
0.03533935546875,
0.04296875,
-0.00934600830078125,
0.004802703857421875,
-0.017425537109375,
0.00507354736328125,
0.0433349609375,
-0.037506103515625,
0.0169677734375,
0.0029850006103515625,
-0.012664794921875,
-0.0084228515625,
0.01441192626953125,
0.0419921875,
-0.00397491455078125,
-0.00659942626953125,
0.027740478515625,
-0.0239715576171875,
-0.01427459716796875,
-0.04205322265625,
0.00878143310546875,
0.032012939453125,
0.050201416015625,
-0.05670166015625,
-0.01157379150390625,
-0.01568603515625,
0.0478515625,
0.01343536376953125,
0.01268768310546875,
0.04302978515625,
0.0069122314453125,
0.023712158203125,
-0.0037555694580078125,
-0.0032711029052734375,
-0.007762908935546875,
0.00679779052734375,
0.0850830078125,
0.04888916015625,
0.020416259765625,
-0.03387451171875,
0.0126800537109375,
0.0243072509765625,
0.0882568359375,
-0.07122802734375,
-0.0364990234375,
0.008270263671875,
0.0020046234130859375,
0.0125274658203125,
0.0022411346435546875,
0.01393890380859375,
-0.0092010498046875,
0.021087646484375,
-0.022918701171875,
0.01165771484375,
0.0131683349609375,
-0.0022792816162109375,
0.0018863677978515625,
0.0186004638671875,
-0.01110076904296875,
0.0052337646484375,
-0.00888824462890625,
-0.019378662109375,
0.017852783203125,
0.0007262229919433594,
0.009246826171875,
0.0110015869140625,
0.04290771484375,
0.0104522705078125,
-0.007404327392578125,
0.032562255859375,
-0.0038471221923828125,
-0.0035037994384765625,
-0.0670166015625,
-0.06719970703125,
0.0391845703125,
0.044464111328125,
0.0181884765625,
0.01462554931640625,
0.050567626953125,
0.01519775390625,
-0.04376220703125,
-0.01222991943359375,
-0.0285186767578125,
-0.043487548828125,
-0.04156494140625,
-0.03070068359375,
-0.01024627685546875,
0.005764007568359375,
0.0096893310546875,
0.0226287841796875,
0.057464599609375,
-0.020111083984375,
-0.0025196075439453125,
0.0200653076171875,
-0.002880096435546875,
-0.010162353515625,
0.040618896484375,
-0.017730712890625,
0.0124359130859375,
0.008514404296875,
-0.03387451171875,
-0.0140228271484375,
-0.03204345703125,
0.045196533203125,
-0.00255584716796875,
0.02325439453125,
-0.0010423660278320312,
0.043060302734375,
-0.0015773773193359375,
-0.015472412109375,
-0.003551483154296875,
0.022247314453125,
-0.0193023681640625,
-0.004547119140625,
0.04241943359375,
-0.0045928955078125,
0.004817962646484375,
0.0006079673767089844,
0.0134735107421875,
-0.0017995834350585938,
0.009521484375,
0.024566650390625,
-0.0150299072265625,
0.01006317138671875,
0.01558685302734375,
0.04022216796875,
-0.01470184326171875,
0.005443572998046875,
0.01611328125,
0.01531982421875,
0.0282440185546875,
-0.0286865234375,
-0.047760009765625,
0.02410888671875,
0.028289794921875,
-0.0160675048828125,
0.037811279296875,
-0.0183868408203125,
0.013031005859375,
-0.01708984375,
0.004947662353515625,
-0.0087738037109375,
-0.00970458984375,
0.0254974365234375,
0.0134429931640625,
0.02862548828125,
0.043365478515625,
0.021331787109375,
0.0537109375,
-0.007198333740234375,
-0.017333984375,
0.0267181396484375,
-0.07843017578125,
0.046234130859375,
0.032623291015625,
-0.0223236083984375,
-0.0181427001953125,
0.015899658203125,
-0.014739990234375,
-0.0036373138427734375,
0.00994873046875,
0.007198333740234375,
0.016571044921875,
-0.036651611328125,
-0.02911376953125,
0.004283905029296875,
0.03515625,
0.01165008544921875,
0.0172882080078125,
-0.0390625,
-0.00765228271484375,
-0.00946044921875,
-0.00460052490234375,
-0.01515960693359375,
0.0017108917236328125,
-0.044189453125,
-0.005016326904296875,
-0.0184783935546875,
-0.06524658203125,
-0.0552978515625,
0.0246734619140625,
0.017791748046875,
0.0018472671508789062,
-0.062042236328125,
0.051055908203125,
-0.032562255859375,
0.009033203125,
-0.0202789306640625,
0.005405426025390625,
-0.01529693603515625,
0.037322998046875,
0.01434326171875,
-0.06463623046875,
-0.017303466796875,
0.07586669921875,
-0.018280029296875,
0.0116119384765625,
0.01450347900390625,
-0.033782958984375,
-0.007381439208984375,
-0.001758575439453125,
0.03839111328125,
0.035919189453125,
0.040435791015625,
-0.0297088623046875,
0.027587890625,
-0.01363372802734375,
-0.003162384033203125,
-0.07110595703125,
-0.006999969482421875,
-0.0728759765625,
0.0296478271484375,
-0.042755126953125,
0.0255889892578125,
0.04052734375,
-0.042266845703125,
-0.10369873046875,
0.051300048828125,
-0.033355712890625,
-0.03387451171875,
-0.0059661865234375,
0.01096343994140625,
-0.00257110595703125,
-0.0036640167236328125,
0.007289886474609375,
-0.0247955322265625,
-0.01129913330078125,
0.0119476318359375,
0.00759124755859375,
0.042572021484375,
-0.01486968994140625,
0.017822265625,
-0.0482177734375,
0.01387786865234375,
-0.00395965576171875,
0.0159759521484375,
0.005313873291015625,
-0.0191802978515625,
0.03228759765625,
0.047576904296875,
-0.009979248046875,
-0.01427459716796875,
0.01163482666015625,
-0.04852294921875,
-0.01702880859375,
-0.002475738525390625,
-0.01165008544921875,
0.00506591796875,
0.0565185546875,
0.05474853515625,
0.0249786376953125,
-0.040252685546875,
-0.04833984375,
-0.0185089111328125,
0.030914306640625,
-0.01904296875,
0.002544403076171875,
-0.05194091796875,
-0.007427215576171875,
-0.0180206298828125,
-0.033355712890625,
-0.0003936290740966797,
-0.0002932548522949219,
-0.05511474609375,
0.01349639892578125,
-0.0159912109375,
-0.0165557861328125,
-0.023284912109375,
0.0186920166015625,
0.0278167724609375,
-0.031341552734375,
-0.0118408203125,
-0.031951904296875,
-0.00077056884765625,
0.0024242401123046875,
-0.051422119140625,
-0.034393310546875,
-0.007442474365234375,
-0.0090484619140625,
0.0154876708984375,
-0.01424407958984375,
-0.0008997917175292969,
-0.01560211181640625,
0.00966644287109375,
-0.0108642578125,
0.040252685546875,
-0.01265716552734375,
0.06207275390625,
0.0206146240234375,
0.033233642578125,
0.01477813720703125,
0.0269317626953125,
0.0055999755859375,
0.0263214111328125,
-0.0206756591796875,
0.0653076171875,
0.018585205078125,
-0.046051025390625,
0.03839111328125,
-0.04058837890625,
-0.01434326171875,
0.009857177734375,
-0.00745391845703125,
-0.0875244140625,
0.049102783203125,
0.06378173828125,
0.044677734375,
0.0328369140625
]
|
9c3a0f3951ca8aa1fb86766fabf54d25fbbe13a7 | Wordpress Stackexchange
Q: A way to sort WordPress themes? I want to write a plugin which can sort themes into categories.
For example
I have Categories
3 themes in Business as subfolder from /themes/business
7 themes in Nature /themes/nature
2 themein in private /themes/private
by default WordPress shows me all 12 themes in the backend.
I tried to change the theme root
add_filter("theme_root","tr");
function tr($J){
print_r($J);//if yo udo this you see the main theme folder
$J="/www/wp-content/new-themes"; //folder new-themes exists
return $J;
}
but in general this does not work.
Any ideas are highly appreciated.
| Q: A way to sort WordPress themes? I want to write a plugin which can sort themes into categories.
For example
I have Categories
3 themes in Business as subfolder from /themes/business
7 themes in Nature /themes/nature
2 themein in private /themes/private
by default WordPress shows me all 12 themes in the backend.
I tried to change the theme root
add_filter("theme_root","tr");
function tr($J){
print_r($J);//if yo udo this you see the main theme folder
$J="/www/wp-content/new-themes"; //folder new-themes exists
return $J;
}
but in general this does not work.
Any ideas are highly appreciated.
| wordpress | {
"language": "en",
"length": 92,
"provenance": "stackexchange_00019.jsonl.gz:439862",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125472"
} | [
0.0240631103515625,
-0.00011754035949707031,
0.0132293701171875,
-0.024200439453125,
0.0140533447265625,
-0.0166168212890625,
0.00751495361328125,
-0.0227508544921875,
-0.0013751983642578125,
0.01169586181640625,
-0.00128936767578125,
-0.0252685546875,
-0.04296875,
-0.0352783203125,
-0.03216552734375,
-0.04937744140625,
0.0095977783203125,
-0.004650115966796875,
0.02099609375,
-0.01418304443359375,
0.01103973388671875,
-0.0034275054931640625,
-0.00029468536376953125,
0.0277099609375,
0.0225067138671875,
0.0244903564453125,
0.064453125,
-0.05169677734375,
0.03094482421875,
-0.02008056640625,
0.020111083984375,
-0.027801513671875,
0.00653839111328125,
-0.0026340484619140625,
0.045684814453125,
0.0102081298828125,
0.04937744140625,
-0.01251220703125,
0.0340576171875,
0.006267547607421875,
0.023651123046875,
-0.004253387451171875,
0.01239013671875,
0.039337158203125,
0.004131317138671875,
-0.06402587890625,
0.039825439453125,
-0.06048583984375,
0.013427734375,
-0.0633544921875,
0.0265960693359375,
-0.00044846534729003906,
0.06036376953125,
-0.06646728515625,
-0.0167083740234375,
0.01056671142578125,
0.0180816650390625,
-0.0105438232421875,
0.045013427734375,
-0.00968170166015625,
-0.047882080078125,
-0.0153045654296875,
0.0124359130859375,
-0.04168701171875,
-0.00850677490234375,
-0.0013866424560546875,
-0.00003731250762939453,
0.00921630859375,
-0.05255126953125,
-0.0230255126953125,
0.03326416015625,
-0.0248870849609375,
0.0164642333984375,
-0.0321044921875,
0.00714111328125,
0.006500244140625,
0.0041656494140625,
-0.0216217041015625,
0.0171356201171875,
-0.0010042190551757812,
-0.035797119140625,
-0.0059051513671875,
-0.032379150390625,
-0.0557861328125,
0.01788330078125,
-0.009796142578125,
-0.0165863037109375,
-0.0027313232421875,
-0.04962158203125,
0.00359344482421875,
-0.033477783203125,
-0.006378173828125,
-0.04327392578125,
0.0139617919921875,
0.01099395751953125,
0.020965576171875,
0.021636962890625,
0.027313232421875,
0.004730224609375,
0.0122833251953125,
0.01428985595703125,
-0.0391845703125,
0.0162200927734375,
-0.029998779296875,
-0.000048220157623291016,
0.0042572021484375,
0.004901885986328125,
-0.0005745887756347656,
0.03143310546875,
0.052032470703125,
-0.00476837158203125,
0.04522705078125,
0.01806640625,
-0.0271759033203125,
-0.0002453327178955078,
0.006084442138671875,
-0.0154571533203125,
0.028289794921875,
0.007663726806640625,
-0.00720977783203125,
0.011871337890625,
0.040771484375,
-0.0161895751953125,
-0.04071044921875,
-0.00922393798828125,
-0.0279693603515625,
-0.0355224609375,
-0.015655517578125,
-0.00782012939453125,
-0.028167724609375,
-0.0150299072265625,
0.046630859375,
0.00998687744140625,
-0.0168609619140625,
-0.03125,
0.01255035400390625,
0.0169219970703125,
-0.0208587646484375,
-0.02166748046875,
-0.0057830810546875,
0.0218048095703125,
-0.01052093505859375,
-0.0010633468627929688,
-0.0157470703125,
0.0157470703125,
0.005458831787109375,
-0.0034046173095703125,
0.0218048095703125,
0.01654052734375,
-0.002582550048828125,
0.00260162353515625,
-0.03436279296875,
0.0291595458984375,
-0.01189422607421875,
-0.0016717910766601562,
-0.022796630859375,
0.0018978118896484375,
-0.0184173583984375,
-0.009490966796875,
-0.0307464599609375,
0.012847900390625,
0.0079193115234375,
0.0120391845703125,
-0.0489501953125,
-0.048919677734375,
-0.01357269287109375,
-0.01406097412109375,
0.007781982421875,
0.0206451416015625,
-0.02197265625,
0.0389404296875,
-0.025482177734375,
0.05218505859375,
0.015869140625,
0.00799560546875,
0.037261962890625,
0.0019159317016601562,
-0.032440185546875,
0.026458740234375,
0.043121337890625,
-0.0008573532104492188,
-0.011077880859375,
0.01029205322265625,
0.01320648193359375,
-0.0445556640625,
0.0202789306640625,
0.0264892578125,
0.06292724609375,
-0.00841522216796875,
0.019378662109375,
0.03973388671875,
0.0145416259765625,
-0.0208282470703125,
0.023956298828125,
-0.00853729248046875,
-0.03668212890625,
-0.01230621337890625,
0.01041412353515625,
-0.006931304931640625,
-0.00426483154296875,
-0.04302978515625,
-0.01097869873046875,
0.03167724609375,
0.0125885009765625,
0.005420684814453125,
0.010589599609375,
-0.01477813720703125,
0.03369140625,
0.00516510009765625,
0.007129669189453125,
0.006359100341796875,
-0.003570556640625,
-0.006816864013671875,
-0.05706787109375,
-0.043701171875,
0.028076171875,
-0.0119171142578125,
-0.034088134765625,
-0.0127105712890625,
0.00356292724609375,
-0.027862548828125,
0.045928955078125,
-0.045379638671875,
0.0167236328125,
0.036041259765625,
0.0171051025390625,
-0.0221710205078125,
-0.0030727386474609375,
0.0049896240234375,
0.033721923828125,
-0.07598876953125,
-0.0013427734375,
0.05352783203125,
0.061767578125,
-0.035858154296875,
0.0015172958374023438,
0.007236480712890625,
-0.0029811859130859375,
-0.0020580291748046875,
0.022613525390625,
0.051788330078125,
0.057647705078125,
-0.0164337158203125,
-0.039276123046875,
0.06866455078125,
-0.0487060546875,
0.00504302978515625,
-0.030487060546875,
0.038421630859375,
0.07281494140625,
-0.0174560546875,
0.0108795166015625,
0.0202178955078125,
0.0009665489196777344,
0.01378631591796875,
0.040557861328125,
0.01898193359375,
0.0035991668701171875,
-0.0007901191711425781,
-0.013824462890625,
0.019287109375,
-0.022552490234375,
-0.056488037109375,
0.011199951171875,
0.0509033203125,
-0.00571441650390625,
0.012786865234375,
-0.0094146728515625,
-0.042449951171875,
0.00994110107421875,
0.0206146240234375,
-0.032379150390625,
0.004817962646484375,
0.0159454345703125,
0.0002543926239013672,
0.00791168212890625,
-0.036407470703125,
0.0030803680419921875,
0.022308349609375,
0.006206512451171875,
-0.035430908203125,
0.0098724365234375,
-0.05364990234375,
-0.02398681640625,
-0.0313720703125,
-0.077392578125,
-0.00357818603515625,
-0.004680633544921875,
-0.0017032623291015625,
0.0023097991943359375,
0.0019483566284179688,
0.03277587890625,
-0.036285400390625,
0.04925537109375,
-0.00643157958984375,
-0.0109405517578125,
0.01467132568359375,
-0.0229644775390625,
0.0262908935546875,
-0.034393310546875,
0.0015611648559570312,
0.04248046875,
0.00615692138671875,
-0.007762908935546875,
0.0260009765625,
-0.006256103515625,
0.044219970703125,
0.0157623291015625,
-0.0033359527587890625,
0.033111572265625,
-0.0811767578125,
0.006866455078125,
0.0138702392578125,
-0.02301025390625,
0.0160675048828125,
-0.04150390625,
0.0203857421875,
-0.0021514892578125,
-0.07684326171875,
-0.066162109375,
-0.00811004638671875,
-0.02130126953125,
-0.027008056640625,
-0.0010843276977539062,
-0.0261688232421875,
0.0120697021484375,
-0.00865936279296875,
0.00024330615997314453,
0.0160064697265625,
-0.052520751953125,
-0.058441162109375,
-0.04766845703125,
-0.054046630859375,
0.0225830078125,
0.0081634521484375,
-0.003253936767578125,
0.005889892578125,
0.09027099609375,
0.0146942138671875,
-0.0963134765625,
-0.030029296875,
0.05657958984375,
-0.0152587890625,
0.027069091796875,
0.050689697265625,
-0.04541015625,
-0.0142364501953125,
0.01184844970703125,
0.0439453125,
0.0391845703125,
-0.061737060546875,
-0.0005974769592285156,
-0.0616455078125,
-0.038116455078125,
-0.041778564453125,
-0.0089263916015625,
0.0723876953125,
-0.03955078125,
-0.0239715576171875,
-0.05828857421875,
-0.0010499954223632812,
0.02471923828125,
0.0022449493408203125,
0.006923675537109375,
-0.0283966064453125,
-0.02667236328125,
0.01262664794921875,
0.0205535888671875,
-0.00797271728515625,
-0.006458282470703125,
-0.0134735107421875,
-0.03802490234375,
0.032257080078125,
0.01557159423828125,
0.01490020751953125,
0.0090179443359375,
-0.0083770751953125,
-0.040313720703125,
-0.0079193115234375,
-0.02752685546875,
-0.0010776519775390625,
-0.0225830078125,
0.0293731689453125,
-0.0215606689453125,
-0.035888671875,
0.03192138671875,
-0.0236968994140625,
-0.0025787353515625,
-0.0185394287109375,
-0.0112762451171875,
0.0089263916015625,
0.07672119140625,
-0.1246337890625,
0.001346588134765625,
-0.003147125244140625,
0.01459503173828125,
-0.021881103515625,
-0.02740478515625,
-0.07098388671875,
-0.017547607421875,
-0.08331298828125,
-0.00882720947265625,
-0.0114593505859375,
-0.046661376953125,
0.006031036376953125,
-0.035308837890625,
-0.04840087890625,
-0.04986572265625,
0.034454345703125,
-0.0015516281127929688,
0.0254974365234375,
-0.037811279296875,
0.0169677734375,
-0.051025390625,
-0.00943756103515625,
0.003131866455078125,
-0.060150146484375,
-0.0085906982421875,
0.005565643310546875,
0.027252197265625,
-0.0036411285400390625,
0.021087646484375,
-0.0204925537109375,
0.033905029296875,
-0.0020923614501953125,
0.0491943359375,
-0.020294189453125,
-0.003170013427734375,
0.00991058349609375,
-0.013275146484375,
-0.0031604766845703125,
-0.00720977783203125,
0.00931549072265625,
-0.045196533203125,
-0.059600830078125,
-0.023468017578125,
-0.03558349609375,
0.047210693359375,
-0.01496124267578125,
-0.0262603759765625,
0.002521514892578125,
-0.00908660888671875,
-0.03924560546875,
-0.017547607421875,
-0.031707763671875,
0.0032501220703125,
0.004344940185546875,
-0.00841522216796875,
0.03814697265625,
0.007503509521484375,
-0.0233154296875,
0.018798828125,
0.08099365234375,
0.011077880859375,
-0.007793426513671875,
-0.10345458984375,
0.01155853271484375,
0.038787841796875,
0.041717529296875,
0.0014190673828125,
-0.039093017578125,
-0.055328369140625,
0.08984375,
0.001308441162109375,
-0.0192108154296875,
-0.00939178466796875,
0.051910400390625,
0.0008702278137207031,
-0.0301971435546875,
0.01007843017578125,
-0.01367950439453125,
0.045745849609375,
0.0015668869018554688,
-0.025970458984375,
-0.0095672607421875,
-0.07379150390625,
0.0312042236328125,
0.0181732177734375,
0.025482177734375,
-0.05657958984375,
-0.04840087890625,
0.01309967041015625,
-0.016082763671875,
0.023040771484375,
0.027130126953125,
-0.0126495361328125,
0.044891357421875,
0.034912109375,
0.0125732421875,
0.00958251953125,
0.04327392578125,
-0.0236358642578125,
0.04913330078125,
0.004486083984375,
-0.004787445068359375,
-0.0269775390625,
-0.0170440673828125,
0.03546142578125,
0.006336212158203125,
-0.0238494873046875,
-0.0302734375,
-0.0238800048828125,
0.0283050537109375,
0.006664276123046875,
-0.048065185546875,
0.03240966796875,
0.01561737060546875,
-0.0098876953125,
0.0037136077880859375,
-0.07916259765625,
0.00734710693359375,
-0.05267333984375,
0.005382537841796875,
-0.00807952880859375,
-0.013397216796875,
0.022674560546875,
0.0285797119140625,
0.0160980224609375,
0.0146484375,
-0.0169677734375,
0.002849578857421875,
0.01386260986328125,
0.00957489013671875,
0.005123138427734375,
-0.0162811279296875,
0.0211334228515625,
-0.0195159912109375,
0.0638427734375,
-0.018341064453125,
-0.017578125,
0.01462554931640625,
0.01398468017578125,
-0.011322021484375,
0.0079345703125,
0.024688720703125,
0.0194854736328125,
-0.0038299560546875,
0.01474761962890625,
-0.020721435546875,
-0.0164031982421875,
-0.0311279296875,
-0.0194549560546875,
0.039581298828125,
-0.00408172607421875,
-0.021331787109375,
-0.019500732421875,
-0.0361328125,
-0.0114593505859375,
0.0287322998046875,
-0.056365966796875,
0.0171051025390625,
0.01294708251953125,
-0.10882568359375,
0.0221099853515625,
0.06292724609375,
-0.1259765625,
-0.08477783203125,
0.0006184577941894531,
-0.0276031494140625,
0.040374755859375,
0.00701141357421875,
0.050201416015625,
-0.00252532958984375,
-0.0287933349609375,
0.0133056640625,
0.01009368896484375,
0.0242767333984375,
-0.010711669921875,
-0.07318115234375,
0.01534271240234375,
-0.04632568359375,
-0.004283905029296875,
-0.0243072509765625,
-0.03912353515625,
-0.06646728515625,
-0.0217132568359375,
0.0036907196044921875,
0.0087432861328125,
-0.0223236083984375,
-0.0621337890625,
-0.0263671875,
-0.01149749755859375,
0.033599853515625,
-0.00907135009765625,
-0.0177154541015625,
0.0557861328125,
0.007320404052734375,
-0.001636505126953125,
-0.006435394287109375,
0.01016998291015625,
-0.014129638671875,
0.01180267333984375,
-0.0066070556640625,
-0.03997802734375,
0.0025482177734375,
0.030792236328125,
-0.050506591796875,
0.0199127197265625,
0.050750732421875,
0.00807952880859375,
0.0239105224609375,
-0.02020263671875,
-0.006443023681640625,
-0.01483154296875,
-0.0115814208984375,
-0.0281524658203125,
-0.002239227294921875,
0.025482177734375,
0.003337860107421875,
0.0028858184814453125,
-0.01557159423828125,
-0.0272064208984375,
0.04241943359375,
0.0039520263671875,
0.02447509765625,
-0.006999969482421875,
-0.0758056640625,
0.063232421875,
0.047119140625,
0.0477294921875,
0.0300140380859375,
-0.0194091796875,
0.01482391357421875,
-0.0224456787109375,
0.004528045654296875,
0.07763671875,
0.0325927734375,
0.07562255859375,
-0.0020694732666015625,
0.0016355514526367188,
0.03485107421875,
-0.041961669921875,
-0.018707275390625,
0.0548095703125,
0.0082244873046875,
-0.0887451171875,
-0.0016269683837890625,
-0.01247406005859375,
0.00830841064453125,
0.0012607574462890625,
-0.0011796951293945312,
0.0105438232421875,
0.01132965087890625,
0.0308990478515625,
-0.009918212890625,
-0.0234527587890625,
-0.0015401840209960938,
-0.01953125,
0.0035839080810546875,
-0.002536773681640625,
0.01261138916015625,
0.0017461776733398438,
-0.049285888671875,
-0.01314544677734375,
0.0137939453125,
-0.0037994384765625,
-0.00043892860412597656,
0.0150146484375,
0.008392333984375,
-0.016998291015625,
-0.04705810546875,
0.02947998046875,
-0.007030487060546875,
-0.0218963623046875,
-0.020843505859375,
-0.0288543701171875,
0.03057861328125,
0.044708251953125,
-0.03228759765625,
0.011138916015625,
0.02789306640625,
-0.03955078125,
0.03350830078125,
0.0024929046630859375,
0.0318603515625,
-0.024749755859375,
-0.02642822265625,
-0.005092620849609375,
-0.01654052734375,
-0.0137176513671875,
-0.0266265869140625,
-0.018096923828125,
0.06622314453125,
-0.025787353515625,
-0.00826263427734375,
0.0309906005859375,
0.04486083984375,
-0.014923095703125,
0.041107177734375,
0.023590087890625,
-0.030120849609375,
-0.01348876953125,
0.035491943359375,
0.006404876708984375,
0.0183258056640625,
0.06878662109375,
-0.0457763671875,
0.0606689453125,
-0.02740478515625,
0.037628173828125,
0.0214080810546875,
0.00926971435546875,
0.00341033935546875,
0.00731658935546875,
-0.0178680419921875,
0.0290374755859375,
-0.0278778076171875,
0.013702392578125,
-0.02886962890625,
0.0100860595703125,
-0.003116607666015625,
0.00293731689453125,
0.044677734375,
0.0029277801513671875,
-0.00762939453125,
0.0162506103515625,
0.0709228515625,
0.041229248046875,
0.00855255126953125,
0.00811004638671875,
0.00858306884765625,
-0.013641357421875,
0.005908966064453125,
0.01116180419921875,
0.03375244140625,
-0.021453857421875,
-0.0231170654296875,
0.037872314453125,
0.0221099853515625,
0.0224456787109375,
0.005542755126953125,
0.0019893646240234375,
-0.052825927734375,
0.01021575927734375,
0.0467529296875,
-0.012664794921875,
-0.00595855712890625,
0.048675537109375,
0.0269622802734375,
-0.055877685546875,
-0.044189453125,
-0.02117919921875,
0.04254150390625,
-0.0012454986572265625,
0.052337646484375,
0.0193328857421875,
0.033233642578125,
0.04327392578125,
-0.0694580078125,
0.01021575927734375,
-0.00543975830078125,
-0.062744140625,
0.0379638671875,
0.0038299560546875,
0.022857666015625,
-0.03057861328125,
0.006198883056640625,
0.01470947265625,
0.032196044921875,
-0.02880859375,
-0.059661865234375,
0.0140380859375,
0.004974365234375,
0.009765625,
0.018157958984375,
-0.006580352783203125,
-0.0272064208984375,
0.0286102294921875,
-0.05718994140625,
-0.024688720703125,
0.02252197265625,
0.03411865234375,
-0.00769805908203125,
-0.0185546875,
0.006084442138671875,
-0.050018310546875,
-0.02349853515625,
0.050628662109375,
0.04193115234375,
0.0214996337890625,
-0.04962158203125,
0.06689453125,
-0.01322174072265625,
0.0004334449768066406,
0.017730712890625,
0.03216552734375,
-0.00868988037109375,
-0.013946533203125,
-0.016937255859375,
-0.049041748046875,
-0.02252197265625,
0.0289154052734375,
0.01139068603515625,
0.008026123046875,
0.020050048828125,
0.036834716796875,
0.01776123046875,
-0.005451202392578125,
0.0174560546875,
-0.0084686279296875,
-0.033416748046875,
-0.0135345458984375,
0.02178955078125,
0.029266357421875,
0.003818511962890625,
0.0078887939453125,
0.038726806640625,
0.0167083740234375,
-0.0130157470703125,
0.01114654541015625,
-0.0006113052368164062,
-0.0196990966796875,
0.01326751708984375,
-0.019561767578125,
0.0089111328125,
0.0017118453979492188,
-0.080810546875,
-0.0018024444580078125,
-0.0462646484375,
-0.017333984375,
0.006732940673828125,
0.027801513671875,
-0.01203155517578125,
0.034088134765625,
0.050323486328125,
-0.0478515625,
0.01611328125,
-0.0003314018249511719,
0.023529052734375,
0.022979736328125,
0.0036468505859375,
0.020172119140625,
-0.060638427734375,
-0.04766845703125,
-0.045074462890625,
0.042694091796875,
0.039093017578125,
0.07611083984375,
-0.0089874267578125,
0.037445068359375,
-0.00435638427734375,
0.003997802734375,
-0.021728515625,
-0.03216552734375,
0.0662841796875,
-0.005603790283203125,
-0.003383636474609375,
-0.0084228515625,
-0.022735595703125,
-0.046600341796875,
0.0374755859375,
-0.062103271484375,
-0.036773681640625,
-0.0144805908203125,
0.04754638671875,
-0.00264739990234375,
0.008697509765625,
-0.0213623046875,
-0.0345458984375,
-0.0863037109375,
-0.0178375244140625,
0.034332275390625,
0.04022216796875,
0.00043773651123046875,
-0.02734375,
0.01496124267578125,
-0.024932861328125,
-0.001613616943359375,
0.0496826171875,
0.00749969482421875,
0.036407470703125,
-0.023284912109375,
-0.07220458984375,
0.0338134765625,
-0.00405120849609375,
0.005123138427734375,
0.006061553955078125,
0.10577392578125,
0.0106201171875,
-0.024261474609375,
0.0264129638671875,
0.050445556640625,
0.054046630859375,
-0.0115814208984375,
0.0228271484375,
0.03607177734375,
-0.01666259765625,
0.013397216796875,
0.0140533447265625,
-0.0063018798828125,
-0.00878143310546875,
-0.006450653076171875,
-0.0009551048278808594,
0.000522613525390625,
-0.0198211669921875,
-0.0262451171875,
0.0203399658203125,
0.032379150390625,
-0.006938934326171875,
-0.044769287109375,
0.02496337890625,
-0.0175933837890625,
0.052886962890625,
-0.0090179443359375,
-0.0065460205078125,
-0.007648468017578125,
-0.0034332275390625,
-0.0220489501953125,
0.01251220703125,
-0.031829833984375,
-0.0020084381103515625,
-0.0030689239501953125,
-0.0140533447265625,
0.00638580322265625,
-0.0023136138916015625,
0.0252838134765625,
0.00507354736328125,
-0.01351165771484375,
0.05914306640625,
-0.0204925537109375,
-0.0014867782592773438,
0.02410888671875,
-0.0010194778442382812,
-0.04827880859375,
-0.038330078125,
0.036956787109375,
-0.036773681640625,
-0.02227783203125,
-0.045623779296875,
0.0017061233520507812,
-0.00283050537109375,
-0.048187255859375,
-0.05218505859375,
0.06829833984375,
-0.02520751953125,
-0.0248870849609375,
-0.04473876953125,
0.0028591156005859375,
-0.01105499267578125,
0.050384521484375,
0.0029544830322265625,
-0.0294189453125,
-0.031219482421875,
0.044586181640625,
0.02313232421875,
0.0226898193359375,
0.0015039443969726562,
0.02349853515625,
-0.08148193359375,
0.01335906982421875,
-0.01397705078125,
0.015350341796875,
-0.009765625,
0.0233001708984375,
-0.0017747879028320312,
0.03912353515625,
-0.0185546875,
-0.0029773712158203125,
-0.0005168914794921875,
-0.0095062255859375,
0.01493072509765625,
-0.046295166015625,
-0.0528564453125,
-0.0198516845703125,
0.056671142578125,
0.01515960693359375,
0.011016845703125,
-0.0110321044921875,
-0.046630859375,
-0.053497314453125,
0.006282806396484375,
-0.02911376953125,
0.0298004150390625,
-0.09674072265625,
0.0012979507446289062,
0.02490234375,
0.00385284423828125,
0.0110931396484375,
-0.035400390625,
-0.0030422210693359375,
-0.020050048828125,
0.005809783935546875,
0.01258087158203125,
-0.0084228515625,
-0.017486572265625,
0.0132904052734375,
-0.01320648193359375,
0.0013713836669921875,
-0.015899658203125,
0.00994110107421875,
0.0124969482421875,
-0.0010166168212890625,
-0.03094482421875,
-0.01453399658203125,
-0.029022216796875,
0.0272216796875,
-0.015960693359375,
0.041656494140625,
-0.031585693359375,
-0.01016998291015625,
-0.0241851806640625,
0.0071563720703125,
0.00319671630859375,
-0.0165557861328125,
-0.026153564453125,
0.029998779296875,
0.007205963134765625,
0.08648681640625,
0.0241546630859375,
0.0066680908203125,
0.0037784576416015625,
0.045654296875,
-0.024871826171875,
-0.040740966796875,
-0.015411376953125,
-0.04168701171875,
0.01294708251953125,
0.01119232177734375,
0.019195556640625,
-0.02569580078125,
0.0250701904296875,
0.0223541259765625,
0.006603240966796875,
0.0197601318359375
]
|
287b97bbdc0a8ab2ef8b6cd5454d13beeb4ae3f1 | Wordpress Stackexchange
Q: Wordpress Multisite allow site admin to add user without email confirmation In Wordpress Multisite,a site admin (not a super admin) doesn't have the option “Add the user without sending them a confirmation email” when adding a new user.
Is there a way to bypass the confirmation email or to add this option also for site admin ?
Many thanks
A: You will not be able to enable the checkbox for non-super-admins as the code for it shows:
<?php if ( is_multisite() && is_super_admin() ) { ?>
<tr>
<th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
<td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> /> <?php _e( 'Add the user without sending them a confirmation email.' ); ?></label></td>
</tr>
<?php } ?>
You can disable the sending of the confirmation emails altogether with the following:
add_filter( 'wpmu_welcome_user_notification', '__return_false');
The other option is create a plugin that makes your own custom add user page.
| Q: Wordpress Multisite allow site admin to add user without email confirmation In Wordpress Multisite,a site admin (not a super admin) doesn't have the option “Add the user without sending them a confirmation email” when adding a new user.
Is there a way to bypass the confirmation email or to add this option also for site admin ?
Many thanks
A: You will not be able to enable the checkbox for non-super-admins as the code for it shows:
<?php if ( is_multisite() && is_super_admin() ) { ?>
<tr>
<th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
<td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> /> <?php _e( 'Add the user without sending them a confirmation email.' ); ?></label></td>
</tr>
<?php } ?>
You can disable the sending of the confirmation emails altogether with the following:
add_filter( 'wpmu_welcome_user_notification', '__return_false');
The other option is create a plugin that makes your own custom add user page.
A: It's now possible in recent version of Wordpress (since 3.8 ?), with the right "manage_network_users".
You can access it with the User Role editor plug-in, for example (in network admin prefs).
| wordpress | {
"language": "en",
"length": 187,
"provenance": "stackexchange_00019.jsonl.gz:439869",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125488"
} | [
0.099365234375,
-0.006771087646484375,
0.0190887451171875,
-0.052001953125,
0.024566650390625,
-0.05792236328125,
0.03289794921875,
-0.051239013671875,
0.0115509033203125,
0.01495361328125,
-0.0112762451171875,
-0.0163726806640625,
0.0182342529296875,
-0.0526123046875,
0.004573822021484375,
-0.014190673828125,
-0.01001739501953125,
0.0308074951171875,
-0.00878143310546875,
-0.029693603515625,
0.0008859634399414062,
-0.013946533203125,
-0.04241943359375,
-0.042999267578125,
-0.041229248046875,
0.04638671875,
0.03717041015625,
-0.004993438720703125,
-0.018280029296875,
-0.01097869873046875,
-0.006580352783203125,
-0.002948760986328125,
0.0184326171875,
0.0562744140625,
-0.0760498046875,
-0.0281982421875,
0.006916046142578125,
0.0094146728515625,
-0.0035915374755859375,
0.034149169921875,
0.0152740478515625,
0.002899169921875,
-0.0156402587890625,
0.04547119140625,
-0.01763916015625,
-0.04998779296875,
0.0179901123046875,
-0.048095703125,
0.0201416015625,
-0.0175323486328125,
-0.0022678375244140625,
-0.01329803466796875,
0.0237274169921875,
-0.06494140625,
-0.0216522216796875,
-0.00531005859375,
0.005176544189453125,
-0.0279998779296875,
0.02008056640625,
0.036865234375,
-0.004955291748046875,
0.0008111000061035156,
0.0008969306945800781,
-0.04632568359375,
0.0081024169921875,
-0.0093231201171875,
-0.04522705078125,
0.01122283935546875,
-0.00986480712890625,
0.01519012451171875,
0.0224456787109375,
-0.02642822265625,
0.00959014892578125,
-0.007175445556640625,
-0.0199127197265625,
-0.009918212890625,
-0.0020904541015625,
-0.004192352294921875,
0.02862548828125,
-0.0035572052001953125,
0.00916290283203125,
0.021697998046875,
-0.0322265625,
-0.0138397216796875,
-0.00980377197265625,
-0.00003731250762939453,
-0.006893157958984375,
-0.0135040283203125,
-0.006549835205078125,
-0.0028076171875,
-0.0134429931640625,
-0.00847625732421875,
0.014312744140625,
0.0146331787109375,
-0.0255584716796875,
-0.0194854736328125,
0.0302734375,
0.06146240234375,
-0.013397216796875,
-0.0298309326171875,
-0.028472900390625,
-0.0009679794311523438,
-0.058563232421875,
-0.0205230712890625,
-0.0010585784912109375,
0.059967041015625,
-0.00411224365234375,
-0.015472412109375,
0.0108489990234375,
0.0033893585205078125,
0.01302337646484375,
-0.0264892578125,
-0.02117919921875,
-0.025665283203125,
0.022003173828125,
0.0224456787109375,
-0.039947509765625,
0.039581298828125,
0.0023555755615234375,
0.0288238525390625,
-0.02325439453125,
0.0010900497436523438,
-0.036590576171875,
0.013702392578125,
0.016754150390625,
-0.0100555419921875,
-0.004390716552734375,
0.01629638671875,
-0.0604248046875,
0.0033283233642578125,
-0.040985107421875,
0.027374267578125,
0.0758056640625,
0.05157470703125,
0.03594970703125,
-0.0164031982421875,
0.017547607421875,
0.030517578125,
-0.01934814453125,
0.0267791748046875,
-0.00270843505859375,
-0.04290771484375,
-0.048797607421875,
-0.0165252685546875,
-0.0162811279296875,
0.033447265625,
0.0017404556274414062,
-0.004077911376953125,
0.01322174072265625,
-0.01299285888671875,
-0.052276611328125,
-0.05645751953125,
-0.0014781951904296875,
0.00890350341796875,
-0.0024166107177734375,
0.00748443603515625,
-0.0024242401123046875,
0.01116180419921875,
-0.0277862548828125,
0.0011653900146484375,
0.0111846923828125,
-0.0228271484375,
0.0038890838623046875,
-0.006694793701171875,
-0.03399658203125,
0.0278472900390625,
-0.032867431640625,
-0.0096282958984375,
0.0241851806640625,
-0.0225982666015625,
0.0330810546875,
0.01329803466796875,
0.045196533203125,
0.012176513671875,
0.0164031982421875,
0.004177093505859375,
0.037750244140625,
0.0164947509765625,
0.0273284912109375,
0.0037326812744140625,
-0.00461578369140625,
-0.0243988037109375,
0.09893798828125,
-0.0504150390625,
-0.0670166015625,
0.0231781005859375,
0.0014371871948242188,
0.041961669921875,
0.030609130859375,
0.003284454345703125,
0.037841796875,
0.0256195068359375,
0.03662109375,
0.010498046875,
-0.01311492919921875,
-0.059783935546875,
-0.022674560546875,
-0.0159149169921875,
-0.036773681640625,
0.035980224609375,
0.05120849609375,
-0.0181121826171875,
0.06585693359375,
-0.041656494140625,
-0.0138702392578125,
0.0141143798828125,
-0.0218963623046875,
0.011260986328125,
0.0059661865234375,
0.0250701904296875,
0.0177001953125,
0.021270751953125,
-0.033477783203125,
-0.0181732177734375,
-0.0145111083984375,
-0.0208282470703125,
-0.0029296875,
0.07635498046875,
0.00423431396484375,
0.056396484375,
0.007022857666015625,
-0.0718994140625,
0.020843505859375,
-0.01502227783203125,
0.0092315673828125,
-0.042205810546875,
0.005706787109375,
-0.01678466796875,
0.025390625,
-0.010650634765625,
0.018951416015625,
0.0252227783203125,
-0.025726318359375,
-0.041412353515625,
-0.0390625,
0.01812744140625,
0.004856109619140625,
-0.0382080078125,
-0.0012302398681640625,
0.0391845703125,
0.0227813720703125,
0.0215911865234375,
-0.00936126708984375,
0.0198516845703125,
0.01177215576171875,
-0.045257568359375,
0.0017442703247070312,
0.0020122528076171875,
-0.01947021484375,
0.012054443359375,
-0.018402099609375,
0.000056743621826171875,
0.0190277099609375,
-0.046966552734375,
-0.002288818359375,
0.041168212890625,
0.0260009765625,
-0.0172271728515625,
-0.0307769775390625,
0.01377105712890625,
0.0293121337890625,
-0.0005803108215332031,
-0.068115234375,
0.024993896484375,
-0.048919677734375,
-0.00708770751953125,
-0.0201416015625,
-0.00971221923828125,
0.00545501708984375,
-0.0185699462890625,
0.0170440673828125,
-0.040863037109375,
-0.00423431396484375,
0.00848388671875,
0.0626220703125,
0.0203857421875,
-0.050140380859375,
-0.0130157470703125,
0.045989990234375,
0.0176849365234375,
-0.037567138671875,
-0.01824951171875,
0.041412353515625,
-0.00823974609375,
0.009490966796875,
-0.0182647705078125,
0.0489501953125,
-0.041778564453125,
-0.00586700439453125,
-0.018951416015625,
0.037811279296875,
-0.0201568603515625,
-0.031951904296875,
0.01690673828125,
-0.0244903564453125,
-0.043426513671875,
-0.04449462890625,
-0.0017766952514648438,
0.0092315673828125,
-0.007526397705078125,
0.0154876708984375,
0.07763671875,
0.037384033203125,
-0.0110626220703125,
-0.01322174072265625,
-0.021728515625,
-0.0225067138671875,
0.032989501953125,
0.006366729736328125,
-0.045379638671875,
-0.00725555419921875,
0.03045654296875,
0.005062103271484375,
-0.00957489013671875,
0.0068206787109375,
-0.01493072509765625,
0.0023326873779296875,
-0.004459381103515625,
0.0130767822265625,
0.004985809326171875,
-0.04937744140625,
-0.05670166015625,
-0.007843017578125,
0.0163421630859375,
-0.0237274169921875,
0.007724761962890625,
0.03887939453125,
0.0226287841796875,
-0.05633544921875,
-0.005218505859375,
-0.0009508132934570312,
-0.03704833984375,
-0.024749755859375,
0.00428009033203125,
-0.00920867919921875,
0.0116424560546875,
0.0015392303466796875,
0.01049041748046875,
-0.00469207763671875,
-0.0192718505859375,
-0.0005269050598144531,
0.00415802001953125,
0.0123138427734375,
-0.01873779296875,
-0.0364990234375,
0.01666259765625,
0.032470703125,
0.008270263671875,
-0.0243988037109375,
0.007781982421875,
0.01580810546875,
-0.03790283203125,
0.020965576171875,
-0.022430419921875,
0.01470184326171875,
-0.01474761962890625,
-0.01444244384765625,
0.00995635986328125,
-0.00949859619140625,
-0.033966064453125,
-0.003940582275390625,
0.01497650146484375,
-0.04248046875,
-0.0233306884765625,
0.018829345703125,
-0.029571533203125,
0.036468505859375,
-0.0494384765625,
0.032806396484375,
0.01418304443359375,
0.0139007568359375,
0.016510009765625,
-0.0160369873046875,
-0.0108489990234375,
0.008544921875,
-0.0179443359375,
0.0133819580078125,
-0.0230865478515625,
0.0182037353515625,
-0.01373291015625,
0.006343841552734375,
-0.018280029296875,
0.0120391845703125,
-0.03179931640625,
-0.054443359375,
0.04388427734375,
-0.061920166015625,
0.033843994140625,
-0.0677490234375,
-0.0203094482421875,
-0.0135498046875,
0.11944580078125,
0.01116943359375,
-0.035675048828125,
0.01470184326171875,
0.0298309326171875,
-0.0256195068359375,
-0.03948974609375,
0.0172576904296875,
-0.017181396484375,
-0.037445068359375,
-0.01277923583984375,
-0.02008056640625,
-0.020751953125,
0.002655029296875,
-0.0283660888671875,
0.004955291748046875,
-0.03546142578125,
0.0223846435546875,
-0.053131103515625,
0.03125,
-0.0024585723876953125,
0.002471923828125,
-0.0238800048828125,
-0.0081939697265625,
-0.05645751953125,
-0.0255126953125,
-0.004425048828125,
-0.017608642578125,
0.00853729248046875,
-0.0087738037109375,
0.059661865234375,
-0.04034423828125,
0.0029354095458984375,
-0.0101318359375,
0.0137786865234375,
-0.028839111328125,
0.004730224609375,
0.0029392242431640625,
-0.0017938613891601562,
-0.0189361572265625,
-0.00833892822265625,
-0.00420379638671875,
0.02447509765625,
0.00827789306640625,
0.0186767578125,
-0.039154052734375,
-0.03643798828125,
0.01540374755859375,
-0.03167724609375,
-0.03509521484375,
-0.0411376953125,
-0.047088623046875,
0.00041961669921875,
-0.02880859375,
-0.00786590576171875,
-0.034698486328125,
-0.043670654296875,
0.0178985595703125,
-0.0247039794921875,
-0.009613037109375,
0.006977081298828125,
0.02252197265625,
0.0184326171875,
-0.01236724853515625,
0.0018968582153320312,
-0.01335906982421875,
0.02777099609375,
-0.0184173583984375,
0.021026611328125,
0.043304443359375,
-0.01007080078125,
-0.0098876953125,
0.0079193115234375,
0.029510498046875,
-0.02728271484375,
0.04638671875,
-0.019012451171875,
-0.048858642578125,
0.06219482421875,
-0.0248870849609375,
-0.0169525146484375,
0.0173187255859375,
0.0228729248046875,
-0.0145416259765625,
0.032012939453125,
-0.0094757080078125,
0.0182647705078125,
-0.041839599609375,
-0.0002276897430419922,
-0.0248260498046875,
0.0084075927734375,
-0.0277862548828125,
-0.033172607421875,
0.01065826416015625,
0.00537872314453125,
-0.044769287109375,
-0.01349639892578125,
-0.01654052734375,
-0.0185394287109375,
-0.034637451171875,
0.0104522705078125,
0.0203857421875,
-0.040679931640625,
-0.01474761962890625,
0.0042572021484375,
-0.0157470703125,
0.04345703125,
0.0303192138671875,
-0.01910400390625,
0.004425048828125,
0.003299713134765625,
0.04766845703125,
-0.0181427001953125,
0.0208740234375,
0.0810546875,
0.03753662109375,
-0.0266876220703125,
-0.0292816162109375,
-0.00009465217590332031,
-0.002979278564453125,
-0.0859375,
0.016204833984375,
-0.0007081031799316406,
0.0031280517578125,
0.07147216796875,
0.013458251953125,
-0.0066070556640625,
0.047271728515625,
-0.01361846923828125,
0.03570556640625,
0.08575439453125,
-0.0310211181640625,
0.0144805908203125,
0.0625,
-0.039947509765625,
-0.0241546630859375,
0.0208587646484375,
0.0008101463317871094,
-0.00684356689453125,
0.050628662109375,
0.0210418701171875,
0.0662841796875,
0.0302581787109375,
-0.0548095703125,
-0.00897979736328125,
-0.027679443359375,
0.050872802734375,
0.041961669921875,
-0.0267486572265625,
-0.03350830078125,
-0.02618408203125,
-0.0043487548828125,
-0.005107879638671875,
0.008758544921875,
-0.0010509490966796875,
-0.005275726318359375,
-0.01058197021484375,
0.0280303955078125,
-0.0177764892578125,
-0.03564453125,
-0.00885772705078125,
-0.00945281982421875,
-0.01329803466796875,
0.002079010009765625,
0.0014009475708007812,
0.017852783203125,
-0.0297698974609375,
-0.0310821533203125,
0.03961181640625,
0.00940704345703125,
0.0282135009765625,
-0.05218505859375,
-0.00014519691467285156,
-0.035430908203125,
-0.0217132568359375,
0.05767822265625,
0.01453399658203125,
-0.00556182861328125,
-0.029510498046875,
-0.056427001953125,
-0.057708740234375,
-0.053497314453125,
-0.005161285400390625,
-0.042236328125,
0.036041259765625,
0.02496337890625,
0.01290130615234375,
-0.01238250732421875,
-0.06805419921875,
-0.038726806640625,
0.0213470458984375,
0.0692138671875,
0.0428466796875,
-0.03558349609375,
0.07098388671875,
0.0025005340576171875,
0.060089111328125,
0.029266357421875,
0.035064697265625,
-0.00411224365234375,
-0.02471923828125,
0.0168609619140625,
-0.056182861328125,
-0.040252685546875,
-0.025238037109375,
-0.03375244140625,
0.00379180908203125,
0.0147857666015625,
-0.0177764892578125,
0.005596160888671875,
0.0266876220703125,
-0.0013303756713867188,
-0.0159912109375,
-0.004207611083984375,
0.05108642578125,
0.03216552734375,
0.0103912353515625,
-0.00666046142578125,
0.041259765625,
-0.00487518310546875,
-0.0088043212890625,
-0.0254058837890625,
-0.002025604248046875,
0.0032558441162109375,
0.0095367431640625,
-0.047210693359375,
0.05029296875,
0.07403564453125,
0.00005269050598144531,
0.041351318359375,
0.00934600830078125,
0.0188751220703125,
0.022125244140625,
0.013763427734375,
-0.0338134765625,
-0.049224853515625,
0.041259765625,
0.02392578125,
-0.0261688232421875,
0.049560546875,
-0.0156707763671875,
0.04345703125,
0.10009765625,
0.10662841796875,
-0.1275634765625,
0.0148773193359375,
0.010589599609375,
0.0017108917236328125,
0.046478271484375,
-0.0185546875,
-0.0199127197265625,
-0.08209228515625,
0.06866455078125,
-0.0216522216796875,
-0.00659942626953125,
0.0012025833129882812,
-0.0338134765625,
-0.0207672119140625,
-0.00902557373046875,
-0.0010328292846679688,
0.01275634765625,
0.03424072265625,
0.004367828369140625,
-0.0229339599609375,
0.037811279296875,
0.00848388671875,
0.0247955322265625,
-0.00913238525390625,
-0.014617919921875,
-0.055755615234375,
-0.03399658203125,
0.001422882080078125,
-0.054046630859375,
-0.0247344970703125,
0.00891876220703125,
0.036285400390625,
0.050384521484375,
-0.01238250732421875,
-0.0001062154769897461,
0.030181884765625,
-0.00261688232421875,
-0.018402099609375,
-0.029815673828125,
-0.00360107421875,
-0.0050201416015625,
-0.022735595703125,
0.0284576416015625,
-0.0103912353515625,
-0.045989990234375,
0.00942230224609375,
0.023712158203125,
0.0009851455688476562,
-0.007610321044921875,
-0.01873779296875,
0.0650634765625,
0.0011882781982421875,
-0.029205322265625,
0.00908660888671875,
0.0022144317626953125,
-0.06842041015625,
-0.057647705078125,
0.0038852691650390625,
-0.0673828125,
-0.005859375,
0.0151519775390625,
-0.03704833984375,
0.06597900390625,
0.019073486328125,
-0.0147552490234375,
0.009552001953125,
0.041046142578125,
-0.0299835205078125,
0.01983642578125,
-0.030548095703125,
0.03662109375,
0.003753662109375,
0.04534912109375,
-0.08203125,
-0.0216064453125,
-0.008544921875,
0.05914306640625,
0.07928466796875,
0.028839111328125,
-0.01537322998046875,
-0.0234375,
-0.0032558441162109375,
0.022674560546875,
-0.037261962890625,
0.032318115234375,
0.0124359130859375,
0.04144287109375,
0.039337158203125,
-0.050445556640625,
0.0279083251953125,
-0.01409149169921875,
-0.013671875,
0.0189056396484375,
-0.00481414794921875,
-0.01904296875,
-0.0016384124755859375,
0.02545166015625,
-0.029266357421875,
0.00443267822265625,
0.021942138671875,
-0.0286407470703125,
-0.0118560791015625,
-0.002994537353515625,
-0.028228759765625,
-0.0078125,
0.05615234375,
-0.03387451171875,
0.03155517578125,
-0.006114959716796875,
0.0268402099609375,
0.0230865478515625,
0.030914306640625,
0.0222320556640625,
0.0271759033203125,
0.0177459716796875,
0.038421630859375,
-0.0269775390625,
-0.01490020751953125,
-0.044921875,
0.01262664794921875,
-0.07073974609375,
-0.023712158203125,
0.0229949951171875,
0.0029048919677734375,
-0.0033416748046875,
-0.01288604736328125,
0.01131439208984375,
0.0206146240234375,
0.0249481201171875,
0.00039887428283691406,
0.054443359375,
0.004886627197265625,
-0.0009636878967285156,
-0.0611572265625,
0.0121612548828125,
0.0252838134765625,
0.0098419189453125,
-0.0174102783203125,
0.00658416748046875,
-0.003482818603515625,
0.00394439697265625,
-0.047821044921875,
0.017120361328125,
0.01421356201171875,
0.028778076171875,
0.0211181640625,
0.0199127197265625,
0.0240631103515625,
-0.015350341796875,
-0.03619384765625,
0.0006260871887207031,
0.04058837890625,
0.01116180419921875,
-0.0345458984375,
0.005474090576171875,
0.0469970703125,
0.0318603515625,
0.0009160041809082031,
0.00872802734375,
0.06353759765625,
0.052734375,
-0.0313720703125,
-0.0196075439453125,
0.01052093505859375,
-0.0243072509765625,
0.015228271484375,
-0.04974365234375,
0.0058441162109375,
0.0020885467529296875,
-0.002796173095703125,
0.01641845703125,
-0.011444091796875,
0.049652099609375,
-0.0245208740234375,
-0.00644683837890625,
-0.006786346435546875,
-0.047821044921875,
0.047576904296875,
0.0024089813232421875,
0.041229248046875,
-0.01320648193359375,
-0.06634521484375,
-0.025909423828125,
0.008331298828125,
-0.0086669921875,
0.00797271728515625,
0.034637451171875,
-0.03167724609375,
0.03704833984375,
0.0241851806640625,
0.006084442138671875,
0.0289154052734375,
-0.0307159423828125,
-0.0124969482421875,
-0.0352783203125,
0.0227508544921875,
-0.0178070068359375,
-0.0511474609375,
-0.0033435821533203125,
0.0207672119140625,
-0.01861572265625,
-0.033050537109375,
0.060546875,
0.001384735107421875,
-0.02276611328125,
-0.019805908203125,
0.02734375,
-0.02850341796875,
-0.0238189697265625,
0.005016326904296875,
0.01194000244140625,
0.006229400634765625,
-0.00505828857421875,
-0.04742431640625,
0.06475830078125,
-0.007160186767578125,
-0.005947113037109375,
0.07305908203125,
-0.002231597900390625,
-0.03411865234375,
-0.024505615234375,
0.03326416015625,
-0.024017333984375,
-0.049652099609375,
-0.061492919921875,
0.01367950439453125,
0.01158905029296875,
0.0289154052734375,
-0.046417236328125,
0.035003662109375,
-0.01311492919921875,
-0.023773193359375,
-0.0022563934326171875,
-0.0307159423828125,
-0.0146484375,
0.03704833984375,
0.003269195556640625,
0.010223388671875,
0.011749267578125,
-0.00904083251953125,
0.01396942138671875,
0.008941650390625,
-0.00859832763671875,
0.026580810546875,
-0.0280914306640625,
-0.0234222412109375,
0.01092529296875,
0.0088958740234375,
-0.0183563232421875,
-0.0009188652038574219,
0.0282440185546875,
-0.025482177734375,
-0.019256591796875,
-0.0193939208984375,
-0.040496826171875,
-0.06378173828125,
0.0251922607421875,
0.0357666015625,
-0.0230255126953125,
0.017425537109375,
-0.03765869140625,
0.050994873046875,
0.040924072265625,
-0.00005370378494262695,
-0.08135986328125,
0.056610107421875,
-0.048492431640625,
0.060333251953125,
-0.014801025390625,
0.035675048828125,
-0.00489044189453125,
0.00492095947265625,
-0.03985595703125,
-0.03289794921875,
-0.01514434814453125,
0.054931640625,
-0.018341064453125,
-0.03302001953125,
0.005764007568359375,
0.0228729248046875,
-0.01776123046875,
-0.05926513671875,
-0.048126220703125,
-0.007450103759765625,
-0.0167694091796875,
-0.00469970703125,
0.007568359375,
-0.0080108642578125,
-0.01396942138671875,
-0.02801513671875,
0.005443572998046875,
-0.058563232421875,
-0.0178070068359375,
-0.0023860931396484375,
0.005615234375,
0.0213165283203125,
-0.034027099609375,
-0.08428955078125,
0.035186767578125,
-0.0173187255859375,
-0.03271484375,
-0.0389404296875,
-0.0236968994140625,
-0.032684326171875,
0.0285491943359375,
-0.0102386474609375,
-0.046661376953125,
-0.01065826416015625,
0.06231689453125,
0.0130157470703125,
0.0024871826171875,
0.00678253173828125,
0.018798828125,
-0.046844482421875,
0.01453399658203125,
0.0034637451171875,
-0.005542755126953125,
0.03900146484375,
-0.04290771484375,
0.06524658203125,
0.06378173828125,
-0.02728271484375,
-0.019927978515625,
0.00012040138244628906,
-0.057342529296875,
-0.035614013671875,
-0.049774169921875,
-0.0309600830078125,
-0.02923583984375,
0.08441162109375,
0.0650634765625,
0.0204010009765625,
-0.0281829833984375,
-0.0163726806640625,
-0.04144287109375,
-0.0238189697265625,
-0.0267791748046875,
0.0158843994140625,
-0.07110595703125,
-0.00893402099609375,
0.021514892578125,
-0.0267181396484375,
-0.0017757415771484375,
0.004184722900390625,
-0.028564453125,
0.00485992431640625,
0.01096343994140625,
-0.00940704345703125,
-0.03265380859375,
0.0182037353515625,
0.0032176971435546875,
-0.0266265869140625,
-0.051025390625,
-0.01390838623046875,
0.003894805908203125,
-0.044281005859375,
-0.021331787109375,
-0.0229339599609375,
0.0092620849609375,
-0.03790283203125,
0.02191162109375,
-0.0128173828125,
0.0247344970703125,
-0.054046630859375,
0.01270294189453125,
0.01325225830078125,
0.0224761962890625,
-0.0161895751953125,
0.01317596435546875,
-0.004611968994140625,
0.04315185546875,
-0.0138702392578125,
0.062347412109375,
-0.01270294189453125,
-0.0304718017578125,
-0.04730224609375,
0.05322265625,
0.0352783203125,
-0.027130126953125,
0.06353759765625,
-0.02618408203125,
0.0003387928009033203,
-0.004322052001953125,
0.032440185546875,
-0.0501708984375,
0.02813720703125,
-0.008087158203125,
0.0390625,
0.0254058837890625
]
|
e689210c010aad88c3b5cccb8f56dfd94b424586 | Wordpress Stackexchange
Q: How to get url of a post from admin panel I want to get post url from the back end edit post page,
the edit post url is : www.ddd.com/wp-admin/post.php?post=1&action=edit
the real post is: www.ddd.com/wp/?p=1
since the user can edit permalink, i need some wordpress parametrs so it will be constant.
Looking for this answer:
global $post;
get_permalink($post->ID);
thx all
A: If you are looking for the post edit url for admin end and you have the post id (suppose $post_id) with you, then you can use the following code for getting the url.
$post_url = admin_url( 'post.php?post=' . $post_id ) . '&action=edit';
| Q: How to get url of a post from admin panel I want to get post url from the back end edit post page,
the edit post url is : www.ddd.com/wp-admin/post.php?post=1&action=edit
the real post is: www.ddd.com/wp/?p=1
since the user can edit permalink, i need some wordpress parametrs so it will be constant.
Looking for this answer:
global $post;
get_permalink($post->ID);
thx all
A: If you are looking for the post edit url for admin end and you have the post id (suppose $post_id) with you, then you can use the following code for getting the url.
$post_url = admin_url( 'post.php?post=' . $post_id ) . '&action=edit';
A: You can use the 'current_screen' hook and get_permalink():
add_action( 'current_screen', function ( $screen ) {
$url = get_permalink( $screen->id );
// ...
} );
This hook receives a WP_Screen_Object with misc. information about the current admin screen the user is browsing. See http://codex.wordpress.org/Plugin_API/Action_Reference/current_screen and http://codex.wordpress.org/Function_Reference/get_permalink for details.
A: You can get the ID of the post you're editing like this:
//currently edited post id
$cep_id = $_GET['post'];
//permalink
get_permalink( $cep_id );
This is and can only work if your editing an existing/saved post. It won't and can't work on »Add New«-Pages, because the post you're going to add isn't saved to the database yet, after »Publish« has been pressed one gets redirected to the actual »Edit«-Page and the above is possible.
| wordpress | {
"language": "en",
"length": 226,
"provenance": "stackexchange_00019.jsonl.gz:439874",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125498"
} | [
0.06158447265625,
0.0006999969482421875,
0.018218994140625,
-0.019134521484375,
0.002838134765625,
-0.01366424560546875,
0.03253173828125,
-0.046661376953125,
0.00013875961303710938,
0.001087188720703125,
0.01515960693359375,
-0.02825927734375,
-0.0107269287109375,
-0.055877685546875,
0.01059722900390625,
-0.0114898681640625,
0.0267791748046875,
-0.0292205810546875,
0.007205963134765625,
0.00013387203216552734,
0.00555419921875,
0.007564544677734375,
0.01184844970703125,
-0.00681304931640625,
0.0164031982421875,
0.031463623046875,
0.039306640625,
-0.01416015625,
0.00681304931640625,
-0.01544952392578125,
0.01654052734375,
-0.0249176025390625,
0.0150299072265625,
-0.0234375,
0.04815673828125,
-0.0714111328125,
-0.006610870361328125,
-0.0099639892578125,
0.017181396484375,
-0.007781982421875,
0.0225372314453125,
-0.0169677734375,
-0.01141357421875,
0.053741455078125,
-0.034637451171875,
-0.0191650390625,
0.00749969482421875,
-0.03363037109375,
0.01065826416015625,
0.037689208984375,
0.003780364990234375,
0.03106689453125,
-0.0087127685546875,
0.025634765625,
-0.0012416839599609375,
-0.0007510185241699219,
0.005939483642578125,
-0.011566162109375,
0.058349609375,
-0.045074462890625,
-0.05975341796875,
-0.057769775390625,
0.044189453125,
-0.01239776611328125,
-0.018157958984375,
-0.0037288665771484375,
0.04669189453125,
0.02685546875,
-0.04205322265625,
-0.029327392578125,
0.0258636474609375,
0.00408172607421875,
-0.0143890380859375,
-0.0163421630859375,
0.00286102294921875,
-0.02447509765625,
0.01372528076171875,
-0.0190887451171875,
-0.023040771484375,
0.0408935546875,
0.006793975830078125,
-0.0176544189453125,
-0.01812744140625,
-0.01885986328125,
0.01255035400390625,
0.0036640167236328125,
-0.007457733154296875,
-0.00977325439453125,
-0.042327880859375,
-0.01528167724609375,
-0.034210205078125,
-0.018798828125,
-0.049896240234375,
0.00498199462890625,
-0.01316070556640625,
-0.0026645660400390625,
0.0176849365234375,
0.01552581787109375,
0.00815582275390625,
-0.01519012451171875,
-0.01824951171875,
-0.038238525390625,
-0.0004107952117919922,
-0.02935791015625,
-0.01465606689453125,
0.017486572265625,
0.043548583984375,
0.06402587890625,
0.0296173095703125,
0.01209259033203125,
-0.02337646484375,
0.0382080078125,
-0.015777587890625,
0.003143310546875,
-0.03350830078125,
0.021209716796875,
-0.0341796875,
-0.01052093505859375,
-0.01702880859375,
0.0208282470703125,
-0.030853271484375,
0.0148773193359375,
0.00930023193359375,
0.0012006759643554688,
-0.00445556640625,
-0.01422882080078125,
-0.0133209228515625,
-0.021148681640625,
0.00937652587890625,
0.009735107421875,
-0.037445068359375,
0.0215301513671875,
0.0787353515625,
0.0210418701171875,
0.0169677734375,
-0.0261688232421875,
-0.04144287109375,
-0.00969696044921875,
-0.0102996826171875,
0.007488250732421875,
-0.029937744140625,
-0.033233642578125,
0.039764404296875,
-0.033843994140625,
-0.0165863037109375,
0.041748046875,
-0.0021381378173828125,
-0.0162506103515625,
0.00873565673828125,
-0.028411865234375,
-0.06817626953125,
-0.0091094970703125,
0.01102447509765625,
0.03704833984375,
0.0175018310546875,
-0.012847900390625,
0.09307861328125,
-0.0389404296875,
0.00608062744140625,
-0.039215087890625,
0.0380859375,
0.0269622802734375,
0.056671142578125,
0.02764892578125,
-0.0155029296875,
-0.011383056640625,
-0.06341552734375,
-0.02362060546875,
0.01229095458984375,
0.025909423828125,
0.038238525390625,
0.008575439453125,
-0.026580810546875,
0.0023593902587890625,
0.013763427734375,
-0.034027099609375,
0.0023212432861328125,
-0.0005121231079101562,
0.0071563720703125,
0.05511474609375,
0.0308074951171875,
-0.0116119384765625,
0.00800323486328125,
0.0277557373046875,
-0.011322021484375,
0.032623291015625,
0.0201263427734375,
0.046356201171875,
-0.00751495361328125,
0.023284912109375,
-0.01203155517578125,
0.01812744140625,
0.002674102783203125,
0.04034423828125,
-0.0250701904296875,
-0.031768798828125,
-0.0228424072265625,
0.0233917236328125,
-0.044952392578125,
-0.0016641616821289062,
-0.0090484619140625,
0.01461029052734375,
-0.0014667510986328125,
0.042236328125,
-0.007694244384765625,
0.0185394287109375,
-0.01554107666015625,
0.0210418701171875,
0.00811767578125,
0.026123046875,
0.022735595703125,
0.02716064453125,
-0.034210205078125,
-0.0460205078125,
-0.0252685546875,
0.058013916015625,
-0.0333251953125,
0.0005879402160644531,
-0.029296875,
0.0252685546875,
-0.037078857421875,
-0.0229339599609375,
-0.050140380859375,
-0.006603240966796875,
0.051239013671875,
-0.0160369873046875,
0.009490966796875,
-0.032012939453125,
0.050323486328125,
0.0189971923828125,
-0.053375244140625,
-0.006702423095703125,
0.0062255859375,
0.0086517333984375,
-0.03558349609375,
-0.0156097412109375,
-0.02142333984375,
-0.045928955078125,
0.0169830322265625,
0.05963134765625,
0.036163330078125,
-0.00335693359375,
-0.00010585784912109375,
-0.00434112548828125,
0.0148468017578125,
-0.0227508544921875,
0.016571044921875,
-0.0258941650390625,
0.0079193115234375,
0.061798095703125,
-0.00940704345703125,
-0.0013341903686523438,
0.006748199462890625,
-0.01361083984375,
-0.0226287841796875,
0.04296875,
0.00577545166015625,
0.0199432373046875,
-0.01509857177734375,
0.01210784912109375,
-0.01535797119140625,
-0.034423828125,
-0.0298614501953125,
-0.0218048095703125,
-0.01404571533203125,
0.034332275390625,
0.0265350341796875,
0.033782958984375,
-0.0283050537109375,
0.0035381317138671875,
0.019927978515625,
0.039154052734375,
-0.005535125732421875,
-0.004302978515625,
0.01544189453125,
-0.049713134765625,
-0.0130615234375,
0.004627227783203125,
0.01375579833984375,
-0.021728515625,
-0.0256195068359375,
-0.00859832763671875,
-0.0166778564453125,
-0.005641937255859375,
-0.002532958984375,
-0.0684814453125,
0.01800537109375,
0.00971221923828125,
0.04290771484375,
-0.0009179115295410156,
0.040557861328125,
-0.020904541015625,
-0.04132080078125,
0.050811767578125,
-0.0159759521484375,
-0.0537109375,
0.0284881591796875,
-0.01934814453125,
0.030303955078125,
0.0004987716674804688,
0.0799560546875,
0.0653076171875,
-0.0206146240234375,
0.047149658203125,
0.004840850830078125,
0.022369384765625,
-0.018463134765625,
0.026214599609375,
0.00746917724609375,
0.0173187255859375,
-0.08642578125,
-0.0146636962890625,
0.0010204315185546875,
0.0216217041015625,
-0.0217132568359375,
-0.055328369140625,
-0.0103759765625,
-0.00420379638671875,
-0.10968017578125,
-0.0615234375,
-0.034027099609375,
-0.0699462890625,
-0.015899658203125,
0.00016200542449951172,
-0.036041259765625,
0.01361846923828125,
0.0177001953125,
0.0140380859375,
0.0226898193359375,
-0.0008997917175292969,
-0.0865478515625,
-0.026092529296875,
-0.099609375,
-0.056793212890625,
-0.0178375244140625,
0.0115203857421875,
0.0012722015380859375,
0.0022602081298828125,
0.0031795501708984375,
-0.0311126708984375,
0.019287109375,
0.015533447265625,
-0.0118865966796875,
-0.0265045166015625,
-0.0239105224609375,
0.0052032470703125,
0.01175689697265625,
-0.00756072998046875,
0.053558349609375,
0.0323486328125,
-0.04156494140625,
0.014801025390625,
-0.0270233154296875,
-0.0377197265625,
0.028350830078125,
-0.0288543701171875,
0.003612518310546875,
-0.0014181137084960938,
0.036285400390625,
-0.042816162109375,
-0.0264892578125,
-0.01416015625,
-0.03070068359375,
0.03570556640625,
0.001434326171875,
0.004566192626953125,
-0.00733184814453125,
0.039276123046875,
0.0206298828125,
0.0048828125,
0.02783203125,
-0.0204010009765625,
0.03033447265625,
0.0010633468627929688,
0.01474761962890625,
-0.0301055908203125,
0.002719879150390625,
-0.026824951171875,
0.0103302001953125,
-0.00333404541015625,
0.0155792236328125,
0.01166534423828125,
-0.002643585205078125,
-0.0096435546875,
-0.036376953125,
0.0562744140625,
-0.0443115234375,
-0.0025119781494140625,
-0.0611572265625,
-0.0321044921875,
-0.034423828125,
0.07806396484375,
0.00921630859375,
-0.0229644775390625,
-0.0170440673828125,
0.0094757080078125,
-0.03753662109375,
-0.07672119140625,
-0.01531219482421875,
-0.0012807846069335938,
-0.093505859375,
-0.006381988525390625,
-0.0232086181640625,
-0.034759521484375,
-0.003421783447265625,
0.042755126953125,
-0.049285888671875,
-0.032318115234375,
0.0341796875,
-0.0394287109375,
0.01308441162109375,
0.036346435546875,
-0.005176544189453125,
0.017242431640625,
-0.0400390625,
-0.01232147216796875,
-0.03887939453125,
-0.0231170654296875,
0.03741455078125,
0.01812744140625,
0.00743865966796875,
-0.0662841796875,
0.00627899169921875,
0.036590576171875,
0.00806427001953125,
0.024688720703125,
-0.017242431640625,
0.00595855712890625,
-0.003208160400390625,
-0.042999267578125,
-0.013519287109375,
-0.0265960693359375,
-0.00960540771484375,
0.007083892822265625,
-0.0230560302734375,
0.000789642333984375,
-0.022552490234375,
-0.0201263427734375,
0.022216796875,
-0.025970458984375,
-0.07666015625,
-0.012359619140625,
-0.0102081298828125,
0.0141143798828125,
-0.031982421875,
0.0088348388671875,
-0.0087432861328125,
-0.08929443359375,
0.037567138671875,
0.00295257568359375,
-0.002529144287109375,
-0.004451751708984375,
0.04449462890625,
0.01335906982421875,
-0.0237274169921875,
-0.016357421875,
0.0266571044921875,
0.056060791015625,
0.004329681396484375,
0.035858154296875,
0.0352783203125,
-0.01551055908203125,
0.0212554931640625,
0.0240325927734375,
-0.01678466796875,
-0.017303466796875,
0.0216827392578125,
0.0101776123046875,
-0.0157623291015625,
0.01053619384765625,
-0.01180267333984375,
0.035614013671875,
0.0056915283203125,
-0.057159423828125,
0.013885498046875,
-0.04205322265625,
0.039764404296875,
-0.048248291015625,
0.061279296875,
-0.029998779296875,
-0.036590576171875,
0.0258941650390625,
-0.00921630859375,
0.0167388916015625,
0.0134429931640625,
0.004119873046875,
0.018218994140625,
0.0018606185913085938,
-0.01030731201171875,
0.034454345703125,
0.039703369140625,
0.01397705078125,
0.0335693359375,
-0.007358551025390625,
-0.0255126953125,
0.004169464111328125,
-0.01406097412109375,
0.06085205078125,
-0.0129241943359375,
-0.03155517578125,
-0.0014429092407226562,
-0.026824951171875,
0.00812530517578125,
0.02813720703125,
-0.037872314453125,
0.013153076171875,
0.031219482421875,
0.00044345855712890625,
-0.0069732666015625,
-0.006221771240234375,
-0.030364990234375,
-0.027099609375,
0.040679931640625,
0.026641845703125,
-0.0055389404296875,
0.0236663818359375,
0.0850830078125,
0.0303497314453125,
0.03594970703125,
-0.032073974609375,
0.027740478515625,
0.0018587112426757812,
0.048828125,
0.005420684814453125,
0.0007481575012207031,
-0.0020751953125,
0.01087188720703125,
-0.0101776123046875,
-0.036102294921875,
-0.0011968612670898438,
0.026336669921875,
0.0655517578125,
0.028717041015625,
-0.00646209716796875,
-0.0113983154296875,
-0.02862548828125,
-0.043487548828125,
0.06378173828125,
0.06781005859375,
-0.041168212890625,
-0.01471710205078125,
0.004791259765625,
0.0014019012451171875,
0.01209259033203125,
-0.023284912109375,
0.001888275146484375,
-0.024688720703125,
0.032806396484375,
0.0035858154296875,
-0.01050567626953125,
0.0252532958984375,
0.0087432861328125,
-0.006317138671875,
-0.025787353515625,
0.01076507568359375,
0.03936767578125,
0.007396697998046875,
-0.039794921875,
-0.03143310546875,
0.059967041015625,
0.0232696533203125,
0.0205535888671875,
0.0017576217651367188,
-0.0309906005859375,
0.0018281936645507812,
-0.00518035888671875,
0.06488037109375,
0.0187530517578125,
-0.03240966796875,
0.008209228515625,
-0.033538818359375,
0.00933074951171875,
0.044097900390625,
0.0015115737915039062,
-0.005344390869140625,
-0.027374267578125,
0.00843048095703125,
0.002651214599609375,
0.00919342041015625,
0.0169219970703125,
0.00966644287109375,
0.0308074951171875,
-0.0015773773193359375,
0.069091796875,
0.0059967041015625,
0.091796875,
-0.040252685546875,
0.0472412109375,
0.00299072265625,
0.0264892578125,
-0.039215087890625,
-0.0081329345703125,
-0.001255035400390625,
-0.0255279541015625,
-0.006397247314453125,
-0.0042877197265625,
0.016845703125,
-0.004436492919921875,
0.00817108154296875,
0.01116943359375,
-0.03948974609375,
0.00556182861328125,
0.01515960693359375,
-0.0291748046875,
0.01168060302734375,
0.0059051513671875,
-0.0274658203125,
-0.021881103515625,
-0.00923919677734375,
0.0055389404296875,
-0.03033447265625,
-0.0046539306640625,
0.0024166107177734375,
-0.0029144287109375,
-0.0118560791015625,
0.02764892578125,
-0.047393798828125,
0.0372314453125,
0.1455078125,
0.042755126953125,
0.089599609375,
0.056549072265625,
0.036285400390625,
0.054473876953125,
0.0158233642578125,
-0.0177764892578125,
-0.00237274169921875,
0.027130126953125,
0.00555419921875,
-0.00542449951171875,
0.0303192138671875,
-0.006839752197265625,
0.005275726318359375,
0.038787841796875,
0.06781005859375,
-0.0474853515625,
0.00724029541015625,
0.0201416015625,
-0.00003319978713989258,
0.034820556640625,
0.0298309326171875,
-0.04046630859375,
-0.0221405029296875,
0.027069091796875,
-0.08087158203125,
0.0008053779602050781,
0.017974853515625,
-0.00218963623046875,
0.0021343231201171875,
-0.01287841796875,
0.05804443359375,
-0.004974365234375,
-0.0241241455078125,
-0.01485443115234375,
0.00519561767578125,
-0.004169464111328125,
-0.0273590087890625,
-0.0070037841796875,
0.01410675048828125,
-0.01025390625,
-0.06793212890625,
0.0201263427734375,
-0.0237274169921875,
0.0020599365234375,
0.00952911376953125,
-0.0026836395263671875,
0.0236358642578125,
0.045501708984375,
-0.0193634033203125,
0.0093536376953125,
0.0091094970703125,
-0.016998291015625,
0.048675537109375,
-0.022186279296875,
-0.0264739990234375,
0.02691650390625,
-0.007236480712890625,
-0.00310516357421875,
-0.00399017333984375,
-0.0012693405151367188,
-0.00957489013671875,
-0.00476837158203125,
0.08746337890625,
-0.00846099853515625,
-0.042388916015625,
0.0199432373046875,
-0.017547607421875,
-0.01104736328125,
-0.0081329345703125,
-0.0186767578125,
-0.040679931640625,
0.005908966064453125,
-0.01453399658203125,
-0.01233673095703125,
-0.0155487060546875,
-0.04193115234375,
-0.0570068359375,
0.068603515625,
-0.020416259765625,
0.042022705078125,
0.0278778076171875,
0.0182952880859375,
-0.01474761962890625,
-0.005252838134765625,
-0.0364990234375,
0.03814697265625,
0.0275726318359375,
0.0028018951416015625,
-0.05889892578125,
-0.001331329345703125,
-0.024993896484375,
0.0142364501953125,
0.06561279296875,
0.0210113525390625,
-0.061431884765625,
-0.040008544921875,
0.0097503662109375,
0.0401611328125,
0.0074005126953125,
0.05328369140625,
0.054595947265625,
0.076171875,
0.09161376953125,
-0.03387451171875,
0.033477783203125,
-0.01123809814453125,
0.0478515625,
0.08349609375,
0.016204833984375,
0.01678466796875,
0.048980712890625,
-0.032989501953125,
-0.03424072265625,
0.0174102783203125,
0.043853759765625,
-0.08709716796875,
-0.01580810546875,
0.0191802978515625,
0.0176544189453125,
-0.048675537109375,
-0.0288848876953125,
-0.0208587646484375,
0.039398193359375,
0.0219268798828125,
-0.00745391845703125,
0.0058746337890625,
0.0118560791015625,
0.0273895263671875,
-0.00286102294921875,
-0.007579803466796875,
0.03985595703125,
-0.0020618438720703125,
0.07293701171875,
0.05560302734375,
0.031585693359375,
-0.00659942626953125,
0.006500244140625,
0.0286712646484375,
0.06915283203125,
-0.05108642578125,
-0.010223388671875,
0.0142974853515625,
0.0272369384765625,
0.0004189014434814453,
-0.022064208984375,
0.0131378173828125,
0.02508544921875,
0.03778076171875,
-0.014984130859375,
-0.00530242919921875,
0.036712646484375,
0.039306640625,
0.0030727386474609375,
-0.033172607421875,
-0.0283050537109375,
-0.004974365234375,
-0.03631591796875,
-0.0152130126953125,
0.01313018798828125,
0.040496826171875,
0.041656494140625,
0.01490020751953125,
-0.00852203369140625,
-0.00794219970703125,
-0.00086212158203125,
0.02386474609375,
-0.025848388671875,
0.01031494140625,
-0.0196075439453125,
-0.05615234375,
-0.0018072128295898438,
0.0369873046875,
0.0239410400390625,
0.0255279541015625,
0.036865234375,
0.003131866455078125,
-0.033966064453125,
0.0018100738525390625,
-0.01103973388671875,
-0.0280914306640625,
0.042449951171875,
-0.03704833984375,
0.006328582763671875,
-0.03692626953125,
-0.022308349609375,
-0.0186767578125,
0.01250457763671875,
-0.007568359375,
-0.035858154296875,
0.0204620361328125,
0.0074462890625,
0.01351165771484375,
0.02923583984375,
-0.01238250732421875,
-0.030426025390625,
-0.0316162109375,
-0.032745361328125,
-0.00594329833984375,
-0.0018587112426757812,
-0.0438232421875,
0.004352569580078125,
0.0411376953125,
-0.02734375,
0.021209716796875,
-0.035186767578125,
0.0188446044921875,
-0.008056640625,
-0.0184326171875,
0.0015163421630859375,
0.033355712890625,
0.020721435546875,
0.0308990478515625,
-0.0265350341796875,
-0.025970458984375,
-0.0302276611328125,
0.0467529296875,
0.0292510986328125,
0.063232421875,
-0.038543701171875,
0.039764404296875,
-0.0028228759765625,
0.0528564453125,
-0.0714111328125,
-0.004276275634765625,
-0.0242156982421875,
-0.04241943359375,
0.0279083251953125,
0.0146026611328125,
-0.0201568603515625,
0.05218505859375,
0.032470703125,
-0.036468505859375,
0.0362548828125,
-0.00989532470703125,
-0.0009794235229492188,
-0.02581787109375,
0.02301025390625,
-0.024566650390625,
-0.0245819091796875,
-0.03375244140625,
-0.0157928466796875,
0.0240325927734375,
0.03912353515625,
0.0296478271484375,
0.034515380859375,
-0.002620697021484375,
-0.00710296630859375,
0.02362060546875,
-0.035430908203125,
0.055633544921875,
0.050384521484375,
-0.07904052734375,
-0.00797271728515625,
0.0280609130859375,
0.0008196830749511719,
0.00926971435546875,
0.033599853515625,
0.02313232421875,
0.033050537109375,
0.03955078125,
-0.017608642578125,
-0.034027099609375,
0.03741455078125,
0.007045745849609375,
0.023712158203125,
-0.0394287109375,
0.02618408203125,
-0.007297515869140625,
0.0161590576171875,
-0.016326904296875,
-0.0487060546875,
-0.0182037353515625,
-0.00019216537475585938,
-0.036285400390625,
-0.035400390625,
-0.0167236328125,
-0.00592041015625,
0.0155029296875,
-0.005916595458984375,
-0.034515380859375,
0.0123748779296875,
-0.0174560546875,
0.033782958984375,
-0.033538818359375,
0.006870269775390625,
0.00438690185546875,
0.039764404296875,
-0.03277587890625,
0.01226806640625,
-0.0269012451171875,
-0.02288818359375,
-0.0188446044921875,
0.0286712646484375,
0.05322265625,
-0.031707763671875,
-0.04144287109375,
-0.00463104248046875,
0.01010894775390625,
0.054046630859375,
-0.01031494140625,
-0.00905609130859375,
-0.007045745849609375,
0.04302978515625,
-0.0210113525390625,
-0.08099365234375,
-0.00414276123046875,
-0.0180511474609375,
0.0198211669921875,
-0.0008435249328613281,
0.01062774658203125,
0.043914794921875,
-0.0257415771484375,
-0.06622314453125,
0.009979248046875,
-0.009185791015625,
-0.04364013671875,
-0.011962890625,
-0.017669677734375,
0.0059967041015625,
0.02227783203125,
0.01137542724609375,
-0.035797119140625,
-0.0716552734375,
-0.0012607574462890625,
0.0138397216796875,
0.060577392578125,
0.003215789794921875,
0.0201416015625,
-0.027923583984375,
0.037322998046875,
0.0022144317626953125,
0.0345458984375,
0.0099334716796875,
-0.0219879150390625,
0.03472900390625,
0.0260772705078125,
-0.03485107421875,
-0.004169464111328125,
0.00211334228515625,
-0.006763458251953125,
-0.00710296630859375,
-0.08697509765625,
-0.018310546875,
-0.031402587890625,
0.07537841796875,
0.01149749755859375,
0.0098419189453125,
-0.032012939453125,
-0.00830078125,
-0.02862548828125,
-0.082275390625,
-0.0108642578125,
0.054595947265625,
-0.0716552734375,
0.0162506103515625,
0.01129150390625,
-0.007472991943359375,
-0.01108551025390625,
-0.0003452301025390625,
-0.032623291015625,
-0.00667572021484375,
-0.0160064697265625,
-0.003459930419921875,
-0.041168212890625,
0.006435394287109375,
0.07403564453125,
-0.04681396484375,
-0.004489898681640625,
0.006992340087890625,
0.00844573974609375,
0.037872314453125,
-0.024139404296875,
0.0125885009765625,
0.03607177734375,
-0.028106689453125,
-0.0012712478637695312,
0.0239410400390625,
0.01021575927734375,
-0.015533447265625,
-0.0191650390625,
-0.02337646484375,
0.01506805419921875,
-0.006801605224609375,
0.00039887428283691406,
0.0258026123046875,
0.009124755859375,
-0.00423431396484375,
0.0791015625,
0.00092315673828125,
0.07513427734375,
0.00884246826171875,
0.047027587890625,
-0.00429534912109375,
-0.021820068359375,
0.0193634033203125,
-0.046844482421875,
-0.008758544921875,
-0.005680084228515625,
-0.0208587646484375,
-0.02740478515625,
-0.0240325927734375,
-0.00861358642578125,
0.005382537841796875,
0.0022945404052734375
]
|
9d34b289de82147253f5b06e1eb1128852f3307f | Wordpress Stackexchange
Q: Disable media library tab for non admins in uploader screen I am developing a plugin in which i am required to allow front end users to upload media, which I am able to do. But I don't want to let them sneak into media library which comes as tab with uploader screen.
I tried the following
function remove_medialibrary_tab($tabs) {
if ( !current_user_can( 'administrator' ) ) {
unset($tabs['library']);
return $tabs;
}
else
{
return $tabs;
}
}
add_filter('media_upload_tabs','remove_medialibrary_tab');
But seems this filter is deprecated and doesn't works anymore.
A: This function will not show media library tab in upload screen
function remove_medialibrary_tab($strings) {
if ( !current_user_can( 'administrator' ) ) {
unset($strings["mediaLibraryTitle"]);
return $strings;
}
else
{
return $strings;
}
}
add_filter('media_view_strings','remove_medialibrary_tab');
I found out that switching to media library tab actually call this ajax action query-attachments. So i added another callback function to this action with top priority, which checks if user is not admin , the action halts right there. This did the trick for me :)
function restrict_non_Admins(){
if(!current_user_can('administrator')){
exit;
}
}
add_action('wp_ajax_query-attachments','restrict_non_Admins',1);
add_action('wp_ajax_nopriv_query-attachments','restrict_non_Admins',1);
| Q: Disable media library tab for non admins in uploader screen I am developing a plugin in which i am required to allow front end users to upload media, which I am able to do. But I don't want to let them sneak into media library which comes as tab with uploader screen.
I tried the following
function remove_medialibrary_tab($tabs) {
if ( !current_user_can( 'administrator' ) ) {
unset($tabs['library']);
return $tabs;
}
else
{
return $tabs;
}
}
add_filter('media_upload_tabs','remove_medialibrary_tab');
But seems this filter is deprecated and doesn't works anymore.
A: This function will not show media library tab in upload screen
function remove_medialibrary_tab($strings) {
if ( !current_user_can( 'administrator' ) ) {
unset($strings["mediaLibraryTitle"]);
return $strings;
}
else
{
return $strings;
}
}
add_filter('media_view_strings','remove_medialibrary_tab');
I found out that switching to media library tab actually call this ajax action query-attachments. So i added another callback function to this action with top priority, which checks if user is not admin , the action halts right there. This did the trick for me :)
function restrict_non_Admins(){
if(!current_user_can('administrator')){
exit;
}
}
add_action('wp_ajax_query-attachments','restrict_non_Admins',1);
add_action('wp_ajax_nopriv_query-attachments','restrict_non_Admins',1);
A: The function media_upload_tabs() is not deprecated. It is called only by the_media_upload_tabs() (perfect naming, I know), which as well is only called once by media_upload_header()...
Edit - Just tested the filter with a plugin and while it's working and a var_dump( $tabs ) in an attached callback spits out the tabs, it doesn't do anything. The reason seems to be that all this now is generated by backbone and underscore templates with JavaScript. The file responsible for all the templates is ~/wp-includes/media-template.php. From a search through that, there's no filter to alter the output. Basically it's just one massive PHP function named wp_print_media_templates() that wraps all the templates and that has some actions before and after different templates.
I just tried to console.log() the wp object and found wp.media.view which seems to hold ... something. ~/wp-includes/js/media-modals.js seems to be the root of all that JavaScript generated UI. Now when I dig deeper, I find wp.template that gets "underscore-extended" into wp.media.template. Then I found the reference to ~/wp-includes/js/wp-util.js which then explains, that the argument for that JS function is an #id that is prefixed by tmpl-.
Now that only is a wrapper for _.memoize() which adds a custom callback "saves" computed results to "speed things up"... a bit. The contents are just a bunch of Regex-es that then get pushed to a function named compiled(), which just is (again) a wrapper for
_.template( $( '#tmpl-' + id ).html(), null, options )
.. ok. There's as well stuff from ~/wp-includes/js/media-views.js and ~/wp-includes/js/media-models.js involved and as I know close to nothing about Backbone anymore, I got no clue how to proceed from there. I'll leave my debugging plugin for this answer as well as the answer as starting point for others here.
<?php
defined( 'ABSPATH' ) or exit;
/**
* Plugin Name: (#125669) Media Upload Tabs by role
* Description: Removes media upload tabs on a by-role base.
*/
add_action( 'admin_footer', 'wpse125669MediaUploadTabsRemove', 0 );
function wpse125669MediaUploadTabsRemove()
{
if ( "edit.php" !== get_current_screen()->parent_file )
return;
?>
<script type="text/javascript">
console.log( wp.media );
</script>
<?php
}
A: function restrict_media_library() {
if( !current_user_can('manage_options') ) {
wp_die( __('You are not allowed to access this page.') );
}
}
add_action('admin_init', 'restrict_media_library');
function restrict_frontend_upload() {
if( !current_user_can('manage_options') ) {
remove_action( 'media_buttons', 'media_buttons' );
}
}
add_action('init', 'restrict_frontend_upload');
This code uses the current_user_can function to check if the current user has the 'manage_options' capability, which is typically only assigned to administrators. If the user is not an administrator, the wp_die function is used to stop execution of the page and display a message indicating that the user is not allowed to access the page. The second function uses the remove_action function to remove the media_buttons action, which is responsible for displaying the media button in the editor, if the current user is not an administrator.
| wordpress | {
"language": "en",
"length": 641,
"provenance": "stackexchange_00019.jsonl.gz:439917",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125669"
} | [
0.09405517578125,
0.001636505126953125,
0.0240020751953125,
-0.034576416015625,
0.032684326171875,
-0.04248046875,
0.04937744140625,
-0.026824951171875,
0.044708251953125,
0.0252227783203125,
0.020172119140625,
-0.03875732421875,
0.0030956268310546875,
-0.039947509765625,
-0.04376220703125,
-0.01788330078125,
0.0276641845703125,
-0.00882720947265625,
0.0251617431640625,
-0.01271820068359375,
0.00786590576171875,
0.006988525390625,
0.0233612060546875,
0.0379638671875,
-0.035552978515625,
0.026702880859375,
0.035552978515625,
-0.0162200927734375,
-0.0214996337890625,
-0.027923583984375,
-0.0083465576171875,
0.028228759765625,
-0.0061187744140625,
0.03790283203125,
-0.0293121337890625,
-0.006694793701171875,
0.029327392578125,
0.0130767822265625,
0.032470703125,
-0.01036834716796875,
0.041107177734375,
-0.0092010498046875,
-0.04766845703125,
0.028717041015625,
-0.043182373046875,
-0.0297393798828125,
0.0221710205078125,
0.006195068359375,
0.0428466796875,
0.033111572265625,
-0.0140380859375,
-0.036651611328125,
-0.003406524658203125,
-0.041717529296875,
-0.017364501953125,
-0.021759033203125,
0.0048065185546875,
-0.03167724609375,
0.01342010498046875,
0.05194091796875,
0.0003190040588378906,
0.00521087646484375,
-0.0025234222412109375,
-0.053619384765625,
-0.010162353515625,
-0.011871337890625,
-0.00803375244140625,
0.02374267578125,
-0.05108642578125,
-0.0230255126953125,
0.02606201171875,
-0.0272369384765625,
0.02862548828125,
-0.0139617919921875,
0.0015201568603515625,
-0.00579833984375,
-0.0094451904296875,
-0.006275177001953125,
0.021240234375,
-0.01229095458984375,
0.0005178451538085938,
0.00044083595275878906,
-0.054229736328125,
0.01029205322265625,
0.0207977294921875,
0.061309814453125,
-0.0113677978515625,
-0.038970947265625,
-0.0009822845458984375,
0.0210113525390625,
-0.019744873046875,
-0.019073486328125,
0.050048828125,
0.019073486328125,
-0.0288543701171875,
0.0007314682006835938,
0.082763671875,
0.09674072265625,
-0.0179901123046875,
-0.040313720703125,
0.031280517578125,
-0.05523681640625,
-0.042144775390625,
-0.0085601806640625,
0.023193359375,
0.034820556640625,
-0.0283203125,
-0.052398681640625,
0.027435302734375,
0.01654052734375,
-0.00921630859375,
0.016204833984375,
0.00734710693359375,
-0.011260986328125,
-0.00457000732421875,
-0.023590087890625,
-0.036224365234375,
0.01436614990234375,
-0.0080108642578125,
-0.036712646484375,
-0.039337158203125,
0.00127410888671875,
-0.0548095703125,
-0.02081298828125,
0.04144287109375,
-0.007465362548828125,
-0.005218505859375,
0.04742431640625,
-0.0052337646484375,
0.04193115234375,
-0.0160369873046875,
-0.0167236328125,
0.01436614990234375,
0.0301513671875,
0.01143646240234375,
-0.017547607421875,
0.0271759033203125,
-0.00023281574249267578,
0.01885986328125,
-0.0135040283203125,
0.0255889892578125,
-0.01230621337890625,
-0.018310546875,
0.0177764892578125,
0.01123809814453125,
0.0521240234375,
0.00626373291015625,
-0.0201873779296875,
0.002716064453125,
-0.0579833984375,
0.0009469985961914062,
-0.051116943359375,
0.036468505859375,
0.01556396484375,
-0.0297393798828125,
-0.0129852294921875,
0.041717529296875,
-0.0211334228515625,
-0.03033447265625,
-0.045806884765625,
0.03802490234375,
0.004787445068359375,
0.021270751953125,
-0.0239715576171875,
-0.0257720947265625,
-0.0166168212890625,
-0.0782470703125,
-0.0081787109375,
0.032501220703125,
0.04095458984375,
0.01392364501953125,
-0.039947509765625,
0.038848876953125,
0.0020885467529296875,
-0.02154541015625,
0.00850677490234375,
0.0186309814453125,
0.052581787109375,
0.018951416015625,
-0.01458740234375,
-0.026031494140625,
-0.034454345703125,
0.096923828125,
-0.049652099609375,
-0.04119873046875,
0.031463623046875,
0.00466156005859375,
0.019134521484375,
0.0177459716796875,
-0.0027408599853515625,
0.050750732421875,
0.02655029296875,
0.03033447265625,
-0.052581787109375,
-0.0004546642303466797,
-0.0665283203125,
-0.010101318359375,
-0.03753662109375,
-0.01273345947265625,
0.0806884765625,
0.078125,
0.017059326171875,
-0.007160186767578125,
-0.0400390625,
-0.0675048828125,
-0.0191650390625,
-0.00521087646484375,
0.0175018310546875,
-0.0244140625,
0.041473388671875,
0.0289154052734375,
0.0261077880859375,
-0.060943603515625,
0.027099609375,
0.006694793701171875,
-0.037353515625,
-0.00659942626953125,
0.07366943359375,
0.005367279052734375,
0.052734375,
0.0028324127197265625,
-0.04144287109375,
0.021087646484375,
-0.02850341796875,
0.01497650146484375,
0.01221466064453125,
-0.01898193359375,
0.006103515625,
0.04632568359375,
0.01306915283203125,
0.042236328125,
0.0222015380859375,
0.04217529296875,
0.00786590576171875,
-0.033294677734375,
-0.0222930908203125,
-0.0340576171875,
-0.135498046875,
0.0105743408203125,
0.08697509765625,
0.0167694091796875,
0.050811767578125,
-0.0008764266967773438,
0.023529052734375,
0.052978515625,
-0.033447265625,
-0.001956939697265625,
0.0223541259765625,
-0.03167724609375,
-0.0038928985595703125,
-0.047515869140625,
0.0309906005859375,
0.05072021484375,
-0.004077911376953125,
-0.004421234130859375,
0.0465087890625,
-0.01187896728515625,
-0.01381683349609375,
0.01401519775390625,
-0.01074981689453125,
0.00390625,
0.0225830078125,
-0.0081024169921875,
0.005413055419921875,
0.01273345947265625,
0.0017347335815429688,
0.0207672119140625,
0.029937744140625,
-0.007526397705078125,
-0.010406494140625,
0.0081024169921875,
-0.01641845703125,
-0.0036220550537109375,
0.062286376953125,
0.08526611328125,
-0.0298004150390625,
-0.045501708984375,
-0.029693603515625,
0.0158233642578125,
0.0286865234375,
-0.019927978515625,
0.0211639404296875,
-0.031097412109375,
-0.0197296142578125,
0.002552032470703125,
-0.03387451171875,
-0.007354736328125,
-0.0308837890625,
-0.03558349609375,
-0.07025146484375,
-0.0138092041015625,
0.01849365234375,
-0.01531982421875,
0.022796630859375,
-0.02880859375,
-0.03143310546875,
0.006137847900390625,
-0.0263214111328125,
0.027435302734375,
-0.0196075439453125,
0.08782958984375,
0.06854248046875,
-0.01345062255859375,
0.01401519775390625,
0.0170745849609375,
-0.0325927734375,
0.0022296905517578125,
0.0255279541015625,
0.00585174560546875,
-0.0055389404296875,
-0.027496337890625,
0.037933349609375,
0.00342559814453125,
-0.044189453125,
-0.004520416259765625,
-0.03515625,
-0.032318115234375,
-0.0264434814453125,
-0.07122802734375,
0.0018291473388671875,
-0.0267791748046875,
-0.05999755859375,
0.0190277099609375,
0.002780914306640625,
-0.025115966796875,
-0.0197601318359375,
0.0443115234375,
0.01503753662109375,
-0.0256500244140625,
0.01529693603515625,
0.024932861328125,
0.0169830322265625,
-0.0004870891571044922,
0.01154327392578125,
0.00730133056640625,
-0.003398895263671875,
0.0005826950073242188,
0.051544189453125,
-0.00897216796875,
-0.061187744140625,
-0.00011366605758666992,
-0.0268707275390625,
-0.00012612342834472656,
0.01439666748046875,
0.0191497802734375,
-0.0173797607421875,
-0.040740966796875,
0.0197906494140625,
0.011474609375,
0.01041412353515625,
-0.0198211669921875,
-0.00946044921875,
0.015960693359375,
-0.0267791748046875,
0.0150909423828125,
0.017791748046875,
-0.0289764404296875,
-0.017242431640625,
-0.003887176513671875,
-0.053741455078125,
0.00798797607421875,
-0.00366973876953125,
-0.00772857666015625,
0.03875732421875,
-0.009124755859375,
-0.029083251953125,
0.027130126953125,
0.005245208740234375,
0.0302276611328125,
0.030609130859375,
-0.0094451904296875,
-0.0147705078125,
0.00595855712890625,
0.0110931396484375,
0.042510986328125,
-0.0026988983154296875,
0.038299560546875,
-0.00835418701171875,
-0.019927978515625,
0.0037059783935546875,
0.00571441650390625,
0.0069580078125,
-0.0101165771484375,
0.0070648193359375,
0.0002378225326538086,
0.0221710205078125,
-0.046600341796875,
-0.0009102821350097656,
-0.028167724609375,
0.00659942626953125,
-0.0244293212890625,
0.031768798828125,
-0.0760498046875,
-0.01486968994140625,
-0.045867919921875,
0.015899658203125,
0.0027103424072265625,
-0.0712890625,
-0.0127716064453125,
-0.0010690689086914062,
-0.02197265625,
-0.0143890380859375,
-0.011627197265625,
-0.0249176025390625,
-0.027801513671875,
-0.01983642578125,
-0.042388916015625,
-0.0135650634765625,
0.0230712890625,
-0.01107025146484375,
0.01036834716796875,
0.0031528472900390625,
-0.016632080078125,
-0.01358795166015625,
-0.025634765625,
-0.0179901123046875,
-0.1356201171875,
-0.0216217041015625,
-0.017364501953125,
0.0977783203125,
-0.0039825439453125,
0.024566650390625,
-0.058746337890625,
0.04425048828125,
0.020355224609375,
-0.01861572265625,
0.00809478759765625,
-0.0166473388671875,
0.032470703125,
-0.0002810955047607422,
-0.00691986083984375,
-0.005313873291015625,
-0.00489044189453125,
-0.0178070068359375,
-0.030792236328125,
-0.00264739990234375,
-0.0295562744140625,
-0.006420135498046875,
-0.0012350082397460938,
-0.023773193359375,
-0.0931396484375,
-0.03912353515625,
-0.03460693359375,
-0.03460693359375,
-0.0244140625,
-0.0108489990234375,
-0.0163116455078125,
-0.068603515625,
0.03326416015625,
0.00899505615234375,
-0.0298614501953125,
0.004528045654296875,
0.0154571533203125,
0.01554107666015625,
-0.0148468017578125,
-0.055450439453125,
0.024017333984375,
0.047637939453125,
-0.007198333740234375,
0.0183563232421875,
0.0267333984375,
-0.046295166015625,
0.04083251953125,
0.00777435302734375,
0.0187835693359375,
-0.01387786865234375,
0.0038585662841796875,
0.0146942138671875,
-0.0267486572265625,
0.0230865478515625,
0.0210723876953125,
-0.016204833984375,
-0.03887939453125,
-0.00777435302734375,
0.0066680908203125,
-0.0145111083984375,
0.002483367919921875,
0.0228118896484375,
0.02520751953125,
-0.005695343017578125,
-0.0604248046875,
0.0181427001953125,
-0.0164642333984375,
0.0212554931640625,
-0.0178985595703125,
0.00678253173828125,
0.01509857177734375,
0.008697509765625,
0.0018711090087890625,
0.0009245872497558594,
0.039398193359375,
-0.041778564453125,
0.04144287109375,
-0.00579071044921875,
-0.034149169921875,
-0.0294036865234375,
0.00879669189453125,
-0.00406646728515625,
-0.031646728515625,
-0.039031982421875,
-0.045684814453125,
-0.004581451416015625,
0.0288238525390625,
0.0261688232421875,
-0.001224517822265625,
0.0227508544921875,
0.001277923583984375,
-0.01302337646484375,
-0.00024139881134033203,
0.0062713623046875,
-0.0246734619140625,
-0.0286102294921875,
0.0513916015625,
0.018707275390625,
0.0065460205078125,
-0.0214691162109375,
0.09991455078125,
-0.00910186767578125,
0.0389404296875,
-0.01506805419921875,
0.05511474609375,
0.043365478515625,
-0.0017986297607421875,
0.01372528076171875,
0.00397491455078125,
-0.0038738250732421875,
-0.01078033447265625,
-0.00433349609375,
-0.030426025390625,
0.021575927734375,
0.0223541259765625,
0.0228271484375,
0.0152587890625,
-0.0172119140625,
-0.01213836669921875,
-0.055084228515625,
-0.034027099609375,
0.044830322265625,
-0.03643798828125,
-0.064697265625,
-0.056671142578125,
-0.0026493072509765625,
0.0374755859375,
-0.032806396484375,
-0.00717926025390625,
0.0174102783203125,
-0.00238800048828125,
0.0046539306640625,
0.04345703125,
-0.0633544921875,
0.0265045166015625,
0.045257568359375,
0.0060577392578125,
0.01250457763671875,
-0.0210418701171875,
-0.016448974609375,
-0.040496826171875,
-0.00394439697265625,
-0.0098876953125,
0.047882080078125,
-0.0299835205078125,
0.02606201171875,
-0.036102294921875,
0.00957489013671875,
-0.04718017578125,
0.006046295166015625,
0.054901123046875,
0.045013427734375,
-0.01947021484375,
-0.013153076171875,
-0.056427001953125,
-0.040771484375,
-0.050994873046875,
-0.05224609375,
-0.021575927734375,
-0.00397491455078125,
0.00606536865234375,
0.005718231201171875,
-0.0016222000122070312,
-0.0014362335205078125,
0.01103973388671875,
0.045501708984375,
0.0141143798828125,
0.048248291015625,
-0.016143798828125,
0.05169677734375,
0.0236053466796875,
0.047698974609375,
0.0265655517578125,
0.0269622802734375,
-0.0274658203125,
-0.021759033203125,
-0.02410888671875,
-0.08056640625,
-0.0037975311279296875,
0.034423828125,
-0.02105712890625,
0.037353515625,
0.007236480712890625,
0.009490966796875,
0.0107574462890625,
-0.0034008026123046875,
-0.002628326416015625,
-0.0330810546875,
-0.0157928466796875,
-0.01338958740234375,
0.032196044921875,
-0.037811279296875,
-0.0258331298828125,
0.048126220703125,
-0.020721435546875,
-0.0296173095703125,
0.065673828125,
-0.042694091796875,
0.06256103515625,
0.031646728515625,
-0.0085601806640625,
0.029388427734375,
0.08624267578125,
0.00020205974578857422,
0.0523681640625,
0.043548583984375,
0.01543426513671875,
0.042938232421875,
-0.0011768341064453125,
0.022186279296875,
-0.03167724609375,
0.04937744140625,
0.006633758544921875,
-0.00778961181640625,
0.054168701171875,
-0.031951904296875,
0.02496337890625,
0.035247802734375,
0.05499267578125,
-0.044769287109375,
-0.003841400146484375,
-0.007526397705078125,
-0.0299224853515625,
0.03533935546875,
-0.047271728515625,
0.0169219970703125,
-0.0279693603515625,
0.06597900390625,
0.00850677490234375,
-0.0460205078125,
-0.0006422996520996094,
-0.0294189453125,
-0.0170135498046875,
-0.003269195556640625,
0.04022216796875,
0.0219879150390625,
0.0254058837890625,
-0.03857421875,
-0.0176849365234375,
-0.01317596435546875,
0.0111846923828125,
0.037261962890625,
-0.0433349609375,
-0.006999969482421875,
-0.0301513671875,
-0.0196990966796875,
0.0012979507446289062,
-0.024688720703125,
0.0080413818359375,
0.00974273681640625,
0.007694244384765625,
0.051971435546875,
-0.01454925537109375,
0.00873565673828125,
0.018035888671875,
-0.037445068359375,
-0.01154327392578125,
-0.0224761962890625,
0.01421356201171875,
0.021636962890625,
-0.0031185150146484375,
0.0248565673828125,
-0.0045013427734375,
-0.034149169921875,
0.0034999847412109375,
0.00543975830078125,
0.022979736328125,
-0.007598876953125,
-0.0157623291015625,
0.0260467529296875,
0.020721435546875,
-0.0005545616149902344,
0.0110321044921875,
0.01532745361328125,
-0.03173828125,
-0.0307769775390625,
0.0003006458282470703,
-0.069580078125,
-0.0023746490478515625,
-0.0013294219970703125,
-0.05816650390625,
0.0748291015625,
0.0005478858947753906,
0.041046142578125,
0.0180206298828125,
0.0204620361328125,
-0.017181396484375,
-0.0011348724365234375,
-0.03106689453125,
0.0206146240234375,
-0.004840850830078125,
0.03973388671875,
-0.0418701171875,
-0.00595855712890625,
0.006122589111328125,
0.040985107421875,
0.0477294921875,
0.01396942138671875,
-0.02880859375,
-0.01136016845703125,
0.0058746337890625,
0.0430908203125,
-0.002223968505859375,
0.0302886962890625,
-0.00351715087890625,
0.01142120361328125,
0.037017822265625,
-0.039093017578125,
0.03387451171875,
-0.032318115234375,
-0.019744873046875,
0.0078582763671875,
0.026275634765625,
0.041229248046875,
-0.0223541259765625,
0.06903076171875,
0.0023479461669921875,
-0.0294036865234375,
0.03369140625,
-0.052520751953125,
-0.0045318603515625,
0.026702880859375,
-0.00033736228942871094,
-0.0212554931640625,
0.0274200439453125,
-0.040924072265625,
0.03826904296875,
-0.019805908203125,
-0.020965576171875,
0.01361083984375,
0.01390838623046875,
-0.046844482421875,
0.0014295578002929688,
-0.01149749755859375,
0.0123748779296875,
-0.0157470703125,
0.004146575927734375,
-0.0155029296875,
0.0122222900390625,
-0.04791259765625,
0.00032019615173339844,
0.01464080810546875,
0.01500701904296875,
-0.0139312744140625,
-0.053924560546875,
-0.00655364990234375,
-0.0107574462890625,
-0.00832366943359375,
0.0241241455078125,
-0.006824493408203125,
0.00787353515625,
0.050323486328125,
-0.014739990234375,
-0.00138092041015625,
-0.0175933837890625,
0.043914794921875,
-0.0076904296875,
0.0037326812744140625,
-0.0272369384765625,
-0.012359619140625,
-0.0193023681640625,
-0.0274810791015625,
0.00499725341796875,
0.0281524658203125,
0.023834228515625,
0.01007080078125,
-0.01103973388671875,
-0.0213165283203125,
-0.03173828125,
0.035003662109375,
-0.042388916015625,
0.03515625,
-0.06787109375,
-0.055023193359375,
0.00945281982421875,
0.047760009765625,
0.045318603515625,
0.0262603759765625,
0.006893157958984375,
0.0230712890625,
0.065673828125,
0.0270843505859375,
0.04718017578125,
0.0105133056640625,
-0.00740814208984375,
-0.03594970703125,
0.028594970703125,
0.00820159912109375,
0.00930023193359375,
0.016082763671875,
0.0308380126953125,
0.010009765625,
-0.0243682861328125,
-0.0017871856689453125,
-0.0003268718719482422,
-0.056671142578125,
0.0055694580078125,
0.00930023193359375,
0.064697265625,
0.0036296844482421875,
-0.0537109375,
0.0027332305908203125,
-0.0196533203125,
-0.037872314453125,
0.0211639404296875,
0.0306396484375,
-0.054046630859375,
0.05108642578125,
-0.027435302734375,
-0.0102386474609375,
-0.004669189453125,
-0.01448822021484375,
0.0280303955078125,
0.003963470458984375,
-0.017364501953125,
0.00022935867309570312,
0.022613525390625,
0.0198822021484375,
0.01023101806640625,
0.017364501953125,
0.0252532958984375,
0.08660888671875,
-0.034423828125,
0.01461029052734375,
-0.0135498046875,
0.009979248046875,
-0.04052734375,
0.0110321044921875,
-0.022796630859375,
-0.01125335693359375,
-0.0121612548828125,
0.0008635520935058594,
0.0139617919921875,
0.0262603759765625,
0.040069580078125,
-0.0189208984375,
-0.006977081298828125,
-0.001247406005859375,
0.01085662841796875,
0.00710296630859375,
0.0268096923828125,
-0.019561767578125,
-0.049530029296875,
-0.037078857421875,
0.01544189453125,
0.0096893310546875,
0.01438140869140625,
-0.0300445556640625,
0.0239105224609375,
-0.0098419189453125,
-0.01502227783203125,
-0.00000947713851928711,
0.00899505615234375,
-0.003810882568359375,
0.0263671875,
-0.04254150390625,
-0.0257415771484375,
-0.0269927978515625,
-0.0152435302734375,
-0.0075836181640625,
0.0126800537109375,
-0.00756072998046875,
0.01259613037109375,
-0.0379638671875,
-0.0156402587890625,
0.017486572265625,
-0.0026264190673828125,
-0.02801513671875,
-0.003803253173828125,
0.032501220703125,
-0.041839599609375,
-0.037994384765625,
-0.0216827392578125,
-0.022674560546875,
-0.03338623046875,
-0.011871337890625,
0.0287628173828125,
-0.032684326171875,
-0.048980712890625,
-0.0716552734375,
0.043212890625,
0.02783203125,
0.01568603515625,
-0.09619140625,
0.08251953125,
-0.03155517578125,
0.06915283203125,
-0.0198974609375,
0.061676025390625,
-0.040130615234375,
0.006542205810546875,
-0.033538818359375,
-0.068359375,
-0.033355712890625,
0.0911865234375,
-0.0309600830078125,
-0.0094757080078125,
0.0222320556640625,
-0.0055694580078125,
-0.006046295166015625,
-0.004161834716796875,
-0.017578125,
0.046142578125,
-0.01117706298828125,
-0.0172271728515625,
-0.0192108154296875,
0.0296783447265625,
0.002811431884765625,
0.005306243896484375,
-0.006198883056640625,
0.032501220703125,
-0.0257110595703125,
0.0216217041015625,
-0.016998291015625,
0.008209228515625,
-0.01349639892578125,
-0.01525115966796875,
0.00027680397033691406,
0.02484130859375,
-0.034271240234375,
0.002300262451171875,
0.042266845703125,
-0.00787353515625,
0.0279083251953125,
0.01702880859375,
-0.042327880859375,
0.01499176025390625,
-0.02838134765625,
0.0207977294921875,
-0.00839996337890625,
0.03265380859375,
0.0035400390625,
-0.058135986328125,
-0.0024623870849609375,
-0.00887298583984375,
0.0240325927734375,
-0.007320404052734375,
0.0097503662109375,
0.0264892578125,
0.020263671875,
-0.01727294921875,
0.045501708984375,
0.0201568603515625,
-0.006465911865234375,
-0.0275115966796875,
-0.01241302490234375,
-0.01227569580078125,
0.008819580078125,
0.074462890625,
0.0924072265625,
0.0120849609375,
-0.052337646484375,
0.006313323974609375,
0.00152587890625,
-0.00215911865234375,
-0.0011882781982421875,
0.007442474365234375,
-0.06402587890625,
-0.03253173828125,
0.01444244384765625,
0.019073486328125,
-0.0132598876953125,
-0.0223388671875,
-0.01505279541015625,
-0.0279998779296875,
0.030609130859375,
0.03912353515625,
-0.032440185546875,
-0.01165008544921875,
0.046539306640625,
-0.0408935546875,
-0.015350341796875,
0.01800537109375,
0.00566864013671875,
0.006404876708984375,
0.01209259033203125,
0.001171112060546875,
-0.00391387939453125,
-0.017333984375,
0.035888671875,
0.017242431640625,
0.0288848876953125,
-0.0292816162109375,
-0.0097198486328125,
0.0036182403564453125,
-0.006927490234375,
-0.002819061279296875,
-0.007503509521484375,
-0.004913330078125,
0.023345947265625,
-0.0180206298828125,
0.032440185546875,
-0.0435791015625,
0.0149993896484375,
-0.0290679931640625,
-0.01184844970703125,
0.0298919677734375,
0.01065826416015625,
0.0892333984375,
-0.007015228271484375,
-0.0015735626220703125,
0.028045654296875,
-0.00838470458984375,
-0.0411376953125,
0.01617431640625,
-0.0350341796875,
0.02655029296875,
0.015716552734375
]
|
fd999315ffd36fbef8922311ed3ff37a96f4ba7b | Wordpress Stackexchange
Q: how to know if admin is in edit page or post I use this after I checked if the user is admin
if ( isset($_GET['action']) && $_GET['action'] === 'edit' )
is there better way?
A: *
*Use 'get_current_screen', just make sure beforehand, it exists.
*As codex says "This function is defined on most admin pages, but not all."
*This btw also filters out normal (reader-facing) views (re-read that
sentence, with emphasis on admin pages).
*quite likely the next thing you want to figure out is, if you are actually on a page or post...
// Remove pointless post meta boxes
function FRANK_TWEAKS_current_screen() {
// "This function is defined on most admin pages, but not all."
if ( function_exists('get_current_screen')) {
$pt = get_current_screen()->post_type;
if ( $pt != 'post' && $pt != 'page') return;
remove_meta_box( 'authordiv',$pt ,'normal' ); // Author Metabox
remove_meta_box( 'commentstatusdiv',$pt ,'normal' ); // Comments Status Metabox
remove_meta_box( 'commentsdiv',$pt ,'normal' ); // Comments Metabox
remove_meta_box( 'postcustom',$pt ,'normal' ); // Custom Fields Metabox
remove_meta_box( 'postexcerpt',$pt ,'normal' ); // Excerpt Metabox
remove_meta_box( 'revisionsdiv',$pt ,'normal' ); // Revisions Metabox
remove_meta_box( 'slugdiv',$pt ,'normal' ); // Slug Metabox
remove_meta_box( 'trackbacksdiv',$pt ,'normal' ); // Trackback Metabox
}
}
add_action( 'current_screen', 'FRANK_TWEAKS_current_screen' );
| Q: how to know if admin is in edit page or post I use this after I checked if the user is admin
if ( isset($_GET['action']) && $_GET['action'] === 'edit' )
is there better way?
A: *
*Use 'get_current_screen', just make sure beforehand, it exists.
*As codex says "This function is defined on most admin pages, but not all."
*This btw also filters out normal (reader-facing) views (re-read that
sentence, with emphasis on admin pages).
*quite likely the next thing you want to figure out is, if you are actually on a page or post...
// Remove pointless post meta boxes
function FRANK_TWEAKS_current_screen() {
// "This function is defined on most admin pages, but not all."
if ( function_exists('get_current_screen')) {
$pt = get_current_screen()->post_type;
if ( $pt != 'post' && $pt != 'page') return;
remove_meta_box( 'authordiv',$pt ,'normal' ); // Author Metabox
remove_meta_box( 'commentstatusdiv',$pt ,'normal' ); // Comments Status Metabox
remove_meta_box( 'commentsdiv',$pt ,'normal' ); // Comments Metabox
remove_meta_box( 'postcustom',$pt ,'normal' ); // Custom Fields Metabox
remove_meta_box( 'postexcerpt',$pt ,'normal' ); // Excerpt Metabox
remove_meta_box( 'revisionsdiv',$pt ,'normal' ); // Revisions Metabox
remove_meta_box( 'slugdiv',$pt ,'normal' ); // Slug Metabox
remove_meta_box( 'trackbacksdiv',$pt ,'normal' ); // Trackback Metabox
}
}
add_action( 'current_screen', 'FRANK_TWEAKS_current_screen' );
A: You can use get_current_screen to determine this.
$screen = get_current_screen();
if ( $screen->parent_base == 'edit' ) {
echo 'edit screen';
}
I don't know if I exactly would say this is always better, it depends on what's needed, but it's probably the way I'd do it. The big benefit with this method is that you get access to more information and ergo can do more and different distinctions. Just take a look at the documentation to understand what I mean.
It should be used in later hooks, Codex says:
The function returns null if called from the admin_init hook. It
should be OK to use in a later hook such as current_screen.
A: Better way:
global variable $pagenow
global $pagenow;
if (( $pagenow == 'post.php' ) || (get_post_type() == 'post')) {
// editing a page
}
if ($pagenow == 'profile.php') {
// editing user profile page
}
source: https://wordpress.stackexchange.com/a/7281/33667
| wordpress | {
"language": "en",
"length": 347,
"provenance": "stackexchange_00019.jsonl.gz:439925",
"question_score": "25",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125692"
} | [
0.0396728515625,
0.0003414154052734375,
0.0016279220581054688,
-0.04119873046875,
0.01267242431640625,
-0.005611419677734375,
-0.0020275115966796875,
-0.0216827392578125,
0.0289154052734375,
0.026641845703125,
-0.0225982666015625,
-0.005649566650390625,
-0.0273590087890625,
-0.02130126953125,
-0.042694091796875,
-0.0098724365234375,
0.023895263671875,
0.00044846534729003906,
0.0179595947265625,
-0.0030155181884765625,
-0.0017900466918945312,
0.001079559326171875,
0.01611328125,
0.036041259765625,
-0.00415802001953125,
-0.08978271484375,
0.07501220703125,
0.0208587646484375,
-0.0125274658203125,
-0.0186004638671875,
0.006671905517578125,
0.0175018310546875,
-0.001949310302734375,
0.053619384765625,
-0.037811279296875,
0.02972412109375,
-0.01171112060546875,
0.0389404296875,
0.035247802734375,
-0.002918243408203125,
0.01385498046875,
0.00435638427734375,
-0.0269012451171875,
0.00377655029296875,
-0.040008544921875,
-0.02496337890625,
-0.0093536376953125,
-0.019317626953125,
0.041534423828125,
0.022735595703125,
-0.0008716583251953125,
-0.0017728805541992188,
0.006023406982421875,
-0.021759033203125,
-0.031402587890625,
-0.0283050537109375,
-0.0095672607421875,
-0.02093505859375,
0.037078857421875,
0.021514892578125,
-0.00214385986328125,
-0.01490020751953125,
0.006427764892578125,
-0.036407470703125,
-0.0265045166015625,
-0.0168304443359375,
-0.0352783203125,
0.0218658447265625,
-0.0167694091796875,
-0.00705718994140625,
0.0238037109375,
-0.0152740478515625,
0.01146697998046875,
-0.01030731201171875,
-0.025146484375,
-0.0181427001953125,
-0.0104522705078125,
-0.034759521484375,
0.0130157470703125,
-0.01163482666015625,
0.0167694091796875,
0.03924560546875,
-0.039215087890625,
0.0177001953125,
0.00983428955078125,
0.040924072265625,
-0.01346588134765625,
-0.043182373046875,
-0.04071044921875,
-0.046234130859375,
-0.040802001953125,
-0.11944580078125,
0.011871337890625,
-0.0225830078125,
-0.0283966064453125,
-0.03985595703125,
0.04046630859375,
0.07855224609375,
-0.024566650390625,
-0.04351806640625,
-0.0258941650390625,
-0.00594329833984375,
-0.07281494140625,
-0.01161956787109375,
0.0245208740234375,
0.052886962890625,
-0.0457763671875,
-0.038726806640625,
0.04278564453125,
0.030426025390625,
0.02264404296875,
-0.04779052734375,
-0.0305938720703125,
0.00824737548828125,
-0.047515869140625,
0.010894775390625,
-0.043670654296875,
-0.0257110595703125,
-0.037506103515625,
0.004573822021484375,
0.0091552734375,
0.0105438232421875,
0.0281219482421875,
-0.0594482421875,
0.0194244384765625,
-0.0213623046875,
-0.065185546875,
-0.00643157958984375,
-0.00897216796875,
0.0019502639770507812,
-0.035125732421875,
0.007587432861328125,
0.07379150390625,
0.027252197265625,
0.0011386871337890625,
-0.0096588134765625,
0.0081787109375,
-0.0180511474609375,
-0.004619598388671875,
0.01318359375,
-0.0236358642578125,
-0.029296875,
0.020294189453125,
-0.042266845703125,
-0.061859130859375,
0.02655029296875,
0.01206207275390625,
-0.00296783447265625,
-0.0171661376953125,
-0.076416015625,
-0.0266571044921875,
-0.045440673828125,
0.035003662109375,
0.0225067138671875,
0.0179443359375,
0.0156402587890625,
0.08447265625,
-0.031585693359375,
-0.054779052734375,
-0.04541015625,
0.05712890625,
-0.012176513671875,
-0.010284423828125,
-0.0012769699096679688,
-0.039642333984375,
0.0033435821533203125,
-0.04632568359375,
-0.014434814453125,
0.0143890380859375,
0.01187896728515625,
0.0262451171875,
-0.01267242431640625,
-0.0100250244140625,
0.009674072265625,
0.0005536079406738281,
0.005634307861328125,
0.009613037109375,
0.0472412109375,
0.00508880615234375,
0.01953125,
-0.0140228271484375,
-0.03558349609375,
0.034332275390625,
-0.031219482421875,
-0.0655517578125,
0.05096435546875,
0.006732940673828125,
0.037078857421875,
0.02099609375,
-0.007259368896484375,
0.0645751953125,
0.00902557373046875,
-0.00873565673828125,
-0.0257110595703125,
0.0233306884765625,
0.0028972625732421875,
0.01324462890625,
-0.0025691986083984375,
-0.00018334388732910156,
-0.0125732421875,
0.010894775390625,
0.019500732421875,
-0.01216888427734375,
0.00664520263671875,
-0.09576416015625,
0.0195159912109375,
-0.040771484375,
0.06341552734375,
-0.0204620361328125,
0.01363372802734375,
0.009979248046875,
-0.042938232421875,
-0.016937255859375,
0.045501708984375,
-0.002197265625,
-0.00803375244140625,
-0.01264190673828125,
0.02655029296875,
-0.0079345703125,
0.03076171875,
-0.019744873046875,
-0.0262298583984375,
-0.0249786376953125,
-0.0250244140625,
0.048187255859375,
0.022613525390625,
-0.0160675048828125,
-0.006816864013671875,
0.065185546875,
0.0142669677734375,
0.001316070556640625,
0.02337646484375,
0.002410888671875,
-0.00740814208984375,
-0.02398681640625,
-0.0006346702575683594,
0.000957489013671875,
-0.07171630859375,
0.002780914306640625,
0.05108642578125,
0.0306396484375,
0.02484130859375,
-0.0007729530334472656,
0.01123046875,
0.040557861328125,
-0.06890869140625,
-0.003879547119140625,
0.01073455810546875,
-0.0012598037719726562,
0.050689697265625,
-0.0465087890625,
0.030426025390625,
0.0209808349609375,
0.0144195556640625,
0.007537841796875,
0.030853271484375,
-0.02838134765625,
-0.01314544677734375,
0.03167724609375,
-0.0186309814453125,
0.00542449951171875,
-0.0206451416015625,
-0.0172119140625,
-0.00879669189453125,
0.0303955078125,
-0.003856658935546875,
0.049163818359375,
0.047332763671875,
-0.016143798828125,
-0.03302001953125,
0.01023101806640625,
0.051727294921875,
-0.00765228271484375,
0.0201568603515625,
0.044036865234375,
-0.011199951171875,
-0.039276123046875,
-0.00397491455078125,
-0.0076141357421875,
0.0161895751953125,
-0.033599853515625,
0.0222015380859375,
-0.0218048095703125,
-0.020599365234375,
-0.02032470703125,
-0.042205810546875,
0.0027904510498046875,
-0.0205230712890625,
0.02288818359375,
-0.0078887939453125,
0.02752685546875,
0.0009641647338867188,
-0.031890869140625,
0.058349609375,
0.0025501251220703125,
-0.0367431640625,
0.036468505859375,
-0.018310546875,
0.045928955078125,
-0.033294677734375,
0.0231170654296875,
0.037384033203125,
-0.0294952392578125,
0.0122222900390625,
-0.018096923828125,
-0.00630950927734375,
-0.049346923828125,
0.023223876953125,
-0.00200653076171875,
-0.0192718505859375,
-0.05322265625,
0.005462646484375,
0.00441741943359375,
0.002410888671875,
-0.0313720703125,
-0.06024169921875,
-0.0133209228515625,
-0.024169921875,
-0.082275390625,
-0.048675537109375,
-0.00519561767578125,
-0.044281005859375,
-0.0210418701171875,
-0.003963470458984375,
-0.0283203125,
0.0102386474609375,
0.0247802734375,
0.007904052734375,
-0.003330230712890625,
-0.01528167724609375,
-0.03253173828125,
-0.00930023193359375,
-0.034759521484375,
-0.0125579833984375,
-0.005298614501953125,
-0.004634857177734375,
-0.0082855224609375,
0.0955810546875,
0.004119873046875,
-0.05487060546875,
-0.0177764892578125,
-0.007701873779296875,
0.004932403564453125,
0.034088134765625,
-0.009918212890625,
0.00341033935546875,
0.024871826171875,
0.016754150390625,
-0.0146026611328125,
-0.0016183853149414062,
0.0234222412109375,
-0.0460205078125,
-0.033111572265625,
-0.01062774658203125,
-0.001434326171875,
0.0139923095703125,
0.032928466796875,
0.00942230224609375,
0.037353515625,
-0.0195159912109375,
-0.017364501953125,
0.041961669921875,
-0.005222320556640625,
0.02716064453125,
-0.031494140625,
-0.030181884765625,
0.04730224609375,
0.0291900634765625,
0.0682373046875,
0.053558349609375,
0.056121826171875,
0.0282745361328125,
-0.02886962890625,
-0.0013875961303710938,
0.0221405029296875,
-0.061981201171875,
0.016387939453125,
-0.0027332305908203125,
0.0208587646484375,
-0.004367828369140625,
0.029541015625,
-0.0038471221923828125,
0.006420135498046875,
-0.0272674560546875,
-0.01641845703125,
0.048736572265625,
0.0020904541015625,
0.007259368896484375,
-0.008758544921875,
-0.0162200927734375,
-0.00177001953125,
0.055999755859375,
-0.0811767578125,
-0.022003173828125,
0.013336181640625,
0.023040771484375,
-0.00940704345703125,
-0.00148773193359375,
-0.027557373046875,
-0.0167236328125,
-0.1187744140625,
0.0139007568359375,
0.01409912109375,
-0.059478759765625,
-0.0322265625,
0.036773681640625,
-0.1107177734375,
-0.029541015625,
0.048980712890625,
-0.0223236083984375,
-0.01322174072265625,
0.0232391357421875,
-0.0042572021484375,
-0.033538818359375,
-0.01511383056640625,
-0.011932373046875,
-0.0782470703125,
-0.004058837890625,
-0.0224609375,
0.06097412109375,
-0.0101165771484375,
0.01284027099609375,
-0.037353515625,
0.029571533203125,
0.02777099609375,
0.00035309791564941406,
0.017822265625,
-0.00852203369140625,
0.04132080078125,
-0.017547607421875,
0.0023479461669921875,
-0.0197906494140625,
-0.01332855224609375,
0.006244659423828125,
-0.01407623291015625,
0.02862548828125,
-0.0229034423828125,
-0.027252197265625,
0.0080413818359375,
-0.035797119140625,
-0.011749267578125,
-0.03515625,
-0.03924560546875,
0.00446319580078125,
-0.03326416015625,
0.0150604248046875,
-0.0309600830078125,
-0.044891357421875,
-0.046783447265625,
-0.015716552734375,
-0.05352783203125,
0.03448486328125,
0.000152587890625,
0.04449462890625,
0.01091766357421875,
0.016265869140625,
-0.034912109375,
0.036407470703125,
0.00033354759216308594,
0.031463623046875,
0.0408935546875,
-0.018310546875,
0.03173828125,
0.025115966796875,
-0.010894775390625,
-0.04296875,
0.052978515625,
-0.0026378631591796875,
-0.00838470458984375,
-0.0019321441650390625,
-0.053070068359375,
0.0706787109375,
-0.01100921630859375,
-0.008087158203125,
-0.01354217529296875,
-0.03045654296875,
0.0299224853515625,
0.0078125,
0.0258026123046875,
-0.0256805419921875,
-0.0208587646484375,
-0.0059356689453125,
-0.0036640167236328125,
0.040252685546875,
0.03314208984375,
-0.00254058837890625,
0.02752685546875,
0.03350830078125,
0.0035724639892578125,
-0.0215911865234375,
0.0165557861328125,
-0.030426025390625,
0.040924072265625,
-0.01390838623046875,
-0.0124359130859375,
-0.007213592529296875,
0.00377655029296875,
-0.001529693603515625,
-0.037872314453125,
-0.089111328125,
-0.00789642333984375,
0.0019073486328125,
0.03643798828125,
0.052825927734375,
0.028076171875,
0.0283355712890625,
-0.0328369140625,
-0.0273895263671875,
-0.0289306640625,
0.03472900390625,
-0.06793212890625,
-0.04248046875,
0.0202789306640625,
-0.0128326416015625,
0.0018596649169921875,
0.015716552734375,
0.061248779296875,
-0.0194244384765625,
0.035888671875,
-0.0179595947265625,
0.0345458984375,
-0.00925445556640625,
0.03350830078125,
-0.00382232666015625,
-0.00213623046875,
0.041229248046875,
-0.012603759765625,
0.01490020751953125,
-0.005512237548828125,
-0.0184173583984375,
0.05413818359375,
0.01520538330078125,
-0.0026531219482421875,
0.0182952880859375,
-0.015472412109375,
0.00814056396484375,
-0.0240478515625,
0.044525146484375,
0.0246124267578125,
-0.06195068359375,
-0.0022029876708984375,
0.031646728515625,
-0.008819580078125,
-0.016632080078125,
-0.0133209228515625,
0.0183258056640625,
-0.01580810546875,
-0.007053375244140625,
0.0135345458984375,
-0.05780029296875,
-0.00868988037109375,
0.0166473388671875,
-0.035186767578125,
-0.033538818359375,
-0.0037136077880859375,
-0.0248260498046875,
0.0012969970703125,
-0.01120758056640625,
-0.02978515625,
0.01763916015625,
-0.007320404052734375,
-0.00634002685546875,
-0.0212860107421875,
0.016510009765625,
-0.01971435546875,
-0.003086090087890625,
0.023162841796875,
-0.0201416015625,
-0.021942138671875,
-0.0002770423889160156,
-0.07647705078125,
-0.021759033203125,
-0.02117919921875,
-0.06744384765625,
-0.004253387451171875,
-0.031463623046875,
-0.0097503662109375,
0.020538330078125,
-0.00621795654296875,
0.024658203125,
0.0248565673828125,
0.00379180908203125,
-0.015594482421875,
0.05047607421875,
-0.00318145751953125,
0.049346923828125,
-0.0007200241088867188,
0.04241943359375,
0.0170745849609375,
0.033905029296875,
-0.004100799560546875,
-0.02593994140625,
0.0167236328125,
-0.0299530029296875,
-0.0195465087890625,
-0.042999267578125,
0.021392822265625,
0.019775390625,
0.033233642578125,
-0.016021728515625,
-0.0153961181640625,
0.0108489990234375,
0.006805419921875,
-0.03424072265625,
0.00916290283203125,
0.01145172119140625,
-0.0104522705078125,
-0.01050567626953125,
-0.0260009765625,
0.01433563232421875,
-0.0288238525390625,
-0.01288604736328125,
0.032196044921875,
-0.0245208740234375,
0.022247314453125,
0.046539306640625,
-0.07537841796875,
0.057830810546875,
0.07537841796875,
0.006374359130859375,
0.060821533203125,
-0.004238128662109375,
0.019073486328125,
0.060882568359375,
-0.005908966064453125,
0.00677490234375,
0.05010986328125,
0.0740966796875,
0.0018243789672851562,
0.0086822509765625,
0.05670166015625,
-0.02154541015625,
0.033050537109375,
0.0286102294921875,
0.07989501953125,
-0.0687255859375,
0.03302001953125,
0.043975830078125,
0.006641387939453125,
0.04046630859375,
-0.0221099853515625,
0.006580352783203125,
-0.06793212890625,
0.02850341796875,
0.002735137939453125,
-0.021728515625,
-0.018524169921875,
-0.02685546875,
-0.02392578125,
-0.021392822265625,
0.0084991455078125,
-0.0022487640380859375,
0.01019287109375,
0.0173187255859375,
-0.0229949951171875,
0.0159912109375,
-0.0219268798828125,
0.00789642333984375,
0.0057525634765625,
-0.037933349609375,
-0.0921630859375,
-0.040435791015625,
0.005645751953125,
-0.02197265625,
0.03961181640625,
0.016632080078125,
0.004261016845703125,
0.060638427734375,
-0.0282745361328125,
0.0139312744140625,
0.0186920166015625,
-0.029205322265625,
-0.10858154296875,
-0.03619384765625,
0.0104217529296875,
0.007411956787109375,
0.03173828125,
0.042510986328125,
-0.01139068603515625,
-0.07073974609375,
0.0007772445678710938,
-0.004726409912109375,
0.08221435546875,
-0.020233154296875,
-0.04290771484375,
0.0131072998046875,
-0.005397796630859375,
-0.0052337646484375,
0.0302276611328125,
0.01378631591796875,
-0.0058441162109375,
-0.00970458984375,
0.0011034011840820312,
-0.07000732421875,
-0.01280975341796875,
-0.0127410888671875,
-0.09771728515625,
0.0418701171875,
0.0245819091796875,
0.057952880859375,
-0.01043701171875,
-0.0094757080078125,
-0.0174102783203125,
-0.048736572265625,
-0.039581298828125,
0.053955078125,
0.04254150390625,
0.0408935546875,
-0.032806396484375,
-0.01255035400390625,
0.00986480712890625,
0.0230712890625,
0.062103271484375,
0.0279693603515625,
-0.030731201171875,
-0.0033969879150390625,
0.0209197998046875,
0.027587890625,
-0.01128387451171875,
0.03662109375,
0.00543212890625,
0.060638427734375,
0.0078887939453125,
-0.05523681640625,
0.035186767578125,
-0.07379150390625,
-0.03887939453125,
0.005672454833984375,
0.0267791748046875,
0.022613525390625,
0.00399017333984375,
0.03875732421875,
-0.00499725341796875,
-0.0012655258178710938,
0.023895263671875,
-0.05010986328125,
-0.0038509368896484375,
0.041717529296875,
0.04217529296875,
-0.02447509765625,
-0.00284576416015625,
-0.02862548828125,
0.053558349609375,
0.0202484130859375,
0.01152801513671875,
0.055633544921875,
0.046051025390625,
-0.0183563232421875,
-0.016845703125,
0.0191802978515625,
-0.004985809326171875,
-0.0210418701171875,
-0.004116058349609375,
0.01009368896484375,
0.00951385498046875,
0.006137847900390625,
0.03900146484375,
0.01403045654296875,
-0.00434112548828125,
-0.035125732421875,
-0.024993896484375,
0.006641387939453125,
-0.0252838134765625,
-0.008056640625,
-0.002079010009765625,
0.0164642333984375,
0.0003349781036376953,
-0.0083160400390625,
-0.04803466796875,
0.0051422119140625,
-0.0194549560546875,
0.029998779296875,
-0.032135009765625,
-0.019683837890625,
-0.00563812255859375,
0.0037403106689453125,
-0.046661376953125,
-0.01349639892578125,
0.038787841796875,
0.03778076171875,
0.024169921875,
0.022308349609375,
0.0643310546875,
-0.0117950439453125,
-0.0006580352783203125,
0.006900787353515625,
-0.004154205322265625,
-0.0038089752197265625,
-0.036865234375,
-0.024322509765625,
0.02130126953125,
0.0242156982421875,
0.0400390625,
0.00914764404296875,
0.0022373199462890625,
-0.016265869140625,
0.030792236328125,
0.0166778564453125,
-0.028533935546875,
-0.0172576904296875,
-0.028167724609375,
-0.038238525390625,
0.00444793701171875,
0.0240020751953125,
0.0074615478515625,
-0.0041046142578125,
-0.00383758544921875,
0.036834716796875,
0.015655517578125,
-0.0249176025390625,
0.0210113525390625,
-0.00620269775390625,
0.00710296630859375,
0.00949859619140625,
-0.0106201171875,
0.0270843505859375,
-0.041717529296875,
-0.01081085205078125,
0.0158233642578125,
-0.0033245086669921875,
-0.01861572265625,
0.0160369873046875,
-0.03485107421875,
0.0494384765625,
-0.0205230712890625,
0.0189056396484375,
-0.0030155181884765625,
-0.01491546630859375,
-0.007556915283203125,
0.025299072265625,
0.030792236328125,
0.0222625732421875,
0.036651611328125,
0.01393890380859375,
0.031524658203125,
0.038909912109375,
-0.005962371826171875,
0.06982421875,
-0.0506591796875,
0.0118408203125,
-0.033172607421875,
0.01428985595703125,
-0.049163818359375,
-0.0350341796875,
0.021026611328125,
-0.006519317626953125,
-0.00893402099609375,
0.01349639892578125,
-0.036468505859375,
0.028656005859375,
0.06512451171875,
0.006137847900390625,
0.019287109375,
0.04266357421875,
0.01308441162109375,
-0.041015625,
-0.0075836181640625,
-0.0278778076171875,
-0.01119232177734375,
0.012054443359375,
0.007068634033203125,
0.01306915283203125,
0.0021533966064453125,
0.009979248046875,
0.01534271240234375,
0.0291748046875,
0.0193634033203125,
0.005718231201171875,
0.0447998046875,
-0.0055389404296875,
0.033294677734375,
-0.03424072265625,
0.0182037353515625,
0.0048828125,
-0.01251983642578125,
0.027862548828125,
0.0106201171875,
0.01139068603515625,
0.00478363037109375,
-0.027191162109375,
0.006256103515625,
-0.0205078125,
0.0202789306640625,
-0.016998291015625,
-0.01556396484375,
-0.008056640625,
0.0126190185546875,
-0.029022216796875,
0.022064208984375,
-0.0007505416870117188,
-0.040863037109375,
-0.02978515625,
0.01477813720703125,
-0.037017822265625,
-0.0225830078125,
-0.0574951171875,
-0.012847900390625,
0.0106201171875,
0.00681304931640625,
-0.050567626953125,
0.019927978515625,
-0.00070953369140625,
0.02276611328125,
-0.01419830322265625,
0.0261383056640625,
-0.0300140380859375,
0.01097869873046875,
-0.0204010009765625,
0.00002944469451904297,
-0.04736328125,
0.034149169921875,
-0.024017333984375,
0.03753662109375,
0.04547119140625,
-0.0364990234375,
-0.0149383544921875,
-0.006290435791015625,
0.018402099609375,
0.0277862548828125,
0.0180206298828125,
-0.019500732421875,
-0.00919342041015625,
0.040008544921875,
-0.00014412403106689453,
-0.042724609375,
-0.0193023681640625,
0.021026611328125,
-0.0013399124145507812,
0.03570556640625,
-0.00685882568359375,
0.0284423828125,
-0.0121002197265625,
-0.07574462890625,
0.0212860107421875,
0.002994537353515625,
-0.0418701171875,
-0.012786865234375,
-0.01444244384765625,
-0.007602691650390625,
0.059112548828125,
-0.007442474365234375,
-0.022369384765625,
-0.0311431884765625,
-0.00539398193359375,
0.0250244140625,
-0.0030231475830078125,
0.046722412109375,
-0.00508880615234375,
-0.0294647216796875,
0.003620147705078125,
-0.0047454833984375,
0.015625,
-0.0217742919921875,
0.02789306640625,
-0.0005745887756347656,
0.026824951171875,
-0.01399993896484375,
-0.0198211669921875,
0.0067901611328125,
0.00125885009765625,
-0.00334930419921875,
-0.038818359375,
-0.0202178955078125,
0.0006508827209472656,
0.0645751953125,
0.035919189453125,
0.01013946533203125,
-0.039031982421875,
-0.009613037109375,
-0.045074462890625,
-0.05499267578125,
-0.0338134765625,
0.026641845703125,
-0.0850830078125,
-0.022247314453125,
0.02081298828125,
0.00015687942504882812,
-0.01250457763671875,
0.0022029876708984375,
-0.0205230712890625,
-0.006694793701171875,
0.0369873046875,
0.0290985107421875,
-0.028106689453125,
-0.0036640167236328125,
0.0281219482421875,
-0.04168701171875,
-0.00927734375,
-0.0077056884765625,
0.0029430389404296875,
0.0029582977294921875,
0.0010137557983398438,
-0.004001617431640625,
-0.033843994140625,
-0.0389404296875,
0.01216888427734375,
-0.01006317138671875,
0.06597900390625,
-0.0299224853515625,
-0.052520751953125,
-0.006683349609375,
-0.0060882568359375,
-0.0023021697998046875,
-0.0116729736328125,
0.006977081298828125,
-0.016204833984375,
-0.006549835205078125,
0.022796630859375,
-0.0242156982421875,
0.054046630859375,
0.00009447336196899414,
0.0023632049560546875,
0.038848876953125,
0.0080108642578125,
0.1064453125,
-0.01605224609375,
-0.025634765625,
-0.016448974609375,
-0.04437255859375,
-0.1072998046875,
0.051116943359375,
0.0220489501953125,
0.0032596588134765625,
0.0584716796875
]
|
f10153fd8bfc906ac8d0a17fc6d1bf839b8dc122 | Wordpress Stackexchange
Q: How to get page title with the page ID? My page ID is: 30601.
I want to get the page's title with ID.
A: Try with this:
<?php echo get_the_title( $ID ); ?>
| Q: How to get page title with the page ID? My page ID is: 30601.
I want to get the page's title with ID.
A: Try with this:
<?php echo get_the_title( $ID ); ?>
A: <?php
echo get_the_title( get_the_ID() );
?>
get_the_title fetch the title of WordPress post based on particular Id. and get_the_ID() fetch id of that page/post
| wordpress | {
"language": "en",
"length": 59,
"provenance": "stackexchange_00019.jsonl.gz:439932",
"question_score": "19",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125729"
} | [
-0.01541900634765625,
-0.0017251968383789062,
-0.01212310791015625,
0.029937744140625,
-0.0023651123046875,
-0.0343017578125,
0.0404052734375,
-0.01029205322265625,
0.0028209686279296875,
0.033599853515625,
-0.0283050537109375,
0.0228729248046875,
-0.039825439453125,
-0.00783538818359375,
-0.0244598388671875,
-0.036285400390625,
0.0200347900390625,
-0.018310546875,
0.004337310791015625,
-0.0109710693359375,
-0.0093994140625,
-0.0008134841918945312,
0.027130126953125,
0.000705718994140625,
0.0477294921875,
-0.0823974609375,
0.0133209228515625,
-0.0003056526184082031,
0.006870269775390625,
-0.02630615234375,
0.018768310546875,
0.030517578125,
0.023956298828125,
-0.03582763671875,
0.0445556640625,
0.030059814453125,
0.0078125,
-0.001995086669921875,
0.0350341796875,
0.0012502670288085938,
0.02764892578125,
0.005725860595703125,
0.0223846435546875,
0.006359100341796875,
-0.01242828369140625,
-0.0274200439453125,
0.03643798828125,
-0.01245880126953125,
-0.016632080078125,
0.021209716796875,
0.01013946533203125,
0.028411865234375,
0.01551055908203125,
0.044036865234375,
0.01372528076171875,
-0.0146942138671875,
0.06256103515625,
-0.030364990234375,
0.0467529296875,
-0.08282470703125,
-0.0716552734375,
-0.0286407470703125,
0.060577392578125,
0.00034427642822265625,
-0.01097869873046875,
0.0257110595703125,
0.05328369140625,
0.016204833984375,
-0.0013551712036132812,
-0.0262908935546875,
-0.0157470703125,
-0.0055694580078125,
-0.0021209716796875,
-0.009765625,
-0.0237579345703125,
-0.018157958984375,
-0.005886077880859375,
-0.0584716796875,
0.01537322998046875,
0.004169464111328125,
-0.00949859619140625,
-0.052398681640625,
-0.07403564453125,
0.033843994140625,
0.0063018798828125,
0.07171630859375,
-0.01012420654296875,
-0.0224609375,
-0.0304412841796875,
-0.02960205078125,
-0.0291900634765625,
0.026214599609375,
-0.0246734619140625,
-0.0211029052734375,
-0.054962158203125,
-0.0091400146484375,
0.0157470703125,
0.0908203125,
-0.033538818359375,
0.016510009765625,
-0.0108184814453125,
-0.0121917724609375,
0.00399017333984375,
-0.054931640625,
-0.0147552490234375,
-0.01526641845703125,
0.0194854736328125,
0.011474609375,
0.0024394989013671875,
0.0106964111328125,
-0.036895751953125,
-0.005405426025390625,
0.0092926025390625,
0.00913238525390625,
-0.051910400390625,
0.006565093994140625,
-0.012542724609375,
-0.021270751953125,
-0.01666259765625,
0.024017333984375,
0.00864410400390625,
0.01438140869140625,
0.03179931640625,
-0.003658294677734375,
0.01163482666015625,
0.015899658203125,
-0.0194549560546875,
-0.034149169921875,
-0.002834320068359375,
0.007598876953125,
-0.0159454345703125,
0.0142669677734375,
0.01053619384765625,
0.007747650146484375,
-0.01064300537109375,
-0.028350830078125,
-0.0088958740234375,
-0.021240234375,
-0.0171966552734375,
0.0019092559814453125,
-0.034210205078125,
0.0002675056457519531,
0.042205810546875,
-0.037872314453125,
-0.0477294921875,
-0.003986358642578125,
-0.004047393798828125,
0.03472900390625,
-0.0203704833984375,
-0.0531005859375,
0.02142333984375,
-0.024993896484375,
-0.029754638671875,
0.025360107421875,
0.040374755859375,
-0.021942138671875,
-0.00279998779296875,
-0.0111846923828125,
0.060577392578125,
0.00852203369140625,
0.029296875,
0.018310546875,
0.01007843017578125,
0.045257568359375,
0.0178985595703125,
-0.0386962890625,
-0.007633209228515625,
-0.0037746429443359375,
0.016754150390625,
0.07012939453125,
0.0149688720703125,
-0.01053619384765625,
-0.031402587890625,
0.002117156982421875,
-0.0028476715087890625,
-0.01073455810546875,
0.001964569091796875,
-0.038055419921875,
0.012542724609375,
0.015960693359375,
-0.028228759765625,
-0.028656005859375,
-0.03533935546875,
0.0010786056518554688,
-0.019744873046875,
0.005092620849609375,
0.0174713134765625,
0.044921875,
-0.006595611572265625,
0.030364990234375,
0.0211334228515625,
0.0167388916015625,
-0.09033203125,
0.021026611328125,
0.01190185546875,
0.00125885009765625,
0.00933074951171875,
-0.00513458251953125,
0.0009746551513671875,
-0.01287078857421875,
0.0005664825439453125,
-0.0218048095703125,
-0.0004940032958984375,
0.042327880859375,
0.00855255126953125,
-0.02093505859375,
0.00409698486328125,
-0.0113372802734375,
0.048583984375,
-0.006534576416015625,
-0.0262298583984375,
-0.034271240234375,
0.0191650390625,
-0.0701904296875,
-0.08734130859375,
0.010284423828125,
-0.05242919921875,
-0.05810546875,
-0.02862548828125,
-0.02423095703125,
-0.042388916015625,
0.01403045654296875,
-0.057769775390625,
0.01180267333984375,
0.062255859375,
-0.01325225830078125,
-0.01308441162109375,
-0.025970458984375,
0.07745361328125,
-0.0114898681640625,
-0.01239776611328125,
0.0161285400390625,
-0.005825042724609375,
0.03936767578125,
0.0008525848388671875,
-0.0134124755859375,
-0.0284423828125,
-0.07513427734375,
0.0142974853515625,
0.044464111328125,
0.033538818359375,
-0.0032062530517578125,
-0.0024127960205078125,
0.0108795166015625,
-0.0020751953125,
-0.069580078125,
0.0009975433349609375,
0.00007200241088867188,
0.034637451171875,
0.07086181640625,
-0.0003581047058105469,
0.00939178466796875,
0.014556884765625,
-0.0153656005859375,
-0.019561767578125,
0.051513671875,
-0.03106689453125,
0.0241241455078125,
-0.044189453125,
0.01479339599609375,
-0.01800537109375,
-0.04119873046875,
0.0303955078125,
-0.05303955078125,
0.0124664306640625,
0.04193115234375,
0.0241241455078125,
0.04888916015625,
-0.02728271484375,
0.00858306884765625,
-0.0027523040771484375,
0.01409912109375,
-0.0022182464599609375,
0.04974365234375,
0.0157318115234375,
-0.0004820823669433594,
-0.0212249755859375,
-0.0247650146484375,
-0.013397216796875,
0.0238189697265625,
-0.0043792724609375,
-0.0026702880859375,
-0.004673004150390625,
-0.01227569580078125,
0.0054779052734375,
-0.0246734619140625,
0.0009064674377441406,
0.0030059814453125,
0.01068878173828125,
0.0182647705078125,
0.0198516845703125,
0.0408935546875,
-0.039154052734375,
0.0660400390625,
-0.004787445068359375,
-0.007808685302734375,
0.078125,
-0.03753662109375,
0.03253173828125,
-0.042236328125,
0.058502197265625,
0.048095703125,
-0.0306243896484375,
0.006374359130859375,
0.022674560546875,
-0.042938232421875,
0.0634765625,
-0.0191802978515625,
-0.0084991455078125,
0.032867431640625,
-0.0743408203125,
0.0232086181640625,
0.005889892578125,
0.09771728515625,
-0.049407958984375,
-0.06109619140625,
-0.00439453125,
0.0252838134765625,
-0.12451171875,
-0.127197265625,
0.003108978271484375,
-0.059539794921875,
-0.036834716796875,
-0.00751495361328125,
-0.032806396484375,
0.0227508544921875,
0.02239990234375,
-0.0123138427734375,
0.0279541015625,
-0.004215240478515625,
-0.0723876953125,
-0.0184173583984375,
-0.08294677734375,
-0.00800323486328125,
-0.0205078125,
0.035430908203125,
0.00457000732421875,
-0.0184783935546875,
-0.005115509033203125,
-0.0377197265625,
0.0015764236450195312,
0.039520263671875,
-0.00003165006637573242,
-0.022369384765625,
-0.0163726806640625,
-0.017608642578125,
-0.0029697418212890625,
0.023101806640625,
-0.0306243896484375,
-0.023529052734375,
0.032379150390625,
-0.0286712646484375,
-0.02630615234375,
0.0189208984375,
-0.00612640380859375,
0.01189422607421875,
0.043487548828125,
0.0269775390625,
0.01611328125,
-0.0277557373046875,
-0.04302978515625,
-0.01395416259765625,
-0.06341552734375,
0.0130615234375,
0.060760498046875,
-0.004680633544921875,
-0.0101318359375,
-0.01512908935546875,
0.01197052001953125,
0.0034885406494140625,
-0.04071044921875,
-0.0027446746826171875,
0.03570556640625,
-0.00020074844360351562,
0.053985595703125,
0.0306396484375,
0.0064697265625,
0.00238800048828125,
0.01224517822265625,
0.0034942626953125,
0.04156494140625,
0.0214385986328125,
0.00897979736328125,
-0.0168609619140625,
-0.046173095703125,
0.0350341796875,
-0.0145416259765625,
0.023345947265625,
-0.01389312744140625,
-0.02960205078125,
0.0165557861328125,
0.09344482421875,
-0.052337646484375,
-0.023162841796875,
0.00162506103515625,
0.01375579833984375,
-0.026763916015625,
-0.0191192626953125,
-0.0204925537109375,
-0.0237884521484375,
-0.0416259765625,
0.01148223876953125,
-0.005397796630859375,
-0.019683837890625,
-0.0290985107421875,
0.05413818359375,
-0.00933837890625,
-0.00215911865234375,
0.01470184326171875,
0.0087738037109375,
0.0006785392761230469,
0.043182373046875,
-0.0330810546875,
0.06597900390625,
-0.03271484375,
-0.00897216796875,
-0.06475830078125,
-0.00859832763671875,
0.032012939453125,
0.034637451171875,
-0.01123809814453125,
-0.007511138916015625,
-0.00974273681640625,
0.037261962890625,
0.00594329833984375,
0.0491943359375,
-0.003055572509765625,
-0.004787445068359375,
-0.012298583984375,
-0.02239990234375,
0.005237579345703125,
-0.043060302734375,
0.005504608154296875,
-0.01355743408203125,
-0.0322265625,
0.004344940185546875,
-0.02337646484375,
0.0022373199462890625,
-0.01058197021484375,
-0.0223846435546875,
-0.04425048828125,
-0.025604248046875,
0.03900146484375,
0.0034008026123046875,
0.0281524658203125,
0.0042877197265625,
-0.02545166015625,
-0.038604736328125,
0.07666015625,
0.04833984375,
-0.0005459785461425781,
-0.01384735107421875,
0.0445556640625,
0.00260162353515625,
-0.06964111328125,
-0.0465087890625,
-0.01898193359375,
0.03143310546875,
-0.0289306640625,
0.048858642578125,
0.01081085205078125,
-0.03521728515625,
0.1083984375,
-0.01175689697265625,
-0.006343841552734375,
-0.00864410400390625,
0.040130615234375,
-0.0226593017578125,
-0.039642333984375,
0.0377197265625,
-0.051422119140625,
0.026763916015625,
0.01593017578125,
-0.03948974609375,
-0.00858306884765625,
-0.01898193359375,
0.032012939453125,
-0.04180908203125,
0.086181640625,
-0.0013332366943359375,
-0.028533935546875,
0.01556396484375,
0.0148162841796875,
0.0083160400390625,
0.0290985107421875,
0.002593994140625,
-0.0022220611572265625,
-0.00981903076171875,
0.0169525146484375,
0.0135345458984375,
0.00876617431640625,
-0.0195159912109375,
0.0293121337890625,
0.0040130615234375,
-0.0124053955078125,
0.0103302001953125,
-0.018524169921875,
0.04248046875,
0.004390716552734375,
-0.0211944580078125,
0.0229644775390625,
-0.0232696533203125,
0.0236663818359375,
0.027862548828125,
0.0229339599609375,
0.015899658203125,
0.050079345703125,
0.01122283935546875,
0.0026836395263671875,
0.017913818359375,
0.038055419921875,
-0.007843017578125,
-0.01326751708984375,
0.015350341796875,
-0.020843505859375,
0.02972412109375,
0.056182861328125,
-0.0206146240234375,
0.04205322265625,
-0.0217742919921875,
0.031951904296875,
0.021514892578125,
0.0262298583984375,
-0.0014514923095703125,
-0.0034503936767578125,
-0.000629425048828125,
0.022918701171875,
-0.001434326171875,
-0.0090179443359375,
0.0012111663818359375,
0.03857421875,
0.0169677734375,
0.00281524658203125,
-0.01471710205078125,
-0.006122589111328125,
-0.0238189697265625,
0.00867462158203125,
0.027069091796875,
-0.01934814453125,
-0.036224365234375,
-0.0287628173828125,
-0.0017337799072265625,
0.0155181884765625,
-0.00849151611328125,
0.0096893310546875,
0.0028553009033203125,
0.006847381591796875,
0.0377197265625,
-0.030303955078125,
0.00800323486328125,
-0.00872039794921875,
-0.0062255859375,
0.01079559326171875,
-0.0076751708984375,
-0.00804901123046875,
-0.041961669921875,
-0.0005307197570800781,
-0.0099639892578125,
-0.00890350341796875,
0.0369873046875,
-0.01389312744140625,
0.09765625,
-0.0648193359375,
-0.0252838134765625,
-0.00531005859375,
0.00965118408203125,
0.0355224609375,
0.0323486328125,
-0.0142364501953125,
0.0002467632293701172,
-0.0347900390625,
0.0009741783142089844,
0.0276641845703125,
-0.024139404296875,
-0.00408935546875,
-0.03997802734375,
-0.027984619140625,
0.0200042724609375,
-0.01910400390625,
0.0180816650390625,
-0.003536224365234375,
0.038330078125,
-0.007389068603515625,
0.07452392578125,
-0.011566162109375,
0.06524658203125,
0.02020263671875,
0.039398193359375,
0.00699615478515625,
0.0272216796875,
-0.0293731689453125,
-0.0211334228515625,
0.005401611328125,
0.026611328125,
-0.0161285400390625,
-0.00331878662109375,
0.020355224609375,
-0.0379638671875,
0.0096435546875,
0.0016489028930664062,
0.0012912750244140625,
-0.00344085693359375,
0.00855255126953125,
-0.01507568359375,
0.004573822021484375,
-0.01171875,
-0.06597900390625,
0.04888916015625,
-0.022796630859375,
-0.0107574462890625,
0.0138702392578125,
0.0701904296875,
-0.04791259765625,
-0.03253173828125,
-0.0396728515625,
0.0205078125,
-0.01678466796875,
0.03460693359375,
0.066162109375,
0.011260986328125,
0.042572021484375,
0.01055908203125,
0.021331787109375,
0.0149688720703125,
0.042572021484375,
-0.034637451171875,
-0.06024169921875,
0.0660400390625,
0.0404052734375,
-0.0306396484375,
0.06658935546875,
-0.0307769775390625,
0.0083160400390625,
0.0204010009765625,
0.06512451171875,
-0.044830322265625,
0.0063018798828125,
0.008331298828125,
-0.0198822021484375,
0.01465606689453125,
-0.00908660888671875,
0.0008502006530761719,
-0.023712158203125,
0.037384033203125,
-0.01313018798828125,
-0.01074981689453125,
0.0088348388671875,
-0.025787353515625,
-0.01074981689453125,
-0.0275421142578125,
0.0289154052734375,
-0.0020599365234375,
-0.0113677978515625,
-0.009429931640625,
-0.0061187744140625,
0.00865936279296875,
-0.046966552734375,
0.00313568115234375,
0.029693603515625,
0.003246307373046875,
-0.026611328125,
0.07666015625,
-0.0016508102416992188,
0.0189056396484375,
0.01268768310546875,
0.034515380859375,
-0.0282440185546875,
0.038116455078125,
-0.01025390625,
0.001773834228515625,
0.01971435546875,
-0.0531005859375,
0.0100860595703125,
-0.007717132568359375,
0.0012636184692382812,
-0.0021266937255859375,
-0.0252685546875,
0.0020008087158203125,
-0.036865234375,
-0.01261138916015625,
-0.02508544921875,
-0.019439697265625,
0.07952880859375,
-0.02606201171875,
-0.026153564453125,
0.006561279296875,
0.035888671875,
0.0015134811401367188,
-0.009765625,
-0.0023136138916015625,
0.0019817352294921875,
0.0712890625,
-0.01751708984375,
0.061004638671875,
0.00789642333984375,
-0.0225830078125,
-0.06060791015625,
0.06268310546875,
0.010589599609375,
0.005817413330078125,
-0.0029811859130859375,
0.0289306640625,
-0.0182342529296875,
-0.005832672119140625,
-0.023345947265625,
0.051422119140625,
-0.0034809112548828125,
0.024810791015625,
-0.01335906982421875,
-0.0038471221923828125,
0.0137939453125,
0.016448974609375,
0.042755126953125,
0.00316619873046875,
-0.019378662109375,
-0.0162506103515625,
0.030731201171875,
0.043670654296875,
-0.0018939971923828125,
0.011322021484375,
0.0219268798828125,
0.0276947021484375,
0.03070068359375,
-0.0286865234375,
0.01174163818359375,
-0.0211029052734375,
-0.00600433349609375,
0.04730224609375,
0.0242462158203125,
-0.00798797607421875,
0.057891845703125,
-0.0242767333984375,
-0.060699462890625,
0.04254150390625,
0.0234527587890625,
0.015777587890625,
0.00016808509826660156,
0.0176544189453125,
0.060791015625,
-0.0687255859375,
-0.011993408203125,
-0.0289306640625,
0.062103271484375,
0.0316162109375,
-0.006397247314453125,
0.0265960693359375,
0.018524169921875,
-0.0166168212890625,
-0.0026798248291015625,
-0.0098114013671875,
0.01666259765625,
0.00679779052734375,
0.077880859375,
0.0191802978515625,
0.01312255859375,
-0.05865478515625,
-0.00881195068359375,
0.0379638671875,
0.08343505859375,
-0.046051025390625,
0.00817108154296875,
0.00986480712890625,
-0.0211029052734375,
-0.003993988037109375,
-0.048248291015625,
-0.0012006759643554688,
0.03826904296875,
0.029388427734375,
0.007259368896484375,
-0.01082611083984375,
0.030670166015625,
0.024871826171875,
0.0196533203125,
0.008544921875,
-0.0465087890625,
-0.0028858184814453125,
-0.04718017578125,
0.0245361328125,
0.01280975341796875,
0.037384033203125,
0.009368896484375,
0.0625,
-0.0225067138671875,
-0.0146636962890625,
0.0267333984375,
-0.0005893707275390625,
0.0165557861328125,
-0.033966064453125,
-0.01324462890625,
-0.031097412109375,
0.0236663818359375,
0.0281829833984375,
0.0428466796875,
0.0189971923828125,
0.039886474609375,
0.0185546875,
-0.00981903076171875,
-0.00070953369140625,
-0.015289306640625,
-0.0200653076171875,
0.040069580078125,
-0.0218048095703125,
0.034698486328125,
0.005458831787109375,
-0.01107025146484375,
-0.0313720703125,
0.00902557373046875,
0.041290283203125,
0.00984954833984375,
0.0300140380859375,
0.0102081298828125,
-0.00040411949157714844,
0.003116607666015625,
0.005275726318359375,
0.006072998046875,
0.0296783447265625,
-0.09832763671875,
-0.0102081298828125,
-0.00681304931640625,
-0.03570556640625,
0.033416748046875,
0.0438232421875,
-0.02642822265625,
0.00011450052261352539,
-0.02349853515625,
0.0303955078125,
0.01409912109375,
-0.0367431640625,
-0.006893157958984375,
0.045928955078125,
0.042877197265625,
0.0226593017578125,
-0.045562744140625,
-0.0301666259765625,
-0.0126495361328125,
0.003070831298828125,
0.0345458984375,
-0.0080718994140625,
0.03973388671875,
0.02923583984375,
-0.0340576171875,
0.044342041015625,
-0.053558349609375,
-0.036529541015625,
0.07476806640625,
0.01195526123046875,
-0.000022709369659423828,
-0.020751953125,
-0.0657958984375,
0.07562255859375,
-0.0042572021484375,
0.054107666015625,
0.06829833984375,
-0.040557861328125,
0.008453369140625,
0.01171875,
0.00018846988677978516,
-0.004589080810546875,
-0.0058441162109375,
0.00868988037109375,
-0.0033969879150390625,
0.041168212890625,
0.055328369140625,
-0.01361083984375,
-0.004436492919921875,
0.01204681396484375,
-0.0163726806640625,
0.016265869140625,
0.008941650390625,
0.0277557373046875,
0.0283355712890625,
-0.01308441162109375,
-0.0276947021484375,
-0.002490997314453125,
-0.005298614501953125,
0.00888824462890625,
0.01751708984375,
0.019012451171875,
-0.005451202392578125,
0.0212860107421875,
0.00479888916015625,
-0.053070068359375,
0.013763427734375,
-0.0169830322265625,
-0.0164794921875,
-0.0166473388671875,
0.01026153564453125,
-0.0190277099609375,
-0.06292724609375,
-0.011688232421875,
-0.0362548828125,
0.004825592041015625,
0.0239715576171875,
0.0095977783203125,
0.01690673828125,
0.0181732177734375,
-0.011932373046875,
-0.0252532958984375,
-0.0296478271484375,
0.0185394287109375,
0.004215240478515625,
-0.033905029296875,
0.0023097991943359375,
-0.048828125,
0.0245361328125,
-0.0027828216552734375,
0.017059326171875,
-0.07000732421875,
0.01334381103515625,
-0.028778076171875,
-0.036346435546875,
-0.0164947509765625,
0.005558013916015625,
0.0250701904296875,
-0.0232086181640625,
0.003971099853515625,
0.023223876953125,
0.0232696533203125,
0.0706787109375,
-0.00984954833984375,
-0.029815673828125,
0.0164794921875,
-0.004116058349609375,
-0.01007080078125,
-0.046112060546875,
0.0162353515625,
-0.049224853515625,
-0.0015039443969726562,
-0.0007572174072265625,
-0.019195556640625,
-0.004322052001953125,
-0.0303802490234375,
-0.017608642578125,
0.037750244140625,
0.01177215576171875,
-0.01629638671875,
-0.015960693359375,
0.0019073486328125,
0.0037288665771484375,
-0.04534912109375,
-0.00421142578125,
-0.02752685546875,
-0.01293182373046875,
0.0242919921875,
0.0227813720703125,
0.0005521774291992188,
0.005031585693359375,
0.034637451171875,
-0.0665283203125,
0.03790283203125,
-0.0052490234375,
-0.01088714599609375,
0.0361328125,
-0.027862548828125,
0.0056304931640625,
-0.007808685302734375,
-0.08343505859375,
-0.0241546630859375,
-0.042633056640625,
0.06292724609375,
-0.0300140380859375,
-0.0012407302856445312,
-0.0006871223449707031,
-0.0011606216430664062,
0.03515625,
0.044036865234375,
0.008148193359375,
-0.0185089111328125,
0.02593994140625,
-0.0110321044921875,
-0.057098388671875,
-0.0031337738037109375,
0.03363037109375,
-0.046142578125,
0.0012731552124023438,
0.01448822021484375,
-0.0258941650390625,
0.0088653564453125,
0.0035991668701171875,
-0.044708251953125,
-0.006275177001953125,
-0.034912109375,
-0.0214080810546875,
-0.033233642578125,
-0.0306396484375,
0.07513427734375,
-0.06170654296875,
-0.0440673828125,
0.002452850341796875,
0.04248046875,
0.0026416778564453125,
-0.0643310546875,
0.0135040283203125,
0.0303192138671875,
-0.0166015625,
0.007411956787109375,
0.0148773193359375,
0.0297698974609375,
-0.026031494140625,
-0.0167388916015625,
0.008026123046875,
0.045928955078125,
0.000732421875,
0.03802490234375,
-0.0017299652099609375,
0.0401611328125,
-0.00045418739318847656,
0.024322509765625,
0.01027679443359375,
0.029754638671875,
0.003833770751953125,
0.048919677734375,
-0.0018720626831054688,
-0.034149169921875,
0.0098724365234375,
-0.0364990234375,
0.001399993896484375,
0.0014410018920898438,
0.0325927734375,
-0.0369873046875,
0.036163330078125,
-0.01385498046875,
0.004913330078125,
0.03204345703125
]
|
12427e5f6791234b5a55dd653fa9e482e1356e5e | Wordpress Stackexchange
Q: Hide permalink and preview button and link on custom post anyone know how to custom box that contain "Publish,save draft,and preview button" ?
i'll hide all button except Publish button.
and same as "change permalink" also "view,delete,edit" link inside post how to hide the permalink and view link ?
here the illustration what i talking about.
Customizing Publish Button From Original Wordpress
Customizing post link from original wordpress
delete permalink under wordpress post title
A: We can remove the Post preview, view and permalinks field by setting publicly_queryable argument to false.
| Q: Hide permalink and preview button and link on custom post anyone know how to custom box that contain "Publish,save draft,and preview button" ?
i'll hide all button except Publish button.
and same as "change permalink" also "view,delete,edit" link inside post how to hide the permalink and view link ?
here the illustration what i talking about.
Customizing Publish Button From Original Wordpress
Customizing post link from original wordpress
delete permalink under wordpress post title
A: We can remove the Post preview, view and permalinks field by setting publicly_queryable argument to false.
A: I just stumbled across this question and thought I'd share my most common solution which may not work for everyone in all scenarios but I believe this is the most efficient way to achieve the desired results.
When you register a CPT that does not require a single-view output in your theme or plugin, simply define the property 'public' => false,
For example a typical CPT registration might look something like this:
<?php
/**
* Custom Post Type: cw-programs (programs)
* Theme: Your Custom Theme
* Desc: A custom WP theme
*
* @package custom-wp-theme
* @since 1.0.0
* @version 1.0.0
*/
function mycpt_content_type_name() {
$labels = array(
'name' => __( 'My CPT'),
'singular_name' => __( 'My CPT' ),
'add_new' => _x('Add New', 'My CPT'),
'add_new_item' => __('Add New My CPT'),
'edit_item' => __('Edit My CPT'),
'new_item' => __('New My CPT'),
'view_item' => __('View My CPT'),
'search_items' => __('Search My CPT'),
'not_found' => __('No My CPT found'),
'not_found_in_trash' => __('No My CPT found in Trash'),
);
$args = array(
'labels' => $labels,
'menu_icon' => 'dashicons-clipboard',
'public' => false,
'publicly_queryable' => false,
'show_ui' => true,
'query_var' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => null,
'rewrite' => array('slug' => __( 'mycpt' )),
'supports' => array('title', 'editor'),
'show_in_menu' => false
);
register_post_type(__( 'cw-program' ),$args);
}
add_action( 'init', 'mycpt_content_type_name' );
In one-fell-swoop, this should remove the view, slug and preview changes links from all associated admin screens. I like This solution, because it does not require any additional functions and the logic is defined in the same place as your cpt (obviously). Hope that this helps others out there, looking for a similar solution.
A: You can accomplish the above using hooks. Use the code below in your active theme's functions.php file to get this work
delete permalink under wordpress post title
add_filter( 'get_sample_permalink_html', 'wpse_125800_sample_permalink' );
function wpse_125800_sample_permalink( $return ) {
$return = '';
return $return;
}
Customizing post link from original wordpress
add_filter( 'page_row_actions', 'wpse_125800_row_actions', 10, 2 );
add_filter( 'post_row_actions', 'wpse_125800_row_actions', 10, 2 );
function wpse_125800_row_actions( $actions, $post ) {
unset( $actions['inline hide-if-no-js'] );
unset( $actions['view'] );
return $actions;
}
Customizing Publish Button From Original Wordpress
Below has room for improvement, I couldn't get the hooks to do the following, so used css way to hide it.
global $pagenow;
if ( 'post.php' == $pagenow || 'post-new.php' == $pagenow ) {
add_action( 'admin_head', 'wpse_125800_custom_publish_box' );
function wpse_125800_custom_publish_box() {
if( !is_admin() )
return;
$style = '';
$style .= '<style type="text/css">';
$style .= '#edit-slug-box, #minor-publishing-actions, #visibility, .num-revisions, .curtime';
$style .= '{display: none; }';
$style .= '</style>';
echo $style;
}
}
NOTES
Additional conditional statement in my case,
here i've already solved for the conditional statement
global $pagenow;
if( 'edit.php' == $pagenow && isset($_GET['page_type']) == 'my-custom-post' ){
// here i use delete post row function that explained by Maruti Mohanty on my custom post
}
also conditional statement for add new post and custom publish metabox settings
global $pagenow;
if( 'page-new.php' == $pagenow && isset($_GET['page_type']) == 'my-custom-post' ){
// here i use add new post and custom publish metabox function
}
let me know if there have another explanation.
thanks!
| wordpress | {
"language": "en",
"length": 609,
"provenance": "stackexchange_00019.jsonl.gz:439955",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125800"
} | [
0.03826904296875,
0.0079803466796875,
0.01380157470703125,
0.02874755859375,
-0.01194000244140625,
-0.03472900390625,
0.044830322265625,
-0.052337646484375,
0.002513885498046875,
0.0016307830810546875,
0.0154266357421875,
-0.0275726318359375,
-0.02886962890625,
-0.05865478515625,
0.01190185546875,
-0.026336669921875,
0.02874755859375,
0.035186767578125,
0.0789794921875,
-0.01068878173828125,
0.01401519775390625,
-0.00257110595703125,
0.0712890625,
0.0248565673828125,
0.032867431640625,
-0.0082855224609375,
0.040313720703125,
-0.0546875,
0.027374267578125,
-0.024261474609375,
0.020233154296875,
-0.011871337890625,
-0.00047969818115234375,
0.0295867919921875,
-0.006801605224609375,
0.03387451171875,
-0.0035724639892578125,
0.016754150390625,
0.02850341796875,
0.00547027587890625,
0.018035888671875,
-0.0115509033203125,
-0.012420654296875,
-0.0179901123046875,
-0.0242156982421875,
0.020263671875,
-0.0142364501953125,
-0.0450439453125,
0.00766754150390625,
0.01137542724609375,
0.00902557373046875,
0.01016998291015625,
0.0092620849609375,
0.0009832382202148438,
-0.0134429931640625,
-0.0205841064453125,
-0.0025272369384765625,
0.022369384765625,
0.04559326171875,
0.0170745849609375,
-0.036468505859375,
0.0007610321044921875,
-0.0037174224853515625,
-0.05126953125,
-0.02154541015625,
-0.0061798095703125,
-0.02496337890625,
0.01013946533203125,
-0.01027679443359375,
-0.0146942138671875,
0.0145416259765625,
-0.0245819091796875,
0.00043010711669921875,
-0.06622314453125,
-0.0150146484375,
0.034759521484375,
-0.0207366943359375,
-0.031005859375,
0.0006113052368164062,
-0.016571044921875,
0.019805908203125,
-0.0210418701171875,
-0.02783203125,
-0.022705078125,
0.01242828369140625,
-0.004619598388671875,
-0.0013713836669921875,
0.0017175674438476562,
0.01137542724609375,
-0.017852783203125,
0.002758026123046875,
-0.04071044921875,
-0.0023822784423828125,
0.024444580078125,
0.0022335052490234375,
-0.03619384765625,
0.012451171875,
0.037017822265625,
-0.0011739730834960938,
-0.0106048583984375,
0.00977325439453125,
-0.0230712890625,
-0.009033203125,
-0.0175933837890625,
-0.0143890380859375,
0.01114654541015625,
0.0170135498046875,
0.07830810546875,
0.043060302734375,
0.0214385986328125,
0.0007944107055664062,
-0.0065460205078125,
-0.010040283203125,
-0.003368377685546875,
-0.02520751953125,
0.0120849609375,
-0.0338134765625,
0.0186309814453125,
-0.01325225830078125,
0.04913330078125,
-0.0123291015625,
-0.0008788108825683594,
-0.00287628173828125,
0.00850677490234375,
0.04266357421875,
0.0220794677734375,
-0.0259246826171875,
0.0159454345703125,
0.003818511962890625,
0.06781005859375,
-0.0606689453125,
-0.027984619140625,
0.064208984375,
0.05206298828125,
0.04803466796875,
-0.052886962890625,
0.023681640625,
0.00027179718017578125,
-0.01239013671875,
0.0267486572265625,
-0.0153045654296875,
-0.01763916015625,
0.0175323486328125,
-0.028167724609375,
-0.037567138671875,
0.036590576171875,
0.0143280029296875,
-0.008331298828125,
-0.0062103271484375,
-0.044586181640625,
-0.0513916015625,
-0.0092620849609375,
0.04705810546875,
0.00908660888671875,
-0.01690673828125,
-0.022979736328125,
0.0467529296875,
-0.0362548828125,
-0.0094757080078125,
-0.048919677734375,
0.058929443359375,
-0.00131988525390625,
0.01139068603515625,
0.0294036865234375,
-0.0249481201171875,
0.01678466796875,
-0.048004150390625,
-0.0128936767578125,
0.027740478515625,
0.0255584716796875,
-0.004878997802734375,
-0.062255859375,
-0.02215576171875,
-0.003292083740234375,
-0.01568603515625,
0.043975830078125,
0.03155517578125,
0.00519561767578125,
-0.01385498046875,
0.05352783203125,
-0.0015840530395507812,
-0.0302276611328125,
0.052947998046875,
-0.04071044921875,
-0.0762939453125,
0.041229248046875,
0.0203399658203125,
0.04925537109375,
-0.01497650146484375,
-0.0023860931396484375,
0.0765380859375,
0.046844482421875,
-0.059967041015625,
0.0377197265625,
0.003963470458984375,
-0.013641357421875,
-0.004444122314453125,
-0.00989532470703125,
-0.001209259033203125,
0.006092071533203125,
-0.0301513671875,
0.0184173583984375,
0.0029888153076171875,
0.0264434814453125,
-0.0166168212890625,
0.037017822265625,
-0.0260009765625,
0.037445068359375,
-0.024017333984375,
0.0211029052734375,
0.026275634765625,
0.00769805908203125,
-0.0219268798828125,
-0.027435302734375,
0.003330230712890625,
0.028961181640625,
-0.00039649009704589844,
0.00986480712890625,
-0.01317596435546875,
-0.01284027099609375,
0.00798797607421875,
-0.05035400390625,
0.0012941360473632812,
0.05145263671875,
0.056121826171875,
-0.049072265625,
0.01284027099609375,
-0.040679931640625,
0.032196044921875,
-0.0030536651611328125,
-0.0244598388671875,
0.02178955078125,
0.0550537109375,
0.04595947265625,
-0.005290985107421875,
0.01727294921875,
0.01953125,
-0.052825927734375,
-0.0180816650390625,
0.036773681640625,
0.0059051513671875,
0.0269927978515625,
-0.02044677734375,
0.0210113525390625,
0.05584716796875,
0.0120697021484375,
0.0078277587890625,
0.010040283203125,
0.033935546875,
0.052978515625,
-0.0146484375,
0.0024814605712890625,
0.025604248046875,
-0.0301361083984375,
0.0263824462890625,
0.036590576171875,
-0.0106964111328125,
0.0200653076171875,
0.005985260009765625,
-0.0154571533203125,
0.003879547119140625,
0.01151275634765625,
-0.0030460357666015625,
-0.012420654296875,
0.0171966552734375,
0.0088043212890625,
0.050048828125,
0.053131103515625,
-0.01381683349609375,
-0.0199127197265625,
-0.00101470947265625,
0.0272064208984375,
-0.01065826416015625,
0.0175628662109375,
0.042999267578125,
-0.007171630859375,
-0.0203094482421875,
-0.01407623291015625,
-0.0048370361328125,
0.011016845703125,
-0.0022830963134765625,
0.0190887451171875,
-0.0017080307006835938,
-0.005855560302734375,
0.00867462158203125,
-0.036102294921875,
0.004444122314453125,
-0.0004916191101074219,
0.0443115234375,
0.009429931640625,
0.02154541015625,
0.024627685546875,
-0.0168304443359375,
0.05487060546875,
0.0169830322265625,
-0.0286102294921875,
-0.05572509765625,
-0.06097412109375,
0.04742431640625,
-0.03582763671875,
0.028961181640625,
0.08648681640625,
0.0229339599609375,
0.019256591796875,
0.007717132568359375,
-0.009918212890625,
-0.006130218505859375,
0.023284912109375,
0.0019378662109375,
0.0011339187622070312,
-0.08331298828125,
-0.0239715576171875,
-0.011688232421875,
-0.01282501220703125,
-0.033843994140625,
-0.048065185546875,
-0.0260009765625,
-0.0168304443359375,
-0.054718017578125,
0.0242767333984375,
-0.0007333755493164062,
-0.037506103515625,
0.0008449554443359375,
-0.0038700103759765625,
-0.0176239013671875,
-0.01299285888671875,
0.016448974609375,
0.0021915435791015625,
-0.0301513671875,
-0.01174163818359375,
-0.02471923828125,
-0.0161285400390625,
-0.0347900390625,
0.02447509765625,
0.003185272216796875,
0.00939178466796875,
0.002685546875,
0.039306640625,
-0.005107879638671875,
-0.052276611328125,
0.0180206298828125,
-0.00891876220703125,
-0.0024890899658203125,
0.0231781005859375,
0.0132904052734375,
-0.01434326171875,
-0.01422882080078125,
0.007602691650390625,
0.0771484375,
0.0301666259765625,
-0.04632568359375,
0.004825592041015625,
-0.0240631103515625,
-0.0325927734375,
0.0289154052734375,
0.01502227783203125,
-0.0007405281066894531,
-0.00379180908203125,
0.050811767578125,
-0.04278564453125,
-0.032073974609375,
-0.01360321044921875,
-0.045135498046875,
0.0028057098388671875,
0.002685546875,
0.007843017578125,
-0.01171875,
0.042755126953125,
0.0684814453125,
0.0526123046875,
0.041229248046875,
0.021209716796875,
-0.01380157470703125,
0.004161834716796875,
0.039947509765625,
-0.068603515625,
0.0309600830078125,
-0.0256195068359375,
0.042327880859375,
0.01885986328125,
-0.01425933837890625,
0.007259368896484375,
-0.01001739501953125,
0.005191802978515625,
-0.034027099609375,
0.03277587890625,
-0.0755615234375,
-0.029327392578125,
-0.032012939453125,
-0.0039520263671875,
0.00315093994140625,
0.04913330078125,
-0.0181427001953125,
0.01290130615234375,
-0.0030765533447265625,
-0.0185394287109375,
0.0029430389404296875,
-0.00568389892578125,
-0.0684814453125,
0.005298614501953125,
-0.053009033203125,
0.01000213623046875,
-0.0147552490234375,
-0.02001953125,
-0.0225982666015625,
0.013092041015625,
-0.0399169921875,
-0.0193634033203125,
0.040863037109375,
0.057952880859375,
0.0009455680847167969,
-0.0166778564453125,
0.002788543701171875,
-0.020172119140625,
-0.032501220703125,
0.0278167724609375,
-0.0379638671875,
-0.002590179443359375,
0.004367828369140625,
0.01291656494140625,
-0.00992584228515625,
0.02398681640625,
-0.0252838134765625,
0.02532958984375,
0.00592041015625,
0.0165557861328125,
-0.024993896484375,
-0.00994873046875,
-0.003063201904296875,
0.0012226104736328125,
-0.00887298583984375,
-0.0050811767578125,
0.019317626953125,
0.01100921630859375,
-0.038726806640625,
-0.0028018951416015625,
-0.03692626953125,
-0.0172119140625,
0.020172119140625,
-0.04364013671875,
-0.053802490234375,
-0.0377197265625,
-0.049224853515625,
0.0251007080078125,
-0.051971435546875,
0.0189056396484375,
-0.045989990234375,
-0.08709716796875,
-0.004016876220703125,
-0.0299072265625,
0.0103759765625,
0.0233306884765625,
0.031890869140625,
0.01305389404296875,
0.01126861572265625,
-0.0199432373046875,
-0.001644134521484375,
0.0260162353515625,
0.0052337646484375,
0.0291290283203125,
0.031707763671875,
0.0019550323486328125,
-0.023651123046875,
-0.004016876220703125,
-0.02215576171875,
-0.01531219482421875,
0.06146240234375,
-0.0201873779296875,
-0.0052947998046875,
0.005573272705078125,
-0.04638671875,
0.0499267578125,
0.0208740234375,
0.0001386404037475586,
-0.0107421875,
-0.0058746337890625,
0.04595947265625,
-0.00962066650390625,
0.01471710205078125,
-0.0226287841796875,
-0.0084991455078125,
0.004741668701171875,
0.03814697265625,
0.059844970703125,
0.03948974609375,
-0.00449371337890625,
0.037261962890625,
0.0011148452758789062,
-0.005764007568359375,
-0.0018129348754882812,
-0.0213775634765625,
-0.0286865234375,
0.00550079345703125,
0.0008082389831542969,
-0.0235595703125,
0.0130615234375,
-0.0007619857788085938,
0.029693603515625,
-0.015777587890625,
-0.041259765625,
-0.017974853515625,
-0.0217742919921875,
0.0195465087890625,
0.023284912109375,
-0.013092041015625,
0.0224761962890625,
0.030548095703125,
0.003871917724609375,
0.0038623809814453125,
0.0123291015625,
0.0089263916015625,
-0.024749755859375,
0.00506591796875,
-0.00699615478515625,
-0.0010805130004882812,
0.0460205078125,
0.03546142578125,
-0.0185699462890625,
0.035797119140625,
-0.0133209228515625,
0.058868408203125,
0.05419921875,
-0.019561767578125,
0.00534820556640625,
0.0187225341796875,
0.01427459716796875,
-0.06744384765625,
0.004467010498046875,
-0.0164031982421875,
-0.03875732421875,
0.0245819091796875,
0.0252685546875,
0.0017290115356445312,
0.0245208740234375,
-0.00461578369140625,
-0.0011720657348632812,
-0.048370361328125,
0.03204345703125,
0.0250396728515625,
-0.049713134765625,
-0.0091400146484375,
0.019775390625,
-0.0240936279296875,
0.022918701171875,
0.008941650390625,
-0.040191650390625,
-0.02838134765625,
-0.04730224609375,
-0.0183868408203125,
-0.056488037109375,
-0.0171966552734375,
0.0018625259399414062,
0.0285491943359375,
0.0023555755615234375,
0.0140228271484375,
-0.03143310546875,
-0.017578125,
-0.034912109375,
0.0012884140014648438,
0.05792236328125,
-0.01491546630859375,
0.030242919921875,
-0.050567626953125,
0.0188140869140625,
0.01175689697265625,
-0.006282806396484375,
0.057159423828125,
0.0247802734375,
-0.0295257568359375,
-0.00470733642578125,
-0.0096282958984375,
-0.00298309326171875,
-0.023895263671875,
-0.0362548828125,
-0.0272674560546875,
-0.0017614364624023438,
0.015869140625,
0.0116424560546875,
-0.011444091796875,
-0.02655029296875,
-0.0177764892578125,
0.038116455078125,
0.03955078125,
0.042755126953125,
0.006389617919921875,
0.0653076171875,
-0.01244354248046875,
0.08636474609375,
0.035888671875,
0.0227508544921875,
-0.04376220703125,
-0.041656494140625,
0.0031414031982421875,
-0.03582763671875,
-0.0482177734375,
0.0160980224609375,
-0.0248565673828125,
0.027679443359375,
0.027099609375,
-0.01554107666015625,
-0.006374359130859375,
-0.029022216796875,
0.0102691650390625,
-0.036224365234375,
0.036163330078125,
-0.0633544921875,
-0.0266571044921875,
-0.037078857421875,
0.004413604736328125,
0.04754638671875,
0.01412200927734375,
-0.0124053955078125,
-0.007221221923828125,
-0.00453948974609375,
0.0019779205322265625,
0.00463104248046875,
-0.0061187744140625,
-0.0013980865478515625,
0.04425048828125,
0.0190277099609375,
0.06658935546875,
0.0184478759765625,
0.043975830078125,
0.0628662109375,
-0.0372314453125,
-0.037933349609375,
-0.00366973876953125,
0.058013916015625,
0.015533447265625,
0.0017557144165039062,
0.09429931640625,
-0.005306243896484375,
0.005832672119140625,
0.054901123046875,
0.05462646484375,
-0.0989990234375,
0.01201629638671875,
0.01419830322265625,
0.024627685546875,
0.035858154296875,
0.0185546875,
0.001628875732421875,
0.0119781494140625,
-0.03094482421875,
-0.0248260498046875,
-0.019012451171875,
-0.0157470703125,
-0.002933502197265625,
-0.004627227783203125,
0.0004062652587890625,
0.000553131103515625,
0.005519866943359375,
-0.0670166015625,
0.01325225830078125,
0.0543212890625,
-0.00402069091796875,
-0.0162200927734375,
0.005016326904296875,
0.0157012939453125,
-0.03363037109375,
-0.0360107421875,
0.032135009765625,
0.00220489501953125,
-0.00727081298828125,
0.0738525390625,
0.0174407958984375,
-0.01259613037109375,
0.0299835205078125,
-0.020751953125,
0.054412841796875,
-0.020660400390625,
-0.034088134765625,
-0.0139617919921875,
-0.0333251953125,
0.00705718994140625,
0.0105133056640625,
-0.046173095703125,
0.0261383056640625,
-0.0291748046875,
-0.030059814453125,
-0.0011720657348632812,
0.06707763671875,
0.132568359375,
-0.04730224609375,
-0.033843994140625,
0.04046630859375,
0.00479888916015625,
-0.0298919677734375,
-0.03826904296875,
-0.01311492919921875,
-0.04229736328125,
0.00988006591796875,
-0.053192138671875,
-0.0306549072265625,
0.018157958984375,
-0.0716552734375,
-0.11273193359375,
0.10882568359375,
-0.00505828857421875,
0.10162353515625,
0.0017805099487304688,
0.01031494140625,
0.0017118453979492188,
0.004573822021484375,
-0.01119232177734375,
0.05560302734375,
0.00445556640625,
0.01239776611328125,
-0.0193939208984375,
-0.0103912353515625,
0.007617950439453125,
0.03759765625,
0.08770751953125,
0.0127105712890625,
-0.0110321044921875,
-0.026763916015625,
0.06475830078125,
0.071044921875,
0.006256103515625,
-0.004703521728515625,
0.0158538818359375,
0.07464599609375,
0.0273284912109375,
-0.033416748046875,
0.02911376953125,
-0.01209259033203125,
-0.0306854248046875,
0.0465087890625,
0.047088623046875,
0.06317138671875,
0.0184326171875,
0.025390625,
-0.01483154296875,
0.01629638671875,
0.04876708984375,
-0.009674072265625,
0.004276275634765625,
-0.01320648193359375,
0.0118408203125,
-0.0716552734375,
-0.028839111328125,
-0.0218658447265625,
0.0220794677734375,
0.0243072509765625,
0.0085601806640625,
-0.0024967193603515625,
0.0172576904296875,
-0.00440216064453125,
-0.0192108154296875,
0.0079498291015625,
0.047760009765625,
-0.037384033203125,
0.0205078125,
0.0209503173828125,
0.01190948486328125,
-0.019317626953125,
0.0174407958984375,
0.037078857421875,
0.0247955322265625,
-0.0300140380859375,
-0.0171661376953125,
0.002597808837890625,
0.0045166015625,
-0.000007867813110351562,
-0.02349853515625,
-0.00359344482421875,
0.006855010986328125,
0.038909912109375,
-0.0209197998046875,
-0.01015472412109375,
0.0179595947265625,
0.032196044921875,
-0.006008148193359375,
-0.031036376953125,
-0.01081085205078125,
0.0002338886260986328,
-0.043304443359375,
-0.0306243896484375,
-0.0090789794921875,
0.04571533203125,
0.08233642578125,
0.0024166107177734375,
0.03570556640625,
-0.02740478515625,
-0.00659942626953125,
0.0179443359375,
0.0007381439208984375,
0.011505126953125,
-0.043426513671875,
-0.044281005859375,
0.04669189453125,
0.031158447265625,
0.0104522705078125,
0.027496337890625,
0.0306243896484375,
-0.0014600753784179688,
-0.024169921875,
-0.0034961700439453125,
0.030059814453125,
-0.032257080078125,
0.027587890625,
-0.052276611328125,
0.0322265625,
-0.00931549072265625,
-0.018646240234375,
-0.01080322265625,
-0.0029087066650390625,
0.0293426513671875,
-0.042724609375,
0.02587890625,
-0.003223419189453125,
-0.0243072509765625,
0.06732177734375,
-0.046478271484375,
0.050445556640625,
-0.03033447265625,
-0.0203399658203125,
0.00862884521484375,
-0.023223876953125,
-0.039154052734375,
0.004833221435546875,
0.035491943359375,
-0.0159454345703125,
0.021331787109375,
0.0128631591796875,
0.0268707275390625,
-0.01336669921875,
-0.0433349609375,
0.04205322265625,
0.0245361328125,
-0.0011453628540039062,
0.043731689453125,
-0.060455322265625,
-0.0396728515625,
-0.0199737548828125,
0.0242767333984375,
-0.019500732421875,
0.10760498046875,
-0.0270538330078125,
0.0031147003173828125,
-0.025146484375,
0.0307464599609375,
-0.052703857421875,
-0.0262603759765625,
0.040313720703125,
0.00846099853515625,
0.007625579833984375,
-0.00688934326171875,
0.00988006591796875,
0.04095458984375,
0.017791748046875,
-0.0406494140625,
0.029754638671875,
-0.034454345703125,
-0.003597259521484375,
-0.045562744140625,
0.027130126953125,
-0.0180816650390625,
-0.0193023681640625,
-0.0275421142578125,
0.007251739501953125,
0.0197296142578125,
0.00829315185546875,
-0.036956787109375,
0.01678466796875,
0.044342041015625,
-0.015411376953125,
0.031005859375,
-0.00815582275390625,
0.07159423828125,
0.05029296875,
0.00841522216796875,
0.01175689697265625,
-0.0008921623229980469,
-0.0126953125,
-0.006496429443359375,
0.02459716796875,
-0.054351806640625,
0.020477294921875,
-0.046112060546875,
-0.037628173828125,
-0.03485107421875,
-0.0132293701171875,
-0.0250244140625,
-0.01378631591796875,
-0.020965576171875,
-0.0106964111328125,
-0.0224761962890625,
0.046539306640625,
0.0009484291076660156,
0.0097808837890625,
-0.0518798828125,
-0.004638671875,
-0.0338134765625,
-0.07208251953125,
-0.08343505859375,
-0.0036907196044921875,
0.029998779296875,
0.0087432861328125,
-0.062469482421875,
0.031463623046875,
-0.0244140625,
0.033233642578125,
-0.023468017578125,
-0.0023326873779296875,
-0.01178741455078125,
0.03924560546875,
0.00311279296875,
-0.027862548828125,
-0.036956787109375,
0.046295166015625,
-0.0302276611328125,
0.01561737060546875,
0.01018524169921875,
-0.02178955078125,
-0.028533935546875,
0.006542205810546875,
0.018096923828125,
0.056854248046875,
0.029449462890625,
-0.0277252197265625,
-0.037811279296875,
0.028961181640625,
0.0019502639770507812,
-0.03167724609375,
0.02630615234375,
-0.03839111328125,
-0.03662109375,
0.0020503997802734375,
-0.01227569580078125,
-0.0005254745483398438,
-0.03271484375,
-0.048980712890625,
0.0496826171875,
0.00742340087890625,
-0.0264129638671875,
-0.00817108154296875,
0.005428314208984375,
0.003582000732421875,
0.029022216796875,
0.0185089111328125,
-0.026641845703125,
-0.0225677490234375,
-0.01103973388671875,
-0.01311492919921875,
0.035430908203125,
-0.005893707275390625,
-0.00696563720703125,
-0.000148773193359375,
0.034027099609375,
0.035247802734375,
-0.01366424560546875,
0.004947662353515625,
0.0006418228149414062,
0.009979248046875,
0.01013946533203125,
-0.0423583984375,
-0.01806640625,
-0.006923675537109375,
0.01177978515625,
-0.005130767822265625,
-0.004665374755859375,
-0.006439208984375,
-0.003139495849609375,
0.060028076171875,
0.0240325927734375,
0.0176544189453125,
-0.02838134765625,
0.03717041015625,
-0.0267333984375,
-0.045562744140625,
-0.01511383056640625,
0.020416259765625,
-0.06988525390625,
-0.02435302734375,
0.031219482421875,
0.0187835693359375,
-0.0109710693359375,
-0.020111083984375,
-0.02899169921875,
-0.0306243896484375,
-0.037322998046875,
0.01959228515625,
-0.0758056640625,
0.063232421875,
0.044769287109375,
-0.041839599609375,
-0.00029015541076660156,
0.0087738037109375,
-0.03997802734375,
0.0318603515625,
0.0009708404541015625,
-0.0260009765625,
-0.005168914794921875,
-0.031158447265625,
0.0029354095458984375,
-0.00937652587890625,
0.042816162109375,
-0.0258941650390625,
-0.00106048583984375,
-0.0245208740234375,
0.00606536865234375,
0.0101470947265625,
-0.01251220703125,
-0.04840087890625,
0.029022216796875,
0.004032135009765625,
0.0748291015625,
-0.06005859375,
0.045074462890625,
-0.01381683349609375,
-0.000988006591796875,
-0.0104522705078125,
0.040069580078125,
0.05029296875,
-0.014312744140625,
0.00788116455078125,
-0.004238128662109375,
-0.027923583984375,
-0.002239227294921875,
-0.00800323486328125,
-0.005527496337890625,
-0.027496337890625,
0.012603759765625
]
|
fe6de2832c48fa38b405ab33d5600a03ddb8f0ce | Wordpress Stackexchange
Q: Is including the loop necessary for page.php? QUESTION: Is it necessary to include the wordpress loop in page.php? If it is not necessary, why do many themes (including the wordpress 2013 default theme) include it?
I noticed this discussion on the wordpress forums, but I didn't understand the final answer.
furthermore it is stated,
You use The Loop in your template files to show posts to visitors. (Source:http://codex.wordpress.org/The_Loop_in_Action)
BACKGROUND: I am attempting to develop special page templates, and I realized that I don't quite understand what the benefit is of including the loop for pages.php, because after all, pages don't care about posts, that is something that concerns index.php.
A: Including Loop is not necessary, but recommended. Also, if you want to use some features you need the loop, for example:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
| Q: Is including the loop necessary for page.php? QUESTION: Is it necessary to include the wordpress loop in page.php? If it is not necessary, why do many themes (including the wordpress 2013 default theme) include it?
I noticed this discussion on the wordpress forums, but I didn't understand the final answer.
furthermore it is stated,
You use The Loop in your template files to show posts to visitors. (Source:http://codex.wordpress.org/The_Loop_in_Action)
BACKGROUND: I am attempting to develop special page templates, and I realized that I don't quite understand what the benefit is of including the loop for pages.php, because after all, pages don't care about posts, that is something that concerns index.php.
A: Including Loop is not necessary, but recommended. Also, if you want to use some features you need the loop, for example:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
A: I think you're also confused by terminology, as the wording in WordPress is a bit, well, confusing.
So all post types, including pages are special types of posts. So "post" can mean the actual usable post type "Post" as well as the general term of all content like "Page" or any other custom post type.
When the Codex says
You use The Loop in your template files to show posts to visitors.
What it actually means is
You use The Loop in your template files to show posts, pages or any other single item of a custom post type to visitors.
| wordpress | {
"language": "en",
"length": 250,
"provenance": "stackexchange_00019.jsonl.gz:439987",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125891"
} | [
0.054351806640625,
-0.003498077392578125,
0.0115509033203125,
-0.0192718505859375,
0.0028228759765625,
-0.0260772705078125,
0.054351806640625,
-0.0216522216796875,
0.034332275390625,
0.01007080078125,
-0.034149169921875,
-0.01300048828125,
-0.025848388671875,
-0.0159149169921875,
-0.0171661376953125,
-0.03436279296875,
0.0379638671875,
0.002048492431640625,
0.05120849609375,
0.01219940185546875,
0.005950927734375,
0.03778076171875,
0.0251617431640625,
0.0380859375,
0.00042510032653808594,
-0.0406494140625,
0.0684814453125,
-0.01849365234375,
-0.019866943359375,
-0.04541015625,
-0.0051422119140625,
0.051116943359375,
0.033599853515625,
-0.0009751319885253906,
-0.010772705078125,
-0.0004584789276123047,
-0.00836944580078125,
-0.00737762451171875,
0.0008349418640136719,
0.00860595703125,
-0.0164947509765625,
0.016876220703125,
0.030303955078125,
-0.0203094482421875,
-0.02276611328125,
0.004077911376953125,
-0.04046630859375,
-0.03411865234375,
-0.00439453125,
0.00717926025390625,
0.01519775390625,
-0.00127410888671875,
0.0223846435546875,
0.033721923828125,
-0.01490020751953125,
-0.00044417381286621094,
0.020538330078125,
-0.05010986328125,
0.0209503173828125,
-0.04931640625,
-0.036712646484375,
-0.0103302001953125,
0.039642333984375,
0.00908660888671875,
-0.004894256591796875,
-0.01544952392578125,
-0.06341552734375,
0.0191802978515625,
-0.06488037109375,
-0.00982666015625,
0.049560546875,
-0.05963134765625,
-0.0207061767578125,
-0.00164031982421875,
-0.008544921875,
-0.00122833251953125,
-0.0094146728515625,
-0.02294921875,
0.00909423828125,
0.033538818359375,
-0.05877685546875,
0.0172271728515625,
-0.06903076171875,
-0.0443115234375,
-0.0022754669189453125,
-0.01532745361328125,
-0.0243377685546875,
0.014373779296875,
-0.036285400390625,
-0.07025146484375,
-0.030059814453125,
0.0247650146484375,
-0.051727294921875,
-0.0516357421875,
-0.056976318359375,
-0.0204010009765625,
0.002475738525390625,
0.029052734375,
-0.01922607421875,
0.0270538330078125,
0.0016107559204101562,
-0.050872802734375,
0.054412841796875,
-0.0401611328125,
0.0142669677734375,
0.036651611328125,
-0.02783203125,
0.04876708984375,
0.06573486328125,
0.041717529296875,
0.0189056396484375,
0.0184173583984375,
-0.0174102783203125,
-0.04541015625,
-0.01107025146484375,
0.0272064208984375,
-0.03741455078125,
0.0179290771484375,
0.0106964111328125,
0.015899658203125,
0.0200042724609375,
0.0455322265625,
-0.022705078125,
-0.041351318359375,
0.00980377197265625,
-0.0046234130859375,
-0.0198974609375,
-0.04241943359375,
0.035888671875,
0.03192138671875,
-0.0245208740234375,
-0.0240020751953125,
0.02740478515625,
0.01433563232421875,
0.0002543926239013672,
-0.036529541015625,
-0.020111083984375,
-0.0145416259765625,
-0.0192718505859375,
0.035125732421875,
-0.059295654296875,
-0.041046142578125,
0.0259552001953125,
-0.038482666015625,
0.054229736328125,
0.0182037353515625,
0.00982666015625,
0.0204925537109375,
0.034942626953125,
-0.006534576416015625,
0.04254150390625,
-0.0185089111328125,
-0.0252227783203125,
0.011566162109375,
0.052520751953125,
-0.03753662109375,
-0.035552978515625,
-0.00763702392578125,
0.054412841796875,
0.0341796875,
-0.0113067626953125,
-0.01001739501953125,
0.01007080078125,
-0.0297088623046875,
-0.036285400390625,
0.0206451416015625,
-0.0099639892578125,
-0.000014483928680419922,
0.021636962890625,
0.00008392333984375,
0.02508544921875,
-0.0284576416015625,
0.0206146240234375,
0.028411865234375,
0.00719451904296875,
0.0275421142578125,
0.01416015625,
0.0004062652587890625,
0.0155792236328125,
0.0295257568359375,
-0.021392822265625,
-0.02685546875,
0.0576171875,
-0.041748046875,
-0.07989501953125,
0.0296478271484375,
0.0146484375,
0.047088623046875,
0.00891876220703125,
0.005519866943359375,
0.0802001953125,
0.0266876220703125,
-0.0156402587890625,
0.02532958984375,
-0.0026073455810546875,
-0.029052734375,
0.009307861328125,
0.016510009765625,
-0.005641937255859375,
-0.03936767578125,
-0.022430419921875,
-0.0181732177734375,
-0.0033893585205078125,
0.0090484619140625,
-0.0302276611328125,
-0.0096435546875,
-0.02655029296875,
0.03070068359375,
0.03973388671875,
0.006591796875,
0.0032711029052734375,
-0.00421905517578125,
-0.0247802734375,
0.002567291259765625,
-0.054901123046875,
0.01338958740234375,
-0.0155792236328125,
0.00021469593048095703,
0.017974853515625,
-0.02313232421875,
0.0283355712890625,
0.0018911361694335938,
0.01232147216796875,
-0.0010557174682617188,
0.06451416015625,
-0.0190887451171875,
-0.0173187255859375,
-0.045257568359375,
-0.01050567626953125,
0.01329803466796875,
-0.08642578125,
0.04888916015625,
0.0019817352294921875,
-0.0039043426513671875,
-0.06500244140625,
-0.007427215576171875,
-0.043243408203125,
-0.0172271728515625,
-0.0178680419921875,
0.058990478515625,
0.03369140625,
0.0238800048828125,
-0.0186920166015625,
0.0039215087890625,
0.01058197021484375,
-0.053131103515625,
0.004817962646484375,
-0.0013246536254882812,
0.0019893646240234375,
0.051544189453125,
0.02386474609375,
0.018341064453125,
0.0015592575073242188,
-0.042205810546875,
0.0095367431640625,
0.0205230712890625,
0.018463134765625,
0.044677734375,
-0.0203094482421875,
-0.0160675048828125,
0.0008559226989746094,
-0.0269317626953125,
-0.01666259765625,
-0.0313720703125,
-0.0014448165893554688,
0.007328033447265625,
0.01171112060546875,
0.00876617431640625,
-0.004245758056640625,
-0.007038116455078125,
0.004764556884765625,
-0.03546142578125,
-0.00907135009765625,
0.005893707275390625,
-0.06689453125,
0.0270843505859375,
-0.03607177734375,
0.01534271240234375,
-0.005977630615234375,
-0.005512237548828125,
-0.01409912109375,
0.00335693359375,
0.01110076904296875,
-0.01477813720703125,
0.0023975372314453125,
-0.0208587646484375,
0.025909423828125,
-0.004268646240234375,
0.07281494140625,
-0.0142974853515625,
0.009246826171875,
0.00884246826171875,
-0.024261474609375,
0.058349609375,
0.0185546875,
-0.055633544921875,
0.04229736328125,
-0.01123809814453125,
0.0093841552734375,
-0.0171356201171875,
0.0233154296875,
0.041107177734375,
-0.0060882568359375,
-0.005107879638671875,
0.0139312744140625,
0.0083465576171875,
0.030029296875,
0.038848876953125,
0.0235595703125,
-0.004161834716796875,
-0.0153656005859375,
0.012237548828125,
0.0296173095703125,
0.06610107421875,
-0.00421905517578125,
-0.0213623046875,
0.00305938720703125,
0.036834716796875,
-0.07330322265625,
-0.08917236328125,
0.019134521484375,
-0.051605224609375,
-0.043212890625,
-0.004367828369140625,
-0.0347900390625,
0.006305694580078125,
0.010040283203125,
-0.008636474609375,
-0.048553466796875,
-0.0183258056640625,
-0.0770263671875,
-0.11859130859375,
-0.0731201171875,
-0.059661865234375,
-0.0236663818359375,
0.0016231536865234375,
-0.01065826416015625,
0.0753173828125,
-0.005077362060546875,
-0.07049560546875,
-0.048309326171875,
0.0009107589721679688,
-0.0279083251953125,
-0.019866943359375,
-0.03564453125,
0.0178985595703125,
-0.0074462890625,
0.0152130126953125,
-0.053070068359375,
-0.02569580078125,
0.034088134765625,
-0.03448486328125,
-0.01445770263671875,
0.0126800537109375,
-0.0009546279907226562,
0.025848388671875,
0.034942626953125,
-0.016815185546875,
-0.0137939453125,
-0.041473388671875,
-0.033172607421875,
-0.004669189453125,
-0.05633544921875,
-0.046112060546875,
0.024932861328125,
0.002704620361328125,
-0.04742431640625,
0.00685882568359375,
-0.006389617919921875,
-0.0178680419921875,
-0.040771484375,
-0.027557373046875,
0.049560546875,
0.007808685302734375,
0.0265960693359375,
0.0311279296875,
0.043487548828125,
-0.02191162109375,
-0.01568603515625,
0.0008797645568847656,
-0.0206146240234375,
-0.00882720947265625,
-0.0081024169921875,
-0.011138916015625,
-0.04052734375,
0.038604736328125,
0.01334381103515625,
0.0030994415283203125,
0.005767822265625,
-0.01088714599609375,
0.025665283203125,
0.0712890625,
-0.0347900390625,
-0.033111572265625,
-0.054656982421875,
0.000995635986328125,
0.0099639892578125,
-0.0208282470703125,
0.04296875,
-0.0165252685546875,
-0.0041656494140625,
-0.00498199462890625,
-0.026031494140625,
0.0304107666015625,
-0.020477294921875,
0.07989501953125,
0.0148162841796875,
-0.0230255126953125,
0.0025787353515625,
-0.0244293212890625,
0.0110015869140625,
0.00905609130859375,
-0.00846099853515625,
-0.0038433074951171875,
0.0201873779296875,
-0.062042236328125,
-0.05426025390625,
-0.0021800994873046875,
-0.0399169921875,
0.06561279296875,
0.0312042236328125,
-0.0276947021484375,
-0.00434112548828125,
0.035736083984375,
0.006816864013671875,
0.01154327392578125,
0.02099609375,
0.00540924072265625,
-0.0120697021484375,
0.032012939453125,
0.02886962890625,
-0.0107879638671875,
-0.006572723388671875,
-0.0245208740234375,
0.004730224609375,
0.026397705078125,
-0.0298614501953125,
-0.006031036376953125,
-0.0207366943359375,
0.004253387451171875,
-0.017578125,
-0.0127105712890625,
0.018463134765625,
0.0260772705078125,
0.01030731201171875,
0.003871917724609375,
-0.02984619140625,
-0.0198516845703125,
0.034881591796875,
0.03302001953125,
-0.01541900634765625,
0.0290985107421875,
0.057403564453125,
0.005924224853515625,
-0.03460693359375,
-0.11175537109375,
0.005218505859375,
0.036224365234375,
-0.0303497314453125,
0.09100341796875,
0.0601806640625,
0.00600433349609375,
0.03289794921875,
0.01861572265625,
0.0005717277526855469,
0.0006780624389648438,
0.006336212158203125,
-0.005535125732421875,
-0.038818359375,
0.0330810546875,
-0.017547607421875,
0.034912109375,
0.0289306640625,
-0.01039886474609375,
-0.006191253662109375,
0.03289794921875,
0.0221099853515625,
-0.035247802734375,
0.017913818359375,
-0.0223541259765625,
-0.01416015625,
-0.0151824951171875,
0.017547607421875,
0.0343017578125,
0.03436279296875,
0.0035858154296875,
0.019256591796875,
0.04180908203125,
0.0018634796142578125,
0.03216552734375,
0.005466461181640625,
0.0202789306640625,
0.034515380859375,
0.02471923828125,
0.006999969482421875,
-0.006465911865234375,
0.0007824897766113281,
0.0264434814453125,
-0.00714874267578125,
-0.032562255859375,
-0.0306243896484375,
0.0004405975341796875,
0.037078857421875,
0.0162506103515625,
0.06591796875,
0.053741455078125,
0.004779815673828125,
-0.01422882080078125,
-0.0216217041015625,
0.0355224609375,
0.004375457763671875,
-0.04241943359375,
-0.00811767578125,
0.00397491455078125,
-0.0127716064453125,
-0.00460052490234375,
0.02862548828125,
-0.027587890625,
0.0197906494140625,
-0.01177978515625,
0.05340576171875,
0.043243408203125,
0.0111846923828125,
-0.002231597900390625,
0.048095703125,
-0.034393310546875,
0.012054443359375,
-0.005222320556640625,
-0.0521240234375,
0.0068817138671875,
0.0021190643310546875,
0.058135986328125,
-0.0445556640625,
-0.0474853515625,
0.044525146484375,
-0.03717041015625,
-0.001800537109375,
0.0307769775390625,
0.02203369140625,
-0.0194244384765625,
-0.0168304443359375,
0.00412750244140625,
0.0307464599609375,
-0.005718231201171875,
0.0013742446899414062,
-0.01207733154296875,
-0.01329803466796875,
0.017730712890625,
-0.017913818359375,
-0.01515960693359375,
-0.00844573974609375,
0.0027904510498046875,
-0.01513671875,
-0.00785064697265625,
-0.0038776397705078125,
-0.04156494140625,
-0.0186767578125,
-0.0208892822265625,
-0.006694793701171875,
0.03009033203125,
-0.00016176700592041016,
0.05230712890625,
-0.01177978515625,
-0.07342529296875,
0.0230560302734375,
0.0027294158935546875,
0.048492431640625,
0.0200042724609375,
-0.06964111328125,
0.0247650146484375,
-0.08062744140625,
-0.0070037841796875,
-0.0482177734375,
-0.0609130859375,
-0.06146240234375,
-0.017730712890625,
0.01409149169921875,
0.00838470458984375,
0.01544189453125,
0.0145416259765625,
-0.04443359375,
0.048919677734375,
0.0304718017578125,
0.0782470703125,
-0.026947021484375,
0.057342529296875,
0.0240478515625,
0.00489044189453125,
0.0214996337890625,
0.02313232421875,
-0.010101318359375,
-0.002872467041015625,
0.032958984375,
-0.007389068603515625,
-0.037261962890625,
-0.01812744140625,
-0.033477783203125,
-0.01439666748046875,
0.0234375,
-0.01554107666015625,
0.0016803741455078125,
-0.0207366943359375,
0.0024871826171875,
-0.01335906982421875,
0.054901123046875,
-0.008270263671875,
-0.0257720947265625,
0.04296875,
0.0140533447265625,
-0.00800323486328125,
0.006664276123046875,
-0.0144805908203125,
-0.01102447509765625,
0.032257080078125,
0.00124359130859375,
-0.050994873046875,
-0.048797607421875,
0.07659912109375,
0.06011962890625,
-0.031280517578125,
0.0252227783203125,
0.0101165771484375,
-0.019989013671875,
0.0069732666015625,
0.04327392578125,
-0.02386474609375,
-0.05535888671875,
0.051849365234375,
0.0235443115234375,
-0.0275115966796875,
0.03851318359375,
-0.028900146484375,
-0.0083160400390625,
0.04022216796875,
0.0626220703125,
-0.031341552734375,
-0.021697998046875,
0.038818359375,
-0.0169525146484375,
-0.0168914794921875,
-0.027435302734375,
0.00936126708984375,
-0.0264892578125,
0.07928466796875,
-0.0009512901306152344,
-0.016845703125,
0.0218505859375,
-0.0294342041015625,
0.0013065338134765625,
-0.04498291015625,
0.049774169921875,
0.00971221923828125,
-0.016204833984375,
0.00799560546875,
0.00832366943359375,
0.00910186767578125,
-0.003917694091796875,
0.00415802001953125,
-0.0269622802734375,
-0.031982421875,
-0.02667236328125,
-0.00811767578125,
-0.0304718017578125,
0.006893157958984375,
0.0259857177734375,
0.0292816162109375,
-0.0050201416015625,
0.06683349609375,
-0.003887176513671875,
0.0430908203125,
0.03131103515625,
-0.003692626953125,
-0.0229034423828125,
-0.01800537109375,
0.038604736328125,
0.0215301513671875,
-0.057098388671875,
0.0274810791015625,
-0.0161590576171875,
-0.0111541748046875,
-0.0166168212890625,
-0.0298004150390625,
0.09539794921875,
-0.0269775390625,
-0.0291595458984375,
-0.006496429443359375,
0.0224151611328125,
0.0062408447265625,
-0.015838623046875,
0.0496826171875,
-0.03515625,
-0.004119873046875,
0.006763458251953125,
-0.004344940185546875,
-0.039031982421875,
-0.0487060546875,
-0.040008544921875,
0.07403564453125,
0.002216339111328125,
-0.0040435791015625,
0.012939453125,
0.04248046875,
-0.0211029052734375,
0.02557373046875,
0.007694244384765625,
0.0240478515625,
0.0474853515625,
0.0290069580078125,
-0.0177001953125,
-0.0380859375,
0.0060272216796875,
0.08056640625,
0.0220489501953125,
-0.0008401870727539062,
0.00018286705017089844,
-0.005352020263671875,
0.06622314453125,
0.09295654296875,
0.040771484375,
-0.01953125,
-0.02471923828125,
0.057342529296875,
0.02337646484375,
-0.060516357421875,
0.00832366943359375,
0.0050048828125,
-0.02899169921875,
0.0225372314453125,
0.01387786865234375,
-0.00421142578125,
0.0004687309265136719,
0.0239105224609375,
-0.044647216796875,
-0.00579071044921875,
0.02227783203125,
0.025146484375,
-0.05364990234375,
0.06396484375,
-0.038116455078125,
-0.01239776611328125,
-0.041259765625,
-0.037811279296875,
0.018829345703125,
-0.0110931396484375,
0.0256195068359375,
0.0186004638671875,
0.0108489990234375,
0.0194549560546875,
-0.00782012939453125,
-0.004119873046875,
0.0264892578125,
-0.0136871337890625,
-0.00027251243591308594,
0.0269012451171875,
0.0271148681640625,
-0.0079345703125,
0.0276031494140625,
0.01080322265625,
-0.0030364990234375,
-0.019989013671875,
-0.0179595947265625,
0.0182342529296875,
-0.0072021484375,
-0.0092620849609375,
-0.02191162109375,
-0.004405975341796875,
0.01468658447265625,
0.0265350341796875,
-0.0200347900390625,
-0.0121002197265625,
0.0014934539794921875,
-0.0193023681640625,
-0.006801605224609375,
-0.01024627685546875,
0.0276031494140625,
0.0183563232421875,
-0.01441192626953125,
0.0233306884765625,
0.014404296875,
0.030670166015625,
-0.008087158203125,
0.011199951171875,
-0.041290283203125,
-0.000400543212890625,
-0.0061798095703125,
0.00580596923828125,
-0.0233154296875,
0.0190887451171875,
-0.03411865234375,
-0.0340576171875,
-0.01114654541015625,
0.0411376953125,
0.0208282470703125,
0.027557373046875,
0.039031982421875,
-0.0097808837890625,
-0.042724609375,
0.0002353191375732422,
-0.0014591217041015625,
-0.045074462890625,
-0.035888671875,
-0.0105438232421875,
-0.022003173828125,
0.046600341796875,
-0.0027313232421875,
0.021148681640625,
-0.0157470703125,
0.0615234375,
-0.005767822265625,
0.0023632049560546875,
-0.0004944801330566406,
-0.0516357421875,
0.049652099609375,
0.0241241455078125,
0.1131591796875,
0.037841796875,
-0.045989990234375,
0.0025043487548828125,
-0.00914764404296875,
-0.0821533203125,
0.010467529296875,
0.0528564453125,
-0.01702880859375,
-0.00971221923828125,
0.022125244140625,
0.007114410400390625,
0.02874755859375,
-0.0026302337646484375,
-0.032745361328125,
-0.003902435302734375,
0.0655517578125,
-0.01311492919921875,
-0.037750244140625,
-0.0220794677734375,
-0.032562255859375,
0.0276336669921875,
0.038238525390625,
0.08013916015625,
-0.0121917724609375,
0.021392822265625,
0.03369140625,
0.00008732080459594727,
0.0208587646484375,
0.014923095703125,
0.022369384765625,
0.01309967041015625,
0.0135955810546875,
-0.03631591796875,
-0.04315185546875,
0.0175323486328125,
0.0284881591796875,
-0.037567138671875,
0.0045013427734375,
0.008941650390625,
0.005443572998046875,
-0.0098876953125,
0.0301361083984375,
-0.015167236328125,
-0.051025390625,
-0.019134521484375,
0.043914794921875,
0.0006747245788574219,
0.04217529296875,
-0.032989501953125,
-0.00957489013671875,
-0.02691650390625,
-0.0253143310546875,
0.0045623779296875,
0.00843048095703125,
-0.040557861328125,
0.01280975341796875,
0.0185699462890625,
0.0003898143768310547,
-0.02813720703125,
-0.0250091552734375,
0.01062774658203125,
-0.00763702392578125,
0.005222320556640625,
-0.017913818359375,
0.0101470947265625,
-0.005779266357421875,
0.0228424072265625,
0.037384033203125,
-0.0043792724609375,
-0.002288818359375,
0.00012671947479248047,
-0.01323699951171875,
0.01385498046875,
0.0086822509765625,
-0.00980377197265625,
-0.0293121337890625,
-0.017822265625,
0.00962066650390625,
-0.04205322265625,
-0.03564453125,
-0.06732177734375,
0.004024505615234375,
0.01032257080078125,
0.00313568115234375,
-0.04742431640625,
0.01459503173828125,
-0.00604248046875,
0.0220184326171875,
-0.033416748046875,
0.042724609375,
-0.0001049041748046875,
0.020172119140625,
-0.057647705078125,
0.0250396728515625,
-0.0013761520385742188,
-0.028045654296875,
0.01436614990234375,
0.00997161865234375,
0.02587890625,
-0.04693603515625,
-0.02587890625,
-0.0061798095703125,
0.044586181640625,
0.03558349609375,
0.07928466796875,
-0.0246429443359375,
0.0219879150390625,
0.003932952880859375,
0.0121002197265625,
-0.04620361328125,
-0.0142059326171875,
-0.034698486328125,
0.0289154052734375,
-0.00937652587890625,
0.01007080078125,
0.026214599609375,
-0.034088134765625,
-0.0770263671875,
0.051544189453125,
-0.015960693359375,
-0.04150390625,
-0.031341552734375,
-0.004566192626953125,
-0.01033782958984375,
0.005184173583984375,
-0.002086639404296875,
-0.03692626953125,
-0.0134124755859375,
0.03985595703125,
0.03704833984375,
-0.0196075439453125,
0.049346923828125,
0.006771087646484375,
-0.0367431640625,
0.0235595703125,
0.010772705078125,
0.011260986328125,
0.0120697021484375,
-0.0024776458740234375,
0.019866943359375,
0.04962158203125,
-0.040069580078125,
-0.025543212890625,
-0.0328369140625,
0.01334381103515625,
-0.01082611083984375,
0.001155853271484375,
-0.0196533203125,
-0.020172119140625,
0.08551025390625,
0.0469970703125,
0.02545166015625,
-0.00693511962890625,
-0.00498199462890625,
-0.05303955078125,
0.0025119781494140625,
0.01425933837890625,
0.013031005859375,
-0.052459716796875,
0.00980377197265625,
0.040374755859375,
-0.0058441162109375,
-0.00469970703125,
-0.0279998779296875,
-0.0379638671875,
-0.026824951171875,
-0.062744140625,
-0.01136016845703125,
-0.0120697021484375,
-0.0079193115234375,
-0.0010499954223632812,
-0.0026378631591796875,
0.014404296875,
-0.0264892578125,
0.026702880859375,
-0.005718231201171875,
0.019012451171875,
0.0161590576171875,
0.042205810546875,
-0.05194091796875,
-0.01183319091796875,
0.0234375,
0.035308837890625,
-0.0106964111328125,
-0.014251708984375,
-0.0192718505859375,
0.0264892578125,
0.01502227783203125,
0.026519775390625,
-0.03533935546875,
0.031646728515625,
0.01039886474609375,
0.05194091796875,
-0.00011861324310302734,
0.08709716796875,
-0.013763427734375,
0.057891845703125,
0.013458251953125,
-0.0345458984375,
0.04541015625,
-0.0426025390625,
0.01305389404296875,
0.01470947265625,
0.0017442703247070312,
0.00940704345703125,
-0.00887298583984375,
-0.00882720947265625,
-0.01226043701171875,
-0.0089111328125
]
|
2b8e01f5cd34b6f7e1c7eb226f95ee5d8e1d7fbc | Wordpress Stackexchange
Q: Redirect to current page after wordpress login I just want to redirect the users to their current page after logged in my wordpress website.
I have used the following but it won`t work for me since it is in page that created from the admin side.
<?php echo wp_login_url(get_permalink()); ?>
A: You can use the login_redirect filter to do this. One of the parameters is $request, which
is the URL the user is coming from
function wpse125952_redirect_to_request( $redirect_to, $request, $user ){
// instead of using $redirect_to we're redirecting back to $request
return $request;
}
add_filter('login_redirect', 'wpse125952_redirect_to_request', 10, 3);
The filter could additionally easily be used for distinguishing redirect destinations by user roles. Take a look at the documentation for a deeper insight into that.
| Q: Redirect to current page after wordpress login I just want to redirect the users to their current page after logged in my wordpress website.
I have used the following but it won`t work for me since it is in page that created from the admin side.
<?php echo wp_login_url(get_permalink()); ?>
A: You can use the login_redirect filter to do this. One of the parameters is $request, which
is the URL the user is coming from
function wpse125952_redirect_to_request( $redirect_to, $request, $user ){
// instead of using $redirect_to we're redirecting back to $request
return $request;
}
add_filter('login_redirect', 'wpse125952_redirect_to_request', 10, 3);
The filter could additionally easily be used for distinguishing redirect destinations by user roles. Take a look at the documentation for a deeper insight into that.
A: Try wp_redirect() http://codex.wordpress.org/Function_Reference/wp_redirect
Maybe the_permalink() will help you depending on where you're logging in from.
Alternatively is this what you're looking for?
<a href="<?php echo wp_login_url( get_permalink() ); ?>" title="Login">Login</a>
A: What do you mean by user's current page?
Anyway, have you tried using the built-in wp_login_form() function?
You may want to use it this way:
$args = array(
'echo' => true,
// This could be your User's Current Page?
'redirect' => site_url( $_SERVER['REQUEST_URI'] ),
'form_id' => 'user-login-form',
'label_username' => __( 'Username' ),
'label_password' => __( 'Password' ),
'label_remember' => __( 'Remember Me' ),
'label_log_in' => __( 'Log In' ),
'id_username' => 'user_login',
'id_password' => 'user_pass',
'id_remember' => 'rememberme',
'id_submit' => 'wp-submit',
'remember' => true,
'value_username' => NULL,
'value_remember' => false );
wp_login_form( $args );
A: Add Below in your function.php
function admin_default_page() {
$site=get_site_url();
$site1=$site."/* slug- name for page*/";
return $site1;
}
add_filter('login_redirect', 'admin_default_page');
A: Problem solved. I have installed a Wordpress plugin to execute Php code on pages.Then
<?php echo wp_login_url(get_permalink()); ?>
works well on wordpress pages.
http://wordpress.org/plugins/insert-php/
| wordpress | {
"language": "en",
"length": 296,
"provenance": "stackexchange_00019.jsonl.gz:440009",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125952"
} | [
0.056396484375,
-0.005603790283203125,
0.015960693359375,
-0.01212310791015625,
0.0108489990234375,
-0.0413818359375,
0.07855224609375,
-0.01172637939453125,
-0.00537109375,
0.01629638671875,
0.035980224609375,
-0.00007271766662597656,
-0.033660888671875,
-0.04852294921875,
0.01201629638671875,
0.0018644332885742188,
0.01104736328125,
-0.0126190185546875,
0.01131439208984375,
-0.020172119140625,
-0.004688262939453125,
-0.00598907470703125,
0.046539306640625,
0.010589599609375,
-0.0065155029296875,
-0.0018796920776367188,
0.08599853515625,
-0.030670166015625,
0.00659942626953125,
-0.0228424072265625,
0.00510406494140625,
-0.0270233154296875,
0.01708984375,
0.0264434814453125,
-0.033416748046875,
-0.047515869140625,
-0.01522064208984375,
0.00997161865234375,
-0.0010328292846679688,
0.00647735595703125,
0.0555419921875,
-0.03369140625,
-0.0223388671875,
0.0164642333984375,
-0.034881591796875,
-0.021240234375,
0.045654296875,
0.0037479400634765625,
0.00792694091796875,
0.027374267578125,
0.017791748046875,
0.01313018798828125,
0.0207672119140625,
0.0301513671875,
-0.00922393798828125,
-0.0014781951904296875,
-0.0023345947265625,
-0.0027256011962890625,
0.04632568359375,
-0.0250244140625,
-0.020477294921875,
-0.045074462890625,
0.036102294921875,
-0.0132293701171875,
-0.0172119140625,
0.004718780517578125,
-0.01094818115234375,
0.029205322265625,
-0.03857421875,
-0.05035400390625,
-0.005680084228515625,
-0.0161285400390625,
-0.027740478515625,
0.023162841796875,
-0.0210418701171875,
-0.01425933837890625,
0.0207366943359375,
0.005245208740234375,
0.006252288818359375,
0.04620361328125,
-0.0169677734375,
-0.0029888153076171875,
-0.0151214599609375,
-0.023223876953125,
0.018341064453125,
0.01026153564453125,
-0.03314208984375,
-0.01435089111328125,
-0.01168060302734375,
-0.0193023681640625,
-0.0260772705078125,
0.01114654541015625,
0.002330780029296875,
-0.0117950439453125,
-0.05120849609375,
-0.004093170166015625,
0.01078033447265625,
0.0302886962890625,
0.0156402587890625,
-0.00004750490188598633,
-0.0180206298828125,
-0.03173828125,
-0.0251922607421875,
-0.0189666748046875,
-0.0171966552734375,
0.029510498046875,
0.034027099609375,
0.036163330078125,
-0.00571441650390625,
0.0019283294677734375,
-0.005260467529296875,
-0.0115203857421875,
-0.048309326171875,
-0.052734375,
0.005863189697265625,
0.07220458984375,
-0.0171356201171875,
-0.01192474365234375,
0.00595855712890625,
0.0168304443359375,
-0.04693603515625,
-0.01910400390625,
0.033447265625,
-0.0145263671875,
0.0292816162109375,
-0.0027904510498046875,
-0.014801025390625,
-0.0204620361328125,
0.00676727294921875,
0.0146026611328125,
-0.01953125,
0.008331298828125,
0.032501220703125,
0.01457977294921875,
0.005649566650390625,
-0.022735595703125,
0.044677734375,
-0.041290283203125,
0.006252288818359375,
0.0175018310546875,
-0.0135498046875,
-0.0457763671875,
-0.032867431640625,
-0.0199127197265625,
0.0298919677734375,
0.03582763671875,
0.0189208984375,
0.0098876953125,
-0.01039886474609375,
-0.044219970703125,
0.018890380859375,
-0.030975341796875,
-0.0255126953125,
0.00540924072265625,
0.057952880859375,
0.003559112548828125,
0.011199951171875,
-0.006366729736328125,
0.0272674560546875,
0.0311431884765625,
0.07208251953125,
0.011138916015625,
0.00484466552734375,
0.003513336181640625,
-0.042510986328125,
-0.0215606689453125,
-0.07513427734375,
-0.0213775634765625,
0.024261474609375,
0.0122833251953125,
0.031219482421875,
-0.00394439697265625,
0.004459381103515625,
0.00749969482421875,
-0.00893402099609375,
-0.0080413818359375,
-0.0247955322265625,
0.037841796875,
0.01226806640625,
0.041778564453125,
0.029266357421875,
-0.00787353515625,
0.01953125,
0.031494140625,
-0.0292205810546875,
0.0335693359375,
0.0038776397705078125,
0.05767822265625,
-0.0181121826171875,
0.029083251953125,
-0.01349639892578125,
0.0244140625,
-0.0570068359375,
0.00923919677734375,
-0.0232696533203125,
-0.016845703125,
0.0199127197265625,
0.00027942657470703125,
-0.0189666748046875,
0.0292510986328125,
0.054229736328125,
0.0164642333984375,
-0.0106048583984375,
-0.0091094970703125,
-0.03656005859375,
0.01727294921875,
-0.00811004638671875,
0.0267791748046875,
0.048980712890625,
0.0022716522216796875,
-0.0148468017578125,
-0.00266265869140625,
0.0169830322265625,
-0.062347412109375,
-0.060577392578125,
0.03424072265625,
-0.020538330078125,
0.021697998046875,
-0.01160430908203125,
0.039794921875,
-0.006221771240234375,
-0.0340576171875,
-0.02862548828125,
-0.035125732421875,
0.032135009765625,
-0.032501220703125,
-0.0110015869140625,
-0.037933349609375,
-0.0085296630859375,
-0.01145172119140625,
-0.0419921875,
0.056884765625,
0.00812530517578125,
0.0102081298828125,
-0.0482177734375,
-0.004184722900390625,
-0.036041259765625,
-0.0163726806640625,
-0.0033702850341796875,
0.03814697265625,
0.02581787109375,
0.05706787109375,
0.020660400390625,
0.054840087890625,
0.01788330078125,
-0.07720947265625,
0.005352020263671875,
0.01495361328125,
0.035919189453125,
0.05889892578125,
-0.0015287399291992188,
-0.01971435546875,
0.007015228271484375,
-0.04278564453125,
0.026580810546875,
0.02862548828125,
-0.01018524169921875,
0.011688232421875,
-0.0201873779296875,
-0.0230865478515625,
-0.0035305023193359375,
-0.06787109375,
-0.035003662109375,
-0.0267181396484375,
-0.0482177734375,
-0.014678955078125,
-0.0275421142578125,
-0.0261688232421875,
-0.0038814544677734375,
-0.037200927734375,
0.042144775390625,
-0.0079193115234375,
-0.00363922119140625,
-0.0030384063720703125,
0.0259552001953125,
-0.03759765625,
-0.033660888671875,
0.0101165771484375,
0.0292816162109375,
-0.0200958251953125,
-0.00858306884765625,
-0.0014057159423828125,
-0.0206756591796875,
-0.0184173583984375,
0.031707763671875,
0.0025463104248046875,
-0.005580902099609375,
-0.0024871826171875,
0.06707763671875,
-0.0126495361328125,
0.02911376953125,
-0.0234222412109375,
-0.0380859375,
0.07769775390625,
-0.007678985595703125,
-0.0728759765625,
0.019317626953125,
-0.033203125,
0.03216552734375,
-0.03594970703125,
0.059814453125,
0.04791259765625,
-0.0253448486328125,
0.0286712646484375,
-0.00942230224609375,
0.0175018310546875,
0.01136016845703125,
-0.0221710205078125,
-0.02154541015625,
-0.00836181640625,
-0.03045654296875,
0.004955291748046875,
0.02313232421875,
0.044036865234375,
-0.01221466064453125,
-0.031524658203125,
-0.014739990234375,
0.01165771484375,
-0.05340576171875,
-0.06658935546875,
-0.07061767578125,
-0.094482421875,
0.0231475830078125,
0.0005593299865722656,
-0.0214385986328125,
0.01800537109375,
0.040802001953125,
0.0318603515625,
0.033203125,
-0.019927978515625,
-0.052764892578125,
-0.026214599609375,
-0.066650390625,
0.005802154541015625,
-0.01055908203125,
-0.0120849609375,
0.00809478759765625,
0.0008635520935058594,
-0.0033416748046875,
-0.0311279296875,
-0.0033817291259765625,
0.043914794921875,
-0.01137542724609375,
-0.046966552734375,
-0.04998779296875,
-0.0001537799835205078,
0.02740478515625,
-0.01021575927734375,
0.047821044921875,
0.006153106689453125,
0.00811004638671875,
0.005771636962890625,
-0.01132965087890625,
-0.0219879150390625,
-0.00588226318359375,
-0.0386962890625,
-0.004589080810546875,
-0.01522064208984375,
-0.0256805419921875,
-0.04901123046875,
0.01544189453125,
-0.0165557861328125,
-0.0494384765625,
-0.01140594482421875,
0.029144287109375,
-0.021575927734375,
0.00821685791015625,
-0.055389404296875,
0.0208740234375,
0.01568603515625,
-0.0166778564453125,
0.007762908935546875,
0.0285186767578125,
0.0009760856628417969,
0.01580810546875,
-0.014984130859375,
0.047821044921875,
-0.0117950439453125,
0.00994110107421875,
0.0099639892578125,
0.0099639892578125,
-0.0102691650390625,
0.00518798828125,
-0.04913330078125,
-0.10272216796875,
0.07958984375,
-0.014312744140625,
-0.0302734375,
-0.0296630859375,
-0.0261077880859375,
0.0254974365234375,
0.12359619140625,
-0.037811279296875,
0.0074005126953125,
0.000010669231414794922,
0.0039825439453125,
-0.0184478759765625,
-0.0168914794921875,
-0.07696533203125,
-0.0002048015594482422,
-0.09100341796875,
-0.01114654541015625,
-0.0290985107421875,
-0.00402069091796875,
-0.0006136894226074219,
-0.0029964447021484375,
-0.0225067138671875,
-0.0628662109375,
0.0211639404296875,
0.0009937286376953125,
0.00041484832763671875,
-0.00966644287109375,
-0.019256591796875,
-0.0218963623046875,
0.025238037109375,
-0.0211334228515625,
-0.05462646484375,
-0.001438140869140625,
-0.0108184814453125,
0.051483154296875,
0.038848876953125,
-0.038238525390625,
-0.0011444091796875,
0.037872314453125,
0.0205230712890625,
0.0172271728515625,
0.001895904541015625,
-0.01084136962890625,
0.032440185546875,
-0.0020503997802734375,
-0.0164794921875,
-0.002658843994140625,
-0.004055023193359375,
-0.016632080078125,
0.00027060508728027344,
-0.033050537109375,
-0.04315185546875,
-0.0299072265625,
-0.00008177757263183594,
-0.0228424072265625,
-0.050750732421875,
-0.02215576171875,
0.013702392578125,
0.0233612060546875,
0.00018548965454101562,
0.005489349365234375,
-0.004856109619140625,
-0.05657958984375,
0.040618896484375,
0.015289306640625,
-0.03143310546875,
0.00556182861328125,
0.039947509765625,
0.018157958984375,
-0.016937255859375,
-0.004352569580078125,
-0.00011640787124633789,
0.0200958251953125,
-0.0352783203125,
0.0496826171875,
-0.01055145263671875,
-0.023590087890625,
0.0941162109375,
-0.029022216796875,
-0.000016987323760986328,
-0.038787841796875,
0.06396484375,
-0.0284423828125,
-0.037506103515625,
0.032928466796875,
-0.04620361328125,
0.01038360595703125,
0.034332275390625,
-0.0012378692626953125,
-0.007129669189453125,
0.0210723876953125,
0.0090789794921875,
-0.01552581787109375,
-0.00865936279296875,
-0.0113067626953125,
-0.046112060546875,
0.01126861572265625,
0.0276947021484375,
0.0182037353515625,
0.044036865234375,
-0.020172119140625,
0.04229736328125,
0.0176849365234375,
-0.0321044921875,
-0.004199981689453125,
-0.03692626953125,
0.022308349609375,
0.0291290283203125,
-0.050933837890625,
-0.009552001953125,
0.00838470458984375,
-0.0200653076171875,
0.09552001953125,
0.0203857421875,
-0.041961669921875,
0.034515380859375,
-0.052093505859375,
-0.047821044921875,
0.0234222412109375,
-0.01358795166015625,
0.049468994140625,
0.021514892578125,
-0.035858154296875,
-0.014739990234375,
-0.018157958984375,
-0.0251007080078125,
-0.06658935546875,
0.01293182373046875,
-0.0211944580078125,
0.0161895751953125,
0.0340576171875,
0.079833984375,
0.0041656494140625,
0.07672119140625,
-0.0270843505859375,
0.022705078125,
0.0158538818359375,
0.02142333984375,
0.01033782958984375,
0.0131988525390625,
0.00717926025390625,
-0.00897979736328125,
0.0177001953125,
-0.036834716796875,
-0.01111602783203125,
0.0000368952751159668,
0.0367431640625,
0.00494384765625,
0.005096435546875,
0.032501220703125,
-0.0009822845458984375,
0.00591278076171875,
0.037841796875,
-0.008453369140625,
-0.0865478515625,
-0.01544189453125,
0.026275634765625,
0.0196075439453125,
-0.050018310546875,
-0.021942138671875,
-0.0021209716796875,
-0.0333251953125,
0.025238037109375,
0.0095672607421875,
-0.009002685546875,
-0.0020542144775390625,
-0.0266876220703125,
-0.048492431640625,
-0.04736328125,
0.004779815673828125,
-0.033416748046875,
0.00925445556640625,
-0.025970458984375,
-0.0177154541015625,
0.01708984375,
-0.0032672882080078125,
0.041412353515625,
-0.042083740234375,
-0.0194244384765625,
0.0091705322265625,
-0.013641357421875,
0.059295654296875,
0.014617919921875,
-0.0574951171875,
-0.01366424560546875,
-0.041229248046875,
-0.0101776123046875,
0.0145416259765625,
-0.00928497314453125,
-0.0169677734375,
-0.0148162841796875,
0.0228271484375,
0.02423095703125,
0.0158233642578125,
-0.0019054412841796875,
-0.05474853515625,
0.00023245811462402344,
0.024810791015625,
0.0243682861328125,
0.0013580322265625,
0.0789794921875,
-0.01861572265625,
0.043487548828125,
0.00809478759765625,
0.05438232421875,
-0.0121307373046875,
-0.017303466796875,
0.039154052734375,
0.015167236328125,
-0.043975830078125,
-0.054443359375,
-0.023712158203125,
-0.00469207763671875,
0.0804443359375,
-0.02069091796875,
-0.00559234619140625,
0.001895904541015625,
0.004657745361328125,
-0.0179595947265625,
-0.00638580322265625,
0.0241241455078125,
-0.01436614990234375,
0.0218505859375,
0.0265045166015625,
0.0096893310546875,
-0.0153961181640625,
-0.0191192626953125,
-0.031707763671875,
0.045623779296875,
-0.002178192138671875,
-0.01515960693359375,
-0.042755126953125,
0.0521240234375,
0.07958984375,
-0.01148223876953125,
0.0380859375,
0.0234375,
0.003406524658203125,
0.032318115234375,
-0.010467529296875,
0.004512786865234375,
0.02935791015625,
0.055419921875,
-0.00463104248046875,
-0.0103302001953125,
0.0362548828125,
-0.02532958984375,
-0.00820159912109375,
0.10101318359375,
0.06475830078125,
-0.151611328125,
0.02496337890625,
0.00652313232421875,
0.03411865234375,
0.0210723876953125,
0.00896453857421875,
0.0018825531005859375,
0.005092620849609375,
0.01910400390625,
-0.00543212890625,
-0.00865936279296875,
0.01473236083984375,
0.00933074951171875,
-0.0205535888671875,
-0.01166534423828125,
0.0265655517578125,
0.005138397216796875,
-0.057220458984375,
-0.01250457763671875,
0.02801513671875,
-0.040618896484375,
-0.0197906494140625,
-0.001880645751953125,
0.015838623046875,
-0.016632080078125,
-0.034332275390625,
0.04827880859375,
-0.020050048828125,
0.025054931640625,
0.0452880859375,
-0.015625,
0.052764892578125,
0.055816650390625,
-0.01540374755859375,
0.02587890625,
0.01233673095703125,
-0.011962890625,
0.026885986328125,
-0.0357666015625,
-0.00490570068359375,
-0.011199951171875,
-0.06329345703125,
0.00366973876953125,
-0.031768798828125,
-0.01146697998046875,
-0.01348876953125,
-0.05877685546875,
0.0731201171875,
-0.007354736328125,
-0.0213775634765625,
0.00612640380859375,
0.0184783935546875,
-0.00701904296875,
-0.01140594482421875,
-0.0108184814453125,
-0.033966064453125,
-0.01302337646484375,
-0.0251922607421875,
-0.017181396484375,
0.0526123046875,
-0.0263824462890625,
-0.05584716796875,
0.06689453125,
-0.0244293212890625,
0.04205322265625,
0.027984619140625,
0.0240631103515625,
-0.01461029052734375,
0.0036716461181640625,
-0.0205230712890625,
0.05072021484375,
0.01515960693359375,
0.038787841796875,
-0.0330810546875,
-0.006893157958984375,
0.024383544921875,
0.0289154052734375,
0.044403076171875,
0.026947021484375,
-0.06268310546875,
0.00632476806640625,
0.051544189453125,
0.0229644775390625,
0.0137481689453125,
0.07464599609375,
-0.00531005859375,
0.0202178955078125,
0.0015411376953125,
-0.0458984375,
0.0191497802734375,
-0.03619384765625,
-0.029388427734375,
0.007427215576171875,
0.0037174224853515625,
-0.0263671875,
-0.01007843017578125,
0.03411865234375,
-0.10003662109375,
0.028106689453125,
0.047698974609375,
0.0411376953125,
0.00290679931640625,
0.01531219482421875,
0.01422882080078125,
-0.02392578125,
0.01268768310546875,
-0.0277099609375,
0.02947998046875,
-0.00551605224609375,
0.00290679931640625,
0.04107666015625,
0.0233154296875,
0.00882720947265625,
-0.00644683837890625,
0.0057220458984375,
0.0207672119140625,
-0.021087646484375,
0.091552734375,
0.0247039794921875,
0.02593994140625,
-0.033172607421875,
0.0078582763671875,
0.0196533203125,
0.086669921875,
-0.05291748046875,
-0.01375579833984375,
0.0106658935546875,
0.004489898681640625,
0.03759765625,
-0.002044677734375,
0.065673828125,
-0.0241546630859375,
-0.0243988037109375,
0.0029144287109375,
0.003173828125,
0.003170013427734375,
0.01296234130859375,
0.0036716461181640625,
0.006832122802734375,
-0.01629638671875,
0.0200958251953125,
-0.01287078857421875,
-0.004657745361328125,
0.006809234619140625,
0.004978179931640625,
0.00028586387634277344,
0.020538330078125,
0.0264129638671875,
0.0146942138671875,
-0.0034694671630859375,
0.0013093948364257812,
-0.0352783203125,
0.0189666748046875,
-0.046844482421875,
-0.042755126953125,
-0.00846099853515625,
0.04742431640625,
0.003742218017578125,
-0.012603759765625,
-0.01515960693359375,
-0.0121002197265625,
-0.005222320556640625,
-0.01529693603515625,
0.01374053955078125,
-0.019683837890625,
0.035430908203125,
-0.0150146484375,
-0.0073089599609375,
-0.01555633544921875,
-0.03375244140625,
-0.0251922607421875,
0.0099945068359375,
0.021697998046875,
-0.01355743408203125,
0.047698974609375,
-0.00677490234375,
-0.033416748046875,
0.0009555816650390625,
-0.0258941650390625,
0.07733154296875,
-0.0080718994140625,
-0.07891845703125,
-0.01129913330078125,
-0.05218505859375,
-0.0275726318359375,
0.035308837890625,
0.037139892578125,
0.00661468505859375,
-0.00807952880859375,
-0.003322601318359375,
0.00679779052734375,
0.00650787353515625,
-0.0287017822265625,
0.0233306884765625,
-0.0206451416015625,
0.00966644287109375,
0.0014657974243164062,
-0.0745849609375,
-0.020782470703125,
-0.038360595703125,
0.004360198974609375,
0.02496337890625,
0.04791259765625,
0.005527496337890625,
0.0278472900390625,
-0.039703369140625,
0.01300811767578125,
-0.049285888671875,
-0.04736328125,
0.056549072265625,
-0.005184173583984375,
-0.02294921875,
0.00228118896484375,
-0.0689697265625,
0.054779052734375,
-0.003997802734375,
0.032440185546875,
0.044586181640625,
-0.0067901611328125,
0.0036678314208984375,
0.0277252197265625,
-0.0010395050048828125,
-0.0296478271484375,
-0.0552978515625,
-0.016571044921875,
0.0321044921875,
-0.0010137557983398438,
0.017181396484375,
-0.0206298828125,
0.049163818359375,
-0.0282745361328125,
-0.0297088623046875,
-0.00800323486328125,
-0.052337646484375,
-0.037933349609375,
0.0172882080078125,
0.00514984130859375,
0.018463134765625,
0.0136260986328125,
-0.0174560546875,
0.01190948486328125,
0.0028705596923828125,
0.00308990478515625,
-0.0008869171142578125,
0.0231475830078125,
0.00516510009765625,
-0.031005859375,
0.0056304931640625,
0.00022780895233154297,
-0.013031005859375,
-0.01910400390625,
-0.01078033447265625,
-0.01070404052734375,
-0.0738525390625,
-0.038909912109375,
-0.051422119140625,
-0.0025424957275390625,
0.0222625732421875,
-0.0018863677978515625,
-0.054901123046875,
-0.035064697265625,
0.01067352294921875,
0.00827789306640625,
-0.00994873046875,
-0.0413818359375,
0.02777099609375,
-0.027587890625,
0.040802001953125,
-0.04290771484375,
-0.0186004638671875,
0.018646240234375,
0.04058837890625,
-0.041595458984375,
0.0282745361328125,
-0.0272216796875,
-0.05743408203125,
-0.0184173583984375,
-0.02349853515625,
0.028717041015625,
0.01016998291015625,
-0.02008056640625,
-0.048187255859375,
-0.061614990234375,
0.0130615234375,
-0.04376220703125,
-0.0367431640625,
-0.0015926361083984375,
0.00881195068359375,
0.0198822021484375,
0.0029964447021484375,
-0.0081939697265625,
0.0275421142578125,
0.01338958740234375,
-0.01479339599609375,
-0.0115509033203125,
0.006412506103515625,
-0.040191650390625,
-0.055267333984375,
0.0369873046875,
0.00510406494140625,
-0.03448486328125,
-0.03106689453125,
0.03997802734375,
0.01207733154296875,
-0.0352783203125,
-0.0064544677734375,
-0.042724609375,
-0.0070343017578125,
0.01274871826171875,
0.01824951171875,
0.01708984375,
0.0172271728515625,
0.018463134765625,
-0.0155792236328125,
0.0244903564453125,
0.0141143798828125,
0.00887298583984375,
-0.02996826171875,
0.01409149169921875,
0.0154266357421875,
0.042510986328125,
0.007061004638671875,
0.0143585205078125,
0.026336669921875,
0.0026683807373046875,
-0.016815185546875,
-0.033203125,
0.0305328369140625,
-0.008697509765625,
-0.00470733642578125,
0.0105438232421875,
-0.01113128662109375,
0.0016002655029296875,
-0.058746337890625,
-0.0284271240234375,
-0.0166168212890625,
-0.0216217041015625,
0.0261077880859375,
-0.098876953125,
-0.01067352294921875,
0.00870513916015625,
-0.0109100341796875,
-0.017181396484375,
0.007305145263671875,
-0.034210205078125,
-0.00601959228515625,
0.01480865478515625,
0.0188751220703125,
-0.03729248046875,
-0.003948211669921875,
0.0499267578125,
-0.04205322265625,
-0.00002771615982055664,
0.0035991668701171875,
0.01543426513671875,
0.008453369140625,
-0.0184173583984375,
0.034027099609375,
0.035064697265625,
-0.02386474609375,
-0.035675048828125,
0.050079345703125,
0.00495147705078125,
0.03167724609375,
-0.0394287109375,
-0.004878997802734375,
0.037933349609375,
-0.02557373046875,
0.050018310546875,
0.034210205078125,
0.02850341796875,
0.01459503173828125,
0.050750732421875,
-0.004817962646484375,
0.00872802734375,
-0.027923583984375,
0.034637451171875,
-0.0079193115234375,
-0.0258636474609375,
0.03216552734375,
-0.0369873046875,
0.0011625289916992188,
0.028167724609375,
0.03363037109375,
-0.0216217041015625,
0.02874755859375,
-0.0028057098388671875,
0.039154052734375,
0.01544952392578125
]
|
02a1b98b4f06a2503ce2f0d827b3c573588f9cb9 | Wordpress Stackexchange
Q: Do WordPress cron jobs slow down page loading? If a user visits a site and his visit triggers a cron job that is quite intensive, the page load speed will be slower for him right? As I understand the page doesn't wait for the cron job to execute before loading, but since the cron job would be running in parallel, it might still be the case that the page loads slower since the server is busy right?
A: Short answer - Nope. Any page request initializes the scheduled queue. It's just an initialize request. Wp-cron request is a standalone request.
so requesting URL /somepage you just initialize request to /wp-cron.php
However - If cron event doesn't work really well (it's has 1000 db queries e.g. or its requesting a some really long-to-respond resource), or both, or re-scheduling cron event for each request... just like any other http request it will eat resources, CPU performance, memory, etc... if it eats enough resources, your page will become slower.
| Q: Do WordPress cron jobs slow down page loading? If a user visits a site and his visit triggers a cron job that is quite intensive, the page load speed will be slower for him right? As I understand the page doesn't wait for the cron job to execute before loading, but since the cron job would be running in parallel, it might still be the case that the page loads slower since the server is busy right?
A: Short answer - Nope. Any page request initializes the scheduled queue. It's just an initialize request. Wp-cron request is a standalone request.
so requesting URL /somepage you just initialize request to /wp-cron.php
However - If cron event doesn't work really well (it's has 1000 db queries e.g. or its requesting a some really long-to-respond resource), or both, or re-scheduling cron event for each request... just like any other http request it will eat resources, CPU performance, memory, etc... if it eats enough resources, your page will become slower.
A: The short answer is actually yes, in most cases.
Firstly, on most set-ups, spawning a cron job incurs a 1 second delay on page load, because it is done via a loopback HTTP request with a 1 second timeout - see https://wordpress.org/support/topic/save-a-full-second-on-cron-execution/.
Secondly, the spawned job will now be competing with the page load for database access (as well as other resources). Multiple processes can read the database concurrently; however, whenever a process is writing to the database, by default it is locked to prevent simultaneous write or read access by any other process - see https://stackoverflow.com/questions/1005206/does-sqlite-lock-the-database-file-on-reads#answer-1005218. The impact of this depends how complex the cron job's database updates are and how long the database is actually locked for, and may be insignificant. Of course, it would also be an issue if a cron job happened to be running when a page is requested, but having cron jobs spawned on page load guarantees they'll affect at least that page load.
If your server/hosting permits, you are recommended to set up a scheduled cron job to run every few hours, with the command
php -q /path/to/wp-cron.php
and disable cron spawning on page load with the following entry in wp-config.php:
define('DISABLE_WP_CRON', true);
| wordpress | {
"language": "en",
"length": 368,
"provenance": "stackexchange_00019.jsonl.gz:440022",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/125995"
} | [
0.04510498046875,
0.00365447998046875,
-0.003978729248046875,
-0.016754150390625,
0.01174163818359375,
-0.04168701171875,
0.034881591796875,
-0.0283050537109375,
-0.02764892578125,
0.023468017578125,
-0.04473876953125,
0.0205841064453125,
0.022705078125,
-0.00826263427734375,
0.0175933837890625,
-0.0333251953125,
0.044036865234375,
0.01666259765625,
0.028533935546875,
-0.005489349365234375,
-0.019195556640625,
0.038116455078125,
0.0012826919555664062,
0.0902099609375,
0.030181884765625,
-0.017547607421875,
0.0379638671875,
0.01442718505859375,
0.0135498046875,
0.0020427703857421875,
0.036163330078125,
-0.03839111328125,
0.0118560791015625,
-0.0002551078796386719,
0.0205230712890625,
-0.00516510009765625,
-0.0279541015625,
0.009033203125,
0.01500701904296875,
0.00524139404296875,
0.00620269775390625,
0.0011377334594726562,
0.04461669921875,
0.00004023313522338867,
-0.0027675628662109375,
-0.014678955078125,
0.004573822021484375,
-0.057403564453125,
-0.004058837890625,
-0.03204345703125,
0.037567138671875,
0.01520538330078125,
0.054046630859375,
0.00843048095703125,
-0.015380859375,
0.0007109642028808594,
-0.0318603515625,
0.08514404296875,
0.0139923095703125,
-0.05865478515625,
-0.024658203125,
0.030364990234375,
0.01678466796875,
0.03826904296875,
0.007221221923828125,
-0.010894775390625,
-0.001739501953125,
0.039337158203125,
-0.03826904296875,
-0.017059326171875,
0.0272064208984375,
-0.025543212890625,
-0.0252838134765625,
0.03228759765625,
-0.0147705078125,
-0.046905517578125,
0.027313232421875,
-0.039947509765625,
0.0170745849609375,
0.0594482421875,
0.01904296875,
0.008453369140625,
0.0028858184814453125,
0.006103515625,
0.0126190185546875,
0.0167236328125,
-0.01355743408203125,
-0.02337646484375,
-0.044219970703125,
-0.04833984375,
-0.050567626953125,
0.039031982421875,
-0.041656494140625,
-0.052215576171875,
-0.054595947265625,
-0.00774383544921875,
0.0094757080078125,
-0.006397247314453125,
-0.00408172607421875,
-0.016693115234375,
0.025390625,
-0.028717041015625,
0.0046844482421875,
0.0065155029296875,
-0.0037555694580078125,
0.032196044921875,
0.0330810546875,
0.059814453125,
0.036163330078125,
0.00589752197265625,
-0.004058837890625,
0.046478271484375,
0.0188140869140625,
0.01800537109375,
-0.0123748779296875,
-0.03863525390625,
-0.0205535888671875,
0.03070068359375,
-0.01776123046875,
0.007167816162109375,
-0.01158905029296875,
0.0082550048828125,
-0.0005445480346679688,
-0.0232086181640625,
-0.00010311603546142578,
-0.032989501953125,
-0.0034198760986328125,
-0.0080413818359375,
-0.034576416015625,
0.0579833984375,
0.0023441314697265625,
-0.0142059326171875,
0.0047760009765625,
0.035736083984375,
-0.019317626953125,
-0.0279998779296875,
-0.0008678436279296875,
-0.060028076171875,
0.0002052783966064453,
0.0282440185546875,
0.0013227462768554688,
-0.053466796875,
-0.0158843994140625,
0.0023365020751953125,
0.058563232421875,
0.01413726806640625,
0.01511383056640625,
0.00786590576171875,
0.004058837890625,
0.012359619140625,
0.0221099853515625,
-0.006908416748046875,
0.0304107666015625,
0.0092010498046875,
0.01861572265625,
-0.038604736328125,
0.054168701171875,
-0.038421630859375,
0.013641357421875,
-0.035675048828125,
-0.034393310546875,
0.0066375732421875,
0.03778076171875,
-0.0207366943359375,
-0.0212554931640625,
-0.01216888427734375,
-0.0227813720703125,
-0.0011625289916992188,
0.031707763671875,
-0.03973388671875,
0.0278472900390625,
-0.024810791015625,
0.046783447265625,
0.020172119140625,
0.0072784423828125,
0.03204345703125,
0.052032470703125,
0.0231475830078125,
0.01419830322265625,
-0.007526397705078125,
-0.030181884765625,
-0.0386962890625,
0.0904541015625,
-0.06427001953125,
-0.03277587890625,
0.048828125,
-0.00972747802734375,
0.03436279296875,
0.0188140869140625,
0.0167083740234375,
-0.0156707763671875,
0.02197265625,
-0.00948333740234375,
-0.002330780029296875,
0.0169525146484375,
-0.01032257080078125,
-0.026031494140625,
0.005817413330078125,
0.006374359130859375,
-0.0204620361328125,
0.07061767578125,
0.0207672119140625,
-0.00801849365234375,
-0.01247406005859375,
-0.10150146484375,
0.0183868408203125,
-0.034149169921875,
0.0273895263671875,
0.0345458984375,
0.03973388671875,
-0.0006036758422851562,
0.0352783203125,
-0.0234527587890625,
-0.03875732421875,
-0.02752685546875,
0.03131103515625,
-0.0236968994140625,
0.03619384765625,
-0.01184844970703125,
0.038787841796875,
-0.0198822021484375,
-0.05291748046875,
-0.0214691162109375,
0.019439697265625,
0.010162353515625,
0.03021240234375,
-0.040283203125,
0.0110015869140625,
0.01383209228515625,
0.016021728515625,
0.01242828369140625,
0.0237579345703125,
0.0419921875,
0.07183837890625,
-0.016082763671875,
0.0016412734985351562,
-0.00888824462890625,
-0.03375244140625,
-0.01513671875,
0.033111572265625,
0.0291290283203125,
0.033721923828125,
-0.0018949508666992188,
0.00603485107421875,
0.0034580230712890625,
-0.03094482421875,
0.02703857421875,
-0.010223388671875,
-0.0113525390625,
-0.02410888671875,
-0.006229400634765625,
-0.0258331298828125,
0.035888671875,
-0.0556640625,
-0.0007734298706054688,
0.04083251953125,
0.015838623046875,
0.028839111328125,
-0.0037479400634765625,
-0.0030536651611328125,
-0.0016927719116210938,
0.0224761962890625,
-0.01494598388671875,
0.01232147216796875,
-0.05340576171875,
-0.014984130859375,
-0.0309906005859375,
-0.0216522216796875,
0.00213623046875,
-0.01422119140625,
0.049041748046875,
-0.044891357421875,
0.0027408599853515625,
0.007152557373046875,
-0.0021724700927734375,
-0.0141754150390625,
-0.0562744140625,
0.027587890625,
0.005634307861328125,
-0.005115509033203125,
0.0009589195251464844,
0.01364898681640625,
-0.0162353515625,
-0.009429931640625,
-0.01445770263671875,
0.01503753662109375,
0.030120849609375,
0.035736083984375,
-0.015869140625,
0.0250396728515625,
0.0293426513671875,
0.043212890625,
-0.0109100341796875,
0.02337646484375,
0.0170440673828125,
-0.0094146728515625,
0.0484619140625,
-0.039764404296875,
0.0340576171875,
-0.0338134765625,
0.01320648193359375,
0.04248046875,
-0.01132965087890625,
0.0209197998046875,
0.01453399658203125,
-0.01351165771484375,
0.016082763671875,
0.0214996337890625,
-0.00926971435546875,
0.0279083251953125,
-0.1138916015625,
-0.0229339599609375,
0.029815673828125,
0.07830810546875,
-0.01132965087890625,
-0.035980224609375,
0.0146026611328125,
0.02679443359375,
-0.050811767578125,
-0.10943603515625,
-0.07391357421875,
-0.05169677734375,
-0.0165863037109375,
-0.034912109375,
-0.000308990478515625,
0.03839111328125,
-0.03924560546875,
0.021240234375,
-0.038299560546875,
-0.00963592529296875,
-0.052001953125,
-0.046142578125,
-0.039886474609375,
0.02838134765625,
-0.0233001708984375,
0.0188446044921875,
0.0012884140014648438,
0.10345458984375,
0.01244354248046875,
-0.07623291015625,
-0.0220947265625,
-0.00814056396484375,
-0.0372314453125,
0.01617431640625,
0.00800323486328125,
-0.0302734375,
0.0168609619140625,
-0.0019311904907226562,
-0.002902984619140625,
0.01666259765625,
-0.01102447509765625,
-0.01419830322265625,
0.005626678466796875,
-0.00720977783203125,
-0.01001739501953125,
0.051422119140625,
0.0072174072265625,
-0.0291748046875,
0.0037479400634765625,
-0.053924560546875,
-0.022247314453125,
-0.02813720703125,
-0.0430908203125,
-0.00786590576171875,
0.055633544921875,
-0.003925323486328125,
-0.00823211669921875,
-0.02783203125,
0.00949859619140625,
0.0013408660888671875,
0.0164337158203125,
-0.00865936279296875,
0.0180206298828125,
-0.0021648406982421875,
0.01184844970703125,
-0.0263214111328125,
0.06805419921875,
-0.025177001953125,
0.035125732421875,
0.0316162109375,
-0.03460693359375,
-0.053680419921875,
-0.0269622802734375,
-0.1053466796875,
-0.032440185546875,
0.0318603515625,
-0.02606201171875,
0.00940704345703125,
-0.03973388671875,
-0.0136566162109375,
-0.0144195556640625,
0.0557861328125,
0.036865234375,
-0.0279388427734375,
-0.027740478515625,
0.0261383056640625,
-0.0677490234375,
-0.06329345703125,
0.01593017578125,
0.00411224365234375,
-0.0229644775390625,
0.047271728515625,
0.00482177734375,
0.01483917236328125,
-0.035888671875,
0.04071044921875,
-0.017333984375,
-0.01983642578125,
0.0057525634765625,
-0.035491943359375,
-0.00037407875061035156,
-0.0217437744140625,
0.0018663406372070312,
-0.04522705078125,
0.017578125,
-0.050994873046875,
-0.05718994140625,
-0.0167083740234375,
-0.0022335052490234375,
0.0256500244140625,
-0.0017881393432617188,
-0.0048370361328125,
-0.003070831298828125,
0.0278778076171875,
0.0565185546875,
0.0287322998046875,
0.0116119384765625,
-0.0631103515625,
0.031280517578125,
0.040313720703125,
0.0357666015625,
0.00768280029296875,
0.01079559326171875,
-0.00688934326171875,
-0.02215576171875,
-0.000392913818359375,
-0.0302276611328125,
0.0031833648681640625,
0.000015974044799804688,
-0.024383544921875,
-0.047454833984375,
-0.045166015625,
-0.0305633544921875,
0.01232147216796875,
-0.0031223297119140625,
-0.0163421630859375,
-0.06475830078125,
-0.0634765625,
0.0240020751953125,
-0.0114593505859375,
0.02410888671875,
0.00044417381286621094,
0.0654296875,
0.0130462646484375,
-0.0185546875,
0.005672454833984375,
0.0160980224609375,
0.0140533447265625,
0.005100250244140625,
0.07073974609375,
0.00506591796875,
0.020233154296875,
0.0355224609375,
-0.01114654541015625,
-0.004680633544921875,
-0.008209228515625,
0.0550537109375,
0.0051727294921875,
-0.03631591796875,
0.03564453125,
-0.0109405517578125,
-0.00922393798828125,
0.053192138671875,
-0.02398681640625,
0.003620147705078125,
0.017578125,
0.02734375,
-0.050689697265625,
0.00490570068359375,
-0.03826904296875,
-0.034759521484375,
0.01393890380859375,
0.01519012451171875,
0.034698486328125,
0.002536773681640625,
-0.0022640228271484375,
0.0377197265625,
0.047760009765625,
0.0100860595703125,
0.0357666015625,
0.0250244140625,
0.00518798828125,
0.03387451171875,
0.0290985107421875,
-0.0034732818603515625,
-0.02093505859375,
-0.01058197021484375,
0.05303955078125,
0.01221466064453125,
-0.01071929931640625,
-0.0299835205078125,
-0.006557464599609375,
0.005512237548828125,
-0.0000027418136596679688,
-0.0226898193359375,
0.023773193359375,
0.0163726806640625,
-0.01119232177734375,
-0.011016845703125,
-0.0174560546875,
-0.01947021484375,
-0.04412841796875,
0.019378662109375,
0.0037841796875,
-0.0117645263671875,
0.03485107421875,
0.01373291015625,
-0.0229644775390625,
0.0174102783203125,
-0.0020961761474609375,
0.091552734375,
0.050537109375,
0.022705078125,
-0.013763427734375,
0.023651123046875,
-0.01727294921875,
0.0183868408203125,
-0.0311126708984375,
0.0017547607421875,
0.001384735107421875,
0.0042572021484375,
0.0087432861328125,
-0.027008056640625,
-0.0070343017578125,
0.042510986328125,
-0.0272674560546875,
-0.04705810546875,
0.031280517578125,
0.0248870849609375,
-0.01290130615234375,
-0.05950927734375,
-0.04779052734375,
0.045684814453125,
0.04376220703125,
-0.0007882118225097656,
0.038726806640625,
0.006221771240234375,
0.0557861328125,
-0.040313720703125,
0.054656982421875,
-0.040191650390625,
-0.036895751953125,
0.02581787109375,
-0.0098114013671875,
-0.0181427001953125,
0.003936767578125,
0.01085662841796875,
-0.025054931640625,
-0.01345062255859375,
0.04534912109375,
0.00463104248046875,
0.028472900390625,
-0.05462646484375,
0.0012578964233398438,
-0.0799560546875,
0.00496673583984375,
0.0247039794921875,
0.00020766258239746094,
-0.0108642578125,
-0.0245361328125,
-0.07183837890625,
-0.0406494140625,
-0.10162353515625,
-0.0379638671875,
-0.06591796875,
0.0426025390625,
-0.005512237548828125,
-0.0014104843139648438,
-0.0026836395263671875,
-0.0093841552734375,
-0.0163421630859375,
0.0289764404296875,
0.02734375,
-0.02374267578125,
-0.04156494140625,
0.04559326171875,
0.00510406494140625,
0.0198211669921875,
-0.0017528533935546875,
0.0264434814453125,
0.031158447265625,
-0.0145111083984375,
-0.0002884864807128906,
-0.02569580078125,
-0.00048828125,
-0.004695892333984375,
-0.04791259765625,
0.0094146728515625,
0.066650390625,
-0.0005993843078613281,
0.0095367431640625,
-0.0079193115234375,
0.0162811279296875,
-0.0244598388671875,
-0.0070037841796875,
-0.027313232421875,
-0.005496978759765625,
0.0100250244140625,
0.007801055908203125,
0.028411865234375,
-0.0129547119140625,
-0.006839752197265625,
-0.0042572021484375,
-0.00112152099609375,
-0.00283050537109375,
-0.0119171142578125,
-0.06005859375,
0.0699462890625,
0.0936279296875,
0.015655517578125,
0.07708740234375,
0.00803375244140625,
0.016326904296875,
0.045166015625,
0.0134429931640625,
-0.036224365234375,
-0.03240966796875,
0.0233917236328125,
-0.0036773681640625,
-0.0189208984375,
0.00537872314453125,
-0.016876220703125,
-0.003787994384765625,
0.0802001953125,
0.058135986328125,
-0.0987548828125,
-0.0125274658203125,
0.006679534912109375,
-0.0133514404296875,
-0.0287628173828125,
-0.035369873046875,
0.00582122802734375,
-0.07598876953125,
0.0894775390625,
0.032470703125,
0.00981903076171875,
0.025848388671875,
-0.0235748291015625,
0.0009469985961914062,
0.003307342529296875,
0.018646240234375,
0.0243377685546875,
-0.0521240234375,
0.04071044921875,
0.03643798828125,
0.047149658203125,
-0.08154296875,
0.0018167495727539062,
0.014312744140625,
-0.0019092559814453125,
-0.060150146484375,
0.052490234375,
-0.0011539459228515625,
0.06390380859375,
0.035736083984375,
-0.0032100677490234375,
0.0186309814453125,
0.0266265869140625,
-0.0037937164306640625,
0.0032958984375,
0.0015316009521484375,
0.0093841552734375,
0.008331298828125,
-0.03033447265625,
-0.00289154052734375,
0.00542449951171875,
-0.045623779296875,
-0.0007123947143554688,
-0.014617919921875,
-0.017913818359375,
-0.004779815673828125,
-0.030364990234375,
0.059722900390625,
-0.0155487060546875,
-0.01055908203125,
0.01172637939453125,
0.0038394927978515625,
0.0138397216796875,
-0.0174102783203125,
0.010223388671875,
0.007106781005859375,
0.0168304443359375,
-0.0207366943359375,
-0.01494598388671875,
0.000015020370483398438,
-0.025634765625,
-0.02154541015625,
0.03204345703125,
-0.0239410400390625,
-0.0262451171875,
0.0190277099609375,
0.0174407958984375,
-0.0038814544677734375,
0.01334381103515625,
-0.0302886962890625,
0.023895263671875,
0.0235748291015625,
0.055389404296875,
0.0007810592651367188,
-0.0089111328125,
0.0360107421875,
0.01053619384765625,
0.0051727294921875,
-0.0009899139404296875,
-0.0263824462890625,
-0.01885986328125,
0.007904052734375,
0.0565185546875,
0.0307159423828125,
0.0107421875,
-0.0257110595703125,
0.051300048828125,
0.0182952880859375,
-0.045562744140625,
0.011627197265625,
0.01255035400390625,
-0.04339599609375,
0.01187896728515625,
0.01934814453125,
0.022979736328125,
-0.0223388671875,
0.0092926025390625,
-0.004322052001953125,
-0.00630950927734375,
0.005340576171875,
-0.006137847900390625,
-0.0155487060546875,
0.06903076171875,
0.059356689453125,
-0.01532745361328125,
-0.0153656005859375,
-0.0450439453125,
0.056182861328125,
0.01395416259765625,
0.0021800994873046875,
0.02557373046875,
0.001735687255859375,
0.05126953125,
-0.01114654541015625,
-0.01210784912109375,
0.01531219482421875,
-0.004581451416015625,
-0.01262664794921875,
-0.0060272216796875,
0.027374267578125,
-0.032562255859375,
-0.04278564453125,
0.0197296142578125,
0.0007534027099609375,
0.01385498046875,
-0.007007598876953125,
0.01535797119140625,
0.00799560546875,
0.005176544189453125,
-0.009552001953125,
0.03082275390625,
-0.045318603515625,
-0.039794921875,
0.041412353515625,
-0.00527191162109375,
-0.0223388671875,
-0.0292816162109375,
-0.00463104248046875,
0.0345458984375,
0.03997802734375,
0.04022216796875,
0.006694793701171875,
0.0250396728515625,
-0.0177154541015625,
-0.01380157470703125,
-0.018768310546875,
0.00811767578125,
-0.0099945068359375,
0.01300048828125,
0.024688720703125,
0.0310516357421875,
-0.0230865478515625,
-0.0277099609375,
-0.00603485107421875,
-0.06378173828125,
-0.016326904296875,
0.03436279296875,
0.01076507568359375,
0.02197265625,
0.0494384765625,
0.060699462890625,
0.01329803466796875,
-0.0110321044921875,
0.051544189453125,
-0.012115478515625,
-0.056427001953125,
-0.0189361572265625,
-0.00794219970703125,
0.0207061767578125,
-0.0032176971435546875,
0.002902984619140625,
0.06060791015625,
-0.00560760498046875,
-0.017120361328125,
-0.001125335693359375,
-0.0020904541015625,
-0.0262451171875,
0.040924072265625,
-0.01155853271484375,
0.006134033203125,
-0.01331329345703125,
-0.033721923828125,
0.013763427734375,
-0.03729248046875,
-0.044342041015625,
0.018585205078125,
0.0279083251953125,
-0.041107177734375,
0.0494384765625,
0.09136962890625,
-0.0240325927734375,
0.00054168701171875,
0.03076171875,
0.005069732666015625,
-0.046722412109375,
0.0323486328125,
0.00254058837890625,
-0.051116943359375,
-0.0191650390625,
0.01435089111328125,
0.01116943359375,
-0.02410888671875,
0.08709716796875,
-0.01171875,
-0.016387939453125,
0.049346923828125,
-0.06829833984375,
0.057037353515625,
0.037750244140625,
-0.01090240478515625,
-0.0245208740234375,
-0.0150604248046875,
-0.013031005859375,
-0.057952880859375,
0.01178741455078125,
0.02850341796875,
0.00850677490234375,
-0.00028228759765625,
-0.0057373046875,
0.03326416015625,
0.0251007080078125,
-0.031707763671875,
-0.051788330078125,
0.00004458427429199219,
-0.00121307373046875,
-0.010498046875,
0.00739288330078125,
-0.03765869140625,
0.01439666748046875,
0.0216217041015625,
0.011566162109375,
-0.012542724609375,
0.0109710693359375,
-0.015899658203125,
0.01018524169921875,
0.0275421142578125,
-0.00039076805114746094,
-0.00012826919555664062,
0.0166168212890625,
-0.00534820556640625,
0.021484375,
0.000004947185516357422,
0.0271759033203125,
0.01617431640625,
0.007221221923828125,
-0.0080718994140625,
0.0237274169921875,
0.016510009765625,
0.00475311279296875,
0.01349639892578125,
-0.00628662109375,
-0.0164337158203125,
0.008697509765625,
-0.0248870849609375,
-0.01255035400390625,
-0.00319671630859375,
-0.01800537109375,
0.0036029815673828125,
0.001674652099609375,
-0.05792236328125,
-0.0268402099609375,
-0.0282440185546875,
0.0195465087890625,
0.01221466064453125,
-0.0350341796875,
0.047943115234375,
-0.0232086181640625,
-0.04010009765625,
0.0014905929565429688,
0.004364013671875,
0.0003390312194824219,
0.006072998046875,
-0.027130126953125,
-0.0240936279296875,
-0.0219268798828125,
0.021820068359375,
-0.003940582275390625,
-0.01134490966796875,
0.02752685546875,
0.01052093505859375,
-0.033935546875,
-0.04461669921875,
-0.042724609375,
0.003574371337890625,
-0.06982421875,
-0.0189971923828125,
0.00783538818359375,
0.0039005279541015625,
0.01181793212890625,
-0.01947021484375,
-0.00797271728515625,
0.00315093994140625,
0.004077911376953125,
-0.06500244140625,
0.0107269287109375,
0.0036144256591796875,
-0.027587890625,
-0.0209808349609375,
0.076904296875,
-0.021209716796875,
-0.0104217529296875,
-0.10009765625,
-0.0021152496337890625,
-0.0096435546875,
0.0031585693359375,
-0.0396728515625,
-0.0033416748046875,
-0.022247314453125,
0.06439208984375,
0.0279388427734375,
-0.01708984375,
0.0458984375,
-0.00102996826171875,
-0.0357666015625,
0.028076171875,
0.0145721435546875,
0.0002720355987548828,
-0.025634765625,
0.036590576171875,
0.015380859375,
0.054107666015625,
0.003170013427734375,
0.06097412109375,
0.00620269775390625,
-0.0034847259521484375,
-0.053192138671875,
-0.0299224853515625,
0.007328033447265625,
0.0029296875,
0.097900390625,
0.078369140625,
0.0177001953125,
-0.05035400390625,
-0.00409698486328125,
-0.00919342041015625,
0.0162200927734375,
-0.0307159423828125,
0.0005083084106445312,
-0.04486083984375,
-0.020111083984375,
-0.0169677734375,
-0.0248260498046875,
0.0295562744140625,
0.00814056396484375,
-0.016693115234375,
0.010528564453125,
0.01629638671875,
-0.0212860107421875,
-0.040679931640625,
-0.000431060791015625,
0.031982421875,
-0.02703857421875,
0.0179901123046875,
0.01351165771484375,
0.007610321044921875,
0.020904541015625,
0.052703857421875,
0.020477294921875,
0.0477294921875,
-0.02484130859375,
-0.01180267333984375,
0.0174407958984375,
-0.0005402565002441406,
-0.02227783203125,
-0.0152740478515625,
0.00714111328125,
-0.00614166259765625,
-0.01056671142578125,
0.006092071533203125,
0.0171356201171875,
-0.0143280029296875,
-0.0272979736328125,
0.0017681121826171875,
-0.019012451171875,
0.06536865234375,
-0.0048828125,
0.0290985107421875,
-0.032196044921875,
0.01407623291015625,
0.0115814208984375,
-0.0379638671875,
0.00909423828125,
0.001262664794921875,
-0.0214691162109375,
-0.003265380859375,
-0.01410675048828125,
-0.08465576171875,
-0.040252685546875,
-0.004558563232421875
]
|
62f8c630c4b287bc69c847d84c8fb858f33b14f7 | Wordpress Stackexchange
Q: Display only posts from a specific parent category I have a category structure similar to the below:
*
*Grand parent cat
*
*Parent cat 1
*
*Child cat
*Child cat
*Child cat
*Child cat
*Parent cat 2
*
*Child cat
*Child cat
*Child cat
If I query Parent cat 2 for posts, I get all posts in that category AND its child categories.
How do I query the Parent cat and exclude posts in its children?
A: $the_category_id = 10;
$new_posts = new WP_Query( array(
'post_type' => 'post',
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => 'category',
'terms' => array( $the_category_id ),
'field' => 'term_id',
'operator' => 'AND',
'include_children' => false
)
)
) );
So basically the difference is include_children parameter.
| Q: Display only posts from a specific parent category I have a category structure similar to the below:
*
*Grand parent cat
*
*Parent cat 1
*
*Child cat
*Child cat
*Child cat
*Child cat
*Parent cat 2
*
*Child cat
*Child cat
*Child cat
If I query Parent cat 2 for posts, I get all posts in that category AND its child categories.
How do I query the Parent cat and exclude posts in its children?
A: $the_category_id = 10;
$new_posts = new WP_Query( array(
'post_type' => 'post',
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => 'category',
'terms' => array( $the_category_id ),
'field' => 'term_id',
'operator' => 'AND',
'include_children' => false
)
)
) );
So basically the difference is include_children parameter.
| wordpress | {
"language": "en",
"length": 124,
"provenance": "stackexchange_00019.jsonl.gz:440038",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/126040"
} | [
0.027801513671875,
0.0243072509765625,
-0.028900146484375,
-0.0156402587890625,
0.0182037353515625,
-0.025726318359375,
0.01158905029296875,
-0.023223876953125,
-0.01100921630859375,
0.007724761962890625,
-0.035003662109375,
-0.00743865966796875,
-0.039642333984375,
-0.037017822265625,
-0.0171051025390625,
-0.05462646484375,
0.02606201171875,
-0.04437255859375,
-0.0030155181884765625,
-0.02410888671875,
0.0028553009033203125,
-0.0173797607421875,
0.044342041015625,
0.0291900634765625,
0.019287109375,
-0.0203857421875,
0.04327392578125,
-0.0251007080078125,
0.010223388671875,
-0.0308074951171875,
0.01044464111328125,
0.01593017578125,
-0.00725555419921875,
0.0075225830078125,
0.042327880859375,
-0.0071868896484375,
0.00865936279296875,
0.01007080078125,
0.042510986328125,
0.0166168212890625,
0.01103973388671875,
-0.01515960693359375,
-0.0063629150390625,
0.024169921875,
-0.0283050537109375,
-0.0026073455810546875,
-0.0169677734375,
-0.0273895263671875,
0.0166168212890625,
-0.041748046875,
0.036468505859375,
0.006450653076171875,
0.059417724609375,
-0.04083251953125,
-0.016693115234375,
0.0237274169921875,
0.023223876953125,
0.00533294677734375,
0.050567626953125,
-0.0204925537109375,
-0.06256103515625,
-0.00870513916015625,
0.0240325927734375,
-0.030029296875,
-0.004241943359375,
-0.004241943359375,
0.016326904296875,
0.01485443115234375,
-0.05340576171875,
0.000335693359375,
0.07037353515625,
-0.03509521484375,
0.004917144775390625,
-0.01413726806640625,
-0.0474853515625,
-0.019683837890625,
0.00677490234375,
-0.018951416015625,
0.0171356201171875,
-0.01091766357421875,
-0.0165557861328125,
0.019287109375,
-0.08087158203125,
-0.0167694091796875,
0.00798797607421875,
0.0069732666015625,
-0.032196044921875,
-0.01215362548828125,
-0.04278564453125,
-0.01641845703125,
-0.019775390625,
-0.04376220703125,
-0.07208251953125,
0.0286407470703125,
0.045257568359375,
-0.035308837890625,
0.033294677734375,
0.054473876953125,
-0.042083740234375,
-0.01486968994140625,
-0.02740478515625,
-0.0021724700927734375,
-0.0352783203125,
-0.0267333984375,
0.0357666015625,
0.030975341796875,
-0.04229736328125,
-0.00554656982421875,
0.0941162109375,
0.0540771484375,
0.039215087890625,
0.0626220703125,
-0.006900787353515625,
0.01142120361328125,
-0.045684814453125,
0.04071044921875,
-0.01461029052734375,
-0.021575927734375,
-0.0260772705078125,
0.026702880859375,
0.00911712646484375,
0.017303466796875,
0.002498626708984375,
-0.01123809814453125,
0.0180816650390625,
0.01284027099609375,
-0.0318603515625,
-0.00765228271484375,
0.0445556640625,
-0.01934814453125,
-0.05657958984375,
0.01398468017578125,
0.09051513671875,
0.0477294921875,
0.03338623046875,
0.002063751220703125,
0.0222625732421875,
-0.0059051513671875,
0.0196685791015625,
-0.0287017822265625,
0.013214111328125,
-0.0133209228515625,
0.0292510986328125,
0.0075225830078125,
0.0014562606811523438,
0.0220184326171875,
0.0099334716796875,
0.00434112548828125,
-0.00429534912109375,
-0.01522064208984375,
-0.0010671615600585938,
-0.033447265625,
0.05865478515625,
-0.0229949951171875,
-0.05401611328125,
-0.012237548828125,
-0.008453369140625,
-0.01357269287109375,
-0.057525634765625,
-0.0323486328125,
0.024169921875,
0.0200653076171875,
0.050323486328125,
-0.021209716796875,
-0.03472900390625,
-0.018951416015625,
-0.0767822265625,
-0.02880859375,
0.0054473876953125,
-0.05548095703125,
0.02569580078125,
-0.025177001953125,
-0.00994110107421875,
-0.02838134765625,
0.0078277587890625,
0.016693115234375,
-0.040435791015625,
-0.0218505859375,
0.0235137939453125,
0.03558349609375,
0.00449371337890625,
-0.0308990478515625,
-0.06719970703125,
0.05499267578125,
-0.02667236328125,
-0.0010128021240234375,
0.0188446044921875,
0.019805908203125,
-0.0200958251953125,
0.018951416015625,
0.04498291015625,
0.047698974609375,
-0.0301971435546875,
0.0089111328125,
0.0131683349609375,
-0.01485443115234375,
-0.0144805908203125,
-0.00919342041015625,
0.004119873046875,
-0.00412750244140625,
0.00772857666015625,
-0.00962066650390625,
0.0003685951232910156,
0.0013637542724609375,
-0.05511474609375,
0.004306793212890625,
-0.02081298828125,
0.0256195068359375,
0.00010073184967041016,
0.03680419921875,
0.020538330078125,
0.00502777099609375,
-0.027923583984375,
-0.0374755859375,
-0.016845703125,
0.009918212890625,
-0.00537109375,
0.007007598876953125,
-0.002353668212890625,
-0.01374053955078125,
-0.0007371902465820312,
-0.012664794921875,
-0.00751495361328125,
0.029144287109375,
0.08837890625,
-0.007640838623046875,
0.00975799560546875,
-0.0251617431640625,
0.05780029296875,
0.048095703125,
-0.11859130859375,
-0.01277923583984375,
0.041595458984375,
0.034393310546875,
-0.035400390625,
0.017974853515625,
0.021820068359375,
0.0189666748046875,
-0.019195556640625,
0.0245513916015625,
0.01751708984375,
-0.00482940673828125,
-0.04962158203125,
-0.022857666015625,
0.0374755859375,
-0.06964111328125,
-0.038330078125,
0.02325439453125,
0.0024585723876953125,
0.017608642578125,
-0.0061187744140625,
-0.01490020751953125,
0.032257080078125,
-0.0213165283203125,
0.003299713134765625,
0.0238037109375,
0.03265380859375,
0.00562286376953125,
-0.0280914306640625,
0.0098419189453125,
0.0188751220703125,
-0.022918701171875,
-0.06494140625,
0.0084991455078125,
0.034820556640625,
-0.015777587890625,
0.02587890625,
0.01090240478515625,
-0.004638671875,
-0.01078033447265625,
0.0108184814453125,
-0.0202789306640625,
0.003536224365234375,
0.0248565673828125,
-0.02386474609375,
-0.01456451416015625,
-0.0264129638671875,
0.0023746490478515625,
0.0161590576171875,
0.00202178955078125,
0.00809478759765625,
0.049774169921875,
0.032867431640625,
-0.0164031982421875,
-0.02447509765625,
-0.0576171875,
0.0204315185546875,
0.01788330078125,
-0.0125732421875,
0.0303955078125,
0.024932861328125,
0.060638427734375,
0.0146331787109375,
0.006649017333984375,
0.01454925537109375,
0.02972412109375,
-0.0105743408203125,
-0.0283050537109375,
0.0498046875,
-0.027587890625,
0.0033054351806640625,
0.04364013671875,
-0.0019779205322265625,
0.0238800048828125,
0.010101318359375,
0.00830078125,
0.0191192626953125,
0.015106201171875,
-0.0013980865478515625,
-0.0059051513671875,
-0.034942626953125,
0.0027103424072265625,
0.020721435546875,
0.03521728515625,
0.002887725830078125,
-0.03057861328125,
0.004680633544921875,
0.0273284912109375,
-0.021728515625,
-0.03564453125,
-0.041961669921875,
-0.0207061767578125,
-0.01153564453125,
0.011871337890625,
0.0103912353515625,
0.0100860595703125,
-0.0138702392578125,
0.0101318359375,
0.01342010498046875,
-0.0292510986328125,
-0.0853271484375,
-0.045654296875,
-0.06317138671875,
0.02117919921875,
-0.00498199462890625,
0.0005464553833007812,
0.0005249977111816406,
0.11553955078125,
0.016204833984375,
-0.09259033203125,
-0.0233306884765625,
0.02978515625,
-0.04351806640625,
0.01788330078125,
-0.0166015625,
0.01422119140625,
-0.0165252685546875,
0.0172882080078125,
0.0022296905517578125,
-0.0091552734375,
-0.01409149169921875,
-0.01155853271484375,
0.02197265625,
0.03692626953125,
0.047027587890625,
-0.050811767578125,
-0.035186767578125,
0.052215576171875,
0.007373809814453125,
-0.01117706298828125,
-0.05230712890625,
-0.0278167724609375,
-0.06695556640625,
-0.025634765625,
0.0279388427734375,
0.0364990234375,
-0.0491943359375,
0.011444091796875,
-0.0025882720947265625,
0.003276824951171875,
-0.003448486328125,
-0.037109375,
0.03448486328125,
0.017913818359375,
0.01375579833984375,
-0.0010728836059570312,
-0.00200653076171875,
-0.02557373046875,
0.018157958984375,
-0.016357421875,
0.01226806640625,
-0.0026721954345703125,
0.02044677734375,
-0.0205535888671875,
-0.036712646484375,
0.036529541015625,
-0.016143798828125,
0.018890380859375,
-0.03521728515625,
-0.020751953125,
-0.0205230712890625,
0.0682373046875,
-0.031890869140625,
-0.0218505859375,
-0.03680419921875,
-0.0007038116455078125,
-0.00865936279296875,
-0.045074462890625,
-0.0225677490234375,
-0.01082611083984375,
-0.0188751220703125,
-0.01435089111328125,
-0.011566162109375,
-0.0182647705078125,
-0.017364501953125,
-0.03155517578125,
-0.0306396484375,
-0.007015228271484375,
0.042877197265625,
-0.0107574462890625,
-0.004634857177734375,
-0.036407470703125,
0.0207672119140625,
-0.046600341796875,
-0.0157470703125,
0.006847381591796875,
-0.038787841796875,
-0.004276275634765625,
-0.00789642333984375,
-0.0081329345703125,
-0.00562286376953125,
-0.005344390869140625,
-0.0196990966796875,
0.0132598876953125,
-0.0081024169921875,
0.042572021484375,
-0.0188140869140625,
0.01457977294921875,
-0.03839111328125,
0.01384735107421875,
0.00492095947265625,
-0.016326904296875,
-0.034027099609375,
-0.044647216796875,
0.0238494873046875,
0.01407623291015625,
-0.0188140869140625,
0.0030364990234375,
-0.0245513916015625,
0.00803375244140625,
-0.06683349609375,
-0.0499267578125,
-0.06524658203125,
-0.033203125,
-0.03961181640625,
-0.00926971435546875,
-0.03289794921875,
-0.07373046875,
0.0301666259765625,
0.051849365234375,
-0.044830322265625,
0.004913330078125,
0.0305633544921875,
0.01678466796875,
-0.041412353515625,
-0.0789794921875,
0.00373077392578125,
0.01690673828125,
-0.0015592575073242188,
0.05450439453125,
0.0093231201171875,
-0.020050048828125,
0.08221435546875,
-0.0038280487060546875,
0.03289794921875,
-0.0325927734375,
0.037353515625,
-0.01183319091796875,
-0.0289306640625,
0.033905029296875,
-0.00527191162109375,
0.009185791015625,
0.009185791015625,
-0.0171051025390625,
-0.0258941650390625,
0.007221221923828125,
0.054840087890625,
0.0000769495964050293,
-0.006488800048828125,
-0.053680419921875,
0.005245208740234375,
-0.00740814208984375,
0.0421142578125,
0.01372528076171875,
0.055694580078125,
-0.01306915283203125,
-0.0020999908447265625,
-0.00531005859375,
0.01641845703125,
-0.034698486328125,
0.037841796875,
-0.04107666015625,
0.0213470458984375,
-0.0157012939453125,
-0.0118255615234375,
-0.03216552734375,
0.0121307373046875,
-0.0150146484375,
-0.0178680419921875,
-0.052215576171875,
0.010223388671875,
0.01080322265625,
0.032379150390625,
0.018280029296875,
0.00820159912109375,
0.0088653564453125,
-0.006256103515625,
0.0261383056640625,
-0.002948760986328125,
-0.0087738037109375,
-0.0037937164306640625,
-0.004055023193359375,
-0.005615234375,
0.00785064697265625,
-0.0165557861328125,
0.01535797119140625,
0.03900146484375,
0.0097198486328125,
0.0272674560546875,
-0.02410888671875,
-0.00205230712890625,
-0.0294952392578125,
0.045440673828125,
0.0216522216796875,
-0.019622802734375,
0.0223541259765625,
-0.00958251953125,
0.022186279296875,
-0.0307769775390625,
-0.03131103515625,
0.0203857421875,
0.023956298828125,
0.0134735107421875,
0.0010709762573242188,
0.0108489990234375,
0.018463134765625,
-0.0250244140625,
0.005550384521484375,
0.00466156005859375,
0.0263671875,
-0.022125244140625,
-0.0304412841796875,
0.0217742919921875,
0.04998779296875,
-0.029022216796875,
0.0083160400390625,
-0.056610107421875,
0.0071258544921875,
0.043975830078125,
-0.03753662109375,
0.033416748046875,
0.03155517578125,
-0.0538330078125,
-0.0142669677734375,
-0.00604248046875,
0.023712158203125,
-0.039093017578125,
0.007083892822265625,
-0.02203369140625,
-0.01486968994140625,
0.003200531005859375,
0.0751953125,
-0.037445068359375,
-0.054473876953125,
0.009918212890625,
-0.00986480712890625,
0.075439453125,
0.0562744140625,
-0.006961822509765625,
-0.007610321044921875,
-0.057861328125,
-0.037689208984375,
-0.030029296875,
-0.02740478515625,
-0.037994384765625,
0.0009760856628417969,
-0.0121307373046875,
0.0005221366882324219,
-0.0007281303405761719,
-0.021331787109375,
-0.051055908203125,
0.0107421875,
0.035858154296875,
-0.0430908203125,
-0.0186614990234375,
0.07403564453125,
-0.03778076171875,
0.047149658203125,
-0.0147247314453125,
0.014801025390625,
-0.0090179443359375,
-0.004993438720703125,
-0.0024700164794921875,
-0.08197021484375,
-0.0155181884765625,
0.020355224609375,
-0.03973388671875,
0.0115509033203125,
0.005706787109375,
0.003704071044921875,
0.0186004638671875,
-0.00713348388671875,
0.00928497314453125,
-0.0093231201171875,
-0.04132080078125,
-0.028472900390625,
0.007537841796875,
0.0173797607421875,
0.0008292198181152344,
0.0188446044921875,
-0.022674560546875,
-0.0546875,
0.0224456787109375,
0.0065155029296875,
0.024658203125,
0.019073486328125,
-0.0043792724609375,
0.031829833984375,
0.0198516845703125,
0.00511932373046875,
0.043731689453125,
0.022552490234375,
0.035430908203125,
0.001995086669921875,
-0.0214996337890625,
0.0031948089599609375,
0.00846099853515625,
0.037750244140625,
-0.00958251953125,
-0.0061492919921875,
0.038330078125,
-0.03912353515625,
-0.035186767578125,
-0.037506103515625,
-0.0199432373046875,
0.01568603515625,
-0.009368896484375,
-0.00583648681640625,
-0.0017757415771484375,
-0.01532745361328125,
0.0213165283203125,
0.0005321502685546875,
0.002101898193359375,
-0.0290069580078125,
-0.001476287841796875,
-0.025238037109375,
-0.01013946533203125,
-0.01016998291015625,
0.0010814666748046875,
0.0007920265197753906,
0.02069091796875,
0.0153045654296875,
0.001804351806640625,
-0.016815185546875,
0.0049896240234375,
0.01071929931640625,
-0.0345458984375,
0.0005631446838378906,
-0.00005811452865600586,
-0.00615692138671875,
-0.0802001953125,
0.0082244873046875,
-0.01410675048828125,
0.0101776123046875,
0.0184173583984375,
0.0050506591796875,
0.00951385498046875,
0.040679931640625,
-0.0285797119140625,
0.0299224853515625,
0.0108795166015625,
-0.042388916015625,
-0.034820556640625,
-0.01201629638671875,
0.01013946533203125,
0.0191650390625,
-0.054595947265625,
0.0183868408203125,
-0.0352783203125,
-0.0025787353515625,
-0.0121002197265625,
-0.048004150390625,
0.028564453125,
-0.033111572265625,
0.0027008056640625,
0.0245819091796875,
0.034912109375,
-0.0105133056640625,
0.005016326904296875,
0.0235595703125,
-0.0102386474609375,
0.0196380615234375,
0.011871337890625,
0.01398468017578125,
-0.0198516845703125,
-0.01129150390625,
-0.0760498046875,
0.080078125,
-0.035003662109375,
0.08074951171875,
0.009124755859375,
0.0121612548828125,
0.0035953521728515625,
-0.014007568359375,
-0.055877685546875,
0.0845947265625,
0.052276611328125,
0.059417724609375,
-0.054931640625,
-0.026611328125,
0.0245819091796875,
0.048187255859375,
0.052978515625,
-0.003894805908203125,
-0.053863525390625,
-0.0233917236328125,
0.0209197998046875,
0.030731201171875,
0.005130767822265625,
0.049041748046875,
-0.00820159912109375,
-0.0270233154296875,
0.034759521484375,
0.01161956787109375,
0.028350830078125,
0.0135955810546875,
-0.019744873046875,
0.01629638671875,
0.0105133056640625,
0.024322509765625,
-0.0083160400390625,
0.0248260498046875,
0.0098724365234375,
-0.0254669189453125,
-0.00479888916015625,
-0.0439453125,
0.029998779296875,
0.02874755859375,
0.06146240234375,
-0.0802001953125,
-0.04937744140625,
-0.018768310546875,
0.049530029296875,
0.0161285400390625,
0.0489501953125,
0.0093841552734375,
0.01535797119140625,
0.03338623046875,
0.014251708984375,
0.036865234375,
0.0277557373046875,
-0.057647705078125,
0.01506805419921875,
0.036041259765625,
0.029937744140625,
-0.0131072998046875,
0.03607177734375,
0.050079345703125,
0.034912109375,
-0.043212890625,
-0.06744384765625,
0.00850677490234375,
0.0021648406982421875,
0.0007982254028320312,
0.032470703125,
0.0221099853515625,
0.037567138671875,
0.08380126953125,
-0.039947509765625,
-0.0086822509765625,
0.03387451171875,
0.037109375,
-0.004940032958984375,
-0.0213623046875,
-0.01424407958984375,
-0.013671875,
-0.036102294921875,
-0.007251739501953125,
0.0306854248046875,
0.051361083984375,
0.0467529296875,
0.0304718017578125,
-0.0257110595703125,
-0.034210205078125,
0.004581451416015625,
-0.0189666748046875,
-0.0197906494140625,
-0.005077362060546875,
0.005596160888671875,
0.00818634033203125,
-0.01519775390625,
0.019287109375,
0.004547119140625,
0.00830078125,
0.03887939453125,
0.055938720703125,
-0.013397216796875,
-0.0284576416015625,
0.050079345703125,
-0.01270294189453125,
-0.0140228271484375,
-0.0297393798828125,
0.00811767578125,
0.03009033203125,
0.006374359130859375,
0.00647735595703125,
0.02764892578125,
0.038360595703125,
0.01258087158203125,
0.0133056640625,
0.0069122314453125,
-0.0209197998046875,
0.048980712890625,
0.023681640625,
0.0594482421875,
0.03704833984375,
-0.07415771484375,
-0.0163116455078125,
-0.0062408447265625,
-0.037689208984375,
0.033416748046875,
0.0408935546875,
-0.0181884765625,
0.01702880859375,
0.034027099609375,
-0.0184326171875,
-0.02008056640625,
0.01100921630859375,
0.028289794921875,
0.0013217926025390625,
-0.01708984375,
0.0199432373046875,
0.0014810562133789062,
0.0255584716796875,
0.035980224609375,
-0.0081329345703125,
0.029449462890625,
0.015167236328125,
0.0159912109375,
0.0017070770263671875,
-0.00487518310546875,
0.05767822265625,
-0.05615234375,
-0.0280303955078125,
0.06951904296875,
-0.04278564453125,
-0.0004687309265136719,
0.006099700927734375,
-0.0019464492797851562,
-0.0020904541015625,
0.049774169921875,
-0.0423583984375,
0.00952911376953125,
-0.030517578125,
0.01171112060546875,
-0.0498046875,
0.035064697265625,
-0.01441192626953125,
-0.005115509033203125,
-0.05291748046875,
-0.056365966796875,
0.0675048828125,
0.0655517578125,
0.030914306640625,
0.01203155517578125,
0.0149688720703125,
-0.021942138671875,
0.0301513671875,
-0.0061187744140625,
0.052886962890625,
0.03253173828125,
-0.0307464599609375,
-0.0131072998046875,
0.0219573974609375,
-0.00528717041015625,
0.0263824462890625,
0.01702880859375,
0.017730712890625,
0.044097900390625,
-0.0614013671875,
-0.040374755859375,
0.041168212890625,
0.01136016845703125,
-0.02734375,
0.00652313232421875,
0.0157012939453125,
-0.039642333984375,
0.0088653564453125,
-0.014129638671875,
-0.0209503173828125,
-0.01299285888671875,
-0.007038116455078125,
0.01285552978515625,
0.0008802413940429688,
-0.042816162109375,
-0.01303863525390625,
0.0206756591796875,
0.0261383056640625,
0.027679443359375,
-0.07440185546875,
0.044952392578125,
-0.0117034912109375,
0.055389404296875,
-0.01302337646484375,
0.0035533905029296875,
0.004070281982421875,
-0.007091522216796875,
-0.0645751953125,
0.008514404296875,
-0.01506805419921875,
-0.01239013671875,
-0.0051116943359375,
0.03765869140625,
0.036712646484375,
-0.0340576171875,
-0.01092529296875,
0.048614501953125,
0.0286865234375,
0.086181640625,
0.033447265625,
-0.01551055908203125,
-0.0225830078125,
0.03045654296875,
-0.0259857177734375,
0.0125579833984375,
0.0382080078125,
0.01070404052734375,
-0.05596923828125,
-0.013885498046875,
0.0010404586791992188,
0.017303466796875,
-0.03118896484375,
-0.04693603515625,
0.09521484375,
-0.0168914794921875,
-0.028472900390625,
0.0120086669921875,
0.009613037109375,
-0.01030731201171875,
0.0023441314697265625,
0.01461029052734375,
-0.01039886474609375,
-0.004474639892578125,
-0.003757476806640625,
0.015289306640625,
0.0164794921875,
-0.01314544677734375,
-0.0092315673828125,
-0.059295654296875,
0.0274658203125,
0.0177459716796875,
0.030364990234375,
-0.01544952392578125,
0.0367431640625,
-0.0137481689453125,
0.034637451171875,
-0.0218963623046875,
0.034271240234375,
-0.009063720703125,
0.01087188720703125,
0.0293121337890625,
-0.0284271240234375,
-0.049713134765625,
-0.05303955078125,
0.01068878173828125,
0.0008263587951660156,
0.0084991455078125,
0.0135955810546875,
-0.0648193359375,
-0.0726318359375,
-0.0004646778106689453,
-0.01251220703125,
0.0229034423828125,
-0.08721923828125,
0.0112762451171875,
0.033660888671875,
0.002758026123046875,
-0.03326416015625,
-0.00870513916015625,
-0.03912353515625,
-0.04168701171875,
-0.0311431884765625,
0.0269927978515625,
-0.04193115234375,
0.038665771484375,
-0.0299530029296875,
-0.01364898681640625,
-0.0555419921875,
-0.01180267333984375,
-0.0210723876953125,
-0.05731201171875,
0.0082550048828125,
-0.003116607666015625,
0.01739501953125,
-0.011322021484375,
0.017852783203125,
0.0133819580078125,
0.00420379638671875,
-0.0115966796875,
0.01097869873046875,
-0.057525634765625,
0.0138092041015625,
0.046234130859375,
0.002773284912109375,
-0.060272216796875,
0.05169677734375,
0.06695556640625,
0.049468994140625,
0.042266845703125,
0.00638580322265625,
-0.0128631591796875,
0.06689453125,
0.0017070770263671875,
-0.0498046875,
-0.0196533203125,
-0.0199432373046875,
0.006122589111328125,
-0.038299560546875,
-0.0256500244140625,
-0.0305938720703125,
0.0009679794311523438,
-0.02130126953125,
-0.04412841796875,
0.0223236083984375
]
|
c071db5dce67700fdd4b31d04293c67a58a491d6 | Wordpress Stackexchange
Q: Changing pagination list class paginate_links() function returns unordered list with class named "page-numbers". How can I change this class?
EDIT
Currently, I am using the band-aid method below.
$return = paginate_links( $arg );
echo str_replace( "<ul class='page-numbers'>", '<ul class="pagination">', $return );
Is there any better way?
A: for this you need to use type parameter
$links = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $posts_array->max_num_pages,
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
'next_text' => __( 'Next page', 'twentyfifteen' ),
'type' => 'list'
) );
echo $links
| Q: Changing pagination list class paginate_links() function returns unordered list with class named "page-numbers". How can I change this class?
EDIT
Currently, I am using the band-aid method below.
$return = paginate_links( $arg );
echo str_replace( "<ul class='page-numbers'>", '<ul class="pagination">', $return );
Is there any better way?
A: for this you need to use type parameter
$links = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $posts_array->max_num_pages,
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
'next_text' => __( 'Next page', 'twentyfifteen' ),
'type' => 'list'
) );
echo $links
A: I was also searching for the same solution to use it with bootstrap pagination links,
the below code is working 100% in my theme.
function bittersweet_pagination() {
global $wp_query;
if ( $wp_query->max_num_pages <= 1 ) return;
$big = 999999999; // need an unlikely integer
$pages = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages,
'type' => 'array',
) );
if( is_array( $pages ) ) {
$paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
echo '<div class="pagination-wrap"><ul class="pagination">';
foreach ( $pages as $page ) {
echo "<li>$page</li>";
}
echo '</ul></div>';
}
}
use the function to call in index.php e.g; <?php bittersweet_pagination(); ?> or any other file. I also overwrite some bootstrap styling it might help you.
.pagination-wrap {
clear: both;
display: block;
overflow: hidden;
text-align: center;
}
.pagination-wrap .pagination {
margin-bottom: 0;
margin-top: 0;
}
.pagination-wrap .pagination > li:first-child > a,
.pagination-wrap .pagination > li:first-child > span {
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
}
.pagination-wrap .pagination > li:last-child > a,
.pagination-wrap .pagination > li:last-child > span {
border-bottom-right-radius: 0px;
border-top-right-radius: 0px;
}
.pagination-wrap .pagination > li > a,
.pagination-wrap .pagination > li > span {
background-color: #4FBEBA;
border: 1px solid #1BA5A0;
padding: 10px 15px;
font-weight: bold;
color: #FFFFFF;
}
.pagination-wrap .pagination > li > a:hover,
.pagination-wrap .pagination > li > span:hover,
.pagination-wrap .pagination > li > a:focus,
.pagination-wrap .pagination > li > span:focus {
background-color: #1BA5A0;
border-color: #189690;
}
.pagination-wrap .pagination .current {
background-color: #1BA5A0;
border-color: #189690;
}
.pagination-wrap .pagination .current:hover,
.pagination-wrap .pagination .current span:hover {
background-color: #189690;
border-color: #148781;
}
A: paginate_links() doesn't offer a parameter and there are no hooks - see source - available to change the class(es). Which means you can do it like you have done it or you create your own pagination function based on paginate_links().
A: Another option not noted here is to copy the styles over to the WordPress pagination classes, instead of changing the class assigned to the element.
If you are using Bootstrap and bundling everything with sass, then you can apply the styles easily using the @extend directive.
ul.page-numbers {
@extend .pagination;
> li {
> a, > span {
&.page-numbers {
@extend .page-link
&:focus, :hover {
/* Additional hover/focus styles here */
}
}
}
}
}
This may be pertinent to some situations, but I feel the code in the original question is the best solution for most applications.
A: If you want to just string replace your way to the bootstrap promised land then heres something that may help you.
function bootstrap_pagination()
{
global $wp_query;
$big = 999999999;
$listString = paginate_links(array(
'base' => str_replace($big, '%#%', get_pagenum_link($big)),
'format' => '?paged=%#%',
'current' => max(1, get_query_var('paged')),
'total' => $wp_query->max_num_pages,
'prev_text' => __('← Previous'),
'next_text' => __('Next →'),
'type' => 'list',
));
$listString = str_replace("<ul class='page-numbers'>", '<ul class="pagination">', $listString);
$listString = str_replace('page-numbers', 'page-link', $listString);
$listString = str_replace('<li>', '<li class="page-item">', $listString);
$listString = str_replace(
'<li class="page-item"><span aria-current="page" class="page-link current">',
'<li class="page-item active"><span aria-current="page" class="page-link">',
$listString
);
echo $listString;
}
| wordpress | {
"language": "en",
"length": 612,
"provenance": "stackexchange_00019.jsonl.gz:440050",
"question_score": "21",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/126080"
} | [
0.0684814453125,
-0.01276397705078125,
0.024993896484375,
0.0020236968994140625,
0.0120849609375,
-0.036407470703125,
0.07672119140625,
-0.023529052734375,
-0.01441192626953125,
-0.0049896240234375,
-0.01363372802734375,
0.006160736083984375,
-0.026580810546875,
-0.0286102294921875,
0.018280029296875,
-0.04107666015625,
0.0452880859375,
-0.0073699951171875,
0.042572021484375,
0.01065826416015625,
0.01140594482421875,
0.03985595703125,
0.035003662109375,
0.07720947265625,
0.027496337890625,
-0.0184326171875,
0.06292724609375,
-0.0133819580078125,
0.00421905517578125,
-0.030975341796875,
0.01389312744140625,
0.01229095458984375,
0.04156494140625,
-0.006496429443359375,
-0.02435302734375,
-0.0208740234375,
-0.00879669189453125,
-0.0162200927734375,
-0.022705078125,
0.020263671875,
0.0230712890625,
0.0001099705696105957,
-0.0170745849609375,
-0.0223541259765625,
-0.0435791015625,
-0.01174163818359375,
0.002040863037109375,
0.00029969215393066406,
-0.0198974609375,
-0.006252288818359375,
0.027130126953125,
0.0247344970703125,
0.0263824462890625,
-0.0006136894226074219,
0.01174163818359375,
0.0306549072265625,
-0.00299835205078125,
-0.0231781005859375,
0.032470703125,
-0.016143798828125,
-0.02349853515625,
-0.0248565673828125,
0.02069091796875,
-0.01404571533203125,
-0.035308837890625,
0.01303863525390625,
-0.0006542205810546875,
0.0186004638671875,
0.00469207763671875,
-0.053680419921875,
-0.0178680419921875,
0.005859375,
-0.0176239013671875,
-0.0029125213623046875,
-0.01338958740234375,
0.01421356201171875,
-0.007442474365234375,
-0.01309967041015625,
0.01256561279296875,
0.0163726806640625,
0.0477294921875,
0.031463623046875,
-0.0155181884765625,
0.0021762847900390625,
0.0093994140625,
0.004913330078125,
-0.005710601806640625,
-0.0305328369140625,
0.007297515869140625,
-0.008758544921875,
-0.01171112060546875,
-0.0081329345703125,
0.04010009765625,
0.003932952880859375,
-0.0183563232421875,
-0.01593017578125,
0.023590087890625,
0.03790283203125,
-0.00887298583984375,
-0.00617218017578125,
-0.0212249755859375,
-0.0228271484375,
0.0035533905029296875,
-0.021881103515625,
-0.006694793701171875,
0.0207977294921875,
0.015380859375,
0.043731689453125,
0.039764404296875,
0.03558349609375,
0.01047515869140625,
0.0311279296875,
-0.039215087890625,
-0.0099334716796875,
-0.017974853515625,
-0.00753021240234375,
-0.0703125,
0.0005865097045898438,
0.0082244873046875,
-0.034637451171875,
0.0267181396484375,
0.033599853515625,
-0.0218658447265625,
-0.0292510986328125,
0.004306793212890625,
0.005710601806640625,
-0.007419586181640625,
-0.038543701171875,
0.0526123046875,
0.0214385986328125,
-0.039581298828125,
0.0041046142578125,
0.049713134765625,
-0.01232147216796875,
-0.002750396728515625,
-0.01319122314453125,
-0.00984954833984375,
-0.035919189453125,
-0.04443359375,
0.043182373046875,
-0.03656005859375,
-0.048675537109375,
0.0017852783203125,
-0.042327880859375,
0.043243408203125,
0.00689697265625,
0.02374267578125,
0.020263671875,
0.0031986236572265625,
-0.01448822021484375,
0.0401611328125,
-0.00789642333984375,
0.037506103515625,
0.01303863525390625,
-0.052215576171875,
0.01264190673828125,
-0.0219879150390625,
0.01006317138671875,
-0.0318603515625,
-0.00983428955078125,
0.0276947021484375,
-0.0183258056640625,
0.0045013427734375,
-0.049224853515625,
-0.061004638671875,
0.0203704833984375,
-0.057647705078125,
-0.0166473388671875,
0.02508544921875,
-0.0262298583984375,
-0.0008573532104492188,
-0.0033416748046875,
0.0193634033203125,
0.038421630859375,
0.0301971435546875,
0.044342041015625,
0.00251007080078125,
0.0163116455078125,
0.031402587890625,
0.034820556640625,
0.010406494140625,
-0.0311126708984375,
0.05462646484375,
-0.01332855224609375,
-0.04632568359375,
0.051177978515625,
0.00872802734375,
0.031036376953125,
0.003597259521484375,
0.00742340087890625,
0.0218353271484375,
0.04327392578125,
-0.0540771484375,
0.0333251953125,
0.0265350341796875,
-0.024078369140625,
-0.0237274169921875,
-0.02398681640625,
0.01331329345703125,
-0.021514892578125,
-0.013214111328125,
0.0277252197265625,
-0.0304107666015625,
0.01494598388671875,
-0.0455322265625,
0.01403045654296875,
-0.0010843276977539062,
0.04107666015625,
-0.00827789306640625,
0.06805419921875,
-0.0006146430969238281,
0.0068206787109375,
-0.0140838623046875,
-0.010498046875,
0.01525115966796875,
-0.00537872314453125,
0.006435394287109375,
-0.02294921875,
-0.0201568603515625,
-0.0164642333984375,
-0.010955810546875,
0.0067901611328125,
-0.01548004150390625,
0.044219970703125,
0.05035400390625,
-0.034820556640625,
-0.034759521484375,
-0.047607421875,
-0.0067596435546875,
-0.03143310546875,
-0.031402587890625,
0.1053466796875,
0.0418701171875,
0.05828857421875,
-0.004436492919921875,
-0.0091400146484375,
0.0242767333984375,
-0.05023193359375,
0.01230621337890625,
0.035125732421875,
0.05670166015625,
-0.0073394775390625,
-0.0081939697265625,
-0.048370361328125,
0.0188751220703125,
0.0054931640625,
0.0499267578125,
-0.07086181640625,
-0.046356201171875,
-0.0161895751953125,
0.043365478515625,
0.02349853515625,
0.0221710205078125,
0.05926513671875,
-0.00969696044921875,
0.0199432373046875,
0.0124969482421875,
0.03387451171875,
-0.00885009765625,
0.0149688720703125,
-0.015716552734375,
0.0282440185546875,
0.0150146484375,
-0.0018663406372070312,
0.0277862548828125,
-0.00917816162109375,
0.0206298828125,
0.0005116462707519531,
-0.0158233642578125,
-0.0158538818359375,
0.0155029296875,
0.00902557373046875,
0.01763916015625,
-0.0002065896987915039,
-0.04669189453125,
-0.007213592529296875,
-0.017333984375,
0.016571044921875,
0.02142333984375,
-0.01971435546875,
-0.0110626220703125,
0.05108642578125,
-0.01296234130859375,
-0.018157958984375,
-0.0272216796875,
-0.008392333984375,
-0.0167694091796875,
0.00604248046875,
-0.0555419921875,
-0.0221405029296875,
-0.01171875,
0.057769775390625,
-0.036346435546875,
0.03662109375,
-0.0243072509765625,
0.016815185546875,
0.05938720703125,
-0.0181427001953125,
0.04296875,
-0.040374755859375,
0.003444671630859375,
0.0283203125,
-0.048248291015625,
0.024078369140625,
-0.000713348388671875,
-0.00719451904296875,
0.0012044906616210938,
-0.005023956298828125,
-0.0174713134765625,
-0.016845703125,
-0.0009341239929199219,
0.052276611328125,
0.01021575927734375,
-0.0017986297607421875,
-0.0091400146484375,
-0.04913330078125,
-0.01001739501953125,
-0.0015172958374023438,
-0.09197998046875,
-0.04547119140625,
0.032257080078125,
-0.08197021484375,
-0.005893707275390625,
0.0251312255859375,
-0.04815673828125,
-0.02392578125,
0.07080078125,
0.007686614990234375,
0.0258026123046875,
-0.0276641845703125,
-0.07720947265625,
-0.04595947265625,
-0.0792236328125,
0.033447265625,
-0.0026226043701171875,
0.0201416015625,
-0.01346588134765625,
0.0482177734375,
-0.01259613037109375,
-0.04986572265625,
-0.054229736328125,
0.0701904296875,
0.013336181640625,
-0.047271728515625,
-0.005725860595703125,
-0.03265380859375,
-0.01029205322265625,
-0.01247406005859375,
0.06732177734375,
0.0102386474609375,
-0.005466461181640625,
0.024749755859375,
0.001659393310546875,
0.007312774658203125,
0.023193359375,
0.05157470703125,
-0.01047515869140625,
0.0307159423828125,
0.03656005859375,
-0.017425537109375,
-0.033935546875,
-0.0102386474609375,
-0.04022216796875,
0.00437164306640625,
0.019775390625,
0.00554656982421875,
-0.03167724609375,
0.039703369140625,
-0.03179931640625,
-0.0256195068359375,
0.01416778564453125,
-0.035125732421875,
0.049163818359375,
-0.0062713623046875,
0.0016107559204101562,
-0.01126861572265625,
0.03948974609375,
0.01094818115234375,
-0.0185394287109375,
0.0058746337890625,
0.03424072265625,
-0.004497528076171875,
0.0167694091796875,
-0.04876708984375,
-0.085693359375,
0.0469970703125,
-0.037078857421875,
-0.00841522216796875,
-0.028900146484375,
-0.01549530029296875,
0.0159149169921875,
0.0994873046875,
-0.046234130859375,
-0.02581787109375,
0.003204345703125,
0.0223388671875,
0.01108551025390625,
-0.056488037109375,
0.0020465850830078125,
-0.040069580078125,
-0.0770263671875,
-0.00473785400390625,
-0.00670623779296875,
-0.028228759765625,
-0.0360107421875,
0.0484619140625,
-0.07147216796875,
-0.0184478759765625,
0.0296173095703125,
0.021728515625,
-0.03228759765625,
0.04217529296875,
-0.016510009765625,
0.00411224365234375,
-0.0280609130859375,
0.02545166015625,
-0.05718994140625,
-0.0270233154296875,
-0.0029048919677734375,
0.0712890625,
0.043060302734375,
-0.0574951171875,
-0.0215606689453125,
0.045379638671875,
0.0205535888671875,
0.0119476318359375,
0.050048828125,
0.0270843505859375,
0.005664825439453125,
0.00982666015625,
0.0421142578125,
-0.035919189453125,
-0.018951416015625,
-0.03546142578125,
-0.035675048828125,
-0.0208740234375,
-0.0196990966796875,
-0.004337310791015625,
0.0029468536376953125,
-0.0211029052734375,
-0.07257080078125,
-0.047576904296875,
-0.0116424560546875,
0.0174407958984375,
0.00945281982421875,
-0.01325225830078125,
-0.043426513671875,
-0.08197021484375,
0.0241851806640625,
-0.030487060546875,
-0.042388916015625,
0.007076263427734375,
0.01544952392578125,
0.0225982666015625,
-0.01442718505859375,
-0.01384735107421875,
-0.0092926025390625,
0.02716064453125,
0.0005578994750976562,
0.033355712890625,
-0.007724761962890625,
-0.0161590576171875,
0.0723876953125,
-0.0200653076171875,
-0.002841949462890625,
0.0096893310546875,
0.01654052734375,
0.0188140869140625,
-0.0009250640869140625,
-0.0083770751953125,
-0.0022716522216796875,
0.01092529296875,
-0.0009050369262695312,
-0.01490020751953125,
-0.038177490234375,
0.0218963623046875,
0.08428955078125,
-0.0037059783935546875,
0.0262603759765625,
-0.052825927734375,
-0.032989501953125,
0.0099334716796875,
0.0006995201110839844,
0.0260467529296875,
0.024261474609375,
-0.007389068603515625,
0.030181884765625,
0.0254058837890625,
0.024932861328125,
0.020477294921875,
0.01190185546875,
-0.0010786056518554688,
0.046600341796875,
0.0008440017700195312,
0.0191802978515625,
0.007633209228515625,
-0.0045928955078125,
0.046630859375,
0.0166015625,
-0.0022792816162109375,
-0.050384521484375,
-0.018829345703125,
-0.00557708740234375,
-0.019927978515625,
0.0017147064208984375,
0.058685302734375,
0.0174713134765625,
0.00792694091796875,
-0.017822265625,
-0.049224853515625,
0.0187835693359375,
-0.056976318359375,
0.0689697265625,
0.0181732177734375,
-0.00641632080078125,
-0.011505126953125,
0.06719970703125,
0.04705810546875,
0.0013456344604492188,
-0.03369140625,
0.0010004043579101562,
-0.02734375,
0.03265380859375,
0.019805908203125,
0.015655517578125,
-0.0013446807861328125,
0.01435089111328125,
0.0161590576171875,
-0.00330352783203125,
-0.013916015625,
0.060943603515625,
0.00365447998046875,
0.017364501953125,
0.025543212890625,
-0.041107177734375,
0.004138946533203125,
-0.04278564453125,
0.042022705078125,
0.0631103515625,
-0.01097869873046875,
-0.0242156982421875,
0.006801605224609375,
0.02435302734375,
0.0171051025390625,
-0.02655029296875,
0.005100250244140625,
-0.04150390625,
-0.0086517333984375,
0.0030517578125,
-0.039794921875,
0.00121307373046875,
0.01348114013671875,
-0.01702880859375,
-0.016845703125,
0.0205535888671875,
-0.0401611328125,
-0.0142669677734375,
-0.005168914794921875,
-0.01363372802734375,
0.01093292236328125,
-0.0196685791015625,
0.09234619140625,
-0.050994873046875,
-0.030853271484375,
-0.04229736328125,
0.00826263427734375,
0.038848876953125,
0.04833984375,
-0.043548583984375,
-0.0030040740966796875,
-0.07666015625,
-0.0174407958984375,
-0.00024306774139404297,
-0.002651214599609375,
-0.0186004638671875,
0.01482391357421875,
0.0094146728515625,
0.00676727294921875,
0.00502777099609375,
-0.03607177734375,
0.0036830902099609375,
0.001926422119140625,
0.01514434814453125,
-0.0114288330078125,
-0.0037555694580078125,
0.0712890625,
0.0234527587890625,
0.056365966796875,
0.032196044921875,
0.019287109375,
-0.0291748046875,
-0.019317626953125,
0.0033359527587890625,
-0.038848876953125,
0.002269744873046875,
0.0119781494140625,
-0.020263671875,
-0.010986328125,
0.0255889892578125,
0.004863739013671875,
0.0094757080078125,
-0.00946044921875,
0.00225067138671875,
-0.00418853759765625,
0.010894775390625,
0.000911712646484375,
0.01824951171875,
0.01263427734375,
0.0384521484375,
0.02838134765625,
-0.0040435791015625,
0.00007224082946777344,
-0.0305938720703125,
0.03192138671875,
0.005275726318359375,
-0.0609130859375,
-0.035858154296875,
0.01013946533203125,
0.060211181640625,
0.0134735107421875,
0.030670166015625,
0.0096282958984375,
0.0129852294921875,
0.031158447265625,
-0.011993408203125,
0.060211181640625,
0.02410888671875,
0.06768798828125,
-0.0170135498046875,
0.002422332763671875,
0.033782958984375,
-0.04705810546875,
0.0161285400390625,
0.0247955322265625,
0.055511474609375,
-0.05126953125,
0.0238800048828125,
0.01213836669921875,
-0.000583648681640625,
0.045562744140625,
0.0443115234375,
-0.029571533203125,
-0.0103759765625,
0.0055389404296875,
-0.06561279296875,
-0.0045318603515625,
0.0133514404296875,
-0.00968170166015625,
0.00409698486328125,
-0.0313720703125,
-0.00489044189453125,
-0.0023651123046875,
-0.003299713134765625,
-0.034820556640625,
0.01526641845703125,
-0.007244110107421875,
-0.04876708984375,
-0.00109100341796875,
0.0335693359375,
-0.0137939453125,
-0.056915283203125,
0.041748046875,
-0.00946044921875,
0.0271148681640625,
0.0228118896484375,
0.01678466796875,
-0.007709503173828125,
0.033050537109375,
-0.0204315185546875,
0.00011265277862548828,
0.010955810546875,
-0.0445556640625,
-0.0040130615234375,
-0.0015735626220703125,
0.0274200439453125,
-0.0274810791015625,
-0.0165557861328125,
0.005184173583984375,
-0.0440673828125,
-0.03887939453125,
-0.0036220550537109375,
-0.00673675537109375,
0.05694580078125,
-0.058837890625,
0.004131317138671875,
0.01263427734375,
0.01068115234375,
0.01041412353515625,
-0.014373779296875,
0.0070037841796875,
-0.037506103515625,
0.0062713623046875,
-0.002002716064453125,
-0.006816864013671875,
0.03448486328125,
-0.0242156982421875,
-0.0589599609375,
0.0914306640625,
-0.016998291015625,
0.0255126953125,
0.0023555755615234375,
0.03643798828125,
-0.0164337158203125,
0.023345947265625,
-0.0239105224609375,
0.032867431640625,
-0.002635955810546875,
0.035064697265625,
-0.01158905029296875,
-0.0008211135864257812,
0.0274658203125,
0.026214599609375,
-0.0169525146484375,
0.0034503936767578125,
-0.0303192138671875,
0.00927734375,
0.0305633544921875,
0.040313720703125,
0.0247344970703125,
0.034210205078125,
-0.026580810546875,
0.053680419921875,
0.0269317626953125,
-0.0989990234375,
0.00213623046875,
-0.01025390625,
-0.018310546875,
0.00893402099609375,
0.0119476318359375,
-0.0015306472778320312,
-0.0213470458984375,
-0.007770538330078125,
-0.07647705078125,
0.0143280029296875,
0.0217742919921875,
0.051422119140625,
0.0100555419921875,
0.062408447265625,
0.056365966796875,
-0.052276611328125,
-0.05755615234375,
-0.0340576171875,
0.04840087890625,
-0.00264739990234375,
0.0103302001953125,
0.0177154541015625,
-0.00628662109375,
0.06463623046875,
-0.01971435546875,
-0.006809234619140625,
-0.01079559326171875,
0.01203155517578125,
0.08306884765625,
0.0249481201171875,
0.0186767578125,
-0.055511474609375,
-0.00858306884765625,
0.061187744140625,
0.092529296875,
-0.0643310546875,
-0.010955810546875,
0.0019435882568359375,
0.006198883056640625,
0.0308685302734375,
-0.024932861328125,
0.03546142578125,
-0.0283050537109375,
-0.00969696044921875,
-0.023284912109375,
-0.043487548828125,
0.0208587646484375,
0.02191162109375,
0.00147247314453125,
0.00191497802734375,
0.002471923828125,
-0.048553466796875,
-0.0158538818359375,
0.00803375244140625,
0.005405426025390625,
0.005054473876953125,
-0.01163482666015625,
0.0313720703125,
-0.0030002593994140625,
0.0214996337890625,
0.00923919677734375,
0.0283355712890625,
-0.01386260986328125,
0.0029888153076171875,
-0.0169830322265625,
-0.0008687973022460938,
-0.041412353515625,
0.021820068359375,
0.0250396728515625,
-0.0186767578125,
-0.0110626220703125,
-0.00002014636993408203,
0.0165252685546875,
0.0015087127685546875,
0.0190887451171875,
-0.002490997314453125,
-0.023590087890625,
-0.0250244140625,
0.01374053955078125,
0.01273345947265625,
0.003345489501953125,
0.0223388671875,
0.026031494140625,
0.02325439453125,
0.002727508544921875,
0.0308990478515625,
0.01160430908203125,
-0.038360595703125,
-0.0184173583984375,
0.0018215179443359375,
0.062408447265625,
0.04681396484375,
-0.1087646484375,
-0.02349853515625,
-0.005672454833984375,
-0.04766845703125,
0.0316162109375,
0.0308685302734375,
-0.036529541015625,
0.0110931396484375,
-0.0006866455078125,
0.0021495819091796875,
0.03668212890625,
-0.0160980224609375,
-0.01284027099609375,
0.063720703125,
0.045166015625,
0.0223541259765625,
-0.0189666748046875,
-0.03497314453125,
-0.018707275390625,
0.0723876953125,
0.00794219970703125,
0.057830810546875,
-0.0467529296875,
0.019622802734375,
-0.002338409423828125,
-0.00887298583984375,
-0.01654052734375,
-0.0499267578125,
0.055694580078125,
-0.05078125,
-0.0201416015625,
0.00838470458984375,
-0.0038013458251953125,
0.026580810546875,
0.0302734375,
-0.0290374755859375,
-0.0014867782592773438,
-0.0196533203125,
0.017974853515625,
0.0017538070678710938,
0.00434112548828125,
-0.021392822265625,
-0.004695892333984375,
0.006740570068359375,
0.00287628173828125,
0.0105743408203125,
-0.00101470947265625,
-0.0157012939453125,
0.0006389617919921875,
0.031585693359375,
-0.017608642578125,
0.0322265625,
0.00348663330078125,
0.05706787109375,
0.0299530029296875,
-0.0298004150390625,
-0.0157623291015625,
-0.0050506591796875,
-0.0087432861328125,
0.004974365234375,
0.0169677734375,
-0.01373291015625,
0.006439208984375,
0.006622314453125,
-0.005863189697265625,
0.021484375,
0.0050506591796875,
-0.03436279296875,
-0.00788116455078125,
0.054443359375,
-0.03509521484375,
-0.0181427001953125,
-0.032623291015625,
-0.0183258056640625,
-0.05572509765625,
-0.024200439453125,
0.00785064697265625,
-0.025299072265625,
-0.0242156982421875,
-0.00832366943359375,
-0.00279998779296875,
0.015594482421875,
0.04150390625,
-0.0887451171875,
0.06927490234375,
-0.005523681640625,
0.007442474365234375,
0.00704193115234375,
0.003612518310546875,
-0.002079010009765625,
0.0012960433959960938,
-0.015838623046875,
-0.01194000244140625,
-0.03399658203125,
0.0190582275390625,
-0.0128936767578125,
0.00791168212890625,
0.041748046875,
-0.0204010009765625,
-0.01418304443359375,
-0.004337310791015625,
0.0012979507446289062,
0.046051025390625,
-0.01532745361328125,
-0.01534271240234375,
0.04071044921875,
0.007663726806640625,
-0.025238037109375,
-0.11865234375,
-0.0222625732421875,
-0.055572509765625,
0.050750732421875,
0.07623291015625,
-0.03900146484375,
0.01264190673828125,
-0.019287109375,
-0.043548583984375,
0.08203125,
0.0172271728515625,
-0.0280303955078125,
-0.037384033203125,
0.0243072509765625,
-0.02935791015625,
0.048431396484375,
0.0126800537109375,
-0.0290679931640625,
0.0128936767578125,
0.0259857177734375,
0.033782958984375,
0.052520751953125,
-0.0024871826171875,
0.042022705078125,
-0.048980712890625,
0.034027099609375,
-0.0194549560546875,
0.046478271484375,
-0.021484375,
0.0103759765625,
0.0175628662109375,
0.0355224609375,
-0.0248260498046875,
0.0027408599853515625,
0.023468017578125,
0.0187225341796875,
0.005710601806640625,
-0.0309906005859375,
-0.01641845703125,
-0.046539306640625,
0.0252227783203125,
-0.01242828369140625,
0.00885772705078125,
0.013519287109375,
-0.033172607421875,
-0.0025272369384765625,
-0.0302276611328125,
0.00904083251953125,
0.03753662109375,
-0.0799560546875,
-0.016571044921875,
0.0322265625,
-0.004547119140625,
0.031707763671875,
0.005344390869140625,
-0.0265045166015625,
-0.01352691650390625,
-0.0157928466796875,
-0.00485992431640625,
-0.058624267578125,
-0.00757598876953125,
0.024932861328125,
-0.034942626953125,
-0.0215911865234375,
0.0187225341796875,
0.0004935264587402344,
-0.0269927978515625,
0.02001953125,
-0.04656982421875,
-0.01085662841796875,
0.0044708251953125,
0.0207977294921875,
-0.0012836456298828125,
-0.006168365478515625,
0.0012483596801757812,
0.0380859375,
0.0088958740234375,
0.02801513671875,
-0.00960540771484375,
0.006229400634765625,
-0.01177978515625,
0.046173095703125,
-0.00977325439453125,
0.053253173828125,
0.00791168212890625,
0.0712890625,
0.026336669921875,
0.03228759765625,
0.0133056640625,
-0.02532958984375,
0.04150390625,
-0.0584716796875,
0.00513458251953125,
-0.0080108642578125,
0.006031036376953125,
-0.0323486328125,
0.01074981689453125,
0.0118255615234375,
-0.002410888671875,
0.0213470458984375
]
|
d449d5163360c25463ffffb2d0d0819f86bb3d5a | Wordpress Stackexchange
Q: Use local image for default avatar I tried putting this snippet in my functions.php
add_filter( 'avatar_defaults', 'newgravatar' );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . '/images/default_avatar.png';
$avatar_defaults[$myavatar] = "Locale";
return $avatar_defaults;
}
A new avatar appears in Options-Discussion. Problem is it's not local at all.. the avatar is taken from http://i1.wp.com/mydomain.com/wp-content/themes/mytheme/images/default_avatar.png.
So it passes through i1.wp.com anyway.. how can I just have a friggin LOCAL link?
A: You have the Photon module enabled in the Jetpack plugin. That module routes your images through WordPress.com's CDN. If you don't want this to happen, disable the Photon module in Jetpack.
| Q: Use local image for default avatar I tried putting this snippet in my functions.php
add_filter( 'avatar_defaults', 'newgravatar' );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . '/images/default_avatar.png';
$avatar_defaults[$myavatar] = "Locale";
return $avatar_defaults;
}
A new avatar appears in Options-Discussion. Problem is it's not local at all.. the avatar is taken from http://i1.wp.com/mydomain.com/wp-content/themes/mytheme/images/default_avatar.png.
So it passes through i1.wp.com anyway.. how can I just have a friggin LOCAL link?
A: You have the Photon module enabled in the Jetpack plugin. That module routes your images through WordPress.com's CDN. If you don't want this to happen, disable the Photon module in Jetpack.
A: I've been looking up how to do this myself and that same function shown above everyone keeps suggesting isn't working, perhaps due to a recent update to WP's codebase, I'm not entirely sure. It's a little hackish and it involves editing core files (not good) but it's a work-around solution. Here's the steps:
*
*Use the same function specified in the original post
*Open /wp-includes/pluggable.php and search for "function get_avatar", this should get you to where the function is defined in the file
*Scroll down to just above where the first IMG tag is outputted, you should see this:
$out = str_replace( '&', '&', esc_url( $out ) );
$avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />";
*Just under $out, add $out = $default; This basically passes the default image source url (stored in the options table)
So it should look like this:
$out = str_replace( '&', '&', esc_url( $out ) );
$out = $default;
$avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />";
} else {
$avatar = "<img alt='{$safe_alt}' src='{$default}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";
}
return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt);
Again, this isn't ideal obviously because the next time you update WordPress, you'll lose this change. But for the moment it works.
To future visitors looking to not modify core files, you may want to look into filtering the WP function get_avatar. It seems to do so would require modifying the string supplied in the filter with a regular expression to remove the gravatar domain. I attempted it but suck at regex. :P
| wordpress | {
"language": "en",
"length": 365,
"provenance": "stackexchange_00019.jsonl.gz:440065",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/126114"
} | [
0.06298828125,
-0.012054443359375,
0.06793212890625,
-0.04638671875,
-0.00782012939453125,
0.01300048828125,
0.039306640625,
-0.046356201171875,
0.0074920654296875,
0.018035888671875,
-0.01395416259765625,
0.0009307861328125,
-0.0004317760467529297,
-0.01396942138671875,
-0.00472259521484375,
-0.028717041015625,
0.04168701171875,
0.0159454345703125,
0.04705810546875,
0.00020325183868408203,
-0.00838470458984375,
0.038787841796875,
-0.0159912109375,
0.05841064453125,
0.00603485107421875,
-0.005985260009765625,
0.08709716796875,
-0.0257415771484375,
-0.005748748779296875,
-0.016387939453125,
0.0129852294921875,
0.00424957275390625,
-0.0264892578125,
0.026275634765625,
0.01142120361328125,
-0.018096923828125,
-0.029388427734375,
0.044525146484375,
0.0231170654296875,
-0.008880615234375,
0.0273284912109375,
-0.0187225341796875,
-0.043304443359375,
0.01837158203125,
-0.04510498046875,
-0.04364013671875,
0.0245361328125,
-0.01654052734375,
0.02490234375,
0.043731689453125,
0.00798797607421875,
-0.00701904296875,
-0.003742218017578125,
0.0238189697265625,
-0.00763702392578125,
-0.02728271484375,
0.008544921875,
0.0003657341003417969,
0.05340576171875,
-0.024749755859375,
-0.03643798828125,
-0.00727081298828125,
0.03179931640625,
0.005283355712890625,
-0.004058837890625,
0.01348876953125,
0.01727294921875,
0.0023040771484375,
-0.0006284713745117188,
0.006877899169921875,
-0.004337310791015625,
-0.01995849609375,
0.0076141357421875,
-0.04022216796875,
-0.036529541015625,
0.04876708984375,
-0.00988006591796875,
-0.002193450927734375,
0.0291748046875,
-0.03582763671875,
-0.0418701171875,
-0.039764404296875,
-0.0723876953125,
-0.05584716796875,
0.045257568359375,
0.006317138671875,
-0.0054168701171875,
-0.0024566650390625,
-0.0316162109375,
-0.01523590087890625,
-0.0325927734375,
-0.042633056640625,
0.0012655258178710938,
0.001667022705078125,
-0.038726806640625,
0.0014190673828125,
-0.00508880615234375,
-0.0335693359375,
-0.00864410400390625,
0.0159149169921875,
0.04388427734375,
-0.051788330078125,
0.07440185546875,
-0.021240234375,
0.03265380859375,
0.051483154296875,
-0.00885772705078125,
-0.01377105712890625,
0.0355224609375,
0.00731658935546875,
0.007030487060546875,
0.0189361572265625,
-0.0294342041015625,
-0.0300445556640625,
0.00772857666015625,
0.0270843505859375,
-0.06005859375,
0.0268096923828125,
-0.0115814208984375,
0.0084228515625,
0.0253753662109375,
0.0223846435546875,
-0.017974853515625,
0.007965087890625,
0.0168609619140625,
-0.0093536376953125,
-0.0401611328125,
0.01416015625,
-0.019989013671875,
0.038482666015625,
-0.0186309814453125,
0.0036067962646484375,
0.034881591796875,
-0.0006875991821289062,
-0.01457977294921875,
-0.0234832763671875,
0.0367431640625,
-0.041412353515625,
0.03564453125,
0.0056915283203125,
0.0160064697265625,
0.004291534423828125,
0.017425537109375,
0.026611328125,
-0.004199981689453125,
-0.005229949951171875,
0.0099639892578125,
0.034271240234375,
-0.01422119140625,
-0.00902557373046875,
0.022064208984375,
-0.015716552734375,
-0.004878997802734375,
0.035369873046875,
0.09283447265625,
0.0167999267578125,
0.09478759765625,
-0.028656005859375,
-0.0225830078125,
-0.0160369873046875,
-0.002719879150390625,
-0.01091766357421875,
-0.00783538818359375,
0.0011234283447265625,
-0.01340484619140625,
0.022308349609375,
0.0243072509765625,
-0.0010538101196289062,
0.0278167724609375,
0.01541900634765625,
0.004947662353515625,
-0.017364501953125,
0.039825439453125,
0.0147247314453125,
-0.00518035888671875,
0.01727294921875,
-0.0189971923828125,
-0.03057861328125,
0.0247955322265625,
-0.00347900390625,
-0.0021514892578125,
-0.02362060546875,
0.0282745361328125,
0.00775909423828125,
-0.0321044921875,
-0.006763458251953125,
-0.00525665283203125,
0.0298919677734375,
0.03863525390625,
0.0164947509765625,
-0.01461029052734375,
-0.0024871826171875,
-0.040496826171875,
-0.0159912109375,
-0.0080413818359375,
0.0160980224609375,
0.041656494140625,
0.0297088623046875,
0.0205841064453125,
-0.0270843505859375,
0.0650634765625,
0.0159149169921875,
0.01010894775390625,
-0.0119476318359375,
-0.0462646484375,
0.02655029296875,
-0.0305023193359375,
0.019989013671875,
-0.005466461181640625,
0.01300048828125,
0.0029468536376953125,
-0.0175018310546875,
0.0010366439819335938,
-0.048095703125,
-0.01306915283203125,
-0.006130218505859375,
-0.0245208740234375,
0.01454925537109375,
0.01134490966796875,
0.0096588134765625,
-0.001056671142578125,
-0.034820556640625,
-0.0084075927734375,
-0.003997802734375,
-0.004199981689453125,
0.009490966796875,
-0.031494140625,
-0.0093231201171875,
-0.015655517578125,
0.0224609375,
-0.0301513671875,
0.021148681640625,
-0.047637939453125,
-0.02569580078125,
-0.03155517578125,
-0.01369476318359375,
-0.0267333984375,
-0.03302001953125,
0.0227203369140625,
0.04498291015625,
0.024322509765625,
-0.00957489013671875,
0.005306243896484375,
0.052032470703125,
0.006923675537109375,
-0.038177490234375,
0.0295257568359375,
0.0078887939453125,
-0.0068817138671875,
-0.03302001953125,
-0.060150146484375,
-0.0292816162109375,
0.059967041015625,
-0.084228515625,
-0.01293182373046875,
0.061065673828125,
-0.0296478271484375,
-0.059173583984375,
0.01519012451171875,
0.0254364013671875,
0.006145477294921875,
0.00035691261291503906,
-0.0155181884765625,
0.0179290771484375,
-0.01036834716796875,
-0.0106048583984375,
-0.014739990234375,
-0.024627685546875,
-0.040924072265625,
0.0092010498046875,
0.03399658203125,
-0.03387451171875,
-0.001171112060546875,
0.0030307769775390625,
0.08746337890625,
0.01812744140625,
-0.03485107421875,
-0.01302337646484375,
0.040863037109375,
0.02142333984375,
-0.01104736328125,
0.0112762451171875,
0.0052032470703125,
-0.01136016845703125,
0.01519012451171875,
-0.042938232421875,
0.002834320068359375,
-0.0282135009765625,
-0.022918701171875,
-0.0372314453125,
0.005664825439453125,
0.01047515869140625,
-0.031158447265625,
0.0027523040771484375,
0.01512908935546875,
-0.0261993408203125,
0.001102447509765625,
-0.04974365234375,
0.038909912109375,
-0.04119873046875,
0.0589599609375,
0.07440185546875,
-0.0251007080078125,
0.029876708984375,
-0.0010061264038085938,
-0.0173492431640625,
-0.01361083984375,
0.03912353515625,
0.00848388671875,
-0.056884765625,
0.0262603759765625,
0.0294036865234375,
-0.0198822021484375,
-0.056549072265625,
-0.04620361328125,
-0.060455322265625,
-0.044219970703125,
-0.079833984375,
-0.122802734375,
-0.0157318115234375,
-0.00916290283203125,
0.01207733154296875,
-0.00980377197265625,
0.01373291015625,
0.0097503662109375,
-0.0083465576171875,
0.01502227783203125,
0.002094268798828125,
-0.04119873046875,
-0.0119476318359375,
0.0186614990234375,
-0.0489501953125,
-0.02008056640625,
-0.035736083984375,
0.00865936279296875,
-0.006572723388671875,
0.0179595947265625,
0.042755126953125,
0.04327392578125,
0.01238250732421875,
0.07476806640625,
0.016143798828125,
-0.030548095703125,
0.019805908203125,
0.0021648406982421875,
-0.0262908935546875,
0.03826904296875,
-0.002307891845703125,
0.0227203369140625,
0.054443359375,
-0.03839111328125,
-0.00244140625,
-0.0241851806640625,
-0.012847900390625,
0.01480865478515625,
0.01384735107421875,
-0.01053619384765625,
-0.0352783203125,
0.03143310546875,
-0.04449462890625,
-0.055511474609375,
0.0082855224609375,
-0.043670654296875,
0.07562255859375,
0.031524658203125,
-0.0285186767578125,
0.01181793212890625,
0.0255279541015625,
-0.0015497207641601562,
-0.016754150390625,
0.0548095703125,
-0.02880859375,
-0.021270751953125,
-0.0162811279296875,
-0.0279693603515625,
-0.02838134765625,
0.0347900390625,
-0.04156494140625,
0.01861572265625,
0.012939453125,
-0.020477294921875,
-0.01104736328125,
-0.0162200927734375,
-0.0226593017578125,
-0.02337646484375,
0.0276336669921875,
-0.00978851318359375,
0.0103607177734375,
-0.01800537109375,
-0.0040130615234375,
-0.015655517578125,
0.01617431640625,
-0.0146331787109375,
-0.0155181884765625,
-0.01934814453125,
-0.0004353523254394531,
-0.04132080078125,
-0.01503753662109375,
-0.032073974609375,
0.01953125,
-0.07208251953125,
-0.012664794921875,
0.0027256011962890625,
-0.057586669921875,
0.041229248046875,
-0.06488037109375,
-0.00899505615234375,
-0.05462646484375,
0.0227813720703125,
-0.001605987548828125,
-0.03802490234375,
0.0255584716796875,
-0.042724609375,
-0.01146697998046875,
-0.01788330078125,
-0.0025844573974609375,
-0.1328125,
-0.023712158203125,
-0.0262298583984375,
0.08648681640625,
-0.009674072265625,
0.019073486328125,
-0.052001953125,
0.056854248046875,
-0.0216522216796875,
0.0166778564453125,
-0.020111083984375,
0.0189208984375,
-0.0151824951171875,
-0.0006613731384277344,
-0.00860595703125,
-0.00707244873046875,
-0.00251007080078125,
-0.04278564453125,
-0.1041259765625,
-0.04864501953125,
-0.0009112358093261719,
0.0310211181640625,
0.042236328125,
-0.0260772705078125,
-0.039215087890625,
-0.048675537109375,
0.00910186767578125,
0.004108428955078125,
0.0007419586181640625,
0.0007462501525878906,
-0.0467529296875,
-0.01287078857421875,
0.06610107421875,
0.0206451416015625,
-0.01546478271484375,
-0.01407623291015625,
0.0838623046875,
0.0162353515625,
-0.03009033203125,
-0.036376953125,
0.0092315673828125,
0.03564453125,
0.015838623046875,
0.0765380859375,
0.051727294921875,
0.01058197021484375,
0.021148681640625,
0.0283355712890625,
0.0291595458984375,
-0.023406982421875,
0.052215576171875,
-0.0259246826171875,
-0.025604248046875,
0.04541015625,
-0.00449371337890625,
-0.01953125,
0.0111083984375,
0.012359619140625,
-0.020477294921875,
-0.01422119140625,
0.03265380859375,
0.01145172119140625,
-0.0071868896484375,
-0.039154052734375,
-0.0440673828125,
0.01959228515625,
0.004535675048828125,
0.05181884765625,
-0.015228271484375,
0.01849365234375,
0.0267486572265625,
0.042694091796875,
-0.00809478759765625,
0.004703521728515625,
0.006793975830078125,
0.01297760009765625,
0.0267181396484375,
0.018798828125,
0.019256591796875,
-0.02239990234375,
-0.003910064697265625,
-0.0127105712890625,
0.01136016845703125,
-0.021636962890625,
-0.0273895263671875,
0.0279388427734375,
0.0294342041015625,
0.001918792724609375,
0.00991058349609375,
0.01727294921875,
-0.01416015625,
0.0004627704620361328,
0.004589080810546875,
0.00885772705078125,
-0.0120391845703125,
-0.0252685546875,
-0.01290130615234375,
-0.006175994873046875,
0.001926422119140625,
0.03790283203125,
0.03717041015625,
-0.00750732421875,
0.034515380859375,
-0.01409149169921875,
-0.0208282470703125,
-0.030426025390625,
0.033447265625,
0.0114898681640625,
0.0171051025390625,
-0.0025081634521484375,
0.01287078857421875,
0.0343017578125,
-0.00469207763671875,
-0.022613525390625,
0.01552581787109375,
0.0262603759765625,
-0.0399169921875,
-0.006610870361328125,
0.0224761962890625,
-0.020172119140625,
0.007434844970703125,
0.00801849365234375,
-0.0601806640625,
-0.05596923828125,
-0.0341796875,
-0.0023651123046875,
0.054107666015625,
-0.0255889892578125,
-0.031707763671875,
-0.007411956787109375,
-0.03387451171875,
-0.01476287841796875,
0.032012939453125,
-0.05816650390625,
0.030914306640625,
0.0225372314453125,
0.0006537437438964844,
-0.035186767578125,
-0.01678466796875,
0.023681640625,
0.0322265625,
-0.0335693359375,
-0.01532745361328125,
0.05987548828125,
0.0030994415283203125,
0.012603759765625,
-0.00824737548828125,
-0.0262298583984375,
-0.0625,
0.01422119140625,
0.0200347900390625,
-0.006961822509765625,
-0.00728607177734375,
-0.0240936279296875,
-0.04052734375,
-0.01812744140625,
0.07464599609375,
0.0208740234375,
-0.01113128662109375,
-0.0167236328125,
0.0113372802734375,
0.02227783203125,
0.0131378173828125,
0.00891876220703125,
0.0031223297119140625,
0.021820068359375,
0.0130767822265625,
0.064453125,
-0.03533935546875,
0.0138702392578125,
0.0105438232421875,
-0.004177093505859375,
-0.0298614501953125,
-0.01299285888671875,
0.0033931732177734375,
-0.00673675537109375,
-0.01551055908203125,
-0.062744140625,
-0.0028209686279296875,
0.0105438232421875,
-0.01995849609375,
0.04815673828125,
0.048828125,
0.019012451171875,
0.047271728515625,
-0.003582000732421875,
0.00689697265625,
-0.005504608154296875,
-0.0109100341796875,
-0.0249176025390625,
0.044586181640625,
0.027069091796875,
0.00937652587890625,
0.018096923828125,
0.000736236572265625,
-0.045379638671875,
0.0005297660827636719,
0.0038909912109375,
-0.01120758056640625,
0.034423828125,
-0.058837890625,
0.057586669921875,
0.085693359375,
0.017547607421875,
0.053558349609375,
0.005443572998046875,
-0.00853729248046875,
0.034332275390625,
0.03466796875,
0.0159149169921875,
-0.050872802734375,
0.0098724365234375,
-0.00550079345703125,
-0.009979248046875,
-0.007480621337890625,
-0.020538330078125,
0.0055999755859375,
-0.03680419921875,
0.041412353515625,
0.0222625732421875,
0.0176849365234375,
0.01605224609375,
0.0025482177734375,
0.0295867919921875,
0.00823211669921875,
-0.019317626953125,
-0.0201568603515625,
0.01873779296875,
-0.054412841796875,
-0.034027099609375,
-0.01076507568359375,
0.008453369140625,
0.0202178955078125,
0.01499176025390625,
0.040313720703125,
-0.00795745849609375,
-0.0154266357421875,
-0.06524658203125,
0.01529693603515625,
-0.025054931640625,
-0.01126861572265625,
0.00643157958984375,
0.003143310546875,
-0.024322509765625,
-0.07818603515625,
-0.0212860107421875,
-0.0128021240234375,
-0.027740478515625,
0.014678955078125,
0.0163726806640625,
0.0136566162109375,
0.028961181640625,
0.0029239654541015625,
-0.0078887939453125,
0.01419830322265625,
-0.0031585693359375,
0.048736572265625,
-0.0304718017578125,
0.00870513916015625,
0.032928466796875,
-0.05169677734375,
0.00821685791015625,
0.01421356201171875,
0.00726318359375,
0.0058135986328125,
-0.035888671875,
0.05877685546875,
-0.0226898193359375,
-0.027496337890625,
0.0217132568359375,
-0.017578125,
-0.01342010498046875,
0.00400543212890625,
-0.00704193115234375,
-0.0262451171875,
-0.059844970703125,
-0.0180816650390625,
-0.10968017578125,
-0.0107269287109375,
-0.04052734375,
-0.046600341796875,
0.0201263427734375,
0.01947021484375,
0.005573272705078125,
-0.01459503173828125,
0.01061248779296875,
0.0119781494140625,
-0.003887176513671875,
-0.01280975341796875,
-0.0212554931640625,
-0.016082763671875,
0.0240325927734375,
-0.003452301025390625,
-0.0012502670288085938,
0.00817108154296875,
0.03253173828125,
0.078369140625,
0.028839111328125,
-0.039581298828125,
-0.01873779296875,
0.02093505859375,
-0.0015993118286132812,
-0.04608154296875,
0.0634765625,
0.0240631103515625,
-0.012481689453125,
-0.0325927734375,
-0.002506256103515625,
0.01122283935546875,
-0.05682373046875,
0.0011301040649414062,
0.054229736328125,
0.018798828125,
0.01464080810546875,
0.024169921875,
0.0252685546875,
-0.0218505859375,
-0.00015437602996826172,
0.027862548828125,
-0.0484619140625,
0.005504608154296875,
0.04241943359375,
0.0247802734375,
-0.0101470947265625,
-0.067626953125,
0.004192352294921875,
0.02740478515625,
-0.004398345947265625,
-0.01546478271484375,
0.043212890625,
0.023101806640625,
-0.06243896484375,
0.004512786865234375,
0.0012722015380859375,
0.0013685226440429688,
-0.01250457763671875,
0.02362060546875,
0.002197265625,
0.02191162109375,
-0.05963134765625,
-0.050140380859375,
0.057586669921875,
0.0706787109375,
-0.02423095703125,
-0.056549072265625,
0.0036945343017578125,
-0.006534576416015625,
0.0275726318359375,
0.012054443359375,
0.038299560546875,
-0.0850830078125,
-0.0321044921875,
-0.0123748779296875,
0.0022945404052734375,
0.03302001953125,
-0.017669677734375,
0.0106964111328125,
0.0333251953125,
-0.0184326171875,
0.0277557373046875,
-0.01094818115234375,
0.002918243408203125,
0.0064697265625,
0.0144805908203125,
-0.0018301010131835938,
0.0130462646484375,
0.001918792724609375,
0.01006317138671875,
-0.0208282470703125,
0.03338623046875,
0.0109405517578125,
0.0203399658203125,
-0.046905517578125,
-0.0282440185546875,
0.0171356201171875,
0.0440673828125,
0.051666259765625,
-0.031341552734375,
0.024749755859375,
0.0030155181884765625,
-0.03717041015625,
0.00682830810546875,
0.0240325927734375,
-0.021942138671875,
0.034332275390625,
-0.035125732421875,
0.037078857421875,
0.01251220703125,
-0.0027256011962890625,
-0.005046844482421875,
-0.0019683837890625,
0.0557861328125,
-0.06475830078125,
0.060760498046875,
-0.01326751708984375,
-0.0537109375,
0.060546875,
0.005767822265625,
0.143798828125,
0.003871917724609375,
-0.030059814453125,
0.01500701904296875,
-0.0219573974609375,
-0.0423583984375,
-0.01264190673828125,
0.0243377685546875,
0.006702423095703125,
0.0290679931640625,
-0.0438232421875,
-0.031494140625,
0.0227203369140625,
-0.0107269287109375,
-0.0019235610961914062,
-0.002880096435546875,
-0.00605010986328125,
-0.0439453125,
-0.006744384765625,
-0.002834320068359375,
-0.01690673828125,
0.022918701171875,
0.0208740234375,
0.0716552734375,
-0.028228759765625,
0.045623779296875,
-0.0098419189453125,
0.0308685302734375,
-0.01419830322265625,
0.00490570068359375,
-0.00732421875,
0.038238525390625,
0.0217132568359375,
-0.0250091552734375,
-0.0247650146484375,
-0.01873779296875,
0.0229034423828125,
-0.04779052734375,
-0.01309967041015625,
-0.010833740234375,
0.017364501953125,
-0.004047393798828125,
0.037689208984375,
-0.0240325927734375,
-0.0850830078125,
-0.0904541015625,
0.0004711151123046875,
0.00203704833984375,
0.0538330078125,
0.01120758056640625,
0.021270751953125,
0.0176849365234375,
-0.0112152099609375,
0.024810791015625,
-0.010498046875,
0.03173828125,
0.033233642578125,
-0.004673004150390625,
-0.0167694091796875,
0.0217437744140625,
-0.00635528564453125,
-0.0016565322875976562,
0.0025577545166015625,
0.06146240234375,
-0.015838623046875,
0.0161895751953125,
0.0751953125,
-0.0034656524658203125,
0.01242828369140625,
-0.060760498046875,
-0.041412353515625,
0.0770263671875,
0.01071929931640625,
0.0028400421142578125,
-0.01959228515625,
-0.0029773712158203125,
-0.0513916015625,
-0.0104217529296875,
0.0179901123046875,
-0.01995849609375,
-0.0213623046875,
-0.0272064208984375,
-0.004467010498046875,
0.0526123046875,
0.017364501953125,
-0.03338623046875,
0.00511932373046875,
-0.02581787109375,
0.04779052734375,
0.022918701171875,
-0.035675048828125,
-0.0081024169921875,
-0.004291534423828125,
-0.0228424072265625,
-0.01983642578125,
-0.0423583984375,
-0.006145477294921875,
-0.0284576416015625,
0.01055145263671875,
0.0328369140625,
0.004302978515625,
0.00934600830078125,
-0.005359649658203125,
0.0053253173828125,
0.043243408203125,
-0.0936279296875,
-0.035247802734375,
0.019805908203125,
-0.0181732177734375,
-0.020660400390625,
0.00608062744140625,
0.0247955322265625,
-0.046356201171875,
-0.017547607421875,
-0.00946044921875,
0.005462646484375,
0.0201568603515625,
-0.03228759765625,
-0.05877685546875,
0.0020580291748046875,
0.0004699230194091797,
-0.0293426513671875,
0.00909423828125,
0.0171051025390625,
-0.00836944580078125,
0.016448974609375,
0.01751708984375,
-0.031890869140625,
0.00855255126953125,
-0.00667572021484375,
-0.017608642578125,
0.00472259521484375,
0.0119781494140625,
-0.03411865234375,
0.0263214111328125,
0.0193328857421875,
0.0609130859375,
-0.03436279296875,
0.021942138671875,
-0.020965576171875,
0.03594970703125,
0.04595947265625,
-0.044891357421875,
-0.0323486328125,
-0.0178070068359375,
0.00040340423583984375,
-0.0450439453125,
-0.00556182861328125,
0.0127105712890625,
0.009185791015625,
0.078369140625,
0.0214385986328125,
-0.0065155029296875,
-0.031829833984375,
-0.005199432373046875,
0.0010709762573242188,
-0.04644775390625,
-0.029998779296875,
0.039154052734375,
-0.1048583984375,
-0.04180908203125,
-0.0010309219360351562,
-0.003658294677734375,
-0.0143280029296875,
-0.0279083251953125,
-0.026824951171875,
-0.0112152099609375,
-0.03399658203125,
-0.015533447265625,
0.006931304931640625,
0.01396942138671875,
-0.00220489501953125,
0.0060272216796875,
0.04937744140625,
-0.024505615234375,
-0.007495880126953125,
0.035980224609375,
0.05291748046875,
0.02984619140625,
0.0014142990112304688,
0.0124664306640625,
0.00038552284240722656,
0.046478271484375,
0.0267181396484375,
0.01392364501953125,
-0.045196533203125,
-0.004230499267578125,
0.0236053466796875,
-0.01210784912109375,
0.0246124267578125,
0.0182952880859375,
0.045684814453125,
0.01332855224609375,
0.01175689697265625,
-0.01004791259765625,
-0.01202392578125,
-0.008209228515625,
0.002330780029296875,
-0.06524658203125,
0.0191497802734375,
-0.033935546875,
-0.018341064453125,
0.0193634033203125,
-0.0249481201171875,
0.0145721435546875,
-0.0207061767578125,
0.0174407958984375,
-0.0027523040771484375,
-0.0124359130859375,
0.0276031494140625
]
|
b3c62d41e746edb1165a88915b3fda419e75d2c8 | Wordpress Stackexchange
Q: Disable comments feed, but not the others I'd like to customize my WordPress blog in such a way that it is no more possible to access the comments feed.
Other feeds should still be available, and it should still be possible to add comments to any article.
I tried to find a plugin to do this, but what I found is a all or nothing feature, without the possibility to finely adjust which feeds are allowed and which are not.
A: As mentioned by @glueckpress, Since 4.4 you can use the feed_links_show_comments_feed filter.
Example (in your theme functions.php file) :
add_action( 'after_setup_theme', 'head_cleanup' );
function head_cleanup(){
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
// disable comments feed
add_filter( 'feed_links_show_comments_feed', '__return_false' );
}
| Q: Disable comments feed, but not the others I'd like to customize my WordPress blog in such a way that it is no more possible to access the comments feed.
Other feeds should still be available, and it should still be possible to add comments to any article.
I tried to find a plugin to do this, but what I found is a all or nothing feature, without the possibility to finely adjust which feeds are allowed and which are not.
A: As mentioned by @glueckpress, Since 4.4 you can use the feed_links_show_comments_feed filter.
Example (in your theme functions.php file) :
add_action( 'after_setup_theme', 'head_cleanup' );
function head_cleanup(){
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
// disable comments feed
add_filter( 'feed_links_show_comments_feed', '__return_false' );
}
A: function remove_comment_feeds( $for_comments ){
if( $for_comments ){
remove_action( 'do_feed_rss2', 'do_feed_rss2', 10, 1 );
remove_action( 'do_feed_atom', 'do_feed_atom', 10, 1 );
}
}
add_action( 'do_feed_rss2', 'remove_comment_feeds', 9, 1 );
add_action( 'do_feed_atom', 'remove_comment_feeds', 9, 1 );
A: @Shazzad’s approach seems to not work when current_theme_supports( 'automatic-feed-links' ), because up to 4.3 WordPress seems to be pretty ego about feed links. You would have to remove_action( 'wp_head', 'feed_links', 2 ) hard and add your own function printing only the link for post feeds.
However, from 4.4 this seems to get easier with a brand-new filter: feed_links_show_posts_feed.
A: I wanted to remove the comments feed and posts comments feed. As of Wordpress 5.4.2, this worked for me.
Add this into your "after_setup_theme" action.
add_theme_support('automatic-feed-links');
Add this right after that line:
add_filter( 'feed_links_show_comments_feed', '__return_false' );
After your "after_setup_theme action, add this function and filter ( I pulled this function from https://jeffvautin.com/2016/03/removing-comments-rss-feeds-from-wordpress/ blog.) It will removed the posts comments feed.
/**
* Remove the posts comments rss feed
*/
function disablePostCommentsFeedLink($for_comments) {
return;
}
add_filter('post_comments_feed_link','disablePostCommentsFeedLink');
I also add this to remove those non-essential feeds
/**
* remove non-essential rss feeds
*
* This removes feeds like tags, authors, search, post type
*/
remove_action( 'wp_head', 'feed_links_extra', 3 );
I believe this will just give me the main feed. I'm not sure if this is the best way of going about this, but seems to do the trick.
| wordpress | {
"language": "en",
"length": 360,
"provenance": "stackexchange_00019.jsonl.gz:440081",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/126174"
} | [
0.079833984375,
-0.00640106201171875,
0.025177001953125,
-0.007328033447265625,
0.016815185546875,
-0.036529541015625,
0.0794677734375,
-0.0382080078125,
0.0013036727905273438,
0.0252685546875,
-0.042572021484375,
-0.0000311732292175293,
-0.0340576171875,
0.0015192031860351562,
-0.0362548828125,
-0.06988525390625,
0.035797119140625,
-0.00914764404296875,
0.03533935546875,
-0.0175628662109375,
0.0286712646484375,
-0.0109710693359375,
0.0462646484375,
0.0491943359375,
0.0189208984375,
-0.009185791015625,
0.08447265625,
-0.0049591064453125,
0.00235748291015625,
-0.012603759765625,
0.0301971435546875,
-0.0272064208984375,
0.0191650390625,
0.037628173828125,
-0.048675537109375,
-0.032196044921875,
-0.01491546630859375,
0.0056304931640625,
-0.024688720703125,
0.037261962890625,
0.027923583984375,
-0.024932861328125,
0.0230865478515625,
0.0050811767578125,
0.007167816162109375,
0.003124237060546875,
0.01495361328125,
-0.050933837890625,
0.0227508544921875,
0.00007385015487670898,
-0.002895355224609375,
0.023651123046875,
0.01556396484375,
-0.047149658203125,
-0.018096923828125,
-0.032684326171875,
-0.004116058349609375,
0.013916015625,
0.01666259765625,
-0.02313232421875,
-0.0072784423828125,
0.01465606689453125,
0.01415252685546875,
0.03277587890625,
0.00756072998046875,
0.00452423095703125,
0.0242156982421875,
0.0232696533203125,
-0.020721435546875,
0.0184783935546875,
0.0252227783203125,
-0.0361328125,
0.022552490234375,
-0.028411865234375,
-0.005771636962890625,
0.01177978515625,
-0.0201263427734375,
-0.018646240234375,
0.034332275390625,
-0.0194244384765625,
-0.023590087890625,
0.00811004638671875,
-0.050537109375,
-0.0180511474609375,
-0.0069580078125,
-0.00933074951171875,
-0.0139007568359375,
-0.0093231201171875,
-0.026702880859375,
0.0256195068359375,
-0.0255889892578125,
-0.042510986328125,
0.01480865478515625,
0.038970947265625,
-0.004322052001953125,
0.00792694091796875,
0.0112762451171875,
0.03204345703125,
-0.02850341796875,
-0.004192352294921875,
-0.00904083251953125,
-0.0135650634765625,
-0.00646209716796875,
-0.0277252197265625,
0.00823974609375,
-0.00569915771484375,
-0.031982421875,
-0.01555633544921875,
0.05499267578125,
0.044097900390625,
-0.0038509368896484375,
0.02154541015625,
-0.01396942138671875,
0.0014963150024414062,
0.01446533203125,
0.0014896392822265625,
-0.058502197265625,
0.048004150390625,
-0.0099029541015625,
0.037841796875,
0.005214691162109375,
0.039947509765625,
-0.07080078125,
0.000705718994140625,
-0.0180816650390625,
-0.0355224609375,
-0.00849151611328125,
0.03167724609375,
-0.0234375,
-0.00775909423828125,
-0.007686614990234375,
0.0243988037109375,
0.034881591796875,
0.05517578125,
0.00656890869140625,
-0.0007643699645996094,
0.03564453125,
-0.0322265625,
-0.0237274169921875,
0.025482177734375,
0.031402587890625,
-0.0251617431640625,
-0.00830841064453125,
0.0015993118286132812,
0.00032401084899902344,
0.00901031494140625,
0.0255126953125,
0.01447296142578125,
-0.00046563148498535156,
-0.006351470947265625,
-0.04656982421875,
0.042327880859375,
0.0419921875,
0.006153106689453125,
0.0160980224609375,
-0.0455322265625,
0.053985595703125,
-0.060577392578125,
0.00933837890625,
-0.06201171875,
-0.0006237030029296875,
-0.00800323486328125,
0.0017518997192382812,
-0.058807373046875,
-0.045989990234375,
-0.0084381103515625,
-0.019012451171875,
0.005542755126953125,
0.01125335693359375,
0.006099700927734375,
-0.023956298828125,
-0.03131103515625,
0.001468658447265625,
-0.0015316009521484375,
0.0016355514526367188,
0.031890869140625,
-0.0077972412109375,
0.0013303756713867188,
0.01314544677734375,
0.00365447998046875,
-0.0029964447021484375,
-0.0401611328125,
0.00812530517578125,
0.01180267333984375,
-0.06060791015625,
0.0372314453125,
0.034454345703125,
0.07879638671875,
-0.003173828125,
0.0280609130859375,
0.05572509765625,
0.01541900634765625,
0.023040771484375,
-0.0025501251220703125,
-0.0013952255249023438,
-0.04522705078125,
-0.003513336181640625,
-0.010833740234375,
-0.0173492431640625,
0.01158905029296875,
-0.0012235641479492188,
0.0117645263671875,
-0.03350830078125,
0.02410888671875,
-0.08880615234375,
0.009429931640625,
-0.0289154052734375,
0.038604736328125,
-0.02947998046875,
-0.006641387939453125,
0.018951416015625,
-0.045654296875,
-0.007518768310546875,
-0.01446533203125,
-0.0134429931640625,
-0.0015783309936523438,
-0.0200958251953125,
0.0279693603515625,
0.0024852752685546875,
0.035797119140625,
0.0040283203125,
-0.01383209228515625,
0.004180908203125,
0.01018524169921875,
0.0697021484375,
-0.036529541015625,
-0.006557464599609375,
-0.03778076171875,
0.047393798828125,
-0.0028018951416015625,
-0.06048583984375,
0.035614013671875,
-0.0220947265625,
-0.0010013580322265625,
0.00753021240234375,
0.0177459716796875,
0.02874755859375,
-0.03656005859375,
0.005977630615234375,
0.0295257568359375,
0.037384033203125,
0.0013933181762695312,
0.003082275390625,
0.007129669189453125,
0.034942626953125,
-0.016448974609375,
0.0233917236328125,
-0.01861572265625,
0.047454833984375,
0.06268310546875,
0.0014047622680664062,
-0.00547027587890625,
0.022918701171875,
0.0110015869140625,
-0.00988006591796875,
0.0330810546875,
-0.015045166015625,
0.00572967529296875,
0.00907135009765625,
-0.0031414031982421875,
0.00971221923828125,
0.06646728515625,
0.01029205322265625,
0.0203399658203125,
0.0191802978515625,
-0.016448974609375,
0.01690673828125,
0.020904541015625,
-0.01247406005859375,
-0.010986328125,
0.01837158203125,
-0.0016469955444335938,
-0.0061798095703125,
0.033233642578125,
0.04302978515625,
-0.0253753662109375,
-0.00738525390625,
-0.0186309814453125,
-0.007289886474609375,
0.017913818359375,
-0.008697509765625,
0.03369140625,
-0.01270294189453125,
-0.016021728515625,
-0.0228729248046875,
-0.03985595703125,
-0.0136871337890625,
-0.01142120361328125,
-0.026336669921875,
0.00005239248275756836,
0.01885986328125,
0.0218505859375,
-0.025054931640625,
-0.0035266876220703125,
0.06610107421875,
0.00341796875,
-0.031951904296875,
-0.089111328125,
0.06512451171875,
-0.04486083984375,
0.053985595703125,
0.0888671875,
0.02239990234375,
-0.00249481201171875,
0.018157958984375,
-0.0123443603515625,
0.036529541015625,
-0.00424957275390625,
-0.0043182373046875,
0.03216552734375,
-0.055267333984375,
0.007022857666015625,
0.00730133056640625,
0.00839996337890625,
0.01421356201171875,
-0.0218048095703125,
0.0042572021484375,
0.030059814453125,
0.03228759765625,
0.08209228515625,
0.029541015625,
-0.028045654296875,
-0.01398468017578125,
-0.01024627685546875,
-0.0111541748046875,
-0.0182342529296875,
-0.003932952880859375,
-0.006999969482421875,
-0.037078857421875,
-0.0221710205078125,
-0.042510986328125,
-0.0165252685546875,
-0.047149658203125,
0.08416748046875,
0.0036411285400390625,
0.04046630859375,
0.009735107421875,
0.03961181640625,
0.00768280029296875,
-0.0290679931640625,
0.0262908935546875,
-0.007595062255859375,
-0.004638671875,
0.0048828125,
-0.0016164779663085938,
-0.02734375,
0.04290771484375,
-0.0192718505859375,
0.042572021484375,
0.043243408203125,
-0.0220794677734375,
-0.002353668212890625,
-0.0224151611328125,
0.0184783935546875,
0.0005664825439453125,
0.043609619140625,
0.0286102294921875,
0.00949859619140625,
0.017120361328125,
-0.0262908935546875,
-0.032562255859375,
-0.0341796875,
-0.0693359375,
-0.016021728515625,
0.057281494140625,
0.0178985595703125,
-0.062469482421875,
0.0201416015625,
0.00603485107421875,
0.0074920654296875,
0.045166015625,
-0.01171875,
-0.0035915374755859375,
-0.01084136962890625,
-0.0179443359375,
-0.02899169921875,
0.006755828857421875,
-0.01064300537109375,
0.01470184326171875,
-0.003734588623046875,
0.006195068359375,
-0.039215087890625,
0.04351806640625,
-0.08355712890625,
-0.0026226043701171875,
0.034332275390625,
-0.042144775390625,
-0.018280029296875,
-0.00006920099258422852,
0.00473785400390625,
0.0019140243530273438,
0.03314208984375,
-0.009521484375,
-0.01343536376953125,
-0.025054931640625,
0.016693115234375,
-0.0281524658203125,
-0.05413818359375,
0.01029205322265625,
-0.02069091796875,
-0.0555419921875,
0.0279083251953125,
-0.0272216796875,
-0.0120697021484375,
-0.00975799560546875,
-0.04168701171875,
0.005615234375,
-0.03228759765625,
-0.00536346435546875,
-0.0318603515625,
-0.0352783203125,
0.0338134765625,
-0.076416015625,
0.0308837890625,
-0.0025424957275390625,
-0.042999267578125,
-0.054412841796875,
-0.006374359130859375,
-0.0240631103515625,
0.00940704345703125,
0.01216888427734375,
-0.0005311965942382812,
0.0021038055419921875,
0.0340576171875,
-0.0123443603515625,
-0.021087646484375,
0.00539398193359375,
0.01291656494140625,
-0.00939178466796875,
0.04205322265625,
0.00724029541015625,
-0.006481170654296875,
-0.0207061767578125,
0.0038852691650390625,
0.004131317138671875,
0.06622314453125,
-0.00914764404296875,
0.01253509521484375,
-0.0101470947265625,
-0.0211029052734375,
0.0025005340576171875,
-0.052459716796875,
-0.0523681640625,
0.017852783203125,
-0.005458831787109375,
-0.0165252685546875,
-0.061065673828125,
-0.038330078125,
0.0170745849609375,
-0.05718994140625,
-0.0128631591796875,
0.0146484375,
0.04443359375,
0.018035888671875,
0.00395965576171875,
0.00470733642578125,
-0.0196380615234375,
0.01317596435546875,
0.004261016845703125,
0.034759521484375,
0.006641387939453125,
-0.004154205322265625,
0.05810546875,
-0.025482177734375,
0.00878143310546875,
-0.034576416015625,
0.067626953125,
-0.0308074951171875,
-0.0302581787109375,
0.041900634765625,
-0.035614013671875,
0.007190704345703125,
0.0295562744140625,
0.00498199462890625,
-0.0161895751953125,
0.0098114013671875,
0.0357666015625,
-0.007549285888671875,
-0.0019550323486328125,
-0.0277099609375,
-0.00508880615234375,
0.01593017578125,
-0.0391845703125,
0.03643798828125,
0.0260772705078125,
-0.01041412353515625,
0.0005908012390136719,
-0.035400390625,
0.014892578125,
0.0037517547607421875,
0.0229949951171875,
-0.033843994140625,
0.03509521484375,
0.02276611328125,
-0.0067291259765625,
-0.00937652587890625,
-0.004001617431640625,
0.040802001953125,
-0.0009713172912597656,
-0.05523681640625,
-0.002704620361328125,
0.0164642333984375,
0.0247955322265625,
0.0289306640625,
0.010528564453125,
0.057708740234375,
0.00048089027404785156,
-0.0004887580871582031,
0.00975799560546875,
-0.042999267578125,
0.0012359619140625,
-0.043792724609375,
0.034454345703125,
0.0039043426513671875,
-0.0066070556640625,
0.0271148681640625,
0.0302581787109375,
-0.020111083984375,
0.038818359375,
-0.0151214599609375,
0.0310821533203125,
0.03204345703125,
0.0007619857788085938,
-0.012054443359375,
0.05926513671875,
-0.0149993896484375,
-0.01119232177734375,
0.0285186767578125,
-0.0024585723876953125,
-0.054779052734375,
0.027313232421875,
-0.0027828216552734375,
0.0236358642578125,
0.0255126953125,
-0.0128631591796875,
0.0157012939453125,
-0.02301025390625,
0.0595703125,
0.050384521484375,
-0.03662109375,
-0.0207672119140625,
-0.01500701904296875,
0.006114959716796875,
0.0024051666259765625,
-0.00519561767578125,
-0.00920867919921875,
-0.0130157470703125,
-0.04388427734375,
0.0345458984375,
-0.08673095703125,
0.00853729248046875,
0.031280517578125,
-0.015899658203125,
0.0002961158752441406,
0.00849151611328125,
-0.037872314453125,
-0.037445068359375,
0.00222015380859375,
-0.00672149658203125,
0.0157318115234375,
-0.01085662841796875,
0.0226593017578125,
-0.02886962890625,
-0.00955963134765625,
0.01087188720703125,
0.0084991455078125,
0.051300048828125,
0.0245208740234375,
-0.055633544921875,
-0.01161956787109375,
-0.054412841796875,
-0.031524658203125,
-0.092041015625,
-0.05194091796875,
-0.06597900390625,
0.01605224609375,
0.018157958984375,
0.03070068359375,
-0.004947662353515625,
0.007160186767578125,
0.004451751708984375,
0.0308990478515625,
-0.00968170166015625,
0.08905029296875,
-0.01503753662109375,
0.0296173095703125,
0.022491455078125,
0.04656982421875,
0.0231781005859375,
0.04058837890625,
-0.001556396484375,
-0.055511474609375,
0.02252197265625,
-0.04156494140625,
-0.041412353515625,
-0.006717681884765625,
-0.033782958984375,
0.0310211181640625,
0.05078125,
-0.00293731689453125,
0.0023975372314453125,
-0.0328369140625,
0.009918212890625,
-0.0296173095703125,
0.03753662109375,
-0.03485107421875,
0.025146484375,
-0.00791168212890625,
-0.0010242462158203125,
-0.0106964111328125,
-0.0261993408203125,
-0.0216217041015625,
0.006206512451171875,
0.0190887451171875,
-0.0073089599609375,
-0.02105712890625,
-0.06097412109375,
0.09490966796875,
0.08056640625,
-0.0242767333984375,
0.033782958984375,
0.01079559326171875,
-0.003582000732421875,
0.0176544189453125,
0.01904296875,
-0.0116424560546875,
-0.0255584716796875,
0.03851318359375,
0.01751708984375,
-0.0138092041015625,
0.0272064208984375,
-0.014556884765625,
0.005031585693359375,
0.01259613037109375,
0.0199432373046875,
-0.048370361328125,
0.00794219970703125,
-0.01490020751953125,
0.00757598876953125,
0.07763671875,
-0.042022705078125,
0.0210723876953125,
-0.0251007080078125,
0.045440673828125,
0.03485107421875,
-0.027313232421875,
0.0022640228271484375,
-0.0157623291015625,
-0.00797271728515625,
-0.0058746337890625,
0.00708770751953125,
-0.0188446044921875,
-0.0311126708984375,
-0.050048828125,
0.0215301513671875,
-0.055328369140625,
-0.026641845703125,
-0.05438232421875,
0.0250396728515625,
-0.0604248046875,
-0.10595703125,
-0.0102081298828125,
-0.04791259765625,
0.01108551025390625,
0.046875,
-0.0121917724609375,
-0.0019006729125976562,
0.04278564453125,
-0.0240631103515625,
0.05364990234375,
0.004878997802734375,
-0.048095703125,
-0.05865478515625,
-0.04693603515625,
0.04144287109375,
0.0221099853515625,
0.0073699951171875,
0.043182373046875,
0.025238037109375,
-0.09228515625,
0.0038585662841796875,
0.0258636474609375,
0.05242919921875,
-0.0226898193359375,
-0.0309906005859375,
0.01425933837890625,
-0.016448974609375,
0.011016845703125,
-0.0274200439453125,
0.0181121826171875,
-0.04296875,
0.00330352783203125,
-0.014923095703125,
-0.0013713836669921875,
0.0053558349609375,
-0.0210113525390625,
-0.08197021484375,
0.1103515625,
-0.058868408203125,
0.0614013671875,
0.018157958984375,
0.03363037109375,
0.00681304931640625,
0.02947998046875,
-0.0034275054931640625,
0.040618896484375,
-0.039093017578125,
0.06494140625,
-0.018829345703125,
-0.016265869140625,
0.041259765625,
0.056610107421875,
0.035003662109375,
0.004856109619140625,
0.015960693359375,
-0.02838134765625,
0.01334381103515625,
0.041412353515625,
-0.006847381591796875,
-0.0022258758544921875,
-0.041961669921875,
0.01430511474609375,
0.00836181640625,
-0.047393798828125,
0.008758544921875,
0.0033664703369140625,
-0.04315185546875,
-0.0137786865234375,
0.006587982177734375,
-0.006526947021484375,
-0.0008268356323242188,
0.043426513671875,
-0.00875091552734375,
-0.00858306884765625,
-0.0085601806640625,
-0.024993896484375,
-0.0220489501953125,
0.0297088623046875,
0.0297088623046875,
-0.068115234375,
0.005859375,
-0.042205810546875,
0.05743408203125,
0.01204681396484375,
0.03485107421875,
0.033935546875,
0.03790283203125,
0.0280303955078125,
-0.04425048828125,
0.01454925537109375,
-0.0030689239501953125,
-0.031494140625,
0.004638671875,
-0.00807952880859375,
0.019439697265625,
-0.0562744140625,
-0.04083251953125,
0.0310821533203125,
0.020294189453125,
-0.0017795562744140625,
-0.031768798828125,
0.013458251953125,
0.00004208087921142578,
0.041656494140625,
-0.014495849609375,
0.05291748046875,
-0.0180816650390625,
0.0124053955078125,
-0.033905029296875,
-0.0122222900390625,
0.0050201416015625,
0.0301971435546875,
-0.004886627197265625,
0.0151519775390625,
-0.00782012939453125,
-0.020172119140625,
-0.0095062255859375,
-0.0095367431640625,
-0.00589752197265625,
-0.00521087646484375,
0.00337982177734375,
0.036651611328125,
0.00621795654296875,
0.0207366943359375,
0.017578125,
0.04254150390625,
-0.009368896484375,
-0.0200653076171875,
-0.024566650390625,
-0.056671142578125,
-0.0074005126953125,
0.03338623046875,
-0.007686614990234375,
-0.0207977294921875,
0.021209716796875,
0.004840850830078125,
-0.0472412109375,
-0.0194244384765625,
0.00873565673828125,
-0.0330810546875,
-0.0298004150390625,
-0.026641845703125,
0.00997161865234375,
0.033294677734375,
0.003902435302734375,
0.03668212890625,
-0.00931549072265625,
0.0550537109375,
0.0162200927734375,
-0.01849365234375,
0.0311737060546875,
-0.01287078857421875,
0.0006322860717773438,
0.04132080078125,
-0.0316162109375,
0.04583740234375,
-0.0692138671875,
-0.01849365234375,
-0.0045928955078125,
-0.047332763671875,
0.01898193359375,
0.039337158203125,
-0.03839111328125,
0.02850341796875,
-0.007686614990234375,
0.0295867919921875,
-0.0037937164306640625,
-0.06439208984375,
0.0247650146484375,
0.00616455078125,
-0.00399017333984375,
0.0279693603515625,
-0.044097900390625,
-0.045135498046875,
-0.015411376953125,
0.060333251953125,
0.0294189453125,
0.0618896484375,
-0.01824951171875,
0.0257110595703125,
-0.0147857666015625,
-0.0093841552734375,
0.01461029052734375,
-0.0030517578125,
0.0008077621459960938,
0.032989501953125,
0.002269744873046875,
-0.0220184326171875,
-0.032958984375,
0.03887939453125,
0.021514892578125,
-0.01557159423828125,
0.051361083984375,
-0.050262451171875,
0.0007801055908203125,
-0.0280914306640625,
-0.00827789306640625,
-0.04351806640625,
-0.0182952880859375,
-0.016845703125,
-0.005672454833984375,
0.00017464160919189453,
-0.0298614501953125,
-0.0251922607421875,
0.047576904296875,
0.0005030632019042969,
0.054290771484375,
-0.01248931884765625,
0.029754638671875,
-0.042388916015625,
0.01413726806640625,
-0.0389404296875,
0.01025390625,
0.01395416259765625,
-0.0123138427734375,
0.02593994140625,
0.0019292831420898438,
0.012451171875,
-0.00446319580078125,
-0.0002925395965576172,
-0.006145477294921875,
0.021636962890625,
0.06500244140625,
0.0069580078125,
0.0192108154296875,
-0.01227569580078125,
0.0012264251708984375,
0.006748199462890625,
-0.041107177734375,
-0.009033203125,
-0.021697998046875,
-0.03564453125,
0.01904296875,
-0.036865234375,
-0.06536865234375,
-0.053741455078125,
0.01446533203125,
0.0187835693359375,
0.0004227161407470703,
-0.04473876953125,
0.032073974609375,
-0.032257080078125,
0.049896240234375,
-0.03143310546875,
-0.0084381103515625,
0.0025615692138671875,
0.036773681640625,
-0.014801025390625,
-0.004638671875,
-0.025634765625,
0.0007214546203613281,
-0.0262908935546875,
0.050445556640625,
0.037933349609375,
-0.042449951171875,
0.01561737060546875,
0.0634765625,
0.043121337890625,
0.096923828125,
0.0208587646484375,
-0.018402099609375,
-0.012298583984375,
-0.01480865478515625,
-0.011566162109375,
-0.007015228271484375,
0.0479736328125,
-0.08416748046875,
-0.06378173828125,
0.01947021484375,
-0.0269012451171875,
0.01200103759765625,
-0.043701171875,
-0.0816650390625,
0.05157470703125,
-0.0030040740966796875,
-0.04736328125,
-0.02532958984375,
0.0002491474151611328,
0.01329803466796875,
-0.04571533203125,
-0.01119232177734375,
-0.00885009765625,
-0.03656005859375,
0.00980377197265625,
0.007808685302734375,
0.038604736328125,
0.016693115234375,
0.01311492919921875,
0.03265380859375,
0.042144775390625,
0.028594970703125,
-0.0228729248046875,
-0.046142578125,
-0.0009255409240722656,
0.00830841064453125,
0.01343536376953125,
-0.03643798828125,
-0.003101348876953125,
0.026214599609375,
0.050262451171875,
-0.0011539459228515625,
-0.0001208186149597168,
-0.038909912109375,
-0.0219879150390625,
0.0289154052734375,
0.09686279296875,
0.01812744140625,
-0.036376953125,
0.0289764404296875,
-0.01617431640625,
-0.0374755859375,
-0.0158538818359375,
0.012054443359375,
-0.0418701171875,
-0.0161285400390625,
-0.0038299560546875,
0.007038116455078125,
-0.0234832763671875,
-0.052520751953125,
-0.02911376953125,
-0.02362060546875,
-0.051177978515625,
0.0160064697265625,
0.01151275634765625,
0.04443359375,
0.00907135009765625,
-0.01274871826171875,
0.03717041015625,
-0.03875732421875,
-0.008392333984375,
0.019775390625,
-0.0261077880859375,
-0.0258026123046875,
-0.07568359375,
0.0201873779296875,
0.052337646484375,
-0.0171356201171875,
0.061248779296875,
-0.0113372802734375,
-0.0263824462890625,
-0.0016880035400390625,
-0.0016031265258789062,
0.0124969482421875,
0.010345458984375,
-0.0228118896484375,
-0.01525115966796875,
-0.003459930419921875,
-0.019744873046875,
0.0034122467041015625,
-0.0263519287109375,
-0.0235443115234375,
0.032012939453125,
-0.003997802734375,
-0.01776123046875,
0.01934814453125,
-0.02880859375,
0.00757598876953125,
0.0095367431640625,
0.0210113525390625,
-0.055450439453125,
0.06890869140625,
-0.017242431640625,
0.0172119140625,
0.03717041015625
]
|
f84fdf2a8e01015439bd367199efd4b02c1213ed | Wordpress Stackexchange
Q: Wordpress 3.8 - Dashboard 1 Column Screen Options With the new Wordpress 3.8 under Screen Options they seem to have misplaced the "Columns" feature where you could put your widgets into 1 Column, 2 Columns, 3 Columns, or 4 Columns. My question is how to I force my Dashboard Widgets to only be 1 column, or in other words, take up the whole width of the screen versus just a portion of the screen?
A: This happens because of the new media queries. A very unfortunate change …
Anyway, you can change it by setting a custom width for .postbox-container.
Use 50% for two columns and 100 % for just one column.
add_action( 'admin_head-index.php', function()
{
?>
<style>
.postbox-container {
min-width: 100% !important;
}
.meta-box-sortables.ui-sortable.empty-container {
display: none;
}
</style>
<?php
});
| Q: Wordpress 3.8 - Dashboard 1 Column Screen Options With the new Wordpress 3.8 under Screen Options they seem to have misplaced the "Columns" feature where you could put your widgets into 1 Column, 2 Columns, 3 Columns, or 4 Columns. My question is how to I force my Dashboard Widgets to only be 1 column, or in other words, take up the whole width of the screen versus just a portion of the screen?
A: This happens because of the new media queries. A very unfortunate change …
Anyway, you can change it by setting a custom width for .postbox-container.
Use 50% for two columns and 100 % for just one column.
add_action( 'admin_head-index.php', function()
{
?>
<style>
.postbox-container {
min-width: 100% !important;
}
.meta-box-sortables.ui-sortable.empty-container {
display: none;
}
</style>
<?php
});
A: Another solution is to add the columns setting back to the settings.
function wpse126301_dashboard_columns() {
add_screen_option(
'layout_columns',
array(
'max' => 2,
'default' => 1
)
);
}
add_action( 'admin_head-index.php', 'wpse126301_dashboard_columns' );
There is a related Trac ticket: #26354
| wordpress | {
"language": "en",
"length": 172,
"provenance": "stackexchange_00019.jsonl.gz:440111",
"question_score": "25",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/126301"
} | [
0.00234222412109375,
-0.0285797119140625,
0.0006465911865234375,
0.034393310546875,
-0.021240234375,
-0.0215301513671875,
0.044921875,
-0.038482666015625,
0.035125732421875,
0.00661468505859375,
-0.04998779296875,
0.0289459228515625,
-0.005672454833984375,
-0.005828857421875,
-0.0084228515625,
-0.0285491943359375,
0.034515380859375,
-0.0357666015625,
-0.0089111328125,
-0.01160430908203125,
0.024322509765625,
0.0029659271240234375,
-0.0384521484375,
0.0965576171875,
0.0189056396484375,
-0.0184173583984375,
-0.0040283203125,
0.007740020751953125,
-0.025360107421875,
-0.017486572265625,
0.006500244140625,
0.0290069580078125,
0.025665283203125,
0.02044677734375,
-0.032318115234375,
0.02166748046875,
-0.0305023193359375,
0.0303955078125,
0.006114959716796875,
0.01277923583984375,
0.008056640625,
-0.016021728515625,
0.0047454833984375,
-0.0244293212890625,
0.003276824951171875,
0.01641845703125,
-0.01352691650390625,
-0.06585693359375,
0.0214080810546875,
-0.043975830078125,
-0.0064239501953125,
0.0188446044921875,
0.0137176513671875,
-0.0362548828125,
-0.037506103515625,
-0.0263214111328125,
-0.019561767578125,
-0.01515960693359375,
0.034393310546875,
-0.00525665283203125,
-0.002185821533203125,
-0.00829315185546875,
0.01151275634765625,
-0.0068206787109375,
-0.047393798828125,
-0.036285400390625,
-0.044036865234375,
-0.00640869140625,
-0.0023593902587890625,
-0.03460693359375,
0.0300445556640625,
-0.004383087158203125,
0.0208587646484375,
-0.043182373046875,
-0.025390625,
0.01477813720703125,
0.030609130859375,
0.004726409912109375,
-0.0007090568542480469,
-0.0430908203125,
0.0176849365234375,
0.016754150390625,
0.00980377197265625,
-0.044769287109375,
0.01837158203125,
-0.017242431640625,
-0.008331298828125,
-0.01087188720703125,
-0.0181884765625,
-0.01922607421875,
-0.00922393798828125,
-0.07659912109375,
-0.0208740234375,
0.02239990234375,
0.01314544677734375,
-0.05218505859375,
-0.024261474609375,
0.00644683837890625,
-0.0052947998046875,
0.0171356201171875,
0.01160430908203125,
-0.0185394287109375,
0.0217437744140625,
-0.03399658203125,
0.02020263671875,
0.0274505615234375,
-0.018310546875,
0.019134521484375,
0.07037353515625,
0.036376953125,
0.0210418701171875,
0.061370849609375,
-0.045623779296875,
0.0237884521484375,
-0.05328369140625,
0.00844573974609375,
-0.058380126953125,
-0.0369873046875,
-0.038177490234375,
0.006237030029296875,
-0.02606201171875,
0.01052093505859375,
-0.006626129150390625,
0.0017251968383789062,
0.00283050537109375,
-0.0012226104736328125,
-0.00213623046875,
-0.0122222900390625,
0.005405426025390625,
-0.04541015625,
-0.02459716796875,
0.0180511474609375,
0.0631103515625,
0.083251953125,
0.046905517578125,
0.00799560546875,
0.04510498046875,
-0.0227508544921875,
0.003726959228515625,
0.047027587890625,
-0.0231781005859375,
-0.03826904296875,
-0.00437164306640625,
-0.0119476318359375,
-0.02789306640625,
-0.010986328125,
0.01151275634765625,
0.0325927734375,
-0.0052337646484375,
-0.0223541259765625,
-0.014892578125,
0.00965118408203125,
0.04864501953125,
0.02899169921875,
-0.049530029296875,
0.01203155517578125,
0.0384521484375,
-0.0230255126953125,
-0.05914306640625,
-0.0670166015625,
-0.04058837890625,
-0.0027523040771484375,
0.038421630859375,
-0.060272216796875,
-0.021453857421875,
-0.01015472412109375,
-0.037872314453125,
0.0041961669921875,
0.01123809814453125,
0.0006628036499023438,
-0.0259246826171875,
0.004306793212890625,
0.007442474365234375,
0.01203155517578125,
-0.004261016845703125,
0.0251617431640625,
0.005893707275390625,
-0.0308990478515625,
0.032470703125,
0.006168365478515625,
-0.040283203125,
-0.0341796875,
0.011199951171875,
-0.01194000244140625,
-0.0250396728515625,
-0.0018644332885742188,
0.0245819091796875,
0.0203857421875,
-0.025146484375,
0.0186767578125,
0.038360595703125,
0.043914794921875,
-0.021575927734375,
-0.03753662109375,
0.003299713134765625,
0.01300811767578125,
-0.00017917156219482422,
0.0099029541015625,
-0.01198577880859375,
0.00447845458984375,
0.03692626953125,
0.0202484130859375,
0.00750732421875,
0.0015535354614257812,
-0.0439453125,
0.029510498046875,
-0.0258941650390625,
0.0372314453125,
-0.01300811767578125,
0.0029125213623046875,
0.0175933837890625,
0.0045928955078125,
-0.0199432373046875,
0.0004992485046386719,
-0.0098114013671875,
0.013702392578125,
0.018951416015625,
0.015777587890625,
-0.020965576171875,
-0.01453399658203125,
-0.002254486083984375,
-0.01393890380859375,
0.00225830078125,
0.063720703125,
0.086181640625,
-0.00839996337890625,
-0.018890380859375,
-0.038330078125,
0.08673095703125,
-0.0176544189453125,
-0.023834228515625,
0.051849365234375,
-0.0306396484375,
0.0131378173828125,
-0.04376220703125,
-0.022705078125,
-0.029449462890625,
-0.0030002593994140625,
0.0266571044921875,
0.037872314453125,
0.035186767578125,
-0.0225677490234375,
-0.01245880126953125,
0.01441192626953125,
-0.0292205810546875,
-0.08453369140625,
0.0006079673767089844,
0.0096893310546875,
0.012481689453125,
0.03759765625,
0.00438690185546875,
-0.0102691650390625,
0.0183868408203125,
-0.0233154296875,
0.00849151611328125,
0.0289306640625,
-0.032318115234375,
0.0270843505859375,
-0.026947021484375,
0.024688720703125,
-0.022796630859375,
-0.015533447265625,
0.0262603759765625,
-0.04473876953125,
-0.0167236328125,
-0.005550384521484375,
0.0289306640625,
0.030426025390625,
-0.006786346435546875,
-0.03509521484375,
0.0238189697265625,
0.053680419921875,
-0.0016756057739257812,
0.047882080078125,
-0.042022705078125,
0.01168060302734375,
0.00156402587890625,
-0.00763702392578125,
-0.053070068359375,
0.00467681884765625,
0.014556884765625,
0.0267791748046875,
-0.032989501953125,
-0.01515960693359375,
0.0172271728515625,
-0.07470703125,
-0.028564453125,
0.01129150390625,
0.0102081298828125,
0.0183868408203125,
0.044677734375,
0.022979736328125,
-0.00385284423828125,
0.023223876953125,
-0.007053375244140625,
-0.0090179443359375,
0.0199432373046875,
-0.00994873046875,
0.0225067138671875,
-0.022430419921875,
0.04986572265625,
0.047760009765625,
-0.0189971923828125,
0.037200927734375,
-0.0130767822265625,
0.054656982421875,
-0.00383758544921875,
-0.00209808349609375,
0.0072021484375,
-0.0007781982421875,
-0.0008134841918945312,
0.045928955078125,
0.04315185546875,
0.0316162109375,
0.0171966552734375,
-0.010711669921875,
-0.01499176025390625,
0.033935546875,
-0.036651611328125,
-0.03533935546875,
0.039031982421875,
-0.064453125,
-0.041259765625,
-0.01444244384765625,
-0.051513671875,
0.00449371337890625,
0.024505615234375,
-0.01056671142578125,
0.04595947265625,
-0.01806640625,
-0.04168701171875,
0.0106964111328125,
-0.040283203125,
0.034576416015625,
-0.00506591796875,
-0.00269317626953125,
-0.0163116455078125,
0.06597900390625,
-0.013885498046875,
-0.08038330078125,
-0.048065185546875,
0.008819580078125,
-0.0053253173828125,
-0.009552001953125,
0.04718017578125,
-0.0775146484375,
-0.0274810791015625,
0.0074615478515625,
-0.0108795166015625,
-0.007732391357421875,
0.007175445556640625,
-0.02264404296875,
-0.01349639892578125,
-0.021209716796875,
-0.021453857421875,
0.0491943359375,
0.030487060546875,
-0.032257080078125,
0.01396942138671875,
-0.041748046875,
-0.037017822265625,
0.0265350341796875,
-0.0372314453125,
-0.048187255859375,
-0.00511932373046875,
-0.00911712646484375,
-0.0190582275390625,
0.01227569580078125,
0.01500701904296875,
0.01666259765625,
-0.01195526123046875,
-0.00656890869140625,
0.0076904296875,
0.007808685302734375,
0.00676727294921875,
-0.01337432861328125,
-0.035797119140625,
-0.045654296875,
0.0298004150390625,
-0.0181427001953125,
0.00081634521484375,
-0.00890350341796875,
0.0582275390625,
0.033416748046875,
-0.041534423828125,
0.055145263671875,
0.0008840560913085938,
-0.0282135009765625,
0.01247406005859375,
-0.02044677734375,
0.026123046875,
0.055999755859375,
-0.0877685546875,
-0.00162506103515625,
0.0205078125,
0.03680419921875,
-0.0421142578125,
-0.06976318359375,
-0.064453125,
-0.0213775634765625,
-0.0750732421875,
-0.00812530517578125,
-0.00390625,
-0.053466796875,
0.0187225341796875,
-0.0209503173828125,
-0.01416015625,
-0.041107177734375,
0.042327880859375,
0.0126953125,
-0.011260986328125,
0.017547607421875,
-0.01446533203125,
0.004718780517578125,
-0.019439697265625,
-0.003116607666015625,
-0.0933837890625,
-0.017974853515625,
-0.0109405517578125,
0.06488037109375,
-0.010009765625,
-0.012664794921875,
-0.027679443359375,
0.04449462890625,
0.00537872314453125,
-0.023040771484375,
0.0212860107421875,
0.0258941650390625,
-0.0164031982421875,
0.0167694091796875,
0.0212554931640625,
-0.028961181640625,
-0.0113067626953125,
-0.0538330078125,
-0.03515625,
-0.023834228515625,
-0.031585693359375,
0.025146484375,
-0.02569580078125,
0.0012063980102539062,
-0.027618408203125,
-0.06475830078125,
-0.021728515625,
0.0340576171875,
-0.0301513671875,
0.054168701171875,
-0.0865478515625,
-0.04962158203125,
0.0030269622802734375,
0.02301025390625,
0.01123046875,
0.00859832763671875,
0.05096435546875,
0.001262664794921875,
-0.0192718505859375,
-0.034515380859375,
-0.033447265625,
0.05029296875,
0.01282501220703125,
-0.017059326171875,
0.00298309326171875,
-0.0484619140625,
0.043853759765625,
0.0281219482421875,
-0.03857421875,
0.00860595703125,
0.04931640625,
0.0087738037109375,
-0.021759033203125,
-0.0006089210510253906,
-0.032196044921875,
0.00811004638671875,
0.0291900634765625,
0.02349853515625,
-0.0099639892578125,
-0.002323150634765625,
0.031005859375,
0.055206298828125,
-0.06976318359375,
-0.04791259765625,
-0.03314208984375,
0.00377655029296875,
-0.01282501220703125,
0.0306549072265625,
-0.01216888427734375,
0.0192718505859375,
0.0250396728515625,
0.0567626953125,
-0.000053048133850097656,
0.053558349609375,
0.0244293212890625,
0.01081085205078125,
0.044464111328125,
0.005588531494140625,
-0.01239776611328125,
0.01251220703125,
-0.0008387565612792969,
0.0020656585693359375,
0.03338623046875,
-0.0294189453125,
-0.00496673583984375,
0.01904296875,
0.009246826171875,
-0.0208740234375,
-0.0233001708984375,
0.0289764404296875,
0.01617431640625,
-0.0200958251953125,
-0.0155792236328125,
-0.033599853515625,
-0.0178680419921875,
-0.046783447265625,
-0.03790283203125,
0.01513671875,
-0.01200103759765625,
0.0265350341796875,
-0.0176239013671875,
0.033050537109375,
-0.0184783935546875,
-0.0263519287109375,
0.01447296142578125,
0.0280609130859375,
0.0237274169921875,
0.0147247314453125,
-0.004581451416015625,
-0.0095977783203125,
-0.0006542205810546875,
0.0191650390625,
-0.043853759765625,
0.0186767578125,
0.0271148681640625,
0.043426513671875,
0.037322998046875,
-0.03521728515625,
0.00324249267578125,
-0.017608642578125,
-0.00922393798828125,
0.044647216796875,
-0.00679779052734375,
-0.07696533203125,
-0.011383056640625,
0.02825927734375,
0.00341033935546875,
-0.04376220703125,
-0.004184722900390625,
0.0556640625,
-0.02362060546875,
0.044158935546875,
0.05322265625,
0.03021240234375,
-0.0364990234375,
-0.043365478515625,
-0.019989013671875,
0.01229095458984375,
-0.00670623779296875,
-0.0628662109375,
-0.0650634765625,
0.0093231201171875,
-0.008575439453125,
0.0263671875,
-0.048828125,
0.0081787109375,
-0.026611328125,
0.0236053466796875,
-0.0281829833984375,
0.028076171875,
0.00537872314453125,
0.005649566650390625,
0.01152801513671875,
-0.04949951171875,
-0.03265380859375,
-0.0294342041015625,
-0.02947998046875,
-0.045623779296875,
-0.0013437271118164062,
0.017242431640625,
0.00672149658203125,
0.039886474609375,
-0.0209197998046875,
-0.0250244140625,
-0.036346435546875,
-0.004322052001953125,
0.02569580078125,
0.048797607421875,
-0.017852783203125,
0.048187255859375,
-0.0172271728515625,
0.006618499755859375,
-0.0239715576171875,
-0.00824737548828125,
-0.0213623046875,
0.0132598876953125,
0.036834716796875,
0.0340576171875,
-0.0697021484375,
0.007617950439453125,
-0.0474853515625,
-0.054229736328125,
0.0294036865234375,
-0.040679931640625,
0.0006947517395019531,
-0.0167388916015625,
-0.0010852813720703125,
-0.00885009765625,
0.05816650390625,
0.0035533905029296875,
-0.0091094970703125,
0.048736572265625,
0.0210113525390625,
0.038330078125,
-0.0164642333984375,
-0.000015020370483398438,
0.0149383544921875,
0.006565093994140625,
0.033966064453125,
-0.037384033203125,
-0.06744384765625,
0.0850830078125,
0.058807373046875,
0.0159454345703125,
0.0487060546875,
-0.003864288330078125,
0.01800537109375,
-0.013641357421875,
-0.03375244140625,
-0.0034046173095703125,
0.0340576171875,
0.021759033203125,
-0.01419830322265625,
0.015960693359375,
0.0262908935546875,
-0.0048980712890625,
0.010955810546875,
0.05609130859375,
0.0479736328125,
-0.0892333984375,
0.027587890625,
-0.0009045600891113281,
-0.0021381378173828125,
0.054656982421875,
-0.048431396484375,
0.0225677490234375,
-0.0302734375,
0.056610107421875,
0.06756591796875,
-0.0139007568359375,
0.0241241455078125,
-0.00878143310546875,
0.0018329620361328125,
0.00580596923828125,
0.0038299560546875,
-0.004848480224609375,
-0.03582763671875,
-0.0139923095703125,
0.0181427001953125,
0.014892578125,
0.01523590087890625,
-0.00007748603820800781,
0.0008115768432617188,
-0.0295562744140625,
-0.051513671875,
-0.017669677734375,
-0.017303466796875,
-0.035675048828125,
0.032257080078125,
-0.01410675048828125,
-0.03009033203125,
0.044403076171875,
-0.039947509765625,
0.0292510986328125,
-0.0003447532653808594,
-0.023345947265625,
-0.028594970703125,
-0.00579071044921875,
0.040496826171875,
0.020233154296875,
-0.0164031982421875,
0.031341552734375,
-0.0120391845703125,
-0.0328369140625,
-0.00786590576171875,
-0.01560211181640625,
0.0433349609375,
-0.021453857421875,
-0.01763916015625,
0.0247650146484375,
-0.008880615234375,
0.0018482208251953125,
0.01519775390625,
0.031402587890625,
-0.06890869140625,
-0.04833984375,
0.01479339599609375,
-0.06549072265625,
-0.0242462158203125,
0.0128936767578125,
-0.044525146484375,
0.06317138671875,
0.0120697021484375,
0.004669189453125,
0.00218963623046875,
0.0286407470703125,
-0.020355224609375,
0.017852783203125,
-0.00461578369140625,
0.0152435302734375,
-0.0038471221923828125,
-0.0008707046508789062,
-0.01348876953125,
0.00218963623046875,
-0.01678466796875,
0.00775909423828125,
-0.04461669921875,
-0.0181884765625,
0.01873779296875,
-0.0013513565063476562,
0.0175018310546875,
0.051910400390625,
0.029144287109375,
-0.0258331298828125,
0.0010738372802734375,
0.047607421875,
0.01273345947265625,
-0.0316162109375,
0.01971435546875,
-0.0015687942504882812,
-0.046722412109375,
0.0237579345703125,
0.01499176025390625,
0.0178680419921875,
0.00945281982421875,
0.059814453125,
0.0203704833984375,
-0.0099639892578125,
0.0009503364562988281,
-0.03985595703125,
0.0440673828125,
0.006183624267578125,
0.05755615234375,
-0.0272979736328125,
0.0247955322265625,
-0.0181732177734375,
0.061431884765625,
0.0263214111328125,
0.0002770423889160156,
0.0031585693359375,
0.0179443359375,
-0.01837158203125,
-0.006191253662109375,
-0.003078460693359375,
0.0216522216796875,
-0.0286865234375,
0.0231781005859375,
0.0357666015625,
0.047149658203125,
0.0193023681640625,
0.0237579345703125,
0.0110626220703125,
0.0231475830078125,
-0.019500732421875,
-0.06512451171875,
0.0185394287109375,
0.001132965087890625,
0.0031795501708984375,
0.02703857421875,
0.004825592041015625,
-0.03839111328125,
0.055938720703125,
-0.01348114013671875,
0.0093994140625,
0.015655517578125,
0.010284423828125,
0.0015554428100585938,
0.0133819580078125,
-0.023590087890625,
0.003570556640625,
-0.022003173828125,
0.00873565673828125,
-0.006244659423828125,
0.0243377685546875,
0.00865936279296875,
0.0215301513671875,
-0.0239410400390625,
-0.00241851806640625,
-0.034271240234375,
0.0164031982421875,
0.00833892822265625,
0.0318603515625,
-0.048187255859375,
-0.01409912109375,
0.0305023193359375,
0.040252685546875,
0.0176544189453125,
-0.0037078857421875,
0.044769287109375,
0.06414794921875,
0.017120361328125,
-0.016265869140625,
0.0217132568359375,
0.01399993896484375,
-0.0386962890625,
-0.01445770263671875,
-0.01383209228515625,
0.0022373199462890625,
-0.00368499755859375,
0.0006418228149414062,
0.03924560546875,
-0.01047515869140625,
0.01007843017578125,
0.0184478759765625,
0.01204681396484375,
0.019134521484375,
-0.0002942085266113281,
0.023468017578125,
0.0021915435791015625,
0.049957275390625,
-0.075439453125,
-0.00412750244140625,
0.00872039794921875,
-0.056915283203125,
0.0010290145874023438,
0.033935546875,
-0.024993896484375,
-0.0023899078369140625,
-0.0234527587890625,
0.01556396484375,
-0.047637939453125,
-0.0216064453125,
0.051971435546875,
0.039825439453125,
-0.01078033447265625,
0.04986572265625,
-0.1033935546875,
-0.032928466796875,
-0.04644775390625,
0.014312744140625,
0.0171966552734375,
0.08782958984375,
-0.00008511543273925781,
0.0305328369140625,
0.0283050537109375,
-0.0202484130859375,
0.014678955078125,
0.0135498046875,
0.01056671142578125,
-0.0380859375,
-0.0123748779296875,
-0.01806640625,
0.0007519721984863281,
0.01288604736328125,
0.045196533203125,
-0.054443359375,
0.00643157958984375,
-0.00565338134765625,
0.0085601806640625,
-0.0207672119140625,
0.0177764892578125,
-0.03521728515625,
-0.045562744140625,
-0.037322998046875,
-0.0114288330078125,
0.0002231597900390625,
-0.00524139404296875,
0.007808685302734375,
0.027130126953125,
-0.0132904052734375,
-0.026031494140625,
0.007137298583984375,
-0.0164642333984375,
-0.02459716796875,
0.0189208984375,
0.0206756591796875,
-0.026336669921875,
0.0170135498046875,
-0.0137786865234375,
0.027923583984375,
0.0019702911376953125,
0.04229736328125,
0.0202484130859375,
0.0153656005859375,
0.04425048828125,
0.02642822265625,
0.005756378173828125,
-0.0733642578125,
-0.01262664794921875,
0.0926513671875,
-0.0127105712890625,
-0.0259552001953125,
0.060699462890625,
-0.0065155029296875,
0.007747650146484375,
-0.0288848876953125,
0.0031585693359375,
0.00011336803436279297,
-0.0537109375,
-0.08868408203125,
0.00563812255859375,
0.0211029052734375,
0.025299072265625,
-0.06982421875,
0.0584716796875,
-0.004718780517578125,
-0.00804901123046875,
0.00760650634765625,
0.027557373046875,
0.012603759765625,
0.0400390625,
-0.02490234375,
0.008056640625,
0.0105743408203125,
0.01194000244140625,
0.018035888671875,
0.01947021484375,
0.038726806640625,
-0.035888671875,
0.029571533203125,
-0.0018777847290039062,
0.0279083251953125,
0.037689208984375,
0.015625,
0.001430511474609375,
0.0225830078125,
0.009674072265625,
-0.007656097412109375,
-0.06402587890625,
-0.0240478515625,
-0.01549530029296875,
0.0318603515625,
0.02142333984375,
-0.02716064453125,
-0.01157379150390625,
-0.041259765625,
-0.061370849609375,
0.04931640625,
0.0031566619873046875,
-0.0280303955078125,
-0.01861572265625,
-0.0178985595703125,
-0.00341796875,
-0.004791259765625,
-0.024078369140625,
-0.0004417896270751953,
-0.002552032470703125,
0.04620361328125,
0.04510498046875,
-0.03466796875,
0.041778564453125,
-0.003002166748046875,
-0.0478515625,
0.0511474609375,
0.04266357421875,
0.03900146484375,
-0.062255859375,
0.0241546630859375,
-0.01995849609375,
0.007297515869140625,
-0.02734375,
-0.0270538330078125,
0.037384033203125,
0.04046630859375,
0.032470703125,
-0.02587890625,
-0.005855560302734375,
-0.01195526123046875,
-0.01029205322265625,
0.000051915645599365234,
0.0016584396362304688,
-0.01313018798828125,
-0.046661376953125,
-0.0400390625,
0.003765106201171875,
-0.01506805419921875,
0.0187225341796875,
-0.102783203125,
-0.0078125,
0.037506103515625,
-0.0037994384765625,
-0.0027484893798828125,
0.044464111328125,
-0.0026187896728515625,
-0.0050201416015625,
0.0457763671875,
-0.0036373138427734375,
-0.07843017578125,
0.040679931640625,
0.0182647705078125,
-0.0228118896484375,
0.03143310546875,
-0.0255584716796875,
-0.00954437255859375,
0.025360107421875,
-0.016876220703125,
-0.05157470703125,
-0.035614013671875,
-0.039947509765625,
0.036163330078125,
-0.0478515625,
0.0684814453125,
-0.07342529296875,
0.003513336181640625,
0.0035762786865234375,
0.0125885009765625,
0.0004715919494628906,
0.00623321533203125,
0.0032672882080078125,
-0.00881195068359375,
-0.01490020751953125,
-0.0015649795532226562,
-0.032470703125,
0.006557464599609375,
-0.034881591796875,
0.034149169921875,
0.039215087890625,
-0.0011749267578125,
0.105224609375,
-0.009796142578125,
-0.0091552734375,
-0.0012187957763671875,
0.011749267578125,
-0.0660400390625,
0.016937255859375,
-0.014892578125,
0.024200439453125,
0.0166015625
]
|
98ef21909a51e29e5917110f137a28f250b68e9e | Wordpress Stackexchange
Q: Replace admin bar logo WordPress 3.8 is out I have the following code to remove admin bar logo.
function no_wp_logo_admin_bar_remove() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo');
}
add_action('wp_before_admin_bar_render', 'no_wp_logo_admin_bar_remove', 0);
However I would like to know how can I replace it with my own logo (upload) and not a dashicon?
A: That's controlled by a Dashicon (font icon) and a before statement:
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
content: '\f120';
top: 2px;
}
What you'd want is to replace the content call.
Use a built in Dashicon from here: http://melchoyce.github.io/dashicons/
So the smilie would be content: '\f328;`
| Q: Replace admin bar logo WordPress 3.8 is out I have the following code to remove admin bar logo.
function no_wp_logo_admin_bar_remove() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo');
}
add_action('wp_before_admin_bar_render', 'no_wp_logo_admin_bar_remove', 0);
However I would like to know how can I replace it with my own logo (upload) and not a dashicon?
A: That's controlled by a Dashicon (font icon) and a before statement:
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
content: '\f120';
top: 2px;
}
What you'd want is to replace the content call.
Use a built in Dashicon from here: http://melchoyce.github.io/dashicons/
So the smilie would be content: '\f328;`
A: I was also searching for the same and found no "hookey" way to change it.
But here is the alternate solution for this: and it has two possible ways.
Assume that we are using some image icon over there, let it be your brand / site icon.
First method: (Easy) Use uploaded png logo
Inside your function.php / plugins file
function dashboard_logo() {
echo '
<style type="text/css">
#wpadminbar #wp-admin-bar-wp-logo>.ab-item {
padding: 0 7px;
background-image: url([URL]LOGO.PNG) !important;
background-size: 70%;
background-position: center;
background-repeat: no-repeat;
opacity: 0.8;
}
#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before {
content: " ";
top: 2px;
}
</style>
';
}
add_action('wp_before_admin_bar_render', 'dashboard_logo');
Second method: Dashicon method: Using custom dashicons/ icon fonts.
Create your own icon files.
You can use IcoMoon.How to create the icon file?
Create your icon in SVG and use icomoon to generate your font file from SVG.
Now add the font to your markup.
function dashboard_logo() {
echo '
<style type="text/css">
@font-face {
font-family: "UR_ICON_NAME";
src: url('[TEMPLATE_DIRECTORY]/fonts/UR_ICON_NAME.ttf'),
url('[TEMPLATE_DIRECTORY]/fonts/UR_ICON_NAME.eot');
}
#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before {
content: "[\UNICODE]";
top: 2px;
}
</style>
';
}
add_action('wp_before_admin_bar_render', 'dashboard_logo');
please use exact urls and unicode as per your need.
Replace [TEMPLATE_DIRECTORY] and [\UNICODE].
Explanation:
I did not found any hooks to change that in a pretty straightforward manner also it was not available in older versions too. If there is then please let me know in the comments below!
However the idea is to override the css and use your own icon file instead of the default one. In previous versions, WP was using the png image icon with a background property which was easy to override though.
The latest versions of WordPress is using the icon font (dashicons) method for this and also this icon set has other icons. So you cannot simply remove that if you just wanna change the WordPress icon.
A: You may place your own logo there like this:
function custom_admin_logo(){
echo '
<style type="text/css">
#wp-admin-bar-wp-logo .ab-icon:before{ content:"" !important; }
#wp-admin-bar-wp-logo .ab-icon{ background-image: url(path/to/your/logo.png) !important; }
</style>
';
}
add_action( 'admin_head', 'custom_admin_logo' );
But, if you wanted to completely remove the corresponding Wordpress menu, including the W logo and its sub-menu stuff and then add your ownlogo, You may do it like this:
function remove_wp_logo( $wp_admin_bar ){
$wp_admin_bar->remove_node( 'wp-logo' );
}
add_action( 'admin_bar_menu', 'remove_wp_logo', 100 );
function add_my_own_logo( $wp_admin_bar ) {
$args = array(
'id' => 'my-logo',
'meta' => array( 'class' => 'my-logo', 'title' => 'logo' )
);
$wp_admin_bar->add_node( $args );
}
add_action( 'admin_bar_menu', 'add_my_own_logo', 1 );
Then let some CSS do the remaining part for you:
.my-logo div{
width: 32px;
height: 32px;
background-image: url( path/to/logo.png ) no-repeat;
}
A: Use this plugin
https://wordpress.org/plugins/white-label-cms/
or
Try This Code
function wpb_custom_logo() {
echo '
<style type="text/css">
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {
background-image: url(' . get_bloginfo('stylesheet_directory') . '/images/custom-logo.png) !important;
background-position: 0 0;
color:rgba(0, 0, 0, 0);
}
#wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {
background-position: 0 0;
}
</style>
';
}
//hook into the administrative header output
add_action('wp_before_admin_bar_render', 'wpb_custom_logo');
| wordpress | {
"language": "en",
"length": 584,
"provenance": "stackexchange_00019.jsonl.gz:440112",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/126303"
} | [
0.03863525390625,
0.0267333984375,
-0.01276397705078125,
0.01342010498046875,
0.035430908203125,
-0.044281005859375,
0.048583984375,
-0.08148193359375,
0.00156402587890625,
0.008575439453125,
0.017913818359375,
-0.0166473388671875,
-0.00818634033203125,
-0.036773681640625,
-0.005496978759765625,
-0.021575927734375,
0.03057861328125,
-0.0036144256591796875,
0.04595947265625,
-0.01027679443359375,
0.00396728515625,
0.00750732421875,
0.01187896728515625,
0.03399658203125,
0.0290679931640625,
-0.08038330078125,
0.10284423828125,
0.0004277229309082031,
0.023040771484375,
-0.019378662109375,
0.027069091796875,
0.00606536865234375,
-0.0128936767578125,
0.049102783203125,
0.0254058837890625,
0.090087890625,
-0.00848388671875,
0.05108642578125,
0.0723876953125,
-0.03631591796875,
0.0179443359375,
-0.01291656494140625,
-0.0110321044921875,
0.0150909423828125,
-0.021270751953125,
-0.033111572265625,
0.013153076171875,
-0.034515380859375,
0.044219970703125,
-0.037139892578125,
0.0126800537109375,
0.00241851806640625,
0.02801513671875,
-0.01251983642578125,
-0.020965576171875,
0.0229034423828125,
-0.03936767578125,
-0.00562286376953125,
0.024871826171875,
0.0626220703125,
0.014251708984375,
-0.00052642822265625,
-0.01047515869140625,
-0.0526123046875,
-0.0343017578125,
0.01166534423828125,
-0.0213470458984375,
-0.0194549560546875,
-0.03729248046875,
-0.0233154296875,
0.0226898193359375,
-0.023406982421875,
-0.01015472412109375,
-0.01114654541015625,
-0.0191192626953125,
0.006702423095703125,
-0.00467681884765625,
-0.00928497314453125,
0.0306243896484375,
-0.002361297607421875,
0.053558349609375,
0.03057861328125,
0.0294036865234375,
0.0179443359375,
-0.00046515464782714844,
0.032928466796875,
-0.004241943359375,
-0.048309326171875,
-0.029754638671875,
-0.018218994140625,
-0.02081298828125,
-0.0279693603515625,
-0.0283966064453125,
0.01517486572265625,
-0.011322021484375,
-0.012420654296875,
0.0167388916015625,
0.00736236572265625,
-0.0094757080078125,
-0.01384735107421875,
-0.0011053085327148438,
-0.0217132568359375,
-0.0300750732421875,
-0.007053375244140625,
-0.01174163818359375,
0.007541656494140625,
-0.01141357421875,
0.0282135009765625,
0.038360595703125,
0.0369873046875,
0.00666046142578125,
-0.018951416015625,
-0.03472900390625,
-0.080078125,
-0.0031642913818359375,
0.06207275390625,
-0.021514892578125,
-0.0098876953125,
0.044219970703125,
-0.01248931884765625,
0.013519287109375,
-0.00078582763671875,
0.02667236328125,
0.01531982421875,
0.02978515625,
0.02667236328125,
-0.03192138671875,
-0.0179901123046875,
0.0211334228515625,
-0.01119232177734375,
-0.0625,
0.0207977294921875,
0.1240234375,
0.06121826171875,
0.06317138671875,
-0.03509521484375,
0.0140533447265625,
0.021209716796875,
0.03375244140625,
-0.0271148681640625,
0.037200927734375,
-0.0157928466796875,
-0.020355224609375,
0.02630615234375,
0.02178955078125,
0.0100860595703125,
-0.021636962890625,
0.015045166015625,
0.0340576171875,
-0.006214141845703125,
0.0209197998046875,
-0.05853271484375,
0.04541015625,
0.044036865234375,
-0.01088714599609375,
0.0333251953125,
0.10528564453125,
-0.041473388671875,
-0.08697509765625,
-0.080322265625,
-0.03369140625,
0.0007734298706054688,
0.03759765625,
0.00917816162109375,
0.01122283935546875,
0.019287109375,
-0.0014867782592773438,
-0.00217437744140625,
0.0164337158203125,
-0.00176239013671875,
0.0160064697265625,
-0.04254150390625,
0.0082550048828125,
0.005321502685546875,
-0.006542205810546875,
0.0296783447265625,
0.016754150390625,
-0.010223388671875,
0.0170135498046875,
0.024017333984375,
-0.018310546875,
-0.036651611328125,
0.0447998046875,
-0.0340576171875,
-0.02850341796875,
-0.0193023681640625,
0.034149169921875,
0.0477294921875,
0.01317596435546875,
0.0289154052734375,
0.02276611328125,
-0.006252288818359375,
-0.004497528076171875,
-0.039581298828125,
0.0211944580078125,
-0.0029544830322265625,
-0.012725830078125,
0.003490447998046875,
0.002796173095703125,
0.01097869873046875,
-0.0171356201171875,
0.038665771484375,
-0.0216522216796875,
0.006866455078125,
-0.057830810546875,
0.0225067138671875,
-0.024566650390625,
0.053375244140625,
0.0036449432373046875,
0.0279998779296875,
0.0151519775390625,
0.00507354736328125,
-0.0282440185546875,
0.00010699033737182617,
-0.0038909912109375,
0.0111541748046875,
-0.024749755859375,
0.0275115966796875,
-0.004322052001953125,
0.05181884765625,
-0.02117919921875,
-0.0265350341796875,
-0.0259246826171875,
-0.0382080078125,
0.0712890625,
0.00115966796875,
-0.03985595703125,
-0.0269927978515625,
0.0758056640625,
-0.02301025390625,
-0.03204345703125,
0.07958984375,
0.01116943359375,
0.03973388671875,
-0.01074981689453125,
-0.031890869140625,
-0.0297088623046875,
-0.084228515625,
0.00879669189453125,
0.05328369140625,
0.03912353515625,
0.016326904296875,
-0.00720977783203125,
0.01557159423828125,
0.00917816162109375,
-0.0283050537109375,
0.0162200927734375,
-0.01306915283203125,
-0.00677490234375,
-0.0296478271484375,
0.0003590583801269531,
-0.04156494140625,
0.046478271484375,
-0.01324462890625,
0.006992340087890625,
0.0213470458984375,
-0.0253753662109375,
-0.04254150390625,
-0.0164794921875,
0.03387451171875,
0.005268096923828125,
0.0038604736328125,
-0.006595611572265625,
-0.006008148193359375,
-0.02691650390625,
0.0165863037109375,
-0.0005207061767578125,
0.01488494873046875,
-0.045562744140625,
-0.0088043212890625,
0.05078125,
0.08355712890625,
-0.01030731201171875,
0.00785064697265625,
0.0364990234375,
-0.038116455078125,
-0.048370361328125,
0.0244903564453125,
-0.0009775161743164062,
-0.023101806640625,
0.0029239654541015625,
0.02239990234375,
0.010894775390625,
-0.012359619140625,
0.0018768310546875,
-0.016845703125,
0.005702972412109375,
-0.0001741647720336914,
-0.03271484375,
-0.037567138671875,
-0.005962371826171875,
0.0307159423828125,
-0.009307861328125,
0.0134735107421875,
-0.0086517333984375,
-0.003490447998046875,
-0.0050048828125,
-0.019744873046875,
0.02471923828125,
-0.019073486328125,
0.05706787109375,
0.06304931640625,
0.0010099411010742188,
0.0048828125,
-0.00852203369140625,
0.0291290283203125,
0.00029468536376953125,
-0.0053863525390625,
0.002941131591796875,
-0.01250457763671875,
0.0035724639892578125,
0.04595947265625,
0.0196380615234375,
0.0018596649169921875,
0.005584716796875,
-0.027099609375,
0.0020236968994140625,
0.006916046142578125,
-0.028411865234375,
-0.0183258056640625,
-0.024383544921875,
0.01206207275390625,
-0.0328369140625,
0.0228424072265625,
0.01654052734375,
0.027099609375,
0.004711151123046875,
0.00659942626953125,
0.030731201171875,
-0.01361083984375,
-0.00750732421875,
0.00004458427429199219,
-0.039031982421875,
-0.0692138671875,
-0.0034275054931640625,
-0.017578125,
0.006328582763671875,
0.028106689453125,
0.0196685791015625,
-0.023895263671875,
0.020294189453125,
-0.000018477439880371094,
-0.0104217529296875,
0.01049041748046875,
0.036285400390625,
-0.04541015625,
-0.036102294921875,
0.0010786056518554688,
0.02496337890625,
0.00409698486328125,
-0.018157958984375,
0.006870269775390625,
-0.02435302734375,
-0.03436279296875,
0.006847381591796875,
-0.013275146484375,
0.009979248046875,
-0.036529541015625,
-0.002956390380859375,
-0.05511474609375,
-0.051116943359375,
0.02032470703125,
-0.030609130859375,
0.06646728515625,
-0.0167236328125,
-0.032806396484375,
0.037872314453125,
0.0501708984375,
0.036651611328125,
0.004772186279296875,
-0.007480621337890625,
-0.00623321533203125,
0.0171966552734375,
0.018157958984375,
0.03369140625,
-0.00937652587890625,
0.0007805824279785156,
-0.036468505859375,
-0.001743316650390625,
-0.0164031982421875,
0.007686614990234375,
0.0097808837890625,
0.006542205810546875,
0.035064697265625,
-0.027923583984375,
0.052215576171875,
-0.04364013671875,
-0.0016632080078125,
-0.041748046875,
-0.029632568359375,
-0.026702880859375,
0.0670166015625,
0.0014753341674804688,
-0.01308441162109375,
-0.0107574462890625,
0.009979248046875,
-0.011932373046875,
-0.04254150390625,
-0.01947021484375,
-0.02227783203125,
-0.1561279296875,
0.00162506103515625,
-0.0161285400390625,
-0.05206298828125,
-0.01215362548828125,
0.023406982421875,
-0.0804443359375,
-0.061614990234375,
0.013519287109375,
-0.029266357421875,
-0.006984710693359375,
0.004940032958984375,
-0.0247039794921875,
-0.03509521484375,
0.006771087646484375,
-0.04364013671875,
-0.052001953125,
0.01117706298828125,
-0.09881591796875,
0.057525634765625,
0.05645751953125,
-0.020050048828125,
-0.01552581787109375,
0.009796142578125,
-0.009063720703125,
-0.0228118896484375,
-0.00794219970703125,
0.0232696533203125,
-0.03277587890625,
-0.00220489501953125,
-0.0283050537109375,
-0.01166534423828125,
-0.044769287109375,
-0.0190582275390625,
-0.0312042236328125,
0.0013141632080078125,
0.00838470458984375,
-0.015777587890625,
0.0518798828125,
-0.0179290771484375,
-0.01763916015625,
-0.042633056640625,
-0.005374908447265625,
-0.003021240234375,
-0.018585205078125,
0.0234222412109375,
-0.0198516845703125,
-0.00154876708984375,
0.01983642578125,
0.053253173828125,
-0.0085296630859375,
0.0035800933837890625,
0.00579071044921875,
0.0169219970703125,
-0.044189453125,
-0.0176849365234375,
0.003520965576171875,
0.0164947509765625,
-0.0177459716796875,
0.04290771484375,
-0.0017547607421875,
-0.01479339599609375,
0.0665283203125,
-0.01629638671875,
0.0172882080078125,
0.0018939971923828125,
0.0020236968994140625,
0.0272064208984375,
-0.0008678436279296875,
0.0240478515625,
0.0279998779296875,
-0.0236968994140625,
0.0006470680236816406,
0.003997802734375,
0.00787353515625,
-0.03460693359375,
0.0060272216796875,
0.0333251953125,
-0.03912353515625,
-0.0347900390625,
-0.006778717041015625,
0.01389312744140625,
0.01387786865234375,
0.01922607421875,
-0.01107025146484375,
0.0203857421875,
-0.01108551025390625,
0.0139923095703125,
-0.01250457763671875,
-0.00286865234375,
0.0108489990234375,
-0.035308837890625,
0.02850341796875,
-0.03204345703125,
-0.042694091796875,
0.01141357421875,
-0.006259918212890625,
0.053253173828125,
0.032470703125,
-0.005889892578125,
-0.0257415771484375,
-0.0002613067626953125,
0.0201416015625,
-0.019744873046875,
0.0245819091796875,
0.00124359130859375,
0.0012674331665039062,
0.0029582977294921875,
-0.013031005859375,
-0.0161895751953125,
-0.00274658203125,
-0.0360107421875,
0.007579803466796875,
0.0229949951171875,
-0.001628875732421875,
0.01123046875,
0.0496826171875,
-0.014984130859375,
0.039794921875,
-0.0006833076477050781,
0.048065185546875,
0.00001043081283569336,
0.04736328125,
0.00908660888671875,
-0.0209808349609375,
0.03265380859375,
-0.0138702392578125,
-0.0136260986328125,
-0.0196380615234375,
0.046417236328125,
-0.00882720947265625,
0.040618896484375,
0.01074981689453125,
-0.043243408203125,
0.0186004638671875,
-0.081298828125,
-0.01009368896484375,
0.04742431640625,
-0.023834228515625,
-0.076904296875,
-0.0110321044921875,
0.04022216796875,
0.045867919921875,
-0.0634765625,
-0.029083251953125,
0.006336212158203125,
-0.041046142578125,
0.015106201171875,
-0.00591278076171875,
-0.0175933837890625,
0.006031036376953125,
0.01300811767578125,
-0.00678253173828125,
-0.043701171875,
-0.0302276611328125,
-0.029876708984375,
0.0006890296936035156,
-0.0193634033203125,
0.007640838623046875,
0.031890869140625,
-0.042022705078125,
0.0203399658203125,
-0.00193023681640625,
0.006443023681640625,
0.004505157470703125,
0.026947021484375,
0.036102294921875,
0.0296478271484375,
-0.0042724609375,
0.00238800048828125,
-0.045501708984375,
-0.007762908935546875,
0.006183624267578125,
-0.042633056640625,
-0.011474609375,
-0.030059814453125,
-0.01166534423828125,
0.0034694671630859375,
0.00955963134765625,
0.035614013671875,
-0.00634765625,
0.0794677734375,
0.0122222900390625,
0.09149169921875,
-0.031494140625,
0.01342010498046875,
0.0205535888671875,
-0.03515625,
-0.0251617431640625,
-0.0009379386901855469,
0.034515380859375,
0.0015697479248046875,
0.0023670196533203125,
-0.02618408203125,
-0.0188751220703125,
-0.01079559326171875,
-0.0074310302734375,
0.032806396484375,
0.05865478515625,
0.0006384849548339844,
0.036346435546875,
0.0106353759765625,
0.0093231201171875,
-0.0198516845703125,
-0.018829345703125,
-0.034393310546875,
0.0294189453125,
-0.012115478515625,
0.0103607177734375,
0.0555419921875,
-0.0275115966796875,
-0.0112457275390625,
0.007266998291015625,
0.0024738311767578125,
0.0250701904296875,
0.01342010498046875,
-0.0207977294921875,
0.05035400390625,
0.06744384765625,
-0.01229095458984375,
0.0294647216796875,
0.008087158203125,
-0.008056640625,
0.00482940673828125,
-0.0121917724609375,
0.0311126708984375,
0.0171356201171875,
-0.00820159912109375,
-0.02569580078125,
0.0369873046875,
-0.0101470947265625,
-0.0032405853271484375,
0.0234222412109375,
0.053558349609375,
0.048004150390625,
-0.044036865234375,
-0.00583648681640625,
-0.01428985595703125,
-0.0277099609375,
0.060638427734375,
-0.0019989013671875,
-0.03277587890625,
-0.044189453125,
0.057708740234375,
-0.048858642578125,
-0.0102386474609375,
0.0271453857421875,
-0.00872802734375,
-0.0299835205078125,
0.0178375244140625,
0.019134521484375,
0.031982421875,
-0.0024890899658203125,
0.0175018310546875,
-0.0119781494140625,
0.01561737060546875,
0.016754150390625,
0.020416259765625,
0.0014848709106445312,
-0.0147857666015625,
-0.050811767578125,
0.01641845703125,
-0.026611328125,
-0.03369140625,
0.0279083251953125,
0.0302276611328125,
-0.0214385986328125,
0.05145263671875,
-0.0146636962890625,
0.005462646484375,
0.007110595703125,
-0.027374267578125,
0.029693603515625,
-0.0201873779296875,
0.00919342041015625,
0.0489501953125,
-0.0596923828125,
0.020751953125,
-0.00934600830078125,
0.0105743408203125,
0.00879669189453125,
0.00400543212890625,
0.0618896484375,
-0.06683349609375,
0.00482177734375,
0.0146636962890625,
0.017974853515625,
0.0207672119140625,
-0.034881591796875,
0.035064697265625,
-0.09320068359375,
-0.06890869140625,
-0.00885009765625,
-0.061248779296875,
-0.0063934326171875,
-0.03961181640625,
-0.057952880859375,
0.08831787109375,
-0.0035419464111328125,
0.037017822265625,
0.0009069442749023438,
0.0198822021484375,
-0.03521728515625,
0.003330230712890625,
-0.033843994140625,
0.048004150390625,
0.023651123046875,
-0.006145477294921875,
-0.0294952392578125,
0.0081939697265625,
-0.0081024169921875,
-0.003734588623046875,
0.0185699462890625,
0.003292083740234375,
-0.01090240478515625,
-0.007518768310546875,
0.0309906005859375,
0.05426025390625,
0.031463623046875,
0.01064300537109375,
-0.010894775390625,
-0.005870819091796875,
0.003284454345703125,
-0.0307769775390625,
0.0152130126953125,
-0.01439666748046875,
-0.038543701171875,
0.0031375885009765625,
0.03387451171875,
0.039093017578125,
0.01548004150390625,
-0.0142059326171875,
-0.034515380859375,
0.00469970703125,
0.03338623046875,
-0.055023193359375,
0.0093231201171875,
0.032440185546875,
-0.01181793212890625,
0.0628662109375,
0.03729248046875,
-0.016143798828125,
0.04046630859375,
-0.01094818115234375,
-0.0020275115966796875,
0.0166778564453125,
0.0153961181640625,
-0.04376220703125,
-0.036376953125,
-0.00928497314453125,
0.01580810546875,
-0.0494384765625,
0.04058837890625,
0.01523590087890625,
0.008514404296875,
-0.0297698974609375,
0.0281219482421875,
0.0248870849609375,
0.0361328125,
-0.038482666015625,
-0.0316162109375,
0.0165557861328125,
0.005130767822265625,
0.023529052734375,
-0.026611328125,
0.0206451416015625,
-0.1107177734375,
-0.06378173828125,
-0.005062103271484375,
0.022003173828125,
0.038726806640625,
-0.0181732177734375,
0.01515960693359375,
0.04022216796875,
-0.02294921875,
0.042144775390625,
-0.0181427001953125,
0.001964569091796875,
-0.008880615234375,
0.048248291015625,
0.03680419921875,
0.01084136962890625,
-0.033111572265625,
-0.0200958251953125,
-0.01540374755859375,
0.03271484375,
-0.0230255126953125,
0.0030765533447265625,
-0.036163330078125,
-0.04730224609375,
-0.002262115478515625,
0.0246429443359375,
-0.01276397705078125,
0.0141754150390625,
0.024993896484375,
0.0294952392578125,
-0.00738525390625,
-0.0298614501953125,
0.0189056396484375,
-0.0160675048828125,
0.01222991943359375,
-0.0343017578125,
0.008148193359375,
0.0008983612060546875,
0.009033203125,
0.01047515869140625,
0.03216552734375,
0.0167999267578125,
-0.0007648468017578125,
0.01561737060546875,
0.018463134765625,
-0.019866943359375,
0.0165252685546875,
0.00298309326171875,
0.006687164306640625,
0.02569580078125,
-0.050048828125,
-0.0308837890625,
0.0311431884765625,
-0.034423828125,
-0.00174713134765625,
0.042694091796875,
-0.0140380859375,
0.019134521484375,
-0.0030307769775390625,
0.0144195556640625,
-0.022186279296875,
-0.02105712890625,
0.025177001953125,
-0.04638671875,
0.015594482421875,
0.0016269683837890625,
-0.007251739501953125,
-0.0110931396484375,
0.01544189453125,
0.0245819091796875,
0.0262451171875,
0.01264190673828125,
-0.004581451416015625,
0.028778076171875,
-0.05035400390625,
0.0227508544921875,
-0.04888916015625,
-0.01318359375,
-0.042236328125,
0.0058746337890625,
0.01261138916015625,
0.01032257080078125,
-0.027069091796875,
0.0438232421875,
0.02264404296875,
-0.00914764404296875,
0.031951904296875,
0.0110931396484375,
0.00044655799865722656,
-0.021240234375,
0.006275177001953125,
-0.0214080810546875,
-0.04290771484375,
-0.0276947021484375,
-0.000020563602447509766,
0.00853729248046875,
-0.00007349252700805664,
-0.007656097412109375,
0.023712158203125,
-0.005054473876953125,
-0.0109710693359375,
0.0234527587890625,
-0.0161285400390625,
0.0439453125,
0.0380859375,
-0.05657958984375,
0.005138397216796875,
-0.0080718994140625,
-0.0204620361328125,
0.0112152099609375,
0.000438690185546875,
0.00933074951171875,
-0.00542449951171875,
0.00582122802734375,
0.023590087890625,
0.0186309814453125,
0.015411376953125,
-0.036376953125,
0.003154754638671875,
0.034576416015625,
-0.00725555419921875,
0.0063323974609375,
0.035888671875,
-0.038330078125,
-0.037872314453125,
-0.005855560302734375,
0.0166778564453125,
-0.0313720703125,
-0.06817626953125,
-0.15380859375,
0.0230865478515625,
0.04656982421875,
0.0257415771484375,
-0.09747314453125,
0.059112548828125,
-0.02178955078125,
0.046234130859375,
0.0277099609375,
0.048187255859375,
-0.02996826171875,
-0.0016088485717773438,
-0.048492431640625,
-0.04827880859375,
-0.039947509765625,
0.054412841796875,
-0.052734375,
-0.00945281982421875,
0.01702880859375,
-0.01480865478515625,
0.00464630126953125,
-0.04168701171875,
0.0163421630859375,
0.007389068603515625,
0.00119781494140625,
-0.0019664764404296875,
0.004993438720703125,
0.004543304443359375,
-0.037933349609375,
-0.0303802490234375,
0.0169525146484375,
-0.0173187255859375,
-0.038543701171875,
-0.0291290283203125,
0.022552490234375,
0.01517486572265625,
-0.03485107421875,
-0.04034423828125,
-0.035430908203125,
0.01294708251953125,
-0.03271484375,
0.004085540771484375,
-0.0009746551513671875,
-0.01641845703125,
0.01416015625,
-0.0003521442413330078,
-0.01904296875,
0.01224517822265625,
0.0231170654296875,
0.0196990966796875,
0.029083251953125,
0.0016813278198242188,
-0.00432586669921875,
-0.01267242431640625,
0.033905029296875,
0.03759765625,
0.03143310546875,
-0.035797119140625,
0.009765625,
-0.01111602783203125,
0.020538330078125,
-0.01611328125,
-0.061798095703125,
0.002811431884765625,
-0.033447265625,
-0.03350830078125,
-0.045257568359375,
0.013153076171875,
0.0156707763671875,
0.0833740234375,
0.035064697265625,
-0.002559661865234375,
-0.049407958984375,
-0.008148193359375,
-0.00530242919921875,
-0.007785797119140625,
-0.04541015625,
0.01247406005859375,
-0.0889892578125,
-0.03631591796875,
0.0081787109375,
-0.0083770751953125,
-0.005115509033203125,
-0.0050506591796875,
-0.0109100341796875,
-0.0084228515625,
0.023529052734375,
-0.006191253662109375,
-0.0286102294921875,
0.02117919921875,
0.085205078125,
-0.05126953125,
0.0183868408203125,
-0.0167694091796875,
0.0007624626159667969,
0.05908203125,
-0.04669189453125,
0.0021190643310546875,
-0.035552978515625,
-0.0323486328125,
0.037445068359375,
-0.0179443359375,
0.01361083984375,
-0.051422119140625,
-0.030059814453125,
-0.01168060302734375,
0.012115478515625,
-0.001720428466796875,
0.01251983642578125,
-0.029815673828125,
0.030914306640625,
0.003665924072265625,
0.035888671875,
-0.0061187744140625,
0.0022182464599609375,
-0.00858306884765625,
0.0242767333984375,
0.001667022705078125,
-0.0163116455078125,
0.03497314453125,
-0.02349853515625,
0.00046896934509277344,
0.0030422210693359375,
0.03863525390625,
-0.0775146484375,
0.029632568359375,
-0.024261474609375,
0.070068359375,
0.03704833984375
]
|
234f03976df5fc7d09c2f3951ddba59ed454df14 | Wordpress Stackexchange
Q: WordPress Redirecting to wp-admin/install.php Am working on my WordPress site. I changed font color of my site then I have refreshed my page but it redirects to wp-admin/install.php.
What can I do now? How can I get access to my site?
A: I've had this problem. I contacted my hosting provider and they told me it happened because I exceeded maximum queries per hour limit and therefore access to the database was temporarily locked, so WP couldn't read from it.
| Q: WordPress Redirecting to wp-admin/install.php Am working on my WordPress site. I changed font color of my site then I have refreshed my page but it redirects to wp-admin/install.php.
What can I do now? How can I get access to my site?
A: I've had this problem. I contacted my hosting provider and they told me it happened because I exceeded maximum queries per hour limit and therefore access to the database was temporarily locked, so WP couldn't read from it.
A: Open your codebase/setup through FTP or so.
*
*Check the database name, username, password and table prefix in the wp-config.php file.
*Check if the wp-config.php file exist and file has not been misspelled in the name or the extension.
Reference: http://codex.wordpress.org/Editing_wp-config.php
A: After restarting my machine my wordpress started redirecting to install. The database reported that the tables for wordpress 'did not exist' when viewed through phpMyAdmin. Shutting down the webserver, then restarting the mySQL server fixed the issue on my system.
Please try shutting down your webserver (gracefully), then restart mySQL.
A: Try looking at wp_options table in phpMyAdmin and hitting "Optimize table". Worked on one of my sites that had this exact issue (though not sure what caused it initially).
A: The issue is within wp-config.php file. You have to double check the $table_prefix field and make sure that it corresponds to table prefixes in your actual database.
Example: If in the database your tables look like wp_website_year_comments in your wp_config.php it should look like this:
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_website_year_';
A: I also experienced this problem and finally realized that the Jetpack plugin installed along with Wordpress is the root cause. It prevents bruteforce attack and enhance security so after about 10 REST calls to the server, it automatically blocks all requests by redirecting to install.php. Deactivating Jetpack solved my problem.
A: Some fixes that always work:
*
*CHECK wp-config
*
*DB Logins must be updated
*Check Prefix in wp-config
Sometimes the prefix is wrong like wp_ or any other. Check your database and correct it.
*Check .htaccess file
Try putting default wordpress htaccess file
*Check wp-config file name
Sometimes people edit wp-config-sample file instead. You have to edit wp-config file.
A: @Izzy Hegazy solution worked in my case. I totally forgot I had changed the table prefix on the old installation. Meanwhile, on the new installation, I used the default wp_ table prefix.
SOLUTION
*
*In the case of a migration; ensure your table prefix on the old installation is same on the new installation.
*Delete the wp-config-sample.php file.
*Check if wp-config.php exists
*Check the database connection details and confirmed they're pointed to the right database. (username & password)
*Try repairing the database tables using PHPmyadmin. At times database tables get corrupted and cause errors.
These are always the fix in most cases.
A: This happens due to the following issues:
*
*Missing Files
*Database Connection Details Problem
*Site URL Issue
*.htaccess File Issue
*Webserver Failure
*Resources Blocked by Plugin
*Query Limit Exceeded
*Insufficient Database Privileges
*PHP Extensions
Reference: https://www.scratchcode.io/wordpress-keeps-redirecting-to-wp-admin-install-php/
| wordpress | {
"language": "en",
"length": 535,
"provenance": "stackexchange_00019.jsonl.gz:440125",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/126336"
} | [
0.03662109375,
0.01043701171875,
0.0100555419921875,
-0.0002951622009277344,
-0.00449371337890625,
-0.026153564453125,
0.02630615234375,
-0.0638427734375,
0.01194000244140625,
0.01342010498046875,
-0.0024776458740234375,
-0.00547027587890625,
-0.039520263671875,
-0.0399169921875,
-0.032470703125,
-0.03057861328125,
0.0299530029296875,
0.00009042024612426758,
0.043731689453125,
0.0013580322265625,
0.017669677734375,
0.037506103515625,
0.038482666015625,
0.002193450927734375,
-0.03790283203125,
0.03143310546875,
0.0888671875,
-0.03411865234375,
-0.0088043212890625,
-0.03790283203125,
0.0040130615234375,
0.0010194778442382812,
-0.004451751708984375,
0.0206146240234375,
0.00360870361328125,
-0.03125,
0.033233642578125,
0.0122833251953125,
0.006168365478515625,
0.017547607421875,
0.03167724609375,
-0.0283355712890625,
0.00936126708984375,
0.022308349609375,
-0.0218048095703125,
-0.04986572265625,
0.056610107421875,
-0.01284027099609375,
0.0030345916748046875,
-0.0294036865234375,
-0.01129913330078125,
0.00514984130859375,
0.0080413818359375,
0.007274627685546875,
-0.0034160614013671875,
-0.0009479522705078125,
0.06488037109375,
0.0211181640625,
0.038116455078125,
-0.060333251953125,
-0.06640625,
0.0233001708984375,
0.0166473388671875,
-0.0101318359375,
-0.001129150390625,
0.002178192138671875,
0.0176544189453125,
0.0220184326171875,
-0.08001708984375,
-0.01409912109375,
0.037109375,
-0.039794921875,
-0.0194549560546875,
-0.0250396728515625,
-0.005947113037109375,
0.0011758804321289062,
0.0244598388671875,
-0.0311737060546875,
-0.0094146728515625,
0.0253143310546875,
0.0226287841796875,
-0.00975799560546875,
0.039764404296875,
-0.0199737548828125,
0.0200042724609375,
0.0255126953125,
-0.009979248046875,
-0.01641845703125,
-0.011749267578125,
-0.02490234375,
-0.028106689453125,
-0.00396728515625,
-0.0126495361328125,
-0.0017538070678710938,
-0.0274810791015625,
-0.0244140625,
0.0230560302734375,
0.036895751953125,
-0.012420654296875,
0.01629638671875,
-0.03173828125,
-0.0279998779296875,
0.0004203319549560547,
-0.02374267578125,
0.003620147705078125,
0.037017822265625,
-0.0165863037109375,
-0.00206756591796875,
0.021331787109375,
0.0204315185546875,
-0.005649566650390625,
-0.00005072355270385742,
-0.048919677734375,
-0.0372314453125,
-0.03155517578125,
0.030792236328125,
-0.052001953125,
-0.02154541015625,
0.00867462158203125,
-0.006641387939453125,
-0.0106353759765625,
0.02606201171875,
-0.0164031982421875,
-0.059173583984375,
-0.023468017578125,
-0.06549072265625,
-0.0165863037109375,
0.006183624267578125,
-0.018707275390625,
0.02630615234375,
-0.00293731689453125,
-0.00605010986328125,
0.0038471221923828125,
0.033233642578125,
-0.00737762451171875,
-0.016754150390625,
0.03656005859375,
0.0231170654296875,
-0.0021038055419921875,
0.0230712890625,
0.0201416015625,
-0.0572509765625,
-0.0399169921875,
0.0225372314453125,
-0.0032444000244140625,
0.04833984375,
0.0003294944763183594,
-0.013092041015625,
-0.010833740234375,
-0.047698974609375,
-0.013427734375,
-0.04986572265625,
0.0088348388671875,
0.0230712890625,
0.030181884765625,
-0.0168914794921875,
0.0210418701171875,
-0.01425933837890625,
0.006946563720703125,
0.003475189208984375,
0.0222320556640625,
0.0023593902587890625,
0.026611328125,
0.035491943359375,
0.005001068115234375,
-0.01010894775390625,
-0.0237884521484375,
-0.00261688232421875,
0.022247314453125,
0.0162506103515625,
0.01654052734375,
-0.035064697265625,
0.01045989990234375,
0.02044677734375,
-0.00405120849609375,
0.03131103515625,
0.0509033203125,
-0.022247314453125,
0.0231475830078125,
0.0611572265625,
-0.0175933837890625,
-0.0164337158203125,
0.047454833984375,
-0.04632568359375,
-0.038604736328125,
0.00371551513671875,
-0.0016164779663085938,
0.044403076171875,
0.02288818359375,
0.024444580078125,
0.0021076202392578125,
-0.0012388229370117188,
-0.018524169921875,
0.04388427734375,
-0.0139007568359375,
-0.040069580078125,
-0.027008056640625,
0.00661468505859375,
-0.02777099609375,
-0.0245819091796875,
0.0011053085327148438,
0.0226593017578125,
-0.01003265380859375,
-0.0026092529296875,
-0.0335693359375,
0.01953125,
-0.00873565673828125,
0.0287933349609375,
0.0240936279296875,
0.01517486572265625,
-0.006610870361328125,
-0.017852783203125,
0.0258636474609375,
-0.055877685546875,
-0.032073974609375,
0.035308837890625,
-0.04412841796875,
0.0491943359375,
-0.01242828369140625,
0.058349609375,
-0.01456451416015625,
-0.057281494140625,
-0.0013303756713867188,
-0.0271453857421875,
0.01232147216796875,
0.0345458984375,
-0.02545166015625,
0.0179443359375,
0.0275726318359375,
0.004451751708984375,
0.0254058837890625,
0.01335906982421875,
0.01605224609375,
0.0020751953125,
-0.015960693359375,
0.003082275390625,
0.0011348724365234375,
-0.0791015625,
0.007045745849609375,
0.052886962890625,
0.0203094482421875,
0.0474853515625,
-0.0267486572265625,
0.00443267822265625,
0.035369873046875,
-0.060455322265625,
-0.01244354248046875,
0.00048804283142089844,
0.04095458984375,
0.061767578125,
0.0038852691650390625,
-0.0362548828125,
0.019378662109375,
-0.00911712646484375,
-0.01617431640625,
0.04193115234375,
0.002079010009765625,
0.00974273681640625,
-0.01556396484375,
0.0034809112548828125,
-0.01361083984375,
-0.0185546875,
-0.0080718994140625,
-0.0108795166015625,
-0.0225372314453125,
0.01727294921875,
0.006893157958984375,
0.0204925537109375,
-0.0242919921875,
-0.01259613037109375,
0.033843994140625,
0.0277099609375,
0.0004887580871582031,
0.01412200927734375,
0.02850341796875,
-0.06280517578125,
-0.0234222412109375,
0.006732940673828125,
0.02374267578125,
-0.0166473388671875,
-0.006778717041015625,
0.0080108642578125,
-0.053985595703125,
0.000885009765625,
0.0008764266967773438,
-0.052520751953125,
-0.0281982421875,
0.03216552734375,
0.028411865234375,
0.0182037353515625,
0.03765869140625,
0.01013946533203125,
-0.0136260986328125,
0.02703857421875,
-0.007747650146484375,
-0.031097412109375,
0.023101806640625,
-0.018310546875,
0.0016355514526367188,
-0.0089874267578125,
0.05316162109375,
0.0487060546875,
0.004871368408203125,
0.00005418062210083008,
-0.002166748046875,
0.0228271484375,
0.0034770965576171875,
-0.00865936279296875,
-0.0298004150390625,
0.0045928955078125,
-0.0914306640625,
-0.047882080078125,
0.032806396484375,
0.02960205078125,
-0.0023899078369140625,
-0.01763916015625,
-0.0190582275390625,
0.029083251953125,
-0.10003662109375,
-0.0831298828125,
-0.10028076171875,
-0.0777587890625,
0.0297698974609375,
0.005657196044921875,
-0.0124664306640625,
0.0225677490234375,
0.021881103515625,
0.046356201171875,
0.036865234375,
-0.033172607421875,
-0.032684326171875,
-0.034698486328125,
-0.059356689453125,
-0.0382080078125,
0.00031304359436035156,
-0.01519775390625,
-0.005462646484375,
0.061737060546875,
-0.0128631591796875,
-0.06427001953125,
-0.0301513671875,
0.008392333984375,
0.0175628662109375,
-0.0006489753723144531,
-0.0233001708984375,
-0.038604736328125,
0.01169586181640625,
0.00772857666015625,
0.020538330078125,
-0.039306640625,
0.0487060546875,
-0.047882080078125,
0.0338134765625,
-0.0258331298828125,
0.0069580078125,
0.01068878173828125,
-0.02349853515625,
-0.041412353515625,
-0.03778076171875,
-0.0762939453125,
0.0125274658203125,
-0.00896453857421875,
-0.02740478515625,
0.0076751708984375,
0.00417327880859375,
-0.0297698974609375,
0.01552581787109375,
-0.0286102294921875,
0.0232696533203125,
0.0159454345703125,
-0.00139617919921875,
-0.043426513671875,
0.06109619140625,
0.01806640625,
0.047515869140625,
-0.036529541015625,
0.007358551025390625,
-0.0285186767578125,
0.044830322265625,
0.01345062255859375,
-0.0113525390625,
-0.017120361328125,
0.0152587890625,
-0.036865234375,
-0.061553955078125,
0.0312347412109375,
-0.054473876953125,
0.03729248046875,
-0.0655517578125,
-0.0189666748046875,
-0.0271759033203125,
0.109130859375,
-0.0162811279296875,
0.01288604736328125,
0.0114593505859375,
0.01445770263671875,
-0.08282470703125,
-0.0172271728515625,
-0.072021484375,
0.020843505859375,
-0.0850830078125,
0.007335662841796875,
-0.00406646728515625,
-0.0177154541015625,
-0.013458251953125,
0.0014324188232421875,
-0.0533447265625,
-0.04437255859375,
0.04718017578125,
-0.03924560546875,
0.032989501953125,
-0.002826690673828125,
0.0271453857421875,
-0.0274810791015625,
-0.026336669921875,
-0.019317626953125,
-0.102294921875,
-0.021148681640625,
0.0035076141357421875,
0.074462890625,
-0.006771087646484375,
0.004436492919921875,
-0.041290283203125,
0.04974365234375,
0.0236663818359375,
0.061981201171875,
-0.027008056640625,
-0.00768280029296875,
-0.0273895263671875,
-0.053955078125,
-0.00807952880859375,
-0.0197601318359375,
-0.02197265625,
-0.04327392578125,
-0.0386962890625,
-0.031005859375,
-0.01091766357421875,
-0.005672454833984375,
0.033782958984375,
-0.0167236328125,
-0.0242767333984375,
0.0021820068359375,
-0.016998291015625,
0.023345947265625,
-0.0296783447265625,
0.0220794677734375,
0.0027408599853515625,
-0.0286102294921875,
0.032501220703125,
-0.016082763671875,
-0.0284881591796875,
0.0114593505859375,
0.047637939453125,
0.018341064453125,
-0.0110931396484375,
0.00726318359375,
0.018157958984375,
0.02130126953125,
0.0034885406494140625,
0.04248046875,
0.0281219482421875,
0.015869140625,
0.00605010986328125,
-0.0059661865234375,
0.0199737548828125,
0.0038051605224609375,
0.0298004150390625,
0.01345062255859375,
-0.025115966796875,
0.032745361328125,
0.0063323974609375,
-0.020233154296875,
0.054656982421875,
0.0220947265625,
-0.0280609130859375,
-0.005245208740234375,
0.00899505615234375,
-0.0034885406494140625,
0.005916595458984375,
-0.006488800048828125,
-0.043060302734375,
0.0223236083984375,
0.00024962425231933594,
0.00383758544921875,
0.0210113525390625,
-0.0032634735107421875,
0.0194854736328125,
-0.01090240478515625,
-0.01233673095703125,
-0.004833221435546875,
-0.0005669593811035156,
-0.006610870361328125,
0.0179443359375,
-0.00478363037109375,
-0.01544189453125,
-0.018218994140625,
-0.0260009765625,
0.0816650390625,
0.0245208740234375,
-0.06353759765625,
0.049835205078125,
-0.016815185546875,
0.0172119140625,
0.0290985107421875,
-0.0008225440979003906,
0.0107879638671875,
-0.006591796875,
-0.02105712890625,
0.016937255859375,
0.0243682861328125,
-0.04144287109375,
-0.023468017578125,
0.0078887939453125,
0.01265716552734375,
-0.0092620849609375,
0.043060302734375,
0.050750732421875,
-0.00742340087890625,
0.03692626953125,
-0.01039886474609375,
0.030975341796875,
0.0175323486328125,
0.00920867919921875,
-0.0133209228515625,
0.0296630859375,
0.034515380859375,
-0.04217529296875,
0.044921875,
-0.0419921875,
0.007556915283203125,
-0.0084991455078125,
0.0430908203125,
-0.006900787353515625,
-0.0254364013671875,
0.045196533203125,
-0.0440673828125,
-0.01061248779296875,
0.053009033203125,
-0.0139312744140625,
-0.0941162109375,
-0.009429931640625,
0.0264434814453125,
0.0255584716796875,
-0.037078857421875,
-0.01446533203125,
0.01812744140625,
-0.0262298583984375,
0.03411865234375,
0.0035247802734375,
0.002628326416015625,
-0.017181396484375,
-0.013153076171875,
0.018218994140625,
-0.0242462158203125,
-0.0394287109375,
-0.007427215576171875,
0.0010137557983398438,
0.0002262592315673828,
0.00890350341796875,
0.0186614990234375,
0.00937652587890625,
0.01155853271484375,
-0.02001953125,
-0.01800537109375,
-0.0389404296875,
-0.0034389495849609375,
0.056121826171875,
0.0215301513671875,
-0.0931396484375,
-0.016143798828125,
-0.0472412109375,
-0.0007176399230957031,
-0.0131988525390625,
-0.0259246826171875,
-0.03668212890625,
0.0030345916748046875,
0.0262603759765625,
-0.004833221435546875,
0.0005850791931152344,
-0.03228759765625,
-0.033477783203125,
0.039947509765625,
0.044708251953125,
0.0099029541015625,
-0.009735107421875,
0.0237274169921875,
-0.01328277587890625,
0.060699462890625,
-0.0032291412353515625,
-0.002895355224609375,
-0.005046844482421875,
-0.01727294921875,
0.0086669921875,
-0.015380859375,
0.00165557861328125,
-0.0027713775634765625,
0.03765869140625,
-0.0190887451171875,
-0.006103515625,
-0.00550079345703125,
-0.00897979736328125,
0.0010738372802734375,
0.01654052734375,
-0.0263824462890625,
0.0223846435546875,
-0.0268402099609375,
-0.002620697021484375,
-0.033416748046875,
-0.0222015380859375,
-0.0030727386474609375,
-0.010711669921875,
-0.0193328857421875,
-0.0062713623046875,
0.003078460693359375,
-0.0143585205078125,
0.03253173828125,
-0.04547119140625,
0.023468017578125,
0.099853515625,
0.01380157470703125,
0.06494140625,
0.003993988037109375,
0.02508544921875,
0.0673828125,
0.004703521728515625,
-0.000843048095703125,
-0.0011730194091796875,
0.0249786376953125,
0.0013246536254882812,
0.0230712890625,
0.0293121337890625,
0.0036525726318359375,
-0.0117950439453125,
0.08349609375,
0.057220458984375,
-0.11126708984375,
-0.01061248779296875,
-0.010162353515625,
-0.020172119140625,
0.00908660888671875,
-0.0136566162109375,
-0.0172576904296875,
-0.05938720703125,
0.040496826171875,
0.0017547607421875,
-0.0078887939453125,
-0.00650787353515625,
-0.00774383544921875,
-0.006023406982421875,
-0.016021728515625,
0.068115234375,
0.01532745361328125,
-0.0124053955078125,
-0.0028781890869140625,
-0.001384735107421875,
0.0084991455078125,
-0.0038585662841796875,
-0.04022216796875,
0.0173187255859375,
-0.038330078125,
-0.051239013671875,
-0.00009959936141967773,
-0.05841064453125,
0.0235443115234375,
0.0031147003173828125,
0.019622802734375,
0.0262603759765625,
0.07537841796875,
-0.0258331298828125,
0.0333251953125,
0.038818359375,
0.04095458984375,
0.0187835693359375,
-0.01107025146484375,
-0.0033740997314453125,
-0.0131988525390625,
-0.034820556640625,
-0.0029449462890625,
-0.0338134765625,
-0.0160064697265625,
-0.01120758056640625,
0.0003216266632080078,
0.03472900390625,
-0.025146484375,
-0.018524169921875,
0.05743408203125,
-0.006893157958984375,
-0.029083251953125,
-0.0023784637451171875,
0.0203094482421875,
-0.019500732421875,
-0.0011472702026367188,
-0.00716400146484375,
-0.01439666748046875,
0.0125732421875,
-0.0255279541015625,
-0.029449462890625,
0.08685302734375,
0.004436492919921875,
-0.0196990966796875,
0.05029296875,
0.048248291015625,
-0.06060791015625,
0.007183074951171875,
-0.01239776611328125,
0.02227783203125,
0.06427001953125,
0.00014734268188476562,
0.007709503173828125,
0.00052642822265625,
-0.0176849365234375,
0.023773193359375,
0.0011749267578125,
0.009246826171875,
-0.053863525390625,
0.0160980224609375,
0.066162109375,
0.03631591796875,
0.0271453857421875,
0.041961669921875,
-0.00843048095703125,
0.00818634033203125,
0.0214996337890625,
-0.026824951171875,
0.02166748046875,
-0.0007600784301757812,
-0.038421630859375,
0.02099609375,
0.0055694580078125,
-0.021453857421875,
0.0009765625,
0.037261962890625,
-0.0869140625,
0.014251708984375,
0.055206298828125,
-0.0128021240234375,
-0.0046539306640625,
0.0013275146484375,
-0.0185394287109375,
-0.039459228515625,
0.04962158203125,
-0.0484619140625,
0.0284576416015625,
-0.0159912109375,
-0.00832366943359375,
-0.0218658447265625,
0.0175323486328125,
-0.01342010498046875,
-0.044677734375,
-0.0185394287109375,
0.0443115234375,
-0.04107666015625,
0.037109375,
0.03314208984375,
0.032684326171875,
-0.0175018310546875,
-0.037841796875,
0.04595947265625,
0.044403076171875,
-0.01142120361328125,
-0.0008993148803710938,
0.0120391845703125,
-0.010711669921875,
-0.01335906982421875,
-0.042633056640625,
-0.0160064697265625,
0.0257110595703125,
0.00927734375,
-0.022003173828125,
0.00203704833984375,
0.032135009765625,
-0.010833740234375,
-0.006557464599609375,
-0.00911712646484375,
0.00858306884765625,
0.0203857421875,
-0.01837158203125,
-0.018524169921875,
0.039215087890625,
0.03936767578125,
0.003086090087890625,
0.0167388916015625,
-0.007778167724609375,
-0.00870513916015625,
-0.00885772705078125,
0.046539306640625,
0.0024776458740234375,
0.03155517578125,
-0.061981201171875,
-0.05267333984375,
0.01210784912109375,
0.0445556640625,
-0.01131439208984375,
0.00829315185546875,
0.03546142578125,
0.054901123046875,
-0.01122283935546875,
-0.0248260498046875,
0.055755615234375,
-0.00678253173828125,
0.01512908935546875,
-0.01268768310546875,
0.02008056640625,
0.01129150390625,
-0.0020732879638671875,
-0.032440185546875,
0.02899169921875,
0.041015625,
-0.005916595458984375,
0.051239013671875,
-0.00872039794921875,
-0.007427215576171875,
0.012451171875,
-0.0202178955078125,
0.03826904296875,
0.0242462158203125,
-0.062103271484375,
-0.0250244140625,
-0.0137786865234375,
0.0009517669677734375,
0.027740478515625,
0.027679443359375,
-0.0193328857421875,
0.04095458984375,
0.0014553070068359375,
-0.021148681640625,
0.0218658447265625,
0.0238037109375,
0.0011854171752929688,
-0.00034546852111816406,
0.021331787109375,
-0.0134735107421875,
-0.051025390625,
-0.047515869140625,
-0.0197296142578125,
0.04351806640625,
-0.000743865966796875,
0.07012939453125,
-0.00800323486328125,
0.006374359130859375,
-0.0047454833984375,
-0.006031036376953125,
-0.0008950233459472656,
-0.01739501953125,
0.044647216796875,
0.0086212158203125,
-0.0175323486328125,
-0.029052734375,
-0.10028076171875,
0.04925537109375,
-0.01346588134765625,
0.01255035400390625,
0.044769287109375,
-0.0216827392578125,
0.0110931396484375,
0.0192413330078125,
0.006694793701171875,
-0.032012939453125,
-0.0570068359375,
-0.047271728515625,
-0.0031948089599609375,
0.000766754150390625,
0.003082275390625,
-0.002399444580078125,
0.0176849365234375,
0.005817413330078125,
-0.004581451416015625,
0.031494140625,
-0.02069091796875,
0.03692626953125,
0.0340576171875,
-0.052459716796875,
-0.032257080078125,
0.004055023193359375,
-0.01287841796875,
-0.006427764892578125,
0.012969970703125,
0.03643798828125,
-0.01216888427734375,
0.03936767578125,
-0.0426025390625,
-0.010101318359375,
0.016876220703125,
0.01544952392578125,
0.007053375244140625,
-0.0306854248046875,
-0.0092010498046875,
-0.0361328125,
0.024871826171875,
-0.00616455078125,
-0.0146942138671875,
-0.0147857666015625,
0.006587982177734375,
-0.004825592041015625,
0.009765625,
-0.043365478515625,
0.03179931640625,
0.058319091796875,
0.00269317626953125,
-0.0477294921875,
0.00313568115234375,
-0.037567138671875,
0.09307861328125,
0.0135498046875,
-0.0234832763671875,
0.0166778564453125,
0.06304931640625,
-0.039947509765625,
-0.042816162109375,
-0.034912109375,
-0.010101318359375,
-0.055755615234375,
0.0015878677368164062,
0.023590087890625,
-0.0396728515625,
0.033599853515625,
-0.03717041015625,
0.02752685546875,
0.016143798828125,
0.033294677734375,
-0.02117919921875,
0.01399993896484375,
0.00850677490234375,
-0.0129852294921875,
-0.08831787109375,
-0.00746917724609375,
-0.058868408203125,
0.01568603515625,
-0.029388427734375,
0.01459503173828125,
0.0229339599609375,
-0.046539306640625,
-0.0762939453125,
0.03692626953125,
-0.0149688720703125,
-0.029632568359375,
-0.0699462890625,
-0.0011262893676757812,
-0.0036163330078125,
0.010406494140625,
-0.014068603515625,
-0.0251312255859375,
-0.0360107421875,
0.048980712890625,
0.019378662109375,
-0.02362060546875,
0.035003662109375,
0.0096588134765625,
-0.025848388671875,
0.024932861328125,
0.0177459716796875,
-0.0257568359375,
-0.0031909942626953125,
-0.023834228515625,
0.021820068359375,
0.071533203125,
-0.0104827880859375,
-0.08056640625,
0.00841522216796875,
-0.045318603515625,
-0.0097198486328125,
-0.03851318359375,
0.018829345703125,
-0.0149688720703125,
-0.0204315185546875,
0.00152587890625,
-0.0187225341796875,
-0.0020465850830078125,
-0.047698974609375,
-0.0023746490478515625,
0.0003902912139892578,
-0.034423828125,
0.028900146484375,
-0.09771728515625,
-0.02313232421875,
0.006694793701171875,
-0.01401519775390625,
0.027130126953125,
0.0191497802734375,
-0.021636962890625,
0.0009016990661621094,
0.021942138671875,
-0.009552001953125,
-0.054962158203125,
-0.052581787109375,
0.058807373046875,
-0.0231781005859375,
-0.01580810546875,
0.01062774658203125,
0.037109375,
0.0112457275390625,
0.0201263427734375,
0.0199127197265625,
0.0150299072265625,
-0.02142333984375,
-0.0118560791015625,
0.0164642333984375,
0.01788330078125,
-0.00897979736328125,
-0.0294952392578125,
0.038909912109375,
0.025115966796875,
-0.0234832763671875,
0.022796630859375,
-0.0160369873046875,
0.056365966796875,
-0.033843994140625,
0.05804443359375,
-0.0078887939453125,
0.0269927978515625,
-0.0161590576171875,
0.046295166015625,
-0.060302734375,
-0.0009007453918457031,
-0.0225372314453125,
-0.0178070068359375,
0.01074981689453125,
0.03179931640625,
0.056915283203125,
0.017974853515625,
-0.017852783203125,
-0.024383544921875,
0.03125,
-0.015045166015625
]
|
ecd2ed4291d000dfd7220e6fb8d96fb8d250468a | Wordpress Stackexchange
Q: 301 redirect not working through .htaccess I found this little trick http://css-tricks.com/snippets/htaccess/301-redirects/ to redirect my old Wordpress domain to my new domain with the path included. I run a test on my local copy and everything works fine. When I log in to the cpanel of the old domain and try it though it gives me some bad results.
Here is the code I used for both my local and live copy ...
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Redirect 301 / http://newsite.com/
Here's what the results look like http://www.cuponsmercado.com.br/lojas/. It looks to be calling the new domain (based on the Google Chrome status at the bottom left) but it just shows the old domain with broken HTML/CSS. Any Ideas?
A: Replace Redirect 301 / http://newsite.com/ by RewriteRule ^(.*)$ http://newsite.com/ [L,R=301]
| Q: 301 redirect not working through .htaccess I found this little trick http://css-tricks.com/snippets/htaccess/301-redirects/ to redirect my old Wordpress domain to my new domain with the path included. I run a test on my local copy and everything works fine. When I log in to the cpanel of the old domain and try it though it gives me some bad results.
Here is the code I used for both my local and live copy ...
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Redirect 301 / http://newsite.com/
Here's what the results look like http://www.cuponsmercado.com.br/lojas/. It looks to be calling the new domain (based on the Google Chrome status at the bottom left) but it just shows the old domain with broken HTML/CSS. Any Ideas?
A: Replace Redirect 301 / http://newsite.com/ by RewriteRule ^(.*)$ http://newsite.com/ [L,R=301]
A: Move your redirect up above the WordPress section.
As it looks to me, what should be happening is that .php files are processed as normal on the old domain. See that [L]? That is going to be the last rule ran, if the conditions match. The redirect never applies to those files. It does apply to non-php files-- images, javascript, etc. And if you watch your requests with something like HttpFox it confirms the description I just gave.
I'd do this with a CNAME if I were you though.
| wordpress | {
"language": "en",
"length": 243,
"provenance": "stackexchange_00019.jsonl.gz:440149",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/126413"
} | [
0.01506805419921875,
0.004291534423828125,
0.0246124267578125,
0.01666259765625,
-0.01715087890625,
-0.002727508544921875,
0.038299560546875,
-0.059844970703125,
-0.03485107421875,
0.0200042724609375,
-0.023590087890625,
0.0175933837890625,
-0.0065460205078125,
-0.0215911865234375,
0.02874755859375,
-0.023590087890625,
0.01318359375,
-0.0262908935546875,
0.006908416748046875,
-0.02044677734375,
0.00021755695343017578,
-0.00782012939453125,
0.025848388671875,
-0.0296173095703125,
-0.011566162109375,
-0.00687408447265625,
0.130859375,
-0.05206298828125,
0.01009368896484375,
-0.04327392578125,
0.00860595703125,
-0.01335906982421875,
0.0545654296875,
0.030853271484375,
-0.063720703125,
0.005413055419921875,
0.03363037109375,
-0.01081085205078125,
-0.01326751708984375,
0.036590576171875,
0.0223388671875,
-0.0235443115234375,
0.03631591796875,
0.0108795166015625,
0.0157318115234375,
-0.044921875,
0.03662109375,
-0.055389404296875,
-0.00962066650390625,
0.0018262863159179688,
0.0135345458984375,
0.0236358642578125,
0.01806640625,
0.04150390625,
0.0020732879638671875,
0.010345458984375,
-0.0171051025390625,
-0.00228118896484375,
0.008819580078125,
0.0008988380432128906,
-0.0018100738525390625,
-0.004848480224609375,
0.025146484375,
-0.00017786026000976562,
-0.0350341796875,
-0.0153350830078125,
-0.031341552734375,
0.00246429443359375,
-0.04400634765625,
-0.03204345703125,
0.0538330078125,
-0.0237884521484375,
0.0130157470703125,
-0.007183074951171875,
0.0104522705078125,
-0.04144287109375,
0.014801025390625,
-0.0183258056640625,
0.0277099609375,
0.01165771484375,
-0.0006694793701171875,
-0.0006589889526367188,
0.019287109375,
-0.059906005859375,
0.03448486328125,
-0.023406982421875,
-0.0193023681640625,
-0.0011844635009765625,
-0.055145263671875,
-0.049560546875,
-0.0292205810546875,
-0.036712646484375,
-0.061767578125,
-0.017547607421875,
-0.006824493408203125,
-0.0230560302734375,
0.039825439453125,
0.07501220703125,
-0.0091552734375,
-0.0031948089599609375,
-0.01324462890625,
-0.0277862548828125,
-0.0183868408203125,
-0.0164031982421875,
-0.017547607421875,
0.031707763671875,
0.024444580078125,
0.043853759765625,
0.027801513671875,
0.02105712890625,
-0.006366729736328125,
0.038970947265625,
-0.0200347900390625,
-0.0196533203125,
-0.0271148681640625,
0.04632568359375,
-0.00760650634765625,
-0.0205841064453125,
0.0038356781005859375,
0.01006317138671875,
-0.0156097412109375,
0.01004791259765625,
0.015533447265625,
0.03271484375,
0.00330352783203125,
0.0120391845703125,
-0.0005784034729003906,
-0.0404052734375,
-0.02325439453125,
-0.00368499755859375,
-0.01213836669921875,
0.0251922607421875,
-0.0030517578125,
0.009490966796875,
-0.0121612548828125,
-0.01470947265625,
0.0775146484375,
-0.01125335693359375,
-0.00499725341796875,
0.037567138671875,
0.0161590576171875,
-0.043609619140625,
-0.040771484375,
0.007080078125,
0.0091400146484375,
0.04571533203125,
0.04119873046875,
0.0056610107421875,
-0.040985107421875,
-0.06805419921875,
0.0296783447265625,
-0.0177154541015625,
0.07159423828125,
-0.011749267578125,
-0.0002732276916503906,
-0.061279296875,
0.0413818359375,
-0.05511474609375,
-0.01971435546875,
-0.053253173828125,
0.01373291015625,
0.00614166259765625,
0.03778076171875,
-0.0419921875,
-0.038909912109375,
-0.0256805419921875,
-0.0794677734375,
-0.01490020751953125,
0.0187225341796875,
0.020721435546875,
0.00016796588897705078,
-0.01165008544921875,
0.00287628173828125,
-0.003971099853515625,
-0.01470947265625,
0.020721435546875,
0.0092926025390625,
0.0038013458251953125,
0.01198577880859375,
0.0709228515625,
0.043975830078125,
0.001834869384765625,
0.034393310546875,
0.007358551025390625,
-0.031524658203125,
0.0273590087890625,
-0.0023441314697265625,
0.021697998046875,
-0.0108489990234375,
0.00391387939453125,
0.038177490234375,
0.04443359375,
-0.0007457733154296875,
0.04083251953125,
-0.01302337646484375,
-0.051544189453125,
0.033599853515625,
0.0172271728515625,
-0.01216888427734375,
-0.023406982421875,
-0.0172576904296875,
0.027801513671875,
-0.04498291015625,
0.0246429443359375,
-0.0347900390625,
0.01102447509765625,
-0.017333984375,
0.0260162353515625,
0.0176239013671875,
0.02191162109375,
0.0021381378173828125,
-0.017120361328125,
-0.0214385986328125,
-0.013580322265625,
-0.0350341796875,
0.0122833251953125,
-0.041961669921875,
0.0308074951171875,
-0.0002894401550292969,
0.037445068359375,
-0.0113525390625,
-0.022003173828125,
0.005519866943359375,
-0.031341552734375,
0.0307464599609375,
-0.0305023193359375,
-0.0220947265625,
-0.03204345703125,
-0.0280914306640625,
-0.0081787109375,
-0.07281494140625,
0.06781005859375,
-0.017547607421875,
0.02197265625,
-0.051239013671875,
-0.01302337646484375,
-0.05078125,
-0.00838470458984375,
0.01250457763671875,
0.05224609375,
0.02691650390625,
-0.0059356689453125,
-0.026763916015625,
-0.0207977294921875,
-0.0009946823120117188,
-0.035797119140625,
0.01541900634765625,
-0.0196685791015625,
0.00897979736328125,
0.0400390625,
0.007190704345703125,
0.00797271728515625,
0.0143890380859375,
-0.02239990234375,
-0.015838623046875,
0.038177490234375,
-0.017486572265625,
0.0278778076171875,
-0.033843994140625,
-0.0144195556640625,
0.009002685546875,
0.008026123046875,
-0.0153045654296875,
0.003086090087890625,
0.0170745849609375,
0.0024700164794921875,
0.0009822845458984375,
0.01323699951171875,
-0.032623291015625,
0.01666259765625,
0.0220184326171875,
-0.045562744140625,
0.0198211669921875,
0.0618896484375,
0.0015134811401367188,
0.0097808837890625,
-0.026031494140625,
-0.0212860107421875,
0.0275421142578125,
0.0306243896484375,
-0.011383056640625,
0.0169525146484375,
-0.04107666015625,
-0.01105499267578125,
-0.004058837890625,
-0.024169921875,
0.0007753372192382812,
0.00823974609375,
0.0138397216796875,
0.0216064453125,
0.03741455078125,
0.0221099853515625,
0.0236663818359375,
-0.007312774658203125,
0.00000947713851928711,
-0.016693115234375,
0.027740478515625,
-0.032440185546875,
0.027557373046875,
-0.00750732421875,
0.0225982666015625,
0.052490234375,
0.0115814208984375,
-0.0015010833740234375,
-0.0013904571533203125,
0.0285797119140625,
-0.00995635986328125,
-0.0102691650390625,
-0.00594329833984375,
0.0048828125,
-0.06536865234375,
-0.0106353759765625,
0.038421630859375,
0.01355743408203125,
0.0193023681640625,
-0.0031032562255859375,
0.0032329559326171875,
0.0269775390625,
-0.051177978515625,
-0.08612060546875,
-0.0771484375,
-0.00795745849609375,
-0.0065155029296875,
0.0257720947265625,
-0.0011396408081054688,
0.0081939697265625,
0.016448974609375,
0.020751953125,
0.04425048828125,
-0.0400390625,
-0.0648193359375,
-0.042999267578125,
-0.0933837890625,
-0.035736083984375,
0.0015869140625,
0.007221221923828125,
0.00799560546875,
-0.07257080078125,
-0.01128387451171875,
-0.007404327392578125,
0.017181396484375,
0.05596923828125,
0.0128936767578125,
-0.0213165283203125,
0.0055389404296875,
0.0035152435302734375,
-0.038787841796875,
0.018585205078125,
0.06573486328125,
0.033050537109375,
-0.05218505859375,
0.0160064697265625,
0.00959014892578125,
0.0050811767578125,
0.012359619140625,
-0.028350830078125,
0.0006837844848632812,
-0.0306396484375,
-0.0247039794921875,
-0.062744140625,
-0.03326416015625,
-0.005168914794921875,
-0.05596923828125,
0.00446319580078125,
0.034393310546875,
-0.01088714599609375,
-0.0015726089477539062,
-0.019500732421875,
0.01983642578125,
0.01248931884765625,
0.050201416015625,
-0.030059814453125,
0.0197601318359375,
-0.0104827880859375,
-0.0011463165283203125,
-0.0657958984375,
0.021881103515625,
-0.03326416015625,
0.052032470703125,
0.01006317138671875,
-0.0201568603515625,
-0.02203369140625,
0.0198516845703125,
-0.046600341796875,
-0.056427001953125,
0.025970458984375,
-0.05865478515625,
-0.002239227294921875,
-0.045013427734375,
0.0022449493408203125,
-0.011688232421875,
0.07891845703125,
0.0035495758056640625,
-0.01137542724609375,
-0.03302001953125,
0.0120697021484375,
-0.017425537109375,
-0.00640106201171875,
-0.00809478759765625,
0.00803375244140625,
-0.11181640625,
0.0036106109619140625,
-0.0012292861938476562,
-0.044219970703125,
0.007434844970703125,
-0.028961181640625,
-0.0511474609375,
-0.0531005859375,
0.029327392578125,
0.039276123046875,
-0.006496429443359375,
-0.006206512451171875,
-0.0114593505859375,
-0.02178955078125,
-0.0177154541015625,
0.0061798095703125,
-0.049346923828125,
-0.0203857421875,
0.00966644287109375,
0.033477783203125,
0.0012483596801757812,
-0.0182647705078125,
0.0037994384765625,
0.053009033203125,
-0.0288238525390625,
0.03985595703125,
-0.011627197265625,
-0.0010290145874023438,
0.0013551712036132812,
0.058074951171875,
0.0031280517578125,
0.012115478515625,
-0.0060882568359375,
-0.0185546875,
-0.0027599334716796875,
0.01837158203125,
-0.0302886962890625,
-0.0178375244140625,
0.01285552978515625,
-0.0291595458984375,
-0.0271453857421875,
-0.0175018310546875,
-0.0184478759765625,
0.00933837890625,
-0.022796630859375,
-0.0234832763671875,
-0.008514404296875,
-0.02484130859375,
0.036529541015625,
-0.038787841796875,
-0.00815582275390625,
-0.0018243789672851562,
0.03338623046875,
0.00506591796875,
-0.026580810546875,
0.0576171875,
0.0361328125,
0.024200439453125,
0.01140594482421875,
0.013397216796875,
-0.042144775390625,
-0.0122528076171875,
0.07586669921875,
-0.0257568359375,
-0.0031719207763671875,
0.0196990966796875,
0.0102081298828125,
0.0086212158203125,
-0.01371002197265625,
-0.011993408203125,
-0.0002918243408203125,
0.0010395050048828125,
0.04327392578125,
0.0249786376953125,
-0.0254974365234375,
0.007602691650390625,
0.0092620849609375,
0.0257415771484375,
-0.0292205810546875,
-0.0258331298828125,
-0.061920166015625,
0.01473236083984375,
0.0131988525390625,
0.050537109375,
0.036468505859375,
-0.0204925537109375,
0.0540771484375,
0.026397705078125,
-0.01255035400390625,
0.01287078857421875,
0.00496673583984375,
-0.0139617919921875,
0.01442718505859375,
0.004669189453125,
-0.0235443115234375,
-0.00896453857421875,
-0.0113067626953125,
0.051971435546875,
0.0278167724609375,
-0.0201263427734375,
0.0157623291015625,
-0.021240234375,
-0.02801513671875,
0.00676727294921875,
-0.0080108642578125,
0.01253509521484375,
-0.0128936767578125,
-0.0221099853515625,
-0.00269317626953125,
-0.003734588623046875,
-0.043426513671875,
-0.03802490234375,
0.039459228515625,
-0.01007080078125,
0.0096282958984375,
0.00379180908203125,
0.07415771484375,
-0.003955841064453125,
0.033477783203125,
-0.0009698867797851562,
0.028594970703125,
0.00507354736328125,
0.040740966796875,
0.0185089111328125,
0.00019669532775878906,
0.01137542724609375,
0.0008497238159179688,
-0.0037899017333984375,
-0.043243408203125,
-0.0157928466796875,
0.052520751953125,
0.0443115234375,
-0.015960693359375,
-0.02978515625,
0.012603759765625,
-0.0010900497436523438,
-0.003173828125,
0.0235137939453125,
0.0341796875,
-0.031005859375,
0.0030040740966796875,
0.0276641845703125,
0.00860595703125,
-0.0030574798583984375,
-0.0232086181640625,
-0.0005173683166503906,
-0.037353515625,
0.01148223876953125,
0.0264892578125,
-0.0163726806640625,
-0.01003265380859375,
-0.00473785400390625,
0.01016998291015625,
-0.0251312255859375,
0.002384185791015625,
0.00562286376953125,
0.0035247802734375,
-0.03985595703125,
-0.014312744140625,
0.041259765625,
-0.00341796875,
0.01015472412109375,
-0.0271759033203125,
-0.0075531005859375,
-0.00278472900390625,
-0.0114898681640625,
0.0672607421875,
0.015625,
-0.0263519287109375,
-0.0027313232421875,
-0.03436279296875,
-0.0172882080078125,
0.058074951171875,
-0.022064208984375,
-0.01554107666015625,
-0.04010009765625,
0.0296630859375,
0.0164031982421875,
0.042205810546875,
-0.0004096031188964844,
-0.00615692138671875,
0.0017995834350585938,
0.005672454833984375,
0.00958251953125,
-0.00844573974609375,
0.0357666015625,
-0.0162811279296875,
0.0308685302734375,
-0.0161895751953125,
0.0159149169921875,
0.01198577880859375,
-0.0229034423828125,
0.00788116455078125,
0.0004277229309082031,
-0.0296173095703125,
-0.01053619384765625,
-0.028961181640625,
0.01511383056640625,
0.075439453125,
-0.0055694580078125,
0.0050506591796875,
0.0011453628540039062,
0.01029205322265625,
-0.052734375,
-0.03350830078125,
-0.0173492431640625,
0.013763427734375,
-0.0709228515625,
0.0035877227783203125,
0.03887939453125,
-0.03802490234375,
-0.004604339599609375,
-0.03948974609375,
0.0082855224609375,
-0.0174407958984375,
0.032623291015625,
-0.0367431640625,
0.038543701171875,
0.0650634765625,
-0.0240478515625,
0.05364990234375,
0.03350830078125,
0.0179290771484375,
0.064453125,
-0.030609130859375,
0.016448974609375,
0.02001953125,
0.0242767333984375,
-0.01403045654296875,
0.0309600830078125,
0.026641845703125,
-0.006755828857421875,
0.0176239013671875,
0.0738525390625,
0.0655517578125,
-0.1083984375,
-0.0030498504638671875,
0.00551605224609375,
-0.035491943359375,
0.0038051605224609375,
-0.006008148193359375,
-0.0017862319946289062,
0.024444580078125,
-0.0089263916015625,
-0.01507568359375,
-0.03521728515625,
-0.0084686279296875,
0.0440673828125,
-0.0136871337890625,
0.011688232421875,
0.0179443359375,
0.01491546630859375,
-0.0472412109375,
0.0010099411010742188,
0.047760009765625,
0.0081024169921875,
0.003559112548828125,
-0.0227508544921875,
0.0296783447265625,
-0.049163818359375,
-0.007080078125,
0.041778564453125,
-0.03741455078125,
-0.002323150634765625,
-0.004241943359375,
-0.02532958984375,
0.0304412841796875,
0.0509033203125,
-0.0345458984375,
0.00039005279541015625,
0.032745361328125,
-0.0205841064453125,
0.09759521484375,
-0.01163482666015625,
0.0197906494140625,
-0.06103515625,
-0.0321044921875,
-0.03131103515625,
-0.0237274169921875,
-0.017333984375,
0.01000213623046875,
-0.010009765625,
0.00006264448165893555,
-0.04119873046875,
-0.003932952880859375,
0.01276397705078125,
0.0272369384765625,
0.020538330078125,
-0.007343292236328125,
0.011016845703125,
-0.028350830078125,
-0.0161895751953125,
-0.01279449462890625,
-0.036468505859375,
0.0005764961242675781,
-0.046630859375,
-0.046356201171875,
0.08905029296875,
0.0252227783203125,
0.0281829833984375,
0.04376220703125,
0.0258331298828125,
-0.058868408203125,
-0.006641387939453125,
-0.0007686614990234375,
0.031890869140625,
-0.042327880859375,
0.0108489990234375,
-0.00691986083984375,
0.020751953125,
0.0250091552734375,
0.01055145263671875,
0.0743408203125,
0.0248870849609375,
-0.0684814453125,
-0.0013666152954101562,
0.06317138671875,
0.046875,
0.0038204193115234375,
0.04443359375,
-0.04852294921875,
-0.026580810546875,
-0.005733489990234375,
-0.021209716796875,
0.010528564453125,
0.00328826904296875,
-0.060211181640625,
-0.0357666015625,
-0.0218353271484375,
-0.0584716796875,
0.01312255859375,
-0.02264404296875,
-0.05401611328125,
0.0135955810546875,
0.021636962890625,
0.00939178466796875,
-0.006191253662109375,
0.031402587890625,
0.0184173583984375,
-0.040252685546875,
0.021209716796875,
-0.050262451171875,
0.04425048828125,
0.0069122314453125,
0.005741119384765625,
-0.001392364501953125,
0.00994110107421875,
0.03546142578125,
-0.032928466796875,
-0.01552581787109375,
0.01203155517578125,
-0.01617431640625,
0.055694580078125,
0.050750732421875,
0.04229736328125,
0.007251739501953125,
-0.032562255859375,
0.03240966796875,
0.0750732421875,
-0.0313720703125,
-0.0032749176025390625,
-0.00923919677734375,
-0.031585693359375,
0.043701171875,
-0.037017822265625,
0.07513427734375,
-0.03778076171875,
-0.0780029296875,
-0.0033702850341796875,
0.01446533203125,
0.01544952392578125,
0.0214996337890625,
-0.007694244384765625,
-0.0037212371826171875,
-0.041595458984375,
0.031768798828125,
-0.058837890625,
0.007167816162109375,
0.0290679931640625,
0.060394287109375,
0.0225982666015625,
0.032379150390625,
0.0221099853515625,
-0.030975341796875,
0.0012731552124023438,
0.007526397705078125,
0.00628662109375,
0.0012664794921875,
-0.02459716796875,
-0.042755126953125,
0.057037353515625,
0.031036376953125,
0.047210693359375,
0.003925323486328125,
0.0316162109375,
0.02642822265625,
-0.0011167526245117188,
0.01354217529296875,
0.035308837890625,
-0.003143310546875,
0.038787841796875,
-0.03594970703125,
0.01849365234375,
-0.0283355712890625,
-0.0223541259765625,
-0.03265380859375,
0.01519775390625,
0.01136016845703125,
-0.0199127197265625,
0.03179931640625,
0.0023708343505859375,
-0.0265350341796875,
0.01288604736328125,
-0.001251220703125,
0.08721923828125,
0.02081298828125,
-0.011474609375,
-0.00003349781036376953,
0.0003910064697265625,
-0.03973388671875,
-0.0005064010620117188,
0.0251312255859375,
0.01296234130859375,
-0.0144500732421875,
0.0044708251953125,
0.00510406494140625,
0.00365447998046875,
0.020843505859375,
-0.01824951171875,
0.002681732177734375,
0.036376953125,
-0.006053924560546875,
-0.038848876953125,
-0.01166534423828125,
-0.01055145263671875,
0.023406982421875,
0.0187530517578125,
0.073486328125,
-0.0225982666015625,
0.0157470703125,
-0.014892578125,
-0.01367950439453125,
0.0015649795532226562,
-0.0179901123046875,
-0.01021575927734375,
0.01200103759765625,
0.007778167724609375,
-0.006496429443359375,
-0.06878662109375,
-0.00771331787109375,
0.01335906982421875,
-0.0274505615234375,
0.0209808349609375,
-0.0188751220703125,
0.0167083740234375,
-0.01898193359375,
0.01270294189453125,
-0.0498046875,
-0.0772705078125,
-0.0361328125,
0.00882720947265625,
-0.02813720703125,
-0.0181732177734375,
0.00180816650390625,
0.02642822265625,
-0.00859832763671875,
-0.06976318359375,
0.00940704345703125,
-0.07958984375,
0.0214691162109375,
0.042083740234375,
0.0406494140625,
-0.004726409912109375,
0.062042236328125,
0.0052337646484375,
0.0261688232421875,
0.0106048583984375,
0.042327880859375,
0.014801025390625,
-0.03515625,
-0.04107666015625,
-0.0292510986328125,
0.005706787109375,
-0.00992584228515625,
0.0113677978515625,
-0.042236328125,
-0.022705078125,
0.0145416259765625,
0.026214599609375,
-0.0210113525390625,
-0.02435302734375,
-0.01324462890625,
-0.0006122589111328125,
-0.0099639892578125,
-0.0187530517578125,
-0.0255584716796875,
0.01183319091796875,
0.038848876953125,
0.0055389404296875,
-0.058807373046875,
0.0357666015625,
-0.055084228515625,
0.043182373046875,
-0.01708984375,
-0.0021076202392578125,
-0.009613037109375,
0.0063018798828125,
-0.04254150390625,
-0.018798828125,
-0.056793212890625,
-0.006832122802734375,
-0.04522705078125,
-0.01043701171875,
0.0225830078125,
0.01104736328125,
-0.01253509521484375,
-0.033111572265625,
-0.038604736328125,
0.0178680419921875,
-0.03948974609375,
-0.01258087158203125,
-0.0017719268798828125,
-0.0032558441162109375,
-0.03289794921875,
-0.0070648193359375,
0.0250091552734375,
-0.038726806640625,
-0.032958984375,
-0.038543701171875,
-0.0301971435546875,
-0.048004150390625,
-0.07012939453125,
-0.056243896484375,
0.0053558349609375,
0.0152435302734375,
-0.01116943359375,
-0.036590576171875,
-0.002796173095703125,
-0.00954437255859375,
0.03662109375,
0.00469207763671875,
-0.045257568359375,
-0.0285797119140625,
0.019744873046875,
0.001369476318359375,
0.0997314453125,
-0.066650390625,
0.0361328125,
0.04986572265625,
0.09307861328125,
0.08099365234375,
-0.00182342529296875,
0.0009393692016601562,
0.01837158203125,
0.0204620361328125,
0.05670166015625,
0.0029544830322265625,
0.0189971923828125,
-0.01202392578125,
-0.055633544921875,
0.0006837844848632812,
-0.009857177734375,
-0.05499267578125,
-0.053558349609375,
0.0615234375,
-0.0072784423828125,
0.017974853515625,
0.01861572265625,
-0.048248291015625,
-0.01397705078125,
-0.018157958984375,
-0.0286407470703125,
0.0250701904296875,
-0.0635986328125,
-0.01110076904296875,
-0.02105712890625,
0.000014066696166992188,
0.032135009765625,
-0.026214599609375,
-0.005950927734375,
0.0006608963012695312,
-0.0100250244140625,
-0.0413818359375,
0.0138397216796875,
-0.0304412841796875,
0.10003662109375,
-0.053558349609375,
-0.00968170166015625,
-0.005706787109375,
0.05987548828125,
0.01425933837890625,
-0.053070068359375,
0.0261077880859375,
0.04095458984375,
-0.0302734375,
-0.01166534423828125,
0.02410888671875,
0.00032258033752441406,
-0.0205841064453125,
-0.030731201171875,
-0.004894256591796875,
0.0231781005859375,
0.005542755126953125,
0.04754638671875,
0.0120697021484375,
0.010040283203125,
0.00015401840209960938,
0.060150146484375,
-0.0092926025390625,
-0.0236053466796875,
-0.01232147216796875,
0.051544189453125,
-0.011993408203125,
-0.0068359375,
0.0137481689453125,
-0.038604736328125,
0.0037326812744140625,
0.0272979736328125,
0.044921875,
-0.0174713134765625,
0.0350341796875,
-0.003902435302734375,
0.030914306640625,
0.005214691162109375
]
|
142b8f7761e27f6d461e64349e5c8c305a559a7a | Wordpress Stackexchange
Q: How to change admin bar color scheme in MP6 / WP 3.8 front end? I need to change default color scheme for all users.
The admin bar on my site is vidibile for all users including guests.
The default black color scheme isn't beauty with my design and I would like to change it with cofee scheme. Is there any way to do this?
I already found
add_filter('get_user_option_admin_color','change_admin_color');
function change_admin_color($result) {
return 'coffee';
}
But it disable feature to choose another color scheme for users.
And first of all it work only for logged in users.
A: At the moment (3.8) color schemes do not apply to admin bar at front end at all, even if user is logged in and has non-default scheme selected.
The shortest way would probably be to force enqueue color scheme at front end:
add_action(
'wp_enqueue_scripts',
function () {
wp_enqueue_style(
'color-admin-bar',
admin_url( '/css/colors/coffee/colors.min.css' ),
array( 'admin-bar' )
);
} );
Note that core chose not to do it, so it is untested and there is risk of style incompatibilities and such.
| Q: How to change admin bar color scheme in MP6 / WP 3.8 front end? I need to change default color scheme for all users.
The admin bar on my site is vidibile for all users including guests.
The default black color scheme isn't beauty with my design and I would like to change it with cofee scheme. Is there any way to do this?
I already found
add_filter('get_user_option_admin_color','change_admin_color');
function change_admin_color($result) {
return 'coffee';
}
But it disable feature to choose another color scheme for users.
And first of all it work only for logged in users.
A: At the moment (3.8) color schemes do not apply to admin bar at front end at all, even if user is logged in and has non-default scheme selected.
The shortest way would probably be to force enqueue color scheme at front end:
add_action(
'wp_enqueue_scripts',
function () {
wp_enqueue_style(
'color-admin-bar',
admin_url( '/css/colors/coffee/colors.min.css' ),
array( 'admin-bar' )
);
} );
Note that core chose not to do it, so it is untested and there is risk of style incompatibilities and such.
A: You can setup a theme on profile update, and if it present return that from the function hooking get_user_option_admin_color otherwise return the default:
add_action('profile_update', function($user_id) {
// on profile update save the unfiltered color choice in an additional meta
$set = get_user_meta('admin_color', $user_id, true) ? : 'coffee';
update_user_meta($user_id, '_setted_admin_color', $set);
});
add_filter('get_user_option_admin_color','change_admin_color');
function change_admin_color($result) {
$color = 'coffee';
if ( is_user_logged_in() ) { // for nono logged user output default
// get the unfiltered color meta
$setted = get_user_meta( get_current_user_id(), '_setted_admin_color', true );
// if present set color to that
if ( ! empty($setted) ) $color = $setted;
}
return $color;
}
Code require PHP 5.3. Untested.
A: https://wordpress.org/plugins/admin-bar-color/ works, is light-weight, well written and on GitHub.
I had to re-save my profile once, but now my frontend admin bar color matches /wp-admin/.
| wordpress | {
"language": "en",
"length": 311,
"provenance": "stackexchange_00019.jsonl.gz:440172",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/126469"
} | [
0.010711669921875,
-0.0231781005859375,
0.006008148193359375,
-0.01312255859375,
-0.0186004638671875,
-0.0183258056640625,
0.0149078369140625,
-0.02301025390625,
-0.01259613037109375,
0.034393310546875,
0.019317626953125,
-0.009521484375,
-0.007434844970703125,
-0.017333984375,
-0.0281829833984375,
-0.023773193359375,
0.028839111328125,
-0.00470733642578125,
0.00865936279296875,
0.0048828125,
0.00260162353515625,
0.00836944580078125,
-0.0017290115356445312,
0.0212860107421875,
0.02752685546875,
-0.059844970703125,
0.044647216796875,
0.0056610107421875,
0.00910186767578125,
-0.01300811767578125,
0.0228271484375,
-0.00011843442916870117,
-0.021026611328125,
0.00560760498046875,
0.0467529296875,
0.007568359375,
0.01087188720703125,
0.01285552978515625,
0.05816650390625,
-0.0313720703125,
0.0287017822265625,
-0.003200531005859375,
0.00478363037109375,
0.054656982421875,
-0.024261474609375,
-0.043212890625,
0.052581787109375,
-0.0256500244140625,
0.0230560302734375,
-0.045684814453125,
0.00443267822265625,
0.006275177001953125,
0.01317596435546875,
-0.0311737060546875,
-0.0057220458984375,
0.021453857421875,
-0.0210723876953125,
-0.0250244140625,
0.045135498046875,
-0.0021572113037109375,
-0.01194000244140625,
-0.0523681640625,
0.0207061767578125,
-0.031768798828125,
-0.0484619140625,
-0.00725555419921875,
-0.01436614990234375,
0.005138397216796875,
-0.0802001953125,
-0.06414794921875,
0.03448486328125,
-0.0203857421875,
0.005657196044921875,
-0.0218048095703125,
-0.0128936767578125,
-0.003887176513671875,
0.00902557373046875,
0.0108184814453125,
0.00836944580078125,
-0.0144805908203125,
0.035888671875,
0.0306243896484375,
-0.0025844573974609375,
-0.04339599609375,
0.03619384765625,
-0.0099945068359375,
0.0027008056640625,
-0.016143798828125,
-0.028167724609375,
-0.0384521484375,
-0.011260986328125,
-0.004932403564453125,
-0.0587158203125,
0.0026569366455078125,
-0.01015472412109375,
-0.034210205078125,
0.00597381591796875,
-0.00791168212890625,
0.01461029052734375,
0.0024929046630859375,
-0.0005984306335449219,
-0.023834228515625,
-0.03448486328125,
-0.006572723388671875,
-0.00428009033203125,
0.006084442138671875,
-0.005802154541015625,
0.052490234375,
0.032745361328125,
0.046600341796875,
0.00885772705078125,
-0.0095977783203125,
-0.03143310546875,
-0.0305633544921875,
-0.006374359130859375,
0.01493072509765625,
-0.04840087890625,
0.031524658203125,
0.0181884765625,
0.035125732421875,
-0.02337646484375,
0.01218414306640625,
0.019012451171875,
-0.04754638671875,
-0.005481719970703125,
-0.0257720947265625,
-0.02239990234375,
-0.02947998046875,
-0.044219970703125,
-0.0008611679077148438,
-0.043731689453125,
0.0290069580078125,
0.131591796875,
0.0684814453125,
0.040771484375,
-0.0245361328125,
0.007305145263671875,
0.0138397216796875,
-0.003936767578125,
0.0174560546875,
0.0025501251220703125,
-0.0261383056640625,
-0.0025177001953125,
0.01232147216796875,
0.0159759521484375,
0.02008056640625,
0.0220794677734375,
-0.011444091796875,
-0.00946807861328125,
-0.04302978515625,
0.01934814453125,
-0.05584716796875,
-0.0107879638671875,
0.039825439453125,
-0.00849151611328125,
0.0682373046875,
0.06072998046875,
0.01540374755859375,
-0.07281494140625,
0.0006055831909179688,
0.033935546875,
-0.013763427734375,
0.006465911865234375,
0.06878662109375,
0.024688720703125,
0.039947509765625,
0.0032367706298828125,
0.006412506103515625,
0.0269775390625,
-0.04107666015625,
-0.0251922607421875,
0.01128387451171875,
0.053131103515625,
0.0240020751953125,
0.007843017578125,
0.04315185546875,
0.0177764892578125,
-0.00531768798828125,
0.0266876220703125,
-0.0103759765625,
-0.0460205078125,
-0.0396728515625,
0.039306640625,
-0.04241943359375,
-0.04083251953125,
-0.0286712646484375,
0.012786865234375,
0.0518798828125,
0.0762939453125,
0.01493072509765625,
-0.005100250244140625,
-0.04888916015625,
0.0299072265625,
-0.02618408203125,
-0.004436492919921875,
-0.0208740234375,
0.0031414031982421875,
0.0181884765625,
-0.01145172119140625,
0.004032135009765625,
-0.0033893585205078125,
-0.0231475830078125,
0.041961669921875,
-0.0221099853515625,
-0.01041412353515625,
-0.0121002197265625,
-0.01390838623046875,
0.041473388671875,
0.0260009765625,
0.031341552734375,
-0.007045745849609375,
0.004730224609375,
-0.003734588623046875,
-0.0283050537109375,
-0.0168609619140625,
0.0025482177734375,
0.00803375244140625,
0.042572021484375,
0.024505615234375,
0.0195465087890625,
0.05657958984375,
-0.039886474609375,
0.050811767578125,
-0.01239776611328125,
0.039154052734375,
0.01250457763671875,
-0.017578125,
-0.0026035308837890625,
0.07098388671875,
0.016998291015625,
0.025360107421875,
0.0040130615234375,
0.01549530029296875,
0.0513916015625,
-0.01206207275390625,
-0.0035495758056640625,
0.0174407958984375,
-0.041473388671875,
-0.00530242919921875,
0.028167724609375,
0.049072265625,
0.0139312744140625,
-0.007129669189453125,
-0.019287109375,
0.093505859375,
0.026885986328125,
0.0355224609375,
-0.04168701171875,
-0.0037860870361328125,
0.0037841796875,
-0.004550933837890625,
-0.002002716064453125,
0.033111572265625,
-0.0360107421875,
-0.00860595703125,
0.038665771484375,
-0.0083465576171875,
-0.041290283203125,
-0.005786895751953125,
0.0289306640625,
-0.00380706787109375,
-0.01531219482421875,
-0.005290985107421875,
-0.00020229816436767578,
-0.0174560546875,
-0.022796630859375,
0.00833892822265625,
-0.0012798309326171875,
-0.007175445556640625,
-0.02276611328125,
0.034210205078125,
0.0067291259765625,
-0.003551483154296875,
0.031097412109375,
0.042449951171875,
-0.0160064697265625,
-0.055877685546875,
-0.01085662841796875,
0.00913238525390625,
0.01519775390625,
-0.01412200927734375,
0.047760009765625,
-0.03912353515625,
-0.0167999267578125,
-0.0116424560546875,
-0.042022705078125,
-0.024688720703125,
-0.0010528564453125,
-0.024810791015625,
-0.02642822265625,
0.0107269287109375,
0.002490997314453125,
-0.01187896728515625,
0.005542755126953125,
0.009765625,
-0.0123291015625,
0.015777587890625,
-0.022735595703125,
0.02435302734375,
-0.031768798828125,
0.04095458984375,
0.049652099609375,
-0.0020809173583984375,
-0.002323150634765625,
-0.00888824462890625,
0.004573822021484375,
-0.01080322265625,
0.018585205078125,
-0.00494384765625,
-0.0360107421875,
0.00310516357421875,
0.025970458984375,
0.0263214111328125,
-0.048736572265625,
0.048919677734375,
0.01328277587890625,
-0.0145263671875,
0.0022563934326171875,
-0.028472900390625,
-0.006137847900390625,
-0.061065673828125,
-0.03790283203125,
-0.0401611328125,
-0.02117919921875,
-0.00469970703125,
0.04388427734375,
-0.01934814453125,
0.00849151611328125,
0.00690460205078125,
-0.0243072509765625,
-0.0261993408203125,
-0.0273590087890625,
-0.023651123046875,
-0.025238037109375,
-0.0081787109375,
-0.03680419921875,
0.00948333740234375,
0.042755126953125,
0.005634307861328125,
-0.058563232421875,
0.01250457763671875,
-0.0012798309326171875,
-0.016082763671875,
0.014312744140625,
0.020416259765625,
-0.034637451171875,
-0.030181884765625,
0.0015687942504882812,
0.0185546875,
0.0019073486328125,
-0.005260467529296875,
-0.00946807861328125,
-0.03375244140625,
-0.0242767333984375,
-0.004451751708984375,
-0.007312774658203125,
0.0216827392578125,
-0.01337432861328125,
-0.0183258056640625,
-0.0301666259765625,
0.0018177032470703125,
0.00473785400390625,
-0.036346435546875,
0.0223236083984375,
-0.0007171630859375,
-0.01555633544921875,
0.015167236328125,
-0.00896453857421875,
0.022918701171875,
-0.0041351318359375,
-0.0205841064453125,
-0.0086822509765625,
0.039031982421875,
-0.00022089481353759766,
0.01073455810546875,
-0.00921630859375,
0.00940704345703125,
-0.04107666015625,
0.01806640625,
0.0013294219970703125,
-0.013824462890625,
0.0080108642578125,
0.0016069412231445312,
0.031951904296875,
-0.032623291015625,
0.0093536376953125,
-0.05902099609375,
0.0299224853515625,
-0.045318603515625,
0.0015268325805664062,
-0.01229095458984375,
0.0626220703125,
0.00170135498046875,
0.005535125732421875,
-0.0137939453125,
-0.0055084228515625,
-0.0185699462890625,
-0.040618896484375,
-0.037628173828125,
0.01080322265625,
-0.118408203125,
-0.0172119140625,
-0.016845703125,
-0.041259765625,
-0.01323699951171875,
0.01094818115234375,
-0.065185546875,
-0.050994873046875,
0.0157470703125,
0.041778564453125,
-0.03106689453125,
-0.00017118453979492188,
-0.0275726318359375,
-0.0288238525390625,
0.0239105224609375,
-0.00006109476089477539,
-0.087646484375,
-0.029266357421875,
-0.035003662109375,
0.08978271484375,
0.042449951171875,
-0.0298919677734375,
0.00572967529296875,
0.05987548828125,
-0.0007495880126953125,
0.00978851318359375,
-0.01708984375,
0.006374359130859375,
-0.008544921875,
-0.0286865234375,
-0.0176849365234375,
-0.0199432373046875,
-0.008819580078125,
-0.01654052734375,
-0.05816650390625,
-0.0243377685546875,
-0.0224151611328125,
-0.004913330078125,
0.0279083251953125,
-0.02667236328125,
-0.041229248046875,
-0.015380859375,
0.0025768280029296875,
-0.0035724639892578125,
-0.0163116455078125,
0.01103973388671875,
-0.017181396484375,
-0.049224853515625,
0.0299224853515625,
0.03033447265625,
-0.0026683807373046875,
-0.00981903076171875,
0.01142120361328125,
0.00475311279296875,
-0.04498291015625,
0.00876617431640625,
-0.01222991943359375,
0.043701171875,
-0.0198974609375,
-0.0116729736328125,
-0.00991058349609375,
-0.046295166015625,
0.06304931640625,
-0.00238037109375,
0.0081634521484375,
0.002872467041015625,
-0.0059356689453125,
-0.0007419586181640625,
-0.045074462890625,
0.03564453125,
-0.0017108917236328125,
-0.0097198486328125,
-0.00811767578125,
-0.01486968994140625,
0.036590576171875,
-0.04144287109375,
0.0029697418212890625,
0.060791015625,
-0.0689697265625,
-0.0609130859375,
-0.00899505615234375,
0.0006070137023925781,
-0.053558349609375,
0.0127716064453125,
0.00156402587890625,
0.01294708251953125,
-0.01285552978515625,
0.0257415771484375,
-0.0283050537109375,
0.038482666015625,
0.034027099609375,
0.029205322265625,
0.0301971435546875,
0.0031585693359375,
-0.019866943359375,
0.0036144256591796875,
-0.020477294921875,
0.084716796875,
0.00829315185546875,
-0.05072021484375,
0.0066680908203125,
-0.01044464111328125,
0.044158935546875,
0.01151275634765625,
-0.0262603759765625,
0.0576171875,
0.038543701171875,
-0.005702972412109375,
-0.037109375,
-0.038330078125,
-0.0058135986328125,
-0.06585693359375,
0.03167724609375,
0.0106353759765625,
-0.004848480224609375,
-0.007434844970703125,
0.0526123046875,
0.0117340087890625,
0.0120849609375,
-0.0100555419921875,
0.001621246337890625,
-0.0177459716796875,
0.0193328857421875,
-0.012420654296875,
0.0210418701171875,
0.024688720703125,
-0.0195159912109375,
0.04974365234375,
-0.0323486328125,
0.0006361007690429688,
0.0361328125,
0.032958984375,
0.03656005859375,
-0.003448486328125,
-0.0163116455078125,
-0.0205230712890625,
0.010772705078125,
-0.0013418197631835938,
-0.052703857421875,
-0.045654296875,
0.0017385482788085938,
0.03857421875,
0.03131103515625,
-0.03936767578125,
-0.0309906005859375,
0.041656494140625,
-0.054473876953125,
0.003841400146484375,
0.01161956787109375,
-0.040130615234375,
0.0158233642578125,
0.0184326171875,
-0.0218505859375,
-0.026885986328125,
-0.012420654296875,
0.03216552734375,
0.0178070068359375,
-0.0151214599609375,
-0.03570556640625,
0.0312042236328125,
-0.00594329833984375,
0.027069091796875,
-0.0204315185546875,
-0.0205535888671875,
0.00908660888671875,
0.00231170654296875,
0.042266845703125,
0.005207061767578125,
-0.024627685546875,
-0.00818634033203125,
-0.06103515625,
-0.013336181640625,
-0.0726318359375,
-0.034271240234375,
-0.035614013671875,
0.0179901123046875,
0.01421356201171875,
0.0171051025390625,
0.01056671142578125,
-0.01276397705078125,
-0.0706787109375,
0.051666259765625,
0.07501220703125,
0.0875244140625,
-0.025848388671875,
0.0042877197265625,
0.01142120361328125,
0.0059967041015625,
-0.024261474609375,
-0.036773681640625,
-0.012176513671875,
0.024810791015625,
-0.00916290283203125,
-0.0148468017578125,
0.0098114013671875,
0.027984619140625,
-0.019500732421875,
0.004573822021484375,
0.060211181640625,
0.0110626220703125,
0.0408935546875,
-0.00820159912109375,
0.0154876708984375,
-0.039581298828125,
-0.0229339599609375,
-0.070068359375,
0.0224151611328125,
-0.0479736328125,
0.0222015380859375,
0.07061767578125,
-0.06292724609375,
-0.0234832763671875,
0.005023956298828125,
0.0005793571472167969,
0.03759765625,
0.009765625,
-0.06976318359375,
0.0212554931640625,
0.006500244140625,
-0.005237579345703125,
0.003421783447265625,
-0.03277587890625,
-0.00452423095703125,
-0.013092041015625,
-0.03204345703125,
0.043487548828125,
0.0118255615234375,
0.0025920867919921875,
-0.03009033203125,
0.03167724609375,
0.003192901611328125,
-0.0017061233520507812,
0.01885986328125,
0.0933837890625,
0.056243896484375,
-0.10882568359375,
-0.004436492919921875,
-0.0382080078125,
-0.01259613037109375,
0.05706787109375,
0.01910400390625,
-0.0421142578125,
-0.0606689453125,
0.07843017578125,
-0.074462890625,
0.004505157470703125,
0.042938232421875,
-0.020477294921875,
0.00997161865234375,
-0.005462646484375,
0.036285400390625,
-0.004314422607421875,
0.037078857421875,
-0.056182861328125,
-0.031341552734375,
-0.0155792236328125,
0.020721435546875,
-0.004638671875,
-0.0175628662109375,
-0.036895751953125,
-0.0477294921875,
-0.048370361328125,
-0.0576171875,
-0.048553466796875,
0.0117340087890625,
-0.00240325927734375,
0.017791748046875,
0.06536865234375,
-0.042816162109375,
0.037353515625,
0.04180908203125,
-0.005886077880859375,
0.06683349609375,
-0.0299224853515625,
-0.0159454345703125,
-0.008056640625,
-0.0237884521484375,
0.0087432861328125,
0.005374908447265625,
-0.022796630859375,
-0.004058837890625,
0.005641937255859375,
0.053558349609375,
-0.034423828125,
-0.011871337890625,
0.0297393798828125,
0.029327392578125,
0.004070281982421875,
0.01629638671875,
0.007297515869140625,
-0.054412841796875,
-0.037017822265625,
0.0187225341796875,
-0.04913330078125,
0.01690673828125,
0.041717529296875,
0.001232147216796875,
0.0012035369873046875,
-0.06585693359375,
0.0013551712036132812,
0.02825927734375,
-0.00803375244140625,
0.021270751953125,
0.006744384765625,
-0.018524169921875,
0.0362548828125,
0.042938232421875,
-0.00672149658203125,
-0.05389404296875,
-0.020721435546875,
-0.029449462890625,
0.045928955078125,
0.0172271728515625,
0.0215911865234375,
-0.06707763671875,
-0.0183563232421875,
0.018280029296875,
0.029815673828125,
0.0191802978515625,
0.055633544921875,
-0.02191162109375,
-0.00998687744140625,
-0.0166473388671875,
-0.044647216796875,
-0.0043182373046875,
-0.01230621337890625,
-0.03582763671875,
0.027191162109375,
0.027069091796875,
0.033416748046875,
0.0195159912109375,
0.0148773193359375,
-0.031158447265625,
0.00423431396484375,
0.05535888671875,
-0.0654296875,
-0.024505615234375,
0.0260162353515625,
-0.036163330078125,
0.0280609130859375,
0.021575927734375,
-0.031280517578125,
0.0316162109375,
-0.0131683349609375,
-0.0499267578125,
-0.0499267578125,
0.001617431640625,
-0.051513671875,
-0.03076171875,
-0.0538330078125,
0.0501708984375,
-0.0275115966796875,
0.020355224609375,
0.0013685226440429688,
0.01788330078125,
-0.0266571044921875,
0.008575439453125,
-0.01319122314453125,
0.006969451904296875,
-0.0225067138671875,
-0.0135498046875,
0.008819580078125,
-0.0008511543273925781,
0.0014801025390625,
0.00580596923828125,
0.0235443115234375,
-0.04437255859375,
-0.0087432861328125,
-0.06097412109375,
0.00018799304962158203,
0.038665771484375,
-0.0038509368896484375,
-0.0172271728515625,
-0.047698974609375,
0.0338134765625,
0.0160675048828125,
-0.043914794921875,
0.019561767578125,
0.0025424957275390625,
0.011566162109375,
0.00568389892578125,
0.0201873779296875,
0.0141754150390625,
-0.00463104248046875,
-0.0165557861328125,
0.044586181640625,
0.00679779052734375,
-0.0012369155883789062,
-0.01294708251953125,
-0.01806640625,
-0.02679443359375,
0.0163726806640625,
-0.052490234375,
-0.00020873546600341797,
0.0360107421875,
0.0216827392578125,
-0.0452880859375,
-0.052459716796875,
-0.019012451171875,
-0.0328369140625,
0.0163726806640625,
-0.02484130859375,
0.012542724609375,
-0.01416015625,
-0.01071929931640625,
0.0010662078857421875,
0.0191650390625,
0.035858154296875,
0.03265380859375,
0.0302886962890625,
0.0205078125,
0.0093536376953125,
-0.00628662109375,
0.013641357421875,
0.0180816650390625,
0.052703857421875,
-0.050079345703125,
-0.02752685546875,
0.035430908203125,
-0.01279449462890625,
-0.00205230712890625,
0.0207366943359375,
-0.022552490234375,
0.01230621337890625,
-0.01488494873046875,
-0.014495849609375,
0.0171966552734375,
-0.006816864013671875,
0.005847930908203125,
-0.00023496150970458984,
0.01099395751953125,
-0.018341064453125,
-0.04046630859375,
-0.0211944580078125,
-0.02557373046875,
0.01543426513671875,
0.0269775390625,
0.014129638671875,
0.018402099609375,
0.030181884765625,
-0.01442718505859375,
0.0413818359375,
-0.049407958984375,
-0.029998779296875,
0.0253143310546875,
-0.0023651123046875,
0.0050048828125,
0.001148223876953125,
-0.020965576171875,
0.031524658203125,
0.037445068359375,
-0.0120086669921875,
0.01015472412109375,
0.0155181884765625,
-0.00391387939453125,
-0.037506103515625,
0.0231170654296875,
-0.018310546875,
-0.04931640625,
-0.023834228515625,
0.030792236328125,
-0.005462646484375,
-0.007129669189453125,
-0.03790283203125,
0.048828125,
-0.01471710205078125,
-0.0283203125,
0.006710052490234375,
-0.05462646484375,
0.018096923828125,
0.0293121337890625,
-0.0311126708984375,
0.01129150390625,
0.023773193359375,
-0.00826263427734375,
0.014129638671875,
0.0232391357421875,
0.009613037109375,
0.005649566650390625,
0.0140228271484375,
0.055023193359375,
0.06719970703125,
0.06121826171875,
-0.01396942138671875,
0.01055145263671875,
0.09405517578125,
-0.0176849365234375,
-0.052764892578125,
0.014190673828125,
-0.0218048095703125,
0.005138397216796875,
0.006786346435546875,
0.0210418701171875,
0.0152130126953125,
-0.0269927978515625,
-0.08978271484375,
0.07073974609375,
0.036956787109375,
-0.0027713775634765625,
-0.053955078125,
0.049835205078125,
-0.06597900390625,
0.07379150390625,
0.01380157470703125,
0.00916290283203125,
0.04083251953125,
0.0697021484375,
-0.058868408203125,
-0.0122833251953125,
0.003936767578125,
-0.014495849609375,
-0.00647735595703125,
-0.040313720703125,
0.01520538330078125,
0.0289459228515625,
-0.01287078857421875,
-0.08087158203125,
-0.055267333984375,
-0.034088134765625,
-0.06512451171875,
-0.01053619384765625,
-0.0060577392578125,
0.01465606689453125,
-0.0203857421875,
-0.06182861328125,
0.00411224365234375,
-0.052337646484375,
0.007061004638671875,
-0.002513885498046875,
-0.00926971435546875,
0.0091705322265625,
-0.036865234375,
-0.044158935546875,
0.00597381591796875,
0.00644683837890625,
-0.03204345703125,
0.0150146484375,
0.019744873046875,
-0.0014104843139648438,
-0.0128326416015625,
0.0135955810546875,
-0.029876708984375,
0.01198577880859375,
-0.0003504753112792969,
0.01209259033203125,
0.0304412841796875,
0.00958251953125,
0.032684326171875,
-0.039703369140625,
0.018463134765625,
0.00205230712890625,
0.0035495758056640625,
-0.01558685302734375,
-0.006748199462890625,
-0.0015001296997070312,
0.02215576171875,
-0.0244598388671875,
-0.0877685546875,
0.005786895751953125,
-0.0221710205078125,
-0.0240325927734375,
-0.020294189453125,
-0.00806427001953125,
-0.015106201171875,
0.0845947265625,
0.0265350341796875,
0.01360321044921875,
-0.00812530517578125,
-0.03961181640625,
-0.053009033203125,
0.0186004638671875,
-0.0452880859375,
0.00980377197265625,
-0.0985107421875,
-0.031341552734375,
0.027984619140625,
-0.046539306640625,
-0.01898193359375,
0.050323486328125,
-0.052825927734375,
0.0185089111328125,
0.031463623046875,
-0.03485107421875,
-0.040985107421875,
-0.047760009765625,
0.0231781005859375,
-0.01441192626953125,
-0.01348114013671875,
0.009033203125,
0.038055419921875,
-0.0018701553344726562,
0.016082763671875,
0.0269775390625,
-0.041046142578125,
-0.015777587890625,
0.033050537109375,
0.00562286376953125,
-0.007366180419921875,
-0.037353515625,
-0.047119140625,
0.006061553955078125,
-0.006572723388671875,
-0.01374053955078125,
-0.00673675537109375,
0.024200439453125,
-0.01287841796875,
-0.019287109375,
0.01611328125,
-0.0276336669921875,
-0.00476837158203125,
-0.01453399658203125,
0.015838623046875,
-0.001178741455078125,
-0.00960540771484375,
0.040863037109375,
-0.0281982421875,
0.0197906494140625,
0.010894775390625,
0.07281494140625,
-0.030303955078125,
0.0153350830078125,
-0.0270233154296875,
0.03875732421875,
0.0073699951171875
]
|
034bf463433a2c00d7e4925ebde799230d514bf5 | Wordpress Stackexchange
Q: Multisite wordpress and subdomain URL collisions I have a multisite WordPress installed on a server using a domain, site.com and I have a subdomain setup in WordPress, so subsites are at sub1.site.com, sub2.site.com etc.
In addition to this, the main site has other services in subfolders that are not related to WordPress, such as site.com/something.
Everything is working fine, except that when a customer on a subsite uses permalinks by post name, and uses the same title as one of the main site's subfolders, it goes to the main site's subfolder; for example sub1.site.com/something goes to the same place as site.com/something.
Is there anything I can do (by editing .htaccess or httpd.conf?
Or should I just move WordPress to it's on subfolder in main site (site.com/wordpress) to prevent these URL collisions?
A: You could just prevent slugs matching existing directories. There are two filters for that.
Example, not tested:
add_filter(
'wp_unique_post_slug_is_bad_hierarchical_slug',
'prevent_directory_slugs',
10,
2
);
add_filter(
'wp_unique_post_slug_is_bad_flat_slug',
'prevent_directory_slugs',
10,
2
);
function prevent_directory_slugs( $bool, $slug )
{
return is_dir( ABSPATH . '/' . $slug );
}
| Q: Multisite wordpress and subdomain URL collisions I have a multisite WordPress installed on a server using a domain, site.com and I have a subdomain setup in WordPress, so subsites are at sub1.site.com, sub2.site.com etc.
In addition to this, the main site has other services in subfolders that are not related to WordPress, such as site.com/something.
Everything is working fine, except that when a customer on a subsite uses permalinks by post name, and uses the same title as one of the main site's subfolders, it goes to the main site's subfolder; for example sub1.site.com/something goes to the same place as site.com/something.
Is there anything I can do (by editing .htaccess or httpd.conf?
Or should I just move WordPress to it's on subfolder in main site (site.com/wordpress) to prevent these URL collisions?
A: You could just prevent slugs matching existing directories. There are two filters for that.
Example, not tested:
add_filter(
'wp_unique_post_slug_is_bad_hierarchical_slug',
'prevent_directory_slugs',
10,
2
);
add_filter(
'wp_unique_post_slug_is_bad_flat_slug',
'prevent_directory_slugs',
10,
2
);
function prevent_directory_slugs( $bool, $slug )
{
return is_dir( ABSPATH . '/' . $slug );
}
| wordpress | {
"language": "en",
"length": 177,
"provenance": "stackexchange_00019.jsonl.gz:440220",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/126643"
} | [
0.0899658203125,
0.0015316009521484375,
0.004489898681640625,
-0.0531005859375,
0.0243072509765625,
-0.035003662109375,
0.0489501953125,
-0.0239715576171875,
-0.020904541015625,
0.0079803466796875,
0.00797271728515625,
0.002902984619140625,
0.0140838623046875,
-0.0416259765625,
0.038055419921875,
-0.006927490234375,
0.00940704345703125,
-0.004558563232421875,
-0.002086639404296875,
-0.01348114013671875,
0.00077056884765625,
0.00606536865234375,
-0.01776123046875,
0.0242919921875,
0.0347900390625,
-0.039703369140625,
0.0626220703125,
-0.0340576171875,
0.016632080078125,
-0.041839599609375,
0.02850341796875,
0.0304412841796875,
0.021026611328125,
0.014678955078125,
-0.00701904296875,
0.0165252685546875,
0.0168609619140625,
-0.003452301025390625,
0.0240020751953125,
0.01416778564453125,
0.024566650390625,
-0.00984954833984375,
0.0228271484375,
0.01800537109375,
0.01483154296875,
-0.026092529296875,
-0.004909515380859375,
-0.06256103515625,
0.0139923095703125,
0.0028553009033203125,
0.004642486572265625,
0.01044464111328125,
0.01381683349609375,
0.0023593902587890625,
-0.002765655517578125,
0.00440216064453125,
0.03387451171875,
-0.00286102294921875,
0.03851318359375,
-0.0195465087890625,
-0.04010009765625,
0.00490570068359375,
0.019287109375,
-0.034515380859375,
0.00948333740234375,
-0.017364501953125,
-0.0496826171875,
0.043182373046875,
-0.0452880859375,
0.02197265625,
0.033660888671875,
-0.056304931640625,
0.026092529296875,
-0.025634765625,
-0.0188140869140625,
0.0012359619140625,
-0.0206298828125,
-0.0082244873046875,
0.04351806640625,
-0.024627685546875,
-0.0172882080078125,
-0.0518798828125,
-0.045440673828125,
-0.01953125,
-0.0011396408081054688,
0.0267333984375,
-0.016815185546875,
0.006404876708984375,
-0.030670166015625,
0.0328369140625,
-0.03375244140625,
-0.012054443359375,
0.0077056884765625,
0.0361328125,
-0.006282806396484375,
0.004444122314453125,
0.02777099609375,
0.0826416015625,
-0.00785064697265625,
-0.0017213821411132812,
0.005664825439453125,
-0.02691650390625,
-0.01317596435546875,
-0.038055419921875,
0.0222625732421875,
0.06488037109375,
0.0003376007080078125,
-0.0034942626953125,
0.04339599609375,
-0.0016536712646484375,
0.014404296875,
0.054901123046875,
-0.0030994415283203125,
-0.0295257568359375,
-0.032684326171875,
0.0205078125,
-0.0117950439453125,
-0.0137481689453125,
0.00829315185546875,
-0.005786895751953125,
0.0047149658203125,
0.035614013671875,
0.0004906654357910156,
-0.0104217529296875,
0.01328277587890625,
0.00762176513671875,
-0.018890380859375,
-0.035125732421875,
-0.0145416259765625,
-0.008209228515625,
-0.0439453125,
0.03167724609375,
0.078369140625,
0.0235443115234375,
-0.008209228515625,
-0.0148468017578125,
0.03662109375,
0.02850341796875,
-0.0116729736328125,
0.035003662109375,
-0.00852203369140625,
-0.0209808349609375,
-0.01442718505859375,
-0.0222015380859375,
0.00045752525329589844,
0.0115203857421875,
0.0006170272827148438,
0.0282440185546875,
0.02349853515625,
-0.0189056396484375,
0.0081939697265625,
-0.05023193359375,
0.044921875,
0.00128173828125,
-0.03594970703125,
-0.047576904296875,
0.0177154541015625,
-0.032989501953125,
-0.0152740478515625,
-0.052886962890625,
-0.0202178955078125,
-0.006870269775390625,
0.0445556640625,
-0.0621337890625,
-0.041290283203125,
-0.002468109130859375,
-0.039947509765625,
-0.004856109619140625,
0.003726959228515625,
-0.00933837890625,
-0.01288604736328125,
0.021209716796875,
-0.003620147705078125,
0.00304412841796875,
0.006565093994140625,
0.004085540771484375,
0.02154541015625,
0.0243377685546875,
0.01387786865234375,
0.051116943359375,
0.0338134765625,
-0.0247039794921875,
0.057159423828125,
-0.006000518798828125,
-0.0811767578125,
0.033721923828125,
0.00630950927734375,
0.061370849609375,
0.0164337158203125,
-0.00792694091796875,
0.07672119140625,
0.021942138671875,
-0.059234619140625,
0.037078857421875,
-0.03826904296875,
-0.036651611328125,
0.0260162353515625,
0.00612640380859375,
-0.0223236083984375,
0.0091705322265625,
-0.054901123046875,
-0.002971649169921875,
0.026763916015625,
0.01224517822265625,
-0.0102386474609375,
-0.00800323486328125,
-0.0084381103515625,
0.031768798828125,
0.022369384765625,
0.035064697265625,
-0.0024318695068359375,
0.00026869773864746094,
-0.0182037353515625,
0.0108642578125,
-0.0175628662109375,
-0.01007843017578125,
-0.0228424072265625,
-0.046417236328125,
-0.01885986328125,
0.00904083251953125,
-0.0270843505859375,
0.0225372314453125,
-0.059295654296875,
-0.037200927734375,
0.0190887451171875,
-0.01165008544921875,
-0.026092529296875,
-0.01324462890625,
-0.02496337890625,
0.026275634765625,
-0.06329345703125,
0.03759765625,
0.0628662109375,
0.022003173828125,
-0.047332763671875,
0.00864410400390625,
-0.009765625,
-0.0057373046875,
-0.0291900634765625,
0.03948974609375,
0.031463623046875,
0.0268096923828125,
-0.01318359375,
-0.015167236328125,
-0.01184844970703125,
-0.1004638671875,
-0.007965087890625,
-0.004619598388671875,
0.00038051605224609375,
0.039947509765625,
0.009033203125,
0.0115509033203125,
0.006938934326171875,
-0.037841796875,
-0.00864410400390625,
0.035003662109375,
-0.0244598388671875,
-0.065185546875,
0.0408935546875,
-0.0064239501953125,
0.030426025390625,
-0.003692626953125,
-0.0271453857421875,
0.0195159912109375,
-0.073486328125,
0.0196380615234375,
-0.031494140625,
-0.025146484375,
0.01214599609375,
0.0042572021484375,
0.012908935546875,
-0.0677490234375,
-0.00763702392578125,
-0.01727294921875,
0.1016845703125,
-0.0253753662109375,
-0.03778076171875,
-0.00876617431640625,
0.022796630859375,
0.0035953521728515625,
-0.042755126953125,
0.006610870361328125,
-0.0116729736328125,
-0.0042266845703125,
-0.0291595458984375,
-0.0406494140625,
0.0289306640625,
-0.0078582763671875,
-0.00853729248046875,
-0.0140838623046875,
0.003032684326171875,
0.027923583984375,
-0.04327392578125,
0.053924560546875,
0.0272064208984375,
-0.0242462158203125,
0.024505615234375,
-0.018341064453125,
0.01410675048828125,
-0.0286102294921875,
0.0181884765625,
0.0550537109375,
0.00823974609375,
-0.0308685302734375,
0.0084075927734375,
0.01421356201171875,
0.00582122802734375,
-0.00926971435546875,
-0.0208587646484375,
0.017608642578125,
-0.10784912109375,
-0.0265045166015625,
-0.0091552734375,
-0.0277862548828125,
-0.00719451904296875,
-0.040069580078125,
0.00997161865234375,
-0.020477294921875,
-0.060028076171875,
-0.0293121337890625,
-0.0220184326171875,
-0.029388427734375,
-0.0004513263702392578,
0.0289306640625,
-0.011505126953125,
-0.006473541259765625,
0.038726806640625,
0.01366424560546875,
-0.00420379638671875,
-0.02923583984375,
-0.06134033203125,
-0.037322998046875,
-0.05218505859375,
0.042510986328125,
0.003162384033203125,
0.0099334716796875,
0.01348114013671875,
-0.0079193115234375,
0.01184844970703125,
0.0192718505859375,
0.050262451171875,
0.0312042236328125,
-0.0012598037719726562,
-0.039459228515625,
-0.041534423828125,
-0.006450653076171875,
0.01003265380859375,
0.0002994537353515625,
0.042877197265625,
0.0126190185546875,
0.007244110107421875,
0.0006413459777832031,
0.01317596435546875,
-0.0012884140014648438,
0.025787353515625,
-0.004425048828125,
-0.006561279296875,
0.005176544189453125,
0.030914306640625,
-0.026641845703125,
-0.0014162063598632812,
-0.049102783203125,
-0.0355224609375,
0.043670654296875,
0.0159454345703125,
-0.01357269287109375,
0.00963592529296875,
0.0008282661437988281,
0.04620361328125,
0.01355743408203125,
0.0125732421875,
-0.0204925537109375,
0.021820068359375,
0.0052032470703125,
0.0303802490234375,
-0.04058837890625,
0.0252532958984375,
-0.0018415451049804688,
-0.01361846923828125,
-0.01125335693359375,
0.0217437744140625,
-0.0180511474609375,
0.029205322265625,
-0.06378173828125,
-0.0034694671630859375,
0.025665283203125,
-0.04150390625,
0.04278564453125,
-0.052337646484375,
-0.0145111083984375,
-0.048797607421875,
0.046051025390625,
-0.0699462890625,
-0.02069091796875,
-0.004177093505859375,
0.0159454345703125,
0.025787353515625,
-0.050140380859375,
0.00786590576171875,
-0.027984619140625,
-0.024322509765625,
-0.0163726806640625,
-0.0207061767578125,
-0.0072021484375,
0.019378662109375,
-0.00933074951171875,
0.01776123046875,
-0.036468505859375,
0.033447265625,
-0.050201416015625,
0.017364501953125,
0.01477813720703125,
0.023895263671875,
-0.045166015625,
-0.024627685546875,
-0.031219482421875,
-0.06182861328125,
-0.0212860107421875,
0.0102691650390625,
0.0360107421875,
-0.009552001953125,
-0.00623321533203125,
-0.001407623291015625,
0.057373046875,
-0.0035610198974609375,
0.025543212890625,
-0.01296234130859375,
-0.01050567626953125,
0.0192108154296875,
0.01708984375,
-0.00860595703125,
0.004055023193359375,
0.0164337158203125,
-0.025482177734375,
-0.047943115234375,
-0.01326751708984375,
-0.050201416015625,
-0.0030651092529296875,
-0.00469207763671875,
-0.030059814453125,
-0.0234375,
-0.051727294921875,
-0.0226593017578125,
0.010009765625,
-0.0200042724609375,
0.0028553009033203125,
-0.0433349609375,
-0.022613525390625,
0.031463623046875,
0.0008053779602050781,
-0.00809478759765625,
-0.00537872314453125,
0.037384033203125,
0.0212249755859375,
-0.027496337890625,
0.0016717910766601562,
-0.0014801025390625,
0.016448974609375,
-0.027984619140625,
0.04351806640625,
0.0173187255859375,
0.00255584716796875,
0.0302581787109375,
-0.0278778076171875,
-0.0096588134765625,
-0.024017333984375,
0.03839111328125,
-0.005390167236328125,
-0.0015077590942382812,
-0.005199432373046875,
-0.040771484375,
0.036956787109375,
0.031494140625,
-0.0357666015625,
-0.00994110107421875,
-0.04901123046875,
0.043914794921875,
0.016021728515625,
-0.0042877197265625,
-0.06414794921875,
-0.09185791015625,
0.025421142578125,
-0.03472900390625,
0.020782470703125,
0.006809234619140625,
0.0041656494140625,
0.072021484375,
0.0194244384765625,
-0.00949859619140625,
0.003025054931640625,
0.03875732421875,
0.0030918121337890625,
0.031494140625,
-0.0101165771484375,
-0.00814056396484375,
-0.0290374755859375,
-0.01251983642578125,
0.09326171875,
0.011993408203125,
-0.01155853271484375,
0.00567626953125,
-0.0188140869140625,
-0.022735595703125,
0.016754150390625,
-0.01049041748046875,
0.05633544921875,
0.03729248046875,
-0.037689208984375,
0.00337982177734375,
-0.0102996826171875,
-0.031951904296875,
-0.0643310546875,
0.00351715087890625,
-0.0104217529296875,
-0.0125885009765625,
0.0190582275390625,
0.0088043212890625,
0.03997802734375,
-0.01125335693359375,
-0.0118560791015625,
-0.0125274658203125,
0.0419921875,
0.013671875,
0.0186614990234375,
-0.004062652587890625,
-0.0265350341796875,
0.0246124267578125,
0.04425048828125,
-0.022735595703125,
0.006664276123046875,
0.022125244140625,
0.033172607421875,
0.0269927978515625,
0.000025451183319091797,
-0.0097198486328125,
-0.02734375,
-0.0160064697265625,
0.007045745849609375,
-0.043548583984375,
-0.043548583984375,
-0.01690673828125,
-0.02923583984375,
-0.007503509521484375,
-0.0218048095703125,
-0.0245819091796875,
-0.004364013671875,
-0.042724609375,
-0.007572174072265625,
0.0149993896484375,
-0.03717041015625,
-0.0077667236328125,
0.0034084320068359375,
0.0069427490234375,
-0.020263671875,
-0.024749755859375,
-0.038116455078125,
0.00014913082122802734,
-0.02392578125,
-0.0115203857421875,
0.032073974609375,
-0.0178375244140625,
0.01248931884765625,
-0.0262451171875,
-0.00862884521484375,
0.00719451904296875,
0.00836181640625,
0.0249176025390625,
-0.0111846923828125,
-0.07464599609375,
0.028839111328125,
-0.0271453857421875,
0.004238128662109375,
0.05645751953125,
-0.0226898193359375,
-0.039337158203125,
-0.039703369140625,
-0.006420135498046875,
-0.00833892822265625,
-0.007373809814453125,
-0.0178680419921875,
-0.033294677734375,
0.00917816162109375,
0.03631591796875,
-0.049530029296875,
-0.052490234375,
0.025726318359375,
0.044677734375,
-0.0243682861328125,
-0.01026153564453125,
0.0178680419921875,
0.07708740234375,
-0.018707275390625,
-0.018768310546875,
-0.061859130859375,
-0.0162353515625,
0.02313232421875,
-0.01971435546875,
0.0853271484375,
0.0733642578125,
0.01000213623046875,
0.00936126708984375,
-0.025787353515625,
0.0013055801391601562,
-0.0284881591796875,
0.0070343017578125,
-0.046783447265625,
0.003475189208984375,
-0.0149078369140625,
-0.0022983551025390625,
0.03411865234375,
-0.006153106689453125,
-0.0157623291015625,
0.0174102783203125,
-0.007587432861328125,
0.025909423828125,
-0.002468109130859375,
-0.034210205078125,
0.049346923828125,
0.10089111328125,
0.03594970703125,
0.06256103515625,
0.02142333984375,
0.0270538330078125,
0.01248931884765625,
-0.0241851806640625,
0.055419921875,
-0.017669677734375,
0.056396484375,
-0.006031036376953125,
-0.0024356842041015625,
0.053741455078125,
-0.032806396484375,
0.003383636474609375,
0.033966064453125,
0.038970947265625,
-0.04534912109375,
-0.0014896392822265625,
0.0037994384765625,
-0.025665283203125,
-0.0135498046875,
-0.0253753662109375,
0.0019235610961914062,
0.031524658203125,
0.01097869873046875,
-0.0230712890625,
-0.048187255859375,
-0.01044464111328125,
0.009857177734375,
-0.0009102821350097656,
0.0096282958984375,
0.033111572265625,
0.01126861572265625,
-0.00681304931640625,
-0.0222015380859375,
0.0018224716186523438,
0.00557708740234375,
-0.01482391357421875,
-0.00189208984375,
-0.0277862548828125,
-0.0260467529296875,
-0.0335693359375,
-0.01128387451171875,
-0.022918701171875,
0.008514404296875,
-0.0113983154296875,
-0.013641357421875,
0.0216522216796875,
0.01328277587890625,
-0.00946807861328125,
-0.0186920166015625,
0.0031147003173828125,
-0.030853271484375,
0.055999755859375,
0.013824462890625,
0.008026123046875,
-0.007762908935546875,
-0.0313720703125,
-0.01105499267578125,
-0.04095458984375,
0.018646240234375,
0.00034308433532714844,
0.0019435882568359375,
0.07659912109375,
-0.047454833984375,
-0.01739501953125,
0.046661376953125,
0.005207061767578125,
-0.016754150390625,
0.01190185546875,
0.03662109375,
-0.05279541015625,
-0.056365966796875,
0.0209197998046875,
-0.058380126953125,
-0.01561737060546875,
-0.0004572868347167969,
-0.0726318359375,
0.07421875,
-0.01335906982421875,
0.0755615234375,
0.043121337890625,
0.0098724365234375,
-0.029052734375,
-0.00574493408203125,
-0.035675048828125,
0.060394287109375,
0.0011301040649414062,
0.039703369140625,
-0.06304931640625,
-0.0160064697265625,
0.016754150390625,
0.035247802734375,
0.05328369140625,
0.0249481201171875,
-0.02752685546875,
-0.0023651123046875,
0.033447265625,
0.0116424560546875,
-0.0236968994140625,
0.046295166015625,
-0.02886962890625,
0.0125274658203125,
-0.0016651153564453125,
-0.064697265625,
0.003940582275390625,
-0.01198577880859375,
-0.0277557373046875,
-0.001758575439453125,
0.004329681396484375,
0.0007848739624023438,
0.00994873046875,
-0.067626953125,
-0.03564453125,
0.0240020751953125,
0.0204010009765625,
0.00958251953125,
0.0182342529296875,
0.0178680419921875,
0.00826263427734375,
-0.01148223876953125,
0.021728515625,
-0.02655029296875,
0.0462646484375,
-0.025421142578125,
-0.0377197265625,
0.020843505859375,
0.0029201507568359375,
0.00687408447265625,
0.026824951171875,
-0.0309295654296875,
0.020050048828125,
0.030914306640625,
0.0269775390625,
0.0394287109375,
0.03240966796875,
-0.027008056640625,
-0.019561767578125,
0.06787109375,
0.0479736328125,
-0.026123046875,
-0.0289306640625,
0.019622802734375,
-0.00887298583984375,
-0.0274505615234375,
-0.00864410400390625,
-0.0022106170654296875,
-0.003505706787109375,
0.0010919570922851562,
-0.03955078125,
-0.0234527587890625,
0.00676727294921875,
0.021331787109375,
-0.0213775634765625,
-0.0276031494140625,
0.03887939453125,
-0.01508331298828125,
-0.038787841796875,
-0.0085296630859375,
0.007755279541015625,
0.0841064453125,
0.0254058837890625,
0.0823974609375,
-0.0390625,
-0.042816162109375,
-0.01499176025390625,
0.035125732421875,
0.02325439453125,
-0.0022373199462890625,
-0.069091796875,
-0.069580078125,
0.0797119140625,
0.045379638671875,
0.050140380859375,
0.037506103515625,
0.055450439453125,
0.022186279296875,
-0.029937744140625,
0.00304412841796875,
0.041534423828125,
-0.026031494140625,
0.03265380859375,
-0.0259857177734375,
0.007770538330078125,
-0.0087890625,
-0.0188446044921875,
-0.02734375,
0.0014925003051757812,
0.0277252197265625,
-0.0002532005310058594,
0.005474090576171875,
0.0037593841552734375,
0.0131988525390625,
0.02874755859375,
0.042205810546875,
-0.06317138671875,
0.0360107421875,
-0.04248046875,
0.02215576171875,
-0.040008544921875,
-0.050018310546875,
0.0017709732055664062,
0.034759521484375,
-0.0233154296875,
0.0181732177734375,
0.046356201171875,
-0.024871826171875,
0.0234832763671875,
-0.0146026611328125,
0.0163726806640625,
-0.00377655029296875,
0.01404571533203125,
0.01010894775390625,
-0.0297088623046875,
-0.0106658935546875,
0.0193328857421875,
0.006763458251953125,
-0.034393310546875,
0.151123046875,
-0.065185546875,
-0.022491455078125,
0.004367828369140625,
-0.0281219482421875,
0.021728515625,
-0.006488800048828125,
0.0200042724609375,
-0.0017824172973632812,
-0.005496978759765625,
-0.006175994873046875,
-0.04327392578125,
-0.03057861328125,
0.040283203125,
-0.04864501953125,
-0.015869140625,
-0.02752685546875,
0.0278778076171875,
-0.0032138824462890625,
0.043365478515625,
-0.022064208984375,
-0.02996826171875,
-0.0823974609375,
-0.02001953125,
0.059814453125,
0.052032470703125,
-0.027801513671875,
0.043701171875,
-0.0227813720703125,
-0.034149169921875,
0.032501220703125,
-0.057037353515625,
0.0214996337890625,
0.0247650146484375,
-0.015838623046875,
-0.007724761962890625,
-0.0229644775390625,
-0.0257415771484375,
-0.0169677734375,
-0.0037250518798828125,
0.0086517333984375,
-0.006908416748046875,
-0.033050537109375,
-0.01239013671875,
-0.01543426513671875,
-0.003582000732421875,
-0.006317138671875,
-0.004375457763671875,
-0.0222320556640625,
-0.0023517608642578125,
-0.0289154052734375,
-0.0272979736328125,
-0.0360107421875,
-0.03765869140625,
0.011260986328125,
0.0264129638671875,
-0.01363372802734375,
-0.0084381103515625,
-0.0322265625,
-0.0138397216796875,
0.051849365234375,
0.0012750625610351562,
-0.032684326171875,
-0.00811767578125,
-0.02044677734375,
0.059661865234375,
0.01220703125,
0.048370361328125,
-0.027252197265625,
-0.01100921630859375,
-0.053985595703125,
-0.0161285400390625,
-0.0254058837890625,
0.03485107421875,
-0.0136260986328125,
0.0030517578125,
0.052459716796875,
-0.0157318115234375,
-0.005725860595703125,
-0.04052734375,
-0.00933837890625,
0.01104736328125,
-0.039794921875,
-0.01367950439453125,
-0.0022563934326171875,
0.001773834228515625,
-0.00901031494140625,
-0.025970458984375,
-0.002773284912109375,
-0.01142120361328125,
-0.0095977783203125,
-0.02630615234375,
-0.00696563720703125,
-0.0169830322265625,
-0.05413818359375,
-0.04339599609375,
0.07122802734375,
-0.011016845703125,
-0.0197906494140625,
-0.059906005859375,
-0.0169677734375,
0.0017633438110351562,
0.020477294921875,
-0.02642822265625,
0.0018520355224609375,
-0.04730224609375,
0.049591064453125,
0.023956298828125,
0.02069091796875,
0.0016794204711914062,
0.0254058837890625,
0.02435302734375,
0.0653076171875,
0.074951171875,
-0.026214599609375,
0.02642822265625,
-0.017913818359375,
0.04571533203125,
0.051361083984375,
-0.00951385498046875,
0.0140838623046875,
0.01267242431640625,
-0.06512451171875,
-0.018768310546875,
-0.0161285400390625,
-0.03692626953125,
-0.032928466796875,
0.10076904296875,
0.0450439453125,
0.02117919921875,
-0.00860595703125,
-0.0450439453125,
-0.029632568359375,
-0.03857421875,
0.00368499755859375,
0.053924560546875,
-0.09075927734375,
0.0139617919921875,
0.0250701904296875,
0.0153350830078125,
0.00841522216796875,
-0.03204345703125,
-0.0005636215209960938,
-0.0208282470703125,
0.0083160400390625,
-0.004398345947265625,
-0.014739990234375,
0.00003516674041748047,
-0.006443023681640625,
-0.0081329345703125,
-0.003833770751953125,
-0.0450439453125,
0.037078857421875,
-0.0253143310546875,
-0.046844482421875,
0.01025390625,
0.016845703125,
-0.041900634765625,
-0.0003314018249511719,
0.0007643699645996094,
0.006481170654296875,
-0.01580810546875,
-0.01568603515625,
-0.0265655517578125,
-0.0027008056640625,
0.0084075927734375,
-0.023895263671875,
0.0010118484497070312,
0.0181427001953125,
0.00901031494140625,
0.077880859375,
0.00823974609375,
0.0228424072265625,
0.0013685226440429688,
0.04302978515625,
-0.0133209228515625,
-0.024566650390625,
0.0025768280029296875,
-0.033233642578125,
-0.004291534423828125,
0.01142120361328125,
-0.032867431640625,
-0.049407958984375,
-0.01482391357421875,
-0.0220184326171875,
0.0182952880859375,
0.00212860107421875
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.