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
|
---|---|---|---|---|---|
f2b0602a4bc275c4e009e311ff0b38505050406e
|
Wordpress Stackexchange
Q: How to avoid wp_nav_menu() ID conflict? How do I avoid ID conflicts if I use the same menu TWICE on one page.
FIRST
wp_nav_menu( array( 'sort_column' => 'menu_order',
'theme_location'=>'menu', 'menu_class'=>'menu', 'menu_id'=>'menu' ) );
SECOND:
wp_nav_menu( array( 'sort_column' => 'menu_order',
'theme_location'=>'menu', 'menu_class'=>'menu2', 'menu_id'=>'menu2' ) );
ID conflicts are like "Duplicate ID menu-item-2456"... Any solutions?
A: The solution is not to call the same 'theme_location' more than once. Theme location is intended to represent an explicit location within the template.
Just register a separate 'theme_location' for each separate location within the template that you want to display a nav menu.
Consider your chosen 'theme_location' names to be semantic names, representing the template location of the menu. You could use 'primary' and 'secondary', or 'header' and 'footer', etc.:
<?php
function wpse55380_setup_theme() {
// Register nav menu locations
register_nav_menus( array(
'header' => 'Header Menu',
'footer' => 'Footer Menu'
) );
}
add_action( 'after_setup_theme', 'wpse55380_setup_theme' );
...or:
<?php
function wpse55380_setup_theme() {
// Register nav menu locations
register_nav_menus( array(
'primary' => 'Primary Header Menu',
'secondary' => 'Secondary Header Menu'
) );
}
add_action( 'after_setup_theme', 'wpse55380_setup_theme' );
Then, it is up to the end user to assign custom menus to each Theme Location.
|
Q: How to avoid wp_nav_menu() ID conflict? How do I avoid ID conflicts if I use the same menu TWICE on one page.
FIRST
wp_nav_menu( array( 'sort_column' => 'menu_order',
'theme_location'=>'menu', 'menu_class'=>'menu', 'menu_id'=>'menu' ) );
SECOND:
wp_nav_menu( array( 'sort_column' => 'menu_order',
'theme_location'=>'menu', 'menu_class'=>'menu2', 'menu_id'=>'menu2' ) );
ID conflicts are like "Duplicate ID menu-item-2456"... Any solutions?
A: The solution is not to call the same 'theme_location' more than once. Theme location is intended to represent an explicit location within the template.
Just register a separate 'theme_location' for each separate location within the template that you want to display a nav menu.
Consider your chosen 'theme_location' names to be semantic names, representing the template location of the menu. You could use 'primary' and 'secondary', or 'header' and 'footer', etc.:
<?php
function wpse55380_setup_theme() {
// Register nav menu locations
register_nav_menus( array(
'header' => 'Header Menu',
'footer' => 'Footer Menu'
) );
}
add_action( 'after_setup_theme', 'wpse55380_setup_theme' );
...or:
<?php
function wpse55380_setup_theme() {
// Register nav menu locations
register_nav_menus( array(
'primary' => 'Primary Header Menu',
'secondary' => 'Secondary Header Menu'
) );
}
add_action( 'after_setup_theme', 'wpse55380_setup_theme' );
Then, it is up to the end user to assign custom menus to each Theme Location.
|
wordpress
|
{
"language": "en",
"length": 197,
"provenance": "stackexchange_00019.jsonl.gz:420873",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55380"
}
|
[
0.07879638671875,
0.01122283935546875,
0.0167083740234375,
-0.016082763671875,
0.040435791015625,
-0.037322998046875,
0.058685302734375,
-0.0660400390625,
-0.0167236328125,
0.01922607421875,
-0.0182952880859375,
0.0216522216796875,
-0.0232086181640625,
-0.0153961181640625,
-0.004619598388671875,
-0.029754638671875,
0.0219268798828125,
-0.018524169921875,
0.0005135536193847656,
-0.03369140625,
0.0196533203125,
-0.031768798828125,
0.002414703369140625,
0.07330322265625,
0.03741455078125,
-0.1246337890625,
-0.004062652587890625,
0.0003025531768798828,
-0.005359649658203125,
-0.0244598388671875,
0.007537841796875,
0.048553466796875,
0.00606536865234375,
-0.0214385986328125,
0.0341796875,
-0.0159149169921875,
0.0144500732421875,
-0.0045928955078125,
0.005817413330078125,
0.01861572265625,
0.0019683837890625,
-0.0113372802734375,
0.042633056640625,
0.01776123046875,
-0.005893707275390625,
-0.031158447265625,
0.01099395751953125,
-0.0419921875,
0.007755279541015625,
-0.007289886474609375,
0.0234527587890625,
-0.03692626953125,
0.03594970703125,
0.0045166015625,
-0.03582763671875,
-0.0165557861328125,
-0.004123687744140625,
-0.03704833984375,
0.013092041015625,
0.046356201171875,
-0.0008492469787597656,
0.006778717041015625,
0.007354736328125,
-0.039825439453125,
-0.01678466796875,
0.00870513916015625,
0.0163421630859375,
0.0167083740234375,
-0.06536865234375,
-0.01366424560546875,
0.0295867919921875,
-0.0367431640625,
-0.011383056640625,
-0.00301361083984375,
-0.00821685791015625,
-0.02032470703125,
0.000023543834686279297,
-0.04052734375,
0.02587890625,
0.024871826171875,
-0.01302337646484375,
-0.01248931884765625,
-0.0384521484375,
-0.026824951171875,
0.0123291015625,
0.00792694091796875,
-0.0196075439453125,
-0.00013387203216552734,
-0.033172607421875,
-0.023834228515625,
-0.0225982666015625,
-0.0625,
0.0006718635559082031,
-0.0114898681640625,
-0.0087890625,
-0.029205322265625,
0.034088134765625,
0.10333251953125,
-0.055908203125,
0.0086212158203125,
-0.02508544921875,
-0.022796630859375,
0.04052734375,
-0.06512451171875,
0.0251312255859375,
0.07220458984375,
0.0021457672119140625,
-0.016143798828125,
0.046478271484375,
0.004993438720703125,
0.0254974365234375,
0.04254150390625,
-0.002368927001953125,
-0.05181884765625,
-0.0022373199462890625,
0.01531982421875,
-0.024383544921875,
0.0103302001953125,
0.0142822265625,
-0.0178985595703125,
-0.0153961181640625,
0.0204010009765625,
0.004032135009765625,
0.003025054931640625,
-0.0139617919921875,
-0.0011663436889648438,
0.01349639892578125,
-0.034515380859375,
-0.07916259765625,
0.03497314453125,
-0.0217437744140625,
-0.00644683837890625,
0.072021484375,
0.06524658203125,
0.01300048828125,
-0.0321044921875,
0.01480865478515625,
0.01947021484375,
-0.0034923553466796875,
-0.006725311279296875,
0.0025844573974609375,
0.0028553009033203125,
0.01384735107421875,
-0.0212860107421875,
-0.01378631591796875,
0.0028324127197265625,
0.0165557861328125,
0.01204681396484375,
0.00543975830078125,
-0.0271453857421875,
-0.0021820068359375,
-0.05035400390625,
0.01384735107421875,
0.01445770263671875,
-0.035919189453125,
-0.006282806396484375,
-0.039398193359375,
0.002353668212890625,
0.005138397216796875,
-0.01276397705078125,
-0.048797607421875,
-0.0198516845703125,
0.022064208984375,
-0.07537841796875,
-0.08380126953125,
0.0261688232421875,
-0.004924774169921875,
-0.020782470703125,
0.01517486572265625,
0.0379638671875,
0.020355224609375,
-0.0017948150634765625,
-0.03387451171875,
-0.0019683837890625,
-0.0037937164306640625,
0.000014901161193847656,
0.0182952880859375,
-0.0007090568542480469,
-0.0183868408203125,
0.02166748046875,
-0.040924072265625,
-0.0740966796875,
-0.0238494873046875,
-0.018096923828125,
-0.10406494140625,
0.0821533203125,
-0.0174713134765625,
0.09161376953125,
0.04730224609375,
-0.0142059326171875,
0.057159423828125,
-0.007572174072265625,
-0.0158538818359375,
-0.0021038055419921875,
-0.006805419921875,
-0.008392333984375,
0.0204010009765625,
0.0308990478515625,
-0.001049041748046875,
-0.02288818359375,
-0.0196380615234375,
0.00960540771484375,
0.024017333984375,
0.005157470703125,
-0.0247650146484375,
0.03521728515625,
-0.0264434814453125,
0.04595947265625,
-0.00414276123046875,
0.005016326904296875,
0.0156707763671875,
0.024627685546875,
-0.002727508544921875,
-0.0645751953125,
-0.04217529296875,
0.005176544189453125,
-0.038482666015625,
0.0091400146484375,
-0.0038204193115234375,
0.0011911392211914062,
-0.02056884765625,
-0.004581451416015625,
-0.019256591796875,
-0.0274810791015625,
0.021331787109375,
-0.0006365776062011719,
-0.035125732421875,
-0.01666259765625,
-0.01531219482421875,
-0.0043182373046875,
-0.010101318359375,
0.06744384765625,
0.038909912109375,
0.021575927734375,
-0.011627197265625,
0.02783203125,
0.043853759765625,
-0.053009033203125,
-0.0113067626953125,
0.033355712890625,
0.03125,
0.0228424072265625,
-0.021697998046875,
-0.0282135009765625,
0.014190673828125,
-0.07769775390625,
-0.01447296142578125,
-0.0034942626953125,
-0.01042938232421875,
0.033111572265625,
0.054412841796875,
0.0152435302734375,
0.00791168212890625,
-0.0233612060546875,
0.006397247314453125,
0.0243072509765625,
-0.07647705078125,
-0.05108642578125,
0.04351806640625,
-0.043212890625,
0.0171661376953125,
-0.053314208984375,
0.004734039306640625,
-0.0286865234375,
0.040863037109375,
-0.0153045654296875,
0.010955810546875,
-0.0138092041015625,
-0.044342041015625,
0.006572723388671875,
0.029632568359375,
-0.00792694091796875,
0.003204345703125,
-0.026275634765625,
-0.015106201171875,
0.00045990943908691406,
-0.0089263916015625,
0.0198822021484375,
-0.0013761520385742188,
-0.026702880859375,
-0.0274200439453125,
0.0260467529296875,
-0.058837890625,
-0.01416778564453125,
-0.019866943359375,
-0.06439208984375,
-0.01047515869140625,
0.006420135498046875,
0.0008792877197265625,
-0.000308990478515625,
0.01380157470703125,
0.02001953125,
-0.032867431640625,
0.0404052734375,
0.00335693359375,
-0.015899658203125,
0.0498046875,
0.016632080078125,
-0.02484130859375,
0.0033721923828125,
0.058074951171875,
0.024688720703125,
0.0164642333984375,
-0.038055419921875,
-0.023651123046875,
0.0072479248046875,
-0.00934600830078125,
-0.01110076904296875,
-0.033599853515625,
-0.03375244140625,
-0.0168609619140625,
0.0133056640625,
0.0079193115234375,
0.0186920166015625,
-0.0023403167724609375,
-0.03070068359375,
-0.00838470458984375,
-0.0124969482421875,
-0.037445068359375,
-0.027069091796875,
0.029449462890625,
0.01128387451171875,
0.056182861328125,
0.01358795166015625,
0.0244903564453125,
-0.06353759765625,
0.0277252197265625,
0.00988006591796875,
0.034576416015625,
-0.04302978515625,
-0.0391845703125,
-0.0330810546875,
-0.079833984375,
-0.0216827392578125,
0.022613525390625,
0.015472412109375,
0.00455474853515625,
0.005863189697265625,
0.002132415771484375,
-0.0267181396484375,
0.047515869140625,
-0.0009298324584960938,
-0.00023734569549560547,
0.0257415771484375,
0.00860595703125,
-0.018890380859375,
0.0086517333984375,
0.0143585205078125,
-0.0250396728515625,
-0.0017766952514648438,
0.0086212158203125,
-0.0389404296875,
-0.01430511474609375,
-0.01442718505859375,
0.0263824462890625,
0.017303466796875,
0.01189422607421875,
0.0250244140625,
0.040496826171875,
-0.0185699462890625,
-0.048187255859375,
-0.02557373046875,
-0.06396484375,
0.0060577392578125,
0.05120849609375,
0.0087127685546875,
0.006137847900390625,
-0.016754150390625,
0.0267333984375,
0.0087127685546875,
0.0091400146484375,
-0.024200439453125,
0.07598876953125,
0.0009584426879882812,
0.018310546875,
-0.04693603515625,
0.01788330078125,
-0.0196380615234375,
0.0157623291015625,
0.0059051513671875,
0.0044097900390625,
-0.01094818115234375,
-0.005718231201171875,
-0.043853759765625,
-0.054534912109375,
0.030853271484375,
-0.040557861328125,
0.029022216796875,
-0.037628173828125,
-0.0179443359375,
0.006717681884765625,
0.09368896484375,
-0.079345703125,
-0.0191650390625,
0.015869140625,
0.0174560546875,
0.01102447509765625,
-0.01708984375,
-0.0284881591796875,
-0.023773193359375,
-0.064208984375,
0.014129638671875,
-0.00504302978515625,
-0.03375244140625,
0.0023956298828125,
-0.024566650390625,
-0.023193359375,
-0.04443359375,
0.035858154296875,
-0.002468109130859375,
0.0211181640625,
0.04071044921875,
0.002719879150390625,
0.0203399658203125,
-0.0226593017578125,
-0.01291656494140625,
-0.06866455078125,
-0.0114288330078125,
-0.051544189453125,
0.06134033203125,
0.0161590576171875,
0.022491455078125,
-0.00946807861328125,
0.046539306640625,
0.019989013671875,
0.0562744140625,
0.01110076904296875,
0.003826141357421875,
0.0269775390625,
-0.032440185546875,
0.01139068603515625,
-0.01904296875,
0.029296875,
0.002147674560546875,
-0.08544921875,
-0.01415252685546875,
-0.0182647705078125,
0.018585205078125,
0.046051025390625,
-0.053192138671875,
-0.042327880859375,
-0.0026874542236328125,
0.038177490234375,
0.0025119781494140625,
0.034637451171875,
-0.014862060546875,
0.0251312255859375,
-0.0241851806640625,
0.0092315673828125,
-0.04669189453125,
-0.01751708984375,
0.0124359130859375,
0.0299835205078125,
0.03045654296875,
-0.0010013580322265625,
0.0027179718017578125,
0.03118896484375,
0.0338134765625,
0.0169830322265625,
0.018218994140625,
0.01446533203125,
-0.0290679931640625,
0.0175323486328125,
0.01812744140625,
-0.039703369140625,
0.03607177734375,
0.0089569091796875,
0.0181121826171875,
-0.0264892578125,
-0.005462646484375,
-0.01247406005859375,
0.004917144775390625,
-0.0021514892578125,
0.01226043701171875,
-0.042022705078125,
-0.0241241455078125,
0.05279541015625,
0.019439697265625,
0.006565093994140625,
-0.050201416015625,
0.033355712890625,
-0.0234527587890625,
0.022552490234375,
0.0802001953125,
0.047149658203125,
0.00556182861328125,
-0.005374908447265625,
0.01727294921875,
-0.01288604736328125,
0.0294647216796875,
0.006927490234375,
0.02325439453125,
0.0287322998046875,
0.006801605224609375,
-0.0186767578125,
0.0021724700927734375,
-0.014312744140625,
0.0716552734375,
0.026763916015625,
-0.001148223876953125,
-0.033721923828125,
0.00665283203125,
0.020904541015625,
-0.0266876220703125,
-0.00795745849609375,
0.039794921875,
-0.019622802734375,
0.0027256011962890625,
-0.005954742431640625,
-0.01464080810546875,
-0.07269287109375,
-0.0276641845703125,
0.0074615478515625,
0.049224853515625,
-0.0297393798828125,
0.0312042236328125,
0.0108795166015625,
0.055633544921875,
-0.00807952880859375,
-0.03546142578125,
0.0234222412109375,
0.050689697265625,
0.00823211669921875,
0.017059326171875,
-0.0132904052734375,
-0.003414154052734375,
-0.001811981201171875,
0.017333984375,
-0.006603240966796875,
0.016265869140625,
0.0164947509765625,
0.0015935897827148438,
-0.01715087890625,
-0.01555633544921875,
0.009429931640625,
-0.023956298828125,
0.014373779296875,
0.03558349609375,
-0.07269287109375,
-0.0987548828125,
-0.0238037109375,
0.041259765625,
0.0537109375,
-0.07269287109375,
0.00015151500701904297,
-0.019012451171875,
0.01593017578125,
0.0101318359375,
0.0108642578125,
-0.026519775390625,
0.022247314453125,
0.024322509765625,
-0.03326416015625,
-0.0031032562255859375,
0.0252685546875,
-0.0478515625,
-0.0226287841796875,
-0.014617919921875,
-0.0261383056640625,
0.01861572265625,
-0.056121826171875,
0.0103759765625,
-0.0227203369140625,
0.013763427734375,
-0.059417724609375,
0.01557159423828125,
0.038726806640625,
0.0458984375,
-0.052276611328125,
0.0152130126953125,
-0.045074462890625,
-0.00446319580078125,
0.00537872314453125,
-0.045623779296875,
-0.0263519287109375,
-0.03076171875,
0.01666259765625,
0.0159912109375,
-0.006504058837890625,
-0.03936767578125,
0.00749969482421875,
-0.0030117034912109375,
-0.006244659423828125,
0.007541656494140625,
-0.039398193359375,
0.03057861328125,
0.021087646484375,
-0.01105499267578125,
-0.0225982666015625,
0.022613525390625,
0.037139892578125,
-0.01093292236328125,
-0.0016231536865234375,
-0.0469970703125,
-0.0007810592651367188,
-0.01427459716796875,
-0.013885498046875,
0.03369140625,
0.06500244140625,
0.009735107421875,
0.048370361328125,
-0.02752685546875,
0.005886077880859375,
-0.002696990966796875,
-0.04010009765625,
-0.075439453125,
-0.0230712890625,
0.048736572265625,
-0.0239105224609375,
0.00540924072265625,
0.0186309814453125,
0.034881591796875,
0.005352020263671875,
-0.0305023193359375,
0.009063720703125,
0.003635406494140625,
-0.057708740234375,
0.056793212890625,
0.060333251953125,
0.035308837890625,
0.06329345703125,
-0.004638671875,
0.039459228515625,
0.0169830322265625,
0.00788116455078125,
-0.021087646484375,
0.010406494140625,
0.05377197265625,
0.0012979507446289062,
-0.007587432861328125,
0.037811279296875,
-0.022552490234375,
0.0006318092346191406,
0.0487060546875,
0.049163818359375,
-0.04840087890625,
0.000007212162017822266,
0.0245513916015625,
-0.03021240234375,
-0.0093231201171875,
0.004405975341796875,
-0.01479339599609375,
-0.012237548828125,
0.0098419189453125,
-0.0162200927734375,
-0.0245208740234375,
-0.004047393798828125,
-0.0096893310546875,
-0.01158905029296875,
-0.004940032958984375,
-0.0229339599609375,
0.00553131103515625,
-0.0004925727844238281,
-0.0020771026611328125,
-0.0036602020263671875,
0.00042700767517089844,
-0.0231475830078125,
0.0179595947265625,
-0.009002685546875,
-0.01483917236328125,
-0.047119140625,
0.01025390625,
-0.0146331787109375,
-0.010772705078125,
0.00670623779296875,
0.0009579658508300781,
0.027557373046875,
0.019805908203125,
-0.00843048095703125,
-0.0015840530395507812,
-0.0171051025390625,
0.00988006591796875,
0.04095458984375,
0.0153656005859375,
0.032440185546875,
-0.0288238525390625,
-0.0246124267578125,
0.00046324729919433594,
-0.0299224853515625,
-0.006984710693359375,
-0.01358795166015625,
0.006053924560546875,
0.1044921875,
-0.033416748046875,
-0.025634765625,
0.0182647705078125,
0.018707275390625,
-0.00841522216796875,
0.0282745361328125,
0.08123779296875,
-0.07586669921875,
-0.0858154296875,
0.062255859375,
-0.044189453125,
-0.030120849609375,
0.038360595703125,
-0.01195526123046875,
0.056915283203125,
-0.0175628662109375,
-0.032196044921875,
0.01324462890625,
0.04071044921875,
-0.012359619140625,
0.037322998046875,
-0.0218505859375,
0.062744140625,
0.021148681640625,
0.01403045654296875,
-0.034881591796875,
-0.0082244873046875,
0.00433349609375,
0.0272369384765625,
0.0182037353515625,
0.01105499267578125,
-0.0088653564453125,
0.0170745849609375,
0.04852294921875,
0.0225372314453125,
0.0007214546203613281,
0.01410675048828125,
-0.0164794921875,
-0.03607177734375,
-0.0246124267578125,
-0.01898193359375,
0.0274200439453125,
-0.0802001953125,
-0.0222930908203125,
-0.0243072509765625,
0.025177001953125,
0.031768798828125,
-0.0156097412109375,
-0.00582122802734375,
-0.0311126708984375,
-0.006103515625,
0.01039886474609375,
0.059906005859375,
0.0122833251953125,
-0.028045654296875,
-0.016448974609375,
-0.0031566619873046875,
0.0246429443359375,
-0.006988525390625,
0.0235748291015625,
-0.0024738311767578125,
-0.002620697021484375,
0.0054779052734375,
0.0084228515625,
0.024322509765625,
0.024169921875,
-0.004421234130859375,
0.040069580078125,
0.0036411285400390625,
0.0023593902587890625,
0.00759124755859375,
0.0440673828125,
-0.032440185546875,
-0.032073974609375,
0.0267486572265625,
0.020294189453125,
0.005340576171875,
-0.01428985595703125,
0.0093994140625,
-0.003574371337890625,
-0.02459716796875,
-0.02801513671875,
-0.0240020751953125,
-0.020294189453125,
-0.004665374755859375,
-0.00998687744140625,
-0.02008056640625,
0.0209197998046875,
-0.00812530517578125,
0.0029964447021484375,
0.00652313232421875,
0.033905029296875,
0.020477294921875,
-0.052154541015625,
0.043243408203125,
0.044921875,
0.062164306640625,
-0.023406982421875,
0.094482421875,
-0.0180816650390625,
-0.02532958984375,
-0.0236358642578125,
0.043487548828125,
-0.01505279541015625,
0.02801513671875,
-0.06744384765625,
-0.07000732421875,
0.02789306640625,
0.043060302734375,
-0.010711669921875,
0.02471923828125,
0.01428985595703125,
0.040130615234375,
0.01334381103515625,
-0.01739501953125,
0.0215606689453125,
-0.02667236328125,
-0.0090789794921875,
-0.0252532958984375,
-0.04559326171875,
-0.0162506103515625,
-0.016937255859375,
-0.0164642333984375,
0.0033740997314453125,
0.00041794776916503906,
0.0206756591796875,
-0.00042366981506347656,
0.00749969482421875,
0.00428009033203125,
-0.01239776611328125,
0.01027679443359375,
-0.00933837890625,
0.05181884765625,
-0.0966796875,
-0.03729248046875,
0.0011129379272460938,
-0.02020263671875,
0.05047607421875,
0.054473876953125,
-0.03411865234375,
0.024749755859375,
-0.002048492431640625,
-0.0197906494140625,
-0.01129150390625,
0.002941131591796875,
0.02288818359375,
0.0499267578125,
0.00414276123046875,
0.025543212890625,
-0.0240936279296875,
-0.00185394287109375,
0.014923095703125,
-0.00450897216796875,
0.01873779296875,
-0.00750732421875,
0.027923583984375,
0.004852294921875,
-0.0255279541015625,
0.0291290283203125,
-0.036407470703125,
-0.0176849365234375,
0.0232086181640625,
0.0109710693359375,
0.003204345703125,
-0.0163421630859375,
-0.034027099609375,
-0.01137542724609375,
0.0513916015625,
-0.049163818359375,
0.020416259765625,
-0.010009765625,
0.0178070068359375,
-0.048309326171875,
0.043243408203125,
-0.0096588134765625,
-0.0311126708984375,
-0.0247344970703125,
0.00923919677734375,
0.0396728515625,
0.082763671875,
-0.0080413818359375,
0.04132080078125,
0.02264404296875,
-0.007045745849609375,
0.0333251953125,
-0.0247650146484375,
0.048553466796875,
0.021728515625,
-0.00015747547149658203,
-0.01151275634765625,
-0.021820068359375,
-0.0240478515625,
-0.00386810302734375,
0.00876617431640625,
-0.00885772705078125,
-0.00864410400390625,
-0.04669189453125,
0.080322265625,
0.033477783203125,
0.05657958984375,
-0.0128936767578125,
0.0231781005859375,
0.039031982421875,
0.0113677978515625,
0.0154266357421875,
-0.0167388916015625,
-0.0176849365234375,
-0.019012451171875,
0.0192718505859375,
0.0246124267578125,
0.0191192626953125,
0.02325439453125,
-0.01247406005859375,
-0.016876220703125,
0.042083740234375,
0.0036411285400390625,
-0.035552978515625,
0.0017375946044921875,
-0.020782470703125,
0.052734375,
-0.0201568603515625,
0.027923583984375,
-0.0328369140625,
-0.0291595458984375,
-0.03533935546875,
-0.004787445068359375,
-0.04010009765625,
0.03564453125,
-0.00818634033203125,
-0.052734375,
-0.031829833984375,
0.01496124267578125,
-0.028778076171875,
-0.04327392578125,
-0.0203704833984375,
-0.014984130859375,
0.0225982666015625,
-0.04656982421875,
-0.02960205078125,
0.00092315673828125,
0.0244598388671875,
-0.031402587890625,
-0.005786895751953125,
-0.032745361328125,
-0.023681640625,
0.00028061866760253906,
-0.0205230712890625,
0.00003439188003540039,
-0.03912353515625,
-0.0794677734375,
0.079833984375,
-0.005802154541015625,
-0.0322265625,
-0.0305938720703125,
-0.0165863037109375,
-0.0233154296875,
0.01806640625,
-0.00995635986328125,
-0.040008544921875,
0.01361083984375,
0.068115234375,
-0.024139404296875,
0.0736083984375,
-0.0030364990234375,
-0.0269012451171875,
-0.02484130859375,
-0.0269927978515625,
-0.0380859375,
-0.01080322265625,
0.02392578125,
-0.004009246826171875,
0.0126800537109375,
0.03778076171875,
-0.019622802734375,
-0.05450439453125,
-0.026336669921875,
-0.049713134765625,
-0.020782470703125,
-0.0092926025390625,
-0.01114654541015625,
0.016845703125,
0.0657958984375,
0.049224853515625,
0.00997161865234375,
-0.053314208984375,
-0.009490966796875,
-0.0299530029296875,
-0.0265350341796875,
0.003734588623046875,
0.01099395751953125,
-0.041015625,
0.002773284912109375,
0.004871368408203125,
-0.0204620361328125,
-0.0223846435546875,
0.024444580078125,
-0.039703369140625,
-0.0006465911865234375,
0.01128387451171875,
0.00797271728515625,
-0.06195068359375,
-0.01837158203125,
-0.0015287399291992188,
-0.0113677978515625,
-0.01128387451171875,
-0.030975341796875,
0.0300445556640625,
-0.01861572265625,
-0.011322021484375,
0.045166015625,
0.00670623779296875,
-0.05657958984375,
0.00653076171875,
0.0105743408203125,
0.046844482421875,
-0.043731689453125,
-0.05328369140625,
-0.0121917724609375,
0.007732391357421875,
0.01378631591796875,
0.0013456344604492188,
-0.0308380126953125,
0.032928466796875,
0.002544403076171875,
0.028778076171875,
-0.0072174072265625,
0.08349609375,
0.01043701171875,
0.029541015625,
0.0062408447265625,
-0.0226593017578125,
0.0347900390625,
-0.02691650390625,
0.0048065185546875,
-0.01015472412109375,
-0.013153076171875,
-0.05242919921875,
0.02630615234375,
0.00759124755859375,
0.002960205078125,
0.0269622802734375
] |
2c72a75a8354e18265c45f7f5f9b7c5eaacc2dfc
|
Wordpress Stackexchange
Q: _deprecated_argument for constants i'm working on updating a theme and previously it had used a lot of php CONSTANTS to set up some options as true or false. we're going to be updating these "decisions" to use add_theme_support() instead. is it appropriate to use the _deprecated_argument() function to tell child themers that these constants are deprecated? if not, what is the best way to trigger a deprecation warning for a constant?
A: Unfortunately there is no way to trigger WP deprecation warning for PHP constants.
What I can suggest - to use your constants and "theme support" options together. First for backward compatibility, second for customization facilities. Your theme will have to rely on "theme support" options only, and keep constants only for child theme.
The trick is in the way of declaration such constants. You have to define your PHP constants based on what has been added to support by theme.
After updating your theme, you need to let people know that you don't use PHP constants any more and you will remove PHP constants in further releases. You can place such information on a site via which you distribute your theme.
|
Q: _deprecated_argument for constants i'm working on updating a theme and previously it had used a lot of php CONSTANTS to set up some options as true or false. we're going to be updating these "decisions" to use add_theme_support() instead. is it appropriate to use the _deprecated_argument() function to tell child themers that these constants are deprecated? if not, what is the best way to trigger a deprecation warning for a constant?
A: Unfortunately there is no way to trigger WP deprecation warning for PHP constants.
What I can suggest - to use your constants and "theme support" options together. First for backward compatibility, second for customization facilities. Your theme will have to rely on "theme support" options only, and keep constants only for child theme.
The trick is in the way of declaration such constants. You have to define your PHP constants based on what has been added to support by theme.
After updating your theme, you need to let people know that you don't use PHP constants any more and you will remove PHP constants in further releases. You can place such information on a site via which you distribute your theme.
|
wordpress
|
{
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:420880",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55405"
}
|
[
0.05328369140625,
0.0022430419921875,
-0.0141143798828125,
-0.08294677734375,
0.0148773193359375,
-0.0009126663208007812,
-0.00726318359375,
0.00785064697265625,
0.0516357421875,
0.007068634033203125,
0.0012559890747070312,
-0.0626220703125,
-0.019287109375,
-0.038360595703125,
-0.057708740234375,
-0.030853271484375,
0.0457763671875,
-0.0157012939453125,
0.0019044876098632812,
-0.01904296875,
0.0009984970092773438,
0.023651123046875,
-0.01806640625,
0.10980224609375,
0.0170440673828125,
-0.1019287109375,
0.07659912109375,
-0.01506805419921875,
0.034149169921875,
-0.01509857177734375,
0.014862060546875,
0.019195556640625,
-0.0038394927978515625,
0.059112548828125,
-0.027801513671875,
0.024871826171875,
0.008575439453125,
0.01219940185546875,
0.0189361572265625,
0.03363037109375,
0.00565338134765625,
-0.005168914794921875,
-0.0184173583984375,
-0.026580810546875,
-0.0176544189453125,
-0.0543212890625,
0.0230560302734375,
-0.0226287841796875,
-0.02838134765625,
0.0248870849609375,
0.01715087890625,
-0.03216552734375,
0.0237274169921875,
-0.01235198974609375,
-0.003936767578125,
-0.023681640625,
-0.02984619140625,
0.0233612060546875,
0.027862548828125,
0.00928497314453125,
-0.0228729248046875,
-0.0080108642578125,
0.0189208984375,
-0.01397705078125,
0.022003173828125,
0.025665283203125,
0.038116455078125,
0.01447296142578125,
-0.03314208984375,
0.01335906982421875,
0.0131072998046875,
-0.039398193359375,
-0.0137786865234375,
-0.0266571044921875,
0.0145721435546875,
-0.006824493408203125,
0.00960540771484375,
-0.0159149169921875,
-0.00600433349609375,
0.036285400390625,
-0.0218505859375,
-0.026214599609375,
-0.03704833984375,
-0.02978515625,
0.05303955078125,
0.0025463104248046875,
-0.0047149658203125,
-0.0029430389404296875,
-0.033172607421875,
-0.01068115234375,
-0.0267181396484375,
0.029754638671875,
-0.038543701171875,
-0.0137176513671875,
-0.01690673828125,
-0.013702392578125,
0.0196990966796875,
0.0501708984375,
-0.016937255859375,
-0.0154266357421875,
-0.0082855224609375,
-0.00791168212890625,
-0.0286407470703125,
-0.0101776123046875,
-0.01389312744140625,
0.0775146484375,
-0.0052032470703125,
0.01375579833984375,
-0.0019321441650390625,
0.032806396484375,
0.0267791748046875,
-0.061492919921875,
-0.03515625,
-0.054595947265625,
-0.039093017578125,
0.0653076171875,
-0.0218353271484375,
-0.0236358642578125,
0.00527191162109375,
0.0166168212890625,
0.012237548828125,
0.01111602783203125,
0.0038089752197265625,
-0.01288604736328125,
-0.0018053054809570312,
-0.02899169921875,
-0.03619384765625,
-0.00739288330078125,
-0.033203125,
0.07659912109375,
-0.0276336669921875,
-0.02862548828125,
0.047119140625,
0.0419921875,
0.0173187255859375,
-0.056854248046875,
0.04510498046875,
0.0301513671875,
0.005741119384765625,
0.00975799560546875,
0.027099609375,
-0.04266357421875,
-0.039581298828125,
0.034423828125,
0.023834228515625,
-0.0061798095703125,
0.01158905029296875,
0.03314208984375,
-0.002994537353515625,
-0.040252685546875,
0.07574462890625,
-0.0212554931640625,
0.0367431640625,
0.01800537109375,
-0.054473876953125,
0.00620269775390625,
-0.0029201507568359375,
-0.019287109375,
-0.0276947021484375,
-0.053558349609375,
-0.0299224853515625,
-0.04449462890625,
-0.029998779296875,
-0.052490234375,
-0.06884765625,
0.03656005859375,
0.006084442138671875,
0.004596710205078125,
0.0195465087890625,
0.019378662109375,
0.0194549560546875,
-0.04766845703125,
-0.0173492431640625,
0.0204620361328125,
0.0133056640625,
0.0253753662109375,
-0.03564453125,
0.03472900390625,
0.037200927734375,
-0.013153076171875,
-0.020263671875,
-0.043792724609375,
0.049560546875,
-0.01111602783203125,
-0.054351806640625,
0.03729248046875,
-0.01312255859375,
-0.0030536651611328125,
0.01258087158203125,
-0.01739501953125,
0.040618896484375,
0.0305633544921875,
0.0269012451171875,
0.0265350341796875,
0.00838470458984375,
-0.018310546875,
-0.0452880859375,
0.0247344970703125,
-0.038177490234375,
-0.03369140625,
0.005184173583984375,
-0.006671905517578125,
-0.004730224609375,
-0.0435791015625,
-0.09783935546875,
-0.010650634765625,
-0.045989990234375,
0.04620361328125,
-0.0116119384765625,
0.00836944580078125,
0.007495880126953125,
-0.039337158203125,
-0.028594970703125,
0.048248291015625,
-0.001010894775390625,
-0.0215301513671875,
-0.0264892578125,
0.053314208984375,
0.00418853759765625,
0.0404052734375,
0.013397216796875,
-0.013702392578125,
0.015869140625,
0.0183563232421875,
0.033050537109375,
-0.0169677734375,
-0.01201629638671875,
-0.0291290283203125,
0.0007853507995605469,
-0.005229949951171875,
-0.0049285888671875,
0.0560302734375,
0.031463623046875,
0.04034423828125,
0.01006317138671875,
0.00968170166015625,
0.021240234375,
-0.060089111328125,
-0.00200653076171875,
0.03912353515625,
0.0290985107421875,
0.041717529296875,
-0.0157623291015625,
-0.061248779296875,
0.0289154052734375,
-0.024658203125,
0.0266571044921875,
-0.054718017578125,
0.0077667236328125,
-0.0006704330444335938,
-0.0016355514526367188,
-0.03314208984375,
0.030364990234375,
0.001766204833984375,
0.0098876953125,
0.0218505859375,
0.00734710693359375,
-0.0090789794921875,
0.006839752197265625,
0.0025806427001953125,
-0.0014085769653320312,
-0.027008056640625,
-0.041046142578125,
-0.004238128662109375,
0.03851318359375,
-0.0038394927978515625,
0.0177154541015625,
0.005214691162109375,
0.01306915283203125,
-0.0006365776062011719,
-0.01190948486328125,
-0.07354736328125,
-0.00739288330078125,
0.0242462158203125,
-0.0162811279296875,
0.0205841064453125,
-0.0087127685546875,
0.001636505126953125,
-0.00429534912109375,
-0.0029697418212890625,
-0.023651123046875,
0.025146484375,
-0.0132293701171875,
-0.0167236328125,
-0.046722412109375,
-0.05242919921875,
0.0178375244140625,
0.01016998291015625,
0.04278564453125,
-0.07147216796875,
-0.03680419921875,
0.0243988037109375,
-0.044769287109375,
0.08038330078125,
0.05255126953125,
-0.076416015625,
-0.034027099609375,
-0.0357666015625,
0.0283355712890625,
-0.023284912109375,
-0.00838470458984375,
0.061920166015625,
0.01422119140625,
-0.00893402099609375,
-0.006305694580078125,
0.04937744140625,
-0.0032329559326171875,
0.0293731689453125,
0.01395416259765625,
-0.0207366943359375,
-0.0001080632209777832,
-0.004146575927734375,
0.0193634033203125,
0.03363037109375,
-0.00974273681640625,
-0.0196990966796875,
-0.029571533203125,
0.0309906005859375,
-0.0306243896484375,
0.007564544677734375,
0.046722412109375,
-0.0325927734375,
-0.006549835205078125,
-0.016082763671875,
-0.01062774658203125,
-0.0198974609375,
0.0014867782592773438,
-0.01922607421875,
0.0201263427734375,
-0.03656005859375,
-0.07720947265625,
-0.07000732421875,
-0.10009765625,
-0.005340576171875,
-0.00777435302734375,
0.034515380859375,
-0.01849365234375,
0.09857177734375,
0.0006451606750488281,
-0.009521484375,
0.00934600830078125,
-0.034149169921875,
0.006549835205078125,
-0.004123687744140625,
0.028045654296875,
-0.01042938232421875,
0.005054473876953125,
0.0013494491577148438,
0.031768798828125,
0.0271453857421875,
-0.0389404296875,
-0.0163726806640625,
-0.0118865966796875,
0.0059356689453125,
-0.020111083984375,
0.06622314453125,
0.031585693359375,
-0.0278472900390625,
-0.011962890625,
-0.05926513671875,
-0.041046142578125,
0.0280303955078125,
-0.0265655517578125,
0.04827880859375,
0.021514892578125,
-0.0226593017578125,
0.005558013916015625,
0.0232391357421875,
0.0034313201904296875,
0.00951385498046875,
0.005062103271484375,
-0.016937255859375,
0.0199127197265625,
-0.0112457275390625,
-0.013336181640625,
-0.0015048980712890625,
0.007801055908203125,
-0.031219482421875,
0.033294677734375,
0.025054931640625,
-0.00887298583984375,
0.0048370361328125,
-0.024169921875,
0.0035572052001953125,
-0.034423828125,
0.033203125,
-0.0034389495849609375,
0.01242828369140625,
-0.007297515869140625,
-0.016357421875,
-0.016265869140625,
0.048248291015625,
0.00484466552734375,
-0.0301055908203125,
-0.0333251953125,
0.00968170166015625,
-0.0121002197265625,
-0.031158447265625,
0.0246429443359375,
-0.0204620361328125,
-0.0362548828125,
0.0236053466796875,
0.0082550048828125,
-0.0091705322265625,
-0.032135009765625,
0.0239410400390625,
-0.031219482421875,
-0.021484375,
0.006565093994140625,
-0.0347900390625,
0.01239776611328125,
0.0295562744140625,
0.0017919540405273438,
0.01323699951171875,
0.01751708984375,
-0.06707763671875,
-0.063720703125,
-0.0275115966796875,
0.0016565322875976562,
0.054901123046875,
0.007457733154296875,
-0.0338134765625,
-0.0101776123046875,
0.052398681640625,
0.000911712646484375,
0.02093505859375,
0.0185546875,
0.0165863037109375,
-0.0017232894897460938,
0.019134521484375,
0.036285400390625,
-0.0109710693359375,
-0.00518798828125,
-0.0205841064453125,
-0.01088714599609375,
-0.00351715087890625,
-0.022491455078125,
-0.0135498046875,
0.0005755424499511719,
-0.019989013671875,
0.0003104209899902344,
-0.021026611328125,
-0.04290771484375,
0.0225830078125,
-0.0095977783203125,
-0.0205841064453125,
-0.029815673828125,
-0.027313232421875,
0.061004638671875,
0.00894927978515625,
0.004146575927734375,
0.00858306884765625,
0.0751953125,
0.007579803466796875,
-0.046661376953125,
-0.0484619140625,
0.01061248779296875,
0.0242462158203125,
-0.041900634765625,
0.03460693359375,
-0.0021820068359375,
-0.0126190185546875,
0.0299072265625,
-0.0352783203125,
0.016632080078125,
-0.01300811767578125,
0.00946044921875,
-0.032745361328125,
-0.06298828125,
0.044647216796875,
-0.0430908203125,
0.0266876220703125,
0.03314208984375,
0.0006031990051269531,
0.01407623291015625,
-0.0165252685546875,
0.01318359375,
0.006679534912109375,
-0.00521087646484375,
-0.016021728515625,
-0.060028076171875,
0.0269317626953125,
-0.00019156932830810547,
-0.01514434814453125,
-0.011199951171875,
0.0109405517578125,
0.01141357421875,
-0.02197265625,
0.0272216796875,
0.0283660888671875,
0.039642333984375,
-0.00620269775390625,
0.047027587890625,
0.0186614990234375,
0.0040435791015625,
-0.015655517578125,
-0.00975799560546875,
0.030059814453125,
0.00229644775390625,
-0.02606201171875,
-0.0172882080078125,
0.002044677734375,
0.0291748046875,
-0.01506805419921875,
-0.025970458984375,
0.0242156982421875,
0.047119140625,
-0.0207977294921875,
0.0171661376953125,
-0.01404571533203125,
0.005954742431640625,
-0.0229644775390625,
0.0021495819091796875,
-0.0177764892578125,
0.0038051605224609375,
0.03692626953125,
0.0031833648681640625,
-0.004669189453125,
0.0250701904296875,
-0.0116424560546875,
-0.01025390625,
0.0020694732666015625,
0.0518798828125,
0.0213470458984375,
-0.025634765625,
0.030120849609375,
0.0063018798828125,
0.036895751953125,
-0.01107025146484375,
-0.02130126953125,
0.021087646484375,
0.0210723876953125,
-0.036224365234375,
-0.0021381378173828125,
0.0010614395141601562,
-0.004360198974609375,
-0.014312744140625,
0.034271240234375,
-0.027374267578125,
-0.03985595703125,
-0.03387451171875,
-0.009613037109375,
0.04034423828125,
-0.00690460205078125,
-0.0020923614501953125,
-0.0205841064453125,
-0.047607421875,
-0.0255584716796875,
-0.0016202926635742188,
-0.035491943359375,
-0.02410888671875,
-0.007354736328125,
-0.056365966796875,
-0.019134521484375,
0.01398468017578125,
-0.06768798828125,
-0.038482666015625,
0.0005998611450195312,
-0.01078033447265625,
0.0292205810546875,
0.01363372802734375,
0.015960693359375,
-0.01447296142578125,
-0.031890869140625,
0.024078369140625,
-0.01119232177734375,
0.060455322265625,
-0.005985260009765625,
-0.03131103515625,
-0.0013437271118164062,
-0.05657958984375,
-0.026092529296875,
-0.0919189453125,
-0.06402587890625,
-0.07220458984375,
0.0159149169921875,
0.04010009765625,
0.02874755859375,
-0.0004296302795410156,
-0.01137542724609375,
-0.026824951171875,
0.0523681640625,
0.033416748046875,
0.1304931640625,
0.0049896240234375,
-0.036376953125,
0.0239410400390625,
-0.004360198974609375,
0.0235443115234375,
-0.0204315185546875,
0.0002765655517578125,
-0.032470703125,
0.02130126953125,
0.01555633544921875,
-0.011993408203125,
-0.01319122314453125,
0.00873565673828125,
-0.060577392578125,
0.01445770263671875,
-0.0218505859375,
0.0333251953125,
-0.0295867919921875,
-0.0079803466796875,
-0.02734375,
0.0200347900390625,
-0.057525634765625,
0.03021240234375,
-0.036224365234375,
-0.0017614364624023438,
0.01203155517578125,
0.0024776458740234375,
0.007106781005859375,
-0.0159759521484375,
0.0019283294677734375,
-0.01079559326171875,
0.0022449493408203125,
-0.0277557373046875,
0.046630859375,
0.10076904296875,
-0.01018524169921875,
0.039306640625,
0.0182647705078125,
-0.01175689697265625,
0.0256500244140625,
0.03887939453125,
-0.0633544921875,
-0.0261993408203125,
0.046905517578125,
0.05072021484375,
-0.0008091926574707031,
0.038848876953125,
-0.00738525390625,
-0.01554107666015625,
0.040374755859375,
0.037994384765625,
-0.052276611328125,
-0.008514404296875,
0.00902557373046875,
-0.005924224853515625,
0.004669189453125,
0.00804901123046875,
-0.01202392578125,
-0.006954193115234375,
0.01554107666015625,
-0.03350830078125,
-0.01019287109375,
0.0197296142578125,
-0.019500732421875,
-0.0115966796875,
-0.0208892822265625,
0.041168212890625,
0.0228729248046875,
-0.0252685546875,
0.04840087890625,
0.00772857666015625,
0.033782958984375,
0.00830841064453125,
0.01287078857421875,
-0.0467529296875,
-0.05865478515625,
-0.048126220703125,
-0.043975830078125,
-0.03790283203125,
-0.0252685546875,
0.0093231201171875,
0.0292816162109375,
0.006893157958984375,
0.0660400390625,
-0.004039764404296875,
-0.00328826904296875,
0.0460205078125,
-0.004108428955078125,
-0.052215576171875,
-0.036865234375,
0.033538818359375,
0.0276031494140625,
-0.08514404296875,
0.04156494140625,
-0.052978515625,
-0.02197265625,
0.0103302001953125,
0.0401611328125,
0.05517578125,
-0.04931640625,
-0.0145721435546875,
0.038543701171875,
0.005733489990234375,
-0.0012884140014648438,
-0.03118896484375,
0.030029296875,
-0.07275390625,
-0.044219970703125,
-0.0180816650390625,
-0.053497314453125,
-0.0221710205078125,
-0.037872314453125,
-0.0294952392578125,
0.054595947265625,
-0.01255035400390625,
-0.0213165283203125,
0.040252685546875,
0.027862548828125,
-0.04150390625,
-0.0018281936645507812,
0.0106658935546875,
0.0167083740234375,
-0.01432037353515625,
0.022216796875,
0.008819580078125,
-0.0009717941284179688,
0.021514892578125,
0.023162841796875,
-0.0214080810546875,
0.00464630126953125,
0.03582763671875,
0.020843505859375,
0.03179931640625,
-0.00701141357421875,
-0.02484130859375,
0.006076812744140625,
-0.00998687744140625,
-0.039337158203125,
0.011199951171875,
-0.020172119140625,
0.0245361328125,
-0.046295166015625,
0.0148162841796875,
-0.005207061767578125,
0.026123046875,
0.031036376953125,
-0.00811004638671875,
0.005245208740234375,
-0.036376953125,
-0.00566864013671875,
0.0304718017578125,
0.01016998291015625,
0.03021240234375,
-0.00485992431640625,
-0.007904052734375,
0.0236358642578125,
-0.005748748779296875,
-0.0020008087158203125,
0.0306243896484375,
-0.0193634033203125,
0.0247802734375,
0.027374267578125,
0.017608642578125,
0.00567626953125,
0.019439697265625,
0.0168304443359375,
0.039459228515625,
-0.0219879150390625,
0.039642333984375,
0.0234527587890625,
0.0238494873046875,
0.0003604888916015625,
0.060150146484375,
0.003139495849609375,
0.01558685302734375,
-0.0450439453125,
-0.039093017578125,
0.0010852813720703125,
-0.028900146484375,
0.0192108154296875,
0.007297515869140625,
0.0280609130859375,
-0.0222625732421875,
-0.0142822265625,
-0.059478759765625,
-0.011871337890625,
0.0196380615234375,
-0.00374603271484375,
0.005718231201171875,
0.061767578125,
-0.00731658935546875,
-0.0357666015625,
-0.02252197265625,
-0.03924560546875,
-0.0006489753723144531,
0.0726318359375,
0.040618896484375,
0.02984619140625,
-0.03167724609375,
-0.040740966796875,
0.0238189697265625,
0.040557861328125,
0.006488800048828125,
-0.033294677734375,
0.01019287109375,
-0.04638671875,
0.006793975830078125,
0.0190277099609375,
0.02978515625,
0.0083465576171875,
0.0163116455078125,
-0.0142669677734375,
-0.025360107421875,
0.01053619384765625,
0.042022705078125,
-0.0293121337890625,
0.0054168701171875,
-0.01268768310546875,
0.01091766357421875,
0.03692626953125,
-0.00655364990234375,
-0.01788330078125,
0.005985260009765625,
0.052490234375,
0.01029205322265625,
0.0098419189453125,
0.00643157958984375,
0.00763702392578125,
0.06317138671875,
-0.0083770751953125,
0.033294677734375,
0.03857421875,
-0.01116943359375,
-0.00905609130859375,
0.006134033203125,
0.01041412353515625,
-0.00788116455078125,
0.0173797607421875,
0.0126953125,
0.015869140625,
-0.0001232624053955078,
0.020843505859375,
-0.0234527587890625,
-0.000039577484130859375,
-0.015716552734375,
-0.004611968994140625,
0.049560546875,
0.0118560791015625,
0.03106689453125,
0.012481689453125,
0.0192718505859375,
0.0260009765625,
0.0150299072265625,
0.04449462890625,
-0.02978515625,
0.0190582275390625,
0.0197296142578125,
0.01163482666015625,
-0.0164337158203125,
-0.0062408447265625,
0.041961669921875,
-0.03363037109375,
-0.01534271240234375,
-0.01125335693359375,
-0.047882080078125,
0.0892333984375,
-0.0009784698486328125,
0.0150604248046875,
0.03680419921875,
0.02752685546875,
-0.00324249267578125,
0.0077362060546875,
-0.011199951171875,
-0.028106689453125,
-0.057586669921875,
0.0101318359375,
0.028411865234375,
-0.02252197265625,
-0.00457763671875,
0.001007080078125,
0.00902557373046875,
0.020111083984375,
-0.01409149169921875,
0.01502227783203125,
-0.011383056640625,
0.0157318115234375,
0.0287933349609375,
0.0248565673828125,
0.00786590576171875,
-0.00841522216796875,
-0.0300750732421875,
0.017913818359375,
0.005985260009765625,
0.0226898193359375,
-0.00865936279296875,
0.0253448486328125,
-0.0021953582763671875,
0.009002685546875,
0.039642333984375,
-0.044464111328125,
0.00455474853515625,
-0.00592041015625,
0.0198974609375,
0.04058837890625,
-0.05853271484375,
-0.0246124267578125,
-0.0260162353515625,
0.004657745361328125,
0.0294647216796875,
-0.01303863525390625,
-0.01520538330078125,
-0.046173095703125,
0.0360107421875,
0.05560302734375,
0.028900146484375,
-0.07666015625,
0.0428466796875,
-0.01338958740234375,
0.062255859375,
0.02117919921875,
0.0008287429809570312,
0.01241302490234375,
0.03753662109375,
-0.035614013671875,
-0.040985107421875,
-0.0220184326171875,
0.0187835693359375,
-0.032135009765625,
0.0245513916015625,
0.058013916015625,
-0.0250244140625,
-0.004032135009765625,
0.03985595703125,
0.024444580078125,
0.086669921875,
-0.04364013671875,
-0.022125244140625,
0.035125732421875,
0.00235748291015625,
-0.044891357421875,
-0.1092529296875,
0.0236358642578125,
-0.115234375,
0.0297393798828125,
0.0290374755859375,
-0.0223236083984375,
0.0199737548828125,
-0.0205535888671875,
-0.0287322998046875,
0.07110595703125,
0.0099945068359375,
-0.0193328857421875,
-0.0140228271484375,
-0.0311126708984375,
-0.01605224609375,
0.02130126953125,
0.01100921630859375,
-0.059814453125,
-0.023162841796875,
0.045135498046875,
-0.01861572265625,
0.028778076171875,
0.022308349609375,
-0.0112762451171875,
-0.02423095703125,
-0.0167388916015625,
-0.00970458984375,
-0.00298309326171875,
0.0262451171875,
-0.033355712890625,
0.04962158203125,
0.041229248046875,
-0.038543701171875,
-0.04522705078125,
-0.0165557861328125,
0.0078582763671875,
-0.02667236328125,
-0.04638671875,
0.017608642578125,
-0.0120391845703125,
0.042694091796875,
0.0060882568359375,
-0.0037212371826171875,
-0.0034961700439453125,
0.0211029052734375,
-0.031585693359375,
0.01453399658203125,
-0.00940704345703125,
-0.007656097412109375,
-0.039886474609375,
-0.025299072265625,
0.026031494140625,
-0.01551055908203125,
0.01340484619140625,
-0.0198211669921875,
-0.0340576171875,
0.0162353515625,
0.006076812744140625,
-0.00319671630859375,
-0.042388916015625,
-0.0032138824462890625,
-0.005039215087890625,
0.001338958740234375,
0.0100250244140625,
0.000644683837890625,
0.0092010498046875,
-0.0073699951171875,
0.052490234375,
0.06964111328125,
0.0182952880859375,
-0.0245513916015625,
-0.00487518310546875,
0.040496826171875,
0.04571533203125,
0.00629425048828125,
-0.0731201171875,
-0.0079803466796875,
0.029815673828125,
0.01343536376953125,
0.0323486328125,
-0.047393798828125,
0.0526123046875,
0.0167083740234375,
0.0333251953125,
-0.044342041015625,
0.01094818115234375,
-0.042755126953125,
0.04095458984375,
-0.039764404296875,
0.032318115234375,
0.007511138916015625,
-0.00952911376953125,
0.0273895263671875,
-0.02191162109375,
0.04461669921875,
-0.026611328125,
0.007709503173828125,
0.07037353515625,
-0.01348114013671875,
0.0157623291015625
] |
e0decb045ebd7297e0325ccf0bf6e70d33d8dd0a
|
Wordpress Stackexchange
Q: Setup A Default Featured Image I'm trying to setup a default fallback featured image on my website to ensure consistency with images being displayed for every post, even when an image is not embedded in the post. I've tried a number of plugins - Default Post Thumb and Default Thumb, however neither of these seemed to work. I'm using WP 3.4 and the Suffusion Theme 4.2.2 on the site which can be seen at http://www.aliveradio.net/ I'm not very capable at editing basecode and would prefer to work with plugins, however if anyone could help with code alterations I'd be happy to give it a go.
Thank-you in advance for any help you can provide.
A: One simple method is to filter post_thumbnail_html, to add in a default image link:
<?php
function wpse55748_filter_post_thumbnail_html( $html ) {
// If there is no post thumbnail,
// Return a default image
if ( '' == $html ) {
return '<img src="' . get_template_directory_uri() . '/images/default-thumbnail.png" width="150px" height="100px" class="image-size-name" />';
}
// Else, return the post thumbnail
return $html;
}
add_filter( 'post_thumbnail_html', 'wpse55748_filter_post_thumbnail_html' );
?>
You can make this filter more complex, but this should get you started.
|
Q: Setup A Default Featured Image I'm trying to setup a default fallback featured image on my website to ensure consistency with images being displayed for every post, even when an image is not embedded in the post. I've tried a number of plugins - Default Post Thumb and Default Thumb, however neither of these seemed to work. I'm using WP 3.4 and the Suffusion Theme 4.2.2 on the site which can be seen at http://www.aliveradio.net/ I'm not very capable at editing basecode and would prefer to work with plugins, however if anyone could help with code alterations I'd be happy to give it a go.
Thank-you in advance for any help you can provide.
A: One simple method is to filter post_thumbnail_html, to add in a default image link:
<?php
function wpse55748_filter_post_thumbnail_html( $html ) {
// If there is no post thumbnail,
// Return a default image
if ( '' == $html ) {
return '<img src="' . get_template_directory_uri() . '/images/default-thumbnail.png" width="150px" height="100px" class="image-size-name" />';
}
// Else, return the post thumbnail
return $html;
}
add_filter( 'post_thumbnail_html', 'wpse55748_filter_post_thumbnail_html' );
?>
You can make this filter more complex, but this should get you started.
A: while you say you'd like to use a plugin ... there is a very easy method to do what you want
basically inside your theme folder you will want to open and edit a file called single.php
you want to look for this code
the_post_thumbnail();
and replace it with this code (changing the path_to/default_image.jpg)
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail();
} else { ?>
<img src="<?php bloginfo('template_directory'); ?>/images/default-image.jpg" alt="<?php the_title(); ?>" />
<?php } ?>`
If you find your site breaks / page doesn't load then you may need to remove the the opening
<?php and closing ?>
source: http://www.wpbeginner.com/wp-themes/how-to-set-a-default-fallback-image-for-wordpress-post-thumbnails/
Hope that helps?
Cheers
Damien
A: You can use if and else statement to do this, all you need to do is to manipulate the_post_thumbnail() function.
You can do it like this
<?php if (has_post_thumbnail())
{ the_post_thumbnail();
} else {
echo '<img src='" . '/image.png' . 'alt=no image'"/>'; ?>
You can take a look at http://techlog.xyz/how-to-set-default-featured-image-if-posts-has-none/
|
wordpress
|
{
"language": "en",
"length": 352,
"provenance": "stackexchange_00019.jsonl.gz:420902",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55478"
}
|
[
0.0672607421875,
0.005130767822265625,
0.048858642578125,
-0.043365478515625,
0.038055419921875,
-0.00748443603515625,
0.083740234375,
-0.044342041015625,
0.0187530517578125,
0.00879669189453125,
-0.01548004150390625,
-0.0128936767578125,
-0.0255889892578125,
-0.0257110595703125,
-0.0290985107421875,
-0.0288848876953125,
0.036712646484375,
-0.0080718994140625,
0.0297088623046875,
-0.0007114410400390625,
0.0009374618530273438,
0.038421630859375,
-0.00122833251953125,
0.036163330078125,
-0.0185089111328125,
-0.018798828125,
0.10174560546875,
-0.0380859375,
-0.00505828857421875,
-0.018646240234375,
0.00885009765625,
-0.0219268798828125,
0.02001953125,
0.0223846435546875,
-0.0128021240234375,
0.02191162109375,
-0.0008463859558105469,
-0.0013933181762695312,
-0.01421356201171875,
0.036163330078125,
-0.008026123046875,
0.0122833251953125,
0.0179901123046875,
0.0174713134765625,
-0.01556396484375,
-0.0278167724609375,
-0.006153106689453125,
-0.039825439453125,
0.00707244873046875,
-0.03375244140625,
0.0052642822265625,
0.043243408203125,
0.02520751953125,
-0.06011962890625,
-0.01410675048828125,
-0.0089874267578125,
-0.01445770263671875,
0.033538818359375,
0.041168212890625,
-0.0024280548095703125,
-0.03070068359375,
-0.0091094970703125,
0.00914764404296875,
-0.03533935546875,
0.0185089111328125,
-0.005741119384765625,
-0.0270233154296875,
0.004364013671875,
-0.022369384765625,
0.0190887451171875,
0.0220184326171875,
-0.04254150390625,
-0.00824737548828125,
-0.040435791015625,
-0.0240020751953125,
0.03619384765625,
-0.01435089111328125,
-0.02130126953125,
0.032501220703125,
-0.0208282470703125,
0.033935546875,
-0.02996826171875,
0.0179901123046875,
0.0025997161865234375,
0.016357421875,
0.0228271484375,
0.01044464111328125,
-0.0182342529296875,
-0.027587890625,
-0.020477294921875,
-0.0169830322265625,
-0.05987548828125,
-0.02197265625,
0.028533935546875,
0.0014734268188476562,
-0.0222320556640625,
0.03741455078125,
0.045135498046875,
-0.0233612060546875,
-0.004619598388671875,
0.00412750244140625,
-0.042236328125,
0.02471923828125,
-0.04327392578125,
0.01018524169921875,
0.0210723876953125,
-0.033538818359375,
-0.0035686492919921875,
0.04742431640625,
0.04888916015625,
0.0086669921875,
-0.0019388198852539062,
0.01068115234375,
-0.01210784912109375,
-0.03955078125,
0.01209259033203125,
-0.0171661376953125,
-0.0131683349609375,
-0.003810882568359375,
-0.0137939453125,
0.01500701904296875,
0.001354217529296875,
0.03961181640625,
-0.038787841796875,
0.025115966796875,
0.006977081298828125,
-0.062286376953125,
-0.03375244140625,
-0.015716552734375,
0.019989013671875,
-0.038787841796875,
0.0276031494140625,
0.0894775390625,
0.01263427734375,
-0.006717681884765625,
-0.00754547119140625,
0.01007080078125,
-0.03387451171875,
-0.0168914794921875,
0.04107666015625,
-0.045166015625,
-0.0308074951171875,
0.01038360595703125,
-0.0382080078125,
0.0186767578125,
0.020904541015625,
0.0247650146484375,
0.01520538330078125,
-0.01446533203125,
-0.038726806640625,
0.023681640625,
-0.0275115966796875,
0.0211944580078125,
-0.01395416259765625,
0.0199127197265625,
-0.04290771484375,
0.0153656005859375,
-0.0211181640625,
0.01275634765625,
-0.031219482421875,
0.01464080810546875,
-0.005100250244140625,
-0.012481689453125,
-0.0180206298828125,
-0.03460693359375,
0.007747650146484375,
0.00514984130859375,
0.0019388198852539062,
0.01201629638671875,
0.0159759521484375,
-0.01009368896484375,
0.0288848876953125,
-0.017547607421875,
-0.00977325439453125,
-0.007251739501953125,
-0.00423431396484375,
0.002246856689453125,
0.0259552001953125,
0.026824951171875,
0.008209228515625,
-0.00981903076171875,
-0.022216796875,
0.07830810546875,
-0.0169830322265625,
-0.0631103515625,
0.006023406982421875,
-0.00152587890625,
0.01258087158203125,
0.030487060546875,
-0.004207611083984375,
0.03411865234375,
0.00506591796875,
-0.05242919921875,
-0.00887298583984375,
0.046661376953125,
-0.0072021484375,
-0.040283203125,
-0.055633544921875,
0.0228729248046875,
0.025421142578125,
0.0311431884765625,
-0.018341064453125,
0.043365478515625,
0.0047760009765625,
-0.02093505859375,
-0.00299072265625,
-0.023406982421875,
0.022552490234375,
0.0032196044921875,
0.0015420913696289062,
0.019195556640625,
-0.01502227783203125,
-0.006072998046875,
-0.00640869140625,
-0.03564453125,
0.01100921630859375,
-0.040435791015625,
-0.010345458984375,
-0.01229095458984375,
0.019073486328125,
-0.01084136962890625,
-0.0103302001953125,
-0.0305328369140625,
0.002605438232421875,
0.06951904296875,
0.041015625,
-0.04046630859375,
-0.00856781005859375,
0.0172119140625,
0.0200347900390625,
-0.0787353515625,
0.061004638671875,
-0.01031494140625,
-0.0142059326171875,
-0.02734375,
0.007564544677734375,
0.0146026611328125,
-0.053558349609375,
0.00975799560546875,
0.04974365234375,
0.03759765625,
0.05023193359375,
0.004261016845703125,
-0.01171875,
0.10064697265625,
0.0047149658203125,
0.01152801513671875,
-0.02996826171875,
-0.009552001953125,
-0.00701904296875,
0.01050567626953125,
0.000058531761169433594,
0.0241546630859375,
-0.0867919921875,
0.015869140625,
0.04327392578125,
0.0110015869140625,
0.01526641845703125,
-0.00682830810546875,
-0.0013456344604492188,
0.003246307373046875,
0.018829345703125,
-0.0288238525390625,
0.01091766357421875,
0.039215087890625,
0.007320404052734375,
0.01406097412109375,
-0.0011749267578125,
-0.0419921875,
0.0340576171875,
0.033660888671875,
-0.031829833984375,
-0.016326904296875,
0.031768798828125,
0.04766845703125,
-0.004817962646484375,
-0.0347900390625,
0.00241851806640625,
-0.006458282470703125,
0.01331329345703125,
0.0002548694610595703,
0.0238189697265625,
-0.01061248779296875,
-0.0041046142578125,
-0.0018720626831054688,
-0.031524658203125,
0.0113067626953125,
0.0113372802734375,
0.027801513671875,
-0.01314544677734375,
0.0169677734375,
0.01279449462890625,
-0.01096343994140625,
0.044281005859375,
-0.0237274169921875,
-0.0200347900390625,
-0.04345703125,
-0.05511474609375,
0.05035400390625,
-0.0701904296875,
0.0250091552734375,
0.0635986328125,
-0.05047607421875,
0.03375244140625,
-0.0026531219482421875,
0.019866943359375,
-0.010284423828125,
0.01151275634765625,
-0.0163726806640625,
-0.004329681396484375,
-0.048736572265625,
-0.002597808837890625,
0.00533294677734375,
0.035736083984375,
-0.041412353515625,
-0.041778564453125,
-0.02099609375,
-0.004795074462890625,
-0.05328369140625,
-0.0284271240234375,
-0.023895263671875,
-0.051605224609375,
0.0019140243530273438,
0.0081634521484375,
-0.0169219970703125,
-0.0139617919921875,
0.03143310546875,
0.01178741455078125,
-0.03424072265625,
-0.026611328125,
-0.06866455078125,
-0.06683349609375,
-0.066650390625,
0.00007736682891845703,
-0.007781982421875,
0.01183319091796875,
0.010986328125,
0.062286376953125,
0.024017333984375,
-0.049041748046875,
0.02630615234375,
0.032989501953125,
-0.0203094482421875,
0.0225067138671875,
-0.035888671875,
0.042205810546875,
-0.0033435821533203125,
-0.0014448165893554688,
0.0002779960632324219,
0.0390625,
-0.029449462890625,
-0.0008268356323242188,
-0.04437255859375,
-0.001953125,
-0.0302734375,
0.06524658203125,
0.05865478515625,
-0.0204010009765625,
0.017913818359375,
-0.041290283203125,
-0.025543212890625,
-0.022064208984375,
-0.04827880859375,
0.0299835205078125,
0.016082763671875,
-0.0017156600952148438,
0.0004887580871582031,
0.034576416015625,
0.005828857421875,
0.0297088623046875,
0.0667724609375,
-0.0295867919921875,
-0.00859832763671875,
-0.0173797607421875,
-0.0191802978515625,
-0.05499267578125,
-0.0069427490234375,
-0.026763916015625,
0.0299072265625,
0.0002624988555908203,
0.04718017578125,
0.0090179443359375,
-0.006435394287109375,
-0.024139404296875,
-0.039154052734375,
0.05072021484375,
-0.0228271484375,
-0.00395965576171875,
-0.024078369140625,
-0.0209197998046875,
0.0022735595703125,
0.0565185546875,
-0.0662841796875,
-0.0184783935546875,
-0.0239105224609375,
-0.0011644363403320312,
0.0645751953125,
-0.01824951171875,
0.0009431838989257812,
-0.040313720703125,
-0.0999755859375,
-0.0104522705078125,
-0.0102996826171875,
-0.049407958984375,
0.0141448974609375,
-0.047943115234375,
-0.054840087890625,
-0.054443359375,
0.0116424560546875,
-0.04266357421875,
0.0020275115966796875,
0.042724609375,
-0.050201416015625,
0.048065185546875,
-0.035247802734375,
-0.03521728515625,
-0.07501220703125,
-0.0176544189453125,
-0.0193023681640625,
0.05950927734375,
0.007328033447265625,
0.01531219482421875,
-0.04779052734375,
0.033050537109375,
-0.01390838623046875,
0.019256591796875,
-0.004840850830078125,
0.0305633544921875,
0.01432037353515625,
-0.0443115234375,
-0.0118408203125,
-0.032440185546875,
-0.00254058837890625,
-0.04107666015625,
-0.039459228515625,
0.001995086669921875,
-0.01708984375,
0.0635986328125,
-0.004566192626953125,
-0.0120086669921875,
-0.035003662109375,
-0.00907135009765625,
0.05780029296875,
0.040374755859375,
0.031463623046875,
-0.0147857666015625,
-0.039520263671875,
-0.032073974609375,
0.038116455078125,
-0.004512786865234375,
0.0096435546875,
0.002872467041015625,
0.032867431640625,
0.005504608154296875,
-0.0225982666015625,
-0.01654052734375,
0.0390625,
0.014678955078125,
0.005832672119140625,
0.05828857421875,
0.021697998046875,
0.00873565673828125,
0.0157928466796875,
-0.018310546875,
0.0130615234375,
-0.04791259765625,
0.044708251953125,
0.0097808837890625,
0.0025196075439453125,
0.00983428955078125,
0.018951416015625,
0.0323486328125,
0.022796630859375,
-0.032257080078125,
0.006771087646484375,
-0.006435394287109375,
0.017669677734375,
-0.0084075927734375,
-0.0252838134765625,
-0.04833984375,
0.022247314453125,
-0.01386260986328125,
-0.0092620849609375,
0.07757568359375,
0.0311431884765625,
-0.00907135009765625,
0.006122589111328125,
0.0277557373046875,
0.036102294921875,
-0.0168304443359375,
-0.00858306884765625,
0.0386962890625,
0.0762939453125,
0.0029544830322265625,
0.0753173828125,
-0.026153564453125,
0.0032138824462890625,
0.02099609375,
-0.02239990234375,
-0.033416748046875,
-0.060882568359375,
0.0013284683227539062,
0.0160064697265625,
-0.0010223388671875,
-0.0301513671875,
0.034515380859375,
0.0305023193359375,
-0.05023193359375,
-0.0106964111328125,
-0.04461669921875,
0.0014486312866210938,
-0.0687255859375,
0.00679779052734375,
0.00563812255859375,
-0.000438690185546875,
0.042449951171875,
0.0205230712890625,
0.029815673828125,
0.0303955078125,
-0.0260009765625,
0.005764007568359375,
-0.004528045654296875,
0.025909423828125,
0.006893157958984375,
0.00795745849609375,
-0.017303466796875,
0.0516357421875,
0.0401611328125,
-0.00975799560546875,
-0.0220184326171875,
-0.004619598388671875,
0.03485107421875,
-0.054901123046875,
0.0034885406494140625,
0.034423828125,
-0.01079559326171875,
-0.00772857666015625,
-0.006256103515625,
-0.0310821533203125,
-0.0743408203125,
0.004302978515625,
0.0312347412109375,
0.007274627685546875,
-0.040069580078125,
-0.041961669921875,
0.005565643310546875,
0.006778717041015625,
0.032135009765625,
0.0018014907836914062,
-0.035400390625,
0.058349609375,
0.051666259765625,
-0.0095367431640625,
-0.0253448486328125,
-0.0311126708984375,
0.01222991943359375,
-0.00406646728515625,
-0.017547607421875,
-0.015411376953125,
0.056365966796875,
-0.045623779296875,
0.01216888427734375,
0.0257415771484375,
-0.0171356201171875,
-0.016387939453125,
0.0247039794921875,
0.0153045654296875,
0.01328277587890625,
-0.051239013671875,
0.00426483154296875,
-0.06658935546875,
-0.011871337890625,
0.0313720703125,
-0.0171356201171875,
-0.0362548828125,
-0.027313232421875,
0.04058837890625,
0.0235137939453125,
0.021240234375,
-0.01291656494140625,
-0.0017766952514648438,
-0.0038280487060546875,
0.0092926025390625,
0.0311431884765625,
-0.0022678375244140625,
0.01183319091796875,
-0.01474761962890625,
0.0255584716796875,
-0.01271820068359375,
-0.0246124267578125,
-0.009918212890625,
-0.01026153564453125,
-0.00394439697265625,
-0.0623779296875,
0.0010547637939453125,
0.01003265380859375,
-0.0650634765625,
0.0234375,
0.05145263671875,
0.01202392578125,
-0.0182647705078125,
-0.0204315185546875,
-0.01279449462890625,
-0.0150299072265625,
0.036407470703125,
0.0076751708984375,
-0.030059814453125,
0.0232696533203125,
-0.029144287109375,
0.0159454345703125,
-0.033355712890625,
0.035919189453125,
-0.01166534423828125,
-0.059722900390625,
-0.0265655517578125,
0.06488037109375,
-0.034912109375,
0.036956787109375,
0.0714111328125,
0.0231475830078125,
0.0333251953125,
0.00933074951171875,
-0.0040435791015625,
-0.0119171142578125,
0.0131072998046875,
-0.03424072265625,
-0.0518798828125,
0.03619384765625,
0.019012451171875,
-0.0280914306640625,
0.0546875,
-0.032745361328125,
0.0254669189453125,
-0.0262908935546875,
0.0164337158203125,
0.0257720947265625,
0.023406982421875,
0.0159912109375,
-0.04638671875,
0.00984954833984375,
-0.00580596923828125,
-0.0187530517578125,
0.013397216796875,
0.05059814453125,
-0.031829833984375,
-0.0289154052734375,
0.019622802734375,
0.012481689453125,
-0.00724029541015625,
0.016815185546875,
-0.0133209228515625,
0.0005135536193847656,
-0.042022705078125,
-0.025848388671875,
0.0211944580078125,
-0.0229949951171875,
0.017486572265625,
0.039337158203125,
-0.033721923828125,
-0.012359619140625,
-0.04119873046875,
-0.0323486328125,
-0.00485992431640625,
-0.042755126953125,
0.0665283203125,
-0.0205535888671875,
0.0096893310546875,
0.026031494140625,
-0.011749267578125,
0.04095458984375,
-0.004810333251953125,
-0.0411376953125,
0.00337982177734375,
0.0121002197265625,
0.03717041015625,
0.01910400390625,
-0.02093505859375,
0.0189361572265625,
-0.034149169921875,
-0.0077362060546875,
-0.002216339111328125,
-0.023651123046875,
0.0740966796875,
-0.00034546852111816406,
-0.0447998046875,
-0.0031261444091796875,
0.01180267333984375,
0.00308990478515625,
-0.00007969141006469727,
0.006099700927734375,
-0.0191192626953125,
-0.0290374755859375,
-0.02203369140625,
-0.058807373046875,
0.0038166046142578125,
-0.021484375,
-0.07781982421875,
0.0604248046875,
-0.036834716796875,
0.052825927734375,
-0.015533447265625,
0.01165008544921875,
0.01506805419921875,
-0.0113372802734375,
-0.01155853271484375,
0.0168304443359375,
-0.0231475830078125,
0.038238525390625,
0.0032215118408203125,
0.01503753662109375,
0.021026611328125,
0.0250244140625,
0.04296875,
0.012298583984375,
-0.032958984375,
-0.006275177001953125,
0.0513916015625,
0.019439697265625,
0.00017774105072021484,
0.0357666015625,
-0.03399658203125,
0.0035552978515625,
-0.022186279296875,
-0.0440673828125,
0.024688720703125,
-0.030853271484375,
-0.045654296875,
-0.01447296142578125,
0.0182952880859375,
0.0229034423828125,
0.02349853515625,
0.0384521484375,
-0.03338623046875,
0.0113067626953125,
0.0535888671875,
-0.055816650390625,
0.014862060546875,
0.058837890625,
0.049896240234375,
-0.0216064453125,
-0.055145263671875,
-0.00875091552734375,
0.048187255859375,
0.015350341796875,
-0.01366424560546875,
0.054473876953125,
0.0150146484375,
-0.0026454925537109375,
-0.01410675048828125,
0.0031871795654296875,
-0.00843048095703125,
0.01154327392578125,
0.0302886962890625,
-0.0018587112426757812,
0.0031147003173828125,
-0.0478515625,
0.002025604248046875,
0.035247802734375,
0.03936767578125,
-0.036041259765625,
-0.00982666015625,
0.0195159912109375,
0.008392333984375,
-0.00554656982421875,
-0.026336669921875,
-0.0277252197265625,
-0.06414794921875,
-0.00878143310546875,
-0.050689697265625,
0.00977325439453125,
0.0307159423828125,
0.0016069412231445312,
-0.0155487060546875,
-0.023284912109375,
0.0027523040771484375,
0.032928466796875,
0.004253387451171875,
-0.0197906494140625,
0.043426513671875,
0.024078369140625,
-0.01073455810546875,
0.024169921875,
0.00492095947265625,
0.0167388916015625,
-0.0261688232421875,
0.0408935546875,
0.0150604248046875,
0.041839599609375,
-0.0155792236328125,
0.004184722900390625,
0.0002651214599609375,
0.01494598388671875,
0.027862548828125,
-0.0264434814453125,
0.0458984375,
0.031524658203125,
-0.0770263671875,
-0.024444580078125,
0.0027523040771484375,
-0.0222930908203125,
0.00731658935546875,
-0.02337646484375,
0.034088134765625,
0.0261383056640625,
0.0023670196533203125,
0.0147552490234375,
0.006641387939453125,
0.0592041015625,
-0.047027587890625,
0.03729248046875,
-0.0098724365234375,
-0.051177978515625,
0.0310821533203125,
0.00628662109375,
0.0989990234375,
-0.0234375,
-0.08966064453125,
-0.01434326171875,
0.01558685302734375,
-0.07647705078125,
0.015289306640625,
0.045562744140625,
-0.039581298828125,
0.00391387939453125,
0.027191162109375,
-0.0254364013671875,
0.0184173583984375,
-0.0259552001953125,
0.026123046875,
-0.00919342041015625,
0.006870269775390625,
-0.0023403167724609375,
0.00284576416015625,
0.00821685791015625,
-0.002864837646484375,
0.03692626953125,
0.016448974609375,
0.07855224609375,
-0.0504150390625,
0.0255584716796875,
0.0160675048828125,
0.00434112548828125,
-0.01560211181640625,
0.0138397216796875,
0.0147705078125,
-0.0037689208984375,
0.005176544189453125,
-0.0214691162109375,
-0.004642486572265625,
-0.0212249755859375,
0.0350341796875,
-0.0219573974609375,
-0.043212890625,
-0.0164031982421875,
0.040924072265625,
0.035369873046875,
0.03955078125,
-0.0249786376953125,
-0.0304718017578125,
-0.07568359375,
-0.023101806640625,
0.0472412109375,
0.02020263671875,
-0.0014123916625976562,
0.0330810546875,
0.0268096923828125,
0.020416259765625,
0.019683837890625,
-0.0064239501953125,
0.06011962890625,
0.043609619140625,
-0.065185546875,
-0.028594970703125,
-0.0229034423828125,
-0.0131072998046875,
-0.048797607421875,
0.00897979736328125,
0.00907135009765625,
-0.0236053466796875,
-0.042510986328125,
-0.0164337158203125,
-0.00922393798828125,
0.01229095458984375,
-0.051849365234375,
0.0080413818359375,
0.0029315948486328125,
0.005855560302734375,
0.01184844970703125,
0.04449462890625,
-0.0109100341796875,
-0.004856109619140625,
-0.0268096923828125,
-0.0167388916015625,
0.004268646240234375,
-0.05609130859375,
-0.021209716796875,
0.007556915283203125,
0.048309326171875,
0.020599365234375,
-0.058502197265625,
0.026519775390625,
-0.0123748779296875,
0.034149169921875,
0.0187530517578125,
0.0267791748046875,
0.00024509429931640625,
-0.0089263916015625,
-0.04193115234375,
0.0012807846069335938,
-0.0168304443359375,
0.00484466552734375,
-0.0034694671630859375,
0.00818634033203125,
0.034454345703125,
-0.0070037841796875,
-0.027618408203125,
0.02764892578125,
-0.019378662109375,
0.08111572265625,
-0.07098388671875,
-0.035980224609375,
-0.033477783203125,
0.00731658935546875,
-0.0017423629760742188,
-0.03533935546875,
0.0290069580078125,
-0.0709228515625,
-0.04022216796875,
0.002010345458984375,
0.017730712890625,
0.025726318359375,
-0.03411865234375,
-0.0928955078125,
0.0673828125,
-0.033538818359375,
-0.0276947021484375,
0.0007615089416503906,
-0.00579833984375,
-0.0209503173828125,
0.00971221923828125,
0.003936767578125,
-0.01474761962890625,
0.00212860107421875,
0.032928466796875,
0.00440216064453125,
-0.033538818359375,
0.07427978515625,
-0.048980712890625,
-0.00104522705078125,
-0.0247039794921875,
0.005962371826171875,
-0.027862548828125,
0.00540924072265625,
-0.0010986328125,
0.028533935546875,
0.058746337890625,
-0.01751708984375,
-0.051544189453125,
-0.0164794921875,
-0.0587158203125,
-0.0021610260009765625,
-0.050872802734375,
-0.026336669921875,
0.00925445556640625,
0.07623291015625,
0.049957275390625,
0.01245880126953125,
-0.051422119140625,
-0.025238037109375,
-0.0709228515625,
-0.034332275390625,
-0.0243682861328125,
0.00116729736328125,
-0.045196533203125,
0.0017061233520507812,
-0.003017425537109375,
0.00246429443359375,
0.00862884521484375,
-0.0281982421875,
-0.0260772705078125,
-0.0145263671875,
-0.006305694580078125,
0.03253173828125,
-0.07391357421875,
0.0176544189453125,
0.037872314453125,
-0.0325927734375,
0.004329681396484375,
-0.0290069580078125,
0.00689697265625,
0.023712158203125,
-0.032928466796875,
-0.006206512451171875,
0.054107666015625,
-0.026336669921875,
-0.01812744140625,
0.0237579345703125,
-0.0404052734375,
0.01476287841796875,
0.034912109375,
-0.015411376953125,
0.0267333984375,
0.0218048095703125,
0.04034423828125,
0.01335906982421875,
0.0080413818359375,
0.0163726806640625,
-0.004512786865234375,
-0.0203857421875,
-0.046051025390625,
-0.02691650390625,
0.020599365234375,
-0.0208740234375,
-0.0014982223510742188,
0.0058135986328125,
0.00426483154296875,
-0.0014657974243164062,
-0.0026569366455078125,
-0.0343017578125,
-0.01326751708984375,
0.01224517822265625,
-0.0193023681640625,
-0.0285491943359375,
0.004154205322265625
] |
df840fa331d4319178f09b012a172403bbb7cab7
|
Wordpress Stackexchange
Q: What log files does a WordPress installation write to? When tracking down WordPress problems, I've had a hard time finding where WordPress sends errors to. Where does WordPress send errors by default? Are there multiple files that different kinds of errors are directed to?
(I'm either a terribly ungifted Googler or WordPress's own documentation is hard to sort through.)
A: Where (or if) errors are logged is dependent on your php configuration. You can control some of this via your WordPress wp-config.php file. See Configure Error Logging in Editing wp-config.php.
|
Q: What log files does a WordPress installation write to? When tracking down WordPress problems, I've had a hard time finding where WordPress sends errors to. Where does WordPress send errors by default? Are there multiple files that different kinds of errors are directed to?
(I'm either a terribly ungifted Googler or WordPress's own documentation is hard to sort through.)
A: Where (or if) errors are logged is dependent on your php configuration. You can control some of this via your WordPress wp-config.php file. See Configure Error Logging in Editing wp-config.php.
A: If you have access to it on that system (unlikely on a shared host) have a look in the messages log. I've found most failures will log something in there. You might also check the web server logs. As far as I'm aware Wordpress doesn't generate it's own logs.
|
wordpress
|
{
"language": "en",
"length": 141,
"provenance": "stackexchange_00019.jsonl.gz:420906",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55490"
}
|
[
0.042755126953125,
-0.0328369140625,
0.01007843017578125,
-0.041595458984375,
-0.0288543701171875,
-0.01038360595703125,
0.0157928466796875,
-0.0004992485046386719,
0.00012552738189697266,
-0.0121307373046875,
-0.0226287841796875,
-0.0201568603515625,
-0.0257415771484375,
-0.029815673828125,
-0.007122039794921875,
-0.054656982421875,
0.0186614990234375,
0.004947662353515625,
0.0255889892578125,
-0.00717926025390625,
0.0121307373046875,
0.0009260177612304688,
0.01496124267578125,
0.052093505859375,
-0.00435638427734375,
0.053863525390625,
0.021636962890625,
-0.03228759765625,
-0.00885009765625,
-0.0121002197265625,
0.01245880126953125,
-0.0090789794921875,
0.01235198974609375,
0.059051513671875,
-0.06182861328125,
-0.0029621124267578125,
-0.00429534912109375,
0.0238189697265625,
0.01556396484375,
0.028564453125,
0.008087158203125,
-0.01026153564453125,
0.130615234375,
-0.00963592529296875,
0.0469970703125,
-0.0117340087890625,
0.01206207275390625,
-0.075439453125,
0.035675048828125,
-0.041961669921875,
0.019012451171875,
0.021453857421875,
0.029205322265625,
-0.0176544189453125,
-0.019012451171875,
0.0173492431640625,
0.04046630859375,
0.052703857421875,
0.023681640625,
-0.03131103515625,
-0.0570068359375,
0.05279541015625,
-0.004314422607421875,
0.005893707275390625,
-0.0091400146484375,
-0.01512908935546875,
0.0018186569213867188,
0.0443115234375,
-0.023040771484375,
-0.015625,
0.01611328125,
0.0009551048278808594,
-0.0088653564453125,
0.01161956787109375,
0.0263671875,
-0.017791748046875,
0.0243377685546875,
0.010345458984375,
0.0026569366455078125,
0.05865478515625,
0.022735595703125,
-0.03192138671875,
0.0178375244140625,
-0.0175018310546875,
0.0216217041015625,
0.0150909423828125,
-0.005680084228515625,
-0.0155792236328125,
-0.032562255859375,
-0.007144927978515625,
-0.0210418701171875,
-0.0179290771484375,
-0.029632568359375,
-0.0027008056640625,
-0.016448974609375,
-0.01502227783203125,
0.010772705078125,
0.0214385986328125,
-0.0167999267578125,
-0.0183868408203125,
-0.03302001953125,
0.01248931884765625,
-0.0550537109375,
0.0202178955078125,
0.01548004150390625,
0.0174713134765625,
-0.028045654296875,
-0.02496337890625,
0.021942138671875,
0.033905029296875,
0.00007075071334838867,
-0.01812744140625,
-0.004528045654296875,
-0.05865478515625,
0.0219573974609375,
0.035125732421875,
-0.0004940032958984375,
0.04730224609375,
0.01172637939453125,
0.030548095703125,
0.007568359375,
0.03118896484375,
-0.0679931640625,
-0.0024547576904296875,
-0.0229644775390625,
-0.0487060546875,
-0.01123809814453125,
0.0298919677734375,
-0.01171875,
0.0238800048828125,
-0.013671875,
0.014892578125,
0.01271820068359375,
-0.01496124267578125,
-0.033447265625,
-0.021514892578125,
0.01177215576171875,
-0.0190277099609375,
-0.01212310791015625,
0.02838134765625,
0.01441192626953125,
-0.047607421875,
-0.030731201171875,
-0.0115203857421875,
0.01242828369140625,
0.00832366943359375,
0.0274658203125,
0.0288848876953125,
-0.033447265625,
-0.0394287109375,
0.01491546630859375,
0.019500732421875,
-0.005741119384765625,
0.0120697021484375,
0.054595947265625,
-0.021392822265625,
0.0350341796875,
-0.027099609375,
0.0179901123046875,
-0.0013017654418945312,
-0.0299072265625,
-0.00347137451171875,
0.05120849609375,
-0.01346588134765625,
-0.0012121200561523438,
0.0096893310546875,
-0.04296875,
-0.003734588623046875,
0.004810333251953125,
-0.0229644775390625,
-0.0200653076171875,
-0.0199127197265625,
-0.022216796875,
-0.032135009765625,
-0.00977325439453125,
0.01187896728515625,
-0.0498046875,
-0.01171875,
0.01059722900390625,
0.06268310546875,
0.0264434814453125,
-0.023956298828125,
-0.01837158203125,
0.035186767578125,
-0.05096435546875,
0.01279449462890625,
0.0237579345703125,
0.06787109375,
0.01557159423828125,
0.0244598388671875,
0.0235748291015625,
-0.006931304931640625,
-0.0343017578125,
0.01415252685546875,
-0.038299560546875,
-0.0007157325744628906,
-0.01222991943359375,
0.0300140380859375,
-0.02935791015625,
-0.009552001953125,
-0.0494384765625,
0.01136016845703125,
-0.002895355224609375,
0.0025386810302734375,
-0.05328369140625,
0.0009632110595703125,
-0.0299835205078125,
0.0560302734375,
0.0037784576416015625,
-0.0073089599609375,
-0.0005326271057128906,
-0.0131378173828125,
0.03143310546875,
-0.07464599609375,
-0.05584716796875,
0.0137939453125,
-0.04150390625,
0.04736328125,
0.00858306884765625,
0.0482177734375,
-0.021697998046875,
-0.03509521484375,
-0.0191192626953125,
-0.036346435546875,
-0.0025844573974609375,
0.01348876953125,
-0.0347900390625,
-0.0009341239929199219,
0.007465362548828125,
0.01157379150390625,
0.027191162109375,
0.026763916015625,
0.033599853515625,
0.0552978515625,
-0.0008554458618164062,
-0.02447509765625,
0.0106201171875,
-0.07965087890625,
0.0216064453125,
0.047271728515625,
0.02410888671875,
0.0296783447265625,
0.0011444091796875,
0.062286376953125,
-0.0003955364227294922,
-0.06451416015625,
0.00789642333984375,
0.0243988037109375,
0.01708984375,
0.002635955810546875,
0.01702880859375,
-0.03363037109375,
0.03143310546875,
-0.0611572265625,
0.0123291015625,
0.01806640625,
-0.00827789306640625,
-0.04510498046875,
-0.0158843994140625,
0.0213623046875,
0.009521484375,
-0.037445068359375,
-0.039306640625,
-0.0022735595703125,
-0.0011358261108398438,
-0.004749298095703125,
-0.002593994140625,
-0.01441192626953125,
-0.017852783203125,
0.00682830810546875,
0.0126495361328125,
-0.049072265625,
0.0038013458251953125,
-0.0022983551025390625,
0.02398681640625,
0.022735595703125,
-0.0021533966064453125,
-0.0157470703125,
0.01259613037109375,
0.0020084381103515625,
-0.0304412841796875,
-0.0035114288330078125,
0.0176239013671875,
-0.0126800537109375,
-0.00852203369140625,
-0.03826904296875,
0.03778076171875,
-0.026824951171875,
-0.01132965087890625,
-0.0330810546875,
-0.0150604248046875,
0.031585693359375,
-0.031097412109375,
0.0391845703125,
0.0282440185546875,
-0.0290679931640625,
-0.004581451416015625,
-0.0408935546875,
0.04071044921875,
-0.03131103515625,
0.01084136962890625,
0.06439208984375,
-0.0045623779296875,
0.01499176025390625,
-0.007419586181640625,
0.0124664306640625,
-0.006694793701171875,
0.002559661865234375,
-0.0227813720703125,
0.0040130615234375,
-0.06585693359375,
0.00344085693359375,
0.00782012939453125,
0.033447265625,
-0.0208740234375,
-0.035552978515625,
-0.0198974609375,
0.0268402099609375,
-0.052764892578125,
-0.059814453125,
-0.0545654296875,
-0.06939697265625,
0.00466156005859375,
-0.01154327392578125,
-0.0202484130859375,
0.01372528076171875,
0.0030231475830078125,
0.016143798828125,
0.0210113525390625,
-0.0265960693359375,
-0.06304931640625,
-0.040985107421875,
-0.0767822265625,
-0.021026611328125,
-0.006900787353515625,
0.0242919921875,
-0.00308990478515625,
0.10357666015625,
-0.0044403076171875,
-0.08917236328125,
-0.059967041015625,
-0.004791259765625,
-0.0258941650390625,
-0.0027790069580078125,
-0.0160369873046875,
-0.025787353515625,
0.0193023681640625,
0.001434326171875,
-0.022918701171875,
-0.0005826950073242188,
0.0198516845703125,
-0.0216522216796875,
-0.00372314453125,
-0.026641845703125,
-0.005603790283203125,
-0.005802154541015625,
-0.00872802734375,
-0.0823974609375,
-0.034820556640625,
-0.08642578125,
-0.0086669921875,
0.0255584716796875,
-0.035430908203125,
0.0115509033203125,
0.0250244140625,
-0.03533935546875,
0.029571533203125,
-0.0297698974609375,
0.0201416015625,
0.01239776611328125,
0.0297393798828125,
-0.041473388671875,
0.01477813720703125,
-0.0012149810791015625,
0.01398468017578125,
-0.0291595458984375,
0.0270538330078125,
-0.0219268798828125,
0.0187530517578125,
0.01422882080078125,
0.002185821533203125,
-0.01385498046875,
0.003162384033203125,
-0.0546875,
-0.04278564453125,
0.0211181640625,
-0.062225341796875,
0.00315093994140625,
-0.0275726318359375,
0.0091552734375,
-0.00019061565399169922,
0.07135009765625,
-0.01849365234375,
-0.005840301513671875,
0.006145477294921875,
0.001522064208984375,
-0.0276031494140625,
-0.015106201171875,
-0.04833984375,
-0.00183868408203125,
-0.03240966796875,
0.00650787353515625,
0.0023040771484375,
-0.00838470458984375,
-0.03118896484375,
0.03509521484375,
-0.0279388427734375,
-0.031829833984375,
0.01065826416015625,
-0.033966064453125,
0.03436279296875,
-0.0022430419921875,
0.04669189453125,
-0.01357269287109375,
0.0288848876953125,
-0.059539794921875,
-0.1021728515625,
-0.0177154541015625,
-0.06634521484375,
0.081787109375,
0.0291290283203125,
-0.0086669921875,
-0.003787994384765625,
0.044647216796875,
-0.034820556640625,
-0.01366424560546875,
0.0004551410675048828,
0.022247314453125,
-0.0140380859375,
0.0126495361328125,
-0.020843505859375,
-0.00629425048828125,
0.0051116943359375,
-0.01183319091796875,
-0.066162109375,
0.0209808349609375,
0.0101318359375,
0.05377197265625,
0.0518798828125,
-0.0335693359375,
-0.042022705078125,
-0.0191192626953125,
0.01520538330078125,
0.0195159912109375,
0.01226806640625,
-0.005565643310546875,
-0.009246826171875,
-0.0318603515625,
0.019927978515625,
-0.013702392578125,
-0.018798828125,
0.017578125,
0.0438232421875,
0.020751953125,
-0.0088958740234375,
-0.0303955078125,
-0.0279998779296875,
0.0234222412109375,
-0.0108184814453125,
0.034454345703125,
0.0252532958984375,
-0.003719329833984375,
0.00931549072265625,
-0.0107421875,
-0.0078277587890625,
-0.047119140625,
0.055084228515625,
-0.010498046875,
-0.0009403228759765625,
0.0018558502197265625,
-0.0478515625,
0.057647705078125,
0.01800537109375,
-0.0242156982421875,
0.0265960693359375,
0.0235443115234375,
0.004055023193359375,
-0.06854248046875,
0.0382080078125,
-0.003757476806640625,
-0.01357269287109375,
0.000012099742889404297,
-0.018524169921875,
0.0257110595703125,
0.020660400390625,
0.0034275054931640625,
0.018829345703125,
0.0284423828125,
-0.0077056884765625,
0.03753662109375,
0.026885986328125,
0.018951416015625,
0.0105133056640625,
0.059967041015625,
0.001140594482421875,
-0.02362060546875,
-0.01232147216796875,
0.042816162109375,
0.0010089874267578125,
-0.0736083984375,
0.041595458984375,
-0.004024505615234375,
0.0012655258178710938,
0.036590576171875,
-0.02777099609375,
0.031646728515625,
0.030670166015625,
-0.0316162109375,
0.0012607574462890625,
-0.042633056640625,
-0.004993438720703125,
-0.044830322265625,
-0.006591796875,
-0.03924560546875,
0.0039215087890625,
0.018402099609375,
0.0065765380859375,
-0.0712890625,
0.0183563232421875,
0.014617919921875,
-0.0203094482421875,
0.003734588623046875,
0.046173095703125,
0.0430908203125,
-0.044952392578125,
-0.0220794677734375,
0.0313720703125,
0.029815673828125,
-0.04046630859375,
-0.0277557373046875,
-0.02752685546875,
0.047027587890625,
-0.043426513671875,
-0.018646240234375,
0.06494140625,
-0.015655517578125,
0.0165252685546875,
0.0219879150390625,
-0.038299560546875,
-0.08343505859375,
0.01959228515625,
0.0233306884765625,
0.005504608154296875,
-0.075439453125,
0.003780364990234375,
0.034027099609375,
0.0158843994140625,
0.03533935546875,
-0.012451171875,
-0.0230255126953125,
-0.00965118408203125,
0.0022525787353515625,
-0.0266571044921875,
0.0007891654968261719,
0.0096282958984375,
-0.07452392578125,
-0.0404052734375,
-0.00814056396484375,
-0.01139068603515625,
0.0277557373046875,
-0.0478515625,
-0.005558013916015625,
-0.005886077880859375,
0.029205322265625,
-0.0147247314453125,
0.022064208984375,
0.034332275390625,
0.0131683349609375,
-0.039764404296875,
0.0025119781494140625,
-0.03607177734375,
-0.0228118896484375,
0.009307861328125,
-0.00893402099609375,
-0.04632568359375,
-0.0309600830078125,
0.00949859619140625,
-0.01270294189453125,
0.0263671875,
-0.005664825439453125,
-0.0280914306640625,
0.0176544189453125,
0.0146026611328125,
-0.053192138671875,
-0.01309967041015625,
0.055999755859375,
-0.0220794677734375,
0.007129669189453125,
0.012786865234375,
0.03717041015625,
0.0089874267578125,
-0.0218353271484375,
0.006053924560546875,
-0.0003161430358886719,
-0.005092620849609375,
-0.035125732421875,
0.024932861328125,
0.01165771484375,
0.06396484375,
-0.0023937225341796875,
-0.018768310546875,
-0.0142669677734375,
-0.002635955810546875,
0.004535675048828125,
0.037994384765625,
0.029388427734375,
-0.040679931640625,
0.041107177734375,
0.00844573974609375,
0.0005745887756347656,
-0.006748199462890625,
-0.017608642578125,
-0.012786865234375,
0.0261688232421875,
-0.0206756591796875,
-0.0215911865234375,
0.0016384124755859375,
0.0198974609375,
0.03656005859375,
-0.01218414306640625,
0.020477294921875,
0.02801513671875,
0.004177093505859375,
0.0019550323486328125,
0.03143310546875,
-0.0168304443359375,
-0.0281982421875,
0.04449462890625,
0.004878997802734375,
-0.0457763671875,
0.01432037353515625,
-0.032623291015625,
0.026885986328125,
0.083251953125,
0.1083984375,
-0.097900390625,
0.0087127685546875,
0.039337158203125,
-0.014678955078125,
0.02947998046875,
-0.0044097900390625,
0.0100250244140625,
0.0100555419921875,
0.0186004638671875,
-0.0160675048828125,
-0.02294921875,
0.0016727447509765625,
-0.0014944076538085938,
0.004016876220703125,
-0.00371551513671875,
0.03826904296875,
-0.0004875659942626953,
-0.023651123046875,
-0.02203369140625,
0.0230712890625,
-0.00986480712890625,
-0.01052093505859375,
-0.0001735687255859375,
0.0060272216796875,
-0.0194854736328125,
-0.05340576171875,
0.006771087646484375,
-0.039031982421875,
0.00504302978515625,
-0.037261962890625,
-0.03692626953125,
0.03045654296875,
0.052154541015625,
-0.038421630859375,
0.00034689903259277344,
0.04022216796875,
-0.00658416748046875,
0.026214599609375,
-0.0238037109375,
0.0224761962890625,
0.04107666015625,
-0.100341796875,
0.00821685791015625,
-0.039703369140625,
0.005413055419921875,
-0.0012416839599609375,
-0.045928955078125,
0.058135986328125,
-0.054656982421875,
0.0017709732055664062,
0.0055389404296875,
0.01241302490234375,
0.021636962890625,
-0.03228759765625,
0.0305023193359375,
-0.04058837890625,
0.0147705078125,
-0.02667236328125,
0.024749755859375,
0.01271820068359375,
-0.018035888671875,
-0.0191802978515625,
0.052978515625,
0.00864410400390625,
-0.032440185546875,
-0.0005407333374023438,
0.02679443359375,
-0.0119476318359375,
0.0236663818359375,
-0.0411376953125,
0.06927490234375,
0.0244140625,
0.05389404296875,
-0.07354736328125,
-0.0272979736328125,
0.0153045654296875,
0.03668212890625,
0.039520263671875,
0.010223388671875,
-0.03387451171875,
-0.01134490966796875,
0.041412353515625,
0.0199432373046875,
0.01282501220703125,
0.0458984375,
0.0040740966796875,
0.0008907318115234375,
0.03717041015625,
0.004833221435546875,
0.04241943359375,
-0.012542724609375,
0.003116607666015625,
0.0123291015625,
0.0075531005859375,
-0.01100921630859375,
0.0007762908935546875,
-0.00311279296875,
-0.0205535888671875,
0.0014181137084960938,
0.0008025169372558594,
0.0153350830078125,
-0.004512786865234375,
0.02960205078125,
0.05615234375,
-0.06439208984375,
-0.0274200439453125,
-0.0262298583984375,
0.04339599609375,
0.00620269775390625,
0.0002789497375488281,
0.019134521484375,
0.01206207275390625,
0.0080413818359375,
-0.031646728515625,
-0.00817108154296875,
0.01263427734375,
-0.0215301513671875,
0.0130157470703125,
0.0147857666015625,
0.0090179443359375,
-0.0270843505859375,
0.03265380859375,
0.0035762786865234375,
0.0196990966796875,
-0.034912109375,
-0.0062103271484375,
0.004283905029296875,
0.00412750244140625,
0.036712646484375,
-0.04217529296875,
0.025238037109375,
-0.047698974609375,
-0.03485107421875,
-0.0185394287109375,
-0.0108184814453125,
-0.0081787109375,
-0.005641937255859375,
-0.0176544189453125,
-0.01483917236328125,
0.041717529296875,
0.00390625,
0.0159759521484375,
-0.022613525390625,
-0.015350341796875,
0.034454345703125,
0.012939453125,
-0.003543853759765625,
-0.06842041015625,
0.0012683868408203125,
-0.01708984375,
0.02447509765625,
-0.01001739501953125,
0.023345947265625,
-0.032958984375,
-0.007266998291015625,
-0.03143310546875,
0.031463623046875,
0.006061553955078125,
0.041900634765625,
0.05145263671875,
0.03594970703125,
-0.03192138671875,
-0.01158905029296875,
0.005313873291015625,
-0.03118896484375,
-0.02935791015625,
-0.0401611328125,
0.032196044921875,
0.044219970703125,
0.01409912109375,
0.019287109375,
0.0209503173828125,
0.04754638671875,
0.0012941360473632812,
0.0176849365234375,
0.0269622802734375,
-0.027069091796875,
0.028961181640625,
0.0033817291259765625,
0.03265380859375,
0.033538818359375,
-0.07965087890625,
-0.036407470703125,
0.0248870849609375,
0.014617919921875,
-0.00690460205078125,
0.0292816162109375,
0.0217742919921875,
-0.0017452239990234375,
0.0201873779296875,
-0.007843017578125,
-0.0057373046875,
0.00024068355560302734,
0.0167999267578125,
-0.01837158203125,
0.008087158203125,
0.0005931854248046875,
-0.0626220703125,
-0.0284271240234375,
-0.0225067138671875,
0.0239715576171875,
0.018402099609375,
0.0592041015625,
-0.0084228515625,
0.016754150390625,
-0.00310516357421875,
0.0278778076171875,
-0.0194244384765625,
0.01983642578125,
0.005527496337890625,
0.02545166015625,
0.01175689697265625,
-0.02685546875,
-0.0830078125,
0.050201416015625,
-0.00687408447265625,
0.01605224609375,
0.08416748046875,
-0.044891357421875,
0.0034770965576171875,
-0.0172882080078125,
0.022186279296875,
-0.02410888671875,
-0.0634765625,
-0.0272216796875,
0.0307464599609375,
0.0022258758544921875,
0.0176544189453125,
-0.01371002197265625,
0.0108795166015625,
-0.00818634033203125,
-0.01523590087890625,
0.0017595291137695312,
-0.0079193115234375,
0.006988525390625,
0.0308685302734375,
-0.026702880859375,
-0.031341552734375,
-0.040557861328125,
-0.02685546875,
0.0010700225830078125,
-0.007282257080078125,
0.039093017578125,
-0.0450439453125,
0.037261962890625,
-0.02392578125,
-0.0251312255859375,
0.0146942138671875,
-0.0193634033203125,
-0.0081634521484375,
-0.0386962890625,
0.006450653076171875,
0.02093505859375,
0.0244598388671875,
0.024688720703125,
0.0264129638671875,
-0.04449462890625,
-0.007434844970703125,
0.00897979736328125,
0.0006127357482910156,
0.05157470703125,
0.0036945343017578125,
0.0208587646484375,
-0.01708984375,
-0.006072998046875,
-0.006404876708984375,
-0.0225830078125,
0.038299560546875,
-0.0206298828125,
-0.005664825439453125,
-0.01259613037109375,
0.0012054443359375,
-0.035888671875,
-0.03741455078125,
-0.04547119140625,
0.023590087890625,
-0.037109375,
0.0426025390625,
0.04766845703125,
-0.046722412109375,
0.007602691650390625,
0.034942626953125,
0.031280517578125,
0.09014892578125,
-0.0133819580078125,
-0.0301666259765625,
-0.006542205810546875,
-0.004535675048828125,
0.011199951171875,
-0.0193328857421875,
0.01190948486328125,
-0.038818359375,
-0.032135009765625,
-0.0226593017578125,
-0.0035114288330078125,
0.0004405975341796875,
-0.06097412109375,
-0.10821533203125,
0.066162109375,
-0.03424072265625,
-0.034271240234375,
-0.028228759765625,
-0.020172119140625,
-0.0311126708984375,
0.016845703125,
-0.0161285400390625,
-0.00785064697265625,
-0.0121917724609375,
0.058074951171875,
0.03173828125,
-0.048004150390625,
0.056365966796875,
0.005809783935546875,
-0.0216522216796875,
0.019287109375,
0.0237884521484375,
-0.007144927978515625,
0.02880859375,
-0.017303466796875,
0.04937744140625,
0.084716796875,
-0.00804901123046875,
0.0283660888671875,
-0.01568603515625,
-0.07098388671875,
0.00726318359375,
-0.0186920166015625,
-0.04278564453125,
-0.0205535888671875,
0.0670166015625,
0.0260162353515625,
0.02392578125,
-0.0068359375,
-0.040771484375,
-0.01910400390625,
-0.0193939208984375,
-0.017791748046875,
0.0144195556640625,
-0.06292724609375,
-0.004024505615234375,
-0.01708984375,
-0.0103607177734375,
0.004283905029296875,
0.0051422119140625,
-0.01119232177734375,
0.0133209228515625,
0.052276611328125,
-0.01102447509765625,
-0.023101806640625,
-0.0579833984375,
0.04840087890625,
0.003326416015625,
0.08367919921875,
-0.026824951171875,
0.052093505859375,
0.08184814453125,
0.054779052734375,
0.01416778564453125,
0.01467132568359375,
-0.04986572265625,
0.0255889892578125,
-0.0036296844482421875,
0.049346923828125,
-0.042083740234375,
-0.0279083251953125,
0.0212554931640625,
0.031341552734375,
-0.019775390625,
0.03436279296875,
0.048583984375,
0.0008149147033691406,
-0.024078369140625,
0.0426025390625,
-0.00827789306640625,
-0.04107666015625,
-0.038726806640625,
0.055419921875,
-0.053680419921875,
-0.013763427734375,
-0.0279998779296875,
-0.042938232421875,
0.01007080078125,
0.0263519287109375,
0.01947021484375,
-0.00339508056640625,
0.009918212890625,
0.0228424072265625,
-0.0013561248779296875,
0.01136016845703125
] |
ff1ec4ff6da0d4c5f7ef71d2968526da32d3c89c
|
Wordpress Stackexchange
Q: How to prefix post permalinks with /blog/ - without affecting custom post types? I have several custom post types, which are properly structured as /%post_type%/%postname%/, however I wish to have the same effect for regular blog entries: /blog/%postname%/
If I prepend the permalink structure with /blog/ it affects the custom post types as well, so currently my permalink structure is simply /%postname%/
Which is the recommended way of doing this? I had a solution involving some rewrites, but the permalink shown in the post editor area does not reflect it.
A: Set the 'with_front' parameter for the post type’s slug to FALSE:
'rewrite' => array (
'slug' => 'posttypeslug',
'with_front' => FALSE
),
|
Q: How to prefix post permalinks with /blog/ - without affecting custom post types? I have several custom post types, which are properly structured as /%post_type%/%postname%/, however I wish to have the same effect for regular blog entries: /blog/%postname%/
If I prepend the permalink structure with /blog/ it affects the custom post types as well, so currently my permalink structure is simply /%postname%/
Which is the recommended way of doing this? I had a solution involving some rewrites, but the permalink shown in the post editor area does not reflect it.
A: Set the 'with_front' parameter for the post type’s slug to FALSE:
'rewrite' => array (
'slug' => 'posttypeslug',
'with_front' => FALSE
),
|
wordpress
|
{
"language": "en",
"length": 114,
"provenance": "stackexchange_00019.jsonl.gz:420915",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55522"
}
|
[
0.042236328125,
-0.015411376953125,
0.032318115234375,
0.0168914794921875,
-0.02496337890625,
-0.0072021484375,
0.03668212890625,
-0.05694580078125,
-0.0191650390625,
-0.0133514404296875,
0.032806396484375,
0.00826263427734375,
-0.0271759033203125,
-0.05621337890625,
0.053955078125,
-0.004352569580078125,
0.0220947265625,
-0.01114654541015625,
0.03509521484375,
-0.030517578125,
0.0458984375,
-0.0240631103515625,
0.04144287109375,
0.007541656494140625,
0.01715087890625,
-0.005168914794921875,
0.0633544921875,
-0.0411376953125,
0.024017333984375,
-0.0236663818359375,
0.0246734619140625,
-0.0218505859375,
0.0146942138671875,
0.0262298583984375,
-0.012542724609375,
0.016571044921875,
-0.0036678314208984375,
0.01476287841796875,
0.0206298828125,
0.0057220458984375,
0.005352020263671875,
-0.0024394989013671875,
0.01332855224609375,
0.04180908203125,
0.0130767822265625,
-0.048370361328125,
-0.00917816162109375,
-0.10601806640625,
0.006893157958984375,
-0.03704833984375,
-0.0024547576904296875,
0.0369873046875,
0.028228759765625,
-0.002079010009765625,
-0.018829345703125,
-0.007762908935546875,
-0.01519012451171875,
-0.033905029296875,
0.0158233642578125,
-0.007328033447265625,
0.004970550537109375,
-0.0008172988891601562,
0.0212554931640625,
0.02520751953125,
-0.00539398193359375,
-0.0022563934326171875,
-0.01055908203125,
0.034454345703125,
-0.044769287109375,
-0.005825042724609375,
0.02734375,
-0.053314208984375,
0.0077362060546875,
-0.03802490234375,
-0.0260772705078125,
-0.01349639892578125,
-0.0131378173828125,
-0.047576904296875,
0.01374053955078125,
-0.00882720947265625,
0.0165863037109375,
0.006805419921875,
0.0214080810546875,
-0.07440185546875,
0.0261077880859375,
-0.053070068359375,
-0.00555419921875,
0.005096435546875,
-0.0273895263671875,
-0.0283203125,
-0.019317626953125,
-0.034515380859375,
-0.035736083984375,
0.01071929931640625,
-0.00791168212890625,
-0.005046844482421875,
0.03692626953125,
0.0243072509765625,
0.0166015625,
0.01236724853515625,
0.0143890380859375,
-0.045928955078125,
0.0294647216796875,
-0.03662109375,
0.007259368896484375,
0.0140380859375,
0.011810302734375,
0.0635986328125,
0.072509765625,
0.02716064453125,
0.006195068359375,
0.06243896484375,
-0.018096923828125,
-0.0012226104736328125,
-0.048004150390625,
0.020843505859375,
-0.04302978515625,
-0.006633758544921875,
-0.019073486328125,
0.0195465087890625,
0.0096588134765625,
0.045501708984375,
0.0127716064453125,
-0.01001739501953125,
-0.0206298828125,
-0.00504302978515625,
0.0023937225341796875,
-0.066162109375,
-0.00714111328125,
0.05316162109375,
-0.032623291015625,
-0.006656646728515625,
0.044891357421875,
0.0156097412109375,
0.007503509521484375,
-0.04620361328125,
0.003936767578125,
-0.050628662109375,
-0.006328582763671875,
-0.005889892578125,
0.0097198486328125,
-0.022705078125,
-0.0089874267578125,
-0.01062774658203125,
0.047943115234375,
0.03765869140625,
0.0179595947265625,
0.004711151123046875,
-0.0002684593200683594,
0.005046844482421875,
-0.0166473388671875,
-0.0299072265625,
0.0523681640625,
0.0035686492919921875,
-0.0293121337890625,
-0.04656982421875,
0.003505706787109375,
-0.045867919921875,
-0.01366424560546875,
-0.0576171875,
0.01190185546875,
-0.020599365234375,
0.00452423095703125,
-0.023834228515625,
-0.0733642578125,
0.0594482421875,
-0.0184173583984375,
-0.0261383056640625,
0.01763916015625,
-0.0030994415283203125,
0.019775390625,
0.00656890869140625,
-0.01189422607421875,
0.004611968994140625,
0.00757598876953125,
-0.0130462646484375,
0.014068603515625,
0.0111541748046875,
-0.004505157470703125,
0.06304931640625,
0.0266571044921875,
-0.0201568603515625,
0.0195770263671875,
-0.012603759765625,
-0.0814208984375,
0.023284912109375,
0.036529541015625,
0.0711669921875,
-0.01055908203125,
0.01617431640625,
0.0672607421875,
0.0201568603515625,
-0.0638427734375,
-0.001026153564453125,
-0.037628173828125,
0.000029802322387695312,
0.04315185546875,
0.012237548828125,
-0.0085601806640625,
0.0316162109375,
-0.0411376953125,
0.027008056640625,
-0.0203704833984375,
0.028167724609375,
-0.004993438720703125,
0.0157470703125,
-0.00009262561798095703,
0.04473876953125,
0.014312744140625,
0.0307464599609375,
0.0198211669921875,
0.0204010009765625,
-0.02191162109375,
-0.04400634765625,
-0.0196075439453125,
0.0455322265625,
-0.0018281936645507812,
-0.01190948486328125,
-0.0217132568359375,
0.014892578125,
-0.0187835693359375,
-0.0203857421875,
-0.035247802734375,
0.00827789306640625,
0.03265380859375,
-0.045501708984375,
-0.00545501708984375,
-0.048492431640625,
-0.058319091796875,
0.006763458251953125,
-0.1324462890625,
0.04962158203125,
0.0249481201171875,
-0.021881103515625,
-0.03167724609375,
0.0185394287109375,
0.0224609375,
-0.039581298828125,
0.0010814666748046875,
0.0469970703125,
0.01520538330078125,
0.024658203125,
-0.017303466796875,
0.0091094970703125,
0.04656982421875,
0.005512237548828125,
0.011566162109375,
0.01540374755859375,
0.02069091796875,
0.068603515625,
-0.0106353759765625,
0.00876617431640625,
0.01047515869140625,
-0.03570556640625,
0.006011962890625,
0.0307769775390625,
0.01422882080078125,
-0.0092926025390625,
0.00659942626953125,
0.01099395751953125,
0.004230499267578125,
0.014892578125,
-0.037017822265625,
0.004283905029296875,
0.0031871795654296875,
0.023101806640625,
0.0228729248046875,
0.033416748046875,
-0.0198211669921875,
-0.0007929801940917969,
0.002262115478515625,
0.0302276611328125,
0.0027637481689453125,
0.0389404296875,
0.0438232421875,
-0.01340484619140625,
-0.03472900390625,
-0.0036487579345703125,
0.01727294921875,
0.00984954833984375,
-0.017578125,
0.0091705322265625,
0.0011157989501953125,
0.0018930435180664062,
-0.003681182861328125,
-0.050750732421875,
0.02105712890625,
0.01514434814453125,
-0.0210418701171875,
-0.021881103515625,
0.007640838623046875,
0.0101776123046875,
-0.024444580078125,
0.003566741943359375,
0.02081298828125,
-0.0178985595703125,
-0.0157623291015625,
-0.0833740234375,
0.06964111328125,
-0.0643310546875,
0.053924560546875,
0.08441162109375,
-0.02362060546875,
0.032928466796875,
0.00406646728515625,
0.0026302337646484375,
-0.0017347335815429688,
0.017303466796875,
-0.0096435546875,
-0.03173828125,
-0.04833984375,
-0.00014960765838623047,
0.027862548828125,
0.060272216796875,
-0.0018100738525390625,
-0.0225982666015625,
0.0180816650390625,
0.053741455078125,
0.00695037841796875,
0.007213592529296875,
-0.0037860870361328125,
-0.03900146484375,
-0.01265716552734375,
-0.0213470458984375,
-0.007701873779296875,
0.00390625,
-0.01256561279296875,
-0.0019893646240234375,
0.0247344970703125,
-0.0293426513671875,
-0.07086181640625,
-0.05560302734375,
-0.0841064453125,
-0.01200103759765625,
-0.005199432373046875,
0.00514984130859375,
0.0009760856628417969,
0.0174560546875,
-0.01131439208984375,
-0.06622314453125,
0.00859832763671875,
0.04766845703125,
-0.004665374755859375,
0.007843017578125,
0.01299285888671875,
-0.01270294189453125,
0.021270751953125,
-0.00414276123046875,
0.051361083984375,
0.04974365234375,
-0.04559326171875,
-0.005062103271484375,
-0.0028400421142578125,
-0.032989501953125,
0.0309600830078125,
0.0172576904296875,
0.002132415771484375,
-0.0048065185546875,
0.0290985107421875,
-0.05499267578125,
-0.0276336669921875,
-0.01419830322265625,
-0.055999755859375,
-0.005828857421875,
0.029296875,
-0.00510406494140625,
-0.0206146240234375,
0.0232696533203125,
0.03631591796875,
0.0469970703125,
0.0125732421875,
-0.01415252685546875,
0.03924560546875,
0.01349639892578125,
0.042999267578125,
-0.0445556640625,
0.006500244140625,
-0.04296875,
0.042083740234375,
-0.00614166259765625,
-0.01360321044921875,
-0.0244903564453125,
0.006534576416015625,
-0.033538818359375,
-0.06121826171875,
0.03997802734375,
-0.10089111328125,
-0.034088134765625,
-0.05609130859375,
-0.00476837158203125,
-0.00827789306640625,
0.07147216796875,
-0.032073974609375,
-0.01232147216796875,
-0.005176544189453125,
0.0050201416015625,
-0.006404876708984375,
-0.0124359130859375,
-0.03143310546875,
-0.0243072509765625,
-0.0167236328125,
-0.0103759765625,
-0.004589080810546875,
-0.03192138671875,
0.006381988525390625,
-0.0190887451171875,
-0.005741119384765625,
-0.0235443115234375,
0.035919189453125,
-0.006443023681640625,
-0.002223968505859375,
0.020599365234375,
-0.0109710693359375,
0.0031986236572265625,
-0.0322265625,
-0.0138702392578125,
-0.06219482421875,
-0.0100555419921875,
0.021148681640625,
0.0291595458984375,
-0.0267333984375,
-0.00655364990234375,
-0.0265350341796875,
0.029815673828125,
0.0033512115478515625,
-0.0261688232421875,
0.0167388916015625,
0.006961822509765625,
-0.00858306884765625,
0.031890869140625,
-0.0124664306640625,
-0.004917144775390625,
0.0101470947265625,
0.007137298583984375,
-0.039703369140625,
0.017730712890625,
-0.0200347900390625,
0.0099334716796875,
0.02886962890625,
-0.045806884765625,
-0.042236328125,
-0.0279998779296875,
-0.007274627685546875,
0.035919189453125,
-0.00710296630859375,
0.01085662841796875,
-0.044647216796875,
-0.03826904296875,
0.032867431640625,
-0.01258087158203125,
-0.00388336181640625,
-0.0005793571472167969,
0.06591796875,
0.00394439697265625,
-0.0190582275390625,
-0.008270263671875,
0.046142578125,
0.032806396484375,
-0.005359649658203125,
0.040924072265625,
0.01189422607421875,
-0.0081634521484375,
0.0256195068359375,
-0.0024929046630859375,
-0.0203094482421875,
-0.0088653564453125,
0.0045318603515625,
0.0027256011962890625,
-0.011993408203125,
0.0010766983032226562,
-0.0261688232421875,
0.058624267578125,
0.0256195068359375,
-0.008880615234375,
-0.030609130859375,
-0.041412353515625,
0.0684814453125,
-0.00911712646484375,
0.03594970703125,
-0.057830810546875,
-0.044647216796875,
0.029052734375,
0.01580810546875,
0.003177642822265625,
0.00406646728515625,
-0.0014085769653320312,
0.0084075927734375,
-0.022125244140625,
-0.0027408599853515625,
0.0234832763671875,
0.00965118408203125,
0.03619384765625,
0.0290069580078125,
0.01477813720703125,
0.01410675048828125,
-0.0248565673828125,
0.0016889572143554688,
0.0338134765625,
0.0188751220703125,
0.0039825439453125,
-0.027099609375,
-0.01218414306640625,
-0.0199737548828125,
-0.0147857666015625,
0.00927734375,
0.04351806640625,
0.03277587890625,
0.0088653564453125,
-0.007061004638671875,
-0.0240325927734375,
0.01629638671875,
-0.042266845703125,
0.0294952392578125,
0.0164642333984375,
-0.0147857666015625,
0.007770538330078125,
0.0177001953125,
-0.0024547576904296875,
0.0002617835998535156,
-0.00026297569274902344,
-0.0083770751953125,
0.0162200927734375,
0.0306854248046875,
0.029693603515625,
-0.0131378173828125,
-0.0308380126953125,
0.0273284912109375,
0.0086822509765625,
-0.02874755859375,
0.00856781005859375,
0.0250244140625,
0.029296875,
0.0013933181762695312,
-0.022369384765625,
0.010711669921875,
-0.02203369140625,
-0.0181884765625,
0.0130767822265625,
-0.0173797607421875,
-0.028472900390625,
-0.02813720703125,
-0.00811004638671875,
0.03656005859375,
-0.007049560546875,
-0.01476287841796875,
0.0235443115234375,
-0.00612640380859375,
0.028411865234375,
0.02392578125,
-0.0003495216369628906,
0.0012264251708984375,
-0.0017223358154296875,
0.037078857421875,
0.002811431884765625,
-0.0020751953125,
-0.0234222412109375,
-0.016326904296875,
-0.0149078369140625,
0.005336761474609375,
0.043243408203125,
-0.01450347900390625,
0.034423828125,
-0.0135345458984375,
-0.0116729736328125,
0.0298919677734375,
0.01348876953125,
0.020904541015625,
-0.00722503662109375,
-0.046356201171875,
0.0182342529296875,
-0.0394287109375,
0.0067138671875,
-0.037017822265625,
-0.0277252197265625,
-0.038421630859375,
-0.0092620849609375,
0.0240936279296875,
0.01123046875,
-0.0007691383361816406,
0.0007109642028808594,
-0.0085906982421875,
0.02545166015625,
0.00887298583984375,
0.0275726318359375,
-0.016754150390625,
0.0128631591796875,
-0.009918212890625,
0.014312744140625,
-0.0207366943359375,
0.00450897216796875,
0.01241302490234375,
-0.0178070068359375,
-0.00865936279296875,
-0.0784912109375,
-0.036712646484375,
0.01374053955078125,
-0.025238037109375,
0.06353759765625,
0.048248291015625,
0.0020809173583984375,
0.01464080810546875,
-0.0082244873046875,
0.0079345703125,
-0.0160369873046875,
-0.0258636474609375,
-0.040863037109375,
0.004222869873046875,
-0.022705078125,
0.038177490234375,
0.072265625,
-0.0198516845703125,
-0.024078369140625,
-0.0269927978515625,
0.0179443359375,
-0.0027866363525390625,
-0.0204925537109375,
-0.03363037109375,
0.00786590576171875,
0.053192138671875,
0.034210205078125,
0.057464599609375,
0.007965087890625,
0.0305023193359375,
0.0199432373046875,
-0.0016803741455078125,
0.0093841552734375,
0.021636962890625,
0.053558349609375,
0.01473236083984375,
0.01617431640625,
0.05291748046875,
-0.00949859619140625,
0.016815185546875,
0.07342529296875,
0.062164306640625,
-0.1044921875,
0.008453369140625,
0.00830841064453125,
0.01020050048828125,
0.062255859375,
0.014923095703125,
0.0146636962890625,
0.04351806640625,
-0.007350921630859375,
-0.044281005859375,
-0.018157958984375,
-0.0029125213623046875,
-0.00986480712890625,
-0.017852783203125,
-0.0087127685546875,
0.0305938720703125,
0.020263671875,
0.03460693359375,
-0.02606201171875,
-0.012603759765625,
0.00481414794921875,
0.01016998291015625,
0.00287628173828125,
-0.01357269287109375,
-0.04034423828125,
-0.0308074951171875,
-0.008270263671875,
-0.03289794921875,
-0.00794219970703125,
0.017730712890625,
-0.0045928955078125,
-0.003635406494140625,
0.034881591796875,
-0.02996826171875,
0.012542724609375,
0.0014543533325195312,
-0.040130615234375,
0.0377197265625,
-0.0115814208984375,
-0.004192352294921875,
-0.0014486312866210938,
0.020965576171875,
0.0017108917236328125,
0.010009765625,
-0.03515625,
-0.0215301513671875,
-0.049468994140625,
0.1026611328125,
-0.054168701171875,
-0.00234222412109375,
0.02142333984375,
0.00844573974609375,
-0.0220794677734375,
-0.0132598876953125,
-0.0121612548828125,
-0.041839599609375,
-0.014495849609375,
-0.0291595458984375,
-0.03387451171875,
-0.004985809326171875,
-0.044036865234375,
-0.0706787109375,
0.1053466796875,
0.0004620552062988281,
0.057708740234375,
0.0254058837890625,
0.025543212890625,
-0.0100250244140625,
0.018707275390625,
-0.031890869140625,
0.040802001953125,
-0.041046142578125,
0.0557861328125,
-0.0506591796875,
-0.004169464111328125,
0.009857177734375,
0.038665771484375,
0.05877685546875,
0.0217132568359375,
-0.043487548828125,
-0.007747650146484375,
0.05059814453125,
0.044219970703125,
0.01517486572265625,
0.0283966064453125,
-0.0203704833984375,
0.041351318359375,
0.025909423828125,
-0.033782958984375,
0.020263671875,
0.0152587890625,
-0.06292724609375,
0.007030487060546875,
0.03643798828125,
0.05816650390625,
0.0034236907958984375,
-0.0026702880859375,
0.00984954833984375,
-0.011077880859375,
0.040130615234375,
-0.07733154296875,
0.00693511962890625,
0.0251617431640625,
0.050506591796875,
-0.06298828125,
-0.0220489501953125,
-0.028717041015625,
0.05364990234375,
0.001461029052734375,
0.0126953125,
-0.007076263427734375,
0.01256561279296875,
0.006587982177734375,
-0.03997802734375,
-0.004375457763671875,
0.031951904296875,
-0.0350341796875,
0.052032470703125,
0.047119140625,
0.03271484375,
-0.025848388671875,
-0.01715087890625,
0.048736572265625,
0.0709228515625,
-0.0465087890625,
-0.01580810546875,
0.00933837890625,
-0.00394439697265625,
-0.005779266357421875,
-0.041229248046875,
-0.026397705078125,
-0.0258331298828125,
-0.0225982666015625,
-0.02362060546875,
0.0164642333984375,
0.01006317138671875,
0.043304443359375,
-0.020416259765625,
-0.03826904296875,
-0.03533935546875,
0.01534271240234375,
-0.0499267578125,
0.00264739990234375,
0.007503509521484375,
0.0787353515625,
0.032989501953125,
0.042083740234375,
-0.0285797119140625,
-0.0260162353515625,
0.0094757080078125,
0.0086822509765625,
-0.0322265625,
0.00027561187744140625,
-0.024322509765625,
-0.03411865234375,
0.0024127960205078125,
0.0322265625,
0.022796630859375,
0.031524658203125,
0.0260009765625,
-0.016082763671875,
-0.002338409423828125,
0.006427764892578125,
0.0012159347534179688,
-0.02667236328125,
0.02557373046875,
-0.04071044921875,
0.037933349609375,
0.0139312744140625,
-0.0057525634765625,
-0.028900146484375,
0.01047515869140625,
0.040679931640625,
-0.00838470458984375,
0.02142333984375,
0.0090484619140625,
-0.0159912109375,
0.05413818359375,
0.01361083984375,
0.042694091796875,
0.01629638671875,
-0.0024967193603515625,
-0.0011959075927734375,
-0.025054931640625,
-0.10137939453125,
0.05218505859375,
0.0765380859375,
0.0143890380859375,
-0.048797607421875,
0.0063934326171875,
0.0127716064453125,
0.0027904510498046875,
-0.0256500244140625,
0.0201568603515625,
0.0302886962890625,
0.006252288818359375,
0.0309295654296875,
-0.08837890625,
-0.048004150390625,
-0.034271240234375,
0.03204345703125,
0.0022411346435546875,
0.12384033203125,
-0.023529052734375,
0.002368927001953125,
0.0005369186401367188,
0.00795745849609375,
-0.0046234130859375,
0.004512786865234375,
-0.012969970703125,
-0.005840301513671875,
0.019683837890625,
0.006702423095703125,
-0.03753662109375,
-0.0025348663330078125,
0.0478515625,
-0.028228759765625,
-0.005100250244140625,
-0.0275115966796875,
0.02386474609375,
-0.022369384765625,
-0.00069427490234375,
-0.0445556640625,
-0.08294677734375,
-0.0677490234375,
0.01324462890625,
-0.00698089599609375,
-0.0102996826171875,
-0.0445556640625,
0.054443359375,
0.0112152099609375,
-0.0260009765625,
0.01482391357421875,
-0.06890869140625,
0.03497314453125,
0.037017822265625,
0.030914306640625,
-0.0237274169921875,
0.011871337890625,
-0.01508331298828125,
0.0017023086547851562,
0.015380859375,
0.022186279296875,
0.0203857421875,
-0.0628662109375,
-0.0079193115234375,
-0.0032863616943359375,
0.04132080078125,
-0.0012369155883789062,
0.0266571044921875,
-0.03277587890625,
0.00942230224609375,
0.02362060546875,
-0.0167083740234375,
-0.0226898193359375,
-0.0211944580078125,
-0.007213592529296875,
0.0300140380859375,
-0.0253448486328125,
-0.032073974609375,
-0.06439208984375,
-0.004180908203125,
0.021575927734375,
-0.032196044921875,
-0.008270263671875,
0.01166534423828125,
-0.0484619140625,
0.0282440185546875,
-0.048187255859375,
-0.0306243896484375,
0.012664794921875,
0.060333251953125,
-0.0084686279296875,
-0.025634765625,
-0.033050537109375,
-0.005916595458984375,
-0.042388916015625,
0.0298919677734375,
0.048675537109375,
-0.03851318359375,
-0.00479888916015625,
0.0032215118408203125,
0.01568603515625,
0.053497314453125,
-0.016326904296875,
-0.021240234375,
0.020477294921875,
0.00376129150390625,
-0.0181732177734375,
-0.0679931640625,
0.01361083984375,
-0.0809326171875,
0.0031414031982421875,
-0.0136871337890625,
-0.0195465087890625,
-0.00439453125,
-0.04058837890625,
-0.05108642578125,
0.059417724609375,
-0.00007402896881103516,
-0.027984619140625,
-0.06414794921875,
-0.0234527587890625,
-0.002178192138671875,
0.04498291015625,
-0.01195526123046875,
-0.033203125,
-0.059906005859375,
0.03973388671875,
0.00815582275390625,
0.033905029296875,
0.0185546875,
0.014373779296875,
0.03692626953125,
0.03955078125,
0.044647216796875,
-0.0228424072265625,
0.01093292236328125,
-0.0018663406372070312,
0.0275726318359375,
0.05865478515625,
-0.020111083984375,
0.048583984375,
-0.002410888671875,
-0.022125244140625,
-0.004474639892578125,
-0.060211181640625,
-0.050628662109375,
-0.0238037109375,
0.1077880859375,
0.039703369140625,
0.03668212890625,
-0.039764404296875,
-0.01202392578125,
-0.033447265625,
-0.039093017578125,
-0.0021495819091796875,
0.0333251953125,
-0.058990478515625,
0.0098419189453125,
0.01343536376953125,
0.01149749755859375,
-0.033447265625,
-0.0175323486328125,
-0.01308441162109375,
-0.00791168212890625,
0.0203857421875,
0.022613525390625,
0.00366973876953125,
0.01277923583984375,
0.031585693359375,
-0.019378662109375,
0.0206146240234375,
-0.0222015380859375,
0.015289306640625,
0.01934814453125,
-0.0193939208984375,
-0.0264892578125,
0.01233673095703125,
0.0255279541015625,
0.00799560546875,
0.0289154052734375,
0.027984619140625,
0.0188446044921875,
0.01029205322265625,
-0.005016326904296875,
0.007228851318359375,
-0.003204345703125,
-0.01143646240234375,
-0.0139923095703125,
0.045135498046875,
-0.0029354095458984375,
0.08587646484375,
-0.00783538818359375,
-0.0041656494140625,
0.0025997161865234375,
0.02166748046875,
-0.0369873046875,
0.01480865478515625,
-0.0073394775390625,
-0.0313720703125,
-0.0034046173095703125,
0.003337860107421875,
-0.03143310546875,
-0.027496337890625,
0.0068511962890625,
-0.0174407958984375,
-0.011322021484375,
0.01525115966796875
] |
5423bf618650d52cd803190e5f76d476b659051a
|
Wordpress Stackexchange
Q: Ajax for non-logged-in users I'm working on a plugin that captures some data from a non-logged-in user (such as a Like Button) and enters it into the database based on post_id.
My plugin works fine for logged-in users but non-logged-in users produces a "-1" response in AJAX.
I'm guessing this has to do with an authentication barrier for writing to the database but I'm looking for a way to work around that.
Any ideas?
EDIT: Here is the code: http://pastebin.com/ghtvJNiW
I'm basing this off the Love-It AJAX plugin by Pippin. He says in the tutorial that this only works for logged-in users but I need to get this to work for non-logged-in users as well.
A: The wp_ajax_{action} hook only fires for logged in users. For logged-out users the action wp_ajax_nopriv_{action} is triggered on an ajax request - so you need to hook into that as well.
|
Q: Ajax for non-logged-in users I'm working on a plugin that captures some data from a non-logged-in user (such as a Like Button) and enters it into the database based on post_id.
My plugin works fine for logged-in users but non-logged-in users produces a "-1" response in AJAX.
I'm guessing this has to do with an authentication barrier for writing to the database but I'm looking for a way to work around that.
Any ideas?
EDIT: Here is the code: http://pastebin.com/ghtvJNiW
I'm basing this off the Love-It AJAX plugin by Pippin. He says in the tutorial that this only works for logged-in users but I need to get this to work for non-logged-in users as well.
A: The wp_ajax_{action} hook only fires for logged in users. For logged-out users the action wp_ajax_nopriv_{action} is triggered on an ajax request - so you need to hook into that as well.
|
wordpress
|
{
"language": "en",
"length": 148,
"provenance": "stackexchange_00019.jsonl.gz:420924",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55543"
}
|
[
0.07110595703125,
0.01434326171875,
-0.034576416015625,
-0.040283203125,
0.044219970703125,
-0.0509033203125,
0.054046630859375,
0.00809478759765625,
0.03546142578125,
0.017120361328125,
-0.082275390625,
0.032958984375,
-0.037078857421875,
0.00555419921875,
-0.0235137939453125,
-0.04217529296875,
0.007320404052734375,
-0.0240325927734375,
-0.01157379150390625,
-0.0249176025390625,
0.009979248046875,
-0.01105499267578125,
-0.0012416839599609375,
0.00920867919921875,
0.0221099853515625,
0.0206451416015625,
0.052978515625,
-0.01064300537109375,
0.05621337890625,
0.01047515869140625,
0.024078369140625,
-0.08026123046875,
0.0097198486328125,
0.06292724609375,
-0.06829833984375,
0.01146697998046875,
-0.01739501953125,
0.0308990478515625,
0.00420379638671875,
0.01473236083984375,
0.060699462890625,
-0.035003662109375,
-0.04705810546875,
0.01245880126953125,
-0.0195159912109375,
-0.0213165283203125,
0.059539794921875,
-0.007717132568359375,
0.0380859375,
0.021240234375,
-0.005207061767578125,
0.018768310546875,
-0.002559661865234375,
-0.001384735107421875,
-0.0089569091796875,
-0.004177093505859375,
-0.052490234375,
0.033111572265625,
0.050048828125,
0.010650634765625,
-0.0195465087890625,
-0.053497314453125,
0.007076263427734375,
-0.03900146484375,
0.002635955810546875,
0.006771087646484375,
-0.0187225341796875,
0.0140838623046875,
-0.0109100341796875,
-0.0029697418212890625,
-0.009307861328125,
-0.020751953125,
-0.01385498046875,
0.00695037841796875,
-0.04681396484375,
-0.01751708984375,
0.03643798828125,
-0.0277862548828125,
-0.004306793212890625,
0.0160675048828125,
-0.0224456787109375,
0.019500732421875,
-0.042236328125,
-0.0016584396362304688,
-0.01436614990234375,
0.0217437744140625,
-0.0323486328125,
-0.0108489990234375,
-0.044158935546875,
-0.016510009765625,
-0.034210205078125,
-0.01904296875,
-0.0256805419921875,
0.0121612548828125,
-0.03643798828125,
0.002536773681640625,
0.00974273681640625,
0.035247802734375,
-0.024658203125,
-0.032867431640625,
0.00920867919921875,
-0.0196075439453125,
-0.027923583984375,
-0.01123046875,
0.035491943359375,
0.02142333984375,
0.01274871826171875,
-0.011993408203125,
0.041656494140625,
-0.0039825439453125,
-0.01438140869140625,
0.06646728515625,
0.029449462890625,
-0.002239227294921875,
0.01154327392578125,
-0.025909423828125,
-0.0230712890625,
0.051513671875,
-0.0216064453125,
0.0272064208984375,
-0.02294921875,
-0.00514984130859375,
-0.042083740234375,
0.006866455078125,
0.0233612060546875,
-0.00414276123046875,
0.0075225830078125,
0.02593994140625,
-0.0154571533203125,
0.031280517578125,
-0.019866943359375,
0.00482177734375,
0.0643310546875,
0.0235595703125,
-0.005832672119140625,
-0.0280609130859375,
0.07275390625,
-0.0036869049072265625,
0.0013227462768554688,
0.0088653564453125,
-0.002593994140625,
-0.039642333984375,
-0.037872314453125,
-0.025299072265625,
0.05657958984375,
0.0091400146484375,
0.01385498046875,
0.025177001953125,
0.0222015380859375,
-0.025787353515625,
0.044708251953125,
-0.0107421875,
-0.0024967193603515625,
0.017333984375,
0.052032470703125,
0.007297515869140625,
0.04986572265625,
-0.0257720947265625,
0.01276397705078125,
0.004985809326171875,
0.031524658203125,
-0.006710052490234375,
-0.006683349609375,
0.0178680419921875,
0.002044677734375,
-0.005863189697265625,
-0.0330810546875,
0.00716400146484375,
0.033355712890625,
0.03607177734375,
-0.00623321533203125,
-0.034027099609375,
0.044525146484375,
-0.0017385482788085938,
-0.0235443115234375,
0.0127105712890625,
-0.036163330078125,
0.074462890625,
0.05377197265625,
-0.03765869140625,
-0.00927734375,
-0.02606201171875,
0.09893798828125,
0.0094146728515625,
-0.01505279541015625,
0.046051025390625,
0.01232147216796875,
0.025634765625,
-0.01232147216796875,
0.004878997802734375,
0.01849365234375,
0.0640869140625,
-0.0100860595703125,
0.00508880615234375,
0.00748443603515625,
-0.053558349609375,
-0.040252685546875,
-0.038299560546875,
-0.0159149169921875,
0.038116455078125,
0.055267333984375,
-0.0003578662872314453,
-0.005733489990234375,
-0.0204925537109375,
-0.10723876953125,
-0.0008931159973144531,
-0.0330810546875,
0.026275634765625,
0.0141754150390625,
0.02325439453125,
0.00965118408203125,
0.0421142578125,
-0.032562255859375,
-0.0239410400390625,
-0.0241241455078125,
-0.00020611286163330078,
-0.02545166015625,
0.058380126953125,
0.01035308837890625,
0.0767822265625,
-0.0021209716796875,
-0.053955078125,
-0.001064300537109375,
-0.0374755859375,
0.035797119140625,
0.0173797607421875,
-0.029144287109375,
-0.0018987655639648438,
0.023590087890625,
-0.0017843246459960938,
0.0161895751953125,
0.03375244140625,
0.0372314453125,
0.0657958984375,
-0.0328369140625,
-0.04718017578125,
-0.060791015625,
-0.07659912109375,
0.0265960693359375,
0.0675048828125,
0.00939178466796875,
0.03057861328125,
-0.004154205322265625,
0.03350830078125,
0.00467681884765625,
-0.017822265625,
0.02459716796875,
0.00621795654296875,
0.0066680908203125,
0.0167999267578125,
-0.02197265625,
-0.024444580078125,
0.03717041015625,
0.003631591796875,
0.0029125213623046875,
0.034393310546875,
-0.01580810546875,
0.0187530517578125,
-0.0138092041015625,
-0.016204833984375,
-0.0020084381103515625,
-0.019683837890625,
0.00858306884765625,
-0.01407623291015625,
0.028594970703125,
-0.0733642578125,
0.009490966796875,
-0.01557159423828125,
0.0015935897827148438,
-0.051239013671875,
0.0296783447265625,
-0.018218994140625,
-0.0105438232421875,
0.05377197265625,
0.08074951171875,
0.0113372802734375,
-0.050262451171875,
-0.029754638671875,
0.048431396484375,
0.05035400390625,
-0.02386474609375,
-0.0005674362182617188,
0.0237274169921875,
-0.01392364501953125,
0.00276947021484375,
-0.005962371826171875,
0.02984619140625,
-0.0272979736328125,
0.0114288330078125,
0.00928497314453125,
0.014190673828125,
0.048919677734375,
-0.0101470947265625,
0.054046630859375,
-0.03424072265625,
0.0051116943359375,
0.0007076263427734375,
-0.042083740234375,
0.036376953125,
-0.05462646484375,
0.0218658447265625,
0.0528564453125,
-0.00007843971252441406,
-0.018951416015625,
0.00409698486328125,
-0.036651611328125,
-0.01113128662109375,
0.017669677734375,
-0.001781463623046875,
-0.01468658447265625,
-0.01036834716796875,
0.0850830078125,
0.048980712890625,
0.093505859375,
-0.011962890625,
-0.035308837890625,
-0.007137298583984375,
0.056976318359375,
-0.06195068359375,
-0.09173583984375,
-0.0460205078125,
-0.059661865234375,
0.0218505859375,
-0.0280914306640625,
-0.01296234130859375,
0.016357421875,
-0.00445556640625,
0.0165252685546875,
-0.046722412109375,
-0.0023593902587890625,
-0.0018320083618164062,
-0.035614013671875,
-0.0252838134765625,
0.0211181640625,
0.005680084228515625,
0.0205535888671875,
-0.00885009765625,
0.0108795166015625,
-0.0204620361328125,
-0.0171356201171875,
-0.035064697265625,
0.0216522216796875,
-0.0007061958312988281,
-0.06072998046875,
0.002223968505859375,
-0.01456451416015625,
-0.047088623046875,
0.006866455078125,
-0.02569580078125,
-0.0215911865234375,
0.01221466064453125,
-0.022491455078125,
0.006389617919921875,
-0.0116729736328125,
0.04046630859375,
0.024810791015625,
-0.03607177734375,
0.042938232421875,
0.07733154296875,
-0.01488494873046875,
0.003528594970703125,
-0.0146026611328125,
-0.035369873046875,
0.02410888671875,
0.0362548828125,
-0.0218658447265625,
-0.006267547607421875,
-0.00989532470703125,
0.03948974609375,
0.034759521484375,
-0.021331787109375,
0.02410888671875,
-0.01045989990234375,
-0.00984954833984375,
0.00576019287109375,
0.0099945068359375,
0.01171875,
-0.0208587646484375,
0.01165771484375,
-0.016265869140625,
0.005153656005859375,
-0.00873565673828125,
0.00533294677734375,
-0.023773193359375,
-0.0128631591796875,
0.024688720703125,
0.0053863525390625,
-0.006198883056640625,
0.01242828369140625,
-0.003627777099609375,
0.012603759765625,
0.05487060546875,
-0.0626220703125,
-0.0285797119140625,
0.00328826904296875,
0.020904541015625,
-0.0265045166015625,
-0.04119873046875,
-0.0289154052734375,
-0.020111083984375,
-0.02899169921875,
0.004596710205078125,
0.0237884521484375,
-0.0265655517578125,
0.00994110107421875,
-0.01316070556640625,
-0.0207061767578125,
-0.01448822021484375,
0.014801025390625,
-0.016021728515625,
0.031494140625,
-0.021942138671875,
0.0129241943359375,
-0.043487548828125,
0.0199432373046875,
-0.0286865234375,
-0.05474853515625,
-0.005222320556640625,
-0.03277587890625,
0.044036865234375,
0.028961181640625,
-0.0102691650390625,
-0.0183868408203125,
0.0157470703125,
-0.01519775390625,
0.01049041748046875,
-0.010498046875,
0.00278472900390625,
0.00991058349609375,
0.0186309814453125,
-0.00882720947265625,
-0.00418853759765625,
0.02001953125,
0.0154571533203125,
-0.01435089111328125,
0.0085601806640625,
-0.057220458984375,
-0.0292205810546875,
-0.0267486572265625,
-0.04168701171875,
-0.043487548828125,
-0.034698486328125,
-0.0167236328125,
0.027435302734375,
-0.00909423828125,
-0.0017576217651367188,
-0.036590576171875,
-0.040313720703125,
0.036712646484375,
-0.0168914794921875,
0.03509521484375,
-0.004474639892578125,
0.05615234375,
-0.0010309219360351562,
-0.0166778564453125,
0.0062713623046875,
0.0146484375,
0.032470703125,
-0.022247314453125,
0.0272216796875,
0.0009007453918457031,
-0.039520263671875,
0.0770263671875,
-0.007312774658203125,
0.040130615234375,
-0.034698486328125,
0.07830810546875,
-0.0159912109375,
-0.032623291015625,
0.048675537109375,
0.0007848739624023438,
-0.065673828125,
-0.01116943359375,
-0.01302337646484375,
0.0198974609375,
0.0321044921875,
-0.0128631591796875,
-0.04595947265625,
0.03558349609375,
0.024200439453125,
-0.0389404296875,
0.0181732177734375,
-0.035614013671875,
0.034332275390625,
0.01477813720703125,
0.0034351348876953125,
0.0085906982421875,
-0.016937255859375,
-0.034027099609375,
0.0013065338134765625,
-0.0024013519287109375,
0.007762908935546875,
0.005161285400390625,
-0.0015535354614257812,
-0.0335693359375,
-0.009185791015625,
-0.00640869140625,
0.0360107421875,
-0.0222015380859375,
-0.04638671875,
-0.0277252197265625,
-0.01409912109375,
0.0262451171875,
0.042999267578125,
0.01007080078125,
0.0296783447265625,
-0.0274505615234375,
-0.00859832763671875,
-0.007659912109375,
0.005462646484375,
-0.042633056640625,
-0.0259857177734375,
0.0160064697265625,
0.0185699462890625,
0.00836944580078125,
-0.027862548828125,
0.09051513671875,
0.05078125,
0.0229949951171875,
-0.036895751953125,
0.06439208984375,
0.0335693359375,
0.03521728515625,
0.028289794921875,
-0.021881103515625,
-0.005687713623046875,
-0.005550384521484375,
-0.06292724609375,
-0.02215576171875,
0.0011320114135742188,
0.022003173828125,
0.0012845993041992188,
0.046600341796875,
0.00044798851013183594,
0.007808685302734375,
0.006305694580078125,
-0.0264434814453125,
0.047332763671875,
0.0272216796875,
-0.044158935546875,
-0.032196044921875,
-0.00630950927734375,
0.0105743408203125,
0.0016641616821289062,
0.01483917236328125,
-0.04327392578125,
-0.0163116455078125,
-0.030029296875,
-0.0213165283203125,
-0.0357666015625,
-0.01568603515625,
-0.010467529296875,
-0.039947509765625,
0.006595611572265625,
0.025054931640625,
-0.0214080810546875,
-0.0261383056640625,
-0.00965118408203125,
-0.0281829833984375,
0.03729248046875,
-0.031524658203125,
0.0132598876953125,
-0.0262298583984375,
0.01154327392578125,
-0.03680419921875,
0.007358551025390625,
0.0435791015625,
0.026458740234375,
0.0029430389404296875,
-0.01318359375,
-0.039581298828125,
-0.019805908203125,
0.0160369873046875,
-0.0169219970703125,
-0.01071929931640625,
-0.01520538330078125,
0.049072265625,
0.036163330078125,
0.00499725341796875,
-0.0562744140625,
0.019683837890625,
-0.0175628662109375,
0.017730712890625,
0.045654296875,
-0.037017822265625,
0.08905029296875,
-0.00989532470703125,
0.0250396728515625,
-0.001949310302734375,
0.035491943359375,
-0.036102294921875,
0.0248565673828125,
-0.0240325927734375,
-0.040618896484375,
0.0289459228515625,
0.0159149169921875,
0.026641845703125,
0.0020656585693359375,
0.0146331787109375,
0.019073486328125,
-0.0189208984375,
0.005512237548828125,
-0.004451751708984375,
-0.01364898681640625,
0.035614013671875,
0.057952880859375,
0.00616455078125,
0.03436279296875,
-0.01107025146484375,
0.0170440673828125,
0.0003383159637451172,
-0.0231781005859375,
-0.0019073486328125,
0.007480621337890625,
-0.003429412841796875,
0.0168304443359375,
0.005191802978515625,
0.00445556640625,
0.054046630859375,
-0.002445220947265625,
0.0244140625,
0.043365478515625,
0.0183258056640625,
0.006481170654296875,
0.0016164779663085938,
-0.01271820068359375,
-0.0231170654296875,
0.02813720703125,
-0.00992584228515625,
-0.036834716796875,
0.0188446044921875,
-0.0280303955078125,
0.0245513916015625,
0.04632568359375,
0.059417724609375,
-0.09521484375,
0.0248565673828125,
0.00769805908203125,
-0.0111236572265625,
0.01212310791015625,
-0.0195465087890625,
0.019561767578125,
0.0008983612060546875,
0.03948974609375,
0.0308380126953125,
-0.0174713134765625,
0.0206756591796875,
-0.0033283233642578125,
-0.006343841552734375,
-0.0224151611328125,
-0.0017642974853515625,
-0.0061798095703125,
0.0014123916625976562,
0.0036983489990234375,
0.00609588623046875,
-0.005611419677734375,
-0.008270263671875,
-0.003803253173828125,
0.04052734375,
-0.031585693359375,
-0.044647216796875,
0.02569580078125,
0.00054168701171875,
-0.0216064453125,
0.014129638671875,
-0.02398681640625,
0.058074951171875,
0.0274505615234375,
0.0058135986328125,
-0.0166015625,
0.0005512237548828125,
0.01152801513671875,
-0.0026988983154296875,
-0.0223236083984375,
-0.0230865478515625,
0.0655517578125,
-0.01336669921875,
0.0211639404296875,
0.025634765625,
-0.000012755393981933594,
-0.007389068603515625,
-0.0201263427734375,
0.0528564453125,
-0.02685546875,
-0.007442474365234375,
0.044677734375,
0.005413055419921875,
-0.029022216796875,
-0.0173187255859375,
-0.031951904296875,
-0.034423828125,
0.01496124267578125,
-0.017333984375,
-0.006603240966796875,
0.0191497802734375,
0.0151214599609375,
-0.059661865234375,
0.03192138671875,
0.0187835693359375,
0.0211029052734375,
0.001499176025390625,
0.01242828369140625,
-0.023193359375,
-0.0228729248046875,
-0.053802490234375,
0.03759765625,
-0.034149169921875,
0.0643310546875,
-0.0092926025390625,
0.0225067138671875,
0.0279083251953125,
-0.012939453125,
0.029632568359375,
0.01322174072265625,
-0.034149169921875,
-0.0270233154296875,
-0.0294036865234375,
0.015228271484375,
-0.01306915283203125,
0.037384033203125,
0.034027099609375,
0.018585205078125,
0.04095458984375,
-0.0001634359359741211,
0.0263214111328125,
0.01232147216796875,
-0.008453369140625,
0.0594482421875,
0.0036258697509765625,
-0.0176849365234375,
-0.01102447509765625,
0.0474853515625,
-0.039642333984375,
0.003574371337890625,
0.014892578125,
0.0161590576171875,
-0.01152801513671875,
0.035797119140625,
0.0265655517578125,
-0.03594970703125,
-0.00033092498779296875,
-0.04815673828125,
0.045928955078125,
0.0172882080078125,
-0.01023101806640625,
0.00853729248046875,
0.00878143310546875,
-0.0006465911865234375,
-0.013336181640625,
-0.0212249755859375,
0.00672149658203125,
-0.005390167236328125,
0.071533203125,
0.03643798828125,
0.029388427734375,
-0.05059814453125,
-0.058013916015625,
0.037933349609375,
0.09869384765625,
-0.0272979736328125,
-0.043914794921875,
-0.0250701904296875,
0.0252532958984375,
0.0859375,
0.0165557861328125,
0.10491943359375,
0.00371551513671875,
0.030059814453125,
-0.006702423095703125,
-0.02362060546875,
0.006313323974609375,
0.034820556640625,
0.01192474365234375,
-0.005710601806640625,
-0.027252197265625,
-0.01425933837890625,
-0.01062774658203125,
-0.019683837890625,
0.0131683349609375,
-0.0173797607421875,
0.0209808349609375,
-0.006114959716796875,
0.040374755859375,
-0.00482177734375,
0.040435791015625,
-0.01165771484375,
-0.03118896484375,
-0.026031494140625,
-0.00846099853515625,
-0.05487060546875,
-0.0120697021484375,
0.04193115234375,
0.01271820068359375,
0.02606201171875,
0.0362548828125,
0.02587890625,
-0.01247406005859375,
-0.003223419189453125,
-0.011688232421875,
-0.031982421875,
-0.0484619140625,
-0.0017538070678710938,
0.018463134765625,
0.046630859375,
0.02069091796875,
0.01082611083984375,
0.063720703125,
0.0211181640625,
-0.044158935546875,
0.06298828125,
-0.0099029541015625,
-0.032745361328125,
0.040618896484375,
-0.040985107421875,
0.11383056640625,
-0.02752685546875,
-0.064208984375,
-0.0132598876953125,
-0.0165557861328125,
-0.022064208984375,
-0.0008625984191894531,
0.0195159912109375,
-0.0038738250732421875,
0.0208587646484375,
0.04840087890625,
0.00482940673828125,
0.0178070068359375,
-0.0183258056640625,
0.0193328857421875,
0.01178741455078125,
0.0379638671875,
0.020538330078125,
0.00875091552734375,
-0.005939483642578125,
-0.004489898681640625,
0.04547119140625,
0.0091400146484375,
0.042877197265625,
-0.0247344970703125,
0.0242156982421875,
0.0169830322265625,
0.04229736328125,
-0.0304412841796875,
0.017578125,
0.01507568359375,
-0.01093292236328125,
-0.0159759521484375,
-0.0141143798828125,
-0.049560546875,
0.05780029296875,
0.004436492919921875,
0.032073974609375,
0.031463623046875,
-0.0015497207641601562,
-0.005100250244140625,
0.0225677490234375,
-0.0152740478515625,
-0.043182373046875,
-0.034393310546875,
-0.0660400390625,
-0.020355224609375,
0.0277252197265625,
0.00223541259765625,
-0.01641845703125,
0.036041259765625,
-0.057830810546875,
-0.00565338134765625,
-0.018646240234375,
-0.01409912109375,
-0.068115234375,
0.002574920654296875,
-0.01190185546875,
0.057861328125,
-0.0209197998046875,
-0.033477783203125,
0.0305938720703125,
-0.00872802734375,
-0.024383544921875,
0.0015840530395507812,
-0.0237274169921875,
0.0101470947265625,
0.0257720947265625,
0.0667724609375,
0.01171112060546875,
0.0162200927734375,
-0.01197052001953125,
0.0007600784301757812,
0.0033702850341796875,
-0.0224761962890625,
-0.03192138671875,
-0.031951904296875,
0.0037746429443359375,
0.013916015625,
-0.016815185546875,
-0.024383544921875,
-0.0611572265625,
0.0089569091796875,
-0.0005588531494140625,
-0.00037741661071777344,
-0.06915283203125,
0.039764404296875,
-0.01532745361328125,
0.0548095703125,
-0.042633056640625,
-0.004184722900390625,
-0.000644683837890625,
0.02789306640625,
-0.00519561767578125,
-0.006134033203125,
-0.01464080810546875,
0.007282257080078125,
0.010101318359375,
-0.01448822021484375,
-0.00464630126953125,
0.0112762451171875,
-0.03045654296875,
0.004425048828125,
-0.037078857421875,
0.04754638671875,
-0.01522064208984375,
-0.0161590576171875,
-0.01727294921875,
0.007633209228515625,
-0.007160186767578125,
0.00585174560546875,
0.016510009765625,
-0.0149993896484375,
-0.05096435546875,
0.034759521484375,
-0.02593994140625,
0.0227508544921875,
-0.02532958984375,
-0.051055908203125,
0.0799560546875,
0.0101318359375,
-0.03289794921875,
-0.05401611328125,
0.0312347412109375,
0.033233642578125,
-0.0673828125,
-0.04351806640625,
-0.006099700927734375,
-0.049835205078125,
-0.00643157958984375,
0.025146484375,
-0.056854248046875,
0.051055908203125,
0.007442474365234375,
-0.0966796875,
-0.00855255126953125,
-0.01702880859375,
-0.0013341903686523438,
-0.006015777587890625,
-0.0025787353515625,
0.0341796875,
0.031951904296875,
-0.024383544921875,
0.0804443359375,
0.0151519775390625,
0.025390625,
-0.007175445556640625,
-0.0277252197265625,
0.047119140625,
0.0338134765625,
0.033538818359375,
-0.024688720703125,
-0.0195770263671875,
-0.043701171875,
-0.0115966796875,
-0.052642822265625,
-0.019287109375,
-0.01187896728515625,
0.01197052001953125,
-0.05902099609375,
-0.001354217529296875,
0.0138702392578125,
-0.028564453125,
-0.03411865234375,
0.01500701904296875,
-0.045654296875,
-0.00870513916015625,
0.034515380859375,
-0.0144805908203125,
0.020904541015625,
-0.0322265625,
0.032318115234375,
-0.021514892578125,
-0.0266265869140625,
0.03076171875,
0.008087158203125,
-0.01505279541015625,
0.04913330078125,
0.01377105712890625,
0.04150390625,
-0.052642822265625,
0.0017223358154296875,
0.01300048828125,
0.0166015625,
-0.044189453125,
-0.01297760009765625,
0.00576019287109375,
0.0271453857421875,
-0.0198974609375,
0.0380859375,
0.043304443359375,
-0.017242431640625,
0.002391815185546875,
-0.01540374755859375,
-0.02783203125,
-0.0628662109375,
-0.03338623046875,
0.0286407470703125,
0.0300750732421875,
-0.0161895751953125,
0.06781005859375,
-0.0247955322265625,
0.004730224609375,
0.0212860107421875,
0.0305023193359375,
-0.021148681640625,
0.027374267578125,
0.0244293212890625,
0.02001953125,
0.006519317626953125
] |
5aae4c4c1c9dc6e801fa156b6de07b8dbd299139
|
Wordpress Stackexchange
Q: How to initialize $wpdb? I have a .php page in the theme root to check the data of one CUSTOM form.
After receiving this data I need to do a query in a custom mysql table, so I need $wpdb, but I can't use it directly (or doing global $wpdb) because it is a phisical .php file, so the rewrite rule will not affect the request (the request is not passed to index.php because the file exists).
So In this case how can I create an object $wpdb?
Thanks
A: First of all you probably created an isolated file that is not under the umbrella of WP files. That's why you are not getting $wpdb. I guess you may not following the general rules/conventions of theme development. my question is now how are you accessing the file?
whatever, if you include the wp_config.php in your file, you will get the $wpdb in your file.
considering in a directory under themes directory, here is how you include/require the file
require_once ('../../../wp-config.php');
you may need to alter the path based on your system.
|
Q: How to initialize $wpdb? I have a .php page in the theme root to check the data of one CUSTOM form.
After receiving this data I need to do a query in a custom mysql table, so I need $wpdb, but I can't use it directly (or doing global $wpdb) because it is a phisical .php file, so the rewrite rule will not affect the request (the request is not passed to index.php because the file exists).
So In this case how can I create an object $wpdb?
Thanks
A: First of all you probably created an isolated file that is not under the umbrella of WP files. That's why you are not getting $wpdb. I guess you may not following the general rules/conventions of theme development. my question is now how are you accessing the file?
whatever, if you include the wp_config.php in your file, you will get the $wpdb in your file.
considering in a directory under themes directory, here is how you include/require the file
require_once ('../../../wp-config.php');
you may need to alter the path based on your system.
A: require_once( 'path/to/wordpress/wp-includes/wp-db.php' );
if ( file_exists( 'path/to/wordpress/wp-content/db.php' ) )
require_once( 'path/to/wordpress/wp-content/db.php' );
$wpdb = new wpdb( 'user', 'password', 'database', 'host' );
To see how WordPress initialize it, see wp-includes/load.php, line 326.
A: First, notice what user HungryCoder is saying is correct:
your file, is not being liked to WordPress
One possible solution, that will work on your dev, and Linux servers is:
include( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php');
A: Excellent solution is:
my_wpdb('test','pass', 'database', 'host', '../path/to/wp/');
function
function my_wpdb($user, $pass, $db, $host, $path_to_root= '/../../../../../../', $run_wp_config=true){
$path_to_wp= dirname(__DIR__) .$path_to_root;
//execute wp-config, if not run already
if($exec_config && !defined('DB_HOST')){ preg_match('/\<\?php(.*?)\/\* That\'s all, stop editing/si', file_get_contents($path_to_root."wp-config.php"), $found); eval($found[1]); }
require_once( $path_to_wp.'wp-includes/wp-db.php' ); if ( file_exists($path_to_wp.'wp-content/db.php' ) ) require_once($path_to_wp.'wp-content/db.php' );
return $GLOBALS['wpdb'] = new wpdb( $user, $pass, $db, $host );
}
A: Since immediately after solving this issue begins a new one - where to PUT the initialization (it's simple, but still if you don't know this, you may do some nasty things instead - like trying to modify wp-db.php). The answer is kind of implicitly hidden in @sorich87's answer, so just let's add it here explicitly:
Create db.php script in your 'wp-content/' folder.
Also, for more clean initialization than just throwing around globals, see https://stackoverflow.com/a/5418972
|
wordpress
|
{
"language": "en",
"length": 383,
"provenance": "stackexchange_00019.jsonl.gz:420947",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55625"
}
|
[
0.04541015625,
-0.00931549072265625,
-0.0005855560302734375,
-0.0562744140625,
-0.00496673583984375,
-0.0190582275390625,
-0.0006442070007324219,
-0.00865936279296875,
0.008453369140625,
0.0151214599609375,
-0.08380126953125,
0.0206451416015625,
-0.03253173828125,
0.0164031982421875,
-0.0257568359375,
-0.0377197265625,
0.0557861328125,
-0.03546142578125,
0.04400634765625,
0.00024700164794921875,
0.0183258056640625,
0.044677734375,
0.04248046875,
0.048828125,
0.02813720703125,
-0.0498046875,
0.047393798828125,
0.01513671875,
0.007450103759765625,
-0.01425933837890625,
0.028594970703125,
-0.01096343994140625,
0.01678466796875,
0.024078369140625,
0.018157958984375,
0.07257080078125,
0.037353515625,
0.007171630859375,
0.049896240234375,
0.0294647216796875,
0.0269927978515625,
-0.02288818359375,
0.00951385498046875,
0.052581787109375,
-0.0218505859375,
-0.044830322265625,
0.02703857421875,
-0.0330810546875,
0.017730712890625,
-0.00772857666015625,
0.00033211708068847656,
0.0253143310546875,
0.0160369873046875,
-0.048095703125,
-0.0021877288818359375,
0.0121917724609375,
0.01198577880859375,
-0.060760498046875,
0.020904541015625,
0.0186767578125,
-0.01502227783203125,
-0.0232696533203125,
0.03326416015625,
-0.022247314453125,
0.0247802734375,
0.0168609619140625,
0.0179901123046875,
0.040252685546875,
-0.016326904296875,
-0.0070343017578125,
-0.0094451904296875,
-0.03826904296875,
-0.0204620361328125,
0.0131988525390625,
0.0024776458740234375,
-0.0308990478515625,
0.022247314453125,
-0.0247344970703125,
-0.002490997314453125,
0.060882568359375,
-0.0237884521484375,
-0.028778076171875,
-0.041900634765625,
-0.00460052490234375,
0.006778717041015625,
0.017425537109375,
-0.0208892822265625,
-0.006839752197265625,
-0.012359619140625,
-0.0114288330078125,
-0.014404296875,
0.04132080078125,
-0.0294342041015625,
-0.005077362060546875,
-0.010833740234375,
-0.024383544921875,
-0.004070281982421875,
0.006103515625,
-0.03546142578125,
0.0092010498046875,
0.029632568359375,
-0.03204345703125,
0.038787841796875,
-0.0192413330078125,
0.0280609130859375,
0.04437255859375,
-0.0293426513671875,
-0.046295166015625,
0.0239410400390625,
0.00884246826171875,
0.00562286376953125,
0.0052337646484375,
0.0025577545166015625,
-0.0307769775390625,
-0.035186767578125,
0.0034942626953125,
-0.0176544189453125,
-0.014007568359375,
0.0179595947265625,
-0.0305328369140625,
0.01548004150390625,
0.0278472900390625,
-0.026947021484375,
-0.006927490234375,
-0.0135498046875,
-0.0295562744140625,
-0.006839752197265625,
-0.01312255859375,
-0.03387451171875,
0.0445556640625,
-0.0278778076171875,
0.00988006591796875,
0.0770263671875,
0.0303497314453125,
0.003368377685546875,
-0.0200958251953125,
0.0272369384765625,
0.029144287109375,
0.037994384765625,
0.0108184814453125,
0.03265380859375,
-0.05712890625,
-0.0445556640625,
0.039154052734375,
-0.022552490234375,
0.0350341796875,
0.032257080078125,
0.001430511474609375,
-0.033355712890625,
-0.060516357421875,
-0.00864410400390625,
0.006061553955078125,
-0.006618499755859375,
0.0433349609375,
0.0316162109375,
0.007415771484375,
0.03460693359375,
-0.033660888671875,
0.0033779144287109375,
-0.019866943359375,
-0.0037212371826171875,
-0.0178680419921875,
-0.0303192138671875,
-0.03790283203125,
-0.02545166015625,
-0.0022430419921875,
-0.0031833648681640625,
0.0272369384765625,
0.02081298828125,
-0.0021514892578125,
0.0273284912109375,
0.00885772705078125,
0.00725555419921875,
0.0173797607421875,
0.01503753662109375,
0.0182952880859375,
-0.01511383056640625,
-0.01329803466796875,
0.02325439453125,
0.041961669921875,
0.0161285400390625,
-0.01149749755859375,
0.034942626953125,
0.0019292831420898438,
-0.047393798828125,
0.03924560546875,
-0.007633209228515625,
0.05316162109375,
0.020355224609375,
0.013031005859375,
0.01198577880859375,
0.02032470703125,
-0.03704833984375,
0.053985595703125,
-0.0121002197265625,
-0.032867431640625,
-0.027618408203125,
0.006168365478515625,
-0.0198822021484375,
-0.00907135009765625,
0.00766754150390625,
-0.033477783203125,
0.024078369140625,
0.0139923095703125,
-0.04193115234375,
0.00888824462890625,
-0.02593994140625,
0.01263427734375,
0.0333251953125,
-0.0205230712890625,
0.0095672607421875,
-0.0003628730773925781,
0.0021190643310546875,
-0.061492919921875,
-0.07257080078125,
0.0323486328125,
-0.01047515869140625,
0.0650634765625,
0.00466156005859375,
0.045013427734375,
-0.005916595458984375,
-0.029571533203125,
-0.011016845703125,
-0.0088958740234375,
0.03790283203125,
-0.0025310516357421875,
-0.007198333740234375,
-0.018524169921875,
0.053863525390625,
-0.01031494140625,
0.01873779296875,
0.01715087890625,
0.00811004638671875,
0.007465362548828125,
-0.016143798828125,
-0.0293121337890625,
-0.0041351318359375,
-0.07452392578125,
0.00946044921875,
0.054107666015625,
0.042449951171875,
0.0230865478515625,
-0.01085662841796875,
-0.0196685791015625,
0.00885772705078125,
-0.054595947265625,
0.01406097412109375,
-0.026214599609375,
0.01483917236328125,
0.0203704833984375,
0.006641387939453125,
-0.0006999969482421875,
0.0283966064453125,
-0.010650634765625,
0.01285552978515625,
0.0278472900390625,
-0.040130615234375,
-0.03729248046875,
0.0186004638671875,
0.00904083251953125,
-0.0037822723388671875,
0.00571441650390625,
0.0139617919921875,
-0.007778167724609375,
0.04803466796875,
0.0074920654296875,
0.042755126953125,
0.03558349609375,
-0.0033245086669921875,
0.00927734375,
-0.007801055908203125,
-0.054840087890625,
-0.0122833251953125,
-0.01580810546875,
-0.011505126953125,
-0.0223388671875,
-0.0364990234375,
0.03033447265625,
-0.00800323486328125,
-0.0221710205078125,
-0.003231048583984375,
0.0300445556640625,
-0.0207061767578125,
-0.0190277099609375,
-0.005062103271484375,
-0.056396484375,
0.00815582275390625,
0.02008056640625,
0.0159454345703125,
-0.017730712890625,
0.0197601318359375,
0.00597381591796875,
-0.040283203125,
0.055419921875,
-0.004467010498046875,
-0.040252685546875,
0.033447265625,
-0.00836181640625,
0.0075531005859375,
-0.01461029052734375,
0.0450439453125,
0.05865478515625,
-0.012847900390625,
0.01861572265625,
-0.013763427734375,
0.01030731201171875,
0.00093841552734375,
0.01042938232421875,
-0.005496978759765625,
-0.033599853515625,
-0.045196533203125,
-0.026336669921875,
0.0143585205078125,
0.04443359375,
0.01343536376953125,
-0.03350830078125,
0.0102081298828125,
0.0242462158203125,
-0.055816650390625,
-0.0982666015625,
-0.0250396728515625,
-0.05047607421875,
0.034088134765625,
-0.0254364013671875,
-0.01480865478515625,
-0.0160064697265625,
-0.01087188720703125,
0.02105712890625,
-0.0157470703125,
-0.059417724609375,
-0.0487060546875,
-0.1087646484375,
-0.081298828125,
-0.046295166015625,
0.00510406494140625,
-0.0005660057067871094,
-0.0059356689453125,
0.049102783203125,
0.0015697479248046875,
-0.022674560546875,
-0.00010710954666137695,
0.00102996826171875,
0.008636474609375,
-0.0026340484619140625,
0.036102294921875,
-0.0244598388671875,
0.01316070556640625,
-0.000301361083984375,
0.016998291015625,
0.019744873046875,
-0.028289794921875,
-0.03338623046875,
0.033599853515625,
0.004039764404296875,
0.0120697021484375,
0.05096435546875,
-0.0228424072265625,
-0.046600341796875,
-0.005374908447265625,
-0.0792236328125,
0.004573822021484375,
-0.005084991455078125,
-0.0164642333984375,
-0.024383544921875,
0.0018053054809570312,
-0.033782958984375,
-0.009552001953125,
0.006374359130859375,
0.023681640625,
0.01306915283203125,
0.0287933349609375,
-0.01690673828125,
0.06341552734375,
-0.0004563331604003906,
0.00551605224609375,
-0.04254150390625,
0.033721923828125,
-0.015899658203125,
0.00238037109375,
0.0115966796875,
-0.0009784698486328125,
-0.00037860870361328125,
-0.033233642578125,
-0.0467529296875,
-0.05548095703125,
0.06256103515625,
0.004024505615234375,
0.0303802490234375,
-0.0472412109375,
-0.03466796875,
-0.00722503662109375,
0.09613037109375,
-0.038116455078125,
-0.007053375244140625,
-0.0135040283203125,
0.005451202392578125,
-0.050048828125,
-0.037933349609375,
-0.0307159423828125,
-0.006824493408203125,
-0.0888671875,
0.00910186767578125,
-0.0162506103515625,
-0.0171051025390625,
-0.0103912353515625,
-0.01268768310546875,
-0.040618896484375,
-0.07177734375,
0.0281829833984375,
-0.04541015625,
0.021026611328125,
0.0103912353515625,
-0.01325225830078125,
-0.0096282958984375,
-0.0181121826171875,
-0.046295166015625,
-0.0992431640625,
-0.0123138427734375,
-0.0186614990234375,
0.06524658203125,
0.005321502685546875,
0.002117156982421875,
-0.0225677490234375,
0.03424072265625,
-0.00888824462890625,
0.0012807846069335938,
-0.003704071044921875,
0.016265869140625,
-0.0350341796875,
0.0282745361328125,
0.0184326171875,
-0.01654052734375,
0.01045989990234375,
-0.00905609130859375,
0.000156402587890625,
0.038818359375,
-0.0299224853515625,
0.0009598731994628906,
-0.017578125,
-0.0162353515625,
0.004734039306640625,
-0.0110015869140625,
-0.023345947265625,
0.052276611328125,
-0.03704833984375,
0.03790283203125,
-0.042938232421875,
-0.032806396484375,
0.0234375,
0.019744873046875,
0.00506591796875,
0.00984954833984375,
0.049163818359375,
0.018280029296875,
-0.035247802734375,
-0.05511474609375,
-0.0100860595703125,
0.037933349609375,
0.01055145263671875,
0.027191162109375,
0.01593017578125,
-0.03070068359375,
0.048004150390625,
0.028594970703125,
0.012939453125,
-0.0077667236328125,
0.044464111328125,
0.0046234130859375,
-0.0226287841796875,
0.0142364501953125,
-0.0014028549194335938,
-0.0259857177734375,
0.00014269351959228516,
-0.00821685791015625,
0.01268768310546875,
0.03955078125,
-0.017242431640625,
-0.0279388427734375,
0.0134124755859375,
0.0121002197265625,
-0.03948974609375,
0.0031375885009765625,
-0.0170745849609375,
0.0611572265625,
-0.0267181396484375,
0.03289794921875,
0.0275115966796875,
0.039825439453125,
0.00803375244140625,
0.04608154296875,
0.07489013671875,
0.00814056396484375,
0.0411376953125,
0.05096435546875,
0.0113067626953125,
-0.028350830078125,
-0.0222015380859375,
0.049407958984375,
-0.0002815723419189453,
-0.034881591796875,
0.024444580078125,
-0.0256500244140625,
0.018585205078125,
0.01041412353515625,
-0.0207366943359375,
0.02532958984375,
0.01322174072265625,
-0.024261474609375,
0.024078369140625,
-0.035064697265625,
-0.004161834716796875,
-0.034332275390625,
0.08013916015625,
0.019866943359375,
0.005237579345703125,
0.0234527587890625,
0.0477294921875,
-0.0098724365234375,
0.042633056640625,
0.0021495819091796875,
0.051971435546875,
0.0091705322265625,
0.04949951171875,
0.0003352165222167969,
-0.01161956787109375,
0.01065826416015625,
0.0227203369140625,
-0.005229949951171875,
-0.027069091796875,
-0.018768310546875,
0.0005660057067871094,
0.0218658447265625,
-0.07818603515625,
-0.043365478515625,
0.07305908203125,
-0.006061553955078125,
-0.0044403076171875,
0.03106689453125,
0.020050048828125,
-0.048248291015625,
-0.019073486328125,
-0.00843048095703125,
0.00991058349609375,
-0.0097503662109375,
-0.002166748046875,
0.007137298583984375,
-0.027801513671875,
0.0262298583984375,
-0.0243988037109375,
0.005611419677734375,
-0.01018524169921875,
-0.01236724853515625,
0.03717041015625,
-0.00225067138671875,
-0.02764892578125,
-0.004055023193359375,
0.00365447998046875,
-0.0250244140625,
-0.01568603515625,
0.060028076171875,
-0.0256195068359375,
0.0237274169921875,
-0.05078125,
0.032989501953125,
-0.03155517578125,
0.001964569091796875,
0.06689453125,
0.03619384765625,
-0.01253509521484375,
-0.03204345703125,
-0.04815673828125,
-0.0114288330078125,
-0.012298583984375,
-0.049072265625,
-0.0200042724609375,
0.01216888427734375,
0.00080108642578125,
-0.00624847412109375,
-0.00061798095703125,
-0.02581787109375,
-0.007720947265625,
0.0281219482421875,
0.0215606689453125,
-0.0132293701171875,
-0.0279693603515625,
0.07208251953125,
-0.01105499267578125,
0.04510498046875,
-0.0034694671630859375,
0.0080718994140625,
-0.005214691162109375,
-0.004688262939453125,
0.024505615234375,
-0.05035400390625,
-0.0278167724609375,
-0.05096435546875,
-0.0179290771484375,
0.0213165283203125,
0.043060302734375,
-0.005184173583984375,
0.034881591796875,
-0.0130615234375,
-0.00395965576171875,
-0.007106781005859375,
-0.00176239013671875,
-0.046234130859375,
-0.0019512176513671875,
0.004566192626953125,
-0.019134521484375,
-0.008270263671875,
-0.0012559890747070312,
-0.0300750732421875,
0.0233612060546875,
-0.00032258033752441406,
-0.002964019775390625,
0.033935546875,
-0.09857177734375,
0.1097412109375,
0.0850830078125,
0.01233673095703125,
0.05908203125,
-0.012359619140625,
-0.00331878662109375,
-0.005565643310546875,
0.0293426513671875,
-0.05615234375,
-0.035736083984375,
0.0626220703125,
0.024383544921875,
-0.0270233154296875,
0.0372314453125,
-0.0222320556640625,
0.015411376953125,
0.06793212890625,
0.09503173828125,
-0.062744140625,
-0.0017175674438476562,
0.01030731201171875,
-0.0032196044921875,
0.036468505859375,
-0.0007910728454589844,
-0.035919189453125,
-0.041473388671875,
0.026092529296875,
-0.0091400146484375,
-0.017486572265625,
0.01560211181640625,
0.01326751708984375,
0.00038623809814453125,
-0.00804901123046875,
0.0841064453125,
0.015899658203125,
-0.0151214599609375,
0.01482391357421875,
-0.02764892578125,
0.034576416015625,
0.00371551513671875,
0.02740478515625,
0.005626678466796875,
0.000028312206268310547,
-0.0241851806640625,
0.01441192626953125,
-0.0119476318359375,
-0.034820556640625,
0.01910400390625,
-0.006893157958984375,
0.0294952392578125,
0.032440185546875,
0.0084228515625,
0.0113983154296875,
-0.0096435546875,
0.0206451416015625,
-0.0242462158203125,
-0.0122528076171875,
0.00836181640625,
0.052154541015625,
-0.03741455078125,
0.0218963623046875,
-0.02191162109375,
0.0156402587890625,
0.002658843994140625,
-0.00159454345703125,
0.056732177734375,
-0.0160675048828125,
-0.0200042724609375,
0.023223876953125,
0.038055419921875,
-0.00035881996154785156,
-0.02020263671875,
0.0128021240234375,
-0.05010986328125,
-0.01593017578125,
-0.004085540771484375,
-0.020477294921875,
-0.005908966064453125,
-0.0165557861328125,
-0.0288543701171875,
0.0858154296875,
-0.0176239013671875,
0.0225830078125,
0.05023193359375,
0.0289459228515625,
-0.01250457763671875,
0.0264129638671875,
-0.029022216796875,
0.032623291015625,
0.0200958251953125,
0.07049560546875,
-0.03448486328125,
-0.0234222412109375,
0.032958984375,
0.06646728515625,
0.0380859375,
0.00004887580871582031,
0.0216827392578125,
0.00505828857421875,
0.050323486328125,
0.01336669921875,
-0.020050048828125,
0.0191650390625,
0.014739990234375,
0.0270843505859375,
0.0234527587890625,
-0.0037822723388671875,
0.03900146484375,
-0.03131103515625,
-0.018707275390625,
0.02496337890625,
0.0120697021484375,
-0.003246307373046875,
0.030914306640625,
0.00847625732421875,
-0.0225677490234375,
0.01861572265625,
0.014434814453125,
0.0177764892578125,
-0.03564453125,
0.01629638671875,
-0.01314544677734375,
0.022979736328125,
-0.0283966064453125,
-0.0155029296875,
0.0221710205078125,
0.030364990234375,
0.00568389892578125,
0.00616455078125,
0.0012063980102539062,
0.04974365234375,
-0.033416748046875,
-0.01885986328125,
0.006938934326171875,
-0.01125335693359375,
0.058441162109375,
0.0251922607421875,
0.036224365234375,
-0.035552978515625,
-0.02276611328125,
0.0191650390625,
0.07080078125,
-0.04150390625,
-0.0162353515625,
0.01381683349609375,
0.0133209228515625,
-0.01247406005859375,
-0.02716064453125,
-0.00342559814453125,
0.040283203125,
0.04083251953125,
-0.01277923583984375,
0.016998291015625,
0.0139617919921875,
-0.0088653564453125,
-0.007171630859375,
0.01473236083984375,
-0.02081298828125,
0.0310211181640625,
0.0178680419921875,
-0.0184478759765625,
0.0166015625,
0.0197906494140625,
-0.0014963150024414062,
0.0233612060546875,
-0.024566650390625,
0.0153045654296875,
-0.0201873779296875,
0.05255126953125,
0.00901031494140625,
0.01091766357421875,
-0.01409149169921875,
-0.026336669921875,
0.0203704833984375,
0.01180267333984375,
0.0147705078125,
0.01284027099609375,
0.02349853515625,
0.009796142578125,
-0.0201568603515625,
-0.002838134765625,
0.0159759521484375,
-0.026031494140625,
-0.043182373046875,
-0.024139404296875,
0.028167724609375,
0.00818634033203125,
0.025970458984375,
-0.006938934326171875,
0.0850830078125,
-0.0189666748046875,
-0.01558685302734375,
0.0122528076171875,
-0.0011262893676757812,
-0.05413818359375,
0.018035888671875,
-0.032012939453125,
0.1016845703125,
0.00247955322265625,
-0.052947998046875,
-0.01453399658203125,
-0.004978179931640625,
-0.041656494140625,
0.02081298828125,
0.04803466796875,
0.00467681884765625,
-0.0042266845703125,
0.0189361572265625,
0.01206207275390625,
-0.01177978515625,
-0.00594329833984375,
-0.0118865966796875,
-0.049652099609375,
0.037353515625,
0.00039649009704589844,
-0.04766845703125,
-0.05450439453125,
-0.01512908935546875,
0.058380126953125,
-0.0013093948364257812,
0.0718994140625,
-0.045440673828125,
0.0246734619140625,
-0.0299224853515625,
0.0260772705078125,
-0.04541015625,
-0.018341064453125,
0.01396942138671875,
0.0020656585693359375,
0.015289306640625,
-0.0106964111328125,
-0.0302276611328125,
-0.0001914501190185547,
0.03778076171875,
-0.037689208984375,
0.0018033981323242188,
-0.0283966064453125,
0.03436279296875,
-0.019287109375,
0.037322998046875,
-0.0159759521484375,
-0.030853271484375,
-0.028533935546875,
0.0162811279296875,
0.03924560546875,
0.0318603515625,
-0.0256195068359375,
0.01221466064453125,
0.01284027099609375,
-0.007396697998046875,
0.01456451416015625,
0.005542755126953125,
0.01092529296875,
0.0289459228515625,
-0.0099639892578125,
-0.0816650390625,
-0.009918212890625,
-0.01514434814453125,
-0.0450439453125,
0.011474609375,
0.056427001953125,
-0.005970001220703125,
-0.0209197998046875,
0.0005178451538085938,
0.0404052734375,
0.042144775390625,
0.0033702850341796875,
0.00506591796875,
0.016082763671875,
-0.0229339599609375,
-0.020904541015625,
-0.0374755859375,
-0.01178741455078125,
-0.0286712646484375,
-0.0298614501953125,
0.04022216796875,
-0.032257080078125,
-0.01548004150390625,
-0.0662841796875,
0.0404052734375,
0.040802001953125,
0.004047393798828125,
-0.08892822265625,
0.04840087890625,
-0.048065185546875,
0.0853271484375,
-0.02764892578125,
0.005405426025390625,
-0.00032210350036621094,
0.007049560546875,
-0.03338623046875,
-0.01326751708984375,
-0.01154327392578125,
0.0241241455078125,
0.011871337890625,
0.0247650146484375,
0.0367431640625,
-0.0302886962890625,
0.0191192626953125,
0.03271484375,
0.015625,
0.09185791015625,
-0.0175323486328125,
-0.035491943359375,
-0.0177001953125,
0.0211029052734375,
-0.01073455810546875,
-0.07147216796875,
0.0015726089477539062,
-0.06976318359375,
0.03271484375,
-0.036041259765625,
-0.004085540771484375,
-0.016876220703125,
-0.0672607421875,
-0.0914306640625,
0.04107666015625,
-0.015380859375,
-0.035491943359375,
-0.052978515625,
-0.00775146484375,
0.00897979736328125,
0.0206756591796875,
-0.00809478759765625,
-0.045745849609375,
-0.047607421875,
0.0209503173828125,
0.0110015869140625,
0.0058441162109375,
0.008819580078125,
0.0187835693359375,
-0.09808349609375,
0.0088653564453125,
-0.0163421630859375,
0.005523681640625,
-0.007045745849609375,
0.01129150390625,
0.0233917236328125,
0.058563232421875,
-0.0006322860717773438,
-0.0322265625,
-0.0142822265625,
-0.052276611328125,
-0.00897979736328125,
-0.004840850830078125,
-0.0245513916015625,
-0.0041656494140625,
0.0247344970703125,
0.06640625,
0.007053375244140625,
-0.0284881591796875,
-0.00008225440979003906,
-0.04412841796875,
-0.054107666015625,
-0.003673553466796875,
0.01910400390625,
-0.04730224609375,
0.0177001953125,
0.0313720703125,
-0.006221771240234375,
-0.0025997161865234375,
0.008331298828125,
-0.0236053466796875,
0.001678466796875,
0.0302581787109375,
-0.0004858970642089844,
-0.01328277587890625,
-0.094482421875,
0.041900634765625,
-0.0177001953125,
-0.0022258758544921875,
-0.003185272216796875,
0.0665283203125,
0.0066986083984375,
-0.0010843276977539062,
-0.0012569427490234375,
0.04656982421875,
-0.0129852294921875,
0.0098419189453125,
0.0167999267578125,
0.00580596923828125,
-0.021392822265625,
0.0172576904296875,
-0.007080078125,
0.0132293701171875,
0.004940032958984375,
0.00586700439453125,
-0.0059814453125,
0.056732177734375,
0.0056304931640625,
0.037261962890625,
0.00786590576171875,
-0.0361328125,
-0.0237274169921875,
0.05877685546875,
-0.03167724609375,
-0.017425537109375,
-0.01422882080078125,
-0.01139068603515625,
0.00457000732421875,
-0.0049896240234375,
-0.0235595703125,
-0.0277862548828125,
-0.005237579345703125,
-0.046295166015625,
-0.01079559326171875,
0.0023746490478515625
] |
85b9ebdfa137fd3b19ec370a6deeeb01c13c325a
|
Wordpress Stackexchange
Q: How to get the post publish date outside the loop? I need to pull out the post publish date in order to make the post post auto expire. The thing is I can't get the right publish date.
Here is my code:
global $wpdb;
$post_ids = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_status ='publish'" );
foreach($post_ids as $id){
$postdate = get_the_date("Y-m-d",$id ); //here is what I can figure out
.......
......etc
}
When I echo the $postdate, it come out with a wrong date. Not the date that exist in the wp_posts table.
How can I get the date properly?
A: You can use get_post() or get_post_field() for this, both work outside the loop.
$post_object = get_post($id);
$post_date = date( 'F jS, Y', strtotime( $post_object->post_date ) );
A full list of values returned by get_post:
WP_Post Object
(
[ID] =>
[post_author] =>
[post_date] =>
[post_date_gmt] =>
[post_content] =>
[post_title] =>
[post_excerpt] =>
[post_status] =>
[comment_status] =>
[ping_status] =>
[post_password] =>
[post_name] =>
[to_ping] =>
[pinged] =>
[post_modified] =>
[post_modified_gmt] =>
[post_content_filtered] =>
[post_parent] =>
[guid] =>
[menu_order] =>
[post_type] =>
[post_mime_type] =>
[comment_count] =>
[filter] =>
)
|
Q: How to get the post publish date outside the loop? I need to pull out the post publish date in order to make the post post auto expire. The thing is I can't get the right publish date.
Here is my code:
global $wpdb;
$post_ids = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_status ='publish'" );
foreach($post_ids as $id){
$postdate = get_the_date("Y-m-d",$id ); //here is what I can figure out
.......
......etc
}
When I echo the $postdate, it come out with a wrong date. Not the date that exist in the wp_posts table.
How can I get the date properly?
A: You can use get_post() or get_post_field() for this, both work outside the loop.
$post_object = get_post($id);
$post_date = date( 'F jS, Y', strtotime( $post_object->post_date ) );
A full list of values returned by get_post:
WP_Post Object
(
[ID] =>
[post_author] =>
[post_date] =>
[post_date_gmt] =>
[post_content] =>
[post_title] =>
[post_excerpt] =>
[post_status] =>
[comment_status] =>
[ping_status] =>
[post_password] =>
[post_name] =>
[to_ping] =>
[pinged] =>
[post_modified] =>
[post_modified_gmt] =>
[post_content_filtered] =>
[post_parent] =>
[guid] =>
[menu_order] =>
[post_type] =>
[post_mime_type] =>
[comment_count] =>
[filter] =>
)
A: get_the_date must be used inside the Loop. For outside the loop use get_the_time.
$posts = get_posts(array('numberposts'=>-1)); //Get all published posts
foreach ($posts as $post){
echo get_the_time('Y-m-d', $post->ID); //Echos date in Y-m-d format.
}
Consider replacing 'Y-m-d' in this example with get_option('date_format') as this will display the date as per your date format setting in wp-admin.
A: Some Modern soultions
Solution One
<?php echo get_the_date('j F Y', get_the_ID()) ?>
Solution Two
<?php the_time(get_option('date_format')) ?>
A: try like this
$getPosts = $wpdb->get_results(
"
SELECT ID, post_date,post_title
FROM $wpdb->posts
WHERE post_status = 'publish'
AND post_type = 'post'
ORDER BY ID ASC
"
);
foreach ( $getPosts as $myPost ) {
$id = $myPost->post_date;
echo $myPost->ID.' | '. $myPost->post_title.' | '. get_the_date("Y-m-d",$id ).'<br />';
}
edit
get_the_time Returns the time of the current post for use in PHP. It does not display the time. To display the time of a post, use the_time(). This tag must be used within The Loop.
get_the_date The get_the_date template tag retrieves the date the current $post was written. Unlike the_date() this tag will always return the date. Modify output with 'get_the_date' filter.
Am I missing something here?
|
wordpress
|
{
"language": "en",
"length": 378,
"provenance": "stackexchange_00019.jsonl.gz:420983",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55739"
}
|
[
0.0287017822265625,
0.005764007568359375,
-0.0034885406494140625,
-0.0190582275390625,
0.006591796875,
-0.01351165771484375,
0.021514892578125,
-0.0189971923828125,
-0.0017518997192382812,
0.033111572265625,
0.0073394775390625,
0.00962066650390625,
-0.04705810546875,
-0.0113983154296875,
-0.0386962890625,
-0.00806427001953125,
0.040740966796875,
-0.047515869140625,
0.0281524658203125,
-0.006710052490234375,
-0.0216217041015625,
0.01342010498046875,
0.0631103515625,
-0.005611419677734375,
0.0272674560546875,
-0.0124664306640625,
0.06549072265625,
-0.016845703125,
0.05047607421875,
0.006290435791015625,
0.0259246826171875,
-0.047515869140625,
0.0194091796875,
0.0006852149963378906,
0.01279449462890625,
0.02459716796875,
0.01262664794921875,
0.0044708251953125,
-0.011962890625,
0.051605224609375,
0.0159454345703125,
-0.003208160400390625,
0.004913330078125,
0.0243682861328125,
-0.029693603515625,
-0.01126861572265625,
-0.0018701553344726562,
-0.0240631103515625,
0.037139892578125,
0.0279998779296875,
0.00597381591796875,
0.005580902099609375,
0.01451873779296875,
0.0357666015625,
-0.0250701904296875,
-0.01434326171875,
0.004901885986328125,
0.01605224609375,
0.057525634765625,
-0.020416259765625,
-0.0665283203125,
-0.0196075439453125,
0.035003662109375,
-0.0443115234375,
-0.000980377197265625,
-0.0015811920166015625,
0.052490234375,
0.0035305023193359375,
-0.054901123046875,
-0.0189361572265625,
0.040496826171875,
-0.0174560546875,
-0.042938232421875,
-0.0010776519775390625,
-0.0285797119140625,
-0.01366424560546875,
-0.00446319580078125,
-0.04541015625,
0.00769805908203125,
0.0278778076171875,
0.006755828857421875,
0.0272979736328125,
-0.0745849609375,
-0.0134429931640625,
0.022186279296875,
0.01076507568359375,
-0.01448822021484375,
-0.037261962890625,
-0.06817626953125,
-0.029541015625,
-0.047943115234375,
-0.019134521484375,
-0.05084228515625,
-0.031219482421875,
-0.008392333984375,
-0.043182373046875,
0.0218963623046875,
0.106201171875,
-0.033477783203125,
-0.00583648681640625,
-0.046051025390625,
0.0081939697265625,
-0.05413818359375,
-0.043731689453125,
-0.007396697998046875,
0.03375244140625,
0.032623291015625,
0.03350830078125,
0.0252685546875,
0.0022106170654296875,
-0.005428314208984375,
0.025421142578125,
-0.03741455078125,
-0.0150604248046875,
-0.023193359375,
0.0400390625,
-0.0251617431640625,
-0.0246429443359375,
-0.0275115966796875,
-0.02783203125,
0.022125244140625,
0.032684326171875,
-0.033599853515625,
-0.022796630859375,
-0.00881195068359375,
-0.0183258056640625,
-0.027191162109375,
0.0031299591064453125,
0.0162811279296875,
0.0399169921875,
-0.035369873046875,
-0.00904083251953125,
0.04534912109375,
0.0133056640625,
0.02008056640625,
-0.03607177734375,
0.007610321044921875,
-0.0226898193359375,
-0.016204833984375,
0.017364501953125,
-0.0171966552734375,
-0.040191650390625,
0.0157623291015625,
-0.020263671875,
-0.03912353515625,
0.023712158203125,
0.0228271484375,
-0.00547027587890625,
-0.0293731689453125,
-0.03887939453125,
-0.03753662109375,
0.009796142578125,
0.05145263671875,
-0.00128936767578125,
-0.0187225341796875,
-0.049957275390625,
0.0162200927734375,
-0.052276611328125,
0.0188446044921875,
-0.06903076171875,
0.0352783203125,
0.00643157958984375,
-0.007785797119140625,
-0.01959228515625,
-0.04193115234375,
-0.0297393798828125,
-0.053619384765625,
-0.0194091796875,
0.018768310546875,
0.01050567626953125,
0.007274627685546875,
-0.034027099609375,
0.019561767578125,
0.0008783340454101562,
-0.0185546875,
0.040313720703125,
0.0009012222290039062,
-0.048614501953125,
0.018707275390625,
-0.012664794921875,
-0.050323486328125,
-0.036346435546875,
-0.0220794677734375,
-0.0018148422241210938,
-0.002681732177734375,
0.00226593017578125,
0.03131103515625,
0.01261138916015625,
-0.0166778564453125,
0.01554107666015625,
0.0188140869140625,
0.037384033203125,
-0.050262451171875,
0.047271728515625,
-0.0152740478515625,
-0.0173797607421875,
0.006114959716796875,
0.0207366943359375,
-0.00041794776916503906,
-0.029815673828125,
0.005504608154296875,
0.04095458984375,
-0.0193939208984375,
0.0418701171875,
-0.05609130859375,
0.0384521484375,
-0.037506103515625,
0.026458740234375,
-0.00174713134765625,
0.021575927734375,
0.01983642578125,
-0.004016876220703125,
-0.0200347900390625,
-0.0330810546875,
-0.0144500732421875,
0.038238525390625,
-0.024749755859375,
0.02166748046875,
-0.0156707763671875,
0.034088134765625,
-0.0318603515625,
-0.030670166015625,
-0.02593994140625,
0.018157958984375,
0.09246826171875,
-0.0054473876953125,
0.0015468597412109375,
-0.0232391357421875,
0.093994140625,
0.019500732421875,
-0.02471923828125,
-0.01116180419921875,
0.00525665283203125,
0.0084228515625,
-0.0274505615234375,
-0.01422119140625,
0.0077972412109375,
-0.065673828125,
0.01171112060546875,
0.06317138671875,
0.033203125,
0.0312347412109375,
-0.014739990234375,
-0.009429931640625,
0.0557861328125,
-0.04486083984375,
-0.012664794921875,
-0.002300262451171875,
0.027130126953125,
0.038238525390625,
-0.0211181640625,
-0.01300048828125,
0.0255584716796875,
-0.06341552734375,
0.00803375244140625,
0.044708251953125,
-0.0184478759765625,
-0.0220947265625,
-0.004085540771484375,
0.01540374755859375,
0.003513336181640625,
-0.05706787109375,
-0.032958984375,
-0.019195556640625,
0.017425537109375,
-0.004360198974609375,
0.0457763671875,
0.042327880859375,
0.0038089752197265625,
-0.03106689453125,
0.0014390945434570312,
0.013092041015625,
0.00749969482421875,
0.0098114013671875,
-0.047119140625,
0.01031494140625,
0.0137939453125,
0.003162384033203125,
-0.01445770263671875,
-0.0082855224609375,
0.00685882568359375,
0.03131103515625,
0.043487548828125,
0.005359649658203125,
0.0011396408081054688,
-0.01268768310546875,
0.0270538330078125,
0.0112152099609375,
0.03167724609375,
0.03692626953125,
0.033447265625,
0.033447265625,
-0.029510498046875,
0.07843017578125,
0.0268096923828125,
-0.00592041015625,
-0.0266571044921875,
-0.0294189453125,
0.043212890625,
-0.0295867919921875,
0.003604888916015625,
0.046051025390625,
-0.00727081298828125,
0.0172576904296875,
-0.005733489990234375,
-0.008148193359375,
0.0037136077880859375,
-0.01739501953125,
-0.02154541015625,
0.0164947509765625,
-0.06500244140625,
0.041534423828125,
0.012176513671875,
0.06982421875,
-0.03155517578125,
-0.06317138671875,
-0.0224761962890625,
0.007762908935546875,
-0.1248779296875,
-0.09442138671875,
-0.01544952392578125,
-0.05572509765625,
-0.0138092041015625,
-0.02117919921875,
-0.0175018310546875,
0.0207672119140625,
-0.0247039794921875,
0.007602691650390625,
-0.00551605224609375,
-0.00981903076171875,
-0.04718017578125,
-0.0257110595703125,
-0.0384521484375,
-0.0012331008911132812,
-0.004489898681640625,
0.007167816162109375,
0.0018377304077148438,
0.089111328125,
0.019256591796875,
-0.09637451171875,
-0.05902099609375,
0.0562744140625,
-0.043548583984375,
-0.02044677734375,
-0.0282440185546875,
0.0236358642578125,
-0.0085601806640625,
0.01036834716796875,
-0.0069580078125,
-0.01541900634765625,
-0.007053375244140625,
-0.02398681640625,
-0.0032291412353515625,
0.01537322998046875,
0.057708740234375,
-0.0169830322265625,
-0.02838134765625,
0.06365966796875,
0.05108642578125,
-0.0147247314453125,
-0.0227203369140625,
-0.00611114501953125,
-0.0423583984375,
0.0217437744140625,
0.022430419921875,
0.007537841796875,
0.00783538818359375,
0.0012865066528320312,
0.0030059814453125,
-0.019287109375,
0.05035400390625,
-0.02154541015625,
0.0196380615234375,
-0.0018529891967773438,
-0.0109100341796875,
-0.028167724609375,
0.005168914794921875,
-0.01100921630859375,
0.01439666748046875,
-0.00804901123046875,
0.04205322265625,
0.01337432861328125,
0.01041412353515625,
-0.041961669921875,
-0.06304931640625,
0.0521240234375,
-0.041473388671875,
-0.016845703125,
-0.0521240234375,
-0.038360595703125,
-0.00534820556640625,
0.1060791015625,
0.0010766983032226562,
-0.01776123046875,
-0.031890869140625,
0.00888824462890625,
-0.031158447265625,
-0.044647216796875,
-0.00811004638671875,
0.00699615478515625,
-0.078125,
0.0197906494140625,
-0.0202178955078125,
0.0024738311767578125,
-0.018280029296875,
0.0275421142578125,
-0.03204345703125,
-0.048004150390625,
0.0275726318359375,
0.04541015625,
0.0016660690307617188,
0.050323486328125,
-0.0215301513671875,
0.044158935546875,
-0.036865234375,
0.0027618408203125,
-0.01338958740234375,
-0.01544189453125,
0.03680419921875,
0.008758544921875,
0.0074310302734375,
-0.0287322998046875,
0.0159149169921875,
0.0364990234375,
0.006000518798828125,
0.0145416259765625,
-0.0112152099609375,
-0.018218994140625,
-0.0159912109375,
0.0277557373046875,
0.0164794921875,
0.00106048583984375,
-0.01019287109375,
0.01050567626953125,
-0.033721923828125,
0.038482666015625,
-0.003383636474609375,
0.0232086181640625,
0.029266357421875,
-0.01641845703125,
0.019561767578125,
-0.0003666877746582031,
0.01335906982421875,
0.046356201171875,
-0.01141357421875,
-0.0068817138671875,
-0.029510498046875,
-0.00276947021484375,
0.08477783203125,
0.0478515625,
0.01099395751953125,
-0.018524169921875,
0.090576171875,
0.0031833648681640625,
-0.07049560546875,
-0.03497314453125,
-0.00409698486328125,
0.042236328125,
-0.015625,
0.006031036376953125,
-0.004932403564453125,
-0.0458984375,
0.055084228515625,
-0.00020503997802734375,
-0.042633056640625,
0.00628662109375,
0.06866455078125,
0.0227203369140625,
0.0150604248046875,
-0.0192413330078125,
-0.034515380859375,
0.044342041015625,
0.01367950439453125,
-0.004932403564453125,
0.00897216796875,
0.031951904296875,
0.04217529296875,
-0.01464080810546875,
0.006099700927734375,
-0.036163330078125,
-0.058380126953125,
0.0146331787109375,
0.0013933181762695312,
-0.0071868896484375,
0.006237030029296875,
0.0019664764404296875,
0.0088348388671875,
0.0050811767578125,
0.00860595703125,
-0.0310821533203125,
-0.0220489501953125,
-0.0027904510498046875,
0.032440185546875,
0.00690460205078125,
0.00689697265625,
-0.01233673095703125,
-0.0011157989501953125,
0.0250701904296875,
-0.026031494140625,
-0.040130615234375,
0.011474609375,
-0.0167388916015625,
-0.0266876220703125,
0.048675537109375,
-0.0164031982421875,
0.032318115234375,
0.05743408203125,
-0.027496337890625,
-0.0047454833984375,
-0.01116180419921875,
0.0277252197265625,
-0.03997802734375,
0.0140228271484375,
0.00554656982421875,
-0.005794525146484375,
0.052642822265625,
0.049530029296875,
0.01540374755859375,
0.0362548828125,
-0.040191650390625,
0.07080078125,
0.0204620361328125,
0.045379638671875,
-0.003734588623046875,
-0.01152801513671875,
0.01203155517578125,
0.005825042724609375,
-0.028717041015625,
-0.0211334228515625,
-0.0039520263671875,
0.003353118896484375,
0.005764007568359375,
-0.0018949508666992188,
0.0094146728515625,
0.030731201171875,
0.018035888671875,
-0.043365478515625,
0.03668212890625,
0.08941650390625,
0.016845703125,
-0.022857666015625,
-0.0347900390625,
-0.0073699951171875,
0.07977294921875,
-0.022613525390625,
-0.020416259765625,
-0.03759765625,
-0.006679534912109375,
-0.0307159423828125,
-0.01406097412109375,
0.0016222000122070312,
0.002117156982421875,
-0.004886627197265625,
-0.039642333984375,
-0.0261688232421875,
0.0174560546875,
0.0113372802734375,
-0.0156707763671875,
-0.0087738037109375,
0.0207977294921875,
-0.046417236328125,
0.03515625,
-0.045196533203125,
0.041839599609375,
-0.060150146484375,
0.00025010108947753906,
0.07366943359375,
0.07562255859375,
0.005908966064453125,
-0.0102081298828125,
-0.042388916015625,
-0.0115203857421875,
0.0091094970703125,
-0.0267333984375,
-0.0097503662109375,
-0.01904296875,
0.02392578125,
0.04296875,
0.0024738311767578125,
-0.0289459228515625,
-0.0103759765625,
-0.0172882080078125,
0.00982666015625,
0.057525634765625,
-0.0108642578125,
0.08697509765625,
-0.00972747802734375,
0.0550537109375,
0.0198974609375,
0.0242156982421875,
-0.0543212890625,
-0.005832672119140625,
0.0009737014770507812,
-0.038787841796875,
-0.005840301513671875,
0.016845703125,
-0.0308837890625,
-0.057769775390625,
-0.030853271484375,
-0.0013265609741210938,
0.01953125,
-0.004665374755859375,
-0.00494384765625,
-0.017242431640625,
-0.002719879150390625,
-0.012451171875,
0.038665771484375,
-0.0222320556640625,
-0.033294677734375,
-0.0211944580078125,
0.0198822021484375,
0.045257568359375,
-0.01788330078125,
-0.03411865234375,
-0.0191192626953125,
0.007122039794921875,
-0.00936126708984375,
0.0377197265625,
0.06884765625,
-0.01352691650390625,
0.056243896484375,
0.0197296142578125,
0.0197296142578125,
0.051727294921875,
0.0018138885498046875,
-0.02099609375,
-0.0307464599609375,
0.0390625,
0.0004584789276123047,
-0.02203369140625,
0.04071044921875,
-0.02069091796875,
0.032012939453125,
-0.0037174224853515625,
0.039337158203125,
-0.00830841064453125,
0.0196075439453125,
0.004009246826171875,
-0.034210205078125,
0.048828125,
0.00484466552734375,
0.004207611083984375,
0.005702972412109375,
0.04461669921875,
-0.042022705078125,
-0.019744873046875,
0.0181121826171875,
-0.00511932373046875,
0.01012420654296875,
-0.0208740234375,
0.039215087890625,
-0.0024394989013671875,
-0.0460205078125,
-0.00476837158203125,
0.0243682861328125,
0.0140380859375,
-0.0008521080017089844,
-0.0265960693359375,
-0.018829345703125,
-0.00652313232421875,
-0.0628662109375,
-0.034912109375,
-0.07080078125,
0.0201263427734375,
-0.0028400421142578125,
0.01306915283203125,
0.043365478515625,
0.032928466796875,
0.011138916015625,
-0.01450347900390625,
0.0087738037109375,
0.0081787109375,
-0.042572021484375,
-0.004306793212890625,
-0.006847381591796875,
0.04730224609375,
0.00849151611328125,
0.0234375,
-0.0054473876953125,
-0.003391265869140625,
0.003963470458984375,
-0.02178955078125,
0.019439697265625,
-0.049041748046875,
-0.0010433197021484375,
0.038055419921875,
0.015472412109375,
-0.0012769699096679688,
0.003833770751953125,
0.041595458984375,
-0.00838470458984375,
0.0206451416015625,
0.018402099609375,
0.044464111328125,
-0.021942138671875,
0.00685882568359375,
-0.046173095703125,
0.067138671875,
-0.0198516845703125,
0.0236968994140625,
0.034698486328125,
0.02020263671875,
-0.0302276611328125,
-0.0193023681640625,
-0.055694580078125,
0.058319091796875,
-0.0170440673828125,
0.036895751953125,
-0.0726318359375,
-0.005275726318359375,
-0.0027790069580078125,
0.020172119140625,
0.060333251953125,
0.0137481689453125,
-0.054718017578125,
-0.0206146240234375,
0.053009033203125,
0.0538330078125,
0.0174560546875,
0.0283355712890625,
0.0078277587890625,
0.032073974609375,
0.034149169921875,
-0.0552978515625,
0.028106689453125,
-0.030242919921875,
0.007640838623046875,
0.021881103515625,
0.013458251953125,
-0.0010528564453125,
0.0148162841796875,
-0.03411865234375,
-0.0139007568359375,
0.0008749961853027344,
0.0007257461547851562,
-0.018218994140625,
0.04266357421875,
0.0010156631469726562,
0.058868408203125,
-0.08355712890625,
-0.037567138671875,
-0.01306915283203125,
0.046112060546875,
0.01325225830078125,
-0.0323486328125,
-0.01245880126953125,
-0.00201416015625,
0.004425048828125,
-0.007598876953125,
-0.0221099853515625,
0.019805908203125,
0.01227569580078125,
0.053070068359375,
0.01313018798828125,
0.0200347900390625,
-0.038482666015625,
0.00936126708984375,
0.032958984375,
0.041351318359375,
-0.03326416015625,
0.0207977294921875,
0.0148773193359375,
-0.004535675048828125,
-0.0294952392578125,
-0.036712646484375,
-0.007091522216796875,
-0.0227203369140625,
-0.02789306640625,
-0.0012989044189453125,
-0.0018329620361328125,
0.02508544921875,
0.055694580078125,
0.012054443359375,
0.0055084228515625,
-0.06451416015625,
-0.041839599609375,
-0.040191650390625,
0.019561767578125,
0.024505615234375,
0.05010986328125,
0.0012950897216796875,
0.05999755859375,
-0.023468017578125,
-0.01959228515625,
0.040863037109375,
-0.007129669189453125,
0.030181884765625,
-0.050567626953125,
0.048004150390625,
-0.01116180419921875,
0.0234222412109375,
0.006862640380859375,
-0.0023651123046875,
-0.0205841064453125,
0.03692626953125,
0.0306396484375,
-0.064453125,
-0.025238037109375,
0.01428985595703125,
-0.02862548828125,
-0.0423583984375,
-0.03253173828125,
-0.0107269287109375,
-0.001605987548828125,
0.01418304443359375,
0.01904296875,
0.055755615234375,
-0.028289794921875,
-0.05096435546875,
0.042236328125,
-0.020660400390625,
-0.000002086162567138672,
0.063720703125,
-0.032745361328125,
0.039154052734375,
-0.044036865234375,
-0.0307464599609375,
0.0110321044921875,
-0.00894927978515625,
-0.01213836669921875,
-0.0018262863159179688,
0.01184844970703125,
-0.004619598388671875,
0.027679443359375,
-0.00995635986328125,
0.0206451416015625,
0.005992889404296875,
-0.040069580078125,
0.00527191162109375,
0.006381988525390625,
0.01116943359375,
-0.0005998611450195312,
-0.038116455078125,
-0.0296630859375,
-0.020599365234375,
0.02789306640625,
0.0175323486328125,
0.008453369140625,
0.005405426025390625,
0.0306243896484375,
-0.031646728515625,
0.02703857421875,
-0.07989501953125,
-0.03875732421875,
0.028167724609375,
-0.036895751953125,
-0.0225982666015625,
0.013153076171875,
0.0251312255859375,
0.0201873779296875,
0.05828857421875,
-0.007450103759765625,
0.0075531005859375,
-0.0321044921875,
0.027435302734375,
-0.028289794921875,
-0.004497528076171875,
-0.0291290283203125,
0.0214080810546875,
0.029815673828125,
-0.0227508544921875,
0.030303955078125,
-0.00377655029296875,
0.0207977294921875,
0.032073974609375,
0.0275115966796875,
-0.0097503662109375,
0.0555419921875,
-0.031890869140625,
0.08062744140625,
0.03643798828125,
-0.0380859375,
0.0007872581481933594,
-0.0220947265625,
-0.01947021484375,
-0.0162506103515625,
0.016693115234375,
0.0136871337890625,
-0.026336669921875,
0.0173797607421875,
-0.0230865478515625,
-0.00467681884765625,
0.0265655517578125,
-0.0290069580078125,
0.01247406005859375,
0.021331787109375,
-0.00801849365234375,
-0.035858154296875,
-0.002315521240234375,
-0.00711822509765625,
-0.0229034423828125,
-0.00324249267578125,
0.0122833251953125,
0.00682830810546875,
-0.0256195068359375,
-0.01160430908203125,
-0.0233306884765625,
0.021759033203125,
0.0159912109375,
-0.034210205078125,
0.022216796875,
0.00469207763671875,
-0.008392333984375,
0.01030731201171875,
0.03021240234375,
-0.0092926025390625,
-0.003879547119140625,
-0.003658294677734375,
-0.008209228515625,
-0.0278167724609375,
0.053619384765625,
0.009246826171875,
-0.01309967041015625,
-0.00799560546875,
-0.0074310302734375,
-0.0293731689453125,
-0.004703521728515625,
-0.01470947265625,
0.0252227783203125,
0.0238494873046875,
-0.0201873779296875,
-0.024993896484375,
0.0246734619140625,
0.00037169456481933594,
-0.06365966796875,
0.0231475830078125,
-0.0703125,
-0.0185699462890625,
0.005786895751953125,
0.00937652587890625,
0.0277557373046875,
-0.0056304931640625,
-0.0197906494140625,
0.07098388671875,
-0.0051116943359375,
-0.0184326171875,
-0.015869140625,
0.00501251220703125,
0.0014553070068359375,
0.0159759521484375,
0.0104217529296875,
-0.0306396484375,
-0.04669189453125,
-0.016754150390625,
0.00536346435546875,
0.0251312255859375,
0.0121917724609375,
-0.00196075439453125,
-0.0687255859375,
-0.0259552001953125,
-0.033355712890625,
-0.01247406005859375,
-0.02886962890625,
0.031707763671875,
-0.002399444580078125,
0.0149688720703125,
-0.015655517578125,
0.01568603515625,
0.01413726806640625,
0.0201568603515625,
-0.0159912109375,
-0.00787353515625,
-0.033599853515625,
0.006137847900390625,
0.058868408203125,
0.09051513671875,
0.0237579345703125,
-0.060028076171875,
0.06341552734375,
-0.00665283203125,
-0.0809326171875,
0.002094268798828125,
0.0280914306640625,
-0.045623779296875,
-0.0289764404296875,
0.0294036865234375,
-0.00408172607421875,
-0.021270751953125,
-0.0281829833984375,
-0.0145721435546875,
-0.024078369140625,
-0.0169219970703125,
-0.00580596923828125,
0.0086822509765625,
0.023345947265625,
0.0019369125366210938,
-0.0125274658203125,
-0.004302978515625,
-0.0060882568359375,
-0.006938934326171875,
-0.00936126708984375,
0.0152435302734375,
0.0211639404296875,
0.0577392578125,
-0.04034423828125,
-0.0250244140625,
0.026763916015625,
-0.00020229816436767578,
0.00025844573974609375,
0.0023059844970703125,
0.01242828369140625,
-0.007251739501953125,
-0.018463134765625,
-0.054656982421875,
0.0135650634765625,
0.019927978515625,
-0.03338623046875,
0.08367919921875,
0.002689361572265625,
0.05279541015625,
-0.006561279296875,
0.046142578125,
-0.0046844482421875,
-0.033355712890625,
0.012298583984375,
-0.055389404296875,
0.003879547119140625,
-0.010528564453125,
-0.0239410400390625,
-0.01474761962890625,
0.003185272216796875,
-0.033172607421875,
-0.01483154296875,
0.01110076904296875
] |
73e4d7f2576b4d6345511ca881f278b51b582dff
|
Wordpress Stackexchange
Q: is_admin() returns true when using admin-ajax.php from front end script Had a situation today where I was using admin-ajax.php from a front end script. As I understand it this the wp way to make ajax calls (registering my function with the wp_ajax_nopriv_myfunction hook)
Seems to me that since admin-ajax.php is on the admin side is_admin() returns true whereas my script calls it from the front end side.
This causes an issue with a plugin I use that does things differently on front and admin side of things.
So I was wondering if I was doing something wrong
is there a way to use ajax in front end the wp way and have is_admin() to return false ?
hope I could make myself understand
A: WordPress sets is_admin() to true for all ajax requests (front-end or admin-side). (See codex).
There's isn't away of over-riding this (and you shouldn't anyway). If your ajax request can be fired from both front-end and admin side, then you may want to include whether it 'is admin' or not when you post the data. But without any details on the 'issues' it causes with your plug-in, it's hard to offer a work-aroudn.
|
Q: is_admin() returns true when using admin-ajax.php from front end script Had a situation today where I was using admin-ajax.php from a front end script. As I understand it this the wp way to make ajax calls (registering my function with the wp_ajax_nopriv_myfunction hook)
Seems to me that since admin-ajax.php is on the admin side is_admin() returns true whereas my script calls it from the front end side.
This causes an issue with a plugin I use that does things differently on front and admin side of things.
So I was wondering if I was doing something wrong
is there a way to use ajax in front end the wp way and have is_admin() to return false ?
hope I could make myself understand
A: WordPress sets is_admin() to true for all ajax requests (front-end or admin-side). (See codex).
There's isn't away of over-riding this (and you shouldn't anyway). If your ajax request can be fired from both front-end and admin side, then you may want to include whether it 'is admin' or not when you post the data. But without any details on the 'issues' it causes with your plug-in, it's hard to offer a work-aroudn.
A: is_admin() always returns true for every AJAX call. If you want to validate AJAX calls from frontend only, this may be a work-around:
if (!isset($GLOBALS['current_screen']) && !is_customize_preview()) {
// AJAX calls from frontend, excludes customize preview screen.
}
A: I know this is old, but in case it helps anybody else that stumbles across this...
what I usually do is set some kind of flag in my frontend forms to denote that the incoming request is ajax.
<input type="hidden" id="my_ajax_flag" name="my_ajax_flag" value="false" />
Initially this is set to "false", which i then toggle to "true" while beginning to process the ajax.
$('#my_ajax_flag').val('true'); // example using jQuery
then in the admin side of my code, i check for that parameter and then either include my ajax hooks or perform my regular non-ajax admin stuff. So for example:
if ( isset( $_REQUEST['my_ajax_flag'] ) && $_REQUEST['my_ajax_flag'] == 'true' ) {
add_action('wp_ajax_my_ajax_function', 'my_ajax_function');
add_action('wp_ajax_no_priv_my_ajax_function', 'my_ajax_function');
} else {
// regular non-ajax stuff
}
depending on what you need to do, there are multiple variations of this idea, but it allows you to keep your regular admin code from interfering or firing while performing ajax requests.
another recommendation that can be handy is setting the WordPress "noheader" attribute in your forms.
<input type="hidden" name="noheader" value="true" />
when doing backend processing that ultimately results in a redirect (recommended for avoiding the dreaded double form submission), in rare fringe cases where you need to access wp hooks that would normally occur after "headers already sent".
A: I wanted to enable/disable logging on the front end and admin using a dashboard menu button. I simply added a class to my menu button and then queried admin page status with jQuery
https://codex.wordpress.org/Class_Reference/WP_Admin_Bar/add_menu
Add a menu item with the admin status as a class
$wp_admin_bar -> add_menu(
array(
'title' => '<span class="ab-icon"></span><span class="ab-label">' . __( 'Console Logging' , 'console-logging' ) . '</span>',
'id' => 'your-custom-id',
'parent' => false,
'href' => '',
'meta' => array('class' => 'is-admin-'.is_admin())//GET ACTUAL ADMIN OR NOT in php before page load
));
Get the menu item using jQuery in javascript and use it:
//'is-admin-1' when is_admin() is true
//'is-admin-0' when is_admin() is false
var is_admin = $('#wp-admin-bar-your-custom-id').hasClass('is-admin-1');
if(is_admin){
//You are actually on an admin page
}else{
//You are on a front end page
}
A: @fuxia's comment is the best if you want to test and specifically include ajax calls:
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) :
and @wpclevel's answer is best if you want to test to specifically exclude any admin/dashboard screens:
if ( ! isset( $GLOBALS['current_screen'] ) && ! is_customize_preview() ) :
There is a lot of overlapping use cases where either one would work, but sometimes you will need one or the other of these solutions.
|
wordpress
|
{
"language": "en",
"length": 653,
"provenance": "stackexchange_00019.jsonl.gz:420986",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55745"
}
|
[
0.08538818359375,
-0.00983428955078125,
-0.0037593841552734375,
-0.046295166015625,
0.0257415771484375,
-0.04681396484375,
0.027496337890625,
-0.01049041748046875,
-0.0086212158203125,
0.0309295654296875,
-0.02398681640625,
0.0147552490234375,
-0.0232696533203125,
-0.01064300537109375,
-0.0266265869140625,
-0.04541015625,
0.0142669677734375,
0.0242767333984375,
0.00955963134765625,
-0.019805908203125,
0.00746917724609375,
-0.005413055419921875,
-0.0290069580078125,
0.03350830078125,
0.006793975830078125,
-0.00238800048828125,
0.04656982421875,
-0.0121917724609375,
0.0201568603515625,
0.002285003662109375,
0.015716552734375,
-0.01873779296875,
-0.0007634162902832031,
0.034423828125,
-0.017242431640625,
-0.0283966064453125,
-0.0028400421142578125,
0.0162811279296875,
0.01053619384765625,
0.00879669189453125,
0.056060791015625,
-0.0225677490234375,
-0.0121917724609375,
0.036712646484375,
-0.0053558349609375,
-0.032989501953125,
0.037109375,
-0.046783447265625,
-0.00054931640625,
0.0029048919677734375,
0.01055908203125,
-0.032196044921875,
0.0160675048828125,
0.003170013427734375,
-0.007293701171875,
0.0087127685546875,
-0.0190887451171875,
-0.03399658203125,
0.041717529296875,
0.0112152099609375,
-0.0280914306640625,
-0.06683349609375,
0.02789306640625,
-0.05694580078125,
0.00864410400390625,
-0.014892578125,
-0.01369476318359375,
0.0372314453125,
-0.052886962890625,
-0.024932861328125,
0.01468658447265625,
-0.023193359375,
0.00652313232421875,
0.03350830078125,
-0.04248046875,
-0.08050537109375,
0.03985595703125,
-0.031890869140625,
-0.006011962890625,
0.01241302490234375,
0.0190582275390625,
0.046234130859375,
-0.04083251953125,
0.03228759765625,
-0.0203857421875,
0.02410888671875,
-0.0160369873046875,
-0.037872314453125,
-0.0190887451171875,
-0.0305633544921875,
-0.0181427001953125,
-0.051116943359375,
-0.030914306640625,
0.009033203125,
-0.01055145263671875,
-0.0156707763671875,
0.0567626953125,
0.038787841796875,
-0.020904541015625,
-0.040283203125,
-0.006450653076171875,
-0.0328369140625,
-0.01470184326171875,
-0.00957489013671875,
0.018646240234375,
0.035186767578125,
-0.0134124755859375,
-0.018707275390625,
0.046844482421875,
0.01299285888671875,
0.0011739730834960938,
0.0186004638671875,
-0.004062652587890625,
-0.004119873046875,
-0.010528564453125,
-0.0017709732055664062,
-0.0311737060546875,
0.01244354248046875,
-0.009735107421875,
0.02685546875,
0.0091705322265625,
0.0221405029296875,
0.004001617431640625,
-0.039154052734375,
0.01369476318359375,
0.006725311279296875,
-0.02374267578125,
-0.01250457763671875,
-0.0283050537109375,
0.0303955078125,
-0.0269012451171875,
0.00627899169921875,
0.062469482421875,
0.0221099853515625,
0.003818511962890625,
-0.0268402099609375,
0.032745361328125,
0.00778961181640625,
0.01465606689453125,
0.0054168701171875,
0.0257568359375,
-0.0214080810546875,
-0.0009703636169433594,
0.0185546875,
-0.04534912109375,
0.01219940185546875,
0.00238037109375,
-0.00046634674072265625,
-0.01959228515625,
-0.055938720703125,
0.0046844482421875,
-0.052947998046875,
-0.0033206939697265625,
0.054901123046875,
0.039794921875,
0.05169677734375,
0.07513427734375,
0.003326416015625,
-0.0285186767578125,
0.0020046234130859375,
-0.0015611648559570312,
0.0052947998046875,
0.029205322265625,
0.0135498046875,
-0.006317138671875,
0.0006732940673828125,
-0.03387451171875,
0.001674652099609375,
0.0198822021484375,
0.0144805908203125,
0.03631591796875,
-0.006134033203125,
-0.031707763671875,
-0.0201568603515625,
-0.007793426513671875,
-0.0238037109375,
-0.0010461807250976562,
-0.00439453125,
0.05450439453125,
-0.0233917236328125,
-0.05224609375,
-0.0254669189453125,
0.059661865234375,
-0.028289794921875,
-0.014251708984375,
-0.0115203857421875,
0.0150909423828125,
0.0172576904296875,
-0.0004258155822753906,
0.01125335693359375,
0.0176544189453125,
0.0416259765625,
0.01180267333984375,
0.04290771484375,
-0.006656646728515625,
-0.04498291015625,
-0.0628662109375,
-0.01293182373046875,
-0.0455322265625,
0.005764007568359375,
0.0271759033203125,
-0.0145263671875,
0.00766754150390625,
-0.0178680419921875,
-0.06597900390625,
-0.0206451416015625,
-0.0102996826171875,
0.0292816162109375,
0.0382080078125,
0.055908203125,
-0.0189056396484375,
0.036224365234375,
-0.016082763671875,
-0.042572021484375,
-0.0279693603515625,
-0.017242431640625,
-0.040130615234375,
0.06671142578125,
-0.03533935546875,
0.062744140625,
-0.036834716796875,
-0.07049560546875,
-0.01012420654296875,
-0.0003898143768310547,
0.004413604736328125,
0.0265350341796875,
-0.0192108154296875,
0.022674560546875,
0.0322265625,
-0.0021495819091796875,
0.055511474609375,
0.0153045654296875,
0.037628173828125,
0.052734375,
-0.000020623207092285156,
-0.0465087890625,
-0.0131072998046875,
-0.123291015625,
0.03521728515625,
0.07342529296875,
0.01007843017578125,
0.0430908203125,
-0.00017309188842773438,
0.052703857421875,
-0.00045680999755859375,
-0.07891845703125,
-0.0143890380859375,
0.035675048828125,
0.005008697509765625,
0.01441192626953125,
-0.03753662109375,
-0.0243377685546875,
0.042633056640625,
-0.0205078125,
-0.00389862060546875,
0.053314208984375,
-0.01354217529296875,
-0.0224761962890625,
-0.001590728759765625,
-0.01070404052734375,
0.004459381103515625,
-0.01364898681640625,
-0.024505615234375,
-0.00263214111328125,
-0.007080078125,
-0.01113128662109375,
0.0054473876953125,
0.030517578125,
-0.001644134521484375,
-0.035003662109375,
0.0100250244140625,
0.039398193359375,
0.000015437602996826172,
0.064208984375,
0.094482421875,
-0.01371002197265625,
-0.0789794921875,
-0.017822265625,
0.057586669921875,
0.04638671875,
-0.03021240234375,
-0.0037822723388671875,
-0.0262298583984375,
-0.01158905029296875,
-0.00351715087890625,
-0.03155517578125,
0.0271453857421875,
0.0151214599609375,
0.044403076171875,
0.0193634033203125,
0.04437255859375,
-0.0121612548828125,
-0.03289794921875,
0.05865478515625,
-0.0526123046875,
-0.01285552978515625,
-0.00745391845703125,
-0.0178375244140625,
0.03460693359375,
-0.017425537109375,
0.050262451171875,
0.056610107421875,
0.0203704833984375,
-0.0104827880859375,
0.004909515380859375,
-0.016571044921875,
0.0084381103515625,
0.00693511962890625,
-0.01390838623046875,
0.0007920265197753906,
-0.051513671875,
0.021942138671875,
0.036102294921875,
0.0799560546875,
-0.0179595947265625,
-0.04864501953125,
0.00447845458984375,
0.0399169921875,
-0.05010986328125,
-0.058441162109375,
-0.044891357421875,
-0.0288848876953125,
0.01873779296875,
0.002780914306640625,
0.011322021484375,
0.0141143798828125,
0.0113677978515625,
0.007472991943359375,
0.0235443115234375,
-0.00469970703125,
0.0033168792724609375,
0.00872039794921875,
-0.0260162353515625,
-0.0269622802734375,
0.0033416748046875,
-0.01267242431640625,
0.004795074462890625,
0.0697021484375,
0.007568359375,
-0.0689697265625,
-0.013824462890625,
0.036224365234375,
-0.02008056640625,
0.001262664794921875,
0.0246429443359375,
-0.03509521484375,
-0.019989013671875,
0.00411224365234375,
-0.0122222900390625,
-0.0165863037109375,
0.0022525787353515625,
-0.02386474609375,
-0.027069091796875,
-0.0201873779296875,
0.02606201171875,
-0.003597259521484375,
-0.01016998291015625,
0.0189666748046875,
0.036285400390625,
-0.0231475830078125,
-0.0182037353515625,
0.030731201171875,
-0.0236968994140625,
0.0245513916015625,
-0.0003085136413574219,
-0.041839599609375,
0.059844970703125,
-0.0030307769775390625,
0.03045654296875,
0.000560760498046875,
-0.01255035400390625,
-0.0029010772705078125,
0.0160064697265625,
0.003040313720703125,
0.03338623046875,
0.00519561767578125,
0.008148193359375,
-0.0460205078125,
-0.0234527587890625,
-0.030548095703125,
-0.02349853515625,
0.0016489028930664062,
-0.0228271484375,
0.03271484375,
-0.0428466796875,
0.02520751953125,
-0.03057861328125,
-0.0224151611328125,
-0.0135345458984375,
-0.0024814605712890625,
0.0242767333984375,
0.07122802734375,
-0.011322021484375,
-0.0185394287109375,
-0.02642822265625,
0.01580810546875,
-0.055206298828125,
-0.05291748046875,
-0.021148681640625,
0.004772186279296875,
-0.0794677734375,
0.032073974609375,
-0.0023517608642578125,
0.00183868408203125,
-0.0299224853515625,
0.046173095703125,
-0.044158935546875,
-0.023162841796875,
0.0430908203125,
-0.1214599609375,
-0.0034332275390625,
0.01284027099609375,
-0.005641937255859375,
-0.07568359375,
-0.0164642333984375,
-0.051605224609375,
-0.05438232421875,
-0.01107025146484375,
0.00518035888671875,
0.04681396484375,
-0.0004036426544189453,
-0.01027679443359375,
-0.0161590576171875,
0.030029296875,
0.01253509521484375,
-0.00272369384765625,
0.0132598876953125,
0.00653839111328125,
-0.004825592041015625,
-0.0258331298828125,
0.0090179443359375,
-0.0287933349609375,
-0.0260772705078125,
-0.00177001953125,
-0.020263671875,
-0.01319122314453125,
-0.029205322265625,
-0.08148193359375,
0.02239990234375,
-0.037811279296875,
-0.02490234375,
-0.0250701904296875,
-0.06842041015625,
-0.0226287841796875,
-0.049072265625,
0.0017576217651367188,
0.0085906982421875,
-0.046051025390625,
0.0286407470703125,
-0.020904541015625,
-0.03955078125,
0.01323699951171875,
0.0310516357421875,
0.021942138671875,
-0.014556884765625,
-0.041900634765625,
0.003326416015625,
0.0391845703125,
-0.04388427734375,
0.056304931640625,
0.048126220703125,
-0.032806396484375,
0.059234619140625,
0.0176239013671875,
0.050567626953125,
-0.0288848876953125,
0.041290283203125,
0.00420379638671875,
-0.005157470703125,
0.0257415771484375,
0.04876708984375,
-0.059051513671875,
-0.018310546875,
-0.00336456298828125,
-0.01068878173828125,
0.00994873046875,
0.0362548828125,
-0.01441192626953125,
0.01947021484375,
-0.03070068359375,
-0.033416748046875,
0.02801513671875,
-0.06768798828125,
0.04132080078125,
0.0122222900390625,
-0.00458526611328125,
0.0162200927734375,
0.0191497802734375,
0.007843017578125,
0.0023097991943359375,
0.035125732421875,
-0.0200347900390625,
0.04559326171875,
-0.01328277587890625,
-0.0016183853149414062,
-0.01206207275390625,
0.01233673095703125,
0.028076171875,
-0.015960693359375,
-0.052001953125,
-0.029083251953125,
-0.0225372314453125,
0.01210784912109375,
0.01959228515625,
-0.00588226318359375,
0.030487060546875,
0.0115509033203125,
-0.01788330078125,
-0.01036834716796875,
0.01335906982421875,
-0.034393310546875,
-0.034576416015625,
0.025146484375,
0.0165863037109375,
0.004444122314453125,
-0.0098724365234375,
0.0762939453125,
0.0650634765625,
0.018646240234375,
-0.038848876953125,
0.03399658203125,
0.0200653076171875,
0.036346435546875,
0.010406494140625,
-0.02337646484375,
0.0238037109375,
-0.0098876953125,
-0.003997802734375,
-0.0276336669921875,
0.013031005859375,
0.0182037353515625,
0.0009531974792480469,
0.0284271240234375,
-0.0177001953125,
-0.0041656494140625,
-0.0009622573852539062,
-0.042999267578125,
0.07696533203125,
0.056488037109375,
-0.05419921875,
-0.032623291015625,
-0.02642822265625,
0.016754150390625,
-0.00530242919921875,
-0.01959228515625,
0.0148162841796875,
-0.02447509765625,
0.0269927978515625,
-0.0247650146484375,
-0.01348114013671875,
0.03057861328125,
0.0272369384765625,
-0.0343017578125,
-0.00759124755859375,
-0.02154541015625,
-0.051605224609375,
-0.0175628662109375,
-0.005954742431640625,
-0.0247802734375,
0.010009765625,
-0.01580810546875,
0.03045654296875,
-0.032745361328125,
0.012786865234375,
-0.016448974609375,
0.0048828125,
0.056060791015625,
0.0401611328125,
-0.06207275390625,
-0.01593017578125,
-0.0814208984375,
-0.01378631591796875,
-0.035736083984375,
-0.036346435546875,
-0.0237884521484375,
0.02587890625,
0.016693115234375,
0.0194244384765625,
-0.0235595703125,
-0.0281524658203125,
0.017791748046875,
0.02996826171875,
0.007328033447265625,
0.052886962890625,
-0.00162506103515625,
0.07965087890625,
-0.0239410400390625,
0.039947509765625,
0.00803375244140625,
0.020477294921875,
-0.044677734375,
-0.001556396484375,
0.00504302978515625,
-0.0243682861328125,
-0.004436492919921875,
0.00833892822265625,
0.0098419189453125,
-0.035614013671875,
-0.0124969482421875,
-0.01300048828125,
0.0084991455078125,
0.0300750732421875,
-0.0045013427734375,
-0.0209808349609375,
0.01459503173828125,
0.038330078125,
0.042877197265625,
-0.0147857666015625,
0.007663726806640625,
0.035888671875,
-0.0255584716796875,
-0.06353759765625,
0.0299224853515625,
0.00041747093200683594,
0.022430419921875,
0.021759033203125,
-0.00823211669921875,
0.0162353515625,
0.07666015625,
0.03765869140625,
0.08099365234375,
0.0517578125,
0.058746337890625,
0.047271728515625,
0.03424072265625,
-0.01715087890625,
-0.0130157470703125,
0.029083251953125,
-0.00959014892578125,
-0.0234375,
-0.004886627197265625,
-0.025482177734375,
0.02947998046875,
0.06292724609375,
0.07781982421875,
-0.0977783203125,
0.0222015380859375,
0.021820068359375,
-0.022857666015625,
0.0208740234375,
-0.04229736328125,
-0.00579833984375,
-0.0364990234375,
0.0672607421875,
0.01629638671875,
-0.0218963623046875,
0.0226898193359375,
-0.01934814453125,
-0.006671905517578125,
-0.005733489990234375,
0.0504150390625,
0.018829345703125,
0.031494140625,
-0.007572174072265625,
-0.0211639404296875,
0.0180206298828125,
0.0121002197265625,
0.00868988037109375,
-0.01403045654296875,
-0.03173828125,
-0.0298004150390625,
-0.01102447509765625,
-0.000015079975128173828,
-0.0270538330078125,
0.034820556640625,
-0.0003275871276855469,
0.03173828125,
0.041351318359375,
-0.0058135986328125,
0.0161285400390625,
0.0004718303680419922,
0.0192108154296875,
-0.05010986328125,
-0.027984619140625,
0.00246429443359375,
0.025634765625,
-0.06097412109375,
0.03814697265625,
-0.0263519287109375,
-0.0200347900390625,
-0.0009760856628417969,
-0.02032470703125,
0.07781982421875,
-0.0016794204711914062,
-0.0189971923828125,
0.0159149169921875,
-0.014678955078125,
-0.01175689697265625,
-0.01702880859375,
0.0128326416015625,
-0.056884765625,
-0.0007109642028808594,
0.009796142578125,
0.0024013519287109375,
-0.003940582275390625,
0.01373291015625,
-0.042633056640625,
0.08575439453125,
-0.0031585693359375,
0.006427764892578125,
-0.0031490325927734375,
0.027099609375,
-0.0175628662109375,
0.024810791015625,
-0.0263671875,
-0.01422882080078125,
0.01255035400390625,
0.01873779296875,
-0.021331787109375,
-0.0020122528076171875,
-0.00998687744140625,
0.0296478271484375,
-0.013397216796875,
0.004364013671875,
-0.00713348388671875,
0.0143280029296875,
0.04376220703125,
0.037322998046875,
0.02764892578125,
0.022857666015625,
0.015106201171875,
0.0057220458984375,
0.0616455078125,
-0.01030731201171875,
0.05633544921875,
-0.035186767578125,
0.02008056640625,
0.025390625,
0.015716552734375,
0.022003173828125,
-0.0037631988525390625,
-0.00408935546875,
-0.027008056640625,
-0.0006074905395507812,
0.0394287109375,
-0.0732421875,
-0.036834716796875,
0.020294189453125,
0.0115966796875,
0.0088958740234375,
0.04168701171875,
-0.0262603759765625,
0.04052734375,
0.0189208984375,
-0.0250701904296875,
-0.013702392578125,
0.0015544891357421875,
-0.0189971923828125,
-0.00624847412109375,
-0.01541900634765625,
0.05267333984375,
-0.0286102294921875,
-0.00530242919921875,
0.04669189453125,
0.01568603515625,
-0.010101318359375,
-0.035186767578125,
0.040771484375,
0.01189422607421875,
-0.007236480712890625,
-0.072509765625,
-0.01165771484375,
-0.0160980224609375,
0.019195556640625,
0.0428466796875,
0.0268096923828125,
0.04852294921875,
0.05865478515625,
-0.002315521240234375,
-0.0104827880859375,
0.00861358642578125,
0.031341552734375,
0.01354217529296875,
0.00856781005859375,
-0.03106689453125,
-0.020477294921875,
-0.047882080078125,
-0.01450347900390625,
0.0229949951171875,
0.053436279296875,
0.03302001953125,
0.0200042724609375,
-0.01406097412109375,
-0.0243682861328125,
0.00623321533203125,
0.027862548828125,
-0.035614013671875,
-0.001232147216796875,
-0.03350830078125,
-0.059173583984375,
-0.003238677978515625,
0.0313720703125,
0.00042057037353515625,
0.035736083984375,
0.01279449462890625,
0.032623291015625,
0.0435791015625,
-0.007495880126953125,
0.0340576171875,
-0.006793975830078125,
-0.03924560546875,
-0.0190887451171875,
-0.004932403564453125,
0.014556884765625,
-0.004596710205078125,
0.023345947265625,
0.0450439453125,
-0.0009279251098632812,
-0.0269927978515625,
0.0469970703125,
-0.004726409912109375,
-0.0244140625,
0.059295654296875,
-0.029632568359375,
0.077392578125,
-0.01027679443359375,
-0.052459716796875,
-0.01788330078125,
0.0022258758544921875,
-0.0288238525390625,
-0.0016260147094726562,
0.0149688720703125,
-0.019012451171875,
0.0171966552734375,
0.0204010009765625,
-0.01641845703125,
0.041351318359375,
-0.031829833984375,
0.0174102783203125,
-0.04425048828125,
0.015777587890625,
-0.024078369140625,
0.065185546875,
0.0277557373046875,
0.03399658203125,
0.02081298828125,
0.0180816650390625,
0.031402587890625,
-0.01428985595703125,
0.0005230903625488281,
0.0017538070678710938,
0.009002685546875,
-0.04156494140625,
-0.0142059326171875,
0.0008039474487304688,
-0.04840087890625,
-0.03057861328125,
0.019134521484375,
-0.0806884765625,
0.00531768798828125,
0.021392822265625,
0.00238800048828125,
0.03594970703125,
-0.0236968994140625,
0.01532745361328125,
-0.020538330078125,
0.02935791015625,
-0.033599853515625,
-0.0726318359375,
-0.06353759765625,
0.0152130126953125,
-0.0008516311645507812,
0.023345947265625,
-0.0164642333984375,
0.042510986328125,
-0.0274200439453125,
-0.023040771484375,
0.0025653839111328125,
-0.069091796875,
-0.00490570068359375,
0.03131103515625,
-0.006305694580078125,
-0.00945281982421875,
-0.0105743408203125,
-0.01406097412109375,
0.0194854736328125,
0.01387786865234375,
0.0166168212890625,
0.021270751953125,
-0.04132080078125,
-0.039306640625,
0.0099945068359375,
0.027862548828125,
-0.018157958984375,
0.0171051025390625,
0.0010995864868164062,
-0.009521484375,
-0.0012226104736328125,
-0.01861572265625,
-0.034698486328125,
-0.026702880859375,
-0.0014238357543945312,
0.028594970703125,
-0.0027675628662109375,
-0.047119140625,
-0.0740966796875,
0.032501220703125,
0.02935791015625,
-0.021331787109375,
-0.035186767578125,
0.01386260986328125,
-0.052398681640625,
0.0706787109375,
-0.01251983642578125,
0.006481170654296875,
-0.0007691383361816406,
0.010467529296875,
-0.0156097412109375,
-0.0159912109375,
-0.02215576171875,
0.023651123046875,
-0.0124359130859375,
0.0095062255859375,
0.0152130126953125,
-0.0097198486328125,
-0.01593017578125,
-0.01351165771484375,
-0.0163726806640625,
0.0323486328125,
-0.0006642341613769531,
-0.014617919921875,
-0.01482391357421875,
0.049102783203125,
-0.004016876220703125,
-0.052825927734375,
0.0176239013671875,
-0.0277252197265625,
-0.006587982177734375,
-0.060211181640625,
0.04595947265625,
0.036285400390625,
-0.020751953125,
-0.043487548828125,
0.02978515625,
-0.0117340087890625,
-0.019134521484375,
-0.0017862319946289062,
-0.006320953369140625,
0.029693603515625,
-0.036651611328125,
-0.0236968994140625,
-0.00479888916015625,
-0.05133056640625,
-0.00872802734375,
0.041015625,
-0.02496337890625,
0.03131103515625,
0.043914794921875,
-0.054779052734375,
0.0116119384765625,
-0.01279449462890625,
0.01383209228515625,
-0.0240936279296875,
0.0167999267578125,
0.0245208740234375,
0.054168701171875,
-0.0025501251220703125,
0.050445556640625,
0.0185394287109375,
-0.00994110107421875,
-0.00438690185546875,
-0.01416778564453125,
0.0229949951171875,
0.0266876220703125,
0.031219482421875,
0.018585205078125,
-0.00970458984375,
-0.048553466796875,
-0.07373046875,
-0.06414794921875,
0.0010843276977539062,
0.0014209747314453125,
0.004970550537109375,
-0.04595947265625,
0.040802001953125,
0.0128326416015625,
-0.007663726806640625,
-0.0214385986328125,
0.0214385986328125,
-0.0289764404296875,
-0.0034885406494140625,
0.03399658203125,
0.00634765625,
-0.0160064697265625,
-0.029693603515625,
0.038543701171875,
-0.0263214111328125,
-0.044464111328125,
0.0287933349609375,
0.01641845703125,
-0.0184173583984375,
0.0256500244140625,
0.016510009765625,
0.0623779296875,
-0.0303955078125,
-0.028228759765625,
0.033599853515625,
0.01351165771484375,
0.01837158203125,
0.00650787353515625,
0.024078369140625,
0.0185394287109375,
-0.0235748291015625,
0.02587890625,
0.0211181640625,
0.00787353515625,
-0.020721435546875,
-0.01190185546875,
-0.01071929931640625,
0.016632080078125,
-0.0112457275390625,
0.04608154296875,
0.025054931640625,
-0.022613525390625,
0.05084228515625,
-0.03997802734375,
0.00438690185546875,
0.031829833984375,
0.01230621337890625,
-0.027496337890625,
0.0191497802734375,
-0.0205230712890625,
0.040130615234375,
0.007152557373046875
] |
657548db663c452600baaa9eb103330a762e98a5
|
Wordpress Stackexchange
Q: Load different template file when condition met? If I visit a page on my WordPress site, WP goes and determines what template file it should use based on the template hierarchy.
If I'm doing some logic checking in the hook init and say my conditions are met, how do I tell WordPress to load a template file of my choosing, not the one WordPress would normally dish up?
A: Can you perform the logic on the template_include filter? Else, you could set a global/constant and use that in template_include to serve up the appropriate template.
The template_include filter filers the path to the template file to be included. To avoid errors you should check if the template exists - locate_template does this for theme/child-theme files.
add_filter("template_include", "sc_redirect_properties_to_registration");
function sc_redirect_properties_to_registration( $template )
{
if( is_user_logged_in() && ! is_page("the-properties") )
return $template;
//You could include templates from plugins
//$template = plugin_dir_path(__FILE__).'templates/plugin-template.php';
//Best to check the template exists. With **theme/child-theme** templates
// you can do this with locate_template.
return locate_template('template-registration.php');
}
|
Q: Load different template file when condition met? If I visit a page on my WordPress site, WP goes and determines what template file it should use based on the template hierarchy.
If I'm doing some logic checking in the hook init and say my conditions are met, how do I tell WordPress to load a template file of my choosing, not the one WordPress would normally dish up?
A: Can you perform the logic on the template_include filter? Else, you could set a global/constant and use that in template_include to serve up the appropriate template.
The template_include filter filers the path to the template file to be included. To avoid errors you should check if the template exists - locate_template does this for theme/child-theme files.
add_filter("template_include", "sc_redirect_properties_to_registration");
function sc_redirect_properties_to_registration( $template )
{
if( is_user_logged_in() && ! is_page("the-properties") )
return $template;
//You could include templates from plugins
//$template = plugin_dir_path(__FILE__).'templates/plugin-template.php';
//Best to check the template exists. With **theme/child-theme** templates
// you can do this with locate_template.
return locate_template('template-registration.php');
}
A: I suppose you could use some conditions like this:
if(is_front_page()){
// Home page layout
} elseif(is_page()){
// General page layout
if(is_page('contact')){
// Page layout specific to the contact page
} elseif(is_page('about')){
// Page layout specific to the about page
}
}
Then obtain parts of your template depending on the section of your website using get_template_part();
|
wordpress
|
{
"language": "en",
"length": 226,
"provenance": "stackexchange_00019.jsonl.gz:420994",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55770"
}
|
[
0.040374755859375,
0.004634857177734375,
0.029083251953125,
-0.043182373046875,
0.0024261474609375,
-0.007274627685546875,
0.01293182373046875,
-0.0382080078125,
-0.03228759765625,
0.03009033203125,
-0.0511474609375,
0.0308837890625,
-0.01898193359375,
0.010009765625,
-0.01153564453125,
-0.049774169921875,
0.006549835205078125,
-0.042022705078125,
-0.0109405517578125,
-0.03997802734375,
0.039703369140625,
-0.03216552734375,
0.0081939697265625,
0.0282440185546875,
0.025665283203125,
-0.06732177734375,
0.061279296875,
-0.025634765625,
0.00922393798828125,
-0.0379638671875,
0.0165252685546875,
0.023895263671875,
0.0347900390625,
0.0008249282836914062,
-0.0134735107421875,
0.0023822784423828125,
0.002414703369140625,
0.00998687744140625,
-0.0103607177734375,
0.0296478271484375,
-0.0020809173583984375,
-0.0021381378173828125,
0.0170745849609375,
0.0019092559814453125,
-0.00893402099609375,
-0.058990478515625,
0.027435302734375,
-0.029266357421875,
0.01947021484375,
0.02545166015625,
0.0135498046875,
-0.006488800048828125,
0.01549530029296875,
-0.023590087890625,
-0.00598907470703125,
0.01666259765625,
-0.03448486328125,
0.058929443359375,
0.0099945068359375,
-0.0056915283203125,
-0.0136260986328125,
0.036407470703125,
-0.002094268798828125,
0.0018587112426757812,
-0.01139068603515625,
-0.0205078125,
-0.03204345703125,
0.0198974609375,
-0.034027099609375,
-0.00920867919921875,
0.0286102294921875,
-0.0311279296875,
-0.0086212158203125,
-0.0136566162109375,
-0.01410675048828125,
0.006366729736328125,
0.03289794921875,
-0.005523681640625,
-0.00791168212890625,
0.01035308837890625,
-0.00548553466796875,
-0.0274200439453125,
0.001255035400390625,
-0.03271484375,
0.010986328125,
0.01413726806640625,
-0.011871337890625,
-0.00008779764175415039,
-0.03515625,
-0.00914764404296875,
-0.032135009765625,
0.01084136962890625,
-0.0048675537109375,
-0.034332275390625,
-0.04071044921875,
0.00478363037109375,
0.01580810546875,
0.08660888671875,
-0.0236358642578125,
0.036590576171875,
-0.038299560546875,
-0.01146697998046875,
0.0165252685546875,
-0.056060791015625,
0.0234375,
0.10089111328125,
-0.006244659423828125,
-0.004467010498046875,
0.0269927978515625,
0.01233673095703125,
0.055145263671875,
0.011138916015625,
-0.0178680419921875,
-0.0289764404296875,
-0.0482177734375,
0.0267791748046875,
-0.032684326171875,
-0.0265350341796875,
0.0171051025390625,
-0.00849151611328125,
-0.0121307373046875,
-0.004169464111328125,
0.0689697265625,
-0.042572021484375,
-0.02252197265625,
-0.04498291015625,
-0.04473876953125,
-0.05029296875,
-0.055389404296875,
0.0093994140625,
0.01235198974609375,
0.042083740234375,
-0.018035888671875,
-0.0281219482421875,
-0.07586669921875,
0.0005483627319335938,
0.0010290145874023438,
0.01415252685546875,
-0.007030487060546875,
-0.0157318115234375,
0.035369873046875,
-0.0014715194702148438,
-0.005306243896484375,
0.0168609619140625,
-0.0145111083984375,
0.010284423828125,
0.01526641845703125,
0.0097198486328125,
-0.01102447509765625,
-0.032318115234375,
-0.003917694091796875,
-0.025238037109375,
0.03961181640625,
-0.0142669677734375,
0.02288818359375,
-0.0447998046875,
0.0016641616821289062,
-0.019683837890625,
-0.0088958740234375,
-0.0184478759765625,
0.0196533203125,
0.00708770751953125,
0.0096435546875,
-0.03912353515625,
-0.05535888671875,
-0.01366424560546875,
-0.0245819091796875,
-0.011962890625,
0.0177764892578125,
0.010009765625,
0.00960540771484375,
-0.0190277099609375,
-0.01556396484375,
0.0034160614013671875,
-0.00042700767517089844,
0.0221710205078125,
-0.00867462158203125,
0.04876708984375,
0.00007635354995727539,
0.037811279296875,
0.01446533203125,
-0.028594970703125,
0.043426513671875,
-0.0002536773681640625,
-0.083251953125,
0.0357666015625,
0.007198333740234375,
0.0269622802734375,
0.0193634033203125,
-0.00867462158203125,
0.07110595703125,
0.036376953125,
-0.04638671875,
0.0273590087890625,
-0.04345703125,
-0.0181732177734375,
0.00803375244140625,
0.0291290283203125,
-0.015655517578125,
0.010284423828125,
0.0123138427734375,
-0.023284912109375,
0.04595947265625,
-0.0169219970703125,
-0.005168914794921875,
0.00502777099609375,
-0.0222930908203125,
0.0296173095703125,
0.01702880859375,
0.0287933349609375,
-0.00295257568359375,
-0.00754547119140625,
-0.0183258056640625,
0.015655517578125,
0.0033435821533203125,
0.0255279541015625,
-0.0067901611328125,
0.0248260498046875,
0.023101806640625,
0.017547607421875,
0.0164947509765625,
-0.0015668869018554688,
0.01406097412109375,
-0.006351470947265625,
-0.00815582275390625,
0.0166015625,
-0.028594970703125,
0.0115509033203125,
-0.04022216796875,
0.049346923828125,
-0.04840087890625,
0.01824951171875,
-0.01158905029296875,
0.0205841064453125,
-0.03668212890625,
0.0026264190673828125,
-0.031707763671875,
-0.02581787109375,
0.002223968505859375,
0.03765869140625,
0.02227783203125,
0.055908203125,
-0.025634765625,
0.0036640167236328125,
0.0662841796875,
-0.060394287109375,
-0.018524169921875,
0.01837158203125,
0.0180206298828125,
0.033233642578125,
-0.017364501953125,
-0.0018472671508789062,
0.00807952880859375,
-0.05523681640625,
0.0089263916015625,
0.017822265625,
-0.040618896484375,
-0.036590576171875,
0.0024967193603515625,
0.0181121826171875,
0.01129913330078125,
-0.0147247314453125,
-0.006298065185546875,
0.00571441650390625,
0.024749755859375,
-0.0098114013671875,
0.01113128662109375,
-0.0148468017578125,
-0.01507568359375,
0.0006241798400878906,
0.01403045654296875,
-0.048248291015625,
0.0089263916015625,
0.0253143310546875,
-0.01910400390625,
0.050048828125,
-0.05621337890625,
0.017181396484375,
0.011077880859375,
0.0131988525390625,
-0.02911376953125,
0.0032672882080078125,
-0.081298828125,
-0.006336212158203125,
-0.0341796875,
-0.07354736328125,
-0.0018901824951171875,
0.05706787109375,
0.05364990234375,
0.0081787109375,
0.0316162109375,
0.0225372314453125,
-0.002132415771484375,
0.039947509765625,
-0.0276641845703125,
-0.029876708984375,
0.0218963623046875,
-0.01541900634765625,
0.0291595458984375,
-0.0411376953125,
0.0236968994140625,
0.0394287109375,
-0.03607177734375,
0.016693115234375,
0.006076812744140625,
0.01129150390625,
0.0302276611328125,
-0.006359100341796875,
-0.02142333984375,
-0.03619384765625,
-0.00420379638671875,
0.0015592575073242188,
0.032379150390625,
0.051544189453125,
-0.001155853271484375,
-0.03668212890625,
-0.0033817291259765625,
0.01263427734375,
-0.040496826171875,
-0.04296875,
-0.046295166015625,
-0.01421356201171875,
0.016082763671875,
-0.0033855438232421875,
0.01145172119140625,
-0.0196380615234375,
-0.01363372802734375,
0.0238800048828125,
0.036285400390625,
-0.0350341796875,
-0.08563232421875,
-0.059844970703125,
-0.075927734375,
-0.0257720947265625,
-0.0151214599609375,
-0.02239990234375,
-0.0086212158203125,
0.07098388671875,
-0.0012683868408203125,
-0.05072021484375,
-0.0106964111328125,
-0.0006017684936523438,
0.00955963134765625,
0.013671875,
-0.00247955322265625,
-0.053131103515625,
0.00498199462890625,
0.01044464111328125,
0.01788330078125,
-0.01068878173828125,
0.0128326416015625,
-0.004779815673828125,
-0.005184173583984375,
-0.0509033203125,
0.01055908203125,
0.053070068359375,
-0.006378173828125,
-0.037139892578125,
0.0284881591796875,
-0.0570068359375,
-0.057952880859375,
-0.01349639892578125,
-0.0694580078125,
0.06781005859375,
0.060455322265625,
0.0005521774291992188,
0.0169525146484375,
-0.00786590576171875,
0.00441741943359375,
-0.00506591796875,
0.0030422210693359375,
-0.019287109375,
0.05401611328125,
-0.01451873779296875,
-0.0167694091796875,
-0.039642333984375,
0.03167724609375,
-0.01168060302734375,
-0.045196533203125,
-0.00536346435546875,
0.0006818771362304688,
-0.0158233642578125,
0.01678466796875,
-0.04559326171875,
-0.03717041015625,
0.044677734375,
0.0189208984375,
0.034088134765625,
-0.0684814453125,
-0.032440185546875,
-0.04718017578125,
0.080810546875,
-0.015472412109375,
-0.01824951171875,
-0.0136871337890625,
0.00505828857421875,
-0.01206207275390625,
0.0027332305908203125,
-0.0264739990234375,
0.00493621826171875,
-0.048492431640625,
-0.01020050048828125,
-0.0223236083984375,
-0.019317626953125,
-0.006801605224609375,
-0.0310821533203125,
-0.019439697265625,
-0.03802490234375,
0.01532745361328125,
0.025238037109375,
0.02386474609375,
0.0197296142578125,
0.00557708740234375,
0.025177001953125,
0.00580596923828125,
-0.04364013671875,
-0.040283203125,
-0.0205535888671875,
-0.03277587890625,
0.07794189453125,
0.050201416015625,
-0.0217132568359375,
-0.016998291015625,
0.0325927734375,
0.0154571533203125,
0.009735107421875,
-0.0011005401611328125,
0.002628326416015625,
0.0191650390625,
-0.0224609375,
-0.006061553955078125,
-0.0192718505859375,
-0.012176513671875,
-0.0303955078125,
-0.07373046875,
0.01800537109375,
-0.00853729248046875,
0.015716552734375,
0.036102294921875,
-0.029083251953125,
-0.017974853515625,
0.01215362548828125,
0.0173492431640625,
-0.00949859619140625,
0.039459228515625,
-0.05072021484375,
0.0087738037109375,
-0.01165771484375,
0.033935546875,
-0.0194244384765625,
-0.03594970703125,
-0.00223541259765625,
0.046539306640625,
0.037994384765625,
-0.0250091552734375,
0.006664276123046875,
0.040618896484375,
0.0230712890625,
0.0286102294921875,
0.0567626953125,
0.033966064453125,
0.007633209228515625,
0.0198516845703125,
0.0271453857421875,
-0.0195465087890625,
0.01678466796875,
0.05499267578125,
-0.00809478759765625,
-0.05218505859375,
0.034820556640625,
-0.0186614990234375,
-0.018035888671875,
0.0517578125,
0.0218353271484375,
-0.0253143310546875,
0.0426025390625,
0.0394287109375,
-0.0055694580078125,
-0.04248046875,
-0.050537109375,
0.01497650146484375,
-0.004825592041015625,
0.0079193115234375,
0.01543426513671875,
0.0343017578125,
-0.0033206939697265625,
-0.0269775390625,
-0.00424957275390625,
-0.01464080810546875,
0.041015625,
0.038543701171875,
0.006526947021484375,
0.01153564453125,
0.058441162109375,
-0.0207366943359375,
-0.01161956787109375,
0.00673675537109375,
-0.0215606689453125,
-0.0138092041015625,
-0.0189666748046875,
-0.0325927734375,
0.0106201171875,
0.007419586181640625,
0.0186004638671875,
-0.0143585205078125,
0.0408935546875,
0.033843994140625,
-0.02252197265625,
-0.017425537109375,
0.01049041748046875,
-0.0178375244140625,
-0.0472412109375,
-0.011871337890625,
0.0010347366333007812,
-0.0181427001953125,
0.01026153564453125,
0.005527496337890625,
0.0127716064453125,
-0.0198211669921875,
-0.01068878173828125,
0.035430908203125,
0.00841522216796875,
-0.00156402587890625,
0.022430419921875,
0.005664825439453125,
0.01039886474609375,
-0.028411865234375,
-0.006389617919921875,
-0.006938934326171875,
0.0059814453125,
-0.0104217529296875,
0.0283050537109375,
-0.04840087890625,
-0.0296783447265625,
0.0556640625,
-0.043212890625,
0.01861572265625,
0.01873779296875,
-0.04669189453125,
-0.051544189453125,
-0.039947509765625,
-0.00814056396484375,
0.0567626953125,
-0.0458984375,
-0.01593017578125,
0.0108489990234375,
-0.03399658203125,
-0.0236053466796875,
0.05194091796875,
-0.07672119140625,
0.0014600753784179688,
0.0209503173828125,
-0.04010009765625,
-0.01338958740234375,
0.004146575927734375,
-0.044189453125,
-0.039642333984375,
-0.004207611083984375,
0.0029582977294921875,
0.019378662109375,
-0.04974365234375,
0.0018949508666992188,
-0.0164642333984375,
0.019012451171875,
-0.0535888671875,
0.01788330078125,
0.04669189453125,
0.03900146484375,
-0.046539306640625,
0.0068359375,
-0.05908203125,
-0.01629638671875,
-0.052703857421875,
-0.062103271484375,
-0.043243408203125,
0.021453857421875,
-0.027557373046875,
0.01139068603515625,
-0.00878143310546875,
0.03790283203125,
-0.005527496337890625,
0.0023345947265625,
-0.0228424072265625,
0.024810791015625,
-0.005954742431640625,
0.060333251953125,
-0.01413726806640625,
0.03179931640625,
0.01531982421875,
0.0195770263671875,
-0.026397705078125,
-0.01442718505859375,
-0.0160675048828125,
-0.0239715576171875,
0.01155853271484375,
0.00716400146484375,
-0.0029964447021484375,
0.038360595703125,
0.08099365234375,
0.0168914794921875,
0.0094146728515625,
-0.01479339599609375,
0.0008425712585449219,
-0.0157470703125,
0.04803466796875,
-0.005138397216796875,
0.007526397705078125,
0.021026611328125,
-0.0091705322265625,
-0.0182037353515625,
-0.01236724853515625,
-0.0382080078125,
0.039459228515625,
0.00891876220703125,
0.0008463859558105469,
0.00028395652770996094,
-0.06768798828125,
0.09014892578125,
0.038360595703125,
0.0098419189453125,
0.0265045166015625,
-0.0020847320556640625,
0.009979248046875,
-0.01305389404296875,
0.036346435546875,
-0.01544952392578125,
-0.0109710693359375,
0.03955078125,
0.00135040283203125,
-0.02374267578125,
0.0010471343994140625,
-0.0250244140625,
-0.030975341796875,
0.064453125,
0.007091522216796875,
-0.06549072265625,
-0.02276611328125,
-0.03607177734375,
0.0160980224609375,
-0.0006489753723144531,
-0.002414703369140625,
-0.0225372314453125,
-0.0269927978515625,
0.029541015625,
0.035552978515625,
-0.016143798828125,
0.015777587890625,
0.0469970703125,
-0.01788330078125,
0.00009614229202270508,
0.038482666015625,
0.01488494873046875,
-0.0149383544921875,
0.0024814605712890625,
-0.00022554397583007812,
0.01523590087890625,
-0.006214141845703125,
0.020599365234375,
-0.0328369140625,
-0.007198333740234375,
-0.0026493072509765625,
0.005565643310546875,
-0.036590576171875,
0.0131378173828125,
0.0172271728515625,
-0.01102447509765625,
0.06622314453125,
0.0428466796875,
0.008575439453125,
-0.01076507568359375,
0.009918212890625,
0.00821685791015625,
-0.04345703125,
-0.02191162109375,
-0.00789642333984375,
-0.0078125,
-0.0173797607421875,
0.01181793212890625,
-0.0269012451171875,
-0.017852783203125,
-0.0109405517578125,
-0.03680419921875,
0.05670166015625,
-0.01467132568359375,
-0.024078369140625,
0.0240631103515625,
0.0007371902465820312,
-0.0187835693359375,
0.021026611328125,
0.05670166015625,
-0.0435791015625,
-0.05975341796875,
0.037750244140625,
-0.0567626953125,
-0.026031494140625,
0.025146484375,
-0.07794189453125,
0.07977294921875,
0.0384521484375,
0.04156494140625,
-0.0179595947265625,
0.032440185546875,
-0.027130126953125,
0.0113525390625,
-0.01506805419921875,
0.0655517578125,
0.03094482421875,
0.035675048828125,
0.004058837890625,
0.001987457275390625,
0.03851318359375,
0.036651611328125,
0.04168701171875,
0.00994110107421875,
-0.0221710205078125,
0.014129638671875,
0.0587158203125,
-0.0024738311767578125,
-0.017242431640625,
0.045745849609375,
-0.0020580291748046875,
0.00914764404296875,
-0.02740478515625,
-0.0234832763671875,
0.0233917236328125,
-0.07464599609375,
-0.035614013671875,
0.01171875,
0.00557708740234375,
-0.005519866943359375,
-0.001407623291015625,
0.0228729248046875,
-0.09820556640625,
0.00971221923828125,
0.0670166015625,
-0.0158233642578125,
-0.000537872314453125,
-0.0258941650390625,
-0.0031795501708984375,
-0.0697021484375,
-0.02374267578125,
-0.0211639404296875,
0.03314208984375,
0.013458251953125,
-0.0083465576171875,
-0.018768310546875,
0.0052947998046875,
0.00884246826171875,
-0.041046142578125,
-0.0224761962890625,
0.035430908203125,
-0.036163330078125,
0.0238800048828125,
0.01187896728515625,
0.0286102294921875,
0.01450347900390625,
0.04669189453125,
0.0301666259765625,
0.017059326171875,
-0.034576416015625,
-0.0273895263671875,
0.0170135498046875,
0.01387786865234375,
-0.01904296875,
0.0115966796875,
0.0086517333984375,
-0.0330810546875,
0.0160064697265625,
-0.032928466796875,
-0.0227203369140625,
0.035980224609375,
-0.0195159912109375,
-0.006114959716796875,
-0.007526397705078125,
0.046478271484375,
0.007366180419921875,
-0.06451416015625,
0.052825927734375,
0.048492431640625,
0.052032470703125,
-0.03765869140625,
0.089111328125,
0.0023174285888671875,
-0.0304718017578125,
-0.0347900390625,
0.02484130859375,
-0.01947021484375,
0.0267791748046875,
-0.031707763671875,
0.0004925727844238281,
-0.0118255615234375,
0.0433349609375,
0.00872039794921875,
0.004436492919921875,
0.031463623046875,
0.05078125,
0.01038360595703125,
-0.00940704345703125,
0.0200653076171875,
-0.0048370361328125,
0.056182861328125,
-0.0271148681640625,
0.0026569366455078125,
-0.03179931640625,
-0.035491943359375,
0.004711151123046875,
-0.016021728515625,
0.0241241455078125,
-0.032684326171875,
0.04742431640625,
-0.004852294921875,
0.0103607177734375,
0.045013427734375,
0.005340576171875,
0.04071044921875,
0.0175933837890625,
-0.0672607421875,
-0.01428985595703125,
-0.007537841796875,
-0.06396484375,
0.0511474609375,
0.0638427734375,
-0.031463623046875,
0.015380859375,
0.03643798828125,
-0.0037250518798828125,
0.01415252685546875,
-0.00958251953125,
0.00977325439453125,
-0.04791259765625,
0.016998291015625,
-0.0030422210693359375,
-0.03875732421875,
-0.00359344482421875,
-0.0190887451171875,
-0.00859832763671875,
-0.0026264190673828125,
0.11260986328125,
-0.030303955078125,
0.013275146484375,
-0.0004379749298095703,
-0.0163116455078125,
-0.00362396240234375,
0.002323150634765625,
0.031402587890625,
-0.0009212493896484375,
-0.019500732421875,
-0.0136260986328125,
-0.06182861328125,
0.033233642578125,
0.0231170654296875,
0.0226287841796875,
0.0362548828125,
-0.002685546875,
0.00875091552734375,
0.0004012584686279297,
0.0252532958984375,
-0.02496337890625,
-0.05364990234375,
-0.059906005859375,
0.0180511474609375,
0.0221405029296875,
0.038116455078125,
-0.0026607513427734375,
0.054840087890625,
-0.024505615234375,
-0.06439208984375,
0.0258941650390625,
-0.0760498046875,
0.019927978515625,
0.0281524658203125,
0.00896453857421875,
-0.0166778564453125,
0.035064697265625,
-0.0014562606811523438,
0.046966552734375,
-0.0091552734375,
0.05841064453125,
0.015411376953125,
-0.029876708984375,
0.007228851318359375,
-0.0182647705078125,
0.0084228515625,
-0.0726318359375,
-0.0062255859375,
0.020721435546875,
0.018463134765625,
0.03955078125,
-0.049285888671875,
-0.00713348388671875,
-0.0205230712890625,
-0.0169525146484375,
0.01522064208984375,
-0.00713348388671875,
-0.030548095703125,
-0.0036602020263671875,
0.0080108642578125,
0.0294189453125,
0.00579071044921875,
-0.031005859375,
0.0011806488037109375,
-0.033233642578125,
0.052886962890625,
-0.0013151168823242188,
-0.0091705322265625,
-0.001262664794921875,
-0.009735107421875,
-0.0258941650390625,
0.04901123046875,
-0.03448486328125,
-0.0277557373046875,
0.0252532958984375,
0.00035190582275390625,
0.058349609375,
-0.01145172119140625,
-0.026031494140625,
-0.0171966552734375,
-0.015655517578125,
0.05419921875,
-0.049468994140625,
-0.01438140869140625,
0.036712646484375,
-0.00634765625,
-0.0093841552734375,
-0.03759765625,
-0.01456451416015625,
0.006805419921875,
0.0011224746704101562,
-0.023101806640625,
0.0162811279296875,
0.02880859375,
-0.040557861328125,
-0.1112060546875,
0.06781005859375,
-0.03460693359375,
-0.037811279296875,
-0.033447265625,
0.0230865478515625,
-0.00536346435546875,
-0.00862884521484375,
-0.003383636474609375,
-0.0211029052734375,
0.01085662841796875,
0.0278778076171875,
0.0195770263671875,
-0.0106658935546875,
0.06787109375,
-0.006259918212890625,
-0.049835205078125,
-0.006832122802734375,
-0.0173797607421875,
-0.00873565673828125,
-0.0061187744140625,
-0.01512908935546875,
0.01317596435546875,
0.0240020751953125,
-0.0195465087890625,
-0.039337158203125,
0.01248931884765625,
-0.035003662109375,
-0.011993408203125,
-0.026763916015625,
0.01079559326171875,
0.00830841064453125,
0.0394287109375,
0.0301971435546875,
0.006565093994140625,
-0.03228759765625,
-0.03271484375,
-0.055511474609375,
-0.06488037109375,
0.0007662773132324219,
0.044097900390625,
-0.0789794921875,
0.020965576171875,
0.0280914306640625,
-0.0125274658203125,
-0.006000518798828125,
-0.007061004638671875,
-0.041046142578125,
-0.0024051666259765625,
-0.0199127197265625,
0.00696563720703125,
-0.0472412109375,
-0.03948974609375,
0.053466796875,
-0.0132293701171875,
0.0061798095703125,
0.0013647079467773438,
0.032989501953125,
0.0107421875,
0.0212249755859375,
0.0270538330078125,
0.07183837890625,
-0.08197021484375,
-0.03045654296875,
0.0226898193359375,
0.01172637939453125,
-0.032440185546875,
-0.0102996826171875,
-0.007381439208984375,
0.0210723876953125,
0.005054473876953125,
0.0095672607421875,
-0.00963592529296875,
0.044647216796875,
-0.0124359130859375,
0.0941162109375,
0.022979736328125,
0.07733154296875,
-0.0018453598022460938,
0.049774169921875,
-0.0053253173828125,
-0.022125244140625,
-0.019195556640625,
0.0009984970092773438,
0.0009479522705078125,
0.014434814453125,
-0.0225677490234375,
-0.050018310546875,
0.026123046875,
-0.050018310546875,
0.0049591064453125,
0.0127716064453125
] |
39d8cc9a730f0c9ae41d28e4f0b4c2b8b07a650e
|
Wordpress Stackexchange
Q: How to set author for post AND post attachments I have multiple author accounts on one of my WordPress installs. Often I will create a post, and set the author to be a different account. However, when I upload images into that post, their attachment page lists the author as my account. How can I set the author for posts, and have it carry over to the media associated with that post?
A: Use this in your theme's functions.php:
add_filter( 'add_attachment', 'wpse_55801_attachment_author' );
function wpse_55801_attachment_author( $attachment_ID )
{
$attach = get_post( $attachment_ID );
$parent = get_post( $attach->post_parent );
$the_post = array();
$the_post['ID'] = $attachment_ID;
$the_post['post_author'] = $parent->post_author;
wp_update_post( $the_post );
}
|
Q: How to set author for post AND post attachments I have multiple author accounts on one of my WordPress installs. Often I will create a post, and set the author to be a different account. However, when I upload images into that post, their attachment page lists the author as my account. How can I set the author for posts, and have it carry over to the media associated with that post?
A: Use this in your theme's functions.php:
add_filter( 'add_attachment', 'wpse_55801_attachment_author' );
function wpse_55801_attachment_author( $attachment_ID )
{
$attach = get_post( $attachment_ID );
$parent = get_post( $attach->post_parent );
$the_post = array();
$the_post['ID'] = $attachment_ID;
$the_post['post_author'] = $parent->post_author;
wp_update_post( $the_post );
}
A: I extended the above solution of @brasofilo to also change the attachment post date to the date of the post parent.
And not only on upload of the attachment, but also when an attachment is edited. You can use the edit_attachment filter with the same function for this. However, when you do that, the wp_update_post function causes an infinite loop and leads to PHP memory errors, I found out the hard way after a lot of searching.
A warning for this infinite loop is actually mentioned in the Codex.
A solution is to remove the filters, like so:
function wpse_55801_attachment_author( $attachment_ID ) {
remove_filter('add_attachment', 'wpse_55801_attachment_author');
remove_filter('edit_attachment', 'wpse_55801_attachment_author');
$attach = get_post( $attachment_ID );
$parent = get_post( $attach->post_parent );
$the_post = array();
$the_post['ID'] = $attachment_ID;
$the_post['post_author'] = $parent->post_author;
$the_post['post_date'] = $parent->post_date;
wp_update_post( $the_post );
add_filter( 'add_attachment', 'wpse_55801_attachment_author' );
add_filter( 'edit_attachment', 'wpse_55801_attachment_author' );
}
add_filter( 'add_attachment', 'wpse_55801_attachment_author' );
add_filter( 'edit_attachment', 'wpse_55801_attachment_author' );
|
wordpress
|
{
"language": "en",
"length": 262,
"provenance": "stackexchange_00019.jsonl.gz:421003",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55801"
}
|
[
0.06451416015625,
0.0030670166015625,
0.016937255859375,
-0.0088958740234375,
-0.0016002655029296875,
-0.0279388427734375,
0.041534423828125,
-0.0545654296875,
-0.023712158203125,
0.0174407958984375,
0.002593994140625,
0.0225372314453125,
-0.01557159423828125,
-0.023834228515625,
-0.01239013671875,
-0.0099639892578125,
0.0204620361328125,
-0.0008349418640136719,
0.03460693359375,
0.0121612548828125,
0.0022602081298828125,
0.016357421875,
0.0275115966796875,
-0.054107666015625,
0.01306915283203125,
0.0134429931640625,
0.0777587890625,
-0.019439697265625,
0.0220947265625,
-0.02386474609375,
0.0247650146484375,
-0.0242156982421875,
0.016815185546875,
0.00359344482421875,
-0.01430511474609375,
0.0289764404296875,
-0.0207061767578125,
0.0130157470703125,
0.0011472702026367188,
0.0283966064453125,
0.0077362060546875,
-0.0007967948913574219,
0.0027866363525390625,
0.00560760498046875,
-0.0135498046875,
-0.046661376953125,
0.0251617431640625,
-0.026519775390625,
0.0283050537109375,
0.0275421142578125,
-0.0134124755859375,
0.00838470458984375,
-0.01297760009765625,
-0.019805908203125,
-0.0205078125,
-0.040771484375,
0.02557373046875,
0.0280914306640625,
0.037384033203125,
-0.07208251953125,
-0.07183837890625,
0.007701873779296875,
0.03729248046875,
0.01320648193359375,
0.046051025390625,
0.00435638427734375,
0.0687255859375,
0.0272369384765625,
-0.0260162353515625,
0.0247039794921875,
0.0166015625,
-0.033294677734375,
-0.00783538818359375,
-0.0300445556640625,
-0.022857666015625,
-0.024688720703125,
0.0226898193359375,
-0.0565185546875,
-0.0068206787109375,
-0.0034008026123046875,
0.0181884765625,
-0.02044677734375,
0.00914764404296875,
-0.012542724609375,
0.022125244140625,
0.0224456787109375,
0.00341796875,
-0.0213470458984375,
-0.0299224853515625,
0.0082550048828125,
-0.019561767578125,
-0.041473388671875,
0.00649261474609375,
0.0159149169921875,
-0.01049041748046875,
-0.0170745849609375,
0.054412841796875,
0.071044921875,
-0.01081085205078125,
-0.006038665771484375,
-0.0062408447265625,
-0.04486083984375,
0.01251220703125,
-0.042633056640625,
0.00492095947265625,
0.033111572265625,
0.0106964111328125,
-0.00933074951171875,
0.0198822021484375,
0.017822265625,
-0.0089569091796875,
0.014404296875,
0.0129241943359375,
-0.0011816024780273438,
-0.007625579833984375,
-0.0107421875,
-0.0255279541015625,
0.03057861328125,
-0.0010194778442382812,
-0.00487518310546875,
-0.0158843994140625,
0.003719329833984375,
-0.01837158203125,
-0.002361297607421875,
0.01306915283203125,
-0.0070037841796875,
-0.0113525390625,
-0.01265716552734375,
0.024261474609375,
-0.0023193359375,
-0.047119140625,
0.0183258056640625,
0.08636474609375,
0.01953125,
0.030242919921875,
-0.0161895751953125,
-0.014984130859375,
-0.00646209716796875,
-0.00016748905181884766,
0.01654052734375,
0.01092529296875,
-0.04071044921875,
-0.0017423629760742188,
0.0209197998046875,
-0.01313018798828125,
0.03228759765625,
0.00861358642578125,
0.0287017822265625,
-0.007656097412109375,
-0.06549072265625,
0.03936767578125,
-0.04864501953125,
-0.00519561767578125,
0.0178070068359375,
0.04901123046875,
-0.02490234375,
0.050506591796875,
-0.0248870849609375,
0.035308837890625,
-0.0291290283203125,
0.0306549072265625,
0.0141754150390625,
0.041595458984375,
0.0182037353515625,
0.0008487701416015625,
-0.015594482421875,
-0.045562744140625,
-0.004947662353515625,
0.0200042724609375,
-0.01531982421875,
0.00643157958984375,
-0.01904296875,
-0.0201416015625,
-0.0008630752563476562,
-0.0038471221923828125,
0.0173187255859375,
-0.03277587890625,
0.01116943359375,
0.02593994140625,
0.056549072265625,
0.0175628662109375,
-0.0231170654296875,
0.00727081298828125,
0.0100860595703125,
-0.026458740234375,
0.0078277587890625,
-0.0025177001953125,
0.031707763671875,
0.02105712890625,
0.01505279541015625,
-0.0031070709228515625,
-0.006908416748046875,
-0.043121337890625,
-0.016571044921875,
-0.001628875732421875,
-0.0079193115234375,
-0.0313720703125,
-0.020538330078125,
0.002819061279296875,
0.034393310546875,
-0.0044097900390625,
-0.011016845703125,
0.02728271484375,
0.011962890625,
0.00010925531387329102,
0.0122833251953125,
-0.01158905029296875,
0.0145111083984375,
-0.0218658447265625,
0.00783538818359375,
0.04022216796875,
-0.004497528076171875,
-0.0228271484375,
-0.028594970703125,
-0.0001933574676513672,
0.0307464599609375,
0.0039825439453125,
0.01256561279296875,
-0.0113372802734375,
0.03302001953125,
-0.03204345703125,
-0.01071929931640625,
-0.03594970703125,
0.01265716552734375,
0.041778564453125,
-0.00876617431640625,
-0.0231170654296875,
-0.0259857177734375,
0.005367279052734375,
0.0006775856018066406,
-0.035736083984375,
0.0452880859375,
-0.0034351348876953125,
-0.032135009765625,
-0.0289154052734375,
0.00656890869140625,
-0.0125579833984375,
-0.058685302734375,
-0.0083160400390625,
0.06121826171875,
0.0272216796875,
-0.0012350082397460938,
0.007373809814453125,
0.0259857177734375,
0.059967041015625,
0.04840087890625,
0.0404052734375,
-0.01236724853515625,
0.025634765625,
0.050262451171875,
-0.02471923828125,
-0.00868988037109375,
0.00644683837890625,
-0.1199951171875,
0.0262603759765625,
0.0421142578125,
-0.02783203125,
-0.0177001953125,
-0.005001068115234375,
0.01493072509765625,
0.0032138824462890625,
-0.0125579833984375,
-0.0015649795532226562,
-0.01511383056640625,
0.002880096435546875,
0.024993896484375,
0.0206756591796875,
0.005878448486328125,
-0.0650634765625,
0.01641845703125,
0.024993896484375,
0.00873565673828125,
0.0061187744140625,
0.038421630859375,
0.0197906494140625,
0.003429412841796875,
-0.0027370452880859375,
-0.01230621337890625,
0.007152557373046875,
0.01438140869140625,
-0.0277252197265625,
-0.027587890625,
-0.014556884765625,
0.005596160888671875,
-0.01367950439453125,
-0.044952392578125,
0.05316162109375,
0.02032470703125,
-0.047271728515625,
-0.0509033203125,
0.01143646240234375,
0.013916015625,
-0.01297760009765625,
-0.00955963134765625,
-0.005767822265625,
-0.019287109375,
-0.006595611572265625,
-0.0645751953125,
0.0758056640625,
-0.048675537109375,
0.055206298828125,
0.0775146484375,
-0.016510009765625,
0.053070068359375,
-0.0094757080078125,
-0.0105133056640625,
-0.0300750732421875,
0.046356201171875,
0.01377105712890625,
-0.06646728515625,
0.01268768310546875,
0.0017156600952148438,
-0.0026721954345703125,
0.0299530029296875,
-0.04412841796875,
-0.052215576171875,
-0.0295867919921875,
-0.007724761962890625,
-0.10662841796875,
-0.050872802734375,
0.0283355712890625,
-0.1046142578125,
-0.0257568359375,
-0.015838623046875,
-0.06878662109375,
-0.001964569091796875,
0.049774169921875,
-0.00966644287109375,
0.0164337158203125,
-0.01348114013671875,
-0.0157623291015625,
0.00272369384765625,
-0.0254669189453125,
-0.0310821533203125,
-0.008453369140625,
-0.0070953369140625,
0.003070831298828125,
0.039306640625,
-0.004302978515625,
-0.0455322265625,
-0.0219879150390625,
0.01513671875,
-0.007617950439453125,
-0.006793975830078125,
-0.032501220703125,
0.0187530517578125,
-0.004566192626953125,
-0.00867462158203125,
0.031524658203125,
0.0162200927734375,
-0.01215362548828125,
-0.004276275634765625,
-0.0161285400390625,
0.023590087890625,
0.0289154052734375,
0.0170440673828125,
-0.0076141357421875,
0.0196685791015625,
0.0230560302734375,
-0.039459228515625,
0.007732391357421875,
-0.0294952392578125,
-0.0306854248046875,
-0.003009796142578125,
-0.0002262592315673828,
0.00887298583984375,
-0.0333251953125,
0.0179901123046875,
0.01067352294921875,
-0.004428863525390625,
0.0087890625,
-0.00807952880859375,
0.017425537109375,
0.006961822509765625,
0.01776123046875,
-0.004123687744140625,
-0.029449462890625,
-0.044342041015625,
0.0110931396484375,
-0.028106689453125,
-0.0220947265625,
-0.03851318359375,
0.00905609130859375,
-0.0254058837890625,
-0.07611083984375,
0.052734375,
-0.054656982421875,
0.0018320083618164062,
-0.04583740234375,
-0.03363037109375,
-0.0040283203125,
0.09539794921875,
0.004894256591796875,
-0.0121307373046875,
0.006927490234375,
0.01312255859375,
-0.055267333984375,
-0.043487548828125,
-0.04248046875,
0.003719329833984375,
0.0020046234130859375,
0.0047607421875,
-0.004627227783203125,
-0.003223419189453125,
-0.03155517578125,
0.037445068359375,
0.0099945068359375,
-0.0071563720703125,
0.0284576416015625,
-0.0360107421875,
-0.006610870361328125,
0.0361328125,
-0.036468505859375,
0.0300445556640625,
-0.039306640625,
-0.0175018310546875,
-0.11639404296875,
-0.02276611328125,
-0.0018892288208007812,
0.07574462890625,
-0.036651611328125,
0.0278167724609375,
-0.04779052734375,
0.0634765625,
0.0136260986328125,
0.0306549072265625,
-0.000423431396484375,
-0.00830841064453125,
-0.002651214599609375,
-0.023895263671875,
0.00582122802734375,
-0.0237579345703125,
0.01580810546875,
-0.032196044921875,
-0.0462646484375,
-0.036041259765625,
-0.038238525390625,
0.0009965896606445312,
-0.0023326873779296875,
-0.02880859375,
-0.07183837890625,
-0.057403564453125,
0.0106658935546875,
0.041595458984375,
0.0017023086547851562,
0.01776123046875,
-0.06719970703125,
-0.07220458984375,
0.05023193359375,
-0.04791259765625,
0.004840850830078125,
-0.005878448486328125,
0.10675048828125,
0.01280975341796875,
0.00759124755859375,
-0.005535125732421875,
-0.00901031494140625,
0.0211181640625,
-0.043670654296875,
0.046417236328125,
0.036651611328125,
-0.0029468536376953125,
0.015472412109375,
-0.0259857177734375,
0.0033740997314453125,
-0.04949951171875,
0.040252685546875,
-0.0173187255859375,
-0.025238037109375,
0.036346435546875,
-0.027374267578125,
0.06317138671875,
-0.054901123046875,
-0.0195159912109375,
0.0232086181640625,
0.0325927734375,
0.0169525146484375,
-0.0027942657470703125,
0.0305023193359375,
0.0006809234619140625,
-0.0560302734375,
0.00732421875,
-0.04974365234375,
0.0157012939453125,
0.0115966796875,
-0.0005536079406738281,
-0.00040221214294433594,
0.00257110595703125,
0.006679534912109375,
-0.034820556640625,
-0.044677734375,
0.00981903076171875,
0.033355712890625,
-0.040802001953125,
0.0091094970703125,
-0.002017974853515625,
-0.010101318359375,
0.0198211669921875,
0.01287841796875,
-0.0259552001953125,
0.0217742919921875,
-0.004241943359375,
0.027130126953125,
0.0160064697265625,
-0.033172607421875,
0.045135498046875,
0.0150146484375,
-0.041290283203125,
0.00543212890625,
-0.0693359375,
-0.0006299018859863281,
-0.06402587890625,
0.01371002197265625,
0.00981903076171875,
0.00589752197265625,
0.035003662109375,
0.032562255859375,
0.003131866455078125,
0.024871826171875,
-0.0284881591796875,
0.019256591796875,
0.035308837890625,
0.0169677734375,
0.031280517578125,
-0.007175445556640625,
0.0096282958984375,
-0.00914764404296875,
0.0164337158203125,
-0.056854248046875,
0.047943115234375,
0.0278167724609375,
0.0836181640625,
0.003971099853515625,
-0.06427001953125,
0.0136871337890625,
-0.07037353515625,
0.0019140243530273438,
-0.004215240478515625,
-0.00551605224609375,
-0.027557373046875,
0.0006427764892578125,
0.0399169921875,
0.0200653076171875,
-0.017608642578125,
-0.00540924072265625,
-0.031158447265625,
-0.01134490966796875,
0.019073486328125,
0.00885772705078125,
-0.010101318359375,
0.00881195068359375,
0.006175994873046875,
0.0027790069580078125,
-0.00848388671875,
-0.0163421630859375,
-0.036407470703125,
-0.0202178955078125,
-0.0210113525390625,
-0.01018524169921875,
0.08123779296875,
-0.0187530517578125,
0.0198822021484375,
-0.0265045166015625,
0.003467559814453125,
0.0009417533874511719,
-0.003101348876953125,
0.06793212890625,
0.040252685546875,
-0.04290771484375,
0.006137847900390625,
-0.0592041015625,
0.0006647109985351562,
0.0190277099609375,
-0.0011243820190429688,
-0.04449462890625,
-0.0212249755859375,
-0.0007233619689941406,
0.024749755859375,
-0.0229034423828125,
-0.01407623291015625,
-0.017974853515625,
0.0167999267578125,
0.00904083251953125,
0.050811767578125,
0.00473785400390625,
0.04541015625,
-0.00911712646484375,
0.03912353515625,
0.013031005859375,
0.0070648193359375,
-0.044036865234375,
-0.01552581787109375,
-0.0144500732421875,
-0.055084228515625,
0.012542724609375,
0.038970947265625,
-0.0200347900390625,
-0.0196380615234375,
-0.010772705078125,
0.00963592529296875,
0.0139007568359375,
-0.0169525146484375,
0.0026683807373046875,
-0.01100921630859375,
0.00954437255859375,
-0.0172271728515625,
-0.00749969482421875,
0.0150146484375,
-0.02703857421875,
0.05096435546875,
-0.004924774169921875,
-0.0081024169921875,
0.0156097412109375,
-0.03350830078125,
0.00847625732421875,
0.062164306640625,
-0.023223876953125,
0.031494140625,
0.0782470703125,
0.0031642913818359375,
0.045684814453125,
0.0328369140625,
0.0016832351684570312,
0.02813720703125,
0.0252838134765625,
-0.0214385986328125,
-0.0205230712890625,
0.0216217041015625,
0.0106658935546875,
0.0212860107421875,
0.0087890625,
-0.00756072998046875,
0.01287078857421875,
-0.0042724609375,
0.0428466796875,
-0.013946533203125,
0.0183563232421875,
0.006656646728515625,
-0.02142333984375,
0.03094482421875,
0.0024127960205078125,
-0.00274658203125,
-0.0030269622802734375,
0.06988525390625,
-0.038726806640625,
0.0026035308837890625,
0.0318603515625,
-0.02484130859375,
-0.0016632080078125,
-0.016998291015625,
0.03106689453125,
0.01123046875,
-0.031768798828125,
0.0038738250732421875,
0.0247955322265625,
-0.0010204315185546875,
-0.007083892822265625,
-0.0238189697265625,
0.02459716796875,
-0.0005087852478027344,
-0.0291748046875,
0.040008544921875,
-0.0845947265625,
0.04766845703125,
-0.018798828125,
-0.006420135498046875,
0.041961669921875,
0.0220947265625,
0.00881195068359375,
-0.0180511474609375,
0.00936126708984375,
-0.01085662841796875,
-0.00498199462890625,
-0.032623291015625,
0.0168609619140625,
0.07305908203125,
-0.058074951171875,
0.03070068359375,
-0.008514404296875,
0.0010271072387695312,
-0.01421356201171875,
-0.021209716796875,
0.0264892578125,
-0.0216064453125,
-0.0121307373046875,
0.018463134765625,
0.0389404296875,
-0.005615234375,
0.0263214111328125,
0.033050537109375,
-0.06451416015625,
-0.05908203125,
0.037322998046875,
-0.06317138671875,
-0.0232696533203125,
0.0008602142333984375,
-0.08251953125,
0.075439453125,
-0.0176849365234375,
0.05743408203125,
0.00518798828125,
0.0270843505859375,
0.0010137557983398438,
-0.001102447509765625,
-0.044647216796875,
0.03155517578125,
0.0035457611083984375,
0.0452880859375,
-0.0709228515625,
-0.0172882080078125,
0.0015745162963867188,
0.052337646484375,
0.0870361328125,
0.0281524658203125,
-0.0256500244140625,
0.0060272216796875,
0.05499267578125,
0.0000641942024230957,
-0.047271728515625,
0.05908203125,
0.016326904296875,
-0.041412353515625,
0.016571044921875,
0.0166168212890625,
0.03997802734375,
-0.0226287841796875,
-0.004302978515625,
0.029815673828125,
0.0183258056640625,
0.034149169921875,
-0.0291290283203125,
0.0266265869140625,
-0.04443359375,
-0.0229644775390625,
0.060943603515625,
-0.055206298828125,
0.01308441162109375,
0.037017822265625,
0.05340576171875,
-0.01947021484375,
0.0018644332885742188,
-0.0108489990234375,
0.065673828125,
0.0121002197265625,
0.023834228515625,
0.0240631103515625,
0.0133056640625,
-0.002178192138671875,
0.054168701171875,
0.034332275390625,
0.02996826171875,
0.00937652587890625,
0.00330352783203125,
-0.0171356201171875,
0.005954742431640625,
-0.046905517578125,
0.00742340087890625,
0.0250244140625,
0.0105743408203125,
-0.0239105224609375,
0.0031719207763671875,
0.0225067138671875,
-0.002285003662109375,
-0.0259552001953125,
-0.0279541015625,
-0.037628173828125,
-0.039459228515625,
-0.0175323486328125,
-0.046661376953125,
-0.006610870361328125,
0.0290374755859375,
0.055755615234375,
0.002674102783203125,
0.032196044921875,
-0.08111572265625,
-0.055206298828125,
-0.02142333984375,
-0.039794921875,
0.00922393798828125,
0.03009033203125,
0.0380859375,
0.0220489501953125,
0.035858154296875,
-0.00513458251953125,
-0.00969696044921875,
0.0256805419921875,
0.0063934326171875,
0.0119781494140625,
-0.0196533203125,
-0.0202178955078125,
0.0175323486328125,
0.02294921875,
0.0141754150390625,
0.01421356201171875,
0.037872314453125,
0.0223846435546875,
-0.04632568359375,
-0.016754150390625,
-0.0135345458984375,
-0.03570556640625,
0.01424407958984375,
-0.0218353271484375,
0.0066070556640625,
0.02093505859375,
-0.01666259765625,
-0.031707763671875,
-0.0166473388671875,
0.053131103515625,
-0.01800537109375,
0.01123809814453125,
0.0031604766845703125,
-0.038482666015625,
0.0195159912109375,
0.013275146484375,
0.050933837890625,
0.0008254051208496094,
-0.07415771484375,
0.0140533447265625,
-0.041168212890625,
-0.0738525390625,
0.02410888671875,
0.03759765625,
-0.039276123046875,
0.01515960693359375,
-0.0574951171875,
-0.039886474609375,
0.032867431640625,
-0.01248931884765625,
-0.0017833709716796875,
0.0352783203125,
-0.0137176513671875,
-0.0325927734375,
-0.04608154296875,
-0.0267791748046875,
-0.01326751708984375,
0.01031494140625,
0.0236053466796875,
0.005863189697265625,
0.035552978515625,
0.0246734619140625,
-0.020721435546875,
0.046905517578125,
-0.07745361328125,
-0.036651611328125,
0.051025390625,
-0.04296875,
-0.031829833984375,
0.01311492919921875,
-0.036712646484375,
0.0233154296875,
0.0118865966796875,
0.004688262939453125,
0.0126495361328125,
-0.0217742919921875,
0.0201873779296875,
0.013702392578125,
0.01448822021484375,
-0.03143310546875,
-0.0169219970703125,
-0.046875,
-0.0236968994140625,
0.0290069580078125,
-0.020599365234375,
-0.02008056640625,
0.0303497314453125,
0.027008056640625,
-0.005687713623046875,
0.0210418701171875,
-0.0143585205078125,
0.0175628662109375,
0.03253173828125,
-0.005168914794921875,
-0.09210205078125,
0.0014553070068359375,
0.00634002685546875,
-0.0301055908203125,
0.005802154541015625,
0.07073974609375,
0.011016845703125,
-0.047210693359375,
0.0035190582275390625,
0.0033054351806640625,
0.039947509765625,
-0.0007467269897460938,
0.007762908935546875,
-0.01092529296875,
-0.004138946533203125,
-0.037109375,
-0.0201873779296875,
-0.0204925537109375,
-0.0369873046875,
0.03717041015625,
0.038970947265625,
0.0211944580078125,
0.0294189453125,
-0.04205322265625,
-0.01041412353515625,
0.046905517578125,
-0.0138702392578125,
-0.031951904296875,
0.01206207275390625,
-0.04296875,
0.015716552734375,
-0.012664794921875,
-0.048309326171875,
0.01068115234375,
0.060638427734375,
-0.0038623809814453125,
-0.03411865234375,
-0.05474853515625,
-0.00821685791015625,
-0.06939697265625,
0.02264404296875,
0.047637939453125,
-0.009063720703125,
-0.01490020751953125,
0.044281005859375,
0.01324462890625,
0.0877685546875,
-0.043609619140625,
-0.04205322265625,
-0.014129638671875,
0.006137847900390625,
-0.0077667236328125,
-0.041839599609375,
0.0236663818359375,
-0.06280517578125,
-0.007740020751953125,
-0.07183837890625,
0.0228729248046875,
0.0079345703125,
-0.0254669189453125,
-0.022796630859375,
0.0283203125,
-0.026031494140625,
-0.0181884765625,
-0.059722900390625,
0.01398468017578125,
-0.021514892578125,
0.0247955322265625,
0.00628662109375,
-0.037933349609375,
0.003570556640625,
0.03759765625,
-0.01401519775390625,
0.035186767578125,
0.0024204254150390625,
-0.01280975341796875,
-0.0292816162109375,
-0.0208282470703125,
-0.026947021484375,
-0.02093505859375,
0.0311737060546875,
-0.0192413330078125,
0.042449951171875,
0.050811767578125,
-0.01568603515625,
0.0267333984375,
0.002742767333984375,
-0.0523681640625,
-0.043182373046875,
0.0005507469177246094,
-0.0163116455078125,
0.0283050537109375,
0.05914306640625,
0.09326171875,
0.01424407958984375,
-0.05682373046875,
-0.001125335693359375,
-0.027587890625,
-0.0304412841796875,
-0.0087890625,
0.0027484893798828125,
-0.006252288818359375,
0.01171875,
-0.0305023193359375,
-0.010101318359375,
-0.012939453125,
-0.0223846435546875,
-0.0240020751953125,
-0.019317626953125,
-0.0249481201171875,
-0.006755828857421875,
-0.01019287109375,
-0.01515960693359375,
0.03118896484375,
-0.02801513671875,
-0.01387786865234375,
0.0209197998046875,
0.00493621826171875,
-0.0025463104248046875,
0.055206298828125,
0.00678253173828125,
0.0226898193359375,
-0.039794921875,
-0.0000756382942199707,
0.01309967041015625,
0.02252197265625,
-0.01016998291015625,
0.0008411407470703125,
-0.0171966552734375,
0.030914306640625,
-0.0054931640625,
0.019256591796875,
0.0024509429931640625,
0.0391845703125,
0.0010175704956054688,
0.03216552734375,
-0.0268707275390625,
-0.041168212890625,
-0.0164794921875,
0.013519287109375,
-0.04620361328125,
0.0286407470703125,
-0.004119873046875,
-0.0213623046875,
0.02386474609375,
0.00582122802734375,
0.04779052734375,
-0.0006928443908691406,
0.0333251953125,
0.031524658203125,
0.00970458984375,
0.020416259765625
] |
97c240c3de3ccee5d61a0f6426a04fa626cd26ba
|
Wordpress Stackexchange
Q: Why to check if function doesn't exists in functions.php? I see in the twentyeleven theme, before most custom functions they check if it exists
<?php if ( ! function_exists( 'twentyeleven_comment' ) ) :
function twentyeleven_comment( $comment, $args, $depth ) {
Why is that?
A: A child theme may have declared these functions already with a slightly different inner logic. The functions.php from the child theme is loaded before the file from the parent theme. Without this check you would get the Cannot redeclare … error.
Plugins can create functions too, so this problem is not restricted to the themes that are written with child themes in mind.
|
Q: Why to check if function doesn't exists in functions.php? I see in the twentyeleven theme, before most custom functions they check if it exists
<?php if ( ! function_exists( 'twentyeleven_comment' ) ) :
function twentyeleven_comment( $comment, $args, $depth ) {
Why is that?
A: A child theme may have declared these functions already with a slightly different inner logic. The functions.php from the child theme is loaded before the file from the parent theme. Without this check you would get the Cannot redeclare … error.
Plugins can create functions too, so this problem is not restricted to the themes that are written with child themes in mind.
|
wordpress
|
{
"language": "en",
"length": 108,
"provenance": "stackexchange_00019.jsonl.gz:421021",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55865"
}
|
[
0.0673828125,
-0.003818511962890625,
0.00015687942504882812,
-0.0809326171875,
0.01800537109375,
-0.0081939697265625,
0.01166534423828125,
-0.00620269775390625,
-0.0277862548828125,
-0.0014581680297851562,
-0.0304718017578125,
-0.0203094482421875,
-0.0204010009765625,
-0.0301971435546875,
-0.0015497207641601562,
-0.0633544921875,
0.0251007080078125,
-0.025787353515625,
-0.00936126708984375,
-0.025726318359375,
0.0203704833984375,
-0.003177642822265625,
-0.004520416259765625,
0.07745361328125,
0.0300750732421875,
-0.07806396484375,
0.07012939453125,
-0.01085662841796875,
0.0223846435546875,
-0.01934814453125,
0.033477783203125,
0.003143310546875,
-0.0027942657470703125,
0.03271484375,
-0.0013780593872070312,
-0.01123809814453125,
-0.00975799560546875,
0.0225372314453125,
0.01367950439453125,
0.02880859375,
0.01541900634765625,
-0.0029582977294921875,
0.00991058349609375,
0.019317626953125,
-0.0006556510925292969,
-0.06292724609375,
0.051483154296875,
-0.005481719970703125,
-0.0146331787109375,
0.048248291015625,
0.04248046875,
0.0023593902587890625,
0.0458984375,
-0.003833770751953125,
-0.014129638671875,
-0.0290679931640625,
-0.04248046875,
0.038055419921875,
0.005939483642578125,
0.0266265869140625,
-0.0007796287536621094,
0.0237579345703125,
-0.00960540771484375,
-0.0006031990051269531,
-0.0017442703247070312,
0.0124053955078125,
0.0180816650390625,
0.0288238525390625,
-0.04681396484375,
-0.03973388671875,
-0.003887176513671875,
-0.0207061767578125,
0.0029964447021484375,
0.0005679130554199219,
0.00514984130859375,
-0.03302001953125,
0.0022373199462890625,
-0.01165008544921875,
0.01262664794921875,
0.0258026123046875,
-0.0217742919921875,
-0.0161285400390625,
-0.0019369125366210938,
-0.004642486572265625,
0.0013380050659179688,
0.0303497314453125,
-0.01898193359375,
-0.0164642333984375,
-0.059722900390625,
-0.0060577392578125,
-0.039337158203125,
-0.0760498046875,
-0.04400634765625,
-0.01776123046875,
0.0295867919921875,
-0.0235748291015625,
0.03948974609375,
0.0902099609375,
-0.028045654296875,
0.005916595458984375,
0.00798797607421875,
-0.045074462890625,
0.0274505615234375,
-0.049224853515625,
0.0187225341796875,
0.057159423828125,
-0.01241302490234375,
-0.05010986328125,
-0.008026123046875,
0.00910186767578125,
0.0169525146484375,
-0.0160369873046875,
0.00628662109375,
-0.039337158203125,
0.0244293212890625,
-0.00342559814453125,
-0.0310821533203125,
0.020538330078125,
0.0157623291015625,
-0.0287933349609375,
-0.007579803466796875,
0.01617431640625,
-0.00844573974609375,
-0.028076171875,
0.0219879150390625,
-0.02337646484375,
-0.041412353515625,
0.0186614990234375,
0.002716064453125,
0.0247039794921875,
-0.047393798828125,
0.01110076904296875,
0.034820556640625,
-0.0195465087890625,
-0.0386962890625,
-0.029266357421875,
0.033203125,
0.060516357421875,
0.014862060546875,
0.0170745849609375,
0.01544189453125,
-0.0531005859375,
-0.021820068359375,
0.026336669921875,
-0.0406494140625,
0.0133056640625,
0.033660888671875,
0.01145172119140625,
-0.035491943359375,
-0.05657958984375,
-0.01251983642578125,
-0.00830078125,
0.0278167724609375,
-0.024169921875,
-0.036468505859375,
-0.0164337158203125,
-0.062255859375,
-0.0009794235229492188,
0.004337310791015625,
0.0231781005859375,
-0.0010986328125,
-0.020782470703125,
-0.0271453857421875,
-0.04290771484375,
-0.06878662109375,
0.017120361328125,
0.01177215576171875,
-0.003509521484375,
0.0135498046875,
-0.0189361572265625,
-0.02264404296875,
-0.01053619384765625,
0.004093170166015625,
0.03826904296875,
0.031707763671875,
0.055908203125,
0.0168304443359375,
0.000385284423828125,
0.03369140625,
0.0289154052734375,
-0.004718780517578125,
-0.0250396728515625,
0.05963134765625,
-0.02239990234375,
-0.0611572265625,
0.047760009765625,
0.0173187255859375,
0.06817626953125,
0.01374053955078125,
0.0135955810546875,
0.019622802734375,
0.0172576904296875,
0.017578125,
-0.0121612548828125,
-0.0261688232421875,
-0.0306854248046875,
0.02679443359375,
0.01201629638671875,
-0.028167724609375,
0.014862060546875,
-0.0076446533203125,
0.003265380859375,
0.01221466064453125,
-0.0133819580078125,
-0.08642578125,
0.0241851806640625,
-0.04571533203125,
0.06036376953125,
0.036224365234375,
0.0584716796875,
-0.0095672607421875,
-0.007526397705078125,
-0.034576416015625,
0.0262451171875,
-0.01523590087890625,
-0.0160675048828125,
-0.01021575927734375,
0.035552978515625,
-0.03436279296875,
0.0279541015625,
-0.0362548828125,
-0.0268096923828125,
-0.036041259765625,
0.02166748046875,
-0.0109405517578125,
0.01157379150390625,
-0.027496337890625,
0.01532745361328125,
-0.0019931793212890625,
0.0287017822265625,
0.0310516357421875,
0.0210113525390625,
0.0753173828125,
0.032073974609375,
-0.03009033203125,
0.005126953125,
-0.0106048583984375,
-0.056488037109375,
-0.0195159912109375,
0.057281494140625,
0.043182373046875,
0.060882568359375,
0.00722503662109375,
0.020294189453125,
0.06427001953125,
-0.069580078125,
-0.004856109619140625,
-0.0144195556640625,
-0.00849151611328125,
0.00923919677734375,
0.0419921875,
0.0272216796875,
0.00789642333984375,
0.0016775131225585938,
0.0257110595703125,
0.0169219970703125,
-0.0234375,
-0.04876708984375,
0.0328369140625,
-0.017486572265625,
0.0202789306640625,
-0.028778076171875,
-0.049835205078125,
0.0148773193359375,
0.040924072265625,
-0.02032470703125,
0.015777587890625,
0.0064544677734375,
-0.00331878662109375,
-0.0134429931640625,
0.0206451416015625,
-0.0177154541015625,
-0.0205535888671875,
0.0189361572265625,
0.018157958984375,
0.060699462890625,
-0.045501708984375,
0.00550079345703125,
-0.0028743743896484375,
0.038482666015625,
-0.0263214111328125,
0.040313720703125,
-0.034515380859375,
-0.02301025390625,
-0.045654296875,
0.0162811279296875,
0.006221771240234375,
-0.011383056640625,
0.038665771484375,
0.0004153251647949219,
0.0231170654296875,
0.03057861328125,
-0.00510406494140625,
0.03192138671875,
0.02520751953125,
-0.0229339599609375,
-0.0256805419921875,
-0.0207977294921875,
0.021270751953125,
-0.0145111083984375,
-0.000476837158203125,
0.056884765625,
0.00887298583984375,
-0.00817108154296875,
0.01311492919921875,
0.02484130859375,
0.04425048828125,
0.03912353515625,
0.0232086181640625,
0.003093719482421875,
-0.0396728515625,
-0.06292724609375,
0.0277252197265625,
0.0467529296875,
-0.016815185546875,
-0.043701171875,
-0.0217132568359375,
0.0247650146484375,
-0.066650390625,
-0.05706787109375,
-0.03204345703125,
-0.01531982421875,
-0.00008815526962280273,
-0.0183868408203125,
0.007732391357421875,
-0.00780487060546875,
-0.040069580078125,
0.01062774658203125,
0.01061248779296875,
-0.02679443359375,
-0.08062744140625,
-0.07830810546875,
-0.08917236328125,
0.01084136962890625,
-0.01483917236328125,
0.0143280029296875,
0.0033397674560546875,
0.09625244140625,
0.00020623207092285156,
-0.05633544921875,
0.00432586669921875,
-0.003566741943359375,
-0.017791748046875,
0.0179290771484375,
0.01367950439453125,
-0.0211029052734375,
-0.007053375244140625,
0.01021575927734375,
0.018585205078125,
0.01151275634765625,
-0.02972412109375,
-0.0232086181640625,
-0.01189422607421875,
-0.02099609375,
-0.0128021240234375,
0.0728759765625,
0.026611328125,
-0.03125,
0.039154052734375,
-0.049163818359375,
-0.039764404296875,
-0.01165008544921875,
-0.05804443359375,
0.0860595703125,
0.0390625,
-0.002559661865234375,
0.02301025390625,
0.0162353515625,
0.05303955078125,
0.05841064453125,
0.008087158203125,
0.00787353515625,
0.03662109375,
-0.00024890899658203125,
0.0270233154296875,
-0.056793212890625,
0.043701171875,
-0.007843017578125,
0.00048828125,
0.0043487548828125,
0.028778076171875,
0.0158233642578125,
-0.01568603515625,
-0.0263214111328125,
0.00042366981506347656,
0.0235748291015625,
0.019378662109375,
0.035675048828125,
-0.0187225341796875,
-0.0162811279296875,
-0.0310821533203125,
0.04248046875,
0.0169525146484375,
-0.00823211669921875,
0.016021728515625,
-0.0161590576171875,
-0.0265045166015625,
0.04254150390625,
-0.049163818359375,
0.0012350082397460938,
-0.02032470703125,
0.0127105712890625,
0.0172119140625,
-0.005283355712890625,
-0.0203399658203125,
0.06939697265625,
-0.018829345703125,
0.00316619873046875,
0.0200958251953125,
-0.028350830078125,
0.027740478515625,
0.0248565673828125,
0.02685546875,
0.0009264945983886719,
0.016845703125,
-0.05902099609375,
-0.059722900390625,
-0.003986358642578125,
-0.0660400390625,
0.050628662109375,
0.022430419921875,
0.01226806640625,
-0.01381683349609375,
0.0274505615234375,
0.017242431640625,
0.01490020751953125,
0.0061798095703125,
-0.0176239013671875,
0.0238800048828125,
0.007228851318359375,
0.0118408203125,
-0.0034275054931640625,
-0.036102294921875,
0.0111083984375,
-0.00890350341796875,
0.039306640625,
0.0019159317016601562,
-0.03485107421875,
0.03985595703125,
-0.031982421875,
0.022613525390625,
-0.0166473388671875,
0.0005984306335449219,
-0.01242828369140625,
-0.00875091552734375,
-0.0063629150390625,
-0.005809783935546875,
0.0298309326171875,
-0.007137298583984375,
-0.046966552734375,
-0.045806884765625,
0.021942138671875,
0.06976318359375,
0.027740478515625,
0.0014324188232421875,
-0.02081298828125,
-0.00543212890625,
0.0284576416015625,
0.0287017822265625,
-0.00858306884765625,
-0.03265380859375,
-0.01099395751953125,
0.01837158203125,
0.00787353515625,
0.034759521484375,
-0.0156402587890625,
0.038055419921875,
-0.0076446533203125,
-0.006992340087890625,
0.016082763671875,
0.0005588531494140625,
0.0123138427734375,
0.0175018310546875,
0.02203369140625,
-0.0306549072265625,
0.049163818359375,
0.01383209228515625,
-0.01507568359375,
0.013671875,
0.0019931793212890625,
-0.0015411376953125,
-0.0056304931640625,
-0.037750244140625,
0.06787109375,
0.0400390625,
-0.004314422607421875,
0.031280517578125,
0.0235595703125,
0.0223236083984375,
0.04364013671875,
0.07098388671875,
-0.02069091796875,
0.04864501953125,
0.020599365234375,
-0.007259368896484375,
-0.022247314453125,
-0.003910064697265625,
0.09039306640625,
0.01316070556640625,
-0.00902557373046875,
-0.031005859375,
-0.003284454345703125,
0.0199432373046875,
-0.0297698974609375,
0.030487060546875,
0.007720947265625,
-0.0321044921875,
-0.00730133056640625,
-0.001953125,
-0.0014715194702148438,
0.01097869873046875,
-0.002899169921875,
0.0022716522216796875,
0.01837158203125,
-0.03839111328125,
0.0212860107421875,
-0.0177001953125,
0.00949859619140625,
-0.004638671875,
-0.01450347900390625,
-0.006011962890625,
-0.03228759765625,
0.034393310546875,
0.0499267578125,
-0.034088134765625,
0.00788116455078125,
0.005313873291015625,
0.00406646728515625,
-0.0014286041259765625,
-0.03277587890625,
-0.00370025634765625,
-0.0152435302734375,
0.033721923828125,
0.057952880859375,
0.0178375244140625,
0.0579833984375,
-0.01284027099609375,
0.02606201171875,
0.06646728515625,
-0.0117645263671875,
0.01471710205078125,
0.00048828125,
-0.00855255126953125,
0.023162841796875,
-0.036712646484375,
0.0045928955078125,
-0.03271484375,
-0.004589080810546875,
0.0159759521484375,
-0.07110595703125,
0.046966552734375,
0.0596923828125,
-0.04559326171875,
-0.0026988983154296875,
0.0013446807861328125,
0.0110931396484375,
-0.035675048828125,
-0.01250457763671875,
-0.0256805419921875,
0.04473876953125,
-0.0002651214599609375,
-0.0009555816650390625,
-0.0164337158203125,
-0.0217742919921875,
0.0284423828125,
-0.00485992431640625,
0.07550048828125,
0.0079193115234375,
-0.058380126953125,
-0.0203857421875,
-0.0155487060546875,
-0.00015473365783691406,
-0.05743408203125,
-0.04779052734375,
-0.0173187255859375,
0.03204345703125,
0.001209259033203125,
0.004924774169921875,
0.007320404052734375,
0.01067352294921875,
0.0032253265380859375,
0.032135009765625,
0.01480865478515625,
0.01727294921875,
-0.020904541015625,
0.0221405029296875,
0.003787994384765625,
-0.0164642333984375,
0.0034580230712890625,
0.01428985595703125,
0.01287841796875,
-0.02117919921875,
0.00002378225326538086,
0.01971435546875,
0.014312744140625,
-0.03167724609375,
0.034027099609375,
-0.049530029296875,
0.04827880859375,
-0.00559234619140625,
0.028594970703125,
0.001918792724609375,
-0.005191802978515625,
-0.0026760101318359375,
-0.0121307373046875,
0.03509521484375,
0.0540771484375,
0.015777587890625,
-0.046630859375,
-0.0300445556640625,
0.028656005859375,
-0.007366180419921875,
0.0185089111328125,
0.00632476806640625,
0.0008172988891601562,
0.029022216796875,
-0.07476806640625,
0.03887939453125,
0.031951904296875,
-0.0011463165283203125,
0.01285552978515625,
-0.0234375,
0.007793426513671875,
-0.016143798828125,
0.007686614990234375,
-0.031524658203125,
0.007526397705078125,
0.05810546875,
0.0120697021484375,
-0.02362060546875,
0.0283660888671875,
-0.02386474609375,
-0.04888916015625,
0.0435791015625,
0.03338623046875,
-0.0269622802734375,
-0.045318603515625,
-0.016937255859375,
-0.015777587890625,
-0.01230621337890625,
-0.0377197265625,
0.02215576171875,
-0.050537109375,
0.08056640625,
0.0273895263671875,
-0.00142669677734375,
0.021942138671875,
-0.04779052734375,
-0.0173492431640625,
-0.040496826171875,
0.03985595703125,
0.0228424072265625,
-0.0287628173828125,
0.08905029296875,
0.01418304443359375,
0.0236968994140625,
-0.03607177734375,
0.024932861328125,
-0.007602691650390625,
-0.0175933837890625,
-0.04638671875,
0.00955963134765625,
0.0273590087890625,
-0.00675201416015625,
0.0174560546875,
0.000507354736328125,
0.02593994140625,
0.07171630859375,
-0.037689208984375,
0.041015625,
0.03399658203125,
-0.0009088516235351562,
-0.050445556640625,
-0.0090789794921875,
0.0560302734375,
0.00003039836883544922,
-0.0323486328125,
0.039459228515625,
-0.043609619140625,
-0.0380859375,
0.00943756103515625,
0.0200958251953125,
0.003631591796875,
0.004657745361328125,
-0.0289154052734375,
0.062042236328125,
-0.01023101806640625,
-0.020263671875,
-0.00946044921875,
0.04254150390625,
-0.040863037109375,
-0.0343017578125,
-0.001811981201171875,
-0.032073974609375,
-0.0222930908203125,
-0.039764404296875,
-0.058685302734375,
0.10357666015625,
-0.0174102783203125,
0.0308685302734375,
-0.00335693359375,
0.05010986328125,
0.014495849609375,
0.04437255859375,
-0.034423828125,
0.05303955078125,
-0.007762908935546875,
0.0304412841796875,
-0.057159423828125,
-0.0027637481689453125,
-0.01459503173828125,
0.02056884765625,
0.02093505859375,
0.00370025634765625,
-0.0120391845703125,
0.0132904052734375,
0.047882080078125,
0.00481414794921875,
-0.0169525146484375,
0.028900146484375,
-0.01068878173828125,
0.00415802001953125,
0.0211181640625,
0.0028476715087890625,
0.048431396484375,
-0.04852294921875,
-0.036956787109375,
-0.0084991455078125,
0.01110076904296875,
0.00036597251892089844,
-0.0251617431640625,
-0.00785064697265625,
-0.01120758056640625,
-0.006626129150390625,
-0.0170440673828125,
0.04150390625,
0.01300811767578125,
0.0189666748046875,
0.04327392578125,
-0.07794189453125,
-0.054595947265625,
-0.01421356201171875,
0.038665771484375,
-0.0010442733764648438,
0.020172119140625,
0.01178741455078125,
0.0226593017578125,
-0.006053924560546875,
-0.0250091552734375,
0.0006160736083984375,
0.01861572265625,
-0.040557861328125,
0.01386260986328125,
0.04876708984375,
0.0081329345703125,
-0.019989013671875,
-0.0276031494140625,
0.029510498046875,
0.0298614501953125,
-0.024932861328125,
-0.0194549560546875,
0.0041656494140625,
0.01214599609375,
0.001895904541015625,
-0.001255035400390625,
0.03961181640625,
0.057037353515625,
0.055145263671875,
-0.0384521484375,
-0.023284912109375,
0.01397705078125,
0.031646728515625,
-0.0018939971923828125,
-0.02911376953125,
0.0087432861328125,
-0.037017822265625,
-0.02850341796875,
0.0038814544677734375,
-0.01140594482421875,
0.054443359375,
0.023529052734375,
0.0318603515625,
-0.0248565673828125,
-0.031341552734375,
-0.01099395751953125,
0.02032470703125,
-0.0168304443359375,
0.01910400390625,
-0.03851318359375,
-0.0219573974609375,
-0.0112152099609375,
0.047515869140625,
0.005359649658203125,
-0.005474090576171875,
-0.050323486328125,
-0.0220794677734375,
0.03802490234375,
0.006191253662109375,
0.0251312255859375,
-0.01383209228515625,
0.007312774658203125,
-0.00632476806640625,
0.022735595703125,
0.03631591796875,
0.0115203857421875,
-0.008697509765625,
0.02294921875,
0.054351806640625,
0.01276397705078125,
-0.025421142578125,
0.0305938720703125,
-0.041412353515625,
0.0006508827209472656,
0.037078857421875,
0.05029296875,
0.049468994140625,
-0.031463623046875,
-0.0025119781494140625,
0.00146484375,
-0.015533447265625,
0.005512237548828125,
0.022613525390625,
-0.006412506103515625,
0.01323699951171875,
0.0220947265625,
-0.00995635986328125,
0.0276336669921875,
-0.00983428955078125,
-0.006053924560546875,
-0.00040793418884277344,
0.01143646240234375,
0.00794219970703125,
-0.014251708984375,
0.0009889602661132812,
-0.0146331787109375,
0.0096282958984375,
0.029754638671875,
0.08697509765625,
-0.03564453125,
0.0124664306640625,
-0.01025390625,
0.007389068603515625,
-0.004795074462890625,
-0.0256195068359375,
0.04443359375,
0.00724029541015625,
-0.0036525726318359375,
-0.014129638671875,
-0.0679931640625,
0.0220794677734375,
0.018463134765625,
0.0227203369140625,
0.0299530029296875,
-0.00814056396484375,
0.0255584716796875,
0.0078582763671875,
-0.0044097900390625,
-0.0222320556640625,
-0.036651611328125,
0.0063323974609375,
0.0176544189453125,
0.0048980712890625,
0.0184326171875,
0.0016717910766601562,
-0.01629638671875,
0.0282745361328125,
-0.05078125,
0.00923919677734375,
-0.0037174224853515625,
-0.0221710205078125,
0.0222015380859375,
0.060302734375,
-0.005615234375,
-0.057647705078125,
-0.029388427734375,
-0.00682830810546875,
-0.0001437664031982422,
-0.0201416015625,
-0.02679443359375,
0.01033782958984375,
-0.01412200927734375,
0.0121612548828125,
0.0175628662109375,
-0.064208984375,
-0.00627899169921875,
0.036376953125,
-0.021697998046875,
0.044281005859375,
-0.01070404052734375,
-0.01256561279296875,
-0.068603515625,
-0.01226043701171875,
-0.00861358642578125,
-0.047210693359375,
-0.0191802978515625,
0.0201873779296875,
0.0081329345703125,
0.045379638671875,
0.00897979736328125,
-0.039794921875,
0.01055908203125,
-0.02557373046875,
0.047027587890625,
-0.002292633056640625,
0.049285888671875,
0.002124786376953125,
0.0016050338745117188,
-0.03668212890625,
0.018280029296875,
-0.0011682510375976562,
0.0147552490234375,
0.049530029296875,
0.04132080078125,
0.053253173828125,
-0.04083251953125,
-0.0160064697265625,
0.033416748046875,
0.037506103515625,
0.0792236328125,
0.0129547119140625,
-0.0300750732421875,
0.0211029052734375,
-0.0274810791015625,
0.0006799697875976562,
-0.0010499954223632812,
0.0256805419921875,
-0.057098388671875,
-0.0374755859375,
-0.0203704833984375,
0.022491455078125,
0.06365966796875,
-0.0279998779296875,
-0.12066650390625,
0.050262451171875,
-0.0400390625,
-0.046173095703125,
-0.047210693359375,
-0.0208587646484375,
-0.022308349609375,
0.045257568359375,
-0.01526641845703125,
0.01020050048828125,
-0.006870269775390625,
0.0726318359375,
-0.00191497802734375,
0.0044097900390625,
0.032562255859375,
-0.003398895263671875,
-0.06396484375,
-0.00913238525390625,
-0.01314544677734375,
-0.0158538818359375,
0.004222869873046875,
-0.01392364501953125,
0.025665283203125,
0.037261962890625,
-0.01406097412109375,
-0.0750732421875,
-0.01079559326171875,
-0.03607177734375,
-0.01922607421875,
-0.036224365234375,
0.00963592529296875,
0.0030975341796875,
0.0225372314453125,
0.03411865234375,
0.0020885467529296875,
-0.035003662109375,
-0.018096923828125,
-0.026397705078125,
-0.045989990234375,
0.007843017578125,
0.031494140625,
-0.055389404296875,
0.01123046875,
0.017486572265625,
-0.0100860595703125,
0.005451202392578125,
-0.041229248046875,
-0.04754638671875,
-0.013153076171875,
-0.06146240234375,
-0.00428009033203125,
-0.006977081298828125,
-0.040740966796875,
0.048370361328125,
-0.0129852294921875,
0.03643798828125,
0.0078887939453125,
0.02142333984375,
0.0374755859375,
0.07220458984375,
0.02044677734375,
-0.00901031494140625,
-0.0015096664428710938,
0.00856781005859375,
0.027130126953125,
0.01221466064453125,
-0.007625579833984375,
-0.060394287109375,
-0.009033203125,
0.00838470458984375,
0.003108978271484375,
-0.0021839141845703125,
-0.004276275634765625,
0.00555419921875,
-0.0262451171875,
0.06201171875,
-0.0178375244140625,
0.09002685546875,
0.0010576248168945312,
0.031280517578125,
-0.019561767578125,
0.01045989990234375,
0.0077972412109375,
-0.0161895751953125,
0.00018799304962158203,
0.0268402099609375,
-0.001041412353515625,
-0.0295867919921875,
0.0531005859375,
0.005138397216796875,
-0.002071380615234375,
0.0151824951171875
] |
76cec069db9abde7fbb9a34ca3de92943ee56253
|
Wordpress Stackexchange
Q: cat_is_ancestor_of() for custom taxonomies I'm trying to use cat_is_ancestor_of() for custom taxonomy categories but it's not working. Is there any other way to check if a category is child of another?
A: Use term_is_ancestor_of(). That is the function cat_is_ancestor_of() is calling:
term_is_ancestor_of( $parent, $child, 'taxonomy_name' );
|
Q: cat_is_ancestor_of() for custom taxonomies I'm trying to use cat_is_ancestor_of() for custom taxonomy categories but it's not working. Is there any other way to check if a category is child of another?
A: Use term_is_ancestor_of(). That is the function cat_is_ancestor_of() is calling:
term_is_ancestor_of( $parent, $child, 'taxonomy_name' );
|
wordpress
|
{
"language": "en",
"length": 47,
"provenance": "stackexchange_00019.jsonl.gz:421026",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55883"
}
|
[
0.0289306640625,
0.005428314208984375,
-0.00013184547424316406,
-0.0556640625,
0.01450347900390625,
0.0021209716796875,
-0.008941650390625,
-0.0022869110107421875,
0.015594482421875,
0.0219573974609375,
-0.03411865234375,
-0.0287322998046875,
0.0056610107421875,
-0.0322265625,
-0.03936767578125,
-0.038360595703125,
0.031768798828125,
-0.0022258758544921875,
0.0250091552734375,
-0.005779266357421875,
0.010589599609375,
0.017791748046875,
0.035400390625,
-0.0011377334594726562,
0.046112060546875,
-0.041107177734375,
0.055450439453125,
-0.0209503173828125,
0.025360107421875,
-0.032501220703125,
0.0298309326171875,
0.0009603500366210938,
-0.00339508056640625,
0.0214691162109375,
0.01297760009765625,
-0.0006232261657714844,
0.020904541015625,
0.0034923553466796875,
0.021575927734375,
0.0205535888671875,
0.04168701171875,
-0.03778076171875,
0.01207733154296875,
-0.012481689453125,
0.00292205810546875,
-0.033477783203125,
0.037109375,
-0.05230712890625,
0.0155792236328125,
-0.0273284912109375,
0.031341552734375,
-0.0172271728515625,
0.048431396484375,
-0.0335693359375,
-0.02484130859375,
0.004451751708984375,
0.0194549560546875,
0.01654052734375,
0.03826904296875,
-0.033660888671875,
-0.050537109375,
0.00440216064453125,
0.027862548828125,
0.0003540515899658203,
0.00580596923828125,
0.014862060546875,
0.036712646484375,
0.02606201171875,
-0.0259857177734375,
-0.00250244140625,
0.016021728515625,
-0.0151824951171875,
0.014556884765625,
0.024505615234375,
-0.022186279296875,
-0.086669921875,
0.042083740234375,
-0.0212860107421875,
0.00591278076171875,
0.035369873046875,
-0.006595611572265625,
-0.00045990943908691406,
-0.061065673828125,
0.00945281982421875,
-0.0044097900390625,
0.0219879150390625,
-0.017669677734375,
-0.0174713134765625,
-0.048736572265625,
-0.0399169921875,
-0.0206146240234375,
-0.022857666015625,
-0.0684814453125,
-0.004673004150390625,
0.0049285888671875,
-0.01776123046875,
0.04168701171875,
0.059967041015625,
-0.05865478515625,
-0.018951416015625,
-0.005657196044921875,
-0.0233306884765625,
-0.0088043212890625,
-0.0297393798828125,
0.0263671875,
0.03265380859375,
-0.017181396484375,
-0.041229248046875,
0.05255126953125,
0.04107666015625,
0.0038852691650390625,
0.04901123046875,
0.003688812255859375,
-0.04119873046875,
0.01171112060546875,
0.047698974609375,
-0.002712249755859375,
0.034759521484375,
0.010589599609375,
0.0250244140625,
0.0167388916015625,
0.0181732177734375,
0.03912353515625,
-0.0192413330078125,
0.0213775634765625,
0.0084991455078125,
-0.03399658203125,
-0.04766845703125,
0.04315185546875,
0.0128326416015625,
-0.04998779296875,
0.024505615234375,
0.04998779296875,
0.0039043426513671875,
0.0024471282958984375,
-0.01215362548828125,
0.037322998046875,
0.006641387939453125,
0.0073089599609375,
-0.0009870529174804688,
0.0416259765625,
-0.023162841796875,
-0.0193634033203125,
0.0251312255859375,
-0.007381439208984375,
-0.01190185546875,
0.016998291015625,
0.040130615234375,
-0.00992584228515625,
-0.049713134765625,
0.059234619140625,
-0.027099609375,
0.046539306640625,
-0.030181884765625,
-0.0335693359375,
-0.044097900390625,
-0.035430908203125,
-0.00858306884765625,
-0.01409912109375,
-0.02093505859375,
-0.00811004638671875,
-0.01375579833984375,
0.0345458984375,
-0.018402099609375,
-0.040985107421875,
0.03021240234375,
-0.047576904296875,
-0.0167999267578125,
0.02752685546875,
-0.0255279541015625,
0.032073974609375,
-0.0032806396484375,
-0.00157928466796875,
0.0291595458984375,
0.03125,
0.0284271240234375,
-0.022247314453125,
-0.0174713134765625,
0.02923583984375,
0.033721923828125,
-0.01070404052734375,
-0.045623779296875,
-0.033538818359375,
0.01172637939453125,
-0.03582763671875,
0.0229339599609375,
-0.0014934539794921875,
0.0438232421875,
0.018341064453125,
0.0074462890625,
0.0097808837890625,
-0.00235748291015625,
-0.0452880859375,
0.04559326171875,
0.0128173828125,
-0.0198974609375,
-0.02197265625,
-0.01041412353515625,
0.0006413459777832031,
-0.0251922607421875,
-0.0094757080078125,
-0.006023406982421875,
-0.00720977783203125,
-0.01158905029296875,
-0.0499267578125,
0.00943756103515625,
-0.0208282470703125,
0.03912353515625,
0.0240020751953125,
0.029449462890625,
-0.002490997314453125,
0.02008056640625,
-0.01153564453125,
-0.06512451171875,
-0.029937744140625,
0.043304443359375,
0.032623291015625,
-0.0020656585693359375,
-0.01349639892578125,
-0.024871826171875,
-0.0238189697265625,
0.03228759765625,
-0.027923583984375,
0.0364990234375,
-0.01074981689453125,
0.020050048828125,
-0.02325439453125,
0.0277252197265625,
-0.03680419921875,
0.07464599609375,
-0.08758544921875,
-0.031494140625,
0.047149658203125,
-0.01065826416015625,
-0.04229736328125,
-0.00223541259765625,
0.0161590576171875,
-0.0633544921875,
-0.0186767578125,
0.060028076171875,
0.0328369140625,
0.0164642333984375,
-0.047760009765625,
-0.057830810546875,
0.06396484375,
-0.0584716796875,
-0.028350830078125,
-0.00676727294921875,
-0.0006728172302246094,
0.01096343994140625,
-0.02032470703125,
0.01123046875,
0.03204345703125,
0.0269622802734375,
0.0240631103515625,
0.03424072265625,
0.0088348388671875,
-0.036285400390625,
-0.00966644287109375,
0.01751708984375,
0.01474761962890625,
-0.0246124267578125,
-0.054168701171875,
0.01421356201171875,
0.038909912109375,
0.009674072265625,
0.038330078125,
0.031768798828125,
-0.0069122314453125,
-0.002269744873046875,
0.0010242462158203125,
-0.0251007080078125,
-0.0014734268188476562,
0.0126495361328125,
0.006359100341796875,
-0.00252532958984375,
-0.01837158203125,
0.0024662017822265625,
-0.008636474609375,
0.0028667449951171875,
0.0195770263671875,
0.06878662109375,
0.0206756591796875,
-0.007137298583984375,
-0.0384521484375,
-0.02197265625,
0.0165863037109375,
0.043670654296875,
-0.03717041015625,
-0.025360107421875,
0.0216827392578125,
0.0141754150390625,
-0.01293182373046875,
0.006229400634765625,
-0.024810791015625,
-0.0106048583984375,
-0.07177734375,
-0.0089263916015625,
0.0343017578125,
-0.031768798828125,
-0.031463623046875,
0.04925537109375,
0.01222991943359375,
-0.0070648193359375,
0.00995635986328125,
-0.0140380859375,
0.0295867919921875,
0.0006613731384277344,
-0.00201416015625,
0.0184326171875,
-0.0660400390625,
-0.00957489013671875,
0.02490234375,
0.03924560546875,
0.00995635986328125,
-0.024627685546875,
0.01690673828125,
0.025238037109375,
0.01244354248046875,
-0.0239410400390625,
0.0033779144287109375,
-0.0164642333984375,
-0.00803375244140625,
-0.023193359375,
0.00215911865234375,
-0.0107879638671875,
-0.0345458984375,
-0.0029468536376953125,
0.0285797119140625,
-0.058349609375,
-0.038421630859375,
-0.07684326171875,
-0.104736328125,
-0.055816650390625,
0.024169921875,
0.019683837890625,
0.01064300537109375,
0.1082763671875,
0.01947021484375,
-0.049652099609375,
0.0291290283203125,
-0.013275146484375,
-0.007450103759765625,
0.061676025390625,
0.01308441162109375,
-0.0100860595703125,
0.01108551025390625,
0.0012149810791015625,
-0.01003265380859375,
0.02252197265625,
-0.02777099609375,
-0.01334381103515625,
-0.00951385498046875,
0.0191650390625,
0.04876708984375,
-0.0033359527587890625,
-0.00812530517578125,
0.060760498046875,
0.056549072265625,
0.0055389404296875,
-0.0258331298828125,
0.02227783203125,
-0.0228271484375,
0.036895751953125,
-0.01061248779296875,
-0.012451171875,
0.006683349609375,
0.0246734619140625,
-0.0276641845703125,
0.0096588134765625,
-0.03375244140625,
-0.037628173828125,
0.03143310546875,
0.012969970703125,
0.0016527175903320312,
0.03131103515625,
0.03631591796875,
-0.0209808349609375,
-0.01806640625,
-0.005596160888671875,
-0.0114593505859375,
-0.022186279296875,
0.0084381103515625,
-0.0305633544921875,
-0.04229736328125,
0.017913818359375,
-0.038818359375,
0.006072998046875,
-0.025909423828125,
-0.0034008026123046875,
0.00017321109771728516,
0.05767822265625,
-0.02325439453125,
-0.024871826171875,
0.0086822509765625,
0.01361846923828125,
-0.0198516845703125,
0.00205230712890625,
-0.05194091796875,
-0.01203155517578125,
-0.043243408203125,
0.002735137939453125,
0.0088653564453125,
-0.03350830078125,
-0.038787841796875,
0.0216217041015625,
-0.056976318359375,
-0.01049041748046875,
0.03533935546875,
-0.033599853515625,
-0.01308441162109375,
-0.01285552978515625,
-0.004871368408203125,
-0.0299224853515625,
-0.006099700927734375,
-0.0198974609375,
-0.06854248046875,
0.0017032623291015625,
-0.062408447265625,
0.0278778076171875,
0.0106353759765625,
0.0275421142578125,
-0.0059051513671875,
0.04705810546875,
0.0267181396484375,
0.0019931793212890625,
0.01995849609375,
0.0070953369140625,
-0.0318603515625,
0.0014925003051757812,
0.01995849609375,
-0.03741455078125,
-0.0236053466796875,
-0.0257110595703125,
-0.0022487640380859375,
0.016510009765625,
-0.011993408203125,
-0.0341796875,
-0.009246826171875,
-0.0214385986328125,
-0.038299560546875,
-0.054534912109375,
-0.10772705078125,
-0.01837158203125,
-0.0445556640625,
-0.01806640625,
-0.05078125,
-0.0858154296875,
0.052154541015625,
0.0162506103515625,
0.0011749267578125,
-0.005405426025390625,
0.064208984375,
0.01055908203125,
-0.034881591796875,
-0.019439697265625,
0.017333984375,
0.0113067626953125,
-0.033111572265625,
0.0156097412109375,
-0.031585693359375,
-0.0228271484375,
0.076171875,
-0.044219970703125,
-0.00321197509765625,
0.024566650390625,
0.006229400634765625,
0.000705718994140625,
-0.04345703125,
0.0221099853515625,
-0.00872802734375,
0.0020999908447265625,
0.0167999267578125,
-0.0162200927734375,
-0.023681640625,
-0.0189361572265625,
0.06622314453125,
-0.0133056640625,
0.018829345703125,
-0.055877685546875,
-0.022613525390625,
0.031890869140625,
0.00847625732421875,
0.01479339599609375,
0.03057861328125,
-0.020782470703125,
0.0024089813232421875,
-0.042022705078125,
0.00557708740234375,
-0.036376953125,
-0.00441741943359375,
-0.01146697998046875,
0.023529052734375,
-0.035614013671875,
0.004253387451171875,
-0.021209716796875,
0.007289886474609375,
0.0287322998046875,
-0.00740814208984375,
-0.0421142578125,
-0.002574920654296875,
-0.004180908203125,
-0.035675048828125,
0.00913238525390625,
-0.0430908203125,
0.02764892578125,
0.022369384765625,
-0.0034656524658203125,
0.032073974609375,
-0.060577392578125,
0.0333251953125,
-0.0286865234375,
-0.003276824951171875,
-0.009918212890625,
-0.021087646484375,
0.0011072158813476562,
0.00029206275939941406,
-0.019195556640625,
-0.008880615234375,
0.00035500526428222656,
-0.019622802734375,
-0.0257110595703125,
0.07421875,
0.03289794921875,
-0.07147216796875,
0.018463134765625,
0.0275115966796875,
0.0306243896484375,
-0.041900634765625,
-0.010406494140625,
0.00592803955078125,
0.034637451171875,
-0.023345947265625,
-0.041656494140625,
0.033966064453125,
-0.0222320556640625,
-0.032623291015625,
-0.0162200927734375,
-0.002712249755859375,
0.00901031494140625,
-0.0186920166015625,
-0.005550384521484375,
0.01056671142578125,
0.04815673828125,
-0.03582763671875,
0.0416259765625,
-0.04718017578125,
0.031982421875,
-0.005451202392578125,
-0.0016260147094726562,
0.0126190185546875,
0.000736236572265625,
-0.047393798828125,
-0.02166748046875,
0.0012531280517578125,
0.01158905029296875,
0.005596160888671875,
-0.020111083984375,
-0.041717529296875,
-0.0009908676147460938,
-0.012054443359375,
0.0323486328125,
-0.0435791015625,
-0.0151519775390625,
-0.00896453857421875,
-0.01114654541015625,
0.085693359375,
0.050750732421875,
-0.049591064453125,
-0.012939453125,
-0.050262451171875,
-0.0128173828125,
-0.08013916015625,
-0.053558349609375,
-0.0484619140625,
0.035919189453125,
-0.01018524169921875,
-0.01409912109375,
0.027099609375,
0.0582275390625,
-0.00533294677734375,
0.057769775390625,
-0.00021183490753173828,
0.00738525390625,
-0.01678466796875,
0.04705810546875,
0.003387451171875,
0.04327392578125,
0.0129852294921875,
0.0147552490234375,
-0.0120391845703125,
-0.0214080810546875,
-0.00695037841796875,
-0.0450439453125,
-0.01055145263671875,
0.018096923828125,
-0.00968170166015625,
-0.0258941650390625,
-0.01073455810546875,
-0.0063323974609375,
0.0006146430969238281,
-0.0167236328125,
0.0010967254638671875,
-0.01392364501953125,
0.018829345703125,
-0.005863189697265625,
-0.010040283203125,
0.023529052734375,
-0.01294708251953125,
0.01070404052734375,
-0.00952911376953125,
-0.036468505859375,
0.045013427734375,
-0.006465911865234375,
0.0308380126953125,
0.03466796875,
-0.0282745361328125,
0.0426025390625,
0.0345458984375,
0.0075225830078125,
0.047821044921875,
0.00958251953125,
0.040985107421875,
0.0301971435546875,
0.03338623046875,
-0.0131378173828125,
-0.058746337890625,
0.03375244140625,
0.019775390625,
-0.0041046142578125,
0.033416748046875,
-0.025177001953125,
-0.0296478271484375,
-0.032257080078125,
0.00678253173828125,
-0.0038623809814453125,
-0.0029582977294921875,
0.01605224609375,
0.00594329833984375,
-0.01273345947265625,
0.0173187255859375,
-0.0218658447265625,
-0.0180511474609375,
0.003383636474609375,
-0.0190277099609375,
-0.0187835693359375,
0.00701904296875,
0.00850677490234375,
-0.012359619140625,
-0.020233154296875,
0.0039825439453125,
0.01393890380859375,
0.060028076171875,
-0.0278472900390625,
-0.0477294921875,
0.00981903076171875,
-0.037567138671875,
0.05145263671875,
-0.00295257568359375,
0.027801513671875,
-0.0264434814453125,
0.07232666015625,
-0.01087188720703125,
0.0107269287109375,
-0.0084075927734375,
-0.0260009765625,
0.018218994140625,
0.0168914794921875,
-0.0189361572265625,
-0.0084991455078125,
-0.01120758056640625,
-0.0421142578125,
0.0262908935546875,
-0.0187530517578125,
-0.0184173583984375,
-0.0008101463317871094,
-0.04254150390625,
-0.0015716552734375,
-0.035491943359375,
0.01065826416015625,
-0.003299713134765625,
-0.0177459716796875,
0.0496826171875,
-0.04437255859375,
-0.0006117820739746094,
0.02197265625,
0.039276123046875,
0.0143890380859375,
0.00794219970703125,
0.033416748046875,
-0.0513916015625,
-0.00785064697265625,
0.034088134765625,
0.00415802001953125,
-0.018280029296875,
0.01454925537109375,
-0.0482177734375,
0.09210205078125,
-0.030242919921875,
0.042633056640625,
0.0105743408203125,
0.03497314453125,
0.00948333740234375,
0.0243988037109375,
-0.034454345703125,
0.044036865234375,
0.052642822265625,
0.01464080810546875,
-0.036590576171875,
-0.028411865234375,
-0.0234832763671875,
0.045440673828125,
-0.01171875,
-0.0063934326171875,
-0.01322174072265625,
-0.00960540771484375,
-0.0013256072998046875,
0.043701171875,
0.0043792724609375,
0.01007843017578125,
0.005035400390625,
-0.04949951171875,
0.04205322265625,
0.037200927734375,
0.051544189453125,
-0.025543212890625,
0.007633209228515625,
0.00567626953125,
0.0270538330078125,
0.04833984375,
-0.028076171875,
0.0438232421875,
-0.01059722900390625,
-0.0258636474609375,
0.0305328369140625,
-0.031585693359375,
0.0183258056640625,
0.027984619140625,
0.033599853515625,
0.00070953369140625,
0.0150299072265625,
-0.002330780029296875,
0.05841064453125,
-0.0015850067138671875,
0.031768798828125,
0.00954437255859375,
0.0107269287109375,
-0.0013151168823242188,
0.01641845703125,
0.019622802734375,
0.03466796875,
-0.04486083984375,
0.03533935546875,
0.0009279251098632812,
0.0005640983581542969,
-0.0270843505859375,
0.00820159912109375,
0.00959014892578125,
0.03729248046875,
-0.043243408203125,
-0.06927490234375,
0.01025390625,
0.018463134765625,
0.0165863037109375,
0.0288238525390625,
0.0264434814453125,
0.0278167724609375,
0.0904541015625,
-0.06976318359375,
-0.0189208984375,
0.0258026123046875,
0.045013427734375,
-0.00457000732421875,
-0.016693115234375,
-0.032379150390625,
-0.041900634765625,
-0.00580596923828125,
-0.00958251953125,
0.0140228271484375,
0.025390625,
0.0083770751953125,
0.0288848876953125,
-0.02801513671875,
-0.00209808349609375,
-0.01508331298828125,
0.0166015625,
0.01922607421875,
0.0033740997314453125,
0.00402069091796875,
0.03399658203125,
-0.0132293701171875,
0.01444244384765625,
-0.005489349365234375,
0.039825439453125,
0.0263214111328125,
0.0350341796875,
0.012115478515625,
-0.01055145263671875,
0.0693359375,
-0.0158843994140625,
-0.0022602081298828125,
-0.041412353515625,
0.0264739990234375,
0.0296173095703125,
0.00547027587890625,
0.00424957275390625,
-0.01239013671875,
0.0712890625,
0.01435089111328125,
0.036468505859375,
-0.00012302398681640625,
-0.032928466796875,
0.02978515625,
-0.01172637939453125,
0.0986328125,
0.0369873046875,
-0.06512451171875,
-0.0269317626953125,
-0.01788330078125,
0.00424957275390625,
0.02960205078125,
0.037139892578125,
0.0022106170654296875,
-0.004291534423828125,
-0.004947662353515625,
-0.0252532958984375,
-0.0213470458984375,
0.03460693359375,
0.005748748779296875,
-0.0124053955078125,
-0.006877899169921875,
-0.0089111328125,
0.036773681640625,
0.0302886962890625,
0.054534912109375,
-0.0020618438720703125,
0.0084991455078125,
0.0272216796875,
-0.0029811859130859375,
-0.0037403106689453125,
0.0174407958984375,
0.0592041015625,
-0.07061767578125,
-0.035736083984375,
0.0826416015625,
-0.062255859375,
0.0128326416015625,
0.01043701171875,
-0.06109619140625,
0.024139404296875,
0.040496826171875,
-0.0182342529296875,
0.042266845703125,
-0.0172882080078125,
0.00913238525390625,
-0.049346923828125,
0.0259552001953125,
-0.02398681640625,
-0.01331329345703125,
-0.02947998046875,
-0.039886474609375,
0.050048828125,
0.0217742919921875,
0.0023517608642578125,
0.0042266845703125,
0.0264434814453125,
-0.00765228271484375,
0.0193939208984375,
0.01424407958984375,
0.0292205810546875,
0.0284423828125,
-0.01151275634765625,
-0.0217437744140625,
0.00032448768615722656,
-0.00799560546875,
0.032073974609375,
-0.016632080078125,
0.037261962890625,
0.0196380615234375,
-0.058624267578125,
-0.00028014183044433594,
0.0301971435546875,
0.0350341796875,
-0.01389312744140625,
-0.0006313323974609375,
0.003406524658203125,
-0.01467132568359375,
0.004138946533203125,
-0.0655517578125,
-0.0295562744140625,
-0.04107666015625,
0.0313720703125,
0.0299530029296875,
0.01262664794921875,
0.005863189697265625,
-0.00017571449279785156,
0.0157318115234375,
0.054595947265625,
0.00814056396484375,
-0.0244598388671875,
0.0254974365234375,
-0.0401611328125,
0.02789306640625,
0.03466796875,
-0.0274200439453125,
0.02471923828125,
0.020751953125,
-0.033172607421875,
0.01093292236328125,
-0.02032470703125,
-0.0292205810546875,
-0.0199127197265625,
0.0498046875,
0.0155029296875,
-0.050323486328125,
-0.006366729736328125,
0.09356689453125,
0.06451416015625,
0.12158203125,
0.0794677734375,
-0.028533935546875,
0.0070953369140625,
-0.002101898193359375,
-0.040618896484375,
0.016326904296875,
0.04266357421875,
-0.01468658447265625,
-0.07598876953125,
-0.0684814453125,
0.0303192138671875,
0.039794921875,
-0.0311431884765625,
-0.07373046875,
0.0228118896484375,
-0.02777099609375,
-0.037567138671875,
-0.0272216796875,
0.005168914794921875,
-0.00788116455078125,
-0.032806396484375,
-0.00806427001953125,
-0.0098419189453125,
0.003143310546875,
0.032745361328125,
0.0119171142578125,
0.034393310546875,
-0.00612640380859375,
-0.00026988983154296875,
-0.03155517578125,
0.0208892822265625,
0.011688232421875,
0.0257415771484375,
-0.0212554931640625,
0.0175628662109375,
-0.01629638671875,
0.02911376953125,
-0.0247039794921875,
-0.0200958251953125,
0.003902435302734375,
0.03167724609375,
0.0288238525390625,
-0.02557373046875,
-0.03857421875,
-0.039459228515625,
0.03546142578125,
-0.0245819091796875,
0.01128387451171875,
0.0080718994140625,
-0.0828857421875,
-0.07415771484375,
-0.012054443359375,
-0.02691650390625,
0.025146484375,
-0.0906982421875,
0.016998291015625,
0.0310211181640625,
-0.0156402587890625,
-0.003818511962890625,
0.0143890380859375,
-0.02191162109375,
-0.00426483154296875,
0.01324462890625,
-0.01152801513671875,
-0.0294952392578125,
0.02734375,
-0.005008697509765625,
-0.034515380859375,
-0.04302978515625,
0.0028743743896484375,
-0.01413726806640625,
-0.04913330078125,
0.0022373199462890625,
0.03436279296875,
0.01184844970703125,
-0.008209228515625,
-0.0164031982421875,
0.042816162109375,
0.004856109619140625,
0.0253448486328125,
-0.01447296142578125,
-0.027374267578125,
0.006656646728515625,
0.0216064453125,
-0.005619049072265625,
-0.0538330078125,
0.04742431640625,
0.020416259765625,
0.0279541015625,
0.0247039794921875,
0.016876220703125,
-0.00839996337890625,
0.04742431640625,
-0.02618408203125,
-0.0257110595703125,
-0.0289764404296875,
-0.03790283203125,
0.00830841064453125,
-0.016326904296875,
-0.024139404296875,
-0.04931640625,
0.0193634033203125,
-0.0286102294921875,
-0.0299530029296875,
0.03839111328125
] |
3e3ccc16056847ea315f0df3db083ad808de0cdc
|
Wordpress Stackexchange
Q: Name of last category level for a post I want to show the last category level of a post
for example, I hav a post in category "Course -> resultat -> Trail"
I want to show just "trail"
Thanks if somenone can help
A: Try the following. I've used get_the_terms so it is readily extendible to any taxonomy.
This will return an array of terms (event if it contains just one). For instance, the post may have terms a,b,c,d,e in the relationship:
a > b > c (parent > child)
d > e
In which case the following will return (as an array) the terms c and e. Whereas with the structure
a > b > c > d > e (parent > child)
It will return an array of one term - e.
//Get all terms associated with post in taxonomy 'category'
$terms = get_the_terms(get_the_ID(),'category');
//Get an array of their IDs
$term_ids = wp_list_pluck($terms,'term_id');
//Get array of parents - 0 is not a parent
$parents = array_filter(wp_list_pluck($terms,'parent'));
//Get array of IDs of terms which are not parents.
$term_ids_not_parents = array_diff($term_ids, $parents);
//Get corresponding term objects
$terms_not_parents = array_intersect_key($terms, $term_ids_not_parents);
|
Q: Name of last category level for a post I want to show the last category level of a post
for example, I hav a post in category "Course -> resultat -> Trail"
I want to show just "trail"
Thanks if somenone can help
A: Try the following. I've used get_the_terms so it is readily extendible to any taxonomy.
This will return an array of terms (event if it contains just one). For instance, the post may have terms a,b,c,d,e in the relationship:
a > b > c (parent > child)
d > e
In which case the following will return (as an array) the terms c and e. Whereas with the structure
a > b > c > d > e (parent > child)
It will return an array of one term - e.
//Get all terms associated with post in taxonomy 'category'
$terms = get_the_terms(get_the_ID(),'category');
//Get an array of their IDs
$term_ids = wp_list_pluck($terms,'term_id');
//Get array of parents - 0 is not a parent
$parents = array_filter(wp_list_pluck($terms,'parent'));
//Get array of IDs of terms which are not parents.
$term_ids_not_parents = array_diff($term_ids, $parents);
//Get corresponding term objects
$terms_not_parents = array_intersect_key($terms, $term_ids_not_parents);
A: This will work if you don't assign multiple categories to the posts.
$categories = get_the_category();
echo 'Post categories: ' . implode(', ', $categories);
or just
echo get_the_category_list( ', ' );
Updated according the first comment.
A: this work for me
$allCat = get_the_category();
$lastCat = array_reverse($allCat);
echo $lastCat[0]->name;
|
wordpress
|
{
"language": "en",
"length": 240,
"provenance": "stackexchange_00019.jsonl.gz:421028",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55890"
}
|
[
0.03131103515625,
0.001018524169921875,
-0.0253448486328125,
-0.0399169921875,
0.00908660888671875,
-0.01473236083984375,
-0.002254486083984375,
-0.00043487548828125,
0.032440185546875,
0.006038665771484375,
-0.0413818359375,
-0.0260467529296875,
-0.016387939453125,
-0.0282745361328125,
-0.034820556640625,
-0.033172607421875,
0.024993896484375,
-0.045257568359375,
0.00335693359375,
-0.0110626220703125,
-0.0156707763671875,
-0.00942230224609375,
0.06964111328125,
-0.022491455078125,
0.007221221923828125,
-0.004573822021484375,
0.0460205078125,
-0.04803466796875,
0.00543212890625,
-0.047332763671875,
0.0001461505889892578,
0.02435302734375,
0.010772705078125,
-0.00026798248291015625,
0.026336669921875,
-0.047821044921875,
0.01526641845703125,
-0.00881195068359375,
0.020904541015625,
0.019317626953125,
0.0253448486328125,
-0.00107574462890625,
0.0037288665771484375,
0.007770538330078125,
-0.040496826171875,
-0.01690673828125,
0.0031375885009765625,
0.01031494140625,
0.0176544189453125,
-0.0307464599609375,
0.0202178955078125,
-0.0029449462890625,
0.0259552001953125,
-0.0036182403564453125,
-0.0017032623291015625,
0.01556396484375,
0.0029277801513671875,
-0.028839111328125,
0.0239410400390625,
-0.003108978271484375,
-0.0176239013671875,
0.0006661415100097656,
0.0292205810546875,
-0.01134490966796875,
-0.013458251953125,
0.0242919921875,
0.00023114681243896484,
-0.00466156005859375,
-0.0266571044921875,
-0.0156707763671875,
0.03448486328125,
-0.024993896484375,
-0.0184478759765625,
-0.0054168701171875,
-0.04791259765625,
-0.022125244140625,
0.0211944580078125,
-0.032318115234375,
-0.01259613037109375,
0.0206756591796875,
-0.0218963623046875,
-0.026458740234375,
-0.07696533203125,
0.0200653076171875,
0.00013875961303710938,
0.049560546875,
-0.0133514404296875,
-0.020751953125,
-0.0166473388671875,
-0.00844573974609375,
-0.0038299560546875,
-0.0177459716796875,
-0.045684814453125,
0.042144775390625,
0.01959228515625,
-0.038177490234375,
0.017669677734375,
0.047821044921875,
-0.04986572265625,
-0.032867431640625,
-0.016143798828125,
-0.00807952880859375,
-0.044464111328125,
-0.005687713623046875,
0.0279998779296875,
0.051971435546875,
-0.0234527587890625,
-0.033172607421875,
0.04473876953125,
0.0223236083984375,
0.018310546875,
0.03826904296875,
0.005764007568359375,
-0.0080718994140625,
-0.02520751953125,
0.01629638671875,
-0.016937255859375,
0.0191650390625,
-0.0023136138916015625,
0.029266357421875,
-0.0259246826171875,
-0.004180908203125,
-0.0055084228515625,
0.05206298828125,
-0.00897979736328125,
0.00970458984375,
-0.00005644559860229492,
-0.0139923095703125,
0.027374267578125,
-0.0009136199951171875,
-0.04693603515625,
0.00824737548828125,
0.0692138671875,
0.03106689453125,
0.0266571044921875,
-0.012298583984375,
-0.015533447265625,
0.00995635986328125,
-0.01090240478515625,
-0.01375579833984375,
0.00487518310546875,
0.0302734375,
0.054412841796875,
-0.023956298828125,
0.0159149169921875,
0.0038299560546875,
0.017730712890625,
0.0203857421875,
-0.0120697021484375,
-0.016571044921875,
0.031768798828125,
-0.010986328125,
0.08502197265625,
-0.00684356689453125,
-0.08734130859375,
-0.0266876220703125,
0.0114898681640625,
-0.041656494140625,
-0.05279541015625,
-0.0958251953125,
0.03216552734375,
0.0174102783203125,
0.034576416015625,
-0.00846099853515625,
-0.036865234375,
-0.0207366943359375,
-0.0552978515625,
-0.014984130859375,
0.031585693359375,
0.004238128662109375,
0.0889892578125,
-0.03570556640625,
0.01287078857421875,
0.0478515625,
0.021087646484375,
0.0279388427734375,
-0.041229248046875,
-0.00614166259765625,
0.034637451171875,
0.0038661956787109375,
-0.024017333984375,
-0.04022216796875,
-0.02142333984375,
0.00853729248046875,
-0.01323699951171875,
0.0176239013671875,
0.0034389495849609375,
0.0232696533203125,
0.0008668899536132812,
0.01776123046875,
0.0166168212890625,
0.0261688232421875,
-0.0214996337890625,
0.0015497207641601562,
-0.0025482177734375,
0.001270294189453125,
-0.00807952880859375,
0.0254974365234375,
-0.017730712890625,
-0.0189208984375,
-0.023101806640625,
-0.0049591064453125,
-0.005290985107421875,
0.00615692138671875,
-0.06854248046875,
0.01210784912109375,
-0.030120849609375,
0.039581298828125,
-0.0155029296875,
0.0111083984375,
0.03643798828125,
0.00673675537109375,
-0.042755126953125,
0.005832672119140625,
-0.016876220703125,
0.0148468017578125,
-0.0347900390625,
-0.01513671875,
-0.00213623046875,
-0.01346588134765625,
-0.01454925537109375,
0.0096588134765625,
-0.00817108154296875,
0.00827789306640625,
0.049346923828125,
0.04498291015625,
-0.035614013671875,
0.0126495361328125,
0.033233642578125,
0.04248046875,
-0.045684814453125,
0.006256103515625,
0.05218505859375,
0.0143585205078125,
-0.034576416015625,
0.004093170166015625,
0.01708984375,
-0.0477294921875,
-0.009490966796875,
0.057342529296875,
0.042083740234375,
-0.0004277229309082031,
-0.044586181640625,
-0.08056640625,
0.061248779296875,
-0.0791015625,
-0.0401611328125,
-0.0284576416015625,
0.0024662017822265625,
0.0560302734375,
-0.00875091552734375,
0.02490234375,
0.0018768310546875,
0.02484130859375,
0.0171661376953125,
0.0259246826171875,
-0.0297698974609375,
-0.01316070556640625,
0.0174713134765625,
-0.01247406005859375,
0.005649566650390625,
-0.07806396484375,
-0.0298919677734375,
-0.016632080078125,
-0.006420135498046875,
0.020660400390625,
0.0011014938354492188,
0.0137939453125,
-0.0249176025390625,
0.00014734268188476562,
0.0174713134765625,
0.0033817291259765625,
0.0079345703125,
0.0069732666015625,
0.004726409912109375,
-0.02105712890625,
0.008026123046875,
-0.0092010498046875,
0.006633758544921875,
-0.0238189697265625,
0.00024890899658203125,
0.07318115234375,
0.043975830078125,
-0.01515960693359375,
-0.066162109375,
-0.061737060546875,
0.019287109375,
0.0218505859375,
-0.045440673828125,
-0.020782470703125,
0.004528045654296875,
0.06475830078125,
0.00812530517578125,
-0.0012369155883789062,
0.016632080078125,
0.0270233154296875,
-0.05670166015625,
0.0112457275390625,
0.01045989990234375,
-0.0216217041015625,
-0.049041748046875,
0.01861572265625,
0.017730712890625,
-0.03289794921875,
-0.0085296630859375,
0.003597259521484375,
0.0258941650390625,
-0.0298919677734375,
-0.0309600830078125,
-0.0017576217651367188,
-0.05438232421875,
-0.01325225830078125,
0.013458251953125,
0.09375,
-0.03375244140625,
-0.056427001953125,
0.0172882080078125,
0.035919189453125,
-0.007678985595703125,
-0.0157012939453125,
0.004108428955078125,
-0.047119140625,
-0.033416748046875,
0.0241851806640625,
-0.03216552734375,
-0.0014390945434570312,
0.034637451171875,
-0.0032596588134765625,
0.0178070068359375,
-0.0421142578125,
-0.058624267578125,
-0.051788330078125,
-0.08013916015625,
0.00243377685546875,
0.007843017578125,
0.01439666748046875,
-0.002582550048828125,
0.05810546875,
0.022705078125,
-0.0197296142578125,
0.01273345947265625,
0.07293701171875,
-0.032470703125,
-0.02313232421875,
-0.0426025390625,
0.01232147216796875,
-0.004669189453125,
0.01202392578125,
-0.037353515625,
-0.025604248046875,
0.0288848876953125,
-0.01446533203125,
-0.0069122314453125,
0.06646728515625,
0.03839111328125,
-0.02398681640625,
0.003879547119140625,
0.078369140625,
0.0341796875,
0.0169525146484375,
-0.0355224609375,
-0.0150604248046875,
-0.04595947265625,
0.044586181640625,
0.0294647216796875,
0.01103973388671875,
-0.026092529296875,
0.0208740234375,
-0.039947509765625,
-0.01080322265625,
-0.04925537109375,
-0.026031494140625,
0.03326416015625,
-0.01071929931640625,
-0.0245208740234375,
0.0423583984375,
0.0014467239379882812,
-0.04180908203125,
-0.00585174560546875,
-0.026885986328125,
0.00043702125549316406,
0.0017099380493164062,
-0.03302001953125,
-0.0273284912109375,
-0.043212890625,
0.0192718505859375,
-0.0487060546875,
0.03289794921875,
-0.057342529296875,
-0.0156402587890625,
-0.01424407958984375,
0.10028076171875,
-0.044677734375,
-0.022857666015625,
-0.01068115234375,
0.0026721954345703125,
-0.0038604736328125,
-0.042999267578125,
-0.03863525390625,
-0.0241241455078125,
-0.077392578125,
0.029266357421875,
0.00982666015625,
-0.00334930419921875,
-0.020233154296875,
0.0506591796875,
-0.04974365234375,
-0.02789306640625,
0.032073974609375,
-0.0096435546875,
-0.02227783203125,
0.01953125,
-0.0275115966796875,
0.0042266845703125,
-0.027496337890625,
0.01309967041015625,
-0.0235137939453125,
-0.0109710693359375,
0.007808685302734375,
-0.01290130615234375,
-0.02337646484375,
0.00122833251953125,
-0.0019407272338867188,
0.046905517578125,
0.01360321044921875,
0.0069427490234375,
0.0004432201385498047,
-0.000038683414459228516,
-0.0200347900390625,
0.0120697021484375,
0.01251220703125,
-0.0158233642578125,
-0.0362548828125,
-0.03363037109375,
-0.00829315185546875,
0.0213623046875,
-0.007129669189453125,
-0.00726318359375,
0.0010728836059570312,
-0.0036869049072265625,
-0.040435791015625,
-0.04119873046875,
-0.0208587646484375,
0.0246734619140625,
-0.01311492919921875,
0.00818634033203125,
-0.05572509765625,
-0.0699462890625,
0.02203369140625,
0.0645751953125,
-0.0305633544921875,
0.004985809326171875,
0.03314208984375,
0.016693115234375,
-0.043670654296875,
-0.05731201171875,
0.038116455078125,
0.0195770263671875,
-0.035491943359375,
0.018951416015625,
-0.027435302734375,
-0.0196380615234375,
0.0721435546875,
-0.02587890625,
0.00457000732421875,
0.016571044921875,
0.0399169921875,
0.0007352828979492188,
-0.033172607421875,
0.037200927734375,
0.0009427070617675781,
-0.0450439453125,
0.0028324127197265625,
-0.035400390625,
-0.02435302734375,
-0.0152435302734375,
0.05517578125,
-0.032562255859375,
0.07318115234375,
-0.0333251953125,
-0.00843048095703125,
0.00916290283203125,
-0.00554656982421875,
0.014923095703125,
0.035980224609375,
-0.014068603515625,
-0.00383758544921875,
-0.0166015625,
-0.006313323974609375,
-0.03143310546875,
-0.020233154296875,
0.01226806640625,
-0.0005064010620117188,
0.01227569580078125,
-0.00360870361328125,
-0.020416259765625,
0.0072784423828125,
0.01837158203125,
-0.0083465576171875,
-0.039520263671875,
0.01593017578125,
-0.0169830322265625,
-0.004390716552734375,
0.0316162109375,
-0.02032470703125,
0.0206146240234375,
0.0034694671630859375,
0.005260467529296875,
0.002231597900390625,
-0.031341552734375,
-0.00925445556640625,
-0.00873565673828125,
-0.03033447265625,
-0.003826141357421875,
-0.00830841064453125,
-0.052276611328125,
0.1256103515625,
0.0234375,
0.028778076171875,
-0.035675048828125,
-0.0077362060546875,
-0.01202392578125,
0.043609619140625,
0.049591064453125,
-0.064697265625,
0.0107269287109375,
0.00449371337890625,
0.0280303955078125,
-0.04827880859375,
-0.038970947265625,
0.01297760009765625,
0.0535888671875,
-0.0018663406372070312,
-0.0032978057861328125,
0.009613037109375,
0.01483917236328125,
-0.033477783203125,
0.020172119140625,
0.035369873046875,
-0.0018167495727539062,
-0.010894775390625,
-0.0029277801513671875,
0.00589752197265625,
0.032470703125,
-0.0279693603515625,
-0.00632476806640625,
-0.05023193359375,
0.004886627197265625,
0.020111083984375,
-0.040557861328125,
0.0153045654296875,
0.0080108642578125,
-0.07208251953125,
-0.033447265625,
0.0041351318359375,
0.00911712646484375,
-0.0204010009765625,
-0.013397216796875,
-0.026123046875,
-0.01415252685546875,
-0.0170440673828125,
0.042236328125,
-0.0093841552734375,
-0.0245819091796875,
0.021148681640625,
0.00417327880859375,
0.04443359375,
0.024810791015625,
-0.055816650390625,
0.0026798248291015625,
-0.053741455078125,
0.003200531005859375,
-0.004390716552734375,
-0.048919677734375,
-0.0181732177734375,
-0.007183074951171875,
-0.03900146484375,
0.0010290145874023438,
-0.010467529296875,
0.0220489501953125,
0.00905609130859375,
0.0184326171875,
-0.0276336669921875,
-0.00412750244140625,
0.031402587890625,
0.0364990234375,
-0.041229248046875,
0.032928466796875,
0.0302886962890625,
0.004302978515625,
-0.07177734375,
-0.005405426025390625,
0.014617919921875,
-0.06640625,
-0.0224761962890625,
0.00948333740234375,
-0.04425048828125,
-0.0169525146484375,
-0.01235198974609375,
-0.00019884109497070312,
0.0261993408203125,
0.0160980224609375,
0.01544189453125,
0.007053375244140625,
-0.04058837890625,
0.023529052734375,
-0.0207977294921875,
0.0662841796875,
-0.03759765625,
-0.018707275390625,
0.002410888671875,
-0.00530242919921875,
0.0289154052734375,
-0.023529052734375,
0.0246734619140625,
0.0161285400390625,
0.013916015625,
0.0064544677734375,
0.040985107421875,
-0.0316162109375,
0.0221099853515625,
0.016021728515625,
0.00823211669921875,
0.0153350830078125,
0.0225982666015625,
0.018798828125,
-0.0264739990234375,
0.062164306640625,
0.01166534423828125,
-0.0298614501953125,
0.0360107421875,
-0.058624267578125,
-0.0439453125,
-0.051055908203125,
-0.01398468017578125,
0.05474853515625,
-0.0069732666015625,
-0.006122589111328125,
-0.0137176513671875,
-0.00417327880859375,
0.0316162109375,
0.00632476806640625,
0.034088134765625,
-0.06512451171875,
-0.0189361572265625,
-0.039947509765625,
-0.0182647705078125,
-0.0003325939178466797,
-0.00860595703125,
-0.0101165771484375,
0.03460693359375,
0.008056640625,
-0.01546478271484375,
-0.01184844970703125,
0.002544403076171875,
-0.00019562244415283203,
-0.038330078125,
0.00527191162109375,
-0.011962890625,
-0.01013946533203125,
-0.069580078125,
-0.006786346435546875,
-0.01064300537109375,
0.01105499267578125,
-0.01038360595703125,
-0.0199127197265625,
0.0113372802734375,
0.00067138671875,
-0.0160980224609375,
-0.00738525390625,
-0.01206207275390625,
-0.07598876953125,
0.002689361572265625,
0.0195465087890625,
0.0167083740234375,
0.0169219970703125,
-0.00708770751953125,
0.00978851318359375,
-0.03448486328125,
0.007663726806640625,
-0.01023101806640625,
-0.007450103759765625,
0.06243896484375,
-0.042510986328125,
-0.00730133056640625,
0.024993896484375,
0.0458984375,
-0.004627227783203125,
-0.00319671630859375,
0.0002703666687011719,
-0.0233306884765625,
0.0032520294189453125,
0.0008058547973632812,
-0.00598907470703125,
0.0088348388671875,
-0.0103607177734375,
-0.0513916015625,
0.08746337890625,
0.00072479248046875,
0.0330810546875,
0.02508544921875,
0.0276947021484375,
-0.038665771484375,
-0.00891876220703125,
-0.0194244384765625,
0.05126953125,
0.041351318359375,
0.033416748046875,
-0.0232696533203125,
-0.02166748046875,
0.0177001953125,
0.057708740234375,
0.057830810546875,
0.00901031494140625,
-0.035369873046875,
-0.019805908203125,
0.0285186767578125,
0.033294677734375,
-0.01256561279296875,
0.04510498046875,
0.0267181396484375,
-0.0132598876953125,
0.035888671875,
0.01372528076171875,
0.048614501953125,
-0.040802001953125,
0.01666259765625,
0.036773681640625,
0.015350341796875,
0.027862548828125,
-0.016448974609375,
0.01617431640625,
0.00458526611328125,
-0.036956787109375,
-0.0004057884216308594,
-0.034088134765625,
0.04541015625,
0.0160980224609375,
0.049835205078125,
-0.08465576171875,
0.002651214599609375,
-0.02655029296875,
0.0625,
-0.01012420654296875,
0.0160675048828125,
0.035430908203125,
0.0226593017578125,
0.0458984375,
0.00260162353515625,
0.0142822265625,
0.0128021240234375,
-0.010009765625,
0.0291748046875,
0.0181427001953125,
0.0126953125,
-0.02642822265625,
0.0286865234375,
0.030120849609375,
0.0303497314453125,
-0.041595458984375,
-0.0400390625,
-0.004436492919921875,
-0.01369476318359375,
0.020172119140625,
0.0182037353515625,
0.04071044921875,
0.08612060546875,
0.06365966796875,
-0.05419921875,
-0.027557373046875,
0.02020263671875,
0.0628662109375,
-0.0008578300476074219,
-0.01479339599609375,
-0.031585693359375,
-0.07318115234375,
0.01168060302734375,
-0.0188446044921875,
0.02130126953125,
0.00827789306640625,
-0.008544921875,
0.037353515625,
-0.046173095703125,
0.006999969482421875,
-0.01264190673828125,
-0.01751708984375,
-0.0205535888671875,
0.023193359375,
0.00010192394256591797,
0.041107177734375,
-0.036376953125,
0.01197052001953125,
0.01219940185546875,
0.057037353515625,
0.06671142578125,
0.047271728515625,
-0.00634002685546875,
-0.006427764892578125,
0.0626220703125,
-0.01849365234375,
-0.031646728515625,
-0.018707275390625,
-0.006999969482421875,
0.052215576171875,
0.01305389404296875,
0.0260162353515625,
0.037841796875,
0.0419921875,
-0.02685546875,
0.08929443359375,
-0.004913330078125,
0.049560546875,
0.0279693603515625,
0.013458251953125,
0.0360107421875,
0.0372314453125,
-0.0836181640625,
-0.01012420654296875,
-0.0386962890625,
0.00563812255859375,
0.014739990234375,
0.0099945068359375,
-0.005710601806640625,
0.0308837890625,
0.037811279296875,
-0.05474853515625,
0.0035247802734375,
0.034759521484375,
0.03173828125,
-0.0099945068359375,
-0.0157928466796875,
-0.01450347900390625,
0.0233917236328125,
0.0201416015625,
0.0278778076171875,
0.005908966064453125,
0.048187255859375,
-0.0150909423828125,
0.0164642333984375,
0.031036376953125,
-0.023712158203125,
0.08197021484375,
-0.10205078125,
-0.0245361328125,
0.052703857421875,
-0.0293426513671875,
-0.00994110107421875,
0.0020999908447265625,
-0.02972412109375,
0.016326904296875,
0.045623779296875,
-0.00008940696716308594,
0.0218353271484375,
-0.029998779296875,
0.01197052001953125,
-0.03887939453125,
0.0183563232421875,
-0.004932403564453125,
-0.0125274658203125,
-0.04266357421875,
-0.0404052734375,
0.07110595703125,
0.06640625,
-0.01397705078125,
0.0134429931640625,
0.023895263671875,
-0.03472900390625,
0.0289459228515625,
-0.0119476318359375,
0.048736572265625,
0.0296630859375,
0.01479339599609375,
0.00047206878662109375,
0.01776123046875,
-0.00598907470703125,
0.0190887451171875,
0.0306396484375,
-0.00519561767578125,
0.030853271484375,
-0.0439453125,
-0.0160675048828125,
0.04095458984375,
0.057403564453125,
-0.0145111083984375,
0.0286407470703125,
0.00921630859375,
-0.02227783203125,
-0.00992584228515625,
-0.058349609375,
-0.04241943359375,
-0.052398681640625,
0.0110626220703125,
-0.00022876262664794922,
0.00732421875,
-0.0237579345703125,
0.02825927734375,
-0.00940704345703125,
0.03717041015625,
0.016845703125,
-0.0277099609375,
0.020843505859375,
-0.03204345703125,
0.021636962890625,
0.002593994140625,
-0.0005927085876464844,
0.00804901123046875,
-0.00026917457580566406,
-0.042449951171875,
0.01004791259765625,
-0.0176239013671875,
-0.00563812255859375,
-0.00241851806640625,
0.0023174285888671875,
-0.006099700927734375,
-0.019012451171875,
-0.00982666015625,
-0.0068511962890625,
0.01294708251953125,
0.031005859375,
0.039306640625,
-0.027069091796875,
-0.029876708984375,
0.0249786376953125,
-0.03546142578125,
0.0093841552734375,
0.0552978515625,
-0.01406097412109375,
-0.06304931640625,
0.01288604736328125,
0.00557708740234375,
0.040313720703125,
-0.049102783203125,
-0.08563232421875,
0.034088134765625,
-0.0120849609375,
-0.05877685546875,
-0.0257568359375,
-0.005870819091796875,
-0.00719451904296875,
-0.012451171875,
-0.0011034011840820312,
-0.0186004638671875,
-0.00972747802734375,
0.033447265625,
0.0205841064453125,
0.0175323486328125,
0.00878143310546875,
-0.005863189697265625,
-0.06689453125,
0.0151519775390625,
0.01000213623046875,
0.0093231201171875,
0.01073455810546875,
0.00852203369140625,
0.0159149169921875,
0.050323486328125,
-0.027801513671875,
-0.005855560302734375,
-0.00878143310546875,
-0.01317596435546875,
-0.00003731250762939453,
-0.0670166015625,
-0.03125,
-0.017181396484375,
0.041107177734375,
0.0230865478515625,
0.0020732879638671875,
-0.03326416015625,
-0.0248565673828125,
-0.025054931640625,
-0.031890869140625,
0.0008525848388671875,
0.0179595947265625,
-0.05157470703125,
0.0003466606140136719,
0.0197601318359375,
-0.03662109375,
-0.00717926025390625,
-0.03411865234375,
-0.06494140625,
0.0113372802734375,
-0.01275634765625,
0.0012273788452148438,
-0.01558685302734375,
0.028564453125,
-0.0384521484375,
-0.0135345458984375,
-0.05352783203125,
-0.0123291015625,
0.0023288726806640625,
-0.0621337890625,
-0.0130157470703125,
0.0080718994140625,
0.004093170166015625,
-0.01110076904296875,
0.007404327392578125,
0.01262664794921875,
0.01235198974609375,
0.0010499954223632812,
-0.00873565673828125,
-0.050445556640625,
0.00917816162109375,
0.0186614990234375,
-0.031524658203125,
-0.0287628173828125,
0.048553466796875,
0.032562255859375,
0.09259033203125,
0.005748748779296875,
0.043914794921875,
0.01371002197265625,
0.035186767578125,
0.00006431341171264648,
-0.0248260498046875,
0.021575927734375,
-0.038421630859375,
0.0027713775634765625,
-0.036956787109375,
-0.00934600830078125,
-0.039794921875,
-0.0014867782592773438,
0.0262451171875,
-0.0301971435546875,
0.0243682861328125
] |
c17dba1d4bfaf98285737d1bcede4d5858d027e9
|
Wordpress Stackexchange
Q: How to completely export and import WordPress? I exported all posts of a WordPress blog. Then I imported the xml file to another WordPress blog. When I tried to search few posts in the new blog, which are in the old blog, I did not find anything. When I opened the xml file, I found that it's incomplete. The file contains 14,226 lines of code. The size of the file is 1.2 MB. I used default tool of WordPress to export and import.
How to export complete list of posts and then import the same?
I have another lame idea to do this, if I don't get any good solution. I can delete the posts which are exported and then export again. But this is a stupid time taking process.
A: To copy a WordPress install from A to B, do an SQL dump on site A, and restore it to site B. Then search and replace the DB to swap the old URLs for the new URLs. Make sure to copy over the uploads folder in wp-content.
To do the search replace, consider using a tool such as this:
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
|
Q: How to completely export and import WordPress? I exported all posts of a WordPress blog. Then I imported the xml file to another WordPress blog. When I tried to search few posts in the new blog, which are in the old blog, I did not find anything. When I opened the xml file, I found that it's incomplete. The file contains 14,226 lines of code. The size of the file is 1.2 MB. I used default tool of WordPress to export and import.
How to export complete list of posts and then import the same?
I have another lame idea to do this, if I don't get any good solution. I can delete the posts which are exported and then export again. But this is a stupid time taking process.
A: To copy a WordPress install from A to B, do an SQL dump on site A, and restore it to site B. Then search and replace the DB to swap the old URLs for the new URLs. Make sure to copy over the uploads folder in wp-content.
To do the search replace, consider using a tool such as this:
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
A: *
*Install the WP Migrate DB plugin
*Enter new server path and site address
*Export database
*Create a new DB and import the database SQL file
*Download the files and change the wp-config.php database connection details with the new details from the new DB
*Upload the files to the new installation
|
wordpress
|
{
"language": "en",
"length": 244,
"provenance": "stackexchange_00019.jsonl.gz:421039",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/55925"
}
|
[
0.0282135009765625,
-0.0223388671875,
0.04248046875,
0.0625,
-0.02093505859375,
-0.03863525390625,
0.0804443359375,
-0.0740966796875,
0.00849151611328125,
-0.01702880859375,
-0.033538818359375,
0.007843017578125,
-0.048492431640625,
-0.02764892578125,
0.01021575927734375,
-0.05035400390625,
0.02569580078125,
-0.047821044921875,
0.0096435546875,
-0.00726318359375,
0.034759521484375,
0.0019741058349609375,
0.040283203125,
0.01226043701171875,
0.00852203369140625,
-0.004650115966796875,
0.047821044921875,
0.0007138252258300781,
0.0132598876953125,
-0.0008149147033691406,
0.0179901123046875,
-0.022796630859375,
0.012939453125,
0.0230255126953125,
-0.042510986328125,
-0.0430908203125,
-0.0306396484375,
0.02239990234375,
-0.0110015869140625,
0.0153045654296875,
0.00580596923828125,
-0.00408172607421875,
0.04443359375,
0.024017333984375,
-0.0080413818359375,
-0.03448486328125,
0.033294677734375,
-0.0289459228515625,
0.01192474365234375,
0.00951385498046875,
0.01763916015625,
0.020416259765625,
0.031585693359375,
-0.0184783935546875,
-0.021881103515625,
-0.0082855224609375,
0.0012073516845703125,
0.0447998046875,
0.026947021484375,
-0.00930023193359375,
-0.040924072265625,
0.0240325927734375,
0.0012302398681640625,
0.0006957054138183594,
-0.0158233642578125,
0.006053924560546875,
0.00522613525390625,
-0.005161285400390625,
-0.06884765625,
-0.0172882080078125,
0.057647705078125,
-0.03558349609375,
-0.0014019012451171875,
-0.0133056640625,
0.00475311279296875,
0.00043964385986328125,
0.0157928466796875,
-0.01157379150390625,
-0.00756072998046875,
0.0228271484375,
-0.005321502685546875,
0.01230621337890625,
0.004726409912109375,
-0.0704345703125,
0.03094482421875,
-0.045928955078125,
0.0002472400665283203,
0.012115478515625,
0.005340576171875,
-0.01355743408203125,
0.004863739013671875,
-0.009613037109375,
-0.06304931640625,
0.039886474609375,
0.03106689453125,
-0.034820556640625,
-0.01873779296875,
-0.004695892333984375,
0.0168914794921875,
0.04681396484375,
-0.01386260986328125,
-0.030609130859375,
0.055816650390625,
-0.037872314453125,
0.018768310546875,
0.03961181640625,
-0.00891876220703125,
-0.0276641845703125,
0.043701171875,
0.02508544921875,
-0.0050811767578125,
0.047576904296875,
-0.0002200603485107422,
-0.00231170654296875,
-0.0177001953125,
0.03509521484375,
0.0016717910766601562,
0.022979736328125,
-0.0123443603515625,
0.041168212890625,
-0.03253173828125,
-0.002140045166015625,
-0.10040283203125,
0.021270751953125,
-0.00518035888671875,
-0.04266357421875,
0.0222930908203125,
0.07843017578125,
-0.0014791488647460938,
0.0297393798828125,
-0.032470703125,
0.013885498046875,
0.053680419921875,
0.01194000244140625,
-0.00827789306640625,
-0.033477783203125,
-0.0030364990234375,
0.0111236572265625,
-0.0103607177734375,
0.011871337890625,
-0.0011081695556640625,
-0.0599365234375,
-0.0139312744140625,
-0.004329681396484375,
0.03936767578125,
0.005489349365234375,
0.01184844970703125,
0.0206146240234375,
0.004413604736328125,
0.0216064453125,
-0.01082611083984375,
0.0225830078125,
0.0303192138671875,
-0.01157379150390625,
0.0165863037109375,
-0.08209228515625,
0.0212554931640625,
-0.06317138671875,
0.06109619140625,
-0.06842041015625,
-0.01097869873046875,
0.01047515869140625,
0.049072265625,
0.01611328125,
-0.01812744140625,
-0.0010929107666015625,
-0.0290374755859375,
-0.01091766357421875,
0.017822265625,
-0.01552581787109375,
-0.042938232421875,
-0.0010433197021484375,
0.01396942138671875,
-0.011322021484375,
-0.002574920654296875,
0.0369873046875,
0.0189208984375,
-0.04180908203125,
0.016998291015625,
0.03619384765625,
-0.0146942138671875,
-0.01776123046875,
0.00720977783203125,
-0.00608062744140625,
-0.032257080078125,
0.007678985595703125,
0.01342010498046875,
0.04022216796875,
0.0170440673828125,
0.033782958984375,
0.01045989990234375,
0.00302886962890625,
-0.015655517578125,
-0.0020465850830078125,
-0.034149169921875,
-0.01318359375,
0.00685882568359375,
0.0230712890625,
-0.01157379150390625,
0.0223388671875,
-0.0187530517578125,
0.01580810546875,
-0.0005631446838378906,
0.01406097412109375,
-0.01084136962890625,
0.0035953521728515625,
-0.004024505615234375,
0.012847900390625,
-0.031951904296875,
0.02325439453125,
0.04595947265625,
0.035125732421875,
-0.043304443359375,
-0.01165771484375,
-0.000873565673828125,
0.0008554458618164062,
0.01157379150390625,
0.03924560546875,
-0.0056915283203125,
-0.005031585693359375,
-0.020751953125,
-0.0191192626953125,
-0.016571044921875,
0.035888671875,
0.020111083984375,
-0.0100860595703125,
-0.020233154296875,
-0.02001953125,
-0.0214996337890625,
0.0045166015625,
-0.01482391357421875,
0.035400390625,
0.0440673828125,
0.04620361328125,
-0.026947021484375,
-0.0174713134765625,
0.005466461181640625,
-0.0219268798828125,
0.03253173828125,
0.03887939453125,
0.0299530029296875,
0.0236968994140625,
-0.00496673583984375,
0.0199127197265625,
0.0438232421875,
-0.0310211181640625,
0.0151824951171875,
0.00414276123046875,
0.013641357421875,
0.051422119140625,
-0.03082275390625,
-0.004352569580078125,
0.00524139404296875,
-0.0489501953125,
-0.00319671630859375,
0.042022705078125,
-0.01180267333984375,
-0.007354736328125,
-0.0174407958984375,
0.003185272216796875,
-0.01103973388671875,
-0.0272674560546875,
-0.016632080078125,
-0.0242767333984375,
-0.00833892822265625,
0.04547119140625,
0.05145263671875,
0.039459228515625,
-0.03399658203125,
0.01250457763671875,
0.01207733154296875,
0.044342041015625,
-0.0005092620849609375,
-0.00669097900390625,
0.000056803226470947266,
0.056488037109375,
-0.01221466064453125,
0.00864410400390625,
-0.0052947998046875,
0.01534271240234375,
-0.004184722900390625,
0.0255584716796875,
0.018829345703125,
-0.0170135498046875,
0.0120391845703125,
-0.055572509765625,
0.01548004150390625,
-0.01232147216796875,
-0.0474853515625,
-0.00019848346710205078,
0.01502227783203125,
0.0389404296875,
0.010498046875,
-0.00991058349609375,
0.0200347900390625,
0.0209503173828125,
0.081298828125,
-0.05828857421875,
0.046142578125,
0.005157470703125,
0.09136962890625,
0.0662841796875,
-0.0015039443969726562,
0.02099609375,
-0.0096893310546875,
0.0179443359375,
0.024749755859375,
-0.014739990234375,
-0.0311279296875,
-0.018890380859375,
-0.062347412109375,
-0.03826904296875,
0.020294189453125,
0.0029315948486328125,
-0.0148468017578125,
-0.038787841796875,
-0.0389404296875,
-0.007568359375,
-0.09210205078125,
-0.04742431640625,
-0.04150390625,
-0.059112548828125,
-0.018402099609375,
-0.003620147705078125,
-0.01861572265625,
0.0062255859375,
0.006252288818359375,
0.01007080078125,
0.05950927734375,
-0.055633544921875,
-0.05328369140625,
-0.08087158203125,
-0.10302734375,
-0.0677490234375,
0.025360107421875,
-0.006839752197265625,
0.0067138671875,
0.02716064453125,
0.006336212158203125,
-0.041900634765625,
-0.00043201446533203125,
0.0819091796875,
-0.028411865234375,
-0.03594970703125,
-0.00473785400390625,
-0.034454345703125,
0.0098876953125,
0.000051915645599365234,
0.071533203125,
0.01044464111328125,
-0.01493072509765625,
0.0021877288818359375,
0.0078277587890625,
-0.004001617431640625,
0.002307891845703125,
-0.0218048095703125,
-0.01526641845703125,
0.01288604736328125,
-0.0288543701171875,
-0.042755126953125,
0.01727294921875,
0.01093292236328125,
0.003887176513671875,
-0.023773193359375,
-0.01326751708984375,
-0.02789306640625,
-0.0011262893676757812,
-0.00875091552734375,
-0.004558563232421875,
0.0167236328125,
0.02667236328125,
-0.00994873046875,
-0.02001953125,
-0.02935791015625,
-0.02899169921875,
-0.0228271484375,
0.0360107421875,
-0.0086212158203125,
0.004428863525390625,
0.019073486328125,
-0.0201568603515625,
-0.01335906982421875,
-0.021087646484375,
-0.0208740234375,
-0.0814208984375,
0.0504150390625,
-0.0102386474609375,
-0.032989501953125,
-0.022979736328125,
-0.031646728515625,
0.019866943359375,
0.09417724609375,
-0.0435791015625,
0.004634857177734375,
-0.0026454925537109375,
-0.004451751708984375,
0.0000095367431640625,
-0.001583099365234375,
-0.06744384765625,
-0.0109100341796875,
-0.03643798828125,
-0.01336669921875,
-0.020660400390625,
-0.027618408203125,
0.0242156982421875,
-0.0860595703125,
0.0010623931884765625,
-0.046478271484375,
0.0152587890625,
0.04644775390625,
0.0280303955078125,
-0.0204925537109375,
0.005153656005859375,
-0.00634002685546875,
0.005931854248046875,
0.0025882720947265625,
-0.0733642578125,
-0.0035114288330078125,
-0.0289306640625,
0.036834716796875,
-0.00604248046875,
0.0153045654296875,
-0.0219573974609375,
0.026031494140625,
-0.0516357421875,
0.03973388671875,
-0.041473388671875,
0.0241241455078125,
-0.016693115234375,
0.0213470458984375,
-0.01357269287109375,
-0.01279449462890625,
-0.0426025390625,
-0.059600830078125,
-0.01425933837890625,
-0.0288238525390625,
-0.00893402099609375,
0.004749298095703125,
-0.002716064453125,
0.0172271728515625,
-0.031585693359375,
-0.0011396408081054688,
-0.002857208251953125,
0.019073486328125,
-0.01119232177734375,
-0.01451873779296875,
-0.00823974609375,
-0.03814697265625,
0.0310821533203125,
0.01384735107421875,
-0.0227203369140625,
0.0069122314453125,
0.054718017578125,
0.01117706298828125,
-0.01311492919921875,
-0.06134033203125,
-0.0206451416015625,
0.01462554931640625,
0.0196685791015625,
0.047088623046875,
0.039520263671875,
0.0195465087890625,
-0.0106964111328125,
0.00228118896484375,
-0.00156402587890625,
-0.0307769775390625,
0.01123046875,
-0.0024852752685546875,
-0.0086517333984375,
0.00754547119140625,
0.0086212158203125,
0.045074462890625,
0.0408935546875,
0.009674072265625,
-0.04119873046875,
-0.005916595458984375,
0.040924072265625,
0.01116943359375,
-0.0218658447265625,
-0.032958984375,
-0.007366180419921875,
0.010040283203125,
-0.008514404296875,
-0.005634307861328125,
-0.015899658203125,
0.00945281982421875,
-0.031341552734375,
-0.006595611572265625,
-0.0007562637329101562,
0.050628662109375,
0.049560546875,
0.01580810546875,
0.02252197265625,
0.0693359375,
-0.018524169921875,
-0.0212554931640625,
-0.00472259521484375,
0.0005064010620117188,
0.017913818359375,
-0.037322998046875,
-0.0178375244140625,
0.00409698486328125,
0.044464111328125,
-0.01548004150390625,
-0.0400390625,
0.03228759765625,
0.038055419921875,
-0.0187530517578125,
-0.003635406494140625,
-0.049896240234375,
-0.0159149169921875,
-0.0548095703125,
-0.038116455078125,
-0.0306243896484375,
-0.0001933574676513672,
0.027496337890625,
0.0188140869140625,
-0.08404541015625,
0.05377197265625,
0.005695343017578125,
0.0213165283203125,
0.005474090576171875,
0.0472412109375,
0.018951416015625,
-0.04205322265625,
0.019927978515625,
0.0106964111328125,
-0.00124359130859375,
-0.0229339599609375,
0.0316162109375,
0.007587432861328125,
0.047637939453125,
0.0157623291015625,
-0.03448486328125,
0.0151824951171875,
-0.050384521484375,
-0.0043182373046875,
0.057830810546875,
0.00557708740234375,
-0.06353759765625,
-0.02203369140625,
-0.007587432861328125,
0.024200439453125,
-0.035980224609375,
0.0090484619140625,
0.004802703857421875,
-0.0295257568359375,
-0.016357421875,
0.0078887939453125,
-0.016998291015625,
-0.043548583984375,
-0.0286712646484375,
-0.02044677734375,
-0.0280914306640625,
-0.012542724609375,
0.041412353515625,
0.0159454345703125,
-0.0211029052734375,
-0.0384521484375,
0.050262451171875,
0.0114593505859375,
-0.026519775390625,
-0.014404296875,
0.0018682479858398438,
0.0010957717895507812,
-0.01461029052734375,
0.072998046875,
-0.00844573974609375,
-0.0151519775390625,
-0.006256103515625,
-0.032958984375,
-0.0294952392578125,
0.04412841796875,
-0.01155853271484375,
-0.060455322265625,
-0.02587890625,
-0.00032210350036621094,
0.005115509033203125,
-0.0039825439453125,
-0.003383636474609375,
0.026458740234375,
0.017364501953125,
-0.0167694091796875,
-0.0146331787109375,
-0.0093231201171875,
0.05419921875,
-0.0052337646484375,
0.0299072265625,
-0.004436492919921875,
0.038299560546875,
0.001007080078125,
-0.0077362060546875,
-0.0014209747314453125,
0.01043701171875,
-0.0020999908447265625,
-0.0162353515625,
0.039306640625,
0.0056610107421875,
0.04388427734375,
-0.00437164306640625,
-0.00724029541015625,
-0.03594970703125,
0.00677490234375,
-0.015716552734375,
0.0224609375,
-0.0250701904296875,
-0.0220489501953125,
0.0242462158203125,
-0.01503753662109375,
0.0017938613891601562,
0.004756927490234375,
0.00858306884765625,
-0.006137847900390625,
0.006702423095703125,
-0.0218048095703125,
-0.00786590576171875,
-0.015045166015625,
0.01061248779296875,
0.0164794921875,
-0.021453857421875,
0.00563812255859375,
0.0032787322998046875,
0.002902984619140625,
0.015289306640625,
0.0012674331665039062,
-0.01157379150390625,
0.0152435302734375,
0.003173828125,
-0.0197296142578125,
-0.033538818359375,
-0.03277587890625,
-0.036041259765625,
0.02484130859375,
0.023162841796875,
0.041351318359375,
-0.03533935546875,
0.01200103759765625,
0.024810791015625,
-0.03546142578125,
0.0035991668701171875,
0.01071929931640625,
-0.02899169921875,
-0.08709716796875,
0.017669677734375,
0.00902557373046875,
-0.0032711029052734375,
-0.0126800537109375,
0.002925872802734375,
-0.0182952880859375,
-0.02984619140625,
0.0158233642578125,
0.0249176025390625,
-0.043243408203125,
0.049713134765625,
0.035797119140625,
0.0127410888671875,
-0.0180511474609375,
0.0166778564453125,
0.006134033203125,
0.01114654541015625,
-0.040252685546875,
0.03546142578125,
-0.033294677734375,
0.00743865966796875,
-0.038482666015625,
0.004528045654296875,
0.06072998046875,
0.03271484375,
0.004817962646484375,
-0.0190277099609375,
0.012603759765625,
0.0229949951171875,
-0.032379150390625,
0.0000034570693969726562,
0.0216827392578125,
0.043121337890625,
0.009765625,
0.0218353271484375,
0.002166748046875,
-0.03240966796875,
-0.0217437744140625,
-0.01007080078125,
0.078369140625,
-0.01922607421875,
-0.0243682861328125,
0.032073974609375,
0.0009641647338867188,
-0.0260162353515625,
-0.0078125,
0.07135009765625,
-0.0406494140625,
-0.0260162353515625,
0.01275634765625,
-0.0292205810546875,
-0.07861328125,
-0.024444580078125,
-0.08428955078125,
0.12548828125,
0.00079345703125,
0.036468505859375,
-0.004764556884765625,
0.04736328125,
-0.0294342041015625,
0.0251007080078125,
-0.018524169921875,
0.0457763671875,
0.03192138671875,
-0.012420654296875,
-0.050384521484375,
-0.0116729736328125,
-0.02783203125,
0.0482177734375,
-0.0017004013061523438,
-0.004566192626953125,
-0.040191650390625,
-0.008209228515625,
0.03656005859375,
0.0299835205078125,
0.032012939453125,
0.047515869140625,
-0.021942138671875,
0.04656982421875,
0.0338134765625,
-0.0867919921875,
0.0184783935546875,
-0.014251708984375,
-0.005924224853515625,
-0.0057830810546875,
-0.001369476318359375,
0.0050811767578125,
-0.00620269775390625,
-0.0250701904296875,
0.031005859375,
-0.008544921875,
-0.0289459228515625,
-0.029388427734375,
0.054473876953125,
-0.055816650390625,
-0.0124359130859375,
-0.0706787109375,
0.04156494140625,
-0.01416015625,
0.0245513916015625,
-0.025665283203125,
0.059783935546875,
0.037994384765625,
0.027313232421875,
0.0968017578125,
-0.043426513671875,
0.0345458984375,
-0.0225982666015625,
-0.0220794677734375,
0.03582763671875,
0.05706787109375,
0.04351806640625,
0.0181732177734375,
0.0026569366455078125,
0.010223388671875,
0.0308837890625,
-0.035003662109375,
-0.018280029296875,
0.0133514404296875,
0.0291900634765625,
-0.0036449432373046875,
-0.00737762451171875,
0.0179443359375,
-0.015838623046875,
0.018402099609375,
-0.0161285400390625,
-0.0025119781494140625,
0.016082763671875,
-0.0184783935546875,
0.00827789306640625,
0.07073974609375,
0.00008881092071533203,
0.01078033447265625,
0.0058135986328125,
-0.004505157470703125,
0.0211944580078125,
0.01049041748046875,
-0.03363037109375,
0.02679443359375,
-0.031707763671875,
0.01947021484375,
-0.006809234619140625,
0.033477783203125,
0.0160064697265625,
0.00615692138671875,
-0.01488494873046875,
-0.04742431640625,
0.0165863037109375,
0.04071044921875,
-0.021087646484375,
0.006450653076171875,
0.051544189453125,
0.04559326171875,
-0.07696533203125,
-0.0294036865234375,
0.039459228515625,
-0.030059814453125,
-0.0079498291015625,
-0.036468505859375,
0.01514434814453125,
0.00891876220703125,
0.00501251220703125,
0.0012445449829101562,
0.038665771484375,
0.0256500244140625,
-0.0159454345703125,
0.05780029296875,
-0.0050811767578125,
0.0013761520385742188,
0.043243408203125,
0.0017881393432617188,
0.05499267578125,
0.01348876953125,
-0.049041748046875,
-0.0262603759765625,
-0.0192718505859375,
0.0292510986328125,
-0.0046844482421875,
0.0162506103515625,
0.01502227783203125,
0.016510009765625,
0.042266845703125,
-0.018218994140625,
-0.004459381103515625,
0.03216552734375,
0.0062103271484375,
0.037933349609375,
0.0362548828125,
0.024169921875,
-0.050262451171875,
-0.043792724609375,
-0.049072265625,
0.07183837890625,
0.038421630859375,
0.055023193359375,
-0.00624847412109375,
0.041259765625,
-0.006549835205078125,
0.00457000732421875,
-0.0162506103515625,
-0.0163726806640625,
-0.0128326416015625,
-0.0262298583984375,
0.0186920166015625,
0.004993438720703125,
-0.036773681640625,
-0.01355743408203125,
0.023895263671875,
-0.03485107421875,
-0.00856781005859375,
-0.038360595703125,
0.022369384765625,
0.00537872314453125,
-0.005702972412109375,
-0.035369873046875,
-0.031982421875,
-0.0283660888671875,
0.0008630752563476562,
-0.0018672943115234375,
-0.0226898193359375,
-0.01409912109375,
0.00823974609375,
0.0635986328125,
-0.02545166015625,
0.022735595703125,
-0.002933502197265625,
0.046661376953125,
0.03717041015625,
0.03790283203125,
-0.056427001953125,
0.048675537109375,
-0.0079345703125,
-0.023406982421875,
0.029266357421875,
0.0732421875,
0.021484375,
-0.09130859375,
-0.0012969970703125,
0.02593994140625,
0.04730224609375,
-0.004878997802734375,
0.023101806640625,
0.01003265380859375,
-0.010040283203125,
-0.002323150634765625,
0.00591278076171875,
-0.028533935546875,
-0.0079345703125,
-0.00899505615234375,
0.0016651153564453125,
-0.0180511474609375,
-0.054779052734375,
-0.05072021484375,
-0.0321044921875,
0.0179443359375,
0.0005478858947753906,
-0.005046844482421875,
0.004108428955078125,
-0.0193328857421875,
-0.0157928466796875,
-0.0128021240234375,
-0.01128387451171875,
-0.01454925537109375,
0.0255279541015625,
-0.0024967193603515625,
-0.08148193359375,
-0.0298919677734375,
0.07403564453125,
-0.043853759765625,
0.0248870849609375,
0.04644775390625,
-0.0211181640625,
0.007289886474609375,
-0.0016422271728515625,
0.00897216796875,
0.0293121337890625,
-0.0163116455078125,
-0.0252838134765625,
-0.003978729248046875,
-0.004703521728515625,
-0.01424407958984375,
-0.054473876953125,
0.0094451904296875,
-0.06829833984375,
-0.009246826171875,
-0.0195770263671875,
-0.0019741058349609375,
-0.002716064453125,
-0.035186767578125,
-0.078369140625,
0.0289154052734375,
-0.01384735107421875,
-0.029510498046875,
-0.052520751953125,
-0.01439666748046875,
-0.002048492431640625,
0.00958251953125,
-0.0272369384765625,
0.012542724609375,
-0.03375244140625,
0.047332763671875,
-0.027984619140625,
0.040985107421875,
-0.0300750732421875,
-0.02923583984375,
-0.0099639892578125,
0.007068634033203125,
0.0140533447265625,
-0.0205535888671875,
0.00028967857360839844,
-0.00928497314453125,
0.04803466796875,
0.077880859375,
0.006214141845703125,
0.0019121170043945312,
0.00775909423828125,
-0.0684814453125,
-0.018585205078125,
0.0246734619140625,
-0.0496826171875,
0.0117340087890625,
0.10040283203125,
0.08599853515625,
0.033203125,
-0.045562744140625,
-0.005496978759765625,
0.007843017578125,
0.00872802734375,
-0.0162811279296875,
-0.0100555419921875,
-0.039306640625,
-0.0245819091796875,
-0.01508331298828125,
-0.010833740234375,
0.052215576171875,
-0.061065673828125,
-0.015960693359375,
0.004222869873046875,
-0.03875732421875,
-0.00457763671875,
-0.045440673828125,
0.0268402099609375,
0.05889892578125,
-0.02978515625,
0.004924774169921875,
0.0187225341796875,
-0.026611328125,
0.0275726318359375,
0.0196533203125,
-0.049407958984375,
0.00916290283203125,
-0.01140594482421875,
0.0148773193359375,
-0.016937255859375,
0.0253753662109375,
-0.016754150390625,
0.0306854248046875,
0.01317596435546875,
-0.0002865791320800781,
-0.0140838623046875,
-0.0211029052734375,
0.00809478759765625,
0.0044403076171875,
-0.0452880859375,
0.10076904296875,
-0.01444244384765625,
0.0094451904296875,
-0.04107666015625,
0.058197021484375,
-0.03167724609375,
-0.005229949951171875,
-0.0014200210571289062,
-0.01177978515625,
-0.0035190582275390625,
0.0007123947143554688,
0.0129852294921875,
-0.0284881591796875,
0.0027313232421875,
-0.01383209228515625,
0.00634002685546875,
0.00913238525390625
] |
1070c4252ea0f3c8376fc4691a1130317287ceb5
|
Wordpress Stackexchange
Q: How to display date such "x ago" I want display date based on how much time has passed since, i. e. Posted 12 minutes ago
A: This is quite simple: just replace the get_the_date() or the_date() with
echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago';
|
Q: How to display date such "x ago" I want display date based on how much time has passed since, i. e. Posted 12 minutes ago
A: This is quite simple: just replace the get_the_date() or the_date() with
echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago';
|
wordpress
|
{
"language": "en",
"length": 44,
"provenance": "stackexchange_00019.jsonl.gz:421061",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56006"
}
|
[
0.07366943359375,
0.00444793701171875,
-0.02239990234375,
-0.018768310546875,
0.03997802734375,
-0.0557861328125,
0.052337646484375,
-0.01442718505859375,
0.05230712890625,
-0.007411956787109375,
-0.07171630859375,
-0.0257568359375,
0.003124237060546875,
-0.0135345458984375,
-0.01322174072265625,
-0.03570556640625,
0.06549072265625,
-0.0360107421875,
0.03515625,
0.00836944580078125,
-0.00827789306640625,
0.044158935546875,
0.058258056640625,
0.046844482421875,
0.04425048828125,
0.032440185546875,
0.0977783203125,
-0.033660888671875,
0.061676025390625,
-0.0008473396301269531,
0.040985107421875,
-0.09039306640625,
0.0190277099609375,
0.02294921875,
-0.019561767578125,
0.07061767578125,
0.0008077621459960938,
0.01483917236328125,
0.0142974853515625,
0.004974365234375,
0.037841796875,
-0.017181396484375,
-0.016357421875,
-0.00695037841796875,
-0.01535797119140625,
-0.0272064208984375,
0.03533935546875,
-0.01580810546875,
0.016326904296875,
0.02142333984375,
0.0090179443359375,
-0.01308441162109375,
0.0005183219909667969,
0.0285491943359375,
-0.01446533203125,
-0.0085906982421875,
0.01023101806640625,
0.004444122314453125,
0.03338623046875,
-0.06231689453125,
-0.0443115234375,
0.004558563232421875,
0.04339599609375,
0.0303955078125,
-0.009124755859375,
0.01812744140625,
0.035186767578125,
-0.00881195068359375,
-0.0701904296875,
-0.00824737548828125,
0.0548095703125,
-0.0372314453125,
-0.00736236572265625,
-0.0011606216430664062,
-0.0113983154296875,
-0.01554107666015625,
0.001312255859375,
-0.00013637542724609375,
0.00977325439453125,
0.0134429931640625,
0.01026153564453125,
0.01004791259765625,
-0.03582763671875,
-0.01392364501953125,
-0.005523681640625,
-0.005702972412109375,
-0.015777587890625,
-0.0107574462890625,
-0.0660400390625,
-0.02581787109375,
-0.041778564453125,
-0.010162353515625,
-0.0657958984375,
-0.0036602020263671875,
0.0034637451171875,
0.004222869873046875,
0.01473236083984375,
0.061859130859375,
-0.045989990234375,
-0.06512451171875,
-0.01947021484375,
0.02734375,
-0.1065673828125,
0.008453369140625,
0.0073089599609375,
0.030853271484375,
0.0153656005859375,
0.039947509765625,
0.048919677734375,
0.0223388671875,
0.0006670951843261719,
0.041168212890625,
-0.0141448974609375,
-0.04925537109375,
-0.011810302734375,
0.039520263671875,
0.00202178955078125,
-0.00939178466796875,
0.0170440673828125,
-0.01373291015625,
0.013580322265625,
0.0240325927734375,
0.0101318359375,
0.0038242340087890625,
0.0111541748046875,
0.012908935546875,
-0.020233154296875,
-0.03717041015625,
0.07977294921875,
0.0078125,
-0.01407623291015625,
0.003948211669921875,
-0.0288543701171875,
-0.0303802490234375,
-0.016815185546875,
-0.004604339599609375,
0.050811767578125,
-0.052581787109375,
-0.0176239013671875,
0.043121337890625,
-0.0389404296875,
-0.044189453125,
-0.00901031494140625,
-0.029510498046875,
-0.045135498046875,
0.0025196075439453125,
0.00705718994140625,
0.01194000244140625,
0.0015611648559570312,
-0.0804443359375,
0.03448486328125,
-0.041107177734375,
-0.005939483642578125,
0.000782012939453125,
0.022705078125,
0.005008697509765625,
-0.00891876220703125,
0.0006527900695800781,
0.0037822723388671875,
0.017425537109375,
0.038787841796875,
-0.0092926025390625,
-0.00926971435546875,
-0.0022525787353515625,
-0.033538818359375,
-0.006099700927734375,
-0.017486572265625,
0.0028514862060546875,
0.0185546875,
-0.02923583984375,
0.0077667236328125,
-0.045166015625,
0.07379150390625,
0.0232696533203125,
-0.00485992431640625,
0.060791015625,
-0.0206298828125,
-0.0343017578125,
0.0158233642578125,
0.03448486328125,
-0.0016298294067382812,
-0.025115966796875,
-0.001708984375,
0.01369476318359375,
-0.0245361328125,
0.00933074951171875,
-0.0018072128295898438,
0.0221710205078125,
0.0201416015625,
0.0178680419921875,
-0.0166168212890625,
0.0281219482421875,
-0.04736328125,
0.044189453125,
-0.00018167495727539062,
-0.04644775390625,
0.0033206939697265625,
-0.024505615234375,
-0.0159454345703125,
0.0033130645751953125,
0.00482177734375,
0.0284423828125,
-0.04608154296875,
-0.00783538818359375,
-0.098876953125,
-0.0057525634765625,
-0.0467529296875,
0.03033447265625,
0.0024700164794921875,
0.0311737060546875,
0.003414154052734375,
0.0224151611328125,
-0.0225067138671875,
-0.04193115234375,
-0.0253448486328125,
0.0037689208984375,
-0.0328369140625,
0.006740570068359375,
-0.0164337158203125,
0.03143310546875,
-0.04638671875,
0.0012369155883789062,
-0.042572021484375,
-0.004444122314453125,
0.01450347900390625,
-0.0323486328125,
-0.00494384765625,
-0.022369384765625,
-0.01482391357421875,
-0.009124755859375,
-0.03399658203125,
0.028350830078125,
0.0032138824462890625,
-0.01100921630859375,
-0.0440673828125,
-0.0267791748046875,
-0.0182342529296875,
-0.06378173828125,
0.0189056396484375,
0.07183837890625,
0.039215087890625,
0.017547607421875,
0.019805908203125,
0.03802490234375,
0.07708740234375,
-0.0308380126953125,
0.0128936767578125,
0.0175933837890625,
-0.0177764892578125,
0.03509521484375,
-0.01153564453125,
0.01519012451171875,
0.013427734375,
-0.01119232177734375,
-0.025726318359375,
0.04766845703125,
-0.019561767578125,
0.0322265625,
-0.064453125,
0.0208587646484375,
0.004547119140625,
-0.0263671875,
0.01470184326171875,
-0.0262908935546875,
0.005519866943359375,
-0.0154876708984375,
0.013275146484375,
0.00307464599609375,
-0.0044097900390625,
-0.007598876953125,
0.019500732421875,
-0.0122222900390625,
0.01502227783203125,
-0.028656005859375,
-0.047149658203125,
-0.01837158203125,
-0.018096923828125,
0.024993896484375,
0.0007123947143554688,
-0.041290283203125,
-0.0296478271484375,
-0.004486083984375,
-0.00029087066650390625,
-0.007381439208984375,
-0.003925323486328125,
-0.052978515625,
0.031494140625,
0.0167999267578125,
0.0158233642578125,
-0.0107269287109375,
0.0460205078125,
-0.0196075439453125,
-0.044219970703125,
0.04058837890625,
0.0108489990234375,
-0.057525634765625,
-0.050628662109375,
-0.0211944580078125,
0.032318115234375,
-0.040771484375,
-0.037567138671875,
0.047943115234375,
0.01751708984375,
0.00977325439453125,
0.0253143310546875,
-0.060150146484375,
0.035797119140625,
0.01141357421875,
0.0003256797790527344,
0.0249176025390625,
-0.08612060546875,
0.02178955078125,
0.00653839111328125,
0.0262451171875,
-0.04205322265625,
-0.059814453125,
-0.03900146484375,
-0.006885528564453125,
-0.1251220703125,
-0.067138671875,
-0.04351806640625,
-0.132080078125,
-0.0249481201171875,
-0.00157928466796875,
-0.061920166015625,
0.05096435546875,
0.03363037109375,
0.012969970703125,
0.015411376953125,
0.0178985595703125,
-0.01136016845703125,
0.00617218017578125,
-0.041015625,
-0.00263214111328125,
-0.004283905029296875,
0.02166748046875,
-0.00907135009765625,
0.08563232421875,
0.00677490234375,
-0.07269287109375,
-0.048614501953125,
-0.035308837890625,
-0.0216827392578125,
0.0233001708984375,
-0.019317626953125,
0.01039886474609375,
0.00864410400390625,
0.01953125,
-0.008392333984375,
0.0154571533203125,
-0.0163116455078125,
-0.0181884765625,
0.0015497207641601562,
0.0019550323486328125,
0.0203094482421875,
0.0003337860107421875,
-0.0011205673217773438,
0.038543701171875,
0.0308837890625,
-0.00678253173828125,
-0.01531219482421875,
0.01181793212890625,
-0.028717041015625,
0.00036334991455078125,
0.0020542144775390625,
-0.0222015380859375,
0.00665283203125,
0.0101318359375,
-0.05078125,
-0.0250396728515625,
0.002574920654296875,
-0.033203125,
-0.0008187294006347656,
-0.00820159912109375,
-0.032928466796875,
0.05047607421875,
-0.0261077880859375,
-0.006351470947265625,
0.05401611328125,
0.0067901611328125,
0.04180908203125,
0.008209228515625,
0.0865478515625,
-0.0038242340087890625,
-0.015655517578125,
0.04058837890625,
-0.0162811279296875,
0.006061553955078125,
-0.040618896484375,
-0.02685546875,
-0.0284576416015625,
0.0537109375,
-0.06988525390625,
-0.01345062255859375,
0.01232147216796875,
0.0010328292846679688,
-0.040802001953125,
0.0093231201171875,
-0.07977294921875,
0.0032215118408203125,
-0.0911865234375,
0.037353515625,
-0.007244110107421875,
-0.002872467041015625,
-0.042755126953125,
0.0284271240234375,
-0.0687255859375,
-0.04217529296875,
0.028350830078125,
0.021942138671875,
-0.03167724609375,
0.0073089599609375,
-0.0263519287109375,
-0.01332855224609375,
-0.026885986328125,
0.0230865478515625,
-0.03643798828125,
-0.0259857177734375,
0.01540374755859375,
0.04559326171875,
0.01552581787109375,
-0.04071044921875,
-0.00424957275390625,
0.040283203125,
0.06207275390625,
0.0013866424560546875,
0.0018901824951171875,
-0.07391357421875,
0.050933837890625,
0.046661376953125,
0.0203704833984375,
0.0189208984375,
-0.02740478515625,
-0.0633544921875,
0.00724029541015625,
0.0023288726806640625,
-0.044219970703125,
0.041748046875,
-0.0750732421875,
0.031097412109375,
0.0030345916748046875,
-0.009429931640625,
-0.03155517578125,
0.046600341796875,
-0.037628173828125,
0.0189208984375,
-0.04071044921875,
-0.037200927734375,
0.047943115234375,
0.033538818359375,
-0.003551483154296875,
-0.0028362274169921875,
0.04608154296875,
0.00954437255859375,
-0.044525146484375,
-0.055908203125,
0.0185699462890625,
0.029815673828125,
0.029327392578125,
0.007183074951171875,
-0.01971435546875,
-0.037841796875,
0.056304931640625,
0.003780364990234375,
0.0005049705505371094,
-0.011138916015625,
0.04193115234375,
-0.000598907470703125,
-0.025299072265625,
0.01137542724609375,
-0.032196044921875,
0.009613037109375,
0.0570068359375,
0.02276611328125,
-0.0355224609375,
-0.0130462646484375,
0.038970947265625,
-0.007232666015625,
0.0160369873046875,
-0.03289794921875,
-0.04888916015625,
0.0269927978515625,
-0.061859130859375,
-0.0296783447265625,
0.00965118408203125,
-0.00418853759765625,
-0.0187835693359375,
-0.011138916015625,
0.0008640289306640625,
-0.04119873046875,
-0.03955078125,
-0.041290283203125,
0.016021728515625,
-0.037384033203125,
-0.04132080078125,
0.01378631591796875,
-0.0102081298828125,
0.0374755859375,
0.037353515625,
-0.0135345458984375,
0.0310516357421875,
-0.0159912109375,
0.0021381378173828125,
-0.0256500244140625,
-0.034393310546875,
0.00933837890625,
0.039886474609375,
-0.01525115966796875,
0.0225372314453125,
0.0010280609130859375,
0.0276641845703125,
-0.02154541015625,
0.00513458251953125,
0.0028438568115234375,
-0.01329803466796875,
0.043182373046875,
0.0283050537109375,
0.0258941650390625,
0.01873779296875,
-0.0570068359375,
0.02545166015625,
0.029876708984375,
0.042938232421875,
0.0261077880859375,
-0.0638427734375,
0.007610321044921875,
0.019622802734375,
-0.005374908447265625,
0.015838623046875,
-0.041412353515625,
-0.0039520263671875,
0.001537322998046875,
-0.02593994140625,
0.038787841796875,
-0.00290679931640625,
0.00626373291015625,
-0.0260467529296875,
0.03167724609375,
0.056732177734375,
-0.00252532958984375,
-0.002758026123046875,
0.024871826171875,
-0.00726318359375,
0.007587432861328125,
-0.0201263427734375,
0.0447998046875,
-0.0252838134765625,
0.08074951171875,
-0.046783447265625,
0.0684814453125,
-0.03680419921875,
-0.049285888671875,
-0.037445068359375,
-0.040802001953125,
-0.040252685546875,
0.0210113525390625,
0.00272369384765625,
0.0122222900390625,
-0.0120086669921875,
0.0030059814453125,
0.00824737548828125,
0.0214080810546875,
-0.035736083984375,
0.00321197509765625,
-0.03192138671875,
-0.00669097900390625,
0.03436279296875,
0.0193023681640625,
-0.07061767578125,
-0.01308441162109375,
-0.052978515625,
-0.0217437744140625,
-0.0509033203125,
-0.025390625,
-0.04266357421875,
0.01309967041015625,
0.0025196075439453125,
0.0275115966796875,
-0.000762939453125,
-0.0021800994873046875,
-0.01183319091796875,
-0.00611114501953125,
0.002986907958984375,
0.07098388671875,
0.0261688232421875,
0.069580078125,
0.0009717941284179688,
0.060455322265625,
0.04302978515625,
0.037506103515625,
-0.048797607421875,
-0.037750244140625,
0.0252532958984375,
0.0258331298828125,
-0.0418701171875,
-0.01442718505859375,
-0.00373077392578125,
-0.059478759765625,
-0.0083465576171875,
-0.0168914794921875,
-0.012939453125,
-0.01059722900390625,
0.0120697021484375,
-0.02618408203125,
0.0266265869140625,
-0.0268402099609375,
-0.0190582275390625,
0.0028209686279296875,
-0.01465606689453125,
-0.0005283355712890625,
-0.01715087890625,
0.006809234619140625,
0.002811431884765625,
-0.01085662841796875,
-0.00916290283203125,
0.005016326904296875,
-0.001102447509765625,
0.0181427001953125,
0.046142578125,
-0.01490020751953125,
0.0214691162109375,
0.0185546875,
0.00478363037109375,
0.036590576171875,
0.0148162841796875,
-0.029266357421875,
-0.0177459716796875,
0.03466796875,
0.0095062255859375,
-0.0300750732421875,
0.016998291015625,
-0.00522613525390625,
0.02459716796875,
0.02813720703125,
0.04974365234375,
-0.058319091796875,
0.0280303955078125,
0.009429931640625,
0.00873565673828125,
0.0318603515625,
-0.0008001327514648438,
-0.005596160888671875,
-0.0030384063720703125,
0.0179290771484375,
0.01727294921875,
-0.017608642578125,
0.007564544677734375,
0.03582763671875,
-0.006542205810546875,
-0.051971435546875,
0.002605438232421875,
0.0130157470703125,
-0.039337158203125,
0.0345458984375,
0.040313720703125,
0.0035495758056640625,
-0.06134033203125,
-0.009368896484375,
-0.010650634765625,
-0.00011819601058959961,
-0.0426025390625,
0.039398193359375,
-0.0208892822265625,
0.058837890625,
0.014923095703125,
0.0020732879638671875,
0.02374267578125,
0.0255584716796875,
-0.00681304931640625,
-0.0091094970703125,
-0.00020813941955566406,
-0.0189208984375,
0.006435394287109375,
-0.034027099609375,
-0.020721435546875,
0.04498291015625,
-0.00806427001953125,
0.02728271484375,
0.0237579345703125,
-0.041259765625,
-0.00844573974609375,
0.02685546875,
0.046905517578125,
-0.0220947265625,
-0.033599853515625,
0.01849365234375,
0.058074951171875,
-0.00994110107421875,
-0.016571044921875,
-0.032379150390625,
-0.0162506103515625,
0.052276611328125,
-0.033050537109375,
0.01461029052734375,
0.0293121337890625,
-0.00246429443359375,
-0.0298614501953125,
0.042510986328125,
-0.0097503662109375,
-0.0016422271728515625,
-0.0018663406372070312,
0.0145721435546875,
0.0045928955078125,
-0.0009603500366210938,
-0.01812744140625,
0.07244873046875,
-0.0214385986328125,
0.049163818359375,
-0.07232666015625,
-0.0006389617919921875,
0.01898193359375,
0.032501220703125,
0.003536224365234375,
0.00775909423828125,
-0.0023021697998046875,
0.00690460205078125,
0.0179901123046875,
0.023406982421875,
-0.002002716064453125,
0.01342010498046875,
-0.0170440673828125,
0.01322174072265625,
0.00925445556640625,
-0.022216796875,
0.0245361328125,
-0.036651611328125,
-0.01349639892578125,
0.01556396484375,
-0.0035037994384765625,
-0.0032825469970703125,
-0.0161285400390625,
0.01123809814453125,
-0.0160675048828125,
-0.013946533203125,
0.00617218017578125,
-0.01502227783203125,
0.006191253662109375,
0.045684814453125,
0.04718017578125,
-0.05853271484375,
-0.07025146484375,
-0.0204620361328125,
0.03692626953125,
-0.01177215576171875,
0.01461029052734375,
0.035858154296875,
0.00824737548828125,
-0.01248931884765625,
0.02008056640625,
-0.00341033935546875,
0.03057861328125,
-0.015838623046875,
0.05194091796875,
0.048675537109375,
0.0271759033203125,
-0.0328369140625,
-0.05572509765625,
0.05010986328125,
0.0687255859375,
-0.01474761962890625,
0.02056884765625,
0.01129150390625,
0.00600433349609375,
-0.0092010498046875,
-0.049957275390625,
0.0035858154296875,
-0.01250457763671875,
-0.0379638671875,
-0.002285003662109375,
-0.0252838134765625,
0.027069091796875,
0.0084991455078125,
0.019317626953125,
0.0207061767578125,
-0.01678466796875,
-0.022186279296875,
-0.0401611328125,
-0.005352020263671875,
0.041778564453125,
0.0391845703125,
0.0260772705078125,
0.007717132568359375,
0.0234222412109375,
-0.0186614990234375,
0.017333984375,
-0.00963592529296875,
0.021759033203125,
-0.0394287109375,
0.0309906005859375,
0.0240020751953125,
-0.028778076171875,
-0.0135650634765625,
0.01049041748046875,
0.00229644775390625,
0.046417236328125,
0.01000213623046875,
-0.0736083984375,
-0.006378173828125,
-0.010223388671875,
-0.062225341796875,
0.000042319297790527344,
0.00878143310546875,
0.0028171539306640625,
0.0186309814453125,
-0.01285552978515625,
-0.023223876953125,
0.018035888671875,
0.051116943359375,
-0.0274658203125,
0.052734375,
-0.009429931640625,
0.0115203857421875,
0.0269317626953125,
-0.00914764404296875,
0.0002351999282836914,
-0.0282745361328125,
0.021148681640625,
0.004917144775390625,
-0.035552978515625,
-0.0218505859375,
0.0386962890625,
0.0280609130859375,
-0.0202789306640625,
0.033966064453125,
-0.0207672119140625,
0.0027790069580078125,
0.0244293212890625,
-0.022003173828125,
-0.0059051513671875,
0.047393798828125,
0.03460693359375,
-0.01039886474609375,
-0.03985595703125,
-0.008758544921875,
-0.0294189453125,
0.0240936279296875,
0.036865234375,
-0.033843994140625,
0.0333251953125,
0.06414794921875,
-0.02178955078125,
-0.01020050048828125,
-0.018218994140625,
-0.03131103515625,
0.06268310546875,
-0.00157928466796875,
-0.0229644775390625,
-0.0190887451171875,
0.01136016845703125,
0.03564453125,
0.019012451171875,
-0.018829345703125,
0.0225372314453125,
-0.002758026123046875,
0.009674072265625,
-0.01312255859375,
-0.00884246826171875,
-0.01398468017578125,
0.019287109375,
0.0775146484375,
0.022247314453125,
-0.004444122314453125,
-0.025970458984375,
-0.0023517608642578125,
0.01462554931640625,
0.04547119140625,
-0.033416748046875,
0.00103759765625,
0.004913330078125,
0.0255889892578125,
0.044403076171875,
0.00832366943359375,
0.050079345703125,
-0.026397705078125,
-0.0214385986328125,
0.028900146484375,
0.0031585693359375,
-0.0296173095703125,
0.002712249755859375,
0.020050048828125,
0.01641845703125,
-0.0223388671875,
0.006473541259765625,
-0.045684814453125,
-0.018218994140625,
0.0009298324584960938,
0.0017948150634765625,
-0.0164947509765625,
-0.0330810546875,
-0.02349853515625,
-0.049407958984375,
0.0182037353515625,
0.0419921875,
-0.01035308837890625,
0.0068359375,
-0.0509033203125,
-0.003108978271484375,
-0.003589630126953125,
-0.00502777099609375,
-0.0104522705078125,
0.007633209228515625,
-0.01332855224609375,
0.0019741058349609375,
-0.00989532470703125,
-0.04180908203125,
0.0028858184814453125,
0.03631591796875,
-0.01418304443359375,
-0.048919677734375,
-0.055206298828125,
0.026397705078125,
-0.046356201171875,
-0.01959228515625,
0.01168060302734375,
-0.0030040740966796875,
-0.04254150390625,
-0.0014019012451171875,
-0.00890350341796875,
0.0538330078125,
-0.033538818359375,
-0.0014190673828125,
0.0011997222900390625,
0.01116180419921875,
-0.062286376953125,
-0.01345062255859375,
0.05767822265625,
-0.023223876953125,
-0.04974365234375,
-0.01200103759765625,
-0.0191650390625,
-0.032135009765625,
-0.0300445556640625,
-0.032196044921875,
0.0491943359375,
-0.0082244873046875,
-0.0165863037109375,
-0.0066070556640625,
0.0270538330078125,
-0.004695892333984375,
0.00469207763671875,
0.00574493408203125,
0.0014333724975585938,
0.0144500732421875,
-0.0020771026611328125,
0.0043792724609375,
0.014617919921875,
0.007129669189453125,
0.0059356689453125,
-0.061431884765625,
-0.0042266845703125,
-0.0231475830078125,
0.005153656005859375,
-0.006366729736328125,
0.0159759521484375,
0.01044464111328125,
0.0236053466796875,
-0.024200439453125,
0.0007486343383789062,
0.0087890625,
0.0195159912109375,
-0.00939178466796875,
-0.0025348663330078125,
-0.04766845703125,
-0.0023097991943359375,
0.061614990234375,
0.044677734375,
0.0211639404296875,
-0.03546142578125,
0.017364501953125,
-0.00638580322265625,
-0.034332275390625,
-0.0188446044921875,
0.0142364501953125,
-0.042144775390625,
-0.0175628662109375,
-0.01271820068359375,
-0.02349853515625,
0.036956787109375,
0.0306243896484375,
-0.01097869873046875,
0.01140594482421875,
0.04541015625,
-0.02996826171875,
-0.05023193359375,
0.029876708984375,
0.018646240234375,
-0.0276336669921875,
-0.0243377685546875,
0.00316619873046875,
-0.01338958740234375,
-0.01531219482421875,
0.01195526123046875,
0.0157318115234375,
0.0164642333984375,
0.009185791015625,
-0.031646728515625,
0.057769775390625,
-0.00789642333984375,
0.05096435546875,
-0.03057861328125,
-0.00888824462890625,
-0.0176849365234375,
0.006317138671875,
-0.0306854248046875,
0.00421142578125,
-0.0241241455078125,
-0.01727294921875,
0.033294677734375,
-0.004974365234375,
0.033905029296875,
-0.006252288818359375,
0.0231475830078125,
-0.0093994140625,
-0.005031585693359375,
0.0167388916015625,
-0.037933349609375,
0.00005143880844116211,
-0.018096923828125,
0.005847930908203125,
-0.051910400390625,
0.042633056640625,
-0.0200958251953125,
-0.006542205810546875,
0.033477783203125
] |
8334fd710680391e9dadf4aa3fc3fb63c4c4e00c
|
Wordpress Stackexchange
Q: How to modify wp_ajax function? I want to modify wp_ajax_find_posts function. It receives search string from find-posts form and delivers search results by ajax. Part of the function looks like this:
function wp_ajax_find_posts() {
global $wpdb;
check_ajax_referer( 'find-posts' );
// ........
$search .= " OR ($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%')";
$posts = $wpdb->get_results( "SELECT ID, post_title, post_status, post_date FROM $wpdb->posts WHERE post_type = '$what' AND post_status IN ('draft', 'publish') AND ($search) ORDER BY post_date_gmt DESC LIMIT 50" );
$html = //......
$x = new WP_Ajax_Response();
$x->add( array(
'what' => $what,
'data' => $html
));
$x->send();
}
add_action( 'wp_ajax_find_posts', 'wp_ajax_find_posts,1)
I want to modify the line $post to add post_author to the querry in order to limit the results within current loggin user. I would like to learn how to hook up with this wp_ajax_find_post function to let it accept my modified $post. Do I have to do remove_action and add_action to make completely rewrite of the above funtion?
A: You can jump in front of an AJAX hook by specifying a higher priority (i.e. lower number), like this:
add_action( 'wp_ajax_find_posts', 'wp_ajax_find_posts', 0 );
NB: works because 0 < 1
|
Q: How to modify wp_ajax function? I want to modify wp_ajax_find_posts function. It receives search string from find-posts form and delivers search results by ajax. Part of the function looks like this:
function wp_ajax_find_posts() {
global $wpdb;
check_ajax_referer( 'find-posts' );
// ........
$search .= " OR ($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%')";
$posts = $wpdb->get_results( "SELECT ID, post_title, post_status, post_date FROM $wpdb->posts WHERE post_type = '$what' AND post_status IN ('draft', 'publish') AND ($search) ORDER BY post_date_gmt DESC LIMIT 50" );
$html = //......
$x = new WP_Ajax_Response();
$x->add( array(
'what' => $what,
'data' => $html
));
$x->send();
}
add_action( 'wp_ajax_find_posts', 'wp_ajax_find_posts,1)
I want to modify the line $post to add post_author to the querry in order to limit the results within current loggin user. I would like to learn how to hook up with this wp_ajax_find_post function to let it accept my modified $post. Do I have to do remove_action and add_action to make completely rewrite of the above funtion?
A: You can jump in front of an AJAX hook by specifying a higher priority (i.e. lower number), like this:
add_action( 'wp_ajax_find_posts', 'wp_ajax_find_posts', 0 );
NB: works because 0 < 1
A: I've posted the code for alphabetical title/content search here: SQL query not working in alphabetical post title/content search
Now you need the author as the currently logged in user. So modify the function to include this:
//This goes at the top in the function
global $current_user;
get_currentuserinfo();
//Change the get_posts in the original code with this
$posts = get_posts(array('s' => $q, 'author' => $current_user->ID, 'posts_per_page' => 2));
Let me know if it works!
|
wordpress
|
{
"language": "en",
"length": 266,
"provenance": "stackexchange_00019.jsonl.gz:421064",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56020"
}
|
[
0.07861328125,
-0.0023517608642578125,
0.0029773712158203125,
-0.018646240234375,
0.033721923828125,
-0.03826904296875,
0.07867431640625,
-0.0302276611328125,
-0.00534820556640625,
0.041046142578125,
-0.051483154296875,
0.0302276611328125,
-0.02276611328125,
0.0118865966796875,
-0.0252227783203125,
-0.03173828125,
0.03167724609375,
-0.032806396484375,
0.0207672119140625,
-0.0311431884765625,
0.038238525390625,
-0.006557464599609375,
0.03106689453125,
0.06353759765625,
-0.0095062255859375,
0.01399993896484375,
0.093994140625,
-0.038543701171875,
0.0279388427734375,
-0.00537109375,
0.0130462646484375,
-0.044219970703125,
0.03363037109375,
0.007354736328125,
-0.037139892578125,
0.044036865234375,
0.0280303955078125,
-0.0025310516357421875,
-0.01224517822265625,
0.053497314453125,
0.0321044921875,
-0.015533447265625,
-0.029205322265625,
0.006679534912109375,
-0.0192108154296875,
-0.06298828125,
0.07733154296875,
-0.00705718994140625,
0.037078857421875,
0.006099700927734375,
-0.00873565673828125,
0.008453369140625,
-0.000522613525390625,
-0.051300048828125,
-0.0203857421875,
-0.0201568603515625,
-0.0209808349609375,
0.03533935546875,
0.042999267578125,
-0.025238037109375,
-0.046051025390625,
-0.0242919921875,
0.01552581787109375,
-0.0084075927734375,
0.0025539398193359375,
-0.00011116266250610352,
0.06646728515625,
0.01129150390625,
-0.03924560546875,
-0.0257568359375,
0.0372314453125,
0.0019989013671875,
-0.004638671875,
0.037689208984375,
0.0097808837890625,
-0.0748291015625,
0.0361328125,
-0.022430419921875,
-0.0106658935546875,
0.060791015625,
0.018829345703125,
-0.0180816650390625,
0.01383209228515625,
-0.008819580078125,
0.00011670589447021484,
-0.0185699462890625,
-0.004329681396484375,
-0.0014247894287109375,
-0.0438232421875,
-0.03802490234375,
-0.0302734375,
-0.06732177734375,
-0.060791015625,
0.01212310791015625,
0.01103973388671875,
-0.02984619140625,
0.0013399124145507812,
-0.0211944580078125,
0.00238800048828125,
0.002628326416015625,
0.0147552490234375,
-0.037078857421875,
0.00905609130859375,
-0.0160980224609375,
0.01556396484375,
0.0228424072265625,
0.000926971435546875,
0.004650115966796875,
0.038238525390625,
0.0266571044921875,
-0.00492095947265625,
0.019622802734375,
0.00341796875,
0.026824951171875,
-0.04974365234375,
-0.005794525146484375,
-0.030792236328125,
-0.005603790283203125,
-0.02783203125,
0.0016937255859375,
-0.018218994140625,
-0.00894927978515625,
-0.0019969940185546875,
-0.0115814208984375,
0.0200653076171875,
-0.003917694091796875,
-0.035491943359375,
0.021453857421875,
-0.0004658699035644531,
0.04541015625,
-0.0355224609375,
0.002651214599609375,
0.07928466796875,
0.0323486328125,
0.016143798828125,
-0.03399658203125,
-0.0030078887939453125,
0.0199737548828125,
0.0173797607421875,
-0.0068817138671875,
0.008544921875,
-0.038421630859375,
0.00423431396484375,
0.019622802734375,
0.034759521484375,
-0.0264434814453125,
0.010101318359375,
0.040924072265625,
0.0037784576416015625,
0.002910614013671875,
0.024993896484375,
0.038360595703125,
0.029693603515625,
0.0255279541015625,
0.017791748046875,
-0.0137786865234375,
0.07989501953125,
-0.04736328125,
-0.014190673828125,
-0.04718017578125,
0.021209716796875,
-0.004772186279296875,
0.01580810546875,
0.01180267333984375,
-0.03515625,
0.0172271728515625,
-0.0418701171875,
-0.00870513916015625,
0.019195556640625,
0.043731689453125,
0.01105499267578125,
-0.00908660888671875,
0.00030303001403808594,
0.0018768310546875,
-0.01398468017578125,
-0.002246856689453125,
-0.0216064453125,
0.049774169921875,
0.039520263671875,
-0.01386260986328125,
-0.0056610107421875,
-0.034088134765625,
0.1005859375,
-0.020843505859375,
-0.042816162109375,
0.06744384765625,
0.027252197265625,
0.08172607421875,
-0.034210205078125,
0.0218505859375,
0.033294677734375,
0.06695556640625,
-0.006504058837890625,
-0.0016002655029296875,
-0.027679443359375,
-0.049224853515625,
-0.0290069580078125,
-0.02880859375,
-0.037261962890625,
0.07769775390625,
0.039154052734375,
0.02667236328125,
-0.014892578125,
-0.0022258758544921875,
-0.08343505859375,
0.038177490234375,
-0.02392578125,
0.0338134765625,
-0.0113525390625,
-0.0068359375,
0.0233001708984375,
0.029998779296875,
-0.01265716552734375,
-0.08074951171875,
-0.03887939453125,
0.01241302490234375,
-0.02691650390625,
0.0303955078125,
-0.004619598388671875,
0.0252685546875,
0.004024505615234375,
-0.050537109375,
0.00403594970703125,
0.0250396728515625,
0.05322265625,
-0.01898193359375,
-0.0018205642700195312,
-0.0269012451171875,
0.025726318359375,
0.013519287109375,
-0.052001953125,
0.0196685791015625,
0.06591796875,
0.07806396484375,
-0.0176239013671875,
-0.035736083984375,
-0.00670623779296875,
-0.07330322265625,
0.0247802734375,
0.06256103515625,
0.031158447265625,
0.037872314453125,
-0.0014505386352539062,
-0.01256561279296875,
0.0325927734375,
-0.025970458984375,
0.0267486572265625,
-0.019195556640625,
0.003173828125,
0.043487548828125,
-0.0010328292846679688,
-0.0021381378173828125,
0.01641845703125,
-0.05645751953125,
0.007381439208984375,
0.043548583984375,
0.0369873046875,
0.039398193359375,
-0.0239105224609375,
0.0129852294921875,
-0.0145263671875,
-0.053924560546875,
-0.0408935546875,
-0.023101806640625,
0.0367431640625,
-0.03094482421875,
0.020355224609375,
0.013763427734375,
-0.0176544189453125,
-0.0291290283203125,
0.0211639404296875,
0.0018062591552734375,
0.00830841064453125,
0.02972412109375,
-0.058502197265625,
0.03912353515625,
-0.04010009765625,
0.016845703125,
0.009765625,
0.0157318115234375,
0.004169464111328125,
0.052764892578125,
0.01004791259765625,
-0.01385498046875,
-0.0226593017578125,
-0.0177459716796875,
0.0166168212890625,
0.007232666015625,
-0.004970550537109375,
0.026763916015625,
0.037994384765625,
0.020050048828125,
-0.00756072998046875,
0.018646240234375,
-0.01152801513671875,
0.0044708251953125,
0.0159149169921875,
-0.054290771484375,
0.039337158203125,
-0.038330078125,
0.054534912109375,
0.05499267578125,
-0.0038967132568359375,
0.01555633544921875,
0.0006880760192871094,
-0.0281829833984375,
-0.011199951171875,
0.00373077392578125,
-0.02203369140625,
-0.0033092498779296875,
-0.0615234375,
0.02642822265625,
0.044219970703125,
0.0482177734375,
0.02484130859375,
-0.0240936279296875,
0.0204010009765625,
0.042816162109375,
-0.07196044921875,
-0.10906982421875,
-0.02178955078125,
-0.0560302734375,
-0.04132080078125,
0.01248931884765625,
-0.040496826171875,
0.0191497802734375,
0.0298614501953125,
-0.010772705078125,
-0.02239990234375,
0.01300048828125,
-0.05126953125,
-0.0228729248046875,
-0.0675048828125,
-0.005615234375,
-0.0088348388671875,
0.01403045654296875,
-0.0048980712890625,
0.0253753662109375,
-0.011260986328125,
-0.047393798828125,
-0.036590576171875,
0.09869384765625,
-0.0149383544921875,
-0.05328369140625,
0.01125335693359375,
-0.02740478515625,
-0.0159149169921875,
-0.003620147705078125,
0.059417724609375,
0.005462646484375,
-0.0163726806640625,
0.001667022705078125,
0.0007305145263671875,
0.029937744140625,
0.059661865234375,
0.031585693359375,
-0.0191802978515625,
0.054901123046875,
0.08282470703125,
0.0013484954833984375,
0.01739501953125,
-0.01030731201171875,
-0.01605224609375,
-0.01617431640625,
-0.003650665283203125,
-0.0089874267578125,
0.007152557373046875,
-0.007595062255859375,
0.06573486328125,
0.0217437744140625,
0.0318603515625,
0.01305389404296875,
0.025238037109375,
0.008544921875,
0.03656005859375,
-0.0631103515625,
0.01088714599609375,
-0.0355224609375,
-0.006160736083984375,
-0.0116424560546875,
0.0196075439453125,
0.0130767822265625,
-0.037994384765625,
-0.0102081298828125,
-0.032867431640625,
0.0252838134765625,
-0.028045654296875,
-0.00015401840209960938,
-0.022369384765625,
-0.01241302490234375,
-0.004741668701171875,
0.054931640625,
-0.016693115234375,
-0.0232391357421875,
-0.034423828125,
0.02081298828125,
-0.038604736328125,
-0.061981201171875,
0.0111541748046875,
0.0005469322204589844,
-0.05120849609375,
0.022857666015625,
-0.003978729248046875,
-0.0019683837890625,
-0.0235443115234375,
0.03924560546875,
-0.03289794921875,
-0.0257110595703125,
0.008453369140625,
-0.001667022705078125,
0.0128936767578125,
0.0170135498046875,
-0.0184173583984375,
0.0208587646484375,
-0.002094268798828125,
-0.02752685546875,
-0.0736083984375,
-0.022796630859375,
-0.004749298095703125,
0.06597900390625,
0.016082763671875,
-0.032928466796875,
-0.00005125999450683594,
0.0521240234375,
0.0474853515625,
-0.01531982421875,
0.041229248046875,
-0.034912109375,
0.035186767578125,
0.0218963623046875,
0.025177001953125,
-0.0130615234375,
-0.01134490966796875,
-0.01311492919921875,
-0.0098419189453125,
0.036529541015625,
-0.01873779296875,
-0.00635528564453125,
-0.006008148193359375,
-0.017242431640625,
-0.0789794921875,
-0.07403564453125,
-0.01222991943359375,
0.0291595458984375,
-0.037109375,
0.039703369140625,
-0.085693359375,
-0.07391357421875,
0.06622314453125,
0.027587890625,
-0.00870513916015625,
-0.024200439453125,
0.052001953125,
0.0038909912109375,
-0.040374755859375,
0.01184844970703125,
0.0146484375,
0.0073089599609375,
0.00537109375,
0.001964569091796875,
-0.0462646484375,
-0.02197265625,
0.0665283203125,
-0.038787841796875,
0.0093231201171875,
-0.00885772705078125,
0.03497314453125,
0.022125244140625,
0.004329681396484375,
0.01348876953125,
0.03509521484375,
-0.032135009765625,
-0.0131378173828125,
-0.01485443115234375,
0.01015472412109375,
0.0162353515625,
0.006832122802734375,
-0.0182952880859375,
0.0343017578125,
0.009063720703125,
-0.02142333984375,
0.01044464111328125,
-0.0160675048828125,
0.02911376953125,
0.0214996337890625,
-0.0084686279296875,
-0.00034880638122558594,
0.00926971435546875,
0.01259613037109375,
-0.0212249755859375,
0.02813720703125,
-0.0280303955078125,
0.0159454345703125,
0.019287109375,
-0.00927734375,
-0.0254364013671875,
-0.004886627197265625,
0.030517578125,
0.004058837890625,
-0.031402587890625,
-0.0182952880859375,
-0.0006761550903320312,
0.045379638671875,
-0.00891876220703125,
0.00614166259765625,
0.037200927734375,
-0.0157928466796875,
0.0123748779296875,
0.004993438720703125,
-0.024139404296875,
-0.031036376953125,
-0.024688720703125,
0.04534912109375,
0.036163330078125,
0.008270263671875,
0.01605224609375,
0.064453125,
0.02862548828125,
0.044586181640625,
-0.031890869140625,
0.05126953125,
0.0186767578125,
0.040557861328125,
0.006572723388671875,
-0.00783538818359375,
0.00812530517578125,
0.0207672119140625,
0.002239227294921875,
0.00487518310546875,
0.01537322998046875,
-0.00957489013671875,
-0.0222015380859375,
0.032318115234375,
0.0239105224609375,
0.0239715576171875,
0.010589599609375,
-0.0162200927734375,
0.029083251953125,
0.04608154296875,
-0.014923095703125,
-0.0155029296875,
-0.006633758544921875,
0.00327301025390625,
0.029510498046875,
-0.00777435302734375,
-0.01885986328125,
-0.04022216796875,
-0.00167083740234375,
-0.00449371337890625,
0.008087158203125,
-0.0280609130859375,
-0.0265045166015625,
-0.006725311279296875,
-0.01345062255859375,
0.0010747909545898438,
-0.03057861328125,
-0.035125732421875,
-0.004680633544921875,
0.00275421142578125,
0.01253509521484375,
-0.036376953125,
0.035675048828125,
-0.0302734375,
0.005157470703125,
-0.009490966796875,
0.02239990234375,
0.0226898193359375,
0.00567626953125,
-0.0074920654296875,
-0.02587890625,
-0.03851318359375,
-0.0217742919921875,
0.0099945068359375,
-0.004734039306640625,
-0.0270538330078125,
-0.0028743743896484375,
0.03814697265625,
0.01036834716796875,
0.00921630859375,
-0.03668212890625,
-0.00958251953125,
0.002323150634765625,
0.0276336669921875,
-0.00434112548828125,
-0.008636474609375,
0.06890869140625,
-0.00244903564453125,
0.04052734375,
0.0208282470703125,
0.04638671875,
0.0052947998046875,
-0.026702880859375,
-0.00725555419921875,
-0.1002197265625,
-0.01085662841796875,
0.015380859375,
-0.03045654296875,
0.04083251953125,
-0.00479888916015625,
0.01043701171875,
0.006725311279296875,
-0.017852783203125,
-0.016510009765625,
-0.0254364013671875,
0.032012939453125,
-0.005519866943359375,
0.031463623046875,
-0.01119232177734375,
-0.0115814208984375,
0.01450347900390625,
-0.0048370361328125,
-0.015716552734375,
0.0156402587890625,
0.0010852813720703125,
0.005939483642578125,
0.002582550048828125,
-0.0228424072265625,
0.0272369384765625,
0.0501708984375,
0.02166748046875,
0.04974365234375,
0.006313323974609375,
0.03326416015625,
0.0164337158203125,
0.00013184547424316406,
-0.0003199577331542969,
0.01641845703125,
0.08843994140625,
0.00424957275390625,
-0.0308990478515625,
0.03955078125,
-0.045257568359375,
-0.014434814453125,
0.0016717910766601562,
0.0168304443359375,
-0.032135009765625,
0.01444244384765625,
0.015380859375,
0.01526641845703125,
0.006931304931640625,
0.003673553466796875,
-0.01038360595703125,
-0.008636474609375,
0.051361083984375,
-0.046051025390625,
-0.0098876953125,
0.0179290771484375,
-0.0197296142578125,
-0.01210784912109375,
-0.0202178955078125,
0.02703857421875,
0.017303466796875,
-0.0439453125,
0.0421142578125,
0.0193939208984375,
0.033843994140625,
-0.036773681640625,
-0.0121612548828125,
0.004764556884765625,
-0.022247314453125,
-0.09197998046875,
0.00965118408203125,
0.0015039443969726562,
-0.006198883056640625,
0.0177154541015625,
-0.01200103759765625,
0.0684814453125,
0.0386962890625,
0.01026153564453125,
-0.01242828369140625,
-0.0083770751953125,
0.040313720703125,
-0.0058746337890625,
-0.0167083740234375,
0.01480865478515625,
0.050506591796875,
-0.0115814208984375,
0.0265960693359375,
0.0233001708984375,
-0.035308837890625,
-0.00897216796875,
-0.03057861328125,
0.032684326171875,
-0.01995849609375,
0.00240325927734375,
0.0156707763671875,
0.0211639404296875,
0.00176239013671875,
0.00716400146484375,
0.003513336181640625,
-0.036956787109375,
-0.04937744140625,
-0.0005307197570800781,
-0.07696533203125,
-0.004756927490234375,
-0.0063629150390625,
-0.04119873046875,
0.09515380859375,
-0.0059967041015625,
0.0025272369384765625,
-0.001293182373046875,
0.057159423828125,
-0.0201263427734375,
0.04827880859375,
-0.02252197265625,
0.051116943359375,
-0.0250701904296875,
0.046234130859375,
-0.047698974609375,
-0.003086090087890625,
0.016876220703125,
0.0283355712890625,
0.040130615234375,
0.00806427001953125,
0.00022017955780029297,
-0.06719970703125,
-0.04254150390625,
0.0352783203125,
-0.01308441162109375,
0.0016632080078125,
0.0208892822265625,
0.020782470703125,
0.05059814453125,
-0.039703369140625,
0.02587890625,
-0.014434814453125,
0.0209808349609375,
0.04925537109375,
0.01328277587890625,
0.01490020751953125,
-0.005268096923828125,
0.06097412109375,
-0.051422119140625,
-0.006366729736328125,
0.04962158203125,
-0.04766845703125,
0.005527496337890625,
0.03558349609375,
0.044281005859375,
-0.06011962890625,
-0.038238525390625,
-0.025115966796875,
0.0306243896484375,
0.0159149169921875,
0.03173828125,
0.027435302734375,
0.020599365234375,
0.048919677734375,
-0.0018682479858398438,
0.01345062255859375,
0.0026760101318359375,
0.00859832763671875,
0.0289154052734375,
0.050018310546875,
0.0450439453125,
-0.01099395751953125,
-0.0250396728515625,
0.07354736328125,
0.060699462890625,
-0.0228118896484375,
-0.033447265625,
0.00806427001953125,
0.017669677734375,
-0.004596710205078125,
-0.002593994140625,
0.01554107666015625,
0.01433563232421875,
0.032745361328125,
-0.0308380126953125,
0.0003769397735595703,
0.0180816650390625,
0.01468658447265625,
-0.01511383056640625,
-0.01081085205078125,
0.00475311279296875,
0.01194000244140625,
0.0012502670288085938,
-0.0192108154296875,
0.00450897216796875,
-0.001789093017578125,
0.00270843505859375,
0.0285491943359375,
0.0143280029296875,
0.0160369873046875,
-0.00868988037109375,
0.024566650390625,
-0.0298614501953125,
0.027008056640625,
-0.00992584228515625,
-0.037078857421875,
-0.0052490234375,
0.03253173828125,
0.018218994140625,
0.043060302734375,
0.041839599609375,
0.0170135498046875,
-0.0249786376953125,
-0.002140045166015625,
0.0262298583984375,
-0.035919189453125,
-0.01102447509765625,
-0.00946807861328125,
-0.004680633544921875,
0.007354736328125,
-0.0204010009765625,
-0.007328033447265625,
0.0452880859375,
-0.01554107666015625,
-0.032318115234375,
0.068115234375,
-0.02484130859375,
-0.0191802978515625,
0.046051025390625,
-0.0005970001220703125,
0.11004638671875,
0.0059051513671875,
-0.0628662109375,
0.00015473365783691406,
-0.0181121826171875,
-0.093994140625,
0.0305023193359375,
0.046112060546875,
-0.030487060546875,
-0.00539398193359375,
-0.02545166015625,
-0.026885986328125,
0.0231475830078125,
0.01044464111328125,
-0.01071929931640625,
0.0114898681640625,
0.0111236572265625,
-0.0177154541015625,
-0.01351165771484375,
-0.0014209747314453125,
0.0098114013671875,
0.029022216796875,
-0.01360321044921875,
0.0209197998046875,
0.0014562606811523438,
0.005229949951171875,
-0.02685546875,
0.00792694091796875,
-0.043182373046875,
-0.0462646484375,
0.057098388671875,
-0.0418701171875,
-0.01910400390625,
0.0168304443359375,
-0.024749755859375,
0.0095672607421875,
0.037841796875,
-0.01244354248046875,
0.0277862548828125,
-0.04083251953125,
0.024444580078125,
-0.0193023681640625,
-0.00255584716796875,
-0.042510986328125,
-0.0325927734375,
-0.04742431640625,
-0.034698486328125,
0.016998291015625,
-0.0054473876953125,
0.0101470947265625,
0.004558563232421875,
-0.0258026123046875,
-0.018798828125,
0.0254974365234375,
-0.029144287109375,
0.025390625,
0.0240020751953125,
-0.046051025390625,
-0.007717132568359375,
-0.01078033447265625,
-0.0140228271484375,
-0.001056671142578125,
0.0145263671875,
-0.01113128662109375,
0.0127716064453125,
-0.033843994140625,
-0.042022705078125,
-0.015411376953125,
0.01206207275390625,
0.000270843505859375,
0.0086212158203125,
-0.043609619140625,
-0.0092926025390625,
-0.0236358642578125,
0.061065673828125,
-0.01381683349609375,
0.0247344970703125,
-0.0230712890625,
-0.005863189697265625,
0.021484375,
-0.0577392578125,
-0.06005859375,
0.0038471221923828125,
0.02630615234375,
0.0263824462890625,
-0.08233642578125,
0.04461669921875,
0.0029277801513671875,
0.022735595703125,
0.0151519775390625,
-0.0455322265625,
-0.013458251953125,
0.0198974609375,
-0.01004791259765625,
-0.024444580078125,
-0.048980712890625,
-0.0045013427734375,
-0.0379638671875,
-0.00873565673828125,
0.0286102294921875,
-0.00923919677734375,
-0.0333251953125,
-0.016265869140625,
-0.00878143310546875,
0.030670166015625,
-0.030670166015625,
-0.00901031494140625,
0.022247314453125,
0.01105499267578125,
-0.01031494140625,
-0.0885009765625,
-0.01201629638671875,
-0.049041748046875,
0.00421142578125,
0.03033447265625,
0.006092071533203125,
0.038970947265625,
-0.00540924072265625,
-0.03997802734375,
0.052154541015625,
0.005619049072265625,
-0.03411865234375,
-0.07562255859375,
0.0023651123046875,
0.00988006591796875,
0.01010894775390625,
-0.016632080078125,
-0.033050537109375,
-0.056549072265625,
0.0213470458984375,
0.00637054443359375,
0.005680084228515625,
0.03472900390625,
-0.0125274658203125,
-0.052734375,
-0.0101470947265625,
-0.0172119140625,
0.01154327392578125,
-0.0202789306640625,
0.007465362548828125,
0.0260009765625,
0.052337646484375,
-0.003955841064453125,
0.004016876220703125,
0.00817108154296875,
-0.045013427734375,
-0.003223419189453125,
-0.0360107421875,
-0.01323699951171875,
-0.00997161865234375,
0.036956787109375,
0.036590576171875,
0.012939453125,
-0.03289794921875,
0.031768798828125,
-0.0293426513671875,
0.0019588470458984375,
-0.006824493408203125,
-0.01299285888671875,
-0.004489898681640625,
-0.00325775146484375,
-0.00540924072265625,
-0.015838623046875,
-0.0168914794921875,
-0.00402069091796875,
-0.034423828125,
-0.01003265380859375,
-0.006256103515625,
-0.008087158203125,
-0.00318145751953125,
0.0143890380859375,
0.059173583984375,
-0.03985595703125,
-0.01024627685546875,
0.028717041015625,
-0.00864410400390625,
0.016510009765625,
0.0225982666015625,
-0.0196533203125,
0.0450439453125,
-0.0209197998046875,
-0.0126953125,
0.01378631591796875,
-0.00685882568359375,
0.0035247802734375,
0.0285797119140625,
-0.047149658203125,
0.0184783935546875,
0.01422119140625,
0.010498046875,
-0.005096435546875,
0.0026187896728515625,
0.009246826171875,
0.08294677734375,
-0.0270233154296875,
0.0258941650390625,
-0.00821685791015625,
0.01155853271484375,
0.017242431640625,
0.0012331008911132812,
0.07244873046875,
-0.02581787109375,
0.0094146728515625,
0.0313720703125,
0.037017822265625,
-0.0102386474609375,
0.00556182861328125,
-0.0086669921875,
0.03900146484375,
-0.002994537353515625
] |
4bba95532d21b5f93ce48c62c072f5f368f53de5
|
Wordpress Stackexchange
Q: Debugging WordPress themes with Xdebug, real time html output Hi I'm using XDEBUG to debug my WordPress code, is it possible to view the page building up in the browser while debugging? At the moment the page just hangs until the debugging process is finished then displays the fully rendered page. Ideally I'd like to see the page building up bit by bit as I debug through the theme's code.
A: Just an Idea - I did not test this.
Worth a try would be to play around with your PHP settings:
; Implicit flush tells PHP to tell the output layer to flush itself
; automatically after every output block. This is equivalent to calling the PHP
; function flush() after each and every call to print() or echo() and each and
; every HTML block. Turning this option on has serious performance implications
; and is generally recommended for debugging purposes only.
implicit_flush = On
I would also recommend to disable gzip and look for other output_buffering related options in php.ini.
Then you should be able to set break-points in the different rendering stages of your theme.
|
Q: Debugging WordPress themes with Xdebug, real time html output Hi I'm using XDEBUG to debug my WordPress code, is it possible to view the page building up in the browser while debugging? At the moment the page just hangs until the debugging process is finished then displays the fully rendered page. Ideally I'd like to see the page building up bit by bit as I debug through the theme's code.
A: Just an Idea - I did not test this.
Worth a try would be to play around with your PHP settings:
; Implicit flush tells PHP to tell the output layer to flush itself
; automatically after every output block. This is equivalent to calling the PHP
; function flush() after each and every call to print() or echo() and each and
; every HTML block. Turning this option on has serious performance implications
; and is generally recommended for debugging purposes only.
implicit_flush = On
I would also recommend to disable gzip and look for other output_buffering related options in php.ini.
Then you should be able to set break-points in the different rendering stages of your theme.
A: You can also change the output_buffering parameter in php.ini file to zero(0).
output_buffering = 0
|
wordpress
|
{
"language": "en",
"length": 206,
"provenance": "stackexchange_00019.jsonl.gz:421069",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56033"
}
|
[
0.0257415771484375,
-0.00901031494140625,
-0.01172637939453125,
-0.046722412109375,
0.00531005859375,
0.0011682510375976562,
-0.01129913330078125,
-0.01509857177734375,
0.0307159423828125,
0.0022830963134765625,
-0.017120361328125,
-0.0341796875,
0.002361297607421875,
-0.031951904296875,
-0.0101776123046875,
-0.01409912109375,
0.0439453125,
0.0190277099609375,
0.052978515625,
0.0010013580322265625,
-0.0240936279296875,
0.0269622802734375,
0.0261688232421875,
0.047760009765625,
-0.00366973876953125,
0.04425048828125,
0.0948486328125,
-0.011566162109375,
0.01213836669921875,
-0.0020580291748046875,
0.0197296142578125,
-0.06976318359375,
0.037109375,
0.055206298828125,
-0.086181640625,
0.039794921875,
-0.0225677490234375,
0.0255584716796875,
-0.002353668212890625,
0.03338623046875,
0.0104522705078125,
-0.002849578857421875,
0.034942626953125,
-0.032379150390625,
-0.0066375732421875,
-0.00959014892578125,
-0.0041656494140625,
-0.04986572265625,
0.0002510547637939453,
0.02239990234375,
0.01385498046875,
0.0210113525390625,
0.0246734619140625,
0.0382080078125,
-0.01197052001953125,
-0.0164337158203125,
-0.047576904296875,
0.03680419921875,
0.0290985107421875,
0.01352691650390625,
-0.01183319091796875,
-0.0124969482421875,
0.004180908203125,
-0.0281829833984375,
-0.0081329345703125,
0.01490020751953125,
0.01080322265625,
0.0041961669921875,
0.0286102294921875,
0.0238800048828125,
0.011810302734375,
0.00013399124145507812,
-0.0187225341796875,
-0.005443572998046875,
0.0196075439453125,
-0.0218658447265625,
0.0193023681640625,
-0.01070404052734375,
-0.00366973876953125,
0.044677734375,
0.0261993408203125,
-0.062255859375,
-0.026214599609375,
0.0226287841796875,
-0.005573272705078125,
0.03680419921875,
0.0026912689208984375,
-0.016693115234375,
-0.01486968994140625,
-0.029632568359375,
-0.03594970703125,
0.020111083984375,
-0.0238189697265625,
-0.028533935546875,
-0.037078857421875,
-0.01654052734375,
-0.04656982421875,
-0.020477294921875,
0.0086212158203125,
0.0252227783203125,
-0.016815185546875,
-0.0259246826171875,
0.0184478759765625,
-0.023834228515625,
-0.01064300537109375,
0.0233001708984375,
0.00984954833984375,
0.010223388671875,
0.038543701171875,
0.0159912109375,
-0.0018987655639648438,
0.029571533203125,
-0.01261138916015625,
-0.05255126953125,
0.0024013519287109375,
0.037384033203125,
-0.00510406494140625,
0.0021572113037109375,
0.0191802978515625,
-0.022308349609375,
-0.0009851455688476562,
0.036651611328125,
0.00347900390625,
0.02001953125,
-0.0184173583984375,
0.0068817138671875,
0.010101318359375,
-0.059967041015625,
0.01404571533203125,
-0.00852203369140625,
-0.0208740234375,
0.019317626953125,
0.0228118896484375,
0.01551055908203125,
0.00226593017578125,
-0.0006804466247558594,
0.003269195556640625,
-0.050140380859375,
-0.0184478759765625,
0.038665771484375,
-0.033905029296875,
-0.047332763671875,
-0.006931304931640625,
-0.0450439453125,
-0.044708251953125,
-0.007373809814453125,
0.0127716064453125,
0.027191162109375,
-0.0262603759765625,
-0.05426025390625,
-0.00774383544921875,
0.020294189453125,
0.0018796920776367188,
0.0103759765625,
0.03057861328125,
-0.0634765625,
0.0203094482421875,
-0.03997802734375,
0.0557861328125,
-0.01557159423828125,
0.01702880859375,
0.00258636474609375,
0.0010814666748046875,
-0.025482177734375,
-0.0343017578125,
-0.0123443603515625,
-0.032684326171875,
-0.01036834716796875,
0.0287933349609375,
-0.03375244140625,
0.0474853515625,
-0.02862548828125,
0.037445068359375,
-0.00283050537109375,
-0.012451171875,
0.0160980224609375,
-0.005374908447265625,
0.00035071372985839844,
0.0246124267578125,
-0.044891357421875,
-0.05865478515625,
-0.030792236328125,
0.031707763671875,
-0.021636962890625,
-0.050048828125,
0.037567138671875,
-0.00276947021484375,
0.03912353515625,
0.032623291015625,
0.00537109375,
0.0251007080078125,
-0.00742340087890625,
-0.0474853515625,
0.035614013671875,
0.0020294189453125,
-0.0215911865234375,
-0.041839599609375,
-0.015838623046875,
-0.024688720703125,
0.00899505615234375,
-0.039276123046875,
-0.006038665771484375,
-0.004360198974609375,
-0.01224517822265625,
-0.07843017578125,
-0.0023822784423828125,
-0.041412353515625,
0.0567626953125,
0.072509765625,
0.02044677734375,
-0.0171051025390625,
0.0256805419921875,
-0.000202178955078125,
-0.041046142578125,
-0.07177734375,
0.0460205078125,
-0.0199432373046875,
0.0301361083984375,
0.00960540771484375,
0.00836944580078125,
0.00856781005859375,
-0.0211181640625,
0.00022995471954345703,
-0.01323699951171875,
0.047393798828125,
-0.01116180419921875,
0.00264739990234375,
-0.0235748291015625,
0.07086181640625,
-0.0028839111328125,
0.022705078125,
0.025177001953125,
-0.0258331298828125,
-0.004238128662109375,
-0.034637451171875,
-0.02203369140625,
-0.0160369873046875,
-0.047576904296875,
0.0307159423828125,
0.054229736328125,
0.052581787109375,
0.037567138671875,
-0.000823974609375,
-0.025146484375,
0.043731689453125,
-0.047576904296875,
0.0166168212890625,
-0.0296783447265625,
0.0245513916015625,
0.04876708984375,
-0.0235595703125,
-0.0310821533203125,
0.01422119140625,
-0.064208984375,
-0.0024776458740234375,
0.028656005859375,
0.0311126708984375,
0.004962921142578125,
-0.0400390625,
0.03753662109375,
-0.0109405517578125,
0.0252532958984375,
-0.02093505859375,
0.005889892578125,
0.0312347412109375,
-0.016204833984375,
0.0019207000732421875,
0.0035877227783203125,
-0.0313720703125,
0.01322174072265625,
0.04559326171875,
-0.01500701904296875,
0.0023517608642578125,
0.043548583984375,
-0.037628173828125,
0.0195770263671875,
-0.0277862548828125,
-0.0017347335815429688,
-0.003917694091796875,
0.0103302001953125,
-0.01253509521484375,
0.039093017578125,
0.01509857177734375,
-0.01491546630859375,
-0.0212554931640625,
-0.0357666015625,
0.01629638671875,
-0.0144805908203125,
0.0499267578125,
0.08160400390625,
0.0531005859375,
0.076904296875,
0.005535125732421875,
0.07366943359375,
-0.034698486328125,
0.0225830078125,
0.0789794921875,
-0.0556640625,
0.03424072265625,
-0.020355224609375,
0.038604736328125,
0.06085205078125,
-0.014312744140625,
0.00836181640625,
0.01030731201171875,
0.01483154296875,
0.0095977783203125,
-0.01447296142578125,
-0.038116455078125,
0.01232147216796875,
-0.08477783203125,
-0.0256195068359375,
0.013580322265625,
0.0291900634765625,
0.010955810546875,
-0.03118896484375,
0.0012998580932617188,
0.0169219970703125,
-0.07196044921875,
-0.0906982421875,
-0.0634765625,
-0.072998046875,
-0.035064697265625,
-0.004558563232421875,
-0.0380859375,
0.0338134765625,
0.0029163360595703125,
0.01482391357421875,
-0.03594970703125,
-0.0256805419921875,
-0.0516357421875,
-0.08734130859375,
-0.054412841796875,
0.0174713134765625,
0.0004305839538574219,
0.0220794677734375,
-0.0054779052734375,
0.0280609130859375,
-0.01084136962890625,
-0.0404052734375,
-0.026458740234375,
0.0218505859375,
0.001354217529296875,
-0.035736083984375,
-0.0264892578125,
0.009429931640625,
-0.007183074951171875,
0.00811004638671875,
-0.056243896484375,
-0.01285552978515625,
0.02764892578125,
-0.0178985595703125,
-0.04876708984375,
-0.026641845703125,
-0.03338623046875,
0.0236358642578125,
0.08013916015625,
-0.0189056396484375,
0.01007080078125,
-0.047088623046875,
0.007755279541015625,
0.004070281982421875,
-0.021148681640625,
-0.0740966796875,
0.024078369140625,
-0.027587890625,
-0.0268402099609375,
-0.048583984375,
-0.00464630126953125,
0.0186920166015625,
0.04107666015625,
-0.0293121337890625,
0.0304107666015625,
-0.03350830078125,
-0.039154052734375,
-0.0361328125,
0.016448974609375,
-0.034698486328125,
0.01290130615234375,
0.002620697021484375,
-0.0252838134765625,
-0.01215362548828125,
0.00745391845703125,
-0.00669097900390625,
0.0242767333984375,
0.0165557861328125,
0.01085662841796875,
0.033203125,
0.006961822509765625,
-0.0038700103759765625,
-0.0156097412109375,
0.0063934326171875,
-0.055633544921875,
0.0157318115234375,
0.02203369140625,
0.0189666748046875,
-0.0278167724609375,
-0.037506103515625,
-0.10321044921875,
-0.00977325439453125,
-0.04742431640625,
0.02972412109375,
-0.002033233642578125,
-0.01068115234375,
-0.01442718505859375,
0.0009093284606933594,
-0.0171966552734375,
-0.032928466796875,
0.00046539306640625,
-0.006130218505859375,
0.00897979736328125,
-0.050750732421875,
0.0034580230712890625,
-0.049468994140625,
0.029205322265625,
-0.034912109375,
-0.08935546875,
-0.0104522705078125,
-0.056640625,
0.07550048828125,
0.0249176025390625,
-0.004062652587890625,
-0.017059326171875,
0.036285400390625,
0.003322601318359375,
0.058197021484375,
-0.025634765625,
0.007297515869140625,
-0.01641845703125,
-0.029876708984375,
0.0087127685546875,
-0.023956298828125,
-0.0246124267578125,
-0.01430511474609375,
0.0145263671875,
0.02972412109375,
-0.00485992431640625,
0.0029621124267578125,
0.000904083251953125,
-0.002208709716796875,
0.02728271484375,
-0.002246856689453125,
-0.0253753662109375,
0.00412750244140625,
-0.011444091796875,
-0.0034732818603515625,
-0.0017919540405273438,
0.0258331298828125,
0.0232391357421875,
-0.0031604766845703125,
0.004161834716796875,
0.00033783912658691406,
0.035186767578125,
0.005023956298828125,
-0.0172119140625,
0.0022945404052734375,
0.020843505859375,
0.0333251953125,
0.00945281982421875,
0.04296875,
0.01390838623046875,
-0.004360198974609375,
0.0033416748046875,
0.01491546630859375,
0.0032939910888671875,
0.0209197998046875,
0.01080322265625,
0.0084686279296875,
-0.042816162109375,
0.03289794921875,
0.01125335693359375,
-0.0189056396484375,
0.0152587890625,
-0.004852294921875,
0.0008831024169921875,
0.01019287109375,
0.009613037109375,
-0.0062713623046875,
0.0025730133056640625,
-0.0142974853515625,
-0.0114593505859375,
-0.00012195110321044922,
0.0110931396484375,
0.0794677734375,
0.04937744140625,
-0.0079193115234375,
0.06494140625,
0.055816650390625,
0.007228851318359375,
0.025726318359375,
0.02880859375,
-0.01019287109375,
0.0274658203125,
0.039703369140625,
0.00727081298828125,
-0.0283660888671875,
-0.01201629638671875,
0.032928466796875,
0.011199951171875,
-0.06573486328125,
0.0279693603515625,
0.01261138916015625,
0.03436279296875,
0.029754638671875,
0.005229949951171875,
0.0174560546875,
-0.003398895263671875,
0.00872802734375,
0.02655029296875,
0.007781982421875,
-0.01052093505859375,
-0.0190887451171875,
-0.0247650146484375,
-0.056365966796875,
-0.00455474853515625,
0.044464111328125,
0.00887298583984375,
-0.056121826171875,
0.03790283203125,
-0.01023101806640625,
-0.02069091796875,
-0.01904296875,
0.030548095703125,
0.027252197265625,
-0.034637451171875,
0.0303192138671875,
-0.0224761962890625,
0.04339599609375,
-0.01385498046875,
0.011688232421875,
0.01343536376953125,
0.00710296630859375,
-0.02703857421875,
-0.0274658203125,
0.03436279296875,
-0.00617218017578125,
-0.0024127960205078125,
0.04083251953125,
0.01219940185546875,
-0.0224151611328125,
-0.0197296142578125,
-0.027618408203125,
0.0267791748046875,
-0.0211334228515625,
-0.01451873779296875,
0.0640869140625,
0.01971435546875,
0.0650634765625,
0.005916595458984375,
-0.0088348388671875,
0.00986480712890625,
0.01557159423828125,
-0.052825927734375,
-0.052337646484375,
0.018890380859375,
-0.051025390625,
0.035125732421875,
-0.015899658203125,
-0.031005859375,
0.03338623046875,
-0.03424072265625,
0.00913238525390625,
-0.031707763671875,
0.0222625732421875,
-0.0294189453125,
0.006320953369140625,
0.041717529296875,
0.017425537109375,
-0.00476837158203125,
0.004085540771484375,
-0.040496826171875,
-0.057861328125,
-0.002838134765625,
0.0141448974609375,
-0.0634765625,
0.004100799560546875,
0.0181884765625,
0.01039886474609375,
0.0067291259765625,
-0.00749969482421875,
-0.0227813720703125,
0.04559326171875,
0.0265350341796875,
0.07550048828125,
0.00977325439453125,
0.03497314453125,
-0.04461669921875,
0.062469482421875,
0.0004260540008544922,
0.0089874267578125,
-0.029510498046875,
-0.0274658203125,
0.023406982421875,
0.0169219970703125,
-0.0157928466796875,
-0.015655517578125,
-0.0182037353515625,
-0.05987548828125,
0.0301666259765625,
-0.019805908203125,
-0.02447509765625,
0.00005173683166503906,
0.01422119140625,
-0.0272064208984375,
0.0191192626953125,
0.0089874267578125,
-0.03057861328125,
-0.0036487579345703125,
-0.00746917724609375,
-0.020721435546875,
-0.01451873779296875,
-0.055145263671875,
0.041534423828125,
0.0238037109375,
0.0173797607421875,
-0.0205841064453125,
-0.0193939208984375,
0.0296783447265625,
0.07183837890625,
-0.0096282958984375,
0.04754638671875,
0.0242919921875,
0.00489044189453125,
0.0213470458984375,
0.00991058349609375,
-0.0279083251953125,
-0.031768798828125,
0.043304443359375,
0.01357269287109375,
-0.03497314453125,
0.01885986328125,
-0.0360107421875,
0.0217132568359375,
0.06219482421875,
0.05609130859375,
-0.0562744140625,
-0.0016832351684570312,
0.01174163818359375,
-0.051483154296875,
-0.018798828125,
-0.02947998046875,
0.0285491943359375,
-0.01413726806640625,
0.054595947265625,
0.0247955322265625,
-0.003917694091796875,
0.01849365234375,
-0.02313232421875,
0.01479339599609375,
-0.0216827392578125,
0.05908203125,
0.0074310302734375,
-0.107177734375,
0.050140380859375,
0.0628662109375,
0.008697509765625,
-0.04638671875,
0.012481689453125,
-0.0330810546875,
-0.004970550537109375,
-0.02947998046875,
0.02105712890625,
-0.020263671875,
0.048736572265625,
0.0037441253662109375,
0.015045166015625,
-0.0270843505859375,
0.046630859375,
-0.03668212890625,
0.0209197998046875,
0.02423095703125,
-0.030914306640625,
0.0228424072265625,
-0.002452850341796875,
0.01953125,
-0.01105499267578125,
-0.0411376953125,
-0.004058837890625,
-0.03729248046875,
0.0016307830810546875,
-0.0010662078857421875,
0.03485107421875,
0.04608154296875,
0.0164794921875,
-0.0333251953125,
0.0426025390625,
0.022613525390625,
-0.0252227783203125,
-0.00803375244140625,
0.0009450912475585938,
-0.009857177734375,
0.046478271484375,
-0.01776123046875,
0.0161285400390625,
0.01183319091796875,
-0.0131378173828125,
-0.047271728515625,
0.03375244140625,
-0.001308441162109375,
0.0226898193359375,
0.01515960693359375,
0.004512786865234375,
-0.033355712890625,
-0.0297393798828125,
0.0009512901306152344,
0.08404541015625,
0.01702880859375,
0.07080078125,
-0.05255126953125,
-0.02947998046875,
0.052978515625,
0.076904296875,
-0.04229736328125,
-0.0131988525390625,
-0.016143798828125,
0.03973388671875,
0.061676025390625,
-0.00649261474609375,
0.0117034912109375,
0.0364990234375,
0.0006885528564453125,
-0.0098724365234375,
-0.018096923828125,
-0.037872314453125,
0.01151275634765625,
-0.060211181640625,
-0.0022220611572265625,
0.031951904296875,
0.012603759765625,
-0.010986328125,
0.0287628173828125,
0.028350830078125,
-0.038665771484375,
0.0274658203125,
0.020538330078125,
0.046295166015625,
0.0242767333984375,
0.0109100341796875,
0.0277862548828125,
-0.057037353515625,
-0.01148223876953125,
-0.0251007080078125,
0.046112060546875,
0.0042572021484375,
-0.020416259765625,
0.0181732177734375,
0.0218353271484375,
-0.01343536376953125,
-0.016265869140625,
-0.0124359130859375,
0.03369140625,
-0.029266357421875,
0.0094757080078125,
0.0238037109375,
0.03924560546875,
0.010986328125,
-0.01468658447265625,
-0.00228118896484375,
0.01529693603515625,
-0.005504608154296875,
-0.024261474609375,
0.004108428955078125,
0.00843048095703125,
0.0178680419921875,
-0.0010013580322265625,
0.03839111328125,
-0.008514404296875,
0.00039649009704589844,
0.01947021484375,
-0.040802001953125,
-0.033905029296875,
0.024993896484375,
-0.009368896484375,
-0.0202178955078125,
0.051666259765625,
-0.0260772705078125,
-0.00911712646484375,
-0.003265380859375,
0.0122528076171875,
0.02801513671875,
0.0182952880859375,
0.009429931640625,
0.00997161865234375,
-0.002361297607421875,
-0.0540771484375,
0.0210113525390625,
-0.000518798828125,
0.051971435546875,
-0.04473876953125,
0.01580810546875,
0.0026149749755859375,
0.050506591796875,
0.0219879150390625,
0.0088043212890625,
0.061920166015625,
0.032745361328125,
-0.048919677734375,
-0.014617919921875,
0.0015420913696289062,
-0.039947509765625,
-0.042999267578125,
-0.0634765625,
-0.02862548828125,
-0.002513885498046875,
-0.021728515625,
0.0360107421875,
-0.0274658203125,
0.0120391845703125,
-0.06048583984375,
0.0087432861328125,
-0.01129150390625,
-0.04010009765625,
0.043212890625,
-0.031402587890625,
0.01143646240234375,
-0.036468505859375,
-0.01885986328125,
-0.0031280517578125,
-0.01123809814453125,
-0.01332855224609375,
0.0012979507446289062,
0.035614013671875,
0.034759521484375,
-0.0053253173828125,
0.031494140625,
0.01259613037109375,
-0.01355743408203125,
0.00022983551025390625,
0.006988525390625,
-0.00299835205078125,
0.023681640625,
0.01445770263671875,
-0.0531005859375,
-0.046417236328125,
-0.022979736328125,
0.05303955078125,
0.0005211830139160156,
0.09417724609375,
-0.0231475830078125,
0.0156402587890625,
-0.00815582275390625,
-0.01800537109375,
0.0032806396484375,
-0.005489349365234375,
-0.00893402099609375,
0.0017490386962890625,
-0.00402069091796875,
-0.006313323974609375,
-0.035064697265625,
0.01474761962890625,
0.031707763671875,
-0.0382080078125,
0.024932861328125,
-0.0206756591796875,
0.0182952880859375,
-0.05230712890625,
0.03472900390625,
-0.01186370849609375,
-0.03143310546875,
0.041290283203125,
0.04852294921875,
-0.040191650390625,
0.0035533905029296875,
-0.00847625732421875,
0.004329681396484375,
0.031982421875,
0.0067291259765625,
0.0262908935546875,
0.0153045654296875,
0.035186767578125,
0.034515380859375,
-0.047119140625,
-0.0059051513671875,
0.0010509490966796875,
-0.0235137939453125,
0.03594970703125,
-0.01148223876953125,
0.036163330078125,
0.00020134449005126953,
-0.00699615478515625,
-0.007015228271484375,
0.05047607421875,
0.053497314453125,
-0.00937652587890625,
0.0306549072265625,
-0.0091552734375,
0.006317138671875,
0.056304931640625,
0.0278167724609375,
0.004657745361328125,
0.0206756591796875,
-0.00518035888671875,
-0.002063751220703125,
0.03369140625,
-0.0215911865234375,
-0.004634857177734375,
-0.0167694091796875,
0.024627685546875,
0.01275634765625,
-0.022308349609375,
0.018218994140625,
-0.0164337158203125,
-0.036346435546875,
0.0146942138671875,
0.02117919921875,
0.005252838134765625,
0.034912109375,
-0.04644775390625,
-0.0491943359375,
-0.0017766952514648438,
0.040008544921875,
-0.021942138671875,
-0.01165008544921875,
-0.0037860870361328125,
0.00044918060302734375,
0.044586181640625,
-0.013092041015625,
0.00616455078125,
0.046112060546875,
-0.01346588134765625,
-0.0271759033203125,
0.01995849609375,
-0.009368896484375,
0.00977325439453125,
-0.0204620361328125,
-0.00528717041015625,
-0.025390625,
0.01275634765625,
0.04241943359375,
-0.04058837890625,
0.0040435791015625,
-0.0496826171875,
-0.10791015625,
0.02398681640625,
0.01540374755859375,
-0.04681396484375,
-0.03662109375,
-0.01641845703125,
-0.007598876953125,
0.037628173828125,
-0.0057525634765625,
-0.022186279296875,
-0.05377197265625,
0.0279083251953125,
0.016448974609375,
-0.004383087158203125,
0.0447998046875,
0.038360595703125,
-0.0372314453125,
0.019744873046875,
-0.005802154541015625,
-0.0323486328125,
-0.039093017578125,
0.0014743804931640625,
0.01739501953125,
0.0238189697265625,
-0.010650634765625,
0.00864410400390625,
0.0433349609375,
0.005710601806640625,
-0.01093292236328125,
-0.024322509765625,
-0.045684814453125,
-0.0281982421875,
0.1402587890625,
0.028594970703125,
0.042938232421875,
-0.02301025390625,
-0.005218505859375,
-0.0214691162109375,
-0.0241546630859375,
-0.005023956298828125,
0.036834716796875,
-0.08624267578125,
-0.01393890380859375,
0.033538818359375,
0.0224456787109375,
-0.00006383657455444336,
-0.01068115234375,
0.0010805130004882812,
-0.028533935546875,
0.02740478515625,
0.0093231201171875,
-0.01174163818359375,
-0.04736328125,
0.05584716796875,
-0.039093017578125,
-0.01357269287109375,
0.023345947265625,
0.0289764404296875,
0.00688934326171875,
0.0309906005859375,
0.0035495758056640625,
0.04254150390625,
-0.03070068359375,
0.0123748779296875,
0.0128326416015625,
0.04815673828125,
-0.0198974609375,
-0.006866455078125,
0.01232147216796875,
-0.0240631103515625,
-0.041168212890625,
-0.027557373046875,
0.03594970703125,
0.0007371902465820312,
-0.03607177734375,
0.071533203125,
-0.0282440185546875,
0.033416748046875,
-0.01104736328125,
0.018218994140625,
-0.051605224609375,
0.0209197998046875,
0.00225830078125,
-0.034637451171875,
0.0078277587890625,
0.00853729248046875,
0.043304443359375,
-0.04443359375,
0.0272979736328125,
-0.0264129638671875,
0.0191192626953125,
0.023773193359375
] |
45da1cb72aa44287262eddcc30c17dbcbf4878af
|
Wordpress Stackexchange
Q: Contact form 7 select box different value-text than content-text in option Does anyone know how I can set a different value in the select options in the Contact Form 7 plugin? Here is an example of the HTML I'd like it to generate:
<select>
<option value="1">My car</option>
<option value="2">Your car</option>
</select>
A: I solved this by publishing the standard contct form 7 form first, then I copied the source code created from all the short-codes from contact form 7. Then insteaed of using the shortcode as the select tag I used a real select-tag with in it. This way I could use the contact form 7 engine and at the same time set my own value-text in the option tags...
|
Q: Contact form 7 select box different value-text than content-text in option Does anyone know how I can set a different value in the select options in the Contact Form 7 plugin? Here is an example of the HTML I'd like it to generate:
<select>
<option value="1">My car</option>
<option value="2">Your car</option>
</select>
A: I solved this by publishing the standard contct form 7 form first, then I copied the source code created from all the short-codes from contact form 7. Then insteaed of using the shortcode as the select tag I used a real select-tag with in it. This way I could use the contact form 7 engine and at the same time set my own value-text in the option tags...
A: It looks like this is supported by Contact Form 7 natively, it's just not very obvious on how to make it happen.
Here's a documentation page explaining the functionality: http://contactform7.com/selectable-recipient-with-pipes/
Basically, all you have to do is put the values like so:
"Visible Value|actual-form-value"
What comes before the pipe | character will be shown in the form, and what comes after will be the actual value filled in for the form.
Hope that helps!
|
wordpress
|
{
"language": "en",
"length": 196,
"provenance": "stackexchange_00019.jsonl.gz:421071",
"question_score": "16",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56042"
}
|
[
-0.004611968994140625,
0.00543975830078125,
-0.0335693359375,
0.01556396484375,
-0.0006628036499023438,
-0.0232696533203125,
0.02685546875,
-0.01491546630859375,
0.039459228515625,
-0.00913238525390625,
-0.0552978515625,
0.02484130859375,
-0.060211181640625,
-0.01023101806640625,
-0.006744384765625,
-0.0423583984375,
-0.00962066650390625,
0.027069091796875,
-0.00019633769989013672,
-0.042724609375,
0.033905029296875,
-0.0290069580078125,
-0.06414794921875,
0.062744140625,
0.0275726318359375,
-0.038726806640625,
0.0028076171875,
0.007843017578125,
0.0034427642822265625,
0.00420379638671875,
0.0164642333984375,
-0.0065765380859375,
0.06781005859375,
0.021392822265625,
-0.0865478515625,
0.039031982421875,
0.01197052001953125,
-0.0081939697265625,
-0.0609130859375,
0.07098388671875,
0.054229736328125,
-0.0292510986328125,
0.00788116455078125,
0.029632568359375,
-0.011260986328125,
-0.02886962890625,
0.041717529296875,
-0.034942626953125,
0.012725830078125,
-0.020111083984375,
0.0022754669189453125,
0.020416259765625,
0.02191162109375,
-0.040130615234375,
-0.0189056396484375,
-0.01181793212890625,
-0.060943603515625,
0.05999755859375,
0.01145172119140625,
0.06915283203125,
0.018707275390625,
0.0205230712890625,
-0.03204345703125,
-0.030670166015625,
0.04425048828125,
-0.013275146484375,
0.0169677734375,
0.027069091796875,
0.00984954833984375,
0.058746337890625,
0.0203399658203125,
-0.0335693359375,
0.034027099609375,
-0.05792236328125,
-0.01157379150390625,
0.0210418701171875,
-0.00991058349609375,
-0.0078125,
0.020477294921875,
-0.052490234375,
0.020233154296875,
-0.04656982421875,
0.0185089111328125,
-0.006740570068359375,
0.0016021728515625,
0.00684356689453125,
0.00907135009765625,
-0.006732940673828125,
-0.0303955078125,
-0.004611968994140625,
-0.0204010009765625,
-0.01132965087890625,
-0.024566650390625,
0.038818359375,
-0.016876220703125,
0.0133819580078125,
-0.0138397216796875,
-0.00980377197265625,
0.00582122802734375,
0.02813720703125,
-0.0027313232421875,
-0.031768798828125,
0.038787841796875,
-0.025543212890625,
-0.010833740234375,
0.052032470703125,
0.01403045654296875,
0.01971435546875,
0.042633056640625,
-0.0007290840148925781,
0.0099945068359375,
0.060699462890625,
-0.033905029296875,
0.02392578125,
-0.043701171875,
-0.0043182373046875,
-0.05218505859375,
-0.0098419189453125,
-0.02783203125,
0.01265716552734375,
0.00586700439453125,
0.04034423828125,
0.043304443359375,
-0.060455322265625,
-0.00774383544921875,
-0.006931304931640625,
-0.014434814453125,
-0.06304931640625,
0.0020294189453125,
-0.03521728515625,
-0.0283660888671875,
0.0222015380859375,
0.097412109375,
0.08935546875,
0.0638427734375,
0.013916015625,
-0.015838623046875,
0.006664276123046875,
0.01317596435546875,
0.000942230224609375,
0.0269775390625,
-0.01500701904296875,
0.016876220703125,
0.020294189453125,
-0.035980224609375,
0.0293731689453125,
0.035919189453125,
-0.00035572052001953125,
-0.045501708984375,
-0.058685302734375,
-0.03668212890625,
0.00933837890625,
0.041351318359375,
0.017730712890625,
-0.051849365234375,
0.0175628662109375,
-0.0020847320556640625,
-0.0048370361328125,
-0.02294921875,
-0.031951904296875,
-0.007568359375,
-0.0181732177734375,
-0.00965118408203125,
-0.0221405029296875,
-0.0080413818359375,
-0.003368377685546875,
-0.0226287841796875,
0.0164947509765625,
0.007244110107421875,
-0.0008544921875,
-0.04168701171875,
0.01190948486328125,
-0.04559326171875,
-0.01312255859375,
0.00685882568359375,
0.010040283203125,
0.0012149810791015625,
0.00496673583984375,
0.024658203125,
-0.0283203125,
-0.0295257568359375,
-0.0369873046875,
0.04736328125,
-0.00881195068359375,
-0.0633544921875,
0.08807373046875,
-0.0074920654296875,
0.059478759765625,
0.003040313720703125,
-0.0076904296875,
0.043609619140625,
0.04150390625,
-0.0027599334716796875,
0.03192138671875,
0.0213623046875,
-0.03900146484375,
-0.03948974609375,
0.004505157470703125,
-0.01372528076171875,
-0.050750732421875,
-0.00048732757568359375,
0.00905609130859375,
-0.0025730133056640625,
0.0124359130859375,
0.00890350341796875,
-0.01120758056640625,
0.0044403076171875,
0.0117645263671875,
-0.05126953125,
0.00702667236328125,
0.033935546875,
-0.017242431640625,
-0.0352783203125,
0.044525146484375,
0.0300445556640625,
-0.01215362548828125,
0.0016145706176757812,
0.033966064453125,
-0.0046234130859375,
0.006420135498046875,
0.001171112060546875,
-0.02276611328125,
0.00870513916015625,
0.0335693359375,
-0.0321044921875,
0.025390625,
-0.0367431640625,
0.0132598876953125,
-0.016937255859375,
0.0095367431640625,
0.051788330078125,
0.0228729248046875,
-0.00731658935546875,
0.00910186767578125,
-0.05609130859375,
-0.0198822021484375,
-0.0219879150390625,
0.0070953369140625,
0.00792694091796875,
0.034942626953125,
0.033660888671875,
0.03790283203125,
0.0029926300048828125,
-0.0085601806640625,
0.058837890625,
-0.005405426025390625,
0.020751953125,
-0.0179901123046875,
-0.000972747802734375,
0.0035800933837890625,
0.0079803466796875,
-0.02545166015625,
0.0216064453125,
-0.04931640625,
0.03558349609375,
0.017242431640625,
-0.059234619140625,
-0.0162506103515625,
0.00933074951171875,
-0.035003662109375,
0.01444244384765625,
-0.0280609130859375,
-0.01396942138671875,
-0.0226287841796875,
0.07025146484375,
-0.0238800048828125,
0.0413818359375,
0.0272064208984375,
-0.02789306640625,
-0.00432586669921875,
0.00688934326171875,
-0.00435638427734375,
-0.006206512451171875,
0.003360748291015625,
-0.02178955078125,
0.0269775390625,
-0.02069091796875,
0.0032634735107421875,
0.003582000732421875,
0.01024627685546875,
-0.0028133392333984375,
0.032806396484375,
-0.0263519287109375,
-0.01360321044921875,
-0.006591796875,
-0.054046630859375,
-0.0166778564453125,
0.00705718994140625,
-0.004077911376953125,
0.00846099853515625,
0.0396728515625,
-0.01025390625,
-0.01454925537109375,
0.0201873779296875,
-0.0153350830078125,
-0.0293121337890625,
0.0226593017578125,
0.0035877227783203125,
0.0276641845703125,
-0.0243988037109375,
0.0038089752197265625,
0.04864501953125,
-0.047943115234375,
0.027374267578125,
0.005443572998046875,
-0.022613525390625,
-0.033050537109375,
0.0228729248046875,
0.0173797607421875,
0.0124664306640625,
-0.0374755859375,
0.0633544921875,
0.004390716552734375,
-0.046905517578125,
0.0308074951171875,
0.0006422996520996094,
-0.0008845329284667969,
-0.00981903076171875,
-0.032257080078125,
-0.0285186767578125,
0.004558563232421875,
-0.037078857421875,
0.0181121826171875,
-0.0251312255859375,
-0.0205841064453125,
-0.01849365234375,
0.007122039794921875,
0.007801055908203125,
0.00785064697265625,
-0.01499176025390625,
-0.0390625,
-0.0220489501953125,
-0.052947998046875,
0.0156402587890625,
-0.0000832676887512207,
0.0228271484375,
-0.00788116455078125,
0.0238189697265625,
-0.0224761962890625,
-0.08050537109375,
-0.035369873046875,
-0.004390716552734375,
-0.002712249755859375,
-0.000060439109802246094,
0.01139068603515625,
-0.032745361328125,
-0.0189208984375,
0.0164337158203125,
0.0194244384765625,
0.0033588409423828125,
-0.00580596923828125,
0.005046844482421875,
-0.00603485107421875,
0.01105499267578125,
0.046600341796875,
-0.02728271484375,
-0.0197906494140625,
0.0281524658203125,
0.047119140625,
-0.02978515625,
-0.00909423828125,
0.030487060546875,
0.006256103515625,
-0.02301025390625,
-0.03375244140625,
-0.0092926025390625,
-0.01486968994140625,
0.03692626953125,
-0.043548583984375,
-0.0245361328125,
0.052490234375,
-0.06732177734375,
0.07257080078125,
-0.03302001953125,
-0.04412841796875,
-0.045196533203125,
0.02099609375,
-0.045562744140625,
0.0100860595703125,
0.006229400634765625,
-0.029083251953125,
0.016357421875,
-0.01397705078125,
0.0565185546875,
-0.113037109375,
0.05584716796875,
-0.06890869140625,
-0.0693359375,
-0.007411956787109375,
-0.01385498046875,
0.05096435546875,
0.1014404296875,
-0.040374755859375,
-0.032684326171875,
0.055023193359375,
0.037078857421875,
-0.01293182373046875,
0.0009603500366210938,
-0.0250396728515625,
-0.04339599609375,
-0.09295654296875,
0.021087646484375,
0.01678466796875,
-0.02484130859375,
-0.01509857177734375,
0.0180206298828125,
-0.0472412109375,
-0.03204345703125,
0.004924774169921875,
0.0244140625,
0.00016772747039794922,
-0.0165557861328125,
-0.0165557861328125,
-0.02606201171875,
0.0186309814453125,
-0.0245361328125,
-0.039703369140625,
-0.00811767578125,
0.023040771484375,
0.037353515625,
-0.002719879150390625,
0.003154754638671875,
-0.029937744140625,
0.03216552734375,
0.0173492431640625,
-0.0178070068359375,
0.0117950439453125,
0.0031223297119140625,
-0.06085205078125,
-0.00020635128021240234,
0.0261383056640625,
-0.043609619140625,
-0.0030059814453125,
-0.048736572265625,
-0.01390838623046875,
-0.0157470703125,
-0.03741455078125,
0.007457733154296875,
-0.042205810546875,
0.0028934478759765625,
-0.09576416015625,
-0.032501220703125,
-0.006946563720703125,
-0.0112762451171875,
-0.00026869773864746094,
-0.0027790069580078125,
-0.0081634521484375,
-0.06207275390625,
-0.01947021484375,
-0.011322021484375,
-0.0137481689453125,
0.0312042236328125,
0.0004723072052001953,
0.01904296875,
0.0005030632019042969,
-0.0096893310546875,
-0.027130126953125,
0.03240966796875,
0.00937652587890625,
-0.028076171875,
-0.0167694091796875,
-0.049285888671875,
0.0552978515625,
0.006725311279296875,
0.042755126953125,
-0.04425048828125,
0.0731201171875,
0.0028018951416015625,
0.010406494140625,
0.0086669921875,
0.0189666748046875,
-0.035369873046875,
-0.003589630126953125,
0.0173187255859375,
-0.032012939453125,
0.0036907196044921875,
0.0254974365234375,
0.0214385986328125,
0.00623321533203125,
0.00724029541015625,
-0.051116943359375,
0.00785064697265625,
-0.010894775390625,
0.0240020751953125,
0.0282440185546875,
-0.01555633544921875,
0.02423095703125,
0.019287109375,
-0.00673675537109375,
0.00278472900390625,
-0.0232391357421875,
-0.005168914794921875,
-0.00553131103515625,
0.0364990234375,
-0.0069427490234375,
0.0118865966796875,
-0.003536224365234375,
-0.0218353271484375,
0.0164947509765625,
-0.01508331298828125,
0.0014162063598632812,
0.0026187896728515625,
-0.0021038055419921875,
-0.00977325439453125,
0.019989013671875,
-0.040802001953125,
-0.00733184814453125,
0.031890869140625,
0.05303955078125,
0.06719970703125,
0.0178985595703125,
0.046112060546875,
-0.0235595703125,
0.0030956268310546875,
-0.0128631591796875,
0.0016698837280273438,
0.0654296875,
-0.005321502685546875,
0.03662109375,
-0.01056671142578125,
0.05010986328125,
0.05914306640625,
-0.02874755859375,
0.0301055908203125,
0.0162506103515625,
0.0034694671630859375,
-0.056060791015625,
-0.0001373291015625,
-0.024566650390625,
-0.0113525390625,
0.03240966796875,
0.0010938644409179688,
0.00003057718276977539,
0.00412750244140625,
-0.0038623809814453125,
0.0255126953125,
0.0116119384765625,
-0.0296173095703125,
-0.0151824951171875,
0.0015573501586914062,
0.0018815994262695312,
0.0005578994750976562,
0.01171875,
-0.004642486572265625,
0.0192718505859375,
-0.01047515869140625,
-0.0228271484375,
0.024200439453125,
-0.0027332305908203125,
0.0271453857421875,
-0.0289459228515625,
-0.046600341796875,
0.04449462890625,
0.037322998046875,
-0.03955078125,
-0.061553955078125,
-0.072265625,
-0.006694793701171875,
0.0357666015625,
0.088623046875,
-0.0389404296875,
0.022186279296875,
-0.0029277801513671875,
-0.013702392578125,
-0.035491943359375,
0.027557373046875,
0.01471710205078125,
0.0178985595703125,
0.0140380859375,
0.0081329345703125,
-0.04412841796875,
-0.03204345703125,
-0.025909423828125,
-0.051025390625,
-0.032073974609375,
-0.0274200439453125,
-0.01502227783203125,
0.016265869140625,
-0.047210693359375,
-0.03863525390625,
-0.00011527538299560547,
-0.004238128662109375,
0.0006961822509765625,
0.003021240234375,
0.001132965087890625,
-0.0070953369140625,
0.01378631591796875,
0.0110321044921875,
0.007099151611328125,
-0.044769287109375,
-0.0450439453125,
-0.0005140304565429688,
-0.021331787109375,
-0.046966552734375,
0.00138092041015625,
0.0013904571533203125,
0.0260772705078125,
0.0290374755859375,
0.019500732421875,
0.0163116455078125,
0.04638671875,
-0.021484375,
0.00926971435546875,
-0.0106048583984375,
-0.0010776519775390625,
-0.062103271484375,
0.020843505859375,
0.0164031982421875,
-0.027923583984375,
-0.01502227783203125,
-0.0255126953125,
-0.00238037109375,
0.020355224609375,
0.0001761913299560547,
0.01543426513671875,
0.00850677490234375,
-0.0146636962890625,
0.0206756591796875,
0.05902099609375,
-0.032806396484375,
0.026641845703125,
0.031768798828125,
-0.0010614395141601562,
0.058685302734375,
0.045318603515625,
-0.047454833984375,
-0.029266357421875,
0.02386474609375,
0.01256561279296875,
-0.036956787109375,
0.000029981136322021484,
-0.015838623046875,
0.02960205078125,
0.06414794921875,
0.08294677734375,
-0.111328125,
0.0404052734375,
0.035247802734375,
0.0218658447265625,
0.0306549072265625,
-0.00611114501953125,
-0.01537322998046875,
0.005435943603515625,
0.01132965087890625,
0.0153045654296875,
-0.0307769775390625,
0.0105133056640625,
0.046051025390625,
-0.041839599609375,
-0.0091705322265625,
-0.00945281982421875,
0.01407623291015625,
0.03948974609375,
-0.02215576171875,
-0.036834716796875,
0.0133819580078125,
-0.00986480712890625,
0.0207366943359375,
-0.0198822021484375,
-0.034637451171875,
-0.057281494140625,
-0.02801513671875,
0.00582122802734375,
-0.0418701171875,
-0.06622314453125,
0.001163482666015625,
0.0472412109375,
0.0236968994140625,
0.0019273757934570312,
-0.0816650390625,
0.0204620361328125,
0.009307861328125,
0.034088134765625,
-0.0158233642578125,
-0.0095367431640625,
0.026458740234375,
-0.02490234375,
0.0063629150390625,
0.003963470458984375,
0.003452301025390625,
-0.0080108642578125,
0.0035839080810546875,
0.057708740234375,
0.00652313232421875,
-0.0426025390625,
0.020538330078125,
-0.0238037109375,
-0.0109100341796875,
0.003253936767578125,
-0.037628173828125,
0.0012989044189453125,
-0.0224456787109375,
-0.03094482421875,
-0.08331298828125,
0.0283050537109375,
-0.035125732421875,
-0.06201171875,
0.0682373046875,
-0.0015964508056640625,
0.01177978515625,
0.00012034177780151367,
0.04248046875,
-0.0136871337890625,
0.01434326171875,
-0.006175994873046875,
0.0186920166015625,
0.00473785400390625,
0.0193023681640625,
-0.0157470703125,
0.009765625,
0.007205963134765625,
0.0203399658203125,
-0.0226593017578125,
-0.0235443115234375,
-0.00022041797637939453,
0.048248291015625,
0.07806396484375,
0.01751708984375,
0.00739288330078125,
0.022979736328125,
0.0029163360595703125,
0.02435302734375,
0.059234619140625,
-0.0264129638671875,
0.01554107666015625,
0.01465606689453125,
-0.00727081298828125,
0.03466796875,
0.0097198486328125,
0.0159912109375,
-0.01129913330078125,
0.0274810791015625,
0.0279388427734375,
-0.0156707763671875,
-0.0153350830078125,
-0.0071868896484375,
-0.032379150390625,
0.03363037109375,
0.016845703125,
-0.073974609375,
-0.0290985107421875,
-0.033477783203125,
0.0247039794921875,
-0.002323150634765625,
0.0153656005859375,
0.0303802490234375,
0.02105712890625,
0.037506103515625,
0.003299713134765625,
0.018310546875,
0.019500732421875,
0.0008907318115234375,
-0.0050811767578125,
-0.01593017578125,
0.0169525146484375,
0.00498199462890625,
0.07354736328125,
-0.0006923675537109375,
-0.0287017822265625,
-0.029327392578125,
-0.01245880126953125,
0.0193023681640625,
0.032440185546875,
0.0096893310546875,
-0.020843505859375,
0.028594970703125,
-0.0484619140625,
0.0015039443969726562,
-0.041229248046875,
-0.02667236328125,
0.005786895751953125,
0.01389312744140625,
-0.01497650146484375,
0.00942230224609375,
0.0214691162109375,
-0.0307159423828125,
-0.019744873046875,
-0.004886627197265625,
-0.0000013113021850585938,
0.05169677734375,
0.01446533203125,
0.04278564453125,
-0.049041748046875,
-0.02191162109375,
-0.0166473388671875,
0.0027790069580078125,
0.0380859375,
-0.00548553466796875,
0.027557373046875,
0.0350341796875,
0.006103515625,
0.0025634765625,
-0.0014219284057617188,
0.04937744140625,
0.0469970703125,
0.052734375,
0.022613525390625,
-0.001178741455078125,
0.0582275390625,
-0.00797271728515625,
-0.0038852691650390625,
-0.035888671875,
0.0286407470703125,
0.048553466796875,
0.0174407958984375,
-0.00042319297790527344,
-0.01263427734375,
0.07635498046875,
-0.0013971328735351562,
0.036376953125,
-0.004108428955078125,
-0.018829345703125,
-0.017791748046875,
-0.037506103515625,
0.0213165283203125,
0.010284423828125,
-0.05462646484375,
-0.0243682861328125,
0.0171356201171875,
-0.0167999267578125,
0.00920867919921875,
0.0311126708984375,
-0.01314544677734375,
0.018463134765625,
0.002918243408203125,
-0.004520416259765625,
0.02362060546875,
0.00273895263671875,
-0.013153076171875,
0.0143280029296875,
0.0306243896484375,
-0.01369476318359375,
-0.0762939453125,
-0.033905029296875,
0.01024627685546875,
0.0088348388671875,
-0.012054443359375,
-0.011749267578125,
0.03497314453125,
0.0026607513427734375,
-0.02886962890625,
0.01206207275390625,
-0.0305938720703125,
-0.060089111328125,
0.0968017578125,
-0.0199127197265625,
-0.0240936279296875,
0.006992340087890625,
0.042266845703125,
-0.0009002685546875,
0.028594970703125,
-0.0279998779296875,
-0.0234832763671875,
-0.03515625,
0.0248565673828125,
0.00726318359375,
0.0233612060546875,
-0.0087127685546875,
-0.00909423828125,
0.018035888671875,
-0.01059722900390625,
0.0184783935546875,
0.04779052734375,
0.03826904296875,
0.03533935546875,
0.0033721923828125,
0.04840087890625,
0.00965118408203125,
0.0233154296875,
0.015869140625,
0.017578125,
-0.050018310546875,
0.028656005859375,
0.01104736328125,
-0.023468017578125,
0.052032470703125,
-0.00844573974609375,
0.016571044921875,
0.01861572265625,
-0.031982421875,
0.0094451904296875,
-0.019622802734375,
0.018157958984375,
-0.0181427001953125,
-0.00183868408203125,
-0.01287841796875,
0.025634765625,
-0.002521514892578125,
-0.007183074951171875,
-0.015625,
-0.032196044921875,
0.0155029296875,
0.0010690689086914062,
0.0279998779296875,
-0.00933074951171875,
0.02764892578125,
-0.0106964111328125,
-0.0021419525146484375,
0.003086090087890625,
-0.0360107421875,
0.0008764266967773438,
0.0200347900390625,
0.01141357421875,
-0.016876220703125,
-0.04632568359375,
-0.002269744873046875,
-0.0270843505859375,
-0.02813720703125,
-0.040618896484375,
-0.04534912109375,
0.0250091552734375,
-0.01369476318359375,
0.04132080078125,
0.06707763671875,
-0.01149749755859375,
-0.08447265625,
0.0467529296875,
-0.007266998291015625,
0.10162353515625,
-0.0244293212890625,
-0.00832366943359375,
0.00865936279296875,
0.01336669921875,
-0.0265960693359375,
-0.036865234375,
-0.00170135498046875,
-0.005382537841796875,
-0.01169586181640625,
-0.00946044921875,
-0.0248870849609375,
-0.01465606689453125,
-0.04315185546875,
-0.03857421875,
0.04022216796875,
0.00804901123046875,
-0.02020263671875,
0.015869140625,
-0.01373291015625,
-0.0009541511535644531,
0.0251312255859375,
0.011627197265625,
-0.012481689453125,
-0.042572021484375,
-0.01251220703125,
-0.01293182373046875,
0.06695556640625,
0.00655364990234375,
-0.00701904296875,
-0.0537109375,
-0.041961669921875,
-0.054046630859375,
0.010589599609375,
0.032470703125,
0.0036468505859375,
-0.0113067626953125,
0.018463134765625,
-0.03790283203125,
-0.10845947265625,
-0.05572509765625,
-0.057861328125,
0.01617431640625,
-0.06719970703125,
-0.049407958984375,
-0.060089111328125,
0.02557373046875,
0.032867431640625,
0.01617431640625,
0.0028018951416015625,
0.00531005859375,
0.01303863525390625,
0.0430908203125,
-0.01175689697265625,
-0.01148223876953125,
-0.030853271484375,
-0.02239990234375,
-0.0265350341796875,
-0.048370361328125,
0.02423095703125,
-0.003154754638671875,
-0.052490234375,
0.0258026123046875,
-0.005504608154296875,
-0.0270233154296875,
-0.03826904296875,
-0.0236053466796875,
0.0335693359375,
-0.005645751953125,
0.0249176025390625,
0.0012340545654296875,
0.019439697265625,
0.032318115234375,
0.05889892578125,
0.00007706880569458008,
-0.045684814453125,
-0.0158843994140625,
0.033172607421875,
-0.007293701171875,
0.0181884765625,
-0.0156402587890625,
-0.032470703125,
-0.02154541015625,
0.01399993896484375,
0.014923095703125,
-0.0007762908935546875,
-0.0489501953125,
0.03680419921875,
0.00911712646484375,
0.01265716552734375,
-0.04443359375,
-0.0293426513671875,
-0.0031280517578125,
-0.0131072998046875,
-0.054534912109375,
0.042327880859375,
0.0165863037109375,
-0.039337158203125,
0.009735107421875,
0.0301361083984375,
0.00707244873046875,
-0.03948974609375,
0.030487060546875,
0.0843505859375,
0.0306854248046875,
0.020477294921875
] |
08591f3efe52f4946e56cfb6eac457591ad038a1
|
Wordpress Stackexchange
Q: Orderby menu_order doesn't work My code is:
$sliders = new WP_Query(array('post_type' => 'sliders', 'showposts' => '10', 'orderby' => 'menu_order', 'order' => 'ASC', 'countries'=> 'Default', 'supress_filters' => true, 'meta_query' => array(
But wordpress orderby post_date :(
[query] => Array
(
[post_type] => sliders
[showposts] => 10
[orderby] => menu_order
[order] => ASC
[countries] => ES
[supress_filters] => 1
[meta_query] => Array
(
[0] => Array
(
[key] => _sectors
[value] => 540
[compare] => IN
)
)
)
[request] => SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) JOIN wp_icl_translations t ON wp_posts.ID = t.element_id
AND t.element_type = 'post_sliders' JOIN wp_icl_languages l ON t.language_code=l.code AND l.active=1 WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (16) ) AND wp_posts.post_type = 'sliders' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') AND ( (wp_postmeta.meta_key = '_sectors' AND CAST(wp_postmeta.meta_value AS CHAR) IN ('540')) ) AND t.language_code='es' GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10
A: Use this instead. It worked for me
'sort_column' => 'menu_order'
|
Q: Orderby menu_order doesn't work My code is:
$sliders = new WP_Query(array('post_type' => 'sliders', 'showposts' => '10', 'orderby' => 'menu_order', 'order' => 'ASC', 'countries'=> 'Default', 'supress_filters' => true, 'meta_query' => array(
But wordpress orderby post_date :(
[query] => Array
(
[post_type] => sliders
[showposts] => 10
[orderby] => menu_order
[order] => ASC
[countries] => ES
[supress_filters] => 1
[meta_query] => Array
(
[0] => Array
(
[key] => _sectors
[value] => 540
[compare] => IN
)
)
)
[request] => SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) JOIN wp_icl_translations t ON wp_posts.ID = t.element_id
AND t.element_type = 'post_sliders' JOIN wp_icl_languages l ON t.language_code=l.code AND l.active=1 WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (16) ) AND wp_posts.post_type = 'sliders' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') AND ( (wp_postmeta.meta_key = '_sectors' AND CAST(wp_postmeta.meta_value AS CHAR) IN ('540')) ) AND t.language_code='es' GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10
A: Use this instead. It worked for me
'sort_column' => 'menu_order'
A: First, it's suppress_filters with two P's.
Secondly, 'countries' => 'default' doesn't do anything in a normal query, so I suspect you have something else going on code-wise.
Third, when I do your query with this code
$sliders = new WP_Query(array('post_type' => 'sliders',
'showposts' => '10',
'orderby' => 'menu_order',
'order' => 'ASC',
'countries'=> 'Default',
'suppress_filters' => true,
'meta_query' => array( array(
'key' => '_sectors',
'value' => 540,
'compare' => 'IN',
) ),
) );
I get this result:
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1 AND wp_posts.post_type = 'sliders' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'future' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending' OR wp_posts.post_author = 1 AND wp_posts.post_status = 'private') AND ( (wp_postmeta.meta_key = '_sectors' AND CAST(wp_postmeta.meta_value AS CHAR) IN ('540')) ) GROUP BY wp_posts.ID ORDER BY wp_posts.menu_order ASC LIMIT 0, 10
Notice that the order by menu order is correct.
A: I think (could be wrong) the problem is only pages have menu_order. Also, when you registered the post_type did you set it to 'hierarchical' => true, ?
|
wordpress
|
{
"language": "en",
"length": 351,
"provenance": "stackexchange_00019.jsonl.gz:421073",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56052"
}
|
[
0.054107666015625,
0.0293426513671875,
0.041534423828125,
-0.0207977294921875,
0.038726806640625,
-0.007843017578125,
0.061767578125,
-0.0298309326171875,
0.039398193359375,
0.01432037353515625,
-0.040985107421875,
-0.032867431640625,
-0.0141754150390625,
-0.02734375,
-0.0172271728515625,
-0.038604736328125,
0.0212249755859375,
0.0040435791015625,
0.045135498046875,
0.00838470458984375,
0.01446533203125,
0.0177764892578125,
0.021026611328125,
-0.058929443359375,
0.047332763671875,
-0.0227813720703125,
0.0311279296875,
-0.03692626953125,
0.03948974609375,
-0.0247344970703125,
0.0309906005859375,
-0.00792694091796875,
-0.00025343894958496094,
-0.013671875,
0.048126220703125,
-0.057037353515625,
0.040985107421875,
-0.0254669189453125,
-0.0012531280517578125,
0.026702880859375,
0.02655029296875,
-0.01458740234375,
-0.048828125,
0.041595458984375,
-0.02996826171875,
-0.06585693359375,
0.03704833984375,
-0.0086517333984375,
-0.00017213821411132812,
-0.00632476806640625,
0.0116119384765625,
0.0038242340087890625,
0.0277252197265625,
0.024444580078125,
-0.027496337890625,
-0.01861572265625,
-0.04742431640625,
0.0313720703125,
0.0133209228515625,
0.049591064453125,
0.01824951171875,
0.0195770263671875,
-0.0162506103515625,
-0.039581298828125,
-0.020050048828125,
0.03070068359375,
0.0732421875,
-0.02593994140625,
-0.01340484619140625,
-0.0164031982421875,
0.016448974609375,
0.00441741943359375,
-0.004993438720703125,
-0.01421356201171875,
0.006134033203125,
-0.01690673828125,
-0.0008821487426757812,
-0.0306549072265625,
0.0096282958984375,
0.0457763671875,
0.0096435546875,
0.00844573974609375,
-0.050140380859375,
-0.01861572265625,
-0.00678253173828125,
-0.00797271728515625,
-0.0275726318359375,
-0.0107879638671875,
-0.0263519287109375,
-0.04547119140625,
-0.00681304931640625,
-0.05010986328125,
-0.07293701171875,
0.02239990234375,
0.0261383056640625,
-0.061004638671875,
0.06842041015625,
0.08123779296875,
-0.01611328125,
-0.0247650146484375,
-0.0294189453125,
-0.031097412109375,
-0.02197265625,
-0.0311431884765625,
0.0211334228515625,
0.004673004150390625,
-0.0269012451171875,
-0.01212310791015625,
0.060821533203125,
0.033477783203125,
0.01039886474609375,
0.0301666259765625,
0.01059722900390625,
-0.00093841552734375,
-0.0089874267578125,
-0.036224365234375,
-0.055419921875,
0.037994384765625,
0.0240631103515625,
0.01160430908203125,
-0.02215576171875,
-0.0120086669921875,
0.03326416015625,
0.020904541015625,
0.00502777099609375,
0.0183258056640625,
-0.0101470947265625,
-0.022552490234375,
-0.0274810791015625,
0.037078857421875,
-0.045654296875,
0.007137298583984375,
0.0469970703125,
0.0015172958374023438,
-0.019805908203125,
-0.035919189453125,
-0.01477813720703125,
-0.0345458984375,
-0.01605224609375,
0.0260162353515625,
-0.0049896240234375,
-0.0309600830078125,
0.033477783203125,
0.0173797607421875,
-0.006313323974609375,
-0.0026988983154296875,
0.0042724609375,
0.0169219970703125,
-0.0032806396484375,
-0.0153656005859375,
-0.001010894775390625,
-0.0258331298828125,
0.05999755859375,
0.007564544677734375,
-0.1016845703125,
-0.024749755859375,
0.013153076171875,
-0.04437255859375,
-0.046478271484375,
-0.08026123046875,
0.0105743408203125,
-0.004108428955078125,
-0.0330810546875,
-0.04779052734375,
-0.0531005859375,
-0.0249786376953125,
0.0147552490234375,
0.0038013458251953125,
0.0305938720703125,
0.0272064208984375,
0.0292510986328125,
-0.0269012451171875,
0.038726806640625,
0.022491455078125,
-0.00893402099609375,
0.02777099609375,
0.0007338523864746094,
-0.05926513671875,
0.0270233154296875,
-0.01137542724609375,
-0.033172607421875,
-0.027587890625,
-0.03326416015625,
0.00849151611328125,
-0.0235595703125,
0.03057861328125,
0.00284576416015625,
0.0127410888671875,
0.0086212158203125,
0.006771087646484375,
0.017578125,
0.04290771484375,
-0.076904296875,
0.06158447265625,
0.01087188720703125,
-0.02496337890625,
-0.05364990234375,
-0.006103515625,
-0.00952911376953125,
-0.0209197998046875,
-0.00438690185546875,
0.046630859375,
-0.044189453125,
-0.0021209716796875,
-0.06036376953125,
0.00026702880859375,
-0.01061248779296875,
0.04461669921875,
-0.020355224609375,
0.0151214599609375,
0.031829833984375,
-0.00885772705078125,
-0.02764892578125,
0.01035308837890625,
-0.00933074951171875,
-0.003627777099609375,
-0.0279083251953125,
0.03155517578125,
-0.029266357421875,
0.024658203125,
-0.03765869140625,
-0.047210693359375,
-0.0257415771484375,
0.03631591796875,
-0.007427215576171875,
-0.005462646484375,
-0.015167236328125,
0.00803375244140625,
0.031494140625,
0.00826263427734375,
0.05047607421875,
-0.0038394927978515625,
0.034759521484375,
-0.006328582763671875,
-0.050079345703125,
0.00923919677734375,
0.0146942138671875,
-0.01497650146484375,
0.003231048583984375,
0.03607177734375,
0.04412841796875,
0.0222930908203125,
0.00020778179168701172,
-0.0240936279296875,
0.05419921875,
-0.05133056640625,
0.00864410400390625,
-0.0214385986328125,
-0.033599853515625,
0.0174713134765625,
0.06890869140625,
0.0418701171875,
-0.0016651153564453125,
0.0032482147216796875,
0.0276336669921875,
0.0207977294921875,
-0.0201568603515625,
0.03997802734375,
-0.000030517578125,
-0.00632476806640625,
-0.01279449462890625,
-0.034149169921875,
0.002025604248046875,
-0.019775390625,
0.030120849609375,
0.0027027130126953125,
0.03326416015625,
0.012237548828125,
-0.038604736328125,
0.0110931396484375,
0.020538330078125,
0.0018634796142578125,
0.0174407958984375,
-0.02520751953125,
-0.06463623046875,
0.02337646484375,
-0.002513885498046875,
0.0274658203125,
-0.01491546630859375,
-0.029083251953125,
-0.0018453598022460938,
0.02496337890625,
-0.0242919921875,
-0.01209259033203125,
-0.00997161865234375,
-0.040435791015625,
-0.00717926025390625,
0.0163421630859375,
-0.016082763671875,
-0.0270843505859375,
0.0177764892578125,
0.0089569091796875,
-0.007152557373046875,
0.00389862060546875,
-0.0026721954345703125,
-0.01180267333984375,
0.04656982421875,
-0.0282440185546875,
0.0056915283203125,
-0.0257720947265625,
0.055938720703125,
0.046844482421875,
-0.00429534912109375,
0.00007557868957519531,
0.01035308837890625,
-0.0328369140625,
0.00384521484375,
0.03973388671875,
0.004085540771484375,
-0.037200927734375,
-0.00778961181640625,
0.0190582275390625,
0.036529541015625,
0.0117645263671875,
0.00022780895233154297,
-0.0089111328125,
-0.0189056396484375,
0.000614166259765625,
-0.0655517578125,
-0.0958251953125,
0.01412200927734375,
-0.040130615234375,
0.050750732421875,
-0.0196075439453125,
-0.0096893310546875,
-0.0307769775390625,
-0.001007080078125,
0.0096435546875,
0.0382080078125,
-0.01004791259765625,
-0.0921630859375,
-0.01203155517578125,
-0.06866455078125,
0.0182647705078125,
-0.01505279541015625,
0.006954193115234375,
0.0120391845703125,
0.01361083984375,
-0.005279541015625,
-0.062286376953125,
0.0024623870849609375,
0.036834716796875,
-0.0162811279296875,
0.033203125,
-0.0171966552734375,
-0.005352020263671875,
-0.003208160400390625,
0.00927734375,
0.01004791259765625,
0.009124755859375,
-0.01047515869140625,
0.0031833648681640625,
0.0174560546875,
0.0460205078125,
0.060546875,
-0.0230712890625,
-0.024017333984375,
0.058624267578125,
0.0509033203125,
0.005859375,
-0.0180816650390625,
-0.022857666015625,
-0.0372314453125,
0.0260467529296875,
0.0045013427734375,
0.0291748046875,
0.005825042724609375,
0.015838623046875,
0.007228851318359375,
-0.0019931793212890625,
0.0277252197265625,
-0.03558349609375,
0.0272064208984375,
-0.00116729736328125,
0.0038738250732421875,
-0.035400390625,
0.051177978515625,
-0.0012989044189453125,
-0.049560546875,
0.0007619857788085938,
0.0257110595703125,
0.0059051513671875,
-0.01403045654296875,
-0.037750244140625,
-0.028472900390625,
0.026824951171875,
-0.0262603759765625,
0.004375457763671875,
-0.0095672607421875,
-0.009307861328125,
0.0006852149963378906,
0.0517578125,
-0.0248565673828125,
-0.028472900390625,
0.0074005126953125,
0.0205078125,
-0.01419830322265625,
-0.0220489501953125,
-0.01123046875,
-0.01153564453125,
-0.0362548828125,
0.010894775390625,
0.01898193359375,
-0.034759521484375,
-0.040069580078125,
-0.00234222412109375,
-0.06475830078125,
-0.006732940673828125,
0.03631591796875,
0.01340484619140625,
-0.026123046875,
0.025848388671875,
-0.035400390625,
0.01396942138671875,
-0.027679443359375,
0.018585205078125,
-0.11834716796875,
-0.03082275390625,
0.0225830078125,
0.0692138671875,
-0.00910186767578125,
-0.0287933349609375,
-0.036834716796875,
0.058624267578125,
-0.0282745361328125,
0.0254974365234375,
-0.0128021240234375,
0.03948974609375,
-0.003765106201171875,
-0.0033550262451171875,
-0.0166778564453125,
-0.0362548828125,
-0.0025691986083984375,
0.00858306884765625,
-0.0020618438720703125,
0.041412353515625,
-0.02386474609375,
0.0020580291748046875,
-0.01329803466796875,
-0.03436279296875,
-0.03375244140625,
-0.0279998779296875,
-0.07586669921875,
0.01082611083984375,
-0.04290771484375,
-0.022369384765625,
-0.03485107421875,
-0.07745361328125,
0.01093292236328125,
-0.0018491744995117188,
-0.01666259765625,
0.036590576171875,
0.03936767578125,
-0.00189208984375,
-0.0016689300537109375,
-0.10528564453125,
0.0181427001953125,
0.032196044921875,
0.007274627685546875,
0.05023193359375,
0.0419921875,
-0.030487060546875,
0.06842041015625,
0.035888671875,
-0.0257568359375,
0.0020599365234375,
0.03338623046875,
0.0157012939453125,
-0.00751495361328125,
-0.0089111328125,
-0.004638671875,
0.01145172119140625,
0.02337646484375,
0.0019817352294921875,
-0.06005859375,
-0.0138702392578125,
0.06817626953125,
0.0043182373046875,
0.0304107666015625,
-0.049774169921875,
-0.032501220703125,
0.0199432373046875,
0.0027256011962890625,
0.017974853515625,
-0.005889892578125,
0.031402587890625,
-0.0124359130859375,
0.009063720703125,
0.0439453125,
0.03466796875,
0.046417236328125,
-0.030029296875,
0.029327392578125,
0.06988525390625,
0.00397491455078125,
0.0178375244140625,
-0.0099029541015625,
0.10357666015625,
0.00152587890625,
-0.023590087890625,
-0.0428466796875,
-0.01149749755859375,
0.07806396484375,
0.0178070068359375,
0.004627227783203125,
0.0166473388671875,
-0.0213165283203125,
0.017120361328125,
-0.0030117034912109375,
-0.0027523040771484375,
-0.0155181884765625,
-0.00493621826171875,
0.0130157470703125,
-0.00543212890625,
-0.0036602020263671875,
-0.0654296875,
0.09259033203125,
0.01546478271484375,
0.0150146484375,
-0.0244903564453125,
-0.00579833984375,
-0.05609130859375,
0.032623291015625,
0.01282501220703125,
-0.00180816650390625,
0.034210205078125,
0.0182952880859375,
0.03961181640625,
-0.0232696533203125,
0.01279449462890625,
-0.025543212890625,
-0.022369384765625,
0.03851318359375,
0.0133514404296875,
0.04052734375,
0.0294036865234375,
0.0003514289855957031,
0.02166748046875,
0.01885986328125,
-0.0008511543273925781,
-0.0121307373046875,
-0.0369873046875,
-0.01568603515625,
-0.0002505779266357422,
-0.005672454833984375,
0.03179931640625,
-0.00946044921875,
0.049896240234375,
-0.0225982666015625,
0.0198822021484375,
0.0032634735107421875,
-0.0020198822021484375,
0.005428314208984375,
0.002593994140625,
0.0129241943359375,
-0.054168701171875,
-0.0061798095703125,
-0.013214111328125,
-0.015533447265625,
0.0482177734375,
-0.013916015625,
0.03863525390625,
-0.0180206298828125,
-0.01412200927734375,
-0.004241943359375,
0.019775390625,
0.040435791015625,
0.0162811279296875,
-0.0037822723388671875,
-0.00434112548828125,
-0.06610107421875,
-0.032257080078125,
0.031646728515625,
-0.03460693359375,
-0.01308441162109375,
-0.0283050537109375,
-0.02288818359375,
0.0273284912109375,
-0.0064239501953125,
-0.01812744140625,
-0.02215576171875,
-0.0161285400390625,
-0.00047278404235839844,
0.0092620849609375,
-0.006366729736328125,
0.08575439453125,
-0.0239715576171875,
0.063232421875,
0.00557708740234375,
0.022369384765625,
-0.04669189453125,
0.0107879638671875,
-0.0029449462890625,
-0.0098419189453125,
-0.01336669921875,
0.0150604248046875,
-0.0201568603515625,
-0.01444244384765625,
0.0284576416015625,
-0.00304412841796875,
0.0628662109375,
-0.0232086181640625,
-0.003986358642578125,
-0.0171661376953125,
-0.01155853271484375,
-0.0313720703125,
0.04644775390625,
0.036163330078125,
-0.0301361083984375,
0.00197601318359375,
-0.00823211669921875,
0.01490020751953125,
0.0097198486328125,
-0.038482666015625,
0.01549530029296875,
0.0220184326171875,
-0.00933074951171875,
0.00403594970703125,
0.043701171875,
0.039520263671875,
0.0455322265625,
-0.0009379386901855469,
0.044158935546875,
0.004917144775390625,
-0.023101806640625,
0.0201873779296875,
0.04498291015625,
0.027557373046875,
-0.042510986328125,
-0.004741668701171875,
-0.00896453857421875,
-0.0183868408203125,
0.0176544189453125,
0.01265716552734375,
0.0203399658203125,
-0.0379638671875,
0.0017404556274414062,
0.015838623046875,
-0.01027679443359375,
-0.006145477294921875,
-0.006076812744140625,
-0.022247314453125,
-0.0260009765625,
0.042388916015625,
-0.007289886474609375,
-0.025390625,
0.018646240234375,
0.0054931640625,
-0.0182037353515625,
0.00980377197265625,
-0.00022733211517333984,
0.0115814208984375,
-0.012847900390625,
-0.0227813720703125,
0.00746917724609375,
-0.00098419189453125,
-0.05474853515625,
0.0175933837890625,
0.02056884765625,
-0.008056640625,
-0.10791015625,
0.0226287841796875,
0.004810333251953125,
0.0030612945556640625,
0.006683349609375,
-0.042205810546875,
0.0165863037109375,
0.00087738037109375,
-0.01296234130859375,
-0.0176849365234375,
-0.0120849609375,
-0.019927978515625,
-0.011932373046875,
-0.00473785400390625,
0.01552581787109375,
0.00506591796875,
-0.0007777214050292969,
0.018280029296875,
-0.005420684814453125,
-0.03955078125,
-0.0186004638671875,
-0.0249176025390625,
0.04388427734375,
-0.024139404296875,
-0.00439453125,
0.0264129638671875,
0.04559326171875,
-0.023040771484375,
0.0005888938903808594,
0.0357666015625,
-0.065185546875,
-0.04669189453125,
0.0254364013671875,
-0.02734375,
-0.0218353271484375,
0.004863739013671875,
-0.0760498046875,
0.06939697265625,
-0.028228759765625,
0.0251922607421875,
-0.0022983551025390625,
0.03564453125,
-0.0231781005859375,
-0.008544921875,
-0.006229400634765625,
0.07403564453125,
-0.01131439208984375,
0.033599853515625,
-0.04461669921875,
-0.004665374755859375,
0.0256195068359375,
0.048004150390625,
0.031463623046875,
0.01180267333984375,
-0.0841064453125,
-0.0110931396484375,
0.061859130859375,
0.05499267578125,
0.036285400390625,
0.06597900390625,
0.00624847412109375,
0.07586669921875,
0.042510986328125,
-0.0462646484375,
0.03369140625,
-0.0042724609375,
-0.044769287109375,
0.03436279296875,
-0.00006377696990966797,
0.006282806396484375,
0.006031036376953125,
-0.00662994384765625,
-0.0323486328125,
0.0016565322875976562,
0.0280609130859375,
-0.03631591796875,
0.039031982421875,
-0.025177001953125,
0.01248931884765625,
-0.033477783203125,
-0.052520751953125,
0.006298065185546875,
0.019134521484375,
0.0218658447265625,
0.0318603515625,
0.037872314453125,
0.0218048095703125,
0.036102294921875,
-0.032318115234375,
0.0117950439453125,
-0.01114654541015625,
-0.0343017578125,
0.01415252685546875,
0.0038776397705078125,
0.022491455078125,
-0.0242462158203125,
0.0109405517578125,
0.036407470703125,
0.0296783447265625,
-0.035369873046875,
-0.016510009765625,
0.0149078369140625,
0.01015472412109375,
-0.019805908203125,
0.0132598876953125,
-0.0012178421020507812,
0.0182037353515625,
0.051513671875,
-0.00624847412109375,
0.0007252693176269531,
-0.01293182373046875,
0.031890869140625,
-0.0196380615234375,
-0.00673675537109375,
-0.02099609375,
0.00860595703125,
-0.07086181640625,
0.048614501953125,
0.05072021484375,
0.06689453125,
-0.0384521484375,
0.10589599609375,
-0.035919189453125,
-0.0138397216796875,
-0.005535125732421875,
0.000705718994140625,
-0.016265869140625,
0.00931549072265625,
-0.0499267578125,
-0.04559326171875,
-0.00113677978515625,
0.051116943359375,
0.01461029052734375,
-0.00445556640625,
0.04022216796875,
0.049560546875,
-0.0233001708984375,
-0.005222320556640625,
0.035858154296875,
-0.01629638671875,
-0.0819091796875,
-0.014495849609375,
0.033477783203125,
0.07147216796875,
0.0290985107421875,
0.026641845703125,
0.0516357421875,
0.03924560546875,
-0.0162200927734375,
0.0419921875,
0.003387451171875,
0.01000213623046875,
0.03314208984375,
0.0182037353515625,
0.034637451171875,
0.024688720703125,
-0.0635986328125,
-0.00560760498046875,
-0.03729248046875,
-0.00928497314453125,
0.0197906494140625,
0.03411865234375,
0.00004404783248901367,
0.00678253173828125,
0.036712646484375,
-0.044769287109375,
0.004886627197265625,
0.020782470703125,
0.0288848876953125,
0.00009948015213012695,
0.0019702911376953125,
0.008544921875,
-0.03399658203125,
-0.0024852752685546875,
-0.007389068603515625,
0.0031681060791015625,
0.00763702392578125,
-0.02081298828125,
0.052734375,
0.03741455078125,
-0.034881591796875,
0.003093719482421875,
-0.00995635986328125,
-0.0263214111328125,
0.0252532958984375,
0.0240936279296875,
-0.01103973388671875,
-0.0171051025390625,
0.043182373046875,
-0.028564453125,
0.0760498046875,
-0.04345703125,
-0.030670166015625,
-0.0230560302734375,
0.0300140380859375,
-0.024871826171875,
-0.00841522216796875,
-0.0239410400390625,
-0.006366729736328125,
-0.016448974609375,
-0.016998291015625,
0.032684326171875,
0.044677734375,
0.042755126953125,
0.0034961700439453125,
-0.03839111328125,
-0.045562744140625,
0.047332763671875,
-0.0253143310546875,
0.07574462890625,
0.0283203125,
-0.045501708984375,
0.060211181640625,
-0.00408172607421875,
-0.00650787353515625,
0.007099151611328125,
0.0310821533203125,
-0.05291748046875,
0.01137542724609375,
0.0100860595703125,
-0.0186309814453125,
0.04296875,
0.04888916015625,
-0.00418853759765625,
0.036590576171875,
0.0220184326171875,
-0.03924560546875,
-0.006519317626953125,
0.054779052734375,
-0.03314208984375,
0.0189361572265625,
0.0299835205078125,
-0.00345611572265625,
0.047943115234375,
0.004291534423828125,
-0.022918701171875,
-0.01006317138671875,
0.0002574920654296875,
-0.00382232666015625,
-0.021820068359375,
0.019012451171875,
-0.0097198486328125,
-0.024810791015625,
-0.0028400421142578125,
-0.0250701904296875,
-0.007080078125,
-0.007175445556640625,
-0.00923919677734375,
0.021331787109375,
-0.043182373046875,
-0.006641387939453125,
0.0004429817199707031,
-0.005496978759765625,
0.024017333984375,
-0.0014886856079101562,
-0.033905029296875,
-0.01142120361328125,
-0.0086822509765625,
0.01134490966796875,
0.0276031494140625,
-0.003284454345703125,
0.0255126953125,
0.00222015380859375,
-0.0506591796875,
-0.056671142578125,
0.0179901123046875,
-0.06317138671875,
0.006084442138671875,
-0.01433563232421875,
0.048431396484375,
0.060760498046875,
-0.02008056640625,
-0.097900390625,
0.0711669921875,
-0.0399169921875,
-0.0282440185546875,
-0.055633544921875,
-0.002227783203125,
0.0020542144775390625,
0.007442474365234375,
-0.00856781005859375,
-0.0204315185546875,
-0.037689208984375,
0.0396728515625,
-0.0110931396484375,
0.022705078125,
0.0168304443359375,
-0.017852783203125,
-0.04364013671875,
-0.01029205322265625,
-0.003917694091796875,
0.0087432861328125,
-0.0158233642578125,
-0.0088653564453125,
0.00225830078125,
-0.01024627685546875,
-0.0340576171875,
-0.0185699462890625,
0.0223388671875,
0.03118896484375,
0.0112152099609375,
-0.044189453125,
-0.03009033203125,
-0.00960540771484375,
0.004383087158203125,
0.015625,
0.005340576171875,
-0.01971435546875,
-0.004657745361328125,
-0.0301055908203125,
0.00429534912109375,
-0.0249786376953125,
0.0181427001953125,
-0.057769775390625,
-0.021148681640625,
0.01163482666015625,
0.0035037994384765625,
0.0036106109619140625,
-0.01537322998046875,
0.01172637939453125,
-0.015106201171875,
0.0198211669921875,
0.00637054443359375,
-0.0400390625,
0.0516357421875,
0.042449951171875,
-0.046356201171875,
-0.025909423828125,
-0.0206298828125,
-0.0049896240234375,
0.002864837646484375,
-0.05328369140625,
-0.0200347900390625,
0.00302886962890625,
0.0389404296875,
-0.0087890625,
0.024627685546875,
0.0033092498779296875,
0.05242919921875,
0.01375579833984375,
-0.021759033203125,
0.012176513671875,
0.0173797607421875,
0.00009262561798095703,
-0.033782958984375,
0.0186614990234375,
0.01511383056640625,
0.0284881591796875,
-0.02362060546875,
0.07354736328125,
0.022308349609375,
0.0156402587890625,
0.0219573974609375,
-0.006710052490234375,
0.0701904296875,
-0.01018524169921875,
0.00662994384765625,
-0.0136871337890625,
-0.00913238525390625,
-0.0214996337890625,
0.0061492919921875,
-0.01122283935546875,
-0.027313232421875,
0.01251983642578125
] |
eb0e7ca5f701204a662057382cd6a957b9a02355
|
Wordpress Stackexchange
Q: How to query post by user role? I want to query posts by their author role. And do something with the post based on the role.
I know we can get the post by get_posts or WP_query, the problem is there are no argument to sort the post based on the author role. Or, we also can combine get_users and get_posts together, like this
$users = get_users(array(role => 'author'));
foreach($users as $user){
//here we can use get_posts to query the posts by the $user->ID
} .....
this is too clumsy to doing this. I want to know if there any other way to query the posts based on the role, SQL query perhaps?
A: try this
create a function to alter the query's where clause:
function authors_where_filter( $where ) {
global $wpdb;
$ids = get_users(array('role' => 'author' ,'fields' => 'ID'));
$where .= " AND post_author IN ($ids)";
return $where;
}
and then before you query just hook it ex:
add_filter('posts_where','authors_where_filter');
$all_posts = new WP_Query(array('posts_per_page' => -1 .....
remove_filter('posts_where');
and you should get all posts of author users in a single query, (well two actually one to get the users and the other is to get the posts)
|
Q: How to query post by user role? I want to query posts by their author role. And do something with the post based on the role.
I know we can get the post by get_posts or WP_query, the problem is there are no argument to sort the post based on the author role. Or, we also can combine get_users and get_posts together, like this
$users = get_users(array(role => 'author'));
foreach($users as $user){
//here we can use get_posts to query the posts by the $user->ID
} .....
this is too clumsy to doing this. I want to know if there any other way to query the posts based on the role, SQL query perhaps?
A: try this
create a function to alter the query's where clause:
function authors_where_filter( $where ) {
global $wpdb;
$ids = get_users(array('role' => 'author' ,'fields' => 'ID'));
$where .= " AND post_author IN ($ids)";
return $where;
}
and then before you query just hook it ex:
add_filter('posts_where','authors_where_filter');
$all_posts = new WP_Query(array('posts_per_page' => -1 .....
remove_filter('posts_where');
and you should get all posts of author users in a single query, (well two actually one to get the users and the other is to get the posts)
A: First get the user id's by role with a function:
function author_ids_by_role() {
$ids = get_users(array('role' => 'author' ,'fields' => 'ID'));
return $ids;
}
Then in your query you can use this array of user id's as the following:
$role_ids = author_ids_by_role();
$args = array(
"post_count" => -1,
"posts_per_page" => 10,
"post_type" => "my_custom_posttype",
"author__in" => $role_ids
);
If you want to query the post by role of your current user. Use the following function instead:
function author_ids_by_role() {
global $current_user;
$user_roles = $current_user->roles;
$user_role = array_shift($user_roles);
$ids = get_users(array('role' => $user_role ,'fields' => 'ID'));
return $ids;
}
Be aware that this last function only works when users got only 1 role.
A: You can use Roles and Capabilitied check by deploying function:
current_user_can( $capability );
For example:
if(current_user_can('read') && !current_user_can('edit_posts')){
//code for subscribers...
}
else if(current_user_can('edit_posts') && !current_user_can('edit_pages')){
//code for authors...
}
else if(current_user_can('edit_pages') && !current_user_can('delete_themes')){
//code for editors....
}
else {
//code for admins...
}
You will have one more check if you use multi-site for super admins.
Note that you have to use two checks because without other check, some user would get multiple queryes.
A: I haven't really messed around with custom post queries before, but here is my try at a solution:
function get_posts_by_author_role($role) {
global $wpdb;
return $wpdb->get_results( "SELECT p.* FROM {$wpdb->posts} p, {$wpdb->usermeta} u"
." WHERE p.post_type = 'post'"
." AND p.post_status = 'publish'"
." AND u.user_id = p.`post_author`"
." AND u.meta_key = 'wp_capabilities'"
." AND u.meta_value LIKE '%\"{$role}\"%'" );
}
This function will return posts only if their author has the role specified.
It is tested and working on my local install of 3.4, but let me know if you are having any problems with it.
I hope this helps.
Example Usage:
$posts = get_posts_by_author_role('author');
foreach($posts as $post) echo $post->post_title, '<br />';
|
wordpress
|
{
"language": "en",
"length": 499,
"provenance": "stackexchange_00019.jsonl.gz:421077",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56071"
}
|
[
0.06854248046875,
-0.01206207275390625,
0.03436279296875,
-0.0104217529296875,
0.01242828369140625,
-0.02154541015625,
0.07464599609375,
-0.030670166015625,
-0.005817413330078125,
0.062469482421875,
-0.0085296630859375,
0.006557464599609375,
-0.002105712890625,
-0.00921630859375,
-0.043426513671875,
-0.007190704345703125,
0.0013523101806640625,
-0.00307464599609375,
-0.00772857666015625,
-0.0271759033203125,
0.0114288330078125,
-0.0219268798828125,
-0.00025773048400878906,
0.01552581787109375,
0.0272979736328125,
0.01849365234375,
0.06634521484375,
-0.0230865478515625,
0.0290985107421875,
-0.0163116455078125,
0.0204925537109375,
-0.034912109375,
-0.0139007568359375,
0.0028934478759765625,
0.0416259765625,
-0.001010894775390625,
-0.04571533203125,
0.0259552001953125,
0.031219482421875,
-0.01062774658203125,
0.00469207763671875,
0.001537322998046875,
-0.07073974609375,
0.0443115234375,
-0.05108642578125,
-0.0670166015625,
0.031951904296875,
-0.00286865234375,
0.053985595703125,
-0.0036220550537109375,
-0.002147674560546875,
0.0014219284057617188,
0.01175689697265625,
-0.0160980224609375,
-0.037353515625,
-0.0172119140625,
0.01203155517578125,
0.0098114013671875,
0.040557861328125,
-0.05706787109375,
-0.05096435546875,
-0.022491455078125,
0.0506591796875,
0.00186920166015625,
-0.0207977294921875,
0.018157958984375,
0.057098388671875,
0.00341796875,
-0.0386962890625,
-0.0347900390625,
0.016082763671875,
-0.0096588134765625,
-0.021575927734375,
0.027679443359375,
-0.050628662109375,
-0.02618408203125,
0.003582000732421875,
-0.04144287109375,
0.030059814453125,
0.0169525146484375,
-0.031036376953125,
0.0061187744140625,
-0.05230712890625,
-0.002166748046875,
-0.0223236083984375,
-0.00012445449829101562,
-0.019805908203125,
-0.0023975372314453125,
-0.052734375,
-0.0182037353515625,
-0.0240020751953125,
-0.046783447265625,
-0.0780029296875,
0.023712158203125,
0.008575439453125,
-0.012481689453125,
0.04388427734375,
0.05682373046875,
0.00678253173828125,
-0.0194091796875,
-0.00743865966796875,
-0.037811279296875,
-0.0340576171875,
-0.02142333984375,
0.02001953125,
0.035369873046875,
0.008880615234375,
0.043212890625,
0.049346923828125,
0.03997802734375,
0.0220489501953125,
-0.01029205322265625,
-0.01268768310546875,
-0.00012195110321044922,
-0.04693603515625,
0.01204681396484375,
-0.037994384765625,
-0.004253387451171875,
-0.00145721435546875,
0.001827239990234375,
-0.00489044189453125,
0.017669677734375,
0.0110931396484375,
-0.032806396484375,
-0.0042266845703125,
-0.0266571044921875,
-0.0230865478515625,
-0.026519775390625,
-0.00934600830078125,
0.0191192626953125,
-0.0256500244140625,
0.003482818603515625,
0.048126220703125,
0.03607177734375,
0.0017023086547851562,
-0.0301971435546875,
0.0234375,
-0.013458251953125,
0.019866943359375,
0.010223388671875,
0.01515960693359375,
-0.042205810546875,
-0.01486968994140625,
0.03350830078125,
0.0078582763671875,
0.000013947486877441406,
0.01617431640625,
0.0166778564453125,
0.0006670951843261719,
0.005496978759765625,
-0.052703857421875,
0.057830810546875,
0.0025882720947265625,
0.0110626220703125,
0.06524658203125,
-0.01119232177734375,
0.04986572265625,
-0.03533935546875,
0.020538330078125,
-0.00490570068359375,
0.052337646484375,
0.02459716796875,
0.0184478759765625,
0.00013780593872070312,
-0.037353515625,
-0.03515625,
-0.058441162109375,
-0.00995635986328125,
0.0124359130859375,
-0.04241943359375,
0.004428863525390625,
-0.0243682861328125,
0.006404876708984375,
0.0126190185546875,
0.01031494140625,
0.056182861328125,
-0.00957489013671875,
0.00928497314453125,
-0.0030078887939453125,
0.01837158203125,
-0.01033782958984375,
-0.03912353515625,
-0.015899658203125,
0.01364898681640625,
-0.039825439453125,
0.03082275390625,
0.00528717041015625,
0.01100921630859375,
0.0070953369140625,
0.01532745361328125,
0.0298309326171875,
0.06512451171875,
-0.0165252685546875,
-0.0034236907958984375,
0.00018155574798583984,
-0.05322265625,
0.018585205078125,
-0.029327392578125,
0.004169464111328125,
0.0384521484375,
0.06341552734375,
-0.01165771484375,
0.01690673828125,
-0.039154052734375,
-0.07568359375,
-0.0004260540008544922,
-0.026458740234375,
0.0217132568359375,
0.00370025634765625,
0.0229644775390625,
0.0225677490234375,
0.04620361328125,
-0.056976318359375,
-0.011474609375,
-0.0200042724609375,
0.0194091796875,
0.01509857177734375,
0.0204010009765625,
0.01222991943359375,
0.0153350830078125,
0.0082244873046875,
-0.01210784912109375,
-0.01904296875,
0.007110595703125,
0.0718994140625,
-0.029541015625,
0.005588531494140625,
-0.041046142578125,
0.056182861328125,
-0.006641387939453125,
-0.021820068359375,
0.01438140869140625,
0.0587158203125,
0.058502197265625,
-0.0193328857421875,
0.0164947509765625,
0.01751708984375,
-0.01346588134765625,
-0.00873565673828125,
0.0289459228515625,
0.0328369140625,
0.040802001953125,
0.003265380859375,
-0.0019626617431640625,
0.022735595703125,
-0.060089111328125,
0.00817108154296875,
-0.0129241943359375,
0.0261688232421875,
0.0809326171875,
-0.01287841796875,
-0.005756378173828125,
0.003620147705078125,
-0.0281219482421875,
0.004184722900390625,
0.036590576171875,
-0.0032978057861328125,
0.052581787109375,
-0.0267486572265625,
-0.002719879150390625,
-0.0254669189453125,
-0.043426513671875,
0.015167236328125,
-0.032073974609375,
-0.00814056396484375,
-0.023162841796875,
-0.00490570068359375,
-0.010772705078125,
-0.0215911865234375,
-0.03131103515625,
0.0282745361328125,
-0.0061798095703125,
0.0021266937255859375,
0.005374908447265625,
-0.050018310546875,
-0.0145263671875,
-0.019378662109375,
0.01233673095703125,
-0.0096588134765625,
-0.019317626953125,
-0.0006384849548339844,
0.017822265625,
0.02197265625,
-0.00039887428283691406,
0.00010162591934204102,
-0.0106353759765625,
0.034820556640625,
0.023193359375,
0.0086669921875,
-0.004657745361328125,
0.0301361083984375,
0.0152130126953125,
-0.0031871795654296875,
0.050262451171875,
-0.0257720947265625,
-0.007091522216796875,
-0.00798797607421875,
-0.07122802734375,
0.043853759765625,
-0.037933349609375,
0.040374755859375,
0.06781005859375,
0.023193359375,
0.0032444000244140625,
0.00441741943359375,
-0.0309295654296875,
-0.004482269287109375,
0.021087646484375,
-0.0028820037841796875,
-0.03485107421875,
0.00112152099609375,
0.048828125,
0.0257720947265625,
0.021728515625,
0.0028400421142578125,
-0.01270294189453125,
-0.00691986083984375,
0.0227203369140625,
-0.04815673828125,
-0.051116943359375,
0.030059814453125,
-0.07952880859375,
-0.019439697265625,
0.0023632049560546875,
-0.04766845703125,
-0.00519561767578125,
0.023681640625,
-0.0212249755859375,
0.01763916015625,
0.01678466796875,
-0.07763671875,
0.006549835205078125,
-0.0643310546875,
0.0657958984375,
-0.01372528076171875,
0.0244903564453125,
0.0024089813232421875,
0.069580078125,
0.016326904296875,
-0.0491943359375,
-0.0164794921875,
0.038330078125,
-0.042694091796875,
-0.02899169921875,
-0.007427215576171875,
0.03204345703125,
-0.0014543533325195312,
0.0023212432861328125,
0.01293182373046875,
0.00829315185546875,
-0.0215301513671875,
-0.0175323486328125,
0.019989013671875,
0.010986328125,
0.05987548828125,
-0.0192718505859375,
-0.045196533203125,
0.0489501953125,
0.056640625,
-0.0142974853515625,
-0.016082763671875,
-0.0277557373046875,
-0.04461669921875,
0.039031982421875,
0.010833740234375,
0.00799560546875,
-0.002780914306640625,
0.016876220703125,
0.047454833984375,
0.01593017578125,
-0.04339599609375,
-0.00592041015625,
0.050079345703125,
0.051300048828125,
0.08563232421875,
0.0193328857421875,
-0.00687408447265625,
-0.031280517578125,
-0.0003483295440673828,
-0.01910400390625,
0.0187530517578125,
0.0033817291259765625,
-0.004688262939453125,
-0.0218505859375,
-0.034881591796875,
0.07025146484375,
0.0310821533203125,
-0.0034236907958984375,
-0.01025390625,
-0.044219970703125,
-0.0076446533203125,
0.08404541015625,
0.0022525787353515625,
-0.017486572265625,
-0.00577545166015625,
0.0049896240234375,
-0.0455322265625,
-0.018402099609375,
-0.02813720703125,
0.004878997802734375,
-0.04827880859375,
-0.0083770751953125,
-0.038238525390625,
0.00823974609375,
-0.036895751953125,
0.0229339599609375,
-0.036590576171875,
-0.0287017822265625,
0.04278564453125,
-0.06396484375,
0.0239715576171875,
0.014068603515625,
-0.0196685791015625,
-0.005313873291015625,
-0.032562255859375,
-0.0306549072265625,
-0.091552734375,
-0.01837158203125,
0.00153350830078125,
0.0526123046875,
-0.0125732421875,
0.0163726806640625,
-0.0224609375,
0.036224365234375,
0.0037746429443359375,
0.030975341796875,
0.0017595291137695312,
0.00922393798828125,
0.027679443359375,
-0.0312347412109375,
-0.011199951171875,
-0.0313720703125,
-0.0001080632209777832,
-0.0257415771484375,
0.0219268798828125,
-0.0236663818359375,
-0.08013916015625,
-0.0396728515625,
-0.07025146484375,
-0.006183624267578125,
-0.059783935546875,
-0.0178375244140625,
0.004550933837890625,
0.0180511474609375,
-0.0281829833984375,
0.027618408203125,
-0.02801513671875,
-0.0589599609375,
0.070068359375,
0.0109710693359375,
-0.00390625,
-0.01593017578125,
0.068359375,
0.011749267578125,
-0.05316162109375,
-0.002597808837890625,
-0.02789306640625,
0.020904541015625,
-0.017822265625,
0.053955078125,
0.05206298828125,
-0.01187896728515625,
0.00801849365234375,
0.00783538818359375,
-0.01239013671875,
-0.0300140380859375,
0.041961669921875,
0.000965118408203125,
-0.0166473388671875,
0.025909423828125,
-0.0200042724609375,
0.032196044921875,
0.015045166015625,
-0.0033550262451171875,
-0.0241851806640625,
0.038116455078125,
0.058349609375,
-0.0151519775390625,
-0.007045745849609375,
-0.043060302734375,
-0.034332275390625,
0.0017042160034179688,
-0.00901031494140625,
0.023040771484375,
0.0295257568359375,
0.0004856586456298828,
0.0036716461181640625,
0.0023708343505859375,
0.0081329345703125,
-0.01256561279296875,
0.030792236328125,
-0.026885986328125,
0.059600830078125,
-0.044952392578125,
-0.01117706298828125,
-0.0236053466796875,
-0.01201629638671875,
0.049407958984375,
0.0139007568359375,
-0.035614013671875,
0.0660400390625,
-0.042266845703125,
0.0268402099609375,
0.0275726318359375,
-0.011383056640625,
0.03192138671875,
0.0276031494140625,
-0.0007109642028808594,
-0.0122528076171875,
-0.035186767578125,
0.005046844482421875,
-0.0340576171875,
0.0191802978515625,
-0.022247314453125,
0.00772857666015625,
0.00469970703125,
0.06378173828125,
-0.006072998046875,
0.047332763671875,
-0.0286865234375,
0.050567626953125,
-0.00006604194641113281,
0.030364990234375,
-0.004425048828125,
0.0218963623046875,
0.01500701904296875,
0.01030731201171875,
0.002712249755859375,
-0.034698486328125,
-0.0011720657348632812,
0.035430908203125,
0.0280914306640625,
0.024566650390625,
-0.0140533447265625,
-0.005275726318359375,
-0.01413726806640625,
-0.00978851318359375,
0.053070068359375,
0.03582763671875,
-0.038818359375,
-0.0302734375,
-0.00649261474609375,
0.0228424072265625,
-0.01629638671875,
-0.01058197021484375,
-0.00962066650390625,
-0.0013647079467773438,
0.036712646484375,
-0.0030879974365234375,
0.006694793701171875,
0.0017786026000976562,
-0.002094268798828125,
-0.0192413330078125,
-0.036590576171875,
-0.01110076904296875,
0.0295257568359375,
0.0191497802734375,
-0.021728515625,
-0.03472900390625,
0.036773681640625,
-0.0002741813659667969,
0.0272064208984375,
-0.038818359375,
-0.0128021240234375,
-0.01110076904296875,
-0.0143890380859375,
0.08306884765625,
0.031341552734375,
-0.04559326171875,
0.0172271728515625,
-0.061859130859375,
-0.00574493408203125,
0.0125274658203125,
-0.014923095703125,
-0.047332763671875,
-0.017974853515625,
0.005901336669921875,
0.0182037353515625,
-0.0030918121337890625,
-0.033538818359375,
-0.022979736328125,
-0.031402587890625,
0.004962921142578125,
-0.0203704833984375,
0.00653839111328125,
0.06585693359375,
-0.01461029052734375,
0.04193115234375,
0.01380157470703125,
0.033355712890625,
-0.0300445556640625,
-0.0205535888671875,
0.01055908203125,
-0.0693359375,
-0.0268096923828125,
0.0015344619750976562,
-0.03863525390625,
-0.006744384765625,
0.00966644287109375,
-0.01270294189453125,
0.028167724609375,
-0.010040283203125,
0.0030078887939453125,
-0.01751708984375,
-0.056793212890625,
-0.0090484619140625,
0.020538330078125,
0.004482269287109375,
0.005107879638671875,
0.0134124755859375,
-0.04217529296875,
-0.0182037353515625,
-0.006824493408203125,
-0.00421142578125,
-0.0157470703125,
0.0233917236328125,
-0.01384735107421875,
0.012451171875,
0.058563232421875,
0.0008368492126464844,
0.03594970703125,
0.0257720947265625,
0.0241546630859375,
0.01806640625,
-0.034912109375,
0.009033203125,
0.047454833984375,
0.036376953125,
-0.00876617431640625,
0.017578125,
0.0166473388671875,
-0.0255126953125,
-0.006076812744140625,
0.009918212890625,
0.02435302734375,
-0.04571533203125,
0.0199737548828125,
0.0074920654296875,
0.01317596435546875,
0.021331787109375,
-0.01500701904296875,
0.00264739990234375,
-0.03955078125,
0.04327392578125,
0.0097808837890625,
-0.004608154296875,
0.00997161865234375,
-0.0205078125,
-0.0033111572265625,
-0.038330078125,
0.057037353515625,
0.00995635986328125,
-0.016448974609375,
0.03314208984375,
0.024627685546875,
0.00884246826171875,
-0.007213592529296875,
0.0003523826599121094,
0.0179290771484375,
-0.01010894775390625,
-0.0806884765625,
0.0037841796875,
-0.039337158203125,
-0.01708984375,
0.01357269287109375,
-0.011383056640625,
0.0259857177734375,
0.041229248046875,
-0.00374603271484375,
-0.0180816650390625,
0.037841796875,
-0.078125,
-0.0584716796875,
-0.051055908203125,
-0.0031185150146484375,
0.0438232421875,
-0.050689697265625,
0.0413818359375,
-0.01032257080078125,
-0.02789306640625,
-0.0039215087890625,
-0.048309326171875,
0.017791748046875,
-0.031341552734375,
-0.003635406494140625,
0.02642822265625,
0.0180511474609375,
-0.01009368896484375,
0.016357421875,
-0.003124237060546875,
-0.04052734375,
-0.02252197265625,
0.01467132568359375,
-0.022918701171875,
0.0092620849609375,
0.01306915283203125,
-0.05706787109375,
0.043853759765625,
0.0012178421020507812,
0.035400390625,
0.0230560302734375,
0.0028076171875,
-0.022308349609375,
-0.030029296875,
-0.0467529296875,
0.072265625,
0.00652313232421875,
0.05059814453125,
-0.040313720703125,
0.00901031494140625,
0.0168914794921875,
0.0172882080078125,
0.088134765625,
0.021087646484375,
-0.041259765625,
-0.01800537109375,
0.037872314453125,
0.03375244140625,
-0.00783538818359375,
0.052642822265625,
0.0165557861328125,
0.04144287109375,
0.03607177734375,
-0.0140228271484375,
0.06390380859375,
-0.0357666015625,
-0.0223541259765625,
0.029022216796875,
0.023651123046875,
0.0222320556640625,
0.0300140380859375,
0.01007843017578125,
-0.03509521484375,
0.008453369140625,
0.044219970703125,
-0.03863525390625,
0.03070068359375,
0.032257080078125,
0.0731201171875,
-0.050201416015625,
-0.04534912109375,
-0.01556396484375,
0.050079345703125,
0.034393310546875,
0.004489898681640625,
0.0421142578125,
0.0228729248046875,
0.03778076171875,
-0.0111541748046875,
0.016387939453125,
0.0117034912109375,
-0.01486968994140625,
0.057220458984375,
0.027069091796875,
0.0272369384765625,
-0.034637451171875,
0.023529052734375,
0.034027099609375,
0.0638427734375,
-0.056549072265625,
-0.0246429443359375,
0.0196075439453125,
-0.0027141571044921875,
-0.00962066650390625,
0.006145477294921875,
-0.00592041015625,
-0.00685882568359375,
0.0177001953125,
-0.051513671875,
0.0069732666015625,
-0.002178192138671875,
-0.002880096435546875,
-0.032562255859375,
-0.016571044921875,
0.0157623291015625,
0.01514434814453125,
-0.01448822021484375,
-0.04705810546875,
0.004634857177734375,
0.0015954971313476562,
0.044097900390625,
-0.023895263671875,
0.044830322265625,
-0.000025212764739990234,
0.0193023681640625,
0.01568603515625,
-0.050811767578125,
-0.00791168212890625,
-0.0236968994140625,
-0.07855224609375,
-0.0171966552734375,
0.031768798828125,
0.01409912109375,
-0.019683837890625,
-0.002620697021484375,
0.00977325439453125,
-0.007236480712890625,
-0.01322174072265625,
0.0174713134765625,
-0.0121307373046875,
-0.011810302734375,
0.003177642822265625,
-0.023345947265625,
0.0231475830078125,
-0.016357421875,
0.00147247314453125,
0.041656494140625,
0.0154876708984375,
0.0077056884765625,
-0.0020618438720703125,
0.0014057159423828125,
-0.007015228271484375,
0.0013990402221679688,
-0.019073486328125,
-0.00518798828125,
0.00470733642578125,
-0.057952880859375,
0.0184478759765625,
-0.059967041015625,
-0.08837890625,
0.0239105224609375,
0.035491943359375,
-0.00418853759765625,
-0.002651214599609375,
0.007183074951171875,
-0.025726318359375,
0.01280975341796875,
-0.0018978118896484375,
0.0216522216796875,
0.0238189697265625,
-0.0031147003173828125,
0.006839752197265625,
-0.02093505859375,
-0.00737762451171875,
0.00843048095703125,
0.0029163360595703125,
0.0129547119140625,
0.0146026611328125,
0.0171051025390625,
0.01508331298828125,
-0.0516357421875,
0.04278564453125,
-0.0814208984375,
-0.054229736328125,
0.07025146484375,
-0.030853271484375,
-0.0292510986328125,
0.0185546875,
-0.0135040283203125,
0.01514434814453125,
0.0380859375,
-0.01430511474609375,
0.01824951171875,
-0.01861572265625,
0.011993408203125,
-0.018524169921875,
-0.0017490386962890625,
-0.0220489501953125,
0.01337432861328125,
-0.05084228515625,
-0.0465087890625,
0.060546875,
0.0036754608154296875,
-0.0117645263671875,
0.0231170654296875,
-0.0160980224609375,
-0.04827880859375,
0.00673675537109375,
-0.0143890380859375,
-0.01036834716796875,
0.02362060546875,
-0.0008845329284667969,
-0.0023651123046875,
0.0059967041015625,
0.0064544677734375,
-0.007320404052734375,
0.040435791015625,
-0.0259552001953125,
0.04779052734375,
-0.0482177734375,
-0.0273895263671875,
0.006160736083984375,
0.07391357421875,
0.03900146484375,
0.022613525390625,
-0.037933349609375,
-0.0015935897827148438,
-0.062469482421875,
0.0162506103515625,
-0.0423583984375,
0.01270294189453125,
-0.016021728515625,
0.016845703125,
0.0172119140625,
-0.0726318359375,
-0.08380126953125,
-0.013427734375,
0.01226806640625,
-0.007434844970703125,
-0.048797607421875,
0.0130767822265625,
-0.020599365234375,
0.033447265625,
-0.038909912109375,
-0.048675537109375,
0.0302581787109375,
0.05035400390625,
-0.027618408203125,
0.0159149169921875,
-0.0311737060546875,
-0.05670166015625,
-0.0169677734375,
0.006481170654296875,
0.01751708984375,
-0.00505828857421875,
-0.0019664764404296875,
0.0498046875,
0.00257110595703125,
0.07647705078125,
-0.045806884765625,
0.0252685546875,
0.010955810546875,
0.0233917236328125,
-0.04144287109375,
-0.098388671875,
0.026123046875,
-0.052642822265625,
-0.026092529296875,
0.004322052001953125,
0.0323486328125,
0.051055908203125,
0.010284423828125,
-0.028717041015625,
0.12213134765625,
-0.0246734619140625,
-0.006134033203125,
-0.05206298828125,
0.0051727294921875,
0.0212860107421875,
-0.021209716796875,
-0.006591796875,
-0.049896240234375,
-0.0572509765625,
0.021453857421875,
0.01806640625,
-0.00957489013671875,
0.028289794921875,
0.0145263671875,
-0.07598876953125,
0.020599365234375,
0.0106658935546875,
0.0148468017578125,
-0.0086822509765625,
0.00010198354721069336,
0.019287109375,
0.048858642578125,
-0.005645751953125,
-0.0180511474609375,
0.009613037109375,
-0.040435791015625,
-0.0295257568359375,
-0.02593994140625,
-0.018768310546875,
-0.01099395751953125,
0.0264434814453125,
0.06488037109375,
0.01568603515625,
-0.034210205078125,
-0.030548095703125,
-0.0189056396484375,
-0.00475311279296875,
-0.01407623291015625,
0.01261138916015625,
-0.036407470703125,
0.005458831787109375,
-0.0180816650390625,
-0.0255126953125,
0.025787353515625,
-0.012786865234375,
-0.0333251953125,
-0.002307891845703125,
-0.03497314453125,
-0.01122283935546875,
-0.03662109375,
0.039794921875,
-0.0239105224609375,
-0.01104736328125,
-0.0275115966796875,
-0.021148681640625,
-0.000007927417755126953,
-0.0450439453125,
-0.03125,
-0.01030731201171875,
0.01244354248046875,
-0.0085601806640625,
0.021636962890625,
0.01074981689453125,
0.00027441978454589844,
-0.004741668701171875,
0.00841522216796875,
-0.03497314453125,
0.034759521484375,
0.0276336669921875,
0.03961181640625,
-0.01132965087890625,
0.0274505615234375,
0.032135009765625,
0.029632568359375,
-0.006069183349609375,
0.04833984375,
-0.00475311279296875,
0.057281494140625,
0.0209808349609375,
-0.0404052734375,
0.058502197265625,
-0.0335693359375,
-0.01253509521484375,
0.015655517578125,
-0.006420135498046875,
-0.0201416015625,
0.0103607177734375,
0.01088714599609375,
0.006862640380859375,
0.004665374755859375
] |
e1a5728cc0bdd10ffd8705765dfca317fc16476e
|
Wordpress Stackexchange
Q: Sends out email to admin Are there any plugin or code that sends out a email to me (admin) when a author or writer publish a post?
A: No need for plugin here are a few lines of code you can modify and paste in your themes functions.php file and you will get a new email whenever a post is published:
add_action('publish_post', 'send_admin_email');
function send_admin_email($post_id){
$to = '[email protected]';
$subject = 'mail subject here';
$message = "your message here ex: new post published at: ".get_permalink($post_id);
wp_mail($to, $subject, $message );
}
|
Q: Sends out email to admin Are there any plugin or code that sends out a email to me (admin) when a author or writer publish a post?
A: No need for plugin here are a few lines of code you can modify and paste in your themes functions.php file and you will get a new email whenever a post is published:
add_action('publish_post', 'send_admin_email');
function send_admin_email($post_id){
$to = '[email protected]';
$subject = 'mail subject here';
$message = "your message here ex: new post published at: ".get_permalink($post_id);
wp_mail($to, $subject, $message );
}
A: http://wordpress.org/extend/plugins/email-alerts/ this is good for a single or multisite set up where each user wants different email alert settings. Activate the plugin and then go to the user's profile to update the alert settings.
A: There is a plugin for this:
http://wordpress.org/extend/plugins/email-post-changes/
After install go to Settings of the plugin (the settings link in the plugin list).
Enter your Email Adress and make sure to enable "Drafts" at the bottom - this will also send you notifications on new posts.
|
wordpress
|
{
"language": "en",
"length": 171,
"provenance": "stackexchange_00019.jsonl.gz:421121",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56229"
}
|
[
0.0244903564453125,
-0.028228759765625,
0.0110321044921875,
-0.00615692138671875,
-0.02520751953125,
-0.016143798828125,
0.0163116455078125,
-0.03680419921875,
-0.02178955078125,
0.03411865234375,
0.038970947265625,
0.00499725341796875,
-0.00992584228515625,
-0.034088134765625,
-0.0037364959716796875,
0.0040130615234375,
0.0019969940185546875,
0.03570556640625,
0.022552490234375,
-0.0103302001953125,
0.001483917236328125,
0.0081329345703125,
-0.0216217041015625,
0.004817962646484375,
-0.036895751953125,
0.0711669921875,
0.0989990234375,
-0.019683837890625,
-0.0287322998046875,
-0.023590087890625,
-0.005390167236328125,
-0.02655029296875,
0.009735107421875,
0.03961181640625,
-0.0306396484375,
0.006534576416015625,
-0.01453399658203125,
0.0257415771484375,
0.0028972625732421875,
0.01204681396484375,
0.0271759033203125,
-0.01288604736328125,
0.0269317626953125,
0.03448486328125,
0.001941680908203125,
-0.042572021484375,
0.031280517578125,
-0.047149658203125,
0.0100250244140625,
0.00768280029296875,
0.00910186767578125,
-0.024658203125,
0.009735107421875,
-0.024749755859375,
-0.006587982177734375,
0.009185791015625,
0.004852294921875,
0.004871368408203125,
0.025360107421875,
-0.0185546875,
-0.04620361328125,
-0.0008292198181152344,
0.0257110595703125,
-0.0186920166015625,
-0.02154541015625,
0.007686614990234375,
-0.0025920867919921875,
0.007354736328125,
-0.0309600830078125,
-0.0221710205078125,
0.0244598388671875,
-0.024505615234375,
-0.008941650390625,
-0.0202484130859375,
-0.0107574462890625,
-0.002544403076171875,
0.032501220703125,
0.0018072128295898438,
-0.0201263427734375,
0.027191162109375,
0.0185394287109375,
-0.003444671630859375,
-0.0045318603515625,
0.00011307001113891602,
-0.000025331974029541016,
0.024658203125,
-0.01041412353515625,
-0.0204315185546875,
-0.0214080810546875,
-0.033447265625,
-0.026092529296875,
-0.005733489990234375,
-0.034942626953125,
-0.036956787109375,
-0.0178680419921875,
-0.050994873046875,
0.04144287109375,
0.08160400390625,
-0.01349639892578125,
-0.002971649169921875,
-0.0667724609375,
-0.002353668212890625,
-0.04248046875,
-0.0210113525390625,
-0.00707244873046875,
0.0311431884765625,
-0.0109710693359375,
-0.03216552734375,
0.0032749176025390625,
0.002231597900390625,
-0.016143798828125,
-0.033447265625,
0.01064300537109375,
0.01091766357421875,
-0.010009765625,
-0.0019273757934570312,
-0.02264404296875,
0.0272216796875,
-0.0007600784301757812,
0.033050537109375,
-0.0031375885009765625,
0.01345062255859375,
-0.006900787353515625,
-0.026275634765625,
-0.01471710205078125,
-0.023956298828125,
-0.025726318359375,
-0.009063720703125,
0.05218505859375,
-0.0194854736328125,
-0.037872314453125,
0.0298919677734375,
0.0628662109375,
0.0211181640625,
0.016448974609375,
-0.0004754066467285156,
0.010467529296875,
-0.02947998046875,
0.0192413330078125,
-0.005413055419921875,
-0.01348876953125,
0.002391815185546875,
0.031524658203125,
-0.004909515380859375,
-0.022674560546875,
0.0303192138671875,
0.00909423828125,
-0.0029926300048828125,
-0.006504058837890625,
-0.0247344970703125,
-0.038543701171875,
-0.00949859619140625,
0.00608062744140625,
0.02142333984375,
0.031951904296875,
0.0281982421875,
0.01519775390625,
0.02642822265625,
-0.01617431640625,
0.01434326171875,
0.0231475830078125,
0.0029754638671875,
0.0168304443359375,
-0.01276397705078125,
-0.021209716796875,
-0.006572723388671875,
-0.07794189453125,
-0.006435394287109375,
0.0169219970703125,
-0.06903076171875,
0.044677734375,
-0.0081024169921875,
0.036956787109375,
-0.0199127197265625,
-0.01548004150390625,
0.0028629302978515625,
-0.0154266357421875,
-0.0183258056640625,
0.052490234375,
-0.017303466796875,
-0.01849365234375,
-0.01165771484375,
0.033233642578125,
0.00031876564025878906,
0.001743316650390625,
0.01428985595703125,
0.0205230712890625,
0.0147857666015625,
-0.00939178466796875,
0.0234527587890625,
0.00022327899932861328,
0.0249786376953125,
0.01372528076171875,
-0.00197601318359375,
-0.0292816162109375,
-0.0189971923828125,
-0.0241546630859375,
0.0284576416015625,
-0.03314208984375,
0.006549835205078125,
-0.0175628662109375,
-0.01430511474609375,
0.0256805419921875,
0.0265045166015625,
0.0031414031982421875,
0.01263427734375,
-0.01505279541015625,
0.0164337158203125,
0.0298004150390625,
0.01094818115234375,
-0.01227569580078125,
0.006816864013671875,
0.01158905029296875,
-0.07818603515625,
-0.047943115234375,
0.0155029296875,
-0.03851318359375,
0.022705078125,
-0.01155853271484375,
0.04541015625,
-0.00800323486328125,
-0.0548095703125,
-0.002544403076171875,
-0.0008311271667480469,
0.019989013671875,
0.0110626220703125,
-0.0214996337890625,
-0.00649261474609375,
0.00508880615234375,
0.0173797607421875,
-0.029388427734375,
0.03607177734375,
0.044525146484375,
0.021636962890625,
-0.0185394287109375,
-0.0003681182861328125,
0.002246856689453125,
-0.061126708984375,
-0.0021305084228515625,
0.052703857421875,
0.040283203125,
0.0110931396484375,
0.0287017822265625,
0.032135009765625,
0.046417236328125,
-0.0190277099609375,
0.03143310546875,
-0.01148223876953125,
0.0262603759765625,
0.0545654296875,
-0.045806884765625,
-0.0197906494140625,
0.03155517578125,
-0.09869384765625,
-0.008056640625,
0.06744384765625,
0.03558349609375,
0.004970550537109375,
-0.034942626953125,
0.0240478515625,
0.0170440673828125,
0.0207977294921875,
-0.05706787109375,
0.0230255126953125,
-0.00439453125,
0.0011882781982421875,
0.00830841064453125,
0.01134490966796875,
-0.032562255859375,
-0.0179290771484375,
0.021148681640625,
0.042327880859375,
0.006114959716796875,
0.048919677734375,
0.011627197265625,
0.04022216796875,
-0.0294342041015625,
-0.029876708984375,
0.048980712890625,
0.0361328125,
-0.041229248046875,
-0.01003265380859375,
0.023681640625,
-0.017486572265625,
0.022003173828125,
0.0254974365234375,
0.02520751953125,
-0.0631103515625,
0.05792236328125,
-0.00029015541076660156,
0.002285003662109375,
0.02630615234375,
-0.031585693359375,
0.08319091796875,
0.0007147789001464844,
-0.0300140380859375,
-0.062408447265625,
-0.011505126953125,
0.0305633544921875,
-0.02423095703125,
0.0274658203125,
0.0675048828125,
0.0065460205078125,
0.01023101806640625,
0.00917816162109375,
-0.0218048095703125,
-0.018829345703125,
0.041595458984375,
0.0132293701171875,
-0.026458740234375,
-0.008697509765625,
0.041748046875,
0.0015869140625,
0.032318115234375,
-0.055816650390625,
-0.08056640625,
-0.039764404296875,
-0.0152130126953125,
-0.112548828125,
-0.0655517578125,
-0.0131988525390625,
-0.037811279296875,
-0.0223846435546875,
-0.0166168212890625,
-0.014862060546875,
0.0185394287109375,
-0.004276275634765625,
0.002811431884765625,
0.00208282470703125,
-0.0180206298828125,
-0.047119140625,
-0.0205841064453125,
-0.036376953125,
0.013397216796875,
-0.0172119140625,
0.0017518997192382812,
0.00733184814453125,
0.06573486328125,
-0.0005249977111816406,
-0.0810546875,
-0.01065826416015625,
-0.0175628662109375,
-0.0202484130859375,
0.031494140625,
-0.01055145263671875,
-0.027923583984375,
-0.0021457672119140625,
0.007633209228515625,
0.018951416015625,
-0.000072479248046875,
-0.00592041015625,
-0.014404296875,
-0.02655029296875,
-0.0129547119140625,
0.0162811279296875,
-0.07183837890625,
0.001468658447265625,
0.0185699462890625,
-0.02239990234375,
-0.039794921875,
0.0277099609375,
0.00272369384765625,
-0.02325439453125,
-0.024017333984375,
-0.0187835693359375,
-0.0157623291015625,
0.0179901123046875,
-0.01357269287109375,
0.01959228515625,
0.002696990966796875,
0.0310821533203125,
-0.0026187896728515625,
-0.0158538818359375,
-0.0037593841552734375,
0.005126953125,
-0.02325439453125,
-0.0379638671875,
-0.028533935546875,
0.0221099853515625,
-0.03155517578125,
0.0280914306640625,
-0.029937744140625,
0.06390380859375,
-0.037109375,
-0.07135009765625,
0.0545654296875,
-0.0116729736328125,
0.0013570785522460938,
-0.01511383056640625,
-0.036651611328125,
0.0213165283203125,
0.1175537109375,
0.02740478515625,
-0.00617218017578125,
-0.0064239501953125,
-0.002880096435546875,
-0.02874755859375,
-0.030426025390625,
-0.032257080078125,
-0.0005025863647460938,
-0.035858154296875,
0.00545501708984375,
-0.010528564453125,
-0.0033054351806640625,
-0.021270751953125,
0.041046142578125,
-0.01248931884765625,
-0.02606201171875,
0.0306396484375,
-0.03155517578125,
0.0224761962890625,
0.020599365234375,
0.003948211669921875,
-0.016510009765625,
-0.00579833984375,
-0.034332275390625,
-0.0419921875,
-0.0010814666748046875,
0.00496673583984375,
0.0247344970703125,
-0.00991058349609375,
0.01016998291015625,
-0.03271484375,
-0.002414703369140625,
-0.0257415771484375,
0.00022470951080322266,
-0.026611328125,
0.01511383056640625,
-0.00399017333984375,
-0.00449371337890625,
-0.013031005859375,
-0.0029773712158203125,
0.0038471221923828125,
0.012908935546875,
-0.040283203125,
0.018035888671875,
-0.0211029052734375,
-0.01190948486328125,
0.025177001953125,
-0.04840087890625,
-0.049224853515625,
-0.034637451171875,
-0.033050537109375,
-0.0186920166015625,
-0.01380157470703125,
-0.0202178955078125,
-0.0213623046875,
-0.04229736328125,
0.030364990234375,
-0.0123138427734375,
-0.0196990966796875,
0.00893402099609375,
0.060546875,
0.0234832763671875,
0.00003790855407714844,
-0.0164031982421875,
0.0124053955078125,
0.055023193359375,
0.0110321044921875,
0.0273895263671875,
0.04669189453125,
-0.04254150390625,
0.04315185546875,
0.046905517578125,
-0.0071258544921875,
-0.050628662109375,
0.07562255859375,
-0.00630950927734375,
-0.0051116943359375,
0.01358795166015625,
-0.047027587890625,
0.057952880859375,
0.0205078125,
-0.00124359130859375,
-0.0233154296875,
-0.0016393661499023438,
0.045928955078125,
-0.0248565673828125,
0.031585693359375,
-0.03216552734375,
-0.04730224609375,
0.0270843505859375,
0.01715087890625,
-0.00955963134765625,
0.0037174224853515625,
-0.0000692605972290039,
-0.00902557373046875,
-0.0159912109375,
-0.0204620361328125,
-0.0017194747924804688,
-0.0116729736328125,
0.0287933349609375,
0.01505279541015625,
-0.0004792213439941406,
-0.011627197265625,
-0.0124664306640625,
-0.0088958740234375,
0.0538330078125,
0.04583740234375,
0.0048980712890625,
-0.04833984375,
-0.01100921630859375,
-0.0160980224609375,
-0.041839599609375,
-0.0572509765625,
0.0408935546875,
0.08660888671875,
-0.0265350341796875,
-0.01224517822265625,
-0.006072998046875,
0.01061248779296875,
-0.057891845703125,
-0.003726959228515625,
-0.01070404052734375,
-0.0069732666015625,
0.0276336669921875,
0.055206298828125,
-0.01995849609375,
0.05206298828125,
-0.01206207275390625,
0.04376220703125,
0.042999267578125,
0.004306793212890625,
0.027557373046875,
0.0015554428100585938,
0.007785797119140625,
-0.038818359375,
-0.01317596435546875,
-0.022613525390625,
0.0164031982421875,
0.01457977294921875,
0.006832122802734375,
0.02899169921875,
0.00962066650390625,
0.00521087646484375,
0.00467681884765625,
-0.05035400390625,
0.0323486328125,
0.031829833984375,
-0.02081298828125,
-0.0306854248046875,
-0.00519561767578125,
0.0117950439453125,
0.038848876953125,
0.0014581680297851562,
0.024383544921875,
-0.004581451416015625,
0.00861358642578125,
-0.039093017578125,
-0.0039043426513671875,
-0.0185394287109375,
-0.0147247314453125,
0.001560211181640625,
0.003971099853515625,
0.00890350341796875,
-0.051971435546875,
-0.029632568359375,
-0.0209503173828125,
0.0158233642578125,
0.0654296875,
-0.0298919677734375,
0.03509521484375,
-0.033538818359375,
0.0139007568359375,
-0.037628173828125,
-0.003208160400390625,
0.06866455078125,
0.052734375,
-0.05950927734375,
0.0017633438110351562,
-0.047760009765625,
-0.0126953125,
-0.042755126953125,
-0.02593994140625,
-0.030487060546875,
-0.0053253173828125,
0.0465087890625,
0.007511138916015625,
-0.00531005859375,
-0.08056640625,
-0.01146697998046875,
-0.006755828857421875,
0.047271728515625,
0.007205963134765625,
0.0006222724914550781,
0.058349609375,
-0.03375244140625,
0.058197021484375,
-0.00716400146484375,
-0.008819580078125,
-0.068359375,
0.01302337646484375,
-0.00940704345703125,
-0.004390716552734375,
0.004459381103515625,
0.0281524658203125,
0.010589599609375,
-0.049285888671875,
-0.019439697265625,
-0.003902435302734375,
0.0047607421875,
-0.01486968994140625,
0.0067291259765625,
-0.02020263671875,
0.006923675537109375,
-0.00902557373046875,
-0.00421142578125,
-0.007404327392578125,
-0.036712646484375,
0.00611114501953125,
0.0038356781005859375,
-0.006275177001953125,
0.026458740234375,
-0.0202789306640625,
0.01151275634765625,
0.021636962890625,
0.00658416748046875,
0.033660888671875,
0.06939697265625,
-0.00739288330078125,
0.045196533203125,
0.027679443359375,
0.008453369140625,
-0.0010633468627929688,
-0.0285186767578125,
0.042205810546875,
-0.037689208984375,
0.07305908203125,
0.0006694793701171875,
-0.0100555419921875,
0.06805419921875,
-0.046142578125,
0.0228424072265625,
0.039825439453125,
0.07672119140625,
-0.0650634765625,
0.01206207275390625,
0.0136260986328125,
-0.0235137939453125,
0.0394287109375,
-0.0310516357421875,
-0.0097503662109375,
-0.054168701171875,
0.069091796875,
0.0294952392578125,
0.001171112060546875,
0.0090484619140625,
-0.020660400390625,
-0.0080413818359375,
-0.0180816650390625,
0.04547119140625,
0.00914764404296875,
-0.024261474609375,
-0.00234222412109375,
0.00347900390625,
-0.01447296142578125,
-0.0200347900390625,
0.0005393028259277344,
0.005336761474609375,
-0.0167236328125,
-0.02142333984375,
0.0360107421875,
-0.0043487548828125,
0.0254669189453125,
-0.036285400390625,
0.00800323486328125,
0.019866943359375,
0.04034423828125,
-0.00743865966796875,
-0.0250091552734375,
0.0247039794921875,
0.0032596588134765625,
-0.03759765625,
-0.031280517578125,
0.00984954833984375,
0.06219482421875,
-0.04296875,
0.0330810546875,
-0.01203155517578125,
-0.025726318359375,
0.0027713775634765625,
-0.0032291412353515625,
0.06787109375,
-0.0277557373046875,
-0.0187835693359375,
0.0197296142578125,
-0.00801849365234375,
-0.0008521080017089844,
-0.0130462646484375,
0.01355743408203125,
-0.020172119140625,
0.031402587890625,
-0.010498046875,
0.00861358642578125,
0.0142822265625,
-0.0109710693359375,
-0.08172607421875,
0.104736328125,
0.008026123046875,
0.034027099609375,
0.01076507568359375,
0.037445068359375,
-0.034881591796875,
0.0016078948974609375,
-0.024749755859375,
0.055511474609375,
-0.03863525390625,
0.0139923095703125,
-0.057861328125,
0.0070648193359375,
-0.0186920166015625,
0.0181121826171875,
0.1019287109375,
0.0338134765625,
-0.042205810546875,
-0.006526947021484375,
0.04827880859375,
-0.0013780593872070312,
-0.032806396484375,
0.07171630859375,
0.0169830322265625,
0.0307464599609375,
0.0863037109375,
-0.03485107421875,
0.04296875,
0.0167388916015625,
0.00836944580078125,
0.03692626953125,
-0.003070831298828125,
-0.012939453125,
0.0146942138671875,
-0.0155792236328125,
-0.01004791259765625,
0.007015228271484375,
-0.0073699951171875,
-0.0245208740234375,
0.0027103424072265625,
0.007343292236328125,
-0.0013418197631835938,
-0.031463623046875,
0.0433349609375,
-0.03790283203125,
0.044342041015625,
-0.01568603515625,
-0.0121612548828125,
-0.01373291015625,
0.012939453125,
0.0256500244140625,
-0.023162841796875,
-0.01132965087890625,
0.0325927734375,
-0.01522064208984375,
0.0243377685546875,
-0.05169677734375,
0.0009212493896484375,
-0.11383056640625,
-0.057891845703125,
0.0220184326171875,
0.043243408203125,
-0.008544921875,
0.014312744140625,
0.01171875,
0.01432037353515625,
0.00328826904296875,
-0.0215911865234375,
0.0171051025390625,
-0.025848388671875,
-0.022003173828125,
-0.0202178955078125,
-0.023681640625,
0.0196990966796875,
0.0296783447265625,
-0.0005750656127929688,
-0.00850677490234375,
-0.003086090087890625,
-0.0290985107421875,
-0.03411865234375,
0.01483917236328125,
0.03436279296875,
0.044036865234375,
-0.0021190643310546875,
0.050750732421875,
-0.02288818359375,
-0.006397247314453125,
0.002864837646484375,
-0.02044677734375,
0.011016845703125,
-0.016143798828125,
0.0033817291259765625,
0.005588531494140625,
0.0189971923828125,
0.01236724853515625,
-0.0196075439453125,
0.013824462890625,
0.0292510986328125,
0.0323486328125,
-0.01166534423828125,
-0.033294677734375,
-0.006366729736328125,
-0.0253753662109375,
0.01172637939453125,
-0.03582763671875,
0.00856781005859375,
-0.020233154296875,
-0.008514404296875,
-0.01354217529296875,
0.04180908203125,
-0.01558685302734375,
-0.03900146484375,
0.01338958740234375,
-0.0002505779266357422,
-0.037200927734375,
0.019561767578125,
-0.01380157470703125,
0.052581787109375,
-0.007701873779296875,
-0.0838623046875,
-0.036865234375,
0.0113372802734375,
-0.0158233642578125,
0.0189056396484375,
0.037200927734375,
-0.03662109375,
0.035552978515625,
0.0181732177734375,
0.00457763671875,
0.01113128662109375,
-0.039459228515625,
0.0032062530517578125,
-0.03717041015625,
0.0187225341796875,
-0.01273345947265625,
-0.0172271728515625,
-0.0282135009765625,
-0.0182647705078125,
0.054840087890625,
0.036285400390625,
0.04083251953125,
-0.0165252685546875,
0.033050537109375,
-0.04095458984375,
0.0201416015625,
-0.0618896484375,
-0.044586181640625,
0.0273590087890625,
-0.041290283203125,
-0.0439453125,
0.020599365234375,
-0.09637451171875,
-0.00867462158203125,
0.03643798828125,
-0.009796142578125,
0.00548553466796875,
0.0014619827270507812,
0.00966644287109375,
-0.0284271240234375,
0.025726318359375,
-0.0177459716796875,
-0.040985107421875,
-0.04437255859375,
-0.006343841552734375,
0.0241851806640625,
0.04473876953125,
0.002651214599609375,
0.0278778076171875,
-0.01090240478515625,
-0.0184478759765625,
0.0137481689453125,
-0.037353515625,
0.0110015869140625,
0.034332275390625,
-0.0234222412109375,
-0.01953125,
0.019622802734375,
-0.01354217529296875,
0.02032470703125,
0.005893707275390625,
0.0692138671875,
0.01812744140625,
-0.00701141357421875,
-0.0026302337646484375,
-0.0160369873046875,
0.04156494140625,
-0.01438140869140625,
0.00841522216796875,
-0.0260467529296875,
0.0245819091796875,
-0.00444793701171875,
-0.047576904296875,
-0.032379150390625,
-0.062744140625,
0.01448822021484375,
0.0115966796875,
-0.022186279296875,
-0.057098388671875,
-0.0213623046875,
0.031768798828125,
0.0236663818359375,
-0.0177154541015625,
-0.0291748046875,
-0.0045318603515625,
-0.031768798828125,
0.083251953125,
-0.01085662841796875,
0.038360595703125,
0.01285552978515625,
0.06878662109375,
-0.055816650390625,
-0.0640869140625,
-0.023590087890625,
0.031890869140625,
-0.06878662109375,
0.008880615234375,
0.031402587890625,
-0.00786590576171875,
-0.053985595703125,
0.001434326171875,
-0.022003173828125,
0.0509033203125,
-0.0179901123046875,
-0.0054779052734375,
0.0220184326171875,
0.0176239013671875,
-0.0379638671875,
-0.0841064453125,
0.01088714599609375,
-0.044921875,
-0.005786895751953125,
-0.0269927978515625,
0.0307159423828125,
0.0374755859375,
-0.0254364013671875,
-0.0560302734375,
0.009002685546875,
-0.0138092041015625,
-0.0297088623046875,
-0.005794525146484375,
-0.0009851455688476562,
-0.00440216064453125,
-0.00797271728515625,
0.006473541259765625,
-0.0491943359375,
-0.034912109375,
0.0149383544921875,
0.01445770263671875,
0.008087158203125,
0.0283966064453125,
0.0008320808410644531,
-0.0377197265625,
-0.0012292861938476562,
0.0014677047729492188,
-0.003009796142578125,
-0.006679534912109375,
0.0026302337646484375,
0.0244293212890625,
0.0391845703125,
-0.0161590576171875,
-0.019622802734375,
0.0159912109375,
-0.03021240234375,
-0.041107177734375,
-0.022125244140625,
-0.001399993896484375,
0.03125,
0.1070556640625,
0.06610107421875,
0.01934814453125,
-0.0633544921875,
0.0001773834228515625,
-0.0299224853515625,
-0.03375244140625,
-0.0259857177734375,
0.0250701904296875,
-0.050537109375,
-0.0037937164306640625,
0.007190704345703125,
0.005474090576171875,
-0.036285400390625,
-0.0033721923828125,
-0.0147247314453125,
-0.0256805419921875,
0.01209259033203125,
0.010467529296875,
-0.00043201446533203125,
-0.05224609375,
0.0596923828125,
-0.021881103515625,
0.0282440185546875,
0.034423828125,
0.02337646484375,
0.048797607421875,
0.09393310546875,
0.0189056396484375,
-0.006988525390625,
-0.0259857177734375,
0.00409698486328125,
0.0167388916015625,
0.02325439453125,
-0.019989013671875,
-0.0244293212890625,
0.0216827392578125,
0.01959228515625,
-0.02337646484375,
0.0012149810791015625,
-0.006420135498046875,
0.06805419921875,
-0.0265655517578125,
0.09356689453125,
0.0011491775512695312,
-0.057891845703125,
-0.042816162109375,
0.0523681640625,
-0.01354217529296875,
-0.0199737548828125,
-0.0009713172912597656,
-0.019012451171875,
0.031494140625,
0.0292510986328125,
0.0977783203125,
0.01084136962890625,
0.025299072265625,
-0.002048492431640625,
0.04046630859375,
0.01284027099609375
] |
29fe3379bb529ba7a5efaba4e391c152683dc17f
|
Wordpress Stackexchange
Q: How to verify nonce from Bulk/Quick Edit in save_post? I need to do something specific in my save_post callback for bulk and/or quick edits, so how do I check the nonce for that? I can only find _wpnonce in the edit.php html source, but can't find an action to match it with. I also tried check_admin_referrer() (no arguments) but it fails.
*
*What nonce whould I check for? OR
*Should I check for something else in save_post to know it's being fired from a
a. bulk edit or
b. quick edit action? I read that DOING_AJAX is there for quick edit, but is that enough on its own? what about for bulk edit?
A: It's inlineeditnonce. Check line 1185 of admin-ajax.php for details.
|
Q: How to verify nonce from Bulk/Quick Edit in save_post? I need to do something specific in my save_post callback for bulk and/or quick edits, so how do I check the nonce for that? I can only find _wpnonce in the edit.php html source, but can't find an action to match it with. I also tried check_admin_referrer() (no arguments) but it fails.
*
*What nonce whould I check for? OR
*Should I check for something else in save_post to know it's being fired from a
a. bulk edit or
b. quick edit action? I read that DOING_AJAX is there for quick edit, but is that enough on its own? what about for bulk edit?
A: It's inlineeditnonce. Check line 1185 of admin-ajax.php for details.
A: I found check_admin_referer('bulk-posts') in wp-admin/edit.php:49 for bulk edit. With @Rutwick Gangurde's help, I found check_ajax_referer( 'inlineeditnonce', '_inline_edit' ) in wp-admin/includes/ajax-actions.php:1318. Thanks y'all.
|
wordpress
|
{
"language": "en",
"length": 147,
"provenance": "stackexchange_00019.jsonl.gz:421131",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56262"
}
|
[
0.05364990234375,
-0.0028629302978515625,
-0.01496124267578125,
-0.036376953125,
0.0252838134765625,
-0.043853759765625,
0.037200927734375,
-0.01303863525390625,
0.0242156982421875,
0.019012451171875,
-0.0172271728515625,
-0.0246429443359375,
0.0236663818359375,
-0.0188140869140625,
-0.031341552734375,
-0.002483367919921875,
-0.0015783309936523438,
0.0007457733154296875,
0.0142669677734375,
-0.01236724853515625,
-0.010833740234375,
-0.01129913330078125,
0.0020580291748046875,
-0.06842041015625,
0.038818359375,
-0.025390625,
0.10833740234375,
-0.036895751953125,
0.05657958984375,
-0.00498199462890625,
0.031341552734375,
-0.052154541015625,
0.0269317626953125,
0.046112060546875,
-0.08453369140625,
-0.035491943359375,
-0.0280303955078125,
0.0192413330078125,
-0.0212554931640625,
0.0184326171875,
0.0168609619140625,
-0.005275726318359375,
0.00787353515625,
-0.001953125,
-0.0282745361328125,
-0.0112762451171875,
0.028961181640625,
-0.00159454345703125,
0.005107879638671875,
0.0193634033203125,
-0.01230621337890625,
0.006046295166015625,
-0.01959228515625,
-0.007747650146484375,
0.0009675025939941406,
-0.01561737060546875,
-0.10888671875,
0.01483917236328125,
0.02105712890625,
0.057373046875,
0.038177490234375,
-0.039459228515625,
-0.024688720703125,
-0.0322265625,
-0.032501220703125,
-0.0011138916015625,
0.006603240966796875,
0.009185791015625,
-0.03875732421875,
-0.03570556640625,
0.01474761962890625,
-0.0130462646484375,
0.0159759521484375,
-0.00870513916015625,
0.0587158203125,
-0.0225982666015625,
-0.0028629302978515625,
0.024810791015625,
-0.00820159912109375,
0.05126953125,
0.001857757568359375,
-0.0032978057861328125,
0.01392364501953125,
0.03643798828125,
-0.04571533203125,
0.02587890625,
-0.02606201171875,
-0.00982666015625,
-0.005702972412109375,
-0.0300445556640625,
-0.018798828125,
-0.076416015625,
0.0106658935546875,
0.0255889892578125,
-0.0274658203125,
-0.017974853515625,
0.01282501220703125,
0.031524658203125,
-0.0253143310546875,
-0.0299835205078125,
0.0303955078125,
-0.048828125,
-0.0188446044921875,
-0.01276397705078125,
-0.00472259521484375,
0.040130615234375,
0.045257568359375,
-0.0260009765625,
-0.024505615234375,
-0.0179901123046875,
-0.0250244140625,
0.007659912109375,
0.00624847412109375,
-0.023040771484375,
-0.0157623291015625,
-0.0032329559326171875,
-0.01126861572265625,
0.01229095458984375,
0.0004794597625732422,
-0.0144500732421875,
-0.01007843017578125,
0.0008521080017089844,
0.028564453125,
-0.035125732421875,
0.006496429443359375,
-0.0161590576171875,
-0.05255126953125,
-0.0198822021484375,
0.01557159423828125,
0.0183868408203125,
-0.016815185546875,
0.020751953125,
0.039764404296875,
-0.018035888671875,
-0.0196990966796875,
-0.02386474609375,
-0.0002498626708984375,
0.0504150390625,
-0.0048980712890625,
-0.00328826904296875,
0.01715087890625,
-0.00836181640625,
0.0178680419921875,
0.018096923828125,
-0.0026836395263671875,
0.032196044921875,
0.0222930908203125,
-0.00351715087890625,
-0.0172271728515625,
-0.040618896484375,
0.0004222393035888672,
-0.0242767333984375,
0.054962158203125,
-0.0236053466796875,
0.007411956787109375,
-0.0304107666015625,
0.07373046875,
-0.049957275390625,
-0.0272674560546875,
-0.065185546875,
0.0160980224609375,
0.001190185546875,
0.045196533203125,
-0.0070343017578125,
-0.02606201171875,
0.0001138448715209961,
-0.07421875,
-0.010528564453125,
0.0108184814453125,
-0.01422119140625,
0.019073486328125,
0.00023376941680908203,
0.002288818359375,
-0.034393310546875,
-0.019287109375,
0.00547027587890625,
-0.01386260986328125,
0.042938232421875,
0.0312347412109375,
0.039703369140625,
0.0286102294921875,
-0.0241546630859375,
0.082275390625,
0.004436492919921875,
-0.030517578125,
0.00266265869140625,
0.0239410400390625,
0.049407958984375,
0.0151214599609375,
0.0265960693359375,
0.0176544189453125,
0.00336456298828125,
0.009002685546875,
0.0167999267578125,
0.0028820037841796875,
-0.060577392578125,
-0.02557373046875,
-0.0197601318359375,
-0.0138397216796875,
0.00942230224609375,
-0.007568359375,
-0.058746337890625,
0.0369873046875,
-0.0132904052734375,
-0.057708740234375,
-0.018646240234375,
-0.036041259765625,
0.0335693359375,
0.03045654296875,
0.05712890625,
-0.0009541511535644531,
0.0211029052734375,
-0.033355712890625,
0.00016891956329345703,
0.0013866424560546875,
-0.00958251953125,
-0.040557861328125,
0.0780029296875,
0.005016326904296875,
0.030670166015625,
0.018463134765625,
-0.07574462890625,
0.0194091796875,
-0.03533935546875,
-0.004657745361328125,
-0.01605224609375,
-0.0120086669921875,
-0.012176513671875,
0.0036373138427734375,
-0.0031909942626953125,
0.019927978515625,
0.03265380859375,
0.08416748046875,
0.053466796875,
-0.040252685546875,
-0.019378662109375,
-0.03753662109375,
-0.08160400390625,
-0.01026153564453125,
0.07293701171875,
0.041046142578125,
0.03472900390625,
0.005832672119140625,
-0.0006737709045410156,
0.0413818359375,
-0.044921875,
0.01483154296875,
-0.0235595703125,
-0.0178680419921875,
0.032135009765625,
0.015869140625,
0.00579833984375,
-0.005336761474609375,
-0.035064697265625,
-0.00848388671875,
0.0316162109375,
0.0237579345703125,
0.01837158203125,
0.0230865478515625,
0.011871337890625,
-0.01207733154296875,
0.01434326171875,
-0.007549285888671875,
0.00714111328125,
-0.0037212371826171875,
-0.006763458251953125,
0.015167236328125,
0.0121307373046875,
0.005741119384765625,
-0.007114410400390625,
0.021820068359375,
-0.00893402099609375,
0.00457763671875,
0.053985595703125,
0.08477783203125,
0.0132598876953125,
-0.032379150390625,
-0.031646728515625,
0.032196044921875,
0.05224609375,
-0.022064208984375,
0.0208587646484375,
0.0153045654296875,
-0.0211181640625,
0.005313873291015625,
-0.0057373046875,
0.0030117034912109375,
-0.050872802734375,
0.0097198486328125,
0.005451202392578125,
0.0216064453125,
0.023773193359375,
-0.0203094482421875,
0.0258026123046875,
0.0155181884765625,
-0.01503753662109375,
-0.01132965087890625,
-0.0184326171875,
0.0307464599609375,
-0.01617431640625,
0.03912353515625,
0.0711669921875,
0.00609588623046875,
0.01361083984375,
0.0184478759765625,
0.0231475830078125,
0.0276947021484375,
0.0030307769775390625,
-0.014923095703125,
0.004734039306640625,
-0.06719970703125,
-0.0447998046875,
0.0005702972412109375,
-0.01006317138671875,
-0.0221405029296875,
-0.05242919921875,
-0.0136566162109375,
-0.011138916015625,
-0.0762939453125,
-0.033660888671875,
-0.037506103515625,
-0.00850677490234375,
-0.00566864013671875,
-0.01465606689453125,
-0.00482940673828125,
0.0132598876953125,
-0.01214599609375,
0.01068115234375,
0.02142333984375,
0.0177459716796875,
0.003406524658203125,
0.0097503662109375,
-0.0265960693359375,
-0.036529541015625,
0.00943756103515625,
-0.0003070831298828125,
0.0034008026123046875,
0.033599853515625,
0.004123687744140625,
-0.0362548828125,
-0.003864288330078125,
-0.01036834716796875,
-0.0216217041015625,
0.0017557144165039062,
-0.015838623046875,
0.0168304443359375,
0.00104522705078125,
0.003448486328125,
-0.06353759765625,
-0.00669097900390625,
0.01212310791015625,
-0.026824951171875,
0.0068359375,
-0.04449462890625,
0.035491943359375,
0.042236328125,
-0.0289306640625,
-0.003322601318359375,
0.06915283203125,
-0.05389404296875,
0.01201629638671875,
-0.00994873046875,
-0.005977630615234375,
0.02764892578125,
-0.0018491744995117188,
-0.02789306640625,
0.00946807861328125,
0.01502227783203125,
0.04345703125,
0.035888671875,
0.0186309814453125,
0.015106201171875,
-0.0228424072265625,
-0.007617950439453125,
0.00821685791015625,
-0.02142333984375,
-0.02215576171875,
-0.03570556640625,
0.04156494140625,
-0.0077667236328125,
-0.0030117034912109375,
-0.00518035888671875,
0.016448974609375,
0.007701873779296875,
-0.007183074951171875,
0.020355224609375,
-0.0305328369140625,
0.034637451171875,
-0.03289794921875,
0.0027179718017578125,
-0.036163330078125,
0.056610107421875,
-0.012176513671875,
-0.019073486328125,
-0.016204833984375,
0.022064208984375,
-0.0046844482421875,
-0.068603515625,
0.026275634765625,
-0.0153350830078125,
-0.051422119140625,
0.0174560546875,
-0.01453399658203125,
-0.0180511474609375,
0.00688934326171875,
-0.0185089111328125,
-0.00215911865234375,
-0.049774169921875,
0.030303955078125,
-0.053680419921875,
0.01448822021484375,
-0.0146636962890625,
0.035247802734375,
-0.05963134765625,
-0.0015735626220703125,
-0.033935546875,
-0.08563232421875,
0.00672149658203125,
-0.071044921875,
0.034454345703125,
0.0271759033203125,
-0.00292205810546875,
0.00029921531677246094,
0.032012939453125,
0.00896453857421875,
0.0040740966796875,
0.004962921142578125,
0.0157318115234375,
-0.051544189453125,
-0.01496124267578125,
0.020660400390625,
-0.043609619140625,
-0.01690673828125,
-0.008758544921875,
-0.01654052734375,
0.006134033203125,
-0.037872314453125,
-0.033050537109375,
-0.008880615234375,
-0.027862548828125,
-0.09478759765625,
-0.05255126953125,
0.0212249755859375,
0.0118865966796875,
-0.043609619140625,
0.0625,
-0.052337646484375,
-0.059967041015625,
0.061767578125,
-0.0138702392578125,
0.039031982421875,
0.0005693435668945312,
0.103759765625,
0.0101318359375,
-0.00494384765625,
-0.005275726318359375,
0.00445556640625,
0.00023233890533447266,
-0.0232696533203125,
0.011810302734375,
0.00420379638671875,
0.0199432373046875,
-0.0232696533203125,
-0.0484619140625,
-0.00908660888671875,
-0.0150909423828125,
0.00792694091796875,
0.0374755859375,
0.0225677490234375,
-0.033294677734375,
0.018341064453125,
0.04425048828125,
0.0174713134765625,
-0.0077972412109375,
0.0094757080078125,
0.032958984375,
-0.00257110595703125,
-0.036895751953125,
0.01442718505859375,
0.0192718505859375,
-0.03338623046875,
0.00670623779296875,
-0.01396942138671875,
0.01401519775390625,
0.02294921875,
-0.01055908203125,
0.0097198486328125,
0.0031986236572265625,
0.038055419921875,
-0.0009393692016601562,
0.021759033203125,
-0.032867431640625,
0.047637939453125,
0.014892578125,
0.0234527587890625,
-0.0042266845703125,
0.01497650146484375,
-0.0268707275390625,
-0.05755615234375,
-0.08123779296875,
-0.016876220703125,
-0.00688934326171875,
-0.0096435546875,
0.0657958984375,
0.04510498046875,
0.047637939453125,
-0.0478515625,
-0.0051422119140625,
0.0107269287109375,
0.0272216796875,
-0.052032470703125,
-0.042877197265625,
-0.00446319580078125,
-0.019683837890625,
-0.00588226318359375,
0.004077911376953125,
0.0003197193145751953,
-0.009307861328125,
-0.00033736228942871094,
-0.0081329345703125,
0.0531005859375,
0.0865478515625,
-0.0171356201171875,
0.01256561279296875,
0.023345947265625,
-0.035919189453125,
0.0014104843139648438,
-0.019744873046875,
-0.027374267578125,
-0.0274200439453125,
-0.01047515869140625,
0.036163330078125,
-0.00995635986328125,
0.0082855224609375,
0.034759521484375,
-0.003459930419921875,
-0.0281524658203125,
0.0226287841796875,
0.0550537109375,
-0.021881103515625,
0.002208709716796875,
0.0167694091796875,
-0.0175933837890625,
0.02392578125,
0.002838134765625,
-0.01233673095703125,
-0.028106689453125,
-0.01444244384765625,
0.005611419677734375,
-0.053314208984375,
0.01641845703125,
0.0193023681640625,
0.00749969482421875,
-0.03619384765625,
-0.0044097900390625,
0.0201568603515625,
0.033966064453125,
-0.037078857421875,
-0.03082275390625,
0.06756591796875,
0.015960693359375,
-0.0222930908203125,
-0.02020263671875,
0.01296234130859375,
-0.033660888671875,
-0.003936767578125,
0.0269927978515625,
-0.01812744140625,
0.03131103515625,
-0.01171875,
-0.055511474609375,
-0.05145263671875,
0.03375244140625,
0.041534423828125,
-0.0033550262451171875,
-0.01373291015625,
-0.02496337890625,
0.00933837890625,
-0.01555633544921875,
0.025726318359375,
0.0235137939453125,
0.0087738037109375,
-0.032440185546875,
0.045806884765625,
-0.0159912109375,
0.07696533203125,
-0.054168701171875,
0.0565185546875,
-0.033538818359375,
-0.0033321380615234375,
-0.028778076171875,
0.010498046875,
0.0015153884887695312,
-0.03314208984375,
0.0167694091796875,
0.01143646240234375,
0.03289794921875,
-0.0113067626953125,
-0.0158233642578125,
-0.0022983551025390625,
0.00905609130859375,
0.009735107421875,
0.0181732177734375,
-0.0188446044921875,
-0.023406982421875,
0.0170745849609375,
-0.009796142578125,
0.021942138671875,
-0.026702880859375,
-0.0250396728515625,
-0.01126861572265625,
-0.0029239654541015625,
0.019317626953125,
-0.00986480712890625,
-0.0274200439453125,
0.047332763671875,
-0.0171051025390625,
0.0202789306640625,
0.04852294921875,
-0.005611419677734375,
0.04229736328125,
0.019134521484375,
0.01145172119140625,
0.042633056640625,
0.010009765625,
-0.0609130859375,
0.0174560546875,
0.026336669921875,
0.0034923553466796875,
-0.0231475830078125,
-0.0063934326171875,
-0.00690460205078125,
0.031280517578125,
0.035491943359375,
0.09417724609375,
-0.06500244140625,
0.0285797119140625,
0.04510498046875,
-0.01535797119140625,
0.0062713623046875,
0.0023441314697265625,
-0.01233673095703125,
-0.0193023681640625,
0.0531005859375,
-0.050140380859375,
-0.0232086181640625,
0.00838470458984375,
-0.023193359375,
0.0070648193359375,
-0.00785064697265625,
0.04315185546875,
-0.00547027587890625,
0.0158843994140625,
-0.0027523040771484375,
-0.0231475830078125,
0.0189666748046875,
-0.0260772705078125,
0.0157318115234375,
-0.0094451904296875,
-0.0166473388671875,
-0.050994873046875,
0.005252838134765625,
0.02215576171875,
-0.0215911865234375,
0.00977325439453125,
-0.0186920166015625,
0.07415771484375,
0.040252685546875,
-0.0025653839111328125,
-0.020355224609375,
0.00673675537109375,
-0.002941131591796875,
-0.0131683349609375,
0.0072174072265625,
-0.0014905929565429688,
0.00156402587890625,
0.0022144317626953125,
0.00780487060546875,
-0.032562255859375,
0.003875732421875,
0.01226806640625,
0.0050811767578125,
0.00341796875,
-0.00829315185546875,
-0.01425933837890625,
0.057220458984375,
-0.0288238525390625,
-0.0401611328125,
-0.00020611286163330078,
0.0195465087890625,
-0.036346435546875,
-0.0345458984375,
-0.0093841552734375,
-0.08258056640625,
-0.03704833984375,
-0.06146240234375,
-0.061981201171875,
0.12841796875,
0.046905517578125,
0.0172882080078125,
-0.005878448486328125,
0.0595703125,
-0.049072265625,
0.03668212890625,
-0.049713134765625,
0.06610107421875,
-0.00811004638671875,
0.0283355712890625,
-0.0994873046875,
-0.0177154541015625,
-0.0147247314453125,
0.046600341796875,
-0.0204315185546875,
0.00995635986328125,
-0.0116119384765625,
0.006671905517578125,
-0.013641357421875,
-0.051727294921875,
-0.056182861328125,
0.053863525390625,
0.034912109375,
0.00919342041015625,
0.034942626953125,
0.0240325927734375,
0.03192138671875,
0.01715087890625,
-0.019622802734375,
0.083984375,
0.020355224609375,
0.029022216796875,
0.016937255859375,
0.041534423828125,
-0.030548095703125,
0.017303466796875,
0.030792236328125,
-0.034759521484375,
-0.024139404296875,
0.00885009765625,
0.01145172119140625,
-0.10028076171875,
-0.040557861328125,
-0.0318603515625,
0.032623291015625,
-0.003570556640625,
0.0156707763671875,
0.004344940185546875,
-0.00927734375,
0.082275390625,
0.047882080078125,
0.0062408447265625,
0.045806884765625,
0.03173828125,
0.0440673828125,
0.01641845703125,
0.040496826171875,
-0.03271484375,
-0.01910400390625,
0.01473236083984375,
0.053924560546875,
-0.0279083251953125,
-0.0103607177734375,
-0.01100921630859375,
0.01116180419921875,
0.019256591796875,
-0.05780029296875,
0.01214599609375,
-0.045562744140625,
-0.022674560546875,
0.031646728515625,
-0.03912353515625,
0.004241943359375,
0.0247802734375,
0.030487060546875,
0.06787109375,
-0.01580810546875,
-0.034088134765625,
-0.02740478515625,
0.001094818115234375,
0.007171630859375,
0.005947113037109375,
0.01244354248046875,
0.053436279296875,
0.028961181640625,
0.003887176513671875,
-0.006832122802734375,
0.00144195556640625,
0.00966644287109375,
0.0012216567993164062,
-0.036865234375,
-0.017608642578125,
0.034515380859375,
0.04443359375,
-0.0249176025390625,
0.036834716796875,
0.041839599609375,
-0.006885528564453125,
-0.071533203125,
-0.01406097412109375,
-0.0191192626953125,
-0.06683349609375,
0.006282806396484375,
-0.04486083984375,
0.01470947265625,
0.02386474609375,
0.002765655517578125,
0.006908416748046875,
-0.02215576171875,
0.0592041015625,
-0.025909423828125,
0.04071044921875,
-0.00836181640625,
-0.002185821533203125,
0.015625,
-0.022552490234375,
0.0014982223510742188,
0.0011529922485351562,
-0.01032257080078125,
0.01141357421875,
-0.01102447509765625,
-0.057037353515625,
-0.0229949951171875,
0.024169921875,
-0.0284576416015625,
0.03350830078125,
0.025421142578125,
-0.0304107666015625,
0.0260162353515625,
-0.0026988983154296875,
0.0295257568359375,
0.0390625,
0.0005335807800292969,
0.0120697021484375,
-0.0017824172973632812,
-0.0024051666259765625,
0.0064544677734375,
0.0216827392578125,
-0.01474761962890625,
0.048828125,
-0.00830078125,
0.00356292724609375,
-0.0225677490234375,
0.03411865234375,
-0.05474853515625,
0.0007696151733398438,
-0.00887298583984375,
-0.021575927734375,
-0.01557159423828125,
-0.0027713775634765625,
-0.01169586181640625,
0.053466796875,
0.014739990234375,
-0.027313232421875,
0.03387451171875,
0.005123138427734375,
-0.0000883936882019043,
-0.0080108642578125,
0.0201416015625,
-0.033843994140625,
-0.04107666015625,
-0.030792236328125,
0.00473785400390625,
-0.00519561767578125,
-0.0169830322265625,
-0.010986328125,
0.01232147216796875,
0.004528045654296875,
0.006092071533203125,
-0.002872467041015625,
-0.0036468505859375,
-0.0007719993591308594,
0.01348114013671875,
-0.0254058837890625,
0.034912109375,
0.005451202392578125,
-0.0228118896484375,
0.01093292236328125,
0.0204925537109375,
-0.046112060546875,
0.031890869140625,
-0.035980224609375,
-0.0103912353515625,
0.0082550048828125,
0.028228759765625,
0.005279541015625,
0.00850677490234375,
-0.02044677734375,
0.00601959228515625,
-0.0143585205078125,
-0.006404876708984375,
0.00949859619140625,
-0.035858154296875,
-0.0013132095336914062,
0.0019741058349609375,
-0.01129913330078125,
0.0279083251953125,
0.0535888671875,
0.0222320556640625,
-0.0049896240234375,
-0.025909423828125,
-0.02239990234375,
0.002735137939453125,
-0.032196044921875,
0.08154296875,
-0.052886962890625,
0.0377197265625,
-0.0275115966796875,
-0.0261993408203125,
-0.014495849609375,
-0.01123046875,
-0.033843994140625,
0.05120849609375,
0.01180267333984375,
-0.00128936767578125,
0.030487060546875,
-0.0203399658203125,
-0.048583984375,
-0.0014553070068359375,
0.01110076904296875,
0.036590576171875,
0.0045928955078125,
-0.0465087890625,
-0.005100250244140625,
0.022064208984375,
0.038482666015625,
-0.0386962890625,
-0.035247802734375,
-0.004154205322265625,
0.03924560546875,
-0.039459228515625,
0.0011615753173828125,
0.0176849365234375,
-0.055877685546875,
-0.09716796875,
0.0450439453125,
-0.0146942138671875,
-0.03887939453125,
-0.014739990234375,
-0.00745391845703125,
0.019683837890625,
-0.04559326171875,
-0.0164794921875,
-0.00830841064453125,
-0.049713134765625,
0.01386260986328125,
0.0198516845703125,
0.01611328125,
0.043121337890625,
0.0106048583984375,
-0.0284881591796875,
0.00272369384765625,
-0.0132598876953125,
0.0024871826171875,
0.0242767333984375,
-0.03448486328125,
0.054901123046875,
0.057891845703125,
-0.021209716796875,
-0.03741455078125,
-0.004528045654296875,
-0.053009033203125,
0.005878448486328125,
0.0272979736328125,
-0.050140380859375,
-0.00249481201171875,
0.08465576171875,
0.061187744140625,
0.030548095703125,
-0.038543701171875,
0.06561279296875,
0.043060302734375,
-0.0499267578125,
0.0287322998046875,
0.0195770263671875,
-0.0038242340087890625,
-0.0212860107421875,
-0.0042266845703125,
-0.00897979736328125,
-0.026947021484375,
0.015869140625,
-0.023681640625,
-0.0145416259765625,
0.0203857421875,
-0.0130462646484375,
-0.016937255859375,
-0.0025959014892578125,
0.052215576171875,
-0.033782958984375,
-0.00881195068359375,
0.0191650390625,
0.0046234130859375,
0.01546478271484375,
0.0310516357421875,
0.017822265625,
0.01959228515625,
-0.034027099609375,
0.01593017578125,
0.0174713134765625,
-0.005786895751953125,
-0.057525634765625,
-0.0214080810546875,
-0.0069427490234375,
0.0003771781921386719,
-0.0044403076171875,
0.0004119873046875,
0.0290069580078125,
-0.01247406005859375,
-0.0269775390625,
0.055633544921875,
-0.034515380859375,
0.03692626953125,
-0.0210418701171875,
0.016632080078125,
0.0005879402160644531,
0.0220489501953125,
0.07757568359375,
-0.0341796875,
0.0206756591796875,
0.0401611328125,
-0.029449462890625,
0.00843048095703125,
-0.01078033447265625,
0.01239013671875,
-0.00890350341796875,
-0.0205841064453125
] |
c6a1e69a4267894c76ebfaed8a368078cc4d7e28
|
Wordpress Stackexchange
Q: Do not allow to search certain words I would like to delete (not allow) searches with certain keywords (eg "of", "a").
If the search is done using exactly these terms, do not return anything or redirect to 404 page ...
Thanks guys.
A: Try this in your functions.php, and change news for whatever you want to be blocked in your site.
add_action('wp', 'check_search');
function check_search() {
global $wp_query;
if (!$s = get_search_query())
return false;
if (preg_match('/news/', $s)) {
$wp_query->set_404();
status_header(404);
get_template_part(404);
exit();
}
}
Hope it helps.
|
Q: Do not allow to search certain words I would like to delete (not allow) searches with certain keywords (eg "of", "a").
If the search is done using exactly these terms, do not return anything or redirect to 404 page ...
Thanks guys.
A: Try this in your functions.php, and change news for whatever you want to be blocked in your site.
add_action('wp', 'check_search');
function check_search() {
global $wp_query;
if (!$s = get_search_query())
return false;
if (preg_match('/news/', $s)) {
$wp_query->set_404();
status_header(404);
get_template_part(404);
exit();
}
}
Hope it helps.
|
wordpress
|
{
"language": "en",
"length": 88,
"provenance": "stackexchange_00019.jsonl.gz:421138",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56281"
}
|
[
0.03668212890625,
0.001781463623046875,
0.03515625,
0.039581298828125,
0.0084686279296875,
-0.0220184326171875,
0.0877685546875,
-0.06439208984375,
0.04132080078125,
0.0277557373046875,
-0.01476287841796875,
0.0016918182373046875,
0.0111541748046875,
-0.013092041015625,
-0.0201416015625,
-0.01184844970703125,
0.005489349365234375,
-0.0372314453125,
-0.00485992431640625,
-0.037322998046875,
0.031890869140625,
-0.0323486328125,
0.028564453125,
-0.00962066650390625,
-0.02545166015625,
-0.036865234375,
0.07818603515625,
-0.03485107421875,
-0.00022661685943603516,
-0.032501220703125,
0.005901336669921875,
0.00811004638671875,
-0.005878448486328125,
0.0560302734375,
-0.0421142578125,
-0.017822265625,
0.0020275115966796875,
0.0445556640625,
0.017486572265625,
0.016876220703125,
0.0294342041015625,
-0.0245819091796875,
-0.043548583984375,
0.05718994140625,
-0.0236663818359375,
-0.07073974609375,
0.06085205078125,
-0.0202789306640625,
0.01499176025390625,
0.00650787353515625,
0.01922607421875,
0.002719879150390625,
0.040802001953125,
-0.035400390625,
-0.0299072265625,
-0.0246429443359375,
0.0189208984375,
-0.0022182464599609375,
0.0163726806640625,
-0.0084686279296875,
-0.023681640625,
0.038848876953125,
0.0135498046875,
-0.006633758544921875,
-0.00405120849609375,
-0.010284423828125,
-0.01161956787109375,
0.0245513916015625,
-0.0889892578125,
-0.0088043212890625,
0.07177734375,
-0.05645751953125,
0.01491546630859375,
-0.012847900390625,
-0.002147674560546875,
-0.035858154296875,
0.0181121826171875,
-0.002956390380859375,
-0.0006895065307617188,
-0.00411224365234375,
0.041595458984375,
-0.034881591796875,
-0.0209808349609375,
0.0145263671875,
-0.00788116455078125,
-0.00450897216796875,
0.004146575927734375,
-0.0013275146484375,
-0.023895263671875,
-0.033172607421875,
-0.0242156982421875,
-0.0196685791015625,
-0.0195465087890625,
-0.0155792236328125,
-0.021881103515625,
-0.0171356201171875,
0.0123291015625,
0.072509765625,
-0.00080108642578125,
0.025970458984375,
-0.034515380859375,
-0.008575439453125,
-0.0302276611328125,
-0.03485107421875,
0.025115966796875,
0.0408935546875,
-0.01094818115234375,
-0.005413055419921875,
0.043365478515625,
0.0157470703125,
0.02191162109375,
0.0094757080078125,
-0.008087158203125,
-0.0321044921875,
-0.0258026123046875,
0.05804443359375,
0.0178070068359375,
-0.0194549560546875,
0.00830078125,
0.0091400146484375,
0.0123138427734375,
0.018310546875,
0.023956298828125,
-0.031036376953125,
-0.0178680419921875,
-0.02532958984375,
-0.02960205078125,
-0.011138916015625,
0.0165863037109375,
0.025909423828125,
-0.0199432373046875,
0.01404571533203125,
0.006500244140625,
-0.0202789306640625,
-0.031280517578125,
-0.01142120361328125,
0.0197906494140625,
0.00860595703125,
-0.0069580078125,
-0.0036067962646484375,
0.047760009765625,
-0.0170135498046875,
-0.00836944580078125,
0.02227783203125,
0.05419921875,
0.000244140625,
0.034210205078125,
0.0328369140625,
0.01861572265625,
-0.02777099609375,
0.017730712890625,
0.039215087890625,
0.08453369140625,
-0.0183868408203125,
-0.085205078125,
-0.049041748046875,
0.02276611328125,
-0.042816162109375,
-0.04779052734375,
-0.086181640625,
0.012847900390625,
0.006744384765625,
0.019134521484375,
-0.02789306640625,
-0.035125732421875,
-0.031005859375,
-0.039794921875,
-0.01049041748046875,
0.01476287841796875,
0.002986907958984375,
0.0206756591796875,
-0.03204345703125,
0.005329132080078125,
-0.0111083984375,
-0.01535797119140625,
-0.003269195556640625,
0.0307159423828125,
0.0215606689453125,
-0.018890380859375,
0.06805419921875,
0.005847930908203125,
-0.0379638671875,
0.02850341796875,
-0.031280517578125,
-0.055816650390625,
0.04925537109375,
0.0181732177734375,
0.037261962890625,
-0.00658416748046875,
-0.003223419189453125,
0.08831787109375,
0.03631591796875,
-0.00679779052734375,
0.043487548828125,
0.016845703125,
-0.049163818359375,
-0.01904296875,
-0.016937255859375,
0.0044403076171875,
-0.01898193359375,
0.08099365234375,
0.02862548828125,
-0.027435302734375,
-0.03411865234375,
-0.11181640625,
0.002811431884765625,
-0.026275634765625,
0.04150390625,
-0.057952880859375,
0.00670623779296875,
0.051788330078125,
-0.013092041015625,
-0.04632568359375,
0.037506103515625,
0.0117645263671875,
-0.003875732421875,
0.0167083740234375,
0.035797119140625,
0.01776123046875,
0.04205322265625,
0.0239105224609375,
-0.032196044921875,
0.0183563232421875,
0.003627777099609375,
0.050506591796875,
-0.00753021240234375,
-0.008941650390625,
-0.0141448974609375,
0.0494384765625,
0.004962921142578125,
-0.0269927978515625,
0.028717041015625,
0.06256103515625,
0.07379150390625,
0.040130615234375,
0.036163330078125,
0.06585693359375,
-0.0828857421875,
0.0089263916015625,
0.0272064208984375,
0.0231781005859375,
0.0295867919921875,
-0.0625,
-0.0526123046875,
0.0216064453125,
-0.054931640625,
-0.01445770263671875,
-0.017242431640625,
0.00992584228515625,
0.05499267578125,
-0.0206756591796875,
-0.004398345947265625,
0.024993896484375,
-0.013580322265625,
-0.0083465576171875,
0.032257080078125,
-0.0139923095703125,
-0.00885772705078125,
-0.017913818359375,
-0.0064239501953125,
0.0206756591796875,
0.028778076171875,
-0.015533447265625,
0.0268707275390625,
-0.0008654594421386719,
-0.0094757080078125,
-0.01238250732421875,
0.0013093948364257812,
-0.0208282470703125,
0.012725830078125,
0.0294189453125,
-0.0296630859375,
0.007537841796875,
0.0552978515625,
0.038177490234375,
0.01102447509765625,
-0.032135009765625,
-0.006805419921875,
0.01715087890625,
0.03411865234375,
0.0021839141845703125,
0.060699462890625,
0.010498046875,
-0.020538330078125,
-0.03509521484375,
-0.0158233642578125,
0.01181793212890625,
0.004825592041015625,
0.00659942626953125,
0.0098724365234375,
0.032806396484375,
0.04443359375,
0.0093994140625,
0.02752685546875,
-0.016143798828125,
0.0164031982421875,
-0.032135009765625,
-0.0269012451171875,
0.01284027099609375,
-0.0168304443359375,
0.05303955078125,
0.0665283203125,
-0.004238128662109375,
-0.007244110107421875,
0.00905609130859375,
0.006561279296875,
0.00970458984375,
-0.0197296142578125,
-0.01332855224609375,
0.0304412841796875,
-0.10211181640625,
-0.0057525634765625,
0.024078369140625,
-0.0117034912109375,
0.046630859375,
0.00347900390625,
0.0261383056640625,
0.02734375,
-0.0421142578125,
-0.0369873046875,
0.0281219482421875,
-0.0019407272338867188,
-0.0019178390502929688,
0.025634765625,
-0.000530242919921875,
-0.0213623046875,
0.0352783203125,
-0.01020050048828125,
-0.01617431640625,
0.0031833648681640625,
-0.00415802001953125,
0.0118408203125,
-0.010833740234375,
0.046478271484375,
-0.0026531219482421875,
0.00104522705078125,
0.017333984375,
0.046112060546875,
0.01898193359375,
-0.057525634765625,
0.0312347412109375,
0.044097900390625,
-0.0225067138671875,
0.022430419921875,
0.0139923095703125,
-0.0311431884765625,
-0.018951416015625,
-0.00827789306640625,
0.047515869140625,
0.0163421630859375,
-0.01399993896484375,
0.01522064208984375,
-0.01377105712890625,
0.0408935546875,
0.0416259765625,
-0.01494598388671875,
-0.0285186767578125,
0.03173828125,
0.027862548828125,
-0.0168304443359375,
-0.01392364501953125,
-0.00513458251953125,
-0.034210205078125,
0.0119781494140625,
0.0296478271484375,
0.007755279541015625,
-0.01953125,
0.01153564453125,
0.05230712890625,
0.06390380859375,
-0.0180206298828125,
0.004543304443359375,
0.056610107421875,
0.01171112060546875,
0.02630615234375,
-0.051116943359375,
0.0226898193359375,
-0.0207672119140625,
0.0014848709106445312,
0.003185272216796875,
-0.00449371337890625,
0.0023822784423828125,
-0.0008754730224609375,
-0.011138916015625,
0.00030541419982910156,
0.033935546875,
-0.0188751220703125,
0.0297393798828125,
-0.03997802734375,
-0.03643798828125,
-0.0211029052734375,
0.07080078125,
-0.036285400390625,
-0.0093536376953125,
-0.0655517578125,
-0.01406097412109375,
0.026123046875,
-0.05255126953125,
0.0210113525390625,
-0.0228271484375,
-0.0810546875,
-0.0014696121215820312,
-0.025665283203125,
-0.0278167724609375,
-0.01265716552734375,
-0.031097412109375,
-0.025665283203125,
-0.048370361328125,
0.0374755859375,
-0.0091094970703125,
0.027862548828125,
0.0172271728515625,
-0.0016508102416992188,
0.004177093505859375,
-0.0299530029296875,
-0.0217132568359375,
-0.07421875,
-0.00496673583984375,
-0.0025920867919921875,
0.040740966796875,
0.004581451416015625,
-0.003337860107421875,
0.0216522216796875,
0.0726318359375,
0.031219482421875,
-0.019012451171875,
0.004863739013671875,
-0.0419921875,
0.0176239013671875,
0.0699462890625,
-0.005306243896484375,
0.0179901123046875,
0.0010213851928710938,
0.0015020370483398438,
0.005367279052734375,
0.0178375244140625,
-0.045684814453125,
-0.0080108642578125,
-0.0109100341796875,
-0.023651123046875,
-0.0058746337890625,
-0.00724029541015625,
-0.038909912109375,
0.0168609619140625,
-0.007476806640625,
-0.023956298828125,
0.0040435791015625,
-0.04071044921875,
0.06402587890625,
0.03082275390625,
-0.01812744140625,
-0.00708770751953125,
0.07666015625,
0.0199127197265625,
-0.034393310546875,
-0.0219573974609375,
-0.0008072853088378906,
0.0034332275390625,
-0.017730712890625,
0.021881103515625,
-0.050537109375,
-0.00675201416015625,
0.048553466796875,
-0.058624267578125,
-0.034698486328125,
0.0082244873046875,
0.043060302734375,
0.00909423828125,
-0.0268096923828125,
0.01080322265625,
-0.03155517578125,
0.036834716796875,
0.039031982421875,
0.006343841552734375,
-0.030853271484375,
0.033935546875,
0.029327392578125,
-0.03887939453125,
0.045684814453125,
0.0012149810791015625,
0.0098724365234375,
0.00618743896484375,
0.024200439453125,
0.0167388916015625,
0.016815185546875,
-0.0010967254638671875,
-0.033111572265625,
-0.0089569091796875,
-0.0249176025390625,
-0.0119781494140625,
0.0092620849609375,
-0.01244354248046875,
0.033538818359375,
-0.0517578125,
-0.041717529296875,
-0.01554107666015625,
-0.01334381103515625,
0.056640625,
-0.0280914306640625,
-0.059906005859375,
0.031158447265625,
-0.00543975830078125,
-0.038665771484375,
0.054473876953125,
0.0312042236328125,
0.0014820098876953125,
0.0197296142578125,
0.004680633544921875,
0.0256500244140625,
0.0271453857421875,
0.017425537109375,
-0.006134033203125,
0.022003173828125,
-0.0049896240234375,
-0.0134429931640625,
-0.0120697021484375,
0.03240966796875,
-0.03582763671875,
0.01617431640625,
-0.005214691162109375,
0.0169677734375,
0.0024566650390625,
0.0113067626953125,
-0.00664520263671875,
0.0245361328125,
0.035614013671875,
-0.029510498046875,
0.05145263671875,
-0.0226287841796875,
-0.05853271484375,
0.01444244384765625,
0.0014314651489257812,
-0.039337158203125,
0.01390838623046875,
0.024627685546875,
0.0400390625,
0.01003265380859375,
0.026031494140625,
0.034912109375,
-0.004138946533203125,
-0.018585205078125,
-0.0394287109375,
0.01166534423828125,
0.0007967948913574219,
0.007305145263671875,
-0.01190948486328125,
-0.022857666015625,
-0.044281005859375,
0.036865234375,
-0.053741455078125,
-0.037261962890625,
-0.0114898681640625,
-0.00441741943359375,
-0.032440185546875,
0.022857666015625,
-0.04693603515625,
0.0168914794921875,
-0.0286102294921875,
-0.0212249755859375,
0.0367431640625,
0.004802703857421875,
0.0220489501953125,
-0.0219879150390625,
-0.01378631591796875,
0.060333251953125,
-0.0022373199462890625,
0.0249481201171875,
-0.032806396484375,
-0.060272216796875,
-0.0289306640625,
-0.0236663818359375,
-0.019073486328125,
-0.0428466796875,
0.002513885498046875,
-0.029571533203125,
0.0223846435546875,
0.01751708984375,
0.01012420654296875,
0.0077362060546875,
-0.018890380859375,
0.0089569091796875,
0.032470703125,
0.006641387939453125,
0.0194549560546875,
-0.039947509765625,
0.0082855224609375,
0.03363037109375,
-0.035003662109375,
0.0037441253662109375,
0.013153076171875,
0.0357666015625,
-0.01239776611328125,
0.005535125732421875,
-0.06390380859375,
-0.0310516357421875,
0.0275421142578125,
-0.0809326171875,
0.03350830078125,
0.056640625,
-0.0058441162109375,
-0.032440185546875,
-0.021759033203125,
0.0061492919921875,
-0.026397705078125,
0.078857421875,
-0.0011730194091796875,
0.004787445068359375,
-0.04803466796875,
-0.0092620849609375,
0.038421630859375,
-0.0289459228515625,
-0.028656005859375,
0.0245208740234375,
-0.01502227783203125,
0.0258941650390625,
0.0157928466796875,
-0.00839996337890625,
0.033782958984375,
0.01788330078125,
-0.00528717041015625,
0.056793212890625,
0.0126953125,
0.039764404296875,
0.0212860107421875,
0.00589752197265625,
0.0010919570922851562,
-0.02294921875,
0.034698486328125,
-0.0170440673828125,
-0.019378662109375,
0.0169830322265625,
-0.0217132568359375,
-0.0191802978515625,
0.08001708984375,
0.04498291015625,
-0.104736328125,
-0.01445770263671875,
0.01751708984375,
0.0154266357421875,
-0.01058197021484375,
0.02264404296875,
0.03704833984375,
0.0017528533935546875,
-0.0254974365234375,
0.036346435546875,
-0.0282745361328125,
-0.00609588623046875,
0.01178741455078125,
-0.01491546630859375,
0.01520538330078125,
0.0096282958984375,
-0.00400543212890625,
-0.059417724609375,
-0.005458831787109375,
0.01537322998046875,
-0.023529052734375,
-0.0202484130859375,
0.019500732421875,
0.031219482421875,
-0.00843048095703125,
-0.0799560546875,
0.0218505859375,
-0.00036787986755371094,
-0.0290985107421875,
0.0167999267578125,
0.0007834434509277344,
0.005268096923828125,
0.05584716796875,
-0.031219482421875,
0.033203125,
0.01776123046875,
-0.02923583984375,
0.0017566680908203125,
-0.0142822265625,
0.007099151611328125,
-0.0101318359375,
-0.0280914306640625,
0.0186767578125,
-0.031005859375,
-0.0287017822265625,
-0.0059356689453125,
-0.0167999267578125,
0.020843505859375,
-0.0280303955078125,
-0.003734588623046875,
0.0202484130859375,
0.024871826171875,
0.00911712646484375,
-0.00884246826171875,
-0.00989532470703125,
-0.0572509765625,
-0.007396697998046875,
-0.00020897388458251953,
-0.01309967041015625,
0.0139923095703125,
-0.0011663436889648438,
-0.040008544921875,
0.038421630859375,
-0.0246124267578125,
0.018463134765625,
0.0284423828125,
0.00949859619140625,
-0.0234222412109375,
-0.00014913082122802734,
-0.03717041015625,
0.0528564453125,
-0.00580596923828125,
0.0238037109375,
-0.045196533203125,
0.00001150369644165039,
-0.003986358642578125,
-0.0106201171875,
0.048614501953125,
-0.0007524490356445312,
0.0197601318359375,
-0.01255035400390625,
0.03216552734375,
0.04254150390625,
-0.009674072265625,
-0.0101470947265625,
-0.01247406005859375,
0.0207672119140625,
0.036865234375,
-0.0699462890625,
0.0004930496215820312,
0.00494384765625,
0.007137298583984375,
0.015655517578125,
0.00872802734375,
0.01114654541015625,
-0.0174560546875,
0.0084991455078125,
-0.0260162353515625,
-0.020660400390625,
0.01959228515625,
-0.0004303455352783203,
0.0367431640625,
0.0074462890625,
0.0293731689453125,
-0.0936279296875,
-0.015960693359375,
-0.0268402099609375,
0.0418701171875,
-0.0001780986785888672,
0.0212554931640625,
0.0509033203125,
0.0233612060546875,
0.0270233154296875,
-0.010223388671875,
0.031646728515625,
-0.003032684326171875,
-0.031280517578125,
-0.00974273681640625,
0.0173492431640625,
0.0230865478515625,
-0.0325927734375,
-0.007640838623046875,
0.0200653076171875,
0.0132293701171875,
-0.004638671875,
-0.055267333984375,
-0.016510009765625,
-0.006900787353515625,
0.043548583984375,
-0.00007480382919311523,
0.0179901123046875,
0.07183837890625,
0.08160400390625,
-0.0252685546875,
0.0216522216796875,
0.031982421875,
-0.00675201416015625,
-0.0125885009765625,
0.0248565673828125,
-0.033203125,
0.036895751953125,
-0.0261993408203125,
0.01451873779296875,
0.0142059326171875,
0.0283050537109375,
-0.002902984619140625,
0.0170440673828125,
0.01427459716796875,
0.0037784576416015625,
-0.01496124267578125,
0.034088134765625,
-0.018035888671875,
0.0217132568359375,
-0.050811767578125,
-0.050140380859375,
0.017181396484375,
0.039825439453125,
0.0229644775390625,
-0.0259552001953125,
0.0237274169921875,
0.0308990478515625,
-0.029144287109375,
-0.006885528564453125,
0.0306396484375,
-0.0119171142578125,
-0.0164642333984375,
0.0017499923706054688,
-0.03271484375,
0.0234375,
-0.0197906494140625,
-0.0142364501953125,
0.0240325927734375,
0.01207733154296875,
0.038482666015625,
-0.02392578125,
0.0185089111328125,
-0.037353515625,
0.016448974609375,
0.0011272430419921875,
0.03363037109375,
0.0440673828125,
-0.0731201171875,
0.015594482421875,
-0.05584716796875,
-0.078857421875,
0.017425537109375,
0.02508544921875,
-0.0269012451171875,
0.0086822509765625,
0.00986480712890625,
-0.017822265625,
0.020538330078125,
-0.00191497802734375,
0.030609130859375,
0.007152557373046875,
-0.0090484619140625,
0.006160736083984375,
-0.007427215576171875,
0.01263427734375,
0.051544189453125,
-0.0005764961242675781,
-0.0196990966796875,
0.08062744140625,
-0.0119476318359375,
-0.0249786376953125,
0.01824951171875,
0.018890380859375,
-0.0002715587615966797,
-0.00499725341796875,
0.036865234375,
0.004947662353515625,
0.006458282470703125,
-0.0213470458984375,
-0.032012939453125,
0.02227783203125,
0.035980224609375,
-0.0177459716796875,
0.0379638671875,
-0.01068878173828125,
-0.0031375885009765625,
-0.042633056640625,
0.0010204315185546875,
-0.04217529296875,
-0.0173797607421875,
-0.0304718017578125,
-0.0347900390625,
0.02935791015625,
-0.00948333740234375,
-0.01262664794921875,
0.03125,
0.0008616447448730469,
-0.0262908935546875,
0.030975341796875,
-0.057037353515625,
0.044586181640625,
0.03863525390625,
-0.01666259765625,
-0.007099151611328125,
-0.01544189453125,
-0.019073486328125,
-0.00844573974609375,
0.0272369384765625,
-0.036529541015625,
-0.0016765594482421875,
0.039093017578125,
-0.0849609375,
-0.08074951171875,
-0.0016469955444335938,
-0.0162506103515625,
-0.0159759521484375,
-0.08258056640625,
0.015533447265625,
-0.0321044921875,
0.01497650146484375,
-0.027099609375,
-0.0236053466796875,
-0.0240478515625,
-0.003170013427734375,
-0.0146026611328125,
-0.072021484375,
-0.029693603515625,
0.0200347900390625,
0.06353759765625,
0.02655029296875,
-0.07373046875,
0.0556640625,
-0.033721923828125,
0.0192718505859375,
0.048492431640625,
0.04119873046875,
-0.0272369384765625,
0.01151275634765625,
-0.044769287109375,
0.0157928466796875,
-0.039154052734375,
0.00787353515625,
-0.0084381103515625,
0.0035495758056640625,
0.0211639404296875,
-0.0010442733764648438,
-0.0238189697265625,
-0.004085540771484375,
-0.0005440711975097656,
0.0362548828125,
0.0029754638671875,
-0.0284576416015625,
0.0246124267578125,
-0.01396942138671875,
-0.02740478515625,
-0.045440673828125,
0.006137847900390625,
-0.06744384765625,
-0.0239410400390625,
0.04461669921875,
-0.031036376953125,
-0.007904052734375,
-0.049774169921875,
-0.0916748046875,
-0.0037059783935546875,
0.00444793701171875,
-0.052520751953125,
-0.02227783203125,
-0.017059326171875,
0.01142120361328125,
-0.00653839111328125,
-0.00975799560546875,
0.01971435546875,
-0.0750732421875,
-0.0318603515625,
0.031341552734375,
0.0172882080078125,
0.0085906982421875,
0.0355224609375,
-0.006099700927734375,
0.06549072265625,
0.040496826171875,
-0.0229949951171875,
-0.01123809814453125,
-0.013916015625,
0.042236328125,
0.039794921875,
-0.0158843994140625,
0.04364013671875,
0.03350830078125,
-0.01438140869140625,
-0.0156402587890625,
-0.0306243896484375,
-0.036163330078125,
-0.027191162109375,
0.048065185546875,
0.0528564453125,
0.01256561279296875,
-0.01447296142578125,
-0.01708984375,
-0.0003345012664794922,
-0.00907135009765625,
-0.00551605224609375,
0.020477294921875,
-0.07244873046875,
-0.018402099609375,
0.0181427001953125,
0.00875091552734375,
0.0167388916015625,
-0.029876708984375,
-0.01291656494140625,
-0.0017261505126953125,
0.0147552490234375,
0.0033550262451171875,
0.01053619384765625,
0.03955078125,
0.0194549560546875,
-0.03546142578125,
-0.0117645263671875,
-0.047882080078125,
0.0110015869140625,
-0.0279541015625,
-0.09527587890625,
0.0153045654296875,
0.011993408203125,
0.0010776519775390625,
-0.00270843505859375,
0.03167724609375,
-0.0182342529296875,
0.0180206298828125,
-0.01413726806640625,
-0.031524658203125,
0.0241241455078125,
0.026458740234375,
0.0111236572265625,
-0.0633544921875,
0.03057861328125,
0.0258331298828125,
0.018310546875,
0.016265869140625,
0.027069091796875,
0.01239776611328125,
0.033966064453125,
0.03228759765625,
-0.040252685546875,
0.06524658203125,
-0.052001953125,
-0.00010573863983154297,
-0.01302337646484375,
-0.02813720703125,
-0.022857666015625,
0.0023670196533203125,
-0.0138397216796875,
-0.0164031982421875,
0.0182952880859375
] |
809be9add296c1dc438d45f72c1e8fa31c113ca9
|
Wordpress Stackexchange
Q: "Donate to this plugin" for WordPress.org Plugin Authors I recently saw a link titled "Donate to this plugin >" link on a WordPress theme (and then I did!). How is this added to a plugin's page on wordpress.org?
Here's a screenshot:
A: It is read from the infos on your plugins readme.txt. Example from my Default Values for Attachments
=== Plugin Name ===
Contributors: moraleida.me
Donate link: http://moraleida.me/
Tags: attachments, default values, caption, title, description
Requires at least: 2.5 Tested up to: 3.3.2 Stable
tag: 0.1 License: GPLv2 or later License URI:
http://www.gnu.org/licenses/gpl-2.0.html
|
Q: "Donate to this plugin" for WordPress.org Plugin Authors I recently saw a link titled "Donate to this plugin >" link on a WordPress theme (and then I did!). How is this added to a plugin's page on wordpress.org?
Here's a screenshot:
A: It is read from the infos on your plugins readme.txt. Example from my Default Values for Attachments
=== Plugin Name ===
Contributors: moraleida.me
Donate link: http://moraleida.me/
Tags: attachments, default values, caption, title, description
Requires at least: 2.5 Tested up to: 3.3.2 Stable
tag: 0.1 License: GPLv2 or later License URI:
http://www.gnu.org/licenses/gpl-2.0.html
|
wordpress
|
{
"language": "en",
"length": 94,
"provenance": "stackexchange_00019.jsonl.gz:421141",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56293"
}
|
[
0.04510498046875,
0.0041656494140625,
0.0260162353515625,
-0.004573822021484375,
0.006465911865234375,
-0.009521484375,
0.035064697265625,
-0.05029296875,
-0.07574462890625,
0.01454925537109375,
-0.035888671875,
0.0396728515625,
-0.0330810546875,
-0.0120086669921875,
0.042236328125,
-0.046875,
0.043426513671875,
-0.006793975830078125,
0.052032470703125,
0.010223388671875,
0.00711822509765625,
0.036773681640625,
0.0265350341796875,
0.0276336669921875,
0.0279541015625,
0.0297698974609375,
0.120361328125,
-0.0152130126953125,
0.0242156982421875,
-0.0019483566284179688,
0.041961669921875,
-0.07025146484375,
0.0257110595703125,
0.01290130615234375,
-0.037261962890625,
-0.04144287109375,
0.0300445556640625,
-0.020111083984375,
-0.0183563232421875,
0.03997802734375,
0.05657958984375,
-0.0307769775390625,
-0.066162109375,
-0.004787445068359375,
-0.02978515625,
-0.060791015625,
0.08819580078125,
0.01522064208984375,
0.00888824462890625,
0.0165252685546875,
0.015380859375,
0.020111083984375,
0.0213470458984375,
-0.01413726806640625,
-0.0006680488586425781,
0.0016317367553710938,
-0.020751953125,
0.03173828125,
-0.0088348388671875,
0.017730712890625,
0.0006093978881835938,
0.046417236328125,
-0.007450103759765625,
0.028411865234375,
0.016815185546875,
0.00738525390625,
-0.005466461181640625,
0.012908935546875,
-0.003875732421875,
0.0128021240234375,
0.00778961181640625,
-0.0252532958984375,
-0.017852783203125,
0.01690673828125,
-0.03399658203125,
-0.03643798828125,
0.01116943359375,
-0.052978515625,
0.027099609375,
0.02496337890625,
0.036773681640625,
-0.016632080078125,
-0.01245880126953125,
0.01812744140625,
0.0059356689453125,
0.045684814453125,
0.00452423095703125,
-0.03985595703125,
-0.042083740234375,
-0.01320648193359375,
-0.027587890625,
0.005435943603515625,
-0.03118896484375,
-0.016265869140625,
-0.0287628173828125,
0.005161285400390625,
0.054931640625,
0.0794677734375,
0.004039764404296875,
0.00865936279296875,
-0.02685546875,
-0.0309906005859375,
-0.01299285888671875,
-0.031982421875,
-0.0198974609375,
0.0031070709228515625,
0.001995086669921875,
-0.004131317138671875,
0.0092926025390625,
0.043548583984375,
-0.006961822509765625,
-0.0224609375,
0.0124053955078125,
-0.006343841552734375,
0.0188751220703125,
-0.0236663818359375,
-0.046600341796875,
0.07073974609375,
0.001018524169921875,
0.037567138671875,
-0.003726959228515625,
0.0159912109375,
-0.0007843971252441406,
-0.0106658935546875,
-0.0174560546875,
-0.0121002197265625,
0.00443267822265625,
-0.04248046875,
-0.0273895263671875,
-0.0183868408203125,
-0.0267791748046875,
0.0236968994140625,
0.08465576171875,
0.0518798828125,
0.0037174224853515625,
-0.0131683349609375,
0.0268402099609375,
-0.02105712890625,
-0.014678955078125,
0.00797271728515625,
-0.01910400390625,
-0.0092620849609375,
0.033599853515625,
-0.0266265869140625,
0.01546478271484375,
0.02471923828125,
-0.00011330842971801758,
0.01276397705078125,
0.01239013671875,
-0.036773681640625,
0.0217132568359375,
-0.039703369140625,
0.032958984375,
-0.00704193115234375,
0.0235595703125,
-0.04339599609375,
0.0309906005859375,
-0.0408935546875,
0.0244140625,
-0.0163421630859375,
0.00638580322265625,
0.007415771484375,
0.0269317626953125,
-0.010498046875,
-0.0032196044921875,
0.0015306472778320312,
-0.0120086669921875,
0.0082855224609375,
0.01462554931640625,
0.019561767578125,
-0.00009745359420776367,
-0.0163116455078125,
0.00775146484375,
0.00855255126953125,
-0.003070831298828125,
0.005893707275390625,
-0.04052734375,
0.033477783203125,
0.0260467529296875,
0.02508544921875,
-0.0037078857421875,
-0.0223541259765625,
0.06707763671875,
-0.01107025146484375,
-0.0158843994140625,
-0.02288818359375,
-0.006404876708984375,
0.0123748779296875,
0.03955078125,
0.01248931884765625,
0.0009636878967285156,
-0.042327880859375,
-0.01513671875,
-0.0025787353515625,
-0.01421356201171875,
0.003314971923828125,
0.020599365234375,
0.0408935546875,
-0.011138916015625,
-0.01021575927734375,
-0.0305633544921875,
-0.01016998291015625,
-0.0005621910095214844,
0.019439697265625,
-0.02825927734375,
0.0102996826171875,
-0.019744873046875,
0.0185546875,
0.017181396484375,
-0.01265716552734375,
-0.0133514404296875,
-0.033172607421875,
0.0240325927734375,
-0.07672119140625,
-0.05999755859375,
0.0019140243530273438,
0.01212310791015625,
0.00341796875,
0.017181396484375,
-0.00714874267578125,
0.01751708984375,
0.01160430908203125,
0.00478363037109375,
0.0477294921875,
0.01210784912109375,
-0.02447509765625,
-0.03668212890625,
-0.0299835205078125,
-0.019195556640625,
-0.0188446044921875,
-0.01177215576171875,
0.06903076171875,
0.026885986328125,
0.070556640625,
0.0248260498046875,
-0.0111236572265625,
-0.006961822509765625,
-0.07684326171875,
0.02374267578125,
0.0438232421875,
0.005558013916015625,
0.042266845703125,
-0.005496978759765625,
0.0369873046875,
0.054107666015625,
0.01280975341796875,
0.005764007568359375,
0.0116424560546875,
0.03094482421875,
0.030029296875,
-0.0040740966796875,
-0.026947021484375,
0.0263214111328125,
-0.04693603515625,
0.0264892578125,
0.0262603759765625,
-0.029571533203125,
-0.03778076171875,
0.0194854736328125,
0.00001811981201171875,
0.01033782958984375,
-0.0270233154296875,
-0.01387786865234375,
-0.00505828857421875,
-0.0234375,
0.01386260986328125,
0.025390625,
0.026153564453125,
-0.0173187255859375,
-0.0233001708984375,
0.0093231201171875,
0.029876708984375,
-0.0084381103515625,
0.050750732421875,
0.048492431640625,
0.0111236572265625,
-0.043731689453125,
-0.0161285400390625,
0.02117919921875,
0.029571533203125,
-0.0298614501953125,
-0.0528564453125,
-0.0273895263671875,
-0.004589080810546875,
0.024932861328125,
-0.0421142578125,
0.0175628662109375,
0.0018949508666992188,
-0.04193115234375,
-0.0254974365234375,
0.021514892578125,
0.0005097389221191406,
-0.0214691162109375,
0.003246307373046875,
-0.025909423828125,
-0.0244903564453125,
0.03436279296875,
-0.0633544921875,
0.0565185546875,
-0.05255126953125,
0.060546875,
0.069091796875,
-0.0316162109375,
0.03680419921875,
0.005001068115234375,
-0.029541015625,
-0.032806396484375,
0.032562255859375,
0.00676727294921875,
0.0170745849609375,
-0.05072021484375,
0.037628173828125,
-0.004367828369140625,
0.0264434814453125,
-0.056304931640625,
-0.07073974609375,
-0.04931640625,
-0.00787353515625,
-0.10723876953125,
-0.052215576171875,
0.027313232421875,
-0.031158447265625,
0.002376556396484375,
-0.0008769035339355469,
-0.0236358642578125,
-0.0183563232421875,
0.0297393798828125,
-0.007965087890625,
0.0007433891296386719,
-0.054229736328125,
-0.07928466796875,
-0.0989990234375,
-0.08966064453125,
-0.0296173095703125,
0.0023555755615234375,
0.0161895751953125,
0.0191802978515625,
-0.004779815673828125,
-0.00028514862060546875,
-0.031341552734375,
0.035736083984375,
0.0238037109375,
-0.014190673828125,
-0.00470733642578125,
0.0186767578125,
-0.0308685302734375,
0.005771636962890625,
-0.01061248779296875,
0.08685302734375,
0.053924560546875,
-0.045684814453125,
0.026458740234375,
-0.037384033203125,
-0.019561767578125,
-0.0178375244140625,
-0.00322723388671875,
0.0338134765625,
-0.006786346435546875,
-0.00780487060546875,
-0.043060302734375,
-0.0016765594482421875,
0.0104522705078125,
-0.018341064453125,
0.00591278076171875,
-0.005855560302734375,
-0.0077362060546875,
-0.0237884521484375,
0.021484375,
-0.021759033203125,
0.015533447265625,
0.0124969482421875,
-0.00782012939453125,
-0.026580810546875,
-0.0233001708984375,
-0.02911376953125,
-0.00041604042053222656,
0.01070404052734375,
-0.016448974609375,
0.0249176025390625,
-0.0026416778564453125,
0.038848876953125,
-0.0003254413604736328,
0.0104217529296875,
-0.0732421875,
-0.00734710693359375,
0.039398193359375,
0.02008056640625,
0.039642333984375,
-0.0275115966796875,
-0.031402587890625,
-0.035919189453125,
0.05706787109375,
0.01702880859375,
-0.040863037109375,
-0.006542205810546875,
-0.00366973876953125,
-0.013671875,
0.00640869140625,
0.0150299072265625,
-0.0242767333984375,
-0.0379638671875,
0.01428985595703125,
0.0019073486328125,
-0.0178680419921875,
0.01152801513671875,
0.0011796951293945312,
0.0169525146484375,
-0.0318603515625,
0.016387939453125,
-0.008331298828125,
0.0038471221923828125,
0.062164306640625,
-0.030242919921875,
0.06842041015625,
-0.014801025390625,
-0.0305023193359375,
-0.067138671875,
-0.0125579833984375,
-0.01221466064453125,
0.029937744140625,
0.0153961181640625,
-0.04046630859375,
-0.004764556884765625,
0.030426025390625,
-0.0021209716796875,
0.0093231201171875,
-0.00656890869140625,
0.001506805419921875,
-0.037261962890625,
0.0276947021484375,
0.0005655288696289062,
-0.00841522216796875,
-0.01001739501953125,
-0.027435302734375,
-0.032196044921875,
0.0007815361022949219,
-0.0006041526794433594,
0.021392822265625,
0.024322509765625,
-0.01947021484375,
-0.0278778076171875,
-0.03076171875,
0.007404327392578125,
0.00785064697265625,
0.0051727294921875,
-0.011138916015625,
-0.01519012451171875,
-0.0106353759765625,
0.020721435546875,
-0.0008802413940429688,
-0.0166473388671875,
0.035369873046875,
0.06292724609375,
0.0092620849609375,
-0.00031566619873046875,
-0.096435546875,
0.0584716796875,
0.04571533203125,
-0.0200042724609375,
0.05426025390625,
0.034515380859375,
-0.031402587890625,
0.051971435546875,
0.0015316009521484375,
0.060638427734375,
-0.0318603515625,
0.0020236968994140625,
0.0046844482421875,
0.003448486328125,
0.0210418701171875,
0.033935546875,
-0.0084075927734375,
0.035186767578125,
0.0031833648681640625,
-0.01200103759765625,
-0.004619598388671875,
-0.0111083984375,
-0.01300811767578125,
0.033966064453125,
0.02532958984375,
-0.024932861328125,
-0.00399017333984375,
-0.017120361328125,
0.06500244140625,
0.07550048828125,
-0.040740966796875,
0.053131103515625,
0.002986907958984375,
-0.02703857421875,
-0.04498291015625,
-0.050384521484375,
0.00630950927734375,
-0.00727081298828125,
-0.036590576171875,
-0.016357421875,
-0.0291900634765625,
-0.004703521728515625,
0.0645751953125,
0.03790283203125,
0.009033203125,
-0.044677734375,
-0.0222930908203125,
0.004055023193359375,
-0.0335693359375,
-0.002628326416015625,
0.0433349609375,
0.0194854736328125,
-0.0209197998046875,
0.0107269287109375,
-0.04949951171875,
0.00702667236328125,
-0.059539794921875,
-0.01157379150390625,
-0.0080413818359375,
-0.01461029052734375,
-0.0123291015625,
0.037261962890625,
-0.01097869873046875,
0.01297760009765625,
-0.0007066726684570312,
0.04638671875,
0.02764892578125,
0.0143280029296875,
0.029052734375,
-0.002773284912109375,
-0.0114898681640625,
-0.005950927734375,
-0.0389404296875,
-0.0264739990234375,
-0.01404571533203125,
-0.023406982421875,
0.028228759765625,
-0.03765869140625,
-0.04412841796875,
0.0743408203125,
-0.03656005859375,
-0.00966644287109375,
-0.0250244140625,
0.0032901763916015625,
-0.00021004676818847656,
-0.00027108192443847656,
-0.003452301025390625,
0.006183624267578125,
0.0172119140625,
-0.017822265625,
-0.013641357421875,
-0.04302978515625,
-0.0283050537109375,
0.0198516845703125,
-0.07208251953125,
0.017913818359375,
0.0171051025390625,
0.03729248046875,
-0.0201568603515625,
-0.025970458984375,
-0.01061248779296875,
0.0236358642578125,
-0.044677734375,
0.0187530517578125,
0.054779052734375,
0.00250244140625,
0.034454345703125,
-0.0341796875,
-0.01361846923828125,
-0.01971435546875,
-0.00029397010803222656,
0.044769287109375,
0.01116943359375,
-0.04339599609375,
-0.008514404296875,
-0.025054931640625,
-0.0189971923828125,
0.005924224853515625,
-0.03363037109375,
-0.03546142578125,
-0.005298614501953125,
0.00753021240234375,
0.03741455078125,
-0.048370361328125,
-0.069580078125,
0.01229095458984375,
-0.01007843017578125,
0.0014429092407226562,
0.005008697509765625,
0.0008640289306640625,
0.018646240234375,
0.0205535888671875,
0.0287628173828125,
0.0013113021850585938,
-0.0234375,
-0.041290283203125,
-0.01543426513671875,
0.01248931884765625,
-0.01320648193359375,
0.00848388671875,
0.00806427001953125,
-0.0152130126953125,
-0.048553466796875,
-0.004657745361328125,
0.0028438568115234375,
-0.0169219970703125,
-0.009002685546875,
-0.00098419189453125,
-0.0232696533203125,
0.066162109375,
0.020294189453125,
-0.016876220703125,
0.0247955322265625,
-0.0440673828125,
0.0135955810546875,
0.01198577880859375,
0.04376220703125,
-0.0190582275390625,
-0.039459228515625,
-0.01715087890625,
0.038604736328125,
-0.036163330078125,
0.034820556640625,
0.04931640625,
0.0140228271484375,
0.0601806640625,
0.0301361083984375,
0.03302001953125,
0.02734375,
0.0239410400390625,
0.01354217529296875,
-0.0223541259765625,
0.034698486328125,
-0.005741119384765625,
-0.02886962890625,
0.01313018798828125,
-0.033660888671875,
0.0300445556640625,
-0.00598907470703125,
0.03546142578125,
-0.033172607421875,
0.028472900390625,
0.006420135498046875,
-0.0011444091796875,
0.0794677734375,
-0.00685882568359375,
-0.003940582275390625,
-0.038970947265625,
0.045074462890625,
0.005802154541015625,
0.0066680908203125,
0.013885498046875,
0.01195526123046875,
0.004726409912109375,
-0.019989013671875,
-0.00875091552734375,
0.0013017654418945312,
-0.064697265625,
0.0205535888671875,
0.02923583984375,
-0.0178375244140625,
0.005123138427734375,
-0.01448822021484375,
0.048583984375,
-0.036376953125,
-0.02984619140625,
0.05560302734375,
-0.058837890625,
-0.0028133392333984375,
0.00489044189453125,
0.00801849365234375,
0.03314208984375,
0.037811279296875,
-0.00548553466796875,
-0.0249176025390625,
0.020965576171875,
0.036865234375,
0.045501708984375,
-0.02166748046875,
-0.00467681884765625,
0.0506591796875,
-0.02056884765625,
0.01055908203125,
0.01556396484375,
-0.00363922119140625,
0.0018596649169921875,
0.037139892578125,
0.10040283203125,
-0.017425537109375,
-0.04742431640625,
0.01245880126953125,
-0.01654052734375,
0.0014371871948242188,
-0.00830841064453125,
0.044952392578125,
-0.0357666015625,
-0.0088653564453125,
0.0218353271484375,
-0.0040130615234375,
0.0013599395751953125,
-0.0155792236328125,
-0.05914306640625,
0.0946044921875,
0.005390167236328125,
0.007068634033203125,
-0.0198516845703125,
0.047149658203125,
-0.023040771484375,
0.008819580078125,
-0.01494598388671875,
0.01959228515625,
-0.04840087890625,
0.0341796875,
-0.01947021484375,
0.00026726722717285156,
0.007122039794921875,
0.00537872314453125,
0.030975341796875,
0.01151275634765625,
-0.03375244140625,
-0.0093841552734375,
0.01947021484375,
0.01580810546875,
-0.005352020263671875,
0.043792724609375,
0.0016202926635742188,
-0.035858154296875,
0.030487060546875,
0.02850341796875,
0.04144287109375,
0.0012416839599609375,
-0.01336669921875,
0.0161895751953125,
-0.01132965087890625,
-0.0400390625,
-0.0216522216796875,
0.01280975341796875,
-0.0292816162109375,
-0.01183319091796875,
0.0007686614990234375,
0.01142120361328125,
0.045166015625,
-0.004032135009765625,
0.016387939453125,
0.00847625732421875,
0.014251708984375,
-0.0172576904296875,
0.03741455078125,
0.0006022453308105469,
0.053436279296875,
0.049652099609375,
0.02288818359375,
0.0665283203125,
-0.04718017578125,
0.0246734619140625,
-0.0099029541015625,
-0.018096923828125,
0.0374755859375,
-0.00909423828125,
0.013946533203125,
-0.0770263671875,
0.002262115478515625,
0.038543701171875,
0.053497314453125,
-0.041748046875,
-0.057708740234375,
0.0047149658203125,
-0.014862060546875,
0.0196685791015625,
-0.01035308837890625,
0.004413604736328125,
-0.04620361328125,
0.009124755859375,
-0.01239776611328125,
-0.0092926025390625,
0.0118408203125,
-0.041351318359375,
-0.004673004150390625,
-0.0020122528076171875,
0.025665283203125,
0.049896240234375,
-0.01122283935546875,
-0.005031585693359375,
0.0210723876953125,
-0.00612640380859375,
-0.0024662017822265625,
0.023345947265625,
0.0537109375,
0.01557159423828125,
0.031646728515625,
-0.0018377304077148438,
0.00952911376953125,
-0.047271728515625,
0.02410888671875,
-0.0205535888671875,
-0.006198883056640625,
0.01354217529296875,
0.013702392578125,
0.0013628005981445312,
0.01495361328125,
0.004444122314453125,
-0.0137939453125,
-0.01013946533203125,
-0.014007568359375,
-0.0310516357421875,
-0.01123809814453125,
-0.042877197265625,
0.046600341796875,
0.054229736328125,
0.002960205078125,
-0.0170440673828125,
-0.053375244140625,
0.11309814453125,
-0.0250396728515625,
0.0364990234375,
0.004764556884765625,
-0.0118865966796875,
0.045379638671875,
-0.005474090576171875,
0.053924560546875,
0.006145477294921875,
-0.06964111328125,
-0.0236968994140625,
0.0171966552734375,
-0.0091552734375,
0.002422332763671875,
0.02813720703125,
-0.04168701171875,
0.048553466796875,
0.0014257431030273438,
0.0211944580078125,
0.0176849365234375,
-0.0219573974609375,
0.00024366378784179688,
-0.001918792724609375,
0.0369873046875,
-0.0045318603515625,
-0.053131103515625,
-0.0258636474609375,
-0.06036376953125,
0.03326416015625,
0.0390625,
0.06976318359375,
-0.01122283935546875,
0.04266357421875,
0.005123138427734375,
-0.05340576171875,
0.030120849609375,
-0.01229095458984375,
0.04058837890625,
0.006931304931640625,
-0.03057861328125,
-0.0113677978515625,
-0.031585693359375,
0.041351318359375,
0.008209228515625,
0.01004791259765625,
-0.00028395652770996094,
0.002025604248046875,
0.01458740234375,
0.033172607421875,
0.0703125,
-0.00893402099609375,
-0.04541015625,
-0.04400634765625,
0.01108551025390625,
0.0182037353515625,
0.050750732421875,
-0.0180206298828125,
0.037200927734375,
-0.04144287109375,
0.0098419189453125,
-0.02215576171875,
-0.0123138427734375,
-0.081298828125,
0.0104522705078125,
0.0111083984375,
-0.04156494140625,
0.01953125,
-0.00782012939453125,
0.019378662109375,
-0.00972747802734375,
0.06640625,
0.00797271728515625,
-0.042633056640625,
0.0230865478515625,
-0.0269622802734375,
0.027069091796875,
-0.01015472412109375,
-0.006793975830078125,
-0.022552490234375,
0.0222930908203125,
0.00473785400390625,
-0.01134490966796875,
-0.035491943359375,
-0.0513916015625,
0.0146331787109375,
0.01451873779296875,
-0.0038394927978515625,
-0.051055908203125,
-0.045318603515625,
-0.00653076171875,
0.024139404296875,
-0.00658416748046875,
-0.058563232421875,
0.020660400390625,
-0.0240325927734375,
0.052337646484375,
-0.034088134765625,
0.023651123046875,
-0.0209808349609375,
0.0309906005859375,
-0.0193634033203125,
-0.044708251953125,
-0.039276123046875,
0.043853759765625,
-0.0369873046875,
0.060089111328125,
0.05438232421875,
-0.045440673828125,
0.0248565673828125,
0.0657958984375,
0.06805419921875,
0.11846923828125,
0.0038967132568359375,
-0.0261383056640625,
0.038360595703125,
-0.049530029296875,
0.008697509765625,
-0.040130615234375,
-0.00616455078125,
-0.0841064453125,
-0.014068603515625,
-0.048004150390625,
0.001617431640625,
0.0077667236328125,
-0.050201416015625,
-0.047332763671875,
0.07965087890625,
-0.0235595703125,
-0.024658203125,
-0.006633758544921875,
0.0229949951171875,
0.007068634033203125,
-0.0055084228515625,
0.00958251953125,
-0.0009083747863769531,
-0.022430419921875,
-0.0161590576171875,
-0.00836181640625,
-0.038787841796875,
0.0264892578125,
-0.004802703857421875,
-0.039398193359375,
0.01971435546875,
0.032928466796875,
-0.046905517578125,
-0.004276275634765625,
0.0056304931640625,
-0.0064849853515625,
0.026458740234375,
-0.0269775390625,
-0.0560302734375,
-0.006160736083984375,
-0.0007128715515136719,
-0.01149749755859375,
-0.0421142578125,
0.0266876220703125,
0.0179443359375,
0.00737762451171875,
0.0029392242431640625,
-0.0159454345703125,
-0.0196685791015625,
0.024444580078125,
-0.01611328125,
0.010101318359375,
-0.006053924560546875,
-0.01039886474609375,
-0.031707763671875,
-0.00909423828125,
0.00371551513671875,
-0.013763427734375,
-0.0080108642578125,
-0.0428466796875,
-0.03387451171875,
-0.00970458984375,
-0.01611328125,
0.0144805908203125,
-0.0009927749633789062,
0.01629638671875,
0.0298309326171875,
-0.039093017578125,
-0.005580902099609375,
-0.0006594657897949219,
-0.0051727294921875,
0.007305145263671875,
-0.0050811767578125,
0.01617431640625,
0.015350341796875,
-0.042083740234375,
0.0080718994140625,
0.0008492469787597656,
0.042724609375,
-0.036895751953125,
-0.034637451171875,
-0.0183563232421875,
0.01395416259765625,
-0.012939453125,
0.00748443603515625,
0.0107269287109375,
0.0178375244140625,
-0.003269195556640625,
0.052459716796875,
-0.0084228515625,
-0.057098388671875,
-0.0224151611328125,
0.021087646484375,
-0.039154052734375,
-0.0160675048828125,
-0.0025920867919921875,
-0.03485107421875,
0.0236053466796875,
0.0309906005859375,
0.044097900390625,
-0.01294708251953125,
0.040313720703125,
0.01265716552734375,
0.013427734375,
0.0113983154296875
] |
3e431df78c6995678b740ec5f0fdc7481dbc403f
|
Wordpress Stackexchange
Q: Brute force attack? I'm seeing this quite often:
No OS, same Browser, weird hostname -- they're definitely not real users. Can I do anything to take precautions before they do something?
Thanks!
A: There's an app plugin for that, Limit Login Attempts.
Some more info available in this wp beginner post: http://www.wpbeginner.com/plugins/how-and-why-you-should-limit-login-attempts-in-your-wordpress/
|
Q: Brute force attack? I'm seeing this quite often:
No OS, same Browser, weird hostname -- they're definitely not real users. Can I do anything to take precautions before they do something?
Thanks!
A: There's an app plugin for that, Limit Login Attempts.
Some more info available in this wp beginner post: http://www.wpbeginner.com/plugins/how-and-why-you-should-limit-login-attempts-in-your-wordpress/
A: Since it looks as there is no referrer you could block the attempts with .htaccess.
Something like this:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*/wp-login\.php.*\ HTTP/ [NC]
RewriteCond %{HTTP_REFERER} ^-?$
RewriteRule .* - [F,NS]
There are different variations on that, you could even just trying using REQUEST_URI instead.
RewriteCond %{REQUEST_URI} wp-login\.php [NC]
RewriteCond %{HTTP_REFERER} ^-?$
RewriteRule .* - [F,NS]
Or if you're the only person logging into your site you could lock it down even more like so:
RewriteCond %{REQUEST_URI} wp-login\.php [NC]
RewriteCond %{REMOTE_ADDR} !^xxx\.xxx\.xxx\.xxx$
RewriteRule .* http://example.com [R=301,L]
Where xxx.xxx.xxx.xxx is your static IP Address. Can be modified to just work for Class A, B, or C if you have a dynamic IP Address.
Where example.com is your TLD. That way they're just redirected to your home page.
|
wordpress
|
{
"language": "en",
"length": 180,
"provenance": "stackexchange_00019.jsonl.gz:421161",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56353"
}
|
[
0.058258056640625,
0.00797271728515625,
0.0178070068359375,
0.03692626953125,
-0.00232696533203125,
-0.050323486328125,
0.063232421875,
-0.04510498046875,
-0.08111572265625,
-0.0017547607421875,
0.034393310546875,
0.061187744140625,
-0.050262451171875,
-0.04144287109375,
0.06866455078125,
-0.0178985595703125,
-0.0035800933837890625,
0.0236968994140625,
0.0098114013671875,
-0.0195159912109375,
0.0251617431640625,
-0.015838623046875,
0.0013065338134765625,
0.035736083984375,
0.026885986328125,
0.0018215179443359375,
0.09912109375,
0.0183868408203125,
0.0293731689453125,
0.00586700439453125,
0.039306640625,
-0.0916748046875,
0.00830078125,
0.0452880859375,
-0.05255126953125,
-0.045562744140625,
-0.0289459228515625,
0.025146484375,
0.0063629150390625,
-0.002826690673828125,
0.03131103515625,
-0.004726409912109375,
0.0153656005859375,
0.0178680419921875,
-0.0266876220703125,
-0.0159912109375,
0.04010009765625,
-0.0090484619140625,
0.045654296875,
-0.016571044921875,
0.01025390625,
0.06439208984375,
0.016632080078125,
0.0096435546875,
-0.01611328125,
0.0128936767578125,
0.023345947265625,
0.004123687744140625,
0.050018310546875,
-0.025665283203125,
-0.047027587890625,
-0.0399169921875,
0.0273590087890625,
-0.030029296875,
0.02392578125,
-0.028167724609375,
-0.03900146484375,
0.050506591796875,
-0.018951416015625,
0.0056610107421875,
0.0201568603515625,
-0.00588226318359375,
-0.004077911376953125,
-0.007965087890625,
0.0081329345703125,
-0.01380157470703125,
-0.0137939453125,
-0.030975341796875,
0.030029296875,
0.03778076171875,
-0.039306640625,
-0.028167724609375,
-0.027923583984375,
-0.00931549072265625,
-0.03253173828125,
0.00234222412109375,
-0.0257415771484375,
0.0205230712890625,
-0.0083465576171875,
-0.01381683349609375,
-0.01074981689453125,
-0.0439453125,
0.00855255126953125,
0.042205810546875,
-0.00876617431640625,
0.0019235610961914062,
0.0158538818359375,
0.01375579833984375,
0.00441741943359375,
-0.036224365234375,
0.0228729248046875,
-0.038665771484375,
-0.042755126953125,
0.01509857177734375,
-0.0174713134765625,
0.05908203125,
0.05096435546875,
0.04736328125,
0.00185394287109375,
-0.019866943359375,
0.003955841064453125,
0.0235595703125,
-0.003292083740234375,
-0.0367431640625,
-0.007221221923828125,
-0.0005998611450195312,
-0.0186309814453125,
0.01219940185546875,
0.0033969879150390625,
-0.0035419464111328125,
-0.01534271240234375,
-0.014678955078125,
0.01678466796875,
-0.008331298828125,
-0.002513885498046875,
-0.0251922607421875,
-0.0212554931640625,
0.003307342529296875,
-0.021514892578125,
0.05322265625,
-0.0230560302734375,
0.00024890899658203125,
0.009979248046875,
0.0113677978515625,
-0.0189056396484375,
-0.0262908935546875,
0.043365478515625,
0.0217742919921875,
-0.0008039474487304688,
-0.002346038818359375,
-0.00429534912109375,
-0.033050537109375,
-0.0185089111328125,
-0.02301025390625,
-0.01018524169921875,
0.00847625732421875,
-0.020416259765625,
0.01047515869140625,
0.05419921875,
0.0164947509765625,
-0.021820068359375,
-0.0775146484375,
-0.0267181396484375,
0.0382080078125,
0.044281005859375,
0.059722900390625,
0.047454833984375,
-0.0021190643310546875,
-0.0396728515625,
0.0009975433349609375,
0.0254058837890625,
-0.02288818359375,
-0.01788330078125,
0.01503753662109375,
-0.0171051025390625,
0.00821685791015625,
0.0034942626953125,
0.01538848876953125,
0.0072784423828125,
-0.047607421875,
0.017425537109375,
-0.005950927734375,
0.0275421142578125,
-0.001987457275390625,
-0.000004231929779052734,
0.0212249755859375,
-0.0111236572265625,
0.027496337890625,
0.02728271484375,
0.021636962890625,
0.010955810546875,
-0.03424072265625,
0.03948974609375,
-0.00327301025390625,
-0.01071929931640625,
-0.007030487060546875,
-0.005702972412109375,
0.0246429443359375,
0.0297393798828125,
0.00655364990234375,
-0.0026416778564453125,
-0.01392364501953125,
0.0033721923828125,
0.01506805419921875,
0.0026073455810546875,
-0.046234130859375,
0.001613616943359375,
-0.00321197509765625,
-0.0063934326171875,
-0.0279998779296875,
0.0268096923828125,
-0.006877899169921875,
0.0011262893676757812,
-0.0301971435546875,
-0.07769775390625,
-0.001148223876953125,
-0.01165008544921875,
0.0253448486328125,
0.0257720947265625,
0.0219879150390625,
-0.011383056640625,
0.0024204254150390625,
0.022491455078125,
-0.061859130859375,
-0.02978515625,
-0.0012111663818359375,
-0.042266845703125,
-0.002834320068359375,
0.01177215576171875,
0.0247802734375,
0.0167388916015625,
-0.0193634033203125,
-0.0127716064453125,
-0.034576416015625,
-0.029632568359375,
0.007244110107421875,
-0.031646728515625,
0.0102996826171875,
-0.055572509765625,
0.0298004150390625,
-0.03094482421875,
0.02581787109375,
0.026947021484375,
0.083984375,
-0.004085540771484375,
-0.0181732177734375,
-0.0306549072265625,
-0.04193115234375,
0.00896453857421875,
0.0209197998046875,
0.023406982421875,
0.025360107421875,
-0.00661468505859375,
0.0028362274169921875,
0.0276947021484375,
-0.0650634765625,
0.00799560546875,
0.0089874267578125,
-0.01284027099609375,
0.0472412109375,
-0.0190582275390625,
0.0169525146484375,
0.00469970703125,
0.00699615478515625,
-0.00296783447265625,
0.037200927734375,
0.019134521484375,
0.00962066650390625,
-0.01395416259765625,
0.01493072509765625,
0.00311279296875,
0.00879669189453125,
-0.0264739990234375,
0.00766754150390625,
0.0201873779296875,
-0.0496826171875,
0.0190582275390625,
0.00586700439453125,
0.0263519287109375,
-0.04815673828125,
0.01220703125,
-0.05126953125,
-0.00823974609375,
0.034210205078125,
0.0699462890625,
0.01230621337890625,
-0.0140228271484375,
-0.0279998779296875,
0.006748199462890625,
0.0286407470703125,
-0.031982421875,
-0.024871826171875,
-0.00414276123046875,
-0.01425933837890625,
0.0166473388671875,
-0.035736083984375,
0.024871826171875,
-0.020904541015625,
-0.017364501953125,
-0.021697998046875,
0.007122039794921875,
0.040618896484375,
-0.0028133392333984375,
0.0161895751953125,
0.007236480712890625,
-0.007965087890625,
-0.024444580078125,
-0.04669189453125,
0.048309326171875,
-0.044464111328125,
0.023651123046875,
0.06591796875,
-0.00016236305236816406,
0.0118865966796875,
-0.004451751708984375,
0.005855560302734375,
-0.01424407958984375,
0.0199127197265625,
-0.01004791259765625,
0.018829345703125,
-0.1044921875,
-0.0186309814453125,
0.0070953369140625,
0.056884765625,
-0.0251617431640625,
-0.059356689453125,
-0.00677490234375,
-0.0013370513916015625,
-0.056610107421875,
-0.055877685546875,
-0.047698974609375,
-0.0042877197265625,
-0.01197052001953125,
-0.00634002685546875,
0.018157958984375,
0.0241241455078125,
-0.012420654296875,
0.005664825439453125,
-0.002716064453125,
-0.040374755859375,
-0.0308074951171875,
-0.09381103515625,
-0.057464599609375,
-0.032684326171875,
-0.0033588409423828125,
-0.005527496337890625,
0.00033020973205566406,
0.0294342041015625,
-0.0007266998291015625,
-0.01322174072265625,
-0.00220489501953125,
0.01111602783203125,
-0.0009555816650390625,
-0.0303497314453125,
-0.017242431640625,
-0.035308837890625,
0.006885528564453125,
0.005954742431640625,
-0.050628662109375,
-0.01873779296875,
0.04046630859375,
-0.037567138671875,
0.0224761962890625,
-0.0279998779296875,
0.00923919677734375,
0.006023406982421875,
-0.0306549072265625,
-0.033843994140625,
-0.020843505859375,
-0.0726318359375,
0.0215301513671875,
0.036102294921875,
0.00848388671875,
0.005710601806640625,
-0.0084228515625,
-0.048248291015625,
0.020050048828125,
-0.01146697998046875,
0.034454345703125,
0.015838623046875,
-0.029388427734375,
0.005584716796875,
-0.00908660888671875,
0.01029205322265625,
0.0268402099609375,
0.00234222412109375,
-0.00969696044921875,
-0.060699462890625,
-0.01502227783203125,
-0.03582763671875,
-0.040283203125,
-0.0075531005859375,
-0.0222320556640625,
0.005733489990234375,
-0.0009889602661132812,
0.034027099609375,
-0.00991058349609375,
0.043701171875,
-0.055267333984375,
-0.027923583984375,
-0.05853271484375,
0.07037353515625,
-0.0301055908203125,
-0.01031494140625,
0.01763916015625,
0.00872802734375,
-0.0511474609375,
-0.0123291015625,
-0.044464111328125,
-0.0038928985595703125,
-0.013671875,
-0.016357421875,
-0.02142333984375,
-0.0145721435546875,
0.0118408203125,
-0.036346435546875,
0.010040283203125,
-0.036224365234375,
0.024871826171875,
0.0042266845703125,
0.03302001953125,
-0.07666015625,
0.031463623046875,
-0.079345703125,
0.01364898681640625,
-0.0097198486328125,
-0.06536865234375,
-0.012420654296875,
0.00261688232421875,
0.060089111328125,
0.0162353515625,
-0.00563812255859375,
-0.0220184326171875,
0.052490234375,
0.00234222412109375,
-0.01312255859375,
0.02203369140625,
-0.02911376953125,
0.049560546875,
0.058013916015625,
0.01171112060546875,
0.020782470703125,
0.00997161865234375,
-0.029449462890625,
-0.0269775390625,
-0.035400390625,
-0.0266876220703125,
-0.01313018798828125,
-0.005275726318359375,
-0.0338134765625,
-0.037933349609375,
-0.036529541015625,
-0.00705718994140625,
0.037078857421875,
-0.016937255859375,
0.024810791015625,
-0.048065185546875,
-0.0156402587890625,
0.026519775390625,
-0.022003173828125,
-0.0121612548828125,
0.028076171875,
0.06768798828125,
0.00626373291015625,
0.00551605224609375,
-0.047332763671875,
0.036102294921875,
0.0060577392578125,
0.0206298828125,
0.01407623291015625,
-0.03173828125,
-0.0238494873046875,
0.0792236328125,
-0.01337432861328125,
0.018707275390625,
-0.035186767578125,
0.048828125,
-0.01421356201171875,
-0.0032806396484375,
0.02630615234375,
-0.0158843994140625,
0.01087188720703125,
0.02862548828125,
0.0152435302734375,
-0.01483917236328125,
0.005176544189453125,
-0.003841400146484375,
-0.01374053955078125,
-0.0017642974853515625,
0.021881103515625,
-0.03369140625,
0.0265350341796875,
-0.0002677440643310547,
-0.000598907470703125,
0.005451202392578125,
0.00994873046875,
-0.02398681640625,
-0.031829833984375,
0.00850677490234375,
-0.04449462890625,
0.0014972686767578125,
-0.038299560546875,
0.03173828125,
-0.036773681640625,
0.0013322830200195312,
-0.03173828125,
-0.0269775390625,
0.1373291015625,
-0.0096282958984375,
-0.0703125,
0.0278778076171875,
-0.019561767578125,
0.0038204193115234375,
0.051177978515625,
0.005176544189453125,
0.0265960693359375,
-0.054443359375,
-0.0273590087890625,
-0.006378173828125,
-0.0002601146697998047,
-0.0821533203125,
-0.0268096923828125,
0.032989501953125,
-0.0155181884765625,
-0.01605224609375,
0.035247802734375,
-0.0107421875,
-0.0192413330078125,
0.0194091796875,
0.00011837482452392578,
0.034210205078125,
0.07098388671875,
-0.027313232421875,
0.0207672119140625,
0.02545166015625,
-0.01103973388671875,
-0.0304107666015625,
0.008819580078125,
-0.048370361328125,
-0.06103515625,
0.0223541259765625,
0.0333251953125,
0.0098724365234375,
0.0291900634765625,
0.01000213623046875,
0.0380859375,
-0.0142364501953125,
0.02056884765625,
-0.0221099853515625,
-0.02618408203125,
-0.021697998046875,
-0.0031528472900390625,
0.0178985595703125,
-0.0134124755859375,
0.01183319091796875,
-0.01363372802734375,
0.0184478759765625,
-0.0009918212890625,
0.0242919921875,
-0.0467529296875,
0.0139617919921875,
0.037078857421875,
0.013580322265625,
-0.0211334228515625,
-0.02398681640625,
0.031494140625,
0.00992584228515625,
-0.0025043487548828125,
-0.020660400390625,
0.039703369140625,
-0.0087738037109375,
0.006999969482421875,
0.0054168701171875,
-0.01605224609375,
0.005977630615234375,
0.024932861328125,
-0.015960693359375,
-0.0304107666015625,
-0.051025390625,
-0.01654052734375,
-0.0242156982421875,
0.0163726806640625,
0.0011816024780273438,
-0.00023937225341796875,
-0.02728271484375,
0.0018873214721679688,
0.005725860595703125,
-0.007167816162109375,
0.0130767822265625,
0.00830841064453125,
-0.031982421875,
0.0501708984375,
0.032470703125,
0.0186767578125,
-0.0445556640625,
-0.0190887451171875,
0.050689697265625,
-0.006404876708984375,
0.002498626708984375,
-0.01537322998046875,
0.06512451171875,
-0.0199737548828125,
0.0091552734375,
-0.039154052734375,
-0.024200439453125,
0.006591796875,
0.01519012451171875,
-0.00887298583984375,
-0.019775390625,
0.0008544921875,
-0.018829345703125,
-0.04547119140625,
-0.0000025033950805664062,
-0.02960205078125,
0.0882568359375,
-0.037994384765625,
-0.0277557373046875,
-0.00408935546875,
-0.0165557861328125,
0.002460479736328125,
-0.0164794921875,
-0.01641845703125,
0.0233612060546875,
-0.0036640167236328125,
0.01161956787109375,
-0.0004227161407470703,
-0.0177001953125,
0.030670166015625,
0.042236328125,
0.0189361572265625,
0.03240966796875,
0.030364990234375,
0.0214996337890625,
-0.033050537109375,
-0.034027099609375,
0.01702880859375,
-0.01016998291015625,
0.044830322265625,
-0.0014524459838867188,
-0.0263214111328125,
0.0374755859375,
-0.037017822265625,
0.0231781005859375,
0.039398193359375,
0.06805419921875,
-0.093017578125,
0.030120849609375,
0.006443023681640625,
-0.0020046234130859375,
0.0074005126953125,
0.01105499267578125,
0.0251312255859375,
-0.023773193359375,
0.0250701904296875,
0.0265960693359375,
0.00598907470703125,
-0.00858306884765625,
-0.0209503173828125,
0.0016269683837890625,
-0.00925445556640625,
0.033111572265625,
-0.0008721351623535156,
-0.036102294921875,
-0.01337432861328125,
0.01102447509765625,
0.00009614229202270508,
-0.00958251953125,
-0.016265869140625,
0.01108551025390625,
-0.0177001953125,
-0.060150146484375,
-0.002315521240234375,
-0.03778076171875,
0.0020427703857421875,
0.034942626953125,
0.01629638671875,
0.05999755859375,
0.02056884765625,
0.02935791015625,
-0.005741119384765625,
-0.006473541259765625,
0.026519775390625,
0.050384521484375,
-0.04254150390625,
-0.007793426513671875,
0.00989532470703125,
-0.053436279296875,
0.0031719207763671875,
-0.01209259033203125,
-0.01210784912109375,
-0.006687164306640625,
-0.0019159317016601562,
0.07415771484375,
-0.0037670135498046875,
-0.033935546875,
0.04461669921875,
-0.03460693359375,
-0.044921875,
-0.01044464111328125,
-0.029876708984375,
-0.0223846435546875,
0.004238128662109375,
-0.01213836669921875,
-0.00144195556640625,
0.02679443359375,
0.007762908935546875,
-0.06353759765625,
-0.00421142578125,
-0.008544921875,
0.054046630859375,
0.010223388671875,
-0.024078369140625,
0.016815185546875,
-0.0333251953125,
-0.056427001953125,
0.0908203125,
0.003818511962890625,
0.056671142578125,
-0.056304931640625,
0.0036411285400390625,
0.0239410400390625,
0.00041413307189941406,
0.0011653900146484375,
-0.0029392242431640625,
-0.05291748046875,
-0.0038204193115234375,
0.0160369873046875,
-0.0108184814453125,
-0.0030689239501953125,
0.067138671875,
0.003810882568359375,
0.032379150390625,
0.070556640625,
-0.02569580078125,
0.035186767578125,
0.004505157470703125,
0.005550384521484375,
0.01776123046875,
0.0086517333984375,
0.00727081298828125,
-0.0328369140625,
0.0439453125,
-0.077392578125,
0.007762908935546875,
0.040985107421875,
0.0499267578125,
0.015655517578125,
0.040863037109375,
0.0265960693359375,
-0.0548095703125,
0.0114288330078125,
-0.04931640625,
0.053802490234375,
-0.031585693359375,
-0.025665283203125,
0.05328369140625,
0.0254669189453125,
-0.0148468017578125,
-0.0157623291015625,
-0.021514892578125,
-0.0059051513671875,
0.0054168701171875,
0.029022216796875,
-0.006961822509765625,
0.014678955078125,
-0.08001708984375,
-0.00984954833984375,
0.06463623046875,
0.0634765625,
-0.0418701171875,
-0.0286102294921875,
0.0206298828125,
0.02972412109375,
0.048370361328125,
0.022674560546875,
0.08465576171875,
0.007274627685546875,
0.01073455810546875,
0.0188140869140625,
0.00897979736328125,
-0.01373291015625,
-0.026580810546875,
0.01352691650390625,
0.056549072265625,
0.0009341239929199219,
0.041168212890625,
0.02008056640625,
-0.00849151611328125,
-0.0200958251953125,
-0.0250701904296875,
0.007396697998046875,
0.00888824462890625,
0.0233306884765625,
0.003910064697265625,
-0.01265716552734375,
0.01739501953125,
0.01305389404296875,
0.0195465087890625,
0.00799560546875,
0.004444122314453125,
-0.0063018798828125,
0.0195770263671875,
0.038055419921875,
-0.0308837890625,
0.005390167236328125,
0.008575439453125,
0.007495880126953125,
0.00878143310546875,
0.00540924072265625,
0.00762939453125,
0.0177154541015625,
-0.005031585693359375,
0.0149688720703125,
0.0194244384765625,
-0.0139923095703125,
-0.011474609375,
-0.0014028549194335938,
0.034637451171875,
0.045684814453125,
0.02716064453125,
0.01174163818359375,
-0.010833740234375,
-0.0293121337890625,
-0.0176239013671875,
0.006649017333984375,
0.040557861328125,
-0.0194244384765625,
0.00733184814453125,
0.02874755859375,
-0.05548095703125,
-0.0243988037109375,
0.017547607421875,
-0.028656005859375,
0.0341796875,
0.0009088516235351562,
-0.042388916015625,
0.0188446044921875,
0.0178375244140625,
0.0200347900390625,
0.005126953125,
-0.00786590576171875,
-0.0185089111328125,
-0.0740966796875,
-0.021240234375,
-0.0219573974609375,
0.0162353515625,
-0.005420684814453125,
0.05377197265625,
-0.0016794204711914062,
0.01070404052734375,
-0.0019140243530273438,
-0.01372528076171875,
0.0227813720703125,
0.0261688232421875,
0.0210723876953125,
0.06298828125,
-0.01358795166015625,
-0.0545654296875,
-0.06689453125,
0.043792724609375,
-0.0201263427734375,
0.0292510986328125,
0.01195526123046875,
-0.0372314453125,
0.0236358642578125,
0.059051513671875,
0.023468017578125,
-0.0219573974609375,
-0.053192138671875,
-0.0258026123046875,
0.0220489501953125,
-0.0004184246063232422,
0.033660888671875,
-0.02496337890625,
0.0692138671875,
-0.08795166015625,
-0.0012350082397460938,
-0.0250244140625,
-0.06915283203125,
-0.078369140625,
0.006893157958984375,
-0.0272979736328125,
0.0165863037109375,
-0.0220184326171875,
-0.0306396484375,
0.0081329345703125,
0.00919342041015625,
-0.0275115966796875,
-0.00251007080078125,
-0.025177001953125,
0.031585693359375,
0.040313720703125,
0.053802490234375,
0.01174163818359375,
0.012542724609375,
0.01641845703125,
-0.017913818359375,
0.00568389892578125,
0.0021305084228515625,
-0.0289306640625,
-0.041534423828125,
0.01416015625,
-0.01099395751953125,
0.0222320556640625,
-0.0390625,
0.0158233642578125,
0.031585693359375,
-0.00835418701171875,
-0.02618408203125,
-0.035064697265625,
0.0137176513671875,
-0.027313232421875,
0.04376220703125,
-0.05523681640625,
0.02703857421875,
-0.00850677490234375,
0.022216796875,
-0.041656494140625,
-0.0189666748046875,
-0.027801513671875,
0.0306854248046875,
-0.01849365234375,
0.0267791748046875,
0.033050537109375,
-0.01019287109375,
-0.0192108154296875,
0.0252227783203125,
-0.0021724700927734375,
0.07568359375,
-0.036773681640625,
-0.01873779296875,
0.01313018798828125,
-0.00787353515625,
-0.0158233642578125,
-0.039337158203125,
-0.0007524490356445312,
-0.059967041015625,
-0.037506103515625,
-0.006134033203125,
-0.0123138427734375,
0.0008864402770996094,
-0.056976318359375,
-0.1212158203125,
0.049072265625,
-0.020965576171875,
-0.046112060546875,
-0.07489013671875,
0.018463134765625,
0.026336669921875,
-0.0389404296875,
-0.0307464599609375,
-0.0137786865234375,
-0.0521240234375,
0.0269927978515625,
0.0009813308715820312,
-0.02044677734375,
0.0025272369384765625,
-0.007572174072265625,
-0.01451873779296875,
0.0313720703125,
0.047393798828125,
-0.0143280029296875,
0.041046142578125,
0.006496429443359375,
0.039794921875,
0.04046630859375,
-0.0207366943359375,
0.0168609619140625,
-0.0343017578125,
-0.041748046875,
-0.005847930908203125,
-0.0167999267578125,
0.00917816162109375,
0.01557159423828125,
0.0062408447265625,
0.059661865234375,
-0.003505706787109375,
-0.0484619140625,
-0.0626220703125,
-0.06817626953125,
0.0126495361328125,
-0.0303192138671875,
0.0222015380859375,
-0.10430908203125,
0.0082244873046875,
0.0296783447265625,
-0.01267242431640625,
-0.030059814453125,
-0.0014486312866210938,
-0.048492431640625,
0.009490966796875,
0.038482666015625,
0.01421356201171875,
-0.0020751953125,
0.02569580078125,
0.07196044921875,
-0.053863525390625,
-0.0033245086669921875,
0.0274810791015625,
-0.0224456787109375,
0.04412841796875,
0.0193023681640625,
0.01885986328125,
0.0017547607421875,
-0.034820556640625,
0.021240234375,
0.01496124267578125,
-0.005214691162109375,
-0.034210205078125,
-0.0206298828125,
-0.0026569366455078125,
0.029266357421875,
-0.0023593902587890625,
0.05426025390625,
0.00738525390625,
0.0091705322265625,
0.0201416015625,
-0.0244293212890625,
-0.034912109375,
-0.05474853515625,
-0.01800537109375,
-0.01776123046875,
-0.0162200927734375,
0.02130126953125,
0.0361328125,
-0.018524169921875,
0.0302734375,
0.029541015625,
0.01015472412109375,
0.0256500244140625,
-0.01317596435546875,
0.033447265625,
-0.0157012939453125,
-0.0038547515869140625
] |
9fbb0c247fc0ddb9d745b9dbe8444da72de68d18
|
Wordpress Stackexchange
Q: Remove parent slug for child pages I'm looking for a plugin/custom function that removes the parent slug of a child's page permalink.
Something that automatically changes the permalink for child pages.
Example:
www.blog.com/products/apple becomes www.blog.com/apple
Anyone got a clue if that could be done?
Thanks in advance
A: You may not like this answer, but it's a quite simple, and probably most recommended. Don't set these pages as child pages.
There are numerous ways of getting pages to list out in a child-like order - WP Menus.
Use that instead, and you will cause less stress on your WordPress installation - having to set and forget things is much worst than setting them somewhere else.
The only downside would be organization in the back end, but you can either customize the List Table, or create a custom post type to hold all your products in their own area.
|
Q: Remove parent slug for child pages I'm looking for a plugin/custom function that removes the parent slug of a child's page permalink.
Something that automatically changes the permalink for child pages.
Example:
www.blog.com/products/apple becomes www.blog.com/apple
Anyone got a clue if that could be done?
Thanks in advance
A: You may not like this answer, but it's a quite simple, and probably most recommended. Don't set these pages as child pages.
There are numerous ways of getting pages to list out in a child-like order - WP Menus.
Use that instead, and you will cause less stress on your WordPress installation - having to set and forget things is much worst than setting them somewhere else.
The only downside would be organization in the back end, but you can either customize the List Table, or create a custom post type to hold all your products in their own area.
|
wordpress
|
{
"language": "en",
"length": 149,
"provenance": "stackexchange_00019.jsonl.gz:421169",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56380"
}
|
[
0.0279693603515625,
0.0258026123046875,
-0.016143798828125,
0.004871368408203125,
0.0099029541015625,
-0.03570556640625,
0.038818359375,
-0.046661376953125,
-0.032623291015625,
0.0033092498779296875,
0.0156402587890625,
-0.0042724609375,
-0.046722412109375,
-0.053955078125,
0.02215576171875,
-0.0260467529296875,
0.0306243896484375,
-0.00508880615234375,
0.02734375,
-0.011566162109375,
-0.0079345703125,
0.01230621337890625,
0.0335693359375,
0.037445068359375,
0.039276123046875,
-0.016754150390625,
0.00894927978515625,
-0.040374755859375,
0.0213623046875,
-0.03955078125,
0.01053619384765625,
0.032928466796875,
0.002788543701171875,
-0.01522064208984375,
0.0675048828125,
-0.02880859375,
-0.00496673583984375,
0.006565093994140625,
0.0214996337890625,
0.007965087890625,
0.017242431640625,
-0.005527496337890625,
-0.0241241455078125,
0.052490234375,
-0.0248565673828125,
-0.0248260498046875,
-0.013824462890625,
-0.054901123046875,
0.011260986328125,
-0.047760009765625,
0.018157958984375,
0.037078857421875,
0.02850341796875,
-0.01006317138671875,
-0.02178955078125,
0.0012693405151367188,
-0.0110931396484375,
0.031982421875,
0.0205535888671875,
-0.0080413818359375,
-0.023284912109375,
0.0360107421875,
0.0019464492797851562,
0.00891876220703125,
0.0018320083618164062,
-0.0175018310546875,
-0.06378173828125,
0.03326416015625,
-0.039306640625,
0.002193450927734375,
0.029266357421875,
-0.033905029296875,
-0.01551055908203125,
-0.0141143798828125,
-0.045379638671875,
-0.00984954833984375,
0.005451202392578125,
-0.03802490234375,
0.005283355712890625,
0.00962066650390625,
-0.018341064453125,
-0.0155792236328125,
-0.0240020751953125,
-0.03558349609375,
0.013092041015625,
-0.0257568359375,
-0.01078033447265625,
0.00490570068359375,
-0.060791015625,
0.013763427734375,
-0.044708251953125,
-0.011627197265625,
-0.032440185546875,
0.0157470703125,
-0.01806640625,
0.042572021484375,
0.055938720703125,
0.042083740234375,
-0.0213623046875,
-0.028228759765625,
0.030548095703125,
-0.0517578125,
0.00595855712890625,
-0.0226287841796875,
0.0023288726806640625,
0.021575927734375,
0.01464080810546875,
0.06280517578125,
0.07232666015625,
0.0259552001953125,
0.020751953125,
0.042938232421875,
-0.033935546875,
-0.040863037109375,
-0.0171966552734375,
0.051177978515625,
-0.0218658447265625,
-0.0296783447265625,
-0.005275726318359375,
-0.00078582763671875,
-0.03448486328125,
-0.00553131103515625,
0.005535125732421875,
0.02166748046875,
0.01207733154296875,
0.005397796630859375,
-0.0014095306396484375,
-0.0198822021484375,
0.007457733154296875,
0.0013580322265625,
-0.045379638671875,
-0.0018854141235351562,
0.101318359375,
0.076171875,
0.05426025390625,
-0.02410888671875,
0.036224365234375,
0.0033435821533203125,
0.004730224609375,
-0.003658294677734375,
0.022674560546875,
-0.0186920166015625,
-0.01071929931640625,
0.0005207061767578125,
0.029632568359375,
-0.0064544677734375,
-0.005397796630859375,
0.0477294921875,
0.04022216796875,
0.0255584716796875,
0.01131439208984375,
-0.0215606689453125,
0.0728759765625,
-0.03118896484375,
-0.019439697265625,
-0.0570068359375,
0.007259368896484375,
-0.0343017578125,
-0.002544403076171875,
-0.03668212890625,
0.00791168212890625,
-0.00237274169921875,
0.0273590087890625,
-0.038238525390625,
-0.05712890625,
0.006305694580078125,
-0.06439208984375,
-0.0189056396484375,
0.0153961181640625,
-0.0293426513671875,
0.0265960693359375,
-0.048736572265625,
-0.048614501953125,
-0.003986358642578125,
0.023162841796875,
0.040191650390625,
-0.00881195068359375,
0.031646728515625,
0.002674102783203125,
0.054412841796875,
0.0294036865234375,
-0.0228729248046875,
0.02294921875,
0.006740570068359375,
-0.05926513671875,
0.0400390625,
0.0197601318359375,
0.042724609375,
-0.025909423828125,
0.006237030029296875,
0.055999755859375,
0.045135498046875,
-0.07110595703125,
0.04888916015625,
0.01861572265625,
-0.0284271240234375,
0.003047943115234375,
-0.007099151611328125,
0.0025119781494140625,
-0.0298919677734375,
-0.040740966796875,
0.0199127197265625,
-0.0083160400390625,
0.031707763671875,
-0.0220794677734375,
0.0220794677734375,
-0.0279541015625,
0.034210205078125,
0.01279449462890625,
0.02166748046875,
0.0021152496337890625,
0.00893402099609375,
-0.0157318115234375,
-0.03631591796875,
-0.027191162109375,
0.0295867919921875,
0.0269927978515625,
-0.0029449462890625,
-0.021331787109375,
0.006336212158203125,
-0.020721435546875,
-0.002529144287109375,
-0.046630859375,
0.03326416015625,
0.05889892578125,
-0.004955291748046875,
-0.016143798828125,
-0.034210205078125,
0.00023543834686279297,
0.0082855224609375,
-0.0938720703125,
0.056060791015625,
0.035919189453125,
0.01129150390625,
-0.03619384765625,
0.0179595947265625,
-0.0000718832015991211,
-0.0298919677734375,
-0.0217132568359375,
0.03314208984375,
0.019622802734375,
0.032806396484375,
-0.006053924560546875,
-0.0052642822265625,
0.0260009765625,
-0.018829345703125,
0.01154327392578125,
-0.0102691650390625,
-0.01352691650390625,
0.018280029296875,
-0.01166534423828125,
0.0122833251953125,
0.0261688232421875,
-0.003662109375,
0.021728515625,
0.029205322265625,
-0.0056915283203125,
-0.034698486328125,
0.00077056884765625,
0.0214080810546875,
0.0234832763671875,
0.01078033447265625,
-0.0302886962890625,
0.007305145263671875,
-0.01044464111328125,
0.0276641845703125,
0.0022373199462890625,
0.01369476318359375,
-0.0196380615234375,
0.007793426513671875,
0.01276397705078125,
-0.00890350341796875,
-0.007305145263671875,
0.0187225341796875,
0.0635986328125,
-0.024871826171875,
-0.03912353515625,
-0.0023479461669921875,
-0.00310516357421875,
0.0069732666015625,
-0.0157318115234375,
0.030853271484375,
0.0213165283203125,
-0.008209228515625,
-0.032318115234375,
-0.046905517578125,
0.022552490234375,
0.0287933349609375,
-0.035430908203125,
-0.01213836669921875,
0.010284423828125,
0.050140380859375,
-0.0183868408203125,
0.0204925537109375,
0.017608642578125,
-0.0016193389892578125,
0.04827880859375,
-0.033782958984375,
0.054229736328125,
-0.027069091796875,
0.02716064453125,
0.055694580078125,
-0.006122589111328125,
0.0166015625,
0.0224761962890625,
-0.035369873046875,
-0.003841400146484375,
0.004016876220703125,
0.004795074462890625,
0.01727294921875,
-0.05072021484375,
0.032745361328125,
0.006099700927734375,
0.040008544921875,
-0.0308685302734375,
-0.061431884765625,
-0.00971221923828125,
0.01232147216796875,
-0.04913330078125,
-0.045501708984375,
0.01221466064453125,
-0.027069091796875,
-0.018890380859375,
0.0211639404296875,
-0.0177001953125,
-0.0153656005859375,
0.041717529296875,
0.00865936279296875,
0.032867431640625,
-0.04986572265625,
-0.0650634765625,
-0.05133056640625,
-0.07171630859375,
0.01537322998046875,
0.00689697265625,
0.01021575927734375,
0.003261566162109375,
0.0172576904296875,
-0.01197052001953125,
-0.0709228515625,
-0.0301055908203125,
0.01019287109375,
0.00283050537109375,
0.01424407958984375,
-0.0150299072265625,
-0.0133514404296875,
-0.005161285400390625,
0.00798797607421875,
0.0111083984375,
0.0130767822265625,
-0.01490020751953125,
0.001140594482421875,
0.0005221366882324219,
0.00321197509765625,
0.0144805908203125,
-0.007045745849609375,
0.0164794921875,
0.026031494140625,
0.013214111328125,
-0.0394287109375,
-0.07318115234375,
-0.0186309814453125,
-0.0672607421875,
0.048095703125,
0.033355712890625,
0.01470947265625,
-0.01132965087890625,
0.03082275390625,
0.031646728515625,
0.0004220008850097656,
0.04498291015625,
-0.0228118896484375,
0.021392822265625,
0.00037026405334472656,
0.01263427734375,
-0.05841064453125,
0.061431884765625,
-0.0176849365234375,
-0.01227569580078125,
0.01192474365234375,
0.0038700103759765625,
0.0235595703125,
-0.015655517578125,
-0.022857666015625,
-0.043182373046875,
0.0482177734375,
-0.017364501953125,
0.007476806640625,
-0.041473388671875,
-0.024627685546875,
-0.0169219970703125,
0.09027099609375,
-0.0183258056640625,
-0.0185546875,
-0.0233306884765625,
-0.0028743743896484375,
0.01401519775390625,
-0.0137786865234375,
-0.02142333984375,
-0.024383544921875,
-0.052032470703125,
-0.00897979736328125,
-0.01436614990234375,
-0.0201263427734375,
-0.01248931884765625,
0.042388916015625,
-0.021942138671875,
-0.015625,
0.041412353515625,
-0.009674072265625,
-0.0213470458984375,
0.01093292236328125,
-0.007293701171875,
-0.0263519287109375,
-0.0279388427734375,
0.0080718994140625,
-0.041290283203125,
-0.02191162109375,
0.0212860107421875,
0.04498291015625,
0.01317596435546875,
-0.0447998046875,
-0.002674102783203125,
0.0662841796875,
0.0049896240234375,
0.039642333984375,
-0.0009899139404296875,
-0.010040283203125,
-0.01373291015625,
0.01165771484375,
0.024017333984375,
-0.0095062255859375,
0.01232147216796875,
-0.0085906982421875,
-0.055999755859375,
-0.0073394775390625,
-0.01331329345703125,
0.02001953125,
0.03887939453125,
-0.038482666015625,
-0.0745849609375,
-0.038299560546875,
-0.03131103515625,
-0.00298309326171875,
-0.00403594970703125,
-0.01023101806640625,
-0.040618896484375,
-0.07220458984375,
0.0295257568359375,
0.0181732177734375,
-0.0226593017578125,
0.0011796951293945312,
0.035186767578125,
0.0166168212890625,
-0.027191162109375,
0.006504058837890625,
0.003330230712890625,
0.0098114013671875,
-0.00661468505859375,
0.039276123046875,
-0.007694244384765625,
0.01349639892578125,
0.023712158203125,
-0.0289459228515625,
-0.0215301513671875,
-0.016693115234375,
0.046661376953125,
0.0030536651611328125,
-0.0159912109375,
0.0120849609375,
-0.0220184326171875,
0.05462646484375,
0.01983642578125,
-0.0237884521484375,
-0.005062103271484375,
-0.0638427734375,
0.053558349609375,
0.022430419921875,
0.0013608932495117188,
-0.08587646484375,
-0.0421142578125,
0.01537322998046875,
0.002338409423828125,
0.00540924072265625,
0.0296630859375,
-0.01444244384765625,
0.030792236328125,
-0.027679443359375,
0.0005741119384765625,
-0.03289794921875,
-0.01094818115234375,
-0.021942138671875,
0.039398193359375,
-0.064453125,
-0.00412750244140625,
-0.012298583984375,
-0.0008702278137207031,
0.047698974609375,
0.02642822265625,
-0.002132415771484375,
-0.0126800537109375,
-0.01227569580078125,
-0.035400390625,
-0.0170745849609375,
0.02191162109375,
0.02435302734375,
0.021759033203125,
-0.003276824951171875,
-0.01824951171875,
-0.0085906982421875,
0.02972412109375,
-0.046234130859375,
-0.008148193359375,
0.003292083740234375,
-0.025115966796875,
-0.00917816162109375,
0.01515960693359375,
0.0188446044921875,
-0.009490966796875,
-0.009185791015625,
-0.039337158203125,
-0.0066375732421875,
0.038909912109375,
0.0211944580078125,
-0.042327880859375,
0.0186767578125,
-0.00559234619140625,
0.0670166015625,
-0.026763916015625,
-0.0131988525390625,
0.04119873046875,
0.067138671875,
-0.00015687942504882812,
-0.0173797607421875,
-0.0172882080078125,
-0.031982421875,
-0.0283355712890625,
0.041534423828125,
-0.0105743408203125,
-0.03472900390625,
-0.0223846435546875,
0.029083251953125,
0.032012939453125,
0.00799560546875,
-0.01245880126953125,
-0.00040340423583984375,
-0.034332275390625,
-0.026580810546875,
0.054779052734375,
-0.0499267578125,
-0.001811981201171875,
-0.00043845176696777344,
-0.0034809112548828125,
-0.00865936279296875,
0.012420654296875,
-0.062103271484375,
-0.0213470458984375,
-0.01953125,
0.00955963134765625,
0.007419586181640625,
0.00543975830078125,
0.07940673828125,
-0.0311431884765625,
-0.04901123046875,
0.0081939697265625,
-0.004486083984375,
0.054229736328125,
0.0316162109375,
-0.064697265625,
-0.0096588134765625,
-0.0418701171875,
0.0006570816040039062,
-0.01168060302734375,
0.0008492469787597656,
-0.04290771484375,
0.005168914794921875,
-0.018951416015625,
0.0191192626953125,
-0.0218048095703125,
-0.011260986328125,
-0.016387939453125,
-0.00308990478515625,
-0.0034332275390625,
-0.006656646728515625,
-0.020660400390625,
0.0533447265625,
-0.013885498046875,
0.012603759765625,
0.01202392578125,
0.0323486328125,
0.0277557373046875,
-0.033966064453125,
0.0191650390625,
-0.00780487060546875,
-0.04620361328125,
0.006488800048828125,
-0.058868408203125,
0.0098419189453125,
0.06634521484375,
-0.0167694091796875,
0.00461578369140625,
-0.009613037109375,
0.01470947265625,
-0.032867431640625,
0.00606536865234375,
-0.057464599609375,
-0.0128173828125,
-0.022857666015625,
-0.01163482666015625,
0.01413726806640625,
0.024505615234375,
0.01568603515625,
0.002773284912109375,
-0.00638580322265625,
0.0042877197265625,
0.0038623809814453125,
-0.0465087890625,
0.06103515625,
0.040618896484375,
-0.0139312744140625,
0.0274505615234375,
-0.00882720947265625,
0.002880096435546875,
0.01523590087890625,
-0.0139007568359375,
0.018951416015625,
0.016448974609375,
0.051422119140625,
-0.004810333251953125,
0.023162841796875,
0.0474853515625,
-0.01776123046875,
-0.0367431640625,
0.02606201171875,
0.004299163818359375,
-0.046173095703125,
-0.006946563720703125,
-0.0158538818359375,
0.0300140380859375,
0.0340576171875,
0.021881103515625,
0.021575927734375,
0.069580078125,
-0.03924560546875,
-0.035552978515625,
-0.022796630859375,
-0.00616455078125,
-0.005756378173828125,
0.006732940673828125,
-0.01238250732421875,
0.039093017578125,
0.00040268898010253906,
-0.005779266357421875,
-0.0211029052734375,
0.01360321044921875,
-0.004589080810546875,
-0.004955291748046875,
0.0045928955078125,
0.0234222412109375,
-0.015960693359375,
-0.02490234375,
0.038238525390625,
-0.0299530029296875,
0.0013256072998046875,
0.0570068359375,
0.006561279296875,
-0.007381439208984375,
0.0251617431640625,
-0.0341796875,
0.031341552734375,
-0.00461578369140625,
-0.0751953125,
-0.01219940185546875,
-0.00997161865234375,
0.0261688232421875,
-0.035614013671875,
-0.08807373046875,
0.0019054412841796875,
-0.10113525390625,
0.017425537109375,
-0.0072479248046875,
-0.03778076171875,
0.0538330078125,
-0.042144775390625,
-0.0004699230194091797,
0.03082275390625,
0.00331878662109375,
-0.0179443359375,
-0.01351165771484375,
-0.0004343986511230469,
-0.0350341796875,
-0.00751495361328125,
-0.0191802978515625,
-0.0094757080078125,
-0.0012111663818359375,
-0.043853759765625,
-0.09552001953125,
0.1365966796875,
-0.014892578125,
0.093505859375,
0.019500732421875,
0.0345458984375,
-0.0184326171875,
0.00975799560546875,
-0.028167724609375,
0.07330322265625,
0.0859375,
0.0361328125,
-0.01812744140625,
-0.032684326171875,
0.03582763671875,
0.056640625,
0.06292724609375,
0.0105133056640625,
-0.030731201171875,
-0.02459716796875,
0.0247802734375,
0.00157928466796875,
-0.0234527587890625,
0.048980712890625,
0.0058746337890625,
0.0202789306640625,
0.0260009765625,
-0.0272216796875,
0.033721923828125,
-0.0073089599609375,
-0.0184326171875,
0.0131988525390625,
0.0225067138671875,
0.035064697265625,
-0.01375579833984375,
0.024444580078125,
0.0028324127197265625,
-0.0195770263671875,
0.0182037353515625,
-0.04388427734375,
0.033782958984375,
0.0142822265625,
0.051239013671875,
-0.08624267578125,
-0.052947998046875,
-0.024932861328125,
0.054656982421875,
-0.006923675537109375,
0.016448974609375,
-0.00439453125,
0.0194244384765625,
-0.02911376953125,
-0.005680084228515625,
0.01495361328125,
0.052764892578125,
-0.056365966796875,
0.031585693359375,
0.0266265869140625,
0.0286407470703125,
-0.0072021484375,
0.04119873046875,
0.042877197265625,
0.04302978515625,
-0.046875,
-0.05548095703125,
0.0241851806640625,
0.00464630126953125,
0.0027942657470703125,
0.00010401010513305664,
0.004642486572265625,
-0.044830322265625,
0.01055908203125,
-0.022857666015625,
-0.00481414794921875,
0.025726318359375,
0.04962158203125,
-0.00791168212890625,
-0.02655029296875,
-0.03594970703125,
-0.0272369384765625,
-0.0006661415100097656,
-0.041229248046875,
-0.01467132568359375,
0.027801513671875,
0.05889892578125,
0.012176513671875,
-0.0118560791015625,
-0.0274505615234375,
-0.0247955322265625,
-0.0145721435546875,
-0.00821685791015625,
0.028533935546875,
-0.042755126953125,
0.0013580322265625,
0.023651123046875,
0.045684814453125,
0.0478515625,
0.00832366943359375,
0.043426513671875,
0.00017952919006347656,
-0.043975830078125,
0.0024280548095703125,
-0.004199981689453125,
-0.0279541015625,
0.04443359375,
-0.031707763671875,
0.040679931640625,
0.003879547119140625,
-0.00441741943359375,
-0.05535888671875,
0.031646728515625,
0.024169921875,
-0.01306915283203125,
0.015869140625,
0.00536346435546875,
-0.00986480712890625,
0.0487060546875,
0.0238189697265625,
0.032958984375,
0.0197906494140625,
-0.036712646484375,
-0.0095062255859375,
0.01419830322265625,
-0.042877197265625,
0.0151519775390625,
0.0343017578125,
-0.01110076904296875,
0.005451202392578125,
0.053985595703125,
-0.014984130859375,
0.0037441253662109375,
-0.0026111602783203125,
0.00954437255859375,
-0.0009918212890625,
0.0026378631591796875,
0.01511383056640625,
-0.018218994140625,
0.00936126708984375,
0.0105133056640625,
-0.01404571533203125,
0.005039215087890625,
0.10113525390625,
-0.02313232421875,
-0.0031299591064453125,
-0.02191162109375,
0.017364501953125,
-0.026519775390625,
-0.038238525390625,
0.054595947265625,
-0.0110015869140625,
-0.006206512451171875,
-0.011260986328125,
-0.055145263671875,
-0.0091094970703125,
0.043609619140625,
-0.01971435546875,
0.01284027099609375,
-0.0260772705078125,
0.01971435546875,
-0.028472900390625,
0.01355743408203125,
-0.0262451171875,
-0.0266876220703125,
-0.031768798828125,
-0.00927734375,
0.029022216796875,
0.0009336471557617188,
-0.0274658203125,
0.039093017578125,
-0.001171112060546875,
-0.019317626953125,
0.0258636474609375,
-0.033172607421875,
0.038238525390625,
0.035797119140625,
-0.004383087158203125,
-0.0238037109375,
0.0404052734375,
-0.00026607513427734375,
0.0203857421875,
0.0189208984375,
0.04412841796875,
0.048919677734375,
-0.042755126953125,
-0.0103759765625,
-0.017059326171875,
-0.0107421875,
-0.0292816162109375,
-0.006725311279296875,
-0.010772705078125,
-0.005096435546875,
0.0026493072509765625,
-0.032989501953125,
-0.018035888671875,
-0.03485107421875,
-0.002841949462890625,
0.0262298583984375,
-0.0293426513671875,
-0.0169677734375,
-0.04693603515625,
0.0307464599609375,
0.0277252197265625,
0.0248870849609375,
-0.10211181640625,
0.07220458984375,
-0.018157958984375,
0.0467529296875,
-0.01552581787109375,
0.0008440017700195312,
-0.0164642333984375,
-0.0386962890625,
-0.047821044921875,
-0.0081939697265625,
-0.04949951171875,
0.01026153564453125,
-0.033843994140625,
0.044891357421875,
0.054473876953125,
-0.040130615234375,
-0.01248931884765625,
0.0186309814453125,
0.03607177734375,
0.0821533203125,
0.018218994140625,
-0.0222930908203125,
0.01922607421875,
-0.0013952255249023438,
-0.0038890838623046875,
-0.0180816650390625,
0.0092010498046875,
-0.00470733642578125,
0.0006580352783203125,
0.006870269775390625,
-0.01137542724609375,
0.006389617919921875,
-0.0249176025390625,
-0.02618408203125,
0.09100341796875,
0.0016632080078125,
-0.0181732177734375,
-0.0072479248046875,
0.02490234375,
-0.00875091552734375,
0.03973388671875,
0.0227203369140625,
-0.0084075927734375,
0.003902435302734375,
0.0027332305908203125,
0.012451171875,
0.058258056640625,
-0.039794921875,
0.0271759033203125,
0.0244598388671875,
0.0838623046875,
0.07330322265625,
0.018463134765625,
0.033905029296875,
0.01210784912109375,
0.0229949951171875,
0.059417724609375,
-0.030426025390625,
0.055694580078125,
-0.023193359375,
-0.0216217041015625,
-0.0164337158203125,
-0.031951904296875,
-0.01200103759765625,
0.01140594482421875,
0.0810546875,
0.041412353515625,
0.020599365234375,
-0.035675048828125,
-0.039459228515625,
-0.05108642578125,
-0.0033855438232421875,
-0.012115478515625,
0.0211334228515625,
-0.0758056640625,
0.019256591796875,
0.026580810546875,
-0.00861358642578125,
-0.00223541259765625,
-0.031219482421875,
-0.021392822265625,
-0.004791259765625,
0.0210723876953125,
0.021148681640625,
-0.01995849609375,
0.02874755859375,
0.025482177734375,
-0.025665283203125,
0.007617950439453125,
0.004199981689453125,
-0.004711151123046875,
0.0092620849609375,
0.0018548965454101562,
-0.0080413818359375,
0.00798797607421875,
-0.009002685546875,
0.0281829833984375,
0.0096282958984375,
0.035919189453125,
-0.039306640625,
-0.01116180419921875,
-0.03460693359375,
0.004367828369140625,
0.016998291015625,
-0.00823211669921875,
-0.0304107666015625,
0.052642822265625,
0.027130126953125,
0.052764892578125,
0.006664276123046875,
0.01042938232421875,
0.0024013519287109375,
0.0201416015625,
-0.00970458984375,
0.005176544189453125,
0.02276611328125,
-0.03863525390625,
-0.01361083984375,
-0.022674560546875,
-0.0187530517578125,
-0.0858154296875,
0.026092529296875,
-0.024017333984375,
-0.00843048095703125,
0.0325927734375
] |
744cfcd1bb217b0eabcf9ab6218396d23fa7b26b
|
Wordpress Stackexchange
Q: Get sidebar parameters (before_widget, before_title, etc.) from within a widget Is it possible to dynamically get sidebar parameters from within a widget? That is, I am trying to access the before_widget/after_widget/before_title/after_title/name parameters of the containing sidebar.
Suppose we have a sidebar registered like so:
register_sidebar( array(
'name' => "Homepage Sidebar",
'id' => 'homepage-sidebar',
'before_widget' => '<div id="%1$s" class="widget-container %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
How would I access those values from inside my widget's widget() function? Like, how would I do something like this:
public function widget( $args, $instance ) {
// outputs the content of the widget
if ($someCondition)
echo $sidebar->before_title . 'My widget title' . $sidebar->before_title;
echo 'You are looking at ' . $sidebar->name;
}
Is this possible?
A: The parameters are given (as an array) as the first argument provided to the widget method. The second argument, $instance, holds the options for that particular instance of the widget.
My usual set up is:
function widget($args, $instance){
//Extract the widget-sidebar parameters from array
extract($args, EXTR_SKIP);
echo $before_widget;
echo $before_title;
//Display title as stored in this instance of the widget
echo esc_html($instance['title']);
echo $after_title;
//Widget content
echo $after_widget;
}
|
Q: Get sidebar parameters (before_widget, before_title, etc.) from within a widget Is it possible to dynamically get sidebar parameters from within a widget? That is, I am trying to access the before_widget/after_widget/before_title/after_title/name parameters of the containing sidebar.
Suppose we have a sidebar registered like so:
register_sidebar( array(
'name' => "Homepage Sidebar",
'id' => 'homepage-sidebar',
'before_widget' => '<div id="%1$s" class="widget-container %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
How would I access those values from inside my widget's widget() function? Like, how would I do something like this:
public function widget( $args, $instance ) {
// outputs the content of the widget
if ($someCondition)
echo $sidebar->before_title . 'My widget title' . $sidebar->before_title;
echo 'You are looking at ' . $sidebar->name;
}
Is this possible?
A: The parameters are given (as an array) as the first argument provided to the widget method. The second argument, $instance, holds the options for that particular instance of the widget.
My usual set up is:
function widget($args, $instance){
//Extract the widget-sidebar parameters from array
extract($args, EXTR_SKIP);
echo $before_widget;
echo $before_title;
//Display title as stored in this instance of the widget
echo esc_html($instance['title']);
echo $after_title;
//Widget content
echo $after_widget;
}
A: Use variable name only, like:
$name
$before_title
$after_title
$before_widget
$after_widget
|
wordpress
|
{
"language": "en",
"length": 209,
"provenance": "stackexchange_00019.jsonl.gz:421187",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56429"
}
|
[
0.039306640625,
-0.03302001953125,
0.0024547576904296875,
-0.042449951171875,
-0.0178985595703125,
-0.0083160400390625,
0.0296173095703125,
-0.00304412841796875,
-0.02471923828125,
0.005985260009765625,
-0.0286865234375,
-0.0008420944213867188,
-0.041046142578125,
-0.022125244140625,
0.011138916015625,
-0.038665771484375,
0.0357666015625,
0.0143585205078125,
0.038726806640625,
-0.007289886474609375,
-0.01044464111328125,
0.0204620361328125,
0.00789642333984375,
0.07830810546875,
0.032867431640625,
-0.0185089111328125,
0.05816650390625,
0.0015001296997070312,
0.0311737060546875,
0.00637054443359375,
0.0491943359375,
-0.0645751953125,
0.01367950439453125,
-0.00377655029296875,
0.053375244140625,
0.06085205078125,
-0.00946807861328125,
0.00630950927734375,
0.046600341796875,
-0.01267242431640625,
0.039581298828125,
-0.0408935546875,
-0.01111602783203125,
0.0166778564453125,
-0.028076171875,
-0.022857666015625,
0.0391845703125,
0.0039215087890625,
0.01461029052734375,
0.0205841064453125,
0.01197052001953125,
-0.053558349609375,
0.00930023193359375,
0.0276336669921875,
-0.018951416015625,
0.0012912750244140625,
0.0225372314453125,
-0.035552978515625,
0.024505615234375,
0.004917144775390625,
-0.0254974365234375,
-0.0236663818359375,
0.045501708984375,
-0.031829833984375,
-0.0193939208984375,
-0.0102081298828125,
0.03399658203125,
0.01149749755859375,
-0.01148223876953125,
-0.01183319091796875,
0.042938232421875,
-0.005950927734375,
-0.01556396484375,
-0.0165252685546875,
-0.00550079345703125,
-0.00516510009765625,
-0.006927490234375,
-0.0232086181640625,
-0.006938934326171875,
0.015960693359375,
0.033599853515625,
0.0182037353515625,
-0.05194091796875,
0.02264404296875,
0.034149169921875,
0.047210693359375,
-0.00390625,
-0.039154052734375,
-0.0002493858337402344,
0.01317596435546875,
-0.003498077392578125,
-0.01507568359375,
0.042022705078125,
0.0010547637939453125,
-0.006732940673828125,
-0.05657958984375,
-0.022979736328125,
0.0186920166015625,
-0.04736328125,
0.047149658203125,
-0.0404052734375,
-0.00946044921875,
0.048492431640625,
-0.053375244140625,
0.00025582313537597656,
0.019775390625,
-0.029541015625,
0.046875,
0.046112060546875,
0.048065185546875,
0.0224761962890625,
-0.04193115234375,
-0.005954742431640625,
-0.03564453125,
-0.027252197265625,
0.055694580078125,
-0.008331298828125,
-0.00746917724609375,
0.0247802734375,
0.01323699951171875,
-0.003795623779296875,
0.01055145263671875,
0.03631591796875,
-0.019012451171875,
0.058258056640625,
0.053466796875,
-0.0138092041015625,
-0.0406494140625,
-0.0233001708984375,
0.0091705322265625,
-0.026519775390625,
-0.007259368896484375,
0.02838134765625,
0.044677734375,
0.0220184326171875,
-0.014251708984375,
0.046295166015625,
0.0024509429931640625,
0.002788543701171875,
0.0026721954345703125,
0.014068603515625,
-0.02142333984375,
-0.033935546875,
-0.00882720947265625,
0.007236480712890625,
-0.006866455078125,
0.0174407958984375,
0.0027027130126953125,
-0.0145263671875,
-0.0212860107421875,
0.01739501953125,
-0.0256805419921875,
0.019256591796875,
0.03424072265625,
-0.01458740234375,
0.052215576171875,
0.051788330078125,
-0.01192474365234375,
-0.0582275390625,
-0.027618408203125,
-0.01535797119140625,
-0.0204010009765625,
-0.019439697265625,
-0.01355743408203125,
-0.034698486328125,
0.036376953125,
0.039093017578125,
0.01508331298828125,
0.020721435546875,
0.0430908203125,
-0.025909423828125,
-0.039337158203125,
-0.00833892822265625,
0.053741455078125,
0.0091400146484375,
0.0655517578125,
-0.0294189453125,
-0.00304412841796875,
0.01030731201171875,
-0.0196685791015625,
-0.03765869140625,
-0.056427001953125,
0.00786590576171875,
-0.008270263671875,
-0.050811767578125,
0.006687164306640625,
0.0125732421875,
0.070068359375,
0.037750244140625,
0.028472900390625,
-0.006717681884765625,
-0.03948974609375,
-0.080078125,
0.053192138671875,
-0.036224365234375,
0.015716552734375,
0.004383087158203125,
0.0222320556640625,
-0.016876220703125,
-0.0132904052734375,
0.03582763671875,
-0.0275421142578125,
0.0421142578125,
-0.04534912109375,
-0.0283050537109375,
0.0004067420959472656,
-0.003387451171875,
0.0228729248046875,
0.0408935546875,
0.04949951171875,
0.00753021240234375,
0.0565185546875,
-0.057647705078125,
0.01496124267578125,
-0.032501220703125,
-0.0194549560546875,
0.00014841556549072266,
0.0718994140625,
-0.0202484130859375,
0.033355712890625,
-0.018463134765625,
-0.074951171875,
-0.006656646728515625,
0.04278564453125,
0.06768798828125,
-0.0384521484375,
0.017242431640625,
-0.041412353515625,
0.068115234375,
0.0163726806640625,
-0.051177978515625,
-0.00911712646484375,
-0.0194549560546875,
0.0175628662109375,
-0.0257568359375,
-0.0087127685546875,
-0.00943756103515625,
-0.02581787109375,
0.0250244140625,
0.0263824462890625,
0.03582763671875,
0.054840087890625,
0.0176239013671875,
0.01238250732421875,
0.028717041015625,
-0.0775146484375,
0.00067138671875,
-0.02728271484375,
0.002285003662109375,
0.01515960693359375,
-0.023162841796875,
0.00522613525390625,
0.021484375,
0.007396697998046875,
-0.0037384033203125,
0.0284271240234375,
-0.0296478271484375,
0.007328033447265625,
-0.0367431640625,
0.0115814208984375,
-0.00897979736328125,
-0.062469482421875,
-0.00952911376953125,
-0.0279998779296875,
0.047943115234375,
0.00313568115234375,
0.0457763671875,
0.030303955078125,
-0.026611328125,
0.00760650634765625,
0.01116180419921875,
0.0041656494140625,
-0.0099639892578125,
-0.0084991455078125,
0.034912109375,
-0.01261138916015625,
-0.026153564453125,
0.007091522216796875,
0.0031719207763671875,
-0.0229034423828125,
0.01535797119140625,
0.053131103515625,
0.00830841064453125,
0.0025539398193359375,
-0.046783447265625,
-0.046875,
0.041473388671875,
0.0931396484375,
0.055267333984375,
0.0099029541015625,
0.01177978515625,
0.0167083740234375,
-0.01012420654296875,
0.0673828125,
0.00946044921875,
-0.032684326171875,
-0.0107574462890625,
-0.00809478759765625,
0.0024051666259765625,
-0.01316070556640625,
0.03546142578125,
0.04339599609375,
-0.0016527175903320312,
-0.0263824462890625,
-0.00014793872833251953,
-0.0078582763671875,
0.0110321044921875,
0.007755279541015625,
0.0097808837890625,
-0.00799560546875,
-0.04473876953125,
0.025482177734375,
-0.0018243789672851562,
0.06494140625,
-0.029693603515625,
-0.03582763671875,
0.005527496337890625,
0.00585174560546875,
-0.027069091796875,
-0.0305938720703125,
0.050689697265625,
-0.020477294921875,
-0.03955078125,
0.01067352294921875,
-0.0229339599609375,
0.0011930465698242188,
0.01000213623046875,
-0.0259246826171875,
-0.008941650390625,
-0.0233001708984375,
-0.06689453125,
-0.041839599609375,
-0.0615234375,
0.021209716796875,
-0.0190582275390625,
0.0255279541015625,
-0.0024662017822265625,
0.004344940185546875,
-0.005794525146484375,
0.00032830238342285156,
0.03216552734375,
-0.00261688232421875,
0.0294342041015625,
0.00684356689453125,
-0.0182647705078125,
-0.008331298828125,
0.006195068359375,
-0.02911376953125,
0.05810546875,
0.034881591796875,
-0.025543212890625,
0.01352691650390625,
0.00724029541015625,
0.0190277099609375,
0.0257415771484375,
0.015838623046875,
-0.01465606689453125,
0.0211029052734375,
0.013427734375,
-0.031585693359375,
-0.0160064697265625,
-0.00655364990234375,
-0.04669189453125,
-0.0266876220703125,
0.028228759765625,
-0.005580902099609375,
-0.008331298828125,
-0.0128936767578125,
-0.0187835693359375,
-0.0100555419921875,
-0.008697509765625,
-0.035675048828125,
0.0243072509765625,
0.004459381103515625,
0.02032470703125,
0.0298309326171875,
-0.0107574462890625,
-0.022308349609375,
0.0187530517578125,
0.0025348663330078125,
0.0192413330078125,
0.00821685791015625,
0.0186004638671875,
-0.00847625732421875,
-0.01271820068359375,
0.05072021484375,
0.023162841796875,
0.040985107421875,
-0.0111083984375,
-0.040771484375,
-0.01526641845703125,
0.055328369140625,
-0.05548095703125,
-0.0216522216796875,
0.0129852294921875,
0.03265380859375,
-0.0667724609375,
-0.0638427734375,
-0.038818359375,
-0.0012464523315429688,
-0.1038818359375,
0.01508331298828125,
-0.00421905517578125,
-0.019439697265625,
-0.012481689453125,
0.01383209228515625,
-0.058868408203125,
-0.045654296875,
0.030029296875,
-0.0113525390625,
0.031280517578125,
-0.002471923828125,
0.0129547119140625,
-0.00376129150390625,
-0.0265960693359375,
-0.0175323486328125,
-0.060638427734375,
-0.00251007080078125,
-0.0208587646484375,
0.033111572265625,
0.01861572265625,
-0.03271484375,
-0.01338958740234375,
0.034088134765625,
0.0117950439453125,
-0.048095703125,
0.058441162109375,
0.02587890625,
-0.005767822265625,
-0.01200103759765625,
0.009002685546875,
-0.04046630859375,
0.0018892288208007812,
-0.0006651878356933594,
-0.05712890625,
-0.024658203125,
-0.0225830078125,
-0.003551483154296875,
0.03753662109375,
-0.05987548828125,
-0.036956787109375,
-0.018585205078125,
0.0267791748046875,
0.0173492431640625,
-0.03363037109375,
0.04095458984375,
-0.02203369140625,
-0.024139404296875,
0.03839111328125,
-0.0143890380859375,
0.0007486343383789062,
0.0025157928466796875,
0.0718994140625,
0.01508331298828125,
-0.029754638671875,
0.021209716796875,
-0.0408935546875,
0.019744873046875,
0.00850677490234375,
0.01763916015625,
0.018035888671875,
-0.01153564453125,
0.011016845703125,
0.0011138916015625,
0.004840850830078125,
0.017364501953125,
0.04541015625,
0.0275726318359375,
0.00705718994140625,
0.001934051513671875,
0.029815673828125,
-0.052398681640625,
0.0160369873046875,
-0.0172576904296875,
-0.0025310516357421875,
0.0283050537109375,
0.00653839111328125,
-0.043914794921875,
0.0249481201171875,
-0.00042724609375,
0.002197265625,
-0.0005164146423339844,
0.02490234375,
0.0182952880859375,
0.029693603515625,
0.0012865066528320312,
-0.031829833984375,
-0.0300140380859375,
-0.000885009765625,
0.04241943359375,
-0.020599365234375,
0.0089569091796875,
0.0184326171875,
0.03338623046875,
-0.01416778564453125,
0.05853271484375,
0.0215606689453125,
-0.002178192138671875,
0.00893402099609375,
0.004467010498046875,
-0.051483154296875,
0.01447296142578125,
-0.016326904296875,
-0.0250244140625,
0.044036865234375,
0.007534027099609375,
0.018218994140625,
-0.005695343017578125,
-0.0162200927734375,
0.00894927978515625,
0.032806396484375,
-0.01210784912109375,
0.017425537109375,
-0.00010246038436889648,
-0.0031070709228515625,
0.001495361328125,
0.05853271484375,
-0.0203399658203125,
0.0308837890625,
-0.015472412109375,
0.0308837890625,
0.0190277099609375,
0.010711669921875,
0.013641357421875,
-0.0216522216796875,
0.0362548828125,
-0.0460205078125,
0.0172882080078125,
-0.0199127197265625,
0.00333404541015625,
0.0455322265625,
0.029052734375,
0.0135345458984375,
-0.006610870361328125,
-0.0025615692138671875,
-0.01198577880859375,
-0.015594482421875,
0.0408935546875,
0.0286407470703125,
-0.0340576171875,
-0.019775390625,
-0.017120361328125,
0.028167724609375,
-0.00890350341796875,
-0.011077880859375,
-0.0128936767578125,
-0.0279541015625,
0.0190277099609375,
-0.034759521484375,
0.00848388671875,
0.00040268898010253906,
-0.0009937286376953125,
0.007442474365234375,
0.008148193359375,
-0.01294708251953125,
-0.048126220703125,
-0.049835205078125,
0.00856781005859375,
-0.0179901123046875,
0.056793212890625,
-0.0241851806640625,
0.07366943359375,
-0.055938720703125,
-0.016571044921875,
-0.04547119140625,
0.0163726806640625,
0.023101806640625,
0.034210205078125,
-0.0260009765625,
0.004528045654296875,
-0.0216827392578125,
-0.016357421875,
-0.02764892578125,
-0.05328369140625,
-0.041900634765625,
-0.0216827392578125,
-0.00856781005859375,
0.0274810791015625,
0.005107879638671875,
0.04339599609375,
0.001033782958984375,
0.002044677734375,
-0.024200439453125,
0.04681396484375,
-0.016448974609375,
0.033966064453125,
0.01422119140625,
0.05743408203125,
-0.00782012939453125,
-0.0135650634765625,
-0.019683837890625,
-0.0124359130859375,
0.0196380615234375,
-0.0162353515625,
-0.0179595947265625,
-0.023773193359375,
0.006671905517578125,
-0.048553466796875,
0.002765655517578125,
-0.0201416015625,
0.033172607421875,
-0.0081634521484375,
-0.01287841796875,
0.00212860107421875,
0.00876617431640625,
0.008270263671875,
0.015777587890625,
0.0623779296875,
-0.0477294921875,
-0.05767822265625,
-0.0041961669921875,
0.01258087158203125,
0.032745361328125,
-0.031463623046875,
0.00397491455078125,
0.0245819091796875,
-0.09332275390625,
0.0626220703125,
0.10931396484375,
0.028717041015625,
0.072998046875,
-0.00006604194641113281,
0.02294921875,
0.06646728515625,
0.004604339599609375,
0.014434814453125,
0.004058837890625,
0.046051025390625,
-0.012664794921875,
0.01177215576171875,
0.014739990234375,
-0.018310546875,
0.0175628662109375,
-0.0111083984375,
0.058380126953125,
-0.01535797119140625,
0.0208892822265625,
0.0259552001953125,
-0.0223541259765625,
0.0085906982421875,
0.01509857177734375,
-0.00843048095703125,
-0.0226287841796875,
0.028076171875,
-0.000713348388671875,
-0.01381683349609375,
0.01207733154296875,
0.006946563720703125,
-0.016876220703125,
-0.04205322265625,
0.00803375244140625,
0.0216217041015625,
-0.0278472900390625,
0.0479736328125,
0.00771331787109375,
0.01763916015625,
-0.0197601318359375,
-0.01496124267578125,
0.027679443359375,
-0.048614501953125,
-0.11181640625,
-0.0187835693359375,
-0.007495880126953125,
-0.046173095703125,
0.0058135986328125,
-0.027099609375,
0.075439453125,
0.02337646484375,
0.02044677734375,
0.00945281982421875,
-0.0136260986328125,
0.01476287841796875,
0.005458831787109375,
-0.0237579345703125,
-0.00957489013671875,
0.006320953369140625,
-0.023834228515625,
0.01187896728515625,
-0.0300445556640625,
-0.007274627685546875,
-0.0035343170166015625,
0.036407470703125,
0.059783935546875,
-0.0159759521484375,
-0.0288848876953125,
0.020904541015625,
0.05908203125,
0.01024627685546875,
-0.034149169921875,
-0.02099609375,
-0.091552734375,
-0.03961181640625,
-0.0244598388671875,
-0.055572509765625,
-0.0038547515869140625,
-0.052215576171875,
-0.0626220703125,
0.10693359375,
0.01226043701171875,
0.0199432373046875,
0.021148681640625,
0.03997802734375,
-0.053802490234375,
-0.006092071533203125,
-0.038330078125,
0.00673675537109375,
-0.004474639892578125,
0.01445770263671875,
-0.03643798828125,
-0.0016431808471679688,
-0.016357421875,
0.031585693359375,
0.0275421142578125,
0.0004508495330810547,
0.038604736328125,
-0.005664825439453125,
0.020416259765625,
0.05572509765625,
-0.0211334228515625,
-0.0258331298828125,
0.049102783203125,
0.00872802734375,
0.03192138671875,
0.00923919677734375,
0.06658935546875,
-0.088134765625,
0.0439453125,
0.051177978515625,
0.020751953125,
0.035919189453125,
-0.0302886962890625,
0.0260467529296875,
0.038055419921875,
-0.036895751953125,
-0.0131683349609375,
-0.035186767578125,
-0.0137176513671875,
0.07781982421875,
0.0399169921875,
0.045013427734375,
-0.0025959014892578125,
-0.02508544921875,
0.051544189453125,
0.00711822509765625,
-0.0070343017578125,
0.023284912109375,
0.0192718505859375,
-0.0171356201171875,
0.0236968994140625,
0.006900787353515625,
0.03887939453125,
-0.0009975433349609375,
0.0648193359375,
0.0030384063720703125,
0.0226593017578125,
-0.049468994140625,
0.0338134765625,
0.02313232421875,
0.06439208984375,
-0.054046630859375,
-0.0311737060546875,
0.0032062530517578125,
-0.0218048095703125,
-0.0017633438110351562,
-0.0008378028869628906,
0.010101318359375,
0.00836944580078125,
0.0239105224609375,
-0.0306396484375,
-0.01383209228515625,
0.0194244384765625,
0.0174560546875,
-0.0107574462890625,
-0.0445556640625,
0.0132598876953125,
-0.01000213623046875,
-0.03240966796875,
-0.036376953125,
-0.00366973876953125,
0.07525634765625,
0.0677490234375,
-0.0125732421875,
-0.033843994140625,
-0.0360107421875,
0.0063934326171875,
0.00968170166015625,
0.0098876953125,
-0.00042891502380371094,
0.01477813720703125,
0.00862884521484375,
-0.009368896484375,
0.0086822509765625,
0.043365478515625,
0.04205322265625,
0.02923583984375,
0.01515960693359375,
0.008209228515625,
0.0286102294921875,
0.04931640625,
-0.0064544677734375,
0.048736572265625,
-0.023345947265625,
0.0149688720703125,
-0.0263671875,
-0.0305938720703125,
-0.036285400390625,
0.0293426513671875,
-0.0015897750854492188,
0.0016803741455078125,
0.052703857421875,
-0.005451202392578125,
0.034637451171875,
0.06951904296875,
-0.042388916015625,
0.0237579345703125,
-0.007411956787109375,
-0.061370849609375,
-0.0105743408203125,
-0.007587432861328125,
-0.04779052734375,
0.01369476318359375,
0.036773681640625,
-0.034088134765625,
0.0264739990234375,
-0.01233673095703125,
0.0068206787109375,
0.01531219482421875,
-0.03826904296875,
0.02630615234375,
0.0380859375,
0.01104736328125,
0.037261962890625,
-0.04779052734375,
-0.008758544921875,
0.00823974609375,
-0.0076446533203125,
0.0400390625,
0.01160430908203125,
0.03875732421875,
0.027191162109375,
-0.0177154541015625,
0.0009713172912597656,
0.003269195556640625,
-0.0531005859375,
0.03643798828125,
0.01494598388671875,
0.009124755859375,
-0.012115478515625,
-0.0124359130859375,
0.031951904296875,
0.031036376953125,
-0.0027408599853515625,
0.0225982666015625,
-0.0294952392578125,
0.020355224609375,
-0.0009441375732421875,
0.0144805908203125,
-0.0174102783203125,
-0.01515960693359375,
0.01387786865234375,
-0.0003554821014404297,
0.0185394287109375,
0.0218353271484375,
-0.00281524658203125,
-0.015594482421875,
0.049835205078125,
-0.01471710205078125,
0.0287628173828125,
0.024688720703125,
0.051055908203125,
0.02764892578125,
-0.0136566162109375,
-0.0243377685546875,
0.015167236328125,
-0.00920867919921875,
0.01215362548828125,
0.01457977294921875,
0.055450439453125,
-0.0047760009765625,
0.046112060546875,
0.004810333251953125,
0.0232391357421875,
0.021392822265625,
-0.037445068359375,
0.0164031982421875,
0.037811279296875,
-0.0128326416015625,
0.00250244140625,
-0.0338134765625,
-0.047515869140625,
-0.06787109375,
-0.01013946533203125,
0.033447265625,
-0.04888916015625,
-0.01433563232421875,
-0.07318115234375,
-0.029022216796875,
0.026275634765625,
0.0108642578125,
-0.0352783203125,
0.0217437744140625,
-0.020599365234375,
-0.0238494873046875,
-0.0135345458984375,
0.0010576248168945312,
0.01099395751953125,
0.00969696044921875,
-0.03204345703125,
0.019622802734375,
-0.0222625732421875,
-0.0180511474609375,
0.01070404052734375,
0.0229949951171875,
0.01380157470703125,
-0.019500732421875,
0.0244598388671875,
0.03826904296875,
0.023895263671875,
0.06982421875,
-0.0200347900390625,
0.00922393798828125,
0.0299530029296875,
0.04095458984375,
-0.050140380859375,
-0.08935546875,
0.0142059326171875,
0.004604339599609375,
0.00595855712890625,
0.012237548828125,
-0.032501220703125,
-0.0333251953125,
-0.03851318359375,
-0.013092041015625,
0.0673828125,
0.00830078125,
-0.017791748046875,
-0.00861358642578125,
0.0239715576171875,
-0.0018491744995117188,
-0.00974273681640625,
0.0176239013671875,
-0.030792236328125,
-0.00426483154296875,
0.006038665771484375,
0.04608154296875,
0.0208740234375,
0.04461669921875,
0.0233306884765625,
-0.0848388671875,
0.0087432861328125,
-0.0272216796875,
0.0743408203125,
-0.01276397705078125,
-0.02618408203125,
0.0024127960205078125,
0.0100250244140625,
-0.041748046875,
-0.07684326171875,
0.01239776611328125,
0.0170745849609375,
-0.01788330078125,
-0.033233642578125,
-0.0309906005859375,
0.0019283294677734375,
0.059539794921875,
0.06768798828125,
0.0134429931640625,
-0.04327392578125,
-0.01512908935546875,
0.037994384765625,
-0.0304718017578125,
-0.01082611083984375,
0.0257568359375,
-0.06585693359375,
-0.036285400390625,
-0.005290985107421875,
0.011077880859375,
0.0007419586181640625,
-0.02032470703125,
-0.0189666748046875,
-0.0104827880859375,
0.017791748046875,
0.02325439453125,
-0.043243408203125,
0.0014057159423828125,
0.05377197265625,
-0.038116455078125,
0.02410888671875,
-0.0029544830322265625,
0.0162353515625,
0.041412353515625,
0.00989532470703125,
-0.023468017578125,
0.044189453125,
-0.033203125,
0.0011491775512695312,
-0.006175994873046875,
0.031005859375,
-0.025177001953125,
0.0197906494140625,
-0.016510009765625,
0.00949859619140625,
0.002956390380859375,
-0.009185791015625,
-0.0007581710815429688,
0.01239776611328125,
0.006366729736328125,
0.06292724609375,
-0.0211944580078125,
0.03912353515625,
-0.005451202392578125,
0.045440673828125,
-0.00493621826171875,
-0.0089569091796875,
0.03961181640625,
-0.043426513671875,
-0.0046844482421875,
-0.0138092041015625,
-0.0035114288330078125,
-0.04736328125,
0.0104522705078125,
0.054412841796875,
0.01421356201171875,
0.0165557861328125
] |
b293e23f7141ffa00af53f21279d92406b4d54a1
|
Wordpress Stackexchange
Q: Which filters or actions to use after a media upload and delete? When a media (image) is uploaded and the subsequent images are created (all the different sizes), I would like to perform a few actions. It is simple and I basically need only the new attachment ID, that would be enough.
Same during deletion: before or after deletion, I need to know which attachment ID is concerned.
Thanks for your help :)
A: i guess you are looking for this
add_attachment
and
delete_attachment
example:
add_action('add_attachment', 'attachment_manipulation');
function attachment_manipulation($id)
{
if(wp_attachment_is_image($id)){
//do your own tasks
}
}
|
Q: Which filters or actions to use after a media upload and delete? When a media (image) is uploaded and the subsequent images are created (all the different sizes), I would like to perform a few actions. It is simple and I basically need only the new attachment ID, that would be enough.
Same during deletion: before or after deletion, I need to know which attachment ID is concerned.
Thanks for your help :)
A: i guess you are looking for this
add_attachment
and
delete_attachment
example:
add_action('add_attachment', 'attachment_manipulation');
function attachment_manipulation($id)
{
if(wp_attachment_is_image($id)){
//do your own tasks
}
}
|
wordpress
|
{
"language": "en",
"length": 98,
"provenance": "stackexchange_00019.jsonl.gz:421189",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56434"
}
|
[
0.0277252197265625,
0.0110321044921875,
-0.0264129638671875,
0.0014486312866210938,
0.02880859375,
-0.029632568359375,
0.056732177734375,
-0.027496337890625,
0.042449951171875,
0.026641845703125,
-0.01326751708984375,
0.006343841552734375,
0.05670166015625,
-0.03704833984375,
-0.0007038116455078125,
0.01432037353515625,
0.0308685302734375,
-0.0233306884765625,
0.04266357421875,
-0.0022716522216796875,
-0.0010271072387695312,
0.012969970703125,
0.072021484375,
-0.0019817352294921875,
-0.025726318359375,
0.016357421875,
0.0501708984375,
-0.012725830078125,
-0.041259765625,
-0.02056884765625,
-0.01210784912109375,
0.034912109375,
-0.0004062652587890625,
-0.004039764404296875,
0.03131103515625,
0.0479736328125,
0.021484375,
0.009368896484375,
0.037139892578125,
0.005191802978515625,
0.05242919921875,
-0.02996826171875,
0.01250457763671875,
-0.00284576416015625,
0.006683349609375,
-0.012054443359375,
0.039306640625,
-0.054779052734375,
0.0340576171875,
0.03692626953125,
-0.00778961181640625,
-0.003734588623046875,
-0.00441741943359375,
0.0162353515625,
-0.01004791259765625,
-0.03973388671875,
-0.017730712890625,
0.0350341796875,
0.02630615234375,
0.029998779296875,
-0.0443115234375,
0.01291656494140625,
0.0026702880859375,
-0.0662841796875,
0.0166778564453125,
0.0019407272338867188,
-0.0181427001953125,
0.0225372314453125,
-0.07794189453125,
-0.025146484375,
0.04046630859375,
-0.0634765625,
-0.00951385498046875,
-0.051666259765625,
0.008514404296875,
0.03326416015625,
0.004108428955078125,
-0.0115966796875,
0.0019626617431640625,
0.005458831787109375,
0.019439697265625,
-0.005535125732421875,
-0.0086517333984375,
-0.018341064453125,
0.0206451416015625,
0.00989532470703125,
-0.003269195556640625,
-0.026763916015625,
-0.02435302734375,
-0.00157928466796875,
-0.01971435546875,
-0.07452392578125,
0.047332763671875,
-0.01203155517578125,
-0.035736083984375,
-0.0214691162109375,
0.0208892822265625,
0.02276611328125,
0.007843017578125,
0.00473785400390625,
0.0225982666015625,
-0.04779052734375,
0.006183624267578125,
-0.0245513916015625,
0.0192413330078125,
-0.00928497314453125,
-0.00751495361328125,
-0.031097412109375,
0.0258331298828125,
0.028076171875,
-0.0413818359375,
0.0439453125,
0.0196533203125,
0.0007634162902832031,
-0.01418304443359375,
-0.021026611328125,
-0.031982421875,
0.03985595703125,
0.00072479248046875,
-0.0005540847778320312,
-0.021697998046875,
-0.0252227783203125,
0.0181427001953125,
-0.0234222412109375,
0.019073486328125,
-0.0013380050659179688,
-0.023101806640625,
-0.00012993812561035156,
0.02813720703125,
0.033935546875,
-0.033416748046875,
0.0289764404296875,
0.03509521484375,
-0.052093505859375,
-0.0272369384765625,
-0.022491455078125,
0.00927734375,
0.01434326171875,
0.0146331787109375,
-0.01373291015625,
0.038848876953125,
-0.0180206298828125,
-0.0127716064453125,
0.051605224609375,
0.0238037109375,
0.06304931640625,
0.024383544921875,
-0.0224151611328125,
-0.00811004638671875,
-0.085693359375,
0.030975341796875,
-0.04376220703125,
0.03509521484375,
0.0063018798828125,
0.0032825469970703125,
-0.0201873779296875,
0.06829833984375,
-0.04156494140625,
-0.0109405517578125,
-0.070556640625,
0.0191192626953125,
0.005096435546875,
0.01175689697265625,
-0.033721923828125,
-0.02056884765625,
-0.027801513671875,
-0.05804443359375,
0.00514984130859375,
0.031402587890625,
0.036163330078125,
0.0321044921875,
-0.048095703125,
0.00662994384765625,
0.006439208984375,
-0.021697998046875,
0.019805908203125,
0.0099334716796875,
0.005359649658203125,
0.0068817138671875,
0.048736572265625,
0.00719451904296875,
-0.0241851806640625,
0.035125732421875,
-0.006946563720703125,
-0.048553466796875,
-0.0007696151733398438,
0.0172271728515625,
0.04412841796875,
0.0207366943359375,
0.027435302734375,
0.045379638671875,
0.005458831787109375,
-0.0216064453125,
0.00522613525390625,
0.004276275634765625,
-0.024566650390625,
-0.004688262939453125,
-0.00778961181640625,
-0.007289886474609375,
-0.016937255859375,
0.036865234375,
0.039642333984375,
0.01071929931640625,
-0.01027679443359375,
-0.05535888671875,
0.038970947265625,
-0.026885986328125,
0.044647216796875,
-0.0679931640625,
-0.003101348876953125,
0.043548583984375,
-0.01934814453125,
-0.01306915283203125,
-0.02374267578125,
0.0198974609375,
0.0150146484375,
-0.0310821533203125,
-0.0108642578125,
-0.0245819091796875,
0.04754638671875,
-0.0723876953125,
-0.0008983612060546875,
-0.06573486328125,
-0.01161956787109375,
0.04522705078125,
0.0034236907958984375,
-0.017547607421875,
-0.0113983154296875,
0.05511474609375,
0.003421783447265625,
-0.01453399658203125,
0.0261688232421875,
0.0211334228515625,
0.01439666748046875,
-0.0185546875,
-0.01471710205078125,
-0.039398193359375,
-0.146728515625,
0.0103759765625,
0.0892333984375,
0.00691986083984375,
0.043609619140625,
0.0188446044921875,
0.0592041015625,
0.061004638671875,
0.027801513671875,
0.036376953125,
0.0110931396484375,
0.016021728515625,
0.05120849609375,
-0.0455322265625,
-0.00412750244140625,
0.00168609619140625,
-0.08941650390625,
0.01311492919921875,
0.028472900390625,
-0.0276031494140625,
-0.0467529296875,
-0.003322601318359375,
0.01326751708984375,
0.021087646484375,
-0.031036376953125,
-0.025970458984375,
-0.0026073455810546875,
0.03271484375,
0.0012845993041992188,
0.0294036865234375,
0.0143585205078125,
-0.0214385986328125,
0.023956298828125,
0.0114898681640625,
-0.051910400390625,
0.0004887580871582031,
0.03955078125,
0.021087646484375,
-0.0214385986328125,
-0.016357421875,
-0.00569915771484375,
-0.02105712890625,
0.005664825439453125,
-0.0190277099609375,
0.01435089111328125,
-0.01568603515625,
-0.029937744140625,
0.00720977783203125,
-0.0188140869140625,
0.00334930419921875,
-0.0462646484375,
-0.0157318115234375,
-0.01380157470703125,
-0.0032749176025390625,
0.0594482421875,
0.00005716085433959961,
0.03167724609375,
0.0164947509765625,
-0.0082244873046875,
-0.01605224609375,
-0.0124664306640625,
0.0293731689453125,
-0.037017822265625,
0.034393310546875,
0.0599365234375,
-0.046630859375,
0.034912109375,
-0.0157318115234375,
0.01277923583984375,
0.0245208740234375,
-0.01198577880859375,
-0.0203857421875,
-0.0311126708984375,
-0.0115966796875,
-0.00545501708984375,
0.00836944580078125,
0.001956939697265625,
-0.032684326171875,
-0.042633056640625,
-0.0309295654296875,
-0.0174560546875,
-0.08172607421875,
-0.0207061767578125,
-0.0015382766723632812,
-0.091064453125,
0.01541900634765625,
-0.007904052734375,
-0.039703369140625,
-0.0169677734375,
0.02752685546875,
0.0091552734375,
-0.0249481201171875,
0.0151824951171875,
0.03424072265625,
0.006557464599609375,
0.006282806396484375,
-0.01284027099609375,
0.00473785400390625,
0.0008573532104492188,
0.0020999908447265625,
0.0543212890625,
0.00652313232421875,
-0.039093017578125,
0.00923919677734375,
-0.057647705078125,
-0.0194244384765625,
0.0036029815673828125,
0.05035400390625,
-0.026092529296875,
-0.04345703125,
0.012542724609375,
0.056884765625,
0.0311737060546875,
-0.049652099609375,
-0.004451751708984375,
-0.030975341796875,
-0.00922393798828125,
-0.00974273681640625,
0.0198822021484375,
0.03131103515625,
-0.013671875,
0.0008826255798339844,
-0.053253173828125,
0.040069580078125,
-0.0263824462890625,
-0.01042938232421875,
0.030517578125,
0.01137542724609375,
-0.023223876953125,
-0.0015916824340820312,
0.00033926963806152344,
0.017120361328125,
0.0298919677734375,
-0.0345458984375,
0.0007987022399902344,
0.005191802978515625,
0.004268646240234375,
0.012542724609375,
0.0243072509765625,
0.009185791015625,
-0.02142333984375,
-0.0172882080078125,
-0.0229949951171875,
0.01235198974609375,
-0.00464630126953125,
0.0034999847412109375,
-0.032012939453125,
0.0037689208984375,
0.022369384765625,
-0.002330780029296875,
0.041290283203125,
-0.0286712646484375,
-0.02032470703125,
-0.0299072265625,
0.0540771484375,
-0.034088134765625,
-0.0162811279296875,
-0.03741455078125,
0.005062103271484375,
0.01538848876953125,
-0.03790283203125,
0.0159759521484375,
-0.0155487060546875,
-0.061798095703125,
0.042144775390625,
0.01062774658203125,
-0.00620269775390625,
-0.031280517578125,
0.021331787109375,
-0.042144775390625,
-0.0299530029296875,
0.039215087890625,
-0.03533935546875,
0.009796142578125,
0.0042877197265625,
-0.00432586669921875,
-0.006137847900390625,
-0.02398681640625,
-0.0223388671875,
-0.0501708984375,
-0.00013363361358642578,
-0.03424072265625,
0.041259765625,
0.016265869140625,
0.0243072509765625,
-0.020416259765625,
0.033660888671875,
-0.00250244140625,
0.01165008544921875,
-0.014862060546875,
0.010467529296875,
-0.0234527587890625,
-0.03436279296875,
-0.0189971923828125,
-0.043426513671875,
-0.025360107421875,
-0.07037353515625,
-0.035797119140625,
-0.06256103515625,
-0.038970947265625,
0.001956939697265625,
-0.035125732421875,
-0.001861572265625,
-0.042572021484375,
-0.01535797119140625,
-0.029541015625,
0.0070648193359375,
-0.01355743408203125,
-0.0040130615234375,
-0.033477783203125,
-0.062469482421875,
0.01104736328125,
-0.03857421875,
0.0124664306640625,
0.01434326171875,
0.08013916015625,
0.0083160400390625,
0.0116729736328125,
-0.050018310546875,
-0.01395416259765625,
0.0257110595703125,
-0.000025510787963867188,
0.028564453125,
0.0282135009765625,
-0.01313018798828125,
-0.00421905517578125,
0.01212310791015625,
0.004215240478515625,
-0.0533447265625,
0.07257080078125,
-0.005908966064453125,
-0.0093231201171875,
0.0236358642578125,
-0.024505615234375,
0.039703369140625,
-0.03814697265625,
-0.027740478515625,
-0.00466156005859375,
0.007144927978515625,
0.04595947265625,
-0.01546478271484375,
0.049835205078125,
-0.0248260498046875,
-0.0257720947265625,
0.0085906982421875,
-0.037933349609375,
0.0599365234375,
0.0054473876953125,
-0.0060882568359375,
0.0193328857421875,
0.030303955078125,
0.0184326171875,
-0.01611328125,
0.005558013916015625,
-0.022918701171875,
0.07391357421875,
-0.037933349609375,
0.005390167236328125,
-0.0084686279296875,
-0.0069580078125,
0.011688232421875,
0.0091400146484375,
-0.00893402099609375,
-0.0292816162109375,
-0.0045013427734375,
-0.002132415771484375,
-0.004329681396484375,
-0.0005669593811035156,
0.02301025390625,
0.0210418701171875,
-0.004878997802734375,
-0.01029205322265625,
-0.033203125,
0.0214080810546875,
-0.038482666015625,
-0.0150909423828125,
-0.0214385986328125,
-0.0211029052734375,
0.045013427734375,
-0.0197906494140625,
-0.044097900390625,
0.019989013671875,
0.003753662109375,
0.050750732421875,
0.034423828125,
-0.0046234130859375,
0.009613037109375,
0.0372314453125,
0.002002716064453125,
-0.0225982666015625,
0.01132965087890625,
-0.033966064453125,
0.0035552978515625,
0.04205322265625,
0.0439453125,
-0.02789306640625,
-0.02484130859375,
0.01194000244140625,
-0.0190277099609375,
-0.027496337890625,
0.04205322265625,
0.0300445556640625,
-0.052093505859375,
0.0054931640625,
0.033355712890625,
-0.0022430419921875,
-0.005706787109375,
0.0018444061279296875,
0.0008335113525390625,
0.01425933837890625,
0.033203125,
-0.0083160400390625,
-0.0155792236328125,
-0.00579833984375,
0.0093536376953125,
0.01197052001953125,
-0.01369476318359375,
-0.0163116455078125,
-0.020965576171875,
-0.0264434814453125,
-0.0118408203125,
0.004421234130859375,
0.049530029296875,
-0.01236724853515625,
-0.004642486572265625,
-0.01006317138671875,
0.0024280548095703125,
-0.007293701171875,
0.01641845703125,
0.0272979736328125,
-0.0087432861328125,
-0.014312744140625,
-0.0300445556640625,
-0.027984619140625,
-0.005950927734375,
-0.00144195556640625,
-0.021942138671875,
-0.004894256591796875,
-0.00858306884765625,
-0.0277252197265625,
0.004009246826171875,
0.007045745849609375,
0.07470703125,
0.014923095703125,
0.057159423828125,
-0.0261383056640625,
0.045196533203125,
0.0212860107421875,
0.002166748046875,
0.017578125,
0.0033969879150390625,
0.038421630859375,
0.017822265625,
-0.0298919677734375,
-0.0270233154296875,
-0.0166473388671875,
-0.03704833984375,
0.009918212890625,
0.005001068115234375,
-0.00849151611328125,
0.0091552734375,
0.031982421875,
0.0102996826171875,
0.0274200439453125,
-0.04571533203125,
-0.0328369140625,
-0.0269775390625,
0.080078125,
-0.05010986328125,
0.0439453125,
-0.0189056396484375,
-0.07025146484375,
-0.005893707275390625,
0.019561767578125,
0.030975341796875,
0.0236663818359375,
-0.0599365234375,
0.0058441162109375,
0.06317138671875,
0.031982421875,
-0.01132965087890625,
0.04730224609375,
-0.02069091796875,
0.026153564453125,
0.045989990234375,
-0.0008497238159179688,
0.0296783447265625,
-0.00733184814453125,
0.01934814453125,
-0.0201416015625,
0.043426513671875,
0.0002841949462890625,
0.004482269287109375,
0.049896240234375,
-0.0275726318359375,
0.0240936279296875,
0.016021728515625,
0.052490234375,
-0.0229644775390625,
0.00684356689453125,
0.00704193115234375,
-0.0235748291015625,
0.037506103515625,
-0.01806640625,
0.0286865234375,
0.01380157470703125,
0.022857666015625,
0.02423095703125,
-0.023040771484375,
0.0082244873046875,
-0.0070037841796875,
0.01117706298828125,
-0.0007977485656738281,
-0.0080108642578125,
-0.0156097412109375,
-0.0019779205322265625,
-0.050384521484375,
0.01287078857421875,
-0.0125274658203125,
-0.0167388916015625,
0.01068878173828125,
-0.005634307861328125,
-0.00390625,
-0.0192413330078125,
0.038299560546875,
-0.01038360595703125,
0.016510009765625,
-0.023468017578125,
-0.03704833984375,
0.0300750732421875,
0.0166015625,
-0.022918701171875,
-0.0009741783142089844,
0.0029621124267578125,
-0.0239715576171875,
-0.0570068359375,
-0.038543701171875,
0.01319122314453125,
0.031158447265625,
-0.058837890625,
0.034515380859375,
-0.0291900634765625,
-0.018951416015625,
-0.002902984619140625,
-0.0145263671875,
0.0225067138671875,
-0.06036376953125,
0.01457977294921875,
0.04156494140625,
0.061492919921875,
-0.001430511474609375,
-0.0014848709106445312,
-0.000629425048828125,
-0.06353759765625,
-0.04925537109375,
-0.0168304443359375,
-0.07037353515625,
0.0157318115234375,
-0.0201416015625,
-0.0689697265625,
0.08154296875,
-0.0289764404296875,
0.06060791015625,
0.01181793212890625,
0.0126800537109375,
0.0054473876953125,
-0.00276947021484375,
-0.035980224609375,
0.0219268798828125,
-0.053375244140625,
0.0053558349609375,
-0.052764892578125,
0.0156402587890625,
-0.02691650390625,
0.006473541259765625,
0.084228515625,
0.015899658203125,
-0.041351318359375,
0.0025043487548828125,
0.05596923828125,
0.0218963623046875,
-0.0104522705078125,
0.05108642578125,
-0.019256591796875,
-0.0105743408203125,
0.0056915283203125,
-0.035614013671875,
0.0150146484375,
-0.037322998046875,
-0.0153656005859375,
-0.0029163360595703125,
0.022308349609375,
0.04095458984375,
-0.0167083740234375,
0.0899658203125,
0.00710296630859375,
-0.02593994140625,
0.023040771484375,
-0.035736083984375,
-0.005950927734375,
0.039215087890625,
0.0028133392333984375,
-0.0263824462890625,
0.0021343231201171875,
-0.0249176025390625,
0.04486083984375,
-0.01422882080078125,
0.034881591796875,
0.0875244140625,
0.02752685546875,
-0.005535125732421875,
0.040802001953125,
0.041748046875,
0.0029449462890625,
0.003398895263671875,
0.021331787109375,
0.0010433197021484375,
0.0068511962890625,
-0.050048828125,
-0.0025920867919921875,
0.028076171875,
0.03497314453125,
-0.0199127197265625,
-0.013427734375,
0.01425933837890625,
0.00966644287109375,
0.0202789306640625,
-0.0015010833740234375,
0.03643798828125,
-0.056060791015625,
-0.01983642578125,
-0.027801513671875,
0.0220794677734375,
0.0166473388671875,
0.0263214111328125,
0.0101318359375,
0.029815673828125,
-0.06903076171875,
0.002986907958984375,
-0.038360595703125,
0.0258331298828125,
0.022705078125,
0.00963592529296875,
-0.021697998046875,
0.053192138671875,
0.011016845703125,
0.0140228271484375,
-0.0257568359375,
0.05218505859375,
-0.0194549560546875,
0.040924072265625,
-0.041229248046875,
-0.046173095703125,
-0.01215362548828125,
0.0408935546875,
0.0472412109375,
0.042236328125,
0.044586181640625,
-0.0173797607421875,
-0.025482177734375,
0.0136260986328125,
0.0140838623046875,
-0.041534423828125,
0.0177001953125,
-0.046722412109375,
0.0230865478515625,
0.0169219970703125,
-0.00209808349609375,
-0.0162506103515625,
-0.04034423828125,
0.0714111328125,
-0.017852783203125,
0.00547027587890625,
-0.0077362060546875,
-0.052490234375,
0.0609130859375,
-0.031707763671875,
0.0841064453125,
-0.0196533203125,
-0.0699462890625,
0.004398345947265625,
-0.046661376953125,
-0.04608154296875,
0.019500732421875,
0.02740478515625,
-0.0285797119140625,
0.032318115234375,
-0.0249481201171875,
-0.042633056640625,
0.0196685791015625,
0.007366180419921875,
0.0017995834350585938,
0.0269012451171875,
0.00736236572265625,
-0.01666259765625,
0.00347900390625,
-0.00495147705078125,
0.0017681121826171875,
0.0433349609375,
0.03472900390625,
0.016632080078125,
-0.0093536376953125,
0.0311279296875,
0.004299163818359375,
0.044403076171875,
-0.021881103515625,
0.0060882568359375,
0.032501220703125,
0.0116119384765625,
0.004302978515625,
-0.01776123046875,
0.033966064453125,
0.0176849365234375,
0.020233154296875,
-0.035125732421875,
-0.008636474609375,
-0.03179931640625,
0.0164947509765625,
0.0205841064453125,
0.02996826171875,
-0.01428985595703125,
-0.02032470703125,
-0.0200958251953125,
-0.0023250579833984375,
0.0280914306640625,
0.0226287841796875,
-0.01995849609375,
0.0037899017333984375,
-0.0025539398193359375,
0.005725860595703125,
0.012054443359375,
0.034820556640625,
-0.00994873046875,
0.0084228515625,
-0.055572509765625,
-0.029449462890625,
0.0081939697265625,
-0.01336669921875,
-0.00699615478515625,
0.01486968994140625,
0.0390625,
0.0020618438720703125,
0.0003802776336669922,
-0.04736328125,
-0.0323486328125,
0.03350830078125,
-0.0019435882568359375,
0.0092315673828125,
-0.056427001953125,
0.020355224609375,
-0.017669677734375,
-0.036651611328125,
-0.032318115234375,
-0.05694580078125,
-0.01552581787109375,
0.0079345703125,
-0.03472900390625,
-0.04656982421875,
-0.030303955078125,
-0.01435089111328125,
0.036285400390625,
0.047119140625,
-0.1026611328125,
0.063232421875,
-0.001697540283203125,
-0.0133819580078125,
0.00417327880859375,
-0.01000213623046875,
-0.0253753662109375,
0.01132965087890625,
-0.041595458984375,
-0.06658935546875,
-0.058074951171875,
0.049530029296875,
-0.055084228515625,
0.0114898681640625,
0.01324462890625,
-0.041717529296875,
-0.0194091796875,
0.03961181640625,
0.059783935546875,
0.0697021484375,
0.048614501953125,
-0.051361083984375,
-0.036224365234375,
0.01165771484375,
0.04193115234375,
0.0006380081176757812,
-0.0017642974853515625,
-0.01169586181640625,
-0.020233154296875,
-0.00864410400390625,
-0.0007190704345703125,
0.01904296875,
-0.03533935546875,
-0.08538818359375,
0.040496826171875,
-0.0173797607421875,
-0.050018310546875,
-0.02569580078125,
0.03277587890625,
-0.00589752197265625,
-0.00899505615234375,
-0.00804901123046875,
0.007610321044921875,
0.0026226043701171875,
0.007965087890625,
-0.0185089111328125,
0.0105133056640625,
0.0226593017578125,
-0.035888671875,
-0.024627685546875,
-0.02923583984375,
-0.0247039794921875,
-0.01461029052734375,
0.036407470703125,
-0.03912353515625,
0.05694580078125,
0.0304412841796875,
-0.0406494140625,
0.0028209686279296875,
0.00023376941680908203,
-0.02166748046875,
-0.011688232421875,
-0.0052337646484375,
-0.053253173828125,
0.0098419189453125,
0.0799560546875,
0.08331298828125,
0.03326416015625,
-0.0494384765625,
0.0545654296875,
0.0175933837890625,
-0.0308837890625,
-0.006023406982421875,
0.01389312744140625,
-0.02227783203125,
-0.0272674560546875,
0.00021946430206298828,
0.007709503173828125,
-0.035308837890625,
-0.01230621337890625,
-0.033203125,
-0.024810791015625,
-0.00044155120849609375,
0.0283966064453125,
-0.038299560546875,
0.03857421875,
0.0572509765625,
-0.035980224609375,
0.034820556640625,
-0.0025119781494140625,
-0.009307861328125,
0.041717529296875,
-0.00740814208984375,
0.0197906494140625,
0.011474609375,
-0.0106048583984375,
0.0003921985626220703,
0.0298309326171875,
-0.0007901191711425781,
0.026824951171875,
-0.0207061767578125,
-0.01291656494140625,
0.0110626220703125,
0.01195526123046875,
0.0124664306640625,
-0.02056884765625,
0.033660888671875,
-0.004070281982421875,
0.04327392578125,
-0.021759033203125,
0.0850830078125,
-0.01485443115234375,
0.0258026123046875,
0.01558685302734375,
0.0005464553833007812,
0.05133056640625,
-0.0207977294921875,
-0.0079345703125,
-0.0019254684448242188,
-0.040802001953125,
-0.07672119140625,
0.04351806640625,
0.025665283203125,
0.007282257080078125,
0.043121337890625
] |
791b50b48e5986c723232ddd48d2c05fd5610d77
|
Wordpress Stackexchange
Q: Limit Media Library to Given Folder I have made a plugin that uses the Media Library to allow users to upload files to a specific directory - using the upload_dir filter.
I would like to know if there is a way (i.e. a filter) I can use to limit the media library to displaying only files contained within my custom folder?
If possible, I want the user to be able to choose only files that have been uploaded to the custom folder when interacting with the Media Library instantiated by my plugin.
A: A solution that works for me is to add a clause to the Wordpress query when the media library is being displayed.
From browsing my Wordpress database I noticed that the full path to wp_posts.post_type = 'attachment' is stored in the wp_posts.guid column.
add_filter('posts_where', 'limitMediaLibraryItems_56456', 10, 2 );
function limitMediaLibraryItems_56456($where, &$wp_query) {
global $pagenow, $wpdb;
// Do not modify $where for non-media library requests
if ($pagenow !== 'media-upload.php') {
return $where;
}
$where .= " AND {$wpdb->posts}.guid LIKE '%my-path-segment%'";
return $where;
}
|
Q: Limit Media Library to Given Folder I have made a plugin that uses the Media Library to allow users to upload files to a specific directory - using the upload_dir filter.
I would like to know if there is a way (i.e. a filter) I can use to limit the media library to displaying only files contained within my custom folder?
If possible, I want the user to be able to choose only files that have been uploaded to the custom folder when interacting with the Media Library instantiated by my plugin.
A: A solution that works for me is to add a clause to the Wordpress query when the media library is being displayed.
From browsing my Wordpress database I noticed that the full path to wp_posts.post_type = 'attachment' is stored in the wp_posts.guid column.
add_filter('posts_where', 'limitMediaLibraryItems_56456', 10, 2 );
function limitMediaLibraryItems_56456($where, &$wp_query) {
global $pagenow, $wpdb;
// Do not modify $where for non-media library requests
if ($pagenow !== 'media-upload.php') {
return $where;
}
$where .= " AND {$wpdb->posts}.guid LIKE '%my-path-segment%'";
return $where;
}
|
wordpress
|
{
"language": "en",
"length": 176,
"provenance": "stackexchange_00019.jsonl.gz:421195",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56456"
}
|
[
0.03765869140625,
0.005352020263671875,
0.02825927734375,
0.013702392578125,
0.007843017578125,
-0.016845703125,
0.066162109375,
-0.042510986328125,
0.0100250244140625,
0.026031494140625,
0.0233154296875,
-0.00746917724609375,
-0.008544921875,
-0.031646728515625,
-0.013702392578125,
-0.01922607421875,
0.017852783203125,
0.01617431640625,
0.039337158203125,
-0.0127410888671875,
-0.007396697998046875,
0.004283905029296875,
0.04638671875,
0.0182952880859375,
-0.00945281982421875,
0.023162841796875,
0.058929443359375,
-0.025421142578125,
-0.004547119140625,
-0.0352783203125,
0.0033245086669921875,
0.00921630859375,
0.0183868408203125,
-0.000911712646484375,
0.00864410400390625,
0.0166778564453125,
0.016754150390625,
-0.0024967193603515625,
0.0177001953125,
0.0034027099609375,
0.00885009765625,
0.006526947021484375,
-0.045074462890625,
0.0146484375,
-0.0374755859375,
-0.033050537109375,
-0.01023101806640625,
-0.0130157470703125,
0.026031494140625,
0.04150390625,
-0.006435394287109375,
-0.002124786376953125,
0.00433349609375,
-0.01088714599609375,
0.00014793872833251953,
-0.009765625,
-0.01183319091796875,
-0.012542724609375,
0.0285186767578125,
-0.01215362548828125,
-0.025390625,
-0.0233154296875,
0.026153564453125,
-0.019561767578125,
0.0121917724609375,
-0.00787353515625,
0.021240234375,
0.0308074951171875,
-0.046722412109375,
-0.0171966552734375,
0.0181732177734375,
-0.0221710205078125,
0.0037403106689453125,
-0.034332275390625,
-0.01505279541015625,
0.024627685546875,
-0.017486572265625,
-0.033447265625,
0.0247802734375,
-0.0172271728515625,
-0.005878448486328125,
-0.0162811279296875,
-0.0272064208984375,
0.007610321044921875,
-0.00682830810546875,
0.03564453125,
-0.0185089111328125,
-0.01364898681640625,
0.020904541015625,
0.05560302734375,
-0.00826263427734375,
0.0188140869140625,
0.07708740234375,
0.026275634765625,
-0.016754150390625,
0.00949859619140625,
0.047637939453125,
0.045196533203125,
-0.006198883056640625,
-0.00007742643356323242,
0.00951385498046875,
-0.047119140625,
0.00499725341796875,
-0.031341552734375,
0.042236328125,
0.031341552734375,
-0.0400390625,
-0.035125732421875,
0.05755615234375,
0.0233917236328125,
0.00458526611328125,
0.0174713134765625,
-0.03985595703125,
-0.0216827392578125,
-0.021087646484375,
0.00861358642578125,
-0.059906005859375,
-0.014190673828125,
0.0023593902587890625,
-0.031463623046875,
-0.01163482666015625,
0.00922393798828125,
-0.00492095947265625,
-0.03167724609375,
0.049774169921875,
0.02691650390625,
-0.03155517578125,
0.00815582275390625,
0.0142974853515625,
0.0865478515625,
-0.01181793212890625,
-0.02587890625,
-0.0175628662109375,
-0.0103759765625,
-0.0213775634765625,
-0.036834716796875,
0.008636474609375,
0.006824493408203125,
0.01580810546875,
-0.0228729248046875,
0.0193939208984375,
-0.0058441162109375,
-0.0011739730834960938,
0.004489898681640625,
-0.0121002197265625,
0.0423583984375,
0.027191162109375,
-0.01184844970703125,
-0.05010986328125,
-0.051116943359375,
-0.01354217529296875,
-0.0063629150390625,
0.04388427734375,
-0.0069580078125,
-0.0308685302734375,
-0.046112060546875,
0.036376953125,
-0.055389404296875,
-0.01116180419921875,
-0.066650390625,
0.02056884765625,
0.0028400421142578125,
0.00632476806640625,
-0.06292724609375,
-0.0535888671875,
-0.01279449462890625,
-0.048370361328125,
-0.0098114013671875,
0.011871337890625,
0.0423583984375,
-0.003658294677734375,
-0.036529541015625,
0.006195068359375,
0.0101776123046875,
-0.0203704833984375,
0.0151824951171875,
0.01454925537109375,
0.04010009765625,
0.01158905029296875,
0.054351806640625,
0.0300750732421875,
-0.016815185546875,
0.10198974609375,
-0.02801513671875,
-0.052032470703125,
0.02313232421875,
0.00963592529296875,
0.02069091796875,
0.020172119140625,
-0.0138397216796875,
0.07110595703125,
0.0316162109375,
-0.01861572265625,
-0.0322265625,
-0.046783447265625,
-0.037353515625,
0.002651214599609375,
-0.006824493408203125,
-0.0240478515625,
0.09967041015625,
0.040191650390625,
0.00931549072265625,
0.0281982421875,
-0.0088653564453125,
-0.0260009765625,
0.02081298828125,
-0.01152801513671875,
0.016754150390625,
-0.04150390625,
0.006084442138671875,
0.0273284912109375,
0.01229095458984375,
-0.032958984375,
-0.0226898193359375,
0.002597808837890625,
0.018646240234375,
-0.005573272705078125,
0.053558349609375,
-0.0135498046875,
0.05322265625,
-0.028167724609375,
-0.044586181640625,
-0.01345062255859375,
0.01068115234375,
0.053009033203125,
0.007137298583984375,
-0.0013532638549804688,
0.004810333251953125,
0.060760498046875,
0.037872314453125,
-0.0308074951171875,
-0.0239410400390625,
0.005016326904296875,
0.0039520263671875,
-0.01425933837890625,
-0.0183258056640625,
-0.0127410888671875,
-0.1102294921875,
0.0282440185546875,
0.06732177734375,
0.0264739990234375,
0.06231689453125,
0.0125274658203125,
0.04132080078125,
0.07659912109375,
-0.01629638671875,
0.00691986083984375,
0.019439697265625,
0.0084228515625,
0.0243988037109375,
-0.036376953125,
0.00809478759765625,
0.033843994140625,
-0.01067352294921875,
0.01374053955078125,
0.038421630859375,
0.0193328857421875,
0.00508880615234375,
-0.007495880126953125,
0.0240325927734375,
0.0001850128173828125,
0.035186767578125,
-0.021209716796875,
0.02783203125,
-0.00917816162109375,
0.04156494140625,
0.030609130859375,
0.0472412109375,
-0.003963470458984375,
-0.0119476318359375,
0.00737762451171875,
0.0027332305908203125,
0.004558563232421875,
0.02099609375,
0.022216796875,
-0.01806640625,
-0.041595458984375,
0.007293701171875,
0.01073455810546875,
-0.00726318359375,
-0.005908966064453125,
0.0254058837890625,
-0.039794921875,
-0.003879547119140625,
-0.029693603515625,
-0.054595947265625,
-0.0003726482391357422,
0.0267333984375,
-0.02593994140625,
-0.025115966796875,
0.006557464599609375,
0.054290771484375,
-0.017303466796875,
0.035888671875,
0.0005807876586914062,
-0.0117034912109375,
0.03778076171875,
-0.026885986328125,
0.02862548828125,
-0.0179443359375,
0.0499267578125,
0.061248779296875,
-0.0078125,
0.00737762451171875,
-0.01084136962890625,
0.01374053955078125,
-0.0158233642578125,
-0.0017642974853515625,
-0.0299224853515625,
-0.04571533203125,
-0.0249481201171875,
-0.02252197265625,
0.004505157470703125,
-0.05194091796875,
0.00998687744140625,
-0.023956298828125,
-0.037200927734375,
-0.0200042724609375,
-0.0906982421875,
-0.027587890625,
0.0242767333984375,
-0.0513916015625,
0.045166015625,
0.00141143798828125,
-0.0186767578125,
-0.048095703125,
0.037109375,
0.01194000244140625,
-0.036285400390625,
0.0222320556640625,
-0.0159454345703125,
-0.016754150390625,
-0.02691650390625,
0.005863189697265625,
-0.00959014892578125,
0.017181396484375,
-0.0091705322265625,
0.08123779296875,
-0.0014829635620117188,
-0.06353759765625,
-0.007434844970703125,
0.01497650146484375,
0.0025653839111328125,
0.019866943359375,
0.0198974609375,
-0.0070953369140625,
-0.0133514404296875,
0.01678466796875,
0.03509521484375,
0.033966064453125,
-0.04827880859375,
-0.00937652587890625,
0.03094482421875,
0.001007080078125,
0.0297698974609375,
0.009185791015625,
-0.0270233154296875,
-0.00339508056640625,
0.0160064697265625,
-0.051727294921875,
-0.0160675048828125,
-0.01500701904296875,
-0.03271484375,
0.034515380859375,
-0.0031299591064453125,
0.0083160400390625,
0.006473541259765625,
0.03631591796875,
0.0290985107421875,
0.0196075439453125,
-0.028289794921875,
-0.04345703125,
0.044281005859375,
0.031707763671875,
0.0731201171875,
0.01007843017578125,
0.04644775390625,
-0.00800323486328125,
0.0009708404541015625,
0.02398681640625,
0.03875732421875,
0.0196685791015625,
-0.02716064453125,
-0.053497314453125,
0.0167388916015625,
0.0222625732421875,
-0.0118255615234375,
0.0369873046875,
-0.0309600830078125,
-0.016693115234375,
-0.051788330078125,
0.03564453125,
-0.06256103515625,
-0.008392333984375,
-0.0299224853515625,
0.004711151123046875,
0.00461578369140625,
-0.05743408203125,
-0.01213836669921875,
-0.0169677734375,
-0.02740478515625,
-0.0071563720703125,
-0.01352691650390625,
-0.01013946533203125,
0.015625,
-0.04248046875,
0.00191497802734375,
-0.038604736328125,
0.0193023681640625,
-0.0655517578125,
0.049072265625,
-0.01824951171875,
0.032135009765625,
-0.039459228515625,
-0.0068817138671875,
-0.069091796875,
-0.10064697265625,
-0.0255584716796875,
0.0094757080078125,
0.0794677734375,
-0.004581451416015625,
0.006443023681640625,
-0.056915283203125,
0.04241943359375,
0.03070068359375,
-0.0020236968994140625,
0.024749755859375,
-0.02032470703125,
0.00930023193359375,
-0.00701904296875,
0.02435302734375,
-0.02410888671875,
-0.0179595947265625,
-0.06585693359375,
-0.030364990234375,
0.01082611083984375,
-0.020233154296875,
0.0599365234375,
-0.033843994140625,
0.0159759521484375,
-0.05242919921875,
-0.034820556640625,
-0.06292724609375,
-0.00984954833984375,
-0.02655029296875,
-0.029022216796875,
-0.03887939453125,
-0.06781005859375,
0.00885772705078125,
-0.0002799034118652344,
0.0247650146484375,
0.0196075439453125,
0.0770263671875,
0.00928497314453125,
-0.0098876953125,
-0.079345703125,
0.0210113525390625,
0.02777099609375,
0.0008749961853027344,
0.037811279296875,
0.003360748291015625,
-0.030975341796875,
0.08203125,
-0.01275634765625,
0.020294189453125,
0.00814056396484375,
0.0196990966796875,
0.00438690185546875,
0.0020008087158203125,
0.008087158203125,
-0.0011472702026367188,
-0.0175628662109375,
0.0013742446899414062,
-0.016357421875,
-0.0035076141357421875,
-0.0171966552734375,
0.032501220703125,
0.01517486572265625,
0.0123138427734375,
-0.050079345703125,
-0.07403564453125,
0.0225372314453125,
-0.048919677734375,
0.0404052734375,
-0.0167999267578125,
0.004962921142578125,
0.03997802734375,
0.031829833984375,
0.006763458251953125,
0.06646728515625,
0.045989990234375,
-0.000598907470703125,
0.04681396484375,
0.049072265625,
-0.00630950927734375,
-0.0001119375228881836,
0.00370025634765625,
-0.01265716552734375,
-0.0247955322265625,
-0.0328369140625,
-0.024139404296875,
-0.0218353271484375,
0.046051025390625,
0.0271453857421875,
0.0007457733154296875,
0.02667236328125,
0.01690673828125,
-0.025054931640625,
0.0013103485107421875,
-0.0278778076171875,
0.01910400390625,
-0.0592041015625,
0.0679931640625,
0.0140838623046875,
-0.0134124755859375,
-0.01195526123046875,
0.031402587890625,
-0.005832672119140625,
-0.00878143310546875,
0.01387786865234375,
0.06793212890625,
0.07196044921875,
0.01424407958984375,
0.00991058349609375,
0.00804901123046875,
-0.033721923828125,
0.00881195068359375,
-0.017791748046875,
-0.01708984375,
-0.005340576171875,
-0.01158905029296875,
0.0155487060546875,
-0.057037353515625,
-0.0234375,
0.05389404296875,
-0.036651611328125,
-0.01264190673828125,
0.017730712890625,
-0.01029205322265625,
-0.01389312744140625,
-0.0225372314453125,
-0.005016326904296875,
0.040985107421875,
-0.003009796142578125,
-0.00792694091796875,
-0.0167083740234375,
-0.03192138671875,
-0.0243682861328125,
0.03314208984375,
-0.0618896484375,
0.0254364013671875,
0.033538818359375,
-0.004100799560546875,
-0.0014314651489257812,
0.00023543834686279297,
-0.045623779296875,
-0.0221405029296875,
-0.022247314453125,
-0.0156402587890625,
0.044891357421875,
-0.034942626953125,
0.04705810546875,
-0.01111602783203125,
-0.018035888671875,
-0.0472412109375,
0.031341552734375,
0.01702880859375,
0.03228759765625,
-0.01485443115234375,
0.00701904296875,
-0.0264434814453125,
-0.0087738037109375,
0.00115203857421875,
-0.053314208984375,
-0.019287109375,
-0.032440185546875,
-0.01467132568359375,
0.01551055908203125,
0.01229095458984375,
0.0296478271484375,
-0.0030918121337890625,
0.01715087890625,
-0.007625579833984375,
0.0193328857421875,
-0.001434326171875,
0.03411865234375,
0.0096893310546875,
0.039306640625,
0.0260162353515625,
0.0076141357421875,
-0.01971435546875,
-0.0218963623046875,
-0.0132293701171875,
-0.07037353515625,
-0.0159454345703125,
0.0105438232421875,
-0.0240020751953125,
0.039886474609375,
0.023529052734375,
0.0170440673828125,
0.042938232421875,
-0.043701171875,
-0.0228729248046875,
-0.0231170654296875,
0.0179595947265625,
-0.07208251953125,
0.0140838623046875,
-0.0043182373046875,
-0.004730224609375,
0.037139892578125,
-0.0247039794921875,
-0.03594970703125,
0.033843994140625,
-0.0158233642578125,
0.0426025390625,
0.00505828857421875,
0.0003108978271484375,
0.0340576171875,
0.04351806640625,
0.0090179443359375,
0.044586181640625,
0.01259613037109375,
0.025787353515625,
0.0021686553955078125,
-0.007328033447265625,
0.051788330078125,
-0.01593017578125,
0.04736328125,
-0.006191253662109375,
0.00579833984375,
0.03656005859375,
-0.02105712890625,
-0.0004248619079589844,
-0.005878448486328125,
0.001949310302734375,
-0.0046539306640625,
-0.004436492919921875,
-0.01824951171875,
-0.0162353515625,
-0.006168365478515625,
-0.0175323486328125,
0.01264190673828125,
-0.00424957275390625,
0.01448822021484375,
-0.00885009765625,
-0.045654296875,
-0.0262298583984375,
-0.024993896484375,
-0.00032711029052734375,
0.0086517333984375,
0.030517578125,
0.005298614501953125,
0.007354736328125,
-0.08380126953125,
0.0223541259765625,
-0.06121826171875,
-0.0010118484497070312,
0.000499725341796875,
-0.036865234375,
-0.0257568359375,
-0.04351806640625,
-0.0278778076171875,
-0.03515625,
-0.0005850791931152344,
0.0565185546875,
0.0287017822265625,
0.0548095703125,
0.04534912109375,
0.011993408203125,
0.021514892578125,
0.0057373046875,
0.0162200927734375,
-0.0243988037109375,
-0.0238189697265625,
0.003925323486328125,
0.053802490234375,
-0.0295867919921875,
0.02862548828125,
-0.0049591064453125,
-0.0093841552734375,
0.00928497314453125,
0.003047943115234375,
0.037811279296875,
-0.0703125,
0.0102386474609375,
0.04693603515625,
0.023529052734375,
-0.014495849609375,
-0.0024585723876953125,
0.03515625,
-0.06512451171875,
-0.0498046875,
0.00887298583984375,
-0.0628662109375,
-0.029876708984375,
-0.0015077590942382812,
-0.037261962890625,
0.043701171875,
-0.0115509033203125,
0.02874755859375,
0.02447509765625,
-0.0001773834228515625,
0.005062103271484375,
0.00341796875,
-0.0439453125,
0.051422119140625,
0.00960540771484375,
0.007122039794921875,
-0.05987548828125,
0.0034847259521484375,
-0.0188751220703125,
0.0124664306640625,
0.0687255859375,
0.025482177734375,
-0.057098388671875,
-0.04058837890625,
-0.01468658447265625,
0.044464111328125,
0.00943756103515625,
0.032684326171875,
-0.00168609619140625,
0.0296478271484375,
0.04498291015625,
-0.047454833984375,
0.0269927978515625,
-0.0012359619140625,
-0.0162353515625,
0.0031642913818359375,
0.0099334716796875,
0.01055908203125,
-0.005985260009765625,
0.0219268798828125,
-0.00762176513671875,
-0.0221710205078125,
0.0278472900390625,
-0.069091796875,
0.039764404296875,
0.041656494140625,
0.05120849609375,
-0.03021240234375,
-0.029937744140625,
-0.0178680419921875,
0.045440673828125,
-0.020172119140625,
0.022613525390625,
0.0260772705078125,
0.0005941390991210938,
0.0293426513671875,
0.01149749755859375,
0.0193939208984375,
0.0113983154296875,
-0.008087158203125,
0.02490234375,
0.0184783935546875,
0.017059326171875,
-0.01473236083984375,
0.03912353515625,
0.0168914794921875,
0.01422882080078125,
-0.0401611328125,
-0.0205078125,
0.0186004638671875,
-0.00201416015625,
-0.043670654296875,
-0.0101470947265625,
-0.050537109375,
0.01300811767578125,
0.040802001953125,
-0.04583740234375,
0.0227508544921875,
0.022430419921875,
0.05328369140625,
-0.0182342529296875,
-0.02459716796875,
-0.045562744140625,
-0.004985809326171875,
0.00478363037109375,
0.00457000732421875,
0.01611328125,
0.01445770263671875,
-0.0134124755859375,
0.01151275634765625,
-0.044952392578125,
0.006183624267578125,
-0.01326751708984375,
0.05377197265625,
-0.0171661376953125,
0.0280303955078125,
-0.07391357421875,
-0.09039306640625,
0.0338134765625,
0.045440673828125,
0.04449462890625,
-0.011810302734375,
0.005222320556640625,
-0.0062713623046875,
0.0007100105285644531,
0.0113677978515625,
0.01497650146484375,
-0.0115203857421875,
0.016021728515625,
-0.034820556640625,
0.0285186767578125,
0.00788116455078125,
-0.004505157470703125,
-0.005039215087890625,
-0.00614166259765625,
0.05584716796875,
-0.0104827880859375,
0.029449462890625,
-0.0031299591064453125,
-0.0411376953125,
-0.0302276611328125,
-0.0124664306640625,
0.048553466796875,
0.01325225830078125,
-0.055267333984375,
0.01617431640625,
-0.039581298828125,
-0.043121337890625,
-0.0018777847290039062,
0.038665771484375,
-0.00977325439453125,
0.019683837890625,
-0.00850677490234375,
-0.0169219970703125,
0.0187530517578125,
-0.0292816162109375,
0.0195465087890625,
-0.0237579345703125,
-0.0204315185546875,
-0.0203857421875,
-0.040191650390625,
-0.0162200927734375,
-0.030303955078125,
0.0325927734375,
0.0160675048828125,
0.08514404296875,
-0.032257080078125,
0.032928466796875,
0.00016987323760986328,
-0.01983642578125,
-0.00035691261291503906,
0.0025882720947265625,
-0.0223846435546875,
0.002597808837890625,
0.00930023193359375,
-0.0017614364624023438,
0.01238250732421875,
0.0016765594482421875,
0.030426025390625,
-0.049560546875,
-0.027130126953125,
-0.025054931640625,
0.0230560302734375,
0.0200958251953125,
0.036956787109375,
-0.0130615234375,
-0.01029205322265625,
-0.026641845703125,
-0.015655517578125,
0.056549072265625,
0.053680419921875,
-0.00848388671875,
0.0156097412109375,
-0.007526397705078125,
-0.0322265625,
0.024200439453125,
-0.0147857666015625,
0.03326416015625,
0.036163330078125,
-0.041351318359375,
-0.054107666015625,
-0.0164947509765625,
-0.0081329345703125,
-0.045318603515625,
0.0276641845703125,
0.0276641845703125,
0.00615692138671875,
-0.00778961181640625,
-0.00795745849609375,
0.01012420654296875,
0.016998291015625,
-0.0248260498046875,
0.0001302957534790039,
0.0023441314697265625,
-0.019866943359375,
0.0025997161865234375,
-0.045989990234375,
-0.00402069091796875,
-0.04290771484375,
-0.0172271728515625,
0.0157623291015625,
-0.0159149169921875,
-0.0269317626953125,
-0.01220703125,
0.0215301513671875,
0.0161590576171875,
0.015625,
-0.1099853515625,
0.06524658203125,
-0.01528167724609375,
0.048980712890625,
-0.0193023681640625,
0.052154541015625,
-0.0291595458984375,
0.013092041015625,
-0.028564453125,
-0.0767822265625,
-0.033966064453125,
0.10406494140625,
-0.027862548828125,
0.00499725341796875,
0.022735595703125,
-0.00997161865234375,
-0.0235748291015625,
0.037506103515625,
-0.0009365081787109375,
0.0875244140625,
0.00312042236328125,
-0.04132080078125,
-0.01082611083984375,
-0.016326904296875,
0.0239105224609375,
0.00873565673828125,
-0.0119476318359375,
-0.0163421630859375,
-0.0276336669921875,
0.032684326171875,
-0.026031494140625,
-0.007274627685546875,
-0.03363037109375,
-0.053924560546875,
0.057098388671875,
0.01107025146484375,
-0.037933349609375,
-0.019775390625,
0.043060302734375,
0.0026721954345703125,
0.032379150390625,
0.008758544921875,
-0.0469970703125,
-0.00586700439453125,
-0.0189056396484375,
0.009674072265625,
-0.01371002197265625,
0.01459503173828125,
0.020233154296875,
-0.08319091796875,
0.00586700439453125,
0.0024738311767578125,
0.0029659271240234375,
-0.0010786056518554688,
0.012847900390625,
0.020263671875,
0.0360107421875,
-0.004413604736328125,
0.050689697265625,
0.0015172958374023438,
-0.044158935546875,
0.01161956787109375,
-0.030670166015625,
-0.090576171875,
-0.041107177734375,
0.06494140625,
0.1046142578125,
0.036773681640625,
-0.0169219970703125,
-0.0020542144775390625,
-0.0235443115234375,
-0.0030975341796875,
0.0308990478515625,
0.00679779052734375,
-0.0248870849609375,
0.026031494140625,
0.01922607421875,
0.0091552734375,
-0.046844482421875,
-0.0029926300048828125,
-0.032135009765625,
-0.038055419921875,
-0.02239990234375,
0.0003180503845214844,
-0.0189971923828125,
0.00489044189453125,
0.0482177734375,
-0.04302978515625,
-0.005889892578125,
0.004390716552734375,
0.004642486572265625,
0.0095367431640625,
-0.005107879638671875,
-0.0020732879638671875,
-0.00508880615234375,
-0.0167236328125,
0.01068878173828125,
0.005771636962890625,
-0.0068817138671875,
-0.007274627685546875,
-0.0008563995361328125,
-0.023345947265625,
-0.004665374755859375,
-0.00643157958984375,
-0.024322509765625,
0.0023403167724609375,
0.01361083984375,
-0.008270263671875,
0.068603515625,
-0.0059814453125,
0.031463623046875,
0.011566162109375,
-0.007843017578125,
0.00872039794921875,
-0.0105438232421875,
0.059326171875,
-0.0538330078125,
0.002658843994140625,
0.006252288818359375,
-0.02130126953125,
-0.05816650390625,
0.00982666015625,
-0.02685546875,
0.003978729248046875,
0.01702880859375
] |
3b924b66b1c4469e84ea35174d5e7e825c3adeef
|
Wordpress Stackexchange
Q: How to display html in a shortcode How do you display or process HTML in a wrapped shortcode ?
[myshortcode]<div class="map"></div>[/myshortcode]
my shortcode code is
function myshortcode_sc($atts, $content = null) {
extract( shortcode_atts( array(
'col' => 'left',
), $atts ) );
$output = '<div class="span' . esc_attr($col) . '">' . do_shortcode($content) . '</div>';
return $output;
}
add_shortcode("myshortcode", "myshortcode_sc");
is there another function at the return to allow for $output to process the HTML and not just display it as text ?
A: Maybe try replacing
. do_shortcode($content) .
with
.$content. ?
Source: http://wp.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/
|
Q: How to display html in a shortcode How do you display or process HTML in a wrapped shortcode ?
[myshortcode]<div class="map"></div>[/myshortcode]
my shortcode code is
function myshortcode_sc($atts, $content = null) {
extract( shortcode_atts( array(
'col' => 'left',
), $atts ) );
$output = '<div class="span' . esc_attr($col) . '">' . do_shortcode($content) . '</div>';
return $output;
}
add_shortcode("myshortcode", "myshortcode_sc");
is there another function at the return to allow for $output to process the HTML and not just display it as text ?
A: Maybe try replacing
. do_shortcode($content) .
with
.$content. ?
Source: http://wp.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/
A: my solution : do_shortcode(html_entity_decode($content))
But not working with ' & " :/
|
wordpress
|
{
"language": "en",
"length": 107,
"provenance": "stackexchange_00019.jsonl.gz:421202",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56485"
}
|
[
0.039276123046875,
-0.02020263671875,
0.00801849365234375,
-0.009857177734375,
-0.01323699951171875,
-0.0216522216796875,
0.0217132568359375,
-0.022674560546875,
-0.0186767578125,
0.0271148681640625,
-0.0194854736328125,
-0.005035400390625,
-0.034912109375,
-0.0271148681640625,
-0.0262451171875,
-0.055084228515625,
0.048614501953125,
-0.0018167495727539062,
0.049652099609375,
0.01076507568359375,
-0.01132965087890625,
0.04534912109375,
0.0237274169921875,
0.032928466796875,
0.023284912109375,
-0.0460205078125,
0.07379150390625,
-0.01541900634765625,
0.0200347900390625,
-0.005764007568359375,
0.0250091552734375,
-0.0119476318359375,
0.068115234375,
0.006488800048828125,
-0.08819580078125,
0.056304931640625,
-0.01352691650390625,
-0.007488250732421875,
-0.046539306640625,
0.046112060546875,
0.0091094970703125,
0.00482940673828125,
0.06988525390625,
-0.044158935546875,
0.023529052734375,
0.002429962158203125,
-0.0087738037109375,
-0.055389404296875,
-0.0260772705078125,
-0.02984619140625,
0.052886962890625,
0.0179595947265625,
0.07171630859375,
-0.029937744140625,
-0.0080108642578125,
0.0433349609375,
-0.031341552734375,
-0.024810791015625,
0.018798828125,
0.0285491943359375,
0.0216522216796875,
-0.01151275634765625,
0.00913238525390625,
-0.015411376953125,
0.01177215576171875,
-0.00848388671875,
0.01522064208984375,
0.01181793212890625,
-0.0133514404296875,
0.0254974365234375,
0.0360107421875,
-0.0209808349609375,
-0.00978851318359375,
-0.04901123046875,
-0.0002543926239013672,
0.07647705078125,
-0.01568603515625,
0.0203857421875,
-0.006313323974609375,
-0.0014629364013671875,
0.00775146484375,
0.00847625732421875,
-0.0216522216796875,
-0.043975830078125,
0.017822265625,
-0.0232696533203125,
-0.0131683349609375,
-0.0096435546875,
0.014312744140625,
0.01532745361328125,
0.0025234222412109375,
0.040985107421875,
0.02630615234375,
0.0010623931884765625,
-0.03204345703125,
-0.027313232421875,
-0.01065826416015625,
0.03741455078125,
-0.020111083984375,
0.0252685546875,
-0.00852203369140625,
-0.034759521484375,
0.04241943359375,
-0.05328369140625,
-0.007434844970703125,
-0.00894927978515625,
-0.0233917236328125,
0.01189422607421875,
0.05731201171875,
0.043914794921875,
-0.00334930419921875,
0.038330078125,
-0.06719970703125,
-0.0261383056640625,
-0.031890869140625,
0.059295654296875,
-0.06573486328125,
-0.02801513671875,
-0.004322052001953125,
0.0010156631469726562,
0.01036834716796875,
0.01270294189453125,
0.04461669921875,
-0.024261474609375,
-0.002338409423828125,
0.006107330322265625,
-0.026641845703125,
-0.061553955078125,
0.0550537109375,
-0.0672607421875,
-0.042083740234375,
0.043548583984375,
0.04583740234375,
0.045654296875,
0.032379150390625,
0.0193939208984375,
0.01113128662109375,
-0.006786346435546875,
-0.01297760009765625,
0.0258636474609375,
-0.00998687744140625,
-0.0093994140625,
0.012115478515625,
-0.03363037109375,
-0.0093231201171875,
0.03375244140625,
0.01513671875,
0.0056915283203125,
-0.0156707763671875,
-0.09234619140625,
0.047821044921875,
-0.032379150390625,
0.0158538818359375,
0.00982666015625,
0.03289794921875,
-0.01363372802734375,
0.054718017578125,
-0.0293731689453125,
-0.00449371337890625,
-0.0197601318359375,
-0.0049285888671875,
-0.01251220703125,
0.01373291015625,
-0.0350341796875,
-0.04248046875,
-0.0039215087890625,
-0.036895751953125,
0.006885528564453125,
0.01348114013671875,
0.037384033203125,
-0.0249786376953125,
-0.0194854736328125,
-0.051177978515625,
0.035614013671875,
0.018035888671875,
0.042572021484375,
-0.035369873046875,
-0.00975799560546875,
0.04736328125,
-0.003826141357421875,
-0.0175323486328125,
-0.022064208984375,
0.05267333984375,
-0.0015840530395507812,
-0.04925537109375,
0.04364013671875,
-0.006465911865234375,
0.06878662109375,
0.0258331298828125,
0.01033782958984375,
-0.003498077392578125,
-0.01183319091796875,
-0.02008056640625,
0.0234527587890625,
0.03192138671875,
-0.03204345703125,
-0.040771484375,
-0.03460693359375,
-0.0008749961853027344,
-0.01300048828125,
-0.006084442138671875,
-0.006992340087890625,
0.0068206787109375,
0.0093841552734375,
0.0170440673828125,
-0.00555419921875,
0.00374603271484375,
0.0183258056640625,
0.0033969879150390625,
-0.0276947021484375,
0.01442718505859375,
-0.04754638671875,
0.00001329183578491211,
-0.0035037994384765625,
-0.040557861328125,
0.0259552001953125,
-0.00775909423828125,
0.0313720703125,
0.003940582275390625,
0.0265045166015625,
0.04425048828125,
-0.0268402099609375,
0.0240325927734375,
0.024627685546875,
0.037628173828125,
-0.012451171875,
-0.00749969482421875,
-0.0272216796875,
0.0005898475646972656,
0.020050048828125,
-0.08673095703125,
0.034942626953125,
0.026580810546875,
0.0249786376953125,
-0.07159423828125,
-0.026153564453125,
-0.0487060546875,
0.0010242462158203125,
-0.0019588470458984375,
0.041259765625,
0.056793212890625,
0.0208740234375,
-0.00927734375,
-0.055755615234375,
0.1114501953125,
0.03851318359375,
0.040374755859375,
-0.052764892578125,
-0.00611114501953125,
0.003620147705078125,
0.029205322265625,
-0.0212249755859375,
0.01522064208984375,
-0.07843017578125,
0.00551605224609375,
0.0093841552734375,
0.00565338134765625,
0.025238037109375,
-0.020355224609375,
0.0048675537109375,
0.0092926025390625,
-0.03582763671875,
-0.0238800048828125,
-0.0400390625,
0.032379150390625,
0.0030841827392578125,
0.030426025390625,
0.01195526123046875,
-0.038482666015625,
0.0251007080078125,
0.012359619140625,
-0.00433349609375,
-0.00948333740234375,
0.03961181640625,
-0.001811981201171875,
-0.0059814453125,
-0.0011205673217773438,
-0.0141754150390625,
0.0008707046508789062,
0.01042938232421875,
-0.0097808837890625,
0.035400390625,
-0.02410888671875,
-0.011505126953125,
-0.0189666748046875,
-0.03326416015625,
0.000019609928131103516,
0.0219573974609375,
0.033111572265625,
0.03619384765625,
0.0025615692138671875,
0.083251953125,
-0.0107574462890625,
0.055694580078125,
0.042633056640625,
0.0216064453125,
0.051849365234375,
-0.0428466796875,
0.061248779296875,
-0.03350830078125,
0.0168609619140625,
0.0557861328125,
-0.0192718505859375,
0.024017333984375,
0.00624847412109375,
-0.0046844482421875,
0.002315521240234375,
-0.00519561767578125,
0.0009632110595703125,
0.00917816162109375,
-0.0273284912109375,
0.041473388671875,
0.033294677734375,
0.07257080078125,
-0.01264190673828125,
-0.03936767578125,
0.00823974609375,
0.0533447265625,
-0.0574951171875,
-0.06707763671875,
0.009918212890625,
-0.03924560546875,
-0.00655364990234375,
0.01922607421875,
-0.0225830078125,
-0.0090484619140625,
0.04974365234375,
-0.003070831298828125,
-0.0250701904296875,
-0.019744873046875,
-0.05010986328125,
-0.046905517578125,
-0.070556640625,
0.03448486328125,
-0.00728607177734375,
0.027252197265625,
0.01149749755859375,
-0.019287109375,
-0.004367828369140625,
-0.046905517578125,
0.0021305084228515625,
0.01385498046875,
-0.0240325927734375,
0.006511688232421875,
-0.00876617431640625,
-0.053070068359375,
-0.0225982666015625,
-0.004398345947265625,
-0.021820068359375,
-0.01300048828125,
0.038055419921875,
-0.00559234619140625,
-0.00482177734375,
0.0157928466796875,
0.0305328369140625,
-0.00621795654296875,
-0.00237274169921875,
0.0286712646484375,
0.027130126953125,
-0.0247650146484375,
-0.00984954833984375,
-0.018157958984375,
-0.052032470703125,
-0.0548095703125,
0.0269622802734375,
0.0034465789794921875,
-0.045989990234375,
-0.001544952392578125,
0.025299072265625,
-0.00007605552673339844,
0.06280517578125,
0.00421142578125,
-0.03924560546875,
-0.011871337890625,
-0.0066986083984375,
-0.0401611328125,
0.00775909423828125,
-0.01346588134765625,
-0.011322021484375,
-0.01496124267578125,
0.0262908935546875,
-0.0233154296875,
0.0367431640625,
-0.0219879150390625,
-0.057830810546875,
0.089111328125,
0.011627197265625,
0.0004012584686279297,
-0.0276641845703125,
-0.05023193359375,
-0.006511688232421875,
0.09521484375,
-0.03472900390625,
-0.006114959716796875,
0.01224517822265625,
-0.00829315185546875,
0.01366424560546875,
-0.00525665283203125,
-0.06915283203125,
-0.008880615234375,
-0.0914306640625,
0.038604736328125,
-0.0005955696105957031,
-0.0140380859375,
-0.026641845703125,
-0.01018524169921875,
-0.060394287109375,
-0.03790283203125,
0.038818359375,
0.00737762451171875,
0.0072479248046875,
-0.014434814453125,
0.0115203857421875,
-0.0374755859375,
-0.020416259765625,
0.0005965232849121094,
-0.039459228515625,
-0.0088043212890625,
0.0008749961853027344,
0.031341552734375,
0.0180511474609375,
-0.034515380859375,
-0.031829833984375,
0.01922607421875,
-0.0184173583984375,
0.0157318115234375,
0.01708984375,
0.0224456787109375,
0.01264190673828125,
0.016143798828125,
0.00939178466796875,
-0.019805908203125,
0.0018301010131835938,
0.0284423828125,
0.00920867919921875,
0.07806396484375,
-0.0313720703125,
-0.0318603515625,
-0.0093536376953125,
-0.02545166015625,
-0.040496826171875,
-0.02984619140625,
-0.0204925537109375,
0.0220489501953125,
-0.01267242431640625,
0.0033721923828125,
-0.023345947265625,
-0.05218505859375,
0.03662109375,
0.0299224853515625,
-0.0277557373046875,
0.0164947509765625,
0.00981903076171875,
-0.0028820037841796875,
-0.04827880859375,
-0.0694580078125,
0.0391845703125,
0.057586669921875,
0.0014448165893554688,
0.0290679931640625,
0.017364501953125,
-0.033447265625,
0.0570068359375,
0.01297760009765625,
0.028472900390625,
-0.010498046875,
0.0340576171875,
0.033233642578125,
0.03387451171875,
-0.0101776123046875,
0.047393798828125,
-0.0294189453125,
-0.0019989013671875,
-0.0084381103515625,
0.007701873779296875,
0.0112457275390625,
0.0176239013671875,
0.00431060791015625,
0.00357818603515625,
-0.01551055908203125,
-0.0288543701171875,
-0.00708770751953125,
0.049468994140625,
0.038238525390625,
0.037628173828125,
0.008697509765625,
0.035064697265625,
0.04119873046875,
0.00031638145446777344,
0.0027294158935546875,
-0.0394287109375,
0.0031795501708984375,
0.02764892578125,
-0.0265350341796875,
-0.00018680095672607422,
0.0271148681640625,
0.0032787322998046875,
0.0265045166015625,
0.0164642333984375,
-0.033050537109375,
-0.017822265625,
0.00008308887481689453,
-0.024810791015625,
-0.00457763671875,
0.028350830078125,
0.034271240234375,
0.0277252197265625,
0.01517486572265625,
0.0008707046508789062,
-0.00894927978515625,
0.04315185546875,
-0.031890869140625,
-0.04193115234375,
-0.00972747802734375,
-0.0228424072265625,
-0.00957489013671875,
0.0223236083984375,
-0.0443115234375,
0.0259857177734375,
0.0005359649658203125,
-0.01398468017578125,
0.0112152099609375,
0.00927734375,
0.031890869140625,
-0.006931304931640625,
-0.008514404296875,
-0.0016069412231445312,
0.01520538330078125,
-0.029998779296875,
-0.039154052734375,
0.03387451171875,
0.049163818359375,
-0.01922607421875,
-0.00724029541015625,
0.004711151123046875,
-0.0043487548828125,
-0.0176849365234375,
0.0181427001953125,
0.005428314208984375,
-0.00904083251953125,
-0.021331787109375,
0.030059814453125,
0.0391845703125,
0.020050048828125,
-0.0026702880859375,
0.001926422119140625,
-0.01459503173828125,
-0.0011005401611328125,
-0.0246429443359375,
-0.0309906005859375,
0.006023406982421875,
-0.0026645660400390625,
0.001781463623046875,
-0.01513671875,
-0.0272216796875,
-0.048736572265625,
-0.016204833984375,
-0.0041961669921875,
-0.002521514892578125,
0.0228729248046875,
-0.059600830078125,
-0.021575927734375,
-0.005279541015625,
0.0379638671875,
-0.0341796875,
0.01441192626953125,
0.045806884765625,
0.0474853515625,
-0.07965087890625,
0.007049560546875,
-0.040863037109375,
0.02996826171875,
0.0084686279296875,
-0.047607421875,
-0.0175628662109375,
-0.023834228515625,
-0.0067291259765625,
0.028076171875,
-0.0089263916015625,
-0.01027679443359375,
-0.0193328857421875,
0.01018524169921875,
-0.0074615478515625,
0.057159423828125,
0.0018310546875,
0.0374755859375,
-0.005580902099609375,
0.07666015625,
0.01103973388671875,
0.016448974609375,
-0.006374359130859375,
-0.0443115234375,
0.032501220703125,
-0.0372314453125,
-0.061676025390625,
-0.01116180419921875,
-0.05548095703125,
0.01177978515625,
0.034515380859375,
-0.01264190673828125,
0.0236053466796875,
-0.01198577880859375,
-0.010589599609375,
-0.006252288818359375,
0.0240478515625,
-0.004169464111328125,
0.01763916015625,
0.0142822265625,
-0.019561767578125,
-0.0279388427734375,
-0.0165252685546875,
-0.00873565673828125,
0.034088134765625,
-0.0042724609375,
0.017578125,
-0.0255126953125,
0.018829345703125,
0.043914794921875,
0.044586181640625,
-0.030792236328125,
0.0208282470703125,
0.05413818359375,
-0.0033664703369140625,
-0.006801605224609375,
0.01751708984375,
0.028076171875,
0.0270843505859375,
0.06585693359375,
-0.013580322265625,
-0.0367431640625,
0.0003142356872558594,
-0.039154052734375,
0.037567138671875,
0.06915283203125,
0.08441162109375,
-0.0712890625,
-0.0009713172912597656,
0.042877197265625,
-0.053253173828125,
-0.0252227783203125,
-0.032135009765625,
-0.00801849365234375,
-0.011627197265625,
0.036376953125,
0.041534423828125,
-0.033233642578125,
-0.0001977682113647461,
0.01861572265625,
0.002887725830078125,
-0.02734375,
0.053619384765625,
0.0157470703125,
-0.08087158203125,
0.0109710693359375,
0.03857421875,
0.00244903564453125,
-0.0341796875,
0.0176849365234375,
0.0231781005859375,
-0.004608154296875,
-0.048828125,
0.041229248046875,
-0.00550079345703125,
-0.006397247314453125,
-0.024688720703125,
0.00702667236328125,
0.016876220703125,
0.051239013671875,
-0.0182342529296875,
0.005268096923828125,
0.04302978515625,
-0.00557708740234375,
0.06683349609375,
-0.0144500732421875,
-0.01279449462890625,
0.0556640625,
-0.048004150390625,
0.0010671615600585938,
0.0161285400390625,
0.0248565673828125,
-0.00785064697265625,
-0.015777587890625,
0.03985595703125,
-0.023345947265625,
-0.0239410400390625,
0.00785064697265625,
-0.0157318115234375,
0.004749298095703125,
-0.034210205078125,
0.0235595703125,
-0.022735595703125,
0.04156494140625,
-0.0067291259765625,
0.029937744140625,
-0.0166473388671875,
-0.056121826171875,
-0.07525634765625,
0.0297088623046875,
0.055633544921875,
0.0247955322265625,
-0.016326904296875,
0.01161956787109375,
-0.021942138671875,
-0.026458740234375,
-0.0185699462890625,
0.053009033203125,
0.0197906494140625,
0.0229034423828125,
-0.0188446044921875,
-0.016754150390625,
0.017822265625,
0.042938232421875,
-0.044219970703125,
-0.009521484375,
-0.0062713623046875,
0.0111083984375,
0.012054443359375,
-0.004665374755859375,
-0.01471710205078125,
0.0309600830078125,
-0.0104522705078125,
0.05218505859375,
0.046630859375,
-0.04931640625,
0.02392578125,
-0.01157379150390625,
-0.0262451171875,
0.0199432373046875,
0.001712799072265625,
-0.01044464111328125,
0.017181396484375,
-0.0261077880859375,
-0.043182373046875,
0.0190277099609375,
0.01084136962890625,
0.00902557373046875,
-0.03546142578125,
0.084716796875,
0.0241851806640625,
-0.0677490234375,
-0.06072998046875,
-0.0426025390625,
0.037841796875,
-0.005687713623046875,
0.057525634765625,
-0.007175445556640625,
0.019195556640625,
0.04486083984375,
0.007293701171875,
0.02691650390625,
0.04315185546875,
-0.03228759765625,
0.009033203125,
0.00024259090423583984,
0.01267242431640625,
-0.0426025390625,
-0.0157928466796875,
0.06591796875,
0.031951904296875,
-0.0186614990234375,
0.003742218017578125,
0.00994110107421875,
0.0039215087890625,
-0.00353240966796875,
-0.0382080078125,
0.0076904296875,
-0.0245208740234375,
-0.00644683837890625,
-0.0037097930908203125,
-0.0240936279296875,
-0.003139495849609375,
0.061431884765625,
0.01247406005859375,
0.009368896484375,
-0.044219970703125,
-0.050201416015625,
-0.0290679931640625,
0.00879669189453125,
-0.00171661376953125,
0.0467529296875,
0.01727294921875,
0.038848876953125,
-0.04925537109375,
-0.024749755859375,
0.0110321044921875,
-0.027008056640625,
-0.007541656494140625,
-0.0260467529296875,
0.0214996337890625,
0.00036525726318359375,
0.01293182373046875,
0.00571441650390625,
0.009490966796875,
-0.01959228515625,
0.017822265625,
0.0295562744140625,
-0.007030487060546875,
-0.027862548828125,
0.033050537109375,
-0.004451751708984375,
-0.0245513916015625,
-0.046295166015625,
0.007701873779296875,
0.0197601318359375,
0.01361846923828125,
0.003082275390625,
0.0021114349365234375,
0.031890869140625,
-0.061981201171875,
0.0645751953125,
-0.0194854736328125,
-0.006916046142578125,
0.032012939453125,
-0.031829833984375,
0.038177490234375,
-0.031707763671875,
-0.041595458984375,
-0.0029048919677734375,
-0.0399169921875,
-0.033294677734375,
0.026031494140625,
0.039886474609375,
-0.00079345703125,
0.0189666748046875,
0.019317626953125,
-0.0069427490234375,
-0.01409149169921875,
0.020660400390625,
0.005962371826171875,
-0.024505615234375,
0.01097869873046875,
-0.01160430908203125,
-0.05548095703125,
-0.0307769775390625,
-0.03680419921875,
0.0609130859375,
0.0134735107421875,
0.051727294921875,
-0.00643157958984375,
0.03948974609375,
-0.00791168212890625,
0.01416015625,
-0.02154541015625,
-0.04278564453125,
0.080322265625,
-0.0094451904296875,
-0.01361083984375,
-0.0250244140625,
0.0236053466796875,
0.0224761962890625,
0.044219970703125,
-0.0127410888671875,
-0.014434814453125,
0.005428314208984375,
0.021026611328125,
-0.0084075927734375,
0.0250396728515625,
-0.0137481689453125,
-0.0166778564453125,
-0.0262908935546875,
0.004604339599609375,
0.0199432373046875,
0.012237548828125,
-0.0159912109375,
0.0168304443359375,
0.078857421875,
-0.0182952880859375,
0.028717041015625,
-0.01172637939453125,
0.07952880859375,
0.0462646484375,
0.0262298583984375,
0.0207061767578125,
-0.0079345703125,
-0.028350830078125,
0.05047607421875,
-0.0184783935546875,
0.010162353515625,
0.0220794677734375,
-0.06072998046875,
0.03973388671875,
0.0408935546875,
0.0582275390625,
-0.0157318115234375,
0.011566162109375,
0.0196685791015625,
-0.006988525390625,
0.0102996826171875,
0.0198516845703125,
-0.0240936279296875,
-0.03912353515625,
0.0110321044921875,
0.0272979736328125,
-0.0256195068359375,
0.0108642578125,
-0.07275390625,
-0.038909912109375,
0.0171661376953125,
0.0021724700927734375,
-0.006839752197265625,
-0.05718994140625,
0.028289794921875,
0.0274505615234375,
-0.00753021240234375,
0.007259368896484375,
-0.011016845703125,
-0.006389617919921875,
-0.032806396484375,
-0.0196533203125,
-0.0394287109375,
0.0212860107421875,
-0.0252838134765625,
0.022674560546875,
0.0128326416015625,
-0.0279693603515625,
-0.01479339599609375,
0.04638671875,
0.024627685546875,
0.09832763671875,
0.0265045166015625,
-0.01044464111328125,
0.006916046142578125,
0.02044677734375,
-0.036163330078125,
-0.0297393798828125,
0.009307861328125,
0.0077056884765625,
0.0021800994873046875,
0.02020263671875,
-0.01204681396484375,
0.0215606689453125,
-0.031341552734375,
-0.082763671875,
0.0279693603515625,
0.0026187896728515625,
-0.0469970703125,
-0.005462646484375,
-0.0187225341796875,
0.004131317138671875,
-0.014678955078125,
-0.00844573974609375,
-0.015167236328125,
-0.027923583984375,
0.0148162841796875,
-0.004795074462890625,
0.01910400390625,
0.017181396484375,
-0.014129638671875,
-0.016632080078125,
-0.00864410400390625,
-0.0123748779296875,
-0.0163726806640625,
-0.013702392578125,
-0.01055145263671875,
0.0023937225341796875,
0.0017862319946289062,
-0.0501708984375,
-0.040191650390625,
0.004856109619140625,
0.03973388671875,
0.0274505615234375,
-0.08258056640625,
-0.031646728515625,
-0.048675537109375,
0.0399169921875,
-0.024810791015625,
-0.004184722900390625,
0.0038280487060546875,
-0.03143310546875,
-0.015411376953125,
-0.005321502685546875,
-0.002643585205078125,
0.0029430389404296875,
-0.04449462890625,
-0.007030487060546875,
-0.0158843994140625,
-0.01474761962890625,
0.019287109375,
-0.028045654296875,
-0.035247802734375,
0.00806427001953125,
-0.007049560546875,
0.017730712890625,
-0.07098388671875,
-0.0006608963012695312,
0.07977294921875,
-0.03936767578125,
0.03082275390625,
-0.0195159912109375,
0.0206451416015625,
0.051910400390625,
-0.038604736328125,
-0.02093505859375,
0.024505615234375,
0.0034999847412109375,
0.0133056640625,
0.016998291015625,
0.0247039794921875,
-0.005573272705078125,
0.01399993896484375,
-0.006046295166015625,
0.0012845993041992188,
0.0017919540405273438,
0.0024509429931640625,
-0.00916290283203125,
0.0006232261657714844,
0.01363372802734375,
0.00392913818359375,
-0.033966064453125,
0.07489013671875,
0.00995635986328125,
0.0079498291015625,
-0.040924072265625,
0.024810791015625,
0.01097869873046875,
-0.052276611328125,
0.016387939453125,
0.006908416748046875,
0.051544189453125,
-0.0236968994140625,
0.034423828125,
-0.01436614990234375,
0.02801513671875,
0.0267486572265625
] |
f9c39ac1267fe0e47d6b8073c059da752de34de9
|
Wordpress Stackexchange
Q: How to add HTML / Form to an Admin Bar Menu I'd like to add a custom form to the admin bar in Wordpress. is there a way to accomplish this? So far all of the documentation seems to only allow the addition of simple text links.
A: I just gave this a shot and it seemed to work fine:
function wpse_form_in_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->add_menu( array(
'id' => 'wpse-form-in-admin-bar',
'parent' => 'top-secondary',
'title' => '<form><input type="text" /><input type="submit" /> </form>'
) );
}
add_action( 'admin_bar_menu', 'wpse_form_in_admin_bar' );
You'll have to do some work to gussy it up a bit, but it looks like there is a chance you can do what you want.
|
Q: How to add HTML / Form to an Admin Bar Menu I'd like to add a custom form to the admin bar in Wordpress. is there a way to accomplish this? So far all of the documentation seems to only allow the addition of simple text links.
A: I just gave this a shot and it seemed to work fine:
function wpse_form_in_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->add_menu( array(
'id' => 'wpse-form-in-admin-bar',
'parent' => 'top-secondary',
'title' => '<form><input type="text" /><input type="submit" /> </form>'
) );
}
add_action( 'admin_bar_menu', 'wpse_form_in_admin_bar' );
You'll have to do some work to gussy it up a bit, but it looks like there is a chance you can do what you want.
A: what @tollmanz suggested will probably work, but to avoid having your text breaking out the menu width, I would suggest
function wpse_form_in_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->add_menu( array(
'id' => 'wpse-form-in-admin-bar',
'parent' => 'top-secondary',
'title' => 'title_goes_here',
'meta' => array(
'target' => '_self',
'html' => '<!-- Custom HTML that goes below the item --><form><input type="text" /><input type="submit" /> </form>',
),
)
);
}
add_action( 'admin_bar_menu', 'wpse_form_in_admin_bar' );
|
wordpress
|
{
"language": "en",
"length": 182,
"provenance": "stackexchange_00019.jsonl.gz:421215",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56508"
}
|
[
0.0662841796875,
0.0112457275390625,
-0.0194244384765625,
-0.0293731689453125,
0.02825927734375,
-0.045440673828125,
0.0308074951171875,
-0.0290069580078125,
-0.0183258056640625,
-0.00341796875,
0.004467010498046875,
-0.037139892578125,
-0.021331787109375,
-0.04833984375,
0.006282806396484375,
-0.0386962890625,
0.004497528076171875,
0.02178955078125,
0.0300750732421875,
-0.0163726806640625,
0.0202789306640625,
-0.0170745849609375,
-0.01373291015625,
-0.0271759033203125,
0.00397491455078125,
-0.034698486328125,
0.05859375,
0.01471710205078125,
-0.005035400390625,
-0.00469970703125,
0.01641845703125,
-0.018218994140625,
0.008575439453125,
-0.0158538818359375,
0.0548095703125,
0.03521728515625,
0.02301025390625,
-0.00647735595703125,
0.028045654296875,
0.01050567626953125,
0.031219482421875,
-0.0225677490234375,
0.0257415771484375,
0.0199127197265625,
0.00029730796813964844,
-0.03265380859375,
0.031982421875,
-0.0306243896484375,
-0.0096435546875,
-0.04254150390625,
0.0144500732421875,
-0.019439697265625,
0.044464111328125,
-0.06988525390625,
-0.0106048583984375,
0.01074981689453125,
-0.01483917236328125,
-0.041229248046875,
0.040679931640625,
0.03173828125,
-0.00992584228515625,
-0.0548095703125,
0.00629425048828125,
-0.05499267578125,
-0.0086517333984375,
0.0135345458984375,
0.00150299072265625,
0.004009246826171875,
-0.0081024169921875,
-0.0162811279296875,
-0.0041656494140625,
-0.025604248046875,
0.00807952880859375,
-0.0096282958984375,
0.0109100341796875,
-0.03790283203125,
0.0152435302734375,
0.00506591796875,
0.0160064697265625,
0.026702880859375,
0.002277374267578125,
0.0289306640625,
-0.01326751708984375,
-0.042694091796875,
0.01509857177734375,
-0.019195556640625,
-0.0257110595703125,
-0.013641357421875,
-0.016845703125,
-0.0301361083984375,
-0.01336669921875,
-0.062469482421875,
-0.038238525390625,
0.034942626953125,
0.01059722900390625,
-0.033294677734375,
0.02252197265625,
-0.0114898681640625,
0.0406494140625,
0.01534271240234375,
0.0455322265625,
-0.0657958984375,
0.04144287109375,
-0.00972747802734375,
0.005352020263671875,
0.042510986328125,
-0.0027790069580078125,
0.020843505859375,
0.0277557373046875,
-0.007419586181640625,
-0.0008172988891601562,
-0.0099639892578125,
-0.003910064697265625,
-0.03729248046875,
-0.004161834716796875,
0.03009033203125,
0.0055694580078125,
0.005603790283203125,
0.004741668701171875,
0.01043701171875,
-0.03826904296875,
-0.0130157470703125,
0.02197265625,
-0.0194854736328125,
0.005252838134765625,
-0.01221466064453125,
-0.008270263671875,
-0.014892578125,
-0.011932373046875,
-0.0147705078125,
-0.0361328125,
0.0311737060546875,
0.065185546875,
0.0467529296875,
0.03863525390625,
-0.0111846923828125,
-0.00203704833984375,
-0.0362548828125,
0.00800323486328125,
0.0179290771484375,
-0.00649261474609375,
-0.031768798828125,
0.007659912109375,
-0.00258636474609375,
-0.0218505859375,
0.0202178955078125,
0.0050048828125,
0.005405426025390625,
0.00806427001953125,
-0.059326171875,
0.00507354736328125,
-0.041229248046875,
0.040740966796875,
0.0318603515625,
-0.042633056640625,
0.042694091796875,
0.036529541015625,
-0.0075225830078125,
-0.061676025390625,
-0.0285186767578125,
-0.044342041015625,
0.01488494873046875,
0.0462646484375,
-0.0721435546875,
-0.04229736328125,
-0.026611328125,
-0.0472412109375,
-0.002445220947265625,
0.032745361328125,
0.0116424560546875,
0.01491546630859375,
-0.032867431640625,
0.0201416015625,
0.02264404296875,
-0.0038051605224609375,
0.0408935546875,
0.01198577880859375,
0.022918701171875,
0.0037212371826171875,
0.0440673828125,
-0.0085906982421875,
-0.049713134765625,
0.0645751953125,
-0.03387451171875,
-0.056365966796875,
0.044952392578125,
-0.01136016845703125,
0.054779052734375,
0.03411865234375,
0.004222869873046875,
0.0008840560913085938,
-0.0031108856201171875,
0.051239013671875,
-0.06195068359375,
0.00875091552734375,
-0.005863189697265625,
-0.033905029296875,
-0.0022220611572265625,
-0.028350830078125,
0.04742431640625,
-0.0257415771484375,
-0.01959228515625,
0.026702880859375,
0.021453857421875,
0.025177001953125,
-0.0036525726318359375,
-0.0086212158203125,
0.0230560302734375,
0.0265350341796875,
-0.0107574462890625,
-0.003482818603515625,
-0.01038360595703125,
-0.0064697265625,
-0.041229248046875,
-0.048492431640625,
0.0244903564453125,
-0.003162384033203125,
0.0443115234375,
-0.0068206787109375,
0.05767822265625,
-0.009124755859375,
-0.054931640625,
-0.0232391357421875,
-0.0201873779296875,
0.038604736328125,
0.0131988525390625,
-0.03955078125,
-0.0024261474609375,
0.0212554931640625,
0.0110015869140625,
-0.03277587890625,
0.0594482421875,
0.03375244140625,
0.0211639404296875,
-0.033050537109375,
-0.022216796875,
-0.049468994140625,
-0.09271240234375,
-0.0086212158203125,
0.0679931640625,
0.023773193359375,
0.0204010009765625,
0.0140228271484375,
0.06658935546875,
0.051361083984375,
-0.0171356201171875,
0.006439208984375,
0.0191802978515625,
-0.03839111328125,
-0.0142974853515625,
-0.00383758544921875,
0.0032558441162109375,
0.039459228515625,
-0.031829833984375,
0.0003390312194824219,
0.03570556640625,
-0.020660400390625,
-0.00726318359375,
-0.0008535385131835938,
-0.00839996337890625,
0.01198577880859375,
-0.031707763671875,
-0.038970947265625,
-0.0156707763671875,
0.01372528076171875,
0.0233917236328125,
0.037445068359375,
0.045135498046875,
-0.030517578125,
-0.00507354736328125,
0.01468658447265625,
0.032928466796875,
-0.0128936767578125,
-0.0195770263671875,
0.008819580078125,
-0.03857421875,
-0.051483154296875,
0.031219482421875,
0.016815185546875,
-0.025390625,
-0.031005859375,
0.01503753662109375,
0.0296783447265625,
-0.014984130859375,
-0.01690673828125,
-0.0782470703125,
0.034088134765625,
-0.024139404296875,
0.026275634765625,
-0.01290130615234375,
0.037445068359375,
-0.0151214599609375,
-0.0189666748046875,
0.026824951171875,
0.018310546875,
-0.038360595703125,
0.034912109375,
0.01486968994140625,
0.006381988525390625,
0.006610870361328125,
0.07708740234375,
0.051361083984375,
-0.030670166015625,
0.0183563232421875,
-0.0157470703125,
-0.030670166015625,
-0.0333251953125,
0.026123046875,
-0.005542755126953125,
-0.0550537109375,
-0.002841949462890625,
0.028289794921875,
0.0187530517578125,
-0.0056304931640625,
0.038970947265625,
-0.010650634765625,
0.0130462646484375,
0.0220947265625,
-0.0252227783203125,
-0.019561767578125,
-0.0179901123046875,
-0.040557861328125,
-0.01386260986328125,
0.034820556640625,
-0.0287017822265625,
0.0031032562255859375,
0.04656982421875,
0.0117950439453125,
0.007434844970703125,
-0.013153076171875,
-0.01385498046875,
-0.0217132568359375,
-0.049163818359375,
-0.044403076171875,
-0.002605438232421875,
-0.00024068355560302734,
0.012542724609375,
0.012481689453125,
-0.0067901611328125,
-0.06353759765625,
0.001659393310546875,
-0.0023860931396484375,
0.0023708343505859375,
0.03363037109375,
0.053558349609375,
-0.050262451171875,
0.057281494140625,
-0.0003521442413330078,
-0.01495361328125,
0.0408935546875,
-0.0161590576171875,
-0.029876708984375,
-0.0253143310546875,
-0.0186614990234375,
0.01021575927734375,
-0.047332763671875,
0.014862060546875,
-0.0013246536254882812,
0.001956939697265625,
-0.04058837890625,
-0.0007152557373046875,
0.035797119140625,
-0.00385284423828125,
-0.041595458984375,
-0.0246124267578125,
-0.03216552734375,
0.00405120849609375,
-0.0012636184692382812,
-0.004436492919921875,
0.005146026611328125,
0.032379150390625,
-0.00787353515625,
-0.0181732177734375,
-0.015594482421875,
-0.01904296875,
-0.018798828125,
0.01108551025390625,
-0.03125,
0.0274505615234375,
0.005626678466796875,
-0.0004565715789794922,
0.01313018798828125,
-0.015472412109375,
0.007843017578125,
-0.08740234375,
0.0721435546875,
-0.0333251953125,
0.0196990966796875,
-0.06781005859375,
-0.040618896484375,
0.01169586181640625,
0.12744140625,
-0.01108551025390625,
-0.028533935546875,
-0.0299224853515625,
0.0218353271484375,
-0.040252685546875,
-0.06549072265625,
0.0012006759643554688,
-0.00238800048828125,
-0.05206298828125,
0.0174102783203125,
-0.021087646484375,
-0.0007596015930175781,
-0.015899658203125,
0.013702392578125,
-0.0045928955078125,
-0.042449951171875,
0.0212554931640625,
-0.049560546875,
0.0020294189453125,
0.01971435546875,
-0.0081787109375,
-0.0258331298828125,
0.00220489501953125,
-0.034332275390625,
-0.055938720703125,
-0.013397216796875,
-0.029205322265625,
0.050048828125,
0.0236358642578125,
-0.021881103515625,
-0.005741119384765625,
0.0389404296875,
0.021728515625,
-0.0058135986328125,
0.029693603515625,
0.025970458984375,
-0.030059814453125,
-0.045013427734375,
0.004535675048828125,
-0.06402587890625,
-0.018951416015625,
-0.004215240478515625,
-0.0089569091796875,
0.03265380859375,
-0.01499176025390625,
-0.030059814453125,
0.0220794677734375,
-0.0255889892578125,
-0.018951416015625,
-0.040557861328125,
-0.039520263671875,
0.00972747802734375,
-0.038177490234375,
0.00846099853515625,
0.0005426406860351562,
-0.0212249755859375,
-0.01143646240234375,
0.006946563720703125,
-0.00963592529296875,
0.0248565673828125,
0.02862548828125,
0.0177459716796875,
-0.015594482421875,
-0.051422119140625,
-0.00630950927734375,
0.04071044921875,
-0.01061248779296875,
0.033782958984375,
0.02496337890625,
-0.030914306640625,
0.0428466796875,
0.00972747802734375,
0.0208740234375,
-0.021270751953125,
0.00782012939453125,
0.029998779296875,
0.01485443115234375,
-0.001544952392578125,
0.03912353515625,
-0.0096588134765625,
-0.02947998046875,
-0.01273345947265625,
-0.00997161865234375,
-0.03314208984375,
0.0261077880859375,
0.0256195068359375,
0.0230255126953125,
-0.0251617431640625,
0.021636962890625,
-0.0283355712890625,
-0.0175018310546875,
0.046417236328125,
0.042083740234375,
-0.01027679443359375,
-0.0125579833984375,
0.006412506103515625,
-0.008819580078125,
-0.0014810562133789062,
-0.034912109375,
0.0225677490234375,
0.00809478759765625,
0.01177978515625,
0.00458526611328125,
0.01224517822265625,
-0.0151214599609375,
0.04644775390625,
0.03619384765625,
-0.0169219970703125,
-0.00069427490234375,
-0.004302978515625,
0.048309326171875,
-0.030517578125,
0.024566650390625,
0.01282501220703125,
0.007534027099609375,
-0.0036106109619140625,
0.014404296875,
0.0266876220703125,
-0.01123809814453125,
-0.01806640625,
0.037200927734375,
0.032135009765625,
-0.00783538818359375,
-0.0040130615234375,
0.048095703125,
0.0180511474609375,
0.0209808349609375,
-0.00995635986328125,
0.0288543701171875,
0.034149169921875,
0.03173828125,
0.01476287841796875,
-0.01125335693359375,
0.0175933837890625,
-0.009307861328125,
0.00873565673828125,
-0.01261138916015625,
0.01134490966796875,
0.00907135009765625,
0.0160675048828125,
0.03521728515625,
-0.00014352798461914062,
-0.01617431640625,
-0.034912109375,
-0.019500732421875,
-0.005672454833984375,
-0.03253173828125,
-0.04669189453125,
-0.0018548965454101562,
0.047119140625,
0.011016845703125,
-0.0190582275390625,
-0.01140594482421875,
0.036865234375,
-0.00794219970703125,
0.01690673828125,
0.0194091796875,
-0.032958984375,
0.010223388671875,
0.01033782958984375,
-0.0152130126953125,
-0.01050567626953125,
0.01009368896484375,
-0.052459716796875,
-0.0184478759765625,
-0.0287628173828125,
-0.0165252685546875,
0.055511474609375,
-0.0222015380859375,
0.024169921875,
-0.04327392578125,
0.02197265625,
-0.040374755859375,
-0.001667022705078125,
0.042816162109375,
0.031707763671875,
-0.00792694091796875,
-0.0174102783203125,
-0.049163818359375,
-0.0305328369140625,
-0.07745361328125,
-0.026885986328125,
-0.025299072265625,
0.02685546875,
-0.007396697998046875,
0.01201629638671875,
0.0019092559814453125,
-0.00925445556640625,
-0.01451873779296875,
0.0235443115234375,
0.00897216796875,
0.0255126953125,
-0.0202484130859375,
0.08221435546875,
-0.0272674560546875,
0.046417236328125,
-0.02044677734375,
0.006816864013671875,
-0.014984130859375,
0.0018739700317382812,
0.01531219482421875,
-0.03155517578125,
-0.05157470703125,
-0.028228759765625,
-0.037384033203125,
0.04522705078125,
0.0670166015625,
-0.0218505859375,
0.0310821533203125,
-0.0224761962890625,
0.00628662109375,
-0.0234832763671875,
0.01317596435546875,
-0.048431396484375,
-0.00980377197265625,
0.0002837181091308594,
-0.0107269287109375,
0.0150299072265625,
-0.0234832763671875,
-0.001087188720703125,
-0.00801849365234375,
0.00041747093200683594,
0.007030487060546875,
0.004535675048828125,
-0.071533203125,
0.08038330078125,
0.05712890625,
-0.0011615753173828125,
0.0268096923828125,
-0.01387786865234375,
0.001537322998046875,
-0.00513458251953125,
0.01959228515625,
0.0013427734375,
0.00865936279296875,
0.048736572265625,
-0.0015439987182617188,
-0.0156097412109375,
0.02508544921875,
-0.02874755859375,
0.0262298583984375,
0.07171630859375,
0.06341552734375,
-0.09857177734375,
0.00948333740234375,
-0.0205841064453125,
-0.01885986328125,
0.0732421875,
-0.0072174072265625,
-0.017822265625,
-0.0281982421875,
0.04949951171875,
-0.014312744140625,
-0.005069732666015625,
0.026580810546875,
0.00550079345703125,
-0.01849365234375,
-0.0252838134765625,
0.03533935546875,
0.01415252685546875,
0.02142333984375,
-0.0245361328125,
-0.0209197998046875,
-0.01442718505859375,
0.00731658935546875,
0.0145263671875,
-0.0259857177734375,
-0.0009336471557617188,
-0.0301361083984375,
-0.006458282470703125,
-0.046417236328125,
-0.007793426513671875,
0.05230712890625,
0.0362548828125,
0.054229736328125,
0.060455322265625,
0.00691986083984375,
0.0133819580078125,
0.007495880126953125,
0.0574951171875,
0.0182037353515625,
-0.0255889892578125,
-0.01540374755859375,
-0.00475311279296875,
-0.044158935546875,
0.0157318115234375,
-0.0277557373046875,
-0.005245208740234375,
0.00017595291137695312,
-0.00018131732940673828,
0.06549072265625,
-0.00461578369140625,
-0.037628173828125,
0.0037841796875,
-0.02655029296875,
0.00620269775390625,
-0.047607421875,
-0.002994537353515625,
-0.04339599609375,
0.00433349609375,
-0.03436279296875,
-0.0284881591796875,
0.013824462890625,
-0.0625,
-0.0426025390625,
0.06561279296875,
0.01331329345703125,
0.006137847900390625,
0.01467132568359375,
0.0310516357421875,
-0.04248046875,
0.0079803466796875,
-0.0298309326171875,
0.0179595947265625,
0.039154052734375,
-0.0024700164794921875,
-0.020233154296875,
-0.01340484619140625,
-0.0124969482421875,
0.02703857421875,
-0.005596160888671875,
-0.0079498291015625,
-0.019073486328125,
0.0161590576171875,
0.0679931640625,
0.050079345703125,
0.021881103515625,
0.021484375,
0.00048828125,
-0.0200347900390625,
0.025238037109375,
0.0013170242309570312,
0.0298309326171875,
-0.00009757280349731445,
-0.02099609375,
0.0158843994140625,
-0.00592041015625,
-0.01332855224609375,
-0.0099029541015625,
-0.01177978515625,
-0.0081024169921875,
-0.00948333740234375,
-0.015533447265625,
-0.029052734375,
-0.0335693359375,
0.040252685546875,
-0.044097900390625,
0.03533935546875,
0.027587890625,
-0.04559326171875,
0.01407623291015625,
-0.0206451416015625,
0.01300048828125,
-0.02001953125,
0.0038814544677734375,
0.004772186279296875,
-0.0061187744140625,
0.0003600120544433594,
0.052001953125,
-0.031890869140625,
0.06072998046875,
-0.0242919921875,
0.00666046142578125,
-0.10247802734375,
-0.0296478271484375,
0.0223846435546875,
0.07415771484375,
-0.04534912109375,
-0.028228759765625,
0.0129241943359375,
0.00952911376953125,
0.00804901123046875,
0.0065765380859375,
0.0328369140625,
0.00836944580078125,
0.0274658203125,
0.0306243896484375,
-0.02850341796875,
-0.0072479248046875,
0.0014638900756835938,
0.00991058349609375,
0.01493072509765625,
0.0347900390625,
0.00460052490234375,
-0.04156494140625,
0.01788330078125,
0.0014190673828125,
0.0643310546875,
0.0189056396484375,
0.0487060546875,
-0.036895751953125,
-0.029144287109375,
-0.00673675537109375,
0.04949951171875,
0.00012123584747314453,
0.003726959228515625,
-0.01776123046875,
-0.0266265869140625,
-0.0156707763671875,
0.00701904296875,
0.01062774658203125,
0.02618408203125,
0.0258636474609375,
-0.00521087646484375,
-0.0168914794921875,
-0.0113525390625,
0.01158905029296875,
-0.0287628173828125,
-0.040618896484375,
-0.04693603515625,
0.02130126953125,
0.04241943359375,
0.024169921875,
0.01293182373046875,
-0.01206207275390625,
0.051483154296875,
0.006961822509765625,
0.00713348388671875,
0.00647735595703125,
-0.0330810546875,
0.04754638671875,
-0.007274627685546875,
0.07586669921875,
0.040435791015625,
-0.14306640625,
-0.047576904296875,
0.0310516357421875,
-0.0565185546875,
0.041839599609375,
0.061431884765625,
-0.039825439453125,
0.000804901123046875,
0.02227783203125,
-0.0123748779296875,
0.003597259521484375,
0.00443267822265625,
0.0117645263671875,
0.006847381591796875,
0.0254669189453125,
0.0047760009765625,
-0.06292724609375,
-0.00728607177734375,
-0.021636962890625,
-0.002414703369140625,
0.031829833984375,
0.029541015625,
0.0296173095703125,
0.0220794677734375,
-0.05987548828125,
0.029876708984375,
-0.04547119140625,
-0.05657958984375,
0.03314208984375,
0.023162841796875,
-0.00270843505859375,
-0.01381683349609375,
-0.04205322265625,
-0.00002384185791015625,
0.025177001953125,
-0.02435302734375,
-0.00827789306640625,
0.0174560546875,
0.0196075439453125,
-0.0193939208984375,
0.03143310546875,
-0.00659942626953125,
-0.00931549072265625,
0.0207672119140625,
-0.0081939697265625,
0.033111572265625,
0.046356201171875,
0.005344390869140625,
0.0516357421875,
-0.0260772705078125,
0.0020313262939453125,
0.0076141357421875,
-0.06365966796875,
0.021240234375,
0.043548583984375,
-0.032928466796875,
0.008453369140625,
0.0130767822265625,
-0.0140838623046875,
0.03094482421875,
0.0021076202392578125,
0.0173797607421875,
0.01340484619140625,
-0.000789642333984375,
0.036712646484375,
0.0130157470703125,
0.052154541015625,
-0.027862548828125,
0.014373779296875,
0.0021762847900390625,
0.00897216796875,
0.020965576171875,
-0.00690460205078125,
-0.05096435546875,
-0.0526123046875,
0.00856781005859375,
0.02490234375,
-0.017120361328125,
-0.058380126953125,
-0.1114501953125,
0.049285888671875,
0.05316162109375,
0.00283050537109375,
-0.0711669921875,
0.050506591796875,
-0.06402587890625,
0.09613037109375,
0.002750396728515625,
0.0224456787109375,
0.01800537109375,
0.03399658203125,
-0.05657958984375,
-0.025421142578125,
-0.02099609375,
0.00983428955078125,
-0.034454345703125,
0.0056610107421875,
-0.006099700927734375,
-0.01800537109375,
0.01519775390625,
0.00798797607421875,
0.0007166862487792969,
0.048431396484375,
0.04058837890625,
-0.0272369384765625,
0.0010251998901367188,
0.001941680908203125,
0.0021266937255859375,
-0.020751953125,
0.00604248046875,
-0.0440673828125,
0.00323486328125,
-0.0673828125,
0.030487060546875,
0.0217742919921875,
-0.04559326171875,
-0.1085205078125,
-0.0102691650390625,
-0.0274810791015625,
-0.03759765625,
0.01387786865234375,
0.006855010986328125,
-0.01708984375,
0.01213836669921875,
0.00705718994140625,
-0.03350830078125,
0.0182037353515625,
0.007205963134765625,
0.004177093505859375,
0.0245361328125,
0.026641845703125,
0.01332855224609375,
-0.058837890625,
-0.0192413330078125,
-0.032684326171875,
-0.01172637939453125,
0.0143890380859375,
-0.0154876708984375,
0.0029430389404296875,
0.03314208984375,
-0.0496826171875,
-0.0640869140625,
-0.028778076171875,
-0.0133209228515625,
-0.00688934326171875,
-0.0212249755859375,
-0.036407470703125,
-0.01276397705078125,
0.045806884765625,
0.07379150390625,
0.0206298828125,
-0.0249786376953125,
-0.01031494140625,
-0.0229034423828125,
-0.0019626617431640625,
-0.0189971923828125,
-0.013824462890625,
-0.032073974609375,
0.000051975250244140625,
-0.01399993896484375,
-0.0257568359375,
-0.00782012939453125,
0.02532958984375,
-0.023773193359375,
0.003917694091796875,
0.029327392578125,
-0.0137481689453125,
-0.035614013671875,
-0.030609130859375,
0.11639404296875,
-0.06884765625,
-0.0284271240234375,
0.0126495361328125,
0.0281524658203125,
0.026580810546875,
-0.0278167724609375,
0.006328582763671875,
0.01654052734375,
-0.04144287109375,
0.0214080810546875,
-0.004779815673828125,
0.04693603515625,
-0.0472412109375,
-0.00948333740234375,
-0.014434814453125,
0.029541015625,
-0.003246307373046875,
0.030853271484375,
-0.04571533203125,
0.07867431640625,
0.00949859619140625,
0.0816650390625,
-0.01372528076171875,
-0.0214691162109375,
-0.0187835693359375,
0.02020263671875,
0.00025272369384765625,
-0.0013856887817382812,
0.039947509765625,
-0.0362548828125,
-0.0010623931884765625,
0.019989013671875,
-0.0093994140625,
-0.04547119140625,
0.02252197265625,
-0.0236968994140625,
0.0249481201171875,
0.016998291015625
] |
2ca5b651d5253733f674f1dd86c225a6a337a549
|
Wordpress Stackexchange
Q: Remove the category/taxonomy description field? How can I remove the category/taxonomy description field? The one which shows up on the edit category/taxonomy page.
A: When no hook is available, you can always count on the old jQuery trickery...
add_action( 'admin_footer-edit-tags.php', 'wpse_56569_remove_cat_tag_description' );
function wpse_56569_remove_cat_tag_description(){
global $current_screen;
switch ( $current_screen->id )
{
case 'edit-category':
// WE ARE AT /wp-admin/edit-tags.php?taxonomy=category
// OR AT /wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=1&post_type=post
break;
case 'edit-post_tag':
// WE ARE AT /wp-admin/edit-tags.php?taxonomy=post_tag
// OR AT /wp-admin/edit-tags.php?action=edit&taxonomy=post_tag&tag_ID=3&post_type=post
break;
}
?>
<script type="text/javascript">
jQuery(document).ready( function($) {
$('#tag-description').parent().remove();
});
</script>
<?php
}
|
Q: Remove the category/taxonomy description field? How can I remove the category/taxonomy description field? The one which shows up on the edit category/taxonomy page.
A: When no hook is available, you can always count on the old jQuery trickery...
add_action( 'admin_footer-edit-tags.php', 'wpse_56569_remove_cat_tag_description' );
function wpse_56569_remove_cat_tag_description(){
global $current_screen;
switch ( $current_screen->id )
{
case 'edit-category':
// WE ARE AT /wp-admin/edit-tags.php?taxonomy=category
// OR AT /wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=1&post_type=post
break;
case 'edit-post_tag':
// WE ARE AT /wp-admin/edit-tags.php?taxonomy=post_tag
// OR AT /wp-admin/edit-tags.php?action=edit&taxonomy=post_tag&tag_ID=3&post_type=post
break;
}
?>
<script type="text/javascript">
jQuery(document).ready( function($) {
$('#tag-description').parent().remove();
});
</script>
<?php
}
A: Use CSS, I was implementing the JS solution and I didn't like the delay, then I've remembered about this.
body.taxonomy-name .term-description-wrap {
display:none;
}
A: AFAIK, you can add new fields but you cannot remove the old ones! They are directly printed, and not stored in a variable to which a filter can be applied.
Ref: wp-admin/edit-tags.php, line no. 380.
A: The most efficient way of 'removing' it is to apply CSS to the admin area, by using the 'admin_head' action hook.
add_action('admin_head', 'my_admin_area_custom_css');
function my_admin_area_custom_css() {
echo '<style>
body.taxonomy-name .term-description-wrap {
display:none;
}
</style>';
}
NB: Update the body.taxonomy-name to the taxonomy name you wish to hide the description field for.
There is not a hook to remove the markup from the document, hence hiding it with CSS.
A: I used the jQuery below to achieve this as well.
$('label[for="description"]').parent().parent().remove();
A: On the Edit Category/Taxonomy page, .parent() doesn't remove the form field's label. Here's the jQuery for complete removal on both pages:
$('#tag-description').closest('.form-field').remove();
$('#description').closest('.form-field').remove();
A: I guess this would be a good answer
add_filter('manage_edit-product_cat_columns', function ( $columns ) {
if( isset( $columns['description'] ) )
unset( $columns['description'] );
return $columns;
} );
|
wordpress
|
{
"language": "en",
"length": 281,
"provenance": "stackexchange_00019.jsonl.gz:421231",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56569"
}
|
[
0.0285186767578125,
0.035797119140625,
-0.061798095703125,
-0.03338623046875,
0.057952880859375,
-0.05938720703125,
0.035797119140625,
-0.008026123046875,
-0.047515869140625,
-0.0004067420959472656,
-0.0061187744140625,
-0.0273895263671875,
-0.0275115966796875,
-0.046844482421875,
-0.0006580352783203125,
-0.05584716796875,
0.01340484619140625,
-0.007053375244140625,
0.0340576171875,
0.0005745887756347656,
0.0007529258728027344,
0.00978851318359375,
0.03424072265625,
-0.01195526123046875,
-0.0033817291259765625,
-0.00923919677734375,
0.09234619140625,
-0.0111846923828125,
-0.01049041748046875,
-0.02923583984375,
0.021575927734375,
0.0044097900390625,
0.006496429443359375,
0.0074920654296875,
-0.0021514892578125,
-0.0416259765625,
0.01107025146484375,
-0.0085601806640625,
-0.007740020751953125,
0.036865234375,
0.0232391357421875,
-0.0201568603515625,
-0.0189666748046875,
-0.00870513916015625,
-0.0007944107055664062,
-0.02178955078125,
0.00933074951171875,
-0.042755126953125,
0.0139312744140625,
-0.050262451171875,
0.0304718017578125,
0.00492095947265625,
0.051483154296875,
-0.0679931640625,
-0.020660400390625,
0.01212310791015625,
-0.0318603515625,
0.037933349609375,
0.0259246826171875,
0.012115478515625,
-0.0225067138671875,
0.021942138671875,
0.00745391845703125,
-0.0213470458984375,
0.0056610107421875,
-0.025787353515625,
0.00728607177734375,
0.0214996337890625,
-0.053558349609375,
0.01259613037109375,
0.0604248046875,
-0.0291900634765625,
-0.0206756591796875,
-0.00841522216796875,
-0.00382232666015625,
-0.0243377685546875,
0.02069091796875,
-0.0242462158203125,
0.008209228515625,
0.028900146484375,
0.05029296875,
-0.003955841064453125,
-0.01065826416015625,
0.0282745361328125,
0.01381683349609375,
0.038116455078125,
0.0052947998046875,
-0.038360595703125,
-0.06884765625,
-0.00800323486328125,
-0.032928466796875,
-0.0682373046875,
-0.06292724609375,
0.02593994140625,
0.01922607421875,
0.00992584228515625,
0.01519012451171875,
0.056243896484375,
-0.01496124267578125,
0.005748748779296875,
-0.01511383056640625,
-0.0118255615234375,
-0.0236358642578125,
-0.0247802734375,
0.0170745849609375,
0.0126190185546875,
-0.02789306640625,
-0.0291900634765625,
0.04315185546875,
0.0169677734375,
-0.011077880859375,
-0.0054473876953125,
-0.0077362060546875,
0.0022563934326171875,
-0.0087432861328125,
0.0020389556884765625,
-0.040679931640625,
0.0203704833984375,
-0.019744873046875,
0.0116729736328125,
-0.00206756591796875,
0.00232696533203125,
-0.0277557373046875,
0.001453399658203125,
0.0199432373046875,
-0.0006232261657714844,
-0.0221710205078125,
0.0237884521484375,
0.0174407958984375,
-0.041259765625,
-0.050750732421875,
0.0256195068359375,
0.106689453125,
0.061187744140625,
0.04736328125,
0.00018405914306640625,
0.0212249755859375,
-0.0113983154296875,
0.021820068359375,
-0.01739501953125,
0.004016876220703125,
0.00815582275390625,
0.026458740234375,
-0.01020050048828125,
-0.0283966064453125,
0.0008854866027832031,
0.00917816162109375,
0.01258087158203125,
0.007068634033203125,
-0.0111541748046875,
-0.01548004150390625,
-0.0280914306640625,
0.08428955078125,
-0.0047149658203125,
-0.05084228515625,
-0.04376220703125,
0.0670166015625,
-0.0645751953125,
-0.054595947265625,
-0.10015869140625,
0.0291748046875,
0.00011897087097167969,
0.03082275390625,
-0.0133209228515625,
-0.02423095703125,
-0.0038890838623046875,
-0.057952880859375,
-0.008636474609375,
0.021270751953125,
-0.0235748291015625,
0.03363037109375,
-0.042877197265625,
-0.016021728515625,
0.01410675048828125,
0.018402099609375,
0.041656494140625,
-0.03375244140625,
-0.0002624988555908203,
0.0274658203125,
-0.028594970703125,
-0.041107177734375,
-0.054351806640625,
-0.0011272430419921875,
0.006389617919921875,
-0.051300048828125,
0.0249481201171875,
0.0126190185546875,
0.043975830078125,
0.015655517578125,
0.017120361328125,
0.04949951171875,
0.01459503173828125,
-0.0513916015625,
0.010406494140625,
0.057769775390625,
-0.0010967254638671875,
-0.048675537109375,
-0.024169921875,
0.018524169921875,
-0.043701171875,
-0.01702880859375,
0.04315185546875,
-0.0206756591796875,
0.031524658203125,
-0.044158935546875,
0.023223876953125,
-0.027496337890625,
0.052490234375,
-0.020172119140625,
-0.00260162353515625,
0.0152740478515625,
-0.0295867919921875,
-0.00782012939453125,
-0.025543212890625,
-0.033599853515625,
-0.021392822265625,
-0.021453857421875,
0.0053863525390625,
0.008148193359375,
0.01032257080078125,
0.00856781005859375,
0.0021076202392578125,
0.005199432373046875,
0.018310546875,
0.03643798828125,
0.0271759033203125,
-0.02886962890625,
-0.0018415451049804688,
0.03118896484375,
0.023773193359375,
-0.019012451171875,
0.016815185546875,
0.07122802734375,
0.033203125,
-0.0189666748046875,
0.0063323974609375,
0.0204010009765625,
-0.08551025390625,
-0.025970458984375,
0.044219970703125,
0.005451202392578125,
-0.0011196136474609375,
-0.049713134765625,
-0.0162200927734375,
0.04937744140625,
-0.00983428955078125,
-0.00887298583984375,
0.0038471221923828125,
0.0035419464111328125,
0.0270233154296875,
0.028961181640625,
0.01055145263671875,
0.006381988525390625,
0.01910400390625,
0.008880615234375,
0.0217742919921875,
-0.01023101806640625,
-0.03387451171875,
0.0350341796875,
-0.01678466796875,
0.015838623046875,
-0.043121337890625,
-0.049468994140625,
0.009613037109375,
0.08782958984375,
-0.007038116455078125,
0.05145263671875,
0.037872314453125,
-0.037139892578125,
0.013427734375,
0.02459716796875,
0.0017070770263671875,
-0.003932952880859375,
0.0311279296875,
0.0102081298828125,
-0.0137939453125,
-0.029266357421875,
0.004627227783203125,
-0.01387786865234375,
0.003841400146484375,
0.0159149169921875,
0.0743408203125,
0.0286712646484375,
-0.01090240478515625,
-0.045989990234375,
-0.056732177734375,
0.00998687744140625,
0.0440673828125,
-0.0328369140625,
0.0002777576446533203,
0.01531219482421875,
0.03631591796875,
-0.0186309814453125,
0.0091094970703125,
0.01038360595703125,
0.01428985595703125,
-0.01242828369140625,
-0.00946044921875,
0.0219268798828125,
-0.0091400146484375,
0.029693603515625,
0.062164306640625,
-0.00537109375,
0.0095672607421875,
0.010467529296875,
-0.006427764892578125,
0.032196044921875,
-0.030364990234375,
-0.01187896728515625,
0.053619384765625,
-0.0693359375,
0.045654296875,
0.02313232421875,
0.0113525390625,
-0.012664794921875,
-0.037994384765625,
-0.01180267333984375,
-0.0074615478515625,
-0.08984375,
-0.047576904296875,
0.032867431640625,
-0.03851318359375,
-0.004184722900390625,
0.0245361328125,
-0.0430908203125,
-0.031890869140625,
0.057952880859375,
-0.0033092498779296875,
0.0396728515625,
-0.07452392578125,
-0.059051513671875,
-0.045440673828125,
-0.056488037109375,
-0.008575439453125,
0.0010852813720703125,
-0.0099945068359375,
0.0186920166015625,
0.066162109375,
0.0199737548828125,
-0.0606689453125,
0.035308837890625,
-0.037750244140625,
-0.01259613037109375,
0.0657958984375,
-0.0016908645629882812,
-0.0164337158203125,
0.0297088623046875,
0.01332855224609375,
-0.0211944580078125,
0.01097869873046875,
0.0012102127075195312,
-0.039306640625,
-0.029632568359375,
0.0168609619140625,
0.0204620361328125,
-0.02069091796875,
0.014404296875,
-0.011566162109375,
-0.014892578125,
-0.0472412109375,
-0.0252532958984375,
-0.0117034912109375,
-0.0258941650390625,
0.038299560546875,
-0.0013856887817382812,
0.0057525634765625,
0.004489898681640625,
0.042694091796875,
-0.01206207275390625,
-0.008544921875,
-0.0004634857177734375,
-0.0284271240234375,
0.0261688232421875,
-0.0113983154296875,
-0.00530242919921875,
-0.01241302490234375,
0.01512908935546875,
-0.0175323486328125,
-0.01165008544921875,
-0.015350341796875,
0.019775390625,
0.0117340087890625,
-0.0010900497436523438,
-0.009246826171875,
-0.026519775390625,
0.01568603515625,
-0.04669189453125,
-0.0106201171875,
-0.017608642578125,
0.006683349609375,
-0.00675201416015625,
0.038177490234375,
-0.008697509765625,
-0.0213165283203125,
-0.0034122467041015625,
0.0004096031188964844,
-0.0020122528076171875,
0.006168365478515625,
-0.039581298828125,
-0.0181121826171875,
-0.120361328125,
0.028533935546875,
0.009124755859375,
-0.035003662109375,
-0.03759765625,
0.0584716796875,
-0.08416748046875,
-0.029541015625,
0.0361328125,
-0.0133514404296875,
-0.017913818359375,
-0.01422119140625,
-0.0268096923828125,
-0.049102783203125,
-0.02947998046875,
-0.006557464599609375,
-0.03289794921875,
-0.01168060302734375,
-0.020050048828125,
0.0281982421875,
0.0081024169921875,
-0.00782012939453125,
-0.001667022705078125,
0.038665771484375,
0.04559326171875,
0.004077911376953125,
-0.002777099609375,
-0.02685546875,
-0.027374267578125,
-0.0192413330078125,
-0.0004897117614746094,
-0.035430908203125,
-0.0252838134765625,
-0.006771087646484375,
-0.013916015625,
0.038970947265625,
0.008331298828125,
0.0022258758544921875,
0.0295257568359375,
-0.0196685791015625,
-0.0408935546875,
-0.0418701171875,
-0.0906982421875,
-0.03326416015625,
-0.02825927734375,
-0.03564453125,
-0.04022216796875,
-0.054107666015625,
0.04217529296875,
0.0244598388671875,
-0.01922607421875,
-0.002105712890625,
0.05810546875,
0.016571044921875,
-0.032989501953125,
-0.05096435546875,
-0.017669677734375,
0.0333251953125,
0.0014362335205078125,
0.054901123046875,
0.0170440673828125,
-0.036712646484375,
0.09014892578125,
0.0185546875,
0.002780914306640625,
-0.059539794921875,
0.0933837890625,
0.003986358642578125,
-0.014068603515625,
0.015899658203125,
-0.0142364501953125,
0.0189361572265625,
-0.028076171875,
-0.035980224609375,
0.007297515869140625,
-0.0206756591796875,
0.01129913330078125,
0.0113067626953125,
0.02044677734375,
-0.02044677734375,
-0.0290985107421875,
0.0050506591796875,
0.044769287109375,
0.0074005126953125,
0.0015096664428710938,
0.007183074951171875,
0.0019350051879882812,
0.0025463104248046875,
-0.003070831298828125,
-0.0716552734375,
-0.026123046875,
-0.06585693359375,
0.0016241073608398438,
-0.050048828125,
-0.040252685546875,
-0.0058441162109375,
0.006259918212890625,
-0.005100250244140625,
-0.01263427734375,
-0.0267486572265625,
-0.017242431640625,
0.006290435791015625,
0.04833984375,
0.015106201171875,
0.0433349609375,
0.00762176513671875,
0.011322021484375,
0.0267791748046875,
0.0016584396362304688,
0.0200958251953125,
0.0277099609375,
-0.003086090087890625,
0.0085906982421875,
0.001987457275390625,
-0.01139068603515625,
0.0286712646484375,
0.0179443359375,
-0.012481689453125,
0.0220947265625,
-0.0161590576171875,
0.0242156982421875,
-0.0242767333984375,
0.042816162109375,
0.01349639892578125,
-0.021453857421875,
0.0254058837890625,
-0.0152130126953125,
-0.001003265380859375,
-0.054473876953125,
-0.0214080810546875,
0.02972412109375,
0.018035888671875,
-0.01125335693359375,
-0.0301513671875,
0.024200439453125,
0.0258636474609375,
-0.018402099609375,
-0.018096923828125,
-0.047943115234375,
-0.032196044921875,
0.0025482177734375,
0.0157928466796875,
0.02154541015625,
-0.004863739013671875,
-0.021636962890625,
0.009033203125,
-0.034637451171875,
0.02423095703125,
-0.0081787109375,
-0.004024505615234375,
-0.0014905929565429688,
0.00457763671875,
-0.038482666015625,
0.01373291015625,
0.0225982666015625,
-0.0457763671875,
-0.044921875,
0.0009393692016601562,
-0.0120849609375,
0.02557373046875,
-0.0009326934814453125,
0.01198577880859375,
-0.00891876220703125,
-0.0152435302734375,
-0.01392364501953125,
-0.01514434814453125,
0.059295654296875,
0.025970458984375,
-0.0143585205078125,
-0.0113983154296875,
-0.05523681640625,
-0.040283203125,
-0.07879638671875,
-0.039337158203125,
-0.0445556640625,
0.031829833984375,
-0.050201416015625,
-0.031280517578125,
-0.00461578369140625,
0.046142578125,
-0.00997161865234375,
0.06402587890625,
0.00666046142578125,
-0.01033782958984375,
-0.019927978515625,
0.03240966796875,
-0.01026153564453125,
0.0011463165283203125,
-0.0114593505859375,
0.01177215576171875,
0.02642822265625,
-0.021881103515625,
0.006801605224609375,
-0.0634765625,
-0.0091400146484375,
-0.01153564453125,
-0.0572509765625,
-0.0026264190673828125,
0.032012939453125,
0.006000518798828125,
-0.00060272216796875,
-0.0016384124755859375,
0.00403594970703125,
-0.026947021484375,
0.02203369140625,
-0.0028057098388671875,
0.01104736328125,
-0.00276947021484375,
-0.02880859375,
0.03680419921875,
0.0103607177734375,
0.0014553070068359375,
0.0292205810546875,
-0.0423583984375,
0.036651611328125,
0.04119873046875,
-0.0038280487060546875,
0.022003173828125,
0.013214111328125,
-0.004596710205078125,
0.023681640625,
-0.0075836181640625,
0.0130615234375,
0.004215240478515625,
0.0035114288330078125,
-0.03436279296875,
0.00897979736328125,
0.045989990234375,
0.013153076171875,
0.01555633544921875,
0.05029296875,
-0.016326904296875,
-0.0192413330078125,
0.016571044921875,
0.02667236328125,
-0.034942626953125,
0.005947113037109375,
0.0030956268310546875,
-0.00007426738739013672,
0.0283660888671875,
0.007556915283203125,
0.0197601318359375,
0.0243377685546875,
-0.057403564453125,
-0.002292633056640625,
-0.04046630859375,
-0.0232391357421875,
0.01387786865234375,
-0.0220947265625,
0.022918701171875,
-0.006580352783203125,
0.0282440185546875,
-0.01210784912109375,
0.0082550048828125,
0.01104736328125,
0.0162506103515625,
-0.03240966796875,
0.004852294921875,
0.01268768310546875,
-0.009490966796875,
-0.055084228515625,
0.03955078125,
0.0015163421630859375,
-0.002166748046875,
0.032379150390625,
0.0003256797790527344,
-0.005741119384765625,
0.0455322265625,
-0.0147705078125,
0.02545166015625,
0.0007300376892089844,
-0.055999755859375,
-0.04150390625,
-0.0176849365234375,
0.0271148681640625,
0.00628662109375,
-0.03485107421875,
0.0239105224609375,
-0.03131103515625,
-0.0247650146484375,
-0.00138092041015625,
-0.046417236328125,
0.061431884765625,
-0.045806884765625,
-0.004425048828125,
0.013427734375,
0.024932861328125,
0.010528564453125,
-0.02911376953125,
0.0252838134765625,
-0.055389404296875,
-0.0215606689453125,
-0.010955810546875,
-0.015960693359375,
-0.00498199462890625,
-0.03857421875,
-0.09295654296875,
0.0977783203125,
0.038238525390625,
0.0200958251953125,
-0.02203369140625,
0.0413818359375,
-0.04791259765625,
0.0033779144287109375,
-0.041748046875,
0.047576904296875,
0.043304443359375,
0.041168212890625,
0.01003265380859375,
-0.003482818603515625,
0.042724609375,
0.0200653076171875,
0.046173095703125,
0.0019502639770507812,
0.0234222412109375,
-0.0241241455078125,
0.0276031494140625,
0.0194091796875,
-0.02679443359375,
0.00978851318359375,
0.01329803466796875,
-0.022247314453125,
-0.005161285400390625,
0.01312255859375,
0.033416748046875,
-0.02716064453125,
-0.029205322265625,
0.036163330078125,
0.032318115234375,
0.0421142578125,
0.00402069091796875,
-0.0016469955444335938,
-0.033905029296875,
0.0076904296875,
0.029266357421875,
-0.00551605224609375,
-0.0054779052734375,
0.043548583984375,
0.00048041343688964844,
-0.030364990234375,
0.016571044921875,
-0.0380859375,
0.0416259765625,
-0.03155517578125,
0.0601806640625,
0.004497528076171875,
0.01357269287109375,
0.0367431640625,
0.00991058349609375,
0.041229248046875,
0.0301055908203125,
-0.029083251953125,
0.05084228515625,
0.0019969940185546875,
0.02203369140625,
-0.051025390625,
0.0028171539306640625,
0.00951385498046875,
0.059478759765625,
-0.044525146484375,
-0.046173095703125,
0.01593017578125,
0.0229034423828125,
0.00812530517578125,
0.0170135498046875,
0.0211944580078125,
-0.0017080307006835938,
0.048370361328125,
-0.034576416015625,
-0.0004367828369140625,
0.027435302734375,
0.050384521484375,
0.01058197021484375,
0.001041412353515625,
-0.0489501953125,
-0.032012939453125,
-0.06915283203125,
0.01465606689453125,
0.0265350341796875,
0.0677490234375,
0.04742431640625,
0.054901123046875,
0.019500732421875,
-0.05181884765625,
-0.006275177001953125,
0.01343536376953125,
-0.00783538818359375,
0.00301361083984375,
-0.0180816650390625,
-0.0061187744140625,
-0.0029735565185546875,
0.011810302734375,
0.01039886474609375,
0.0201263427734375,
0.021453857421875,
0.03509521484375,
0.0159149169921875,
-0.0125274658203125,
0.015655517578125,
-0.00974273681640625,
-0.02130126953125,
-0.0322265625,
0.03173828125,
0.047882080078125,
0.01085662841796875,
0.0014886856079101562,
0.0195770263671875,
0.048370361328125,
-0.0195465087890625,
0.004230499267578125,
0.006511688232421875,
-0.0288238525390625,
0.07061767578125,
0.013031005859375,
0.03656005859375,
0.007598876953125,
-0.07080078125,
-0.010986328125,
-0.026611328125,
-0.02130126953125,
0.036651611328125,
0.0264892578125,
-0.045074462890625,
0.04864501953125,
0.02197265625,
-0.045013427734375,
0.024810791015625,
0.0298919677734375,
0.0058441162109375,
-0.0064697265625,
0.004364013671875,
-0.0206451416015625,
-0.0224151611328125,
-0.0187835693359375,
0.0008864402770996094,
0.02215576171875,
0.01166534423828125,
0.045654296875,
-0.0175018310546875,
0.0142974853515625,
-0.0408935546875,
0.046112060546875,
-0.06170654296875,
-0.042572021484375,
0.039642333984375,
0.0077972412109375,
0.00901031494140625,
-0.006359100341796875,
-0.061126708984375,
0.0679931640625,
0.031951904296875,
0.03497314453125,
0.0711669921875,
0.01116943359375,
-0.00763702392578125,
-0.0203704833984375,
0.01111602783203125,
-0.00412750244140625,
-0.021881103515625,
-0.007602691650390625,
-0.019439697265625,
0.026702880859375,
0.0889892578125,
0.041351318359375,
-0.006679534912109375,
0.0173492431640625,
-0.0175018310546875,
0.0261688232421875,
0.016937255859375,
0.0289764404296875,
0.04278564453125,
-0.02435302734375,
-0.005279541015625,
0.033477783203125,
-0.009002685546875,
0.0286712646484375,
-0.0017910003662109375,
0.0390625,
0.027252197265625,
-0.0282135009765625,
-0.041351318359375,
-0.019256591796875,
-0.0033016204833984375,
-0.0316162109375,
-0.001987457275390625,
-0.030487060546875,
-0.0109710693359375,
0.02313232421875,
0.0157623291015625,
-0.0298614501953125,
-0.0247650146484375,
-0.017333984375,
0.01045989990234375,
-0.022613525390625,
-0.041229248046875,
-0.0653076171875,
0.0137176513671875,
0.0300140380859375,
-0.0090789794921875,
-0.0235443115234375,
0.0242919921875,
-0.035736083984375,
0.023101806640625,
-0.00415802001953125,
0.0087738037109375,
-0.01227569580078125,
-0.01080322265625,
-0.041412353515625,
-0.00028586387634277344,
-0.060943603515625,
-0.0032749176025390625,
-0.0233612060546875,
0.042327880859375,
0.0162200927734375,
-0.04254150390625,
0.0031490325927734375,
0.040374755859375,
0.058349609375,
0.09930419921875,
0.060333251953125,
-0.0243377685546875,
-0.01389312744140625,
0.041717529296875,
-0.0083160400390625,
-0.041473388671875,
-0.00746917724609375,
0.0080718994140625,
-0.0005869865417480469,
-0.036712646484375,
0.0217132568359375,
0.0215606689453125,
-0.03375244140625,
-0.0908203125,
0.08050537109375,
-0.036651611328125,
-0.02947998046875,
0.0379638671875,
0.003875732421875,
-0.0240020751953125,
0.01395416259765625,
0.0171966552734375,
-0.0169525146484375,
0.0210723876953125,
0.00907135009765625,
0.0235595703125,
0.0716552734375,
-0.0112152099609375,
-0.0005006790161132812,
-0.03411865234375,
0.0258941650390625,
0.00792694091796875,
0.05340576171875,
-0.0293731689453125,
0.025634765625,
-0.015655517578125,
0.0194091796875,
-0.03985595703125,
-0.00965118408203125,
-0.01244354248046875,
0.0266876220703125,
-0.000469207763671875,
-0.031280517578125,
-0.0289154052734375,
-0.0213165283203125,
0.042205810546875,
0.020965576171875,
0.006153106689453125,
-0.0089263916015625,
-0.032257080078125,
-0.027801513671875,
-0.01035308837890625,
-0.02105712890625,
0.01479339599609375,
-0.062103271484375,
-0.0026607513427734375,
0.0325927734375,
0.010528564453125,
-0.01898193359375,
-0.017120361328125,
-0.0229339599609375,
-0.0159912109375,
0.029998779296875,
0.03204345703125,
-0.04193115234375,
0.02545166015625,
0.0078125,
-0.029693603515625,
-0.036285400390625,
-0.00644683837890625,
-0.0093994140625,
-0.0174713134765625,
-0.0172119140625,
-0.047332763671875,
0.0235748291015625,
-0.016845703125,
0.029754638671875,
-0.013824462890625,
0.01273345947265625,
-0.030242919921875,
0.036956787109375,
-0.02386474609375,
0.01428985595703125,
0.0198822021484375,
0.0248565673828125,
-0.04638671875,
0.02490234375,
0.0173797607421875,
0.01186370849609375,
-0.030029296875,
0.028228759765625,
-0.0277252197265625,
0.061553955078125,
-0.011962890625,
-0.0211181640625,
0.028594970703125,
-0.0136566162109375,
-0.006893157958984375,
0.0301971435546875,
-0.00696563720703125,
-0.0631103515625,
0.038482666015625,
-0.022369384765625,
0.039215087890625,
0.0272216796875
] |
5152283c49678cb21574cddffc8305e94d4d2d70
|
Wordpress Stackexchange
Q: How to Override a Pluggable Function How can I override a function in pluggable.php?
I have tried making my own plugin -- got the fatal error on function already defined.
I tried functions.php in my theme -- got the white screen.
Is it possible to override a pluggable.php function without touching the source code file itself?
Thanks.
Here is the function I wish to override (located in ../wp-includes/pluggable.php):
if ( !function_exists('wp_new_user_notification') ) :
/**
* Notify the blog admin of a new user, normally via email.
*
* @since 2.0
*
* @param int $user_id User ID
* @param string $plaintext_pass Optional. The user's plaintext password
*/
function wp_new_user_notification($user_id, $plaintext_pass = '') {
...
}
A: Wrap it in a function_exists check:
if( ! function_exists('some_pluggable_function') ) {
function some_pluggable_function()
}
}
|
Q: How to Override a Pluggable Function How can I override a function in pluggable.php?
I have tried making my own plugin -- got the fatal error on function already defined.
I tried functions.php in my theme -- got the white screen.
Is it possible to override a pluggable.php function without touching the source code file itself?
Thanks.
Here is the function I wish to override (located in ../wp-includes/pluggable.php):
if ( !function_exists('wp_new_user_notification') ) :
/**
* Notify the blog admin of a new user, normally via email.
*
* @since 2.0
*
* @param int $user_id User ID
* @param string $plaintext_pass Optional. The user's plaintext password
*/
function wp_new_user_notification($user_id, $plaintext_pass = '') {
...
}
A: Wrap it in a function_exists check:
if( ! function_exists('some_pluggable_function') ) {
function some_pluggable_function()
}
}
A: The correct way to override functions in pluggable.php is to redefine the same function in a plugin. Your plugin's function will override the one in pluggable.php since the WP one is wrapped in a call to function_exists().
But make sure you're only doing this once. From the Codex:
Note: A function can only be reassigned this way once, so you can’t install two plugins that plug the same function for different reasons. For safety, it is best to always wrap your functions with if ( !function_exists() ), otherwise you will produce fatal errors on plugin activation.
From what you describe happening, it sounds like more than one plugin is trying to override the same function.
|
wordpress
|
{
"language": "en",
"length": 248,
"provenance": "stackexchange_00019.jsonl.gz:421232",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56571"
}
|
[
0.1092529296875,
-0.004604339599609375,
0.0167083740234375,
-0.06854248046875,
0.023193359375,
-0.023681640625,
0.0027618408203125,
-0.0421142578125,
-0.004405975341796875,
0.013916015625,
-0.025970458984375,
0.009429931640625,
-0.016998291015625,
-0.0173492431640625,
0.0006451606750488281,
-0.037841796875,
0.0235443115234375,
0.00864410400390625,
0.01474761962890625,
-0.025634765625,
0.01629638671875,
-0.00018203258514404297,
-0.010650634765625,
0.08099365234375,
0.0017843246459960938,
0.0153350830078125,
0.096435546875,
-0.0428466796875,
0.009979248046875,
-0.0084686279296875,
0.01049041748046875,
-0.028472900390625,
-0.0205535888671875,
0.0908203125,
-0.08837890625,
-0.09014892578125,
0.003871917724609375,
0.0260467529296875,
-0.0012311935424804688,
0.0284271240234375,
0.04925537109375,
-0.02001953125,
-0.0074462890625,
0.08404541015625,
-0.016448974609375,
-0.06640625,
0.061065673828125,
-0.0258331298828125,
0.01032257080078125,
0.027679443359375,
0.0263214111328125,
0.0224609375,
0.029937744140625,
-0.0030460357666015625,
0.0033168792724609375,
0.01251983642578125,
-0.077880859375,
0.0298004150390625,
0.040069580078125,
0.048065185546875,
0.0011644363403320312,
-0.0272369384765625,
0.005695343017578125,
-0.045806884765625,
0.0306549072265625,
-0.03668212890625,
0.01203155517578125,
0.03228759765625,
-0.02227783203125,
0.0440673828125,
0.051116943359375,
-0.01488494873046875,
0.0010328292846679688,
0.0127105712890625,
-0.0340576171875,
-0.0154266357421875,
0.026123046875,
0.004795074462890625,
0.0200653076171875,
-0.01406097412109375,
0.004085540771484375,
-0.0286865234375,
0.043182373046875,
-0.026947021484375,
-0.0008940696716308594,
0.0031375885009765625,
-0.009063720703125,
-0.0026226043701171875,
-0.0235137939453125,
-0.013153076171875,
-0.0224761962890625,
0.0014047622680664062,
-0.029510498046875,
0.008880615234375,
-0.0182037353515625,
0.0006127357482910156,
0.043975830078125,
0.0394287109375,
0.00531005859375,
0.01068878173828125,
0.0207061767578125,
-0.0614013671875,
0.038787841796875,
-0.0301666259765625,
-0.03765869140625,
0.039337158203125,
0.0090179443359375,
0.02117919921875,
-0.0279998779296875,
0.042083740234375,
0.005138397216796875,
-0.0928955078125,
-0.005580902099609375,
-0.0009312629699707031,
-0.00579071044921875,
0.03076171875,
-0.022735595703125,
0.00994110107421875,
-0.01065826416015625,
0.01435089111328125,
0.0220794677734375,
0.02032470703125,
-0.0112152099609375,
0.0007767677307128906,
0.0016260147094726562,
-0.0223846435546875,
-0.034393310546875,
0.0077972412109375,
0.0024261474609375,
0.0191802978515625,
-0.05474853515625,
-0.01059722900390625,
0.0457763671875,
0.042205810546875,
0.039642333984375,
-0.02923583984375,
0.062042236328125,
0.017791748046875,
-0.0226593017578125,
0.04412841796875,
0.01776123046875,
-0.01300048828125,
-0.0231781005859375,
-0.003505706787109375,
-0.006748199462890625,
-0.01052093505859375,
0.011260986328125,
0.0229644775390625,
0.019195556640625,
-0.01427459716796875,
-0.0127410888671875,
-0.0070648193359375,
-0.00238037109375,
0.0231475830078125,
0.0268707275390625,
0.04248046875,
0.0304107666015625,
-0.0032253265380859375,
-0.02685546875,
0.00038623809814453125,
0.016143798828125,
-0.0323486328125,
-0.035003662109375,
0.0236053466796875,
-0.032379150390625,
0.05755615234375,
-0.01526641845703125,
-0.010498046875,
0.0280303955078125,
-0.004741668701171875,
0.025177001953125,
0.0209808349609375,
0.054290771484375,
0.054412841796875,
0.027435302734375,
-0.0018892288208007812,
0.006855010986328125,
0.01462554931640625,
0.0301361083984375,
-0.00836181640625,
-0.036346435546875,
-0.0390625,
0.06695556640625,
-0.0379638671875,
-0.08197021484375,
0.0118408203125,
0.01027679443359375,
0.06298828125,
0.05511474609375,
0.0176849365234375,
0.059814453125,
-0.029296875,
0.01861572265625,
0.0216522216796875,
-0.046722412109375,
-0.049774169921875,
0.039825439453125,
0.0267333984375,
-0.038116455078125,
0.01520538330078125,
0.07489013671875,
0.055572509765625,
-0.023162841796875,
-0.006320953369140625,
-0.054595947265625,
0.02691650390625,
-0.0131378173828125,
0.03143310546875,
0.03814697265625,
0.048553466796875,
-0.0112457275390625,
0.0124053955078125,
-0.0198211669921875,
-0.0126953125,
-0.004634857177734375,
0.01104736328125,
-0.0123291015625,
0.0465087890625,
-0.00881195068359375,
0.058502197265625,
-0.019256591796875,
0.008575439453125,
-0.01151275634765625,
-0.028564453125,
-0.0245819091796875,
-0.03277587890625,
0.006008148193359375,
-0.0170440673828125,
-0.0295867919921875,
0.008453369140625,
0.00827789306640625,
0.01219940185546875,
0.00640106201171875,
-0.0024585723876953125,
-0.033050537109375,
-0.00933837890625,
-0.0148468017578125,
-0.035247802734375,
-0.00839996337890625,
0.050506591796875,
0.041961669921875,
-0.007610321044921875,
0.0156402587890625,
0.032196044921875,
0.044952392578125,
-0.0139617919921875,
0.022308349609375,
-0.00965118408203125,
0.00472259521484375,
0.003681182861328125,
0.0173797607421875,
0.001659393310546875,
0.021820068359375,
-0.08599853515625,
0.02001953125,
0.048248291015625,
0.0172576904296875,
-0.040496826171875,
0.00331878662109375,
0.04180908203125,
-0.0027675628662109375,
-0.03790283203125,
-0.035064697265625,
0.0004134178161621094,
0.0233306884765625,
-0.006153106689453125,
0.003887176513671875,
0.004528045654296875,
-0.029022216796875,
-0.0054931640625,
0.0302734375,
-0.002410888671875,
0.001163482666015625,
0.006732940673828125,
0.009552001953125,
-0.003246307373046875,
-0.05316162109375,
0.0146636962890625,
0.01554107666015625,
0.004894256591796875,
-0.0240936279296875,
0.035675048828125,
-0.05084228515625,
-0.0240936279296875,
-0.03009033203125,
-0.005100250244140625,
-0.006275177001953125,
-0.0158843994140625,
-0.04351806640625,
-0.021331787109375,
0.01715087890625,
0.0172882080078125,
-0.0252532958984375,
0.0237274169921875,
-0.05517578125,
-0.00571441650390625,
-0.059722900390625,
-0.0828857421875,
0.05377197265625,
-0.05914306640625,
-0.0004458427429199219,
0.0791015625,
0.01172637939453125,
-0.0019931793212890625,
-0.004116058349609375,
-0.0287017822265625,
-0.01453399658203125,
0.0256195068359375,
-0.00695037841796875,
-0.0307769775390625,
-0.044677734375,
0.00356292724609375,
0.022674560546875,
0.0301513671875,
-0.00447845458984375,
-0.027923583984375,
-0.01042938232421875,
0.0234527587890625,
-0.048828125,
-0.032562255859375,
-0.01262664794921875,
-0.04156494140625,
0.0205535888671875,
0.00887298583984375,
-0.00907135009765625,
-0.0180511474609375,
0.0226898193359375,
0.014251708984375,
-0.05322265625,
-0.01422119140625,
-0.03216552734375,
-0.04144287109375,
-0.058624267578125,
0.036895751953125,
0.007747650146484375,
0.04498291015625,
0.00701141357421875,
0.033050537109375,
0.00016415119171142578,
-0.04229736328125,
-0.003749847412109375,
0.050537109375,
-0.01371002197265625,
-0.0158843994140625,
0.033935546875,
-0.038482666015625,
-0.03961181640625,
0.0028514862060546875,
0.029754638671875,
0.00811004638671875,
-0.0253143310546875,
0.0046539306640625,
-0.0128936767578125,
-0.05035400390625,
-0.0014247894287109375,
-0.02166748046875,
-0.0172271728515625,
-0.04852294921875,
-0.0182342529296875,
-0.0806884765625,
0.0027408599853515625,
-0.003002166748046875,
-0.031280517578125,
0.022491455078125,
0.004871368408203125,
-0.01226043701171875,
0.00505828857421875,
-0.0006694793701171875,
0.006702423095703125,
-0.002857208251953125,
0.005260467529296875,
0.007251739501953125,
0.006656646728515625,
-0.01168060302734375,
0.00339508056640625,
-0.019073486328125,
0.041290283203125,
-0.006679534912109375,
-0.0168304443359375,
0.00800323486328125,
0.01338958740234375,
0.0028095245361328125,
0.0023097991943359375,
0.00510406494140625,
-0.046356201171875,
0.009368896484375,
-0.0653076171875,
0.004634857177734375,
-0.0206451416015625,
0.01392364501953125,
0.00991058349609375,
0.08636474609375,
0.025115966796875,
-0.01513671875,
0.02142333984375,
0.0019330978393554688,
-0.0716552734375,
0.0248870849609375,
-0.06573486328125,
0.016204833984375,
-0.05853271484375,
-0.01119232177734375,
-0.0171966552734375,
-0.0016431808471679688,
0.004657745361328125,
0.052703857421875,
-0.0086212158203125,
-0.0196533203125,
0.0221405029296875,
0.003139495849609375,
0.01922607421875,
0.027801513671875,
0.0062713623046875,
-0.00860595703125,
0.0204925537109375,
-0.0265045166015625,
-0.042755126953125,
0.0084686279296875,
-0.09014892578125,
0.04119873046875,
0.042938232421875,
-0.0298004150390625,
-0.038238525390625,
-0.010528564453125,
0.035400390625,
0.0177764892578125,
0.010894775390625,
-0.0153045654296875,
0.013671875,
-0.0211181640625,
0.01485443115234375,
-0.01108551025390625,
0.00373077392578125,
0.004589080810546875,
-0.0325927734375,
0.0217132568359375,
-0.02587890625,
-0.0001862049102783203,
0.0225830078125,
-0.039154052734375,
-0.06689453125,
-0.040679931640625,
-0.03863525390625,
-0.0060272216796875,
-0.0183258056640625,
-0.02142333984375,
-0.034423828125,
-0.058685302734375,
0.0263214111328125,
-0.024932861328125,
-0.0212249755859375,
0.0159149169921875,
0.052490234375,
0.01515960693359375,
-0.0168304443359375,
-0.00896453857421875,
0.01001739501953125,
0.0140838623046875,
0.06671142578125,
-0.0223846435546875,
-0.050628662109375,
-0.00589752197265625,
-0.0047760009765625,
0.012115478515625,
0.0185699462890625,
-0.0023784637451171875,
0.042022705078125,
-0.011383056640625,
-0.045166015625,
0.052978515625,
-0.004833221435546875,
-0.03350830078125,
-0.020660400390625,
-0.0209808349609375,
0.038909912109375,
0.0041961669921875,
-0.0240020751953125,
0.01200103759765625,
-0.01165008544921875,
-0.00420379638671875,
-0.054718017578125,
0.0198974609375,
-0.03253173828125,
-0.01140594482421875,
-0.01580810546875,
0.00531768798828125,
0.00704193115234375,
0.017242431640625,
0.0247344970703125,
0.01123046875,
0.05328369140625,
-0.0521240234375,
0.04083251953125,
0.0117950439453125,
-0.019866943359375,
-0.013885498046875,
-0.0008797645568847656,
0.060760498046875,
0.0247802734375,
-0.0257720947265625,
-0.0179443359375,
0.0157623291015625,
-0.02325439453125,
-0.01197052001953125,
-0.0253143310546875,
0.005584716796875,
0.01312255859375,
-0.0323486328125,
-0.0042572021484375,
-0.0098724365234375,
0.00014925003051757812,
-0.0285491943359375,
-0.019378662109375,
0.030487060546875,
-0.043792724609375,
0.0196990966796875,
-0.004322052001953125,
-0.0033016204833984375,
-0.005458831787109375,
-0.0009102821350097656,
0.0190582275390625,
0.016693115234375,
-0.0125579833984375,
0.0277099609375,
0.0184478759765625,
-0.01250457763671875,
-0.036895751953125,
0.01421356201171875,
-0.033050537109375,
-0.019317626953125,
0.018096923828125,
0.0091094970703125,
0.034027099609375,
0.0104217529296875,
0.00003898143768310547,
0.0256805419921875,
-0.0197296142578125,
0.041168212890625,
0.04150390625,
-0.021270751953125,
-0.018280029296875,
-0.028778076171875,
0.0159912109375,
0.000056803226470947266,
0.02288818359375,
-0.00963592529296875,
0.004383087158203125,
0.018798828125,
-0.0075531005859375,
0.00963592529296875,
-0.0281219482421875,
-0.01776123046875,
-0.017425537109375,
0.0021915435791015625,
0.0244903564453125,
-0.048248291015625,
-0.034332275390625,
-0.02532958984375,
-0.01212310791015625,
0.0615234375,
-0.01282501220703125,
0.032196044921875,
-0.0285186767578125,
-0.0247955322265625,
-0.0055999755859375,
-0.011993408203125,
0.09124755859375,
0.042449951171875,
-0.041229248046875,
-0.0172119140625,
-0.036590576171875,
-0.0265960693359375,
-0.07391357421875,
-0.03424072265625,
-0.04095458984375,
0.03173828125,
0.01271820068359375,
0.024688720703125,
-0.0232696533203125,
-0.047637939453125,
0.0014495849609375,
-0.0030422210693359375,
0.019439697265625,
-0.0055389404296875,
-0.019805908203125,
0.0377197265625,
0.04425048828125,
0.03497314453125,
0.0184478759765625,
0.01910400390625,
-0.025909423828125,
-0.024993896484375,
-0.00711822509765625,
-0.00505828857421875,
-0.00006848573684692383,
-0.0210723876953125,
0.0199432373046875,
-0.01474761962890625,
0.046417236328125,
-0.00794219970703125,
0.044677734375,
-0.01715087890625,
0.004703521728515625,
-0.0191497802734375,
0.01416778564453125,
-0.0277557373046875,
0.0151214599609375,
0.0034084320068359375,
-0.052032470703125,
-0.0212554931640625,
0.01361846923828125,
0.0129852294921875,
0.03778076171875,
-0.03009033203125,
0.029693603515625,
0.0136871337890625,
-0.0811767578125,
0.057403564453125,
0.017059326171875,
-0.0301666259765625,
0.01934814453125,
-0.0293426513671875,
-0.00051116943359375,
0.03839111328125,
-0.023193359375,
0.0307464599609375,
0.00689697265625,
0.0489501953125,
0.00010293722152709961,
0.01143646240234375,
0.033477783203125,
-0.0189971923828125,
-0.005847930908203125,
0.030975341796875,
0.042938232421875,
-0.0758056640625,
0.0233306884765625,
0.01873779296875,
0.02471923828125,
0.02325439453125,
0.018341064453125,
-0.030517578125,
-0.04022216796875,
0.060791015625,
-0.04669189453125,
0.008026123046875,
0.039459228515625,
-0.01154327392578125,
-0.0185394287109375,
0.001194000244140625,
0.0159912109375,
0.031768798828125,
0.032379150390625,
0.023040771484375,
-0.03985595703125,
0.07049560546875,
-0.00484466552734375,
0.0176239013671875,
0.022247314453125,
-0.02838134765625,
-0.05810546875,
0.010467529296875,
0.0233917236328125,
-0.036224365234375,
-0.007503509521484375,
-0.01323699951171875,
0.017791748046875,
0.0175323486328125,
-0.007396697998046875,
-0.01898193359375,
-0.0164642333984375,
-0.0300750732421875,
0.039276123046875,
-0.024017333984375,
-0.007595062255859375,
0.014007568359375,
-0.051177978515625,
0.0016880035400390625,
-0.0195159912109375,
-0.00007176399230957031,
-0.0164794921875,
-0.027099609375,
0.08148193359375,
-0.057525634765625,
-0.0009007453918457031,
0.03326416015625,
0.03924560546875,
-0.0186920166015625,
-0.00301361083984375,
0.039215087890625,
-0.06341552734375,
-0.02825927734375,
0.00836944580078125,
-0.0201263427734375,
-0.0263214111328125,
0.0070037841796875,
-0.0533447265625,
0.121826171875,
0.019561767578125,
0.004497528076171875,
0.00624847412109375,
0.052978515625,
-0.0308685302734375,
0.0308837890625,
-0.062164306640625,
0.0285797119140625,
-0.01043701171875,
0.07867431640625,
-0.0028247833251953125,
0.03021240234375,
0.0124664306640625,
-0.0268707275390625,
0.068603515625,
0.0244903564453125,
-0.00333404541015625,
-0.0283660888671875,
-0.004024505615234375,
0.0018224716186523438,
-0.0496826171875,
0.0310516357421875,
-0.00638580322265625,
-0.0015516281127929688,
-0.0012063980102539062,
-0.0183563232421875,
0.0284881591796875,
-0.063720703125,
-0.00557708740234375,
0.006381988525390625,
-0.01326751708984375,
-0.0287017822265625,
-0.01154327392578125,
0.0110626220703125,
-0.006561279296875,
-0.015625,
-0.006999969482421875,
-0.0106048583984375,
0.006549835205078125,
0.01476287841796875,
0.00789642333984375,
0.0203399658203125,
0.0421142578125,
-0.0110321044921875,
0.039306640625,
0.0028171539306640625,
-0.00948333740234375,
0.02069091796875,
0.01244354248046875,
-0.019500732421875,
-0.004940032958984375,
-0.01422882080078125,
0.0250396728515625,
0.00818634033203125,
0.03448486328125,
0.05255126953125,
0.029510498046875,
0.0083160400390625,
-0.0106048583984375,
0.038909912109375,
0.040557861328125,
-0.0208892822265625,
-0.00261688232421875,
0.01221466064453125,
-0.004360198974609375,
0.00342559814453125,
-0.002597808837890625,
0.04095458984375,
-0.031982421875,
-0.04718017578125,
-0.055206298828125,
-0.00989532470703125,
0.0063629150390625,
0.025604248046875,
-0.007335662841796875,
-0.019134521484375,
-0.01178741455078125,
-0.03521728515625,
-0.043365478515625,
0.020050048828125,
-0.01177215576171875,
0.0197601318359375,
0.00433349609375,
0.0295562744140625,
0.040252685546875,
-0.005565643310546875,
0.0147552490234375,
-0.01580810546875,
-0.0191192626953125,
-0.00775909423828125,
-0.0220184326171875,
-0.02099609375,
0.00046896934509277344,
0.037322998046875,
-0.01331329345703125,
-0.01074981689453125,
0.0188751220703125,
-0.0034923553466796875,
-0.0521240234375,
-0.0284271240234375,
0.04315185546875,
-0.0245208740234375,
-0.003910064697265625,
-0.032135009765625,
-0.0115966796875,
-0.005908966064453125,
-0.0001138448715209961,
0.003749847412109375,
0.01276397705078125,
0.01122283935546875,
-0.01337432861328125,
0.04669189453125,
-0.0027332305908203125,
-0.01617431640625,
0.00640869140625,
-0.0162200927734375,
0.072998046875,
0.00368499755859375,
-0.0760498046875,
-0.004154205322265625,
-0.0391845703125,
-0.0308685302734375,
0.0283203125,
0.024566650390625,
-0.0157623291015625,
0.0235443115234375,
0.0185699462890625,
-0.0161285400390625,
0.061614990234375,
0.0068359375,
-0.05487060546875,
-0.0007843971252441406,
0.061859130859375,
-0.0254364013671875,
-0.064453125,
-0.0274505615234375,
-0.05499267578125,
0.040130615234375,
0.017608642578125,
0.061309814453125,
-0.005374908447265625,
0.040496826171875,
-0.005039215087890625,
0.005428314208984375,
-0.036895751953125,
-0.01337432861328125,
0.00640869140625,
-0.0208587646484375,
-0.01044464111328125,
0.00428009033203125,
-0.0694580078125,
0.030303955078125,
0.014984130859375,
0.006481170654296875,
0.04376220703125,
-0.0124664306640625,
0.005420684814453125,
-0.0310821533203125,
0.0106658935546875,
-0.0213165283203125,
-0.016387939453125,
-0.028839111328125,
-0.0267791748046875,
0.0330810546875,
0.0262298583984375,
-0.0011281967163085938,
0.01285552978515625,
0.0333251953125,
0.01189422607421875,
-0.037078857421875,
0.035919189453125,
-0.069580078125,
0.0224609375,
0.004299163818359375,
-0.048736572265625,
-0.049560546875,
-0.0233306884765625,
-0.019378662109375,
-0.006710052490234375,
0.02545166015625,
-0.027923583984375,
-0.0322265625,
-0.001953125,
0.0032253265380859375,
0.009765625,
-0.03765869140625,
-0.0015611648559570312,
0.00847625732421875,
0.0017023086547851562,
0.0162353515625,
0.0036869049072265625,
-0.031524658203125,
-0.05133056640625,
-0.001201629638671875,
0.0207366943359375,
-0.03662109375,
-0.0121917724609375,
-0.06475830078125,
0.0109710693359375,
0.0192718505859375,
-0.00571441650390625,
-0.07745361328125,
0.035888671875,
-0.034942626953125,
0.0631103515625,
-0.03057861328125,
0.0038471221923828125,
-0.006298065185546875,
0.011077880859375,
-0.051666259765625,
-0.049591064453125,
-0.0311737060546875,
0.042449951171875,
-0.0438232421875,
0.0173797607421875,
0.066162109375,
-0.0220947265625,
-0.03594970703125,
0.0107574462890625,
0.009033203125,
0.050445556640625,
-0.055633544921875,
-0.02374267578125,
-0.004245758056640625,
0.012969970703125,
-0.007358551025390625,
-0.057586669921875,
0.02203369140625,
-0.0911865234375,
-0.002285003662109375,
-0.00234222412109375,
-0.01528167724609375,
-0.00937652587890625,
-0.0312042236328125,
-0.018829345703125,
0.0289306640625,
0.0140533447265625,
-0.017669677734375,
-0.035369873046875,
0.0152435302734375,
-0.0188446044921875,
0.04150390625,
-0.002590179443359375,
-0.002361297607421875,
0.00989532470703125,
0.04022216796875,
0.03704833984375,
-0.00865936279296875,
0.030242919921875,
0.03094482421875,
-0.0546875,
0.052093505859375,
0.02215576171875,
0.0347900390625,
-0.04144287109375,
-0.01482391357421875,
0.03424072265625,
0.0188751220703125,
-0.002960205078125,
-0.026580810546875,
0.059722900390625,
0.006717681884765625,
-0.00470733642578125,
-0.0092926025390625,
-0.0178680419921875,
0.016693115234375,
0.10308837890625,
0.03204345703125,
0.0303192138671875,
-0.0587158203125,
-0.0277557373046875,
-0.05255126953125,
-0.00528717041015625,
-0.0004680156707763672,
-0.0020198822021484375,
-0.032806396484375,
0.0372314453125,
0.0201873779296875,
-0.044158935546875,
-0.013214111328125,
-0.005626678466796875,
-0.053466796875,
0.016021728515625,
-0.01128387451171875,
-0.0244903564453125,
0.0250396728515625,
-0.0401611328125,
0.0335693359375,
-0.008026123046875,
0.0255126953125,
0.01336669921875,
0.0227203369140625,
0.0275115966796875,
0.054962158203125,
0.01105499267578125,
0.03564453125,
-0.02734375,
-0.01361846923828125,
0.015533447265625,
0.047454833984375,
0.01275634765625,
-0.031890869140625,
0.0157318115234375,
0.010986328125,
-0.0059661865234375,
-0.005359649658203125,
-0.0219268798828125,
0.07611083984375,
-0.00981903076171875,
0.06072998046875,
-0.005725860595703125,
-0.0245361328125,
-0.0233612060546875,
0.03082275390625,
-0.0013113021850585938,
-0.020172119140625,
0.041595458984375,
-0.02471923828125,
0.01454925537109375,
0.01318359375,
0.06353759765625,
0.0027446746826171875,
0.0191497802734375,
-0.014984130859375,
0.003955841064453125,
0.00252532958984375
] |
421fc5305d6a1cd56630f71eb1e14339f622f390
|
Wordpress Stackexchange
Q: if get_post_meta is empty do something I need opposite of this:
<?php if ( get_post_meta($post->ID, 'price_list_category1', true) ) : ?>style="display:none;"<?php endif; ?>
In other words I want style="display:none;" only when meta data doesn't exist.
I thought it would be straightforward like if ( get_post_meta($post->ID, 'price_list_category1', true but this true/false turns out to be a completely different stuff.
any ideas?
Thank you.
A: You can use metadata_exists(); (worked for me)for checking for any post meta and the do whatever you want.
// Check and get a post meta
if ( metadata_exists( 'post', $post_id, '_meta_key' ) ) {
$meta_value = get_post_meta( $post_id, '_meta_key', true );
}
|
Q: if get_post_meta is empty do something I need opposite of this:
<?php if ( get_post_meta($post->ID, 'price_list_category1', true) ) : ?>style="display:none;"<?php endif; ?>
In other words I want style="display:none;" only when meta data doesn't exist.
I thought it would be straightforward like if ( get_post_meta($post->ID, 'price_list_category1', true but this true/false turns out to be a completely different stuff.
any ideas?
Thank you.
A: You can use metadata_exists(); (worked for me)for checking for any post meta and the do whatever you want.
// Check and get a post meta
if ( metadata_exists( 'post', $post_id, '_meta_key' ) ) {
$meta_value = get_post_meta( $post_id, '_meta_key', true );
}
A: I found this via searching for a solution myself, but it dawned on me the answer is very simple. You simply need to check if the value is empty, if it is then echo nothing - if it has content, then display the content - the code i used is below and can be tailored accordingly to anyone who needs to use it.
<?php $meta = get_post_meta( get_the_ID(), 'page-sub-title', true );
if ($meta == '') {
echo ' ';
} else {
echo '<h2>' . $meta . '</h2>';
}
?>
A: You could use the empty function inside your if as such :
<?php if( empty( get_post_meta( $post->ID, 'price_list_category1', true ) ) ) : ?>style="display:none;"<?php endif; ?>
The above returns an error, you should assign the return value to a variable. See my edit below.
Warning
empty might not be the best option depending on the values you store in the meta. Values like false, 0 etc... will be considered empty.
Check the PHP manual for the full list of values that are considered empty.
Edit
You can try assigning the meta to a variable, and using that in the if statement.
<?php
$price_list = get_post_meta( $post->ID, 'price_list_category1', true );
?>
And then...
if( empty( $price_list) ) : ?>style="display:none"<?php endif; ?>
A: if( ! in_array( 'given_key', get_post_custom_keys($post_id) ) ) {}
Here it is written: https://developer.wordpress.org/reference/functions/get_post_meta/#user-contributed-notes
get_post_custom_keys Returns an array containing the keys of all custom fields of a particular post or page. For me, this is the best solution :)
|
wordpress
|
{
"language": "en",
"length": 355,
"provenance": "stackexchange_00019.jsonl.gz:421240",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56597"
}
|
[
0.0283966064453125,
0.020843505859375,
-0.00350189208984375,
0.003326416015625,
0.01215362548828125,
-0.027618408203125,
0.014251708984375,
-0.0557861328125,
0.0225067138671875,
0.004154205322265625,
-0.050262451171875,
-0.006866455078125,
-0.003936767578125,
-0.0287628173828125,
-0.00249481201171875,
-0.041412353515625,
0.037017822265625,
0.036468505859375,
0.083251953125,
0.01078033447265625,
0.005939483642578125,
0.02423095703125,
0.05377197265625,
-0.0016069412231445312,
0.02587890625,
-0.07232666015625,
0.043212890625,
-0.03289794921875,
0.0305938720703125,
-0.029052734375,
0.023590087890625,
0.016845703125,
0.0036411285400390625,
0.007190704345703125,
0.034210205078125,
0.0418701171875,
0.01654052734375,
0.01136016845703125,
0.0391845703125,
-0.02569580078125,
0.03863525390625,
-0.01302337646484375,
-0.01186370849609375,
-0.004619598388671875,
-0.0241851806640625,
0.0113983154296875,
-0.0162811279296875,
-0.0241851806640625,
0.01959228515625,
0.0263214111328125,
0.0196380615234375,
0.02001953125,
0.01308441162109375,
-0.004131317138671875,
-0.0228271484375,
-0.01477813720703125,
-0.042724609375,
-0.0098419189453125,
0.035400390625,
0.00551605224609375,
-0.0239105224609375,
-0.04412841796875,
0.026763916015625,
-0.021148681640625,
0.01149749755859375,
0.0159759521484375,
-0.052001953125,
0.015594482421875,
-0.04742431640625,
0.01395416259765625,
0.02264404296875,
-0.08184814453125,
0.01313018798828125,
-0.0292205810546875,
-0.029052734375,
-0.0296783447265625,
0.0255279541015625,
-0.047210693359375,
-0.01012420654296875,
-0.0115966796875,
-0.0149993896484375,
0.00092315673828125,
-0.0185089111328125,
-0.0191192626953125,
0.01190185546875,
-0.00441741943359375,
-0.0232696533203125,
-0.011138916015625,
-0.02197265625,
-0.0728759765625,
-0.0233917236328125,
-0.02862548828125,
-0.0557861328125,
-0.037109375,
-0.0155487060546875,
-0.0653076171875,
0.03857421875,
0.09063720703125,
-0.02911376953125,
-0.007625579833984375,
-0.041534423828125,
-0.01971435546875,
-0.0214691162109375,
-0.041412353515625,
0.0241851806640625,
0.051544189453125,
-0.0166168212890625,
-0.0218963623046875,
0.041961669921875,
0.01181793212890625,
0.018157958984375,
0.0186614990234375,
-0.02984619140625,
-0.0057525634765625,
-0.0198516845703125,
0.049957275390625,
-0.020538330078125,
-0.00757598876953125,
-0.0291290283203125,
0.0108795166015625,
0.0180816650390625,
0.0543212890625,
0.0132904052734375,
-0.06878662109375,
0.0213470458984375,
0.0293426513671875,
-0.034271240234375,
-0.059722900390625,
0.0198974609375,
0.0196075439453125,
-0.043853759765625,
0.0139617919921875,
0.07183837890625,
-0.0015106201171875,
-0.01006317138671875,
-0.034515380859375,
-0.0135040283203125,
-0.0013141632080078125,
-0.0270233154296875,
0.0079193115234375,
0.00540924072265625,
-0.051605224609375,
0.004390716552734375,
-0.01541900634765625,
-0.02142333984375,
0.05517578125,
0.033172607421875,
-0.038360595703125,
-0.055633544921875,
-0.06378173828125,
-0.00710296630859375,
-0.03936767578125,
0.043212890625,
-0.0021991729736328125,
-0.0227813720703125,
0.01398468017578125,
0.040679931640625,
-0.0188140869140625,
-0.06524658203125,
-0.0416259765625,
0.002468109130859375,
-0.00719451904296875,
0.01052093505859375,
-0.025390625,
-0.03375244140625,
0.00394439697265625,
-0.0157623291015625,
-0.004619598388671875,
0.0207061767578125,
0.044097900390625,
0.0020732879638671875,
0.022705078125,
0.00864410400390625,
-0.00849151611328125,
-0.01531219482421875,
-0.023773193359375,
0.0130767822265625,
0.005931854248046875,
0.0303802490234375,
-0.0156402587890625,
-0.048095703125,
-0.033935546875,
0.07421875,
-0.04833984375,
-0.0782470703125,
0.0697021484375,
-0.009979248046875,
0.0625,
0.02874755859375,
0.0007777214050292969,
0.06524658203125,
0.0003695487976074219,
-0.023681640625,
-0.00894927978515625,
-0.007404327392578125,
-0.01238250732421875,
-0.0185699462890625,
-0.006992340087890625,
-0.0023479461669921875,
0.003086090087890625,
-0.009063720703125,
0.007232666015625,
-0.0276947021484375,
-0.001056671142578125,
-0.08843994140625,
-0.0006346702575683594,
-0.035736083984375,
0.039398193359375,
-0.0672607421875,
0.037353515625,
0.024627685546875,
-0.0268096923828125,
-0.0166473388671875,
0.02099609375,
0.05816650390625,
0.00402069091796875,
-0.0233306884765625,
0.00414276123046875,
-0.0032901763916015625,
0.0124053955078125,
0.00771331787109375,
-0.00800323486328125,
-0.0018167495727539062,
0.0096282958984375,
0.050140380859375,
0.0294036865234375,
-0.0108795166015625,
-0.01515960693359375,
0.059356689453125,
0.039093017578125,
-0.004974365234375,
-0.0253753662109375,
0.039886474609375,
-0.004817962646484375,
-0.05389404296875,
-0.004974365234375,
-0.01392364501953125,
-0.05963134765625,
-0.0005774497985839844,
0.07440185546875,
0.0133209228515625,
0.01070404052734375,
-0.044891357421875,
0.010589599609375,
0.0654296875,
0.00498199462890625,
-0.0144805908203125,
0.0136260986328125,
0.0146026611328125,
0.020538330078125,
-0.00867462158203125,
-0.005031585693359375,
0.0235748291015625,
0.0111083984375,
0.017333984375,
0.022064208984375,
-0.03228759765625,
0.0014333724975585938,
0.03814697265625,
-0.0302276611328125,
-0.002643585205078125,
0.0248260498046875,
0.031524658203125,
-0.01219940185546875,
0.031982421875,
0.037811279296875,
0.031951904296875,
0.018341064453125,
-0.041595458984375,
0.03350830078125,
0.0123138427734375,
-0.0008897781372070312,
0.01007843017578125,
0.0411376953125,
0.01262664794921875,
0.037200927734375,
-0.0219879150390625,
-0.027496337890625,
0.033111572265625,
0.0291595458984375,
-0.0134124755859375,
0.032440185546875,
-0.006244659423828125,
-0.00397491455078125,
-0.01439666748046875,
-0.04632568359375,
0.0002613067626953125,
0.0034332275390625,
0.0235595703125,
-0.002017974853515625,
0.02545166015625,
0.00716400146484375,
-0.01012420654296875,
0.0316162109375,
0.00799560546875,
-0.035980224609375,
-0.025421142578125,
-0.0309906005859375,
0.0191802978515625,
-0.040313720703125,
0.0012493133544921875,
0.041656494140625,
0.0008482933044433594,
-0.01036834716796875,
-0.00473785400390625,
0.028564453125,
-0.006649017333984375,
0.017364501953125,
-0.00975799560546875,
-0.037017822265625,
-0.0147857666015625,
-0.004467010498046875,
0.0298614501953125,
0.0215911865234375,
0.0097198486328125,
-0.0270843505859375,
-0.001667022705078125,
0.0306854248046875,
-0.0604248046875,
-0.055633544921875,
-0.005130767822265625,
-0.043670654296875,
-0.015869140625,
-0.0163421630859375,
-0.031036376953125,
-0.0022296905517578125,
0.0033206939697265625,
-0.00029921531677246094,
0.00284576416015625,
-0.0268096923828125,
-0.07330322265625,
-0.063720703125,
-0.06549072265625,
-0.0214691162109375,
-0.00433349609375,
-0.0003821849822998047,
-0.00396728515625,
0.1031494140625,
0.0122222900390625,
-0.060699462890625,
0.0018167495727539062,
0.0249176025390625,
-0.0159759521484375,
0.028778076171875,
-0.009735107421875,
-0.01885986328125,
-0.0155487060546875,
0.0013580322265625,
0.0194244384765625,
0.00424957275390625,
-0.01235198974609375,
-0.00807952880859375,
-0.022979736328125,
-0.01558685302734375,
0.007007598876953125,
0.027679443359375,
0.03125,
0.044769287109375,
0.0537109375,
0.002532958984375,
-0.06976318359375,
-0.01763916015625,
-0.08441162109375,
0.041900634765625,
0.04339599609375,
0.0105743408203125,
-0.007110595703125,
0.0292816162109375,
-0.01219940185546875,
-0.0014247894287109375,
0.0227508544921875,
-0.0210723876953125,
0.028656005859375,
-0.01245880126953125,
-0.0172576904296875,
-0.01983642578125,
-0.0240325927734375,
-0.03912353515625,
0.00440216064453125,
-0.0309295654296875,
0.0037517547607421875,
-0.005123138427734375,
-0.011505126953125,
-0.0082244873046875,
-0.0017900466918945312,
0.03289794921875,
0.0184783935546875,
0.034210205078125,
-0.039642333984375,
-0.02557373046875,
-0.052581787109375,
0.033111572265625,
0.007015228271484375,
-0.02294921875,
-0.0196990966796875,
0.006061553955078125,
-0.03253173828125,
-0.047088623046875,
0.015899658203125,
0.0157928466796875,
-0.12066650390625,
0.03662109375,
0.01122283935546875,
-0.039947509765625,
-0.01511383056640625,
-0.016876220703125,
-0.0762939453125,
-0.039947509765625,
0.03515625,
-0.0093994140625,
0.01593017578125,
0.0053253173828125,
0.0338134765625,
-0.025421142578125,
-0.017608642578125,
-0.01010894775390625,
-0.00975799560546875,
-0.01117706298828125,
0.0019969940185546875,
0.01215362548828125,
0.0112457275390625,
0.018707275390625,
0.03143310546875,
0.043548583984375,
0.019866943359375,
0.00885009765625,
-0.00884246826171875,
-0.004825592041015625,
-0.0205230712890625,
-0.04736328125,
-0.0162811279296875,
-0.0292510986328125,
-0.03411865234375,
-0.004589080810546875,
-0.009521484375,
0.0330810546875,
-0.0182037353515625,
-0.0242919921875,
0.00885772705078125,
-0.004306793212890625,
-0.0087127685546875,
-0.00403594970703125,
-0.0038623809814453125,
0.01085662841796875,
-0.0126953125,
-0.00672149658203125,
-0.003437042236328125,
-0.0222625732421875,
0.026519775390625,
-0.040496826171875,
-0.029998779296875,
0.01456451416015625,
0.044281005859375,
0.0245819091796875,
-0.006587982177734375,
-0.033966064453125,
0.00952911376953125,
0.0213165283203125,
0.01052093505859375,
-0.007732391357421875,
-0.0435791015625,
-0.030181884765625,
0.021759033203125,
-0.01432037353515625,
0.0174102783203125,
-0.0218963623046875,
0.0748291015625,
-0.04852294921875,
-0.0501708984375,
0.044769287109375,
-0.05084228515625,
-0.0079193115234375,
0.08673095703125,
0.044189453125,
-0.0335693359375,
0.0280303955078125,
0.0032291412353515625,
-0.0001316070556640625,
-0.04620361328125,
-0.01108551025390625,
0.0195465087890625,
-0.021453857421875,
0.03338623046875,
0.032958984375,
0.0277099609375,
0.005802154541015625,
-0.0145416259765625,
0.02276611328125,
-0.0011243820190429688,
-0.0382080078125,
0.043609619140625,
-0.07745361328125,
0.007843017578125,
-0.00556182861328125,
-0.049957275390625,
-0.0413818359375,
-0.0025177001953125,
0.0016641616821289062,
-0.02044677734375,
-0.056549072265625,
-0.041656494140625,
0.008209228515625,
0.041900634765625,
0.01861572265625,
0.0217437744140625,
0.029022216796875,
-0.0128326416015625,
-0.0233154296875,
0.0033283233642578125,
0.01039886474609375,
-0.01395416259765625,
-0.03619384765625,
-0.006763458251953125,
0.0196075439453125,
-0.0242919921875,
-0.042144775390625,
0.07452392578125,
0.0177459716796875,
0.00592041015625,
-0.022186279296875,
-0.01220703125,
-0.002838134765625,
0.03582763671875,
0.042236328125,
-0.048919677734375,
-0.017730712890625,
0.026641845703125,
0.0111541748046875,
-0.03338623046875,
-0.053680419921875,
0.0190582275390625,
0.045806884765625,
-0.03106689453125,
0.004177093505859375,
0.0167999267578125,
0.004673004150390625,
-0.03143310546875,
0.0105743408203125,
0.007350921630859375,
-0.0188751220703125,
-0.028900146484375,
-0.01253509521484375,
0.01073455810546875,
0.00542449951171875,
-0.0050201416015625,
-0.0052642822265625,
0.0190887451171875,
0.0308990478515625,
-0.01236724853515625,
-0.0245208740234375,
0.0186614990234375,
0.032318115234375,
-0.00902557373046875,
-0.0206298828125,
-0.016571044921875,
-0.002593994140625,
0.00739288330078125,
-0.0150299072265625,
-0.040069580078125,
0.02740478515625,
-0.001384735107421875,
0.00461578369140625,
-0.0164947509765625,
-0.0162353515625,
0.0164642333984375,
0.0033588409423828125,
0.05206298828125,
0.0090484619140625,
-0.0325927734375,
0.01183319091796875,
-0.04254150390625,
-0.0094757080078125,
-0.0250091552734375,
-0.0460205078125,
-0.034881591796875,
-0.0158233642578125,
0.0301055908203125,
0.033599853515625,
0.006000518798828125,
-0.0298919677734375,
-0.0290069580078125,
0.017913818359375,
0.042755126953125,
0.07855224609375,
-0.031951904296875,
0.0692138671875,
0.0330810546875,
0.0382080078125,
0.0267791748046875,
0.03656005859375,
-0.0071258544921875,
-0.028045654296875,
-0.006870269775390625,
-0.032958984375,
-0.00879669189453125,
0.0191650390625,
0.0071563720703125,
-0.0036792755126953125,
0.004383087158203125,
0.002964019775390625,
-0.01068115234375,
0.01397705078125,
-0.00026798248291015625,
-0.0201416015625,
-0.00315093994140625,
0.034332275390625,
0.006500244140625,
0.00907135009765625,
-0.019561767578125,
-0.0042266845703125,
0.0006155967712402344,
-0.033203125,
0.048065185546875,
0.0032176971435546875,
0.032806396484375,
0.0126800537109375,
-0.042236328125,
0.0430908203125,
0.07080078125,
0.003917694091796875,
0.03704833984375,
0.01016998291015625,
0.00783538818359375,
0.0210113525390625,
-0.0196380615234375,
0.026763916015625,
0.0137176513671875,
0.0787353515625,
-0.0012769699096679688,
0.006015777587890625,
0.068115234375,
-0.021881103515625,
0.0103302001953125,
0.03759765625,
0.058319091796875,
-0.04156494140625,
-0.01549530029296875,
0.030364990234375,
-0.02642822265625,
-0.0023326873779296875,
-0.00666046142578125,
-0.01739501953125,
-0.03955078125,
0.03515625,
0.0024547576904296875,
-0.0219268798828125,
0.0001842975616455078,
0.00800323486328125,
-0.005229949951171875,
-0.016021728515625,
0.0200042724609375,
0.0181427001953125,
-0.0226593017578125,
0.0187225341796875,
0.03582763671875,
-0.010498046875,
-0.027008056640625,
-0.01441192626953125,
-0.008514404296875,
-0.04010009765625,
-0.0931396484375,
-0.0296173095703125,
-0.01056671142578125,
-0.015960693359375,
0.0010509490966796875,
0.0311431884765625,
0.0161285400390625,
0.021636962890625,
0.0012235641479492188,
0.01303863525390625,
-0.023101806640625,
0.02838134765625,
-0.010589599609375,
-0.02581787109375,
0.01556396484375,
0.037841796875,
-0.0307159423828125,
0.02227783203125,
0.007747650146484375,
-0.036956787109375,
-0.022735595703125,
-0.045318603515625,
0.1036376953125,
-0.0154571533203125,
-0.0396728515625,
0.01050567626953125,
0.0220184326171875,
-0.02032470703125,
0.007678985595703125,
0.045318603515625,
-0.0114288330078125,
0.0430908203125,
0.0111541748046875,
0.038909912109375,
-0.0364990234375,
-0.01168060302734375,
-0.06634521484375,
0.048736572265625,
-0.03057861328125,
0.04376220703125,
-0.00310516357421875,
0.0120391845703125,
0.019744873046875,
0.0107879638671875,
-0.06549072265625,
0.0894775390625,
0.016357421875,
0.0153350830078125,
-0.0738525390625,
0.01074981689453125,
-0.00922393798828125,
-0.003253936767578125,
0.04119873046875,
0.008331298828125,
-0.028533935546875,
0.009918212890625,
0.025115966796875,
0.0275421142578125,
-0.00649261474609375,
0.031494140625,
-0.03753662109375,
0.051300048828125,
0.01227569580078125,
-0.04791259765625,
0.038330078125,
-0.03106689453125,
-0.05731201171875,
-0.00234222412109375,
0.00290679931640625,
-0.00914764404296875,
0.0026092529296875,
0.0213165283203125,
-0.00274658203125,
0.004383087158203125,
0.005290985107421875,
-0.0041351318359375,
0.0345458984375,
-0.00791168212890625,
0.007022857666015625,
-0.050079345703125,
-0.0158538818359375,
0.0048370361328125,
0.02783203125,
-0.002605438232421875,
-0.01348876953125,
-0.0181427001953125,
-0.0039520263671875,
0.07171630859375,
-0.04071044921875,
-0.0247955322265625,
0.01354217529296875,
0.009368896484375,
0.06878662109375,
0.06439208984375,
0.01148223876953125,
0.0025177001953125,
0.0188446044921875,
0.0301666259765625,
0.06622314453125,
-0.042236328125,
-0.037353515625,
0.0234527587890625,
-0.003025054931640625,
-0.03460693359375,
-0.034515380859375,
-0.055450439453125,
-0.00679779052734375,
0.056396484375,
-0.0826416015625,
0.01007080078125,
0.0289306640625,
0.03411865234375,
-0.0156707763671875,
0.00315093994140625,
-0.065673828125,
-0.0186614990234375,
-0.041900634765625,
-0.029144287109375,
0.043792724609375,
0.07757568359375,
0.039093017578125,
0.01207733154296875,
-0.0016889572143554688,
-0.0200042724609375,
-0.020172119140625,
0.0184783935546875,
0.0026187896728515625,
0.03656005859375,
-0.0584716796875,
-0.0251312255859375,
0.003326416015625,
0.052642822265625,
0.0229949951171875,
0.033905029296875,
0.0606689453125,
0.051910400390625,
-0.006916046142578125,
-0.00641632080078125,
0.0239410400390625,
-0.0266265869140625,
-0.020416259765625,
-0.018829345703125,
0.0137786865234375,
0.01506805419921875,
0.0000584721565246582,
-0.005466461181640625,
0.0338134765625,
0.03204345703125,
-0.0166168212890625,
0.042388916015625,
0.005584716796875,
-0.0081634521484375,
0.021331787109375,
-0.006565093994140625,
0.05029296875,
0.01380157470703125,
-0.03387451171875,
-0.0084686279296875,
-0.033721923828125,
0.0267791748046875,
-0.0100250244140625,
0.00975799560546875,
-0.00675201416015625,
0.045196533203125,
0.005191802978515625,
0.00396728515625,
0.035125732421875,
-0.028106689453125,
0.0035381317138671875,
0.0194854736328125,
0.0179595947265625,
0.003612518310546875,
-0.0418701171875,
-0.0180816650390625,
-0.01126861572265625,
0.0252685546875,
-0.029449462890625,
0.0472412109375,
-0.01535797119140625,
0.004657745361328125,
-0.01708984375,
0.034210205078125,
-0.039886474609375,
-0.031005859375,
0.019927978515625,
-0.00896453857421875,
0.0242767333984375,
0.0085906982421875,
-0.0007176399230957031,
-0.01422119140625,
0.0311737060546875,
-0.04327392578125,
-0.0093841552734375,
-0.038330078125,
0.03314208984375,
-0.0081634521484375,
-0.02130126953125,
-0.028411865234375,
-0.044891357421875,
-0.057952880859375,
0.007465362548828125,
0.0261688232421875,
0.041351318359375,
-0.02838134765625,
0.0036830902099609375,
-0.006519317626953125,
-0.037689208984375,
0.022186279296875,
-0.0201263427734375,
0.043609619140625,
0.033599853515625,
-0.036529541015625,
0.02764892578125,
-0.02191162109375,
-0.024505615234375,
0.0311126708984375,
0.0086669921875,
-0.024017333984375,
0.00047278404235839844,
0.041229248046875,
0.0274200439453125,
0.039276123046875,
0.027587890625,
-0.062164306640625,
0.00327301025390625,
0.09381103515625,
-0.0118255615234375,
0.00188446044921875,
0.0091705322265625,
-0.012542724609375,
-0.060089111328125,
-0.0137786865234375,
-0.01971435546875,
-0.037445068359375,
-0.047637939453125,
0.01020050048828125,
0.0035858154296875,
0.017822265625,
-0.01708984375,
-0.01474761962890625,
0.01922607421875,
-0.036834716796875,
0.0196990966796875,
-0.028472900390625,
0.014404296875,
0.00836181640625,
0.0474853515625,
-0.037841796875,
0.0208892822265625,
0.00621795654296875,
-0.02191162109375,
0.00925445556640625,
0.0225982666015625,
0.0310821533203125,
-0.039581298828125,
-0.00957489013671875,
0.008636474609375,
0.039520263671875,
0.0188140869140625,
0.0662841796875,
-0.01195526123046875,
-0.0269622802734375,
0.02093505859375,
-0.004863739013671875,
-0.051666259765625,
0.01861572265625,
-0.043548583984375,
-0.0234527587890625,
-0.042724609375,
0.004169464111328125,
0.0195770263671875,
-0.0280609130859375,
-0.04083251953125,
0.067626953125,
-0.0178985595703125,
-0.01177215576171875,
-0.01068115234375,
-0.0099945068359375,
-0.017578125,
0.06427001953125,
0.0118865966796875,
-0.0254364013671875,
-0.00910186767578125,
0.0261688232421875,
0.012847900390625,
-0.045166015625,
0.0665283203125,
-0.022796630859375,
-0.07086181640625,
-0.02850341796875,
-0.035400390625,
-0.0225677490234375,
-0.03314208984375,
0.0268707275390625,
-0.036956787109375,
-0.006999969482421875,
-0.04388427734375,
-0.032684326171875,
-0.00685882568359375,
0.0265655517578125,
0.0201568603515625,
-0.049896240234375,
-0.04217529296875,
-0.028564453125,
0.08868408203125,
0.0030536651611328125,
0.0270843505859375,
-0.0230865478515625,
-0.0227508544921875,
-0.0292205810546875,
-0.050567626953125,
-0.02679443359375,
0.033477783203125,
-0.09014892578125,
-0.014068603515625,
0.0013513565063476562,
-0.01055908203125,
0.024322509765625,
-0.020660400390625,
-0.0264739990234375,
0.0010318756103515625,
-0.00643157958984375,
-0.0006070137023925781,
-0.058685302734375,
-0.026275634765625,
0.03472900390625,
-0.018798828125,
0.0015382766723632812,
-0.005962371826171875,
0.0199432373046875,
0.01497650146484375,
0.02508544921875,
-0.0241241455078125,
-0.0191650390625,
-0.02691650390625,
-0.0003063678741455078,
-0.01259613037109375,
0.0167694091796875,
-0.00384521484375,
-0.00222015380859375,
-0.03826904296875,
-0.0029811859130859375,
0.00943756103515625,
-0.0018978118896484375,
0.01910400390625,
-0.020904541015625,
0.0203704833984375,
-0.0004394054412841797,
-0.0296630859375,
0.071044921875,
-0.0003566741943359375,
0.0227508544921875,
0.0214996337890625,
-0.0022449493408203125,
0.0789794921875,
-0.0244140625,
-0.00281524658203125,
-0.0026454925537109375,
-0.004619598388671875,
-0.054656982421875,
0.0225830078125,
-0.035888671875,
0.01033782958984375,
0.035369873046875
] |
102d8f7c4d1eafbbd2d80f37650f4844dbb80ad5
|
Wordpress Stackexchange
Q: Wordpress redirect to landing page if not logged in I'm using the following code in my functions.php file to redirect users who are not logged in to a particular landing page
<?php
if(!is_user_logged_in()) {
wp_redirect( 'http://www.mysite.com/landingpage', 301 ); exit;
}
The problem is I cannot access my wp-login or wp-admin anymore. Every url redirects to landingpage. Is there a way I can exclude certain urls from redirecting?
A: something like:
if (
!in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'))
&& !is_admin()
&& !is_user_logged_in()
) {
wp_redirect('http://www.mysite.com/landingpage', 301);
exit;
}
should do it.
see http://codex.wordpress.org/Function_Reference/is_admin &
Check if wp-login is current page
|
Q: Wordpress redirect to landing page if not logged in I'm using the following code in my functions.php file to redirect users who are not logged in to a particular landing page
<?php
if(!is_user_logged_in()) {
wp_redirect( 'http://www.mysite.com/landingpage', 301 ); exit;
}
The problem is I cannot access my wp-login or wp-admin anymore. Every url redirects to landingpage. Is there a way I can exclude certain urls from redirecting?
A: something like:
if (
!in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'))
&& !is_admin()
&& !is_user_logged_in()
) {
wp_redirect('http://www.mysite.com/landingpage', 301);
exit;
}
should do it.
see http://codex.wordpress.org/Function_Reference/is_admin &
Check if wp-login is current page
A: <?php
if($_SERVER['REQUEST_URI'] != '.../' || $_SERVER['REQUEST_URI'] != '.../'){
if(!is_user_logged_in()) {
wp_redirect( 'http://www.mysite.com/landingpage', 301 ); exit;
}
}
This basically tests to see if you are on a specific page, before executing the redirect, if the first statement returns true, and the user is not logged in it will redirect.
|
wordpress
|
{
"language": "en",
"length": 148,
"provenance": "stackexchange_00019.jsonl.gz:421268",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56681"
}
|
[
0.0689697265625,
0.0231170654296875,
-0.0027294158935546875,
-0.01318359375,
0.03204345703125,
-0.049163818359375,
0.067138671875,
-0.03302001953125,
-0.023406982421875,
-0.00473785400390625,
-0.028656005859375,
0.0278472900390625,
-0.0709228515625,
-0.004467010498046875,
0.0179595947265625,
-0.04486083984375,
0.00374603271484375,
-0.000873565673828125,
0.0396728515625,
-0.0273590087890625,
0.01398468017578125,
-0.0196380615234375,
0.051361083984375,
0.0014438629150390625,
-0.002330780029296875,
-0.016998291015625,
0.0980224609375,
-0.037200927734375,
0.01454925537109375,
-0.032073974609375,
0.01532745361328125,
-0.0247955322265625,
0.0011930465698242188,
0.041717529296875,
-0.016845703125,
-0.050201416015625,
-0.021392822265625,
0.028564453125,
0.023895263671875,
-0.00274658203125,
0.01377105712890625,
-0.00701141357421875,
-0.00893402099609375,
0.003734588623046875,
-0.0208587646484375,
-0.033172607421875,
0.015716552734375,
-0.0057373046875,
0.0183258056640625,
0.005435943603515625,
0.017974853515625,
0.0210113525390625,
0.030914306640625,
-0.005542755126953125,
-0.027069091796875,
0.003719329833984375,
-0.01129150390625,
0.01528167724609375,
0.039520263671875,
-0.01506805419921875,
-0.02587890625,
-0.0170745849609375,
0.01477813720703125,
-0.024871826171875,
-0.021575927734375,
-0.006198883056640625,
-0.05645751953125,
0.0217742919921875,
-0.0300750732421875,
-0.038177490234375,
0.006351470947265625,
-0.0253448486328125,
-0.01206207275390625,
0.01522064208984375,
-0.037567138671875,
-0.049407958984375,
0.043609619140625,
-0.0298004150390625,
-0.0012607574462890625,
0.0270843505859375,
-0.017730712890625,
0.037078857421875,
-0.019195556640625,
-0.040802001953125,
0.033843994140625,
0.0164947509765625,
-0.02203369140625,
-0.03106689453125,
-0.03515625,
-0.020172119140625,
-0.0290069580078125,
0.0196533203125,
-0.0242919921875,
-0.0222015380859375,
-0.035980224609375,
-0.021087646484375,
0.0278167724609375,
0.05438232421875,
0.016815185546875,
-0.012725830078125,
-0.009307861328125,
-0.038726806640625,
-0.0186309814453125,
-0.0224456787109375,
0.01168060302734375,
0.0887451171875,
0.0103912353515625,
0.0157623291015625,
0.0160675048828125,
-0.012420654296875,
0.036834716796875,
-0.0094146728515625,
-0.0268096923828125,
-0.025665283203125,
-0.01515960693359375,
0.0594482421875,
-0.0177154541015625,
-0.00679779052734375,
-0.01535797119140625,
0.0312042236328125,
-0.0261077880859375,
-0.01056671142578125,
0.0312347412109375,
-0.0157470703125,
0.0270843505859375,
0.01248931884765625,
-0.020904541015625,
-0.0298309326171875,
0.00823974609375,
0.040374755859375,
-0.0212249755859375,
0.004093170166015625,
0.002452850341796875,
-0.02874755859375,
-0.033233642578125,
-0.0264434814453125,
0.048065185546875,
-0.01183319091796875,
0.0015020370483398438,
0.01245880126953125,
0.0247039794921875,
-0.057769775390625,
-0.047271728515625,
0.00945281982421875,
0.03533935546875,
0.031768798828125,
0.01230621337890625,
0.01505279541015625,
-0.0067596435546875,
-0.04107666015625,
0.0302581787109375,
-0.043487548828125,
-0.00499725341796875,
0.0174560546875,
0.0528564453125,
0.00455474853515625,
0.032958984375,
-0.0012807846069335938,
-0.0127410888671875,
0.01088714599609375,
0.040771484375,
0.004344940185546875,
0.00847625732421875,
-0.00860595703125,
-0.046173095703125,
-0.008148193359375,
-0.059478759765625,
-0.0163726806640625,
0.0298309326171875,
0.0244903564453125,
0.0308685302734375,
-0.053924560546875,
0.0231781005859375,
0.0123138427734375,
-0.00803375244140625,
0.007904052734375,
0.001865386962890625,
0.049346923828125,
0.00621795654296875,
0.04443359375,
0.034271240234375,
-0.00841522216796875,
0.057525634765625,
-0.00568389892578125,
-0.033203125,
0.041656494140625,
-0.01120758056640625,
0.008392333984375,
-0.00183868408203125,
-0.0119171142578125,
0.029327392578125,
0.052154541015625,
-0.022613525390625,
0.01497650146484375,
-0.0166473388671875,
-0.0259857177734375,
-0.0179443359375,
-0.00914764404296875,
-0.0283966064453125,
0.00766754150390625,
0.02264404296875,
0.01245880126953125,
-0.037078857421875,
0.00887298583984375,
-0.0176544189453125,
-0.0120697021484375,
0.00789642333984375,
0.00640869140625,
0.021636962890625,
0.0139923095703125,
-0.0025157928466796875,
0.0024890899658203125,
-0.02398681640625,
-0.0177154541015625,
-0.032135009765625,
-0.007633209228515625,
-0.00846099853515625,
0.049072265625,
0.008392333984375,
0.0350341796875,
0.0239105224609375,
-0.03643798828125,
0.01220703125,
-0.031951904296875,
0.038238525390625,
0.002147674560546875,
-0.019683837890625,
-0.0221405029296875,
0.03717041015625,
-0.00458526611328125,
-0.00418853759765625,
0.043975830078125,
0.0247650146484375,
0.01213836669921875,
-0.058380126953125,
-0.0206146240234375,
-0.0268707275390625,
-0.0202484130859375,
0.00514984130859375,
0.053436279296875,
0.04241943359375,
0.036041259765625,
-0.0107574462890625,
-0.00075531005859375,
0.049102783203125,
-0.06671142578125,
-0.00922393798828125,
0.00370025634765625,
0.032501220703125,
0.065185546875,
0.0025768280029296875,
-0.00826263427734375,
0.01146697998046875,
-0.022064208984375,
0.0166168212890625,
0.0379638671875,
-0.0018091201782226562,
-0.02703857421875,
0.00611114501953125,
-0.011749267578125,
0.01396942138671875,
-0.059295654296875,
-0.045684814453125,
-0.00885009765625,
-0.031646728515625,
-0.0439453125,
-0.032958984375,
-0.035430908203125,
-0.0243682861328125,
-0.059173583984375,
0.053619384765625,
0.0009474754333496094,
0.00543212890625,
0.035308837890625,
0.03759765625,
-0.033203125,
-0.04656982421875,
-0.00769805908203125,
0.042755126953125,
0.004058837890625,
-0.03961181640625,
-0.00554656982421875,
-0.0136566162109375,
-0.01141357421875,
0.0010423660278320312,
-0.02838134765625,
0.018829345703125,
0.0005059242248535156,
0.0276336669921875,
-0.003650665283203125,
0.037017822265625,
0.002838134765625,
-0.0216217041015625,
0.041656494140625,
-0.004222869873046875,
-0.047821044921875,
0.0007405281066894531,
-0.04437255859375,
0.054168701171875,
-0.046875,
0.030029296875,
0.06396484375,
-0.00933074951171875,
0.0224151611328125,
-0.0181732177734375,
0.00965118408203125,
-0.01369476318359375,
-0.0218505859375,
-0.025054931640625,
-0.0256805419921875,
-0.0182342529296875,
0.029052734375,
0.0257110595703125,
0.04180908203125,
-0.01171112060546875,
-0.037139892578125,
-0.00821685791015625,
0.007083892822265625,
-0.06146240234375,
-0.073974609375,
-0.059844970703125,
-0.060638427734375,
0.034912109375,
0.0036067962646484375,
-0.014312744140625,
0.0009665489196777344,
0.042144775390625,
0.0182647705078125,
-0.001316070556640625,
-0.02001953125,
-0.053314208984375,
-0.037841796875,
-0.055908203125,
0.01861572265625,
-0.0201873779296875,
0.005352020263671875,
-0.0008034706115722656,
0.016357421875,
-0.00772857666015625,
-0.0253448486328125,
-0.00701904296875,
0.041046142578125,
-0.0010967254638671875,
-0.0246124267578125,
-0.0672607421875,
0.0282135009765625,
0.0017480850219726562,
0.00789642333984375,
0.03424072265625,
-0.03399658203125,
0.048675537109375,
-0.01320648193359375,
0.0018758773803710938,
-0.05413818359375,
0.0047760009765625,
-0.0445556640625,
-0.0163726806640625,
-0.042938232421875,
-0.0134429931640625,
-0.0693359375,
-0.0021152496337890625,
-0.0197296142578125,
-0.055816650390625,
0.024688720703125,
0.037750244140625,
-0.02349853515625,
0.02777099609375,
-0.04376220703125,
0.039520263671875,
0.005741119384765625,
-0.03424072265625,
0.008697509765625,
0.0192108154296875,
0.006458282470703125,
0.0335693359375,
-0.005809783935546875,
0.037841796875,
-0.0240631103515625,
-0.0206298828125,
-0.001247406005859375,
-0.01438140869140625,
-0.016998291015625,
-0.01448822021484375,
-0.044464111328125,
-0.051483154296875,
0.037078857421875,
-0.018463134765625,
0.011260986328125,
-0.0166168212890625,
-0.01788330078125,
0.0091400146484375,
0.10174560546875,
-0.00995635986328125,
0.0013427734375,
-0.007228851318359375,
-0.0003838539123535156,
-0.0190277099609375,
-0.03460693359375,
-0.06976318359375,
0.004878997802734375,
-0.09454345703125,
0.0027923583984375,
-0.002658843994140625,
-0.0201568603515625,
-0.00732421875,
0.00629425048828125,
-0.052581787109375,
-0.048431396484375,
0.00018453598022460938,
0.03631591796875,
0.017822265625,
0.0101470947265625,
-0.0093841552734375,
0.0126800537109375,
0.032623291015625,
-0.033477783203125,
-0.02783203125,
-0.002063751220703125,
-0.02423095703125,
0.055816650390625,
0.044921875,
-0.0119781494140625,
-0.0065155029296875,
0.029022216796875,
-0.00147247314453125,
-0.005634307861328125,
0.023468017578125,
0.00040602684020996094,
0.01300048828125,
0.0269317626953125,
-0.0003292560577392578,
0.006687164306640625,
0.013519287109375,
-0.003814697265625,
-0.024383544921875,
-0.005756378173828125,
-0.04864501953125,
-0.0335693359375,
0.01416778564453125,
-0.037078857421875,
-0.038665771484375,
-0.012664794921875,
0.0280609130859375,
0.0311737060546875,
0.01409912109375,
-0.0050201416015625,
-0.00580596923828125,
-0.036895751953125,
0.05804443359375,
-0.0027751922607421875,
-0.0159759521484375,
0.0005154609680175781,
0.06280517578125,
0.009033203125,
-0.0283050537109375,
0.0036258697509765625,
0.0132598876953125,
0.038299560546875,
-0.022857666015625,
0.054229736328125,
0.01361083984375,
-0.03253173828125,
0.09136962890625,
0.005641937255859375,
-0.00937652587890625,
0.00968170166015625,
0.047821044921875,
-0.0133209228515625,
-0.04473876953125,
0.03851318359375,
-0.034881591796875,
-0.01419830322265625,
0.031646728515625,
0.0216827392578125,
-0.0295257568359375,
0.0223846435546875,
0.0198516845703125,
-0.014556884765625,
0.003490447998046875,
-0.00357818603515625,
-0.0238800048828125,
-0.022552490234375,
0.05560302734375,
0.0116729736328125,
0.06317138671875,
-0.017791748046875,
0.01137542724609375,
0.0295257568359375,
-0.041473388671875,
-0.01727294921875,
-0.026763916015625,
0.01393890380859375,
-0.01554107666015625,
0.0022754669189453125,
-0.031768798828125,
-0.006168365478515625,
-0.0137786865234375,
0.07440185546875,
0.0223236083984375,
-0.0357666015625,
0.048583984375,
-0.03558349609375,
-0.0277252197265625,
0.03314208984375,
0.01190185546875,
0.05145263671875,
0.0017261505126953125,
-0.0276031494140625,
-0.01416778564453125,
-0.00946044921875,
-0.02423095703125,
-0.05718994140625,
-0.01393890380859375,
-0.0377197265625,
0.0194549560546875,
0.018310546875,
0.0850830078125,
0.0152587890625,
0.06439208984375,
-0.027435302734375,
0.01097869873046875,
0.01500701904296875,
0.032440185546875,
0.0166015625,
-0.0020389556884765625,
-0.00183868408203125,
0.006999969482421875,
0.027557373046875,
-0.04473876953125,
-0.015289306640625,
0.00992584228515625,
0.057098388671875,
-0.0117340087890625,
-0.0254974365234375,
0.032745361328125,
-0.01727294921875,
0.002872467041015625,
0.05657958984375,
-0.000759124755859375,
-0.08538818359375,
-0.0418701171875,
0.01552581787109375,
0.0460205078125,
-0.0469970703125,
-0.01213836669921875,
-0.00033092498779296875,
-0.037872314453125,
-0.01015472412109375,
0.018890380859375,
-0.04644775390625,
-0.0151824951171875,
-0.00571441650390625,
-0.0142822265625,
-0.04119873046875,
-0.0184326171875,
-0.005649566650390625,
0.02984619140625,
-0.039886474609375,
-0.005405426025390625,
0.040802001953125,
-0.0263214111328125,
0.0073699951171875,
-0.01132965087890625,
-0.01128387451171875,
0.006732940673828125,
-0.0036945343017578125,
0.06805419921875,
0.020904541015625,
-0.023834228515625,
-0.0076904296875,
-0.041259765625,
-0.0179290771484375,
0.0150604248046875,
-0.0222625732421875,
-0.0166168212890625,
-0.0195770263671875,
0.049835205078125,
0.0308990478515625,
0.00998687744140625,
-0.052520751953125,
-0.03814697265625,
-0.006351470947265625,
0.039703369140625,
0.03533935546875,
-0.017730712890625,
0.06640625,
0.0139923095703125,
0.02142333984375,
0.0167694091796875,
0.05914306640625,
0.00628662109375,
-0.0177459716796875,
0.0255279541015625,
0.0018396377563476562,
-0.020416259765625,
-0.034210205078125,
0.004444122314453125,
-0.0144805908203125,
0.05548095703125,
-0.00838470458984375,
-0.01739501953125,
0.018524169921875,
0.0018529891967773438,
-0.0176544189453125,
0.02435302734375,
0.041595458984375,
-0.00836181640625,
-0.0035610198974609375,
0.0282135009765625,
0.0306549072265625,
-0.03106689453125,
-0.0009303092956542969,
-0.03704833984375,
0.029815673828125,
-0.007671356201171875,
-0.01012420654296875,
-0.039093017578125,
0.0362548828125,
0.08056640625,
0.0008749961853027344,
0.06219482421875,
0.025543212890625,
0.0193328857421875,
0.07177734375,
-0.0018825531005859375,
0.00203704833984375,
0.01380157470703125,
0.060638427734375,
0.002788543701171875,
-0.00659942626953125,
0.03656005859375,
-0.02215576171875,
-0.00045418739318847656,
0.11737060546875,
0.06231689453125,
-0.161865234375,
0.014617919921875,
0.01105499267578125,
0.032501220703125,
0.0316162109375,
-0.0159912109375,
0.017364501953125,
0.0025806427001953125,
0.030029296875,
-0.019500732421875,
-0.031951904296875,
-0.009979248046875,
-0.01303863525390625,
-0.0245513916015625,
-0.0164642333984375,
0.020721435546875,
0.0126495361328125,
-0.0391845703125,
-0.001125335693359375,
0.0286407470703125,
-0.00986480712890625,
-0.00852203369140625,
0.005451202392578125,
0.021453857421875,
-0.024658203125,
-0.06378173828125,
0.01085662841796875,
-0.01195526123046875,
-0.02642822265625,
-0.00089263916015625,
0.007205963134765625,
0.0498046875,
0.0472412109375,
0.00567626953125,
-0.00951385498046875,
0.0149688720703125,
-0.002498626708984375,
0.0167236328125,
-0.01947021484375,
0.008819580078125,
-0.03753662109375,
-0.028961181640625,
0.007091522216796875,
-0.0300140380859375,
-0.04132080078125,
-0.01186370849609375,
-0.048828125,
0.0635986328125,
-0.01837158203125,
-0.016693115234375,
0.00955963134765625,
0.0318603515625,
-0.00785064697265625,
-0.020965576171875,
0.0594482421875,
-0.0653076171875,
-0.031829833984375,
0.0014047622680664062,
-0.025054931640625,
-0.030364990234375,
-0.04522705078125,
-0.038909912109375,
0.06732177734375,
0.00470733642578125,
0.0244140625,
0.0270843505859375,
0.02728271484375,
-0.008636474609375,
0.023834228515625,
-0.04058837890625,
0.06158447265625,
0.057098388671875,
0.040771484375,
-0.01226806640625,
0.003246307373046875,
0.0191802978515625,
-0.00188446044921875,
0.0421142578125,
0.0311431884765625,
-0.053680419921875,
-0.0054473876953125,
0.01380157470703125,
0.0560302734375,
0.0193634033203125,
0.04034423828125,
-0.0100555419921875,
0.00319671630859375,
0.02447509765625,
-0.045257568359375,
0.0129547119140625,
-0.00200653076171875,
-0.0228424072265625,
0.0065460205078125,
-0.0018405914306640625,
-0.03277587890625,
-0.017608642578125,
-0.007701873779296875,
-0.0809326171875,
0.01300048828125,
0.033355712890625,
0.04705810546875,
-0.009857177734375,
0.013214111328125,
-0.0174407958984375,
-0.03424072265625,
0.021209716796875,
-0.042694091796875,
0.0191497802734375,
-0.0223236083984375,
-0.00479888916015625,
0.017059326171875,
0.0150909423828125,
-0.0031833648681640625,
-0.029815673828125,
-0.0184326171875,
0.01224517822265625,
-0.019561767578125,
0.050628662109375,
0.0374755859375,
0.0208282470703125,
-0.01316070556640625,
0.018157958984375,
0.039398193359375,
0.05499267578125,
-0.04364013671875,
-0.005794525146484375,
-0.01522064208984375,
0.00688934326171875,
0.053070068359375,
0.002178192138671875,
0.0872802734375,
-0.00799560546875,
-0.02349853515625,
0.005344390869140625,
-0.0192718505859375,
0.01496124267578125,
0.0034942626953125,
0.0093231201171875,
-0.0037670135498046875,
-0.002964019775390625,
0.006366729736328125,
0.00591278076171875,
-0.03631591796875,
0.0135498046875,
0.032623291015625,
0.0200653076171875,
-0.001392364501953125,
-0.00574493408203125,
-0.007659912109375,
-0.008758544921875,
0.0137481689453125,
-0.018829345703125,
0.01522064208984375,
-0.039031982421875,
-0.04229736328125,
0.0145111083984375,
0.035430908203125,
-0.004024505615234375,
-0.0202484130859375,
-0.01090240478515625,
0.0224609375,
0.00637054443359375,
-0.019500732421875,
0.022369384765625,
-0.00952911376953125,
-0.0159454345703125,
-0.0234375,
-0.0159454345703125,
0.0093231201171875,
-0.00809478759765625,
-0.0022830963134765625,
0.01282501220703125,
0.01125335693359375,
-0.0171356201171875,
0.03265380859375,
0.00621795654296875,
-0.0274658203125,
-0.004741668701171875,
-0.0230560302734375,
0.06744384765625,
0.01385498046875,
-0.08758544921875,
-0.0247344970703125,
-0.0167236328125,
-0.00685882568359375,
0.0244293212890625,
0.0258026123046875,
-0.0174713134765625,
0.025390625,
0.011138916015625,
0.0170135498046875,
0.0173187255859375,
-0.0242767333984375,
-0.005001068115234375,
-0.0298309326171875,
0.037506103515625,
-0.0045318603515625,
-0.044830322265625,
-0.0005283355712890625,
-0.022247314453125,
-0.0014820098876953125,
0.006870269775390625,
0.062347412109375,
0.0008778572082519531,
0.01068115234375,
-0.0203399658203125,
0.0010728836059570312,
-0.0269775390625,
-0.0283660888671875,
0.024200439453125,
-0.0143585205078125,
-0.028045654296875,
0.0048065185546875,
-0.057647705078125,
0.08404541015625,
-0.0291595458984375,
0.038421630859375,
0.065185546875,
-0.040496826171875,
-0.006359100341796875,
0.016021728515625,
-0.0037899017333984375,
-0.0246124267578125,
-0.07177734375,
-0.038543701171875,
0.03936767578125,
-0.00592803955078125,
0.01186370849609375,
-0.039703369140625,
0.050628662109375,
-0.043792724609375,
-0.047149658203125,
-0.0041351318359375,
-0.06201171875,
-0.04486083984375,
0.0231170654296875,
0.03955078125,
0.00728607177734375,
-0.0091705322265625,
-0.0199737548828125,
0.00846099853515625,
-0.004390716552734375,
-0.0201263427734375,
-0.0006847381591796875,
-0.01132965087890625,
-0.0022258758544921875,
0.011199951171875,
0.006610870361328125,
-0.021942138671875,
-0.0157470703125,
0.0195159912109375,
-0.036102294921875,
0.003021240234375,
-0.0628662109375,
-0.046234130859375,
-0.048553466796875,
-0.002460479736328125,
0.03131103515625,
-0.0071563720703125,
-0.03460693359375,
-0.04290771484375,
0.0084686279296875,
-0.0027923583984375,
-0.02545166015625,
-0.026885986328125,
0.0073394775390625,
-0.022186279296875,
0.048095703125,
-0.05584716796875,
0.022369384765625,
0.00592041015625,
0.0423583984375,
-0.037384033203125,
0.02606201171875,
-0.0228424072265625,
-0.0179595947265625,
-0.008941650390625,
-0.0195159912109375,
0.0318603515625,
0.0088043212890625,
-0.0153656005859375,
-0.05743408203125,
-0.054290771484375,
-0.003387451171875,
-0.04083251953125,
-0.019927978515625,
0.0026798248291015625,
0.012786865234375,
0.004302978515625,
0.00815582275390625,
-0.0004363059997558594,
0.046600341796875,
-0.012664794921875,
0.0028095245361328125,
-0.01177215576171875,
-0.00566864013671875,
-0.043853759765625,
-0.08404541015625,
0.072265625,
-0.0115966796875,
-0.040771484375,
-0.0286865234375,
0.0408935546875,
0.01128387451171875,
-0.049102783203125,
-0.0125579833984375,
-0.032684326171875,
0.001251220703125,
0.016998291015625,
0.0252227783203125,
-0.00714874267578125,
0.0162200927734375,
0.04241943359375,
-0.0275421142578125,
0.03717041015625,
0.0227508544921875,
0.006137847900390625,
-0.0009508132934570312,
0.0165252685546875,
0.022674560546875,
0.05523681640625,
-0.006404876708984375,
0.0550537109375,
-0.0102691650390625,
-0.0174407958984375,
0.017303466796875,
-0.044097900390625,
-0.006237030029296875,
-0.0283355712890625,
0.0019445419311523438,
-0.00881195068359375,
-0.00118255615234375,
0.0022068023681640625,
-0.0714111328125,
-0.0263519287109375,
-0.005329132080078125,
-0.00806427001953125,
0.026153564453125,
-0.07177734375,
0.005542755126953125,
-0.00832366943359375,
-0.013336181640625,
-0.0262908935546875,
0.0229034423828125,
-0.036529541015625,
-0.01256561279296875,
0.006717681884765625,
0.0080718994140625,
-0.035186767578125,
-0.01058197021484375,
0.06585693359375,
-0.044158935546875,
-0.0111236572265625,
0.0010251998901367188,
0.0302886962890625,
0.0194549560546875,
-0.016448974609375,
0.0517578125,
0.04541015625,
-0.0654296875,
-0.01824951171875,
0.0207977294921875,
0.01522064208984375,
-0.03564453125,
-0.053741455078125,
-0.0256805419921875,
0.04730224609375,
0.007106781005859375,
0.07879638671875,
0.005313873291015625,
0.0175933837890625,
0.039093017578125,
-0.0013647079467773438,
0.01995849609375,
0.0094757080078125,
0.0018911361694335938,
0.04559326171875,
0.0204620361328125,
-0.048065185546875,
0.040283203125,
-0.037750244140625,
-0.008880615234375,
-0.0059814453125,
0.049285888671875,
-0.050201416015625,
0.0269317626953125,
-0.03021240234375,
0.037200927734375,
0.0182342529296875
] |
65067167bb5164fee6f4ea756b24867c15c0c9c9
|
Wordpress Stackexchange
Q: Do I use cookies? I have made website in wordpress, and now client wants to know do this website use cookies?
I dont know too much about it becouse i never use it, but i need to be sure. If I make websites i use session, and I quess the same is in wordpress, but as I said, dont know too much about it and client need this information.
I also use PIWIK stats.
Is there a way to check it? I can give you list of plugins I used.
A: Yes, any WordPress site does uses cookies. By default, WordPress uses cookies to verify who the user is, i.e. if the user is logged-in (registered user) or is a commenter on the site. (More Info.)
Plugins and theme's may set cookies. For example, Cookies for Comments plugin uses cookies to prevent comment spam. Cookies have their own purpose.
Check your browser preferences (or in the dialog box when deleting history), you should see an option similar to "Manage Cookies", which shows a list of cookies sent by your website.
BTW, WordPress does not use sessions.
|
Q: Do I use cookies? I have made website in wordpress, and now client wants to know do this website use cookies?
I dont know too much about it becouse i never use it, but i need to be sure. If I make websites i use session, and I quess the same is in wordpress, but as I said, dont know too much about it and client need this information.
I also use PIWIK stats.
Is there a way to check it? I can give you list of plugins I used.
A: Yes, any WordPress site does uses cookies. By default, WordPress uses cookies to verify who the user is, i.e. if the user is logged-in (registered user) or is a commenter on the site. (More Info.)
Plugins and theme's may set cookies. For example, Cookies for Comments plugin uses cookies to prevent comment spam. Cookies have their own purpose.
Check your browser preferences (or in the dialog box when deleting history), you should see an option similar to "Manage Cookies", which shows a list of cookies sent by your website.
BTW, WordPress does not use sessions.
|
wordpress
|
{
"language": "en",
"length": 187,
"provenance": "stackexchange_00019.jsonl.gz:421269",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56686"
}
|
[
0.03717041015625,
0.0088958740234375,
0.001129150390625,
0.024627685546875,
0.0213623046875,
-0.031768798828125,
0.0543212890625,
-0.057098388671875,
0.0031528472900390625,
-0.020416259765625,
-0.061767578125,
0.018707275390625,
-0.047637939453125,
-0.0313720703125,
0.025665283203125,
-0.06341552734375,
0.013763427734375,
-0.0204925537109375,
0.01500701904296875,
-0.023193359375,
0.03179931640625,
-0.0178375244140625,
0.0270538330078125,
0.0113372802734375,
0.0574951171875,
-0.03607177734375,
0.0341796875,
0.004634857177734375,
0.03289794921875,
0.0006222724914550781,
0.03472900390625,
-0.045013427734375,
-0.00921630859375,
0.042724609375,
-0.00945281982421875,
0.00464630126953125,
-0.0041351318359375,
0.0367431640625,
0.0184783935546875,
0.03460693359375,
0.01105499267578125,
0.00472259521484375,
0.0261383056640625,
-0.00696563720703125,
-0.002288818359375,
-0.035888671875,
0.0251617431640625,
-0.033905029296875,
0.02545166015625,
0.00592803955078125,
0.0263824462890625,
0.0249481201171875,
0.04388427734375,
0.0128936767578125,
-0.0242767333984375,
-0.007724761962890625,
0.06353759765625,
0.01161956787109375,
0.043243408203125,
-0.12548828125,
-0.07476806640625,
0.004016876220703125,
0.04852294921875,
0.05242919921875,
0.01493072509765625,
-0.0021572113037109375,
-0.035400390625,
0.0284271240234375,
-0.0654296875,
0.025146484375,
0.055694580078125,
-0.053985595703125,
-0.005474090576171875,
-0.0133514404296875,
-0.02459716796875,
-0.014495849609375,
0.01366424560546875,
-0.027191162109375,
-0.0028514862060546875,
0.0207672119140625,
0.005611419677734375,
0.007843017578125,
-0.03045654296875,
-0.0267181396484375,
0.04345703125,
0.044464111328125,
-0.01275634765625,
-0.03521728515625,
-0.00951385498046875,
-0.01058197021484375,
-0.0218353271484375,
-0.031768798828125,
0.0198822021484375,
0.00997161865234375,
-0.041412353515625,
0.005626678466796875,
0.007720947265625,
0.02984619140625,
-0.005123138427734375,
-0.0240936279296875,
-0.0181427001953125,
-0.0120086669921875,
-0.03179931640625,
-0.00887298583984375,
0.005786895751953125,
0.042449951171875,
0.01983642578125,
0.005046844482421875,
0.0113372802734375,
0.005306243896484375,
-0.010467529296875,
-0.0091552734375,
-0.0176849365234375,
-0.057861328125,
-0.00882720947265625,
0.0259552001953125,
-0.0299530029296875,
0.02410888671875,
0.025634765625,
-0.006015777587890625,
-0.00711822509765625,
-0.000782012939453125,
-0.000022590160369873047,
0.00458526611328125,
0.004657745361328125,
-0.0178680419921875,
-0.01383209228515625,
0.0081787109375,
-0.0499267578125,
0.044586181640625,
-0.006061553955078125,
0.0154571533203125,
0.002777099609375,
0.01442718505859375,
-0.0296478271484375,
-0.01519012451171875,
0.039031982421875,
-0.0291595458984375,
0.0029239654541015625,
0.0095672607421875,
-0.0186004638671875,
-0.03955078125,
-0.004558563232421875,
-0.02978515625,
0.0249481201171875,
-0.0117034912109375,
0.0205078125,
0.044830322265625,
0.00272369384765625,
-0.0160675048828125,
0.0295867919921875,
0.0276031494140625,
0.0100860595703125,
-0.0016632080078125,
0.0230865478515625,
0.020843505859375,
-0.029296875,
0.00910186767578125,
-0.0027713775634765625,
0.03887939453125,
-0.0218505859375,
-0.0119171142578125,
0.0227203369140625,
-0.01361846923828125,
-0.012115478515625,
0.00962066650390625,
-0.02545166015625,
-0.00189208984375,
0.028350830078125,
0.0181732177734375,
0.03271484375,
-0.049560546875,
0.044158935546875,
0.0218963623046875,
-0.00159454345703125,
0.036102294921875,
-0.0295562744140625,
0.0293426513671875,
0.0341796875,
0.0084686279296875,
0.01303863525390625,
-0.029144287109375,
0.07354736328125,
-0.006256103515625,
-0.0233001708984375,
0.035797119140625,
0.0104827880859375,
0.053955078125,
-0.0174560546875,
0.01390838623046875,
0.007022857666015625,
0.0372314453125,
-0.053375244140625,
0.08062744140625,
0.018218994140625,
-0.048980712890625,
-0.035186767578125,
-0.020965576171875,
-0.00862884521484375,
-0.037689208984375,
0.0276031494140625,
-0.01190948486328125,
0.020782470703125,
-0.03802490234375,
-0.047943115234375,
-0.0020160675048828125,
-0.0212860107421875,
0.0303497314453125,
0.01080322265625,
0.02960205078125,
0.0108795166015625,
0.01214599609375,
-0.0203857421875,
-0.01154327392578125,
-0.01303863525390625,
-0.0244140625,
-0.0102386474609375,
0.08673095703125,
0.0028743743896484375,
0.051239013671875,
-0.0130767822265625,
-0.032958984375,
0.01523590087890625,
-0.0288238525390625,
0.0099639892578125,
-0.021575927734375,
-0.0227813720703125,
-0.0169219970703125,
-0.021331787109375,
0.00238037109375,
-0.04248046875,
0.044281005859375,
0.001194000244140625,
0.042327880859375,
0.0010766983032226562,
-0.0138702392578125,
-0.00717926025390625,
-0.061859130859375,
0.0160369873046875,
0.047027587890625,
0.038330078125,
0.033935546875,
0.01552581787109375,
-0.00347900390625,
0.036956787109375,
-0.056884765625,
0.0167388916015625,
-0.021148681640625,
0.0042877197265625,
0.03216552734375,
0.02947998046875,
-0.033538818359375,
-0.00536346435546875,
-0.04461669921875,
-0.0210113525390625,
-0.002170562744140625,
-0.046844482421875,
-0.01522064208984375,
0.0169830322265625,
-0.00855255126953125,
-0.0013027191162109375,
-0.005771636962890625,
0.0308990478515625,
-0.03125,
-0.022125244140625,
-0.0231170654296875,
-0.007625579833984375,
-0.00817108154296875,
0.005893707275390625,
-0.01218414306640625,
0.02056884765625,
-0.040771484375,
0.0108642578125,
0.058837890625,
0.057159423828125,
0.0128936767578125,
-0.0290374755859375,
-0.0361328125,
0.0200958251953125,
0.051666259765625,
-0.03167724609375,
-0.0254669189453125,
-0.0621337890625,
-0.018585205078125,
-0.0003275871276855469,
-0.021697998046875,
0.0031890869140625,
0.01462554931640625,
0.0274505615234375,
0.00029921531677246094,
0.04052734375,
-0.014129638671875,
-0.0325927734375,
0.04461669921875,
0.0030002593994140625,
-0.046966552734375,
0.00624847412109375,
-0.0230712890625,
0.0216522216796875,
-0.02008056640625,
0.040679931640625,
0.07147216796875,
0.00699615478515625,
0.005931854248046875,
0.0005936622619628906,
0.0233306884765625,
0.005222320556640625,
0.010406494140625,
0.00891876220703125,
0.0029239654541015625,
-0.01224517822265625,
0.04180908203125,
0.00003463029861450195,
0.007610321044921875,
-0.0179443359375,
-0.056396484375,
-0.03936767578125,
-0.0223846435546875,
-0.09197998046875,
-0.05694580078125,
-0.05523681640625,
-0.1044921875,
-0.01206207275390625,
-0.037994384765625,
-0.04400634765625,
0.033477783203125,
-0.022064208984375,
0.0200042724609375,
-0.030059814453125,
-0.0247039794921875,
0.00882720947265625,
-0.051422119140625,
-0.038818359375,
-0.01021575927734375,
0.00971221923828125,
0.01678466796875,
-0.01374053955078125,
0.029998779296875,
-0.025421142578125,
-0.03839111328125,
-0.062286376953125,
0.005828857421875,
-0.0031642913818359375,
-0.06463623046875,
-0.02337646484375,
-0.009979248046875,
0.0046234130859375,
0.005859375,
-0.022308349609375,
-0.0111083984375,
0.020263671875,
-0.0208587646484375,
-0.0188751220703125,
-0.052276611328125,
-0.0148468017578125,
-0.042083740234375,
-0.0165863037109375,
-0.04095458984375,
-0.021240234375,
-0.051422119140625,
-0.01027679443359375,
0.0156402587890625,
-0.037200927734375,
-0.038848876953125,
0.038055419921875,
-0.0333251953125,
-0.006961822509765625,
-0.047454833984375,
0.05487060546875,
0.0180206298828125,
-0.0244140625,
-0.0016164779663085938,
0.0165863037109375,
0.01215362548828125,
0.050384521484375,
-0.01302337646484375,
0.057373046875,
-0.00586700439453125,
0.01036834716796875,
0.02227783203125,
0.005340576171875,
-0.0125885009765625,
0.0207977294921875,
-0.05908203125,
-0.04364013671875,
0.037200927734375,
-0.03363037109375,
-0.0071563720703125,
-0.00481414794921875,
-0.014801025390625,
0.047882080078125,
0.09564208984375,
-0.01467132568359375,
-0.032073974609375,
0.017822265625,
0.00939178466796875,
-0.005252838134765625,
0.0333251953125,
-0.00836181640625,
-0.0313720703125,
-0.019866943359375,
0.026763916015625,
-0.0138702392578125,
0.00754547119140625,
-0.0246734619140625,
0.0267333984375,
0.0070953369140625,
-0.020782470703125,
0.01329803466796875,
-0.03875732421875,
0.0249481201171875,
-0.0210418701171875,
0.01206207275390625,
-0.031341552734375,
0.0227813720703125,
-0.047454833984375,
0.00518798828125,
-0.0063018798828125,
-0.023101806640625,
0.0171356201171875,
0.03985595703125,
-0.04986572265625,
0.006816864013671875,
0.01416778564453125,
-0.031219482421875,
0.03387451171875,
-0.01568603515625,
0.04193115234375,
-0.01849365234375,
-0.0226593017578125,
-0.014984130859375,
-0.0341796875,
0.0245819091796875,
-0.00574493408203125,
-0.016815185546875,
-0.0176544189453125,
-0.05047607421875,
-0.00077056884765625,
-0.01552581787109375,
-0.026702880859375,
0.00011491775512695312,
-0.0204925537109375,
-0.02117919921875,
0.00652313232421875,
-0.00792694091796875,
-0.0121002197265625,
-0.0200042724609375,
-0.00868988037109375,
0.053741455078125,
0.0054779052734375,
-0.017059326171875,
0.005767822265625,
0.09393310546875,
0.00713348388671875,
-0.02874755859375,
-0.058868408203125,
-0.00843048095703125,
0.012451171875,
-0.02044677734375,
0.065673828125,
0.03643798828125,
0.002925872802734375,
0.06829833984375,
-0.00930023193359375,
0.0022430419921875,
-0.0550537109375,
0.08221435546875,
-0.036346435546875,
-0.004329681396484375,
0.0114898681640625,
-0.06219482421875,
0.041290283203125,
0.023223876953125,
0.0193939208984375,
-0.00508880615234375,
0.0233612060546875,
0.01666259765625,
-0.00434112548828125,
-0.0233154296875,
-0.0095672607421875,
-0.01082611083984375,
-0.00617218017578125,
-0.037811279296875,
0.041229248046875,
0.017578125,
0.00018894672393798828,
0.046600341796875,
0.056671142578125,
0.005794525146484375,
-0.01256561279296875,
-0.02252197265625,
-0.01239013671875,
0.0240631103515625,
0.00196075439453125,
0.0048980712890625,
0.0013647079467773438,
-0.015869140625,
0.102783203125,
-0.004009246826171875,
-0.08392333984375,
0.051849365234375,
-0.0244598388671875,
-0.04644775390625,
0.0447998046875,
-0.0007152557373046875,
0.0268402099609375,
0.01458740234375,
-0.0213470458984375,
-0.020660400390625,
0.00745391845703125,
-0.0081939697265625,
-0.04840087890625,
0.0282745361328125,
-0.0152587890625,
0.0057830810546875,
0.0209503173828125,
0.0304107666015625,
-0.015960693359375,
0.0260162353515625,
-0.00795745849609375,
0.038177490234375,
0.0251312255859375,
0.043914794921875,
0.0149078369140625,
-0.01375579833984375,
-0.0214080810546875,
0.028594970703125,
-0.0156097412109375,
-0.027099609375,
-0.03973388671875,
0.01476287841796875,
0.01016998291015625,
0.0034008026123046875,
0.015594482421875,
0.029754638671875,
0.047271728515625,
0.01271820068359375,
-0.0182647705078125,
-0.031463623046875,
-0.0121612548828125,
0.003917694091796875,
0.011810302734375,
0.01088714599609375,
-0.014190673828125,
-0.0050048828125,
0.025909423828125,
-0.004703521728515625,
0.0181732177734375,
0.01041412353515625,
-0.016571044921875,
0.001522064208984375,
0.008056640625,
0.0015249252319335938,
-0.02093505859375,
-0.0224761962890625,
-0.0333251953125,
0.0038967132568359375,
-0.031646728515625,
0.0020236968994140625,
0.06182861328125,
-0.0294036865234375,
0.017578125,
-0.008544921875,
0.002227783203125,
0.02911376953125,
0.0185089111328125,
0.020751953125,
-0.00832366943359375,
-0.0216064453125,
0.003101348876953125,
-0.062255859375,
-0.029754638671875,
-0.0265045166015625,
-0.01280975341796875,
-0.0509033203125,
-0.006381988525390625,
0.005130767822265625,
0.0288848876953125,
-0.0206298828125,
-0.0160980224609375,
0.00342559814453125,
0.0117950439453125,
0.00774383544921875,
0.0322265625,
-0.01514434814453125,
0.05340576171875,
0.011260986328125,
0.010833740234375,
0.002307891845703125,
-0.0006170272827148438,
-0.030548095703125,
0.00228118896484375,
0.0173187255859375,
0.016845703125,
-0.053497314453125,
-0.01444244384765625,
-0.041717529296875,
-0.00787353515625,
0.08154296875,
-0.0254669189453125,
0.0019550323486328125,
-0.00839996337890625,
0.01055145263671875,
-0.0104827880859375,
0.03070068359375,
0.01055908203125,
-0.0082855224609375,
0.0186614990234375,
0.01959228515625,
0.0214385986328125,
-0.0242919921875,
-0.034088134765625,
0.02557373046875,
0.018707275390625,
0.028228759765625,
-0.0305938720703125,
0.04150390625,
-0.01488494873046875,
0.0157470703125,
-0.0308380126953125,
0.0186767578125,
0.03643798828125,
0.015045166015625,
0.0178985595703125,
0.03668212890625,
-0.021728515625,
-0.0538330078125,
0.0249786376953125,
0.0031566619873046875,
-0.029754638671875,
0.00835418701171875,
-0.0253753662109375,
0.0184326171875,
0.09259033203125,
0.0911865234375,
-0.13427734375,
0.01036834716796875,
0.0225372314453125,
-0.017608642578125,
-0.0029048919677734375,
-0.0165863037109375,
-0.0191497802734375,
-0.037017822265625,
0.06170654296875,
-0.0007839202880859375,
-0.00848388671875,
0.0223846435546875,
0.01238250732421875,
-0.004184722900390625,
0.01190948486328125,
0.06365966796875,
-0.0089874267578125,
-0.0291290283203125,
-0.04107666015625,
0.0176849365234375,
-0.030670166015625,
-0.03851318359375,
-0.00858306884765625,
0.039459228515625,
-0.0200958251953125,
-0.058258056640625,
0.0249481201171875,
-0.0206756591796875,
0.00701904296875,
0.018798828125,
0.017547607421875,
0.0201873779296875,
0.049896240234375,
-0.0024700164794921875,
0.01139068603515625,
0.022796630859375,
-0.0018520355224609375,
-0.034332275390625,
-0.032623291015625,
0.067626953125,
-0.00859832763671875,
-0.06744384765625,
0.040191650390625,
-0.0227203369140625,
-0.07244873046875,
-0.0169525146484375,
-0.0192413330078125,
0.071533203125,
-0.053924560546875,
0.000919342041015625,
0.01275634765625,
0.047027587890625,
-0.00310516357421875,
-0.04296875,
-0.0278472900390625,
-0.043792724609375,
0.0029811859130859375,
-0.04779052734375,
-0.0257720947265625,
0.0301055908203125,
-0.03564453125,
-0.082275390625,
0.11279296875,
0.028472900390625,
0.0248870849609375,
-0.03338623046875,
0.049835205078125,
-0.01153564453125,
0.033233642578125,
-0.0020694732666015625,
0.049041748046875,
-0.015594482421875,
0.02789306640625,
-0.0445556640625,
-0.016204833984375,
0.00823211669921875,
0.0509033203125,
0.08984375,
0.02508544921875,
-0.0313720703125,
-0.0079345703125,
0.019073486328125,
-0.0006251335144042969,
-0.02838134765625,
0.052032470703125,
-0.02178955078125,
0.043670654296875,
0.060394287109375,
-0.07073974609375,
0.021087646484375,
-0.004520416259765625,
-0.0021724700927734375,
-0.00353240966796875,
0.02154541015625,
0.01129913330078125,
-0.0198516845703125,
0.03515625,
-0.050201416015625,
0.0030803680419921875,
0.02093505859375,
0.0170745849609375,
-0.027099609375,
0.019866943359375,
0.019287109375,
-0.0582275390625,
-0.0126495361328125,
-0.03424072265625,
0.04547119140625,
0.00719451904296875,
0.039642333984375,
0.0394287109375,
0.022003173828125,
0.01203155517578125,
0.0246124267578125,
0.03192138671875,
0.024627685546875,
-0.044891357421875,
-0.019500732421875,
0.019287109375,
0.038177490234375,
-0.0228118896484375,
-0.039947509765625,
0.03265380859375,
0.0288848876953125,
-0.004085540771484375,
-0.0232696533203125,
-0.003997802734375,
0.007450103759765625,
0.047119140625,
0.002460479736328125,
0.0697021484375,
0.0594482421875,
0.037139892578125,
0.006011962890625,
0.004974365234375,
0.0238800048828125,
-0.00235748291015625,
0.0275421142578125,
0.103515625,
-0.04656982421875,
-0.003925323486328125,
-0.026031494140625,
0.00395965576171875,
0.012725830078125,
-0.0032024383544921875,
-0.01218414306640625,
0.02252197265625,
0.025421142578125,
0.01288604736328125,
-0.0017251968383789062,
0.032989501953125,
0.0238037109375,
-0.010833740234375,
-0.0262451171875,
-0.035430908203125,
0.033966064453125,
0.022186279296875,
0.0174560546875,
0.0017681121826171875,
0.04107666015625,
0.023895263671875,
-0.0279693603515625,
-0.01187896728515625,
-0.0110015869140625,
-0.03350830078125,
0.0189208984375,
-0.0218963623046875,
0.01482391357421875,
0.045257568359375,
-0.01287078857421875,
-0.01393890380859375,
-0.01557159423828125,
0.08868408203125,
-0.0201568603515625,
0.052520751953125,
-0.0051727294921875,
-0.0015392303466796875,
0.02587890625,
-0.01296234130859375,
0.04296875,
0.00981903076171875,
-0.03021240234375,
0.0016679763793945312,
-0.023468017578125,
-0.0223846435546875,
-0.005214691162109375,
0.0235595703125,
-0.0141448974609375,
0.0269012451171875,
-0.00760650634765625,
-0.003551483154296875,
0.024627685546875,
-0.0222320556640625,
-0.003688812255859375,
-0.0163726806640625,
0.01898193359375,
-0.0191802978515625,
0.0110321044921875,
0.00972747802734375,
0.033599853515625,
0.012847900390625,
0.01384735107421875,
-0.00455474853515625,
0.01263427734375,
0.00421905517578125,
0.0014553070068359375,
-0.003787994384765625,
0.0225982666015625,
-0.0099945068359375,
0.03912353515625,
-0.003017425537109375,
-0.0152587890625,
-0.01158905029296875,
-0.0784912109375,
0.05706787109375,
-0.007659912109375,
0.0009207725524902344,
0.04266357421875,
0.005451202392578125,
0.0014066696166992188,
0.0192718505859375,
0.0017404556274414062,
-0.02362060546875,
-0.048431396484375,
-0.00013720989227294922,
0.037994384765625,
-0.00836944580078125,
0.00888824462890625,
-0.0171966552734375,
0.079345703125,
-0.037628173828125,
-0.007549285888671875,
-0.0114288330078125,
-0.07373046875,
-0.0443115234375,
0.006046295166015625,
0.00469970703125,
-0.01062774658203125,
0.0027408599853515625,
-0.01435089111328125,
-0.0263519287109375,
0.0239105224609375,
-0.001125335693359375,
-0.00458526611328125,
-0.01715087890625,
0.00760650634765625,
0.0430908203125,
0.037841796875,
-0.018524169921875,
0.0182952880859375,
0.0222015380859375,
-0.010223388671875,
0.0384521484375,
-0.0239410400390625,
-0.038177490234375,
-0.030517578125,
0.0009098052978515625,
0.0181884765625,
-0.0165863037109375,
-0.035736083984375,
-0.06268310546875,
0.00766754150390625,
0.0010614395141601562,
-0.01416778564453125,
-0.01397705078125,
-0.014892578125,
-0.0170745849609375,
0.042388916015625,
-0.040069580078125,
0.00457763671875,
0.0232391357421875,
0.01329803466796875,
-0.06134033203125,
0.01274871826171875,
-0.01824951171875,
-0.031402587890625,
-0.01605224609375,
0.01934814453125,
0.0404052734375,
-0.027557373046875,
-0.0164794921875,
0.0178985595703125,
0.01119232177734375,
0.05255126953125,
-0.0113067626953125,
0.006969451904296875,
0.041778564453125,
0.0075225830078125,
-0.032958984375,
-0.059783935546875,
-0.0155181884765625,
0.00833892822265625,
0.0236968994140625,
-0.0119476318359375,
0.0025959014892578125,
0.02801513671875,
-0.04718017578125,
-0.09429931640625,
0.06549072265625,
-0.0287322998046875,
-0.0447998046875,
-0.052215576171875,
0.01287078857421875,
0.011688232421875,
-0.040771484375,
-0.02789306640625,
0.00005900859832763672,
-0.028594970703125,
0.0258941650390625,
0.00726318359375,
-0.007778167724609375,
0.022125244140625,
0.01132965087890625,
-0.0308990478515625,
0.02301025390625,
0.01554107666015625,
-0.0147705078125,
0.0112762451171875,
-0.00021505355834960938,
0.0143585205078125,
0.0234832763671875,
-0.04522705078125,
-0.00946044921875,
-0.01971435546875,
0.0222320556640625,
-0.0021343231201171875,
-0.0036830902099609375,
0.05029296875,
0.0174560546875,
-0.002620697021484375,
-0.0173492431640625,
-0.01442718505859375,
-0.011322021484375,
-0.03424072265625,
-0.0298919677734375,
-0.026214599609375,
-0.00835418701171875,
0.01062774658203125,
-0.04150390625,
0.0236053466796875,
-0.027618408203125,
-0.0175628662109375,
-0.0008249282836914062,
-0.035400390625,
-0.043792724609375,
-0.0006384849548339844,
-0.0167388916015625,
-0.0102386474609375,
0.027099609375,
-0.0191497802734375,
0.0223846435546875,
-0.007904052734375,
0.0180816650390625,
-0.02520751953125,
0.0232696533203125,
0.0148162841796875,
0.0052947998046875,
0.06549072265625,
0.044830322265625,
-0.078125,
-0.0242156982421875,
0.0293731689453125,
0.04425048828125,
-0.0254974365234375,
-0.06414794921875,
-0.0198822021484375,
-0.01056671142578125,
0.012908935546875,
-0.00801849365234375,
-0.00213623046875,
-0.039886474609375,
-0.003971099853515625,
-0.005962371826171875,
0.01222991943359375,
-0.040557861328125,
-0.01450347900390625,
0.047119140625,
0.01010894775390625,
-0.0439453125,
0.035064697265625,
-0.05670166015625,
0.0121002197265625,
-0.025787353515625,
0.0271148681640625,
-0.0261077880859375,
0.004459381103515625,
-0.068603515625,
-0.00838470458984375,
0.01151275634765625
] |
4f36767c457510bb898857de71cdab12f9917b4f
|
Wordpress Stackexchange
Q: shortcode outputs first before the page content
Possible Duplicate:
Shortcode always displaying at the top of the page
I have a wordpress site with wp e-commerce plugin and gold cart plugin.
I have created a worpdress page with following:
———————————————–
some text some details about the page
[shortcode]
———————————————–
I have 2 different div blocks and shortcode is after the page content. But when the page renders the shortcode outputs first before the page content.
Can anyone help me to output the page content first and then the shortcode?
Thanks in advance for help.
Jaspal Singh aka jsxtech
A: I guess you've echoed the result of shortcode callback function rather than returning them. Please check here: http://codex.wordpress.org/Shortcode_API
Shortcodes are written by providing a handler function. Shortcode
handlers are broadly similar to WordPress filters: they accept
parameters (attributes) and return a result (the shortcode output).
you need to return the output that will be added to your content. if you echo them, it will be printed before the content.
if this is the not problem, please put the codes so that we can see what is the error.
|
Q: shortcode outputs first before the page content
Possible Duplicate:
Shortcode always displaying at the top of the page
I have a wordpress site with wp e-commerce plugin and gold cart plugin.
I have created a worpdress page with following:
———————————————–
some text some details about the page
[shortcode]
———————————————–
I have 2 different div blocks and shortcode is after the page content. But when the page renders the shortcode outputs first before the page content.
Can anyone help me to output the page content first and then the shortcode?
Thanks in advance for help.
Jaspal Singh aka jsxtech
A: I guess you've echoed the result of shortcode callback function rather than returning them. Please check here: http://codex.wordpress.org/Shortcode_API
Shortcodes are written by providing a handler function. Shortcode
handlers are broadly similar to WordPress filters: they accept
parameters (attributes) and return a result (the shortcode output).
you need to return the output that will be added to your content. if you echo them, it will be printed before the content.
if this is the not problem, please put the codes so that we can see what is the error.
|
wordpress
|
{
"language": "en",
"length": 188,
"provenance": "stackexchange_00019.jsonl.gz:421297",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56781"
}
|
[
0.0227508544921875,
-0.01175689697265625,
0.01129150390625,
-0.001178741455078125,
-0.009063720703125,
-0.0233154296875,
0.0146636962890625,
-0.047119140625,
-0.002170562744140625,
0.029144287109375,
-0.03472900390625,
0.0030536651611328125,
-0.01357269287109375,
-0.01474761962890625,
-0.0048370361328125,
-0.035064697265625,
0.020904541015625,
0.0006589889526367188,
0.0283355712890625,
-0.0028553009033203125,
-0.01207733154296875,
0.01309967041015625,
0.0133056640625,
0.04925537109375,
0.0005893707275390625,
-0.037689208984375,
0.08087158203125,
-0.006191253662109375,
-0.0078125,
-0.0225067138671875,
0.01313018798828125,
0.005413055419921875,
0.0426025390625,
0.021026611328125,
-0.0704345703125,
0.0242767333984375,
-0.0226593017578125,
-0.00032782554626464844,
-0.0221710205078125,
0.03741455078125,
0.0123291015625,
0.0029010772705078125,
0.052581787109375,
-0.0111236572265625,
0.001922607421875,
-0.004245758056640625,
-0.0025157928466796875,
-0.041900634765625,
-0.0083465576171875,
0.002658843994140625,
0.0107269287109375,
0.0135650634765625,
0.01470184326171875,
-0.01172637939453125,
0.01036834716796875,
0.025848388671875,
-0.021087646484375,
-0.0008440017700195312,
0.0138702392578125,
0.0007419586181640625,
0.005218505859375,
0.004566192626953125,
0.01084136962890625,
-0.007511138916015625,
0.0118408203125,
0.0159912109375,
0.049530029296875,
0.01555633544921875,
-0.03936767578125,
0.0167388916015625,
0.028564453125,
-0.0374755859375,
-0.00731658935546875,
-0.0123443603515625,
-0.01230621337890625,
0.033355712890625,
-0.00440216064453125,
0.017242431640625,
0.0261383056640625,
-0.0047760009765625,
0.00560760498046875,
0.00927734375,
0.004428863525390625,
-0.0207672119140625,
-0.0017595291137695312,
-0.0238800048828125,
-0.01263427734375,
-0.005901336669921875,
-0.0255126953125,
0.0003981590270996094,
-0.0307159423828125,
0.0614013671875,
0.0085906982421875,
-0.032745361328125,
-0.05426025390625,
0.0115966796875,
-0.0070343017578125,
0.05615234375,
-0.0421142578125,
0.0240478515625,
-0.050994873046875,
-0.0028820037841796875,
0.0055389404296875,
-0.044036865234375,
-0.025238037109375,
-0.00824737548828125,
0.0110321044921875,
-0.0250396728515625,
0.017242431640625,
0.042938232421875,
-0.0144805908203125,
0.03692626953125,
-0.0294647216796875,
-0.051300048828125,
0.01497650146484375,
0.02947998046875,
-0.05841064453125,
0.0260009765625,
0.007007598876953125,
-0.0263519287109375,
0.0194854736328125,
0.041656494140625,
0.0198516845703125,
-0.05657958984375,
0.007526397705078125,
0.0024089813232421875,
-0.0328369140625,
-0.0462646484375,
0.0012311935424804688,
0.01515960693359375,
-0.0085906982421875,
-0.004245758056640625,
0.026763916015625,
0.05242919921875,
0.01000213623046875,
-0.004680633544921875,
0.01036834716796875,
-0.03265380859375,
-0.005779266357421875,
0.01451873779296875,
-0.00868988037109375,
-0.01348876953125,
0.020294189453125,
-0.02154541015625,
-0.023590087890625,
0.0357666015625,
0.0211181640625,
0.01486968994140625,
-0.019317626953125,
-0.11627197265625,
0.044647216796875,
-0.0186920166015625,
0.03082275390625,
0.0110931396484375,
0.0009870529174804688,
-0.0133514404296875,
0.034881591796875,
-0.00995635986328125,
-0.0171966552734375,
-0.0203704833984375,
0.026641845703125,
-0.01486968994140625,
-0.0239410400390625,
-0.0292205810546875,
-0.0479736328125,
-0.00980377197265625,
-0.0462646484375,
0.0003361701965332031,
0.0190887451171875,
0.053466796875,
-0.00865936279296875,
0.03515625,
-0.032501220703125,
-0.00029730796813964844,
-0.01244354248046875,
-0.0217132568359375,
-0.005825042724609375,
-0.0090179443359375,
0.05780029296875,
-0.0159149169921875,
-0.02825927734375,
-0.0208892822265625,
0.0556640625,
-0.0018949508666992188,
-0.045989990234375,
0.0263671875,
0.02294921875,
0.07952880859375,
-0.01015472412109375,
0.0310211181640625,
0.007160186767578125,
0.0287933349609375,
-0.016693115234375,
0.0266265869140625,
0.0180511474609375,
-0.04339599609375,
-0.03436279296875,
-0.0158233642578125,
-0.0077972412109375,
0.00390625,
-0.0234832763671875,
0.01629638671875,
-0.01490020751953125,
0.0036220550537109375,
0.0124664306640625,
-0.0194091796875,
0.00962066650390625,
0.0275421142578125,
0.02642822265625,
-0.0262603759765625,
-0.0006632804870605469,
-0.0186309814453125,
0.0017271041870117188,
-0.0123138427734375,
-0.05206298828125,
0.0426025390625,
-0.02899169921875,
0.073974609375,
-0.000029265880584716797,
0.06719970703125,
0.00844573974609375,
-0.0291748046875,
0.00930023193359375,
-0.0188140869140625,
0.041778564453125,
-0.0166015625,
-0.0014257431030273438,
-0.034332275390625,
0.02276611328125,
0.0018367767333984375,
-0.03192138671875,
0.0244598388671875,
-0.022125244140625,
0.003509521484375,
-0.08099365234375,
-0.04083251953125,
-0.051727294921875,
0.0126953125,
0.016937255859375,
0.046905517578125,
0.0279388427734375,
0.038543701171875,
0.01171875,
0.034210205078125,
0.047576904296875,
0.000896453857421875,
0.0254364013671875,
-0.0078887939453125,
0.057220458984375,
0.039947509765625,
-0.015869140625,
-0.0440673828125,
0.0112762451171875,
-0.053436279296875,
0.050262451171875,
0.0044708251953125,
-0.0176239013671875,
-0.0178070068359375,
0.0015926361083984375,
0.004817962646484375,
0.00850677490234375,
-0.03204345703125,
-0.0163726806640625,
-0.03289794921875,
0.0178375244140625,
0.031585693359375,
0.01702880859375,
0.022613525390625,
-0.056640625,
0.033447265625,
0.0210418701171875,
0.0201416015625,
0.0024890899658203125,
0.031707763671875,
0.05438232421875,
-0.05255126953125,
-0.0115509033203125,
-0.0212554931640625,
-0.0088043212890625,
0.01007843017578125,
-0.006092071533203125,
0.016021728515625,
-0.025177001953125,
-0.01279449462890625,
0.005401611328125,
-0.0009293556213378906,
0.0021381378173828125,
0.0158233642578125,
0.0261383056640625,
0.00838470458984375,
0.0012073516845703125,
0.038360595703125,
-0.0305328369140625,
0.06610107421875,
-0.00115203857421875,
-0.00983428955078125,
-0.00777435302734375,
-0.05126953125,
0.06060791015625,
-0.05999755859375,
0.0293426513671875,
0.07257080078125,
-0.031982421875,
0.0310821533203125,
0.0015583038330078125,
0.039581298828125,
-0.0177459716796875,
-0.0170745849609375,
-0.020416259765625,
0.038726806640625,
-0.0782470703125,
0.02545166015625,
0.0411376953125,
0.08062744140625,
0.005992889404296875,
-0.03509521484375,
-0.0054168701171875,
0.04522705078125,
-0.08087158203125,
-0.0888671875,
-0.01116943359375,
-0.0233306884765625,
-0.0001245737075805664,
0.014923095703125,
-0.0012664794921875,
-0.0118255615234375,
0.028076171875,
-0.008575439453125,
-0.0088958740234375,
-0.0170440673828125,
-0.019256591796875,
-0.03375244140625,
-0.041259765625,
0.01029205322265625,
-0.0020847320556640625,
-0.005039215087890625,
0.007160186767578125,
0.027099609375,
0.01187896728515625,
-0.033233642578125,
-0.014739990234375,
0.0230560302734375,
-0.04296875,
-0.01171112060546875,
0.0439453125,
-0.051300048828125,
-0.004119873046875,
0.010009765625,
-0.034759521484375,
0.000055730342864990234,
0.019989013671875,
-0.019134521484375,
-0.048919677734375,
-0.05517578125,
-0.016082763671875,
0.0313720703125,
0.034820556640625,
-0.01617431640625,
0.0474853515625,
-0.042724609375,
-0.012908935546875,
-0.015869140625,
-0.07305908203125,
-0.0467529296875,
0.0777587890625,
-0.0010232925415039062,
-0.0390625,
-0.04986572265625,
0.0102691650390625,
-0.0016355514526367188,
0.052032470703125,
-0.0200347900390625,
0.01470947265625,
-0.00916290283203125,
-0.0037822723388671875,
-0.0482177734375,
0.040069580078125,
0.01043701171875,
0.01580810546875,
0.01255035400390625,
0.043121337890625,
-0.01157379150390625,
0.016937255859375,
-0.059967041015625,
-0.047119140625,
0.04095458984375,
-0.00024509429931640625,
0.04779052734375,
-0.041107177734375,
-0.0306549072265625,
-0.0011720657348632812,
0.10546875,
-0.0220947265625,
0.01245880126953125,
0.0225067138671875,
-0.00928497314453125,
-0.005565643310546875,
-0.0196380615234375,
-0.102294921875,
-0.0189971923828125,
-0.077392578125,
0.022247314453125,
-0.0011548995971679688,
0.007625579833984375,
-0.03887939453125,
0.04638671875,
-0.0535888671875,
-0.0272064208984375,
0.0286102294921875,
-0.0343017578125,
0.015289306640625,
0.015228271484375,
-0.0096435546875,
-0.0115509033203125,
-0.03466796875,
-0.0258026123046875,
-0.03240966796875,
-0.016998291015625,
0.0149688720703125,
0.016998291015625,
0.006366729736328125,
-0.050506591796875,
-0.01617431640625,
0.029388427734375,
-0.0369873046875,
0.004730224609375,
0.005695343017578125,
0.0408935546875,
0.0092926025390625,
-0.0130767822265625,
-0.00913238525390625,
-0.02777099609375,
0.01593017578125,
0.03277587890625,
0.0199127197265625,
0.0291748046875,
-0.055999755859375,
-0.045440673828125,
0.005672454833984375,
-0.041534423828125,
-0.021514892578125,
-0.054595947265625,
-0.026947021484375,
0.04644775390625,
-0.0254974365234375,
0.0249786376953125,
-0.07958984375,
-0.05255126953125,
-0.0139007568359375,
-0.056732177734375,
-0.039337158203125,
0.0321044921875,
0.0309600830078125,
0.0306396484375,
0.0301513671875,
-0.0313720703125,
-0.01117706298828125,
0.044647216796875,
0.0276336669921875,
0.05023193359375,
0.0330810546875,
-0.036651611328125,
0.07275390625,
0.034942626953125,
0.039794921875,
-0.0067138671875,
0.054779052734375,
-0.0124053955078125,
-0.018096923828125,
0.0270233154296875,
-0.0003323554992675781,
-0.048065185546875,
0.0018301010131835938,
-0.01013946533203125,
0.027740478515625,
-0.026611328125,
-0.029571533203125,
0.0098419189453125,
-0.00945281982421875,
0.0068359375,
0.0100555419921875,
-0.01617431640625,
0.0841064453125,
0.0430908203125,
0.01401519775390625,
0.0137481689453125,
-0.00824737548828125,
0.05169677734375,
-0.0208892822265625,
0.036285400390625,
-0.0035686492919921875,
0.0246124267578125,
0.0257720947265625,
-0.00925445556640625,
-0.016448974609375,
0.0167236328125,
-0.002704620361328125,
0.072265625,
0.0036563873291015625,
-0.0193328857421875,
-0.03387451171875,
-0.03564453125,
-0.01241302490234375,
-0.016082763671875,
0.01155853271484375,
0.030731201171875,
0.00789642333984375,
0.0144195556640625,
-0.00010371208190917969,
-0.013763427734375,
0.00771331787109375,
-0.0309906005859375,
-0.008148193359375,
-0.016143798828125,
-0.007419586181640625,
-0.019439697265625,
0.039703369140625,
-0.04925537109375,
0.0185394287109375,
0.01430511474609375,
-0.0249176025390625,
-0.00864410400390625,
0.019134521484375,
0.0416259765625,
0.0004703998565673828,
-0.007259368896484375,
-0.0008306503295898438,
0.0303955078125,
-0.03497314453125,
0.016448974609375,
0.0244293212890625,
0.03070068359375,
-0.03338623046875,
-0.055816650390625,
0.03662109375,
-0.01387786865234375,
0.000028073787689208984,
-0.0015001296997070312,
0.01495361328125,
-0.0029048919677734375,
0.0018138885498046875,
0.01837158203125,
0.016021728515625,
0.037109375,
-0.01085662841796875,
0.0203399658203125,
-0.005340576171875,
0.044708251953125,
-0.0239715576171875,
0.02130126953125,
0.00982666015625,
-0.013641357421875,
0.004459381103515625,
-0.0287628173828125,
-0.034027099609375,
-0.023895263671875,
-0.003940582275390625,
-0.00695037841796875,
-0.004856109619140625,
0.02154541015625,
-0.025787353515625,
0.0237579345703125,
-0.0250396728515625,
-0.0032444000244140625,
-0.05523681640625,
0.0036983489990234375,
0.060882568359375,
0.050567626953125,
-0.08074951171875,
0.033843994140625,
-0.0535888671875,
0.00745391845703125,
0.0186004638671875,
-0.01346588134765625,
-0.04315185546875,
-0.031341552734375,
0.013824462890625,
0.032440185546875,
-0.0303802490234375,
-0.0614013671875,
-0.035491943359375,
-0.00560760498046875,
0.0213775634765625,
0.0501708984375,
-0.01506805419921875,
0.058685302734375,
0.0026645660400390625,
0.04864501953125,
0.022308349609375,
0.0467529296875,
0.005786895751953125,
-0.03643798828125,
0.0311126708984375,
-0.0181732177734375,
-0.042572021484375,
-0.00514984130859375,
-0.0386962890625,
-0.02734375,
0.01715087890625,
-0.00989532470703125,
0.0284881591796875,
0.01678466796875,
0.01474761962890625,
-0.007137298583984375,
-0.0226593017578125,
0.01055145263671875,
-0.00786590576171875,
0.024505615234375,
-0.00957489013671875,
0.0228118896484375,
-0.00015676021575927734,
-0.02392578125,
0.02105712890625,
-0.0040283203125,
0.029754638671875,
0.0010747909545898438,
0.03155517578125,
0.047698974609375,
0.048370361328125,
-0.05078125,
0.027069091796875,
0.05859375,
-0.00807952880859375,
0.0018472671508789062,
0.031402587890625,
0.00991058349609375,
-0.0275421142578125,
0.048431396484375,
-0.0130767822265625,
-0.0305023193359375,
-0.0029697418212890625,
-0.040740966796875,
0.03070068359375,
0.046356201171875,
0.06329345703125,
-0.0609130859375,
0.0056610107421875,
0.0074920654296875,
-0.05255126953125,
0.0164794921875,
-0.018890380859375,
0.017547607421875,
-0.0248260498046875,
0.06964111328125,
0.01171875,
-0.01070404052734375,
0.034576416015625,
-0.019866943359375,
-0.015960693359375,
0.00026702880859375,
0.0234222412109375,
0.00872802734375,
-0.054351806640625,
0.007076263427734375,
0.025848388671875,
0.014892578125,
-0.005916595458984375,
-0.0021190643310546875,
0.00921630859375,
-0.028045654296875,
-0.0269775390625,
0.0207366943359375,
-0.008148193359375,
-0.005893707275390625,
0.02313232421875,
-0.00617218017578125,
-0.027679443359375,
0.0287322998046875,
-0.050537109375,
0.07049560546875,
-0.0185089111328125,
-0.010284423828125,
0.058807373046875,
-0.031036376953125,
0.028167724609375,
0.039520263671875,
-0.105712890625,
0.00811004638671875,
0.0015735626220703125,
0.0121002197265625,
-0.02386474609375,
-0.059844970703125,
0.09442138671875,
-0.07769775390625,
0.0088653564453125,
0.01050567626953125,
0.0245361328125,
-0.0181884765625,
-0.0268402099609375,
0.0250091552734375,
-0.005584716796875,
0.057403564453125,
-0.0117034912109375,
0.051544189453125,
-0.0205841064453125,
-0.039031982421875,
-0.08685302734375,
0.035308837890625,
-0.0221405029296875,
0.0289306640625,
-0.0117034912109375,
0.01025390625,
0.009765625,
-0.0205841064453125,
-0.01354217529296875,
0.07415771484375,
0.019012451171875,
0.057952880859375,
-0.0633544921875,
-0.039581298828125,
0.0278472900390625,
0.08837890625,
0.035247802734375,
-0.0027923583984375,
-0.0218963623046875,
0.031707763671875,
0.09295654296875,
-0.0109405517578125,
-0.0240478515625,
0.050018310546875,
-0.0124359130859375,
-0.004924774169921875,
0.011444091796875,
-0.0158233642578125,
0.035552978515625,
-0.0297698974609375,
-0.0287322998046875,
0.0028820037841796875,
0.00498199462890625,
-0.00830078125,
0.043304443359375,
0.01849365234375,
-0.046600341796875,
0.0345458984375,
0.03497314453125,
-0.005580902099609375,
-0.029754638671875,
0.078857421875,
0.044586181640625,
-0.052947998046875,
-0.061859130859375,
-0.03228759765625,
0.04534912109375,
0.0228424072265625,
0.07244873046875,
0.034942626953125,
0.032501220703125,
0.049102783203125,
0.005069732666015625,
0.04901123046875,
0.0271759033203125,
-0.050994873046875,
0.021820068359375,
0.0019178390502929688,
0.0237884521484375,
-0.041046142578125,
-0.04095458984375,
0.01096343994140625,
0.038299560546875,
-0.015838623046875,
-0.01044464111328125,
0.030914306640625,
0.0013103485107421875,
-0.0296783447265625,
-0.0285797119140625,
-0.0333251953125,
-0.02703857421875,
0.005222320556640625,
-0.0386962890625,
-0.01861572265625,
0.01190185546875,
0.070556640625,
-0.006443023681640625,
-0.00015604496002197266,
-0.0265960693359375,
-0.05615234375,
-0.0122222900390625,
-0.0022335052490234375,
-0.00580596923828125,
0.040985107421875,
-0.00354766845703125,
0.05572509765625,
-0.048492431640625,
-0.0221710205078125,
-0.0200042724609375,
0.00556182861328125,
-0.005184173583984375,
0.0254364013671875,
-0.028472900390625,
0.0212249755859375,
-0.030242919921875,
0.03936767578125,
0.0022907257080078125,
0.016143798828125,
0.02276611328125,
0.022552490234375,
-0.004070281982421875,
-0.01096343994140625,
0.037628173828125,
-0.0228271484375,
-0.03094482421875,
0.00020587444305419922,
-0.03143310546875,
0.002948760986328125,
-0.0242919921875,
-0.00812530517578125,
0.06732177734375,
-0.01026153564453125,
-0.0227508544921875,
0.03228759765625,
0.0010051727294921875,
-0.032958984375,
0.034881591796875,
0.00229644775390625,
0.077880859375,
0.00733184814453125,
-0.033660888671875,
0.006244659423828125,
-0.055633544921875,
-0.07574462890625,
0.042327880859375,
0.046875,
0.00478363037109375,
-0.0124969482421875,
0.00968170166015625,
-0.0181732177734375,
-0.01262664794921875,
-0.0036773681640625,
0.02716064453125,
-0.0059051513671875,
0.003582000732421875,
0.00621795654296875,
-0.0357666015625,
-0.015716552734375,
0.00406646728515625,
0.0230712890625,
0.00682830810546875,
0.0293121337890625,
0.01425933837890625,
0.01523590087890625,
-0.0135650634765625,
-0.00815582275390625,
-0.0221099853515625,
-0.04541015625,
0.0814208984375,
-0.0207366943359375,
-0.0249481201171875,
-0.01190185546875,
-0.06121826171875,
-0.021881103515625,
0.05169677734375,
-0.00864410400390625,
0.0146942138671875,
-0.0283660888671875,
0.02288818359375,
-0.02984619140625,
0.0178680419921875,
-0.0211334228515625,
0.010833740234375,
-0.00983428955078125,
-0.00850677490234375,
0.01468658447265625,
-0.0023708343505859375,
-0.01348114013671875,
0.025909423828125,
0.0543212890625,
-0.00547027587890625,
0.0306243896484375,
-0.0225982666015625,
0.06103515625,
0.030548095703125,
0.0266571044921875,
-0.00818634033203125,
-0.010040283203125,
-0.0229644775390625,
0.02392578125,
0.00206756591796875,
0.00007325410842895508,
-0.00003325939178466797,
-0.024993896484375,
0.0171966552734375,
0.0217742919921875,
0.028289794921875,
-0.01157379150390625,
-0.0111541748046875,
0.0361328125,
-0.0188446044921875,
-0.02874755859375,
0.0323486328125,
-0.005062103271484375,
-0.00015735626220703125,
0.01336669921875,
0.0203857421875,
0.03839111328125,
0.03466796875,
-0.0210113525390625,
-0.0084228515625,
0.00860595703125,
0.00675201416015625,
-0.0322265625,
-0.01506805419921875,
0.017608642578125,
0.032135009765625,
-0.00304412841796875,
0.0306549072265625,
0.0035800933837890625,
-0.0276336669921875,
-0.0699462890625,
-0.0030117034912109375,
-0.0296630859375,
0.00662994384765625,
-0.019256591796875,
-0.03173828125,
-0.000797271728515625,
0.01873779296875,
0.0211944580078125,
-0.038543701171875,
-0.039276123046875,
0.0216217041015625,
-0.036346435546875,
-0.0237579345703125,
0.0268402099609375,
-0.00518798828125,
-0.0083465576171875,
-0.03955078125,
-0.005817413330078125,
-0.031280517578125,
0.0282440185546875,
-0.00890350341796875,
0.00429534912109375,
0.0167694091796875,
-0.0164947509765625,
-0.0013303756713867188,
0.0224151611328125,
0.02099609375,
-0.020843505859375,
0.0002837181091308594,
-0.01430511474609375,
-0.023590087890625,
0.004138946533203125,
-0.01549530029296875,
-0.0205535888671875,
-0.004360198974609375,
0.031158447265625,
-0.01033782958984375,
0.0134124755859375,
0.0216827392578125,
-0.00568389892578125,
0.00849151611328125,
0.005718231201171875,
0.002338409423828125,
-0.0232696533203125,
-0.0177001953125,
-0.02410888671875,
0.048004150390625,
0.0239410400390625,
-0.024749755859375,
0.007389068603515625,
0.05072021484375,
0.01512908935546875,
-0.00473785400390625,
-0.036407470703125,
0.005035400390625,
-0.0247039794921875,
0.051483154296875,
-0.0011920928955078125,
-0.006046295166015625,
0.0014963150024414062,
-0.01837158203125,
0.01229095458984375,
0.003803253173828125,
-0.0106658935546875,
0.0029544830322265625,
-0.0391845703125,
-0.00943756103515625,
-0.021881103515625,
-0.0238037109375,
-0.00534820556640625,
-0.053466796875,
-0.06805419921875,
-0.005352020263671875,
-0.06341552734375,
0.0245208740234375,
-0.061553955078125,
-0.018707275390625,
0.029327392578125,
0.0007009506225585938,
0.008636474609375,
-0.0005393028259277344,
0.0223541259765625,
0.014068603515625,
0.0217742919921875,
0.005992889404296875,
0.057586669921875,
-0.02374267578125,
-0.011199951171875,
0.030548095703125,
0.013427734375,
0.00008887052536010742,
0.0014934539794921875,
0.001651763916015625,
0.0379638671875,
-0.005496978759765625,
0.04058837890625,
-0.000031054019927978516,
0.0450439453125,
0.01148223876953125,
0.02374267578125,
-0.025421142578125,
0.060333251953125,
-0.0120391845703125,
0.04339599609375,
-0.0226287841796875,
0.0031032562255859375,
0.0274658203125,
-0.043548583984375,
0.0216827392578125,
0.0556640625,
0.00936126708984375,
0.044281005859375,
-0.01641845703125,
-0.0193939208984375,
0.0091705322265625,
-0.0282745361328125
] |
973ca81f38de92e49d4577b57721f81cb491849d
|
Wordpress Stackexchange
Q: How do I create links at the top of WP_List_table? I am trying to create links like the ones in the post tab (see image below).
I created my WP_List_table but I am not sure how to create those links or how to get them to show a different db query.
I know about the extra_tablenav function in the class but this adds things after the bulk action area, so this doesn't seem to do what I want.
A: You have to call views(); when rendering the page content.
Put <?php $wp_list_table->views(); ?>
after page title and before the form.
See: \wp-admin\edit.php to see when is called.
|
Q: How do I create links at the top of WP_List_table? I am trying to create links like the ones in the post tab (see image below).
I created my WP_List_table but I am not sure how to create those links or how to get them to show a different db query.
I know about the extra_tablenav function in the class but this adds things after the bulk action area, so this doesn't seem to do what I want.
A: You have to call views(); when rendering the page content.
Put <?php $wp_list_table->views(); ?>
after page title and before the form.
See: \wp-admin\edit.php to see when is called.
A: As mentioned in the comments, if this is an existing table you wish to add/remove links from, see this answer.
If this a custom subclass of WP_List_Table, e.g.:
class Wpse56883_WP_List_Table extends WP_List_Table{
//Class methods here
}
Then you add these links by overriding the get_views() method. This should return an array: array ( id => link ). This should link back to the page, attaching some value to a query variable (which I'll call customvar).
When constructing the links, check for the current value for customvar and conditionally add the class current to highlight in bold the current view.
So (inside) your class.
function get_views(){
$views = array();
$current = ( !empty($_REQUEST['customvar']) ? $_REQUEST['customvar'] : 'all');
//All link
$class = ($current == 'all' ? ' class="current"' :'');
$all_url = remove_query_arg('customvar');
$views['all'] = "<a href='{$all_url }' {$class} >All</a>";
//Foo link
$foo_url = add_query_arg('customvar','foo');
$class = ($current == 'foo' ? ' class="current"' :'');
$views['foo'] = "<a href='{$foo_url}' {$class} >Foo</a>";
//Bar link
$bar_url = add_query_arg('customvar','bar');
$class = ($current == 'bar' ? ' class="current"' :'');
$views['bar'] = "<a href='{$bar_url}' {$class} >Bar</a>";
return $views;
}
Then in your prepare_items method you can retrieve the customvar method and alter your query according to it's value.
function prepare_items(){
//Retrieve $customvar for use in query to get items.
$customvar = ( isset($_REQUEST['customvar']) ? $_REQUEST['customvar'] : 'all');
}
Note: The links can be used to perform actions. I would store the 'action' value in the query variable action (remember to use nonces!). Then hook onto load-{$hook} (see Codex), check permissions and nonces, and then perform the action.
If you are going to include 'action links', make sure you use nonces - and you should only display the link for users with the necessary capabilities.
A: For this problem i have created a custom style , you can follow
//Add a filter hook first
add_filter('views_edit-your_custom_post_name',array($this,'prefix_post_status_links'));
function prefix_post_status_links($views) {
?>
<div class="gwf-tab-header">
<ul class="nav nav-pills">
<?php
$views = array(
'all' => '
<li class="nav-item">
<a class="nav-link active p-0" href="edit.php?post_type=your_custom_post_name">
<i class="fas fa-circle"></i>
All Entries
</a>
</li>',
'active' => '<li class="nav-item">
<a class="nav-link p-0 text-success" href="edit.php?post_status=active&post_type=your_custom_post_name">
<i class="far fa-circle"></i>
Active
</a>
</li>',
'inactive' => '<li class="nav-item">
<a class="nav-link p-0 text-warning" href="edit.php?post_status=inactive&post_type=your_custom_post_name">
<i class="far fa-circle"></i>
Inactive
</a>
</li>',
'trash' => '<li class="nav-item">
<a class="nav-link p-0 text-danger" href="edit.php?post_status=trash&post_type=your_custom_post_name">
<i class="far fa-circle"></i>
Trash
</a>
</li>'
);
return $views;
?>
</ul>
</div>
<?php
}
|
wordpress
|
{
"language": "en",
"length": 497,
"provenance": "stackexchange_00019.jsonl.gz:421336",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56883"
}
|
[
0.0843505859375,
-0.00008374452590942383,
0.026763916015625,
-0.003871917724609375,
0.00965118408203125,
-0.0447998046875,
0.07708740234375,
-0.035888671875,
-0.0110931396484375,
0.005687713623046875,
0.01351165771484375,
-0.01215362548828125,
-0.0261383056640625,
-0.045013427734375,
-0.00315093994140625,
-0.041229248046875,
0.0491943359375,
-0.0394287109375,
0.0263671875,
-0.00853729248046875,
0.022064208984375,
0.01172637939453125,
0.0400390625,
0.07269287109375,
0.01523590087890625,
0.0064544677734375,
0.055908203125,
-0.018096923828125,
0.0263519287109375,
-0.0019931793212890625,
0.01824951171875,
-0.038665771484375,
0.003841400146484375,
-0.009063720703125,
0.03985595703125,
-0.0330810546875,
0.0311126708984375,
-0.01003265380859375,
0.0225677490234375,
-0.00498199462890625,
0.0472412109375,
-0.0250244140625,
0.043121337890625,
0.0191802978515625,
-0.004322052001953125,
-0.0017576217651367188,
0.02685546875,
-0.032318115234375,
0.0276947021484375,
0.002689361572265625,
0.008514404296875,
0.0460205078125,
0.00331878662109375,
-0.034332275390625,
-0.0084075927734375,
-0.0009312629699707031,
0.0214996337890625,
-0.037750244140625,
0.0133056640625,
-0.01409912109375,
-0.007396697998046875,
-0.0102691650390625,
0.0335693359375,
0.00926971435546875,
-0.017578125,
-0.0018644332885742188,
0.04058837890625,
0.00897216796875,
0.0246124267578125,
-0.0305328369140625,
-0.01381683349609375,
0.025390625,
-0.001010894775390625,
-0.019012451171875,
-0.00862884521484375,
0.001285552978515625,
0.039154052734375,
0.01416778564453125,
-0.01419830322265625,
0.01378631591796875,
-0.022735595703125,
0.01129913330078125,
-0.0005846023559570312,
-0.0355224609375,
0.02105712890625,
-0.0201263427734375,
-0.038726806640625,
-0.00804901123046875,
-0.0002682209014892578,
-0.007541656494140625,
-0.01277923583984375,
-0.0012025833129882812,
-0.0026702880859375,
0.0183563232421875,
-0.011077880859375,
-0.026336669921875,
0.0242919921875,
0.0278472900390625,
0.02069091796875,
0.0374755859375,
0.01261138916015625,
-0.062255859375,
0.06268310546875,
-0.0421142578125,
-0.0023517608642578125,
0.044281005859375,
0.0115203857421875,
-0.02301025390625,
-0.006439208984375,
-0.00738525390625,
-0.0229339599609375,
-0.0038814544677734375,
-0.00047206878662109375,
0.01434326171875,
-0.03326416015625,
-0.02838134765625,
-0.0662841796875,
0.01080322265625,
-0.0167694091796875,
-0.0105438232421875,
-0.006221771240234375,
0.0176849365234375,
-0.03826904296875,
0.026885986328125,
0.0130157470703125,
0.01416015625,
0.007633209228515625,
-0.0092926025390625,
-0.0303955078125,
0.0211029052734375,
-0.0179290771484375,
0.020965576171875,
0.040618896484375,
0.033966064453125,
-0.007411956787109375,
-0.00994110107421875,
-0.00011867284774780273,
-0.03857421875,
-0.027191162109375,
0.01702880859375,
0.00434112548828125,
-0.0263214111328125,
0.0171966552734375,
-0.006229400634765625,
0.00982666015625,
0.044036865234375,
0.028717041015625,
-0.0079498291015625,
-0.01263427734375,
-0.0576171875,
-0.00615692138671875,
0.0006017684936523438,
0.01279449462890625,
0.0148468017578125,
0.019775390625,
-0.03631591796875,
-0.00959014892578125,
-0.01090240478515625,
0.04742431640625,
-0.006824493408203125,
-0.0210113525390625,
-0.00189971923828125,
0.0099639892578125,
-0.0806884765625,
-0.074462890625,
-0.01544189453125,
-0.041412353515625,
-0.011749267578125,
0.0252838134765625,
0.00995635986328125,
-0.0031280517578125,
-0.0394287109375,
0.02276611328125,
0.0012531280517578125,
-0.0160064697265625,
0.03564453125,
0.0017919540405273438,
-0.031005859375,
0.0277862548828125,
0.040618896484375,
-0.029022216796875,
-0.03411865234375,
0.008575439453125,
-0.00981903076171875,
-0.047088623046875,
0.07080078125,
-0.0106964111328125,
0.077880859375,
0.009765625,
0.0118560791015625,
-0.0026092529296875,
-0.0019330978393554688,
-0.00818634033203125,
0.0421142578125,
-0.0002199411392211914,
-0.06646728515625,
-0.0069732666015625,
-0.019134521484375,
-0.01415252685546875,
-0.0016021728515625,
-0.0572509765625,
0.037872314453125,
-0.026123046875,
0.044464111328125,
0.005039215087890625,
0.01467132568359375,
-0.0053863525390625,
0.03900146484375,
0.0325927734375,
0.016326904296875,
0.00647735595703125,
0.016815185546875,
0.0011854171752929688,
-0.073974609375,
-0.0367431640625,
0.0278167724609375,
-0.00937652587890625,
0.008270263671875,
-0.006168365478515625,
-0.0093994140625,
-0.0017910003662109375,
-0.001438140869140625,
-0.01739501953125,
0.01131439208984375,
0.01367950439453125,
-0.040924072265625,
-0.0244903564453125,
-0.04742431640625,
-0.0301971435546875,
-0.01165008544921875,
-0.035552978515625,
0.053436279296875,
0.056976318359375,
0.06402587890625,
-0.031402587890625,
-0.01708984375,
-0.00925445556640625,
-0.01486968994140625,
0.00026488304138183594,
0.0421142578125,
0.032745361328125,
0.0745849609375,
0.0005331039428710938,
-0.013824462890625,
0.022735595703125,
-0.030517578125,
0.0260162353515625,
-0.027069091796875,
-0.00968170166015625,
0.01519012451171875,
0.01146697998046875,
0.0022563934326171875,
0.016021728515625,
-0.00489044189453125,
0.0198974609375,
0.0196533203125,
0.0144805908203125,
0.024871826171875,
0.01064300537109375,
-0.012298583984375,
0.0037288665771484375,
-0.002521514892578125,
-0.01751708984375,
-0.0106964111328125,
0.005023956298828125,
0.0240631103515625,
0.0313720703125,
0.0189056396484375,
-0.038299560546875,
0.027679443359375,
0.01499176025390625,
0.0138702392578125,
-0.00505828857421875,
0.01558685302734375,
-0.01277923583984375,
-0.0182037353515625,
-0.024078369140625,
0.015838623046875,
0.008819580078125,
-0.0159759521484375,
-0.0295867919921875,
0.0183868408203125,
0.0226593017578125,
-0.02325439453125,
-0.0012807846069335938,
-0.038543701171875,
0.015106201171875,
-0.036468505859375,
-0.0015420913696289062,
-0.0091552734375,
0.0200958251953125,
-0.00432586669921875,
-0.033294677734375,
0.0237884521484375,
0.01108551025390625,
-0.032745361328125,
0.0019407272338867188,
-0.03607177734375,
0.0168609619140625,
-0.039947509765625,
0.07989501953125,
0.0655517578125,
-0.01090240478515625,
0.0031280517578125,
-0.01413726806640625,
0.031890869140625,
-0.0196685791015625,
-0.00872039794921875,
-0.018951416015625,
-0.0345458984375,
-0.004138946533203125,
0.00516510009765625,
0.04217529296875,
0.05364990234375,
0.01214599609375,
-0.025634765625,
-0.012908935546875,
0.055206298828125,
-0.03125,
-0.04571533203125,
0.025238037109375,
-0.037078857421875,
0.007236480712890625,
-0.02020263671875,
-0.035308837890625,
-0.0218505859375,
0.020050048828125,
-0.00640106201171875,
-0.01459503173828125,
-0.02392578125,
-0.0174713134765625,
-0.048095703125,
-0.044189453125,
-0.0012922286987304688,
0.006618499755859375,
-0.01055145263671875,
0.00415802001953125,
0.017120361328125,
-0.0028362274169921875,
-0.035064697265625,
-0.01953125,
0.014129638671875,
-0.004901885986328125,
-0.0181121826171875,
0.01499176025390625,
-0.0016107559204101562,
-0.01116180419921875,
0.0195770263671875,
0.005039215087890625,
0.0269317626953125,
-0.0163421630859375,
-0.023406982421875,
-0.007175445556640625,
0.0145263671875,
0.0295257568359375,
0.00171661376953125,
-0.0179443359375,
0.0166015625,
0.0286712646484375,
-0.0399169921875,
-0.0190277099609375,
-0.0093231201171875,
-0.050201416015625,
-0.046295166015625,
0.0135955810546875,
0.0063323974609375,
-0.042510986328125,
0.003261566162109375,
0.047760009765625,
0.01177215576171875,
0.040313720703125,
0.0195465087890625,
-0.0225067138671875,
-0.00806427001953125,
0.0239105224609375,
-0.03826904296875,
0.057342529296875,
0.01222991943359375,
-0.038177490234375,
0.01209259033203125,
0.0161285400390625,
0.0002627372741699219,
-0.02606201171875,
-0.045989990234375,
-0.046875,
0.03338623046875,
-0.0163116455078125,
0.051300048828125,
-0.029571533203125,
-0.0176544189453125,
0.0025005340576171875,
0.0843505859375,
-0.026702880859375,
-0.0239410400390625,
-0.03143310546875,
0.0282745361328125,
-0.05609130859375,
-0.07208251953125,
-0.0013246536254882812,
-0.0005021095275878906,
-0.08746337890625,
0.025177001953125,
0.0175018310546875,
-0.01305389404296875,
-0.034454345703125,
0.07708740234375,
-0.05389404296875,
-0.0271759033203125,
0.042022705078125,
-0.0228271484375,
-0.0163421630859375,
0.053985595703125,
-0.038970947265625,
0.03118896484375,
-0.059478759765625,
-0.0045318603515625,
-0.0562744140625,
-0.0007038116455078125,
-0.05816650390625,
0.038177490234375,
0.040557861328125,
-0.00698089599609375,
0.00371551513671875,
0.034088134765625,
0.028900146484375,
-0.007633209228515625,
0.0299072265625,
0.0057525634765625,
0.01409149169921875,
-0.032958984375,
-0.002269744873046875,
-0.057891845703125,
-0.0262603759765625,
-0.090576171875,
-0.034027099609375,
-0.00670623779296875,
-0.01776123046875,
0.066650390625,
-0.035308837890625,
0.033660888671875,
-0.041473388671875,
-0.06494140625,
-0.019989013671875,
0.036956787109375,
-0.00476837158203125,
0.0031375885009765625,
-0.08380126953125,
-0.0555419921875,
0.0021820068359375,
-0.0369873046875,
-0.0006613731384277344,
0.025238037109375,
0.05419921875,
0.0159759521484375,
0.01099395751953125,
-0.031280517578125,
0.021759033203125,
0.037109375,
-0.0131072998046875,
0.032257080078125,
-0.0007205009460449219,
-0.021026611328125,
0.049346923828125,
-0.0027256011962890625,
-0.0020160675048828125,
0.011505126953125,
0.0289306640625,
0.01305389404296875,
-0.010833740234375,
-0.0027599334716796875,
0.01201629638671875,
-0.0139312744140625,
0.054718017578125,
0.0178680419921875,
-0.021484375,
-0.0238800048828125,
0.022705078125,
0.0230560302734375,
-0.0286407470703125,
-0.03265380859375,
-0.0058135986328125,
-0.006755828857421875,
-0.0071868896484375,
0.05291748046875,
0.055511474609375,
-0.00908660888671875,
0.0174102783203125,
0.023529052734375,
0.03436279296875,
-0.003162384033203125,
0.0144500732421875,
-0.0321044921875,
0.0458984375,
-0.00023055076599121094,
-0.0015811920166015625,
-0.0045013427734375,
-0.0229034423828125,
0.0877685546875,
0.0113677978515625,
-0.051483154296875,
0.0280914306640625,
-0.0313720703125,
-0.00043272972106933594,
0.004055023193359375,
0.0501708984375,
0.00400543212890625,
-0.0022735595703125,
0.00494384765625,
-0.0121612548828125,
0.0200653076171875,
0.003185272216796875,
-0.02093505859375,
0.038665771484375,
0.0308990478515625,
-0.01506805419921875,
0.010711669921875,
0.06781005859375,
-0.01395416259765625,
0.04779052734375,
-0.0193328857421875,
0.01546478271484375,
0.046600341796875,
0.01497650146484375,
0.019927978515625,
0.0217437744140625,
-0.0223846435546875,
0.01275634765625,
0.00037288665771484375,
-0.057769775390625,
0.006900787353515625,
0.0259246826171875,
0.0662841796875,
0.0175323486328125,
-0.0341796875,
0.00827789306640625,
-0.056060791015625,
-0.030670166015625,
0.0241546630859375,
-0.0067596435546875,
-0.04449462890625,
-0.042449951171875,
-0.0023193359375,
0.03057861328125,
0.019378662109375,
0.00083160400390625,
0.03314208984375,
-0.0251007080078125,
0.05792236328125,
-0.040283203125,
0.058807373046875,
-0.033966064453125,
-0.043548583984375,
-0.01739501953125,
-0.0139312744140625,
0.00322723388671875,
-0.00887298583984375,
-0.00940704345703125,
-0.035186767578125,
-0.0189056396484375,
0.051422119140625,
-0.004268646240234375,
0.0230255126953125,
-0.026885986328125,
-0.0202178955078125,
-0.006565093994140625,
0.005023956298828125,
0.047882080078125,
-0.00746917724609375,
-0.037811279296875,
-0.0159759521484375,
-0.05609130859375,
-0.0162811279296875,
-0.00669097900390625,
-0.01910400390625,
-0.03619384765625,
0.0030517578125,
0.0290679931640625,
0.0151214599609375,
-0.0014801025390625,
-0.048980712890625,
-0.032073974609375,
0.00255584716796875,
0.0306549072265625,
-0.047454833984375,
0.00373077392578125,
0.0936279296875,
-0.044921875,
0.0537109375,
0.0165863037109375,
0.06182861328125,
-0.0281524658203125,
-0.0175628662109375,
0.0064849853515625,
-0.05987548828125,
-0.01434326171875,
0.006130218505859375,
-0.030181884765625,
0.00542449951171875,
-0.0035858154296875,
-0.0017881393432617188,
0.059295654296875,
-0.0244140625,
0.00629425048828125,
-0.0030059814453125,
0.009490966796875,
-0.050048828125,
0.037750244140625,
0.0501708984375,
0.005802154541015625,
0.06011962890625,
-0.005779266357421875,
0.0294952392578125,
-0.01922607421875,
-0.0232696533203125,
0.0196685791015625,
0.0108489990234375,
-0.0504150390625,
0.056854248046875,
0.0960693359375,
0.005878448486328125,
0.057464599609375,
0.02252197265625,
-0.00103759765625,
0.0360107421875,
0.025848388671875,
-0.0008902549743652344,
-0.01129913330078125,
0.0645751953125,
0.010528564453125,
-0.0108489990234375,
0.03509521484375,
-0.033233642578125,
0.0088043212890625,
0.050445556640625,
0.049072265625,
-0.0914306640625,
0.0248870849609375,
0.002918243408203125,
0.008453369140625,
0.031829833984375,
-0.020233154296875,
0.002864837646484375,
-0.01320648193359375,
0.0219268798828125,
-0.0029697418212890625,
-0.035064697265625,
-0.010406494140625,
-0.01067352294921875,
0.0306549072265625,
0.002117156982421875,
0.04681396484375,
-0.0049591064453125,
-0.01140594482421875,
-0.05517578125,
-0.0007700920104980469,
-0.0004982948303222656,
-0.007579803466796875,
0.00555419921875,
-0.005939483642578125,
-0.0045318603515625,
-0.0159149169921875,
0.038360595703125,
-0.03350830078125,
0.01268768310546875,
0.01336669921875,
-0.0026721954345703125,
0.005680084228515625,
0.0224456787109375,
-0.0209197998046875,
0.01934814453125,
-0.006542205810546875,
-0.0205535888671875,
0.04608154296875,
0.0110015869140625,
-0.0109710693359375,
-0.04620361328125,
-0.00835418701171875,
-0.027557373046875,
-0.05242919921875,
0.00984954833984375,
-0.01192474365234375,
-0.007549285888671875,
0.11676025390625,
-0.045135498046875,
-0.0210418701171875,
0.0185089111328125,
-0.0097198486328125,
-0.007015228271484375,
-0.010772705078125,
0.00750732421875,
-0.04864501953125,
-0.0153961181640625,
-0.021148681640625,
-0.03179931640625,
0.0203094482421875,
-0.033355712890625,
-0.0254669189453125,
0.039276123046875,
-0.03875732421875,
-0.0036907196044921875,
0.0238494873046875,
0.02142333984375,
0.0037899017333984375,
0.0166778564453125,
-0.0546875,
0.041229248046875,
-0.01007080078125,
0.0462646484375,
-0.0706787109375,
-0.008819580078125,
0.01107025146484375,
0.0343017578125,
0.0347900390625,
0.00998687744140625,
-0.0240020751953125,
0.005176544189453125,
0.033538818359375,
0.039306640625,
-0.004974365234375,
0.026214599609375,
-0.0230865478515625,
0.0369873046875,
0.043701171875,
-0.043304443359375,
0.0076751708984375,
0.04107666015625,
-0.0478515625,
0.004425048828125,
0.022979736328125,
0.009429931640625,
0.035247802734375,
0.007205963134765625,
-0.04046630859375,
0.0308837890625,
0.0225677490234375,
0.006443023681640625,
0.0021820068359375,
0.06201171875,
0.01373291015625,
-0.043365478515625,
-0.0305938720703125,
-0.033538818359375,
0.020416259765625,
-0.0015802383422851562,
-0.01183319091796875,
0.05377197265625,
0.02215576171875,
-0.00475311279296875,
0.00966644287109375,
0.000598907470703125,
0.0114288330078125,
-0.003612518310546875,
0.09185791015625,
-0.004779815673828125,
0.031707763671875,
-0.08648681640625,
-0.057861328125,
0.029937744140625,
0.124267578125,
-0.03924560546875,
0.00803375244140625,
0.00881195068359375,
-0.001659393310546875,
-0.0179290771484375,
-0.028717041015625,
0.0255584716796875,
0.0211029052734375,
0.0163116455078125,
-0.01270294189453125,
-0.0225677490234375,
0.01136016845703125,
0.0250701904296875,
-0.0008058547973632812,
0.0046234130859375,
-0.01751708984375,
-0.0236358642578125,
-0.00836181640625,
-0.0143280029296875,
0.014007568359375,
0.0015211105346679688,
0.0015411376953125,
0.003940582275390625,
0.0235595703125,
0.0131683349609375,
-0.00873565673828125,
0.0233154296875,
-0.02569580078125,
0.0233306884765625,
-0.03192138671875,
-0.03515625,
0.0179443359375,
0.0418701171875,
0.0166015625,
0.0297698974609375,
0.032318115234375,
-0.01287841796875,
-0.00890350341796875,
0.00197601318359375,
0.0208282470703125,
-0.039520263671875,
-0.029266357421875,
-0.040069580078125,
0.0173797607421875,
0.031524658203125,
0.01116180419921875,
0.0206146240234375,
-0.004581451416015625,
0.057373046875,
-0.03900146484375,
0.044342041015625,
-0.0186767578125,
-0.0157928466796875,
0.01415252685546875,
-0.049072265625,
0.031768798828125,
-0.0294036865234375,
-0.07440185546875,
-0.015045166015625,
-0.01506805419921875,
-0.047149658203125,
0.03204345703125,
0.0518798828125,
-0.00858306884765625,
-0.0082244873046875,
-0.0034999847412109375,
-0.0019931793212890625,
0.0531005859375,
-0.05316162109375,
0.00904083251953125,
0.046295166015625,
0.01239013671875,
0.01727294921875,
-0.0748291015625,
-0.019775390625,
-0.0225982666015625,
0.005496978759765625,
-0.00823211669921875,
0.07513427734375,
-0.004730224609375,
0.01007843017578125,
-0.00196075439453125,
0.0543212890625,
-0.050537109375,
-0.01537322998046875,
0.0849609375,
-0.021392822265625,
-0.01493072509765625,
-0.0199432373046875,
-0.06396484375,
-0.0191192626953125,
0.037872314453125,
-0.036590576171875,
-0.036865234375,
0.0017681121826171875,
0.03472900390625,
0.0039825439453125,
0.0289764404296875,
-0.013427734375,
0.0221405029296875,
0.00730133056640625,
-0.027099609375,
0.03692626953125,
0.0235443115234375,
0.0107421875,
0.04327392578125,
-0.0017805099487304688,
0.0016031265258789062,
0.02227783203125,
-0.045196533203125,
0.035247802734375,
0.032196044921875,
-0.033172607421875,
0.00875091552734375,
0.004146575927734375,
-0.0110321044921875,
0.0160064697265625,
0.0089874267578125,
-0.035980224609375,
0.031951904296875,
-0.007556915283203125,
0.0303802490234375,
0.0219268798828125,
0.038787841796875,
-0.0225677490234375,
0.003765106201171875,
0.0224456787109375,
0.007472991943359375,
-0.005840301513671875,
0.01473236083984375,
-0.037933349609375,
-0.01309967041015625,
0.005802154541015625,
0.022247314453125,
0.004909515380859375,
-0.01861572265625,
-0.0821533203125,
0.02667236328125,
-0.011199951171875,
0.0113983154296875,
-0.0804443359375,
0.05303955078125,
-0.004833221435546875,
0.03594970703125,
-0.029571533203125,
0.0333251953125,
0.0033245086669921875,
0.03240966796875,
-0.050537109375,
-0.00804901123046875,
-0.0077667236328125,
0.01441192626953125,
-0.023529052734375,
0.0189666748046875,
0.013580322265625,
-0.02435302734375,
-0.0112762451171875,
0.0276031494140625,
0.025238037109375,
0.08294677734375,
0.03118896484375,
-0.0296783447265625,
0.01285552978515625,
-0.00411224365234375,
-0.0003311634063720703,
-0.07196044921875,
-0.005767822265625,
-0.07916259765625,
0.0005736351013183594,
-0.009246826171875,
0.0144195556640625,
0.036529541015625,
-0.038909912109375,
-0.08599853515625,
0.07275390625,
-0.02508544921875,
-0.028228759765625,
-0.00852203369140625,
-0.0169830322265625,
-0.0226287841796875,
0.002750396728515625,
-0.00499725341796875,
-0.0005745887756347656,
-0.00873565673828125,
0.02386474609375,
0.004367828369140625,
0.0609130859375,
0.020294189453125,
-0.0177001953125,
-0.01531219482421875,
-0.014801025390625,
-0.0059051513671875,
0.010467529296875,
0.01300048828125,
-0.0225067138671875,
0.0408935546875,
0.038421630859375,
-0.0312042236328125,
-0.00174713134765625,
-0.0172576904296875,
-0.01226806640625,
0.025482177734375,
-0.04425048828125,
-0.00492095947265625,
-0.035736083984375,
-0.02508544921875,
0.002471923828125,
-0.00279998779296875,
-0.00669097900390625,
0.0151824951171875,
-0.0231781005859375,
0.001617431640625,
0.0026760101318359375,
0.0002639293670654297,
-0.053466796875,
-0.0228271484375,
0.053070068359375,
-0.0168304443359375,
-0.01203155517578125,
0.011749267578125,
-0.0177764892578125,
-0.0117645263671875,
-0.003734588623046875,
-0.004741668701171875,
-0.037322998046875,
0.01471710205078125,
0.05157470703125,
-0.04833984375,
-0.028564453125,
-0.00890350341796875,
0.0142364501953125,
-0.01215362548828125,
-0.05963134765625,
-0.01187896728515625,
-0.045684814453125,
0.0081939697265625,
0.03704833984375,
-0.01552581787109375,
0.0009322166442871094,
-0.02069091796875,
-0.0302276611328125,
-0.0147552490234375,
0.047149658203125,
-0.006103515625,
0.04254150390625,
-0.01446533203125,
0.08355712890625,
0.01123046875,
0.10791015625,
-0.0154876708984375,
0.040252685546875,
-0.00977325439453125,
0.0555419921875,
-0.0264434814453125,
-0.0015001296997070312,
0.00786590576171875,
-0.04656982421875,
0.01318359375,
-0.00124359130859375,
-0.04205322265625,
0.005584716796875,
-0.014556884765625,
0.0008869171142578125,
-0.034698486328125,
0.01068878173828125
] |
749dbeb761a922fe39859fa80e634047fb7f67fb
|
Wordpress Stackexchange
Q: How to only hook on Single.php after content? I am currently hooking on the_content() but that goes through the Wordpress loop too. How can I only hook on the Single.php page?
Also, is there a way to only look on the first X posts in the Wordpress loop?
By the way, I am creating a plugin
A: Just to add to Pippin's answer, in my case some content were also being shown in other parts of the single page, e.g. sidebar. Checking just is_single() also triggered the content modification in the other areas. Here's another check so that only the main content will have appended stuff:
function yourprefix_add_to_content( $content ) {
if( is_single() && ! empty( $GLOBALS['post'] ) ) {
if ( $GLOBALS['post']->ID == get_the_ID() ) {
$content .= 'Your new content here';
}
}
return $content;
}
add_filter('the_content', 'yourprefix_add_to_content');
|
Q: How to only hook on Single.php after content? I am currently hooking on the_content() but that goes through the Wordpress loop too. How can I only hook on the Single.php page?
Also, is there a way to only look on the first X posts in the Wordpress loop?
By the way, I am creating a plugin
A: Just to add to Pippin's answer, in my case some content were also being shown in other parts of the single page, e.g. sidebar. Checking just is_single() also triggered the content modification in the other areas. Here's another check so that only the main content will have appended stuff:
function yourprefix_add_to_content( $content ) {
if( is_single() && ! empty( $GLOBALS['post'] ) ) {
if ( $GLOBALS['post']->ID == get_the_ID() ) {
$content .= 'Your new content here';
}
}
return $content;
}
add_filter('the_content', 'yourprefix_add_to_content');
A: This will handle appending the content to single posts:
function yourprefix_add_to_content( $content ) {
if( is_single() ) {
$content .= 'Your new content here';
}
return $content;
}
add_filter( 'the_content', 'yourprefix_add_to_content' );
|
wordpress
|
{
"language": "en",
"length": 174,
"provenance": "stackexchange_00019.jsonl.gz:421337",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56884"
}
|
[
0.04345703125,
-0.0261993408203125,
0.0228118896484375,
-0.0208740234375,
0.00490570068359375,
-0.0174713134765625,
0.056884765625,
-0.0203094482421875,
-0.0238494873046875,
0.018951416015625,
-0.01201629638671875,
0.025115966796875,
-0.0203399658203125,
-0.032318115234375,
0.0213165283203125,
-0.024200439453125,
0.02777099609375,
-0.049285888671875,
0.0238494873046875,
-0.0071563720703125,
0.031829833984375,
0.0010967254638671875,
0.0284423828125,
0.03216552734375,
-0.002887725830078125,
-0.0085601806640625,
0.0679931640625,
-0.0285186767578125,
0.0192718505859375,
-0.008819580078125,
0.015228271484375,
-0.0164794921875,
0.01739501953125,
0.032073974609375,
-0.0555419921875,
0.0109710693359375,
-0.018707275390625,
0.01465606689453125,
-0.0054931640625,
0.0322265625,
0.0201263427734375,
-0.005695343017578125,
-0.004856109619140625,
0.0625,
-0.01107025146484375,
-0.053070068359375,
0.032196044921875,
-0.05615234375,
0.032958984375,
-0.060089111328125,
0.015594482421875,
-0.0011034011840820312,
0.02874755859375,
-0.034637451171875,
-0.0252227783203125,
0.006366729736328125,
-0.034027099609375,
-0.0275726318359375,
0.027618408203125,
0.026123046875,
-0.007709503173828125,
-0.040191650390625,
0.01438140869140625,
-0.03851318359375,
-0.004146575927734375,
-0.01215362548828125,
-0.02069091796875,
0.03955078125,
-0.07183837890625,
-0.04296875,
0.02899169921875,
-0.049713134765625,
-0.01309967041015625,
-0.00919342041015625,
-0.029205322265625,
0.008392333984375,
0.01947021484375,
-0.0163726806640625,
-0.0052642822265625,
0.01239013671875,
-0.023834228515625,
-0.0086517333984375,
-0.03521728515625,
-0.0302886962890625,
0.03118896484375,
0.00629425048828125,
-0.0233612060546875,
0.0008521080017089844,
-0.00353240966796875,
0.0008406639099121094,
-0.0274658203125,
0.056396484375,
0.03759765625,
-0.04736328125,
-0.06329345703125,
-0.0120391845703125,
0.0294189453125,
0.033782958984375,
0.00136566162109375,
-0.014312744140625,
0.01273345947265625,
-0.0474853515625,
0.0055389404296875,
-0.0328369140625,
0.0260162353515625,
0.01366424560546875,
-0.0013608932495117188,
-0.03173828125,
0.045745849609375,
0.0145263671875,
-0.0154571533203125,
0.06634521484375,
-0.0115814208984375,
0.0235443115234375,
-0.04400634765625,
-0.0024852752685546875,
-0.0330810546875,
-0.0014934539794921875,
-0.0298309326171875,
0.0343017578125,
0.0020275115966796875,
0.0079193115234375,
-0.00754547119140625,
-0.0196075439453125,
0.014190673828125,
-0.020843505859375,
-0.037872314453125,
0.0127410888671875,
-0.0250244140625,
0.01605224609375,
-0.011016845703125,
-0.007312774658203125,
0.050079345703125,
0.0599365234375,
0.01019287109375,
-0.015289306640625,
0.007198333740234375,
0.0274200439453125,
-0.00664520263671875,
0.0166168212890625,
-0.01451873779296875,
-0.03387451171875,
0.002285003662109375,
-0.0196990966796875,
0.0126495361328125,
-0.0032138824462890625,
0.0072021484375,
0.032745361328125,
0.0259857177734375,
-0.0253143310546875,
0.022674560546875,
0.0019931793212890625,
0.028656005859375,
-0.0004489421844482422,
-0.00478363037109375,
-0.039794921875,
0.03973388671875,
-0.04541015625,
0.0027561187744140625,
-0.046722412109375,
0.028106689453125,
-0.021453857421875,
-0.029937744140625,
-0.014617919921875,
-0.06671142578125,
0.019805908203125,
-0.0184478759765625,
-0.00537872314453125,
0.005535125732421875,
-0.0399169921875,
-0.006717681884765625,
0.0191802978515625,
0.0054779052734375,
-0.0185394287109375,
-0.007568359375,
-0.0023040771484375,
-0.05096435546875,
0.04364013671875,
0.01482391357421875,
0.0304107666015625,
0.0210113525390625,
-0.034698486328125,
0.0214996337890625,
0.027374267578125,
-0.0777587890625,
0.06951904296875,
0.01085662841796875,
0.06536865234375,
0.0062713623046875,
0.0016965866088867188,
0.059783935546875,
0.03656005859375,
-0.04046630859375,
0.0219268798828125,
-0.01012420654296875,
-0.0126953125,
-0.0174560546875,
0.004283905029296875,
-0.02459716796875,
-0.002063751220703125,
0.043609619140625,
-0.0023822784423828125,
0.0212860107421875,
-0.0231170654296875,
-0.03973388671875,
-0.00994873046875,
-0.0203704833984375,
0.030120849609375,
-0.00446319580078125,
-0.00458526611328125,
0.01476287841796875,
-0.02154541015625,
0.00511932373046875,
-0.0240020751953125,
-0.0322265625,
0.00893402099609375,
-0.0157623291015625,
0.0263824462890625,
-0.0006804466247558594,
0.046051025390625,
0.0280914306640625,
-0.007617950439453125,
0.0032024383544921875,
-0.0181427001953125,
0.1064453125,
0.000274658203125,
-0.01361083984375,
-0.0257110595703125,
0.046905517578125,
0.0192108154296875,
-0.091064453125,
0.037567138671875,
-0.036224365234375,
-0.01800537109375,
-0.040771484375,
0.018402099609375,
0.0061187744140625,
0.006458282470703125,
-0.004058837890625,
0.0311737060546875,
0.04425048828125,
0.03802490234375,
-0.0007867813110351562,
0.003559112548828125,
0.019378662109375,
-0.064453125,
0.0166168212890625,
-0.027557373046875,
0.0191192626953125,
0.0587158203125,
0.00562286376953125,
0.0195159912109375,
0.005077362060546875,
-0.058197021484375,
0.03033447265625,
0.0165557861328125,
0.0097503662109375,
0.0185394287109375,
-0.033966064453125,
0.00485992431640625,
0.01959228515625,
0.01934814453125,
-0.0240936279296875,
-0.00750732421875,
0.01474761962890625,
0.004161834716796875,
0.05029296875,
0.052947998046875,
0.0264129638671875,
-0.017242431640625,
-0.022918701171875,
0.0269012451171875,
-0.00260162353515625,
0.012939453125,
0.006801605224609375,
-0.0095977783203125,
-0.01678466796875,
-0.0001837015151977539,
0.0220794677734375,
-0.01000213623046875,
-0.0015687942504882812,
0.033355712890625,
0.0268096923828125,
-0.01385498046875,
-0.00408935546875,
-0.01055145263671875,
0.007190704345703125,
-0.0220794677734375,
0.01629638671875,
0.0002589225769042969,
0.0182037353515625,
0.033538818359375,
-0.012603759765625,
0.021728515625,
0.01171112060546875,
-0.00603485107421875,
-0.0034542083740234375,
-0.03240966796875,
0.0361328125,
-0.034576416015625,
0.03314208984375,
0.064208984375,
-0.012420654296875,
0.0022945404052734375,
0.00612640380859375,
-0.01104736328125,
0.005329132080078125,
-0.01087188720703125,
-0.02606201171875,
0.01345062255859375,
-0.069091796875,
0.0089263916015625,
0.0131683349609375,
0.0848388671875,
-0.007114410400390625,
-0.040985107421875,
0.027099609375,
0.040771484375,
-0.018951416015625,
-0.041412353515625,
-0.000045180320739746094,
-0.035858154296875,
0.01203155517578125,
-0.007663726806640625,
-0.0102081298828125,
-0.02459716796875,
0.009613037109375,
-0.004974365234375,
-0.00678253173828125,
-0.008636474609375,
-0.069091796875,
-0.0300750732421875,
-0.0614013671875,
0.07220458984375,
-0.01593017578125,
0.033203125,
0.01111602783203125,
0.047821044921875,
0.018463134765625,
-0.03564453125,
0.0311126708984375,
0.033355712890625,
-0.05615234375,
-0.030181884765625,
-0.039093017578125,
-0.00608062744140625,
-0.0234527587890625,
0.0169219970703125,
-0.044158935546875,
-0.031707763671875,
0.023712158203125,
-0.0310516357421875,
-0.01197052001953125,
0.01001739501953125,
0.0297088623046875,
0.0396728515625,
0.01018524169921875,
0.01050567626953125,
0.055938720703125,
-0.02667236328125,
-0.00862884521484375,
-0.02703857421875,
-0.06024169921875,
-0.00746917724609375,
0.039764404296875,
0.004329681396484375,
-0.0291595458984375,
-0.00731658935546875,
-0.040069580078125,
-0.01535797119140625,
-0.01351165771484375,
-0.01074981689453125,
0.0041961669921875,
-0.021881103515625,
-0.0478515625,
0.032867431640625,
0.01387786865234375,
-0.012359619140625,
0.0206451416015625,
0.01120758056640625,
0.0247955322265625,
8.344650268554688e-7,
-0.00894927978515625,
-0.05194091796875,
-0.0023746490478515625,
0.0153045654296875,
-0.0085296630859375,
0.060760498046875,
-0.03631591796875,
-0.0182037353515625,
-0.0289764404296875,
0.06219482421875,
-0.1239013671875,
0.00490570068359375,
0.001766204833984375,
0.0013370513916015625,
0.0296478271484375,
-0.0305023193359375,
-0.071044921875,
-0.035369873046875,
-0.07672119140625,
0.024688720703125,
0.00003129243850708008,
-0.01432037353515625,
-0.012664794921875,
-0.025360107421875,
-0.04388427734375,
-0.03448486328125,
0.035980224609375,
-0.06622314453125,
0.00897979736328125,
0.048370361328125,
-0.01309967041015625,
0.0208740234375,
-0.035797119140625,
-0.046173095703125,
-0.06793212890625,
-0.0119476318359375,
0.00649261474609375,
0.0278167724609375,
0.0107269287109375,
-0.0224609375,
-0.033355712890625,
0.0157623291015625,
-0.0029277801513671875,
-0.024658203125,
0.01424407958984375,
0.0106658935546875,
0.0158843994140625,
0.0088348388671875,
0.002544403076171875,
-0.0254974365234375,
-0.0042724609375,
-0.01279449462890625,
0.002475738525390625,
0.058929443359375,
-0.033203125,
-0.00795745849609375,
-0.0272216796875,
-0.00914764404296875,
-0.055999755859375,
-0.0177001953125,
0.00010418891906738281,
0.041473388671875,
-0.024261474609375,
0.042388916015625,
-0.0305023193359375,
-0.07171630859375,
0.0269317626953125,
-0.0156707763671875,
-0.0280303955078125,
0.0124359130859375,
0.0616455078125,
0.0304107666015625,
-0.0131378173828125,
-0.0316162109375,
-0.0166778564453125,
0.027130126953125,
-0.025177001953125,
0.063232421875,
0.0232086181640625,
-0.0078277587890625,
0.09783935546875,
-0.01398468017578125,
0.03656005859375,
-0.03546142578125,
0.055999755859375,
0.01361083984375,
0.0186920166015625,
0.006103515625,
0.0144805908203125,
-0.0008215904235839844,
-0.01296234130859375,
-0.026458740234375,
0.0122833251953125,
0.04736328125,
0.01119232177734375,
-0.04638671875,
0.054412841796875,
0.00250244140625,
-0.012237548828125,
-0.01824951171875,
0.0982666015625,
0.0173797607421875,
0.050933837890625,
0.0194091796875,
0.023681640625,
0.059326171875,
-0.01445770263671875,
0.0164337158203125,
0.016082763671875,
0.00623321533203125,
0.02984619140625,
0.0172119140625,
-0.0140838623046875,
-0.0183563232421875,
-0.007022857666015625,
0.006374359130859375,
0.0012598037719726562,
-0.06060791015625,
0.00933074951171875,
-0.006710052490234375,
-0.00771331787109375,
0.005817413330078125,
0.031280517578125,
-0.005008697509765625,
-0.021270751953125,
-0.0110321044921875,
-0.020599365234375,
-0.0021038055419921875,
-0.01145172119140625,
-0.0243072509765625,
0.03228759765625,
0.00977325439453125,
-0.0207977294921875,
0.058441162109375,
-0.047149658203125,
-0.0038738250732421875,
0.00003892183303833008,
-0.01276397705078125,
0.021942138671875,
0.011383056640625,
0.01183319091796875,
0.018890380859375,
0.032196044921875,
-0.021026611328125,
0.000014543533325195312,
0.02215576171875,
-0.021331787109375,
-0.01398468017578125,
0.004741668701171875,
0.00901031494140625,
-0.0257720947265625,
-0.0035915374755859375,
0.027496337890625,
0.01152801513671875,
-0.0107574462890625,
0.038330078125,
0.0229034423828125,
-0.036834716796875,
-0.0078582763671875,
0.0129852294921875,
0.01708984375,
-0.002628326416015625,
0.0033626556396484375,
0.0232391357421875,
-0.0219268798828125,
-0.01079559326171875,
0.02044677734375,
-0.031219482421875,
-0.0118408203125,
-0.00928497314453125,
-0.01434326171875,
-0.037109375,
0.0233001708984375,
-0.0312042236328125,
0.0033016204833984375,
-0.015960693359375,
0.01229095458984375,
0.005359649658203125,
-0.0293121337890625,
0.08258056640625,
-0.0209197998046875,
-0.041656494140625,
-0.0204010009765625,
0.016204833984375,
0.033935546875,
0.04217529296875,
-0.0401611328125,
0.03350830078125,
-0.03662109375,
0.0115966796875,
0.0264739990234375,
-0.0667724609375,
-0.024749755859375,
-0.055877685546875,
0.045074462890625,
0.0321044921875,
0.0022430419921875,
-0.042327880859375,
-0.0033092498779296875,
0.00444793701171875,
0.0023860931396484375,
0.07177734375,
-0.02752685546875,
0.085693359375,
0.0168914794921875,
0.04791259765625,
0.02203369140625,
0.050689697265625,
-0.0010738372802734375,
-0.025177001953125,
-0.01342010498046875,
-0.056427001953125,
0.00975799560546875,
0.007152557373046875,
0.0193328857421875,
0.036407470703125,
0.0174102783203125,
0.0125274658203125,
-0.0115814208984375,
0.010009765625,
0.0105438232421875,
-0.0110015869140625,
0.005931854248046875,
0.0279541015625,
-0.040252685546875,
0.032684326171875,
0.01241302490234375,
0.013275146484375,
0.008056640625,
-0.031036376953125,
-0.016326904296875,
0.035186767578125,
-0.010498046875,
0.00009143352508544922,
-0.002292633056640625,
0.005527496337890625,
0.017181396484375,
0.01088714599609375,
0.04791259765625,
0.0028362274169921875,
0.02252197265625,
0.01456451416015625,
-0.00939178466796875,
0.0077667236328125,
-0.012420654296875,
0.03314208984375,
-0.006626129150390625,
0.0171661376953125,
0.03240966796875,
-0.0200653076171875,
0.0017404556274414062,
0.0305023193359375,
0.035125732421875,
-0.065185546875,
0.006931304931640625,
0.007259368896484375,
0.00270843505859375,
0.007541656494140625,
-0.0145111083984375,
0.0003542900085449219,
0.00618743896484375,
0.06280517578125,
0.051422119140625,
-0.01458740234375,
0.053009033203125,
0.01284027099609375,
-0.0110015869140625,
-0.01348876953125,
0.00775909423828125,
0.0162200927734375,
-0.06207275390625,
0.038909912109375,
0.03594970703125,
0.0177154541015625,
-0.036712646484375,
-0.007720947265625,
0.0350341796875,
-0.037017822265625,
-0.07159423828125,
0.0065155029296875,
0.005611419677734375,
-0.011260986328125,
0.0579833984375,
-0.00762176513671875,
-0.0283966064453125,
0.038238525390625,
-0.032989501953125,
0.04425048828125,
-0.0014715194702148438,
-0.053314208984375,
-0.07965087890625,
-0.01546478271484375,
0.00650787353515625,
0.026031494140625,
-0.042266845703125,
0.036346435546875,
-0.032470703125,
-0.0143280029296875,
0.00658416748046875,
-0.050628662109375,
0.026123046875,
-0.0210723876953125,
-0.00722503662109375,
0.035369873046875,
-0.014251708984375,
-0.01435089111328125,
-0.016021728515625,
0.0277557373046875,
-0.03643798828125,
-0.01036834716796875,
-0.006587982177734375,
-0.011016845703125,
-0.023529052734375,
-0.03594970703125,
-0.069091796875,
0.11907958984375,
-0.0251617431640625,
0.0241851806640625,
0.01136016845703125,
0.04193115234375,
-0.03173828125,
0.005512237548828125,
-0.050750732421875,
0.08306884765625,
0.0283355712890625,
0.09063720703125,
-0.035919189453125,
-0.0032176971435546875,
0.05633544921875,
0.0241546630859375,
0.037750244140625,
0.006206512451171875,
-0.0007910728454589844,
-0.0100860595703125,
0.0277862548828125,
0.01708984375,
-0.0213165283203125,
0.0181427001953125,
-0.01531982421875,
0.0189056396484375,
-0.005168914794921875,
-0.016754150390625,
0.0345458984375,
-0.0269012451171875,
-0.04730224609375,
0.0312347412109375,
0.03814697265625,
0.0298004150390625,
0.046142578125,
0.0148773193359375,
-0.0516357421875,
0.0302886962890625,
0.042022705078125,
0.0032444000244140625,
-0.0176849365234375,
0.0423583984375,
0.011383056640625,
0.006145477294921875,
0.039642333984375,
-0.05108642578125,
0.05450439453125,
-0.0025043487548828125,
0.0426025390625,
0.014892578125,
0.023406982421875,
0.06719970703125,
-0.01396942138671875,
0.01476287841796875,
0.03985595703125,
-0.02679443359375,
0.021392822265625,
0.00902557373046875,
0.0173187255859375,
-0.0421142578125,
-0.0042572021484375,
0.01433563232421875,
0.03985595703125,
-0.0223541259765625,
-0.03717041015625,
0.003936767578125,
-0.0005054473876953125,
-0.0103759765625,
0.0194854736328125,
0.00861358642578125,
0.02642822265625,
0.046600341796875,
-0.03900146484375,
-0.0176544189453125,
0.0301666259765625,
0.053131103515625,
0.00460052490234375,
0.0206451416015625,
-0.044921875,
-0.05010986328125,
-0.01239013671875,
0.0035152435302734375,
0.01091766357421875,
0.0142669677734375,
-0.013916015625,
0.0450439453125,
0.0002123117446899414,
0.01041412353515625,
-0.005428314208984375,
0.0036602020263671875,
-0.0389404296875,
0.0247039794921875,
-0.07257080078125,
-0.06622314453125,
0.0036106109619140625,
0.05548095703125,
0.059783935546875,
0.0034503936767578125,
0.028900146484375,
0.0116119384765625,
-0.0196075439453125,
-0.0012969970703125,
0.0189208984375,
-0.01432037353515625,
-0.0213775634765625,
-0.005321502685546875,
-0.01055145263671875,
0.032257080078125,
-0.019287109375,
0.005901336669921875,
0.00592041015625,
0.049224853515625,
0.0081634521484375,
0.0196685791015625,
0.00705718994140625,
-0.04638671875,
0.0202789306640625,
0.01024627685546875,
0.08587646484375,
0.0290985107421875,
-0.06494140625,
0.0019216537475585938,
-0.03265380859375,
-0.0703125,
0.027679443359375,
0.045623779296875,
-0.01380157470703125,
0.01435089111328125,
0.017608642578125,
0.0352783203125,
-0.0159759521484375,
-0.0318603515625,
0.01204681396484375,
-0.021881103515625,
0.030609130859375,
0.01605224609375,
-0.03912353515625,
-0.0303192138671875,
0.008026123046875,
0.050262451171875,
-0.003864288330078125,
0.00794219970703125,
0.01470947265625,
0.0214691162109375,
-0.00811004638671875,
-0.01508331298828125,
-0.01187896728515625,
-0.01204681396484375,
0.016143798828125,
-0.0014820098876953125,
0.01248931884765625,
-0.0085906982421875,
-0.0177459716796875,
0.01448822021484375,
0.03582763671875,
-0.01493072509765625,
0.0185546875,
-0.033172607421875,
0.0209503173828125,
-0.014617919921875,
0.04254150390625,
-0.01399993896484375,
0.007289886474609375,
-0.0300140380859375,
-0.023712158203125,
0.0509033203125,
0.0163726806640625,
0.007724761962890625,
0.02130126953125,
-0.0298919677734375,
-0.0236358642578125,
-0.0091705322265625,
-0.006175994873046875,
-0.06317138671875,
0.0128326416015625,
0.01849365234375,
-0.0082855224609375,
0.0037078857421875,
-0.0184326171875,
0.0004992485046386719,
0.0195159912109375,
0.0006132125854492188,
0.00852203369140625,
-0.02716064453125,
0.033233642578125,
0.042022705078125,
0.05621337890625,
-0.01715087890625,
0.01532745361328125,
0.047149658203125,
-0.00702667236328125,
-0.018463134765625,
0.036102294921875,
-0.0197601318359375,
-0.024444580078125,
-0.0161590576171875,
-0.0022182464599609375,
-0.02392578125,
-0.05279541015625,
-0.0657958984375,
-0.0022830963134765625,
0.051422119140625,
-0.0164947509765625,
-0.0284576416015625,
0.003681182861328125,
-0.058929443359375,
0.056976318359375,
-0.010711669921875,
0.0185546875,
-0.006862640380859375,
-0.01107025146484375,
-0.055908203125,
-0.022064208984375,
-0.0284576416015625,
0.0178375244140625,
-0.0020599365234375,
-0.00008553266525268555,
0.0254364013671875,
0.0056304931640625,
-0.0234375,
-0.0247039794921875,
-0.0404052734375,
0.037994384765625,
-0.03204345703125,
-0.01544952392578125,
0.030914306640625,
-0.009979248046875,
-0.0008311271667480469,
0.002315521240234375,
0.00988006591796875,
-0.023162841796875,
-0.02752685546875,
-0.0031337738037109375,
-0.00374603271484375,
0.0220947265625,
-0.0386962890625,
-0.056671142578125,
0.065185546875,
-0.01108551025390625,
-0.0225372314453125,
-0.0657958984375,
0.009613037109375,
0.0178375244140625,
-0.039154052734375,
-0.04754638671875,
0.00882720947265625,
-0.020294189453125,
0.05908203125,
-0.006702423095703125,
-0.0152435302734375,
0.05218505859375,
-0.036407470703125,
-0.0131378173828125,
-0.01119232177734375,
0.003650665283203125,
-0.02874755859375,
-0.00862884521484375,
-0.0267791748046875,
0.06878662109375,
0.035400390625,
-0.046905517578125,
0.0626220703125,
0.0303955078125,
0.0286712646484375,
-0.018402099609375,
-0.034027099609375,
-0.05413818359375,
-0.03216552734375,
0.12127685546875,
0.05841064453125,
0.0406494140625,
-0.032196044921875,
0.018402099609375,
-0.0086669921875,
-0.060943603515625,
0.01053619384765625,
0.033172607421875,
-0.04052734375,
0.01529693603515625,
0.0089263916015625,
-0.0122833251953125,
0.0262298583984375,
0.01009368896484375,
-0.0296783447265625,
-0.002838134765625,
0.00939178466796875,
0.016876220703125,
-0.10498046875,
0.0010995864868164062,
0.0092620849609375,
-0.015655517578125,
0.00014507770538330078,
0.009796142578125,
-0.00978851318359375,
-0.00978851318359375,
0.042724609375,
0.054168701171875,
0.022735595703125,
-0.05535888671875,
-0.0035228729248046875,
0.038482666015625,
0.0012350082397460938,
-0.0301513671875,
-0.0509033203125,
-0.04437255859375,
0.007965087890625,
0.0214385986328125,
0.01358795166015625,
0.008270263671875,
-0.020751953125,
0.0192413330078125,
0.043426513671875,
-0.0261993408203125,
0.06500244140625,
-0.00615692138671875,
0.0031185150146484375,
-0.0180511474609375,
0.0170745849609375,
0.008941650390625,
-0.0015802383422851562,
-0.0033721923828125,
0.004482269287109375,
-0.012725830078125,
-0.039764404296875,
0.0237884521484375,
-0.01297760009765625,
0.00246429443359375,
0.01337432861328125
] |
94f73c51beeb30331c19243bcef78e956db827d0
|
Wordpress Stackexchange
Q: If I rename a plugin (in its main php file) do I still get update notifications? I've recently been forced to edit the core files of a plugin. I've updated the title of said plugin to indicate that its been edited.
My question is will the plugin still get update notifications? If so, I'll likely disable the updates for this plugin, to prevent someone forgetting about my updates and overwriting.
Ideally, I would like to see if the plugin gets updates, but not allow them to happen just by clicking update. (it would have to be uninstalled and reinstalled, or similar).
A: You can't disable updates but not update notifications - they're tied together.
To disable notifications altogether, change the folder name the plugin sits in.
My personal method is prepend 3 a's to the title of the plugin in the main plugin.php file, so in my plugin list I see AAA/Plugin Name. This puts it up at the top of the list for reference, and will show in the plugin list and in the update list. It's basically a personal flag so I know to not autoupdate those specific plugins.
|
Q: If I rename a plugin (in its main php file) do I still get update notifications? I've recently been forced to edit the core files of a plugin. I've updated the title of said plugin to indicate that its been edited.
My question is will the plugin still get update notifications? If so, I'll likely disable the updates for this plugin, to prevent someone forgetting about my updates and overwriting.
Ideally, I would like to see if the plugin gets updates, but not allow them to happen just by clicking update. (it would have to be uninstalled and reinstalled, or similar).
A: You can't disable updates but not update notifications - they're tied together.
To disable notifications altogether, change the folder name the plugin sits in.
My personal method is prepend 3 a's to the title of the plugin in the main plugin.php file, so in my plugin list I see AAA/Plugin Name. This puts it up at the top of the list for reference, and will show in the plugin list and in the update list. It's basically a personal flag so I know to not autoupdate those specific plugins.
A: As SickHippie says and AFAIK, you can't have both. I'm adding an answer with the info I collected in this Stack.
Disable update notification for individual plugins
Bainternet in a Comment:
Simply open up the plugin file and change the version number to something like 9.9.9
Hameedullah Khan's Answer (removing Akismet update notice):
function filter_plugin_updates( $value ) {
unset( $value->response['akismet/akismet.php'] );
return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );
What Triggers a Plugin Update Alert
Otto's Answer:
The API uses a rather elaborate mechanism to match plugins against
plugins it knows about, but these are the main things checked for:
Plugin URI, Plugin Name, and Plugin slug (the directory name the
plugin is in)
Change any of those and you reduce the chances of it finding a match,
but it might still get it if two of them match, for example.
Info in the readme.txt is not used for this. The header of the
plugin's PHP file itself is used.
Alternative approach 1
*
*Modify the plugin to check updates in your own custom Repository.
*You will have to follow the original plugin updates, either visiting the official Repo regularly or having the original installed in some other WordPress installation.
*When you decide your modified plugin must be updated, commit it to your Repo and you'll get the notification
*Tutorial: http://wp.tutsplus.com/tutorials/plugins/a-guide-to-the-wordpress-http-api-automatic-plugin-updates/
*The book Professional WordPress Plugin Development, by Brad Williams, Ozh Richard and Justin Tadlock, has a chapter on this matter
Alternative approach 2 pulled from the Comments
*
*change the plugin name, version number, and directory name
*install the original plugin but leave it deactivated to receive update notices
*add a custom message to the plugin description (or replace the original)
*remove the plugin actions (Activate|Edit|Delete) and the checkbox for Bulk Actions
add_filter( 'all_plugins', 'wpse_56968_on_list_plugins' );
add_filter( 'plugin_action_links_akismet/akismet.php', 'wpse_56968_remove_plugin_actions', 10, 4 );
add_action( 'admin_head-plugins.php', 'wpse_56968_remove_plugin_checkbox' );
function wpse_56968_on_list_plugins( $plugins )
{
$plugins['akismet/akismet.php']['Description'] = '<strong>*** NOTICE: PLUGIN ONLY TO CHECK UPDATES IN THE ORIGINAL ONE! ***</strong> ';// . $plugins['akismet/akismet.php']['Description'];
return $plugins;
}
function wpse_56968_remove_plugin_actions( $actions, $plugin_file, $plugin_data, $context )
{
unset( $actions['activate'], $actions['edit'], $actions['delete'] );
return $actions;
}
function wpse_56968_remove_plugin_checkbox()
{
?>
<script type="text/javascript">
jQuery(document).ready( function($) {
$('tr#akismet th.check-column').html(' ')
});
</script>
<?php
}
Related Core Tickets
*
*#10814 Plugin GUIDs
*#8964 Allow adding headers to get_plugin_data
|
wordpress
|
{
"language": "en",
"length": 568,
"provenance": "stackexchange_00019.jsonl.gz:421361",
"question_score": "18",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/56968"
}
|
[
0.040435791015625,
0.0016918182373046875,
-0.00342559814453125,
-0.01690673828125,
0.007328033447265625,
-0.0159912109375,
0.032073974609375,
-0.010467529296875,
0.0036468505859375,
0.03955078125,
0.010101318359375,
-0.0092315673828125,
0.024261474609375,
-0.040771484375,
0.00029468536376953125,
-0.0077972412109375,
0.0269775390625,
-0.0078277587890625,
-0.0020542144775390625,
-0.029388427734375,
0.0086822509765625,
0.0037975311279296875,
-0.0030670166015625,
0.056549072265625,
-0.0270843505859375,
-0.00396728515625,
0.12493896484375,
-0.01203155517578125,
-0.01522064208984375,
-0.0304107666015625,
0.0085906982421875,
0.004245758056640625,
0.0214385986328125,
0.05413818359375,
-0.06207275390625,
-0.006591796875,
0.01226806640625,
0.0033321380615234375,
-0.002681732177734375,
0.038909912109375,
0.0267486572265625,
0.0035457611083984375,
0.027496337890625,
-0.0060272216796875,
0.00823211669921875,
-0.052734375,
0.050628662109375,
-0.0372314453125,
0.03582763671875,
-0.0189208984375,
0.01433563232421875,
0.0265350341796875,
0.032562255859375,
-0.044708251953125,
-0.0107879638671875,
0.014862060546875,
-0.07720947265625,
0.08990478515625,
0.0123443603515625,
0.020477294921875,
-0.01309967041015625,
0.008056640625,
-0.0018186569213867188,
-0.035247802734375,
0.0274658203125,
-0.03045654296875,
0.02886962890625,
0.0029201507568359375,
-0.047637939453125,
0.043182373046875,
0.07171630859375,
-0.0391845703125,
0.00588226318359375,
0.00321197509765625,
0.0239715576171875,
-0.0310821533203125,
-0.001758575439453125,
-0.0243072509765625,
0.0281829833984375,
0.01348114013671875,
0.0287017822265625,
-0.00931549072265625,
0.047607421875,
-0.008697509765625,
0.0064544677734375,
0.0258636474609375,
0.0023670196533203125,
-0.0210723876953125,
-0.01129913330078125,
0.04248046875,
-0.020172119140625,
0.0293121337890625,
0.0118408203125,
0.04815673828125,
-0.008087158203125,
0.027618408203125,
0.0126800537109375,
0.0743408203125,
-0.054229736328125,
0.0025196075439453125,
-0.01419830322265625,
-0.015899658203125,
-0.00423431396484375,
-0.03582763671875,
-0.01287078857421875,
0.047271728515625,
0.022491455078125,
-0.012908935546875,
-0.0037174224853515625,
0.001567840576171875,
-0.00432586669921875,
0.004642486572265625,
0.001087188720703125,
-0.0166778564453125,
0.0111541748046875,
-0.0001399517059326172,
-0.047515869140625,
0.049407958984375,
-0.00786590576171875,
0.0345458984375,
0.0185546875,
0.06268310546875,
-0.08026123046875,
-0.024627685546875,
0.01580810546875,
-0.0176849365234375,
0.006763458251953125,
0.0178985595703125,
-0.0278167724609375,
0.0137939453125,
-0.0306243896484375,
-0.006229400634765625,
0.06048583984375,
0.05322265625,
0.026153564453125,
-0.01708984375,
0.01271820068359375,
0.0101470947265625,
0.0005350112915039062,
0.014801025390625,
0.002353668212890625,
-0.01227569580078125,
0.021209716796875,
-0.0144195556640625,
0.00687408447265625,
-0.014556884765625,
-0.01244354248046875,
0.045196533203125,
0.0474853515625,
0.0033664703369140625,
0.02532958984375,
-0.03936767578125,
0.0289764404296875,
-0.007236480712890625,
0.015655517578125,
-0.033905029296875,
0.03936767578125,
-0.03643798828125,
-0.005947113037109375,
-0.031494140625,
-0.01629638671875,
-0.025360107421875,
0.009674072265625,
-0.0268096923828125,
-0.03466796875,
0.036041259765625,
-0.028594970703125,
-0.004566192626953125,
0.0059661865234375,
-0.003505706787109375,
-0.0037212371826171875,
0.007495880126953125,
-0.005214691162109375,
0.00749969482421875,
0.0122528076171875,
0.01557159423828125,
0.0094757080078125,
-0.0136566162109375,
0.035430908203125,
0.01210784912109375,
-0.041534423828125,
-0.033599853515625,
0.05548095703125,
-0.039031982421875,
-0.0615234375,
0.0182037353515625,
-0.0248260498046875,
0.0264892578125,
0.041229248046875,
-0.01013946533203125,
0.05072021484375,
-0.0305633544921875,
-0.0296173095703125,
0.0208587646484375,
-0.010711669921875,
0.0123443603515625,
0.0211181640625,
0.053253173828125,
-0.0038700103759765625,
-0.056915283203125,
-0.030670166015625,
0.0082244873046875,
-0.036865234375,
0.0077972412109375,
-0.10296630859375,
0.007537841796875,
-0.030792236328125,
0.04583740234375,
0.036346435546875,
0.0391845703125,
0.00201416015625,
0.03228759765625,
-0.0193023681640625,
-0.029205322265625,
-0.036102294921875,
-0.01302337646484375,
-0.004055023193359375,
-0.0009126663208007812,
0.0061492919921875,
0.0211334228515625,
0.0030460357666015625,
0.0396728515625,
-0.0167694091796875,
-0.0021209716796875,
-0.0038661956787109375,
-0.0489501953125,
-0.0031585693359375,
-0.019744873046875,
-0.017547607421875,
-0.012237548828125,
0.0030994415283203125,
0.0309906005859375,
0.008819580078125,
-0.00405120849609375,
-0.0115814208984375,
-0.02325439453125,
-0.0092620849609375,
-0.12432861328125,
0.0229644775390625,
0.06439208984375,
0.016937255859375,
-0.004947662353515625,
-0.00705718994140625,
0.041351318359375,
0.00844573974609375,
-0.00800323486328125,
0.012451171875,
0.0220947265625,
0.04425048828125,
0.041778564453125,
0.0002918243408203125,
-0.03790283203125,
0.0297088623046875,
-0.005229949951171875,
0.01273345947265625,
0.02825927734375,
0.005527496337890625,
-0.005733489990234375,
-0.01849365234375,
0.0007605552673339844,
0.01192474365234375,
-0.0355224609375,
-0.033599853515625,
-0.00576019287109375,
0.032501220703125,
0.0017070770263671875,
0.034271240234375,
0.03173828125,
-0.0255584716796875,
0.0105743408203125,
0.00798797607421875,
-0.004375457763671875,
0.00006657838821411133,
0.057403564453125,
0.033416748046875,
-0.027374267578125,
-0.01097869873046875,
-0.018096923828125,
-0.027069091796875,
0.0240936279296875,
-0.04473876953125,
-0.06658935546875,
-0.0175933837890625,
-0.006137847900390625,
0.0156402587890625,
-0.0263519287109375,
0.038238525390625,
-0.034332275390625,
-0.049835205078125,
-0.02850341796875,
-0.00312042236328125,
0.03228759765625,
-0.018463134765625,
0.0205230712890625,
0.016998291015625,
-0.00365447998046875,
0.016265869140625,
-0.0151519775390625,
0.005290985107421875,
-0.005550384521484375,
0.03515625,
0.06158447265625,
0.0272674560546875,
-0.025177001953125,
0.005268096923828125,
0.008880615234375,
0.0028667449951171875,
-0.003551483154296875,
-0.01512908935546875,
0.05157470703125,
-0.099853515625,
0.0031375885009765625,
0.0019273757934570312,
0.08551025390625,
-0.045684814453125,
-0.0804443359375,
-0.017425537109375,
0.038482666015625,
-0.07647705078125,
-0.02581787109375,
-0.0198211669921875,
-0.0167388916015625,
0.01407623291015625,
0.005527496337890625,
-0.00008124113082885742,
-0.0215606689453125,
0.0328369140625,
0.01438140869140625,
-0.021392822265625,
-0.01035308837890625,
-0.03302001953125,
-0.0189208984375,
-0.041015625,
0.04180908203125,
0.0008993148803710938,
0.0169525146484375,
0.0027027130126953125,
0.068359375,
-0.002655029296875,
-0.058258056640625,
0.01396942138671875,
0.0345458984375,
-0.01302337646484375,
0.0241241455078125,
0.042724609375,
-0.0186920166015625,
0.008056640625,
0.00502777099609375,
-0.002780914306640625,
0.042083740234375,
-0.04705810546875,
-0.0236358642578125,
0.0221099853515625,
0.02008056640625,
0.0229644775390625,
-0.0293731689453125,
-0.0257415771484375,
0.026275634765625,
-0.034454345703125,
-0.033355712890625,
-0.006267547607421875,
0.00390625,
-0.0301361083984375,
-0.0009598731994628906,
0.000942230224609375,
-0.001873016357421875,
-0.0230865478515625,
0.0233917236328125,
-0.01535797119140625,
-0.01483917236328125,
0.005504608154296875,
-0.031768798828125,
0.0245208740234375,
-0.00473785400390625,
-0.007656097412109375,
-0.006465911865234375,
0.00677490234375,
-0.01541900634765625,
0.0179595947265625,
-0.0166015625,
0.005931854248046875,
-0.035980224609375,
0.035064697265625,
-0.0716552734375,
0.00402069091796875,
0.01367950439453125,
-0.08392333984375,
-0.023712158203125,
-0.0146484375,
0.01470184326171875,
0.01468658447265625,
0.043304443359375,
-0.054931640625,
-0.038543701171875,
0.015533447265625,
0.045989990234375,
-0.044952392578125,
-0.01922607421875,
0.00353240966796875,
-0.030303955078125,
-0.09039306640625,
-0.007747650146484375,
0.006465911865234375,
-0.03851318359375,
-0.020538330078125,
0.05255126953125,
-0.061309814453125,
-0.0200347900390625,
0.0284271240234375,
-0.037994384765625,
0.0377197265625,
-0.0153045654296875,
0.0177001953125,
-0.03277587890625,
-0.0184173583984375,
-0.02789306640625,
-0.07464599609375,
0.004383087158203125,
-0.020599365234375,
0.01143646240234375,
-0.017669677734375,
0.01715087890625,
-0.03753662109375,
0.01519775390625,
-0.0016412734985351562,
0.0133209228515625,
-0.01140594482421875,
-0.00870513916015625,
0.0196685791015625,
0.064697265625,
0.016937255859375,
0.0163421630859375,
0.01084136962890625,
0.01082611083984375,
-0.04327392578125,
0.0166015625,
-0.01137542724609375,
-0.0108795166015625,
0.049163818359375,
-0.05426025390625,
-0.0321044921875,
-0.0361328125,
-0.016021728515625,
-0.009002685546875,
-0.0156402587890625,
0.0068511962890625,
-0.0321044921875,
-0.024200439453125,
0.004398345947265625,
-0.017425537109375,
-0.0247344970703125,
0.023223876953125,
0.07879638671875,
0.0225677490234375,
-0.0011081695556640625,
-0.06744384765625,
0.0297393798828125,
0.039642333984375,
0.06024169921875,
0.0304718017578125,
0.01152801513671875,
-0.034515380859375,
0.035919189453125,
0.034088134765625,
0.0007429122924804688,
0.00521087646484375,
0.032684326171875,
-0.005893707275390625,
-0.0357666015625,
0.0209197998046875,
-0.01824951171875,
-0.01465606689453125,
0.017120361328125,
-0.01126861572265625,
-0.0255279541015625,
-0.0077056884765625,
0.0296478271484375,
-0.0236663818359375,
0.069580078125,
0.00446319580078125,
-0.049774169921875,
0.0291290283203125,
0.002552032470703125,
0.002254486083984375,
0.0070037841796875,
-0.0002815723419189453,
-0.01519775390625,
-0.02490234375,
0.00872802734375,
-0.0296630859375,
0.03753662109375,
-0.0458984375,
0.0361328125,
-0.0169677734375,
-0.0238800048828125,
-0.040924072265625,
-0.00736236572265625,
0.0909423828125,
-0.006031036376953125,
-0.0243377685546875,
-0.032989501953125,
-0.01202392578125,
0.0259857177734375,
0.02685546875,
-0.0014362335205078125,
0.0007352828979492188,
0.024749755859375,
-0.0298614501953125,
-0.006053924560546875,
-0.003749847412109375,
0.00627899169921875,
-0.038330078125,
-0.0179901123046875,
0.026092529296875,
-0.047119140625,
0.01381683349609375,
-0.01934814453125,
0.02239990234375,
-0.02117919921875,
-0.01049041748046875,
0.0110626220703125,
0.014129638671875,
-0.01629638671875,
0.01209259033203125,
0.0178375244140625,
0.018524169921875,
-0.051788330078125,
0.0247802734375,
-0.0155487060546875,
-0.0147247314453125,
-0.00901031494140625,
0.012176513671875,
-0.0119171142578125,
-0.00519561767578125,
0.03753662109375,
-0.016387939453125,
-0.036468505859375,
0.049102783203125,
0.0218353271484375,
-0.04052734375,
-0.039947509765625,
0.01378631591796875,
0.06317138671875,
0.0031414031982421875,
-0.0006012916564941406,
-0.0406494140625,
-0.031524658203125,
-0.04638671875,
0.02044677734375,
-0.073974609375,
0.0006461143493652344,
0.02001953125,
-0.020843505859375,
-0.02838134765625,
0.0248870849609375,
-0.060150146484375,
-0.018768310546875,
-0.0245208740234375,
-0.01522064208984375,
0.046722412109375,
-0.0275115966796875,
0.03155517578125,
-0.019683837890625,
-0.014251708984375,
0.036468505859375,
0.0181884765625,
0.038726806640625,
0.01204681396484375,
-0.073974609375,
-0.00975799560546875,
-0.046142578125,
-0.0231170654296875,
-0.04705810546875,
-0.047882080078125,
-0.06256103515625,
0.0124359130859375,
0.005252838134765625,
0.01540374755859375,
-0.02337646484375,
-0.047332763671875,
-0.003021240234375,
0.016632080078125,
0.01267242431640625,
0.039215087890625,
-0.00588226318359375,
0.0065765380859375,
0.018341064453125,
0.04656982421875,
0.0123291015625,
-0.020721435546875,
-0.0222015380859375,
-0.038665771484375,
0.049346923828125,
0.00127410888671875,
-0.0411376953125,
-0.04571533203125,
0.0052032470703125,
-0.044158935546875,
0.00827789306640625,
-0.028411865234375,
-0.019622802734375,
-0.00957489013671875,
0.01171875,
-0.0223388671875,
0.032470703125,
0.0010204315185546875,
-0.0301361083984375,
0.0162353515625,
-0.05047607421875,
-0.04364013671875,
-0.00450897216796875,
-0.019744873046875,
0.01090240478515625,
-0.01280975341796875,
-0.0210723876953125,
0.038177490234375,
-0.01239776611328125,
0.03533935546875,
0.040679931640625,
-0.00821685791015625,
0.043792724609375,
0.01763916015625,
0.030853271484375,
0.0212860107421875,
-0.006732940673828125,
0.037384033203125,
0.00684356689453125,
0.0777587890625,
0.005390167236328125,
-0.00991058349609375,
0.06103515625,
-0.03546142578125,
0.0330810546875,
0.06427001953125,
0.06707763671875,
-0.0738525390625,
0.004241943359375,
-0.0030975341796875,
-0.0146636962890625,
0.052001953125,
0.017822265625,
-0.031341552734375,
-0.050506591796875,
0.045318603515625,
-0.0257415771484375,
0.01032257080078125,
0.03363037109375,
0.00844573974609375,
-0.006481170654296875,
-0.00421142578125,
0.0523681640625,
0.023162841796875,
0.01090240478515625,
-0.03692626953125,
-0.00836944580078125,
0.0009150505065917969,
-0.0259552001953125,
-0.0105133056640625,
0.04388427734375,
-0.04681396484375,
-0.06170654296875,
0.024078369140625,
0.005443572998046875,
-0.010589599609375,
-0.01202392578125,
-0.00489044189453125,
0.0189361572265625,
0.04669189453125,
-0.0185394287109375,
-0.001529693603515625,
0.03955078125,
-0.009185791015625,
0.01386260986328125,
-0.03271484375,
-0.0014905929565429688,
0.0266571044921875,
-0.031829833984375,
0.0115814208984375,
0.009124755859375,
-0.003719329833984375,
-0.01678466796875,
-0.0231170654296875,
0.0687255859375,
0.00635528564453125,
-0.038360595703125,
0.019287109375,
0.006561279296875,
-0.01123046875,
0.0111846923828125,
0.006008148193359375,
-0.033966064453125,
0.002674102783203125,
0.001190185546875,
-0.018768310546875,
0.006500244140625,
0.0107574462890625,
-0.04071044921875,
0.1181640625,
0.0352783203125,
-0.0084686279296875,
-0.00568389892578125,
0.05810546875,
-0.031951904296875,
0.022491455078125,
-0.0238800048828125,
0.052642822265625,
-0.045440673828125,
0.041107177734375,
-0.044891357421875,
0.0137481689453125,
0.0014476776123046875,
0.018707275390625,
0.04315185546875,
0.00908660888671875,
-0.0084075927734375,
-0.0092926025390625,
0.042083740234375,
0.01611328125,
-0.0166778564453125,
0.031982421875,
0.0007910728454589844,
0.0118865966796875,
-0.01425933837890625,
0.005329132080078125,
0.04278564453125,
-0.050201416015625,
-0.03680419921875,
0.0247650146484375,
0.025848388671875,
0.03851318359375,
-0.03302001953125,
0.056060791015625,
0.05389404296875,
-0.03509521484375,
-0.011138916015625,
-0.0242767333984375,
-0.00885772705078125,
0.019439697265625,
0.01332855224609375,
0.0099334716796875,
0.0192413330078125,
-0.0217132568359375,
0.046478271484375,
0.01233673095703125,
0.0069427490234375,
-0.00748443603515625,
0.006649017333984375,
0.0069427490234375,
-0.0213623046875,
-0.0082550048828125,
0.03143310546875,
-0.0270843505859375,
0.008209228515625,
0.006626129150390625,
0.031707763671875,
-0.007495880126953125,
-0.01873779296875,
0.01146697998046875,
0.01312255859375,
-0.0171966552734375,
-0.00887298583984375,
0.01076507568359375,
-0.003810882568359375,
-0.017730712890625,
-0.039642333984375,
-0.0231781005859375,
-0.021087646484375,
-0.00310516357421875,
-0.00614166259765625,
-0.00920867919921875,
0.0396728515625,
0.01371002197265625,
0.01373291015625,
0.0010156631469726562,
-0.01021575927734375,
-0.0108184814453125,
-0.0245361328125,
0.044158935546875,
-0.0014667510986328125,
-0.0146942138671875,
-0.03900146484375,
0.043243408203125,
0.0343017578125,
0.016815185546875,
-0.01177978515625,
0.045501708984375,
-0.012054443359375,
0.0185546875,
-0.05718994140625,
-0.0799560546875,
0.0236053466796875,
0.045928955078125,
0.0438232421875,
0.02508544921875,
0.07525634765625,
0.04168701171875,
-0.05853271484375,
0.00041174888610839844,
-0.0096435546875,
-0.0269622802734375,
0.0272979736328125,
-0.031707763671875,
0.04669189453125,
0.0261688232421875,
0.004161834716796875,
-0.019927978515625,
0.014923095703125,
0.049835205078125,
-0.0295257568359375,
-0.006519317626953125,
0.00832366943359375,
-0.043060302734375,
0.050811767578125,
-0.00597381591796875,
0.040863037109375,
-0.008819580078125,
-0.0054168701171875,
0.0016326904296875,
-0.00618743896484375,
-0.01432037353515625,
-0.0072021484375,
0.02508544921875,
-0.0167694091796875,
0.033294677734375,
-0.0041351318359375,
0.02203369140625,
-0.0015840530395507812,
-0.054779052734375,
0.023681640625,
0.01470184326171875,
0.0035915374755859375,
0.01543426513671875,
-0.00112152099609375,
0.00446319580078125,
-0.005123138427734375,
0.038177490234375,
0.024993896484375,
0.04119873046875,
-0.017425537109375,
0.0369873046875,
-0.01486968994140625,
-0.0250091552734375,
-0.03717041015625,
-0.033355712890625,
0.040374755859375,
-0.03704833984375,
-0.04254150390625,
0.004596710205078125,
-0.08514404296875,
0.03216552734375,
0.043182373046875,
0.01241302490234375,
0.056884765625,
0.0012922286987304688,
-0.007232666015625,
-0.03143310546875,
0.026519775390625,
-0.0174407958984375,
-0.058380126953125,
0.007472991943359375,
0.0216064453125,
-0.0156402587890625,
0.0301513671875,
0.00928497314453125,
0.00646209716796875,
0.0300750732421875,
0.0196685791015625,
-0.01355743408203125,
0.036865234375,
-0.01209259033203125,
0.026336669921875,
-0.01032257080078125,
-0.055389404296875,
-0.018402099609375,
-0.01593017578125,
-0.01490020751953125,
-0.00934600830078125,
0.07440185546875,
-0.04095458984375,
0.0399169921875,
-0.024566650390625,
-0.0018873214721679688,
0.016326904296875,
-0.003200531005859375,
0.01800537109375,
-0.026153564453125,
0.00794219970703125,
-0.0005536079406738281,
-0.049285888671875,
-0.0187225341796875,
-0.056915283203125,
-0.00848388671875,
0.030609130859375,
-0.038787841796875,
-0.01316070556640625,
-0.0171051025390625,
0.006877899169921875,
0.01078033447265625,
0.0025196075439453125,
-0.060302734375,
0.0175018310546875,
-0.0236053466796875,
0.047454833984375,
-0.024688720703125,
-0.0283355712890625,
-0.029022216796875,
0.00571441650390625,
0.00791168212890625,
-0.036712646484375,
-0.06707763671875,
0.0517578125,
-0.03778076171875,
0.01027679443359375,
0.0445556640625,
-0.03363037109375,
-0.0282440185546875,
-0.045745849609375,
0.028839111328125,
-0.01335906982421875,
0.0088043212890625,
-0.023590087890625,
0.01308441162109375,
-0.0400390625,
0.005474090576171875,
-0.022796630859375,
-0.0002199411392211914,
-0.0789794921875,
-0.049652099609375,
-0.0177459716796875,
0.005847930908203125,
0.01560211181640625,
-0.0323486328125,
-0.026763916015625,
-0.00261688232421875,
0.01715087890625,
-0.033111572265625,
-0.009857177734375,
-0.01554107666015625,
-0.0187530517578125,
0.0042572021484375,
0.0028057098388671875,
-0.032623291015625,
-0.005344390869140625,
0.04803466796875,
-0.0017786026000976562,
0.043853759765625,
-0.022125244140625,
0.0221710205078125,
0.00371551513671875,
0.049530029296875,
0.034088134765625,
-0.035247802734375,
-0.040679931640625,
0.003276824951171875,
0.02252197265625,
0.018157958984375,
-0.0300140380859375,
0.051910400390625,
0.038482666015625,
0.046234130859375,
-0.01047515869140625,
-0.048614501953125,
-0.07379150390625,
-0.02593994140625,
0.09619140625,
0.09295654296875,
0.04913330078125,
-0.04473876953125,
-0.006561279296875,
-0.04156494140625,
-0.01291656494140625,
-0.006866455078125,
-0.0006222724914550781,
-0.0338134765625,
0.0205230712890625,
0.013336181640625,
0.001384735107421875,
-0.038543701171875,
0.005687713623046875,
-0.027679443359375,
-0.0261993408203125,
0.0059661865234375,
-0.0011539459228515625,
0.034149169921875,
-0.0416259765625,
0.0007147789001464844,
0.0040283203125,
0.03375244140625,
-0.00627899169921875,
0.0260162353515625,
0.01505279541015625,
0.0794677734375,
0.01873779296875,
0.033447265625,
-0.01421356201171875,
0.0159912109375,
0.02301025390625,
0.01558685302734375,
-0.0008969306945800781,
-0.01165008544921875,
0.0104522705078125,
0.027252197265625,
0.002010345458984375,
0.02734375,
-0.03271484375,
0.07403564453125,
-0.0047454833984375,
0.054412841796875,
0.0113372802734375,
-0.04583740234375,
-0.0082244873046875,
0.035064697265625,
-0.00714874267578125,
-0.03546142578125,
-0.00032210350036621094,
-0.048492431640625,
0.027008056640625,
0.013458251953125,
0.05255126953125,
0.0016012191772460938,
0.0166015625,
-0.05926513671875,
-0.0031108856201171875,
0.006908416748046875
] |
8c20f7d47b966c6f3c9bf5fda29b626be79d1e36
|
Wordpress Stackexchange
Q: Allowing members to upload photos to their profile I am looking for a little bit of direction. I am building a membership site that will allow the user to upload multiple photos for their profile.
My question is: Is their a membership plugin that will allow them to do this. Also, this feature needs to be front end accessible. I do not want the members to ever see the back end.
Thanks in advance.
A: Have you tried the Front-End Users plugin?
Please go through the documentation example hooks on how to modify it. I think it will fulfill your needs. Hope that helps.
marikamitsos
|
Q: Allowing members to upload photos to their profile I am looking for a little bit of direction. I am building a membership site that will allow the user to upload multiple photos for their profile.
My question is: Is their a membership plugin that will allow them to do this. Also, this feature needs to be front end accessible. I do not want the members to ever see the back end.
Thanks in advance.
A: Have you tried the Front-End Users plugin?
Please go through the documentation example hooks on how to modify it. I think it will fulfill your needs. Hope that helps.
marikamitsos
|
wordpress
|
{
"language": "en",
"length": 106,
"provenance": "stackexchange_00019.jsonl.gz:421391",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57066"
}
|
[
0.06451416015625,
0.0162200927734375,
0.0185394287109375,
-0.01226043701171875,
0.0307159423828125,
-0.024322509765625,
0.06182861328125,
-0.05877685546875,
0.0197906494140625,
0.0236053466796875,
-0.0172576904296875,
0.02398681640625,
-0.007801055908203125,
-0.01015472412109375,
-0.0114898681640625,
-0.0236053466796875,
0.03564453125,
0.0146942138671875,
0.03985595703125,
-0.00677490234375,
0.007633209228515625,
0.04058837890625,
-0.003021240234375,
0.00769805908203125,
-0.0013036727905273438,
0.0487060546875,
0.005825042724609375,
-0.0246734619140625,
-0.0061492919921875,
-0.022979736328125,
0.003986358642578125,
0.0084228515625,
-0.0019245147705078125,
0.01000213623046875,
0.0264129638671875,
-0.0038051605224609375,
0.053802490234375,
-0.00015592575073242188,
0.02972412109375,
0.0157012939453125,
0.041259765625,
-0.0132293701171875,
-0.0251617431640625,
0.04193115234375,
-0.01023101806640625,
-0.06793212890625,
0.06256103515625,
-0.041717529296875,
0.02642822265625,
-0.015655517578125,
-0.0030956268310546875,
-0.0213165283203125,
0.01384735107421875,
-0.033294677734375,
-0.0112457275390625,
-0.0288238525390625,
-0.0157623291015625,
0.01412200927734375,
0.050140380859375,
0.0384521484375,
-0.0377197265625,
-0.043426513671875,
0.0196533203125,
-0.076171875,
-0.01056671142578125,
-0.009063720703125,
-0.043609619140625,
0.0241851806640625,
-0.057037353515625,
-0.05169677734375,
0.02593994140625,
-0.041412353515625,
0.0219573974609375,
-0.005809783935546875,
-0.041717529296875,
0.008636474609375,
-0.02020263671875,
-0.0215301513671875,
0.056396484375,
-0.04449462890625,
-0.074462890625,
-0.054779052734375,
-0.04937744140625,
0.017730712890625,
-0.03558349609375,
0.037872314453125,
-0.0211181640625,
0.018341064453125,
-0.0230865478515625,
0.0638427734375,
-0.0084686279296875,
-0.0406494140625,
-0.0012884140014648438,
0.0885009765625,
0.03076171875,
0.003253936767578125,
0.03192138671875,
0.01052093505859375,
-0.005939483642578125,
-0.02154541015625,
0.03729248046875,
-0.05828857421875,
0.0145416259765625,
-0.0004992485046386719,
-0.006511688232421875,
0.01383209228515625,
-0.0064544677734375,
-0.0440673828125,
-0.0006337165832519531,
0.0289154052734375,
-0.0240936279296875,
0.00664520263671875,
0.004093170166015625,
-0.04498291015625,
0.02069091796875,
0.0085906982421875,
-0.010284423828125,
0.062255859375,
0.01374053955078125,
0.0173797607421875,
-0.0092315673828125,
0.0227508544921875,
-0.034759521484375,
-0.0296173095703125,
-0.0146026611328125,
-0.036895751953125,
-0.004161834716796875,
0.006786346435546875,
0.005161285400390625,
0.008941650390625,
-0.0251007080078125,
0.0211029052734375,
0.037445068359375,
0.002166748046875,
-0.004344940185546875,
-0.0175933837890625,
-0.0032825469970703125,
-0.049957275390625,
-0.02105712890625,
0.03057861328125,
-0.0019931793212890625,
-0.04730224609375,
0.002140045166015625,
-0.0301055908203125,
0.0100555419921875,
0.01398468017578125,
0.00988006591796875,
0.016326904296875,
0.00640106201171875,
-0.0189971923828125,
0.0035457611083984375,
-0.01422882080078125,
-0.01203155517578125,
0.00724029541015625,
0.032623291015625,
-0.0151824951171875,
-0.009735107421875,
-0.005962371826171875,
0.055938720703125,
0.0196380615234375,
0.00457763671875,
0.0077362060546875,
0.02459716796875,
-0.0350341796875,
-0.032257080078125,
-0.0269012451171875,
-0.01215362548828125,
-0.0071258544921875,
0.0301666259765625,
-0.023223876953125,
0.018768310546875,
0.0170440673828125,
0.027496337890625,
0.015777587890625,
-0.0011415481567382812,
0.0230255126953125,
0.017730712890625,
0.038909912109375,
-0.0009946823120117188,
0.029754638671875,
0.0050201416015625,
-0.0295562744140625,
0.0955810546875,
-0.035797119140625,
-0.031829833984375,
0.00858306884765625,
0.004215240478515625,
0.02886962890625,
0.008331298828125,
0.0133209228515625,
0.022705078125,
-0.00809478759765625,
-0.01190185546875,
0.02020263671875,
-0.01230621337890625,
-0.0377197265625,
0.0025005340576171875,
0.00012242794036865234,
-0.0212554931640625,
0.01439666748046875,
0.00839996337890625,
0.00909423828125,
0.00799560546875,
-0.00438690185546875,
0.0236358642578125,
-0.01464080810546875,
0.01141357421875,
0.006298065185546875,
-0.00901031494140625,
0.005413055419921875,
0.01148223876953125,
0.007663726806640625,
0.0012903213500976562,
-0.052520751953125,
-0.005382537841796875,
0.025390625,
-0.0261383056640625,
0.01470184326171875,
-0.01422882080078125,
0.031585693359375,
-0.032562255859375,
-0.0190277099609375,
-0.047088623046875,
-0.004482269287109375,
0.0209197998046875,
0.00806427001953125,
-0.0352783203125,
-0.0219573974609375,
-0.040771484375,
0.0089569091796875,
-0.07037353515625,
0.048095703125,
-0.040771484375,
0.0199432373046875,
-0.0129852294921875,
-0.01554107666015625,
-0.004055023193359375,
-0.048431396484375,
0.036163330078125,
0.029693603515625,
0.0121002197265625,
0.00885772705078125,
0.01332855224609375,
0.05029296875,
0.061553955078125,
0.055633544921875,
0.04095458984375,
-0.0018434524536132812,
-0.0090179443359375,
0.006237030029296875,
-0.02593994140625,
-0.0161895751953125,
0.033843994140625,
-0.039337158203125,
0.0014400482177734375,
0.04071044921875,
-0.032470703125,
-0.026580810546875,
0.01708984375,
-0.0167999267578125,
0.029876708984375,
-0.0246124267578125,
-0.02838134765625,
-0.01221466064453125,
0.0080718994140625,
-0.03338623046875,
0.0157318115234375,
0.0061187744140625,
-0.0035247802734375,
-0.01641845703125,
0.01325225830078125,
-0.038970947265625,
-0.0012254714965820312,
0.03240966796875,
0.0118408203125,
0.0213775634765625,
-0.026611328125,
-0.016204833984375,
0.004016876220703125,
0.0224609375,
-0.00907135009765625,
-0.005855560302734375,
-0.023956298828125,
-0.0109100341796875,
-0.01560211181640625,
-0.036376953125,
0.03546142578125,
0.033477783203125,
-0.0181732177734375,
-0.0212249755859375,
0.03033447265625,
-0.012359619140625,
-0.02978515625,
0.01175689697265625,
0.01068115234375,
-0.03155517578125,
-0.0231475830078125,
-0.052032470703125,
0.049591064453125,
-0.043121337890625,
0.0105438232421875,
0.0718994140625,
0.01275634765625,
-0.005558013916015625,
-0.00749969482421875,
0.0084991455078125,
-0.027984619140625,
0.037109375,
0.017425537109375,
-0.0357666015625,
-0.00922393798828125,
0.0229949951171875,
0.0280609130859375,
0.0013666152954101562,
0.02374267578125,
-0.0147247314453125,
-0.028961181640625,
0.039215087890625,
-0.00955963134765625,
0.019866943359375,
-0.020355224609375,
-0.095703125,
0.047576904296875,
0.01282501220703125,
-0.036895751953125,
-0.0246429443359375,
0.0794677734375,
0.0382080078125,
-0.04827880859375,
0.014892578125,
0.016571044921875,
-0.0194244384765625,
-0.03515625,
-0.00366973876953125,
0.01641845703125,
0.034759521484375,
-0.0102081298828125,
0.01552581787109375,
-0.037841796875,
-0.0765380859375,
-0.0435791015625,
-0.016571044921875,
0.00843048095703125,
-0.00934600830078125,
0.01296234130859375,
0.0176239013671875,
-0.022186279296875,
0.0102386474609375,
-0.0240325927734375,
0.0296173095703125,
-0.043670654296875,
-0.0160980224609375,
-0.003818511962890625,
-0.00824737548828125,
-0.01480865478515625,
-0.017852783203125,
0.003543853759765625,
0.00429534912109375,
-0.021575927734375,
-0.0426025390625,
-0.002124786376953125,
-0.01329803466796875,
-0.037109375,
-0.0645751953125,
0.016632080078125,
-0.004009246826171875,
-0.036346435546875,
-0.0164794921875,
0.01788330078125,
0.0180816650390625,
-0.0234222412109375,
-0.0123291015625,
0.014373779296875,
0.004413604736328125,
0.0244903564453125,
0.0161895751953125,
-0.01580810546875,
-0.033416748046875,
0.031890869140625,
-0.021759033203125,
0.0244140625,
-0.03466796875,
0.05517578125,
-0.063232421875,
-0.08251953125,
0.053131103515625,
-0.03680419921875,
0.036956787109375,
-0.0731201171875,
-0.03460693359375,
-0.03155517578125,
0.1383056640625,
-0.04351806640625,
0.0048675537109375,
0.0014963150024414062,
-0.0004596710205078125,
-0.033966064453125,
-0.0044403076171875,
-0.06231689453125,
0.006092071533203125,
0.002872467041015625,
-0.0310821533203125,
-0.0201873779296875,
-0.03662109375,
0.03619384765625,
-0.08563232421875,
0.04083251953125,
-0.037078857421875,
-0.0009083747863769531,
-0.0219573974609375,
0.00246429443359375,
-0.0249481201171875,
-0.010498046875,
-0.047760009765625,
0.0216827392578125,
-0.040069580078125,
-0.0838623046875,
-0.006175994873046875,
-0.0175628662109375,
0.06024169921875,
-0.012603759765625,
0.0240631103515625,
0.0012426376342773438,
0.069580078125,
0.01052093505859375,
0.01482391357421875,
-0.01776123046875,
0.0053558349609375,
-0.00803375244140625,
-0.04022216796875,
-0.0149993896484375,
-0.030731201171875,
-0.02642822265625,
-0.046722412109375,
-0.00855255126953125,
0.00615692138671875,
-0.012786865234375,
-0.01275634765625,
-0.012420654296875,
-0.0008912086486816406,
0.020294189453125,
-0.011383056640625,
-0.0247650146484375,
-0.00377655029296875,
-0.004459381103515625,
-0.02789306640625,
-0.00713348388671875,
0.0122222900390625,
0.0185546875,
-0.02203369140625,
-0.005218505859375,
0.040008544921875,
0.0946044921875,
0.01318359375,
0.01202392578125,
-0.11016845703125,
0.0023174285888671875,
0.0249786376953125,
0.0188446044921875,
0.037689208984375,
0.0090179443359375,
-0.031280517578125,
0.085693359375,
-0.003513336181640625,
0.0273284912109375,
-0.012786865234375,
-0.020660400390625,
0.00890350341796875,
-0.01259613037109375,
-0.00945281982421875,
0.034454345703125,
0.013946533203125,
-0.004913330078125,
-0.00734710693359375,
0.0146331787109375,
-0.0211334228515625,
0.00875091552734375,
0.024658203125,
-0.0212860107421875,
-0.0287322998046875,
-0.043212890625,
0.0164794921875,
-0.047821044921875,
0.04132080078125,
-0.0036296844482421875,
-0.007396697998046875,
0.0095977783203125,
0.00716400146484375,
-0.029876708984375,
0.007297515869140625,
-0.042694091796875,
0.0277862548828125,
0.030487060546875,
-0.05157470703125,
-0.00925445556640625,
0.00286102294921875,
0.0009522438049316406,
-0.00745391845703125,
-0.0287017822265625,
-0.039093017578125,
-0.046905517578125,
0.00989532470703125,
0.033599853515625,
0.034088134765625,
0.005840301513671875,
0.041107177734375,
0.0205230712890625,
-0.0160369873046875,
-0.01081085205078125,
-0.00922393798828125,
0.017120361328125,
-0.057098388671875,
-0.01055908203125,
-0.008026123046875,
-0.0175323486328125,
0.0299224853515625,
0.014312744140625,
-0.0380859375,
0.02740478515625,
0.00472259521484375,
0.09149169921875,
0.06787109375,
-0.031585693359375,
0.00423431396484375,
0.0662841796875,
-0.017578125,
-0.05194091796875,
-0.02874755859375,
-0.00392913818359375,
0.040191650390625,
0.0109100341796875,
-0.00765228271484375,
0.040863037109375,
-0.017181396484375,
0.0156707763671875,
-0.01806640625,
-0.0029430389404296875,
0.0009059906005859375,
-0.035919189453125,
-0.04949951171875,
-0.01177978515625,
0.01357269287109375,
0.0170135498046875,
-0.0235137939453125,
0.0183258056640625,
-0.05242919921875,
0.00235748291015625,
-0.02972412109375,
-0.01092529296875,
-0.059478759765625,
0.0158538818359375,
0.03302001953125,
-0.007228851318359375,
-0.031707763671875,
-0.017822265625,
-0.00021159648895263672,
0.002384185791015625,
-0.028900146484375,
-0.031585693359375,
0.045013427734375,
-0.0030460357666015625,
0.024932861328125,
-0.032196044921875,
-0.002964019775390625,
-0.01435089111328125,
0.006954193115234375,
0.0175323486328125,
-0.0010519027709960938,
-0.02178955078125,
-0.028350830078125,
-0.04486083984375,
-0.0113372802734375,
-0.00957489013671875,
-0.025360107421875,
-0.00787353515625,
-0.005092620849609375,
0.00586700439453125,
0.03192138671875,
-0.01280975341796875,
-0.01364898681640625,
0.028839111328125,
0.020050048828125,
0.00016748905181884766,
0.0498046875,
-0.0158538818359375,
0.005054473876953125,
0.0137481689453125,
0.0245819091796875,
-0.023406982421875,
-0.0227813720703125,
0.0002536773681640625,
-0.01317596435546875,
-0.0293731689453125,
-0.0022068023681640625,
0.01548004150390625,
0.0203857421875,
0.00792694091796875,
0.0181884765625,
0.060882568359375,
0.0246734619140625,
-0.0207672119140625,
-0.01904296875,
0.013397216796875,
-0.03228759765625,
0.050140380859375,
-0.0264434814453125,
-0.021820068359375,
-0.00650787353515625,
-0.0304412841796875,
0.018707275390625,
0.022216796875,
-0.0248565673828125,
0.040130615234375,
0.0075531005859375,
0.01910400390625,
-0.00640869140625,
0.050750732421875,
-0.036956787109375,
0.0148773193359375,
-0.01708984375,
0.021881103515625,
0.031402587890625,
0.0208892822265625,
0.042877197265625,
0.02783203125,
-0.0230255126953125,
-0.0289764404296875,
0.00225830078125,
-0.0148468017578125,
-0.00763702392578125,
-0.01218414306640625,
-0.0141754150390625,
0.0280303955078125,
0.03448486328125,
0.057891845703125,
-0.0767822265625,
0.034393310546875,
0.0009918212890625,
0.025390625,
0.06884765625,
-0.0037364959716796875,
0.035888671875,
0.00742340087890625,
0.041595458984375,
0.0183258056640625,
-0.004291534423828125,
0.0215301513671875,
-0.0195159912109375,
-0.02117919921875,
0.0265960693359375,
0.0274200439453125,
0.0174102783203125,
-0.0338134765625,
-0.047943115234375,
0.02984619140625,
-0.04205322265625,
0.019073486328125,
0.031768798828125,
-0.018585205078125,
-0.023101806640625,
-0.0261993408203125,
0.01105499267578125,
0.00262451171875,
-0.022430419921875,
0.0723876953125,
-0.015869140625,
0.006744384765625,
0.0306854248046875,
-0.01436614990234375,
0.0226287841796875,
-0.00850677490234375,
-0.00992584228515625,
-0.0288543701171875,
-0.0224456787109375,
-0.01340484619140625,
0.0228729248046875,
-0.052215576171875,
0.0265350341796875,
-0.03326416015625,
0.01418304443359375,
-0.0255279541015625,
-0.021636962890625,
0.0633544921875,
0.00907135009765625,
-0.033355712890625,
0.0071868896484375,
0.036529541015625,
-0.00652313232421875,
0.03057861328125,
-0.0170440673828125,
-0.06072998046875,
-0.04119873046875,
0.01375579833984375,
-0.045745849609375,
0.03424072265625,
0.07745361328125,
-0.0396728515625,
0.052032470703125,
-0.025360107421875,
0.03240966796875,
0.036346435546875,
0.006103515625,
0.005207061767578125,
-0.0039215087890625,
-0.01241302490234375,
0.00771331787109375,
-0.033233642578125,
-0.00547027587890625,
-0.021514892578125,
0.009033203125,
-0.0208587646484375,
0.028533935546875,
0.0364990234375,
0.0111083984375,
-0.06182861328125,
-0.007843017578125,
0.0269317626953125,
0.047607421875,
0.0171051025390625,
0.0404052734375,
-0.0005044937133789062,
-0.049835205078125,
0.043914794921875,
0.01800537109375,
0.0244293212890625,
0.0243377685546875,
-0.0009694099426269531,
0.0129852294921875,
0.0083465576171875,
0.01409912109375,
-0.0304412841796875,
-0.0070648193359375,
-0.0289306640625,
-0.01404571533203125,
0.0117340087890625,
0.026458740234375,
-0.0164337158203125,
0.009246826171875,
-0.0254364013671875,
0.01739501953125,
0.057159423828125,
-0.026519775390625,
0.02838134765625,
-0.015960693359375,
0.035308837890625,
0.041656494140625,
0.022247314453125,
0.002582550048828125,
0.010772705078125,
0.032745361328125,
0.0190582275390625,
-0.0287628173828125,
0.05853271484375,
-0.0244140625,
0.013397216796875,
-0.102294921875,
-0.062164306640625,
0.04766845703125,
0.09051513671875,
-0.0267486572265625,
-0.03912353515625,
0.00766754150390625,
0.0205535888671875,
0.026031494140625,
-0.0002803802490234375,
0.0141448974609375,
-0.0208892822265625,
0.03411865234375,
-0.05987548828125,
0.0262603759765625,
0.0462646484375,
0.048675537109375,
-0.005886077880859375,
-0.0230865478515625,
-0.0582275390625,
-0.01313018798828125,
-0.0071563720703125,
0.0232391357421875,
-0.0187835693359375,
-0.0178680419921875,
-0.02142333984375,
0.01436614990234375,
0.00475311279296875,
0.0134429931640625,
0.0022945404052734375,
0.0309600830078125,
0.0241241455078125,
-0.0010251998901367188,
-0.0265350341796875,
-0.0421142578125,
0.01120758056640625,
0.0399169921875,
0.0287322998046875,
0.0003190040588378906,
0.026153564453125,
0.0164947509765625,
-0.0347900390625,
0.0006799697875976562,
0.03955078125,
-0.01342010498046875,
0.0201263427734375,
-0.0287322998046875,
0.01995849609375,
0.0291748046875,
-0.0127105712890625,
-0.0104522705078125,
-0.030364990234375,
0.0687255859375,
-0.018951416015625,
0.01666259765625,
-0.003414154052734375,
-0.051361083984375,
0.024749755859375,
-0.01348876953125,
0.09259033203125,
-0.0011968612670898438,
-0.136962890625,
-0.0244140625,
-0.037109375,
-0.03082275390625,
0.03216552734375,
0.04071044921875,
-0.050628662109375,
0.034210205078125,
-0.00011855363845825195,
0.00801849365234375,
0.009002685546875,
-0.03607177734375,
0.0175018310546875,
-0.03094482421875,
0.00165557861328125,
-0.0176239013671875,
-0.05950927734375,
-0.0162506103515625,
-0.03289794921875,
0.0212249755859375,
0.0438232421875,
0.043121337890625,
0.00611114501953125,
0.034942626953125,
0.03240966796875,
-0.038360595703125,
0.0325927734375,
0.002750396728515625,
0.0308685302734375,
-0.0294952392578125,
-0.025177001953125,
-0.00997161865234375,
-0.023529052734375,
0.043853759765625,
0.00531005859375,
0.012359619140625,
-0.0015201568603515625,
0.02197265625,
0.0032501220703125,
0.05908203125,
0.0224151611328125,
-0.0227813720703125,
0.0030002593994140625,
-0.0277099609375,
-0.03875732421875,
0.038116455078125,
0.0255889892578125,
0.00608062744140625,
0.035003662109375,
-0.02978515625,
-0.046478271484375,
-0.0016908645629882812,
-0.071533203125,
-0.005519866943359375,
0.018280029296875,
0.0187225341796875,
-0.01480865478515625,
0.005279541015625,
-0.004291534423828125,
-0.008026123046875,
0.0191192626953125,
0.0100860595703125,
0.0093994140625,
-0.007785797119140625,
0.035003662109375,
0.043304443359375,
0.03582763671875,
-0.034637451171875,
0.0097198486328125,
0.04254150390625,
-0.0128326416015625,
0.0214996337890625,
-0.0189666748046875,
-0.0110931396484375,
-0.07000732421875,
-0.004718780517578125,
0.009857177734375,
-0.026275634765625,
-0.026519775390625,
-0.01253509521484375,
0.01183319091796875,
0.04400634765625,
0.00817108154296875,
-0.06658935546875,
0.018890380859375,
-0.014739990234375,
0.042724609375,
0.00742340087890625,
-0.04229736328125,
0.00930023193359375,
0.00909423828125,
-0.0102081298828125,
-0.007373809814453125,
-0.0419921875,
-0.010528564453125,
-0.01898193359375,
0.036163330078125,
0.040679931640625,
-0.033355712890625,
0.060791015625,
0.023956298828125,
0.026824951171875,
0.09393310546875,
-0.0006957054138183594,
-0.0269012451171875,
-0.01459503173828125,
0.005725860595703125,
-0.0006947517395019531,
0.0004563331604003906,
-0.0011339187622070312,
0.0132293701171875,
-0.0232086181640625,
-0.044830322265625,
-0.0138397216796875,
-0.024810791015625,
-0.07293701171875,
-0.11956787109375,
0.11627197265625,
-0.045562744140625,
-0.028350830078125,
-0.018951416015625,
0.00600433349609375,
-0.0037937164306640625,
0.01102447509765625,
-0.01290130615234375,
0.00891876220703125,
-0.0221405029296875,
0.01351165771484375,
0.0108795166015625,
0.0302276611328125,
-0.005283355712890625,
0.006450653076171875,
-0.06048583984375,
0.01270294189453125,
-0.01342010498046875,
0.0186614990234375,
0.06719970703125,
-0.0183258056640625,
0.029998779296875,
0.035797119140625,
-0.04534912109375,
-0.020111083984375,
-0.0340576171875,
-0.030792236328125,
-0.005828857421875,
-0.00015985965728759766,
-0.0105438232421875,
0.0091705322265625,
0.02740478515625,
0.040252685546875,
0.002452850341796875,
-0.0252838134765625,
0.0193939208984375,
-0.01441192626953125,
-0.014556884765625,
0.007354736328125,
-0.0009236335754394531,
-0.048675537109375,
-0.007579803466796875,
0.02301025390625,
-0.019073486328125,
-0.0244598388671875,
0.0208587646484375,
-0.0433349609375,
-0.01363372802734375,
0.01316070556640625,
-0.028961181640625,
0.0196685791015625,
0.037567138671875,
0.0284423828125,
-0.03350830078125,
-0.01052093505859375,
0.0021724700927734375,
-0.019073486328125,
-0.011322021484375,
-0.0136871337890625,
0.042510986328125,
-0.044189453125,
-0.0164031982421875,
0.046539306640625,
0.01203155517578125,
0.03729248046875,
-0.034912109375,
-0.0499267578125,
0.008636474609375,
0.035186767578125,
-0.00206756591796875,
0.034393310546875,
-0.040374755859375,
0.046630859375,
-0.007770538330078125,
0.0276641845703125,
-0.0379638671875,
-0.01113128662109375,
-0.0230712890625,
0.02203369140625,
-0.049957275390625,
0.013519287109375,
0.0016632080078125,
-0.0289154052734375,
0.00504302978515625,
0.0272064208984375,
0.0028362274169921875,
-0.0182037353515625,
0.02301025390625,
0.0650634765625,
0.0296630859375,
0.015869140625
] |
13edc297a20947e08bae213c2d37ae7c0d8c80cd
|
Wordpress Stackexchange
Q: Change the "page" slug in pagination Simple question. When pagination is activated, the URL changes to "site.com/page/2". For my site, this should be "site.com/paggetto/2".
How can I change that rewrite rule? I also want to change "author" and other variables.
A: Figured out:
function re_rewrite_rules() {
global $wp_rewrite;
// $wp_rewrite->author_base = $author_slug;
// print_r($wp_rewrite);
$wp_rewrite->author_base = 'autor';
$wp_rewrite->search_base = 'buscar';
$wp_rewrite->comments_base = 'comentarios';
$wp_rewrite->pagination_base = 'pagina';
$wp_rewrite->flush_rules();
}
add_action('init', 're_rewrite_rules');
At least, that will do the job.
|
Q: Change the "page" slug in pagination Simple question. When pagination is activated, the URL changes to "site.com/page/2". For my site, this should be "site.com/paggetto/2".
How can I change that rewrite rule? I also want to change "author" and other variables.
A: Figured out:
function re_rewrite_rules() {
global $wp_rewrite;
// $wp_rewrite->author_base = $author_slug;
// print_r($wp_rewrite);
$wp_rewrite->author_base = 'autor';
$wp_rewrite->search_base = 'buscar';
$wp_rewrite->comments_base = 'comentarios';
$wp_rewrite->pagination_base = 'pagina';
$wp_rewrite->flush_rules();
}
add_action('init', 're_rewrite_rules');
At least, that will do the job.
A: For some sites in German I use the following plugin to translate page to seite (the German word for page):
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: T5 Page to Seite
* Description: Ersetzt <code>/page/</code> durch <code>/seite/</code>.
* Author: Fuxia Scholz
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/
if ( ! function_exists( 't5_page_to_seite' ) )
{
register_activation_hook( __FILE__ , 't5_flush_rewrite_on_init' );
register_deactivation_hook( __FILE__ , 't5_flush_rewrite_on_init' );
add_action( 'init', 't5_page_to_seite' );
function t5_page_to_seite()
{
$GLOBALS['wp_rewrite']->pagination_base = 'seite';
}
function t5_flush_rewrite_on_init()
{
add_action( 'init', 'flush_rewrite_rules', 11 );
}
}
Note that you flush the rewrite rules on de/activation only. You will need a separate rewrite rule in your .htaccess to redirect old URLs to the new ones:
RedirectMatch Permanent ^/(.*)/page/(.*) /$1/seite/$2
A: This function will work directly with your translation package, formatting your new base and prevent to run more than once the flush_rewrite_rules function avoiding bad performance of your blog.
function my_change_rewrite_base() {
global $wp_rewrite;
$bases = array(
'author_base' => __('Author'),
'search_base' => __('Search'),
'comments_base' => __('Comments'),
'pagination_base' => __('Page')
);
foreach ($bases AS $key => $base) {
$wp_rewrite->{$key} = remove_accents(mb_strtolower($base));
}
if ( ! get_option('my_change_rewrite_base_flushed', false) ) {
flush_rewrite_rules();
update_option( 'my_change_rewrite_base_flushed', time());
}
}
add_action('init', 'my_change_rewrite_base');
A: The following worked for me:
function nw_strana() {
$GLOBALS['wp_rewrite']->pagination_base = 'strana';
}
add_action( 'init', 'nw_strana' );
function nw_rewrite( $rules ) {
$new_rules = array(
'obchod/strana/([0-9]{1,})/?$' => 'index.php?post_type=product&paged=$matches[1]',
);
$rules = array_merge( $new_rules, $rules );
return $rules;
}
add_filter( 'rewrite_rules_array', 'nw_rewrite' );
|
wordpress
|
{
"language": "en",
"length": 321,
"provenance": "stackexchange_00019.jsonl.gz:421392",
"question_score": "17",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57070"
}
|
[
0.0145416259765625,
0.0020599365234375,
-0.003643035888671875,
-0.055206298828125,
-0.0045166015625,
0.0028781890869140625,
-0.016357421875,
-0.002422332763671875,
0.0108795166015625,
0.00910186767578125,
0.00794219970703125,
0.0027484893798828125,
0.01078033447265625,
-0.039642333984375,
0.0187530517578125,
0.01416778564453125,
0.00415802001953125,
0.0002970695495605469,
0.02886962890625,
-0.00928497314453125,
0.03570556640625,
-0.011627197265625,
0.006771087646484375,
0.05035400390625,
0.04583740234375,
-0.06268310546875,
0.033233642578125,
-0.0435791015625,
0.0252838134765625,
-0.041839599609375,
0.0166473388671875,
0.01221466064453125,
0.023223876953125,
0.00838470458984375,
-0.023040771484375,
-0.01213836669921875,
-0.0019989013671875,
-0.00966644287109375,
-0.01432037353515625,
0.0200347900390625,
0.0288543701171875,
-0.019866943359375,
-0.0209197998046875,
-0.0209808349609375,
-0.007312774658203125,
-0.0302276611328125,
0.0186614990234375,
-0.04364013671875,
-0.002567291259765625,
0.0193939208984375,
0.00669097900390625,
0.040130615234375,
-0.006587982177734375,
0.051300048828125,
0.0084991455078125,
0.01322174072265625,
0.0267791748046875,
-0.025054931640625,
0.00513458251953125,
-0.043914794921875,
0.002208709716796875,
0.022857666015625,
0.0221710205078125,
0.049530029296875,
-0.01184844970703125,
-0.0004260540008544922,
-0.045196533203125,
0.029815673828125,
0.0288543701171875,
-0.007663726806640625,
-0.03143310546875,
-0.00203704833984375,
-0.00760650634765625,
-0.0037384033203125,
-0.021881103515625,
-0.0012378692626953125,
-0.001251220703125,
-0.0245513916015625,
0.020751953125,
0.00341033935546875,
0.019256591796875,
-0.019378662109375,
0.0029544830322265625,
-0.0228729248046875,
0.03118896484375,
0.005619049072265625,
-0.00782012939453125,
-0.005889892578125,
-0.042327880859375,
-0.0021915435791015625,
-0.026031494140625,
0.00812530517578125,
-0.01178741455078125,
-0.0165863037109375,
-0.0028591156005859375,
-0.00553131103515625,
0.03363037109375,
0.03875732421875,
0.007183074951171875,
0.0145721435546875,
0.01322174072265625,
-0.04144287109375,
0.037994384765625,
-0.041290283203125,
0.01473236083984375,
0.0288543701171875,
0.03204345703125,
0.070556640625,
0.0687255859375,
0.015228271484375,
0.024810791015625,
0.08209228515625,
-0.037628173828125,
-0.0030078887939453125,
-0.05108642578125,
-0.0103759765625,
-0.05694580078125,
-0.037750244140625,
-0.0020771026611328125,
-0.042816162109375,
-0.036590576171875,
-0.006900787353515625,
0.00010144710540771484,
0.007129669189453125,
0.0017642974853515625,
-0.006229400634765625,
0.014801025390625,
-0.0273284912109375,
0.037506103515625,
0.0159912109375,
-0.0423583984375,
0.0029201507568359375,
0.06536865234375,
0.02496337890625,
0.016021728515625,
-0.025848388671875,
0.051055908203125,
-0.01605224609375,
-0.0192413330078125,
0.060638427734375,
-0.036773681640625,
-0.0457763671875,
-0.0091552734375,
-0.0245513916015625,
0.028594970703125,
0.01287841796875,
0.010009765625,
0.0190887451171875,
-0.0010747909545898438,
0.0270538330078125,
-0.004848480224609375,
-0.0238800048828125,
0.037353515625,
0.0174102783203125,
-0.006374359130859375,
0.0121307373046875,
0.01490020751953125,
0.004497528076171875,
-0.04296875,
-0.0011043548583984375,
0.004436492919921875,
-0.0114288330078125,
0.0277252197265625,
-0.0216522216796875,
-0.0219879150390625,
-0.0113983154296875,
-0.05731201171875,
-0.0060577392578125,
0.0029430389404296875,
-0.018280029296875,
-0.01386260986328125,
-0.003627777099609375,
-0.03009033203125,
0.040496826171875,
0.028533935546875,
0.046051025390625,
-0.01084136962890625,
0.0232391357421875,
0.01470947265625,
0.0626220703125,
0.03802490234375,
-0.0201873779296875,
0.04364013671875,
0.005718231201171875,
-0.060882568359375,
0.06890869140625,
0.006519317626953125,
0.062164306640625,
-0.0091552734375,
0.0006837844848632812,
0.033416748046875,
0.03173828125,
-0.0288543701171875,
-0.00027680397033691406,
0.00904083251953125,
-0.03192138671875,
0.01197052001953125,
-0.00213623046875,
0.00640106201171875,
-0.0006227493286132812,
0.0008940696716308594,
0.033203125,
-0.038116455078125,
0.033355712890625,
-0.0404052734375,
-0.002899169921875,
-0.01253509521484375,
0.0264892578125,
0.0635986328125,
0.0369873046875,
-0.0164337158203125,
0.0113983154296875,
-0.0179290771484375,
-0.0130767822265625,
-0.050811767578125,
0.01091766357421875,
0.013458251953125,
-0.01849365234375,
0.002750396728515625,
0.0233001708984375,
0.02227783203125,
0.010528564453125,
-0.020782470703125,
0.006938934326171875,
0.037078857421875,
-0.0249786376953125,
-0.0269775390625,
-0.047271728515625,
-0.00899505615234375,
-0.02325439453125,
-0.032989501953125,
0.08917236328125,
0.039276123046875,
0.036956787109375,
-0.022064208984375,
-0.0017681121826171875,
0.024749755859375,
-0.01491546630859375,
0.01027679443359375,
0.029296875,
0.01947021484375,
-0.02276611328125,
-0.035858154296875,
-0.0106201171875,
-0.0071868896484375,
-0.033294677734375,
-0.0042266845703125,
0.00595855712890625,
-0.0265960693359375,
0.03143310546875,
0.043243408203125,
0.0240478515625,
-0.0025482177734375,
-0.043243408203125,
-0.01497650146484375,
0.034393310546875,
4.76837158203125e-7,
0.021759033203125,
-0.01409912109375,
0.031951904296875,
-0.01473236083984375,
0.00919342041015625,
0.0229949951171875,
-0.00910186767578125,
-0.0010938644409179688,
0.0207061767578125,
-0.006221771240234375,
-0.004261016845703125,
-0.05279541015625,
0.01146697998046875,
0.027374267578125,
0.0207366943359375,
0.0006399154663085938,
0.060760498046875,
0.0016279220581054688,
-0.031341552734375,
-0.0009083747863769531,
-0.00891876220703125,
-0.0267333984375,
0.01287841796875,
-0.03369140625,
0.0174102783203125,
-0.005535125732421875,
-0.012664794921875,
-0.035491943359375,
-0.031463623046875,
0.00664520263671875,
-0.007617950439453125,
-0.03802490234375,
-0.010467529296875,
0.007587432861328125,
0.021148681640625,
-0.041107177734375,
0.01497650146484375,
0.00823211669921875,
-0.0068817138671875,
0.0972900390625,
-0.0202178955078125,
0.042388916015625,
-0.027252197265625,
0.02642822265625,
0.02685546875,
-0.009613037109375,
-0.0183868408203125,
0.002696990966796875,
-0.001003265380859375,
-0.019775390625,
-0.00409698486328125,
-0.0014467239379882812,
0.0015211105346679688,
-0.022308349609375,
0.039947509765625,
0.0057830810546875,
-0.0239410400390625,
0.0023670196533203125,
-0.029144287109375,
-0.00347900390625,
-0.0095672607421875,
-0.0550537109375,
-0.05108642578125,
-0.0203094482421875,
-0.045196533203125,
-0.025787353515625,
0.033905029296875,
-0.03076171875,
-0.0006465911865234375,
0.06640625,
0.0023784637451171875,
0.002292633056640625,
-0.0203399658203125,
-0.074462890625,
-0.050811767578125,
-0.07086181640625,
0.0305633544921875,
-0.0031185150146484375,
0.0220794677734375,
0.0010633468627929688,
0.02996826171875,
-0.00809478759765625,
-0.050262451171875,
-0.0165252685546875,
0.035797119140625,
0.0011844635009765625,
-0.0281982421875,
-0.0494384765625,
-0.01258087158203125,
0.0257568359375,
-0.009857177734375,
0.10906982421875,
0.0232696533203125,
-0.0011701583862304688,
0.0311279296875,
0.01287078857421875,
-0.016876220703125,
0.00884246826171875,
0.0106201171875,
-0.01032257080078125,
-0.01235198974609375,
0.01059722900390625,
-0.03826904296875,
-0.0518798828125,
-0.0009889602661132812,
-0.049224853515625,
0.003635406494140625,
0.034149169921875,
0.004749298095703125,
-0.00299835205078125,
-0.0070648193359375,
0.0084075927734375,
-0.0159149169921875,
0.0255584716796875,
-0.0275421142578125,
0.034698486328125,
-0.0152587890625,
-0.010986328125,
-0.044891357421875,
0.050994873046875,
-0.00951385498046875,
0.0272674560546875,
0.02520751953125,
0.0006661415100097656,
-0.004848480224609375,
-0.01194000244140625,
-0.04571533203125,
-0.051300048828125,
0.040618896484375,
-0.04669189453125,
-0.027984619140625,
-0.01163482666015625,
0.0010013580322265625,
0.004673004150390625,
0.06396484375,
-0.0029144287109375,
-0.03350830078125,
0.01519775390625,
0.0197601318359375,
-0.01534271240234375,
-0.044036865234375,
0.00963592529296875,
-0.0210113525390625,
-0.0457763671875,
0.030731201171875,
0.00675201416015625,
-0.02447509765625,
-0.0176239013671875,
0.0210418701171875,
-0.0137939453125,
-0.018341064453125,
0.048309326171875,
0.00498199462890625,
-0.02032470703125,
0.0611572265625,
-0.0207672119140625,
0.01995849609375,
-0.06768798828125,
0.0298004150390625,
-0.097412109375,
-0.03411865234375,
0.033905029296875,
0.060394287109375,
-0.005352020263671875,
-0.041900634765625,
-0.0148773193359375,
0.058563232421875,
0.0004105567932128906,
0.0362548828125,
0.02899169921875,
0.005950927734375,
-0.02374267578125,
0.03155517578125,
0.038421630859375,
-0.005611419677734375,
0.0184326171875,
-0.0040283203125,
-0.03765869140625,
0.0079345703125,
-0.030548095703125,
0.0294189453125,
0.0002474784851074219,
-0.03363037109375,
-0.09722900390625,
-0.04150390625,
-0.0018253326416015625,
0.024627685546875,
0.023681640625,
-0.01788330078125,
-0.05487060546875,
-0.09014892578125,
0.0487060546875,
-0.02301025390625,
-0.005939483642578125,
-0.0030612945556640625,
0.058624267578125,
0.0130767822265625,
-0.03179931640625,
-0.005687713623046875,
-0.010498046875,
0.0242919921875,
-0.0216064453125,
0.0199432373046875,
-0.0008745193481445312,
-0.00955963134765625,
0.0219573974609375,
-0.02972412109375,
-0.031646728515625,
0.00318145751953125,
0.017822265625,
0.005977630615234375,
-0.0201416015625,
-0.0089111328125,
-0.04547119140625,
0.056427001953125,
0.039520263671875,
-0.01273345947265625,
0.00238800048828125,
-0.037261962890625,
0.052032470703125,
-0.00965118408203125,
0.0255889892578125,
-0.0626220703125,
-0.039947509765625,
0.01387786865234375,
0.0285797119140625,
0.037445068359375,
0.005008697509765625,
0.006313323974609375,
0.042327880859375,
0.0462646484375,
0.0083770751953125,
0.01270294189453125,
0.002895355224609375,
-0.007808685302734375,
0.02191162109375,
0.0212554931640625,
0.007595062255859375,
-0.00263214111328125,
0.003154754638671875,
0.01070404052734375,
0.0234832763671875,
0.017791748046875,
-0.0223388671875,
-0.0267181396484375,
0.01055908203125,
-0.0306243896484375,
0.0114593505859375,
0.0146942138671875,
-0.0279693603515625,
0.0206298828125,
0.01861572265625,
-0.032257080078125,
-0.0050201416015625,
-0.01824951171875,
0.046630859375,
0.007232666015625,
0.0003750324249267578,
-0.00589752197265625,
0.051513671875,
0.057769775390625,
-0.0121917724609375,
-0.0333251953125,
-0.00852203369140625,
-0.01306915283203125,
0.03643798828125,
0.0086669921875,
0.02288818359375,
0.0095672607421875,
0.01055908203125,
0.036346435546875,
-0.006511688232421875,
-0.011993408203125,
0.048553466796875,
0.019989013671875,
0.004123687744140625,
0.006244659423828125,
-0.033050537109375,
-0.0180816650390625,
-0.01361846923828125,
0.0007152557373046875,
0.0094451904296875,
0.002002716064453125,
-0.01454925537109375,
0.01068115234375,
0.02301025390625,
-0.003841400146484375,
-0.00716400146484375,
-0.0214385986328125,
-0.037078857421875,
0.004230499267578125,
0.0447998046875,
-0.005077362060546875,
-0.012298583984375,
-0.01751708984375,
0.0031833648681640625,
-0.023040771484375,
0.00890350341796875,
-0.019805908203125,
-0.0005946159362792969,
-0.020660400390625,
0.005077362060546875,
0.01062774658203125,
-0.0186309814453125,
0.066650390625,
-0.0235595703125,
-0.0267486572265625,
0.044921875,
0.001617431640625,
0.050689697265625,
0.016937255859375,
-0.01174163818359375,
-0.00004851818084716797,
-0.03857421875,
-0.004344940185546875,
0.0185699462890625,
-0.016387939453125,
0.0016145706176757812,
-0.00975799560546875,
0.013763427734375,
0.03857421875,
-0.00396728515625,
-0.0070953369140625,
0.00902557373046875,
-0.00273895263671875,
-0.00650787353515625,
0.050384521484375,
-0.0166015625,
0.09466552734375,
-0.031707763671875,
0.0404052734375,
0.006587982177734375,
0.0240631103515625,
-0.027069091796875,
-0.00829315185546875,
0.007579803466796875,
-0.049163818359375,
-0.02825927734375,
0.01233673095703125,
-0.058319091796875,
0.0308990478515625,
0.048858642578125,
-0.0023365020751953125,
-0.0023593902587890625,
-0.003753662109375,
-0.002838134765625,
-0.017364501953125,
0.005977630615234375,
-0.020416259765625,
0.01904296875,
-0.0225830078125,
0.01953125,
0.028533935546875,
-0.0079498291015625,
0.00638580322265625,
-0.0101165771484375,
0.00738525390625,
0.016204833984375,
-0.032379150390625,
-0.043975830078125,
0.0179595947265625,
0.0621337890625,
0.017486572265625,
0.05364990234375,
0.004688262939453125,
0.032745361328125,
0.042694091796875,
-0.006603240966796875,
0.031280517578125,
0.0270538330078125,
0.0207672119140625,
-0.013275146484375,
0.04193115234375,
0.0227813720703125,
0.003631591796875,
0.026641845703125,
0.03173828125,
0.052886962890625,
-0.07110595703125,
0.004497528076171875,
0.0033855438232421875,
-0.0022296905517578125,
0.043487548828125,
0.037567138671875,
-0.0153656005859375,
0.04840087890625,
0.021148681640625,
-0.07501220703125,
-0.01026153564453125,
0.0307159423828125,
0.00873565673828125,
-0.01389312744140625,
-0.01104736328125,
0.0047760009765625,
0.008758544921875,
0.00464630126953125,
-0.003017425537109375,
-0.006351470947265625,
0.01556396484375,
-0.02935791015625,
-0.025421142578125,
0.035614013671875,
-0.025634765625,
-0.0084686279296875,
0.07025146484375,
-0.039947509765625,
0.05560302734375,
0.0235595703125,
0.042999267578125,
-0.01800537109375,
0.02197265625,
0.0130157470703125,
-0.0250396728515625,
0.0029697418212890625,
-0.035980224609375,
0.0184478759765625,
-0.0146331787109375,
-0.001312255859375,
-0.0271453857421875,
-0.006267547607421875,
-0.005634307861328125,
-0.037322998046875,
-0.00652313232421875,
-0.0290069580078125,
-0.05413818359375,
0.054595947265625,
-0.05340576171875,
0.004055023193359375,
0.00690460205078125,
0.046234130859375,
-0.0022792816162109375,
0.0107269287109375,
-0.01480865478515625,
-0.037811279296875,
-0.0225677490234375,
-0.0025920867919921875,
-0.053497314453125,
0.04486083984375,
0.008056640625,
-0.07415771484375,
0.09674072265625,
-0.0184173583984375,
0.06280517578125,
0.0283660888671875,
0.0194549560546875,
-0.0163726806640625,
-0.000553131103515625,
-0.0341796875,
0.0224761962890625,
0.00569915771484375,
0.06536865234375,
-0.03173828125,
-0.01087188720703125,
0.040008544921875,
0.042938232421875,
0.06903076171875,
0.007312774658203125,
-0.04620361328125,
-0.0024356842041015625,
0.042816162109375,
0.0110321044921875,
-0.0128021240234375,
0.05609130859375,
-0.0233001708984375,
-0.006237030029296875,
0.0294952392578125,
-0.06536865234375,
-0.011474609375,
0.002223968505859375,
0.0032787322998046875,
0.00495147705078125,
-0.005886077880859375,
-0.004970550537109375,
-0.01233673095703125,
0.01235198974609375,
-0.04376220703125,
-0.01788330078125,
0.036346435546875,
-0.0310211181640625,
-0.0022754669189453125,
0.04595947265625,
0.06829833984375,
-0.0687255859375,
-0.04718017578125,
-0.0267181396484375,
0.05670166015625,
0.0108642578125,
0.01139068603515625,
0.00510406494140625,
0.01080322265625,
0.037750244140625,
0.0085601806640625,
0.0029621124267578125,
0.04156494140625,
-0.0224761962890625,
0.055694580078125,
0.03985595703125,
0.02752685546875,
-0.0016937255859375,
0.051727294921875,
0.042144775390625,
0.0579833984375,
-0.065673828125,
-0.01364898681640625,
-0.003570556640625,
-0.0190887451171875,
0.00301361083984375,
-0.0210113525390625,
0.0172119140625,
-0.002750396728515625,
-0.0199737548828125,
-0.00518798828125,
-0.01739501953125,
0.0189208984375,
0.004154205322265625,
-0.00696563720703125,
-0.0052032470703125,
0.01010894775390625,
0.0108489990234375,
-0.02960205078125,
0.012725830078125,
-0.004268646240234375,
0.030731201171875,
0.01519012451171875,
0.0307769775390625,
0.0033206939697265625,
-0.0094451904296875,
0.0034332275390625,
0.071533203125,
-0.00916290283203125,
0.00811004638671875,
-0.06671142578125,
-0.0638427734375,
-0.0005884170532226562,
0.031768798828125,
0.035369873046875,
0.005161285400390625,
0.0185089111328125,
0.01117706298828125,
-0.0018329620361328125,
0.002239227294921875,
0.023651123046875,
-0.01369476318359375,
0.057769775390625,
-0.058074951171875,
0.0433349609375,
-0.02886962890625,
-0.008758544921875,
-0.06134033203125,
0.020965576171875,
0.0020351409912109375,
0.01068115234375,
0.01230621337890625,
0.017242431640625,
-0.029815673828125,
0.0185089111328125,
0.03045654296875,
0.06207275390625,
0.060272216796875,
-0.0614013671875,
0.005100250244140625,
-0.0478515625,
-0.10064697265625,
0.032257080078125,
0.051788330078125,
-0.01959228515625,
-0.008148193359375,
0.003246307373046875,
0.0275115966796875,
0.016143798828125,
-0.0231170654296875,
-0.02288818359375,
0.03802490234375,
0.04547119140625,
0.0252227783203125,
-0.050262451171875,
-0.0396728515625,
-0.003875732421875,
0.04864501953125,
-0.0283355712890625,
0.1552734375,
-0.069091796875,
-0.0112762451171875,
-0.0163116455078125,
-0.012847900390625,
-0.0335693359375,
-0.0246734619140625,
0.006435394287109375,
-0.05291748046875,
-0.0289459228515625,
0.016937255859375,
-0.05865478515625,
0.01739501953125,
0.0217132568359375,
-0.0264739990234375,
0.035797119140625,
-0.024566650390625,
0.020538330078125,
-0.0180511474609375,
-0.0296783447265625,
-0.032928466796875,
-0.04705810546875,
-0.04241943359375,
-0.003162384033203125,
0.0086822509765625,
-0.0072479248046875,
-0.04168701171875,
0.0230255126953125,
0.004306793212890625,
-0.005222320556640625,
0.009735107421875,
0.004669189453125,
0.0018157958984375,
0.035919189453125,
-0.031036376953125,
-0.016754150390625,
0.04608154296875,
-0.003459930419921875,
0.03179931640625,
0.02032470703125,
0.0143280029296875,
0.044708251953125,
-0.018890380859375,
-0.049102783203125,
-0.0765380859375,
-0.047698974609375,
-0.022796630859375,
-0.03436279296875,
-0.033538818359375,
0.002063751220703125,
-0.0313720703125,
-0.029388427734375,
0.0014324188232421875,
-0.006977081298828125,
-0.0189971923828125,
0.0262451171875,
0.01064300537109375,
0.0016126632690429688,
-0.00557708740234375,
0.0148468017578125,
0.01412200927734375,
0.03265380859375,
-0.09454345703125,
0.072998046875,
-0.00921630859375,
0.0297088623046875,
-0.0157470703125,
-0.0262298583984375,
0.0013494491577148438,
-0.0474853515625,
-0.0718994140625,
0.00775146484375,
-0.0609130859375,
-0.0308837890625,
-0.0278167724609375,
0.015472412109375,
0.074951171875,
-0.01514434814453125,
-0.049713134765625,
-0.0350341796875,
-0.01511383056640625,
0.042236328125,
-0.04681396484375,
-0.0158233642578125,
0.01861572265625,
0.024139404296875,
0.00894927978515625,
-0.10467529296875,
-0.0482177734375,
-0.031402587890625,
0.05596923828125,
0.029449462890625,
-0.043426513671875,
-0.0233154296875,
-0.045867919921875,
-0.033538818359375,
0.06689453125,
0.026092529296875,
-0.01242828369140625,
-0.023895263671875,
0.00313568115234375,
-0.0230255126953125,
0.05242919921875,
0.0129547119140625,
-0.03387451171875,
-0.017852783203125,
0.01168060302734375,
0.0277557373046875,
0.06982421875,
-0.032470703125,
0.0313720703125,
-0.00905609130859375,
0.05084228515625,
0.0131072998046875,
0.032806396484375,
0.0189971923828125,
-0.0166168212890625,
0.047454833984375,
0.05682373046875,
-0.01080322265625,
0.007564544677734375,
0.00762939453125,
-0.04736328125,
-0.00023353099822998047,
-0.0328369140625,
-0.0308074951171875,
-0.038055419921875,
0.0653076171875,
-0.0026531219482421875,
0.0110626220703125,
0.00415802001953125,
-0.0430908203125,
-0.0030460357666015625,
0.00019109249114990234,
0.007534027099609375,
0.038543701171875,
-0.0682373046875,
0.0022830963134765625,
0.01294708251953125,
-0.020843505859375,
-0.00019502639770507812,
-0.009552001953125,
-0.033294677734375,
0.00506591796875,
-0.0232696533203125,
-0.0139312744140625,
0.0091094970703125,
-0.0260009765625,
0.032073974609375,
-0.021331787109375,
0.0017232894897460938,
-0.0006742477416992188,
0.03143310546875,
0.00029015541076660156,
-0.009735107421875,
-0.036712646484375,
0.0238494873046875,
-0.042327880859375,
-0.00482940673828125,
-0.01337432861328125,
0.04351806640625,
-0.025177001953125,
0.03399658203125,
-0.021697998046875,
0.029998779296875,
0.003734588623046875,
0.01496124267578125,
-0.02069091796875,
0.0543212890625,
0.0265350341796875,
0.0731201171875,
-0.005710601806640625,
0.018341064453125,
0.00525665283203125,
0.040985107421875,
-0.0249176025390625,
-0.0016002655029296875,
-0.00829315185546875,
-0.0172271728515625,
0.01544952392578125,
0.0017910003662109375,
0.006610870361328125,
-0.0252532958984375,
-0.006618499755859375,
-0.03533935546875,
0.004055023193359375,
0.0164794921875
] |
32ff74a062ea01322a8b5562f8d32b48e8069f08
|
Wordpress Stackexchange
Q: use wp_get_theme() to get theme author name As of wordpress 3.4 we're supposed to use wp_get_theme to return theme data.
$theme = wp_get_theme();
//var_dump($theme);
echo $theme->Author;
despite the var_dump indicating the correct string, $theme->Author always returns a hyperlink with the author's name, but linked to the author's site. how can i get just the theme's author name?
A: Do not use just the header string, call display() instead and set the second parameter to FALSE to suppress markup.
// FALSE for no markup
$theme->display( 'Author', FALSE );
What you see in your var_dump() are private properties. If you print $theme->Author the magic __get() method is called and this calls display() without the second parameter for $markup.
|
Q: use wp_get_theme() to get theme author name As of wordpress 3.4 we're supposed to use wp_get_theme to return theme data.
$theme = wp_get_theme();
//var_dump($theme);
echo $theme->Author;
despite the var_dump indicating the correct string, $theme->Author always returns a hyperlink with the author's name, but linked to the author's site. how can i get just the theme's author name?
A: Do not use just the header string, call display() instead and set the second parameter to FALSE to suppress markup.
// FALSE for no markup
$theme->display( 'Author', FALSE );
What you see in your var_dump() are private properties. If you print $theme->Author the magic __get() method is called and this calls display() without the second parameter for $markup.
A: Yes, you're right. I could reproduce the issue on my Wordpress 3.4.1 installation. Not sure if this is a bug; will need to dig into the core wordpress code to see how WP_Theme object is built and values are returned. For now, I think we're left with an option to use PHP string Parser functions and extract Author name.
|
wordpress
|
{
"language": "en",
"length": 177,
"provenance": "stackexchange_00019.jsonl.gz:421393",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57072"
}
|
[
0.014404296875,
-0.016448974609375,
-0.0101470947265625,
-0.031219482421875,
-0.01062774658203125,
-0.00873565673828125,
-0.00630950927734375,
-0.0105438232421875,
-0.01190948486328125,
0.050445556640625,
0.00262451171875,
0.02398681640625,
0.00812530517578125,
-0.00867462158203125,
-0.022796630859375,
-0.00799560546875,
0.036285400390625,
-0.0240478515625,
0.035003662109375,
0.01505279541015625,
0.01255035400390625,
0.027740478515625,
0.0232086181640625,
-0.000579833984375,
0.0433349609375,
-0.0416259765625,
0.11285400390625,
-0.006427764892578125,
0.042633056640625,
-0.004730224609375,
0.03973388671875,
-0.064697265625,
-0.0165863037109375,
0.06719970703125,
-0.0155792236328125,
0.056121826171875,
-0.01885986328125,
0.051483154296875,
0.057861328125,
0.0013475418090820312,
-0.005733489990234375,
0.00804901123046875,
-0.0897216796875,
0.0126953125,
-0.058929443359375,
-0.05413818359375,
-0.00821685791015625,
-0.0037441253662109375,
-0.0001220703125,
0.038604736328125,
0.0171966552734375,
0.022796630859375,
0.0182647705078125,
0.00286865234375,
-0.0017156600952148438,
-0.00662994384765625,
0.038787841796875,
0.0100250244140625,
0.033721923828125,
-0.07562255859375,
-0.059600830078125,
-0.002170562744140625,
0.04754638671875,
0.0162200927734375,
0.0236663818359375,
0.021484375,
0.033447265625,
0.0252838134765625,
-0.01560211181640625,
0.0293121337890625,
0.004535675048828125,
-0.035003662109375,
-0.0059661865234375,
0.01552581787109375,
-0.0390625,
-0.04241943359375,
-0.00464630126953125,
-0.06475830078125,
0.034454345703125,
0.0047760009765625,
-0.0225677490234375,
-0.024627685546875,
-0.06298828125,
-0.0308074951171875,
0.050689697265625,
0.034515380859375,
-0.0138397216796875,
-0.01187896728515625,
-0.042938232421875,
0.003082275390625,
-0.027008056640625,
-0.02996826171875,
-0.0152130126953125,
0.0019054412841796875,
0.002925872802734375,
-0.034881591796875,
0.0246734619140625,
0.07965087890625,
-0.0145111083984375,
0.0167083740234375,
-0.0176239013671875,
-0.0251922607421875,
0.0037174224853515625,
-0.052001953125,
-0.0180816650390625,
0.0589599609375,
0.03570556640625,
0.035675048828125,
0.0002815723419189453,
0.0169830322265625,
0.007358551025390625,
-0.033416748046875,
-0.01824951171875,
-0.037017822265625,
0.004791259765625,
0.030242919921875,
-0.049224853515625,
0.021514892578125,
0.0240020751953125,
0.007167816162109375,
0.02099609375,
0.031097412109375,
-0.000591278076171875,
0.006656646728515625,
0.00003218650817871094,
0.01277923583984375,
-0.01885986328125,
-0.03558349609375,
-0.01432037353515625,
0.028106689453125,
-0.03424072265625,
0.0020751953125,
0.01531219482421875,
0.01436614990234375,
-0.002933502197265625,
-0.0318603515625,
-0.004802703857421875,
0.011138916015625,
-0.003692626953125,
-0.006664276123046875,
-0.01007080078125,
0.0027103424072265625,
0.043426513671875,
-0.0282440185546875,
-0.0231170654296875,
0.01381683349609375,
0.0021514892578125,
0.01338958740234375,
-0.0122222900390625,
-0.038330078125,
0.0167236328125,
-0.0283203125,
-0.0039825439453125,
0.032501220703125,
0.050872802734375,
-0.00008410215377807617,
0.06585693359375,
-0.034271240234375,
0.0018091201782226562,
-0.020751953125,
0.01678466796875,
-0.0124664306640625,
-0.0160675048828125,
0.033477783203125,
-0.01483154296875,
0.010284423828125,
0.0263519287109375,
-0.0012941360473632812,
0.00453948974609375,
-0.0031070709228515625,
0.0159149169921875,
-0.03240966796875,
-0.0044403076171875,
0.0198822021484375,
0.0072784423828125,
0.0310821533203125,
0.020965576171875,
0.0130615234375,
0.01495361328125,
0.0265960693359375,
-0.025299072265625,
-0.029937744140625,
0.0276947021484375,
-0.0271453857421875,
-0.06390380859375,
0.029327392578125,
0.0284881591796875,
0.0986328125,
0.0256805419921875,
0.0136260986328125,
0.04827880859375,
-0.01247406005859375,
-0.019287109375,
-0.0311737060546875,
0.016204833984375,
0.002899169921875,
-0.00299835205078125,
0.0007076263427734375,
-0.001537322998046875,
0.0152435302734375,
0.023651123046875,
-0.0038585662841796875,
0.036224365234375,
-0.0181121826171875,
-0.046142578125,
0.0345458984375,
-0.0297393798828125,
0.040283203125,
0.042144775390625,
0.04229736328125,
0.0023326873779296875,
0.0234222412109375,
-0.04888916015625,
0.0070953369140625,
-0.0283050537109375,
0.0254058837890625,
-0.0074310302734375,
0.02349853515625,
0.0040130615234375,
0.0184173583984375,
0.0285186767578125,
-0.0171356201171875,
0.01953125,
0.0216827392578125,
0.0303192138671875,
-0.0048675537109375,
-0.00982666015625,
-0.017791748046875,
0.0234527587890625,
0.01129913330078125,
-0.0013856887817382812,
0.01247406005859375,
0.0408935546875,
0.03961181640625,
-0.0167236328125,
0.0021572113037109375,
0.01534271240234375,
-0.052032470703125,
0.01113128662109375,
0.038604736328125,
0.0419921875,
0.01410675048828125,
-0.021728515625,
-0.0535888671875,
0.051239013671875,
-0.032867431640625,
0.00611114501953125,
-0.04486083984375,
0.045562744140625,
0.061279296875,
0.024383544921875,
-0.0270538330078125,
0.0102691650390625,
-0.0601806640625,
0.002044677734375,
0.03643798828125,
-0.0016841888427734375,
0.03155517578125,
-0.03582763671875,
0.0308380126953125,
-0.016021728515625,
-0.017333984375,
0.007572174072265625,
-0.0291748046875,
0.0091400146484375,
0.0189208984375,
-0.0103302001953125,
-0.00827789306640625,
-0.052642822265625,
0.0024318695068359375,
0.0283966064453125,
0.03668212890625,
-0.00371551513671875,
0.0556640625,
-0.0276641845703125,
-0.006694793701171875,
0.0183868408203125,
-0.01154327392578125,
-0.028961181640625,
0.01152801513671875,
-0.026214599609375,
0.003448486328125,
0.01160430908203125,
-0.004993438720703125,
0.006435394287109375,
-0.021820068359375,
0.0296478271484375,
-0.003078460693359375,
0.0006155967712402344,
0.0214385986328125,
0.0194854736328125,
0.0455322265625,
-0.0213165283203125,
0.04254150390625,
-0.0229644775390625,
0.0159454345703125,
0.0021152496337890625,
-0.0282440185546875,
0.03912353515625,
-0.02191162109375,
0.020477294921875,
0.049896240234375,
0.006786346435546875,
0.004543304443359375,
0.022613525390625,
-0.054779052734375,
0.011993408203125,
0.0206298828125,
0.0136871337890625,
0.0157318115234375,
-0.0770263671875,
0.0277099609375,
0.0203704833984375,
0.028076171875,
0.003223419189453125,
-0.0478515625,
-0.016204833984375,
0.018524169921875,
-0.0914306640625,
-0.061431884765625,
0.0159759521484375,
-0.053131103515625,
-0.027191162109375,
-0.03143310546875,
-0.041717529296875,
0.00980377197265625,
-0.02374267578125,
-0.0243377685546875,
0.044219970703125,
-0.044677734375,
-0.1112060546875,
-0.057647705078125,
-0.10888671875,
-0.0278167724609375,
-0.003314971923828125,
0.018218994140625,
-0.007740020751953125,
0.036895751953125,
-0.006969451904296875,
-0.05084228515625,
-0.0209197998046875,
0.07470703125,
0.003665924072265625,
-0.034637451171875,
-0.01316070556640625,
-0.004314422607421875,
-0.0099029541015625,
-0.0024871826171875,
-0.0261383056640625,
-0.001911163330078125,
0.012298583984375,
-0.01654052734375,
-0.0162353515625,
-0.0204620361328125,
0.0228424072265625,
0.06365966796875,
0.00374603271484375,
-0.0103302001953125,
0.060089111328125,
-0.048797607421875,
-0.0309906005859375,
0.00345611572265625,
-0.038482666015625,
0.035247802734375,
0.0205078125,
-0.015167236328125,
-0.0079345703125,
0.0210723876953125,
0.006103515625,
0.01197052001953125,
-0.0352783203125,
-0.004596710205078125,
0.07244873046875,
0.027130126953125,
0.05023193359375,
0.01300811767578125,
-0.026702880859375,
-0.045074462890625,
0.0235443115234375,
-0.01026153564453125,
-0.0186767578125,
-0.01297760009765625,
-0.01552581787109375,
0.01495361328125,
-0.045135498046875,
0.049896240234375,
-0.0208892822265625,
-0.01145172119140625,
-0.02545166015625,
-0.0248565673828125,
-0.01351165771484375,
0.05450439453125,
0.012481689453125,
-0.0199737548828125,
0.0190582275390625,
0.0174407958984375,
-0.052947998046875,
-0.0213470458984375,
-0.046875,
0.004398345947265625,
-0.09417724609375,
0.01180267333984375,
-0.00827789306640625,
-0.030548095703125,
-0.0226593017578125,
0.048858642578125,
-0.055419921875,
-0.0256500244140625,
0.01270294189453125,
-0.0374755859375,
-0.0034637451171875,
0.031280517578125,
-0.03253173828125,
0.0281829833984375,
-0.0197296142578125,
-0.0298004150390625,
-0.08135986328125,
-0.031463623046875,
0.0253753662109375,
0.05609130859375,
-0.015350341796875,
-0.00873565673828125,
-0.0350341796875,
0.0484619140625,
0.047821044921875,
0.0469970703125,
0.024627685546875,
-0.0190277099609375,
0.01873779296875,
-0.0237884521484375,
0.039642333984375,
-0.0251922607421875,
0.00901031494140625,
-0.00936126708984375,
-0.06353759765625,
-0.016021728515625,
-0.0209503173828125,
0.014495849609375,
0.0222930908203125,
-0.04229736328125,
-0.0029239654541015625,
-0.017333984375,
-0.0005965232849121094,
0.016357421875,
0.007328033447265625,
-0.0001838207244873047,
-0.0219573974609375,
-0.0220794677734375,
0.06396484375,
0.0022411346435546875,
-0.01374053955078125,
-0.011810302734375,
0.1287841796875,
0.03253173828125,
-0.0255889892578125,
-0.02825927734375,
0.0006284713745117188,
0.040283203125,
-0.018341064453125,
0.0214996337890625,
0.00679779052734375,
-0.055145263671875,
0.06719970703125,
-0.0018482208251953125,
-0.017181396484375,
0.012939453125,
0.058746337890625,
-0.0053558349609375,
-0.0229339599609375,
0.010589599609375,
-0.0280303955078125,
0.0113677978515625,
0.01360321044921875,
0.0030117034912109375,
0.003818511962890625,
0.046142578125,
0.0105438232421875,
-0.034393310546875,
0.0026836395263671875,
-0.004367828369140625,
-0.0292816162109375,
0.001331329345703125,
0.01308441162109375,
0.02972412109375,
0.007671356201171875,
0.0115814208984375,
-0.0005955696105957031,
0.0096893310546875,
0.006687164306640625,
-0.00018703937530517578,
-0.014007568359375,
-0.01270294189453125,
0.0285491943359375,
-0.031768798828125,
-0.020416259765625,
0.00897979736328125,
-0.01482391357421875,
0.06414794921875,
0.0077362060546875,
-0.04266357421875,
0.0002357959747314453,
-0.0143585205078125,
0.0694580078125,
0.01259613037109375,
-0.0377197265625,
0.03662109375,
0.016357421875,
-0.01531982421875,
0.005847930908203125,
-0.039398193359375,
-0.028717041015625,
-0.032928466796875,
0.01471710205078125,
-0.014312744140625,
0.014801025390625,
0.0177459716796875,
0.07684326171875,
-0.0206451416015625,
0.0509033203125,
-0.0160675048828125,
-0.003963470458984375,
-0.0032024383544921875,
0.03759765625,
0.0230255126953125,
-0.0269012451171875,
0.031982421875,
-0.0202178955078125,
0.02423095703125,
-0.0277862548828125,
0.0113525390625,
0.0322265625,
0.03851318359375,
0.0014390945434570312,
-0.031829833984375,
0.0090789794921875,
-0.0234832763671875,
0.005496978759765625,
0.01079559326171875,
-0.021820068359375,
-0.016204833984375,
-0.0289154052734375,
0.0208587646484375,
0.05181884765625,
-0.00595855712890625,
-0.0130615234375,
0.01091766357421875,
-0.00457000732421875,
-0.01122283935546875,
0.037567138671875,
-0.050445556640625,
0.0113372802734375,
0.0273284912109375,
-0.050506591796875,
-0.004199981689453125,
0.024139404296875,
-0.06646728515625,
-0.038177490234375,
-0.017608642578125,
-0.031646728515625,
0.06854248046875,
-0.025482177734375,
0.01531219482421875,
-0.035125732421875,
0.01238250732421875,
-0.0157012939453125,
-0.0171051025390625,
0.09405517578125,
0.06719970703125,
-0.0694580078125,
0.027435302734375,
-0.044525146484375,
0.021240234375,
0.008880615234375,
-0.050994873046875,
-0.0272216796875,
-0.0282440185546875,
-0.0204925537109375,
-0.000370025634765625,
-0.0087890625,
-0.0164947509765625,
-0.006435394287109375,
0.03216552734375,
0.0033245086669921875,
0.0325927734375,
0.007648468017578125,
0.068115234375,
-0.0008044242858886719,
0.035675048828125,
0.02325439453125,
0.038665771484375,
-0.0377197265625,
-0.0282440185546875,
0.01136016845703125,
-0.0159149169921875,
-0.0276031494140625,
-0.015533447265625,
-0.00878143310546875,
-0.021575927734375,
0.0266265869140625,
-0.01090240478515625,
-0.0003247261047363281,
-0.0117645263671875,
-0.0087432861328125,
0.0041351318359375,
0.00254058837890625,
0.0230865478515625,
-0.0261688232421875,
0.0377197265625,
-0.00797271728515625,
0.002490997314453125,
-0.0297698974609375,
-0.00922393798828125,
0.00897979736328125,
0.0006437301635742188,
-0.017364501953125,
0.031982421875,
-0.044158935546875,
0.0654296875,
0.0758056640625,
0.01556396484375,
0.052764892578125,
0.0282135009765625,
0.0193328857421875,
-0.004573822021484375,
0.029571533203125,
-0.0262603759765625,
-0.0307464599609375,
0.046661376953125,
0.03094482421875,
0.00885009765625,
0.043060302734375,
-0.01480865478515625,
0.0040130615234375,
0.019775390625,
0.059539794921875,
-0.033050537109375,
0.009033203125,
0.05059814453125,
-0.0072174072265625,
-0.0183258056640625,
0.0107421875,
-0.021026611328125,
-0.050201416015625,
0.078125,
-0.04486083984375,
0.026031494140625,
0.042327880859375,
-0.0214385986328125,
0.023468017578125,
-0.03466796875,
0.06964111328125,
0.00005638599395751953,
-0.03472900390625,
-0.004730224609375,
0.0163726806640625,
-0.005489349365234375,
-0.025390625,
0.0012636184692382812,
0.0032062530517578125,
-0.0035533905029296875,
-0.049163818359375,
0.0276031494140625,
-0.03424072265625,
0.01143646240234375,
-0.033721923828125,
0.034210205078125,
0.0025386810302734375,
0.044403076171875,
-0.0271453857421875,
0.009063720703125,
0.02398681640625,
-0.0170745849609375,
0.02899169921875,
-0.033050537109375,
0.0238037109375,
0.017059326171875,
-0.032867431640625,
0.0181732177734375,
0.011749267578125,
-0.045440673828125,
-0.01207733154296875,
0.0138092041015625,
0.06353759765625,
0.017852783203125,
-0.033660888671875,
0.04248046875,
-0.008544921875,
-0.036712646484375,
0.021697998046875,
0.07733154296875,
-0.025054931640625,
0.00592803955078125,
0.05474853515625,
0.017303466796875,
-0.0218963623046875,
0.0299835205078125,
-0.0489501953125,
0.0599365234375,
-0.0005526542663574219,
0.00508880615234375,
0.0024871826171875,
0.029541015625,
-0.0184173583984375,
0.0015401840209960938,
-0.039031982421875,
0.036865234375,
0.0244598388671875,
0.031982421875,
-0.05682373046875,
-0.0219268798828125,
-0.005863189697265625,
0.03265380859375,
0.0245361328125,
-0.00278472900390625,
0.006649017333984375,
0.002166748046875,
0.032806396484375,
0.01617431640625,
-0.026641845703125,
0.0198211669921875,
0.018280029296875,
0.007965087890625,
0.054779052734375,
-0.023529052734375,
0.041961669921875,
-0.02056884765625,
0.013031005859375,
0.0260467529296875,
0.0176544189453125,
0.0136566162109375,
0.01019287109375,
-0.04669189453125,
-0.0594482421875,
-0.0034923553466796875,
0.045867919921875,
-0.03607177734375,
-0.01296234130859375,
0.036285400390625,
0.05413818359375,
-0.023040771484375,
0.0283050537109375,
-0.031951904296875,
0.06500244140625,
0.032989501953125,
-0.0160369873046875,
-0.0130462646484375,
0.0048065185546875,
0.006595611572265625,
-0.0221099853515625,
-0.021209716796875,
0.0241241455078125,
0.01448822021484375,
0.031280517578125,
0.00417327880859375,
0.023345947265625,
-0.042572021484375,
-0.00370025634765625,
0.021514892578125,
0.0328369140625,
-0.0299530029296875,
-0.0345458984375,
0.007556915283203125,
-0.017669677734375,
-0.0186309814453125,
0.0105133056640625,
-0.00855255126953125,
0.043121337890625,
0.029754638671875,
-0.0233306884765625,
-0.00090789794921875,
0.025482177734375,
0.0340576171875,
0.0006375312805175781,
-0.0050201416015625,
-0.0273895263671875,
-0.0019502639770507812,
-0.037841796875,
0.01224517822265625,
0.0017290115356445312,
0.01383209228515625,
0.0030384063720703125,
0.033294677734375,
0.01047515869140625,
0.01023101806640625,
-0.004581451416015625,
0.02008056640625,
-0.0182952880859375,
0.00537872314453125,
-0.0240478515625,
-0.01557159423828125,
-0.0063629150390625,
0.02734375,
0.021881103515625,
-0.012054443359375,
0.0309600830078125,
0.0325927734375,
-0.0268707275390625,
-0.006374359130859375,
0.01216888427734375,
-0.01690673828125,
-0.007015228271484375,
-0.0462646484375,
-0.0131072998046875,
-0.0162200927734375,
-0.01568603515625,
-0.0080413818359375,
-0.01345062255859375,
0.0191650390625,
-0.024017333984375,
0.0026111602783203125,
0.0056610107421875,
-0.01230621337890625,
0.007457733154296875,
-0.033966064453125,
-0.00666046142578125,
-0.0037822723388671875,
-0.0794677734375,
0.0006494522094726562,
-0.039520263671875,
-0.017333984375,
-0.00608062744140625,
0.0214996337890625,
-0.004444122314453125,
0.0233001708984375,
-0.049591064453125,
-0.00885772705078125,
0.006103515625,
0.018585205078125,
-0.0174102783203125,
0.042572021484375,
0.032257080078125,
-0.001171112060546875,
-0.0582275390625,
-0.049407958984375,
-0.00559234619140625,
0.0282745361328125,
0.0097808837890625,
0.0029754638671875,
0.0206451416015625,
0.00505828857421875,
-0.03631591796875,
0.02899169921875,
-0.08026123046875,
-0.060455322265625,
0.0791015625,
-0.048828125,
-0.033233642578125,
0.01044464111328125,
-0.09649658203125,
0.023223876953125,
0.033447265625,
0.0177154541015625,
0.0338134765625,
0.0113677978515625,
0.0300445556640625,
-0.0164031982421875,
-0.0006780624389648438,
-0.029449462890625,
-0.05859375,
-0.05780029296875,
0.004146575927734375,
0.007587432861328125,
0.017242431640625,
-0.0254669189453125,
-0.0033397674560546875,
0.029327392578125,
-0.0205230712890625,
0.020416259765625,
0.022552490234375,
0.0183868408203125,
0.0174560546875,
-0.0062255859375,
-0.073486328125,
0.007785797119140625,
-0.0184783935546875,
0.0305938720703125,
-0.01470184326171875,
0.0908203125,
0.001739501953125,
-0.0262908935546875,
0.054931640625,
-0.00899505615234375,
0.048553466796875,
-0.02142333984375,
-0.00542449951171875,
0.02764892578125,
0.03485107421875,
-0.0311126708984375,
-0.0210418701171875,
-0.01213836669921875,
-0.0214385986328125,
-0.004734039306640625,
0.0229949951171875,
0.0017023086547851562,
-0.00864410400390625,
-0.054046630859375,
0.0196990966796875,
0.0145721435546875,
-0.0213165283203125,
0.0098114013671875,
0.000055670738220214844,
-0.044097900390625,
0.0287933349609375,
-0.0153961181640625,
0.00885009765625,
0.013214111328125,
0.043060302734375,
-0.03912353515625,
0.016357421875,
-0.0046844482421875,
-0.0287017822265625,
-0.004077911376953125,
0.0106658935546875,
0.04205322265625,
-0.00876617431640625,
-0.016143798828125,
0.045013427734375,
-0.0012836456298828125,
0.0955810546875,
-0.06396484375,
-0.01142120361328125,
0.018798828125,
-0.0014972686767578125,
-0.036102294921875,
-0.08404541015625,
0.0162200927734375,
-0.07769775390625,
0.01177215576171875,
-0.03082275390625,
-0.004444122314453125,
0.004566192626953125,
-0.0306549072265625,
-0.0129241943359375,
0.036102294921875,
0.00201416015625,
-0.02764892578125,
-0.036468505859375,
-0.01934814453125,
-0.01505279541015625,
0.0224456787109375,
-0.000598907470703125,
-0.036895751953125,
-0.0078125,
0.054595947265625,
0.004322052001953125,
0.01309967041015625,
0.0254974365234375,
0.00885009765625,
-0.050811767578125,
-0.01438140869140625,
-0.03363037109375,
-0.01558685302734375,
-0.0116119384765625,
-0.010589599609375,
0.0260009765625,
0.03399658203125,
-0.0191802978515625,
0.0163726806640625,
0.0175323486328125,
0.03387451171875,
-0.01983642578125,
-0.04302978515625,
0.005817413330078125,
-0.002010345458984375,
0.0498046875,
0.0309906005859375,
0.006397247314453125,
-0.02978515625,
-0.046173095703125,
-0.004962921142578125,
-0.0271759033203125,
-0.010986328125,
0.036224365234375,
-0.0772705078125,
-0.003643035888671875,
-0.00215911865234375,
-0.033233642578125,
0.01336669921875,
0.006679534912109375,
-0.04656982421875,
0.0019140243530273438,
-0.035491943359375,
-0.00856781005859375,
-0.0538330078125,
-0.061248779296875,
0.03399658203125,
-0.0169525146484375,
0.01007080078125,
0.004436492919921875,
0.041168212890625,
0.022735595703125,
0.0186309814453125,
-0.0020618438720703125,
0.0384521484375,
-0.0369873046875,
-0.01073455810546875,
0.000324249267578125,
0.02801513671875,
-0.019622802734375,
0.00748443603515625,
-0.005584716796875,
0.018890380859375,
-0.0322265625,
0.0009188652038574219,
0.039764404296875,
0.0034351348876953125,
-0.01250457763671875,
0.052581787109375,
-0.0250244140625,
0.01079559326171875,
-0.0137786865234375,
0.0400390625,
-0.024383544921875,
-0.005855560302734375,
0.02081298828125,
-0.032684326171875,
0.0245513916015625,
-0.022186279296875,
0.050994873046875,
-0.004913330078125,
0.008819580078125,
-0.0227508544921875,
0.00017654895782470703,
0.01094818115234375
] |
832ac4ec002fa3326dd9f9159c331ed64878febd
|
Wordpress Stackexchange
Q: Disable Create New tags for posts
Possible Duplicate:
Can I turn off write-in tags/taxonomies?
I am trying to disable creation of new tags for posts. If a tag is in exisiting list of tags, it will be added with post otherwise deleted. The code i am using doesn't seem to work. Here is the code
add_filter( 'pre_post_tags_input', 'no_tags_input_create' );
add_action( 'publish_post', 'no_tags_input_create' );
add_action( 'publish_updated', 'no_tags_input_create' );
add_action( 'save_post', 'no_tags_input_create' );
function no_tags_input_create($post_ID) {
$taxonomy_ar = wp_get_post_tags( $post_ID );
if (count($taxonomy_ar) > 0){
foreach ($taxonomy_ar as $taxonomy_term) {
$term_ids= $taxonomy_term->term_id;
$tags_name[]= $taxonomy_term->name;
}
}
$output = array();
foreach( $tags_name as $tag )
if( !term_exists( $tag, 'post_tag') ){
wp_delete_term($term_ids,'post_tag');
wp_set_post_tags( $post_ID, '', false );
}
}
Can anyone point out where i am wrong?
|
Q: Disable Create New tags for posts
Possible Duplicate:
Can I turn off write-in tags/taxonomies?
I am trying to disable creation of new tags for posts. If a tag is in exisiting list of tags, it will be added with post otherwise deleted. The code i am using doesn't seem to work. Here is the code
add_filter( 'pre_post_tags_input', 'no_tags_input_create' );
add_action( 'publish_post', 'no_tags_input_create' );
add_action( 'publish_updated', 'no_tags_input_create' );
add_action( 'save_post', 'no_tags_input_create' );
function no_tags_input_create($post_ID) {
$taxonomy_ar = wp_get_post_tags( $post_ID );
if (count($taxonomy_ar) > 0){
foreach ($taxonomy_ar as $taxonomy_term) {
$term_ids= $taxonomy_term->term_id;
$tags_name[]= $taxonomy_term->name;
}
}
$output = array();
foreach( $tags_name as $tag )
if( !term_exists( $tag, 'post_tag') ){
wp_delete_term($term_ids,'post_tag');
wp_set_post_tags( $post_ID, '', false );
}
}
Can anyone point out where i am wrong?
|
wordpress
|
{
"language": "en",
"length": 124,
"provenance": "stackexchange_00019.jsonl.gz:421404",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57134"
}
|
[
0.0789794921875,
-0.00965118408203125,
0.0095977783203125,
-0.01375579833984375,
0.03326416015625,
-0.03912353515625,
0.0821533203125,
-0.034942626953125,
0.0014696121215820312,
0.01140594482421875,
-0.0261688232421875,
-0.033721923828125,
0.00640869140625,
-0.0285186767578125,
-0.01306915283203125,
-0.0404052734375,
0.0260467529296875,
-0.02557373046875,
0.006839752197265625,
-0.0083465576171875,
0.0032787322998046875,
0.00441741943359375,
0.017791748046875,
0.0006661415100097656,
0.0039043426513671875,
0.0091552734375,
0.00986480712890625,
-0.0276947021484375,
-0.00675201416015625,
-0.0377197265625,
0.01275634765625,
0.035675048828125,
0.01161956787109375,
0.0107269287109375,
-0.03387451171875,
-0.023101806640625,
-0.044158935546875,
0.0206146240234375,
-0.0035495758056640625,
0.005161285400390625,
0.06475830078125,
-0.0518798828125,
-0.0183868408203125,
-0.007541656494140625,
0.0036563873291015625,
-0.019256591796875,
0.066162109375,
-0.03753662109375,
0.02484130859375,
-0.025360107421875,
-0.00033664703369140625,
-0.00027823448181152344,
0.013641357421875,
-0.0340576171875,
-0.030059814453125,
-0.00669097900390625,
-0.00035309791564941406,
0.00395965576171875,
0.03631591796875,
0.00400543212890625,
-0.0237884521484375,
-0.01528167724609375,
0.01427459716796875,
-0.039947509765625,
0.01476287841796875,
0.0026340484619140625,
0.0085601806640625,
0.021942138671875,
-0.07794189453125,
0.022003173828125,
0.05242919921875,
-0.07354736328125,
0.01019287109375,
0.00759124755859375,
0.005840301513671875,
-0.0169525146484375,
0.04522705078125,
0.0263214111328125,
0.0026092529296875,
0.0173797607421875,
0.06072998046875,
0.01232147216796875,
-0.001056671142578125,
0.00537109375,
0.0081787109375,
-0.002292633056640625,
0.010345458984375,
-0.0203704833984375,
-0.029937744140625,
-0.021575927734375,
-0.029693603515625,
-0.011566162109375,
-0.02984619140625,
0.004451751708984375,
-0.00576019287109375,
-0.0307159423828125,
0.0215606689453125,
0.056396484375,
-0.01824951171875,
0.019012451171875,
-0.0012235641479492188,
-0.0552978515625,
0.040924072265625,
-0.052490234375,
0.026153564453125,
0.054718017578125,
-0.0176239013671875,
-0.03564453125,
0.035980224609375,
0.0065460205078125,
0.0198822021484375,
-0.0011310577392578125,
-0.00616455078125,
0.01071929931640625,
-0.0203704833984375,
-0.010772705078125,
-0.040283203125,
0.00989532470703125,
-0.02154541015625,
0.00959014892578125,
-0.0011739730834960938,
0.0333251953125,
-0.045562744140625,
0.050079345703125,
0.00884246826171875,
0.030975341796875,
0.0208740234375,
-0.030242919921875,
-0.0150604248046875,
-0.026336669921875,
-0.037750244140625,
0.039947509765625,
0.1256103515625,
0.0533447265625,
0.034759521484375,
-0.002269744873046875,
0.007602691650390625,
-0.052764892578125,
-0.039031982421875,
0.0224151611328125,
0.006290435791015625,
-0.038543701171875,
0.0010051727294921875,
-0.0298004150390625,
0.017486572265625,
0.032440185546875,
0.02752685546875,
0.013397216796875,
-0.001995086669921875,
-0.04974365234375,
0.02935791015625,
-0.02203369140625,
0.0806884765625,
-0.01303863525390625,
-0.04833984375,
-0.035736083984375,
0.0208740234375,
-0.03363037109375,
-0.041961669921875,
-0.072998046875,
0.0271453857421875,
0.0011444091796875,
0.00611114501953125,
0.0066070556640625,
-0.0219879150390625,
0.0008878707885742188,
-0.017791748046875,
-0.01255035400390625,
0.0257720947265625,
0.030364990234375,
0.0352783203125,
-0.0496826171875,
0.01128387451171875,
-0.005039215087890625,
-0.01629638671875,
0.00933837890625,
-0.004428863525390625,
-0.022125244140625,
0.04534912109375,
0.017364501953125,
-0.0151519775390625,
-0.018951416015625,
0.03955078125,
-0.003505706787109375,
-0.08197021484375,
0.03558349609375,
0.00927734375,
0.06817626953125,
0.0293731689453125,
0.0072784423828125,
0.07952880859375,
-0.01387786865234375,
-0.0269927978515625,
0.0183868408203125,
0.041412353515625,
-0.024261474609375,
-0.06689453125,
-0.02984619140625,
0.0016355514526367188,
-0.0168609619140625,
-0.0204315185546875,
0.01535797119140625,
-0.0254364013671875,
-0.0222320556640625,
-0.0780029296875,
-0.01556396484375,
-0.03692626953125,
0.061187744140625,
-0.034759521484375,
0.0025463104248046875,
0.032196044921875,
-0.0297088623046875,
-0.0135955810546875,
-0.0011854171752929688,
0.008514404296875,
0.019744873046875,
-0.0307464599609375,
0.0138397216796875,
0.015228271484375,
0.0124053955078125,
0.029296875,
0.0167999267578125,
0.036834716796875,
0.0068359375,
0.038909912109375,
-0.01529693603515625,
0.006328582763671875,
-0.01386260986328125,
0.029937744140625,
0.0033721923828125,
-0.0306854248046875,
-0.003765106201171875,
0.049835205078125,
0.030975341796875,
-0.01331329345703125,
0.0037212371826171875,
0.03692626953125,
-0.07330322265625,
-0.0037860870361328125,
0.0518798828125,
0.03143310546875,
0.0133514404296875,
-0.029144287109375,
-0.01800537109375,
0.04974365234375,
-0.0024433135986328125,
-0.00025153160095214844,
-0.00701904296875,
0.03607177734375,
0.025146484375,
-0.01983642578125,
-0.0008058547973632812,
0.0406494140625,
-0.00763702392578125,
0.04266357421875,
0.040069580078125,
-0.060211181640625,
-0.03692626953125,
0.06488037109375,
-0.061248779296875,
0.01239776611328125,
-0.0391845703125,
0.00438690185546875,
-0.019744873046875,
0.046661376953125,
0.0141448974609375,
0.02557373046875,
0.0233306884765625,
-0.0261077880859375,
0.038116455078125,
0.00939178466796875,
-0.06756591796875,
0.00223541259765625,
-0.0079193115234375,
0.004039764404296875,
0.00048542022705078125,
-0.048187255859375,
0.02850341796875,
0.028411865234375,
-0.008880615234375,
-0.01214599609375,
0.0506591796875,
0.0267333984375,
-0.016082763671875,
-0.041717529296875,
-0.072998046875,
0.01352691650390625,
-0.011474609375,
-0.0625,
-0.0308685302734375,
-0.00841522216796875,
0.03082275390625,
-0.0289764404296875,
0.01702880859375,
0.03594970703125,
0.007053375244140625,
-0.02777099609375,
-0.049346923828125,
0.035552978515625,
-0.0255126953125,
0.07830810546875,
0.08966064453125,
0.0078582763671875,
0.03497314453125,
0.02862548828125,
-0.0009322166442871094,
0.02764892578125,
0.00856781005859375,
-0.0140380859375,
0.033355712890625,
-0.07843017578125,
-0.0180511474609375,
0.0226593017578125,
0.021697998046875,
0.00144195556640625,
-0.023834228515625,
-0.01548004150390625,
0.0179443359375,
-0.0237274169921875,
0.01129913330078125,
0.023895263671875,
-0.0036067962646484375,
-0.0270233154296875,
-0.005649566650390625,
-0.00997161865234375,
-0.006259918212890625,
-0.0084228515625,
-0.01245880126953125,
-0.04290771484375,
-0.0184783935546875,
-0.0306396484375,
-0.0491943359375,
-0.0110321044921875,
0.01375579833984375,
-0.01007080078125,
-0.01318359375,
0.01446533203125,
0.11090087890625,
0.021820068359375,
-0.059234619140625,
0.03619384765625,
-0.064453125,
-0.051483154296875,
0.056976318359375,
0.00812530517578125,
-0.0050201416015625,
0.00760650634765625,
0.0050201416015625,
-0.020477294921875,
0.0091705322265625,
-0.00518798828125,
-0.031646728515625,
-0.01336669921875,
0.0208892822265625,
0.017852783203125,
-0.00708770751953125,
-0.0030155181884765625,
0.005229949951171875,
0.0028533935546875,
-0.0286712646484375,
-0.014617919921875,
-0.0103607177734375,
-0.0294647216796875,
0.01410675048828125,
-0.013031005859375,
0.01506805419921875,
0.016448974609375,
0.0110626220703125,
0.00627899169921875,
0.0118560791015625,
0.033721923828125,
-0.0077362060546875,
0.012481689453125,
-0.019073486328125,
-0.024658203125,
-0.03765869140625,
0.0149383544921875,
-0.0283203125,
0.00665283203125,
-0.01953125,
-0.01019287109375,
-0.033233642578125,
-0.0180816650390625,
-0.06707763671875,
-0.039093017578125,
0.0092620849609375,
-0.08795166015625,
-0.00798797607421875,
-0.026397705078125,
0.01080322265625,
0.0018138885498046875,
0.044158935546875,
-0.0299224853515625,
-0.0148162841796875,
-0.046417236328125,
0.0037059783935546875,
0.0113525390625,
-0.081298828125,
0.0111083984375,
-0.0284881591796875,
-0.04608154296875,
0.034912109375,
0.000522613525390625,
0.0086669921875,
-0.041656494140625,
0.016357421875,
-0.036468505859375,
-0.0296630859375,
0.03802490234375,
-0.035736083984375,
0.01245880126953125,
-0.01316070556640625,
-0.004230499267578125,
-0.03692626953125,
-0.03558349609375,
-0.00847625732421875,
-0.061767578125,
0.00794219970703125,
-0.0257568359375,
0.0121307373046875,
-0.0124359130859375,
0.0166778564453125,
-0.0188751220703125,
0.0306549072265625,
0.017303466796875,
-0.0278778076171875,
0.00594329833984375,
0.0089569091796875,
-0.010894775390625,
0.016632080078125,
-0.007843017578125,
-0.0117034912109375,
-0.01282501220703125,
0.0048980712890625,
0.0007925033569335938,
0.073486328125,
-0.005153656005859375,
0.01120758056640625,
0.0196990966796875,
-0.0238037109375,
-0.063720703125,
-0.058319091796875,
-0.0675048828125,
-0.021514892578125,
-0.04034423828125,
-0.006984710693359375,
-0.038177490234375,
-0.0794677734375,
0.043212890625,
-0.01111602783203125,
-0.0168609619140625,
-0.0017137527465820312,
0.098388671875,
0.0157928466796875,
-0.004917144775390625,
-0.0111541748046875,
0.039215087890625,
0.0379638671875,
-0.017486572265625,
0.034423828125,
-0.0081787109375,
-0.0270233154296875,
0.0731201171875,
-0.01120758056640625,
-0.01373291015625,
-0.025115966796875,
0.06353759765625,
-0.0147705078125,
-0.01209259033203125,
0.00325775146484375,
-0.03753662109375,
0.04986572265625,
0.0214080810546875,
-0.009368896484375,
-0.01128387451171875,
0.0223388671875,
0.056793212890625,
-0.020416259765625,
-0.00725555419921875,
-0.034820556640625,
-0.050750732421875,
0.042205810546875,
0.045684814453125,
-0.0384521484375,
-0.0014657974243164062,
0.0158233642578125,
-0.0169525146484375,
-0.0635986328125,
-0.017730712890625,
-0.030120849609375,
-0.01068878173828125,
0.0022907257080078125,
0.0028934478759765625,
0.0030117034912109375,
-0.0232696533203125,
-0.0299072265625,
-0.0009722709655761719,
0.01436614990234375,
-0.01934814453125,
-0.0487060546875,
-0.006244659423828125,
-0.00350189208984375,
0.028717041015625,
0.046539306640625,
-0.0132904052734375,
0.024688720703125,
0.02423095703125,
-0.003662109375,
-0.0022602081298828125,
-0.049224853515625,
-0.0012121200561523438,
-0.0416259765625,
-0.0193023681640625,
0.0150604248046875,
-0.0194854736328125,
0.0260009765625,
0.017333984375,
0.005466461181640625,
0.0227508544921875,
-0.0213470458984375,
0.0208282470703125,
0.004528045654296875,
0.0243377685546875,
0.01422119140625,
-0.0300750732421875,
0.019622802734375,
-0.0167999267578125,
0.01629638671875,
-0.06591796875,
-0.01508331298828125,
0.0301666259765625,
0.036773681640625,
-0.0234222412109375,
-0.058502197265625,
0.042236328125,
0.0139617919921875,
-0.001888275146484375,
0.0186004638671875,
-0.0011663436889648438,
-0.033935546875,
-0.0192718505859375,
0.003025054931640625,
0.021881103515625,
-0.02874755859375,
-0.0017881393432617188,
0.00327301025390625,
-0.0306549072265625,
0.01258087158203125,
-0.0136871337890625,
0.007381439208984375,
-0.0229644775390625,
-0.0196533203125,
-0.0440673828125,
-0.021209716796875,
0.01522064208984375,
0.0080413818359375,
-0.00446319580078125,
-0.011871337890625,
-0.0279083251953125,
-0.00319671630859375,
-0.033111572265625,
0.035552978515625,
0.01267242431640625,
-0.03155517578125,
0.032623291015625,
0.01922607421875,
0.05230712890625,
0.037933349609375,
-0.0255126953125,
-0.01470947265625,
-0.0300140380859375,
-0.013031005859375,
-0.0196380615234375,
-0.047393798828125,
-0.03173828125,
-0.01329803466796875,
0.0277099609375,
0.001132965087890625,
0.00023567676544189453,
-0.04180908203125,
-0.00452423095703125,
0.01898193359375,
0.027252197265625,
0.01348876953125,
-0.021820068359375,
0.011627197265625,
0.013671875,
0.013214111328125,
-0.0013151168823242188,
-0.01543426513671875,
-0.00379180908203125,
-0.0157928466796875,
0.002788543701171875,
-0.09197998046875,
-0.024688720703125,
0.008758544921875,
-0.05267333984375,
0.029388427734375,
0.02398681640625,
-0.00003653764724731445,
0.04254150390625,
-0.00357818603515625,
0.0250396728515625,
-0.009857177734375,
-0.029937744140625,
-0.03167724609375,
0.021240234375,
0.0174102783203125,
-0.019989013671875,
0.00095367431640625,
0.006572723388671875,
0.0193023681640625,
0.0093841552734375,
-0.0218353271484375,
0.00786590576171875,
-0.0079345703125,
0.025390625,
0.01204681396484375,
0.00376129150390625,
-0.016937255859375,
0.0256195068359375,
0.00739288330078125,
0.018310546875,
0.0037822723388671875,
-0.00647735595703125,
-0.040557861328125,
-0.025665283203125,
0.045318603515625,
0.0106048583984375,
-0.0020751953125,
0.061431884765625,
-0.0250396728515625,
-0.0157012939453125,
0.0214691162109375,
0.0150146484375,
-0.0322265625,
-0.0024013519287109375,
0.007476806640625,
0.017364501953125,
0.035400390625,
-0.0025005340576171875,
-0.01088714599609375,
-0.03533935546875,
0.0440673828125,
-0.0200042724609375,
-0.00876617431640625,
0.0199432373046875,
0.0074310302734375,
-0.0257720947265625,
0.0110931396484375,
-0.0016117095947265625,
0.0226287841796875,
-0.021148681640625,
0.02789306640625,
0.01142120361328125,
0.0081634521484375,
-0.0221099853515625,
-0.004833221435546875,
0.008453369140625,
-0.03289794921875,
-0.0806884765625,
0.020263671875,
-0.0050811767578125,
-0.00675201416015625,
0.0338134765625,
-0.0574951171875,
0.0019741058349609375,
0.0243377685546875,
-0.0379638671875,
0.0251922607421875,
0.00531005859375,
-0.053741455078125,
-0.076416015625,
-0.0198516845703125,
0.0033931732177734375,
0.0182952880859375,
0.00091552734375,
0.0343017578125,
-0.005313873291015625,
-0.05535888671875,
-0.00015425682067871094,
0.0010519027709960938,
0.044921875,
-0.005298614501953125,
-0.026336669921875,
0.0240478515625,
0.0174560546875,
0.001056671142578125,
-0.0266265869140625,
-0.00421905517578125,
-0.041351318359375,
-0.01407623291015625,
-0.0247039794921875,
-0.02191162109375,
-0.0076141357421875,
-0.041107177734375,
-0.0975341796875,
0.1395263671875,
0.010772705078125,
0.04864501953125,
-0.0013332366943359375,
0.04608154296875,
-0.05035400390625,
0.0114898681640625,
-0.0290374755859375,
0.046142578125,
-0.008331298828125,
0.060211181640625,
-0.0150146484375,
0.008514404296875,
0.03289794921875,
0.031890869140625,
0.082763671875,
0.01340484619140625,
0.027862548828125,
-0.0296783447265625,
0.0233917236328125,
0.039398193359375,
-0.033447265625,
-0.0170440673828125,
0.008514404296875,
0.0054931640625,
0.030548095703125,
-0.03594970703125,
0.03826904296875,
-0.03961181640625,
-0.00952911376953125,
0.0186309814453125,
0.0197296142578125,
0.0160369873046875,
-0.01861572265625,
-0.014190673828125,
-0.00823974609375,
0.0034275054931640625,
-0.0009608268737792969,
0.024993896484375,
0.01082611083984375,
0.0088348388671875,
0.046142578125,
-0.0672607421875,
-0.005252838134765625,
-0.0211181640625,
0.054840087890625,
0.0228118896484375,
0.042205810546875,
0.00412750244140625,
0.02056884765625,
0.02801513671875,
-0.0146026611328125,
0.037841796875,
0.043060302734375,
-0.0618896484375,
0.003940582275390625,
0.01059722900390625,
0.01079559326171875,
-0.04351806640625,
0.01397705078125,
0.06671142578125,
0.025665283203125,
-0.0277862548828125,
0.004596710205078125,
0.01311492919921875,
0.0250244140625,
-0.00838470458984375,
-0.007579803466796875,
0.049102783203125,
0.02606201171875,
0.036956787109375,
-0.04693603515625,
-0.004245758056640625,
0.0259552001953125,
0.030029296875,
0.00036978721618652344,
0.0203399658203125,
-0.056915283203125,
-0.03411865234375,
-0.045654296875,
0.007579803466796875,
-0.002933502197265625,
0.043212890625,
0.03900146484375,
0.019134521484375,
0.006343841552734375,
-0.016876220703125,
-0.010650634765625,
0.0308074951171875,
0.0198822021484375,
-0.0014886856079101562,
-0.032806396484375,
-0.044708251953125,
0.0268096923828125,
0.0298919677734375,
-0.020172119140625,
0.049285888671875,
0.049774169921875,
0.04766845703125,
-0.03057861328125,
-0.024169921875,
0.07647705078125,
-0.0275726318359375,
-0.04302978515625,
-0.01146697998046875,
-0.031341552734375,
0.038787841796875,
-0.0132598876953125,
0.028228759765625,
0.0188140869140625,
0.019744873046875,
-0.045745849609375,
0.0206298828125,
-0.0085296630859375,
-0.0301361083984375,
0.03460693359375,
0.000667572021484375,
0.0237274169921875,
-0.0176849365234375,
-0.06317138671875,
0.024658203125,
-0.08013916015625,
-0.048553466796875,
0.014739990234375,
0.0201416015625,
-0.021575927734375,
0.041168212890625,
0.03643798828125,
-0.02642822265625,
0.01369476318359375,
-0.003147125244140625,
0.0289764404296875,
0.0306854248046875,
-0.0007767677307128906,
0.0112762451171875,
-0.04046630859375,
0.00888824462890625,
0.0211181640625,
-0.00106048583984375,
-0.0206298828125,
0.07110595703125,
-0.003452301025390625,
-0.01690673828125,
-0.020904541015625,
0.056243896484375,
-0.059326171875,
-0.03436279296875,
0.07330322265625,
-0.0117950439453125,
-0.02349853515625,
-0.0004892349243164062,
-0.04498291015625,
0.0305328369140625,
0.01035308837890625,
-0.000385284423828125,
0.048370361328125,
-0.05120849609375,
0.003971099853515625,
-0.005092620849609375,
0.031005859375,
-0.0201416015625,
-0.0100555419921875,
-0.05389404296875,
-0.030548095703125,
0.0257110595703125,
0.00487518310546875,
-0.00385284423828125,
0.03912353515625,
-0.0013303756713867188,
0.0015249252319335938,
0.0131683349609375,
-0.0173187255859375,
-0.01184844970703125,
0.0232086181640625,
0.0004916191101074219,
-0.030364990234375,
0.0011568069458007812,
-0.01849365234375,
-0.0255279541015625,
0.0200958251953125,
0.00730133056640625,
-0.0012950897216796875,
-0.07989501953125,
-0.01239013671875,
0.01299285888671875,
0.025238037109375,
-0.016571044921875,
0.025543212890625,
-0.013580322265625,
0.00830078125,
0.0008554458618164062,
-0.02178955078125,
-0.027374267578125,
-0.03668212890625,
-0.0036773681640625,
0.024322509765625,
-0.02685546875,
-0.057342529296875,
-0.05120849609375,
0.0015687942504882812,
0.044921875,
0.0038394927978515625,
-0.049652099609375,
0.03558349609375,
-0.045654296875,
0.01556396484375,
-0.005462646484375,
0.004886627197265625,
-0.01261138916015625,
0.0010433197021484375,
-0.040740966796875,
-0.0401611328125,
-0.03668212890625,
0.04754638671875,
-0.0394287109375,
0.0190277099609375,
0.03436279296875,
-0.0233306884765625,
-0.0275726318359375,
0.0218353271484375,
0.023590087890625,
0.046173095703125,
0.0169830322265625,
-0.022003173828125,
-0.0145111083984375,
-0.00911712646484375,
-0.0099639892578125,
-0.0267181396484375,
0.02203369140625,
-0.0623779296875,
-0.04925537109375,
-0.0006413459777832031,
0.006107330322265625,
0.032684326171875,
-0.03863525390625,
-0.1041259765625,
-0.005657196044921875,
-0.00732421875,
-0.0548095703125,
-0.0025310516357421875,
-0.009857177734375,
-0.0182952880859375,
0.003757476806640625,
0.011505126953125,
-0.04345703125,
-0.003414154052734375,
0.0300140380859375,
0.00734710693359375,
0.047027587890625,
0.04034423828125,
-0.03460693359375,
0.01085662841796875,
-0.012420654296875,
-0.00424957275390625,
0.0069122314453125,
0.004512786865234375,
-0.008575439453125,
0.01953125,
0.0268096923828125,
-0.047149658203125,
0.025665283203125,
-0.014190673828125,
0.0158843994140625,
-0.004962921142578125,
-0.05902099609375,
-0.0177459716796875,
-0.014984130859375,
0.075927734375,
0.021942138671875,
0.0200042724609375,
-0.0294647216796875,
-0.0333251953125,
-0.0479736328125,
-0.04302978515625,
0.0035190582275390625,
0.027008056640625,
-0.06292724609375,
0.0207672119140625,
0.0248565673828125,
0.022369384765625,
-0.01026153564453125,
-0.01514434814453125,
-0.0037059783935546875,
-0.031890869140625,
-0.0102691650390625,
-0.0011243820190429688,
-0.041351318359375,
0.029571533203125,
-0.0374755859375,
-0.0005049705505371094,
-0.0276031494140625,
-0.045684814453125,
0.0081329345703125,
-0.051513671875,
-0.052978515625,
-0.0158843994140625,
-0.0243072509765625,
0.0149078369140625,
0.02935791015625,
0.007518768310546875,
-0.01316070556640625,
0.003360748291015625,
0.004161834716796875,
-0.01380157470703125,
0.0087432861328125,
0.006591796875,
0.002262115478515625,
-0.0228729248046875,
0.0210418701171875,
-0.0083160400390625,
0.057769775390625,
-0.0015325546264648438,
0.00614166259765625,
-0.018890380859375,
0.038238525390625,
-0.016754150390625,
-0.00662994384765625,
-0.00534820556640625,
0.0019311904907226562,
0.0084381103515625,
-0.0007681846618652344,
0.029205322265625,
-0.0206756591796875,
0.0226898193359375,
-0.03875732421875,
0.0163726806640625,
0.0162353515625
] |
229b3857457d48caa646d01814cc955a5dd1c5fb
|
Wordpress Stackexchange
Q: FTP credentials on localhost
Possible Duplicate:
wordpress on localhost lamp doesn't let me install plugins
I just started working locally with Wordpress. Trying to update theme/plugins I get asked for my FTP credentials and I get really confused...what the heck is my FTP credentials when working locally?
A: Set file permissions
On Mac OS X (Leopard), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files.
One way to do this is to change the owner of the wordpress directory and its contents to _www. Keep the group as staff, a group to which your user account belongs and give write permissions to the group.
$ cd /<wherever>/Sites/<thesite>
$ sudo chown -R _www wordpress
$ sudo chmod -R g+w wordpress
This way, the WordPress directories have a permission level of 775 and files have a permission level of 664. No file nor directory is world-writeable.
You can read more about it on mamp forum: http://forum.mamp.info/viewtopic.php?f=2&t=15917
|
Q: FTP credentials on localhost
Possible Duplicate:
wordpress on localhost lamp doesn't let me install plugins
I just started working locally with Wordpress. Trying to update theme/plugins I get asked for my FTP credentials and I get really confused...what the heck is my FTP credentials when working locally?
A: Set file permissions
On Mac OS X (Leopard), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files.
One way to do this is to change the owner of the wordpress directory and its contents to _www. Keep the group as staff, a group to which your user account belongs and give write permissions to the group.
$ cd /<wherever>/Sites/<thesite>
$ sudo chown -R _www wordpress
$ sudo chmod -R g+w wordpress
This way, the WordPress directories have a permission level of 775 and files have a permission level of 664. No file nor directory is world-writeable.
You can read more about it on mamp forum: http://forum.mamp.info/viewtopic.php?f=2&t=15917
|
wordpress
|
{
"language": "en",
"length": 190,
"provenance": "stackexchange_00019.jsonl.gz:421415",
"question_score": "23",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57166"
}
|
[
0.00450897216796875,
0.0210113525390625,
-0.005184173583984375,
0.00426483154296875,
-0.00872039794921875,
-0.012115478515625,
0.039306640625,
-0.0362548828125,
0.01947021484375,
0.00797271728515625,
-0.032745361328125,
0.018463134765625,
-0.005779266357421875,
-0.0212554931640625,
0.004627227783203125,
-0.0134429931640625,
0.0164794921875,
-0.0007357597351074219,
0.026641845703125,
-0.018157958984375,
0.017486572265625,
0.002040863037109375,
0.0217132568359375,
0.0199127197265625,
0.01070404052734375,
0.045501708984375,
0.08123779296875,
-0.0176544189453125,
0.022125244140625,
-0.005382537841796875,
0.0176239013671875,
-0.0440673828125,
0.0195770263671875,
0.0426025390625,
-0.0589599609375,
-0.0267181396484375,
-0.005126953125,
0.009765625,
-0.0280609130859375,
0.0419921875,
0.03167724609375,
-0.020233154296875,
0.0064239501953125,
0.07586669921875,
-0.01519775390625,
-0.0706787109375,
0.046417236328125,
-0.035614013671875,
0.01308441162109375,
0.005062103271484375,
0.0016012191772460938,
-0.002010345458984375,
0.00736236572265625,
-0.0002949237823486328,
-0.019439697265625,
-0.027374267578125,
-0.017303466796875,
0.023834228515625,
0.0208892822265625,
-0.050994873046875,
-0.03265380859375,
-0.005664825439453125,
0.039764404296875,
0.036651611328125,
-0.017303466796875,
0.00429534912109375,
0.03204345703125,
-0.0007472038269042969,
-0.0200347900390625,
0.0012664794921875,
0.025787353515625,
-0.002178192138671875,
0.0011205673217773438,
-0.04150390625,
-0.0038166046142578125,
0.00539398193359375,
0.028656005859375,
-0.0076751708984375,
-0.006732940673828125,
-0.007183074951171875,
0.02069091796875,
-0.02471923828125,
-0.02044677734375,
-0.004711151123046875,
0.0006442070007324219,
0.0299530029296875,
0.00592803955078125,
-0.022857666015625,
0.016998291015625,
0.038970947265625,
-0.017578125,
-0.0006384849548339844,
0.046112060546875,
0.053497314453125,
-0.0179595947265625,
0.0183563232421875,
0.0082244873046875,
0.0311431884765625,
-0.015838623046875,
0.027740478515625,
-0.00516510009765625,
-0.037353515625,
0.03076171875,
-0.0290679931640625,
-0.010406494140625,
0.0318603515625,
-0.0025157928466796875,
0.04522705078125,
0.025146484375,
0.024444580078125,
-0.004772186279296875,
-0.01416015625,
0.01100921630859375,
-0.04119873046875,
0.024078369140625,
0.03607177734375,
0.01424407958984375,
0.0245208740234375,
0.006893157958984375,
0.006103515625,
0.00821685791015625,
0.0341796875,
-0.088623046875,
0.0240020751953125,
-0.02203369140625,
-0.023895263671875,
0.0121307373046875,
0.0235443115234375,
-0.035858154296875,
0.054412841796875,
-0.0210723876953125,
-0.0023250579833984375,
0.0207061767578125,
0.0118408203125,
-0.016510009765625,
-0.018798828125,
0.0328369140625,
0.0186767578125,
-0.0187835693359375,
0.049102783203125,
-0.04229736328125,
-0.01340484619140625,
0.036346435546875,
-0.038299560546875,
0.00691986083984375,
-0.008636474609375,
0.00682830810546875,
0.038055419921875,
0.0009813308715820312,
-0.0185699462890625,
0.040191650390625,
-0.0301055908203125,
0.00615692138671875,
0.0318603515625,
0.022247314453125,
0.005977630615234375,
0.0286407470703125,
-0.0174560546875,
-0.007610321044921875,
-0.01324462890625,
-0.0010204315185546875,
-0.0027713775634765625,
0.0170135498046875,
-0.0391845703125,
-0.037200927734375,
-0.01216888427734375,
-0.010345458984375,
0.008636474609375,
0.0095367431640625,
-0.0220794677734375,
0.00926971435546875,
-0.0275421142578125,
0.0224456787109375,
-0.0032596588134765625,
-0.0057373046875,
0.027130126953125,
0.038116455078125,
0.0272369384765625,
0.035369873046875,
0.050140380859375,
0.002445220947265625,
-0.005184173583984375,
0.12396240234375,
-0.042877197265625,
-0.0194091796875,
-0.0221405029296875,
0.0174560546875,
0.03338623046875,
0.016021728515625,
0.03558349609375,
0.0012407302856445312,
-0.012969970703125,
-0.058502197265625,
0.0628662109375,
-0.037506103515625,
-0.03955078125,
0.039886474609375,
0.0203704833984375,
-0.007171630859375,
-0.023284912109375,
0.01538848876953125,
-0.0140380859375,
-0.0013751983642578125,
-0.036773681640625,
-0.06353759765625,
-0.01702880859375,
-0.02569580078125,
0.03173828125,
0.04779052734375,
-0.00919342041015625,
-0.037322998046875,
-0.042510986328125,
0.043914794921875,
-0.07012939453125,
-0.07769775390625,
-0.00475311279296875,
-0.050811767578125,
0.06610107421875,
-0.005146026611328125,
0.05194091796875,
-0.0188446044921875,
-0.051788330078125,
0.00479888916015625,
-0.038543701171875,
-0.007633209228515625,
0.01331329345703125,
-0.0208282470703125,
0.005748748779296875,
-0.0124359130859375,
0.00818634033203125,
0.01107025146484375,
0.0079498291015625,
-0.0227508544921875,
-0.03485107421875,
-0.04339599609375,
-0.011474609375,
-0.039947509765625,
-0.0628662109375,
0.00862884521484375,
0.06976318359375,
0.0570068359375,
0.019989013671875,
-0.00481414794921875,
-0.0335693359375,
0.058929443359375,
-0.032684326171875,
0.0207672119140625,
-0.048095703125,
0.0269927978515625,
0.00893402099609375,
-0.0232696533203125,
-0.01629638671875,
0.038482666015625,
-0.0125732421875,
0.01444244384765625,
0.048614501953125,
-0.046661376953125,
-0.03240966796875,
0.011688232421875,
-0.023406982421875,
0.0193939208984375,
-0.061920166015625,
-0.016357421875,
-0.01531219482421875,
-0.00005626678466796875,
0.0215606689453125,
0.01255035400390625,
0.02423095703125,
-0.03643798828125,
0.0193939208984375,
0.019073486328125,
-0.0024700164794921875,
0.0012731552124023438,
0.021484375,
0.01522064208984375,
0.010467529296875,
-0.04345703125,
0.0024547576904296875,
0.025390625,
0.00908660888671875,
-0.0304718017578125,
-0.02154541015625,
0.01227569580078125,
0.01064300537109375,
-0.00620269775390625,
-0.0596923828125,
0.050445556640625,
0.0390625,
-0.00928497314453125,
-0.0012903213500976562,
0.030029296875,
0.00855255126953125,
-0.04302978515625,
0.034454345703125,
-0.0301513671875,
-0.0174102783203125,
0.033111572265625,
-0.05059814453125,
0.03216552734375,
-0.027313232421875,
0.052093505859375,
0.0638427734375,
-0.01067352294921875,
0.0140533447265625,
0.008331298828125,
0.01204681396484375,
0.01447296142578125,
0.007587432861328125,
-0.00359344482421875,
-0.0134429931640625,
-0.021514892578125,
0.000850677490234375,
0.00128173828125,
-0.0015726089477539062,
-0.04150390625,
-0.0770263671875,
-0.040924072265625,
-0.01837158203125,
-0.1143798828125,
-0.06475830078125,
0.01824951171875,
-0.041046142578125,
0.048553466796875,
-0.0295257568359375,
-0.0202789306640625,
-0.032989501953125,
-0.003452301025390625,
0.00962066650390625,
-0.005359649658203125,
-0.0254974365234375,
-0.0345458984375,
-0.06085205078125,
-0.065185546875,
-0.02008056640625,
0.0056915283203125,
0.0038127899169921875,
0.00038504600524902344,
0.08154296875,
-0.0010805130004882812,
-0.06719970703125,
-0.0283050537109375,
0.01812744140625,
-0.02008056640625,
0.0094451904296875,
-0.0084228515625,
-0.005615234375,
0.0265350341796875,
-0.004131317138671875,
0.024261474609375,
0.0232391357421875,
-0.0179595947265625,
-0.024261474609375,
0.01007080078125,
-0.027557373046875,
0.00914764404296875,
0.01015472412109375,
-0.014923095703125,
-0.0251007080078125,
-0.0013341903686523438,
-0.0736083984375,
-0.0007715225219726562,
-0.00952911376953125,
-0.046539306640625,
0.024383544921875,
0.03448486328125,
-0.026519775390625,
-0.00921630859375,
-0.01277923583984375,
0.006744384765625,
-0.003582000732421875,
0.01329803466796875,
-0.01708984375,
0.003719329833984375,
-0.00435638427734375,
0.01190948486328125,
-0.018829345703125,
0.05792236328125,
0.005405426025390625,
0.01076507568359375,
0.02532958984375,
-0.0007162094116210938,
-0.024566650390625,
-0.005825042724609375,
-0.074951171875,
-0.09442138671875,
0.04473876953125,
-0.037445068359375,
0.004543304443359375,
-0.06402587890625,
-0.0232696533203125,
0.0007543563842773438,
0.11602783203125,
-0.00031757354736328125,
-0.025390625,
-0.0007152557373046875,
0.037353515625,
-0.022918701171875,
-0.03326416015625,
0.0010738372802734375,
-0.0144805908203125,
-0.014007568359375,
-0.0225677490234375,
-0.0181732177734375,
-0.02362060546875,
0.031890869140625,
-0.09918212890625,
-0.003673553466796875,
-0.04364013671875,
0.018524169921875,
-0.0294952392578125,
0.01904296875,
-0.03466796875,
0.0033721923828125,
-0.061187744140625,
-0.000007212162017822266,
-0.033966064453125,
-0.08477783203125,
-0.0272216796875,
0.002811431884765625,
0.052459716796875,
0.0011816024780273438,
-0.0132293701171875,
-0.02423095703125,
0.043914794921875,
-0.045379638671875,
0.027099609375,
-0.01491546630859375,
0.031005859375,
-0.0200653076171875,
0.0214080810546875,
-0.00255584716796875,
0.003017425537109375,
-0.0013875961303710938,
-0.0263214111328125,
-0.07427978515625,
-0.0216064453125,
-0.0081634521484375,
0.0251007080078125,
0.036865234375,
-0.03546142578125,
-0.00519561767578125,
-0.001422882080078125,
-0.011993408203125,
0.0067138671875,
-0.03460693359375,
0.016845703125,
-0.0022735595703125,
-0.006134033203125,
0.06915283203125,
-0.02032470703125,
0.004058837890625,
-0.0142669677734375,
0.11285400390625,
0.0074310302734375,
-0.0120697021484375,
-0.0119476318359375,
0.0158843994140625,
0.046173095703125,
0.006443023681640625,
0.0310211181640625,
0.0374755859375,
-0.0197906494140625,
0.035491943359375,
0.0311126708984375,
0.01148223876953125,
-0.00382232666015625,
0.0204925537109375,
0.0082550048828125,
-0.0184173583984375,
0.01557159423828125,
0.0211334228515625,
-0.0150909423828125,
-0.0252532958984375,
0.0186920166015625,
0.006130218505859375,
0.053497314453125,
-0.005802154541015625,
0.0167694091796875,
-0.041534423828125,
0.00499725341796875,
-0.07708740234375,
0.02801513671875,
-0.0712890625,
0.007808685302734375,
-0.0006961822509765625,
-0.001987457275390625,
0.0206451416015625,
-0.01541900634765625,
-0.035369873046875,
-0.0116119384765625,
-0.0190887451171875,
-0.006000518798828125,
-0.025054931640625,
0.0289154052734375,
-0.0350341796875,
-0.010345458984375,
-0.01108551025390625,
0.05853271484375,
-0.0137939453125,
-0.048309326171875,
-0.01117706298828125,
-0.01248931884765625,
0.02032470703125,
0.026153564453125,
-0.01580810546875,
-0.0012235641479492188,
-0.0262451171875,
-0.015655517578125,
-0.00603485107421875,
0.00044846534729003906,
-0.052276611328125,
-0.01947021484375,
-0.0240325927734375,
-0.0223236083984375,
-0.01406097412109375,
0.01421356201171875,
0.00670623779296875,
-0.0213165283203125,
0.0012960433959960938,
0.004848480224609375,
-0.01465606689453125,
0.003688812255859375,
-0.00643157958984375,
0.0180816650390625,
0.0172576904296875,
0.0084381103515625,
-0.03204345703125,
0.0513916015625,
-0.0236358642578125,
-0.007049560546875,
0.035400390625,
0.035736083984375,
-0.0146636962890625,
-0.0233306884765625,
0.005435943603515625,
-0.03521728515625,
-0.0030670166015625,
0.01180267333984375,
-0.015045166015625,
-0.0364990234375,
0.0017490386962890625,
0.01102447509765625,
0.01313018798828125,
-0.037139892578125,
-0.0081939697265625,
-0.0156402587890625,
-0.0135498046875,
0.00689697265625,
0.04718017578125,
-0.052398681640625,
0.005645751953125,
0.00563812255859375,
0.0272674560546875,
-0.014556884765625,
-0.022216796875,
-0.001979827880859375,
0.0268096923828125,
-0.0278167724609375,
-0.004322052001953125,
0.0193634033203125,
0.01154327392578125,
0.029296875,
-0.047393798828125,
-0.0220794677734375,
0.00420379638671875,
-0.00962066650390625,
0.051422119140625,
0.0124664306640625,
-0.063720703125,
0.000423431396484375,
-0.01157379150390625,
-0.0157318115234375,
0.03363037109375,
0.004520416259765625,
-0.054046630859375,
-0.022613525390625,
0.006511688232421875,
0.01273345947265625,
-0.048828125,
-0.046356201171875,
-0.03948974609375,
0.0300445556640625,
0.0364990234375,
0.03997802734375,
-0.0283355712890625,
0.01861572265625,
0.043487548828125,
-0.00536346435546875,
0.004100799560546875,
0.021820068359375,
0.0232391357421875,
-0.0248870849609375,
0.03973388671875,
-0.02276611328125,
-0.05755615234375,
-0.0263519287109375,
-0.035736083984375,
0.006076812744140625,
0.047698974609375,
-0.0216064453125,
-0.025421142578125,
-0.001605987548828125,
0.0169830322265625,
-0.001544952392578125,
0.054229736328125,
0.02435302734375,
-0.04559326171875,
0.0299530029296875,
-0.035308837890625,
0.032196044921875,
-0.00893402099609375,
-0.02215576171875,
0.03680419921875,
-0.03765869140625,
0.034149169921875,
0.053558349609375,
-0.006198883056640625,
0.0210723876953125,
0.1109619140625,
0.005832672119140625,
0.06878662109375,
0.060333251953125,
0.0121307373046875,
0.04229736328125,
-0.01081085205078125,
0.00922393798828125,
-0.00435638427734375,
0.029144287109375,
-0.00983428955078125,
-0.0105438232421875,
0.010711669921875,
-0.029296875,
0.02740478515625,
0.0137176513671875,
0.060089111328125,
-0.040313720703125,
0.0254058837890625,
0.01422119140625,
-0.019866943359375,
0.0213165283203125,
-0.0020351409912109375,
0.0020999908447265625,
-0.002410888671875,
-0.0030059814453125,
-0.002105712890625,
-0.0202484130859375,
0.0033817291259765625,
0.0128173828125,
-0.00899505615234375,
0.023406982421875,
0.039031982421875,
0.006023406982421875,
-0.0016078948974609375,
-0.0531005859375,
-0.00724029541015625,
-0.0238189697265625,
0.01611328125,
-0.0009560585021972656,
-0.0225067138671875,
-0.079345703125,
-0.0709228515625,
-0.0743408203125,
0.014923095703125,
-0.07275390625,
0.005706787109375,
0.0019741058349609375,
0.037261962890625,
0.03009033203125,
0.0121612548828125,
-0.01470947265625,
-0.0008330345153808594,
-0.003643035888671875,
-0.01509857177734375,
-0.0134735107421875,
-0.00379180908203125,
0.038421630859375,
-0.01678466796875,
0.0188446044921875,
-0.0029754638671875,
0.000850677490234375,
-0.0146636962890625,
0.00110626220703125,
0.052337646484375,
-0.0379638671875,
-0.00853729248046875,
0.033355712890625,
0.04217529296875,
-0.0031108856201171875,
-0.01045989990234375,
0.026702880859375,
-0.04901123046875,
-0.011016845703125,
0.0199432373046875,
0.0012083053588867188,
-0.021240234375,
0.005825042724609375,
-0.034149169921875,
0.0657958984375,
0.033355712890625,
-0.034637451171875,
-0.00403594970703125,
0.0545654296875,
-0.03662109375,
0.0230712890625,
-0.0165252685546875,
0.02764892578125,
0.0019130706787109375,
0.015106201171875,
-0.0158233642578125,
-0.002681732177734375,
0.00469207763671875,
0.0196533203125,
0.055755615234375,
0.0184783935546875,
-0.053466796875,
-0.04510498046875,
-0.0016641616821289062,
0.07183837890625,
0.00875091552734375,
0.0309906005859375,
0.01192474365234375,
0.01035308837890625,
0.022979736328125,
-0.00780487060546875,
0.049041748046875,
-0.055633544921875,
0.003887176513671875,
0.0219268798828125,
0.017791748046875,
-0.004184722900390625,
-0.0240936279296875,
-0.000762939453125,
-0.028045654296875,
-0.005767822265625,
0.006336212158203125,
0.0543212890625,
0.0084381103515625,
0.040435791015625,
0.03399658203125,
-0.01456451416015625,
-0.0279388427734375,
-0.0255279541015625,
0.0528564453125,
-0.0032958984375,
0.0026340484619140625,
-0.041839599609375,
0.01027679443359375,
-0.0171051025390625,
-0.01082611083984375,
-0.005237579345703125,
0.062042236328125,
-0.045013427734375,
0.0248870849609375,
0.00681304931640625,
0.004024505615234375,
-0.02655029296875,
0.028350830078125,
0.05560302734375,
0.037689208984375,
-0.04217529296875,
-0.0416259765625,
-0.008941650390625,
0.0026092529296875,
0.0109100341796875,
-0.0105743408203125,
0.01073455810546875,
0.00640869140625,
0.0340576171875,
-0.01508331298828125,
0.00493621826171875,
0.030609130859375,
-0.0139617919921875,
0.0064697265625,
0.025848388671875,
-0.0167388916015625,
0.019195556640625,
0.016021728515625,
-0.0035076141357421875,
-0.0201873779296875,
-0.021026611328125,
-0.00756072998046875,
-0.00794219970703125,
-0.0195159912109375,
0.027679443359375,
0.0296630859375,
0.0273895263671875,
-0.011199951171875,
-0.031219482421875,
-0.06329345703125,
-0.11767578125,
0.0438232421875,
0.054290771484375,
0.00634765625,
0.0072479248046875,
0.03515625,
0.061553955078125,
-0.00971221923828125,
-0.01251220703125,
0.0228118896484375,
-0.005672454833984375,
-0.037933349609375,
-0.0230712890625,
-0.0006046295166015625,
0.00965118408203125,
-0.0032958984375,
-0.0066375732421875,
0.04388427734375,
0.0042877197265625,
-0.0323486328125,
0.056488037109375,
-0.0198211669921875,
-0.01548004150390625,
0.0261077880859375,
-0.0266571044921875,
0.06878662109375,
0.0011911392211914062,
-0.051239013671875,
0.002689361572265625,
0.00196075439453125,
-0.044921875,
0.003376007080078125,
0.02862548828125,
-0.0003216266632080078,
-0.003093719482421875,
0.002201080322265625,
-0.044097900390625,
0.0261993408203125,
0.0127716064453125,
0.02679443359375,
0.006000518798828125,
-0.01349639892578125,
-0.0272979736328125,
-0.03411865234375,
-0.0213775634765625,
-0.051055908203125,
0.0665283203125,
0.01340484619140625,
0.12371826171875,
-0.053466796875,
0.033721923828125,
-0.0030994415283203125,
0.001750946044921875,
-0.01412200927734375,
-0.0068817138671875,
0.0100860595703125,
0.01000213623046875,
-0.007213592529296875,
-0.01305389404296875,
-0.0119171142578125,
0.024871826171875,
0.00415802001953125,
-0.004993438720703125,
-0.00144195556640625,
-0.04156494140625,
0.0245361328125,
0.018096923828125,
0.0682373046875,
-0.019195556640625,
-0.056243896484375,
-0.04779052734375,
0.02178955078125,
0.00823974609375,
0.02392578125,
-0.01296234130859375,
0.0229949951171875,
-0.019927978515625,
-0.018646240234375,
0.001766204833984375,
-0.0230712890625,
-0.01168060302734375,
0.0157470703125,
-0.0073699951171875,
-0.0533447265625,
0.0143280029296875,
-0.006351470947265625,
-0.0141143798828125,
0.007602691650390625,
0.06536865234375,
-0.01016998291015625,
-0.044769287109375,
-0.0225677490234375,
0.0269012451171875,
0.042205810546875,
0.022491455078125,
0.0188140869140625,
-0.003387451171875,
-0.0225372314453125,
-0.0161285400390625,
-0.0169219970703125,
-0.0283203125,
-0.03936767578125,
0.0069732666015625,
0.0238800048828125,
-0.0194854736328125,
-0.0278472900390625,
-0.0650634765625,
0.01436614990234375,
0.018096923828125,
-0.0079498291015625,
-0.0267486572265625,
-0.0174560546875,
-0.021942138671875,
0.090576171875,
-0.02679443359375,
-0.0031375885009765625,
-0.0145416259765625,
0.01010894775390625,
-0.025177001953125,
-0.01454925537109375,
-0.029083251953125,
0.0233612060546875,
0.0011768341064453125,
0.0194244384765625,
-0.0040130615234375,
-0.006687164306640625,
0.0252838134765625,
0.057647705078125,
0.020965576171875,
0.086669921875,
-0.00716400146484375,
-0.0419921875,
0.0151824951171875,
-0.041595458984375,
-0.0006046295166015625,
-0.0301971435546875,
0.01256561279296875,
-0.08782958984375,
-0.019439697265625,
-0.0243682861328125,
0.006381988525390625,
0.00418853759765625,
-0.053558349609375,
-0.047607421875,
0.04534912109375,
-0.0002396106719970703,
-0.024169921875,
-0.0177764892578125,
-0.02752685546875,
-0.0188751220703125,
0.0714111328125,
-0.00279998779296875,
0.0018529891967773438,
-0.032318115234375,
0.0352783203125,
0.0142364501953125,
-0.00428009033203125,
-0.01013946533203125,
0.041839599609375,
0.0083770751953125,
0.08038330078125,
0.068359375,
-0.056610107421875,
-0.0012922286987304688,
0.0086669921875,
0.0161895751953125,
0.05029296875,
-0.017242431640625,
0.01546478271484375,
-0.0017671585083007812,
-0.034576416015625,
-0.008758544921875,
-0.010467529296875,
-0.0193634033203125,
0.0036411285400390625,
0.06329345703125,
0.037322998046875,
0.0167694091796875,
-0.035003662109375,
-0.0343017578125,
-0.039581298828125,
-0.01032257080078125,
-0.005687713623046875,
0.0172271728515625,
-0.052886962890625,
0.0167083740234375,
0.00555419921875,
0.0028324127197265625,
0.0253753662109375,
0.00940704345703125,
0.00597381591796875,
-0.024322509765625,
0.01509857177734375,
-0.041778564453125,
0.00209808349609375,
-0.0035400390625,
0.08416748046875,
-0.04217529296875,
-0.00525665283203125,
0.033782958984375,
0.00885772705078125,
0.043853759765625,
0.0423583984375,
0.0156707763671875,
-0.00945281982421875,
-0.0208587646484375,
0.014556884765625,
0.01117706298828125,
0.02587890625,
-0.031524658203125,
-0.03350830078125,
0.002346038818359375,
0.0102081298828125,
-0.0006990432739257812,
0.02569580078125,
0.0218963623046875,
0.01335906982421875,
-0.0041046142578125,
0.022247314453125,
-0.0076904296875,
-0.06640625,
-0.031158447265625,
0.022491455078125,
-0.03863525390625,
0.00843048095703125,
-0.03515625,
-0.0008797645568847656,
0.01328277587890625,
-0.0007805824279785156,
-0.0153045654296875,
-0.0242767333984375,
0.00817108154296875,
0.0030117034912109375,
-0.020843505859375,
0.019622802734375
] |
20cce5fcf5c215266a6044d2d0c4f5a7243b5259
|
Wordpress Stackexchange
Q: Is it safe to use 'date_default_timezone_set' in plugin file? I am using a sitemaps plugin which in very complex ways sets the timezone of <lastmod> (i.e. last modified time) for posts to GMT.
Temporarily, until the plugin developer fixes it, I need to enforce a custom timezone on the plugin. The simple and straightforward way that I've found is to add something like date_default_timezone_set( 'America/New_York'); right after the first <?php in the file responsible for outputting the sitemaps.
It works, and it doesn't seem to affect timestamps displayed on the rest of the site. So, can I go with this? or is there a better solution?
A: Currently, the built-in function current_time() expects function date_default_timezone_set() is never used.
Inspecting the code of current_time() confirmed this, because that function formats the result using PHP built-in date() function (that is affected by timezone); in fact seems Wordpress always resets the timezone to UTC (an echo date_default_timezone_get() placed at top and at bottom of wp-config.php in a clean WordPress setup will prove this).
See https://core.trac.wordpress.org/ticket/38940
|
Q: Is it safe to use 'date_default_timezone_set' in plugin file? I am using a sitemaps plugin which in very complex ways sets the timezone of <lastmod> (i.e. last modified time) for posts to GMT.
Temporarily, until the plugin developer fixes it, I need to enforce a custom timezone on the plugin. The simple and straightforward way that I've found is to add something like date_default_timezone_set( 'America/New_York'); right after the first <?php in the file responsible for outputting the sitemaps.
It works, and it doesn't seem to affect timestamps displayed on the rest of the site. So, can I go with this? or is there a better solution?
A: Currently, the built-in function current_time() expects function date_default_timezone_set() is never used.
Inspecting the code of current_time() confirmed this, because that function formats the result using PHP built-in date() function (that is affected by timezone); in fact seems Wordpress always resets the timezone to UTC (an echo date_default_timezone_get() placed at top and at bottom of wp-config.php in a clean WordPress setup will prove this).
See https://core.trac.wordpress.org/ticket/38940
A: http://codex.wordpress.org/Function_Reference/get_gmt_from_date
Replace all instances of get_the_date or the_date with echo get_gmt_from_date(get_the_date('Y-m-d H:i:s')). That's not a quick fix, it's a way to fix your sitemaps.
EDIT:
WordPress SEO runs it's raw dates from MySQL through a WP function called mysql2date, which in turn calls date_i18n. date_i18n happens to have a handy filter which you can tie into to change the date:
<?php
add_filter('date_i18n', 'wpse57195_filter_date', 10, 4);
/**
* Changes the date on WordPress SEO's sitemaps
*
* @return string The Date
*/
function wpse57195_filter_date($date, $format, $timestamp, $gmt)
{
// if this isn't a sitemap page, bail
if(!get_query_var('sitemap'))
return $date;
// W3C Time format with -05:00 for central time
// NOTE: this doesn't account for daylight saving time
$f = 'Y-m-d\TH:i:s-05:00';
return $gmt ? gmdate($f, $timestamp) : date($f, $timestamp);
}
In the hooked function, you can check for the sitemap query variable and change the time as you need. To keep with the sitemap spec, you have to use the W3C date format which includes a +/- field for timezone. -05:00 is the number for central, daylight savings time. You can wrap the above up in a plugin and activate it until the sitemap can be fixed.
A: No. (well, you could immediately change it back after you're done, but that's error prone.)
Also, whatever you do don't override date_default_timezone_set() in your wp-config.php; wp-settings.php sets this to UTC and you mustn't change it.
Setting to Europe/London, for example (which is one hour ahead of GMT in summer), will make GMT one hour ahead of what it ought to be - you can verify via /wp-admin/options-general.php
Essentially, this means values of the system timezone /etc/timezone and PHP's date.timezone ini value are ignored by WordPress.
IMHO, there ought to be some sort of warning in WordPress core if it's set to a value other than UTC, but there isn't, so beware.
Related WPSE question - Related blog
|
wordpress
|
{
"language": "en",
"length": 487,
"provenance": "stackexchange_00019.jsonl.gz:421423",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57195"
}
|
[
0.06927490234375,
-0.01009368896484375,
0.038543701171875,
0.005390167236328125,
-0.0012674331665039062,
-0.0216522216796875,
0.055877685546875,
-0.042877197265625,
-0.0174407958984375,
0.009246826171875,
0.00849151611328125,
0.01220703125,
-0.04296875,
-0.030059814453125,
-0.00971221923828125,
-0.03155517578125,
0.053375244140625,
-0.048065185546875,
-0.01483154296875,
-0.0180511474609375,
-0.01470184326171875,
0.031829833984375,
0.00977325439453125,
0.07452392578125,
0.053619384765625,
-0.0023784637451171875,
0.0545654296875,
-0.03778076171875,
0.050384521484375,
0.016571044921875,
0.042724609375,
-0.04974365234375,
0.01369476318359375,
0.016845703125,
-0.01129913330078125,
-0.01247406005859375,
0.0268707275390625,
-0.005237579345703125,
-0.01535797119140625,
0.059600830078125,
0.044708251953125,
-0.029510498046875,
-0.0172882080078125,
0.042449951171875,
-0.0196990966796875,
-0.0545654296875,
0.046905517578125,
-0.0306549072265625,
-0.00380706787109375,
0.007572174072265625,
0.0285491943359375,
-0.0204315185546875,
0.045745849609375,
-0.01540374755859375,
-0.03070068359375,
-0.0187530517578125,
-0.017913818359375,
0.038726806640625,
0.0330810546875,
-0.0035190582275390625,
-0.027008056640625,
-0.003513336181640625,
0.012481689453125,
-0.0181427001953125,
0.01776123046875,
0.0028743743896484375,
0.01053619384765625,
0.03094482421875,
-0.04412841796875,
0.0328369140625,
0.033355712890625,
-0.04510498046875,
0.00955963134765625,
-0.0043487548828125,
-0.036590576171875,
-0.0194244384765625,
-0.0008797645568847656,
-0.0369873046875,
0.0158538818359375,
-0.0065155029296875,
0.025421142578125,
0.010650634765625,
-0.0210418701171875,
-0.045928955078125,
0.043182373046875,
-0.01180267333984375,
-0.00470733642578125,
-0.0169219970703125,
-0.057159423828125,
-0.0322265625,
-0.037872314453125,
0.0190277099609375,
-0.06463623046875,
-0.0306396484375,
-0.00623321533203125,
-0.0272216796875,
0.02581787109375,
0.08099365234375,
-0.0635986328125,
-0.0341796875,
-0.017974853515625,
0.000743865966796875,
-0.0670166015625,
-0.00821685791015625,
-0.0056915283203125,
0.031982421875,
0.00634002685546875,
-0.00811004638671875,
0.0173187255859375,
0.0295562744140625,
-0.0064849853515625,
0.006313323974609375,
-0.0148773193359375,
-0.06488037109375,
-0.0176849365234375,
0.032928466796875,
0.004283905029296875,
-0.00911712646484375,
0.031951904296875,
-0.0232696533203125,
0.005596160888671875,
0.0214691162109375,
-0.01558685302734375,
-0.01129150390625,
-0.0037860870361328125,
-0.0208740234375,
-0.03521728515625,
0.00675201416015625,
-0.050567626953125,
0.02142333984375,
-0.0220489501953125,
-0.002719879150390625,
0.053955078125,
0.039703369140625,
0.0099334716796875,
-0.016754150390625,
0.04547119140625,
-0.0184478759765625,
-0.01378631591796875,
0.014007568359375,
-0.04547119140625,
0.00635528564453125,
0.03802490234375,
-0.057342529296875,
0.007640838623046875,
0.0004367828369140625,
0.00958251953125,
0.039337158203125,
-0.0032520294189453125,
-0.060394287109375,
0.061248779296875,
-0.016693115234375,
0.0267486572265625,
-0.0145111083984375,
0.00914764404296875,
-0.050140380859375,
0.02801513671875,
-0.0399169921875,
-0.000553131103515625,
-0.03778076171875,
-0.026458740234375,
-0.0299835205078125,
-0.046661376953125,
-0.07452392578125,
-0.10150146484375,
0.031524658203125,
0.0289764404296875,
-0.0022296905517578125,
0.026611328125,
-0.0230255126953125,
0.016845703125,
-0.02899169921875,
-0.00555419921875,
0.02166748046875,
0.01467132568359375,
0.052764892578125,
0.00311279296875,
0.023223876953125,
0.00679779052734375,
0.035003662109375,
0.0191192626953125,
-0.04345703125,
0.025634765625,
0.01358795166015625,
-0.005626678466796875,
-0.040069580078125,
0.0154876708984375,
0.00923919677734375,
0.026824951171875,
0.02716064453125,
0.0038700103759765625,
-0.00518798828125,
-0.06182861328125,
0.03729248046875,
0.0027866363525390625,
0.006610870361328125,
-0.040069580078125,
0.01195526123046875,
-0.0157928466796875,
-0.03350830078125,
-0.025238037109375,
-0.0014324188232421875,
-0.000507354736328125,
-0.00435638427734375,
-0.054931640625,
0.00444793701171875,
-0.0308380126953125,
0.048614501953125,
0.00113677978515625,
-0.00997161865234375,
-0.0139007568359375,
-0.0440673828125,
0.028350830078125,
-0.0704345703125,
-0.034820556640625,
0.0194244384765625,
-0.0248565673828125,
0.047637939453125,
-0.00018024444580078125,
0.05499267578125,
-0.006580352783203125,
-0.0246429443359375,
0.018402099609375,
-0.0003104209899902344,
0.00612640380859375,
-0.01323699951171875,
-0.0152130126953125,
-0.0147247314453125,
0.0020771026611328125,
0.0139312744140625,
-0.00975799560546875,
0.0006356239318847656,
-0.026336669921875,
-0.03118896484375,
-0.048583984375,
-0.0150146484375,
-0.002201080322265625,
-0.0226593017578125,
0.01519775390625,
0.046722412109375,
0.0328369140625,
-0.000431060791015625,
-0.012481689453125,
0.0040740966796875,
0.009490966796875,
-0.0291290283203125,
0.0218963623046875,
-0.01617431640625,
0.0246429443359375,
0.018585205078125,
-0.06768798828125,
-0.03887939453125,
0.035308837890625,
-0.052093505859375,
0.0025043487548828125,
0.0289154052734375,
-0.04833984375,
-0.06683349609375,
0.00670623779296875,
0.005443572998046875,
0.007114410400390625,
-0.05194091796875,
-0.0108642578125,
-0.01384735107421875,
0.06341552734375,
-0.00628662109375,
0.0233917236328125,
0.018310546875,
-0.00926971435546875,
-0.0004363059997558594,
0.0092926025390625,
-0.06927490234375,
-0.001956939697265625,
0.005161285400390625,
0.0215911865234375,
0.004543304443359375,
-0.03289794921875,
0.0035228729248046875,
0.0106048583984375,
0.0125885009765625,
-0.040252685546875,
-0.0152740478515625,
-0.03253173828125,
-0.0023365020751953125,
-0.00716400146484375,
-0.0262603759765625,
0.0213165283203125,
0.00623321533203125,
0.04779052734375,
-0.016998291015625,
0.031280517578125,
-0.0182037353515625,
-0.044952392578125,
0.081787109375,
-0.01335906982421875,
-0.060943603515625,
0.002460479736328125,
-0.01140594482421875,
0.0119781494140625,
-0.029449462890625,
0.0010156631469726562,
0.0396728515625,
0.006076812744140625,
-0.0067138671875,
0.004947662353515625,
0.00432586669921875,
0.023162841796875,
0.0092315673828125,
-0.01387786865234375,
0.0093841552734375,
-0.0689697265625,
-0.0188140869140625,
-0.0050811767578125,
0.00846099853515625,
-0.0517578125,
-0.04815673828125,
-0.053863525390625,
-0.02532958984375,
-0.07489013671875,
0.003116607666015625,
0.0286407470703125,
-0.03228759765625,
-0.00012540817260742188,
0.01263427734375,
-0.0015468597412109375,
-0.0220947265625,
0.022064208984375,
-0.0081329345703125,
0.032623291015625,
-0.005008697509765625,
-0.023284912109375,
-0.027191162109375,
-0.06292724609375,
-0.03558349609375,
0.0105438232421875,
0.00615692138671875,
-0.0202178955078125,
0.07183837890625,
0.0005426406860351562,
-0.068359375,
-0.068359375,
-0.0184783935546875,
-0.01070404052734375,
-0.01959228515625,
-0.03125,
-0.01702880859375,
0.012603759765625,
-0.014129638671875,
0.03662109375,
0.0272064208984375,
-0.01392364501953125,
-0.0031070709228515625,
0.0198211669921875,
0.005290985107421875,
0.013275146484375,
0.00946044921875,
-0.031402587890625,
0.0170745849609375,
0.010650634765625,
-0.034912109375,
-0.0004546642303466797,
-0.007762908935546875,
-0.03509521484375,
0.0201568603515625,
0.0092926025390625,
-0.006275177001953125,
-0.0119171142578125,
0.009857177734375,
0.018646240234375,
-0.0009012222290039062,
0.066162109375,
0.003376007080078125,
-0.00769805908203125,
-0.0195770263671875,
-0.02276611328125,
-0.06524658203125,
0.0272216796875,
-0.0301513671875,
-0.0228118896484375,
-0.0146636962890625,
-0.01242828369140625,
-0.01214599609375,
-0.033477783203125,
-0.053924560546875,
-0.0726318359375,
0.047119140625,
-0.0230560302734375,
-0.00591278076171875,
-0.02130126953125,
-0.01461029052734375,
0.0067596435546875,
0.08831787109375,
-0.03533935546875,
-0.02899169921875,
0.0252532958984375,
0.034759521484375,
-0.0275421142578125,
0.0010576248168945312,
-0.0211181640625,
-0.039764404296875,
-0.0694580078125,
0.0145721435546875,
-0.007904052734375,
-0.0157928466796875,
-0.0217437744140625,
-0.01222991943359375,
-0.048583984375,
-0.04840087890625,
0.0059814453125,
-0.00067138671875,
0.003376007080078125,
0.0237579345703125,
-0.007167816162109375,
0.004467010498046875,
0.019439697265625,
-0.036407470703125,
-0.043914794921875,
-0.0244598388671875,
-0.030670166015625,
0.0689697265625,
0.05419921875,
-0.067138671875,
0.0015888214111328125,
0.040496826171875,
0.037567138671875,
0.0099029541015625,
0.0116729736328125,
-0.04693603515625,
0.03643798828125,
0.044921875,
0.03765869140625,
0.009796142578125,
0.0182342529296875,
0.038726806640625,
-0.061798095703125,
-0.0038814544677734375,
-0.00304412841796875,
-0.01500701904296875,
0.05401611328125,
-0.07891845703125,
-0.004779815673828125,
-0.03265380859375,
-0.034088134765625,
0.0021724700927734375,
-0.041839599609375,
0.018768310546875,
-0.0236053466796875,
-0.01428985595703125,
0.0716552734375,
-0.01448822021484375,
0.00959014892578125,
0.0028820037841796875,
0.0672607421875,
-0.01108551025390625,
-0.031494140625,
-0.059539794921875,
0.01220703125,
0.022308349609375,
0.0169219970703125,
0.0157470703125,
-0.03179931640625,
-0.01424407958984375,
0.0670166015625,
-0.00998687744140625,
-0.0029010772705078125,
-0.025726318359375,
0.049774169921875,
-0.0080413818359375,
-0.018585205078125,
0.0037841796875,
-0.035736083984375,
0.0302581787109375,
0.050750732421875,
0.007793426513671875,
-0.0232086181640625,
-0.01361846923828125,
0.033721923828125,
0.010955810546875,
-0.0111846923828125,
-0.0357666015625,
-0.024017333984375,
0.0291595458984375,
-0.0164031982421875,
0.010894775390625,
-0.006816864013671875,
-0.0036468505859375,
-0.00786590576171875,
-0.0026798248291015625,
0.0079193115234375,
-0.0032405853271484375,
0.0307769775390625,
0.004238128662109375,
0.025909423828125,
0.04608154296875,
0.00946807861328125,
-0.037445068359375,
-0.032806396484375,
0.1231689453125,
0.0194091796875,
-0.0236663818359375,
0.0270843505859375,
-0.03228759765625,
-0.00659942626953125,
-0.00472259521484375,
0.0027446746826171875,
0.0596923828125,
0.045440673828125,
-0.003879547119140625,
-0.0173492431640625,
-0.0272369384765625,
0.0287017822265625,
-0.063720703125,
0.03460693359375,
0.017852783203125,
-0.0029125213623046875,
0.00518798828125,
0.0595703125,
0.034881591796875,
0.0198211669921875,
-0.023529052734375,
0.03448486328125,
-0.006622314453125,
0.0677490234375,
0.00988006591796875,
-0.0280914306640625,
-0.0136260986328125,
0.052581787109375,
-0.03436279296875,
-0.020721435546875,
-0.035858154296875,
-0.04339599609375,
-0.00360870361328125,
-0.04254150390625,
-0.0004508495330810547,
0.06817626953125,
0.034912109375,
0.0069122314453125,
0.0093231201171875,
-0.002376556396484375,
-0.01457977294921875,
-0.0107421875,
-0.01247406005859375,
0.0249481201171875,
-0.0008358955383300781,
0.0027942657470703125,
0.019012451171875,
0.002811431884765625,
0.0194244384765625,
-0.02862548828125,
0.0083770751953125,
-0.0281982421875,
-0.0191192626953125,
-0.0089874267578125,
-0.03057861328125,
-0.021636962890625,
-0.0361328125,
0.0258941650390625,
-0.02618408203125,
-0.01171875,
0.0233917236328125,
-0.011322021484375,
0.03424072265625,
-0.017425537109375,
-0.0157012939453125,
-0.028594970703125,
0.0282135009765625,
-0.00678253173828125,
-0.007541656494140625,
-0.037017822265625,
-0.007656097412109375,
-0.06634521484375,
-0.022247314453125,
-0.050140380859375,
-0.023956298828125,
-0.03472900390625,
0.0229644775390625,
0.052337646484375,
0.052001953125,
-0.025421142578125,
-0.0782470703125,
0.00411224365234375,
-0.00757598876953125,
0.03424072265625,
0.0738525390625,
-0.0401611328125,
0.0576171875,
0.060638427734375,
0.03668212890625,
0.00786590576171875,
-0.001438140869140625,
-0.034088134765625,
-0.0059051513671875,
0.0174713134765625,
-0.01363372802734375,
-0.03521728515625,
-0.00524139404296875,
-0.0302886962890625,
-0.005931854248046875,
0.044647216796875,
-0.0019683837890625,
0.025146484375,
-0.0091094970703125,
0.0118255615234375,
-0.0163116455078125,
-0.005222320556640625,
-0.0248260498046875,
0.0150604248046875,
0.01401519775390625,
-0.00384521484375,
0.033538818359375,
-0.0230865478515625,
0.0075836181640625,
0.0045318603515625,
-0.03778076171875,
0.0211944580078125,
0.005168914794921875,
0.0147247314453125,
0.002170562744140625,
0.05731201171875,
-0.0117645263671875,
0.056610107421875,
0.060882568359375,
0.0311737060546875,
0.0499267578125,
-0.0036907196044921875,
-0.055511474609375,
-0.0343017578125,
0.0321044921875,
0.01378631591796875,
-0.006137847900390625,
0.0457763671875,
-0.006561279296875,
0.03021240234375,
0.04486083984375,
0.035064697265625,
-0.09979248046875,
0.0296783447265625,
0.002773284912109375,
0.0151824951171875,
0.0706787109375,
-0.0025768280029296875,
-0.0129852294921875,
0.031524658203125,
0.015777587890625,
-0.07110595703125,
-0.05279541015625,
0.01268768310546875,
0.028472900390625,
-0.0113372802734375,
0.003246307373046875,
0.018096923828125,
0.015167236328125,
-0.0185089111328125,
0.0229339599609375,
-0.004024505615234375,
0.0285186767578125,
-0.006305694580078125,
-0.01319122314453125,
0.0068511962890625,
-0.03839111328125,
-0.045013427734375,
0.016204833984375,
-0.0297393798828125,
-0.012786865234375,
0.0196380615234375,
-0.01377105712890625,
0.061676025390625,
0.031707763671875,
-0.0004787445068359375,
0.0064544677734375,
-0.00536346435546875,
0.025238037109375,
-0.01226806640625,
-0.033935546875,
0.026885986328125,
0.0105438232421875,
-0.03729248046875,
0.024322509765625,
-0.01058197021484375,
-0.034332275390625,
0.00213623046875,
0.02630615234375,
0.0394287109375,
-0.016265869140625,
-0.02069091796875,
0.0300750732421875,
-0.0036220550537109375,
0.001861572265625,
-0.03076171875,
0.027099609375,
-0.05316162109375,
0.00225830078125,
-0.007266998291015625,
0.0183563232421875,
0.008148193359375,
0.004367828369140625,
-0.0301666259765625,
0.058502197265625,
-0.048065185546875,
-0.00028967857360839844,
0.015869140625,
0.0243988037109375,
0.007541656494140625,
0.017303466796875,
0.00283050537109375,
0.03179931640625,
-0.02496337890625,
0.029052734375,
-0.050933837890625,
-0.01320648193359375,
-0.0035495758056640625,
0.03448486328125,
0.0189208984375,
0.01445770263671875,
-0.023406982421875,
-0.002483367919921875,
0.01506805419921875,
0.03271484375,
0.0106201171875,
0.0247650146484375,
-0.017578125,
0.00872802734375,
0.0201568603515625,
-0.0112457275390625,
0.025360107421875,
-0.0190277099609375,
-0.019866943359375,
0.000946044921875,
0.0031490325927734375,
-0.0016412734985351562,
-0.0013856887817382812,
0.0034942626953125,
-0.0272979736328125,
-0.0034847259521484375,
0.008697509765625,
-0.002124786376953125,
0.013702392578125,
0.0222930908203125,
0.050323486328125,
-0.0638427734375,
-0.02264404296875,
-0.0189361572265625,
0.053009033203125,
-0.0026988983154296875,
-0.041595458984375,
0.0197601318359375,
0.002716064453125,
-0.046051025390625,
-0.01177978515625,
-0.0184326171875,
0.00511932373046875,
0.0099945068359375,
0.016815185546875,
0.023529052734375,
0.011505126953125,
-0.01019287109375,
0.019989013671875,
0.046112060546875,
0.022064208984375,
-0.03350830078125,
-0.00855255126953125,
0.016082763671875,
-0.022125244140625,
0.0001895427703857422,
-0.029876708984375,
-0.0042572021484375,
-0.0297088623046875,
-0.035369873046875,
0.004913330078125,
-0.0015888214111328125,
0.0187530517578125,
0.023681640625,
0.0223846435546875,
0.036407470703125,
-0.06878662109375,
-0.003932952880859375,
-0.033111572265625,
0.021240234375,
-0.0005497932434082031,
0.033538818359375,
0.01192474365234375,
0.04473876953125,
-0.0016145706176757812,
-0.0156097412109375,
0.040863037109375,
-0.00925445556640625,
0.0245513916015625,
-0.06976318359375,
0.0654296875,
-0.00457000732421875,
0.00348663330078125,
-0.0043792724609375,
0.003971099853515625,
0.0025348663330078125,
0.07647705078125,
0.041107177734375,
-0.048309326171875,
-0.0220947265625,
0.020904541015625,
-0.0300140380859375,
-0.07562255859375,
-0.035369873046875,
0.00563812255859375,
0.035858154296875,
0.016754150390625,
0.04290771484375,
0.0214385986328125,
0.020416259765625,
-0.032684326171875,
0.0215911865234375,
-0.005950927734375,
-0.0281829833984375,
0.0504150390625,
-0.03466796875,
0.0372314453125,
-0.0257110595703125,
0.0241241455078125,
0.018646240234375,
0.00196075439453125,
-0.0084991455078125,
-0.0161590576171875,
0.0170135498046875,
0.0270538330078125,
0.006832122802734375,
0.0181884765625,
-0.0107879638671875,
0.00972747802734375,
-0.0231475830078125,
0.0155792236328125,
-0.053314208984375,
0.0005464553833007812,
-0.017608642578125,
-0.01617431640625,
-0.03228759765625,
-0.01349639892578125,
0.0653076171875,
0.018646240234375,
0.03570556640625,
-0.0209503173828125,
0.026702880859375,
-0.01503753662109375,
-0.00830078125,
0.007293701171875,
-0.0259857177734375,
0.03863525390625,
0.022979736328125,
-0.0138702392578125,
-0.0187530517578125,
-0.01739501953125,
0.004878997802734375,
0.04364013671875,
-0.03851318359375,
0.005443572998046875,
-0.0137481689453125,
0.017242431640625,
-0.02838134765625,
-0.01175689697265625,
-0.017486572265625,
-0.03155517578125,
0.0205535888671875,
0.0305938720703125,
0.006443023681640625,
0.0287933349609375,
-0.022552490234375,
0.04559326171875,
-0.0167388916015625,
-0.005237579345703125,
-0.00189208984375,
-0.03936767578125,
0.0122528076171875,
0.042999267578125,
-0.0771484375,
-0.01514434814453125,
-0.041290283203125,
-0.0265045166015625,
-0.01183319091796875,
0.0005440711975097656,
0.0009765625,
-0.0272216796875,
0.0031280517578125,
0.017120361328125,
-0.0020656585693359375,
0.0012254714965820312,
-0.0361328125,
-0.01788330078125,
0.0267333984375,
0.0005731582641601562,
-0.02508544921875,
-0.052947998046875,
-0.029937744140625,
-0.0460205078125,
0.007472991943359375,
0.034515380859375,
-0.033111572265625,
-0.03216552734375,
-0.06768798828125,
0.0091705322265625,
0.00787353515625,
-0.026947021484375,
0.00658416748046875,
0.01561737060546875,
-0.047821044921875,
0.0168914794921875,
-0.031768798828125,
-0.031646728515625,
-0.031890869140625,
-0.01702880859375,
-0.004039764404296875,
-0.04248046875,
-0.0804443359375,
0.032470703125,
-0.0693359375,
-0.011505126953125,
0.027252197265625,
0.003124237060546875,
-0.04461669921875,
-0.029327392578125,
-0.025848388671875,
0.01708984375,
-0.045318603515625,
-0.028594970703125,
0.0142364501953125,
-0.0284881591796875,
-0.0261077880859375,
-0.0304107666015625,
0.035736083984375,
-0.07928466796875,
-0.039306640625,
-0.0113677978515625,
-0.0269622802734375,
-0.02020263671875,
-0.039764404296875,
-0.038177490234375,
0.04644775390625,
0.0008873939514160156,
-0.02349853515625,
-0.019622802734375,
0.0019092559814453125,
-0.01270294189453125,
0.030914306640625,
0.006317138671875,
-0.0279693603515625,
-0.0100555419921875,
0.019866943359375,
0.00943756103515625,
0.01117706298828125,
0.0187835693359375,
-0.011871337890625,
-0.03411865234375,
0.0048828125,
0.00972747802734375,
0.01097869873046875,
0.021087646484375,
0.009063720703125,
0.0231170654296875,
0.04791259765625,
-0.0083770751953125,
0.0279541015625,
-0.012359619140625,
-0.03179931640625,
-0.045257568359375,
-0.00768280029296875,
-0.033050537109375,
0.02606201171875,
0.1048583984375,
0.0992431640625,
0.020477294921875,
-0.07086181640625,
-0.05389404296875,
-0.047943115234375,
-0.00634002685546875,
-0.02178955078125,
0.0241851806640625,
-0.08856201171875,
0.01358795166015625,
0.02618408203125,
-0.013214111328125,
-0.003963470458984375,
0.011688232421875,
-0.02020263671875,
-0.00896453857421875,
0.0131072998046875,
-0.031463623046875,
-0.011322021484375,
0.046966552734375,
0.004314422607421875,
-0.0093841552734375,
0.011383056640625,
-0.013336181640625,
-0.01213836669921875,
-0.0022487640380859375,
-0.0020999908447265625,
0.034759521484375,
0.054931640625,
-0.04949951171875,
-0.02972412109375,
0.038238525390625,
0.014984130859375,
-0.00024890899658203125,
-0.0308837890625,
-0.01200103759765625,
-0.02435302734375,
-0.00946807861328125,
-0.028594970703125,
0.028961181640625,
-0.044830322265625,
-0.0025482177734375,
-0.00390625,
0.0190277099609375,
0.004795074462890625,
-0.01055145263671875,
0.03436279296875,
-0.0256805419921875,
-0.0174102783203125,
-0.0119476318359375,
-0.022552490234375,
0.0079498291015625,
0.0180206298828125,
0.03607177734375,
-0.01348876953125,
0.01509857177734375,
-0.11004638671875,
0.006195068359375,
-0.004207611083984375
] |
3fb5d758dd8741107f860f7f9b8fe203c7070877
|
Wordpress Stackexchange
Q: How does printf( __( ) ); work? Today I work through a theme to get a better understanding of WordPress and templating.
I discovered this:
<?php
printf(
__('Designed by %s', 'Anyword'),
'<a href="http://www.example.com">Blub</a>'
);
?>
I know it shows "Designed by Blub" (Where Blub is linked)
But what does the __() mean or why is there a string insert? What for is the Anyword?
Can someone exactly explain this line for me?
A: It's used for translate text.
The second argument is a kind of namespace (called domain here) to retrieve the translation (for example from a dedicated file or something else).
So Anyword here, should be the guy behind the template, or the company or what ever that can be a domain/namespace.
edit:
The doc from wordpress give more explanation on how to internationalizing a plugin:
Add this to the Plugin code to make sure the language file(s) are loaded:
load_plugin_textdomain('your-unique-name', false, basename( dirname( __FILE__ ) ) . '/languages' );
To fetch a string simply use __('String name','your-unique-name'); to return the translation or _e('String name','your-unique-name'); to echo the translation. Translations will then go into your plugin's /languages folder.
For your plugin/theme, the your-unique-name seems to be Anyword.
|
Q: How does printf( __( ) ); work? Today I work through a theme to get a better understanding of WordPress and templating.
I discovered this:
<?php
printf(
__('Designed by %s', 'Anyword'),
'<a href="http://www.example.com">Blub</a>'
);
?>
I know it shows "Designed by Blub" (Where Blub is linked)
But what does the __() mean or why is there a string insert? What for is the Anyword?
Can someone exactly explain this line for me?
A: It's used for translate text.
The second argument is a kind of namespace (called domain here) to retrieve the translation (for example from a dedicated file or something else).
So Anyword here, should be the guy behind the template, or the company or what ever that can be a domain/namespace.
edit:
The doc from wordpress give more explanation on how to internationalizing a plugin:
Add this to the Plugin code to make sure the language file(s) are loaded:
load_plugin_textdomain('your-unique-name', false, basename( dirname( __FILE__ ) ) . '/languages' );
To fetch a string simply use __('String name','your-unique-name'); to return the translation or _e('String name','your-unique-name'); to echo the translation. Translations will then go into your plugin's /languages folder.
For your plugin/theme, the your-unique-name seems to be Anyword.
|
wordpress
|
{
"language": "en",
"length": 199,
"provenance": "stackexchange_00019.jsonl.gz:421425",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57197"
}
|
[
0.00039577484130859375,
-0.023712158203125,
-0.0010280609130859375,
-0.01477813720703125,
-0.026763916015625,
0.004547119140625,
0.0084228515625,
0.0087738037109375,
-0.00750732421875,
0.05572509765625,
0.004070281982421875,
0.0298614501953125,
0.007770538330078125,
-0.024688720703125,
-0.0152587890625,
0.00390625,
0.021575927734375,
-0.002109527587890625,
0.00911712646484375,
-0.0023193359375,
-0.01145172119140625,
0.01512908935546875,
0.0055999755859375,
-0.01552581787109375,
0.025482177734375,
-0.05487060546875,
0.10650634765625,
-0.03411865234375,
0.0159759521484375,
-0.032257080078125,
0.0215301513671875,
-0.005290985107421875,
0.014923095703125,
0.024810791015625,
-0.00007921457290649414,
-0.026580810546875,
0.0308990478515625,
-0.008636474609375,
0.0140380859375,
0.0115814208984375,
0.040313720703125,
-0.0165863037109375,
-0.037689208984375,
0.0445556640625,
-0.0333251953125,
-0.041595458984375,
0.03350830078125,
-0.0195159912109375,
0.006683349609375,
0.039337158203125,
0.018707275390625,
-0.035888671875,
0.0167694091796875,
0.057464599609375,
-0.018646240234375,
-0.0195159912109375,
-0.03253173828125,
0.037078857421875,
0.0087432861328125,
0.052978515625,
-0.01345062255859375,
-0.002532958984375,
0.0092315673828125,
-0.0509033203125,
-0.033203125,
0.0162506103515625,
-0.010589599609375,
-0.00577545166015625,
-0.00446319580078125,
-0.02655029296875,
0.0088958740234375,
-0.0121917724609375,
0.0308990478515625,
-0.037567138671875,
-0.00685882568359375,
0.00566864013671875,
-0.0308837890625,
-0.03900146484375,
0.04229736328125,
-0.0518798828125,
0.0308380126953125,
-0.01503753662109375,
-0.0270233154296875,
0.014068603515625,
-0.0133056640625,
0.00733184814453125,
-0.00229644775390625,
-0.028045654296875,
-0.047332763671875,
-0.040008544921875,
-0.0399169921875,
0.01038360595703125,
-0.03802490234375,
-0.02386474609375,
-0.0265045166015625,
-0.00989532470703125,
-0.000885009765625,
0.0474853515625,
-0.032440185546875,
0.022857666015625,
-0.0127716064453125,
-0.0196075439453125,
0.041900634765625,
-0.051849365234375,
-0.0114288330078125,
0.029815673828125,
0.0192718505859375,
0.006374359130859375,
0.01508331298828125,
0.0060882568359375,
-0.01110076904296875,
0.01346588134765625,
-0.038848876953125,
-0.035675048828125,
0.025543212890625,
0.0390625,
-0.045257568359375,
0.03375244140625,
0.01444244384765625,
0.034515380859375,
-0.00893402099609375,
0.004222869873046875,
0.0177001953125,
-0.00762939453125,
0.00067901611328125,
-0.0171966552734375,
-0.0033054351806640625,
-0.0244140625,
0.04144287109375,
-0.0011262893676757812,
-0.01142120361328125,
0.0240020751953125,
0.012298583984375,
-0.0084686279296875,
-0.015838623046875,
0.0004203319549560547,
-0.0186004638671875,
0.011871337890625,
-0.0041961669921875,
0.005283355712890625,
-0.005512237548828125,
-0.01161956787109375,
0.03204345703125,
-0.01104736328125,
-0.0521240234375,
-0.0211181640625,
-0.0035305023193359375,
0.03656005859375,
0.00433349609375,
-0.015045166015625,
-0.0136260986328125,
-0.0260162353515625,
0.0308685302734375,
-0.00890350341796875,
-0.005756378173828125,
-0.020751953125,
0.007251739501953125,
-0.026397705078125,
-0.00152587890625,
-0.01959228515625,
0.01311492919921875,
-0.0150604248046875,
-0.0194244384765625,
0.0115203857421875,
-0.035614013671875,
0.0118560791015625,
0.01555633544921875,
-0.004474639892578125,
0.020751953125,
0.00492095947265625,
-0.030517578125,
0.0139923095703125,
0.0204010009765625,
0.0061798095703125,
-0.0028362274169921875,
0.029296875,
-0.062744140625,
0.03631591796875,
0.02239990234375,
-0.025177001953125,
0.00927734375,
-0.03155517578125,
0.040069580078125,
0.0213165283203125,
-0.052001953125,
0.0079193115234375,
0.00823211669921875,
0.052703857421875,
0.035064697265625,
0.013763427734375,
0.0367431640625,
-0.00036406517028808594,
-0.044036865234375,
0.035919189453125,
-0.034027099609375,
0.00746917724609375,
-0.00438690185546875,
0.046630859375,
-0.033050537109375,
-0.02459716796875,
0.03167724609375,
-0.043548583984375,
0.06475830078125,
-0.027618408203125,
-0.0531005859375,
0.0220489501953125,
-0.03741455078125,
0.040008544921875,
0.03521728515625,
0.0096435546875,
0.0007991790771484375,
-0.00664520263671875,
-0.03466796875,
0.002838134765625,
-0.07037353515625,
-0.0174407958984375,
-0.014678955078125,
0.01261138916015625,
0.00032901763916015625,
0.0046234130859375,
0.01287078857421875,
-0.0118255615234375,
-0.007904052734375,
0.00626373291015625,
-0.0033473968505859375,
-0.016387939453125,
-0.0155792236328125,
-0.00555419921875,
0.00403594970703125,
-0.00525665283203125,
0.039093017578125,
0.0380859375,
-0.0288543701171875,
0.04034423828125,
-0.013519287109375,
-0.01364898681640625,
-0.04168701171875,
-0.037811279296875,
0.0259246826171875,
0.032073974609375,
0.041656494140625,
0.0308990478515625,
0.0125732421875,
-0.011383056640625,
0.0294189453125,
-0.0248260498046875,
0.026824951171875,
-0.038543701171875,
0.03521728515625,
0.0736083984375,
-0.0271148681640625,
-0.015655517578125,
0.00659942626953125,
-0.06085205078125,
-0.032318115234375,
0.061279296875,
-0.031890869140625,
-0.0555419921875,
-0.002246856689453125,
0.0252838134765625,
-0.004791259765625,
0.01190185546875,
0.031036376953125,
0.003032684326171875,
-0.0092010498046875,
0.01351165771484375,
-0.011444091796875,
-0.004138946533203125,
-0.051361083984375,
0.027862548828125,
0.0308074951171875,
0.012725830078125,
-0.0041656494140625,
0.00882720947265625,
-0.00926971435546875,
-0.047515869140625,
0.0010786056518554688,
0.0166473388671875,
-0.037506103515625,
-0.035614013671875,
-0.002117156982421875,
0.08984375,
-0.00675201416015625,
-0.02655029296875,
-0.0260162353515625,
-0.033782958984375,
-0.0307159423828125,
-0.0477294921875,
0.0033130645751953125,
0.0169219970703125,
0.024444580078125,
0.051666259765625,
-0.0110626220703125,
0.06787109375,
-0.061798095703125,
0.01064300537109375,
0.021514892578125,
-0.046295166015625,
0.0175933837890625,
-0.0238800048828125,
0.01739501953125,
0.040985107421875,
0.0306549072265625,
-0.038238525390625,
-0.00832366943359375,
-0.03802490234375,
-0.0246124267578125,
-0.00809478759765625,
-0.047576904296875,
-0.040435791015625,
-0.05023193359375,
0.00400543212890625,
-0.002349853515625,
0.019073486328125,
-0.0269775390625,
-0.06854248046875,
-0.03485107421875,
-0.005191802978515625,
-0.1397705078125,
-0.0963134765625,
0.0036163330078125,
-0.029296875,
0.0104217529296875,
0.024871826171875,
-0.01446533203125,
-0.02752685546875,
0.027099609375,
-0.00316619873046875,
0.042205810546875,
-0.0322265625,
-0.0303192138671875,
-0.0294036865234375,
-0.05023193359375,
-0.0267333984375,
0.00701141357421875,
-0.00611114501953125,
0.010498046875,
-0.01751708984375,
0.0252838134765625,
0.02691650390625,
0.058563232421875,
0.09124755859375,
-0.0149383544921875,
-0.0197601318359375,
0.0036182403564453125,
-0.0258026123046875,
0.021270751953125,
-0.01194000244140625,
0.00347900390625,
0.021697998046875,
-0.003719329833984375,
0.0021686553955078125,
0.033966064453125,
0.00185394287109375,
0.02606201171875,
-0.0330810546875,
-0.0289306640625,
0.00872039794921875,
-0.00289154052734375,
-0.043487548828125,
-0.0357666015625,
-0.0159759521484375,
-0.03155517578125,
0.06951904296875,
0.003948211669921875,
-0.00780487060546875,
0.010467529296875,
0.049560546875,
-0.00909423828125,
-0.0083465576171875,
0.034454345703125,
-0.040191650390625,
0.00759124755859375,
-0.01448822021484375,
-0.0047149658203125,
-0.015960693359375,
0.059814453125,
0.01232147216796875,
-0.0313720703125,
0.0167083740234375,
0.03460693359375,
0.036956787109375,
-0.040130615234375,
-0.0174560546875,
-0.0160675048828125,
0.0300750732421875,
-0.0212860107421875,
0.0162506103515625,
0.010894775390625,
-0.01226043701171875,
0.01239013671875,
0.045257568359375,
-0.0027332305908203125,
0.0016765594482421875,
-0.0008983612060546875,
-0.0102386474609375,
-0.015472412109375,
-0.007732391357421875,
-0.05548095703125,
0.016998291015625,
-0.0283050537109375,
-0.0214385986328125,
-0.004100799560546875,
-0.0137786865234375,
-0.01297760009765625,
0.0248565673828125,
-0.01837158203125,
-0.024688720703125,
0.0170745849609375,
0.010223388671875,
0.03350830078125,
-0.0299072265625,
0.0284881591796875,
-0.05450439453125,
0.03125,
-0.0478515625,
-0.0360107421875,
-0.013519287109375,
0.00926971435546875,
0.01212310791015625,
-0.0100860595703125,
0.0195770263671875,
-0.006534576416015625,
0.033660888671875,
-0.004192352294921875,
0.02886962890625,
-0.00040984153747558594,
0.00640869140625,
0.02728271484375,
0.025421142578125,
0.00818634033203125,
-0.00537872314453125,
0.013336181640625,
0.049560546875,
-0.04412841796875,
0.062164306640625,
0.006862640380859375,
-0.034881591796875,
0.07073974609375,
-0.077880859375,
-0.05426025390625,
-0.0330810546875,
0.0042724609375,
-0.0090789794921875,
0.01239776611328125,
-0.00506591796875,
-0.0215301513671875,
-0.05072021484375,
0.0386962890625,
0.043060302734375,
-0.030792236328125,
-0.0015354156494140625,
0.0413818359375,
0.018768310546875,
-0.039306640625,
-0.06414794921875,
0.039794921875,
0.03411865234375,
0.053375244140625,
0.01873779296875,
0.0307464599609375,
-0.01873779296875,
-0.01470184326171875,
0.047332763671875,
-0.0069732666015625,
0.015533447265625,
0.026947021484375,
-0.0054168701171875,
-0.05072021484375,
0.04156494140625,
-0.026885986328125,
-0.0236968994140625,
0.0802001953125,
-0.0021495819091796875,
-0.01788330078125,
-0.01270294189453125,
0.027252197265625,
-0.027313232421875,
0.0132293701171875,
-0.03192138671875,
-0.04791259765625,
0.01702880859375,
0.032684326171875,
-0.0207366943359375,
-0.0100860595703125,
0.01152801513671875,
-0.009765625,
-0.01094818115234375,
-0.021453857421875,
0.057830810546875,
0.0164947509765625,
0.04541015625,
0.01021575927734375,
0.0278167724609375,
-0.0220184326171875,
0.0030384063720703125,
0.0023040771484375,
0.0689697265625,
-0.0298309326171875,
-0.053314208984375,
-0.04290771484375,
-0.01338958740234375,
0.0250701904296875,
0.038299560546875,
0.01163482666015625,
-0.02252197265625,
0.010589599609375,
0.001983642578125,
0.0423583984375,
0.0654296875,
-0.018951416015625,
0.01549530029296875,
0.0452880859375,
-0.01702880859375,
0.011138916015625,
-0.0122528076171875,
0.08203125,
-0.040771484375,
0.04705810546875,
-0.016632080078125,
0.0084075927734375,
0.000579833984375,
0.03607177734375,
0.033447265625,
-0.048553466796875,
0.00589752197265625,
-0.0027008056640625,
-0.017181396484375,
-0.048187255859375,
0.0264434814453125,
0.0214996337890625,
0.044769287109375,
-0.0251007080078125,
-0.040008544921875,
0.02264404296875,
-0.04425048828125,
-0.01885986328125,
0.056488037109375,
0.03558349609375,
-0.055633544921875,
-0.037353515625,
-0.0112762451171875,
0.0193634033203125,
-0.01727294921875,
0.021331787109375,
-0.0037403106689453125,
-0.00991058349609375,
-0.00665283203125,
-0.0287017822265625,
-0.0106658935546875,
-0.03240966796875,
-0.0171966552734375,
-0.009796142578125,
-0.00800323486328125,
0.0079498291015625,
-0.02947998046875,
-0.01430511474609375,
-0.00426483154296875,
-0.005832672119140625,
0.033538818359375,
-0.015869140625,
0.043975830078125,
-0.048858642578125,
-0.004791259765625,
0.01435089111328125,
-0.01108551025390625,
0.0784912109375,
0.038726806640625,
-0.0262451171875,
-0.01052093505859375,
0.00205230712890625,
-0.0036754608154296875,
0.04315185546875,
-0.0241546630859375,
-0.0243377685546875,
-0.039764404296875,
-0.0087432861328125,
0.01284027099609375,
0.0100555419921875,
0.038604736328125,
-0.0224761962890625,
0.0280609130859375,
-0.0002294778823852539,
0.057525634765625,
-0.01117706298828125,
0.024444580078125,
0.01287841796875,
-0.0305938720703125,
0.002223968505859375,
0.0107421875,
0.012939453125,
-0.0023040771484375,
-0.002086639404296875,
-0.0007228851318359375,
-0.01140594482421875,
-0.0234527587890625,
0.038238525390625,
-0.007236480712890625,
0.027069091796875,
-0.0089569091796875,
0.0218505859375,
0.0016498565673828125,
0.005863189697265625,
-0.00672149658203125,
-0.0167388916015625,
-0.03265380859375,
-0.039825439453125,
0.05224609375,
-0.042816162109375,
-0.0166015625,
0.01422882080078125,
-0.0172119140625,
0.0185089111328125,
-0.0283966064453125,
-0.0240631103515625,
0.083984375,
-0.0411376953125,
0.035614013671875,
0.046844482421875,
0.0313720703125,
0.02215576171875,
-0.0076141357421875,
0.006256103515625,
-0.0186309814453125,
0.007488250732421875,
0.017730712890625,
0.005214691162109375,
0.0265350341796875,
-0.0207672119140625,
0.0196990966796875,
-0.0037479400634765625,
0.00829315185546875,
-0.001110076904296875,
0.04107666015625,
0.0163421630859375,
-0.08056640625,
0.0166015625,
0.00077056884765625,
-0.005847930908203125,
-0.02862548828125,
0.0165863037109375,
-0.031890869140625,
-0.07574462890625,
0.0274505615234375,
0.000043272972106933594,
-0.0081634521484375,
-0.006191253662109375,
-0.0177764892578125,
-0.004608154296875,
-0.0146026611328125,
0.05413818359375,
0.008575439453125,
-0.0006117820739746094,
-0.035675048828125,
-0.000736236572265625,
-0.0291595458984375,
-0.0391845703125,
-0.01422882080078125,
0.0211639404296875,
-0.035186767578125,
-0.035736083984375,
0.0106353759765625,
-0.03179931640625,
0.039581298828125,
-0.00926971435546875,
0.0228424072265625,
0.033416748046875,
0.0694580078125,
-0.02545166015625,
-0.0007624626159667969,
0.05767822265625,
0.0005660057067871094,
0.029693603515625,
-0.042633056640625,
-0.005680084228515625,
0.04681396484375,
-0.027618408203125,
0.0173797607421875,
0.00664520263671875,
-0.01690673828125,
-0.00965118408203125,
0.019989013671875,
0.062286376953125,
0.026611328125,
-0.053955078125,
0.02227783203125,
-0.012969970703125,
-0.01336669921875,
0.002719879150390625,
0.01245880126953125,
-0.0799560546875,
-0.036163330078125,
0.01010894775390625,
-0.05743408203125,
0.003002166748046875,
0.012054443359375,
-0.1070556640625,
0.09130859375,
0.0304412841796875,
0.060394287109375,
-0.00696563720703125,
0.0127410888671875,
-0.040435791015625,
-0.0258636474609375,
-0.021697998046875,
0.0245208740234375,
0.023834228515625,
0.037445068359375,
-0.04052734375,
-0.0182037353515625,
0.007080078125,
0.060760498046875,
0.017486572265625,
0.01087188720703125,
-0.01047515869140625,
0.010650634765625,
0.053009033203125,
-0.0023593902587890625,
-0.0268707275390625,
0.0244598388671875,
0.019500732421875,
0.05975341796875,
0.056640625,
-0.057464599609375,
0.0276031494140625,
-0.0123443603515625,
-0.00670623779296875,
0.04052734375,
-0.00396728515625,
-0.012115478515625,
-0.0155181884765625,
-0.01276397705078125,
-0.06292724609375,
0.00562286376953125,
0.03582763671875,
-0.0139923095703125,
0.003810882568359375,
0.01131439208984375,
0.00940704345703125,
-0.0592041015625,
0.01461029052734375,
-0.033599853515625,
0.04302978515625,
0.0089111328125,
-0.00856781005859375,
0.062225341796875,
0.00727081298828125,
0.03497314453125,
-0.0064849853515625,
-0.002361297607421875,
-0.0328369140625,
0.055999755859375,
0.0196685791015625,
0.042449951171875,
0.028533935546875,
0.003704071044921875,
-0.0062408447265625,
0.05841064453125,
0.043548583984375,
-0.018341064453125,
-0.002223968505859375,
0.0012674331665039062,
0.0294647216796875,
0.01540374755859375,
0.003490447998046875,
0.053619384765625,
0.015533447265625,
0.0307159423828125,
0.007305145263671875,
-0.0257110595703125,
0.026702880859375,
0.01136016845703125,
0.0071258544921875,
-0.003696441650390625,
0.009674072265625,
0.004001617431640625,
-0.062255859375,
0.050445556640625,
0.023223876953125,
0.0572509765625,
-0.038299560546875,
0.11376953125,
0.0033245086669921875,
-0.0178070068359375,
-0.0194244384765625,
-0.01003265380859375,
-0.006374359130859375,
0.006259918212890625,
-0.0293121337890625,
0.004669189453125,
0.0209197998046875,
0.0384521484375,
0.0204925537109375,
-0.00021696090698242188,
0.0191802978515625,
0.004230499267578125,
-0.0255584716796875,
0.0181427001953125,
0.04937744140625,
-0.0228424072265625,
0.0228271484375,
-0.041107177734375,
0.008575439453125,
-0.030487060546875,
-0.0151824951171875,
-0.018157958984375,
0.0240020751953125,
-0.0135345458984375,
-0.01959228515625,
0.04144287109375,
-0.0118560791015625,
-0.01084136962890625,
0.02276611328125,
-0.007099151611328125,
0.08331298828125,
0.01279449462890625,
-0.040771484375,
-0.0087127685546875,
-0.0192413330078125,
-0.048187255859375,
0.05548095703125,
0.0634765625,
-0.00589752197265625,
0.0079803466796875,
0.0245819091796875,
0.0015993118286132812,
-0.01126861572265625,
0.0017099380493164062,
0.0169830322265625,
0.01386260986328125,
0.029815673828125,
0.0249786376953125,
-0.0148468017578125,
-0.0027618408203125,
0.007965087890625,
0.01190948486328125,
-0.0167236328125,
-0.0088348388671875,
0.006855010986328125,
0.00981903076171875,
-0.00023758411407470703,
0.01345062255859375,
-0.0257720947265625,
-0.024261474609375,
0.063720703125,
0.0128021240234375,
-0.002307891845703125,
-0.0205535888671875,
-0.081298828125,
-0.0193939208984375,
0.033294677734375,
-0.004093170166015625,
-0.007144927978515625,
-0.0019521713256835938,
0.04290771484375,
-0.0016775131225585938,
0.0562744140625,
-0.0132598876953125,
-0.0113983154296875,
-0.0228729248046875,
-0.0097503662109375,
0.037353515625,
0.0288238525390625,
-0.017425537109375,
0.02850341796875,
-0.0162353515625,
-0.05615234375,
0.0169830322265625,
-0.044921875,
0.0086517333984375,
0.0216217041015625,
0.028167724609375,
-0.027740478515625,
-0.06292724609375,
-0.04241943359375,
-0.01088714599609375,
-0.01160430908203125,
0.04022216796875,
-0.04400634765625,
0.010650634765625,
0.0033092498779296875,
-0.01477813720703125,
0.005626678466796875,
-0.04144287109375,
0.01055908203125,
0.0176544189453125,
0.009033203125,
-0.0224609375,
-0.005512237548828125,
-0.0200958251953125,
-0.04278564453125,
-0.01299285888671875,
-0.004947662353515625,
-0.0206298828125,
-0.0171661376953125,
-0.014862060546875,
-0.034088134765625,
-0.0036449432373046875,
-0.0224761962890625,
0.0183258056640625,
-0.0447998046875,
-0.00745391845703125,
0.006504058837890625,
-0.051544189453125,
0.01505279541015625,
-0.0030384063720703125,
0.0423583984375,
-0.05352783203125,
-0.03472900390625,
-0.0352783203125,
0.0184326171875,
-0.046722412109375,
0.0002903938293457031,
0.01111602783203125,
0.0071868896484375,
-0.0008177757263183594,
0.036224365234375,
-0.015838623046875,
0.0845947265625,
-0.0386962890625,
-0.0235748291015625,
0.042388916015625,
-0.045989990234375,
-0.0284881591796875,
-0.07659912109375,
0.0208892822265625,
-0.1253662109375,
-0.02984619140625,
0.00931549072265625,
-0.0217437744140625,
-0.0006542205810546875,
-0.032806396484375,
-0.04852294921875,
0.04534912109375,
0.0035953521728515625,
-0.04974365234375,
-0.0304718017578125,
-0.0279388427734375,
-0.01129913330078125,
0.061248779296875,
-0.006328582763671875,
-0.0165557861328125,
-0.066162109375,
0.0162506103515625,
0.00791168212890625,
0.025115966796875,
0.029296875,
-0.009857177734375,
-0.0260009765625,
0.00963592529296875,
0.0084686279296875,
-0.0135345458984375,
0.0028934478759765625,
0.00807952880859375,
0.02557373046875,
0.021270751953125,
-0.036376953125,
0.00989532470703125,
-0.002716064453125,
-0.00018906593322753906,
-0.0288238525390625,
-0.0220489501953125,
-0.0274200439453125,
-0.02398681640625,
0.0540771484375,
0.07666015625,
0.0023403167724609375,
-0.03076171875,
0.034454345703125,
-0.0036602020263671875,
-0.045257568359375,
-0.0294036865234375,
0.03167724609375,
-0.074951171875,
-0.05364990234375,
0.0120849609375,
-0.0258026123046875,
0.0018434524536132812,
0.0236053466796875,
-0.0251617431640625,
-0.0019350051879882812,
0.00704193115234375,
-0.0433349609375,
0.0282745361328125,
-0.0635986328125,
0.10211181640625,
-0.046417236328125,
0.0009284019470214844,
0.0022258758544921875,
0.04949951171875,
0.0294952392578125,
-0.044189453125,
-0.0022563934326171875,
0.0299072265625,
-0.0148773193359375,
-0.01061248779296875,
0.015625,
0.00714111328125,
0.016143798828125,
0.0015811920166015625,
0.011322021484375,
0.0218353271484375,
-0.0296783447265625,
0.023193359375,
0.00514984130859375,
0.0850830078125,
0.001667022705078125,
0.06646728515625,
-0.00801849365234375,
0.0086212158203125,
0.016021728515625,
0.004169464111328125,
-0.042083740234375,
-0.0031719207763671875,
-0.01126861572265625,
-0.044586181640625,
0.0153961181640625,
-0.005062103271484375,
-0.0196685791015625,
-0.01556396484375,
0.00107574462890625,
-0.0195465087890625,
-0.0157318115234375,
0.00811767578125
] |
5f0e10d300c7e1b8223d7ebf21263e4355c9d2b1
|
Wordpress Stackexchange
Q: Translate a plugin using .po .mo files I want to translate this plugin.
The plugin has already been translated into other languages and it has .pot files for adding new languages (as far as I understood from description).
How do I create .po and .mo files for my new language and make them accessible so as to be used by the plugin? I've tried to define Russian language in my wp-config.php file by inserting the definition below:
define ('WPLANG', 'ru_RU');
A: You can try this codestyling-localization plugin:. You can translate you plugins and themes using this.
|
Q: Translate a plugin using .po .mo files I want to translate this plugin.
The plugin has already been translated into other languages and it has .pot files for adding new languages (as far as I understood from description).
How do I create .po and .mo files for my new language and make them accessible so as to be used by the plugin? I've tried to define Russian language in my wp-config.php file by inserting the definition below:
define ('WPLANG', 'ru_RU');
A: You can try this codestyling-localization plugin:. You can translate you plugins and themes using this.
A: (Here is an EXAMPLE of translation to DEUTSCH. CHANGE the customs to YOUR DESIRED ones.)
in every plugins head, there is an unique name.
(for example:
/*
Plugin Name: my-pluginname
.......
*/
then, in that plugin's folder, create a folder "languages";
then, into your plugin .php file (somewhere in the top), insert the initialization code:
class load_language
{
public function __construct()
{
add_action('init', array($this, 'load_my_transl'));
}
public function load_my_transl()
{
load_plugin_textdomain('my-pluginname', FALSE, dirname(plugin_basename(__FILE__)).'/languages/');
}
}
$zzzz = new load_language;
then open any text editor, then insert like this code (NOTE, THAT we are only adding two sample messages, "hello" and "bye", so , you can ADD AS MANY messages AS YOU WANT with the similar lines).
# English translations for PACKAGE package.
# Copyright (C) 2012 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Automatically generated, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: my-pluginname 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-08-06 13:46-0400\n"
"PO-Revision-Date: 2013-03-21 11:20+0400\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.5.4\n"
#: mypluginindex.php:87 (it is just a line of a note, to remind where our code appears)
msgid "mymessage1"
msgstr "Hello"
#: mypluginindex.php:88
msgid "mymessage2"
msgstr "Bye"
then save this file as "my-pluginname-en_US.po" (note, that .po is an extension of file, so check that your text editor program has not saved to "my-pluginname-en_US.po.TXT").
then download POEDIT software, and open this file. then edit the "translation" field, and then save as "my-pluginname-de_DE"
there will be generated two files ( If poEdit does not generate the second .mo file automatically, just go to File -> Preferences -> Editor and check the box that says "Automatically compile .mo file on save"),
then put those two file into "languages" folder.
after this, open wp-config.php and find this code:
define ('WPLANG, '');
and change to
define ('WPLANG, 'de_DE');
That's all.
When WordPress is loaded, it will read your plugins language file, with prefix -de_DE.
So, in the plugin's .php file, instead of:
echo "Something string";
you should use:
echo __("mymessage1", 'my-pluginname');
Finished. Now you should test your plugin.
p.s. used links:
*
*codex.wordpress.org/I18n_for_WordPress_Developers
*codex.wordpress.org/Translating_WordPress
*codex.wordpress.org/Writing_a_Plugin
*codex.wordpress.org/Installing_WordPress_in_Your_Language
A: The Editor
There are others, but this is most used: Poedit, a cross-platform gettext catalogs (.po files) editor.
The Formats
*
*.mo stands for Machine Object
-- compiled export of the .po file which is used by WordPress
*.po stands for Portable Object
-- editable text file with the translations strings
-- based on the master .pot file, using Update from POT file PoEdit function
-- some folks distribute this as a master file, but it should be used only for translations
*.pot stands for Portable Object Template
-- editable text file used to grab all the translatable strings from WordPress itself and Themes and Plugins, using Update from Sources PoEdit function
The Procedure
*
*Duplicate the .pot file and rename it to plugin-basename-lang_COUNTRY.po
*Example for the referenced plugin case: subscribe-reloaded-pt_BR.po
-- pt_BR means Portuguese Brazil, but many languages don't have a country variation...
-- you'll have to fill in with your own language
*WPLANG in wp-config.php file must be set to your language, e.g., pt_BR
*Every time you save the .po file, PoEdit automatically generates a .mo file, which is the one WordPress uses and basically the only one you need to upload
Observations
*
*If you do a full or a decent partial translation, submit it to the plugin author so he can include it in the Repository and you get credited for it
*Don't forget to make a backup of your translation, because if you upgrade the plugin your file will be lost
*@user17078 plugin suggestion is quite nice, but I never used it much
A: You will want to use POEdit. It's a free application for creating .po/.mo files.
I wrote a pretty in-depth tutorial on the entire topic here. You can skip to Step 3 - Create the Translation File For Text Domain.
A: I suggest also http://poeditor.com/. It is a web-based translation tool that works great with .po, .mo, .pot and other types of files.
|
wordpress
|
{
"language": "en",
"length": 785,
"provenance": "stackexchange_00019.jsonl.gz:421434",
"question_score": "39",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57219"
}
|
[
-0.00109100341796875,
-0.01038360595703125,
0.0197906494140625,
0.0235443115234375,
-0.0130157470703125,
-0.01439666748046875,
0.032073974609375,
-0.029937744140625,
-0.032470703125,
0.0113677978515625,
0.002460479736328125,
-0.005401611328125,
0.0164642333984375,
-0.035003662109375,
0.033111572265625,
-0.03619384765625,
0.01157379150390625,
0.007129669189453125,
-0.00270843505859375,
-0.02459716796875,
-0.0183258056640625,
-0.01678466796875,
0.0210723876953125,
-0.01078033447265625,
0.042633056640625,
-0.053985595703125,
0.03607177734375,
-0.0274810791015625,
-0.0133056640625,
-0.037017822265625,
0.0252685546875,
0.03759765625,
0.04742431640625,
-0.0006475448608398438,
-0.039947509765625,
-0.05126953125,
-0.0079498291015625,
-0.02630615234375,
-0.048858642578125,
0.039947509765625,
0.0170440673828125,
-0.003421783447265625,
0.006221771240234375,
0.0784912109375,
0.000316619873046875,
-0.09326171875,
0.06658935546875,
-0.03607177734375,
-0.01202392578125,
0.00033736228942871094,
0.0217742919921875,
-0.0174560546875,
0.040496826171875,
-0.0292510986328125,
-0.015655517578125,
-0.0126953125,
-0.0625,
0.0789794921875,
0.0156402587890625,
0.037628173828125,
0.00867462158203125,
0.03448486328125,
-0.01751708984375,
-0.01200103759765625,
-0.0132598876953125,
-0.00980377197265625,
-0.053802490234375,
0.023162841796875,
-0.00685882568359375,
-0.0087738037109375,
0.006336212158203125,
-0.014495849609375,
0.0234527587890625,
-0.0157623291015625,
-0.000926971435546875,
0.00498199462890625,
-0.0229034423828125,
-0.01198577880859375,
0.033447265625,
-0.007843017578125,
0.05157470703125,
-0.0160064697265625,
0.0274200439453125,
-0.0152435302734375,
0.00392913818359375,
0.0019626617431640625,
0.00958251953125,
-0.017547607421875,
-0.0565185546875,
-0.0283966064453125,
-0.0306396484375,
0.0020275115966796875,
-0.10400390625,
0.015777587890625,
0.0179443359375,
-0.0256195068359375,
-0.0479736328125,
-0.024383544921875,
-0.007419586181640625,
0.04766845703125,
-0.0173797607421875,
-0.02410888671875,
0.046905517578125,
-0.0208587646484375,
0.024749755859375,
0.0243377685546875,
-0.0271148681640625,
0.00829315185546875,
0.068603515625,
0.039459228515625,
0.0111236572265625,
0.09747314453125,
-0.006450653076171875,
-0.04791259765625,
-0.0114593505859375,
0.037384033203125,
-0.00644683837890625,
0.005313873291015625,
0.01462554931640625,
-0.0037593841552734375,
-0.001285552978515625,
-0.004322052001953125,
0.0259552001953125,
-0.0171966552734375,
0.0089111328125,
-0.02044677734375,
-0.0237274169921875,
-0.0038471221923828125,
-0.0280914306640625,
0.0343017578125,
0.0026397705078125,
-0.01342010498046875,
-0.004528045654296875,
0.033905029296875,
-0.01898193359375,
-0.01568603515625,
0.017181396484375,
0.003330230712890625,
0.01690673828125,
-0.0199127197265625,
0.038604736328125,
-0.0202484130859375,
-0.01346588134765625,
0.04974365234375,
-0.023101806640625,
0.0021209716796875,
0.009307861328125,
0.01474761962890625,
0.0032863616943359375,
-0.031402587890625,
0.0167236328125,
-0.0369873046875,
0.006862640380859375,
0.032562255859375,
0.0236968994140625,
0.01055145263671875,
0.04522705078125,
-0.021209716796875,
-0.001495361328125,
-0.0266876220703125,
-0.056060791015625,
-0.0236358642578125,
0.00965118408203125,
-0.029388427734375,
-0.03912353515625,
0.039520263671875,
0.04071044921875,
0.01019287109375,
0.0159759521484375,
0.00600433349609375,
0.00405120849609375,
0.02947998046875,
-0.01154327392578125,
0.01522064208984375,
0.01047515869140625,
-0.0045928955078125,
-0.08099365234375,
0.0197601318359375,
0.04974365234375,
0.006504058837890625,
0.041229248046875,
-0.00994110107421875,
0.0672607421875,
0.0477294921875,
-0.032745361328125,
-0.0180816650390625,
0.007068634033203125,
0.011962890625,
0.0487060546875,
0.0054168701171875,
0.0194244384765625,
-0.0172119140625,
-0.04840087890625,
0.038909912109375,
-0.0166015625,
-0.00994110107421875,
0.01261138916015625,
0.037384033203125,
-0.0035552978515625,
-0.0301971435546875,
-0.020294189453125,
-0.03045654296875,
0.007709503173828125,
0.0240020751953125,
-0.0267333984375,
-0.00919342041015625,
-0.0300140380859375,
0.0153045654296875,
0.01190185546875,
-0.0071563720703125,
-0.005207061767578125,
-0.0167083740234375,
0.01497650146484375,
-0.055633544921875,
-0.046295166015625,
0.0099334716796875,
-0.0259552001953125,
0.0299530029296875,
0.021240234375,
0.010223388671875,
0.0589599609375,
-0.027313232421875,
0.053741455078125,
0.0189361572265625,
-0.016815185546875,
0.01152801513671875,
-0.0274200439453125,
0.004283905029296875,
-0.0033168792724609375,
-0.0072021484375,
0.0694580078125,
0.0237274169921875,
-0.0095062255859375,
0.0039825439453125,
0.0008959770202636719,
-0.0188140869140625,
0.0131683349609375,
-0.09661865234375,
0.0236663818359375,
0.049896240234375,
0.0308837890625,
0.0382080078125,
-0.0207672119140625,
-0.0158843994140625,
0.06005859375,
-0.01313018798828125,
0.0168304443359375,
-0.0019245147705078125,
0.0323486328125,
0.0423583984375,
-0.03546142578125,
-0.03033447265625,
0.00632476806640625,
-0.07501220703125,
0.006450653076171875,
0.02435302734375,
-0.03265380859375,
-0.03424072265625,
0.031951904296875,
-0.01276397705078125,
0.00763702392578125,
-0.005157470703125,
-0.0189361572265625,
0.005451202392578125,
0.050323486328125,
-0.00777435302734375,
0.016510009765625,
0.0017824172973632812,
-0.0540771484375,
0.0115814208984375,
0.03338623046875,
0.00731658935546875,
0.0209197998046875,
0.00537872314453125,
-0.043426513671875,
0.0178985595703125,
0.0081024169921875,
-0.008514404296875,
0.01001739501953125,
-0.00803375244140625,
-0.01094818115234375,
0.0338134765625,
-0.0157470703125,
-0.019561767578125,
0.0161285400390625,
-0.00814056396484375,
-0.013763427734375,
-0.0238189697265625,
-0.028045654296875,
-0.019134521484375,
0.0273590087890625,
-0.0206756591796875,
-0.07574462890625,
0.04296875,
-0.0321044921875,
-0.03387451171875,
0.09405517578125,
-0.0550537109375,
0.052734375,
-0.06024169921875,
0.043548583984375,
0.05560302734375,
-0.032958984375,
0.0165557861328125,
-0.0002655982971191406,
-0.0232696533203125,
0.0025310516357421875,
-0.011566162109375,
-0.0201416015625,
-0.0157470703125,
-0.06622314453125,
-0.0174102783203125,
-0.001873016357421875,
0.0103302001953125,
-0.0305633544921875,
-0.0576171875,
-0.023193359375,
-0.00992584228515625,
-0.06622314453125,
-0.023590087890625,
0.00312042236328125,
-0.0391845703125,
0.00785064697265625,
0.01383209228515625,
-0.01261138916015625,
-0.0211944580078125,
0.0285186767578125,
0.004688262939453125,
0.011627197265625,
-0.0295867919921875,
-0.0333251953125,
-0.07037353515625,
-0.052520751953125,
-0.0458984375,
0.0096893310546875,
-0.01279449462890625,
0.0022830963134765625,
-0.0011854171752929688,
-0.004474639892578125,
-0.0246429443359375,
0.00460052490234375,
0.059722900390625,
0.006572723388671875,
0.0015010833740234375,
0.0008740425109863281,
-0.0047454833984375,
0.050018310546875,
-0.007472991943359375,
0.0005021095275878906,
0.058746337890625,
-0.042236328125,
-0.00254058837890625,
-0.0005736351013183594,
-0.0063629150390625,
-0.00777435302734375,
-0.079833984375,
-0.0077972412109375,
-0.02081298828125,
-0.0703125,
-0.068603515625,
-0.035675048828125,
0.01904296875,
-0.0362548828125,
0.027008056640625,
-0.0172271728515625,
-0.0198516845703125,
0.015960693359375,
0.0367431640625,
0.01291656494140625,
0.00586700439453125,
0.024688720703125,
-0.01267242431640625,
0.0018520355224609375,
0.00702667236328125,
-0.0021343231201171875,
-0.0184783935546875,
0.0173797607421875,
-0.0174102783203125,
-0.006969451904296875,
-0.0107269287109375,
0.00495147705078125,
0.0129547119140625,
0.005329132080078125,
-0.000720977783203125,
0.0011186599731445312,
0.03009033203125,
-0.0011949539184570312,
0.0222320556640625,
-0.002849578857421875,
-0.020843505859375,
-0.0106048583984375,
0.042877197265625,
-0.0168304443359375,
-0.025054931640625,
0.00626373291015625,
0.01386260986328125,
-0.02313232421875,
-0.00579071044921875,
-0.01079559326171875,
-0.0260009765625,
-0.0279998779296875,
-0.005260467529296875,
0.0065460205078125,
-0.0131988525390625,
-0.005462646484375,
0.0733642578125,
-0.01450347900390625,
-0.02459716796875,
0.01788330078125,
0.0161590576171875,
0.019561767578125,
-0.024505615234375,
0.0113983154296875,
-0.040313720703125,
-0.0085296630859375,
-0.0021419525146484375,
-0.0645751953125,
-0.0009746551513671875,
-0.07489013671875,
0.060394287109375,
0.0654296875,
-0.0596923828125,
0.00925445556640625,
0.034576416015625,
0.001338958740234375,
0.0338134765625,
-0.002712249755859375,
0.0014476776123046875,
0.036651611328125,
0.004352569580078125,
0.00470733642578125,
0.00153350830078125,
0.00077056884765625,
0.0099334716796875,
-0.0310211181640625,
0.043060302734375,
-0.01229095458984375,
0.0024585723876953125,
0.01282501220703125,
-0.056976318359375,
-0.0004658699035644531,
-0.0238800048828125,
-0.03131103515625,
0.01495361328125,
-0.0151214599609375,
-0.0009245872497558594,
-0.0318603515625,
-0.0218353271484375,
0.016326904296875,
0.005523681640625,
-0.0281982421875,
0.0234527587890625,
0.04754638671875,
0.0107574462890625,
-0.018890380859375,
-0.09814453125,
0.03094482421875,
0.043701171875,
0.03009033203125,
0.05816650390625,
0.044189453125,
-0.0305023193359375,
0.046630859375,
0.048675537109375,
-0.01015472412109375,
0.0208587646484375,
0.0004253387451171875,
0.0000349879264831543,
-0.02362060546875,
0.005054473876953125,
-0.0104827880859375,
0.0029735565185546875,
0.019989013671875,
-0.004360198974609375,
0.00897216796875,
0.0000023245811462402344,
0.01206207275390625,
-0.00965118408203125,
-0.01348876953125,
-0.00829315185546875,
-0.0797119140625,
0.033050537109375,
-0.0440673828125,
-0.0279541015625,
-0.039398193359375,
0.01517486572265625,
-0.0022487640380859375,
-0.0164947509765625,
-0.0006079673767089844,
0.036590576171875,
0.039886474609375,
0.004825592041015625,
0.0251922607421875,
0.04229736328125,
-0.01136016845703125,
-0.0189208984375,
0.0010280609130859375,
-0.00946807861328125,
-0.032012939453125,
-0.050323486328125,
-0.0230560302734375,
-0.0110626220703125,
0.0185699462890625,
0.064697265625,
-0.005443572998046875,
0.0284271240234375,
0.041259765625,
-0.0158538818359375,
0.0010423660278320312,
0.01177978515625,
0.00673675537109375,
-0.03143310546875,
-0.0136260986328125,
-0.00939178466796875,
-0.006320953369140625,
0.00797271728515625,
0.060302734375,
-0.06500244140625,
0.04656982421875,
0.017425537109375,
-0.00699615478515625,
-0.0184478759765625,
0.041961669921875,
0.005126953125,
-0.0301055908203125,
0.0156402587890625,
0.00786590576171875,
0.011383056640625,
-0.006771087646484375,
0.022918701171875,
0.00780487060546875,
0.020172119140625,
-0.046783447265625,
-0.034820556640625,
0.05364990234375,
-0.037628173828125,
-0.0130157470703125,
-0.0014476776123046875,
-0.0006556510925292969,
-0.024993896484375,
-0.0082550048828125,
0.00429534912109375,
0.0026493072509765625,
-0.0083770751953125,
-0.0033721923828125,
-0.005764007568359375,
-0.0175933837890625,
-0.005645751953125,
0.0225830078125,
-0.03118896484375,
-0.0109405517578125,
-0.01390838623046875,
-0.006496429443359375,
-0.002231597900390625,
-0.021026611328125,
0.0020771026611328125,
-0.0278167724609375,
0.0168304443359375,
0.0010480880737304688,
0.01424407958984375,
-0.01303863525390625,
-0.0193634033203125,
-0.0110321044921875,
0.0198516845703125,
-0.0092926025390625,
0.01137542724609375,
0.0266571044921875,
-0.0256500244140625,
-0.01332855224609375,
-0.041107177734375,
-0.032745361328125,
-0.021270751953125,
-0.02490234375,
-0.0489501953125,
-0.0008111000061035156,
0.029632568359375,
-0.0016832351684570312,
0.05511474609375,
-0.033233642578125,
-0.0267791748046875,
0.03045654296875,
-0.01033782958984375,
-0.0247344970703125,
0.06768798828125,
-0.031280517578125,
0.0672607421875,
0.02655029296875,
0.005489349365234375,
0.003582000732421875,
0.05059814453125,
-0.001506805419921875,
0.001312255859375,
0.0233612060546875,
-0.017303466796875,
-0.049957275390625,
-0.03338623046875,
-0.0287017822265625,
-0.00225830078125,
0.040863037109375,
-0.020538330078125,
0.0246734619140625,
-0.004390716552734375,
-0.0012607574462890625,
0.0006070137023925781,
-0.0047454833984375,
-0.00501251220703125,
0.0216827392578125,
0.03326416015625,
-0.0845947265625,
0.0239105224609375,
0.012603759765625,
0.01099395751953125,
0.058868408203125,
-0.0894775390625,
0.048431396484375,
0.08074951171875,
-0.016815185546875,
0.0104827880859375,
-0.01409149169921875,
0.020263671875,
0.01346588134765625,
-0.0018301010131835938,
0.0294036865234375,
-0.043426513671875,
0.004199981689453125,
0.03704833984375,
0.01433563232421875,
0.016632080078125,
-0.0234527587890625,
0.012908935546875,
-0.0199127197265625,
-0.01422119140625,
0.03289794921875,
0.083251953125,
0.0667724609375,
-0.0947265625,
-0.007694244384765625,
-0.01331329345703125,
-0.0455322265625,
0.039398193359375,
0.0217132568359375,
0.0066680908203125,
-0.003910064697265625,
0.0096893310546875,
-0.00971221923828125,
-0.0186767578125,
0.00328826904296875,
-0.011627197265625,
-0.00018644332885742188,
-0.01409912109375,
0.01171875,
0.0184783935546875,
0.01441192626953125,
-0.0017261505126953125,
-0.0183563232421875,
0.035919189453125,
-0.031585693359375,
0.0154876708984375,
-0.0017766952514648438,
-0.0013942718505859375,
-0.0197601318359375,
0.051300048828125,
-0.0195770263671875,
0.0250091552734375,
0.03125,
0.02996826171875,
0.00019276142120361328,
0.060333251953125,
-0.0186309814453125,
0.0163421630859375,
0.01043701171875,
0.0323486328125,
0.0157928466796875,
0.0010766983032226562,
-0.007259368896484375,
0.049835205078125,
-0.017242431640625,
0.003894805908203125,
-0.0270538330078125,
0.026641845703125,
-0.0037631988525390625,
-0.03741455078125,
0.0213775634765625,
0.0079498291015625,
-0.01084136962890625,
0.0236968994140625,
-0.005100250244140625,
0.014678955078125,
-0.0050201416015625,
0.020965576171875,
-0.046539306640625,
-0.029541015625,
0.0054168701171875,
-0.036956787109375,
-0.0056610107421875,
-0.0118408203125,
-0.06396484375,
0.07940673828125,
-0.00484466552734375,
0.035736083984375,
-0.0011014938354492188,
0.034515380859375,
0.007755279541015625,
0.01654052734375,
-0.0244598388671875,
0.03204345703125,
-0.01081085205078125,
-0.016693115234375,
-0.03509521484375,
-0.0004925727844238281,
-0.0204925537109375,
0.0287322998046875,
0.037811279296875,
0.0029964447021484375,
0.005718231201171875,
-0.00156402587890625,
0.04486083984375,
0.0026149749755859375,
-0.0250244140625,
0.0321044921875,
-0.01471710205078125,
-0.019866943359375,
-0.03851318359375,
0.019775390625,
0.04736328125,
-0.054046630859375,
-0.062286376953125,
-0.0010547637939453125,
-0.009490966796875,
-0.048126220703125,
0.00951385498046875,
0.00620269775390625,
-0.06591796875,
0.0243682861328125,
0.0220184326171875,
0.00704193115234375,
0.0214691162109375,
-0.01045989990234375,
0.006015777587890625,
0.00890350341796875,
0.00484466552734375,
-0.007328033447265625,
0.0330810546875,
0.0048675537109375,
0.0251617431640625,
-0.00229644775390625,
0.0011081695556640625,
0.05926513671875,
-0.056396484375,
-0.0109405517578125,
-0.005207061767578125,
-0.0035610198974609375,
0.0220794677734375,
0.03057861328125,
0.0268096923828125,
0.01174163818359375,
0.0340576171875,
0.008697509765625,
0.0280914306640625,
-0.034698486328125,
-0.01105499267578125,
0.0019989013671875,
0.01103973388671875,
0.0140228271484375,
0.0012025833129882812,
0.043182373046875,
-0.021514892578125,
0.004390716552734375,
0.013153076171875,
-0.0013637542724609375,
0.0078887939453125,
-0.0248870849609375,
0.0014123916625976562,
0.006256103515625,
0.019927978515625,
0.047332763671875,
-0.028289794921875,
0.03472900390625,
0.03118896484375,
0.050201416015625,
-0.0301666259765625,
0.0716552734375,
-0.024139404296875,
-0.02337646484375,
0.032958984375,
-0.021453857421875,
0.028594970703125,
-0.054290771484375,
0.01218414306640625,
-0.007843017578125,
0.018829345703125,
0.0197906494140625,
-0.034576416015625,
0.03863525390625,
0.021881103515625,
0.055511474609375,
-0.0022335052490234375,
-0.0260162353515625,
0.053009033203125,
-0.0159454345703125,
-0.00235748291015625,
0.0003368854522705078,
-0.0197601318359375,
0.00794219970703125,
-0.03594970703125,
-0.0008258819580078125,
0.023956298828125,
0.014404296875,
-0.000016033649444580078,
0.04144287109375,
-0.00511932373046875,
-0.02880859375,
0.039337158203125,
-0.0155029296875,
0.11572265625,
0.024627685546875,
-0.0133209228515625,
0.0156097412109375,
-0.048004150390625,
-0.0269317626953125,
-0.005283355712890625,
0.00977325439453125,
-0.02587890625,
0.064208984375,
0.00908660888671875,
-0.0175323486328125,
0.0183563232421875,
-0.0029926300048828125,
0.010498046875,
-0.008697509765625,
0.0175933837890625,
-0.017822265625,
-0.0606689453125,
-0.06103515625,
-0.0504150390625,
0.08538818359375,
0.046539306640625,
0.002899169921875,
-0.005680084228515625,
0.0794677734375,
-0.05194091796875,
-0.015106201171875,
-0.01419830322265625,
-0.046142578125,
-0.01177215576171875,
0.03955078125,
0.0073699951171875,
-0.0002562999725341797,
-0.050323486328125,
0.01100921630859375,
0.026031494140625,
-0.01158905029296875,
0.007091522216796875,
-0.013031005859375,
0.0200042724609375,
-0.0037975311279296875,
0.062164306640625,
-0.0267791748046875,
-0.059478759765625,
-0.051055908203125,
0.00627899169921875,
0.0172271728515625,
0.031402587890625,
-0.01904296875,
0.058135986328125,
-0.025543212890625,
-0.0177001953125,
0.0175323486328125,
-0.056365966796875,
-0.005184173583984375,
0.01654052734375,
-0.01273345947265625,
-0.0423583984375,
-0.021484375,
-0.036102294921875,
-0.0008158683776855469,
-0.0127716064453125,
0.05535888671875,
-0.035614013671875,
0.000579833984375,
-0.018707275390625,
-0.006534576416015625,
0.01433563232421875,
-0.0333251953125,
0.01052093505859375,
-0.01029205322265625,
0.006664276123046875,
0.0127105712890625,
-0.0033855438232421875,
-0.0181121826171875,
-0.00588226318359375,
-0.01209259033203125,
-0.0016279220581054688,
-0.00508880615234375,
-0.05560302734375,
-0.02520751953125,
-0.0251312255859375,
0.00730133056640625,
-0.029388427734375,
0.0254669189453125,
-0.042694091796875,
-0.0298919677734375,
-0.003490447998046875,
-0.040069580078125,
-0.04425048828125,
0.0142364501953125,
0.01140594482421875,
-0.0167388916015625,
-0.0079345703125,
-0.0290679931640625,
-0.023590087890625,
-0.0076751708984375,
0.038970947265625,
0.03497314453125,
-0.023193359375,
0.0008344650268554688,
0.08038330078125,
0.0391845703125,
0.1295166015625,
-0.003276824951171875,
0.0020313262939453125,
0.043701171875,
-0.01175689697265625,
-0.065185546875,
-0.10638427734375,
0.027740478515625,
-0.10986328125,
-0.0124053955078125,
0.0199737548828125,
-0.032745361328125,
-0.0237274169921875,
-0.061981201171875,
-0.12091064453125,
0.01279449462890625,
-0.00308990478515625,
-0.05194091796875,
-0.04595947265625,
-0.0186767578125,
0.00617218017578125,
0.00559234619140625,
-0.0211944580078125,
-0.007236480712890625,
-0.04254150390625,
0.02154541015625,
-0.014923095703125,
0.034393310546875,
0.0084686279296875,
-0.03363037109375,
0.03363037109375,
0.019287109375,
0.050445556640625,
-0.0293121337890625,
-0.031951904296875,
0.0183258056640625,
-0.0218353271484375,
0.033172607421875,
-0.0197296142578125,
-0.049652099609375,
0.00354766845703125,
0.0027523040771484375,
-0.0214691162109375,
-0.064208984375,
0.006572723388671875,
0.003276824951171875,
0.050262451171875,
0.0172882080078125,
0.001953125,
-0.033111572265625,
0.0187835693359375,
-0.01071929931640625,
-0.04339599609375,
-0.0244293212890625,
0.0138702392578125,
-0.040924072265625,
-0.0161590576171875,
-0.00318145751953125,
0.016754150390625,
-0.0219879150390625,
-0.00021398067474365234,
-0.005199432373046875,
-0.033966064453125,
0.01137542724609375,
0.0023555755615234375,
0.011962890625,
-0.048431396484375,
0.0843505859375,
-0.03302001953125,
0.0267791748046875,
-0.0059356689453125,
0.045257568359375,
0.042938232421875,
-0.02215576171875,
-0.01178741455078125,
0.0164947509765625,
-0.00835418701171875,
0.0231170654296875,
0.0076141357421875,
0.01407623291015625,
-0.011260986328125,
0.00033020973205566406,
-0.0172271728515625,
0.02667236328125,
0.02642822265625,
0.039886474609375,
-0.0450439453125,
0.03460693359375,
0.02734375,
-0.0257568359375,
-0.0017366409301757812,
-0.03448486328125,
-0.03167724609375,
0.03778076171875,
-0.04522705078125,
-0.0015544891357421875,
-0.031585693359375,
-0.01303863525390625,
0.0279083251953125,
-0.0133056640625,
-0.0042266845703125,
-0.0014667510986328125,
0.020050048828125,
-0.0309600830078125,
-0.052642822265625,
0.0146636962890625
] |
e2cd144006149d4649ba10ddd7864ec27559e2e3
|
Wordpress Stackexchange
Q: Convert uploaded PNG to JPEG automatically Is there a way to convert automatically uploaded PNGs to JPEGs and keep the original? In other words, let the user upload a PNG, but show in wordpress (thumbnails, large, medium, etc) the JPEG version and only show the original uploaded PNG when Wordpress request the full image.
A: There is a way, I recommend you combine the imagefx plugin with a custom function , http://wordpress.org/extend/plugins/imagefx/
You can read about it here: http://ottopress.com/tag/gd/ , and use a function like one found here: https://stackoverflow.com/questions/1201798/use-php-to-convert-png-to-jpg-with-compression
It would look something like (not tested):
imagefx_register_filter('custom-name','my_custom_filter');
function my_custom_filter(&$image, $outputFile, $quality) {
$image = imagecreatefrompng(&$image);
imagejpeg($image, $outputFile, $quality);
imagedestroy($image);
}
But remember they are not the same format and .jpg does doesn't support alpha-transparency
|
Q: Convert uploaded PNG to JPEG automatically Is there a way to convert automatically uploaded PNGs to JPEGs and keep the original? In other words, let the user upload a PNG, but show in wordpress (thumbnails, large, medium, etc) the JPEG version and only show the original uploaded PNG when Wordpress request the full image.
A: There is a way, I recommend you combine the imagefx plugin with a custom function , http://wordpress.org/extend/plugins/imagefx/
You can read about it here: http://ottopress.com/tag/gd/ , and use a function like one found here: https://stackoverflow.com/questions/1201798/use-php-to-convert-png-to-jpg-with-compression
It would look something like (not tested):
imagefx_register_filter('custom-name','my_custom_filter');
function my_custom_filter(&$image, $outputFile, $quality) {
$image = imagecreatefrompng(&$image);
imagejpeg($image, $outputFile, $quality);
imagedestroy($image);
}
But remember they are not the same format and .jpg does doesn't support alpha-transparency
|
wordpress
|
{
"language": "en",
"length": 125,
"provenance": "stackexchange_00019.jsonl.gz:421435",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57221"
}
|
[
0.040283203125,
-0.0067138671875,
0.0245361328125,
0.018951416015625,
0.00885772705078125,
-0.032012939453125,
0.10675048828125,
-0.0192718505859375,
0.0283203125,
0.007007598876953125,
-0.00039696693420410156,
-0.0070648193359375,
-0.013397216796875,
-0.0261688232421875,
-0.0213775634765625,
-0.006072998046875,
0.0307769775390625,
-0.0726318359375,
-0.021942138671875,
-0.0229034423828125,
-0.008819580078125,
0.003246307373046875,
0.059814453125,
-0.004421234130859375,
0.006908416748046875,
0.013519287109375,
0.04217529296875,
-0.0053253173828125,
-0.00797271728515625,
-0.01485443115234375,
0.015228271484375,
0.005123138427734375,
0.01029205322265625,
0.01459503173828125,
-0.0010890960693359375,
0.03277587890625,
0.0136871337890625,
0.00689697265625,
0.00958251953125,
0.02166748046875,
0.0163726806640625,
-0.028045654296875,
-0.007610321044921875,
-0.0325927734375,
-0.00811004638671875,
0.00324249267578125,
-0.017486572265625,
-0.0400390625,
0.0023860931396484375,
0.0194854736328125,
0.0235595703125,
0.0377197265625,
0.028167724609375,
0.01080322265625,
-0.0091705322265625,
-0.00009709596633911133,
-0.043853759765625,
0.09649658203125,
0.026702880859375,
-0.007720947265625,
-0.044189453125,
-0.003070831298828125,
0.005725860595703125,
-0.0235137939453125,
-0.010009765625,
0.0019626617431640625,
-0.09100341796875,
-0.01087188720703125,
0.0279998779296875,
0.003307342529296875,
0.006542205810546875,
-0.020111083984375,
-0.005275726318359375,
-0.034271240234375,
-0.00986480712890625,
0.0509033203125,
-0.029876708984375,
0.00798797607421875,
0.018341064453125,
-0.01336669921875,
0.034210205078125,
-0.0008740425109863281,
0.0030517578125,
0.0298614501953125,
-0.015899658203125,
0.0283203125,
0.004276275634765625,
-0.01099395751953125,
-0.024993896484375,
-0.0243377685546875,
-0.018707275390625,
0.0276641845703125,
-0.049713134765625,
-0.0038547515869140625,
-0.03271484375,
-0.01885986328125,
-0.0111236572265625,
-0.06817626953125,
0.008148193359375,
0.0204315185546875,
0.04998779296875,
-0.07489013671875,
0.09051513671875,
-0.0229949951171875,
-0.00341796875,
0.01013946533203125,
0.001010894775390625,
-0.05413818359375,
0.00943756103515625,
0.029327392578125,
-0.00464630126953125,
0.0294647216796875,
-0.042266845703125,
-0.07781982421875,
0.006313323974609375,
0.1053466796875,
-0.00041747093200683594,
-0.00811004638671875,
0.0289459228515625,
-0.00010222196578979492,
-0.0193939208984375,
0.018798828125,
0.021514892578125,
-0.0011873245239257812,
0.0003142356872558594,
0.00754547119140625,
0.0222625732421875,
-0.04010009765625,
0.0204620361328125,
0.0022735595703125,
-0.038787841796875,
0.01397705078125,
0.0816650390625,
0.028045654296875,
0.015960693359375,
-0.0213165283203125,
-0.00799560546875,
-0.03338623046875,
-0.00818634033203125,
0.005764007568359375,
0.006702423095703125,
-0.06658935546875,
-0.00218963623046875,
0.025360107421875,
-0.0311431884765625,
-0.006603240966796875,
-0.010833740234375,
0.03643798828125,
0.005558013916015625,
-0.048004150390625,
0.047576904296875,
-0.05133056640625,
-0.00801849365234375,
0.0208740234375,
0.060028076171875,
-0.0161590576171875,
0.05523681640625,
-0.0372314453125,
0.03826904296875,
-0.023406982421875,
0.01320648193359375,
-0.011260986328125,
-0.004276275634765625,
0.0247344970703125,
0.015472412109375,
0.01251220703125,
-0.0272369384765625,
0.00984954833984375,
0.028533935546875,
-0.0277252197265625,
0.0010671615600585938,
0.01702880859375,
0.08953857421875,
0.00211334228515625,
-0.01515960693359375,
0.01519012451171875,
0.00909423828125,
0.01300048828125,
0.009613037109375,
0.04901123046875,
0.016815185546875,
-0.0178070068359375,
0.04986572265625,
-0.01531219482421875,
-0.025299072265625,
-0.0235595703125,
-0.01007843017578125,
0.0034847259521484375,
0.05413818359375,
0.0171661376953125,
-0.0261077880859375,
-0.020294189453125,
-0.016204833984375,
0.016387939453125,
-0.02447509765625,
-0.0224456787109375,
-0.0007028579711914062,
0.004482269287109375,
-0.01386260986328125,
0.01090240478515625,
-0.0008478164672851562,
0.01342010498046875,
-0.0272979736328125,
-0.00560760498046875,
-0.037933349609375,
-0.032989501953125,
-0.01186370849609375,
0.0234832763671875,
-0.017974853515625,
0.02178955078125,
0.0117034912109375,
-0.01287078857421875,
-0.000469207763671875,
-0.0008482933044433594,
0.01331329345703125,
0.01432037353515625,
0.00901031494140625,
0.004512786865234375,
-0.0158538818359375,
0.032379150390625,
-0.036376953125,
-0.0206298828125,
-0.046722412109375,
0.0123291015625,
0.01090240478515625,
0.015289306640625,
-0.04217529296875,
0.006015777587890625,
-0.007843017578125,
0.005657196044921875,
0.022003173828125,
0.037322998046875,
-0.0165252685546875,
-0.00931549072265625,
-0.02496337890625,
0.004283905029296875,
-0.040771484375,
-0.05078125,
0.0011453628540039062,
0.049407958984375,
0.042724609375,
0.01508331298828125,
0.0233154296875,
0.040618896484375,
0.09912109375,
0.0286407470703125,
0.0181427001953125,
-0.00670623779296875,
-0.0021572113037109375,
-0.03564453125,
-0.013885498046875,
-0.04327392578125,
0.04425048828125,
-0.12457275390625,
-0.00882720947265625,
0.0648193359375,
-0.01708984375,
-0.00795745849609375,
-0.0185546875,
0.0028171539306640625,
0.029266357421875,
-0.0069122314453125,
-0.0210723876953125,
-0.01220703125,
-0.01386260986328125,
0.0174713134765625,
-0.0178680419921875,
-0.01342010498046875,
-0.04205322265625,
0.02874755859375,
0.03741455078125,
-0.0174102783203125,
0.0224151611328125,
0.034881591796875,
-0.0050048828125,
-0.002346038818359375,
-0.00579833984375,
-0.01029205322265625,
0.02947998046875,
0.009185791015625,
0.004291534423828125,
0.005847930908203125,
-0.01031494140625,
0.0028781890869140625,
0.0010042190551757812,
-0.01080322265625,
0.0239105224609375,
0.03399658203125,
-0.048858642578125,
-0.005405426025390625,
0.005970001220703125,
0.0555419921875,
0.010101318359375,
0.00022864341735839844,
-0.006290435791015625,
0.040008544921875,
0.030517578125,
-0.0760498046875,
0.0491943359375,
-0.03814697265625,
0.08905029296875,
0.0797119140625,
-0.0071868896484375,
0.00839996337890625,
0.0019989013671875,
-0.0308685302734375,
-0.0209503173828125,
0.00901031494140625,
-0.0193634033203125,
-0.019439697265625,
-0.05194091796875,
-0.005794525146484375,
-0.0204620361328125,
-0.0092315673828125,
-0.059539794921875,
-0.03857421875,
-0.034454345703125,
-0.0347900390625,
-0.06585693359375,
0.01113128662109375,
-0.0286712646484375,
-0.041839599609375,
-0.01287078857421875,
-0.0237579345703125,
-0.0172576904296875,
0.017547607421875,
-0.006134033203125,
0.0036067962646484375,
-0.02777099609375,
0.003185272216796875,
0.01404571533203125,
-0.035491943359375,
-0.03411865234375,
-0.0093994140625,
0.017547607421875,
0.002597808837890625,
0.0274505615234375,
-0.0165863037109375,
0.0195159912109375,
-0.00960540771484375,
0.054840087890625,
0.047515869140625,
-0.023040771484375,
0.005645751953125,
-0.0194244384765625,
0.00519561767578125,
0.004894256591796875,
-0.016815185546875,
0.0063323974609375,
0.04510498046875,
-0.0283660888671875,
0.00946044921875,
-0.0650634765625,
-0.0135650634765625,
-0.050506591796875,
0.072509765625,
0.08697509765625,
-0.0250701904296875,
-0.0097198486328125,
-0.043670654296875,
0.01099395751953125,
-0.03546142578125,
-0.03570556640625,
0.0288238525390625,
0.0181732177734375,
-0.01507568359375,
-0.0133819580078125,
0.007114410400390625,
-0.01178741455078125,
-0.00867462158203125,
-0.00856781005859375,
-0.00498199462890625,
0.031036376953125,
-0.005725860595703125,
-0.0002028942108154297,
-0.004741668701171875,
0.038238525390625,
0.004909515380859375,
0.04815673828125,
0.024444580078125,
0.040679931640625,
0.01507568359375,
-0.00908660888671875,
-0.043670654296875,
-0.036041259765625,
0.045013427734375,
-0.0137176513671875,
0.004016876220703125,
-0.034454345703125,
-0.0274200439453125,
-0.013824462890625,
0.05780029296875,
-0.0044708251953125,
-0.04156494140625,
-0.0246124267578125,
0.0011606216430664062,
-0.006122589111328125,
-0.0074310302734375,
-0.00801849365234375,
-0.0001361370086669922,
-0.035308837890625,
-0.01061248779296875,
0.01305389404296875,
-0.0411376953125,
0.01026153564453125,
-0.0718994140625,
-0.0218048095703125,
-0.0009336471557617188,
0.0114288330078125,
-0.00021255016326904297,
0.0122222900390625,
0.033538818359375,
0.0245208740234375,
0.0109710693359375,
0.0273284912109375,
-0.05712890625,
-0.06878662109375,
0.0002894401550292969,
-0.06683349609375,
0.06939697265625,
-0.00415802001953125,
0.0767822265625,
-0.028533935546875,
0.03985595703125,
0.0035953521728515625,
0.025909423828125,
-0.0158843994140625,
-0.0029850006103515625,
-0.0169219970703125,
0.0014219284057617188,
0.0032558441162109375,
-0.01776123046875,
0.008087158203125,
-0.06634521484375,
-0.07427978515625,
-0.10626220703125,
-0.045318603515625,
0.00830078125,
-0.00841522216796875,
-0.0289764404296875,
-0.017181396484375,
-0.0172271728515625,
-0.04302978515625,
-0.0140838623046875,
-0.036865234375,
-0.0144500732421875,
-0.01360321044921875,
-0.01971435546875,
0.09014892578125,
0.03485107421875,
0.0230865478515625,
-0.0135040283203125,
0.0628662109375,
-0.02093505859375,
-0.051666259765625,
-0.07476806640625,
-0.00298309326171875,
0.035369873046875,
-0.0268707275390625,
0.010223388671875,
0.0016002655029296875,
-0.032745361328125,
0.0379638671875,
0.0045928955078125,
-0.0033779144287109375,
-0.0177001953125,
0.041473388671875,
0.0009927749633789062,
-0.01354217529296875,
0.007343292236328125,
0.002155303955078125,
-0.0002741813659667969,
0.0207366943359375,
-0.041656494140625,
0.022613525390625,
-0.045135498046875,
0.029022216796875,
0.004302978515625,
-0.01334381103515625,
-0.0665283203125,
-0.052032470703125,
0.008026123046875,
0.0092315673828125,
0.051544189453125,
0.04180908203125,
-0.006999969482421875,
0.0538330078125,
0.03656005859375,
0.01354217529296875,
0.0015420913696289062,
0.034423828125,
-0.0065765380859375,
0.059600830078125,
-0.01116180419921875,
0.0211181640625,
-0.01383209228515625,
0.0019702911376953125,
0.026519775390625,
0.0197906494140625,
-0.0257568359375,
-0.0157623291015625,
-0.0208892822265625,
-0.049560546875,
-0.0322265625,
-0.017730712890625,
0.01473236083984375,
0.04058837890625,
0.00876617431640625,
-0.0205078125,
-0.046966552734375,
0.035736083984375,
-0.04736328125,
0.033203125,
0.0263214111328125,
-0.0201263427734375,
0.04107666015625,
-0.0269317626953125,
0.035064697265625,
-0.01397705078125,
-0.0135040283203125,
0.03424072265625,
0.03717041015625,
0.02471923828125,
0.01515960693359375,
-0.00006252527236938477,
-0.040283203125,
0.03448486328125,
-0.013763427734375,
-0.0196990966796875,
-0.021881103515625,
0.0031871795654296875,
0.02056884765625,
-0.0360107421875,
-0.0108642578125,
0.0195159912109375,
-0.007602691650390625,
-0.0211639404296875,
-0.0003898143768310547,
0.0335693359375,
0.007190704345703125,
-0.01580810546875,
-0.00615692138671875,
0.0217132568359375,
0.04364013671875,
-0.028656005859375,
-0.0015268325805664062,
-0.0166168212890625,
-0.00424957275390625,
0.0057830810546875,
-0.047027587890625,
0.00926971435546875,
0.017791748046875,
0.0007271766662597656,
-0.06329345703125,
-0.0504150390625,
0.04791259765625,
0.07586669921875,
-0.03509521484375,
-0.023590087890625,
0.029327392578125,
0.01055908203125,
-0.00897216796875,
-0.041107177734375,
0.01494598388671875,
-0.0139007568359375,
0.00704193115234375,
-0.0029277801513671875,
-0.0404052734375,
-0.0250244140625,
-0.0034122467041015625,
-0.019805908203125,
-0.0264892578125,
0.04718017578125,
0.034271240234375,
-0.03582763671875,
-0.01885986328125,
-0.01222991943359375,
0.021453857421875,
0.0009002685546875,
0.0411376953125,
-0.021484375,
0.0416259765625,
-0.00665283203125,
0.0791015625,
0.0147857666015625,
0.0051116943359375,
0.03375244140625,
0.0155792236328125,
0.0214385986328125,
0.003971099853515625,
-0.01953125,
-0.0291900634765625,
-0.01096343994140625,
-0.04486083984375,
-0.0028820037841796875,
0.0028076171875,
0.0197601318359375,
0.016021728515625,
0.022552490234375,
0.0177154541015625,
0.0146636962890625,
-0.0263671875,
0.0085296630859375,
-0.019989013671875,
0.03900146484375,
-0.049774169921875,
-0.0165557861328125,
0.004306793212890625,
-0.0138397216796875,
-0.006061553955078125,
0.0122833251953125,
-0.00762939453125,
-0.0159454345703125,
0.0156707763671875,
-0.014892578125,
0.007213592529296875,
0.0031337738037109375,
0.009033203125,
0.00843048095703125,
-0.01062774658203125,
0.033966064453125,
0.033233642578125,
0.0333251953125,
0.031707763671875,
0.0101165771484375,
-0.003108978271484375,
0.00844573974609375,
0.0142059326171875,
-0.01067352294921875,
0.0099639892578125,
-0.005542755126953125,
-0.0032291412353515625,
0.0546875,
0.0648193359375,
0.07574462890625,
-0.0867919921875,
0.029754638671875,
0.028717041015625,
-0.0188446044921875,
0.033966064453125,
0.01190185546875,
-0.0191497802734375,
-0.03533935546875,
0.036468505859375,
-0.08160400390625,
-0.0243377685546875,
-0.002796173095703125,
-0.0155029296875,
-0.006877899169921875,
-0.0251007080078125,
0.019439697265625,
0.0012454986572265625,
-0.07879638671875,
0.01398468017578125,
0.057342529296875,
-0.02972412109375,
-0.022857666015625,
0.002288818359375,
-0.0250701904296875,
-0.021148681640625,
-0.0689697265625,
-0.038970947265625,
-0.036529541015625,
-0.018218994140625,
-0.017730712890625,
-0.006473541259765625,
0.03912353515625,
0.05419921875,
-0.0205841064453125,
-0.0128631591796875,
0.04376220703125,
-0.042633056640625,
0.06976318359375,
-0.001987457275390625,
-0.0175323486328125,
0.0306549072265625,
-0.0142669677734375,
-0.019805908203125,
-0.005397796630859375,
0.055908203125,
0.00440216064453125,
0.026397705078125,
0.064208984375,
-0.042022705078125,
-0.00714874267578125,
0.058563232421875,
0.03369140625,
-0.03955078125,
-0.00022292137145996094,
0.0026226043701171875,
-0.05609130859375,
-0.0265045166015625,
-0.0017309188842773438,
-0.0233612060546875,
0.0202484130859375,
-0.00604248046875,
-0.07183837890625,
0.066162109375,
-0.01515960693359375,
0.043365478515625,
0.01088714599609375,
-0.0012607574462890625,
-0.005504608154296875,
-0.0185394287109375,
-0.0208587646484375,
0.029205322265625,
-0.005489349365234375,
0.0063629150390625,
-0.0511474609375,
-0.007965087890625,
-0.00860595703125,
-0.003215789794921875,
0.05157470703125,
0.0108642578125,
-0.0631103515625,
-0.026611328125,
0.03314208984375,
0.0599365234375,
0.033843994140625,
0.04229736328125,
0.026763916015625,
0.0251922607421875,
0.056396484375,
-0.005023956298828125,
0.03143310546875,
-0.0281524658203125,
0.0148468017578125,
0.053680419921875,
0.01062774658203125,
0.01175689697265625,
0.00856781005859375,
-0.004425048828125,
-0.03936767578125,
0.006916046142578125,
0.038909912109375,
-0.042083740234375,
0.0254364013671875,
0.0288848876953125,
0.0146331787109375,
-0.007171630859375,
-0.008636474609375,
-0.0163421630859375,
0.038055419921875,
-0.00007611513137817383,
0.01580810546875,
0.0138092041015625,
0.02264404296875,
0.0258941650390625,
-0.0220947265625,
0.005420684814453125,
0.0214080810546875,
-0.0300445556640625,
0.004459381103515625,
0.0167999267578125,
0.02716064453125,
-0.00847625732421875,
-0.0183258056640625,
0.0006532669067382812,
0.01340484619140625,
-0.01103973388671875,
-0.048797607421875,
0.004604339599609375,
-0.003414154052734375,
0.0499267578125,
0.01898193359375,
0.0645751953125,
-0.06915283203125,
-0.0634765625,
-0.0234222412109375,
0.0166015625,
0.02783203125,
0.0179290771484375,
0.00804901123046875,
0.040313720703125,
-0.031402587890625,
0.01105499267578125,
-0.03546142578125,
0.0012197494506835938,
0.0128631591796875,
0.005218505859375,
0.0014715194702148438,
0.04437255859375,
0.048248291015625,
0.0020904541015625,
-0.007720947265625,
0.06488037109375,
0.001678466796875,
0.01220703125,
-0.0234527587890625,
-0.040985107421875,
-0.0008873939514160156,
0.030059814453125,
-0.021026611328125,
0.0102081298828125,
0.0474853515625,
0.021820068359375,
-0.06829833984375,
-0.02716064453125,
0.0126495361328125,
-0.041259765625,
0.01373291015625,
-0.0287933349609375,
0.01186370849609375,
-0.00970458984375,
-0.02166748046875,
-0.01110076904296875,
0.002483367919921875,
0.030120849609375,
-0.037078857421875,
0.06695556640625,
-0.0167236328125,
-0.052703857421875,
0.00681304931640625,
-0.030364990234375,
0.11138916015625,
-0.0310516357421875,
-0.0321044921875,
0.020660400390625,
-0.029266357421875,
-0.03857421875,
0.001392364501953125,
0.015899658203125,
-0.0216827392578125,
0.03619384765625,
0.02276611328125,
-0.0230712890625,
0.0174560546875,
0.0151519775390625,
-0.004131317138671875,
-0.040985107421875,
0.0190277099609375,
-0.0257568359375,
-0.026824951171875,
-0.035125732421875,
-0.058685302734375,
0.08001708984375,
0.017547607421875,
0.08282470703125,
-0.061767578125,
0.048248291015625,
0.00600433349609375,
-0.018310546875,
-0.02581787109375,
-0.01953125,
0.035888671875,
-0.0341796875,
-0.03619384765625,
0.0016765594482421875,
0.0029964447021484375,
0.0244293212890625,
0.0055999755859375,
-0.0165252685546875,
-0.035003662109375,
0.01329803466796875,
0.02545166015625,
0.08624267578125,
0.00711822509765625,
-0.044586181640625,
-0.0413818359375,
-0.07269287109375,
0.006145477294921875,
0.0002841949462890625,
-0.0079498291015625,
-0.008880615234375,
0.0382080078125,
0.058929443359375,
0.03509521484375,
0.0372314453125,
-0.0247344970703125,
0.06414794921875,
0.0460205078125,
-0.038177490234375,
-0.041168212890625,
0.0130462646484375,
-0.0177459716796875,
0.013092041015625,
-0.00720977783203125,
0.0572509765625,
0.004428863525390625,
-0.0357666015625,
0.010589599609375,
-0.0127105712890625,
0.0158538818359375,
-0.04638671875,
-0.00658416748046875,
0.0090484619140625,
0.01690673828125,
0.0040740966796875,
0.0045013427734375,
-0.010009765625,
-0.0237884521484375,
0.01378631591796875,
0.0240478515625,
0.019866943359375,
0.0195770263671875,
-0.00817108154296875,
-0.017608642578125,
0.02740478515625,
0.00914764404296875,
-0.0443115234375,
0.0450439453125,
-0.0242462158203125,
-0.0006480216979980469,
-0.0029754638671875,
-0.002559661865234375,
-0.0211181640625,
-0.02880859375,
-0.0450439453125,
-0.07501220703125,
-0.056976318359375,
0.07366943359375,
-0.039825439453125,
0.027313232421875,
0.0307769775390625,
-0.0270843505859375,
-0.01546478271484375,
0.0052490234375,
0.028656005859375,
0.0555419921875,
0.007747650146484375,
-0.017181396484375,
0.00958251953125,
-0.0012359619140625,
-0.018829345703125,
-0.0440673828125,
0.01058197021484375,
-0.055206298828125,
-0.01134490966796875,
-0.03802490234375,
0.046630859375,
0.043853759765625,
-0.0128326416015625,
-0.034912109375,
-0.004695892333984375,
0.0029544830322265625,
-0.0438232421875,
0.0160064697265625,
0.01302337646484375,
-0.0096588134765625,
-0.00939178466796875,
0.0157318115234375,
-0.0264892578125,
0.0186004638671875,
-0.007373809814453125,
-0.01387786865234375,
0.0292510986328125,
-0.0173492431640625,
0.00582122802734375,
-0.01019287109375,
0.0428466796875,
0.02716064453125,
-0.035247802734375,
-0.0014333724975585938,
-0.0236968994140625,
0.031402587890625,
0.036102294921875,
-0.004413604736328125,
-0.037322998046875,
0.0229339599609375,
-0.024017333984375,
-0.01131439208984375,
-0.014434814453125,
-0.009674072265625,
-0.003936767578125,
0.053131103515625,
0.0283660888671875,
0.01190185546875,
-0.0164947509765625,
0.0195770263671875,
0.0024433135986328125,
-0.00894927978515625,
0.006626129150390625,
-0.001735687255859375,
-0.0261688232421875,
0.0003192424774169922,
0.00269317626953125,
-0.007965087890625,
-0.00494384765625,
-0.01514434814453125,
-0.02838134765625,
-0.0027370452880859375,
-0.001384735107421875,
0.003002166748046875,
-0.017822265625,
0.000007867813110351562,
0.022216796875,
-0.0228729248046875,
-0.00833892822265625,
0.0100555419921875,
-0.004100799560546875,
0.004749298095703125,
0.028472900390625,
-0.0010089874267578125,
0.0196075439453125,
0.0033321380615234375,
-0.01446533203125,
0.0202789306640625,
-0.0396728515625,
0.03167724609375,
-0.004547119140625,
0.009185791015625,
0.00669097900390625,
-0.00608062744140625,
0.0288848876953125,
0.02801513671875,
-0.0028133392333984375,
-0.0079498291015625,
-0.022430419921875,
-0.0021991729736328125,
-0.02178955078125,
-0.0254058837890625,
0.0268096923828125,
-0.02825927734375,
-0.0190277099609375,
0.015960693359375,
-0.06439208984375,
0.0203704833984375,
0.024078369140625,
-0.030059814453125,
-0.019256591796875,
-0.013214111328125,
-0.0297088623046875,
-0.00556182861328125,
0.007843017578125
] |
1792b2bdfd1b1f788197fd3ca5c686a7028967ab
|
Wordpress Stackexchange
Q: Get Custom post with ID How do I get a custom post by its ID? I want to display a single post from custom post using its ID. I tried 'post_type' => 'homepage', 'post_id' => '717' but it didnt work.
Thanks
A: You simply don't need to specify a post_type when calling get_post(). The ID for any sort of post is unique among the whole DB-posts table. So if you're calling a post with ID = 17
$id = 17;
$post = get_post( $id );
then you'll simply get this single post.
Note, according the Codex, when using get_post
You must pass a variable containing an integer (e.g. $id). A literal integer (e.g. get_post(7)) will cause a fatal error (Only variables can be passed for reference or Cannot pass parameter 1 by reference).
|
Q: Get Custom post with ID How do I get a custom post by its ID? I want to display a single post from custom post using its ID. I tried 'post_type' => 'homepage', 'post_id' => '717' but it didnt work.
Thanks
A: You simply don't need to specify a post_type when calling get_post(). The ID for any sort of post is unique among the whole DB-posts table. So if you're calling a post with ID = 17
$id = 17;
$post = get_post( $id );
then you'll simply get this single post.
Note, according the Codex, when using get_post
You must pass a variable containing an integer (e.g. $id). A literal integer (e.g. get_post(7)) will cause a fatal error (Only variables can be passed for reference or Cannot pass parameter 1 by reference).
|
wordpress
|
{
"language": "en",
"length": 134,
"provenance": "stackexchange_00019.jsonl.gz:421437",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57224"
}
|
[
0.056396484375,
-0.01023101806640625,
0.0198974609375,
-0.005481719970703125,
0.006771087646484375,
-0.01154327392578125,
0.04791259765625,
-0.029083251953125,
-0.0360107421875,
0.0039215087890625,
-0.04779052734375,
0.00826263427734375,
-0.045928955078125,
-0.023712158203125,
0.0379638671875,
-0.05426025390625,
0.047332763671875,
-0.00302886962890625,
0.044769287109375,
-0.013946533203125,
0.0277557373046875,
-0.0018672943115234375,
0.0224151611328125,
0.068115234375,
0.053619384765625,
-0.040130615234375,
0.0229034423828125,
-0.00835418701171875,
0.0275421142578125,
-0.00691986083984375,
0.0283050537109375,
-0.00775146484375,
0.0220184326171875,
-0.0163726806640625,
0.0233917236328125,
0.0194549560546875,
0.00981903076171875,
0.0036029815673828125,
0.00991058349609375,
0.01708984375,
0.0106201171875,
0.01373291015625,
0.009368896484375,
-0.004550933837890625,
-0.02093505859375,
-0.0305023193359375,
0.0019779205322265625,
-0.0200958251953125,
0.01512908935546875,
-0.00925445556640625,
0.0085906982421875,
0.0296478271484375,
0.02789306640625,
-0.01427459716796875,
-0.021392822265625,
-0.031707763671875,
0.0153350830078125,
-0.043365478515625,
0.0538330078125,
-0.042236328125,
-0.042755126953125,
-0.03619384765625,
0.0582275390625,
0.01213836669921875,
-0.0030994415283203125,
0.016998291015625,
0.0419921875,
0.00966644287109375,
-0.05059814453125,
-0.022796630859375,
0.020599365234375,
-0.0234375,
0.0247955322265625,
-0.0288238525390625,
0.003509521484375,
-0.053070068359375,
0.017822265625,
-0.0296478271484375,
-0.0174407958984375,
0.0157928466796875,
-0.036865234375,
-0.033111572265625,
-0.0548095703125,
-0.00470733642578125,
-0.017974853515625,
0.023895263671875,
-0.0301971435546875,
-0.005962371826171875,
0.00036835670471191406,
-0.0296478271484375,
-0.01509857177734375,
-0.01351165771484375,
-0.00782012939453125,
0.01378631591796875,
-0.0340576171875,
-0.021453857421875,
0.009857177734375,
0.040802001953125,
-0.0164337158203125,
0.0142669677734375,
-0.0108642578125,
-0.034698486328125,
0.0338134765625,
-0.033905029296875,
-0.0026721954345703125,
0.00322723388671875,
0.0293121337890625,
0.04931640625,
0.03363037109375,
0.0238189697265625,
-0.01187896728515625,
0.037567138671875,
0.005767822265625,
0.004222869873046875,
-0.051483154296875,
0.006591796875,
-0.0285797119140625,
-0.033477783203125,
-0.02337646484375,
-0.0079345703125,
0.0153961181640625,
0.042633056640625,
0.018524169921875,
-0.0200958251953125,
-0.0160980224609375,
-0.000316619873046875,
-0.01953125,
-0.052764892578125,
0.00864410400390625,
-0.0185546875,
-0.04901123046875,
0.01183319091796875,
0.096923828125,
0.033477783203125,
0.03900146484375,
-0.00743865966796875,
-0.0199737548828125,
-0.00722503662109375,
-0.0201568603515625,
0.0216217041015625,
-0.01142120361328125,
-0.0302581787109375,
0.02178955078125,
-0.01276397705078125,
-0.0265960693359375,
0.035003662109375,
0.0174102783203125,
-0.009246826171875,
-0.03411865234375,
-0.0703125,
-0.03326416015625,
0.01047515869140625,
-0.00968170166015625,
0.0166473388671875,
0.045989990234375,
-0.01456451416015625,
0.038330078125,
-0.04010009765625,
0.0335693359375,
-0.01910400390625,
0.054443359375,
0.00998687744140625,
-0.005886077880859375,
0.03741455078125,
0.0150909423828125,
-0.020477294921875,
-0.026031494140625,
-0.0014467239379882812,
0.02362060546875,
0.059967041015625,
0.01454925537109375,
-0.0204620361328125,
-0.00450897216796875,
-0.0019397735595703125,
-0.0120391845703125,
-0.00787353515625,
-0.0120849609375,
0.00733184814453125,
0.019500732421875,
0.038726806640625,
-0.0041961669921875,
-0.033660888671875,
0.01143646240234375,
0.0144805908203125,
-0.0670166015625,
0.0860595703125,
-0.0022411346435546875,
0.0765380859375,
0.01476287841796875,
0.0005502700805664062,
0.01465606689453125,
0.028839111328125,
-0.054229736328125,
0.01012420654296875,
0.0030193328857421875,
-0.0029888153076171875,
-0.033966064453125,
-0.0176239013671875,
-0.011810302734375,
0.01788330078125,
0.0006246566772460938,
-0.03564453125,
0.026580810546875,
0.01055145263671875,
-0.0472412109375,
-0.0004992485046386719,
-0.028778076171875,
0.0203399658203125,
-0.0189361572265625,
0.01055908203125,
0.0277099609375,
-0.0062408447265625,
-0.0176849365234375,
-0.03369140625,
-0.0242462158203125,
0.011138916015625,
-0.013580322265625,
0.01105499267578125,
-0.043243408203125,
0.006824493408203125,
-0.051544189453125,
-0.0438232421875,
-0.050750732421875,
0.055023193359375,
0.07427978515625,
0.01284027099609375,
-0.00745391845703125,
-0.0156402587890625,
0.07080078125,
0.024169921875,
-0.045562744140625,
0.0003502368927001953,
0.0389404296875,
0.01320648193359375,
-0.030731201171875,
0.00237274169921875,
-0.0102996826171875,
-0.0753173828125,
-0.0002627372741699219,
0.0684814453125,
0.01404571533203125,
-0.00299835205078125,
0.005767822265625,
0.041229248046875,
0.00307464599609375,
-0.007183074951171875,
0.0210723876953125,
-0.0033111572265625,
0.01461029052734375,
0.0343017578125,
-0.02593994140625,
0.00597381591796875,
0.0243377685546875,
-0.02423095703125,
0.00267791748046875,
0.040313720703125,
-0.0202484130859375,
0.00202178955078125,
0.0017223358154296875,
0.0002701282501220703,
-0.0054168701171875,
0.01490020751953125,
0.0162811279296875,
-0.005565643310546875,
0.0020618438720703125,
0.03619384765625,
0.043182373046875,
0.046112060546875,
-0.0347900390625,
0.005138397216796875,
0.00267791748046875,
0.051788330078125,
-0.01104736328125,
0.003154754638671875,
0.0301971435546875,
-0.0183868408203125,
-0.0251007080078125,
-0.0011358261108398438,
0.007602691650390625,
-0.00861358642578125,
0.01331329345703125,
0.027618408203125,
-0.0271453857421875,
-0.004230499267578125,
0.0088043212890625,
-0.04302978515625,
-0.01100921630859375,
0.0445556640625,
-0.0025787353515625,
-0.0182952880859375,
-0.0032482147216796875,
0.0732421875,
-0.0166168212890625,
0.050811767578125,
-0.022247314453125,
0.00228118896484375,
0.0276947021484375,
-0.0704345703125,
0.0543212890625,
-0.04241943359375,
0.03875732421875,
0.06378173828125,
-0.011871337890625,
0.0289459228515625,
0.005279541015625,
-0.0024471282958984375,
0.01509857177734375,
0.0139617919921875,
-0.010101318359375,
-0.0265655517578125,
-0.018951416015625,
0.01412200927734375,
0.019439697265625,
0.10955810546875,
-0.033935546875,
-0.0557861328125,
0.01238250732421875,
0.042938232421875,
-0.0751953125,
-0.1064453125,
0.042388916015625,
-0.0347900390625,
-0.03741455078125,
-0.0518798828125,
-0.0253448486328125,
0.01256561279296875,
-0.05426025390625,
-0.0142822265625,
0.015472412109375,
0.006195068359375,
-0.04962158203125,
-0.0232391357421875,
-0.06787109375,
-0.013275146484375,
-0.0159454345703125,
0.00934600830078125,
0.0040283203125,
0.044921875,
0.0076141357421875,
-0.03955078125,
0.0226287841796875,
0.07427978515625,
-0.03314208984375,
-0.00939178466796875,
0.0031566619873046875,
-0.01129150390625,
0.00457000732421875,
0.01549530029296875,
-0.0271148681640625,
0.01244354248046875,
-0.006153106689453125,
-0.035614013671875,
-0.041961669921875,
-0.0044403076171875,
0.013031005859375,
0.02069091796875,
0.03765869140625,
0.06085205078125,
0.07342529296875,
-0.0005826950073242188,
-0.0229339599609375,
-0.0355224609375,
-0.05078125,
-0.008209228515625,
0.03314208984375,
0.017608642578125,
-0.05078125,
0.036224365234375,
-0.0085906982421875,
-0.0084228515625,
-0.0119476318359375,
-0.0263824462890625,
0.0654296875,
0.014251708984375,
0.03570556640625,
0.01033782958984375,
0.002292633056640625,
-0.011993408203125,
0.0186920166015625,
-0.0034351348876953125,
0.017578125,
-0.0105133056640625,
-0.002140045166015625,
-0.036041259765625,
-0.06451416015625,
0.064208984375,
0.00606536865234375,
0.0054473876953125,
-0.0202789306640625,
-0.0487060546875,
0.0223388671875,
0.115966796875,
-0.028717041015625,
-0.01001739501953125,
0.01056671142578125,
-0.0023975372314453125,
-0.0080718994140625,
-0.03997802734375,
-0.0640869140625,
-0.0163116455078125,
-0.017425537109375,
-0.0067291259765625,
-0.017242431640625,
-0.012664794921875,
-0.0244903564453125,
0.03179931640625,
-0.03192138671875,
-0.020263671875,
0.028717041015625,
-0.03460693359375,
0.01250457763671875,
0.023193359375,
0.00237274169921875,
0.0203399658203125,
-0.0179443359375,
-0.0233154296875,
-0.05206298828125,
-0.01233673095703125,
0.0025959014892578125,
0.014556884765625,
0.007595062255859375,
-0.005931854248046875,
0.00888824462890625,
0.039337158203125,
0.01190185546875,
0.031890869140625,
-0.0007891654968261719,
0.005828857421875,
-0.003173828125,
-0.015380859375,
0.00598907470703125,
-0.03399658203125,
-0.0218353271484375,
-0.0243072509765625,
-0.002445220947265625,
0.035552978515625,
-0.03680419921875,
0.0149383544921875,
-0.038787841796875,
0.0011758804321289062,
-0.046478271484375,
-0.0214691162109375,
-0.00838470458984375,
0.0166015625,
-0.00914764404296875,
-0.0014963150024414062,
-0.0399169921875,
-0.06109619140625,
0.06268310546875,
0.0316162109375,
-0.004703521728515625,
-0.0166168212890625,
0.088623046875,
0.01120758056640625,
-0.04052734375,
-0.049835205078125,
0.01904296875,
0.046112060546875,
-0.0030670166015625,
0.043853759765625,
0.041015625,
-0.0249786376953125,
0.032928466796875,
0.020172119140625,
-0.01959228515625,
0.0129241943359375,
0.07904052734375,
-0.0089569091796875,
-0.0078887939453125,
0.01013946533203125,
-0.041900634765625,
-0.0011606216430664062,
0.049835205078125,
-0.02142333984375,
-0.0301361083984375,
0.0210418701171875,
0.061126708984375,
-0.08148193359375,
0.0572509765625,
-0.0258026123046875,
-0.056640625,
0.037384033203125,
-0.01120758056640625,
-0.0216064453125,
-0.022796630859375,
0.0181884765625,
0.00506591796875,
-0.0283660888671875,
0.01318359375,
0.041961669921875,
0.034942626953125,
0.01045989990234375,
0.020233154296875,
0.0537109375,
-0.0120391845703125,
0.0009908676147460938,
-0.004070281982421875,
0.052337646484375,
0.00589752197265625,
-0.060546875,
0.02801513671875,
-0.01120758056640625,
-0.0055999755859375,
0.0171356201171875,
-0.022430419921875,
0.0022983551025390625,
0.0298614501953125,
-0.011932373046875,
0.0118560791015625,
-0.0053253173828125,
0.01959228515625,
-0.0185546875,
-0.004638671875,
0.0152130126953125,
-0.0217437744140625,
0.0012359619140625,
0.04254150390625,
0.035736083984375,
0.01018524169921875,
-0.03448486328125,
0.04351806640625,
0.03643798828125,
0.0338134765625,
0.0090789794921875,
0.0014820098876953125,
-0.016357421875,
0.0146331787109375,
-0.03326416015625,
-0.04608154296875,
-0.0128021240234375,
0.01171112060546875,
0.06097412109375,
0.0246734619140625,
0.00478363037109375,
-0.01055145263671875,
-0.0261077880859375,
0.0005578994750976562,
0.045745849609375,
0.0280609130859375,
-0.04034423828125,
-0.01515960693359375,
0.01299285888671875,
0.0197296142578125,
0.0034332275390625,
0.001506805419921875,
0.019195556640625,
-0.01006317138671875,
0.041229248046875,
-0.0190277099609375,
0.01110076904296875,
-0.00728607177734375,
-0.005794525146484375,
0.0180816650390625,
-0.03924560546875,
-0.01232147216796875,
0.0099945068359375,
0.0257568359375,
-0.03173828125,
-0.0416259765625,
0.031494140625,
0.005084991455078125,
0.0589599609375,
-0.03204345703125,
-0.04754638671875,
0.0015287399291992188,
0.00649261474609375,
0.06121826171875,
0.028533935546875,
-0.020477294921875,
0.00246429443359375,
-0.050994873046875,
-0.011474609375,
0.030853271484375,
-0.0484619140625,
-0.02886962890625,
-0.025848388671875,
-0.02325439453125,
0.0222930908203125,
-0.0081024169921875,
0.0172119140625,
-0.025543212890625,
0.0167999267578125,
-0.0190887451171875,
0.041656494140625,
-0.0014438629150390625,
0.037353515625,
-0.0032100677490234375,
0.035400390625,
0.0235137939453125,
0.0245819091796875,
-0.0018405914306640625,
-0.027618408203125,
-0.00962066650390625,
-0.0120086669921875,
0.00605010986328125,
-0.006175994873046875,
0.065673828125,
-0.0206298828125,
-0.005279541015625,
0.002368927001953125,
-0.01093292236328125,
-0.0009908676147460938,
0.0018625259399414062,
-0.033935546875,
-0.00945281982421875,
-0.005035400390625,
-0.0216827392578125,
-0.0126953125,
-0.03619384765625,
-0.0292816162109375,
0.036956787109375,
0.02728271484375,
-0.00905609130859375,
-0.0266876220703125,
-0.0021152496337890625,
0.0198822021484375,
0.00799560546875,
0.0249481201171875,
0.08734130859375,
0.02972412109375,
0.052337646484375,
0.02197265625,
0.0243988037109375,
0.0247955322265625,
0.0411376953125,
-0.024169921875,
-0.042572021484375,
0.035491943359375,
0.0174407958984375,
-0.0274505615234375,
0.0103302001953125,
-0.018890380859375,
0.01067352294921875,
0.00191497802734375,
0.04571533203125,
-0.03704833984375,
0.02325439453125,
0.01477813720703125,
-0.0183563232421875,
0.0201416015625,
0.004619598388671875,
-0.0034122467041015625,
-0.008514404296875,
0.01132965087890625,
0.01248931884765625,
-0.00957489013671875,
0.00420379638671875,
0.01026153564453125,
0.01264190673828125,
-0.038330078125,
0.0557861328125,
-0.004405975341796875,
-0.0010690689086914062,
-0.01128387451171875,
0.01480865478515625,
-0.00707244873046875,
-0.0301361083984375,
0.0096282958984375,
-0.000583648681640625,
-0.01490020751953125,
-0.06561279296875,
0.0186767578125,
-0.00946044921875,
-0.004741668701171875,
0.059600830078125,
0.034332275390625,
-0.0082550048828125,
0.028289794921875,
0.01519012451171875,
0.00818634033203125,
-0.00876617431640625,
-0.048919677734375,
-0.01507568359375,
-0.032470703125,
0.007122039794921875,
0.05780029296875,
-0.0582275390625,
0.0245361328125,
0.004512786865234375,
-0.005649566650390625,
-0.0252532958984375,
-0.039581298828125,
0.1029052734375,
-0.02276611328125,
-0.0216827392578125,
0.016754150390625,
0.02685546875,
-0.00878143310546875,
-0.013671875,
0.000370025634765625,
-0.02655029296875,
0.0249176025390625,
-0.013427734375,
0.005126953125,
-0.00345611572265625,
-0.021026611328125,
-0.05364990234375,
0.048797607421875,
-0.0011091232299804688,
0.00626373291015625,
-0.007843017578125,
0.0231170654296875,
-0.0028209686279296875,
0.01285552978515625,
-0.047119140625,
0.0233154296875,
-0.0270843505859375,
0.03411865234375,
-0.06658935546875,
-0.006839752197265625,
-0.0208282470703125,
0.02215576171875,
0.0914306640625,
0.0212554931640625,
-0.0391845703125,
0.0097503662109375,
0.039794921875,
0.04296875,
-0.00850677490234375,
0.03729248046875,
0.0045623779296875,
0.051727294921875,
0.0802001953125,
-0.0265960693359375,
0.044158935546875,
0.031402587890625,
-0.017608642578125,
0.037322998046875,
0.0225372314453125,
0.006511688232421875,
0.0450439453125,
-0.061676025390625,
-0.04229736328125,
0.0282135009765625,
0.03131103515625,
-0.0203094482421875,
-0.00439453125,
0.047515869140625,
0.06634521484375,
-0.06732177734375,
-0.0107269287109375,
-0.042877197265625,
0.05462646484375,
0.0014362335205078125,
0.00902557373046875,
0.00222015380859375,
0.0220489501953125,
0.00433349609375,
-0.002376556396484375,
-0.00412750244140625,
0.029449462890625,
-0.01678466796875,
0.056976318359375,
0.0328369140625,
0.027618408203125,
-0.03668212890625,
0.0285797119140625,
0.013153076171875,
0.05938720703125,
-0.05999755859375,
0.01403045654296875,
0.0199432373046875,
-0.00128936767578125,
0.0202178955078125,
-0.043853759765625,
0.02716064453125,
0.025726318359375,
0.0003998279571533203,
-0.07757568359375,
0.022674560546875,
0.062255859375,
0.041290283203125,
-0.0002505779266357422,
-0.0196685791015625,
-0.0806884765625,
-0.0199737548828125,
-0.07049560546875,
0.01451873779296875,
0.0274810791015625,
0.056976318359375,
0.037841796875,
0.048736572265625,
0.006183624267578125,
-0.0258331298828125,
0.0258026123046875,
0.00998687744140625,
0.01209259033203125,
-0.027496337890625,
-0.004177093505859375,
-0.042236328125,
0.01214599609375,
0.02532958984375,
0.015106201171875,
-0.0007090568542480469,
0.01702880859375,
0.006099700927734375,
-0.01488494873046875,
-0.01338958740234375,
0.00661468505859375,
-0.0165557861328125,
0.0216217041015625,
-0.0218963623046875,
-0.01277923583984375,
-0.0107879638671875,
-0.03448486328125,
0.00267791748046875,
-0.00435638427734375,
0.033294677734375,
0.029449462890625,
0.07012939453125,
0.012451171875,
0.0038890838623046875,
0.03851318359375,
-0.0005154609680175781,
0.05389404296875,
0.036224365234375,
-0.0491943359375,
0.0006241798400878906,
-0.0225067138671875,
-0.03570556640625,
0.008453369140625,
0.033477783203125,
-0.007663726806640625,
0.0164642333984375,
-0.0202178955078125,
0.00693511962890625,
0.006084442138671875,
-0.0187225341796875,
0.0124969482421875,
0.0175628662109375,
0.01280975341796875,
0.00630950927734375,
-0.06768798828125,
-0.052734375,
0.004367828369140625,
-0.002529144287109375,
0.0152435302734375,
0.004566192626953125,
0.0516357421875,
0.0058746337890625,
-0.0601806640625,
0.0758056640625,
-0.11126708984375,
-0.0556640625,
0.04266357421875,
-0.003253936767578125,
0.0171051025390625,
0.01171875,
-0.028900146484375,
0.037353515625,
0.015228271484375,
-0.01459503173828125,
0.036590576171875,
-0.0079803466796875,
0.0012445449829101562,
-0.020355224609375,
0.0126495361328125,
-0.02227783203125,
0.001338958740234375,
-0.040283203125,
-0.04522705078125,
0.054443359375,
0.0254058837890625,
0.00644683837890625,
0.0211639404296875,
-0.004650115966796875,
-0.05487060546875,
0.041656494140625,
-0.06005859375,
0.06781005859375,
0.031768798828125,
-0.002231597900390625,
-0.0177154541015625,
-0.017120361328125,
-0.0264434814453125,
0.0157318115234375,
0.006683349609375,
0.017333984375,
-0.0026493072509765625,
-0.0144195556640625,
0.02008056640625,
-0.00997161865234375,
0.040191650390625,
-0.01483154296875,
0.013641357421875,
0.01274871826171875,
0.0185089111328125,
-0.0107574462890625,
-0.039825439453125,
-0.01349639892578125,
-0.0394287109375,
0.00206756591796875,
0.0059967041015625,
-0.0009908676147460938,
-0.01050567626953125,
0.0037326812744140625,
-0.003993988037109375,
0.02294921875,
-0.01305389404296875,
-0.0101318359375,
-0.0020313262939453125,
-0.036712646484375,
0.0182952880859375,
-0.0218963623046875,
0.01708984375,
0.00420379638671875,
0.041900634765625,
-0.03485107421875,
-0.0102691650390625,
-0.0004544258117675781,
0.0024738311767578125,
0.01617431640625,
0.021148681640625,
0.02337646484375,
-0.0256805419921875,
-0.03155517578125,
0.0635986328125,
0.0161590576171875,
0.07989501953125,
-0.00832366943359375,
-0.00908660888671875,
0.006229400634765625,
-0.0001271963119506836,
-0.035064697265625,
-0.06280517578125,
0.052032470703125,
-0.09967041015625,
-0.034210205078125,
-0.0309906005859375,
0.030242919921875,
0.0411376953125,
-0.0166015625,
-0.0159912109375,
0.027069091796875,
-0.021209716796875,
-0.026947021484375,
-0.0284271240234375,
0.003993988037109375,
0.007015228271484375,
-0.00811767578125,
-0.0038738250732421875,
-0.0222930908203125,
-0.0244598388671875,
0.02105712890625,
0.0094451904296875,
0.00664520263671875,
0.053558349609375,
0.007022857666015625,
-0.05517578125,
-0.0133514404296875,
-0.01444244384765625,
0.004993438720703125,
0.00473785400390625,
-0.01555633544921875,
0.00154876708984375,
0.00884246826171875,
-0.06573486328125,
-0.019134521484375,
0.0031948089599609375,
0.0509033203125,
-0.0258636474609375,
-0.036346435546875,
-0.0207672119140625,
-0.0034427642822265625,
0.0172271728515625,
0.07427978515625,
0.004375457763671875,
-0.040863037109375,
0.0273284912109375,
-0.0289764404296875,
-0.0673828125,
-0.00002276897430419922,
0.0322265625,
-0.0479736328125,
0.0037364959716796875,
0.0285797119140625,
-0.035430908203125,
0.002933502197265625,
0.006885528564453125,
-0.0545654296875,
0.0136260986328125,
-0.03204345703125,
-0.0263671875,
-0.07171630859375,
0.041839599609375,
0.0235137939453125,
-0.0276641845703125,
-0.001506805419921875,
-0.0173797607421875,
-0.0149993896484375,
0.012298583984375,
-0.03411865234375,
0.0234832763671875,
0.0210723876953125,
-0.0195465087890625,
0.011505126953125,
0.031097412109375,
0.034515380859375,
-0.00946807861328125,
-0.0209808349609375,
-0.0139617919921875,
0.020965576171875,
0.0002808570861816406,
0.012298583984375,
0.007457733154296875,
-0.0100555419921875,
-0.0038013458251953125,
0.0245513916015625,
0.0015354156494140625,
0.046478271484375,
0.00838470458984375,
0.0185699462890625,
-0.0215606689453125,
0.0086212158203125,
-0.0015478134155273438,
-0.02728271484375,
-0.00620269775390625,
0.01128387451171875,
-0.011749267578125,
-0.01605224609375,
0.0214996337890625,
0.04168701171875,
-0.007488250732421875,
0.01097869873046875
] |
22df4efccc42a4d06f48d955497fd4ea8f8c8b46
|
Wordpress Stackexchange
Q: How to remove "Super Admin" from All Users for those that are not a "Super Admin"? I would like to remove the filter at the top that says "Super Admin" for users that are not a "Super Admin". How do I go about doing this?
This screenshot shows what I am talking about:
A: This list of filters at the top of admin screens are called Views. You can manage views using the views_{$this->screen->id} filter. Where you'd replace {$this->screen->id} with the name of the screen you'd like to manage.
In order to filter the Users screen, you can try the following:
// filter the 'users' views
add_filter( "views_users", "wse57231_filter_user_views");
function wse57231_filter_user_views($views){
// This assumes the key for the role is 'super_admin'
// Is the current user not a "super_admin"?
if( !current_user_can('super_admin')){
// Remove the super_admin view from the list of views
unset($views['super_admin']);
}
return $views;
}
References:
* https://developer.wordpress.org/reference/hooks/views_this-screen-id/
* http://codex.wordpress.org/Function_Reference/current_user_can
Note: Based on the comments, it sounds like Super Admin is a custom role you've created. This is partially confusing because Super Admin is also the name of a special role when using WordPress Multisite.
|
Q: How to remove "Super Admin" from All Users for those that are not a "Super Admin"? I would like to remove the filter at the top that says "Super Admin" for users that are not a "Super Admin". How do I go about doing this?
This screenshot shows what I am talking about:
A: This list of filters at the top of admin screens are called Views. You can manage views using the views_{$this->screen->id} filter. Where you'd replace {$this->screen->id} with the name of the screen you'd like to manage.
In order to filter the Users screen, you can try the following:
// filter the 'users' views
add_filter( "views_users", "wse57231_filter_user_views");
function wse57231_filter_user_views($views){
// This assumes the key for the role is 'super_admin'
// Is the current user not a "super_admin"?
if( !current_user_can('super_admin')){
// Remove the super_admin view from the list of views
unset($views['super_admin']);
}
return $views;
}
References:
* https://developer.wordpress.org/reference/hooks/views_this-screen-id/
* http://codex.wordpress.org/Function_Reference/current_user_can
Note: Based on the comments, it sounds like Super Admin is a custom role you've created. This is partially confusing because Super Admin is also the name of a special role when using WordPress Multisite.
|
wordpress
|
{
"language": "en",
"length": 187,
"provenance": "stackexchange_00019.jsonl.gz:421440",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57231"
}
|
[
0.0645751953125,
-0.0039825439453125,
0.0119171142578125,
-0.032684326171875,
0.0205841064453125,
-0.03253173828125,
0.0367431640625,
-0.02142333984375,
0.034515380859375,
0.0098876953125,
0.0158843994140625,
-0.04083251953125,
-0.02423095703125,
-0.053314208984375,
-0.026458740234375,
-0.01061248779296875,
0.01470947265625,
-0.023681640625,
-0.0027942657470703125,
-0.024261474609375,
0.01447296142578125,
-0.0211334228515625,
0.010955810546875,
0.0191650390625,
-0.014251708984375,
-0.019775390625,
0.0297088623046875,
0.01165771484375,
-0.0254364013671875,
-0.0280609130859375,
-0.00838470458984375,
0.02490234375,
-0.0191650390625,
0.01519775390625,
0.0284271240234375,
-0.044525146484375,
-0.01534271240234375,
0.0218048095703125,
0.04736328125,
-0.046875,
0.0044403076171875,
0.0158538818359375,
-0.01690673828125,
0.031158447265625,
-0.03558349609375,
-0.056549072265625,
0.01751708984375,
-0.015716552734375,
0.01477813720703125,
-0.0192413330078125,
0.01151275634765625,
-0.01212310791015625,
0.037078857421875,
-0.031158447265625,
-0.024627685546875,
0.00341796875,
-0.0159149169921875,
0.022186279296875,
0.0235137939453125,
-0.003879547119140625,
-0.00850677490234375,
0.0035648345947265625,
0.0201263427734375,
-0.01139068603515625,
-0.004955291748046875,
-0.0198974609375,
-0.018951416015625,
0.0225677490234375,
-0.040557861328125,
-0.01149749755859375,
0.0300445556640625,
-0.0124053955078125,
0.004955291748046875,
0.004756927490234375,
-0.0256195068359375,
-0.0228118896484375,
0.01245880126953125,
0.001155853271484375,
0.036895751953125,
-0.0095672607421875,
-0.0094451904296875,
-0.0161285400390625,
-0.051666259765625,
0.0462646484375,
-0.031982421875,
0.06793212890625,
-0.01812744140625,
-0.02410888671875,
-0.0151824951171875,
0.005130767822265625,
-0.015167236328125,
-0.04437255859375,
0.005771636962890625,
0.026885986328125,
-0.01233673095703125,
-0.0101470947265625,
0.08502197265625,
0.0887451171875,
-0.01213836669921875,
-0.055450439453125,
-0.0043792724609375,
-0.032257080078125,
-0.07855224609375,
-0.00287628173828125,
0.00457000732421875,
0.0655517578125,
-0.01039886474609375,
0.055145263671875,
0.0335693359375,
0.02105712890625,
0.035430908203125,
-0.06475830078125,
-0.022186279296875,
0.0174713134765625,
-0.0509033203125,
0.0181732177734375,
-0.026885986328125,
-0.038604736328125,
-0.036376953125,
0.0018701553344726562,
-0.0173797607421875,
-0.009979248046875,
-0.017852783203125,
0.0106201171875,
0.038238525390625,
0.01287078857421875,
-0.0247955322265625,
0.0166168212890625,
-0.0179901123046875,
0.0290069580078125,
-0.03662109375,
0.005077362060546875,
0.07257080078125,
0.03192138671875,
0.002838134765625,
-0.01983642578125,
0.0186004638671875,
-0.0117645263671875,
-0.015411376953125,
0.044281005859375,
-0.0225677490234375,
-0.05224609375,
-0.02630615234375,
-0.04351806640625,
-0.0084381103515625,
0.016998291015625,
0.0025768280029296875,
0.0226593017578125,
0.016510009765625,
-0.034912109375,
0.0194854736328125,
-0.08697509765625,
0.0022296905517578125,
0.027557373046875,
0.038970947265625,
0.02508544921875,
0.053009033203125,
-0.02117919921875,
-0.0182342529296875,
-0.003948211669921875,
0.02691650390625,
-0.007843017578125,
-0.0004532337188720703,
0.018035888671875,
-0.016510009765625,
0.01334381103515625,
-0.01245880126953125,
-0.01155853271484375,
0.0215606689453125,
-0.04888916015625,
0.0179290771484375,
-0.009063720703125,
0.0185394287109375,
-0.0146636962890625,
0.0029239654541015625,
0.0159149169921875,
0.003147125244140625,
0.03570556640625,
0.005542755126953125,
0.019287109375,
-0.03033447265625,
-0.06689453125,
-0.0035686492919921875,
-0.01369476318359375,
-0.041778564453125,
-0.0238037109375,
0.0105743408203125,
0.00795745849609375,
0.001850128173828125,
-0.0003902912139892578,
0.076171875,
0.01514434814453125,
0.019134521484375,
0.01165771484375,
0.00461578369140625,
-0.059722900390625,
0.005527496337890625,
-0.00980377197265625,
-0.01238250732421875,
-0.005878448486328125,
0.053375244140625,
0.009124755859375,
0.0245513916015625,
-0.031219482421875,
-0.0689697265625,
0.0179595947265625,
-0.028900146484375,
0.044189453125,
-0.0038127899169921875,
0.00884246826171875,
0.0082244873046875,
0.004245758056640625,
-0.0229034423828125,
-0.00426483154296875,
-0.01056671142578125,
0.01287078857421875,
-0.0159912109375,
0.0455322265625,
-0.0035839080810546875,
0.057891845703125,
-0.006145477294921875,
-0.030426025390625,
0.0140380859375,
-0.0264434814453125,
0.0289764404296875,
-0.00006365776062011719,
-0.0201263427734375,
-0.0011644363403320312,
0.04248046875,
-0.007564544677734375,
0.020721435546875,
0.038848876953125,
0.03765869140625,
0.0181427001953125,
-0.0411376953125,
0.00588226318359375,
-0.038543701171875,
-0.043243408203125,
-0.0261688232421875,
0.056640625,
0.036834716796875,
0.055267333984375,
0.002323150634765625,
0.0009064674377441406,
0.04608154296875,
-0.05242919921875,
0.00762176513671875,
-0.00652313232421875,
-0.004360198974609375,
0.0260467529296875,
0.0109710693359375,
-0.004974365234375,
0.0159454345703125,
-0.009674072265625,
0.0176544189453125,
0.0172271728515625,
-0.026092529296875,
-0.01239013671875,
-0.003253936767578125,
-0.020355224609375,
0.01007843017578125,
-0.03399658203125,
-0.0292816162109375,
-0.01241302490234375,
-0.0209808349609375,
0.004589080810546875,
0.008544921875,
0.01702880859375,
-0.004940032958984375,
-0.014495849609375,
0.033355712890625,
0.03497314453125,
-0.034210205078125,
0.0126190185546875,
0.07562255859375,
-0.0438232421875,
-0.041046142578125,
0.0116729736328125,
-0.04443359375,
-0.0255889892578125,
-0.01953125,
0.009063720703125,
0.0143890380859375,
-0.00785064697265625,
-0.007686614990234375,
-0.040924072265625,
0.0292205810546875,
-0.001766204833984375,
0.05023193359375,
0.0031280517578125,
0.01247406005859375,
0.030426025390625,
-0.0031604766845703125,
0.079345703125,
-0.0213623046875,
-0.0183563232421875,
-0.006320953369140625,
-0.0335693359375,
0.033782958984375,
-0.03936767578125,
0.04364013671875,
0.06097412109375,
-0.019989013671875,
-0.0010128021240234375,
0.0155487060546875,
-0.0382080078125,
-0.0124664306640625,
0.0303802490234375,
0.0237884521484375,
0.039642333984375,
-0.059326171875,
0.04962158203125,
0.0138702392578125,
0.058441162109375,
-0.03607177734375,
-0.03466796875,
-0.00803375244140625,
0.0179443359375,
-0.0169219970703125,
-0.018524169921875,
0.005889892578125,
-0.0175018310546875,
-0.0443115234375,
0.00580596923828125,
-0.0201416015625,
0.01678466796875,
-0.0006780624389648438,
-0.011505126953125,
0.03460693359375,
0.007671356201171875,
-0.044769287109375,
0.03448486328125,
-0.035064697265625,
0.03753662109375,
-0.0191650390625,
-0.005924224853515625,
0.005767822265625,
0.038848876953125,
0.005420684814453125,
-0.0310821533203125,
0.00458526611328125,
0.0172119140625,
-0.01169586181640625,
-0.020477294921875,
-0.0158233642578125,
-0.02264404296875,
0.0113372802734375,
0.0121612548828125,
-0.03448486328125,
-0.01020050048828125,
0.0286102294921875,
-0.025909423828125,
-0.0135040283203125,
-0.0105438232421875,
0.009552001953125,
-0.00817108154296875,
0.0128021240234375,
0.0198516845703125,
0.0189208984375,
-0.031707763671875,
-0.0006461143493652344,
0.002025604248046875,
-0.018218994140625,
0.034423828125,
-0.01324462890625,
-0.01800537109375,
0.031585693359375,
0.0030803680419921875,
0.026885986328125,
0.007293701171875,
-0.01326751708984375,
0.0191802978515625,
-0.043060302734375,
0.0014247894287109375,
0.021148681640625,
0.00545501708984375,
0.0240936279296875,
-0.0250701904296875,
0.0203704833984375,
0.0005316734313964844,
0.002994537353515625,
-0.004108428955078125,
-0.004505157470703125,
0.00252532958984375,
-0.0343017578125,
0.04083251953125,
-0.005645751953125,
0.034912109375,
-0.037811279296875,
-0.0211181640625,
-0.01922607421875,
0.08111572265625,
-0.0501708984375,
-0.01517486572265625,
-0.00392913818359375,
-0.015380859375,
0.0156402587890625,
0.0298309326171875,
-0.06494140625,
-0.014984130859375,
-0.09832763671875,
0.00864410400390625,
0.0031890869140625,
-0.042755126953125,
-0.033599853515625,
0.033172607421875,
-0.0731201171875,
-0.02667236328125,
0.045623779296875,
-0.042388916015625,
-0.0065155029296875,
0.033233642578125,
-0.03387451171875,
0.00543212890625,
-0.037109375,
-0.015380859375,
-0.0304107666015625,
0.00322723388671875,
-0.03851318359375,
0.01025390625,
0.00829315185546875,
0.043212890625,
-0.0230560302734375,
-0.0010652542114257812,
0.0238800048828125,
0.0305023193359375,
-0.028167724609375,
-0.033355712890625,
0.00930023193359375,
0.0201873779296875,
-0.00263214111328125,
0.00603485107421875,
-0.007099151611328125,
-0.029388427734375,
-0.029205322265625,
-0.0278167724609375,
-0.0322265625,
0.0117034912109375,
0.003326416015625,
-0.01483154296875,
-0.0711669921875,
-0.0611572265625,
-0.032928466796875,
-0.002864837646484375,
-0.010223388671875,
-0.0014801025390625,
-0.053192138671875,
-0.0738525390625,
0.023193359375,
0.00954437255859375,
-0.03973388671875,
0.01532745361328125,
0.022918701171875,
0.01849365234375,
-0.0231170654296875,
-0.0207977294921875,
0.0196533203125,
0.03900146484375,
-0.04449462890625,
0.046051025390625,
0.03778076171875,
0.006488800048828125,
-0.011199951171875,
-0.01279449462890625,
0.006664276123046875,
0.00019156932830810547,
-0.00921630859375,
-0.0006895065307617188,
-0.044097900390625,
0.0289459228515625,
-0.00865936279296875,
0.01560211181640625,
-0.0204620361328125,
0.0018587112426757812,
-0.00945281982421875,
0.039520263671875,
0.0250396728515625,
0.0007801055908203125,
-0.006839752197265625,
-0.02032470703125,
-0.029052734375,
0.0019159317016601562,
-0.0150909423828125,
0.017242431640625,
-0.0008358955383300781,
0.00323486328125,
-0.016632080078125,
0.006587982177734375,
0.0142974853515625,
-0.042205810546875,
-0.0009713172912597656,
-0.036224365234375,
0.045196533203125,
-0.041717529296875,
-0.001766204833984375,
-0.0293426513671875,
-0.0024471282958984375,
0.01007080078125,
-0.01168060302734375,
-0.051361083984375,
-0.004123687744140625,
-0.01329803466796875,
0.03240966796875,
0.0031147003173828125,
0.039794921875,
0.0242919921875,
-0.0081329345703125,
-0.039581298828125,
-0.0177764892578125,
0.03790283203125,
-0.0286865234375,
-0.0504150390625,
0.0173797607421875,
-0.01479339599609375,
0.01357269287109375,
0.013885498046875,
0.062225341796875,
0.010467529296875,
0.03741455078125,
-0.03656005859375,
0.017608642578125,
0.01763916015625,
-0.006908416748046875,
-0.00026154518127441406,
0.03955078125,
0.002719879150390625,
-0.01360321044921875,
0.040008544921875,
-0.01236724853515625,
-0.005588531494140625,
0.032501220703125,
0.0293731689453125,
0.035400390625,
0.011749267578125,
-0.040740966796875,
-0.037384033203125,
-0.012664794921875,
0.070068359375,
-0.00579833984375,
-0.08795166015625,
-0.0352783203125,
0.00267791748046875,
0.0244140625,
-0.0562744140625,
0.004108428955078125,
-0.0029468536376953125,
-0.00498199462890625,
-0.0011301040649414062,
0.005550384521484375,
-0.020721435546875,
-0.041046142578125,
-0.019134521484375,
-0.02899169921875,
0.00428009033203125,
0.0091094970703125,
-0.093017578125,
-0.03790283203125,
-0.0140228271484375,
-0.0182342529296875,
0.069580078125,
0.0019044876098632812,
0.046478271484375,
-0.053253173828125,
-0.0178680419921875,
0.0188446044921875,
-0.01540374755859375,
0.03973388671875,
-0.0014286041259765625,
-0.09210205078125,
0.01800537109375,
-0.07159423828125,
-0.012969970703125,
-0.069580078125,
-0.029571533203125,
-0.051422119140625,
0.032257080078125,
-0.01158905029296875,
0.0165863037109375,
0.007495880126953125,
0.013427734375,
-0.0245513916015625,
0.020355224609375,
0.0172882080078125,
0.033935546875,
-0.0245208740234375,
0.07183837890625,
-0.015716552734375,
0.01812744140625,
-0.0033721923828125,
0.03631591796875,
0.0125732421875,
-0.003704071044921875,
-0.00646209716796875,
-0.0059051513671875,
-0.0018634796142578125,
0.0111083984375,
-0.01324462890625,
-0.01451873779296875,
0.042236328125,
-0.01025390625,
0.0266876220703125,
0.033782958984375,
0.007610321044921875,
-0.02490234375,
-0.07666015625,
0.01544189453125,
0.0281982421875,
-0.025665283203125,
-0.023101806640625,
0.036163330078125,
0.00978851318359375,
0.01198577880859375,
-0.037139892578125,
-0.01727294921875,
-0.00705718994140625,
0.044586181640625,
-0.0232086181640625,
0.033050537109375,
0.058837890625,
-0.01364898681640625,
0.039337158203125,
0.01605224609375,
0.0198211669921875,
0.032684326171875,
-0.04217529296875,
-0.0115203857421875,
0.01285552978515625,
0.014251708984375,
-0.004638671875,
0.0263671875,
0.052001953125,
0.004001617431640625,
-0.00034332275390625,
0.08660888671875,
0.040191650390625,
-0.10797119140625,
0.00748443603515625,
0.0078277587890625,
0.0166015625,
0.0221099853515625,
-0.01015472412109375,
0.00627899169921875,
-0.060516357421875,
0.0452880859375,
0.021148681640625,
-0.0203094482421875,
0.01047515869140625,
-0.01465606689453125,
-0.0194091796875,
0.0222625732421875,
-0.0083160400390625,
-0.017364501953125,
0.061676025390625,
-0.07550048828125,
-0.054962158203125,
-0.00794219970703125,
-0.0163116455078125,
0.01373291015625,
0.0160980224609375,
-0.036651611328125,
-0.07867431640625,
-0.0271453857421875,
0.025482177734375,
-0.05047607421875,
0.0201416015625,
-0.01537322998046875,
-0.00838470458984375,
0.03570556640625,
-0.03765869140625,
0.0288848876953125,
0.0189666748046875,
-0.05609130859375,
-0.00605010986328125,
-0.059051513671875,
0.01123809814453125,
-0.0056915283203125,
-0.037445068359375,
0.0275421142578125,
-0.0019683837890625,
-0.04876708984375,
-0.0042572021484375,
-0.061248779296875,
0.04827880859375,
0.00501251220703125,
-0.035919189453125,
0.00347137451171875,
-0.006710052490234375,
-0.003162384033203125,
0.057891845703125,
0.0208892822265625,
-0.028961181640625,
-0.05810546875,
0.044952392578125,
-0.077392578125,
-0.0006999969482421875,
0.056610107421875,
-0.06146240234375,
0.04290771484375,
0.011993408203125,
0.030975341796875,
0.030548095703125,
0.00004476308822631836,
-0.05926513671875,
-0.042816162109375,
-0.0141448974609375,
0.0213775634765625,
0.0016412734985351562,
0.038116455078125,
-0.005939483642578125,
-0.0003037452697753906,
0.01515960693359375,
0.0282135009765625,
0.055206298828125,
0.0230255126953125,
-0.033966064453125,
-0.0246124267578125,
-0.00531768798828125,
0.01373291015625,
-0.00119781494140625,
0.045806884765625,
-0.0081024169921875,
-0.0013055801391601562,
-0.01806640625,
-0.0242156982421875,
0.03533935546875,
-0.060516357421875,
-0.03631591796875,
-0.00420379638671875,
0.00833892822265625,
0.0137939453125,
0.004299163818359375,
0.0205841064453125,
-0.0222625732421875,
-0.0020580291748046875,
0.0157470703125,
-0.0323486328125,
0.0350341796875,
-0.01203155517578125,
0.026275634765625,
-0.01922607421875,
0.038482666015625,
-0.019317626953125,
0.06072998046875,
0.0207366943359375,
-0.022003173828125,
0.052337646484375,
0.0272674560546875,
-0.032318115234375,
0.0220489501953125,
0.0034160614013671875,
0.0206146240234375,
-0.005767822265625,
-0.0016927719116210938,
-0.0010461807250976562,
0.0263214111328125,
-0.01448822021484375,
0.0186004638671875,
0.01953125,
0.005397796630859375,
-0.0186309814453125,
-0.018157958984375,
0.01215362548828125,
-0.004657745361328125,
-0.000919342041015625,
-0.0021877288818359375,
-0.0100250244140625,
0.023529052734375,
0.0226287841796875,
-0.058990478515625,
0.017333984375,
0.02862548828125,
0.028656005859375,
-0.007354736328125,
0.0163116455078125,
-0.050201416015625,
-0.004528045654296875,
-0.04388427734375,
-0.052734375,
0.0177764892578125,
0.032135009765625,
0.0621337890625,
0.001434326171875,
0.08197021484375,
-0.0274200439453125,
-0.03240966796875,
0.0178070068359375,
-0.0178985595703125,
0.03167724609375,
-0.05517578125,
-0.04345703125,
0.0310516357421875,
0.039642333984375,
0.00818634033203125,
-0.0124359130859375,
-0.0016222000122070312,
0.03302001953125,
0.027923583984375,
-0.0156707763671875,
0.0225677490234375,
-0.00557708740234375,
0.00896453857421875,
-0.0247039794921875,
-0.0138702392578125,
-0.0089874267578125,
-0.02490234375,
0.0173797607421875,
-0.0198516845703125,
0.038848876953125,
-0.002353668212890625,
0.0166015625,
-0.005615234375,
-0.025634765625,
0.039642333984375,
-0.0290069580078125,
0.044219970703125,
-0.002521514892578125,
-0.05853271484375,
0.0052947998046875,
-0.036041259765625,
-0.06085205078125,
0.03179931640625,
0.038482666015625,
-0.027679443359375,
0.005283355712890625,
0.0175628662109375,
-0.0261077880859375,
0.0210418701171875,
0.001667022705078125,
-0.004180908203125,
-0.0031585693359375,
0.013702392578125,
-0.01068115234375,
-0.003841400146484375,
0.0018320083618164062,
0.04449462890625,
0.0165557861328125,
-0.0090484619140625,
0.0246734619140625,
-0.0038967132568359375,
0.0013132095336914062,
-0.05072021484375,
0.027099609375,
-0.0660400390625,
-0.045684814453125,
0.03009033203125,
0.017486572265625,
-0.0167694091796875,
-0.0022907257080078125,
-0.01403045654296875,
0.049224853515625,
0.051422119140625,
-0.0095062255859375,
0.034149169921875,
0.0251007080078125,
-0.0132293701171875,
-0.0245513916015625,
0.0305023193359375,
-0.01444244384765625,
-0.049285888671875,
-0.0093841552734375,
0.034881591796875,
0.019622802734375,
0.03765869140625,
-0.0208892822265625,
0.02197265625,
0.01152801513671875,
-0.0269775390625,
-0.01441192626953125,
0.00576019287109375,
-0.01061248779296875,
0.032440185546875,
-0.018768310546875,
0.01995849609375,
0.01187896728515625,
-0.007572174072265625,
0.0263671875,
0.00542449951171875,
-0.0156402587890625,
0.033538818359375,
-0.035491943359375,
-0.01282501220703125,
-0.0200958251953125,
0.0081329345703125,
-0.00876617431640625,
-0.0104217529296875,
-0.01953125,
-0.0123291015625,
-0.0242462158203125,
0.0120849609375,
-0.007244110107421875,
-0.014617919921875,
-0.01279449462890625,
0.0292510986328125,
-0.00858306884765625,
-0.01399993896484375,
-0.08905029296875,
0.01922607421875,
0.015777587890625,
0.0242462158203125,
-0.09759521484375,
0.09423828125,
-0.026336669921875,
-0.0009441375732421875,
0.0008711814880371094,
-0.0015010833740234375,
-0.01971435546875,
-0.00820159912109375,
-0.03167724609375,
0.004161834716796875,
-0.04583740234375,
0.009613037109375,
-0.0090484619140625,
-0.0085601806640625,
0.0004410743713378906,
0.018463134765625,
0.007663726806640625,
0.0003352165222167969,
-0.03607177734375,
0.0648193359375,
-0.04852294921875,
-0.0198211669921875,
-0.020263671875,
0.037078857421875,
-0.011871337890625,
-0.03167724609375,
0.005542755126953125,
-0.0017232894897460938,
0.00400543212890625,
0.025787353515625,
0.002666473388671875,
0.0294952392578125,
-0.025848388671875,
-0.063232421875,
0.0263824462890625,
0.00003647804260253906,
-0.047088623046875,
0.00670623779296875,
-0.0170745849609375,
0.01319122314453125,
-0.0142974853515625,
-0.004009246826171875,
-0.041656494140625,
-0.03839111328125,
0.00400543212890625,
0.04736328125,
-0.043548583984375,
0.047515869140625,
0.04193115234375,
-0.0225067138671875,
0.047210693359375,
0.03875732421875,
-0.00585174560546875,
-0.026458740234375,
0.018768310546875,
0.01097869873046875,
0.042510986328125,
-0.00035858154296875,
0.016204833984375,
0.0207061767578125,
-0.043975830078125,
-0.0164642333984375,
0.012725830078125,
-0.04766845703125,
-0.0335693359375,
0.08087158203125,
0.050933837890625,
0.0263824462890625,
-0.0032100677490234375,
-0.059478759765625,
-0.06536865234375,
-0.0273895263671875,
-0.039306640625,
0.038909912109375,
-0.111083984375,
0.0005993843078613281,
0.02587890625,
-0.0426025390625,
0.00690460205078125,
0.0012378692626953125,
-0.060821533203125,
0.00965118408203125,
-0.01535797119140625,
0.00766754150390625,
-0.05340576171875,
0.032196044921875,
0.0007128715515136719,
-0.042388916015625,
-0.061798095703125,
-0.00986480712890625,
-0.02020263671875,
-0.05487060546875,
-0.038665771484375,
-0.0452880859375,
-0.059112548828125,
-0.00788116455078125,
0.05755615234375,
-0.03546142578125,
0.053131103515625,
-0.04364013671875,
-0.0036468505859375,
-0.02996826171875,
0.0198974609375,
0.006198883056640625,
0.0212860107421875,
-0.01837158203125,
0.0185546875,
0.0233001708984375,
0.067138671875,
-0.0171661376953125,
0.04925537109375,
-0.0311126708984375,
0.02508544921875,
0.035430908203125,
-0.0208892822265625,
0.0941162109375,
-0.0241241455078125,
-0.00836181640625,
0.0249481201171875,
-0.0694580078125,
-0.0509033203125,
0.025482177734375,
0.0478515625,
-0.0024547576904296875,
0.023681640625
] |
fc9fa00bf45d8e2773111b9e61f08006baf3fb26
|
Wordpress Stackexchange
Q: Ability to edit image via WYSIWYG In the wordpress post WYSIWYG, you can easily add images from the media library. But, once the image is inserted into the post, it is not intuitive to edit the image's source to a different image in your media library. You have to remove the image completely, and then add another one in it's place.
So what I am asking is twofold:
*
*Can the tinyMCE editor plugins (in this case wpeditimage) be overridden via functions.php or a plugin? Or can I totally override it with my own?
*Do you agree with me that this is a usability issue in WP, or am I just smoking something?
Any feedback or suggestions highly appreciated
A: You maybe smoking something, but it doesn't change the fact that you are right ;) WP image management, (or should I say TinyMCE image management) is really sub par.
ImagePro
might be a good solution for you. Not only does it help replacing images in editor but also resizes them and displays a server-generated resized version of the image. Anyway, it's nice for what it does. I personally used it on a couple of projects.
|
Q: Ability to edit image via WYSIWYG In the wordpress post WYSIWYG, you can easily add images from the media library. But, once the image is inserted into the post, it is not intuitive to edit the image's source to a different image in your media library. You have to remove the image completely, and then add another one in it's place.
So what I am asking is twofold:
*
*Can the tinyMCE editor plugins (in this case wpeditimage) be overridden via functions.php or a plugin? Or can I totally override it with my own?
*Do you agree with me that this is a usability issue in WP, or am I just smoking something?
Any feedback or suggestions highly appreciated
A: You maybe smoking something, but it doesn't change the fact that you are right ;) WP image management, (or should I say TinyMCE image management) is really sub par.
ImagePro
might be a good solution for you. Not only does it help replacing images in editor but also resizes them and displays a server-generated resized version of the image. Anyway, it's nice for what it does. I personally used it on a couple of projects.
|
wordpress
|
{
"language": "en",
"length": 196,
"provenance": "stackexchange_00019.jsonl.gz:421451",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57277"
}
|
[
0.0310821533203125,
0.0026111602783203125,
-0.006862640380859375,
0.0255584716796875,
0.0160064697265625,
-0.043426513671875,
0.0889892578125,
-0.0207977294921875,
0.039642333984375,
0.00655364990234375,
-0.034759521484375,
-0.036041259765625,
-0.0098724365234375,
-0.0235443115234375,
-0.0452880859375,
-0.024993896484375,
0.0421142578125,
-0.05078125,
0.0244293212890625,
-0.0045318603515625,
0.004978179931640625,
0.007213592529296875,
0.0382080078125,
0.00775146484375,
-0.0105743408203125,
0.0443115234375,
0.0579833984375,
0.0026454925537109375,
-0.018798828125,
-0.01446533203125,
0.004573822021484375,
-0.0113983154296875,
0.0228271484375,
0.0211029052734375,
-0.03692626953125,
0.002323150634765625,
0.0180206298828125,
-0.006031036376953125,
0.00696563720703125,
-0.0202178955078125,
-0.011810302734375,
0.02685546875,
0.048828125,
0.0256500244140625,
0.005878448486328125,
-0.03924560546875,
0.01427459716796875,
-0.052581787109375,
0.00846099853515625,
-0.01126861572265625,
0.0204925537109375,
0.03729248046875,
0.03179931640625,
-0.03729248046875,
-0.0195159912109375,
-0.0234375,
-0.043487548828125,
0.059356689453125,
0.021881103515625,
-0.01904296875,
-0.0323486328125,
0.00833892822265625,
0.0171661376953125,
0.01274871826171875,
0.00959014892578125,
-0.0079193115234375,
-0.019683837890625,
0.006443023681640625,
-0.027618408203125,
0.00047779083251953125,
0.015655517578125,
-0.035003662109375,
-0.01129913330078125,
-0.0732421875,
0.039459228515625,
0.061065673828125,
-0.027618408203125,
-0.01349639892578125,
-0.002086639404296875,
0.01297760009765625,
0.053375244140625,
-0.0005526542663574219,
-0.007198333740234375,
0.01300811767578125,
0.0083160400390625,
0.021087646484375,
-0.00275421142578125,
-0.029998779296875,
-0.042022705078125,
0.019775390625,
-0.0270233154296875,
-0.04345703125,
-0.0223388671875,
0.04754638671875,
0.0162353515625,
0.0022792816162109375,
0.0010423660278320312,
-0.0006127357482910156,
0.005008697509765625,
0.039398193359375,
0.01690673828125,
-0.0611572265625,
0.07666015625,
-0.046234130859375,
0.0152130126953125,
-0.020751953125,
-0.0024242401123046875,
0.01383209228515625,
0.036346435546875,
0.028533935546875,
-0.0343017578125,
0.03143310546875,
-0.0028591156005859375,
-0.039215087890625,
0.0230560302734375,
0.036590576171875,
-0.0109100341796875,
0.0298919677734375,
0.01270294189453125,
0.01690673828125,
-0.007297515869140625,
-0.0006661415100097656,
0.02020263671875,
-0.01363372802734375,
0.0357666015625,
0.02435302734375,
-0.01218414306640625,
-0.0142059326171875,
0.00732421875,
-0.004058837890625,
-0.042327880859375,
0.03851318359375,
0.07373046875,
0.031036376953125,
0.025482177734375,
-0.00827789306640625,
-0.006427764892578125,
-0.01476287841796875,
0.0117034912109375,
0.00467681884765625,
-0.003040313720703125,
-0.0167236328125,
0.0202178955078125,
-0.0022640228271484375,
0.02362060546875,
0.0294647216796875,
-0.00928497314453125,
0.01340484619140625,
0.04827880859375,
-0.060760498046875,
0.025421142578125,
-0.037384033203125,
-0.01085662841796875,
0.04193115234375,
0.06854248046875,
-0.036102294921875,
0.09185791015625,
-0.0650634765625,
0.050262451171875,
-0.06304931640625,
0.029571533203125,
0.0296783447265625,
0.0732421875,
0.008941650390625,
0.03875732421875,
-0.031768798828125,
-0.0830078125,
-0.01177978515625,
0.032073974609375,
-0.000004291534423828125,
0.01776123046875,
-0.01346588134765625,
0.01470184326171875,
0.03662109375,
0.0102691650390625,
0.034912109375,
-0.0215301513671875,
0.0484619140625,
0.0194091796875,
0.070556640625,
0.057403564453125,
-0.0182647705078125,
0.0946044921875,
0.01319122314453125,
-0.029632568359375,
-0.0303802490234375,
0.0171356201171875,
0.036407470703125,
0.01873779296875,
0.04315185546875,
-0.01690673828125,
-0.00997161865234375,
-0.004486083984375,
0.014556884765625,
0.01461029052734375,
-0.027374267578125,
-0.0139007568359375,
0.0031108856201171875,
-0.0020465850830078125,
-0.040679931640625,
0.056304931640625,
0.0250396728515625,
-0.0095672607421875,
-0.0042877197265625,
-0.0743408203125,
0.024078369140625,
-0.028594970703125,
0.023712158203125,
-0.048248291015625,
-0.0011644363403320312,
0.04376220703125,
0.01100921630859375,
-0.0232086181640625,
-0.03729248046875,
-0.02288818359375,
0.010528564453125,
-0.0234527587890625,
0.023681640625,
0.00618743896484375,
0.03948974609375,
-0.005603790283203125,
-0.0380859375,
0.0059661865234375,
-0.004730224609375,
0.0325927734375,
0.0102081298828125,
-0.031280517578125,
-0.0103759765625,
0.0028076171875,
0.0032367706298828125,
-0.0064239501953125,
0.0567626953125,
-0.03271484375,
0.0274810791015625,
0.004016876220703125,
-0.05792236328125,
-0.02996826171875,
-0.09490966796875,
0.05767822265625,
0.0550537109375,
0.0218353271484375,
0.0465087890625,
0.00787353515625,
0.0430908203125,
0.0975341796875,
0.037261962890625,
0.01093292236328125,
0.01061248779296875,
0.0193023681640625,
0.031524658203125,
-0.0153656005859375,
-0.0292816162109375,
0.0266571044921875,
-0.058990478515625,
0.0234375,
0.032470703125,
0.0002949237823486328,
0.047454833984375,
-0.019805908203125,
0.0250244140625,
-0.0168609619140625,
0.01102447509765625,
0.00943756103515625,
-0.0183868408203125,
0.022247314453125,
0.0325927734375,
0.03717041015625,
0.031280517578125,
-0.043975830078125,
0.0168304443359375,
0.01445770263671875,
0.0014657974243164062,
0.01300811767578125,
0.016815185546875,
-0.00701904296875,
-0.0106048583984375,
-0.032562255859375,
0.0029926300048828125,
0.0400390625,
0.011474609375,
-0.00959014892578125,
-0.044921875,
-0.017730712890625,
-0.0058135986328125,
0.031036376953125,
-0.05328369140625,
0.0182647705078125,
0.0097198486328125,
0.006198883056640625,
-0.044036865234375,
-0.00022792816162109375,
0.0032501220703125,
0.0054168701171875,
0.01605224609375,
0.0166778564453125,
-0.0288848876953125,
0.0491943359375,
0.0013628005981445312,
0.03997802734375,
-0.017303466796875,
0.055389404296875,
0.05596923828125,
-0.048675537109375,
0.045684814453125,
-0.00144195556640625,
0.00002849102020263672,
-0.01226043701171875,
0.0219268798828125,
-0.003330230712890625,
-0.0129547119140625,
-0.056121826171875,
-0.0109405517578125,
0.0082855224609375,
-0.007801055908203125,
-0.0205535888671875,
-0.0293121337890625,
-0.00759124755859375,
-0.006221771240234375,
-0.049591064453125,
-0.021392822265625,
-0.039276123046875,
-0.071533203125,
-0.0036029815673828125,
0.0224609375,
-0.026123046875,
0.01206207275390625,
0.04730224609375,
0.009429931640625,
-0.038970947265625,
-0.013702392578125,
0.01036834716796875,
-0.06781005859375,
-0.04364013671875,
-0.0888671875,
0.006458282470703125,
0.007678985595703125,
0.0034961700439453125,
0.0364990234375,
0.0156097412109375,
-0.046600341796875,
0.026885986328125,
0.028961181640625,
-0.007354736328125,
0.02294921875,
0.032196044921875,
-0.0094757080078125,
-0.0391845703125,
0.007080078125,
0.024078369140625,
0.0272674560546875,
-0.04705810546875,
0.01470947265625,
-0.019134521484375,
-0.0013828277587890625,
0.004436492919921875,
0.0166473388671875,
0.00490570068359375,
-0.0004661083221435547,
0.0269775390625,
-0.036865234375,
-0.0024547576904296875,
-0.046356201171875,
-0.04180908203125,
0.037200927734375,
0.0299530029296875,
0.00812530517578125,
-0.0212554931640625,
0.0094451904296875,
0.00858306884765625,
0.055633544921875,
0.01302337646484375,
-0.031768798828125,
0.053192138671875,
0.0020618438720703125,
0.0036754608154296875,
-0.0276641845703125,
-0.007358551025390625,
-0.04205322265625,
0.034149169921875,
-0.024688720703125,
-0.0386962890625,
-0.04156494140625,
0.04010009765625,
-0.00788116455078125,
-0.00626373291015625,
0.0107879638671875,
-0.04486083984375,
0.0301361083984375,
-0.03564453125,
0.005374908447265625,
-0.01171112060546875,
0.05609130859375,
-0.0225982666015625,
-0.018524169921875,
0.00585174560546875,
0.035430908203125,
-0.055145263671875,
-0.0521240234375,
-0.02020263671875,
-0.008087158203125,
-0.04449462890625,
0.0177154541015625,
0.01068115234375,
-0.0234222412109375,
-0.0174560546875,
0.040191650390625,
-0.035736083984375,
-0.02325439453125,
0.04180908203125,
-0.020416259765625,
-0.0014257431030273438,
0.021636962890625,
-0.0117645263671875,
-0.025390625,
-0.0264739990234375,
-0.01085662841796875,
-0.09832763671875,
-0.00969696044921875,
-0.033538818359375,
0.09613037109375,
-0.009368896484375,
0.034332275390625,
-0.033905029296875,
0.06005859375,
-0.0037441253662109375,
0.02081298828125,
0.0017681121826171875,
0.046356201171875,
-0.0335693359375,
-0.0648193359375,
-0.01184844970703125,
-0.06494140625,
-0.031890869140625,
-0.035552978515625,
-0.0216064453125,
-0.0182037353515625,
-0.01326751708984375,
-0.008941650390625,
0.002384185791015625,
-0.004161834716796875,
-0.01190185546875,
-0.003326416015625,
-0.01050567626953125,
0.049224853515625,
-0.027923583984375,
-0.00933074951171875,
-0.034759521484375,
-0.041412353515625,
0.033966064453125,
-0.009765625,
0.020294189453125,
-0.003757476806640625,
0.08062744140625,
0.0061798095703125,
-0.009307861328125,
-0.05462646484375,
-0.01580810546875,
0.041168212890625,
0.019073486328125,
0.00974273681640625,
0.02490234375,
-0.0288238525390625,
-0.010467529296875,
0.046630859375,
-0.006832122802734375,
-0.018798828125,
0.0445556640625,
0.0052337646484375,
-0.0211181640625,
0.0265350341796875,
-0.01165008544921875,
0.00986480712890625,
0.004566192626953125,
-0.014190673828125,
0.006816864013671875,
-0.0335693359375,
0.0036411285400390625,
0.007381439208984375,
0.004543304443359375,
-0.0306854248046875,
-0.036346435546875,
-0.0029315948486328125,
0.0031299591064453125,
-0.01029205322265625,
-0.0147247314453125,
-0.001720428466796875,
-0.023345947265625,
0.00736236572265625,
0.0022869110107421875,
-0.020843505859375,
-0.0143280029296875,
-0.005001068115234375,
0.03485107421875,
-0.0017709732055664062,
0.0037975311279296875,
-0.0004100799560546875,
-0.00922393798828125,
0.01239776611328125,
0.01267242431640625,
-0.024932861328125,
-0.035552978515625,
0.00461578369140625,
0.03363037109375,
-0.01500701904296875,
0.000934600830078125,
0.029541015625,
-0.003108978271484375,
-0.0073699951171875,
0.010528564453125,
-0.00179290771484375,
-0.039306640625,
-0.036773681640625,
0.0034027099609375,
0.0294189453125,
-0.019073486328125,
0.0643310546875,
-0.00354766845703125,
-0.00815582275390625,
0.01751708984375,
-0.00630950927734375,
0.02886962890625,
0.041748046875,
0.0157928466796875,
0.00957489013671875,
0.03167724609375,
-0.01529693603515625,
-0.0177001953125,
0.001956939697265625,
-0.020599365234375,
-0.004474639892578125,
0.0205841064453125,
0.043701171875,
-0.02996826171875,
-0.025787353515625,
0.00841522216796875,
-0.041534423828125,
-0.01025390625,
0.022613525390625,
0.0026760101318359375,
-0.03912353515625,
-0.0120697021484375,
0.03387451171875,
0.0193634033203125,
-0.015350341796875,
-0.022491455078125,
-0.0263519287109375,
-0.0360107421875,
0.0240631103515625,
0.0012760162353515625,
-0.0196990966796875,
0.0340576171875,
0.00933837890625,
-0.04168701171875,
-0.01751708984375,
-0.00603485107421875,
0.0159149169921875,
-0.00505828857421875,
-0.006610870361328125,
-0.007541656494140625,
0.04681396484375,
-0.035308837890625,
0.00506591796875,
-0.0260009765625,
0.01445770263671875,
-0.0269622802734375,
0.02197265625,
0.0028533935546875,
-0.006778717041015625,
0.0086669921875,
-0.007965087890625,
-0.0548095703125,
-0.03509521484375,
0.006443023681640625,
-0.0270538330078125,
-0.023162841796875,
-0.0228424072265625,
0.006587982177734375,
0.03704833984375,
0.0148162841796875,
0.005558013916015625,
-0.004367828369140625,
0.0046234130859375,
-0.0055084228515625,
0.061248779296875,
0.0035343170166015625,
0.007770538330078125,
-0.0190887451171875,
0.035675048828125,
-0.005092620849609375,
-0.0208282470703125,
-0.0196990966796875,
-0.0201568603515625,
-0.01763916015625,
-0.08123779296875,
-0.0045166015625,
0.00107574462890625,
-0.006561279296875,
0.060028076171875,
0.009429931640625,
0.030120849609375,
0.0192413330078125,
-0.030029296875,
-0.006542205810546875,
-0.0145111083984375,
0.011810302734375,
-0.05303955078125,
-0.0101776123046875,
0.00881195068359375,
-0.0413818359375,
0.014129638671875,
-0.022705078125,
-0.014404296875,
0.04132080078125,
-0.0299224853515625,
0.0224761962890625,
0.051055908203125,
0.002513885498046875,
-0.0200347900390625,
0.04486083984375,
-0.00698089599609375,
0.0278472900390625,
0.034698486328125,
-0.0025997161865234375,
0.0123443603515625,
0.01300811767578125,
-0.0055084228515625,
-0.00287628173828125,
0.0107879638671875,
-0.014678955078125,
-0.004711151123046875,
-0.01390838623046875,
-0.01512908935546875,
0.0249481201171875,
0.033172607421875,
0.06317138671875,
-0.033172607421875,
0.01042938232421875,
0.02166748046875,
-0.049560546875,
0.008392333984375,
0.0016717910766601562,
-0.001186370849609375,
-0.0013866424560546875,
0.033538818359375,
-0.06146240234375,
-0.0179290771484375,
0.0109100341796875,
-0.0273590087890625,
-0.0229949951171875,
0.012054443359375,
0.0504150390625,
0.0272674560546875,
-0.037261962890625,
-0.0167083740234375,
0.049652099609375,
-0.00847625732421875,
-0.01129913330078125,
0.043853759765625,
-0.035736083984375,
0.01495361328125,
-0.04571533203125,
-0.00009441375732421875,
0.0011396408081054688,
-0.0159759521484375,
0.048828125,
-0.0018453598022460938,
-0.0034351348876953125,
0.0408935546875,
-0.016754150390625,
0.0299530029296875,
0.0038890838623046875,
-0.048309326171875,
0.04498291015625,
-0.024169921875,
-0.00745391845703125,
0.0293731689453125,
-0.06573486328125,
0.003253936767578125,
0.0015764236450195312,
0.0382080078125,
-0.0019073486328125,
-0.0176849365234375,
0.055084228515625,
-0.03692626953125,
-0.0133819580078125,
0.036346435546875,
0.016815185546875,
-0.019500732421875,
-0.005245208740234375,
-0.022735595703125,
-0.064453125,
-0.0457763671875,
-0.028106689453125,
-0.078857421875,
0.0250701904296875,
-0.023193359375,
-0.070556640625,
0.11627197265625,
-0.007282257080078125,
0.04656982421875,
0.00511932373046875,
0.046142578125,
-0.0295562744140625,
0.0012941360473632812,
-0.0179290771484375,
0.037506103515625,
-0.046661376953125,
0.0249176025390625,
-0.04412841796875,
0.0223236083984375,
0.0027980804443359375,
0.0029506683349609375,
0.04388427734375,
0.01490020751953125,
-0.0262451171875,
-0.02703857421875,
0.01166534423828125,
0.053466796875,
0.004726409912109375,
0.0157318115234375,
0.01444244384765625,
-0.038543701171875,
0.00933074951171875,
0.03662109375,
0.05242919921875,
-0.04754638671875,
-0.00588226318359375,
0.029266357421875,
-0.00897216796875,
-0.032562255859375,
0.040496826171875,
0.0176544189453125,
-0.04217529296875,
0.0229949951171875,
0.032501220703125,
-0.040618896484375,
0.0097503662109375,
0.034576416015625,
0.01496124267578125,
0.0022029876708984375,
-0.0227508544921875,
-0.01206207275390625,
0.030364990234375,
-0.007709503173828125,
0.03363037109375,
0.005313873291015625,
0.0157012939453125,
0.05767822265625,
0.01424407958984375,
0.029052734375,
0.044708251953125,
-0.01457977294921875,
0.023162841796875,
-0.0070953369140625,
-0.00799560546875,
-0.05511474609375,
0.03521728515625,
0.056488037109375,
0.03814697265625,
-0.04913330078125,
0.0020923614501953125,
0.022003173828125,
0.0191650390625,
0.00634765625,
-0.040679931640625,
0.0134735107421875,
-0.08331298828125,
-0.059600830078125,
0.026275634765625,
-0.0016736984252929688,
0.03131103515625,
0.0159759521484375,
0.0191192626953125,
0.0078277587890625,
-0.01425933837890625,
-0.0023899078369140625,
-0.02813720703125,
0.0212554931640625,
0.0026569366455078125,
0.037811279296875,
0.0157318115234375,
0.0369873046875,
-0.00896453857421875,
-0.0092010498046875,
-0.0224151611328125,
0.040740966796875,
-0.030364990234375,
0.052703857421875,
-0.0275115966796875,
-0.037506103515625,
-0.0018701553344726562,
0.0241241455078125,
0.03363037109375,
0.002864837646484375,
0.0249481201171875,
0.0217437744140625,
-0.00251007080078125,
-0.01120758056640625,
0.0309600830078125,
0.00150299072265625,
0.0570068359375,
-0.02313232421875,
0.03240966796875,
0.0266876220703125,
-0.02740478515625,
-0.024993896484375,
-0.010406494140625,
0.0693359375,
-0.01447296142578125,
0.0177001953125,
-0.0053253173828125,
-0.0221405029296875,
0.05889892578125,
-0.00909423828125,
0.0482177734375,
0.006191253662109375,
-0.049560546875,
-0.0250701904296875,
0.00945281982421875,
-0.046173095703125,
0.0194244384765625,
0.0254974365234375,
-0.0256195068359375,
0.01800537109375,
-0.0273895263671875,
-0.035888671875,
0.0296630859375,
-0.01288604736328125,
0.016326904296875,
-0.027008056640625,
-0.0167236328125,
-0.0325927734375,
0.010345458984375,
-0.0038299560546875,
-0.0182342529296875,
0.06268310546875,
0.035125732421875,
0.0374755859375,
-0.03143310546875,
0.056304931640625,
-0.02593994140625,
0.015838623046875,
-0.04449462890625,
0.00799560546875,
-0.03741455078125,
-0.00736236572265625,
-0.0030517578125,
0.00012552738189697266,
0.035369873046875,
0.025390625,
0.00820159912109375,
-0.0494384765625,
-0.0021266937255859375,
-0.039764404296875,
0.003971099853515625,
0.0301666259765625,
0.0165863037109375,
-0.01552581787109375,
-0.00951385498046875,
-0.0196075439453125,
-0.01303863525390625,
0.02532958984375,
-0.00870513916015625,
-0.01398468017578125,
-0.0022869110107421875,
0.02752685546875,
-0.01355743408203125,
0.038177490234375,
-0.0255889892578125,
0.0638427734375,
0.04071044921875,
0.003246307373046875,
-0.041534423828125,
-0.0080413818359375,
-0.0138702392578125,
-0.07080078125,
0.022613525390625,
-0.01273345947265625,
-0.016448974609375,
-0.0574951171875,
0.0208587646484375,
-0.01172637939453125,
0.0281524658203125,
-0.0167083740234375,
-0.00406646728515625,
-0.015838623046875,
0.012542724609375,
-0.01459503173828125,
0.0124664306640625,
-0.021697998046875,
-0.01593017578125,
-0.0101776123046875,
0.0164794921875,
0.001895904541015625,
-0.03070068359375,
-0.051361083984375,
-0.0262451171875,
0.04345703125,
0.0386962890625,
-0.0675048828125,
0.02655029296875,
0.0072174072265625,
0.0034198760986328125,
0.0304412841796875,
-0.0303497314453125,
-0.002368927001953125,
0.01812744140625,
-0.058868408203125,
-0.079345703125,
-0.0452880859375,
0.0379638671875,
-0.080322265625,
0.042083740234375,
0.0565185546875,
-0.05279541015625,
-0.00433349609375,
0.0355224609375,
0.03973388671875,
0.0777587890625,
-0.0302886962890625,
-0.0253448486328125,
0.0163116455078125,
0.0016775131225585938,
-0.0170745849609375,
-0.0115814208984375,
0.006458282470703125,
-0.0191497802734375,
0.0226593017578125,
-0.0274810791015625,
0.0180206298828125,
-0.00015175342559814453,
-0.044097900390625,
-0.0675048828125,
0.017181396484375,
-0.010894775390625,
-0.0248870849609375,
0.009674072265625,
-0.0164794921875,
-0.034576416015625,
0.05828857421875,
0.01186370849609375,
-0.027252197265625,
0.0175628662109375,
0.01568603515625,
0.0019369125366210938,
0.09112548828125,
-0.015380859375,
0.022308349609375,
-0.0160980224609375,
0.00008594989776611328,
-0.03619384765625,
0.0177764892578125,
0.006793975830078125,
0.0006103515625,
0.0287933349609375,
0.04888916015625,
-0.016357421875,
-0.053863525390625,
-0.00824737548828125,
-0.033416748046875,
-0.03558349609375,
-0.002124786376953125,
-0.04327392578125,
0.004180908203125,
0.0908203125,
0.09490966796875,
0.0299835205078125,
-0.04730224609375,
0.07147216796875,
-0.0012121200561523438,
-0.03509521484375,
0.010101318359375,
0.002780914306640625,
-0.0234832763671875,
-0.0147857666015625,
0.03228759765625,
-0.034698486328125,
0.021697998046875,
-0.00829315185546875,
-0.04937744140625,
0.0031490325927734375,
-0.037384033203125,
-0.04644775390625,
-0.029998779296875,
0.0276336669921875,
0.0816650390625,
-0.03961181640625,
0.0338134765625,
-0.0003185272216796875,
-0.01335906982421875,
0.061370849609375,
0.016082763671875,
-0.01415252685546875,
0.01209259033203125,
0.0077056884765625,
0.0391845703125,
0.0039215087890625,
0.0010671615600585938,
-0.0201416015625,
0.004253387451171875,
-0.00037670135498046875,
0.0148468017578125,
0.003612518310546875,
0.01035308837890625,
-0.00347900390625,
0.0012731552124023438,
-0.01296234130859375,
0.01523590087890625,
-0.038055419921875,
-0.01068878173828125,
-0.022705078125,
-0.00394439697265625,
-0.01806640625,
0.0264129638671875,
0.0222015380859375,
0.00460052490234375,
0.0026092529296875,
0.048675537109375,
-0.0263519287109375,
0.0010156631469726562,
0.004055023193359375,
-0.054473876953125,
0.01200103759765625,
-0.02117919921875
] |
46ae07a5e5cdbc612ef790e5c414c232f082eec4
|
Wordpress Stackexchange
Q: WordPress 3.4 Permalinks Redirection Problem A few years ago this was the permalink structure I had for my blog:
/%year%/%category%/%postname%.html
I changed these permalinks last year to this:
/%category%/%postname%/%post_id%/
A plugin that goes by the name Permalinks Redirect was used, and it worked pretty well to permanently redirect older URLs to newer ones. However, after a recent WordPress update to 3.4.1 version, I noticed the older permalinks are no longer redirecting.
The problem is not with the plugin -- I have spent 2 days dabbling with every redirect plugin I could find. After a bit of Googling, I figured out the problem is with WordPress 3.4, and a bug has been already submitted.
All the older URLs are throwing out 404 errors, which is frustrating. I'd really appreciate if there's a HTACCESS redirect code, or MOD_REWRITE code (the site is using nginx, if that helps) that could be posted here.
I have very little knowledge about redirection.
A: You can try this but not 100% sure it will work since the post_id is not in the original permalink structure.
RedirectMatch 301 ^/([0-9]{4})/([^/]+)/([^/]+).html$ http://domain.com/$2/$3/
|
Q: WordPress 3.4 Permalinks Redirection Problem A few years ago this was the permalink structure I had for my blog:
/%year%/%category%/%postname%.html
I changed these permalinks last year to this:
/%category%/%postname%/%post_id%/
A plugin that goes by the name Permalinks Redirect was used, and it worked pretty well to permanently redirect older URLs to newer ones. However, after a recent WordPress update to 3.4.1 version, I noticed the older permalinks are no longer redirecting.
The problem is not with the plugin -- I have spent 2 days dabbling with every redirect plugin I could find. After a bit of Googling, I figured out the problem is with WordPress 3.4, and a bug has been already submitted.
All the older URLs are throwing out 404 errors, which is frustrating. I'd really appreciate if there's a HTACCESS redirect code, or MOD_REWRITE code (the site is using nginx, if that helps) that could be posted here.
I have very little knowledge about redirection.
A: You can try this but not 100% sure it will work since the post_id is not in the original permalink structure.
RedirectMatch 301 ^/([0-9]{4})/([^/]+)/([^/]+).html$ http://domain.com/$2/$3/
A: First of all how are you possibly using mod_rewrite rules in an nginx powered site? That's a neat trick I'd like to learn :)
Anyway if you are using Apache try this:
RedirectMatch 301 ^/([0-9]{4})/([^/]+)/([^/]+).html$ example.com/?name=$3
The above uses the post's slug instead of the ID (which is missing in the old URLs). WP should redirect again to your SE friendly URLs.
|
wordpress
|
{
"language": "en",
"length": 247,
"provenance": "stackexchange_00019.jsonl.gz:421481",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57358"
}
|
[
0.0693359375,
0.00830841064453125,
0.005451202392578125,
-0.0246124267578125,
0.00406646728515625,
-0.0284881591796875,
0.019317626953125,
-0.041046142578125,
0.0184326171875,
0.017425537109375,
-0.02093505859375,
0.00902557373046875,
-0.01251220703125,
-0.024261474609375,
-0.0081024169921875,
-0.01123046875,
0.0284576416015625,
-0.0244293212890625,
0.0163116455078125,
-0.01442718505859375,
0.01446533203125,
0.01171112060546875,
0.050628662109375,
0.007965087890625,
0.01503753662109375,
-0.007564544677734375,
0.07757568359375,
-0.055206298828125,
0.0186767578125,
-0.0419921875,
0.01629638671875,
-0.00765228271484375,
0.0082244873046875,
0.056365966796875,
-0.025665283203125,
0.0185394287109375,
0.0192108154296875,
0.02996826171875,
0.03497314453125,
0.0291748046875,
0.0228118896484375,
-0.021514892578125,
0.0194244384765625,
0.010772705078125,
0.0134124755859375,
-0.03411865234375,
0.01064300537109375,
-0.0706787109375,
0.01003265380859375,
-0.033447265625,
-0.005344390869140625,
0.023651123046875,
0.0034332275390625,
0.0014514923095703125,
-0.0181732177734375,
-0.00279998779296875,
-0.006542205810546875,
-0.0295562744140625,
0.008544921875,
0.00740814208984375,
0.005481719970703125,
0.0166778564453125,
0.0163726806640625,
0.0123748779296875,
-0.02374267578125,
-0.01479339599609375,
0.023223876953125,
0.027069091796875,
-0.0211639404296875,
-0.03369140625,
0.0222320556640625,
0.0004911422729492188,
-0.0196990966796875,
-0.0256500244140625,
-0.0204010009765625,
-0.00399017333984375,
0.01617431640625,
-0.0257110595703125,
0.0016069412231445312,
0.0194854736328125,
0.006641387939453125,
-0.026458740234375,
0.0037059783935546875,
-0.0560302734375,
0.053985595703125,
-0.019378662109375,
0.00008118152618408203,
-0.004329681396484375,
-0.057525634765625,
-0.041656494140625,
-0.03265380859375,
-0.07733154296875,
-0.0271759033203125,
-0.02044677734375,
-0.0128173828125,
-0.040252685546875,
0.0265045166015625,
0.0570068359375,
-0.0084686279296875,
0.00661468505859375,
0.0102386474609375,
-0.033660888671875,
-0.0166778564453125,
-0.020263671875,
-0.0274505615234375,
0.03790283203125,
0.04913330078125,
0.046905517578125,
0.0175323486328125,
0.00264739990234375,
-0.0005207061767578125,
0.061431884765625,
-0.03753662109375,
-0.00904083251953125,
-0.0146636962890625,
0.051177978515625,
-0.045135498046875,
-0.00885772705078125,
-0.0211181640625,
0.0517578125,
0.0004444122314453125,
0.0301971435546875,
0.018341064453125,
-0.0034236907958984375,
0.00543975830078125,
-0.0034427642822265625,
-0.0186309814453125,
-0.043060302734375,
0.00250244140625,
-0.0084075927734375,
-0.01171112060546875,
0.03070068359375,
-0.0022735595703125,
0.00411224365234375,
-0.0212860107421875,
-0.0027027130126953125,
0.0614013671875,
-0.069091796875,
-0.03729248046875,
0.04437255859375,
-0.0250244140625,
-0.01306915283203125,
-0.0042572021484375,
-0.053985595703125,
0.05828857421875,
0.047119140625,
0.0098724365234375,
-0.001285552978515625,
0.0033931732177734375,
-0.035858154296875,
0.0284881591796875,
-0.052947998046875,
0.06768798828125,
-0.0103302001953125,
-0.0261077880859375,
-0.051483154296875,
0.0247344970703125,
-0.047393798828125,
-0.0203399658203125,
-0.0736083984375,
0.067138671875,
0.002017974853515625,
0.005161285400390625,
-0.02215576171875,
-0.07562255859375,
-0.0095062255859375,
-0.0804443359375,
-0.0257720947265625,
0.01470947265625,
0.0164642333984375,
-0.001251220703125,
-0.033203125,
-0.04718017578125,
-0.01117706298828125,
-0.00571441650390625,
0.00908660888671875,
-0.007419586181640625,
0.0158538818359375,
0.001537322998046875,
0.03814697265625,
0.0194091796875,
-0.033935546875,
-0.00742340087890625,
0.016754150390625,
-0.0550537109375,
0.04193115234375,
0.0037689208984375,
0.038665771484375,
0.01629638671875,
-0.003604888916015625,
0.05987548828125,
0.033416748046875,
-0.057159423828125,
0.0202178955078125,
-0.01055908203125,
-0.00506591796875,
0.0242156982421875,
0.02740478515625,
0.003147125244140625,
-0.036651611328125,
-0.010650634765625,
0.045745849609375,
-0.022369384765625,
0.045684814453125,
0.0083465576171875,
0.041900634765625,
0.007320404052734375,
0.02294921875,
0.045379638671875,
0.053924560546875,
0.00815582275390625,
0.0271453857421875,
-0.026031494140625,
0.006801605224609375,
-0.004955291748046875,
0.0517578125,
-0.015655517578125,
0.030181884765625,
-0.0089111328125,
0.039031982421875,
-0.0026397705078125,
-0.043487548828125,
-0.0133056640625,
-0.0030002593994140625,
0.021331787109375,
-0.02471923828125,
-0.01151275634765625,
-0.0263214111328125,
-0.0191192626953125,
0.0236358642578125,
-0.08135986328125,
0.0306854248046875,
0.038055419921875,
0.05267333984375,
-0.039825439453125,
0.0015668869018554688,
-0.038665771484375,
-0.0224609375,
-0.0029392242431640625,
0.04559326171875,
0.04302978515625,
0.013671875,
-0.01702880859375,
-0.032470703125,
-0.01959228515625,
-0.1048583984375,
-0.00656890869140625,
-0.015625,
0.00415802001953125,
0.0211944580078125,
0.041656494140625,
0.01430511474609375,
0.01446533203125,
0.0106658935546875,
-0.00789642333984375,
0.04248046875,
-0.01390838623046875,
-0.01666259765625,
-0.04833984375,
0.0015401840209960938,
0.0269012451171875,
-0.03607177734375,
-0.069580078125,
-0.0007276535034179688,
0.0152435302734375,
-0.008697509765625,
0.0298004150390625,
0.0283966064453125,
0.0196075439453125,
-0.028717041015625,
-0.01403045654296875,
-0.03240966796875,
0.00785064697265625,
0.013458251953125,
0.01461029052734375,
-0.0030059814453125,
-0.03277587890625,
0.0032024383544921875,
0.037567138671875,
0.0050506591796875,
-0.0195770263671875,
0.047882080078125,
-0.02880859375,
-0.0255584716796875,
-0.030487060546875,
-0.002197265625,
-0.027313232421875,
-0.0238494873046875,
0.0270843505859375,
0.02874755859375,
0.06256103515625,
-0.0281524658203125,
0.01026153564453125,
-0.0181732177734375,
0.0210113525390625,
-0.0413818359375,
-0.01122283935546875,
-0.025909423828125,
0.04205322265625,
-0.03753662109375,
-0.00836944580078125,
0.046905517578125,
-0.0164031982421875,
0.015594482421875,
0.01073455810546875,
0.00901031494140625,
0.030792236328125,
0.0094451904296875,
-0.0081634521484375,
-0.005649566650390625,
-0.06427001953125,
-0.032379150390625,
0.04388427734375,
0.03997802734375,
0.00872039794921875,
-0.04376220703125,
0.003894805908203125,
0.02667236328125,
-0.0904541015625,
-0.1055908203125,
-0.01837158203125,
-0.02679443359375,
-0.0212249755859375,
0.0224609375,
-0.008758544921875,
0.0013589859008789062,
0.0287933349609375,
0.00994873046875,
0.0703125,
-0.027099609375,
-0.1181640625,
-0.043243408203125,
-0.123046875,
-0.0001550912857055664,
-0.01428985595703125,
0.0233612060546875,
-0.004154205322265625,
-0.035980224609375,
-0.0304718017578125,
-0.057952880859375,
-0.0266571044921875,
0.01898193359375,
0.0218505859375,
-0.0107879638671875,
0.00252532958984375,
0.00020444393157958984,
0.016632080078125,
0.004833221435546875,
0.055084228515625,
0.051544189453125,
-0.049591064453125,
0.0117340087890625,
-0.00975799560546875,
-0.00943756103515625,
0.020263671875,
-0.0027256011962890625,
0.004665374755859375,
0.00017535686492919922,
-0.0035915374755859375,
-0.052154541015625,
-0.030242919921875,
-0.02276611328125,
-0.05609130859375,
0.01160430908203125,
0.028533935546875,
0.01561737060546875,
-0.007801055908203125,
0.006511688232421875,
0.026275634765625,
0.0240020751953125,
0.018280029296875,
-0.0498046875,
0.031646728515625,
0.0130615234375,
0.045867919921875,
-0.048858642578125,
0.004749298095703125,
-0.042388916015625,
0.0267333984375,
-0.00852203369140625,
-0.0204620361328125,
0.0024566650390625,
-0.001529693603515625,
0.006641387939453125,
-0.05267333984375,
0.032562255859375,
-0.085693359375,
-0.026214599609375,
-0.0509033203125,
-0.01088714599609375,
-0.01413726806640625,
0.078857421875,
-0.0052642822265625,
-0.017333984375,
-0.0172271728515625,
-0.0026836395263671875,
-0.01096343994140625,
0.0181884765625,
-0.0114288330078125,
-0.00891876220703125,
-0.046783447265625,
-0.0261383056640625,
-0.00894927978515625,
-0.034088134765625,
0.004695892333984375,
0.017913818359375,
-0.0169525146484375,
-0.020843505859375,
0.023773193359375,
0.01123046875,
-0.0269317626953125,
0.0191650390625,
-0.0267181396484375,
-0.005611419677734375,
-0.01556396484375,
0.00732421875,
-0.0504150390625,
-0.034576416015625,
0.0277099609375,
0.060455322265625,
0.0021991729736328125,
-0.019744873046875,
0.0014362335205078125,
0.058258056640625,
-0.0023174285888671875,
-0.0017881393432617188,
0.004669189453125,
-0.007282257080078125,
-0.00991058349609375,
0.045623779296875,
0.00742340087890625,
0.0031871795654296875,
-0.00244140625,
-0.015625,
-0.033111572265625,
-0.0145416259765625,
-0.0207977294921875,
-0.017547607421875,
0.00315093994140625,
-0.03265380859375,
-0.07696533203125,
-0.007434844970703125,
-0.02227783203125,
0.01561737060546875,
-0.0236663818359375,
0.0009918212890625,
-0.01129913330078125,
-0.09613037109375,
0.034698486328125,
-0.040435791015625,
0.003871917724609375,
0.0002548694610595703,
0.0302886962890625,
0.006542205810546875,
-0.015838623046875,
0.036163330078125,
0.004627227783203125,
0.0301361083984375,
-0.0258026123046875,
0.044036865234375,
-0.003204345703125,
-0.0238800048828125,
0.07904052734375,
-0.030731201171875,
0.004535675048828125,
-0.0183258056640625,
-0.007701873779296875,
0.004543304443359375,
-0.0015859603881835938,
0.0006923675537109375,
-0.01629638671875,
0.043731689453125,
0.05657958984375,
0.01080322265625,
-0.01032257080078125,
-0.040008544921875,
0.0282135009765625,
0.032684326171875,
-0.0355224609375,
-0.061004638671875,
-0.07611083984375,
0.042816162109375,
0.018341064453125,
0.035308837890625,
0.01461029052734375,
-0.00542449951171875,
0.081298828125,
0.016448974609375,
-0.0234375,
-0.00957489013671875,
-0.0165863037109375,
-0.006610870361328125,
0.0185699462890625,
-0.0240936279296875,
-0.0290985107421875,
-0.006320953369140625,
-0.0018291473388671875,
0.03179931640625,
0.00504302978515625,
0.0044097900390625,
-0.028961181640625,
-0.02410888671875,
-0.0380859375,
0.00629425048828125,
-0.042266845703125,
0.036895751953125,
0.0657958984375,
-0.015716552734375,
-0.01287078857421875,
-0.051605224609375,
0.00873565673828125,
-0.052459716796875,
-0.0006117820739746094,
-0.004314422607421875,
0.0010251998901367188,
0.01375579833984375,
0.065185546875,
0.043426513671875,
0.0266265869140625,
-0.02978515625,
-0.022918701171875,
-0.02581787109375,
0.0321044921875,
0.030670166015625,
-0.0256195068359375,
-0.0107269287109375,
0.0106353759765625,
0.0301513671875,
-0.063232421875,
-0.022857666015625,
0.01142120361328125,
0.08709716796875,
-0.004673004150390625,
-0.0294647216796875,
0.032501220703125,
-0.019866943359375,
-0.006381988525390625,
0.0296478271484375,
-0.031982421875,
-0.05279541015625,
-0.0191192626953125,
0.008392333984375,
0.02740478515625,
-0.04229736328125,
-0.013671875,
0.022705078125,
-0.039794921875,
0.005084991455078125,
0.03240966796875,
-0.00384521484375,
-0.0157012939453125,
-0.0095977783203125,
0.0185699462890625,
-0.0093841552734375,
-0.005596160888671875,
0.046356201171875,
0.01221466064453125,
-0.04608154296875,
-0.01849365234375,
0.05377197265625,
-0.0009860992431640625,
0.036285400390625,
-0.002044677734375,
-0.039825439453125,
0.079833984375,
-0.01465606689453125,
0.08056640625,
0.02276611328125,
-0.054840087890625,
0.0017337799072265625,
-0.03497314453125,
-0.00646209716796875,
0.01383209228515625,
0.0204315185546875,
-0.019287109375,
-0.0112457275390625,
0.0236663818359375,
0.0204315185546875,
0.02069091796875,
0.0095672607421875,
0.0047760009765625,
0.00394439697265625,
-0.00916290283203125,
0.025238037109375,
-0.0198211669921875,
0.0166778564453125,
0.004070281982421875,
0.024566650390625,
-0.02777099609375,
-0.0003578662872314453,
0.00461578369140625,
-0.0259246826171875,
0.016937255859375,
-0.028656005859375,
-0.057373046875,
0.0034618377685546875,
-0.034210205078125,
0.0217742919921875,
0.05462646484375,
-0.016632080078125,
-0.0059661865234375,
-0.00560760498046875,
0.019195556640625,
-0.0156402587890625,
-0.0164794921875,
-0.03033447265625,
-0.0428466796875,
0.0093231201171875,
0.009918212890625,
0.026611328125,
-0.01544189453125,
0.004177093505859375,
-0.028472900390625,
0.00640106201171875,
-0.029205322265625,
0.0177154541015625,
-0.0289306640625,
0.0038547515869140625,
0.002719879150390625,
0.023193359375,
0.03753662109375,
-0.0178985595703125,
0.0296478271484375,
0.0189666748046875,
-0.031646728515625,
0.058929443359375,
0.036102294921875,
0.056976318359375,
-0.0144805908203125,
0.0012674331665039062,
0.052520751953125,
-0.034027099609375,
-0.002170562744140625,
0.041534423828125,
0.031829833984375,
-0.043304443359375,
-0.0110931396484375,
-0.0175018310546875,
-0.0223541259765625,
0.026519775390625,
-0.02093505859375,
-0.00392913818359375,
0.0038623809814453125,
0.00904083251953125,
0.005474090576171875,
-0.0225677490234375,
-0.00685882568359375,
0.0200958251953125,
-0.01032257080078125,
0.0204925537109375,
0.0139617919921875,
0.00807952880859375,
-0.034698486328125,
-0.0174102783203125,
0.0309600830078125,
-0.00397491455078125,
-0.0178375244140625,
-0.023101806640625,
0.01165008544921875,
-0.034454345703125,
-0.0294647216796875,
0.03216552734375,
-0.0192108154296875,
0.0244903564453125,
-0.005367279052734375,
-0.0127716064453125,
-0.0014619827270507812,
0.045623779296875,
-0.03692626953125,
0.0135650634765625,
0.02410888671875,
-0.042236328125,
0.041290283203125,
-0.033172607421875,
0.0183868408203125,
-0.0196075439453125,
-0.027557373046875,
0.0022602081298828125,
-0.0147552490234375,
-0.042755126953125,
0.0128021240234375,
0.0178985595703125,
0.024627685546875,
-0.035888671875,
-0.01529693603515625,
0.020416259765625,
-0.000278472900390625,
0.0037384033203125,
-0.0276641845703125,
-0.0013895034790039062,
-0.0369873046875,
-0.00798797607421875,
-0.032012939453125,
-0.018524169921875,
0.03411865234375,
-0.029510498046875,
-0.08197021484375,
0.10052490234375,
0.0023059844970703125,
0.07000732421875,
0.007785797119140625,
0.0169830322265625,
-0.0027179718017578125,
0.0023021697998046875,
-0.011932373046875,
0.047637939453125,
-0.0265350341796875,
0.011199951171875,
-0.03790283203125,
-0.00548553466796875,
0.005336761474609375,
0.034515380859375,
0.05267333984375,
0.0186767578125,
-0.05975341796875,
-0.01143646240234375,
0.01641845703125,
0.00969696044921875,
-0.0089874267578125,
0.052490234375,
-0.0245819091796875,
-0.03662109375,
0.0074310302734375,
-0.006183624267578125,
0.024017333984375,
-0.02935791015625,
-0.04583740234375,
-0.030242919921875,
0.0144500732421875,
0.01265716552734375,
-0.01235198974609375,
-0.043365478515625,
-0.0496826171875,
0.0005364418029785156,
0.03778076171875,
0.01629638671875,
0.02435302734375,
-0.005584716796875,
0.0237274169921875,
-0.08648681640625,
0.0229034423828125,
-0.039794921875,
0.055816650390625,
-0.00988006591796875,
-0.001739501953125,
-0.028076171875,
-0.0022430419921875,
0.051177978515625,
-0.032379150390625,
-0.0172119140625,
0.03692626953125,
-0.0169677734375,
0.0751953125,
0.0653076171875,
0.04656982421875,
0.0147857666015625,
-0.0628662109375,
0.042449951171875,
0.0926513671875,
-0.024688720703125,
-0.0254364013671875,
0.014495849609375,
0.025634765625,
0.03460693359375,
0.0030956268310546875,
0.055816650390625,
-0.037445068359375,
0.0010433197021484375,
-0.005016326904296875,
0.0007615089416503906,
0.018157958984375,
0.034454345703125,
0.005279541015625,
-0.018096923828125,
-0.04339599609375,
0.0158843994140625,
-0.052001953125,
0.022918701171875,
0.0194854736328125,
0.06695556640625,
0.0145721435546875,
0.057281494140625,
-0.02264404296875,
-0.0419921875,
0.016876220703125,
-0.004985809326171875,
-0.0191802978515625,
-0.0147857666015625,
-0.0248260498046875,
-0.051971435546875,
0.033172607421875,
0.0528564453125,
0.0251312255859375,
0.011962890625,
0.038238525390625,
0.008514404296875,
-0.020599365234375,
0.0012521743774414062,
0.0168609619140625,
-0.021636962890625,
0.040374755859375,
-0.02203369140625,
0.02191162109375,
-0.024932861328125,
-0.017669677734375,
-0.0225830078125,
0.04522705078125,
-0.009246826171875,
0.0029163360595703125,
0.0225372314453125,
0.0103607177734375,
-0.014312744140625,
0.0111236572265625,
-0.00675201416015625,
0.05291748046875,
0.031280517578125,
-0.00496673583984375,
-0.0310211181640625,
0.027313232421875,
-0.031707763671875,
0.0215911865234375,
0.038818359375,
-0.0012569427490234375,
-0.01898193359375,
-0.019805908203125,
-0.0254669189453125,
0.01763916015625,
-0.003154754638671875,
0.00290679931640625,
0.0179595947265625,
0.00006747245788574219,
-0.0023860931396484375,
-0.0200042724609375,
-0.009368896484375,
0.0124664306640625,
0.00013303756713867188,
0.02484130859375,
0.06884765625,
-0.0160675048828125,
-0.01148223876953125,
-0.0238037109375,
0.00333404541015625,
-0.036773681640625,
-0.004364013671875,
-0.00971221923828125,
-0.01436614990234375,
0.001071929931640625,
0.0100555419921875,
-0.07513427734375,
0.02349853515625,
0.0307464599609375,
0.005321502685546875,
0.0243377685546875,
0.003414154052734375,
0.0156402587890625,
-0.000659942626953125,
0.003726959228515625,
-0.04925537109375,
-0.0914306640625,
-0.06268310546875,
0.01007843017578125,
-0.019927978515625,
0.01273345947265625,
-0.00461578369140625,
0.035675048828125,
0.01026153564453125,
-0.01287078857421875,
0.015655517578125,
-0.02838134765625,
0.03314208984375,
0.04290771484375,
-0.009307861328125,
0.0267181396484375,
0.03582763671875,
-0.0185699462890625,
0.03466796875,
0.01422119140625,
-0.0145263671875,
0.0172119140625,
-0.025146484375,
-0.0111083984375,
-0.00945281982421875,
-0.006999969482421875,
-0.01776123046875,
-0.00823211669921875,
0.0018434524536132812,
-0.0241241455078125,
0.002941131591796875,
-0.00527191162109375,
-0.02008056640625,
-0.00766754150390625,
-0.01393890380859375,
0.016082763671875,
-0.007610321044921875,
-0.0260162353515625,
-0.037933349609375,
0.002002716064453125,
0.0140533447265625,
0.0174560546875,
-0.058837890625,
0.043060302734375,
-0.0160980224609375,
0.02655029296875,
-0.034332275390625,
0.01837158203125,
0.0018320083618164062,
0.0271148681640625,
-0.05255126953125,
0.0101470947265625,
-0.0352783203125,
-0.0159454345703125,
-0.03851318359375,
0.0069580078125,
0.036376953125,
-0.0191650390625,
-0.045989990234375,
-0.0263824462890625,
-0.02044677734375,
0.0257720947265625,
-0.00821685791015625,
0.011932373046875,
0.0220489501953125,
0.0052032470703125,
-0.058868408203125,
-0.041015625,
0.0224609375,
-0.01251983642578125,
-0.027587890625,
-0.03759765625,
-0.0308837890625,
-0.03436279296875,
-0.0501708984375,
-0.0611572265625,
0.0335693359375,
-0.002471923828125,
-0.01812744140625,
-0.05389404296875,
-0.0014848709106445312,
-0.01042938232421875,
0.052337646484375,
0.0028820037841796875,
-0.0537109375,
-0.03314208984375,
0.033416748046875,
0.018096923828125,
0.0361328125,
-0.003894805908203125,
0.01427459716796875,
0.02642822265625,
0.061492919921875,
0.05316162109375,
0.0006699562072753906,
0.0233154296875,
-0.020904541015625,
0.03448486328125,
0.052337646484375,
-0.0215911865234375,
0.01061248779296875,
-0.01239776611328125,
-0.00820159912109375,
0.0135498046875,
-0.036712646484375,
-0.045379638671875,
-0.04034423828125,
0.062286376953125,
-0.0014638900756835938,
0.0124969482421875,
0.003971099853515625,
-0.038421630859375,
-0.0160369873046875,
-0.005672454833984375,
-0.0293426513671875,
0.0160980224609375,
-0.07373046875,
-0.00814056396484375,
-0.0189666748046875,
-0.01233673095703125,
-0.003711700439453125,
0.007659912109375,
-0.018707275390625,
0.020111083984375,
0.0257415771484375,
-0.025299072265625,
-0.0031948089599609375,
0.0286865234375,
0.0352783203125,
-0.031982421875,
-0.0038242340087890625,
-0.00885009765625,
0.0093536376953125,
-0.01074981689453125,
-0.059234619140625,
0.0279388427734375,
0.04510498046875,
-0.005279541015625,
-0.00506591796875,
0.04345703125,
0.0235748291015625,
0.0022449493408203125,
-0.0245361328125,
0.00933837890625,
0.0115203857421875,
-0.0177001953125,
0.00820159912109375,
-0.0012111663818359375,
0.0131683349609375,
-0.01186370849609375,
0.055511474609375,
0.016510009765625,
-0.049957275390625,
-0.00719451904296875,
0.04608154296875,
-0.04010009765625,
-0.01206207275390625,
-0.024749755859375,
-0.0249481201171875,
0.00919342041015625,
0.0252685546875,
0.044342041015625,
-0.0224761962890625,
0.024261474609375,
-0.06256103515625,
0.0240325927734375,
0.00792694091796875
] |
72d57d4bf9c0a1b26ff07009ec6629bda56f592d
|
Wordpress Stackexchange
Q: get_terms by custom post type I have two custom post types 'country' and 'city' and a shared taxonomy 'flag'.
If I use:
<?php $flags = get_terms('flag', 'orderby=name&hide_empty=0');
I get a list of all terms in the taxonomy, but I want to limit the list to the post type 'country'.
How can I do it?
Using the new solution
<?php
$flags = wpse57444_get_terms('flags',array('parent' => 0,'hide_empty' => 1,'post_types' =>array('country')));
foreach ($flags as $flag) {
$childTerms = wpse57444_get_terms('flags',array('parent' => $flag->term_id,'hide_empty' => 1,'post_types' =>array('country')));
foreach ($childTerms as $childTerm) {
echo $childTerm->name.'<br />';
}
}
?>
I can't echo $childTerm->name. Why?
A: Two custom post types 'country' and 'city' and a shared taxonomy 'flag'. You want to limit the list to the post type 'country'.
Here is a more simple solution:
$posts_in_post_type = get_posts( array(
'fields' => 'ids',
'post_type' => 'country',
'posts_per_page' => -1,
) );
$terms = wp_get_object_terms( $posts_in_post_type, 'flag', array( 'ids' ) ); ?>
|
Q: get_terms by custom post type I have two custom post types 'country' and 'city' and a shared taxonomy 'flag'.
If I use:
<?php $flags = get_terms('flag', 'orderby=name&hide_empty=0');
I get a list of all terms in the taxonomy, but I want to limit the list to the post type 'country'.
How can I do it?
Using the new solution
<?php
$flags = wpse57444_get_terms('flags',array('parent' => 0,'hide_empty' => 1,'post_types' =>array('country')));
foreach ($flags as $flag) {
$childTerms = wpse57444_get_terms('flags',array('parent' => $flag->term_id,'hide_empty' => 1,'post_types' =>array('country')));
foreach ($childTerms as $childTerm) {
echo $childTerm->name.'<br />';
}
}
?>
I can't echo $childTerm->name. Why?
A: Two custom post types 'country' and 'city' and a shared taxonomy 'flag'. You want to limit the list to the post type 'country'.
Here is a more simple solution:
$posts_in_post_type = get_posts( array(
'fields' => 'ids',
'post_type' => 'country',
'posts_per_page' => -1,
) );
$terms = wp_get_object_terms( $posts_in_post_type, 'flag', array( 'ids' ) ); ?>
A: @stephen-harris's answer above only worked for me partially. If I tried to use it twice on the page, it didn't work. Also, the idea of burying mysql queries like that worries me - I think its better practice to use core methods to achieve a solution, to avoid conflicts with future WP updates. Here is my solution, based on some comment #7 on on the Trac ticket he reference
function get_terms_by_custom_post_type( $post_type, $taxonomy ){
$args = array( 'post_type' => $post_type);
$loop = new WP_Query( $args );
$postids = array();
// build an array of post IDs
while ( $loop->have_posts() ) : $loop->the_post();
array_push($postids, get_the_ID());
endwhile;
// get taxonomy values based on array of IDs
$regions = wp_get_object_terms( $postids, $taxonomy );
return $regions;
}
Usage:
$terms = get_terms_by_custom_post_type('country','flag');
This works for only one post type and one taxonomy, because that is what I needed, but it wouldn't be too hard to modify this to accept multiple values.
There was some mention on that Trac thread that this may not scale well, but I'm working on a pretty small scale and have had no problems with speed.
A: I'm afraid this isn't possible natively (yet?). See this trac: http://core.trac.wordpress.org/ticket/18106
Similarly on the taxonomy admin page the post count reflects all post types. (I'm pretty sure there is a trac ticket for that too)
http://core.trac.wordpress.org/ticket/14084
See also, this related post.
New solution
Having written the one below, I've released a much better way (alteast in the sense that you can do more) is to use the filters provided in the get_terms() call. You can create a wrapper function that uses get_terms and (conditionally) adds a filter to manipulate the SQL query (to restrict by post type).
The function takes the same arguments as get_terms($taxonomies, $args). $args takes the additional argument of post_types which takes an array|string of post types.
But I can't gurantee that everything works 'as expected' (I'm thinking padding the count). It does appear to work using just default the $args for get_terms.
function wpse57444_get_terms( $taxonomies, $args=array() ){
//Parse $args in case its a query string.
$args = wp_parse_args($args);
if( !empty($args['post_types']) ){
$args['post_types'] = (array) $args['post_types'];
add_filter( 'terms_clauses','wpse_filter_terms_by_cpt',10,3);
function wpse_filter_terms_by_cpt( $pieces, $tax, $args){
global $wpdb;
// Don't use db count
$pieces['fields'] .=", COUNT(*) " ;
//Join extra tables to restrict by post type.
$pieces['join'] .=" INNER JOIN $wpdb->term_relationships AS r ON r.term_taxonomy_id = tt.term_taxonomy_id
INNER JOIN $wpdb->posts AS p ON p.ID = r.object_id ";
// Restrict by post type and Group by term_id for COUNTing.
$post_types_str = implode(',',$args['post_types']);
$pieces['where'].= $wpdb->prepare(" AND p.post_type IN(%s) GROUP BY t.term_id", $post_types_str);
remove_filter( current_filter(), __FUNCTION__ );
return $pieces;
}
} // endif post_types set
return get_terms($taxonomies, $args);
}
Usage
$args =array(
'hide_empty' => 0,
'post_types' =>array('country','city'),
);
$terms = wpse57444_get_terms('flag',$args);
Original work-around
Inspired from the above trac ticket, (tested, and it works for me)
function wpse57444_filter_terms_by_cpt($taxonomy, $post_types=array() ){
global $wpdb;
$post_types=(array) $post_types;
$key = 'wpse_terms'.md5($taxonomy.serialize($post_types));
$results = wp_cache_get($key);
if ( false === $results ) {
$where =" WHERE 1=1";
if( !empty($post_types) ){
$post_types_str = implode(',',$post_types);
$where.= $wpdb->prepare(" AND p.post_type IN(%s)", $post_types_str);
}
$where .= $wpdb->prepare(" AND tt.taxonomy = %s",$taxonomy);
$query = "
SELECT t.*, COUNT(*)
FROM $wpdb->terms AS t
INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id
INNER JOIN $wpdb->term_relationships AS r ON r.term_taxonomy_id = tt.term_taxonomy_id
INNER JOIN $wpdb->posts AS p ON p.ID = r.object_id
$where
GROUP BY t.term_id";
$results = $wpdb->get_results( $query );
wp_cache_set( $key, $results );
}
return $results;
}
Usage
$terms = wpse57444_filter_terms_by_cpt('flag',array('country','city'));
or
$terms = wpse57444_filter_terms_by_cpt('flag','country');
A: [edit] This is a comment on the excellent answer by Stephen Harris.
It doesn't return any terms if used with multiple post types like this $flags = wpse57444_get_terms('flags', array('post_types' => array('country','city')));. This is because $wpdb->prepare sanitizes the $post_types_str string to p.post_type IN('country,city') while it should be p.post_type IN('country','city'). See this ticket: 11102. Use the solution from this topic to get around this: https://stackoverflow.com/a/10634225
A: I also tried to use @Stephen Harris's answer, but the query I needed was quite hard to write as a single query and using the filter pieces.
Furthermore, I also needed to use that function multiple times in the same page and I solved the problem declaring the wpse_filter_terms_by_cpt function outside the wrapper function.
Anyways @Mark Pruce's answer in my opinion fits better, for the same reasons he said, even though it needs you to make one more query (and the related loop) to prepare the args for the wp_get_object_terms function.
|
wordpress
|
{
"language": "en",
"length": 884,
"provenance": "stackexchange_00019.jsonl.gz:421507",
"question_score": "22",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57444"
}
|
[
0.071044921875,
-0.0003457069396972656,
0.0189971923828125,
-0.0430908203125,
0.0190887451171875,
-0.016571044921875,
0.037506103515625,
-0.0254974365234375,
-0.0172882080078125,
-0.00571441650390625,
-0.063720703125,
-0.0131378173828125,
-0.02264404296875,
-0.01055145263671875,
0.01073455810546875,
-0.06597900390625,
0.030059814453125,
-0.024444580078125,
0.01605224609375,
-0.022918701171875,
0.017242431640625,
-0.01226806640625,
0.0012254714965820312,
0.038116455078125,
0.0191192626953125,
-0.04302978515625,
0.0496826171875,
-0.017547607421875,
0.00879669189453125,
-0.0273895263671875,
0.017791748046875,
0.01776123046875,
0.016998291015625,
-0.0007843971252441406,
0.02838134765625,
0.0032253265380859375,
0.00977325439453125,
-0.00576019287109375,
0.0084686279296875,
0.0298614501953125,
0.003665924072265625,
-0.00922393798828125,
-0.00783538818359375,
0.037139892578125,
-0.0350341796875,
-0.039825439453125,
0.0229034423828125,
-0.0225677490234375,
0.0162811279296875,
-0.00957489013671875,
0.012237548828125,
-0.0156707763671875,
0.0258026123046875,
0.025177001953125,
-0.0178375244140625,
0.017120361328125,
0.017852783203125,
-0.00484466552734375,
0.047271728515625,
-0.025299072265625,
-0.052978515625,
-0.0223388671875,
0.03173828125,
-0.022125244140625,
-0.0099334716796875,
0.01230621337890625,
0.0660400390625,
0.00925445556640625,
-0.02630615234375,
-0.0259552001953125,
0.01568603515625,
-0.005718231201171875,
0.02490234375,
-0.015899658203125,
0.0029354095458984375,
-0.0816650390625,
0.01447296142578125,
-0.06964111328125,
-0.0062408447265625,
0.030059814453125,
-0.043609619140625,
-0.0390625,
-0.039215087890625,
0.0031223297119140625,
-0.0282440185546875,
0.018310546875,
-0.04205322265625,
0.007171630859375,
-0.021453857421875,
-0.044219970703125,
-0.00972747802734375,
-0.004604339599609375,
-0.06341552734375,
0.00876617431640625,
0.0184783935546875,
-0.06353759765625,
0.0153045654296875,
0.01288604736328125,
-0.0401611328125,
-0.036376953125,
0.01120758056640625,
-0.034332275390625,
-0.0160064697265625,
-0.019287109375,
0.0416259765625,
0.042572021484375,
-0.03424072265625,
-0.00795745849609375,
0.07220458984375,
0.02154541015625,
0.033660888671875,
0.03350830078125,
0.01233673095703125,
-0.01488494873046875,
-0.0010671615600585938,
-0.0294036865234375,
-0.036407470703125,
0.020477294921875,
0.01340484619140625,
-0.01219940185546875,
0.028656005859375,
0.028045654296875,
0.0176239013671875,
-0.0017404556274414062,
0.00817108154296875,
0.0110321044921875,
-0.0269012451171875,
-0.03729248046875,
0.032135009765625,
0.061004638671875,
-0.06280517578125,
-0.037017822265625,
0.0269927978515625,
0.017669677734375,
0.0265960693359375,
-0.05328369140625,
0.01360321044921875,
-0.020355224609375,
0.00954437255859375,
0.02496337890625,
0.00603485107421875,
-0.042938232421875,
0.004032135009765625,
0.03070068359375,
0.016143798828125,
0.004337310791015625,
0.0308685302734375,
0.0235748291015625,
0.003627777099609375,
-0.016845703125,
-0.0004603862762451172,
0.01861572265625,
0.047210693359375,
0.014984130859375,
-0.06915283203125,
-0.00916290283203125,
0.035736083984375,
-0.042572021484375,
-0.052581787109375,
-0.069580078125,
0.022796630859375,
-0.010009765625,
-0.0203704833984375,
-0.031585693359375,
-0.044830322265625,
0.0169219970703125,
-0.019775390625,
-0.00667572021484375,
0.024261474609375,
-0.0238189697265625,
0.0849609375,
-0.0152130126953125,
-0.0217132568359375,
0.01152801513671875,
0.019317626953125,
0.0045623779296875,
-0.039276123046875,
-0.04608154296875,
0.042510986328125,
-0.0007996559143066406,
-0.03375244140625,
-0.02850341796875,
-0.00942230224609375,
0.0156707763671875,
-0.045684814453125,
-0.004421234130859375,
0.03179931640625,
0.0107421875,
-0.010589599609375,
0.01027679443359375,
0.068603515625,
0.032501220703125,
-0.0693359375,
0.0026397705078125,
-0.005611419677734375,
-0.0029506683349609375,
-0.0134429931640625,
-0.0146636962890625,
0.0029888153076171875,
0.036590576171875,
0.02587890625,
-0.036834716796875,
0.025634765625,
0.006633758544921875,
0.0007042884826660156,
-0.00974273681640625,
-0.0017557144165039062,
-0.007022857666015625,
-0.0323486328125,
-0.0099334716796875,
0.036376953125,
-0.01397705078125,
-0.0253143310546875,
-0.004268646240234375,
-0.00905609130859375,
0.0311126708984375,
-0.003574371337890625,
0.0235595703125,
0.00797271728515625,
-0.01319122314453125,
0.0132293701171875,
-0.025909423828125,
0.0178070068359375,
0.0255126953125,
0.041778564453125,
0.00699615478515625,
-0.0006537437438964844,
0.006561279296875,
0.07977294921875,
0.044464111328125,
0.0119781494140625,
-0.02813720703125,
0.01422882080078125,
0.00040435791015625,
-0.0016126632690429688,
0.00989532470703125,
0.048095703125,
-0.074951171875,
0.003047943115234375,
0.04547119140625,
0.02227783203125,
0.00470733642578125,
-0.01337432861328125,
0.0119781494140625,
0.07196044921875,
0.0020694732666015625,
0.0039215087890625,
-0.00560760498046875,
0.002223968505859375,
0.04010009765625,
-0.002063751220703125,
0.01338958740234375,
0.0083160400390625,
-0.0125732421875,
0.04522705078125,
0.014801025390625,
-0.0153045654296875,
0.0031337738037109375,
0.01467132568359375,
0.0170135498046875,
-0.0210113525390625,
-0.052825927734375,
-0.0030422210693359375,
-0.039154052734375,
0.040313720703125,
0.00196075439453125,
0.029876708984375,
0.0101470947265625,
-0.04583740234375,
-0.012298583984375,
0.0262451171875,
0.0316162109375,
0.0042877197265625,
0.001102447509765625,
0.0266265869140625,
-0.061187744140625,
-0.01383209228515625,
0.00591278076171875,
-0.001708984375,
-0.02880859375,
0.0056304931640625,
0.01195526123046875,
-0.0037670135498046875,
-0.00623321533203125,
0.004764556884765625,
-0.0274505615234375,
0.004917144775390625,
0.0246124267578125,
-0.01375579833984375,
-0.007335662841796875,
-0.0164337158203125,
0.043975830078125,
-0.0008192062377929688,
0.0242156982421875,
0.023406982421875,
-0.0011806488037109375,
0.036407470703125,
-0.032684326171875,
0.04022216796875,
-0.0294036865234375,
0.01285552978515625,
0.058441162109375,
0.006977081298828125,
-0.0005769729614257812,
-0.0013113021850585938,
-0.028778076171875,
-0.0038776397705078125,
0.01128387451171875,
-0.0198822021484375,
-0.025543212890625,
-0.03759765625,
0.0027866363525390625,
0.01010894775390625,
-0.004451751708984375,
0.01288604736328125,
-0.0001583099365234375,
-0.00809478759765625,
0.00852203369140625,
-0.006122589111328125,
-0.002506256103515625,
0.029876708984375,
-0.04376220703125,
-0.006381988525390625,
-0.0225372314453125,
-0.0261077880859375,
-0.006404876708984375,
-0.036773681640625,
-0.004535675048828125,
0.005931854248046875,
-0.0041046142578125,
-0.05615234375,
-0.032958984375,
-0.057373046875,
-0.0240325927734375,
-0.01216888427734375,
-0.0031986236572265625,
0.0130615234375,
0.07244873046875,
0.0345458984375,
-0.033905029296875,
0.043914794921875,
0.06475830078125,
-0.0306396484375,
0.0361328125,
-0.01180267333984375,
0.0033130645751953125,
0.05804443359375,
0.0038471221923828125,
-0.01189422607421875,
0.0250396728515625,
-0.0123443603515625,
-0.0237579345703125,
0.013702392578125,
0.019378662109375,
0.03985595703125,
-0.0116729736328125,
-0.031890869140625,
0.014190673828125,
0.0347900390625,
-0.0224609375,
-0.0246734619140625,
-0.027618408203125,
-0.03070068359375,
0.034027099609375,
0.0161285400390625,
0.004486083984375,
0.0018520355224609375,
0.0259246826171875,
0.046112060546875,
0.0106964111328125,
-0.039520263671875,
0.006542205810546875,
0.0562744140625,
0.038330078125,
0.067138671875,
-0.00778961181640625,
0.005451202392578125,
-0.0291900634765625,
0.0498046875,
0.01457977294921875,
-0.0031528472900390625,
-0.014923095703125,
-0.0014657974243164062,
-0.038482666015625,
-0.04095458984375,
0.042755126953125,
-0.0394287109375,
0.01113128662109375,
-0.03790283203125,
-0.0215606689453125,
-0.033477783203125,
0.05560302734375,
-0.079345703125,
0.003658294677734375,
-0.0237884521484375,
-0.008514404296875,
0.0185699462890625,
-0.047607421875,
-0.07177734375,
-0.0230865478515625,
-0.08111572265625,
-0.0006356239318847656,
-0.016082763671875,
-0.0225067138671875,
-0.0036487579345703125,
-0.002361297607421875,
-0.03326416015625,
-0.03948974609375,
0.042510986328125,
-0.04632568359375,
-0.0068359375,
0.0174407958984375,
-0.0196990966796875,
-0.020660400390625,
-0.041015625,
-0.00516510009765625,
-0.061431884765625,
-0.005901336669921875,
0.05780029296875,
-0.0028228759765625,
-0.027496337890625,
-0.02911376953125,
-0.005641937255859375,
0.04779052734375,
0.0203704833984375,
0.002658843994140625,
-0.0031528472900390625,
-0.0128021240234375,
-0.0105438232421875,
0.037811279296875,
0.0126800537109375,
0.0026950836181640625,
-0.0160675048828125,
0.00585174560546875,
-0.01532745361328125,
0.0269927978515625,
-0.011383056640625,
-0.0008382797241210938,
0.0202789306640625,
-0.037109375,
-0.06146240234375,
-0.021026611328125,
-0.027801513671875,
0.013671875,
-0.03643798828125,
0.006427764892578125,
-0.0274658203125,
-0.064208984375,
0.0250091552734375,
0.017181396484375,
-0.022003173828125,
0.02374267578125,
0.0662841796875,
0.0116424560546875,
-0.01763916015625,
-0.11663818359375,
0.010009765625,
0.0164642333984375,
0.0033550262451171875,
0.04901123046875,
0.00464630126953125,
-0.0248260498046875,
0.06695556640625,
-0.0023136138916015625,
-0.02728271484375,
0.0184173583984375,
0.04437255859375,
0.006984710693359375,
0.0016222000122070312,
-0.01446533203125,
-0.0231475830078125,
0.01114654541015625,
-0.0010128021240234375,
-0.0228729248046875,
-0.030487060546875,
0.005382537841796875,
0.07611083984375,
-0.0235595703125,
0.02996826171875,
-0.050323486328125,
-0.053741455078125,
0.047332763671875,
-0.0120391845703125,
-0.01285552978515625,
-0.012115478515625,
-0.0016002655029296875,
-0.00628662109375,
-0.0635986328125,
0.025146484375,
0.043609619140625,
0.06097412109375,
-0.00780487060546875,
0.03948974609375,
0.06292724609375,
0.012908935546875,
0.001678466796875,
-0.004261016845703125,
-0.001087188720703125,
-0.031646728515625,
-0.054351806640625,
-0.01267242431640625,
-0.01062774658203125,
0.030914306640625,
0.03729248046875,
0.019561767578125,
0.04730224609375,
0.0233001708984375,
-0.003192901611328125,
0.0003745555877685547,
-0.00649261474609375,
0.025238037109375,
-0.0377197265625,
0.0102081298828125,
0.0201263427734375,
-0.01190948486328125,
-0.0266265869140625,
0.058990478515625,
-0.02301025390625,
0.0193328857421875,
-0.009033203125,
0.01500701904296875,
-0.01096343994140625,
0.033905029296875,
0.006198883056640625,
0.003753662109375,
-0.0023784637451171875,
0.032501220703125,
0.01239013671875,
-0.0279693603515625,
-0.024444580078125,
-0.0027523040771484375,
0.03057861328125,
-0.0278167724609375,
-0.00824737548828125,
0.039337158203125,
0.0127105712890625,
-0.0037822723388671875,
0.0003840923309326172,
-0.01288604736328125,
0.0027866363525390625,
-0.0303192138671875,
0.01311492919921875,
0.04638671875,
0.0140228271484375,
-0.0281829833984375,
0.033935546875,
-0.041259765625,
0.0013427734375,
-0.0279083251953125,
-0.042022705078125,
0.01910400390625,
0.0390625,
-0.039794921875,
-0.0264434814453125,
-0.00014507770538330078,
-0.0279541015625,
-0.012359619140625,
-0.0109405517578125,
-0.00786590576171875,
-0.0092315673828125,
-0.0281219482421875,
0.045562744140625,
-0.018096923828125,
-0.0148773193359375,
-0.042510986328125,
0.0273284912109375,
0.01192474365234375,
0.0251617431640625,
-0.0293121337890625,
0.020355224609375,
-0.0673828125,
-0.004467010498046875,
-0.040435791015625,
-0.05828857421875,
-0.028594970703125,
0.003063201904296875,
0.014617919921875,
0.02099609375,
0.03045654296875,
-0.0206146240234375,
-0.0213623046875,
0.0235137939453125,
0.035430908203125,
0.036468505859375,
-0.0025920867919921875,
0.034759521484375,
0.00899505615234375,
0.0361328125,
0.01206207275390625,
0.00016033649444580078,
-0.042266845703125,
-0.0126953125,
0.007785797119140625,
-0.135986328125,
-0.01329803466796875,
-0.000667572021484375,
-0.030303955078125,
0.06072998046875,
-0.00897979736328125,
0.020782470703125,
0.039581298828125,
-0.0154876708984375,
0.00732421875,
-0.00945281982421875,
-0.0501708984375,
-0.02496337890625,
0.02606201171875,
-0.0126190185546875,
-0.04327392578125,
0.0089569091796875,
0.0204620361328125,
0.010894775390625,
-0.0026378631591796875,
-0.0146331787109375,
0.01226043701171875,
0.02069091796875,
0.0236358642578125,
-0.01111602783203125,
0.016937255859375,
-0.0015134811401367188,
0.032012939453125,
-0.004245758056640625,
0.0244903564453125,
0.025360107421875,
0.0355224609375,
-0.0142059326171875,
-0.0251007080078125,
0.052490234375,
0.019287109375,
-0.039276123046875,
0.0305023193359375,
-0.034698486328125,
-0.0253143310546875,
-0.0304412841796875,
0.00321197509765625,
-0.0288848876953125,
0.0204925537109375,
0.040191650390625,
0.036224365234375,
-0.01432037353515625,
0.032989501953125,
-0.036895751953125,
-0.00847625732421875,
-0.034698486328125,
-0.05364990234375,
-0.059783935546875,
-0.03460693359375,
0.01409149169921875,
0.005611419677734375,
0.005466461181640625,
0.06976318359375,
0.0124359130859375,
-0.0193023681640625,
-0.0218505859375,
-0.0037384033203125,
0.015838623046875,
-0.02850341796875,
0.0203094482421875,
-0.02606201171875,
-0.0198974609375,
-0.0784912109375,
-0.0137939453125,
-0.004924774169921875,
-0.00811004638671875,
0.046173095703125,
-0.01076507568359375,
0.01290130615234375,
0.055328369140625,
-0.0235748291015625,
0.0244903564453125,
0.029205322265625,
-0.0443115234375,
-0.019805908203125,
-0.0167999267578125,
0.01342010498046875,
0.020233154296875,
-0.03582763671875,
0.0280914306640625,
-0.0265960693359375,
-0.0193328857421875,
-0.017730712890625,
-0.03753662109375,
0.01995849609375,
-0.0155792236328125,
-0.0011081695556640625,
0.046875,
0.0447998046875,
-0.022979736328125,
0.0173187255859375,
-0.004909515380859375,
-0.05743408203125,
-0.060638427734375,
0.0169525146484375,
-0.07513427734375,
-0.0177764892578125,
0.004802703857421875,
-0.06903076171875,
0.07110595703125,
-0.018768310546875,
0.0428466796875,
0.00786590576171875,
0.016693115234375,
-0.0221710205078125,
-0.0123748779296875,
-0.049285888671875,
0.054534912109375,
0.05145263671875,
0.0135498046875,
-0.0377197265625,
-0.0036144256591796875,
-0.0246734619140625,
0.004364013671875,
0.038604736328125,
0.0038318634033203125,
0.001861572265625,
-0.0203704833984375,
0.040252685546875,
0.034210205078125,
-0.0161590576171875,
0.01690673828125,
0.0262908935546875,
0.053802490234375,
0.07476806640625,
-0.0259857177734375,
0.050262451171875,
-0.0153961181640625,
0.002483367919921875,
0.047698974609375,
0.01271820068359375,
-0.002468109130859375,
-0.004901885986328125,
-0.0145416259765625,
-0.036346435546875,
-0.005695343017578125,
0.0214691162109375,
-0.033782958984375,
0.018341064453125,
0.04119873046875,
0.062286376953125,
-0.0216827392578125,
0.009765625,
-0.030029296875,
0.0628662109375,
-0.0015869140625,
0.06036376953125,
0.0360107421875,
0.0058746337890625,
0.06280517578125,
0.0036678314208984375,
0.03387451171875,
0.0206451416015625,
-0.004657745361328125,
0.0288543701171875,
0.01348876953125,
0.0173187255859375,
-0.023956298828125,
0.057403564453125,
0.033538818359375,
0.03265380859375,
-0.053619384765625,
-0.058837890625,
0.023101806640625,
0.0014295578002929688,
-0.00705718994140625,
0.04473876953125,
0.03314208984375,
0.052520751953125,
0.10186767578125,
-0.037109375,
0.028961181640625,
0.029052734375,
0.044281005859375,
-0.00543212890625,
0.02447509765625,
-0.089111328125,
-0.01496124267578125,
-0.046295166015625,
-0.01451873779296875,
0.01294708251953125,
0.01401519775390625,
0.03302001953125,
0.031005859375,
0.042083740234375,
-0.0109405517578125,
0.01538848876953125,
0.002429962158203125,
0.00243377685546875,
-0.0208740234375,
0.0016326904296875,
-0.0227508544921875,
0.0009121894836425781,
0.0155181884765625,
0.03802490234375,
-0.041229248046875,
0.0133209228515625,
0.028167724609375,
0.0005764961242675781,
-0.00984954833984375,
0.032440185546875,
0.009429931640625,
-0.038726806640625,
-0.0247802734375,
-0.004528045654296875,
0.034271240234375,
-0.00307464599609375,
0.04010009765625,
-0.005619049072265625,
0.042022705078125,
-0.023406982421875,
0.06036376953125,
-0.003795623779296875,
0.00614166259765625,
0.0231781005859375,
0.002414703369140625,
0.0127716064453125,
0.00044417381286621094,
-0.0760498046875,
-0.006069183349609375,
-0.058624267578125,
-0.06298828125,
0.055999755859375,
0.052978515625,
0.025604248046875,
-0.023590087890625,
0.0125732421875,
-0.03436279296875,
-0.03521728515625,
0.07220458984375,
0.00922393798828125,
-0.00644683837890625,
0.01212310791015625,
-0.00027489662170410156,
-0.0172576904296875,
-0.0128173828125,
-0.00548553466796875,
0.01525115966796875,
0.032440185546875,
-0.020416259765625,
0.0209808349609375,
0.028533935546875,
-0.043365478515625,
0.0469970703125,
-0.07525634765625,
-0.051849365234375,
0.04217529296875,
-0.010528564453125,
0.00499725341796875,
0.001804351806640625,
0.006816864013671875,
0.015228271484375,
0.06396484375,
-0.0259246826171875,
0.005413055419921875,
-0.01277923583984375,
0.0234527587890625,
-0.0241241455078125,
0.03173828125,
-0.0294342041015625,
-0.01093292236328125,
-0.058929443359375,
-0.065673828125,
0.06353759765625,
0.051177978515625,
0.039703369140625,
0.035308837890625,
-0.0290985107421875,
-0.048797607421875,
0.052093505859375,
-0.06781005859375,
0.035430908203125,
0.022552490234375,
0.0034008026123046875,
-0.029296875,
0.006443023681640625,
-0.013336181640625,
0.00800323486328125,
0.01500701904296875,
0.03009033203125,
0.0145721435546875,
-0.01161956787109375,
0.0010118484497070312,
-0.044677734375,
-0.004184722900390625,
-0.01470184326171875,
-0.0379638671875,
-0.00437164306640625,
-0.0103302001953125,
-0.034393310546875,
-0.0240631103515625,
-0.042510986328125,
-0.042816162109375,
0.0124359130859375,
0.0030689239501953125,
0.022918701171875,
-0.03875732421875,
0.01244354248046875,
-0.00922393798828125,
0.03076171875,
-0.00858306884765625,
-0.01934814453125,
0.002925872802734375,
-0.025177001953125,
0.00965118408203125,
-0.004329681396484375,
0.0015869140625,
0.0011491775512695312,
0.016510009765625,
0.0167388916015625,
0.0191192626953125,
-0.01012420654296875,
0.0221710205078125,
0.02459716796875,
0.006954193115234375,
0.016876220703125,
-0.023101806640625,
0.0025997161865234375,
0.028228759765625,
0.03558349609375,
0.0506591796875,
0.0222320556640625,
-0.0181884765625,
0.020538330078125,
-0.01641845703125,
-0.036834716796875,
-0.07330322265625,
0.0229034423828125,
-0.103515625,
-0.0323486328125,
0.013336181640625,
-0.005977630615234375,
0.008209228515625,
-0.0250091552734375,
-0.0428466796875,
0.03924560546875,
0.01078033447265625,
-0.0177001953125,
-0.0745849609375,
0.0078125,
0.0254058837890625,
-0.0210113525390625,
-0.024322509765625,
-0.016754150390625,
-0.05938720703125,
0.0127105712890625,
0.0017232894897460938,
0.00688934326171875,
0.0204315185546875,
-0.00644683837890625,
-0.042083740234375,
0.00714874267578125,
0.010467529296875,
0.0034847259521484375,
-0.0153350830078125,
0.0269012451171875,
-0.0036182403564453125,
0.0343017578125,
-0.00966644287109375,
-0.0182037353515625,
-0.004180908203125,
-0.0209808349609375,
-0.0005359649658203125,
-0.04998779296875,
-0.0278167724609375,
-0.041046142578125,
0.040283203125,
0.0207672119140625,
0.00952911376953125,
0.0010614395141601562,
-0.022796630859375,
0.0109405517578125,
-0.03448486328125,
-0.003780364990234375,
0.030670166015625,
-0.05718994140625,
-0.00872039794921875,
0.005863189697265625,
-0.00797271728515625,
-0.016693115234375,
0.04083251953125,
-0.0252838134765625,
-0.0083160400390625,
0.01837158203125,
-0.01442718505859375,
-0.051025390625,
0.093994140625,
-0.0250701904296875,
-0.0234527587890625,
-0.0253143310546875,
-0.041290283203125,
-0.0251007080078125,
-0.0210723876953125,
-0.06524658203125,
-0.05255126953125,
0.007808685302734375,
0.0207061767578125,
0.004566192626953125,
0.01065826416015625,
-0.01468658447265625,
0.0250091552734375,
0.05072021484375,
-0.035430908203125,
0.0168914794921875,
0.0243988037109375,
0.024810791015625,
-0.0281982421875,
0.031158447265625,
0.036407470703125,
0.01322174072265625,
-0.02166748046875,
0.08758544921875,
0.00897979736328125,
0.01395416259765625,
-0.0249176025390625,
0.027801513671875,
0.026336669921875,
-0.0280609130859375,
0.0025539398193359375,
-0.0078277587890625,
-0.0255889892578125,
-0.033172607421875,
-0.01885986328125,
0.02001953125,
-0.00501251220703125,
0.0066680908203125
] |
bd193a89fc839228fbc70d272e545a1f66b74e81
|
Wordpress Stackexchange
Q: Contact Form 7 - add custom function on email send Just playing around with Wordpress / Contact Form 7.
Is it possible / do you know how to add custom javascript function on successful email send event?
A: simply add you JavaScript function to your page then find the Additional Settings field at the bottom of the contact form management page and use the on_sent_ok JavaScript action hook like so:
on_sent_ok: "MY_JavaScript_function_Name();"
|
Q: Contact Form 7 - add custom function on email send Just playing around with Wordpress / Contact Form 7.
Is it possible / do you know how to add custom javascript function on successful email send event?
A: simply add you JavaScript function to your page then find the Additional Settings field at the bottom of the contact form management page and use the on_sent_ok JavaScript action hook like so:
on_sent_ok: "MY_JavaScript_function_Name();"
|
wordpress
|
{
"language": "en",
"length": 73,
"provenance": "stackexchange_00019.jsonl.gz:421509",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57450"
}
|
[
0.0543212890625,
-0.012939453125,
-0.031768798828125,
-0.07177734375,
-0.001811981201171875,
-0.0262451171875,
-0.00408935546875,
0.020843505859375,
-0.04632568359375,
-0.007354736328125,
0.0176849365234375,
0.017822265625,
-0.0165557861328125,
-0.05322265625,
0.05780029296875,
-0.028472900390625,
0.03216552734375,
0.022308349609375,
0.02252197265625,
-0.0174560546875,
0.0276336669921875,
-0.005489349365234375,
-0.023590087890625,
0.09625244140625,
-0.0160980224609375,
0.03759765625,
0.062347412109375,
-0.00769805908203125,
-0.0111083984375,
0.0016679763793945312,
0.0049591064453125,
-0.0259857177734375,
0.04412841796875,
0.04901123046875,
-0.08905029296875,
0.01538848876953125,
0.00675201416015625,
0.006114959716796875,
-0.037506103515625,
0.065673828125,
0.0416259765625,
-0.0219268798828125,
0.0096588134765625,
0.01512908935546875,
-0.01033782958984375,
-0.042083740234375,
0.041015625,
-0.039337158203125,
0.00286865234375,
-0.01776123046875,
0.004795074462890625,
-0.01084136962890625,
0.01861572265625,
-0.02557373046875,
-0.01800537109375,
-0.0234375,
-0.04296875,
0.03521728515625,
0.01309967041015625,
0.08154296875,
0.0252685546875,
0.036865234375,
-0.029510498046875,
-0.045166015625,
0.007244110107421875,
-0.00782012939453125,
-0.040802001953125,
0.0071868896484375,
-0.0103302001953125,
-0.003570556640625,
0.01206207275390625,
-0.037811279296875,
0.01306915283203125,
0.00789642333984375,
0.0301055908203125,
-0.0408935546875,
0.01432037353515625,
0.00809478759765625,
0.00428009033203125,
0.03759765625,
-0.01544952392578125,
-0.07244873046875,
-0.01120758056640625,
0.0134735107421875,
-0.0217437744140625,
0.036224365234375,
-0.0140838623046875,
0.007110595703125,
-0.0428466796875,
-0.04534912109375,
-0.025390625,
-0.043731689453125,
-0.04522705078125,
-0.035675048828125,
-0.0082855224609375,
-0.038543701171875,
0.0107421875,
-0.0059814453125,
0.0106201171875,
-0.0129852294921875,
0.034423828125,
-0.033538818359375,
0.0027408599853515625,
-0.0066986083984375,
0.0053863525390625,
0.0615234375,
-0.0012826919555664062,
0.0328369140625,
0.0183868408203125,
0.00202178955078125,
0.001331329345703125,
-0.03167724609375,
0.0302581787109375,
0.034698486328125,
-0.028839111328125,
-0.0228424072265625,
-0.02349853515625,
0.01052093505859375,
-0.0265350341796875,
0.0280914306640625,
0.00936126708984375,
0.02178955078125,
0.0111083984375,
-0.004070281982421875,
0.006771087646484375,
-0.016204833984375,
-0.00696563720703125,
-0.0294647216796875,
0.05169677734375,
-0.0390625,
-0.0279083251953125,
0.036041259765625,
0.040802001953125,
0.0269012451171875,
0.01181793212890625,
0.01218414306640625,
0.040313720703125,
-0.01238250732421875,
0.01091766357421875,
0.0146331787109375,
0.025421142578125,
-0.01267242431640625,
-0.0018358230590820312,
0.0248565673828125,
-0.00672149658203125,
0.01381683349609375,
0.005374908447265625,
0.00807952880859375,
0.01004791259765625,
-0.0170440673828125,
-0.018310546875,
-0.01386260986328125,
0.0270843505859375,
0.032379150390625,
-0.05181884765625,
0.036224365234375,
-0.040924072265625,
0.0199127197265625,
-0.0228271484375,
-0.0038089752197265625,
0.02886962890625,
-0.0250244140625,
-0.0204925537109375,
-0.004207611083984375,
-0.019927978515625,
0.01273345947265625,
-0.0361328125,
0.010223388671875,
0.01090240478515625,
-0.005916595458984375,
-0.0255889892578125,
0.014312744140625,
-0.0256195068359375,
0.007450103759765625,
0.0216827392578125,
0.00853729248046875,
0.0175628662109375,
0.0167083740234375,
0.025543212890625,
0.001987457275390625,
-0.0195465087890625,
-0.039154052734375,
0.0712890625,
-0.035430908203125,
-0.044189453125,
0.05572509765625,
0.00267791748046875,
0.056793212890625,
-0.0005865097045898438,
0.011444091796875,
0.0060272216796875,
0.039306640625,
0.016204833984375,
0.0072479248046875,
-0.0198974609375,
-0.052520751953125,
-0.0080413818359375,
-0.0100555419921875,
-0.0289459228515625,
0.03851318359375,
-0.0128631591796875,
-0.01525115966796875,
0.03411865234375,
-0.007724761962890625,
0.0181732177734375,
0.01413726806640625,
-0.0079345703125,
0.022430419921875,
0.0108184814453125,
0.0018787384033203125,
0.0002765655517578125,
-0.00014793872833251953,
-0.004230499267578125,
-0.04803466796875,
-0.036834716796875,
0.0096435546875,
-0.01145172119140625,
0.0711669921875,
-0.0201873779296875,
0.068603515625,
-0.050018310546875,
-0.044921875,
-0.0164337158203125,
0.0038928985595703125,
-0.0271453857421875,
-0.01413726806640625,
-0.0389404296875,
-0.006534576416015625,
-0.0430908203125,
-0.009429931640625,
-0.0111846923828125,
0.07843017578125,
0.01355743408203125,
0.0227203369140625,
-0.0309906005859375,
-0.0041046142578125,
0.01348876953125,
-0.0148773193359375,
0.0087890625,
0.0203399658203125,
0.0248565673828125,
0.037078857421875,
0.0096588134765625,
0.042938232421875,
0.05609130859375,
0.0171356201171875,
0.036376953125,
0.00978851318359375,
0.031646728515625,
0.042816162109375,
-0.04833984375,
-0.030853271484375,
0.02044677734375,
-0.10394287109375,
0.01543426513671875,
0.04925537109375,
-0.03814697265625,
-0.07000732421875,
0.029693603515625,
-0.028076171875,
0.0286407470703125,
-0.017852783203125,
-0.0545654296875,
0.0145111083984375,
0.0163116455078125,
0.00836181640625,
0.04217529296875,
0.0267333984375,
0.007068634033203125,
-0.007110595703125,
-0.00013780593872070312,
-0.039154052734375,
0.0007729530334472656,
0.0148468017578125,
0.0282745361328125,
0.06982421875,
-0.032012939453125,
-0.02227783203125,
0.0286102294921875,
0.0281982421875,
0.014373779296875,
0.019622802734375,
-0.01073455810546875,
-0.0070953369140625,
0.0157012939453125,
-0.029510498046875,
-0.004886627197265625,
0.0196380615234375,
0.02520751953125,
0.01105499267578125,
0.03448486328125,
0.01474761962890625,
-0.0221099853515625,
0.043853759765625,
-0.0156707763671875,
-0.03277587890625,
-0.0318603515625,
-0.01369476318359375,
0.030914306640625,
-0.033843994140625,
-0.0012388229370117188,
0.054534912109375,
-0.022125244140625,
0.035888671875,
0.0037746429443359375,
-0.03863525390625,
-0.0189208984375,
0.055419921875,
0.023529052734375,
-0.0440673828125,
0.0181427001953125,
0.05078125,
0.0016107559204101562,
0.0009765625,
-0.02166748046875,
-0.034210205078125,
-0.0122833251953125,
-0.01776123046875,
-0.07977294921875,
-0.076171875,
0.01323699951171875,
-0.049591064453125,
-0.037078857421875,
0.006336212158203125,
-0.038238525390625,
0.01293182373046875,
0.0196075439453125,
-0.003986358642578125,
-0.049530029296875,
-0.00821685791015625,
-0.020233154296875,
-0.05230712890625,
-0.053955078125,
0.0148773193359375,
-0.003856658935546875,
0.03369140625,
-0.005786895751953125,
0.02532958984375,
-0.01427459716796875,
-0.05517578125,
-0.004383087158203125,
0.011383056640625,
0.00850677490234375,
0.01494598388671875,
-0.028533935546875,
-0.0123443603515625,
0.0247039794921875,
-0.01087188720703125,
-0.0372314453125,
0.0162200927734375,
0.0038356781005859375,
-0.007228851318359375,
-0.03985595703125,
-0.0219268798828125,
-0.02044677734375,
0.0309906005859375,
0.05126953125,
-0.029052734375,
0.0220489501953125,
-0.0474853515625,
0.019317626953125,
0.040496826171875,
0.022674560546875,
-0.0562744140625,
-0.045318603515625,
-0.03790283203125,
-0.01398468017578125,
0.020172119140625,
0.01690673828125,
0.0201263427734375,
-0.003986358642578125,
-0.003459930419921875,
0.0303802490234375,
0.00392913818359375,
0.01152801513671875,
-0.00791168212890625,
0.040802001953125,
-0.013580322265625,
0.03668212890625,
0.033905029296875,
0.036865234375,
0.018341064453125,
-0.01287841796875,
-0.033966064453125,
-0.0655517578125,
0.0286102294921875,
-0.032135009765625,
-0.0132598876953125,
-0.004680633544921875,
-0.01366424560546875,
0.04180908203125,
0.09490966796875,
0.039581298828125,
-0.023284912109375,
0.02069091796875,
0.0000616312026977539,
-0.0158538818359375,
0.0028514862060546875,
-0.0305328369140625,
-0.01297760009765625,
-0.037933349609375,
0.033355712890625,
0.0033111572265625,
0.00574493408203125,
-0.033233642578125,
0.05621337890625,
-0.01009368896484375,
-0.0237274169921875,
0.00868988037109375,
-0.02490234375,
-0.019927978515625,
0.0036334991455078125,
-0.02996826171875,
-0.029541015625,
0.006221771240234375,
-0.017303466796875,
-0.0877685546875,
-0.0032901763916015625,
-0.0400390625,
0.058502197265625,
-0.001560211181640625,
0.0318603515625,
-0.0188140869140625,
0.04046630859375,
0.046905517578125,
-0.0474853515625,
0.04046630859375,
-0.012542724609375,
0.0015478134155273438,
-0.016204833984375,
0.021331787109375,
-0.055755615234375,
0.00864410400390625,
0.0025196075439453125,
-0.0423583984375,
0.00634765625,
-0.008880615234375,
-0.0268096923828125,
0.043426513671875,
-0.04888916015625,
-0.057830810546875,
-0.0460205078125,
-0.04571533203125,
-0.00826263427734375,
-0.025390625,
-0.005382537841796875,
-0.031463623046875,
-0.054412841796875,
-0.036590576171875,
-0.040252685546875,
-0.034027099609375,
0.025787353515625,
0.01328277587890625,
0.032806396484375,
0.01739501953125,
0.00839996337890625,
-0.00478363037109375,
0.04827880859375,
0.034698486328125,
-0.0310821533203125,
-0.02490234375,
-0.0599365234375,
0.049346923828125,
0.034332275390625,
0.00861358642578125,
-0.059844970703125,
0.104248046875,
0.021484375,
0.04461669921875,
-0.012420654296875,
0.00801849365234375,
-0.0004315376281738281,
-0.0260162353515625,
-0.0179901123046875,
-0.00957489013671875,
0.02081298828125,
0.015106201171875,
-0.04229736328125,
0.08172607421875,
0.01552581787109375,
-0.04412841796875,
0.0189056396484375,
-0.026580810546875,
0.052093505859375,
0.021575927734375,
-0.004276275634765625,
0.0254058837890625,
0.006259918212890625,
0.0028228759765625,
0.00951385498046875,
-0.0186309814453125,
-0.01593017578125,
0.001861572265625,
0.04071044921875,
-0.0071868896484375,
0.01174163818359375,
-0.0086822509765625,
0.021331787109375,
0.046630859375,
0.00266265869140625,
-0.019683837890625,
-0.005107879638671875,
-0.052825927734375,
-0.0616455078125,
-0.012908935546875,
0.01207733154296875,
0.046356201171875,
0.0032825469970703125,
0.0201263427734375,
-0.0065155029296875,
0.05224609375,
-0.020782470703125,
-0.00597381591796875,
0.026458740234375,
-0.030029296875,
-0.017852783203125,
0.053619384765625,
0.00830078125,
0.00833892822265625,
-0.00614166259765625,
0.042266845703125,
0.049285888671875,
-0.00933837890625,
0.0265045166015625,
0.01776123046875,
-0.018585205078125,
-0.0169525146484375,
-0.0095367431640625,
-0.03271484375,
-0.01270294189453125,
0.01212310791015625,
0.007659912109375,
0.02752685546875,
0.0294952392578125,
-0.0097808837890625,
0.023040771484375,
-0.0017299652099609375,
-0.033782958984375,
0.0311431884765625,
0.04638671875,
-0.001163482666015625,
-0.03375244140625,
-0.023712158203125,
0.05322265625,
0.01611328125,
0.038360595703125,
-0.006427764892578125,
0.03375244140625,
0.0122833251953125,
0.05377197265625,
-0.05078125,
-0.060546875,
0.0295562744140625,
0.021331787109375,
-0.00882720947265625,
-0.07861328125,
-0.0531005859375,
-0.006740570068359375,
0.0147705078125,
0.045196533203125,
-0.0273895263671875,
-0.0008244514465332031,
-0.025634765625,
0.0178985595703125,
-0.023590087890625,
0.01751708984375,
0.03912353515625,
0.01222991943359375,
-0.036163330078125,
-0.0030651092529296875,
-0.0289459228515625,
-0.0170745849609375,
-0.05303955078125,
-0.035888671875,
-0.030181884765625,
0.0184173583984375,
0.005527496337890625,
0.0304412841796875,
-0.0187835693359375,
-0.0479736328125,
-0.0093231201171875,
-0.003475189208984375,
0.01287078857421875,
0.0236053466796875,
0.00397491455078125,
0.02777099609375,
-0.013153076171875,
0.049163818359375,
0.0083160400390625,
-0.004123687744140625,
-0.03741455078125,
-0.0188140869140625,
-0.00913238525390625,
-0.048797607421875,
-0.010406494140625,
-0.006595611572265625,
-0.006977081298828125,
0.02734375,
0.0291748046875,
0.005207061767578125,
0.01158905029296875,
-0.030120849609375,
-0.0017805099487304688,
-0.018341064453125,
0.01094818115234375,
-0.03912353515625,
-0.007709503173828125,
0.01206207275390625,
0.005619049072265625,
0.07135009765625,
-0.0229339599609375,
-0.01232147216796875,
0.04437255859375,
-0.0226287841796875,
0.06109619140625,
-0.021820068359375,
-0.033203125,
0.0555419921875,
0.0161895751953125,
-0.01186370849609375,
0.01146697998046875,
0.017120361328125,
0.017425537109375,
-0.0010824203491210938,
0.050506591796875,
-0.0199737548828125,
-0.05303955078125,
0.007312774658203125,
-0.0004565715789794922,
-0.018402099609375,
-0.019012451171875,
-0.00817108154296875,
0.0391845703125,
0.0626220703125,
0.0941162109375,
-0.11517333984375,
0.035430908203125,
0.022857666015625,
0.0012350082397460938,
0.039031982421875,
-0.036895751953125,
-0.00042724609375,
-0.005519866943359375,
0.03216552734375,
0.032989501953125,
-0.0203857421875,
0.00817108154296875,
0.0146636962890625,
-0.02362060546875,
-0.01824951171875,
0.005580902099609375,
0.007793426513671875,
0.0174102783203125,
-0.0187530517578125,
-0.0252838134765625,
-0.009552001953125,
-0.00830078125,
0.033233642578125,
-0.01322174072265625,
-0.014862060546875,
-0.0322265625,
0.02239990234375,
0.006389617919921875,
-0.0189056396484375,
-0.06158447265625,
-0.011688232421875,
0.03472900390625,
0.02001953125,
-0.0045013427734375,
-0.048797607421875,
0.01212310791015625,
-0.0177459716796875,
0.01983642578125,
-0.0238494873046875,
0.0303802490234375,
0.016510009765625,
-0.047332763671875,
0.01251983642578125,
-0.0045013427734375,
-0.0323486328125,
-0.020599365234375,
0.01126861572265625,
0.0816650390625,
-0.0070953369140625,
-0.03619384765625,
0.0531005859375,
0.021514892578125,
-0.05218505859375,
-0.0236358642578125,
-0.0245208740234375,
-0.034759521484375,
0.0008425712585449219,
-0.039398193359375,
-0.059814453125,
0.0118865966796875,
-0.03057861328125,
-0.03302001953125,
0.0892333984375,
0.00018906593322753906,
-0.016387939453125,
-0.00010293722152709961,
0.0506591796875,
-0.0146636962890625,
0.04522705078125,
0.0019855499267578125,
0.01558685302734375,
-0.021453857421875,
-0.0010576248168945312,
-0.036865234375,
-0.007465362548828125,
-0.0249786376953125,
0.041412353515625,
0.025909423828125,
-0.0108489990234375,
0.025390625,
0.026580810546875,
0.07098388671875,
0.05157470703125,
0.0005707740783691406,
-0.0169677734375,
-0.01702880859375,
0.0011224746704101562,
0.0489501953125,
0.01528167724609375,
0.03680419921875,
0.03466796875,
-0.050445556640625,
0.0232696533203125,
0.006500244140625,
0.011566162109375,
-0.03997802734375,
-0.0007848739624023438,
0.0202178955078125,
-0.031890869140625,
-0.021270751953125,
-0.005405426025390625,
-0.054840087890625,
0.017486572265625,
-0.04949951171875,
-0.0438232421875,
-0.0189971923828125,
-0.037322998046875,
0.004947662353515625,
-0.0248565673828125,
0.02069091796875,
0.04400634765625,
0.032379150390625,
-0.0041961669921875,
-0.00836944580078125,
0.01541900634765625,
0.00959014892578125,
-0.02215576171875,
0.028533935546875,
-0.03228759765625,
0.007312774658203125,
-0.06451416015625,
0.005321502685546875,
-0.007450103759765625,
0.0155029296875,
-0.037078857421875,
0.007793426513671875,
0.0157012939453125,
0.0227203369140625,
-0.0012655258178710938,
-0.040008544921875,
-0.00235748291015625,
-0.005268096923828125,
0.0068206787109375,
-0.0299530029296875,
-0.020965576171875,
0.0115966796875,
0.017608642578125,
0.001712799072265625,
0.012847900390625,
0.0016565322875976562,
-0.034027099609375,
-0.049224853515625,
0.016632080078125,
-0.01403045654296875,
0.041046142578125,
0.032928466796875,
0.0552978515625,
-0.0009822845458984375,
-0.022735595703125,
-0.02105712890625,
0.016845703125,
0.02764892578125,
0.0107269287109375,
-0.0015544891357421875,
0.035858154296875,
-0.0017557144165039062,
0.0203094482421875,
0.005481719970703125,
0.060821533203125,
0.0256500244140625,
0.00527191162109375,
-0.002643585205078125,
0.0004723072052001953,
0.014862060546875,
-0.038482666015625,
0.0233306884765625,
-0.0361328125,
0.0513916015625,
0.03179931640625,
0.013671875,
-0.0106658935546875,
-0.004009246826171875,
0.0732421875,
-0.0245208740234375,
0.0073394775390625,
-0.01335906982421875,
-0.04119873046875,
0.0452880859375,
-0.005451202392578125,
0.0872802734375,
0.00012362003326416016,
-0.0927734375,
-0.040924072265625,
-0.00667572021484375,
-0.00875091552734375,
0.0494384765625,
0.050567626953125,
-0.01375579833984375,
0.01194000244140625,
0.021636962890625,
-0.0050048828125,
0.033355712890625,
0.012786865234375,
-0.046875,
-0.01171875,
0.059783935546875,
-0.007297515869140625,
-0.04608154296875,
-0.0318603515625,
0.00881195068359375,
0.0245819091796875,
-0.006885528564453125,
0.023834228515625,
-0.0010223388671875,
0.003414154052734375,
-0.022369384765625,
0.01342010498046875,
-0.0039215087890625,
-0.0240325927734375,
0.056182861328125,
0.0304718017578125,
-0.0185699462890625,
-0.03240966796875,
-0.006763458251953125,
0.035369873046875,
-0.003170013427734375,
-0.01702880859375,
0.026275634765625,
-0.0248260498046875,
0.0111083984375,
0.00151824951171875,
0.00878143310546875,
-0.023223876953125,
-0.01190948486328125,
-0.007678985595703125,
-0.033447265625,
0.01837158203125,
0.00926971435546875,
0.03466796875,
0.032806396484375,
0.00412750244140625,
0.01296234130859375,
-0.0052490234375,
-0.015594482421875,
0.0043487548828125,
0.037506103515625,
-0.0362548828125,
-0.0005254745483398438,
-0.014892578125,
-0.0219573974609375,
0.037506103515625,
-0.0205078125,
0.03857421875,
-0.00510406494140625,
-0.0298309326171875,
-0.00974273681640625,
0.01093292236328125,
0.0197296142578125,
-0.0168609619140625,
0.007617950439453125,
-0.012542724609375,
-0.0179595947265625,
-0.000782012939453125,
-0.01003265380859375,
-0.0286102294921875,
-0.0239410400390625,
0.028106689453125,
0.018951416015625,
0.033447265625,
0.0110321044921875,
0.021759033203125,
0.0081939697265625,
0.01462554931640625,
-0.01139068603515625,
-0.039337158203125,
-0.0019702911376953125,
-0.0019741058349609375,
0.0653076171875,
-0.0125274658203125,
0.01202392578125,
-0.0033779144287109375,
0.0195159912109375,
-0.0161895751953125,
-0.059112548828125,
-0.0146331787109375,
0.0693359375,
0.0030002593994140625,
0.004852294921875,
0.037078857421875,
-0.0028285980224609375,
-0.035491943359375,
0.0301666259765625,
-0.0030918121337890625,
0.08392333984375,
-0.0269775390625,
-0.033538818359375,
0.0157012939453125,
-0.005481719970703125,
-0.003082275390625,
0.002941131591796875,
0.006229400634765625,
-0.00981903076171875,
-0.025634765625,
-0.01241302490234375,
0.005649566650390625,
0.01140594482421875,
-0.03277587890625,
-0.09283447265625,
0.008575439453125,
-0.007801055908203125,
-0.038787841796875,
-0.048675537109375,
0.024871826171875,
0.022308349609375,
-0.038909912109375,
-0.03424072265625,
0.0180511474609375,
-0.038482666015625,
-0.0013933181762695312,
0.0024776458740234375,
0.0284881591796875,
0.0280303955078125,
0.0092926025390625,
-0.06109619140625,
-0.020477294921875,
-0.035430908203125,
-0.018768310546875,
0.030548095703125,
-0.0256805419921875,
0.033782958984375,
0.03155517578125,
-0.03399658203125,
-0.06024169921875,
-0.021087646484375,
-0.058746337890625,
-0.0306243896484375,
-0.039276123046875,
-0.0001327991485595703,
0.00801849365234375,
0.09210205078125,
0.025634765625,
0.01479339599609375,
-0.036895751953125,
0.002384185791015625,
-0.016845703125,
0.02923583984375,
0.01528167724609375,
-0.0179290771484375,
-0.0008492469787597656,
0.02056884765625,
0.0018377304077148438,
-0.00634765625,
0.01039886474609375,
0.01091766357421875,
-0.01485443115234375,
0.0144805908203125,
0.0192413330078125,
-0.02899169921875,
-0.047760009765625,
-0.0029888153076171875,
0.08038330078125,
-0.027130126953125,
0.017730712890625,
0.0278167724609375,
-0.007328033447265625,
0.055511474609375,
0.08135986328125,
0.005878448486328125,
-0.02093505859375,
-0.007663726806640625,
-0.001438140869140625,
0.005947113037109375,
0.0020160675048828125,
0.00980377197265625,
-0.0226287841796875,
-0.0008835792541503906,
0.037841796875,
-0.00665283203125,
0.026031494140625,
-0.064453125,
0.09271240234375,
0.00684356689453125,
0.0732421875,
-0.037139892578125,
-0.020111083984375,
-0.0230255126953125,
-0.004253387451171875,
-0.0018978118896484375,
0.0252685546875,
0.0616455078125,
-0.0303497314453125,
0.01114654541015625,
0.0217742919921875,
0.02081298828125,
-0.0284423828125,
0.024993896484375,
0.0406494140625,
0.0176544189453125,
0.0222320556640625
] |
c58f24b34a41a54278e2d1ba4cc5f4dcdd6553c0
|
Wordpress Stackexchange
Q: Remove "posts" from admin but show a custom post After checking out:
http://codex.wordpress.org/Function_Reference/remove_menu_page,
I successfully use the following code to hide some stuff from the menu:
add_action( 'admin_menu', 'my_remove_menu_pages' );
function my_remove_menu_pages() {
remove_menu_page('link-manager.php');
remove_menu_page('tools.php');
remove_menu_page('users.php');
remove_menu_page('edit-comments.php');
}
However both the "posts page" and a custom post types page seems to run on /wp-admin/edit.php.
So I'm looking for a way to hide the posts menubar but still show the menu for a custom post type I've added.
A: I just tried and remove_menu_page('edit.php'); only removes the Posts Top Level Menu.
All my other custom post types (and I have a lot) still work fine. I have a feeling this is because it does a direct lookup of the exactly slug, not the basename of the file.
|
Q: Remove "posts" from admin but show a custom post After checking out:
http://codex.wordpress.org/Function_Reference/remove_menu_page,
I successfully use the following code to hide some stuff from the menu:
add_action( 'admin_menu', 'my_remove_menu_pages' );
function my_remove_menu_pages() {
remove_menu_page('link-manager.php');
remove_menu_page('tools.php');
remove_menu_page('users.php');
remove_menu_page('edit-comments.php');
}
However both the "posts page" and a custom post types page seems to run on /wp-admin/edit.php.
So I'm looking for a way to hide the posts menubar but still show the menu for a custom post type I've added.
A: I just tried and remove_menu_page('edit.php'); only removes the Posts Top Level Menu.
All my other custom post types (and I have a lot) still work fine. I have a feeling this is because it does a direct lookup of the exactly slug, not the basename of the file.
A: Doing this search, I've found this fine answer by Chris_O. There's even a jQuery solution I proposed there.
Anyway, the function remove_menu_page('edit.php'); only removes the Posts menu.
But, as we learn from Chris answer, remove_menu_page('edit.php?post_type=athletes'); removes the Custom Post Type menu.
To really block access to the URL, as we're merely hiding the menu item, check the following Q&A: Blocking Administrative Access to Authors and Subcribers?
|
wordpress
|
{
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:421514",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57464"
}
|
[
0.0802001953125,
0.01007080078125,
0.041473388671875,
0.034149169921875,
0.0225830078125,
-0.04327392578125,
0.08978271484375,
-0.096923828125,
-0.03277587890625,
0.017364501953125,
0.0313720703125,
-0.01241302490234375,
-0.04681396484375,
-0.049957275390625,
0.0013141632080078125,
-0.03594970703125,
0.0123443603515625,
0.0341796875,
0.06524658203125,
-0.009063720703125,
0.019378662109375,
-0.006832122802734375,
0.0362548828125,
0.01183319091796875,
0.0107269287109375,
-0.0184173583984375,
0.03826904296875,
-0.0027866363525390625,
-0.00289154052734375,
-0.01776123046875,
0.015380859375,
0.005523681640625,
-0.019073486328125,
0.03167724609375,
0.0057830810546875,
-0.0204010009765625,
-0.035430908203125,
0.0396728515625,
0.0232086181640625,
-0.01474761962890625,
0.0014200210571289062,
0.00464630126953125,
0.0188751220703125,
0.0107269287109375,
-0.009765625,
-0.029205322265625,
-0.0037784576416015625,
-0.03704833984375,
0.01617431640625,
-0.024078369140625,
-0.0038394927978515625,
0.0020999908447265625,
0.0214996337890625,
-0.00891876220703125,
-0.019439697265625,
-0.0149688720703125,
0.0054779052734375,
-0.0266571044921875,
0.049530029296875,
0.0239715576171875,
-0.0272674560546875,
-0.031646728515625,
0.01183319091796875,
-0.061065673828125,
-0.020172119140625,
0.0092620849609375,
0.025665283203125,
-0.0005488395690917969,
-0.0986328125,
-0.01456451416015625,
0.061614990234375,
-0.037384033203125,
0.01151275634765625,
-0.005794525146484375,
-0.0266876220703125,
-0.033599853515625,
0.020477294921875,
-0.0221710205078125,
0.015106201171875,
-0.0048370361328125,
0.002685546875,
0.0305633544921875,
-0.058685302734375,
0.006046295166015625,
-0.0142059326171875,
0.01959228515625,
-0.0189056396484375,
-0.026458740234375,
-0.0056915283203125,
-0.007625579833984375,
-0.01739501953125,
-0.040435791015625,
-0.0137176513671875,
0.0259857177734375,
0.00015044212341308594,
-0.0057830810546875,
0.045684814453125,
0.05419921875,
0.01082611083984375,
-0.0013532638549804688,
-0.01363372802734375,
-0.03118896484375,
-0.009674072265625,
-0.0230865478515625,
0.0089569091796875,
0.038787841796875,
-0.0030117034912109375,
0.0205230712890625,
0.05072021484375,
0.023895263671875,
0.023468017578125,
0.0028324127197265625,
-0.01885986328125,
-0.02801513671875,
-0.010711669921875,
0.0167694091796875,
-0.031768798828125,
0.01137542724609375,
0.0123748779296875,
0.004878997802734375,
-0.0174713134765625,
0.00392913818359375,
0.0159149169921875,
-0.007656097412109375,
0.016815185546875,
0.01238250732421875,
-0.03125,
-0.01418304443359375,
0.0128326416015625,
0.036865234375,
-0.06402587890625,
-0.021148681640625,
0.0787353515625,
0.042388916015625,
0.038543701171875,
-0.040740966796875,
-0.004596710205078125,
-0.032684326171875,
-0.0068359375,
0.00533294677734375,
0.0142822265625,
-0.0263519287109375,
-0.0083465576171875,
0.0003123283386230469,
-0.0189056396484375,
0.031982421875,
0.002254486083984375,
-0.006076812744140625,
0.0168609619140625,
-0.049957275390625,
-0.045196533203125,
-0.01934814453125,
0.0300445556640625,
0.028228759765625,
0.00180816650390625,
0.00489044189453125,
0.057098388671875,
-0.0267791748046875,
-0.01556396484375,
-0.027252197265625,
-0.0186767578125,
-0.0199127197265625,
-0.005306243896484375,
-0.045806884765625,
-0.060211181640625,
0.031524658203125,
-0.0195770263671875,
-0.006137847900390625,
0.02777099609375,
-0.033355712890625,
0.049896240234375,
-0.047027587890625,
-0.0010204315185546875,
0.006206512451171875,
0.0163726806640625,
0.0433349609375,
0.0185699462890625,
-0.005748748779296875,
0.0102386474609375,
0.07342529296875,
0.01093292236328125,
-0.0258026123046875,
0.01554107666015625,
-0.01337432861328125,
-0.08514404296875,
0.0323486328125,
0.01605224609375,
0.061309814453125,
0.01357269287109375,
0.0167694091796875,
0.09295654296875,
0.01508331298828125,
-0.006488800048828125,
-0.0183563232421875,
-0.00513458251953125,
-0.00428009033203125,
-0.01337432861328125,
0.009735107421875,
-0.0168609619140625,
0.0075225830078125,
-0.021026611328125,
0.025634765625,
-0.012725830078125,
0.03692626953125,
-0.05731201171875,
0.028350830078125,
-0.037567138671875,
0.052703857421875,
0.01340484619140625,
0.0037822723388671875,
0.0103607177734375,
-0.001705169677734375,
-0.0333251953125,
0.0038299560546875,
-0.03448486328125,
-0.00922393798828125,
0.0012493133544921875,
0.0257568359375,
-0.018310546875,
0.0172271728515625,
-0.0206298828125,
-0.0238800048828125,
-0.031005859375,
0.0039520263671875,
0.041595458984375,
-0.0083770751953125,
-0.02288818359375,
-0.0244293212890625,
0.00800323486328125,
-0.004436492919921875,
-0.040740966796875,
0.05364990234375,
0.032318115234375,
0.017822265625,
-0.033111572265625,
-0.0058135986328125,
-0.00659942626953125,
-0.057159423828125,
-0.00437164306640625,
0.04498291015625,
0.026824951171875,
0.03167724609375,
-0.0222320556640625,
-0.00994110107421875,
0.049774169921875,
-0.036895751953125,
0.00675201416015625,
-0.00441741943359375,
0.004119873046875,
0.01125335693359375,
0.04534912109375,
-0.007152557373046875,
0.021087646484375,
-0.0110931396484375,
0.039215087890625,
0.023193359375,
0.0086822509765625,
0.01142120361328125,
0.0135650634765625,
-0.0185089111328125,
0.0155792236328125,
0.0031871795654296875,
-0.031463623046875,
0.0084228515625,
0.0303802490234375,
-0.00998687744140625,
0.0200347900390625,
0.017669677734375,
-0.0380859375,
-0.0276336669921875,
0.041961669921875,
0.059051513671875,
-0.023162841796875,
0.004970550537109375,
0.05743408203125,
-0.04986572265625,
-0.052276611328125,
0.0084381103515625,
-0.01044464111328125,
-0.01326751708984375,
-0.006206512451171875,
0.01690673828125,
0.0149688720703125,
0.00417327880859375,
0.0185699462890625,
-0.04736328125,
0.018585205078125,
0.0226593017578125,
0.0042877197265625,
-0.0105133056640625,
0.0025272369384765625,
0.02435302734375,
-0.02313232421875,
0.039764404296875,
0.00424957275390625,
-0.00643157958984375,
0.04302978515625,
-0.03466796875,
0.0350341796875,
-0.00472259521484375,
0.042755126953125,
0.06866455078125,
0.01409912109375,
0.0097808837890625,
0.0086517333984375,
0.0211181640625,
0.0188140869140625,
0.012298583984375,
0.0060577392578125,
-0.0112457275390625,
-0.007465362548828125,
0.0251007080078125,
0.0125885009765625,
0.0167236328125,
-0.00450897216796875,
-0.047698974609375,
-0.00885772705078125,
0.0092620849609375,
-0.0633544921875,
-0.0184173583984375,
0.01175689697265625,
-0.0261077880859375,
0.0105743408203125,
0.01291656494140625,
-0.01617431640625,
-0.01016998291015625,
0.03509521484375,
0.007411956787109375,
-0.008148193359375,
-0.01001739501953125,
-0.0182952880859375,
-0.00984954833984375,
-0.022796630859375,
0.0198211669921875,
-0.00033736228942871094,
-0.0157470703125,
0.0055999755859375,
0.0692138671875,
0.0028133392333984375,
-0.09503173828125,
0.01129150390625,
0.006313323974609375,
-0.0171051025390625,
0.06561279296875,
0.020843505859375,
-0.0088348388671875,
0.0280914306640625,
0.0126495361328125,
0.023284912109375,
0.020477294921875,
-0.0295257568359375,
-0.0408935546875,
-0.0247955322265625,
-0.0024261474609375,
0.036407470703125,
-0.060516357421875,
0.00392913818359375,
0.02740478515625,
0.0147552490234375,
-0.02081298828125,
-0.03167724609375,
-0.01256561279296875,
-0.03369140625,
0.061920166015625,
-0.0011568069458007812,
0.002910614013671875,
-0.005649566650390625,
0.06878662109375,
0.0340576171875,
0.0174560546875,
0.020782470703125,
-0.0027904510498046875,
0.035308837890625,
0.01036834716796875,
0.029449462890625,
-0.03802490234375,
0.0273895263671875,
-0.0172576904296875,
0.00726318359375,
0.01110076904296875,
0.0025501251220703125,
0.008544921875,
-0.0150604248046875,
-0.0030956268310546875,
-0.054290771484375,
0.059234619140625,
-0.015380859375,
0.0138092041015625,
-0.038909912109375,
-0.0237884521484375,
-0.00897979736328125,
0.09136962890625,
-0.038238525390625,
-0.0201263427734375,
-0.02093505859375,
0.00399017333984375,
0.0107421875,
-0.0287322998046875,
-0.023162841796875,
-0.015350341796875,
-0.1328125,
0.0155181884765625,
0.006275177001953125,
-0.0309906005859375,
-0.03558349609375,
0.0560302734375,
-0.1026611328125,
-0.038848876953125,
0.04498291015625,
-0.036651611328125,
0.04022216796875,
-0.01123046875,
0.01468658447265625,
-0.045623779296875,
-0.0231781005859375,
-0.024566650390625,
-0.07904052734375,
-0.0086822509765625,
-0.01800537109375,
0.0467529296875,
0.00853729248046875,
0.005584716796875,
-0.02783203125,
0.01418304443359375,
0.04376220703125,
0.0192108154296875,
-0.0194854736328125,
-0.0311431884765625,
0.0034236907958984375,
-0.01221466064453125,
-0.01433563232421875,
-0.01412200927734375,
-0.0302734375,
0.003398895263671875,
-0.00473785400390625,
0.02618408203125,
-0.0072784423828125,
-0.0186614990234375,
0.0236053466796875,
-0.0232391357421875,
-0.039337158203125,
-0.0347900390625,
-0.0352783203125,
-0.011444091796875,
-0.01126861572265625,
-0.0103759765625,
-0.0140380859375,
-0.037841796875,
-0.0027256011962890625,
-0.006591796875,
-0.02117919921875,
0.01444244384765625,
0.034423828125,
0.023590087890625,
-0.0006651878356933594,
-0.0184173583984375,
0.017822265625,
0.033172607421875,
-0.0158538818359375,
0.0675048828125,
0.035308837890625,
-0.0032520294189453125,
0.04779052734375,
-0.004566192626953125,
-0.0015859603881835938,
-0.053436279296875,
0.07281494140625,
-0.006633758544921875,
-0.0016117095947265625,
0.0127410888671875,
-0.037689208984375,
0.036773681640625,
0.01554107666015625,
0.00023686885833740234,
-0.04400634765625,
-0.015411376953125,
0.07080078125,
-0.004962921142578125,
0.00408172607421875,
-0.06866455078125,
-0.001007080078125,
-0.001995086669921875,
-0.0158233642578125,
0.037384033203125,
0.004489898681640625,
0.00475311279296875,
-0.00275421142578125,
0.007183074951171875,
0.01192474365234375,
-0.0018739700317382812,
0.028350830078125,
-0.044769287109375,
0.053466796875,
-0.025146484375,
-0.0062408447265625,
-0.000835418701171875,
0.0011310577392578125,
0.038299560546875,
0.0225830078125,
-0.0274505615234375,
-0.056427001953125,
0.02105712890625,
0.053314208984375,
-0.0175018310546875,
0.0045013427734375,
0.034637451171875,
0.0020084381103515625,
0.006572723388671875,
-0.01184844970703125,
-0.0129241943359375,
-0.0242156982421875,
-0.0345458984375,
0.01052093505859375,
0.0224456787109375,
-0.0099334716796875,
0.044097900390625,
0.029754638671875,
0.0034923553466796875,
0.0445556640625,
-0.021331787109375,
0.04443359375,
0.0112762451171875,
0.0306243896484375,
-0.00725555419921875,
0.0274658203125,
0.00567626953125,
-0.0013294219970703125,
-0.006610870361328125,
-0.01218414306640625,
-0.0246429443359375,
0.03466796875,
0.0030231475830078125,
0.036865234375,
0.0243072509765625,
-0.016265869140625,
0.0123138427734375,
-0.04345703125,
0.07098388671875,
0.01473236083984375,
-0.0784912109375,
-0.0364990234375,
0.0254364013671875,
0.0313720703125,
-0.0160980224609375,
-0.027923583984375,
0.03131103515625,
-0.038360595703125,
-0.002696990966796875,
-0.005702972412109375,
-0.062347412109375,
0.015899658203125,
0.032623291015625,
-0.031402587890625,
-0.013702392578125,
0.019195556640625,
-0.06060791015625,
-0.05401611328125,
0.0017185211181640625,
0.01276397705078125,
0.0281982421875,
-0.024658203125,
0.0143585205078125,
-0.013153076171875,
-0.0018281936645507812,
0.006473541259765625,
0.0024814605712890625,
0.064453125,
0.0290985107421875,
-0.066162109375,
0.0262451171875,
-0.043792724609375,
0.0027618408203125,
-0.03631591796875,
-0.038482666015625,
-0.055908203125,
-0.0143280029296875,
0.01320648193359375,
-0.0004115104675292969,
0.020721435546875,
0.00870513916015625,
-0.040435791015625,
0.0261383056640625,
0.0223236083984375,
0.03076171875,
-0.0174713134765625,
0.0743408203125,
-0.020111083984375,
0.0560302734375,
0.0134735107421875,
0.04510498046875,
0.0087890625,
-0.0300140380859375,
0.0311737060546875,
-0.04949951171875,
-0.0418701171875,
-0.013153076171875,
-0.042724609375,
0.01279449462890625,
0.0299835205078125,
-0.015869140625,
-0.002483367919921875,
-0.00415802001953125,
0.005725860595703125,
-0.03924560546875,
0.01003265380859375,
-0.006931304931640625,
0.007843017578125,
-0.033599853515625,
-0.0206146240234375,
0.024444580078125,
0.00821685791015625,
-0.007965087890625,
0.013031005859375,
-0.01461029052734375,
0.0171966552734375,
0.0103607177734375,
-0.031707763671875,
0.049102783203125,
0.0872802734375,
-0.006282806396484375,
0.0458984375,
0.0240478515625,
-0.000568389892578125,
0.0241546630859375,
-0.05120849609375,
0.0186614990234375,
0.019744873046875,
0.04498291015625,
-0.0096588134765625,
0.0199737548828125,
0.058837890625,
-0.01024627685546875,
0.0438232421875,
0.0958251953125,
0.08282470703125,
-0.1395263671875,
0.0175933837890625,
0.0122833251953125,
-0.0037479400634765625,
0.06781005859375,
-0.0008511543273925781,
-0.01084136962890625,
-0.03277587890625,
-0.01029205322265625,
-0.003101348876953125,
-0.0270538330078125,
-0.016876220703125,
0.013397216796875,
-0.0088043212890625,
-0.006805419921875,
0.035003662109375,
0.00962066650390625,
0.00424957275390625,
0.00008529424667358398,
-0.00792694091796875,
0.01361083984375,
-0.0133514404296875,
-0.01015472412109375,
0.0007996559143066406,
-0.018890380859375,
-0.04193115234375,
0.01300811767578125,
-0.055999755859375,
0.01352691650390625,
0.06805419921875,
0.01477813720703125,
-0.00856781005859375,
0.058197021484375,
-0.03900146484375,
0.059326171875,
-0.013946533203125,
-0.01010894775390625,
-0.041107177734375,
-0.04302978515625,
0.0017423629760742188,
0.00833892822265625,
-0.01953125,
0.025238037109375,
-0.00981903076171875,
-0.05108642578125,
-0.006229400634765625,
0.0035037994384765625,
0.129638671875,
-0.038299560546875,
-0.037689208984375,
0.0008015632629394531,
0.0029430389404296875,
-0.0029659271240234375,
0.00760650634765625,
0.01477813720703125,
-0.0119476318359375,
0.024444580078125,
-0.006816864013671875,
-0.001911163330078125,
-0.0183563232421875,
-0.01050567626953125,
-0.0758056640625,
0.10089111328125,
-0.0031833648681640625,
0.04425048828125,
-0.01465606689453125,
0.041290283203125,
0.0030307769775390625,
0.037353515625,
-0.042510986328125,
0.0682373046875,
0.0301666259765625,
0.0484619140625,
-0.044036865234375,
-0.002544403076171875,
0.010406494140625,
0.01934814453125,
0.0282440185546875,
0.00852203369140625,
-0.006145477294921875,
-0.003997802734375,
0.03790283203125,
0.038970947265625,
0.00797271728515625,
0.01165771484375,
-0.003856658935546875,
0.00572967529296875,
0.0102081298828125,
-0.0232086181640625,
0.035400390625,
-0.0181427001953125,
-0.035491943359375,
0.0160064697265625,
0.0259857177734375,
0.027923583984375,
0.0198211669921875,
-0.01013946533203125,
-0.0049285888671875,
0.008880615234375,
0.01392364501953125,
-0.01435089111328125,
-0.0230255126953125,
0.023162841796875,
0.0016613006591796875,
-0.0343017578125,
-0.0394287109375,
-0.0260772705078125,
0.01971435546875,
0.0225830078125,
0.021759033203125,
0.005451202392578125,
0.032562255859375,
-0.020599365234375,
-0.05841064453125,
0.009552001953125,
0.00650787353515625,
-0.07427978515625,
0.0360107421875,
0.0254058837890625,
0.019195556640625,
-0.027740478515625,
0.0087738037109375,
0.02178955078125,
0.043670654296875,
-0.0355224609375,
-0.0285186767578125,
0.01250457763671875,
-0.0053558349609375,
0.0006613731384277344,
-0.0024585723876953125,
0.00940704345703125,
0.016815185546875,
0.0235443115234375,
-0.041229248046875,
0.0070648193359375,
0.0139923095703125,
0.0190887451171875,
-0.0203704833984375,
-0.01538848876953125,
-0.01103973388671875,
0.01288604736328125,
-0.060302734375,
0.019683837890625,
0.025604248046875,
0.04254150390625,
0.028900146484375,
0.027099609375,
0.013763427734375,
-0.0214080810546875,
0.00916290283203125,
0.0215911865234375,
-0.0426025390625,
0.00738525390625,
-0.07696533203125,
-0.0904541015625,
0.006801605224609375,
0.06231689453125,
-0.013702392578125,
-0.007617950439453125,
0.023529052734375,
0.020904541015625,
-0.0142364501953125,
-0.0230560302734375,
0.015289306640625,
-0.012908935546875,
-0.03961181640625,
-0.0154571533203125,
-0.015472412109375,
0.0095367431640625,
-0.0015363693237304688,
0.02008056640625,
0.01299285888671875,
0.004810333251953125,
0.0050506591796875,
0.0153656005859375,
0.00937652587890625,
-0.0234832763671875,
0.0374755859375,
0.0164794921875,
0.04296875,
0.03765869140625,
-0.0704345703125,
-0.0277557373046875,
-0.01324462890625,
-0.0164031982421875,
0.0116424560546875,
0.03009033203125,
-0.0060272216796875,
0.020233154296875,
0.04339599609375,
0.0018453598022460938,
-0.00630950927734375,
-0.004650115966796875,
0.0299530029296875,
-0.0165557861328125,
0.008941650390625,
0.020172119140625,
-0.040740966796875,
-0.034423828125,
-0.000682830810546875,
0.040802001953125,
-0.014739990234375,
0.05120849609375,
-0.01120758056640625,
0.01297760009765625,
-0.0745849609375,
0.03900146484375,
-0.0694580078125,
-0.036865234375,
0.008087158203125,
0.029876708984375,
-0.00592041015625,
0.007152557373046875,
-0.025543212890625,
0.0171051025390625,
0.045013427734375,
-0.044647216796875,
0.01328277587890625,
0.00804901123046875,
-0.0005359649658203125,
-0.054595947265625,
-0.0134735107421875,
-0.01531982421875,
0.022369384765625,
-0.004573822021484375,
-0.0232696533203125,
0.0386962890625,
0.006320953369140625,
-0.0135955810546875,
0.012237548828125,
0.0025310516357421875,
-0.042755126953125,
0.0263519287109375,
-0.0274810791015625,
0.035247802734375,
0.038360595703125,
0.0031833648681640625,
-0.002986907958984375,
0.03802490234375,
0.0009007453918457031,
0.0089874267578125,
0.040985107421875,
-0.012786865234375,
0.0516357421875,
-0.013702392578125,
0.0032405853271484375,
-0.0220794677734375,
0.0272064208984375,
0.003742218017578125,
0.0011224746704101562,
-0.0277557373046875,
0.004791259765625,
-0.0157012939453125,
0.0037059783935546875,
-0.03094482421875,
-0.0171356201171875,
-0.01319122314453125,
0.0238800048828125,
-0.0299072265625,
-0.047821044921875,
-0.11505126953125,
0.00897979736328125,
0.045867919921875,
0.017303466796875,
-0.08868408203125,
0.059173583984375,
-0.04034423828125,
0.03765869140625,
-0.006855010986328125,
0.0181427001953125,
-0.0030231475830078125,
0.0230712890625,
-0.0256500244140625,
-0.0018062591552734375,
-0.0188446044921875,
0.007049560546875,
-0.00518035888671875,
0.00356292724609375,
0.0189971923828125,
-0.02374267578125,
-0.03216552734375,
0.0003325939178466797,
0.0018815994262695312,
0.046234130859375,
0.0253143310546875,
-0.01027679443359375,
-0.0241851806640625,
0.0229949951171875,
-0.0001322031021118164,
-0.03045654296875,
0.0148773193359375,
-0.031036376953125,
-0.033538818359375,
0.0138092041015625,
0.00527191162109375,
0.03076171875,
-0.02734375,
-0.06317138671875,
0.028564453125,
-0.00275421142578125,
-0.035308837890625,
0.006839752197265625,
-0.0008149147033691406,
-0.0204620361328125,
0.0341796875,
0.00948333740234375,
-0.035400390625,
-0.00783538818359375,
0.005954742431640625,
0.004425048828125,
0.0550537109375,
0.00948333740234375,
0.0228729248046875,
-0.01436614990234375,
0.005931854248046875,
-0.0116729736328125,
0.00823211669921875,
0.0169219970703125,
-0.01273345947265625,
0.02056884765625,
0.037017822265625,
-0.04058837890625,
-0.0095367431640625,
-0.016571044921875,
0.002544403076171875,
-0.02484130859375,
-0.017120361328125,
-0.03826904296875,
-0.0185394287109375,
0.07196044921875,
0.07562255859375,
0.0266571044921875,
-0.0225830078125,
-0.00705718994140625,
-0.04693603515625,
-0.0157623291015625,
-0.03009033203125,
0.01299285888671875,
-0.058319091796875,
-0.0017299652099609375,
0.01546478271484375,
-0.0146026611328125,
-0.0200042724609375,
-0.0014181137084960938,
-0.040008544921875,
-0.002368927001953125,
0.0031681060791015625,
0.0213623046875,
-0.04168701171875,
0.00351715087890625,
0.033355712890625,
-0.0264129638671875,
-0.0134124755859375,
-0.0182037353515625,
0.0081787109375,
0.011505126953125,
-0.019927978515625,
-0.02752685546875,
-0.01641845703125,
-0.02056884765625,
0.033416748046875,
-0.0175323486328125,
0.0204925537109375,
-0.037078857421875,
-0.00037789344787597656,
-0.0129547119140625,
0.024932861328125,
0.0080413818359375,
0.03228759765625,
-0.024200439453125,
0.044586181640625,
0.026702880859375,
0.01226806640625,
0.0188751220703125,
0.044677734375,
-0.0005888938903808594,
0.047821044921875,
0.0159454345703125,
-0.043426513671875,
0.03692626953125,
-0.045806884765625,
-0.0248565673828125,
-0.0204010009765625,
-0.03759765625,
-0.09173583984375,
0.030609130859375,
-0.006076812744140625,
0.01861572265625,
0.03778076171875
] |
e8074587b24eb6aa9e26fb7edab6576798aa2bf8
|
Wordpress Stackexchange
Q: Blog Settings import/export in Wordpress Network environment I can't use PHPMyAdmin to export/import my blogs from one server to an other because I'm using Wordpress Network.
Export/import works pretty well for Posts, custom posts types and their media, but not for the Blog settings themselves
How could I export my blog settings?
Some examples:
*
*sizes for Thumbnails, medium, large images
*Pictures cropping
*Date format
*show excerpts
*how many articles per pages
*...
my main goal being to apply all my beta website settings to the main website when fully tested and approved.
A: Export the options table that is specific to the multisite blog in question (just the option names and values), import them into the new options table on the new site.
This will work for every option that doesn't use a prefixed option name, which is only user-specific stuff like capabilities and roles.
|
Q: Blog Settings import/export in Wordpress Network environment I can't use PHPMyAdmin to export/import my blogs from one server to an other because I'm using Wordpress Network.
Export/import works pretty well for Posts, custom posts types and their media, but not for the Blog settings themselves
How could I export my blog settings?
Some examples:
*
*sizes for Thumbnails, medium, large images
*Pictures cropping
*Date format
*show excerpts
*how many articles per pages
*...
my main goal being to apply all my beta website settings to the main website when fully tested and approved.
A: Export the options table that is specific to the multisite blog in question (just the option names and values), import them into the new options table on the new site.
This will work for every option that doesn't use a prefixed option name, which is only user-specific stuff like capabilities and roles.
A: I was thinking about this last night and don't want to 'self promote' too much here
If you can't access PHPMyAdmin, my database backup plugin dbc backup 2 will create the SQL export for you of all tables in your WordPress install.
You can then open the export in a SQL editor like SQLYog and you'll be able to see all the tables in your database.
But from experience you don't save time editing in SQL, many of the things you are looking for like setting post per page, and excerpt length are quicker to change from within WP-Admin then reading through all the rows in the WP_options table.
Remember you can always go to /wp-admin/options.php to see all the options for that site.
Take care - some options in the database have a checkvalue (length) as well
example username admin may have a value of (5) next to it.
|
wordpress
|
{
"language": "en",
"length": 298,
"provenance": "stackexchange_00019.jsonl.gz:421528",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57505"
}
|
[
0.00702667236328125,
-0.04412841796875,
0.03125,
0.057586669921875,
-0.055908203125,
-0.024383544921875,
0.051788330078125,
-0.05169677734375,
0.01401519775390625,
0.0054779052734375,
-0.0273590087890625,
0.0153656005859375,
-0.052001953125,
-0.0193328857421875,
-0.01436614990234375,
-0.036865234375,
0.039825439453125,
-0.033905029296875,
-0.00983428955078125,
-0.011505126953125,
-0.022918701171875,
0.0222015380859375,
0.004650115966796875,
0.013671875,
0.03314208984375,
0.01056671142578125,
0.000514984130859375,
0.0050506591796875,
0.0215911865234375,
0.0174560546875,
0.036224365234375,
-0.050567626953125,
0.0260009765625,
0.0135955810546875,
-0.0286102294921875,
-0.004398345947265625,
0.0187835693359375,
-0.01268768310546875,
-0.014556884765625,
0.042510986328125,
0.008056640625,
-0.0152435302734375,
0.072509765625,
-0.0243682861328125,
0.025360107421875,
-0.036773681640625,
0.0306549072265625,
-0.054931640625,
0.0011854171752929688,
0.00962066650390625,
-0.0009708404541015625,
-0.008056640625,
0.0216064453125,
0.0209808349609375,
-0.034149169921875,
-0.059112548828125,
-0.00795745849609375,
0.03131103515625,
0.038299560546875,
-0.01316070556640625,
-0.035614013671875,
-0.0026073455810546875,
0.01428985595703125,
-0.002254486083984375,
-0.00022602081298828125,
0.004848480224609375,
0.017303466796875,
0.00977325439453125,
-0.0726318359375,
-0.0221710205078125,
0.04681396484375,
-0.043914794921875,
0.04351806640625,
-0.031219482421875,
-0.02947998046875,
0.0229949951171875,
0.0011606216430664062,
0.01345062255859375,
0.035614013671875,
-0.05950927734375,
0.007205963134765625,
0.002422332763671875,
-0.03143310546875,
-0.07305908203125,
0.061767578125,
-0.0172576904296875,
0.007701873779296875,
-0.008544921875,
0.00031495094299316406,
0.00431060791015625,
-0.003978729248046875,
-0.03033447265625,
-0.046661376953125,
0.0712890625,
0.0204620361328125,
-0.01529693603515625,
-0.0163116455078125,
0.0306549072265625,
-0.0217742919921875,
-0.00022554397583007812,
-0.006641387939453125,
-0.0108642578125,
-0.00936126708984375,
-0.021575927734375,
0.00949859619140625,
0.0289459228515625,
-0.0005517005920410156,
-0.034393310546875,
0.0408935546875,
0.021270751953125,
-0.00429534912109375,
0.03411865234375,
0.0017309188842773438,
0.015045166015625,
-0.027008056640625,
0.004001617431640625,
-0.0074615478515625,
0.003086090087890625,
-0.0257110595703125,
-0.00894927978515625,
-0.02001953125,
0.040435791015625,
-0.0606689453125,
-0.0157318115234375,
-0.0272064208984375,
-0.03759765625,
0.030303955078125,
0.00347137451171875,
-0.04632568359375,
0.058319091796875,
-0.0223388671875,
-0.00836181640625,
0.03265380859375,
0.0225677490234375,
-0.022979736328125,
-0.0229034423828125,
0.0355224609375,
-0.005657196044921875,
-0.002773284912109375,
0.0103302001953125,
0.0220489501953125,
-0.047882080078125,
-0.05194091796875,
0.006603240966796875,
-0.007171630859375,
0.028350830078125,
0.039215087890625,
0.0296478271484375,
-0.015899658203125,
-0.056976318359375,
0.018798828125,
0.0111236572265625,
0.027740478515625,
-0.00864410400390625,
0.0210418701171875,
-0.0721435546875,
0.0538330078125,
-0.0621337890625,
0.019317626953125,
-0.06036376953125,
-0.005962371826171875,
0.0094451904296875,
0.0615234375,
-0.00004214048385620117,
0.0004506111145019531,
-0.0116119384765625,
-0.040924072265625,
-0.0102081298828125,
0.0164031982421875,
-0.02081298828125,
-0.061248779296875,
0.00829315185546875,
0.041473388671875,
0.01102447509765625,
-0.0029125213623046875,
0.03033447265625,
0.0029621124267578125,
-0.031463623046875,
0.012542724609375,
0.047027587890625,
-0.0031833648681640625,
-0.02410888671875,
-0.0041961669921875,
0.007282257080078125,
-0.0199432373046875,
-0.0213623046875,
0.0027313232421875,
0.0216217041015625,
0.03436279296875,
0.0286102294921875,
-0.0249481201171875,
-0.022064208984375,
-0.0280914306640625,
-0.0213165283203125,
-0.01482391357421875,
0.01898193359375,
0.006847381591796875,
0.036224365234375,
-0.002655029296875,
-0.01531219482421875,
0.0022449493408203125,
-0.0075531005859375,
0.01454925537109375,
0.0050201416015625,
-0.0070343017578125,
-0.01788330078125,
0.0013408660888671875,
0.0207366943359375,
-0.0030612945556640625,
-0.0005846023559570312,
0.018707275390625,
0.00899505615234375,
-0.013763427734375,
-0.040679931640625,
-0.0256195068359375,
0.027374267578125,
-0.00795745849609375,
0.040740966796875,
-0.0164642333984375,
0.00818634033203125,
-0.02764892578125,
-0.0238037109375,
-0.016204833984375,
0.0396728515625,
0.0162811279296875,
-0.0241851806640625,
-0.0286865234375,
-0.035858154296875,
-0.01451873779296875,
-0.01172637939453125,
0.00493621826171875,
0.051361083984375,
-0.035736083984375,
0.033935546875,
0.01122283935546875,
0.0036754608154296875,
0.03131103515625,
-0.0235443115234375,
0.038330078125,
0.00820159912109375,
0.0271148681640625,
0.0025234222412109375,
-0.0100860595703125,
-0.00955963134765625,
0.005146026611328125,
-0.0015010833740234375,
0.043212890625,
-0.0255126953125,
0.0233612060546875,
0.037109375,
-0.04144287109375,
-0.031341552734375,
0.02069091796875,
-0.054107666015625,
0.010223388671875,
0.025115966796875,
-0.058624267578125,
-0.02178955078125,
0.01384735107421875,
-0.01551055908203125,
-0.00026488304138183594,
-0.019989013671875,
0.0163726806640625,
-0.01451873779296875,
0.03179931640625,
0.03662109375,
0.0267333984375,
0.0198822021484375,
-0.038787841796875,
0.038482666015625,
0.00984954833984375,
-0.0268707275390625,
0.0021228790283203125,
0.03887939453125,
0.031341552734375,
0.0177154541015625,
-0.041717529296875,
-0.02764892578125,
0.0212249755859375,
0.0259246826171875,
-0.00598907470703125,
0.045074462890625,
0.0234832763671875,
-0.01309967041015625,
-0.0177001953125,
-0.027008056640625,
0.01058197021484375,
-0.0100250244140625,
-0.0345458984375,
-0.0182952880859375,
0.020660400390625,
0.0236358642578125,
-0.000022351741790771484,
-0.0029430389404296875,
-0.0081329345703125,
-0.0027294158935546875,
0.044769287109375,
-0.0919189453125,
0.0662841796875,
-0.03277587890625,
0.0965576171875,
0.0911865234375,
-0.0232696533203125,
0.04168701171875,
-0.00890350341796875,
-0.032501220703125,
0.0174560546875,
0.0028438568115234375,
-0.023681640625,
-0.0160980224609375,
-0.052947998046875,
0.0068359375,
0.0004305839538574219,
-0.034942626953125,
-0.035491943359375,
-0.0188446044921875,
-0.0430908203125,
-0.04290771484375,
-0.05426025390625,
0.0169525146484375,
-0.0242156982421875,
-0.07366943359375,
0.01049041748046875,
-0.039031982421875,
-0.0200347900390625,
-0.0139007568359375,
-0.01297760009765625,
0.007808685302734375,
0.0384521484375,
-0.05169677734375,
-0.04296875,
-0.06842041015625,
-0.11822509765625,
-0.059326171875,
0.02227783203125,
0.0271453857421875,
-0.0009126663208007812,
0.043365478515625,
0.0006246566772460938,
-0.044586181640625,
-0.01519012451171875,
-0.0157623291015625,
-0.013458251953125,
-0.0177001953125,
-0.00701904296875,
0.007236480712890625,
-0.0216064453125,
-0.00525665283203125,
0.09039306640625,
0.03265380859375,
-0.052764892578125,
0.0091705322265625,
-0.02642822265625,
0.0144195556640625,
-0.0210113525390625,
-0.01922607421875,
0.0301666259765625,
0.002338409423828125,
-0.059051513671875,
-0.0418701171875,
-0.01412200927734375,
-0.0093994140625,
-0.03790283203125,
0.01049041748046875,
0.0168609619140625,
-0.01483917236328125,
0.006908416748046875,
0.00042939186096191406,
-0.00835418701171875,
0.01129150390625,
0.0177459716796875,
-0.012359619140625,
-0.00905609130859375,
-0.019989013671875,
-0.0288848876953125,
-0.0146636962890625,
0.01953125,
-0.0273590087890625,
0.037017822265625,
0.0024776458740234375,
0.0006384849548339844,
-0.01837158203125,
0.011993408203125,
-0.0250701904296875,
-0.06231689453125,
0.027587890625,
-0.060089111328125,
-0.0213775634765625,
-0.032318115234375,
-0.00586700439453125,
0.01306915283203125,
0.0904541015625,
-0.043060302734375,
0.00867462158203125,
0.00463104248046875,
0.0123138427734375,
-0.0192413330078125,
-0.0438232421875,
-0.05731201171875,
-0.0176849365234375,
0.003925323486328125,
-0.037841796875,
-0.03375244140625,
-0.0181884765625,
0.0108184814453125,
-0.06390380859375,
0.0183258056640625,
-0.0343017578125,
0.01971435546875,
0.0875244140625,
0.0228729248046875,
-0.0215911865234375,
0.01507568359375,
0.00484466552734375,
0.0216827392578125,
0.0193328857421875,
-0.05865478515625,
-0.00075531005859375,
-0.01105499267578125,
0.0281219482421875,
0.0113677978515625,
-0.00199127197265625,
0.004302978515625,
0.04559326171875,
-0.044921875,
-0.002147674560546875,
-0.0150909423828125,
0.051422119140625,
-0.034027099609375,
-0.00395965576171875,
-0.03338623046875,
-0.0301971435546875,
-0.03271484375,
-0.04986572265625,
-0.07855224609375,
-0.0341796875,
0.022674560546875,
0.040283203125,
0.0523681640625,
-0.0168914794921875,
-0.06634521484375,
-0.003131866455078125,
0.00557708740234375,
0.006244659423828125,
-0.007633209228515625,
-0.020050048828125,
-0.00039887428283691406,
-0.05499267578125,
0.0286712646484375,
-0.03155517578125,
-0.0173797607421875,
-0.002361297607421875,
0.09130859375,
0.01509857177734375,
0.005645751953125,
-0.01776123046875,
-0.0426025390625,
0.00588226318359375,
0.005767822265625,
0.048980712890625,
0.022369384765625,
0.021270751953125,
-0.0036487579345703125,
-0.006076812744140625,
-0.00582122802734375,
-0.041748046875,
0.01374053955078125,
-0.007625579833984375,
-0.0017795562744140625,
0.00803375244140625,
-0.020965576171875,
0.06634521484375,
0.0137939453125,
0.00881195068359375,
-0.04302978515625,
0.002979278564453125,
0.047149658203125,
0.0209808349609375,
-0.02569580078125,
-0.0478515625,
-0.01306915283203125,
0.0169830322265625,
-0.05078125,
0.0248260498046875,
0.00290679931640625,
-0.0007977485656738281,
-0.020111083984375,
-0.0098876953125,
-0.0045318603515625,
0.050445556640625,
0.03167724609375,
0.008087158203125,
0.0217742919921875,
0.04461669921875,
-0.0301971435546875,
0.011199951171875,
-0.01922607421875,
0.032196044921875,
0.001617431640625,
-0.04052734375,
-0.0086669921875,
-0.00860595703125,
0.03271484375,
0.002166748046875,
-0.01476287841796875,
0.01282501220703125,
0.0311737060546875,
-0.033203125,
-0.0149688720703125,
-0.005615234375,
-0.0228424072265625,
-0.04656982421875,
-0.0222015380859375,
-0.023956298828125,
-0.01043701171875,
0.034576416015625,
0.01483154296875,
-0.08941650390625,
0.048187255859375,
0.01522064208984375,
0.0267181396484375,
0.04205322265625,
0.0047149658203125,
0.02862548828125,
0.0034198760986328125,
0.006420135498046875,
-0.02996826171875,
-0.00048804283142089844,
-0.0179443359375,
0.0154876708984375,
0.009063720703125,
0.024322509765625,
0.00766754150390625,
-0.02386474609375,
0.018524169921875,
-0.0239410400390625,
-0.01947021484375,
0.058258056640625,
-0.01007080078125,
-0.0728759765625,
-0.016082763671875,
0.007808685302734375,
0.0185394287109375,
-0.039825439453125,
0.00036144256591796875,
-0.040313720703125,
-0.028411865234375,
-0.027496337890625,
-0.0121002197265625,
-0.022369384765625,
-0.0182342529296875,
-0.01018524169921875,
-0.0330810546875,
-0.0159759521484375,
0.0190582275390625,
-0.034942626953125,
-0.018829345703125,
-0.0178375244140625,
-0.0229949951171875,
0.04400634765625,
-0.0253143310546875,
0.01085662841796875,
-0.04132080078125,
0.022979736328125,
-0.038787841796875,
0.0041046142578125,
0.049468994140625,
0.013275146484375,
-0.0122833251953125,
0.01276397705078125,
-0.0009646415710449219,
-0.033599853515625,
0.0125274658203125,
0.0022182464599609375,
-0.059967041015625,
-0.0232391357421875,
0.026397705078125,
0.01385498046875,
0.00650787353515625,
-0.04083251953125,
-0.005687713623046875,
-0.01430511474609375,
0.01230621337890625,
-0.0230560302734375,
-0.0208587646484375,
0.06182861328125,
-0.0188446044921875,
0.05853271484375,
0.01436614990234375,
0.050140380859375,
-0.01166534423828125,
-0.00904083251953125,
0.0172882080078125,
-0.0200653076171875,
-0.03997802734375,
0.004016876220703125,
-0.047027587890625,
0.007610321044921875,
0.05255126953125,
-0.0234375,
0.01052093505859375,
-0.0257415771484375,
0.00926971435546875,
-0.0230560302734375,
-0.022064208984375,
-0.03582763671875,
-0.02984619140625,
0.0183563232421875,
-0.026458740234375,
0.0287017822265625,
-0.0140533447265625,
0.0024166107177734375,
-0.0007309913635253906,
-0.03204345703125,
-0.0008425712585449219,
0.033050537109375,
-0.032196044921875,
0.0217437744140625,
0.051483154296875,
-0.01424407958984375,
0.02313232421875,
0.01377105712890625,
-0.01161956787109375,
0.01204681396484375,
0.01204681396484375,
0.01218414306640625,
0.004146575927734375,
-0.007083892822265625,
-0.02801513671875,
-0.010498046875,
-0.0498046875,
-0.0205078125,
0.0335693359375,
0.049224853515625,
0.0721435546875,
-0.07525634765625,
0.020782470703125,
0.041229248046875,
-0.0234222412109375,
0.01250457763671875,
-0.0156707763671875,
-0.0203857421875,
-0.06011962890625,
0.0263824462890625,
0.003662109375,
-0.0300140380859375,
-0.009613037109375,
-0.008941650390625,
-0.019805908203125,
-0.011322021484375,
0.0216522216796875,
0.0278167724609375,
-0.035919189453125,
0.0216217041015625,
0.025115966796875,
0.007717132568359375,
0.013763427734375,
0.02532958984375,
-0.0266876220703125,
-0.018402099609375,
-0.047332763671875,
-0.01190948486328125,
-0.0257110595703125,
-0.034393310546875,
-0.04150390625,
0.0111236572265625,
0.0260467529296875,
0.03326416015625,
-0.01313018798828125,
-0.00934600830078125,
0.00611114501953125,
0.0216522216796875,
0.016876220703125,
0.0127716064453125,
0.02532958984375,
0.00823211669921875,
0.01488494873046875,
0.01433563232421875,
0.0007333755493164062,
-0.040618896484375,
-0.0173492431640625,
-0.034820556640625,
0.056610107421875,
-0.0019779205322265625,
-0.024139404296875,
0.02764892578125,
0.006748199462890625,
-0.0254364013671875,
0.00006145238876342773,
0.03515625,
-0.046173095703125,
-0.0382080078125,
0.0047607421875,
-0.038848876953125,
-0.025665283203125,
-0.01471710205078125,
-0.047027587890625,
0.10736083984375,
-0.01047515869140625,
0.0151519775390625,
0.01654052734375,
0.04278564453125,
-0.0267181396484375,
0.026214599609375,
-0.0151519775390625,
0.024200439453125,
0.02789306640625,
-0.0219879150390625,
-0.0523681640625,
-0.0175323486328125,
-0.047271728515625,
0.053863525390625,
-0.002529144287109375,
-0.004878997802734375,
-0.036834716796875,
0.00151824951171875,
0.052642822265625,
0.037384033203125,
0.038818359375,
0.033966064453125,
-0.017822265625,
0.0025768280029296875,
0.038848876953125,
-0.03985595703125,
0.0178375244140625,
0.0133514404296875,
-0.0107879638671875,
0.006046295166015625,
-0.003082275390625,
-0.007236480712890625,
0.006526947021484375,
0.01169586181640625,
0.01480865478515625,
-0.01331329345703125,
-0.0009160041809082031,
-0.0814208984375,
0.052093505859375,
-0.037933349609375,
0.00461578369140625,
-0.038177490234375,
0.0243072509765625,
-0.0027313232421875,
0.03363037109375,
-0.00901031494140625,
0.002025604248046875,
0.01334381103515625,
0.011444091796875,
0.03533935546875,
-0.017913818359375,
-0.00557708740234375,
-0.005123138427734375,
0.00630950927734375,
-0.01428985595703125,
0.01384735107421875,
0.03558349609375,
-0.006591796875,
0.00469207763671875,
-0.01232147216796875,
-0.0016584396362304688,
-0.00897979736328125,
-0.052337646484375,
0.005275726318359375,
0.0038433074951171875,
0.00727081298828125,
-0.006500244140625,
-0.004489898681640625,
-0.0299835205078125,
0.027374267578125,
-0.01508331298828125,
0.00859832763671875,
0.003910064697265625,
-0.0026531219482421875,
0.0189971923828125,
0.0806884765625,
-0.04241943359375,
0.0020847320556640625,
-0.01947021484375,
0.017181396484375,
0.01885986328125,
0.056884765625,
-0.00701904296875,
0.07183837890625,
-0.062164306640625,
-0.0189971923828125,
-0.0271453857421875,
0.04669189453125,
-0.025390625,
0.0296478271484375,
-0.048065185546875,
-0.04498291015625,
-0.0114288330078125,
0.046051025390625,
-0.0111541748046875,
0.036346435546875,
0.06134033203125,
0.04632568359375,
-0.067626953125,
-0.023651123046875,
0.04840087890625,
-0.0323486328125,
0.0035419464111328125,
-0.036102294921875,
0.023040771484375,
0.0100555419921875,
-0.01200103759765625,
-0.01995849609375,
0.02874755859375,
0.04071044921875,
-0.017791748046875,
0.07232666015625,
0.00461578369140625,
0.01514434814453125,
0.01593017578125,
0.024139404296875,
0.0518798828125,
0.0249786376953125,
-0.046173095703125,
0.0032806396484375,
-0.057952880859375,
0.00072479248046875,
-0.001220703125,
0.01953125,
0.0150604248046875,
-0.005275726318359375,
-0.0005331039428710938,
-0.0182647705078125,
0.00981903076171875,
0.01129913330078125,
0.0027713775634765625,
0.04693603515625,
0.0231475830078125,
0.006763458251953125,
-0.09906005859375,
-0.07177734375,
-0.054962158203125,
0.06829833984375,
0.0096435546875,
0.09552001953125,
-0.023284912109375,
0.03570556640625,
0.036865234375,
0.0246734619140625,
0.006320953369140625,
0.0142364501953125,
-0.0086212158203125,
-0.005649566650390625,
0.030670166015625,
-0.0186614990234375,
-0.036773681640625,
0.0013065338134765625,
0.036163330078125,
-0.0261077880859375,
-0.0193634033203125,
0.005859375,
0.0172119140625,
-0.007106781005859375,
-0.0181884765625,
-0.04168701171875,
-0.0224761962890625,
0.018707275390625,
-0.00676727294921875,
-0.01384735107421875,
-0.007465362548828125,
0.0218505859375,
0.02459716796875,
0.059539794921875,
-0.004123687744140625,
0.0131683349609375,
0.006015777587890625,
0.036407470703125,
0.031280517578125,
0.0106964111328125,
-0.05419921875,
0.044921875,
-0.0011396408081054688,
-0.0182342529296875,
0.0176544189453125,
0.07232666015625,
0.023162841796875,
-0.026123046875,
0.0165252685546875,
0.040496826171875,
0.044647216796875,
-0.021942138671875,
0.018524169921875,
0.039306640625,
-0.0117645263671875,
0.001483917236328125,
-0.0110626220703125,
-0.03753662109375,
-0.034210205078125,
-0.00759124755859375,
0.0176239013671875,
-0.032318115234375,
-0.02716064453125,
-0.06402587890625,
-0.039459228515625,
0.039581298828125,
-0.002719879150390625,
-0.00832366943359375,
0.0016345977783203125,
-0.038818359375,
0.0035686492919921875,
0.0033702850341796875,
-0.03607177734375,
-0.01203155517578125,
-0.017333984375,
0.00942230224609375,
-0.0239715576171875,
-0.022308349609375,
0.038665771484375,
0.0023365020751953125,
0.043670654296875,
0.049896240234375,
-0.039337158203125,
0.005512237548828125,
0.03704833984375,
0.01666259765625,
0.081298828125,
-0.0240478515625,
-0.03460693359375,
0.00487518310546875,
0.00920867919921875,
-0.022369384765625,
-0.053375244140625,
0.00881195068359375,
-0.059326171875,
0.00910186767578125,
-0.03387451171875,
-0.025787353515625,
-0.039642333984375,
-0.05718994140625,
-0.0276031494140625,
0.055328369140625,
-0.0006780624389648438,
-0.01959228515625,
-0.0179290771484375,
-0.03271484375,
-0.0123748779296875,
0.025115966796875,
0.0018796920776367188,
-0.01486968994140625,
-0.0299835205078125,
0.03814697265625,
-0.0014057159423828125,
0.0170745849609375,
-0.0073699951171875,
-0.031280517578125,
-0.031280517578125,
0.00036978721618652344,
0.01299285888671875,
-0.0078125,
0.021881103515625,
-0.019775390625,
0.05389404296875,
0.08172607421875,
-0.0014905929565429688,
-0.03619384765625,
-0.004367828369140625,
-0.0758056640625,
-0.01309967041015625,
0.037811279296875,
-0.047393798828125,
0.0203704833984375,
0.07904052734375,
0.1014404296875,
0.034210205078125,
-0.06353759765625,
-0.0241546630859375,
-0.01080322265625,
-0.02081298828125,
-0.0242156982421875,
0.01540374755859375,
-0.05889892578125,
-0.01023101806640625,
-0.021636962890625,
-0.0068359375,
0.05084228515625,
-0.02581787109375,
0.0013685226440429688,
0.01506805419921875,
0.0244903564453125,
-0.01222991943359375,
-0.0404052734375,
0.0118408203125,
0.04693603515625,
-0.0301055908203125,
-0.0020656585693359375,
0.006206512451171875,
-0.012115478515625,
0.00511932373046875,
0.024566650390625,
-0.041778564453125,
-0.0160369873046875,
-0.0162506103515625,
0.03802490234375,
-0.0230865478515625,
0.023193359375,
-0.02569580078125,
0.0107574462890625,
0.0518798828125,
-0.01483917236328125,
-0.025421142578125,
-0.0229339599609375,
0.02874755859375,
-0.006443023681640625,
-0.06695556640625,
0.010894775390625,
-0.0170745849609375,
-0.0251007080078125,
-0.038848876953125,
0.02740478515625,
-0.0287322998046875,
0.0004930496215820312,
-0.01007080078125,
-0.004055023193359375,
-0.00040435791015625,
-0.03546142578125,
0.0120849609375,
-0.04833984375,
0.01334381103515625,
0.033203125,
-0.022735595703125,
0.0269775390625
] |
91470fc2bcb56ff23b6a6828ac47fc08da3a4a77
|
Wordpress Stackexchange
Q: WP 3.4 - what action/hook is called when theme customisation is saved? i'm looking for the action/hook called when saving theme customs colors in the new admin interface?
i need to call a custom function to save a set of php generated images.
if anyone have clues... :)
thanks
A: The settings are saved via ajax, with the action customize_save. In the wp-includes/class-wp-customize-manager.php class, the callback for this ajax method is the save method (see source)
This triggers the customize_save action, prior to updating each of the settings.
Each setting is actually an instance of the class WP_Customize_Setting and saving the setting triggers the action
customize_save_{$setting_id}
if you wanted to trigger the action when a particular setting is saved (unfortunately there's no filter).
The save method calls the update method, which behaves different depending on whether the settings is a 'theme_mod' or 'option'. Regardless they are both saved using update_option (and so passed through the appropriate filters). The former is done so via set_theme_mod().
|
Q: WP 3.4 - what action/hook is called when theme customisation is saved? i'm looking for the action/hook called when saving theme customs colors in the new admin interface?
i need to call a custom function to save a set of php generated images.
if anyone have clues... :)
thanks
A: The settings are saved via ajax, with the action customize_save. In the wp-includes/class-wp-customize-manager.php class, the callback for this ajax method is the save method (see source)
This triggers the customize_save action, prior to updating each of the settings.
Each setting is actually an instance of the class WP_Customize_Setting and saving the setting triggers the action
customize_save_{$setting_id}
if you wanted to trigger the action when a particular setting is saved (unfortunately there's no filter).
The save method calls the update method, which behaves different depending on whether the settings is a 'theme_mod' or 'option'. Regardless they are both saved using update_option (and so passed through the appropriate filters). The former is done so via set_theme_mod().
|
wordpress
|
{
"language": "en",
"length": 165,
"provenance": "stackexchange_00019.jsonl.gz:421543",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57540"
}
|
[
0.036834716796875,
0.00350189208984375,
-0.01215362548828125,
-0.0672607421875,
-0.00036835670471191406,
-0.00726318359375,
-0.01074981689453125,
-0.0029048919677734375,
-0.04376220703125,
0.0160675048828125,
0.01267242431640625,
0.0245361328125,
-0.00005334615707397461,
-0.033966064453125,
0.032623291015625,
-0.00763702392578125,
0.047943115234375,
-0.02276611328125,
0.03570556640625,
0.01421356201171875,
-0.0021419525146484375,
0.034912109375,
0.045684814453125,
0.0224609375,
0.04571533203125,
-0.018951416015625,
0.012603759765625,
0.00791168212890625,
0.033294677734375,
0.010711669921875,
0.0294036865234375,
-0.05010986328125,
0.024566650390625,
0.034210205078125,
-0.0127716064453125,
0.022064208984375,
0.032562255859375,
0.0038280487060546875,
0.0212249755859375,
0.0084381103515625,
0.04302978515625,
-0.01221466064453125,
-0.0018568038940429688,
0.0021877288818359375,
-0.025848388671875,
-0.0275726318359375,
0.06500244140625,
0.0157012939453125,
0.035400390625,
-0.006870269775390625,
-0.026031494140625,
0.00264739990234375,
-0.017333984375,
-0.01131439208984375,
-0.0193328857421875,
-0.0191802978515625,
-0.047332763671875,
0.037933349609375,
0.04791259765625,
0.0298614501953125,
-0.036773681640625,
-0.043243408203125,
0.00040650367736816406,
-0.06085205078125,
0.015960693359375,
0.00855255126953125,
0.0234375,
0.0177154541015625,
-0.0479736328125,
0.0059967041015625,
0.0241546630859375,
-0.032867431640625,
-0.008392333984375,
-0.0214996337890625,
0.0057373046875,
0.01255035400390625,
-0.001110076904296875,
0.003936767578125,
0.0096435546875,
0.020660400390625,
0.0439453125,
-0.028350830078125,
0.0304718017578125,
-0.016021728515625,
0.024658203125,
0.009490966796875,
0.00574493408203125,
-0.01551055908203125,
-0.01473236083984375,
-0.02813720703125,
-0.0115966796875,
-0.0290985107421875,
-0.0214996337890625,
0.0227813720703125,
0.0033130645751953125,
-0.035247802734375,
-0.04345703125,
0.0089874267578125,
-0.0134735107421875,
0.035552978515625,
0.005100250244140625,
-0.033538818359375,
0.0478515625,
-0.039794921875,
0.0009541511535644531,
0.02191162109375,
0.01071929931640625,
-0.02301025390625,
0.012420654296875,
0.0228271484375,
-0.026336669921875,
-0.007415771484375,
0.0161285400390625,
-0.0031871795654296875,
-0.00959014892578125,
-0.040771484375,
-0.045440673828125,
0.039886474609375,
0.0011444091796875,
-0.00048351287841796875,
0.0291595458984375,
0.0227508544921875,
0.064208984375,
-0.04864501953125,
0.0233001708984375,
0.0019130706787109375,
-0.07586669921875,
-0.044403076171875,
0.0237274169921875,
0.01824951171875,
-0.004974365234375,
0.00705718994140625,
0.0343017578125,
0.0203857421875,
0.0007729530334472656,
-0.01983642578125,
0.03076171875,
-0.0007123947143554688,
-0.03204345703125,
0.020751953125,
0.0184783935546875,
-0.0391845703125,
-0.037872314453125,
0.0025806427001953125,
0.0293121337890625,
-0.00665283203125,
-0.0200653076171875,
0.03741455078125,
0.072998046875,
-0.034393310546875,
0.0653076171875,
-0.051177978515625,
0.0158538818359375,
0.0258636474609375,
-0.01016998291015625,
-0.0018682479858398438,
0.04486083984375,
-0.03497314453125,
0.0044403076171875,
-0.043182373046875,
-0.00787353515625,
-0.027862548828125,
-0.0165252685546875,
0.01186370849609375,
-0.0153961181640625,
0.0277099609375,
0.041412353515625,
0.016693115234375,
0.021331787109375,
0.01026153564453125,
0.01535797119140625,
0.01348876953125,
-0.0062713623046875,
0.029083251953125,
0.01453399658203125,
0.007038116455078125,
0.0013856887817382812,
-0.010894775390625,
0.035675048828125,
0.03173828125,
-0.01296234130859375,
-0.0241851806640625,
0.026763916015625,
-0.0135498046875,
-0.024871826171875,
0.03253173828125,
0.0083770751953125,
0.056671142578125,
-0.00872802734375,
0.0231781005859375,
-0.0063323974609375,
0.0131988525390625,
-0.017181396484375,
-0.0022335052490234375,
-0.0210113525390625,
0.00981903076171875,
-0.053070068359375,
0.0226898193359375,
-0.0338134765625,
-0.0047149658203125,
0.005008697509765625,
0.01316070556640625,
0.006961822509765625,
-0.0020389556884765625,
-0.07763671875,
0.040802001953125,
-0.056549072265625,
0.06488037109375,
-0.00873565673828125,
0.00018644332885742188,
0.00807952880859375,
-0.0308380126953125,
0.00159454345703125,
-0.0308074951171875,
-0.01149749755859375,
0.0233612060546875,
-0.0235595703125,
0.034637451171875,
-0.010833740234375,
0.0306854248046875,
0.034942626953125,
-0.056121826171875,
0.009368896484375,
-0.0003566741943359375,
0.0206298828125,
-0.00855255126953125,
-0.019775390625,
-0.0218505859375,
0.0186920166015625,
0.011505126953125,
0.0012617111206054688,
0.020965576171875,
0.03924560546875,
0.05206298828125,
-0.006092071533203125,
-0.0050201416015625,
0.001361846923828125,
-0.09234619140625,
0.01457977294921875,
0.0533447265625,
0.012451171875,
0.0330810546875,
-0.0164947509765625,
-0.011932373046875,
0.05841064453125,
0.051666259765625,
0.0439453125,
-0.03851318359375,
0.0217742919921875,
0.041534423828125,
0.023345947265625,
-0.039031982421875,
-0.0007748603820800781,
-0.038818359375,
-0.004608154296875,
0.0036563873291015625,
-0.0229949951171875,
-0.04425048828125,
-0.0064239501953125,
0.013580322265625,
0.020965576171875,
-0.0167388916015625,
-0.015380859375,
-0.002857208251953125,
0.032562255859375,
-0.012725830078125,
0.0157470703125,
-0.008819580078125,
-0.0219268798828125,
0.0030307769775390625,
0.03173828125,
-0.03143310546875,
-0.0195159912109375,
0.0294342041015625,
0.041351318359375,
0.00788116455078125,
-0.0246734619140625,
-0.005474090576171875,
-0.00884246826171875,
0.0281829833984375,
-0.012908935546875,
0.0560302734375,
-0.040008544921875,
-0.0189208984375,
-0.01180267333984375,
-0.062042236328125,
-0.043365478515625,
-0.01995849609375,
-0.00616455078125,
-0.01049041748046875,
0.0159454345703125,
0.0271759033203125,
-0.01441192626953125,
0.0024433135986328125,
0.0626220703125,
-0.01528167724609375,
-0.0404052734375,
0.00634002685546875,
0.005458831787109375,
-0.00502777099609375,
0.00666046142578125,
0.056121826171875,
0.010040283203125,
0.0038623809814453125,
0.0138702392578125,
-0.03253173828125,
0.0377197265625,
0.00860595703125,
0.0058135986328125,
-0.036224365234375,
-0.03204345703125,
-0.00786590576171875,
0.019439697265625,
0.05157470703125,
-0.0258636474609375,
-0.037109375,
-0.00887298583984375,
0.020233154296875,
-0.0362548828125,
-0.036590576171875,
0.0066986083984375,
-0.06427001953125,
0.006572723388671875,
-0.02099609375,
-0.038055419921875,
-0.01178741455078125,
-0.003040313720703125,
-0.00861358642578125,
-0.0360107421875,
-0.0198516845703125,
0.00643157958984375,
-0.03741455078125,
-0.02239990234375,
-0.0152130126953125,
0.0234527587890625,
0.005451202392578125,
0.0100250244140625,
0.059417724609375,
-0.0095367431640625,
-0.049896240234375,
0.00951385498046875,
-0.06402587890625,
0.00209808349609375,
0.0276336669921875,
0.0347900390625,
-0.0364990234375,
0.0244140625,
-0.006771087646484375,
0.0110931396484375,
0.04608154296875,
-0.039154052734375,
-0.01045989990234375,
-0.02752685546875,
-0.040802001953125,
-0.0227813720703125,
0.0750732421875,
0.05316162109375,
-0.025634765625,
0.0374755859375,
-0.0560302734375,
-0.052215576171875,
-0.0159454345703125,
-0.0660400390625,
0.050201416015625,
0.06298828125,
-0.005458831787109375,
-0.0019130706787109375,
0.005123138427734375,
0.0401611328125,
0.00965118408203125,
-0.0184326171875,
0.011993408203125,
0.0256195068359375,
-0.0012865066528320312,
0.0288848876953125,
-0.01160430908203125,
0.0308990478515625,
-0.005512237548828125,
0.0472412109375,
0.030914306640625,
0.027801513671875,
-0.0012464523315429688,
-0.0191650390625,
-0.056976318359375,
-0.03662109375,
0.01006317138671875,
-0.035614013671875,
0.07440185546875,
-0.05145263671875,
0.00170135498046875,
-0.037078857421875,
0.06378173828125,
-0.074462890625,
-0.0018329620361328125,
-0.007415771484375,
0.00885009765625,
-0.01922607421875,
-0.02655029296875,
-0.054901123046875,
0.004913330078125,
-0.15283203125,
0.0224151611328125,
-0.01025390625,
-0.035552978515625,
-0.015289306640625,
0.035919189453125,
-0.09033203125,
-0.0677490234375,
0.037261962890625,
-0.0254364013671875,
0.008209228515625,
0.0189971923828125,
0.0010919570922851562,
-0.0012264251708984375,
-0.0153656005859375,
-0.01141357421875,
-0.12548828125,
-0.01317596435546875,
-0.04827880859375,
0.046173095703125,
0.030548095703125,
-0.045623779296875,
-0.016754150390625,
0.0261688232421875,
0.06524658203125,
0.0450439453125,
0.0186004638671875,
-0.0259246826171875,
0.003322601318359375,
-0.0384521484375,
0.0190277099609375,
-0.05035400390625,
0.01474761962890625,
0.0182342529296875,
-0.051361083984375,
0.005481719970703125,
-0.004291534423828125,
-0.0030517578125,
0.03753662109375,
-0.04388427734375,
-0.04254150390625,
0.01447296142578125,
-0.018218994140625,
-0.0028934478759765625,
0.0016880035400390625,
-0.018951416015625,
0.00791168212890625,
-0.047332763671875,
0.0288238525390625,
-0.059783935546875,
0.0223541259765625,
0.01031494140625,
0.10101318359375,
0.01617431640625,
0.01215362548828125,
-0.005279541015625,
-0.03289794921875,
0.04083251953125,
-0.01430511474609375,
-0.0071563720703125,
-0.0011644363403320312,
-0.039337158203125,
0.025390625,
0.01727294921875,
0.005359649658203125,
-0.047393798828125,
0.076904296875,
-0.0002624988555908203,
0.0126953125,
-0.007770538330078125,
-0.0280609130859375,
0.032318115234375,
0.04302978515625,
-0.00930023193359375,
-0.0098876953125,
-0.007053375244140625,
0.010284423828125,
-0.0290679931640625,
0.031494140625,
-0.0219268798828125,
-0.017730712890625,
0.0172119140625,
-0.015655517578125,
0.03765869140625,
0.0026836395263671875,
0.0093231201171875,
0.0005168914794921875,
-0.00893402099609375,
0.0170135498046875,
0.0167388916015625,
-0.0026836395263671875,
-0.019683837890625,
0.0540771484375,
-0.0194854736328125,
-0.0020923614501953125,
0.0288543701171875,
0.0174560546875,
-0.038177490234375,
-0.0323486328125,
-0.0281524658203125,
-0.06585693359375,
0.01546478271484375,
0.0016117095947265625,
0.02288818359375,
-0.02215576171875,
0.04693603515625,
0.03271484375,
-0.021484375,
-0.00438690185546875,
-0.015777587890625,
0.0028591156005859375,
-0.0538330078125,
0.018310546875,
0.02838134765625,
-0.025909423828125,
0.026947021484375,
-0.01058197021484375,
0.0648193359375,
-0.037261962890625,
-0.034271240234375,
-0.00841522216796875,
-0.0014934539794921875,
0.035247802734375,
0.034332275390625,
-0.01393890380859375,
0.003185272216796875,
-0.00482940673828125,
0.0100555419921875,
-0.060211181640625,
0.0269775390625,
0.019622802734375,
0.0396728515625,
-0.002166748046875,
-0.05914306640625,
0.03558349609375,
-0.017303466796875,
-0.0198211669921875,
0.03631591796875,
0.004425048828125,
-0.051483154296875,
-0.0156402587890625,
0.0264129638671875,
0.0218963623046875,
-0.0016641616821289062,
0.01084136962890625,
0.006134033203125,
0.0090179443359375,
-0.0012569427490234375,
-0.0250091552734375,
-0.03131103515625,
-0.002727508544921875,
-0.001605987548828125,
-0.061309814453125,
-0.003131866455078125,
0.040924072265625,
-0.022308349609375,
-0.0447998046875,
0.01027679443359375,
-0.028717041015625,
-0.005664825439453125,
-0.0236968994140625,
0.037200927734375,
-0.039764404296875,
-0.005573272705078125,
-0.0062408447265625,
0.01499176025390625,
0.04345703125,
0.022552490234375,
-0.024261474609375,
0.00835418701171875,
-0.018768310546875,
0.0032863616943359375,
0.0138397216796875,
-0.0281829833984375,
-0.02423095703125,
-0.0257110595703125,
0.0019626617431640625,
0.01508331298828125,
0.00261688232421875,
0.021728515625,
-0.026214599609375,
0.032196044921875,
0.00014078617095947266,
0.0548095703125,
-0.03289794921875,
0.033111572265625,
0.01253509521484375,
0.0301513671875,
-0.01367950439453125,
-0.037994384765625,
-0.0189971923828125,
0.0164031982421875,
-0.0227203369140625,
0.00901031494140625,
0.01187896728515625,
0.0013217926025390625,
0.023681640625,
0.0312347412109375,
0.086669921875,
0.0011768341064453125,
0.014617919921875,
-0.0080718994140625,
0.01146697998046875,
-0.01763916015625,
-0.0223388671875,
0.00021350383758544922,
-0.039581298828125,
0.03485107421875,
-0.0538330078125,
-0.0310516357421875,
0.00342559814453125,
0.0129241943359375,
0.0333251953125,
-0.0290985107421875,
0.00800323486328125,
0.027740478515625,
-0.0191802978515625,
-0.0111236572265625,
0.016326904296875,
0.0283355712890625,
0.047332763671875,
-0.0272979736328125,
0.031158447265625,
0.00919342041015625,
0.0029888153076171875,
-0.0202178955078125,
-0.0106658935546875,
0.0482177734375,
0.0252532958984375,
0.00043010711669921875,
0.060882568359375,
-0.014190673828125,
0.041229248046875,
0.04833984375,
0.097412109375,
-0.08306884765625,
0.0203399658203125,
0.0233612060546875,
-0.0032596588134765625,
0.07330322265625,
0.0008692741394042969,
-0.0205841064453125,
-0.052459716796875,
0.0210113525390625,
-0.006877899169921875,
-0.004528045654296875,
-0.0008230209350585938,
-0.0197601318359375,
0.0029296875,
-0.002033233642578125,
0.02294921875,
-0.0133819580078125,
0.019775390625,
-0.04364013671875,
-0.020965576171875,
-0.035919189453125,
0.00020313262939453125,
-0.0031147003173828125,
0.0007390975952148438,
-0.029296875,
-0.046478271484375,
0.003429412841796875,
-0.0070037841796875,
-0.0262908935546875,
-0.0256500244140625,
-0.0361328125,
0.04986572265625,
0.057586669921875,
-0.034515380859375,
0.011383056640625,
0.007801055908203125,
0.0350341796875,
-0.050506591796875,
-0.0150909423828125,
0.026397705078125,
0.01065826416015625,
-0.0697021484375,
0.0213470458984375,
-0.051727294921875,
-0.00140380859375,
0.000408172607421875,
0.02716064453125,
0.0296478271484375,
-0.0382080078125,
-0.0120391845703125,
0.05426025390625,
-0.00814056396484375,
-0.0027370452880859375,
-0.016021728515625,
0.0288238525390625,
-0.07293701171875,
-0.0660400390625,
0.01378631591796875,
-0.05389404296875,
-0.0087738037109375,
-0.00910186767578125,
-0.03387451171875,
0.10888671875,
-0.00786590576171875,
0.0220947265625,
0.008880615234375,
0.06036376953125,
-0.00208282470703125,
0.046478271484375,
-0.028350830078125,
0.0362548828125,
-0.0038700103759765625,
0.0301513671875,
-0.04705810546875,
0.00710296630859375,
-0.00827789306640625,
0.0181427001953125,
0.02294921875,
0.0035610198974609375,
-0.029876708984375,
-0.009124755859375,
0.03009033203125,
0.0017108917236328125,
-0.007476806640625,
0.047271728515625,
0.006809234619140625,
-0.032501220703125,
0.026275634765625,
0.016845703125,
0.0269012451171875,
0.0185089111328125,
-0.016143798828125,
0.04449462890625,
0.00748443603515625,
-0.00449371337890625,
0.0016088485717773438,
0.03887939453125,
-0.078369140625,
0.01165771484375,
0.0555419921875,
-0.02655029296875,
-0.03179931640625,
0.0036029815673828125,
0.004665374755859375,
-0.008575439453125,
-0.00734710693359375,
-0.0229034423828125,
0.019622802734375,
0.038116455078125,
0.006084442138671875,
-0.058868408203125,
0.00507354736328125,
-0.01239776611328125,
-0.037109375,
-0.043853759765625,
0.03704833984375,
-0.036834716796875,
0.05169677734375,
0.0227508544921875,
0.036956787109375,
-0.0106658935546875,
-0.01311492919921875,
-0.0079498291015625,
0.053253173828125,
-0.028900146484375,
-0.062286376953125,
0.0108489990234375,
0.0081024169921875,
0.0216217041015625,
0.0301055908203125,
0.0386962890625,
-0.07672119140625,
-0.01003265380859375,
-0.036865234375,
0.00928497314453125,
0.06243896484375,
0.042388916015625,
0.016845703125,
0.036590576171875,
-0.0789794921875,
-0.02825927734375,
-0.0325927734375,
-0.01187896728515625,
-0.0098876953125,
0.03759765625,
0.0311126708984375,
0.0184478759765625,
-0.005405426025390625,
-0.0176239013671875,
-0.0228271484375,
-0.007328033447265625,
-0.002777099609375,
0.03363037109375,
-0.04229736328125,
-0.0143890380859375,
0.007293701171875,
0.052886962890625,
0.017608642578125,
0.036285400390625,
0.063232421875,
0.062469482421875,
-0.00908660888671875,
0.00679779052734375,
0.0494384765625,
-0.00730133056640625,
0.01165008544921875,
-0.03216552734375,
0.024688720703125,
0.014190673828125,
-0.0080718994140625,
-0.003772735595703125,
-0.00501251220703125,
0.0635986328125,
-0.031036376953125,
0.03900146484375,
-0.01123046875,
-0.011871337890625,
0.026336669921875,
-0.03594970703125,
0.06304931640625,
0.007114410400390625,
-0.045440673828125,
0.0029964447021484375,
-0.01024627685546875,
-0.036956787109375,
-0.00446319580078125,
0.0192108154296875,
-0.030303955078125,
0.05706787109375,
-0.0153656005859375,
-0.0267791748046875,
0.0243682861328125,
0.0200653076171875,
-0.034942626953125,
-0.00537872314453125,
0.0239105224609375,
-0.01861572265625,
-0.036285400390625,
-0.0241546630859375,
-0.016754150390625,
0.04937744140625,
0.0168609619140625,
0.02593994140625,
-0.01380157470703125,
0.026275634765625,
0.023651123046875,
0.020721435546875,
-0.022705078125,
0.0011959075927734375,
0.027252197265625,
-0.0300445556640625,
-0.01087188720703125,
-0.0114898681640625,
-0.004642486572265625,
0.00920867919921875,
0.0166778564453125,
-0.01100921630859375,
-0.032257080078125,
-0.0019426345825195312,
0.04400634765625,
0.050323486328125,
0.044647216796875,
-0.03948974609375,
-0.04644775390625,
-0.061767578125,
-0.01551055908203125,
0.0014638900756835938,
-0.01338958740234375,
0.01073455810546875,
0.016143798828125,
-0.0011148452758789062,
0.0114593505859375,
0.003299713134765625,
0.0024204254150390625,
0.00638580322265625,
0.0287933349609375,
-0.054534912109375,
-0.036407470703125,
0.0288238525390625,
-0.0034008026123046875,
0.0051116943359375,
0.00960540771484375,
0.032562255859375,
0.0391845703125,
-0.05523681640625,
0.034423828125,
0.0269622802734375,
0.05279541015625,
0.00014090538024902344,
0.004428863525390625,
0.0171051025390625,
0.0038700103759765625,
0.0019464492797851562,
-0.03936767578125,
-0.032745361328125,
-0.060272216796875,
0.01493072509765625,
0.040191650390625,
-0.040557861328125,
0.00630950927734375,
-0.0799560546875,
-0.00524139404296875,
0.038726806640625,
0.005336761474609375,
-0.037445068359375,
0.0345458984375,
-0.049407958984375,
0.0088348388671875,
0.001178741455078125,
-0.01421356201171875,
0.0246734619140625,
0.06573486328125,
0.0031185150146484375,
-0.02008056640625,
0.00995635986328125,
0.0226593017578125,
0.01020050048828125,
-0.003192901611328125,
0.017730712890625,
-0.002979278564453125,
-0.028656005859375,
-0.012054443359375,
-0.01556396484375,
0.03778076171875,
-0.025421142578125,
-0.010589599609375,
0.047607421875,
0.01110076904296875,
-0.033935546875,
-0.0285797119140625,
-0.007350921630859375,
0.0015087127685546875,
0.02215576171875,
-0.0003666877746582031,
-0.029052734375,
-0.0058135986328125,
-0.04541015625,
-0.07183837890625,
0.0208892822265625,
0.00478363037109375,
-0.03643798828125,
-0.0223541259765625,
0.0290374755859375,
0.0084991455078125,
-0.025634765625,
-0.01354217529296875,
-0.011322021484375,
-0.00853729248046875,
0.00020563602447509766,
0.0248870849609375,
-0.0025653839111328125,
0.026214599609375,
0.00806427001953125,
-0.08880615234375,
0.019622802734375,
-0.0061187744140625,
0.0188751220703125,
0.0316162109375,
-0.04833984375,
0.04913330078125,
0.057464599609375,
-0.052703857421875,
-0.0496826171875,
-0.0064697265625,
-0.01302337646484375,
-0.0184478759765625,
-0.0333251953125,
0.010528564453125,
-0.0005044937133789062,
0.040771484375,
0.0259857177734375,
-0.0050201416015625,
-0.0269622802734375,
0.01153564453125,
-0.0179901123046875,
-0.007709503173828125,
-0.01129913330078125,
0.0204315185546875,
-0.055389404296875,
-0.018463134765625,
0.02783203125,
0.0011911392211914062,
-0.0126190185546875,
0.02349853515625,
-0.0171661376953125,
-0.01038360595703125,
0.03961181640625,
-0.01305389404296875,
-0.048553466796875,
-0.0268707275390625,
0.02294921875,
-0.0161285400390625,
0.02374267578125,
0.0142822265625,
0.020721435546875,
0.0211639404296875,
0.0802001953125,
0.004573822021484375,
0.0213165283203125,
-0.037933349609375,
0.0207672119140625,
0.0030918121337890625,
0.0238189697265625,
-0.051513671875,
-0.01023101806640625,
0.0265350341796875,
-0.0160980224609375,
-0.020172119140625,
-0.0297088623046875,
0.0159454345703125,
0.00494384765625,
-0.049041748046875,
0.0297698974609375,
-0.02142333984375,
0.015289306640625,
-0.0213623046875,
0.0202178955078125,
-0.0190277099609375,
0.0090484619140625,
0.035308837890625,
-0.031280517578125,
0.0257110595703125,
-0.0026569366455078125,
0.0560302734375,
-0.02099609375,
0.03265380859375,
0.0147552490234375,
-0.0031108856201171875,
0.0197601318359375
] |
56a4684224739bf7c3797d643d154b54f1b22eb7
|
Wordpress Stackexchange
Q: How to Rename a Template File? If i have pages that point to somefilename.php and want to change the filename to betterfilename.php, can I leave the template comments unchanged without manually changing all the pages?
/*
Template Name: Some File Name
*/
A: Chris gave me some good insight, and I appreciate the filter func. But I wound up changing the db through phpMyAdmin:
UPDATE wp_postmeta SET meta_value = 'new-filename.php' WHERE meta_value = 'old-filename.php';
|
Q: How to Rename a Template File? If i have pages that point to somefilename.php and want to change the filename to betterfilename.php, can I leave the template comments unchanged without manually changing all the pages?
/*
Template Name: Some File Name
*/
A: Chris gave me some good insight, and I appreciate the filter func. But I wound up changing the db through phpMyAdmin:
UPDATE wp_postmeta SET meta_value = 'new-filename.php' WHERE meta_value = 'old-filename.php';
A: When you select a page template, WordPress stores it as postmeta with the key _wp_page_template. The value that gets stored is the actual page template path relative to the template directory (or stylesheet directory).
So when WP looks for the template to include, it will for somefilename.php and when it doesn't find it, it will fall back to the page.php.
You can see the files WP searches for in the functions get_page_template and get_page_template_slug
<?php
// in wp-includes/template.php
/**
* Retrieve path of page template in current or parent template.
*
* Will first look for the specifically assigned page template
* The will search for 'page-{slug}.php' followed by 'page-id.php'
* and finally 'page.php'
*
* @since 1.5.0
*
* @return string
*/
function get_page_template() {
$id = get_queried_object_id();
$template = get_page_template_slug();
$pagename = get_query_var('pagename');
if ( ! $pagename && $id ) {
// If a static page is set as the front page, $pagename will not be set. Retrieve it from the queried object
$post = get_queried_object();
$pagename = $post->post_name;
}
$templates = array();
if ( $template && 0 === validate_file( $template ) )
$templates[] = $template;
if ( $pagename )
$templates[] = "page-$pagename.php";
if ( $id )
$templates[] = "page-$id.php";
$templates[] = 'page.php';
return get_query_template( 'page', $templates );
}
// in wp-includes/post-template.php
/**
* Get the specific template name for a page.
*
* @since 3.4.0
*
* @param int $id The page ID to check. Defaults to the current post, when used in the loop.
* @return string|bool Page template filename. Returns an empty string when the default page template
* is in use. Returns false if the post is not a page.
*/
function get_page_template_slug( $post_id = null ) {
$post = get_post( $post_id );
if ( 'page' != $post->post_type )
return false;
$template = get_post_meta( $post->ID, '_wp_page_template', true );
if ( ! $template || 'default' == $template )
return '';
return $template;
}
Best solution: go update your pages. Other, less manual solution: hook into page_template and look for the old filename, replace it with the new:
<?php
add_filter('page_template', 'wpse57568_page_template');
function wpse57568_page_template($t)
{
$old_slug = 'pages/t.php'; // replace this
$new_slug = 'pages/new.php'; // replace this
$page_id = get_queried_object_id();
$template = get_post_meta($page_id, '_wp_page_template', true);
if($template && 'default'!= $template && $old_slug == $template)
{
if(file_exists(trailingslashit(STYLESHEETPATH) . $new_slug))
{
$t = trailingslashit(STYLESHEETPATH) . $new_slug;
}
elseif(file_exists(trailingslashit(TEMPLATEPATH) . $new_slug))
{
$t = trailingslashit(TEMPLATEPATH) . $new_slug;
}
}
return $t;
}
As a plugin.
|
wordpress
|
{
"language": "en",
"length": 480,
"provenance": "stackexchange_00019.jsonl.gz:421553",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57568"
}
|
[
-0.0139923095703125,
-0.00864410400390625,
-0.034942626953125,
0.0064849853515625,
-0.025482177734375,
-0.01061248779296875,
-0.0054931640625,
-0.01435089111328125,
0.01432037353515625,
0.030487060546875,
-0.00464630126953125,
-0.0024738311767578125,
0.005886077880859375,
-0.01776123046875,
-0.001316070556640625,
-0.0190277099609375,
0.0202789306640625,
-0.00502777099609375,
0.034576416015625,
-0.00421142578125,
0.036224365234375,
0.0035076141357421875,
0.0162506103515625,
-0.01166534423828125,
-0.0035686492919921875,
-0.04638671875,
0.07818603515625,
-0.01212310791015625,
-0.016845703125,
-0.0357666015625,
0.0131683349609375,
0.035552978515625,
0.005573272705078125,
0.02264404296875,
-0.018402099609375,
0.0018377304077148438,
0.0008683204650878906,
0.0152435302734375,
0.030120849609375,
-0.00824737548828125,
0.024383544921875,
-0.004322052001953125,
0.0159759521484375,
0.01334381103515625,
0.0011873245239257812,
-0.05645751953125,
0.02752685546875,
-0.053985595703125,
0.026153564453125,
0.00968170166015625,
0.035797119140625,
0.03179931640625,
0.0253753662109375,
0.0099029541015625,
-0.0145263671875,
0.00701904296875,
-0.02459716796875,
0.0278472900390625,
0.002780914306640625,
-0.01361846923828125,
-0.003448486328125,
0.0265960693359375,
0.01348114013671875,
0.0186767578125,
-0.01971435546875,
-0.01287078857421875,
0.01132965087890625,
0.02734375,
-0.0213165283203125,
-0.005847930908203125,
0.0304107666015625,
-0.0105133056640625,
0.02374267578125,
-0.02899169921875,
0.031585693359375,
0.016082763671875,
-0.0017099380493164062,
0.021453857421875,
0.00614166259765625,
-0.007808685302734375,
0.0538330078125,
-0.01629638671875,
0.020599365234375,
-0.034637451171875,
0.021942138671875,
-0.00911712646484375,
0.00592041015625,
-0.01070404052734375,
-0.024017333984375,
-0.01441192626953125,
-0.041900634765625,
-0.0166168212890625,
0.011505126953125,
0.0024261474609375,
-0.03564453125,
0.01043701171875,
0.01108551025390625,
0.05316162109375,
-0.0025196075439453125,
0.00795745849609375,
-0.0214385986328125,
-0.002410888671875,
-0.0382080078125,
-0.0197906494140625,
0.006320953369140625,
0.06231689453125,
0.015960693359375,
0.01056671142578125,
0.0174102783203125,
-0.0043182373046875,
0.01190185546875,
0.016143798828125,
-0.0211029052734375,
-0.007328033447265625,
-0.026702880859375,
0.017364501953125,
-0.034515380859375,
0.008941650390625,
-0.008209228515625,
0.00909423828125,
0.00785064697265625,
0.016387939453125,
0.0285491943359375,
-0.0194244384765625,
-0.0009851455688476562,
-0.013458251953125,
-0.038787841796875,
-0.0305328369140625,
-0.037933349609375,
0.0265350341796875,
-0.016204833984375,
0.005672454833984375,
0.02301025390625,
0.018035888671875,
-0.01039886474609375,
-0.0107574462890625,
0.0133514404296875,
0.006378173828125,
0.00508880615234375,
0.02099609375,
0.001384735107421875,
-0.055206298828125,
0.004993438720703125,
0.0133209228515625,
0.00907135009765625,
0.01052093505859375,
0.0169677734375,
0.0178985595703125,
-0.00864410400390625,
-0.0213775634765625,
0.0178985595703125,
-0.028106689453125,
0.0164642333984375,
-0.00855255126953125,
0.018310546875,
-0.07196044921875,
-0.00952911376953125,
-0.033477783203125,
0.053924560546875,
-0.0307159423828125,
0.0028324127197265625,
-0.006710052490234375,
0.016326904296875,
-0.03173828125,
-0.0310516357421875,
0.01332855224609375,
-0.045867919921875,
-0.00815582275390625,
0.0036525726318359375,
0.008697509765625,
-0.01039886474609375,
0.006221771240234375,
0.0083770751953125,
-0.0218658447265625,
-0.0108642578125,
0.007354736328125,
-0.0148468017578125,
-0.0100860595703125,
0.006290435791015625,
0.055145263671875,
0.030029296875,
-0.011749267578125,
-0.0086212158203125,
0.039093017578125,
-0.0631103515625,
0.016021728515625,
0.007404327392578125,
0.0377197265625,
0.0160064697265625,
0.0002713203430175781,
0.07843017578125,
-0.01470947265625,
-0.046875,
0.043609619140625,
-0.01544189453125,
0.00518035888671875,
-0.00896453857421875,
0.03387451171875,
-0.00933837890625,
-0.0404052734375,
-0.018218994140625,
0.0247650146484375,
-0.02239990234375,
0.028533935546875,
-0.0276641845703125,
0.0211639404296875,
-0.020599365234375,
0.05377197265625,
-0.0191192626953125,
0.0046844482421875,
0.0162353515625,
-0.0079803466796875,
-0.00960540771484375,
-0.029327392578125,
-0.040435791015625,
-0.037994384765625,
0.01226806640625,
-0.015777587890625,
0.017120361328125,
-0.005397796630859375,
0.01324462890625,
0.0227813720703125,
-0.012420654296875,
0.0044403076171875,
-0.02752685546875,
0.01343536376953125,
-0.052947998046875,
0.006591796875,
-0.06951904296875,
0.0103912353515625,
-0.027008056640625,
0.07257080078125,
-0.01262664794921875,
-0.00397491455078125,
0.0011730194091796875,
-0.014892578125,
-0.006805419921875,
-0.08319091796875,
0.02740478515625,
0.040374755859375,
0.023529052734375,
0.01806640625,
0.0009222030639648438,
0.050384521484375,
0.059417724609375,
0.01178741455078125,
0.0159759521484375,
0.015960693359375,
0.043914794921875,
0.0472412109375,
-0.036590576171875,
-0.0177154541015625,
0.03076171875,
-0.07623291015625,
0.011077880859375,
0.051727294921875,
-0.0042724609375,
-0.0150604248046875,
-0.01415252685546875,
0.06329345703125,
-0.0026397705078125,
0.021209716796875,
0.014190673828125,
0.0097503662109375,
0.06439208984375,
-0.00373077392578125,
0.031768798828125,
0.018218994140625,
-0.0303955078125,
0.0142364501953125,
0.014495849609375,
-0.006160736083984375,
0.00942230224609375,
0.043914794921875,
-0.02789306640625,
0.006591796875,
-0.0161590576171875,
0.004070281982421875,
-0.0031566619873046875,
0.018463134765625,
-0.02288818359375,
-0.005832672119140625,
-0.039031982421875,
-0.01300811767578125,
0.002288818359375,
-0.02911376953125,
-0.002063751220703125,
0.01389312744140625,
-0.0340576171875,
0.002490997314453125,
0.02349853515625,
0.023590087890625,
-0.02459716796875,
0.006504058837890625,
-0.00376129150390625,
-0.004184722900390625,
0.0908203125,
-0.0030574798583984375,
0.00754547119140625,
-0.01132965087890625,
0.04107666015625,
0.0360107421875,
-0.0198211669921875,
-0.0037937164306640625,
-0.00548553466796875,
0.0244140625,
0.04351806640625,
-0.03887939453125,
-0.02374267578125,
-0.0071868896484375,
-0.0183563232421875,
-0.023223876953125,
0.0135040283203125,
0.0904541015625,
-0.0322265625,
-0.0528564453125,
0.006839752197265625,
0.0423583984375,
-0.03851318359375,
-0.0242156982421875,
-0.04473876953125,
0.0015840530395507812,
-0.01145172119140625,
-0.0003628730773925781,
-0.0030078887939453125,
0.00469207763671875,
-0.00485992431640625,
0.0021381378173828125,
0.0655517578125,
-0.0270538330078125,
-0.056854248046875,
-0.01287078857421875,
-0.0677490234375,
-0.01495361328125,
0.00624847412109375,
-0.0092315673828125,
-0.006221771240234375,
0.036529541015625,
-0.0193328857421875,
-0.043914794921875,
-0.044158935546875,
-0.0008311271667480469,
0.01092529296875,
-0.0206756591796875,
0.06640625,
-0.068115234375,
-0.0166778564453125,
0.005046844482421875,
0.01398468017578125,
0.03887939453125,
-0.03466796875,
0.003887176513671875,
0.0008287429809570312,
0.006134033203125,
0.007671356201171875,
-0.0074920654296875,
0.007450103759765625,
-0.003963470458984375,
-0.013671875,
-0.0469970703125,
-0.042205810546875,
-0.0093994140625,
-0.023681640625,
0.06842041015625,
0.0254669189453125,
-0.002086639404296875,
0.006938934326171875,
0.049346923828125,
0.0228118896484375,
0.034393310546875,
0.0091552734375,
-0.011688232421875,
-0.01470947265625,
0.00870513916015625,
0.017181396484375,
-0.02764892578125,
0.01309967041015625,
-0.01198577880859375,
-0.0159454345703125,
-0.0139617919921875,
0.014007568359375,
0.0160980224609375,
0.0010461807250976562,
-0.001842498779296875,
-0.0728759765625,
0.054962158203125,
-0.0767822265625,
-0.0041351318359375,
-0.0897216796875,
-0.01528167724609375,
-0.01715087890625,
0.10223388671875,
0.01250457763671875,
-0.034912109375,
0.0176544189453125,
0.0001170039176940918,
-0.0382080078125,
0.025909423828125,
-0.0266571044921875,
-0.007358551025390625,
-0.06781005859375,
-0.0046539306640625,
-0.007602691650390625,
-0.0226593017578125,
-0.02752685546875,
0.028350830078125,
-0.046356201171875,
-0.039398193359375,
0.023284912109375,
-0.0369873046875,
0.0271148681640625,
0.0227203369140625,
0.0272674560546875,
-0.0019779205322265625,
-0.0060882568359375,
-0.057098388671875,
-0.06414794921875,
-0.0207977294921875,
-0.03680419921875,
0.08355712890625,
0.0200653076171875,
-0.00910186767578125,
-0.0203094482421875,
0.0430908203125,
-0.00972747802734375,
0.029144287109375,
-0.01526641845703125,
-0.00545501708984375,
-0.0249481201171875,
0.057525634765625,
0.0072174072265625,
0.0008144378662109375,
-0.017730712890625,
-0.037139892578125,
-0.0297698974609375,
0.0302886962890625,
-0.0189361572265625,
0.004772186279296875,
0.0009365081787109375,
-0.01053619384765625,
-0.0565185546875,
-0.036468505859375,
0.0236053466796875,
0.01496124267578125,
0.0158233642578125,
0.0020313262939453125,
-0.05950927734375,
-0.0382080078125,
0.040069580078125,
-0.005802154541015625,
-0.0123138427734375,
0.0144500732421875,
0.059112548828125,
0.011474609375,
-0.02825927734375,
-0.0845947265625,
0.03656005859375,
0.0306396484375,
0.04364013671875,
0.0233154296875,
-0.0076904296875,
-0.034027099609375,
0.07379150390625,
0.01666259765625,
-0.0032024383544921875,
-0.02587890625,
0.036163330078125,
-0.0165557861328125,
-0.045135498046875,
0.042144775390625,
-0.032928466796875,
0.0021991729736328125,
0.0010738372802734375,
-0.0177154541015625,
-0.00632476806640625,
-0.054229736328125,
0.03277587890625,
0.027587890625,
0.012725830078125,
-0.042022705078125,
-0.041595458984375,
0.00394439697265625,
-0.0176849365234375,
-0.00713348388671875,
0.0005359649658203125,
-0.0007658004760742188,
-0.0090789794921875,
0.01971435546875,
0.0105743408203125,
-0.0170135498046875,
0.036529541015625,
-0.0296173095703125,
0.01393890380859375,
0.031768798828125,
-0.01058197021484375,
-0.04638671875,
-0.0016736984252929688,
0.0389404296875,
0.021575927734375,
-0.031097412109375,
0.0011186599731445312,
0.019073486328125,
0.00754547119140625,
-0.01070404052734375,
0.0279388427734375,
0.027191162109375,
-0.009124755859375,
0.006275177001953125,
-0.0084075927734375,
-0.0070343017578125,
0.01039886474609375,
-0.0218505859375,
-0.0014629364013671875,
0.0614013671875,
-0.049713134765625,
0.01259613037109375,
0.004474639892578125,
0.04925537109375,
-0.02752685546875,
-0.0241546630859375,
0.041229248046875,
0.01471710205078125,
0.0128326416015625,
0.009368896484375,
0.03167724609375,
0.0158233642578125,
-0.026031494140625,
-0.002750396728515625,
-0.03912353515625,
-0.007297515869140625,
0.01904296875,
0.05010986328125,
0.0148773193359375,
-0.0074310302734375,
0.00991058349609375,
-0.03466796875,
0.021759033203125,
-0.009979248046875,
-0.016204833984375,
-0.019989013671875,
0.0013637542724609375,
0.01015472412109375,
0.0200958251953125,
-0.0261993408203125,
0.0300750732421875,
-0.041168212890625,
-0.046539306640625,
-0.030792236328125,
0.032958984375,
-0.01342010498046875,
-0.053924560546875,
-0.05718994140625,
0.0022258758544921875,
0.017242431640625,
-0.03607177734375,
-0.038848876953125,
-0.07427978515625,
0.0128936767578125,
-0.004669189453125,
0.05047607421875,
0.00972747802734375,
0.03680419921875,
-0.02252197265625,
-0.0151824951171875,
0.035552978515625,
0.0134735107421875,
-0.0034313201904296875,
-0.038665771484375,
-0.052459716796875,
-0.00011497735977172852,
-0.0341796875,
-0.028594970703125,
-0.032867431640625,
-0.054290771484375,
-0.049591064453125,
-0.0030078887939453125,
-0.01540374755859375,
0.0245819091796875,
-0.00940704345703125,
0.031768798828125,
0.00431060791015625,
-0.01001739501953125,
-0.034210205078125,
0.031829833984375,
-0.00965118408203125,
0.007965087890625,
0.0030117034912109375,
0.004650115966796875,
-0.0021152496337890625,
-0.01296234130859375,
0.006427764892578125,
-0.014678955078125,
-0.0019817352294921875,
0.00850677490234375,
-0.00948333740234375,
-0.0024662017822265625,
-0.026214599609375,
-0.0150146484375,
0.0718994140625,
-0.0152435302734375,
0.01507568359375,
-0.0214385986328125,
0.002925872802734375,
-0.03057861328125,
0.024658203125,
-0.039703369140625,
0.0224151611328125,
-0.03765869140625,
-0.0004706382751464844,
0.016845703125,
-0.035308837890625,
-0.018280029296875,
0.020050048828125,
-0.0009555816650390625,
0.00461578369140625,
0.0125732421875,
-0.06121826171875,
0.038116455078125,
0.041717529296875,
0.001129150390625,
0.01255035400390625,
-0.03857421875,
0.00888824462890625,
0.0229949951171875,
-0.038055419921875,
0.0208740234375,
0.017669677734375,
0.056121826171875,
-0.001941680908203125,
0.007030487060546875,
0.043701171875,
-0.021026611328125,
0.0098876953125,
0.050689697265625,
0.0467529296875,
-0.1151123046875,
0.0216522216796875,
0.0128326416015625,
0.0118560791015625,
0.02032470703125,
-0.01251220703125,
-0.005931854248046875,
-0.04107666015625,
0.035491943359375,
0.0005364418029785156,
-0.0155181884765625,
-0.00849151611328125,
-0.003353118896484375,
-0.01174163818359375,
0.005748748779296875,
0.05194091796875,
0.0176849365234375,
0.0062408447265625,
-0.03997802734375,
0.0101776123046875,
-0.004619598388671875,
-0.016693115234375,
-0.0091705322265625,
-0.013916015625,
-0.0269927978515625,
0.00794219970703125,
0.0362548828125,
-0.033050537109375,
0.0291595458984375,
-0.012847900390625,
0.0232391357421875,
0.032470703125,
0.05645751953125,
-0.0076446533203125,
0.002269744873046875,
0.01468658447265625,
0.0296173095703125,
-0.040924072265625,
-0.0260467529296875,
-0.019287109375,
-0.0181884765625,
0.027801513671875,
0.00435638427734375,
-0.02520751953125,
-0.0254669189453125,
-0.018463134765625,
0.0012502670288085938,
0.0908203125,
-0.0239715576171875,
-0.0419921875,
0.01007843017578125,
-0.0297393798828125,
-0.01532745361328125,
0.050079345703125,
-0.016693115234375,
-0.037017822265625,
-0.0263671875,
0.0230560302734375,
-0.06451416015625,
0.0049285888671875,
0.048736572265625,
-0.08343505859375,
0.0894775390625,
0.05352783203125,
0.0202789306640625,
0.00278472900390625,
0.030670166015625,
-0.060089111328125,
-0.005100250244140625,
-0.0210113525390625,
0.069580078125,
0.00963592529296875,
0.051300048828125,
0.005970001220703125,
0.00917816162109375,
0.04638671875,
0.0136260986328125,
0.03204345703125,
-0.0122222900390625,
0.00539398193359375,
0.0171356201171875,
0.0836181640625,
0.032745361328125,
0.00992584228515625,
0.01377105712890625,
-0.0079345703125,
0.0296630859375,
-0.02276611328125,
-0.0367431640625,
0.0129852294921875,
-0.047698974609375,
-0.04205322265625,
0.00634765625,
0.0235595703125,
0.038970947265625,
-0.05560302734375,
-0.004970550537109375,
-0.023101806640625,
-0.027801513671875,
0.0222930908203125,
-0.034881591796875,
0.0196533203125,
-0.0106964111328125,
0.0350341796875,
-0.03558349609375,
-0.0187225341796875,
-0.0074920654296875,
0.04107666015625,
0.01971435546875,
0.0035037994384765625,
0.024444580078125,
0.02142333984375,
0.034332275390625,
-0.045867919921875,
-0.00681304931640625,
-0.0031795501708984375,
-0.012939453125,
0.0540771484375,
0.0413818359375,
0.04296875,
0.0009946823120117188,
-0.017852783203125,
0.01462554931640625,
0.058013916015625,
-0.027587890625,
0.04376220703125,
0.0198974609375,
0.0150604248046875,
-0.0134429931640625,
-0.0552978515625,
0.005279541015625,
-0.0160980224609375,
-0.0416259765625,
-0.00870513916015625,
0.0006079673767089844,
0.0379638671875,
-0.0070953369140625,
-0.0007748603820800781,
0.00353240966796875,
-0.00922393798828125,
0.01325225830078125,
-0.05914306640625,
0.03564453125,
0.052154541015625,
0.051422119140625,
-0.0178680419921875,
0.08673095703125,
0.034942626953125,
-0.00569915771484375,
-0.003482818603515625,
0.047943115234375,
-0.055145263671875,
0.0228424072265625,
-0.060333251953125,
-0.04742431640625,
-0.003078460693359375,
0.04205322265625,
0.02886962890625,
0.04205322265625,
0.05303955078125,
0.01248931884765625,
-0.00914764404296875,
0.006610870361328125,
-0.0156707763671875,
-0.03253173828125,
0.0880126953125,
-0.0537109375,
0.06988525390625,
-0.0270233154296875,
-0.0121307373046875,
-0.046539306640625,
0.043853759765625,
0.010772705078125,
-0.0171966552734375,
0.0181121826171875,
-0.001621246337890625,
-0.01861572265625,
0.048919677734375,
0.0004868507385253906,
0.0310516357421875,
0.0268096923828125,
-0.0221710205078125,
-0.01483154296875,
-0.00732421875,
-0.01303863525390625,
0.01090240478515625,
0.039093017578125,
-0.0120391845703125,
0.017578125,
-0.0305023193359375,
0.017486572265625,
0.00983428955078125,
-0.04107666015625,
0.01120758056640625,
0.026336669921875,
0.01605224609375,
0.0173492431640625,
-0.0282440185546875,
-0.03875732421875,
-0.0350341796875,
0.08294677734375,
0.020538330078125,
0.08782958984375,
-0.052947998046875,
0.050201416015625,
-0.050262451171875,
0.003940582275390625,
-0.032012939453125,
-0.045684814453125,
0.058868408203125,
0.023162841796875,
-0.01534271240234375,
-0.0144195556640625,
-0.048431396484375,
0.04058837890625,
0.032928466796875,
-0.011444091796875,
0.037139892578125,
-0.0018863677978515625,
-0.0068817138671875,
-0.0265655517578125,
-0.0218505859375,
-0.0201416015625,
-0.0222930908203125,
0.002262115478515625,
0.003871917724609375,
0.006072998046875,
-0.0005402565002441406,
-0.030059814453125,
0.037261962890625,
0.00691986083984375,
0.029327392578125,
0.0279998779296875,
-0.0202789306640625,
0.04510498046875,
0.038970947265625,
-0.0718994140625,
-0.06024169921875,
0.0101165771484375,
-0.015167236328125,
0.00846099853515625,
-0.0090789794921875,
0.06475830078125,
0.01227569580078125,
-0.01526641845703125,
-0.0241546630859375,
-0.04168701171875,
0.01018524169921875,
-0.022430419921875,
0.00017702579498291016,
-0.0487060546875,
0.0198211669921875,
0.0244598388671875,
-0.037933349609375,
-0.0213775634765625,
-0.03497314453125,
-0.016387939453125,
0.0299224853515625,
-0.018280029296875,
-0.047882080078125,
-0.0294952392578125,
-0.005462646484375,
0.0029315948486328125,
0.01068878173828125,
-0.032379150390625,
0.0170745849609375,
-0.0107421875,
-0.0256500244140625,
0.0006260871887207031,
-0.0775146484375,
0.002315521240234375,
0.011260986328125,
-0.0301666259765625,
-0.03955078125,
-0.07171630859375,
-0.00830841064453125,
-0.057525634765625,
0.0078582763671875,
0.01215362548828125,
0.0000814199447631836,
0.037872314453125,
0.0198516845703125,
0.019622802734375,
0.06683349609375,
-0.03076171875,
-0.03179931640625,
0.053497314453125,
-0.04638671875,
0.00853729248046875,
-0.044189453125,
-0.02239990234375,
-0.05810546875,
0.008758544921875,
0.033111572265625,
-0.01422882080078125,
0.0114288330078125,
-0.037994384765625,
-0.0865478515625,
-0.0045623779296875,
0.01438140869140625,
-0.045318603515625,
-0.0180206298828125,
-0.004184722900390625,
-0.020660400390625,
0.035400390625,
0.0007977485656738281,
-0.0150299072265625,
-0.0086212158203125,
0.024139404296875,
0.03045654296875,
0.006687164306640625,
0.0318603515625,
0.0302886962890625,
0.01213836669921875,
0.037841796875,
0.02362060546875,
-0.0244140625,
0.00576019287109375,
-0.00510406494140625,
0.027618408203125,
0.0312347412109375,
-0.019805908203125,
-0.007228851318359375,
0.017303466796875,
-0.02825927734375,
-0.00609588623046875,
0.0413818359375,
-0.0628662109375,
-0.01531982421875,
0.08758544921875,
0.07989501953125,
0.03411865234375,
-0.0189971923828125,
0.01384735107421875,
-0.028350830078125,
-0.04443359375,
-0.0157928466796875,
0.0220947265625,
-0.057403564453125,
-0.00841522216796875,
0.0182342529296875,
-0.0218505859375,
-0.036163330078125,
-0.009735107421875,
-0.05029296875,
0.010284423828125,
-0.0005030632019042969,
0.004039764404296875,
0.0289459228515625,
-0.0262603759765625,
0.1021728515625,
-0.042388916015625,
0.0289306640625,
-0.0160675048828125,
0.039764404296875,
0.06390380859375,
-0.04248046875,
0.026275634765625,
0.0309295654296875,
-0.01474761962890625,
0.02862548828125,
0.04669189453125,
-0.015594482421875,
-0.0175018310546875,
-0.01422119140625,
-0.0004763603210449219,
0.05615234375,
0.006015777587890625,
0.034759521484375,
-0.03900146484375,
0.1021728515625,
0.01392364501953125,
0.06695556640625,
-0.0184173583984375,
0.004779815673828125,
-0.00511932373046875,
0.036468505859375,
-0.0281982421875,
-0.007617950439453125,
0.0111541748046875,
-0.0328369140625,
-0.0040740966796875,
0.0255126953125,
-0.0051422119140625,
-0.060699462890625,
0.03131103515625,
-0.029571533203125,
0.031768798828125,
0.0211944580078125
] |
a61655160a7a8c4a4a0f6231bf16689930754aea
|
Wordpress Stackexchange
Q: How do you add thumbnail support for custom post types? the thumbnail support is working for post, but I have another post type called product and it is not working for this. I am trying: add_theme_support( 'post-thumbnails', array( 'post', 'product' ) );
I am also using the multiple post thumbnail plugin.
A: You can also use add_post_type_support() to add a single feature, if you don't want to rewrite the default supports options when registering your custom post type:
add_post_type_support( 'product', 'thumbnail' );
|
Q: How do you add thumbnail support for custom post types? the thumbnail support is working for post, but I have another post type called product and it is not working for this. I am trying: add_theme_support( 'post-thumbnails', array( 'post', 'product' ) );
I am also using the multiple post thumbnail plugin.
A: You can also use add_post_type_support() to add a single feature, if you don't want to rewrite the default supports options when registering your custom post type:
add_post_type_support( 'product', 'thumbnail' );
A: By default all custom post adds support for Title and editor, if you want more stuff like comments, thumbnail and revisions you have to add it manually in the support argument.
Read more about how to register your custom post type here, you can also find the section about support to see what you can add.
Here is an example wehere to register thumbnail for the custom post "Books" and it hav support for: 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'
function codex_custom_init() {
$labels = array(
'name' => _x('Books', 'post type general name'),
'singular_name' => _x('Book', 'post type singular name'),
'add_new' => _x('Add New', 'book'),
'add_new_item' => __('Add New Book'),
'edit_item' => __('Edit Book'),
'new_item' => __('New Book'),
'all_items' => __('All Books'),
'view_item' => __('View Book'),
'search_items' => __('Search Books'),
'not_found' => __('No books found'),
'not_found_in_trash' => __('No books found in Trash'),
'parent_item_colon' => '',
'menu_name' => __('Books')
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
);
register_post_type('book',$args);
}
add_action( 'init', 'codex_custom_init' );
A: For custom posts, you first have to enable support for thumbnails:
add_theme_support( 'post-thumbnails' );
function theme_setup() {
register_post_type( 'yourposttype', array(
...,
'supports' => array('title', ...,'thumbnail'),
));
}
add_action( 'after_setup_theme', 'theme_setup' );
|
wordpress
|
{
"language": "en",
"length": 318,
"provenance": "stackexchange_00019.jsonl.gz:421558",
"question_score": "18",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57589"
}
|
[
0.0650634765625,
-0.01465606689453125,
0.0307769775390625,
-0.0367431640625,
0.009429931640625,
-0.00972747802734375,
0.0640869140625,
-0.024017333984375,
-0.0016689300537109375,
-0.004840850830078125,
-0.01096343994140625,
0.01512908935546875,
-0.026519775390625,
-0.0277557373046875,
0.0124969482421875,
-0.0174102783203125,
0.057525634765625,
-0.037078857421875,
0.0474853515625,
-0.0018529891967773438,
0.0194549560546875,
0.035400390625,
0.0343017578125,
0.03863525390625,
0.022247314453125,
-0.003940582275390625,
0.0245208740234375,
-0.0178985595703125,
0.0023212432861328125,
-0.020965576171875,
0.0171966552734375,
0.004604339599609375,
0.005611419677734375,
0.01192474365234375,
0.01190948486328125,
0.034393310546875,
0.0251617431640625,
0.002960205078125,
0.018585205078125,
0.033355712890625,
0.0168304443359375,
-0.0019626617431640625,
0.025909423828125,
0.01024627685546875,
0.0035915374755859375,
-0.01517486572265625,
-0.0010395050048828125,
-0.05987548828125,
0.0225372314453125,
-0.0428466796875,
-0.006465911865234375,
0.0009765625,
0.03143310546875,
-0.0565185546875,
-0.025726318359375,
-0.027740478515625,
-0.052490234375,
0.01517486572265625,
0.048919677734375,
-0.01690673828125,
-0.021392822265625,
-0.042572021484375,
0.0242919921875,
-0.00853729248046875,
0.006130218505859375,
0.0156097412109375,
-0.0195465087890625,
-0.0023021697998046875,
-0.039703369140625,
0.007381439208984375,
0.0214385986328125,
-0.060089111328125,
0.0182342529296875,
-0.01557159423828125,
0.0031452178955078125,
-0.01224517822265625,
-0.00024580955505371094,
-0.023590087890625,
0.01290130615234375,
-0.0026721954345703125,
-0.019683837890625,
-0.014892578125,
0.0164031982421875,
-0.027099609375,
0.0041656494140625,
0.004177093505859375,
-0.016754150390625,
-0.0032405853271484375,
-0.003570556640625,
-0.011383056640625,
0.0034313201904296875,
-0.057952880859375,
-0.06060791015625,
0.08154296875,
0.05023193359375,
-0.044281005859375,
0.0638427734375,
0.033843994140625,
0.002307891845703125,
-0.00830078125,
0.0201263427734375,
-0.06927490234375,
0.049407958984375,
-0.03985595703125,
0.026580810546875,
-0.01071929931640625,
-0.017333984375,
-0.0272369384765625,
0.04473876953125,
0.053375244140625,
-0.0208587646484375,
0.06353759765625,
0.042816162109375,
-0.00811767578125,
-0.0092010498046875,
-0.00476837158203125,
0.00849151611328125,
0.0287628173828125,
0.00812530517578125,
0.003688812255859375,
0.035858154296875,
0.057708740234375,
-0.0017499923706054688,
-0.058624267578125,
-0.0097198486328125,
-0.007610321044921875,
-0.0256195068359375,
-0.055145263671875,
0.006793975830078125,
0.0248870849609375,
-0.028472900390625,
0.003757476806640625,
0.046539306640625,
0.0211029052734375,
0.013397216796875,
-0.0140228271484375,
0.00685882568359375,
-0.032684326171875,
-0.01306915283203125,
0.01470947265625,
-0.0017652511596679688,
-0.0245513916015625,
-0.00238800048828125,
-0.01149749755859375,
0.045196533203125,
-0.002445220947265625,
0.00830078125,
0.033294677734375,
0.0189971923828125,
0.0010881423950195312,
0.040985107421875,
-0.0127105712890625,
0.007053375244140625,
0.029449462890625,
0.046539306640625,
-0.0216827392578125,
0.048980712890625,
-0.032196044921875,
0.0263519287109375,
-0.025543212890625,
0.01016998291015625,
-0.0186309814453125,
0.0034618377685546875,
-0.03265380859375,
-0.06182861328125,
0.028350830078125,
-0.049896240234375,
-0.0125732421875,
0.0289306640625,
0.0137176513671875,
-0.003902435302734375,
0.00768280029296875,
0.028594970703125,
0.01209259033203125,
-0.007659912109375,
0.00983428955078125,
0.007904052734375,
0.006771087646484375,
0.0235137939453125,
0.033477783203125,
-0.0186920166015625,
-0.03485107421875,
0.05218505859375,
-0.0293731689453125,
-0.040435791015625,
0.01276397705078125,
0.019622802734375,
0.05157470703125,
-0.01275634765625,
0.0273895263671875,
0.01309967041015625,
0.0166015625,
-0.04901123046875,
0.02105712890625,
0.033843994140625,
-0.021392822265625,
-0.038726806640625,
-0.03631591796875,
0.002170562744140625,
-0.0088348388671875,
0.001598358154296875,
-0.003238677978515625,
0.00623321533203125,
0.0269622802734375,
-0.0404052734375,
0.0117950439453125,
-0.0297393798828125,
0.0292816162109375,
0.007251739501953125,
-0.00394439697265625,
0.00859832763671875,
-0.0085601806640625,
-0.0193939208984375,
0.0180816650390625,
-0.031829833984375,
0.007663726806640625,
-0.0098114013671875,
0.02587890625,
-0.01435089111328125,
0.05059814453125,
-0.037322998046875,
-0.01690673828125,
-0.03271484375,
0.01229095458984375,
0.0526123046875,
0.0262298583984375,
-0.038421630859375,
0.005107879638671875,
-0.009124755859375,
0.0389404296875,
-0.08428955078125,
0.042449951171875,
-0.025482177734375,
-0.048187255859375,
-0.02789306640625,
-0.0002168416976928711,
0.0171051025390625,
-0.072265625,
0.0205535888671875,
0.0614013671875,
0.0257568359375,
0.0606689453125,
0.01413726806640625,
0.02972412109375,
0.08929443359375,
0.025726318359375,
0.0157623291015625,
-0.006175994873046875,
-0.017303466796875,
0.006404876708984375,
0.0204315185546875,
0.007228851318359375,
0.01413726806640625,
-0.042266845703125,
0.0290679931640625,
0.029083251953125,
-0.0005464553833007812,
0.01885986328125,
-0.032196044921875,
0.0247344970703125,
-0.00531768798828125,
-0.00904083251953125,
-0.00957489013671875,
-0.01358795166015625,
0.03314208984375,
0.0279388427734375,
0.041351318359375,
0.03466796875,
-0.0168304443359375,
0.0118255615234375,
-0.00872802734375,
-0.00882720947265625,
-0.001453399658203125,
0.027740478515625,
0.026153564453125,
0.018341064453125,
-0.052734375,
-0.01464080810546875,
0.043426513671875,
0.0191802978515625,
-0.012237548828125,
0.002864837646484375,
-0.0198974609375,
0.007328033447265625,
-0.0229644775390625,
-0.060333251953125,
0.03240966796875,
0.061065673828125,
-0.0305328369140625,
-0.054229736328125,
-0.0174713134765625,
0.036834716796875,
-0.01629638671875,
0.020599365234375,
0.0120697021484375,
-0.00852203369140625,
-0.0202178955078125,
-0.0601806640625,
0.06585693359375,
-0.05718994140625,
0.032135009765625,
0.06329345703125,
-0.033721923828125,
0.0266876220703125,
0.0101318359375,
0.0089874267578125,
0.012969970703125,
0.03753662109375,
0.02056884765625,
-0.0301055908203125,
-0.0034008026123046875,
-0.00007206201553344727,
0.03570556640625,
0.06103515625,
0.009002685546875,
-0.02557373046875,
0.032806396484375,
0.059295654296875,
-0.02349853515625,
-0.0301513671875,
-0.00007969141006469727,
-0.0826416015625,
0.01438140869140625,
-0.029144287109375,
-0.046142578125,
-0.011810302734375,
0.011627197265625,
0.0099945068359375,
-0.04150390625,
-0.004543304443359375,
-0.0234375,
-0.040313720703125,
-0.051513671875,
-0.005153656005859375,
0.0032024383544921875,
0.03143310546875,
0.02099609375,
0.06103515625,
0.00927734375,
-0.06719970703125,
0.01837158203125,
0.0205535888671875,
-0.023284912109375,
0.028350830078125,
-0.0103912353515625,
-0.004638671875,
0.0066680908203125,
-0.006488800048828125,
-0.0006937980651855469,
0.032318115234375,
-0.0184783935546875,
0.0035552978515625,
-0.039520263671875,
0.0073089599609375,
-0.022216796875,
0.06182861328125,
0.057891845703125,
0.0188446044921875,
0.0263671875,
-0.0257110595703125,
-0.0268707275390625,
-0.0273895263671875,
-0.046722412109375,
-0.0108642578125,
0.0333251953125,
0.0103607177734375,
-0.0382080078125,
0.03997802734375,
-0.0027103424072265625,
-0.0006012916564941406,
0.0261688232421875,
-0.01776123046875,
0.037017822265625,
-0.004505157470703125,
-0.006649017333984375,
-0.032562255859375,
-0.048004150390625,
-0.044281005859375,
0.06072998046875,
-0.021942138671875,
0.005397796630859375,
-0.02545166015625,
0.05029296875,
-0.03985595703125,
-0.054229736328125,
0.0400390625,
-0.01132965087890625,
0.015869140625,
-0.023284912109375,
-0.033294677734375,
0.0159454345703125,
0.0950927734375,
-0.059661865234375,
-0.01561737060546875,
-0.0157623291015625,
0.012359619140625,
0.022369384765625,
-0.07476806640625,
-0.01103973388671875,
-0.038848876953125,
-0.0345458984375,
-0.004383087158203125,
0.004627227783203125,
-0.03863525390625,
-0.0112152099609375,
-0.007419586181640625,
-0.03570556640625,
-0.0101165771484375,
0.027435302734375,
-0.0235137939453125,
0.034393310546875,
0.0447998046875,
-0.006572723388671875,
0.039947509765625,
-0.034423828125,
-0.025177001953125,
-0.0927734375,
-0.0240936279296875,
0.00261688232421875,
0.07904052734375,
-0.0063629150390625,
0.004650115966796875,
-0.03350830078125,
0.045257568359375,
0.00949859619140625,
0.034820556640625,
-0.01309967041015625,
-0.01385498046875,
0.0070343017578125,
0.0107574462890625,
0.009674072265625,
0.003116607666015625,
-0.0152587890625,
-0.046112060546875,
-0.0300140380859375,
0.0194549560546875,
-0.0222320556640625,
0.034881591796875,
-0.008148193359375,
-0.0009322166442871094,
-0.00525665283203125,
0.0115966796875,
0.0279083251953125,
0.0234527587890625,
0.005107879638671875,
-0.00785064697265625,
-0.007686614990234375,
0.00875091552734375,
0.0654296875,
0.0006089210510253906,
0.00524139404296875,
-0.0015058517456054688,
0.0931396484375,
0.0048828125,
-0.0267486572265625,
-0.09100341796875,
0.0224151611328125,
0.0150146484375,
-0.0069580078125,
0.0276641845703125,
0.00870513916015625,
-0.01323699951171875,
-0.002483367919921875,
-0.00016736984252929688,
-0.0203094482421875,
-0.01171875,
0.047271728515625,
-0.0134124755859375,
-0.018402099609375,
0.0117340087890625,
-0.045623779296875,
0.044036865234375,
-0.008331298828125,
-0.0206146240234375,
-0.0139923095703125,
-0.0165557861328125,
0.05291748046875,
-0.01226806640625,
0.0301513671875,
-0.05615234375,
0.005413055419921875,
-0.000301361083984375,
-0.0215606689453125,
0.043975830078125,
0.051605224609375,
-0.0270538330078125,
0.002613067626953125,
-0.030792236328125,
0.0224151611328125,
0.0011463165283203125,
-0.0286102294921875,
0.01117706298828125,
0.031890869140625,
0.017974853515625,
0.03387451171875,
0.001804351806640625,
0.0038394927978515625,
0.00995635986328125,
0.00531768798828125,
-0.0225830078125,
-0.056365966796875,
0.01299285888671875,
0.0093536376953125,
-0.0089874267578125,
0.00467681884765625,
0.033843994140625,
0.0303497314453125,
-0.0242919921875,
-0.00974273681640625,
-0.00969696044921875,
0.01372528076171875,
-0.04718017578125,
0.005458831787109375,
0.002330780029296875,
-0.00637054443359375,
0.01177215576171875,
0.029876708984375,
0.004383087158203125,
0.02215576171875,
-0.01470184326171875,
0.049957275390625,
0.034759521484375,
0.03961181640625,
0.011627197265625,
0.005504608154296875,
-0.0362548828125,
0.04278564453125,
-0.034332275390625,
-0.040191650390625,
-0.0276336669921875,
-0.0009417533874511719,
0.048309326171875,
-0.0266265869140625,
0.005977630615234375,
0.025115966796875,
-0.00940704345703125,
-0.002986907958984375,
-0.020660400390625,
0.0054779052734375,
-0.0227203369140625,
0.01678466796875,
0.0355224609375,
-0.001483917236328125,
0.0029811859130859375,
-0.03643798828125,
0.03302001953125,
-0.041595458984375,
0.0130767822265625,
-0.0232391357421875,
-0.0285491943359375,
0.0052490234375,
0.013427734375,
-0.01067352294921875,
-0.0277252197265625,
-0.01165771484375,
-0.02008056640625,
-0.01149749755859375,
-0.0204925537109375,
-0.01029205322265625,
0.0262298583984375,
-0.045806884765625,
0.031707763671875,
-0.002017974853515625,
-0.010284423828125,
-0.01922607421875,
0.030731201171875,
0.0116119384765625,
0.0244140625,
-0.0255889892578125,
0.004344940185546875,
-0.0183563232421875,
-0.01137542724609375,
0.0119476318359375,
-0.00635528564453125,
-0.052581787109375,
-0.03302001953125,
0.025238037109375,
0.0302581787109375,
0.006481170654296875,
-0.021240234375,
-0.011138916015625,
0.018280029296875,
0.019683837890625,
0.0771484375,
-0.00014102458953857422,
0.0169219970703125,
-0.009521484375,
0.055084228515625,
0.003910064697265625,
-0.01096343994140625,
-0.02142333984375,
-0.0236358642578125,
-0.027008056640625,
-0.0885009765625,
0.022491455078125,
0.0343017578125,
-0.036865234375,
0.0633544921875,
0.06591796875,
0.0296630859375,
-0.0362548828125,
-0.0215606689453125,
-0.00925445556640625,
-0.033355712890625,
0.05487060546875,
-0.006931304931640625,
-0.04766845703125,
-0.01198577880859375,
-0.018157958984375,
0.040557861328125,
-0.003391265869140625,
-0.0207672119140625,
0.016876220703125,
-0.0191497802734375,
0.0127105712890625,
0.0548095703125,
-0.0084686279296875,
0.0340576171875,
0.055633544921875,
-0.00942230224609375,
0.03009033203125,
0.0230255126953125,
-0.0056915283203125,
0.00215911865234375,
0.0208892822265625,
-0.051971435546875,
-0.006946563720703125,
0.03369140625,
0.005794525146484375,
-0.01445770263671875,
0.01021575927734375,
-0.0149688720703125,
0.0234222412109375,
0.017608642578125,
0.040863037109375,
-0.048370361328125,
0.0212554931640625,
-0.01259613037109375,
-0.0273590087890625,
0.06414794921875,
-0.0161285400390625,
0.0188140869140625,
0.043609619140625,
0.015960693359375,
-0.00417327880859375,
-0.0462646484375,
0.00399017333984375,
0.00160980224609375,
-0.00858306884765625,
0.0188140869140625,
-0.0136871337890625,
-0.0096282958984375,
-0.07855224609375,
-0.0222930908203125,
0.0543212890625,
-0.050750732421875,
0.0253448486328125,
0.022552490234375,
-0.037017822265625,
-0.007556915283203125,
-0.01303863525390625,
0.012359619140625,
-0.050628662109375,
0.007595062255859375,
0.049835205078125,
0.0230865478515625,
0.017486572265625,
0.04345703125,
-0.0005288124084472656,
0.0396728515625,
0.005878448486328125,
-0.0248565673828125,
-0.0176239013671875,
0.003711700439453125,
0.0244293212890625,
0.027679443359375,
-0.051361083984375,
0.0148773193359375,
-0.047760009765625,
0.02545166015625,
-0.015655517578125,
-0.0210723876953125,
0.04913330078125,
-0.01328277587890625,
-0.0144195556640625,
0.0228271484375,
0.0479736328125,
-0.006877899169921875,
-0.007080078125,
-0.0173187255859375,
-0.047760009765625,
-0.00026917457580566406,
-0.0121612548828125,
-0.0193023681640625,
0.01727294921875,
0.00811004638671875,
-0.071533203125,
0.05682373046875,
-0.0313720703125,
0.050140380859375,
0.0093231201171875,
0.00803375244140625,
0.01070404052734375,
-0.009002685546875,
-0.01126861572265625,
0.0082244873046875,
-0.039825439453125,
0.01279449462890625,
-0.039154052734375,
0.007755279541015625,
-0.006282806396484375,
0.0185699462890625,
0.02874755859375,
0.00472259521484375,
-0.0472412109375,
-0.007450103759765625,
0.07574462890625,
0.04656982421875,
0.0264434814453125,
0.035247802734375,
-0.024261474609375,
-0.036224365234375,
0.03955078125,
0.020294189453125,
0.0504150390625,
0.0031795501708984375,
-0.03375244140625,
-0.01096343994140625,
0.01396942138671875,
0.0208892822265625,
-0.01512908935546875,
-0.00746917724609375,
-0.00830841064453125,
-0.009674072265625,
0.01166534423828125,
-0.01076507568359375,
0.0162200927734375,
0.0261993408203125,
0.01282501220703125,
0.024993896484375,
-0.004390716552734375,
-0.0087738037109375,
0.0361328125,
-0.0005259513854980469,
0.048828125,
-0.0010232925415039062,
0.0238800048828125,
0.023681640625,
0.0022144317626953125,
0.028106689453125,
0.036041259765625,
-0.03759765625,
0.00975799560546875,
-0.001636505126953125,
0.0028629302978515625,
-0.03509521484375,
0.042572021484375,
-0.00141143798828125,
-0.0089263916015625,
-0.0478515625,
-0.038299560546875,
0.0161590576171875,
0.0246429443359375,
-0.004558563232421875,
-0.0033435821533203125,
-0.0268096923828125,
-0.037445068359375,
0.043212890625,
-0.06060791015625,
-0.004322052001953125,
0.04833984375,
0.0382080078125,
-0.00852203369140625,
-0.032928466796875,
-0.05621337890625,
-0.02886962890625,
-0.017669677734375,
-0.0013608932495117188,
0.0289306640625,
0.054901123046875,
0.00418853759765625,
0.078369140625,
-0.03729248046875,
-0.016448974609375,
0.007038116455078125,
0.0289306640625,
0.00046443939208984375,
-0.01531982421875,
-0.0246124267578125,
-0.07318115234375,
0.0207366943359375,
0.031890869140625,
0.017181396484375,
0.00852203369140625,
0.010101318359375,
0.035675048828125,
-0.008270263671875,
-0.0026569366455078125,
0.062347412109375,
-0.008331298828125,
-0.01189422607421875,
-0.05419921875,
0.033935546875,
0.0223846435546875,
0.00606536865234375,
0.007312774658203125,
-0.032989501953125,
0.058502197265625,
-0.0196380615234375,
0.03436279296875,
-0.0033283233642578125,
-0.017822265625,
0.07330322265625,
-0.00994873046875,
0.10247802734375,
0.01016998291015625,
-0.037811279296875,
-0.013763427734375,
-0.01380157470703125,
-0.048492431640625,
0.0231781005859375,
0.037872314453125,
-0.0305938720703125,
0.0219573974609375,
0.06988525390625,
-0.0128631591796875,
0.0038394927978515625,
0.004192352294921875,
0.033111572265625,
-0.007778167724609375,
0.0259857177734375,
0.0307464599609375,
-0.031341552734375,
-0.03369140625,
0.0034637451171875,
0.0279998779296875,
-0.018951416015625,
0.0311279296875,
-0.005153656005859375,
0.01324462890625,
0.0042724609375,
0.0284881591796875,
-0.022674560546875,
0.0170135498046875,
0.002262115478515625,
0.0057373046875,
0.00927734375,
-0.0280914306640625,
0.0115203857421875,
-0.0026378631591796875,
0.057525634765625,
-0.03839111328125,
-0.032806396484375,
0.006290435791015625,
0.02093505859375,
-0.0081024169921875,
0.01233673095703125,
-0.03314208984375,
-0.0233154296875,
-0.0672607421875,
-0.030609130859375,
0.022216796875,
-0.0062408447265625,
0.01247406005859375,
0.020111083984375,
0.0238189697265625,
-0.0231781005859375,
0.033447265625,
-0.024932861328125,
0.051910400390625,
0.0330810546875,
-0.00823974609375,
-0.06353759765625,
0.000637054443359375,
0.00453948974609375,
-0.007518768310546875,
0.013275146484375,
0.052703857421875,
0.0286102294921875,
-0.004146575927734375,
0.0157012939453125,
0.014892578125,
0.0189208984375,
-0.03338623046875,
-0.01482391357421875,
0.055419921875,
-0.0276641845703125,
-0.0281524658203125,
0.00554656982421875,
-0.02215576171875,
-0.0638427734375,
0.0170135498046875,
0.0176849365234375,
-0.017242431640625,
0.001689910888671875,
-0.034515380859375,
-0.012725830078125,
0.048583984375,
0.025115966796875,
-0.073486328125,
0.032562255859375,
0.0014028549194335938,
0.0112457275390625,
0.0177154541015625,
-0.055572509765625,
0.0382080078125,
0.07891845703125,
0.00286865234375,
-0.004283905029296875,
-0.003597259521484375,
-0.024200439453125,
-0.01690673828125,
0.043060302734375,
0.037017822265625,
-0.05841064453125,
-0.006008148193359375,
0.0908203125,
0.043670654296875,
0.1322021484375,
0.029754638671875,
-0.022796630859375,
0.00247955322265625,
-0.0024814605712890625,
-0.01155853271484375,
-0.05181884765625,
0.00713348388671875,
-0.0745849609375,
-0.0202789306640625,
-0.005817413330078125,
-0.0015802383422851562,
0.0261993408203125,
-0.0262298583984375,
-0.07879638671875,
0.06451416015625,
-0.0165557861328125,
-0.03704833984375,
-0.07122802734375,
-0.0259552001953125,
-0.00563812255859375,
0.0134735107421875,
-0.0224609375,
-0.01360321044921875,
-0.035797119140625,
0.06414794921875,
-0.006500244140625,
-0.003093719482421875,
0.0380859375,
-0.026824951171875,
0.0212554931640625,
0.002552032470703125,
0.0238189697265625,
-0.042144775390625,
0.032958984375,
-0.033477783203125,
0.035919189453125,
0.042572021484375,
-0.04193115234375,
-0.08349609375,
-0.0199127197265625,
-0.029449462890625,
0.00135040283203125,
-0.0283355712890625,
-0.04144287109375,
-0.036956787109375,
0.0275115966796875,
0.04071044921875,
0.01361846923828125,
0.006130218505859375,
0.0266571044921875,
-0.051055908203125,
-0.041595458984375,
0.0010938644409179688,
0.0096282958984375,
-0.042266845703125,
-0.01003265380859375,
0.040679931640625,
0.0168609619140625,
-0.0005483627319335938,
0.01459503173828125,
0.01073455810546875,
-0.0205535888671875,
0.039459228515625,
0.0030574798583984375,
-0.048309326171875,
0.01959228515625,
0.062744140625,
-0.0511474609375,
-0.01381683349609375,
0.005950927734375,
-0.0026760101318359375,
0.0166015625,
-0.038848876953125,
-0.02008056640625,
-0.00040030479431152344,
0.00904083251953125,
0.028472900390625,
0.0038356781005859375,
-0.004917144775390625,
-0.00949859619140625,
0.03375244140625,
0.00487518310546875,
0.035980224609375,
0.00858306884765625,
0.0457763671875,
-0.006237030029296875,
0.04345703125,
0.0024242401123046875,
0.028564453125,
0.00485992431640625,
-0.046630859375,
-0.0178985595703125,
0.0184326171875,
-0.01538848876953125,
-0.005084991455078125,
0.003658294677734375,
-0.023223876953125,
-0.0011873245239257812,
0.0026702880859375,
-0.044036865234375,
-0.039215087890625,
0.016204833984375,
0.0322265625,
-0.024200439453125,
0.0166168212890625
] |
712e60cbe78f406b234772729f5847ba2a53ba90
|
Wordpress Stackexchange
Q: Is it possible to allow zip files to be uploaded in Wordpress? Is it possible to allow zip files to be uploaded in Wordpress?
I have the following code but it doesn't work.
function custom_upload_mimes($existing_mimes = array()) {
// Add *.EPS files to Media upload
$existing_mimes['eps'] = 'application/postscript';
// Add *.AI files to Media upload
$existing_mimes['ai'] = 'application/postscript';
// Add *.AI files to Media upload
$existing_mimes['3ds'] = 'application/postscript';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/acad';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/x-acad';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/autocad_dwg';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/dwg';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/x-dwg';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/x-autocad';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'drawing/dwg';
//add .zip
$existing_mimes['zip'] = 'application/zip';
return $existing_mimes;
}
add_filter('upload_mimes', 'custom_upload_mimes');
A: Here is a action that works on my site:
add_filter('upload_mimes', 'custom_upload_mimes');
function custom_upload_mimes ( $existing_mimes=array() ) {
// add your extension to the mimes array as below
$existing_mimes['zip'] = 'application/zip';
$existing_mimes['gz'] = 'application/x-gzip';
return $existing_mimes;
}
|
Q: Is it possible to allow zip files to be uploaded in Wordpress? Is it possible to allow zip files to be uploaded in Wordpress?
I have the following code but it doesn't work.
function custom_upload_mimes($existing_mimes = array()) {
// Add *.EPS files to Media upload
$existing_mimes['eps'] = 'application/postscript';
// Add *.AI files to Media upload
$existing_mimes['ai'] = 'application/postscript';
// Add *.AI files to Media upload
$existing_mimes['3ds'] = 'application/postscript';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/acad';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/x-acad';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/autocad_dwg';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/dwg';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/x-dwg';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'application/x-autocad';
// Add *.dwg files to Media upload
$existing_mimes['dwg'] = 'drawing/dwg';
//add .zip
$existing_mimes['zip'] = 'application/zip';
return $existing_mimes;
}
add_filter('upload_mimes', 'custom_upload_mimes');
A: Here is a action that works on my site:
add_filter('upload_mimes', 'custom_upload_mimes');
function custom_upload_mimes ( $existing_mimes=array() ) {
// add your extension to the mimes array as below
$existing_mimes['zip'] = 'application/zip';
$existing_mimes['gz'] = 'application/x-gzip';
return $existing_mimes;
}
A: In 5.0.3 (probably already earlier): For multisite (at least), you can edit the allowed extensions and add zip in the network settings. No need to edit files anymore.
My Sites > Network Admin > Settings > Upload file types
A: If you are using WP MultiSite you can configure the behavior the following way (tested in WP 3.8.1):
*
*Go to the network settings in your browser: http://example.com/wp-admin/network/settings.php
*Scroll down to the bottom of the settings page and you will find a list of allowed file types, add zip to it.
|
wordpress
|
{
"language": "en",
"length": 278,
"provenance": "stackexchange_00019.jsonl.gz:421561",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57603"
}
|
[
0.019500732421875,
-0.016845703125,
0.0291748046875,
0.00696563720703125,
-0.005401611328125,
-0.004154205322265625,
0.05242919921875,
-0.01348114013671875,
0.00699615478515625,
-0.00818634033203125,
-0.018035888671875,
0.001712799072265625,
-0.0231170654296875,
-0.041046142578125,
0.015899658203125,
-0.03802490234375,
0.0212554931640625,
-0.0190277099609375,
0.0179901123046875,
-0.0268707275390625,
0.039306640625,
0.006397247314453125,
-0.01557159423828125,
0.023406982421875,
-0.05810546875,
0.08367919921875,
0.057525634765625,
-0.01861572265625,
-0.051422119140625,
-0.04107666015625,
-0.0172119140625,
0.033172607421875,
0.05072021484375,
0.038848876953125,
-0.07220458984375,
0.06304931640625,
0.02337646484375,
0.020751953125,
0.01544952392578125,
0.025848388671875,
0.017913818359375,
-0.005767822265625,
0.004123687744140625,
0.0237884521484375,
-0.01568603515625,
-0.024383544921875,
0.01271820068359375,
-0.0244903564453125,
-0.01216888427734375,
0.0439453125,
0.028076171875,
-0.0220794677734375,
0.02496337890625,
0.0189056396484375,
0.007579803466796875,
-0.0009551048278808594,
-0.03753662109375,
0.03546142578125,
0.031341552734375,
0.000507354736328125,
-0.0186614990234375,
0.0030040740966796875,
0.00986480712890625,
-0.0030670166015625,
-0.004192352294921875,
0.0106201171875,
-0.0280914306640625,
-0.01459503173828125,
-0.03363037109375,
-0.0117645263671875,
0.02923583984375,
-0.051025390625,
0.029144287109375,
-0.00457000732421875,
0.004138946533203125,
-0.0091705322265625,
-0.007297515869140625,
0.0073394775390625,
0.0284576416015625,
-0.0166168212890625,
0.046722412109375,
0.04595947265625,
0.007740020751953125,
-0.00012481212615966797,
-0.004852294921875,
0.00728607177734375,
-0.01436614990234375,
-0.039886474609375,
-0.00269317626953125,
-0.00868988037109375,
-0.005672454833984375,
-0.02618408203125,
0.004611968994140625,
0.031494140625,
-0.004047393798828125,
-0.0169219970703125,
0.03668212890625,
0.02764892578125,
0.011016845703125,
0.0318603515625,
0.00443267822265625,
-0.06793212890625,
0.0709228515625,
-0.06170654296875,
0.0295562744140625,
0.0267791748046875,
-0.014984130859375,
-0.028717041015625,
0.038177490234375,
0.004680633544921875,
0.0090179443359375,
0.0240325927734375,
0.0019989013671875,
-0.07562255859375,
0.0279998779296875,
0.03985595703125,
0.022247314453125,
0.02239990234375,
0.036407470703125,
-0.0307464599609375,
0.01178741455078125,
0.035308837890625,
0.029632568359375,
-0.0170440673828125,
-0.017730712890625,
-0.018768310546875,
-0.006473541259765625,
-0.04595947265625,
0.03485107421875,
0.059295654296875,
-0.0260162353515625,
-0.005847930908203125,
-0.03814697265625,
-0.0509033203125,
-0.0418701171875,
-0.0231170654296875,
0.0239105224609375,
-0.042449951171875,
-0.034881591796875,
0.041534423828125,
0.03277587890625,
-0.050537109375,
-0.039520263671875,
0.0155029296875,
-0.0634765625,
-0.004669189453125,
0.0028095245361328125,
0.04156494140625,
-0.0242919921875,
-0.07293701171875,
0.039703369140625,
-0.018829345703125,
0.051727294921875,
0.00612640380859375,
-0.0300140380859375,
-0.0273590087890625,
0.033447265625,
-0.039093017578125,
-0.031524658203125,
-0.057708740234375,
0.01226806640625,
-0.01374053955078125,
0.0323486328125,
-0.02081298828125,
-0.03424072265625,
0.0010671615600585938,
-0.04107666015625,
-0.00841522216796875,
0.021881103515625,
0.054443359375,
0.004276275634765625,
-0.04071044921875,
-0.0086822509765625,
0.01062774658203125,
-0.0116119384765625,
0.014801025390625,
0.0164947509765625,
0.0127716064453125,
0.0138702392578125,
0.0560302734375,
-0.002017974853515625,
-0.024322509765625,
0.08160400390625,
-0.040435791015625,
-0.0231170654296875,
0.004711151123046875,
0.02703857421875,
-0.004894256591796875,
-0.031890869140625,
-0.00023448467254638672,
0.061492919921875,
0.051788330078125,
-0.0170440673828125,
-0.0178985595703125,
-0.01064300537109375,
-0.039459228515625,
0.00231170654296875,
-0.0257110595703125,
-0.00054931640625,
0.049041748046875,
0.003826141357421875,
-0.0138092041015625,
0.0200958251953125,
0.0019702911376953125,
0.043060302734375,
-0.0167694091796875,
0.0277557373046875,
0.00038814544677734375,
-0.0174407958984375,
0.004283905029296875,
0.01105499267578125,
-0.00977325439453125,
-0.00435638427734375,
-0.038055419921875,
0.0036163330078125,
0.02410888671875,
0.0214691162109375,
0.0699462890625,
-0.004032135009765625,
0.072509765625,
-0.037750244140625,
-0.049774169921875,
-0.004863739013671875,
0.01244354248046875,
-0.011688232421875,
0.05615234375,
-0.03179931640625,
0.055267333984375,
0.020477294921875,
0.0382080078125,
0.024932861328125,
-0.01296234130859375,
-0.02178955078125,
-0.048187255859375,
-0.051666259765625,
-0.0279693603515625,
-0.055938720703125,
-0.1021728515625,
0.005535125732421875,
0.0869140625,
0.031219482421875,
0.037506103515625,
0.0272216796875,
0.04583740234375,
0.068359375,
0.027008056640625,
0.032745361328125,
-0.02197265625,
-0.02252197265625,
0.0174560546875,
-0.024749755859375,
0.0204925537109375,
0.028656005859375,
-0.0301666259765625,
-0.015838623046875,
0.05841064453125,
-0.015869140625,
-0.049957275390625,
0.011505126953125,
0.007595062255859375,
0.01201629638671875,
-0.036102294921875,
-0.045166015625,
-0.0009260177612304688,
0.0528564453125,
0.0251007080078125,
0.043060302734375,
0.032806396484375,
-0.0462646484375,
0.03765869140625,
0.01505279541015625,
0.00872039794921875,
0.01446533203125,
0.04034423828125,
0.01284027099609375,
0.030548095703125,
-0.0065155029296875,
-0.0263214111328125,
0.035125732421875,
0.035400390625,
-0.041046142578125,
-0.0295257568359375,
-0.068359375,
-0.01537322998046875,
-0.01413726806640625,
-0.06964111328125,
0.0081787109375,
0.0016651153564453125,
-0.03338623046875,
-0.026275634765625,
0.00620269775390625,
0.038055419921875,
0.00511932373046875,
-0.017974853515625,
0.0159149169921875,
-0.004322052001953125,
-0.00540924072265625,
-0.03741455078125,
0.04718017578125,
-0.0084686279296875,
0.045379638671875,
0.08404541015625,
-0.00492095947265625,
0.0208892822265625,
-0.00045037269592285156,
-0.0006256103515625,
-0.03729248046875,
0.042877197265625,
0.012054443359375,
-0.034576416015625,
-0.025299072265625,
-0.0124053955078125,
0.01416778564453125,
-0.04901123046875,
0.01454925537109375,
0.004322052001953125,
-0.038299560546875,
-0.01450347900390625,
-0.0606689453125,
-0.00864410400390625,
0.0445556640625,
-0.0762939453125,
0.00811767578125,
-0.0308685302734375,
-0.05023193359375,
-0.023101806640625,
-0.0026340484619140625,
-0.000316619873046875,
-0.0287017822265625,
-0.004039764404296875,
-0.016754150390625,
-0.057159423828125,
-0.061676025390625,
-0.0506591796875,
0.00968170166015625,
0.0291595458984375,
0.011383056640625,
0.028778076171875,
0.01338958740234375,
-0.0179290771484375,
0.0638427734375,
-0.0200958251953125,
0.0023326873779296875,
0.0282440185546875,
0.0406494140625,
-0.0178375244140625,
0.052642822265625,
-0.022613525390625,
0.035064697265625,
0.0823974609375,
-0.058868408203125,
-0.00795745849609375,
-0.03289794921875,
-0.01200103759765625,
-0.038787841796875,
0.061492919921875,
0.0775146484375,
-0.037200927734375,
-0.006175994873046875,
-0.055908203125,
0.004718780517578125,
0.0390625,
0.0205230712890625,
0.01666259765625,
-0.049530029296875,
-0.045867919921875,
0.0129852294921875,
0.047760009765625,
-0.0079193115234375,
0.0304107666015625,
-0.015869140625,
0.005401611328125,
-0.01242828369140625,
-0.0178680419921875,
-0.01166534423828125,
0.03662109375,
0.030120849609375,
-0.0249176025390625,
0.040191650390625,
0.030792236328125,
-0.0166473388671875,
-0.0139007568359375,
-0.01276397705078125,
-0.0374755859375,
-0.026397705078125,
0.030242919921875,
-0.0272369384765625,
0.032928466796875,
-0.023193359375,
-0.0029144287109375,
-0.01824951171875,
0.06182861328125,
-0.02886962890625,
-0.0234832763671875,
-0.03924560546875,
0.016937255859375,
-0.029449462890625,
-0.06500244140625,
0.00608062744140625,
0.005886077880859375,
-0.00485992431640625,
-0.0203094482421875,
-0.0157318115234375,
-0.0085906982421875,
-0.0029449462890625,
-0.034820556640625,
0.00469970703125,
-0.026092529296875,
0.017242431640625,
-0.0010023117065429688,
0.01300811767578125,
0.009918212890625,
0.0283050537109375,
-0.0191192626953125,
0.0187835693359375,
-0.03192138671875,
-0.0972900390625,
-0.00003349781036376953,
-0.04376220703125,
0.057464599609375,
0.0084381103515625,
0.02276611328125,
-0.017730712890625,
0.0556640625,
0.0181121826171875,
0.0026569366455078125,
-0.00441741943359375,
-0.00531768798828125,
0.0013580322265625,
0.0029277801513671875,
-0.0083465576171875,
-0.005764007568359375,
-0.01351165771484375,
-0.011932373046875,
-0.00789642333984375,
-0.007568359375,
-0.0014209747314453125,
-0.051513671875,
0.035186767578125,
-0.032318115234375,
-0.038055419921875,
-0.041046142578125,
-0.0159759521484375,
0.00527191162109375,
-0.01197052001953125,
0.0072021484375,
-0.044586181640625,
-0.024749755859375,
0.033050537109375,
0.0161285400390625,
-0.007434844970703125,
0.00563812255859375,
0.05706787109375,
0.0149688720703125,
-0.02606201171875,
-0.05694580078125,
0.01262664794921875,
0.032958984375,
-0.0159454345703125,
0.0262603759765625,
0.0283050537109375,
-0.0157318115234375,
0.01210784912109375,
-0.0019683837890625,
0.007640838623046875,
-0.032379150390625,
0.006542205810546875,
0.01395416259765625,
0.007904052734375,
-0.00762939453125,
0.00139617919921875,
0.02447509765625,
0.01727294921875,
-0.0284423828125,
0.00473785400390625,
-0.030517578125,
0.04315185546875,
-0.004669189453125,
0.012542724609375,
-0.049102783203125,
-0.046112060546875,
-0.0026721954345703125,
-0.03887939453125,
0.01398468017578125,
0.00595855712890625,
-0.002166748046875,
0.01401519775390625,
0.0212860107421875,
0.0178375244140625,
0.049957275390625,
0.048431396484375,
-0.0110626220703125,
0.023101806640625,
0.08160400390625,
-0.0058135986328125,
0.007251739501953125,
-0.00559234619140625,
0.01141357421875,
0.00350189208984375,
-0.0257110595703125,
-0.007022857666015625,
0.0038738250732421875,
0.038726806640625,
0.009368896484375,
-0.0037822723388671875,
-0.00159454345703125,
-0.004787445068359375,
-0.0150146484375,
0.0079345703125,
-0.01377105712890625,
0.0005612373352050781,
-0.0216522216796875,
0.0226593017578125,
-0.00531005859375,
-0.0172576904296875,
-0.01053619384765625,
-0.02203369140625,
-0.01122283935546875,
-0.0455322265625,
0.018096923828125,
0.0285491943359375,
0.0242767333984375,
0.0224456787109375,
0.00643157958984375,
-0.01239013671875,
-0.01482391357421875,
0.01244354248046875,
-0.01107025146484375,
-0.0189666748046875,
0.0160675048828125,
-0.0300140380859375,
0.0107879638671875,
-0.033233642578125,
-0.03753662109375,
0.063720703125,
-0.036895751953125,
0.0013227462768554688,
-0.0122528076171875,
-0.03375244140625,
-0.030914306640625,
0.004489898681640625,
0.03179931640625,
0.01346588134765625,
-0.025238037109375,
-0.01178741455078125,
-0.00370025634765625,
-0.0222015380859375,
0.00902557373046875,
0.01080322265625,
0.010223388671875,
-0.0260467529296875,
-0.0201263427734375,
0.031585693359375,
-0.018402099609375,
-0.0128631591796875,
-0.1009521484375,
-0.0260009765625,
-0.00977325439453125,
0.0129547119140625,
0.0301361083984375,
-0.03753662109375,
-0.0187835693359375,
-0.0273590087890625,
0.03924560546875,
-0.03607177734375,
0.0162506103515625,
0.005519866943359375,
-0.01474761962890625,
0.0167999267578125,
-0.0280303955078125,
-0.050048828125,
-0.03790283203125,
-0.0095977783203125,
-0.024749755859375,
-0.0002105236053466797,
-0.0003407001495361328,
-0.006160736083984375,
0.0267791748046875,
0.002002716064453125,
0.02069091796875,
-0.004108428955078125,
0.0155792236328125,
0.000059664249420166016,
0.0797119140625,
0.021331787109375,
-0.016326904296875,
0.0219268798828125,
0.0098724365234375,
0.00804901123046875,
-0.0263824462890625,
-0.032745361328125,
-0.02764892578125,
-0.0036563873291015625,
-0.05218505859375,
-0.02392578125,
0.033660888671875,
-0.037994384765625,
0.0267486572265625,
0.016082763671875,
-0.0024871826171875,
0.0230712890625,
-0.03912353515625,
0.0023708343505859375,
-0.01491546630859375,
0.01335906982421875,
-0.052581787109375,
-0.00919342041015625,
0.0055999755859375,
-0.01995849609375,
0.03759765625,
0.00225067138671875,
-0.0242919921875,
0.04229736328125,
-0.0230865478515625,
0.036956787109375,
-0.003887176513671875,
0.006847381591796875,
0.0264434814453125,
0.0440673828125,
-0.01497650146484375,
0.0238800048828125,
0.0251007080078125,
0.01062774658203125,
0.02642822265625,
-0.0205230712890625,
0.028167724609375,
-0.0023708343505859375,
0.0181732177734375,
-0.0153350830078125,
0.00821685791015625,
0.01910400390625,
-0.00414276123046875,
0.0248565673828125,
0.032073974609375,
0.039215087890625,
-0.04925537109375,
0.0034389495849609375,
-0.006366729736328125,
-0.0016107559204101562,
0.035186767578125,
0.0158843994140625,
-0.01239776611328125,
-0.00714874267578125,
0.0513916015625,
-0.028411865234375,
-0.0164947509765625,
0.0261688232421875,
0.002407073974609375,
0.00875091552734375,
0.0021038055419921875,
0.015838623046875,
-0.0198516845703125,
-0.0217437744140625,
-0.044464111328125,
0.0198974609375,
-0.03619384765625,
0.029449462890625,
0.005462646484375,
-0.0347900390625,
-0.00910186767578125,
-0.0014963150024414062,
-0.007110595703125,
-0.06378173828125,
0.0093841552734375,
0.0221710205078125,
0.0293121337890625,
0.086181640625,
0.07049560546875,
0.0223846435546875,
-0.0112457275390625,
0.0574951171875,
0.0168914794921875,
0.028839111328125,
-0.02471923828125,
-0.0004372596740722656,
-0.006435394287109375,
-0.01514434814453125,
0.00931549072265625,
0.004344940185546875,
-0.031585693359375,
0.02056884765625,
0.0421142578125,
0.0203094482421875,
-0.022552490234375,
-0.01308441162109375,
0.07757568359375,
-0.0005764961242675781,
-0.042633056640625,
0.01428985595703125,
-0.0096588134765625,
-0.06549072265625,
-0.049041748046875,
0.013092041015625,
-0.0753173828125,
0.024993896484375,
0.034393310546875,
-0.04559326171875,
0.0992431640625,
-0.01702880859375,
0.033782958984375,
0.024810791015625,
0.03216552734375,
-0.0165252685546875,
0.007373809814453125,
-0.04388427734375,
0.04132080078125,
0.03662109375,
0.019622802734375,
-0.0297088623046875,
-0.00785064697265625,
0.00792694091796875,
0.028167724609375,
0.030029296875,
-0.00479888916015625,
-0.0261077880859375,
0.0031147003173828125,
0.054901123046875,
0.033843994140625,
0.0091400146484375,
0.037353515625,
0.0007791519165039062,
-0.025054931640625,
0.029876708984375,
0.00212860107421875,
0.0240936279296875,
-0.0021533966064453125,
-0.003208160400390625,
0.01488494873046875,
0.0010652542114257812,
0.030181884765625,
-0.003925323486328125,
-0.00299835205078125,
0.0210113525390625,
-0.0283966064453125,
-0.01111602783203125,
-0.0321044921875,
0.019683837890625,
0.01267242431640625,
-0.0269775390625,
0.03790283203125,
0.00008845329284667969,
-0.0024394989013671875,
0.01110076904296875,
-0.0194854736328125,
-0.00305938720703125,
0.07476806640625,
0.0219879150390625,
-0.0229339599609375,
0.0008296966552734375,
0.004184722900390625,
-0.0228271484375,
0.031280517578125,
-0.0200347900390625,
-0.033599853515625,
0.0220489501953125,
-0.0382080078125,
0.00974273681640625,
0.0245208740234375,
-0.008758544921875,
-0.0024204254150390625,
-0.01180267333984375,
0.02081298828125,
0.0104217529296875,
-0.0247955322265625,
-0.001323699951171875,
0.0086212158203125,
-0.053375244140625,
-0.0257568359375,
-0.0423583984375,
0.01502227783203125,
0.0217132568359375,
0.01422882080078125,
-0.0007929801940917969,
0.022613525390625,
-0.027740478515625,
-0.0018186569213867188,
-0.0316162109375,
0.0171356201171875,
0.01287078857421875,
0.06585693359375,
0.00801849365234375,
0.039581298828125,
-0.01593017578125,
-0.02166748046875,
-0.005016326904296875,
0.023895263671875,
-0.0173492431640625,
0.013824462890625,
-0.02630615234375,
-0.0240631103515625,
0.017425537109375,
0.0130462646484375,
0.0206298828125,
0.0176849365234375,
0.040618896484375,
0.034393310546875,
-0.0036945343017578125,
-0.00516510009765625,
0.03680419921875,
-0.006771087646484375,
0.01910400390625,
-0.0416259765625,
-0.0149383544921875,
-0.021484375,
-0.023193359375,
-0.009185791015625,
-0.0275726318359375,
0.03173828125,
-0.059234619140625,
0.041046142578125,
-0.0296630859375,
-0.057861328125,
0.04718017578125,
-0.0301513671875,
0.12939453125,
-0.035919189453125,
-0.06298828125,
-0.0217132568359375,
-0.032989501953125,
0.0272216796875,
0.00566864013671875,
0.0253753662109375,
0.0184783935546875,
0.0236358642578125,
0.02630615234375,
-0.0556640625,
0.02044677734375,
0.0311126708984375,
0.01139068603515625,
0.017364501953125,
0.007328033447265625,
0.0014867782592773438,
-0.02911376953125,
-0.0185699462890625,
-0.01145172119140625,
0.03759765625,
-0.01322174072265625,
0.0323486328125,
-0.01210784912109375,
0.01468658447265625,
0.0172119140625,
-0.0263214111328125,
0.0181732177734375,
0.005092620849609375,
0.00849151611328125,
0.00746917724609375,
0.005825042724609375,
-0.02923583984375,
0.063232421875,
0.024688720703125,
0.0274658203125,
-0.07373046875,
-0.030181884765625,
-0.004695892333984375,
0.00644683837890625,
0.0184783935546875,
0.01538848876953125,
-0.041107177734375,
-0.042999267578125,
-0.052398681640625,
0.006099700927734375,
0.008544921875,
-0.024658203125,
-0.044647216796875,
0.03387451171875,
0.059295654296875,
0.00835418701171875,
0.055419921875,
-0.01837158203125,
0.110595703125,
0.04205322265625,
-0.02777099609375,
-0.0489501953125,
0.01544189453125,
-0.005786895751953125,
0.0216827392578125,
-0.01520538330078125,
0.08740234375,
0.015960693359375,
-0.0192108154296875,
-0.01763916015625,
0.016632080078125,
0.0189971923828125,
-0.036895751953125,
0.0027923583984375,
0.02252197265625,
-0.005214691162109375,
0.0293731689453125,
-0.02569580078125,
-0.01148223876953125,
-0.043731689453125,
0.0029449462890625,
0.041839599609375,
-0.01479339599609375,
0.042755126953125,
-0.0181427001953125,
0.0005478858947753906,
0.041961669921875,
0.0003323554992675781,
-0.033203125,
0.0204925537109375,
-0.037353515625,
0.0244598388671875,
0.014373779296875,
0.0209808349609375,
-0.0294952392578125,
-0.0174560546875,
-0.029571533203125,
-0.061370849609375,
-0.0289306640625,
0.08734130859375,
-0.01837158203125,
-0.02099609375,
-0.034332275390625,
0.005664825439453125,
-0.0211181640625,
0.01061248779296875,
0.006397247314453125,
0.057373046875,
0.035247802734375,
-0.0233612060546875,
-0.02850341796875,
-0.0021572113037109375,
-0.01502227783203125,
-0.01265716552734375,
0.0238037109375,
-0.05609130859375,
-0.04681396484375,
-0.042510986328125,
0.03271484375,
0.00885009765625,
-0.0321044921875,
-0.093994140625,
-0.01436614990234375,
-0.01824951171875,
-0.04669189453125,
-0.00942230224609375,
0.057586669921875,
-0.0116729736328125,
0.011260986328125,
0.01432037353515625,
-0.032073974609375,
0.01201629638671875,
-0.023345947265625,
-0.03204345703125,
0.0709228515625,
-0.019683837890625,
0.00635528564453125,
0.008026123046875,
-0.0045318603515625,
-0.0175018310546875,
-0.0487060546875,
0.02490234375,
-0.03472900390625,
0.06756591796875,
0.06927490234375,
0.01134490966796875,
0.0108642578125,
0.0187530517578125,
-0.06878662109375,
0.0002560615539550781,
-0.03717041015625,
-0.0311431884765625,
-0.01336669921875,
0.0643310546875,
0.03179931640625,
0.014068603515625,
-0.024566650390625,
0.005756378173828125,
-0.0241546630859375,
-0.00873565673828125,
0.015838623046875,
-0.0008101463317871094,
-0.02630615234375,
0.0021648406982421875,
0.015289306640625,
0.0135955810546875,
-0.0007810592651367188,
-0.01038360595703125,
0.00148773193359375,
-0.017578125,
0.00319671630859375,
-0.0212860107421875,
-0.0281524658203125,
0.048858642578125,
0.0517578125,
-0.0285491943359375,
0.0274505615234375,
-0.015380859375,
-0.0149688720703125,
0.046173095703125,
0.0171051025390625,
0.0155029296875,
0.006561279296875,
0.001262664794921875,
0.00684356689453125,
0.02410888671875,
-0.0033931732177734375,
0.023345947265625,
-0.0213165283203125,
-0.0180816650390625,
0.0226593017578125,
0.0009984970092773438,
0.0279693603515625,
-0.04388427734375,
0.05712890625,
0.020294189453125,
0.058746337890625,
-0.005260467529296875,
-0.062744140625,
-0.040252685546875,
0.003047943115234375,
-0.012542724609375,
-0.00366973876953125,
0.0310821533203125,
-0.01824951171875,
0.013092041015625,
0.043914794921875,
-0.0293731689453125,
-0.0281829833984375,
-0.00484466552734375,
-0.017120361328125,
0.025390625,
0.0018224716186523438
] |
d2babc1daef9d66afa842213e95026e20c237417
|
Wordpress Stackexchange
Q: How do I make specific plugin functionality apply to different sites in a network? I have a site specific plugin that I've written for the main site in my multisite network. Now I realize that the shortcodes that are in the plugin are also useful on the sub-sites, however the sub-sites don't need all the code for custom post types and taxonomies.
How do I make just the shortcodes work for sub-sites? Is there a conditional I can use? Here's how my plugin is currently set up:
// Plugin Directory
define( 'CLICK_DIR', dirname( __FILE__ ) );
// General
include_once( CLICK_DIR . '/lib/functions/general.php' );
// Post Types
include_once( CLICK_DIR . '/lib/functions/post-types.php' );
// Taxonomies
include_once( CLICK_DIR . '/lib/functions/taxonomies.php' );
// Shortcodes
include_once( CLICK_DIR . '/lib/functions/shortcodes.php' );
A: Put the shortcodes into a separate plugin. As a rule of thumb: use one plugin per job. Do not mix unrelated functionality just because it looks easier. It isn’t.
For WordPress the number of active plugins doesn’t matter enough to care about, just what the code does. So it is better to use 20 plugins with one line of code than one plugin for 20 different small jobs.
|
Q: How do I make specific plugin functionality apply to different sites in a network? I have a site specific plugin that I've written for the main site in my multisite network. Now I realize that the shortcodes that are in the plugin are also useful on the sub-sites, however the sub-sites don't need all the code for custom post types and taxonomies.
How do I make just the shortcodes work for sub-sites? Is there a conditional I can use? Here's how my plugin is currently set up:
// Plugin Directory
define( 'CLICK_DIR', dirname( __FILE__ ) );
// General
include_once( CLICK_DIR . '/lib/functions/general.php' );
// Post Types
include_once( CLICK_DIR . '/lib/functions/post-types.php' );
// Taxonomies
include_once( CLICK_DIR . '/lib/functions/taxonomies.php' );
// Shortcodes
include_once( CLICK_DIR . '/lib/functions/shortcodes.php' );
A: Put the shortcodes into a separate plugin. As a rule of thumb: use one plugin per job. Do not mix unrelated functionality just because it looks easier. It isn’t.
For WordPress the number of active plugins doesn’t matter enough to care about, just what the code does. So it is better to use 20 plugins with one line of code than one plugin for 20 different small jobs.
A: if ( is_main_site() ) {
include_once CLICK_DIR . '/lib/functions/general.php';
include_once CLICK_DIR . '/lib/functions/post-types.php';
include_once CLICK_DIR . '/lib/functions/taxonomies.php';
}
include_once CLICK_DIR . '/lib/functions/shortcodes.php';
|
wordpress
|
{
"language": "en",
"length": 218,
"provenance": "stackexchange_00019.jsonl.gz:421562",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57604"
}
|
[
0.049957275390625,
-0.005268096923828125,
0.0004420280456542969,
-0.0131378173828125,
-0.008697509765625,
-0.02783203125,
0.030303955078125,
-0.0193328857421875,
-0.01039886474609375,
-0.005504608154296875,
-0.018768310546875,
-0.0008783340454101562,
-0.051177978515625,
-0.031829833984375,
-0.00238800048828125,
-0.040252685546875,
0.03045654296875,
0.0019893646240234375,
-0.00977325439453125,
-0.0286712646484375,
-0.01520538330078125,
0.00971221923828125,
-0.028167724609375,
0.10174560546875,
0.02178955078125,
-0.087890625,
0.065673828125,
-0.0017223358154296875,
0.0012969970703125,
-0.027435302734375,
0.018707275390625,
0.0311126708984375,
0.046783447265625,
0.01519012451171875,
-0.04241943359375,
0.02716064453125,
-0.011505126953125,
-0.00775146484375,
-0.0204620361328125,
0.04913330078125,
0.0340576171875,
-0.0149688720703125,
0.057952880859375,
0.0005230903625488281,
0.033905029296875,
-0.055084228515625,
0.0672607421875,
-0.047454833984375,
-0.032257080078125,
-0.0171356201171875,
0.0301971435546875,
-0.0187225341796875,
0.06512451171875,
-0.06268310546875,
-0.0188751220703125,
-0.01148223876953125,
-0.036865234375,
-0.046875,
0.03460693359375,
0.026153564453125,
-0.004322052001953125,
-0.0574951171875,
0.02581787109375,
-0.032470703125,
0.00616455078125,
0.0007357597351074219,
-0.024658203125,
0.007389068603515625,
-0.025543212890625,
0.0236053466796875,
0.044403076171875,
-0.05047607421875,
0.0295257568359375,
0.0258941650390625,
-0.038421630859375,
-0.0289764404296875,
0.0221099853515625,
0.0208282470703125,
0.0313720703125,
-0.01090240478515625,
-0.022796630859375,
-0.006381988525390625,
-0.0302734375,
-0.0193023681640625,
-0.00147247314453125,
0.0145721435546875,
-0.0152435302734375,
0.00514984130859375,
-0.0498046875,
0.0010900497436523438,
-0.0297698974609375,
-0.0174713134765625,
-0.0316162109375,
0.004268646240234375,
0.00983428955078125,
-0.003505706787109375,
0.028778076171875,
0.05413818359375,
0.0103302001953125,
0.0032444000244140625,
-0.00820159912109375,
-0.0430908203125,
0.0189971923828125,
-0.035186767578125,
0.02667236328125,
0.06439208984375,
0.00983428955078125,
-0.01776123046875,
0.0560302734375,
0.004425048828125,
0.028656005859375,
0.059356689453125,
0.00771331787109375,
-0.029052734375,
0.01378631591796875,
-0.0125274658203125,
-0.057769775390625,
0.062347412109375,
0.016204833984375,
-0.0093231201171875,
0.0141448974609375,
0.0338134765625,
0.0084991455078125,
-0.04083251953125,
-0.03875732421875,
-0.05926513671875,
-0.0313720703125,
-0.033111572265625,
0.0218505859375,
0.0026111602783203125,
-0.028472900390625,
0.0156402587890625,
0.04925537109375,
-0.0034351348876953125,
-0.0322265625,
-0.0024738311767578125,
0.01580810546875,
0.024017333984375,
-0.00446319580078125,
-0.004547119140625,
-0.0245819091796875,
-0.0186309814453125,
0.0071258544921875,
-0.02862548828125,
0.025360107421875,
-0.0005517005920410156,
0.0273895263671875,
0.038360595703125,
-0.0023174285888671875,
-0.034027099609375,
0.053497314453125,
0.01119232177734375,
0.0290679931640625,
-0.01436614990234375,
-0.0167236328125,
-0.04248046875,
0.0146484375,
-0.024444580078125,
0.0199737548828125,
-0.0286407470703125,
0.0294036865234375,
0.00199127197265625,
0.011260986328125,
-0.06817626953125,
-0.050506591796875,
-0.0277862548828125,
-0.05828857421875,
0.0051727294921875,
0.02471923828125,
-0.031829833984375,
0.007904052734375,
0.0169219970703125,
0.01953125,
0.0254669189453125,
0.01763916015625,
0.0222015380859375,
-0.0252532958984375,
0.045501708984375,
0.060546875,
-0.03564453125,
-0.0186920166015625,
-0.029541015625,
0.11309814453125,
-0.024566650390625,
-0.09771728515625,
0.049896240234375,
-0.002750396728515625,
0.0838623046875,
0.040863037109375,
0.008148193359375,
0.057861328125,
-0.00897979736328125,
0.01084136962890625,
-0.048797607421875,
-0.01413726806640625,
0.025848388671875,
-0.022674560546875,
0.0254364013671875,
-0.01485443115234375,
-0.004123687744140625,
-0.0144805908203125,
0.00730133056640625,
0.014007568359375,
-0.00978851318359375,
-0.002574920654296875,
0.01096343994140625,
0.00019824504852294922,
0.04083251953125,
0.033905029296875,
0.01558685302734375,
-0.018218994140625,
0.0121307373046875,
0.002178192138671875,
-0.050689697265625,
-0.0223236083984375,
0.051666259765625,
0.004932403564453125,
0.03662109375,
0.01522064208984375,
-0.0021038055419921875,
0.04876708984375,
-0.02496337890625,
0.0174713134765625,
0.04412841796875,
0.031005859375,
0.011505126953125,
-0.015228271484375,
-0.01039886474609375,
-0.0172576904296875,
0.039276123046875,
-0.0662841796875,
0.01375579833984375,
0.0283660888671875,
0.01352691650390625,
-0.0198516845703125,
0.0191497802734375,
0.00830078125,
-0.01904296875,
-0.022796630859375,
0.018585205078125,
0.0662841796875,
0.00580596923828125,
0.016357421875,
-0.006572723388671875,
0.0231475830078125,
-0.0576171875,
0.0194244384765625,
-0.037384033203125,
-0.0013036727905273438,
0.0177459716796875,
-0.002788543701171875,
0.016357421875,
0.0230255126953125,
-0.060821533203125,
0.017791748046875,
0.046417236328125,
-0.029144287109375,
-0.04693603515625,
0.0253143310546875,
-0.034515380859375,
0.035003662109375,
-0.028533935546875,
-0.049560546875,
0.0018463134765625,
0.0220489501953125,
0.0003898143768310547,
0.016510009765625,
-0.0014057159423828125,
-0.03369140625,
0.005489349365234375,
0.018798828125,
-0.00848388671875,
-0.00969696044921875,
0.01393890380859375,
0.016143798828125,
0.0174560546875,
-0.052490234375,
0.002162933349609375,
0.0166168212890625,
0.00844573974609375,
-0.0214996337890625,
0.01148223876953125,
-0.046905517578125,
-0.0244598388671875,
0.01114654541015625,
-0.042236328125,
-0.01238250732421875,
-0.028900146484375,
0.0309600830078125,
-0.0125732421875,
0.0302276611328125,
-0.01465606689453125,
-0.033447265625,
0.02716064453125,
0.039642333984375,
-0.0506591796875,
0.05841064453125,
-0.019073486328125,
0.0232086181640625,
-0.02886962890625,
0.017181396484375,
0.04052734375,
-0.00289154052734375,
-0.018157958984375,
-0.0164642333984375,
0.0017719268798828125,
-0.044952392578125,
-0.0030269622802734375,
-0.0208740234375,
-0.0185546875,
-0.050323486328125,
0.0068206787109375,
0.01422882080078125,
0.0714111328125,
-0.031768798828125,
-0.06646728515625,
0.012359619140625,
0.0173797607421875,
-0.0294647216796875,
-0.03692626953125,
-0.0014524459838867188,
-0.0489501953125,
0.053009033203125,
-0.030426025390625,
-0.008514404296875,
-0.046112060546875,
-0.013885498046875,
0.022216796875,
-0.015869140625,
-0.02606201171875,
0.0036334991455078125,
-0.042572021484375,
-0.04693603515625,
0.0086517333984375,
0.0245513916015625,
0.00652313232421875,
0.0010852813720703125,
0.07952880859375,
0.01355743408203125,
-0.04931640625,
-0.015655517578125,
0.047210693359375,
-0.02484130859375,
-0.021209716796875,
0.03765869140625,
-0.056488037109375,
-0.0256195068359375,
0.006053924560546875,
0.00849151611328125,
-0.0024261474609375,
-0.01416015625,
-0.0203399658203125,
0.037261962890625,
0.0240325927734375,
0.047088623046875,
-0.00379180908203125,
-0.054046630859375,
0.03448486328125,
0.0280303955078125,
-0.0267791748046875,
0.003719329833984375,
-0.011810302734375,
-0.038360595703125,
0.0060272216796875,
-0.0047149658203125,
-0.00640106201171875,
0.019866943359375,
-0.0007410049438476562,
0.0209503173828125,
0.01448822021484375,
0.0001659393310546875,
-0.0139007568359375,
0.0218658447265625,
0.0093841552734375,
0.0258941650390625,
-0.034393310546875,
0.01395416259765625,
-0.030364990234375,
-0.016876220703125,
-0.018035888671875,
0.0172576904296875,
-0.0020294189453125,
0.006725311279296875,
0.0081634521484375,
-0.0193939208984375,
0.0261688232421875,
-0.031097412109375,
0.0016317367553710938,
-0.037384033203125,
-0.0179595947265625,
-0.033935546875,
0.057342529296875,
-0.0523681640625,
0.00157928466796875,
-0.0175018310546875,
-0.0010404586791992188,
0.00926971435546875,
-0.033935546875,
-0.05242919921875,
-0.01373291015625,
-0.0499267578125,
0.01113128662109375,
-0.005687713623046875,
-0.0080413818359375,
-0.006954193115234375,
0.01445770263671875,
-0.0374755859375,
-0.036529541015625,
0.041229248046875,
-0.0053863525390625,
0.028289794921875,
-0.0206451416015625,
0.0438232421875,
-0.0467529296875,
-0.0057830810546875,
-0.018402099609375,
-0.038116455078125,
0.0029354095458984375,
-0.0377197265625,
0.025421142578125,
0.0258026123046875,
-0.036346435546875,
-0.0158538818359375,
0.004222869873046875,
-0.0198211669921875,
0.00921630859375,
-0.0216827392578125,
0.0166168212890625,
-0.041748046875,
0.0242156982421875,
0.0005784034729003906,
0.002716064453125,
-0.017974853515625,
0.0091094970703125,
-0.01129913330078125,
0.0272216796875,
-0.0107879638671875,
-0.0272064208984375,
0.0268707275390625,
-0.0302581787109375,
-0.045257568359375,
-0.0286865234375,
-0.032379150390625,
-0.0025959014892578125,
-0.0384521484375,
-0.0036907196044921875,
-0.01898193359375,
-0.0208587646484375,
0.045135498046875,
-0.01433563232421875,
0.00031447410583496094,
0.0101776123046875,
0.0482177734375,
-0.0016841888427734375,
-0.01544189453125,
-0.06658935546875,
-0.002803802490234375,
0.047210693359375,
0.0020427703857421875,
0.02532958984375,
0.037872314453125,
-0.036224365234375,
0.03668212890625,
0.0266571044921875,
0.0308685302734375,
-0.0321044921875,
0.0254058837890625,
-0.0110626220703125,
-0.008270263671875,
0.01047515869140625,
-0.005168914794921875,
0.01227569580078125,
-0.0057373046875,
-0.01082611083984375,
-0.035858154296875,
-0.051025390625,
0.039276123046875,
0.027069091796875,
0.0204620361328125,
-0.03570556640625,
-0.029266357421875,
0.0152130126953125,
0.02911376953125,
0.0139312744140625,
0.0328369140625,
-0.004985809326171875,
0.0221099853515625,
0.005413055419921875,
-0.00563812255859375,
0.07806396484375,
0.1097412109375,
0.0065460205078125,
0.0311737060546875,
0.05908203125,
-0.0269775390625,
-0.0288543701171875,
-0.0134735107421875,
0.083740234375,
0.005252838134765625,
-0.016876220703125,
-0.032440185546875,
-0.0258941650390625,
0.01111602783203125,
-0.0225372314453125,
0.0059967041015625,
0.0467529296875,
-0.00498199462890625,
-0.01021575927734375,
-0.030242919921875,
-0.06256103515625,
0.0157470703125,
-0.0714111328125,
-0.020660400390625,
-0.042205810546875,
-0.016265869140625,
0.00658416748046875,
-0.015716552734375,
-0.03350830078125,
0.0007958412170410156,
-0.002361297607421875,
0.06646728515625,
0.06182861328125,
-0.0291595458984375,
0.00022518634796142578,
0.04364013671875,
-0.02020263671875,
-0.0220489501953125,
-0.0038013458251953125,
0.0195159912109375,
0.0023345947265625,
-0.0038852691650390625,
0.0024433135986328125,
0.01412200927734375,
0.0128631591796875,
-0.00472259521484375,
-0.01300048828125,
-0.04046630859375,
0.0321044921875,
0.0172576904296875,
-0.049591064453125,
-0.03076171875,
0.03399658203125,
0.0458984375,
0.01055145263671875,
0.0015048980712890625,
0.002269744873046875,
0.0023250579833984375,
-0.01087188720703125,
-0.0010747909545898438,
-0.07366943359375,
0.01055908203125,
0.04693603515625,
-0.00531768798828125,
0.0185394287109375,
-0.0017604827880859375,
-0.0462646484375,
-0.046051025390625,
-0.0052032470703125,
0.0018024444580078125,
0.041168212890625,
-0.02386474609375,
0.045135498046875,
-0.0186004638671875,
-0.034088134765625,
-0.003917694091796875,
0.017425537109375,
0.03546142578125,
0.01806640625,
-0.078369140625,
0.0357666015625,
-0.03729248046875,
-0.00830078125,
-0.035797119140625,
-0.0628662109375,
-0.06341552734375,
-0.029632568359375,
-0.00763702392578125,
0.01012420654296875,
-0.0080718994140625,
-0.01100921630859375,
-0.01071929931640625,
-0.0044097900390625,
-0.0087738037109375,
-0.00421905517578125,
-0.0286102294921875,
0.01035308837890625,
0.0236663818359375,
0.0038280487060546875,
-0.0124053955078125,
-0.00691986083984375,
0.03662109375,
-0.004573822021484375,
-0.0134429931640625,
-0.058319091796875,
-0.009857177734375,
0.006862640380859375,
-0.00611114501953125,
0.0411376953125,
0.015960693359375,
0.01131439208984375,
0.0293426513671875,
0.01165008544921875,
0.0190582275390625,
-0.023101806640625,
-0.01407623291015625,
-0.013458251953125,
0.02374267578125,
0.0152740478515625,
-0.0313720703125,
-0.0281829833984375,
0.0003314018249511719,
-0.03387451171875,
0.034515380859375,
0.004207611083984375,
0.017791748046875,
0.00835418701171875,
0.0090789794921875,
0.0081787109375,
0.0254058837890625,
-0.0024929046630859375,
0.02008056640625,
0.01959228515625,
0.0127410888671875,
-0.0029926300048828125,
-0.022125244140625,
0.065185546875,
0.038330078125,
0.060333251953125,
-0.0262603759765625,
-0.015716552734375,
0.0050506591796875,
-0.04376220703125,
-0.0016765594482421875,
0.0369873046875,
0.027496337890625,
-0.07489013671875,
0.018646240234375,
0.01934814453125,
0.005764007568359375,
-0.0083465576171875,
-0.03094482421875,
-0.008209228515625,
-0.0175933837890625,
0.0443115234375,
0.046234130859375,
-0.0283050537109375,
0.01343536376953125,
0.00846099853515625,
-0.0168304443359375,
-0.0173492431640625,
0.0221405029296875,
0.0035800933837890625,
0.00688934326171875,
0.01001739501953125,
-0.00939178466796875,
0.020294189453125,
-0.024505615234375,
0.00762939453125,
-0.0103607177734375,
-0.02783203125,
-0.052337646484375,
0.01007080078125,
0.005084991455078125,
-0.0124969482421875,
-0.0281829833984375,
-0.0214385986328125,
0.0243072509765625,
0.060028076171875,
-0.048065185546875,
0.0020084381103515625,
0.0196990966796875,
0.03033447265625,
-0.01041412353515625,
-0.03497314453125,
-0.0115814208984375,
-0.007579803466796875,
-0.0556640625,
-0.0034351348876953125,
-0.040679931640625,
-0.01202392578125,
-0.025634765625,
-0.016265869140625,
0.07940673828125,
-0.034027099609375,
0.001804351806640625,
0.0286407470703125,
0.055328369140625,
-0.013031005859375,
-0.03155517578125,
0.0224609375,
-0.058746337890625,
-0.055816650390625,
-0.0141754150390625,
-0.049407958984375,
-0.00801849365234375,
-0.04833984375,
-0.07574462890625,
0.132568359375,
-0.0239410400390625,
0.034881591796875,
-0.01438140869140625,
0.06005859375,
-0.005218505859375,
0.036376953125,
-0.0240936279296875,
0.036651611328125,
-0.027740478515625,
-0.00016117095947265625,
-0.01180267333984375,
0.0261688232421875,
-0.0163116455078125,
-0.02374267578125,
0.044158935546875,
0.029449462890625,
-0.03082275390625,
0.00797271728515625,
0.03240966796875,
-0.00681304931640625,
-0.031524658203125,
0.0435791015625,
-0.0014963150024414062,
-0.0040283203125,
0.01861572265625,
0.01422882080078125,
0.040557861328125,
0.0011539459228515625,
-0.03424072265625,
0.041015625,
0.00897979736328125,
0.004241943359375,
-0.0092010498046875,
-0.029449462890625,
-0.006877899169921875,
0.0084228515625,
-0.0022125244140625,
0.05328369140625,
0.01532745361328125,
0.023529052734375,
0.023284912109375,
-0.0013713836669921875,
-0.015655517578125,
-0.0094757080078125,
0.04229736328125,
0.013702392578125,
0.06146240234375,
0.0158233642578125,
0.0111083984375,
0.10491943359375,
0.0021610260009765625,
0.0401611328125,
0.03375244140625,
-0.0261077880859375,
0.0146026611328125,
-0.006771087646484375,
0.009124755859375,
-0.04754638671875,
0.0033740997314453125,
0.0296478271484375,
0.011474609375,
-0.019927978515625,
-0.03759765625,
0.0201873779296875,
0.027618408203125,
0.01381683349609375,
0.03607177734375,
0.04449462890625,
-0.00730133056640625,
0.031280517578125,
-0.037384033203125,
0.00572967529296875,
0.01103973388671875,
-0.00568389892578125,
-0.007503509521484375,
0.01277923583984375,
-0.01265716552734375,
0.005779266357421875,
-0.031982421875,
0.01273345947265625,
0.039093017578125,
0.05908203125,
-0.0165557861328125,
0.06707763671875,
-0.03497314453125,
-0.023529052734375,
0.0194091796875,
0.01151275634765625,
-0.00661468505859375,
-0.0261077880859375,
-0.0501708984375,
-0.077392578125,
0.0296478271484375,
0.05419921875,
0.0330810546875,
0.02423095703125,
0.006633758544921875,
0.0284271240234375,
0.041656494140625,
0.009552001953125,
0.04736328125,
0.00418853759765625,
0.028594970703125,
-0.013427734375,
-0.00957489013671875,
-0.013885498046875,
-0.0192718505859375,
-0.041748046875,
0.0229034423828125,
0.0176544189453125,
-0.0129547119140625,
0.03424072265625,
-0.0019407272338867188,
-0.03076171875,
0.0049896240234375,
-0.007495880126953125,
0.08209228515625,
0.01959228515625,
-0.0163421630859375,
0.0167236328125,
-0.0369873046875,
-0.0648193359375,
0.0113677978515625,
0.02777099609375,
-0.004184722900390625,
0.015411376953125,
0.016021728515625,
-0.03497314453125,
0.0296783447265625,
0.0207977294921875,
-0.004711151123046875,
0.00443267822265625,
0.019256591796875,
-0.01230621337890625,
0.0010356903076171875,
-0.004016876220703125,
0.0107269287109375,
0.0221099853515625,
0.0243072509765625,
0.10028076171875,
-0.036102294921875,
0.00914764404296875,
0.04595947265625,
-0.0228729248046875,
0.031585693359375,
0.04583740234375,
-0.027679443359375,
-0.0369873046875,
-0.00313568115234375,
-0.001873016357421875,
-0.006561279296875,
-0.013885498046875,
0.043701171875,
-0.0501708984375,
0.0063018798828125,
-0.0175628662109375,
0.01090240478515625,
-0.0296630859375,
0.0341796875,
-0.025634765625,
-0.0175323486328125,
-0.06256103515625,
-0.037139892578125,
0.0455322265625,
0.031097412109375,
0.0035800933837890625,
-0.005374908447265625,
0.04193115234375,
-0.0257110595703125,
0.0014019012451171875,
0.0017557144165039062,
-0.01049041748046875,
0.037109375,
0.03887939453125,
-0.03857421875,
0.0004837512969970703,
-0.01371002197265625,
-0.0040283203125,
0.0160980224609375,
0.025299072265625,
0.01436614990234375,
-0.052093505859375,
0.0306243896484375,
0.054168701171875,
0.046173095703125,
-0.0214691162109375,
0.01187896728515625,
0.048248291015625,
-0.0233154296875,
-0.00795745849609375,
-0.0164031982421875,
-0.0147705078125,
-0.040435791015625,
0.00789642333984375,
-0.00452423095703125,
0.01285552978515625,
-0.0169525146484375,
0.026336669921875,
-0.0163726806640625,
0.04498291015625,
0.0031337738037109375,
-0.04107666015625,
0.015472412109375,
-0.014617919921875,
0.0096282958984375,
0.0212554931640625,
0.010040283203125,
-0.0035266876220703125,
0.0244293212890625,
-0.0156402587890625,
-0.0244140625,
-0.0228118896484375,
0.0289764404296875,
-0.0113067626953125,
0.03656005859375,
0.046234130859375,
-0.03131103515625,
-0.0287322998046875,
0.06036376953125,
0.044952392578125,
0.0921630859375,
0.01666259765625,
-0.01476287841796875,
0.027130126953125,
-0.0274200439453125,
-0.011322021484375,
-0.031463623046875,
0.01055145263671875,
-0.045440673828125,
-0.045867919921875,
-0.037841796875,
-0.00739288330078125,
-0.0019378662109375,
-0.046051025390625,
-0.031768798828125,
0.0728759765625,
-0.01058197021484375,
-0.013671875,
-0.07879638671875,
0.00466156005859375,
-0.00250244140625,
0.0225067138671875,
-0.0236968994140625,
-0.017120361328125,
-0.0341796875,
0.045196533203125,
0.023284912109375,
0.01427459716796875,
0.00521087646484375,
0.0283355712890625,
0.0094146728515625,
0.060333251953125,
0.0506591796875,
-0.00830078125,
0.018218994140625,
-0.030364990234375,
0.056488037109375,
0.03240966796875,
-0.034881591796875,
0.011810302734375,
0.031158447265625,
0.0165252685546875,
-0.004840850830078125,
-0.04833984375,
-0.045166015625,
-0.01739501953125,
0.0677490234375,
0.05877685546875,
0.01088714599609375,
-0.04388427734375,
0.003437042236328125,
0.01189422607421875,
-0.012359619140625,
0.0207672119140625,
0.0112762451171875,
-0.0217742919921875,
0.0030078887939453125,
-0.0262451171875,
-0.01306915283203125,
0.01551055908203125,
0.007068634033203125,
-0.0222930908203125,
0.0169677734375,
0.0160675048828125,
-0.021087646484375,
-0.0300750732421875,
-0.0102691650390625,
-0.021697998046875,
0.0182342529296875,
0.0126953125,
-0.0251617431640625,
0.00646209716796875,
-0.01120758056640625,
0.051910400390625,
0.0009870529174804688,
-0.005954742431640625,
-0.041778564453125,
0.021392822265625,
-0.01476287841796875,
0.0491943359375,
-0.039276123046875,
-0.0097198486328125,
-0.00716400146484375,
0.0217437744140625,
-0.0026531219482421875,
0.0032939910888671875,
0.00981903076171875,
0.036895751953125,
0.01177215576171875,
0.035186767578125,
0.01148223876953125,
0.062225341796875,
-0.01351165771484375,
0.064697265625,
0.006816864013671875,
-0.046905517578125,
0.0168609619140625,
-0.039306640625,
0.01007080078125,
0.037109375,
0.0469970703125,
-0.0166473388671875,
0.047149658203125,
-0.009490966796875,
0.034881591796875,
0.017578125
] |
09f34efb687a8ca2d512f5e7414ae75fc4a87b0d
|
Wordpress Stackexchange
Q: Email Notifications of new posts to users - suggestions I currently am using the Subscriber2 plugin to send email notifications to subscribers of new blog posts, but that plugin has not been working properly for a while on my site.
Can someone suggest some alternative plugins.
I only need the following...
- sends emails with part of the post to subscribers on a mailing list
- sidebar widget so new subscribers can enter their email address to sign up
- import feature so I can take emails and import them into this new system
Thanks.
A: Have you thought about using feedburner? I'm using feedburner to handle subscribers. And it emails subscribers once a new post is made.
You should be able to import your subscribers by emailing the csv file to [email protected] and informing support that you are moving to use Feedburner.
|
Q: Email Notifications of new posts to users - suggestions I currently am using the Subscriber2 plugin to send email notifications to subscribers of new blog posts, but that plugin has not been working properly for a while on my site.
Can someone suggest some alternative plugins.
I only need the following...
- sends emails with part of the post to subscribers on a mailing list
- sidebar widget so new subscribers can enter their email address to sign up
- import feature so I can take emails and import them into this new system
Thanks.
A: Have you thought about using feedburner? I'm using feedburner to handle subscribers. And it emails subscribers once a new post is made.
You should be able to import your subscribers by emailing the csv file to [email protected] and informing support that you are moving to use Feedburner.
A: I highly recommend MailChimp. There's an RSS to Email Campaign that is nice and customizable. Free up to 2000 subscribers. The RSS URL is example.com/feed/
And MailChimp has subscription plugins, of course.
A: I want to 2nd using Feedburner. I use it for our email subscriptions and it's been great. You get stats of how many people are clicking through, the daily interaction numbers, etc. Have you tried Feedburner?
|
wordpress
|
{
"language": "en",
"length": 214,
"provenance": "stackexchange_00019.jsonl.gz:421571",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57632"
}
|
[
0.02313232421875,
0.004947662353515625,
-0.01236724853515625,
0.02960205078125,
-0.004917144775390625,
-0.04034423828125,
0.03961181640625,
-0.048583984375,
0.00890350341796875,
0.02032470703125,
-0.001918792724609375,
0.0048370361328125,
-0.0088348388671875,
-0.02093505859375,
-0.018951416015625,
-0.0215911865234375,
0.037109375,
0.006046295166015625,
0.0255279541015625,
-0.0071563720703125,
0.0130462646484375,
0.0165252685546875,
-0.0009069442749023438,
0.048583984375,
-0.01042938232421875,
0.094970703125,
0.0675048828125,
0.003940582275390625,
-0.01043701171875,
0.0090789794921875,
0.01519012451171875,
-0.05645751953125,
0.0144805908203125,
0.058502197265625,
-0.0665283203125,
0.021942138671875,
0.029693603515625,
0.005046844482421875,
0.0010328292846679688,
0.022857666015625,
0.032196044921875,
-0.023895263671875,
0.0648193359375,
-0.004070281982421875,
0.0343017578125,
-0.0295562744140625,
0.04150390625,
-0.057586669921875,
0.0016508102416992188,
0.0020923614501953125,
0.0016469955444335938,
-0.01181793212890625,
0.02142333984375,
0.004817962646484375,
-0.0130767822265625,
-0.00616455078125,
-0.03302001953125,
0.027984619140625,
0.0255126953125,
-0.0027923583984375,
-0.00513458251953125,
0.01061248779296875,
0.01898193359375,
0.01332855224609375,
-0.042388916015625,
-0.0121002197265625,
-0.0010805130004882812,
0.006099700927734375,
0.0207061767578125,
-0.036407470703125,
0.007152557373046875,
0.0158538818359375,
0.01441192626953125,
-0.045562744140625,
-0.0225830078125,
0.004852294921875,
0.0206451416015625,
-0.00875091552734375,
-0.00214385986328125,
-0.00875091552734375,
-0.052398681640625,
-0.0078887939453125,
-0.046234130859375,
-0.047271728515625,
0.00960540771484375,
-0.00384521484375,
-0.032745361328125,
0.0162200927734375,
-0.01800537109375,
-0.03082275390625,
-0.01548004150390625,
-0.02252197265625,
-0.040313720703125,
0.0179595947265625,
0.0012216567993164062,
-0.0157012939453125,
0.00823974609375,
0.057159423828125,
-0.048065185546875,
-0.0164031982421875,
-0.03436279296875,
0.0034637451171875,
-0.0279998779296875,
-0.01371002197265625,
-0.00007092952728271484,
0.06024169921875,
-0.0265655517578125,
-0.03057861328125,
0.018707275390625,
0.0257415771484375,
0.01666259765625,
-0.031829833984375,
0.04937744140625,
0.005062103271484375,
-0.007720947265625,
-0.0335693359375,
-0.006336212158203125,
0.0382080078125,
0.00868988037109375,
0.0281982421875,
0.0162811279296875,
0.044708251953125,
-0.04693603515625,
-0.02777099609375,
0.003841400146484375,
-0.018310546875,
-0.006961822509765625,
-0.006160736083984375,
-0.0048370361328125,
-0.025360107421875,
-0.0284271240234375,
0.038848876953125,
0.044921875,
0.0289306640625,
0.0110321044921875,
-0.005847930908203125,
0.0504150390625,
0.013946533203125,
0.01425933837890625,
-0.0307769775390625,
0.01812744140625,
0.01221466064453125,
-0.0218963623046875,
-0.0008630752563476562,
0.046356201171875,
0.01448822021484375,
0.00701141357421875,
-0.0030517578125,
0.038726806640625,
0.037628173828125,
-0.037811279296875,
0.00263214111328125,
0.032135009765625,
-0.00534820556640625,
-0.02752685546875,
-0.0260772705078125,
-0.026580810546875,
-0.0038089752197265625,
0.0009684562683105469,
-0.0304107666015625,
0.031890869140625,
-0.023040771484375,
-0.0191802978515625,
-0.035369873046875,
-0.0682373046875,
0.0285491943359375,
-0.04541015625,
-0.0154266357421875,
0.0186004638671875,
-0.05816650390625,
-0.0013828277587890625,
0.0279998779296875,
0.0298614501953125,
-0.00396728515625,
0.0011072158813476562,
0.01029205322265625,
0.01788330078125,
0.0218505859375,
0.02410888671875,
-0.02606201171875,
-0.0202178955078125,
-0.02154541015625,
0.0863037109375,
-0.04638671875,
-0.0292205810546875,
0.0032825469970703125,
0.0177764892578125,
0.04254150390625,
0.0113067626953125,
0.0292205810546875,
0.037445068359375,
0.020599365234375,
0.0121307373046875,
-0.0004532337188720703,
-0.0302886962890625,
-0.047393798828125,
0.034332275390625,
0.01178741455078125,
-0.018798828125,
0.028076171875,
-0.02459716796875,
0.0222625732421875,
-0.0097808837890625,
-0.00524139404296875,
-0.01245880126953125,
0.0058746337890625,
-0.0079193115234375,
0.036285400390625,
0.01641845703125,
0.0090789794921875,
-0.01206207275390625,
-0.0260772705078125,
0.0265045166015625,
-0.049530029296875,
-0.036590576171875,
-0.010040283203125,
-0.0377197265625,
-0.00910186767578125,
-0.0229034423828125,
0.0157928466796875,
-0.044219970703125,
0.0074615478515625,
-0.044952392578125,
0.00295257568359375,
0.02032470703125,
-0.027679443359375,
-0.01055145263671875,
-0.031097412109375,
-0.0136566162109375,
0.0312042236328125,
-0.050628662109375,
0.0245361328125,
-0.0002675056457519531,
0.02337646484375,
-0.01103973388671875,
0.01800537109375,
0.07562255859375,
0.0233001708984375,
0.0186004638671875,
0.0020809173583984375,
0.001544952392578125,
0.0286407470703125,
0.00757598876953125,
0.048492431640625,
0.08184814453125,
0.043426513671875,
0.034820556640625,
0.0149383544921875,
-0.01142120361328125,
0.0447998046875,
-0.01263427734375,
0.02838134765625,
0.00472259521484375,
-0.0272979736328125,
-0.033660888671875,
0.04852294921875,
0.045562744140625,
0.0307769775390625,
-0.01629638671875,
0.007602691650390625,
0.007572174072265625,
0.00843048095703125,
-0.046112060546875,
0.0032596588134765625,
0.01416015625,
-0.00921630859375,
0.042388916015625,
0.0300140380859375,
0.0209197998046875,
-0.022979736328125,
-0.01617431640625,
-0.036376953125,
0.021270751953125,
0.0227203369140625,
0.058837890625,
0.04150390625,
-0.0178070068359375,
-0.055694580078125,
0.060302734375,
0.035980224609375,
-0.028106689453125,
-0.01129150390625,
0.016998291015625,
-0.01320648193359375,
0.0273590087890625,
0.02288818359375,
0.01163482666015625,
-0.04803466796875,
-0.04827880859375,
-0.00649261474609375,
-0.0022106170654296875,
0.046112060546875,
-0.00963592529296875,
0.0247955322265625,
-0.0213165283203125,
0.0086822509765625,
-0.0005464553833007812,
-0.05877685546875,
0.041473388671875,
-0.03387451171875,
-0.0029964447021484375,
0.0665283203125,
0.040679931640625,
-0.022308349609375,
0.00875091552734375,
0.0201416015625,
0.01026153564453125,
0.031341552734375,
0.00768280029296875,
-0.0240936279296875,
-0.0164031982421875,
-0.0005612373352050781,
0.0028133392333984375,
0.0288543701171875,
-0.03399658203125,
-0.0489501953125,
-0.0137481689453125,
-0.00560760498046875,
-0.0316162109375,
-0.0191497802734375,
-0.031585693359375,
-0.050750732421875,
-0.014556884765625,
-0.000057578086853027344,
-0.01454925537109375,
0.0052032470703125,
0.0200958251953125,
0.01485443115234375,
-0.055877685546875,
-0.01397705078125,
-0.052337646484375,
-0.049224853515625,
-0.043182373046875,
0.07733154296875,
-0.006229400634765625,
0.04010009765625,
0.00855255126953125,
-0.01320648193359375,
-0.015411376953125,
-0.03802490234375,
0.0038166046142578125,
0.0189971923828125,
-0.00885009765625,
-0.01010894775390625,
-0.0294036865234375,
0.035858154296875,
-0.017913818359375,
0.01812744140625,
0.04144287109375,
0.02740478515625,
-0.0645751953125,
-0.007663726806640625,
-0.0186614990234375,
-0.005870819091796875,
-0.0082855224609375,
-0.03778076171875,
0.0084228515625,
0.01506805419921875,
-0.036102294921875,
-0.0408935546875,
0.072021484375,
-0.0255279541015625,
-0.0142669677734375,
-0.07073974609375,
-0.00634765625,
-0.01134490966796875,
-0.036041259765625,
-0.0310211181640625,
-0.01012420654296875,
-0.00628662109375,
0.061370849609375,
-0.02130126953125,
-0.0175628662109375,
-0.0196075439453125,
-0.0447998046875,
-0.0234375,
-0.00789642333984375,
-0.0294342041015625,
-0.002712249755859375,
-0.021209716796875,
0.0178680419921875,
-0.03912353515625,
0.06768798828125,
-0.038604736328125,
-0.07049560546875,
0.047821044921875,
-0.00852203369140625,
-0.007678985595703125,
-0.027313232421875,
-0.036712646484375,
0.00412750244140625,
0.09649658203125,
-0.0205078125,
-0.0118560791015625,
0.00940704345703125,
0.01140594482421875,
-0.0052490234375,
-0.036224365234375,
-0.037872314453125,
-0.02349853515625,
0.007640838623046875,
-0.02032470703125,
-0.0269775390625,
-0.0074920654296875,
-0.0016298294067382812,
-0.01508331298828125,
0.0166473388671875,
-0.0300750732421875,
0.03253173828125,
-0.04644775390625,
0.039337158203125,
0.00038695335388183594,
0.0112762451171875,
-0.01654052734375,
-0.02197265625,
-0.0416259765625,
-0.037200927734375,
-0.006839752197265625,
0.00531005859375,
-0.00939178466796875,
-0.01114654541015625,
-0.001934051513671875,
-0.0122528076171875,
0.0054931640625,
-0.0418701171875,
0.029693603515625,
-0.040069580078125,
0.021484375,
-0.0100555419921875,
0.0184326171875,
-0.0272064208984375,
0.00649261474609375,
-0.0015554428100585938,
-0.0304107666015625,
-0.04278564453125,
0.026153564453125,
-0.01488494873046875,
0.042999267578125,
-0.0214080810546875,
-0.0036563873291015625,
-0.0467529296875,
-0.042724609375,
-0.023193359375,
0.0059051513671875,
-0.010345458984375,
-0.00482177734375,
-0.04345703125,
-0.047515869140625,
-0.01250457763671875,
-0.02130126953125,
-0.019561767578125,
0.009307861328125,
0.057037353515625,
0.0286102294921875,
0.015655517578125,
0.0234527587890625,
0.006587982177734375,
0.06964111328125,
0.033843994140625,
0.01361083984375,
0.03375244140625,
-0.04986572265625,
0.043853759765625,
0.0596923828125,
0.0191192626953125,
-0.05072021484375,
0.0263671875,
-0.026153564453125,
-0.03448486328125,
0.04376220703125,
-0.0295562744140625,
0.04290771484375,
0.01715087890625,
-0.0283966064453125,
-0.0221710205078125,
-0.030303955078125,
0.07708740234375,
-0.04388427734375,
0.062744140625,
-0.040740966796875,
-0.043182373046875,
0.040130615234375,
-0.0230255126953125,
-0.0173492431640625,
-0.023773193359375,
0.015411376953125,
-0.03216552734375,
-0.033843994140625,
-0.0287628173828125,
0.0142669677734375,
-0.0033740997314453125,
0.04400634765625,
0.003314971923828125,
0.0161895751953125,
0.0007643699645996094,
-0.032867431640625,
-0.0020465850830078125,
0.0160064697265625,
0.027740478515625,
-0.0053863525390625,
-0.049163818359375,
0.0086517333984375,
0.010589599609375,
-0.0263519287109375,
-0.0016117095947265625,
0.059173583984375,
0.0771484375,
-0.020538330078125,
-0.0227508544921875,
-0.0081787109375,
0.047698974609375,
-0.0675048828125,
-0.0550537109375,
-0.0057830810546875,
-0.023101806640625,
-0.02349853515625,
0.0389404296875,
-0.04681396484375,
0.0162200927734375,
0.0005621910095214844,
0.0257110595703125,
0.017974853515625,
0.01447296142578125,
0.01091766357421875,
0.01142120361328125,
0.0004086494445800781,
-0.031524658203125,
0.0173492431640625,
0.005523681640625,
0.026214599609375,
-0.011474609375,
-0.0085296630859375,
0.045379638671875,
0.0194244384765625,
0.0029354095458984375,
-0.0228424072265625,
-0.0296783447265625,
0.0252532958984375,
0.046905517578125,
0.003391265869140625,
-0.036285400390625,
-0.0263214111328125,
0.0223388671875,
0.041259765625,
0.00852203369140625,
-0.01253509521484375,
-0.00844573974609375,
-0.019317626953125,
0.00516510009765625,
-0.0308380126953125,
-0.028106689453125,
-0.0096893310546875,
-0.0295257568359375,
0.00885009765625,
0.046630859375,
-0.035675048828125,
-0.036895751953125,
-0.01227569580078125,
-0.02349853515625,
0.06695556640625,
0.01361083984375,
0.012603759765625,
-0.04010009765625,
-0.01006317138671875,
-0.1102294921875,
0.014617919921875,
0.00742340087890625,
0.0005550384521484375,
-0.0193328857421875,
-0.007293701171875,
-0.03961181640625,
-0.0289306640625,
-0.06304931640625,
-0.03961181640625,
-0.050079345703125,
-0.0022182464599609375,
0.054656982421875,
0.0246429443359375,
-0.0140838623046875,
-0.0989990234375,
-0.0087738037109375,
-0.039398193359375,
0.0399169921875,
-0.005550384521484375,
0.0008015632629394531,
0.025421142578125,
-0.00859832763671875,
0.063232421875,
0.002407073974609375,
-0.012969970703125,
-0.0487060546875,
-0.005344390869140625,
-0.005634307861328125,
-0.04052734375,
0.02191162109375,
0.01727294921875,
0.01593017578125,
-0.029937744140625,
-0.01678466796875,
0.0022335052490234375,
0.00263214111328125,
-0.0230560302734375,
0.005298614501953125,
-0.0110321044921875,
0.0155181884765625,
-0.001953125,
-0.0084991455078125,
0.031585693359375,
-0.046905517578125,
-0.025634765625,
0.0438232421875,
-0.0032558441162109375,
0.00028204917907714844,
0.0155181884765625,
-0.0269622802734375,
-0.001979827880859375,
0.008697509765625,
-0.0028228759765625,
0.00925445556640625,
-0.024871826171875,
0.0167083740234375,
-0.00039649009704589844,
0.00041484832763671875,
0.0226287841796875,
0.005584716796875,
0.032745361328125,
-0.00923919677734375,
0.082763671875,
0.006534576416015625,
-0.0196685791015625,
0.050933837890625,
-0.0540771484375,
0.01412200927734375,
0.004314422607421875,
0.04852294921875,
-0.0379638671875,
0.0282135009765625,
0.0016813278198242188,
-0.00042366981506347656,
0.0266265869140625,
-0.0216064453125,
-0.0149993896484375,
-0.03173828125,
0.07806396484375,
0.014862060546875,
-0.01055908203125,
0.0222625732421875,
-0.006031036376953125,
-0.00022149085998535156,
-0.0092620849609375,
0.03936767578125,
0.01544189453125,
-0.0098876953125,
-0.026641845703125,
-0.00853729248046875,
-0.0156402587890625,
-0.04168701171875,
-0.0005702972412109375,
0.0167694091796875,
-0.0146026611328125,
-0.0540771484375,
0.03326416015625,
0.0022258758544921875,
0.0079345703125,
-0.0513916015625,
-0.00865936279296875,
0.03448486328125,
0.03570556640625,
-0.01250457763671875,
-0.029541015625,
0.023834228515625,
-0.02520751953125,
-0.016937255859375,
-0.033050537109375,
0.006954193115234375,
0.0264434814453125,
-0.0157470703125,
0.016937255859375,
-0.00218963623046875,
-0.0254058837890625,
-0.004955291748046875,
-0.005947113037109375,
0.0809326171875,
-0.00445556640625,
-0.032958984375,
0.012451171875,
-0.0198822021484375,
-0.004791259765625,
-0.00933837890625,
-0.01396942138671875,
-0.02398681640625,
0.024505615234375,
-0.0213623046875,
-0.0146026611328125,
0.00782012939453125,
0.0095062255859375,
-0.10760498046875,
0.09759521484375,
0.051422119140625,
0.043914794921875,
-0.01413726806640625,
0.032806396484375,
-0.045562744140625,
-0.015380859375,
-0.041412353515625,
0.053985595703125,
-0.037689208984375,
0.02685546875,
-0.045196533203125,
0.00894927978515625,
-0.01702880859375,
0.003932952880859375,
0.07281494140625,
0.03289794921875,
-0.02056884765625,
-0.0350341796875,
-0.00432586669921875,
0.01329803466796875,
-0.037322998046875,
0.04986572265625,
0.0032558441162109375,
0.007755279541015625,
0.07568359375,
-0.021453857421875,
0.045196533203125,
0.01468658447265625,
0.0240936279296875,
0.00592041015625,
-0.027099609375,
-0.0296630859375,
-0.006465911865234375,
0.006134033203125,
0.035430908203125,
-0.0313720703125,
-0.039642333984375,
-0.032623291015625,
0.0220489501953125,
-0.0079498291015625,
0.02313232421875,
-0.020965576171875,
0.033447265625,
-0.0195465087890625,
0.051483154296875,
-0.00058746337890625,
0.019134521484375,
0.01284027099609375,
0.0088653564453125,
0.03204345703125,
-0.0115814208984375,
-0.004543304443359375,
0.0196533203125,
-0.001964569091796875,
0.0158233642578125,
-0.047698974609375,
-0.001873016357421875,
-0.11737060546875,
-0.07708740234375,
0.041229248046875,
0.0418701171875,
-0.0083770751953125,
-0.03228759765625,
0.00893402099609375,
0.0217132568359375,
0.026702880859375,
0.0115966796875,
0.04486083984375,
-0.055816650390625,
-0.01334381103515625,
0.0031681060791015625,
-0.029449462890625,
-0.00391387939453125,
0.033599853515625,
0.013092041015625,
-0.0143280029296875,
0.0120697021484375,
-0.0254669189453125,
0.0019550323486328125,
-0.0003871917724609375,
0.0256500244140625,
0.007171630859375,
-0.0181732177734375,
0.033843994140625,
-0.0178070068359375,
0.007106781005859375,
0.01397705078125,
-0.0335693359375,
0.04400634765625,
-0.039642333984375,
0.01352691650390625,
-0.00109100341796875,
0.05194091796875,
0.018585205078125,
-0.0291900634765625,
0.019500732421875,
0.03607177734375,
0.04010009765625,
-0.0460205078125,
-0.035430908203125,
-0.02227783203125,
-0.037628173828125,
0.030059814453125,
-0.029266357421875,
-0.00970458984375,
-0.0124664306640625,
-0.0404052734375,
0.0167083740234375,
-0.0205078125,
0.04388427734375,
-0.05059814453125,
0.0322265625,
-0.0014314651489257812,
-0.018402099609375,
0.06207275390625,
0.010467529296875,
0.0596923828125,
-0.0192108154296875,
-0.073974609375,
-0.00937652587890625,
-0.04241943359375,
-0.01181793212890625,
0.01617431640625,
0.0229034423828125,
-0.024566650390625,
0.035125732421875,
0.0128326416015625,
0.00634002685546875,
0.01265716552734375,
-0.0271759033203125,
-0.01422119140625,
-0.01416778564453125,
0.015655517578125,
-0.0179290771484375,
-0.020660400390625,
0.0116424560546875,
-0.0125885009765625,
0.02142333984375,
0.0009756088256835938,
0.04852294921875,
-0.009918212890625,
0.02264404296875,
-0.0085906982421875,
0.019012451171875,
-0.047210693359375,
-0.0173187255859375,
0.00789642333984375,
-0.0236968994140625,
-0.01494598388671875,
0.0016603469848632812,
-0.08074951171875,
0.02691650390625,
0.034210205078125,
0.01308441162109375,
0.033111572265625,
-0.012420654296875,
0.0033779144287109375,
-0.0179901123046875,
-0.02349853515625,
-0.0312042236328125,
-0.0267333984375,
-0.02166748046875,
-0.0094757080078125,
0.019561767578125,
0.0408935546875,
0.015594482421875,
0.0124664306640625,
-0.01369476318359375,
0.006847381591796875,
-0.0171051025390625,
0.0240936279296875,
-0.03814697265625,
0.0236968994140625,
-0.04547119140625,
0.007114410400390625,
0.0093536376953125,
-0.01163482666015625,
0.01262664794921875,
0.00453948974609375,
0.0179443359375,
0.006206512451171875,
0.00473785400390625,
0.02288818359375,
0.032562255859375,
0.050323486328125,
-0.0141143798828125,
0.01204681396484375,
0.01033782958984375,
0.0022106170654296875,
-0.0118255615234375,
-0.033477783203125,
-0.0179443359375,
-0.047393798828125,
0.0056610107421875,
0.016815185546875,
-0.0269317626953125,
-0.01256561279296875,
-0.0270538330078125,
0.0007691383361816406,
0.034515380859375,
-0.0171966552734375,
-0.046661376953125,
-0.001361846923828125,
-0.006084442138671875,
0.048736572265625,
-0.020050048828125,
-0.0408935546875,
0.00897216796875,
0.052825927734375,
-0.01236724853515625,
-0.080078125,
-0.0426025390625,
0.054229736328125,
-0.0791015625,
0.003841400146484375,
0.035888671875,
-0.023529052734375,
-0.037506103515625,
-0.0195770263671875,
0.01313018798828125,
0.0159912109375,
0.0131378173828125,
-0.00927734375,
0.0187530517578125,
-0.006877899169921875,
-0.0042877197265625,
-0.056121826171875,
0.002521514892578125,
-0.071533203125,
-0.033599853515625,
-0.0211334228515625,
-0.002262115478515625,
-0.00165557861328125,
-0.027587890625,
-0.040313720703125,
0.07977294921875,
-0.018798828125,
-0.01313018798828125,
-0.0301361083984375,
0.0116424560546875,
0.004566192626953125,
-0.00543975830078125,
-0.0071258544921875,
-0.0306549072265625,
-0.02703857421875,
0.02099609375,
0.0019445419311523438,
0.0218048095703125,
0.0249481201171875,
-0.035400390625,
-0.016998291015625,
-0.01470184326171875,
0.00838470458984375,
0.01287078857421875,
-0.01806640625,
-0.0162353515625,
0.00908660888671875,
0.02569580078125,
-0.036285400390625,
-0.0736083984375,
0.0035572052001953125,
0.00701141357421875,
-0.033966064453125,
-0.002490997314453125,
-0.04425048828125,
-0.007312774658203125,
0.09765625,
0.08184814453125,
0.034515380859375,
-0.046142578125,
0.01145172119140625,
-0.02764892578125,
-0.00170135498046875,
-0.0014886856079101562,
0.006732940673828125,
-0.0300445556640625,
0.01061248779296875,
0.002410888671875,
0.0089111328125,
-0.044952392578125,
-0.02685546875,
-0.021087646484375,
-0.0426025390625,
-0.0260009765625,
-0.0102386474609375,
0.0251007080078125,
-0.01629638671875,
0.0108642578125,
-0.00423431396484375,
0.029449462890625,
0.019287109375,
-0.0019989013671875,
0.0261383056640625,
0.10662841796875,
0.03466796875,
-0.05218505859375,
-0.0225067138671875,
0.0250244140625,
0.017547607421875,
0.07293701171875,
-0.0234832763671875,
-0.06597900390625,
0.0305938720703125,
0.0190277099609375,
-0.0266571044921875,
0.005584716796875,
-0.000057578086853027344,
0.036773681640625,
-0.0298614501953125,
0.097412109375,
0.006984710693359375,
-0.08203125,
-0.044952392578125,
0.0633544921875,
-0.0129852294921875,
-0.028228759765625,
-0.01419830322265625,
-0.017547607421875,
0.01175689697265625,
0.02777099609375,
0.047943115234375,
-0.0029811859130859375,
0.015899658203125,
0.017547607421875,
0.0068817138671875,
0.00014972686767578125
] |
5ce9e054df3b2f0c3a6257ffc9ce48d41f2fc7ad
|
Wordpress Stackexchange
Q: How to create custom URLs for Custom Post Type sub sections? Not sure how to ask this, because I'm not exactly sure what I'm asking.
I'm looking to use custom URLs (using rewrite rules maybe?) to create 'tabs' for a Custom Post Type. In the past I've used things like a GET session variable to determine what tab the user is on, or JavaScript. I would really prefer to keep it on it's own logical page with a URL to reflect that.
A very basic look of the tabs would be:
HOME | UPDATES | CONTRIBUTORS | WALL
For example if we're on the CPT of Charity's sub page of Updates: http://siteroot/charity/updates
A: Create an end point for the permalinks. See example.
Then you can even be more granular and use updates/2012, updates/2013 and so on.
Recommended reading:
*
*Codex: add_rewrite_endpoint()
*A (Mostly) Complete Guide to the WordPress Rewrite API
|
Q: How to create custom URLs for Custom Post Type sub sections? Not sure how to ask this, because I'm not exactly sure what I'm asking.
I'm looking to use custom URLs (using rewrite rules maybe?) to create 'tabs' for a Custom Post Type. In the past I've used things like a GET session variable to determine what tab the user is on, or JavaScript. I would really prefer to keep it on it's own logical page with a URL to reflect that.
A very basic look of the tabs would be:
HOME | UPDATES | CONTRIBUTORS | WALL
For example if we're on the CPT of Charity's sub page of Updates: http://siteroot/charity/updates
A: Create an end point for the permalinks. See example.
Then you can even be more granular and use updates/2012, updates/2013 and so on.
Recommended reading:
*
*Codex: add_rewrite_endpoint()
*A (Mostly) Complete Guide to the WordPress Rewrite API
|
wordpress
|
{
"language": "en",
"length": 151,
"provenance": "stackexchange_00019.jsonl.gz:421578",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57656"
}
|
[
0.0712890625,
-0.0251007080078125,
0.024932861328125,
-0.049774169921875,
-0.00292205810546875,
-0.031829833984375,
0.044525146484375,
-0.0171966552734375,
-0.04296875,
0.00787353515625,
0.01995849609375,
-0.0033016204833984375,
-0.034088134765625,
-0.034423828125,
0.02191162109375,
-0.04559326171875,
0.041290283203125,
-0.03802490234375,
0.0142364501953125,
-0.0029048919677734375,
-0.0021190643310546875,
0.00373077392578125,
0.048248291015625,
0.06146240234375,
0.0262603759765625,
0.009735107421875,
0.04815673828125,
-0.01995849609375,
0.029205322265625,
-0.010284423828125,
0.0275421142578125,
-0.051116943359375,
0.00569915771484375,
0.0242156982421875,
0.0158538818359375,
0.0233306884765625,
0.03497314453125,
-0.00656890869140625,
0.0244598388671875,
0.00948333740234375,
0.04437255859375,
-0.0289764404296875,
0.029876708984375,
0.0005316734313964844,
0.0282135009765625,
-0.033935546875,
0.05401611328125,
-0.061370849609375,
0.0219268798828125,
0.0091094970703125,
-0.0137176513671875,
0.03582763671875,
-0.0029392242431640625,
-0.047332763671875,
-0.01186370849609375,
-0.034088134765625,
0.045867919921875,
-0.057861328125,
0.02496337890625,
-0.038177490234375,
-0.0293426513671875,
0.00353240966796875,
0.048553466796875,
0.03265380859375,
-0.028106689453125,
0.0006799697875976562,
0.04742431640625,
0.012451171875,
-0.032989501953125,
-0.03564453125,
0.0203857421875,
0.024993896484375,
0.011810302734375,
-0.023101806640625,
0.0206298828125,
-0.038360595703125,
0.0264739990234375,
-0.01947021484375,
-0.024627685546875,
0.0279388427734375,
0.01727294921875,
-0.02215576171875,
-0.01050567626953125,
0.0016889572143554688,
0.0106201171875,
0.0125885009765625,
-0.01049041748046875,
-0.0114898681640625,
-0.0192108154296875,
-0.0188751220703125,
-0.0251922607421875,
-0.0272369384765625,
-0.028350830078125,
0.03289794921875,
-0.01259613037109375,
-0.00794219970703125,
0.060333251953125,
0.0072021484375,
0.0295867919921875,
0.00580596923828125,
0.043548583984375,
-0.07952880859375,
0.0635986328125,
-0.033172607421875,
0.0138092041015625,
0.016693115234375,
0.01270294189453125,
0.037078857421875,
0.06317138671875,
0.0081939697265625,
-0.004791259765625,
0.046783447265625,
0.00632476806640625,
0.0312042236328125,
-0.0540771484375,
-0.036041259765625,
-0.050628662109375,
-0.03558349609375,
-0.0225982666015625,
-0.0272979736328125,
0.0116729736328125,
0.0418701171875,
-0.0196990966796875,
0.01163482666015625,
-0.0066986083984375,
0.01302337646484375,
0.017364501953125,
-0.059478759765625,
-0.0261993408203125,
0.0222625732421875,
-0.039947509765625,
0.0263671875,
0.0772705078125,
0.036529541015625,
0.005107879638671875,
-0.0190887451171875,
0.04150390625,
-0.0230255126953125,
-0.02337646484375,
0.031890869140625,
-0.00994110107421875,
0.002040863037109375,
0.006500244140625,
-0.043792724609375,
0.01239013671875,
0.044097900390625,
0.003719329833984375,
-0.005649566650390625,
-0.00249481201171875,
-0.041290283203125,
-0.004779815673828125,
-0.04541015625,
0.05010986328125,
-0.015350341796875,
-0.01348114013671875,
-0.056976318359375,
0.01202392578125,
-0.03265380859375,
0.017547607421875,
-0.0238037109375,
0.03802490234375,
0.0191497802734375,
0.0085906982421875,
-0.02886962890625,
-0.0562744140625,
-0.0206146240234375,
-0.03924560546875,
-0.01416015625,
0.0265655517578125,
0.00969696044921875,
0.01413726806640625,
-0.01503753662109375,
0.00826263427734375,
0.0262451171875,
0.006679534912109375,
0.01197052001953125,
0.0212554931640625,
-0.01459503173828125,
0.01210784912109375,
0.0931396484375,
0.036041259765625,
-0.01097869873046875,
0.0223236083984375,
-0.016387939453125,
-0.06353759765625,
0.0633544921875,
-0.0184173583984375,
0.062164306640625,
0.042266845703125,
-0.012054443359375,
0.00016987323760986328,
-0.0023479461669921875,
-0.014678955078125,
-0.0011301040649414062,
-0.0259552001953125,
-0.0263519287109375,
0.0211029052734375,
0.0084075927734375,
-0.0226593017578125,
0.01175689697265625,
-0.0390625,
0.00646209716796875,
0.00010848045349121094,
0.0217437744140625,
0.004878997802734375,
0.0016260147094726562,
-0.004119873046875,
0.0249176025390625,
-0.00867462158203125,
0.0257110595703125,
0.0250396728515625,
0.01439666748046875,
-0.0203857421875,
-0.047607421875,
-0.01271820068359375,
0.005931854248046875,
0.0207366943359375,
0.019378662109375,
0.00142669677734375,
0.0021076202392578125,
0.03875732421875,
-0.011474609375,
0.0218658447265625,
0.0237579345703125,
0.026641845703125,
-0.0197906494140625,
-0.005504608154296875,
-0.0255889892578125,
-0.0020904541015625,
0.01514434814453125,
-0.06610107421875,
0.018646240234375,
0.05303955078125,
0.01238250732421875,
-0.040069580078125,
-0.006549835205078125,
0.0015783309936523438,
-0.0222930908203125,
-0.0145721435546875,
0.052459716796875,
0.035125732421875,
0.01313018798828125,
-0.04095458984375,
-0.047821044921875,
0.03399658203125,
-0.0015497207641601562,
0.003543853759765625,
-0.01849365234375,
-0.01288604736328125,
0.024383544921875,
0.01849365234375,
0.033843994140625,
0.0131378173828125,
-0.018829345703125,
0.042236328125,
0.037109375,
-0.01290130615234375,
-0.021484375,
0.0197906494140625,
-0.01953125,
0.01491546630859375,
0.0194091796875,
-0.017425537109375,
0.002399444580078125,
0.046295166015625,
-0.000530242919921875,
0.053253173828125,
0.03277587890625,
-0.01194000244140625,
-0.006072998046875,
-0.005001068115234375,
-0.00966644287109375,
-0.0103607177734375,
0.01122283935546875,
0.09735107421875,
-0.03240966796875,
-0.029632568359375,
-0.019195556640625,
0.0304718017578125,
0.002315521240234375,
-0.029632568359375,
0.0007262229919433594,
-0.037994384765625,
-0.0008726119995117188,
-0.0021114349365234375,
-0.0416259765625,
0.0043487548828125,
-0.00983428955078125,
0.0040740966796875,
-0.03173828125,
0.01375579833984375,
-0.034942626953125,
-0.03338623046875,
0.01171875,
0.044952392578125,
-0.05059814453125,
0.035186767578125,
-0.05413818359375,
0.04547119140625,
-0.0225067138671875,
0.06201171875,
0.07537841796875,
-0.007843017578125,
0.0151824951171875,
0.01094818115234375,
-0.01148223876953125,
-0.0158538818359375,
0.059051513671875,
0.03704833984375,
-0.0283203125,
0.0069427490234375,
0.0247650146484375,
0.0229034423828125,
0.0498046875,
0.0007982254028320312,
-0.0197906494140625,
0.0169219970703125,
0.043731689453125,
-0.02606201171875,
-0.03997802734375,
0.03375244140625,
-0.03680419921875,
-0.02520751953125,
0.00623321533203125,
-0.02838134765625,
-0.005031585693359375,
0.018951416015625,
-0.010009765625,
-0.035858154296875,
-0.01422882080078125,
-0.046844482421875,
-0.06640625,
-0.06854248046875,
-0.01409149169921875,
0.003021240234375,
0.0271148681640625,
0.0088043212890625,
0.01031494140625,
0.00797271728515625,
-0.0297088623046875,
0.0218048095703125,
0.0081024169921875,
-0.003063201904296875,
-0.0119476318359375,
0.00525665283203125,
-0.0277099609375,
0.042724609375,
-0.00341033935546875,
0.064453125,
0.063720703125,
-0.04730224609375,
0.0218658447265625,
-0.0013866424560546875,
-0.0054473876953125,
-0.0012054443359375,
0.00586700439453125,
0.0131378173828125,
0.0036067962646484375,
-0.00467681884765625,
-0.046539306640625,
-0.042266845703125,
-0.00775146484375,
-0.03924560546875,
-0.003070831298828125,
0.0233917236328125,
-0.004695892333984375,
-0.05413818359375,
0.04388427734375,
0.03759765625,
0.0212249755859375,
0.035430908203125,
-0.017730712890625,
0.038330078125,
-0.0021228790283203125,
0.0277252197265625,
-0.0673828125,
0.06744384765625,
0.01358795166015625,
0.01226043701171875,
0.02996826171875,
0.0011396408081054688,
-0.0228271484375,
0.0020999908447265625,
-0.07281494140625,
-0.054840087890625,
0.04754638671875,
-0.03228759765625,
0.01392364501953125,
-0.053436279296875,
-0.0206756591796875,
-0.0184478759765625,
0.0682373046875,
-0.01031494140625,
-0.001873016357421875,
-0.01934814453125,
0.0066680908203125,
-0.0157318115234375,
-0.07403564453125,
-0.0194549560546875,
0.0010251998901367188,
-0.070556640625,
0.026458740234375,
0.0023860931396484375,
-0.030181884765625,
-0.043701171875,
0.00823211669921875,
-0.062347412109375,
-0.027435302734375,
0.038238525390625,
-0.0157928466796875,
-0.021331787109375,
0.03271484375,
-0.01465606689453125,
-0.0207061767578125,
-0.035247802734375,
0.0034046173095703125,
-0.050018310546875,
-0.007373809814453125,
-0.00601959228515625,
0.0168609619140625,
0.021087646484375,
-0.057586669921875,
0.00830078125,
0.041290283203125,
0.019866943359375,
-0.00501251220703125,
-0.004352569580078125,
-0.02984619140625,
-0.0095062255859375,
0.04486083984375,
0.00417327880859375,
0.00028014183044433594,
-0.00701141357421875,
-0.004543304443359375,
-0.0278778076171875,
0.041107177734375,
-0.00904083251953125,
0.029296875,
-0.0008234977722167969,
-0.0110015869140625,
-0.04278564453125,
-0.0273590087890625,
-0.03521728515625,
0.0020771026611328125,
0.017822265625,
-0.05255126953125,
-0.01454925537109375,
-0.0518798828125,
0.0352783203125,
0.025421142578125,
-0.004638671875,
0.0121307373046875,
0.00897979736328125,
0.0010700225830078125,
-0.04168701171875,
-0.058197021484375,
0.0158843994140625,
0.042694091796875,
0.00018990039825439453,
0.015777587890625,
-0.00872039794921875,
-0.00820159912109375,
0.00433349609375,
-0.01551055908203125,
-0.005001068115234375,
0.0289154052734375,
-0.01348114013671875,
0.01468658447265625,
-0.00534820556640625,
-0.00989532470703125,
-0.007030487060546875,
0.0123443603515625,
-0.00487518310546875,
-0.036590576171875,
0.007129669189453125,
-0.0258331298828125,
0.0269775390625,
-0.01136016845703125,
0.0310821533203125,
-0.034393310546875,
-0.0413818359375,
0.0295867919921875,
0.031951904296875,
0.0161285400390625,
-0.005786895751953125,
0.0016927719116210938,
0.041015625,
-0.0022449493408203125,
0.0008821487426757812,
-0.0195159912109375,
0.0016832351684570312,
-0.033416748046875,
0.0213165283203125,
-0.00809478759765625,
-0.01519775390625,
-0.0098876953125,
0.0197601318359375,
0.035308837890625,
-0.0200347900390625,
-0.037384033203125,
-0.0633544921875,
-0.01081085205078125,
-0.038116455078125,
0.0218353271484375,
-0.0286407470703125,
0.0252685546875,
0.034912109375,
0.0084686279296875,
0.0256500244140625,
-0.0306549072265625,
0.005645751953125,
-0.0281829833984375,
0.0262451171875,
0.0198974609375,
-0.01119232177734375,
-0.0272369384765625,
0.08172607421875,
0.0280609130859375,
0.002628326416015625,
-0.019439697265625,
0.01788330078125,
0.03826904296875,
-0.01617431640625,
0.01422119140625,
0.040313720703125,
-0.01340484619140625,
-0.0173187255859375,
0.0052490234375,
-0.041961669921875,
-0.00540924072265625,
0.021240234375,
0.087890625,
-0.0016965866088867188,
-0.0218505859375,
0.0013332366943359375,
-0.0648193359375,
-0.0135498046875,
-0.00913238525390625,
-0.01340484619140625,
-0.007038116455078125,
-0.018829345703125,
-0.03497314453125,
0.0023593902587890625,
0.00307464599609375,
-0.039154052734375,
0.01389312744140625,
-0.06475830078125,
0.0263519287109375,
0.017364501953125,
-0.006572723388671875,
0.0205841064453125,
-0.006168365478515625,
-0.0024318695068359375,
-0.00921630859375,
0.00423431396484375,
0.005657196044921875,
-0.01226043701171875,
-0.016815185546875,
-0.04046630859375,
0.044891357421875,
-0.012451171875,
0.0166168212890625,
-0.00585174560546875,
-0.019439697265625,
0.0208892822265625,
-0.00038814544677734375,
0.0845947265625,
0.025543212890625,
-0.0654296875,
0.030181884765625,
-0.042205810546875,
0.006114959716796875,
-0.015655517578125,
-0.0487060546875,
-0.047210693359375,
-0.031585693359375,
0.03985595703125,
0.023590087890625,
-0.0007638931274414062,
-0.051483154296875,
-0.01995849609375,
0.006519317626953125,
0.0169830322265625,
0.000988006591796875,
0.0081329345703125,
0.085693359375,
-0.010284423828125,
0.09027099609375,
0.0271453857421875,
0.036041259765625,
-0.034912109375,
-0.033843994140625,
-0.00960540771484375,
-0.06787109375,
-0.018951416015625,
-0.0010652542114257812,
0.0184173583984375,
0.0670166015625,
0.023529052734375,
0.0074310302734375,
0.010345458984375,
-0.0188446044921875,
0.006488800048828125,
-0.0377197265625,
-0.0011844635009765625,
-0.0394287109375,
0.038116455078125,
-0.03875732421875,
0.0281219482421875,
0.10614013671875,
-0.00951385498046875,
-0.01218414306640625,
-0.013702392578125,
-0.0146484375,
0.050018310546875,
0.0004558563232421875,
-0.0292816162109375,
0.009002685546875,
0.1048583984375,
0.014404296875,
0.06878662109375,
0.0172882080078125,
0.0180816650390625,
0.078857421875,
0.0006771087646484375,
0.0224761962890625,
0.0117950439453125,
0.06402587890625,
0.00948333740234375,
-0.023345947265625,
0.044342041015625,
-0.0269012451171875,
0.017913818359375,
0.04620361328125,
0.04705810546875,
-0.09173583984375,
0.0073089599609375,
-0.005718231201171875,
0.01271820068359375,
0.046112060546875,
0.00748443603515625,
-0.003330230712890625,
-0.01421356201171875,
0.0005784034729003906,
-0.0033969879150390625,
-0.0202178955078125,
-0.014739990234375,
0.007904052734375,
0.003551483154296875,
-0.041015625,
0.091064453125,
0.01485443115234375,
0.0146331787109375,
-0.0184478759765625,
-0.0279541015625,
0.005718231201171875,
-0.0160980224609375,
0.01904296875,
0.0233001708984375,
0.0026721954345703125,
-0.029052734375,
0.043304443359375,
-0.048065185546875,
0.00978851318359375,
0.00518035888671875,
-0.0247039794921875,
0.0139007568359375,
0.042510986328125,
-0.028564453125,
0.026123046875,
0.01441192626953125,
-0.0206451416015625,
0.047943115234375,
0.008758544921875,
-0.00489044189453125,
0.01232147216796875,
-0.00815582275390625,
-0.01482391357421875,
-0.0264434814453125,
0.0217742919921875,
-0.012847900390625,
-0.0205841064453125,
0.0743408203125,
-0.03204345703125,
-0.0275421142578125,
0.018096923828125,
-0.0016088485717773438,
-0.0002789497375488281,
-0.0009112358093261719,
-0.034454345703125,
-0.021331787109375,
-0.01459503173828125,
-0.01329803466796875,
-0.056732177734375,
0.034576416015625,
-0.0130157470703125,
-0.034088134765625,
0.0726318359375,
-0.01525115966796875,
0.00479888916015625,
0.00685882568359375,
0.040008544921875,
-0.002323150634765625,
0.0286712646484375,
-0.0220794677734375,
0.01959228515625,
-0.0007181167602539062,
0.05914306640625,
-0.033966064453125,
-0.01410675048828125,
0.036468505859375,
0.04931640625,
0.02294921875,
0.0257415771484375,
-0.045684814453125,
0.004283905029296875,
-0.0102691650390625,
0.031341552734375,
-0.004169464111328125,
0.044219970703125,
0.00225067138671875,
0.0016355514526367188,
0.060455322265625,
-0.004673004150390625,
0.0350341796875,
0.018707275390625,
-0.0030498504638671875,
0.03741455078125,
0.021881103515625,
0.0092010498046875,
-0.0265960693359375,
-0.009857177734375,
-0.03839111328125,
-0.00623321533203125,
0.034942626953125,
-0.01441192626953125,
0.0196990966796875,
0.0128631591796875,
0.0257720947265625,
-0.034820556640625,
-0.006336212158203125,
-0.018798828125,
0.04986572265625,
0.0075531005859375,
0.02117919921875,
0.046234130859375,
0.0285186767578125,
0.037017822265625,
0.00533294677734375,
0.012664794921875,
0.028167724609375,
-0.0187835693359375,
0.040374755859375,
0.0295562744140625,
0.00965118408203125,
-0.044189453125,
0.005031585693359375,
0.07855224609375,
0.0751953125,
-0.05194091796875,
-0.0455322265625,
0.00229644775390625,
0.00870513916015625,
0.04071044921875,
0.01276397705078125,
0.0576171875,
0.0007877349853515625,
0.00814056396484375,
-0.033477783203125,
0.01335906982421875,
-0.00946044921875,
0.01021575927734375,
-0.0196533203125,
-0.00328826904296875,
-0.007190704345703125,
0.0203704833984375,
-0.034912109375,
-0.053924560546875,
-0.00799560546875,
0.0362548828125,
0.0882568359375,
-0.0120697021484375,
0.027923583984375,
-0.032501220703125,
0.0211334228515625,
0.0023670196533203125,
0.014892578125,
-0.0360107421875,
0.0260772705078125,
-0.03338623046875,
0.0195465087890625,
0.01085662841796875,
0.035400390625,
0.036468505859375,
0.03643798828125,
0.0020313262939453125,
-0.006946563720703125,
0.0162811279296875,
0.0200347900390625,
-0.027069091796875,
0.01154327392578125,
-0.046112060546875,
0.01448822021484375,
0.0006775856018066406,
0.00360107421875,
-0.01273345947265625,
-0.0262908935546875,
0.0574951171875,
0.0247344970703125,
0.048095703125,
0.0078887939453125,
-0.00962066650390625,
0.024169921875,
-0.002559661865234375,
0.036773681640625,
0.032989501953125,
-0.025604248046875,
-0.0023784637451171875,
-0.0090179443359375,
-0.048309326171875,
-0.005382537841796875,
0.03558349609375,
0.0021724700927734375,
0.005870819091796875,
-0.003124237060546875,
0.01050567626953125,
0.0205230712890625,
-0.0352783203125,
-0.007320404052734375,
-0.004947662353515625,
0.0171356201171875,
-0.0010833740234375,
-0.08526611328125,
-0.045257568359375,
-0.039398193359375,
0.042327880859375,
0.00644683837890625,
0.1199951171875,
-0.039520263671875,
0.0249786376953125,
-0.0251007080078125,
0.04278564453125,
-0.036529541015625,
-0.004547119140625,
0.01371002197265625,
0.01493072509765625,
0.022491455078125,
-0.0141448974609375,
-0.0017604827880859375,
-0.0254058837890625,
0.035003662109375,
-0.0701904296875,
-0.04278564453125,
-0.004100799560546875,
0.03741455078125,
-0.00725555419921875,
-0.0167694091796875,
-0.045074462890625,
-0.0406494140625,
-0.044891357421875,
-0.0218505859375,
0.005157470703125,
-0.01497650146484375,
-0.0082855224609375,
0.0760498046875,
0.0220794677734375,
0.00501251220703125,
0.00885772705078125,
-0.05657958984375,
0.041046142578125,
0.04571533203125,
-0.033843994140625,
-0.04278564453125,
-0.00521087646484375,
-0.025848388671875,
0.01329803466796875,
-0.00896453857421875,
0.048187255859375,
-0.002536773681640625,
-0.00920867919921875,
0.0020122528076171875,
0.012481689453125,
0.03448486328125,
-0.013916015625,
0.01319122314453125,
-0.0019330978393554688,
-0.00395965576171875,
0.0046844482421875,
0.0084228515625,
-0.0146636962890625,
-0.03289794921875,
0.003124237060546875,
0.01947021484375,
-0.00009018182754516602,
-0.0186920166015625,
-0.042572021484375,
0.02557373046875,
0.020233154296875,
0.005344390869140625,
-0.07635498046875,
0.039520263671875,
-0.016845703125,
0.05584716796875,
-0.0178070068359375,
0.00675201416015625,
-0.0079803466796875,
0.01776123046875,
-0.025115966796875,
-0.018402099609375,
-0.03021240234375,
0.0218658447265625,
-0.0250396728515625,
0.01390838623046875,
0.057403564453125,
-0.0299835205078125,
-0.06365966796875,
-0.0018444061279296875,
0.025848388671875,
0.036346435546875,
0.01151275634765625,
-0.0282440185546875,
-0.009490966796875,
0.0020427703857421875,
-0.01073455810546875,
-0.041412353515625,
-0.0016193389892578125,
-0.050872802734375,
-0.01174163818359375,
0.004657745361328125,
-0.010528564453125,
0.01556396484375,
-0.017181396484375,
-0.0284423828125,
0.05303955078125,
0.005916595458984375,
-0.0219573974609375,
-0.041595458984375,
0.0155181884765625,
-0.00760650634765625,
0.005382537841796875,
-0.00655364990234375,
-0.01142120361328125,
-0.034637451171875,
0.0247955322265625,
0.01165771484375,
0.038055419921875,
0.007022857666015625,
0.0256805419921875,
-0.004375457763671875,
0.01605224609375,
0.0037975311279296875,
-0.02154541015625,
0.0428466796875,
-0.035797119140625,
0.0341796875,
0.0227203369140625,
-0.061370849609375,
-0.044158935546875,
-0.0212554931640625,
-0.0007729530334472656,
-0.0183563232421875,
-0.07281494140625,
-0.0219268798828125,
-0.0209197998046875,
0.07098388671875,
0.037200927734375,
0.00893402099609375,
-0.0350341796875,
0.0164031982421875,
-0.02691650390625,
-0.0443115234375,
0.015289306640625,
0.0269012451171875,
-0.034912109375,
0.00879669189453125,
0.02581787109375,
0.01910400390625,
-0.03167724609375,
-0.01155853271484375,
-0.0003657341003417969,
-0.0209197998046875,
0.02520751953125,
0.00691986083984375,
-0.01287841796875,
0.05438232421875,
0.025238037109375,
-0.04095458984375,
-0.01009368896484375,
-0.014617919921875,
-0.0085906982421875,
-0.00714111328125,
-0.036529541015625,
0.002044677734375,
0.03759765625,
-0.0538330078125,
0.0261993408203125,
-0.0157318115234375,
0.03411865234375,
-0.0694580078125,
-0.00830078125,
-0.01251220703125,
0.010009765625,
-0.01543426513671875,
-0.029083251953125,
-0.0223541259765625,
0.063232421875,
-0.0018281936645507812,
0.0960693359375,
0.0008130073547363281,
0.01224517822265625,
-0.0242156982421875,
0.0362548828125,
-0.01276397705078125,
-0.0023860931396484375,
0.0076446533203125,
-0.0005979537963867188,
-0.0010728836059570312,
-0.0263519287109375,
-0.0095977783203125,
-0.034576416015625,
-0.01329803466796875,
0.00241851806640625,
-0.02337646484375,
0.022857666015625
] |
e7ee33ed9ed2bd11b0d49b443609f08057846459
|
Wordpress Stackexchange
Q: Retrieve featured image We are building an Android app based on a Wordpress mysql database. We were able to get most of the information from the datase to display on to the app. Now all we have left is to retrieve the posts featured image.
Is there a way to have the featured image output a URL?
Thanks!
A: The post thumbnail is a stored in the {$wpdb->prefix}_postmeta table with the key _thumbnail_id.
Something like this:
SELECT * from {$wpdb->prefix}_posts
WHERE ID in (
SELECT meta_value FROM {$wpdb->prefix}_postmeta
WHERE meta_key = '_thumbnail_id'
AND post_id = ':ID'
);
Replace :ID with the post id.
That will return the Post associated with the image itself -- the post_title will be whatever the user associated with the title attribute on the image, and the guid will be the full sized image URL.
If you want different sizes, you'll have to look up the _wp_attachment_metadata postmeta value which will contain a serialized array with all the different sizes.
Using WordPress' api is much easier:
<?php
if(has_post_thumbnail($some_post_id))
{
$img = wp_get_attachment_img_src(get_post_thumbnail_id($some_post_id), 'the_image_size');
// returns an array, the first item is the image URL
echo $img[0];
}
|
Q: Retrieve featured image We are building an Android app based on a Wordpress mysql database. We were able to get most of the information from the datase to display on to the app. Now all we have left is to retrieve the posts featured image.
Is there a way to have the featured image output a URL?
Thanks!
A: The post thumbnail is a stored in the {$wpdb->prefix}_postmeta table with the key _thumbnail_id.
Something like this:
SELECT * from {$wpdb->prefix}_posts
WHERE ID in (
SELECT meta_value FROM {$wpdb->prefix}_postmeta
WHERE meta_key = '_thumbnail_id'
AND post_id = ':ID'
);
Replace :ID with the post id.
That will return the Post associated with the image itself -- the post_title will be whatever the user associated with the title attribute on the image, and the guid will be the full sized image URL.
If you want different sizes, you'll have to look up the _wp_attachment_metadata postmeta value which will contain a serialized array with all the different sizes.
Using WordPress' api is much easier:
<?php
if(has_post_thumbnail($some_post_id))
{
$img = wp_get_attachment_img_src(get_post_thumbnail_id($some_post_id), 'the_image_size');
// returns an array, the first item is the image URL
echo $img[0];
}
A: The post's featured image is a regular old attachment to the post. So, as with any other image attachment, you'll need to query the wp_posts table for a post type of attachment. The trick is to first get the attachment ID that you need to grab.
This is contained in the given post's meta information, specifically the _thumbnail_id meta.
So, you'll need a query that:
*
*Retrieves the value marked by the key _thumbnail_id in the wp_postmeta table based on a given post ID.
*Retrieves the attachment from the wp_posts table based on the ID retrieved in step #1
*Generates an attachment permalink based on the information retrieved in step #2
Really, though, you're doing a lot of work to reinvent the wheel here ...
A: Here's what I used to retrieve post data, featured image URL and feature image details (such as dimensions):
SELECT p.*, ( SELECT guid FROM wp_posts WHERE id = m.meta_value ) AS imgurl, (SELECT meta_value FROM wp_postmeta pm WHERE meta_key='_wp_attachment_metadata' AND pm.post_id=m.meta_value ) AS imgdetails
FROM wp_posts p
LEFT JOIN wp_postmeta m ON(p.id = m.post_id AND m.meta_key = '_thumbnail_id' )
WHERE p.post_type = 'post'
AND p.post_status = 'publish' AND p.id=@postId;
A: The featured image attachment id is stored in the post_meta table, with the meta_key _thumbnail_id.
Use that post id to find the post meta with meta_key _wp_attachment_metadata.
The value of that is a serialized array with keys thumb, file, width, height, sizes (an array), and image_meta (an array).
The file value is relative to the uploads directory for the WP install, and points to the original full-sized image. You should be able to calculate the URL from that.
sizes has an image size as its key (e.g., 'small', 'medium', 'large', 'thumbnail'), and the value is an array with keys file, height, and width.
image_meta will contain things like exif/iptc image metadata from the image itself.
A: Use next query to retrieve the featured images of all posts:
SELECT result.post_parent, result.guid AS featuredImage
FROM wp_posts AS p
INNER JOIN wp_postmeta AS pm ON p.ID=pm.post_id
INNER JOIN wp_posts as result ON pm.meta_value = result.ID
WHERE pm.meta_key = '_thumbnail_id' AND p.post_type='post' AND
p.post_status = 'publish'
A: The best SQL solution,
Search the ID from wp_post
SELECT * FROM wp_posts WHERE post_status='publish'
Found the meta content
SELECT * FROM wp_postmeta WHERE meta_key='_thumbnail_id' AND post_id=MyID
With the thumbnail ID, search one more time into wp_postmeta the file
SELECT * FROM wp_postmeta WHERE meta_key='_wp_attached_file' AND post_id=MyID
Here one example.
$query = mysql_query("SELECT * FROM wp_posts WHERE post_status='publish' ORDER BY id DESC LIMIT 6") or die(mysql_error());
$json='{ "Blog" : [ ';
while($row =mysql_fetch_array($query)){
$queryMeta=mysql_query("SELECT * FROM wp_postmeta WHERE meta_key='_thumbnail_id' AND post_id=$row[ID]") or die(mysql_error());
$f=mysql_fetch_array($queryMeta);
$value=$f[meta_value];
$queryMeta2=mysql_query("SELECT * FROM wp_postmeta WHERE meta_key='_wp_attached_file' AND post_id=$value") or die(mysql_error());
$f2=mysql_fetch_array($queryMeta2);
$value=$f2[meta_value];
$json.='{"id" : "'.$row[ID].'" , "date" : "'.$row[post_date].'", "title" :"'.$row[post_title].'", "link" : "'.$row[guid].'" , "image" :"https://dartesanos.com/blog/wp-content/uploads/'.$value.'" },';
}
$json=substr($json,0,-1);
echo $json ."]}";
|
wordpress
|
{
"language": "en",
"length": 670,
"provenance": "stackexchange_00019.jsonl.gz:421581",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57669"
}
|
[
0.0189666748046875,
-0.0239410400390625,
0.02789306640625,
0.006916046142578125,
-0.0021724700927734375,
-0.00604248046875,
0.0517578125,
-0.033966064453125,
0.0262908935546875,
0.0273590087890625,
0.009552001953125,
0.0009369850158691406,
-0.037750244140625,
-0.015869140625,
-0.03961181640625,
-0.022552490234375,
0.05682373046875,
-0.011810302734375,
0.051116943359375,
0.0249176025390625,
-0.004924774169921875,
0.06378173828125,
0.01232147216796875,
0.041107177734375,
0.02197265625,
-0.0168609619140625,
0.06048583984375,
-0.0108795166015625,
-0.00473785400390625,
-0.00893402099609375,
0.017791748046875,
0.0012989044189453125,
0.0007328987121582031,
0.018310546875,
0.0054779052734375,
-0.0008797645568847656,
0.0254669189453125,
0.0026874542236328125,
0.0007815361022949219,
0.0276336669921875,
0.0003287792205810547,
0.01751708984375,
0.0054168701171875,
-0.023773193359375,
-0.0230560302734375,
-0.026031494140625,
0.00778961181640625,
-0.0352783203125,
0.01776123046875,
0.0384521484375,
0.0168914794921875,
0.037841796875,
0.027313232421875,
-0.021514892578125,
-0.0017671585083007812,
0.0019140243530273438,
-0.038055419921875,
0.034637451171875,
0.04132080078125,
-0.019012451171875,
-0.036773681640625,
-0.017822265625,
0.022216796875,
-0.01238250732421875,
0.004245758056640625,
0.00365447998046875,
0.0277862548828125,
0.014129638671875,
0.00016868114471435547,
-0.01354217529296875,
-0.00922393798828125,
0.0006284713745117188,
-0.0127105712890625,
-0.0080413818359375,
-0.00783538818359375,
0.0260009765625,
-0.0025482177734375,
-0.01468658447265625,
0.003948211669921875,
0.0018186569213867188,
0.0289154052734375,
-0.0367431640625,
-0.0161590576171875,
0.0195159912109375,
0.00991058349609375,
0.046844482421875,
0.00588226318359375,
-0.0204315185546875,
-0.034576416015625,
-0.019866943359375,
-0.0204010009765625,
-0.042388916015625,
-0.045867919921875,
0.03533935546875,
0.006481170654296875,
-0.0213623046875,
0.026214599609375,
0.018310546875,
-0.0006589889526367188,
0.022247314453125,
0.0196075439453125,
-0.0501708984375,
0.0361328125,
-0.035552978515625,
0.00730133056640625,
0.01294708251953125,
-0.0176849365234375,
-0.033447265625,
0.0234222412109375,
0.0297393798828125,
0.003173828125,
0.00745391845703125,
-0.002559661865234375,
0.015350341796875,
-0.0291748046875,
-0.002346038818359375,
-0.04620361328125,
-0.0169830322265625,
-0.0311126708984375,
-0.01096343994140625,
0.00873565673828125,
0.005588531494140625,
0.047698974609375,
-0.0294342041015625,
0.009765625,
-0.0005168914794921875,
-0.0440673828125,
-0.029266357421875,
-0.016815185546875,
0.0286865234375,
-0.01126861572265625,
0.0299224853515625,
0.022552490234375,
-0.019561767578125,
-0.040557861328125,
-0.017486572265625,
-0.01067352294921875,
-0.00927734375,
-0.00664520263671875,
0.0125579833984375,
-0.0182647705078125,
-0.0035247802734375,
0.052276611328125,
-0.040740966796875,
0.00865936279296875,
0.000614166259765625,
0.0114593505859375,
0.03375244140625,
-0.01291656494140625,
-0.03717041015625,
0.0380859375,
-0.0211944580078125,
-0.0001379251480102539,
0.0212860107421875,
0.02313232421875,
-0.00614166259765625,
0.046875,
-0.0272979736328125,
0.0093994140625,
-0.038604736328125,
0.0283203125,
0.00006335973739624023,
-0.005405426025390625,
0.013763427734375,
0.00296783447265625,
0.0031299591064453125,
-0.01342010498046875,
0.0046844482421875,
0.0203704833984375,
0.051055908203125,
-0.006862640380859375,
-0.0216522216796875,
0.0208587646484375,
-0.00009804964065551758,
-0.0299530029296875,
0.0039005279541015625,
0.01538848876953125,
-0.02069091796875,
0.027984619140625,
0.048370361328125,
-0.01088714599609375,
-0.015625,
0.048126220703125,
-0.030975341796875,
-0.005199432373046875,
0.022796630859375,
0.01309967041015625,
0.02642822265625,
-0.001346588134765625,
0.022308349609375,
-0.0027790069580078125,
0.0211944580078125,
-0.06744384765625,
0.039154052734375,
-0.0177154541015625,
-0.004779815673828125,
-0.0251922607421875,
-0.00632476806640625,
-0.022430419921875,
0.006877899169921875,
0.05908203125,
0.018341064453125,
0.0247955322265625,
0.01181793212890625,
-0.01285552978515625,
0.028839111328125,
0.0023174285888671875,
0.0147705078125,
-0.0219573974609375,
0.058074951171875,
0.0197296142578125,
0.038818359375,
-0.0430908203125,
0.0083465576171875,
0.02142333984375,
0.002193450927734375,
-0.01216888427734375,
-0.01102447509765625,
-0.0142974853515625,
0.055145263671875,
-0.052215576171875,
0.0267181396484375,
-0.05853271484375,
-0.00738525390625,
0.070068359375,
0.0214691162109375,
-0.0229339599609375,
-0.020294189453125,
0.0447998046875,
0.0274810791015625,
-0.07684326171875,
0.0227813720703125,
-0.0168609619140625,
-0.01499176025390625,
-0.01128387451171875,
-0.000988006591796875,
0.0287628173828125,
-0.08380126953125,
0.0282745361328125,
0.056121826171875,
0.040771484375,
0.039764404296875,
0.00527191162109375,
0.003753662109375,
0.07574462890625,
0.007282257080078125,
0.0252838134765625,
-0.026702880859375,
-0.019317626953125,
-0.00701141357421875,
0.0087890625,
-0.0134429931640625,
0.02734375,
-0.0540771484375,
-0.0050506591796875,
0.041229248046875,
-0.008209228515625,
0.0249786376953125,
-0.0301666259765625,
0.04510498046875,
-0.020538330078125,
0.07525634765625,
0.045135498046875,
-0.003696441650390625,
-0.006198883056640625,
0.040283203125,
0.028076171875,
0.03326416015625,
-0.03564453125,
0.016998291015625,
0.01898193359375,
0.04730224609375,
-0.00594329833984375,
0.0328369140625,
0.02777099609375,
-0.0302276611328125,
0.005687713623046875,
-0.00720977783203125,
-0.034912109375,
-0.01149749755859375,
-0.00640869140625,
0.0015735626220703125,
-0.033782958984375,
0.0092926025390625,
-0.0223388671875,
-0.0516357421875,
0.018157958984375,
0.055908203125,
0.01457977294921875,
0.05010986328125,
0.0360107421875,
0.075439453125,
0.0236663818359375,
0.047698974609375,
-0.02587890625,
0.04132080078125,
0.0174407958984375,
-0.03448486328125,
0.024383544921875,
-0.02459716796875,
0.065673828125,
0.060302734375,
-0.031341552734375,
0.034576416015625,
-0.016815185546875,
-0.0260162353515625,
-0.0255584716796875,
0.0125885009765625,
-0.027313232421875,
-0.0286712646484375,
-0.06256103515625,
0.019317626953125,
0.01922607421875,
0.0653076171875,
-0.0178985595703125,
-0.043060302734375,
0.005458831787109375,
0.037261962890625,
-0.08782958984375,
-0.08642578125,
-0.004241943359375,
-0.0517578125,
-0.01538848876953125,
0.007495880126953125,
-0.0411376953125,
0.005584716796875,
0.0276336669921875,
0.003978729248046875,
0.0021800994873046875,
0.004673004150390625,
-0.056549072265625,
-0.01096343994140625,
-0.0699462890625,
0.0217437744140625,
-0.01326751708984375,
0.037078857421875,
0.0011577606201171875,
-0.00246429443359375,
-0.00246429443359375,
-0.0271759033203125,
0.00531768798828125,
0.06488037109375,
-0.0014629364013671875,
-0.03271484375,
-0.0212860107421875,
0.023406982421875,
-0.05828857421875,
0.016815185546875,
0.00370025634765625,
0.000415802001953125,
-0.0178985595703125,
0.01177978515625,
-0.0036106109619140625,
-0.0196533203125,
0.015899658203125,
0.0236968994140625,
-0.00151824951171875,
0.03076171875,
0.062469482421875,
-0.0311737060546875,
-0.0157928466796875,
-0.05120849609375,
-0.07177734375,
-0.0006275177001953125,
0.05474853515625,
0.0255126953125,
-0.02008056640625,
-0.0085296630859375,
0.0177764892578125,
-0.00930023193359375,
0.0108489990234375,
-0.040557861328125,
0.06427001953125,
0.0156707763671875,
0.0303802490234375,
-0.0491943359375,
-0.00739288330078125,
-0.0162200927734375,
0.0270233154296875,
0.0014400482177734375,
0.039794921875,
-0.00395965576171875,
0.00043702125549316406,
-0.049896240234375,
-0.009796142578125,
0.039276123046875,
-0.0099639892578125,
0.022491455078125,
-0.00637054443359375,
-0.024078369140625,
-0.006610870361328125,
0.052947998046875,
-0.01157379150390625,
-0.0208282470703125,
-0.0289154052734375,
-0.0098114013671875,
-0.01995849609375,
-0.006122589111328125,
-0.05401611328125,
0.01042938232421875,
-0.06390380859375,
-0.0236053466796875,
-0.004734039306640625,
-0.032745361328125,
-0.01690673828125,
0.016754150390625,
-0.05364990234375,
-0.037811279296875,
0.020263671875,
0.0205230712890625,
0.017547607421875,
0.0283660888671875,
-0.00339508056640625,
0.040008544921875,
-0.0254974365234375,
-0.02001953125,
-0.075439453125,
-0.0224761962890625,
0.0309906005859375,
0.061859130859375,
-0.0260772705078125,
-0.0011577606201171875,
-0.033538818359375,
0.055206298828125,
-0.0157928466796875,
0.016357421875,
0.0057830810546875,
0.020263671875,
-0.011627197265625,
0.0180511474609375,
0.0147857666015625,
-0.0196533203125,
-0.021331787109375,
-0.06201171875,
-0.044036865234375,
-0.050079345703125,
-0.025482177734375,
0.01215362548828125,
0.004314422607421875,
0.008697509765625,
-0.00917816162109375,
-0.0048675537109375,
0.0489501953125,
0.046600341796875,
0.02642822265625,
-0.00601959228515625,
-0.02764892578125,
-0.0160369873046875,
0.035919189453125,
0.0226593017578125,
-0.00734710693359375,
0.00955963134765625,
0.048736572265625,
0.0068206787109375,
-0.029449462890625,
-0.0880126953125,
0.003337860107421875,
0.05609130859375,
0.0278472900390625,
0.033111572265625,
0.052886962890625,
-0.022674560546875,
-0.0038776397705078125,
0.068603515625,
-0.005268096923828125,
0.015838623046875,
0.033935546875,
0.0170745849609375,
-0.0033054351806640625,
0.0031414031982421875,
0.007343292236328125,
-0.01873779296875,
0.046539306640625,
-0.018890380859375,
-0.0131683349609375,
-0.0167083740234375,
0.00997161865234375,
-0.03729248046875,
0.038177490234375,
-0.004802703857421875,
-0.018829345703125,
0.0032501220703125,
0.0103759765625,
0.04998779296875,
0.0156707763671875,
-0.003765106201171875,
0.0101165771484375,
0.027435302734375,
0.00978851318359375,
0.00984954833984375,
-0.015960693359375,
0.01220703125,
0.043701171875,
-0.037811279296875,
0.0078277587890625,
0.00402069091796875,
0.01158905029296875,
-0.026031494140625,
-0.023651123046875,
-0.0303192138671875,
-0.06689453125,
-0.0115509033203125,
0.02081298828125,
-0.0025310516357421875,
-0.025390625,
0.05108642578125,
0.054534912109375,
-0.01348114013671875,
-0.035888671875,
-0.046630859375,
0.00994110107421875,
-0.060577392578125,
0.017425537109375,
0.0006809234619140625,
0.0100860595703125,
0.0190582275390625,
0.0758056640625,
-0.052886962890625,
0.06915283203125,
-0.00753021240234375,
0.0293426513671875,
0.0001926422119140625,
0.0462646484375,
0.005115509033203125,
0.016754150390625,
-0.036041259765625,
0.053741455078125,
-0.005367279052734375,
-0.01287078857421875,
0.01543426513671875,
0.0161590576171875,
0.0173797607421875,
-0.03955078125,
-0.033966064453125,
0.05181884765625,
-0.01355743408203125,
-0.0003116130828857422,
0.018310546875,
-0.02813720703125,
-0.04345703125,
0.0011014938354492188,
0.002899169921875,
0.0335693359375,
-0.0264434814453125,
-0.0330810546875,
0.02197265625,
0.00241851806640625,
0.036712646484375,
-0.037353515625,
-0.0259246826171875,
0.034698486328125,
0.040863037109375,
-0.016632080078125,
-0.0153656005859375,
-0.030426025390625,
0.05279541015625,
0.006977081298828125,
-0.020294189453125,
-0.0290679931640625,
0.0241851806640625,
-0.0270538330078125,
0.00827789306640625,
-0.015777587890625,
0.0005640983581542969,
-0.0423583984375,
0.00542449951171875,
0.051239013671875,
0.040740966796875,
-0.040313720703125,
-0.0107269287109375,
-0.01485443115234375,
0.002445220947265625,
0.10479736328125,
0.0201416015625,
-0.01531219482421875,
-0.04351806640625,
0.0161285400390625,
0.0357666015625,
-0.0016460418701171875,
-0.0007863044738769531,
0.0009303092956542969,
0.010955810546875,
0.006305694580078125,
0.0682373046875,
-0.00952911376953125,
0.01142120361328125,
0.002521514892578125,
0.033233642578125,
0.0005364418029785156,
-0.0038661956787109375,
-0.00722503662109375,
-0.0205230712890625,
-0.0438232421875,
-0.053558349609375,
0.03515625,
0.041015625,
0.020416259765625,
-0.0016002655029296875,
-0.020416259765625,
0.0345458984375,
-0.0045166015625,
-0.0084686279296875,
-0.0101776123046875,
-0.039520263671875,
0.02520751953125,
-0.0137176513671875,
-0.0029811859130859375,
-0.0222015380859375,
-0.056732177734375,
-0.045501708984375,
0.00849151611328125,
0.025787353515625,
0.00469970703125,
-0.042449951171875,
-0.0355224609375,
0.0498046875,
-0.0031719207763671875,
0.0268402099609375,
0.11541748046875,
0.0242767333984375,
0.07159423828125,
0.027587890625,
0.007732391357421875,
0.0184478759765625,
0.0255126953125,
-0.0445556640625,
-0.036651611328125,
0.0222015380859375,
0.015045166015625,
-0.007709503173828125,
0.026092529296875,
-0.006988525390625,
0.0164031982421875,
-0.046234130859375,
0.0202178955078125,
0.039276123046875,
0.0207977294921875,
0.007587432861328125,
-0.034820556640625,
0.02716064453125,
0.0218505859375,
0.004810333251953125,
-0.01229095458984375,
0.0094146728515625,
-0.018707275390625,
-0.017242431640625,
-0.0193023681640625,
-0.0202484130859375,
-0.0144195556640625,
0.00521087646484375,
0.01064300537109375,
0.006954193115234375,
-0.06365966796875,
-0.0251007080078125,
0.046295166015625,
-0.047027587890625,
-0.01422119140625,
0.0311431884765625,
-0.029541015625,
0.0100860595703125,
-0.0275115966796875,
0.0058441162109375,
-0.01346588134765625,
0.01091766357421875,
0.016357421875,
0.0291900634765625,
0.0253448486328125,
0.043487548828125,
0.0026760101318359375,
0.0230560302734375,
0.01739501953125,
-0.007465362548828125,
0.031646728515625,
0.0004017353057861328,
-0.00543975830078125,
0.01513671875,
-0.028961181640625,
-0.00457763671875,
-0.0296783447265625,
0.02783203125,
-0.01142120361328125,
0.00670623779296875,
0.0838623046875,
-0.03570556640625,
-0.0206298828125,
0.0195465087890625,
0.034271240234375,
-0.01068115234375,
-0.0377197265625,
0.04736328125,
-0.037933349609375,
0.0195770263671875,
-0.0216064453125,
0.0212860107421875,
-0.009979248046875,
-0.07080078125,
-0.03106689453125,
0.035919189453125,
-0.031890869140625,
0.007106781005859375,
0.0034694671630859375,
0.0107269287109375,
0.0247802734375,
0.01023101806640625,
0.0027217864990234375,
0.0183258056640625,
-0.038818359375,
0.005222320556640625,
-0.004596710205078125,
0.0199737548828125,
-0.0055084228515625,
0.00730133056640625,
0.06842041015625,
0.0202178955078125,
-0.0863037109375,
-0.022064208984375,
0.058746337890625,
0.03515625,
0.0193328857421875,
0.0657958984375,
-0.01270294189453125,
0.01189422607421875,
0.049468994140625,
-0.04071044921875,
0.0166015625,
0.00421142578125,
-0.017852783203125,
0.00981903076171875,
0.0291290283203125,
0.05694580078125,
0.0318603515625,
0.0124969482421875,
-0.033233642578125,
0.0200347900390625,
0.057586669921875,
-0.0791015625,
0.03466796875,
0.024169921875,
0.0511474609375,
-0.02154541015625,
-0.0188140869140625,
0.00128936767578125,
0.0545654296875,
0.00881195068359375,
0.034515380859375,
0.0157928466796875,
0.006778717041015625,
0.053131103515625,
0.0044403076171875,
0.014739990234375,
0.036712646484375,
-0.0081634521484375,
0.049835205078125,
0.041748046875,
0.032989501953125,
-0.0305328369140625,
0.002124786376953125,
0.064453125,
0.07452392578125,
-0.04998779296875,
-0.03662109375,
0.017181396484375,
0.029815673828125,
0.01136016845703125,
0.0110015869140625,
0.0237579345703125,
-0.0233612060546875,
0.03985595703125,
-0.034149169921875,
0.0240631103515625,
0.060302734375,
0.045806884765625,
0.00461578369140625,
-0.0158843994140625,
-0.088623046875,
0.0010509490966796875,
-0.0137176513671875,
0.01000213623046875,
0.01385498046875,
0.0018663406372070312,
-0.002506256103515625,
0.0297698974609375,
0.0250396728515625,
0.0224609375,
-0.0257568359375,
0.039398193359375,
-0.00017952919006347656,
0.04241943359375,
-0.026641845703125,
-0.0211029052734375,
0.00749969482421875,
0.03179931640625,
0.0264739990234375,
-0.0310211181640625,
0.033660888671875,
0.00769805908203125,
-0.08538818359375,
-0.0172119140625,
0.017486572265625,
-0.0263519287109375,
-0.007415771484375,
-0.03619384765625,
0.006378173828125,
0.019989013671875,
-0.00592041015625,
0.00817108154296875,
-0.01056671142578125,
0.03326416015625,
-0.037200927734375,
0.0689697265625,
-0.0264129638671875,
0.007625579833984375,
0.03125,
-0.03973388671875,
0.032135009765625,
-0.041839599609375,
-0.09332275390625,
-0.01541900634765625,
-0.038116455078125,
-0.03759765625,
0.028472900390625,
0.034820556640625,
-0.0166015625,
0.018402099609375,
-0.00495147705078125,
-0.00673675537109375,
0.0120849609375,
-0.01342010498046875,
-0.007556915283203125,
-0.016754150390625,
0.03173828125,
-0.01045989990234375,
-0.044189453125,
-0.032318115234375,
-0.005184173583984375,
0.031402587890625,
0.00872802734375,
0.0286865234375,
-0.0004565715789794922,
0.025848388671875,
-0.03558349609375,
-0.01302337646484375,
-0.0384521484375,
-0.018798828125,
0.01029205322265625,
-0.0189208984375,
-0.0270538330078125,
0.0052032470703125,
-0.0259552001953125,
-0.033294677734375,
0.04791259765625,
-0.024932861328125,
-0.048675537109375,
-0.01410675048828125,
0.0426025390625,
0.021331787109375,
0.0192718505859375,
-0.039306640625,
-0.021820068359375,
-0.050750732421875,
-0.0455322265625,
0.0194244384765625,
0.003726959228515625,
0.051910400390625,
-0.0006561279296875,
0.0147857666015625,
-0.0197906494140625,
0.04864501953125,
-0.0225830078125,
0.08258056640625,
0.050262451171875,
-0.051055908203125,
-0.0300140380859375,
-0.01320648193359375,
-0.01168060302734375,
-0.032989501953125,
0.0179290771484375,
0.0265655517578125,
-0.01416015625,
0.030303955078125,
0.0139923095703125,
0.0123443603515625,
0.0248260498046875,
-0.0195159912109375,
0.0021839141845703125,
0.0186614990234375,
0.007297515869140625,
-0.03759765625,
0.01904296875,
0.004302978515625,
-0.036834716796875,
-0.02728271484375,
-0.00469207763671875,
-0.0172271728515625,
-0.0254364013671875,
-0.006549835205078125,
-0.021942138671875,
0.015716552734375,
0.0250244140625,
-0.055572509765625,
0.03289794921875,
0.02099609375,
0.0035953521728515625,
-0.0008249282836914062,
-0.0105133056640625,
-0.016143798828125,
0.0247955322265625,
-0.03375244140625,
-0.045654296875,
-0.047637939453125,
0.01708984375,
-0.045867919921875,
0.032470703125,
0.032135009765625,
-0.02691650390625,
-0.01538848876953125,
0.0509033203125,
0.02471923828125,
0.104736328125,
-0.0419921875,
-0.042205810546875,
-0.0246429443359375,
0.0041656494140625,
-0.0153961181640625,
-0.0400390625,
0.032196044921875,
-0.07806396484375,
-0.01319122314453125,
-0.036468505859375,
0.01227569580078125,
0.006916046142578125,
-0.038726806640625,
-0.056182861328125,
0.041473388671875,
-0.0202789306640625,
-0.0322265625,
-0.032684326171875,
0.002536773681640625,
0.01873779296875,
-0.002933502197265625,
-0.0135498046875,
0.002552032470703125,
-0.04754638671875,
0.005901336669921875,
0.0216827392578125,
-0.04827880859375,
0.0726318359375,
-0.01012420654296875,
-0.056640625,
0.0024509429931640625,
0.0005574226379394531,
-0.0083465576171875,
-0.010894775390625,
0.0165863037109375,
0.01641845703125,
0.0207366943359375,
-0.0218963623046875,
-0.0196685791015625,
-0.006061553955078125,
-0.02398681640625,
-0.0360107421875,
-0.01491546630859375,
-0.019195556640625,
0.0011167526245117188,
0.07452392578125,
0.07183837890625,
0.01483917236328125,
-0.041656494140625,
0.0088958740234375,
-0.007659912109375,
-0.039215087890625,
-0.031768798828125,
0.035003662109375,
-0.090576171875,
-0.0333251953125,
0.0161590576171875,
-0.01763916015625,
0.00024962425231933594,
-0.006031036376953125,
-0.045166015625,
-0.00724029541015625,
-0.031097412109375,
0.005672454833984375,
-0.08258056640625,
0.04376220703125,
0.03155517578125,
-0.028594970703125,
0.0208892822265625,
-0.040740966796875,
0.0014200210571289062,
0.0423583984375,
-0.05657958984375,
0.0029621124267578125,
0.026123046875,
-0.002910614013671875,
-0.0019817352294921875,
0.03369140625,
-0.033905029296875,
0.016632080078125,
0.0103912353515625,
-0.0083465576171875,
0.0323486328125,
0.00028777122497558594,
0.04217529296875,
0.03924560546875,
-0.00949859619140625,
0.01020050048828125,
-0.032012939453125,
-0.00019252300262451172,
-0.01174163818359375,
-0.01427459716796875,
0.027191162109375,
-0.0216522216796875,
-0.0193023681640625,
0.00817108154296875,
-0.032562255859375,
0.00820159912109375,
0.03741455078125,
-0.0296173095703125,
0.0005927085876464844,
-0.019134521484375,
0.0220184326171875,
-0.0141143798828125,
-0.01480865478515625
] |
4ed29dde740d4e9f5077820dccbe6416a97ece52
|
Wordpress Stackexchange
Q: get_posts with meta_compare='LIKE' not working I am using the following code:
$tolettpe = "Sale";//default
if($_REQUEST['tolettype']) $tolettpe = $_REQUEST['tolettype'];
else if($_REQUEST['srch_type']) $tolettpe = $_REQUEST['srch_type'];
$args = array(
'numberposts' => $latestcount,
'category' => $catidstr,
'meta_key' => 'property_type',
'meta_compare' => 'LIKE',
'meta_value' => $tolettpe.'%'
);
$post_content = get_posts($args);
The value in the database is 'Sale||' and there are no query string variables in the request.
But the query returns no results.
If I use the exact value and no meta_compare, it works.
Any ideas how to make this work?
A: meta_compare Possible values are '!=', '>', '>=', '<', or '<='. Default value is '='
if you want to use LIKE you need to create a meta_query eg:
$tolettpe = "Sale";//default
if($_REQUEST['tolettype']) $tolettpe = $_REQUEST['tolettype'];
else if($_REQUEST['srch_type']) $tolettpe = $_REQUEST['srch_type'];
$args = array(
'numberposts' => $latestcount,
'category' => $catidstr,
'meta_query' => array(
array(
'key' => 'property_type',
'value' => $tolettpe,
'compare' => 'LIKE'
)
)
);
$posts = get_posts($args);
The generated query puts the search term between two % signs, so there is no need to add any in the code.
|
Q: get_posts with meta_compare='LIKE' not working I am using the following code:
$tolettpe = "Sale";//default
if($_REQUEST['tolettype']) $tolettpe = $_REQUEST['tolettype'];
else if($_REQUEST['srch_type']) $tolettpe = $_REQUEST['srch_type'];
$args = array(
'numberposts' => $latestcount,
'category' => $catidstr,
'meta_key' => 'property_type',
'meta_compare' => 'LIKE',
'meta_value' => $tolettpe.'%'
);
$post_content = get_posts($args);
The value in the database is 'Sale||' and there are no query string variables in the request.
But the query returns no results.
If I use the exact value and no meta_compare, it works.
Any ideas how to make this work?
A: meta_compare Possible values are '!=', '>', '>=', '<', or '<='. Default value is '='
if you want to use LIKE you need to create a meta_query eg:
$tolettpe = "Sale";//default
if($_REQUEST['tolettype']) $tolettpe = $_REQUEST['tolettype'];
else if($_REQUEST['srch_type']) $tolettpe = $_REQUEST['srch_type'];
$args = array(
'numberposts' => $latestcount,
'category' => $catidstr,
'meta_query' => array(
array(
'key' => 'property_type',
'value' => $tolettpe,
'compare' => 'LIKE'
)
)
);
$posts = get_posts($args);
The generated query puts the search term between two % signs, so there is no need to add any in the code.
|
wordpress
|
{
"language": "en",
"length": 177,
"provenance": "stackexchange_00019.jsonl.gz:421586",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57685"
}
|
[
0.037841796875,
-0.0040435791015625,
0.0075531005859375,
-0.0054931640625,
0.0105438232421875,
-0.029937744140625,
0.035980224609375,
-0.019744873046875,
0.031890869140625,
0.0158843994140625,
-0.0280303955078125,
-0.024200439453125,
-0.0007467269897460938,
-0.03179931640625,
-0.0096588134765625,
-0.010101318359375,
0.017242431640625,
-0.01708984375,
0.00975799560546875,
-0.031585693359375,
0.009063720703125,
-0.0284423828125,
0.028656005859375,
-0.0265350341796875,
0.047637939453125,
-0.07940673828125,
0.05963134765625,
-0.042022705078125,
0.0243072509765625,
-0.0266876220703125,
0.0211029052734375,
0.03668212890625,
0.005771636962890625,
0.01430511474609375,
0.007152557373046875,
0.0051422119140625,
0.058990478515625,
-0.00170135498046875,
0.0252838134765625,
0.0206298828125,
0.0290374755859375,
-0.02996826171875,
-0.027679443359375,
0.0246429443359375,
-0.04534912109375,
-0.0012102127075195312,
0.02532958984375,
0.00910186767578125,
0.01010894775390625,
0.01203155517578125,
-0.007110595703125,
0.0016374588012695312,
0.0026302337646484375,
0.0031070709228515625,
-0.0058135986328125,
-0.01142120361328125,
-0.0137786865234375,
-0.025238037109375,
0.0196990966796875,
-0.01474761962890625,
-0.002788543701171875,
-0.031524658203125,
0.025421142578125,
0.0165863037109375,
-0.0145111083984375,
0.011383056640625,
-0.005985260009765625,
0.01050567626953125,
-0.0101776123046875,
-0.0258941650390625,
0.00540924072265625,
-0.0231170654296875,
0.049346923828125,
-0.00348663330078125,
0.043731689453125,
-0.047271728515625,
-0.0138092041015625,
0.01212310791015625,
0.0164031982421875,
0.024932861328125,
0.01212310791015625,
-0.02587890625,
-0.061676025390625,
0.01934814453125,
-0.0204315185546875,
0.02545166015625,
-0.0005564689636230469,
-0.025360107421875,
-0.03265380859375,
-0.039093017578125,
-0.010528564453125,
-0.03076171875,
-0.0408935546875,
-0.016571044921875,
0.0036411285400390625,
-0.056884765625,
0.00211334228515625,
0.019256591796875,
-0.0256500244140625,
0.0225677490234375,
-0.035125732421875,
-0.02752685546875,
0.021636962890625,
-0.024688720703125,
0.0250244140625,
0.06195068359375,
-0.0211639404296875,
0.006641387939453125,
0.08050537109375,
0.034515380859375,
0.0251312255859375,
0.056610107421875,
-0.0228118896484375,
0.0113067626953125,
-0.036956787109375,
0.01300048828125,
-0.05609130859375,
0.0110015869140625,
-0.015472412109375,
0.046966552734375,
0.0128326416015625,
0.0335693359375,
0.043670654296875,
-0.0355224609375,
0.0106658935546875,
0.0135498046875,
-0.009033203125,
-0.08587646484375,
-0.0384521484375,
0.04302978515625,
-0.036590576171875,
0.009246826171875,
0.063232421875,
0.00428009033203125,
-0.02288818359375,
-0.026641845703125,
0.006710052490234375,
-0.040802001953125,
-0.003269195556640625,
0.01435089111328125,
-0.0157012939453125,
-0.0426025390625,
0.0298004150390625,
0.0258331298828125,
0.0038127899169921875,
0.0286712646484375,
0.008026123046875,
0.0254669189453125,
0.0188751220703125,
-0.054229736328125,
0.0091400146484375,
-0.026123046875,
0.035888671875,
-0.0159759521484375,
-0.060760498046875,
-0.0011348724365234375,
-0.031829833984375,
0.01412200927734375,
-0.027557373046875,
-0.0310516357421875,
0.005184173583984375,
-0.004360198974609375,
0.0258941650390625,
-0.0260162353515625,
-0.052947998046875,
0.028594970703125,
-0.056243896484375,
-0.02825927734375,
0.01611328125,
0.056640625,
0.03240966796875,
0.018524169921875,
0.06512451171875,
0.0020847320556640625,
-0.016937255859375,
-0.04388427734375,
-0.01312255859375,
0.0318603515625,
0.044342041015625,
-0.036376953125,
-0.047760009765625,
-0.0340576171875,
0.09173583984375,
-0.039306640625,
-0.05206298828125,
0.07952880859375,
0.018951416015625,
0.04718017578125,
-0.01739501953125,
-0.0013484954833984375,
0.07342529296875,
0.0528564453125,
-0.035675048828125,
0.0592041015625,
-0.0031147003173828125,
-0.03631591796875,
0.01197052001953125,
-0.0032672882080078125,
-0.0025730133056640625,
-0.0034637451171875,
0.004421234130859375,
0.02490234375,
-0.030487060546875,
0.00409698486328125,
-0.03594970703125,
-0.0019292831420898438,
0.0095367431640625,
0.0305938720703125,
-0.0232391357421875,
0.04681396484375,
0.023040771484375,
0.0021915435791015625,
-0.04791259765625,
0.055206298828125,
0.01021575927734375,
-0.0501708984375,
0.017913818359375,
0.02728271484375,
-0.0018091201782226562,
0.0083770751953125,
-0.007965087890625,
-0.041259765625,
-0.004970550537109375,
0.04962158203125,
0.018035888671875,
0.0266571044921875,
-0.0226593017578125,
0.031768798828125,
0.0164642333984375,
0.04486083984375,
-0.00786590576171875,
-0.0099945068359375,
0.044036865234375,
0.000019609928131103516,
-0.06378173828125,
0.01042938232421875,
-0.00994873046875,
-0.0210418701171875,
-0.022216796875,
0.053070068359375,
0.00817108154296875,
0.030975341796875,
-0.01554107666015625,
0.01480865478515625,
0.02838134765625,
-0.004299163818359375,
0.002292633056640625,
-0.00034689903259277344,
0.01605224609375,
0.035919189453125,
-0.027679443359375,
0.016082763671875,
0.025299072265625,
0.0182342529296875,
0.0125885009765625,
0.026092529296875,
0.00782012939453125,
-0.0068511962890625,
0.002437591552734375,
0.02789306640625,
-0.003719329833984375,
-0.022369384765625,
-0.0215606689453125,
0.0008373260498046875,
0.077392578125,
-0.00072479248046875,
0.0740966796875,
0.044830322265625,
-0.03717041015625,
0.00920867919921875,
-0.0015316009521484375,
0.023590087890625,
-0.007678985595703125,
-0.0222015380859375,
0.00902557373046875,
0.026519775390625,
-0.0596923828125,
0.0322265625,
0.050750732421875,
-0.01485443115234375,
-0.004993438720703125,
0.04052734375,
-0.032501220703125,
-0.01654052734375,
-0.026763916015625,
-0.051116943359375,
-0.01386260986328125,
0.0035533905029296875,
0.039215087890625,
0.016571044921875,
0.035308837890625,
0.003604888916015625,
-0.005283355712890625,
0.00836181640625,
0.03399658203125,
-0.034942626953125,
0.025848388671875,
-0.01617431640625,
0.0248870849609375,
-0.0066375732421875,
0.01904296875,
0.056549072265625,
-0.01068115234375,
0.0296630859375,
0.003383636474609375,
0.0309295654296875,
-0.01210784912109375,
0.054168701171875,
0.01160430908203125,
-0.045196533203125,
-0.0338134765625,
-0.038330078125,
0.036468505859375,
0.0227508544921875,
0.03314208984375,
-0.019500732421875,
0.032012939453125,
0.026092529296875,
-0.1005859375,
-0.1260986328125,
0.047515869140625,
-0.034576416015625,
-0.0085296630859375,
-0.034210205078125,
-0.0282745361328125,
0.0022735595703125,
-0.029052734375,
-0.020355224609375,
0.01531219482421875,
0.0006327629089355469,
-0.09521484375,
-0.03314208984375,
-0.07208251953125,
0.0031986236572265625,
-0.022613525390625,
0.0027027130126953125,
-0.0003514289855957031,
0.04071044921875,
0.00426483154296875,
-0.021514892578125,
0.0253448486328125,
0.0640869140625,
0.018829345703125,
0.01491546630859375,
0.0194091796875,
-0.04058837890625,
0.0419921875,
-0.030517578125,
0.061126708984375,
0.056427001953125,
-0.034881591796875,
0.0006952285766601562,
-0.01013946533203125,
0.01361083984375,
0.0411376953125,
0.01617431640625,
-0.0199737548828125,
0.038909912109375,
0.06396484375,
0.0028533935546875,
-0.03387451171875,
-0.0018663406372070312,
-0.050811767578125,
0.0172271728515625,
0.03460693359375,
0.0027179718017578125,
0.0091094970703125,
0.014190673828125,
-0.00847625732421875,
0.0009088516235351562,
0.01776123046875,
-0.03192138671875,
0.007442474365234375,
0.0022678375244140625,
0.012115478515625,
-0.004993438720703125,
0.0081634521484375,
-0.0136566162109375,
-0.0236053466796875,
-0.004718780517578125,
-0.01464080810546875,
-0.0137939453125,
0.0298919677734375,
0.01751708984375,
-0.0260009765625,
0.0633544921875,
0.0197906494140625,
0.0131072998046875,
-0.036346435546875,
-0.045135498046875,
-0.07098388671875,
0.042449951171875,
-0.0550537109375,
-0.042144775390625,
-0.059417724609375,
-0.0027713775634765625,
-0.039215087890625,
-0.0097198486328125,
0.0192718505859375,
0.01800537109375,
-0.0457763671875,
0.005443572998046875,
-0.0081939697265625,
-0.0231170654296875,
0.005008697509765625,
0.0012998580932617188,
-0.0226287841796875,
-0.0428466796875,
0.047760009765625,
-0.0292510986328125,
0.02325439453125,
0.048370361328125,
0.031402587890625,
-0.003726959228515625,
-0.0241851806640625,
-0.0176544189453125,
-0.04278564453125,
-0.02508544921875,
0.00971221923828125,
0.008697509765625,
-0.023468017578125,
0.014678955078125,
-0.011962890625,
0.0286865234375,
0.0274658203125,
-0.0246429443359375,
-0.00824737548828125,
-0.037994384765625,
-0.0196533203125,
0.0291290283203125,
-0.02557373046875,
-0.01202392578125,
-0.030548095703125,
-0.01552581787109375,
-0.0170135498046875,
0.00745391845703125,
-0.0093994140625,
-0.0004315376281738281,
0.0017566680908203125,
-0.01221466064453125,
-0.06671142578125,
-0.026031494140625,
0.006366729736328125,
0.00782012939453125,
-0.01532745361328125,
-0.0118408203125,
-0.02850341796875,
-0.0440673828125,
0.0411376953125,
0.060699462890625,
-0.026214599609375,
-0.0006575584411621094,
0.0697021484375,
0.024566650390625,
-0.0305023193359375,
-0.021240234375,
-0.0704345703125,
0.0163421630859375,
0.0036258697509765625,
0.0164947509765625,
0.0267791748046875,
-0.01201629638671875,
0.046173095703125,
-0.01346588134765625,
0.0125885009765625,
-0.0119171142578125,
0.020233154296875,
-0.013671875,
-0.0274658203125,
0.018035888671875,
-0.0303497314453125,
0.00879669189453125,
0.021087646484375,
0.0028438568115234375,
-0.019317626953125,
0.0307769775390625,
0.031036376953125,
-0.01104736328125,
-0.007488250732421875,
-0.019500732421875,
0.0086517333984375,
-0.0023593902587890625,
0.036163330078125,
-0.00412750244140625,
0.04864501953125,
-0.0205230712890625,
-0.017608642578125,
-0.0007257461547851562,
-0.002979278564453125,
-0.0205841064453125,
0.06085205078125,
-0.037506103515625,
0.0088653564453125,
0.03857421875,
-0.03094482421875,
-0.053497314453125,
0.01605224609375,
-0.025421142578125,
-0.0056610107421875,
-0.035247802734375,
-0.032073974609375,
0.045623779296875,
0.04705810546875,
0.034454345703125,
-0.0171661376953125,
-0.0009918212890625,
0.018646240234375,
0.01160430908203125,
0.0167236328125,
0.00986480712890625,
0.00984954833984375,
0.0001246929168701172,
-0.01358795166015625,
0.0079193115234375,
-0.01386260986328125,
-0.04241943359375,
0.07342529296875,
-0.041351318359375,
0.03192138671875,
0.0009675025939941406,
0.045806884765625,
0.0438232421875,
0.0222015380859375,
0.0297393798828125,
0.0039043426513671875,
-0.0008950233459472656,
-0.0075531005859375,
-0.01837158203125,
-0.004512786865234375,
0.004100799560546875,
-0.01349639892578125,
0.0035076141357421875,
0.0275115966796875,
0.024749755859375,
0.021331787109375,
-0.0010290145874023438,
-0.045745849609375,
-0.01001739501953125,
0.0196990966796875,
-0.0082550048828125,
-0.040740966796875,
-0.04229736328125,
0.004123687744140625,
0.0210723876953125,
-0.00799560546875,
0.0266265869140625,
-0.03448486328125,
0.02825927734375,
-0.013427734375,
0.00482940673828125,
-0.01605224609375,
-0.00713348388671875,
-0.0023250579833984375,
-0.01491546630859375,
0.0225982666015625,
-0.01450347900390625,
0.034881591796875,
-0.032867431640625,
-0.038177490234375,
0.0693359375,
0.00789642333984375,
0.0465087890625,
-0.058746337890625,
-0.004680633544921875,
-0.00553131103515625,
-0.0099029541015625,
0.0289306640625,
-0.01300048828125,
-0.0018091201782226562,
-0.0325927734375,
-0.0865478515625,
-0.055877685546875,
0.0328369140625,
0.01015472412109375,
-0.0183868408203125,
0.005290985107421875,
-0.0280609130859375,
0.0162506103515625,
-0.018951416015625,
0.0037174224853515625,
-0.030609130859375,
0.0009908676147460938,
-0.0117034912109375,
0.01308441162109375,
-0.007232666015625,
0.06549072265625,
-0.02667236328125,
0.005847930908203125,
-0.01091766357421875,
0.0179595947265625,
-0.032623291015625,
0.0214385986328125,
-0.004375457763671875,
-0.01117706298828125,
-0.021759033203125,
0.019805908203125,
-0.007171630859375,
0.0015954971313476562,
0.0469970703125,
-0.018890380859375,
-0.007598876953125,
0.0122833251953125,
0.0024662017822265625,
-0.007602691650390625,
0.005931854248046875,
0.040802001953125,
0.0189208984375,
0.0303497314453125,
-0.002552032470703125,
0.0038623809814453125,
-0.0325927734375,
-0.02301025390625,
0.0028591156005859375,
-0.01308441162109375,
-0.0223388671875,
0.03204345703125,
-0.018798828125,
0.0181732177734375,
0.0430908203125,
0.038299560546875,
0.04736328125,
-0.028106689453125,
0.0333251953125,
0.056549072265625,
-0.030029296875,
0.03204345703125,
0.048187255859375,
0.0189208984375,
-0.047698974609375,
0.0083160400390625,
-0.0132904052734375,
-0.01202392578125,
0.00583648681640625,
0.04583740234375,
0.055206298828125,
-0.06561279296875,
0.00542449951171875,
0.04974365234375,
-0.0096588134765625,
-0.01983642578125,
0.0218048095703125,
-0.0091094970703125,
-0.0207366943359375,
-0.01186370849609375,
-0.03668212890625,
-0.038299560546875,
-0.026458740234375,
0.0013189315795898438,
0.00849151611328125,
-0.040283203125,
0.03839111328125,
-0.0037822723388671875,
-0.01416015625,
0.00620269775390625,
0.0182952880859375,
-0.024871826171875,
0.0016546249389648438,
0.015655517578125,
-0.01904296875,
-0.018096923828125,
-0.07965087890625,
-0.02880859375,
-0.007579803466796875,
-0.057373046875,
0.02484130859375,
0.004924774169921875,
0.08258056640625,
0.06591796875,
0.0158233642578125,
-0.01210784912109375,
0.0218505859375,
0.031524658203125,
-0.0228424072265625,
-0.029296875,
0.00650787353515625,
0.06488037109375,
-0.00699615478515625,
0.03997802734375,
0.022003173828125,
-0.041778564453125,
-0.00968170166015625,
0.015838623046875,
0.050079345703125,
-0.01262664794921875,
-0.020843505859375,
0.05535888671875,
0.0268096923828125,
-0.023284912109375,
0.044769287109375,
-0.0219879150390625,
-0.0029087066650390625,
-0.01554107666015625,
0.0144805908203125,
-0.07537841796875,
0.00009107589721679688,
0.0033054351806640625,
-0.041351318359375,
0.045135498046875,
-0.0160675048828125,
0.0164031982421875,
0.0220489501953125,
0.0082855224609375,
-0.0113677978515625,
-0.006710052490234375,
-0.037872314453125,
0.0614013671875,
-0.024627685546875,
0.032958984375,
-0.038421630859375,
-0.00605010986328125,
0.01416778564453125,
0.0257568359375,
0.0433349609375,
0.001499176025390625,
-0.06005859375,
-0.01505279541015625,
0.057098388671875,
0.054931640625,
0.0252532958984375,
0.051422119140625,
0.005374908447265625,
0.022857666015625,
0.0584716796875,
-0.052001953125,
0.028533935546875,
0.01247406005859375,
0.00724029541015625,
0.0246124267578125,
0.002498626708984375,
0.001873016357421875,
-0.0175933837890625,
-0.052337646484375,
-0.037139892578125,
-0.0186767578125,
0.01238250732421875,
-0.0101165771484375,
-0.010894775390625,
0.02069091796875,
0.026214599609375,
-0.033935546875,
-0.036102294921875,
-0.026458740234375,
0.028350830078125,
0.01526641845703125,
0.0256195068359375,
0.02618408203125,
0.0027599334716796875,
0.0679931640625,
-0.02203369140625,
0.0095062255859375,
0.0003209114074707031,
0.0131378173828125,
0.0498046875,
0.037078857421875,
0.014404296875,
-0.0330810546875,
0.024383544921875,
0.05712890625,
0.058135986328125,
-0.059967041015625,
-0.0275726318359375,
0.0202484130859375,
-0.003673553466796875,
-0.0250701904296875,
-0.0012416839599609375,
-0.0233001708984375,
-0.0172119140625,
0.00881195068359375,
-0.0478515625,
-0.009185791015625,
0.01296234130859375,
0.01259613037109375,
0.0016603469848632812,
0.006923675537109375,
-0.01177215576171875,
-0.0229949951171875,
-0.06585693359375,
0.03125,
0.0305633544921875,
0.10089111328125,
0.0236663818359375,
0.052642822265625,
-0.07403564453125,
-0.040863037109375,
-0.0614013671875,
0.059906005859375,
0.0304412841796875,
0.048370361328125,
-0.0523681640625,
-0.007305145263671875,
0.0257415771484375,
0.042022705078125,
0.0140228271484375,
-0.005340576171875,
0.0197906494140625,
0.01470947265625,
0.00966644287109375,
0.0082550048828125,
0.068359375,
-0.0081787109375,
-0.022918701171875,
-0.03125,
0.00962066650390625,
0.03729248046875,
0.014801025390625,
0.00904083251953125,
0.025360107421875,
0.0183868408203125,
0.0032176971435546875,
0.0316162109375,
0.008819580078125,
-0.0228729248046875,
0.016571044921875,
-0.0015554428100585938,
0.04736328125,
0.043426513671875,
-0.041717529296875,
-0.016876220703125,
-0.00794219970703125,
-0.02081298828125,
0.005889892578125,
0.0155792236328125,
-0.0112152099609375,
0.031768798828125,
-0.0184783935546875,
-0.01265716552734375,
0.0274810791015625,
-0.00994110107421875,
-0.00395965576171875,
0.0216827392578125,
0.00922393798828125,
-0.0051116943359375,
-0.01103973388671875,
-0.0096435546875,
0.022308349609375,
0.0221710205078125,
-0.0287628173828125,
0.03680419921875,
-0.01345062255859375,
-0.005954742431640625,
-0.01409912109375,
0.04791259765625,
-0.051544189453125,
-0.0284423828125,
0.0721435546875,
-0.0254669189453125,
-0.03497314453125,
-0.016693115234375,
0.03924560546875,
-0.042266845703125,
0.0460205078125,
-0.05157470703125,
-0.052093505859375,
-0.00811767578125,
0.03302001953125,
-0.00849151611328125,
-0.0277099609375,
-0.0298614501953125,
-0.000789642333984375,
-0.010955810546875,
-0.0196533203125,
0.03912353515625,
0.024658203125,
0.0009121894836425781,
0.04052734375,
0.00911712646484375,
0.006671905517578125,
0.03497314453125,
-0.0154266357421875,
0.058990478515625,
0.042083740234375,
-0.0301055908203125,
0.027618408203125,
0.0034008026123046875,
-0.018463134765625,
0.02349853515625,
0.0157470703125,
-0.00804901123046875,
0.00983428955078125,
0.0115966796875,
0.021209716796875,
-0.01129913330078125,
0.020721435546875,
-0.0278167724609375,
-0.0347900390625,
0.0192413330078125,
-0.00789642333984375,
-0.02520751953125,
-0.01214599609375,
-0.01800537109375,
-0.0290985107421875,
-0.0055999755859375,
0.0025157928466796875,
-0.0026607513427734375,
-0.0050201416015625,
0.030487060546875,
0.0121612548828125,
0.043121337890625,
0.00577545166015625,
-0.0293121337890625,
0.0144500732421875,
-0.0161285400390625,
0.01641845703125,
0.01824951171875,
0.01226806640625,
-0.01560211181640625,
-0.0052642822265625,
-0.0352783203125,
0.03265380859375,
-0.03643798828125,
-0.0272674560546875,
-0.003856658935546875,
-0.0095367431640625,
0.004489898681640625,
0.0008435249328613281,
-0.06414794921875,
-0.005199432373046875,
-0.012298583984375,
0.0160980224609375,
0.03631591796875,
-0.019012451171875,
0.0362548828125,
-0.01407623291015625,
-0.0391845703125,
-0.07855224609375,
0.018707275390625,
-0.08575439453125,
-0.01071929931640625,
-0.00801849365234375,
0.01519775390625,
0.02874755859375,
0.0077972412109375,
-0.043243408203125,
0.05181884765625,
-0.01287841796875,
-0.0215911865234375,
-0.05364990234375,
-0.0183563232421875,
0.0271759033203125,
-0.00672149658203125,
-0.03643798828125,
0.037689208984375,
-0.07037353515625,
-0.0141754150390625,
0.00884246826171875,
0.01436614990234375,
0.01540374755859375,
0.0257110595703125,
-0.07403564453125,
-0.004528045654296875,
-0.0305023193359375,
-0.02154541015625,
-0.01151275634765625,
0.01207733154296875,
0.0002827644348144531,
0.0248260498046875,
-0.01861572265625,
-0.00295257568359375,
0.009552001953125,
0.0097808837890625,
0.025909423828125,
-0.0225372314453125,
-0.06719970703125,
-0.0182647705078125,
0.0230560302734375,
0.045257568359375,
0.0175628662109375,
-0.03204345703125,
0.003391265869140625,
-0.049774169921875,
-0.0174713134765625,
-0.0477294921875,
0.0198822021484375,
-0.1080322265625,
-0.043792724609375,
0.036041259765625,
0.0005216598510742188,
-0.005794525146484375,
-0.01134490966796875,
0.001995086669921875,
-0.01016998291015625,
0.0301055908203125,
-0.004306793212890625,
-0.004940032958984375,
0.01451873779296875,
0.056396484375,
-0.05535888671875,
-0.039215087890625,
0.002490997314453125,
0.01480865478515625,
-0.0153045654296875,
-0.051483154296875,
-0.05078125,
0.027130126953125,
0.050384521484375,
-0.0015811920166015625,
0.04986572265625,
-0.03338623046875,
0.05828857421875,
0.05316162109375,
-0.04180908203125,
0.00920867919921875,
0.0225677490234375,
0.0220489501953125,
-0.02593994140625,
0.0023975372314453125,
0.034576416015625,
-0.03546142578125,
0.007083892822265625,
0.01532745361328125,
-0.0099029541015625,
0.029205322265625,
0.005962371826171875,
-0.0291748046875,
0.054718017578125,
-0.0261383056640625,
-0.0035228729248046875,
-0.00936126708984375,
-0.024200439453125,
-0.043212890625,
0.02862548828125,
0.0294342041015625,
-0.01251983642578125,
0.020172119140625
] |
416338a9660cff3b229b9ff9dc76fbe6321d85e6
|
Wordpress Stackexchange
Q: How to reload a select box of posts dynamically? I'm using custom meta boxes for a project. I have created a custom taxonomy (select box) and I have another select box populated with Posts. I need to only load the posts based on the selection of the first select box (taxonomy). How can I do that?
Thanks
|
Q: How to reload a select box of posts dynamically? I'm using custom meta boxes for a project. I have created a custom taxonomy (select box) and I have another select box populated with Posts. I need to only load the posts based on the selection of the first select box (taxonomy). How can I do that?
Thanks
|
wordpress
|
{
"language": "en",
"length": 58,
"provenance": "stackexchange_00019.jsonl.gz:421630",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57833"
}
|
[
0.05841064453125,
0.004791259765625,
0.0186920166015625,
-0.019775390625,
0.0100860595703125,
-0.00986480712890625,
0.01959228515625,
-0.046844482421875,
0.016357421875,
0.051361083984375,
-0.08892822265625,
0.0106353759765625,
-0.004596710205078125,
0.029144287109375,
-0.06707763671875,
-0.0677490234375,
0.045654296875,
-0.029327392578125,
0.00954437255859375,
-0.02716064453125,
0.01428985595703125,
-0.01092529296875,
0.037750244140625,
0.0902099609375,
0.0110626220703125,
-0.0283203125,
0.006038665771484375,
-0.00927734375,
-0.005229949951171875,
-0.016571044921875,
0.017425537109375,
0.0183868408203125,
0.0124664306640625,
-0.00725555419921875,
0.022216796875,
0.020172119140625,
0.04290771484375,
-0.007808685302734375,
0.004825592041015625,
0.038360595703125,
0.0428466796875,
-0.0469970703125,
-0.02569580078125,
0.00042438507080078125,
-0.00350189208984375,
-0.0194549560546875,
0.03399658203125,
-0.054412841796875,
0.0255889892578125,
-0.01552581787109375,
0.01461029052734375,
0.0216217041015625,
0.0391845703125,
-0.04730224609375,
-0.0166778564453125,
0.004673004150390625,
-0.0194854736328125,
0.00982666015625,
0.0360107421875,
-0.00525665283203125,
-0.0202789306640625,
-0.02301025390625,
0.02435302734375,
0.00400543212890625,
0.0004394054412841797,
-0.0045013427734375,
-0.016632080078125,
0.0285186767578125,
-0.06329345703125,
-0.027740478515625,
0.030303955078125,
-0.04888916015625,
-0.003864288330078125,
-0.01514434814453125,
-0.022552490234375,
-0.022735595703125,
0.023956298828125,
-0.032318115234375,
0.00460052490234375,
-0.0056915283203125,
0.0113525390625,
0.005733489990234375,
0.0145416259765625,
-0.01030731201171875,
0.0084228515625,
0.008148193359375,
-0.0166015625,
-0.01177215576171875,
-0.043548583984375,
-0.0369873046875,
-0.023956298828125,
-0.057769775390625,
-0.06658935546875,
0.01160430908203125,
0.0022411346435546875,
-0.00690460205078125,
-0.0191650390625,
0.0177001953125,
-0.04510498046875,
-0.0096435546875,
-0.041290283203125,
0.0007672309875488281,
-0.0285797119140625,
-0.0125579833984375,
0.00867462158203125,
0.006717681884765625,
-0.024017333984375,
-0.0191192626953125,
0.046112060546875,
0.0435791015625,
-0.00856781005859375,
0.0321044921875,
0.004268646240234375,
0.025299072265625,
-0.0565185546875,
-0.0215911865234375,
-0.022796630859375,
-0.02655029296875,
-0.022735595703125,
-0.046844482421875,
0.0015726089477539062,
0.006786346435546875,
0.033660888671875,
-0.0229644775390625,
0.036651611328125,
0.0321044921875,
-0.0223846435546875,
-0.04693603515625,
-0.033477783203125,
0.037109375,
-0.041046142578125,
-0.01395416259765625,
0.0728759765625,
0.074951171875,
0.034027099609375,
-0.023773193359375,
-0.005023956298828125,
0.02105712890625,
0.01009368896484375,
-0.0283966064453125,
0.04046630859375,
-0.038238525390625,
-0.008514404296875,
0.031463623046875,
-0.005184173583984375,
0.029754638671875,
0.0253448486328125,
-0.0007371902465820312,
-0.0019397735595703125,
-0.0164794921875,
-0.04718017578125,
0.004543304443359375,
0.03302001953125,
0.010345458984375,
0.02874755859375,
0.0018472671508789062,
0.111572265625,
-0.05682373046875,
-0.0439453125,
-0.061614990234375,
0.036102294921875,
0.017364501953125,
-0.00196075439453125,
0.0233001708984375,
-0.01055908203125,
-0.0302734375,
-0.008056640625,
-0.0005893707275390625,
0.0278778076171875,
-0.01389312744140625,
0.053985595703125,
0.00848388671875,
0.0265655517578125,
-0.0086669921875,
0.006496429443359375,
0.0026416778564453125,
0.0216827392578125,
-0.0023365020751953125,
-0.0008835792541503906,
0.033172607421875,
-0.010986328125,
-0.033782958984375,
0.0155792236328125,
-0.0179443359375,
-0.0246124267578125,
0.01446533203125,
0.00693511962890625,
0.06268310546875,
0.0036468505859375,
0.02935791015625,
-0.001178741455078125,
-0.0067596435546875,
-0.036651611328125,
-0.00881195068359375,
0.038787841796875,
0.0181121826171875,
-0.0364990234375,
-0.0138702392578125,
0.006072998046875,
-0.015655517578125,
-0.00775909423828125,
0.0093994140625,
-0.020751953125,
0.018707275390625,
-0.03680419921875,
0.0043182373046875,
-0.0185089111328125,
0.017822265625,
0.032989501953125,
0.025146484375,
-0.00814056396484375,
0.00879669189453125,
0.0003135204315185547,
-0.035430908203125,
-0.034912109375,
0.034881591796875,
0.0002980232238769531,
-0.01215362548828125,
0.0013532638549804688,
-0.0189666748046875,
-0.005039215087890625,
0.022857666015625,
-0.0288543701171875,
0.0284423828125,
0.0311126708984375,
-0.0036945343017578125,
-0.014068603515625,
-0.01337432861328125,
0.0267791748046875,
0.0092010498046875,
-0.0102386474609375,
0.0167388916015625,
0.012847900390625,
0.0193634033203125,
-0.0291900634765625,
-0.00672149658203125,
-0.005157470703125,
-0.023956298828125,
0.0001385211944580078,
0.037445068359375,
0.001255035400390625,
0.0292205810546875,
-0.0085296630859375,
0.050445556640625,
0.047332763671875,
0.0019073486328125,
0.0005588531494140625,
0.04254150390625,
-0.0265655517578125,
0.01396942138671875,
0.021759033203125,
0.01904296875,
0.0130615234375,
0.018768310546875,
0.01409912109375,
0.023193359375,
0.0038585662841796875,
0.0235748291015625,
0.026092529296875,
-0.00646209716796875,
-0.01059722900390625,
0.0300140380859375,
0.002262115478515625,
0.0058135986328125,
0.0784912109375,
-0.04937744140625,
0.034393310546875,
0.01215362548828125,
0.00957489013671875,
-0.0173492431640625,
0.00016176700592041016,
-0.06622314453125,
0.01198577880859375,
0.01031494140625,
0.0054473876953125,
0.0093994140625,
-0.0209197998046875,
-0.0109710693359375,
0.043792724609375,
0.00994110107421875,
-0.00624847412109375,
0.031524658203125,
-0.04327392578125,
-0.016815185546875,
0.0038204193115234375,
-0.07403564453125,
-0.0212249755859375,
0.02020263671875,
0.006351470947265625,
0.010528564453125,
0.0146026611328125,
0.053497314453125,
0.004787445068359375,
0.0290069580078125,
0.0094451904296875,
0.005279541015625,
0.0262298583984375,
-0.005161285400390625,
0.016357421875,
0.0064239501953125,
0.01482391357421875,
0.05316162109375,
-0.0024814605712890625,
0.02935791015625,
-0.01273345947265625,
0.0296478271484375,
-0.030487060546875,
0.0308837890625,
-0.004150390625,
-0.0238800048828125,
-0.0244293212890625,
-0.0005946159362792969,
0.03082275390625,
0.033935546875,
0.03399658203125,
-0.01178741455078125,
0.0194244384765625,
0.05328369140625,
-0.0101318359375,
-0.02032470703125,
0.0247802734375,
-0.034423828125,
0.04620361328125,
-0.0258941650390625,
-0.0019407272338867188,
-0.043060302734375,
-0.01068115234375,
0.00908660888671875,
0.03851318359375,
-0.0380859375,
-0.040191650390625,
-0.05084228515625,
-0.057708740234375,
-0.0203399658203125,
0.01528167724609375,
-0.006748199462890625,
-0.0007500648498535156,
0.09149169921875,
-0.002559661865234375,
-0.08740234375,
-0.00952911376953125,
0.01230621337890625,
-0.0146026611328125,
0.052459716796875,
0.039306640625,
-0.0228271484375,
0.0110015869140625,
-0.0027332305908203125,
0.0430908203125,
0.044921875,
-0.05712890625,
-0.004238128662109375,
0.00757598876953125,
0.036468505859375,
0.015777587890625,
-0.019927978515625,
0.0028362274169921875,
0.04852294921875,
0.0010700225830078125,
-0.0169525146484375,
0.00856781005859375,
-0.0109405517578125,
-0.0247344970703125,
-0.078857421875,
-0.0213775634765625,
0.012725830078125,
-0.048095703125,
0.0180816650390625,
-0.0172882080078125,
0.0183258056640625,
0.032470703125,
-0.02288818359375,
0.01186370849609375,
-0.024139404296875,
-0.0222625732421875,
-0.0217132568359375,
-0.00243377685546875,
-0.0343017578125,
0.029083251953125,
-0.007720947265625,
-0.01401519775390625,
-0.0236053466796875,
0.0099029541015625,
-0.03839111328125,
-0.0797119140625,
0.033660888671875,
-0.035552978515625,
-0.0294189453125,
-0.011688232421875,
-0.0150299072265625,
0.0157470703125,
0.082763671875,
-0.06683349609375,
-0.0130767822265625,
0.04254150390625,
0.0106658935546875,
-0.0096435546875,
-0.0021381378173828125,
-0.08697509765625,
-0.035369873046875,
-0.09759521484375,
-0.02069091796875,
0.010955810546875,
-0.057373046875,
-0.021026611328125,
0.060272216796875,
-0.083984375,
-0.01318359375,
0.043365478515625,
-0.09228515625,
0.02044677734375,
-0.03509521484375,
0.02490234375,
-0.07159423828125,
-0.006557464599609375,
-0.042572021484375,
-0.0916748046875,
-0.016265869140625,
0.0107574462890625,
0.04180908203125,
0.003177642822265625,
-0.02606201171875,
-0.01372528076171875,
0.051300048828125,
0.024322509765625,
0.026092529296875,
0.01849365234375,
0.00180816650390625,
0.027374267578125,
-0.0188446044921875,
0.0248565673828125,
-0.031097412109375,
-0.01494598388671875,
-0.026336669921875,
0.038909912109375,
0.045867919921875,
-0.044036865234375,
-0.01134490966796875,
-0.08770751953125,
0.0120391845703125,
-0.06146240234375,
-0.0186920166015625,
-0.034210205078125,
-0.010955810546875,
-0.02215576171875,
-0.0214691162109375,
-0.0167999267578125,
-0.05523681640625,
-0.026275634765625,
-0.004962921142578125,
-0.022216796875,
0.0308685302734375,
0.034210205078125,
0.0156402587890625,
-0.0007519721984863281,
-0.038360595703125,
-0.0267486572265625,
0.016204833984375,
0.029388427734375,
0.033111572265625,
0.01201629638671875,
-0.00811767578125,
0.0391845703125,
0.013641357421875,
0.047698974609375,
-0.04888916015625,
0.0772705078125,
-0.0234222412109375,
-0.018218994140625,
0.042266845703125,
-0.006946563720703125,
-0.0190887451171875,
0.0226898193359375,
-0.00034356117248535156,
-0.0214996337890625,
-0.0303955078125,
0.04833984375,
0.027252197265625,
-0.035125732421875,
-0.05889892578125,
-0.01763916015625,
0.01415252685546875,
-0.0000152587890625,
0.01995849609375,
0.037200927734375,
-0.0156402587890625,
0.00634765625,
-0.00510406494140625,
0.00786590576171875,
0.0169219970703125,
-0.0057525634765625,
0.0190887451171875,
0.0194549560546875,
0.03375244140625,
0.024139404296875,
-0.00786590576171875,
-0.007656097412109375,
0.0007309913635253906,
-0.02471923828125,
-0.0626220703125,
-0.0121612548828125,
0.0121002197265625,
0.05535888671875,
0.0390625,
-0.025604248046875,
0.017913818359375,
0.0296783447265625,
-0.004146575927734375,
0.0254669189453125,
0.01483154296875,
-0.020050048828125,
-0.0172576904296875,
0.04083251953125,
0.01198577880859375,
0.007633209228515625,
0.031982421875,
0.08099365234375,
0.010406494140625,
0.059539794921875,
-0.0297088623046875,
0.07000732421875,
0.024749755859375,
0.004253387451171875,
0.018402099609375,
-0.00746917724609375,
0.02825927734375,
-0.05059814453125,
-0.0270843505859375,
-0.03717041015625,
-0.002407073974609375,
0.014495849609375,
0.032684326171875,
-0.0131988525390625,
-0.0197601318359375,
0.0216064453125,
-0.0121002197265625,
-0.0150299072265625,
-0.01256561279296875,
-0.0264129638671875,
-0.01438140869140625,
-0.0261383056640625,
-0.037506103515625,
0.01055145263671875,
-0.006134033203125,
-0.0006880760192871094,
-0.01132965087890625,
-0.0156402587890625,
0.039581298828125,
-0.0236968994140625,
0.026092529296875,
0.002513885498046875,
0.0017547607421875,
-0.03033447265625,
0.0197296142578125,
0.026519775390625,
-0.043243408203125,
-0.050933837890625,
0.0020656585693359375,
-0.02227783203125,
0.022735595703125,
-0.01377105712890625,
0.0250701904296875,
-0.0094757080078125,
-0.01451873779296875,
-0.01415252685546875,
0.017578125,
0.02264404296875,
-0.00348663330078125,
-0.035186767578125,
0.0030193328857421875,
-0.06597900390625,
-0.003818511962890625,
-0.02288818359375,
-0.06842041015625,
-0.029693603515625,
-0.0243682861328125,
0.033416748046875,
0.044952392578125,
0.01026153564453125,
-0.0215606689453125,
0.046478271484375,
-0.04595947265625,
-0.030548095703125,
-0.0018472671508789062,
-0.0027713775634765625,
0.00600433349609375,
0.0181884765625,
0.0195465087890625,
0.01053619384765625,
-0.0091705322265625,
-0.00616455078125,
-0.0161895751953125,
-0.043792724609375,
-0.07037353515625,
-0.00876617431640625,
0.040191650390625,
-0.031768798828125,
0.07110595703125,
0.0703125,
0.018341064453125,
0.0555419921875,
-0.038543701171875,
-0.0027751922607421875,
-0.0009832382202148438,
0.01079559326171875,
-0.061492919921875,
0.0355224609375,
0.028106689453125,
-0.040863037109375,
0.001766204833984375,
0.0224456787109375,
0.00555419921875,
0.0345458984375,
-0.03887939453125,
0.0276031494140625,
0.017730712890625,
-0.052490234375,
0.02386474609375,
0.0130462646484375,
0.030120849609375,
0.057373046875,
-0.0276031494140625,
0.042694091796875,
0.03717041015625,
0.0031185150146484375,
-0.032257080078125,
0.00531005859375,
0.0285491943359375,
-0.00433349609375,
-0.005695343017578125,
0.017059326171875,
-0.0145416259765625,
-0.01739501953125,
0.0103302001953125,
0.037109375,
-0.037506103515625,
0.006938934326171875,
0.0164794921875,
0.0056304931640625,
0.001651763916015625,
0.00943756103515625,
0.003021240234375,
0.0014514923095703125,
0.007419586181640625,
0.021820068359375,
-0.01168060302734375,
0.0115203857421875,
0.0167999267578125,
-0.031524658203125,
-0.026214599609375,
-0.016693115234375,
0.02618408203125,
0.0096282958984375,
0.046661376953125,
-0.002391815185546875,
0.0433349609375,
-0.0112762451171875,
-0.0007648468017578125,
-0.006565093994140625,
-0.015106201171875,
-0.035675048828125,
0.0167999267578125,
-0.034027099609375,
0.01230621337890625,
0.0188140869140625,
0.01971435546875,
0.0130615234375,
0.05963134765625,
0.0030155181884765625,
-0.0004901885986328125,
0.021392822265625,
-0.01953125,
-0.032867431640625,
-0.035400390625,
0.01483154296875,
0.0244140625,
-0.0108795166015625,
0.0276031494140625,
0.01436614990234375,
-0.0396728515625,
-0.0190582275390625,
-0.052276611328125,
0.048828125,
0.003757476806640625,
-0.020233154296875,
0.0289459228515625,
0.018035888671875,
-0.025299072265625,
-0.0019931793212890625,
-0.0265655517578125,
-0.037811279296875,
-0.01092529296875,
-0.0288238525390625,
-0.04937744140625,
-0.0285797119140625,
-0.06121826171875,
-0.0848388671875,
0.092529296875,
0.0183868408203125,
0.0295562744140625,
-0.0011281967163085938,
0.0291748046875,
-0.030914306640625,
0.0010747909545898438,
-0.03057861328125,
0.052642822265625,
0.0174102783203125,
0.032562255859375,
-0.04510498046875,
-0.01079559326171875,
0.00418853759765625,
0.035888671875,
-0.0121612548828125,
-0.00843048095703125,
0.007572174072265625,
-0.006496429443359375,
0.02874755859375,
0.0791015625,
0.032135009765625,
-0.027923583984375,
-0.01194000244140625,
0.05804443359375,
0.0474853515625,
-0.070556640625,
0.0029964447021484375,
0.0154571533203125,
-0.0213165283203125,
0.012054443359375,
0.01727294921875,
0.0108642578125,
-0.0013971328735351562,
0.0007624626159667969,
-0.0160369873046875,
0.00047016143798828125,
-0.0004096031188964844,
0.05438232421875,
0.0233306884765625,
-0.00234222412109375,
0.018035888671875,
-0.0016813278198242188,
-0.005985260009765625,
-0.0028553009033203125,
0.0312042236328125,
0.00048279762268066406,
0.040557861328125,
0.00560760498046875,
0.004985809326171875,
0.0628662109375,
-0.01224517822265625,
0.0179290771484375,
0.006023406982421875,
-0.00933074951171875,
0.050506591796875,
0.0002524852752685547,
0.0189361572265625,
-0.043670654296875,
0.00838470458984375,
0.03192138671875,
0.047576904296875,
-0.04302978515625,
-0.037109375,
0.0035915374755859375,
0.0195465087890625,
0.0188751220703125,
0.014617919921875,
0.054595947265625,
0.0165557861328125,
0.04327392578125,
-0.045257568359375,
-0.01020050048828125,
0.0015239715576171875,
0.0294342041015625,
-0.005764007568359375,
0.005992889404296875,
-0.0156402587890625,
-0.030120849609375,
0.006984710693359375,
-0.0283355712890625,
0.0279388427734375,
0.033538818359375,
0.0002722740173339844,
0.0226898193359375,
-0.050567626953125,
0.0024852752685546875,
0.0140533447265625,
0.036529541015625,
0.029754638671875,
-0.0194549560546875,
-0.0030422210693359375,
-0.0413818359375,
-0.0038299560546875,
0.03350830078125,
0.05523681640625,
0.03814697265625,
0.08868408203125,
0.07220458984375,
-0.0029163360595703125,
0.003978729248046875,
0.06884765625,
0.00200653076171875,
0.0235748291015625,
-0.030303955078125,
0.0565185546875,
0.0194244384765625,
0.01384735107421875,
-0.032012939453125,
0.0219879150390625,
0.064208984375,
-0.00095367431640625,
0.045135498046875,
-0.0018472671508789062,
-0.009490966796875,
0.037139892578125,
-0.031463623046875,
0.04296875,
0.00608062744140625,
-0.0574951171875,
-0.0188140869140625,
-0.0150299072265625,
-0.04095458984375,
0.01395416259765625,
0.0262451171875,
-0.03375244140625,
0.0309295654296875,
-0.02716064453125,
-0.0117645263671875,
-0.002838134765625,
0.000020503997802734375,
0.01482391357421875,
0.05712890625,
0.00726318359375,
0.0247039794921875,
-0.0718994140625,
-0.02392578125,
0.0004086494445800781,
-0.0115966796875,
-0.01525115966796875,
0.0245819091796875,
0.041900634765625,
-0.009613037109375,
-0.01201629638671875,
0.004749298095703125,
-0.00803375244140625,
-0.0247802734375,
0.045196533203125,
-0.015869140625,
-0.00981903076171875,
-0.0015134811401367188,
0.0224761962890625,
0.07354736328125,
0.022308349609375,
-0.0102996826171875,
0.035675048828125,
-0.006015777587890625,
-0.00328826904296875,
-0.0234375,
0.01435089111328125,
-0.03350830078125,
0.01354217529296875,
0.0073394775390625,
-0.0256500244140625,
0.021820068359375,
0.0092010498046875,
0.01513671875,
0.0178070068359375,
-0.02197265625,
0.02447509765625,
-0.006732940673828125,
0.00799560546875,
-0.0428466796875,
0.0269317626953125,
-0.043060302734375,
0.019195556640625,
0.0182037353515625,
-0.014312744140625,
0.03338623046875,
0.0103302001953125,
-0.006450653076171875,
0.049407958984375,
-0.06732177734375,
-0.0023860931396484375,
0.038238525390625,
0.06488037109375,
-0.01126861572265625,
0.0198211669921875,
-0.0029926300048828125,
0.0031986236572265625,
-0.00118255615234375,
0.025482177734375,
-0.0012788772583007812,
-0.03912353515625,
-0.006252288818359375,
0.0058441162109375,
-0.01318359375,
0.0240936279296875,
0.0161895751953125,
-0.0177459716796875,
0.00554656982421875,
0.024871826171875,
-0.0704345703125,
0.0284271240234375,
0.0256805419921875,
0.0096588134765625,
-0.02587890625,
-0.0548095703125,
0.0229034423828125,
0.09112548828125,
-0.01629638671875,
-0.050445556640625,
-0.02093505859375,
-0.0009570121765136719,
-0.058746337890625,
0.0153656005859375,
0.0306396484375,
-0.037078857421875,
0.01428985595703125,
-0.0010242462158203125,
0.0439453125,
0.039031982421875,
0.027679443359375,
0.01470184326171875,
0.0487060546875,
0.018310546875,
-0.061798095703125,
-0.09881591796875,
0.004055023193359375,
-0.0001125335693359375,
0.00576019287109375,
0.012237548828125,
-0.019683837890625,
0.0101318359375,
-0.0251312255859375,
-0.0615234375,
0.0869140625,
-0.005390167236328125,
-0.02703857421875,
-0.09051513671875,
0.004093170166015625,
0.00960540771484375,
0.02972412109375,
-0.01287841796875,
-0.032958984375,
-0.047210693359375,
0.031463623046875,
0.008819580078125,
0.04852294921875,
0.039581298828125,
0.004425048828125,
-0.026336669921875,
-0.017822265625,
-0.047607421875,
0.017120361328125,
-0.01033782958984375,
-0.0137786865234375,
0.0244140625,
0.0187835693359375,
-0.034820556640625,
-0.033416748046875,
0.0010442733764648438,
0.02838134765625,
-0.00220489501953125,
-0.038543701171875,
-0.017303466796875,
-0.019500732421875,
0.058624267578125,
0.010223388671875,
0.0261383056640625,
-0.032989501953125,
-0.0216522216796875,
-0.021881103515625,
-0.0003879070281982422,
-0.003925323486328125,
0.005084991455078125,
-0.06591796875,
-0.01043701171875,
0.00878143310546875,
-0.0199737548828125,
0.03082275390625,
-0.03277587890625,
-0.04248046875,
-0.0008997917175292969,
-0.01461029052734375,
0.0164794921875,
-0.081298828125,
0.028900146484375,
-0.00177764892578125,
-0.0194549560546875,
-0.01403045654296875,
0.0212860107421875,
-0.026580810546875,
-0.0175933837890625,
0.052642822265625,
-0.0006823539733886719,
0.0161590576171875,
-0.03155517578125,
0.006053924560546875,
0.0023860931396484375,
0.0299835205078125,
-0.0192108154296875,
-0.01071929931640625,
-0.0258636474609375,
0.0254669189453125,
0.01218414306640625,
0.02325439453125,
-0.00615692138671875,
0.0382080078125,
0.0200347900390625,
0.0279083251953125,
-0.0305938720703125,
0.050445556640625,
-0.014862060546875,
0.023651123046875,
-0.0186309814453125,
0.01309967041015625,
0.0181427001953125,
0.005992889404296875,
0.00614166259765625,
-0.02215576171875,
0.01282501220703125,
-0.027008056640625,
0.0172882080078125,
0.0380859375,
-0.0234527587890625,
0.0311126708984375
] |
801b727243cf96b54056072b26af54b98f0fb6d0
|
Wordpress Stackexchange
Q: Why are there two diffrent full screen editors? In the WP editor there is a full screen button. It has shortcut ALT+SHIFT+G.
When the button is pressed it shows a different full screen editor then when the shortcut is used.
I tried this on multiple 3.4.1 installations, one of them had no plugins to interfere.
Why is this?
EDIT
its a bug: http://core.trac.wordpress.org/ticket/21197
A: It's a bug
http://core.trac.wordpress.org/ticket/21197
Using the shortcut pulls up the TinyMCE fullscreen editor rather than the custom wordpress fullscreen editor.
Update 13. July 2012: Fixed in Changeset 21266.
|
Q: Why are there two diffrent full screen editors? In the WP editor there is a full screen button. It has shortcut ALT+SHIFT+G.
When the button is pressed it shows a different full screen editor then when the shortcut is used.
I tried this on multiple 3.4.1 installations, one of them had no plugins to interfere.
Why is this?
EDIT
its a bug: http://core.trac.wordpress.org/ticket/21197
A: It's a bug
http://core.trac.wordpress.org/ticket/21197
Using the shortcut pulls up the TinyMCE fullscreen editor rather than the custom wordpress fullscreen editor.
Update 13. July 2012: Fixed in Changeset 21266.
|
wordpress
|
{
"language": "en",
"length": 93,
"provenance": "stackexchange_00019.jsonl.gz:421633",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57844"
}
|
[
-0.0302276611328125,
-0.01174163818359375,
-0.023590087890625,
0.037384033203125,
-0.0207977294921875,
-0.03973388671875,
0.05517578125,
-0.01413726806640625,
0.016876220703125,
0.00827789306640625,
0.0028553009033203125,
-0.01250457763671875,
-0.037506103515625,
-0.048095703125,
-0.00508880615234375,
-0.0228424072265625,
0.0523681640625,
-0.0677490234375,
-0.01093292236328125,
-0.0175323486328125,
0.00739288330078125,
0.01776123046875,
0.018310546875,
0.033782958984375,
0.0095977783203125,
0.03277587890625,
0.02984619140625,
-0.007350921630859375,
-0.02294921875,
-0.02435302734375,
0.0020275115966796875,
0.01861572265625,
0.036041259765625,
0.0694580078125,
-0.104736328125,
0.0430908203125,
-0.021484375,
0.0224151611328125,
0.00829315185546875,
0.007244110107421875,
-0.0056610107421875,
0.02044677734375,
0.0117645263671875,
0.011199951171875,
-0.044952392578125,
-0.01483154296875,
-0.0131988525390625,
-0.031524658203125,
0.0217742919921875,
0.01058197021484375,
-0.013153076171875,
0.028411865234375,
0.006015777587890625,
-0.0219573974609375,
0.0037174224853515625,
-0.00724029541015625,
-0.0068359375,
0.008636474609375,
-0.00298309326171875,
0.035858154296875,
0.0204315185546875,
0.045623779296875,
-0.01163482666015625,
-0.00681304931640625,
-0.0225372314453125,
0.0034580230712890625,
-0.03057861328125,
-0.01084136962890625,
0.04180908203125,
-0.011016845703125,
-0.0293426513671875,
-0.00885772705078125,
0.006153106689453125,
-0.0226593017578125,
-0.022674560546875,
0.0341796875,
0.01019287109375,
0.007110595703125,
0.0133056640625,
-0.01898193359375,
-0.0123748779296875,
-0.007762908935546875,
-0.040252685546875,
-0.0159149169921875,
0.0097808837890625,
0.0246124267578125,
-0.00196075439453125,
-0.00818634033203125,
0.012786865234375,
-0.031585693359375,
0.0181884765625,
-0.036346435546875,
-0.0654296875,
0.060333251953125,
0.018524169921875,
-0.04815673828125,
0.0079498291015625,
0.0083160400390625,
-0.00588226318359375,
0.01300811767578125,
0.0276031494140625,
-0.05023193359375,
0.058685302734375,
-0.04669189453125,
0.005481719970703125,
0.0112762451171875,
0.022979736328125,
0.0516357421875,
0.040863037109375,
0.0124664306640625,
-0.0212249755859375,
0.045318603515625,
0.0059814453125,
-0.01247406005859375,
-0.00311279296875,
-0.039215087890625,
-0.057861328125,
0.071533203125,
0.0022792816162109375,
0.035430908203125,
0.0085601806640625,
0.0153961181640625,
0.01222991943359375,
0.01495361328125,
-0.02618408203125,
-0.03485107421875,
-0.0102691650390625,
-0.0225677490234375,
-0.02423095703125,
0.05450439453125,
-0.01401519775390625,
0.01412200927734375,
0.03863525390625,
0.0164337158203125,
-0.01306915283203125,
-0.02783203125,
-0.032562255859375,
0.0208587646484375,
0.0158843994140625,
0.00823974609375,
-0.06878662109375,
-0.002960205078125,
0.0672607421875,
-0.043792724609375,
-0.00461578369140625,
0.0225372314453125,
0.019195556640625,
0.020050048828125,
-0.016815185546875,
-0.026153564453125,
-0.01024627685546875,
0.0062713623046875,
-0.0029582977294921875,
0.041290283203125,
0.0269317626953125,
-0.038543701171875,
0.047454833984375,
-0.0418701171875,
0.041046142578125,
-0.045501708984375,
0.00493621826171875,
0.00688934326171875,
0.0268707275390625,
-0.06329345703125,
-0.037200927734375,
-0.029144287109375,
-0.061737060546875,
0.00415802001953125,
0.0259857177734375,
-0.024383544921875,
0.006938934326171875,
0.020294189453125,
0.0120849609375,
0.04034423828125,
0.02471923828125,
0.0304412841796875,
0.01483154296875,
-0.00882720947265625,
0.0231170654296875,
0.006877899169921875,
-0.0125274658203125,
-0.0267486572265625,
0.04608154296875,
-0.03131103515625,
-0.016693115234375,
-0.0164337158203125,
0.013397216796875,
0.04595947265625,
0.01404571533203125,
0.043731689453125,
-0.011505126953125,
0.0025157928466796875,
0.0011920928955078125,
-0.00246429443359375,
0.0079498291015625,
-0.01415252685546875,
-0.048736572265625,
-0.0084381103515625,
-0.006298065185546875,
-0.0130767822265625,
0.034515380859375,
0.0027675628662109375,
-0.00600433349609375,
-0.0146026611328125,
-0.08837890625,
0.0269775390625,
-0.034759521484375,
0.031890869140625,
0.0438232421875,
-0.058319091796875,
-0.01358795166015625,
-0.0236663818359375,
0.0196685791015625,
-0.045989990234375,
-0.0771484375,
0.074951171875,
-0.024688720703125,
0.0303192138671875,
0.00618743896484375,
0.0340576171875,
0.00778961181640625,
-0.032958984375,
0.0086669921875,
-0.026275634765625,
0.038116455078125,
-0.01222991943359375,
-0.01471710205078125,
-0.00428009033203125,
0.06396484375,
0.0024547576904296875,
0.0176849365234375,
0.00551605224609375,
0.006244659423828125,
0.01593017578125,
-0.043426513671875,
-0.01084136962890625,
-0.042205810546875,
-0.038787841796875,
0.00560760498046875,
0.04925537109375,
0.0330810546875,
0.0186309814453125,
-0.010284423828125,
0.0171051025390625,
0.06439208984375,
-0.002170562744140625,
0.01288604736328125,
-0.0005660057067871094,
0.04022216796875,
0.08245849609375,
-0.0078582763671875,
-0.01546478271484375,
0.01003265380859375,
0.0006585121154785156,
0.012664794921875,
0.0183258056640625,
0.0124359130859375,
0.0232086181640625,
0.006847381591796875,
-0.00012373924255371094,
-0.0116729736328125,
-0.038360595703125,
-0.01190185546875,
-0.029052734375,
-0.0098876953125,
-0.00234222412109375,
0.027679443359375,
0.03533935546875,
-0.02349853515625,
-0.0177001953125,
0.0243072509765625,
0.052276611328125,
0.0028476715087890625,
0.0026397705078125,
0.0194854736328125,
-0.01369476318359375,
0.00748443603515625,
-0.006855010986328125,
0.0008487701416015625,
-0.014617919921875,
-0.03839111328125,
-0.007213592529296875,
-0.05657958984375,
-0.026275634765625,
0.03271484375,
-0.0350341796875,
-0.03125,
-0.06512451171875,
0.00682830810546875,
-0.00238037109375,
0.02899169921875,
0.023651123046875,
-0.0169677734375,
0.024200439453125,
0.02001953125,
-0.0206756591796875,
0.0751953125,
-0.00490570068359375,
0.027313232421875,
-0.01052093505859375,
0.031036376953125,
0.04559326171875,
-0.00833892822265625,
-0.0052490234375,
0.0217437744140625,
-0.005100250244140625,
0.015380859375,
0.017547607421875,
0.0174560546875,
0.03955078125,
-0.09820556640625,
-0.0170745849609375,
0.01303863525390625,
0.0309295654296875,
-0.048248291015625,
-0.03387451171875,
-0.038665771484375,
0.01081085205078125,
-0.0460205078125,
0.0018072128295898438,
-0.0161895751953125,
-0.066162109375,
-0.0213165283203125,
-0.0224761962890625,
-0.04681396484375,
0.006938934326171875,
-0.001987457275390625,
0.00815582275390625,
0.022308349609375,
-0.004009246826171875,
0.01824951171875,
0.048553466796875,
-0.004268646240234375,
-0.0038814544677734375,
0.0031490325927734375,
-0.0210418701171875,
0.0220184326171875,
0.013519287109375,
0.01555633544921875,
-0.01605224609375,
0.0295257568359375,
0.0150909423828125,
-0.0225830078125,
-0.0203704833984375,
0.058258056640625,
-0.0645751953125,
-0.019378662109375,
0.0100860595703125,
-0.0328369140625,
0.00791168212890625,
-0.0019989013671875,
-0.020965576171875,
-0.0177764892578125,
-0.0112762451171875,
0.0039005279541015625,
0.04083251953125,
0.031524658203125,
-0.0080413818359375,
0.04364013671875,
-0.041717529296875,
-0.039642333984375,
0.0150299072265625,
-0.041717529296875,
0.0054168701171875,
0.0122833251953125,
-0.023223876953125,
-0.005390167236328125,
0.0266571044921875,
0.044677734375,
0.028594970703125,
0.048980712890625,
0.025970458984375,
0.004108428955078125,
-0.0154266357421875,
-0.005275726318359375,
-0.060394287109375,
-0.017852783203125,
-0.032073974609375,
0.033966064453125,
-0.0206451416015625,
-0.006130218505859375,
-0.002170562744140625,
0.0255584716796875,
0.030242919921875,
-0.02215576171875,
0.0209808349609375,
-0.0462646484375,
-0.014404296875,
-0.02752685546875,
0.003696441650390625,
-0.003398895263671875,
0.04327392578125,
-0.029144287109375,
0.01134490966796875,
0.040252685546875,
-0.00335693359375,
-0.008575439453125,
0.01849365234375,
-0.09124755859375,
-0.006748199462890625,
-0.04742431640625,
0.02294921875,
0.010162353515625,
-0.0159912109375,
-0.04473876953125,
0.0574951171875,
-0.048553466796875,
-0.0240478515625,
0.059783935546875,
-0.0258331298828125,
-0.0268707275390625,
0.02215576171875,
-0.03729248046875,
-0.02374267578125,
-0.037994384765625,
-0.0027065277099609375,
-0.0517578125,
-0.004337310791015625,
-0.02764892578125,
0.026763916015625,
0.01168060302734375,
0.00482940673828125,
-0.03009033203125,
0.0182952880859375,
0.0258941650390625,
0.050567626953125,
-0.012176513671875,
-0.020599365234375,
-0.005886077880859375,
0.0064697265625,
0.03778076171875,
-0.00862884521484375,
-0.0011587142944335938,
-0.0222015380859375,
-0.07513427734375,
-0.0293731689453125,
-0.0347900390625,
-0.0082855224609375,
0.01023101806640625,
-0.040191650390625,
-0.0160064697265625,
-0.027740478515625,
-0.05316162109375,
-0.003814697265625,
-0.0113067626953125,
-0.0205535888671875,
-0.0455322265625,
-0.038665771484375,
0.0229644775390625,
-0.027130126953125,
-0.020782470703125,
0.005218505859375,
0.0670166015625,
0.0284881591796875,
0.0011110305786132812,
-0.0166473388671875,
-0.03173828125,
0.033966064453125,
0.038787841796875,
-0.018829345703125,
0.0067901611328125,
-0.0193939208984375,
-0.0240325927734375,
0.0303955078125,
-0.035797119140625,
-0.0090789794921875,
0.070068359375,
0.009521484375,
0.0040283203125,
-0.0021514892578125,
-0.0386962890625,
0.023895263671875,
0.002918243408203125,
-0.006992340087890625,
0.018341064453125,
0.010650634765625,
-0.00408935546875,
0.0018568038940429688,
-0.0292205810546875,
-0.01151275634765625,
0.0279693603515625,
-0.0311279296875,
0.08355712890625,
0.09521484375,
0.057861328125,
-0.007450103759765625,
0.0263519287109375,
0.0634765625,
-0.0266265869140625,
0.02435302734375,
-0.0157623291015625,
0.0204620361328125,
0.0279083251953125,
0.0008745193481445312,
-0.0041656494140625,
0.0092926025390625,
-0.00460052490234375,
0.02020263671875,
0.01727294921875,
-0.025970458984375,
-0.0278472900390625,
0.0026187896728515625,
-0.0117340087890625,
-0.006610870361328125,
-0.0458984375,
0.0195770263671875,
0.027801513671875,
-0.035614013671875,
0.02606201171875,
0.0219879150390625,
-0.048370361328125,
-0.03729248046875,
-0.06719970703125,
-0.028594970703125,
-0.0185699462890625,
0.005462646484375,
0.0284576416015625,
-0.05340576171875,
0.0160675048828125,
0.00628662109375,
0.0026149749755859375,
0.002307891845703125,
0.0270233154296875,
0.0028476715087890625,
0.028533935546875,
0.004108428955078125,
0.0059051513671875,
0.019378662109375,
-0.035400390625,
-0.032745361328125,
0.037109375,
0.032073974609375,
0.0141448974609375,
-0.0023250579833984375,
-0.005832672119140625,
0.006549835205078125,
-0.0254669189453125,
0.01451873779296875,
0.01142120361328125,
-0.044891357421875,
-0.0114288330078125,
0.04150390625,
0.00852203369140625,
0.0079193115234375,
-0.0302276611328125,
0.044219970703125,
-0.0033130645751953125,
0.024169921875,
0.03826904296875,
-0.0877685546875,
0.04559326171875,
0.059967041015625,
0.0001455545425415039,
0.0118255615234375,
-0.00785064697265625,
-0.03582763671875,
-0.04296875,
-0.01403045654296875,
-0.00948333740234375,
0.088623046875,
0.00833892822265625,
-0.0007100105285644531,
-0.01776123046875,
-0.01345062255859375,
-0.0302734375,
-0.005382537841796875,
0.03619384765625,
-0.007732391357421875,
0.007457733154296875,
-0.027191162109375,
-0.05133056640625,
-0.036834716796875,
-0.037322998046875,
-0.0479736328125,
-0.042327880859375,
-0.01410675048828125,
0.00191497802734375,
0.0261688232421875,
-0.01197052001953125,
-0.0303955078125,
0.004703521728515625,
0.0217742919921875,
0.01441192626953125,
0.059356689453125,
-0.0005803108215332031,
0.0102081298828125,
-0.00847625732421875,
0.0716552734375,
-0.00945281982421875,
-0.026123046875,
-0.01263427734375,
-0.033477783203125,
0.0283966064453125,
-0.023590087890625,
-0.0254364013671875,
-0.022705078125,
0.0200347900390625,
-0.01029205322265625,
-0.01073455810546875,
-0.0123748779296875,
0.01018524169921875,
-0.0108489990234375,
0.00994873046875,
-0.0175323486328125,
0.00914764404296875,
-0.031951904296875,
-0.03326416015625,
0.039764404296875,
-0.056060791015625,
-0.0030498504638671875,
0.01548004150390625,
-0.0032863616943359375,
0.042999267578125,
-0.0226593017578125,
0.01079559326171875,
0.033782958984375,
0.00649261474609375,
0.01160430908203125,
0.040557861328125,
-0.0159759521484375,
0.00511932373046875,
0.02569580078125,
-0.0080413818359375,
-0.00986480712890625,
-0.0220794677734375,
-0.049835205078125,
0.01453399658203125,
-0.01190948486328125,
-0.0172576904296875,
0.01020050048828125,
0.0084228515625,
0.0188140869140625,
0.05511474609375,
0.08404541015625,
0.12646484375,
-0.0880126953125,
0.009246826171875,
0.055206298828125,
-0.04705810546875,
0.0010700225830078125,
-0.00864410400390625,
0.006343841552734375,
-0.049102783203125,
0.07452392578125,
0.0160369873046875,
0.00926971435546875,
0.050323486328125,
-0.0292205810546875,
-0.0163726806640625,
-0.0177154541015625,
0.044921875,
0.0225830078125,
-0.0189666748046875,
0.036407470703125,
0.01507568359375,
0.0282745361328125,
0.00417327880859375,
0.036346435546875,
-0.056640625,
-0.020477294921875,
-0.037750244140625,
-0.049285888671875,
0.0118560791015625,
-0.043212890625,
0.062164306640625,
-0.0084381103515625,
-0.0235443115234375,
0.03167724609375,
-0.05743408203125,
0.061248779296875,
-0.01212310791015625,
-0.01081085205078125,
-0.01090240478515625,
-0.002044677734375,
0.00940704345703125,
-0.004352569580078125,
0.006275177001953125,
0.0079345703125,
-0.0176849365234375,
-0.00687408447265625,
0.00611114501953125,
0.014373779296875,
0.053619384765625,
-0.043426513671875,
-0.00998687744140625,
0.0389404296875,
-0.006134033203125,
-0.0024356842041015625,
-0.0216827392578125,
-0.039031982421875,
-0.06817626953125,
-0.0272369384765625,
-0.042694091796875,
-0.05804443359375,
0.0281982421875,
-0.034912109375,
-0.064208984375,
0.0858154296875,
0.020111083984375,
0.0098419189453125,
-0.00595855712890625,
0.0286712646484375,
-0.03302001953125,
0.011260986328125,
-0.02960205078125,
0.0243377685546875,
-0.00942230224609375,
0.0116424560546875,
-0.01366424560546875,
0.0168609619140625,
0.017852783203125,
-0.00023853778839111328,
0.04071044921875,
0.00829315185546875,
-0.033416748046875,
0.0153961181640625,
0.070068359375,
0.036773681640625,
0.01309967041015625,
0.03436279296875,
0.0335693359375,
-0.0246734619140625,
0.050048828125,
0.042144775390625,
0.052276611328125,
-0.0205535888671875,
0.0003364086151123047,
0.03033447265625,
0.0283660888671875,
0.0306243896484375,
0.05316162109375,
0.01132965087890625,
0.0194244384765625,
0.018646240234375,
0.0017375946044921875,
-0.0382080078125,
-0.056488037109375,
0.02081298828125,
-0.039581298828125,
-0.037811279296875,
-0.02325439453125,
-0.043060302734375,
0.010467529296875,
-0.005939483642578125,
-0.05181884765625,
-0.030609130859375,
-0.0011911392211914062,
-0.032012939453125,
-0.027740478515625,
-0.045654296875,
0.03662109375,
0.0020771026611328125,
-0.0141754150390625,
-0.008819580078125,
0.00787353515625,
-0.0199127197265625,
0.037322998046875,
0.044189453125,
-0.00376129150390625,
-0.033905029296875,
-0.087158203125,
-0.0010585784912109375,
-0.015289306640625,
-0.0081329345703125,
0.021087646484375,
-0.023590087890625,
-0.022369384765625,
0.070556640625,
0.0241241455078125,
-0.00717926025390625,
0.011566162109375,
-0.0131683349609375,
0.0132904052734375,
0.0275421142578125,
0.032989501953125,
0.0181884765625,
-0.034576416015625,
-0.00989532470703125,
0.0108642578125,
0.00611114501953125,
0.018218994140625,
0.056365966796875,
0.061798095703125,
-0.00339508056640625,
-0.0538330078125,
0.03472900390625,
-0.01222991943359375,
0.07275390625,
-0.0870361328125,
-0.0295867919921875,
0.0313720703125,
0.05767822265625,
0.005680084228515625,
0.003627777099609375,
0.0199432373046875,
0.022308349609375,
-0.0162506103515625,
-0.0186309814453125,
0.01238250732421875,
-0.01708984375,
-0.0173797607421875,
-0.027587890625,
0.006740570068359375,
0.0253143310546875,
-0.001956939697265625,
0.01983642578125,
0.0175018310546875,
0.041717529296875,
0.00525665283203125,
-0.018646240234375,
0.0136260986328125,
-0.04229736328125,
-0.014129638671875,
0.0008206367492675781,
0.0281524658203125,
0.034149169921875,
-0.042755126953125,
0.00991058349609375,
-0.016021728515625,
-0.05035400390625,
0.009490966796875,
0.03857421875,
-0.0240631103515625,
0.029510498046875,
-0.01007080078125,
-0.0150604248046875,
-0.0114288330078125,
0.023651123046875,
0.02947998046875,
0.0416259765625,
-0.006320953369140625,
0.003662109375,
-0.06982421875,
-0.056396484375,
-0.03314208984375,
0.057159423828125,
0.016632080078125,
0.0596923828125,
-0.00644683837890625,
0.024627685546875,
0.0070343017578125,
0.005565643310546875,
-0.00508880615234375,
-0.0245361328125,
0.033050537109375,
0.012298583984375,
0.0239715576171875,
-0.0201416015625,
-0.01035308837890625,
0.04766845703125,
0.026153564453125,
-0.00621795654296875,
0.03521728515625,
-0.0210723876953125,
0.005405426025390625,
-0.01360321044921875,
0.01354217529296875,
-0.0204620361328125,
0.00862884521484375,
-0.0228424072265625,
-0.0193328857421875,
0.0330810546875,
-0.01654052734375,
-0.021942138671875,
-0.00502777099609375,
0.03533935546875,
-0.0357666015625,
0.046875,
-0.007595062255859375,
0.06878662109375,
0.0296783447265625,
-0.004077911376953125,
-0.012176513671875,
0.0115509033203125,
0.006237030029296875,
-0.0217437744140625,
0.036956787109375,
-0.03533935546875,
0.0343017578125,
-0.07354736328125,
0.08831787109375,
-0.0009627342224121094,
0.04156494140625,
-0.04766845703125,
-0.0241546630859375,
0.057708740234375,
0.0256195068359375,
0.01276397705078125,
-0.035858154296875,
-0.0122222900390625,
-0.0092620849609375,
0.00030517578125,
0.020263671875,
0.015625,
-0.0241241455078125,
-0.0380859375,
-0.0211029052734375,
0.026336669921875,
0.0209808349609375,
-0.03997802734375,
0.0090789794921875,
0.00399017333984375,
-0.0031986236572265625,
0.031219482421875,
0.01364898681640625,
-0.0190887451171875,
-0.017242431640625,
-0.0151214599609375,
0.0131988525390625,
-0.055450439453125,
0.0186309814453125,
0.0095977783203125,
0.024505615234375,
0.0260162353515625,
-0.03143310546875,
0.006011962890625,
0.03179931640625,
0.0203094482421875,
0.07965087890625,
-0.00003314018249511719,
-0.02679443359375,
-0.005748748779296875,
-0.016998291015625,
-0.00836181640625,
0.023101806640625,
0.018707275390625,
-0.0150146484375,
-0.046661376953125,
0.02557373046875,
-0.01751708984375,
0.005340576171875,
-0.052490234375,
-0.07843017578125,
0.015869140625,
0.0161285400390625,
-0.042938232421875,
-0.034820556640625,
0.006122589111328125,
-0.019989013671875,
0.044097900390625,
-0.0004029273986816406,
-0.0211029052734375,
0.01198577880859375,
0.03271484375,
0.0007801055908203125,
0.036041259765625,
-0.01306915283203125,
0.0197906494140625,
-0.0234375,
0.0219573974609375,
0.0020847320556640625,
-0.0103912353515625,
0.0180206298828125,
0.0010271072387695312,
0.0011425018310546875,
0.032318115234375,
-0.0294189453125,
-0.04876708984375,
-0.035400390625,
-0.03338623046875,
0.0146026611328125,
-0.00284576416015625,
-0.033935546875,
-0.0091705322265625,
0.05169677734375,
0.053497314453125,
0.01438140869140625,
-0.0203094482421875,
-0.0305328369140625,
-0.009002685546875,
-0.0172576904296875,
-0.00313568115234375,
0.02349853515625,
-0.0716552734375,
0.003444671630859375,
0.0106201171875,
-0.033172607421875,
0.003726959228515625,
0.002460479736328125,
-0.06512451171875,
0.0064239501953125,
-0.026611328125,
0.007251739501953125,
-0.070556640625,
0.0159149169921875,
0.0892333984375,
-0.0645751953125,
-0.0221099853515625,
0.0290985107421875,
-0.0147552490234375,
0.0290679931640625,
-0.0033111572265625,
-0.00753021240234375,
0.043792724609375,
-0.05755615234375,
-0.00327301025390625,
0.002651214599609375,
-0.0192718505859375,
-0.0340576171875,
0.01206207275390625,
0.034759521484375,
0.0020122528076171875,
-0.0340576171875,
0.017242431640625,
0.04925537109375,
-0.0064697265625,
-0.035675048828125,
0.0064544677734375,
-0.012847900390625,
0.01352691650390625,
-0.028778076171875,
0.0282440185546875,
0.003429412841796875,
-0.005176544189453125,
0.0224151611328125,
-0.00592803955078125,
0.01552581787109375,
0.04107666015625,
0.003986358642578125,
-0.0113067626953125,
-0.0136566162109375,
0.01256561279296875,
0.0133819580078125,
-0.0063629150390625
] |
50122a8bfe22128511c6af30e7bc978a0e961ccf
|
Wordpress Stackexchange
Q: Changing title to lowercase Lets say i have 100 posts. And i would like to lowercase the title. but only 70 of it. I cant use text-transform or mb_strtolower. Is there anyway to download posts and lowercase the title with microsoft word and reupload it?
A: Assuming this question is related to Wordpress, here is answer :- You can update the titles directly into your mySQL database using simple update function.
one of my user publishs all his posts uppercase (title) i want to edit them and make it normal. –
Using some conditional statements as I mentioned in this code, you can restrict the update for particular user(replace 'user_id').
UPDATE wp_posts SET post_title=LOWER(post_title) WHERE post_author = "user_id"
This will transform all post titles into lowercase by that user.
|
Q: Changing title to lowercase Lets say i have 100 posts. And i would like to lowercase the title. but only 70 of it. I cant use text-transform or mb_strtolower. Is there anyway to download posts and lowercase the title with microsoft word and reupload it?
A: Assuming this question is related to Wordpress, here is answer :- You can update the titles directly into your mySQL database using simple update function.
one of my user publishs all his posts uppercase (title) i want to edit them and make it normal. –
Using some conditional statements as I mentioned in this code, you can restrict the update for particular user(replace 'user_id').
UPDATE wp_posts SET post_title=LOWER(post_title) WHERE post_author = "user_id"
This will transform all post titles into lowercase by that user.
A: WP Title Case plugin would a much simpler solution. It automatically transforms titles across your website to show proper case.
For example:
"the quick brown fox" will appear as "The Quick Brown Fox"
"i like wordpress so much" will appear as "I Like WordPress so Much"
|
wordpress
|
{
"language": "en",
"length": 177,
"provenance": "stackexchange_00019.jsonl.gz:421635",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57846"
}
|
[
0.0020999908447265625,
-0.01190948486328125,
-0.0022735595703125,
0.02777099609375,
-0.0177154541015625,
-0.0223846435546875,
0.0491943359375,
-0.0242156982421875,
0.0312347412109375,
0.033294677734375,
-0.0012378692626953125,
-0.005786895751953125,
0.01500701904296875,
-0.0171661376953125,
-0.0305023193359375,
-0.0104217529296875,
0.0160369873046875,
0.0195159912109375,
0.0304718017578125,
-0.0112762451171875,
0.00677490234375,
0.001155853271484375,
0.00826263427734375,
0.031280517578125,
0.002643585205078125,
-0.0594482421875,
0.13232421875,
-0.036529541015625,
0.01200103759765625,
-0.03839111328125,
0.022796630859375,
0.02130126953125,
0.01294708251953125,
-0.03521728515625,
0.07037353515625,
0.06597900390625,
0.017578125,
-0.004833221435546875,
0.04046630859375,
-0.009124755859375,
0.0421142578125,
-0.018463134765625,
0.0033779144287109375,
0.0236358642578125,
0.0030765533447265625,
-0.036895751953125,
0.069091796875,
-0.029937744140625,
0.05694580078125,
-0.0266571044921875,
0.0184783935546875,
0.07904052734375,
0.0271148681640625,
-0.07958984375,
-0.01047515869140625,
0.02532958984375,
-0.0147552490234375,
0.0167694091796875,
0.0288238525390625,
-0.0256805419921875,
-0.0203704833984375,
-0.01187896728515625,
0.01186370849609375,
0.01143646240234375,
-0.0170745849609375,
0.029815673828125,
0.0138702392578125,
-0.0101470947265625,
-0.005443572998046875,
-0.0105133056640625,
-0.0036334991455078125,
-0.0203094482421875,
-0.00292205810546875,
-0.004665374755859375,
0.0166168212890625,
0.00933074951171875,
-0.0115814208984375,
-0.0093994140625,
0.0223388671875,
0.019775390625,
0.056304931640625,
-0.00749969482421875,
0.055419921875,
-0.0012035369873046875,
0.004589080810546875,
0.0014314651489257812,
0.002635955810546875,
-0.02093505859375,
-0.018218994140625,
0.00005936622619628906,
-0.01169586181640625,
0.028076171875,
-0.0810546875,
0.0439453125,
0.026611328125,
-0.0250701904296875,
0.0065155029296875,
0.05072021484375,
-0.0277557373046875,
0.0005812644958496094,
0.0183868408203125,
-0.034881591796875,
0.02313232421875,
-0.0248260498046875,
-0.0016069412231445312,
-0.0219573974609375,
-0.0200958251953125,
-0.0252532958984375,
0.037078857421875,
0.04071044921875,
-0.0305328369140625,
0.039947509765625,
-0.0086212158203125,
-0.00409698486328125,
-0.0251617431640625,
0.02606201171875,
-0.0238494873046875,
0.0282440185546875,
-0.00957489013671875,
0.051849365234375,
-0.009368896484375,
0.0027904510498046875,
0.0146636962890625,
-0.04486083984375,
-0.00843048095703125,
-0.0286407470703125,
-0.025665283203125,
-0.01078033447265625,
-0.021636962890625,
0.05010986328125,
-0.0188446044921875,
-0.01312255859375,
0.06622314453125,
0.050018310546875,
0.00421142578125,
-0.039642333984375,
-0.00989532470703125,
0.00937652587890625,
-0.0123138427734375,
0.0123291015625,
-0.003936767578125,
-0.01348876953125,
0.03985595703125,
-0.0037975311279296875,
0.0272064208984375,
0.0115203857421875,
0.0174713134765625,
0.0176239013671875,
-0.0010843276977539062,
-0.053619384765625,
0.053558349609375,
-0.04510498046875,
0.03765869140625,
0.017059326171875,
-0.061279296875,
-0.04443359375,
-0.0014638900756835938,
-0.0428466796875,
0.0247802734375,
-0.07171630859375,
0.034515380859375,
-0.00007367134094238281,
0.01261138916015625,
0.061614990234375,
0.01322174072265625,
0.0192108154296875,
0.01071929931640625,
0.004444122314453125,
0.026763916015625,
-0.042816162109375,
0.03662109375,
0.01053619384765625,
0.045440673828125,
-0.0086822509765625,
0.0015048980712890625,
-0.00024199485778808594,
-0.0105743408203125,
0.005596160888671875,
0.003635406494140625,
0.023590087890625,
0.00734710693359375,
-0.022308349609375,
0.0167236328125,
0.006862640380859375,
0.0019350051879882812,
-0.052520751953125,
0.009735107421875,
-0.021270751953125,
0.03863525390625,
0.027557373046875,
-0.01425933837890625,
-0.00768280029296875,
-0.026763916015625,
0.01788330078125,
-0.01385498046875,
-0.011260986328125,
-0.005130767822265625,
0.0169525146484375,
-0.01032257080078125,
-0.003765106201171875,
0.007190704345703125,
0.0035495758056640625,
-0.0144805908203125,
0.0298919677734375,
0.0175018310546875,
-0.017120361328125,
0.00945281982421875,
0.0015954971313476562,
-0.01242828369140625,
0.031951904296875,
0.01959228515625,
-0.02001953125,
0.002628326416015625,
-0.041107177734375,
-0.0321044921875,
-0.04754638671875,
-0.00689697265625,
-0.04034423828125,
-0.00954437255859375,
-0.01256561279296875,
-0.0035800933837890625,
0.0089111328125,
-0.02691650390625,
0.044921875,
0.035675048828125,
-0.0418701171875,
0.01256561279296875,
-0.03131103515625,
0.037078857421875,
0.004497528076171875,
-0.0295257568359375,
0.008270263671875,
0.07489013671875,
0.01514434814453125,
-0.04931640625,
-0.0035343170166015625,
-0.05712890625,
-0.073974609375,
-0.03045654296875,
0.09326171875,
0.0214080810546875,
0.00433349609375,
0.0163726806640625,
0.0295867919921875,
0.046875,
0.03936767578125,
0.04193115234375,
-0.0208892822265625,
0.021728515625,
0.0732421875,
0.01763916015625,
-0.006320953369140625,
0.0003619194030761719,
-0.08087158203125,
0.01110076904296875,
0.04498291015625,
0.00004357099533081055,
0.0017604827880859375,
0.0102386474609375,
-0.00896453857421875,
0.007244110107421875,
-0.0240631103515625,
-0.0243682861328125,
-0.0129547119140625,
0.07037353515625,
-0.0024547576904296875,
0.030914306640625,
0.01125335693359375,
-0.059967041015625,
0.048553466796875,
0.0223388671875,
-0.03338623046875,
0.01151275634765625,
0.00440216064453125,
-0.05078125,
0.050323486328125,
-0.01419830322265625,
0.0206146240234375,
-0.0121917724609375,
-0.005645751953125,
-0.0018568038940429688,
-0.004974365234375,
-0.0259552001953125,
-0.011993408203125,
0.018341064453125,
-0.024505615234375,
0.0088653564453125,
0.024871826171875,
-0.0115966796875,
-0.03167724609375,
-0.0140533447265625,
0.06903076171875,
0.006618499755859375,
0.0377197265625,
0.017242431640625,
-0.007171630859375,
0.06036376953125,
-0.061737060546875,
0.0262908935546875,
-0.01043701171875,
0.0836181640625,
0.060577392578125,
0.00948333740234375,
-0.00457763671875,
0.0018110275268554688,
0.0309600830078125,
0.0265350341796875,
0.00557708740234375,
-0.0030651092529296875,
-0.0110321044921875,
-0.050933837890625,
-0.01389312744140625,
0.0117340087890625,
0.0753173828125,
-0.03765869140625,
-0.045257568359375,
-0.005176544189453125,
0.015777587890625,
-0.06573486328125,
-0.09039306640625,
0.00670623779296875,
-0.0287628173828125,
-0.0159759521484375,
0.0268402099609375,
-0.00949859619140625,
-0.0078887939453125,
0.03936767578125,
-0.0152587890625,
0.0164031982421875,
-0.0161285400390625,
0.006923675537109375,
-0.0098724365234375,
-0.041473388671875,
-0.041412353515625,
0.01080322265625,
0.0011129379272460938,
0.00988006591796875,
0.00555419921875,
-0.0011911392211914062,
-0.030181884765625,
-0.004650115966796875,
0.055511474609375,
-0.021453857421875,
-0.00634002685546875,
0.0335693359375,
-0.048187255859375,
-0.02227783203125,
0.0008897781372070312,
-0.0139617919921875,
0.0004067420959472656,
-0.0019369125366210938,
0.001979827880859375,
-0.0264129638671875,
0.02337646484375,
-0.00988006591796875,
-0.00958251953125,
0.0260772705078125,
0.0174560546875,
-0.0146331787109375,
-0.046539306640625,
-0.04583740234375,
0.0076141357421875,
-0.038116455078125,
0.021514892578125,
0.01605224609375,
-0.0013561248779296875,
-0.033660888671875,
0.056976318359375,
0.04083251953125,
0.042816162109375,
-0.004070281982421875,
0.02911376953125,
-0.0064239501953125,
0.0068511962890625,
0.01812744140625,
-0.0289306640625,
0.016998291015625,
-0.019989013671875,
-0.0010290145874023438,
-0.0020847320556640625,
0.0224761962890625,
-0.01131439208984375,
0.0015773773193359375,
-0.043731689453125,
-0.09332275390625,
0.04742431640625,
-0.051025390625,
-0.0013532638549804688,
-0.04840087890625,
-0.0246429443359375,
0.0183563232421875,
0.1265869140625,
-0.00415802001953125,
-0.02581787109375,
0.0313720703125,
0.0195159912109375,
-0.041748046875,
0.0091094970703125,
-0.0391845703125,
-0.0178375244140625,
-0.036956787109375,
0.006679534912109375,
-0.0168609619140625,
-0.005420684814453125,
-0.01023101806640625,
-0.022369384765625,
0.00569915771484375,
-0.0273284912109375,
-0.00911712646484375,
0.03558349609375,
0.020172119140625,
-0.0094451904296875,
-0.005611419677734375,
0.032562255859375,
0.02099609375,
-0.035308837890625,
-0.09783935546875,
-0.015167236328125,
-0.010711669921875,
0.055267333984375,
-0.0023632049560546875,
-0.004638671875,
-0.0168914794921875,
0.036529541015625,
0.0080718994140625,
0.05120849609375,
-0.0257415771484375,
-0.01837158203125,
0.00844573974609375,
0.0283660888671875,
-0.003437042236328125,
0.0011234283447265625,
-0.0057220458984375,
-0.046905517578125,
-0.04241943359375,
-0.01387786865234375,
-0.0249481201171875,
0.03643798828125,
-0.01309967041015625,
-0.01385498046875,
-0.054046630859375,
-0.0116729736328125,
-0.00063323974609375,
0.016845703125,
-0.002704620361328125,
-0.0036373138427734375,
-0.0268096923828125,
-0.06048583984375,
0.05426025390625,
0.02783203125,
0.02362060546875,
-0.0157012939453125,
0.03533935546875,
-0.00039887428283691406,
-0.049713134765625,
0.0171661376953125,
-0.0304718017578125,
0.031219482421875,
-0.00736236572265625,
-0.00923919677734375,
0.00568389892578125,
-0.0280609130859375,
0.0330810546875,
0.0003066062927246094,
-0.02001953125,
0.01183319091796875,
-0.01148223876953125,
-0.0194854736328125,
-0.043304443359375,
0.0223541259765625,
-0.0202178955078125,
0.03997802734375,
0.019561767578125,
0.005096435546875,
-0.01971435546875,
-0.030242919921875,
0.0272064208984375,
0.0193634033203125,
0.0130157470703125,
-0.0228729248046875,
-0.068115234375,
0.0271453857421875,
-0.0168304443359375,
-0.038726806640625,
-0.03851318359375,
0.0261993408203125,
-0.0238037109375,
-0.0017490386962890625,
-0.0052947998046875,
-0.060577392578125,
-0.0305328369140625,
-0.0160675048828125,
0.01439666748046875,
-0.040130615234375,
-0.0025463104248046875,
-0.0306243896484375,
-0.0139312744140625,
0.048248291015625,
-0.02471923828125,
-0.06524658203125,
0.004253387451171875,
-0.0267486572265625,
0.04901123046875,
0.054229736328125,
-0.01558685302734375,
-0.04010009765625,
0.00445556640625,
0.013336181640625,
0.029449462890625,
0.023284912109375,
-0.00537872314453125,
0.01029205322265625,
0.01165771484375,
0.0279998779296875,
-0.033782958984375,
0.00782012939453125,
0.01113128662109375,
0.05426025390625,
-0.03692626953125,
-0.0225067138671875,
0.0416259765625,
0.051971435546875,
0.00598907470703125,
0.0011920928955078125,
0.0249176025390625,
-0.01322174072265625,
0.0018301010131835938,
0.0033206939697265625,
-0.0311431884765625,
-0.004756927490234375,
0.036102294921875,
0.04693603515625,
0.012237548828125,
-0.002593994140625,
0.0022258758544921875,
-0.0254974365234375,
-0.00592041015625,
0.008209228515625,
-0.00992584228515625,
-0.0184478759765625,
-0.0024547576904296875,
-0.0122528076171875,
0.0032367706298828125,
-0.009033203125,
0.033477783203125,
-0.08355712890625,
-0.0017786026000976562,
-0.006561279296875,
-0.04010009765625,
0.011383056640625,
-0.030853271484375,
-0.0284881591796875,
0.01483917236328125,
0.01099395751953125,
0.002002716064453125,
0.0139617919921875,
-0.0240936279296875,
-0.01242828369140625,
-0.02783203125,
0.0687255859375,
-0.01108551025390625,
0.0194854736328125,
-0.003536224365234375,
-0.022125244140625,
0.0147247314453125,
0.019622802734375,
0.0260162353515625,
-0.0106964111328125,
-0.03143310546875,
0.025115966796875,
-0.035675048828125,
-0.001079559326171875,
-0.0208587646484375,
-0.06793212890625,
-0.0283203125,
-0.03436279296875,
0.0322265625,
0.03472900390625,
-0.003162384033203125,
-0.04705810546875,
-0.02484130859375,
-0.00591278076171875,
0.024383544921875,
0.00270843505859375,
-0.03729248046875,
0.043121337890625,
0.03033447265625,
0.0313720703125,
-0.002048492431640625,
0.024658203125,
0.0265655517578125,
-0.022735595703125,
-0.00902557373046875,
-0.061248779296875,
0.0083465576171875,
0.03106689453125,
-0.0012454986572265625,
0.001590728759765625,
-0.0066070556640625,
0.00179290771484375,
0.0280914306640625,
-0.01340484619140625,
-0.00013363361358642578,
-0.027496337890625,
-0.0008950233459472656,
-0.03515625,
0.0199737548828125,
-0.01142120361328125,
-0.02362060546875,
0.0253448486328125,
-0.0159759521484375,
-0.031707763671875,
0.03912353515625,
-0.0290679931640625,
0.014678955078125,
0.05914306640625,
-0.014556884765625,
0.007843017578125,
0.021331787109375,
0.010101318359375,
0.0186309814453125,
0.004833221435546875,
0.01611328125,
-0.0087127685546875,
-0.025054931640625,
0.040557861328125,
0.052764892578125,
0.06195068359375,
-0.0181732177734375,
-0.01381683349609375,
0.006744384765625,
-0.043487548828125,
-0.016082763671875,
0.07073974609375,
0.05035400390625,
-0.08282470703125,
-0.004093170166015625,
0.01715087890625,
0.0028553009033203125,
-0.0143890380859375,
0.0032958984375,
0.00289154052734375,
-0.0247955322265625,
0.041290283203125,
-0.054412841796875,
-0.006252288818359375,
0.0034885406494140625,
-0.034149169921875,
0.009796142578125,
-0.005443572998046875,
0.07659912109375,
0.0102996826171875,
-0.024261474609375,
-0.01221466064453125,
-0.002117156982421875,
0.016204833984375,
-0.034088134765625,
-0.0027027130126953125,
0.0291748046875,
-0.023681640625,
-0.0567626953125,
0.03900146484375,
-0.00839996337890625,
-0.01282501220703125,
0.00299072265625,
0.01727294921875,
0.0009593963623046875,
0.052001953125,
-0.01360321044921875,
0.00445556640625,
0.013214111328125,
0.0038814544677734375,
-0.004619598388671875,
-0.031890869140625,
-0.01531219482421875,
0.0360107421875,
-0.0305633544921875,
0.0145111083984375,
-0.01375579833984375,
-0.0061187744140625,
-0.0178070068359375,
-0.06103515625,
0.029998779296875,
0.01116943359375,
-0.0145111083984375,
0.016021728515625,
0.00795745849609375,
-0.01404571533203125,
-0.01332855224609375,
0.01395416259765625,
-0.04803466796875,
0.01279449462890625,
-0.0067291259765625,
-0.01152801513671875,
-0.030975341796875,
-0.016204833984375,
-0.06304931640625,
0.10003662109375,
-0.0007796287536621094,
0.039093017578125,
0.02313232421875,
0.0166015625,
-0.0238494873046875,
0.01309967041015625,
-0.027862548828125,
0.049407958984375,
-0.0238037109375,
0.02398681640625,
-0.020416259765625,
0.01531982421875,
-0.0003612041473388672,
0.0005064010620117188,
-0.007904052734375,
-0.003818511962890625,
-0.044891357421875,
0.00608062744140625,
0.0733642578125,
0.07403564453125,
0.0657958984375,
0.017974853515625,
-0.0284881591796875,
0.0103759765625,
0.0023097991943359375,
-0.00933837890625,
0.020721435546875,
-0.005420684814453125,
-0.059783935546875,
0.006587982177734375,
0.0297393798828125,
0.034423828125,
0.0025997161865234375,
0.01025390625,
-0.0384521484375,
0.00896453857421875,
0.037689208984375,
0.0089569091796875,
0.004985809326171875,
0.0333251953125,
0.049560546875,
-0.07513427734375,
-0.0228424072265625,
-0.028228759765625,
0.04705810546875,
0.00916290283203125,
-0.0031147003173828125,
0.041534423828125,
0.00740814208984375,
0.002979278564453125,
-0.0216522216796875,
-0.0100250244140625,
-0.0107421875,
-0.00649261474609375,
0.0777587890625,
0.051788330078125,
0.01142120361328125,
-0.030029296875,
0.04425048828125,
0.060089111328125,
0.09210205078125,
-0.08758544921875,
0.032440185546875,
0.0272674560546875,
0.03466796875,
-0.0223541259765625,
-0.037078857421875,
-0.0018968582153320312,
-0.005855560302734375,
-0.017364501953125,
-0.01300811767578125,
0.0020847320556640625,
0.03887939453125,
-0.0148773193359375,
0.0006284713745117188,
-0.00452423095703125,
0.00833892822265625,
0.02825927734375,
-0.01317596435546875,
0.0142364501953125,
0.00955963134765625,
0.037872314453125,
-0.0047454833984375,
0.05645751953125,
-0.0291595458984375,
-0.006977081298828125,
0.0035800933837890625,
-0.00475311279296875,
0.0099029541015625,
-0.003231048583984375,
-0.03778076171875,
-0.039031982421875,
0.035675048828125,
0.050140380859375,
0.038055419921875,
0.036285400390625,
0.080810546875,
0.04425048828125,
-0.0382080078125,
-0.0015401840209960938,
0.0033416748046875,
-0.0244903564453125,
0.033294677734375,
0.0162353515625,
0.0162200927734375,
-0.0160064697265625,
-0.0217437744140625,
-0.0452880859375,
0.1043701171875,
-0.0194091796875,
-0.0104522705078125,
0.00337982177734375,
0.0211639404296875,
-0.0170745849609375,
0.0306396484375,
0.0333251953125,
-0.005237579345703125,
0.03564453125,
-0.04656982421875,
0.01442718505859375,
-0.0491943359375,
-0.0623779296875,
0.00284576416015625,
0.0210723876953125,
-0.0211944580078125,
0.029541015625,
-0.019287109375,
0.006221771240234375,
-0.004207611083984375,
0.0189666748046875,
0.00620269775390625,
0.06256103515625,
0.0295562744140625,
0.03289794921875,
-0.09722900390625,
-0.0467529296875,
-0.030181884765625,
0.041748046875,
0.0014591217041015625,
0.040771484375,
0.01126861572265625,
0.032745361328125,
-0.0567626953125,
-0.0159149169921875,
-0.04010009765625,
-0.04376220703125,
-0.0028553009033203125,
-0.016265869140625,
-0.01053619384765625,
0.01372528076171875,
-0.006961822509765625,
0.048980712890625,
0.0159912109375,
-0.0128631591796875,
0.0171051025390625,
-0.00629425048828125,
0.0085296630859375,
-0.0098114013671875,
-0.044403076171875,
-0.0377197265625,
-0.0024929046630859375,
0.0138702392578125,
-0.00595855712890625,
0.01335906982421875,
-0.019683837890625,
-0.00890350341796875,
0.0156402587890625,
-0.03436279296875,
-0.0065155029296875,
0.0163421630859375,
-0.025146484375,
0.0003643035888671875,
0.0245208740234375,
-0.03167724609375,
0.0236358642578125,
0.034149169921875,
-0.00026607513427734375,
0.02783203125,
0.0302734375,
-0.01111602783203125,
0.05224609375,
-0.02191162109375,
-0.039093017578125,
-0.02520751953125,
0.02655029296875,
0.03192138671875,
0.00798797607421875,
-0.056243896484375,
-0.005641937255859375,
-0.050262451171875,
0.0005903244018554688,
-0.0074005126953125,
0.0153961181640625,
-0.03363037109375,
0.019134521484375,
0.01004791259765625,
-0.01226043701171875,
-0.03448486328125,
-0.0548095703125,
0.007411956787109375,
-0.03192138671875,
0.0148468017578125,
-0.037933349609375,
-0.0019178390502929688,
-0.0184326171875,
-0.0260467529296875,
-0.046142578125,
0.0073394775390625,
0.04437255859375,
-0.03643798828125,
-0.035491943359375,
-0.0552978515625,
-0.0093841552734375,
-0.07147216796875,
-0.0067596435546875,
0.028411865234375,
-0.00970458984375,
-0.036224365234375,
-0.01445770263671875,
0.0184783935546875,
0.022003173828125,
0.0208282470703125,
-0.03173828125,
0.005008697509765625,
-0.003917694091796875,
-0.00203704833984375,
-0.07745361328125,
0.01154327392578125,
-0.11968994140625,
-0.0062408447265625,
0.05706787109375,
-0.028167724609375,
0.01296234130859375,
-0.0192718505859375,
-0.0115966796875,
-0.0310211181640625,
0.044097900390625,
-0.040924072265625,
-0.03753662109375,
0.00402069091796875,
-0.01351165771484375,
0.034423828125,
0.0098876953125,
-0.0293121337890625,
-0.016815185546875,
0.022979736328125,
0.012786865234375,
0.04412841796875,
0.02337646484375,
0.0250244140625,
0.0033016204833984375,
0.0213623046875,
0.00539398193359375,
-0.0086212158203125,
0.0149078369140625,
-0.0284576416015625,
0.0294036865234375,
0.040924072265625,
-0.03240966796875,
-0.0169525146484375,
-0.003818511962890625,
-0.018280029296875,
-0.02423095703125,
-0.0156097412109375,
-0.032012939453125,
-0.01473236083984375,
0.07574462890625,
0.04144287109375,
0.01427459716796875,
-0.038848876953125,
0.033599853515625,
0.01100921630859375,
-0.0286407470703125,
0.035491943359375,
0.002399444580078125,
0.002002716064453125,
0.009796142578125,
0.0070648193359375,
0.0135955810546875,
-0.0178680419921875,
-0.05181884765625,
-0.020050048828125,
-0.0374755859375,
-0.0430908203125,
0.0048675537109375,
0.020721435546875,
0.007320404052734375,
0.1068115234375,
-0.06549072265625,
-0.0247802734375,
0.03436279296875,
0.0078277587890625,
0.0201263427734375,
-0.0086669921875,
-0.0231475830078125,
-0.0256500244140625,
0.012542724609375,
0.019622802734375,
0.003910064697265625,
-0.006168365478515625,
0.007472991943359375,
0.00341033935546875,
-0.042694091796875,
0.009185791015625,
0.030548095703125,
0.0094451904296875,
-0.035369873046875,
0.0011854171752929688,
0.0286407470703125,
0.0205841064453125,
-0.0166473388671875,
0.0079193115234375,
-0.015655517578125,
0.042144775390625,
-0.01195526123046875,
-0.0135955810546875,
0.003406524658203125,
0.0026340484619140625,
0.0236358642578125,
0.00891876220703125,
0.056610107421875,
0.029754638671875,
-0.007434844970703125,
-0.0083465576171875,
-0.00003981590270996094,
-0.009246826171875
] |
f13dbb4c0629b6de8b42a98ee257a41c5c08e178
|
Wordpress Stackexchange
Q: Next and previous link in custom post type in the same taxonomy term I have a custom post type name->('portfolio'), with a taxonomy name 'portfolio_category'.
What I want is to add next and previous links on its single page file which is single-portfolio.php. When I click either of the links, it should redirect to the next or previous post in the same post type and in the same taxonomy term.
I used next_post_link() and previous_post_link() but it seems that it only works in single post but not in single custom post type..
Any suggestions will greatly be appreciated.
A: previous_post_link() and next_post_link() work perfectly with custom post types. You need to paste this code in your single-customposttype.php (which in your case is single-portfolio.php):
<div class="previous-post-link">
<?php previous_post_link('%link', '<< Previous Post', $in_same_term = true, $excluded_terms = '', $taxonomy = 'the-custom-taxonomy-associated-with-your-custom-post-type'); ?>
</div>
<div class="next-post-link">
<?php next_post_link('%link', 'Next Post >>', $in_same_term = true, $excluded_terms = '', $taxonomy = 'the-custom-taxonomy-associated-with-your-custom-post-type'); ?>
</div>
|
Q: Next and previous link in custom post type in the same taxonomy term I have a custom post type name->('portfolio'), with a taxonomy name 'portfolio_category'.
What I want is to add next and previous links on its single page file which is single-portfolio.php. When I click either of the links, it should redirect to the next or previous post in the same post type and in the same taxonomy term.
I used next_post_link() and previous_post_link() but it seems that it only works in single post but not in single custom post type..
Any suggestions will greatly be appreciated.
A: previous_post_link() and next_post_link() work perfectly with custom post types. You need to paste this code in your single-customposttype.php (which in your case is single-portfolio.php):
<div class="previous-post-link">
<?php previous_post_link('%link', '<< Previous Post', $in_same_term = true, $excluded_terms = '', $taxonomy = 'the-custom-taxonomy-associated-with-your-custom-post-type'); ?>
</div>
<div class="next-post-link">
<?php next_post_link('%link', 'Next Post >>', $in_same_term = true, $excluded_terms = '', $taxonomy = 'the-custom-taxonomy-associated-with-your-custom-post-type'); ?>
</div>
A: The $taxonomy parameter for both next_post_link and previous_post_link was introduced in Wordpress version 3.8.
When the $in_same_term parameter is set to true, you need to set the $taxonomy parameter to the desired taxonomy. By default, it is set to category. Remember, post_format is also a taxonomy
Example:
next_post_link( '%link', 'Next post in category', TRUE, ' ', 'post_format' );
Just a note, do not use next_post and previous_post. It has already being depreciated as from Wordpress version 2.0.0. See wp-includes/deprecated.php#L121 and wp-includes/deprecated.php#L158
EDIT
The single post links will automatically page between posts within the same post type as the current post's post type is used to retrieve the adjacent posts. Check the source code, get_adjacent_post() which is used by the next and previous post links. Pay particular attention to line 1550 ( currently for version 4.1 )
1550 $where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s AND p.post_status = 'publish' $where", $current_post_date, $post->post_type ), $in_same_term, $excluded_terms );
A: Add this code to your single-cpt.php file.
<?php previous_post_link('%link', 'Previous in CPT', TRUE) ?>
<?php next_post_link('%link', 'Next in CPT', TRUE) ?>
Where cpt is the name of your custom post type.
A: Try this is with thumbnail:
<?php $prevPost = get_previous_post(); if($prevPost) { ?>
<li class="previous">
<?php $prevthumbnail = get_the_post_thumbnail($prevPost->ID, array(80,80) ); ?>
<?php previous_post_link('%link', $prevthumbnail . '<strong>Prev</strong> <span>%title</span>', TRUE); ?>
</li>
<?php } $nextPost = get_next_post(); if($nextPost) { ?>
<li class="next">
<?php $nextthumbnail = get_the_post_thumbnail($nextPost->ID, array(80,80) ); ?>
<?php next_post_link('%link', $nextthumbnail . '<strong>Next</strong> <span>%title</span>', TRUE); ?>
</li>
<?php } ?>
|
wordpress
|
{
"language": "en",
"length": 414,
"provenance": "stackexchange_00019.jsonl.gz:421642",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57867"
}
|
[
0.09234619140625,
-0.01824951171875,
0.02593994140625,
-0.0823974609375,
0.023406982421875,
-0.01316070556640625,
0.034515380859375,
-0.0014410018920898438,
-0.007503509521484375,
0.0156707763671875,
-0.0295257568359375,
0.002765655517578125,
-0.0239410400390625,
-0.0225067138671875,
0.01218414306640625,
-0.040069580078125,
0.0159149169921875,
0.00946044921875,
0.045196533203125,
-0.0050811767578125,
-0.0026111602783203125,
-0.0004355907440185547,
0.041107177734375,
-0.00843048095703125,
0.016143798828125,
0.01314544677734375,
0.040924072265625,
-0.038299560546875,
0.005970001220703125,
-0.01910400390625,
0.014068603515625,
-0.0027446746826171875,
0.01471710205078125,
0.0482177734375,
-0.0292205810546875,
-0.0166015625,
0.028167724609375,
0.00533294677734375,
0.0026874542236328125,
0.02557373046875,
0.00748443603515625,
0.001995086669921875,
-0.0008983612060546875,
-0.0257415771484375,
-0.016571044921875,
-0.056182861328125,
0.024383544921875,
-0.0197906494140625,
0.0153656005859375,
0.0188751220703125,
0.033416748046875,
-0.034454345703125,
0.037200927734375,
-0.0083465576171875,
-0.02520751953125,
-0.0089569091796875,
-0.0382080078125,
-0.042022705078125,
0.0240936279296875,
0.03314208984375,
0.01145172119140625,
-0.0178375244140625,
0.00820159912109375,
-0.040924072265625,
-0.00547027587890625,
0.02081298828125,
-0.000028014183044433594,
0.01251220703125,
-0.056121826171875,
-0.017120361328125,
0.02862548828125,
-0.043182373046875,
0.0023746490478515625,
-0.00753021240234375,
-0.016754150390625,
-0.032196044921875,
0.01412200927734375,
-0.018646240234375,
-0.003086090087890625,
0.0172882080078125,
-0.05126953125,
0.0152130126953125,
-0.049163818359375,
-0.049407958984375,
-0.0041656494140625,
-0.024139404296875,
-0.0360107421875,
0.002773284912109375,
-0.04327392578125,
-0.0047149658203125,
-0.032257080078125,
-0.0180206298828125,
0.00418853759765625,
-0.013885498046875,
-0.01546478271484375,
-0.0019426345825195312,
0.00835418701171875,
0.03955078125,
-0.01290130615234375,
0.034515380859375,
-0.024566650390625,
-0.0221710205078125,
0.035980224609375,
-0.041839599609375,
0.01580810546875,
0.037506103515625,
-0.00811004638671875,
-0.0152130126953125,
0.0303192138671875,
0.005405426025390625,
-0.007663726806640625,
0.006015777587890625,
-0.018341064453125,
-0.0129547119140625,
-0.01525115966796875,
0.0213623046875,
-0.04083251953125,
0.0145263671875,
-0.00787353515625,
0.0073089599609375,
0.00847625732421875,
0.0321044921875,
0.01534271240234375,
-0.030120849609375,
0.02447509765625,
0.02349853515625,
-0.01309967041015625,
-0.057373046875,
0.05487060546875,
0.0258941650390625,
-0.047760009765625,
-0.0101318359375,
0.033782958984375,
0.01206207275390625,
0.0264739990234375,
-0.031402587890625,
0.013763427734375,
-0.034912109375,
-0.02508544921875,
0.0207672119140625,
-0.0200042724609375,
-0.043060302734375,
-0.010040283203125,
-0.02056884765625,
0.03521728515625,
0.0263671875,
0.01702880859375,
0.00695037841796875,
0.003803253173828125,
-0.033477783203125,
0.037078857421875,
-0.040496826171875,
0.06488037109375,
-0.01087188720703125,
-0.0694580078125,
-0.0364990234375,
-0.0050201416015625,
-0.0215606689453125,
-0.0217742919921875,
-0.0552978515625,
0.046478271484375,
-0.0005173683166503906,
0.0023555755615234375,
-0.035186767578125,
-0.041259765625,
-0.00675201416015625,
-0.0780029296875,
-0.01329803466796875,
0.0255889892578125,
0.0487060546875,
0.06671142578125,
-0.039947509765625,
-0.0112762451171875,
-0.0013418197631835938,
-0.006298065185546875,
-0.0173797607421875,
-0.00414276123046875,
-0.0173797607421875,
0.0160369873046875,
0.042694091796875,
-0.008453369140625,
-0.04437255859375,
0.0270233154296875,
-0.0206298828125,
-0.050079345703125,
0.031036376953125,
0.01453399658203125,
0.04833984375,
0.004154205322265625,
0.019744873046875,
0.0345458984375,
0.01580810546875,
-0.045745849609375,
0.00959014892578125,
0.0014247894287109375,
-0.001117706298828125,
0.0001627206802368164,
-0.007404327392578125,
-0.003253936767578125,
0.0028858184814453125,
-0.0390625,
0.0201416015625,
-0.01342010498046875,
0.01177978515625,
-0.0205230712890625,
-0.001041412353515625,
-0.01248931884765625,
0.045440673828125,
-0.0670166015625,
0.01103973388671875,
0.0445556640625,
-0.01367950439453125,
-0.01081085205078125,
-0.048187255859375,
0.016326904296875,
-0.0042266845703125,
0.0090789794921875,
0.00004106760025024414,
-0.00543212890625,
-0.00632476806640625,
0.004253387451171875,
-0.011932373046875,
-0.01514434814453125,
0.0220184326171875,
0.061004638671875,
0.020904541015625,
-0.032623291015625,
-0.0152587890625,
-0.013153076171875,
0.04180908203125,
-0.11566162109375,
0.0330810546875,
0.0111236572265625,
-0.026824951171875,
-0.043975830078125,
0.0294189453125,
0.0296478271484375,
-0.0036449432373046875,
-0.01026153564453125,
0.0272064208984375,
0.01678466796875,
0.0032100677490234375,
-0.033660888671875,
0.015716552734375,
0.0328369140625,
-0.004428863525390625,
0.0045013427734375,
0.005138397216796875,
0.0016937255859375,
0.03900146484375,
0.0227813720703125,
0.03271484375,
0.0074462890625,
0.0589599609375,
0.0167999267578125,
0.0186309814453125,
-0.001434326171875,
0.0006999969482421875,
-0.002246856689453125,
-0.0080718994140625,
0.0018243789672851562,
-0.0310516357421875,
-0.04119873046875,
-0.01285552978515625,
0.049713134765625,
-0.0010004043579101562,
0.042724609375,
0.00560760498046875,
-0.0250244140625,
-0.0172882080078125,
0.0189361572265625,
0.01000213623046875,
-0.012725830078125,
0.0140380859375,
0.053802490234375,
-0.0360107421875,
-0.0186767578125,
-0.0153045654296875,
0.004306793212890625,
-0.004184722900390625,
-0.0281829833984375,
0.01422119140625,
-0.0149078369140625,
-0.007358551025390625,
-0.00031280517578125,
-0.049346923828125,
0.006748199462890625,
0.00815582275390625,
0.0017595291137695312,
-0.0009036064147949219,
0.0290985107421875,
-0.016510009765625,
-0.04351806640625,
0.0236663818359375,
0.01776123046875,
-0.036163330078125,
-0.0784912109375,
-0.039276123046875,
0.03668212890625,
-0.062469482421875,
0.0266571044921875,
0.05242919921875,
-0.0302581787109375,
0.02703857421875,
0.0036449432373046875,
-0.00213623046875,
0.0163421630859375,
-0.0217742919921875,
-0.0279693603515625,
-0.0243072509765625,
-0.054779052734375,
-0.0299530029296875,
0.0181427001953125,
-0.0285491943359375,
0.0118255615234375,
-0.0201873779296875,
-0.0008130073547363281,
0.0093994140625,
-0.053314208984375,
-0.0242919921875,
0.0295257568359375,
-0.054656982421875,
0.0155792236328125,
0.04254150390625,
-0.037506103515625,
-0.0411376953125,
0.0888671875,
0.0006542205810546875,
0.02728271484375,
-0.043487548828125,
-0.06549072265625,
-0.06689453125,
-0.08148193359375,
-0.0189971923828125,
0.0009794235229492188,
-0.004665374755859375,
0.0196533203125,
0.0562744140625,
0.036102294921875,
-0.01105499267578125,
0.0616455078125,
-0.00458526611328125,
-0.031585693359375,
0.024444580078125,
-0.009185791015625,
0.0121612548828125,
0.00389862060546875,
0.006305694580078125,
0.05340576171875,
0.02008056640625,
-0.026519775390625,
-0.003742218017578125,
-0.0007824897766113281,
0.02716064453125,
0.03631591796875,
0.0225067138671875,
-0.008270263671875,
0.0562744140625,
0.051177978515625,
-0.00548553466796875,
-0.012542724609375,
-0.008026123046875,
-0.0288848876953125,
0.004222869873046875,
0.00290679931640625,
-0.00705718994140625,
-0.0205841064453125,
0.040771484375,
-0.05169677734375,
-0.01381683349609375,
-0.0221405029296875,
-0.042266845703125,
0.02520751953125,
-0.006404876708984375,
-0.01004791259765625,
0.036529541015625,
0.01153564453125,
-0.013885498046875,
0.017822265625,
-0.004123687744140625,
0.03216552734375,
0.00640106201171875,
0.0013666152954101562,
-0.055419921875,
-0.05206298828125,
0.0253448486328125,
-0.061981201171875,
0.002105712890625,
-0.039581298828125,
-0.0157928466796875,
-0.006473541259765625,
0.08758544921875,
-0.1146240234375,
0.01204681396484375,
0.00606536865234375,
0.007152557373046875,
0.03753662109375,
-0.048065185546875,
-0.0634765625,
-0.0287017822265625,
-0.0889892578125,
0.0207977294921875,
0.004398345947265625,
-0.0167694091796875,
-0.01558685302734375,
0.032470703125,
-0.07989501953125,
-0.0196075439453125,
0.0297393798828125,
-0.034515380859375,
0.00023758411407470703,
0.040679931640625,
-0.037506103515625,
0.008087158203125,
-0.03118896484375,
-0.021240234375,
-0.031494140625,
0.00028324127197265625,
0.00292205810546875,
0.0232391357421875,
0.0038661956787109375,
0.01171875,
-0.016326904296875,
0.025726318359375,
0.03045654296875,
-0.0259552001953125,
0.0256195068359375,
-0.0214996337890625,
0.032257080078125,
0.012603759765625,
-0.0222625732421875,
-0.00946044921875,
-0.0205841064453125,
-0.01337432861328125,
-0.0065460205078125,
0.049774169921875,
-0.01360321044921875,
0.0004341602325439453,
-0.00820159912109375,
-0.0071868896484375,
-0.040313720703125,
-0.01203155517578125,
-0.00972747802734375,
0.04840087890625,
-0.01181793212890625,
0.00023221969604492188,
-0.046875,
-0.07183837890625,
0.035980224609375,
-0.0230255126953125,
-0.0310821533203125,
0.002117156982421875,
0.0552978515625,
0.0304718017578125,
-0.006977081298828125,
-0.0022430419921875,
0.01407623291015625,
0.041839599609375,
0.028900146484375,
0.0128326416015625,
-0.015106201171875,
-0.0297088623046875,
0.051361083984375,
0.0160369873046875,
-0.0016183853149414062,
0.003429412841796875,
0.026336669921875,
0.003940582275390625,
-0.0309600830078125,
0.0197601318359375,
-0.01055908203125,
0.0145416259765625,
0.02020263671875,
-0.029327392578125,
-0.0283966064453125,
-0.0206298828125,
0.05535888671875,
-0.025787353515625,
0.041046142578125,
-0.047821044921875,
0.0129852294921875,
-0.0175323486328125,
0.0584716796875,
0.048858642578125,
0.04901123046875,
-0.0091552734375,
0.00666046142578125,
0.0146942138671875,
-0.00670623779296875,
0.008941650390625,
0.030426025390625,
0.00197601318359375,
0.0321044921875,
-0.007633209228515625,
-0.00576019287109375,
-0.0141448974609375,
-0.0017271041870117188,
0.0117340087890625,
0.025909423828125,
0.0130615234375,
-0.023956298828125,
0.01715087890625,
-0.006069183349609375,
-0.03369140625,
0.0124664306640625,
0.04296875,
0.0175628662109375,
-0.0013151168823242188,
0.01335906982421875,
0.0046539306640625,
-0.006237030029296875,
-0.038970947265625,
-0.0005502700805664062,
-0.004055023193359375,
0.0015697479248046875,
-0.0024280548095703125,
0.08306884765625,
0.019683837890625,
0.045501708984375,
-0.047607421875,
0.0340576171875,
0.051025390625,
0.008514404296875,
0.0200653076171875,
0.007167816162109375,
-0.017852783203125,
0.0070343017578125,
0.005077362060546875,
-0.038330078125,
0.003269195556640625,
0.005764007568359375,
0.043548583984375,
-0.0042724609375,
-0.020904541015625,
0.036376953125,
-0.006679534912109375,
-0.0134124755859375,
0.03656005859375,
0.047882080078125,
-0.03875732421875,
-0.003017425537109375,
0.044891357421875,
0.01238250732421875,
-0.0029296875,
-0.044647216796875,
0.0301361083984375,
-0.034576416015625,
0.0396728515625,
-0.036285400390625,
0.01165008544921875,
0.01229095458984375,
-0.00543212890625,
0.0244598388671875,
-0.007427215576171875,
-0.01334381103515625,
-0.014373779296875,
0.0029964447021484375,
-0.021728515625,
-0.0268096923828125,
0.0416259765625,
-0.0249786376953125,
0.036224365234375,
-0.049407958984375,
-0.0004944801330566406,
-0.01163482666015625,
-0.00391387939453125,
0.06488037109375,
0.032562255859375,
-0.0078887939453125,
0.0234527587890625,
-0.034271240234375,
-0.01837158203125,
0.00142669677734375,
-0.03192138671875,
-0.01338958740234375,
-0.02691650390625,
0.019195556640625,
0.0244293212890625,
-0.005596160888671875,
-0.025634765625,
-0.007114410400390625,
0.00662994384765625,
0.0107269287109375,
0.03253173828125,
0.0020847320556640625,
0.04022216796875,
0.031982421875,
0.084716796875,
0.033599853515625,
-0.0017957687377929688,
-0.05633544921875,
-0.029266357421875,
-0.00959014892578125,
-0.08721923828125,
-0.0168304443359375,
-0.0007586479187011719,
-0.0224456787109375,
0.05194091796875,
0.0277862548828125,
-0.00029349327087402344,
0.013671875,
0.0135650634765625,
0.0086517333984375,
-0.00237274169921875,
-0.05291748046875,
0.055572509765625,
-0.006992340087890625,
0.06634521484375,
0.007511138916015625,
0.0306854248046875,
0.0029773712158203125,
-0.0157928466796875,
-0.017364501953125,
0.0095367431640625,
0.00390625,
0.007030487060546875,
-0.0158233642578125,
-0.0131683349609375,
0.0193023681640625,
0.006435394287109375,
0.044281005859375,
0.0036754608154296875,
0.02252197265625,
0.06640625,
-0.0017986297607421875,
-0.003314971923828125,
0.0306854248046875,
0.0687255859375,
-0.001651763916015625,
-0.012969970703125,
0.031524658203125,
-0.034149169921875,
-0.02490234375,
0.0005383491516113281,
0.001556396484375,
-0.00785064697265625,
-0.0079193115234375,
-0.006298065185546875,
-0.0018310546875,
0.0281982421875,
0.004993438720703125,
0.0279083251953125,
0.0307769775390625,
-0.0241241455078125,
-0.004840850830078125,
-0.03021240234375,
-0.0196075439453125,
-0.01189422607421875,
0.0023975372314453125,
-0.00868988037109375,
0.01313018798828125,
-0.0041656494140625,
-0.06109619140625,
-0.033905029296875,
0.03515625,
-0.059417724609375,
-0.0227203369140625,
-0.0243988037109375,
-0.0004379749298095703,
-0.034149169921875,
-0.043701171875,
0.0088958740234375,
-0.039398193359375,
0.040283203125,
0.0340576171875,
-0.01136016845703125,
0.0285186767578125,
0.0235748291015625,
-0.00600433349609375,
0.0157012939453125,
-0.01763916015625,
-0.01163482666015625,
-0.031707763671875,
-0.0308380126953125,
0.01100921630859375,
0.023223876953125,
-0.0227203369140625,
0.0274810791015625,
-0.017730712890625,
-0.038330078125,
-0.0288848876953125,
0.0214080810546875,
0.1204833984375,
-0.027374267578125,
-0.0228118896484375,
0.033111572265625,
0.0213775634765625,
-0.0182037353515625,
0.0231475830078125,
0.00518035888671875,
-0.043914794921875,
-0.038787841796875,
0.0023956298828125,
-0.06463623046875,
0.01201629638671875,
0.003780364990234375,
-0.07159423828125,
0.1192626953125,
-0.032073974609375,
0.0626220703125,
0.031951904296875,
0.031585693359375,
-0.0101318359375,
0.01279449462890625,
-0.0255279541015625,
0.0220794677734375,
-0.01038360595703125,
0.03631591796875,
-0.03375244140625,
-0.00995635986328125,
0.0013914108276367188,
0.053314208984375,
0.080322265625,
0.0223388671875,
-0.042510986328125,
-0.003025054931640625,
0.09332275390625,
0.04241943359375,
-0.0067901611328125,
0.0343017578125,
0.002777099609375,
0.005657196044921875,
0.01453399658203125,
-0.00606536865234375,
0.036773681640625,
0.000698089599609375,
-0.025482177734375,
0.02252197265625,
0.0283966064453125,
0.02777099609375,
-0.0258026123046875,
-0.0205078125,
-0.053466796875,
0.003154754638671875,
0.033599853515625,
0.048828125,
-0.006183624267578125,
0.038238525390625,
0.0174407958984375,
-0.007076263427734375,
0.0260772705078125,
-0.030975341796875,
0.033477783203125,
-0.01058197021484375,
0.0234832763671875,
-0.005565643310546875,
0.0134735107421875,
0.060394287109375,
-0.0504150390625,
0.0087738037109375,
0.01097869873046875,
-0.0177459716796875,
0.0758056640625,
0.01366424560546875,
0.027069091796875,
-0.044097900390625,
0.0102691650390625,
0.043731689453125,
0.07061767578125,
-0.059326171875,
-0.01227569580078125,
0.0025005340576171875,
0.0009870529174804688,
-0.0020771026611328125,
-0.01235198974609375,
0.02203369140625,
0.037322998046875,
0.0133819580078125,
-0.066650390625,
-0.00705718994140625,
0.05364990234375,
0.0213165283203125,
-0.00936126708984375,
-0.01529693603515625,
-0.03436279296875,
-0.0212554931640625,
-0.07244873046875,
0.032989501953125,
0.0548095703125,
0.06884765625,
-0.0211181640625,
0.06768798828125,
0.01117706298828125,
-0.00775146484375,
0.0206451416015625,
0.01064300537109375,
-0.04022216796875,
0.002544403076171875,
-0.0255126953125,
-0.049530029296875,
-0.01308441162109375,
0.037384033203125,
0.004425048828125,
0.0316162109375,
0.0018129348754882812,
0.01039886474609375,
0.06732177734375,
-0.006984710693359375,
0.013153076171875,
-0.00691986083984375,
0.0179901123046875,
-0.045928955078125,
0.01519775390625,
0.003032684326171875,
-0.01358795166015625,
0.0008945465087890625,
-0.047088623046875,
0.052490234375,
-0.0088958740234375,
0.056182861328125,
-0.001926422119140625,
-0.0189971923828125,
0.0294189453125,
-0.012420654296875,
0.091796875,
0.0306854248046875,
-0.054718017578125,
-0.022491455078125,
-0.007198333740234375,
-0.03167724609375,
0.01367950439453125,
0.03131103515625,
-0.03656005859375,
0.037750244140625,
0.013427734375,
-0.013702392578125,
-0.032928466796875,
0.0223236083984375,
0.03167724609375,
0.0301666259765625,
-0.00439453125,
0.032684326171875,
-0.0209197998046875,
-0.015838623046875,
0.01153564453125,
0.038970947265625,
0.0035152435302734375,
0.0307464599609375,
-0.0197296142578125,
0.032257080078125,
0.0091705322265625,
0.0784912109375,
-0.06524658203125,
-0.0270843505859375,
0.047332763671875,
0.0015783309936523438,
0.046661376953125,
-0.00505828857421875,
-0.039947509765625,
0.0008635520935058594,
0.0423583984375,
-0.0401611328125,
0.023101806640625,
-0.0181732177734375,
0.00887298583984375,
-0.039306640625,
0.03021240234375,
-0.0276336669921875,
-0.01398468017578125,
-0.031982421875,
-0.022491455078125,
0.0257110595703125,
-0.00420379638671875,
-0.01483917236328125,
0.04833984375,
0.023681640625,
-0.00298309326171875,
0.0269012451171875,
-0.0338134765625,
0.051361083984375,
0.0290374755859375,
0.00771331787109375,
-0.005649566650390625,
0.0184326171875,
-0.009033203125,
-0.00496673583984375,
0.02215576171875,
0.00441741943359375,
0.00894927978515625,
-0.038665771484375,
0.0312347412109375,
0.0396728515625,
0.060943603515625,
0.0024509429931640625,
0.03399658203125,
0.029541015625,
-0.0166778564453125,
0.0076141357421875,
-0.018890380859375,
-0.0262908935546875,
-0.038055419921875,
0.00812530517578125,
0.039520263671875,
0.00415802001953125,
0.00278472900390625,
-0.05767822265625,
-0.0053558349609375,
0.046417236328125,
0.0116729736328125,
-0.038299560546875,
0.0234375,
-0.021728515625,
-0.0007305145263671875,
0.01181793212890625,
-0.040130615234375,
0.021270751953125,
0.0478515625,
0.01203155517578125,
-0.002605438232421875,
-0.0257415771484375,
-0.00707244873046875,
-0.033111572265625,
0.00893402099609375,
0.0141754150390625,
-0.02264404296875,
0.0164337158203125,
-0.0109710693359375,
0.0010433197021484375,
0.036285400390625,
0.02203369140625,
-0.01245880126953125,
0.0146636962890625,
0.00519561767578125,
-0.044830322265625,
-0.033905029296875,
0.030029296875,
-0.0265655517578125,
-0.0338134765625,
0.0419921875,
-0.036712646484375,
-0.00997161865234375,
-0.04827880859375,
-0.10040283203125,
0.06842041015625,
-0.01580810546875,
-0.047332763671875,
-0.0364990234375,
0.01262664794921875,
-0.0015544891357421875,
0.01090240478515625,
-0.007419586181640625,
-0.0194091796875,
-0.01439666748046875,
0.0236663818359375,
0.015106201171875,
0.07208251953125,
-0.0066070556640625,
0.017425537109375,
-0.0017137527465820312,
0.04022216796875,
0.0180816650390625,
0.01177978515625,
0.00841522216796875,
0.0017652511596679688,
0.01358795166015625,
0.029541015625,
-0.04241943359375,
0.005764007568359375,
-0.016876220703125,
0.017181396484375,
0.004180908203125,
-0.030548095703125,
-0.030181884765625,
-0.0282745361328125,
0.0230865478515625,
0.013031005859375,
0.011810302734375,
-0.0035877227783203125,
-0.01473236083984375,
-0.0210418701171875,
-0.058135986328125,
-0.0245208740234375,
0.03692626953125,
-0.08990478515625,
-0.0218353271484375,
0.0239105224609375,
0.0200042724609375,
-0.0060882568359375,
0.0005755424499511719,
-0.0214996337890625,
-0.0195159912109375,
0.02178955078125,
0.031494140625,
-0.0709228515625,
0.08135986328125,
0.0224151611328125,
-0.02362060546875,
0.010711669921875,
-0.03265380859375,
-0.02960205078125,
0.01800537109375,
-0.051788330078125,
0.006256103515625,
0.00728607177734375,
0.00634765625,
0.004993438720703125,
0.027069091796875,
0.0166473388671875,
0.01448822021484375,
-0.005313873291015625,
-0.00479888916015625,
0.018829345703125,
-0.0053558349609375,
0.0007572174072265625,
-0.0057220458984375,
0.04833984375,
0.00644683837890625,
0.08563232421875,
0.0032138824462890625,
0.039337158203125,
0.0231475830078125,
0.01363372802734375,
-0.0277252197265625,
0.0009522438049316406,
-0.00734710693359375,
-0.01329803466796875,
0.0003371238708496094,
-0.0098419189453125,
-0.034271240234375,
-0.0164337158203125,
0.0139007568359375,
0.06036376953125,
-0.0236053466796875,
0.0178375244140625
] |
9d8ef518b6f2be8acd7936536e17adde95c9cc4b
|
Wordpress Stackexchange
Q: WordPress comment count to include attachment comments How can I make the comment count on a post on my index page include comments that have been made on, in my case, individual gallery pictures that are included in the post? It seems that comments made on attachments like this aren't counted using the standard WordPress comments functions.
A: A gallery is a post with attached media. So maybe you'll find hints like this : just hook on get_comment_numbers() and pass $attachment_id.
I think in this case you'll have to add an SQL query to get the comment count for attachment and then you'll be able to add it to the total number of comments for post , something like this :
global $wpdb;
$wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE post_type = 'attachment'" ) ;
I haven't tested yet. Hopefully this will help you.
|
Q: WordPress comment count to include attachment comments How can I make the comment count on a post on my index page include comments that have been made on, in my case, individual gallery pictures that are included in the post? It seems that comments made on attachments like this aren't counted using the standard WordPress comments functions.
A: A gallery is a post with attached media. So maybe you'll find hints like this : just hook on get_comment_numbers() and pass $attachment_id.
I think in this case you'll have to add an SQL query to get the comment count for attachment and then you'll be able to add it to the total number of comments for post , something like this :
global $wpdb;
$wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE post_type = 'attachment'" ) ;
I haven't tested yet. Hopefully this will help you.
|
wordpress
|
{
"language": "en",
"length": 144,
"provenance": "stackexchange_00019.jsonl.gz:421647",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57883"
}
|
[
0.0655517578125,
0.003292083740234375,
-0.00933837890625,
-0.03692626953125,
0.0255889892578125,
-0.03887939453125,
0.05523681640625,
-0.0214385986328125,
0.0089263916015625,
0.02197265625,
-0.02471923828125,
-0.003936767578125,
-0.03656005859375,
-0.020355224609375,
-0.0299224853515625,
-0.04443359375,
0.0374755859375,
-0.0020313262939453125,
0.066162109375,
0.0192108154296875,
0.028656005859375,
0.0546875,
0.01305389404296875,
0.00537109375,
0.0006089210510253906,
-0.0092620849609375,
0.13134765625,
-0.017059326171875,
0.01434326171875,
-0.0191497802734375,
0.0248565673828125,
-0.034637451171875,
0.023406982421875,
-0.0010004043579101562,
-0.00997161865234375,
0.0205230712890625,
0.006839752197265625,
-0.011199951171875,
-0.00262451171875,
0.044921875,
0.05047607421875,
-0.02154541015625,
0.003826141357421875,
-0.037750244140625,
-0.00417327880859375,
0.0212249755859375,
0.01453399658203125,
-0.03692626953125,
0.05157470703125,
-0.06036376953125,
-0.015869140625,
0.058990478515625,
0.010986328125,
-0.047210693359375,
-0.0174713134765625,
0.01519775390625,
-0.0187225341796875,
0.0203704833984375,
0.0261688232421875,
-0.05328369140625,
-0.0263671875,
-0.0009975433349609375,
0.036651611328125,
0.0203399658203125,
0.0211029052734375,
-0.01097869873046875,
-0.0006322860717773438,
0.032318115234375,
0.0008921623229980469,
-0.0132293701171875,
-0.0080718994140625,
0.0016880035400390625,
-0.007312774658203125,
-0.0230560302734375,
0.012603759765625,
-0.0220947265625,
0.01224517822265625,
-0.0250091552734375,
-0.00077056884765625,
0.026824951171875,
0.045166015625,
0.01389312744140625,
-0.006511688232421875,
0.005146026611328125,
0.00855255126953125,
0.0076751708984375,
0.00032401084899902344,
-0.03662109375,
-0.00922393798828125,
-0.0189056396484375,
-0.00811004638671875,
-0.0362548828125,
-0.0203704833984375,
0.024139404296875,
-0.005161285400390625,
-0.016937255859375,
0.010650634765625,
0.035125732421875,
-0.014495849609375,
-0.006481170654296875,
-0.0116729736328125,
-0.02215576171875,
-0.0241546630859375,
-0.01422882080078125,
0.032318115234375,
0.01605224609375,
-0.0231781005859375,
-0.004486083984375,
0.0718994140625,
0.031707763671875,
0.0029277801513671875,
0.049774169921875,
-0.012176513671875,
-0.002483367919921875,
0.0027103424072265625,
0.0025463104248046875,
-0.045135498046875,
0.05224609375,
-0.0103302001953125,
0.0170135498046875,
-0.024627685546875,
-0.006412506103515625,
-0.0242919921875,
0.0400390625,
0.005840301513671875,
-0.00567626953125,
0.0034942626953125,
0.005046844482421875,
0.04296875,
0.0230560302734375,
-0.005828857421875,
0.026214599609375,
0.00434112548828125,
-0.0217742919921875,
-0.02642822265625,
-0.0027217864990234375,
-0.006496429443359375,
0.0025177001953125,
-0.032073974609375,
0.0177459716796875,
0.031890869140625,
-0.0263671875,
-0.01403045654296875,
-0.0093994140625,
0.01104736328125,
-0.003490447998046875,
0.0189208984375,
0.04107666015625,
-0.007564544677734375,
-0.0628662109375,
0.05596923828125,
0.0006031990051269531,
0.0167083740234375,
0.00794219970703125,
-0.004680633544921875,
-0.028564453125,
0.002105712890625,
-0.024932861328125,
0.0307769775390625,
-0.026123046875,
0.040985107421875,
0.0122528076171875,
-0.02239990234375,
-0.0037326812744140625,
-0.0217742919921875,
-0.0207366943359375,
-0.0104217529296875,
-0.0079193115234375,
0.020599365234375,
0.036224365234375,
-0.004962921142578125,
-0.07110595703125,
0.00650787353515625,
-0.00711822509765625,
-0.035308837890625,
0.035980224609375,
-0.0224761962890625,
-0.0019989013671875,
0.0012149810791015625,
0.051177978515625,
0.00862884521484375,
-0.039764404296875,
0.024261474609375,
-0.00978851318359375,
0.0006470680236816406,
0.006778717041015625,
0.02783203125,
0.0087890625,
-0.02703857421875,
0.01464080810546875,
0.0130767822265625,
0.0692138671875,
0.00536346435546875,
0.012725830078125,
-0.0276947021484375,
-0.015899658203125,
-0.003459930419921875,
0.025177001953125,
-0.03387451171875,
0.01181793212890625,
0.01009368896484375,
-0.00262451171875,
0.01447296142578125,
0.0014734268188476562,
-0.0022678375244140625,
0.0030117034912109375,
-0.0006041526794433594,
0.0232696533203125,
-0.05963134765625,
0.035980224609375,
0.047882080078125,
0.00566864013671875,
-0.055999755859375,
0.036865234375,
0.0350341796875,
-0.0181427001953125,
-0.00629425048828125,
0.0301971435546875,
-0.032501220703125,
0.0404052734375,
-0.032928466796875,
-0.0340576171875,
-0.04248046875,
0.00827789306640625,
0.047515869140625,
-0.0169677734375,
-0.0277557373046875,
-0.0281524658203125,
0.01345062255859375,
0.007778167724609375,
-0.074462890625,
0.04248046875,
-0.0204925537109375,
-0.0220947265625,
-0.050384521484375,
-0.0183563232421875,
-0.04486083984375,
-0.045745849609375,
-0.004161834716796875,
0.063720703125,
0.026519775390625,
0.002105712890625,
0.024169921875,
0.034881591796875,
0.053436279296875,
0.0071868896484375,
0.035125732421875,
-0.0164947509765625,
-0.021209716796875,
0.01397705078125,
0.0175018310546875,
0.014556884765625,
0.01088714599609375,
-0.02923583984375,
0.0072021484375,
0.034149169921875,
0.00672149658203125,
0.01319122314453125,
-0.0223541259765625,
0.0474853515625,
-0.01505279541015625,
0.0231781005859375,
0.01873779296875,
-0.01187896728515625,
-0.01824951171875,
-0.02484130859375,
0.012847900390625,
0.00420379638671875,
-0.01184844970703125,
-0.0268402099609375,
0.01554107666015625,
0.0250091552734375,
0.007114410400390625,
0.03546142578125,
-0.032135009765625,
0.046417236328125,
-0.02508544921875,
-0.001613616943359375,
0.027252197265625,
0.024017333984375,
-0.01340484619140625,
0.034637451171875,
-0.037200927734375,
-0.02288818359375,
-0.0236358642578125,
-0.0750732421875,
-0.0037326812744140625,
0.0066070556640625,
-0.087158203125,
-0.061553955078125,
-0.01568603515625,
0.050567626953125,
0.0181121826171875,
-0.032440185546875,
0.028289794921875,
0.006923675537109375,
0.01202392578125,
-0.060455322265625,
0.055877685546875,
-0.046539306640625,
0.052520751953125,
0.06549072265625,
-0.017669677734375,
0.00890350341796875,
-0.00005358457565307617,
-0.019500732421875,
-0.00734710693359375,
0.019287109375,
0.0009393692016601562,
-0.03802490234375,
-0.0004138946533203125,
0.0396728515625,
0.009490966796875,
0.04095458984375,
-0.0284576416015625,
-0.03228759765625,
-0.006561279296875,
0.01334381103515625,
-0.034515380859375,
-0.03399658203125,
0.053955078125,
-0.0716552734375,
-0.0160675048828125,
-0.02191162109375,
-0.04473876953125,
-0.012969970703125,
-0.0006256103515625,
-0.01629638671875,
-0.055877685546875,
-0.01189422607421875,
-0.0253753662109375,
-0.05462646484375,
-0.04052734375,
0.0272216796875,
-0.0005521774291992188,
0.02130126953125,
-0.0019388198852539062,
0.055267333984375,
-0.00897979736328125,
-0.040313720703125,
-0.0099639892578125,
-0.026153564453125,
0.006137847900390625,
-0.005565643310546875,
0.02447509765625,
-0.0306396484375,
-0.013153076171875,
-0.0027828216552734375,
0.015289306640625,
0.01513671875,
-0.01053619384765625,
-0.0011463165283203125,
0.0031909942626953125,
0.0031337738037109375,
0.01751708984375,
0.0247650146484375,
-0.0122222900390625,
0.0266571044921875,
0.03643798828125,
-0.026885986328125,
-0.0135498046875,
-0.0028934478759765625,
-0.0302276611328125,
-0.0885009765625,
0.0184478759765625,
0.004863739013671875,
-0.046478271484375,
-0.00652313232421875,
0.005779266357421875,
0.0012540817260742188,
0.036712646484375,
-0.035980224609375,
0.0517578125,
-0.01302337646484375,
-0.01495361328125,
-0.048919677734375,
0.003017425537109375,
-0.01263427734375,
-0.00931549072265625,
-0.0179290771484375,
0.0306243896484375,
-0.02557373046875,
0.051605224609375,
-0.05120849609375,
-0.040252685546875,
0.03778076171875,
0.0012712478637695312,
0.0072021484375,
-0.01399993896484375,
-0.02276611328125,
0.0033473968505859375,
0.06341552734375,
-0.017242431640625,
-0.042144775390625,
-0.02069091796875,
0.0155181884765625,
0.01268768310546875,
-0.01465606689453125,
0.047027587890625,
-0.03887939453125,
-0.03759765625,
0.034454345703125,
0.00797271728515625,
-0.022308349609375,
-0.030670166015625,
-0.0021495819091796875,
-0.03515625,
-0.032196044921875,
0.024078369140625,
-0.0174407958984375,
0.0034389495849609375,
0.026092529296875,
-0.028778076171875,
0.034637451171875,
-0.0063934326171875,
-0.039581298828125,
-0.0535888671875,
-0.00457763671875,
-0.0159454345703125,
0.060333251953125,
-0.0120849609375,
0.00998687744140625,
-0.0024738311767578125,
0.043731689453125,
-0.021148681640625,
0.016357421875,
-0.0278472900390625,
0.00885772705078125,
-0.03265380859375,
0.0166473388671875,
-0.0026493072509765625,
-0.00984954833984375,
0.002025604248046875,
-0.0191192626953125,
-0.018096923828125,
0.01136016845703125,
-0.0266265869140625,
-0.00013506412506103516,
-0.0232696533203125,
-0.005481719970703125,
0.010894775390625,
-0.0350341796875,
0.0028896331787109375,
0.0304107666015625,
0.006885528564453125,
0.003192901611328125,
-0.034088134765625,
0.01580810546875,
-0.0182037353515625,
-0.043853759765625,
-0.011016845703125,
0.04022216796875,
0.0648193359375,
0.01471710205078125,
0.01788330078125,
-0.068115234375,
-0.0022640228271484375,
0.043426513671875,
0.007625579833984375,
0.03173828125,
0.030487060546875,
-0.035247802734375,
0.04522705078125,
0.026580810546875,
0.00551605224609375,
-0.0401611328125,
0.03668212890625,
-0.00469207763671875,
-0.0262298583984375,
0.029052734375,
-0.022796630859375,
0.033905029296875,
-0.00601959228515625,
-0.040740966796875,
0.0151519775390625,
-0.035400390625,
0.01206207275390625,
-0.0064697265625,
0.035736083984375,
-0.01000213623046875,
-0.01873779296875,
-0.004032135009765625,
-0.0300140380859375,
0.0692138671875,
0.0280914306640625,
-0.00505828857421875,
0.042724609375,
0.047271728515625,
-0.0025539398193359375,
0.04339599609375,
0.0274200439453125,
0.002086639404296875,
0.039794921875,
0.032806396484375,
-0.0010814666748046875,
0.01332855224609375,
-0.004207611083984375,
-0.031341552734375,
0.01436614990234375,
-0.04522705078125,
0.0228729248046875,
0.0113983154296875,
-0.01030731201171875,
0.01554107666015625,
0.0088348388671875,
0.0391845703125,
-0.021331787109375,
-0.04595947265625,
-0.0258026123046875,
-0.0345458984375,
-0.03289794921875,
-0.06719970703125,
0.0225372314453125,
0.005519866943359375,
-0.0126800537109375,
0.04461669921875,
-0.00421142578125,
-0.007656097412109375,
0.0278472900390625,
-0.01212310791015625,
0.01983642578125,
0.0121612548828125,
0.0430908203125,
0.00136566162109375,
-0.005420684814453125,
-0.0087432861328125,
0.042724609375,
0.013153076171875,
-0.009857177734375,
-0.0009732246398925781,
0.0228271484375,
0.01434326171875,
-0.0030002593994140625,
-0.007183074951171875,
-0.0007872581481933594,
-0.031768798828125,
-0.0097808837890625,
-0.017578125,
-0.00286865234375,
0.0032501220703125,
0.003692626953125,
0.0010223388671875,
-0.0074615478515625,
0.00554656982421875,
-0.0207977294921875,
0.009735107421875,
-0.01605224609375,
0.0243682861328125,
0.036590576171875,
-0.02166748046875,
0.0066375732421875,
0.008941650390625,
-0.0035724639892578125,
-0.013275146484375,
-0.01059722900390625,
-0.026947021484375,
-0.0229949951171875,
-0.014007568359375,
-0.00021660327911376953,
0.047882080078125,
0.0184478759765625,
0.0102081298828125,
-0.057952880859375,
0.0086212158203125,
-0.036376953125,
-0.0123291015625,
0.0401611328125,
-0.0128936767578125,
0.059661865234375,
-0.042510986328125,
-0.03375244140625,
-0.053619384765625,
0.039276123046875,
0.013824462890625,
-0.0300750732421875,
-0.0186309814453125,
0.00772857666015625,
0.03399658203125,
-0.0162811279296875,
-0.0185546875,
-0.007045745849609375,
0.01776123046875,
0.00968170166015625,
0.058135986328125,
0.019805908203125,
0.0075225830078125,
0.03131103515625,
-0.00963592529296875,
0.031219482421875,
0.0179443359375,
-0.0088958740234375,
-0.044158935546875,
0.005962371826171875,
-0.017333984375,
0.001163482666015625,
0.013916015625,
0.006359100341796875,
-0.032958984375,
-0.0262451171875,
-0.006023406982421875,
0.029571533203125,
-0.019287109375,
-0.0088958740234375,
-0.0250701904296875,
0.0146942138671875,
-0.00647735595703125,
0.051849365234375,
-0.01496124267578125,
0.001800537109375,
0.03125,
-0.01523590087890625,
-0.00875091552734375,
-0.00775909423828125,
-0.0010614395141601562,
0.006832122802734375,
0.0185699462890625,
-0.03912353515625,
0.056976318359375,
0.05853271484375,
0.0028514862060546875,
0.032196044921875,
0.01560211181640625,
0.00597381591796875,
-0.00927734375,
0.07061767578125,
-0.0064239501953125,
-0.055633544921875,
0.07049560546875,
0.0325927734375,
-0.035797119140625,
0.036102294921875,
-0.037384033203125,
0.053619384765625,
-0.0200958251953125,
0.016204833984375,
-0.01216888427734375,
0.0222015380859375,
-0.039703369140625,
-0.03143310546875,
0.0875244140625,
-0.0421142578125,
0.018218994140625,
-0.0537109375,
0.08843994140625,
0.000029861927032470703,
-0.0232391357421875,
-0.00775909423828125,
-0.049285888671875,
-0.00704193115234375,
-0.0061798095703125,
-0.01369476318359375,
-0.007427215576171875,
-0.032867431640625,
-0.036834716796875,
0.04217529296875,
-0.062103271484375,
-0.028533935546875,
-0.03369140625,
0.0240936279296875,
-0.00218963623046875,
-0.071533203125,
0.0179443359375,
-0.06719970703125,
0.04119873046875,
0.0163116455078125,
0.0051116943359375,
0.024078369140625,
0.032989501953125,
-0.0025615692138671875,
-0.01190948486328125,
0.0214691162109375,
-0.034698486328125,
-0.068115234375,
-0.007785797119140625,
0.023040771484375,
0.0199432373046875,
-0.036407470703125,
0.030426025390625,
-0.04864501953125,
-0.0021572113037109375,
-0.004604339599609375,
0.014068603515625,
0.06158447265625,
-0.06951904296875,
0.00811004638671875,
0.04052734375,
0.0430908203125,
-0.006561279296875,
0.01519775390625,
0.039276123046875,
-0.0018768310546875,
-0.0058135986328125,
0.038177490234375,
-0.03466796875,
-0.04833984375,
0.006259918212890625,
-0.060546875,
0.060302734375,
-0.051849365234375,
0.051483154296875,
0.01776123046875,
0.0084381103515625,
0.006092071533203125,
0.00424957275390625,
-0.0216522216796875,
0.047119140625,
-0.03125,
0.059356689453125,
-0.0626220703125,
-0.021697998046875,
0.019195556640625,
0.065673828125,
0.0804443359375,
0.01509857177734375,
-0.031768798828125,
-0.0229034423828125,
0.06341552734375,
0.051055908203125,
0.0150146484375,
0.0355224609375,
0.00838470458984375,
-0.0003998279571533203,
0.046051025390625,
-0.0211639404296875,
0.02716064453125,
-0.0289306640625,
0.00621795654296875,
0.01126861572265625,
0.005157470703125,
0.0016803741455078125,
0.00817108154296875,
0.0855712890625,
-0.0006947517395019531,
-0.01422119140625,
0.0160675048828125,
-0.0155792236328125,
-0.03094482421875,
0.098388671875,
0.07196044921875,
-0.05535888671875,
-0.022674560546875,
-0.04644775390625,
0.061981201171875,
0.0108489990234375,
0.032684326171875,
0.0445556640625,
0.0190277099609375,
0.052337646484375,
-0.0160369873046875,
0.012725830078125,
-0.0141143798828125,
-0.01531219482421875,
0.026336669921875,
-0.01026153564453125,
0.0294036865234375,
-0.042938232421875,
-0.0292816162109375,
-0.004791259765625,
0.033782958984375,
-0.0136566162109375,
0.00774383544921875,
0.0230255126953125,
0.0162811279296875,
-0.0161590576171875,
-0.0174102783203125,
0.0242767333984375,
-0.00035262107849121094,
0.003276824951171875,
0.005962371826171875,
-0.0301971435546875,
-0.015777587890625,
0.052001953125,
0.003635406494140625,
0.0108489990234375,
-0.01849365234375,
-0.05938720703125,
-0.00506591796875,
-0.01535797119140625,
0.0258026123046875,
0.004673004150390625,
-0.0272216796875,
0.033050537109375,
0.0176239013671875,
0.02789306640625,
-0.00188446044921875,
0.00007039308547973633,
-0.023590087890625,
-0.00766754150390625,
-0.023406982421875,
-0.037078857421875,
0.0082550048828125,
0.035675048828125,
-0.0006651878356933594,
-0.006046295166015625,
-0.0048675537109375,
-0.01050567626953125,
-0.0018167495727539062,
-0.0195159912109375,
-0.016326904296875,
-0.035797119140625,
-0.0192718505859375,
-0.03350830078125,
0.043060302734375,
0.0748291015625,
0.0223236083984375,
-0.0017614364624023438,
-0.02825927734375,
0.1107177734375,
-0.01715087890625,
-0.016998291015625,
0.0102386474609375,
-0.017120361328125,
0.06365966796875,
0.0144500732421875,
0.01126861572265625,
0.018798828125,
-0.016448974609375,
0.003620147705078125,
0.0159759521484375,
-0.080078125,
0.00800323486328125,
0.034759521484375,
-0.0701904296875,
0.043609619140625,
-0.02435302734375,
-0.019561767578125,
0.019195556640625,
-0.0122222900390625,
0.0004818439483642578,
0.0293426513671875,
0.011810302734375,
0.00046706199645996094,
-0.02728271484375,
-0.043060302734375,
-0.0020923614501953125,
0.0552978515625,
0.0276641845703125,
0.07281494140625,
-0.01464080810546875,
0.033538818359375,
-0.0418701171875,
0.0207672119140625,
-0.02001953125,
-0.0169677734375,
0.003955841064453125,
0.0269927978515625,
0.00457000732421875,
-0.018524169921875,
-0.0309600830078125,
0.007572174072265625,
0.030487060546875,
-0.0258636474609375,
0.02606201171875,
-0.0289764404296875,
0.01212310791015625,
-0.0268402099609375,
0.0189971923828125,
-0.0273590087890625,
0.00701904296875,
0.0035686492919921875,
-0.0215301513671875,
0.01541900634765625,
-0.02288818359375,
0.0064697265625,
0.0819091796875,
-0.004550933837890625,
0.05780029296875,
-0.005596160888671875,
-0.02325439453125,
-0.01366424560546875,
0.025482177734375,
-0.05255126953125,
-0.00946044921875,
0.0182342529296875,
-0.0053558349609375,
0.0030574798583984375,
0.00893402099609375,
0.034454345703125,
0.0292205810546875,
-0.03759765625,
-0.048858642578125,
0.021453857421875,
0.040740966796875,
0.0179290771484375,
0.034820556640625,
-0.0523681640625,
-0.0185394287109375,
0.04229736328125,
-0.01277923583984375,
-0.01617431640625,
-0.0689697265625,
0.0095977783203125,
0.0278778076171875,
-0.034027099609375,
0.0289459228515625,
-0.0227203369140625,
-0.0134735107421875,
0.007843017578125,
0.02642822265625,
-0.07220458984375,
0.0595703125,
0.0198516845703125,
-0.01099395751953125,
-0.016265869140625,
-0.01372528076171875,
0.0247650146484375,
0.061309814453125,
-0.03411865234375,
-0.03253173828125,
-0.01300811767578125,
0.007556915283203125,
-0.04681396484375,
0.08599853515625,
0.08929443359375,
-0.0750732421875,
0.006206512451171875,
0.07562255859375,
0.076171875,
0.11749267578125,
0.00804901123046875,
-0.01496124267578125,
0.00977325439453125,
0.01522064208984375,
-0.00815582275390625,
-0.0296783447265625,
0.0098724365234375,
-0.0124359130859375,
0.004306793212890625,
-0.0147705078125,
-0.0002529621124267578,
0.021728515625,
-0.04498291015625,
-0.10919189453125,
0.02093505859375,
-0.02435302734375,
-0.04925537109375,
-0.09454345703125,
0.037078857421875,
0.0160980224609375,
0.04437255859375,
-0.024505615234375,
0.00537872314453125,
-0.0248260498046875,
0.0254974365234375,
0.0004420280456542969,
-0.019805908203125,
0.037872314453125,
-0.026214599609375,
-0.012847900390625,
0.009979248046875,
0.045562744140625,
-0.0019369125366210938,
0.0141754150390625,
-0.02349853515625,
0.056671142578125,
0.04974365234375,
-0.03302001953125,
0.02764892578125,
0.01197052001953125,
0.010986328125,
-0.003543853759765625,
-0.04473876953125,
-0.0151519775390625,
-0.00006633996963500977,
0.01541900634765625,
0.06707763671875,
-0.0003783702850341797,
-0.044219970703125,
0.036285400390625,
0.00007838010787963867,
-0.040924072265625,
-0.025360107421875,
0.00039696693420410156,
-0.0179443359375,
-0.020904541015625,
-0.03436279296875,
0.000995635986328125,
-0.0295867919921875,
-0.00910186767578125,
-0.0272064208984375,
-0.01448822021484375,
-0.0321044921875,
-0.0012025833129882812,
0.00839996337890625,
-0.01580810546875,
0.03692626953125,
-0.0263214111328125,
0.0189666748046875,
0.00443267822265625,
0.0029697418212890625,
0.03948974609375,
0.048828125,
-0.004772186279296875,
-0.035888671875,
0.017486572265625,
0.0160675048828125,
0.0158538818359375,
0.0018014907836914062,
0.0163421630859375,
-0.02801513671875,
0.0025653839111328125,
0.0023822784423828125,
0.00738525390625,
-0.0026378631591796875,
-0.007801055908203125,
-0.0014324188232421875,
-0.022186279296875,
0.023681640625,
-0.020172119140625,
0.006092071533203125,
-0.003513336181640625,
0.0135498046875,
-0.0130157470703125,
-0.0116119384765625,
0.031494140625,
-0.03631591796875,
-0.0033054351806640625,
0.027496337890625,
-0.03717041015625,
-0.046844482421875,
0.056396484375,
0.03582763671875,
0.0024814605712890625,
0.032440185546875
] |
d3da4f691441c42bc874bae03a04edcc911fef1e
|
Wordpress Stackexchange
Q: How to reorder meta box position? I have a custom post type which have a lot of custom field that categories in meta box. The problem is how do I sorting the meta box in the order that I desired?
As I know there is only 'high','core','normal' and 'side' for positioning the meta box, which is not a practical way to sorting the meta box. Let's say if I set 'high' position for two meta boxes, how do I know which one is on the top??
Thanks
A: Users can drag and drop meta boxes and WordPress will save the order. So, in a sense, the order in which they were originally rendered does not matter.
You know which one comes first because when you call add_meta_box it simply pushes your meta box's args onto a global array called $wp_meta_boxes. Whichever call to add_meta_box came first will be the first meta box.
|
Q: How to reorder meta box position? I have a custom post type which have a lot of custom field that categories in meta box. The problem is how do I sorting the meta box in the order that I desired?
As I know there is only 'high','core','normal' and 'side' for positioning the meta box, which is not a practical way to sorting the meta box. Let's say if I set 'high' position for two meta boxes, how do I know which one is on the top??
Thanks
A: Users can drag and drop meta boxes and WordPress will save the order. So, in a sense, the order in which they were originally rendered does not matter.
You know which one comes first because when you call add_meta_box it simply pushes your meta box's args onto a global array called $wp_meta_boxes. Whichever call to add_meta_box came first will be the first meta box.
A: In the following example, replace CPT with the post type name, like post, page, book, event, imaginary, foobar...
add_filter( 'get_user_option_meta-box-order_CPT', 'metabox_order' );
function metabox_order( $order ) {
return array(
'normal' => join(
",",
array( // vvv Arrange here as you desire
'customdiv-{CPT}',
'authordiv',
'slugdiv',
)
),
);
}
|
wordpress
|
{
"language": "en",
"length": 202,
"provenance": "stackexchange_00019.jsonl.gz:421653",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57897"
}
|
[
0.032623291015625,
-0.00475311279296875,
-0.0013675689697265625,
-0.00627899169921875,
-0.0006794929504394531,
-0.0229949951171875,
0.03082275390625,
-0.02825927734375,
0.018463134765625,
0.0501708984375,
0.0031032562255859375,
-0.041259765625,
0.037353515625,
-0.0138397216796875,
-0.06292724609375,
-0.0254364013671875,
0.046783447265625,
-0.03216552734375,
0.021209716796875,
-0.0170135498046875,
0.0211334228515625,
0.00650787353515625,
0.034820556640625,
0.0703125,
0.023895263671875,
-0.040771484375,
0.03338623046875,
-0.01398468017578125,
0.0208587646484375,
-0.005580902099609375,
0.0257110595703125,
0.0017566680908203125,
0.0247344970703125,
0.0033111572265625,
-0.003299713134765625,
0.037445068359375,
0.0257415771484375,
-0.0033416748046875,
0.00428009033203125,
0.0241546630859375,
0.003215789794921875,
0.006855010986328125,
-0.0226593017578125,
-0.00600433349609375,
-0.0189208984375,
-0.042083740234375,
0.0025196075439453125,
-0.0188140869140625,
0.0391845703125,
-0.0298614501953125,
-0.0019359588623046875,
-0.00506591796875,
0.029541015625,
-0.0831298828125,
-0.02655029296875,
-0.0238037109375,
-0.0192108154296875,
0.02081298828125,
0.02239990234375,
0.01200103759765625,
0.00003790855407714844,
0.02655029296875,
0.00319671630859375,
-0.0213470458984375,
-0.01105499267578125,
0.003452301025390625,
-0.005817413330078125,
0.013031005859375,
-0.039703369140625,
0.0005249977111816406,
0.0269927978515625,
-0.02703857421875,
0.007091522216796875,
-0.0272064208984375,
-0.0022602081298828125,
-0.003253936767578125,
-0.00817108154296875,
-0.00885009765625,
0.0261077880859375,
-0.01490020751953125,
0.0168609619140625,
0.042327880859375,
0.0267791748046875,
-0.0489501953125,
0.00699615478515625,
-0.03369140625,
-0.023956298828125,
-0.01464080810546875,
-0.017974853515625,
-0.047760009765625,
-0.0110931396484375,
-0.09600830078125,
-0.0184478759765625,
0.0295562744140625,
-0.006542205810546875,
-0.017242431640625,
0.0273895263671875,
0.0229034423828125,
-0.019622802734375,
-0.034576416015625,
-0.01221466064453125,
-0.02325439453125,
-0.0244598388671875,
0.005031585693359375,
0.01702880859375,
-0.01995849609375,
-0.038543701171875,
-0.09100341796875,
0.01092529296875,
0.045806884765625,
-0.04193115234375,
-0.001117706298828125,
0.028533935546875,
-0.005901336669921875,
-0.0210418701171875,
-0.005840301513671875,
0.0037670135498046875,
0.00015413761138916016,
-0.01392364501953125,
-0.026641845703125,
0.0018320083618164062,
0.0197906494140625,
0.0287933349609375,
-0.057891845703125,
0.0285797119140625,
0.00640106201171875,
-0.036407470703125,
-0.0382080078125,
-0.092041015625,
0.047943115234375,
-0.03216552734375,
0.0012454986572265625,
0.060272216796875,
0.06768798828125,
0.0136871337890625,
-0.0261688232421875,
0.031097412109375,
-0.0277862548828125,
0.004238128662109375,
0.0016393661499023438,
0.00701904296875,
-0.0286407470703125,
-0.0012025833129882812,
0.004642486572265625,
-0.0215606689453125,
0.03704833984375,
0.02001953125,
-0.0196075439453125,
-0.0188140869140625,
-0.056610107421875,
-0.0236053466796875,
-0.042999267578125,
0.025390625,
0.0054473876953125,
0.0201873779296875,
0.0079498291015625,
0.0802001953125,
-0.039642333984375,
-0.04583740234375,
-0.04144287109375,
-0.029937744140625,
0.00640869140625,
0.03118896484375,
-0.0311737060546875,
-0.0211334228515625,
-0.00782012939453125,
-0.0123291015625,
0.0051727294921875,
0.0231781005859375,
0.027679443359375,
0.0274200439453125,
0.02752685546875,
-0.0014925003051757812,
0.0137939453125,
-0.00897979736328125,
-0.01103973388671875,
0.02764892578125,
-0.0095062255859375,
-0.0078887939453125,
0.0305023193359375,
-0.01995849609375,
-0.042572021484375,
-0.0124969482421875,
-0.012786865234375,
-0.0254974365234375,
0.044586181640625,
-0.021514892578125,
0.01145172119140625,
0.0146942138671875,
-0.005237579345703125,
0.018829345703125,
0.0268096923828125,
-0.04766845703125,
0.022186279296875,
0.004241943359375,
0.02947998046875,
-0.0281982421875,
0.0272674560546875,
-0.00847625732421875,
-0.03729248046875,
-0.0302734375,
0.01250457763671875,
-0.0084991455078125,
0.0106964111328125,
0.00313568115234375,
-0.0012121200561523438,
0.004154205322265625,
0.032928466796875,
-0.0041656494140625,
-0.00824737548828125,
0.022552490234375,
-0.0031585693359375,
-0.01177978515625,
-0.029937744140625,
-0.0297698974609375,
0.046966552734375,
0.01465606689453125,
0.0195159912109375,
-0.00959014892578125,
0.015899658203125,
-0.0304718017578125,
-0.0211029052734375,
-0.046051025390625,
0.0214691162109375,
0.056640625,
0.0167388916015625,
-0.02606201171875,
-0.01580810546875,
0.0438232421875,
0.018280029296875,
-0.051910400390625,
0.028167724609375,
-0.0051422119140625,
0.023956298828125,
-0.038177490234375,
-0.006298065185546875,
0.0216064453125,
-0.0165252685546875,
0.030975341796875,
0.0216522216796875,
0.004268646240234375,
0.033050537109375,
0.014312744140625,
0.07550048828125,
0.021728515625,
-0.0253753662109375,
0.006183624267578125,
0.03607177734375,
0.0270843505859375,
0.07366943359375,
-0.033782958984375,
-0.0013780593872070312,
0.0131683349609375,
-0.005222320556640625,
0.00888824462890625,
0.03424072265625,
-0.0249481201171875,
0.006069183349609375,
-0.00928497314453125,
-0.0184326171875,
0.0036640167236328125,
-0.031158447265625,
-0.0213470458984375,
-0.0191802978515625,
0.064697265625,
-0.027618408203125,
0.0345458984375,
0.01309967041015625,
-0.00150299072265625,
-0.0138397216796875,
0.00023543834686279297,
-0.049468994140625,
-0.0017118453979492188,
-0.004703521728515625,
-0.003902435302734375,
-0.006378173828125,
-0.01226806640625,
0.00357818603515625,
0.00988006591796875,
-0.0174102783203125,
-0.0019664764404296875,
0.039947509765625,
-0.041229248046875,
-0.001178741455078125,
-0.0199737548828125,
-0.044677734375,
-0.003757476806640625,
0.0467529296875,
0.004436492919921875,
-0.004669189453125,
0.0219879150390625,
0.0133819580078125,
-0.01105499267578125,
0.01056671142578125,
-0.003993988037109375,
-0.0205535888671875,
-0.01751708984375,
-0.0404052734375,
0.0306549072265625,
-0.0369873046875,
0.004558563232421875,
0.055938720703125,
-0.01383209228515625,
0.006626129150390625,
-0.023193359375,
0.0455322265625,
-0.039276123046875,
0.003753662109375,
-0.0118865966796875,
-0.051513671875,
-0.0142059326171875,
0.010345458984375,
0.0246124267578125,
-0.005584716796875,
0.053985595703125,
-0.00545501708984375,
0.030670166015625,
0.0268402099609375,
-0.044708251953125,
-0.058685302734375,
0.031707763671875,
-0.0037670135498046875,
-0.01806640625,
0.0172271728515625,
-0.0208282470703125,
-0.0153045654296875,
0.0295867919921875,
-0.0183258056640625,
0.04632568359375,
-0.036834716796875,
-0.01316070556640625,
-0.016265869140625,
-0.04132080078125,
-0.046234130859375,
0.018157958984375,
-0.0222320556640625,
-0.0062408447265625,
0.11419677734375,
0.00487518310546875,
-0.06793212890625,
-0.022430419921875,
0.0200958251953125,
-0.0181427001953125,
0.0040740966796875,
0.041595458984375,
-0.03790283203125,
0.00955963134765625,
0.0008392333984375,
0.015655517578125,
0.01751708984375,
-0.0352783203125,
-0.0177459716796875,
-0.044097900390625,
-0.0025806427001953125,
-0.02001953125,
0.0279388427734375,
0.05206298828125,
-0.0107879638671875,
0.009674072265625,
-0.037567138671875,
-0.0170745849609375,
0.029388427734375,
-0.0019969940185546875,
-0.0246124267578125,
-0.040679931640625,
0.0093841552734375,
-0.02569580078125,
0.046142578125,
0.0247802734375,
0.035247802734375,
0.0204315185546875,
0.01419830322265625,
0.0078887939453125,
-0.0223388671875,
-0.02056884765625,
-0.0552978515625,
-0.002178192138671875,
-0.0184783935546875,
0.0223236083984375,
-0.0124053955078125,
0.03369140625,
-0.022186279296875,
0.045745849609375,
-0.047027587890625,
-0.05926513671875,
0.0443115234375,
-0.002841949462890625,
0.0189208984375,
-0.0142059326171875,
-0.035400390625,
0.0204925537109375,
0.1199951171875,
-0.0604248046875,
-0.01514434814453125,
0.00426483154296875,
-0.00003063678741455078,
-0.0241851806640625,
0.019134521484375,
-0.062286376953125,
-0.004985809326171875,
-0.1392822265625,
0.018524169921875,
0.021942138671875,
-0.07489013671875,
-0.0054779052734375,
0.0382080078125,
-0.0982666015625,
-0.037933349609375,
0.049896240234375,
-0.03656005859375,
0.0185699462890625,
0.002246856689453125,
0.0226898193359375,
-0.0281982421875,
-0.0186004638671875,
-0.00798797607421875,
-0.072021484375,
-0.01013946533203125,
-0.01148223876953125,
0.04254150390625,
-0.0204010009765625,
0.020660400390625,
-0.0201568603515625,
0.043060302734375,
-0.01922607421875,
0.01045989990234375,
0.0182342529296875,
0.044647216796875,
0.033599853515625,
-0.050537109375,
0.0011987686157226562,
-0.04736328125,
0.00218963623046875,
0.007472991943359375,
-0.037200927734375,
0.025482177734375,
-0.0228271484375,
0.02117919921875,
0.0038013458251953125,
-0.0236053466796875,
-0.0021343231201171875,
-0.053375244140625,
-0.077392578125,
-0.00153350830078125,
-0.03076171875,
-0.004459381103515625,
-0.0513916015625,
-0.046844482421875,
-0.04925537109375,
-0.0198822021484375,
-0.03533935546875,
0.039031982421875,
0.034149169921875,
0.036590576171875,
0.023651123046875,
-0.048583984375,
0.0002791881561279297,
0.03424072265625,
0.05145263671875,
-0.00579833984375,
0.005126953125,
-0.0178070068359375,
-0.0195159912109375,
0.0223388671875,
0.01146697998046875,
-0.00861358642578125,
0.0576171875,
-0.0178070068359375,
-0.042877197265625,
0.039581298828125,
-0.0182647705078125,
-0.024810791015625,
0.024322509765625,
-0.00580596923828125,
-0.01335906982421875,
-0.05816650390625,
0.022003173828125,
0.0192718505859375,
-0.00981903076171875,
-0.04156494140625,
-0.0313720703125,
0.00933837890625,
0.001186370849609375,
0.06256103515625,
0.03643798828125,
-0.01270294189453125,
0.042327880859375,
0.022705078125,
-0.007396697998046875,
0.019683837890625,
-0.0219268798828125,
0.006504058837890625,
0.00606536865234375,
0.01439666748046875,
-0.00963592529296875,
0.02703857421875,
-0.00640106201171875,
0.06927490234375,
0.0008668899536132812,
-0.0254058837890625,
-0.0556640625,
-0.005130767822265625,
0.057220458984375,
0.0019550323486328125,
-0.0296478271484375,
-0.00907135009765625,
0.022064208984375,
0.00659942626953125,
0.0236968994140625,
-0.00965118408203125,
0.014984130859375,
-0.0106964111328125,
0.02215576171875,
0.0160064697265625,
-0.01654052734375,
-0.02044677734375,
0.0594482421875,
-0.0106048583984375,
0.01451873779296875,
-0.005786895751953125,
0.004154205322265625,
0.0113677978515625,
0.022247314453125,
0.0321044921875,
-0.02484130859375,
0.025909423828125,
-0.031890869140625,
0.0168304443359375,
-0.021209716796875,
0.01580810546875,
-0.0073699951171875,
0.006683349609375,
-0.01035308837890625,
-0.01177215576171875,
0.037109375,
-0.01490020751953125,
-0.01788330078125,
0.0099029541015625,
0.00457000732421875,
-0.027740478515625,
0.0012178421020507812,
-0.02203369140625,
-0.0194091796875,
-0.01114654541015625,
0.01128387451171875,
0.00786590576171875,
-0.0015554428100585938,
0.043792724609375,
-0.050506591796875,
0.04779052734375,
-0.02423095703125,
-0.0284881591796875,
-0.068115234375,
0.02642822265625,
0.032806396484375,
-0.043060302734375,
-0.09039306640625,
0.0254974365234375,
-0.03900146484375,
0.0244903564453125,
-0.03424072265625,
0.033905029296875,
-0.03521728515625,
0.034698486328125,
-0.05352783203125,
0.033050537109375,
0.001010894775390625,
0.0023899078369140625,
0.0018739700317382812,
-0.0179901123046875,
-0.0633544921875,
-0.032745361328125,
-0.0118865966796875,
-0.0328369140625,
-0.0191802978515625,
0.0003991127014160156,
0.0266265869140625,
0.052764892578125,
-0.0108184814453125,
-0.0482177734375,
0.00872039794921875,
-0.032012939453125,
-0.0185394287109375,
0.033172607421875,
-0.01678466796875,
0.0268707275390625,
0.005420684814453125,
0.0506591796875,
-0.0013532638549804688,
0.004573822021484375,
0.014495849609375,
-0.025299072265625,
0.019317626953125,
-0.042388916015625,
-0.043304443359375,
-0.0280609130859375,
-0.037139892578125,
0.0224456787109375,
0.048248291015625,
-0.013336181640625,
0.035430908203125,
-0.006771087646484375,
0.00586700439453125,
-0.019195556640625,
-0.0102386474609375,
-0.031341552734375,
0.029876708984375,
0.016357421875,
-0.0253143310546875,
0.011627197265625,
-0.00952911376953125,
-0.0183258056640625,
0.05877685546875,
-0.023773193359375,
0.04705810546875,
0.0047149658203125,
-0.060516357421875,
0.022705078125,
0.0191497802734375,
0.0615234375,
0.06719970703125,
-0.004894256591796875,
0.0616455078125,
0.01494598388671875,
-0.01328277587890625,
0.033935546875,
0.001796722412109375,
0.0528564453125,
-0.004177093505859375,
-0.000446319580078125,
0.044158935546875,
-0.021759033203125,
0.01690673828125,
-0.0018253326416015625,
0.0538330078125,
-0.0282135009765625,
0.0252227783203125,
0.020263671875,
-0.0017242431640625,
0.0294952392578125,
0.003055572509765625,
-0.004909515380859375,
0.0006246566772460938,
0.040252685546875,
-0.01039886474609375,
-0.00585174560546875,
0.0309906005859375,
-0.0121307373046875,
-0.024993896484375,
-0.047332763671875,
-0.040802001953125,
-0.0045928955078125,
0.02252197265625,
0.0134124755859375,
-0.029510498046875,
0.00841522216796875,
-0.0149078369140625,
-0.0026454925537109375,
-0.010223388671875,
-0.015167236328125,
-0.0499267578125,
-0.00952911376953125,
-0.025665283203125,
0.00807952880859375,
0.0258941650390625,
-0.0186004638671875,
0.0521240234375,
0.04742431640625,
-0.0062255859375,
0.005542755126953125,
-0.0010738372802734375,
0.002674102783203125,
-0.0112762451171875,
-0.03460693359375,
0.033447265625,
-0.0156707763671875,
-0.018280029296875,
0.0173187255859375,
0.00418853759765625,
-0.06646728515625,
-0.020294189453125,
-0.03955078125,
0.0295867919921875,
-0.020416259765625,
0.0024967193603515625,
0.028900146484375,
0.06744384765625,
-0.01087188720703125,
0.0197296142578125,
0.01617431640625,
-0.0234222412109375,
0.0071258544921875,
0.028228759765625,
-0.003475189208984375,
-0.0023899078369140625,
0.042236328125,
-0.04315185546875,
0.047332763671875,
0.01021575927734375,
0.0004940032958984375,
-0.0086517333984375,
0.0174713134765625,
-0.004047393798828125,
0.01214599609375,
-0.0159149169921875,
0.0699462890625,
-0.0095062255859375,
0.040679931640625,
-0.08380126953125,
-0.0323486328125,
0.0010986328125,
0.08416748046875,
0.027618408203125,
0.0029201507568359375,
-0.057861328125,
-0.0084381103515625,
0.056427001953125,
0.0850830078125,
0.049041748046875,
0.0270233154296875,
0.00308990478515625,
0.034698486328125,
-0.002590179443359375,
-0.0116119384765625,
0.0293121337890625,
-0.0233306884765625,
-0.0643310546875,
0.01081085205078125,
0.012237548828125,
-0.01207733154296875,
-0.032318115234375,
0.046478271484375,
-0.039154052734375,
-0.0193634033203125,
0.0221710205078125,
0.03076171875,
0.01131439208984375,
0.004688262939453125,
0.0087738037109375,
-0.0011453628540039062,
-0.021514892578125,
0.00229644775390625,
0.033966064453125,
0.014190673828125,
0.0712890625,
0.056182861328125,
0.046905517578125,
0.03369140625,
-0.0291900634765625,
0.0416259765625,
-0.012847900390625,
-0.054779052734375,
0.054718017578125,
0.00817108154296875,
0.01108551025390625,
-0.046844482421875,
-0.009857177734375,
0.039642333984375,
0.0689697265625,
-0.037628173828125,
-0.0254364013671875,
0.01320648193359375,
-0.015716552734375,
0.0104217529296875,
-0.02288818359375,
-0.0002872943878173828,
-0.057525634765625,
-0.032135009765625,
-0.0809326171875,
-0.0273895263671875,
0.0042724609375,
0.0687255859375,
-0.03009033203125,
-0.03228759765625,
0.004215240478515625,
-0.07403564453125,
-0.041839599609375,
0.00879669189453125,
0.038055419921875,
0.0477294921875,
0.006526947021484375,
0.056549072265625,
0.0263519287109375,
-0.0206451416015625,
-0.0206146240234375,
0.0187225341796875,
-0.01219940185546875,
0.032958984375,
-0.033966064453125,
-0.0257110595703125,
0.006580352783203125,
0.03900146484375,
0.050201416015625,
0.034210205078125,
0.059326171875,
0.06829833984375,
0.01287841796875,
0.008087158203125,
0.08819580078125,
-0.007076263427734375,
-0.0174102783203125,
-0.036285400390625,
0.04315185546875,
0.0438232421875,
0.0245361328125,
0.0126953125,
0.0235443115234375,
0.050506591796875,
0.01383209228515625,
0.0191802978515625,
0.01666259765625,
0.006336212158203125,
0.0426025390625,
-0.005817413330078125,
0.018798828125,
0.0250701904296875,
-0.0277557373046875,
-0.00736236572265625,
-0.04742431640625,
-0.0267791748046875,
0.0225372314453125,
0.034423828125,
-0.002864837646484375,
0.0120391845703125,
-0.01377105712890625,
-0.0428466796875,
0.01412200927734375,
-0.001209259033203125,
0.049560546875,
0.0643310546875,
-0.0185546875,
0.0234222412109375,
-0.043853759765625,
-0.022003173828125,
0.0105743408203125,
0.01018524169921875,
0.0152587890625,
0.0130157470703125,
0.0300140380859375,
0.0123138427734375,
-0.039215087890625,
-0.029510498046875,
0.005718231201171875,
-0.042938232421875,
0.0548095703125,
0.0294189453125,
-0.0217437744140625,
-0.01727294921875,
0.030853271484375,
0.0014429092407226562,
0.067138671875,
-0.04046630859375,
-0.0008182525634765625,
-0.00604248046875,
0.01739501953125,
-0.0460205078125,
0.01094818115234375,
-0.034820556640625,
-0.024169921875,
-0.043609619140625,
-0.0184173583984375,
0.0176239013671875,
0.0027523040771484375,
-0.010467529296875,
0.0009546279907226562,
0.04779052734375,
-0.0301971435546875,
0.016326904296875,
-0.01078033447265625,
0.052886962890625,
0.03314208984375,
0.01297760009765625,
-0.03167724609375,
0.0037517547607421875,
-0.01107025146484375,
0.00878143310546875,
0.01277923583984375,
0.001880645751953125,
0.03582763671875,
-0.07269287109375,
0.0281829833984375,
0.051727294921875,
0.0555419921875,
0.00579071044921875,
0.00545501708984375,
0.03594970703125,
-0.014068603515625,
-0.03302001953125,
0.02728271484375,
-0.0135650634765625,
-0.006839752197265625,
0.0021991729736328125,
0.00891876220703125,
0.0301666259765625,
0.0089111328125,
-0.001983642578125,
-0.0180206298828125,
0.0237579345703125,
0.005046844482421875,
-0.019561767578125,
0.0015115737915039062,
0.0013408660888671875,
-0.0113983154296875,
0.0022487640380859375,
-0.0285186767578125,
0.00490570068359375,
0.069580078125,
0.0013742446899414062,
-0.01050567626953125,
-0.033905029296875,
0.00543975830078125,
-0.037078857421875,
0.006526947021484375,
-0.018646240234375,
-0.02001953125,
0.038818359375,
-0.01078033447265625,
0.020538330078125,
0.02716064453125,
0.037322998046875,
-0.01849365234375,
0.01439666748046875,
0.0166778564453125,
-0.0157928466796875,
-0.064208984375,
-0.005458831787109375,
-0.01361846923828125,
0.008544921875,
-0.050262451171875,
0.0309600830078125,
0.03472900390625,
-0.01540374755859375,
-0.0222015380859375,
0.03375244140625,
-0.005962371826171875,
-0.0166168212890625,
-0.0601806640625,
0.012298583984375,
0.006412506103515625,
0.048004150390625,
0.00647735595703125,
-0.030120849609375,
-0.04547119140625,
0.00836181640625,
-0.003765106201171875,
0.047760009765625,
0.0147857666015625,
-0.0018510818481445312,
-0.027496337890625,
-0.02056884765625,
-0.037872314453125,
-0.0030498504638671875,
-0.041839599609375,
-0.01220703125,
0.01500701904296875,
0.011749267578125,
-0.03570556640625,
-0.0098419189453125,
0.037567138671875,
0.04541015625,
0.0026493072509765625,
-0.026519775390625,
-0.03814697265625,
-0.01910400390625,
0.0389404296875,
0.03717041015625,
0.00693511962890625,
-0.0249481201171875,
0.0186614990234375,
-0.05035400390625,
-0.018157958984375,
-0.049072265625,
0.0006437301635742188,
-0.061614990234375,
-0.041656494140625,
-0.00495147705078125,
-0.01043701171875,
0.0253753662109375,
-0.009674072265625,
-0.0246124267578125,
0.01329803466796875,
0.0489501953125,
0.0312347412109375,
-0.0853271484375,
0.01535797119140625,
0.050018310546875,
-0.04754638671875,
-0.00909423828125,
0.0037326812744140625,
-0.0123138427734375,
0.0154266357421875,
-0.0014371871948242188,
-0.024322509765625,
-0.004734039306640625,
-0.0211334228515625,
0.0301513671875,
-0.01338958740234375,
0.06927490234375,
-0.0302734375,
-0.007793426513671875,
-0.0161895751953125,
0.01548004150390625,
0.00926971435546875,
0.0216064453125,
-0.0438232421875,
0.0435791015625,
0.01214599609375,
0.012481689453125,
-0.0186920166015625,
0.058807373046875,
0.01371002197265625,
0.0031566619873046875,
0.009063720703125,
0.0027065277099609375,
0.05694580078125,
-0.02899169921875,
0.026824951171875,
-0.004909515380859375,
0.032073974609375,
0.029815673828125,
-0.0128936767578125,
0.0185394287109375,
-0.02593994140625,
0.01270294189453125
] |
d51debaf2c9225ad1751e93d3cc460a55304b570
|
Wordpress Stackexchange
Q: Add post title as alt tag for featured image How do I add post title as alt tag in a post? I tried using array(title => '.the_title.') but it didnt work. I think I am not suppose to use the_title. I tired using get_the_title as well.
Thanks
A: @its_me got it almost right. Those args must be 2nd resp. 3rd Parameter, not first:
$attr = array(
'title' => 'howdy partner',
'alt' => 'a nice view of the ocean',
);
// pick one, note 2 or 3 arguments:
the_post_thumbnail( 'post-thumbnail', $attr );
echo("<a href='$p->permalink'>". // null for current $post->ID (use within loop)
get_the_post_thumbnail( null, 'post-thumbnail', $attr ).
"</a>");
|
Q: Add post title as alt tag for featured image How do I add post title as alt tag in a post? I tried using array(title => '.the_title.') but it didnt work. I think I am not suppose to use the_title. I tired using get_the_title as well.
Thanks
A: @its_me got it almost right. Those args must be 2nd resp. 3rd Parameter, not first:
$attr = array(
'title' => 'howdy partner',
'alt' => 'a nice view of the ocean',
);
// pick one, note 2 or 3 arguments:
the_post_thumbnail( 'post-thumbnail', $attr );
echo("<a href='$p->permalink'>". // null for current $post->ID (use within loop)
get_the_post_thumbnail( null, 'post-thumbnail', $attr ).
"</a>");
A: Try using this <?php the_title(); ?>
Here is example -
<img src="http://link-to-image" title="Image title" alt="<?php the_title(); ?>"/>
A: What code does your theme use to show the featured image (aka post-thumbnail)? Most themes do it like this:
<?php the_post_thumbnail(); ?>
or like this (the right way to do it):
<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail();
}
?>
In that case, replace the code with this:
<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail(
array(
'alt' => trim( strip_tags( $attachment->post_title ) ),
);
);
}
?>
...where, 'alt' => trim( strip_tags( $attachment->post_title ) ) tells the the_post_thumbnail function that it should use the post's title instead of image's alt text.
READ: WordPress Codex — Function Reference for the_post_thumbnail
|
wordpress
|
{
"language": "en",
"length": 250,
"provenance": "stackexchange_00019.jsonl.gz:421679",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57968"
}
|
[
0.042144775390625,
0.01137542724609375,
0.045867919921875,
0.05267333984375,
-0.003688812255859375,
-0.0229339599609375,
0.08404541015625,
-0.0938720703125,
-0.01482391357421875,
0.0202178955078125,
-0.01421356201171875,
0.035125732421875,
-0.0258331298828125,
-0.0211181640625,
0.01751708984375,
-0.0217437744140625,
0.0100860595703125,
0.01226806640625,
0.0562744140625,
0.00461578369140625,
0.0157012939453125,
0.0208892822265625,
0.005626678466796875,
-0.01523590087890625,
0.02239990234375,
-0.0094757080078125,
0.0804443359375,
-0.031646728515625,
0.0258941650390625,
-0.0100250244140625,
0.027008056640625,
-0.0251312255859375,
0.0323486328125,
-0.00806427001953125,
0.003719329833984375,
0.034454345703125,
0.056396484375,
-0.0263519287109375,
0.005420684814453125,
0.033447265625,
0.0209503173828125,
0.007778167724609375,
0.02490234375,
0.0390625,
-0.013885498046875,
-0.025146484375,
0.004241943359375,
-0.03326416015625,
0.0149383544921875,
-0.003673553466796875,
0.00839996337890625,
0.01030731201171875,
0.0310821533203125,
-0.04095458984375,
-0.0170135498046875,
-0.01197052001953125,
-0.0217742919921875,
0.00873565673828125,
0.06585693359375,
-0.00948333740234375,
-0.046295166015625,
-0.0440673828125,
0.0186004638671875,
-0.0443115234375,
0.02337646484375,
-0.002834320068359375,
0.031341552734375,
0.00763702392578125,
-0.0115814208984375,
0.0039215087890625,
0.031097412109375,
-0.0285797119140625,
0.003765106201171875,
-0.0278167724609375,
-0.010162353515625,
-0.0005321502685546875,
-0.018951416015625,
-0.04248046875,
0.0050506591796875,
0.00540924072265625,
0.023162841796875,
-0.021942138671875,
0.05999755859375,
-0.0059814453125,
0.0138092041015625,
0.01091766357421875,
-0.00449371337890625,
-0.01305389404296875,
-0.0132293701171875,
-0.0193634033203125,
-0.00756072998046875,
-0.0089263916015625,
-0.0557861328125,
0.053314208984375,
0.0114898681640625,
-0.0154266357421875,
0.026214599609375,
0.04315185546875,
0.0276031494140625,
0.0501708984375,
-0.01248931884765625,
-0.03955078125,
0.04638671875,
-0.060882568359375,
-0.0192718505859375,
-0.038970947265625,
-0.00792694091796875,
-0.016937255859375,
0.002475738525390625,
0.049163818359375,
-0.050933837890625,
-0.00006288290023803711,
0.01910400390625,
0.0026683807373046875,
-0.053253173828125,
0.008880615234375,
-0.01470184326171875,
0.01293182373046875,
0.00028324127197265625,
0.04803466796875,
-0.0012292861938476562,
0.00353240966796875,
0.024322509765625,
-0.0225372314453125,
0.033538818359375,
0.0303192138671875,
-0.0292816162109375,
-0.03216552734375,
-0.025726318359375,
0.03045654296875,
-0.01343536376953125,
0.0271759033203125,
0.053436279296875,
0.0158233642578125,
-0.007495880126953125,
-0.0168304443359375,
0.004856109619140625,
-0.0125274658203125,
-0.0007848739624023438,
-0.0220489501953125,
0.0010442733764648438,
-0.002811431884765625,
0.032379150390625,
-0.026031494140625,
0.04937744140625,
0.04119873046875,
-0.00688934326171875,
0.009033203125,
0.027069091796875,
-0.036468505859375,
0.05743408203125,
-0.08050537109375,
0.004795074462890625,
0.024932861328125,
0.010467529296875,
0.0019741058349609375,
0.0290374755859375,
-0.0270233154296875,
0.00849151611328125,
-0.0223388671875,
0.021026611328125,
-0.003780364990234375,
-0.0141448974609375,
-0.0307464599609375,
-0.04193115234375,
-0.00040411949157714844,
-0.0244598388671875,
0.005039215087890625,
0.0155792236328125,
0.045135498046875,
-0.01470947265625,
0.03912353515625,
0.00530242919921875,
-0.003574371337890625,
-0.0129241943359375,
-0.0236358642578125,
0.0134124755859375,
0.015899658203125,
0.0010385513305664062,
0.043426513671875,
0.002231597900390625,
-0.0229949951171875,
0.046234130859375,
-0.0289154052734375,
-0.039886474609375,
0.01221466064453125,
0.0014705657958984375,
0.0236663818359375,
0.008056640625,
0.00750732421875,
0.028594970703125,
0.0164642333984375,
-0.028900146484375,
0.043243408203125,
0.0289154052734375,
-0.043975830078125,
-0.04351806640625,
-0.03729248046875,
-0.006671905517578125,
-0.0199432373046875,
0.024139404296875,
-0.015350341796875,
-0.01062774658203125,
0.005908966064453125,
0.0016345977783203125,
-0.049407958984375,
0.0158233642578125,
-0.00717926025390625,
0.0003540515899658203,
-0.01195526123046875,
0.01030731201171875,
-0.0269622802734375,
-0.0038604736328125,
-0.013275146484375,
-0.020233154296875,
0.0242767333984375,
-0.03131103515625,
-0.04510498046875,
-0.0237579345703125,
0.00804901123046875,
-0.010711669921875,
0.0212249755859375,
-0.0321044921875,
0.040924072265625,
0.07904052734375,
-0.019561767578125,
-0.0228424072265625,
-0.037322998046875,
-0.000690460205078125,
0.02178955078125,
-0.1256103515625,
0.043060302734375,
0.00907135009765625,
0.0071563720703125,
-0.03790283203125,
-0.0091705322265625,
-0.0175323486328125,
-0.068359375,
0.01007080078125,
0.0528564453125,
0.0230712890625,
0.0254058837890625,
0.0010805130004882812,
0.052490234375,
0.044525146484375,
-0.0155792236328125,
0.01544952392578125,
0.01296234130859375,
-0.00490570068359375,
-0.005107879638671875,
-0.0032596588134765625,
-0.00385284423828125,
0.04718017578125,
-0.0237579345703125,
0.0028438568115234375,
0.054443359375,
-0.0286712646484375,
-0.0312347412109375,
-0.010284423828125,
0.0002994537353515625,
0.018096923828125,
-0.04071044921875,
-0.01495361328125,
-0.0252532958984375,
0.0240478515625,
0.0244903564453125,
0.024871826171875,
0.02569580078125,
-0.039703369140625,
0.0266876220703125,
0.0008301734924316406,
-0.0014247894287109375,
0.002285003662109375,
0.0207672119140625,
-0.0236053466796875,
0.008148193359375,
-0.0360107421875,
0.0177154541015625,
-0.003849029541015625,
-0.004055023193359375,
-0.00504302978515625,
0.02685546875,
0.050201416015625,
-0.00588226318359375,
-0.00738525390625,
-0.038421630859375,
0.01922607421875,
-0.0156402587890625,
0.0019893646240234375,
-0.01383209228515625,
0.0106048583984375,
0.0216522216796875,
-0.0104217529296875,
0.0125885009765625,
0.0253143310546875,
-0.01189422607421875,
0.00010508298873901367,
-0.05230712890625,
0.045257568359375,
-0.061553955078125,
0.062469482421875,
0.07098388671875,
-0.039764404296875,
0.03778076171875,
-0.003261566162109375,
-0.00494384765625,
-0.0263671875,
-0.001377105712890625,
-0.024566650390625,
-0.00563812255859375,
-0.06280517578125,
0.0241851806640625,
0.02886962890625,
0.0775146484375,
-0.041717529296875,
-0.053009033203125,
-0.01422119140625,
0.038177490234375,
-0.068603515625,
-0.06982421875,
0.0246429443359375,
-0.050201416015625,
-0.0212554931640625,
0.0080108642578125,
-0.041229248046875,
-0.0099334716796875,
0.04595947265625,
-0.0188751220703125,
-0.0272216796875,
-0.026519775390625,
-0.00249481201171875,
-0.058929443359375,
-0.0709228515625,
-0.050811767578125,
0.00814056396484375,
0.003582000732421875,
0.009796142578125,
0.01300811767578125,
-0.00890350341796875,
-0.0175018310546875,
0.02337646484375,
0.01020050048828125,
0.00360107421875,
0.0084381103515625,
0.01690673828125,
-0.0121917724609375,
-0.03753662109375,
0.00563812255859375,
0.03076171875,
0.01544952392578125,
-0.0222015380859375,
0.01143646240234375,
-0.036865234375,
0.002086639404296875,
0.006275177001953125,
-0.0018253326416015625,
0.03302001953125,
0.0213623046875,
0.0247650146484375,
-0.03533935546875,
-0.03125,
-0.038421630859375,
-0.08349609375,
-0.0225372314453125,
0.04534912109375,
0.03607177734375,
-0.038360595703125,
0.00592041015625,
-0.017059326171875,
-0.0014133453369140625,
0.028350830078125,
-0.006855010986328125,
0.014190673828125,
-0.0211334228515625,
-0.03662109375,
-0.0310211181640625,
-0.019927978515625,
-0.0280609130859375,
0.03399658203125,
-0.0244140625,
0.040771484375,
-0.016143798828125,
0.045318603515625,
-0.038665771484375,
-0.025909423828125,
0.034759521484375,
-0.037322998046875,
0.0321044921875,
-0.033538818359375,
-0.03558349609375,
-0.0018892288208007812,
0.08502197265625,
0.004669189453125,
-0.0267791748046875,
-0.040618896484375,
-0.004528045654296875,
-0.007274627685546875,
-0.0210723876953125,
0.008453369140625,
-0.012237548828125,
-0.06964111328125,
0.02398681640625,
0.0111083984375,
-0.01251983642578125,
-0.0261077880859375,
0.0283660888671875,
-0.044525146484375,
-0.0382080078125,
0.02685546875,
-0.002559661865234375,
0.00420379638671875,
0.0243072509765625,
-0.0477294921875,
0.048919677734375,
-0.04815673828125,
-0.01690673828125,
-0.04071044921875,
0.0058135986328125,
0.00350189208984375,
0.0177001953125,
-0.047515869140625,
0.055511474609375,
-0.0293121337890625,
0.03338623046875,
0.00818634033203125,
-0.00559234619140625,
0.02862548828125,
-0.00007289648056030273,
0.004817962646484375,
0.028045654296875,
0.0301361083984375,
-0.0260772705078125,
0.00937652587890625,
0.0166015625,
-0.037109375,
0.0198211669921875,
-0.0199432373046875,
0.019561767578125,
0.0313720703125,
-0.053558349609375,
-0.0166778564453125,
0.002655029296875,
0.061126708984375,
0.045135498046875,
0.01282501220703125,
0.006317138671875,
-0.0211181640625,
-0.0007486343383789062,
0.0296173095703125,
0.0200653076171875,
0.00917816162109375,
0.01462554931640625,
0.081787109375,
0.006259918212890625,
-0.0214080810546875,
-0.09674072265625,
0.029449462890625,
0.05279541015625,
-0.02606201171875,
0.032135009765625,
-0.00033020973205566406,
-0.03515625,
0.048919677734375,
0.0017404556274414062,
-0.0002503395080566406,
-0.03375244140625,
0.04095458984375,
-0.008941650390625,
-0.0228271484375,
0.00794219970703125,
-0.0258636474609375,
0.0355224609375,
-0.005672454833984375,
-0.002899169921875,
-0.01224517822265625,
-0.020355224609375,
0.021087646484375,
0.0127716064453125,
0.033294677734375,
-0.011474609375,
-0.025421142578125,
0.0017528533935546875,
0.0179443359375,
-0.0036373138427734375,
0.0204925537109375,
-0.003864288330078125,
-0.020843505859375,
-0.014984130859375,
-0.0019989013671875,
-0.062042236328125,
-0.0108795166015625,
-0.0157318115234375,
0.0140533447265625,
-0.028594970703125,
-0.0023365020751953125,
-0.035430908203125,
-0.004756927490234375,
0.032135009765625,
0.00283050537109375,
-0.0386962890625,
-0.0003509521484375,
-0.01387786865234375,
0.032012939453125,
0.005924224853515625,
0.0384521484375,
0.020172119140625,
0.015289306640625,
0.01297760009765625,
0.00372314453125,
-0.0005826950073242188,
0.04541015625,
-0.022430419921875,
0.01319122314453125,
0.0421142578125,
-0.03924560546875,
0.0069580078125,
0.0283355712890625,
-0.004962921142578125,
0.0191802978515625,
-0.00746917724609375,
0.01617431640625,
0.0222015380859375,
0.03564453125,
0.0233306884765625,
-0.01430511474609375,
-0.0262908935546875,
0.03179931640625,
-0.006000518798828125,
-0.01435089111328125,
-0.0062255859375,
0.013946533203125,
0.0458984375,
-0.0204315185546875,
-0.036529541015625,
0.02130126953125,
-0.053314208984375,
-0.0247344970703125,
0.0007500648498535156,
-0.0104522705078125,
-0.039642333984375,
-0.0203094482421875,
0.0186767578125,
0.030517578125,
0.013427734375,
-0.00336456298828125,
0.0263214111328125,
0.00914764404296875,
0.038116455078125,
-0.0022144317626953125,
-0.004192352294921875,
0.01824951171875,
0.0138702392578125,
-0.0236358642578125,
-0.040313720703125,
-0.0186004638671875,
0.0469970703125,
0.0121917724609375,
-0.032379150390625,
-0.019927978515625,
0.042205810546875,
-0.0357666015625,
0.08099365234375,
-0.0184173583984375,
-0.036285400390625,
0.007503509521484375,
0.0194244384765625,
0.03790283203125,
0.02581787109375,
-0.0474853515625,
0.01023101806640625,
-0.029571533203125,
0.01383209228515625,
0.0552978515625,
-0.038360595703125,
-0.03131103515625,
-0.04925537109375,
0.0092315673828125,
0.01727294921875,
-0.0135498046875,
-0.00849151611328125,
-0.013946533203125,
0.0267486572265625,
0.0124664306640625,
0.076416015625,
0.00225067138671875,
0.01027679443359375,
0.0154571533203125,
0.048309326171875,
0.01381683349609375,
0.00533294677734375,
-0.0032024383544921875,
-0.04547119140625,
-0.005146026611328125,
-0.05718994140625,
-0.005580902099609375,
0.0197601318359375,
0.005084991455078125,
0.017425537109375,
0.0183258056640625,
0.015106201171875,
0.01873779296875,
-0.0281829833984375,
-0.0030975341796875,
-0.008087158203125,
0.005886077880859375,
-0.039581298828125,
-0.040374755859375,
0.045684814453125,
-0.034393310546875,
0.0220184326171875,
-0.0100860595703125,
0.01323699951171875,
-0.01055145263671875,
-0.043212890625,
-0.0200042724609375,
0.061370849609375,
-0.048492431640625,
0.0262298583984375,
0.08514404296875,
0.01806640625,
0.0443115234375,
0.016876220703125,
0.00345611572265625,
0.005908966064453125,
0.02630615234375,
0.039947509765625,
-0.0419921875,
0.0673828125,
0.006443023681640625,
-0.01505279541015625,
0.04132080078125,
-0.035675048828125,
0.00479888916015625,
0.007099151611328125,
0.034912109375,
0.0006427764892578125,
-0.00940704345703125,
0.01410675048828125,
-0.021240234375,
0.03125,
0.0030345916748046875,
0.0202178955078125,
-0.0004143714904785156,
0.059326171875,
-0.039581298828125,
0.000058650970458984375,
0.0242156982421875,
-0.027923583984375,
-0.00823211669921875,
-0.0182647705078125,
-0.0042877197265625,
0.00569915771484375,
-0.06201171875,
-0.01165008544921875,
0.0562744140625,
-0.0389404296875,
-0.020599365234375,
-0.00937652587890625,
0.0211029052734375,
-0.01157379150390625,
-0.070556640625,
0.0232086181640625,
-0.02703857421875,
0.004039764404296875,
0.01104736328125,
0.033447265625,
0.03485107421875,
0.03753662109375,
0.006519317626953125,
-0.0005059242248535156,
0.01552581787109375,
-0.013336181640625,
-0.0286712646484375,
-0.0220489501953125,
-0.00408935546875,
-0.00897979736328125,
-0.007740020751953125,
0.0274200439453125,
-0.0276336669921875,
-0.0224609375,
-0.0074462890625,
-0.0227813720703125,
0.04461669921875,
0.0246734619140625,
-0.058319091796875,
0.01432037353515625,
-0.0003209114074707031,
-0.00849151611328125,
-0.0037746429443359375,
-0.001003265380859375,
-0.044189453125,
-0.0228118896484375,
-0.00476837158203125,
-0.04443359375,
0.01221466064453125,
-0.0186767578125,
-0.065673828125,
0.09967041015625,
-0.0198516845703125,
0.029632568359375,
-0.002315521240234375,
0.040771484375,
-0.01000213623046875,
0.01488494873046875,
-0.014190673828125,
0.0521240234375,
-0.0516357421875,
0.017242431640625,
-0.0260467529296875,
0.0157012939453125,
0.01349639892578125,
0.01357269287109375,
0.035491943359375,
0.00450897216796875,
-0.0164337158203125,
-0.0007991790771484375,
0.060638427734375,
0.0306549072265625,
0.0017976760864257812,
0.03643798828125,
-0.00843048095703125,
-0.010162353515625,
0.0240325927734375,
0.00627899169921875,
0.041717529296875,
-0.00934600830078125,
-0.04522705078125,
0.0086517333984375,
0.0248565673828125,
0.02008056640625,
0.0184783935546875,
-0.011566162109375,
-0.028900146484375,
0.018829345703125,
0.0345458984375,
-0.034454345703125,
0.00374603271484375,
0.01180267333984375,
-0.00463104248046875,
0.0269927978515625,
-0.058807373046875,
0.00482940673828125,
0.01384735107421875,
0.0244903564453125,
0.0282745361328125,
0.0282440185546875,
0.0137939453125,
-0.01486968994140625,
0.00670623779296875,
0.0176544189453125,
0.0151214599609375,
-0.0024204254150390625,
0.0482177734375,
0.0013570785522460938,
0.0166778564453125,
-0.06793212890625,
-0.0173492431640625,
0.049468994140625,
0.0755615234375,
-0.047607421875,
-0.0035419464111328125,
0.0157623291015625,
0.0159759521484375,
-0.0015592575073242188,
-0.039276123046875,
-0.0175323486328125,
-0.0214691162109375,
0.042816162109375,
-0.034454345703125,
0.01168060302734375,
0.040985107421875,
0.044830322265625,
-0.0035533905029296875,
-0.016815185546875,
-0.07586669921875,
0.0113983154296875,
-0.036529541015625,
-0.01739501953125,
0.03265380859375,
0.059295654296875,
0.0222015380859375,
0.052886962890625,
-0.01434326171875,
-0.013397216796875,
0.0157470703125,
0.03143310546875,
-0.006084442138671875,
-0.0167083740234375,
-0.01210784912109375,
-0.0579833984375,
0.00644683837890625,
0.012969970703125,
0.0274810791015625,
0.00203704833984375,
0.060211181640625,
0.033233642578125,
-0.06890869140625,
-0.0036983489990234375,
0.0225677490234375,
-0.025787353515625,
-0.003021240234375,
-0.02337646484375,
0.046722412109375,
0.058746337890625,
0.0023365020751953125,
0.01239776611328125,
0.0124969482421875,
0.05963134765625,
-0.06951904296875,
0.03082275390625,
-0.014801025390625,
-0.03472900390625,
0.033294677734375,
0.00048232078552246094,
0.0621337890625,
-0.019012451171875,
-0.0618896484375,
0.007171630859375,
-0.0209808349609375,
-0.07427978515625,
0.01548004150390625,
0.031829833984375,
-0.06341552734375,
0.041595458984375,
-0.0362548828125,
-0.01788330078125,
0.02435302734375,
0.0000629425048828125,
0.004627227783203125,
0.08441162109375,
0.0291595458984375,
0.0204010009765625,
-0.031219482421875,
-0.0170440673828125,
-0.011199951171875,
0.0457763671875,
0.033050537109375,
-0.006908416748046875,
-0.0026912689208984375,
0.042449951171875,
-0.017730712890625,
0.03753662109375,
-0.061614990234375,
-0.0193023681640625,
0.0469970703125,
-0.0152435302734375,
-0.01335906982421875,
-0.006885528564453125,
-0.0242919921875,
0.006618499755859375,
0.03369140625,
0.0011358261108398438,
-0.0021820068359375,
-0.0087127685546875,
0.0153045654296875,
0.0019683837890625,
0.056427001953125,
-0.0192108154296875,
-0.01202392578125,
-0.07183837890625,
-0.06927490234375,
0.044647216796875,
0.011871337890625,
0.012054443359375,
0.0098876953125,
0.041900634765625,
0.0146484375,
0.0249481201171875,
0.00457000732421875,
0.0276336669921875,
0.0302734375,
-0.005702972412109375,
-0.043212890625,
0.00933074951171875,
0.0066986083984375,
0.022064208984375,
0.00360870361328125,
0.04400634765625,
0.033477783203125,
-0.026275634765625,
0.0223846435546875,
-0.013702392578125,
0.03338623046875,
-0.00640869140625,
0.007175445556640625,
-0.0372314453125,
0.0022296905517578125,
-0.037841796875,
0.041107177734375,
-0.030029296875,
-0.09149169921875,
0.013916015625,
0.0282135009765625,
-0.056640625,
0.011016845703125,
-0.074462890625,
-0.0214080810546875,
0.03662109375,
-0.02294921875,
0.042510986328125,
-0.0377197265625,
-0.022918701171875,
-0.0035400390625,
0.006229400634765625,
-0.0703125,
0.015625,
0.030670166015625,
-0.021209716796875,
-0.03912353515625,
-0.06781005859375,
-0.0123291015625,
-0.06353759765625,
0.02569580078125,
0.043670654296875,
-0.0236053466796875,
0.0174713134765625,
0.033782958984375,
0.01462554931640625,
0.1011962890625,
-0.0416259765625,
-0.018829345703125,
-0.00591278076171875,
-0.0020809173583984375,
-0.006198883056640625,
-0.057861328125,
0.0333251953125,
-0.059844970703125,
-0.04644775390625,
-0.046539306640625,
0.0160369873046875,
0.007511138916015625,
-0.0302886962890625,
-0.0384521484375,
0.07550048828125,
-0.0242919921875,
-0.01549530029296875,
-0.029449462890625,
0.0280303955078125,
0.0010986328125,
0.0372314453125,
0.0172576904296875,
-0.015869140625,
-0.0167083740234375,
-0.01131439208984375,
0.0117340087890625,
0.0166473388671875,
0.02044677734375,
-0.00017368793487548828,
0.0091400146484375,
0.002376556396484375,
0.0038776397705078125,
-0.0294189453125,
0.034759521484375,
-0.029449462890625,
0.027587890625,
0.0273590087890625,
-0.0814208984375,
-0.034820556640625,
-0.038299560546875,
0.012969970703125,
-0.01161956787109375,
-0.01415252685546875,
-0.0288848876953125,
-0.0181121826171875,
0.057281494140625,
0.032257080078125,
0.015594482421875,
-0.0123748779296875,
0.0161895751953125,
-0.0347900390625,
-0.0194244384765625,
0.0017194747924804688,
0.005382537841796875,
-0.047882080078125,
-0.00528717041015625,
0.0231781005859375,
-0.00980377197265625,
-0.034637451171875,
0.0114898681640625,
-0.047821044921875,
-0.01346588134765625,
-0.0159759521484375,
0.01367950439453125,
-0.06378173828125,
0.055206298828125,
0.09002685546875,
-0.04815673828125,
0.0200958251953125,
-0.0204620361328125,
-0.0032520294189453125,
0.0555419921875,
-0.05682373046875,
0.017913818359375,
-0.01297760009765625,
-0.0013780593872070312,
0.0266876220703125,
0.0199432373046875,
0.0189208984375,
-0.00640869140625,
-0.028076171875,
-0.00627899169921875,
0.03662109375,
0.0005469322204589844,
0.044097900390625,
0.007518768310546875,
0.02740478515625,
0.0024700164794921875,
0.0267486572265625,
-0.0157623291015625,
0.00408935546875,
-0.011077880859375,
0.031707763671875,
-0.05126953125,
0.0052337646484375,
-0.0126190185546875,
-0.043853759765625,
0.0115509033203125,
0.0243377685546875,
0.0206451416015625,
0.005611419677734375,
-0.014923095703125,
-0.029266357421875,
0.002864837646484375,
-0.001239776611328125
] |
e3c37b22e8a631359df4d7fedbda5235625f7981
|
Wordpress Stackexchange
Q: WP_Query() show posts that end later than today I have a query as follows:
$wp_query = new WP_Query(
'meta_key' => 'end_date',
'meta_value' => 'today',
'meta_compare' => '>=',
'post_type' => 'vehicle'
);
I want to show only those posts of the vehicle post type that have the meta key end_date which contains a date that is later than today's date.
How can this be accomplished?
A: WordPress added Date Queries in 3.7. So you could always try:
$today = date( 'Y-m-d' );
$args = array(
'post_type' => 'vehicle',
'date_query' => array(
//set date ranges with strings!
'after' => 'today',
//allow exact matches to be returned
'inclusive' => true,
),
);
$query = new WP_Query( $args );
More on this can be found at https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters
|
Q: WP_Query() show posts that end later than today I have a query as follows:
$wp_query = new WP_Query(
'meta_key' => 'end_date',
'meta_value' => 'today',
'meta_compare' => '>=',
'post_type' => 'vehicle'
);
I want to show only those posts of the vehicle post type that have the meta key end_date which contains a date that is later than today's date.
How can this be accomplished?
A: WordPress added Date Queries in 3.7. So you could always try:
$today = date( 'Y-m-d' );
$args = array(
'post_type' => 'vehicle',
'date_query' => array(
//set date ranges with strings!
'after' => 'today',
//allow exact matches to be returned
'inclusive' => true,
),
);
$query = new WP_Query( $args );
More on this can be found at https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters
A: First, your date format has to be in descending order from largest to smallest units, i.e.: year, month, day, hour, minute, second, etc., otherwise MySQL can't query or order on the field. In this example I use year - month - day:
$today = date( 'Y-m-d' );
$args = array(
'post_type' => 'vehicle',
'meta_query' => array(
array(
'key' => 'end_date',
'value' => $today,
'compare' => '>=',
'type' => 'DATE'
)
)
):
$query = new WP_Query( $args );
|
wordpress
|
{
"language": "en",
"length": 203,
"provenance": "stackexchange_00019.jsonl.gz:421684",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57979"
}
|
[
0.045166015625,
0.00089263916015625,
-0.0282440185546875,
0.0036487579345703125,
0.0244598388671875,
-0.05377197265625,
0.07281494140625,
-0.05340576171875,
0.019256591796875,
0.00975799560546875,
-0.046539306640625,
-0.01390838623046875,
-0.0224761962890625,
-0.01561737060546875,
-0.01526641845703125,
-0.043701171875,
0.040069580078125,
-0.0226593017578125,
0.01171112060546875,
-0.0022640228271484375,
0.007076263427734375,
0.03326416015625,
-0.00490570068359375,
0.00977325439453125,
0.007122039794921875,
0.0238800048828125,
0.065185546875,
0.0030078887939453125,
0.0367431640625,
-0.00007337331771850586,
0.02520751953125,
-0.068603515625,
-0.01708984375,
0.014984130859375,
0.054901123046875,
0.0479736328125,
0.03973388671875,
0.01473236083984375,
0.0716552734375,
-0.005462646484375,
0.020782470703125,
-0.0055084228515625,
-0.03863525390625,
-0.0020961761474609375,
-0.00998687744140625,
-0.05145263671875,
0.029815673828125,
-0.024658203125,
0.037872314453125,
0.01514434814453125,
0.0009436607360839844,
0.0286865234375,
-0.0002586841583251953,
0.0249786376953125,
-0.02532958984375,
-0.01367950439453125,
-0.018585205078125,
0.0086822509765625,
0.0478515625,
-0.006237030029296875,
-0.0244903564453125,
-0.038299560546875,
0.00969696044921875,
-0.019256591796875,
-0.007694244384765625,
-0.0028438568115234375,
0.041351318359375,
0.0106353759765625,
-0.040557861328125,
-0.036529541015625,
0.038726806640625,
0.0008234977722167969,
-0.008514404296875,
-0.01522064208984375,
-0.037384033203125,
0.0002601146697998047,
-0.0042572021484375,
-0.024871826171875,
0.01126861572265625,
-0.0063018798828125,
0.00972747802734375,
0.01486968994140625,
-0.06756591796875,
0.00782012939453125,
0.012176513671875,
0.0162811279296875,
-0.00739288330078125,
-0.0243377685546875,
-0.039398193359375,
-0.0211944580078125,
-0.0239105224609375,
-0.0265350341796875,
-0.051055908203125,
-0.0298919677734375,
0.01171112060546875,
-0.06158447265625,
0.03228759765625,
0.04595947265625,
-0.033233642578125,
-0.0013332366943359375,
-0.0277099609375,
-0.020477294921875,
-0.0250091552734375,
-0.01374053955078125,
0.034454345703125,
0.035858154296875,
-0.005428314208984375,
-0.017242431640625,
0.060150146484375,
0.0240325927734375,
0.0264129638671875,
0.06829833984375,
-0.062347412109375,
-0.01290130615234375,
-0.040313720703125,
0.037200927734375,
-0.040802001953125,
-0.031280517578125,
0.0003924369812011719,
-0.0082550048828125,
0.0243072509765625,
0.048004150390625,
-0.020965576171875,
-0.06787109375,
0.0234375,
-0.01258087158203125,
-0.049163818359375,
0.007404327392578125,
0.01959228515625,
0.056732177734375,
-0.0290679931640625,
-0.034912109375,
-0.00839996337890625,
0.0109405517578125,
-0.003734588623046875,
-0.0257415771484375,
0.030029296875,
-0.00174713134765625,
-0.0027618408203125,
-0.00281524658203125,
-0.0003197193145751953,
-0.0219573974609375,
0.01264190673828125,
-0.0152587890625,
-0.0100555419921875,
0.02276611328125,
0.016754150390625,
0.01544952392578125,
-0.01247406005859375,
-0.044342041015625,
0.01055908203125,
-0.0259552001953125,
0.05120849609375,
-0.0197906494140625,
-0.08209228515625,
-0.050537109375,
0.001865386962890625,
-0.038970947265625,
-0.0079803466796875,
-0.06536865234375,
-0.033843994140625,
0.0064239501953125,
0.055084228515625,
-0.0303192138671875,
-0.023345947265625,
-0.005863189697265625,
-0.048828125,
-0.00937652587890625,
0.0184173583984375,
0.016845703125,
-0.0014600753784179688,
-0.037567138671875,
0.03167724609375,
-0.0177459716796875,
-0.0462646484375,
0.0091705322265625,
-0.0158538818359375,
0.01337432861328125,
0.0172119140625,
-0.0085906982421875,
-0.0208587646484375,
-0.041534423828125,
0.06585693359375,
-0.0097198486328125,
-0.04376220703125,
0.0164947509765625,
0.0211639404296875,
-0.01507568359375,
-0.0203704833984375,
-0.009307861328125,
0.0916748046875,
0.057769775390625,
-0.039276123046875,
0.072265625,
-0.0017290115356445312,
-0.03955078125,
-0.0321044921875,
-0.01453399658203125,
-0.01055145263671875,
-0.0283050537109375,
0.01259613037109375,
0.060089111328125,
-0.04498291015625,
0.0265350341796875,
-0.115966796875,
0.0560302734375,
-0.038543701171875,
0.04400634765625,
-0.0251312255859375,
0.00907135009765625,
0.03387451171875,
0.01812744140625,
-0.0384521484375,
0.00601959228515625,
0.007534027099609375,
0.0120697021484375,
-0.027587890625,
0.018463134765625,
-0.021881103515625,
0.0121612548828125,
-0.0065765380859375,
-0.05401611328125,
-0.0057373046875,
0.04052734375,
0.0364990234375,
0.01287078857421875,
-0.0060272216796875,
0.00855255126953125,
0.0345458984375,
0.0286102294921875,
-0.03173828125,
-0.032501220703125,
0.0276947021484375,
0.00327301025390625,
-0.050506591796875,
-0.0005102157592773438,
0.0036296844482421875,
-0.0200042724609375,
0.0009441375732421875,
0.055877685546875,
0.05389404296875,
0.045684814453125,
0.0133514404296875,
-0.0301513671875,
0.052520751953125,
-0.10302734375,
-0.004608154296875,
-0.035491943359375,
-0.008209228515625,
-0.0017795562744140625,
0.02484130859375,
-0.0234832763671875,
0.0277252197265625,
-0.007659912109375,
0.01445770263671875,
0.015716552734375,
-0.0034351348876953125,
0.002655029296875,
-0.0521240234375,
0.032012939453125,
-0.00533294677734375,
-0.0733642578125,
-0.036651611328125,
-0.0306549072265625,
0.04986572265625,
-0.0245208740234375,
0.057403564453125,
0.055389404296875,
0.005706787109375,
-0.0259857177734375,
-0.0091400146484375,
0.035247802734375,
0.0001653432846069336,
0.0068817138671875,
-0.06646728515625,
0.014190673828125,
-0.019317626953125,
0.025146484375,
-0.0025310516357421875,
-0.00270843505859375,
0.0027370452880859375,
0.0141448974609375,
0.0478515625,
0.001934051513671875,
-0.010528564453125,
-0.044036865234375,
0.03753662109375,
0.02301025390625,
0.003082275390625,
-0.01349639892578125,
0.03985595703125,
-0.0032176971435546875,
-0.0298614501953125,
0.036041259765625,
-0.021728515625,
-0.0297393798828125,
-0.0225067138671875,
-0.0207977294921875,
0.03363037109375,
-0.04644775390625,
0.00948333740234375,
0.04425048828125,
-0.031524658203125,
0.02130126953125,
-0.0068511962890625,
0.01364898681640625,
0.003292083740234375,
-0.0004260540008544922,
-0.01678466796875,
0.0012731552124023438,
-0.07318115234375,
-0.0300445556640625,
0.033935546875,
0.01372528076171875,
0.04962158203125,
-0.01261138916015625,
0.039947509765625,
0.025299072265625,
-0.05584716796875,
-0.07403564453125,
-0.035186767578125,
-0.048797607421875,
-0.022369384765625,
-0.004878997802734375,
-0.027435302734375,
0.0181732177734375,
0.0008668899536132812,
-0.00217437744140625,
-0.050079345703125,
-0.0147705078125,
-0.053436279296875,
-0.051513671875,
-0.031890869140625,
0.0189361572265625,
-0.007259368896484375,
-0.0014123916625976562,
0.002803802490234375,
0.10260009765625,
0.0167694091796875,
-0.103271484375,
-0.011871337890625,
0.004383087158203125,
-0.042877197265625,
0.031768798828125,
0.0009298324584960938,
0.0088958740234375,
0.0063323974609375,
-0.00453948974609375,
0.047607421875,
0.039947509765625,
-0.0323486328125,
0.006259918212890625,
0.03277587890625,
0.0093536376953125,
0.04083251953125,
-0.0295257568359375,
-0.058807373046875,
0.040863037109375,
0.005603790283203125,
-0.0215606689453125,
-0.0521240234375,
-0.0204925537109375,
-0.076416015625,
0.07904052734375,
0.048248291015625,
0.01280975341796875,
0.02069091796875,
-0.0076446533203125,
0.0019016265869140625,
-0.00799560546875,
-0.002208709716796875,
-0.056854248046875,
0.052947998046875,
0.01165008544921875,
0.0237884521484375,
-0.0032520294189453125,
-0.0178070068359375,
-0.0173797607421875,
0.0201263427734375,
-0.022247314453125,
0.016876220703125,
-0.0278472900390625,
0.0247039794921875,
-0.06524658203125,
-0.0303802490234375,
0.06536865234375,
-0.00762176513671875,
0.01186370849609375,
-0.0753173828125,
-0.05255126953125,
-0.0457763671875,
0.08599853515625,
0.01103973388671875,
-0.029632568359375,
0.0008254051208496094,
-0.00882720947265625,
-0.01251983642578125,
0.033111572265625,
-0.01151275634765625,
-0.00791168212890625,
-0.08111572265625,
-0.00539398193359375,
-0.0094451904296875,
-0.018035888671875,
-0.038330078125,
0.050445556640625,
-0.06024169921875,
-0.033660888671875,
0.0247344970703125,
0.0036334991455078125,
-0.01715087890625,
0.037689208984375,
-0.03460693359375,
0.021453857421875,
-0.028350830078125,
-0.0006494522094726562,
-0.070068359375,
-0.01113128662109375,
-0.0222015380859375,
0.02349853515625,
0.00485992431640625,
-0.0171966552734375,
-0.0242462158203125,
0.034942626953125,
0.0301361083984375,
0.01399993896484375,
0.0234832763671875,
-0.049041748046875,
0.059722900390625,
0.036590576171875,
0.026336669921875,
0.0037822723388671875,
-0.00470733642578125,
-0.0284576416015625,
0.00030350685119628906,
-0.0106658935546875,
-0.039520263671875,
-0.00775146484375,
-0.0200042724609375,
-0.0076141357421875,
0.01544952392578125,
0.0108184814453125,
-0.01410675048828125,
0.047821044921875,
-0.036895751953125,
0.01184844970703125,
-0.0111083984375,
-0.01187896728515625,
0.056243896484375,
0.0631103515625,
-0.001880645751953125,
-0.00563812255859375,
0.043914794921875,
0.00556182861328125,
-0.058319091796875,
-0.038726806640625,
-0.0077972412109375,
0.0352783203125,
-0.015411376953125,
0.0213470458984375,
-0.024871826171875,
-0.038055419921875,
0.07525634765625,
-0.0266571044921875,
-0.00807952880859375,
-0.021697998046875,
0.050537109375,
-0.00626373291015625,
0.00547027587890625,
-0.0104827880859375,
-0.04486083984375,
0.033721923828125,
0.0107879638671875,
-0.006084442138671875,
-0.04510498046875,
0.02667236328125,
0.07293701171875,
-0.02423095703125,
0.024932861328125,
-0.043365478515625,
-0.0281829833984375,
0.01043701171875,
0.0182952880859375,
-0.0123291015625,
0.0229949951171875,
-0.0102996826171875,
-0.0166168212890625,
-0.006664276123046875,
-0.01483917236328125,
0.000492095947265625,
-0.0083770751953125,
-0.00482177734375,
0.0189971923828125,
-0.0037555694580078125,
-0.0248565673828125,
-0.001399993896484375,
0.022705078125,
0.00792694091796875,
-0.0275115966796875,
-0.0491943359375,
-0.03070068359375,
0.0051727294921875,
0.00368499755859375,
0.035247802734375,
0.0255889892578125,
0.03851318359375,
0.00539398193359375,
0.0079193115234375,
-0.01678466796875,
-0.00949859619140625,
0.01007080078125,
-0.03289794921875,
-0.0092620849609375,
0.006801605224609375,
-0.0063629150390625,
0.0267486572265625,
0.0823974609375,
-0.01462554931640625,
0.07330322265625,
-0.029876708984375,
0.0211181640625,
-0.0038299560546875,
0.040740966796875,
0.032745361328125,
-0.0219268798828125,
-0.006195068359375,
0.0277557373046875,
-0.0190277099609375,
-0.010009765625,
-0.026458740234375,
0.00017368793487548828,
-0.0236358642578125,
-0.0266265869140625,
0.01447296142578125,
0.0347900390625,
0.052764892578125,
-0.0244293212890625,
0.01385498046875,
0.052886962890625,
0.0308990478515625,
-0.0250701904296875,
-0.0210723876953125,
0.02496337890625,
0.042388916015625,
0.006072998046875,
0.034515380859375,
-0.0259552001953125,
0.044647216796875,
-0.018585205078125,
0.0552978515625,
-0.04351806640625,
-0.053741455078125,
-0.003673553466796875,
-0.0134429931640625,
-0.027984619140625,
0.02044677734375,
-0.0021190643310546875,
-0.0024356842041015625,
-0.018707275390625,
0.0283355712890625,
-0.030670166015625,
0.01248931884765625,
-0.01776123046875,
0.0020999908447265625,
-0.026092529296875,
0.01241302490234375,
0.0012874603271484375,
-0.0007147789001464844,
-0.04290771484375,
-0.0177154541015625,
-0.06683349609375,
-0.03656005859375,
-0.010345458984375,
-0.03839111328125,
-0.0254669189453125,
-0.004955291748046875,
0.0171966552734375,
0.055511474609375,
-0.01161956787109375,
-0.044891357421875,
-0.0011301040649414062,
-0.0238494873046875,
-0.005832672119140625,
0.0380859375,
0.004604339599609375,
0.06768798828125,
-0.01309967041015625,
0.056854248046875,
0.029388427734375,
0.02850341796875,
-0.0548095703125,
-0.017608642578125,
0.03125,
-0.0496826171875,
-0.049591064453125,
0.005596160888671875,
-0.071533203125,
-0.0242156982421875,
-0.01102447509765625,
-0.0245208740234375,
0.030426025390625,
-0.017578125,
-0.0009136199951171875,
-0.0024204254150390625,
0.056671142578125,
-0.0158233642578125,
0.0482177734375,
0.060943603515625,
-0.0215606689453125,
-0.00958251953125,
-0.0134429931640625,
0.01425933837890625,
-0.028717041015625,
-0.01019287109375,
-0.0289154052734375,
0.0188446044921875,
-0.0212860107421875,
0.053436279296875,
0.076904296875,
-0.0080108642578125,
0.047393798828125,
0.0243988037109375,
0.019439697265625,
0.01197052001953125,
-0.00839996337890625,
-0.0328369140625,
-0.01322174072265625,
0.029876708984375,
0.005947113037109375,
-0.0103912353515625,
0.03704833984375,
-0.0157012939453125,
0.0145721435546875,
-0.0084228515625,
0.00455474853515625,
-0.005992889404296875,
0.0201416015625,
-0.023040771484375,
-0.020965576171875,
0.041259765625,
-0.0113067626953125,
0.003192901611328125,
-0.0012407302856445312,
-0.0011463165283203125,
0.029937744140625,
-0.03997802734375,
0.0005564689636230469,
0.03350830078125,
0.01343536376953125,
-0.01320648193359375,
0.0777587890625,
0.005290985107421875,
-0.054779052734375,
-0.005367279052734375,
0.03436279296875,
-0.0214385986328125,
-0.0182952880859375,
-0.024627685546875,
-0.029449462890625,
-0.00047016143798828125,
-0.05621337890625,
-0.0172119140625,
-0.04986572265625,
0.0151824951171875,
0.014251708984375,
0.0007262229919433594,
0.05548095703125,
0.029022216796875,
-0.00007009506225585938,
-0.01244354248046875,
0.015716552734375,
-0.00585174560546875,
-0.034820556640625,
-0.0207977294921875,
0.0016393661499023438,
0.047271728515625,
-0.0222930908203125,
0.02862548828125,
0.00838470458984375,
-0.023590087890625,
-0.0080718994140625,
-0.01406097412109375,
0.03240966796875,
-0.032867431640625,
-0.004383087158203125,
0.038818359375,
0.037139892578125,
-0.003444671630859375,
0.03656005859375,
0.0125885009765625,
-0.00146484375,
-0.007205963134765625,
0.0225372314453125,
-0.01202392578125,
-0.00940704345703125,
0.029937744140625,
-0.033538818359375,
0.0623779296875,
0.001567840576171875,
0.00746917724609375,
0.01529693603515625,
0.0264892578125,
-0.003116607666015625,
0.00762176513671875,
-0.032196044921875,
0.057708740234375,
-0.00859832763671875,
0.0229949951171875,
-0.061553955078125,
-0.0034275054931640625,
-0.0098419189453125,
0.040802001953125,
0.0211944580078125,
0.006649017333984375,
-0.031463623046875,
-0.0208892822265625,
0.0206756591796875,
0.0384521484375,
0.017578125,
0.031463623046875,
0.014678955078125,
0.02032470703125,
0.0272674560546875,
-0.040924072265625,
0.042816162109375,
-0.042236328125,
0.01074981689453125,
0.0193023681640625,
0.006732940673828125,
0.004856109619140625,
0.0112152099609375,
0.02569580078125,
0.029266357421875,
-0.007904052734375,
-0.01232147216796875,
-0.0494384765625,
0.045806884765625,
0.0232696533203125,
0.06890869140625,
-0.099853515625,
-0.056396484375,
-0.0195159912109375,
0.04473876953125,
0.0183563232421875,
-0.007030487060546875,
0.007080078125,
0.01270294189453125,
0.0125579833984375,
-0.0095672607421875,
-0.019683837890625,
0.0030231475830078125,
0.01102447509765625,
0.049560546875,
0.026947021484375,
0.0240325927734375,
-0.024627685546875,
0.005001068115234375,
0.06689453125,
0.06396484375,
-0.038238525390625,
0.002960205078125,
0.0092315673828125,
0.01093292236328125,
-0.0218658447265625,
-0.045501708984375,
-0.02691650390625,
0.00637054443359375,
0.02911376953125,
-0.05718994140625,
0.0061187744140625,
0.05108642578125,
0.028961181640625,
-0.00013065338134765625,
-0.0178680419921875,
-0.035552978515625,
0.006450653076171875,
-0.01800537109375,
-0.01357269287109375,
0.0400390625,
0.04925537109375,
-0.015045166015625,
0.034576416015625,
-0.04901123046875,
-0.01152801513671875,
-0.0104522705078125,
0.0162811279296875,
0.001369476318359375,
-0.0209197998046875,
0.016143798828125,
-0.007740020751953125,
-0.010833740234375,
0.00891876220703125,
0.0058441162109375,
0.0223846435546875,
0.04510498046875,
0.039093017578125,
-0.02459716796875,
-0.0226287841796875,
0.00414276123046875,
-0.034210205078125,
-0.051239013671875,
-0.042877197265625,
0.01355743408203125,
0.043060302734375,
0.019073486328125,
0.050750732421875,
0.034637451171875,
0.033782958984375,
-0.01554107666015625,
0.033203125,
0.011077880859375,
0.018951416015625,
0.02142333984375,
0.005474090576171875,
-0.0075225830078125,
-0.0012998580932617188,
-0.064453125,
-0.00812530517578125,
-0.007556915283203125,
-0.018829345703125,
0.01369476318359375,
0.0240631103515625,
-0.01486968994140625,
0.0246734619140625,
0.041900634765625,
-0.02178955078125,
-0.00556182861328125,
0.039764404296875,
-0.01059722900390625,
-0.00691986083984375,
0.047088623046875,
-0.00994110107421875,
-0.09124755859375,
-0.049468994140625,
-0.00910186767578125,
0.01258087158203125,
-0.009307861328125,
0.0239105224609375,
0.037109375,
-0.00255584716796875,
0.00440216064453125,
-0.01263427734375,
-0.00804901123046875,
-0.0167236328125,
0.046661376953125,
-0.034454345703125,
-0.0175933837890625,
0.007965087890625,
0.0221099853515625,
-0.016571044921875,
0.051483154296875,
-0.0267333984375,
-0.0006566047668457031,
-0.043701171875,
0.03173828125,
-0.021697998046875,
-0.0223236083984375,
-0.038238525390625,
0.0215911865234375,
0.051025390625,
-0.0254669189453125,
0.00753021240234375,
-0.046661376953125,
0.004474639892578125,
-0.008880615234375,
0.056915283203125,
-0.0411376953125,
0.048431396484375,
-0.00464630126953125,
0.082763671875,
0.04669189453125,
0.019927978515625,
0.04644775390625,
-0.02655029296875,
-0.0247802734375,
0.0288238525390625,
-0.01544952392578125,
-0.02459716796875,
-0.0113677978515625,
0.0408935546875,
-0.0198822021484375,
-0.0125732421875,
0.04388427734375,
0.022735595703125,
-0.006595611572265625,
-0.0611572265625,
0.00955963134765625,
-0.031158447265625,
0.006732940673828125,
-0.0248260498046875,
-0.0206451416015625,
0.004871368408203125,
-0.005046844482421875,
0.006893157958984375,
-0.02093505859375,
0.01190948486328125,
0.0169525146484375,
-0.018798828125,
0.005443572998046875,
-0.059326171875,
0.058135986328125,
-0.0063323974609375,
0.006549835205078125,
-0.032806396484375,
-0.00666046142578125,
-0.0103302001953125,
0.00930023193359375,
-0.00299835205078125,
-0.017364501953125,
-0.03521728515625,
0.0303192138671875,
-0.012481689453125,
-0.01519012451171875,
0.0272064208984375,
-0.0107421875,
-0.048736572265625,
-0.0218505859375,
0.00835418701171875,
-0.00748443603515625,
0.014862060546875,
-0.0032825469970703125,
0.013702392578125,
0.016082763671875,
-0.0595703125,
-0.0391845703125,
0.027069091796875,
-0.0233154296875,
-0.0110321044921875,
0.028656005859375,
-0.0173797607421875,
0.012481689453125,
-0.0273895263671875,
-0.05169677734375,
0.032867431640625,
0.0045623779296875,
-0.0240325927734375,
0.0147857666015625,
-0.0015325546264648438,
0.00527191162109375,
-0.00508880615234375,
0.0029048919677734375,
0.004093170166015625,
-0.027557373046875,
-0.037078857421875,
0.0211181640625,
0.0232696533203125,
0.00690460205078125,
0.004909515380859375,
-0.05584716796875,
0.00496673583984375,
0.0033588409423828125,
0.0162353515625,
0.0051727294921875,
0.008453369140625,
0.025726318359375,
0.0289306640625,
-0.0187835693359375,
0.0200653076171875,
0.013031005859375,
-0.0276641845703125,
-0.0006961822509765625,
-0.0295562744140625,
-0.0261993408203125,
-0.020050048828125,
0.03179931640625,
0.04754638671875,
0.017425537109375,
-0.0301055908203125,
-0.02001953125,
0.0005173683166503906,
0.0224609375,
0.00409698486328125,
-0.01055145263671875,
-0.01494598388671875,
0.00330352783203125,
-0.0190277099609375,
-0.030548095703125,
-0.00811004638671875,
0.02520751953125,
-0.043975830078125,
0.00571441650390625,
0.0131072998046875,
-0.0162506103515625,
-0.0660400390625,
0.034149169921875,
0.00722503662109375,
-0.0270538330078125,
-0.00493621826171875,
-0.0241851806640625,
0.0001036524772644043,
-0.00336456298828125,
-0.025665283203125,
0.0318603515625,
0.021484375,
-0.000614166259765625,
-0.0171051025390625,
0.037811279296875,
-0.036407470703125,
0.0210723876953125,
-0.01404571533203125,
-0.01456451416015625,
0.0034694671630859375,
-0.0038547515869140625,
-0.0141143798828125,
-0.0008077621459960938,
0.0255126953125,
-0.00812530517578125,
0.05963134765625,
-0.001819610595703125,
0.0399169921875,
-0.00533294677734375,
0.0155181884765625,
-0.01947021484375,
0.0088348388671875,
0.01898193359375,
-0.02203369140625,
-0.00714111328125,
-0.003448486328125,
-0.0178680419921875,
-0.0299224853515625,
0.005954742431640625,
0.039947509765625,
-0.007659912109375,
0.006664276123046875
] |
e243fe2a4f8ba0b8ae77f90f6391da878888ae0e
|
Wordpress Stackexchange
Q: How can I custom order the results from wp_list_categories? I am using wp_list_categories to return (you guessed it) a list of categories within a custom taxonomy. The orderby parameter accepts sorting by ID, name, slug, count, and term_group. Is there a way that I can custom sort the results? Ideally I could pass an array of category ID's in the desired order, but obviously I'll have to dig a bit deeper to get this sorted.
A: There is an unused column, term_order, in the wp_term_relationships table that you can use to assign a custom order to the terms within your taxonomy. The order is set at 0 by default and it will take a custom query to get the order back and another solution to set the order.
Example query:
function wpse_order_taxes() {
global $wpdb;
$results = $wpdb->get_results ( "SELECT * FROM $wpdb->terms t inner join $wpdb->term_taxonomy tt on t.term_id = tt.term_id WHERE taxonomy = 'category' ORDER BY term_order ASC LIMIT 0, 10" );
$categories = array();
foreach ( $results as $cat ) {
array_push( $categories, $cat->slug );
}
return $categories;
}
This would give you back an array of terms ordered by the custom order.
|
Q: How can I custom order the results from wp_list_categories? I am using wp_list_categories to return (you guessed it) a list of categories within a custom taxonomy. The orderby parameter accepts sorting by ID, name, slug, count, and term_group. Is there a way that I can custom sort the results? Ideally I could pass an array of category ID's in the desired order, but obviously I'll have to dig a bit deeper to get this sorted.
A: There is an unused column, term_order, in the wp_term_relationships table that you can use to assign a custom order to the terms within your taxonomy. The order is set at 0 by default and it will take a custom query to get the order back and another solution to set the order.
Example query:
function wpse_order_taxes() {
global $wpdb;
$results = $wpdb->get_results ( "SELECT * FROM $wpdb->terms t inner join $wpdb->term_taxonomy tt on t.term_id = tt.term_id WHERE taxonomy = 'category' ORDER BY term_order ASC LIMIT 0, 10" );
$categories = array();
foreach ( $results as $cat ) {
array_push( $categories, $cat->slug );
}
return $categories;
}
This would give you back an array of terms ordered by the custom order.
|
wordpress
|
{
"language": "en",
"length": 197,
"provenance": "stackexchange_00019.jsonl.gz:421685",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57982"
}
|
[
0.054229736328125,
0.0247802734375,
-0.044769287109375,
-0.05621337890625,
0.0654296875,
-0.050140380859375,
0.0404052734375,
0.0167388916015625,
0.016815185546875,
0.00014865398406982422,
-0.0090179443359375,
-0.0518798828125,
-0.0274200439453125,
-0.0531005859375,
-0.0367431640625,
-0.06402587890625,
0.036895751953125,
-0.0211181640625,
0.0274505615234375,
-0.007282257080078125,
0.0225830078125,
0.031280517578125,
0.0187835693359375,
0.045135498046875,
0.006618499755859375,
-0.0259552001953125,
0.06982421875,
-0.033599853515625,
0.0183563232421875,
-0.04071044921875,
0.018768310546875,
0.002460479736328125,
0.008331298828125,
0.00955963134765625,
0.0182342529296875,
0.01264190673828125,
0.049407958984375,
-0.01200103759765625,
-0.00882720947265625,
0.051300048828125,
0.041534423828125,
-0.0177001953125,
0.01064300537109375,
0.01300811767578125,
-0.0106048583984375,
-0.0323486328125,
0.04486083984375,
-0.021209716796875,
0.0291748046875,
-0.0142822265625,
0.045257568359375,
-0.007297515869140625,
0.051025390625,
-0.057220458984375,
-0.0179290771484375,
0.003612518310546875,
-0.0237274169921875,
0.011871337890625,
0.0072479248046875,
0.0033111572265625,
-0.001415252685546875,
0.0201263427734375,
0.020172119140625,
0.000583648681640625,
0.000021517276763916016,
0.0240325927734375,
0.07244873046875,
0.01708984375,
-0.0114898681640625,
-0.0190277099609375,
-0.01065826416015625,
-0.004180908203125,
-0.01064300537109375,
-0.006168365478515625,
-0.015380859375,
-0.0386962890625,
0.0164947509765625,
-0.041290283203125,
0.016265869140625,
0.034759521484375,
0.0030269622802734375,
-0.0158538818359375,
-0.011566162109375,
0.0037326812744140625,
0.0034313201904296875,
0.018402099609375,
-0.028839111328125,
-0.01293182373046875,
-0.021148681640625,
-0.023162841796875,
-0.0086822509765625,
-0.01702880859375,
-0.036712646484375,
0.025634765625,
-0.0005145072937011719,
-0.0250701904296875,
0.01207733154296875,
0.033905029296875,
-0.014373779296875,
-0.01271820068359375,
-0.0013189315795898438,
-0.020355224609375,
-0.017913818359375,
-0.01953125,
0.00923919677734375,
-0.0574951171875,
-0.031829833984375,
-0.019989013671875,
0.0438232421875,
0.054840087890625,
-0.02752685546875,
0.002864837646484375,
0.01232147216796875,
-0.0489501953125,
0.01389312744140625,
-0.000629425048828125,
-0.020538330078125,
0.037322998046875,
0.0236358642578125,
-0.0419921875,
0.00632476806640625,
0.0305938720703125,
0.01080322265625,
-0.01126861572265625,
-0.0071563720703125,
0.00409698486328125,
-0.01824951171875,
-0.043609619140625,
-0.01488494873046875,
0.0060882568359375,
-0.0501708984375,
0.0302734375,
0.0640869140625,
0.04254150390625,
0.0134124755859375,
-0.007080078125,
0.0027294158935546875,
-0.0034885406494140625,
-0.00823974609375,
0.029083251953125,
0.00008392333984375,
-0.0188446044921875,
0.005550384521484375,
-0.0176849365234375,
0.0360107421875,
-0.0168609619140625,
-0.00730133056640625,
0.0167694091796875,
0.03857421875,
0.01143646240234375,
0.0300140380859375,
-0.024505615234375,
0.056976318359375,
0.007457733154296875,
-0.050201416015625,
0.0185394287109375,
-0.0023365020751953125,
0.00800323486328125,
-0.06396484375,
-0.0287933349609375,
0.0006794929504394531,
-0.0146331787109375,
-0.01116943359375,
-0.038604736328125,
-0.0384521484375,
0.01617431640625,
-0.034088134765625,
-0.0041656494140625,
0.018035888671875,
0.00469970703125,
0.01544189453125,
-0.0231781005859375,
-0.0007648468017578125,
0.0083465576171875,
-0.006534576416015625,
0.0296173095703125,
-0.02972412109375,
-0.0285186767578125,
0.025146484375,
0.01605224609375,
-0.0243377685546875,
-0.040252685546875,
-0.01419830322265625,
0.01218414306640625,
-0.032958984375,
0.038177490234375,
-0.0011243820190429688,
0.05645751953125,
0.0191650390625,
0.01136016845703125,
-0.01465606689453125,
0.0282135009765625,
-0.07232666015625,
0.026214599609375,
0.0148773193359375,
-0.0004734992980957031,
-0.053497314453125,
-0.005161285400390625,
0.0001704692840576172,
-0.022369384765625,
-0.0254364013671875,
0.0246429443359375,
-0.025299072265625,
0.0205230712890625,
-0.033905029296875,
0.021240234375,
-0.01021575927734375,
0.041717529296875,
-0.017364501953125,
0.003772735595703125,
0.0265960693359375,
-0.005214691162109375,
-0.042083740234375,
0.0242156982421875,
-0.0260467529296875,
-0.0198211669921875,
0.00896453857421875,
0.0231475830078125,
-0.010833740234375,
-0.0034027099609375,
-0.025726318359375,
-0.040496826171875,
-0.00821685791015625,
0.059051513671875,
0.01097869873046875,
0.004657745361328125,
-0.02435302734375,
0.0010528564453125,
0.007152557373046875,
0.0235443115234375,
-0.0284576416015625,
0.005031585693359375,
0.04791259765625,
0.06304931640625,
0.0002225637435913086,
-0.011932373046875,
0.044525146484375,
-0.0814208984375,
0.0132904052734375,
0.0300140380859375,
0.0257720947265625,
-0.0035247802734375,
-0.0102081298828125,
-0.01490020751953125,
0.053070068359375,
-0.008087158203125,
-0.00238800048828125,
-0.0089569091796875,
0.032501220703125,
0.049468994140625,
0.0093994140625,
0.01073455810546875,
0.0225677490234375,
0.041412353515625,
0.0423583984375,
0.0196075439453125,
-0.0002613067626953125,
0.01235198974609375,
0.02679443359375,
-0.015716552734375,
0.006343841552734375,
-0.01160430908203125,
-0.01442718505859375,
-0.00397491455078125,
-0.0102996826171875,
0.00609588623046875,
-0.0012969970703125,
0.0004963874816894531,
-0.03021240234375,
0.006072998046875,
0.026336669921875,
-0.00801849365234375,
-0.0024089813232421875,
0.005985260009765625,
-0.01412200927734375,
-0.020721435546875,
-0.017303466796875,
0.01155853271484375,
0.0012302398681640625,
-0.0199127197265625,
0.0070343017578125,
0.0714111328125,
0.01500701904296875,
-0.005832672119140625,
-0.060577392578125,
-0.08544921875,
0.02642822265625,
0.0625,
-0.07666015625,
-0.03253173828125,
-0.0015878677368164062,
0.0557861328125,
-0.0250091552734375,
0.006122589111328125,
-0.0379638671875,
0.030303955078125,
0.004444122314453125,
-0.032470703125,
0.0208892822265625,
-0.037811279296875,
0.03314208984375,
0.065185546875,
0.00009328126907348633,
0.0019664764404296875,
-0.004199981689453125,
0.004283905029296875,
0.0134429931640625,
0.0067596435546875,
-0.01983642578125,
-0.0285491943359375,
-0.037353515625,
-0.01132965087890625,
0.0300445556640625,
0.042266845703125,
-0.00653076171875,
-0.045623779296875,
0.00982666015625,
0.0162200927734375,
-0.0308990478515625,
-0.060577392578125,
0.04449462890625,
-0.0056915283203125,
0.031005859375,
-0.006931304931640625,
0.00331878662109375,
-0.037078857421875,
-0.0186920166015625,
-0.0101776123046875,
0.040771484375,
-0.0374755859375,
-0.042083740234375,
-0.034820556640625,
-0.07366943359375,
-0.0191497802734375,
0.0217742919921875,
0.00890350341796875,
0.01192474365234375,
0.08697509765625,
0.043548583984375,
-0.0411376953125,
0.034637451171875,
0.03509521484375,
-0.0294647216796875,
0.022796630859375,
0.022216796875,
-0.04547119140625,
0.01483917236328125,
0.0007429122924804688,
0.039337158203125,
0.0271148681640625,
-0.0190887451171875,
0.01441192626953125,
-0.0194091796875,
0.052825927734375,
0.0213623046875,
-0.0015020370483398438,
0.015899658203125,
0.029876708984375,
0.010711669921875,
-0.030029296875,
-0.00609588623046875,
0.006938934326171875,
-0.00014066696166992188,
-0.029449462890625,
-0.0273284912109375,
-0.01129913330078125,
-0.01314544677734375,
0.01361083984375,
0.0023441314697265625,
0.0130767822265625,
-0.0286102294921875,
-0.01401519775390625,
0.031707763671875,
0.0143280029296875,
0.01244354248046875,
0.008453369140625,
0.038330078125,
-0.004848480224609375,
-0.0182952880859375,
0.0127105712890625,
0.013916015625,
-0.0190582275390625,
0.005580902099609375,
-0.052520751953125,
-0.0777587890625,
0.0469970703125,
-0.061553955078125,
-0.00713348388671875,
-0.0462646484375,
-0.0187225341796875,
0.030731201171875,
0.11077880859375,
-0.0265655517578125,
-0.0271453857421875,
0.01033782958984375,
0.0207672119140625,
-0.0071868896484375,
0.00345611572265625,
-0.0276947021484375,
-0.034576416015625,
-0.0888671875,
0.0283355712890625,
0.01187896728515625,
-0.0179290771484375,
-0.0377197265625,
0.0160675048828125,
-0.07159423828125,
-0.0297088623046875,
0.040496826171875,
-0.053558349609375,
0.01403045654296875,
-0.01401519775390625,
0.00029921531677246094,
-0.055419921875,
-0.022125244140625,
-0.00902557373046875,
-0.049346923828125,
0.007843017578125,
-0.00940704345703125,
-0.006153106689453125,
-0.00690460205078125,
0.0169219970703125,
-0.005306243896484375,
0.039520263671875,
0.01194000244140625,
-0.01357269287109375,
0.033355712890625,
0.04052734375,
-0.00476837158203125,
-0.02154541015625,
0.01152801513671875,
-0.052703857421875,
-0.02752685546875,
-0.03302001953125,
-0.0135955810546875,
0.03680419921875,
-0.004222869873046875,
0.033721923828125,
-0.01898193359375,
-0.00762176513671875,
-0.032684326171875,
-0.042572021484375,
-0.06427001953125,
0.007259368896484375,
-0.0277252197265625,
-0.00998687744140625,
-0.02581787109375,
-0.06976318359375,
0.01335906982421875,
-0.0018339157104492188,
-0.0185394287109375,
0.024658203125,
0.026123046875,
0.017242431640625,
-0.017974853515625,
-0.05487060546875,
0.008636474609375,
0.029296875,
0.0046844482421875,
0.01123809814453125,
-0.0096282958984375,
-0.03656005859375,
0.062347412109375,
-0.00041985511779785156,
-0.0114593505859375,
0.0176239013671875,
0.0253448486328125,
0.022125244140625,
-0.0207366943359375,
0.0086669921875,
0.00614166259765625,
-0.0154266357421875,
0.022918701171875,
-0.01129913330078125,
-0.0232696533203125,
0.00016736984252929688,
0.042694091796875,
-0.021820068359375,
0.0218505859375,
-0.023956298828125,
-0.039703369140625,
0.0251922607421875,
-0.00872802734375,
0.0248565673828125,
0.0009388923645019531,
0.0005102157592773438,
0.02239990234375,
0.00470733642578125,
0.0237579345703125,
0.000690460205078125,
-0.00333404541015625,
-0.014984130859375,
0.03564453125,
-0.0012922286987304688,
0.00986480712890625,
0.0244140625,
-0.00304412841796875,
0.0433349609375,
-0.00878143310546875,
-0.03375244140625,
-0.036529541015625,
-0.01153564453125,
0.025665283203125,
0.025604248046875,
-0.041412353515625,
0.017913818359375,
0.0254058837890625,
-0.00811004638671875,
0.0160369873046875,
-0.08367919921875,
0.02313232421875,
-0.02508544921875,
0.0220947265625,
0.02459716796875,
-0.01513671875,
-0.01499176025390625,
0.0667724609375,
0.01483917236328125,
0.0126190185546875,
-0.01102447509765625,
0.002590179443359375,
-0.00567626953125,
0.0188446044921875,
0.01306915283203125,
-0.0093536376953125,
0.0024394989013671875,
-0.0011749267578125,
0.033172607421875,
-0.01206207275390625,
0.01009368896484375,
-0.01995849609375,
-0.01396942138671875,
-0.029754638671875,
-0.0176849365234375,
0.07122802734375,
0.005435943603515625,
-0.01983642578125,
0.01468658447265625,
0.0175933837890625,
-0.004283905029296875,
-0.04022216796875,
-0.04705810546875,
-0.00864410400390625,
0.011749267578125,
-0.0014657974243164062,
0.023162841796875,
-0.00937652587890625,
0.0271148681640625,
-0.038482666015625,
0.0244903564453125,
-0.01447296142578125,
-0.012603759765625,
-0.052978515625,
0.0081024169921875,
0.0361328125,
-0.0146636962890625,
-0.0372314453125,
-0.006397247314453125,
-0.046722412109375,
0.026702880859375,
-0.053131103515625,
0.0677490234375,
-0.038421630859375,
0.0081634521484375,
-0.04498291015625,
0.024017333984375,
0.0260467529296875,
0.035369873046875,
-0.037078857421875,
-0.01068115234375,
-0.031005859375,
-0.0007176399230957031,
0.0196685791015625,
-0.02691650390625,
-0.003849029541015625,
-0.0167388916015625,
0.024139404296875,
0.004146575927734375,
0.0243377685546875,
-0.05218505859375,
-0.04974365234375,
-0.0010852813720703125,
0.037139892578125,
-0.034881591796875,
0.0030994415283203125,
0.052215576171875,
-0.0136871337890625,
0.06475830078125,
0.019317626953125,
-0.00531005859375,
-0.03271484375,
-0.0252838134765625,
-0.01056671142578125,
-0.06768798828125,
-0.0276947021484375,
-0.009124755859375,
-0.054473876953125,
0.050506591796875,
0.06207275390625,
0.0113983154296875,
0.035980224609375,
0.001972198486328125,
0.007602691650390625,
0.003566741943359375,
-0.06341552734375,
0.005580902099609375,
0.005031585693359375,
0.034912109375,
-0.00676727294921875,
0.024993896484375,
-0.0156097412109375,
-0.00118255615234375,
0.0197906494140625,
-0.02508544921875,
0.03839111328125,
-0.0162506103515625,
-0.051177978515625,
0.0382080078125,
0.0421142578125,
0.04803466796875,
0.044921875,
-0.0232696533203125,
0.036224365234375,
-0.0038242340087890625,
0.0009179115295410156,
0.06842041015625,
-0.0104217529296875,
0.06109619140625,
-0.0181884765625,
-0.03326416015625,
0.0220947265625,
-0.053985595703125,
-0.0019626617431640625,
0.00844573974609375,
0.029632568359375,
-0.0289306640625,
0.01641845703125,
0.01251983642578125,
-0.0120849609375,
0.010894775390625,
0.0204925537109375,
-0.053070068359375,
-0.0254669189453125,
0.005199432373046875,
-0.0672607421875,
-0.0377197265625,
0.006015777587890625,
0.00209808349609375,
-0.0067596435546875,
-0.00007480382919311523,
0.02862548828125,
0.019256591796875,
-0.0179290771484375,
-0.00937652587890625,
-0.0082244873046875,
0.016448974609375,
0.002071380615234375,
0.0200347900390625,
-0.0029296875,
-0.0065460205078125,
-0.033905029296875,
0.0227203369140625,
-0.0136566162109375,
-0.0167388916015625,
0.0197906494140625,
-0.06768798828125,
0.00548553466796875,
0.00940704345703125,
-0.02423095703125,
-0.00431060791015625,
-0.019073486328125,
-0.0732421875,
0.0100555419921875,
0.0066070556640625,
0.0202484130859375,
0.006378173828125,
-0.029754638671875,
0.007282257080078125,
-0.0225677490234375,
-0.0089111328125,
-0.0178375244140625,
-0.034820556640625,
0.04339599609375,
-0.0181121826171875,
-0.00457000732421875,
0.01276397705078125,
0.07867431640625,
0.0017595291137695312,
-0.01024627685546875,
0.047332763671875,
-0.069091796875,
-0.0294952392578125,
0.0211181640625,
-0.0086822509765625,
-0.00009483098983764648,
0.0074005126953125,
-0.04339599609375,
0.07794189453125,
-0.01117706298828125,
0.008941650390625,
-0.006778717041015625,
0.030364990234375,
-0.0017232894897460938,
0.043212890625,
-0.0169525146484375,
0.0350341796875,
0.034423828125,
0.017242431640625,
-0.046783447265625,
-0.033538818359375,
-0.005771636962890625,
0.0777587890625,
0.038238525390625,
0.00913238525390625,
-0.05914306640625,
0.0006556510925292969,
0.058502197265625,
0.0423583984375,
0.0228424072265625,
0.04644775390625,
0.0117034912109375,
0.0262603759765625,
0.034881591796875,
0.00617218017578125,
0.048492431640625,
0.005046844482421875,
-0.041839599609375,
0.04302978515625,
0.032470703125,
0.054046630859375,
-0.036651611328125,
0.0228424072265625,
-0.041748046875,
-0.019500732421875,
0.041900634765625,
-0.003894805908203125,
0.0107574462890625,
0.04150390625,
0.033050537109375,
-0.04754638671875,
-0.0280609130859375,
-0.0268707275390625,
0.056640625,
0.006076812744140625,
0.0496826171875,
0.043365478515625,
0.02618408203125,
0.048828125,
-0.032440185546875,
0.024658203125,
-0.0053253173828125,
-0.04302978515625,
0.046234130859375,
-0.0001302957534790039,
0.01529693603515625,
-0.039215087890625,
0.01073455810546875,
0.041748046875,
0.058380126953125,
-0.041473388671875,
-0.0277099609375,
0.01465606689453125,
-0.00495147705078125,
0.0114593505859375,
-0.007373809814453125,
0.008575439453125,
0.0321044921875,
0.03582763671875,
-0.085693359375,
-0.02508544921875,
0.025726318359375,
0.03668212890625,
-0.0255126953125,
-0.0216522216796875,
0.01224517822265625,
-0.059906005859375,
-0.022918701171875,
0.0268096923828125,
0.0236968994140625,
0.032440185546875,
-0.0213623046875,
0.049163818359375,
-0.04400634765625,
-0.001552581787109375,
-0.005611419677734375,
0.0347900390625,
-0.01441192626953125,
0.01160430908203125,
-0.00412750244140625,
-0.01444244384765625,
-0.035736083984375,
0.01528167724609375,
-0.001369476318359375,
0.00449371337890625,
0.026153564453125,
0.06744384765625,
0.0190277099609375,
-0.0170745849609375,
0.05792236328125,
0.0018587112426757812,
-0.06488037109375,
-0.032379150390625,
0.0265045166015625,
0.057342529296875,
0.027252197265625,
0.04656982421875,
0.0219879150390625,
0.06439208984375,
-0.0048828125,
0.0421142578125,
-0.0047607421875,
-0.007633209228515625,
0.028411865234375,
-0.00913238525390625,
0.0618896484375,
0.03070068359375,
-0.0665283203125,
-0.020355224609375,
-0.04766845703125,
-0.0053863525390625,
0.031005859375,
0.05035400390625,
0.029449462890625,
-0.0089111328125,
-0.0030651092529296875,
-0.08062744140625,
0.0241241455078125,
0.0305633544921875,
0.018646240234375,
-0.0288543701171875,
-0.01715087890625,
-0.03607177734375,
-0.044769287109375,
-0.0225067138671875,
0.0104827880859375,
0.01396942138671875,
0.0184326171875,
0.0135345458984375,
0.021453857421875,
0.014862060546875,
-0.0472412109375,
0.030059814453125,
-0.0584716796875,
-0.06500244140625,
0.08428955078125,
-0.00795745849609375,
-0.0162811279296875,
-0.00643157958984375,
0.01201629638671875,
-0.052642822265625,
0.05950927734375,
-0.0643310546875,
-0.058746337890625,
-0.044219970703125,
0.050323486328125,
-0.0029754638671875,
0.055267333984375,
-0.0221099853515625,
-0.01374053955078125,
-0.02545166015625,
-0.03802490234375,
0.028594970703125,
0.03765869140625,
0.02001953125,
0.0261993408203125,
-0.0178680419921875,
-0.0318603515625,
0.0280609130859375,
-0.04510498046875,
0.0802001953125,
0.04986572265625,
-0.05670166015625,
0.0010538101196289062,
0.0170440673828125,
-0.01849365234375,
0.00032019615173339844,
0.0167236328125,
-0.0004134178161621094,
0.0220489501953125,
-0.033538818359375,
-0.00946807861328125,
0.0177764892578125,
0.032562255859375,
-0.0187835693359375,
0.01513671875,
-0.002315521240234375,
-0.01436614990234375,
-0.0042572021484375,
-0.0224609375,
-0.052520751953125,
-0.00824737548828125,
0.0200347900390625,
0.0212860107421875,
0.0322265625,
-0.00664520263671875,
-0.043121337890625,
0.0138397216796875,
0.046234130859375,
0.00705718994140625,
-0.019683837890625,
0.00847625732421875,
-0.03253173828125,
0.01459503173828125,
0.02752685546875,
-0.029388427734375,
0.01010894775390625,
0.00809478759765625,
-0.02642822265625,
0.0005035400390625,
-0.028228759765625,
-0.01222991943359375,
-0.0271148681640625,
-0.0055999755859375,
-0.0287322998046875,
-0.00007075071334838867,
-0.018798828125,
0.0200347900390625,
-0.0024394989013671875,
0.0628662109375,
0.056060791015625,
-0.005832672119140625,
0.0179290771484375,
0.0212860107421875,
-0.061676025390625,
-0.057464599609375,
0.03192138671875,
-0.013824462890625,
-0.0008969306945800781,
0.00803375244140625,
0.0186767578125,
0.0489501953125,
-0.01885986328125,
-0.045623779296875,
0.048492431640625,
-0.013153076171875,
-0.032928466796875,
-0.032470703125,
-0.008270263671875,
-0.002269744873046875,
-0.0172882080078125,
-0.0010929107666015625,
-0.01947021484375,
-0.0306396484375,
0.02545166015625,
0.0105438232421875,
0.050079345703125,
-0.0139007568359375,
0.03436279296875,
-0.10693359375,
0.0082855224609375,
-0.05230712890625,
0.021575927734375,
-0.0238037109375,
0.0128936767578125,
-0.003963470458984375,
0.0212249755859375,
-0.0250701904296875,
-0.02813720703125,
0.00180816650390625,
-0.00949859619140625,
0.0177459716796875,
-0.05645751953125,
-0.0226593017578125,
-0.0239410400390625,
0.024749755859375,
0.01264190673828125,
0.0020732879638671875,
-0.029052734375,
-0.044708251953125,
-0.0183563232421875,
0.01450347900390625,
-0.019775390625,
0.01128387451171875,
-0.07000732421875,
-0.0188446044921875,
0.010162353515625,
0.006824493408203125,
0.035400390625,
-0.01238250732421875,
-0.02294921875,
-0.004512786865234375,
-0.0156707763671875,
0.0045928955078125,
-0.1044921875,
0.036773681640625,
-0.034027099609375,
-0.028076171875,
-0.07086181640625,
-0.0199127197265625,
-0.005321502685546875,
-0.07855224609375,
-0.046966552734375,
-0.040924072265625,
-0.001003265380859375,
0.016082763671875,
0.00411224365234375,
-0.0083770751953125,
-0.005939483642578125,
0.0151214599609375,
0.03143310546875,
-0.0232086181640625,
0.016754150390625,
-0.004421234130859375,
0.00975799560546875,
0.0008540153503417969,
0.0341796875,
0.024627685546875,
0.0736083984375,
-0.01395416259765625,
0.0173187255859375,
0.0140838623046875,
0.01386260986328125,
-0.01580810546875,
-0.00806427001953125,
0.036865234375,
-0.051544189453125,
0.023406982421875,
-0.01403045654296875,
0.0038471221923828125,
0.036163330078125,
-0.035736083984375,
-0.012725830078125,
-0.03802490234375,
-0.007965087890625
] |
2fa5b42f15f2aecf415f82be031ea299d2bc7559
|
Wordpress Stackexchange
Q: Looking for WordPress System Diagrams I am looking for WordPress chart/diagram system design.
I found only the template hierarchy diagram, but it's only part of the system.
source: http://upload.wikimedia.org/wikipedia/commons/3/3d/Wordpress_Template_Hierarchy.png
A: If you are looking for the database schema, there is a version on the Codex:
click to enlarge
The image you referenced in your post is the template hierarchy most commonly used by theme developers.
|
Q: Looking for WordPress System Diagrams I am looking for WordPress chart/diagram system design.
I found only the template hierarchy diagram, but it's only part of the system.
source: http://upload.wikimedia.org/wikipedia/commons/3/3d/Wordpress_Template_Hierarchy.png
A: If you are looking for the database schema, there is a version on the Codex:
click to enlarge
The image you referenced in your post is the template hierarchy most commonly used by theme developers.
A: More than an Answer, this is a research and a compilation. Database Description already in Damien answer.
A Google search reveals this in WordPress forums:
UML documentation of WordPress
As far as I know, that's all we have. If you want to write one, I'm sure it'd be welcomed :)
(Ipstenu, referring to the Database Description)
UML of WordPress MU?
There will likely never be UML diagrams of WordPress because it's not
an OO system. Some parts are OO-like, but overall it's whatever that
particular code contributor made work. There's no map, just code.
And IMO, the point of UML is that it's done in the architecting phase.
A project like WordPress would be hard-pressed to have this since it's
a fluid integration of independent developers contributing to the
core.
[...]
Welcome to open source.
Note: the Template Hierarchy of WikiMedia in the OP Question differs from the one in the Codex
click to enlarge
But, Chip Bennet has an extended one :)
I thought this Question was a duplicate of the following (but mods said it's not):
Where can I find a real architecture document on Wordpress?
In it, Mike Schinkel states:
These generally are not some the open-source WordPress community focuses on doing.
One answer points to an old article with this diagram:
And the other to this Wordpress 3.0 Program Flow (PDF)
Rarst answer to this Question ( When should you use WP_Query vs query_posts() vs get_posts()? ) has a nice overview of WP_Query:
Another from Rarst on core load:
And finally, a totally unrelated Question about performance ( Refactoring Wordpress to improve memory performance ), but with very nice graphs :)
|
wordpress
|
{
"language": "en",
"length": 342,
"provenance": "stackexchange_00019.jsonl.gz:421692",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/57996"
}
|
[
-0.006351470947265625,
-0.023193359375,
0.000457763671875,
-0.007007598876953125,
-0.0117034912109375,
-0.023345947265625,
0.018890380859375,
-0.018402099609375,
0.0161590576171875,
0.038909912109375,
-0.03314208984375,
-0.036041259765625,
0.0284271240234375,
-0.0200347900390625,
-0.032745361328125,
-0.043701171875,
0.05859375,
-0.0452880859375,
0.037017822265625,
0.0034923553466796875,
-0.00994110107421875,
0.034942626953125,
0.066650390625,
0.029998779296875,
0.0048370361328125,
-0.0172271728515625,
0.059051513671875,
-0.0178070068359375,
-0.0027828216552734375,
-0.025909423828125,
0.01288604736328125,
0.01043701171875,
0.0217132568359375,
-0.0233154296875,
0.020172119140625,
0.0016374588012695312,
-0.00020444393157958984,
-0.01544952392578125,
0.04437255859375,
-0.03814697265625,
-0.024749755859375,
0.0214691162109375,
0.051788330078125,
-0.02496337890625,
0.01332855224609375,
-0.018829345703125,
-0.0222625732421875,
-0.0828857421875,
0.020751953125,
-0.003215789794921875,
0.020782470703125,
-0.00217437744140625,
0.0299835205078125,
0.02410888671875,
-0.0230560302734375,
0.0015106201171875,
0.0506591796875,
-0.011566162109375,
0.01873779296875,
-0.0726318359375,
-0.040008544921875,
0.026275634765625,
0.024200439453125,
0.041046142578125,
-0.0231781005859375,
-0.01045989990234375,
-0.03997802734375,
0.0204315185546875,
-0.0004949569702148438,
-0.0220947265625,
0.0118408203125,
-0.01216888427734375,
-0.0047760009765625,
-0.005435943603515625,
0.006755828857421875,
-0.00466156005859375,
-0.0015850067138671875,
-0.0268402099609375,
0.014312744140625,
0.0189056396484375,
-0.00754547119140625,
-0.0131683349609375,
-0.04425048828125,
-0.03570556640625,
0.0296783447265625,
0.0015439987182617188,
-0.00963592529296875,
-0.011077880859375,
-0.011322021484375,
-0.033111572265625,
-0.0261077880859375,
0.0038433074951171875,
-0.041412353515625,
-0.0019197463989257812,
-0.0228424072265625,
-0.0212554931640625,
0.006389617919921875,
0.0184173583984375,
-0.025848388671875,
0.008575439453125,
-0.0254669189453125,
-0.006610870361328125,
0.024169921875,
-0.0195770263671875,
0.019927978515625,
0.0159759521484375,
-0.0078582763671875,
0.01497650146484375,
0.0447998046875,
0.03277587890625,
-0.0040740966796875,
0.0258026123046875,
0.02294921875,
-0.0262451171875,
0.0298004150390625,
0.0067901611328125,
0.0008153915405273438,
0.047698974609375,
0.0033016204833984375,
0.0227203369140625,
-0.0055999755859375,
0.041595458984375,
-0.0113525390625,
0.01068878173828125,
-0.028717041015625,
-0.0095062255859375,
0.02264404296875,
-0.0364990234375,
-0.0277252197265625,
-0.01104736328125,
-0.005519866943359375,
0.005992889404296875,
0.034820556640625,
0.059326171875,
-0.0027294158935546875,
0.0027103424072265625,
-0.006496429443359375,
-0.01087188720703125,
0.0106048583984375,
-0.003246307373046875,
-0.0084228515625,
-0.0170440673828125,
0.0206146240234375,
-0.0200653076171875,
-0.01055908203125,
0.0088348388671875,
0.0172271728515625,
0.0295257568359375,
-0.020416259765625,
-0.035858154296875,
0.0262603759765625,
0.00617218017578125,
0.01120758056640625,
0.011627197265625,
-0.0036163330078125,
0.005329132080078125,
-0.0304107666015625,
0.01165008544921875,
-0.0014133453369140625,
0.0164794921875,
-0.044097900390625,
0.0092315673828125,
0.07293701171875,
-0.0176239013671875,
-0.01151275634765625,
0.0025539398193359375,
-0.041748046875,
-0.00801849365234375,
0.028076171875,
-0.008636474609375,
0.0269775390625,
-0.04510498046875,
0.04986572265625,
0.003200531005859375,
-0.00946807861328125,
0.038909912109375,
0.01800537109375,
-0.06329345703125,
0.01824951171875,
0.0504150390625,
-0.01284027099609375,
-0.0321044921875,
-0.03436279296875,
0.0206146240234375,
-0.0301055908203125,
-0.0020351409912109375,
0.02032470703125,
0.0239715576171875,
0.0160369873046875,
0.01456451416015625,
0.0265350341796875,
0.01319122314453125,
-0.0307159423828125,
0.074951171875,
0.00865936279296875,
-0.049407958984375,
-0.04638671875,
-0.00536346435546875,
-0.0216827392578125,
-0.049713134765625,
-0.0684814453125,
0.035797119140625,
-0.02825927734375,
0.04754638671875,
0.0074005126953125,
0.0040130615234375,
0.0007162094116210938,
0.02362060546875,
0.030242919921875,
0.01898193359375,
-0.0033130645751953125,
0.02069091796875,
-0.0235748291015625,
-0.044403076171875,
-0.038818359375,
0.05303955078125,
-0.0056915283203125,
0.022552490234375,
0.0005130767822265625,
-0.01288604736328125,
0.020751953125,
-0.0173492431640625,
0.0157012939453125,
0.0386962890625,
0.0175628662109375,
0.0249176025390625,
-0.021392822265625,
0.016448974609375,
0.0032978057861328125,
0.03594970703125,
-0.01213836669921875,
-0.00940704345703125,
0.022369384765625,
0.057373046875,
-0.0178070068359375,
-0.01435089111328125,
0.000885009765625,
-0.0298614501953125,
0.0196685791015625,
0.0302886962890625,
0.01320648193359375,
0.047027587890625,
-0.0224609375,
0.0015516281127929688,
0.03314208984375,
-0.08367919921875,
-0.0212860107421875,
0.0173797607421875,
-0.039154052734375,
0.01245880126953125,
0.0408935546875,
0.029296875,
0.015411376953125,
0.00591278076171875,
-0.023956298828125,
0.05291748046875,
-0.0220184326171875,
0.00811767578125,
0.0116424560546875,
0.0164031982421875,
-0.015625,
0.00188446044921875,
0.01073455810546875,
-0.0265045166015625,
0.036834716796875,
0.038604736328125,
0.03338623046875,
0.0328369140625,
-0.0159912109375,
0.0264739990234375,
0.005809783935546875,
-0.03582763671875,
0.0225372314453125,
0.0115509033203125,
-0.045074462890625,
0.05706787109375,
-0.010009765625,
-0.00955963134765625,
0.0092926025390625,
0.005504608154296875,
0.006755828857421875,
0.01297760009765625,
0.0157928466796875,
-0.0136260986328125,
0.0291290283203125,
-0.0222625732421875,
0.005664825439453125,
-0.019561767578125,
-0.0141143798828125,
0.0157928466796875,
0.01512908935546875,
0.036712646484375,
-0.033203125,
0.0382080078125,
-0.04510498046875,
-0.004100799560546875,
0.02752685546875,
-0.0293121337890625,
0.040985107421875,
-0.011474609375,
0.0226593017578125,
0.053802490234375,
0.00475311279296875,
0.00830078125,
-0.0159454345703125,
0.01485443115234375,
0.0218963623046875,
-0.05560302734375,
-0.0477294921875,
-0.017181396484375,
-0.03857421875,
-0.0012912750244140625,
0.030303955078125,
-0.0001856088638305664,
0.0139007568359375,
-0.0232696533203125,
-0.0284881591796875,
0.0102996826171875,
-0.0455322265625,
-0.0252838134765625,
-0.03790283203125,
0.011688232421875,
-0.041595458984375,
0.0159149169921875,
0.01165008544921875,
0.0164031982421875,
-0.01021575927734375,
-0.007717132568359375,
-0.0138397216796875,
-0.049346923828125,
-0.0972900390625,
-0.10784912109375,
-0.10284423828125,
0.0020809173583984375,
-0.0132904052734375,
0.03466796875,
-0.00027823448181152344,
0.0540771484375,
0.0019855499267578125,
-0.08258056640625,
-0.045928955078125,
0.00913238525390625,
-0.003444671630859375,
-0.0026187896728515625,
-0.00498199462890625,
-0.01412200927734375,
-0.035369873046875,
0.00414276123046875,
0.00970458984375,
-0.00302886962890625,
-0.00994873046875,
-0.008697509765625,
-0.0172882080078125,
0.0018739700317382812,
-0.0012884140014648438,
0.025970458984375,
0.0224761962890625,
-0.015960693359375,
-0.004726409912109375,
-0.051483154296875,
-0.02197265625,
0.0208892822265625,
-0.019287109375,
0.048980712890625,
-0.020294189453125,
-0.0087127685546875,
0.0245819091796875,
0.033477783203125,
0.024749755859375,
0.0178070068359375,
-0.0288848876953125,
-0.0217437744140625,
0.048309326171875,
0.01441192626953125,
0.04150390625,
0.0181121826171875,
-0.013397216796875,
-0.051849365234375,
0.039031982421875,
-0.0200347900390625,
-0.0309295654296875,
-0.0167083740234375,
0.0182952880859375,
0.009002685546875,
-0.0208892822265625,
0.03411865234375,
0.000025451183319091797,
0.0499267578125,
-0.0299835205078125,
-0.0340576171875,
-0.0006990432739257812,
0.10186767578125,
-0.04541015625,
0.0174713134765625,
0.009765625,
-0.01126861572265625,
-0.00921630859375,
-0.01207733154296875,
-0.1072998046875,
-0.007480621337890625,
-0.10150146484375,
0.020233154296875,
0.003570556640625,
-0.0516357421875,
-0.018218994140625,
0.011383056640625,
-0.06793212890625,
-0.0350341796875,
0.02130126953125,
-0.005161285400390625,
0.00888824462890625,
0.01488494873046875,
0.004161834716796875,
-0.0008006095886230469,
-0.01380157470703125,
-0.024688720703125,
-0.028289794921875,
-0.01361846923828125,
-0.033447265625,
0.059051513671875,
0.051666259765625,
-0.06353759765625,
0.0020503997802734375,
0.03900146484375,
-0.005176544189453125,
-0.0001806020736694336,
0.0033130645751953125,
0.0281524658203125,
0.0017843246459960938,
-0.0411376953125,
-0.0166168212890625,
-0.031280517578125,
-0.01715087890625,
-0.036407470703125,
-0.005748748779296875,
-0.0147705078125,
-0.037841796875,
-0.017974853515625,
-0.01468658447265625,
-0.01016998291015625,
-0.0615234375,
-0.036590576171875,
-0.01529693603515625,
0.010498046875,
-0.033721923828125,
0.0249481201171875,
-0.0330810546875,
-0.060943603515625,
0.054443359375,
0.07147216796875,
-0.0258941650390625,
0.00189971923828125,
0.042266845703125,
0.012664794921875,
-0.05340576171875,
-0.11749267578125,
-0.046295166015625,
0.028594970703125,
0.03424072265625,
0.0076446533203125,
0.010009765625,
-0.00966644287109375,
0.0037384033203125,
0.006809234619140625,
-0.005756378173828125,
-0.003932952880859375,
0.032745361328125,
0.0006079673767089844,
-0.0170440673828125,
0.007720947265625,
-0.0103302001953125,
0.0032958984375,
0.005283355712890625,
-0.0135650634765625,
-0.03955078125,
0.01210784912109375,
0.06781005859375,
-0.0232696533203125,
0.017486572265625,
-0.057037353515625,
-0.028411865234375,
0.01378631591796875,
0.00830078125,
0.031585693359375,
-0.00823974609375,
0.00847625732421875,
-0.00033926963806152344,
-0.0001844167709350586,
-0.00826263427734375,
0.03033447265625,
0.0303802490234375,
0.0216827392578125,
0.026885986328125,
0.0262603759765625,
-0.0083465576171875,
-0.0199737548828125,
-0.02984619140625,
0.078125,
0.05560302734375,
-0.058685302734375,
0.0772705078125,
-0.020111083984375,
0.01398468017578125,
-0.01258087158203125,
0.0018815994262695312,
0.029876708984375,
0.01470947265625,
-0.01485443115234375,
-0.0059967041015625,
-0.0254058837890625,
0.00579833984375,
-0.02899169921875,
0.006465911865234375,
-0.0228271484375,
-0.0095672607421875,
0.045501708984375,
-0.0130157470703125,
-0.031982421875,
0.01120758056640625,
0.00708770751953125,
0.0018415451049804688,
0.0233917236328125,
0.01114654541015625,
0.00894927978515625,
0.016632080078125,
0.021240234375,
-0.033447265625,
0.039215087890625,
-0.052032470703125,
-0.0584716796875,
0.024139404296875,
0.044189453125,
-0.0301055908203125,
-0.018707275390625,
0.02081298828125,
-0.0110626220703125,
0.0204010009765625,
-0.0262603759765625,
-0.0447998046875,
-0.01355743408203125,
0.022857666015625,
0.026885986328125,
0.006839752197265625,
-0.027130126953125,
0.0007224082946777344,
0.0225372314453125,
0.01236724853515625,
0.008636474609375,
0.002712249755859375,
-0.042572021484375,
0.0038204193115234375,
0.02667236328125,
-0.07916259765625,
-0.000011622905731201172,
0.020263671875,
-0.07733154296875,
-0.07342529296875,
0.0189208984375,
-0.0146331787109375,
0.039794921875,
-0.043914794921875,
0.04742431640625,
-0.016876220703125,
-0.002979278564453125,
-0.0253448486328125,
0.0108642578125,
0.0738525390625,
0.072021484375,
-0.036376953125,
-0.01715087890625,
-0.03802490234375,
-0.0040740966796875,
-0.045196533203125,
-0.059783935546875,
-0.025482177734375,
0.024688720703125,
-0.0048980712890625,
0.022552490234375,
0.0244903564453125,
0.060333251953125,
-0.0223846435546875,
0.0219268798828125,
-0.00702667236328125,
0.039154052734375,
0.007793426513671875,
0.1112060546875,
-0.0258331298828125,
0.0693359375,
0.016845703125,
0.047149658203125,
-0.047637939453125,
-0.0137786865234375,
0.051422119140625,
0.00402069091796875,
-0.06256103515625,
-0.03228759765625,
-0.0335693359375,
-0.04443359375,
0.02386474609375,
-0.0262298583984375,
0.005237579345703125,
-0.004375457763671875,
0.00994110107421875,
-0.0053558349609375,
-0.0013856887817382812,
0.0013418197631835938,
-0.0176849365234375,
0.05078125,
0.00205230712890625,
0.01174163818359375,
-0.01436614990234375,
0.0169677734375,
-0.038604736328125,
-0.0007557868957519531,
-0.032012939453125,
0.027435302734375,
-0.010955810546875,
0.046783447265625,
0.0102691650390625,
0.005687713623046875,
0.012786865234375,
0.0128021240234375,
0.022216796875,
-0.053558349609375,
-0.0015802383422851562,
-0.0253143310546875,
-0.017303466796875,
0.046051025390625,
0.0230712890625,
-0.028594970703125,
0.058135986328125,
-0.03564453125,
-0.0065765380859375,
0.0051422119140625,
0.042449951171875,
-0.02142333984375,
0.010711669921875,
0.0081024169921875,
-0.0266571044921875,
-0.0027904510498046875,
-0.0096893310546875,
-0.01024627685546875,
-0.055633544921875,
0.0163726806640625,
0.037841796875,
-0.0111236572265625,
-0.00724029541015625,
0.004718780517578125,
-0.00792694091796875,
-0.033782958984375,
0.0699462890625,
0.004833221435546875,
0.01226043701171875,
-0.02197265625,
-0.00737762451171875,
-0.007114410400390625,
-0.017669677734375,
0.0290985107421875,
-0.031463623046875,
0.03472900390625,
0.0160064697265625,
0.06536865234375,
-0.04083251953125,
0.032562255859375,
-0.0023708343505859375,
-0.0301361083984375,
0.03448486328125,
0.03656005859375,
-0.0277862548828125,
0.007808685302734375,
0.0219879150390625,
-0.0252838134765625,
0.04144287109375,
-0.0099029541015625,
0.01435089111328125,
0.00873565673828125,
-0.049530029296875,
0.00240325927734375,
-0.035003662109375,
0.0084991455078125,
-0.0179443359375,
0.00672149658203125,
0.05975341796875,
-0.0250244140625,
-0.0021038055419921875,
0.044342041015625,
0.05908203125,
-0.0188140869140625,
0.01409912109375,
0.004039764404296875,
-0.03948974609375,
-0.0221405029296875,
0.01078033447265625,
-0.0221099853515625,
0.0192413330078125,
0.0306549072265625,
-0.0364990234375,
-0.0086669921875,
0.011871337890625,
0.0035533905029296875,
0.0205230712890625,
-0.0167236328125,
-0.035186767578125,
-0.0274505615234375,
-0.020904541015625,
0.07037353515625,
0.02880859375,
0.01751708984375,
-0.021697998046875,
-0.0029468536376953125,
0.0137176513671875,
0.037689208984375,
0.0278472900390625,
-0.00213623046875,
0.00363922119140625,
0.013275146484375,
0.055572509765625,
0.003025054931640625,
-0.01055908203125,
0.0330810546875,
-0.00806427001953125,
-0.01751708984375,
0.00872039794921875,
-0.01216888427734375,
0.034332275390625,
-0.014739990234375,
-0.02618408203125,
0.00641632080078125,
0.002811431884765625,
-0.003925323486328125,
0.02874755859375,
0.01241302490234375,
-0.021209716796875,
0.01165771484375,
0.01236724853515625,
-0.04913330078125,
0.0207061767578125,
-0.018798828125,
-0.035919189453125,
-0.01335906982421875,
0.0083770751953125,
-0.0023517608642578125,
0.0106353759765625,
-0.0271453857421875,
-0.02789306640625,
0.0191192626953125,
0.0206146240234375,
-0.0208892822265625,
-0.012359619140625,
-0.01885986328125,
0.029998779296875,
-0.02301025390625,
0.007785797119140625,
-0.019561767578125,
0.0170135498046875,
-0.061614990234375,
-0.022705078125,
0.0252685546875,
0.0262603759765625,
-0.01416015625,
-0.0501708984375,
0.0224456787109375,
0.007419586181640625,
0.0024394989013671875,
0.0185546875,
0.048919677734375,
-0.01806640625,
0.019073486328125,
-0.0171356201171875,
-0.021087646484375,
0.0018157958984375,
0.0020694732666015625,
-0.0197296142578125,
-0.0248565673828125,
0.043426513671875,
-0.0023097991943359375,
0.0216217041015625,
0.02008056640625,
-0.01226806640625,
-0.0287017822265625,
-0.049957275390625,
0.040374755859375,
-0.024444580078125,
0.0274810791015625,
-0.004177093505859375,
0.0238800048828125,
-0.0640869140625,
0.02154541015625,
-0.04022216796875,
-0.06298828125,
-0.01141357421875,
0.05230712890625,
0.01282501220703125,
0.019622802734375,
0.0278778076171875,
0.0333251953125,
-0.00312042236328125,
-0.0014209747314453125,
0.0301513671875,
-0.01506805419921875,
0.0013265609741210938,
-0.0160980224609375,
0.00626373291015625,
0.0116119384765625,
-0.01509857177734375,
-0.0089874267578125,
0.0168914794921875,
0.032440185546875,
-0.0316162109375,
0.0419921875,
-0.0120697021484375,
-0.00528717041015625,
0.025970458984375,
-0.023040771484375,
-0.0001550912857055664,
-0.0292205810546875,
-0.0699462890625,
-0.04022216796875,
0.0046844482421875,
0.024017333984375,
0.016021728515625,
0.038177490234375,
0.01654052734375,
-0.0028820037841796875,
0.00362396240234375,
-0.0132904052734375,
-0.004913330078125,
0.0262451171875,
0.00007867813110351562,
-0.001125335693359375,
0.0312042236328125,
-0.0111083984375,
-0.03424072265625,
-0.01253509521484375,
0.01306915283203125,
0.020233154296875,
-0.013397216796875,
0.09124755859375,
-0.0240631103515625,
-0.00926971435546875,
0.00170135498046875,
0.005153656005859375,
-0.01666259765625,
0.0011425018310546875,
0.0499267578125,
-0.0144805908203125,
-0.0264739990234375,
-0.01409912109375,
-0.045074462890625,
0.00241851806640625,
0.058319091796875,
-0.037628173828125,
0.01042938232421875,
-0.0139312744140625,
0.01432037353515625,
-0.0599365234375,
-0.0057830810546875,
-0.031646728515625,
-0.0301513671875,
-0.036773681640625,
-0.0183258056640625,
0.023345947265625,
0.0250396728515625,
0.01024627685546875,
0.0265350341796875,
-0.0206756591796875,
-0.03619384765625,
0.0196990966796875,
-0.04901123046875,
0.00920867919921875,
0.033111572265625,
0.01763916015625,
-0.046600341796875,
0.021636962890625,
-0.0152740478515625,
0.0145416259765625,
-0.0033245086669921875,
0.051483154296875,
0.00850677490234375,
-0.10205078125,
-0.0045318603515625,
-0.005550384521484375,
0.01203155517578125,
-0.036865234375,
-0.00884246826171875,
0.022674560546875,
-0.0010528564453125,
0.00525665283203125,
0.036834716796875,
0.0120391845703125,
-0.0111541748046875,
-0.0246734619140625,
0.0011720657348632812,
-0.0203094482421875,
0.01268768310546875,
-0.01132965087890625,
-0.0379638671875,
0.036865234375,
0.0072021484375,
-0.0014352798461914062,
-0.0124664306640625,
-0.01482391357421875,
-0.01531982421875,
0.0202484130859375,
-0.007415771484375,
-0.0008454322814941406,
-0.035186767578125,
-0.039398193359375,
0.0303192138671875,
-0.0096435546875,
-0.002605438232421875,
0.048736572265625,
0.0377197265625,
0.005275726318359375,
-0.046142578125,
0.06842041015625,
0.0697021484375,
0.044952392578125,
0.1265869140625,
0.07489013671875,
-0.01171875,
-0.01261138916015625,
0.0225067138671875,
-0.004474639892578125,
0.0157012939453125,
0.023223876953125,
0.01317596435546875,
-0.05328369140625,
-0.0152130126953125,
0.0025119781494140625,
0.016265869140625,
-0.047882080078125,
-0.12371826171875,
0.07122802734375,
-0.050994873046875,
-0.03594970703125,
0.005077362060546875,
-0.0220947265625,
-0.035400390625,
0.03350830078125,
-0.00907135009765625,
0.0191802978515625,
0.002513885498046875,
0.032501220703125,
0.041717529296875,
-0.0188751220703125,
0.042633056640625,
0.0031185150146484375,
-0.0634765625,
0.0242156982421875,
0.0186614990234375,
0.0452880859375,
-0.0058135986328125,
-0.009429931640625,
-0.01015472412109375,
0.0248870849609375,
-0.0433349609375,
-0.1080322265625,
-0.022979736328125,
0.00812530517578125,
0.0267791748046875,
0.016265869140625,
0.0108642578125,
0.0018033981323242188,
-0.008087158203125,
0.01511383056640625,
0.007015228271484375,
-0.01352691650390625,
-0.0382080078125,
-0.03021240234375,
-0.0299835205078125,
-0.04974365234375,
0.024078369140625,
-0.08453369140625,
-0.0266876220703125,
-0.01438140869140625,
-0.0146942138671875,
-0.0035114288330078125,
0.04412841796875,
-0.02996826171875,
0.0080718994140625,
0.0305328369140625,
-0.0271759033203125,
-0.0306243896484375,
0.0182647705078125,
-0.0021953582763671875,
-0.0163421630859375,
0.01393890380859375,
-0.01139068603515625,
-0.007404327392578125,
0.0036563873291015625,
0.02178955078125,
-0.01210784912109375,
0.052703857421875,
-0.055816650390625,
-0.0215911865234375,
0.00550079345703125,
0.0038509368896484375,
-0.0168609619140625,
0.0199127197265625,
-0.00698089599609375,
0.0237579345703125,
0.001506805419921875,
0.007083892822265625,
-0.05047607421875,
0.0767822265625,
-0.0071258544921875,
0.1077880859375,
0.034942626953125,
0.0037059783935546875,
-0.0300445556640625,
0.093994140625,
-0.01010894775390625,
-0.049224853515625,
-0.0243988037109375,
-0.032562255859375,
0.0194091796875,
0.0181884765625,
0.02777099609375,
-0.0020618438720703125,
0.0047760009765625,
-0.0115203857421875,
0.0163116455078125,
-0.0010738372802734375
] |
45ad346105de7dd3c62781bc81d9cd0dadc37d93
|
Wordpress Stackexchange
Q: Logout redirect to home page I'm using custom menu for login/logout here below is my code:
<li>
<?php
if (is_user_logged_in()) {
$user = wp_get_current_user();
echo 'Welcome <strong><a href="http://kolkataonwheelsmagazine.com/wp-admin/index.php" >'.$user->user_firstname.'</a></strong>
| <a href="http://kolkataonwheelsmagazine.com/wp-login.php?action=logout"">Logout</a>';
} else { ?>
<strong><?php wp_loginout(); ?></strong>
or <a href="<?php bloginfo('url') ?>/wp-login.php?action=register"> <strong>Register</strong></a>
<?php }?>
</li>
but problem is :
redirect to login page not current page...
I want it should go to home page after logout.
Please help me...
A: If you only want to modify logout and not login, then use wp_logout_url(). Conversely you can use wp_login_url() for just the login URL.
Example of an logout link:
<a href="<?php echo wp_logout_url( home_url() ); ?>" title="Logout">Logout</a>
You can still use the function wp_loginout() but the redirect will work on both login and out. But if that is okay it could look like this:
<?php wp_loginout( home_url() ); ?>
|
Q: Logout redirect to home page I'm using custom menu for login/logout here below is my code:
<li>
<?php
if (is_user_logged_in()) {
$user = wp_get_current_user();
echo 'Welcome <strong><a href="http://kolkataonwheelsmagazine.com/wp-admin/index.php" >'.$user->user_firstname.'</a></strong>
| <a href="http://kolkataonwheelsmagazine.com/wp-login.php?action=logout"">Logout</a>';
} else { ?>
<strong><?php wp_loginout(); ?></strong>
or <a href="<?php bloginfo('url') ?>/wp-login.php?action=register"> <strong>Register</strong></a>
<?php }?>
</li>
but problem is :
redirect to login page not current page...
I want it should go to home page after logout.
Please help me...
A: If you only want to modify logout and not login, then use wp_logout_url(). Conversely you can use wp_login_url() for just the login URL.
Example of an logout link:
<a href="<?php echo wp_logout_url( home_url() ); ?>" title="Logout">Logout</a>
You can still use the function wp_loginout() but the redirect will work on both login and out. But if that is okay it could look like this:
<?php wp_loginout( home_url() ); ?>
A: Pontus Abrahamsson is right, that is a legal code, but here is another one that I'm using in my theme.
<a href="<?php echo wp_logout_url('$index.php'); ?>">Logout</a>
A: add_action('wp_logout','auto_redirect_after_logout');
function auto_redirect_after_logout(){
wp_safe_redirect( home_url() );
exit;
}
This will do the trick.
A: Since Wordpress 4.2.0 a logout hook filter was introduced logout_redirect.
apply_filters( 'logout_redirect', string $redirect_to, string $requested_redirect_to, WP_User $user )
Filters the log out redirect URL.
*
*Source @ https://developer.wordpress.org/reference/hooks/logout_redirect/
Parameter
Description
$redirect_to
(string) The redirect destination URL.
$requested_redirect_to
(string) The requested redirect destination URL passed as a parameter.
$user
(WP_User) The WP_User object for the user that's logging out.
Simple use case scenario
<?php
add_filter( 'logout_redirect', function() {
return esc_url( home_url() );
} ); ?>
Anonymous functions used, PHP > 5.3required
Learn more
*
*The same apply for logins, with a login_redirect introduced in 3.0.0.
A: Try this
add_action('check_admin_referer', 'pfwp_logout_without_confirm', 10, 2);
function pfwp_logout_without_confirm($action, $result)
{
/**
* Allow logout without confirmation
*/
if ($action == "log-out" && !isset($_GET['_wpnonce'])) {
$redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : get_permalink( wp_logout_url() )// or custom url;
$location = str_replace('&', '&', wp_logout_url($redirect_to));
header("Location: $location");
die;
}
}
A: Since WordPress 4.2.0 you can just add:
add_filter('logout_redirect', 'get_home_url');
|
wordpress
|
{
"language": "en",
"length": 335,
"provenance": "stackexchange_00019.jsonl.gz:421708",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58036"
}
|
[
0.081298828125,
0.0249481201171875,
0.0213165283203125,
-0.01047515869140625,
0.034149169921875,
-0.035430908203125,
0.0693359375,
-0.059051513671875,
-0.0106353759765625,
0.0159454345703125,
0.0270843505859375,
-0.01070404052734375,
-0.051116943359375,
-0.041259765625,
0.0019664764404296875,
-0.0338134765625,
0.0325927734375,
-0.006195068359375,
0.0389404296875,
0.007228851318359375,
0.01282501220703125,
0.02520751953125,
0.014129638671875,
0.028167724609375,
-0.00754547119140625,
-0.00966644287109375,
0.07244873046875,
-0.0261077880859375,
0.01053619384765625,
-0.00022780895233154297,
0.0113067626953125,
-0.023345947265625,
0.02093505859375,
0.03118896484375,
-0.032470703125,
0.0089874267578125,
-0.00110626220703125,
0.0236663818359375,
0.01157379150390625,
0.0262298583984375,
0.033843994140625,
-0.024200439453125,
0.00432586669921875,
0.03179931640625,
-0.02117919921875,
-0.01287078857421875,
0.013336181640625,
-0.019195556640625,
0.00934600830078125,
-0.00466156005859375,
0.028472900390625,
0.0283203125,
0.038909912109375,
-0.0235443115234375,
-0.01824951171875,
0.0114593505859375,
-0.000021278858184814453,
-0.0272064208984375,
0.0323486328125,
0.00872802734375,
-0.0148162841796875,
-0.026123046875,
0.0218353271484375,
-0.0325927734375,
-0.021484375,
0.01507568359375,
-0.01329803466796875,
0.0156097412109375,
-0.052825927734375,
-0.0526123046875,
0.005680084228515625,
-0.0180206298828125,
-0.0210113525390625,
0.00823974609375,
-0.05157470703125,
-0.009063720703125,
0.018463134765625,
-0.025360107421875,
0.0206298828125,
0.0175323486328125,
-0.0273895263671875,
-0.00579071044921875,
-0.04449462890625,
-0.01244354248046875,
0.00724029541015625,
0.0127716064453125,
-0.0270843505859375,
-0.0186767578125,
-0.0066680908203125,
-0.01282501220703125,
-0.0201263427734375,
0.02032470703125,
-0.0165863037109375,
-0.004436492919921875,
-0.0237274169921875,
-0.018585205078125,
0.006893157958984375,
0.01157379150390625,
0.01493072509765625,
0.0019311904907226562,
-0.0172119140625,
-0.0291595458984375,
0.0011386871337890625,
-0.0224151611328125,
-0.005138397216796875,
0.05938720703125,
0.035736083984375,
0.0341796875,
-0.007381439208984375,
-0.00838470458984375,
0.0125885009765625,
-0.01561737060546875,
-0.05072021484375,
-0.055938720703125,
0.00492095947265625,
0.04498291015625,
-0.052032470703125,
0.0066680908203125,
-0.00267791748046875,
0.0145263671875,
-0.0555419921875,
-0.007381439208984375,
0.01555633544921875,
-0.015869140625,
-0.0138702392578125,
-0.038818359375,
0.0229339599609375,
-0.0263519287109375,
-0.0167236328125,
0.0224609375,
-0.041046142578125,
0.032928466796875,
0.06268310546875,
-0.0099029541015625,
-0.0176544189453125,
-0.0308074951171875,
0.0634765625,
-0.01448822021484375,
0.00028204917907714844,
0.03076171875,
0.0146484375,
-0.0232086181640625,
-0.0167999267578125,
0.00514984130859375,
0.0478515625,
0.0369873046875,
0.0135040283203125,
-0.0021991729736328125,
-0.0004830360412597656,
-0.033355712890625,
0.0115814208984375,
-0.0155181884765625,
0.00011283159255981445,
-0.0031719207763671875,
0.0396728515625,
-0.020233154296875,
0.00146484375,
-0.006198883056640625,
0.037689208984375,
0.0058441162109375,
0.0016717910766601562,
0.002716064453125,
0.00824737548828125,
-0.0531005859375,
-0.054107666015625,
-0.0217742919921875,
-0.0299530029296875,
-0.01274871826171875,
0.034881591796875,
0.01322174072265625,
0.044769287109375,
-0.06268310546875,
-0.00426483154296875,
0.030914306640625,
0.006183624267578125,
0.0246734619140625,
-0.027435302734375,
0.03338623046875,
0.019012451171875,
0.03955078125,
0.0305328369140625,
-0.01386260986328125,
0.036041259765625,
0.0216064453125,
-0.0239410400390625,
0.041900634765625,
-0.0089874267578125,
0.029205322265625,
0.0025386810302734375,
0.002239227294921875,
-0.0006952285766601562,
0.0247650146484375,
-0.0201568603515625,
0.0118865966796875,
-0.02545166015625,
-0.017486572265625,
0.01055908203125,
0.0035800933837890625,
-0.019256591796875,
0.0163116455078125,
0.03509521484375,
0.0207061767578125,
-0.00983428955078125,
-0.0021572113037109375,
-0.07025146484375,
0.03680419921875,
-0.034088134765625,
0.042236328125,
0.0014333724975585938,
0.0198822021484375,
0.00881195068359375,
0.011199951171875,
-0.0031337738037109375,
-0.0770263671875,
-0.028076171875,
0.022430419921875,
-0.0272216796875,
0.03656005859375,
-0.01128387451171875,
0.0196075439453125,
0.009307861328125,
-0.03216552734375,
0.012054443359375,
0.0044708251953125,
0.027099609375,
-0.04473876953125,
-0.018096923828125,
-0.036712646484375,
-0.0313720703125,
-0.00769805908203125,
-0.06500244140625,
0.06988525390625,
0.029388427734375,
-0.0084075927734375,
-0.055694580078125,
0.0018901824951171875,
0.00032067298889160156,
-0.0066986083984375,
-0.025848388671875,
0.033538818359375,
0.04107666015625,
0.0157928466796875,
-0.017669677734375,
0.0148468017578125,
0.0117340087890625,
-0.063232421875,
0.00037097930908203125,
0.0066070556640625,
0.01348876953125,
0.0163421630859375,
-0.030975341796875,
-0.00977325439453125,
0.045318603515625,
-0.027862548828125,
-0.0026149749755859375,
0.049041748046875,
-0.014984130859375,
-0.005214691162109375,
0.003620147705078125,
-0.003810882568359375,
-0.007595062255859375,
-0.0283966064453125,
-0.01319122314453125,
-0.00887298583984375,
-0.005859375,
-0.03497314453125,
-0.0169830322265625,
-0.0172882080078125,
-0.024749755859375,
-0.04400634765625,
0.033203125,
0.012451171875,
-0.00936126708984375,
0.051422119140625,
0.03167724609375,
-0.055450439453125,
-0.0288848876953125,
-0.00460052490234375,
-0.0007987022399902344,
0.005489349365234375,
-0.01303863525390625,
0.0121917724609375,
-0.0145111083984375,
-0.0169830322265625,
0.0019407272338867188,
-0.033905029296875,
0.00923919677734375,
-0.00514984130859375,
0.03515625,
0.00763702392578125,
0.050262451171875,
-0.002105712890625,
-0.027008056640625,
0.037872314453125,
0.01666259765625,
-0.048126220703125,
0.002857208251953125,
-0.03704833984375,
0.0214385986328125,
-0.01065826416015625,
0.02581787109375,
0.06854248046875,
0.0211944580078125,
0.032318115234375,
0.008636474609375,
0.0171966552734375,
0.00974273681640625,
-0.004360198974609375,
-0.00864410400390625,
0.004215240478515625,
-0.031646728515625,
0.0177764892578125,
0.0279693603515625,
0.04779052734375,
0.0034427642822265625,
-0.0352783203125,
0.0011777877807617188,
0.017791748046875,
-0.03997802734375,
-0.040771484375,
-0.0455322265625,
-0.0723876953125,
0.05499267578125,
0.00988006591796875,
-0.0132293701171875,
-0.0091094970703125,
0.055450439453125,
0.03692626953125,
0.0227813720703125,
-0.0033092498779296875,
-0.03045654296875,
-0.01690673828125,
-0.0633544921875,
0.00809478759765625,
0.004680633544921875,
0.0139312744140625,
-0.004383087158203125,
0.03607177734375,
-0.01012420654296875,
-0.027587890625,
-0.0190887451171875,
0.06500244140625,
-0.0037517547607421875,
-0.0450439453125,
-0.0257568359375,
0.00027298927307128906,
-0.0169525146484375,
-0.006183624267578125,
0.0556640625,
-0.0040283203125,
-0.00038433074951171875,
0.0123291015625,
-0.0222930908203125,
-0.05810546875,
0.0150604248046875,
-0.0226287841796875,
-0.00586700439453125,
-0.0071258544921875,
0.025970458984375,
-0.0277099609375,
-0.002902984619140625,
-0.01528167724609375,
-0.04656982421875,
0.0267791748046875,
0.058197021484375,
-0.0223388671875,
0.0167236328125,
-0.046844482421875,
-0.00591278076171875,
-0.00449371337890625,
0.00689697265625,
-0.0027523040771484375,
0.01546478271484375,
-0.023773193359375,
-0.01535797119140625,
-0.01055908203125,
0.03564453125,
-0.006679534912109375,
0.0015716552734375,
0.0072021484375,
0.0261383056640625,
-0.005435943603515625,
-0.005218505859375,
-0.07177734375,
-0.0572509765625,
0.0308685302734375,
-0.038116455078125,
-0.00922393798828125,
-0.0167999267578125,
-0.005886077880859375,
0.0020122528076171875,
0.06622314453125,
-0.0205078125,
-0.01262664794921875,
0.0100860595703125,
0.0094451904296875,
-0.009124755859375,
0.0015392303466796875,
-0.0550537109375,
-0.00878143310546875,
-0.0950927734375,
0.0226898193359375,
-0.01200103759765625,
-0.00806427001953125,
-0.01407623291015625,
0.0111236572265625,
-0.0283050537109375,
-0.057891845703125,
0.00911712646484375,
0.037109375,
0.0191497802734375,
0.01678466796875,
-0.0217132568359375,
0.0196533203125,
0.0142669677734375,
-0.0206298828125,
-0.0259857177734375,
-0.006805419921875,
-0.0235443115234375,
0.04534912109375,
0.057708740234375,
-0.052825927734375,
0.004306793212890625,
0.028076171875,
0.0157623291015625,
0.01322174072265625,
0.01372528076171875,
-0.0172576904296875,
0.028411865234375,
0.0170135498046875,
-0.0048980712890625,
-0.0012388229370117188,
0.01427459716796875,
-0.0212249755859375,
-0.05816650390625,
-0.0098419189453125,
-0.038543701171875,
0.029144287109375,
0.0010833740234375,
-0.034637451171875,
-0.055145263671875,
-0.044891357421875,
0.01285552978515625,
0.00537109375,
0.00971221923828125,
-0.0038661956787109375,
-0.032257080078125,
-0.049163818359375,
0.0106964111328125,
0.01509857177734375,
-0.02618408203125,
0.003696441650390625,
0.036895751953125,
0.02471923828125,
-0.0222015380859375,
0.0028400421142578125,
-0.0235595703125,
-0.006561279296875,
-0.021942138671875,
0.039886474609375,
-0.0179901123046875,
0.00444793701171875,
0.072509765625,
-0.052459716796875,
0.0164794921875,
-0.019866943359375,
0.050323486328125,
-0.0187225341796875,
-0.0350341796875,
0.040924072265625,
-0.031280517578125,
-0.022857666015625,
0.03363037109375,
0.02166748046875,
-0.0238037109375,
0.01708984375,
0.0222625732421875,
-0.02435302734375,
0.0105438232421875,
0.0011920928955078125,
-0.038543701171875,
0.007640838623046875,
0.0294952392578125,
0.016754150390625,
0.05377197265625,
-0.0261688232421875,
0.023223876953125,
0.01081085205078125,
-0.0086669921875,
-0.00618743896484375,
-0.0182647705078125,
-0.0001004934310913086,
0.00766754150390625,
-0.0161895751953125,
-0.0224151611328125,
0.005962371826171875,
-0.0184173583984375,
0.09228515625,
0.03546142578125,
-0.0276947021484375,
0.012603759765625,
-0.044647216796875,
0.0171051025390625,
-0.0215301513671875,
0.0033817291259765625,
0.0469970703125,
-0.015625,
-0.0236053466796875,
-0.0202178955078125,
-0.0214080810546875,
-0.030029296875,
-0.057373046875,
0.021484375,
-0.00798797607421875,
0.00026988983154296875,
0.00827789306640625,
0.08575439453125,
0.0165863037109375,
0.06292724609375,
-0.024139404296875,
0.005504608154296875,
0.01058197021484375,
0.038482666015625,
0.009918212890625,
0.0282745361328125,
-0.02069091796875,
0.0258331298828125,
0.0262908935546875,
-0.0248260498046875,
-0.028350830078125,
0.032470703125,
0.0562744140625,
-0.01447296142578125,
-0.0014133453369140625,
-0.00041604042053222656,
-0.039337158203125,
0.00255584716796875,
0.076171875,
-0.0110015869140625,
-0.11126708984375,
-0.0220947265625,
0.032623291015625,
0.03778076171875,
-0.06439208984375,
-0.01136016845703125,
-0.0352783203125,
-0.01519012451171875,
-0.003040313720703125,
-0.01549530029296875,
-0.0196075439453125,
0.010650634765625,
-0.00511932373046875,
-0.030242919921875,
-0.044891357421875,
-0.013916015625,
-0.0006618499755859375,
0.0236968994140625,
-0.04571533203125,
-0.037841796875,
0.02996826171875,
-0.0216522216796875,
0.014739990234375,
-0.01214599609375,
-0.00689697265625,
0.01885986328125,
-0.01102447509765625,
0.09344482421875,
0.0312347412109375,
-0.07318115234375,
0.0220489501953125,
-0.018218994140625,
0.0189361572265625,
0.0248870849609375,
-0.0289306640625,
-0.0218505859375,
-0.052459716796875,
0.048797607421875,
0.022308349609375,
0.0364990234375,
-0.0185394287109375,
-0.06658935546875,
0.012237548828125,
0.0511474609375,
0.047515869140625,
-0.005985260009765625,
0.0584716796875,
-0.019744873046875,
0.03387451171875,
0.009246826171875,
0.04248046875,
-0.0025177001953125,
-0.017333984375,
0.031982421875,
0.0004754066467285156,
-0.033721923828125,
-0.06951904296875,
0.0266265869140625,
0.01373291015625,
0.071533203125,
-0.0184478759765625,
-0.033905029296875,
0.0034008026123046875,
-0.006618499755859375,
-0.0240020751953125,
0.033477783203125,
0.03558349609375,
0.001209259033203125,
-0.01479339599609375,
0.0166473388671875,
0.0445556640625,
-0.0162506103515625,
0.00482177734375,
-0.0007457733154296875,
-0.0081024169921875,
0.0242767333984375,
-0.0090179443359375,
-0.047943115234375,
0.0214080810546875,
0.1055908203125,
0.0308990478515625,
0.063720703125,
0.022735595703125,
0.0176544189453125,
0.051849365234375,
-0.0276031494140625,
-0.0295867919921875,
0.04376220703125,
0.047637939453125,
-0.010009765625,
-0.022308349609375,
0.0289154052734375,
-0.01105499267578125,
0.0116424560546875,
0.08990478515625,
0.083984375,
-0.12548828125,
0.01538848876953125,
0.0283660888671875,
0.0299224853515625,
0.07757568359375,
0.00875091552734375,
0.01218414306640625,
0.038421630859375,
-0.03460693359375,
-0.0248260498046875,
-0.03277587890625,
-0.01464080810546875,
0.018585205078125,
0.0032863616943359375,
-0.0240020751953125,
0.04583740234375,
-0.00431060791015625,
-0.10400390625,
0.018798828125,
0.043182373046875,
-0.038909912109375,
-0.0230560302734375,
-0.01436614990234375,
0.0274200439453125,
-0.01593017578125,
-0.061279296875,
0.0307159423828125,
-0.0220489501953125,
0.005046844482421875,
0.0274810791015625,
-0.025543212890625,
0.054168701171875,
0.0416259765625,
-0.011199951171875,
0.016754150390625,
-0.004810333251953125,
-0.01097869873046875,
0.033782958984375,
-0.005931854248046875,
-0.00629425048828125,
-0.0025959014892578125,
-0.048187255859375,
-0.0006427764892578125,
-0.025665283203125,
0.00629425048828125,
-0.017822265625,
-0.037628173828125,
0.065185546875,
-0.0235748291015625,
-0.00322723388671875,
0.006084442138671875,
0.0193634033203125,
0.01556396484375,
-0.0252685546875,
0.046478271484375,
-0.07281494140625,
-0.0421142578125,
-0.0066986083984375,
-0.0338134765625,
0.002986907958984375,
-0.036651611328125,
-0.03887939453125,
0.111328125,
-0.059661865234375,
0.0218963623046875,
0.01523590087890625,
0.05810546875,
0.01486968994140625,
0.060577392578125,
-0.039306640625,
0.045654296875,
0.007396697998046875,
0.0239410400390625,
-0.004177093505859375,
0.01438140869140625,
0.0179901123046875,
-0.01311492919921875,
0.014007568359375,
0.0311279296875,
-0.0540771484375,
-0.009033203125,
-0.0122833251953125,
0.0261993408203125,
-0.000438690185546875,
0.0433349609375,
-0.013427734375,
0.0079193115234375,
0.030975341796875,
-0.043304443359375,
0.00849151611328125,
0.022216796875,
-0.0248260498046875,
-0.0011510848999023438,
0.00646209716796875,
-0.035980224609375,
-0.0228118896484375,
0.027130126953125,
-0.09686279296875,
0.0168304443359375,
0.03167724609375,
0.0404052734375,
-0.0078125,
0.0207061767578125,
0.0202484130859375,
-0.0265350341796875,
0.0222625732421875,
-0.037841796875,
0.03411865234375,
-0.00231170654296875,
0.00433349609375,
0.048675537109375,
0.033447265625,
0.00565338134765625,
-0.036895751953125,
0.00849151611328125,
0.0080718994140625,
-0.03424072265625,
0.08685302734375,
0.033477783203125,
0.03076171875,
-0.031646728515625,
0.01605224609375,
0.0273895263671875,
0.0882568359375,
-0.05621337890625,
-0.01520538330078125,
-0.004791259765625,
0.00598907470703125,
0.059661865234375,
0.001163482666015625,
0.104736328125,
-0.0185089111328125,
-0.044403076171875,
-0.01397705078125,
0.022979736328125,
0.03857421875,
-0.00872039794921875,
0.0033664703369140625,
0.005992889404296875,
-0.04400634765625,
0.03948974609375,
0.00021219253540039062,
-0.0086669921875,
-0.0018768310546875,
-0.0037689208984375,
-0.00243377685546875,
-0.0021343231201171875,
0.029144287109375,
0.01335906982421875,
0.00041556358337402344,
0.038604736328125,
-0.01468658447265625,
-0.00875091552734375,
-0.034637451171875,
-0.08221435546875,
0.0007977485656738281,
0.056365966796875,
0.01105499267578125,
-0.01314544677734375,
0.001644134521484375,
-0.005641937255859375,
-0.01483917236328125,
-0.011932373046875,
0.0229034423828125,
-0.0295562744140625,
0.019317626953125,
-0.00374603271484375,
0.0003883838653564453,
0.0017366409301757812,
-0.0207977294921875,
-0.0252685546875,
0.028533935546875,
0.0103759765625,
-0.021942138671875,
0.04864501953125,
-0.0033626556396484375,
-0.0266876220703125,
-0.0208740234375,
0.007427215576171875,
0.063720703125,
0.01267242431640625,
-0.04931640625,
-0.0196685791015625,
-0.0230865478515625,
0.0062255859375,
0.037384033203125,
0.048126220703125,
0.0097503662109375,
-0.0010213851928710938,
-0.009613037109375,
0.01187896728515625,
-0.0005373954772949219,
-0.0024585723876953125,
-0.005161285400390625,
-0.0308074951171875,
0.0220489501953125,
-0.0182952880859375,
-0.09466552734375,
-0.031158447265625,
-0.0322265625,
-0.003627777099609375,
0.0175323486328125,
0.059356689453125,
0.0144500732421875,
0.023345947265625,
-0.0264434814453125,
-0.003871917724609375,
-0.01529693603515625,
-0.0222625732421875,
0.00392913818359375,
-0.007404327392578125,
-0.005870819091796875,
-0.006328582763671875,
-0.083740234375,
0.05047607421875,
-0.002071380615234375,
0.024505615234375,
0.0723876953125,
-0.0037021636962890625,
-0.01324462890625,
-0.0301361083984375,
-0.01216888427734375,
-0.03692626953125,
-0.048736572265625,
-0.0246124267578125,
0.00036907196044921875,
0.002544403076171875,
0.010650634765625,
-0.00904083251953125,
0.07037353515625,
-0.03253173828125,
-0.0042724609375,
0.005279541015625,
-0.054168701171875,
-0.0073089599609375,
0.02471923828125,
-0.005779266357421875,
0.0029315948486328125,
0.0006260871887207031,
-0.0087738037109375,
0.01094818115234375,
0.0078125,
-0.00542449951171875,
0.0024204254150390625,
0.01178741455078125,
0.034942626953125,
0.0009813308715820312,
0.018829345703125,
-0.01312255859375,
-0.003086090087890625,
0.01064300537109375,
-0.0037136077880859375,
-0.0026798248291015625,
-0.07745361328125,
-0.054412841796875,
-0.09454345703125,
0.016143798828125,
0.0203399658203125,
-0.035491943359375,
-0.055999755859375,
-0.0545654296875,
-0.01013946533203125,
0.00635528564453125,
-0.01354217529296875,
-0.0161590576171875,
0.0194549560546875,
-0.0350341796875,
0.0005288124084472656,
-0.038543701171875,
0.0013570785522460938,
-0.0002562999725341797,
0.0176239013671875,
-0.040496826171875,
0.007419586181640625,
-0.034149169921875,
-0.00963592529296875,
-0.0310821533203125,
-0.0167236328125,
0.0413818359375,
-0.014556884765625,
-0.050018310546875,
-0.0440673828125,
-0.018524169921875,
0.0033893585205078125,
-0.00750732421875,
-0.0235595703125,
-0.002193450927734375,
-0.00994110107421875,
0.0043182373046875,
0.0158233642578125,
0.0018873214721679688,
0.0272979736328125,
-0.036407470703125,
0.0172119140625,
-0.0220947265625,
-0.0195465087890625,
-0.050079345703125,
-0.062469482421875,
0.041107177734375,
0.0080413818359375,
-0.043975830078125,
0.00634765625,
0.04437255859375,
-0.0038013458251953125,
-0.035308837890625,
0.0102386474609375,
-0.04144287109375,
0.0125274658203125,
-0.0111846923828125,
0.00719451904296875,
0.0484619140625,
0.017852783203125,
0.036590576171875,
-0.0033359527587890625,
0.025177001953125,
0.0116119384765625,
0.0020885467529296875,
-0.018096923828125,
0.01090240478515625,
0.0181427001953125,
0.03759765625,
0.006622314453125,
0.033233642578125,
0.007434844970703125,
-0.0302276611328125,
-0.0020923614501953125,
-0.0162506103515625,
0.0040435791015625,
-0.004566192626953125,
-0.0039520263671875,
0.016632080078125,
-0.0115203857421875,
-0.0125885009765625,
-0.0596923828125,
-0.0181121826171875,
-0.002056121826171875,
-0.0323486328125,
0.0080413818359375,
-0.08154296875,
-0.019134521484375,
-0.020416259765625,
-0.01837158203125,
-0.03350830078125,
0.0406494140625,
-0.046905517578125,
0.0013484954833984375,
0.0322265625,
0.006580352783203125,
-0.0175933837890625,
0.0274658203125,
0.0772705078125,
-0.053314208984375,
0.01021575927734375,
-0.0040130615234375,
0.004734039306640625,
0.024169921875,
-0.04217529296875,
0.020050048828125,
0.0302276611328125,
-0.00511932373046875,
-0.0128631591796875,
0.034637451171875,
0.0301971435546875,
0.00540924072265625,
-0.04168701171875,
-0.01399993896484375,
0.0089569091796875,
0.00506591796875,
0.0109100341796875,
-0.0225067138671875,
0.00978851318359375,
0.0095367431640625,
0.0024566650390625,
-0.0175018310546875,
-0.00705718994140625,
-0.0355224609375,
0.0479736328125,
-0.0045623779296875,
-0.01174163818359375,
0.037261962890625,
-0.01763916015625,
0.004276275634765625,
-0.018096923828125,
0.0020294189453125,
-0.052032470703125,
0.0408935546875,
0.022979736328125,
-0.0113983154296875,
0.0328369140625
] |
2f336c1374df0a3eceb5624e471b1af91cee2c71
|
Wordpress Stackexchange
Q: Allowing periods in usernames I have a multi-site installation of wordpress currently running, and I am having some problems with user registration.
Currently, I use an external authentication plugin (similar to LDAP i guess) and I use this to validate usernames/passwords. For this to work, every user is first added to the Wordpress list of users, and the plugin checks against this list.
The problem is that my organization allows periods inside of a persons username (eg, john.smith). Wordpress is not allowing me to enter john.smith as a username into the system (only allows a-z characters).
Is there any type of workaround for this? I would rather not edit the wordpress core as thats a horrible practice
A: There is a plugin for this. It is Network Username Restrictions Override. Please remember to check out the FAQ #2 to know how to allow periods in usernames. Let me quote it here...
You'll have to update the regular expressions in your .htaccess file
if you use email addresses or periods in site URLs. The default
WordPress .htaccess configuration does not allow them, nor will this
plugin edit your .htaccess automatically due to the risk involved.
|
Q: Allowing periods in usernames I have a multi-site installation of wordpress currently running, and I am having some problems with user registration.
Currently, I use an external authentication plugin (similar to LDAP i guess) and I use this to validate usernames/passwords. For this to work, every user is first added to the Wordpress list of users, and the plugin checks against this list.
The problem is that my organization allows periods inside of a persons username (eg, john.smith). Wordpress is not allowing me to enter john.smith as a username into the system (only allows a-z characters).
Is there any type of workaround for this? I would rather not edit the wordpress core as thats a horrible practice
A: There is a plugin for this. It is Network Username Restrictions Override. Please remember to check out the FAQ #2 to know how to allow periods in usernames. Let me quote it here...
You'll have to update the regular expressions in your .htaccess file
if you use email addresses or periods in site URLs. The default
WordPress .htaccess configuration does not allow them, nor will this
plugin edit your .htaccess automatically due to the risk involved.
|
wordpress
|
{
"language": "en",
"length": 195,
"provenance": "stackexchange_00019.jsonl.gz:421710",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58042"
}
|
[
0.065185546875,
0.003894805908203125,
-0.01476287841796875,
-0.034912109375,
0.0233001708984375,
-0.041351318359375,
0.038360595703125,
-0.01486968994140625,
-0.0302581787109375,
0.043792724609375,
-0.0145721435546875,
0.00487518310546875,
0.046417236328125,
-0.0210113525390625,
0.020050048828125,
-0.006473541259765625,
-0.03021240234375,
0.0166473388671875,
-0.01019287109375,
-0.0533447265625,
0.024169921875,
-0.06939697265625,
0.00518035888671875,
0.0022563934326171875,
-0.002162933349609375,
0.027252197265625,
0.1182861328125,
-0.0526123046875,
0.02117919921875,
-0.0167694091796875,
0.024658203125,
-0.052093505859375,
0.00617218017578125,
0.043670654296875,
-0.031951904296875,
0.00384521484375,
-0.034912109375,
0.044830322265625,
0.03802490234375,
-0.0089569091796875,
0.01959228515625,
-0.0006289482116699219,
0.03302001953125,
0.051910400390625,
0.0003066062927246094,
-0.07421875,
0.056060791015625,
-0.05633544921875,
0.03387451171875,
0.0159759521484375,
-0.005031585693359375,
0.007335662841796875,
0.0071868896484375,
-0.0250091552734375,
-0.006160736083984375,
-0.006763458251953125,
0.02325439453125,
-0.06719970703125,
0.0115509033203125,
0.0256500244140625,
-0.004116058349609375,
-0.002750396728515625,
0.0157012939453125,
-0.015869140625,
0.02117919921875,
0.01371002197265625,
-0.0013885498046875,
0.0292510986328125,
-0.0186767578125,
0.0152587890625,
0.0113677978515625,
-0.040008544921875,
0.036468505859375,
-0.0290374755859375,
0.037017822265625,
-0.01082611083984375,
-0.035247802734375,
-0.01129913330078125,
0.0330810546875,
0.0007681846618652344,
-0.0028057098388671875,
-0.0435791015625,
-0.0167388916015625,
0.001384735107421875,
-0.006103515625,
0.0254364013671875,
-0.007434844970703125,
-0.0007138252258300781,
-0.060882568359375,
-0.015045166015625,
-0.0290679931640625,
-0.0163421630859375,
-0.061065673828125,
0.003330230712890625,
0.0055389404296875,
0.012939453125,
0.032012939453125,
0.01512908935546875,
0.0202484130859375,
-0.0107879638671875,
0.028839111328125,
-0.06842041015625,
0.0303192138671875,
-0.0233154296875,
-0.0021724700927734375,
0.0533447265625,
0.04425048828125,
0.04840087890625,
0.01432037353515625,
0.0011320114135742188,
0.0006756782531738281,
0.0013685226440429688,
-0.00836181640625,
-0.053253173828125,
0.0134124755859375,
0.038543701171875,
-0.0162200927734375,
0.011993408203125,
0.006378173828125,
-0.00943756103515625,
-0.006595611572265625,
0.00701904296875,
0.0090484619140625,
-0.004192352294921875,
-0.020599365234375,
-0.0167694091796875,
-0.024871826171875,
-0.0172576904296875,
-0.0601806640625,
0.037994384765625,
0.0064239501953125,
0.0008940696716308594,
-0.020904541015625,
0.038238525390625,
-0.0295562744140625,
-0.01047515869140625,
0.01398468017578125,
-0.0239105224609375,
-0.0168304443359375,
0.0020122528076171875,
-0.01055145263671875,
-0.008148193359375,
0.01483917236328125,
-0.047271728515625,
-0.03155517578125,
0.028839111328125,
0.0224761962890625,
0.0041961669921875,
-0.0156402587890625,
-0.0377197265625,
-0.0189208984375,
-0.0484619140625,
0.06378173828125,
-0.0149688720703125,
-0.014129638671875,
-0.039581298828125,
0.00595855712890625,
-0.01898193359375,
-0.0300140380859375,
-0.0076904296875,
-0.0200042724609375,
-0.0126800537109375,
0.008148193359375,
-0.055938720703125,
-0.071533203125,
0.0062713623046875,
-0.009521484375,
-0.0031108856201171875,
0.0229339599609375,
-0.045166015625,
0.01042938232421875,
0.0201263427734375,
0.04046630859375,
0.00115203857421875,
0.0156402587890625,
0.01216888427734375,
-0.009307861328125,
0.036376953125,
-0.00377655029296875,
0.06610107421875,
0.0309295654296875,
-0.0265350341796875,
0.059173583984375,
-0.005252838134765625,
-0.0390625,
-0.0028362274169921875,
0.005123138427734375,
0.037261962890625,
0.0322265625,
0.0119476318359375,
0.03228759765625,
-0.01006317138671875,
-0.01270294189453125,
-0.005924224853515625,
-0.01373291015625,
-0.048980712890625,
0.0743408203125,
-0.00007361173629760742,
0.006130218505859375,
-0.00001800060272216797,
0.0419921875,
-0.0279388427734375,
0.02191162109375,
-0.01216888427734375,
-0.000255584716796875,
-0.027069091796875,
0.0063934326171875,
-0.006450653076171875,
0.0015783309936523438,
0.01303863525390625,
0.0081634521484375,
-0.01418304443359375,
-0.0167083740234375,
-0.0043487548828125,
-0.00276947021484375,
0.037353515625,
0.00008392333984375,
0.07574462890625,
0.0259246826171875,
0.038055419921875,
0.049774169921875,
-0.029754638671875,
0.064208984375,
-0.008880615234375,
0.01096343994140625,
-0.049835205078125,
0.0126953125,
-0.0479736328125,
-0.0100250244140625,
-0.0230255126953125,
-0.0103302001953125,
0.050079345703125,
-0.0036678314208984375,
0.0283966064453125,
-0.04718017578125,
-0.0279083251953125,
-0.06341552734375,
-0.0294189453125,
0.004718780517578125,
0.05224609375,
0.0355224609375,
0.01148223876953125,
-0.033477783203125,
-0.054229736328125,
0.03509521484375,
-0.005451202392578125,
0.0294189453125,
-0.044677734375,
0.0066375732421875,
0.03814697265625,
-0.0191497802734375,
-0.0124053955078125,
0.0251007080078125,
-0.04022216796875,
-0.0160980224609375,
0.042724609375,
-0.004352569580078125,
-0.0193023681640625,
-0.053863525390625,
0.0428466796875,
0.007213592529296875,
-0.0304718017578125,
-0.00974273681640625,
-0.016448974609375,
0.0250396728515625,
-0.01076507568359375,
0.01678466796875,
0.0031681060791015625,
0.0008945465087890625,
0.00395965576171875,
-0.00534820556640625,
-0.06939697265625,
0.0066070556640625,
0.02984619140625,
0.05755615234375,
0.005527496337890625,
-0.029815673828125,
-0.013336181640625,
0.00909423828125,
0.01983642578125,
0.00075531005859375,
-0.03778076171875,
0.0147705078125,
0.005001068115234375,
0.035980224609375,
-0.03643798828125,
0.03912353515625,
0.0321044921875,
-0.002117156982421875,
-0.04473876953125,
0.01105499267578125,
0.01049041748046875,
-0.00934600830078125,
0.02734375,
-0.01514434814453125,
-0.04156494140625,
-0.0048980712890625,
0.0017147064208984375,
0.01186370849609375,
-0.0202484130859375,
-0.0034236907958984375,
0.04901123046875,
-0.001220703125,
-0.02392578125,
0.0035648345947265625,
-0.0377197265625,
0.0016069412231445312,
0.03472900390625,
0.0204925537109375,
-0.041229248046875,
-0.01119232177734375,
0.03973388671875,
0.0186614990234375,
0.0225372314453125,
0.01904296875,
-0.029937744140625,
-0.0091552734375,
0.02886962890625,
-0.0384521484375,
-0.0509033203125,
-0.027130126953125,
-0.043975830078125,
0.00882720947265625,
0.01451873779296875,
-0.0196990966796875,
0.0037136077880859375,
0.026275634765625,
0.0050811767578125,
-0.01171112060546875,
-0.0140533447265625,
-0.049468994140625,
-0.068115234375,
-0.0701904296875,
-0.0352783203125,
-0.005512237548828125,
0.007843017578125,
0.005138397216796875,
0.037109375,
0.00027179718017578125,
-0.034759521484375,
-0.0105743408203125,
-0.01654052734375,
-0.00516510009765625,
-0.0171661376953125,
-0.01293182373046875,
0.01189422607421875,
-0.027130126953125,
0.005626678466796875,
0.0139312744140625,
0.01461029052734375,
-0.01404571533203125,
0.005985260009765625,
0.0255279541015625,
-0.0276031494140625,
0.0257568359375,
-0.01155853271484375,
-0.036590576171875,
-0.0024204254150390625,
0.01849365234375,
-0.04888916015625,
-0.0147705078125,
0.0240936279296875,
-0.01153564453125,
0.0002853870391845703,
-0.0174713134765625,
-0.0277252197265625,
0.00872039794921875,
0.004047393798828125,
-0.0198211669921875,
0.001560211181640625,
-0.026580810546875,
-0.03192138671875,
0.032989501953125,
-0.0013513565063476562,
0.0117950439453125,
0.015167236328125,
-0.0226898193359375,
-0.039581298828125,
0.0200958251953125,
-0.04022216796875,
-0.0132293701171875,
-0.0300140380859375,
0.034515380859375,
-0.023956298828125,
-0.060394287109375,
0.0389404296875,
-0.037109375,
0.0033550262451171875,
-0.04132080078125,
-0.008575439453125,
-0.021942138671875,
0.08331298828125,
-0.01035308837890625,
-0.01305389404296875,
0.0075531005859375,
0.0238494873046875,
-0.0687255859375,
-0.044921875,
-0.052764892578125,
-0.0106353759765625,
0.00083160400390625,
-0.016143798828125,
-0.022003173828125,
-0.0176239013671875,
0.008514404296875,
-0.08111572265625,
0.024627685546875,
-0.0333251953125,
0.0137786865234375,
-0.044097900390625,
0.0166778564453125,
-0.032440185546875,
-0.00896453857421875,
-0.05035400390625,
0.00836944580078125,
-0.03643798828125,
-0.06011962890625,
-0.0125274658203125,
-0.0205230712890625,
0.08740234375,
0.045623779296875,
-0.05035400390625,
0.0013103485107421875,
0.0655517578125,
0.019500732421875,
0.0133514404296875,
0.0263824462890625,
-0.0325927734375,
0.05804443359375,
0.053680419921875,
0.0264434814453125,
0.01258087158203125,
0.00977325439453125,
-0.0014276504516601562,
-0.05938720703125,
-0.053955078125,
-0.03741455078125,
-0.01435089111328125,
0.034942626953125,
-0.04693603515625,
-0.017425537109375,
-0.004756927490234375,
-0.0100555419921875,
0.0290069580078125,
0.0014324188232421875,
-0.00807952880859375,
-0.01253509521484375,
-0.0226287841796875,
0.06854248046875,
-0.00327301025390625,
-0.0159912109375,
-0.004451751708984375,
0.09375,
0.01377105712890625,
-0.0239410400390625,
-0.025787353515625,
0.00582122802734375,
0.0307159423828125,
0.013153076171875,
0.00998687744140625,
-0.01910400390625,
-0.0298004150390625,
0.057830810546875,
0.000728607177734375,
-0.0164642333984375,
0.005992889404296875,
0.017578125,
-0.00225067138671875,
-0.045379638671875,
0.0142822265625,
0.004352569580078125,
0.007007598876953125,
0.03521728515625,
0.020751953125,
0.0028743743896484375,
0.0167083740234375,
-0.03143310546875,
-0.00939178466796875,
-0.0255126953125,
0.013763427734375,
-0.047393798828125,
0.03900146484375,
-0.061676025390625,
-0.025299072265625,
-0.0228118896484375,
0.01175689697265625,
-0.029327392578125,
-0.03466796875,
-0.0335693359375,
-0.0292816162109375,
-0.046539306640625,
0.0137481689453125,
0.0013189315795898438,
-0.0284881591796875,
-0.013946533203125,
0.0018568038940429688,
-0.0201416015625,
0.0875244140625,
-0.037750244140625,
-0.0882568359375,
-0.017059326171875,
-0.036163330078125,
0.0005550384521484375,
0.03411865234375,
0.0249481201171875,
0.00778961181640625,
-0.01242828369140625,
-0.02093505859375,
0.0048828125,
0.025177001953125,
-0.035186767578125,
-0.0274658203125,
0.047332763671875,
-0.01324462890625,
0.004047393798828125,
-0.005794525146484375,
0.051116943359375,
0.0291595458984375,
0.008331298828125,
-0.020355224609375,
0.051788330078125,
0.0814208984375,
0.0179901123046875,
0.009246826171875,
0.00145721435546875,
-0.019744873046875,
-0.0012121200561523438,
0.0029850006103515625,
-0.042144775390625,
0.00989532470703125,
0.024078369140625,
0.06121826171875,
0.0170135498046875,
-0.0210723876953125,
-0.0040130615234375,
-0.0321044921875,
-0.0127716064453125,
0.0190887451171875,
-0.0170745849609375,
-0.029266357421875,
-0.011871337890625,
-0.018829345703125,
0.004756927490234375,
-0.0123748779296875,
0.00191497802734375,
0.0097198486328125,
-0.03314208984375,
-0.0254669189453125,
0.0357666015625,
-0.01160430908203125,
-0.057891845703125,
-0.0484619140625,
-0.01543426513671875,
0.0008568763732910156,
0.01593017578125,
-0.030517578125,
-0.01274871826171875,
-0.02447509765625,
-0.020172119140625,
0.056793212890625,
-0.02423095703125,
0.028411865234375,
-0.044219970703125,
0.01885986328125,
0.0017147064208984375,
0.01055145263671875,
0.03857421875,
0.0151824951171875,
-0.0792236328125,
0.0024394989013671875,
-0.041961669921875,
0.006214141845703125,
0.0285186767578125,
-0.0209197998046875,
-0.03155517578125,
-0.0286102294921875,
0.024444580078125,
0.00937652587890625,
0.004230499267578125,
-0.002750396728515625,
-0.037994384765625,
0.0550537109375,
0.0501708984375,
0.09161376953125,
-0.050628662109375,
0.04376220703125,
0.027099609375,
0.004505157470703125,
-0.00970458984375,
0.04833984375,
0.061004638671875,
-0.0291900634765625,
0.03643798828125,
-0.021453857421875,
-0.033172607421875,
-0.0211181640625,
-0.043304443359375,
-0.0306396484375,
0.01511383056640625,
-0.01035308837890625,
-0.018280029296875,
-0.0214691162109375,
-0.004512786865234375,
-0.015899658203125,
0.05926513671875,
-0.0085296630859375,
-0.037933349609375,
0.0185394287109375,
0.00043272972106933594,
0.0589599609375,
-0.0242156982421875,
-0.049102783203125,
0.0226287841796875,
0.01404571533203125,
0.0160980224609375,
0.032196044921875,
-0.067138671875,
0.03607177734375,
0.04852294921875,
0.024871826171875,
0.0194244384765625,
-0.00579833984375,
0.0164031982421875,
-0.007541656494140625,
-0.041259765625,
-0.01197052001953125,
0.0153656005859375,
0.002597808837890625,
-0.029571533203125,
-0.003856658935546875,
0.0007390975952148438,
-0.01001739501953125,
0.0223541259765625,
0.0904541015625,
0.05792236328125,
-0.1314697265625,
0.00038695335388183594,
-0.02459716796875,
-0.00342559814453125,
0.0467529296875,
-0.010345458984375,
-0.00984954833984375,
-0.0018606185913085938,
0.059661865234375,
-0.00926971435546875,
-0.0282745361328125,
0.040771484375,
0.0175933837890625,
0.005535125732421875,
-0.01983642578125,
0.05645751953125,
0.01441192626953125,
-0.003719329833984375,
-0.01067352294921875,
0.0005335807800292969,
0.00838470458984375,
-0.0163116455078125,
-0.01253509521484375,
0.0201263427734375,
-0.0182342529296875,
-0.03363037109375,
0.0272674560546875,
-0.03631591796875,
0.00940704345703125,
0.0241546630859375,
0.013427734375,
0.0435791015625,
0.04119873046875,
0.005664825439453125,
-0.0015630722045898438,
0.01296234130859375,
0.01727294921875,
0.047637939453125,
-0.00470733642578125,
-0.056427001953125,
0.0384521484375,
0.0252838134765625,
-0.002315521240234375,
0.00905609130859375,
0.029144287109375,
-0.01349639892578125,
-0.007457733154296875,
0.04827880859375,
0.0010671615600585938,
-0.035919189453125,
0.016937255859375,
-0.0016469955444335938,
-0.01432037353515625,
0.02984619140625,
-0.043701171875,
-0.03619384765625,
-0.046112060546875,
0.0007886886596679688,
-0.08416748046875,
0.041412353515625,
0.037445068359375,
-0.07171630859375,
0.07568359375,
-0.006591796875,
0.0301361083984375,
-0.0012617111206054688,
0.0259857177734375,
-0.010406494140625,
0.01149749755859375,
-0.04119873046875,
0.02923583984375,
-0.04388427734375,
0.0311431884765625,
-0.0592041015625,
0.01190185546875,
-0.0204010009765625,
0.0028858184814453125,
0.01702880859375,
0.00943756103515625,
-0.028594970703125,
-0.01520538330078125,
0.00463104248046875,
0.03192138671875,
0.0115966796875,
0.0231170654296875,
0.00597381591796875,
0.0022830963134765625,
0.0251007080078125,
0.0001938343048095703,
0.040985107421875,
-0.04278564453125,
-0.004772186279296875,
0.0123138427734375,
0.001934051513671875,
-0.00518035888671875,
-0.0105743408203125,
-0.039093017578125,
-0.0248870849609375,
-0.002086639404296875,
0.0009036064147949219,
0.0008940696716308594,
0.019287109375,
0.0310516357421875,
0.03839111328125,
-0.00482940673828125,
-0.004245758056640625,
-0.02862548828125,
0.051116943359375,
0.01270294189453125,
0.024688720703125,
0.06500244140625,
0.03070068359375,
0.01293182373046875,
-0.01141357421875,
0.0242767333984375,
-0.015960693359375,
-0.031402587890625,
-0.0077362060546875,
-0.020538330078125,
0.01313018798828125,
-0.068115234375,
-0.03900146484375,
0.04248046875,
0.03143310546875,
-0.0019817352294921875,
-0.01898193359375,
0.00440216064453125,
0.031280517578125,
0.036865234375,
0.01088714599609375,
0.07672119140625,
0.0232391357421875,
0.0205078125,
-0.0240478515625,
0.01364898681640625,
0.0289764404296875,
-0.00269317626953125,
-0.0035552978515625,
0.01438140869140625,
-0.028900146484375,
0.033905029296875,
-0.0188751220703125,
0.013885498046875,
0.0267181396484375,
0.0167999267578125,
-0.0220947265625,
0.037841796875,
-0.011138916015625,
0.0027008056640625,
0.00025391578674316406,
0.01332855224609375,
0.010223388671875,
-0.00814056396484375,
-0.0121307373046875,
-0.040191650390625,
0.0379638671875,
0.022735595703125,
-0.013153076171875,
-0.01055908203125,
0.0233612060546875,
0.01253509521484375,
-0.04827880859375,
-0.0235137939453125,
-0.01611328125,
-0.03521728515625,
0.060302734375,
-0.0272369384765625,
0.0234832763671875,
-0.038787841796875,
-0.0272674560546875,
-0.030181884765625,
0.0249176025390625,
0.0170135498046875,
-0.0100860595703125,
0.0224151611328125,
-0.004116058349609375,
-0.0283050537109375,
-0.01214599609375,
-0.00875091552734375,
0.016357421875,
0.0034389495849609375,
-0.05670166015625,
-0.0199127197265625,
-0.01552581787109375,
-0.0300445556640625,
-0.0032825469970703125,
0.0236053466796875,
0.00759124755859375,
0.00008320808410644531,
0.02655029296875,
-0.0419921875,
0.039215087890625,
-0.0034275054931640625,
0.017120361328125,
-0.001270294189453125,
-0.0010194778442382812,
-0.0072784423828125,
-0.028839111328125,
0.0164794921875,
0.01302337646484375,
-0.004978179931640625,
-0.020263671875,
0.094482421875,
-0.0318603515625,
-0.0152130126953125,
-0.0214996337890625,
0.01012420654296875,
-0.033203125,
-0.0328369140625,
0.035369873046875,
-0.02032470703125,
-0.02056884765625,
0.0202178955078125,
-0.057830810546875,
0.04986572265625,
-0.004253387451171875,
-0.004428863525390625,
0.04754638671875,
-0.0290374755859375,
-0.00969696044921875,
-0.0080718994140625,
0.0648193359375,
-0.0215606689453125,
-0.06976318359375,
-0.054168701171875,
0.025390625,
0.007808685302734375,
0.043304443359375,
-0.005779266357421875,
0.05096435546875,
-0.029449462890625,
-0.006771087646484375,
-0.0076446533203125,
-0.055328369140625,
-0.02728271484375,
0.01338958740234375,
-0.03009033203125,
-0.0185546875,
-0.0029392242431640625,
-0.02374267578125,
-0.00972747802734375,
0.01268768310546875,
0.0186309814453125,
-0.02276611328125,
-0.00850677490234375,
-0.0059967041015625,
0.042022705078125,
0.0426025390625,
0.0289459228515625,
0.0196075439453125,
-0.0142059326171875,
-0.0430908203125,
0.0132293701171875,
-0.04840087890625,
-0.04119873046875,
-0.031646728515625,
0.010040283203125,
0.02685546875,
-0.0116729736328125,
-0.0252685546875,
-0.0689697265625,
0.016876220703125,
0.027252197265625,
-0.007106781005859375,
-0.051483154296875,
0.02337646484375,
-0.031494140625,
0.05072021484375,
-0.02154541015625,
-0.02587890625,
0.00937652587890625,
-0.017242431640625,
-0.038665771484375,
0.006961822509765625,
-0.035614013671875,
0.0057220458984375,
0.0026988983154296875,
-0.00592803955078125,
0.0256195068359375,
0.021087646484375,
-0.032073974609375,
-0.007587432861328125,
-0.0310211181640625,
0.037139892578125,
-0.06707763671875,
-0.01186370849609375,
-0.004306793212890625,
0.01158905029296875,
-0.03704833984375,
-0.064697265625,
0.0014829635620117188,
-0.044403076171875,
-0.0139312744140625,
0.00817108154296875,
-0.00428009033203125,
0.01128387451171875,
-0.053924560546875,
-0.09527587890625,
0.09271240234375,
-0.02001953125,
-0.0323486328125,
-0.0318603515625,
-0.042205810546875,
-0.0010614395141601562,
0.052520751953125,
-0.01250457763671875,
-0.01471710205078125,
-0.0780029296875,
0.0228729248046875,
0.011016845703125,
0.0272369384765625,
-0.0242919921875,
0.0283660888671875,
0.01152801513671875,
0.055999755859375,
0.034454345703125,
-0.0031909942626953125,
0.0361328125,
-0.01467132568359375,
0.038970947265625,
0.059234619140625,
-0.0174407958984375,
0.001861572265625,
-0.01442718505859375,
-0.0543212890625,
-0.028045654296875,
-0.05865478515625,
-0.0004870891571044922,
-0.0251922607421875,
0.037567138671875,
0.0240020751953125,
-0.011383056640625,
0.00024116039276123047,
-0.017425537109375,
-0.05474853515625,
-0.0052337646484375,
0.00069427490234375,
0.00738525390625,
-0.037109375,
0.01520538330078125,
0.0199737548828125,
0.0081634521484375,
0.01146697998046875,
-0.01413726806640625,
-0.0167083740234375,
-0.0193634033203125,
-0.003173828125,
-0.0274200439453125,
0.00878143310546875,
-0.025848388671875,
0.025482177734375,
-0.0435791015625,
-0.0673828125,
0.0100860595703125,
0.024200439453125,
-0.06451416015625,
-0.0247802734375,
0.00719451904296875,
0.04473876953125,
-0.03759765625,
0.04315185546875,
0.0107574462890625,
0.03399658203125,
-0.06878662109375,
0.00507354736328125,
0.0156402587890625,
0.03826904296875,
-0.00965118408203125,
0.05120849609375,
0.00884246826171875,
0.01934814453125,
-0.010528564453125,
0.01666259765625,
-0.01788330078125,
-0.0546875,
-0.03729248046875,
0.0139923095703125,
-0.001865386962890625,
0.00885009765625,
0.0211639404296875,
-0.0021610260009765625,
0.0017576217651367188,
0.036590576171875,
-0.01018524169921875,
-0.029510498046875,
0.0285186767578125,
-0.01995849609375,
0.0216064453125,
0.00981903076171875
] |
d11ed217d7770e0a289500aa84b79c2bed7bc352
|
Wordpress Stackexchange
Q: Get shortcode name from within it's callback function?
Possible Duplicate:
current_shortcode() - detect currently used shortcode
I'm dynamically generating shortcodes with my plugin like this:
foreach ($options['grids'] as $grid) {
add_shortcode($grid['shortcode'], array($this, 'print_shortcode'));
}
But the problem is, in the callback function I need to print different content, based on the shortcode's name.
My question is - how would I get the shortcode's name from within print_shortcode() ?
Thank you!
A: The shortcode's name is referred to as the tag. The tag is actually the 3rd (and last) parameter passed to the shortcode's callback function.
So your callback should look something like this:
function print_shortcode($atts, $content, $tag) {
// $atts - array of attributes passed from shortcode
// $content - content between shortcodes that have enclosing tags eg: [tag]content[/tag]
// $tag - shortcode name
// do something... perhaps:
switch($tag) {
case 'dog':
// some code
break;
case 'cat':
// some code
break;
case 'asparagus':
// some code
break;
} // switch
}
|
Q: Get shortcode name from within it's callback function?
Possible Duplicate:
current_shortcode() - detect currently used shortcode
I'm dynamically generating shortcodes with my plugin like this:
foreach ($options['grids'] as $grid) {
add_shortcode($grid['shortcode'], array($this, 'print_shortcode'));
}
But the problem is, in the callback function I need to print different content, based on the shortcode's name.
My question is - how would I get the shortcode's name from within print_shortcode() ?
Thank you!
A: The shortcode's name is referred to as the tag. The tag is actually the 3rd (and last) parameter passed to the shortcode's callback function.
So your callback should look something like this:
function print_shortcode($atts, $content, $tag) {
// $atts - array of attributes passed from shortcode
// $content - content between shortcodes that have enclosing tags eg: [tag]content[/tag]
// $tag - shortcode name
// do something... perhaps:
switch($tag) {
case 'dog':
// some code
break;
case 'cat':
// some code
break;
case 'asparagus':
// some code
break;
} // switch
}
|
wordpress
|
{
"language": "en",
"length": 163,
"provenance": "stackexchange_00019.jsonl.gz:421727",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58092"
}
|
[
0.01343536376953125,
-0.0033512115478515625,
-0.004833221435546875,
0.003986358642578125,
-0.0167388916015625,
-0.009429931640625,
0.0207672119140625,
-0.029998779296875,
0.00418853759765625,
0.0330810546875,
-0.017974853515625,
0.00445556640625,
0.0095367431640625,
-0.01406097412109375,
-0.005870819091796875,
-0.01068878173828125,
0.047760009765625,
-0.02093505859375,
0.01500701904296875,
-0.007785797119140625,
-0.016082763671875,
0.0305023193359375,
-0.0020885467529296875,
0.07818603515625,
0.01349639892578125,
-0.0232391357421875,
0.0821533203125,
-0.0178070068359375,
0.029144287109375,
-0.01690673828125,
0.0269317626953125,
-0.0299072265625,
0.040924072265625,
0.042327880859375,
-0.07611083984375,
0.06585693359375,
-0.006641387939453125,
0.01448822021484375,
0.010101318359375,
0.035797119140625,
0.0226593017578125,
-0.0134124755859375,
0.0595703125,
-0.0043487548828125,
0.0116119384765625,
-0.037322998046875,
0.060516357421875,
-0.029510498046875,
-0.01538848876953125,
0.052764892578125,
0.0635986328125,
0.001819610595703125,
0.041656494140625,
0.0110015869140625,
-0.0085601806640625,
0.0017671585083007812,
-0.0200042724609375,
-0.035064697265625,
0.04705810546875,
0.00836944580078125,
-0.0283966064453125,
-0.06256103515625,
0.04791259765625,
-0.03564453125,
0.00916290283203125,
-0.00698089599609375,
-0.0002894401550292969,
0.007053375244140625,
0.026611328125,
0.042999267578125,
0.0391845703125,
-0.019317626953125,
0.005718231201171875,
-0.00261688232421875,
-0.0177154541015625,
0.00754547119140625,
0.0159454345703125,
0.0017728805541992188,
-0.0033111572265625,
-0.0035305023193359375,
0.003185272216796875,
-0.020538330078125,
-0.051422119140625,
0.031463623046875,
-0.02313232421875,
0.0149688720703125,
-0.00482940673828125,
-0.00974273681640625,
-0.00775909423828125,
-0.018585205078125,
-0.0189208984375,
0.005527496337890625,
0.01538848876953125,
-0.0119781494140625,
-0.0287017822265625,
-0.0204010009765625,
0.00441741943359375,
0.0830078125,
-0.0242156982421875,
0.00003314018249511719,
-0.0221405029296875,
-0.01194000244140625,
-0.032135009765625,
-0.051666259765625,
-0.0250091552734375,
0.053070068359375,
0.01434326171875,
0.0142364501953125,
0.028656005859375,
0.0010433197021484375,
-0.00043702125549316406,
-0.01910400390625,
-0.041778564453125,
-0.01152801513671875,
-0.01439666748046875,
0.05670166015625,
-0.047821044921875,
-0.0016317367553710938,
-0.01202392578125,
0.03143310546875,
0.02410888671875,
0.033538818359375,
-0.024932861328125,
-0.009796142578125,
0.0024261474609375,
-0.0001232624053955078,
-0.01202392578125,
-0.0177001953125,
0.0140228271484375,
0.01282501220703125,
-0.02947998046875,
0.004795074462890625,
0.048065185546875,
0.0313720703125,
0.01053619384765625,
-0.00771331787109375,
0.00823974609375,
0.01461029052734375,
-0.0022106170654296875,
0.008148193359375,
-0.01129913330078125,
0.0166778564453125,
0.039642333984375,
-0.033416748046875,
-0.0018110275268554688,
-0.0003685951232910156,
0.022918701171875,
0.0323486328125,
-0.0307464599609375,
-0.049530029296875,
0.05853271484375,
-0.0117950439453125,
0.045928955078125,
-0.00406646728515625,
-0.007038116455078125,
0.0046234130859375,
0.040618896484375,
-0.026611328125,
-0.028411865234375,
-0.037109375,
0.01690673828125,
-0.01800537109375,
-0.01654052734375,
-0.04931640625,
-0.06707763671875,
0.0001360177993774414,
-0.04644775390625,
0.005550384521484375,
0.011749267578125,
0.039764404296875,
-0.003284454345703125,
0.0263519287109375,
-0.005962371826171875,
0.0226898193359375,
0.0175018310546875,
-0.00568389892578125,
-0.058258056640625,
0.027374267578125,
0.042877197265625,
-0.046630859375,
-0.0305938720703125,
-0.03643798828125,
0.041015625,
-0.00583648681640625,
-0.076171875,
0.0291595458984375,
0.02044677734375,
0.07281494140625,
0.01525115966796875,
0.00966644287109375,
0.055694580078125,
-0.00843048095703125,
-0.042388916015625,
0.0224609375,
0.01024627685546875,
0.01898193359375,
-0.02398681640625,
0.02166748046875,
-0.0008511543273925781,
-0.03564453125,
0.024383544921875,
0.0234375,
-0.01448822021484375,
-0.01322174072265625,
-0.05474853515625,
0.017333984375,
-0.016265869140625,
0.033905029296875,
-0.013153076171875,
-0.0333251953125,
0.013885498046875,
-0.059295654296875,
-0.00408172607421875,
0.047332763671875,
-0.0129547119140625,
0.01348876953125,
-0.04937744140625,
0.006359100341796875,
0.0203704833984375,
0.0300750732421875,
0.050384521484375,
0.0357666015625,
0.037109375,
0.004741668701171875,
-0.0086212158203125,
-0.0079803466796875,
-0.033294677734375,
-0.01314544677734375,
-0.05126953125,
0.0242156982421875,
-0.0660400390625,
0.02587890625,
-0.00018215179443359375,
0.01140594482421875,
-0.02374267578125,
-0.0001653432846069336,
0.0155792236328125,
-0.0157928466796875,
0.0159454345703125,
0.0216064453125,
0.05426025390625,
0.023773193359375,
0.03143310546875,
0.01120758056640625,
0.09027099609375,
0.0054473876953125,
0.031585693359375,
-0.045196533203125,
0.0038204193115234375,
0.0599365234375,
-0.0228271484375,
0.03131103515625,
0.00644683837890625,
0.010955810546875,
-0.0171661376953125,
0.043487548828125,
-0.053070068359375,
-0.02008056640625,
-0.005279541015625,
-0.00841522216796875,
0.01206207275390625,
-0.034515380859375,
0.01364898681640625,
-0.04388427734375,
0.0662841796875,
0.021636962890625,
0.050628662109375,
0.046051025390625,
-0.029937744140625,
0.038726806640625,
0.0005440711975097656,
-0.003543853759765625,
0.01343536376953125,
0.0645751953125,
0.02447509765625,
0.00493621826171875,
0.00614166259765625,
-0.043212890625,
0.007354736328125,
0.0294036865234375,
-0.01009368896484375,
0.0592041015625,
-0.03778076171875,
-0.017181396484375,
-0.037200927734375,
-0.034759521484375,
-0.0169830322265625,
0.02392578125,
0.0052032470703125,
0.0094757080078125,
-0.00681304931640625,
0.09588623046875,
-0.0159912109375,
0.05853271484375,
0.010009765625,
0.03497314453125,
0.04571533203125,
0.0259246826171875,
0.0017852783203125,
0.000446319580078125,
0.0225067138671875,
0.037353515625,
-0.03253173828125,
0.01352691650390625,
-0.005954742431640625,
0.033477783203125,
-0.03021240234375,
-0.0390625,
-0.02508544921875,
0.03179931640625,
-0.07965087890625,
0.046112060546875,
0.03155517578125,
0.11175537109375,
-0.0291748046875,
-0.0560302734375,
0.0034198760986328125,
0.0457763671875,
-0.04742431640625,
-0.082275390625,
0.0188751220703125,
-0.033233642578125,
0.0277557373046875,
-0.02288818359375,
-0.01181793212890625,
-0.0330810546875,
0.0010652542114257812,
0.008056640625,
-0.031646728515625,
-0.0235443115234375,
-0.05145263671875,
-0.04583740234375,
-0.06341552734375,
0.054962158203125,
-0.0053253173828125,
0.0187530517578125,
0.0043182373046875,
0.01012420654296875,
0.01044464111328125,
0.0016965866088867188,
0.0180816650390625,
-0.008880615234375,
-0.0212554931640625,
-0.01531982421875,
-0.00829315185546875,
-0.022796630859375,
0.0010442733764648438,
0.00732421875,
-0.02215576171875,
0.0005130767822265625,
0.02117919921875,
-0.019805908203125,
-0.001972198486328125,
0.006816864013671875,
0.051849365234375,
0.040863037109375,
-0.0126495361328125,
0.044677734375,
0.08489990234375,
-0.01641845703125,
0.00028061866760253906,
-0.00787353515625,
-0.036895751953125,
-0.006443023681640625,
0.026611328125,
-0.0094146728515625,
-0.011444091796875,
-0.0026264190673828125,
0.01399993896484375,
0.0209808349609375,
0.0234832763671875,
-0.005504608154296875,
0.023590087890625,
0.0003838539123535156,
0.0179901123046875,
-0.0286102294921875,
-0.000453948974609375,
-0.0163116455078125,
0.00884246826171875,
-0.00028252601623535156,
0.01776123046875,
-0.00701141357421875,
0.0254058837890625,
0.00492095947265625,
-0.02386474609375,
0.04833984375,
-0.01303863525390625,
-0.0012035369873046875,
-0.04669189453125,
-0.0230560302734375,
-0.0239410400390625,
0.06268310546875,
-0.057281494140625,
0.01177978515625,
-0.0228729248046875,
-0.01861572265625,
0.00896453857421875,
-0.0213165283203125,
-0.080078125,
-0.007282257080078125,
-0.07232666015625,
0.00080108642578125,
-0.03125,
-0.0003554821014404297,
-0.004787445068359375,
-0.01526641845703125,
-0.0214996337890625,
-0.05859375,
0.03228759765625,
-0.031829833984375,
0.0253753662109375,
-0.027313232421875,
0.0198974609375,
-0.0555419921875,
-0.005992889404296875,
-0.0298004150390625,
-0.053497314453125,
-0.00910186767578125,
0.005603790283203125,
0.033782958984375,
0.0240631103515625,
-0.09033203125,
-0.01319122314453125,
0.0303497314453125,
0.00492095947265625,
0.00473785400390625,
-0.005374908447265625,
-0.001560211181640625,
0.0311279296875,
0.0225677490234375,
-0.007381439208984375,
-0.004611968994140625,
0.01078033447265625,
0.05841064453125,
0.00843048095703125,
0.06085205078125,
-0.0292205810546875,
-0.04449462890625,
0.0281219482421875,
-0.068603515625,
-0.045806884765625,
-0.0277557373046875,
0.017303466796875,
0.0478515625,
-0.035675048828125,
0.03045654296875,
-0.033721923828125,
-0.0413818359375,
0.0433349609375,
-0.0007219314575195312,
-0.0443115234375,
0.01242828369140625,
0.0298919677734375,
0.01340484619140625,
-0.0204620361328125,
-0.05584716796875,
0.0316162109375,
0.049468994140625,
-0.0288238525390625,
0.037628173828125,
0.01291656494140625,
-0.034637451171875,
0.07879638671875,
0.006748199462890625,
-0.015106201171875,
0.00778961181640625,
0.01320648193359375,
0.006381988525390625,
-0.01137542724609375,
-0.0114288330078125,
-0.004726409912109375,
0.009033203125,
0.0379638671875,
-0.03997802734375,
-0.0015096664428710938,
-0.01230621337890625,
0.036865234375,
-0.0311737060546875,
0.0328369140625,
-0.03485107421875,
-0.05474853515625,
0.0156402587890625,
0.033172607421875,
-0.0010461807250976562,
0.0156707763671875,
-0.0035457611083984375,
0.006137847900390625,
-0.01200103759765625,
0.01629638671875,
-0.0103302001953125,
0.0171356201171875,
-0.0130157470703125,
0.053466796875,
-0.047637939453125,
-0.004695892333984375,
0.002475738525390625,
0.01354217529296875,
0.03009033203125,
-0.017059326171875,
-0.042144775390625,
-0.030670166015625,
-0.02239990234375,
-0.0265655517578125,
0.0052947998046875,
0.026763916015625,
0.0181121826171875,
0.0173187255859375,
0.006145477294921875,
0.0143890380859375,
-0.008392333984375,
0.04144287109375,
-0.012115478515625,
-0.00036787986755371094,
-0.0302734375,
-0.005947113037109375,
-0.011749267578125,
0.037109375,
-0.041473388671875,
0.03436279296875,
0.004608154296875,
-0.0114898681640625,
-0.0269927978515625,
0.007793426513671875,
0.02935791015625,
-0.005077362060546875,
0.0202789306640625,
-0.017669677734375,
0.01288604736328125,
-0.0231475830078125,
0.001331329345703125,
0.004772186279296875,
0.0516357421875,
-0.0177001953125,
-0.0198822021484375,
0.031951904296875,
-0.02349853515625,
-0.0212554931640625,
-0.00719451904296875,
0.00865936279296875,
0.0313720703125,
-0.03515625,
-0.0277557373046875,
0.043060302734375,
0.05401611328125,
-0.008209228515625,
-0.01435089111328125,
-0.00708770751953125,
0.0003292560577392578,
-0.0252532958984375,
-0.02764892578125,
0.0084686279296875,
0.024505615234375,
-0.033416748046875,
-0.024932861328125,
-0.0014905929565429688,
0.0026092529296875,
-0.014068603515625,
0.0008635520935058594,
-0.04522705078125,
0.0300750732421875,
-0.0265655517578125,
0.022308349609375,
-0.0247650146484375,
-0.00528717041015625,
-0.033538818359375,
-0.0011167526245117188,
0.0482177734375,
0.0243072509765625,
-0.058319091796875,
0.00850677490234375,
-0.028594970703125,
0.00167083740234375,
0.029266357421875,
-0.061798095703125,
-0.0167694091796875,
-0.040985107421875,
-0.0257415771484375,
0.017059326171875,
0.0061492919921875,
0.041168212890625,
0.0200653076171875,
0.0240936279296875,
-0.04656982421875,
0.06658935546875,
0.033599853515625,
-0.013702392578125,
0.016326904296875,
0.0389404296875,
0.0197906494140625,
-0.021453857421875,
-0.026092529296875,
-0.0400390625,
0.02496337890625,
0.00580596923828125,
-0.0291595458984375,
-0.0196685791015625,
-0.004131317138671875,
-0.016632080078125,
0.029144287109375,
-0.00971221923828125,
0.0013952255249023438,
0.0184173583984375,
0.0164337158203125,
-0.0014400482177734375,
-0.033203125,
0.033905029296875,
-0.028961181640625,
0.019073486328125,
-0.044708251953125,
-0.050201416015625,
-0.0020961761474609375,
0.01861572265625,
0.036407470703125,
-0.017059326171875,
0.0023174285888671875,
0.0164642333984375,
-0.0214691162109375,
0.0360107421875,
0.1021728515625,
0.0034694671630859375,
0.051727294921875,
0.04449462890625,
-0.00031280517578125,
0.0217742919921875,
0.0110626220703125,
0.0450439453125,
-0.038482666015625,
0.0692138671875,
0.00902557373046875,
-0.0081939697265625,
0.064208984375,
-0.031829833984375,
0.031219482421875,
-0.0006737709045410156,
0.060302734375,
-0.031097412109375,
0.0299224853515625,
0.047088623046875,
-0.035675048828125,
-0.033538818359375,
0.01398468017578125,
-0.020416259765625,
-0.017059326171875,
0.0214080810546875,
-0.007503509521484375,
-0.041015625,
0.009857177734375,
0.0166015625,
-0.00858306884765625,
-0.01885986328125,
0.027099609375,
0.0035076141357421875,
-0.0149078369140625,
-0.005039215087890625,
-0.0035114288330078125,
0.0158843994140625,
-0.0304107666015625,
0.01174163818359375,
0.0035247802734375,
-0.027587890625,
-0.044677734375,
0.02581787109375,
0.001842498779296875,
0.0009341239929199219,
-0.0144805908203125,
0.003528594970703125,
-0.0092315673828125,
0.05487060546875,
-0.044189453125,
0.018524169921875,
0.039825439453125,
-0.0301666259765625,
0.0304718017578125,
-0.00012791156768798828,
0.0228729248046875,
0.03863525390625,
-0.0298004150390625,
0.00966644287109375,
-0.01171875,
0.00759124755859375,
0.002079010009765625,
0.028289794921875,
0.06109619140625,
-0.0012454986572265625,
-0.040496826171875,
0.01340484619140625,
0.0122528076171875,
0.00891876220703125,
0.0307769775390625,
-0.040802001953125,
-0.036712646484375,
-0.04443359375,
-0.0027141571044921875,
-0.07855224609375,
-0.004924774169921875,
-0.00693511962890625,
-0.08087158203125,
0.0496826171875,
0.01181793212890625,
0.04193115234375,
0.0262908935546875,
0.012542724609375,
-0.014617919921875,
-0.026519775390625,
-0.0706787109375,
0.06072998046875,
0.0195159912109375,
0.076171875,
-0.085693359375,
-0.016937255859375,
0.0175933837890625,
0.038665771484375,
0.01261138916015625,
0.006580352783203125,
0.02532958984375,
-0.0022029876708984375,
0.011810302734375,
-0.00888824462890625,
-0.0606689453125,
0.0160369873046875,
0.028411865234375,
0.006633758544921875,
0.0271453857421875,
-0.00493621826171875,
0.049407958984375,
-0.0511474609375,
0.0021877288818359375,
0.04449462890625,
0.0121612548828125,
0.003787994384765625,
0.008148193359375,
-0.0222930908203125,
-0.0018053054809570312,
0.006195068359375,
0.0073394775390625,
-0.045440673828125,
-0.019744873046875,
0.056793212890625,
0.0478515625,
-0.04034423828125,
-0.039276123046875,
-0.0300445556640625,
0.050506591796875,
0.034820556640625,
0.028533935546875,
0.043487548828125,
0.0269622802734375,
0.04998779296875,
-0.0027751922607421875,
0.0104827880859375,
0.004608154296875,
0.00669097900390625,
0.053558349609375,
-0.008056640625,
0.0162200927734375,
-0.035308837890625,
0.0141448974609375,
0.0144195556640625,
0.0628662109375,
-0.039031982421875,
-0.00927734375,
0.0149078369140625,
0.021942138671875,
-0.00795745849609375,
-0.00832366943359375,
0.02459716796875,
0.00921630859375,
0.0181427001953125,
-0.0300445556640625,
-0.007083892822265625,
0.01531219482421875,
0.05419921875,
0.008148193359375,
0.00971221923828125,
-0.05255126953125,
-0.035125732421875,
-0.02996826171875,
0.00809478759765625,
0.0142364501953125,
0.05157470703125,
-0.01085662841796875,
0.064697265625,
-0.0673828125,
-0.01751708984375,
-0.0008521080017089844,
0.017059326171875,
-0.0188140869140625,
0.00888824462890625,
0.0225067138671875,
-0.005687713623046875,
-0.01032257080078125,
0.0200958251953125,
0.03521728515625,
-0.013214111328125,
0.009857177734375,
0.00141143798828125,
-0.0271148681640625,
0.006191253662109375,
0.037567138671875,
-0.004123687744140625,
0.018646240234375,
-0.03424072265625,
-0.0144500732421875,
-0.031951904296875,
-0.0225677490234375,
-0.035430908203125,
-0.00531768798828125,
0.0063629150390625,
-0.049560546875,
0.047515869140625,
-0.00789642333984375,
-0.0012540817260742188,
0.0247650146484375,
0.0013284683227539062,
0.0255279541015625,
-0.0296630859375,
-0.0823974609375,
0.006038665771484375,
-0.047515869140625,
-0.02899169921875,
0.0164947509765625,
0.03131103515625,
-0.0260162353515625,
0.0350341796875,
-0.00726318359375,
-0.038421630859375,
0.01059722900390625,
0.043060302734375,
0.0010652542114257812,
0.06689453125,
0.032684326171875,
0.0186614990234375,
-0.044036865234375,
-0.01322174072265625,
0.01198577880859375,
0.0107879638671875,
0.05926513671875,
-0.006561279296875,
0.036102294921875,
0.018157958984375,
-0.021820068359375,
0.003940582275390625,
-0.0287933349609375,
-0.0672607421875,
0.0911865234375,
0.00616455078125,
-0.031646728515625,
-0.016357421875,
0.026214599609375,
0.04864501953125,
0.0438232421875,
-0.000415802001953125,
0.003101348876953125,
0.01335906982421875,
0.01287841796875,
0.0028095245361328125,
0.04534912109375,
-0.035552978515625,
-0.039764404296875,
-0.045654296875,
-0.0150604248046875,
0.0030117034912109375,
0.00829315185546875,
0.01593017578125,
-0.0033283233642578125,
0.06671142578125,
0.00496673583984375,
0.0228271484375,
0.03900146484375,
0.05908203125,
0.02374267578125,
0.0233154296875,
-0.02825927734375,
-0.00323486328125,
-0.0206451416015625,
-0.003170013427734375,
0.004383087158203125,
0.052886962890625,
-0.00740814208984375,
-0.006351470947265625,
0.03369140625,
0.021728515625,
0.062286376953125,
-0.01387786865234375,
0.024261474609375,
-0.000812530517578125,
0.01274871826171875,
0.00775146484375,
-0.0240478515625,
-0.021759033203125,
-0.031982421875,
0.0106658935546875,
0.0012416839599609375,
-0.0110626220703125,
0.00980377197265625,
-0.0023899078369140625,
-0.036163330078125,
0.0189666748046875,
0.0016117095947265625,
-0.01473236083984375,
0.0012845993041992188,
0.013275146484375,
-0.025482177734375,
0.00920867919921875,
-0.002391815185546875,
-0.01058197021484375,
0.006435394287109375,
-0.035003662109375,
-0.0205841064453125,
-0.0521240234375,
0.0294036865234375,
-0.025665283203125,
0.030548095703125,
0.040740966796875,
-0.0249176025390625,
-0.049163818359375,
0.032135009765625,
0.0168609619140625,
0.07025146484375,
-0.0008406639099121094,
-0.0095977783203125,
0.0498046875,
-0.0166473388671875,
-0.0299224853515625,
-0.08245849609375,
0.0156707763671875,
-0.058807373046875,
0.005619049072265625,
0.0433349609375,
-0.0261077880859375,
-0.0035533905029296875,
-0.0198516845703125,
-0.02130126953125,
-0.01238250732421875,
0.0390625,
-0.042816162109375,
-0.0206756591796875,
-0.01160430908203125,
-0.0081939697265625,
0.006359100341796875,
-0.009765625,
-0.0184326171875,
-0.0270233154296875,
0.0187530517578125,
0.001544952392578125,
0.0899658203125,
-0.0018262863159179688,
-0.004810333251953125,
0.01727294921875,
0.0012884140014648438,
-0.0178070068359375,
0.0159912109375,
0.01555633544921875,
-0.0189666748046875,
0.028350830078125,
0.00539398193359375,
-0.0560302734375,
-0.019500732421875,
0.01520538330078125,
0.0229339599609375,
0.010345458984375,
-0.05694580078125,
-0.0209503173828125,
-0.0252227783203125,
0.058624267578125,
0.0114593505859375,
0.009674072265625,
-0.0212554931640625,
-0.012786865234375,
0.0143890380859375,
-0.03289794921875,
0.00254058837890625,
0.009033203125,
-0.04473876953125,
-0.007808685302734375,
-0.015655517578125,
-0.040191650390625,
-0.030364990234375,
-0.01554107666015625,
-0.0703125,
0.02044677734375,
-0.0172882080078125,
0.0246124267578125,
-0.030181884765625,
-0.03460693359375,
0.036529541015625,
-0.0252685546875,
0.007049560546875,
-0.0079345703125,
0.03204345703125,
0.0174560546875,
-0.01678466796875,
0.02294921875,
0.03924560546875,
-0.00922393798828125,
-0.01959228515625,
0.054595947265625,
0.029205322265625,
0.033355712890625,
-0.0164031982421875,
0.012237548828125,
0.021453857421875,
-0.00481414794921875,
0.02447509765625,
-0.02935791015625,
0.056854248046875,
-0.00006717443466186523,
0.006847381591796875,
0.012359619140625,
0.09002685546875,
0.004352569580078125,
0.06085205078125,
-0.01018524169921875,
-0.04071044921875,
0.01220703125,
-0.06500244140625,
-0.00031685829162597656,
-0.0013570785522460938,
0.051025390625,
-0.0300445556640625,
0.0214996337890625,
0.002689361572265625,
0.02984619140625,
0.0206451416015625
] |
579a683ade60c380a4555c20ca164151f6e6044a
|
Wordpress Stackexchange
Q: Force home page to be https? I have a SSL certificate and https plugin which both work fine along with changing the Settings in the Wordpress menu to https but I have to manually enter 'https' to see the Secure version, is there a way to make the home page force, or even better become https?
A: Change the site URL to use SSL for the entire site including home page.
|
Q: Force home page to be https? I have a SSL certificate and https plugin which both work fine along with changing the Settings in the Wordpress menu to https but I have to manually enter 'https' to see the Secure version, is there a way to make the home page force, or even better become https?
A: Change the site URL to use SSL for the entire site including home page.
A: You can redirect the visitor to your SSL site using the following code (untested, may need ajusted):
function wpse58098_template_redirect() {
if ( !is_ssl() ) {
wp_redirect( 'https://www.mysite.com' );
}
}
add_action( 'template_redirect', 'wpse58098_template_redirect' );
A: There is a plugin currently I'm using for my one of the wordpress site.
WordPress HTTPS (SSL)
( plugin has option to forse SSL for all. )
I personally recommend this plugin because,
Whenever you use ssl for webpages it becomes necessary to load all of its content from secured (Encrypted) servers, Otherwise It'll show a warning of partially encrypted/mixed content error to user.
The problem occurs when you link to external content such as JavaScript or Images, That plugin solve it by storing those external content to your own SSL secured server.
|
wordpress
|
{
"language": "en",
"length": 201,
"provenance": "stackexchange_00019.jsonl.gz:421729",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58098"
}
|
[
0.03277587890625,
0.025054931640625,
-0.012054443359375,
0.01502227783203125,
0.0262908935546875,
-0.045501708984375,
0.055267333984375,
-0.05303955078125,
0.005130767822265625,
-0.0311431884765625,
0.00383758544921875,
-0.025238037109375,
-0.032684326171875,
-0.058685302734375,
0.036346435546875,
-0.0379638671875,
0.0236053466796875,
-0.0180511474609375,
-0.01708984375,
-0.03131103515625,
0.006229400634765625,
-0.01922607421875,
0.00872802734375,
0.060699462890625,
0.0220489501953125,
0.01314544677734375,
0.050262451171875,
-0.00992584228515625,
0.0018634796142578125,
-0.0091705322265625,
0.023040771484375,
-0.0222625732421875,
0.0184326171875,
0.03997802734375,
-0.058441162109375,
-0.01427459716796875,
-0.0023288726806640625,
0.0238800048828125,
-0.0244903564453125,
0.043670654296875,
-0.005828857421875,
0.0146484375,
0.02972412109375,
0.056854248046875,
-0.0215911865234375,
-0.030670166015625,
0.00434112548828125,
-0.03387451171875,
0.01407623291015625,
0.00046372413635253906,
0.01055145263671875,
0.0022449493408203125,
0.01213836669921875,
-0.0235595703125,
-0.0223846435546875,
-0.025421142578125,
-0.0021648406982421875,
0.00954437255859375,
0.0174713134765625,
-0.007232666015625,
-0.01433563232421875,
0.01413726806640625,
0.012725830078125,
-0.00278472900390625,
0.006175994873046875,
-0.01296234130859375,
-0.0158843994140625,
0.0116729736328125,
-0.06689453125,
0.0066986083984375,
0.054168701171875,
-0.03759765625,
0.0027599334716796875,
-0.009552001953125,
-0.0080108642578125,
0.0159912109375,
-0.0193939208984375,
0.0167236328125,
0.03277587890625,
-0.0018186569213867188,
0.01107025146484375,
-0.004230499267578125,
-0.0248260498046875,
-0.0543212890625,
0.0257415771484375,
-0.020477294921875,
-0.0022220611572265625,
-0.007373809814453125,
0.01276397705078125,
0.0216522216796875,
-0.0010223388671875,
0.050567626953125,
0.025665283203125,
0.0125885009765625,
-0.027679443359375,
-0.0154266357421875,
-0.0153961181640625,
0.0016727447509765625,
-0.00759124755859375,
0.0207977294921875,
-0.025146484375,
-0.0296478271484375,
0.01558685302734375,
-0.0255889892578125,
-0.0213775634765625,
0.017913818359375,
0.0237884521484375,
0.09130859375,
0.0438232421875,
0.038787841796875,
0.00557708740234375,
0.007354736328125,
-0.02532958984375,
-0.011871337890625,
0.0007610321044921875,
0.0191802978515625,
-0.037750244140625,
-0.0034694671630859375,
-0.02459716796875,
0.001224517822265625,
-0.0257415771484375,
0.00868988037109375,
-0.00873565673828125,
0.0019197463989257812,
-0.02093505859375,
-0.01904296875,
0.010833740234375,
-0.0179595947265625,
-0.0010509490966796875,
0.007904052734375,
-0.0260162353515625,
0.0013427734375,
0.0787353515625,
0.051361083984375,
0.01023101806640625,
-0.0126800537109375,
-0.026824951171875,
-0.015869140625,
-0.0360107421875,
0.04998779296875,
-0.0005230903625488281,
-0.048431396484375,
-0.003063201904296875,
-0.0176544189453125,
0.05743408203125,
-0.0042572021484375,
0.00557708740234375,
0.036376953125,
0.02978515625,
-0.0138397216796875,
0.05206298828125,
-0.01326751708984375,
0.0213775634765625,
0.012481689453125,
0.007572174072265625,
-0.0170135498046875,
0.0195770263671875,
-0.0191802978515625,
0.0013628005981445312,
-0.029144287109375,
-0.00676727294921875,
0.00188446044921875,
0.0224456787109375,
-0.0179290771484375,
-0.0032939910888671875,
-0.026885986328125,
-0.005279541015625,
0.00933074951171875,
0.0225830078125,
0.0264739990234375,
0.0165252685546875,
0.0125579833984375,
0.0007977485656738281,
0.0099945068359375,
0.0025501251220703125,
-0.0031528472900390625,
-0.01302337646484375,
0.018463134765625,
0.0137786865234375,
0.07421875,
0.027252197265625,
-0.0238189697265625,
0.0634765625,
-0.00814056396484375,
-0.01392364501953125,
0.0197296142578125,
-0.0039825439453125,
0.043212890625,
0.00921630859375,
0.0218658447265625,
-0.0201873779296875,
0.005741119384765625,
-0.034027099609375,
0.022796630859375,
-0.0258026123046875,
-0.033660888671875,
-0.0150604248046875,
-0.005146026611328125,
-0.0184326171875,
0.017303466796875,
-0.0027027130126953125,
-0.00283050537109375,
-0.0276641845703125,
0.007091522216796875,
0.0284271240234375,
-0.043670654296875,
0.0174713134765625,
-0.0008840560913085938,
0.0251312255859375,
0.0152740478515625,
-0.006103515625,
-0.003330230712890625,
0.006877899169921875,
-0.0830078125,
-0.049774169921875,
0.0240478515625,
-0.003803253173828125,
0.00940704345703125,
-0.00788116455078125,
0.0005826950073242188,
-0.01251983642578125,
-0.0267486572265625,
-0.0272979736328125,
0.01026153564453125,
0.0029239654541015625,
-0.0135040283203125,
-0.016754150390625,
-0.0013990402221679688,
0.00562286376953125,
0.0010089874267578125,
-0.007564544677734375,
0.0302581787109375,
0.037689208984375,
0.051239013671875,
-0.0245208740234375,
-0.0110321044921875,
-0.01428985595703125,
-0.05621337890625,
0.0010471343994140625,
0.04888916015625,
0.0274505615234375,
0.002544403076171875,
-0.02020263671875,
-0.0240936279296875,
0.037322998046875,
-0.028350830078125,
0.00949859619140625,
-0.013946533203125,
0.016998291015625,
0.02545166015625,
-0.006561279296875,
-0.004055023193359375,
0.0225677490234375,
-0.03863525390625,
0.024658203125,
0.031982421875,
0.0036716461181640625,
0.007778167724609375,
-0.00347900390625,
-0.017486572265625,
0.0189208984375,
-0.00466156005859375,
-0.0325927734375,
0.006198883056640625,
-0.015533447265625,
-0.0174560546875,
-0.0038471221923828125,
0.0007700920104980469,
0.00872039794921875,
-0.032958984375,
0.02044677734375,
-0.020477294921875,
-0.006572723388671875,
0.06854248046875,
0.061004638671875,
-0.0203094482421875,
-0.029022216796875,
-0.01317596435546875,
-0.0085601806640625,
0.03839111328125,
-0.0177764892578125,
-0.0113525390625,
-0.01351165771484375,
0.003597259521484375,
-0.0338134765625,
-0.0517578125,
0.052764892578125,
0.060638427734375,
0.01314544677734375,
0.033203125,
0.04425048828125,
0.0111083984375,
-0.037750244140625,
0.05889892578125,
-0.0093536376953125,
-0.016754150390625,
0.0226287841796875,
-0.0156707763671875,
0.01021575927734375,
-0.01125335693359375,
0.07568359375,
0.052093505859375,
-0.00652313232421875,
0.01267242431640625,
0.0096435546875,
-0.0153045654296875,
0.018463134765625,
-0.027740478515625,
-0.0299224853515625,
0.040740966796875,
-0.09716796875,
0.01885986328125,
0.0086212158203125,
-0.0396728515625,
0.024444580078125,
-0.0255279541015625,
-0.0100555419921875,
-0.00402069091796875,
-0.09814453125,
-0.08038330078125,
-0.07623291015625,
-0.0288848876953125,
0.048675537109375,
0.034759521484375,
0.0117950439453125,
-0.0115966796875,
0.05706787109375,
0.040496826171875,
-0.0081329345703125,
-0.03216552734375,
-0.0634765625,
-0.06494140625,
-0.06689453125,
0.016632080078125,
-0.010589599609375,
0.029937744140625,
-0.01273345947265625,
0.034027099609375,
-0.0231170654296875,
-0.054534912109375,
-0.046112060546875,
0.034271240234375,
0.010467529296875,
-0.016326904296875,
-0.05792236328125,
-0.005580902099609375,
-0.001983642578125,
-0.00506591796875,
0.00982666015625,
-0.020477294921875,
0.0296783447265625,
0.004428863525390625,
-0.0247802734375,
-0.012054443359375,
-0.021026611328125,
-0.0030765533447265625,
0.0313720703125,
0.004764556884765625,
-0.00872802734375,
-0.0306396484375,
0.0113372802734375,
0.011260986328125,
-0.0149078369140625,
-0.013580322265625,
0.01071929931640625,
-0.0316162109375,
-0.003047943115234375,
-0.017486572265625,
-0.016204833984375,
0.007007598876953125,
0.055908203125,
-0.0172576904296875,
-0.004024505615234375,
-0.037139892578125,
-0.04107666015625,
-0.04058837890625,
0.02740478515625,
-0.025970458984375,
-0.001987457275390625,
-0.01068878173828125,
-0.04156494140625,
-0.036773681640625,
0.0153656005859375,
-0.036865234375,
-0.093994140625,
0.0298004150390625,
-0.052734375,
0.0103759765625,
-0.036041259765625,
-0.0120697021484375,
0.0128936767578125,
0.1102294921875,
-0.05767822265625,
-0.021575927734375,
0.042694091796875,
0.0167083740234375,
-0.0183258056640625,
0.021148681640625,
-0.06195068359375,
-0.0276031494140625,
-0.0595703125,
0.005481719970703125,
-0.0222625732421875,
-0.014739990234375,
0.0034332275390625,
-0.052764892578125,
-0.002689361572265625,
-0.050537109375,
0.0195465087890625,
0.030853271484375,
-0.018402099609375,
0.013519287109375,
-0.0180206298828125,
-0.003437042236328125,
-0.005619049072265625,
0.005298614501953125,
-0.06890869140625,
-0.017913818359375,
-0.006237030029296875,
0.06396484375,
0.002246856689453125,
-0.01593017578125,
-0.0157318115234375,
0.065673828125,
0.0230255126953125,
0.038726806640625,
0.02642822265625,
-0.035003662109375,
0.08697509765625,
0.04351806640625,
0.0269317626953125,
0.01450347900390625,
0.00518035888671875,
0.006053924560546875,
-0.0732421875,
0.01241302490234375,
0.007534027099609375,
0.031280517578125,
0.04449462890625,
-0.03875732421875,
-0.060546875,
-0.0450439453125,
-0.06427001953125,
-0.024566650390625,
-0.005084991455078125,
-0.02960205078125,
-0.038177490234375,
-0.057373046875,
0.06036376953125,
-0.0008716583251953125,
-0.016265869140625,
-0.003330230712890625,
0.0775146484375,
0.0018024444580078125,
-0.0208282470703125,
-0.023590087890625,
0.005157470703125,
0.0352783203125,
0.0173187255859375,
0.0782470703125,
0.0518798828125,
0.003082275390625,
0.0469970703125,
0.0141448974609375,
-0.0030231475830078125,
-0.004062652587890625,
0.059234619140625,
0.00339508056640625,
-0.031524658203125,
0.039398193359375,
0.0175933837890625,
-0.031768798828125,
0.047515869140625,
0.0296783447265625,
-0.00003796815872192383,
-0.002391815185546875,
-0.037933349609375,
0.018096923828125,
-0.041046142578125,
0.02099609375,
0.0034427642822265625,
0.006679534912109375,
0.0177764892578125,
0.044036865234375,
0.0390625,
0.00310516357421875,
0.0021839141845703125,
0.0211639404296875,
0.00832366943359375,
-0.07818603515625,
-0.03900146484375,
-0.05780029296875,
0.033355712890625,
-0.10345458984375,
-0.0220794677734375,
-0.0105133056640625,
-0.0218658447265625,
0.0718994140625,
0.010040283203125,
-0.05316162109375,
0.025146484375,
-0.0156707763671875,
0.01024627685546875,
0.0400390625,
0.007625579833984375,
0.0241241455078125,
-0.01409912109375,
-0.0177459716796875,
-0.0294342041015625,
-0.01317596435546875,
-0.034576416015625,
-0.043487548828125,
0.01473236083984375,
0.004283905029296875,
-0.00894927978515625,
0.0241851806640625,
0.0290985107421875,
0.032684326171875,
0.01165771484375,
-0.0274200439453125,
0.00783538818359375,
0.025787353515625,
-0.051055908203125,
0.0001552104949951172,
0.07232666015625,
0.028289794921875,
-0.0782470703125,
0.06298828125,
-0.005565643310546875,
-0.042236328125,
0.008392333984375,
0.03167724609375,
0.030853271484375,
0.047943115234375,
-0.01279449462890625,
0.0135040283203125,
-0.0017671585083007812,
0.0457763671875,
-0.0218963623046875,
-0.0660400390625,
-0.0214996337890625,
0.01885986328125,
0.03521728515625,
-0.02752685546875,
-0.0214385986328125,
0.0258636474609375,
0.0075531005859375,
0.05889892578125,
-0.00458526611328125,
-0.0063934326171875,
0.018157958984375,
0.00833892822265625,
0.02716064453125,
-0.01329803466796875,
0.0016832351684570312,
-0.0477294921875,
0.01496124267578125,
-0.047943115234375,
0.004791259765625,
0.063720703125,
-0.0162353515625,
0.04376220703125,
0.007656097412109375,
-0.0377197265625,
0.033050537109375,
0.027313232421875,
-0.0018396377563476562,
-0.00970458984375,
-0.0189971923828125,
-0.03240966796875,
-0.0144195556640625,
-0.02734375,
-0.0019330978393554688,
0.014404296875,
-0.0506591796875,
-0.006488800048828125,
0.038726806640625,
0.035614013671875,
-0.03662109375,
-0.081298828125,
-0.0367431640625,
0.005626678466796875,
0.062286376953125,
0.0496826171875,
-0.007488250732421875,
0.05694580078125,
-0.00569915771484375,
0.04449462890625,
0.0198211669921875,
0.01568603515625,
-0.0335693359375,
-0.01470184326171875,
0.01044464111328125,
-0.01102447509765625,
-0.007579803466796875,
-0.038970947265625,
0.0013027191162109375,
-0.0080108642578125,
0.040557861328125,
-0.0115509033203125,
-0.009857177734375,
-0.01110076904296875,
0.00798797607421875,
-0.01250457763671875,
0.023406982421875,
-0.00394439697265625,
-0.044189453125,
0.02587890625,
0.0136260986328125,
-0.0182952880859375,
-0.0258026123046875,
-0.0162506103515625,
0.0257110595703125,
0.0201416015625,
-0.0024204254150390625,
-0.021881103515625,
-0.01425933837890625,
0.0183258056640625,
0.0165252685546875,
0.0192413330078125,
0.050201416015625,
-0.0032520294189453125,
0.0372314453125,
0.015106201171875,
-0.0237579345703125,
-0.059112548828125,
-0.00937652587890625,
-0.0100860595703125,
-0.0222015380859375,
-0.01483917236328125,
0.0181121826171875,
-0.006877899169921875,
0.0218048095703125,
0.092529296875,
0.0921630859375,
-0.11505126953125,
0.0031871795654296875,
0.020263671875,
-0.0149688720703125,
0.0235595703125,
0.0234375,
0.0009522438049316406,
0.0107574462890625,
-0.02197265625,
-0.01568603515625,
-0.0164337158203125,
-0.00957489013671875,
0.0218658447265625,
-0.02020263671875,
-0.018768310546875,
0.043701171875,
-0.0009517669677734375,
-0.045745849609375,
0.0076904296875,
0.0186920166015625,
-0.0191802978515625,
-0.0031185150146484375,
0.05078125,
-0.0030059814453125,
-0.00298309326171875,
-0.03875732421875,
0.00992584228515625,
0.027587890625,
-0.033416748046875,
0.0401611328125,
0.00008100271224975586,
0.02447509765625,
0.029815673828125,
0.0025577545166015625,
0.0015382766723632812,
-0.0132904052734375,
-0.0062255859375,
0.042205810546875,
-0.002902984619140625,
-0.0003159046173095703,
0.0207366943359375,
-0.01183319091796875,
0.005611419677734375,
-0.0014333724975585938,
0.0012359619140625,
-0.03497314453125,
-0.046844482421875,
0.09808349609375,
-0.00997161865234375,
-0.0210113525390625,
-0.007709503173828125,
0.02734375,
-0.005863189697265625,
-0.027740478515625,
0.0604248046875,
-0.01401519775390625,
0.040435791015625,
-0.00041985511779785156,
0.0296630859375,
-0.04669189453125,
-0.042999267578125,
-0.047027587890625,
0.071533203125,
-0.035552978515625,
0.035797119140625,
0.0018262863159179688,
0.0196685791015625,
0.020233154296875,
0.0289459228515625,
0.01082611083984375,
0.057342529296875,
-0.0017061233520507812,
-0.005123138427734375,
-0.02569580078125,
-0.0033855438232421875,
-0.0037994384765625,
0.044647216796875,
0.024871826171875,
0.0015764236450195312,
-0.0380859375,
0.00555419921875,
0.0728759765625,
0.037811279296875,
0.023834228515625,
0.0399169921875,
-0.0269622802734375,
0.0218353271484375,
0.039306640625,
-0.0273284912109375,
0.038604736328125,
-0.01024627685546875,
-0.031829833984375,
-0.013427734375,
0.026153564453125,
0.00672149658203125,
0.008819580078125,
-0.0020465850830078125,
-0.05328369140625,
0.0203704833984375,
0.0233001708984375,
0.0462646484375,
0.007049560546875,
-0.01033782958984375,
-0.014251708984375,
-0.006011962890625,
0.03680419921875,
-0.0234222412109375,
0.033447265625,
-0.0193939208984375,
-0.01367950439453125,
-0.01369476318359375,
0.005153656005859375,
-0.0309906005859375,
0.01085662841796875,
-0.0193023681640625,
0.045196533203125,
-0.0183563232421875,
-0.0013284683227539062,
0.024261474609375,
0.02679443359375,
0.005428314208984375,
0.053131103515625,
0.0190582275390625,
0.0037441253662109375,
-0.035003662109375,
-0.0504150390625,
-0.01226806640625,
-0.00009083747863769531,
0.04766845703125,
0.003192901611328125,
0.04595947265625,
0.006023406982421875,
0.0216217041015625,
0.005985260009765625,
0.04046630859375,
0.0292510986328125,
-0.0156707763671875,
0.01192474365234375,
0.0498046875,
-0.040496826171875,
0.065185546875,
-0.021392822265625,
-0.0140380859375,
-0.012725830078125,
0.0267181396484375,
0.04644775390625,
0.007190704345703125,
0.013275146484375,
-0.007587432861328125,
-0.016571044921875,
0.036865234375,
0.004970550537109375,
0.01194000244140625,
-0.041534423828125,
-0.043121337890625,
0.00946044921875,
0.035736083984375,
0.01322174072265625,
0.021240234375,
0.0457763671875,
0.07421875,
0.031829833984375,
-0.0240631103515625,
0.01421356201171875,
-0.00321197509765625,
0.02197265625,
-0.042694091796875,
0.0299072265625,
0.0034122467041015625,
-0.011138916015625,
-0.00821685791015625,
0.003925323486328125,
0.03521728515625,
0.0228424072265625,
0.0352783203125,
0.00434112548828125,
-0.00023412704467773438,
-0.0032958984375,
0.00835418701171875,
0.033203125,
0.041107177734375,
-0.03656005859375,
-0.0254058837890625,
-0.0037403106689453125,
0.002735137939453125,
0.0281829833984375,
0.03948974609375,
0.00658416748046875,
0.0166778564453125,
0.00734710693359375,
-0.052215576171875,
0.025482177734375,
0.030364990234375,
0.0017042160034179688,
0.024658203125,
-0.0021495819091796875,
-0.0187530517578125,
-0.04656982421875,
-0.00498199462890625,
-0.01450347900390625,
0.004558563232421875,
-0.01071929931640625,
0.11065673828125,
-0.0200653076171875,
0.003604888916015625,
-0.006015777587890625,
-0.036407470703125,
0.02203369140625,
0.0099334716796875,
-0.032073974609375,
0.006343841552734375,
0.01007843017578125,
-0.0111236572265625,
-0.0787353515625,
0.044158935546875,
0.0105438232421875,
-0.0157623291015625,
0.0543212890625,
0.003551483154296875,
-0.0128021240234375,
-0.0491943359375,
0.015899658203125,
-0.0399169921875,
-0.05224609375,
-0.042999267578125,
0.02630615234375,
-0.00957489013671875,
0.0031070709228515625,
-0.0264434814453125,
0.06304931640625,
-0.0457763671875,
-0.007617950439453125,
0.00469970703125,
-0.0616455078125,
-0.0506591796875,
0.002849578857421875,
0.011810302734375,
-0.01329803466796875,
0.041412353515625,
-0.0037822723388671875,
0.0105743408203125,
0.017669677734375,
0.0206298828125,
0.0291900634765625,
-0.0197601318359375,
-0.020660400390625,
-0.00038909912109375,
-0.0028400421142578125,
-0.01922607421875,
-0.00872802734375,
0.0167999267578125,
-0.01219940185546875,
-0.034820556640625,
-0.0275421142578125,
-0.01099395751953125,
0.0007233619689941406,
-0.020111083984375,
-0.009307861328125,
-0.0020275115966796875,
-0.083984375,
-0.00579071044921875,
-0.01036834716796875,
0.0258636474609375,
-0.0279998779296875,
0.0167694091796875,
-0.0185394287109375,
-0.052703857421875,
0.030517578125,
-0.01488494873046875,
0.0303955078125,
-0.005466461181640625,
0.035186767578125,
-0.04779052734375,
0.003360748291015625,
-0.018829345703125,
0.007221221923828125,
-0.01079559326171875,
0.018463134765625,
0.0462646484375,
-0.03643798828125,
-0.02044677734375,
-0.020477294921875,
0.0267333984375,
0.024566650390625,
-0.006488800048828125,
-0.01024627685546875,
0.0024089813232421875,
-0.0234832763671875,
-0.027496337890625,
-0.032135009765625,
0.0335693359375,
-0.08502197265625,
-0.042694091796875,
-0.00423431396484375,
0.018646240234375,
0.029327392578125,
-0.036224365234375,
-0.0751953125,
0.06695556640625,
-0.0179901123046875,
-0.0247955322265625,
-0.05621337890625,
0.0157470703125,
-0.0016536712646484375,
0.025421142578125,
-0.00972747802734375,
-0.03387451171875,
-0.0217437744140625,
0.041107177734375,
0.0196075439453125,
0.0450439453125,
-0.0428466796875,
0.0474853515625,
-0.0302886962890625,
0.07763671875,
0.045928955078125,
0.01027679443359375,
0.000453948974609375,
0.0232696533203125,
-0.0184783935546875,
0.0160369873046875,
-0.042694091796875,
-0.03533935546875,
-0.0325927734375,
-0.01287841796875,
0.0107421875,
-0.0103912353515625,
0.035400390625,
-0.00914764404296875,
-0.055999755859375,
-0.0019664764404296875,
-0.02215576171875,
0.008514404296875,
-0.043609619140625,
-0.033935546875,
0.0303497314453125,
-0.01287078857421875,
-0.006481170654296875,
-0.0335693359375,
0.016387939453125,
-0.0220947265625,
-0.00444793701171875,
-0.0306854248046875,
0.0176849365234375,
-0.03314208984375,
-0.00769805908203125,
0.02801513671875,
-0.0210113525390625,
0.00919342041015625,
0.02587890625,
0.05279541015625,
-0.04498291015625,
-0.004878997802734375,
0.0002244710922241211,
0.0004405975341796875,
0.0201263427734375,
-0.0215911865234375,
0.0343017578125,
0.041412353515625,
-0.0153045654296875,
-0.0146942138671875,
0.036834716796875,
-0.003826141357421875,
-0.01560211181640625,
-0.024658203125,
0.0005831718444824219,
0.01068115234375,
0.0137786865234375,
0.0199737548828125,
-0.0251922607421875,
-0.00856781005859375,
-0.0136260986328125,
0.004364013671875,
-0.0165557861328125,
-0.040771484375,
-0.016326904296875,
0.023529052734375,
0.00678253173828125,
-0.01605224609375,
0.057891845703125,
-0.049346923828125,
0.0176239013671875,
0.0011739730834960938,
0.006256103515625,
0.0404052734375,
-0.0282745361328125,
-0.0738525390625,
-0.028717041015625,
-0.0278472900390625
] |
d9c14fb7d77331e271997aeffb5d7945bd027978
|
Wordpress Stackexchange
Q: While using WordPress Multisite is it possible to display data to main site from subsites? I am using WordPress Multisite:
Main site
--sub site
--sub site
What i need to anything publish to sub sites will auto publish on the Main site
Regards
A: You can use the switch_to_blog() function. Whatever you call within the function would be just like you are pulling in any content, but from that particular blog ID.
|
Q: While using WordPress Multisite is it possible to display data to main site from subsites? I am using WordPress Multisite:
Main site
--sub site
--sub site
What i need to anything publish to sub sites will auto publish on the Main site
Regards
A: You can use the switch_to_blog() function. Whatever you call within the function would be just like you are pulling in any content, but from that particular blog ID.
A: Someone else is due credit for this function. I can't recall where I found it.
If that guys gets here, thank you!
You need to:
Step 1 - Include / embed this function in your functions.php:
(I tried to paste it here but its too long...)
*
*The function: http://pastebin.com/DQVeJZPE
Step 2 - Embed the function in your index.php file:
<?php if (is_home()) {
echo '<h1 class="homeTitle">'.esc_html__('New on My Blog Network', 'your_text_domain').'</h1>';
echo '<ul class="recentPostsGlobal">';
network_latest_posts($how_many=50, $how_long=0, $titleOnly=true, $begin_wrap="\n<li>", $end_wrap="</li>", $blog_id='null', $thumbnail=false, $cpt="post", $ignore_blog='null', $cat='null', $tag='null', $paginate=false, $excerpt_length='null', $display_root=false);
echo '</ul>';
}
?>
You can define the amount of posts you would like to return and other stuff.
So... hope this helps ;)
Cheers, Sagive
A: I've had good luck using this WP_Query_Multisite class on GitHub. It works just like WP_Query and has some additional arguments to restrict certain sites.
A: The ThreeWP Broadcast plugin allows you to cross publish posts, pages, and custom post types from your sub sites to the main site: http://wordpress.org/plugins/threewp-broadcast/
A: There is a very good plugin for this called WordPress MU Sitewide Tags by @donncha
You have the controls to:
- copy all content from sub-sites to parent blog
- copy all content from sub-sites to a trending blog
- excludes pages from being copied
- exclude blogs marked private
- copy custom post meta fields
There are also a few widgets and supporting plugins from people like @andrea-r and ron who do quite a bit of work on the WordPress.Org forums > Multisite.
You can see this plugin in action at http://wordpress.damien.co and then visit my parent site at http://damien.co
|
wordpress
|
{
"language": "en",
"length": 341,
"provenance": "stackexchange_00019.jsonl.gz:421732",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58112"
}
|
[
0.017578125,
-0.01479339599609375,
-0.0135040283203125,
0.029693603515625,
-0.0011882781982421875,
-0.044219970703125,
0.054107666015625,
-0.011688232421875,
0.01213836669921875,
0.016998291015625,
-0.025726318359375,
0.006931304931640625,
-0.033935546875,
-0.0224609375,
-0.0149078369140625,
-0.0242767333984375,
0.04449462890625,
-0.0269012451171875,
-0.0030269622802734375,
-0.0026493072509765625,
-0.0180206298828125,
0.038055419921875,
-0.012176513671875,
0.042755126953125,
0.00455474853515625,
0.005420684814453125,
0.025848388671875,
0.00001704692840576172,
0.00080108642578125,
-0.01300811767578125,
0.00930023193359375,
0.009246826171875,
0.036468505859375,
-0.0034046173095703125,
-0.0244903564453125,
-0.002635955810546875,
0.03912353515625,
-0.0185394287109375,
-0.0010309219360351562,
0.0631103515625,
-0.01108551025390625,
0.02313232421875,
0.0223846435546875,
0.012969970703125,
0.001811981201171875,
-0.06451416015625,
0.0160675048828125,
-0.056427001953125,
-0.0140380859375,
-0.032867431640625,
0.0171661376953125,
0.00937652587890625,
0.033203125,
-0.0092315673828125,
-0.004665374755859375,
0.01959228515625,
0.03802490234375,
-0.0052337646484375,
0.042724609375,
-0.0250396728515625,
-0.05596923828125,
0.005168914794921875,
0.035064697265625,
-0.0220794677734375,
0.003742218017578125,
-0.01016998291015625,
-0.01503753662109375,
0.00949859619140625,
-0.034515380859375,
0.0100250244140625,
0.05548095703125,
-0.03546142578125,
0.0181732177734375,
0.007343292236328125,
-0.022369384765625,
-0.02569580078125,
0.00913238525390625,
0.007572174072265625,
0.0290985107421875,
-0.018951416015625,
-0.032989501953125,
0.00440216064453125,
-0.01385498046875,
-0.046356201171875,
0.0222625732421875,
0.014312744140625,
-0.0204315185546875,
-0.003040313720703125,
-0.031463623046875,
0.006946563720703125,
-0.01715087890625,
-0.009735107421875,
-0.032623291015625,
0.027496337890625,
0.0038013458251953125,
-0.00537109375,
-0.0007128715515136719,
0.09613037109375,
-0.047943115234375,
0.0243377685546875,
-0.07843017578125,
0.0218658447265625,
-0.043548583984375,
-0.04107666015625,
0.003406524658203125,
0.0523681640625,
0.01861572265625,
-0.01381683349609375,
0.0223388671875,
-0.0008401870727539062,
0.005771636962890625,
0.0193023681640625,
0.00226593017578125,
-0.0325927734375,
-0.0104827880859375,
0.035797119140625,
0.015899658203125,
-0.01068115234375,
-0.0035419464111328125,
0.00815582275390625,
0.0167236328125,
0.06927490234375,
-0.059661865234375,
-0.0241546630859375,
0.007091522216796875,
-0.00861358642578125,
0.0191192626953125,
-0.03125,
-0.031097412109375,
0.0167388916015625,
-0.036468505859375,
0.004589080810546875,
0.05389404296875,
0.0106201171875,
-0.00853729248046875,
-0.028778076171875,
0.0229644775390625,
0.037384033203125,
0.009552001953125,
0.007415771484375,
0.0275421142578125,
-0.044342041015625,
-0.034881591796875,
0.017120361328125,
0.0152130126953125,
0.0298919677734375,
0.03204345703125,
0.006137847900390625,
-0.033477783203125,
-0.0276336669921875,
0.020233154296875,
-0.01947021484375,
0.010650634765625,
-0.017120361328125,
0.0285491943359375,
-0.05865478515625,
0.00787353515625,
-0.037384033203125,
0.0440673828125,
-0.0082550048828125,
0.006114959716796875,
-0.00585174560546875,
0.032501220703125,
-0.0019702911376953125,
0.0014438629150390625,
0.004619598388671875,
-0.044708251953125,
-0.0011186599731445312,
0.0286712646484375,
-0.038330078125,
-0.01045989990234375,
0.0011205673217773438,
0.056549072265625,
0.0120697021484375,
0.002025604248046875,
0.0279083251953125,
-0.0019292831420898438,
0.00251007080078125,
0.00804901123046875,
0.05218505859375,
0.0181427001953125,
-0.0198211669921875,
0.0225067138671875,
0.00891876220703125,
-0.042266845703125,
0.0223388671875,
-0.00952911376953125,
0.0635986328125,
0.02703857421875,
0.022613525390625,
-0.016021728515625,
-0.0229949951171875,
-0.0263214111328125,
0.03887939453125,
0.01107025146484375,
-0.0401611328125,
-0.007781982421875,
-0.0101776123046875,
0.00003445148468017578,
-0.040557861328125,
-0.0311279296875,
0.032012939453125,
-0.001682281494140625,
0.0384521484375,
-0.003635406494140625,
0.0223388671875,
0.00030994415283203125,
0.01678466796875,
0.05816650390625,
0.03253173828125,
-0.0220184326171875,
0.0272369384765625,
0.0083160400390625,
-0.0789794921875,
-0.06658935546875,
0.0168914794921875,
-0.0025997161865234375,
0.03863525390625,
0.025390625,
0.01995849609375,
0.0018482208251953125,
-0.01232147216796875,
-0.0168609619140625,
-0.0146026611328125,
0.043426513671875,
-0.054229736328125,
-0.00319671630859375,
-0.0361328125,
0.0186309814453125,
0.002532958984375,
-0.06658935546875,
0.037567138671875,
0.022216796875,
-0.00286865234375,
-0.03009033203125,
0.005504608154296875,
0.032989501953125,
-0.035491943359375,
0.01026153564453125,
0.042144775390625,
0.0157623291015625,
0.020111083984375,
-0.01123809814453125,
0.007366180419921875,
0.0506591796875,
-0.001331329345703125,
0.01346588134765625,
0.00052642822265625,
0.010101318359375,
0.051727294921875,
-0.033050537109375,
-0.01708984375,
0.0193634033203125,
-0.08050537109375,
-0.028961181640625,
0.053497314453125,
0.01910400390625,
0.00901031494140625,
-0.02081298828125,
-0.0085296630859375,
0.0145111083984375,
0.0164947509765625,
-0.041717529296875,
0.0242462158203125,
0.018768310546875,
0.01776123046875,
0.04302978515625,
0.0361328125,
0.01055145263671875,
0.00914764404296875,
-0.0114593505859375,
-0.03387451171875,
0.003696441650390625,
0.05810546875,
0.06280517578125,
-0.02789306640625,
0.0056304931640625,
-0.048797607421875,
-0.01290130615234375,
0.01062774658203125,
-0.016937255859375,
0.045501708984375,
-0.04107666015625,
-0.03009033203125,
0.0169677734375,
0.0013589859008789062,
-0.0377197265625,
-0.041961669921875,
0.01058197021484375,
-0.03546142578125,
-0.01152801513671875,
0.02215576171875,
-0.0565185546875,
0.07598876953125,
-0.005767822265625,
-0.042022705078125,
0.05792236328125,
-0.054718017578125,
0.039520263671875,
-0.03631591796875,
0.0718994140625,
0.05816650390625,
-0.0286865234375,
0.00983428955078125,
0.0016222000122070312,
0.0264434814453125,
0.00982666015625,
-0.01227569580078125,
-0.00676727294921875,
0.025482177734375,
-0.08319091796875,
0.00960540771484375,
0.02337646484375,
0.0282440185546875,
-0.0217742919921875,
-0.037567138671875,
-0.022186279296875,
0.01416778564453125,
-0.06817626953125,
-0.0411376953125,
-0.02777099609375,
-0.0389404296875,
-0.0552978515625,
-0.010162353515625,
-0.0281524658203125,
0.02947998046875,
-0.0054779052734375,
0.0019664764404296875,
-0.03155517578125,
-0.0032596588134765625,
-0.041046142578125,
-0.03167724609375,
-0.054473876953125,
0.021087646484375,
-0.0167999267578125,
0.017303466796875,
-0.005695343017578125,
0.024169921875,
0.00115203857421875,
-0.02978515625,
0.0211944580078125,
0.08721923828125,
-0.012725830078125,
-0.02911376953125,
0.0141143798828125,
-0.03985595703125,
-0.0005979537963867188,
0.00829315185546875,
0.01070404052734375,
0.0172882080078125,
-0.0164642333984375,
-0.002368927001953125,
0.015960693359375,
-0.01104736328125,
0.021392822265625,
-0.06646728515625,
-0.0277099609375,
0.042083740234375,
-0.017852783203125,
-0.0270233154296875,
-0.01483917236328125,
-0.031036376953125,
-0.06341552734375,
-0.03594970703125,
0.043121337890625,
-0.0043487548828125,
-0.030670166015625,
-0.0177459716796875,
0.002010345458984375,
-0.0274658203125,
0.0185089111328125,
-0.024139404296875,
0.01329803466796875,
-0.0108795166015625,
0.0010118484497070312,
-0.015625,
0.0150909423828125,
-0.01605224609375,
0.03277587890625,
0.00717926025390625,
0.01073455810546875,
-0.0401611328125,
0.074462890625,
-0.046295166015625,
-0.02215576171875,
0.031707763671875,
-0.02606201171875,
-0.0020771026611328125,
-0.0106964111328125,
-0.0234375,
-0.0025482177734375,
0.07843017578125,
-0.048675537109375,
-0.0035724639892578125,
0.017791748046875,
0.0277099609375,
-0.051788330078125,
-0.039825439453125,
-0.0614013671875,
0.004177093505859375,
-0.0288543701171875,
-0.0300750732421875,
-0.0548095703125,
0.002716064453125,
-0.005268096923828125,
0.007720947265625,
0.01490020751953125,
-0.04876708984375,
0.03265380859375,
-0.0145263671875,
0.0141754150390625,
0.00788116455078125,
0.010040283203125,
-0.021820068359375,
-0.0163421630859375,
-0.0216064453125,
0.0108489990234375,
-0.01265716552734375,
0.02325439453125,
-0.008880615234375,
0.01184844970703125,
-0.0284881591796875,
0.0243988037109375,
0.031829833984375,
0.00299072265625,
0.0256805419921875,
-0.02215576171875,
-0.001644134521484375,
-0.0016765594482421875,
-0.0205841064453125,
-0.0185089111328125,
-0.0343017578125,
-0.032928466796875,
-0.04058837890625,
-0.007122039794921875,
-0.0033168792724609375,
-0.0231170654296875,
-0.005184173583984375,
-0.01024627685546875,
0.006603240966796875,
-0.016845703125,
-0.0122222900390625,
0.0021533966064453125,
-0.01331329345703125,
-0.03363037109375,
0.0035858154296875,
0.00982666015625,
0.0021572113037109375,
0.00127410888671875,
0.03179931640625,
-0.021240234375,
0.019378662109375,
0.0151519775390625,
0.023223876953125,
-0.022064208984375,
-0.05535888671875,
-0.0010747909545898438,
0.0163116455078125,
-0.0108184814453125,
0.03887939453125,
0.0218505859375,
0.002582550048828125,
-0.000011265277862548828,
-0.030975341796875,
0.03143310546875,
-0.0051116943359375,
0.0112457275390625,
0.004337310791015625,
-0.0152740478515625,
0.0222015380859375,
0.0175323486328125,
-0.0081634521484375,
0.0207977294921875,
-0.01092529296875,
-0.0243072509765625,
-0.02630615234375,
0.04779052734375,
0.01280975341796875,
0.0117034912109375,
-0.06304931640625,
-0.0015935897827148438,
-0.0028781890869140625,
0.01105499267578125,
0.041748046875,
0.0238037109375,
-0.004718780517578125,
-0.001178741455078125,
0.029266357421875,
0.0136566162109375,
0.02349853515625,
-0.01385498046875,
0.00995635986328125,
0.0196990966796875,
0.01605224609375,
0.0016603469848632812,
0.0302581787109375,
-0.00588226318359375,
0.034820556640625,
-0.02569580078125,
-0.05303955078125,
-0.0185546875,
0.0078277587890625,
0.038787841796875,
0.0411376953125,
-0.015350341796875,
0.0234375,
0.03314208984375,
-0.0482177734375,
-0.01045989990234375,
0.01447296142578125,
-0.0193023681640625,
-0.052276611328125,
-0.007633209228515625,
-0.052825927734375,
0.019683837890625,
0.0396728515625,
0.055908203125,
-0.0286712646484375,
0.06304931640625,
-0.035247802734375,
0.0130157470703125,
0.040069580078125,
-0.036407470703125,
0.006328582763671875,
0.05902099609375,
-0.0078582763671875,
-0.03375244140625,
0.033447265625,
0.0137481689453125,
-0.0135498046875,
0.0291900634765625,
0.01012420654296875,
0.04638671875,
0.04486083984375,
-0.031341552734375,
0.0094146728515625,
-0.027679443359375,
0.050262451171875,
-0.04205322265625,
-0.07086181640625,
-0.024444580078125,
0.02581787109375,
0.051239013671875,
-0.0305633544921875,
-0.0165252685546875,
-0.0211181640625,
-0.034912109375,
0.0098419189453125,
-0.044525146484375,
0.006198883056640625,
-0.0002014636993408203,
-0.00823211669921875,
-0.0274810791015625,
-0.0278167724609375,
0.0012617111206054688,
-0.0762939453125,
-0.03289794921875,
-0.00234222412109375,
-0.00536346435546875,
0.01519012451171875,
-0.0218963623046875,
0.0078277587890625,
-0.07025146484375,
0.0382080078125,
-0.0703125,
0.0035266876220703125,
0.082275390625,
0.043060302734375,
-0.09149169921875,
0.0245513916015625,
-0.0262298583984375,
0.007770538330078125,
0.019561767578125,
-0.0240325927734375,
-0.0450439453125,
-0.027099609375,
0.0040283203125,
0.0003859996795654297,
-0.018951416015625,
-0.08154296875,
-0.00768280029296875,
-0.004100799560546875,
0.0292510986328125,
-0.04217529296875,
0.01386260986328125,
0.0738525390625,
-0.022216796875,
0.06597900390625,
0.0528564453125,
0.058258056640625,
-0.0192413330078125,
-0.053558349609375,
-0.0014371871948242188,
-0.0447998046875,
-0.00521087646484375,
0.01161956787109375,
0.0173797607421875,
0.0291748046875,
0.01540374755859375,
0.00460052490234375,
0.0259246826171875,
-0.014617919921875,
-0.00849151611328125,
-0.0216827392578125,
-0.00876617431640625,
-0.029388427734375,
0.03424072265625,
-0.0162353515625,
0.0028285980224609375,
0.0022335052490234375,
-0.01024627685546875,
-0.042022705078125,
0.002727508544921875,
0.026275634765625,
-0.02545166015625,
-0.005764007568359375,
-0.03839111328125,
0.07122802734375,
0.116455078125,
-0.0204925537109375,
0.03338623046875,
0.0545654296875,
-0.0312347412109375,
0.01300811767578125,
0.0252532958984375,
-0.0450439453125,
-0.053131103515625,
-0.029083251953125,
-0.0242919921875,
-0.046875,
-0.047119140625,
-0.0174407958984375,
-0.00478363037109375,
0.048492431640625,
0.066650390625,
-0.0546875,
-0.0037860870361328125,
0.0248870849609375,
-0.0251007080078125,
-0.0283660888671875,
-0.016143798828125,
-0.01519775390625,
0.0208892822265625,
0.0264739990234375,
0.01898193359375,
-0.0362548828125,
0.01007080078125,
0.026031494140625,
-0.0198974609375,
-0.023284912109375,
0.034820556640625,
0.03436279296875,
0.0095062255859375,
4.76837158203125e-7,
0.0106964111328125,
0.001522064208984375,
-0.0068817138671875,
0.01499176025390625,
-0.0192413330078125,
0.00029277801513671875,
-0.0094451904296875,
0.0102386474609375,
-0.0219268798828125,
0.0110015869140625,
-0.0643310546875,
-0.006317138671875,
0.0208587646484375,
0.051239013671875,
-0.037384033203125,
0.0237884521484375,
0.04620361328125,
-0.0019168853759765625,
0.00858306884765625,
-0.027069091796875,
0.01242828369140625,
0.0242767333984375,
-0.08624267578125,
0.0178985595703125,
-0.0296630859375,
-0.0101776123046875,
-0.02197265625,
-0.01369476318359375,
0.06829833984375,
-0.0088653564453125,
-0.0086822509765625,
0.0401611328125,
0.0535888671875,
-0.02508544921875,
-0.019805908203125,
0.0015716552734375,
-0.04638671875,
-0.0260009765625,
-0.0228271484375,
-0.047119140625,
0.01141357421875,
-0.028656005859375,
-0.03790283203125,
0.09222412109375,
-0.0244140625,
0.01467132568359375,
0.037200927734375,
0.0289764404296875,
-0.014923095703125,
0.01242828369140625,
-0.0197296142578125,
0.0565185546875,
0.007640838623046875,
0.01432037353515625,
-0.07257080078125,
-0.02471923828125,
0.0028743743896484375,
0.06243896484375,
0.018096923828125,
0.01202392578125,
-0.051727294921875,
0.00345611572265625,
0.0157623291015625,
0.01450347900390625,
0.007648468017578125,
0.052734375,
-0.02178955078125,
0.043304443359375,
0.0198974609375,
-0.07281494140625,
0.00537872314453125,
0.0225830078125,
-0.03070068359375,
0.027740478515625,
-0.01348876953125,
-0.01383209228515625,
0.044342041015625,
0.01537322998046875,
0.0016040802001953125,
0.02972412109375,
-0.002910614013671875,
0.008697509765625,
0.0272369384765625,
0.0236968994140625,
0.0350341796875,
0.00580596923828125,
0.04150390625,
-0.00891876220703125,
0.04791259765625,
-0.00870513916015625,
0.003070831298828125,
0.0255126953125,
-0.009613037109375,
0.049713134765625,
0.0253753662109375,
-0.00838470458984375,
0.0073699951171875,
0.031951904296875,
0.006916046142578125,
-0.00461578369140625,
0.048614501953125,
-0.0628662109375,
-0.05926513671875,
0.0406494140625,
0.03485107421875,
0.005615234375,
-0.0108795166015625,
-0.00678253173828125,
-0.0222625732421875,
0.01120758056640625,
-0.0287322998046875,
-0.0033721923828125,
0.0253753662109375,
0.003284454345703125,
-0.0212860107421875,
-0.0229949951171875,
0.0006084442138671875,
0.0308380126953125,
-0.00033593177795410156,
0.004398345947265625,
0.019561767578125,
-0.037872314453125,
-0.06121826171875,
0.02264404296875,
0.014190673828125,
0.07489013671875,
0.012664794921875,
0.0958251953125,
-0.03997802734375,
-0.03704833984375,
-0.0254669189453125,
0.041473388671875,
-0.01151275634765625,
0.030303955078125,
-0.06744384765625,
-0.06842041015625,
0.008697509765625,
0.0543212890625,
-0.0193328857421875,
0.02667236328125,
0.047332763671875,
0.06317138671875,
-0.044219970703125,
-0.0296478271484375,
0.06024169921875,
-0.0253753662109375,
0.05255126953125,
-0.05303955078125,
-0.0134124755859375,
-0.03826904296875,
-0.03570556640625,
-0.033447265625,
-0.0197601318359375,
0.0172119140625,
-0.0183563232421875,
0.03338623046875,
0.006328582763671875,
-0.00653076171875,
0.032928466796875,
-0.0150146484375,
0.01837158203125,
-0.00727081298828125,
-0.0706787109375,
0.003875732421875,
-0.0457763671875,
-0.0262908935546875,
0.0194549560546875,
0.041595458984375,
-0.0306243896484375,
0.0044403076171875,
0.00719451904296875,
0.02581787109375,
0.0190582275390625,
-0.035247802734375,
-0.009521484375,
0.0030574798583984375,
0.04571533203125,
0.01031494140625,
-0.0655517578125,
-0.036834716796875,
-0.0169219970703125,
0.03143310546875,
-0.030181884765625,
0.0638427734375,
-0.0079193115234375,
0.028472900390625,
-0.0218353271484375,
-0.0205535888671875,
0.01006317138671875,
-0.003345489501953125,
-0.02569580078125,
0.0178680419921875,
-0.003940582275390625,
-0.0167236328125,
-0.00005650520324707031,
0.0201416015625,
0.034759521484375,
-0.053436279296875,
0.03167724609375,
-0.017242431640625,
-0.0013055801391601562,
-0.04571533203125,
0.026519775390625,
-0.01381683349609375,
-0.017730712890625,
-0.05364990234375,
-0.00803375244140625,
0.05694580078125,
0.05303955078125,
-0.013153076171875,
0.025604248046875,
0.027252197265625,
-0.04022216796875,
0.0081024169921875,
-0.0323486328125,
0.0250244140625,
0.020599365234375,
0.034393310546875,
-0.032501220703125,
0.0438232421875,
0.0039043426513671875,
0.0024662017822265625,
0.018524169921875,
0.04034423828125,
0.0311126708984375,
-0.0435791015625,
0.0302581787109375,
0.03802490234375,
0.0267181396484375,
-0.0180816650390625,
0.0113067626953125,
0.04974365234375,
-0.0213623046875,
-0.0038967132568359375,
0.00481414794921875,
0.00672149658203125,
-0.023406982421875,
-0.0347900390625,
-0.00592803955078125,
-0.0250396728515625,
-0.0249176025390625,
-0.01348876953125,
-0.0301361083984375,
0.06683349609375,
0.0022563934326171875,
-0.017425537109375,
-0.05224609375,
-0.01222991943359375,
0.07147216796875,
0.01560211181640625,
-0.05682373046875,
0.0023479461669921875,
0.005645751953125,
-0.0070953369140625,
0.008941650390625,
-0.05133056640625,
-0.0150909423828125,
-0.017913818359375,
0.023834228515625,
0.033782958984375,
-0.026336669921875,
0.0290069580078125,
0.0134429931640625,
0.0153656005859375,
0.07977294921875,
-0.01244354248046875,
-0.007904052734375,
-0.0047607421875,
0.004589080810546875,
-0.0141448974609375,
-0.040740966796875,
0.00724029541015625,
-0.0255279541015625,
-0.0142974853515625,
-0.00446319580078125,
0.0291290283203125,
0.052642822265625,
-0.011138916015625,
-0.021759033203125,
0.08026123046875,
-0.0157318115234375,
-0.02362060546875,
-0.05120849609375,
-0.00823211669921875,
0.006076812744140625,
-0.01355743408203125,
-0.01340484619140625,
-0.0285797119140625,
-0.037139892578125,
0.03216552734375,
-0.001007080078125,
0.035888671875,
-0.00943756103515625,
0.006908416748046875,
-0.00255584716796875,
0.039154052734375,
0.03900146484375,
-0.00934600830078125,
0.006771087646484375,
-0.039276123046875,
0.0260772705078125,
0.01910400390625,
-0.053375244140625,
-0.01427459716796875,
0.0279541015625,
0.03399658203125,
-0.005306243896484375,
-0.0096435546875,
-0.037994384765625,
-0.01206207275390625,
0.06787109375,
0.0298309326171875,
0.034027099609375,
-0.0269927978515625,
0.019317626953125,
-0.0246734619140625,
-0.0784912109375,
-0.00897216796875,
0.02923583984375,
-0.0552978515625,
0.00250244140625,
0.00984954833984375,
-0.0264739990234375,
0.012176513671875,
-0.0207672119140625,
-0.048248291015625,
0.00730133056640625,
-0.00890350341796875,
0.0201416015625,
-0.04461669921875,
-0.012176513671875,
0.0098876953125,
-0.016754150390625,
-0.0194091796875,
0.005588531494140625,
-0.0087890625,
-0.03167724609375,
0.032196044921875,
-0.00032806396484375,
0.001399993896484375,
-0.0208740234375,
-0.0017490386962890625,
0.00760650634765625,
0.020233154296875,
0.0143280029296875,
-0.0207977294921875,
-0.0009546279907226562,
0.0289459228515625,
-0.01100921630859375,
0.052032470703125,
0.03240966796875,
-0.004596710205078125,
-0.003437042236328125,
0.02276611328125,
0.005405426025390625,
0.0321044921875,
-0.01389312744140625,
0.06427001953125,
-0.05108642578125,
-0.01348876953125,
-0.033782958984375,
-0.0518798828125,
0.0009984970092773438,
0.01053619384765625,
-0.02374267578125,
-0.00522613525390625,
0.011627197265625,
-0.0245513916015625,
-0.002704620361328125,
0.0098114013671875
] |
e247cd84d0d8265070e78169c9bf8b5a56852484
|
Wordpress Stackexchange
Q: Where is the content of widgets stored in mysql table I have the cPanel access to a website but no wordpress login info. So I wants to change a widget content in the website.
How can I change it through phpmyadmin. Where are that widgets sidebar data actually stored? Is it inside wp-options table?
A: Widget options are stored in the options table under 'sidebars_widgets' as a serialized array. See this post for a longer explanation.
Changing the field per PHPMyAdmin is not recommended, use PHP, get_option() and update_option() instead, WordPress will take care for correct serialization then.
|
Q: Where is the content of widgets stored in mysql table I have the cPanel access to a website but no wordpress login info. So I wants to change a widget content in the website.
How can I change it through phpmyadmin. Where are that widgets sidebar data actually stored? Is it inside wp-options table?
A: Widget options are stored in the options table under 'sidebars_widgets' as a serialized array. See this post for a longer explanation.
Changing the field per PHPMyAdmin is not recommended, use PHP, get_option() and update_option() instead, WordPress will take care for correct serialization then.
|
wordpress
|
{
"language": "en",
"length": 99,
"provenance": "stackexchange_00019.jsonl.gz:421733",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58116"
}
|
[
0.021087646484375,
-0.033233642578125,
-0.00910186767578125,
0.00954437255859375,
0.0008673667907714844,
-0.053741455078125,
0.09918212890625,
0.018524169921875,
0.03729248046875,
0.043701171875,
-0.0209197998046875,
-0.04150390625,
0.01318359375,
-0.01099395751953125,
-0.0694580078125,
-0.024658203125,
0.023193359375,
-0.008636474609375,
0.032989501953125,
0.005527496337890625,
0.0106658935546875,
0.019683837890625,
-0.0003235340118408203,
-0.0229949951171875,
0.021636962890625,
-0.029296875,
0.0367431640625,
-0.047943115234375,
0.0382080078125,
-0.01480865478515625,
0.035491943359375,
-0.00458526611328125,
0.04144287109375,
-0.02423095703125,
0.01447296142578125,
0.0183258056640625,
-0.0015649795532226562,
-0.0147857666015625,
-0.0017852783203125,
0.0224761962890625,
0.0335693359375,
-0.035736083984375,
0.03125,
0.00849151611328125,
0.01230621337890625,
-0.00457763671875,
0.0229339599609375,
-0.05426025390625,
0.0090484619140625,
-0.01335906982421875,
0.0285491943359375,
0.0035228729248046875,
0.04144287109375,
-0.0252838134765625,
-0.0203399658203125,
-0.00968170166015625,
0.0084686279296875,
-0.0227203369140625,
0.0276336669921875,
0.00027942657470703125,
-0.02288818359375,
-0.034637451171875,
0.0215301513671875,
-0.00823211669921875,
0.0005397796630859375,
-0.01447296142578125,
0.037139892578125,
0.0296630859375,
-0.0309600830078125,
-0.0008587837219238281,
0.03887939453125,
0.001491546630859375,
-0.005527496337890625,
-0.049072265625,
0.00927734375,
0.042724609375,
0.006824493408203125,
0.022247314453125,
-0.022216796875,
0.0014019012451171875,
0.01727294921875,
0.058074951171875,
-0.0246124267578125,
-0.0174407958984375,
-0.0021305084228515625,
-0.010986328125,
-0.019195556640625,
-0.023406982421875,
0.01248931884765625,
0.0555419921875,
-0.003925323486328125,
-0.0134735107421875,
0.059417724609375,
0.0269317626953125,
0.0014829635620117188,
-0.0323486328125,
-0.0010223388671875,
0.0167388916015625,
-0.008575439453125,
0.03271484375,
-0.01422882080078125,
-0.018829345703125,
0.050537109375,
-0.041839599609375,
0.0087738037109375,
-0.0023784637451171875,
-0.0180816650390625,
-0.00927734375,
0.0345458984375,
0.036529541015625,
-0.0215606689453125,
0.005764007568359375,
-0.00991058349609375,
-0.037109375,
-0.01554107666015625,
0.0604248046875,
0.00621795654296875,
0.01313018798828125,
0.023101806640625,
0.0389404296875,
-0.0209197998046875,
-0.00634765625,
-0.001983642578125,
-0.032867431640625,
0.00365447998046875,
-0.04534912109375,
-0.0323486328125,
0.0309906005859375,
-0.06536865234375,
0.05755615234375,
-0.03265380859375,
-0.0148773193359375,
0.04840087890625,
0.06646728515625,
0.01302337646484375,
-0.026580810546875,
0.0565185546875,
-0.01239013671875,
0.00737762451171875,
0.04132080078125,
-0.0148162841796875,
-0.058990478515625,
-0.0084228515625,
-0.025909423828125,
0.030242919921875,
0.030609130859375,
0.03570556640625,
0.005451202392578125,
-0.02191162109375,
-0.0270843505859375,
-0.0165863037109375,
0.0340576171875,
0.0022373199462890625,
0.037872314453125,
0.029327392578125,
0.0147247314453125,
0.06982421875,
-0.0259857177734375,
-0.0263824462890625,
-0.037445068359375,
-0.031982421875,
-0.0313720703125,
0.0130767822265625,
-0.0218505859375,
-0.026763916015625,
0.045654296875,
-0.01160430908203125,
0.007541656494140625,
0.01245880126953125,
0.01629638671875,
-0.030303955078125,
-0.0299224853515625,
-0.0175018310546875,
0.0158843994140625,
0.0002796649932861328,
0.042633056640625,
-0.0209503173828125,
-0.01201629638671875,
0.0271453857421875,
0.004795074462890625,
-0.01568603515625,
-0.032257080078125,
0.00333404541015625,
0.010986328125,
-0.0167999267578125,
0.015045166015625,
0.0110931396484375,
0.04998779296875,
0.01529693603515625,
0.0322265625,
-0.0357666015625,
-0.006526947021484375,
-0.10052490234375,
0.0256500244140625,
0.0169219970703125,
0.0221099853515625,
-0.01441192626953125,
0.00555419921875,
0.007709503173828125,
-0.03192138671875,
0.01306915283203125,
0.010894775390625,
0.005222320556640625,
0.005512237548828125,
-0.0295562744140625,
-0.001712799072265625,
-0.00003916025161743164,
0.016204833984375,
0.03192138671875,
0.042388916015625,
-0.0158843994140625,
0.0178680419921875,
-0.0044403076171875,
-0.0207977294921875,
-0.040313720703125,
-0.0207061767578125,
0.0112762451171875,
0.08758544921875,
0.0174407958984375,
0.05645751953125,
-0.00994873046875,
-0.0394287109375,
0.0012531280517578125,
-0.00901031494140625,
0.051727294921875,
-0.00496673583984375,
0.007061004638671875,
-0.01983642578125,
0.061737060546875,
-0.0004572868347167969,
-0.0212554931640625,
0.0091705322265625,
-0.01540374755859375,
-0.020904541015625,
-0.0281524658203125,
-0.0068817138671875,
-0.0237884521484375,
-0.05120849609375,
-0.003326416015625,
0.04632568359375,
0.0384521484375,
0.031951904296875,
-0.0228271484375,
0.0225372314453125,
0.00955963134765625,
-0.08514404296875,
-0.0030231475830078125,
0.0110321044921875,
0.01541900634765625,
0.039886474609375,
-0.0160980224609375,
-0.012359619140625,
0.01226043701171875,
-0.01708984375,
0.0050048828125,
0.0179290771484375,
-0.0286102294921875,
0.0185394287109375,
-0.00716400146484375,
0.022369384765625,
-0.02362060546875,
-0.0201416015625,
0.0288848876953125,
-0.0328369140625,
0.031768798828125,
0.024444580078125,
0.051055908203125,
0.0433349609375,
-0.01015472412109375,
0.0140533447265625,
-0.01142120361328125,
-0.023040771484375,
0.005626678466796875,
0.00852203369140625,
-0.0007696151733398438,
0.008575439453125,
-0.01282501220703125,
-0.0138397216796875,
0.018707275390625,
-0.004421234130859375,
-0.0100250244140625,
0.023895263671875,
-0.060302734375,
-0.008514404296875,
-0.042144775390625,
-0.07421875,
0.00311279296875,
0.05511474609375,
0.029388427734375,
0.0137939453125,
0.021514892578125,
0.045074462890625,
0.01436614990234375,
0.040771484375,
0.00970458984375,
-0.01485443115234375,
0.074462890625,
0.0243988037109375,
-0.00957489013671875,
0.0298919677734375,
0.042999267578125,
0.0372314453125,
0.022796630859375,
-0.036041259765625,
0.015411376953125,
0.004314422607421875,
0.0108489990234375,
0.0341796875,
0.032257080078125,
0.0211181640625,
-0.051727294921875,
0.0254058837890625,
0.002017974853515625,
-0.002559661865234375,
-0.00893402099609375,
-0.0379638671875,
-0.01438140869140625,
0.00116729736328125,
-0.060791015625,
-0.05938720703125,
-0.026641845703125,
-0.038116455078125,
-0.0374755859375,
-0.01021575927734375,
-0.0295257568359375,
0.033355712890625,
0.0061492919921875,
-0.003612518310546875,
-0.02459716796875,
-0.00901031494140625,
-0.04742431640625,
-0.03131103515625,
-0.04254150390625,
0.018890380859375,
-0.01030731201171875,
0.03466796875,
0.0012636184692382812,
0.038238525390625,
-0.017852783203125,
-0.07659912109375,
-0.044189453125,
-0.022308349609375,
-0.023040771484375,
-0.0056915283203125,
0.00270843505859375,
-0.01702880859375,
0.00266265869140625,
0.00039649009704589844,
0.0364990234375,
0.00916290283203125,
-0.023162841796875,
0.00006073713302612305,
0.01560211181640625,
0.01369476318359375,
0.029510498046875,
-0.0222625732421875,
-0.0206146240234375,
0.0055389404296875,
-0.0026760101318359375,
-0.0404052734375,
-0.0178985595703125,
0.0274658203125,
-0.0214080810546875,
-0.012054443359375,
-0.0018711090087890625,
-0.0184326171875,
0.004993438720703125,
0.0036468505859375,
0.019195556640625,
-0.0070343017578125,
-0.0005412101745605469,
-0.018463134765625,
0.01070404052734375,
0.0109710693359375,
0.0102386474609375,
0.01401519775390625,
0.017333984375,
-0.0235443115234375,
0.004329681396484375,
0.0086669921875,
-0.005767822265625,
-0.007617950439453125,
0.017608642578125,
-0.0296783447265625,
-0.0660400390625,
0.02667236328125,
-0.028228759765625,
0.02886962890625,
-0.0264129638671875,
-0.01407623291015625,
0.02325439453125,
0.10919189453125,
-0.0662841796875,
0.0005750656127929688,
0.0164947509765625,
0.0233154296875,
-0.0751953125,
-0.0531005859375,
-0.080810546875,
0.0016460418701171875,
-0.04425048828125,
-0.0178985595703125,
0.01556396484375,
-0.037567138671875,
-0.0204315185546875,
-0.0009813308715820312,
-0.04827880859375,
-0.01247406005859375,
0.0268402099609375,
-0.02105712890625,
0.06060791015625,
-0.0128326416015625,
0.050506591796875,
-0.0170440673828125,
0.0113372802734375,
-0.041778564453125,
-0.0780029296875,
-0.00787353515625,
-0.034820556640625,
0.0665283203125,
0.05743408203125,
-0.0634765625,
-0.00960540771484375,
0.0335693359375,
-0.018585205078125,
-0.036041259765625,
0.0206146240234375,
0.0506591796875,
-0.019195556640625,
-0.050140380859375,
-0.01023101806640625,
-0.055328369140625,
-0.02587890625,
-0.04681396484375,
-0.0017042160034179688,
-0.017486572265625,
-0.018585205078125,
0.009918212890625,
0.002197265625,
-0.0009365081787109375,
-0.010955810546875,
-0.02227783203125,
-0.01151275634765625,
0.0421142578125,
-0.044281005859375,
0.054962158203125,
-0.0194244384765625,
-0.0298004150390625,
0.043182373046875,
-0.01555633544921875,
-0.00373077392578125,
0.027313232421875,
0.073486328125,
0.0118255615234375,
-0.0287017822265625,
-0.0751953125,
-0.05145263671875,
0.046356201171875,
-0.0002734661102294922,
0.0265350341796875,
0.054443359375,
-0.0236968994140625,
0.017364501953125,
0.02960205078125,
-0.01393890380859375,
0.0029354095458984375,
0.08404541015625,
0.02386474609375,
0.031463623046875,
-0.0250701904296875,
-0.0124053955078125,
-0.0296783447265625,
0.0180511474609375,
-0.0164031982421875,
0.007305145263671875,
0.019927978515625,
0.00789642333984375,
-0.0230865478515625,
-0.01128387451171875,
-0.0224456787109375,
-0.0304718017578125,
0.0035305023193359375,
-0.03424072265625,
0.05804443359375,
0.00911712646484375,
0.0081634521484375,
0.0197906494140625,
0.0357666015625,
-0.0184478759765625,
0.02838134765625,
-0.01158905029296875,
0.00937652587890625,
0.01335906982421875,
0.0263824462890625,
-0.005214691162109375,
0.0283203125,
0.00598907470703125,
0.0189208984375,
-0.0069122314453125,
-0.043060302734375,
0.002498626708984375,
-0.0005578994750976562,
-0.0009822845458984375,
0.044708251953125,
0.0305328369140625,
-0.003124237060546875,
0.0162200927734375,
-0.023712158203125,
-0.01052093505859375,
0.0269317626953125,
0.0223541259765625,
-0.0203857421875,
0.0013437271118164062,
-0.0235595703125,
-0.0015773773193359375,
-0.022674560546875,
0.05181884765625,
-0.01715087890625,
0.003742218017578125,
-0.01507568359375,
0.054840087890625,
0.046844482421875,
0.03759765625,
0.014801025390625,
0.0029544830322265625,
0.0087127685546875,
-0.0042266845703125,
-0.0026836395263671875,
-0.043792724609375,
0.021087646484375,
0.005077362060546875,
0.029205322265625,
0.0156707763671875,
-0.01361846923828125,
0.031341552734375,
-0.0176849365234375,
0.00995635986328125,
0.0401611328125,
-0.0185394287109375,
-0.0716552734375,
0.01459503173828125,
0.02294921875,
0.016265869140625,
-0.07147216796875,
-0.006427764892578125,
-0.031890869140625,
-0.09674072265625,
-0.0191802978515625,
0.0135955810546875,
0.0032958984375,
-0.0293426513671875,
-0.055816650390625,
-0.035980224609375,
-0.021514892578125,
-0.01543426513671875,
-0.040802001953125,
-0.0282745361328125,
0.01171112060546875,
0.0024566650390625,
-0.00925445556640625,
-0.0174713134765625,
0.028717041015625,
-0.01104736328125,
-0.016754150390625,
-0.04217529296875,
0.019927978515625,
0.0192108154296875,
0.002025604248046875,
-0.053924560546875,
0.000021576881408691406,
-0.01026153564453125,
-0.00609588623046875,
-0.00966644287109375,
-0.0386962890625,
-0.06317138671875,
-0.03704833984375,
0.00930023193359375,
0.0245819091796875,
-0.0231781005859375,
-0.0280303955078125,
-0.01491546630859375,
-0.0029773712158203125,
0.01132965087890625,
0.031707763671875,
-0.021392822265625,
0.1097412109375,
-0.032867431640625,
0.0828857421875,
-0.00157928466796875,
0.046173095703125,
-0.041046142578125,
-0.006427764892578125,
0.044891357421875,
-0.0202789306640625,
-0.054107666015625,
-0.06195068359375,
-0.0169525146484375,
-0.010894775390625,
0.0132598876953125,
-0.023406982421875,
0.034576416015625,
-0.015289306640625,
-0.0096893310546875,
0.0136566162109375,
0.031768798828125,
-0.006832122802734375,
0.039703369140625,
0.046478271484375,
-0.01216888427734375,
-0.0121002197265625,
-0.01165771484375,
-0.011749267578125,
0.00748443603515625,
0.01439666748046875,
-0.0094451904296875,
0.01226806640625,
-0.09130859375,
0.0833740234375,
0.07537841796875,
0.036590576171875,
0.061553955078125,
-0.0205230712890625,
0.024444580078125,
0.0115509033203125,
0.00775146484375,
-0.033294677734375,
-0.00818634033203125,
0.0628662109375,
0.005245208740234375,
-0.04327392578125,
0.037078857421875,
-0.035400390625,
0.0232391357421875,
0.05145263671875,
0.07220458984375,
-0.07177734375,
0.016632080078125,
0.0195770263671875,
-0.007259368896484375,
0.005214691162109375,
0.0232696533203125,
-0.060150146484375,
-0.046539306640625,
0.0134124755859375,
-0.010833740234375,
-0.0240936279296875,
-0.004695892333984375,
0.03240966796875,
-0.0159454345703125,
0.01360321044921875,
0.02459716796875,
-0.00235748291015625,
-0.00572967529296875,
-0.04156494140625,
0.0179595947265625,
-0.00363922119140625,
-0.0033054351806640625,
0.00875091552734375,
0.0131378173828125,
-0.01287078857421875,
-0.045074462890625,
0.0219573974609375,
0.0029850006103515625,
-0.02691650390625,
-0.00998687744140625,
-0.016876220703125,
0.0712890625,
0.052642822265625,
-0.0106658935546875,
0.00432586669921875,
-0.000865936279296875,
0.040313720703125,
0.00946044921875,
0.0015630722045898438,
-0.0013322830200195312,
0.03546142578125,
-0.0142059326171875,
0.018310546875,
-0.0279693603515625,
-0.00307464599609375,
-0.0171966552734375,
-0.0282440185546875,
0.06866455078125,
-0.06512451171875,
0.007099151611328125,
0.0193328857421875,
0.0254974365234375,
0.003704071044921875,
-0.025146484375,
0.030242919921875,
-0.050567626953125,
0.006954193115234375,
-0.007282257080078125,
0.00029087066650390625,
-0.0088958740234375,
-0.0271759033203125,
-0.04083251953125,
0.09979248046875,
0.0002818107604980469,
-0.00814056396484375,
0.03857421875,
0.049468994140625,
-0.07049560546875,
0.0033664703369140625,
-0.017974853515625,
0.007091522216796875,
0.0006580352783203125,
0.02569580078125,
-0.0160369873046875,
0.00801849365234375,
0.00036787986755371094,
0.005466461181640625,
0.0748291015625,
0.0204620361328125,
0.00022077560424804688,
-0.0240478515625,
0.0257568359375,
0.0374755859375,
-0.00930023193359375,
0.0251617431640625,
-0.0001989603042602539,
0.03985595703125,
0.04541015625,
-0.0183258056640625,
0.0364990234375,
-0.0017223358154296875,
-0.01177215576171875,
0.02520751953125,
0.01318359375,
0.0187835693359375,
-0.045623779296875,
0.0149383544921875,
0.062103271484375,
-0.05029296875,
-0.0298309326171875,
-0.034515380859375,
-0.0246734619140625,
0.0743408203125,
0.0576171875,
-0.014556884765625,
-0.013092041015625,
-0.0347900390625,
0.060333251953125,
0.010345458984375,
0.041595458984375,
-0.02294921875,
0.01517486572265625,
0.0164947509765625,
-0.0020580291748046875,
0.0069732666015625,
0.04791259765625,
-0.0531005859375,
0.032073974609375,
0.0460205078125,
0.032928466796875,
-0.009674072265625,
0.044769287109375,
0.013641357421875,
0.0455322265625,
-0.050537109375,
-0.0297393798828125,
0.0189056396484375,
0.0293426513671875,
-0.0173797607421875,
0.0205841064453125,
0.00963592529296875,
-0.00036787986755371094,
0.04339599609375,
0.004802703857421875,
-0.027191162109375,
0.0043487548828125,
0.018463134765625,
-0.0016698837280273438,
0.01898193359375,
0.0119476318359375,
-0.033660888671875,
0.00014162063598632812,
-0.00948333740234375,
-0.01447296142578125,
0.0225677490234375,
0.022918701171875,
-0.0080108642578125,
-0.0160980224609375,
0.0100250244140625,
-0.0261383056640625,
-0.01396942138671875,
-0.030914306640625,
0.048004150390625,
-0.07647705078125,
-0.050750732421875,
0.02716064453125,
0.066650390625,
-0.007511138916015625,
0.029876708984375,
0.01218414306640625,
0.035369873046875,
-0.005100250244140625,
0.0017766952514648438,
0.05059814453125,
-0.010589599609375,
0.034637451171875,
-0.037933349609375,
0.047821044921875,
0.0279083251953125,
0.01192474365234375,
-0.048248291015625,
0.04742431640625,
0.046783447265625,
0.000698089599609375,
0.043792724609375,
0.003932952880859375,
0.03570556640625,
0.07220458984375,
-0.01971435546875,
0.00536346435546875,
0.01332855224609375,
-0.02191162109375,
-0.0175323486328125,
0.0300140380859375,
-0.0292816162109375,
-0.04486083984375,
0.0240478515625,
-0.00928497314453125,
-0.0072784423828125,
-0.010955810546875,
-0.0133056640625,
-0.0309295654296875,
-0.0006108283996582031,
0.0345458984375,
0.02911376953125,
0.00528717041015625,
0.0262298583984375,
-0.05267333984375,
-0.006671905517578125,
0.00748443603515625,
0.011871337890625,
0.01258087158203125,
0.0006422996520996094,
0.0298614501953125,
0.03271484375,
-0.025360107421875,
0.010528564453125,
-0.01549530029296875,
-0.0268707275390625,
0.0372314453125,
0.0090484619140625,
0.002712249755859375,
-0.0160369873046875,
0.01271820068359375,
0.00031685829162597656,
0.046630859375,
-0.04388427734375,
0.004913330078125,
-0.041015625,
0.0238037109375,
-0.03607177734375,
-0.005889892578125,
-0.018218994140625,
-0.001956939697265625,
0.035888671875,
0.016448974609375,
0.0190277099609375,
0.0003681182861328125,
-0.0025424957275390625,
0.0203857421875,
0.0189056396484375,
0.00946807861328125,
0.028778076171875,
-0.00316619873046875,
0.0340576171875,
0.03082275390625,
-0.0167083740234375,
-0.0171051025390625,
0.014495849609375,
-0.01332855224609375,
0.0181884765625,
0.01264190673828125,
0.03076171875,
0.036163330078125,
0.0056304931640625,
0.01322174072265625,
0.020660400390625,
0.02752685546875,
-0.01548004150390625,
0.01194000244140625,
-0.0031585693359375,
-0.00518798828125,
0.033203125,
0.0323486328125,
-0.0200347900390625,
-0.040252685546875,
-0.0282440185546875,
0.01447296142578125,
-0.03924560546875,
-0.00881195068359375,
-0.0653076171875,
0.01322174072265625,
0.036773681640625,
0.0258941650390625,
-0.0771484375,
0.02593994140625,
-0.0087127685546875,
0.0222625732421875,
0.0174407958984375,
-0.007175445556640625,
0.01386260986328125,
0.03643798828125,
-0.0265045166015625,
0.01082611083984375,
-0.0174560546875,
-0.035125732421875,
0.004032135009765625,
0.01258087158203125,
0.00677490234375,
-0.0022258758544921875,
0.02685546875,
0.0131988525390625,
-0.01032257080078125,
0.07159423828125,
-0.00978851318359375,
0.0124664306640625,
0.0692138671875,
0.00844573974609375,
-0.0328369140625,
-0.06744384765625,
-0.038421630859375,
0.0225372314453125,
0.053070068359375,
-0.04833984375,
0.01073455810546875,
-0.0054168701171875,
-0.05157470703125,
-0.0396728515625,
0.0230560302734375,
-0.004302978515625,
-0.0173797607421875,
-0.0003693103790283203,
-0.00984954833984375,
-0.03314208984375,
0.01690673828125,
-0.00048089027404785156,
-0.0361328125,
-0.0235137939453125,
0.03265380859375,
0.0228729248046875,
0.001262664794921875,
0.0250701904296875,
0.0014057159423828125,
-0.12042236328125,
-0.018096923828125,
-0.043701171875,
0.06072998046875,
0.00435638427734375,
-0.02703857421875,
0.018707275390625,
0.03289794921875,
-0.042816162109375,
-0.0401611328125,
0.005023956298828125,
0.0082244873046875,
0.0019989013671875,
-0.03802490234375,
-0.0286712646484375,
-0.00569915771484375,
0.08416748046875,
0.033782958984375,
0.0255279541015625,
-0.032470703125,
-0.0126800537109375,
-0.001697540283203125,
-0.040557861328125,
-0.0016326904296875,
0.032501220703125,
-0.0606689453125,
-0.012451171875,
0.005832672119140625,
-0.0176239013671875,
0.03643798828125,
0.03143310546875,
-0.01074981689453125,
0.02655029296875,
0.076171875,
-0.0181884765625,
-0.039093017578125,
-0.0105743408203125,
0.0237884521484375,
-0.0100250244140625,
0.0261383056640625,
-0.011444091796875,
0.01346588134765625,
0.0247955322265625,
0.0236358642578125,
-0.0247650146484375,
-0.03558349609375,
-0.0167999267578125,
0.032745361328125,
-0.02728271484375,
0.036376953125,
-0.027923583984375,
-0.01459503173828125,
-0.026641845703125,
0.0151214599609375,
-0.0192413330078125,
0.0019683837890625,
0.0277862548828125,
0.0281829833984375,
0.01108551025390625,
0.06695556640625,
-0.0241546630859375,
-0.008697509765625,
-0.014068603515625,
0.045989990234375,
0.007297515869140625,
-0.02215576171875,
0.050018310546875,
-0.02716064453125,
0.008514404296875,
-0.0389404296875,
0.013214111328125,
-0.055877685546875,
0.005168914794921875,
-0.00948333740234375,
-0.0120697021484375,
0.0189208984375
] |
84055f4c85519a041422e7d5f4ad613044939598
|
Wordpress Stackexchange
Q: Why is get_post_format() for "Standard" returns empty I've enabled custom posts types
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) );
The default post type is set on Standard, and it works for all but the Standard type, when I have a standard post the get_post_format() return empty. did I miss something in enabling them?
A: Because "Standard" is not a format itself - it simply implies that the post has no formats.
...which is somewhat deceptive, given it's listed in the Format meta-box as a format to choose
I think "standard" quite clearly implies what it means. If you're creating a site in which a post is never "standard", then fallback to a default:
if ( ! $format = get_post_format() )
$format = 'gallery';
Alternatively, hook onto wp_insert_post and enforce a format if one has not already been set.
function wpse_58121_set_default_format( $post_id ) {
if ( ! get_post_format( $post_id ) )
set_post_format( $post_id, 'gallery' );
}
|
Q: Why is get_post_format() for "Standard" returns empty I've enabled custom posts types
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) );
The default post type is set on Standard, and it works for all but the Standard type, when I have a standard post the get_post_format() return empty. did I miss something in enabling them?
A: Because "Standard" is not a format itself - it simply implies that the post has no formats.
...which is somewhat deceptive, given it's listed in the Format meta-box as a format to choose
I think "standard" quite clearly implies what it means. If you're creating a site in which a post is never "standard", then fallback to a default:
if ( ! $format = get_post_format() )
$format = 'gallery';
Alternatively, hook onto wp_insert_post and enforce a format if one has not already been set.
function wpse_58121_set_default_format( $post_id ) {
if ( ! get_post_format( $post_id ) )
set_post_format( $post_id, 'gallery' );
}
|
wordpress
|
{
"language": "en",
"length": 160,
"provenance": "stackexchange_00019.jsonl.gz:421736",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58121"
}
|
[
0.0045623779296875,
-0.005542755126953125,
-0.03900146484375,
-0.0025081634521484375,
0.01401519775390625,
-0.0399169921875,
0.0635986328125,
0.0018301010131835938,
-0.0253143310546875,
-0.0180511474609375,
-0.0224151611328125,
0.0034732818603515625,
-0.05377197265625,
-0.033447265625,
0.017974853515625,
-0.054046630859375,
0.0443115234375,
-0.01090240478515625,
0.038665771484375,
-0.002635955810546875,
0.0256500244140625,
0.0207366943359375,
0.01605224609375,
0.06634521484375,
0.01537322998046875,
0.002628326416015625,
0.041412353515625,
0.018218994140625,
0.0105743408203125,
0.0115509033203125,
0.029052734375,
-0.048187255859375,
0.00945281982421875,
0.0295562744140625,
-0.0186614990234375,
0.02996826171875,
0.02630615234375,
-0.0034427642822265625,
-0.0022335052490234375,
0.050018310546875,
-0.00748443603515625,
0.00925445556640625,
0.0211639404296875,
-0.04217529296875,
-0.02581787109375,
0.01351165771484375,
-0.0372314453125,
-0.01154327392578125,
0.0205078125,
-0.00778961181640625,
-0.0025081634521484375,
-0.0311126708984375,
0.021697998046875,
-0.04888916015625,
-0.0258941650390625,
-0.040374755859375,
-0.0035228729248046875,
0.002140045166015625,
0.034027099609375,
-0.021453857421875,
-0.030853271484375,
-0.019317626953125,
0.023773193359375,
-0.01360321044921875,
0.019317626953125,
0.016143798828125,
0.0235137939453125,
0.033111572265625,
-0.008758544921875,
0.01557159423828125,
0.007167816162109375,
-0.0308837890625,
0.0132598876953125,
-0.01198577880859375,
-0.033203125,
-0.0162811279296875,
-0.01514434814453125,
-0.040069580078125,
0.043792724609375,
-0.011505126953125,
0.003383636474609375,
0.0036830902099609375,
-0.03839111328125,
-0.0293731689453125,
0.022552490234375,
-0.01389312744140625,
-0.015869140625,
-0.01763916015625,
-0.020477294921875,
-0.0189666748046875,
-0.0136260986328125,
-0.08270263671875,
0.0003223419189453125,
0.017791748046875,
0.00949859619140625,
-0.035736083984375,
0.0074920654296875,
0.05633544921875,
-0.015899658203125,
0.0206756591796875,
-0.005893707275390625,
-0.03070068359375,
0.035247802734375,
-0.044952392578125,
0.005756378173828125,
0.005344390869140625,
-0.0081329345703125,
-0.03167724609375,
0.0183563232421875,
0.0253753662109375,
-0.01549530029296875,
0.0259552001953125,
0.0172576904296875,
0.01219940185546875,
-0.039520263671875,
-0.01995849609375,
-0.0227203369140625,
0.0029888153076171875,
-0.00982666015625,
-0.00801849365234375,
0.035003662109375,
0.06396484375,
0.0323486328125,
-0.06585693359375,
-0.0241241455078125,
-0.004840850830078125,
-0.032684326171875,
-0.0814208984375,
-0.0213775634765625,
0.025848388671875,
-0.031951904296875,
-0.0081787109375,
0.06585693359375,
0.0457763671875,
0.0136871337890625,
-0.024169921875,
0.0309906005859375,
-0.0615234375,
-0.049407958984375,
0.03955078125,
0.00691986083984375,
-0.028717041015625,
0.004638671875,
-0.004985809326171875,
0.0120697021484375,
0.0176849365234375,
0.032379150390625,
0.025482177734375,
-0.0119476318359375,
-0.0386962890625,
0.00846099853515625,
0.02264404296875,
0.031494140625,
0.006092071533203125,
0.0007157325744628906,
-0.01483154296875,
0.02960205078125,
-0.0150146484375,
-0.03070068359375,
-0.04254150390625,
-0.00183868408203125,
-0.01058197021484375,
-0.00786590576171875,
-0.0372314453125,
-0.057769775390625,
0.0167694091796875,
-0.0179290771484375,
-0.0159912109375,
0.0197296142578125,
0.0219879150390625,
0.0012054443359375,
-0.00402069091796875,
0.0084228515625,
0.01398468017578125,
-0.007694244384765625,
0.01373291015625,
-0.0330810546875,
-0.0242462158203125,
0.020965576171875,
0.062225341796875,
-0.0062713623046875,
-0.03106689453125,
-0.023193359375,
0.01898193359375,
-0.044525146484375,
0.032867431640625,
0.0164642333984375,
0.0535888671875,
0.00907135009765625,
0.01203155517578125,
0.0023193359375,
0.041412353515625,
-0.0516357421875,
-0.0214385986328125,
0.01273345947265625,
0.0172119140625,
-0.0313720703125,
-0.01294708251953125,
-0.0031490325927734375,
0.0139923095703125,
-0.006710052490234375,
-0.0136566162109375,
-0.0007090568542480469,
0.00988006591796875,
-0.059600830078125,
-0.02398681640625,
-0.01904296875,
0.0181121826171875,
-0.050872802734375,
-0.006084442138671875,
0.060943603515625,
-0.01910400390625,
-0.0565185546875,
0.0557861328125,
-0.00756072998046875,
0.0169525146484375,
0.0120849609375,
0.02239990234375,
-0.027099609375,
0.0270843505859375,
-0.045013427734375,
-0.03594970703125,
-0.04241943359375,
0.039764404296875,
0.022705078125,
0.00600433349609375,
-0.011077880859375,
-0.0086822509765625,
0.029144287109375,
0.0167694091796875,
0.0013265609741210938,
0.014984130859375,
0.0268096923828125,
0.00016021728515625,
-0.03912353515625,
-0.0016689300537109375,
0.0263824462890625,
-0.039520263671875,
0.00768280029296875,
0.039306640625,
0.0217132568359375,
-0.00017333030700683594,
-0.01165771484375,
0.01555633544921875,
0.0665283203125,
0.01261138916015625,
0.00803375244140625,
0.0020294189453125,
0.0093231201171875,
0.045928955078125,
-0.034332275390625,
0.0169677734375,
0.0224456787109375,
-0.031524658203125,
-0.0153656005859375,
0.06646728515625,
-0.0157928466796875,
-0.01122283935546875,
0.0281219482421875,
0.0081634521484375,
-0.002330780029296875,
-0.001628875732421875,
-0.0047454833984375,
-0.0032100677490234375,
0.051300048828125,
0.021636962890625,
0.02850341796875,
0.0183258056640625,
-0.046112060546875,
0.033660888671875,
0.008331298828125,
-0.03753662109375,
0.001544952392578125,
0.0274505615234375,
0.0227813720703125,
0.0051727294921875,
-0.03240966796875,
-0.00824737548828125,
0.009765625,
0.00698089599609375,
-0.0016613006591796875,
0.0457763671875,
0.003032684326171875,
-0.02288818359375,
0.01529693603515625,
-0.076904296875,
-0.0120697021484375,
-0.0078125,
0.0179443359375,
-0.04815673828125,
0.0003578662872314453,
0.016082763671875,
-0.018280029296875,
0.03668212890625,
-0.01123046875,
-0.0428466796875,
-0.052825927734375,
-0.0684814453125,
0.05841064453125,
-0.07867431640625,
0.0241546630859375,
0.07073974609375,
-0.016815185546875,
0.0144805908203125,
0.00537872314453125,
0.00830078125,
0.006855010986328125,
0.0231781005859375,
-0.004245758056640625,
-0.041778564453125,
-0.028289794921875,
-0.0277862548828125,
0.02728271484375,
0.09326171875,
-0.037933349609375,
-0.041290283203125,
-0.0088348388671875,
0.0384521484375,
-0.032257080078125,
-0.0139007568359375,
0.0018787384033203125,
-0.081298828125,
-0.0095672607421875,
-0.0584716796875,
-0.047698974609375,
0.0099945068359375,
-0.0621337890625,
0.01119232177734375,
0.014556884765625,
-0.01554107666015625,
-0.03936767578125,
-0.055633544921875,
-0.076904296875,
-0.067626953125,
-0.007534027099609375,
0.006633758544921875,
0.01444244384765625,
0.081787109375,
0.032257080078125,
-0.022613525390625,
0.0265350341796875,
0.02593994140625,
-0.037322998046875,
0.00420379638671875,
0.001556396484375,
0.0265960693359375,
0.040283203125,
0.00748443603515625,
-0.005512237548828125,
0.036773681640625,
-0.024139404296875,
-0.038604736328125,
-0.018341064453125,
-0.045257568359375,
0.007053375244140625,
0.0236968994140625,
0.004459381103515625,
-0.00994873046875,
0.048583984375,
-0.046783447265625,
-0.0242919921875,
-0.01532745361328125,
-0.038909912109375,
0.08056640625,
0.01019287109375,
-0.0029144287109375,
0.022216796875,
0.03790283203125,
-0.0479736328125,
-0.003429412841796875,
0.0303802490234375,
-0.0760498046875,
0.050201416015625,
-0.0160064697265625,
-0.0377197265625,
-0.0121002197265625,
0.0140838623046875,
-0.0181427001953125,
0.02105712890625,
0.0111846923828125,
-0.00678253173828125,
0.01169586181640625,
-0.0206298828125,
-0.0008935928344726562,
-0.07830810546875,
0.04791259765625,
-0.03338623046875,
-0.004032135009765625,
-0.035247802734375,
-0.0037555694580078125,
0.00333404541015625,
0.09088134765625,
-0.0638427734375,
-0.0020465850830078125,
-0.01239013671875,
0.01216888427734375,
-0.006195068359375,
-0.08544921875,
-0.02734375,
-0.0231475830078125,
-0.06524658203125,
0.0148468017578125,
-0.0189361572265625,
-0.01329803466796875,
-0.0023746490478515625,
-0.0264892578125,
-0.03265380859375,
-0.055572509765625,
0.0238189697265625,
-0.0017070770263671875,
0.005077362060546875,
-0.0005807876586914062,
-0.0072784423828125,
-0.027191162109375,
0.00955963134765625,
-0.019439697265625,
-0.1026611328125,
-0.03778076171875,
0.0413818359375,
0.064453125,
-0.015716552734375,
-0.0516357421875,
-0.0152740478515625,
0.060028076171875,
0.01276397705078125,
-0.031219482421875,
0.01192474365234375,
-0.002323150634765625,
-0.019622802734375,
-0.0113525390625,
-0.00823974609375,
-0.03216552734375,
-0.03521728515625,
-0.0191650390625,
-0.024322509765625,
0.041534423828125,
0.0035114288330078125,
0.0261077880859375,
0.0210113525390625,
-0.00701141357421875,
-0.0299224853515625,
-0.019927978515625,
-0.00746917724609375,
0.0230712890625,
-0.0168914794921875,
0.0203704833984375,
-0.04766845703125,
-0.04083251953125,
0.035736083984375,
0.0184173583984375,
-0.006778717041015625,
0.0021209716796875,
0.08465576171875,
0.0120697021484375,
-0.02667236328125,
-0.0518798828125,
0.0174102783203125,
0.03619384765625,
0.00848388671875,
0.0231170654296875,
0.00957489013671875,
-0.03143310546875,
0.040740966796875,
0.02496337890625,
-0.0027713775634765625,
-0.03118896484375,
0.070556640625,
-0.01202392578125,
-0.0294647216796875,
0.0233306884765625,
-0.044586181640625,
0.0165863037109375,
0.041534423828125,
0.007228851318359375,
-0.0242767333984375,
0.01459503173828125,
0.021728515625,
-0.0027446746826171875,
-0.0088348388671875,
-0.0134124755859375,
0.019500732421875,
-0.003498077392578125,
0.0294647216796875,
0.020111083984375,
-0.00025343894958496094,
0.0158538818359375,
-0.045074462890625,
-0.0148468017578125,
-0.0023288726806640625,
0.034210205078125,
0.042083740234375,
0.033355712890625,
0.03564453125,
0.043548583984375,
0.006450653076171875,
-0.00991058349609375,
-0.006793975830078125,
-0.006168365478515625,
-0.0034847259521484375,
-0.033111572265625,
-0.0240478515625,
0.00989532470703125,
0.0228424072265625,
0.01082611083984375,
0.0082244873046875,
0.025115966796875,
0.048492431640625,
-0.045074462890625,
-0.03607177734375,
0.0278778076171875,
0.034698486328125,
-0.0628662109375,
0.0160675048828125,
0.0212860107421875,
-0.0103607177734375,
0.0379638671875,
0.03961181640625,
0.01555633544921875,
0.0294342041015625,
-0.0193328857421875,
-0.01441192626953125,
-0.01241302490234375,
0.0604248046875,
0.018768310546875,
-0.01910400390625,
-0.00223541259765625,
0.04730224609375,
0.027801513671875,
-0.019287109375,
-0.022216796875,
0.0008692741394042969,
0.031982421875,
-0.0118865966796875,
0.00478363037109375,
0.029876708984375,
-0.00592041015625,
-0.018096923828125,
0.0037975311279296875,
-0.019561767578125,
-0.0401611328125,
-0.0145111083984375,
0.040496826171875,
0.045562744140625,
-0.00957489013671875,
-0.0230712890625,
0.041290283203125,
-0.00379180908203125,
0.042236328125,
-0.02972412109375,
-0.036956787109375,
0.027252197265625,
0.04736328125,
-0.0042724609375,
-0.0172119140625,
0.0035915374755859375,
-0.044525146484375,
0.008575439453125,
-0.0222625732421875,
-0.0225067138671875,
0.03753662109375,
-0.039703369140625,
0.0158843994140625,
-0.037384033203125,
0.0244140625,
-0.06915283203125,
0.00832366943359375,
0.053436279296875,
0.043121337890625,
-0.01238250732421875,
-0.00495147705078125,
-0.05322265625,
-0.03118896484375,
0.01087188720703125,
-0.020843505859375,
-0.04327392578125,
-0.028717041015625,
0.01421356201171875,
0.0203399658203125,
0.0181732177734375,
0.019195556640625,
-0.037506103515625,
0.023040771484375,
0.0251007080078125,
0.09942626953125,
-0.0059661865234375,
0.0709228515625,
-0.006786346435546875,
0.025970458984375,
0.0030155181884765625,
0.01629638671875,
-0.0390625,
-0.001880645751953125,
-0.0140228271484375,
-0.0462646484375,
0.00704193115234375,
-0.0240936279296875,
0.0092010498046875,
0.0246429443359375,
0.0287628173828125,
0.01207733154296875,
-0.0340576171875,
0.004032135009765625,
-0.0052032470703125,
-0.04412841796875,
0.0189361572265625,
0.0202789306640625,
0.0017595291137695312,
-0.06005859375,
-0.0125885009765625,
0.04351806640625,
-0.0086822509765625,
0.01177215576171875,
-0.0034694671630859375,
-0.03668212890625,
0.0158843994140625,
0.0205078125,
-0.0306396484375,
0.0149993896484375,
0.0032634735107421875,
0.00923919677734375,
0.028289794921875,
-0.0199432373046875,
0.018524169921875,
-0.00797271728515625,
0.037841796875,
0.0011081695556640625,
-0.029266357421875,
0.05303955078125,
0.008880615234375,
-0.00836944580078125,
0.01453399658203125,
-0.0297698974609375,
0.042724609375,
0.0501708984375,
0.0810546875,
-0.08062744140625,
0.0302581787109375,
0.0308685302734375,
-0.01837158203125,
0.06658935546875,
-0.0172882080078125,
-0.005641937255859375,
-0.00481414794921875,
-0.00762939453125,
0.0157623291015625,
-0.040679931640625,
-0.026153564453125,
0.007183074951171875,
-0.01422882080078125,
-0.01084136962890625,
0.065673828125,
0.024383544921875,
-0.006435394287109375,
-0.0037822723388671875,
-0.000009715557098388672,
-0.0128631591796875,
0.0148468017578125,
0.004150390625,
-0.058563232421875,
-0.03558349609375,
-0.055816650390625,
-0.07281494140625,
-0.0311279296875,
-0.0193634033203125,
0.05633544921875,
-0.01934814453125,
0.029449462890625,
0.034454345703125,
-0.0188751220703125,
0.039764404296875,
-0.020172119140625,
0.02618408203125,
-0.031524658203125,
-0.033721923828125,
0.0277252197265625,
0.07293701171875,
-0.017181396484375,
0.04791259765625,
0.022552490234375,
-0.04925537109375,
-0.0258636474609375,
-0.051025390625,
0.1182861328125,
-0.05426025390625,
-0.00635528564453125,
-0.0090179443359375,
0.042266845703125,
0.015472412109375,
-0.0045928955078125,
0.0159759521484375,
-0.01329803466796875,
0.01605224609375,
-0.013458251953125,
-0.002696990966796875,
0.004062652587890625,
-0.008758544921875,
-0.029327392578125,
0.0198974609375,
-0.0019817352294921875,
0.0191497802734375,
0.0352783203125,
-0.01380157470703125,
-0.0223846435546875,
-0.0101165771484375,
-0.02288818359375,
0.017059326171875,
-0.005096435546875,
0.00905609130859375,
-0.01451873779296875,
0.0013437271118164062,
-0.009063720703125,
0.0204010009765625,
0.033721923828125,
0.0033054351806640625,
-0.00420379638671875,
0.037384033203125,
0.09600830078125,
0.02203369140625,
-0.002925872802734375,
0.0171051025390625,
0.00498199462890625,
0.03857421875,
0.037811279296875,
-0.02313232421875,
0.04248046875,
-0.031982421875,
-0.04071044921875,
0.007476806640625,
0.019866943359375,
0.022186279296875,
0.0189056396484375,
-0.0306396484375,
-0.037506103515625,
0.0143585205078125,
0.03485107421875,
-0.0338134765625,
0.0017719268798828125,
0.04254150390625,
0.07568359375,
-0.084228515625,
0.003932952880859375,
-0.047027587890625,
0.06854248046875,
0.0109405517578125,
-0.0140380859375,
0.019927978515625,
0.01073455810546875,
0.047515869140625,
-0.054901123046875,
-0.0260467529296875,
-0.037261962890625,
0.0308380126953125,
0.03778076171875,
0.02020263671875,
0.0010747909545898438,
-0.038848876953125,
0.06597900390625,
0.0299072265625,
0.04364013671875,
-0.061920166015625,
-0.036102294921875,
0.01332855224609375,
-0.0094451904296875,
-0.01776123046875,
-0.00746917724609375,
-0.00432586669921875,
-0.0247039794921875,
0.0156707763671875,
-0.0576171875,
-0.0082244873046875,
0.031036376953125,
0.0310821533203125,
-0.029510498046875,
-0.0494384765625,
-0.00612640380859375,
-0.0177764892578125,
-0.042236328125,
-0.007671356201171875,
0.0269012451171875,
0.0458984375,
0.0026264190673828125,
0.062286376953125,
0.0031490325927734375,
-0.01110076904296875,
0.00007575750350952148,
0.03607177734375,
-0.0229339599609375,
0.00804901123046875,
0.0021457672119140625,
-0.0274810791015625,
-0.05169677734375,
0.020355224609375,
0.0465087890625,
0.0279388427734375,
0.040802001953125,
-0.0171051025390625,
-0.05059814453125,
0.01678466796875,
0.0277557373046875,
-0.027984619140625,
-0.0634765625,
-0.034942626953125,
-0.022216796875,
0.040496826171875,
0.001842498779296875,
0.059295654296875,
-0.035186767578125,
0.04345703125,
-0.045166015625,
0.044891357421875,
-0.00904083251953125,
-0.004383087158203125,
0.06414794921875,
0.0081329345703125,
0.039154052734375,
-0.011474609375,
-0.0538330078125,
-0.019927978515625,
-0.0236053466796875,
0.0012226104736328125,
0.011871337890625,
0.023681640625,
0.0191650390625,
0.00778961181640625,
-0.0013742446899414062,
0.00634002685546875,
0.0060577392578125,
-0.023284912109375,
0.01629638671875,
0.0002796649932861328,
0.0209197998046875,
0.00684356689453125,
-0.043548583984375,
-0.046783447265625,
-0.03228759765625,
0.062469482421875,
0.01617431640625,
0.0660400390625,
-0.0178070068359375,
0.0263671875,
0.0079803466796875,
0.03741455078125,
-0.027008056640625,
-0.0168304443359375,
0.0204315185546875,
-0.019866943359375,
0.0260009765625,
-0.0045166015625,
0.01482391357421875,
-0.0093841552734375,
0.04071044921875,
-0.0295867919921875,
-0.0139617919921875,
-0.019134521484375,
0.03515625,
-0.002716064453125,
0.047149658203125,
-0.02313232421875,
-0.02984619140625,
-0.037933349609375,
-0.00255584716796875,
0.028961181640625,
0.0260009765625,
-0.004268646240234375,
0.044891357421875,
0.0066070556640625,
-0.0250091552734375,
0.03814697265625,
-0.07159423828125,
0.06365966796875,
0.03265380859375,
-0.00785064697265625,
-0.00853729248046875,
-0.0019550323486328125,
-0.0338134765625,
0.01202392578125,
-0.003353118896484375,
0.0438232421875,
-0.0279541015625,
-0.007049560546875,
0.000013768672943115234,
-0.01544189453125,
0.0160369873046875,
-0.050567626953125,
-0.0196533203125,
0.0229644775390625,
0.0125579833984375,
0.00946807861328125,
-0.06658935546875,
0.00049591064453125,
-0.04168701171875,
-0.01465606689453125,
0.0151519775390625,
-0.0178680419921875,
-0.02471923828125,
0.0240020751953125,
-0.0122833251953125,
0.025146484375,
-0.0153045654296875,
-0.01355743408203125,
-0.0146636962890625,
-0.01317596435546875,
0.0224456787109375,
-0.0154876708984375,
-0.00458526611328125,
0.0172576904296875,
0.051422119140625,
-0.00817108154296875,
-0.0022411346435546875,
-0.01499176025390625,
0.011322021484375,
-0.0187530517578125,
0.0190887451171875,
0.047637939453125,
-0.0237884521484375,
-0.03363037109375,
0.03924560546875,
0.00664520263671875,
0.064453125,
-0.0096588134765625,
-0.0484619140625,
-0.0201568603515625,
0.017364501953125,
-0.0030975341796875,
-0.0228729248046875,
0.03057861328125,
-0.0582275390625,
-0.011749267578125,
-0.017669677734375,
-0.0022945404052734375,
0.020172119140625,
-0.03790283203125,
-0.06268310546875,
0.037384033203125,
-0.01218414306640625,
-0.030792236328125,
-0.01800537109375,
0.010589599609375,
-0.022216796875,
0.0345458984375,
0.01039886474609375,
-0.00858306884765625,
0.0011835098266601562,
0.01202392578125,
0.01157379150390625,
-0.02081298828125,
0.054779052734375,
-0.0264434814453125,
-0.045013427734375,
-0.01751708984375,
-0.004550933837890625,
-0.01438140869140625,
0.03729248046875,
-0.0304107666015625,
0.0289306640625,
0.025543212890625,
-0.074951171875,
-0.0107421875,
-0.02423095703125,
0.03460693359375,
0.02099609375,
-0.00327301025390625,
-0.0382080078125,
0.004528045654296875,
0.03173828125,
0.042877197265625,
0.00940704345703125,
-0.03167724609375,
-0.0160980224609375,
-0.01107025146484375,
-0.053741455078125,
-0.02911376953125,
0.025604248046875,
-0.058502197265625,
-0.009796142578125,
-0.0172271728515625,
-0.0059051513671875,
-0.0217742919921875,
-0.0265655517578125,
-0.0210418701171875,
-0.0156402587890625,
0.0044708251953125,
0.0178985595703125,
-0.015655517578125,
-0.0142822265625,
0.033966064453125,
-0.017578125,
0.021759033203125,
-0.0166778564453125,
0.019775390625,
0.0245819091796875,
0.0218353271484375,
-0.028411865234375,
0.04779052734375,
-0.0200347900390625,
-0.0325927734375,
0.0293121337890625,
0.0007853507995605469,
0.030426025390625,
0.032501220703125,
-0.001964569091796875,
0.013671875,
-0.005523681640625,
0.01543426513671875,
0.038818359375,
0.0244598388671875,
0.002155303955078125,
-0.0004322528839111328,
-0.027191162109375,
0.005481719970703125,
-0.0085296630859375,
0.0217742919921875,
-0.0239105224609375,
0.0028438568115234375,
0.0194091796875,
-0.0233612060546875,
0.006561279296875,
0.00899505615234375,
-0.0380859375,
-0.0333251953125,
0.00785064697265625,
0.01226043701171875,
-0.01141357421875,
0.00785064697265625
] |
bf2c96375b662ddf423c07e73f0484f44fd3f928
|
Wordpress Stackexchange
Q: Deleting default category in wordpress I'm looking for a way to delete default category functionality in wordpress but after i delete the default category in wp_terms table in mysql database, it automatically assigns default category to another category.
Does anyone know how to achieve this?
Thank you for any help.
A: Impossible. WordPress requires a default category, that’s hard coded.
If you need a taxonomy without default value – create a custom taxonomy.
|
Q: Deleting default category in wordpress I'm looking for a way to delete default category functionality in wordpress but after i delete the default category in wp_terms table in mysql database, it automatically assigns default category to another category.
Does anyone know how to achieve this?
Thank you for any help.
A: Impossible. WordPress requires a default category, that’s hard coded.
If you need a taxonomy without default value – create a custom taxonomy.
A: Solution:
This is a very old question but I had a similar requirement and I found a way to do it.
add_filter( 'pre_option_default_category', '__return_empty_string', 999 );
Why the above code will work?
This will give empty string to WordPress when it's trying to set default category on post save here: https://github.com/WordPress/WordPress/blob/7004afe4f4bac1fd17a142051832bdf6be8e6fcf/wp-includes/post.php#L3672-L3680
// Make sure we set a valid category.
if ( empty( $post_category ) || 0 == count( $post_category ) || ! is_array( $post_category ) ) {
// 'post' requires at least one category.
if ( 'post' == $post_type && 'auto-draft' != $post_status ) {
$post_category = array( get_option( 'default_category' ) );
} else {
$post_category = array();
}
}
Later it will try to assign that category here: https://github.com/WordPress/WordPress/blob/7004afe4f4bac1fd17a142051832bdf6be8e6fcf/wp-includes/post.php#L3955-L3957
if ( is_object_in_taxonomy( $post_type, 'category' ) ) {
wp_set_post_categories( $post_ID, $post_category );
}
and that function will return true from elseif since category array is not empty but value is empty in here https://github.com/WordPress/WordPress/blob/7004afe4f4bac1fd17a142051832bdf6be8e6fcf/wp-includes/post.php#L4613-L4622
if ( empty( $post_categories ) ) {
if ( 'post' == $post_type && 'auto-draft' != $post_status ) {
$post_categories = array( get_option( 'default_category' ) );
$append = false;
} else {
$post_categories = array();
}
} elseif ( 1 == count( $post_categories ) && '' == reset( $post_categories ) ) {
return true;
}
Note, user will see option to set default category in wp-admin/options-writing.php this code does not disable that but that functionality won't work anymore.
A: I was able to achieve this by manually removing the record in the database, if I recall correctly it was located in wp_terms but I could be wrong.
A: The easy way to do it is to go to your table 'wp_options' and set 'default_category' to 0.
I can't understand why people keep saying that a term is an absolute requirement of Wordpress. It's not.
A: If nothing else, you can change the default category from "uncatogorized" to "news" or something relevant for your use.
|
wordpress
|
{
"language": "en",
"length": 392,
"provenance": "stackexchange_00019.jsonl.gz:421745",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58144"
}
|
[
0.0236663818359375,
0.0280609130859375,
-0.037078857421875,
-0.0222930908203125,
0.042144775390625,
-0.05145263671875,
0.06036376953125,
-0.0162506103515625,
-0.0014743804931640625,
-0.00438690185546875,
-0.0169830322265625,
-0.040130615234375,
-0.0154571533203125,
-0.030731201171875,
-0.03204345703125,
-0.06439208984375,
0.0220794677734375,
0.0312042236328125,
0.042572021484375,
-0.006130218505859375,
-0.002471923828125,
0.01605224609375,
0.0283050537109375,
0.046844482421875,
-0.00098419189453125,
0.00916290283203125,
0.046051025390625,
-0.046783447265625,
-0.0016794204711914062,
-0.03955078125,
0.0167236328125,
0.042266845703125,
-0.019256591796875,
0.0213470458984375,
0.03271484375,
-0.0063934326171875,
-0.0112457275390625,
0.038360595703125,
0.04290771484375,
-0.0020961761474609375,
0.01363372802734375,
-0.01385498046875,
0.041900634765625,
0.00870513916015625,
0.006465911865234375,
-0.03851318359375,
0.022064208984375,
-0.052520751953125,
0.0218048095703125,
-0.06561279296875,
0.0210113525390625,
0.0298919677734375,
0.051483154296875,
-0.10260009765625,
-0.0308685302734375,
-0.0075225830078125,
0.00600433349609375,
0.0033588409423828125,
0.0369873046875,
0.0130157470703125,
-0.0220489501953125,
-0.00550079345703125,
0.0119781494140625,
-0.037872314453125,
0.00222015380859375,
-0.00868988037109375,
-0.006694793701171875,
0.03680419921875,
-0.046478271484375,
0.007625579833984375,
0.0345458984375,
-0.0350341796875,
0.00543212890625,
-0.00444793701171875,
0.002716064453125,
-0.007801055908203125,
0.022064208984375,
0.016998291015625,
0.00794219970703125,
0.0211181640625,
0.055999755859375,
-0.01534271240234375,
-0.00177764892578125,
0.0006880760192871094,
0.0275421142578125,
0.0168609619140625,
0.00861358642578125,
-0.031890869140625,
-0.0300140380859375,
-0.03826904296875,
-0.005031585693359375,
-0.040374755859375,
-0.06903076171875,
0.000392913818359375,
-0.0031490325927734375,
-0.0293731689453125,
-0.00276947021484375,
0.039581298828125,
-0.032867431640625,
0.0011930465698242188,
0.003993988037109375,
-0.027099609375,
-0.010284423828125,
-0.0290985107421875,
0.00119781494140625,
0.0137176513671875,
-0.0333251953125,
-0.03814697265625,
0.0101165771484375,
0.059112548828125,
0.0013256072998046875,
-0.0223236083984375,
0.009063720703125,
-0.01061248779296875,
-0.00913238525390625,
0.013641357421875,
-0.01422882080078125,
0.035552978515625,
-0.01165771484375,
0.02154541015625,
-0.03106689453125,
-0.007534027099609375,
0.0006794929504394531,
-0.060882568359375,
0.0244598388671875,
-0.0205535888671875,
-0.036224365234375,
0.0211639404296875,
-0.0265045166015625,
-0.0268707275390625,
-0.06182861328125,
0.039337158203125,
0.12115478515625,
0.04132080078125,
0.020904541015625,
-0.0022525787353515625,
0.02679443359375,
0.0241241455078125,
0.01338958740234375,
0.00025343894958496094,
0.040985107421875,
0.00482177734375,
0.0177764892578125,
0.01788330078125,
0.03631591796875,
0.01544189453125,
0.0221099853515625,
0.0093841552734375,
-0.00637054443359375,
0.0021514892578125,
0.01203155517578125,
-0.006526947021484375,
0.05096435546875,
0.008636474609375,
0.0033721923828125,
-0.02374267578125,
0.068359375,
-0.04840087890625,
-0.0572509765625,
-0.060516357421875,
0.0163116455078125,
-0.031982421875,
-0.0098114013671875,
-0.0179901123046875,
-0.05926513671875,
0.0467529296875,
-0.031463623046875,
-0.0219268798828125,
0.0188140869140625,
-0.036468505859375,
-0.01434326171875,
-0.0212860107421875,
0.0115203857421875,
0.00931549072265625,
0.01166534423828125,
0.045654296875,
-0.0095062255859375,
-0.0235443115234375,
0.0279998779296875,
0.0254974365234375,
-0.02679443359375,
-0.04656982421875,
-0.0072174072265625,
0.0036754608154296875,
-0.05145263671875,
0.01085662841796875,
0.01812744140625,
0.09326171875,
0.0299224853515625,
0.02862548828125,
0.02667236328125,
-0.030975341796875,
-0.06597900390625,
-0.0013685226440429688,
0.0260772705078125,
-0.00795745849609375,
-0.0262603759765625,
-0.026123046875,
0.0057830810546875,
-0.00807952880859375,
0.019287109375,
0.0013341903686523438,
-0.0103607177734375,
-0.01513671875,
-0.06756591796875,
-0.018035888671875,
-0.01012420654296875,
0.0338134765625,
-0.01495361328125,
0.00911712646484375,
0.00986480712890625,
-0.0195770263671875,
0.0023250579833984375,
-0.0653076171875,
-0.03631591796875,
0.01262664794921875,
-0.0165863037109375,
0.01113128662109375,
-0.003490447998046875,
0.0162200927734375,
-0.0249481201171875,
-0.019744873046875,
-0.01541900634765625,
0.006954193115234375,
0.0308380126953125,
-0.01194000244140625,
-0.0177001953125,
-0.036224365234375,
0.042388916015625,
-0.000022232532501220703,
-0.0239410400390625,
0.0308837890625,
0.0361328125,
-0.0047454833984375,
-0.037261962890625,
0.004535675048828125,
0.0185089111328125,
-0.04962158203125,
-0.01544189453125,
0.048614501953125,
0.006191253662109375,
0.003009796142578125,
-0.053466796875,
-0.00948333740234375,
0.04840087890625,
-0.035369873046875,
-0.0219879150390625,
0.0287017822265625,
0.0191192626953125,
0.01934814453125,
0.00972747802734375,
-0.00862884521484375,
0.0238189697265625,
-0.02008056640625,
0.029052734375,
0.025482177734375,
-0.0045166015625,
-0.046051025390625,
0.0264892578125,
-0.0082855224609375,
0.020111083984375,
-0.042877197265625,
-0.06396484375,
0.01369476318359375,
0.0755615234375,
-0.0271759033203125,
0.0196533203125,
-0.0041046142578125,
-0.0257568359375,
0.020050048828125,
0.0179443359375,
-0.07244873046875,
-0.0171356201171875,
0.00989532470703125,
0.061309814453125,
-0.004749298095703125,
-0.036041259765625,
-0.007808685302734375,
-0.0002536773681640625,
0.00884246826171875,
-0.01483917236328125,
0.0732421875,
-0.0107574462890625,
-0.025726318359375,
-0.050811767578125,
-0.05029296875,
-0.016754150390625,
-0.003589630126953125,
-0.03778076171875,
-0.038848876953125,
0.005336761474609375,
0.040496826171875,
-0.0328369140625,
0.02056884765625,
-0.00530242919921875,
-0.0095977783203125,
0.006511688232421875,
-0.0113677978515625,
0.015167236328125,
-0.0235137939453125,
0.01041412353515625,
0.051055908203125,
-0.01222991943359375,
0.00305938720703125,
0.0218963623046875,
0.010833740234375,
0.06146240234375,
-0.00716400146484375,
-0.00952911376953125,
0.033660888671875,
-0.072021484375,
-0.0239410400390625,
0.01424407958984375,
0.032684326171875,
-0.01568603515625,
-0.025604248046875,
-0.0034122467041015625,
0.0240936279296875,
-0.0247344970703125,
-0.000056803226470947266,
0.0286407470703125,
0.01922607421875,
0.01983642578125,
-0.00865936279296875,
0.0249176025390625,
-0.029937744140625,
-0.004451751708984375,
-0.0101318359375,
0.032958984375,
-0.042572021484375,
-0.024932861328125,
-0.034027099609375,
-0.07012939453125,
-0.06640625,
0.005985260009765625,
0.0078582763671875,
0.00669097900390625,
0.06396484375,
0.0011587142944335938,
-0.0655517578125,
-0.020294189453125,
-0.04437255859375,
-0.0269775390625,
0.0157318115234375,
0.0270233154296875,
-0.017486572265625,
0.00250244140625,
0.00630950927734375,
0.0279693603515625,
0.060943603515625,
-0.044891357421875,
-0.01235198974609375,
-0.0191650390625,
0.0185699462890625,
-0.00347137451171875,
-0.0086822509765625,
0.01715087890625,
-0.00911712646484375,
-0.0232696533203125,
-0.041595458984375,
-0.00174713134765625,
0.014434814453125,
-0.00901031494140625,
-0.0143585205078125,
-0.0171356201171875,
-0.01837158203125,
-0.012420654296875,
0.013397216796875,
-0.01363372802734375,
0.01076507568359375,
0.00862884521484375,
-0.00946807861328125,
-0.0122833251953125,
-0.0248565673828125,
-0.050048828125,
-0.002170562744140625,
0.040924072265625,
-0.03851318359375,
0.0026683807373046875,
0.010040283203125,
0.00257110595703125,
0.0234527587890625,
-0.0313720703125,
-0.005096435546875,
-0.047576904296875,
0.0159912109375,
-0.0638427734375,
0.00592041015625,
-0.0254974365234375,
0.01312255859375,
0.007232666015625,
0.07427978515625,
-0.037933349609375,
-0.031494140625,
0.018524169921875,
0.0206298828125,
-0.00429534912109375,
-0.018341064453125,
-0.0289306640625,
-0.041107177734375,
-0.056060791015625,
0.0191802978515625,
0.00787353515625,
-0.0205535888671875,
-0.0379638671875,
0.05072021484375,
-0.05755615234375,
-0.022491455078125,
0.051910400390625,
-0.0782470703125,
0.03192138671875,
0.002399444580078125,
0.018585205078125,
-0.034271240234375,
-0.0262451171875,
-0.050689697265625,
-0.01422882080078125,
0.00492095947265625,
-0.031036376953125,
0.0023632049560546875,
0.016357421875,
0.0311279296875,
-0.0121917724609375,
0.0263519287109375,
0.003597259521484375,
-0.01070404052734375,
-0.0032596588134765625,
0.0004363059997558594,
-0.0311126708984375,
-0.00792694091796875,
-0.00791168212890625,
-0.03118896484375,
-0.00846099853515625,
-0.05133056640625,
-0.0355224609375,
0.0123291015625,
-0.0159454345703125,
0.07525634765625,
-0.0269927978515625,
-0.00125885009765625,
-0.049224853515625,
-0.025543212890625,
-0.0574951171875,
-0.0120391845703125,
-0.029693603515625,
-0.00347900390625,
-0.026153564453125,
-0.0643310546875,
0.0576171875,
-0.004589080810546875,
-0.00960540771484375,
0.008514404296875,
0.0892333984375,
0.00015914440155029297,
-0.0202484130859375,
-0.05438232421875,
0.0020885467529296875,
0.0194244384765625,
0.01161956787109375,
0.043609619140625,
0.01056671142578125,
0.00971221923828125,
0.036224365234375,
0.007617950439453125,
0.0160369873046875,
-0.042510986328125,
0.058990478515625,
-0.0215301513671875,
0.00452423095703125,
0.0016508102416992188,
-0.047943115234375,
0.03369140625,
0.01812744140625,
0.00684356689453125,
-0.004642486572265625,
0.0177459716796875,
0.0178985595703125,
0.01303863525390625,
-0.05010986328125,
-0.04010009765625,
0.0194091796875,
-0.00531005859375,
-0.0011930465698242188,
0.016357421875,
0.04034423828125,
-0.008636474609375,
-0.0244903564453125,
-0.00383758544921875,
-0.01055145263671875,
-0.038726806640625,
-0.033905029296875,
-0.009918212890625,
0.006061553955078125,
-0.01320648193359375,
0.005611419677734375,
-0.0135650634765625,
0.002727508544921875,
0.0310821533203125,
-0.021514892578125,
-0.0693359375,
-0.025787353515625,
0.0163116455078125,
0.03485107421875,
0.049713134765625,
-0.025482177734375,
0.027435302734375,
0.029876708984375,
-0.006992340087890625,
-0.00481414794921875,
-0.05010986328125,
0.00908660888671875,
-0.039459228515625,
0.0036602020263671875,
0.00524139404296875,
-0.005451202392578125,
0.050079345703125,
0.035552978515625,
-0.004878997802734375,
0.042327880859375,
-0.019378662109375,
0.029876708984375,
-0.012969970703125,
0.045318603515625,
-0.01322174072265625,
0.007160186767578125,
0.0198974609375,
-0.005794525146484375,
0.01016998291015625,
-0.05322265625,
-0.056915283203125,
0.00823211669921875,
0.034393310546875,
-0.04290771484375,
-0.00807952880859375,
0.05279541015625,
0.024017333984375,
0.006984710693359375,
-0.0091400146484375,
-0.071533203125,
-0.0455322265625,
-0.0033168792724609375,
0.0168609619140625,
0.029541015625,
-0.0279541015625,
-0.029541015625,
0.005092620849609375,
-0.041900634765625,
0.0399169921875,
-0.0013666152954101562,
0.0022602081298828125,
-0.000029385089874267578,
-0.0223541259765625,
-0.0218505859375,
-0.0116119384765625,
-0.00920867919921875,
-0.002941131591796875,
-0.0140533447265625,
-0.0223846435546875,
-0.0289306640625,
0.031402587890625,
0.00017583370208740234,
0.0223388671875,
-0.0132904052734375,
-0.0255126953125,
0.0295562744140625,
-0.0159454345703125,
0.060821533203125,
0.01045989990234375,
-0.045013427734375,
-0.02703857421875,
-0.0545654296875,
-0.0263671875,
-0.018890380859375,
-0.019287109375,
-0.034271240234375,
0.01280975341796875,
0.01690673828125,
0.017852783203125,
-0.00489044189453125,
-0.02130126953125,
-0.041290283203125,
0.01611328125,
0.034088134765625,
0.0130157470703125,
-0.01291656494140625,
0.01309967041015625,
0.0087432861328125,
0.009918212890625,
0.0174560546875,
0.01245880126953125,
0.0094451904296875,
-0.0360107421875,
0.013641357421875,
-0.052886962890625,
-0.0222930908203125,
-0.00885772705078125,
-0.07708740234375,
0.0109100341796875,
0.0523681640625,
-0.005340576171875,
0.01247406005859375,
-0.007358551025390625,
-0.0008654594421386719,
-0.0164642333984375,
0.0004611015319824219,
-0.000957489013671875,
0.0213623046875,
-0.023223876953125,
-0.0110321044921875,
0.05572509765625,
-0.01198577880859375,
0.01849365234375,
0.013427734375,
-0.05755615234375,
0.0270233154296875,
0.031890869140625,
-0.022979736328125,
0.038177490234375,
0.009368896484375,
-0.038787841796875,
-0.01047515869140625,
0.00815582275390625,
-0.0114288330078125,
-0.003353118896484375,
-0.002552032470703125,
-0.0258941650390625,
-0.0146942138671875,
0.0140228271484375,
-0.0073394775390625,
-0.0229949951171875,
0.009368896484375,
-0.01166534423828125,
-0.0278778076171875,
0.06512451171875,
0.05877685546875,
-0.08758544921875,
0.012420654296875,
0.03228759765625,
0.015899658203125,
0.006687164306640625,
0.0276641845703125,
-0.018829345703125,
-0.01035308837890625,
-0.042938232421875,
-0.01861572265625,
-0.045989990234375,
-0.0294342041015625,
0.042755126953125,
-0.0060577392578125,
0.0018243789672851562,
0.04949951171875,
0.0295562744140625,
-0.01605224609375,
-0.005733489990234375,
0.0173187255859375,
0.004451751708984375,
-0.0188751220703125,
0.0106048583984375,
0.03289794921875,
-0.026123046875,
-0.07427978515625,
0.048431396484375,
0.02703857421875,
-0.02117919921875,
0.0156402587890625,
-0.0310821533203125,
0.0142059326171875,
0.0311126708984375,
-0.0282745361328125,
0.029083251953125,
-0.0079345703125,
-0.05078125,
-0.021087646484375,
-0.01015472412109375,
0.0478515625,
0.012420654296875,
-0.061859130859375,
0.030059814453125,
-0.03125,
-0.040863037109375,
-0.0156402587890625,
-0.04315185546875,
0.06170654296875,
-0.06890869140625,
0.0133514404296875,
0.01326751708984375,
0.0635986328125,
0.00461578369140625,
-0.0252685546875,
0.0011339187622070312,
-0.00930023193359375,
0.0189361572265625,
-0.0269012451171875,
0.0089111328125,
0.0300445556640625,
-0.03277587890625,
-0.058135986328125,
0.045074462890625,
-0.0100555419921875,
0.0019626617431640625,
-0.01377105712890625,
0.01739501953125,
-0.0033359527587890625,
0.023712158203125,
-0.02398681640625,
0.03863525390625,
0.04150390625,
0.01128387451171875,
-0.0068511962890625,
-0.00418853759765625,
0.00609588623046875,
0.005382537841796875,
0.061370849609375,
0.00998687744140625,
0.047821044921875,
0.0107269287109375,
0.064697265625,
0.0215911865234375,
-0.03485107421875,
-0.01019287109375,
-0.005802154541015625,
-0.0224761962890625,
0.0245513916015625,
0.0122833251953125,
0.028289794921875,
0.00885009765625,
-0.035064697265625,
0.0036983489990234375,
0.024169921875,
0.0369873046875,
0.004055023193359375,
0.033599853515625,
-0.0173797607421875,
-0.004505157470703125,
0.024444580078125,
-0.0096588134765625,
-0.0149078369140625,
0.0634765625,
0.0587158203125,
-0.08404541015625,
0.0248870849609375,
-0.045013427734375,
0.069580078125,
0.001903533935546875,
0.01983642578125,
0.103271484375,
0.0302734375,
0.0174560546875,
-0.0194854736328125,
0.02984619140625,
-0.04119873046875,
-0.006725311279296875,
0.0821533203125,
0.02655029296875,
0.032470703125,
-0.039947509765625,
0.01070404052734375,
-0.000988006591796875,
0.08306884765625,
-0.058624267578125,
-0.05303955078125,
0.019317626953125,
0.026336669921875,
0.02001953125,
0.0124969482421875,
0.0372314453125,
-0.0218353271484375,
0.03515625,
-0.062286376953125,
0.006992340087890625,
0.03399658203125,
0.00971221923828125,
-0.01552581787109375,
0.0004849433898925781,
-0.02459716796875,
-0.0017490386962890625,
-0.0261383056640625,
0.02459716796875,
0.01146697998046875,
0.02154541015625,
-0.009613037109375,
0.033721923828125,
-0.01093292236328125,
0.0022296905517578125,
-0.00789642333984375,
0.060333251953125,
0.0008511543273925781,
0.0009760856628417969,
-0.036102294921875,
-0.051177978515625,
-0.0012941360473632812,
0.0232391357421875,
-0.017608642578125,
0.0111541748046875,
0.07122802734375,
0.05584716796875,
-0.04718017578125,
-0.031829833984375,
-0.005702972412109375,
-0.03753662109375,
-0.02764892578125,
-0.03155517578125,
0.019378662109375,
0.032318115234375,
0.0159759521484375,
0.01027679443359375,
0.039031982421875,
0.02703857421875,
-0.015716552734375,
-0.01096343994140625,
0.0103759765625,
-0.037628173828125,
0.07830810546875,
-0.006259918212890625,
0.038238525390625,
0.00046515464782714844,
-0.07708740234375,
-0.0120849609375,
-0.034576416015625,
-0.0119781494140625,
0.0007777214050292969,
0.028167724609375,
-0.00844573974609375,
0.0037174224853515625,
0.000020325183868408203,
-0.01097869873046875,
0.023345947265625,
-0.008514404296875,
-0.00848388671875,
-0.047698974609375,
0.0164642333984375,
-0.035980224609375,
-0.01134490966796875,
-0.011383056640625,
0.0087738037109375,
0.03192138671875,
0.01239776611328125,
0.048004150390625,
-0.01349639892578125,
0.01100921630859375,
-0.037200927734375,
0.048492431640625,
-0.049774169921875,
-0.0174102783203125,
0.0196685791015625,
0.0142822265625,
-0.004802703857421875,
-0.0181884765625,
-0.040283203125,
-0.0021533966064453125,
0.040557861328125,
-0.037841796875,
0.0057373046875,
-0.00939178466796875,
0.0151519775390625,
-0.037628173828125,
0.04998779296875,
-0.01617431640625,
-0.0223388671875,
-0.0516357421875,
-0.02349853515625,
0.04473876953125,
0.0187225341796875,
-0.00408935546875,
0.0010890960693359375,
-0.02337646484375,
-0.01605224609375,
0.01108551025390625,
-0.007640838623046875,
-0.0038509368896484375,
0.0285186767578125,
-0.0235595703125,
-0.01067352294921875,
0.02142333984375,
-0.002780914306640625,
-0.0157623291015625,
0.03662109375,
-0.0187530517578125,
0.03375244140625,
-0.058380126953125,
-0.019073486328125,
-0.0078277587890625,
0.02459716796875,
-0.038299560546875,
0.0200653076171875,
-0.04278564453125,
0.02691650390625,
0.057830810546875,
-0.00362396240234375,
-0.01446533203125,
-0.016448974609375,
-0.0305023193359375,
0.01230621337890625,
-0.02581787109375,
-0.050628662109375,
-0.07037353515625,
0.034088134765625,
0.05169677734375,
0.0147857666015625,
-0.053131103515625,
0.060882568359375,
-0.0325927734375,
0.0160064697265625,
0.0262908935546875,
-0.06597900390625,
-0.00516510009765625,
-0.01528167724609375,
-0.0269927978515625,
-0.0093994140625,
-0.0565185546875,
-0.01041412353515625,
-0.039337158203125,
0.0201568603515625,
0.01471710205078125,
-0.0160369873046875,
-0.006381988525390625,
0.029083251953125,
0.0175323486328125,
0.08282470703125,
0.0241546630859375,
-0.0285186767578125,
0.0008997917175292969,
-0.00867462158203125,
-0.031402587890625,
-0.01337432861328125,
0.026611328125,
-0.030303955078125,
-0.0482177734375,
-0.0128631591796875,
0.0004508495330810547,
0.0170745849609375,
-0.04156494140625,
-0.09075927734375,
0.0305328369140625,
-0.0177764892578125,
-0.046661376953125,
0.001209259033203125,
0.0029773712158203125,
-0.034027099609375,
0.006778717041015625,
0.005962371826171875,
-0.0121917724609375,
0.0170135498046875,
0.039398193359375,
0.0189056396484375,
0.010833740234375,
0.01276397705078125,
0.0117950439453125,
-0.0396728515625,
0.0182342529296875,
0.0023479461669921875,
0.0164337158203125,
0.0161285400390625,
-0.008392333984375,
0.0231475830078125,
0.06109619140625,
-0.0271148681640625,
-0.037200927734375,
-0.0203704833984375,
-0.035614013671875,
0.015716552734375,
-0.048858642578125,
-0.037750244140625,
-0.035400390625,
0.0411376953125,
0.00872802734375,
0.0131683349609375,
-0.00347900390625,
-0.058013916015625,
-0.044464111328125,
0.0081634521484375,
-0.02923583984375,
0.01849365234375,
-0.094970703125,
-0.01233673095703125,
0.0311279296875,
-0.0279693603515625,
-0.01471710205078125,
-0.018157958984375,
-0.054107666015625,
0.0102081298828125,
-0.03485107421875,
-0.00855255126953125,
-0.043182373046875,
0.04931640625,
-0.055877685546875,
0.01348114013671875,
-0.0079193115234375,
-0.034637451171875,
-0.006618499755859375,
-0.034210205078125,
-0.003803253173828125,
-0.019012451171875,
0.0037441253662109375,
-0.0119171142578125,
-0.00972747802734375,
0.01184844970703125,
-0.01947021484375,
0.0164337158203125,
0.00267791748046875,
-0.0191497802734375,
0.031951904296875,
0.0115509033203125,
0.050567626953125,
-0.03045654296875,
0.050506591796875,
0.04248046875,
-0.0174560546875,
0.006374359130859375,
-0.0193634033203125,
-0.00899505615234375,
0.05621337890625,
-0.016937255859375,
-0.025054931640625,
0.0030364990234375,
-0.04302978515625,
0.008026123046875,
0.009063720703125,
0.036468505859375,
-0.053131103515625,
0.0526123046875,
0.0204315185546875,
0.029754638671875,
0.0279388427734375
] |
8cd30a090a96aa091ca1e833862e09ab4acc1729
|
Wordpress Stackexchange
Q: w3 total cache minification breaks wp_localize_script() I am trying to configure W3 total cache plugin to speed up my site. The minify option is great but I am running into the following issue:
Let's say I have a JavaScript file I am attached wp_localize script() to and it's called 'additions.js'. Because W3TC minifies this JavaScript file and renames it, the wp_localize_script() function no longer sees my 'additions.js' file and the variables inside it don't get shared with it.
Does anyone have a solution for this? Let me know if anything is unclear.
A: W3 Total Cache has 4 locations to include the minified files. Since wp_localize_script() hooks into wp_head() (unless you specify in footer in your enqueue) you can use the before </body> minify location and your script will have access to the variables set. On some occasions this has failed for me so I just exclude the script from minify.
|
Q: w3 total cache minification breaks wp_localize_script() I am trying to configure W3 total cache plugin to speed up my site. The minify option is great but I am running into the following issue:
Let's say I have a JavaScript file I am attached wp_localize script() to and it's called 'additions.js'. Because W3TC minifies this JavaScript file and renames it, the wp_localize_script() function no longer sees my 'additions.js' file and the variables inside it don't get shared with it.
Does anyone have a solution for this? Let me know if anything is unclear.
A: W3 Total Cache has 4 locations to include the minified files. Since wp_localize_script() hooks into wp_head() (unless you specify in footer in your enqueue) you can use the before </body> minify location and your script will have access to the variables set. On some occasions this has failed for me so I just exclude the script from minify.
|
wordpress
|
{
"language": "en",
"length": 152,
"provenance": "stackexchange_00019.jsonl.gz:421753",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58180"
}
|
[
0.022064208984375,
-0.0129547119140625,
-0.032135009765625,
-0.06085205078125,
-0.0067291259765625,
-0.01812744140625,
-0.0153656005859375,
0.0193634033203125,
-0.0204925537109375,
0.0159912109375,
-0.012451171875,
0.029876708984375,
-0.04010009765625,
-0.0100860595703125,
-0.0007243156433105469,
-0.0287628173828125,
0.08056640625,
-0.038848876953125,
0.0474853515625,
0.0034847259521484375,
0.002063751220703125,
0.0572509765625,
0.059661865234375,
0.11004638671875,
-0.003841400146484375,
-0.034698486328125,
0.0626220703125,
-0.0245208740234375,
-0.0152435302734375,
-0.031707763671875,
0.007610321044921875,
0.036956787109375,
0.029449462890625,
0.0166015625,
-0.041900634765625,
0.0024814605712890625,
0.0094451904296875,
0.0098724365234375,
-0.0030975341796875,
0.00864410400390625,
0.008636474609375,
-0.0051727294921875,
0.0263214111328125,
0.05108642578125,
-0.0177154541015625,
-0.0234527587890625,
0.004688262939453125,
-0.0262603759765625,
0.0382080078125,
0.04400634765625,
-0.0270538330078125,
0.036590576171875,
-0.0274658203125,
-0.011077880859375,
0.01535797119140625,
0.026519775390625,
-0.019012451171875,
0.0114898681640625,
0.0215301513671875,
0.04278564453125,
-0.00914764404296875,
0.03631591796875,
-0.00984954833984375,
-0.03485107421875,
-0.0343017578125,
0.0006976127624511719,
0.004638671875,
-0.00005829334259033203,
-0.022430419921875,
-0.014007568359375,
0.04010009765625,
-0.00690460205078125,
0.03924560546875,
0.0140838623046875,
0.0208282470703125,
-0.06634521484375,
-0.0223541259765625,
-0.00803375244140625,
0.06256103515625,
0.0002887248992919922,
-0.0006213188171386719,
-0.0094451904296875,
-0.00786590576171875,
-0.01076507568359375,
-0.0252227783203125,
-0.0094757080078125,
-0.01271820068359375,
-0.00685882568359375,
-0.057281494140625,
-0.040496826171875,
-0.0306854248046875,
-0.06451416015625,
-0.060272216796875,
0.0000029802322387695312,
0.0136566162109375,
-0.0233001708984375,
0.0253448486328125,
0.035125732421875,
-0.0262451171875,
0.00627899169921875,
-0.01490020751953125,
-0.010894775390625,
-0.01227569580078125,
-0.023895263671875,
0.0048065185546875,
0.017730712890625,
-0.0143890380859375,
0.040924072265625,
0.052490234375,
0.03887939453125,
0.01116180419921875,
0.033050537109375,
0.0036449432373046875,
-0.00893402099609375,
0.01702880859375,
-0.02783203125,
-0.057891845703125,
0.07867431640625,
0.0015506744384765625,
0.038330078125,
-0.01213836669921875,
0.004215240478515625,
-0.045135498046875,
0.0297088623046875,
-0.005352020263671875,
-0.0579833984375,
-0.0082550048828125,
0.0511474609375,
0.017059326171875,
0.02606201171875,
-0.0333251953125,
0.02191162109375,
0.05047607421875,
-0.0098724365234375,
-0.004695892333984375,
-0.0264434814453125,
0.0184326171875,
-0.01241302490234375,
-0.006694793701171875,
0.019134521484375,
-0.036224365234375,
-0.0107421875,
0.037506103515625,
-0.031402587890625,
-0.004314422607421875,
0.00955963134765625,
0.01027679443359375,
0.013824462890625,
0.004169464111328125,
-0.054412841796875,
0.0282135009765625,
-0.007801055908203125,
0.07183837890625,
-0.01349639892578125,
-0.06842041015625,
-0.058624267578125,
-0.0134429931640625,
-0.0439453125,
-0.00839996337890625,
-0.056732177734375,
-0.02813720703125,
-0.0312042236328125,
-0.034637451171875,
-0.00640869140625,
-0.0233001708984375,
0.032135009765625,
0.053955078125,
0.0135345458984375,
0.0287933349609375,
0.04937744140625,
0.0102691650390625,
-0.02935791015625,
-0.019317626953125,
0.0105438232421875,
0.0024509429931640625,
0.0151824951171875,
-0.006122589111328125,
0.0179901123046875,
0.010406494140625,
-0.0386962890625,
-0.028533935546875,
-0.03875732421875,
0.0537109375,
-0.012969970703125,
-0.05169677734375,
-0.0209808349609375,
0.0191802978515625,
0.02880859375,
0.0174407958984375,
0.006542205810546875,
0.07562255859375,
-0.0032863616943359375,
-0.04998779296875,
0.022369384765625,
-0.01439666748046875,
0.00797271728515625,
-0.0159149169921875,
0.026641845703125,
0.004085540771484375,
-0.03643798828125,
0.036346435546875,
-0.0149688720703125,
0.041656494140625,
-0.01335906982421875,
-0.05548095703125,
0.04534912109375,
-0.039703369140625,
0.0280303955078125,
-0.0207061767578125,
0.0235595703125,
0.0248260498046875,
0.04901123046875,
-0.0469970703125,
-0.018157958984375,
0.00563812255859375,
0.0174407958984375,
-0.004566192626953125,
0.07086181640625,
0.01227569580078125,
-0.004100799560546875,
0.026336669921875,
-0.03900146484375,
0.0372314453125,
0.011016845703125,
0.006999969482421875,
0.0171661376953125,
-0.0267486572265625,
0.014678955078125,
0.0292816162109375,
0.00649261474609375,
0.045074462890625,
0.028778076171875,
-0.015899658203125,
0.050567626953125,
0.0220947265625,
-0.01181793212890625,
0.0165252685546875,
-0.074462890625,
0.038787841796875,
0.032196044921875,
0.0408935546875,
0.057281494140625,
-0.01094818115234375,
-0.00664520263671875,
0.061279296875,
-0.027069091796875,
0.00955963134765625,
-0.006328582763671875,
0.0269775390625,
0.05908203125,
-0.0257110595703125,
-0.0165252685546875,
0.01100921630859375,
-0.091064453125,
0.00804901123046875,
0.034423828125,
-0.01239013671875,
-0.002796173095703125,
0.0011243820190429688,
0.01407623291015625,
0.00542449951171875,
-0.01226043701171875,
-0.0037841796875,
-0.019439697265625,
0.0506591796875,
-0.0189666748046875,
-0.001010894775390625,
-0.004398345947265625,
-0.0291290283203125,
0.036651611328125,
0.029296875,
-0.052276611328125,
0.01024627685546875,
0.0153961181640625,
-0.0245208740234375,
-0.0017910003662109375,
-0.006786346435546875,
0.005306243896484375,
-0.0066070556640625,
-0.004665374755859375,
0.00250244140625,
0.01506805419921875,
-0.03533935546875,
-0.0176849365234375,
0.016204833984375,
-0.04791259765625,
-0.02105712890625,
0.0096588134765625,
-0.005542755126953125,
-0.0111846923828125,
0.00916290283203125,
-0.016082763671875,
-0.0167999267578125,
-0.008544921875,
0.051025390625,
-0.048187255859375,
0.071044921875,
-0.0107574462890625,
0.0129852294921875,
0.0029163360595703125,
0.061767578125,
0.06317138671875,
0.0054473876953125,
0.0005979537963867188,
-0.0184783935546875,
0.021331787109375,
0.004909515380859375,
-0.0308837890625,
-0.0292510986328125,
-0.0298614501953125,
-0.05322265625,
-0.038238525390625,
0.0129852294921875,
0.0240936279296875,
-0.006847381591796875,
-0.039459228515625,
-0.01458740234375,
-0.00603485107421875,
-0.1282958984375,
-0.1297607421875,
-0.021942138671875,
-0.0022563934326171875,
-0.0219268798828125,
0.0272064208984375,
0.00568389892578125,
-0.006305694580078125,
0.02276611328125,
-0.002101898193359375,
-0.028594970703125,
-0.043853759765625,
-0.0249481201171875,
-0.07769775390625,
-0.04290771484375,
-0.0159149169921875,
-0.0021648406982421875,
-0.02374267578125,
0.003314971923828125,
0.0087738037109375,
-0.004489898681640625,
-0.01483154296875,
-0.00881195068359375,
0.0307464599609375,
0.0020809173583984375,
-0.018890380859375,
0.01666259765625,
-0.0175933837890625,
0.03289794921875,
-0.00659942626953125,
-0.038726806640625,
0.034881591796875,
0.0052032470703125,
-0.018402099609375,
0.0005564689636230469,
-0.01024627685546875,
0.042724609375,
0.03900146484375,
-0.0223541259765625,
0.00222015380859375,
0.05535888671875,
-0.035552978515625,
-0.021514892578125,
0.016632080078125,
-0.0198974609375,
-0.0050811767578125,
0.0064239501953125,
-0.0258636474609375,
0.0001823902130126953,
0.01174163818359375,
0.074462890625,
0.01029205322265625,
0.037811279296875,
0.031280517578125,
-0.00799560546875,
-0.0009069442749023438,
0.0278472900390625,
-0.0657958984375,
0.0797119140625,
0.0030059814453125,
-0.0011091232299804688,
0.030303955078125,
0.0125732421875,
0.00994873046875,
-0.039337158203125,
-0.04766845703125,
0.021453857421875,
0.01010894775390625,
-0.01042938232421875,
0.05975341796875,
-0.0189208984375,
-0.0016565322875976562,
-0.03143310546875,
0.03863525390625,
-0.032806396484375,
-0.0137939453125,
-0.04803466796875,
0.0131988525390625,
-0.044952392578125,
-0.05224609375,
0.007198333740234375,
-0.004833221435546875,
-0.01110076904296875,
0.02545166015625,
0.01155853271484375,
0.0104827880859375,
-0.00826263427734375,
0.07501220703125,
0.0175018310546875,
-0.01983642578125,
0.0355224609375,
-0.053375244140625,
0.0059051513671875,
-0.0026416778564453125,
-0.01055145263671875,
-0.035247802734375,
-0.0347900390625,
-0.0303802490234375,
-0.0177154541015625,
0.00099945068359375,
-0.05035400390625,
0.01241302490234375,
0.018524169921875,
-0.0051727294921875,
-0.0172119140625,
-0.00659942626953125,
-0.01282501220703125,
0.01554107666015625,
-0.0084686279296875,
0.0218048095703125,
-0.043914794921875,
0.005306243896484375,
0.0021209716796875,
-0.033721923828125,
-0.007656097412109375,
0.02496337890625,
-0.05072021484375,
0.0023670196533203125,
0.0014171600341796875,
-0.04791259765625,
0.07611083984375,
-0.056365966796875,
-0.02911376953125,
-0.034088134765625,
-0.03515625,
-0.0271148681640625,
-0.037506103515625,
0.02557373046875,
-0.023223876953125,
-0.016693115234375,
0.0296783447265625,
0.0323486328125,
0.0162506103515625,
-0.00777435302734375,
0.01209259033203125,
0.01025390625,
-0.044647216796875,
-0.034332275390625,
0.042022705078125,
0.01172637939453125,
0.009674072265625,
0.061431884765625,
-0.0031890869140625,
-0.010772705078125,
0.0772705078125,
0.0061798095703125,
0.026702880859375,
0.021148681640625,
0.0165557861328125,
-0.0007081031799316406,
-0.04241943359375,
0.05780029296875,
0.021087646484375,
-0.08013916015625,
0.04815673828125,
0.017791748046875,
-0.01727294921875,
-0.00418853759765625,
0.024139404296875,
0.003108978271484375,
-0.03125,
-0.023223876953125,
-0.06512451171875,
0.01274871826171875,
-0.0036468505859375,
0.04364013671875,
0.02471923828125,
-0.0084381103515625,
0.052032470703125,
0.041107177734375,
0.037841796875,
0.02978515625,
0.01338958740234375,
-0.05877685546875,
0.038665771484375,
0.01084136962890625,
-0.02410888671875,
0.040740966796875,
0.00470733642578125,
-0.00020074844360351562,
-0.006725311279296875,
-0.034942626953125,
-0.0180206298828125,
0.0086517333984375,
0.01386260986328125,
-0.00821685791015625,
0.0210113525390625,
0.0306549072265625,
-0.0421142578125,
0.01129913330078125,
0.02001953125,
-0.0264892578125,
-0.025970458984375,
-0.014190673828125,
0.050872802734375,
-0.0010089874267578125,
-0.00732421875,
-0.017974853515625,
0.053375244140625,
-0.049224853515625,
0.0245819091796875,
0.01287841796875,
0.00980377197265625,
-0.00018930435180664062,
0.044464111328125,
-0.001201629638671875,
0.01415252685546875,
-0.0010366439819335938,
0.0416259765625,
0.024383544921875,
0.00110626220703125,
0.0195465087890625,
0.02813720703125,
0.00658416748046875,
-0.017913818359375,
-0.027984619140625,
0.02337646484375,
-0.0272064208984375,
-0.00048041343688964844,
0.0271148681640625,
-0.0160369873046875,
-0.0308380126953125,
-0.035552978515625,
-0.039459228515625,
0.043701171875,
0.002269744873046875,
0.0182952880859375,
-0.01221466064453125,
-0.0253143310546875,
-0.03363037109375,
0.058135986328125,
-0.034210205078125,
-0.04046630859375,
-0.03887939453125,
-0.01145172119140625,
0.01015472412109375,
-0.01548004150390625,
-0.02838134765625,
-0.0609130859375,
0.01548004150390625,
0.005702972412109375,
0.01532745361328125,
0.01386260986328125,
-0.0234832763671875,
-0.0286407470703125,
0.01837158203125,
-0.0107421875,
0.01222991943359375,
0.0010995864868164062,
-0.048858642578125,
0.00536346435546875,
-0.028656005859375,
-0.041717529296875,
-0.0406494140625,
-0.028350830078125,
-0.01513671875,
-0.027252197265625,
0.0306243896484375,
-0.006511688232421875,
0.0207977294921875,
-0.0250091552734375,
-0.0499267578125,
-0.0193939208984375,
0.004550933837890625,
0.02984619140625,
0.0224456787109375,
-0.0552978515625,
0.037445068359375,
0.00502777099609375,
-0.037933349609375,
-0.038818359375,
0.0178680419921875,
0.036773681640625,
0.018035888671875,
0.042022705078125,
-0.052520751953125,
-0.07275390625,
-0.044342041015625,
-0.0655517578125,
0.029754638671875,
0.0384521484375,
-0.02447509765625,
0.058990478515625,
0.010284423828125,
0.0013446807861328125,
0.004314422607421875,
-0.03277587890625,
0.01013946533203125,
0.038848876953125,
0.054718017578125,
0.008575439453125,
0.02996826171875,
-0.0158538818359375,
-0.04339599609375,
0.044464111328125,
0.0128326416015625,
0.05780029296875,
-0.039825439453125,
-0.02215576171875,
0.01690673828125,
0.040435791015625,
0.037139892578125,
0.0426025390625,
0.020263671875,
0.028076171875,
-0.00030875205993652344,
0.0011701583862304688,
-0.0296478271484375,
-0.004009246826171875,
0.002521514892578125,
-0.0252685546875,
-0.028717041015625,
-0.028106689453125,
-0.0196380615234375,
0.00872039794921875,
0.03497314453125,
0.0340576171875,
-0.046844482421875,
-0.001178741455078125,
-0.00017535686492919922,
-0.0237884521484375,
-0.003124237060546875,
-0.0194549560546875,
0.00545501708984375,
-0.0084381103515625,
0.02044677734375,
0.036895751953125,
-0.020233154296875,
0.025848388671875,
0.0229644775390625,
0.0005478858947753906,
-0.0062103271484375,
-0.0005006790161132812,
0.0163726806640625,
-0.01898193359375,
0.0244903564453125,
0.0169677734375,
0.0301666259765625,
-0.012786865234375,
0.01386260986328125,
0.0088043212890625,
-0.0224609375,
-0.021575927734375,
0.032440185546875,
-0.01177978515625,
-0.0200958251953125,
-0.01389312744140625,
-0.02764892578125,
0.039337158203125,
0.0423583984375,
-0.02752685546875,
0.00661468505859375,
0.0010929107666015625,
0.0274505615234375,
0.023590087890625,
-0.0164337158203125,
0.0186920166015625,
0.0205535888671875,
-0.019989013671875,
0.0038013458251953125,
-0.0026760101318359375,
-0.020477294921875,
0.0016241073608398438,
0.035552978515625,
0.034637451171875,
-0.039093017578125,
0.00010466575622558594,
0.03265380859375,
0.04583740234375,
-0.00904083251953125,
0.0006570816040039062,
0.056884765625,
-0.056610107421875,
-0.041656494140625,
0.03045654296875,
-0.040618896484375,
-0.035125732421875,
0.01499176025390625,
-0.049468994140625,
0.1007080078125,
-0.00009679794311523438,
0.050689697265625,
0.0238189697265625,
0.037811279296875,
-0.00843048095703125,
0.034423828125,
-0.023529052734375,
0.09637451171875,
-0.028167724609375,
0.040771484375,
-0.0350341796875,
0.00891876220703125,
0.0310516357421875,
0.0272216796875,
-0.029754638671875,
-0.005825042724609375,
0.022216796875,
-0.01354217529296875,
-0.0076751708984375,
0.01245880126953125,
-0.01690673828125,
0.0016231536865234375,
-0.005523681640625,
0.005126953125,
-0.016815185546875,
-0.03515625,
0.011138916015625,
-0.040618896484375,
-0.032073974609375,
0.0074005126953125,
0.0118865966796875,
0.005985260009765625,
-0.01090240478515625,
0.06475830078125,
-0.019927978515625,
-0.006805419921875,
0.023162841796875,
0.00447845458984375,
-0.00998687744140625,
0.03070068359375,
-0.031341552734375,
0.0175018310546875,
-0.021087646484375,
-0.00862884521484375,
0.007541656494140625,
-0.0256805419921875,
-0.0001806020736694336,
0.0277252197265625,
0.00988006591796875,
0.0166473388671875,
-0.005603790283203125,
-0.0158538818359375,
0.00009226799011230469,
-0.002597808837890625,
0.00864410400390625,
0.0222930908203125,
0.05328369140625,
0.0252532958984375,
0.0022411346435546875,
0.01372528076171875,
0.0096282958984375,
-0.003391265869140625,
-0.0264129638671875,
0.01727294921875,
0.0165252685546875,
-0.0048828125,
-0.036895751953125,
0.005466461181640625,
-0.05145263671875,
0.01020050048828125,
0.048248291015625,
-0.0241241455078125,
0.0163726806640625,
-0.0220947265625,
0.035675048828125,
0.04901123046875,
0.0132293701171875,
0.02337646484375,
-0.04998779296875,
-0.0090484619140625,
0.0177764892578125,
0.0802001953125,
0.039215087890625,
0.0465087890625,
0.00543975830078125,
-0.03717041015625,
-0.0210723876953125,
0.01436614990234375,
0.041595458984375,
-0.0020503997802734375,
-0.038177490234375,
-0.002750396728515625,
0.04754638671875,
0.0333251953125,
0.031951904296875,
-0.0016870498657226562,
0.035736083984375,
0.014556884765625,
-0.0452880859375,
0.0028095245361328125,
0.064208984375,
-0.0259857177734375,
0.05267333984375,
-0.01116180419921875,
0.0250091552734375,
-0.001766204833984375,
-0.0238037109375,
-0.008453369140625,
0.033935546875,
0.0244903564453125,
0.00936126708984375,
-0.026641845703125,
0.0183258056640625,
-0.03582763671875,
0.05230712890625,
0.0171661376953125,
0.050689697265625,
0.037841796875,
0.01092529296875,
0.0198211669921875,
-0.039459228515625,
-0.046600341796875,
0.0212554931640625,
0.0298614501953125,
-0.01041412353515625,
0.0263824462890625,
0.051300048828125,
-0.0587158203125,
0.039459228515625,
0.0009489059448242188,
0.041656494140625,
-0.0288848876953125,
-0.01050567626953125,
-0.006710052490234375,
-0.033721923828125,
-0.0296173095703125,
-0.00431060791015625,
0.044342041015625,
0.0098876953125,
0.0126190185546875,
-0.00200653076171875,
0.02655029296875,
0.0271453857421875,
-0.044036865234375,
0.06402587890625,
0.0478515625,
-0.042083740234375,
0.0202178955078125,
0.0043182373046875,
-0.0196075439453125,
-0.045654296875,
0.00441741943359375,
0.025848388671875,
-0.01222991943359375,
0.01502227783203125,
-0.02783203125,
0.0190887451171875,
-0.00942230224609375,
0.006855010986328125,
-0.049560546875,
-0.042327880859375,
-0.02215576171875,
-0.002719879150390625,
-0.01270294189453125,
-0.024444580078125,
0.0155487060546875,
-0.0098114013671875,
0.02850341796875,
-0.03314208984375,
0.0382080078125,
0.01068115234375,
0.054107666015625,
0.022186279296875,
0.00841522216796875,
-0.0002491474151611328,
0.0038509368896484375,
-0.014617919921875,
0.01346588134765625,
0.019683837890625,
0.006191253662109375,
-0.005397796630859375,
0.0136260986328125,
0.00801849365234375,
0.0257568359375,
0.03741455078125,
-0.0031681060791015625,
0.00571441650390625,
0.0139007568359375,
-0.01305389404296875,
-0.01349639892578125,
0.04302978515625,
-0.0249481201171875,
-0.0134429931640625,
-0.0062713623046875,
0.0108642578125,
0.0031375885009765625,
-0.0030689239501953125,
-0.053680419921875,
-0.00860595703125,
0.007598876953125,
-0.006103515625,
-0.0616455078125,
0.0390625,
-0.0382080078125,
0.032867431640625,
-0.033538818359375,
-0.00384521484375,
-0.04010009765625,
-0.0322265625,
-0.0252532958984375,
-0.043060302734375,
-0.07080078125,
0.046051025390625,
-0.042022705078125,
0.017242431640625,
0.05157470703125,
0.015533447265625,
-0.038909912109375,
0.0112457275390625,
-0.01236724853515625,
0.0618896484375,
-0.1011962890625,
-0.01386260986328125,
0.02392578125,
0.0000807642936706543,
-0.00975799560546875,
-0.041778564453125,
0.008941650390625,
-0.060943603515625,
0.008941650390625,
-0.01467132568359375,
-0.0143280029296875,
-0.01380157470703125,
-0.046112060546875,
-0.055511474609375,
0.049957275390625,
0.003894805908203125,
-0.0305328369140625,
-0.053863525390625,
-0.005336761474609375,
-0.0019464492797851562,
0.0305328369140625,
-0.01776123046875,
-0.0174102783203125,
-0.048370361328125,
0.01528167724609375,
0.035186767578125,
0.013824462890625,
0.05804443359375,
-0.01096343994140625,
-0.050445556640625,
-0.0129852294921875,
-0.0129241943359375,
0.05035400390625,
-0.002605438232421875,
0.022216796875,
0.0088653564453125,
0.061431884765625,
-0.0126495361328125,
-0.027557373046875,
-0.005767822265625,
-0.00946807861328125,
0.0018796920776367188,
-0.016021728515625,
-0.049957275390625,
-0.0087890625,
0.044586181640625,
0.04718017578125,
0.0213623046875,
-0.0289306640625,
0.05474853515625,
0.006961822509765625,
-0.044158935546875,
-0.00701904296875,
0.01025390625,
-0.0263824462890625,
-0.0171051025390625,
0.0024662017822265625,
-0.01209259033203125,
-0.0213775634765625,
0.0023822784423828125,
-0.0222930908203125,
-0.0181427001953125,
0.0312347412109375,
-0.01018524169921875,
0.01100921630859375,
-0.0380859375,
0.0279998779296875,
-0.0218048095703125,
-0.0223388671875,
0.005268096923828125,
0.039154052734375,
-0.00714874267578125,
0.007564544677734375,
-0.08319091796875,
-0.0009298324584960938,
0.03851318359375,
0.02679443359375,
-0.0161895751953125,
0.036285400390625,
0.000034928321838378906,
0.0567626953125,
-0.00485992431640625,
0.0008759498596191406,
0.01183319091796875,
0.005950927734375,
-0.034881591796875,
0.0288543701171875,
0.00513458251953125,
-0.03509521484375,
-0.0306243896484375,
-0.0093231201171875,
-0.022735595703125,
0.0225372314453125,
-0.00798797607421875,
0.019012451171875,
0.042388916015625,
-0.018890380859375,
-0.0012578964233398438,
0.022430419921875,
0.007289886474609375,
-0.04656982421875,
0.0177459716796875,
-0.10577392578125,
0.02398681640625,
0.007526397705078125
] |
c7eb6aa78b816074aa1c606c820d3edf7a2f53c3
|
Wordpress Stackexchange
Q: How to replace bloginfo(template_url) Basically I've used bloginfo(template_url) in a WordPress theme, but when I run theme-checker, it recommends to replace bloginfo(template_url) with get_template_directory_uri(), however when I use get_template_directory_uri() it doesn't work. It works fine if I use it to replace get_bloginfo(template_url) but that's not what I want now. Is bloginfo(template_url) being deprecated? If it is, what is it's replacement?
Thanks
A: bloginfo($option) echos out a value whereas get_template_directory_uri() returns a string - did you maybe forget to echo get_template_directory_uri()? Also are you passing a string with quotes i.e. bloginfo(template_url) vs bloginfo('template_url')?
Both bloginfo('template_url') and get_template_directory_uri() should work, they aren't deprecated.
|
Q: How to replace bloginfo(template_url) Basically I've used bloginfo(template_url) in a WordPress theme, but when I run theme-checker, it recommends to replace bloginfo(template_url) with get_template_directory_uri(), however when I use get_template_directory_uri() it doesn't work. It works fine if I use it to replace get_bloginfo(template_url) but that's not what I want now. Is bloginfo(template_url) being deprecated? If it is, what is it's replacement?
Thanks
A: bloginfo($option) echos out a value whereas get_template_directory_uri() returns a string - did you maybe forget to echo get_template_directory_uri()? Also are you passing a string with quotes i.e. bloginfo(template_url) vs bloginfo('template_url')?
Both bloginfo('template_url') and get_template_directory_uri() should work, they aren't deprecated.
A: bloginfo is a wrapper for get_bloginfo, which just calls those functions directly:
function get_bloginfo( $show = '', $filter = 'raw' ) {
case 'stylesheet_directory':
$output = get_stylesheet_directory_uri();
break;
case 'template_directory':
case 'template_url':
$output = get_template_directory_uri();
break;
so it's ultimately exactly the same output.
A: This is the right way -
<?php echo get_template_directory_uri(); ?>
A: You Can use both
<?php echo get_template_directory_uri(); ?>
<?php echo get_bloginfo('template_url'); ?>
|
wordpress
|
{
"language": "en",
"length": 170,
"provenance": "stackexchange_00019.jsonl.gz:421761",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58200"
}
|
[
0.00543975830078125,
-0.057403564453125,
0.0026226043701171875,
-0.034088134765625,
-0.031982421875,
-0.0181884765625,
0.03155517578125,
0.028106689453125,
0.045989990234375,
0.0245513916015625,
-0.02667236328125,
-0.040863037109375,
0.0197296142578125,
-0.016387939453125,
-0.0260009765625,
-0.0187835693359375,
0.03228759765625,
-0.034423828125,
0.0205535888671875,
-0.0200653076171875,
0.038421630859375,
-0.006931304931640625,
0.01195526123046875,
0.0416259765625,
0.04791259765625,
-0.045440673828125,
0.06707763671875,
-0.0096282958984375,
0.0172576904296875,
-0.0279388427734375,
0.02069091796875,
0.0018815994262695312,
0.02117919921875,
0.02886962890625,
-0.036041259765625,
-0.02655029296875,
-0.021148681640625,
0.03204345703125,
-0.01273345947265625,
0.021514892578125,
-0.0001913309097290039,
0.01006317138671875,
-0.0169219970703125,
-0.0275726318359375,
-0.02618408203125,
-0.0423583984375,
0.018096923828125,
-0.01390838623046875,
0.01294708251953125,
0.005062103271484375,
0.01800537109375,
-0.01372528076171875,
0.0168609619140625,
0.04705810546875,
-0.0299224853515625,
-0.030975341796875,
0.022857666015625,
0.0299530029296875,
0.0092315673828125,
-0.03741455078125,
-0.029022216796875,
0.0479736328125,
0.00818634033203125,
0.0197601318359375,
-0.00981903076171875,
0.0001990795135498047,
0.0026607513427734375,
0.03179931640625,
-0.04656982421875,
-0.0162353515625,
0.032501220703125,
-0.0213165283203125,
-0.005279541015625,
-0.0284271240234375,
-0.009521484375,
0.016998291015625,
0.0201416015625,
-0.00708770751953125,
-0.01200103759765625,
0.00908660888671875,
0.0226898193359375,
-0.0198822021484375,
-0.013702392578125,
-0.0207977294921875,
0.054290771484375,
0.023040771484375,
0.007518768310546875,
-0.0248260498046875,
-0.05328369140625,
-0.00620269775390625,
-0.037017822265625,
-0.042236328125,
-0.05303955078125,
0.0021305084228515625,
-0.00553131103515625,
0.006134033203125,
0.0026187896728515625,
0.06744384765625,
-0.048248291015625,
0.00022780895233154297,
-0.03253173828125,
0.0008935928344726562,
-0.01056671142578125,
-0.02978515625,
0.008453369140625,
0.05322265625,
0.006099700927734375,
0.053466796875,
0.042266845703125,
0.01019287109375,
0.00629425048828125,
-0.007770538330078125,
-0.042877197265625,
-0.051788330078125,
-0.0252685546875,
0.056976318359375,
-0.031402587890625,
-0.0230255126953125,
0.0107879638671875,
-0.0218963623046875,
0.0236968994140625,
0.0411376953125,
0.0252532958984375,
-0.038970947265625,
-0.0229644775390625,
-0.0165863037109375,
-0.018341064453125,
-0.046173095703125,
-0.00978851318359375,
0.03363037109375,
-0.003173828125,
0.0126495361328125,
0.004268646240234375,
-0.021575927734375,
-0.036712646484375,
-0.033538818359375,
-0.0023193359375,
0.012786865234375,
0.0240020751953125,
-0.030242919921875,
0.042755126953125,
-0.00841522216796875,
0.00919342041015625,
0.033599853515625,
-0.008026123046875,
-0.01027679443359375,
0.0252227783203125,
0.0251312255859375,
0.0028781890869140625,
-0.013153076171875,
-0.024627685546875,
0.033294677734375,
0.03790283203125,
-0.005039215087890625,
-0.00237274169921875,
-0.07061767578125,
0.0118408203125,
-0.057891845703125,
0.04302978515625,
-0.06182861328125,
-0.023529052734375,
-0.00762939453125,
0.0174560546875,
-0.0377197265625,
-0.0550537109375,
-0.00736236572265625,
-0.0161895751953125,
-0.0172882080078125,
0.0258941650390625,
-0.003753662109375,
0.0706787109375,
-0.040863037109375,
-0.0126190185546875,
0.0110626220703125,
0.0186767578125,
0.0016946792602539062,
-0.01526641845703125,
0.02679443359375,
0.0294036865234375,
0.01434326171875,
0.0087127685546875,
-0.01284027099609375,
0.07647705078125,
0.0027828216552734375,
-0.0567626953125,
0.0287933349609375,
0.0007953643798828125,
0.021026611328125,
0.01259613037109375,
0.0034465789794921875,
0.03985595703125,
0.03045654296875,
-0.054290771484375,
0.049407958984375,
0.0240325927734375,
-0.01486968994140625,
-0.0078582763671875,
0.01200103759765625,
0.00013124942779541016,
-0.057647705078125,
0.005046844482421875,
0.037384033203125,
-0.034423828125,
0.012908935546875,
-0.06201171875,
0.005466461181640625,
-0.00923919677734375,
0.043243408203125,
-0.0094757080078125,
0.037353515625,
0.0111541748046875,
0.013153076171875,
-0.0273895263671875,
0.005451202392578125,
0.0021724700927734375,
0.01537322998046875,
-0.02032470703125,
0.006435394287109375,
-0.005619049072265625,
0.005420684814453125,
-0.012298583984375,
0.01512908935546875,
-0.0157012939453125,
0.004482269287109375,
0.045135498046875,
-0.014007568359375,
-0.00524139404296875,
-0.0281524658203125,
-0.000946044921875,
0.0187225341796875,
-0.0975341796875,
0.03668212890625,
-0.00669097900390625,
0.00750732421875,
-0.019439697265625,
-0.01715087890625,
-0.002674102783203125,
-0.045867919921875,
0.02593994140625,
0.052764892578125,
0.039154052734375,
0.036956787109375,
-0.004215240478515625,
-0.0311126708984375,
0.061004638671875,
-0.005157470703125,
0.0273590087890625,
-0.0222320556640625,
0.0287017822265625,
0.06439208984375,
-0.03375244140625,
-0.0164031982421875,
0.0004820823669433594,
0.02813720703125,
-0.0278472900390625,
0.031402587890625,
0.0141448974609375,
-0.0306243896484375,
0.00994873046875,
0.052032470703125,
-0.01177215576171875,
0.05084228515625,
-0.007312774658203125,
0.0257720947265625,
0.0034885406494140625,
0.0201416015625,
-0.00951385498046875,
-0.010650634765625,
-0.054534912109375,
0.0285491943359375,
0.038055419921875,
0.0166168212890625,
0.0147857666015625,
0.06341552734375,
-0.00583648681640625,
0.004207611083984375,
0.032806396484375,
-0.034149169921875,
-0.0115814208984375,
0.0172271728515625,
-0.003620147705078125,
0.0430908203125,
-0.058380126953125,
-0.01824951171875,
-0.0038928985595703125,
-0.044525146484375,
-0.02044677734375,
0.0311279296875,
0.0185699462890625,
0.0271148681640625,
0.0418701171875,
0.0100555419921875,
-0.02069091796875,
0.04986572265625,
-0.036956787109375,
-0.0237884521484375,
0.01178741455078125,
-0.03863525390625,
0.021484375,
-0.0011625289916992188,
0.04241943359375,
0.052215576171875,
0.03216552734375,
-0.0264434814453125,
-0.00554656982421875,
0.045501708984375,
-0.006023406982421875,
-0.0006165504455566406,
-0.0037670135498046875,
-0.0005884170532226562,
-0.0274658203125,
0.0251617431640625,
0.0055084228515625,
-0.0268402099609375,
-0.0057373046875,
-0.0227203369140625,
-0.031646728515625,
-0.032073974609375,
-0.0787353515625,
-0.0244293212890625,
-0.00101470947265625,
-0.02386474609375,
-0.025177001953125,
0.005886077880859375,
-0.016693115234375,
0.011505126953125,
0.0028591156005859375,
-0.004703521728515625,
0.065673828125,
-0.06201171875,
-0.092041015625,
-0.08892822265625,
-0.096923828125,
-0.06817626953125,
-0.0224609375,
-0.0200958251953125,
0.0029697418212890625,
-0.007450103759765625,
-0.002361297607421875,
-0.049072265625,
0.039093017578125,
0.039642333984375,
0.03326416015625,
0.0545654296875,
0.037994384765625,
-0.0151824951171875,
0.0017709732055664062,
0.0018901824951171875,
0.0222015380859375,
0.043060302734375,
-0.054473876953125,
0.0035648345947265625,
-0.00373077392578125,
-0.01739501953125,
-0.0027179718017578125,
-0.01016998291015625,
0.007843017578125,
-0.00025844573974609375,
0.005931854248046875,
-0.039337158203125,
-0.0279693603515625,
-0.051361083984375,
-0.049591064453125,
0.12139892578125,
0.06610107421875,
-0.0114593505859375,
-0.01372528076171875,
0.0302886962890625,
-0.005413055419921875,
-0.006839752197265625,
0.01453399658203125,
-0.01873779296875,
0.0216827392578125,
-0.007160186767578125,
-0.006206512451171875,
-0.00312042236328125,
0.027923583984375,
-0.0112152099609375,
-0.0285186767578125,
-0.009521484375,
0.0101776123046875,
0.003910064697265625,
-0.01549530029296875,
-0.006229400634765625,
-0.0423583984375,
0.022552490234375,
-0.0418701171875,
0.021820068359375,
-0.029388427734375,
-0.0042724609375,
-0.0179595947265625,
0.06842041015625,
-0.044097900390625,
-0.0263214111328125,
-0.0022296905517578125,
0.0287322998046875,
-0.0163421630859375,
-0.055816650390625,
-0.019195556640625,
-0.00714874267578125,
-0.047027587890625,
-0.02423095703125,
-0.00251007080078125,
-0.04534912109375,
0.013946533203125,
-0.018157958984375,
-0.00977325439453125,
-0.0352783203125,
0.00592041015625,
0.04150390625,
0.011627197265625,
0.0093536376953125,
0.0004596710205078125,
0.01751708984375,
0.01134490966796875,
-0.01526641845703125,
-0.037017822265625,
-0.026824951171875,
-0.003353118896484375,
0.058685302734375,
0.030517578125,
-0.054779052734375,
-0.004863739013671875,
0.0303192138671875,
-0.004055023193359375,
0.0013790130615234375,
0.004497528076171875,
0.01268768310546875,
-0.023284912109375,
0.0164337158203125,
0.00997161865234375,
-0.01593017578125,
-0.0157928466796875,
-0.0295257568359375,
-0.045440673828125,
0.006160736083984375,
0.0002911090850830078,
0.01849365234375,
0.0307464599609375,
-0.0165557861328125,
-0.042205810546875,
-0.0142059326171875,
-0.0011739730834960938,
0.0004987716674804688,
0.01026153564453125,
-0.026641845703125,
0.0038509368896484375,
-0.0294952392578125,
0.0340576171875,
0.024200439453125,
-0.0130615234375,
-0.02362060546875,
0.0845947265625,
0.033050537109375,
-0.025543212890625,
0.053375244140625,
0.00873565673828125,
0.01580810546875,
0.0015630722045898438,
0.040252685546875,
0.036376953125,
-0.0005445480346679688,
0.0091552734375,
-0.00862884521484375,
0.0184478759765625,
0.0013561248779296875,
0.006465911865234375,
0.00829315185546875,
-0.0251617431640625,
0.032989501953125,
0.00426483154296875,
-0.0134735107421875,
0.036834716796875,
0.0122528076171875,
-0.0299530029296875,
-0.034271240234375,
0.0313720703125,
0.018707275390625,
0.0018758773803710938,
-0.0260009765625,
-0.083984375,
0.0262603759765625,
-0.032806396484375,
0.0009174346923828125,
0.018585205078125,
-0.02496337890625,
0.06243896484375,
0.0012655258178710938,
-0.028961181640625,
0.034576416015625,
0.047332763671875,
0.0174560546875,
0.0209503173828125,
0.005466461181640625,
-0.034942626953125,
-0.0252227783203125,
-0.01302337646484375,
0.0225677490234375,
0.01073455810546875,
-0.01482391357421875,
-0.01383209228515625,
0.00469970703125,
0.0242767333984375,
0.0010747909545898438,
-0.01490020751953125,
0.054290771484375,
0.040283203125,
-0.01186370849609375,
-0.01494598388671875,
-0.03314208984375,
-0.0138397216796875,
-0.057861328125,
0.0333251953125,
0.0279388427734375,
-0.01654052734375,
0.00560760498046875,
0.0026397705078125,
0.012237548828125,
-0.0141448974609375,
-0.006008148193359375,
-0.0185394287109375,
-0.01200103759765625,
0.0085906982421875,
0.046783447265625,
-0.0201416015625,
0.00797271728515625,
-0.0369873046875,
0.02532958984375,
-0.0080718994140625,
-0.00949859619140625,
-0.01331329345703125,
0.01885986328125,
-0.055633544921875,
-0.020904541015625,
0.030120849609375,
-0.0259246826171875,
0.01171875,
0.00830841064453125,
-0.0227203369140625,
-0.02581787109375,
-0.01235198974609375,
0.034393310546875,
0.028839111328125,
-0.0233612060546875,
0.001453399658203125,
-0.0126495361328125,
-0.0212249755859375,
-0.03033447265625,
0.03411865234375,
-0.038970947265625,
-0.0151824951171875,
-0.00887298583984375,
-0.0101318359375,
-0.02435302734375,
-0.023834228515625,
-0.03125,
-0.032958984375,
-0.00914764404296875,
0.0060882568359375,
0.04559326171875,
-0.073974609375,
0.0275115966796875,
0.0038604736328125,
-0.01451873779296875,
-0.029876708984375,
0.03277587890625,
0.0360107421875,
0.06121826171875,
-0.052490234375,
0.021453857421875,
-0.02838134765625,
-0.001392364501953125,
-0.014678955078125,
-0.036834716796875,
-0.053802490234375,
-0.0198211669921875,
0.0009527206420898438,
0.0259246826171875,
0.002655029296875,
0.031341552734375,
0.0276031494140625,
0.02886962890625,
-0.016448974609375,
0.0859375,
0.0225067138671875,
-0.020751953125,
0.0212554931640625,
-0.046112060546875,
0.0249481201171875,
0.0065460205078125,
0.00403594970703125,
-0.0309906005859375,
0.005649566650390625,
-0.0045623779296875,
-0.0218353271484375,
-0.027435302734375,
0.005489349365234375,
0.0279693603515625,
0.07989501953125,
0.004566192626953125,
-0.0190887451171875,
-0.0103302001953125,
-0.00848388671875,
-0.03643798828125,
0.021209716796875,
-0.0098419189453125,
0.00846099853515625,
-0.050567626953125,
-0.015960693359375,
-0.002864837646484375,
0.019317626953125,
0.016143798828125,
0.006343841552734375,
0.01215362548828125,
-0.0095977783203125,
-0.015899658203125,
-0.0648193359375,
0.1026611328125,
0.07916259765625,
0.0289459228515625,
0.05047607421875,
-0.004489898681640625,
0.006946563720703125,
-0.0208892822265625,
0.0274505615234375,
0.0001430511474609375,
-0.0070343017578125,
0.04998779296875,
0.01324462890625,
-0.01110076904296875,
0.023040771484375,
-0.045074462890625,
0.0303192138671875,
0.02008056640625,
0.031036376953125,
-0.053741455078125,
0.0012149810791015625,
0.01461029052734375,
-0.016998291015625,
0.0394287109375,
-0.005420684814453125,
-0.01479339599609375,
-0.027984619140625,
0.04364013671875,
-0.0213623046875,
-0.0101165771484375,
0.003936767578125,
0.005458831787109375,
-0.0269622802734375,
-0.01055145263671875,
0.0343017578125,
0.018218994140625,
-0.0163421630859375,
0.001922607421875,
0.02337646484375,
-0.01155853271484375,
-0.0192718505859375,
0.024505615234375,
-0.0098876953125,
-0.005405426025390625,
-0.0611572265625,
0.002330780029296875,
-0.0205841064453125,
-0.017547607421875,
0.00970458984375,
0.057098388671875,
0.033782958984375,
0.040771484375,
0.0293731689453125,
-0.026123046875,
0.0157318115234375,
0.0263671875,
0.01172637939453125,
-0.01898193359375,
-0.01378631591796875,
0.04833984375,
-0.01303863525390625,
0.00785064697265625,
0.0045318603515625,
0.0105743408203125,
-0.0110321044921875,
0.0141754150390625,
0.12139892578125,
-0.018157958984375,
-0.031707763671875,
0.042633056640625,
-0.01222991943359375,
-0.04705810546875,
-0.01335906982421875,
0.053924560546875,
-0.07440185546875,
-0.045745849609375,
0.01904296875,
-0.03778076171875,
-0.03106689453125,
-0.0197296142578125,
-0.09552001953125,
0.11224365234375,
0.0243072509765625,
0.06768798828125,
0.002552032470703125,
0.028167724609375,
-0.05255126953125,
0.0008516311645507812,
-0.003570556640625,
0.0182342529296875,
-0.0301513671875,
-0.01009368896484375,
-0.0035266876220703125,
0.0118255615234375,
-0.008941650390625,
0.0208892822265625,
0.0477294921875,
0.0094451904296875,
0.0158843994140625,
-0.02923583984375,
0.01012420654296875,
-0.0020580291748046875,
-0.03875732421875,
0.00855255126953125,
0.006175994873046875,
0.013519287109375,
0.0030002593994140625,
-0.044830322265625,
0.00890350341796875,
-0.0439453125,
-0.00753021240234375,
0.034881591796875,
0.00658416748046875,
-0.01087188720703125,
0.00449371337890625,
-0.040557861328125,
-0.053955078125,
0.004070281982421875,
0.0253448486328125,
-0.040740966796875,
0.0234375,
0.0194854736328125,
0.003658294677734375,
-0.0228118896484375,
-0.004268646240234375,
-0.01885986328125,
0.03314208984375,
-0.027252197265625,
-0.0032978057861328125,
-0.00972747802734375,
0.015228271484375,
0.0164337158203125,
-0.04864501953125,
-0.0166778564453125,
0.0117034912109375,
-0.01898193359375,
0.0732421875,
0.0216827392578125,
0.026519775390625,
-0.03173828125,
0.036834716796875,
0.058502197265625,
0.0604248046875,
-0.03955078125,
-0.0206756591796875,
0.005908966064453125,
0.004085540771484375,
0.0008921623229980469,
-0.031494140625,
-0.026153564453125,
-0.0281524658203125,
0.007282257080078125,
-0.033660888671875,
-0.0225982666015625,
0.0252685546875,
0.0007009506225585938,
-0.001766204833984375,
0.0029850006103515625,
0.0003771781921386719,
-0.0259552001953125,
-0.047698974609375,
0.0094451904296875,
0.041961669921875,
0.0704345703125,
0.00763702392578125,
0.056976318359375,
-0.03729248046875,
-0.03204345703125,
-0.037353515625,
0.046051025390625,
-0.0016603469848632812,
0.04046630859375,
-0.05633544921875,
-0.0282135009765625,
0.029693603515625,
0.05267333984375,
0.03765869140625,
0.032562255859375,
0.0024318695068359375,
-0.0224456787109375,
0.0159149169921875,
0.021392822265625,
0.01450347900390625,
-0.0268707275390625,
0.05120849609375,
-0.047515869140625,
0.022430419921875,
-0.01557159423828125,
-0.0183258056640625,
-0.032867431640625,
-0.01560211181640625,
0.030487060546875,
-0.034820556640625,
0.0628662109375,
-0.007656097412109375,
-0.0026874542236328125,
0.014862060546875,
0.003116607666015625,
0.044525146484375,
0.018707275390625,
-0.028289794921875,
-0.020294189453125,
-0.007415771484375,
-0.01136016845703125,
0.005794525146484375,
0.034576416015625,
-0.0033206939697265625,
0.01265716552734375,
-0.01329803466796875,
0.0266571044921875,
-0.05096435546875,
-0.00711822509765625,
0.01055908203125,
-0.0234222412109375,
0.01873779296875,
0.00592803955078125,
0.003772735595703125,
-0.028411865234375,
0.006229400634765625,
0.0545654296875,
-0.006038665771484375,
0.10064697265625,
-0.05535888671875,
0.01372528076171875,
0.006954193115234375,
-0.00493621826171875,
-0.017547607421875,
0.00844573974609375,
-0.0118560791015625,
-0.0560302734375,
-0.0216827392578125,
0.01261138916015625,
-0.01119232177734375,
0.0175018310546875,
0.04412841796875,
-0.034149169921875,
0.0292510986328125,
-0.01342010498046875,
0.0003502368927001953,
-0.053497314453125,
-0.007190704345703125,
-0.029388427734375,
-0.06280517578125,
-0.0157928466796875,
0.01444244384765625,
0.0031642913818359375,
0.01580810546875,
-0.013671875,
0.07232666015625,
0.0088043212890625,
-0.0095977783203125,
0.01346588134765625,
-0.05615234375,
0.0239105224609375,
0.0302886962890625,
-0.006488800048828125,
-0.0073089599609375,
0.00910186767578125,
-0.0172882080078125,
0.01548004150390625,
0.0012187957763671875,
0.03265380859375,
-0.00609588623046875,
-0.0167236328125,
-0.00893402099609375,
-0.042694091796875,
0.0249176025390625,
-0.0311431884765625,
0.00595855712890625,
-0.031158447265625,
0.050933837890625,
0.0159149169921875,
-0.024444580078125,
-0.0110015869140625,
-0.01032257080078125,
-0.0162506103515625,
0.01288604736328125,
-0.004367828369140625,
-0.0255584716796875,
-0.008941650390625,
0.000045239925384521484,
-0.00620269775390625,
-0.002666473388671875,
-0.012298583984375,
0.019744873046875,
-0.01165008544921875,
-0.00945281982421875,
-0.02813720703125,
-0.00930023193359375,
0.0157623291015625,
0.057098388671875,
-0.0307464599609375,
-0.0169219970703125,
-0.0010671615600585938,
-0.0029296875,
-0.032257080078125,
0.00948333740234375,
0.057891845703125,
-0.00252532958984375,
-0.06884765625,
0.03656005859375,
-0.0186309814453125,
0.08251953125,
-0.0889892578125,
-0.034820556640625,
-0.023193359375,
0.00030994415283203125,
-0.021148681640625,
-0.062225341796875,
0.016845703125,
-0.07135009765625,
-0.01035308837890625,
0.0438232421875,
-0.044586181640625,
-0.0180511474609375,
-0.03948974609375,
-0.0753173828125,
0.050567626953125,
0.02099609375,
-0.03961181640625,
-0.039459228515625,
-0.02508544921875,
0.0060577392578125,
0.039337158203125,
-0.00215911865234375,
-0.01306915283203125,
-0.05572509765625,
0.0211029052734375,
-0.006565093994140625,
0.04144287109375,
0.032958984375,
-0.017242431640625,
-0.0164031982421875,
-0.00604248046875,
-0.006114959716796875,
-0.0040283203125,
-0.002384185791015625,
-0.038482666015625,
0.035003662109375,
0.021270751953125,
-0.034637451171875,
-0.02667236328125,
0.023468017578125,
-0.0016756057739257812,
-0.0223388671875,
0.003131866455078125,
0.010955810546875,
0.04156494140625,
0.06884765625,
0.06317138671875,
0.0122833251953125,
-0.063720703125,
-0.0074005126953125,
-0.00983428955078125,
-0.0287628173828125,
0.004207611083984375,
0.05010986328125,
-0.09130859375,
-0.01172637939453125,
0.06561279296875,
-0.005725860595703125,
-0.0193023681640625,
-0.02362060546875,
-0.035614013671875,
-0.01312255859375,
-0.0180816650390625,
0.01340484619140625,
-0.0251007080078125,
-0.005889892578125,
0.0848388671875,
-0.041107177734375,
0.00927734375,
-0.00894927978515625,
0.030059814453125,
0.028839111328125,
-0.03997802734375,
0.006961822509765625,
0.01290130615234375,
-0.03173828125,
0.00955963134765625,
0.00988006591796875,
0.029205322265625,
-0.00547027587890625,
-0.026702880859375,
-0.0005826950073242188,
-0.0008435249328613281,
-0.016632080078125,
-0.021209716796875,
0.00153350830078125,
0.02362060546875,
-0.018463134765625,
0.0948486328125,
-0.023712158203125,
0.059783935546875,
-0.007503509521484375,
0.05194091796875,
-0.0118255615234375,
0.0025424957275390625,
0.01317596435546875,
0.012054443359375,
0.004322052001953125,
0.01165771484375,
-0.0285491943359375,
-0.037567138671875,
0.005649566650390625,
-0.004238128662109375,
-0.0115203857421875,
0.00405120849609375
] |
e810e37ed45b29d931fd5c1793e11bc3a57b7672
|
Wordpress Stackexchange
Q: Adding a rich text editor to Excerpt I need add to the excerpt field the TinyMCE Advanced editor, any ideas?
I have the qTranslate plugin (multilanguage), and it's impossible to connect teh excerpt with this plugin and an editor.
Thanks
A: A simple way is to use the plugin Rich Text Excerpt
The Plugin uses the wp_editor function to generate a rich text editor for page/post excerpts, so will only work in WordPress 3.3 or greater.
|
Q: Adding a rich text editor to Excerpt I need add to the excerpt field the TinyMCE Advanced editor, any ideas?
I have the qTranslate plugin (multilanguage), and it's impossible to connect teh excerpt with this plugin and an editor.
Thanks
A: A simple way is to use the plugin Rich Text Excerpt
The Plugin uses the wp_editor function to generate a rich text editor for page/post excerpts, so will only work in WordPress 3.3 or greater.
A: Just replace the default output. Make sure you unescape the excerpt before you send it to the editor:
add_action( 'add_meta_boxes', array ( 'T5_Richtext_Excerpt', 'switch_boxes' ) );
/**
* Replaces the default excerpt editor with TinyMCE.
*/
class T5_Richtext_Excerpt
{
/**
* Replaces the meta boxes.
*
* @return void
*/
public static function switch_boxes()
{
if ( ! post_type_supports( $GLOBALS['post']->post_type, 'excerpt' ) )
{
return;
}
remove_meta_box(
'postexcerpt' // ID
, '' // Screen, empty to support all post types
, 'normal' // Context
);
add_meta_box(
'postexcerpt2' // Reusing just 'postexcerpt' doesn't work.
, __( 'Excerpt' ) // Title
, array ( __CLASS__, 'show' ) // Display function
, null // Screen, we use all screens with meta boxes.
, 'normal' // Context
, 'core' // Priority
);
}
/**
* Output for the meta box.
*
* @param object $post
* @return void
*/
public static function show( $post )
{
?>
<label class="screen-reader-text" for="excerpt"><?php
_e( 'Excerpt' )
?></label>
<?php
// We use the default name, 'excerpt', so we don’t have to care about
// saving, other filters etc.
wp_editor(
self::unescape( $post->post_excerpt ),
'excerpt',
array (
'textarea_rows' => 15
, 'media_buttons' => FALSE
, 'teeny' => TRUE
, 'tinymce' => TRUE
)
);
}
/**
* The excerpt is escaped usually. This breaks the HTML editor.
*
* @param string $str
* @return string
*/
public static function unescape( $str )
{
return str_replace(
array ( '<', '>', '"', '&', ' ', '&nbsp;' )
, array ( '<', '>', '"', '&', ' ', ' ' )
, $str
);
}
}
Save this code in a plugin or in your theme’s functions.php.
A: you may need to use wp_editor function to get rich editor, then you should remove any sanitize functions with get_post_meta (or update_post_meta), then you should use htmlspecialchars_decode function to get the rich content..
look through this principle:
add_action( 'add_meta_boxes', 'adding_a_new_metaabox' );
function adding_a_new_metaabox()
{
add_meta_box('html_myid_31_section', 'TITLE Hellooo', 'my_output_funct');
}
function my_output_funct( $post )
{
//so, dont ned to use esc_attr in front of get_post_meta
$valueeee2= get_post_meta($_GET['post'], 'SMTH_METANAME' , true ) ;
wp_editor( htmlspecialchars_decode($valueeee2), 'mettaabox_ID_stylee', $settings = array('textarea_name'=>'MyInputNAMEE') );
}
function save_my_post_data( $post_id )
{
if (!empty($_POST['MyInputNAMEE']))
{
$datta=htmlspecialchars($_POST['MyInputNAMEE']);
update_post_meta($post_id, 'SMTH_METANAME', $datta );
}
}
add_action( 'save_post', 'save_my_post_data' );
A: Follow solution add excerpt wysiwyg editor right after post title.
Add follow class to your Wordpress project as excerpt.php
class Excerpt {
public function __construct() {
add_filter('excerpt_more', [$this, 'excerpt_more']);
add_action('edit_form_after_title', [$this, 'excerpt']);
add_action('admin_menu', [$this, 'remove_excerpt_metabox']);
add_filter('wp_trim_excerpt', [$this, 'wp_trim_excerpt'], 10, 2);
}
/**
* Remove metabox from post
*/
public function remove_excerpt_metabox() {
remove_meta_box('postexcerpt', 'post', 'normal');
}
/**
* Strip tags
*
* @param string $text
* @return string
*/
public function wp_trim_excerpt($text = '') {
return strip_tags($text, '<a><strong><em><b><i><code><ul><ol><li><blockquote><del><ins><img><pre><code><>');
}
/**
* More sign...
*
* @return string
*/
public function excerpt_more() {
return '…';
}
/**
* Excerpt editor after post title.
*
* @param $post
*/
public function excerpt($post) {
if ($post->post_type !== 'post') return;
wp_editor(
html_entity_decode($post->post_excerpt),
'html-excerpt',
[
'teeny' => true,
'quicktags' => true,
'wpautop' => true,
'media_buttons' => false,
'textarea_rows' => 7,
'textarea_name' => 'excerpt'
]
);
}
}
Then add to functions.php file follow lines:
require_once __DIR__ . '/excerpt.php';
$excerpt = new Excerpt();
|
wordpress
|
{
"language": "en",
"length": 607,
"provenance": "stackexchange_00019.jsonl.gz:421776",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58261"
}
|
[
0.0112152099609375,
-0.0002448558807373047,
0.0179595947265625,
0.025482177734375,
-0.0249481201171875,
-0.0171356201171875,
0.01861572265625,
-0.0296630859375,
-0.003864288330078125,
0.0633544921875,
0.0193939208984375,
-0.0008721351623535156,
0.00765228271484375,
-0.01409149169921875,
-0.055206298828125,
0.007228851318359375,
0.01059722900390625,
-0.0025787353515625,
0.0090789794921875,
-0.00848388671875,
-0.0089569091796875,
-0.0107421875,
0.003673553466796875,
-0.0477294921875,
0.01055908203125,
0.07275390625,
0.07965087890625,
-0.038177490234375,
0.0155487060546875,
-0.00372314453125,
0.0159454345703125,
-0.054351806640625,
0.048370361328125,
0.059234619140625,
-0.1094970703125,
0.0236053466796875,
-0.03582763671875,
0.012451171875,
-0.027130126953125,
0.030792236328125,
-0.01178741455078125,
0.01593017578125,
-0.01346588134765625,
0.00457763671875,
-0.043060302734375,
-0.034912109375,
0.0025005340576171875,
-0.022491455078125,
0.01049041748046875,
-0.038238525390625,
0.00760650634765625,
0.031524658203125,
0.0242156982421875,
-0.04095458984375,
-0.006778717041015625,
0.0194091796875,
-0.01267242431640625,
0.0210418701171875,
0.0062713623046875,
-0.0007562637329101562,
0.0018091201782226562,
0.030548095703125,
0.00775146484375,
0.035247802734375,
-0.004245758056640625,
0.0087890625,
-0.0111236572265625,
0.018402099609375,
-0.001895904541015625,
-0.005405426025390625,
-0.00742340087890625,
-0.041229248046875,
0.007396697998046875,
-0.04205322265625,
-0.02764892578125,
0.039459228515625,
-0.033355712890625,
-0.040283203125,
0.0272064208984375,
-0.022674560546875,
0.004367828369140625,
0.020599365234375,
0.0189056396484375,
-0.051605224609375,
0.01366424560546875,
-0.036834716796875,
-0.0180816650390625,
-0.004146575927734375,
-0.01390838623046875,
-0.04449462890625,
-0.00550079345703125,
-0.04150390625,
-0.052398681640625,
0.026611328125,
0.018157958984375,
-0.050445556640625,
0.007568359375,
0.002971649169921875,
-0.0014848709106445312,
0.036285400390625,
0.03228759765625,
-0.057159423828125,
0.1068115234375,
-0.034942626953125,
0.01329803466796875,
-0.0064697265625,
0.004268646240234375,
0.0007281303405761719,
0.034393310546875,
0.02783203125,
-0.0274810791015625,
0.06549072265625,
-0.0007114410400390625,
-0.055419921875,
0.0159759521484375,
0.015869140625,
-0.033843994140625,
0.033203125,
0.0242156982421875,
-0.00879669189453125,
0.0249481201171875,
0.041259765625,
0.0028896331787109375,
-0.032989501953125,
-0.04388427734375,
-0.04766845703125,
-0.0081329345703125,
-0.0318603515625,
0.0184478759765625,
0.0006461143493652344,
-0.0057525634765625,
0.03021240234375,
0.00861358642578125,
-0.0084075927734375,
-0.0204010009765625,
-0.0008087158203125,
0.03472900390625,
0.0218963623046875,
0.0199432373046875,
-0.02764892578125,
0.01751708984375,
0.00756072998046875,
-0.007724761962890625,
0.02081298828125,
-0.035552978515625,
0.03485107421875,
0.004291534423828125,
-0.00888824462890625,
0.006969451904296875,
-0.03985595703125,
-0.04644775390625,
-0.031951904296875,
0.024627685546875,
0.01422882080078125,
-0.00235748291015625,
-0.06658935546875,
0.03582763671875,
-0.06011962890625,
0.0374755859375,
-0.063232421875,
0.033111572265625,
-0.0032749176025390625,
0.01261138916015625,
-0.032684326171875,
-0.0389404296875,
-0.0164337158203125,
-0.0614013671875,
-0.00812530517578125,
0.0428466796875,
0.013153076171875,
0.02398681640625,
-0.03289794921875,
0.03948974609375,
0.01788330078125,
-0.00879669189453125,
0.03460693359375,
-0.003009796142578125,
0.0064544677734375,
0.0248870849609375,
0.0288238525390625,
0.0316162109375,
-0.0079345703125,
0.044525146484375,
0.0231475830078125,
-0.02325439453125,
-0.0004458427429199219,
-0.006443023681640625,
0.0634765625,
0.05560302734375,
0.0279693603515625,
-0.0767822265625,
-0.032073974609375,
0.033355712890625,
-0.05560302734375,
-0.0201568603515625,
-0.0123748779296875,
0.0015001296997070312,
0.01311492919921875,
-0.00836944580078125,
0.020904541015625,
0.0491943359375,
-0.0128631591796875,
0.0189361572265625,
-0.03289794921875,
-0.08868408203125,
0.00936126708984375,
-0.0265655517578125,
0.037445068359375,
0.06500244140625,
-0.018341064453125,
-0.0194854736328125,
-0.0037517547607421875,
0.005496978759765625,
-0.01983642578125,
-0.06268310546875,
0.061920166015625,
0.0029449462890625,
0.0540771484375,
0.05517578125,
0.005962371826171875,
0.0743408203125,
-0.00565338134765625,
0.07073974609375,
-0.0024280548095703125,
-0.01477813720703125,
-0.045379638671875,
-0.0031299591064453125,
-0.025115966796875,
0.006561279296875,
-0.0299224853515625,
0.059783935546875,
0.03607177734375,
0.025543212890625,
0.0338134765625,
-0.0235443115234375,
0.0016384124755859375,
0.005405426025390625,
-0.0183868408203125,
0.0084381103515625,
0.018157958984375,
0.05682373046875,
0.05035400390625,
0.00472259521484375,
-0.05377197265625,
0.05059814453125,
-0.04888916015625,
0.020904541015625,
-0.05340576171875,
0.004566192626953125,
0.06451416015625,
0.033111572265625,
0.006198883056640625,
-0.01540374755859375,
-0.05450439453125,
0.006549835205078125,
0.0188446044921875,
0.0005335807800292969,
0.0058441162109375,
-0.002506256103515625,
0.0015544891357421875,
0.0117950439453125,
-0.008880615234375,
-0.029083251953125,
-0.00846099853515625,
0.030487060546875,
0.038330078125,
0.0555419921875,
0.0538330078125,
-0.0335693359375,
0.00970458984375,
0.006656646728515625,
0.06085205078125,
0.0025482177734375,
0.0192108154296875,
0.012359619140625,
-0.0015125274658203125,
0.0004184246063232422,
-0.0166015625,
0.017486572265625,
0.016815185546875,
-0.0086669921875,
0.0202789306640625,
0.018402099609375,
-0.0197296142578125,
-0.00522613525390625,
-0.057220458984375,
0.009735107421875,
-0.030303955078125,
0.0195465087890625,
-0.0244598388671875,
0.0345458984375,
-0.0254974365234375,
-0.04876708984375,
0.020965576171875,
-0.00811004638671875,
-0.055908203125,
0.06610107421875,
-0.01678466796875,
0.043121337890625,
-0.025054931640625,
0.03643798828125,
0.05322265625,
-0.033050537109375,
0.0026264190673828125,
0.027008056640625,
-0.0318603515625,
0.0044708251953125,
0.0180206298828125,
0.00998687744140625,
0.03289794921875,
-0.0709228515625,
0.031982421875,
0.0277557373046875,
0.0238494873046875,
-0.00867462158203125,
-0.0183258056640625,
-0.0202178955078125,
0.042388916015625,
-0.050933837890625,
-0.04742431640625,
0.006206512451171875,
-0.0638427734375,
-0.01256561279296875,
0.00926971435546875,
-0.047698974609375,
-0.004673004150390625,
0.05426025390625,
-0.004894256591796875,
-0.012420654296875,
0.017913818359375,
0.01519775390625,
-0.0145721435546875,
-0.039581298828125,
-0.08209228515625,
-0.001743316650390625,
0.005615234375,
0.0181732177734375,
0.0235137939453125,
0.006473541259765625,
-0.030853271484375,
0.01447296142578125,
-0.051025390625,
-0.021514892578125,
0.0218658447265625,
0.0185699462890625,
-0.0217132568359375,
-0.01059722900390625,
0.0104827880859375,
0.0222015380859375,
0.027862548828125,
-0.03173828125,
0.004047393798828125,
-0.0245208740234375,
0.037872314453125,
0.0166015625,
-0.0232696533203125,
0.01544189453125,
0.032867431640625,
0.01462554931640625,
-0.0287933349609375,
0.018310546875,
-0.0099334716796875,
-0.016876220703125,
-0.01071929931640625,
-0.006122589111328125,
-0.00390625,
-0.031494140625,
0.034271240234375,
0.00029850006103515625,
0.0263214111328125,
0.052734375,
-0.017669677734375,
0.01007080078125,
-0.030426025390625,
-0.039947509765625,
-0.040435791015625,
-0.0249176025390625,
-0.033416748046875,
0.0232696533203125,
-0.03472900390625,
0.0018587112426757812,
-0.034423828125,
0.038360595703125,
-0.0213623046875,
-0.0166778564453125,
0.027069091796875,
-0.0229034423828125,
-0.003711700439453125,
-0.010040283203125,
-0.003391265869140625,
-0.0139312744140625,
0.02410888671875,
-0.025909423828125,
-0.01885986328125,
-0.0026111602783203125,
0.00048422813415527344,
-0.01528167724609375,
0.0236968994140625,
-0.032623291015625,
-0.0012464523315429688,
0.0019741058349609375,
0.008087158203125,
-0.01154327392578125,
0.0049896240234375,
-0.04095458984375,
0.058624267578125,
-0.0087432861328125,
-0.01290130615234375,
0.055755615234375,
-0.06768798828125,
-0.0200347900390625,
0.038055419921875,
-0.0307159423828125,
-0.02911376953125,
-0.048797607421875,
-0.025360107421875,
-0.099609375,
0.0014200210571289062,
-0.0732421875,
0.06219482421875,
0.0107574462890625,
0.036224365234375,
-0.0243682861328125,
0.043121337890625,
0.0180511474609375,
0.02252197265625,
-0.01091766357421875,
0.0008945465087890625,
-0.0171966552734375,
-0.01152801513671875,
0.001312255859375,
-0.033416748046875,
0.001430511474609375,
0.0159912109375,
-0.026214599609375,
0.0036106109619140625,
-0.041534423828125,
-0.0462646484375,
0.01143646240234375,
-0.0487060546875,
-0.0655517578125,
-0.0166015625,
0.0032958984375,
-0.01358795166015625,
0.007595062255859375,
-0.02996826171875,
0.0005984306335449219,
-0.054412841796875,
0.033905029296875,
0.007747650146484375,
-0.01081085205078125,
0.005069732666015625,
0.060699462890625,
0.0282745361328125,
-0.013702392578125,
-0.05401611328125,
0.0016841888427734375,
0.048553466796875,
0.04443359375,
0.036895751953125,
0.0100860595703125,
-0.0469970703125,
0.09027099609375,
0.048095703125,
0.0157470703125,
-0.04290771484375,
0.01198577880859375,
0.007076263427734375,
-0.00698089599609375,
0.019500732421875,
0.00975799560546875,
0.046783447265625,
0.01580810546875,
-0.0130462646484375,
0.01087188720703125,
-0.002918243408203125,
0.0209197998046875,
-0.00518798828125,
-0.0017766952514648438,
-0.0212860107421875,
-0.03240966796875,
-0.0018281936645507812,
0.07177734375,
0.004802703857421875,
0.0158538818359375,
0.00881195068359375,
-0.00740814208984375,
0.01409149169921875,
-0.01355743408203125,
0.01690673828125,
-0.02947998046875,
0.044830322265625,
0.02264404296875,
0.00457763671875,
0.00139617919921875,
0.00844573974609375,
-0.01206207275390625,
0.0033721923828125,
-0.01245880126953125,
-0.060394287109375,
-0.005054473876953125,
0.0052947998046875,
0.0164794921875,
0.0160675048828125,
0.01103973388671875,
0.005947113037109375,
0.03851318359375,
-0.0107269287109375,
0.0171966552734375,
0.0504150390625,
0.0277099609375,
-0.01526641845703125,
-0.0304718017578125,
-0.027374267578125,
-0.0106201171875,
-0.0160675048828125,
0.07379150390625,
-0.043304443359375,
0.0313720703125,
-0.0003514289855957031,
0.01284027099609375,
0.01049041748046875,
0.006847381591796875,
0.01224517822265625,
0.02349853515625,
-0.007648468017578125,
0.0044708251953125,
0.0031299591064453125,
-0.03271484375,
0.00424957275390625,
0.019287109375,
0.033233642578125,
-0.01019287109375,
-0.02996826171875,
0.014801025390625,
-0.041717529296875,
-0.003681182861328125,
0.0243988037109375,
0.019989013671875,
-0.034942626953125,
0.0031032562255859375,
0.004878997802734375,
0.0027904510498046875,
0.0013256072998046875,
-0.01140594482421875,
0.02081298828125,
-0.034942626953125,
0.005901336669921875,
0.01053619384765625,
-0.019287109375,
-0.007205963134765625,
-0.02032470703125,
0.039886474609375,
-0.0099639892578125,
-0.034759521484375,
-0.008056640625,
-0.0014142990112304688,
-0.0143280029296875,
0.01084136962890625,
0.05621337890625,
0.00022900104522705078,
-0.0213470458984375,
-0.0161285400390625,
0.0175018310546875,
-0.07684326171875,
0.00887298583984375,
0.0245513916015625,
-0.00044274330139160156,
0.0176544189453125,
-0.03173828125,
-0.05047607421875,
-0.04632568359375,
-0.00463104248046875,
-0.020660400390625,
-0.021820068359375,
0.007427215576171875,
0.0206146240234375,
0.01123046875,
0.01515960693359375,
-0.02020263671875,
0.025421142578125,
0.0167999267578125,
-0.00655364990234375,
0.0244140625,
0.023712158203125,
0.0246124267578125,
-0.033782958984375,
0.10498046875,
0.01184844970703125,
0.0028438568115234375,
-0.04119873046875,
-0.045013427734375,
0.014801025390625,
-0.02728271484375,
-0.0188751220703125,
-0.020050048828125,
0.0063934326171875,
0.0005807876586914062,
0.01216888427734375,
-0.0006442070007324219,
0.008087158203125,
-0.0242462158203125,
-0.001316070556640625,
-0.0130767822265625,
0.045684814453125,
-0.033050537109375,
-0.0233612060546875,
0.039459228515625,
-0.03826904296875,
0.017333984375,
0.004062652587890625,
0.02581787109375,
0.01386260986328125,
-0.0390625,
0.008819580078125,
0.03094482421875,
0.01044464111328125,
0.01323699951171875,
0.020721435546875,
-0.0205230712890625,
0.036834716796875,
0.01525115966796875,
0.0107879638671875,
0.039093017578125,
0.01255035400390625,
-0.0201873779296875,
0.0221099853515625,
0.00859832763671875,
-0.0254058837890625,
-0.0266265869140625,
-0.029388427734375,
-0.02264404296875,
0.021514892578125,
0.0290985107421875,
0.0623779296875,
-0.066650390625,
0.0309906005859375,
0.006877899169921875,
-0.01593017578125,
0.0263214111328125,
-0.0012445449829101562,
-0.004238128662109375,
-0.0565185546875,
0.072509765625,
-0.00916290283203125,
-0.00443267822265625,
0.0242767333984375,
-0.030609130859375,
-0.013580322265625,
-0.057861328125,
0.0269927978515625,
0.01436614990234375,
-0.00785064697265625,
0.03460693359375,
0.02105712890625,
0.01351165771484375,
-0.0239715576171875,
0.0030078887939453125,
-0.004116058349609375,
-0.0080413818359375,
-0.0170745849609375,
0.0192413330078125,
-0.0273895263671875,
0.02239990234375,
-0.0096588134765625,
0.011749267578125,
0.004405975341796875,
0.0611572265625,
-0.045379638671875,
0.020782470703125,
0.03900146484375,
0.01337432861328125,
0.0247039794921875,
-0.049774169921875,
0.004421234130859375,
0.037506103515625,
-0.016143798828125,
0.01568603515625,
0.032928466796875,
-0.035552978515625,
0.005588531494140625,
0.025482177734375,
0.0109405517578125,
0.0065765380859375,
-0.04229736328125,
0.036895751953125,
-0.0232391357421875,
-0.010223388671875,
-0.005367279052734375,
-0.016754150390625,
-0.052581787109375,
-0.01505279541015625,
-0.01140594482421875,
-0.027069091796875,
0.036285400390625,
-0.001983642578125,
-0.054901123046875,
0.10821533203125,
0.03265380859375,
-0.0153656005859375,
0.00738525390625,
0.059326171875,
-0.0745849609375,
0.0206298828125,
0.00720977783203125,
0.049072265625,
0.0308685302734375,
-0.01763916015625,
-0.0180206298828125,
-0.017852783203125,
0.00815582275390625,
0.06817626953125,
0.033294677734375,
0.00640869140625,
0.0003886222839355469,
0.0198822021484375,
0.05126953125,
0.0287017822265625,
-0.0176239013671875,
0.01387786865234375,
0.043182373046875,
-0.0053558349609375,
0.02581787109375,
0.0261993408203125,
0.0477294921875,
-0.0273590087890625,
-0.00669097900390625,
0.055419921875,
-0.004817962646484375,
-0.01116943359375,
0.01270294189453125,
0.04364013671875,
-0.0352783203125,
0.01345062255859375,
0.0311126708984375,
-0.047119140625,
-0.0323486328125,
0.037200927734375,
0.01947021484375,
-0.05126953125,
-0.05029296875,
-0.025787353515625,
0.028167724609375,
0.023223876953125,
0.041748046875,
0.0225677490234375,
0.007198333740234375,
0.05767822265625,
0.019683837890625,
0.028533935546875,
0.03839111328125,
-0.0167083740234375,
-0.00943756103515625,
-0.0211334228515625,
-0.003841400146484375,
-0.03363037109375,
0.015228271484375,
0.024932861328125,
-0.003021240234375,
-0.030120849609375,
-0.037628173828125,
0.01290130615234375,
0.01312255859375,
-0.005352020263671875,
0.004764556884765625,
-0.003688812255859375,
-0.0025043487548828125,
0.04339599609375,
0.02447509765625,
-0.035736083984375,
-0.03289794921875,
0.03460693359375,
-0.0042724609375,
-0.0276031494140625,
0.044525146484375,
-0.018768310546875,
-0.047149658203125,
0.0245513916015625,
0.0226593017578125,
0.015716552734375,
-0.0085296630859375,
0.08819580078125,
0.039031982421875,
-0.001708984375,
-0.0109100341796875,
0.0240478515625,
0.0038051605224609375,
0.01282501220703125,
-0.010223388671875,
-0.016815185546875,
0.0222320556640625,
0.0164337158203125,
-0.006153106689453125,
0.0203857421875,
0.0254364013671875,
0.011749267578125,
-0.023773193359375,
-0.01708984375,
-0.01812744140625,
-0.0265960693359375,
-0.0008230209350585938,
-0.04742431640625,
0.0157470703125,
0.0207672119140625,
-0.00556182861328125,
0.00627899169921875,
0.00403594970703125,
0.045135498046875,
-0.007110595703125,
0.0260772705078125,
-0.0017843246459960938,
-0.01435089111328125,
-0.006900787353515625,
-0.0296478271484375,
-0.0229949951171875,
0.005092620849609375,
-0.050872802734375,
0.001033782958984375,
-0.0009012222290039062,
-0.07904052734375,
0.0308990478515625,
0.052581787109375,
-0.0313720703125,
-0.0019216537475585938,
-0.007015228271484375,
0.018646240234375,
0.0104827880859375,
-0.044525146484375,
0.005672454833984375,
0.011016845703125,
0.0240936279296875,
-0.0019588470458984375,
-0.0102081298828125,
-0.01125335693359375,
0.0237274169921875,
0.029937744140625,
0.0221099853515625,
0.0511474609375,
-0.02008056640625,
0.028533935546875,
0.00113677978515625,
0.01194000244140625,
0.00960540771484375,
-0.00669097900390625,
0.0013980865478515625,
0.046142578125,
0.0278472900390625,
-0.03460693359375,
-0.0435791015625,
0.03302001953125,
0.006542205810546875,
0.00702667236328125,
0.0024089813232421875,
-0.0171661376953125,
0.01203155517578125,
0.010284423828125,
0.046722412109375,
-0.029632568359375,
-0.021331787109375,
-0.024505615234375,
-0.031951904296875,
0.020782470703125,
0.01367950439453125,
0.03826904296875,
0.0005640983581542969,
0.048187255859375,
-0.0012607574462890625,
0.028472900390625,
0.005970001220703125,
0.044769287109375,
0.0257415771484375,
0.013397216796875,
-0.036468505859375,
0.0214080810546875,
-0.00917816162109375,
0.004192352294921875,
0.005279541015625,
0.045257568359375,
0.022705078125,
-0.07098388671875,
0.04730224609375,
0.009185791015625,
0.0748291015625,
-0.00745391845703125,
-0.0028839111328125,
0.01166534423828125,
0.01129150390625,
0.01373291015625,
0.0019378662109375,
-0.0304412841796875,
-0.047271728515625,
0.014007568359375,
0.0214996337890625,
-0.038177490234375,
-0.03887939453125,
-0.11395263671875,
-0.0055389404296875,
-0.010223388671875,
-0.01080322265625,
-0.05572509765625,
0.00812530517578125,
0.01004791259765625,
0.059234619140625,
-0.05316162109375,
-0.00970458984375,
0.00504302978515625,
0.054931640625,
-0.044952392578125,
-0.0303802490234375,
-0.041412353515625,
0.01151275634765625,
-0.06829833984375,
0.054840087890625,
0.07952880859375,
-0.04071044921875,
-0.020904541015625,
0.057342529296875,
0.0445556640625,
0.09857177734375,
-0.01457977294921875,
-0.0193634033203125,
0.04693603515625,
-0.01953125,
-0.012298583984375,
-0.08807373046875,
-0.01385498046875,
-0.07275390625,
0.03369140625,
-0.01424407958984375,
-0.0171356201171875,
-0.0343017578125,
-0.070068359375,
-0.07965087890625,
0.07293701171875,
-0.017822265625,
-0.025390625,
-0.0330810546875,
-0.0117950439453125,
-0.025360107421875,
0.03955078125,
-0.01020050048828125,
-0.00836944580078125,
0.0019207000732421875,
0.047393798828125,
0.0160675048828125,
0.01654052734375,
0.01206207275390625,
0.01275634765625,
-0.032257080078125,
0.017730712890625,
0.00896453857421875,
0.007740020751953125,
-0.007709503173828125,
0.0090484619140625,
-0.0007228851318359375,
0.0290985107421875,
-0.0379638671875,
-0.0711669921875,
-0.0240936279296875,
-0.0100555419921875,
0.0024127960205078125,
-0.04876708984375,
-0.042694091796875,
-0.02105712890625,
0.051666259765625,
0.050445556640625,
0.005115509033203125,
-0.022491455078125,
0.0252838134765625,
-0.0213470458984375,
-0.0234222412109375,
-0.0002244710922241211,
0.00331878662109375,
0.001575469970703125,
0.0008573532104492188,
-0.01457977294921875,
-0.0051116943359375,
0.0132598876953125,
0.0035724639892578125,
-0.0254058837890625,
-0.004192352294921875,
-0.0012416839599609375,
-0.0187835693359375,
-0.048828125,
0.00823974609375,
0.08782958984375,
-0.060455322265625,
-0.030120849609375,
0.034698486328125,
-0.016937255859375,
0.0230255126953125,
0.0227813720703125,
-0.041717529296875,
-0.0155181884765625,
-0.003665924072265625,
0.026824951171875,
-0.00362396240234375,
0.0113525390625,
-0.01071929931640625,
0.0231170654296875,
-0.01004791259765625,
-0.00014841556549072266,
0.0063323974609375,
0.007232666015625,
-0.0184173583984375,
0.001659393310546875,
-0.01088714599609375,
-0.02008056640625,
-0.0274810791015625,
-0.032989501953125,
-0.0298614501953125,
0.004970550537109375,
-0.03509521484375,
0.03302001953125,
-0.030853271484375,
0.0278778076171875,
0.020416259765625,
0.0297088623046875,
-0.01470184326171875,
0.0222930908203125,
-0.0210113525390625,
-0.017333984375,
-0.0023860931396484375,
-0.01837158203125
] |
7f9dd869d2d07e2628ec16bac3b7e5451286056d
|
Wordpress Stackexchange
Q: Add Post type menu to another menu I've created a menu page in the dashboard, then I created a custom post type and now I want to put the menu of the custom post type as a submenu under the first menu page I had created. I tried
'show_in_menu' => 'admin.php?page=mytestpage',
However that did not work. Any tips?
A: You only need to add the page slug to "show_in_menu", making the answer to your example:
'show_in_menu' => 'mytestpage',
For a more complete example:
Admin/Settings page of: /wp-admin/admin.php?page=mytestpage
register_post_type('mycpt', array('label' => 'My Custom Post Type', 'capability_type' => 'post', 'show_ui' => true, 'show_in_menu' => 'mytestpage'));
|
Q: Add Post type menu to another menu I've created a menu page in the dashboard, then I created a custom post type and now I want to put the menu of the custom post type as a submenu under the first menu page I had created. I tried
'show_in_menu' => 'admin.php?page=mytestpage',
However that did not work. Any tips?
A: You only need to add the page slug to "show_in_menu", making the answer to your example:
'show_in_menu' => 'mytestpage',
For a more complete example:
Admin/Settings page of: /wp-admin/admin.php?page=mytestpage
register_post_type('mycpt', array('label' => 'My Custom Post Type', 'capability_type' => 'post', 'show_ui' => true, 'show_in_menu' => 'mytestpage'));
A: Ended up creating the custom post type and adding my custom page as sub page to that, as suggested by Bainternet
|
wordpress
|
{
"language": "en",
"length": 126,
"provenance": "stackexchange_00019.jsonl.gz:421778",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58266"
}
|
[
0.076904296875,
0.0099029541015625,
0.0282135009765625,
0.022247314453125,
0.0191192626953125,
-0.05316162109375,
0.09869384765625,
-0.0782470703125,
-0.055999755859375,
0.006214141845703125,
-0.017364501953125,
0.0109100341796875,
-0.0474853515625,
-0.0285491943359375,
0.01995849609375,
-0.06591796875,
0.0228424072265625,
-0.001529693603515625,
0.0254669189453125,
-0.01512908935546875,
-0.0009045600891113281,
-0.0018100738525390625,
0.028350830078125,
0.004375457763671875,
0.0357666015625,
-0.034393310546875,
-0.0167388916015625,
0.0202178955078125,
0.005924224853515625,
0.000736236572265625,
0.0288238525390625,
-0.0013141632080078125,
0.0128021240234375,
0.0077972412109375,
0.0174560546875,
0.02203369140625,
-0.00380706787109375,
0.01229095458984375,
0.0201568603515625,
0.01194000244140625,
-0.0027923583984375,
0.00916290283203125,
0.02740478515625,
0.0252227783203125,
-0.0032196044921875,
-0.059906005859375,
0.015869140625,
-0.04132080078125,
-0.01471710205078125,
-0.054290771484375,
0.015716552734375,
-0.00472259521484375,
0.036468505859375,
-0.0175628662109375,
-0.0228424072265625,
-0.0159454345703125,
0.0027332305908203125,
-0.0308685302734375,
0.0347900390625,
0.00888824462890625,
-0.0244293212890625,
-0.023345947265625,
0.0142669677734375,
-0.050079345703125,
0.002777099609375,
0.0156402587890625,
0.01177978515625,
-0.002536773681640625,
-0.06195068359375,
0.004638671875,
0.038726806640625,
-0.049835205078125,
0.022308349609375,
-0.0079803466796875,
-0.0121002197265625,
-0.05877685546875,
0.037017822265625,
-0.02825927734375,
0.004634857177734375,
0.010101318359375,
-0.0012369155883789062,
0.0214691162109375,
-0.01396942138671875,
-0.007904052734375,
-0.021484375,
-0.0199127197265625,
-0.0251007080078125,
-0.0012788772583007812,
0.0029811859130859375,
-0.01800537109375,
-0.01505279541015625,
-0.0271759033203125,
-0.0011587142944335938,
0.0323486328125,
-0.002887725830078125,
-0.02679443359375,
0.03948974609375,
0.054595947265625,
0.00617218017578125,
0.041107177734375,
0.0004105567932128906,
-0.067138671875,
0.07928466796875,
-0.0662841796875,
0.01476287841796875,
0.0322265625,
-0.004726409912109375,
-0.00299835205078125,
0.057586669921875,
0.01378631591796875,
0.0055694580078125,
0.0469970703125,
-0.0075531005859375,
-0.047271728515625,
-0.00960540771484375,
0.0221710205078125,
-0.0257720947265625,
0.0019741058349609375,
0.016143798828125,
-0.01268768310546875,
-0.0022983551025390625,
0.031341552734375,
-0.003620147705078125,
0.006458282470703125,
0.003002166748046875,
0.0201416015625,
0.0213165283203125,
-0.05731201171875,
-0.035552978515625,
0.02679443359375,
-0.025115966796875,
0.00022745132446289062,
0.074951171875,
0.053680419921875,
0.01534271240234375,
-0.0260772705078125,
0.00763702392578125,
-0.0244903564453125,
-0.00867462158203125,
0.00262451171875,
0.032562255859375,
-0.0192108154296875,
-0.01715087890625,
-0.0014133453369140625,
-0.0204315185546875,
0.03570556640625,
0.006622314453125,
0.0012960433959960938,
-0.0024814605712890625,
-0.072021484375,
0.0109100341796875,
-0.05731201171875,
0.03485107421875,
0.006999969482421875,
-0.039093017578125,
-0.00530242919921875,
-0.0231475830078125,
-0.01529693603515625,
-0.01230621337890625,
-0.00955963134765625,
-0.04998779296875,
-0.00502777099609375,
0.04339599609375,
-0.0645751953125,
-0.056182861328125,
0.016754150390625,
-0.044464111328125,
-0.005504608154296875,
0.0224761962890625,
-0.0015201568603515625,
0.006591796875,
-0.0123291015625,
0.01250457763671875,
-0.0004115104675292969,
-0.011810302734375,
0.004314422607421875,
0.02911376953125,
-0.00989532470703125,
0.01519775390625,
0.06884765625,
0.004283905029296875,
-0.01898193359375,
0.048980712890625,
-0.0305633544921875,
-0.0733642578125,
0.05596923828125,
0.01361083984375,
0.06695556640625,
0.014617919921875,
0.021728515625,
0.0352783203125,
0.031036376953125,
-0.01678466796875,
-0.0101470947265625,
-0.00811767578125,
-0.0087432861328125,
-0.01265716552734375,
0.00457000732421875,
-0.0228729248046875,
0.015838623046875,
-0.07965087890625,
0.010589599609375,
-0.0283966064453125,
0.04229736328125,
-0.03350830078125,
0.0023479461669921875,
-0.0169830322265625,
0.03900146484375,
0.045623779296875,
-0.00647735595703125,
-0.0266571044921875,
-0.02392578125,
0.0390625,
-0.114501953125,
-0.05401611328125,
0.029266357421875,
-0.0152587890625,
0.003570556640625,
-0.0259552001953125,
0.00199127197265625,
-0.029296875,
-0.003772735595703125,
-0.041168212890625,
0.019500732421875,
0.032440185546875,
-0.00299835205078125,
-0.0264739990234375,
-0.0189971923828125,
0.0021076202392578125,
0.02972412109375,
-0.0731201171875,
0.0162353515625,
0.0418701171875,
-0.01271820068359375,
-0.041473388671875,
0.02178955078125,
0.015869140625,
-0.035614013671875,
-0.0245819091796875,
0.041351318359375,
0.01934814453125,
0.04632568359375,
-0.00586700439453125,
0.0386962890625,
0.044464111328125,
-0.0204925537109375,
0.008697509765625,
0.0099639892578125,
-0.018310546875,
0.021087646484375,
0.045867919921875,
0.025726318359375,
0.01430511474609375,
0.016571044921875,
0.02178955078125,
0.0244598388671875,
-0.00196075439453125,
0.0107879638671875,
0.0218658447265625,
-0.032318115234375,
0.01451873779296875,
0.00521087646484375,
-0.02423095703125,
0.0020236968994140625,
0.03021240234375,
0.0153045654296875,
0.040557861328125,
0.015869140625,
-0.0318603515625,
-0.011505126953125,
0.022796630859375,
0.0372314453125,
-0.0035152435302734375,
-0.0012254714965820312,
0.048553466796875,
-0.045562744140625,
-0.03521728515625,
0.0018777847290039062,
0.02294921875,
-0.0108184814453125,
-0.019805908203125,
-0.01070404052734375,
-0.0199737548828125,
-0.006809234619140625,
0.0009617805480957031,
-0.06976318359375,
0.014556884765625,
0.02978515625,
0.005100250244140625,
-0.0124359130859375,
0.0191192626953125,
-0.00286102294921875,
-0.0304718017578125,
0.031494140625,
0.00428009033203125,
-0.0259246826171875,
0.061065673828125,
-0.0372314453125,
0.03106689453125,
-0.01959228515625,
0.052490234375,
0.0555419921875,
-0.003936767578125,
-0.0110015869140625,
0.0113067626953125,
-0.01509857177734375,
0.007190704345703125,
0.0276641845703125,
0.0083770751953125,
-0.037567138671875,
0.0079803466796875,
0.051361083984375,
0.0248260498046875,
-0.0217437744140625,
0.0250396728515625,
-0.000820159912109375,
-0.0031108856201171875,
0.010833740234375,
-0.03289794921875,
-0.01338958740234375,
0.039398193359375,
-0.057342529296875,
0.0121307373046875,
0.01122283935546875,
-0.03033447265625,
-0.025299072265625,
0.055633544921875,
0.0012950897216796875,
-0.0029449462890625,
-0.0219879150390625,
-0.022247314453125,
-0.034210205078125,
-0.04278564453125,
-0.006465911865234375,
-0.0013170242309570312,
-0.0015010833740234375,
0.01174163818359375,
0.02569580078125,
0.0016384124755859375,
-0.06402587890625,
0.030670166015625,
0.037628173828125,
0.003826141357421875,
0.061187744140625,
0.051483154296875,
-0.04144287109375,
0.0227203369140625,
-0.0004992485046386719,
0.0220184326171875,
0.04412841796875,
-0.04107666015625,
-0.018585205078125,
-0.044219970703125,
0.009429931640625,
0.01336669921875,
-0.0252838134765625,
0.043365478515625,
0.056182861328125,
0.0186004638671875,
-0.01279449462890625,
-0.01441192626953125,
-0.0231475830078125,
-0.03662109375,
-0.00891876220703125,
0.0030975341796875,
0.000492095947265625,
-0.051971435546875,
0.039031982421875,
-0.0181121826171875,
-0.0018377304077148438,
0.04705810546875,
-0.024169921875,
0.004253387451171875,
-0.01934814453125,
-0.0295867919921875,
-0.0218505859375,
0.01163482666015625,
-0.021087646484375,
0.004154205322265625,
0.004795074462890625,
0.00241851806640625,
-0.0066986083984375,
0.0204315185546875,
-0.001880645751953125,
-0.06964111328125,
0.04229736328125,
-0.051239013671875,
0.02313232421875,
-0.06005859375,
-0.030853271484375,
-0.0035457611083984375,
0.1295166015625,
-0.054962158203125,
-0.01049041748046875,
-0.024749755859375,
0.01025390625,
0.01038360595703125,
-0.060302734375,
-0.031829833984375,
-0.0173187255859375,
-0.046539306640625,
-0.00605010986328125,
-0.0216217041015625,
-0.011627197265625,
-0.018707275390625,
0.0400390625,
-0.0288848876953125,
-0.033935546875,
0.042724609375,
-0.0494384765625,
0.004413604736328125,
0.038726806640625,
-0.017852783203125,
-0.0120697021484375,
-0.04840087890625,
-0.01421356201171875,
-0.07275390625,
-0.020111083984375,
-0.0108184814453125,
0.0643310546875,
0.0108642578125,
-0.0340576171875,
-0.0118560791015625,
0.037078857421875,
0.0423583984375,
0.040130615234375,
0.0156097412109375,
-0.007232666015625,
0.0036106109619140625,
-0.02850341796875,
0.01873779296875,
-0.03826904296875,
-0.0038909912109375,
0.00029087066650390625,
-0.00986480712890625,
0.0274200439453125,
-0.01702880859375,
0.006656646728515625,
0.022918701171875,
-0.0224609375,
-0.01424407958984375,
-0.03607177734375,
-0.0364990234375,
0.01277923583984375,
-0.00037670135498046875,
-0.0158538818359375,
-0.032501220703125,
-0.025421142578125,
-0.032745361328125,
-0.019317626953125,
-0.0362548828125,
0.035369873046875,
0.003925323486328125,
0.0299072265625,
0.0012378692626953125,
-0.021942138671875,
-0.0104827880859375,
0.026763916015625,
-0.0174407958984375,
0.041778564453125,
0.023345947265625,
0.003566741943359375,
0.008758544921875,
-0.006618499755859375,
0.01267242431640625,
-0.01971435546875,
0.048004150390625,
0.01446533203125,
-0.0084075927734375,
0.0177459716796875,
-0.016815185546875,
0.0015239715576171875,
-0.002391815185546875,
-0.0172576904296875,
-0.04217529296875,
-0.0283966064453125,
0.07098388671875,
-0.0113677978515625,
0.061492919921875,
-0.056610107421875,
-0.007251739501953125,
0.0027103424072265625,
-0.0092926025390625,
0.0345458984375,
0.0193023681640625,
0.0008130073547363281,
0.0069427490234375,
0.0011758804321289062,
0.00946807861328125,
0.041656494140625,
0.052337646484375,
0.01081085205078125,
0.03997802734375,
0.0177154541015625,
-0.0016918182373046875,
-0.004734039306640625,
-0.00373077392578125,
0.047210693359375,
0.0093994140625,
-0.02239990234375,
-0.035125732421875,
-0.004840850830078125,
0.050048828125,
-0.004215240478515625,
0.01132965087890625,
0.02294921875,
0.0176849365234375,
-0.01904296875,
0.00353240966796875,
0.01812744140625,
-0.0172882080078125,
-0.029541015625,
0.004550933837890625,
0.025238037109375,
-0.0032978057861328125,
0.0186004638671875,
0.055145263671875,
0.01096343994140625,
0.03082275390625,
-0.01491546630859375,
0.034149169921875,
0.0181732177734375,
0.0308380126953125,
0.018524169921875,
0.0146942138671875,
-0.007511138916015625,
0.0062255859375,
-0.0211181640625,
-0.0211334228515625,
-0.027099609375,
-0.01471710205078125,
0.02813720703125,
-0.0011615753173828125,
0.00942230224609375,
0.02679443359375,
0.00321197509765625,
-0.01593017578125,
0.0132904052734375,
-0.017822265625,
-0.04132080078125,
-0.0211334228515625,
0.017852783203125,
0.03985595703125,
-0.019622802734375,
-0.021697998046875,
0.0670166015625,
-0.0112762451171875,
0.04376220703125,
-0.04327392578125,
-0.01529693603515625,
0.0094146728515625,
0.0216064453125,
-0.0089874267578125,
-0.00794219970703125,
-0.0157623291015625,
-0.0234222412109375,
-0.029815673828125,
-0.006534576416015625,
-0.00788116455078125,
0.0287933349609375,
-0.032379150390625,
0.004093170166015625,
0.0011959075927734375,
-0.00396728515625,
-0.032196044921875,
0.00557708740234375,
0.06256103515625,
0.03826904296875,
-0.0208282470703125,
0.01201629638671875,
-0.0214996337890625,
-0.006793975830078125,
0.011688232421875,
-0.04931640625,
-0.0401611328125,
-0.0455322265625,
0.00506591796875,
0.017364501953125,
-0.018829345703125,
-0.026763916015625,
-0.0458984375,
0.0210723876953125,
0.032623291015625,
0.0271148681640625,
-0.0168609619140625,
0.1077880859375,
-0.0168304443359375,
0.047271728515625,
0.008331298828125,
0.041656494140625,
-0.03173828125,
0.01052093505859375,
0.0022068023681640625,
-0.038970947265625,
-0.0259246826171875,
-0.0145416259765625,
-0.0274505615234375,
0.0418701171875,
0.0653076171875,
-0.00357818603515625,
0.0305633544921875,
-0.01442718505859375,
0.01041412353515625,
-0.009735107421875,
0.0170135498046875,
-0.0219268798828125,
0.0003733634948730469,
0.060455322265625,
-0.01160430908203125,
0.021514892578125,
0.004589080810546875,
0.01284027099609375,
0.004169464111328125,
-0.01308441162109375,
0.0201263427734375,
-0.012725830078125,
-0.050933837890625,
0.08740234375,
0.0899658203125,
0.01052093505859375,
0.050872802734375,
0.0158233642578125,
0.01331329345703125,
0.0004284381866455078,
-0.02215576171875,
-0.003749847412109375,
0.0131072998046875,
0.016754150390625,
-0.01450347900390625,
0.007568359375,
0.007843017578125,
-0.01404571533203125,
-0.0000890493392944336,
0.07073974609375,
0.0567626953125,
-0.10028076171875,
0.0013141632080078125,
0.01337432861328125,
0.006275177001953125,
0.0289459228515625,
-0.01325225830078125,
-0.00879669189453125,
0.004901885986328125,
0.02850341796875,
-0.04351806640625,
-0.03375244140625,
0.003631591796875,
0.001922607421875,
-0.020111083984375,
-0.0129852294921875,
0.027496337890625,
0.0252532958984375,
0.023712158203125,
0.0033397674560546875,
-0.017486572265625,
0.0130767822265625,
0.0037326812744140625,
-0.004505157470703125,
0.00379180908203125,
-0.015533447265625,
-0.0177001953125,
0.039306640625,
-0.064208984375,
0.01148223876953125,
0.04156494140625,
0.03009033203125,
0.0088043212890625,
0.058990478515625,
-0.0206451416015625,
0.033599853515625,
0.0169525146484375,
0.01244354248046875,
-0.0154876708984375,
-0.0160675048828125,
0.007396697998046875,
0.028900146484375,
-0.0234375,
0.01580810546875,
-0.0121612548828125,
-0.01488494873046875,
-0.0187835693359375,
-0.0020122528076171875,
0.1107177734375,
-0.0367431640625,
-0.027679443359375,
0.0228118896484375,
-0.001285552978515625,
-0.021636962890625,
0.004962921142578125,
0.0116119384765625,
-0.0175933837890625,
0.01151275634765625,
-0.0014495849609375,
-0.0019016265869140625,
-0.01468658447265625,
-0.004352569580078125,
-0.048095703125,
0.103759765625,
-0.055755615234375,
0.0102386474609375,
0.0267486572265625,
0.05096435546875,
-0.017578125,
0.02508544921875,
-0.046356201171875,
0.034454345703125,
-0.0006017684936523438,
0.0517578125,
-0.052154541015625,
-0.01517486572265625,
0.003108978271484375,
0.04132080078125,
0.0306854248046875,
0.004077911376953125,
-0.02978515625,
0.01898193359375,
0.0672607421875,
0.0299835205078125,
0.0111541748046875,
0.03717041015625,
-0.00417327880859375,
-0.0369873046875,
0.02423095703125,
0.0166778564453125,
0.040435791015625,
0.00753021240234375,
-0.0308990478515625,
-0.0020809173583984375,
0.01078033447265625,
0.0087432861328125,
-0.015869140625,
-0.035858154296875,
-0.01340484619140625,
-0.004779815673828125,
-0.004573822021484375,
0.0148773193359375,
-0.0035400390625,
-0.0012235641479492188,
-0.01151275634765625,
0.00569915771484375,
0.00878143310546875,
-0.01971435546875,
0.0193634033203125,
0.01349639892578125,
0.0192718505859375,
-0.0098114013671875,
0.014434814453125,
0.01259613037109375,
-0.016326904296875,
-0.00008225440979003906,
0.042083740234375,
-0.04412841796875,
0.0440673828125,
0.0146484375,
0.024810791015625,
-0.0494384765625,
-0.0193634033203125,
0.03973388671875,
0.055450439453125,
-0.0312347412109375,
-0.047210693359375,
0.01303863525390625,
0.0130615234375,
-0.00787353515625,
0.0163116455078125,
0.004169464111328125,
0.03387451171875,
0.06707763671875,
0.00115203857421875,
-0.006084442138671875,
-0.0040130615234375,
0.0192413330078125,
-0.002407073974609375,
0.0034961700439453125,
-0.0200653076171875,
0.004924774169921875,
-0.07061767578125,
0.0631103515625,
0.037139892578125,
0.07452392578125,
-0.004444122314453125,
0.08831787109375,
-0.01016998291015625,
-0.0242767333984375,
0.0023975372314453125,
0.0118865966796875,
0.0038356781005859375,
0.0079345703125,
-0.046112060546875,
-0.05389404296875,
0.039337158203125,
0.035888671875,
-0.0175323486328125,
0.0128021240234375,
0.0191497802734375,
0.027740478515625,
-0.0136871337890625,
-0.024261474609375,
0.04559326171875,
-0.00843048095703125,
-0.043212890625,
-0.011016845703125,
-0.021728515625,
0.027008056640625,
-0.0082244873046875,
-0.0022430419921875,
0.0221405029296875,
0.024139404296875,
-0.00009757280349731445,
0.02880859375,
0.00457763671875,
-0.004241943359375,
0.027191162109375,
0.0228424072265625,
0.03472900390625,
0.0484619140625,
-0.11126708984375,
-0.0274505615234375,
-0.046722412109375,
-0.048431396484375,
0.058837890625,
0.054290771484375,
-0.0103759765625,
0.01024627685546875,
0.0621337890625,
0.005157470703125,
-0.0302886962890625,
0.006561279296875,
0.03717041015625,
0.010894775390625,
0.033233642578125,
0.052886962890625,
-0.06097412109375,
-0.032867431640625,
-0.0185699462890625,
0.01245880126953125,
0.0123291015625,
0.041900634765625,
0.0216827392578125,
0.0188140869140625,
-0.0518798828125,
0.0300750732421875,
-0.04803466796875,
-0.0439453125,
0.03668212890625,
0.0198211669921875,
-0.007030487060546875,
-0.002574920654296875,
-0.027374267578125,
0.007160186767578125,
0.057159423828125,
-0.04327392578125,
-0.0079345703125,
-0.00318145751953125,
0.0121917724609375,
-0.051116943359375,
0.0079345703125,
-0.01275634765625,
0.018646240234375,
0.006000518798828125,
-0.017547607421875,
0.042205810546875,
0.0216522216796875,
-0.00679779052734375,
0.0175933837890625,
-0.014312744140625,
-0.0145721435546875,
0.007770538330078125,
-0.013824462890625,
0.0038738250732421875,
0.0260009765625,
-0.00913238525390625,
-0.011199951171875,
0.040618896484375,
-0.0026702880859375,
0.01025390625,
0.024261474609375,
0.03826904296875,
0.036102294921875,
-0.026275634765625,
0.04302978515625,
0.0161590576171875,
0.03662109375,
-0.0277557373046875,
0.006256103515625,
0.0166473388671875,
0.005855560302734375,
0.0171661376953125,
-0.002849578857421875,
-0.059295654296875,
-0.0721435546875,
0.037567138671875,
0.0283660888671875,
-0.024322509765625,
-0.0025539398193359375,
-0.1026611328125,
0.003925323486328125,
0.07537841796875,
0.0179443359375,
-0.0533447265625,
0.019439697265625,
-0.036407470703125,
0.0582275390625,
0.01273345947265625,
-0.04058837890625,
0.01837158203125,
0.03466796875,
-0.004131317138671875,
0.01006317138671875,
-0.0305633544921875,
-0.0258026123046875,
-0.0157012939453125,
0.0179595947265625,
0.0296783447265625,
-0.039794921875,
0.0095367431640625,
0.00031113624572753906,
0.0228118896484375,
0.044586181640625,
0.0271453857421875,
-0.02264404296875,
-0.0171661376953125,
0.002582550048828125,
-0.0034046173095703125,
-0.01280975341796875,
0.023284912109375,
-0.0576171875,
-0.03387451171875,
-0.0256805419921875,
0.034515380859375,
0.0450439453125,
-0.0263214111328125,
-0.06573486328125,
0.032012939453125,
-0.01154327392578125,
-0.0293426513671875,
-0.07342529296875,
0.0201568603515625,
-0.021514892578125,
0.03228759765625,
-0.018310546875,
-0.027587890625,
0.007457733154296875,
0.052032470703125,
-0.003498077392578125,
0.04327392578125,
0.0133209228515625,
-0.01119232177734375,
-0.023345947265625,
-0.01091766357421875,
-0.0187835693359375,
-0.017181396484375,
0.01837158203125,
-0.0284576416015625,
0.015869140625,
0.0296173095703125,
-0.061492919921875,
-0.05560302734375,
-0.0233001708984375,
0.02667236328125,
-0.00574493408203125,
-0.0163726806640625,
-0.0196380615234375,
-0.01134490966796875,
0.049560546875,
0.040435791015625,
0.019012451171875,
-0.0261077880859375,
-0.0011949539184570312,
-0.04705810546875,
-0.007549285888671875,
0.00029754638671875,
0.01513671875,
-0.0435791015625,
0.00882720947265625,
0.0175628662109375,
-0.0146484375,
-0.04876708984375,
0.022796630859375,
-0.0364990234375,
-0.009002685546875,
0.034912109375,
0.019561767578125,
-0.038116455078125,
0.0298004150390625,
0.062255859375,
-0.046051025390625,
-0.022918701171875,
0.0023040771484375,
-0.005092620849609375,
0.0089874267578125,
-0.032562255859375,
-0.0158233642578125,
-0.00658416748046875,
-0.032135009765625,
0.0198822021484375,
-0.034881591796875,
0.0265350341796875,
-0.04632568359375,
0.0007586479187011719,
-0.03387451171875,
0.0135955810546875,
0.0011043548583984375,
0.0183563232421875,
-0.01123046875,
0.044189453125,
0.035675048828125,
0.022918701171875,
0.0244140625,
0.0496826171875,
-0.0024700164794921875,
0.06561279296875,
0.01593017578125,
-0.04254150390625,
0.0245819091796875,
-0.039459228515625,
0.0013017654418945312,
-0.007659912109375,
-0.0247344970703125,
-0.058441162109375,
0.038238525390625,
0.04144287109375,
-0.00894927978515625,
0.0279388427734375
] |
7049363217873487edb42d4e6576780f01ce19ac
|
Wordpress Stackexchange
Q: How to add custom css file in theme? Some themes ask you not to edit the style.css file, instead use custom.css file. If you write code on custom.css, it will overwrite the same element style in style.css. I think this is done in order to prevent the loss of user styles on theme update, is it so?
How this works? Do they already include custom.css file in their theme? But how this file is included in the theme so that he theme look for style in custom.css first?
Thanks.
A: I usually add this piece of code if I want to add another css file
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/my_custom_css.css" type="text/css" media="screen" />
I believe the theme makers want to retain as much as possible of the theme's layout design. So a custom css file doesn't hurt much. I think it's more of a support question. With custom css file, the makers can help those who use their themes more easier. Because the original style.css is unaltered, so the theme maker can probably take a look in the custom css file.
|
Q: How to add custom css file in theme? Some themes ask you not to edit the style.css file, instead use custom.css file. If you write code on custom.css, it will overwrite the same element style in style.css. I think this is done in order to prevent the loss of user styles on theme update, is it so?
How this works? Do they already include custom.css file in their theme? But how this file is included in the theme so that he theme look for style in custom.css first?
Thanks.
A: I usually add this piece of code if I want to add another css file
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/my_custom_css.css" type="text/css" media="screen" />
I believe the theme makers want to retain as much as possible of the theme's layout design. So a custom css file doesn't hurt much. I think it's more of a support question. With custom css file, the makers can help those who use their themes more easier. Because the original style.css is unaltered, so the theme maker can probably take a look in the custom css file.
A: Activate the child theme and add the following example code in the function.php
add_action( 'wp_enqueue_scripts', 'child_enqueue_styles');
function child_enqueue_styles() {
wp_enqueue_style( 'reset-style', get_template_directory_uri() . '/css/reset.css', array());
}
A: Using @import in WordPress for adding custom css is no longer the best practice, yet you can do it with that method.
the best practice is using the function wp_enqueue_style() in functions.php.
Example:
wp_enqueue_style ('theme-style', get_template_directory_uri().'/css/style.css');
wp_enqueue_style ('my-style', get_template_directory_uri().'/css/mystyle.css', array('theme-style'));
A: My proposal would be to use child themes.
It is very easy to implement and all modifications you do (including styles) are completely isolated from the original theme.
A: To prevent overwritting of main theme CSS or other files, you should ALWAYS use a child theme in WordPress ... not doing so will only cause you major headaches and problems down the road.
https://codex.wordpress.org/Child_Themes
... and with how easy it is to setup a child theme, there is no reason you shouldn't be using one.
Using a child theme will then allow you to override any of the main parent theme files you want, simply by copying from parent into your child, or by creating a new file with the same name.
Regarding the custom.css file there's numerous ways that theme developers handle this ... a lot of them do this simply to try and prevent clients who don't want to use a child theme, from editing the main style.css file ....
Either way you shouldn't be worried about that, as long as you use a child theme you shouldn't have to worry about updating your theme later on and losing your changes ... get in the habit of always using child themes, you will thank me later, i promise.
A: If you want to leave your html along.
you can add this to your css file. I think this is better.
@import url("../mycustomstyle.css");
also depending on your theme it will work with child and parent themes.
-- keep in mind, css works sequential (when using the same level of identifier, already used ) , so what is last in your file will overwrite.
so put your customstyle import at the bottom if you want to override stuff.
A: Use a child theme. It's your best bet. This way if the theme is ever updated, you won't override the stylesheets you've created.
https://codex.wordpress.org/Child_Themes
Go this route, you'll thank yourself later.
A: The best way is to combine all enqueued styles into a single function and then call them using wp_enqueue_scripts action. Add the defined function to your theme's functions.php somewhere below the initial setup.
Code Block:
function add_theme_scripts() {
wp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.css' );
wp_enqueue_style ( 'custom', get_template_directory_uri () . '/css/custom.css', array( 'style' ) );
}
add_action ( 'wp_enqueue_scripts', 'add_theme_scripts' );
Please Note :
3rd parameter is the dependency array which refers to whether or not this stylesheet is dependent on another stylesheet. So, in our above code custom.css is dependent on style.css
|
Additional Basic:
wp_enqueue_style() function may have 5 parameters:
like this way -
wp_enqueue_style( $handle, $src, $deps, $ver, $media );
In real world of WP Coding, usually we also add javascript files/jQuery libraries inside that function like this way:
wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), 1.1, true);
The 5th parameter true/false is optional (2nd, 3rd and 4th params are also opt.) but very essential, it allows us to place our scripts in footer when we use the boolean parameter as true.
A: Go to Appearance > Edit CSS from your WordPress Dashboard.
Here is the screen with basic CSS editor.
Now paste your CSS directly to the default text. You can delete the default text so that your CSS only appears in the editor. Then save the stylesheet and your CSS will be live.
A: If you want to avoid web browser cache problems, you need include the file version, like in this example is shown.
wp_enqueue_style ('theme-style', get_template_directory_uri().'/path/to/css/style.css?v=' . filemtime(get_template_directory() . '/path/to/css/style.css'));
In this case, I write the last modification date in unix time as a query param.
|
wordpress
|
{
"language": "en",
"length": 847,
"provenance": "stackexchange_00019.jsonl.gz:421805",
"question_score": "21",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58351"
}
|
[
0.04376220703125,
-0.0162200927734375,
0.0231475830078125,
-0.035186767578125,
-0.017425537109375,
-0.003215789794921875,
0.0035381317138671875,
-0.020599365234375,
-0.0706787109375,
-0.0028629302978515625,
-0.0291595458984375,
0.035491943359375,
-0.02374267578125,
-0.0171661376953125,
0.05865478515625,
-0.0498046875,
0.050140380859375,
-0.0298004150390625,
0.0426025390625,
0.0025577545166015625,
0.00553131103515625,
0.031280517578125,
0.039825439453125,
0.05999755859375,
0.039215087890625,
-0.0230560302734375,
0.04644775390625,
-0.00749969482421875,
0.025543212890625,
-0.0072479248046875,
0.03082275390625,
-0.01511383056640625,
0.02130126953125,
0.0169219970703125,
-0.0247955322265625,
-0.0014591217041015625,
0.0155487060546875,
-0.0142974853515625,
-0.0216217041015625,
0.033966064453125,
0.034759521484375,
-0.0164794921875,
-0.00716400146484375,
0.01251220703125,
0.0038318634033203125,
-0.054718017578125,
0.045074462890625,
-0.039794921875,
0.0011205673217773438,
-0.060699462890625,
0.00547027587890625,
-0.00508880615234375,
0.0318603515625,
-0.0565185546875,
-0.03271484375,
-0.021453857421875,
-0.0023097991943359375,
0.0149383544921875,
0.03411865234375,
-0.06280517578125,
-0.04364013671875,
-0.0168914794921875,
0.049957275390625,
0.0177459716796875,
-0.008209228515625,
-0.00820159912109375,
0.01050567626953125,
0.011962890625,
-0.02197265625,
-0.0131988525390625,
0.015899658203125,
-0.00429534912109375,
0.0053558349609375,
-0.023223876953125,
-0.01346588134765625,
-0.0054931640625,
0.00621795654296875,
-0.01995849609375,
0.010284423828125,
0.00995635986328125,
-0.01885986328125,
0.00748443603515625,
0.007640838623046875,
-0.07354736328125,
0.03302001953125,
-0.03558349609375,
-0.0214080810546875,
0.005802154541015625,
0.0021686553955078125,
-0.0190887451171875,
-0.0084228515625,
0.0043487548828125,
-0.011444091796875,
0.0011167526245117188,
-0.012054443359375,
-0.029998779296875,
-0.0109405517578125,
0.06549072265625,
-0.0126953125,
0.048736572265625,
-0.02813720703125,
-0.008544921875,
0.03607177734375,
-0.0623779296875,
-0.0010128021240234375,
0.042724609375,
-0.0023174285888671875,
0.043212890625,
0.01532745361328125,
0.019744873046875,
0.007091522216796875,
-0.0292205810546875,
0.00434112548828125,
-0.0246124267578125,
-0.028167724609375,
0.0168304443359375,
-0.0030536651611328125,
-0.00887298583984375,
0.006259918212890625,
-0.0008749961853027344,
0.03094482421875,
0.047882080078125,
-0.006832122802734375,
-0.0211944580078125,
-0.0219573974609375,
-0.03192138671875,
-0.0209808349609375,
-0.04052734375,
-0.00018489360809326172,
0.0104217529296875,
-0.0472412109375,
0.0187530517578125,
0.07354736328125,
0.042236328125,
0.0228271484375,
-0.025299072265625,
0.05743408203125,
-0.0273895263671875,
-0.013702392578125,
0.0232086181640625,
-0.000042498111724853516,
-0.044158935546875,
-0.0223236083984375,
0.0053558349609375,
-0.011260986328125,
0.01934814453125,
0.00833892822265625,
0.0262908935546875,
0.002506256103515625,
-0.0626220703125,
0.05328369140625,
-0.06494140625,
0.007354736328125,
0.0304107666015625,
-0.00482940673828125,
-0.0272674560546875,
0.0191802978515625,
-0.0222625732421875,
0.026519775390625,
-0.032073974609375,
-0.0202789306640625,
-0.00406646728515625,
0.01229095458984375,
-0.021636962890625,
-0.005474090576171875,
0.00036144256591796875,
0.0005917549133300781,
0.0186309814453125,
0.0203857421875,
-0.0078125,
0.007373809814453125,
-0.0270233154296875,
0.0271453857421875,
0.0266876220703125,
0.01122283935546875,
0.046783447265625,
0.01119232177734375,
0.02056884765625,
0.006671905517578125,
0.064697265625,
0.025115966796875,
-0.013427734375,
0.056365966796875,
-0.01345062255859375,
-0.04931640625,
0.007556915283203125,
0.00047659873962402344,
0.07257080078125,
0.038330078125,
0.025848388671875,
-0.0224609375,
-0.0223236083984375,
-0.022308349609375,
0.0016584396362304688,
0.00008803606033325195,
-0.018768310546875,
-0.0157928466796875,
-0.00911712646484375,
-0.01629638671875,
0.0118560791015625,
-0.0294952392578125,
-0.00905609130859375,
0.026123046875,
0.02069091796875,
-0.0030841827392578125,
0.037078857421875,
-0.02630615234375,
0.034942626953125,
-0.00817108154296875,
-0.00010830163955688477,
0.0006890296936035156,
-0.0164031982421875,
0.01453399658203125,
-0.06024169921875,
-0.019073486328125,
0.024078369140625,
0.0165863037109375,
0.022430419921875,
0.0095977783203125,
-0.004016876220703125,
0.0172576904296875,
-0.00574493408203125,
0.0173187255859375,
0.043212890625,
-0.01125335693359375,
0.0085601806640625,
-0.04010009765625,
-0.003345489501953125,
-0.02899169921875,
0.024017333984375,
-0.033905029296875,
0.034881591796875,
0.06317138671875,
0.035064697265625,
-0.0262451171875,
-0.01544952392578125,
0.0146484375,
-0.06427001953125,
-0.0035953521728515625,
0.04864501953125,
0.03399658203125,
0.0009393692016601562,
-0.008026123046875,
-0.01505279541015625,
0.06561279296875,
0.0025234222412109375,
0.0198516845703125,
-0.01313018798828125,
0.019775390625,
0.00865936279296875,
0.0345458984375,
-0.0253143310546875,
0.0237579345703125,
-0.08856201171875,
0.040740966796875,
0.023773193359375,
-0.034942626953125,
-0.041046142578125,
-0.01336669921875,
0.033447265625,
0.00841522216796875,
0.0006718635559082031,
-0.00994110107421875,
-0.0009098052978515625,
0.0213775634765625,
0.0156707763671875,
0.015777587890625,
0.01031494140625,
-0.0176239013671875,
0.017059326171875,
0.002025604248046875,
-0.053802490234375,
0.005645751953125,
-0.004230499267578125,
-0.0113372802734375,
0.023284912109375,
-0.0016632080078125,
-0.005687713623046875,
0.0154571533203125,
-0.003551483154296875,
-0.0139007568359375,
-0.0009684562683105469,
-0.04547119140625,
-0.01210784912109375,
0.04937744140625,
-0.056976318359375,
-0.0192718505859375,
-0.01136016845703125,
0.001728057861328125,
0.0251922607421875,
0.0302734375,
0.01416778564453125,
-0.009124755859375,
0.00036263465881347656,
0.007183074951171875,
-0.00839996337890625,
-0.00698089599609375,
0.013824462890625,
0.0251007080078125,
-0.01158905029296875,
-0.0015039443969726562,
0.054931640625,
-0.0285797119140625,
0.04119873046875,
0.02093505859375,
-0.0076904296875,
0.0078887939453125,
0.0186767578125,
0.01265716552734375,
0.006626129150390625,
-0.043914794921875,
0.011322021484375,
0.0274810791015625,
0.0078125,
0.01352691650390625,
-0.00835418701171875,
-0.00998687744140625,
0.0088958740234375,
-0.00968170166015625,
-0.0186614990234375,
0.0172576904296875,
-0.061187744140625,
-0.044708251953125,
-0.00730133056640625,
-0.044921875,
0.0160980224609375,
-0.004337310791015625,
-0.010498046875,
-0.01273345947265625,
-0.0545654296875,
0.006931304931640625,
-0.0875244140625,
-0.069091796875,
-0.06280517578125,
0.0264129638671875,
0.0088958740234375,
-0.01800537109375,
0.106689453125,
-0.0018835067749023438,
-0.03143310546875,
-0.019287109375,
-0.0207061767578125,
0.0109710693359375,
0.00803375244140625,
0.017425537109375,
-0.049591064453125,
0.00968170166015625,
-0.0019683837890625,
-0.0015926361083984375,
0.0196685791015625,
-0.018218994140625,
-0.0058135986328125,
-0.050567626953125,
-0.0341796875,
-0.0413818359375,
0.05694580078125,
0.0660400390625,
-0.01194000244140625,
0.022613525390625,
-0.033721923828125,
-0.034912109375,
0.01470947265625,
-0.021240234375,
0.04437255859375,
0.003204345703125,
-0.0208740234375,
-0.0267181396484375,
0.0679931640625,
0.0333251953125,
-0.00699615478515625,
-0.0156707763671875,
-0.02264404296875,
0.060821533203125,
0.0279541015625,
0.04400634765625,
-0.026641845703125,
0.02777099609375,
-0.02587890625,
0.047332763671875,
0.022186279296875,
0.00202178955078125,
-0.0206146240234375,
0.0159912109375,
-0.05438232421875,
-0.0701904296875,
0.041900634765625,
-0.007328033447265625,
0.0233306884765625,
-0.0389404296875,
-0.039093017578125,
0.00539398193359375,
0.1212158203125,
-0.020538330078125,
-0.0158538818359375,
0.01053619384765625,
0.02734375,
-0.0357666015625,
-0.03179931640625,
-0.0313720703125,
-0.01424407958984375,
-0.0882568359375,
0.01161956787109375,
0.0035247802734375,
-0.033538818359375,
-0.025146484375,
0.0167694091796875,
-0.0650634765625,
-0.0300140380859375,
0.0123443603515625,
0.016510009765625,
0.02752685546875,
0.0037288665771484375,
-0.0011262893676757812,
0.0088348388671875,
0.0218963623046875,
-0.052276611328125,
-0.056976318359375,
-0.00801849365234375,
-0.04364013671875,
0.037994384765625,
0.004642486572265625,
0.048492431640625,
0.007083892822265625,
0.03607177734375,
0.02191162109375,
0.0142364501953125,
0.0169525146484375,
-0.017333984375,
0.033843994140625,
0.00775909423828125,
0.01416015625,
-0.0277557373046875,
-0.006710052490234375,
0.01654052734375,
-0.02850341796875,
0.069091796875,
0.00005698204040527344,
-0.007579803466796875,
0.047760009765625,
-0.05303955078125,
-0.00312042236328125,
-0.020782470703125,
-0.00341796875,
0.005931854248046875,
0.0006361007690429688,
-0.01293182373046875,
-0.0104522705078125,
0.01323699951171875,
0.00875091552734375,
-0.007488250732421875,
0.005962371826171875,
0.015960693359375,
0.0670166015625,
0.0178680419921875,
-0.01485443115234375,
-0.0626220703125,
0.02874755859375,
0.040191650390625,
0.01354217529296875,
0.01068115234375,
-0.001506805419921875,
-0.03485107421875,
0.0455322265625,
0.0176544189453125,
-0.01084136962890625,
-0.00542449951171875,
0.051055908203125,
-0.01140594482421875,
-0.0330810546875,
0.026611328125,
-0.0256500244140625,
0.0037975311279296875,
0.013092041015625,
-0.00897216796875,
-0.0022258758544921875,
0.0179443359375,
0.0196533203125,
-0.0104522705078125,
-0.0086669921875,
-0.015045166015625,
-0.02294921875,
-0.01161956787109375,
-0.014892578125,
0.07000732421875,
0.0272064208984375,
-0.006389617919921875,
0.0264892578125,
0.0207672119140625,
0.0009136199951171875,
-0.0010576248168945312,
0.033294677734375,
-0.019775390625,
0.0015592575073242188,
0.032623291015625,
-0.0208892822265625,
-0.02081298828125,
-0.010009765625,
0.09173583984375,
0.0308074951171875,
-0.006397247314453125,
-0.02923583984375,
-0.009674072265625,
-0.02227783203125,
-0.00023257732391357422,
-0.007579803466796875,
0.047027587890625,
-0.00150299072265625,
-0.0215301513671875,
0.0084075927734375,
-0.02874755859375,
-0.039215087890625,
-0.048583984375,
0.023468017578125,
0.02337646484375,
-0.036163330078125,
0.04412841796875,
-0.0565185546875,
0.04510498046875,
-0.0257568359375,
-0.003322601318359375,
-0.00113677978515625,
0.02947998046875,
-0.0172119140625,
0.01036834716796875,
0.0304412841796875,
0.013641357421875,
-0.042510986328125,
0.035614013671875,
-0.043609619140625,
-0.0152435302734375,
-0.0062713623046875,
0.06402587890625,
-0.043426513671875,
-0.0360107421875,
0.0305328369140625,
-0.0310516357421875,
-0.0019121170043945312,
-0.020538330078125,
-0.00765228271484375,
0.0018301010131835938,
-0.01020050048828125,
-0.042755126953125,
-0.001186370849609375,
0.01091766357421875,
-0.0033512115478515625,
0.020904541015625,
-0.018402099609375,
0.0208740234375,
0.0090789794921875,
-0.004314422607421875,
-0.0185394287109375,
-0.0216217041015625,
-0.039794921875,
0.00803375244140625,
-0.0191192626953125,
-0.0657958984375,
-0.064453125,
0.016326904296875,
-0.0046234130859375,
-0.00792694091796875,
-0.0257568359375,
0.0277862548828125,
-0.016876220703125,
-0.0289306640625,
-0.004974365234375,
0.0171661376953125,
0.0297698974609375,
0.0070648193359375,
-0.03497314453125,
0.0097808837890625,
-0.048797607421875,
-0.0023193359375,
-0.051666259765625,
-0.06793212890625,
-0.027923583984375,
-0.002750396728515625,
-0.0186004638671875,
-0.0018901824951171875,
-0.0216217041015625,
-0.0160675048828125,
-0.049285888671875,
0.05462646484375,
0.043365478515625,
0.038116455078125,
-0.039276123046875,
0.049285888671875,
0.0200042724609375,
0.027069091796875,
-0.0003428459167480469,
0.0275726318359375,
0.01629638671875,
-0.025726318359375,
0.02069091796875,
-0.0252227783203125,
-0.045257568359375,
-0.038177490234375,
-0.0016088485717773438,
0.034027099609375,
0.07916259765625,
-0.00461578369140625,
0.01146697998046875,
-0.021636962890625,
-0.004314422607421875,
-0.02197265625,
0.0006804466247558594,
-0.03350830078125,
-0.00597381591796875,
-0.0089874267578125,
0.0164337158203125,
0.0418701171875,
-0.027191162109375,
-0.0309906005859375,
0.004241943359375,
0.01001739501953125,
0.0294342041015625,
-0.0200042724609375,
-0.05364990234375,
0.05126953125,
0.01355743408203125,
-0.01145172119140625,
0.0286865234375,
-0.01434326171875,
0.0190887451171875,
0.005344390869140625,
-0.0080108642578125,
-0.01511383056640625,
0.01551055908203125,
0.032867431640625,
-0.01123046875,
-0.002471923828125,
0.0165863037109375,
-0.016204833984375,
0.02679443359375,
0.09918212890625,
0.09185791015625,
-0.125,
0.007099151611328125,
-0.0131378173828125,
0.0013017654418945312,
0.0906982421875,
0.0215301513671875,
-0.0167694091796875,
-0.01384735107421875,
0.058380126953125,
-0.0240631103515625,
0.007221221923828125,
0.042388916015625,
0.0044403076171875,
0.005340576171875,
0.00792694091796875,
0.007411956787109375,
0.00020968914031982422,
-0.027099609375,
-0.044158935546875,
0.03387451171875,
-0.032440185546875,
0.0186309814453125,
0.01554107666015625,
-0.019256591796875,
0.00698089599609375,
-0.01788330078125,
0.01715087890625,
-0.058929443359375,
-0.0071258544921875,
0.0183258056640625,
-0.0007233619689941406,
0.0274810791015625,
0.0279083251953125,
-0.01352691650390625,
0.01419830322265625,
-0.0135040283203125,
0.0164642333984375,
0.00649261474609375,
-0.020111083984375,
-0.0004570484161376953,
-0.0158843994140625,
-0.020660400390625,
0.008270263671875,
-0.01551055908203125,
-0.028167724609375,
-0.018829345703125,
0.011627197265625,
0.11834716796875,
-0.056976318359375,
-0.0120849609375,
0.035858154296875,
0.01129150390625,
-0.022125244140625,
-0.028717041015625,
0.033050537109375,
-0.048583984375,
0.00428009033203125,
-0.00743865966796875,
0.00632476806640625,
-0.00217437744140625,
-0.02288818359375,
-0.0279083251953125,
0.055419921875,
-0.0460205078125,
0.009033203125,
0.042266845703125,
0.0230865478515625,
-0.0221710205078125,
0.0124359130859375,
-0.018402099609375,
0.0172271728515625,
-0.0238800048828125,
0.034576416015625,
-0.048492431640625,
-0.0125732421875,
0.0029144287109375,
0.052337646484375,
0.0545654296875,
0.01250457763671875,
-0.0318603515625,
0.00955963134765625,
0.07769775390625,
0.049102783203125,
0.01016998291015625,
0.01483917236328125,
-0.034942626953125,
-0.0015649795532226562,
0.01076507568359375,
-0.00206756591796875,
0.0244140625,
0.0202178955078125,
-0.057891845703125,
-0.0080718994140625,
-0.006866455078125,
-0.020599365234375,
0.01273345947265625,
0.002521514892578125,
-0.058380126953125,
0.0209808349609375,
0.0293426513671875,
0.00733184814453125,
-0.02099609375,
0.0204620361328125,
-0.0186767578125,
-0.027313232421875,
-0.03167724609375,
-0.01511383056640625,
0.0265045166015625,
-0.00994110107421875,
0.022857666015625,
-0.006195068359375,
-0.0012121200561523438,
0.0107269287109375,
0.02874755859375,
0.0152587890625,
0.061370849609375,
-0.0196533203125,
0.0117034912109375,
0.0218353271484375,
0.006008148193359375,
-0.020538330078125,
-0.008453369140625,
-0.0102081298828125,
0.017242431640625,
-0.035247802734375,
0.00594329833984375,
0.005512237548828125,
-0.00494384765625,
0.008026123046875,
-0.04150390625,
0.01082611083984375,
-0.0576171875,
-0.058074951171875,
-0.0267791748046875,
0.003932952880859375,
0.0248260498046875,
-0.0082855224609375,
0.0083770751953125,
0.0183868408203125,
-0.0162353515625,
0.0016469955444335938,
-0.0299072265625,
-0.00901031494140625,
0.005462646484375,
-0.00030303001403808594,
0.017852783203125,
0.035552978515625,
0.06536865234375,
-0.007556915283203125,
-0.0305328369140625,
-0.0016241073608398438,
0.041656494140625,
0.01078033447265625,
0.00710296630859375,
0.034332275390625,
0.0284271240234375,
0.0157012939453125,
-0.0165252685546875,
0.021759033203125,
0.026214599609375,
0.00632476806640625,
-0.037689208984375,
-0.0196990966796875,
-0.0153656005859375,
-0.043731689453125,
0.0001252889633178711,
-0.04595947265625,
0.03802490234375,
0.054046630859375,
0.0073699951171875,
0.006931304931640625,
-0.0321044921875,
0.09649658203125,
-0.00653076171875,
0.01335906982421875,
0.004756927490234375,
-0.0179290771484375,
-0.0004515647888183594,
0.0023822784423828125,
0.0249176025390625,
0.033599853515625,
-0.0123748779296875,
0.007843017578125,
-0.023681640625,
-0.0214385986328125,
0.006046295166015625,
0.025543212890625,
-0.0005750656127929688,
0.01093292236328125,
0.0156402587890625,
-0.038238525390625,
0.0120086669921875,
0.00826263427734375,
0.0157623291015625,
0.0011491775512695312,
0.0022869110107421875,
-0.0013904571533203125,
-0.0634765625,
-0.0389404296875,
-0.0297088623046875,
0.054229736328125,
0.004482269287109375,
0.047210693359375,
-0.02197265625,
0.0235443115234375,
-0.01033782958984375,
0.0096588134765625,
-0.0031719207763671875,
-0.01412200927734375,
0.035247802734375,
0.0189971923828125,
0.0010328292846679688,
-0.019805908203125,
-0.07159423828125,
0.0283966064453125,
0.007965087890625,
-0.022918701171875,
0.0190887451171875,
0.0201263427734375,
-0.0003509521484375,
-0.0178375244140625,
-0.0318603515625,
-0.032989501953125,
-0.0209808349609375,
-0.0083160400390625,
0.0011920928955078125,
-0.004779815673828125,
-0.059722900390625,
-0.028564453125,
0.0240936279296875,
0.0208587646484375,
-0.0158538818359375,
0.038787841796875,
-0.0194244384765625,
0.088134765625,
0.046844482421875,
-0.0323486328125,
-0.06988525390625,
-0.007137298583984375,
-0.01666259765625,
-0.0140228271484375,
-0.0004737377166748047,
0.05535888671875,
-0.00952911376953125,
-0.042205810546875,
0.051788330078125,
0.05865478515625,
0.07659912109375,
-0.0106658935546875,
0.020416259765625,
0.035888671875,
-0.0157318115234375,
0.0251922607421875,
-0.01007843017578125,
-0.02392578125,
-0.0171356201171875,
0.00991058349609375,
0.04718017578125,
-0.00473785400390625,
0.0171356201171875,
-0.08740234375,
0.0018558502197265625,
0.0210723876953125,
-0.01629638671875,
-0.0430908203125,
0.031982421875,
-0.041656494140625,
0.026275634765625,
-0.03363037109375,
-0.0081634521484375,
0.014923095703125,
0.039520263671875,
-0.01245880126953125,
-0.039947509765625,
-0.01837158203125,
0.034759521484375,
-0.02886962890625,
0.0253143310546875,
0.0241851806640625,
-0.01739501953125,
0.063720703125,
0.053558349609375,
0.03497314453125,
0.09027099609375,
-0.0416259765625,
-0.01267242431640625,
0.041961669921875,
-0.00644683837890625,
-0.0298919677734375,
-0.0643310546875,
0.0017414093017578125,
-0.037200927734375,
0.00492095947265625,
-0.0076446533203125,
0.0134124755859375,
0.031951904296875,
-0.0269775390625,
-0.0712890625,
-0.016082763671875,
0.0037937164306640625,
-0.046051025390625,
-0.043212890625,
0.0054931640625,
-0.0218048095703125,
0.0088348388671875,
-0.0011653900146484375,
-0.03314208984375,
0.01358795166015625,
0.0445556640625,
0.0131988525390625,
0.058258056640625,
0.0030498504638671875,
0.051116943359375,
-0.059417724609375,
0.005123138427734375,
-0.03515625,
0.01263427734375,
-0.01403045654296875,
-0.0190582275390625,
0.01922607421875,
0.01259613037109375,
-0.035797119140625,
-0.03863525390625,
0.0010013580322265625,
0.0174713134765625,
-0.01163482666015625,
-0.04278564453125,
-0.0212554931640625,
-0.03436279296875,
0.06903076171875,
0.0255889892578125,
0.0002620220184326172,
0.01007843017578125,
-0.051544189453125,
-0.036163330078125,
-0.0236663818359375,
0.01235198974609375,
0.0260009765625,
-0.061279296875,
0.0302581787109375,
0.0263519287109375,
-0.0284271240234375,
0.0185089111328125,
-0.008514404296875,
-0.045166015625,
0.025787353515625,
-0.02081298828125,
0.0101165771484375,
-0.0810546875,
0.003021240234375,
0.08966064453125,
-0.02197265625,
0.0654296875,
-0.0147705078125,
0.01399993896484375,
0.09442138671875,
0.0233306884765625,
-0.00026345252990722656,
0.0120849609375,
-0.034881591796875,
0.035980224609375,
-0.01299285888671875,
0.0576171875,
-0.05517578125,
-0.0189056396484375,
-0.001415252685546875,
-0.005451202392578125,
-0.01004791259765625,
-0.0227203369140625,
0.0111541748046875,
0.040252685546875,
-0.0202484130859375,
0.08807373046875,
-0.0009431838989257812,
-0.0012645721435546875,
-0.03240966796875,
0.04345703125,
-0.0087890625,
-0.003429412841796875,
0.005290985107421875,
-0.0174102783203125,
0.00604248046875,
-0.0175628662109375,
-0.01396942138671875,
-0.04071044921875,
0.01125335693359375,
-0.0163726806640625,
-0.016815185546875,
0.01519775390625
] |
31f400aae149837f78c35d687088e394aafcc384
|
Wordpress Stackexchange
Q: How to add default images for custom backgrounds? The custom header feature allows (in some code I have found) to suggest several default images to use in the custom header.
Could the same be built in the custom background?
The idea is to have already some textures available for the user to choose from in the theme.
Any ideas?
A: if you are asking default background image for
add_theme_support( 'custom-background'); then it can be set using 'default-image' => get_template_directory_uri() . '/images/pattern.png',
complete code will look like below.
$args = array(
'default-color' => 'f0f0f0',
'default-repeat' => 'fixed',
'default-image' => get_template_directory_uri() . '/assets/images/pattern.png',
);
add_theme_support( 'custom-background', $args );
|
Q: How to add default images for custom backgrounds? The custom header feature allows (in some code I have found) to suggest several default images to use in the custom header.
Could the same be built in the custom background?
The idea is to have already some textures available for the user to choose from in the theme.
Any ideas?
A: if you are asking default background image for
add_theme_support( 'custom-background'); then it can be set using 'default-image' => get_template_directory_uri() . '/images/pattern.png',
complete code will look like below.
$args = array(
'default-color' => 'f0f0f0',
'default-repeat' => 'fixed',
'default-image' => get_template_directory_uri() . '/assets/images/pattern.png',
);
add_theme_support( 'custom-background', $args );
A: I would suggest outputting a line of CSS in your header.php file, something like
<?='.body {background-image:url(/your/path/to/images/'.$YOUR_CHOSEN_IMAGE.'.png);}'?>
A: I'm not really sure what you're asking, but here goes.
Assuming that you already know the options settings api, here's a form you can use to implement that idea:
<label for="bg1">
<img src="http://lorempixel.com/50/50" />
<input class="select_control" id="bg1" name="bg" type="radio" value="bg1" />
</label>
<label for="bg2">
<img src="http://lorempixel.com/50/50" />
<input class="select_control" id="test2" name="bg" type="radio" value="bg2" />
</label>
<label for="bg3">
<img src="http://lorempixel.com/50/50" />
<input class="select_control" id="bg3" name="bg" type="radio" value="bg3" />
</label>
http://jsfiddle.net/58sWX/
Convert that using the settings API, then use get_option() to retrieve your background image url to display it.
If you want to change the CSS, background: url(), based on the option value. Then you might need to know how to use CSS in PHP.
<?php
header("Content-type: text/css");
<?php if (get_option('your_background_image') != '') : ?>
body {
background: url( <?php echo get_option('your_background_image'); ?>;
}
<?php endif; ?>
|
wordpress
|
{
"language": "en",
"length": 260,
"provenance": "stackexchange_00019.jsonl.gz:421808",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58365"
}
|
[
0.08074951171875,
-0.0233306884765625,
0.06683349609375,
-0.056304931640625,
-0.0017414093017578125,
0.00888824462890625,
0.04754638671875,
-0.0239410400390625,
-0.0256195068359375,
0.0020236968994140625,
-0.041961669921875,
0.0086517333984375,
-0.04461669921875,
-0.0105743408203125,
0.0024356842041015625,
-0.054840087890625,
0.06866455078125,
-0.04290771484375,
0.0635986328125,
0.003749847412109375,
0.0364990234375,
0.04058837890625,
0.044189453125,
0.07708740234375,
0.0158233642578125,
-0.0092315673828125,
0.04443359375,
-0.0235443115234375,
0.0037784576416015625,
-0.004360198974609375,
0.018707275390625,
0.0087432861328125,
0.007556915283203125,
0.042236328125,
-0.0203399658203125,
0.03564453125,
0.0240631103515625,
0.0114593505859375,
0.02020263671875,
0.01088714599609375,
0.0080718994140625,
-0.004604339599609375,
0.0230712890625,
0.010833740234375,
-0.0013904571533203125,
-0.0517578125,
0.0182952880859375,
-0.037628173828125,
0.01580810546875,
0.0018463134765625,
-0.01129150390625,
0.0011873245239257812,
-0.0000209808349609375,
-0.02642822265625,
-0.020233154296875,
-0.041015625,
-0.0204315185546875,
0.0182952880859375,
0.0474853515625,
-0.0214080810546875,
-0.044219970703125,
-0.0384521484375,
0.042022705078125,
-0.019012451171875,
0.015106201171875,
0.0016918182373046875,
-0.0188751220703125,
0.020111083984375,
-0.03314208984375,
0.0008988380432128906,
0.020294189453125,
-0.041839599609375,
0.0052642822265625,
-0.056854248046875,
-0.00933837890625,
0.012481689453125,
-0.018096923828125,
-0.031707763671875,
0.01715087890625,
-0.017608642578125,
0.025177001953125,
-0.02386474609375,
0.0100860595703125,
-0.01910400390625,
0.038604736328125,
0.0096435546875,
-0.005596160888671875,
-0.0172882080078125,
-0.0034770965576171875,
-0.004398345947265625,
-0.01239013671875,
-0.053466796875,
0.0177459716796875,
0.0121917724609375,
-0.0175323486328125,
-0.0207061767578125,
0.00506591796875,
0.010040283203125,
-0.02606201171875,
0.0338134765625,
-0.0048980712890625,
-0.037994384765625,
0.09307861328125,
-0.052947998046875,
-0.0112152099609375,
-0.000002562999725341797,
0.0012769699096679688,
-0.0245513916015625,
-0.004108428955078125,
0.042022705078125,
-0.01494598388671875,
-0.0068817138671875,
-0.0074005126953125,
-0.03369140625,
-0.033477783203125,
0.03277587890625,
-0.0256805419921875,
-0.0232696533203125,
0.010772705078125,
-0.019256591796875,
0.004703521728515625,
0.0400390625,
0.0091705322265625,
-0.06072998046875,
0.01454925537109375,
-0.0082855224609375,
-0.036468505859375,
-0.034332275390625,
-0.01247406005859375,
0.009552001953125,
-0.03094482421875,
0.0294952392578125,
0.05853271484375,
0.00434112548828125,
-0.01019287109375,
-0.011627197265625,
0.0172882080078125,
-0.01611328125,
-0.0029449462890625,
-0.0012502670288085938,
0.0266571044921875,
-0.01500701904296875,
0.001323699951171875,
0.00559234619140625,
0.0281982421875,
-0.00945281982421875,
-0.00909423828125,
0.037750244140625,
0.016845703125,
-0.03631591796875,
0.057037353515625,
-0.032958984375,
-0.01531982421875,
0.0257110595703125,
0.02557373046875,
0.0283203125,
0.0029277801513671875,
0.02093505859375,
0.01410675048828125,
0.007236480712890625,
-0.00994873046875,
-0.00608062744140625,
0.0024318695068359375,
-0.006023406982421875,
-0.0205078125,
0.023529052734375,
0.0028781890869140625,
0.00337982177734375,
0.01363372802734375,
-0.036285400390625,
-0.006084442138671875,
0.01800537109375,
-0.01300048828125,
0.008544921875,
0.027313232421875,
0.02679443359375,
0.02215576171875,
0.010528564453125,
-0.006420135498046875,
0.0733642578125,
0.0005245208740234375,
-0.037322998046875,
0.0186614990234375,
-0.0180816650390625,
-0.057861328125,
0.0088958740234375,
-0.0005664825439453125,
0.07159423828125,
0.04974365234375,
0.0129852294921875,
0.0019779205322265625,
-0.039794921875,
-0.051666259765625,
0.00405120849609375,
-0.032684326171875,
-0.016510009765625,
-0.033538818359375,
-0.01806640625,
-0.026458740234375,
0.059967041015625,
0.004611968994140625,
-0.034942626953125,
0.025299072265625,
-0.00911712646484375,
0.028411865234375,
-0.031982421875,
0.004009246826171875,
0.01198577880859375,
-0.001979827880859375,
-0.005115509033203125,
-0.00203704833984375,
-0.04205322265625,
0.023193359375,
-0.057403564453125,
-0.039306640625,
0.00937652587890625,
-0.00250244140625,
0.00605010986328125,
0.0030727386474609375,
0.0261688232421875,
0.023162841796875,
-0.0167694091796875,
0.021453857421875,
0.02838134765625,
0.041534423828125,
0.00005054473876953125,
-0.015960693359375,
-0.0209503173828125,
0.034271240234375,
0.00342559814453125,
-0.036102294921875,
0.0261077880859375,
-0.024200439453125,
0.006710052490234375,
-0.0030384063720703125,
-0.000988006591796875,
0.01155853271484375,
-0.0455322265625,
0.005279541015625,
0.03460693359375,
0.019073486328125,
0.0187530517578125,
-0.0017528533935546875,
0.0252227783203125,
0.0914306640625,
0.05926513671875,
0.02197265625,
-0.00933074951171875,
0.028289794921875,
-0.0184783935546875,
-0.0034122467041015625,
-0.053741455078125,
0.047454833984375,
-0.07330322265625,
0.043212890625,
0.013275146484375,
-0.033172607421875,
-0.05145263671875,
0.00034117698669433594,
0.0019683837890625,
0.0313720703125,
-0.00044798851013183594,
-0.036102294921875,
0.01654052734375,
0.01267242431640625,
0.00787353515625,
0.00965118408203125,
0.0030498504638671875,
-0.0236053466796875,
0.0311431884765625,
0.0081329345703125,
-0.057861328125,
-0.0003819465637207031,
0.037811279296875,
0.033447265625,
0.00983428955078125,
-0.0148162841796875,
-0.0153045654296875,
0.005123138427734375,
0.0190582275390625,
-0.004848480224609375,
-0.002857208251953125,
-0.039764404296875,
0.0059814453125,
0.00952911376953125,
-0.06292724609375,
0.01078033447265625,
0.0635986328125,
-0.00980377197265625,
0.0011749267578125,
0.00634765625,
0.0550537109375,
0.01554107666015625,
0.005687713623046875,
0.0313720703125,
0.01128387451171875,
-0.01560211181640625,
-0.036773681640625,
0.05029296875,
-0.05389404296875,
0.007659912109375,
0.057159423828125,
-0.049072265625,
0.02716064453125,
-0.01534271240234375,
0.04766845703125,
0.01546478271484375,
-0.01148223876953125,
-0.0264129638671875,
-0.01580810546875,
-0.03485107421875,
-0.0263519287109375,
0.012420654296875,
0.0177154541015625,
-0.01500701904296875,
-0.024078369140625,
-0.01153564453125,
0.0010423660278320312,
-0.03411865234375,
-0.032379150390625,
0.00800323486328125,
-0.00925445556640625,
-0.0308074951171875,
-0.0323486328125,
-0.000027954578399658203,
0.0130615234375,
-0.035888671875,
-0.017333984375,
-0.02508544921875,
-0.0257110595703125,
0.008392333984375,
-0.06884765625,
-0.04736328125,
-0.06298828125,
0.01190948486328125,
0.01073455810546875,
-0.005214691162109375,
0.027496337890625,
0.00682830810546875,
-0.01007843017578125,
0.020660400390625,
0.01342010498046875,
0.0201416015625,
0.002777099609375,
0.01922607421875,
-0.0125885009765625,
0.0295867919921875,
-0.00750732421875,
-0.0033359527587890625,
0.0643310546875,
-0.037750244140625,
-0.016265869140625,
-0.05364990234375,
-0.04498291015625,
-0.0821533203125,
0.1015625,
0.085693359375,
-0.0814208984375,
-0.0123291015625,
-0.07232666015625,
-0.0234375,
-0.01026153564453125,
-0.051025390625,
0.045166015625,
0.0208892822265625,
-0.005924224853515625,
-0.006740570068359375,
0.0294647216796875,
-0.01323699951171875,
0.00146484375,
0.00865936279296875,
-0.033203125,
0.027557373046875,
-0.001621246337890625,
-0.00841522216796875,
0.0030612945556640625,
0.0192108154296875,
-0.01386260986328125,
0.0517578125,
0.0247650146484375,
0.0291748046875,
-0.017303466796875,
0.042694091796875,
-0.060028076171875,
-0.05316162109375,
0.04669189453125,
0.01403045654296875,
0.022796630859375,
-0.0220184326171875,
-0.03436279296875,
-0.002483367919921875,
0.07257080078125,
-0.036376953125,
-0.0318603515625,
-0.0018835067749023438,
0.038055419921875,
-0.025909423828125,
-0.0141448974609375,
-0.00370025634765625,
-0.01617431640625,
-0.1026611328125,
0.0205841064453125,
0.011932373046875,
-0.0357666015625,
-0.01424407958984375,
-0.022796630859375,
-0.061981201171875,
-0.047271728515625,
-0.00795745849609375,
0.034423828125,
-0.0250701904296875,
0.042572021484375,
-0.03125,
0.05657958984375,
0.02764892578125,
-0.030029296875,
-0.0740966796875,
-0.0174102783203125,
-0.02294921875,
0.05670166015625,
0.0105743408203125,
0.0016384124755859375,
-0.0175323486328125,
0.033721923828125,
0.026641845703125,
0.05133056640625,
0.01165008544921875,
-0.0101470947265625,
0.028411865234375,
-0.02301025390625,
0.0245208740234375,
-0.042449951171875,
-0.00684356689453125,
0.01641845703125,
-0.0186309814453125,
0.0213775634765625,
-0.01335906982421875,
-0.0120086669921875,
0.026092529296875,
-0.049346923828125,
0.0229949951171875,
0.0013170242309570312,
0.0066680908203125,
0.04754638671875,
-0.00571441650390625,
0.0007596015930175781,
-0.0219573974609375,
-0.011505126953125,
0.038665771484375,
0.0098724365234375,
0.00848388671875,
-0.006786346435546875,
0.060699462890625,
0.0181884765625,
-0.0217437744140625,
-0.0236053466796875,
0.0188751220703125,
0.036376953125,
-0.01434326171875,
-0.0055999755859375,
-0.0248260498046875,
-0.027557373046875,
0.05682373046875,
-0.0215606689453125,
-0.007457733154296875,
-0.011474609375,
0.068115234375,
-0.0157012939453125,
-0.032470703125,
0.03143310546875,
-0.0325927734375,
0.011383056640625,
0.0098876953125,
-0.0057373046875,
0.01021575927734375,
-0.00908660888671875,
-0.0029296875,
0.01444244384765625,
-0.048004150390625,
-0.03594970703125,
0.005767822265625,
-0.0214691162109375,
-0.0109100341796875,
0.048095703125,
0.03875732421875,
-0.00525665283203125,
0.0015611648559570312,
0.0269317626953125,
0.0269775390625,
-0.0210723876953125,
0.00188446044921875,
-0.0024547576904296875,
0.030426025390625,
0.03607177734375,
0.033294677734375,
-0.01580810546875,
-0.01910400390625,
0.0938720703125,
0.0202484130859375,
-0.0225677490234375,
-0.019744873046875,
-0.0155029296875,
0.016632080078125,
-0.00689697265625,
0.0121612548828125,
0.049896240234375,
-0.0037689208984375,
0.0061187744140625,
-0.010467529296875,
-0.0601806640625,
-0.011993408203125,
-0.05560302734375,
0.03643798828125,
0.042449951171875,
-0.029266357421875,
0.02593994140625,
-0.02459716796875,
0.041107177734375,
-0.0227508544921875,
-0.00514984130859375,
-0.0104217529296875,
-0.00873565673828125,
0.02276611328125,
0.0017061233520507812,
0.03424072265625,
-0.016448974609375,
0.0165252685546875,
0.0474853515625,
-0.0450439453125,
-0.0005693435668945312,
-0.01435089111328125,
0.07000732421875,
-0.05560302734375,
-0.060089111328125,
0.0477294921875,
-0.069091796875,
-0.0008807182312011719,
0.0021228790283203125,
-0.02984619140625,
-0.042205810546875,
-0.005413055419921875,
0.0255279541015625,
0.034454345703125,
-0.024017333984375,
-0.052154541015625,
0.046417236328125,
-0.03533935546875,
0.038238525390625,
-0.00466156005859375,
0.004375457763671875,
0.0229644775390625,
0.01227569580078125,
-0.0418701171875,
-0.02020263671875,
-0.007678985595703125,
-0.039794921875,
-0.013519287109375,
-0.00931549072265625,
-0.019378662109375,
0.017822265625,
-0.032745361328125,
0.0066070556640625,
-0.0058441162109375,
-0.007965087890625,
0.01204681396484375,
0.0266265869140625,
0.027984619140625,
-0.00746917724609375,
-0.02349853515625,
-0.0013914108276367188,
-0.03326416015625,
-0.00046896934509277344,
-0.0308074951171875,
-0.0682373046875,
-0.00858306884765625,
-0.0184783935546875,
0.01910400390625,
0.014068603515625,
0.0032062530517578125,
-0.01013946533203125,
-0.047149658203125,
0.051666259765625,
0.041107177734375,
0.057861328125,
-0.0160675048828125,
-0.001438140869140625,
0.03997802734375,
0.0016355514526367188,
0.01407623291015625,
0.00447845458984375,
0.006744384765625,
-0.036163330078125,
-0.012237548828125,
-0.028533935546875,
0.0037631988525390625,
0.014862060546875,
-0.0254364013671875,
0.028717041015625,
0.0670166015625,
0.0287933349609375,
-0.00185394287109375,
-0.033447265625,
-0.0126495361328125,
-0.0223541259765625,
0.057098388671875,
-0.025360107421875,
0.004840850830078125,
0.00266265869140625,
0.015228271484375,
0.06353759765625,
-0.0455322265625,
-0.01212310791015625,
0.005306243896484375,
-0.0120391845703125,
0.011962890625,
0.0269012451171875,
-0.09454345703125,
0.0775146484375,
0.09234619140625,
0.02398681640625,
0.05462646484375,
0.00983428955078125,
0.01009368896484375,
0.014495849609375,
0.04132080078125,
-0.011199951171875,
-0.066162109375,
0.045196533203125,
0.025726318359375,
-0.00785064697265625,
0.04833984375,
-0.0256195068359375,
0.020843505859375,
-0.0025463104248046875,
0.057342529296875,
-0.022247314453125,
0.027740478515625,
0.01447296142578125,
0.00908660888671875,
0.076416015625,
0.0208740234375,
-0.02001953125,
-0.018798828125,
0.0284881591796875,
-0.034820556640625,
-0.009490966796875,
0.005481719970703125,
0.0201873779296875,
-0.007843017578125,
-0.006755828857421875,
-0.018768310546875,
-0.0218048095703125,
-0.0254058837890625,
-0.057159423828125,
0.03717041015625,
-0.07427978515625,
0.006824493408203125,
0.02362060546875,
-0.022674560546875,
-0.008514404296875,
-0.033477783203125,
-0.00234222412109375,
-0.041229248046875,
-0.029998779296875,
0.0178680419921875,
-0.01398468017578125,
0.009735107421875,
0.038330078125,
-0.0167999267578125,
0.0232696533203125,
0.01233673095703125,
-0.020050048828125,
0.034332275390625,
-0.022796630859375,
0.0219268798828125,
0.0243072509765625,
-0.0667724609375,
0.0046844482421875,
-0.0260467529296875,
0.0181121826171875,
-0.00814056396484375,
-0.02716064453125,
0.0673828125,
-0.07269287109375,
0.0119781494140625,
0.015167236328125,
0.03167724609375,
-0.00396728515625,
0.006015777587890625,
0.0233154296875,
-0.046905517578125,
-0.021881103515625,
-0.0027256011962890625,
-0.042755126953125,
0.0107879638671875,
-0.01403045654296875,
-0.0390625,
0.033294677734375,
-0.0269775390625,
0.0184173583984375,
-0.00324249267578125,
0.01154327392578125,
0.02301025390625,
0.0025691986083984375,
-0.0130767822265625,
0.0189056396484375,
-0.015655517578125,
0.020660400390625,
-0.035247802734375,
0.0030612945556640625,
-0.008697509765625,
0.037872314453125,
0.05499267578125,
0.0137786865234375,
0.007144927978515625,
0.0013418197631835938,
0.0238494873046875,
0.00518798828125,
-0.032012939453125,
0.0278167724609375,
0.004032135009765625,
-0.0258026123046875,
-0.01629638671875,
0.01430511474609375,
0.028564453125,
-0.034912109375,
-0.0250396728515625,
0.0193023681640625,
0.0195465087890625,
0.0185089111328125,
0.0203094482421875,
0.0124664306640625,
-0.05950927734375,
0.007320404052734375,
0.061920166015625,
-0.0631103515625,
-0.0195770263671875,
0.08880615234375,
0.0330810546875,
0.0229034423828125,
-0.0227508544921875,
-0.02581787109375,
0.06683349609375,
0.00853729248046875,
0.0195159912109375,
0.025054931640625,
0.032623291015625,
-0.03216552734375,
-0.0052642822265625,
0.0255889892578125,
0.0296630859375,
-0.05743408203125,
0.03375244140625,
0.006557464599609375,
0.0057373046875,
-0.05316162109375,
-0.01128387451171875,
0.00653839111328125,
0.0438232421875,
-0.04547119140625,
-0.019927978515625,
0.015350341796875,
0.011749267578125,
0.042816162109375,
-0.0279388427734375,
0.037628173828125,
-0.06793212890625,
-0.033203125,
-0.050079345703125,
0.01049041748046875,
0.0205230712890625,
-0.00469970703125,
-0.0255584716796875,
-0.03582763671875,
0.00894927978515625,
0.0302276611328125,
-0.0109710693359375,
0.004764556884765625,
0.0009479522705078125,
0.0010976791381835938,
-0.0064849853515625,
0.0206451416015625,
0.033599853515625,
0.0179595947265625,
-0.006221771240234375,
0.044769287109375,
0.017730712890625,
-0.00033974647521972656,
0.00799560546875,
-0.008392333984375,
-0.02972412109375,
0.01885986328125,
0.01873779296875,
-0.0218353271484375,
0.03302001953125,
-0.01125335693359375,
-0.06451416015625,
-0.007686614990234375,
-0.00959014892578125,
-0.038818359375,
0.0316162109375,
-0.06268310546875,
0.053131103515625,
0.01540374755859375,
-0.007144927978515625,
0.025390625,
-0.04730224609375,
0.08111572265625,
-0.005435943603515625,
0.01033782958984375,
0.01363372802734375,
-0.032928466796875,
0.007671356201171875,
0.0108184814453125,
0.05377197265625,
0.01513671875,
-0.059112548828125,
-0.0160064697265625,
0.003170013427734375,
-0.040496826171875,
0.0269012451171875,
0.03851318359375,
-0.0323486328125,
0.01873779296875,
-0.007289886474609375,
0.014801025390625,
-0.016937255859375,
-0.021270751953125,
0.0117950439453125,
-0.031402587890625,
0.0118408203125,
0.00002491474151611328,
-0.03253173828125,
-0.014129638671875,
-0.01690673828125,
0.03253173828125,
0.0288238525390625,
0.03668212890625,
-0.0070953369140625,
0.0229034423828125,
-0.0019330978393554688,
0.010528564453125,
-0.0035076141357421875,
0.01068115234375,
0.0078887939453125,
0.0182952880859375,
0.0085601806640625,
-0.028411865234375,
-0.0311126708984375,
0.023712158203125,
0.0255584716796875,
-0.041168212890625,
0.0008244514465332031,
0.01512908935546875,
0.01202392578125,
-0.0059661865234375,
-0.0006690025329589844,
-0.0458984375,
-0.05206298828125,
-0.07952880859375,
-0.0018949508666992188,
0.0182647705078125,
-0.007770538330078125,
-0.036529541015625,
0.037109375,
-0.0025043487548828125,
0.03125,
0.026214599609375,
-0.005859375,
0.0677490234375,
0.057830810546875,
-0.0804443359375,
-0.0811767578125,
0.00034165382385253906,
-0.00467681884765625,
-0.016693115234375,
-0.00226593017578125,
0.058380126953125,
-0.0196075439453125,
-0.024566650390625,
0.0435791015625,
0.03192138671875,
0.055938720703125,
-0.0458984375,
0.0006160736083984375,
0.033172607421875,
0.00507354736328125,
0.0262298583984375,
0.0010232925415039062,
-0.00213623046875,
-0.0239410400390625,
-0.01080322265625,
0.02496337890625,
-0.01203155517578125,
0.01151275634765625,
-0.03399658203125,
0.0121002197265625,
0.0242462158203125,
0.0203857421875,
-0.0662841796875,
0.061004638671875,
-0.022247314453125,
0.01324462890625,
0.0030727386474609375,
-0.0277862548828125,
0.004718780517578125,
-0.01959228515625,
-0.036529541015625,
-0.0081939697265625,
-0.03497314453125,
0.00531768798828125,
-0.00955963134765625,
0.004459381103515625,
0.03643798828125,
0.0027256011962890625,
0.0024700164794921875,
0.0074615478515625,
-0.024871826171875,
0.0660400390625,
-0.092529296875,
-0.0167388916015625,
0.01357269287109375,
-0.015167236328125,
-0.043426513671875,
-0.037841796875,
0.05059814453125,
-0.0784912109375,
-0.04681396484375,
-0.052886962890625,
0.03143310546875,
0.039520263671875,
-0.0255126953125,
-0.059661865234375,
0.029083251953125,
-0.02001953125,
-0.02899169921875,
-0.036865234375,
0.0433349609375,
-0.01207733154296875,
-0.0277557373046875,
0.006855010986328125,
-0.0290374755859375,
0.04058837890625,
0.0198822021484375,
-0.0180511474609375,
0.0105743408203125,
0.00691986083984375,
0.0078887939453125,
-0.0038127899169921875,
0.00965118408203125,
0.0218658447265625,
-0.033782958984375,
0.042144775390625,
-0.050323486328125,
0.0377197265625,
0.03607177734375,
-0.05517578125,
-0.052581787109375,
-0.0185394287109375,
-0.018218994140625,
-0.04351806640625,
-0.037017822265625,
0.004947662353515625,
0.00519561767578125,
0.067626953125,
0.041778564453125,
0.00948333740234375,
-0.0294952392578125,
-0.00597381591796875,
-0.023773193359375,
0.0119781494140625,
0.0068817138671875,
-0.0038967132568359375,
-0.0228424072265625,
0.005481719970703125,
0.014862060546875,
-0.02740478515625,
-0.00441741943359375,
0.004486083984375,
-0.04254150390625,
0.0133514404296875,
-0.00704193115234375,
-0.005523681640625,
-0.048370361328125,
0.0040283203125,
0.049163818359375,
-0.024566650390625,
0.041046142578125,
-0.042755126953125,
0.016021728515625,
0.043792724609375,
-0.02471923828125,
-0.0097503662109375,
0.01373291015625,
0.0037975311279296875,
0.0201568603515625,
0.0004477500915527344,
-0.005916595458984375,
-0.02630615234375,
0.01013946533203125,
-0.00530242919921875,
0.01568603515625,
0.007190704345703125,
0.01525115966796875,
0.0018243789672851562,
0.023956298828125,
0.007061004638671875,
0.037994384765625,
-0.00627899169921875,
-0.042877197265625,
-0.0156707763671875,
0.008544921875,
-0.0238800048828125,
0.009674072265625,
-0.002147674560546875,
-0.02789306640625,
0.006420135498046875,
0.001800537109375,
-0.024261474609375,
-0.0247955322265625,
0.015289306640625,
-0.04180908203125,
-0.019287109375,
0.0174102783203125
] |
a792f8d783c2e17a936f9e8e72b1cb389800f0d0
|
Wordpress Stackexchange
Q: Using Disqus, how to stop storing comments in wp database? I'm using disqus comments system, but it keeps storing the comments in the wordpress database as well. Is there way to disable option to store comments in wordpress database because I don't see any use of it.
A: The disqus plugin synchronizes your WordPress comments with the disqus system -- that's it's main purpose (own your own comments, etc). You can get around this by ditching the built in WordPress commenting system altogether, modifying your theme templates (probably just comments.php) to use the stand-alone disqus javascript.
<script type="text/javascript">
var disqus_shortname = ''; // required: replace example with your forum shortname
var disqus_identifier = '<?php the_guid() ?>'; // globally unique identifier. *should* never change.
var disqus_url = '<?php echo get_permalink(); ?>'; //link-back to this page
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
|
Q: Using Disqus, how to stop storing comments in wp database? I'm using disqus comments system, but it keeps storing the comments in the wordpress database as well. Is there way to disable option to store comments in wordpress database because I don't see any use of it.
A: The disqus plugin synchronizes your WordPress comments with the disqus system -- that's it's main purpose (own your own comments, etc). You can get around this by ditching the built in WordPress commenting system altogether, modifying your theme templates (probably just comments.php) to use the stand-alone disqus javascript.
<script type="text/javascript">
var disqus_shortname = ''; // required: replace example with your forum shortname
var disqus_identifier = '<?php the_guid() ?>'; // globally unique identifier. *should* never change.
var disqus_url = '<?php echo get_permalink(); ?>'; //link-back to this page
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
A: Did you already try disabling the sync from Disqus to WordPress?
(This is under plugin settings in the Disqus Dashboard view.)
FYI: The use of storing comments is to protect yourself against data loss if Disqus goes under, or if you want to migrate to a new plugin in the future.
Of course, you can manually sync with a setting as well, so barring an apocalyptic failure/shutdown of Disqus you're probably fine not storing the comments in your database.
|
wordpress
|
{
"language": "en",
"length": 251,
"provenance": "stackexchange_00019.jsonl.gz:421826",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58417"
}
|
[
0.05633544921875,
-0.004795074462890625,
-0.0106964111328125,
-0.04638671875,
0.01512908935546875,
-0.0280609130859375,
0.03509521484375,
0.0033092498779296875,
0.04315185546875,
0.01215362548828125,
-0.0712890625,
-0.05108642578125,
0.024017333984375,
-0.00421142578125,
-0.026824951171875,
-0.043304443359375,
0.06597900390625,
0.002346038818359375,
0.0670166015625,
0.0207061767578125,
-0.0104217529296875,
0.0540771484375,
0.0167999267578125,
0.0650634765625,
-0.0004673004150390625,
-0.04669189453125,
0.167724609375,
-0.0118255615234375,
0.03173828125,
-0.017303466796875,
0.0184173583984375,
-0.042572021484375,
0.038543701171875,
0.008392333984375,
-0.03900146484375,
-0.015960693359375,
-0.042633056640625,
0.0194549560546875,
-0.0006847381591796875,
-0.00043129920959472656,
0.0025157928466796875,
-0.0007309913635253906,
-0.004756927490234375,
0.0027370452880859375,
-0.01128387451171875,
-0.0269317626953125,
0.0111236572265625,
-0.0374755859375,
-0.008453369140625,
0.010284423828125,
0.005672454833984375,
0.031280517578125,
0.0141448974609375,
0.0178070068359375,
-0.003284454345703125,
0.016265869140625,
-0.04949951171875,
0.004138946533203125,
0.00994873046875,
0.04351806640625,
0.040008544921875,
-0.01495361328125,
-0.0007600784301757812,
0.01153564453125,
-0.01065826416015625,
-0.002956390380859375,
0.0521240234375,
0.01462554931640625,
-0.050628662109375,
-0.01241302490234375,
0.03411865234375,
-0.01131439208984375,
0.0025043487548828125,
-0.0316162109375,
-0.022186279296875,
0.006237030029296875,
-0.007049560546875,
-0.0273284912109375,
0.00809478759765625,
-0.0092926025390625,
0.0096588134765625,
-0.0100860595703125,
-0.046844482421875,
0.004032135009765625,
0.0023517608642578125,
0.0231781005859375,
-0.02044677734375,
-0.0292205810546875,
-0.01422119140625,
0.0092926025390625,
-0.0095977783203125,
0.017242431640625,
-0.0162353515625,
0.02423095703125,
-0.0175933837890625,
-0.0020542144775390625,
0.005710601806640625,
0.050506591796875,
-0.03717041015625,
-0.007404327392578125,
-0.0318603515625,
0.004337310791015625,
-0.035614013671875,
-0.030029296875,
0.01110076904296875,
0.051788330078125,
-0.037322998046875,
-0.10186767578125,
0.0016384124755859375,
0.01947021484375,
0.00960540771484375,
-0.05621337890625,
-0.0256500244140625,
-0.0267333984375,
0.0031795501708984375,
0.0201568603515625,
-0.055633544921875,
0.013458251953125,
-0.0019741058349609375,
0.01190948486328125,
0.012237548828125,
0.0274200439453125,
-0.036346435546875,
-0.01068115234375,
-0.00506591796875,
-0.0279388427734375,
-0.01561737060546875,
0.01110076904296875,
-0.09100341796875,
0.0288848876953125,
-0.0205841064453125,
-0.00797271728515625,
0.0797119140625,
0.103759765625,
0.044891357421875,
-0.01462554931640625,
0.047882080078125,
0.0083770751953125,
-0.005847930908203125,
0.017578125,
0.011077880859375,
-0.0186920166015625,
-0.019439697265625,
-0.0258636474609375,
-0.07574462890625,
0.0018253326416015625,
0.010589599609375,
0.034576416015625,
-0.0311431884765625,
-0.035675048828125,
-0.04022216796875,
0.024261474609375,
0.046234130859375,
-0.0164642333984375,
-0.01088714599609375,
-0.07086181640625,
-0.0078582763671875,
-0.041778564453125,
0.027130126953125,
-0.053436279296875,
-0.0272216796875,
-0.00798797607421875,
0.0172882080078125,
0.005619049072265625,
-0.003204345703125,
-0.0154266357421875,
0.035491943359375,
0.0061187744140625,
0.0033206939697265625,
0.03887939453125,
-0.03759765625,
-0.0288238525390625,
-0.045257568359375,
0.020416259765625,
0.006870269775390625,
0.024749755859375,
-0.044921875,
-0.044158935546875,
0.054351806640625,
-0.03076171875,
-0.045562744140625,
-0.03509521484375,
0.0010232925415039062,
0.0165863037109375,
-0.07684326171875,
0.076171875,
0.01251983642578125,
0.08233642578125,
-0.00689697265625,
-0.0036373138427734375,
0.05255126953125,
0.02008056640625,
-0.0013427734375,
0.015899658203125,
0.01161956787109375,
-0.04559326171875,
-0.0029811859130859375,
-0.00579833984375,
0.001125335693359375,
-0.025482177734375,
0.020599365234375,
0.018646240234375,
0.0135955810546875,
-0.0312347412109375,
-0.0924072265625,
0.046630859375,
-0.035614013671875,
0.06866455078125,
0.0005054473876953125,
0.03802490234375,
0.0174407958984375,
0.0039825439453125,
-0.035308837890625,
0.017059326171875,
-0.01447296142578125,
-0.024688720703125,
-0.01495361328125,
0.054229736328125,
0.01076507568359375,
0.07501220703125,
0.0084381103515625,
-0.035491943359375,
0.0000374913215637207,
-0.002490997314453125,
0.0206756591796875,
-0.0182952880859375,
-0.0184173583984375,
-0.0290374755859375,
0.0032558441162109375,
-0.0157623291015625,
-0.0212860107421875,
0.04193115234375,
0.007076263427734375,
0.0266265869140625,
-0.0014028549194335938,
-0.01336669921875,
0.0010004043579101562,
-0.08441162109375,
0.01462554931640625,
0.05078125,
0.034210205078125,
-0.0181427001953125,
0.014892578125,
0.037994384765625,
-0.042938232421875,
-0.0513916015625,
0.038238525390625,
-0.005619049072265625,
0.0218353271484375,
0.066162109375,
0.0203094482421875,
-0.0013523101806640625,
-0.01149749755859375,
0.0033893585205078125,
0.0029125213623046875,
0.0036163330078125,
-0.031494140625,
-0.0133056640625,
0.0176239013671875,
-0.00757598876953125,
0.00850677490234375,
0.00820159912109375,
-0.00011396408081054688,
0.0008282661437988281,
0.031524658203125,
-0.0145263671875,
0.0188140869140625,
0.00968170166015625,
0.0151214599609375,
0.0013036727905273438,
-0.0029506683349609375,
-0.0657958984375,
-0.0178680419921875,
0.0158233642578125,
0.0338134765625,
-0.015380859375,
-0.043670654296875,
0.002269744873046875,
-0.0207366943359375,
0.009124755859375,
-0.0024127960205078125,
0.008697509765625,
-0.044921875,
-0.013427734375,
-0.003353118896484375,
-0.07061767578125,
-0.00098419189453125,
0.0413818359375,
-0.052154541015625,
-0.036590576171875,
-0.01313018798828125,
0.0469970703125,
-0.007457733154296875,
-0.004184722900390625,
0.06390380859375,
-0.01885986328125,
0.0435791015625,
0.004909515380859375,
0.00232696533203125,
-0.00209808349609375,
0.0540771484375,
0.037109375,
-0.0059051513671875,
0.0167083740234375,
0.0015077590942382812,
-0.01416778564453125,
-0.0010156631469726562,
-0.0281829833984375,
-0.0182952880859375,
0.04254150390625,
-0.081787109375,
0.045166015625,
0.0178070068359375,
0.0294036865234375,
0.00688934326171875,
-0.0308074951171875,
0.0164794921875,
0.01526641845703125,
-0.027984619140625,
-0.0202789306640625,
0.03173828125,
-0.021575927734375,
-0.01219940185546875,
0.01442718505859375,
-0.01123046875,
-0.00418853759765625,
0.0201568603515625,
-0.0094146728515625,
-0.023651123046875,
-0.0264434814453125,
-0.048828125,
-0.06683349609375,
-0.05023193359375,
0.00614166259765625,
-0.00792694091796875,
0.021392822265625,
0.0041656494140625,
0.07867431640625,
0.027801513671875,
0.00823211669921875,
0.041748046875,
-0.037322998046875,
-0.0130767822265625,
0.01534271240234375,
0.0266876220703125,
-0.01788330078125,
0.0221405029296875,
0.005615234375,
-0.0036163330078125,
0.039154052734375,
-0.0245513916015625,
-0.0162200927734375,
-0.0198822021484375,
0.010650634765625,
0.03692626953125,
0.00914764404296875,
0.00992584228515625,
0.04827880859375,
0.06976318359375,
0.003162384033203125,
-0.037445068359375,
-0.0049896240234375,
-0.051513671875,
-0.0404052734375,
0.01367950439453125,
0.0248260498046875,
-0.00875091552734375,
0.01593017578125,
0.07586669921875,
0.043731689453125,
0.00843048095703125,
0.0198822021484375,
0.01074981689453125,
0.00421142578125,
0.0418701171875,
-0.0489501953125,
0.06005859375,
-0.0162811279296875,
-0.00098419189453125,
0.0226287841796875,
0.0019741058349609375,
0.019683837890625,
-0.03533935546875,
0.005840301513671875,
-0.0185546875,
0.0335693359375,
-0.055450439453125,
0.0176849365234375,
-0.05206298828125,
-0.01284027099609375,
-0.040679931640625,
0.06195068359375,
-0.0631103515625,
0.010040283203125,
-0.01442718505859375,
-0.0079803466796875,
-0.033203125,
-0.047698974609375,
-0.07611083984375,
0.0004200935363769531,
0.020111083984375,
0.023895263671875,
-0.023529052734375,
-0.0009646415710449219,
0.01515960693359375,
-0.026092529296875,
0.0469970703125,
-0.032562255859375,
0.032867431640625,
-0.09619140625,
0.044830322265625,
-0.005352020263671875,
0.016876220703125,
-0.02069091796875,
-0.01503753662109375,
-0.07470703125,
-0.0426025390625,
-0.0209808349609375,
-0.0015411376953125,
0.031097412109375,
0.0010004043579101562,
-0.005706787109375,
-0.0192108154296875,
0.054595947265625,
-0.005954742431640625,
-0.01299285888671875,
0.040283203125,
0.0390625,
-0.04925537109375,
-0.002956390380859375,
0.029052734375,
-0.04559326171875,
-0.016082763671875,
0.022369384765625,
0.03375244140625,
0.046661376953125,
-0.0282440185546875,
-0.047515869140625,
-0.006317138671875,
-0.02569580078125,
-0.0296783447265625,
-0.0262603759765625,
-0.01548004150390625,
0.0294189453125,
-0.0240936279296875,
0.01523590087890625,
-0.026214599609375,
-0.03839111328125,
0.03729248046875,
-0.03497314453125,
0.007419586181640625,
0.01247406005859375,
0.06817626953125,
0.01218414306640625,
-0.006500244140625,
-0.0022792816162109375,
0.0374755859375,
0.0625,
-0.0013818740844726562,
0.056427001953125,
0.043182373046875,
-0.051055908203125,
0.10028076171875,
0.040618896484375,
0.0251922607421875,
-0.03240966796875,
0.0361328125,
-0.00336456298828125,
-0.0093536376953125,
0.0197296142578125,
-0.005229949951171875,
-0.00656890869140625,
-0.018035888671875,
-0.002117156982421875,
0.0013170242309570312,
-0.005168914794921875,
0.007568359375,
0.03173828125,
0.0013933181762695312,
-0.026275634765625,
-0.047698974609375,
0.01561737060546875,
-0.07843017578125,
0.044891357421875,
0.022186279296875,
-0.005962371826171875,
0.041229248046875,
0.01276397705078125,
-0.01995849609375,
0.0005817413330078125,
-0.0039043426513671875,
0.02752685546875,
0.0134429931640625,
0.0176849365234375,
-0.02252197265625,
-0.01351165771484375,
-0.005504608154296875,
0.0185699462890625,
0.005840301513671875,
-0.0296478271484375,
-0.01163482666015625,
0.00981903076171875,
0.0257568359375,
0.004436492919921875,
0.0090484619140625,
0.01378631591796875,
0.0254058837890625,
0.022186279296875,
0.00698089599609375,
0.017425537109375,
0.002471923828125,
0.0009622573852539062,
0.03533935546875,
0.0025615692138671875,
-0.0141448974609375,
0.0036334991455078125,
0.02423095703125,
0.004962921142578125,
0.0014295578002929688,
-0.0292205810546875,
0.0287017822265625,
0.00833892822265625,
0.0250701904296875,
0.039276123046875,
-0.007694244384765625,
0.01139068603515625,
-0.01033782958984375,
-0.01262664794921875,
-0.0261993408203125,
-0.0188446044921875,
0.031982421875,
0.006832122802734375,
0.004650115966796875,
-0.00841522216796875,
0.0104827880859375,
0.0148468017578125,
0.00684356689453125,
0.0147857666015625,
-0.004058837890625,
-0.0089263916015625,
-0.00867462158203125,
0.015228271484375,
0.050079345703125,
-0.0101776123046875,
0.018646240234375,
-0.06378173828125,
-0.0171966552734375,
-0.046295166015625,
0.0210113525390625,
-0.0291900634765625,
-0.02728271484375,
-0.0223236083984375,
-0.007762908935546875,
0.0010385513305664062,
-0.02569580078125,
0.00876617431640625,
-0.04168701171875,
0.0033855438232421875,
0.00240325927734375,
0.0288543701171875,
-0.01220703125,
0.0117645263671875,
-0.020416259765625,
0.01146697998046875,
0.00274658203125,
-0.0061187744140625,
0.0306243896484375,
0.01097869873046875,
-0.028228759765625,
-0.027557373046875,
-0.036285400390625,
-0.03924560546875,
-0.02044677734375,
0.00858306884765625,
-0.02679443359375,
0.02716064453125,
-0.0170135498046875,
0.037200927734375,
-0.0556640625,
-0.03448486328125,
0.002986907958984375,
0.007709503173828125,
0.00388336181640625,
0.049896240234375,
-0.041107177734375,
0.05859375,
0.0256195068359375,
0.0167388916015625,
0.0027866363525390625,
0.03826904296875,
0.02581787109375,
-0.01172637939453125,
0.00641632080078125,
-0.04046630859375,
-0.0281829833984375,
-0.01409912109375,
0.007801055908203125,
0.020782470703125,
0.01806640625,
0.00792694091796875,
0.040679931640625,
0.0162353515625,
0.01499176025390625,
-0.01041412353515625,
-0.044830322265625,
-0.0096282958984375,
0.005970001220703125,
0.027587890625,
-0.020721435546875,
-0.011932373046875,
-0.0289306640625,
-0.0195159912109375,
0.029449462890625,
-0.003173828125,
0.01137542724609375,
-0.0003333091735839844,
0.0183563232421875,
-0.01129150390625,
0.036834716796875,
-0.037750244140625,
0.031494140625,
0.0185394287109375,
0.00806427001953125,
0.028076171875,
0.05706787109375,
-0.025909423828125,
-0.037872314453125,
0.05633544921875,
0.0168609619140625,
-0.032623291015625,
0.024566650390625,
-0.02630615234375,
0.0269927978515625,
0.061004638671875,
0.06707763671875,
-0.0654296875,
0.00974273681640625,
-0.01267242431640625,
-0.0269317626953125,
0.037628173828125,
-0.003093719482421875,
0.01442718505859375,
-0.0277862548828125,
-0.009033203125,
0.06597900390625,
-0.01242828369140625,
-0.020355224609375,
-0.00388336181640625,
-0.0029621124267578125,
-0.029205322265625,
0.006290435791015625,
-0.0193023681640625,
-0.03741455078125,
-0.003032684326171875,
0.04547119140625,
-0.040069580078125,
-0.0161285400390625,
-0.035308837890625,
0.022979736328125,
-0.045379638671875,
-0.0740966796875,
-0.01523590087890625,
-0.0235748291015625,
0.0004756450653076172,
0.05731201171875,
-0.0022449493408203125,
0.0231781005859375,
0.027313232421875,
-0.008544921875,
0.0058746337890625,
-0.006427764892578125,
-0.0242919921875,
-0.03082275390625,
-0.035614013671875,
0.0215911865234375,
-0.03179931640625,
-0.020294189453125,
0.0244140625,
-0.0235748291015625,
-0.0592041015625,
-0.0025482177734375,
0.006641387939453125,
0.059967041015625,
-0.05645751953125,
-0.0178985595703125,
0.01505279541015625,
-0.00827789306640625,
-0.015380859375,
-0.0328369140625,
0.0291595458984375,
-0.06903076171875,
0.00380706787109375,
-0.0154876708984375,
-0.016448974609375,
-0.0244140625,
-0.052276611328125,
-0.0684814453125,
0.09490966796875,
0.04327392578125,
-0.018402099609375,
0.00724029541015625,
0.047119140625,
-0.063232421875,
0.0097808837890625,
-0.0134124755859375,
0.041656494140625,
-0.00360870361328125,
0.054168701171875,
-0.0004248619079589844,
0.003971099853515625,
0.044219970703125,
0.01514434814453125,
0.058380126953125,
0.009033203125,
-0.00843048095703125,
0.003337860107421875,
0.068115234375,
0.040191650390625,
-0.009735107421875,
0.004055023193359375,
-0.008941650390625,
-0.0262908935546875,
0.0219573974609375,
-0.046661376953125,
-0.01213836669921875,
0.00722503662109375,
0.0171356201171875,
0.0232696533203125,
0.01739501953125,
0.019500732421875,
-0.030120849609375,
0.0218658447265625,
0.0016298294067382812,
-0.01329803466796875,
-0.0025882720947265625,
-0.03216552734375,
-0.0021915435791015625,
0.058441162109375,
0.0287933349609375,
-0.0128936767578125,
-0.025848388671875,
-0.026214599609375,
0.0423583984375,
0.0016918182373046875,
0.003070831298828125,
0.0411376953125,
0.0256195068359375,
0.0125274658203125,
0.005641937255859375,
0.004791259765625,
0.01568603515625,
-0.01383209228515625,
0.035125732421875,
0.04132080078125,
0.043670654296875,
-0.030120849609375,
-0.00719451904296875,
0.052825927734375,
0.05450439453125,
-0.038299560546875,
-0.00836181640625,
0.0186920166015625,
0.0214691162109375,
-0.004161834716796875,
-0.0360107421875,
0.0208740234375,
-0.004062652587890625,
0.037689208984375,
0.0091552734375,
0.00820159912109375,
0.0014715194702148438,
-0.004558563232421875,
0.0124664306640625,
0.07373046875,
-0.0173797607421875,
0.0198974609375,
-0.0296630859375,
-0.01251983642578125,
-0.00850677490234375,
0.021881103515625,
0.02923583984375,
0.021697998046875,
0.0333251953125,
0.00382232666015625,
-0.01210784912109375,
0.006435394287109375,
-0.00946807861328125,
0.0147552490234375,
-0.0728759765625,
-0.03948974609375,
0.0277099609375,
0.05255126953125,
0.0080413818359375,
0.020416259765625,
0.021270751953125,
0.01885986328125,
-0.009246826171875,
0.009735107421875,
0.033416748046875,
-0.026397705078125,
0.0132293701171875,
-0.0246734619140625,
0.0039825439453125,
0.0145416259765625,
-0.014801025390625,
-0.00628662109375,
0.0273284912109375,
0.0235595703125,
-0.0252227783203125,
-0.0200042724609375,
-0.0008635520935058594,
-0.01528167724609375,
0.038970947265625,
0.01947021484375,
-0.0244293212890625,
-0.0058441162109375,
-0.040283203125,
-0.030426025390625,
0.0206146240234375,
0.016082763671875,
0.003574371337890625,
0.0230712890625,
-0.0305328369140625,
0.04620361328125,
-0.0008521080017089844,
0.00438690185546875,
-0.036468505859375,
0.0025424957275390625,
0.0154876708984375,
-0.00121307373046875,
0.0149993896484375,
0.01204681396484375,
-0.04931640625,
-0.0193634033203125,
0.0032672882080078125,
0.01277923583984375,
0.0050048828125,
0.0177459716796875,
0.018585205078125,
0.01462554931640625,
-0.02911376953125,
-0.038055419921875,
0.0181427001953125,
-0.0105438232421875,
-0.006755828857421875,
0.00222015380859375,
-0.02783203125,
0.003559112548828125,
-0.0545654296875,
0.06427001953125,
0.010406494140625,
0.0231170654296875,
0.05792236328125,
-0.0325927734375,
0.0113983154296875,
0.0010318756103515625,
-0.036163330078125,
-0.061126708984375,
-0.0250396728515625,
-0.009246826171875,
-0.00376129150390625,
-0.01366424560546875,
-0.0628662109375,
-0.0005154609680175781,
0.07586669921875,
0.0278167724609375,
0.030609130859375,
0.0142822265625,
-0.044525146484375,
0.0223846435546875,
0.031585693359375,
-0.0012769699096679688,
0.0110321044921875,
0.00115203857421875,
-0.0224609375,
0.0130157470703125,
0.01134490966796875,
0.0007662773132324219,
-0.0023651123046875,
-0.07080078125,
-0.0034656524658203125,
0.056427001953125,
0.060089111328125,
0.01493072509765625,
0.0300750732421875,
-0.0068817138671875,
-0.03729248046875,
-0.0007791519165039062,
-0.034271240234375,
-0.0159759521484375,
-0.036590576171875,
-0.016815185546875,
0.0248870849609375,
-0.034942626953125,
-0.01450347900390625,
-0.006595611572265625,
-0.034454345703125,
0.009979248046875,
0.0098114013671875,
-0.06536865234375,
0.0147552490234375,
0.00038361549377441406,
0.0192718505859375,
-0.0303497314453125,
0.057464599609375,
-0.037628173828125,
-0.0167083740234375,
-0.02105712890625,
-0.06097412109375,
-0.03973388671875,
0.09979248046875,
-0.01294708251953125,
0.0221099853515625,
0.01555633544921875,
-0.02105712890625,
0.043670654296875,
0.0038814544677734375,
0.00820159912109375,
0.06500244140625,
-0.0107879638671875,
-0.01202392578125,
0.01108551025390625,
-0.0033969879150390625,
-0.0045623779296875,
-0.067138671875,
-0.00568389892578125,
-0.06854248046875,
-0.00765228271484375,
-0.0218658447265625,
0.027740478515625,
0.02789306640625,
-0.040863037109375,
-0.0772705078125,
0.053863525390625,
-0.014862060546875,
-0.028076171875,
-0.0097808837890625,
-0.018463134765625,
-0.00531005859375,
0.01110076904296875,
-0.006122589111328125,
-0.0014562606811523438,
-0.035400390625,
0.0168914794921875,
-0.01458740234375,
0.0254364013671875,
0.001468658447265625,
-0.0225372314453125,
-0.03192138671875,
0.0050811767578125,
0.0008878707885742188,
0.004856109619140625,
-0.020721435546875,
0.0147247314453125,
0.0265960693359375,
0.0300445556640625,
-0.0050201416015625,
0.019744873046875,
0.0189971923828125,
-0.00859832763671875,
-0.03350830078125,
-0.0172119140625,
0.025787353515625,
0.040618896484375,
0.04205322265625,
0.055908203125,
-0.006679534912109375,
-0.0645751953125,
-0.033172607421875,
-0.0273590087890625,
-0.0018892288208007812,
-0.02716064453125,
0.0092315673828125,
-0.049774169921875,
0.0008749961853027344,
-0.01561737060546875,
0.00774383544921875,
-0.0219879150390625,
-0.0294036865234375,
-0.0178375244140625,
-0.013702392578125,
0.004589080810546875,
-0.0299530029296875,
0.04779052734375,
0.00981903076171875,
0.0311126708984375,
-0.0306549072265625,
-0.0012521743774414062,
-0.003871917724609375,
-0.0148468017578125,
0.01605224609375,
-0.0180206298828125,
-0.060638427734375,
-0.039886474609375,
0.0008130073547363281,
0.045806884765625,
-0.034515380859375,
0.0200653076171875,
-0.02032470703125,
0.0230865478515625,
-0.007640838623046875,
0.00884246826171875,
0.01242828369140625,
0.005161285400390625,
-0.0176239013671875,
0.01009368896484375,
0.00861358642578125,
0.00047588348388671875,
-0.0203094482421875,
-0.03204345703125,
-0.00708770751953125,
0.0047149658203125,
-0.00852203369140625,
0.006473541259765625,
0.0220947265625,
-0.006649017333984375,
0.0033740997314453125,
-0.032745361328125,
-0.00962066650390625,
-0.08306884765625,
0.0321044921875,
0.0027332305908203125,
-0.00749969482421875,
0.040771484375
] |
616218a76d70702e8a02ae8b08a4ecdce08b7258
|
Wordpress Stackexchange
Q: How to change the default logout link on WordPress Admin I want to use another link for logout because I have /wp-admin/* protected with htpassword. Is there a way to do this? Something like creating a custom page like site.com/logout then use it as my new logout link?
Thanks!
A: You can filter 'logout_url' and return a custom value if you are in the admin area:
add_filter( 'logout_url', 'wpse_58453_logout_url' );
function wpse_58453_logout_url( $default )
{
// set your URL here
return is_admin() ? 'http://example.com/custom' : $default;
}
|
Q: How to change the default logout link on WordPress Admin I want to use another link for logout because I have /wp-admin/* protected with htpassword. Is there a way to do this? Something like creating a custom page like site.com/logout then use it as my new logout link?
Thanks!
A: You can filter 'logout_url' and return a custom value if you are in the admin area:
add_filter( 'logout_url', 'wpse_58453_logout_url' );
function wpse_58453_logout_url( $default )
{
// set your URL here
return is_admin() ? 'http://example.com/custom' : $default;
}
A: I think you should add rewrite rule in your htaccess file like this.
RewriteRule ^logout/(.*) /wp-login.php?action=logout&_wpnonce=$1 [QSA,L]
A: This worked for me redirecting to the home page:
add_action('wp_logout','unlog');
function unlog(){
wp_redirect( site_url() );
exit();
}
A: I found the solution here:
https://www.kmbytes.com/wordpress-logout-redirect-filter/
And it is working great!
add_filter( 'logout_url', 'my_logout_url' );
function my_logout_url( $url ) {
$redirect = home_url();
return $url.'&redirect_to='.$redirect;
}
Cheers!
A: function wp_loginout( $redirect = '', $echo = true ) {
if ( ! is_user_logged_in() ) {
$link = '<a href="' . esc_url( wp_login_url( $redirect ) ) . '">' . __( 'Log in' ) . '</a>';
} else {
$link = '<a href="' . esc_url( wp_logout_url( $redirect ) ) . '">' . __( 'Log out' ) . '</a>';
}
if ( $echo ) {
/**
* Filters the HTML output for the Log In/Log Out link.
*
* @since 1.5.0
*
* @param string $link The HTML link content.
*/
echo apply_filters( 'loginout', $link );
} else {
/** This filter is documented in wp-includes/general-template.php */
return apply_filters( 'loginout', $link );
}
}
Displays a link, which allows users to navigate to the Log In page to log in or log out depending on whether they are currently logged in.
A: A very interesting solution is to create a Page "Logout" and then create the template of it in main folder of your theme by file page-{your-logout-slug}.php. And here is the simplest code of this page.
if ( is_user_logged_in() ) :
wp_logout();
wp_redirect(site_url());
else :
wp_redirect(site_url());
endif;
Add argument to site_url() of any slug or leave empty to be logged out to your home page. It's good because by using any php code you can do many things before you will be logged out.
|
wordpress
|
{
"language": "en",
"length": 376,
"provenance": "stackexchange_00019.jsonl.gz:421837",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58453"
}
|
[
0.06890869140625,
-0.00780487060546875,
0.049285888671875,
-0.0218505859375,
-0.01117706298828125,
-0.019287109375,
0.06402587890625,
-0.032470703125,
-0.040130615234375,
0.00560760498046875,
0.0175933837890625,
-0.0186614990234375,
-0.036163330078125,
-0.040283203125,
0.0218353271484375,
-0.062286376953125,
0.010772705078125,
0.05206298828125,
0.049530029296875,
0.00307464599609375,
0.004787445068359375,
0.01265716552734375,
-0.00927734375,
0.030029296875,
-0.02215576171875,
0.03125,
0.0941162109375,
-0.027252197265625,
-0.00438690185546875,
-0.01473236083984375,
0.01245880126953125,
-0.026153564453125,
0.0166015625,
0.006381988525390625,
-0.00669097900390625,
-0.01108551025390625,
-0.01412200927734375,
0.0118865966796875,
-0.0019664764404296875,
0.0178070068359375,
0.0111236572265625,
-0.0018901824951171875,
0.025634765625,
0.01403045654296875,
-0.0253143310546875,
-0.0067138671875,
-0.01934814453125,
-0.0347900390625,
0.00927734375,
-0.0016832351684570312,
0.024810791015625,
-0.0026378631591796875,
0.03509521484375,
-0.052093505859375,
-0.017791748046875,
0.00021839141845703125,
0.027191162109375,
-0.0345458984375,
0.037841796875,
-0.02764892578125,
-0.0256195068359375,
-0.018157958984375,
0.027587890625,
-0.01447296142578125,
0.0020351409912109375,
0.0162200927734375,
0.002223968505859375,
0.028411865234375,
-0.003513336181640625,
-0.0192108154296875,
-0.01401519775390625,
-0.01531219482421875,
-0.017486572265625,
-0.00046062469482421875,
-0.040924072265625,
0.006511688232421875,
0.01419830322265625,
-0.002719879150390625,
0.0050811767578125,
0.0157623291015625,
0.02325439453125,
-0.0234832763671875,
-0.0134735107421875,
-0.01947021484375,
0.0136566162109375,
-0.004543304443359375,
-0.007358551025390625,
-0.01580810546875,
-0.0107574462890625,
0.0019931793212890625,
-0.015899658203125,
0.00966644287109375,
-0.01558685302734375,
-0.00690460205078125,
-0.0173492431640625,
-0.0247039794921875,
0.01030731201171875,
0.00904083251953125,
0.0287628173828125,
-0.00766754150390625,
-0.025482177734375,
-0.0192413330078125,
-0.052093505859375,
0.00662994384765625,
-0.024749755859375,
0.054901123046875,
0.025238037109375,
0.03961181640625,
-0.0078125,
0.006473541259765625,
0.0013322830200195312,
-0.0294189453125,
-0.0229034423828125,
-0.006072998046875,
-0.0197296142578125,
0.00182342529296875,
-0.04571533203125,
0.0022068023681640625,
-0.0269317626953125,
0.0225830078125,
-0.045440673828125,
-0.0291595458984375,
0.0136260986328125,
-0.004207611083984375,
-0.0130462646484375,
-0.037750244140625,
-0.0177001953125,
-0.0010433197021484375,
-0.01506805419921875,
0.004291534423828125,
-0.0452880859375,
0.012237548828125,
0.06414794921875,
0.028717041015625,
0.0211639404296875,
-0.022674560546875,
0.038665771484375,
-0.01141357421875,
0.0124664306640625,
0.0284881591796875,
-0.008758544921875,
-0.027496337890625,
0.00499725341796875,
0.007114410400390625,
0.0206298828125,
0.0322265625,
0.01534271240234375,
0.0104217529296875,
-0.0203704833984375,
-0.0275421142578125,
-0.004695892333984375,
-0.00453948974609375,
0.013580322265625,
0.0005617141723632812,
0.01024627685546875,
-0.0130157470703125,
0.033843994140625,
-0.01316070556640625,
-0.007686614990234375,
-0.0211181640625,
-0.0229339599609375,
-0.00279998779296875,
0.0157012939453125,
-0.01375579833984375,
-0.030181884765625,
0.01549530029296875,
-0.0199432373046875,
-0.01412200927734375,
0.033233642578125,
0.01317596435546875,
0.048614501953125,
-0.06512451171875,
-0.0077972412109375,
0.034210205078125,
0.0178070068359375,
0.040069580078125,
-0.0274505615234375,
0.0361328125,
0.0204315185546875,
0.00818634033203125,
0.021514892578125,
-0.0295867919921875,
0.042449951171875,
0.0233612060546875,
-0.017303466796875,
-0.0009937286376953125,
-0.014739990234375,
0.0088653564453125,
0.0286865234375,
0.0060577392578125,
-0.016510009765625,
-0.005947113037109375,
-0.00760650634765625,
0.0041961669921875,
-0.00598907470703125,
-0.023895263671875,
0.006134033203125,
0.005153656005859375,
-0.004909515380859375,
-0.0161590576171875,
0.00518035888671875,
0.011260986328125,
-0.0303497314453125,
0.04058837890625,
-0.03509521484375,
0.0196533203125,
-0.0161895751953125,
0.0174407958984375,
0.0131683349609375,
0.009307861328125,
0.0085601806640625,
-0.0147247314453125,
0.0035076141357421875,
-0.06707763671875,
-0.0574951171875,
-0.01186370849609375,
-0.010711669921875,
0.047607421875,
-0.0022602081298828125,
0.032562255859375,
0.003726959228515625,
-0.0416259765625,
0.01317596435546875,
0.004730224609375,
0.0250091552734375,
-0.0245819091796875,
-0.031646728515625,
-0.037994384765625,
0.01000213623046875,
-0.029052734375,
0.0042266845703125,
0.06768798828125,
0.0240631103515625,
0.01036834716796875,
-0.037811279296875,
-0.01404571533203125,
-0.0225982666015625,
-0.044189453125,
-0.001560211181640625,
0.051361083984375,
0.035888671875,
0.00946044921875,
-0.00977325439453125,
0.024505615234375,
0.056854248046875,
-0.02862548828125,
0.00426483154296875,
0.011383056640625,
0.023162841796875,
-0.01033782958984375,
-0.040802001953125,
-0.041656494140625,
0.06707763671875,
-0.0404052734375,
0.0048828125,
0.043487548828125,
-0.00598907470703125,
-0.04754638671875,
0.0180511474609375,
-0.0217742919921875,
0.01995849609375,
-0.0294342041015625,
-0.045135498046875,
0.0191497802734375,
0.0160064697265625,
-0.0262603759765625,
0.01479339599609375,
0.0002999305725097656,
-0.018280029296875,
-0.0185699462890625,
0.018707275390625,
-0.012359619140625,
-0.01953125,
0.0250091552734375,
0.07281494140625,
-0.0682373046875,
-0.0360107421875,
-0.0025844573974609375,
-0.007190704345703125,
0.0022125244140625,
-0.021453857421875,
0.040771484375,
-0.046234130859375,
-0.024383544921875,
-0.0222930908203125,
-0.029144287109375,
-0.00982666015625,
-0.0183258056640625,
0.0233306884765625,
-0.02679443359375,
0.039459228515625,
-0.0258941650390625,
-0.024169921875,
0.0149688720703125,
0.01483917236328125,
-0.053802490234375,
-0.007671356201171875,
-0.058929443359375,
0.061492919921875,
-0.058746337890625,
0.01561737060546875,
0.07049560546875,
-0.01380157470703125,
0.0233612060546875,
-0.0124359130859375,
0.0330810546875,
-0.0207366943359375,
0.005710601806640625,
-0.0139312744140625,
-0.00624847412109375,
-0.04205322265625,
0.0012454986572265625,
-0.0003097057342529297,
0.035980224609375,
-0.045196533203125,
-0.05126953125,
-0.032379150390625,
-0.00524139404296875,
-0.053466796875,
-0.00640869140625,
-0.044586181640625,
-0.040771484375,
0.0184173583984375,
0.013519287109375,
-0.0114288330078125,
0.005279541015625,
0.051116943359375,
0.0204010009765625,
0.05029296875,
-0.02130126953125,
-0.0418701171875,
-0.01178741455078125,
-0.050018310546875,
-0.0243072509765625,
-0.005641937255859375,
-0.018096923828125,
0.00910186767578125,
0.044158935546875,
0.01251220703125,
-0.0216522216796875,
0.01434326171875,
0.025543212890625,
-0.008270263671875,
-0.01378631591796875,
0.0021533966064453125,
-0.0374755859375,
0.0024433135986328125,
-0.01617431640625,
0.09332275390625,
0.03338623046875,
-0.0091094970703125,
0.025726318359375,
-0.0234832763671875,
-0.039276123046875,
0.0223388671875,
-0.03155517578125,
-0.01486968994140625,
-0.01531219482421875,
0.00949859619140625,
-0.04473876953125,
-0.011688232421875,
-0.0032901763916015625,
-0.04058837890625,
0.049041748046875,
0.01042938232421875,
-0.01555633544921875,
0.0216064453125,
-0.00506591796875,
0.00494384765625,
-0.01052093505859375,
0.034149169921875,
-0.0191497802734375,
-0.020355224609375,
-0.0099639892578125,
-0.01264190673828125,
-0.0139617919921875,
0.0300445556640625,
-0.0234527587890625,
-0.007648468017578125,
-0.0010442733764648438,
0.01210784912109375,
0.0016040802001953125,
-0.0058441162109375,
-0.0325927734375,
-0.07586669921875,
0.056396484375,
-0.08135986328125,
-0.0185394287109375,
-0.056549072265625,
-0.01274871826171875,
-0.00931549072265625,
0.10955810546875,
-0.01375579833984375,
-0.032867431640625,
-0.0118865966796875,
0.0176239013671875,
-0.00620269775390625,
-0.0265350341796875,
0.0072174072265625,
-0.0237884521484375,
-0.1007080078125,
0.039764404296875,
-0.0002892017364501953,
-0.0066070556640625,
-0.0094451904296875,
0.005069732666015625,
-0.018157958984375,
-0.0616455078125,
0.007228851318359375,
-0.026458740234375,
-0.0068511962890625,
0.033905029296875,
-0.047119140625,
0.01174163818359375,
0.007488250732421875,
-0.036956787109375,
-0.0106964111328125,
-0.002643585205078125,
-0.0252685546875,
0.03350830078125,
0.06011962890625,
-0.055450439453125,
0.01224517822265625,
0.03338623046875,
-0.00875091552734375,
0.004253387451171875,
-0.00720977783203125,
-0.003665924072265625,
0.0237274169921875,
0.0217132568359375,
-0.0147705078125,
-0.0035381317138671875,
0.00336456298828125,
-0.018218994140625,
-0.07672119140625,
0.00433349609375,
-0.00336456298828125,
0.067626953125,
0.029510498046875,
-0.036346435546875,
-0.06378173828125,
-0.043853759765625,
-0.00743865966796875,
0.01425933837890625,
0.0240020751953125,
-0.0214996337890625,
-0.035736083984375,
-0.07427978515625,
0.053375244140625,
0.045074462890625,
-0.0263519287109375,
-0.006320953369140625,
0.0419921875,
0.018951416015625,
-0.035308837890625,
-0.00443267822265625,
0.0099945068359375,
-0.0025463104248046875,
-0.0251007080078125,
0.050750732421875,
-0.00443267822265625,
0.0116729736328125,
0.07080078125,
-0.051910400390625,
-0.00339508056640625,
-0.0213623046875,
0.048004150390625,
-0.0206146240234375,
-0.01543426513671875,
0.0130157470703125,
-0.050048828125,
0.01157379150390625,
0.01393890380859375,
0.00760650634765625,
-0.0279541015625,
0.0016994476318359375,
0.043365478515625,
-0.01166534423828125,
0.004512786865234375,
-0.051513671875,
-0.002338409423828125,
0.0101776123046875,
-0.01070404052734375,
0.045989990234375,
0.031890869140625,
-0.00560760498046875,
0.0035724639892578125,
0.021728515625,
0.010101318359375,
-0.0350341796875,
-0.002674102783203125,
-0.0122222900390625,
0.031982421875,
-0.03631591796875,
-0.004131317138671875,
-0.0250091552734375,
-0.032196044921875,
0.09246826171875,
0.035400390625,
-0.045654296875,
0.03643798828125,
-0.0131378173828125,
0.0248870849609375,
0.01207733154296875,
-0.01102447509765625,
0.027069091796875,
-0.02728271484375,
-0.031829833984375,
-0.01531219482421875,
-0.0316162109375,
-0.0310516357421875,
-0.05535888671875,
0.043609619140625,
-0.018768310546875,
0.0229339599609375,
0.01415252685546875,
0.08538818359375,
0.031494140625,
0.05145263671875,
-0.0335693359375,
0.0103759765625,
-0.00525665283203125,
0.04583740234375,
0.00015604496002197266,
0.0323486328125,
-0.0122528076171875,
0.0311431884765625,
0.0200042724609375,
-0.019134521484375,
-0.022491455078125,
0.006412506103515625,
0.0266265869140625,
-0.0185699462890625,
0.01123809814453125,
0.0192413330078125,
-0.02154541015625,
0.0025081634521484375,
0.0452880859375,
-0.024932861328125,
-0.1080322265625,
-0.0101318359375,
0.035888671875,
0.0269927978515625,
-0.07464599609375,
-0.0213165283203125,
-0.041778564453125,
-0.025177001953125,
-0.004848480224609375,
-0.02423095703125,
-0.03607177734375,
0.0208892822265625,
0.0027065277099609375,
-0.005031585693359375,
-0.02880859375,
-0.0228729248046875,
-0.0268096923828125,
0.0020694732666015625,
-0.0242462158203125,
-0.006771087646484375,
0.0286102294921875,
-0.03717041015625,
0.04217529296875,
0.0007729530334472656,
-0.015625,
0.0311279296875,
0.02398681640625,
0.04150390625,
0.0199432373046875,
-0.051910400390625,
0.012542724609375,
-0.06500244140625,
-0.006267547607421875,
-0.0289154052734375,
-0.0435791015625,
-0.039337158203125,
-0.0177154541015625,
0.0692138671875,
0.0147552490234375,
0.0299530029296875,
-0.0188140869140625,
-0.046539306640625,
0.017303466796875,
0.06036376953125,
0.03424072265625,
-0.00782012939453125,
0.07135009765625,
-0.0228271484375,
0.0298309326171875,
0.0137786865234375,
0.030487060546875,
-0.0280303955078125,
-0.0051116943359375,
0.0251617431640625,
0.00579071044921875,
-0.0214691162109375,
-0.049346923828125,
-0.0073394775390625,
-0.0028247833251953125,
0.0712890625,
-0.019622802734375,
-0.01479339599609375,
0.0024967193603515625,
-0.00885772705078125,
-0.024566650390625,
0.004222869873046875,
0.03997802734375,
0.01166534423828125,
-0.038970947265625,
0.02655029296875,
0.0859375,
-0.03729248046875,
-0.016998291015625,
-0.001010894775390625,
-0.0080413818359375,
0.028900146484375,
0.01380157470703125,
-0.055877685546875,
0.0209808349609375,
0.087646484375,
0.00775146484375,
0.050323486328125,
-0.0098114013671875,
-0.001033782958984375,
0.04241943359375,
-0.0273590087890625,
-0.0291290283203125,
0.004352569580078125,
0.014312744140625,
-0.00763702392578125,
-0.019683837890625,
0.01763916015625,
-0.0140380859375,
0.0255279541015625,
0.053802490234375,
0.07293701171875,
-0.10113525390625,
0.0440673828125,
0.004940032958984375,
0.0124969482421875,
0.0821533203125,
0.01171112060546875,
-0.0078582763671875,
-0.00618743896484375,
-0.022674560546875,
-0.0584716796875,
-0.041534423828125,
-0.0338134765625,
-0.00562286376953125,
-0.0022640228271484375,
-0.02099609375,
0.0252532958984375,
0.01483917236328125,
-0.04534912109375,
0.022308349609375,
0.014129638671875,
-0.003810882568359375,
-0.01267242431640625,
-0.028076171875,
0.035614013671875,
-0.033355712890625,
-0.07769775390625,
0.0089111328125,
-0.034912109375,
0.005481719970703125,
0.01534271240234375,
-0.0011644363403320312,
0.060394287109375,
0.03662109375,
0.01434326171875,
-0.0050048828125,
-0.0076141357421875,
0.0127410888671875,
0.0231170654296875,
-0.01043701171875,
-0.0006227493286132812,
0.02294921875,
-0.039764404296875,
0.01258087158203125,
-0.0198974609375,
-0.0010938644409179688,
-0.0025730133056640625,
-0.044586181640625,
0.072021484375,
-0.042083740234375,
0.00539398193359375,
0.01514434814453125,
0.0244598388671875,
0.003936767578125,
-0.00457763671875,
-0.00673675537109375,
-0.031829833984375,
-0.0299530029296875,
-0.0154266357421875,
-0.06109619140625,
0.0200958251953125,
-0.0364990234375,
-0.02923583984375,
0.0828857421875,
-0.0298309326171875,
-0.01332855224609375,
0.0051422119140625,
0.054229736328125,
0.00775909423828125,
0.06646728515625,
-0.052154541015625,
0.0217742919921875,
0.0156707763671875,
0.03350830078125,
-0.0251617431640625,
-0.009979248046875,
0.0021190643310546875,
0.01023101806640625,
0.033905029296875,
0.0259857177734375,
-0.0396728515625,
-0.00611114501953125,
0.0128173828125,
0.025146484375,
0.002079010009765625,
0.04742431640625,
-0.00037288665771484375,
0.028228759765625,
0.0325927734375,
-0.0168914794921875,
0.00444793701171875,
0.0406494140625,
-0.0271453857421875,
0.0360107421875,
0.01535797119140625,
-0.019378662109375,
0.027130126953125,
-0.00189208984375,
-0.0892333984375,
0.043792724609375,
0.0338134765625,
0.001407623291015625,
-0.0286102294921875,
0.07421875,
0.0352783203125,
-0.0248565673828125,
0.006793975830078125,
-0.055908203125,
0.05242919921875,
-0.009185791015625,
-0.0229949951171875,
0.0501708984375,
0.016204833984375,
-0.0211181640625,
-0.059234619140625,
-0.0208587646484375,
-0.0204010009765625,
-0.0238800048828125,
0.06439208984375,
0.02069091796875,
0.0241546630859375,
-0.0277252197265625,
0.0263214111328125,
-0.00902557373046875,
0.06280517578125,
-0.05224609375,
-0.0193939208984375,
-0.001148223876953125,
-0.01049041748046875,
0.0305633544921875,
-0.01497650146484375,
0.051788330078125,
-0.02740478515625,
-0.0421142578125,
-0.006076812744140625,
0.034088134765625,
0.043701171875,
-0.0068817138671875,
-0.01015472412109375,
0.01177215576171875,
-0.0657958984375,
0.0513916015625,
0.00766754150390625,
-0.03228759765625,
0.0152587890625,
0.019287109375,
0.01274871826171875,
-0.03314208984375,
-0.004642486572265625,
0.01555633544921875,
0.0236968994140625,
0.060089111328125,
-0.0025310516357421875,
-0.0264892578125,
0.0015392303466796875,
-0.0689697265625,
-0.0005950927734375,
0.0175323486328125,
0.00011837482452392578,
0.00862884521484375,
0.023681640625,
-0.01448822021484375,
-0.037353515625,
-0.014129638671875,
0.0099639892578125,
-0.038421630859375,
0.0099029541015625,
-0.0450439453125,
0.044219970703125,
0.0197601318359375,
0.01763916015625,
-0.00952911376953125,
0.01678466796875,
0.037506103515625,
-0.0220794677734375,
0.0269012451171875,
0.002925872802734375,
-0.038116455078125,
0.0180206298828125,
0.0049896240234375,
0.053619384765625,
0.00595855712890625,
-0.045684814453125,
-0.02203369140625,
0.01538848876953125,
-0.01262664794921875,
0.0114898681640625,
0.04742431640625,
-0.004100799560546875,
0.00861358642578125,
-0.024261474609375,
0.040130615234375,
-0.035888671875,
-0.03399658203125,
-0.00026416778564453125,
-0.05010986328125,
0.0164947509765625,
-0.01491546630859375,
-0.080078125,
-0.04583740234375,
-0.046661376953125,
0.0218353271484375,
0.0164337158203125,
0.04638671875,
0.000244140625,
0.0215911865234375,
-0.0179443359375,
0.01383209228515625,
-0.01325225830078125,
-0.002780914306640625,
-0.04022216796875,
0.01143646240234375,
0.006534576416015625,
-0.0146484375,
-0.07611083984375,
0.02459716796875,
0.00588226318359375,
0.006229400634765625,
0.048553466796875,
-0.034942626953125,
0.0146026611328125,
-0.01300048828125,
0.0428466796875,
-0.0279388427734375,
-0.06341552734375,
-0.0258941650390625,
0.02716064453125,
-0.006866455078125,
0.024017333984375,
-0.00894927978515625,
0.056182861328125,
-0.057861328125,
0.00539398193359375,
0.0022830963134765625,
-0.0443115234375,
-0.00797271728515625,
0.035797119140625,
-0.061553955078125,
0.0167694091796875,
-0.0258636474609375,
-0.0301666259765625,
0.00391387939453125,
0.000701904296875,
-0.012939453125,
-0.011322021484375,
0.01035308837890625,
0.00432586669921875,
-0.0015430450439453125,
0.03546142578125,
-0.0188446044921875,
0.01343536376953125,
-0.0251617431640625,
0.02362060546875,
0.039794921875,
-0.05279541015625,
-0.037200927734375,
-0.055572509765625,
0.0077667236328125,
0.0169677734375,
-0.020721435546875,
-0.04718017578125,
-0.049896240234375,
0.021453857421875,
0.055816650390625,
-0.0018224716186523438,
-0.048187255859375,
0.0260772705078125,
-0.0440673828125,
0.0565185546875,
0.0157012939453125,
-0.01031494140625,
0.004974365234375,
0.0006475448608398438,
-0.05792236328125,
-0.0257720947265625,
-0.04278564453125,
-0.0065155029296875,
-0.049163818359375,
-0.01739501953125,
0.0212249755859375,
0.0008029937744140625,
0.01194000244140625,
-0.03656005859375,
-0.03173828125,
0.0296783447265625,
-0.04693603515625,
-0.031341552734375,
-0.013214111328125,
0.014923095703125,
-0.0009784698486328125,
-0.0084075927734375,
0.021240234375,
-0.011016845703125,
-0.032623291015625,
-0.0009055137634277344,
-0.01288604736328125,
0.002574920654296875,
-0.035858154296875,
-0.0758056640625,
0.043487548828125,
-0.0087127685546875,
-0.0306243896484375,
-0.019927978515625,
0.037353515625,
-0.007785797119140625,
-0.040771484375,
-0.003910064697265625,
-0.00768280029296875,
0.00031876564025878906,
0.00739288330078125,
0.012725830078125,
0.039764404296875,
0.011260986328125,
0.067138671875,
0.004627227783203125,
0.039794921875,
0.02264404296875,
-0.0173492431640625,
0.0224456787109375,
0.00936126708984375,
0.02301025390625,
0.067626953125,
-0.0186004638671875,
0.0079498291015625,
-0.0254669189453125,
-0.06494140625,
-0.004741668701171875,
-0.020599365234375,
0.00359344482421875,
0.0140533447265625,
0.0374755859375,
0.047637939453125,
0.0041656494140625,
-0.037078857421875,
-0.043487548828125,
-0.048309326171875,
0.002887725830078125,
-0.03277587890625,
0.019927978515625,
-0.0928955078125,
-0.0242156982421875,
0.0242156982421875,
-0.0272979736328125,
-0.0065460205078125,
0.026031494140625,
-0.0345458984375,
0.005718231201171875,
0.0206451416015625,
-0.007007598876953125,
-0.04693603515625,
0.04241943359375,
0.059173583984375,
-0.05084228515625,
0.0175323486328125,
-0.0171356201171875,
0.0007762908935546875,
0.037109375,
-0.058319091796875,
0.0101318359375,
0.01763916015625,
-0.0240631103515625,
0.005458831787109375,
0.0274505615234375,
0.0140380859375,
-0.01276397705078125,
-0.021881103515625,
-0.038482666015625,
0.0189056396484375,
0.00406646728515625,
0.0147247314453125,
-0.023651123046875,
0.04217529296875,
0.0263214111328125,
0.0232696533203125,
-0.017242431640625,
-0.013275146484375,
-0.0150146484375,
0.04449462890625,
-0.01995849609375,
-0.004756927490234375,
0.023468017578125,
-0.03594970703125,
0.0185546875,
-0.0216064453125,
0.021484375,
-0.038238525390625,
0.04296875,
0.020751953125,
-0.01910400390625,
0.03125
] |
c9b324d1657fcdfebf8bc55b134d970b87d421a2
|
Wordpress Stackexchange
Q: Disable visual editor on one specific page I would like to remove the visual editor from one specific page because if I edit this one page in Visual mode, it breaks the code. I want to make sure the client doesn't have this option on the particular page. However, I don't want to remove the html editor.
This line of code removes the visual editor and the html editor: remove_post_type_support('page', 'editor');
a closer look at remove_post_type_support:
http://codex.wordpress.org/Function_Reference/remove_post_type_support
But I want to only disable the visual editor.
Initial testing, in functions.php for this theme, I have:
function remove_editor_init() {
if ( is_admin() ) {
if (is_page(2548)) {
remove_post_type_support('page', 'editor');
}
}
}
add_action('init', 'remove_editor_init');
However, the conditional statements is_admin() and is_page() don't seem to working together.
Any suggestions?
A: In your code, calling the action admin_init makes is_admin() unnecessary. And, if not mistaken, is_page() is meant to be used in the front-end...
But the solution is the following (based on this Answer):
add_filter( 'user_can_richedit', 'wpse_58501_page_can_richedit' );
function wpse_58501_page_can_richedit( $can )
{
global $post;
if ( 28 == $post->ID )
return false;
return $can;
}
|
Q: Disable visual editor on one specific page I would like to remove the visual editor from one specific page because if I edit this one page in Visual mode, it breaks the code. I want to make sure the client doesn't have this option on the particular page. However, I don't want to remove the html editor.
This line of code removes the visual editor and the html editor: remove_post_type_support('page', 'editor');
a closer look at remove_post_type_support:
http://codex.wordpress.org/Function_Reference/remove_post_type_support
But I want to only disable the visual editor.
Initial testing, in functions.php for this theme, I have:
function remove_editor_init() {
if ( is_admin() ) {
if (is_page(2548)) {
remove_post_type_support('page', 'editor');
}
}
}
add_action('init', 'remove_editor_init');
However, the conditional statements is_admin() and is_page() don't seem to working together.
Any suggestions?
A: In your code, calling the action admin_init makes is_admin() unnecessary. And, if not mistaken, is_page() is meant to be used in the front-end...
But the solution is the following (based on this Answer):
add_filter( 'user_can_richedit', 'wpse_58501_page_can_richedit' );
function wpse_58501_page_can_richedit( $can )
{
global $post;
if ( 28 == $post->ID )
return false;
return $can;
}
A: This is how I've resolved this:
add_filter( 'admin_footer', 'removes_editor_visual_tab', 99 );
function removes_editor_visual_tab()
{
$post_id = $_GET['post'];
if($post_id == 1434){
?>
<style type="text/css">
a#content-tmce, a#content-tmce:hover {
display:none;
}
</style>
<script type="text/javascript">
jQuery(document).ready(function() {
document.getElementById("content-tmce").onclick = 'none';
});
</script>
<?php
}
}
You can select the page ID(s) that you'd like this to reflect on
|
wordpress
|
{
"language": "en",
"length": 239,
"provenance": "stackexchange_00019.jsonl.gz:421854",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58501"
}
|
[
0.044525146484375,
-0.019500732421875,
0.00933074951171875,
-0.0161285400390625,
0.0150604248046875,
-0.035919189453125,
0.0626220703125,
-0.0191192626953125,
0.0435791015625,
0.01145172119140625,
0.017608642578125,
-0.0352783203125,
-0.00916290283203125,
-0.05303955078125,
-0.0205078125,
-0.0002789497375488281,
0.0136260986328125,
0.026336669921875,
0.036376953125,
-0.01461029052734375,
0.0148162841796875,
-0.00556182861328125,
-0.0008416175842285156,
-0.034423828125,
-0.00890350341796875,
0.047698974609375,
0.016265869140625,
-0.004283905029296875,
-0.0220184326171875,
-0.018768310546875,
0.00351715087890625,
-0.002689361572265625,
0.02716064453125,
0.019287109375,
-0.042938232421875,
0.018951416015625,
-0.04339599609375,
0.01149749755859375,
-0.0000870823860168457,
-0.01154327392578125,
0.00722503662109375,
0.007266998291015625,
-0.0189208984375,
-0.0207977294921875,
-0.032867431640625,
0.0021076202392578125,
-0.0182952880859375,
-0.0108184814453125,
0.00539398193359375,
-0.01203155517578125,
0.0026092529296875,
0.0005660057067871094,
0.033050537109375,
-0.023406982421875,
-0.00922393798828125,
-0.0022640228271484375,
-0.013763427734375,
-0.038482666015625,
0.01329803466796875,
0.055999755859375,
0.01358795166015625,
-0.0092926025390625,
-0.001312255859375,
-0.063232421875,
-0.0118408203125,
0.00603485107421875,
-0.036865234375,
0.01271820068359375,
-0.05426025390625,
-0.00434112548828125,
0.01450347900390625,
-0.0538330078125,
-0.0007572174072265625,
-0.01456451416015625,
-0.0269622802734375,
-0.00646209716796875,
0.00708770751953125,
-0.0188751220703125,
0.0089874267578125,
-0.007904052734375,
-0.0012054443359375,
0.028656005859375,
-0.05621337890625,
-0.00466156005859375,
-0.0232696533203125,
0.00736236572265625,
-0.02227783203125,
-0.0165252685546875,
-0.035888671875,
0.006572723388671875,
-0.0188140869140625,
-0.00597381591796875,
-0.0061492919921875,
0.0159759521484375,
-0.0200958251953125,
0.015960693359375,
0.044219970703125,
0.0516357421875,
-0.00759124755859375,
-0.0002930164337158203,
0.044921875,
-0.08746337890625,
0.0823974609375,
-0.047821044921875,
0.0168304443359375,
0.024200439453125,
-0.017730712890625,
0.007110595703125,
0.052276611328125,
0.019927978515625,
0.0157012939453125,
0.01068878173828125,
-0.01169586181640625,
-0.0023670196533203125,
-0.0021533966064453125,
-0.005733489990234375,
-0.048858642578125,
0.0098419189453125,
-0.010986328125,
-0.0014438629150390625,
0.01055908203125,
0.02838134765625,
-0.026092529296875,
-0.06170654296875,
-0.0094757080078125,
-0.044830322265625,
-0.04180908203125,
0.018035888671875,
0.0694580078125,
-0.01245880126953125,
-0.07452392578125,
-0.003330230712890625,
0.11968994140625,
0.057037353515625,
0.06317138671875,
-0.01212310791015625,
0.00644683837890625,
-0.0219879150390625,
0.0164947509765625,
0.0202484130859375,
-0.01250457763671875,
-0.03729248046875,
0.0167999267578125,
0.007171630859375,
-0.04217529296875,
0.028472900390625,
0.0221099853515625,
0.01302337646484375,
-0.017578125,
-0.057037353515625,
-0.0229339599609375,
-0.01296234130859375,
0.0173492431640625,
0.01369476318359375,
0.00490570068359375,
-0.0304718017578125,
0.048309326171875,
-0.0292205810546875,
-0.0035247802734375,
-0.05120849609375,
0.002227783203125,
0.00429534912109375,
0.03692626953125,
-0.054779052734375,
-0.047607421875,
-0.01390838623046875,
-0.0533447265625,
-0.015106201171875,
0.026336669921875,
0.0322265625,
0.00951385498046875,
-0.034149169921875,
0.0283050537109375,
0.025238037109375,
-0.0081939697265625,
0.045013427734375,
-0.0081634521484375,
0.0188140869140625,
0.0031890869140625,
0.01739501953125,
-0.0242462158203125,
-0.054412841796875,
0.0193023681640625,
-0.0270843505859375,
-0.0810546875,
0.0269012451171875,
0.011810302734375,
0.06597900390625,
0.041778564453125,
0.005504608154296875,
0.054168701171875,
0.00708770751953125,
0.04833984375,
-0.041778564453125,
0.02545166015625,
-0.05743408203125,
-0.01218414306640625,
-0.054779052734375,
-0.006656646728515625,
0.04901123046875,
0.07025146484375,
-0.03240966796875,
0.030609130859375,
-0.0533447265625,
-0.09423828125,
-0.01332855224609375,
-0.03497314453125,
0.031005859375,
0.0031585693359375,
-0.0109710693359375,
-0.0019664764404296875,
-0.035736083984375,
-0.0251922607421875,
0.055206298828125,
-0.0177154541015625,
0.0040740966796875,
0.01259613037109375,
0.05084228515625,
-0.0036754608154296875,
0.0457763671875,
-0.000659942626953125,
-0.044464111328125,
0.00019562244415283203,
0.01788330078125,
0.0249786376953125,
0.0193023681640625,
-0.0188140869140625,
0.021240234375,
0.05810546875,
0.00543975830078125,
0.047119140625,
0.0233917236328125,
0.0290374755859375,
0.0082855224609375,
-0.0186309814453125,
-0.00705718994140625,
-0.0070648193359375,
-0.0902099609375,
0.0027179718017578125,
0.0621337890625,
0.04840087890625,
0.0280914306640625,
-0.008880615234375,
-0.0132904052734375,
0.060882568359375,
-0.0601806640625,
-0.0110626220703125,
-0.00751495361328125,
0.010345458984375,
0.047515869140625,
-0.0253753662109375,
0.044158935546875,
0.0170440673828125,
-0.008392333984375,
0.0355224609375,
0.0367431640625,
-0.006603240966796875,
0.024261474609375,
0.00983428955078125,
-0.020477294921875,
0.01302337646484375,
0.0404052734375,
-0.019256591796875,
0.0169219970703125,
0.033416748046875,
-0.004405975341796875,
0.0225372314453125,
0.01436614990234375,
-0.0216064453125,
-0.0097503662109375,
0.0207977294921875,
0.03253173828125,
-0.0102081298828125,
-0.007595062255859375,
0.0623779296875,
-0.024261474609375,
-0.03778076171875,
-0.0001881122589111328,
-0.0084075927734375,
-0.00978851318359375,
-0.014801025390625,
0.006015777587890625,
-0.0226287841796875,
-0.0090179443359375,
0.0087738037109375,
-0.051544189453125,
0.0033245086669921875,
-0.003551483154296875,
-0.0166778564453125,
-0.0333251953125,
0.005496978759765625,
-0.00302886962890625,
-0.041046142578125,
0.0298309326171875,
-0.0107269287109375,
-0.023468017578125,
0.0296630859375,
-0.0199737548828125,
0.022491455078125,
-0.0168304443359375,
0.0545654296875,
0.050384521484375,
-0.01181793212890625,
-0.001583099365234375,
-0.00006026029586791992,
-0.056549072265625,
-0.01065826416015625,
0.014312744140625,
-0.0081634521484375,
-0.0210418701171875,
-0.053985595703125,
0.0269622802734375,
0.0174102783203125,
-0.0023632049560546875,
0.016754150390625,
-0.036041259765625,
-0.00460052490234375,
0.01378631591796875,
-0.05615234375,
-0.021026611328125,
0.0168304443359375,
-0.035186767578125,
-0.04052734375,
0.025146484375,
-0.035919189453125,
0.0042266845703125,
0.03546142578125,
0.0009512901306152344,
-0.00206756591796875,
0.0237884521484375,
0.027130126953125,
0.022857666015625,
-0.0007543563842773438,
-0.04840087890625,
-0.01093292236328125,
-0.013153076171875,
0.0278778076171875,
0.06634521484375,
0.0142822265625,
-0.061279296875,
0.02520751953125,
-0.05279541015625,
-0.029693603515625,
0.05804443359375,
-0.01776123046875,
-0.01312255859375,
-0.01224517822265625,
0.0004222393035888672,
-0.03656005859375,
-0.021392822265625,
0.0230560302734375,
-0.01013946533203125,
-0.0234375,
0.0028285980224609375,
0.0286102294921875,
-0.01361846923828125,
0.01318359375,
0.02777099609375,
0.0205078125,
-0.0226287841796875,
-0.0025196075439453125,
-0.00377655029296875,
-0.03350830078125,
0.0056610107421875,
-0.01371002197265625,
0.0020961761474609375,
0.0151214599609375,
0.0184478759765625,
0.00711822509765625,
0.036712646484375,
0.029052734375,
0.002105712890625,
-0.00180816650390625,
-0.01021575927734375,
-0.002216339111328125,
-0.031524658203125,
0.0166168212890625,
-0.030548095703125,
0.01140594482421875,
-0.00901031494140625,
-0.0286712646484375,
-0.0065460205078125,
-0.016815185546875,
0.00792694091796875,
0.01428985595703125,
0.03985595703125,
0.004550933837890625,
-0.0015926361083984375,
-0.0112152099609375,
-0.01580810546875,
-0.0143585205078125,
0.0343017578125,
-0.04022216796875,
0.004734039306640625,
-0.04852294921875,
-0.024261474609375,
0.0205535888671875,
-0.0238037109375,
-0.0325927734375,
-0.00311279296875,
-0.09661865234375,
0.0246429443359375,
-0.005542755126953125,
-0.020477294921875,
-0.046966552734375,
0.037139892578125,
-0.07232666015625,
-0.0377197265625,
0.047393798828125,
-0.061187744140625,
-0.01432037353515625,
0.06787109375,
-0.056854248046875,
0.0279541015625,
-0.06146240234375,
-0.0193023681640625,
-0.10565185546875,
-0.002471923828125,
-0.051116943359375,
0.047698974609375,
0.00435638427734375,
0.028289794921875,
-0.037261962890625,
0.021453857421875,
0.0288543701171875,
0.0025177001953125,
-0.006786346435546875,
-0.0209808349609375,
0.004123687744140625,
0.00453948974609375,
-0.00445556640625,
-0.0079193115234375,
0.0055694580078125,
0.018341064453125,
-0.0340576171875,
-0.0208282470703125,
-0.046051025390625,
-0.03936767578125,
0.0302581787109375,
-0.060882568359375,
-0.01479339599609375,
-0.0232696533203125,
-0.051116943359375,
-0.0064697265625,
-0.0256805419921875,
-0.00754547119140625,
-0.00936126708984375,
-0.04510498046875,
0.050689697265625,
-0.005096435546875,
-0.01131439208984375,
-0.0037364959716796875,
0.033721923828125,
0.01153564453125,
-0.031646728515625,
0.005157470703125,
0.0261077880859375,
0.01910400390625,
0.0099945068359375,
0.0206756591796875,
0.00205230712890625,
-0.0279998779296875,
0.04296875,
0.006847381591796875,
0.0004494190216064453,
-0.0584716796875,
0.028594970703125,
-0.011932373046875,
-0.0325927734375,
0.0299530029296875,
-0.0308990478515625,
0.06182861328125,
-0.00815582275390625,
-0.0033473968505859375,
0.0020847320556640625,
0.0301361083984375,
0.01308441162109375,
0.0066070556640625,
-0.0238494873046875,
-0.01134490966796875,
-0.042510986328125,
0.0015859603881835938,
0.0257568359375,
0.0214996337890625,
0.0167694091796875,
0.00901031494140625,
0.0300140380859375,
0.035888671875,
-0.0281219482421875,
0.0285186767578125,
0.06390380859375,
-0.0000718235969543457,
0.03375244140625,
-0.0123748779296875,
-0.039886474609375,
-0.0311126708984375,
0.0059814453125,
-0.0345458984375,
-0.0206298828125,
-0.036224365234375,
-0.03662109375,
0.0021228790283203125,
0.0275421142578125,
0.00772857666015625,
0.0298919677734375,
0.04840087890625,
0.034881591796875,
-0.0367431640625,
-0.01013946533203125,
0.040313720703125,
-0.0031223297119140625,
-0.0499267578125,
-0.0118865966796875,
-0.018280029296875,
-0.0072479248046875,
0.037139892578125,
0.01555633544921875,
-0.001590728759765625,
0.021697998046875,
-0.019195556640625,
0.049163818359375,
0.0181121826171875,
0.01514434814453125,
0.01007080078125,
0.0234527587890625,
0.0004172325134277344,
-0.00580596923828125,
0.00432586669921875,
-0.040557861328125,
-0.0394287109375,
0.01409912109375,
0.047332763671875,
-0.00704193115234375,
0.00255584716796875,
-0.0012235641479492188,
0.0054473876953125,
-0.0251007080078125,
0.0273895263671875,
0.0229949951171875,
-0.06097412109375,
-0.003875732421875,
0.0330810546875,
-0.0183563232421875,
-0.02032470703125,
-0.0038661956787109375,
0.003719329833984375,
-0.021453857421875,
-0.021453857421875,
0.047943115234375,
-0.0660400390625,
-0.0040740966796875,
0.018035888671875,
-0.01430511474609375,
-0.01523590087890625,
0.0006880760192871094,
-0.0726318359375,
0.0005006790161132812,
-0.00852203369140625,
-0.01103973388671875,
0.00811004638671875,
-0.020751953125,
0.05242919921875,
-0.032196044921875,
-0.0239410400390625,
-0.0379638671875,
0.004749298095703125,
0.028045654296875,
0.034820556640625,
-0.05615234375,
-0.01041412353515625,
-0.07635498046875,
-0.01230621337890625,
-0.04052734375,
-0.04656982421875,
-0.036041259765625,
0.0026378631591796875,
-0.029205322265625,
0.005645751953125,
-0.0084686279296875,
0.049713134765625,
0.0103759765625,
0.070556640625,
-0.0217132568359375,
0.12255859375,
-0.01910400390625,
0.06817626953125,
-0.0019388198852539062,
0.053314208984375,
0.00812530517578125,
0.031219482421875,
-0.0144195556640625,
-0.0218353271484375,
0.01038360595703125,
-0.03912353515625,
-0.028533935546875,
-0.03643798828125,
-0.0306854248046875,
0.0245361328125,
0.06866455078125,
-0.01491546630859375,
-0.0112762451171875,
-0.003200531005859375,
0.003566741943359375,
-0.034912109375,
-0.01457977294921875,
-0.00862884521484375,
0.00432586669921875,
-0.039886474609375,
-0.0177459716796875,
0.00884246826171875,
-0.0263519287109375,
-0.0092315673828125,
0.00615692138671875,
-0.005321502685546875,
0.0171661376953125,
0.01259613037109375,
0.0118255615234375,
0.0184478759765625,
0.05499267578125,
-0.006381988525390625,
0.052093505859375,
0.0178985595703125,
0.022552490234375,
0.0577392578125,
-0.0098724365234375,
0.0102386474609375,
-0.005657196044921875,
0.0294036865234375,
0.00688934326171875,
0.02008056640625,
0.04962158203125,
-0.0130462646484375,
0.01287841796875,
0.08575439453125,
0.0771484375,
-0.09771728515625,
0.0047454833984375,
0.0228118896484375,
-0.002841949462890625,
0.0316162109375,
-0.0401611328125,
0.0032596588134765625,
-0.031280517578125,
0.06439208984375,
-0.00036597251892089844,
-0.0215606689453125,
0.0250701904296875,
-0.033172607421875,
-0.0147705078125,
-0.0416259765625,
0.04083251953125,
0.01099395751953125,
-0.003147125244140625,
0.026519775390625,
0.001384735107421875,
0.005100250244140625,
-0.0287628173828125,
-0.007579803466796875,
0.005954742431640625,
-0.038665771484375,
-0.09173583984375,
-0.01537322998046875,
0.0280303955078125,
-0.03448486328125,
0.0504150390625,
0.0014028549194335938,
-0.01190185546875,
0.0482177734375,
-0.03814697265625,
0.047210693359375,
0.003841400146484375,
-0.0191650390625,
-0.020538330078125,
-0.047637939453125,
0.001979827880859375,
0.0280609130859375,
-0.053802490234375,
0.0262603759765625,
-0.006404876708984375,
-0.022186279296875,
0.01201629638671875,
0.005290985107421875,
0.057403564453125,
0.0182647705078125,
-0.056671142578125,
0.005977630615234375,
-0.041473388671875,
-0.005863189697265625,
-0.0178070068359375,
-0.0310211181640625,
-0.00745391845703125,
-0.01540374755859375,
-0.038787841796875,
-0.0704345703125,
0.029998779296875,
-0.032928466796875,
-0.0775146484375,
0.097900390625,
0.04248046875,
0.033203125,
-0.003265380859375,
0.0283355712890625,
-0.0494384765625,
-0.00708770751953125,
-0.0237579345703125,
0.033447265625,
0.025482177734375,
0.039703369140625,
0.03326416015625,
0.01166534423828125,
0.0390625,
0.0237579345703125,
0.057403564453125,
0.01551055908203125,
-0.0235443115234375,
0.00838470458984375,
0.050628662109375,
0.0171661376953125,
-0.0122222900390625,
0.046112060546875,
-0.0014085769653320312,
-0.0311737060546875,
-0.004184722900390625,
-0.0165252685546875,
0.037506103515625,
-0.07537841796875,
-0.0109100341796875,
-0.0018463134765625,
0.006244659423828125,
-0.0016546249389648438,
0.0206756591796875,
0.0252532958984375,
-0.034698486328125,
0.01424407958984375,
0.0206451416015625,
0.0011548995971679688,
-0.008697509765625,
0.0014591217041015625,
0.0015707015991210938,
-0.041351318359375,
-0.0034503936767578125,
-0.0265045166015625,
0.035491943359375,
0.007251739501953125,
-0.01163482666015625,
0.031890869140625,
0.0251007080078125,
-0.058502197265625,
0.01320648193359375,
0.009246826171875,
0.0156402587890625,
-0.01995849609375,
0.00431060791015625,
-0.0098724365234375,
0.002956390380859375,
-0.02105712890625,
0.0345458984375,
-0.0022487640380859375,
-0.0179595947265625,
-0.0189208984375,
-0.0029773712158203125,
0.0246429443359375,
0.00583648681640625,
-0.0279541015625,
-0.0119171142578125,
-0.0158843994140625,
0.0005497932434082031,
0.03955078125,
-0.033203125,
0.00901031494140625,
0.0011081695556640625,
0.0299072265625,
-0.0184173583984375,
-0.01186370849609375,
-0.0219268798828125,
-0.001590728759765625,
-0.030975341796875,
0.0011758804321289062,
0.022552490234375,
0.0233612060546875,
-0.0012865066528320312,
0.0080413818359375,
0.04046630859375,
0.0018625259399414062,
-0.056488037109375,
0.01239013671875,
-0.0195770263671875,
0.06170654296875,
-0.0869140625,
-0.027557373046875,
-0.001239776611328125,
0.0626220703125,
0.00933837890625,
0.020721435546875,
0.01535797119140625,
0.0152587890625,
-0.0037689208984375,
0.0004897117614746094,
0.01171875,
-0.0181121826171875,
-0.032135009765625,
0.0016031265258789062,
-0.039031982421875,
0.01313018798828125,
-0.01305389404296875,
0.0164794921875,
0.0248565673828125,
0.0003261566162109375,
-0.004169464111328125,
-0.0125885009765625,
0.01490020751953125,
-0.030059814453125,
0.0126800537109375,
0.03564453125,
0.00937652587890625,
0.03863525390625,
-0.05657958984375,
-0.0091400146484375,
-0.0184173583984375,
-0.00673675537109375,
0.01171875,
0.0266876220703125,
-0.033050537109375,
0.058502197265625,
0.04730224609375,
-0.007373809814453125,
-0.019500732421875,
0.01213836669921875,
0.0033969879150390625,
0.00528717041015625,
0.0290679931640625,
0.0078582763671875,
-0.030029296875,
-0.01053619384765625,
-0.01161956787109375,
0.0207977294921875,
-0.0017614364624023438,
0.1131591796875,
-0.04119873046875,
0.01486968994140625,
-0.0016145706176757812,
0.046356201171875,
-0.0216217041015625,
-0.02862548828125,
0.0233001708984375,
0.0295562744140625,
0.03076171875,
-0.01226043701171875,
-0.0333251953125,
0.0214080810546875,
0.043609619140625,
0.005962371826171875,
0.0019702911376953125,
0.0029277801513671875,
0.0176239013671875,
0.0084381103515625,
0.017974853515625,
-0.0197906494140625,
-0.01184844970703125,
-0.0097198486328125,
-0.0095367431640625,
0.02008056640625,
0.0163116455078125,
0.0094451904296875,
0.0263824462890625,
0.00946807861328125,
-0.0229339599609375,
0.01036834716796875,
-0.0189971923828125,
-0.0035552978515625,
0.01568603515625,
0.0031719207763671875,
-0.0151214599609375,
0.036346435546875,
0.00209808349609375,
-0.016448974609375,
0.05096435546875,
-0.019805908203125,
0.033935546875,
-0.06689453125,
0.0015497207641601562,
-0.032012939453125,
0.01001739501953125,
-0.019622802734375,
-0.0284423828125,
0.01038360595703125,
0.006366729736328125,
-0.05389404296875,
-0.0120849609375,
-0.0294342041015625,
-0.0171966552734375,
0.005809783935546875,
0.017059326171875,
0.00716400146484375,
-0.06866455078125,
-0.041168212890625,
0.0008840560913085938,
0.034027099609375,
0.0162506103515625,
-0.07550048828125,
0.026092529296875,
-0.0198516845703125,
0.0675048828125,
0.0004150867462158203,
0.025482177734375,
-0.012359619140625,
0.00574493408203125,
-0.04656982421875,
-0.028167724609375,
-0.0308380126953125,
0.0281982421875,
-0.04119873046875,
0.00390625,
0.0273895263671875,
-0.00988006591796875,
-0.0263824462890625,
0.032623291015625,
-0.01538848876953125,
0.0799560546875,
-0.0311431884765625,
-0.032745361328125,
0.0011930465698242188,
0.01389312744140625,
0.036773681640625,
-0.032562255859375,
-0.025909423828125,
0.0056304931640625,
0.01331329345703125,
0.06036376953125,
-0.0295562744140625,
0.006256103515625,
-0.046234130859375,
-0.10919189453125,
-0.01229095458984375,
0.0225372314453125,
-0.06805419921875,
0.015777587890625,
-0.005859375,
-0.02252197265625,
0.0231781005859375,
0.0211334228515625,
-0.0426025390625,
0.01490020751953125,
0.0197906494140625,
0.01435089111328125,
0.03594970703125,
-0.00018548965454101562,
0.0225067138671875,
-0.03204345703125,
0.01396942138671875,
-0.0021610260009765625,
-0.003810882568359375,
0.0014238357543945312,
0.01192474365234375,
0.00490570068359375,
0.032470703125,
-0.0196533203125,
-0.0252838134765625,
-0.0215301513671875,
-0.026580810546875,
-0.0016717910766601562,
0.008941650390625,
-0.056732177734375,
-0.0127716064453125,
0.0889892578125,
0.07525634765625,
0.03338623046875,
-0.0266876220703125,
-0.0214996337890625,
-0.043975830078125,
-0.027618408203125,
0.0158233642578125,
0.013153076171875,
-0.03863525390625,
0.0182342529296875,
0.030426025390625,
-0.0080413818359375,
0.02490234375,
-0.01276397705078125,
-0.019805908203125,
-0.0036869049072265625,
0.019561767578125,
0.012786865234375,
-0.04498291015625,
0.0111541748046875,
0.021453857421875,
-0.036285400390625,
-0.01904296875,
0.02044677734375,
-0.011138916015625,
-0.0014171600341796875,
0.057403564453125,
-0.0305633544921875,
-0.0251922607421875,
-0.0257110595703125,
0.054107666015625,
-0.026153564453125,
0.052764892578125,
-0.040771484375,
0.0081329345703125,
0.015167236328125,
0.0035305023193359375,
0.00939178466796875,
0.0031261444091796875,
-0.03863525390625,
0.02142333984375,
-0.0021457672119140625,
-0.0190277099609375,
-0.0211944580078125,
0.0428466796875,
0.00010973215103149414,
-0.0065460205078125,
0.0012769699096679688,
0.00589752197265625,
0.040283203125,
-0.0167083740234375,
0.010467529296875,
0.03717041015625,
0.01093292236328125,
-0.0223541259765625,
0.0168304443359375,
-0.0305633544921875,
0.018463134765625,
0.0019502639770507812
] |
cdf1940385fd9291b2e4c1a2d279c8b23cc8673c
|
Wordpress Stackexchange
Q: line break are not working when editing a post So I have a problem when making a post. If I press enter and make a new line in the editor and press safe the line break diapers. But when I show the post it have inserted a line break. So somehow the editor is not able to show the line break? If I save the editor again the line break disappears from the post as well.
Any ideas?
I read in a post to try and use:
remove_filter ('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
Which I did and now line breaks don't work at all.
I have build a custom page where the posts are shown with the
echo the_content();
A: You've stumbled across a 'hidden' feature of WordPress and TinyMCE (the visual editor) it has a problem with line breaks and strips them out.
Try either of these two plugins:
http://wordpress.org/extend/plugins/line-break-shortcode/
http://wordpress.org/extend/plugins/simple-breaks/
|
Q: line break are not working when editing a post So I have a problem when making a post. If I press enter and make a new line in the editor and press safe the line break diapers. But when I show the post it have inserted a line break. So somehow the editor is not able to show the line break? If I save the editor again the line break disappears from the post as well.
Any ideas?
I read in a post to try and use:
remove_filter ('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
Which I did and now line breaks don't work at all.
I have build a custom page where the posts are shown with the
echo the_content();
A: You've stumbled across a 'hidden' feature of WordPress and TinyMCE (the visual editor) it has a problem with line breaks and strips them out.
Try either of these two plugins:
http://wordpress.org/extend/plugins/line-break-shortcode/
http://wordpress.org/extend/plugins/simple-breaks/
A: Ah sorry I just realized that I had margin: 0 on all elements to reset all defaults in browsers... this caused the issue!
|
wordpress
|
{
"language": "en",
"length": 176,
"provenance": "stackexchange_00019.jsonl.gz:421885",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58598"
}
|
[
-0.03466796875,
-0.026153564453125,
-0.0157928466796875,
0.0648193359375,
-0.034271240234375,
-0.0268096923828125,
0.044921875,
-0.037261962890625,
-0.00540924072265625,
0.023406982421875,
-0.004596710205078125,
-0.01450347900390625,
-0.02740478515625,
-0.039031982421875,
-0.00946044921875,
-0.03399658203125,
0.0140533447265625,
-0.0162811279296875,
-0.004642486572265625,
-0.03472900390625,
-0.01306915283203125,
-0.02264404296875,
0.00753021240234375,
0.029296875,
0.0034542083740234375,
0.06817626953125,
0.0972900390625,
-0.018310546875,
-0.0030364990234375,
-0.01800537109375,
0.0257110595703125,
-0.05291748046875,
0.0106201171875,
0.07470703125,
-0.07275390625,
0.0567626953125,
-0.019287109375,
0.038177490234375,
0.021148681640625,
0.0088043212890625,
-0.004009246826171875,
0.0182952880859375,
0.050384521484375,
0.0032787322998046875,
-0.01439666748046875,
-0.03802490234375,
-0.0035400390625,
-0.02191162109375,
-0.01027679443359375,
0.04595947265625,
-0.013519287109375,
0.030609130859375,
-0.0131072998046875,
0.0031452178955078125,
0.0302886962890625,
0.006496429443359375,
-0.025390625,
-0.039306640625,
0.00998687744140625,
0.022216796875,
0.0293121337890625,
-0.01373291015625,
0.0221099853515625,
-0.0105133056640625,
0.00690460205078125,
0.0038661956787109375,
-0.005268096923828125,
-0.004413604736328125,
-0.047393798828125,
0.0168914794921875,
0.055419921875,
-0.058624267578125,
0.0284271240234375,
-0.0270843505859375,
0.019195556640625,
-0.0026073455810546875,
-0.03173828125,
0.015869140625,
0.035247802734375,
-0.00848388671875,
0.0099945068359375,
0.0037631988525390625,
-0.041656494140625,
-0.028411865234375,
0.01010894775390625,
-0.0155487060546875,
-0.00001722574234008789,
0.0030231475830078125,
-0.051025390625,
-0.035919189453125,
-0.020416259765625,
-0.0282745361328125,
-0.09814453125,
0.01149749755859375,
0.0024394989013671875,
-0.0338134765625,
-0.0278778076171875,
-0.006500244140625,
-0.009490966796875,
0.0304107666015625,
-0.00371551513671875,
-0.039764404296875,
0.0606689453125,
-0.03997802734375,
0.008087158203125,
-0.00846099853515625,
-0.0035037994384765625,
0.02301025390625,
0.053619384765625,
0.027252197265625,
-0.00922393798828125,
0.034149169921875,
-0.01311492919921875,
-0.06549072265625,
0.028656005859375,
0.0260772705078125,
-0.03594970703125,
0.050384521484375,
0.027313232421875,
-0.0101318359375,
-0.00865936279296875,
0.002658843994140625,
-0.03485107421875,
-0.00665283203125,
-0.0066680908203125,
-0.0287628173828125,
0.0033054351806640625,
0.01548004150390625,
0.04541015625,
0.00780487060546875,
-0.01556396484375,
-0.002361297607421875,
0.0123443603515625,
0.0267333984375,
0.0067138671875,
-0.0129241943359375,
-0.0096435546875,
-0.0279388427734375,
-0.0284423828125,
0.0093994140625,
-0.05780029296875,
-0.01702880859375,
0.0274810791015625,
-0.059906005859375,
-0.0230865478515625,
0.051116943359375,
0.036285400390625,
0.006256103515625,
-0.017333984375,
-0.08184814453125,
0.005870819091796875,
-0.0026149749755859375,
0.05145263671875,
0.0178985595703125,
-0.012786865234375,
-0.0633544921875,
0.062255859375,
-0.0797119140625,
0.018463134765625,
-0.08740234375,
-0.00019478797912597656,
0.0121612548828125,
0.050506591796875,
-0.0714111328125,
-0.049530029296875,
-0.032196044921875,
-0.0938720703125,
-0.0134735107421875,
0.0243072509765625,
-0.0282135009765625,
0.0130615234375,
0.00469207763671875,
0.039398193359375,
-0.00597381591796875,
-0.005359649658203125,
0.01000213623046875,
-0.042755126953125,
-0.0153961181640625,
0.045989990234375,
0.010955810546875,
0.006702423095703125,
-0.0099029541015625,
0.0263824462890625,
0.01885986328125,
-0.049468994140625,
0.0166473388671875,
0.011016845703125,
0.04779052734375,
0.0135040283203125,
0.0250701904296875,
0.0222320556640625,
0.010223388671875,
0.007579803466796875,
-0.01097869873046875,
0.0263519287109375,
-0.036407470703125,
-0.01050567626953125,
-0.0245361328125,
0.003009796142578125,
-0.00244903564453125,
0.03173828125,
0.005435943603515625,
0.0105743408203125,
-0.01922607421875,
-0.034515380859375,
0.0014095306396484375,
-0.01071929931640625,
0.0284423828125,
0.0295867919921875,
-0.014404296875,
-0.0009493827819824219,
-0.03485107421875,
0.022003173828125,
-0.04608154296875,
-0.04449462890625,
0.054534912109375,
-0.0027713775634765625,
0.044342041015625,
0.023345947265625,
-0.0090179443359375,
0.06268310546875,
-0.0221405029296875,
0.06646728515625,
0.039093017578125,
-0.00927734375,
-0.07421875,
0.005100250244140625,
-0.041534423828125,
-0.047149658203125,
-0.0211639404296875,
0.004184722900390625,
0.05828857421875,
0.03936767578125,
0.03692626953125,
-0.0225067138671875,
-0.0192413330078125,
-0.0170745849609375,
-0.040191650390625,
0.01328277587890625,
0.0472412109375,
0.04119873046875,
0.055084228515625,
0.007045745849609375,
-0.040435791015625,
0.043914794921875,
-0.053558349609375,
0.0015201568603515625,
-0.049530029296875,
0.003284454345703125,
0.028778076171875,
0.00380706787109375,
-0.0100250244140625,
0.0202178955078125,
-0.044097900390625,
0.001300811767578125,
0.0357666015625,
-0.002658843994140625,
0.049560546875,
0.006038665771484375,
-0.012786865234375,
-0.010284423828125,
-0.0343017578125,
0.02069091796875,
-0.041473388671875,
0.005123138427734375,
0.0229034423828125,
0.033355712890625,
0.036773681640625,
-0.0238800048828125,
0.0151214599609375,
0.006290435791015625,
0.002155303955078125,
-0.00031256675720214844,
0.0296173095703125,
-0.0160369873046875,
0.00908660888671875,
-0.0218048095703125,
0.0010881423950195312,
0.0025005340576171875,
0.02197265625,
-0.0153045654296875,
0.00914764404296875,
0.056884765625,
-0.01113128662109375,
0.0299224853515625,
-0.0159149169921875,
0.034271240234375,
-0.04119873046875,
0.0240020751953125,
0.0042266845703125,
0.017425537109375,
0.03485107421875,
-0.005504608154296875,
0.047576904296875,
-0.0007281303405761719,
0.00601959228515625,
0.0264434814453125,
-0.03460693359375,
0.054351806640625,
-0.046722412109375,
0.01284027099609375,
0.05767822265625,
-0.01678466796875,
0.017547607421875,
0.0170745849609375,
-0.005977630615234375,
0.029296875,
0.01271820068359375,
0.0023860931396484375,
0.008636474609375,
-0.06317138671875,
-0.0244598388671875,
0.04095458984375,
0.0163726806640625,
0.025115966796875,
-0.01258087158203125,
-0.01187896728515625,
0.04901123046875,
-0.04248046875,
-0.0083160400390625,
-0.05303955078125,
-0.1087646484375,
-0.017181396484375,
0.01910400390625,
-0.07171630859375,
0.02685546875,
0.051116943359375,
0.01224517822265625,
-0.0199127197265625,
-0.0145263671875,
-0.0247344970703125,
0.006458282470703125,
-0.03363037109375,
0.047576904296875,
-0.0014705657958984375,
0.01187896728515625,
0.0062103271484375,
0.1046142578125,
0.0206756591796875,
-0.06781005859375,
0.0190277099609375,
-0.03240966796875,
-0.046234130859375,
0.05120849609375,
-0.0089263916015625,
-0.0125274658203125,
-0.0054168701171875,
-0.00789642333984375,
0.0305023193359375,
0.010009765625,
-0.0177764892578125,
-0.00313568115234375,
-0.0179443359375,
-0.0178070068359375,
0.01306915283203125,
0.0141143798828125,
0.0026702880859375,
0.00667572021484375,
0.0231781005859375,
-0.039520263671875,
-0.017974853515625,
0.003818511962890625,
-0.019683837890625,
0.030548095703125,
-0.02996826171875,
0.01126861572265625,
-0.034149169921875,
0.08978271484375,
-0.0039215087890625,
0.01200103759765625,
0.04998779296875,
-0.03765869140625,
0.020355224609375,
-0.00295257568359375,
-0.01142120361328125,
-0.041961669921875,
-0.004650115966796875,
-0.0123138427734375,
0.006565093994140625,
-0.01468658447265625,
0.006328582763671875,
-0.0364990234375,
0.038848876953125,
-0.051788330078125,
0.0247955322265625,
0.0067596435546875,
-0.0113372802734375,
0.038787841796875,
-0.00197601318359375,
-0.00881195068359375,
-0.01212310791015625,
0.0281524658203125,
-0.047210693359375,
-0.0035495758056640625,
0.00705718994140625,
0.0231170654296875,
-0.04669189453125,
-0.06085205078125,
-0.04296875,
-0.00675201416015625,
-0.007099151611328125,
0.0008196830749511719,
-0.0364990234375,
0.0224456787109375,
-0.027374267578125,
0.0201263427734375,
0.008209228515625,
-0.032073974609375,
0.0501708984375,
-0.04437255859375,
-0.0005564689636230469,
0.00630950927734375,
-0.017822265625,
-0.048980712890625,
-0.0240478515625,
-0.0018024444580078125,
-0.0750732421875,
-0.0020160675048828125,
-0.0281829833984375,
0.0244903564453125,
0.0247039794921875,
-0.045257568359375,
-0.0157318115234375,
0.037811279296875,
0.01560211181640625,
0.0274810791015625,
-0.00698089599609375,
0.002254486083984375,
-0.0199127197265625,
-0.0200653076171875,
-0.005062103271484375,
-0.029815673828125,
0.0017938613891601562,
0.0215301513671875,
-0.006839752197265625,
0.046844482421875,
-0.021575927734375,
-0.0201873779296875,
0.01517486572265625,
-0.03515625,
-0.0274658203125,
-0.023345947265625,
-0.031341552734375,
0.0242462158203125,
-0.0258636474609375,
-0.005695343017578125,
-0.034942626953125,
-0.04541015625,
0.037445068359375,
-0.0230865478515625,
-0.005496978759765625,
0.01187896728515625,
0.082275390625,
0.00853729248046875,
0.0067291259765625,
-0.04608154296875,
0.0197296142578125,
0.033233642578125,
0.04425048828125,
0.03680419921875,
0.0036830902099609375,
-0.0208282470703125,
0.04852294921875,
0.04132080078125,
0.01210784912109375,
-0.0474853515625,
0.0712890625,
-0.018402099609375,
-0.007724761962890625,
0.0210113525390625,
-0.0199432373046875,
0.03436279296875,
-0.0166778564453125,
-0.0033740997314453125,
0.003620147705078125,
0.03515625,
-0.0024471282958984375,
-0.0194549560546875,
0.00667572021484375,
0.015411376953125,
-0.058380126953125,
0.0202484130859375,
-0.005733489990234375,
0.0109100341796875,
0.0239105224609375,
-0.00350189208984375,
0.033294677734375,
0.003589630126953125,
-0.024993896484375,
-0.0167083740234375,
-0.0034027099609375,
-0.03131103515625,
0.01428985595703125,
-0.040863037109375,
-0.03778076171875,
-0.007579803466796875,
-0.0161895751953125,
0.04937744140625,
-0.0188751220703125,
-0.06427001953125,
0.0190582275390625,
-0.0146636962890625,
0.040802001953125,
0.0723876953125,
0.0174102783203125,
-0.010833740234375,
0.037384033203125,
0.005954742431640625,
0.01116180419921875,
0.0535888671875,
0.037261962890625,
-0.0033626556396484375,
0.0020122528076171875,
-0.0024127960205078125,
-0.00983428955078125,
0.0302734375,
0.0191802978515625,
-0.01024627685546875,
0.0195465087890625,
-0.0134429931640625,
0.0280609130859375,
0.0003142356872558594,
0.040985107421875,
0.0175018310546875,
-0.0120391845703125,
-0.0070037841796875,
0.0240936279296875,
-0.023895263671875,
-0.04864501953125,
-0.0167694091796875,
0.010498046875,
0.031646728515625,
-0.007114410400390625,
-0.0223541259765625,
0.0333251953125,
-0.0018663406372070312,
-0.0065460205078125,
0.0113983154296875,
-0.00505828857421875,
-0.0338134765625,
-0.0187835693359375,
-0.0032596588134765625,
0.0264434814453125,
0.00015485286712646484,
-0.00502777099609375,
-0.0386962890625,
-0.01276397705078125,
0.001983642578125,
0.0119781494140625,
-0.01971435546875,
0.004512786865234375,
-0.0022945404052734375,
0.025115966796875,
-0.0390625,
-0.057403564453125,
0.027862548828125,
0.0078887939453125,
-0.0118408203125,
0.0015010833740234375,
0.037933349609375,
-0.034637451171875,
0.00888824462890625,
-0.031585693359375,
0.032623291015625,
-0.04742431640625,
0.02288818359375,
0.036773681640625,
0.0296478271484375,
-0.04388427734375,
0.0091094970703125,
-0.0297393798828125,
-0.020782470703125,
-0.0018472671508789062,
-0.038116455078125,
-0.07366943359375,
-0.03338623046875,
0.0277099609375,
0.02056884765625,
0.0007824897766113281,
-0.034820556640625,
-0.01407623291015625,
0.032012939453125,
0.04022216796875,
0.08428955078125,
-0.001712799072265625,
0.03131103515625,
0.0172271728515625,
0.059600830078125,
0.00562286376953125,
-0.005680084228515625,
-0.0251922607421875,
-0.0202178955078125,
0.03900146484375,
0.014373779296875,
-0.0316162109375,
-0.01470947265625,
-0.01568603515625,
-0.03631591796875,
0.023162841796875,
-0.0189056396484375,
-0.0223541259765625,
0.0144195556640625,
0.008392333984375,
-0.018890380859375,
0.00434112548828125,
0.036285400390625,
-0.01861572265625,
0.0005178451538085938,
-0.03985595703125,
-0.02813720703125,
-0.01103973388671875,
-0.0266876220703125,
0.03240966796875,
-0.00043654441833496094,
0.004177093505859375,
0.030975341796875,
0.004840850830078125,
0.0090484619140625,
0.037322998046875,
0.003662109375,
0.032806396484375,
0.03497314453125,
0.0201568603515625,
-0.0157470703125,
-0.004291534423828125,
-0.00030803680419921875,
0.031890869140625,
-0.01409912109375,
-0.0246734619140625,
0.004108428955078125,
-0.043487548828125,
-0.0212860107421875,
0.05609130859375,
0.06829833984375,
0.10137939453125,
-0.083740234375,
0.01812744140625,
0.032684326171875,
-0.031219482421875,
0.04510498046875,
-0.01526641845703125,
-0.0083160400390625,
-0.03021240234375,
0.07244873046875,
-0.0291290283203125,
-0.003131866455078125,
0.035888671875,
-0.0184326171875,
-0.01357269287109375,
-0.0692138671875,
0.06072998046875,
0.019012451171875,
-0.05755615234375,
0.0704345703125,
0.054534912109375,
0.017791748046875,
-0.041412353515625,
-0.0106353759765625,
0.01224517822265625,
-0.0367431640625,
-0.09765625,
0.00505828857421875,
-0.001842498779296875,
0.0159454345703125,
-0.002655029296875,
0.003936767578125,
-0.017059326171875,
0.0565185546875,
-0.04620361328125,
0.03997802734375,
0.03509521484375,
-0.026458740234375,
0.0243072509765625,
-0.0164794921875,
0.0184478759765625,
0.06036376953125,
-0.040008544921875,
0.014434814453125,
0.0113983154296875,
-0.00995635986328125,
0.005130767822265625,
-0.0297393798828125,
0.054656982421875,
-0.03643798828125,
-0.00789642333984375,
-0.0007772445678710938,
-0.0247344970703125,
0.0303802490234375,
-0.021575927734375,
-0.039337158203125,
-0.004634857177734375,
0.039764404296875,
-0.0506591796875,
-0.0170745849609375,
0.029052734375,
-0.059814453125,
-0.06695556640625,
0.072021484375,
0.0164031982421875,
0.037841796875,
-0.0064849853515625,
0.01482391357421875,
-0.00574493408203125,
0.00015354156494140625,
-0.045257568359375,
0.047149658203125,
-0.016387939453125,
0.02996826171875,
-0.046295166015625,
0.00464630126953125,
0.008636474609375,
0.0278167724609375,
0.02471923828125,
-7.152557373046875e-7,
-0.0287933349609375,
-0.02215576171875,
0.0267791748046875,
0.057220458984375,
0.0166778564453125,
0.012664794921875,
0.007503509521484375,
-0.02508544921875,
-0.0059967041015625,
-0.00569915771484375,
0.027191162109375,
-0.036407470703125,
-0.0005259513854980469,
0.02740478515625,
0.0037021636962890625,
-0.020599365234375,
0.0207366943359375,
-0.04705810546875,
-0.0183258056640625,
0.0107879638671875,
-0.00946044921875,
-0.018829345703125,
-0.019439697265625,
0.047210693359375,
0.0308074951171875,
-0.047454833984375,
-0.09674072265625,
-0.01255035400390625,
0.0201263427734375,
0.019317626953125,
0.0224151611328125,
-0.0016641616821289062,
0.00818634033203125,
-0.004711151123046875,
-0.0092926025390625,
0.00567626953125,
0.0194549560546875,
-0.0212554931640625,
-0.02880859375,
0.000005185604095458984,
-0.0002727508544921875,
-0.032196044921875,
0.01198577880859375,
0.06488037109375,
0.0051422119140625,
-0.0200042724609375,
-0.0013980865478515625,
0.0022735595703125,
0.006877899169921875,
-0.0024394989013671875,
-0.03704833984375,
-0.0018720626831054688,
-0.00241851806640625,
0.0198822021484375,
0.03411865234375,
-0.02001953125,
-0.0281524658203125,
0.0203399658203125,
0.0198211669921875,
0.053466796875,
-0.0123748779296875,
-0.03070068359375,
-0.06292724609375,
-0.0009927749633789062,
0.005992889404296875,
0.057281494140625,
0.041290283203125,
0.046417236328125,
-0.00038909912109375,
-0.03765869140625,
-0.004150390625,
0.029144287109375,
-0.018798828125,
0.003955841064453125,
-0.0109100341796875,
-0.032623291015625,
-0.03485107421875,
0.0183258056640625,
-0.0019273757934570312,
0.03143310546875,
0.041900634765625,
0.000017344951629638672,
-0.050048828125,
-0.0170745849609375,
0.007171630859375,
-0.045379638671875,
-0.08160400390625,
-0.04119873046875,
-0.042022705078125,
0.044647216796875,
0.0113525390625,
0.05828857421875,
-0.00971221923828125,
0.0233154296875,
-0.016845703125,
0.023406982421875,
-0.0009531974792480469,
-0.01418304443359375,
-0.0162811279296875,
-0.0220947265625,
-0.0034198760986328125,
0.003780364990234375,
-0.033355712890625,
-0.01526641845703125,
-0.01360321044921875,
-0.01104736328125,
0.0198822021484375,
0.0274810791015625,
0.01476287841796875,
0.0037384033203125,
0.0223541259765625,
-0.021240234375,
0.00952911376953125,
0.00301361083984375,
0.011077880859375,
-0.00707244873046875,
0.0186767578125,
-0.0011272430419921875,
-0.04180908203125,
-0.029266357421875,
-0.000014066696166992188,
0.0267791748046875,
0.0010099411010742188,
0.031768798828125,
0.01153564453125,
0.014801025390625,
-0.032470703125,
0.01904296875,
-0.0322265625,
0.0019378662109375,
-0.0276336669921875,
0.03656005859375,
0.0152435302734375,
-0.0124053955078125,
-0.029205322265625,
0.039947509765625,
0.0224151611328125,
-0.00506591796875,
0.0259857177734375,
-0.0006914138793945312,
-0.0025882720947265625,
-0.0229949951171875,
0.005062103271484375,
-0.00450897216796875,
-0.011627197265625,
-0.00743865966796875,
-0.0184783935546875,
0.0254058837890625,
0.034271240234375,
0.022003173828125,
0.03411865234375,
-0.0110931396484375,
-0.0633544921875,
0.01428985595703125,
-0.0765380859375,
0.0025691986083984375,
0.0265960693359375,
0.041107177734375,
-0.043914794921875,
-0.007282257080078125,
-0.01904296875,
-0.029571533203125,
0.01458740234375,
0.026580810546875,
0.00904083251953125,
-0.0284423828125,
0.0096435546875,
0.019317626953125,
0.0555419921875,
-0.0027008056640625,
0.016326904296875,
0.025726318359375,
0.0028667449951171875,
-0.01319122314453125,
0.01873779296875,
-0.01131439208984375,
-0.0269012451171875,
0.010162353515625,
0.01326751708984375,
0.0021991729736328125,
0.00931549072265625,
-0.066650390625,
-0.0309906005859375,
0.019500732421875,
-0.00015676021575927734,
-0.0316162109375,
-0.0009102821350097656,
-0.01088714599609375,
0.00920867919921875,
-0.02362060546875,
0.014984130859375,
-0.002902984619140625,
0.027862548828125,
-0.032867431640625,
-0.0362548828125,
-0.037200927734375,
0.021820068359375,
-0.040374755859375,
0.01033782958984375,
0.03131103515625,
0.0020313262939453125,
-0.0232391357421875,
0.014007568359375,
0.0035037994384765625,
0.04876708984375,
0.0026798248291015625,
-0.02496337890625,
-0.01617431640625,
0.02569580078125,
-0.0026607513427734375,
-0.00677490234375,
0.01503753662109375,
0.00958251953125,
-0.0261383056640625,
-0.045440673828125,
0.0259857177734375,
0.0210418701171875,
-0.061431884765625,
-0.12091064453125,
-0.0278167724609375,
-0.00943756103515625,
-0.05474853515625,
-0.00820159912109375,
-0.033905029296875,
-0.0158538818359375,
0.0195159912109375,
0.0016775131225585938,
-0.007480621337890625,
-0.02752685546875,
0.018585205078125,
-0.0115203857421875,
0.10272216796875,
-0.00399017333984375,
-0.017486572265625,
0.028045654296875,
0.0163116455078125,
0.00637054443359375,
-0.0062713623046875,
0.00042176246643066406,
-0.0197601318359375,
0.0158233642578125,
0.03076171875,
-0.024078369140625,
-0.056427001953125,
0.0129241943359375,
-0.0165557861328125,
0.020355224609375,
-0.0293121337890625,
-0.036407470703125,
-0.0294342041015625,
0.0149078369140625,
0.039764404296875,
0.0058135986328125,
-0.01444244384765625,
0.06463623046875,
-0.003932952880859375,
-0.06396484375,
0.005435943603515625,
0.008758544921875,
-0.021240234375,
-0.0092926025390625,
-0.0006036758422851562,
-0.0035839080810546875,
0.0181121826171875,
-0.0421142578125,
-0.015838623046875,
-0.01300048828125,
-0.0163116455078125,
-0.006847381591796875,
-0.012298583984375,
-0.07611083984375,
0.08038330078125,
-0.05712890625,
-0.0316162109375,
0.01019287109375,
0.03936767578125,
0.015167236328125,
0.02935791015625,
-0.005222320556640625,
0.00927734375,
-0.05645751953125,
-0.006053924560546875,
0.00262451171875,
0.028717041015625,
-0.0163726806640625,
-0.011016845703125,
0.033966064453125,
-0.00376129150390625,
-0.0279998779296875,
-0.024444580078125,
0.03228759765625,
0.011993408203125,
-0.04461669921875,
0.046661376953125,
-0.01983642578125,
0.014190673828125,
-0.03631591796875,
0.053253173828125,
-0.0254364013671875,
0.0034580230712890625,
0.004787445068359375,
-0.0293121337890625,
0.003955841064453125,
0.03887939453125,
0.01342010498046875,
-0.0173187255859375,
0.006622314453125,
0.0197296142578125,
0.023406982421875,
0.0035152435302734375
] |
64cdd7a352ee8c0dba71fb62b38aee4b18de1664
|
Wordpress Stackexchange
Q: Redirect user to a custom url after submitting the comment After someone submits a comment this line of codes redirects him to the post (i believe).
Can I modify the code in order to redirect him to a custom URL?
do_action('comment_form', $post->ID)
Ty for the answer,
UPDATE:
my comments.php
<form>
.......
<input name="submit" type="submit" id="submit" tabindex="5" value="Submit" />
<input type="hidden" name="my_redirect_to" value="http://www.google.com"; />
<?php comment_id_fields(); ?>
<?php do_action('comment_form', $post->ID); ?>
</form>
my functions.php
add_action('comment_post_redirect', 'redirect_to_thank_page'); // Redirect to thank you post after comment
function redirect_to_thank_page() {
if ( isset( $_POST['my_redirect_to'] ) )
return $_POST['my_redirect_to'];
}
The code does not work, it's not redirecting to google.com for example.
Any ideas why?
Ty
A: Not quite; the redirect occurs inline inside wp-comments-post.php
Use the filter comment_post_redirect to pass back any URL of your choice. Arguments passed are the default redirect & comment object, respectively.
Based on your comments, here's a suggestion:
function wpse_58613_comment_redirect( $location ) {
if ( isset( $_POST['my_redirect_to'] ) ) // Don't use "redirect_to", internal WP var
$location = $_POST['my_redirect_to'];
return $location;
}
add_filter( 'comment_post_redirect', 'wpse_58613_comment_redirect' );
|
Q: Redirect user to a custom url after submitting the comment After someone submits a comment this line of codes redirects him to the post (i believe).
Can I modify the code in order to redirect him to a custom URL?
do_action('comment_form', $post->ID)
Ty for the answer,
UPDATE:
my comments.php
<form>
.......
<input name="submit" type="submit" id="submit" tabindex="5" value="Submit" />
<input type="hidden" name="my_redirect_to" value="http://www.google.com"; />
<?php comment_id_fields(); ?>
<?php do_action('comment_form', $post->ID); ?>
</form>
my functions.php
add_action('comment_post_redirect', 'redirect_to_thank_page'); // Redirect to thank you post after comment
function redirect_to_thank_page() {
if ( isset( $_POST['my_redirect_to'] ) )
return $_POST['my_redirect_to'];
}
The code does not work, it's not redirecting to google.com for example.
Any ideas why?
Ty
A: Not quite; the redirect occurs inline inside wp-comments-post.php
Use the filter comment_post_redirect to pass back any URL of your choice. Arguments passed are the default redirect & comment object, respectively.
Based on your comments, here's a suggestion:
function wpse_58613_comment_redirect( $location ) {
if ( isset( $_POST['my_redirect_to'] ) ) // Don't use "redirect_to", internal WP var
$location = $_POST['my_redirect_to'];
return $location;
}
add_filter( 'comment_post_redirect', 'wpse_58613_comment_redirect' );
|
wordpress
|
{
"language": "en",
"length": 178,
"provenance": "stackexchange_00019.jsonl.gz:421889",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58613"
}
|
[
0.08538818359375,
0.0015163421630859375,
0.02032470703125,
-0.049407958984375,
0.0263214111328125,
-0.0199127197265625,
0.04583740234375,
-0.036407470703125,
0.00656890869140625,
0.0026683807373046875,
-0.0008311271667480469,
-0.0438232421875,
-0.0174407958984375,
-0.058380126953125,
-0.0135345458984375,
-0.040283203125,
0.0152740478515625,
0.00457000732421875,
0.019805908203125,
-0.0157012939453125,
0.02423095703125,
-0.01245880126953125,
0.00769805908203125,
0.0126953125,
0.00507354736328125,
-0.0246124267578125,
0.1212158203125,
-0.021514892578125,
-0.0069427490234375,
-0.0169525146484375,
0.016937255859375,
-0.0226593017578125,
0.03265380859375,
0.0155487060546875,
-0.0297088623046875,
-0.0163116455078125,
0.00553131103515625,
-0.0011606216430664062,
-0.0213623046875,
0.037933349609375,
0.028076171875,
-0.039337158203125,
-0.0059814453125,
-0.0126190185546875,
-0.0031414031982421875,
-0.02691650390625,
0.042266845703125,
-0.011077880859375,
0.01439666748046875,
0.0223846435546875,
0.017791748046875,
0.02655029296875,
0.0301971435546875,
-0.0097198486328125,
-0.008453369140625,
0.0270538330078125,
-0.042388916015625,
0.0262908935546875,
0.0174713134765625,
-0.0018873214721679688,
0.01360321044921875,
-0.00963592529296875,
0.01006317138671875,
0.023773193359375,
-0.026611328125,
0.00423431396484375,
-0.005405426025390625,
0.0198974609375,
0.01507568359375,
-0.03009033203125,
-0.02142333984375,
0.002330780029296875,
-0.0222015380859375,
-0.01163482666015625,
-0.004009246826171875,
-0.0199127197265625,
0.013519287109375,
-0.027313232421875,
0.004642486572265625,
0.040740966796875,
0.005290985107421875,
0.00901031494140625,
-0.0026988983154296875,
-0.04071044921875,
0.031982421875,
-0.00533294677734375,
-0.0251617431640625,
-0.032012939453125,
-0.05938720703125,
-0.0278778076171875,
-0.0384521484375,
-0.042694091796875,
-0.044036865234375,
-0.007740020751953125,
-0.0206298828125,
-0.005115509033203125,
0.01091766357421875,
0.042022705078125,
-0.00714874267578125,
-0.0198974609375,
0.01284027099609375,
-0.0245361328125,
-0.006702423095703125,
-0.0172271728515625,
-0.00666046142578125,
0.03851318359375,
0.01035308837890625,
-0.01262664794921875,
-0.002445220947265625,
0.00501251220703125,
-0.01073455810546875,
-0.04168701171875,
-0.0182647705078125,
-0.015533447265625,
-0.00560760498046875,
-0.01206207275390625,
-0.07275390625,
0.014495849609375,
-0.01348876953125,
-0.0011854171752929688,
-0.0305633544921875,
-0.01122283935546875,
0.043121337890625,
-0.04400634765625,
0.0216522216796875,
-0.00879669189453125,
-0.00902557373046875,
-0.0289459228515625,
0.03448486328125,
0.0258331298828125,
-0.03546142578125,
0.00024509429931640625,
0.04388427734375,
0.00833892822265625,
0.01287078857421875,
-0.034820556640625,
0.051666259765625,
-0.01102447509765625,
-0.039459228515625,
0.041229248046875,
-0.02178955078125,
-0.034271240234375,
-0.042816162109375,
-0.0303192138671875,
0.017669677734375,
0.035888671875,
0.031951904296875,
-0.0020465850830078125,
-0.013427734375,
-0.0765380859375,
-0.0023937225341796875,
-0.013641357421875,
0.050445556640625,
-0.041900634765625,
-0.002208709716796875,
-0.08270263671875,
-0.0082244873046875,
-0.044891357421875,
0.0309906005859375,
-0.030426025390625,
0.045867919921875,
0.002124786376953125,
0.00011497735977172852,
-0.03826904296875,
-0.053375244140625,
-0.028350830078125,
-0.05126953125,
-0.0251007080078125,
0.0146636962890625,
0.04132080078125,
-0.039520263671875,
0.01146697998046875,
-0.049896240234375,
-0.006252288818359375,
-0.00673675537109375,
0.0035037994384765625,
0.0118865966796875,
-0.020294189453125,
0.0026569366455078125,
0.0650634765625,
0.00933074951171875,
-0.0323486328125,
-0.0011663436889648438,
0.01491546630859375,
-0.023956298828125,
0.08099365234375,
0.017791748046875,
0.08135986328125,
-0.0433349609375,
0.011993408203125,
-0.003215789794921875,
0.06982421875,
-0.0017766952514648438,
0.001819610595703125,
-0.010345458984375,
-0.0391845703125,
0.003551483154296875,
-0.01232147216796875,
-0.01320648193359375,
0.03155517578125,
0.016693115234375,
-0.0008869171142578125,
0.0007944107055664062,
0.02117919921875,
-0.0282745361328125,
0.0292205810546875,
-0.026397705078125,
0.031463623046875,
0.01357269287109375,
0.02862548828125,
0.00992584228515625,
-0.005046844482421875,
-0.0193023681640625,
-0.021759033203125,
-0.02215576171875,
0.0125274658203125,
-0.00757598876953125,
0.048065185546875,
-0.01456451416015625,
0.052825927734375,
-0.0293731689453125,
-0.0648193359375,
-0.035430908203125,
-0.02593994140625,
0.039398193359375,
-0.0162811279296875,
-0.00917816162109375,
-0.018218994140625,
0.00688934326171875,
0.01325225830078125,
-0.08197021484375,
0.030120849609375,
0.051544189453125,
-0.01502227783203125,
-0.044281005859375,
0.0152130126953125,
-0.006122589111328125,
-0.0615234375,
-0.0287628173828125,
0.0634765625,
0.0107574462890625,
0.035614013671875,
-0.008514404296875,
0.040313720703125,
0.045684814453125,
-0.008331298828125,
0.004291534423828125,
0.0280609130859375,
0.042327880859375,
0.035186767578125,
-0.012969970703125,
-0.0312042236328125,
0.01218414306640625,
-0.060791015625,
0.040557861328125,
0.033416748046875,
-0.0160980224609375,
-0.0164794921875,
-0.0000489354133605957,
-0.01006317138671875,
0.017852783203125,
-0.0177001953125,
-0.037933349609375,
0.002521514892578125,
-0.007228851318359375,
-0.0179290771484375,
-0.017242431640625,
-0.0170135498046875,
-0.037109375,
-0.01389312744140625,
0.049896240234375,
0.006061553955078125,
-0.025390625,
0.0008764266967773438,
0.0838623046875,
-0.039031982421875,
-0.031402587890625,
0.003017425537109375,
-0.00543212890625,
-0.002197265625,
0.00818634033203125,
0.050384521484375,
-0.02642822265625,
-0.029022216796875,
-0.0079803466796875,
-0.0177154541015625,
-0.01318359375,
0.003917694091796875,
0.0289459228515625,
-0.006259918212890625,
0.02459716796875,
0.0086212158203125,
-0.0039005279541015625,
0.0287322998046875,
0.0282745361328125,
-0.041229248046875,
0.039703369140625,
-0.037261962890625,
0.036529541015625,
-0.0187835693359375,
0.039825439453125,
0.061004638671875,
-0.009185791015625,
0.027587890625,
0.003314971923828125,
0.02752685546875,
0.004856109619140625,
0.004962921142578125,
-0.00417327880859375,
-0.019317626953125,
-0.04864501953125,
-0.033416748046875,
0.015838623046875,
0.036956787109375,
-0.0014629364013671875,
-0.031494140625,
-0.00473785400390625,
0.01082611083984375,
-0.0567626953125,
-0.036529541015625,
-0.006259918212890625,
-0.05572509765625,
0.015777587890625,
-0.01038360595703125,
-0.02593994140625,
-0.0051422119140625,
-0.002407073974609375,
0.01155853271484375,
0.02197265625,
-0.0125274658203125,
-0.07470703125,
-0.022125244140625,
-0.07855224609375,
0.00643157958984375,
-0.0037593841552734375,
0.0181884765625,
0.024322509765625,
-0.037261962890625,
0.01493072509765625,
0.007144927978515625,
0.050384521484375,
0.06561279296875,
-0.00492095947265625,
-0.038604736328125,
-0.037689208984375,
0.00638580322265625,
0.02032470703125,
-0.01522064208984375,
0.055206298828125,
0.0178680419921875,
-0.006168365478515625,
0.0036029815673828125,
-0.0038356781005859375,
0.01345062255859375,
0.018585205078125,
-0.05303955078125,
0.003940582275390625,
0.039337158203125,
-0.004795074462890625,
-0.0269012451171875,
-0.0117645263671875,
-0.015380859375,
-0.053619384765625,
-0.031494140625,
0.031951904296875,
0.01300048828125,
-0.0210113525390625,
-0.00853729248046875,
0.049957275390625,
0.031829833984375,
0.044525146484375,
0.00479888916015625,
-0.007137298583984375,
0.00616455078125,
0.02484130859375,
-0.060516357421875,
0.036102294921875,
0.003528594970703125,
-0.0267791748046875,
0.00655364990234375,
0.0177764892578125,
0.00868988037109375,
0.004398345947265625,
-0.03546142578125,
-0.08026123046875,
0.035430908203125,
-0.07080078125,
-0.0156402587890625,
-0.04071044921875,
-0.00958251953125,
-0.0002999305725097656,
0.078125,
-0.03448486328125,
-0.007171630859375,
-0.02069091796875,
-0.0103912353515625,
-0.005336761474609375,
0.0031299591064453125,
-0.04046630859375,
-0.00135040283203125,
-0.0921630859375,
0.040740966796875,
0.0066986083984375,
-0.0150909423828125,
-0.02532958984375,
0.01837158203125,
-0.050628662109375,
-0.0404052734375,
0.0142974853515625,
-0.0138092041015625,
0.01418304443359375,
0.0154571533203125,
-0.01427459716796875,
0.028564453125,
0.012664794921875,
-0.0537109375,
-0.0208282470703125,
-0.0005044937133789062,
0.0030307769775390625,
-0.002490997314453125,
-0.00003594160079956055,
-0.0025482177734375,
0.0223541259765625,
0.0518798828125,
0.03057861328125,
0.005481719970703125,
-0.0272064208984375,
-0.02557373046875,
-0.00809478759765625,
-0.006748199462890625,
-0.03863525390625,
0.0020294189453125,
-0.0029735565185546875,
0.016204833984375,
-0.006160736083984375,
0.050140380859375,
-0.0198516845703125,
0.003326416015625,
0.01361846923828125,
-0.03228759765625,
-0.0440673828125,
-0.01059722900390625,
-0.00684356689453125,
0.025421142578125,
-0.031646728515625,
0.0042266845703125,
0.001270294189453125,
-0.05853271484375,
-0.0088043212890625,
-0.04986572265625,
-0.02142333984375,
0.0237884521484375,
0.00969696044921875,
0.0261383056640625,
0.0153350830078125,
0.03558349609375,
0.002536773681640625,
0.010162353515625,
0.01464080810546875,
0.039398193359375,
0.011505126953125,
0.004974365234375,
0.039276123046875,
-0.020355224609375,
0.0161590576171875,
-0.0103912353515625,
0.048736572265625,
-0.01666259765625,
-0.0183563232421875,
0.03631591796875,
-0.007541656494140625,
-0.033355712890625,
0.01328277587890625,
-0.0059814453125,
-0.01181793212890625,
-0.0234832763671875,
0.041748046875,
0.0068817138671875,
-0.011505126953125,
-0.046905517578125,
-0.051849365234375,
0.00702667236328125,
-0.021575927734375,
0.05096435546875,
0.02154541015625,
0.005565643310546875,
0.0401611328125,
0.0283355712890625,
0.0177459716796875,
0.00408935546875,
-0.0237274169921875,
-0.01378631591796875,
0.031097412109375,
0.0164642333984375,
-0.0026702880859375,
0.020965576171875,
-0.0064697265625,
0.08441162109375,
0.056243896484375,
0.0012407302856445312,
0.002685546875,
-0.0107574462890625,
-0.0443115234375,
-0.04345703125,
-0.0008406639099121094,
0.0206451416015625,
0.0036468505859375,
-0.0191192626953125,
0.004833221435546875,
-0.004795074462890625,
-0.00995635986328125,
-0.037384033203125,
0.042938232421875,
0.007602691650390625,
0.01496124267578125,
0.0294952392578125,
0.0738525390625,
0.004062652587890625,
0.068603515625,
-0.0289459228515625,
0.0152740478515625,
0.0306396484375,
0.0198516845703125,
0.0178985595703125,
0.022430419921875,
-0.01261138916015625,
0.007740020751953125,
0.0038318634033203125,
-0.018402099609375,
-0.01605224609375,
0.050140380859375,
0.044158935546875,
0.0270233154296875,
0.028656005859375,
-0.037933349609375,
-0.0093841552734375,
0.0043792724609375,
0.01525115966796875,
0.01102447509765625,
-0.049560546875,
-0.0007634162902832031,
-0.01544952392578125,
-0.007541656494140625,
-0.017547607421875,
-0.0311737060546875,
-0.0418701171875,
-0.03759765625,
0.00914764404296875,
0.01447296142578125,
-0.021728515625,
0.02142333984375,
-0.00565338134765625,
-0.01113128662109375,
-0.0229949951171875,
-0.00262451171875,
-0.013916015625,
0.0069427490234375,
-0.01100921630859375,
-0.01593017578125,
0.045806884765625,
-0.022308349609375,
-0.0154876708984375,
-0.0212860107421875,
0.0151214599609375,
-0.0102081298828125,
-0.0030517578125,
0.0850830078125,
0.036773681640625,
-0.049224853515625,
0.006572723388671875,
-0.0386962890625,
-0.0039215087890625,
-0.006748199462890625,
-0.0156402587890625,
-0.01641845703125,
-0.007259368896484375,
0.03253173828125,
0.0305938720703125,
0.00728607177734375,
-0.04302978515625,
-0.04473876953125,
-0.01268768310546875,
0.0214691162109375,
0.040985107421875,
-0.015716552734375,
0.05718994140625,
0.0134735107421875,
0.0245208740234375,
0.01678466796875,
0.058013916015625,
0.0221405029296875,
-0.02874755859375,
-0.00010728836059570312,
-0.061126708984375,
-0.0286407470703125,
-0.01605224609375,
-0.034912109375,
0.06121826171875,
0.0699462890625,
-0.0101318359375,
0.00659942626953125,
0.01715087890625,
0.0021953582763671875,
-0.029327392578125,
-0.031341552734375,
0.01149749755859375,
0.040924072265625,
-0.0102691650390625,
0.0303497314453125,
0.0264434814453125,
-0.02178955078125,
-0.0013885498046875,
-0.03570556640625,
0.00911712646484375,
-0.0194091796875,
-0.0173187255859375,
-0.0771484375,
0.064208984375,
0.12103271484375,
0.01568603515625,
0.058990478515625,
0.0105133056640625,
0.004123687744140625,
0.07061767578125,
0.0162506103515625,
-0.0218658447265625,
-0.0115509033203125,
0.044647216796875,
0.0023479461669921875,
-0.0152130126953125,
0.047119140625,
-0.01947021484375,
0.01166534423828125,
0.0709228515625,
0.052337646484375,
-0.1070556640625,
0.012420654296875,
-0.0034809112548828125,
0.007045745849609375,
0.06591796875,
-0.00945281982421875,
0.0179443359375,
0.01250457763671875,
0.0176239013671875,
0.00672149658203125,
-0.032318115234375,
-0.00333404541015625,
0.01329803466796875,
0.00014090538024902344,
0.01104736328125,
0.0248565673828125,
-0.0196533203125,
-0.10345458984375,
-0.0178070068359375,
0.0714111328125,
-0.0579833984375,
-0.0097198486328125,
-0.01258087158203125,
0.0269317626953125,
-0.02294921875,
-0.0714111328125,
0.01363372802734375,
-0.054107666015625,
-0.0012922286987304688,
0.03802490234375,
-0.0036602020263671875,
0.061492919921875,
0.07037353515625,
-0.0086822509765625,
0.0266571044921875,
0.0369873046875,
-0.0006699562072753906,
0.0237274169921875,
-0.0272216796875,
0.005107879638671875,
0.0013036727905273438,
-0.005046844482421875,
0.0182952880859375,
-0.0037021636962890625,
-0.05499267578125,
-0.0019197463989257812,
0.0256195068359375,
0.06500244140625,
0.001369476318359375,
-0.042572021484375,
0.0225677490234375,
-0.003948211669921875,
0.0040435791015625,
-0.01190185546875,
0.01357269287109375,
-0.0167083740234375,
-0.006626129150390625,
-0.0285186767578125,
-0.033660888671875,
0.007015228271484375,
-0.05230712890625,
-0.048248291015625,
0.046478271484375,
0.0277862548828125,
0.0236663818359375,
-0.0035533905029296875,
0.0189361572265625,
-0.01580810546875,
0.00644683837890625,
-0.0249786376953125,
0.0193328857421875,
0.005096435546875,
0.034149169921875,
-0.045166015625,
-0.022735595703125,
0.003154754638671875,
0.044769287109375,
0.038116455078125,
0.0230712890625,
-0.0941162109375,
0.01251983642578125,
0.058563232421875,
0.01261138916015625,
0.0177459716796875,
0.0682373046875,
-0.0133819580078125,
0.005710601806640625,
0.0244140625,
-0.05084228515625,
0.01209259033203125,
-0.0234375,
0.0012578964233398438,
-0.0165557861328125,
0.021636962890625,
0.00914764404296875,
-0.03399658203125,
0.023834228515625,
-0.079345703125,
-0.0016765594482421875,
0.04583740234375,
0.0275421142578125,
-0.05718994140625,
0.030181884765625,
0.00785064697265625,
-0.0706787109375,
0.021575927734375,
-0.05517578125,
0.044647216796875,
0.0191802978515625,
0.0157623291015625,
0.05206298828125,
0.033050537109375,
0.021697998046875,
-0.0072021484375,
0.01160430908203125,
-0.00965118408203125,
-0.00768280029296875,
0.08306884765625,
0.058258056640625,
0.0208740234375,
-0.00508880615234375,
0.0185546875,
0.0238037109375,
0.088623046875,
-0.0703125,
0.0189056396484375,
0.0017719268798828125,
0.0076904296875,
0.044830322265625,
-0.0298004150390625,
0.0751953125,
-0.047088623046875,
-0.0714111328125,
-0.03509521484375,
0.0005335807800292969,
0.00812530517578125,
0.01971435546875,
-0.01251983642578125,
-0.0024166107177734375,
0.0014019012451171875,
0.006137847900390625,
-0.0031414031982421875,
-0.037506103515625,
0.0199127197265625,
0.0304107666015625,
-0.0026912689208984375,
0.0384521484375,
0.00852203369140625,
0.0031490325927734375,
0.00949859619140625,
0.0171966552734375,
0.0273895263671875,
-0.0275726318359375,
-0.0187835693359375,
-0.035125732421875,
0.01143646240234375,
0.043365478515625,
-0.00405120849609375,
0.010528564453125,
-0.021270751953125,
-0.0377197265625,
0.00678253173828125,
0.005855560302734375,
0.00800323486328125,
-0.0323486328125,
0.03466796875,
-0.03497314453125,
-0.0024051666259765625,
-0.00428009033203125,
-0.028961181640625,
0.01195526123046875,
-0.053497314453125,
0.0447998046875,
-0.0024967193603515625,
0.025482177734375,
-0.001220703125,
-0.02911376953125,
0.0273284912109375,
0.0063018798828125,
0.07049560546875,
0.0272369384765625,
-0.007183074951171875,
-0.0221710205078125,
0.042510986328125,
-0.0086822509765625,
-0.0072021484375,
0.02099609375,
-0.00585174560546875,
0.0271453857421875,
-0.0289459228515625,
-0.0016546249389648438,
0.047393798828125,
-0.0263824462890625,
-0.00994873046875,
0.0276947021484375,
0.027587890625,
-0.01239013671875,
-0.0343017578125,
-0.0190887451171875,
-0.01187896728515625,
0.0126495361328125,
0.0214996337890625,
0.0494384765625,
-0.009033203125,
0.0249176025390625,
-0.0298004150390625,
0.01015472412109375,
-0.015472412109375,
-0.04168701171875,
0.059906005859375,
0.02740478515625,
-0.0024738311767578125,
-0.023345947265625,
-0.05194091796875,
0.0229034423828125,
0.0380859375,
0.0121307373046875,
0.029693603515625,
0.0008358955383300781,
0.01519775390625,
-0.0181732177734375,
-0.003719329833984375,
-0.04412841796875,
-0.047698974609375,
-0.046966552734375,
-0.01421356201171875,
0.01300811767578125,
0.0213623046875,
0.0010824203491210938,
0.09039306640625,
-0.040496826171875,
0.032928466796875,
0.0174407958984375,
-0.0811767578125,
0.0150604248046875,
0.029937744140625,
-0.0849609375,
0.0010938644409179688,
0.0228271484375,
-0.01361846923828125,
-0.0113677978515625,
0.01031494140625,
0.0126190185546875,
0.00328826904296875,
0.0233612060546875,
-0.043792724609375,
-0.04754638671875,
0.005336761474609375,
-0.0210723876953125,
-0.003360748291015625,
-0.046966552734375,
0.0028362274169921875,
-0.01123809814453125,
-0.027252197265625,
-0.0188446044921875,
-0.025787353515625,
0.001800537109375,
0.017120361328125,
-0.0009927749633789062,
-0.0175323486328125,
-0.01055145263671875,
-0.00972747802734375,
0.037506103515625,
-0.0233612060546875,
-0.0283203125,
-0.0080413818359375,
-0.019378662109375,
0.05560302734375,
-0.041900634765625,
0.048675537109375,
0.006195068359375,
0.0010166168212890625,
-0.06646728515625,
-0.00023162364959716797,
-0.0082550048828125,
0.0227203369140625,
-0.013946533203125,
0.03173828125,
0.054718017578125,
-0.0208282470703125,
-0.03179931640625,
0.01436614990234375,
-0.00018525123596191406,
0.0699462890625,
-0.01885986328125,
-0.0284271240234375,
0.038421630859375,
-0.00409698486328125,
-0.0148773193359375,
-0.004638671875,
-0.0014581680297851562,
0.003993988037109375,
-0.0123291015625,
-0.00557708740234375,
-0.01971435546875,
-0.0156097412109375,
-0.028594970703125,
-0.03338623046875,
0.01537322998046875,
0.01451873779296875,
-0.0277252197265625,
0.0009355545043945312,
0.005859375,
-0.007022857666015625,
0.033660888671875,
0.023956298828125,
-0.037811279296875,
-0.020294189453125,
-0.00507354736328125,
-0.0145721435546875,
0.06793212890625,
-0.01885986328125,
0.0212554931640625,
0.018829345703125,
0.0225982666015625,
0.0177001953125,
-0.03167724609375,
0.0092620849609375,
-0.017547607421875,
0.0283050537109375,
0.051788330078125,
0.002208709716796875,
-0.0294952392578125,
0.00722503662109375,
-0.05267333984375,
-0.0146636962890625,
-0.0194091796875,
-0.00888824462890625,
-0.0020236968994140625,
0.0097503662109375,
0.040618896484375,
-0.00635528564453125,
-0.0191650390625,
-0.0122833251953125,
0.0037097930908203125,
-0.0123443603515625,
-0.023956298828125,
0.01042938232421875,
-0.053955078125,
-0.037811279296875,
-0.020721435546875,
0.0016641616821289062,
-0.00823211669921875,
-0.00913238525390625,
-0.00582122802734375,
-0.0113525390625,
0.0227203369140625,
-0.022491455078125,
0.035400390625,
-0.03656005859375,
0.06451416015625,
-0.048828125,
-0.0116424560546875,
-0.00582122802734375,
0.0440673828125,
0.00904083251953125,
-0.04425048828125,
0.0132598876953125,
0.0413818359375,
-0.0196533203125,
-0.0250396728515625,
0.03948974609375,
0.003753662109375,
0.01073455810546875,
-0.0191497802734375,
-0.01038360595703125,
0.021575927734375,
-0.0122528076171875,
0.01479339599609375,
0.01079559326171875,
0.0214996337890625,
-0.005512237548828125,
0.02349853515625,
-0.0187530517578125,
0.0240020751953125,
-0.0198211669921875,
0.04150390625,
-0.0213623046875,
-0.0115966796875,
0.03900146484375,
-0.0266265869140625,
0.00247955322265625,
0.06170654296875,
0.049224853515625,
-0.0085906982421875,
0.031890869140625,
0.033843994140625,
0.05841064453125,
0.0017871856689453125
] |
1b3708bab4993c528f4375fafc3868ae6a7f8aeb
|
Wordpress Stackexchange
Q: How to create a front end user profile with a friendly permalink I want to create a public front-end profile page with a friendly url like this format.
mysite.com/user/someusername
Any idea on how can i achieve this? I know it has something to do with rewrite rule but i have no idea on how can i do that. If you got any link or tutorial for me that will be great.
Thanks!
A: I found this earlier today and made some modificatios to @bybloggers code with the diference that instead of using template_redirect I change the request to show a static page, that means that you can now add anything you like to a page template and use it on that page.
class ProfilePage {
function __construct() {
add_filter( 'init',array($this,'rw_init'));
add_filter( 'query_vars', array($this,'wpleet_rewrite_add_var') );
add_filter( 'request', array($this,'change_requests'));
}
function wpleet_rewrite_add_var( $vars ) {
$vars[] = 'usuario';
return $vars;
}
function rw_init(){
add_rewrite_tag( '%usuario%', '([^&]+)' );
add_rewrite_rule(
'^usuario/([^/]*)/?',
'index.php?usuario=$matches[1]',
'top'
);
}
function change_requests($query_vars) {
//go to a specific page when the usuario key is set
$query_vars['page_id'] = isset($query_vars['usuario']) ? 7581 : $query_vars['page_id'];
return $query_vars;
}
}
new ProfilePage();
Spanish -> usuario = user <- English
|
Q: How to create a front end user profile with a friendly permalink I want to create a public front-end profile page with a friendly url like this format.
mysite.com/user/someusername
Any idea on how can i achieve this? I know it has something to do with rewrite rule but i have no idea on how can i do that. If you got any link or tutorial for me that will be great.
Thanks!
A: I found this earlier today and made some modificatios to @bybloggers code with the diference that instead of using template_redirect I change the request to show a static page, that means that you can now add anything you like to a page template and use it on that page.
class ProfilePage {
function __construct() {
add_filter( 'init',array($this,'rw_init'));
add_filter( 'query_vars', array($this,'wpleet_rewrite_add_var') );
add_filter( 'request', array($this,'change_requests'));
}
function wpleet_rewrite_add_var( $vars ) {
$vars[] = 'usuario';
return $vars;
}
function rw_init(){
add_rewrite_tag( '%usuario%', '([^&]+)' );
add_rewrite_rule(
'^usuario/([^/]*)/?',
'index.php?usuario=$matches[1]',
'top'
);
}
function change_requests($query_vars) {
//go to a specific page when the usuario key is set
$query_vars['page_id'] = isset($query_vars['usuario']) ? 7581 : $query_vars['page_id'];
return $query_vars;
}
}
new ProfilePage();
Spanish -> usuario = user <- English
A: There are two ways I've discovered doing this:
*
*Author Page with a custom rewrite rule
*A custom template files paired with a rewrite rule
The first is more simple to implement, but may not work in all circumstances (one of which I'll describe soon).
Custom Rewrite Rule
I found this solution a few days ago here: URL Rewriting
And here's the code, with comments:
// Define the author levels you want to use
$custom_author_levels = array( 'user', 'leader' );
// On init, add a new author_level rewrite tag and add it to the author_base property of wp_rewrite
add_action( 'init', 'wpleet_init' );
function wpleet_init()
{
global $wp_rewrite;
$author_levels = $GLOBALS['custom_author_levels'];
// Define the tag and use it in the rewrite rule
add_rewrite_tag( '%author_level%', '(' . implode( '|', $author_levels ) . ')' );
$wp_rewrite->author_base = '%author_level%';
}
// The previous function creates extra author_name rewrite rules that are unnecessary.
//This function tests for and removes them
add_filter( 'author_rewrite_rules', 'wpleet_author_rewrite_rules' );
function wpleet_author_rewrite_rules( $author_rewrite_rules )
{
foreach ( $author_rewrite_rules as $pattern => $substitution ) {
if ( FALSE === strpos( $substitution, 'author_name' ) ) {
unset( $author_rewrite_rules[$pattern] );
}
}
return $author_rewrite_rules;
}
You can then use the built in author.php template, modifying to your hearts content.
Sincerely, check the link listed above, as Jan Fabry does an excellent job explaining everything.
Query Vars and Page Templates
For the theme I was working on while discovering these solutions, I needed to serve a custom page based on a user meta value (a separate ID). My client did not want the username or user ID visible publicly, so we created a separate layer.
The only problem? At the moment, there isn't a clear way how to use the Rewrite API to query by meta keys/values. Luckily, there was a solution.
In your functions.php file...
// Create the query var so that WP catches your custom /user/username url
add_filter( 'query_vars', 'wpleet_rewrite_add_var' );
function wpleet_rewrite_add_var( $vars )
{
$vars[] = 'user';
return $vars;
}
And then, you need to create a new rewrite tag and rule so that it knows when and how to handle the new query var.
add_rewrite_tag( '%user%', '([^&]+)' );
add_rewrite_rule(
'^user/([^/]*)/?',
'index.php?user=$matches[1]',
'top'
);
Once you've done this, you merely need to "catch" when the query var is being served, and then redirect to the template of your choice:
add_action( 'template_redirect', 'wpleet_rewrite_catch' );
function wpleet_rewrite_catch()
{
global $wp_query;
if ( array_key_exists( 'user', $wp_query->query_vars ) ) {
include (TEMPLATEPATH . '/user-profile.php');
exit;
}
}
Just make sure you have created user-profile.php.
In my own example, I created a third function that matched the "public User ID" to the actual user_id via the $wpdb->usermeta table, and passed the information to the template.
If you need to create a template different from the rest of your theme, remember that with get_header, you can specify a name:
get_header( 'user' );
Which will call the header-user.php file.
Conclusion
Both of these are valid, working solutions. The second offers a separate layer of "security" as it does not reveal user IDs or usernames, if other people will be able to browse the profiles.
Hope that helps, let me know if you have any questions.
A: This is my working code based on @bybloggers answer (thanks by the way)
I just learn that we shouldn't be using template_redirect hook and then exiting php, because some things may stop working because the abrupt interruption of php executing code.
The explanation is here: https://markjaquith.wordpress.com/2014/02/19/template_redirect-is-not-for-loading-templates/
So, we should be using the template_include hook. With this hook, there is no need to use the redirect and exit method.
And the other difference is that I just needed www.server.com/myaccount without the /userid.
This is the code:
add_filter( 'query_vars', 'wp58683_userprofile_var' );
function wp58683_userprofile_var( $vars )
{
$vars[] = 'myprofile';
return $vars;
}
add_rewrite_tag( '%myprofile%', '([^&]+)' );
add_rewrite_rule(
'^myprofile/?',
'index.php?myprofile',
'top'
);
add_action( 'template_include', 'wp58683_userprofile_page' );
function wp58683_userprofile_page($original_template)
{
global $wp_query;
if ( array_key_exists( 'myprofile', $wp_query->query_vars ) ) {
if (is_user_logged_in() ){
return TEMPLATEPATH . '/user-profile.php';
}
}
else {
return $original_template;
}
}
A: Another way is to use Buddypress which have this built-in even if the plugin have even more functionality which may not be of interest.
http://wordpress.org/extend/plugins/buddypress/
|
wordpress
|
{
"language": "en",
"length": 892,
"provenance": "stackexchange_00019.jsonl.gz:421912",
"question_score": "24",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58683"
}
|
[
0.0309600830078125,
-0.037445068359375,
-0.004924774169921875,
-0.05511474609375,
-0.01496124267578125,
-0.00991058349609375,
-0.0071868896484375,
0.01085662841796875,
-0.03228759765625,
0.02215576171875,
0.02288818359375,
-0.0160980224609375,
0.020721435546875,
-0.047027587890625,
0.032989501953125,
-0.004344940185546875,
0.021209716796875,
0.00472259521484375,
0.02203369140625,
-0.0036983489990234375,
0.020660400390625,
-0.00962066650390625,
0.023773193359375,
-0.02215576171875,
0.0224456787109375,
-0.03485107421875,
0.03076171875,
-0.0208740234375,
0.0021495819091796875,
-0.0260467529296875,
0.01300048828125,
0.0221099853515625,
0.03375244140625,
0.0015106201171875,
-0.0140838623046875,
0.0188751220703125,
0.028045654296875,
-0.01041412353515625,
0.0084228515625,
0.0185699462890625,
0.0345458984375,
-0.0107879638671875,
-0.0489501953125,
0.03509521484375,
-0.0102386474609375,
-0.1114501953125,
0.08563232421875,
-0.05694580078125,
0.0030040740966796875,
0.03533935546875,
-0.01056671142578125,
-0.017486572265625,
-0.0221405029296875,
0.0196990966796875,
0.009063720703125,
0.016357421875,
0.013702392578125,
-0.050262451171875,
0.02581787109375,
0.022125244140625,
-0.01326751708984375,
-0.031280517578125,
0.0167388916015625,
-0.021942138671875,
-0.01873779296875,
-0.016387939453125,
-0.052642822265625,
0.0294036865234375,
-0.0268402099609375,
-0.031890869140625,
0.0179443359375,
-0.0265350341796875,
-0.01016998291015625,
-0.01366424560546875,
-0.040771484375,
-0.023773193359375,
0.00814056396484375,
-0.0241851806640625,
0.017059326171875,
-0.006206512451171875,
-0.039306640625,
0.0040283203125,
-0.034332275390625,
-0.0041046142578125,
0.00667572021484375,
0.0286712646484375,
-0.020599365234375,
-0.01404571533203125,
-0.03204345703125,
0.0169525146484375,
-0.01548004150390625,
-0.045684814453125,
-0.0302886962890625,
0.03778076171875,
0.0238494873046875,
-0.01271820068359375,
-0.00116729736328125,
0.0343017578125,
0.007472991943359375,
0.01125335693359375,
0.0171966552734375,
-0.050506591796875,
0.047607421875,
-0.040802001953125,
-0.0085601806640625,
0.067138671875,
0.034088134765625,
0.045654296875,
0.0224151611328125,
-0.019134521484375,
0.0122222900390625,
0.014678955078125,
-0.0289459228515625,
0.0287017822265625,
-0.05767822265625,
0.0198822021484375,
-0.03143310546875,
-0.050567626953125,
-0.033721923828125,
0.01268768310546875,
-0.0215911865234375,
-0.0015316009521484375,
0.032318115234375,
-0.008544921875,
0.0172271728515625,
0.00737762451171875,
0.0176544189453125,
-0.050750732421875,
-0.034515380859375,
0.0078125,
-0.0028400421142578125,
0.024383544921875,
0.03759765625,
0.039703369140625,
0.005611419677734375,
-0.017364501953125,
0.046356201171875,
-0.054595947265625,
-0.0309295654296875,
0.049163818359375,
-0.0120849609375,
-0.057159423828125,
-0.0216217041015625,
-0.0157928466796875,
-0.01308441162109375,
0.023651123046875,
0.017242431640625,
0.007152557373046875,
-0.005035400390625,
-0.048004150390625,
0.004611968994140625,
-0.044525146484375,
0.0215911865234375,
0.01293182373046875,
-0.01324462890625,
0.005832672119140625,
0.03741455078125,
-0.02203369140625,
-0.017578125,
-0.0196075439453125,
-0.0033931732177734375,
-0.007495880126953125,
0.006237030029296875,
-0.01380157470703125,
-0.0335693359375,
-0.01334381103515625,
0.0142059326171875,
-0.0014390945434570312,
0.02423095703125,
0.04644775390625,
0.04302978515625,
0.0147705078125,
0.00640106201171875,
0.017974853515625,
0.0076446533203125,
-0.0218963623046875,
-0.0104827880859375,
0.014373779296875,
0.0214385986328125,
0.0285797119140625,
0.019439697265625,
-0.0256500244140625,
0.035736083984375,
-0.0006356239318847656,
-0.052276611328125,
0.0460205078125,
-0.00023281574249267578,
0.07025146484375,
0.0090179443359375,
0.00899505615234375,
0.039215087890625,
0.005268096923828125,
-0.01514434814453125,
0.01654052734375,
-0.0079193115234375,
-0.039093017578125,
0.01238250732421875,
-0.0136566162109375,
-0.01910400390625,
0.037261962890625,
0.03045654296875,
0.004833221435546875,
0.027862548828125,
-0.0214691162109375,
-0.0555419921875,
0.022186279296875,
-0.0440673828125,
0.0298919677734375,
0.03509521484375,
0.00615692138671875,
0.004230499267578125,
-0.016876220703125,
-0.021331787109375,
-0.0021076202392578125,
-0.029388427734375,
0.0196533203125,
0.030517578125,
0.026763916015625,
0.0204925537109375,
0.005512237548828125,
0.0265655517578125,
-0.007389068603515625,
0.0240020751953125,
0.035980224609375,
0.0208740234375,
-0.01568603515625,
-0.007724761962890625,
-0.01480865478515625,
-0.021820068359375,
-0.00991058349609375,
-0.041778564453125,
0.04473876953125,
0.032073974609375,
0.035003662109375,
-0.02642822265625,
0.004169464111328125,
-0.0193634033203125,
-0.0013599395751953125,
-0.00968170166015625,
0.033050537109375,
0.02978515625,
0.03155517578125,
0.0005717277526855469,
-0.01453399658203125,
-0.00982666015625,
-0.039031982421875,
0.03594970703125,
-0.03619384765625,
-0.0155792236328125,
0.02191162109375,
0.00644683837890625,
0.019866943359375,
0.013519287109375,
-0.06903076171875,
-0.0002262592315673828,
0.0396728515625,
-0.0217132568359375,
-0.01715087890625,
0.00665283203125,
-0.00946807861328125,
-0.0030651092529296875,
-0.0233154296875,
-0.006046295166015625,
-0.0182952880859375,
0.0007982254028320312,
-0.0306549072265625,
0.016326904296875,
-0.00019490718841552734,
0.0187225341796875,
-0.031402587890625,
0.01021575927734375,
-0.029632568359375,
-0.0194244384765625,
0.00815582275390625,
0.037750244140625,
-0.0227203369140625,
-0.03369140625,
0.012481689453125,
0.0123443603515625,
-0.00441741943359375,
0.00548553466796875,
0.089111328125,
-0.038116455078125,
-0.0211181640625,
-0.0445556640625,
-0.017974853515625,
-0.0216217041015625,
0.005512237548828125,
0.053375244140625,
0.0232696533203125,
0.0367431640625,
0.00044655799865722656,
-0.0287628173828125,
0.04888916015625,
0.01910400390625,
-0.040435791015625,
0.032806396484375,
-0.0499267578125,
0.06256103515625,
-0.036834716796875,
0.0361328125,
0.07012939453125,
-0.016143798828125,
0.01189422607421875,
0.0219879150390625,
-0.00913238525390625,
0.001255035400390625,
0.0478515625,
0.036163330078125,
-0.0452880859375,
0.04998779296875,
0.0439453125,
0.0265960693359375,
0.005962371826171875,
0.019805908203125,
-0.0011987686157226562,
-0.001987457275390625,
0.028778076171875,
0.0095977783203125,
-0.003711700439453125,
0.01512908935546875,
-0.06402587890625,
-0.0081329345703125,
-0.0006384849548339844,
-0.037322998046875,
-0.0016937255859375,
0.0245513916015625,
0.0033283233642578125,
-0.0156097412109375,
-0.020233154296875,
-0.1038818359375,
-0.059539794921875,
-0.08050537109375,
-0.0005950927734375,
-0.029693603515625,
0.0057525634765625,
-0.0018911361694335938,
-0.0036773681640625,
-0.00453948974609375,
-0.0107574462890625,
0.0079498291015625,
0.0043792724609375,
0.003093719482421875,
-0.031890869140625,
-0.0198974609375,
-0.0210113525390625,
0.0149078369140625,
-0.00655364990234375,
0.058502197265625,
0.0196685791015625,
-0.0018796920776367188,
0.0214385986328125,
0.017242431640625,
-0.048065185546875,
-0.00945281982421875,
0.0022373199462890625,
-0.0100860595703125,
-0.00507354736328125,
0.01454925537109375,
-0.03582763671875,
-0.022216796875,
-0.00782012939453125,
-0.0303955078125,
-0.007274627685546875,
0.024505615234375,
-0.0084991455078125,
-0.0017337799072265625,
0.0177764892578125,
0.0108184814453125,
0.00013899803161621094,
0.0280914306640625,
-0.0107269287109375,
-0.01023101806640625,
-0.018096923828125,
0.001529693603515625,
-0.0201263427734375,
0.049072265625,
0.0040740966796875,
0.01036834716796875,
0.020904541015625,
0.0004286766052246094,
-0.00563812255859375,
0.00876617431640625,
-0.0195770263671875,
-0.06988525390625,
0.04364013671875,
-0.0640869140625,
0.005054473876953125,
-0.05389404296875,
-0.0019006729125976562,
-0.0122833251953125,
0.08197021484375,
-0.022216796875,
0.00252532958984375,
-0.0025348663330078125,
-0.0012378692626953125,
-0.050628662109375,
-0.038360595703125,
-0.060150146484375,
0.0160980224609375,
-0.069091796875,
0.00667572021484375,
0.01528167724609375,
-0.033843994140625,
-0.025909423828125,
-0.0069122314453125,
-0.0416259765625,
-0.033905029296875,
0.030517578125,
-0.00662994384765625,
-0.0008459091186523438,
0.0234527587890625,
-0.0020084381103515625,
0.0018625259399414062,
-0.029144287109375,
-0.0011615753173828125,
-0.06024169921875,
-0.01397705078125,
0.0257110595703125,
0.0249176025390625,
-0.004241943359375,
-0.050506591796875,
0.0012111663818359375,
0.05462646484375,
0.0169677734375,
-0.01198577880859375,
0.02880859375,
0.004058837890625,
0.0186004638671875,
0.0228729248046875,
0.0251617431640625,
-0.00966644287109375,
-0.0077667236328125,
0.009521484375,
-0.006744384765625,
0.051422119140625,
-0.00940704345703125,
0.00115203857421875,
0.0050506591796875,
-0.041412353515625,
-0.06842041015625,
-0.0304412841796875,
-0.01078033447265625,
0.0202789306640625,
0.008941650390625,
-0.0303802490234375,
-0.042816162109375,
-0.06744384765625,
0.019927978515625,
-0.0205841064453125,
-0.018890380859375,
0.01540374755859375,
0.080810546875,
0.0149078369140625,
-0.005901336669921875,
0.004718780517578125,
-0.0180206298828125,
0.033721923828125,
-0.0230865478515625,
0.01140594482421875,
0.0243988037109375,
-0.03179931640625,
0.05743408203125,
0.00156402587890625,
0.0005660057067871094,
-0.0011577606201171875,
-0.0117950439453125,
0.006412506103515625,
-0.03955078125,
0.01241302490234375,
0.01361083984375,
0.0049896240234375,
-0.00727081298828125,
-0.0201568603515625,
0.006595611572265625,
-0.0333251953125,
0.0109710693359375,
0.01471710205078125,
0.00606536865234375,
-0.004108428955078125,
-0.03729248046875,
0.002796173095703125,
-0.0229644775390625,
0.037872314453125,
-0.01105499267578125,
0.00954437255859375,
0.0024166107177734375,
0.0189971923828125,
-0.0017995834350585938,
0.053009033203125,
0.0029048919677734375,
0.01248931884765625,
0.03228759765625,
-0.005664825439453125,
-0.0135498046875,
0.018280029296875,
0.004001617431640625,
0.06304931640625,
0.016754150390625,
-0.019500732421875,
-0.0157318115234375,
-0.017181396484375,
-0.01459503173828125,
0.0078887939453125,
0.0263824462890625,
0.031585693359375,
-0.007965087890625,
0.0184173583984375,
-0.003917694091796875,
-0.0184173583984375,
-0.0095977783203125,
-0.031341552734375,
0.0592041015625,
0.005809783935546875,
0.0126953125,
-0.0062408447265625,
0.06732177734375,
-0.012969970703125,
0.0159759521484375,
-0.0014820098876953125,
0.038787841796875,
0.03375244140625,
-0.00856781005859375,
-0.004825592041015625,
0.07427978515625,
0.0020275115966796875,
-0.020538330078125,
0.0101318359375,
-0.01336669921875,
0.01302337646484375,
0.03277587890625,
0.05535888671875,
0.0072174072265625,
-0.006256103515625,
-0.0299224853515625,
-0.06719970703125,
-0.00983428955078125,
-0.00576019287109375,
0.01221466064453125,
0.0107879638671875,
-0.032470703125,
-0.039398193359375,
0.0139312744140625,
0.0169525146484375,
-0.002506256103515625,
-0.01082611083984375,
-0.029296875,
0.0208892822265625,
0.006481170654296875,
0.01470947265625,
-0.02105712890625,
-0.0198516845703125,
-0.01181793212890625,
-0.028839111328125,
0.0013685226440429688,
-0.035308837890625,
0.005405426025390625,
-0.0234222412109375,
-0.0204620361328125,
0.016571044921875,
-0.015045166015625,
0.037841796875,
-0.0293121337890625,
0.01206207275390625,
0.0152435302734375,
-0.014251708984375,
0.0455322265625,
-0.0019397735595703125,
-0.005413055419921875,
-0.0034618377685546875,
-0.04473876953125,
-0.0048675537109375,
0.03289794921875,
-0.025115966796875,
0.0027408599853515625,
-0.033477783203125,
0.0037593841552734375,
0.00960540771484375,
-0.001422882080078125,
0.0264129638671875,
-0.01690673828125,
0.04010009765625,
0.020660400390625,
0.0625,
-0.03973388671875,
0.0867919921875,
-0.04986572265625,
0.015380859375,
-0.035491943359375,
0.013519287109375,
-0.0028743743896484375,
0.0302276611328125,
-0.00667572021484375,
0.006717681884765625,
-0.0128326416015625,
-0.042144775390625,
0.01189422607421875,
0.032012939453125,
0.096923828125,
0.0017786026000976562,
0.005474090576171875,
0.036865234375,
0.0161895751953125,
-0.049560546875,
0.00345611572265625,
-0.006496429443359375,
0.034881591796875,
-0.0382080078125,
0.01201629638671875,
0.043975830078125,
0.0006575584411621094,
0.00736236572265625,
-0.027313232421875,
0.0024356842041015625,
0.0232696533203125,
-0.020050048828125,
-0.04986572265625,
0.0296630859375,
0.077392578125,
0.037628173828125,
0.037322998046875,
0.0139617919921875,
0.02825927734375,
0.023529052734375,
0.0014257431030273438,
-0.0010843276977539062,
0.034881591796875,
0.051239013671875,
-0.01068878173828125,
-0.009979248046875,
0.0183258056640625,
-0.032562255859375,
-0.001705169677734375,
0.07647705078125,
0.07220458984375,
-0.12359619140625,
0.0080413818359375,
0.03460693359375,
0.0263519287109375,
0.0099029541015625,
0.03460693359375,
-0.0175933837890625,
-0.059051513671875,
0.01284027099609375,
-0.07867431640625,
0.00722503662109375,
-0.01369476318359375,
-0.0283966064453125,
0.0017805099487304688,
-0.002521514892578125,
0.07281494140625,
-0.0020542144775390625,
-0.00777435302734375,
-0.044921875,
0.007068634033203125,
-0.013397216796875,
0.00005692243576049805,
0.007274627685546875,
0.005828857421875,
-0.0185394287109375,
-0.025054931640625,
0.0034389495849609375,
-0.039520263671875,
-0.01177215576171875,
0.0654296875,
0.01287078857421875,
0.0079345703125,
0.0080718994140625,
0.0100555419921875,
0.00009423494338989258,
-0.03143310546875,
0.0026111602783203125,
0.063232421875,
-0.0234375,
0.00653076171875,
-0.046600341796875,
-0.01214599609375,
-0.007808685302734375,
-0.0160064697265625,
-0.044342041015625,
-0.007282257080078125,
-0.016937255859375,
0.06964111328125,
-0.04400634765625,
-0.017242431640625,
0.003810882568359375,
0.034820556640625,
0.00412750244140625,
0.0251007080078125,
-0.054901123046875,
-0.05657958984375,
-0.06512451171875,
-0.01189422607421875,
-0.1070556640625,
0.0400390625,
-0.0010290145874023438,
-0.061798095703125,
0.052520751953125,
-0.04119873046875,
0.047119140625,
0.0274810791015625,
0.018341064453125,
-0.0050506591796875,
-0.00496673583984375,
-0.010833740234375,
0.0277252197265625,
0.00860595703125,
0.04034423828125,
-0.021697998046875,
-0.0126190185546875,
0.03082275390625,
0.06829833984375,
0.0482177734375,
0.026092529296875,
-0.03662109375,
-0.0307464599609375,
0.0062408447265625,
-0.015594482421875,
-0.031951904296875,
0.0589599609375,
-0.020751953125,
0.03594970703125,
0.031005859375,
-0.1065673828125,
-0.002925872802734375,
-0.034149169921875,
0.0009613037109375,
0.00435638427734375,
0.0171661376953125,
0.026031494140625,
0.0061798095703125,
0.0212860107421875,
-0.0567626953125,
0.00823211669921875,
0.052001953125,
-0.01032257080078125,
-0.00704193115234375,
0.0160064697265625,
-0.00075531005859375,
-0.00370025634765625,
-0.0029277801513671875,
-0.0364990234375,
0.031890869140625,
0.0037517547607421875,
0.00002014636993408203,
0.04150390625,
0.0235137939453125,
0.0278778076171875,
0.0122528076171875,
0.0034923553466796875,
0.033721923828125,
0.01287078857421875,
0.06939697265625,
0.0280914306640625,
0.0289459228515625,
-0.050445556640625,
-0.0081939697265625,
0.0194091796875,
0.083251953125,
-0.043121337890625,
-0.060943603515625,
0.000568389892578125,
0.0057525634765625,
0.0196990966796875,
0.0213165283203125,
0.036285400390625,
-0.00688934326171875,
0.04327392578125,
-0.0594482421875,
0.035064697265625,
0.03936767578125,
-0.021026611328125,
-0.020599365234375,
-0.005462646484375,
-0.01055145263671875,
0.0894775390625,
-0.030181884765625,
-0.006122589111328125,
0.0008063316345214844,
0.02130126953125,
0.0211181640625,
0.00513458251953125,
0.03485107421875,
-0.00012153387069702148,
-0.015411376953125,
0.01401519775390625,
0.021728515625,
-0.005062103271484375,
-0.0097808837890625,
-0.0007777214050292969,
-0.00960540771484375,
0.0280609130859375,
0.03607177734375,
-0.01532745361328125,
0.020660400390625,
0.0144500732421875,
-0.007457733154296875,
-0.00939178466796875,
-0.0016422271728515625,
-0.0218963623046875,
0.0408935546875,
-0.0214080810546875,
0.01522064208984375,
-0.037017822265625,
-0.0141448974609375,
-0.043609619140625,
0.047271728515625,
-0.02154541015625,
-0.005908966064453125,
0.018280029296875,
-0.00733184814453125,
-0.03778076171875,
0.0033550262451171875,
-0.019012451171875,
0.07122802734375,
0.0208587646484375,
-0.07623291015625,
-0.00839996337890625,
-0.0260162353515625,
-0.075439453125,
0.0176849365234375,
0.0465087890625,
-0.012237548828125,
-0.00433349609375,
0.0214080810546875,
0.0303192138671875,
0.002574920654296875,
-0.040618896484375,
0.01959228515625,
-0.0013723373413085938,
0.032379150390625,
0.0170745849609375,
-0.0489501953125,
-0.0159454345703125,
-0.0230865478515625,
0.0074310302734375,
0.023468017578125,
0.116943359375,
-0.031585693359375,
0.010345458984375,
-0.03363037109375,
0.024383544921875,
-0.0216064453125,
-0.0307464599609375,
0.04718017578125,
0.016632080078125,
-0.0064849853515625,
-0.002330780029296875,
-0.024139404296875,
0.0264434814453125,
0.0220184326171875,
-0.02130126953125,
0.004467010498046875,
0.0222320556640625,
0.0005483627319335938,
-0.0008602142333984375,
0.04168701171875,
-0.039215087890625,
-0.039154052734375,
-0.041961669921875,
-0.01788330078125,
0.01389312744140625,
-0.020111083984375,
-0.03131103515625,
0.058197021484375,
-0.003528594970703125,
-0.03448486328125,
0.031463623046875,
-0.080810546875,
0.0413818359375,
0.0355224609375,
0.0187835693359375,
0.033599853515625,
-0.006862640380859375,
-0.024078369140625,
-0.00440216064453125,
0.01277923583984375,
-0.0565185546875,
0.0012264251708984375,
-0.011810302734375,
0.0005888938903808594,
-0.00890350341796875,
0.0254364013671875,
-0.01100921630859375,
0.00580596923828125,
0.0015850067138671875,
-0.00505828857421875,
-0.008209228515625,
0.00354766845703125,
-0.0141448974609375,
0.00745391845703125,
-0.0167236328125,
0.00859832763671875,
0.0233154296875,
-0.0384521484375,
-0.042083740234375,
0.02850341796875,
0.0113983154296875,
0.008758544921875,
-0.06439208984375,
0.0253753662109375,
-0.0193939208984375,
0.0924072265625,
-0.048583984375,
0.00960540771484375,
0.0183258056640625,
0.03485107421875,
-0.04010009765625,
0.03228759765625,
-0.01102447509765625,
-0.0352783203125,
0.006206512451171875,
0.0021266937255859375,
0.047332763671875,
0.033233642578125,
-0.02984619140625,
-0.01806640625,
-0.06494140625,
0.045501708984375,
-0.121337890625,
-0.011383056640625,
-0.0018281936645507812,
0.01229095458984375,
-0.013946533203125,
-0.043182373046875,
-0.00760650634765625,
-0.0243682861328125,
0.0169219970703125,
0.01430511474609375,
-0.0360107421875,
-0.022857666015625,
-0.048095703125,
-0.06317138671875,
0.10528564453125,
0.00554656982421875,
-0.02227783203125,
-0.0210418701171875,
0.0011348724365234375,
-0.01318359375,
0.00988006591796875,
-0.00501251220703125,
-0.0232696533203125,
-0.01806640625,
0.0176239013671875,
0.0220794677734375,
0.046905517578125,
0.0258941650390625,
0.0206451416015625,
-0.01418304443359375,
0.012237548828125,
-0.0174560546875,
0.005283355712890625,
0.033782958984375,
-0.01084136962890625,
0.0672607421875,
0.0667724609375,
-0.003265380859375,
0.06597900390625,
-0.01374053955078125,
-0.06610107421875,
0.0030879974365234375,
-0.0015659332275390625,
-0.054656982421875,
-0.0494384765625,
0.059051513671875,
0.0213623046875,
0.017547607421875,
0.01403045654296875,
-0.0120697021484375,
-0.029571533203125,
-0.04766845703125,
-0.003345489501953125,
0.035308837890625,
-0.05889892578125,
-0.0018482208251953125,
0.01558685302734375,
-0.00489044189453125,
-0.0182647705078125,
-0.02313232421875,
-0.01739501953125,
-0.0026702880859375,
0.007068634033203125,
-0.01702880859375,
0.043548583984375,
0.0127105712890625,
0.06451416015625,
-0.0614013671875,
-0.064453125,
0.024017333984375,
0.0106964111328125,
-0.0139312744140625,
-0.042938232421875,
-0.01123809814453125,
0.0202484130859375,
-0.0193634033203125,
0.031951904296875,
0.017059326171875,
-0.0011568069458007812,
-0.050872802734375,
0.004058837890625,
-0.0211944580078125,
0.033111572265625,
0.006069183349609375,
0.046630859375,
-0.034759521484375,
0.0595703125,
0.0184326171875,
0.0310516357421875,
-0.04766845703125,
-0.024078369140625,
-0.0224609375,
0.009368896484375,
-0.01551055908203125,
0.0362548828125,
0.032958984375,
-0.004138946533203125,
-0.004512786865234375,
0.007843017578125,
-0.0272674560546875,
-0.0533447265625,
0.00881195068359375,
0.0092620849609375,
0.01641845703125,
0.01849365234375
] |
df2b88d8667012ebb91205556bd838925101f02d
|
Wordpress Stackexchange
Q: Put a wp_nav_menu inside another one I've got two wp_nav_menu's defined - main and sub. The backend menu editor lets me add pages or categories or custom links to my menu, and I can place them under existing pages/categories/links.
However, I want to add my sub pages to the sub menu, and then be able to add that sub menu as a whole item to my main menu.
That way, if I change up what's in my sub menu, I don't also have to go change my main menu too, see what I mean. Nice and DRY. Useful if I have my submenu in multiple places (like as a drop down from the main menu, plus on a detail page in the sidebar.)
Is this possible? Is there a plug in or custom function? Thanks.
A: You could perhaps accomplish this via a custom walker, but I suggest you try a single menu containing submenus and display the submenus in other contexts by outputting just that branch of the main menu. see Display a portion/ branch of the menu tree using wp_nav_menu(), specifically this answer.
|
Q: Put a wp_nav_menu inside another one I've got two wp_nav_menu's defined - main and sub. The backend menu editor lets me add pages or categories or custom links to my menu, and I can place them under existing pages/categories/links.
However, I want to add my sub pages to the sub menu, and then be able to add that sub menu as a whole item to my main menu.
That way, if I change up what's in my sub menu, I don't also have to go change my main menu too, see what I mean. Nice and DRY. Useful if I have my submenu in multiple places (like as a drop down from the main menu, plus on a detail page in the sidebar.)
Is this possible? Is there a plug in or custom function? Thanks.
A: You could perhaps accomplish this via a custom walker, but I suggest you try a single menu containing submenus and display the submenus in other contexts by outputting just that branch of the main menu. see Display a portion/ branch of the menu tree using wp_nav_menu(), specifically this answer.
|
wordpress
|
{
"language": "en",
"length": 186,
"provenance": "stackexchange_00019.jsonl.gz:421914",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58694"
}
|
[
0.056610107421875,
-0.00899505615234375,
0.03057861328125,
0.0028667449951171875,
0.015777587890625,
-0.0322265625,
0.065673828125,
-0.0648193359375,
-0.037994384765625,
-0.007396697998046875,
-0.035614013671875,
0.0228729248046875,
-0.0596923828125,
-0.0170135498046875,
0.0212249755859375,
-0.06695556640625,
0.041046142578125,
-0.0181732177734375,
0.0274810791015625,
-0.01004791259765625,
0.0020389556884765625,
0.0076751708984375,
0.03564453125,
0.033477783203125,
0.040069580078125,
-0.035247802734375,
-0.006061553955078125,
0.0114593505859375,
-0.0026340484619140625,
-0.006305694580078125,
0.0267791748046875,
0.0082855224609375,
0.015167236328125,
-0.0296630859375,
0.05133056640625,
0.031982421875,
-0.0014181137084960938,
-0.00366973876953125,
0.0312042236328125,
-0.0166778564453125,
0.007598876953125,
0.01015472412109375,
0.04742431640625,
0.0225830078125,
0.002285003662109375,
-0.0694580078125,
0.036834716796875,
-0.03472900390625,
0.0217132568359375,
-0.08203125,
0.037384033203125,
0.01556396484375,
0.0504150390625,
-0.027191162109375,
-0.045013427734375,
-0.01068115234375,
0.0231781005859375,
-0.0224151611328125,
0.034637451171875,
0.01155853271484375,
-0.035491943359375,
-0.00980377197265625,
0.01490020751953125,
-0.057647705078125,
0.021575927734375,
-0.00638580322265625,
0.0169830322265625,
0.0052032470703125,
-0.030426025390625,
0.041656494140625,
0.0499267578125,
-0.0266265869140625,
0.0006012916564941406,
-0.0070648193359375,
-0.01013946533203125,
-0.01690673828125,
0.029205322265625,
-0.006984710693359375,
0.006786346435546875,
0.019012451171875,
-0.02508544921875,
0.0311737060546875,
-0.04364013671875,
-0.04608154296875,
0.03582763671875,
0.00780487060546875,
-0.03302001953125,
-0.01342010498046875,
-0.00760650634765625,
0.005298614501953125,
-0.020751953125,
-0.0100555419921875,
-0.00778961181640625,
0.0499267578125,
-0.0186309814453125,
0.01049041748046875,
0.01206207275390625,
0.08514404296875,
-0.01229095458984375,
0.068115234375,
0.0010576248168945312,
-0.0482177734375,
0.1002197265625,
-0.0965576171875,
0.0237274169921875,
0.03826904296875,
-0.0158843994140625,
-0.006580352783203125,
0.06781005859375,
0.031402587890625,
0.015777587890625,
0.060760498046875,
0.0060882568359375,
-0.060211181640625,
-0.0037174224853515625,
0.02423095703125,
0.00971221923828125,
0.017333984375,
0.033447265625,
-0.025787353515625,
-0.003925323486328125,
0.024322509765625,
-0.0213623046875,
0.00969696044921875,
-0.0098876953125,
0.0011835098266601562,
0.011932373046875,
-0.03631591796875,
-0.0147857666015625,
0.017852783203125,
-0.034423828125,
0.005176544189453125,
0.0751953125,
0.0433349609375,
0.0097503662109375,
-0.0220947265625,
-0.0022945404052734375,
0.0223236083984375,
0.0164031982421875,
-0.00951385498046875,
0.024322509765625,
-0.008758544921875,
0.0028839111328125,
-0.0006337165832519531,
0.0012359619140625,
-0.003086090087890625,
0.0110626220703125,
0.034942626953125,
0.003253936767578125,
-0.03729248046875,
0.0538330078125,
-0.0345458984375,
0.0261077880859375,
-0.0168914794921875,
-0.00963592529296875,
-0.028839111328125,
-0.0233154296875,
-0.01678466796875,
0.01377105712890625,
-0.01490020751953125,
-0.07025146484375,
0.0079345703125,
0.057861328125,
-0.09649658203125,
-0.061981201171875,
-0.0124664306640625,
-0.038970947265625,
-0.007518768310546875,
0.020538330078125,
-0.0052947998046875,
0.023284912109375,
-0.034210205078125,
-0.03411865234375,
-0.003986358642578125,
0.0015707015991210938,
0.016632080078125,
0.0333251953125,
0.009307861328125,
-0.01898193359375,
0.09454345703125,
0.0163726806640625,
-0.03753662109375,
0.026123046875,
-0.0230560302734375,
-0.0489501953125,
0.0340576171875,
-0.0166015625,
0.06964111328125,
0.044921875,
0.0290374755859375,
-0.01409912109375,
-0.00907135009765625,
-0.020751953125,
0.0004074573516845703,
-0.016326904296875,
-0.02777099609375,
0.0292205810546875,
0.018280029296875,
-0.00905609130859375,
-0.0015535354614257812,
-0.0540771484375,
0.02081298828125,
-0.016265869140625,
0.03717041015625,
-0.046905517578125,
0.024658203125,
-0.026824951171875,
0.0377197265625,
0.0209503173828125,
-0.005275726318359375,
-0.006580352783203125,
-0.01451873779296875,
0.049957275390625,
-0.1165771484375,
-0.056732177734375,
0.045806884765625,
0.0036106109619140625,
-0.003665924072265625,
-0.0091552734375,
-0.0006351470947265625,
-0.006259918212890625,
0.0175323486328125,
-0.0158538818359375,
0.0275115966796875,
0.047088623046875,
-0.03125,
-0.018402099609375,
-0.02996826171875,
-0.006977081298828125,
0.03179931640625,
-0.10845947265625,
0.0165863037109375,
0.08721923828125,
0.039794921875,
-0.03143310546875,
0.0142669677734375,
0.022705078125,
-0.03790283203125,
-0.025787353515625,
0.036865234375,
0.03533935546875,
0.0296783447265625,
0.00847625732421875,
0.00827789306640625,
0.032684326171875,
-0.03277587890625,
0.01605224609375,
-0.01439666748046875,
-0.03204345703125,
-0.0100860595703125,
0.05419921875,
0.0032634735107421875,
0.0243682861328125,
-0.006927490234375,
0.006793975830078125,
0.0282135009765625,
-0.00678253173828125,
-0.01788330078125,
0.030029296875,
-0.0036468505859375,
0.0151214599609375,
0.0269317626953125,
-0.0151519775390625,
0.0167083740234375,
0.01397705078125,
-0.013916015625,
0.028533935546875,
0.009613037109375,
0.00678253173828125,
-0.04144287109375,
0.011749267578125,
0.0134429931640625,
0.009368896484375,
0.005672454833984375,
0.01210784912109375,
-0.0181732177734375,
-0.0221405029296875,
-0.00811004638671875,
0.0302886962890625,
-0.00762176513671875,
-0.0272216796875,
0.0325927734375,
0.0184783935546875,
-0.0202178955078125,
-0.0227508544921875,
-0.06488037109375,
0.0194244384765625,
-0.0145263671875,
-0.010894775390625,
-0.00519561767578125,
0.014556884765625,
0.0013742446899414062,
-0.03375244140625,
0.0341796875,
-0.0118560791015625,
-0.0170135498046875,
0.0833740234375,
0.01001739501953125,
0.00145721435546875,
0.0155487060546875,
0.035888671875,
0.0379638671875,
0.02557373046875,
-0.02984619140625,
0.0015745162963867188,
-0.003040313720703125,
-0.015045166015625,
0.033721923828125,
0.0199432373046875,
-0.007213592529296875,
-0.0298004150390625,
0.042755126953125,
0.011566162109375,
-0.0225982666015625,
0.02069091796875,
-0.0272216796875,
-0.0027179718017578125,
0.0023593902587890625,
-0.031707763671875,
-0.00859832763671875,
0.0194091796875,
-0.02740478515625,
0.0199737548828125,
0.03924560546875,
-0.019073486328125,
-0.03448486328125,
0.078125,
0.01082611083984375,
-0.0269317626953125,
-0.041748046875,
-0.022003173828125,
-0.046478271484375,
-0.056854248046875,
0.0233306884765625,
0.00812530517578125,
0.015899658203125,
-0.001129150390625,
0.0504150390625,
0.00010865926742553711,
-0.041412353515625,
0.01476287841796875,
0.0171966552734375,
-0.0168304443359375,
0.004482269287109375,
0.03277587890625,
-0.042205810546875,
0.005619049072265625,
-0.0025310516357421875,
0.005336761474609375,
0.0272064208984375,
-0.01374053955078125,
-0.0074920654296875,
-0.02703857421875,
0.00719451904296875,
0.0222320556640625,
-0.046142578125,
0.0191650390625,
0.07086181640625,
0.025848388671875,
0.003292083740234375,
-0.0103912353515625,
-0.037872314453125,
-0.0511474609375,
-0.019561767578125,
0.020538330078125,
0.006969451904296875,
-0.03155517578125,
-0.0020389556884765625,
0.0084686279296875,
-0.00307464599609375,
0.0265350341796875,
0.007152557373046875,
-0.00696563720703125,
-0.029571533203125,
-0.03277587890625,
-0.046539306640625,
0.0207672119140625,
-0.0157623291015625,
-0.00452423095703125,
0.00548553466796875,
0.0178375244140625,
-0.007236480712890625,
0.02313232421875,
-0.018096923828125,
-0.0445556640625,
0.037689208984375,
-0.0290679931640625,
0.03228759765625,
-0.045745849609375,
-0.027740478515625,
-0.01180267333984375,
0.09674072265625,
-0.07147216796875,
-0.0209503173828125,
0.00545501708984375,
0.0175323486328125,
0.00820159912109375,
-0.04473876953125,
-0.03466796875,
-0.040374755859375,
-0.035675048828125,
0.01224517822265625,
-0.01922607421875,
-0.0037708282470703125,
-0.03125,
0.0382080078125,
-0.0236663818359375,
-0.03350830078125,
0.038177490234375,
-0.05029296875,
-0.00466156005859375,
0.01526641845703125,
-0.0229644775390625,
-0.0163116455078125,
-0.036590576171875,
-0.0255279541015625,
-0.059478759765625,
-0.00786590576171875,
-0.022003173828125,
0.03778076171875,
0.006237030029296875,
-0.001964569091796875,
-0.01248931884765625,
0.02264404296875,
0.01520538330078125,
0.00518798828125,
0.0226898193359375,
0.003810882568359375,
0.02081298828125,
-0.004730224609375,
0.01507568359375,
-0.0257110595703125,
-0.0004987716674804688,
-0.01322174072265625,
-0.0067901611328125,
0.0225067138671875,
-0.0278472900390625,
0.0095367431640625,
-0.0007171630859375,
-0.0186309814453125,
-0.0384521484375,
-0.039825439453125,
-0.036895751953125,
-0.01058197021484375,
-0.01837158203125,
-0.01480865478515625,
-0.016510009765625,
-0.036651611328125,
-0.015960693359375,
0.001789093017578125,
-0.027923583984375,
0.0247650146484375,
0.01125335693359375,
0.0292205810546875,
-0.017791748046875,
-0.027130126953125,
0.002044677734375,
0.01036834716796875,
-0.0169525146484375,
0.0491943359375,
-0.0087890625,
0.0249176025390625,
0.01346588134765625,
-0.0411376953125,
0.030975341796875,
-0.0180206298828125,
0.0258941650390625,
0.017669677734375,
-0.00859832763671875,
0.01459503173828125,
0.016387939453125,
-0.031402587890625,
0.0162811279296875,
-0.0269317626953125,
-0.022186279296875,
-0.042755126953125,
0.0550537109375,
-0.004039764404296875,
0.035125732421875,
-0.0467529296875,
-0.01232147216796875,
-0.007904052734375,
-0.007965087890625,
0.10015869140625,
0.038116455078125,
-0.007617950439453125,
0.042236328125,
0.050567626953125,
-0.0066986083984375,
0.015625,
-0.003971099853515625,
-0.0032100677490234375,
0.038116455078125,
-0.02520751953125,
-0.01462554931640625,
0.0194091796875,
-0.005039215087890625,
0.06414794921875,
0.03399658203125,
-0.0006113052368164062,
-0.04974365234375,
-0.00823211669921875,
0.0011053085327148438,
-0.0195770263671875,
-0.0101318359375,
0.0144805908203125,
-0.00733184814453125,
-0.00711822509765625,
0.0196380615234375,
-0.0164642333984375,
-0.047943115234375,
-0.0208282470703125,
-0.0186767578125,
-0.006870269775390625,
-0.01360321044921875,
-0.003437042236328125,
0.06292724609375,
-0.00130462646484375,
0.021148681640625,
-0.0149078369140625,
-0.01401519775390625,
-0.0019626617431640625,
0.0162353515625,
0.01580810546875,
0.04278564453125,
-0.01947021484375,
0.0079498291015625,
0.036285400390625,
0.0026988983154296875,
-0.0015401840209960938,
0.0172271728515625,
0.005878448486328125,
0.016845703125,
0.005977630615234375,
0.0015048980712890625,
0.005214691162109375,
0.00556182861328125,
0.0292510986328125,
-0.053924560546875,
-0.061309814453125,
-0.037139892578125,
0.01236724853515625,
0.052093505859375,
-0.041473388671875,
-0.0055694580078125,
0.007068634033203125,
0.004291534423828125,
0.01000213623046875,
-0.0146484375,
-0.0188751220703125,
-0.0007805824279785156,
0.005313873291015625,
-0.05615234375,
-0.01145172119140625,
0.040374755859375,
-0.09979248046875,
-0.024261474609375,
-0.0251617431640625,
-0.0251312255859375,
0.038787841796875,
-0.0313720703125,
-0.01439666748046875,
-0.0086669921875,
0.026092529296875,
-0.02740478515625,
0.006175994873046875,
0.05908203125,
0.02691650390625,
-0.042022705078125,
0.0128631591796875,
-0.0114288330078125,
-0.00229644775390625,
0.0123443603515625,
-0.04669189453125,
-0.0538330078125,
-0.04644775390625,
-0.004364013671875,
0.018646240234375,
-0.019134521484375,
-0.02899169921875,
-0.0186920166015625,
0.01104736328125,
0.01165771484375,
-0.0166473388671875,
-0.0040740966796875,
0.0723876953125,
-0.0338134765625,
0.048614501953125,
-0.003780364990234375,
0.025177001953125,
-0.0253143310546875,
-0.005039215087890625,
0.0153045654296875,
-0.03985595703125,
-0.0156707763671875,
-0.047637939453125,
0.020599365234375,
0.052093505859375,
0.055694580078125,
0.005664825439453125,
0.036651611328125,
-0.031982421875,
-0.0011339187622070312,
-0.01434326171875,
0.0189666748046875,
-0.02899169921875,
0.0033054351806640625,
0.06707763671875,
-0.0291290283203125,
0.00449371337890625,
-0.00445556640625,
-0.006008148193359375,
0.0171356201171875,
-0.01399993896484375,
0.0236358642578125,
0.006511688232421875,
-0.046295166015625,
0.040863037109375,
0.07537841796875,
0.035736083984375,
0.05181884765625,
0.00860595703125,
0.0265045166015625,
-0.00579833984375,
0.004364013671875,
-0.00734710693359375,
0.040008544921875,
0.035064697265625,
-0.01129150390625,
-0.01226806640625,
0.00677490234375,
-0.028472900390625,
-0.014984130859375,
0.061859130859375,
0.039886474609375,
-0.08282470703125,
0.00975799560546875,
0.0036945343017578125,
0.007564544677734375,
0.01480865478515625,
0.01302337646484375,
-0.01125335693359375,
-0.0006399154663085938,
0.012847900390625,
-0.01306915283203125,
-0.01079559326171875,
0.01206207275390625,
0.0202789306640625,
-0.013671875,
-0.021820068359375,
0.00948333740234375,
0.02593994140625,
0.028900146484375,
-0.016021728515625,
-0.02752685546875,
0.01318359375,
-0.0272979736328125,
0.018463134765625,
-0.01203155517578125,
-0.001590728759765625,
-0.0107574462890625,
0.06268310546875,
-0.0174102783203125,
0.0298614501953125,
0.04302978515625,
-0.00873565673828125,
0.0227813720703125,
0.04241943359375,
-0.0248260498046875,
0.038116455078125,
0.0096282958984375,
0.002964019775390625,
0.032073974609375,
-0.007022857666015625,
0.01470947265625,
-0.031341552734375,
-0.0672607421875,
-0.007457733154296875,
-0.0621337890625,
0.0135498046875,
-0.0158538818359375,
0.008941650390625,
0.1064453125,
-0.026519775390625,
-0.02001953125,
0.0180206298828125,
0.009033203125,
-0.0026988983154296875,
0.011627197265625,
0.0631103515625,
-0.03875732421875,
-0.026458740234375,
0.031494140625,
-0.01090240478515625,
-0.0293121337890625,
-0.00290679931640625,
-0.034820556640625,
0.1043701171875,
-0.05682373046875,
0.01084136962890625,
0.0330810546875,
0.04766845703125,
-0.019927978515625,
0.0295257568359375,
-0.0211029052734375,
0.044830322265625,
-0.0034122467041015625,
0.0233917236328125,
-0.04144287109375,
-0.017913818359375,
0.004230499267578125,
0.04876708984375,
-0.033233642578125,
-0.005046844482421875,
-0.006134033203125,
0.0338134765625,
0.057373046875,
0.01097869873046875,
0.01418304443359375,
0.0246429443359375,
-0.016571044921875,
-0.040924072265625,
0.01065826416015625,
0.0191497802734375,
0.038299560546875,
-0.01541900634765625,
-0.030975341796875,
-0.030975341796875,
0.00952911376953125,
0.0251007080078125,
-0.01410675048828125,
0.028961181640625,
0.0086212158203125,
-0.01534271240234375,
-0.01392364501953125,
0.0032405853271484375,
0.0166015625,
-0.0011014938354492188,
-0.03460693359375,
0.018585205078125,
0.01213836669921875,
-0.0144500732421875,
0.01161956787109375,
-0.016815185546875,
0.01061248779296875,
-0.005428314208984375,
0.00478363037109375,
0.037689208984375,
0.01325225830078125,
0.0004940032958984375,
0.05029296875,
-0.021453857421875,
0.03704833984375,
0.015869140625,
0.047393798828125,
-0.040863037109375,
-0.048858642578125,
0.04156494140625,
0.07098388671875,
-0.01154327392578125,
-0.049102783203125,
0.005519866943359375,
0.01248931884765625,
0.0012655258178710938,
-0.00603485107421875,
0.00616455078125,
0.01446533203125,
0.05950927734375,
0.0181427001953125,
-0.0103912353515625,
0.0030155181884765625,
0.0189208984375,
0.0134124755859375,
0.029144287109375,
-0.017669677734375,
0.005626678466796875,
-0.07012939453125,
0.048370361328125,
0.01132965087890625,
0.05499267578125,
0.00933074951171875,
0.0628662109375,
0.0217437744140625,
-0.02117919921875,
0.0009899139404296875,
0.04730224609375,
-0.0103607177734375,
-0.005535125732421875,
-0.02105712890625,
-0.0770263671875,
0.0260009765625,
0.01806640625,
-0.0018224716186523438,
0.041656494140625,
0.047149658203125,
0.031890869140625,
-0.0306396484375,
-0.0158233642578125,
0.05010986328125,
-0.031768798828125,
-0.02276611328125,
-0.017730712890625,
-0.006008148193359375,
0.032257080078125,
0.0023517608642578125,
-0.015594482421875,
0.0078125,
0.049652099609375,
0.01313018798828125,
-0.021575927734375,
0.0082244873046875,
-0.0245819091796875,
0.01184844970703125,
-0.0154266357421875,
0.0096893310546875,
0.0288543701171875,
-0.092041015625,
-0.01849365234375,
-0.050933837890625,
-0.0137481689453125,
0.039337158203125,
0.04327392578125,
-0.004161834716796875,
0.01605224609375,
0.058685302734375,
-0.0154876708984375,
-0.0196533203125,
0.0126953125,
0.0265045166015625,
0.0140838623046875,
0.0254364013671875,
0.0301055908203125,
-0.0927734375,
-0.04150390625,
-0.03228759765625,
0.0176849365234375,
0.028717041015625,
-0.0064544677734375,
0.0401611328125,
0.0294189453125,
-0.01580810546875,
0.005413055419921875,
-0.0228424072265625,
-0.02532958984375,
0.0180816650390625,
0.0031299591064453125,
-0.005603790283203125,
-0.00604248046875,
-0.0261993408203125,
0.00238800048828125,
0.05615234375,
-0.05224609375,
-0.0016384124755859375,
-0.0037784576416015625,
0.01062774658203125,
-0.051300048828125,
0.020294189453125,
-0.01052093505859375,
0.01544952392578125,
-0.0003032684326171875,
-0.035186767578125,
0.047119140625,
0.0352783203125,
0.006938934326171875,
0.0033245086669921875,
-0.01290130615234375,
-0.040802001953125,
0.01031494140625,
-0.0227203369140625,
0.01605224609375,
0.0256500244140625,
0.003787994384765625,
-0.050048828125,
0.01148223876953125,
-0.0030155181884765625,
-0.01500701904296875,
0.034820556640625,
0.00829315185546875,
0.040618896484375,
-0.04364013671875,
0.046630859375,
0.038238525390625,
0.059600830078125,
-0.0201416015625,
0.02191162109375,
0.0184173583984375,
0.00917816162109375,
0.015899658203125,
-0.028167724609375,
-0.04217529296875,
-0.06280517578125,
0.0001380443572998047,
0.024932861328125,
-0.03125,
-0.0199127197265625,
-0.08917236328125,
0.0035686492919921875,
0.06591796875,
0.01934814453125,
-0.064453125,
0.0129241943359375,
-0.003814697265625,
0.0809326171875,
0.019439697265625,
-0.042144775390625,
0.00472259521484375,
-0.0014133453369140625,
-0.0252838134765625,
-0.0013475418090820312,
-0.034393310546875,
-0.0010728836059570312,
-0.0191650390625,
0.0143890380859375,
0.0292205810546875,
-0.030059814453125,
0.01499176025390625,
0.0141143798828125,
0.0264892578125,
0.06329345703125,
0.02838134765625,
-0.036285400390625,
-0.03863525390625,
0.005329132080078125,
0.022613525390625,
0.01458740234375,
0.01122283935546875,
-0.013885498046875,
-0.0367431640625,
0.0038738250732421875,
0.031341552734375,
0.05804443359375,
-0.024139404296875,
-0.064697265625,
0.0389404296875,
-0.0041351318359375,
-0.0289764404296875,
-0.0275421142578125,
0.01120758056640625,
-0.032196044921875,
0.035125732421875,
0.00312042236328125,
-0.027923583984375,
0.029510498046875,
0.040374755859375,
0.0265045166015625,
0.07122802734375,
-0.0009899139404296875,
0.0091552734375,
-0.0027904510498046875,
0.037017822265625,
0.0190277099609375,
0.037567138671875,
0.01751708984375,
-0.0149688720703125,
0.014617919921875,
0.0281982421875,
-0.057830810546875,
-0.0289306640625,
-0.0173797607421875,
0.00562286376953125,
0.0177154541015625,
-0.0191192626953125,
-0.021240234375,
-0.01763916015625,
0.04266357421875,
-0.00634002685546875,
0.0175323486328125,
-0.01255035400390625,
-0.02783203125,
-0.0399169921875,
0.0203399658203125,
-0.0006442070007324219,
-0.0150299072265625,
-0.033355712890625,
0.01428985595703125,
-0.0003254413604736328,
-0.03350830078125,
-0.0223846435546875,
0.01561737060546875,
-0.051025390625,
0.014678955078125,
0.0292816162109375,
0.00327301025390625,
-0.045989990234375,
-0.0012054443359375,
0.043548583984375,
-0.047607421875,
-0.0304412841796875,
0.01165008544921875,
0.01114654541015625,
-0.01419830322265625,
-0.002201080322265625,
0.00003159046173095703,
-0.007701873779296875,
-0.0677490234375,
-0.0002753734588623047,
-0.036834716796875,
0.039764404296875,
-0.06036376953125,
-0.00952911376953125,
-0.033172607421875,
0.0218048095703125,
0.0026035308837890625,
0.024871826171875,
-0.0024852752685546875,
0.04010009765625,
0.032440185546875,
0.037078857421875,
0.007663726806640625,
0.033538818359375,
-0.020111083984375,
0.060577392578125,
0.0007176399230957031,
-0.0330810546875,
0.01058197021484375,
-0.0120086669921875,
-0.01222991943359375,
0.00963592529296875,
-0.0304107666015625,
-0.054595947265625,
0.001621246337890625,
0.047454833984375,
0.00984954833984375,
0.0198211669921875
] |
35b1c2be490632afc957da8552b576eeb1c3e1e6
|
Wordpress Stackexchange
Q: Way to check if we are in Theme Customizer mode?
Possible Duplicate:
How to execute conditional script when on new customize.php (Theme Customize) screen
Is there a Conditional Tag, or any other method, that we can use to check if we are customizing the theme?
I want to include some extra stylesheet while customizing the theme.
so I'd like to have sth like:
if ( theme-customizer-is-active ) {
// load some extra styles
}
A: As in this question: How to execute conditional script when on new customize.php (Theme Customize) screen
global $wp_customize;
if ( isset( $wp_customize ) ) {
// do stuff
}
|
Q: Way to check if we are in Theme Customizer mode?
Possible Duplicate:
How to execute conditional script when on new customize.php (Theme Customize) screen
Is there a Conditional Tag, or any other method, that we can use to check if we are customizing the theme?
I want to include some extra stylesheet while customizing the theme.
so I'd like to have sth like:
if ( theme-customizer-is-active ) {
// load some extra styles
}
A: As in this question: How to execute conditional script when on new customize.php (Theme Customize) screen
global $wp_customize;
if ( isset( $wp_customize ) ) {
// do stuff
}
|
wordpress
|
{
"language": "en",
"length": 105,
"provenance": "stackexchange_00019.jsonl.gz:421926",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58731"
}
|
[
-0.000263214111328125,
0.0244598388671875,
-0.004817962646484375,
-0.0650634765625,
0.01558685302734375,
0.0236968994140625,
-0.0308685302734375,
-0.0259552001953125,
-0.05767822265625,
-0.0182342529296875,
-0.01123046875,
0.03839111328125,
-0.0689697265625,
-0.033721923828125,
0.049285888671875,
-0.061981201171875,
0.042510986328125,
-0.0214385986328125,
0.0191497802734375,
-0.00960540771484375,
-0.0254058837890625,
0.02703857421875,
0.0241241455078125,
0.07635498046875,
0.0119781494140625,
-0.03643798828125,
0.06298828125,
-0.0006470680236816406,
0.01390838623046875,
-0.006011962890625,
0.0275115966796875,
-0.0259246826171875,
0.0101165771484375,
0.04412841796875,
0.0119171142578125,
0.06195068359375,
-0.0035552978515625,
0.030303955078125,
0.03985595703125,
0.0209808349609375,
0.039215087890625,
-0.0204925537109375,
-0.0228424072265625,
0.0267791748046875,
-0.01194000244140625,
-0.05035400390625,
0.048828125,
-0.035888671875,
0.00905609130859375,
0.02862548828125,
0.00897216796875,
0.0020351409912109375,
0.01064300537109375,
-0.0474853515625,
-0.005054473876953125,
-0.0191497802734375,
-0.0251922607421875,
0.0155029296875,
0.0238189697265625,
0.0213165283203125,
-0.0200653076171875,
-0.01446533203125,
0.01297760009765625,
-0.0222930908203125,
0.016387939453125,
0.0005903244018554688,
-0.0251312255859375,
0.038543701171875,
-0.0418701171875,
-0.0146484375,
0.0168914794921875,
-0.04400634765625,
0.0087890625,
-0.00527191162109375,
-0.023284912109375,
-0.025634765625,
-0.0015392303466796875,
-0.0325927734375,
0.03289794921875,
-0.002162933349609375,
0.0222930908203125,
0.00818634033203125,
0.03607177734375,
-0.044830322265625,
0.033416748046875,
-0.0201873779296875,
-0.0087890625,
-0.01019287109375,
0.0012292861938476562,
-0.0271148681640625,
-0.017913818359375,
-0.0009503364562988281,
-0.00882720947265625,
0.0146636962890625,
-0.022796630859375,
-0.00893402099609375,
0.034881591796875,
0.07061767578125,
-0.007427215576171875,
0.0269622802734375,
-0.03643798828125,
-0.034912109375,
0.028045654296875,
-0.045684814453125,
-0.0015249252319335938,
0.045989990234375,
0.031463623046875,
0.00732421875,
0.0182952880859375,
-0.006134033203125,
-0.00635528564453125,
0.01544952392578125,
0.00225067138671875,
0.024932861328125,
-0.038787841796875,
-0.029754638671875,
-0.040435791015625,
0.0006418228149414062,
-0.0285491943359375,
-0.0008087158203125,
0.0015687942504882812,
0.0202484130859375,
0.052825927734375,
-0.061309814453125,
-0.01317596435546875,
-0.02252197265625,
-0.04241943359375,
-0.0550537109375,
-0.0165557861328125,
0.0231781005859375,
-0.0128326416015625,
0.016357421875,
0.0150299072265625,
0.0302581787109375,
-0.006313323974609375,
-0.01285552978515625,
0.0228118896484375,
0.048065185546875,
0.01271820068359375,
0.004421234130859375,
0.01097869873046875,
-0.039031982421875,
-0.0176544189453125,
-0.004840850830078125,
0.01137542724609375,
0.024749755859375,
0.036529541015625,
0.00750732421875,
-0.0229339599609375,
-0.09832763671875,
0.07598876953125,
-0.0169525146484375,
0.0004115104675292969,
0.032745361328125,
0.0229644775390625,
0.01242828369140625,
0.02056884765625,
-0.00795745849609375,
0.007251739501953125,
-0.0008549690246582031,
-0.018096923828125,
-0.0142669677734375,
-0.018524169921875,
-0.01904296875,
-0.004802703857421875,
0.004306793212890625,
0.01047515869140625,
0.0221710205078125,
0.0237274169921875,
-0.000003159046173095703,
-0.01904296875,
0.005413055419921875,
0.05682373046875,
0.020172119140625,
-0.004871368408203125,
0.029571533203125,
-0.005687713623046875,
0.00513458251953125,
0.0272674560546875,
0.0218353271484375,
0.002956390380859375,
-0.006134033203125,
0.058685302734375,
-0.00928497314453125,
-0.03985595703125,
0.01308441162109375,
-0.002902984619140625,
0.041168212890625,
0.04046630859375,
0.01178741455078125,
0.0323486328125,
-0.035888671875,
-0.0167388916015625,
-0.0095977783203125,
-0.01015472412109375,
-0.01055145263671875,
0.00328826904296875,
0.010009765625,
-0.01532745361328125,
0.000056803226470947266,
0.0266876220703125,
0.0029735565185546875,
0.015533447265625,
-0.0489501953125,
-0.0689697265625,
0.0006346702575683594,
-0.037384033203125,
0.05120849609375,
0.02874755859375,
-0.006130218505859375,
-0.02130126953125,
-0.043975830078125,
0.0142669677734375,
-0.0025920867919921875,
-0.029449462890625,
0.0479736328125,
0.0058441162109375,
0.05999755859375,
0.0007596015930175781,
0.020172119140625,
-0.002704620361328125,
-0.0220794677734375,
0.027740478515625,
0.02532958984375,
0.0220947265625,
0.007671356201171875,
-0.0152740478515625,
-0.0096588134765625,
0.0295257568359375,
0.0296478271484375,
-0.01161956787109375,
-0.00896453857421875,
0.0264892578125,
0.010467529296875,
-0.0195770263671875,
-0.011871337890625,
0.0007953643798828125,
-0.0784912109375,
0.00988006591796875,
0.0595703125,
0.040618896484375,
0.0216827392578125,
-0.00351715087890625,
-0.0231475830078125,
0.0726318359375,
0.017425537109375,
0.023712158203125,
-0.0325927734375,
0.021148681640625,
0.034271240234375,
-0.00804901123046875,
-0.0287017822265625,
0.034027099609375,
0.0029392242431640625,
0.003475189208984375,
0.0232696533203125,
-0.0175628662109375,
-0.0161895751953125,
-0.01538848876953125,
0.02716064453125,
-0.00933837890625,
0.02838134765625,
0.0235443115234375,
0.0013017654418945312,
0.0684814453125,
-0.0128326416015625,
0.044036865234375,
0.0204315185546875,
-0.0235137939453125,
0.01151275634765625,
0.0114898681640625,
-0.0350341796875,
0.005321502685546875,
0.01464080810546875,
0.007488250732421875,
0.0694580078125,
-0.0312042236328125,
-0.007778167724609375,
0.00844573974609375,
0.023712158203125,
-0.037017822265625,
0.0005087852478027344,
-0.0321044921875,
-0.0110931396484375,
0.01317596435546875,
-0.046173095703125,
0.0011243820190429688,
-0.01491546630859375,
-0.01290130615234375,
-0.008575439453125,
0.0253448486328125,
0.025909423828125,
-0.0287628173828125,
0.0287017822265625,
-0.00199127197265625,
-0.0237579345703125,
0.00408935546875,
-0.00323486328125,
0.02899169921875,
-0.0107574462890625,
0.01404571533203125,
0.05908203125,
-0.0189666748046875,
0.036529541015625,
0.003993988037109375,
0.0026683807373046875,
0.0240325927734375,
0.0062408447265625,
0.0118865966796875,
0.00147247314453125,
-0.04217529296875,
0.00659942626953125,
0.03192138671875,
0.03021240234375,
0.0307769775390625,
-0.0281524658203125,
0.027130126953125,
0.027008056640625,
-0.031402587890625,
-0.08502197265625,
-0.0077972412109375,
-0.04833984375,
-0.006946563720703125,
-0.05535888671875,
-0.00844573974609375,
0.002719879150390625,
-0.0496826171875,
-0.005123138427734375,
-0.041046142578125,
-0.03900146484375,
-0.004245758056640625,
-0.07855224609375,
-0.034820556640625,
-0.0318603515625,
-0.0029010772705078125,
-0.0007872581481933594,
-0.005718231201171875,
0.08013916015625,
0.005367279052734375,
-0.045379638671875,
-0.00209808349609375,
-0.04376220703125,
0.006198883056640625,
0.04736328125,
0.0265960693359375,
-0.0249176025390625,
0.00876617431640625,
-0.00077056884765625,
0.0170135498046875,
0.0322265625,
-0.02081298828125,
-0.02276611328125,
0.000621795654296875,
0.002742767333984375,
-0.0246734619140625,
0.050689697265625,
0.033111572265625,
-0.0285797119140625,
-0.01352691650390625,
-0.0594482421875,
-0.0256805419921875,
0.0039043426513671875,
-0.05108642578125,
0.041961669921875,
0.036895751953125,
-0.0362548828125,
0.0281829833984375,
-0.01212310791015625,
0.03466796875,
0.0274505615234375,
-0.0004856586456298828,
-0.0008716583251953125,
0.044342041015625,
0.0232696533203125,
0.02520751953125,
-0.0259246826171875,
0.0181884765625,
-0.026763916015625,
0.0276336669921875,
-0.00019693374633789062,
-0.0029277801513671875,
-0.0298614501953125,
-0.0035762786865234375,
-0.08477783203125,
-0.0248565673828125,
0.0164794921875,
-0.0065460205078125,
0.04742431640625,
-0.0169219970703125,
-0.00576019287109375,
0.00609588623046875,
0.05792236328125,
-0.036285400390625,
-0.0233612060546875,
-0.0249786376953125,
0.000017702579498291016,
-0.002197265625,
-0.0070343017578125,
-0.0243988037109375,
-0.01157379150390625,
-0.1368408203125,
0.0166778564453125,
0.0017538070678710938,
-0.0496826171875,
-0.0283660888671875,
0.00963592529296875,
-0.11505126953125,
-0.040283203125,
0.0231475830078125,
-0.036102294921875,
0.019866943359375,
0.0300750732421875,
-0.00632476806640625,
0.017059326171875,
0.0136871337890625,
-0.055572509765625,
-0.072998046875,
0.01105499267578125,
-0.05377197265625,
0.00226593017578125,
0.013519287109375,
0.00954437255859375,
-0.016021728515625,
-0.001079559326171875,
0.01396942138671875,
0.003082275390625,
-0.0008511543273925781,
-0.0043182373046875,
0.01525115966796875,
0.038909912109375,
0.004001617431640625,
-0.004657745361328125,
-0.022430419921875,
0.0009331703186035156,
-0.02899169921875,
0.0186614990234375,
0.004093170166015625,
-0.0322265625,
0.052154541015625,
-0.03973388671875,
-0.019805908203125,
0.0185699462890625,
-0.00579071044921875,
-0.0196380615234375,
-0.02032470703125,
-0.0030460357666015625,
0.019927978515625,
-0.0297393798828125,
0.0113372802734375,
-0.039276123046875,
-0.00653076171875,
0.01288604736328125,
0.0645751953125,
0.02203369140625,
-0.00420379638671875,
0.00670623779296875,
-0.0156402587890625,
0.044647216796875,
0.0233001708984375,
0.006549835205078125,
0.0085601806640625,
-0.04754638671875,
0.044677734375,
0.049224853515625,
-0.0120697021484375,
-0.00970458984375,
0.049957275390625,
0.003570556640625,
-0.007701873779296875,
-0.00960540771484375,
-0.0261688232421875,
0.02606201171875,
0.034210205078125,
0.00650787353515625,
-0.0185546875,
0.00630950927734375,
0.00336456298828125,
-0.00786590576171875,
0.0013189315795898438,
-0.0024013519287109375,
-0.04022216796875,
0.01275634765625,
0.03961181640625,
0.031036376953125,
0.001277923583984375,
0.0115509033203125,
0.0130615234375,
0.0080413818359375,
0.0189666748046875,
0.014892578125,
0.046630859375,
-0.0316162109375,
0.046234130859375,
0.0003116130828857422,
-0.004909515380859375,
0.007080078125,
0.00162506103515625,
-0.006591796875,
-0.03375244140625,
-0.052093505859375,
-0.03497314453125,
0.01172637939453125,
0.0064544677734375,
0.037261962890625,
0.006427764892578125,
0.037017822265625,
-0.0030002593994140625,
-0.0284271240234375,
0.0026111602783203125,
0.0055389404296875,
-0.0129547119140625,
-0.0298309326171875,
-0.003124237060546875,
-0.0160369873046875,
-0.0200958251953125,
0.0102996826171875,
-0.01117706298828125,
0.0285797119140625,
-0.0233612060546875,
-0.0188751220703125,
-0.01441192626953125,
0.022552490234375,
-0.010711669921875,
0.0246429443359375,
0.0290679931640625,
0.0015115737915039062,
-0.039886474609375,
0.046722412109375,
-0.050323486328125,
-0.0115966796875,
0.0188140869140625,
0.058837890625,
-0.03173828125,
-0.0496826171875,
0.0283966064453125,
-0.0113372802734375,
-0.0452880859375,
0.007625579833984375,
0.023651123046875,
-0.0147552490234375,
-0.031982421875,
0.01702880859375,
0.02752685546875,
0.049041748046875,
-0.0253753662109375,
0.005977630615234375,
-0.040985107421875,
0.01093292236328125,
0.0123443603515625,
-0.029998779296875,
0.01690673828125,
0.009002685546875,
-0.06689453125,
-0.004749298095703125,
0.013214111328125,
-0.037994384765625,
-0.043426513671875,
-0.003452301025390625,
-0.0256500244140625,
0.0133819580078125,
-0.0195465087890625,
0.004322052001953125,
-0.035430908203125,
0.006793975830078125,
-0.0138702392578125,
0.00997161865234375,
0.0321044921875,
-0.0064849853515625,
-0.0318603515625,
0.020904541015625,
-0.054931640625,
-0.0193023681640625,
-0.0748291015625,
-0.065673828125,
-0.070068359375,
-0.0175018310546875,
0.0184326171875,
0.005859375,
0.00273895263671875,
0.0010461807250976562,
-0.025177001953125,
0.05230712890625,
0.045013427734375,
0.049285888671875,
-0.0394287109375,
0.05694580078125,
0.03173828125,
0.0240325927734375,
0.01030731201171875,
0.0284576416015625,
0.0240631103515625,
-0.0236358642578125,
-0.0082550048828125,
0.01007843017578125,
-0.002361297607421875,
-0.025970458984375,
0.0291900634765625,
0.00905609130859375,
0.056427001953125,
-0.00341033935546875,
0.045684814453125,
-0.01148223876953125,
0.0164947509765625,
-0.0079498291015625,
-0.058502197265625,
-0.042877197265625,
-0.01849365234375,
0.03564453125,
-0.03314208984375,
-0.0302581787109375,
0.0135498046875,
-0.02117919921875,
0.03167724609375,
0.01020050048828125,
0.0189361572265625,
-0.0011615753173828125,
-0.09393310546875,
0.09552001953125,
0.04949951171875,
0.01141357421875,
0.048065185546875,
-0.0244293212890625,
0.01416015625,
0.0206451416015625,
-0.03424072265625,
-0.03509521484375,
0.05523681640625,
-0.0017070770263671875,
-0.0234832763671875,
0.02716064453125,
-0.01386260986328125,
0.0164031982421875,
0.021270751953125,
0.07672119140625,
0.101806640625,
-0.1019287109375,
0.0166473388671875,
0.04962158203125,
0.0216064453125,
0.02117919921875,
-0.045440673828125,
0.0120697021484375,
-0.008087158203125,
0.0784912109375,
0.0049896240234375,
-0.016326904296875,
0.023193359375,
-0.017852783203125,
-0.00762939453125,
-0.0017366409301757812,
0.0260467529296875,
0.02496337890625,
0.001316070556640625,
0.00690460205078125,
-0.00384521484375,
0.0135955810546875,
-0.0172882080078125,
-0.004123687744140625,
-0.006374359130859375,
-0.0310516357421875,
-0.038360595703125,
0.0007181167602539062,
-0.01174163818359375,
0.00954437255859375,
-0.0023956298828125,
-0.013519287109375,
0.0229644775390625,
0.06011962890625,
-0.0239715576171875,
-0.01151275634765625,
0.0249176025390625,
0.0191650390625,
-0.063232421875,
-0.027008056640625,
0.0389404296875,
0.033721923828125,
-0.075927734375,
0.038238525390625,
-0.035400390625,
-0.03338623046875,
0.0001589059829711914,
0.021240234375,
0.08892822265625,
-0.0482177734375,
-0.01331329345703125,
0.0228729248046875,
0.01464080810546875,
-0.0024890899658203125,
-0.01117706298828125,
0.0643310546875,
-0.049774169921875,
-0.016021728515625,
0.01273345947265625,
-0.0247802734375,
-0.05096435546875,
-0.02996826171875,
-0.047576904296875,
0.058685302734375,
0.0008921623229980469,
0.012542724609375,
0.0115509033203125,
0.0380859375,
-0.0029010772705078125,
0.02081298828125,
-0.002838134765625,
0.053497314453125,
-0.003185272216796875,
0.028167724609375,
0.0135345458984375,
0.0287628173828125,
0.032257080078125,
0.004589080810546875,
-0.0174102783203125,
-0.01139068603515625,
0.019256591796875,
0.0198822021484375,
0.032745361328125,
0.0295562744140625,
-0.00366973876953125,
0.0005044937133789062,
-0.037994384765625,
-0.023529052734375,
-0.00566864013671875,
-0.006877899169921875,
0.009185791015625,
0.03399658203125,
-0.05224609375,
0.00006699562072753906,
0.018768310546875,
0.00908660888671875,
0.0173492431640625,
0.01558685302734375,
-0.038116455078125,
0.014190673828125,
0.032867431640625,
0.0285186767578125,
-0.053436279296875,
0.033355712890625,
-0.01953125,
0.006580352783203125,
0.005764007568359375,
-0.02105712890625,
0.018157958984375,
0.006725311279296875,
-0.00588226318359375,
-0.052978515625,
-0.0031528472900390625,
-0.06085205078125,
-0.016571044921875,
-0.023712158203125,
0.053863525390625,
-0.06195068359375,
0.0165557861328125,
0.0447998046875,
0.035308837890625,
0.0213470458984375,
-0.009429931640625,
-0.01525115966796875,
0.01422882080078125,
-0.0015354156494140625,
-0.03118896484375,
0.012054443359375,
-0.004253387451171875,
-0.02252197265625,
-0.001735687255859375,
-0.00208282470703125,
0.020721435546875,
0.03399658203125,
-0.0596923828125,
0.0246734619140625,
0.062225341796875,
0.02423095703125,
-0.003986358642578125,
0.01016998291015625,
-0.08929443359375,
-0.007160186767578125,
-0.01434326171875,
-0.01531982421875,
0.0117950439453125,
0.046600341796875,
0.01274871826171875,
0.02532958984375,
-0.03155517578125,
-0.0128631591796875,
-0.0167083740234375,
0.01262664794921875,
0.0003108978271484375,
0.0271759033203125,
-0.0313720703125,
-0.0115203857421875,
-0.0024547576904296875,
0.036102294921875,
0.018707275390625,
-0.0141448974609375,
-0.0299835205078125,
0.0081329345703125,
0.0660400390625,
0.0162506103515625,
0.07916259765625,
0.0222930908203125,
-0.0255584716796875,
-0.02398681640625,
0.00482177734375,
0.0445556640625,
0.01001739501953125,
0.00787353515625,
-0.00046324729919433594,
0.078369140625,
-0.0093536376953125,
-0.00923919677734375,
0.00811767578125,
-0.0139312744140625,
0.022918701171875,
0.02215576171875,
0.034759521484375,
0.03363037109375,
0.00748443603515625,
0.00006026029586791992,
-0.00848388671875,
-0.03839111328125,
0.01303863525390625,
0.03900146484375,
-0.01354217529296875,
0.0144500732421875,
0.0164947509765625,
-0.006622314453125,
0.00458526611328125,
0.016571044921875,
-0.01751708984375,
0.01061248779296875,
0.0304412841796875,
0.015045166015625,
-0.08819580078125,
-0.056182861328125,
-0.05615234375,
0.05877685546875,
0.0227203369140625,
0.0028972625732421875,
0.0168304443359375,
0.05035400390625,
0.0011119842529296875,
0.01163482666015625,
-0.01910400390625,
-0.033966064453125,
0.060882568359375,
-0.0013837814331054688,
-0.00027942657470703125,
-0.0151824951171875,
-0.0462646484375,
0.036865234375,
0.01374053955078125,
0.0154571533203125,
0.00884246826171875,
0.00426483154296875,
0.0174102783203125,
0.0260162353515625,
-0.0006384849548339844,
-0.04461669921875,
-0.08245849609375,
-0.035186767578125,
0.04803466796875,
-0.040191650390625,
-0.0384521484375,
-0.019622802734375,
0.006420135498046875,
-0.00989532470703125,
-0.016357421875,
0.003658294677734375,
0.013214111328125,
-0.020050048828125,
0.03302001953125,
-0.0164031982421875,
-0.050628662109375,
0.0254669189453125,
0.0078277587890625,
-0.00856781005859375,
0.045074462890625,
0.0145721435546875,
0.04254150390625,
-0.025421142578125,
0.0264434814453125,
0.06884765625,
0.06488037109375,
-0.031524658203125,
0.0142974853515625,
0.0634765625,
-0.013031005859375,
0.0165557861328125,
-0.072509765625,
-0.01898193359375,
-0.062164306640625,
0.01143646240234375,
0.044189453125,
-0.02362060546875,
0.030914306640625,
0.0028438568115234375,
0.0023593902587890625,
0.036285400390625,
-0.0239105224609375,
-0.0302276611328125,
-0.006938934326171875,
-0.04925537109375,
0.052093505859375,
-0.0347900390625,
0.01418304443359375,
0.0012178421020507812,
0.006694793701171875,
-0.022064208984375,
0.01219940185546875,
-0.007534027099609375,
0.00957489013671875,
0.03167724609375,
0.0217132568359375,
0.058502197265625,
-0.032012939453125,
-0.052642822265625,
0.0143280029296875,
0.004589080810546875,
0.05096435546875,
-0.01534271240234375,
-0.0109710693359375,
0.044769287109375,
-0.0163116455078125,
-0.0482177734375,
-0.027557373046875,
0.01351165771484375,
-0.03131103515625,
-0.01218414306640625,
-0.04034423828125,
0.01520538330078125,
0.02276611328125,
-0.04791259765625,
-0.12451171875,
0.034576416015625,
-0.033355712890625,
-0.0418701171875,
-0.052001953125,
0.014923095703125,
-0.0025177001953125,
-0.01293182373046875,
-0.026947021484375,
-0.0277557373046875,
-0.01788330078125,
0.0299530029296875,
0.006114959716796875,
0.0206298828125,
0.03924560546875,
-0.0082244873046875,
-0.049835205078125,
-0.01477813720703125,
-0.024261474609375,
0.00461578369140625,
0.0129241943359375,
-0.0080108642578125,
-0.014007568359375,
0.020233154296875,
-0.04742431640625,
-0.074462890625,
-0.038665771484375,
0.01263427734375,
0.008819580078125,
-0.036956787109375,
-0.027191162109375,
-0.025634765625,
0.042755126953125,
0.0338134765625,
0.011627197265625,
-0.0189208984375,
-0.01399993896484375,
-0.001476287841796875,
-0.031341552734375,
0.006076812744140625,
0.040679931640625,
-0.0596923828125,
-0.00537872314453125,
0.00960540771484375,
-0.0269317626953125,
-0.00107574462890625,
0.01407623291015625,
-0.052703857421875,
-0.000789642333984375,
-0.008392333984375,
0.016876220703125,
-0.08685302734375,
-0.004215240478515625,
0.0382080078125,
-0.033935546875,
-0.0009489059448242188,
-0.004405975341796875,
0.022491455078125,
0.01169586181640625,
0.01323699951171875,
0.03216552734375,
0.0235443115234375,
-0.02935791015625,
-0.0102691650390625,
0.0225830078125,
0.0269317626953125,
-0.00945281982421875,
-0.04168701171875,
0.0247650146484375,
-0.007366180419921875,
-0.023529052734375,
-0.03057861328125,
0.0111541748046875,
0.036163330078125,
-0.045623779296875,
0.0272369384765625,
-0.0055389404296875,
0.044891357421875,
-0.0012569427490234375,
0.01219940185546875,
0.00249481201171875,
0.004917144775390625,
0.042022705078125,
-0.031494140625,
0.00144195556640625,
0.02191162109375,
-0.0025959014892578125,
-0.04998779296875,
0.016998291015625,
-0.0213775634765625,
0.02020263671875,
0.008453369140625
] |
fd16168492e787772972872cc4acbe3187dbf807
|
Wordpress Stackexchange
Q: Multiple areas of dynamic content in a page I am new in Wordpress and what I really can't find how to do is the following:
I have a new Page created from the CMS. This pages have different modules with text. Take for example this template http://www.templatemonster.com/demo/40000.html
There are three modules in the row with an icon, a heading and text. And below other four. How is possible so user be able to edit from wordpress each one of these modules separately?
A: The example you gave has a listing of three pages and four posts (which are dated). The same can be achieved by one of the following:
*
*two different Custom Post Types, one per block, e. g. post_type='products' and post_type='projects';
*children of two another pages, e. g. children of "Products" in one block and children of "Projects" in another;
*pages grouped by some custom field(s);
*pages sharing two page templates, one for each block.
And may be some other methods.
It's depends on what site structure you'll have and what type of navigation and some other things you prefer (manual or auto).
|
Q: Multiple areas of dynamic content in a page I am new in Wordpress and what I really can't find how to do is the following:
I have a new Page created from the CMS. This pages have different modules with text. Take for example this template http://www.templatemonster.com/demo/40000.html
There are three modules in the row with an icon, a heading and text. And below other four. How is possible so user be able to edit from wordpress each one of these modules separately?
A: The example you gave has a listing of three pages and four posts (which are dated). The same can be achieved by one of the following:
*
*two different Custom Post Types, one per block, e. g. post_type='products' and post_type='projects';
*children of two another pages, e. g. children of "Products" in one block and children of "Projects" in another;
*pages grouped by some custom field(s);
*pages sharing two page templates, one for each block.
And may be some other methods.
It's depends on what site structure you'll have and what type of navigation and some other things you prefer (manual or auto).
A: Use the spots plugin:
http://wordpress.org/extend/plugins/spots/
You can use it as a widget, a shortcode, or place 'template spots' in your theme that you can assign.
You could also use custom fields in metaboxes to add edit boxes for each field
edit:
You could always have a custom post type for each type of block, and a custom taxonomy, and display all posts in a certain term, e.g. for Page A you could have a 'page A top thirds' term and display posts in that
|
wordpress
|
{
"language": "en",
"length": 271,
"provenance": "stackexchange_00019.jsonl.gz:421929",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/58736"
}
|
[
-0.005084991455078125,
0.001743316650390625,
-0.04144287109375,
-0.0343017578125,
0.01316070556640625,
-0.0193023681640625,
0.007404327392578125,
0.006832122802734375,
-0.0235443115234375,
-0.00725555419921875,
-0.03399658203125,
-0.00696563720703125,
-0.08062744140625,
-0.0235595703125,
-0.004764556884765625,
-0.08074951171875,
0.03045654296875,
-0.01561737060546875,
0.01436614990234375,
-0.01262664794921875,
-0.003631591796875,
0.002681732177734375,
0.01250457763671875,
0.0989990234375,
0.0233306884765625,
-0.039886474609375,
0.037872314453125,
0.036041259765625,
0.0079345703125,
-0.0009002685546875,
0.028961181640625,
-0.01194000244140625,
0.004047393798828125,
0.00045371055603027344,
0.0182037353515625,
0.0013399124145507812,
0.034820556640625,
-0.0003993511199951172,
0.019927978515625,
0.02099609375,
0.006755828857421875,
-0.00409698486328125,
0.08807373046875,
0.03955078125,
0.0276947021484375,
-0.046112060546875,
0.0260467529296875,
-0.0592041015625,
0.0016660690307617188,
-0.035614013671875,
-0.0017604827880859375,
-0.01502227783203125,
0.0149383544921875,
-0.01021575927734375,
-0.00801849365234375,
0.01494598388671875,
0.0006937980651855469,
-0.02447509765625,
0.03033447265625,
0.017486572265625,
0.0009531974792480469,
-0.0175628662109375,
0.014404296875,
-0.01666259765625,
0.01155853271484375,
-0.01149749755859375,
0.0185546875,
0.0157623291015625,
-0.04931640625,
0.014251708984375,
0.043365478515625,
-0.035675048828125,
0.0181884765625,
-0.04608154296875,
0.0180206298828125,
0.032470703125,
-0.02972412109375,
-0.0130157470703125,
0.0125732421875,
0.0011892318725585938,
-0.01165008544921875,
0.0174102783203125,
-0.041748046875,
-0.08984375,
0.04705810546875,
-0.041015625,
-0.0065155029296875,
0.021392822265625,
-0.03460693359375,
0.001377105712890625,
-0.030059814453125,
0.0025119781494140625,
-0.03497314453125,
0.024749755859375,
0.00402069091796875,
0.01314544677734375,
0.025604248046875,
0.037994384765625,
-0.002330780029296875,
0.0299224853515625,
0.0009737014770507812,
-0.0625,
0.045867919921875,
-0.05426025390625,
0.0013828277587890625,
0.006465911865234375,
0.017303466796875,
0.01357269287109375,
0.036407470703125,
0.01482391357421875,
-0.0095672607421875,
0.066650390625,
0.0225677490234375,
-0.0230255126953125,
-0.02667236328125,
-0.0206146240234375,
-0.0025959014892578125,
0.01013946533203125,
0.021514892578125,
-0.01111602783203125,
-0.0244140625,
0.006931304931640625,
0.0270538330078125,
-0.04705810546875,
0.0219268798828125,
0.0009546279907226562,
-0.005245208740234375,
-0.038360595703125,
0.015380859375,
0.01085662841796875,
-0.02490234375,
0.01078033447265625,
0.05255126953125,
0.038238525390625,
0.0138092041015625,
-0.00689697265625,
0.0092010498046875,
0.007366180419921875,
0.01332855224609375,
-0.0156097412109375,
0.00441741943359375,
-0.0228271484375,
-0.0055999755859375,
0.005359649658203125,
-0.0035800933837890625,
0.00258636474609375,
0.022705078125,
0.03851318359375,
0.0029468536376953125,
-0.04083251953125,
0.023895263671875,
-0.0008111000061035156,
0.0222320556640625,
0.001964569091796875,
0.023834228515625,
-0.05511474609375,
0.030364990234375,
-0.0389404296875,
0.040802001953125,
-0.0218963623046875,
0.018798828125,
0.0125579833984375,
0.04376220703125,
-0.01788330078125,
-0.0273895263671875,
-0.0199127197265625,
-0.07012939453125,
-0.014556884765625,
0.026519775390625,
-0.033233642578125,
0.019378662109375,
-0.03271484375,
0.021759033203125,
0.03094482421875,
0.01934814453125,
0.0589599609375,
-0.0108642578125,
0.004215240478515625,
-0.00482177734375,
0.0771484375,
0.02508544921875,
-0.024139404296875,
0.0070037841796875,
0.01111602783203125,
-0.0654296875,
0.0312347412109375,
-0.0185394287109375,
0.03216552734375,
0.0237579345703125,
0.002925872802734375,
0.041900634765625,
0.00925445556640625,
-0.01331329345703125,
-0.00855255126953125,
0.0189056396484375,
-0.0196990966796875,
-0.03533935546875,
-0.0093994140625,
-0.01186370849609375,
-0.027587890625,
-0.0209197998046875,
0.01556396484375,
0.0006036758422851562,
0.0127410888671875,
-0.0021038055419921875,
-0.00940704345703125,
-0.006282806396484375,
0.020355224609375,
-0.01593017578125,
0.006595611572265625,
0.00345611572265625,
-0.03997802734375,
0.0096282958984375,
-0.048492431640625,
-0.0227203369140625,
-0.001567840576171875,
-0.0095367431640625,
0.0249481201171875,
0.010345458984375,
0.0021076202392578125,
0.041900634765625,
-0.03179931640625,
0.0213623046875,
0.029052734375,
0.063232421875,
0.004852294921875,
-0.0162200927734375,
-0.025482177734375,
0.01456451416015625,
0.048614501953125,
-0.1124267578125,
0.01953125,
0.025543212890625,
0.01119232177734375,
-0.036956787109375,
-0.004817962646484375,
-0.01374053955078125,
-0.0291748046875,
-0.0070037841796875,
0.0430908203125,
0.02508544921875,
0.00498199462890625,
-0.025970458984375,
0.00019657611846923828,
0.034027099609375,
-0.0623779296875,
-0.01922607421875,
0.00937652587890625,
-0.00655364990234375,
0.06597900390625,
0.0243072509765625,
0.0302581787109375,
-0.005893707275390625,
-0.042633056640625,
-0.00968170166015625,
0.04144287109375,
-0.0008349418640136719,
0.0074920654296875,
-0.02752685546875,
0.0122833251953125,
0.005062103271484375,
-0.01294708251953125,
-0.0253143310546875,
-0.01342010498046875,
0.079345703125,
-0.01015472412109375,
0.06976318359375,
0.04168701171875,
-0.0229644775390625,
-0.0145263671875,
0.0004425048828125,
0.0023956298828125,
0.0114593505859375,
-0.0036678314208984375,
-0.007701873779296875,
0.0110931396484375,
-0.0138092041015625,
-0.0078887939453125,
0.0124359130859375,
-0.0090484619140625,
-0.007465362548828125,
-0.0018215179443359375,
-0.045989990234375,
-0.00780487060546875,
0.02606201171875,
-0.045440673828125,
-0.0176239013671875,
0.004398345947265625,
-0.00341796875,
0.0004515647888183594,
-0.0031795501708984375,
0.051300048828125,
-0.034454345703125,
0.059295654296875,
-0.006404876708984375,
-0.0137176513671875,
0.0322265625,
-0.04486083984375,
0.050262451171875,
-0.046234130859375,
0.060638427734375,
0.0738525390625,
-0.032745361328125,
0.028045654296875,
-0.0070953369140625,
0.025726318359375,
0.01418304443359375,
-0.024078369140625,
-0.00847625732421875,
-0.00341796875,
-0.0271453857421875,
-0.00695037841796875,
0.0200958251953125,
0.023193359375,
0.01373291015625,
-0.0159149169921875,
0.0160980224609375,
0.0211639404296875,
-0.00897216796875,
-0.0196990966796875,
0.060302734375,
-0.05743408203125,
0.01192474365234375,
-0.00665283203125,
-0.03985595703125,
-0.047637939453125,
0.03778076171875,
0.0019702911376953125,
0.025604248046875,
-0.03253173828125,
-0.06597900390625,
-0.0293426513671875,
-0.0775146484375,
0.0264892578125,
-0.0123138427734375,
0.0150909423828125,
0.003711700439453125,
0.0262298583984375,
-0.0215911865234375,
-0.072021484375,
-0.0230255126953125,
0.054229736328125,
-0.0015287399291992188,
-0.000011205673217773438,
-0.016021728515625,
0.0037994384765625,
0.0185394287109375,
0.023651123046875,
-0.004756927490234375,
0.006145477294921875,
-0.016510009765625,
-0.0190582275390625,
-0.003475189208984375,
0.0282135009765625,
0.0164947509765625,
-0.038909912109375,
0.004364013671875,
0.03033447265625,
-0.01444244384765625,
-0.036590576171875,
-0.027923583984375,
-0.0187225341796875,
-0.04913330078125,
0.011932373046875,
0.062286376953125,
-0.01194000244140625,
-0.03863525390625,
0.01300048828125,
0.01015472412109375,
-0.0002739429473876953,
0.01276397705078125,
-0.040191650390625,
0.0238037109375,
0.004581451416015625,
0.01500701904296875,
-0.02899169921875,
-0.015899658203125,
-0.02880859375,
0.0241546630859375,
-0.0285797119140625,
0.0045318603515625,
-0.02520751953125,
0.040313720703125,
-0.0229034423828125,
-0.044464111328125,
0.04364013671875,
-0.00970458984375,
0.00110626220703125,
-0.02996826171875,
-0.01953125,
-0.01131439208984375,
0.073486328125,
-0.0701904296875,
-0.00605010986328125,
0.00878143310546875,
0.0194244384765625,
-0.044189453125,
-0.042388916015625,
-0.0733642578125,
-0.0009274482727050781,
-0.049957275390625,
0.014984130859375,
0.00437164306640625,
-0.01509857177734375,
-0.042510986328125,
0.053253173828125,
-0.03424072265625,
-0.017730712890625,
0.036590576171875,
-0.0181427001953125,
-0.007061004638671875,
0.021331787109375,
-0.03125,
0.00258636474609375,
-0.04254150390625,
-0.00269317626953125,
-0.046966552734375,
-0.015472412109375,
-0.005695343017578125,
0.046966552734375,
0.0419921875,
-0.0732421875,
0.01690673828125,
0.060821533203125,
0.00003540515899658203,
0.0606689453125,
-0.025177001953125,
0.00672149658203125,
-0.0022125244140625,
-0.045501708984375,
0.005970001220703125,
-0.037628173828125,
0.00951385498046875,
-0.0278472900390625,
-0.02764892578125,
0.01256561279296875,
-0.07403564453125,
-0.01044464111328125,
-0.06500244140625,
-0.0002510547637939453,
-0.0626220703125,
0.01230621337890625,
-0.0081329345703125,
-0.0022220611572265625,
-0.01085662841796875,
-0.0134124755859375,
0.016021728515625,
-0.06396484375,
0.0095367431640625,
-0.033447265625,
0.0020313262939453125,
0.021331787109375,
0.08062744140625,
0.010528564453125,
0.0018634796142578125,
-0.055206298828125,
-0.00925445556640625,
0.043212890625,
0.0196533203125,
0.01727294921875,
0.0258941650390625,
-0.01357269287109375,
0.0011949539184570312,
0.0275726318359375,
-0.01270294189453125,
0.00556182861328125,
0.06939697265625,
0.006683349609375,
-0.006954193115234375,
-0.00463104248046875,
-0.013824462890625,
-0.0105438232421875,
0.01317596435546875,
-0.04132080078125,
-0.0023040771484375,
-0.0310211181640625,
0.07550048828125,
-0.00571441650390625,
0.01015472412109375,
-0.089599609375,
-0.000934600830078125,
-0.00428009033203125,
-0.0025768280029296875,
0.0283660888671875,
0.036407470703125,
-0.006465911865234375,
0.01119232177734375,
-0.003734588623046875,
0.01354217529296875,
-0.00402069091796875,
-0.0258941650390625,
0.004810333251953125,
0.00803375244140625,
0.025665283203125,
0.0095977783203125,
0.006092071533203125,
0.0008335113525390625,
0.028961181640625,
-0.024688720703125,
-0.0509033203125,
-0.024322509765625,
-0.0059661865234375,
0.036468505859375,
0.03533935546875,
0.0277252197265625,
0.0186309814453125,
0.00267791748046875,
0.0238494873046875,
0.006252288818359375,
0.0340576171875,
-0.0100250244140625,
-0.01342010498046875,
-0.00251007080078125,
0.0182647705078125,
-0.00801849365234375,
0.0254974365234375,
0.016448974609375,
-0.00664520263671875,
0.01474761962890625,
-0.0261993408203125,
0.0447998046875,
0.02386474609375,
0.0113372802734375,
-0.005290985107421875,
0.035552978515625,
-0.002918243408203125,
-0.013580322265625,
-0.005931854248046875,
-0.034912109375,
-0.00972747802734375,
0.059417724609375,
0.09393310546875,
0.0110015869140625,
-0.005992889404296875,
-0.034759521484375,
-0.0640869140625,
0.0305328369140625,
0.005809783935546875,
-0.05010986328125,
-0.04681396484375,
0.008636474609375,
0.033233642578125,
0.0237884521484375,
-0.05584716796875,
-0.0032558441162109375,
-0.005908966064453125,
-0.04058837890625,
-0.009368896484375,
0.00390625,
-0.027618408203125,
-0.01213836669921875,
-0.00817108154296875,
-0.017791748046875,
0.00641632080078125,
0.007221221923828125,
-0.0941162109375,
-0.06396484375,
0.0042877197265625,
0.0199127197265625,
0.0296478271484375,
-0.03228759765625,
0.016876220703125,
-0.0270843505859375,
0.0090179443359375,
-0.019805908203125,
0.0148773193359375,
0.0278472900390625,
0.009918212890625,
-0.04473876953125,
0.00675201416015625,
-0.0693359375,
-0.0142822265625,
-0.106201171875,
-0.08258056640625,
-0.0374755859375,
0.0247955322265625,
0.0147705078125,
0.02001953125,
0.0134735107421875,
-0.01224517822265625,
0.0102386474609375,
0.001583099365234375,
-0.004344940185546875,
0.0159149169921875,
0.0141448974609375,
0.04278564453125,
-0.0084991455078125,
0.0433349609375,
0.035552978515625,
0.021759033203125,
-0.01544952392578125,
-0.032928466796875,
-0.004932403564453125,
-0.0301971435546875,
-0.0079803466796875,
-0.01457977294921875,
-0.01300811767578125,
0.0308380126953125,
0.039825439453125,
0.007198333740234375,
0.004642486572265625,
-0.043792724609375,
0.0118865966796875,
-0.0290985107421875,
0.06390380859375,
-0.055999755859375,
-0.047027587890625,
0.0172119140625,
-0.0262908935546875,
0.000148773193359375,
0.0133056640625,
-0.032196044921875,
0.0289154052734375,
0.0022106170654296875,
0.00513458251953125,
0.030426025390625,
-0.0256195068359375,
0.008453369140625,
0.04669189453125,
-0.0048370361328125,
0.039825439453125,
0.0018177032470703125,
0.01126861572265625,
0.05645751953125,
-0.0080108642578125,
0.003459930419921875,
0.0416259765625,
0.036468505859375,
-0.01520538330078125,
-0.005069732666015625,
0.0020084381103515625,
-0.017974853515625,
-0.016571044921875,
0.05169677734375,
0.038970947265625,
-0.08673095703125,
0.0031280517578125,
-0.0123748779296875,
0.01107025146484375,
0.034912109375,
0.0003867149353027344,
0.009429931640625,
0.0202484130859375,
-0.012451171875,
0.05029296875,
-0.016571044921875,
0.007427215576171875,
0.025421142578125,
-0.0191650390625,
0.017974853515625,
-0.005222320556640625,
0.0252838134765625,
0.03729248046875,
-0.01052093505859375,
-0.01094818115234375,
0.038177490234375,
-0.036376953125,
-0.0117645263671875,
0.00986480712890625,
-0.01611328125,
-0.024444580078125,
0.03509521484375,
-0.01143646240234375,
0.033355712890625,
-0.014251708984375,
-0.004604339599609375,
-0.027191162109375,
0.043548583984375,
-0.038665771484375,
0.004299163818359375,
0.027435302734375,
-0.06475830078125,
-0.040985107421875,
0.00980377197265625,
0.013458251953125,
-0.0171356201171875,
-0.057464599609375,
0.015777587890625,
-0.07928466796875,
0.037017822265625,
-0.0174560546875,
-0.005725860595703125,
0.058074951171875,
-0.0270538330078125,
-0.019378662109375,
0.050140380859375,
-0.0070648193359375,
-0.032745361328125,
0.0400390625,
0.0030689239501953125,
-0.0271759033203125,
-0.047027587890625,
0.0206451416015625,
-0.051666259765625,
0.01139068603515625,
0.035064697265625,
-0.1087646484375,
0.10906982421875,
0.0282135009765625,
0.0533447265625,
-0.00930023193359375,
0.0482177734375,
-0.0180511474609375,
0.007411956787109375,
-0.0229339599609375,
0.06866455078125,
0.02996826171875,
0.032989501953125,
-0.041748046875,
-0.0152740478515625,
0.01464080810546875,
0.047698974609375,
0.034576416015625,
0.0084075927734375,
-0.006595611572265625,
0.0089874267578125,
0.03009033203125,
0.01197052001953125,
-0.0258636474609375,
0.0391845703125,
0.002216339111328125,
-0.025421142578125,
0.004611968994140625,
-0.019989013671875,
0.01158905029296875,
-0.0124359130859375,
0.00010508298873901367,
0.0311279296875,
-0.0014171600341796875,
0.0032939910888671875,
-0.01255035400390625,
0.034820556640625,
-0.041107177734375,
-0.00608062744140625,
0.0306549072265625,
0.0191497802734375,
0.0048980712890625,
-0.0032024383544921875,
0.056121826171875,
-0.0367431640625,
0.0177154541015625,
-0.0120391845703125,
0.0487060546875,
0.04302978515625,
0.0216522216796875,
0.0245208740234375,
0.01454925537109375,
0.01377105712890625,
0.0126953125,
0.010223388671875,
0.0279083251953125,
-0.003879547119140625,
0.032196044921875,
0.0046234130859375,
0.023681640625,
-0.060302734375,
0.0028057098388671875,
0.04644775390625,
0.053436279296875,
-0.02783203125,
-0.07086181640625,
0.0147247314453125,
0.037322998046875,
0.02471923828125,
0.023895263671875,
0.0204925537109375,
0.0014638900756835938,
0.07489013671875,
-0.0203094482421875,
-0.0281829833984375,
0.00323486328125,
-0.0005812644958496094,
0.01010894775390625,
0.0251922607421875,
0.02520751953125,
-0.0230865478515625,
-0.05865478515625,
0.004505157470703125,
0.0182037353515625,
0.061004638671875,
0.020477294921875,
0.05816650390625,
-0.00415802001953125,
-0.0308837890625,
0.01116180419921875,
-0.00015413761138916016,
-0.0126495361328125,
-0.0134429931640625,
-0.0279083251953125,
-0.04803466796875,
0.003936767578125,
0.04443359375,
0.0240325927734375,
-0.01177215576171875,
0.007793426513671875,
0.071044921875,
0.0506591796875,
-0.0111083984375,
-0.0126495361328125,
0.0096282958984375,
0.0174102783203125,
-0.020233154296875,
-0.0360107421875,
-0.01617431640625,
-0.0281829833984375,
-0.0278167724609375,
-0.007610321044921875,
0.0224456787109375,
0.0029773712158203125,
-0.00958251953125,
0.0009298324584960938,
-0.0513916015625,
0.00400543212890625,
-0.01464080810546875,
0.04058837890625,
0.01317596435546875,
-0.10308837890625,
-0.00738525390625,
-0.044830322265625,
-0.06329345703125,
0.04412841796875,
0.048187255859375,
-0.035736083984375,
0.00861358642578125,
0.01404571533203125,
0.01122283935546875,
-0.0142364501953125,
-0.00640869140625,
0.0259246826171875,
0.0058746337890625,
0.0117340087890625,
0.028106689453125,
-0.0268707275390625,
-0.0022792816162109375,
0.01445770263671875,
0.011474609375,
-0.040283203125,
0.074951171875,
-0.0245819091796875,
-0.006134033203125,
0.0196533203125,
0.01824951171875,
0.00719451904296875,
-0.006565093994140625,
0.04571533203125,
0.0211181640625,
0.02325439453125,
-0.036773681640625,
0.012298583984375,
0.016937255859375,
0.0316162109375,
-0.02069091796875,
0.009063720703125,
-0.029693603515625,
0.0146636962890625,
-0.01471710205078125,
0.048797607421875,
-0.015625,
-0.006855010986328125,
-0.00731658935546875,
-0.004779815673828125,
0.031463623046875,
0.024383544921875,
-0.002559661865234375,
0.0212860107421875,
0.004817962646484375,
-0.0142059326171875,
0.0137176513671875,
-0.00875091552734375,
0.0175323486328125,
0.0223236083984375,
0.00018107891082763672,
-0.0469970703125,
0.0604248046875,
-0.00525665283203125,
0.01548004150390625,
0.0089111328125,
0.083251953125,
0.0159149169921875,
-0.0413818359375,
0.04583740234375,
0.0214385986328125,
0.03021240234375,
-0.03167724609375,
-0.0013647079467773438,
0.03790283203125,
-0.006500244140625,
0.016815185546875,
0.0134429931640625,
-0.0249176025390625,
-0.0399169921875,
0.0165557861328125,
0.00830841064453125,
-0.002422332763671875,
0.006072998046875,
-0.045440673828125,
-0.0018987655639648438,
0.031341552734375,
0.0045318603515625,
-0.05322265625,
0.04327392578125,
-0.0309295654296875,
0.0189666748046875,
-0.0157318115234375,
-0.02508544921875,
0.00980377197265625,
0.0335693359375,
-0.0065155029296875,
0.0120697021484375,
-0.0262603759765625,
-0.01036834716796875,
0.001255035400390625,
0.013824462890625,
0.03662109375,
-0.01381683349609375,
-0.0028209686279296875,
0.0191802978515625,
0.024749755859375,
0.0687255859375,
-0.0115203857421875,
-0.0035839080810546875,
0.0140380859375,
-0.017974853515625,
-0.005970001220703125,
-0.0205535888671875,
0.008148193359375,
-0.004791259765625,
-0.0389404296875,
0.022247314453125,
-0.00860595703125,
0.003704071044921875,
-0.03594970703125,
-0.0888671875,
0.04693603515625,
-0.0077667236328125,
-0.04278564453125,
-0.03753662109375,
0.01171112060546875,
0.0015745162963867188,
-0.0177001953125,
-0.0180511474609375,
-0.00262451171875,
-0.01203155517578125,
0.0272369384765625,
-0.00555419921875,
0.0011377334594726562,
0.01496124267578125,
-0.007659912109375,
-0.050872802734375,
-0.0031948089599609375,
0.004795074462890625,
-0.009307861328125,
0.003879547119140625,
0.0021762847900390625,
0.00490570068359375,
0.038482666015625,
-0.0305633544921875,
-0.050933837890625,
-0.01203155517578125,
-0.007335662841796875,
0.00537872314453125,
-0.03582763671875,
-0.05218505859375,
-0.0240020751953125,
0.05670166015625,
0.049713134765625,
0.0247039794921875,
-0.031707763671875,
0.08203125,
0.0130157470703125,
-0.08154296875,
-0.0214385986328125,
0.01540374755859375,
-0.0195159912109375,
-0.03143310546875,
-0.01861572265625,
-0.024505615234375,
0.0301055908203125,
0.00785064697265625,
-0.033782958984375,
0.01340484619140625,
0.025146484375,
0.0015020370483398438,
-0.044525146484375,
-0.013458251953125,
0.043548583984375,
-0.036712646484375,
-0.029296875,
-0.010040283203125,
0.01383209228515625,
-0.0109405517578125,
-0.0226593017578125,
-0.009185791015625,
0.0288543701171875,
-0.050872802734375,
0.027557373046875,
-0.017547607421875,
0.06304931640625,
-0.07928466796875,
0.007659912109375,
-0.0186767578125,
0.0399169921875,
-0.005893707275390625,
0.0369873046875,
0.000016808509826660156,
0.0595703125,
0.014068603515625,
0.060272216796875,
-0.01256561279296875,
0.07958984375,
-0.00818634033203125,
0.040496826171875,
-0.0266265869140625,
0.0010471343994140625,
0.00708770751953125,
-0.035186767578125,
-0.00844573974609375,
-0.0009393692016601562,
-0.05615234375,
-0.059295654296875,
-0.00067901611328125,
0.003997802734375,
-0.01537322998046875,
0.0165557861328125
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.