|
|
楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////
! Q; u2 m2 A# i6 p; N// Theme Option
) M5 {, s- Y6 O////////////////////////////////////////////////////////////////////////////////+ j; y; L$ x1 j/ L8 t. I+ M
5 c9 i+ Q/ K6 j: ?$ s) ~2 A$themename = "Zenx";! \/ s, L! L- m7 Y; W+ T
$shortname = str_replace(' ', '_', strtolower($themename));
6 ]& L6 V4 F7 n8 U0 l' H- P% e! G
: c2 b2 a F5 U- V Tfunction get_theme_option($option)3 D4 S4 G. K3 S, J+ z
{
' X S: s3 C( k( d, L2 B4 U% D global $shortname;
) V! u/ X7 A8 T) Y- M- T return stripslashes(get_option($shortname . '_' . $option));
# x0 B# B: c$ q$ Y" d, c& d}
: Q7 c6 J2 m: z2 W! ?9 O) O5 y8 l) ?& w3 I3 p$ s, @6 A
function get_theme_settings($option)) U4 r9 o- Z, L
{
) m: f$ a+ |4 D" h9 B6 [0 d7 i return stripslashes(get_option($option));: D3 }. [' I+ z* [+ }. Y
}
% S. ^' p; N2 i) w X e$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");
* b2 _+ z( B5 W) v: S$wp_getcat = array();
2 | j9 V4 c& G2 j( {foreach ($wp_dropdown_rd_admin as $category_list) {
. P/ i) a. e% K1 h0 N( z" t. V8 u A$wp_getcat[$category_list->term_id] = $category_list->name;: L/ e5 d6 K0 b. T1 [
}8 ^6 Y1 s5 u6 u
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
; m" j* i- j$ @8 E: x$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");
" T* ]2 ^, l9 D7 a; Q9 |$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");
# F) k3 t- m/ n; W% N6 g) s
% G, ^# J: d4 y! d; d( {* `$options = array (" ?2 l" `) E! H( g6 g
" c9 o7 U+ w# Q2 ^7 M: k3 b
! p' O" l6 E$ w/ o b& a
array( "name" => "Blog Header Settings",6 t. }. W I1 A7 x7 L3 p
"type" => "heading",
. i- T9 J) Q0 U8 i+ K4 Y O ),0 o$ P2 F5 R N2 W2 i' s
: P$ q$ C7 f3 o! y4 O% |" | array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",1 R9 N5 r. M. v3 c; r* Z% w
"id" => $shortname."_header_logo_activate",
% Z4 p9 e: _ Q9 A+ T "type" => "select",
k! b. y' o9 S- W- n& p) Q9 D "std" => "No",$ M0 r4 y0 `- w/ C( V
"options" => array("No", "Yes")),( [1 H1 y. E- y- L: C" {, ?0 f& t) L
+ ?; W4 s9 ^/ X- Q6 A array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
: }$ M0 ~8 V9 `3 m "id" => $shortname."_logo_url",) W: n( ~' m* V8 c/ n
"type" => "text", z1 B8 B1 k+ s" v) t
"box" => "social",% a `8 ?' x7 Q% J( d# o1 q- e# }9 w
"std" => "", o3 I9 j# Z2 ~( n8 ]5 H
),
$ \, T2 d% f; e9 u3 {* t+ r
3 K" w' _4 Y3 d9 y8 C- w5 f array( "name" => "Insert Header Banner HTML Code (Header)
3 c* R& t$ M- b1 M <br /><em>*Recommended Size 468 x 60</em>/ @5 J4 `& D7 H' ~
<br /><em>*leave blank if not use</em>",8 j# V- C' U. `8 P
"id" => $shortname."_header_banner",
, O: C6 H; q9 J# `- G "type" => "textarea",% h7 @* L2 _9 Q v+ c* h
"std" => "",
% I) e: L0 r3 S+ m: ^ ),
4 w# t4 Y3 A( U% J
( p) `" e& ~! V5 O( E1 d. B+ | array( "name" => "</div></div>",
`. h3 {7 |0 s1 D2 x/ \) p "type" => "close",7 s) m* h: w* b) d5 M- ]2 k
),- {& M3 ]+ a8 E. n0 `. X
9 _/ X" T" h4 N; G/ @; U" ^
" c. j* u& C0 X, ]% | B' t1 l- ^% P
array( "name" => "Header Navigation Settings",# _5 O& v! P- w# W5 e6 ~
"type" => "heading",
0 J* Y0 Q! R# c# d& ` ),
/ b. A W6 u0 s, Y3 k" V& ^( T* u
, v, T4 \4 g) E8 G: L0 @$ x array( "name" => "Insert Page ID To Exclude On Header Navigation<br />4 ^1 `* m* |/ w8 ?7 o
<em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
) E% [! g3 X3 l' t: {' w- p <em>*Enter the page post ID number only</em><br />: ]( _0 C& A1 v0 c" }
<em>*separate by comma</em><br />
0 n- ?1 d& Y( r" h% r <em>*Exclude pages which you don't want to show on the header navigation</em>",# h( M1 H- |$ H! m2 `
"id" => $shortname."_header_page_navigation",1 y# r- v: U+ p) z+ ` O' L8 g
"type" => "text",! I: j1 W' M5 s m
"std" => "",0 x) I# W! g9 N8 L; A# i' m
),
4 f7 [( L6 z$ n; e" n0 @2 r4 n$ Z& ~* ^% Y
array( "name" => "</div></div>",
$ p( g9 w4 H8 l! y1 w; m z; R "type" => "close"," Z7 N* L7 Y. y2 E
),
1 | {( y0 L/ ?- g 9 L; |% |$ o& i
) U o( D) S& C* D8 h9 u
array( "name" => "Post Auto Thumbnails Settings",. N5 M9 @* R! M5 s0 Y- m; H, ]& H
"type" => "heading",
6 K G) S5 f4 n3 ]% R% W$ { ),
8 v* u1 I$ z' n! T
9 c: t8 I* h& G0 \* U8 e+ D array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
! i4 }9 v( D/ K* U, l. X" w "id" => $shortname."_timthumb_activate",
- G' O( l; U8 {& y "type" => "select",* j- `# e8 t4 q/ t: @ ~
"std" => "No",
5 Y& e% O& ]) N2 {: L) |) [2 n "options" => array("No", "Yes")),7 x' U% I4 e1 X L8 C
1 L6 d9 n9 @9 r, O% m& S; Z3 f array( "name" => "If Timthumb is enabled, Please choose its cropping method",: E, ^ t9 \: N8 n% j6 Q
"id" => $shortname."_timthumb_cropping",
/ m) |, G& N9 {6 R. \8 n7 B "type" => "select",2 P5 [5 P, o1 |
"std" => "",
' u, s6 {' y& l* W2 G8 D "options" => $crop_position),% f, A2 M1 ]* S) p7 F m1 m
; P. i# W! Q1 q8 i% J array( "name" => "Insert Width Of Thumbnail Image<br />8 e) O, L, Z7 U0 B3 }; P8 p3 p S
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />4 G' x3 T) G) D% k. D
<em>*Leave Blank To Use Default: 250</em><br />",4 o. o1 s9 n0 j5 y
"id" => $shortname."_thumb_width",
X# P- a/ k3 y5 m+ j& z! v2 r; V "type" => "text",
% r/ t o' }5 o( q& v "std" => "",5 e. S3 u6 A) L6 Y
),6 r0 E" S% L7 _- K6 @
7 i- h# Z# {! A/ I* Y- X y/ }9 u array( "name" => "Insert Height Of Thumbnail Image<br />1 d7 D: l4 j5 B" R' ~' w x# ^
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />8 e5 s- z$ O. M% H+ F
<em>*Leave Blank To Use Default: 200</em><br />",
9 L i6 k0 n3 ?' q9 Q9 X "id" => $shortname."_thumb_height",* L9 ]7 a: A' H" ?
"type" => "text",
, R/ E! V- z' x/ N "std" => "",% B2 \- K* W" F8 `
),8 f8 c" J/ Z! G* P
: ]! Y( a. `! [; g$ K, ^! \( J I: q array( "name" => "</div></div>",$ n' ]; D+ U0 j+ u- Q2 I2 B
"type" => "close",
6 i3 r; _' K5 k+ y4 P% V7 g, J ),
; y' E {3 E5 K2 ~% @. g3 c
4 [+ ?; X( ^, ^3 C array( "name" => "Featured Content Slider Settings",
: G2 _, k% J/ F ?" f( M, }+ u4 X3 D "type" => "heading",
' K7 S/ W0 Q1 r7 T ),
+ } C6 R+ w1 p& c. ?8 U5 o+ V' q' E' m* W- |
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
- l7 V0 v( N( Y( x: w "id" => $shortname."_featured_activate",8 m7 ? L; A8 G8 S: f1 u/ x# T
"type" => "select",4 W) y4 x1 V8 z( c0 z1 [7 E
"std" => "No",
( x3 |! z7 k$ \ "options" => array("No", "Yes")),
8 }5 B9 ~! k& m0 r% d" c
& u. V+ m" E% M C
/ ?* o+ M+ h0 y# z+ L9 x, V array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
2 I2 M) R; O. G( D* ~ "id" => $shortname."_featured_category",
T8 e( u1 U! l* f6 r "type" => "select",
6 \/ i5 W; @0 G9 I- F3 B "std" => "Choose a category:",) u& _6 w @0 R; H( R3 h4 S
"options" => $wp_getcat),
# s9 k, L! u E2 W7 o) N; X X/ f% F; h
array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",
1 X9 F8 p( G) E" c5 d "id" => $shortname."_featured_number",
& W7 z) Y. b. E# F* f6 v+ c/ a "type" => "select",; S+ i6 T4 b# w+ x3 `' j9 U
"std" => "Number of post:",
. B/ @$ R8 j' F) ~- J "options" => $number_entries),
& P4 {5 v( {/ Z' m) G) @" j
9 ^3 m* r- _- ]9 r array( "name" => "</div></div>",
& v- k& D( s$ D8 E y. } "type" => "close",
, v2 j3 b3 U. C* l ),- d% m; L8 V! [, w: f3 e. q' a
' L( c$ ^2 G/ \1 Y/ C
array( "name" => "Featured Category Settings",
+ ]$ L3 e- C0 b! q+ N+ z% a9 z% u, l8 O "type" => "heading",: D8 L' [) T2 B; l G+ \8 L
),
+ P9 i) n* @6 K7 R
7 O$ L; {6 v8 T array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",* K" X4 R3 S$ K1 M: g$ ~6 ~
"id" => $shortname."_featured_category_activate",5 U# l. t* R5 V9 _# } E( e! V
"type" => "select",
" l8 e; Y. p }4 ~ "std" => "No",
& G, S1 b5 d7 H3 Z F7 E "options" => array("No", "Yes")),
3 N3 t: k" e; K. b9 S' @6 m# s ; ~+ i: X8 }* J
array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
" P; W- f' g1 Y: l. C6 Y "id" => $shortname."_featured_category_id1",' d! _; S3 H! c" S/ T: p
"type" => "select",
% u2 @+ R9 [7 Q* s/ Y+ K6 U1 Z- r! @% ^ "std" => "Choose a category:",( p4 w" {7 @7 \9 n5 `, s4 s
"options" => $wp_getcat),
5 u7 Z8 ^! |- e3 D: R : H$ p' X R3 |" A, u0 X/ x/ d
array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",2 S6 V8 F# o1 o; W, S# A
"id" => $shortname."_featured_number1",( ]/ V, J7 W3 s5 [/ G
"type" => "select",5 _( @! `. i. }( N! e% r
"std" => "Number of post:",0 M# _% t0 f' C! S/ |
"options" => $number_entries),
' {8 e' t" x7 W0 ]6 P8 H! f( L6 E * \0 H2 L5 I5 N0 m9 o8 I! P' C
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
! D9 j' ]2 s4 [) r- `5 w "id" => $shortname."_featured_category_id2",
% h- G+ l, r4 B, B- w7 X. }5 W "type" => "select",4 C+ x5 Y, x1 _( ~6 n2 v: u2 X. y
"std" => "Choose a category:",: a1 f7 u' m( r7 K2 P' X6 K( S
"options" => $wp_getcat),1 t- i& z0 ^( U. c; L9 K& G+ Z
$ f: F$ _: J: J: l3 N array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",( r0 e# i( @" ^! _
"id" => $shortname."_featured_number2",
) D4 [; f5 J* N; P6 ? "type" => "select",1 l, p5 Z; N2 V$ b( x, L! Y
"std" => "Number of post:",
7 v9 f8 M8 `' ]$ S, C, C "options" => $number_entries),- n, C& h! H2 x) q
6 y+ w+ s) A3 v9 O/ o" q: [# N4 ~
" n; r& M$ E# W2 p5 M
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>"," D6 X* I$ v) |: n {
"id" => $shortname."_featured_category_id3",# W5 Y3 A1 W# e+ U1 T* l; S
"type" => "select",+ _" l9 w+ L$ ]/ b
"std" => "Choose a category:",
f7 ^' `1 E* i; h5 w! B "options" => $wp_getcat),% G2 M8 c! F: ^, B( }& _
9 {2 ~ Z% v" P array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",% ?% P8 g8 C1 i
"id" => $shortname."_featured_number3",! \3 K! ]( ^1 P) d7 B: e
"type" => "select",
/ }. I0 m4 \8 e8 V) t "std" => "Number of post:",9 V- m. E" [* m1 p9 }4 Z% a
"options" => $number_entries),$ P* z" O3 F) \
2 H6 {( E4 A8 I7 {
g! s# x' y( I( L2 J array( "name" => "</div></div>",
% z4 e Z9 ]8 L3 _ "type" => "close",5 ^) n8 F9 X) w( V/ x, r
),
7 O+ f- |8 @: J) w i" l7 C, }% V4 t; }# i, Y* A0 a/ Q' w9 h. T5 a
9 d7 s# } u3 A) S) _( J array( "name" => "Google Adsense & Analytics Settings",8 n; t1 y# W0 Q& G8 ?
"type" => "heading",- L* a, J d; M1 ^0 u
),. k1 g! F% D. ^: l5 F% [3 g
6 j- s' N3 A9 a5 e- R5 u5 } array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",0 T* c4 P, h$ }+ I! w% ~! U$ y
"id" => $shortname."_adsense_loop_activate",1 ~4 z! I6 g7 Z& i% P( k8 r
"type" => "select",
. A6 r: c( P( { "std" => "Disable",
6 G+ s8 ?* ~6 Y/ p% X9 E "options" => array("Disable", "Enable")),
4 |1 a7 _; A7 i5 l
* f, e( x6 f9 j array( "name" => "Insert Google Adsense Code For Loops Here<br />
; U) x! p+ s, i/ O0 { <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",9 _" Z( A/ p( y8 A5 i, \
"id" => $shortname."_adsense_loop",$ e2 f- R0 H! S l0 J6 a: `0 ]$ A
"type" => "textarea",& X% m4 B1 t% P# {4 a0 v2 v- B n
"std" => "",0 v9 Z( j, t+ ~( W/ F( }
),2 \" U& m7 i8 ^
8 a, `( O& u9 t) u% R3 A array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",
4 }; |( o" i6 U/ W "id" => $shortname."_adsense_single_activate",: ~/ y& d8 p. ~) T& z
"type" => "select",) q; q. t' v7 {. [- F' X+ Q
"std" => "Disable",
3 |+ {& e ^8 C9 M8 Z3 @ "options" => array("Disable", "Enable")),
2 \/ o$ c y# l+ W" \( o" n9 L: n. z' b- w
array( "name" => "Insert Google Adsense Code For Single Page Here<br />; A! G( x' S& e- l, i: n! K
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",* e& S$ G9 V7 \6 l* X8 k! ^
"id" => $shortname."_adsense_single",9 D% }3 {! z ]/ s3 P6 v
"type" => "textarea",
9 F/ p7 W. w& a' N' ?7 ]% V+ e "std" => "",- l5 `, l, @5 w. K3 q* [
),, F" Z9 D( Z- p. p) D |: m
. ^1 L! b- s. o. U6 w
# t1 ]1 y$ Q3 ^' K) X- N& n* N array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",2 J2 B J1 T- ?9 t* B7 B( N
"id" => $shortname."_google_analytics",
/ w& Q, W2 C0 T" e6 D( F "type" => "textarea",7 s4 o0 l* p9 y ]$ m+ w& B7 u' X9 M
"std" => "",
% Y# w- J2 a* Q) ? ),- j5 N" L4 P) F1 `# n2 q) {' r
( K5 c& D$ U! a$ `7 ?( o C
array( "name" => "</div></div>",
, j' G! ]% w6 B" @" ~' D "type" => "close",
9 \7 k5 S5 ]$ G: s$ X ),. ]" {/ d/ O( X$ r4 t$ S8 i& b
5 g; y1 n+ J* y6 ~+ U1 \- f" q3 s ) x5 d6 E" r# g) I: k" ], @
array( "name" => "AddThis Social Bookmarking Settings",- i) w0 ?! e9 N% c
"type" => "heading",
5 |6 M% h8 `9 ?, l/ E" ^+ R ),
2 V7 ?& v% Z2 o0 b) S
$ s1 e4 r; A" b& m array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>! U2 ?$ R. i% y
<br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",: [+ X+ i+ ~" I# K. V f L$ e
"id" => $shortname."_addthis",
" t' q- t( ^6 ]1 V6 D* X "type" => "text",
9 V% i2 d( y# m; Q# ^ t "box" => "social",5 k/ [. C9 U# q% H( |
"std" => "",
- M- a, @! L% O/ y8 H0 F; w ),
* \; c3 e5 t) K2 Z5 o ~6 {- y! {. T
array( "name" => "</div></div>",+ d+ m# v; r9 D1 e+ y
"type" => "close",
3 T! `1 K( v; Z1 H ),
+ P' N/ f: g) G( _# J
! i2 m0 O$ I; E5 |9 d/ ^! e+ W $ u5 f" f" }. ]+ [3 V
. `2 k" f6 i' u: Y5 O4 Z) V
array( "name" => "YouTube Video Settings",4 H1 \& }& s. q. e9 a" Y
"type" => "heading",1 | W+ P$ ~% M; X- i/ N
),2 O$ v. z. E3 \2 D, [! U' Q
4 m5 R' ^% S' a$ m9 u m
array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",5 E; e' }5 k+ {! n% Y! s7 a7 [
"id" => $shortname."_emvideo_activate",
& E: K. J( f6 E5 \8 }3 ? "type" => "select",
; {" J! F, j$ `7 }0 D9 X "std" => "No",, B9 m- h" a) A8 q+ j3 Q0 K% c
"options" => array("No", "Yes")),2 d# P" E+ ^( L7 M6 p6 z! d
1 c; S9 r) a* ?
array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",- f& u7 H7 T+ x* K& T% \0 F0 I
"id" => $shortname."_emvideo",
) S8 t! }+ M/ m$ W/ ^1 f "std" => "",. S+ Q5 G. o' i2 Y0 p
"type" => "text"),
, F+ f4 ^- e: Z3 x$ Q
- _+ {7 M3 v! B' o( Y0 r# O+ j array( "name" => "</div></div>",8 v3 {3 D8 O2 P J; B
"type" => "close",
% Z1 ^: v* H7 I# Q! b( z* |. v; J ),( T G0 v" N g7 D* M
" f' q+ o- n# J/ }3 w/ _2 Q% F4 I array( "name" => "Twitter Settings",# h$ L& e/ ^4 I1 ~2 c$ l7 u4 n
"type" => "heading", }) o+ b+ O: `, R' c
),
+ q4 N' V( T2 R& G( M
; n% u$ }0 n# p5 d, [ array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",$ v5 E( d/ ?) U) o9 u
"id" => $shortname."_twitter_activate",
& ~# ^" J7 a* {1 _/ ` "type" => "select",. s N9 m& ]( G$ _
"std" => "No",
' Z# u5 Q' F/ L# w! G5 ]7 n "options" => array("No", "Yes")),1 ]3 t9 j6 I; |# x& W
( a4 a# l ]* \/ N" _
array( "name" => "Insert Your Twitter ID here9 \, O" P0 E' Y8 j
<br /><em>*leave blank if not necessary</em>8 _5 s# n3 R- {; O
<br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",
) ~$ s2 _0 E6 Y" q9 r "id" => $shortname."_twitter",$ D! z! q1 s2 I3 z1 Z" o
"type" => "text",
0 Y6 `- Z c' q+ O "box" => "social",
8 p& w" e; L& a "std" => "",
% H& h1 ]. Q& l+ Y8 M1 J ),
% l" }' c5 A/ ]$ m7 a; N* Q1 | {" z0 s
array( "name" => "Enter Twitter Feed Count here1 D, X* D; {2 F% B5 ], P& U* N
<br /><em>*leave blank if not necessary</em>: e# _" U q& T
<br /><em>*Enter How Many Twitter Feed To Display</em>",
2 e: h- S" K1 U/ l9 P: ^4 s "id" => $shortname."_twitter_count",* x. ^" Y- T) O7 `" n0 Q$ }5 B1 Q
"type" => "text",: |& o$ A' B5 |4 L7 n
"box" => "social",- f1 ?: L( B! y. J% ]5 t7 l
"std" => "",5 |+ p& V. Y3 k! ^* }# X
),
+ j+ E1 F4 w% M( v' l- d
, |: n# J3 e( b( f- k0 z array( "name" => "</div></div>",) o" w+ k! k$ B1 U8 `
"type" => "close",, [9 x% ~7 m: C" `8 V
),* L9 p( y: j K& S( M
$ {* i5 o: q8 Z# X7 S N3 a5 ]" q+ b- t) b& l
array( "name" => "125 x 125 Banners Advertisement Settings",6 o- `9 m6 K. J7 ^8 ?
"type" => "heading",
: b6 \" ?% ^: | ),1 v4 V6 U2 z" |; M& H& @
4 s" U# V) u8 ~& i8 w3 o) k5 I6 O* \
array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",4 d7 q* @- n0 f$ }; D' _
"id" => $shortname."_sponsor_activate",; J$ x- s3 q' N0 r
"type" => "select",
\, A2 L* H6 \* ~ "std" => "No",
, C$ b+ Q. G3 y% n4 B; [( g "options" => array("No", "Yes")),
, ~0 ?4 t! z4 q* i6 ^# C" H$ u
! i% @/ ~! g9 R n9 ^. ~0 p- R
0 \- |$ N% ` k5 t* Y array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",
, T; m# o/ p' d* R "id" => $shortname."_sponsor_banner_one",
7 E9 U; e' z7 L. j4 q "type" => "textarea",
$ E# s' M# w' L, C0 A8 b/ W& \. | "std" => "",& |) @5 f o. _9 V Y( R
), : N4 O/ D: t, k0 f# }
( b J8 N# y, i array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",
: n3 I! n0 k7 l2 ]4 I! Y "id" => $shortname."_sponsor_banner_two",
! B! P. ^5 G, K. R- O* v& B "type" => "textarea",' I8 c8 H" Z# R v, [* u# H
"std" => "",+ h+ \, O* o6 X8 m+ |) F
),( I+ T( k' m4 o/ f) I0 i) _" a
- H. x, a) {6 s& _1 n- g3 h0 I
array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
) r" e" T5 @! [# W% [2 x "id" => $shortname."_sponsor_banner_three",; [$ w6 h# } ]% C
"type" => "textarea",
* s9 R9 s5 ?% U$ G# p/ z "std" => "",
8 h L. I, a* e ),
# j8 r& Y( o8 }; G) C& n
6 l" {" T6 f3 O! _" ?0 L9 C" o array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",
7 i O' ~; y5 z9 t0 s) p "id" => $shortname."_sponsor_banner_four",
8 Z! F1 v" E; a( H7 v* n5 I "type" => "textarea",; u/ v! S+ Q2 o8 Q {+ a
"std" => "",5 r) F9 N* m. h+ K1 \
),1 Q8 ~* j* E, f& R
+ f& a8 V! F! t4 v array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",8 S1 R4 L4 O; n7 P5 i; I
"id" => $shortname."_sponsor_banner_five",! P& e" C) `5 Q4 f# y% r
"type" => "textarea",
! K( s% U1 U/ [0 }( ?9 u/ X "std" => "",8 H5 B) a, n; j# A o; f8 L
),, m- N" v6 F( {, g8 |% X# S3 [
6 b( w. s! |$ j0 M6 c
array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
( g Q0 j; O# C* ^1 l! ] "id" => $shortname."_sponsor_banner_six", z0 j e! Y; R( E
"type" => "textarea",6 U: q1 p+ r! q; R- @: M! K
"std" => "",- q, C5 w: o& L$ j
),
7 s" g& z+ \" H0 P: |4 ^9 V4 z' B9 Y% D4 A0 T. c& N: ]
array( "name" => "</div></div>",( v X+ U$ B' Q4 r9 a
"type" => "close",
4 I0 X& U/ @7 k ),
4 {3 C1 ]$ w2 f7 t$ B, ~: t" f: o8 G/ k# s$ k/ ^* v1 J# v
( P7 c6 V0 S4 y( R/ f
: o" Y7 H, I5 A9 `% [3 G( g4 y9 F0 ]4 _);4 Q0 a+ b3 q. M( w {
4 v- c1 y! l1 y! ?function mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {) G0 [8 w# T! M$ g6 Z, M6 W; s6 `
: _3 s- J) X ~0 @- l0 oecho "<div id=\"admin-options\"> ";9 C0 ?8 c t0 n, }6 i
) ^( w3 E6 \/ R+ D7 F' h# N
global $themename, $shortname, $options;
; l# u: J8 r; Rif ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
5 J" G, o; C- m9 T3 J$ vif ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';
# W4 K+ v) f3 e3 n* E, J?>
$ r: D- v; t4 `+ Q" K, T. r6 E0 ~* @9 l6 n8 d
<h4><?php echo "$themename"; ?> Theme Options</h4>. L9 E2 i3 ?4 w* D) i4 D
& ~. w e5 i, L<div class="annouce">
@) M6 @( n$ \: W' s1 z1 X<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>+ m0 Y2 ]% t$ E$ ~
<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>
3 [* _3 }* {7 P3 ?</div>
1 u% M+ x6 L9 i! y8 I
7 |3 Y ]1 L) n) E2 S2 X) @& j& {<form action="" method="post">
F) k( T$ J- @
) O# B, s" e# D+ _, U<?php foreach ($options as $value) { ?>' V$ ?1 X; m, l. m( G! _& \1 U
! Q, ]* R" c& B/ U. t<?php switch ( $value['type'] ) { case 'heading': ?>% u0 O8 B5 W( n; y m
- `+ h5 k8 X. p% t# g. @0 h
<div class="get-option">' ~! H0 X; J+ U
* l& a2 n. q- I% D9 @<h2><?php echo $value['name']; ?></h2>; D& s7 G5 Y6 o8 V1 G
1 p _1 w5 t! m; R* m! |) O
<div class="option-save">
4 n* @+ \. i# I/ e& w5 d. ^5 _3 X$ \
<?php
) L0 ]1 B; r& B7 @: ?$ ?break; Z, r- I7 Z% B, w5 u
case 'text':
$ Z5 M4 F7 o: ?8 R! j' @( b# K6 y?>( U7 N2 [: {( ]) a: y8 G
( T$ B; k9 ]1 r, u' L7 a<div class="description"><?php echo $value['name']; ?></div>, b7 {+ J0 H9 @! M. p
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
/ W, a6 Y5 i- ?) L; e1 i* \
: ^& E: ?1 l e' `6 x/ F- n( qget_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>5 P- O. S/ K7 _/ [$ U) F
$ {1 R6 U& a6 l
<?php
; _9 k. }- n5 d+ wbreak;
& d4 T/ {% X) M2 M6 [9 M* icase 'select':
# ?5 D3 l: Q5 E8 f4 E. T?>: |0 b) a7 w% Q
' a; e4 m' B, u! ?<div class="description"><?php echo $value['name']; ?></div>
* g) {! K/ O' C# M" Z" L<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">) j$ U2 [& H, m- [# v" S' H
<?php foreach ($value['options'] as $option) { ?>
7 C" x7 O+ y1 D2 ~$ B<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
( m0 }! f- y+ w$ n2 I7 n<?php } ?>) F- p0 q: H* G. j, }9 O
</select>% j( o2 x9 m! T
</p>
* ?. j2 d; F0 B6 \# A8 P+ L5 S* h1 K/ k- V y. \- x
<?php
: }2 E1 v. N; t- `/ Cbreak;
0 T5 e/ Z) d& x* J8 Ncase 'textarea':
* y+ E2 v" R+ k; Y- J( ~3 p+ x+ r$valuex = $value['id'];+ w6 |- C K! V: b
$valuey = stripslashes($valuex);
7 M5 K% N4 B- h+ A5 [& ` c$video_code = get_settings($valuey);7 e; Q0 E1 t6 Y& L
?>/ G. A4 i. Q1 t; M
@1 B* z s3 \
<div class="description"><?php echo $value['name']; ?></div>
. `, |2 ?9 i* O6 K5 r! |: X<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
9 c5 Y) U& n1 r' w6 f$ a
* |! w7 i5 i7 j+ H) c3 k3 e$ U8 Velse { echo $value['std']; } ?></textarea></p>
9 G! a; F; V5 n7 b1 S4 w6 N& ~+ l- }# _8 x
<?php
6 v4 }" h) q5 O: ?break;* H# E- ? ]2 ]* N. R
case 'close':2 H8 K& B3 u6 `: Z) ?
?># b W, \7 ^; r; n& }; W
6 I3 D! P4 x. h3 V
<div class="clearfix"></div>3 w& t$ v8 E3 A- | G( ~
</div><!-- OPTION SAVE END -->! y2 R+ u0 l3 v0 [
" n" K; Z c0 K* K3 }
<div class="clearfix"></div>& ^' y; P* z; U' {, S0 X9 K
</div><!-- GET OPTION END -->
' {3 N2 `+ d7 T- y& X) [8 ?9 x1 d
+ i; B0 c9 Z" e7 S6 K: l$ V<?php+ b9 W7 A" T/ B. P( y
break;/ t4 [7 b( v% W0 G4 [2 Q+ l; E
default;+ c3 Z" c. t8 f* _+ T% b1 k
?> N* |0 d5 f) Z0 p
+ n/ p d; D/ m2 F
$ i; R+ i4 R8 y7 M
<?php
* ~9 c7 R9 G, L$ s: F0 d0 qbreak; } ?>
, c% x4 p) z M
& u, x. h9 v0 e, V+ v- z9 y<?php } ?>" e3 T3 u8 W4 |3 i i) W% Q
* e- Y; y* _* `1 ~9 d
<p class="save-p">
- F0 ?# _/ g$ P$ z<input name="save" type="submit" class="sbutton" value="Save Options" />. u) U$ v% J$ R! w; E6 r
<input type="hidden" name="action" value="save" />
. v0 w- a9 a1 b2 n2 k) E5 ^& C- I</p>7 S7 X1 L2 v, h- `3 D
</form>
, [, D9 E2 t1 [+ A- D" Q; b
. R9 S; x" r2 f# ]8 D<form method="post">
! `0 ~, m. b$ j' E& g7 j2 t<p class="save-p">
) Z" S* R& ]7 w<input name="reset" type="submit" class="sbutton" value="Reset Options" />
( \0 \8 Y) P: y2 b<input type="hidden" name="action" value="reset" />0 T! S) K% S- h, Z
</p>
1 u M1 J+ W6 t' A. J) N</form>* v7 q6 p0 I# @1 S0 M, r) _
) K/ }+ j+ p' O6 c1 |0 Z
</div><!-- ADMIN OPTIONS END -->
6 m8 w: j7 P7 }( R
7 g# @* f6 a" n+ o4 r<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
3 a. i* z0 o# e6 w8 G5 M
3 x( U, x7 k% d. Y Nfunction mytheme_admin_register() {
/ M% ]* p8 y- \% ?global $themename, $shortname, $options;
8 P# O0 B4 \# sif ( $_GET['page'] == basename(__FILE__) ) {8 `% Z- u7 B2 V" @9 p- v) x, D
if ( 'save' == $_REQUEST['action'] ) {& q7 y* y' q- G
foreach ($options as $value) {
3 l8 z& i. U- C, C% u" W e% iupdate_option( $value['id'], $_REQUEST[ $value['id'] ] ); }. R7 G( k+ R2 v
foreach ($options as $value) {
7 S, {# Z m5 f7 I# iif( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
- |7 f6 s: r8 G6 k# [. _header("Location: themes.php?page=functions.php&saved=true");
4 n! j/ ], d# Z0 Bdie;
6 A) o( Y7 v8 I$ f7 U( t; n} else if( 'reset' == $_REQUEST['action'] ) {
7 x1 D& T/ t t5 o& yforeach ($options as $value) {
7 h6 m; a- s6 e, l6 Zdelete_option( $value['id'] ); }
2 _0 A5 e! t+ A0 Vheader("Location: themes.php?page=functions.php&reset=true");. F, B, q( F1 W+ w' y
die;' J0 r$ Q' w7 J8 `
}7 i+ I& v" S% w! P& i
}
3 G$ [8 k& m6 A5 ^% E# madd_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');3 M: [ M7 e) F( w+ C+ q" D
}: s: w; X; ?: ?0 X$ C, ^8 G( f
5 n8 r- t J1 Z @
function mytheme_admin_head() { ?>
! ?! u3 z: r' \+ R! V<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />
4 C3 b% B2 Y) V" \( N* E<?php }* e2 u. x% O) N0 s) ~# V
|
|