|
|

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