|
|
楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////: N7 v* R- z, x
// Theme Option
: Z( V9 V" J$ ~ k////////////////////////////////////////////////////////////////////////////////+ U" n8 F6 I P; W0 m
/ Y V% n" K0 e4 P% d! H* n$themename = "Zenx";
4 U, h' @- C. H4 L7 @- l! E$shortname = str_replace(' ', '_', strtolower($themename));
, k! \, Y& z. ^( |
3 W2 q/ _, n$ T. ^% Mfunction get_theme_option($option)
- r9 R, N+ R. ^4 O) M4 s8 j7 H{+ B" g% w6 S2 ^/ j" A- g( [
global $shortname;' ~( b( i2 L# n* O* e3 c
return stripslashes(get_option($shortname . '_' . $option));
( q: e4 f/ R! d5 g5 Z/ l( M}+ T" k% H8 x3 O, P
% ~$ q2 B$ Z; xfunction get_theme_settings($option)( _9 w% K7 F" p$ U3 V: `
{- M5 k2 Z; a) f' {9 f* g7 B4 U
return stripslashes(get_option($option));
" f$ b9 R6 {" Z& v}
* e- a& {0 c( ]" s8 C1 L- i: [$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");
7 K" X& D8 g" ~" {, {7 G" Z$wp_getcat = array();
" s" v _9 n% m0 S# j+ c4 yforeach ($wp_dropdown_rd_admin as $category_list) {' T0 q: _9 U8 b
$wp_getcat[$category_list->term_id] = $category_list->name;
5 s% s4 }9 k6 p* l2 @1 Q}7 E7 t) ^- \) C+ e. R% |
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
- ]! q: `0 w4 Z1 u- L) M0 }$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");
. S8 y, o6 ?5 I* X3 H- {9 g3 D$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");+ R1 R( j, Q" E! E
% ^6 Q+ t' c: i3 n, I
$options = array ($ O# O5 a- Y) E' |8 _: z- s
: \% C: e6 ~# e1 P" y8 G& T/ n5 X9 v( y7 i T: Q9 f+ Q0 T
array( "name" => "Blog Header Settings",
9 G# d9 I9 B! C* w! _; J" M "type" => "heading",% a% B4 J8 x8 j8 T2 @% R+ f
),# d, [1 J" r. `2 ?. _- p
g# I4 E3 c3 h( ]! I
array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",+ g" r# c, n8 t+ O% y. ]
"id" => $shortname."_header_logo_activate",. Z3 u1 ]& {% e$ N8 t) @
"type" => "select",* N4 V* }- ?+ o1 H3 J% ~
"std" => "No",: b. f9 i* t) C5 @0 ^* t
"options" => array("No", "Yes")),
' I, T2 F5 D/ c! k
9 e4 q9 F! Z. x* L) g! V8 H array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
/ l: t( ^) n: O "id" => $shortname."_logo_url",
0 N1 O( V9 f9 F# e/ A# c "type" => "text",6 ]) G# z7 ?7 X; j5 @
"box" => "social",, v6 `2 l) j$ E
"std" => "",% k' X0 Y, S0 |1 z8 Q
),
: ]. d; T+ C7 n- X5 K6 |: y( Y- V / C. N8 C6 l4 z; R: I
array( "name" => "Insert Header Banner HTML Code (Header)) N9 W+ I% Y9 I/ i$ Q/ o/ O. P) ?
<br /><em>*Recommended Size 468 x 60</em>
3 m1 a8 _% {" c& H: L <br /><em>*leave blank if not use</em>",
4 [) G9 n- R# {2 r8 M "id" => $shortname."_header_banner",
# h# R6 ?' V6 \" S "type" => "textarea",
2 Z' _* s& ]2 i1 @. d: w* p7 l/ u "std" => "",3 ]) u+ h3 b! Z+ ~$ e" `
),
! v% L8 `/ r4 N7 t' `" h- Y/ Q, |: j6 D0 D; P" }/ g0 C& T8 ?4 I
array( "name" => "</div></div>",
- t2 u- q, K1 u) \% o! d9 y" `% t "type" => "close",
: v$ [4 E2 B3 | ),
5 v) C, v8 ^3 E. H1 x( \" `/ d# u- p1 l% j
) e* F1 ?3 M; U8 f! R1 D array( "name" => "Header Navigation Settings",2 ]# |7 l- j- ^0 n* B3 w. J" O: c
"type" => "heading",
7 j" N2 S8 S2 j0 H1 j ),
7 |% l( u$ m4 { F8 b9 n
+ ?& Z, W; { n array( "name" => "Insert Page ID To Exclude On Header Navigation<br />
* F5 b s9 q9 [1 i8 [( O9 M# F$ o' W <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />8 [% p& Q. V3 C$ U1 n
<em>*Enter the page post ID number only</em><br />, ~0 q" R5 w9 l# e% b- r% v
<em>*separate by comma</em><br />
$ m4 ]$ ]% {' m( r7 o <em>*Exclude pages which you don't want to show on the header navigation</em>",2 y! G5 U: C' @7 Y3 C) T$ A7 s
"id" => $shortname."_header_page_navigation",
. V0 C: g- W. C0 G4 ]4 [$ J "type" => "text",
7 ]0 X- |( Z. ^3 Q" E% [1 V8 l. ] "std" => "",0 E4 @9 A* l" | |& Y6 p5 G% [* f
),
) W! m' { a2 q0 b0 ^) T, d3 Z( C- q9 V3 _9 l8 ^& c, B
array( "name" => "</div></div>",
/ P1 w- H( G4 \% | "type" => "close",8 M5 F6 v5 x3 b
),
) I' O$ u2 b7 I1 D% C" i" I1 o # H2 E- \& k) `8 H" P$ V: _
9 c. V- K4 j$ S( R$ M g8 e8 F% g array( "name" => "Post Auto Thumbnails Settings",
z" V& d. y0 `5 P* c "type" => "heading",& r* g3 O6 N/ {
),+ j% M8 Z( V6 \' k4 V0 g
/ H$ R0 U! l/ K array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
0 F0 X! s: H" Q* I% s4 P0 y4 Z$ c' u "id" => $shortname."_timthumb_activate",9 V4 _' W, Y5 ?' g& k
"type" => "select",
; p8 q0 I; F: j, X7 Q0 K4 [ "std" => "No",( t# l% h+ I' T( b1 N+ m1 m
"options" => array("No", "Yes")),
& e E: W; _/ A# ~! k8 S 4 F, u7 J7 F g K* {' r
array( "name" => "If Timthumb is enabled, Please choose its cropping method",
) b5 Z3 m; N: U4 z4 z: ?8 g7 m "id" => $shortname."_timthumb_cropping",5 Q) D3 G2 }) w- E3 ?) ?! f8 T
"type" => "select",
4 w' y8 O; X8 U% \: X5 ? L0 C9 L "std" => "",
) B- ` Z k( g- n "options" => $crop_position),
' {* ]2 U: f6 b# V2 W }
+ F- ~; Q; f2 A4 g7 v# m& [# P. N array( "name" => "Insert Width Of Thumbnail Image<br />/ s+ s8 x( {# r& L' F
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
* _: `3 y3 y; @1 r7 Z <em>*Leave Blank To Use Default: 250</em><br />",! p w" ]/ }( ^/ a1 _$ z, {% d2 S& O
"id" => $shortname."_thumb_width",
2 I ^. e8 F* b9 M) W' |/ W }9 \ "type" => "text",
3 m1 g) k' n8 c2 s E "std" => "",
$ z, w8 R, j3 \/ P% W' b4 R+ T0 { ),( {% w. U& v' U6 [- p8 `. E) _: s
0 m' {2 S# f- s& C9 w- C
array( "name" => "Insert Height Of Thumbnail Image<br />8 o: Z' ?" @1 i: ?2 w" d% ?
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />9 | h) e5 A& K2 U6 {: }+ ~$ [ g
<em>*Leave Blank To Use Default: 200</em><br />",1 A/ \' u( \) `. b$ v
"id" => $shortname."_thumb_height",
4 e3 [' D: |5 f/ b m' |+ b "type" => "text",
2 h8 p# O8 J) {, j* h9 N e "std" => "",! f1 p* n5 Z. a! x
),: ]/ b3 w% j2 t0 `
; s$ }9 \) t. y+ S$ K2 N5 P array( "name" => "</div></div>",1 O7 f1 k2 t( X
"type" => "close",
- U! T; z& p: Y' y, B% R ),
7 }( ?3 S! b! _; S! S
3 V9 e8 D3 x0 {4 O; s0 x( M array( "name" => "Featured Content Slider Settings",, N4 D" ^$ N) v: m( B
"type" => "heading",
1 f) s W; R! b/ v) ^& e) p5 C ),# p; z, h6 h6 c
0 b! I$ |+ e$ \0 D
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
5 a5 H) b5 ^! g; r8 X1 I% M o "id" => $shortname."_featured_activate",
/ C( L' |. ^: `3 K7 y; J "type" => "select",! q v0 { ^* l" t! h! C& K! p
"std" => "No",
2 c* \, K& a# Z7 f4 w. | "options" => array("No", "Yes")),
- B" T0 B2 n5 n6 T
2 k1 m2 D/ h9 r1 i9 }+ i# W8 s
* j4 F9 Z6 A" V! a8 @" d* I5 A array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
6 |! T) r0 O7 N C. p "id" => $shortname."_featured_category",
. M* }# k) s: ], S% M4 P2 } "type" => "select",. a& p8 f G; B7 D: P
"std" => "Choose a category:",
* b$ |: V8 B8 a: h$ q6 q- L "options" => $wp_getcat),2 e" p& A6 U& j" C
: l' Z: T; D( w \' ?1 s
array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",3 W0 X5 {: Y9 O* m
"id" => $shortname."_featured_number",
" `% W# P- V3 i "type" => "select",
% `% T5 a0 v t6 e: q' N! n$ \ "std" => "Number of post:",; @* b( B: R8 M
"options" => $number_entries),- s- b2 l7 U4 l% x
' J% s4 r- h9 b& r3 M array( "name" => "</div></div>",. J, ^& \# t) `" {: J+ L: D" m
"type" => "close",/ K6 X1 G) Z6 i0 K: E6 z' ?+ h3 O
),
/ ?6 n% E9 F! S* C" B3 h
. W" Q( v9 `' _ array( "name" => "Featured Category Settings",
. _: y9 X9 Q0 S& v3 G/ C3 ` "type" => "heading",$ J( G7 |) g( I7 K3 _9 G% @
),, p' L) w% G# E% Z
) j$ P' Q9 z, l% a! l array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",' O/ M* {/ A- ?% D, Q; N7 X
"id" => $shortname."_featured_category_activate",4 P; ?( V$ Z L: r: I% J
"type" => "select",
1 V5 i, W9 D- z! R; m+ O: S "std" => "No",7 {# [( t6 {9 D
"options" => array("No", "Yes")),3 a% A/ z; q' o
6 P* @1 K, y/ K$ N: e array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
: m/ r& J, v4 G "id" => $shortname."_featured_category_id1",+ q4 \1 ~. H& C; {2 ]- j X' L4 Y
"type" => "select",- ?5 A3 i6 u4 }9 H
"std" => "Choose a category:",8 r2 F- ^6 R J q7 N% Y u
"options" => $wp_getcat),1 {5 S7 [( @, r4 Y; [
1 M5 c$ w# w" @ array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",
^" p% V7 m' b1 ?1 c2 _ "id" => $shortname."_featured_number1",/ B6 V$ F" t: e( S9 f1 t( K0 l( n
"type" => "select",( t- V! C$ N, N% ^( F
"std" => "Number of post:",6 a, V/ s: M: t1 m0 o% Z. _7 c
"options" => $number_entries),3 Y; l/ `* v9 Z5 m1 U1 T3 d
( O. K0 Z( X. |! r: ^ array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",* V T1 |% O& J0 `( [
"id" => $shortname."_featured_category_id2",
4 e6 d' K( Z( k6 S' ]) A "type" => "select",8 H: [/ L9 ~5 I, }3 Z
"std" => "Choose a category:",( A. ` `+ z$ {. q6 {. {4 D" R& L
"options" => $wp_getcat),
& }, E9 C6 t. U2 z2 M) W+ g ! p* _) [% ]1 i' u, n$ r9 v
array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
7 j) G4 c! }4 |* w$ ` "id" => $shortname."_featured_number2",
( J. M. \, a0 t8 T T9 \0 r "type" => "select",- M- n, i$ Y! }" |, m' X
"std" => "Number of post:",$ f C; m: B4 s
"options" => $number_entries),
0 U; [1 ?6 W- _6 P
! N; n1 ]1 C C, a: l E 4 E3 L- j1 b$ f
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",4 f/ L9 Q) g8 r# A! d
"id" => $shortname."_featured_category_id3",
" Y# W" S% T0 v5 j& l- D! F "type" => "select",
8 y/ t O, A3 @8 y "std" => "Choose a category:",
) q1 Z$ O2 `" L" E' [, q* H "options" => $wp_getcat),
0 L4 r& G9 Q1 s, n5 t; F# S ) D" M. a% v% x
array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",4 e* i1 E! R2 c; y: I6 x0 X
"id" => $shortname."_featured_number3",# K3 ` ]+ |) p# A M1 V
"type" => "select",
2 F: W; @: F) F) B* ]9 | "std" => "Number of post:",
$ {- ~0 _: `* ] "options" => $number_entries),1 B2 S, e' v! f3 q, i
5 E& i" \# E, t8 N& G3 E/ a( ^
3 C9 G7 a1 ?$ x& ^ n6 g array( "name" => "</div></div>",
: D! ]7 g1 a: B L/ u "type" => "close",
/ N) H, Z' p! y N8 B9 V ),
# E- U/ B( z9 |; w. N! w& F7 z
$ C( o8 i l# W* }: E
" I, {1 H. R, R3 S4 ^ array( "name" => "Google Adsense & Analytics Settings",
: W/ [0 h0 ~3 d: Q& l+ E) `- | "type" => "heading",% v- W, e* n* W
),) i+ ~0 G* e3 t) ?2 j2 G5 u3 |' Q
+ V, e! G- {9 p; e% v: J, x3 O array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
2 E: Z" Q# p2 V& N- h "id" => $shortname."_adsense_loop_activate",% ?4 Z& |9 }3 }5 s
"type" => "select",3 H, h( q* W) H2 T# P- j
"std" => "Disable",
( c" L# O: V3 E) f. U# @ "options" => array("Disable", "Enable")),8 x$ L, p' N, U. O
+ J$ X) X) X N- H array( "name" => "Insert Google Adsense Code For Loops Here<br />, R' C+ ?8 W% c3 X3 `
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
6 P0 L& k, p& D& \( c "id" => $shortname."_adsense_loop",, y7 p! A2 ?% S* y/ b1 g5 }# i# n
"type" => "textarea", f; g% p' j) w
"std" => "",# O2 Y) X+ _0 C5 q" M; B+ K
),$ \: z9 v/ m* y4 q: l4 V4 B0 d
; O. Y u; ~$ v8 J2 B+ b9 t! n3 H array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",
0 |" o+ a8 R% Q* f/ `+ N/ [2 r "id" => $shortname."_adsense_single_activate",
6 ~: f' J" [" ]# j G4 C3 ` "type" => "select",% B3 y( x |/ l r9 ]4 g7 {5 Q
"std" => "Disable",
5 z$ A5 v1 \. Z "options" => array("Disable", "Enable")),
1 c8 k5 d: T7 A$ Y/ U5 T b- P* Z) g/ q- R
array( "name" => "Insert Google Adsense Code For Single Page Here<br />
7 u6 X" d: y+ X4 _- d <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
- L) j' j% D. M "id" => $shortname."_adsense_single",& |' \1 J# Q5 r$ G" i% ? F
"type" => "textarea", ?% M7 A: M7 Q# c
"std" => "",2 g; G0 g- F- g# A5 |8 N+ p
),( a' r- m& h _, f( V
7 w2 y, k1 H% c3 j
1 r* O+ r# V" E& e5 F! m array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
, g0 @( h9 w: O0 i "id" => $shortname."_google_analytics",
' a/ r6 {8 S8 \' O' k2 i "type" => "textarea",+ A* Q, l) M) x) W9 W4 W
"std" => "",
8 u2 N7 m" m; g7 [; V ),& }) T; Z5 R% O$ ?7 Z+ v
1 ]1 U2 a( ?$ B, H# A
array( "name" => "</div></div>", H( I7 X" B% q7 z/ w e$ a Q
"type" => "close",
% C3 c, |: v" J* C' I ),
$ \! C6 S$ j; N6 _
2 H* |. h: \; }# w4 \3 s
, Z2 _; `" @; {0 ~; J8 W, d, t array( "name" => "AddThis Social Bookmarking Settings",
+ ?# |' M- N- w( n1 e! G; V: D "type" => "heading",- [# S1 m1 X4 d$ G' l
),
1 i8 n0 O! C2 V/ J6 Z, i, }8 [4 n8 G
+ w5 x: N5 p- B5 D* H array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>3 x6 d" d+ @! u& d0 t( @+ z
<br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>"," N4 L3 _9 n* M% T% J7 ^
"id" => $shortname."_addthis",$ w- e, c: M# |
"type" => "text",& W/ m/ ~) a; b; Q n4 {0 M
"box" => "social",
+ w# Q7 V1 e8 P8 J3 e4 j "std" => "",6 _2 v: s8 L/ V6 s9 m
),7 i1 w Q$ E+ C/ v* X. d4 W
/ Y! x: p5 i* J
array( "name" => "</div></div>", q; h' @$ A+ P0 F% k& Y
"type" => "close",4 g& d3 q& F4 h0 N1 t+ P
),
6 r' t L( f7 g4 y! F , V9 z' i4 }% x4 y2 D
- E1 ?. c4 H4 Y1 S
% {" }! Z3 H# e array( "name" => "YouTube Video Settings",) E4 }- O9 E1 F2 s1 r7 @7 r
"type" => "heading",
; L( n3 P, ^& t7 U6 \9 A ),/ v5 ?2 a# P1 J( ], `
2 Q$ H5 X% u8 I/ t3 W. X
array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",& a" w4 n3 i3 {1 M+ V
"id" => $shortname."_emvideo_activate",
! Q1 P4 P& a' R' n "type" => "select",
9 T9 r/ y+ r! B "std" => "No",
7 H2 k# ]+ T3 S& m6 z' D "options" => array("No", "Yes")),$ V0 b; S- W: ]8 A! U8 {! S
: a5 F9 |( R& l# M0 ~. t4 p9 B
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>",
, t! w) r- R5 Q, r8 S# G" L "id" => $shortname."_emvideo",4 B8 [' i, v9 J/ e0 b' ^2 R
"std" => "",
5 }/ h7 b6 z' _$ I "type" => "text"),+ u% s3 N5 l" m, m2 w! ]
0 L) \8 [9 W- i/ M
array( "name" => "</div></div>",
4 I) ~* k$ A0 ~, N "type" => "close",/ Y$ z y. ~& s- j' K
),
2 H& f$ {" E% o8 }& ~( D / h% N' C! [) P* ]3 V, K/ @$ \
array( "name" => "Twitter Settings",7 S, R5 r0 g) S5 M; h/ I2 d
"type" => "heading",
" H/ t" d; p# Z4 H" `" u( n7 ^7 r' b# m ),! N! P# c! {5 J; k$ j
$ ]4 C6 j7 ^& e$ Y: D5 @& w0 l array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",0 q2 }3 K6 ~1 ?+ b" p1 F; l, I" @
"id" => $shortname."_twitter_activate",# N/ ?7 Z k+ x
"type" => "select",
o$ f8 c6 L8 f$ k( Z" e8 Y "std" => "No",; a; B1 b# T# i5 o9 X( w& h5 w- _
"options" => array("No", "Yes")),3 U2 ]2 T# J5 y2 d' G- B3 T
" h" V4 h3 h% k
array( "name" => "Insert Your Twitter ID here7 S5 G3 k* d7 f8 m; G/ @* n) h
<br /><em>*leave blank if not necessary</em>' _2 J5 ~' \/ V- v
<br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",/ X9 b/ T) K& J# ?+ l7 b4 S
"id" => $shortname."_twitter",
9 E, s1 }; `- K6 K "type" => "text",
/ K4 }0 k5 ?- I6 S- ?1 Z3 _ "box" => "social",
% c( \) O+ R0 E- w "std" => "",
0 s5 r0 O4 B1 @8 m, D ),4 w6 V4 k8 S8 @+ Q
$ n$ P# `8 f0 x% @0 g7 x
array( "name" => "Enter Twitter Feed Count here) o7 F8 d& m6 |2 z& o
<br /><em>*leave blank if not necessary</em>3 y5 B u+ l! D' k9 t$ j
<br /><em>*Enter How Many Twitter Feed To Display</em>",
" [# m( b* B" z. s "id" => $shortname."_twitter_count",* N1 t5 u0 B( v+ ]( f8 ?8 i( h
"type" => "text",0 a2 K; {0 C4 a* R* e: R0 }
"box" => "social",
1 h' W# n5 {- B+ n; J: T "std" => "",
! z0 u4 I/ J$ X7 G ),
) i% P- u" [: S' B1 H3 {& S; F2 f- j) y/ B$ e W
array( "name" => "</div></div>",
1 G- n: \# M+ _ K4 Z6 S3 ?2 l "type" => "close",
, A3 d/ s1 a4 B4 V" t) { ),3 g, G% h- D1 r, e
* P" i- i( A+ i# ~( v$ n! g6 j* [
) Z0 a& u* F3 \$ D) X# W array( "name" => "125 x 125 Banners Advertisement Settings",
$ I% O! C4 \" Z1 o& z! r "type" => "heading",% ~( f f4 j) J5 x2 {& ?
),& F8 L @: x/ O( \# o8 J
# N0 v4 C$ u. J( t( w array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>", f+ Z. Y7 J* H" g3 O
"id" => $shortname."_sponsor_activate",3 b8 P3 R4 F! u3 q* D
"type" => "select",6 q; A% C. L3 ?; l- ]* v
"std" => "No",
4 p) s# L8 |0 W8 p. r) O2 l( R "options" => array("No", "Yes")),
8 L7 S, |: Q1 T' J( C9 ? 9 t* ~4 w: R# i( n' `7 S! P8 _- m
g5 O, C' Z' h
array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>"," J7 e k" ~1 f: z* a
"id" => $shortname."_sponsor_banner_one",/ ^4 d& I4 |, j7 k* t( t
"type" => "textarea",' w6 k% i- {4 j2 V
"std" => "",! N- C: a F( `; e4 w
), ! N$ d, [; i* L. j3 X1 A( {# H
& B6 D t$ ~" U9 V8 [ array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",1 w9 E) r; q. T) U" {8 O
"id" => $shortname."_sponsor_banner_two",: O5 @0 u J0 X
"type" => "textarea",
& T' |7 A4 u, X) r "std" => "",
( J8 F1 O' w: N) ]7 @; |7 Y ),! z% ~; q7 t) D: p$ s6 i a
# C; j& T3 A7 k: I/ X array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
- g8 ~5 x4 M' z# N: m( Y "id" => $shortname."_sponsor_banner_three",% ~. {* c! k; D, A7 e2 O
"type" => "textarea",4 s9 R7 R" |, s7 F) t; b# U: i
"std" => "",+ \; j; o5 m, |$ k
),5 b/ _3 V! h! s
6 F+ i/ b. u/ t" J+ N4 ^" r2 D- C {
array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",7 c+ K, h/ u; G N
"id" => $shortname."_sponsor_banner_four",
5 f& ^5 I+ b7 V/ J0 N z "type" => "textarea",
' Y5 a# W$ v0 B) e "std" => "",
+ g! [. M2 M1 O+ E, F: d! Q7 O ),
. _* d5 W1 P# |9 i9 o K- j5 a" k/ ^+ i
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
$ Q/ a* [7 p% \! p9 J% B$ h "id" => $shortname."_sponsor_banner_five",2 b+ ?4 t2 L- k' z9 ?( t2 k
"type" => "textarea",
9 E4 g1 I$ \2 K+ F% s3 f; j5 i8 r6 u "std" => "",7 v. O2 L! ]- w, q3 w' Y4 |) _( w. L
),, T1 [0 z3 Z; [0 N$ e# T% e
' G/ Q) K9 c! z array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",4 [/ R8 E# C5 F/ b3 j. b
"id" => $shortname."_sponsor_banner_six",
$ o' Q$ N5 j0 G) c' O7 j; C "type" => "textarea",
7 j, x7 j4 U* S0 ?- p "std" => "",! W$ Y( [4 ]1 b# t
),
; B- l- x( \: C ^2 g+ ^
0 r: `, A1 x# }/ V' v: l" C array( "name" => "</div></div>",( C+ w! {6 |0 G2 c9 P O6 Z& d
"type" => "close",
) m" f3 i0 N% l! Z* ]! ]# w* \ ),9 G0 a$ s7 j5 h+ z m2 x* }* c* @
, k- L4 O1 N6 k- t8 j$ c4 l
+ _- Z- T$ H8 J% O0 ]- y# \* S
9 ]$ P4 _' T9 V/ B J+ X) u0 Q; g
);2 D5 K9 q- @$ G ?7 z% u2 X
% e! P) P4 \' ~' S4 Nfunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {( r: ?+ ^" K: T0 j) Q- o' y" e
; @4 d, U8 a$ G- L3 xecho "<div id=\"admin-options\"> ";
9 g! I* ~2 p$ H+ U
, u: d7 N! \$ H# Y0 Qglobal $themename, $shortname, $options;1 f! Z* x- Q9 X0 m A- F% w9 t( B/ ?
if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';8 G# |0 b! Q2 T. `8 M" e; _
if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';
- V- G: k3 q5 z1 ?( E( q& g+ E?>
/ ~! K' j. T1 W {
) g- i8 |' K; T! G4 }7 d# h<h4><?php echo "$themename"; ?> Theme Options</h4>; e, t, `5 S1 l7 g- M; Z
, f4 H) H5 h' g3 L( o8 {' t
<div class="annouce">
% `- {* q% ~- k5 C- c<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
# X( n3 D# f8 c! u# q1 A<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> ^5 v( m. w3 W3 D% h7 x
</div>! p% F" ~! f7 H0 x. s
. [' g/ ?) _3 a
<form action="" method="post">1 Q7 w, x; x9 H* M* ~
: \$ P. j; X7 s/ Z/ A<?php foreach ($options as $value) { ?>
# w0 {% a: N/ j( }! A, z3 d
- S7 U, A4 g8 N3 T( m* U; w. f* V6 O<?php switch ( $value['type'] ) { case 'heading': ?>
& ?% u5 k' F4 d7 @
: s$ K- N2 K% j* o% g! H<div class="get-option">" f; l( [5 n# y* E
3 e, F4 ?3 i2 o# M# A" e
<h2><?php echo $value['name']; ?></h2> ?% j6 b0 j8 ^: S7 S
6 l! G1 i9 d' g h6 a1 M3 ?) K8 B4 s
<div class="option-save">6 ]' y" q7 O+ a% j/ D# e
$ G. @; w2 E1 P3 I/ }
<?php
5 {1 \! Y ]: n, m( O: I2 I5 Sbreak;
, {8 a) s: _& |0 @7 n" Y$ x9 gcase 'text':
; ~. x9 `6 C6 l. i?>3 f2 J3 X$ l' }
! ?% k4 V0 Z* E$ h<div class="description"><?php echo $value['name']; ?></div>: t5 J N# @! q9 @1 h( S) C
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (! s5 l* s5 H3 j# _+ G( Q o
) _! n o: [4 L" q/ Q9 |6 dget_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
: C! E. \4 m* y8 o0 f, _: ^* q3 P+ I0 F
<?php
% X: ?; W1 k, D- l# N6 bbreak;
! Q3 [5 d& L. v' U& R% H4 gcase 'select':6 ]0 W5 P% l( w4 G4 n
?>
: a+ V+ ~. v/ }3 F/ S! i D* g3 l4 v$ k. V0 P" }
<div class="description"><?php echo $value['name']; ?></div>
* @( j0 ^2 ], k! @# o F+ D- P<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">
) e% V& B3 v" P" o+ C<?php foreach ($value['options'] as $option) { ?>0 V+ w, n9 b$ t6 c# w4 o
<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
* G7 |& A) \ l8 x; N6 n# t3 ]1 r<?php } ?>9 }4 M8 X5 B9 J2 J
</select>: ^5 Y, e. S7 S9 ^" k
</p>
8 p) ?4 R. T0 @- J
2 w8 V5 c, D0 `5 {5 E<?php
/ J6 r- R) }! ]break;/ |7 X0 f& K" g7 X6 d, ^
case 'textarea':( A. m4 c$ H# P/ d
$valuex = $value['id'];3 F# H" j3 F, a* \9 d6 i2 {. N1 c
$valuey = stripslashes($valuex);
6 O' F/ w: X8 E$video_code = get_settings($valuey);
, Y8 r: v. Z& L7 f0 u?>
4 `7 C8 H: P5 `
) a( I+ j \/ Z<div class="description"><?php echo $value['name']; ?></div>
! I4 @! A' m5 U* Y9 [* {* U<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
$ \6 [% q( Z6 {% E) S+ F1 C5 W; w8 h) \& ?# T7 w! l
else { echo $value['std']; } ?></textarea></p>! }( o F" t% W; ?6 X
; }1 b( e: y1 ], l% g9 P<?php$ o7 k; Z1 t5 [
break;: N: A0 A' F5 d: Z
case 'close':
& x5 p) e# ?) `1 `?>
Q1 x1 W" U$ g7 D- }# Q# t. q3 B& c" E8 n4 ^2 j9 {$ n, [" `
<div class="clearfix"></div>- T- s5 j3 D. l+ y. D
</div><!-- OPTION SAVE END -->/ A! y2 t$ b2 v- D& a& @
- x0 a- A) L, K0 ^( Y
<div class="clearfix"></div>
0 H' s# p3 y& c</div><!-- GET OPTION END -->: y' r( d" M& q* y. U4 k2 @5 f
/ t, }' h/ Z) d, N" {, I( |
<?php
& \' z) M9 J+ wbreak;
: y; j, J" A7 `& I+ q7 B; p$ N: Edefault;
9 X& y, A% l* b/ R?>
0 Q8 D- R- p! O1 u' U4 z# i v9 o- _$ @- N9 T& W% Y/ Z
8 U7 {' }# }1 }; c+ Y9 R, e9 u<?php
! p$ E0 i2 ~' t2 Q- u, Xbreak; } ?>
. k- t8 ~ Z$ A3 h2 x$ V' w5 J, R; S+ Y8 |. [* }* b
<?php } ?>
. h; @/ w% Y* r) Z# @$ _" {; N9 ]) l/ T: C
<p class="save-p">
6 Q! W3 Q% y6 k- e; _. B/ F' \. w' W<input name="save" type="submit" class="sbutton" value="Save Options" />
7 N% \/ B/ ?( y$ ~' [( }<input type="hidden" name="action" value="save" />0 O# v3 r* h. M3 g9 j- Q, g
</p>
" J$ w4 ]( j' y</form>. I" J o" n" K
' p# |* Y* y0 Q: P2 |. O
<form method="post">6 j4 E1 q8 l3 \6 \
<p class="save-p">
; `9 m5 K1 ]7 V1 y<input name="reset" type="submit" class="sbutton" value="Reset Options" />9 c8 L7 O+ D2 _8 r: z- e
<input type="hidden" name="action" value="reset" />( e5 m. j" `9 ` b4 y2 V; o
</p>
0 D- [$ O5 T& Y$ D: x</form>, o9 u5 o1 W, F1 l: \: e" F' F' L" C
4 B% E7 p, r4 Z7 R$ _* g
</div><!-- ADMIN OPTIONS END -->
' K" G* T, r) m- G. l
. b1 @7 G6 G3 s. n% j+ z" |2 q<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
" `/ B- u+ u$ K4 ^. a7 R9 Z$ L, U% ~$ |4 ^! u3 W( U
function mytheme_admin_register() {
# |+ _5 F# t g I7 mglobal $themename, $shortname, $options;
& o7 h* m4 {, I+ G- Y- V9 ~- Cif ( $_GET['page'] == basename(__FILE__) ) {
, Y% g! a) u% y& a2 n1 N1 Lif ( 'save' == $_REQUEST['action'] ) {
( D! {: j6 d$ ~9 H) ?foreach ($options as $value) {
) D( P0 H; I6 A$ q2 h7 s/ u+ x. iupdate_option( $value['id'], $_REQUEST[ $value['id'] ] ); }: V0 g0 Q! v2 z$ Z+ _% b+ \; I
foreach ($options as $value) {7 i# ~& I/ H7 p* z; T! U
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
2 e- c! q& V, p' }' W& xheader("Location: themes.php?page=functions.php&saved=true");
5 V3 D* ~& g$ a3 p& p" x3 xdie;
# _9 _+ a. C! l* r% |5 Q+ V) ?} else if( 'reset' == $_REQUEST['action'] ) {
3 u: ?! [, l( I1 s/ p( Q9 Oforeach ($options as $value) {
! e F% t: s2 G; z. Mdelete_option( $value['id'] ); }. p. b$ F) l* x( n
header("Location: themes.php?page=functions.php&reset=true");0 A$ M- Y% H5 Q" q: [4 q3 \
die;
. o4 p- \, k: E1 g6 _8 _" |# A/ f}
5 z$ ^; D% l' w4 S3 L/ i5 k6 Y}
6 D* \1 M1 M9 X V9 Aadd_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');, m: q4 S1 E% Z* O$ ^+ {
}4 m9 l# t" h1 A: T. N6 ]' c
5 y" A2 `: h$ m- B2 q. [" Z) @
function mytheme_admin_head() { ?>
$ R4 x* X% [% A2 o<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />, a. |6 }: f9 n, N2 j
<?php }$ u- B& K7 K9 D8 |
|
|